xquad_portio cleanup
RFC PATCH 1/1 xquad_portio cleanup
Alan, Martin, Linus, and anyone else who cares, ;)
Here's a patch Martin and I put together a while ago to clean up thexquad_portio kludgery that's been floating around for too long. I think this pretty much goes along with what you have in your tree, Alan. It's a small patch, so if no one complains, please apply Linus.
Cheers!
-Matt
arch/i386/boot/compressed/misc.c +2 -4
@@ -9,6 +9,8 @@* High loaded stuff by Hans Lermen & Werner Almesberger, Feb. 1996 */ +#define STANDALONE +#include <linux/linkage.h> #include <linux/vmalloc.h> #include <linux/tty.h>
@@ -120,10 +122,6 @@static int vidport;static int lines, cols; -#ifdef CONFIG_MULTIQUAD -static void * xquad_portio =NULL ; -#endif -#include "../../../../lib/inflate.c" static void *malloc (int size)
include/asm-i386/io.h +5 -1
@@ -298,7 +298,11 @@#endif #ifdef CONFIG_MULTIQUAD -extern void *xquad_portio;/* Where the IO area was mapped */ +#ifdef STANDALONE +#define xquad_portio 0 +#else /* !STANDALONE */ +extern void *xquad_portio;/* Where the IO area was mapped */ +#endif /* STANDALONE */ #endif /* CONFIG_MULTIQUAD */ /*
Quoted 8 lines · Matthew Dobson
diff -Nur
linux-2.5.31-vanilla/arch/i386/boot/compressed/misc.clinux-2.5.31-xquad/arch/i386/boot/compressed/misc.carch/i386/boot/compressed/misc.c +1
-0@@ -9,6 +9,8 @@* High loaded stuff by Hans Lermen & Werner Almesberger, Feb. 1996 */ +#define STANDALONE
...
Quoted 4 lines
diff -Nur
linux-2.5.31-vanilla/include/asm-i386/io.hlinux-2.5.31-xquad/include/asm-i386/io.h
include/asm-i386/io.h line 306
Quoted 10 lines
include/asm-i386/io.h +5
-1@@ -298,7 +298,11 @@#endif #ifdef CONFIG_MULTIQUAD -extern void *xquad_portio;/* Where the IO area was mapped */ +#ifdef STANDALONE +#define xquad_portio 0 +#else /* !STANDALONE */ +extern void *xquad_portio;/* Where the IO area was mapped */ +#endif /* STANDALONE */ #endif /* CONFIG_MULTIQUAD */
STANDALONE seems to be a very namespace-polluting choice of define. MULTIQUAD_STANDALONE, MQ_STANDALONE... anything would be better imo.
Dave
Signature · 1 line
| Dave Jones. http://www.codemonkey.org.uk
Quoted 17 lines · Dave Jones
Quoted 8 lines · Matthew Dobson
diff -Nur
linux-2.5.31-vanilla/arch/i386/boot/compressed/misc.clinux-2.5.31-xquad/arch/i386/boot/compressed/misc.carch/i386/boot/compressed/misc.c +1
-0@@ -9,6 +9,8 @@* High loaded stuff by Hans Lermen & Werner Almesberger, Feb. 1996 */ +#define STANDALONE ...
Quoted 6 lines
diff -Nur
linux-2.5.31-vanilla/include/asm-i386/io.hlinux-2.5.31-xquad/include/asm-i386/io.hinclude/asm-i386/io.h +0
-0@@ -298,7 +298,11 @@#endif
Quoted 11 lines
include/asm-i386/io.h line 306
Quoted 8 lines
include/asm-i386/io.h +5
-1#ifdef CONFIG_MULTIQUAD -extern void *xquad_portio;/* Where the IO area was mapped */ +#ifdef STANDALONE +#define xquad_portio 0 +#else /* !STANDALONE */ +extern void *xquad_portio;/* Where the IO area was mapped */ +#endif /* STANDALONE */ #endif /* CONFIG_MULTIQUAD */ STANDALONE seems to be a very namespace-polluting choice of define.
MULTIQUAD_STANDALONE,MQ_STANDALONE... anything would be better imo.
The #define is most definitely *not* NUMA/Multiquad specific. In this
particular instance, it is guarding Multiquad specific code... The STANDALONE option (please clarify if I'm wrong, Alan) is for code that is compiled along with the kernel, with the kernel headers, etc, but is not acually part of the kernel proper.
Cheers!
-Matt
Quoted 8 lines · Matthew Dobson
Quoted 2 lines
STANDALONE seems to be a very namespace-polluting choice of define.
MULTIQUAD_STANDALONE,MQ_STANDALONE... anything would be better imo.The #define is most definitely *not* NUMA/Multiquad specific. In this particular instance, it is guarding Multiquad specific code... The STANDALONE option (please clarify if I'm wrong, Alan) is for code that is compiled along with the kernel, with the kernel headers, etc, but is not acually part of the kernel proper.
Indeed
Its set by the boot loader code that wants to also use inb/outb etc but not get the kernel magic wonders of numa-q and other evil abuses of PC iomapping
Re: [patch][rfc] xquad_portio cleanup 2.5.40
Linus,
I believe Alan cleared up the only objection to this small patch. Please
apply.
Changelog:
Cleans up a bit of a hack to get compressed (gziped) kernels booting on
NUMA-Q. Resulting code is more readable and understandable.
Cheers!
-Matt
Quoted 9 lines · Alan Cox
Quoted 5 lines · Matthew Dobson
Quoted 2 lines
STANDALONE seems to be a very namespace-polluting choice of define.
MULTIQUAD_STANDALONE,MQ_STANDALONE... anything would be better imo.The #define is most definitely *not* NUMA/Multiquad specific. In this
particular instance, it is guarding Multiquad specific code... The STANDALONE option (please clarify if I'm wrong, Alan) is for code that is compiled along with the kernel, with the kernel headers, etc, but is not acually part of the kernel proper.
Quoted 5 lines
Indeed
Its set by the boot loader code that wants to also use inb/outb etc but not get the kernel magic wonders of numa-q and other evil abuses of PC iomapping
arch/i386/boot/compressed/misc.c +2 -4
@@ -9,6 +9,8 @@* High loaded stuff by Hans Lermen & Werner Almesberger, Feb. 1996 */ +#define STANDALONE +#include <linux/linkage.h> #include <linux/vmalloc.h> #include <linux/tty.h>
@@ -120,10 +122,6 @@static int vidport;static int lines, cols; -#ifdef CONFIG_MULTIQUAD -static void * xquad_portio =NULL ; -#endif -#include "../../../../lib/inflate.c" static void *malloc (int size)
include/asm-i386/io.h +5 -1
@@ -298,7 +298,11 @@#endif #ifdef CONFIG_MULTIQUAD -extern void *xquad_portio;/* Where the IO area was mapped */ +#ifdef STANDALONE +#define xquad_portio 0 +#else /* !STANDALONE */ +extern void *xquad_portio;/* Where the IO area was mapped */ +#endif /* STANDALONE */ #endif /* CONFIG_MULTIQUAD */ /*