From patchwork Thu Apr 14 00:13:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 8830241 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 35E179F71A for ; Thu, 14 Apr 2016 00:15:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 605F42020F for ; Thu, 14 Apr 2016 00:15:00 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6FC6B2027D for ; Thu, 14 Apr 2016 00:14:59 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aqUuN-0001Xf-2L; Thu, 14 Apr 2016 00:13:19 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aqUuL-0001XZ-Vk for xen-devel@lists.xensource.com; Thu, 14 Apr 2016 00:13:18 +0000 Received: from [85.158.137.68] by server-17.bemta-3.messagelabs.com id D2/54-03149-D90EE075; Thu, 14 Apr 2016 00:13:17 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrFLMWRWlGSWpSXmKPExsVybKJsh+6cB3z hBh97VCzuTXnP7sDosb1vF3sAYxRrZl5SfkUCa8azmdtZCz7wVnR/P8fUwPieu4uRi0NIYCqj xJeJa1ggnBlMEkufHWTsYuTgYBPQlbh5W6KLkZNDRCBB4u7Tb8wgNcwCx1gl5q2aywqSEBYIl 5j6oAPMZhFQlVi3cR4bSC+vgL3EtmZpkLCEgJxEy4/dYCWcAg4SC3auALOFgEr6bx9ghKjJkJ jXM4cVwvaSWHTjEpStJnH13CbmCYx8CxgZVjFqFKcWlaUW6Rqa6iUVZaZnlOQmZuboGhoY6+W mFhcnpqfmJCYV6yXn525iBIYJAxDsYFyz3fMQoyQHk5Ior8kqvnAhvqT8lMqMxOKM+KLSnNTi Q4wyHBxKErwW94FygkWp6akVaZk5wICFSUtw8CiJ8MqBpHmLCxJzizPTIVKnGBWlxHm5QRICI ImM0jy4NliUXGKUlRLmZQQ6RIinILUoN7MEVf4VozgHo5IwrynIFJ7MvBK46a+AFjMBLS57xw uyuCQRISXVwHgnxaVuYuatFc++2L5rZ4orZ5mads7jzunJt3iubl/P3LzokNZlthf/9gtd+/P oQvfjLSL/3p/78XvefyO7/tr+qGy5LF/Wy3+cInZ+ypx7aPuDOMXPMn0VYn+dpotyrKr1imL0 2ffROsZ6tydzV9P1b2vqlkavcLI8w2TaoLuigPV9WWqPkqASS3FGoqEWc1FxIgCUagJPjQIAA A== X-Env-Sender: mcgrof@kernel.org X-Msg-Ref: server-10.tower-31.messagelabs.com!1460592795!34021984!1 X-Originating-IP: [198.145.29.136] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.28; banners=-,-,- X-VirusChecked: Checked Received: (qmail 22186 invoked from network); 14 Apr 2016 00:13:16 -0000 Received: from mail.kernel.org (HELO mail.kernel.org) (198.145.29.136) by server-10.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 14 Apr 2016 00:13:16 -0000 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4A0C220120; Thu, 14 Apr 2016 00:13:14 +0000 (UTC) Received: from garbanzo.do-not-panic.com (c-73-15-241-2.hsd1.ca.comcast.net [73.15.241.2]) (using TLSv1.2 with cipher AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 82A522011B; Thu, 14 Apr 2016 00:13:12 +0000 (UTC) From: "Luis R. Rodriguez" To: bp@alien8.de, hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com, rusty@rustcorp.com.au Date: Wed, 13 Apr 2016 17:13:11 -0700 Message-Id: <1460592791-360-1-git-send-email-mcgrof@kernel.org> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1460592286-300-1-git-send-email-mcgrof@kernel.org> References: <1460592286-300-1-git-send-email-mcgrof@kernel.org> X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 Cc: kozerkov@parallels.com, matt@codeblueprint.co.uk, bigeasy@linutronix.de, lv.zheng@intel.com, ffainelli@freebox.fr, mbizon@freebox.fr, xen-devel@lists.xensource.com, x86@kernel.org, robert.moore@intel.com, linux-acpi@vger.kernel.org, glin@suse.com, lenb@kernel.org, julien.grall@linaro.org, josh@joshtriplett.org, george.dunlap@citrix.com, jlee@suse.com, lguest@lists.ozlabs.org, boris.ostrovsky@oracle.com, andriy.shevchenko@linux.intel.com, jgross@suse.com, toshi.kani@hp.com, andrew.cooper3@citrix.com, rjw@rjwysocki.net, linux-kernel@vger.kernel.org, luto@amacapital.net, "Luis R. Rodriguez" , david.vrabel@citrix.com, tiwai@suse.de Subject: [Xen-devel] [PATCH v6 05/16] x86, ACPI: move ACPI_FADT_NO_CMOS_RTC check to ACPI boot code X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP This moves the ACPI specific check into the ACPI boot code, it also takes advantage of the x86_platform.legacy.rtc which is checked for already on the RTC initialization code. This lets us remove the nasty #ifdefery and consolidate the checks to use only one toggle to disable the RTC init code. The works as RTC is initialized by device_initcall(add_rtc_cmos), this will run late in boot on start_kernel() during rest_init(), acpi_parse_fadt() gets called earlier during setup_arch(). Signed-off-by: Luis R. Rodriguez --- arch/x86/kernel/acpi/boot.c | 4 ++++ arch/x86/kernel/rtc.c | 8 -------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 8c2f1ef6ca23..8c9c2bdba092 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c @@ -913,6 +913,10 @@ late_initcall(hpet_insert_resource); static int __init acpi_parse_fadt(struct acpi_table_header *table) { + if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_CMOS_RTC) { + pr_debug("ACPI: not registering RTC platform device\n"); + x86_platform.legacy.rtc = 0; + } #ifdef CONFIG_X86_PM_TIMER /* detect the location of the ACPI PM Timer */ diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c index 62c48da3889d..ff4f4180fefd 100644 --- a/arch/x86/kernel/rtc.c +++ b/arch/x86/kernel/rtc.c @@ -189,14 +189,6 @@ static __init int add_rtc_cmos(void) if (of_have_populated_dt()) return 0; -#ifdef CONFIG_ACPI - if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_CMOS_RTC) { - /* This warning can likely go away again in a year or two. */ - pr_info("ACPI: not registering RTC platform device\n"); - return -ENODEV; - } -#endif - if (!x86_platform.legacy.rtc) return -ENODEV;