[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] fix CONFIG_CPU_HOTPLUG compile with 2.6.12 upgrade



* Andrew Theurer <habanero@xxxxxxxxxx> [2005-07-07 15:07]:
> On Thursday 07 July 2005 14:53, Paul Larson wrote:
> > On Thu, 2005-07-07 at 14:30 -0500, Andrew Theurer wrote:
> > >   CHK     include/linux/version.h
> > > make[1]: `arch/i386/kernel/asm-offsets.s' is up to date.
> > >   CHK     include/linux/compile.h
> > >   CHK     usr/initramfs_list
> > >   CC      arch/xen/i386/kernel/process.o
> > > arch/xen/i386/kernel/process.c: In function `play_dead':
> > > arch/xen/i386/kernel/process.c:119: error: `per_cpu__cpu_state'
> > > undeclared (first use in this function)
> > > arch/xen/i386/kernel/process.c:119: error: (Each undeclared
> > > identifier is reported only once
> > > arch/xen/i386/kernel/process.c:119: error: for each function it
> > > appears in.)
> > > arch/xen/i386/kernel/process.c:119: warning: type defaults to `int'
> > > in declaration of `type name'
> > > arch/xen/i386/kernel/process.c:119: error: invalid type argument of
> > > `unary *'
> > > arch/xen/i386/kernel/process.c:125: warning: type defaults to `int'
> > > in declaration of `type name'
> > > arch/xen/i386/kernel/process.c:125: error: invalid type argument of
> > > `unary *'
> > > make[1]: *** [arch/xen/i386/kernel/process.o] Error 1
> > > make: *** [arch/xen/i386/kernel] Error 2
> >
> > I'm getting the same.
> 
> For now I am disabling hotplug_cpu.

The attached patch gets CONFIG_HOTPLUG_CPU compiling again.  I'll test
out the kernel tomorrow.  Not sure if domU should have LOCAL_APIC and
IO_APIC enabled, they use code in mpparse.c CONFIG_X86_MPPARSE was being
enabled but the code down that patch uses isa_bus_to_virt(_x) which
requires CONFIG_XEN_PHYSDEV_ACCESS , which most domU's don't have.

-- 
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
(512) 838-9253   T/L: 678-9253
ryanh@xxxxxxxxxx


diffstat output:
 linux-2.6.12-xen-sparse/arch/xen/Kconfig.debug |    2 -
 linux-2.6.12-xen-sparse/arch/xen/i386/Kconfig  |    4 +-
 patches/linux-2.6.12/cpu_hotplug_fix.patch     |   42 +++++++++++++++++++++++++
 3 files changed, 45 insertions(+), 3 deletions(-)

Signed-off-by: Ryan Harper <ryanh@xxxxxxxxxx>
---
diff -urN a/linux-2.6.12-xen-sparse/arch/xen/i386/Kconfig 
foo/linux-2.6.12-xen-sparse/arch/xen/i386/Kconfig
--- a/linux-2.6.12-xen-sparse/arch/xen/i386/Kconfig     2005-07-07 
17:31:37.000000000 -0500
+++ foo/linux-2.6.12-xen-sparse/arch/xen/i386/Kconfig   2005-07-07 
17:14:42.000000000 -0500
@@ -716,12 +716,12 @@
 
 config X86_LOCAL_APIC
        bool
-       depends on X86_UP_APIC || ((X86_VISWS || SMP) && !X86_VOYAGER)
+       depends on XEN_PRIVILEGED_GUEST && (X86_UP_APIC || ((X86_VISWS || SMP) 
&& !X86_VOYAGER))
        default y
 
 config X86_IO_APIC
        bool
-       depends on X86_UP_IOAPIC || (SMP && !(X86_VISWS || X86_VOYAGER))
+       depends on XEN_PRIVILEDGE_GUEST && (X86_UP_IOAPIC || (SMP && 
!(X86_VISWS || X86_VOYAGER)))
        default y
 
 config X86_VISWS_APIC
diff -urN a/linux-2.6.12-xen-sparse/arch/xen/Kconfig.debug 
foo/linux-2.6.12-xen-sparse/arch/xen/Kconfig.debug
--- a/linux-2.6.12-xen-sparse/arch/xen/Kconfig.debug    2005-07-07 
17:31:37.000000000 -0500
+++ foo/linux-2.6.12-xen-sparse/arch/xen/Kconfig.debug  2005-07-07 
16:44:53.000000000 -0500
@@ -68,7 +68,7 @@
 
 config X86_MPPARSE
        bool
-       depends on X86_LOCAL_APIC && !X86_VISWS && X86
+       depends on X86_LOCAL_APIC && !X86_VISWS && X86 && XEN_PHYSDEV_ACCESS
        default y
 
 # X86_64
diff -urN a/patches/linux-2.6.12/cpu_hotplug_fix.patch 
foo/patches/linux-2.6.12/cpu_hotplug_fix.patch
--- a/patches/linux-2.6.12/cpu_hotplug_fix.patch        1969-12-31 
18:00:00.000000000 -0600
+++ foo/patches/linux-2.6.12/cpu_hotplug_fix.patch      2005-07-07 
17:50:24.000000000 -0500
@@ -0,0 +1,42 @@
+diff -urN pristine-linux-2.6.12.orig/include/asm-i386/cpu.h 
pristine-linux-2.6.12/include/asm-i386/cpu.h
+--- pristine-linux-2.6.12.orig/include/asm-i386/cpu.h  2005-06-17 
14:48:29.000000000 -0500
++++ pristine-linux-2.6.12/include/asm-i386/cpu.h       2005-07-07 
17:40:44.777157769 -0500
+@@ -5,6 +5,7 @@
+ #include <linux/cpu.h>
+ #include <linux/topology.h>
+ #include <linux/nodemask.h>
++#include <linux/percpu.h>
+ 
+ #include <asm/node.h>
+ 
+@@ -16,4 +17,5 @@
+ extern void arch_unregister_cpu(int);
+ #endif
+ 
++DECLARE_PER_CPU(int, cpu_state);
+ #endif /* _ASM_I386_CPU_H_ */
+diff -urN pristine-linux-2.6.12.orig/include/asm-i386/irq.h 
pristine-linux-2.6.12/include/asm-i386/irq.h
+--- pristine-linux-2.6.12.orig/include/asm-i386/irq.h  2005-06-17 
14:48:29.000000000 -0500
++++ pristine-linux-2.6.12/include/asm-i386/irq.h       2005-07-07 
17:41:08.857793011 -0500
+@@ -38,4 +38,8 @@
+ extern int irqbalance_disable(char *str);
+ #endif
+ 
++#ifdef CONFIG_HOTPLUG_CPU
++extern void fixup_irqs(cpumask_t map);
++#endif
++
+ #endif /* _ASM_IRQ_H */
+diff -urN pristine-linux-2.6.12.orig/include/asm-i386/smp.h 
pristine-linux-2.6.12/include/asm-i386/smp.h
+--- pristine-linux-2.6.12.orig/include/asm-i386/smp.h  2005-06-17 
14:48:29.000000000 -0500
++++ pristine-linux-2.6.12/include/asm-i386/smp.h       2005-07-07 
17:41:30.824723517 -0500
+@@ -83,6 +83,9 @@
+ }
+ 
+ #endif
++
++extern int __cpu_disable(void);
++extern void __cpu_die(unsigned int cpu);
+ #endif /* !__ASSEMBLY__ */
+ 
+ #define NO_PROC_ID            0xFF            /* No processor magic marker */

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.