From patchwork Tue Nov 13 19:32:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fenghua Yu X-Patchwork-Id: 1737491 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 52B2EDF280 for ; Wed, 14 Nov 2012 02:37:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932538Ab2KNCdp (ORCPT ); Tue, 13 Nov 2012 21:33:45 -0500 Received: from mga14.intel.com ([143.182.124.37]:3412 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932521Ab2KNCdo (ORCPT ); Tue, 13 Nov 2012 21:33:44 -0500 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 13 Nov 2012 18:33:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.83,247,1352102400"; d="scan'208";a="217413939" Received: from fenghua-desk.sc.intel.com ([10.3.52.80]) by azsmga001.ch.intel.com with ESMTP; 13 Nov 2012 18:33:43 -0800 From: "Fenghua Yu" To: "Ingo Molnar" , "Thomas Gleixner" , "H Peter Anvin" , "Linus Torvalds" , "Andrew Morton" , "Asit K Mallick" , "Tony Luck" , "Arjan Dan De Ven" , "Suresh B Siddha" , "Len Brown" , "Srivatssa S. Bhat" , "Randy Dunlap" , "Rafael J. Wysocki" , "Chen Gong" , "linux-kernel" , "linux-pm" , "x86" Cc: "Fenghua Yu" Subject: [PATCH v10 08/14] x86-32, hotplug: Add start_cpu0() entry point to head_32.S Date: Tue, 13 Nov 2012 11:32:45 -0800 Message-Id: <1352835171-3958-9-git-send-email-fenghua.yu@intel.com> X-Mailer: git-send-email 1.7.2 In-Reply-To: <1352835171-3958-1-git-send-email-fenghua.yu@intel.com> References: <1352835171-3958-1-git-send-email-fenghua.yu@intel.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Fenghua Yu start_cpu0() is defined in head_32.S for 32-bit. The function sets up stack and jumps to start_secondary() for CPU0 wake up. Signed-off-by: Fenghua Yu --- arch/x86/kernel/head_32.S | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S index 957a47a..a013e73 100644 --- a/arch/x86/kernel/head_32.S +++ b/arch/x86/kernel/head_32.S @@ -266,6 +266,19 @@ num_subarch_entries = (. - subarch_entries) / 4 jmp default_entry #endif /* CONFIG_PARAVIRT */ +#ifdef CONFIG_HOTPLUG_CPU +/* + * Boot CPU0 entry point. It's called from play_dead(). Everything has been set + * up already except stack. We just set up stack here. Then call + * start_secondary(). + */ +ENTRY(start_cpu0) + movl stack_start, %ecx + movl %ecx, %esp + jmp *(initial_code) +ENDPROC(start_cpu0) +#endif + /* * Non-boot CPU entry point; entered from trampoline.S * We can't lgdt here, because lgdt itself uses a data segment, but