From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751625AbbCJIHa (ORCPT ); Tue, 10 Mar 2015 04:07:30 -0400 Received: from mail-wi0-f175.google.com ([209.85.212.175]:36466 "EHLO mail-wi0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751343AbbCJIHZ (ORCPT ); Tue, 10 Mar 2015 04:07:25 -0400 Date: Tue, 10 Mar 2015 09:06:28 +0100 From: Ingo Molnar To: "Li, Aubrey" Cc: Arjan van de Ven , Borislav Petkov , "alan@linux.intel.com" , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , "Rafael J. Wysocki" , Len.Brown@intel.com, x86@kernel.org, LKML Subject: Re: [PATCH] x86: Bypass legacy PIC and PIT on ACPI hardware reduced platform Message-ID: <20150310080628.GA20314@gmail.com> References: <54F6A08B.2010105@linux.intel.com> <20150304073717.GA11736@gmail.com> <54F6C59C.706@linux.intel.com> <20150304095011.GH3233@pd.tnic> <54F71888.4040608@linux.intel.com> <20150304201102.GA6530@gmail.com> <54F83A61.3090906@linux.intel.com> <20150305113641.GB23046@gmail.com> <54F84F3A.8080902@linux.intel.com> <54FE2C0B.10209@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54FE2C0B.10209@linux.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Li, Aubrey wrote: > >> - in x86_reduced_hw_init() set 'legacy_pic' to 'null_legacy_pic' > >> > >> - clean up 'global_clock_event' handling: instead of a global > >> variable, move its management into x86_platform_ops::get_clockevent() > >> and set the method to hpet/pit/abp/etc. specific handlers that > >> return the right clockevent device. > >> > >> - in your x86_reduced_hw_init() function add the hpet clockevent > >> device to x86_platform_ops::get_clockevent, overriding the default > >> PIT. > > how about this one? > > diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c > index b9e30da..70955d6 100644 > --- a/arch/x86/kernel/acpi/boot.c > +++ b/arch/x86/kernel/acpi/boot.c > @@ -1541,6 +1541,16 @@ int __init early_acpi_boot_init(void) > */ > early_acpi_process_madt(); > > + /* > + * Override x86_init functions and bypass legacy pic > + * in hardware-reduced ACPI mode > + */ > + if (acpi_gbl_reduced_hardware) { > + x86_init.timers.timer_init = x86_init_noop; > + x86_init.irqs.pre_vector_init = x86_init_noop; > + legacy_pic = &null_legacy_pic; > + } Sounds good to me, assuming it builds, boots and works! :-) A couple of extra suggestions: 1) I'd suggest moving it into its own dedicated, appropriately named static function, to make it clear that 'ACPI Reduced Hardware' init happens there. 2) I'd also initialize it like this: x86_init.timers.timer_init = x86_init_noop; x86_init.irqs.pre_vector_init = x86_init_noop; legacy_pic = &null_legacy_pic; to make the noop patterns stand out better. 3) Once all is said and done, please also make acpi_gbl_reduced_hardware a flag internal to the ACPI code, not exposed to and used by other bits of x86 code. > If the above makes sense, I'll send poweroff and reboot change > together in a seperate patch. Yeah, please send them in a single series though, so they form a logical group. Thanks, Ingo