* [PATCH] X86_NUMAQ build fix
@ 2006-04-21 16:06 OGAWA Hirofumi
2006-04-21 18:19 ` Dave Hansen
0 siblings, 1 reply; 7+ messages in thread
From: OGAWA Hirofumi @ 2006-04-21 16:06 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
Hi,
This patch fixes the build breakage of X86_NUMAQ. And this declares
xquad_portio on only X86_NUMAQ.
Please apply.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
---
arch/i386/boot/compressed/misc.c | 4 +++-
arch/i386/kernel/smpboot.c | 2 +-
arch/i386/pci/Makefile | 3 ++-
3 files changed, 6 insertions(+), 3 deletions(-)
diff -puN arch/i386/pci/Makefile~numaq-build-fix arch/i386/pci/Makefile
--- linux-2.6/arch/i386/pci/Makefile~numaq-build-fix 2006-04-22 00:54:29.000000000 +0900
+++ linux-2.6-hirofumi/arch/i386/pci/Makefile 2006-04-22 00:55:27.000000000 +0900
@@ -5,10 +5,11 @@ obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o
obj-$(CONFIG_PCI_DIRECT) += direct.o
pci-y := fixup.o
-pci-$(CONFIG_ACPI) += acpi.o
pci-y += legacy.o irq.o
pci-$(CONFIG_X86_VISWS) := visws.o fixup.o
pci-$(CONFIG_X86_NUMAQ) := numa.o irq.o
+pci-$(CONFIG_ACPI) += acpi.o
+
obj-y += $(pci-y) common.o
diff -puN arch/i386/boot/compressed/misc.c~numaq-build-fix arch/i386/boot/compressed/misc.c
--- linux-2.6/arch/i386/boot/compressed/misc.c~numaq-build-fix 2006-04-22 00:54:29.000000000 +0900
+++ linux-2.6-hirofumi/arch/i386/boot/compressed/misc.c 2006-04-22 00:54:29.000000000 +0900
@@ -122,7 +122,9 @@ static int vidport;
static int lines, cols;
#ifdef CONFIG_X86_NUMAQ
-static void * xquad_portio = NULL;
+/* hack to avoid using xquad_portio=NULL */
+#undef outb_p
+#define outb_p outb_local_p
#endif
#include "../../../../lib/inflate.c"
diff -puN arch/i386/kernel/smpboot.c~numaq-build-fix arch/i386/kernel/smpboot.c
--- linux-2.6/arch/i386/kernel/smpboot.c~numaq-build-fix 2006-04-22 00:54:29.000000000 +0900
+++ linux-2.6-hirofumi/arch/i386/kernel/smpboot.c 2006-04-22 00:54:29.000000000 +0900
@@ -1116,9 +1116,9 @@ static void smp_tune_scheduling (void)
*/
static int boot_cpu_logical_apicid;
+#ifdef CONFIG_X86_NUMAQ
/* Where the IO area was mapped on multiquad, always 0 otherwise */
void *xquad_portio;
-#ifdef CONFIG_X86_NUMAQ
EXPORT_SYMBOL(xquad_portio);
#endif
_
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] X86_NUMAQ build fix
2006-04-21 16:06 [PATCH] X86_NUMAQ build fix OGAWA Hirofumi
@ 2006-04-21 18:19 ` Dave Hansen
2006-04-21 18:50 ` OGAWA Hirofumi
0 siblings, 1 reply; 7+ messages in thread
From: Dave Hansen @ 2006-04-21 18:19 UTC (permalink / raw)
To: OGAWA Hirofumi; +Cc: Andrew Morton, linux-kernel
On Sat, 2006-04-22 at 01:06 +0900, OGAWA Hirofumi wrote:
> This patch fixes the build breakage of X86_NUMAQ. And this declares
> xquad_portio on only X86_NUMAQ.
What bug does this patch fix? What is your .config? I'm not having any
compile problems on my NUMAQ lately.
> obj-$(CONFIG_PCI_DIRECT) += direct.o
>
> pci-y := fixup.o
> -pci-$(CONFIG_ACPI) += acpi.o
> pci-y += legacy.o irq.o
>
> pci-$(CONFIG_X86_VISWS) := visws.o fixup.o
> pci-$(CONFIG_X86_NUMAQ) := numa.o irq.o
>
> +pci-$(CONFIG_ACPI) += acpi.o
Am I reading this wrong, or does this just move the option down a bit?
Did you need to change the link order? Why?
> +++ linux-2.6-hirofumi/arch/i386/boot/compressed/misc.c 2006-04-22 00:54:29.000000000 +0900
> @@ -122,7 +122,9 @@ static int vidport;
> static int lines, cols;
>
> #ifdef CONFIG_X86_NUMAQ
> -static void * xquad_portio = NULL;
> +/* hack to avoid using xquad_portio=NULL */
> +#undef outb_p
> +#define outb_p outb_local_p
> #endif
It's really weird, but I'd hope that there was a reason for having two
xquad_portio. Are you sure that this has no other consequences?
That said, it does boot on my 16-way NUMAQ, but I still have no real
idea what problem this is solving or what it is actually doing ;)
-- Dave
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] X86_NUMAQ build fix
2006-04-21 18:19 ` Dave Hansen
@ 2006-04-21 18:50 ` OGAWA Hirofumi
2006-04-21 18:59 ` Dave Hansen
0 siblings, 1 reply; 7+ messages in thread
From: OGAWA Hirofumi @ 2006-04-21 18:50 UTC (permalink / raw)
To: Dave Hansen; +Cc: Andrew Morton, linux-kernel
Dave Hansen <haveblue@us.ibm.com> writes:
> On Sat, 2006-04-22 at 01:06 +0900, OGAWA Hirofumi wrote:
>> This patch fixes the build breakage of X86_NUMAQ. And this declares
>> xquad_portio on only X86_NUMAQ.
>
> What bug does this patch fix? What is your .config? I'm not having any
> compile problems on my NUMAQ lately.
Ah, sorry for stuipd description...
>> obj-$(CONFIG_PCI_DIRECT) += direct.o
>>
>> pci-y := fixup.o
>> -pci-$(CONFIG_ACPI) += acpi.o
>> pci-y += legacy.o irq.o
>>
>> pci-$(CONFIG_X86_VISWS) := visws.o fixup.o
>> pci-$(CONFIG_X86_NUMAQ) := numa.o irq.o
>>
>> +pci-$(CONFIG_ACPI) += acpi.o
>
> Am I reading this wrong, or does this just move the option down a bit?
> Did you need to change the link order? Why?
No, this is not link order. Note that CONFIG_X86_VISWS/CONFIG_X86_NUMAQ
uses ":=", not "+=". In case of ACPI=y", it breaks build.
Maybe NUMAQ shouldn't allow ACPI=y in Kconfig (very old Makefile
doesn't allow to build acpi.o), but I think Makefile is ok with this,
and it also fixes CONFIG_X86_VISWS case (very old Makefile also allow to
build acpi.o).
>> +++ linux-2.6-hirofumi/arch/i386/boot/compressed/misc.c 2006-04-22 00:54:29.000000000 +0900
>> @@ -122,7 +122,9 @@ static int vidport;
>> static int lines, cols;
>>
>> #ifdef CONFIG_X86_NUMAQ
>> -static void * xquad_portio = NULL;
>> +/* hack to avoid using xquad_portio=NULL */
>> +#undef outb_p
>> +#define outb_p outb_local_p
>> #endif
>
> It's really weird, but I'd hope that there was a reason for having two
> xquad_portio. Are you sure that this has no other consequences?
Note that this is boot/compressed/misc.c. We can't share vmlinux's
data in here. However we can share macros, so probably, it's using
"static void * xquad_portio = NULL" hack.
But, in include/asm-i386/io.h, it is declared as "extern". At least,
gcc-4.0 doesn't allow "static" and "extern" mismatch.
> That said, it does boot on my 16-way NUMAQ, but I still have no real
> idea what problem this is solving or what it is actually doing ;)
Oh, good. Thanks.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] X86_NUMAQ build fix
2006-04-21 18:50 ` OGAWA Hirofumi
@ 2006-04-21 18:59 ` Dave Hansen
2006-04-21 19:31 ` OGAWA Hirofumi
0 siblings, 1 reply; 7+ messages in thread
From: Dave Hansen @ 2006-04-21 18:59 UTC (permalink / raw)
To: OGAWA Hirofumi; +Cc: Andrew Morton, linux-kernel
On Sat, 2006-04-22 at 03:50 +0900, OGAWA Hirofumi wrote:
> Dave Hansen <haveblue@us.ibm.com> writes:
> >> pci-y := fixup.o
> >> -pci-$(CONFIG_ACPI) += acpi.o
> >> pci-y += legacy.o irq.o
> >>
> >> pci-$(CONFIG_X86_VISWS) := visws.o fixup.o
> >> pci-$(CONFIG_X86_NUMAQ) := numa.o irq.o
> >>
> >> +pci-$(CONFIG_ACPI) += acpi.o
> >
> > Am I reading this wrong, or does this just move the option down a bit?
> > Did you need to change the link order? Why?
>
> No, this is not link order. Note that CONFIG_X86_VISWS/CONFIG_X86_NUMAQ
> uses ":=", not "+=". In case of ACPI=y", it breaks build.
Ahh, so NUMAQ and VISWS don't seem to allow or want ACPI code.
Especially for the NUMAQ, I don't think we should even mess with this
too much. Just fix it in the build system and directly disallow NUMAQ
&& ACPI.
We already have this:
menu "ACPI (Advanced Configuration and Power Interface) Support"
depends on !X86_VISWS
Just add the NUMAQ in there, too.
-- Dave
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] X86_NUMAQ build fix
2006-04-21 18:59 ` Dave Hansen
@ 2006-04-21 19:31 ` OGAWA Hirofumi
2006-04-21 19:36 ` Dave Hansen
0 siblings, 1 reply; 7+ messages in thread
From: OGAWA Hirofumi @ 2006-04-21 19:31 UTC (permalink / raw)
To: Dave Hansen; +Cc: Andrew Morton, linux-kernel
Dave Hansen <haveblue@us.ibm.com> writes:
> On Sat, 2006-04-22 at 03:50 +0900, OGAWA Hirofumi wrote:
>> Dave Hansen <haveblue@us.ibm.com> writes:
>
> Ahh, so NUMAQ and VISWS don't seem to allow or want ACPI code.
> Especially for the NUMAQ, I don't think we should even mess with this
> too much. Just fix it in the build system and directly disallow NUMAQ
> && ACPI.
>
> We already have this:
>
> menu "ACPI (Advanced Configuration and Power Interface) Support"
> depends on !X86_VISWS
>
> Just add the NUMAQ in there, too.
Oh, thanks a lot for noticeing this. Fixed patch is here.
[compile test only. I don't have NUMAQ, and I just wanted to see
"objdump -S" of NUMA's code.]
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
---
arch/i386/boot/compressed/misc.c | 4 +++-
arch/i386/kernel/smpboot.c | 2 +-
drivers/acpi/Kconfig | 1 +
3 files changed, 5 insertions(+), 2 deletions(-)
diff -puN arch/i386/pci/Makefile~numaq-build-fix arch/i386/pci/Makefile
diff -puN arch/i386/boot/compressed/misc.c~numaq-build-fix arch/i386/boot/compressed/misc.c
--- linux-2.6/arch/i386/boot/compressed/misc.c~numaq-build-fix 2006-04-22 04:15:04.000000000 +0900
+++ linux-2.6-hirofumi/arch/i386/boot/compressed/misc.c 2006-04-22 04:15:04.000000000 +0900
@@ -122,7 +122,9 @@ static int vidport;
static int lines, cols;
#ifdef CONFIG_X86_NUMAQ
-static void * xquad_portio = NULL;
+/* hack to avoid using xquad_portio=NULL */
+#undef outb_p
+#define outb_p outb_local_p
#endif
#include "../../../../lib/inflate.c"
diff -puN arch/i386/kernel/smpboot.c~numaq-build-fix arch/i386/kernel/smpboot.c
--- linux-2.6/arch/i386/kernel/smpboot.c~numaq-build-fix 2006-04-22 04:15:04.000000000 +0900
+++ linux-2.6-hirofumi/arch/i386/kernel/smpboot.c 2006-04-22 04:15:04.000000000 +0900
@@ -1116,9 +1116,9 @@ static void smp_tune_scheduling (void)
*/
static int boot_cpu_logical_apicid;
+#ifdef CONFIG_X86_NUMAQ
/* Where the IO area was mapped on multiquad, always 0 otherwise */
void *xquad_portio;
-#ifdef CONFIG_X86_NUMAQ
EXPORT_SYMBOL(xquad_portio);
#endif
diff -puN drivers/acpi/Kconfig~numaq-build-fix drivers/acpi/Kconfig
--- linux-2.6/drivers/acpi/Kconfig~numaq-build-fix 2006-04-22 04:16:35.000000000 +0900
+++ linux-2.6-hirofumi/drivers/acpi/Kconfig 2006-04-22 04:16:41.000000000 +0900
@@ -4,6 +4,7 @@
menu "ACPI (Advanced Configuration and Power Interface) Support"
depends on !X86_VISWS
+ depends on !X86_NUMAQ
depends on !IA64_HP_SIM
depends on IA64 || X86
_
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] X86_NUMAQ build fix
2006-04-21 19:31 ` OGAWA Hirofumi
@ 2006-04-21 19:36 ` Dave Hansen
2006-04-21 20:03 ` OGAWA Hirofumi
0 siblings, 1 reply; 7+ messages in thread
From: Dave Hansen @ 2006-04-21 19:36 UTC (permalink / raw)
To: OGAWA Hirofumi; +Cc: Andrew Morton, linux-kernel
Do you really need anything other than the Kconfig fix? I thought that
it alone would be a complete fix.
-- Dave
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] X86_NUMAQ build fix
2006-04-21 19:36 ` Dave Hansen
@ 2006-04-21 20:03 ` OGAWA Hirofumi
0 siblings, 0 replies; 7+ messages in thread
From: OGAWA Hirofumi @ 2006-04-21 20:03 UTC (permalink / raw)
To: Dave Hansen; +Cc: Andrew Morton, linux-kernel
Dave Hansen <haveblue@us.ibm.com> writes:
> Do you really need anything other than the Kconfig fix? I thought that
> it alone would be a complete fix.
Yes. I thought I explained those...
> #ifdef CONFIG_X86_NUMAQ
> -static void * xquad_portio = NULL;
> +/* hack to avoid using xquad_portio=NULL */
> +#undef outb_p
> +#define outb_p outb_local_p
> #endif
This fixes the following error.
make -C /devel/linux/works/linux-2.6 O=/devel/linux/works/linux-2.6-devron
GEN /devel/linux/works/linux-2.6-devron/Makefile
CHK include/linux/version.h
Using /devel/linux/works/linux-2.6 as source for kernel
CHK include/linux/compile.h
LD vmlinux
SYSMAP System.map
SYSMAP .tmp_System.map
Building modules, stage 2.
LD arch/i386/boot/setup
CC arch/i386/boot/compressed/misc.o
OBJCOPY arch/i386/boot/compressed/vmlinux.bin
GZIP arch/i386/boot/compressed/vmlinux.bin.gz
/devel/linux/works/linux-2.6/arch/i386/boot/compressed/misc.c:125: error: static declaration of 'xquad_portio' follows non-static declaration
include2/asm/io.h:303: error: previous declaration of 'xquad_portio' was here
make[4]: *** [arch/i386/boot/compressed/misc.o] Error 1
make[4]: *** Waiting for unfinished jobs....
MODPOST
make[3]: *** [arch/i386/boot/compressed/vmlinux] Error 2
make[2]: *** [bzImage] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [_all] Error 2
make: *** [all] Error 2
> static int boot_cpu_logical_apicid;
> +#ifdef CONFIG_X86_NUMAQ
> /* Where the IO area was mapped on multiquad, always 0 otherwise */
> void *xquad_portio;
> -#ifdef CONFIG_X86_NUMAQ
> EXPORT_SYMBOL(xquad_portio);
> #endif
xquad_portio is needed to only X86_NUMAQ.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-04-21 21:22 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-21 16:06 [PATCH] X86_NUMAQ build fix OGAWA Hirofumi
2006-04-21 18:19 ` Dave Hansen
2006-04-21 18:50 ` OGAWA Hirofumi
2006-04-21 18:59 ` Dave Hansen
2006-04-21 19:31 ` OGAWA Hirofumi
2006-04-21 19:36 ` Dave Hansen
2006-04-21 20:03 ` OGAWA Hirofumi
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.