mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Nguyen, Tom L" <tom.l.nguyen@intel.com>
To: "Zwane Mwaikambo" <zwane@linuxpower.ca>,
	"Jeff Garzik" <jgarzik@pobox.com>
Cc: "Nakajima, Jun" <jun.nakajima@intel.com>, <linux-kernel@vger.kernel.org>
Subject: RE: RFC Proposal to enable MSI support in Linux kernel
Date: Thu, 29 May 2003 11:12:18 -0700	[thread overview]
Message-ID: <C7AB9DA4D0B1F344BF2489FA165E502413624E@orsmsx404.jf.intel.com> (raw)

I am working on an updated patch to 2.5.70 to incorporate the comments from you and Jeff Garzik. Regarding the variable renaming of irq, I am open to any suggestions. Please make a recommendation and I will incorporate it into the next update.  Regarding platform_legacy_irq, I have not seen an edge-triggered interrupt failure caused by platform_legacy_irq.

           CPU0       CPU1       
  0:     380044          0    IO-APIC-edge  timer
  1:        590          0    IO-APIC-edge  i8042
  2:          0          0          XT-PIC  cascade
 12:        715          0    IO-APIC-edge  i8042
 14:       7902          0    IO-APIC-edge  ide0
 15:          2          0    IO-APIC-edge  ide1
169:          0          0   IO-APIC-level  uhci-hcd
185:          0          0   IO-APIC-level  uhci-hcd
193:         84          0   IO-APIC-level  aic79xx
201:         30          0   IO-APIC-level  aic79xx
225:         16          0   IO-APIC-level  aic7xxx
233:         16          0   IO-APIC-level  aic7xxx
NMI:          0          0 
LOC:     379962     380218 
ERR:          0
MIS:          0

Thanks,
Tom

-----Original Message-----
From: Zwane Mwaikambo [mailto:zwane@linuxpower.ca]
Sent: Wednesday, May 28, 2003 4:06 PM
To: Jeff Garzik
Cc: Nguyen, Tom L; Nakajima, Jun; linux-kernel@vger.kernel.org; Saxena,
Sunil; Mallick, Asit K; Carbonari, Steven
Subject: Re: RFC Proposal to enable MSI support in Linux kernel


On Wed, 28 May 2003, Jeff Garzik wrote:

> > +#ifdef CONFIG_PCI_USE_VECTOR
> > +	for (i = 0; i < (NR_VECTORS - FIRST_EXTERNAL_VECTOR); i++) {
> > +#else
> >  	for (i = 0; i < NR_IRQS; i++) {
> > +#endif
> 
> This ifdef isn't necessary.  ifdef in a header somewhere.  For example, 
> make NR_IRQS (or some other constant, if changing NR_IRQS definition 
> isn't ok) condition on the CONFIG_xxx options.

Actually we can simply use;

for (i = 0; i < (NR_VECTORS - FIRST_EXTERNAL_VECTOR); i++) {
	vector = ...
	if (i >= NR_IRQS)
		break;
	...
	set_intr_gate(vector, interrupt[i]);
}

> split into two functions, maybe?  (due to the ifdef)  Your call, it's 
> mainly a programmer preference.

I agree.

> A bigger question though:  if platform_legacy_irq() returns zero, will 
> the handler _ever_ be edge-triggered?

Good question, i wouldn't think so, that would collapse that section into 
two lines.

> As I see more and more of these ifdefs, I wonder if they couldn't be 
> hidden inside wrappers?

Yes some of them are a bit easy to botch up later on.. like the following 
excerpt.

> > +#ifdef CONFIG_PCI_USE_VECTOR
> > +			if (!platform_legacy_irq(irq))
> > +				entry->irq = IO_APIC_VECTOR(irq);
> > +			else
> > +#endif
> >  			entry->irq = irq;
> >  			continue;

Thanks,
	Zwane
-- 
function.linuxpower.ca

             reply	other threads:[~2003-05-29 17:59 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-29 18:12 Nguyen, Tom L [this message]
2003-05-29 21:55 ` Zwane Mwaikambo
  -- strict thread matches above, loose matches on Subject: below --
2003-05-30 14:56 Nicolas Mailhot
2003-05-31  2:29 ` William Lee Irwin III
2003-05-31  7:13 ` Zwane Mwaikambo
2003-05-31  7:28   ` Zwane Mwaikambo
2003-05-30  2:14 Nakajima, Jun
2003-05-20 19:03 Nguyen, Tom L
2003-05-19 21:46 Nguyen, Tom L
2003-05-19 21:22 Nguyen, Tom L
2003-05-20 10:36 ` Martin Schlemmer
2003-05-20 18:49 ` Zwane Mwaikambo
2003-05-28 22:22   ` Zwane Mwaikambo
2003-05-28 23:01     ` Jeff Garzik
2003-05-28 23:06       ` Zwane Mwaikambo
2003-05-28 23:45         ` Jeff Garzik
2003-05-28 23:50           ` Zwane Mwaikambo
2003-05-14 20:43 Nakajima, Jun
2003-05-14 19:57 Nakajima, Jun
2003-05-14 19:54 ` Zwane Mwaikambo
2003-05-14 18:51 Nguyen, Tom L
2003-05-14 15:41 Nguyen, Tom L
2003-05-14 15:22 Nguyen, Tom L
2003-05-14 17:44 ` Greg KH
2003-05-14 18:58 ` Zwane Mwaikambo
2003-05-14 19:06 ` Zwane Mwaikambo

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=C7AB9DA4D0B1F344BF2489FA165E502413624E@orsmsx404.jf.intel.com \
    --to=tom.l.nguyen@intel.com \
    --cc=jgarzik@pobox.com \
    --cc=jun.nakajima@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zwane@linuxpower.ca \
    /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®