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:	Thu, 9 Apr 2009 16:18:03 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Brian Maly <bmaly@...hat.com>
Cc:	h.peter.anvin@...el.com, linux-kernel@...r.kernel.org,
	dannf@...com, ying.huang@...el.com, Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH] rtc: add x86 support for rtc-efi

On Mon, 06 Apr 2009 18:55:49 -0400
Brian Maly <bmaly@...hat.com> wrote:

> re-post of the patch, both as inline and as an attachment (which 
> hopefully wont cause confusion).
> 

Normally it does confuse me horridly because I get two copies of the
same patch, which applies happily with `patch --dry-run', but dies
horridly with `patch --for-real'.  But I was warned...

In future, please include a full copy of the (possibly modified)
changelog with each iteration of a patch.

As this patch is mostly-x86 I tossed it onto my for-Ingo pile.


From: Brian Maly <bmaly@...hat.com>

Add support for rtc-efi (RTC Class Driver for EFI-based systems) to x86.

This patch has been tested and works perfectly on every x86 EFI system I
could find, though all have been EL64 systems.  I would appreciate any
testing feedback from EL32 systems from anyone that has one and can test.

Signed-off-by: Brian Maly <bmaly@...hat.com>
Acked-by: dann frazier <dannf@...com>
Cc: Alessandro Zummo <a.zummo@...ertech.it>
Cc: David Brownell <david-b@...bell.net>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: "H. Peter Anvin" <hpa@...or.com>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
---

 arch/x86/kernel/time_32.c |   19 +++++++++++++++++++
 arch/x86/kernel/time_64.c |   18 ++++++++++++++++++
 drivers/rtc/Kconfig       |    2 +-
 3 files changed, 38 insertions(+), 1 deletion(-)

diff -puN arch/x86/kernel/time_32.c~rtc-add-x86-support-for-rtc-efi arch/x86/kernel/time_32.c
--- a/arch/x86/kernel/time_32.c~rtc-add-x86-support-for-rtc-efi
+++ a/arch/x86/kernel/time_32.c
@@ -32,6 +32,7 @@
 #include <linux/interrupt.h>
 #include <linux/time.h>
 #include <linux/mca.h>
+#include <linux/platform_device.h>
 
 #include <asm/setup.h>
 #include <asm/hpet.h>
@@ -135,3 +136,21 @@ void __init time_init(void)
 	tsc_init();
 	late_time_init = choose_time_init();
 }
+
+
+#ifdef CONFIG_RTC_DRV_EFI
+static struct platform_device rtc_efi_dev = {
+	.name = "rtc-efi",
+	.id = -1,
+};
+
+static int __init rtc_init(void)
+{
+	if (platform_device_register(&rtc_efi_dev) < 0)
+		printk(KERN_ERR "unable to register rtc device...\n");
+
+	/* not necessarily an error */
+	return 0;
+}
+module_init(rtc_init);
+#endif
diff -puN arch/x86/kernel/time_64.c~rtc-add-x86-support-for-rtc-efi arch/x86/kernel/time_64.c
--- a/arch/x86/kernel/time_64.c~rtc-add-x86-support-for-rtc-efi
+++ a/arch/x86/kernel/time_64.c
@@ -18,6 +18,7 @@
 #include <linux/time.h>
 #include <linux/mca.h>
 #include <linux/nmi.h>
+#include <linux/platform_device.h>
 
 #include <asm/i8253.h>
 #include <asm/hpet.h>
@@ -133,3 +134,20 @@ void __init time_init(void)
 
 	late_time_init = choose_time_init();
 }
+
+#ifdef CONFIG_RTC_DRV_EFI
+static struct platform_device rtc_efi_dev = {
+	.name = "rtc-efi",
+	.id = -1,
+};
+
+static int __init rtc_init(void)
+{
+	if (platform_device_register(&rtc_efi_dev) < 0)
+		printk(KERN_ERR "unable to register rtc device...\n");
+
+	/* not necessarily an error */
+	return 0;
+}
+module_init(rtc_init);
+#endif
diff -puN drivers/rtc/Kconfig~rtc-add-x86-support-for-rtc-efi drivers/rtc/Kconfig
--- a/drivers/rtc/Kconfig~rtc-add-x86-support-for-rtc-efi
+++ a/drivers/rtc/Kconfig
@@ -455,7 +455,7 @@ config RTC_DRV_DS1742
 
 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