linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Philippe De Muyter <phdm@macqel.be>
Cc: Scott Wood <scottwood@freescale.com>, linuxppc-dev@ozlabs.org
Subject: Re: ARCH=ppc -> ARCH=powerpc : help needed for dts file
Date: Fri, 07 Mar 2008 11:19:57 +1100	[thread overview]
Message-ID: <1204849197.21545.272.camel@pasglop> (raw)
In-Reply-To: <20080307001025.GA27321@netgate.macqel>


On Fri, 2008-03-07 at 01:10 +0100, Philippe De Muyter wrote:
> 
> But I already noticed that the interrupt numbers that the arch/powerpc tree
> uses for the parts that do already work (compact-flash and serials) are
> different from the ones I saw on the running arch/ppc tree.  e.g.,
> the serial lines used irq 26 with the arch/ppc tree and now use 42 with
> the powerpc tree.  For the pci4520, irqs changed from 53, 54 and 55 in the
> arch/ppc kernel to 17, 18 and 19 with the arch/powerpc kernel.
> That's a little bit confusing.
> 
> There must be something hidden in the sources of the openpic driver to
> explain that difference.  Could it be fixed by a setting in the dts-file ?

The interrupt numbers that you see in /proc/interrupts and that drivers
see are "virtual". They have no direct relationship to the hardware
interrupt lines (well, the kernel attempts sometimes at keeping them the
same but not always).

Basially, when the kernel establishes interrupt routing when probing
devices, it gets dynamically assigned numbers and that's what drivers
and /proc/interrupts will see, and internally "binds" them to a given HW
source on a given interrupt controller.

This is done for several reasons, the main ones being that we have to
routinely deal with multiple controllers each having it's own hardware
number space, some systems have very large HW interrupt numbers not
suitable for the irq_desc array, and we reserve virtual numbers 0 as
always invalid and 1...15 for an ISA-type 8259 controller to avoid
problems with x86-oirignated legacy junk that tries to hard code those
numbers. 

There's an compile option to see the mapping between virtual numbers and
HW numbers in debugfs, try enabling debugfs, CONFIG_VIRQ_DEBUG, and
mount debugfs somewhere. You'll see a powerpc/virq_mapping file in there
with the mapping.

Ben.

  reply	other threads:[~2008-03-07  0:20 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-03 14:47 ARCH=ppc -> ARCH=powerpc : help needed for dts file Philippe De Muyter
2008-03-03 14:54 ` Grant Likely
2008-03-03 17:07 ` Scott Wood
2008-03-03 21:05   ` Philippe De Muyter
2008-03-03 21:11     ` Scott Wood
2008-03-03 21:26       ` Philippe De Muyter
2008-03-03 21:41         ` Benjamin Herrenschmidt
2008-03-04  8:19           ` Philippe De Muyter
2008-03-03 21:55         ` Scott Wood
2008-03-04  8:08           ` Philippe De Muyter
2008-03-04  8:22             ` Benjamin Herrenschmidt
2008-03-04  9:10               ` Philippe De Muyter
2008-03-05  4:52                 ` David Gibson
2008-03-05  5:01                 ` Benjamin Herrenschmidt
2008-03-05 16:15                   ` Philippe De Muyter
2008-03-05 20:14                     ` Benjamin Herrenschmidt
2008-03-05 23:34                       ` Philippe De Muyter
2008-03-05 16:32                   ` Scott Wood
2008-03-05 23:46                     ` Benjamin Herrenschmidt
2008-03-07  0:10                       ` Philippe De Muyter
2008-03-07  0:19                         ` Benjamin Herrenschmidt [this message]
2008-03-09 22:31                           ` Philippe De Muyter
2008-03-09 22:36                             ` Benjamin Herrenschmidt
2008-03-11  0:32                             ` David Gibson
2008-03-11 11:46                               ` Philippe De Muyter
2008-03-11 22:42                                 ` David Gibson
2008-05-06 22:54                                 ` Andy Fleming
2008-05-07  7:50                                   ` Philippe De Muyter
2008-05-07  7:54                                     ` Stephen Rothwell
2008-03-03 21:26     ` Benjamin Herrenschmidt
2008-03-04  8:34       ` Philippe De Muyter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1204849197.21545.272.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=phdm@macqel.be \
    --cc=scottwood@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).