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-next>] [day] [month] [year] [list]
Date:	Tue, 15 May 2012 13:08:22 +0100
From:	"Jan Beulich" <JBeulich@...e.com>
To:	<mingo@...e.hu>, <tglx@...utronix.de>, <hpa@...or.com>
Cc:	<dannf@...nf.org>, <matt.fleming@...ux.intel.com>,
	<mjg@...hat.com>, <linux-kernel@...r.kernel.org>
Subject: [PATCH, resend] x86: enable rtc-efi

Besides a Kconfig change this just requires creating a corresponding
platform device.

Signed-off-by: Jan Beulich <jbeulich@...e.com>
Cc: dann frazier <dannf@...nf.org>
Cc: Matt Fleming <matt.fleming@...el.com>
Cc: Matthew Garrett <mjg@...hat.com>

---
 arch/x86/platform/efi/efi.c |   19 +++++++++++++++++++
 drivers/rtc/Kconfig         |    2 +-
 2 files changed, 20 insertions(+), 1 deletion(-)

--- 3.4-rc7/arch/x86/platform/efi/efi.c
+++ 3.4-rc7-EFI-RTC-platform-dev/arch/x86/platform/efi/efi.c
@@ -34,6 +34,7 @@
 #include <linux/export.h>
 #include <linux/bootmem.h>
 #include <linux/memblock.h>
+#include <linux/platform_device.h>
 #include <linux/spinlock.h>
 #include <linux/uaccess.h>
 #include <linux/time.h>
@@ -912,6 +913,24 @@ out:
 	kfree(new_memmap);
 }
 
+static struct platform_device rtc_efi_dev = {
+	.name = "rtc-efi",
+	.id = -1,
+};
+
+static int __init rtc_init(void)
+{
+	if (!efi_enabled)
+		return -ENODEV;
+
+	if (platform_device_register(&rtc_efi_dev) < 0)
+		printk(KERN_ERR "unable to register EFI RTC device...\n");
+
+	/* not necessarily an error */
+	return 0;
+}
+arch_initcall(rtc_init);
+
 /*
  * Convenience functions to obtain memory types and attributes
  */
--- 3.4-rc7/drivers/rtc/Kconfig
+++ 3.4-rc7-EFI-RTC-platform-dev/drivers/rtc/Kconfig
@@ -563,7 +563,7 @@ config RTC_DRV_DA9052
 
 config RTC_DRV_EFI
 	tristate "EFI RTC"
-	depends on IA64
+	depends on EFI
 	help
 	  If you say yes here you will get support for the EFI
 	  Real Time Clock.



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ