mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Nguyen, Tom L" <tom.l.nguyen@intel.com>
To: <Administrator@osdl.org>
Cc: <akpm@osdl.org>, "Nguyen, Tom L" <tom.l.nguyen@intel.com>
Subject: FW: [PATCH] MSI broke voyager build
Date: Mon, 29 Mar 2004 16:45:23 +0100	[thread overview]
Message-ID: <03b501c415a4$d9637410$d100000a@sbs2003.local> (raw)

Wednesday, December 31, 2003 2:59 PM, James Bottomley wrote:
> The author made the arch/i386 compile depend on NR_VECTORS being
> defined.
> 
> This symbol, however, was put only into mach-default/irq_vectors.h
> 
> The attached patch adds it to voyager; visws and pc9800 however, are
> still broken.
> 
> The code that breaks is this (in arch/i386/kernel/i8259.c):
> 
>  	 * us. (some of these will be overridden and become
>  	 * 'special' SMP interrupts)
>  	 */
> -	for (i = 0; i < NR_IRQS; i++) {
> +	for (i = 0; i < (NR_VECTORS - FIRST_EXTERNAL_VECTOR); i++) {
>  		int vector = FIRST_EXTERNAL_VECTOR + i;
> +		if (i >= NR_IRQS)
> +			break;
>  		if (vector != SYSCALL_VECTOR)
>  			set_intr_gate(vector, interrupt[i]);
> 
> as far as I can see, with NR_VECTORS set at 256, FIRST_EXTERNAL_VECTOR
> at 32 and NR_IRQS set at 224 the two forms of the loop are identical.
> The only case it would make a difference would be for NR_IRQ >
> NR_VECTORS + FIRST_EXTERNAL_VECTOR which doesn't seem to make any
> sense.  Perhaps just backing this change out of i8259.c would be
> better?  NR_VECTORS seems to have no other defined use in the MSI code.

>> It would make a significant difference when CONFIG_PCI_USE_VECTOR is 
>> set to "Y" by users to enable MSI support. The setting of 
>> CONFIG_PCI_USE_VECTOR to "Y" sets NR_IRQS at 239 (FIRST_SYSTEM_VECTOR)
>> instead of 224.


> ===== include/asm-i386/mach-voyager/irq_vectors.h 1.4 vs edited =====
> --- 1.4/include/asm-i386/mach-voyager/irq_vectors.h	Wed Oct 22 11:34:51
> 2003
> +++ edited/include/asm-i386/mach-voyager/irq_vectors.h	Wed Dec 31
> 16:30:15 2003
> @@ -55,6 +55,7 @@
>  #define VIC_CPU_BOOT_CPI		VIC_CPI_LEVEL0
>  #define VIC_CPU_BOOT_ERRATA_CPI		(VIC_CPI_LEVEL0 + 8)
> 
> +#define NR_VECTORS 256
>  #define NR_IRQS 224
>  #define NR_IRQ_VECTORS NR_IRQS
> 

>> Thanks for providing a fix. The fix looks fine to me.

Thanks,
Long

             reply	other threads:[~2004-03-29 15:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-29 15:45 Nguyen, Tom L [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-01-05 21:19 Nguyen, Tom L

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='03b501c415a4$d9637410$d100000a@sbs2003.local' \
    --to=tom.l.nguyen@intel.com \
    --cc=Administrator@osdl.org \
    --cc=akpm@osdl.org \
    /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®