From patchwork Tue Jan 14 04:09:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: joeyli X-Patchwork-Id: 3483861 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B1258C02DC for ; Tue, 14 Jan 2014 04:11:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DA08A20170 for ; Tue, 14 Jan 2014 04:11:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0FC1320166 for ; Tue, 14 Jan 2014 04:11:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752182AbaANELB (ORCPT ); Mon, 13 Jan 2014 23:11:01 -0500 Received: from smtp.nue.novell.com ([195.135.221.5]:57481 "EHLO smtp.nue.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751342AbaANELA (ORCPT ); Mon, 13 Jan 2014 23:11:00 -0500 Received: from [147.2.211.81] (syd-fw-asa1.apac.novell.com [130.57.30.250]) by smtp.nue.novell.com with ESMTP (TLS encrypted); Tue, 14 Jan 2014 05:10:47 +0100 Subject: Re: [RFT][PATCH] ACPI / init: Run acpi_early_init() before efi_enter_virtual_mode() (was: Re: [RFC PATCH 00/14] Support timezone of ACPI TAD and EFI TIME) From: joeyli To: "Rafael J. Wysocki" Cc: Matt Fleming , "H. Peter Anvin" , Alessandro Zummo , Matthew Garrett , Elliott@hp.com, samer.el-haj-mahmoud@hp.com, Oliver Neukum , werner@suse.com, trenn@suse.de, JBeulich@suse.com, linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com, x86@kernel.org, "linux-efi@vger.kernel.org" , linux-acpi@vger.kernel.org, Borislav Petkov In-Reply-To: <2530951.HFPX8MI38t@vostro.rjw.lan> References: <1387439053-8711-1-git-send-email-jlee@suse.com> <3476450.BMEcId2Lgj@vostro.rjw.lan> <20131221122148.GB29501@console-pimps.org> <2530951.HFPX8MI38t@vostro.rjw.lan> Date: Tue, 14 Jan 2014 12:09:08 +0800 Message-ID: <1389672548.24105.252.camel@linux-s257.site> Mime-Version: 1.0 X-Mailer: Evolution 2.28.2 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ? ??2014-01-12 ? 01:30 +0100?Rafael J. Wysocki ??? > OK > > I don't see any adverse effects of the patch below on a couple of my > test > boxes, but (a) they are Intel-based and (b) they are non-EFI, so it > would be > good to give it a go on as many machines as reasonably possible. > > Thanks, > Rafael > > --- > From: Rafael J. Wysocki > Subject: ACPI / init: Run acpi_early_init() before > efi_enter_virtual_mode() > > According to Matt Fleming, if acpi_early_init() was executed befpre > efi_enter_virtual_mode(), the EFI initialization could benefit from > it, so make that happen. > > Signed-off-by: Rafael J. Wysocki > --- > init/main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > Index: linux-pm/init/main.c > =================================================================== > --- linux-pm.orig/init/main.c > +++ linux-pm/init/main.c > @@ -615,6 +615,7 @@ asmlinkage void __init start_kernel(void > calibrate_delay(); > pidmap_init(); > anon_vma_init(); > + acpi_early_init(); > #ifdef CONFIG_X86 > if (efi_enabled(EFI_RUNTIME_SERVICES)) > efi_enter_virtual_mode(); > @@ -641,7 +642,6 @@ asmlinkage void __init start_kernel(void > > check_bugs(); > > - acpi_early_init(); /* before LAPIC and SMP init */ > sfi_init_late(); > > if (efi_enabled(EFI_RUNTIME_SERVICES)) { > > > This patch works to me on Acer Gateway Z5WT2 UEFI notebook and Intel UEFI development board. Does it possible move acpi_early_init() to before timekeeping_init()? The position is also before efi_enter_virtual_mode() and that will be useful for parsing ACPI TAD to set system clock: Thanks a lot! Joey Lee Tested-by: Toshi Kani --- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/init/main.c b/init/main.c index febc511..b6d93c8 100644 --- a/init/main.c +++ b/init/main.c @@ -565,6 +565,7 @@ asmlinkage void __init start_kernel(void) init_timers(); hrtimers_init(); softirq_init(); + acpi_early_init(); timekeeping_init(); time_init(); sched_clock_postinit(); @@ -641,7 +642,6 @@ asmlinkage void __init start_kernel(void) check_bugs(); - acpi_early_init(); /* before LAPIC and SMP init */ sfi_init_late(); if (efi_enabled(EFI_RUNTIME_SERVICES)) {