Skip to contentSkip to conversation

NUMA-Q xquad_portio declaration

PATCH In review Martin J. Bligh 3 participants 8 messages Aug 5, 2002 – Aug 15, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NUMA-Q xquad_portio declaration

This patch is from Matt Dobson. It corrects the definition of xquad_portio, getting rid of a compile warning. Tested on NUMA-Q and std 2-way SMP system through LTP.

Please apply,

Martin.

arch/i386/boot/compressed/misc.c +1 -1
diff -Nur linux-2.5.25-vanilla/arch/i386/boot/compressed/misc.c linux-2.5.25-patched/arch/i386/boot/compressed/misc.c
@@ -121,7 +121,7 @@
 static int lines, cols;
 
 #ifdef CONFIG_MULTIQUAD
-static void * const xquad_portio = NULL;
+static void * xquad_portio = NULL;
 #endif
 
 #include "../../../../lib/inflate.c"
#1 lore raw
Quoted 2 lines · Martin J. Bligh

This patch is from Matt Dobson. It corrects the definition of xquad_portio, getting rid of a compile warning.

Marcelo - I have a much cleaner change for this.

#2 lore raw
Quoted 4 lines
Quoted 2 lines

This patch is from Matt Dobson. It corrects the definition of xquad_portio, getting rid of a compile warning.

Marcelo - I have a much cleaner change for this.

Can you publish it? ;-)

Thanks,

M.

#3 lore raw
Quoted 6 lines · Martin J. Bligh
Quoted 4 lines
Quoted 2 lines

This patch is from Matt Dobson. It corrects the definition of xquad_portio, getting rid of a compile warning.

Marcelo - I have a much cleaner change for this.

Can you publish it? ;-)

I did - its in -ac4

#4 lore raw
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

This patch is from Matt Dobson. It corrects the definition of xquad_portio, getting rid of a compile warning.

Marcelo - I have a much cleaner change for this.

Can you publish it? ;-)

I did - its in -ac4

The STANDALONE thing? I'm not convinced that's really any cleaner, it makes even more of a mess of io.h than there was already (though we could consider that a lost cause ;-)).

What's your objection to just throwing in a defn of xquad_portio? A preference for burying the messy stuff in header files? Seems to me that as you have to define STANDALONE now, the point is moot.

M.

#5 lore raw
Quoted 7 lines · Martin J. Bligh

The STANDALONE thing? I'm not convinced that's really any cleaner, it makes even more of a mess of io.h than there was already (though we could consider that a lost cause ;-)).

What's your objection to just throwing in a defn of xquad_portio? A preference for burying the messy stuff in header files? Seems to me that as you have to define STANDALONE now, the point is moot.

Because you are assuming there will be -one- kind of wackomatic PC system - IBM's. The chances are there will be more than one as other vendors like HP, Compaq and Dell begin shipping stuff. Having __STANDALONE__ works for all the cases instead of exporting xquad this hpmagic that and compaq the other in an ever growing cess pit

#6 lore raw
Quoted 8 lines
Quoted 7 lines

The STANDALONE thing? I'm not convinced that's really any cleaner, it makes even more of a mess of io.h than there was already (though we could consider that a lost cause ;-)).

What's your objection to just throwing in a defn of xquad_portio? A preference for burying the messy stuff in header files? Seems to me that as you have to define STANDALONE now, the point is moot.

Quoted 5 lines

Because you are assuming there will be -one- kind of wackomatic PC system - IBM's. The chances are there will be more than one as other vendors like HP, Compaq and Dell begin shipping stuff. Having __STANDALONE__ works for all the cases instead of exporting xquad this hpmagic that and compaq the other in an ever growing cess pit

OK, fair enough. Would a simpler approach to what you've done be to do in io.h something like:

#ifdef CONFIG_MULTIQUAD
#ifdef STANDALONE
#define xquad_portio 0
#else
extern void *xquad_portio; /* Where the IO area was mapped */
#endif
#endif /* CONFIG_MULTIQUAD */

Or something along these lines ... ? Would make the changeset somewhat smaller. Seems to work from 30 seconds thought, but haven't tried it (yet).

M.

#7 lore raw

Alan & Martin,
How does this look? I've combined what Martin suggested with what Alan has in
his tree... Comments?

-Matt

Quoted 26 lines · Martin J. Bligh
Quoted 8 lines
Quoted 7 lines

The STANDALONE thing? I'm not convinced that's really any cleaner, it makes even more of a mess of io.h than there was already (though we could consider that a lost cause ;-)).

What's your objection to just throwing in a defn of xquad_portio? A preference for burying the messy stuff in header files? Seems to me that as you have to define STANDALONE now, the point is moot.

Quoted 5 lines

Because you are assuming there will be -one- kind of wackomatic PC system - IBM's. The chances are there will be more than one as other vendors like HP, Compaq and Dell begin shipping stuff. Having __STANDALONE__ works for all the cases instead of exporting xquad this hpmagic that and compaq the other in an ever growing cess pit

OK, fair enough. Would a simpler approach to what you've done be to do in io.h something like:

#ifdef CONFIG_MULTIQUAD
#ifdef STANDALONE
#define xquad_portio 0
#else
extern void *xquad_portio; /* Where the IO area was mapped */
#endif
#endif /* CONFIG_MULTIQUAD */

Quoted 6 lines

Or something along these lines ... ? Would make the changeset
somewhat smaller. Seems to work from 30 seconds thought, but haven't tried it (yet).

M.

arch/i386/boot/compressed/misc.c +2 -4
diff -Nur linux-2.5.31-vanilla/arch/i386/boot/compressed/misc.c linux-2.5.31-xquad/arch/i386/boot/compressed/misc.c
@@ -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 * const xquad_portio = NULL;
-#endif
-
 #include "../../../../lib/inflate.c"
 
 static void *malloc(int size)
include/asm-i386/io.h +5 -1
diff -Nur linux-2.5.31-vanilla/include/asm-i386/io.h linux-2.5.31-xquad/include/asm-i386/io.h
@@ -303,7 +303,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 */
 
 /*