lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 22 Apr 2016 02:50:42 -0700
From:	"tip-bot for Luis R. Rodriguez" <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	mcgrof@...nel.org, peterz@...radead.org, bp@...en8.de,
	tglx@...utronix.de, brgerst@...il.com, dvlasenk@...hat.com,
	hpa@...or.com, luto@...capital.net, linux-kernel@...r.kernel.org,
	torvalds@...ux-foundation.org, mingo@...nel.org
Subject: [tip:x86/boot] x86/ACPI: Move ACPI_FADT_NO_CMOS_RTC check to ACPI
 boot code

Commit-ID:  088a8ef8207f19aadbade0971af21ad89fdc3815
Gitweb:     http://git.kernel.org/tip/088a8ef8207f19aadbade0971af21ad89fdc3815
Author:     Luis R. Rodriguez <mcgrof@...nel.org>
AuthorDate: Wed, 13 Apr 2016 17:04:35 -0700
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Fri, 22 Apr 2016 10:29:01 +0200

x86/ACPI: Move ACPI_FADT_NO_CMOS_RTC check to ACPI boot code

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 <mcgrof@...nel.org>
Cc: Andy Lutomirski <luto@...capital.net>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Brian Gerst <brgerst@...il.com>
Cc: Denys Vlasenko <dvlasenk@...hat.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: andrew.cooper3@...rix.com
Cc: andriy.shevchenko@...ux.intel.com
Cc: bigeasy@...utronix.de
Cc: boris.ostrovsky@...cle.com
Cc: david.vrabel@...rix.com
Cc: ffainelli@...ebox.fr
Cc: george.dunlap@...rix.com
Cc: glin@...e.com
Cc: jgross@...e.com
Cc: jlee@...e.com
Cc: josh@...htriplett.org
Cc: julien.grall@...aro.org
Cc: konrad.wilk@...cle.com
Cc: kozerkov@...allels.com
Cc: lenb@...nel.org
Cc: lguest@...ts.ozlabs.org
Cc: linux-acpi@...r.kernel.org
Cc: lv.zheng@...el.com
Cc: matt@...eblueprint.co.uk
Cc: mbizon@...ebox.fr
Cc: rjw@...ysocki.net
Cc: robert.moore@...el.com
Cc: rusty@...tcorp.com.au
Cc: tiwai@...e.de
Cc: toshi.kani@...com
Cc: xen-devel@...ts.xensource.com
Link: http://lkml.kernel.org/r/1460592286-300-6-git-send-email-mcgrof@kernel.org
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 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 8c2f1ef..8c9c2bd 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 62c48da..ff4f418 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;
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ