* [PATCH] rtc: add x86 support for rtc-efi
@ 2009-04-06 17:49 Brian Maly
2009-04-06 19:31 ` dann frazier
` (2 more replies)
0 siblings, 3 replies; 15+ messages in thread
From: Brian Maly @ 2009-04-06 17:49 UTC (permalink / raw)
To: linux-kernel, akpm; +Cc: dannf, ying.huang
[-- Attachment #1: Type: text/plain, Size: 581 bytes --]
This patch adds support for rtc-efi (RTC Class Driver for EFI-based
systems) to x86.
This patch is based on dann frazier patch [add rtc platform driver for
EFI -> http://lkml.org/lkml/2009/1/8/434], and also depends on dann's
patch. Dann's patch was in the mm tree, though I think its been merged
already.
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@redhat.com>
[-- Attachment #2: 2.6.29-add-x86-support-for-efi-rtc.patch --]
[-- Type: text/x-patch, Size: 1974 bytes --]
--- a/drivers/rtc/Kconfig 2009-03-28 04:25:33.000000000 -0400
+++ b/drivers/rtc/Kconfig 2009-03-26 12:53:59.000000000 -0400
@@ -442,7 +442,7 @@ config RTC_DRV_DS1742
config RTC_DRV_EFI
tristate "EFI RTC"
- depends on IA64
+ depends on IA64 || (X86 && EFI) || (X86_64 && EFI)
help
If you say yes here you will get support for the EFI
Real Time Clock.
--- a/arch/x86/kernel/time_32.c 2009-03-12 22:39:28.000000000 -0400
+++ b/arch/x86/kernel/time_32.c 2009-03-27 12:08:58.000000000 -0400
@@ -32,6 +32,7 @@
#include <linux/interrupt.h>
#include <linux/time.h>
#include <linux/mca.h>
+#include <linux/platform_device.h>
#include <asm/arch_hooks.h>
#include <asm/hpet.h>
@@ -135,3 +136,24 @@ void __init time_init(void)
tsc_init();
late_time_init = choose_time_init();
}
+
+#ifdef CONFIG_EFI
+extern int efi_enabled;
+
+static struct platform_device rtc_efi_dev = {
+ .name = "rtc-efi",
+ .id = -1,
+};
+
+static int __init rtc_init(void)
+{
+ if (efi_enabled) {
+ 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
+
--- a/arch/x86/kernel/time_64.c 2009-03-12 22:39:28.000000000 -0400
+++ b/arch/x86/kernel/time_64.c 2009-03-27 12:09:39.000000000 -0400
@@ -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>
@@ -135,3 +136,24 @@ void __init time_init(void)
late_time_init = choose_time_init();
}
+
+#ifdef CONFIG_EFI
+extern int efi_enabled;
+
+static struct platform_device rtc_efi_dev = {
+ .name = "rtc-efi",
+ .id = -1,
+};
+
+static int __init rtc_init(void)
+{
+ if (efi_enabled) {
+ 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
+
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] rtc: add x86 support for rtc-efi
2009-04-06 17:49 [PATCH] rtc: add x86 support for rtc-efi Brian Maly
@ 2009-04-06 19:31 ` dann frazier
2009-04-06 22:26 ` H. Peter Anvin
2009-04-10 1:08 ` Huang Ying
2 siblings, 0 replies; 15+ messages in thread
From: dann frazier @ 2009-04-06 19:31 UTC (permalink / raw)
To: Brian Maly; +Cc: linux-kernel, akpm, ying.huang, rtc-linux
[Adding rtc list to the CC]
On Mon, Apr 06, 2009 at 01:49:45PM -0400, Brian Maly wrote:
> This patch adds support for rtc-efi (RTC Class Driver for EFI-based
> systems) to x86.
>
> This patch is based on dann frazier patch [add rtc platform driver for
> EFI -> http://lkml.org/lkml/2009/1/8/434], and also depends on dann's
> patch. Dann's patch was in the mm tree, though I think its been merged
> already.
>
> 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@redhat.com>
hey Brian,
Thanks for working on this. You might want to resubmit with the patch
inlined instead of as an attachment to make it easier to review.
--
dann frazier
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] rtc: add x86 support for rtc-efi
2009-04-06 17:49 [PATCH] rtc: add x86 support for rtc-efi Brian Maly
2009-04-06 19:31 ` dann frazier
@ 2009-04-06 22:26 ` H. Peter Anvin
2009-04-06 22:55 ` Brian Maly
2009-04-10 1:08 ` Huang Ying
2 siblings, 1 reply; 15+ messages in thread
From: H. Peter Anvin @ 2009-04-06 22:26 UTC (permalink / raw)
To: Brian Maly; +Cc: linux-kernel, akpm, dannf, ying.huang
Brian Maly wrote:
> This patch adds support for rtc-efi (RTC Class Driver for EFI-based
> systems) to x86.
>
> This patch is based on dann frazier patch [add rtc platform driver for
> EFI -> http://lkml.org/lkml/2009/1/8/434], and also depends on dann's
> patch. Dann's patch was in the mm tree, though I think its been merged
> already.
>
> 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@redhat.com>
>
>
>
>
- depends on IA64
+ depends on IA64 || (X86 && EFI) || (X86_64 && EFI)
"depends on EFI"?
-hpa
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] rtc: add x86 support for rtc-efi
2009-04-06 22:26 ` H. Peter Anvin
@ 2009-04-06 22:55 ` Brian Maly
2009-04-08 16:23 ` dann frazier
2009-04-09 23:18 ` Andrew Morton
0 siblings, 2 replies; 15+ messages in thread
From: Brian Maly @ 2009-04-06 22:55 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: linux-kernel, akpm, dannf, ying.huang
[-- Attachment #1: Type: text/plain, Size: 2130 bytes --]
re-post of the patch, both as inline and as an attachment (which
hopefully wont cause confusion).
--- a/drivers/rtc/Kconfig 2009-03-26 12:39:59.000000000 -0400
+++ b/drivers/rtc/Kconfig 2009-04-06 18:46:58.000000000 -0400
@@ -442,7 +442,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.
--- a/arch/x86/kernel/time_32.c 2009-03-12 22:39:28.000000000 -0400
+++ b/arch/x86/kernel/time_32.c 2009-03-26 13:06:10.000000000 -0400
@@ -32,6 +32,7 @@
#include <linux/interrupt.h>
#include <linux/time.h>
#include <linux/mca.h>
+#include <linux/platform_device.h>
#include <asm/arch_hooks.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
--- a/arch/x86/kernel/time_64.c 2009-03-12 22:39:28.000000000 -0400
+++ b/arch/x86/kernel/time_64.c 2009-03-26 13:06:19.000000000 -0400
@@ -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>
@@ -135,3 +136,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
--------------------------------------------------------------------------------------------
[-- Attachment #2: 2.6.29-add-x86-support-for-efi-rtc.patch --]
[-- Type: text/x-patch, Size: 1848 bytes --]
--- a/drivers/rtc/Kconfig 2009-03-26 12:39:59.000000000 -0400
+++ b/drivers/rtc/Kconfig 2009-04-06 18:46:58.000000000 -0400
@@ -442,7 +442,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.
--- a/arch/x86/kernel/time_32.c 2009-03-12 22:39:28.000000000 -0400
+++ b/arch/x86/kernel/time_32.c 2009-03-26 13:06:10.000000000 -0400
@@ -32,6 +32,7 @@
#include <linux/interrupt.h>
#include <linux/time.h>
#include <linux/mca.h>
+#include <linux/platform_device.h>
#include <asm/arch_hooks.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
--- a/arch/x86/kernel/time_64.c 2009-03-12 22:39:28.000000000 -0400
+++ b/arch/x86/kernel/time_64.c 2009-03-26 13:06:19.000000000 -0400
@@ -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>
@@ -135,3 +136,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
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] rtc: add x86 support for rtc-efi
2009-04-06 22:55 ` Brian Maly
@ 2009-04-08 16:23 ` dann frazier
2009-04-09 23:18 ` Andrew Morton
1 sibling, 0 replies; 15+ messages in thread
From: dann frazier @ 2009-04-08 16:23 UTC (permalink / raw)
To: Brian Maly; +Cc: H. Peter Anvin, linux-kernel, akpm, ying.huang
Acked-by: dann frazier <dannf@hp.com>
On Mon, Apr 06, 2009 at 06:55:49PM -0400, Brian Maly wrote:
> re-post of the patch, both as inline and as an attachment (which
> hopefully wont cause confusion).
>
>
> --- a/drivers/rtc/Kconfig 2009-03-26 12:39:59.000000000 -0400
> +++ b/drivers/rtc/Kconfig 2009-04-06 18:46:58.000000000 -0400
> @@ -442,7 +442,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.
> --- a/arch/x86/kernel/time_32.c 2009-03-12 22:39:28.000000000 -0400
> +++ b/arch/x86/kernel/time_32.c 2009-03-26 13:06:10.000000000 -0400
> @@ -32,6 +32,7 @@
> #include <linux/interrupt.h>
> #include <linux/time.h>
> #include <linux/mca.h>
> +#include <linux/platform_device.h>
>
> #include <asm/arch_hooks.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
> --- a/arch/x86/kernel/time_64.c 2009-03-12 22:39:28.000000000 -0400
> +++ b/arch/x86/kernel/time_64.c 2009-03-26 13:06:19.000000000 -0400
> @@ -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>
> @@ -135,3 +136,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
>
> --------------------------------------------------------------------------------------------
>
--
dann frazier
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] rtc: add x86 support for rtc-efi
2009-04-06 22:55 ` Brian Maly
2009-04-08 16:23 ` dann frazier
@ 2009-04-09 23:18 ` Andrew Morton
2009-04-10 13:51 ` Ingo Molnar
1 sibling, 1 reply; 15+ messages in thread
From: Andrew Morton @ 2009-04-09 23:18 UTC (permalink / raw)
To: Brian Maly; +Cc: h.peter.anvin, linux-kernel, dannf, ying.huang, Ingo Molnar
On Mon, 06 Apr 2009 18:55:49 -0400
Brian Maly <bmaly@redhat.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@redhat.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@redhat.com>
Acked-by: dann frazier <dannf@hp.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-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.
_
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] rtc: add x86 support for rtc-efi
2009-04-06 17:49 [PATCH] rtc: add x86 support for rtc-efi Brian Maly
2009-04-06 19:31 ` dann frazier
2009-04-06 22:26 ` H. Peter Anvin
@ 2009-04-10 1:08 ` Huang Ying
2 siblings, 0 replies; 15+ messages in thread
From: Huang Ying @ 2009-04-10 1:08 UTC (permalink / raw)
To: Brian Maly; +Cc: linux-kernel, akpm, dannf
[-- Attachment #1: Type: text/plain, Size: 1096 bytes --]
Hi, Brian,
Sorry for late.
1. Why not put these code into arch/x86/kernel/rtc.c? I think that is
more approriate.
2. It seems that you use both CMOS RTC and EFI RTC. In code path of
read_persistent_clock() and update_persistent_clock(), CMOS RTC is used
for x86_64. I think you should change that too. I have tried to do that
in http://lkml.org/lkml/2007/8/13/602.
Best Regards,
Huang Ying
On Tue, 2009-04-07 at 01:49 +0800, Brian Maly wrote:
> This patch adds support for rtc-efi (RTC Class Driver for EFI-based
> systems) to x86.
>
> This patch is based on dann frazier patch [add rtc platform driver for
> EFI -> http://lkml.org/lkml/2009/1/8/434], and also depends on dann's
> patch. Dann's patch was in the mm tree, though I think its been merged
> already.
>
> 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@redhat.com>
>
>
>
>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] rtc: add x86 support for rtc-efi
2009-04-09 23:18 ` Andrew Morton
@ 2009-04-10 13:51 ` Ingo Molnar
2009-04-20 17:15 ` Brian Maly
0 siblings, 1 reply; 15+ messages in thread
From: Ingo Molnar @ 2009-04-10 13:51 UTC (permalink / raw)
To: Andrew Morton; +Cc: Brian Maly, h.peter.anvin, linux-kernel, dannf, ying.huang
* Andrew Morton <akpm@linux-foundation.org> wrote:
> On Mon, 06 Apr 2009 18:55:49 -0400
> Brian Maly <bmaly@redhat.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@redhat.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@redhat.com>
> Acked-by: dann frazier <dannf@hp.com>
> Cc: Alessandro Zummo <a.zummo@towertech.it>
> Cc: David Brownell <david-b@pacbell.net>
> Cc: Ingo Molnar <mingo@elte.hu>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Signed-off-by: Andrew Morton <akpm@linux-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(-)
Hm, it would be nice to first unify the relevant bits of
arch/x86/kernel/time_{32|64}.c into arch/x86/kernel/time.c, and then
we can apply such patches without duplicative effects.
Ingo
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] rtc: add x86 support for rtc-efi
2009-04-10 13:51 ` Ingo Molnar
@ 2009-04-20 17:15 ` Brian Maly
2009-04-20 17:20 ` Ingo Molnar
0 siblings, 1 reply; 15+ messages in thread
From: Brian Maly @ 2009-04-20 17:15 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Andrew Morton, h.peter.anvin, linux-kernel, dannf, ying.huang
>Hm, it would be nice to first unify the relevant bits of
>arch/x86/kernel/time_{32|64}.c into arch/x86/kernel/time.c, and then
>we can apply such patches without duplicative effects.
> Ingo
Ingo,
Are you OK with consolidating this into arch/x86/kernel/rtc.c as Huang
Ying had suggested? This seems like the most logical place for the
rtc-efi init to happen, but your suggestion to consolidate this into
arch/x86/kernel.time.c may have advantages that I am not aware of.
Anyway, I would appreciate any insight/opinions on this if you have any.
Thanks.
Brian
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] rtc: add x86 support for rtc-efi
2009-04-20 17:15 ` Brian Maly
@ 2009-04-20 17:20 ` Ingo Molnar
2009-04-20 18:21 ` H. Peter Anvin
0 siblings, 1 reply; 15+ messages in thread
From: Ingo Molnar @ 2009-04-20 17:20 UTC (permalink / raw)
To: Brian Maly; +Cc: Andrew Morton, h.peter.anvin, linux-kernel, dannf, ying.huang
* Brian Maly <bmaly@redhat.com> wrote:
>> Hm, it would be nice to first unify the relevant bits of
>> arch/x86/kernel/time_{32|64}.c into arch/x86/kernel/time.c, and
>> then we can apply such patches without duplicative effects.
>
> Ingo,
>
> Are you OK with consolidating this into arch/x86/kernel/rtc.c as
> Huang Ying had suggested? This seems like the most logical place
> for the rtc-efi init to happen, but your suggestion to consolidate
> this into arch/x86/kernel.time.c may have advantages that I am not
> aware of. Anyway, I would appreciate any insight/opinions on this
> if you have any. Thanks.
Yes, that indeed sounds like an even better place for it.
Thanks,
Ingo
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] rtc: add x86 support for rtc-efi
2009-04-20 17:20 ` Ingo Molnar
@ 2009-04-20 18:21 ` H. Peter Anvin
2009-05-19 20:10 ` Brian Maly
2009-05-25 5:49 ` Huang Ying
0 siblings, 2 replies; 15+ messages in thread
From: H. Peter Anvin @ 2009-04-20 18:21 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Brian Maly, Andrew Morton, linux-kernel, dannf, Huang, Ying
Ingo Molnar wrote:
> * Brian Maly <bmaly@redhat.com> wrote:
>
>>> Hm, it would be nice to first unify the relevant bits of
>>> arch/x86/kernel/time_{32|64}.c into arch/x86/kernel/time.c, and
>>> then we can apply such patches without duplicative effects.
>> Ingo,
>>
>> Are you OK with consolidating this into arch/x86/kernel/rtc.c as
>> Huang Ying had suggested? This seems like the most logical place
>> for the rtc-efi init to happen, but your suggestion to consolidate
>> this into arch/x86/kernel.time.c may have advantages that I am not
>> aware of. Anyway, I would appreciate any insight/opinions on this
>> if you have any. Thanks.
>
> Yes, that indeed sounds like an even better place for it.
>
Furthermore, the EFI RTC code probably should be in its own file.
In fact, arch/x86/kernel really could use more subdirectories; at least
the EFI and UV-specific code should be be moved out.
-hpa
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] rtc: add x86 support for rtc-efi
2009-04-20 18:21 ` H. Peter Anvin
@ 2009-05-19 20:10 ` Brian Maly
2009-05-25 5:49 ` Huang Ying
1 sibling, 0 replies; 15+ messages in thread
From: Brian Maly @ 2009-05-19 20:10 UTC (permalink / raw)
To: H. Peter Anvin
Cc: Ingo Molnar, Andrew Morton, linux-kernel, dannf, Huang, Ying
H. Peter Anvin wrote:
> Ingo Molnar wrote:
>> * Brian Maly <bmaly@redhat.com> wrote:
>>
>>>> Hm, it would be nice to first unify the relevant bits of
>>>> arch/x86/kernel/time_{32|64}.c into arch/x86/kernel/time.c, and
>>>> then we can apply such patches without duplicative effects.
>>> Ingo,
>>>
>>> Are you OK with consolidating this into arch/x86/kernel/rtc.c as
>>> Huang Ying had suggested? This seems like the most logical place for
>>> the rtc-efi init to happen, but your suggestion to consolidate this
>>> into arch/x86/kernel.time.c may have advantages that I am not aware
>>> of. Anyway, I would appreciate any insight/opinions on this if you
>>> have any. Thanks.
>>
>> Yes, that indeed sounds like an even better place for it.
>>
>
> Furthermore, the EFI RTC code probably should be in its own file.
>
> In fact, arch/x86/kernel really could use more subdirectories; at
> least the EFI and UV-specific code should be be moved out.
>
> -hpa
>
Peter,
How do you think this should be restructured (ideally)?
Maybe create a sub-directory (arch/x86/kernel/rtc) and in this
sub-directory split the existing rtc.c code into:
(1) rtc.c for common code used by all RTC,
(2) efi_rtc.c for EFI specific code
(3) cmos_rtc.c for cmos/legacy specific code
Anyone have any objections/concerns with this or perhaps have a better way?
Brian
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] rtc: add x86 support for rtc-efi
2009-04-20 18:21 ` H. Peter Anvin
2009-05-19 20:10 ` Brian Maly
@ 2009-05-25 5:49 ` Huang Ying
2009-05-25 16:28 ` H. Peter Anvin
1 sibling, 1 reply; 15+ messages in thread
From: Huang Ying @ 2009-05-25 5:49 UTC (permalink / raw)
To: Anvin, H Peter
Cc: Ingo Molnar, Brian Maly, Andrew Morton, linux-kernel, dannf
On Tue, 2009-04-21 at 02:21 +0800, Anvin, H Peter wrote:
> Ingo Molnar wrote:
> > * Brian Maly <bmaly@redhat.com> wrote:
> >
> >>> Hm, it would be nice to first unify the relevant bits of
> >>> arch/x86/kernel/time_{32|64}.c into arch/x86/kernel/time.c, and
> >>> then we can apply such patches without duplicative effects.
> >> Ingo,
> >>
> >> Are you OK with consolidating this into arch/x86/kernel/rtc.c as
> >> Huang Ying had suggested? This seems like the most logical place
> >> for the rtc-efi init to happen, but your suggestion to consolidate
> >> this into arch/x86/kernel.time.c may have advantages that I am not
> >> aware of. Anyway, I would appreciate any insight/opinions on this
> >> if you have any. Thanks.
> >
> > Yes, that indeed sounds like an even better place for it.
> >
>
> Furthermore, the EFI RTC code probably should be in its own file.
>
> In fact, arch/x86/kernel really could use more subdirectories; at least
> the EFI and UV-specific code should be be moved out.
Or, do you think it is appropriate to re-organize EFI related code into
a sub-architecture?
Best Regards,
Huang Ying
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] rtc: add x86 support for rtc-efi
2009-05-25 5:49 ` Huang Ying
@ 2009-05-25 16:28 ` H. Peter Anvin
2009-05-27 23:21 ` Ingo Molnar
0 siblings, 1 reply; 15+ messages in thread
From: H. Peter Anvin @ 2009-05-25 16:28 UTC (permalink / raw)
To: Huang, Ying; +Cc: Ingo Molnar, Brian Maly, Andrew Morton, linux-kernel, dannf
Huang, Ying wrote:
> On Tue, 2009-04-21 at 02:21 +0800, Anvin, H Peter wrote:
>> Ingo Molnar wrote:
>>> * Brian Maly <bmaly@redhat.com> wrote:
>>>
>>>>> Hm, it would be nice to first unify the relevant bits of
>>>>> arch/x86/kernel/time_{32|64}.c into arch/x86/kernel/time.c, and
>>>>> then we can apply such patches without duplicative effects.
>>>> Ingo,
>>>>
>>>> Are you OK with consolidating this into arch/x86/kernel/rtc.c as
>>>> Huang Ying had suggested? This seems like the most logical place
>>>> for the rtc-efi init to happen, but your suggestion to consolidate
>>>> this into arch/x86/kernel.time.c may have advantages that I am not
>>>> aware of. Anyway, I would appreciate any insight/opinions on this
>>>> if you have any. Thanks.
>>> Yes, that indeed sounds like an even better place for it.
>>>
>> Furthermore, the EFI RTC code probably should be in its own file.
>>
>> In fact, arch/x86/kernel really could use more subdirectories; at least
>> the EFI and UV-specific code should be be moved out.
>
> Or, do you think it is appropriate to re-organize EFI related code into
> a sub-architecture?
>
No, we're been trying to get rid of subarchitectures in the x86 kernel.
The reason is that the notion of subarchitectures matches reality in
x86-land poorly. Most variants of x86 share considerable code: UV has
EFI, PC has EFI or BIOS, Voyager has BIOS and a standard RTC, and so on.
-hpa
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] rtc: add x86 support for rtc-efi
2009-05-25 16:28 ` H. Peter Anvin
@ 2009-05-27 23:21 ` Ingo Molnar
0 siblings, 0 replies; 15+ messages in thread
From: Ingo Molnar @ 2009-05-27 23:21 UTC (permalink / raw)
To: H. Peter Anvin
Cc: Huang, Ying, Brian Maly, Andrew Morton, linux-kernel, dannf
* H. Peter Anvin <h.peter.anvin@intel.com> wrote:
> Huang, Ying wrote:
>> On Tue, 2009-04-21 at 02:21 +0800, Anvin, H Peter wrote:
>>> Ingo Molnar wrote:
>>>> * Brian Maly <bmaly@redhat.com> wrote:
>>>>
>>>>>> Hm, it would be nice to first unify the relevant bits of
>>>>>> arch/x86/kernel/time_{32|64}.c into arch/x86/kernel/time.c, and
>>>>>> then we can apply such patches without duplicative effects.
>>>>> Ingo,
>>>>>
>>>>> Are you OK with consolidating this into arch/x86/kernel/rtc.c as
>>>>> Huang Ying had suggested? This seems like the most logical place
>>>>> for the rtc-efi init to happen, but your suggestion to
>>>>> consolidate this into arch/x86/kernel.time.c may have advantages
>>>>> that I am not aware of. Anyway, I would appreciate any
>>>>> insight/opinions on this if you have any. Thanks.
>>>> Yes, that indeed sounds like an even better place for it.
>>>>
>>> Furthermore, the EFI RTC code probably should be in its own file.
>>>
>>> In fact, arch/x86/kernel really could use more subdirectories; at
>>> least the EFI and UV-specific code should be be moved out.
>>
>> Or, do you think it is appropriate to re-organize EFI related code into
>> a sub-architecture?
>>
>
> No, we're been trying to get rid of subarchitectures in the x86
> kernel. The reason is that the notion of subarchitectures matches
> reality in x86-land poorly. Most variants of x86 share
> considerable code: UV has EFI, PC has EFI or BIOS, Voyager has
> BIOS and a standard RTC, and so on.
Yeah - we essentially got rid of the ex subarchitecture code in
2.6.30. We still have config options that turn on various sorts of
behavior - but most of them are runtime. We definitely dont want to
reintroduce anything subarchitecture-ish.
Ingo
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2009-05-27 23:22 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-06 17:49 [PATCH] rtc: add x86 support for rtc-efi Brian Maly
2009-04-06 19:31 ` dann frazier
2009-04-06 22:26 ` H. Peter Anvin
2009-04-06 22:55 ` Brian Maly
2009-04-08 16:23 ` dann frazier
2009-04-09 23:18 ` Andrew Morton
2009-04-10 13:51 ` Ingo Molnar
2009-04-20 17:15 ` Brian Maly
2009-04-20 17:20 ` Ingo Molnar
2009-04-20 18:21 ` H. Peter Anvin
2009-05-19 20:10 ` Brian Maly
2009-05-25 5:49 ` Huang Ying
2009-05-25 16:28 ` H. Peter Anvin
2009-05-27 23:21 ` Ingo Molnar
2009-04-10 1:08 ` Huang Ying
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).