From patchwork Tue Jan 14 04:09:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: joeyli X-Patchwork-Id: 310447 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-wi0-x237.google.com (mail-wi0-x237.google.com [IPv6:2a00:1450:400c:c05::237]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 7D0422C0091 for ; Tue, 14 Jan 2014 15:11:03 +1100 (EST) Received: by mail-wi0-f183.google.com with SMTP id g10sf28860wiw.20 for ; Mon, 13 Jan 2014 20:10:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=subject:from:to:cc:in-reply-to:references:date:message-id :mime-version:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:sender:list-subscribe:list-unsubscribe:content-type :content-transfer-encoding; bh=uMN954AKsne9I3NkJcCbFVZ0Urpv1vTIsjsWcegEZjk=; b=CZp6ZKy4ZA0/nzcybJ1pSDaq6pKyPPtFYhsjJl3Y0apulkltvcqeRnCMn+u33ZgvMx hAHmegvTsHsiTIyLulNuaIcHZ5wjGnb3755f9gT+yArApSVJcU/HyG9xnRYpg1nU+A+I sKmmnUE9eJm7zdSD0JONZ8dDZKVvgBGYwpS3lVB/iApmp84oEsnoktfXrqJyGZMIG58x LO2Fk2S8arAxwfD72By9fhE9oDhSX0haMJywdzKMktOnWHHjFunvjUZvvOnKx8WUm6Pe HM8uIIrHhnQtm3MGlwrzM2EcbfB6/lYbgPxszxpXbsWTi+RrDuYw3jHpp9R5vsUvYOC+ O0lw== X-Received: by 10.152.115.231 with SMTP id jr7mr88138lab.25.1389672658768; Mon, 13 Jan 2014 20:10:58 -0800 (PST) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.152.179.138 with SMTP id dg10ls5438lac.45.gmail; Mon, 13 Jan 2014 20:10:58 -0800 (PST) X-Received: by 10.112.144.170 with SMTP id sn10mr13425858lbb.9.1389672658371; Mon, 13 Jan 2014 20:10:58 -0800 (PST) Received: from smtp.nue.novell.com (smtp.nue.novell.com. [195.135.221.5]) by gmr-mx.google.com with ESMTPS id c5si255717eep.1.2014.01.13.20.10.57 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 13 Jan 2014 20:10:58 -0800 (PST) Received-SPF: pass (google.com: domain of jlee@suse.com designates 195.135.221.5 as permitted sender) client-ip=195.135.221.5; 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: [rtc-linux] 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 X-Original-Sender: jlee@suse.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jlee@suse.com designates 195.135.221.5 as permitted sender) smtp.mail=jlee@suse.com Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , 於 日,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 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)) {