* [PATCH] Fix compilation with CONFIG_MELAN
@ 2003-06-20 22:08 Roland Dreier
0 siblings, 0 replies; only message in thread
From: Roland Dreier @ 2003-06-20 22:08 UTC (permalink / raw)
To: trivial, torvalds, linux-kernel
This patch fixes compilation when CONFIG_MELAN is turned on.
The problem is that <asm-i386/mach-default/mach_resources.h> includes
the bogus construction
#ifdef CONFIG_MELAN
standard_io_resources[1] = { "pic1", 0x20, 0x21, IORESOURCE_BUSY };
standard_io_resources[5] = { "pic2", 0xa0, 0xa1, IORESOURCE_BUSY };
#endif
at the top level. I tried this with Debian's gcc 2.95 and Red Hat's
gcc 3.2, and neither will accept it (they complain about a duplicate
declaration of standard_io_resources when building arch/i386/setup.c).
To duplicate this, you can do "make defconfig" and then go into "make
menuconfig" and change "Processor family" to "Elan". Building that
config fails for me.
I assume the following is what was intended.
- Roland
===== include/asm-i386/mach-default/mach_resources.h 1.1 vs edited =====
--- 1.1/include/asm-i386/mach-default/mach_resources.h Thu Mar 13 17:17:51 2003
+++ edited/include/asm-i386/mach-default/mach_resources.h Fri Jun 20 15:06:05 2003
@@ -9,18 +9,22 @@
struct resource standard_io_resources[] = {
{ "dma1", 0x00, 0x1f, IORESOURCE_BUSY },
+#ifndef CONFIG_MELAN
{ "pic1", 0x20, 0x3f, IORESOURCE_BUSY },
+#else
+ { "pic1", 0x20, 0x21, IORESOURCE_BUSY },
+#endif
{ "timer", 0x40, 0x5f, IORESOURCE_BUSY },
{ "keyboard", 0x60, 0x6f, IORESOURCE_BUSY },
{ "dma page reg", 0x80, 0x8f, IORESOURCE_BUSY },
+#ifndef CONFIG_MELAN
{ "pic2", 0xa0, 0xbf, IORESOURCE_BUSY },
+#else
+ { "pic2", 0xa0, 0xa1, IORESOURCE_BUSY },
+#endif
{ "dma2", 0xc0, 0xdf, IORESOURCE_BUSY },
{ "fpu", 0xf0, 0xff, IORESOURCE_BUSY }
};
-#ifdef CONFIG_MELAN
-standard_io_resources[1] = { "pic1", 0x20, 0x21, IORESOURCE_BUSY };
-standard_io_resources[5] = { "pic2", 0xa0, 0xa1, IORESOURCE_BUSY };
-#endif
#define STANDARD_IO_RESOURCES (sizeof(standard_io_resources)/sizeof(struct resource))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-06-20 21:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-20 22:08 [PATCH] Fix compilation with CONFIG_MELAN Roland Dreier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox