Questions on interrupt vector assignment on MPC8641D

Chen, Tiejun Tiejun.Chen at windriver.com
Wed Sep 22 10:36:43 EST 2010


> -----Original Message-----
> From: 
> linuxppc-dev-bounces+tiejun.chen=windriver.com at lists.ozlabs.or
> g 
> [mailto:linuxppc-dev-bounces+tiejun.chen=windriver.com at lists.o
> zlabs.org] On Behalf Of Scott Wood
> Sent: Wednesday, September 22, 2010 6:07 AM
> To: Anderson, Trevor
> Cc: david.hagood at gmail.com; linuxppc-dev at lists.ozlabs.org
> Subject: Re: Questions on interrupt vector assignment on MPC8641D
> 
> On Tue, 21 Sep 2010 17:37:15 -0400
> "Anderson, Trevor" <tanderson at curtisswright.com> wrote:
> 
> > IRQ assignments for MPC8641D are "virtual",
> 
> This is true for powerpc in general.
> 
> > meaning "made up" and quite difficult to determine by 
> looking through code.
> > But I believe the plan goes something like this:
> > 
> >   IRQ
> > ---------
> >     0           No interrupt
> >   1 - 15        External interrupts (only 1..12 would be used)
> >  16 - 127       Internal interrupts - see Table 9-2 of 
> 8641D ref man,
> >             Add 15 to the numbers shown
> > 128 - 255       Yours, or your BSP's, to do with as you like
> > 256 - 511       Message Signaled Interrupts
> > 
> > If you look in the sample device trees for 8641 cards 
> you'll see that 
> > the interrupt values cited there for various devices match 
> the 16..127 
> > group above.
> 
> There are two different numberspaces involved here.
> 
> The MPIC interrupt numberspace in the device tree (which is 
> not virtual; it is a private numberspace to MPIC) is based on 
> the offset of the registers for that interrupt source. 
> External interrupts start at zero (which is valid), internal 
> at 16, and special things like MSIs at higher numbers (I 
> don't think it's quite 256).

Agreed. 

This should be depend on the given platform. For example 0xe0~0xe7 are
ranged for MSI on Freescale targets. And it can avoid easily to conflict
those used lower numbers when the special MSI interrupt numbers are
higher. 

Tiejun

> 
> The numberspace for virtual interrupts, which is what you 
> pass to request_irq(), is dynamically allocated.  You 
> shouldn't need to know anything about it other than that zero 
> is invalid, and you get the virtual IRQ from 
> irq_of_parse_and_map() or another such mapping function.
> 
> In neither case is there a range that is set aside for you 
> "to do with as you like".  If you have another interrupt 
> controller and need a block of virtual interrupts, register 
> the controller with
> irq_alloc_host() and you'll get a block assigned.
> 
> -Scott
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
> 


More information about the Linuxppc-dev mailing list