2002-12-04 20:39:26

by Maciej Soltysiak

[permalink] [raw]
Subject: Is this patch okay?

Hello,

i downloaded 2.5.50, started compiling it, and it bailed out with an error
in drivers/pci/quirks.c, that sis_apic_bug is not defined.
I did a quick grep around the source and found a file to include.

Basically, this is what i did.

*** linux-2.5.50.old/drivers/pci/quirks.c Wed Nov 27 23:35:48 2002
--- linux-2.5.50/drivers/pci/quirks.c Wed Dec 4 21:40:44 2002
***************
*** 18,23 ****
--- 18,24 ----
#include <linux/pci.h>
#include <linux/init.h>
#include <linux/delay.h>
+ #include <asm/io_apic.h>

#undef DEBUG

Is it okay to include it like that?
Or should it be fixed some other way? I am just getting around the kernel,
though the kernel has one my small patch, i am definitelly no guru.

I guess that some people have already noticed that, so if this has been
resolved, please ignore the patch.
I would appreciate any answer anyway.

Best Regards,
Maciej Soltysiak



2002-12-04 21:20:16

by Matt Reppert

[permalink] [raw]
Subject: Re: Is this patch okay?

On Wed, 4 Dec 2002 21:46:54 +0100 (CET)
Maciej Soltysiak <[email protected]> wrote:

> Hello,
>
> i downloaded 2.5.50, started compiling it, and it bailed out with an error
> in drivers/pci/quirks.c, that sis_apic_bug is not defined.
> I did a quick grep around the source and found a file to include.
>
> Basically, this is what i did.
>
> *** linux-2.5.50.old/drivers/pci/quirks.c Wed Nov 27 23:35:48 2002
> --- linux-2.5.50/drivers/pci/quirks.c Wed Dec 4 21:40:44 2002
> ***************
> *** 18,23 ****
> --- 18,24 ----
> #include <linux/pci.h>
> #include <linux/init.h>
> #include <linux/delay.h>
> + #include <asm/io_apic.h>
>
> #undef DEBUG
>
> Is it okay to include it like that?
> Or should it be fixed some other way? I am just getting around the kernel,
> though the kernel has one my small patch, i am definitelly no guru.

Hi, the fix in the -ac tree for this is to put "extern int sis_apic_bug;"
directly before its usage. Including <asm/io_apic.h> is incorrect because
while this file will compile on several platforms, io_apic.h only exists
on i386 and x86_64, so this would break on, say, Alpha.

Matt