From: Yinghai Lu <yhlu.kernel@gmail.com>
To: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Dhaval Giani <dhaval@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] x86: 64bit support more than 256 irq v2
Date: Tue, 29 Jul 2008 14:14:54 -0700 [thread overview]
Message-ID: <200807291414.55479.yhlu.kernel@gmail.com> (raw)
Dhaval Giani got:
kernel BUG at arch/x86/kernel/io_apic_64.c:357!
invalid opcode: 0000 [1] SMP
CPU 24
Modules linked in:
Pid: 1, comm: swapper Not tainted 2.6.27-rc1-autokern1 #1
RIP: 0010:[<ffffffff8021bb2e>] [<ffffffff8021bb2e>] add_pin_to_irq+0x8e/0xa0
RSP: 0018:ffff88032e4b9b30 EFLAGS: 00010216
RAX: 00000000000000f0 RBX: 00000000000000f0 RCX: 0000000000000000
RDX: 000000000000afaf RSI: 0000000000000046 RDI: ffffffff80738234
RBP: 0000000000000006 R08: 0000000000000000 R09: ffff8800280992c0
R10: 0000000000000000 R11: ffffffff80372060 R12: 0000000000000018
R13: 0000000000000001 R14: 0000000000000018 R15: 0000000000000000
FS: 0000000000000000(0000) GS:ffff880bfe733540(0000) knlGS:0000000000000000
CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: 0000000000000000 CR3: 0000000000201000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process swapper (pid: 1, threadinfo ffff88032e4b8000, task ffff880bfe4ca050)
Stack: 00000000000000f0 0000000000000006 0000000000000001 ffffffff8021bbbe
00000000000000f0 0000000000000001 0000000000000000 ffff88032e4b9c0c
00000000000000f0 ffffffff80218d81 00000000000000f0 0000000000000000
Call Trace:
[<ffffffff8021bbbe>] ? io_apic_set_pci_routing+0x7e/0xa0
[<ffffffff80218d81>] ? mp_register_gsi+0xb1/0xd0
[<ffffffff80218e0c>] ? acpi_register_gsi+0x6c/0x70
[<ffffffff80392f30>] ? acpi_pci_irq_enable+0x178/0x260
[<ffffffff80392cdd>] ? acpi_pci_allocate_irq+0x0/0x4c
[<ffffffff80370657>] ? pci_enable_resources+0x27/0x160
[<ffffffff8036be6a>] ? do_pci_enable_device+0x4a/0x70
[<ffffffff8036bee1>] ? __pci_enable_device_flags+0x51/0x60
[<ffffffff804e01e8>] ? tg3_init_one+0x58/0x1640
[<ffffffff8022a980>] ? default_wake_function+0x0/0x10
[<ffffffff8022efd8>] ? set_cpus_allowed_ptr+0xe8/0x110
[<ffffffff8036e28f>] ? pci_device_probe+0xdf/0x130
[<ffffffff803c2416>] ? driver_probe_device+0x96/0x1a0
[<ffffffff803c25a9>] ? __driver_attach+0x89/0x90
[<ffffffff803c2520>] ? __driver_attach+0x0/0x90
[<ffffffff803c1a8d>] ? bus_for_each_dev+0x4d/0x80
[<ffffffff8028e168>] ? kmem_cache_alloc+0xc8/0xf0
[<ffffffff803c1f7e>] ? bus_add_driver+0xae/0x220
[<ffffffff803c2836>] ? driver_register+0x56/0x130
[<ffffffff8036e548>] ? __pci_register_driver+0x68/0xb0
[<ffffffff806cf8e0>] ? tg3_init+0x0/0x20
[<ffffffff806b15b1>] ? do_one_initcall+0x41/0x180
[<ffffffff802d8a08>] ? create_proc_entry+0x58/0xa0
[<ffffffff80261cc4>] ? register_irq_proc+0xd4/0xf0
[<ffffffff806b1b53>] ? kernel_init+0x133/0x190
[<ffffffff8020c529>] ? child_rip+0xa/0x11
[<ffffffff806b1a20>] ? kernel_init+0x0/0x190
[<ffffffff8020c51f>] ? child_rip+0x0/0x11
Code: 89 05 2b 54 42 00 7f 27 48 0f bf c1 48 8d 14 00 48 c1 e0 03 48 29 d0 48 8d 90 c0 5e 73 80 66 89 2a 66 44 89 62 02 5b 5d 41 5c c3 <0f> 0b eb fe 48 c7 c7 c8 db 5c 80 31 c0 e8 60 7e 01 00 48 83 ec
RIP [<ffffffff8021bb2e>] add_pin_to_irq+0x8e/0xa0
RSP <ffff88032e4b9b30>
his system (x3950) has 8 ioapic, irq > 256
caused by
commit 9b7dc567d03d74a1fbae84e88949b6a60d922d82
Author: Thomas Gleixner <tglx@linutronix.de>
Date: Fri May 2 20:10:09 2008 +0200
x86: unify interrupt vector defines
The interrupt vector defines are copied 4 times around with minimal
differences. Move them all into asm-x86/irq_vectors.h
64bit allow same vector for different cpu to serve different irq
also change next in irq_pin_list from short to int. because for 4096 NR_IRQS
is 2^(8+12).
v2: accoding to Eric W. Biederman, change to NR_IRQ_VECTORS to NR_IRQS
use NR_VECTORS*NR_CPUS directly
need to create that array dynamically later
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Tested-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
---
arch/x86/kernel/io_apic_64.c | 3 ++-
include/asm-x86/irq_vectors.h | 14 ++++++--------
2 files changed, 8 insertions(+), 9 deletions(-)
Index: linux-2.6/include/asm-x86/irq_vectors.h
===================================================================
--- linux-2.6.orig/include/asm-x86/irq_vectors.h
+++ linux-2.6/include/asm-x86/irq_vectors.h
@@ -113,28 +113,26 @@
# if defined(CONFIG_X86_IO_APIC) || defined(CONFIG_PARAVIRT) || defined(CONFIG_X86_VISWS)
+#ifdef CONFIG_X86_64
+# define NR_IRQS (NR_VECTORS * NR_CPUS)
+#else
# define NR_IRQS 224
-
-# if (224 >= 32 * NR_CPUS)
-# define NR_IRQ_VECTORS NR_IRQS
-# else
-# define NR_IRQ_VECTORS (32 * NR_CPUS)
-# endif
+#endif
# else /* IO_APIC || PARAVIRT */
# define NR_IRQS 16
-# define NR_IRQ_VECTORS NR_IRQS
# endif
#else /* !VISWS && !VOYAGER */
# define NR_IRQS 224
-# define NR_IRQ_VECTORS NR_IRQS
#endif /* VISWS */
+#define NR_IRQ_VECTORS NR_IRQS
+
/* Voyager specific defines */
/* These define the CPIs we use in linux */
#define VIC_CPI_LEVEL0 0
Index: linux-2.6/arch/x86/kernel/io_apic_64.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/io_apic_64.c
+++ linux-2.6/arch/x86/kernel/io_apic_64.c
@@ -140,7 +140,8 @@ DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BU
*/
static struct irq_pin_list {
- short apic, pin, next;
+ short apic, pin;
+ int next;
} irq_2_pin[PIN_MAP_SIZE];
struct io_apic {
next reply other threads:[~2008-07-29 21:16 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-29 21:14 Yinghai Lu [this message]
2008-07-29 22:16 ` [PATCH] x86: 64bit support more than 256 irq v2 Yinghai Lu
2008-07-29 23:22 ` Eric W. Biederman
2008-07-30 4:38 ` RFC [PATCH] x86: introduce nr_irqs for 64bit Yinghai Lu
2008-07-30 10:09 ` Ingo Molnar
2008-07-30 10:16 ` Yinghai Lu
2008-07-30 12:58 ` Mike Travis
2008-07-30 10:11 ` [PATCH] x86: introduce nr_irqs for 64bit v2 Yinghai Lu
2008-07-30 19:10 ` [PATCH 0/7] dyn_array support Yinghai Lu
2008-07-30 19:13 ` [PATCH 2/7] x86: introduce nr_irqs for 64bit v3 Yinghai Lu
2008-07-30 19:16 ` [PATCH 5/7] pci: make irq2_iommu to use dyn_array Yinghai Lu
2008-07-30 19:18 ` [PATCH 7/7] x86: make 64bit support dyn_array Yinghai Lu
2008-07-30 19:27 ` [PATCH 1/7] x86: 64bit support more than 256 irq v1 Yinghai Lu
2008-07-30 19:37 ` [PATCH 3/7] add dyn_array support Yinghai Lu
2008-07-30 19:40 ` [PATCH 6/7] irq: make irq_desc to use dyn_array Yinghai Lu
2008-07-30 19:40 ` [PATCH 4/7] random: make irq_timer_state " Yinghai Lu
2008-07-31 4:09 ` [PATCH 0/3] dyn_array support #2 Yinghai Lu
2008-07-31 4:10 ` [PATCH 1/3] serial: change irq_lists to use dyn_array Yinghai Lu
2008-07-31 5:58 ` Eric W. Biederman
2008-07-31 8:26 ` [PATCH] serial: change remove NR_IRQS in 8250.c Yinghai Lu
2008-07-31 11:50 ` Eric W. Biederman
2008-07-31 13:57 ` Alan Cox
2008-07-31 18:10 ` Eric W. Biederman
2008-07-31 23:15 ` Alan Cox
2008-08-01 3:20 ` Yinghai Lu
2008-07-31 4:11 ` [PATCH 2/3] add per_cpu_dyn_array support Yinghai Lu
2008-07-31 4:12 ` [PATCH 3/3] irq: make irqs in kernel stat use per_cpu_dyn_array Yinghai Lu
2008-07-31 10:14 ` [PATCH] x86 remove irq_vectors_limit.h Yinghai Lu
2008-07-31 16:32 ` [PATCH 0/3] dyn_array support #2 Mike Travis
2008-07-31 18:21 ` Yinghai Lu
2008-07-31 21:51 ` Peter Zijlstra
2008-07-31 22:07 ` Yinghai Lu
2008-07-31 22:25 ` Yinghai Lu
2008-08-01 3:52 ` Yinghai Lu
2008-07-31 22:14 ` Eric W. Biederman
2008-08-01 20:13 ` [PATCH 0/7] dyn_array support Eric W. Biederman
-- strict thread matches above, loose matches on Subject: below --
2008-08-02 2:02 [PATCH] x86: 64bit support more than 256 irq v2 Yinghai Lu
2008-08-02 2:16 ` Yinghai Lu
2008-08-02 2:58 ` Eric W. Biederman
2008-08-02 3:11 ` Yinghai Lu
2008-08-02 3:37 ` Eric W. Biederman
2008-08-04 13:20 ` Mike Travis
2008-08-04 18:16 ` Yinghai Lu
2008-08-03 5:09 ` Eric W. Biederman
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=200807291414.55479.yhlu.kernel@gmail.com \
--to=yhlu.kernel@gmail.com \
--cc=dhaval@linux.vnet.ibm.com \
--cc=ebiederm@xmission.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.