mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel@vger.kernel.org, pazke@orbita1.ru, anton@samba.org
Subject: Re: [RFC] irq handling code consolidation, second try (ppc part)
Date: 05 Jan 2003 09:56:03 +0100	[thread overview]
Message-ID: <1041756963.645.43.camel@zion.wanadoo.fr> (raw)
In-Reply-To: <Pine.LNX.4.44.0301040938480.5425-100000@home.transmeta.com>

On Sat, 2003-01-04 at 18:41, Linus Torvalds wrote:
> On 4 Jan 2003, Benjamin Herrenschmidt wrote:
> > 
> > The "easy" way here to implement that is to make the irq_desc array larger than
> > NR_IRQs (or rather split NR_IRQs into NR_SYS_IRQS + NR_DYNAMIC_IRQS). The
> > additional "slots" could then easily be allocated/freed. Thus, keeping my
> > cardbus example, the cardbus driver can allocate a couple of slots (that is IRQ
> >  numbers) dynamically, and use it's own startup/shutdown/enable/disable/...
> > hooks for them, dealing itself with the cascade from the PCI irq.
> 
> Linearizing a space like this is always a bad idea, I think. 

I fully agree, I was just proposing a "simple" solution that would fit
in a feature-frozen kernel ;)

Note that if we go the full way abstracting interrupts, then the
interrupt "tree" should be separate from the device tree. The interrupt
"parent" of a device may not be (and is not in a whole lot of cases I
have to deal with on pmacs and embedded) the "bus" parent of a given
device.

I suppose there may be similar "issues" with x86 PCI chips routed to
legacy irqs, but then, I'm completely unfamiliar with the story of
interrupt routing on x86's...

on pmacs, all interrupts end up in a single interrupt controller located
in a "combo" ASIC along with other devices. This ASIC is a PCI device,
but is really the root of the interrupt tree just below the CPU itself,
regardless of the actual interrupt sources beeing located on other PCI
busses or not. On embedded, the design can be as funky as a HW designer
can imagine...

Do you think this is still 2.5 work ?

> It would be entirely possible to just add the irq routing information to 
> the "struct device" tree, and have a "dev_request_irq(dev, ...)", along 
> with a few helper functions like "pci_request_irq(pci_dev, ...)".
> 
> And the old "request_irq()" would just use the system root device as the 
> device.
> 
> 		Linus
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
-- 
Benjamin Herrenschmidt <benh@kernel.crashing.org>


  reply	other threads:[~2003-01-05  8:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-04 11:59 Andrey Panin
2003-01-04 13:01 ` Benjamin Herrenschmidt
2003-01-04 17:41   ` Linus Torvalds
2003-01-05  8:56     ` Benjamin Herrenschmidt [this message]
2003-01-05 19:05       ` Linus Torvalds
2003-01-05 22:03         ` Benjamin Herrenschmidt
2003-01-05  0:25   ` Anton Blanchard
2003-01-05  0:50 ` Anton Blanchard

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=1041756963.645.43.camel@zion.wanadoo.fr \
    --to=benh@kernel.crashing.org \
    --cc=anton@samba.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pazke@orbita1.ru \
    --cc=torvalds@transmeta.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

all inboxes | Powered by JetHome®