[PATCH] [v2] powerpc: MPIC: support more than 256 sources

Michael Ellerman michael at ellerman.id.au
Mon Jan 29 18:23:48 EST 2007


On Sun, 2007-01-28 at 23:33 -0600, Olof Johansson wrote:
> Allow more than the default 256 MPIC sources. Allocates a new flag
> (MPIC_LARGE_VECTORS) to be used by platform code when instantiating
> the mpic.
> 
> I picked 11 bits worth right now since it would cover the number of
> sources on any hardware I have seen. It can always be increased later
> if needed.
> 
> 
> Signed-off-by: Olof Johansson <olof at lixom.net>
> 
> Index: merge/arch/powerpc/sysdev/mpic.c
> ===================================================================
> --- merge.orig/arch/powerpc/sysdev/mpic.c
> +++ merge/arch/powerpc/sysdev/mpic.c
> @@ -944,6 +954,21 @@ struct mpic * __init mpic_alloc(struct d
>  	mpic->irq_count = irq_count;
>  	mpic->num_sources = 0; /* so far */
>  
> +	if (flags & MPIC_LARGE_VECTORS)
> +		intvec_top = 2047;
> +	else
> +		intvec_top = 255;
> +
> +	mpic->timer_vecs[0] = intvec_top - 8;
> +	mpic->timer_vecs[1] = intvec_top - 7;
> +	mpic->timer_vecs[2] = intvec_top - 6;
> +	mpic->timer_vecs[3] = intvec_top - 5;
> +	mpic->ipi_vecs[0]   = intvec_top - 4;
> +	mpic->ipi_vecs[1]   = intvec_top - 3;
> +	mpic->ipi_vecs[2]   = intvec_top - 2;
> +	mpic->ipi_vecs[3]   = intvec_top - 1;
> +	mpic->spurious_vec  = intvec_top;

I like it :)

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20070129/6ba1a4c8/attachment.pgp>


More information about the Linuxppc-dev mailing list