Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261180AbVDDIrR (ORCPT ); Mon, 4 Apr 2005 04:47:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261182AbVDDIrR (ORCPT ); Mon, 4 Apr 2005 04:47:17 -0400 Received: from gprs189-60.eurotel.cz ([160.218.189.60]:51634 "EHLO amd.ucw.cz") by vger.kernel.org with ESMTP id S261180AbVDDIqz (ORCPT ); Mon, 4 Apr 2005 04:46:55 -0400 Date: Mon, 4 Apr 2005 10:46:38 +0200 From: Pavel Machek To: Li Shaohua Cc: lkml , ACPI-DEV , Zwane Mwaikambo , Len Brown Subject: Re: [RFC 1/6]SEP initialization rework Message-ID: <20050404084638.GB14642@elf.ucw.cz> References: <1112580349.4194.331.camel@sli10-desk.sh.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1112580349.4194.331.camel@sli10-desk.sh.intel.com> X-Warning: Reading this can be dangerous to your mental health. User-Agent: Mutt/1.5.6+20040907i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2338 Lines: 66 Hi! > Make SEP init per-cpu, so is hotplug safe. > > Thanks, > Shaohua > > --- > > linux-2.6.11-root/arch/i386/kernel/smpboot.c | 6 ++++++ > linux-2.6.11-root/arch/i386/kernel/sysenter.c | 10 ++++++---- > linux-2.6.11-root/arch/i386/mach-voyager/voyager_smp.c | 6 ++++++ > 3 files changed, 18 insertions(+), 4 deletions(-) > > diff -puN arch/i386/kernel/sysenter.c~sep_init_cleanup arch/i386/kernel/sysenter.c > --- linux-2.6.11/arch/i386/kernel/sysenter.c~sep_init_cleanup 2005-03-28 09:32:30.936304248 +0800 > +++ linux-2.6.11-root/arch/i386/kernel/sysenter.c 2005-03-28 09:58:20.703703792 +0800 > @@ -26,6 +26,11 @@ void enable_sep_cpu(void *info) > int cpu = get_cpu(); > struct tss_struct *tss = &per_cpu(init_tss, cpu); > > + if (!boot_cpu_has(X86_FEATURE_SEP)) { > + put_cpu(); > + return; > + } > + > tss->ss1 = __KERNEL_CS; > tss->esp1 = sizeof(struct tss_struct) + (unsigned long) tss; > wrmsr(MSR_IA32_SYSENTER_CS, __KERNEL_CS, 0); > @@ -41,7 +46,7 @@ void enable_sep_cpu(void *info) > extern const char vsyscall_int80_start, vsyscall_int80_end; > extern const char vsyscall_sysenter_start, vsyscall_sysenter_end; > > -static int __init sysenter_setup(void) > +int __init sysenter_setup(void) > { > void *page = (void *)get_zeroed_page(GFP_ATOMIC); > Can this still be __init? I think you are calling it from hotplug code now, right? > diff -puN arch/i386/kernel/smpboot.c~sep_init_cleanup arch/i386/kernel/smpboot.c > --- linux-2.6.11/arch/i386/kernel/smpboot.c~sep_init_cleanup 2005-03-28 09:33:49.972288952 +0800 > +++ linux-2.6.11-root/arch/i386/kernel/smpboot.c 2005-03-28 09:46:01.814032096 +0800 > @@ -415,6 +415,8 @@ static void __init smp_callin(void) > > static int cpucount; > > +extern int sysenter_setup(void); > +extern void enable_sep_cpu(void *); > /* > * Activate a secondary processor. > */ Perhaps these should go to header file somewhere? Pavel -- People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl! - 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/