Re: 2.6.13-rc7-rt4, fails to build

From: Ingo Molnar
Date: Tue Aug 30 2005 - 01:28:17 EST



* Fernando Lopez-Lezcano <nando@xxxxxxxxxxxxxxxxxx> wrote:

> I still get the error, it is happening in the _smp_ build, I don't
> know what's wrong...
>
> arch/i386/mach-generic/built-in.o(.text+0x1183): In function
> `es7000_rename_gsi':
> arch/i386/mach-generic/../mach-es7000/es7000plat.c:68: undefined
> reference to `nr_ioapic_registers'
> make: *** [.tmp_vmlinux1] Error 1
>
> I'm attaching the .config I'm using for the smp build.

ok, managed to reproduce it with this .config. It's an effect of the
IOAPIC_CACHE code. I have fixed it with the patch below (which is also
in 2.6.13-rt2), and the resulting kernel builds & boots fine. Karsten,
does it look sane to you?

Ingo

Index: linux/arch/i386/kernel/io_apic.c
===================================================================
--- linux.orig/arch/i386/kernel/io_apic.c
+++ linux/arch/i386/kernel/io_apic.c
@@ -143,6 +141,10 @@ struct ioapic_data_struct {

static struct ioapic_data_struct *ioapic_data[MAX_IO_APICS];

+int nr_ioapic_registers(int apic)
+{
+ return ioapic_data[apic]->nr_registers;
+}

static inline unsigned int __raw_io_apic_read(struct ioapic_data_struct *ioapic, unsigned int reg)
{
Index: linux/arch/i386/mach-es7000/es7000plat.c
===================================================================
--- linux.orig/arch/i386/mach-es7000/es7000plat.c
+++ linux/arch/i386/mach-es7000/es7000plat.c
@@ -65,7 +65,7 @@ es7000_rename_gsi(int ioapic, int gsi)
if (!base) {
int i;
for (i = 0; i < nr_ioapics; i++)
- base += nr_ioapic_registers[i];
+ base += nr_ioapic_registers(i);
}

if (!ioapic && (gsi < 16))
Index: linux/include/asm-i386/io_apic.h
===================================================================
--- linux.orig/include/asm-i386/io_apic.h
+++ linux/include/asm-i386/io_apic.h
@@ -101,7 +101,7 @@ union IO_APIC_reg_03 {
* # of IO-APICs and # of IRQ routing registers
*/
extern int nr_ioapics;
-extern int nr_ioapic_registers[MAX_IO_APICS];
+extern int nr_ioapic_registers(int apic);

enum ioapic_irq_destination_types {
dest_Fixed = 0,

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/