From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1949040AbcBSORV (ORCPT ); Fri, 19 Feb 2016 09:17:21 -0500 Received: from mail.kernel.org ([198.145.29.136]:53411 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1949007AbcBSOP6 (ORCPT ); Fri, 19 Feb 2016 09:15:58 -0500 From: "Luis R. Rodriguez" To: hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de Cc: x86@kernel.org, linux-kernel@vger.kernel.org, luto@amacapital.net, boris.ostrovsky@oracle.com, rusty@rustcorp.com.au, david.vrabel@citrix.com, konrad.wilk@oracle.com, mcb30@ipxe.org, jgross@suse.com, andriy.shevchenko@linux.intel.com, xen-devel@lists.xensource.com, "Luis R. Rodriguez" Subject: [RFC v2 4/6] x86/init: use linker table for i386 early setup Date: Fri, 19 Feb 2016 06:15:41 -0800 Message-Id: <1455891343-10016-5-git-send-email-mcgrof@kernel.org> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1455891343-10016-1-git-send-email-mcgrof@kernel.org> References: <1455891343-10016-1-git-send-email-mcgrof@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This also annotates this is only used for PC and lguest hardware subarchitectures. v2: add X86_SUBARCH_XEN as well, as noted by Konrad, now tested by 0-day bot. Signed-off-by: Luis R. Rodriguez --- arch/x86/kernel/head32.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/head32.c b/arch/x86/kernel/head32.c index 768fa3888066..0b41626e57fc 100644 --- a/arch/x86/kernel/head32.c +++ b/arch/x86/kernel/head32.c @@ -21,12 +21,16 @@ #include #include -static void __init i386_default_early_setup(void) +static void __init i386_set_setup_funcs(void) { /* Initialize 32bit specific setup functions */ x86_init.resources.reserve_resources = i386_reserve_resources; x86_init.mpparse.setup_ioapic_ids = setup_ioapic_ids_from_mpc; } +x86_init_early(BIT(X86_SUBARCH_PC) | + BIT(X86_SUBARCH_LGUEST) | + BIT(X86_SUBARCH_XEN), + NULL, NULL, i386_set_setup_funcs); asmlinkage __visible void __init i386_start_kernel(void) { @@ -41,9 +45,6 @@ asmlinkage __visible void __init i386_start_kernel(void) case X86_SUBARCH_CE4100: x86_ce4100_early_setup(); break; - default: - i386_default_early_setup(); - break; } x86_init_fn_init_tables(); -- 2.7.0