From: "Jan Beulich" Subject: [PATCH, adjusted] linux: secondary CPU handling adjustments Date: Wed, 12 Dec 2007 08:18:25 +0000 Message-ID: <475FA761.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Add proper attributes and remove a few unused items (I forgot that part of the necessary changes lived in a different local patch, which is the reason for the resend). As usual, written and tested on 2.6.24-rc4 and made apply to the 2.6.18 tree without further testing. Signed-off-by: Jan Beulich Index: head-2007-12-11/arch/i386/kernel/time-xen.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head-2007-12-11.orig/arch/i386/kernel/time-xen.c 2007-12-11 = 11:17:36.000000000 +0100 +++ head-2007-12-11/arch/i386/kernel/time-xen.c 2007-12-11 11:45:10.0000000= 00 +0100 @@ -1054,7 +1054,7 @@ void time_resume(void) #ifdef CONFIG_SMP static char timer_name[NR_CPUS][15]; =20 -int local_setup_timer(unsigned int cpu) +int __cpuinit local_setup_timer(unsigned int cpu) { int seq, irq; =20 @@ -1085,7 +1085,7 @@ int local_setup_timer(unsigned int cpu) return 0; } =20 -void local_teardown_timer(unsigned int cpu) +void __cpuexit local_teardown_timer(unsigned int cpu) { BUG_ON(cpu =3D=3D 0); unbind_from_irqhandler(per_cpu(timer_irq, cpu), NULL); Index: head-2007-12-11/drivers/xen/core/smpboot.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head-2007-12-11.orig/drivers/xen/core/smpboot.c 2007-12-11 = 11:44:59.000000000 +0100 +++ head-2007-12-11/drivers/xen/core/smpboot.c 2007-12-11 11:45:10.0000000= 00 +0100 @@ -59,8 +59,6 @@ static char callfunc_name[NR_CPUS][15]; =20 u8 cpu_2_logical_apicid[NR_CPUS] =3D { [0 ... NR_CPUS-1] =3D BAD_APICID = }; =20 -void *xquad_portio; - cpumask_t cpu_sibling_map[NR_CPUS] __cacheline_aligned; cpumask_t cpu_core_map[NR_CPUS] __cacheline_aligned; EXPORT_SYMBOL(cpu_core_map); @@ -113,7 +111,7 @@ remove_siblinginfo(int cpu) cpu_data[cpu].booted_cores =3D 0; } =20 -static int xen_smp_intr_init(unsigned int cpu) +static int __cpuinit xen_smp_intr_init(unsigned int cpu) { int rc; =20 @@ -165,7 +165,7 @@ static void xen_smp_intr_exit(unsigned i } #endif =20 -void cpu_bringup(void) +void __cpuinit cpu_bringup(void) { cpu_init(); identify_cpu(cpu_data + smp_processor_id()); @@ -178,13 +178,13 @@ void cpu_bringup(void) local_irq_enable(); } =20 -static void cpu_bringup_and_idle(void) +static void __cpuinit cpu_bringup_and_idle(void) { cpu_bringup(); cpu_idle(); } =20 -static void cpu_initialize_context(unsigned int cpu) +static void __cpuinit cpu_initialize_context(unsigned int cpu) { vcpu_guest_context_t ctxt; struct task_struct *idle =3D idle_task(cpu); @@ -403,21 +401,9 @@ void __cpu_die(unsigned int cpu) alternatives_smp_switch(0); } =20 -#else /* !CONFIG_HOTPLUG_CPU */ - -int __cpu_disable(void) -{ - return -ENOSYS; -} - -void __cpu_die(unsigned int cpu) -{ - BUG(); -} - #endif /* CONFIG_HOTPLUG_CPU */ =20 -int __devinit __cpu_up(unsigned int cpu) +int __cpuinit __cpu_up(unsigned int cpu) { int rc; =20