From patchwork Wed Jan 15 07:25:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chun-Yi Lee X-Patchwork-Id: 3490491 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 C2014C02DC for ; Wed, 15 Jan 2014 07:27:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 214FD201F4 for ; Wed, 15 Jan 2014 07:27:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C4BAB20179 for ; Wed, 15 Jan 2014 07:27:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750973AbaAOH1g (ORCPT ); Wed, 15 Jan 2014 02:27:36 -0500 Received: from mail-pd0-f175.google.com ([209.85.192.175]:62341 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750928AbaAOH1f (ORCPT ); Wed, 15 Jan 2014 02:27:35 -0500 Received: by mail-pd0-f175.google.com with SMTP id r10so751757pdi.34 for ; Tue, 14 Jan 2014 23:27:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=Y/H+AYRFOabtSEQNJzZTEPjTku65gEpipymC44NJONw=; b=1AbSoVZRD++4G4Z6SeA6PFt28QcqhfA3p8OZVBCdhhcU+HTtwCuZjlcicFFfGCP2op gaq+CBTE7wShp9k4PAMyxIKBk4lVIGO6gZ8bGjD84/4rnBESKtLk/pwJOvA++BEShieh 2mfC4uz0ke99C/mqhvrvUaEUk9BvkVOEm6lF0Ck6NdkOG10hb3+MqqUjuAuWUlrJz/CC ZQoDdSWSMrmjQ3hO5aNBDwI9EWwV50VotOlTW6aAqA9CN0ASBJhe0gd3RU2lavOkbuL3 jeCEPe4mJ0b05RDrj0Q2vDX9VrJmLQVlVuCACy4jSeet+yAdTD1CEc5L92N5j6qobmmD +6zw== X-Received: by 10.68.133.163 with SMTP id pd3mr809743pbb.166.1389770855107; Tue, 14 Jan 2014 23:27:35 -0800 (PST) Received: from localhost.localdomain ([130.57.30.250]) by mx.google.com with ESMTPSA id fm1sm7772157pab.22.2014.01.14.23.27.25 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 14 Jan 2014 23:27:33 -0800 (PST) From: "Lee, Chun-Yi" To: "Rafael J. Wysocki" , Alessandro Zummo , "H. Peter Anvin" , Matt Fleming , Matthew Garrett Cc: 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, "Lee, Chun-Yi" , "Rafael J. Wysocki" , Matt Fleming , "H. Peter Anvin" , Borislav Petkov , Matthew Garrett Subject: [PATCH] ACPI / init: Run acpi_early_init() before timekeeping_init() Date: Wed, 15 Jan 2014 15:25:48 +0800 Message-Id: <1389770748-32698-1-git-send-email-jlee@suse.com> X-Mailer: git-send-email 1.6.0.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.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 This is a variant patch from Rafael J. Wysocki's ACPI / init: Run acpi_early_init() before efi_enter_virtual_mode() According to Matt Fleming, if acpi_early_init() was executed before efi_enter_virtual_mode(), the EFI initialization could benefit from it, so Rafael's patch makes that happen. And, we want accessing ACPI TAD device to set system clock, so move acpi_early_init() before timekeeping_init(). This final position is also before efi_enter_virtual_mode(). v2: Move acpi_early_init() before timekeeping_init() to prepare setting system clock with ACPI TAD. v1: Rafael J. Wysocki ACPI / init: Run acpi_early_init() before efi_enter_virtual_mode() Cc: Rafael J. Wysocki Cc: Matt Fleming Cc: H. Peter Anvin Cc: Borislav Petkov Cc: Matthew Garrett Tested-by: Toshi Kani Signed-off-by: Lee, Chun-Yi --- init/main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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)) {