Re: 2.5.8-dj1 : arch/i386/kernel/smpboot.c error

Martin J. Bligh (Martin.Bligh@us.ibm.com)
Wed, 17 Apr 2002 08:28:19 -0700


cc'ed Brian - this is your io.h cleanup patch

> As I said, -dj has an optimization in asm-i386/io.o:
>
>> # ifdef CONFIG_MULTIQUAD
>> extern void *xquad_portio; /* Where the IO area was mapped */
>> # else
>> # define xquad_portio (0)
>> # endif

Ah, OK, I missed that - makes more sense now ;-).

> Even though clustered_apic_mode is 0, the compiler still complains
> about the second one and the first one doesn't depend on
> clustered_apic_mode at all.

Hmmm ... not sure why the compiler complains about the second one,
that's very strange ;-)

> I don't like spreading around more #ifdef's, but the spirit of the
> changes seemed to be to get rid of the declaration of xquad_portio
> when !CONFIG_MULTIQUAD. Suggestions for improvement welcome.

The cleanups we gained in io.h by Brian's patch more than compensate
for this, but it's still a shame to have to do.

I wonder if we can play the same trick we've played before ....
haven't tested the appended, but maybe it, or something like it
will work without the ifdef's?

M.

--- linux-2.5.8-dj1/include/asm-i386/io.h Wed Apr 17 05:06:20 2002
+++ linux-2.5.8-dj1/include/asm-i386/io.h.new Wed Apr 17 15:07:11 2002
@@ -330,7 +330,8 @@
}

#ifdef CONFIG_MULTIQUAD
-extern void *xquad_portio; /* Where the IO area was mapped */
+#define xquad_portio real_xquad_portio
+extern void *real_xquad_portio; /* Where the IO area was mapped */
#else
#define xquad_portio (0)
#endif
--- linux-2.5.8-dj1/arch/i386/kernel/smpboot.c Sun Apr 14 12:18:52 2002
+++ linux-2.5.8-dj1/arch/i386/kernel/smpboot.c.new Wed Apr 17 15:08:25 2002
@@ -1005,7 +1005,7 @@

static int boot_cpu_logical_apicid;
/* Where the IO area was mapped on multiquad, always 0 otherwise */
-void *xquad_portio = NULL;
+void *real_xquad_portio = NULL;

int cpu_sibling_map[NR_CPUS] __cacheline_aligned;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/