From: David Mosberger <davidm@napali.hpl.hp.com>
To: "Andrey Panin" <pazke@orbita1.ru>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC] irq handling code consolidation (common part)
Date: Thu, 2 Jan 2003 10:30:08 -0800 [thread overview]
Message-ID: <15892.34096.565694.402521@napali.hpl.hp.com> (raw)
In-Reply-To: <20021224060331.GA1090@pazke>
>>>>> On Tue, 24 Dec 2002 09:03:31 +0300, "Andrey Panin" <pazke@orbita1.ru> said:
Andrey> Hi all, this patch moves some common parts of irq handling
Andrey> code to one place. Arch specific patches will follow. Patch
Andrey> for i386 is tested and performed well, but other arch
Andrey> specific patched are not. Please take a look.
Andrey> Please CC me answering this letter, I'm not subscribed to
Andrey> lkml currently.
+/*
+ * Controller mappings for all interrupt sources:
+ */
+irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned = {
+ [0 ... NR_IRQS - 1] = {
+ .handler = &no_irq_type,
+ .lock = SPIN_LOCK_UNLOCKED,
+ }
+};
This isn't good. For example, NUMA platforms with per-CPU irqs want
to allocate the irq descriptors in local memory. On ia64, we
introduced a minimal irq-descriptor API for this purpose:
/* Return a pointer to the irq descriptor for IRQ. */
static inline struct irq_desc * irq_desc (int irq);
/* Extract the IA-64 vector that corresponds to IRQ. */
static inline ia64_vector irq_to_vector (int irq);
/*
* Convert the local IA-64 vector to the corresponding irq number.
* This translation is done in the context of the interrupt domain
* that the currently executing CPU belongs to.
*/
static inline unsigned int local_vector_to_irq (ia64_vector vec);
I think the platform-independent part of the code really would only
need the first routine irq_desc(). The other two are ia64-specific.
BTW: if you haven't done so already, I'd suggest to take a look at
arch/ia64/kernel/irq.c. I tried to keep this code as close as
possible to the x86 version. There shouldn't be anything in there
that isn't wanted for a good reason.
Thanks,
--david
next prev parent reply other threads:[~2003-01-02 18:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-24 6:03 Andrey Panin
2002-12-24 6:21 ` Miles Bader
2002-12-24 6:27 ` Miles Bader
2002-12-24 6:28 ` Andrey Panin
2003-01-02 18:30 ` David Mosberger [this message]
2003-01-04 5:03 ` Andrey Panin
2003-01-04 6:12 ` David Mosberger
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=15892.34096.565694.402521@napali.hpl.hp.com \
--to=davidm@napali.hpl.hp.com \
--cc=davidm@hpl.hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pazke@orbita1.ru \
/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®