make HPET_RTC_IRQ track HPET_EMULATE_RTC
PATCH 1/1 make HPET_RTC_IRQ track HPET_EMULATE_RTC
From: David Brownell <[email protected]>
More Kconfig tweaks related to the legacy PC RTC code:
- Describe the legacy PC RTC driver as such ... it's never quite been clear that this driver is for PC RTCs, and now it's fair to call this the "legacy" driver.
- Force it to understand about HPET stealing its IRQs ... kernel code does this always when HPET is in use, there should be no option for users to goof up the config.
This seems to fix kernel bugzilla #10729.
--- drivers/char/Kconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/char/Kconfig +4 -4
@@ -749,7 +749,7 @@ config NVRAM if RTC_LIB=n config RTC - tristate "Enhanced Real Time Clock Support" + tristate "Enhanced Real Time Clock Support (legacy PC RTC driver)" depends on !PPC && !PARISC && !IA64 && !M68K && !SPARC && !FRV \ && !ARM && !SUPERH && !S390 && !AVR32 ---help---
@@ -1036,9 +1036,9 @@ config HPET non-periodic and/or periodic. config HPET_RTC_IRQ - bool "HPET Control RTC IRQ" if !HPET_EMULATE_RTC - default n - depends on HPET + bool + default HPET_EMULATE_RTC + depends on RTC && HPET help If you say Y here, you will disable RTC_IRQ in drivers/char/rtc.c. It is assumed the platform called hpet_alloc with the RTC IRQ values for
Quoted 4 lines · On Friday, 6 June 2008 08:41:44 David Brownell wrote:
From: David Brownell <[email protected]>
More
Kconfigtweaks related to the legacy PC RTC code:
Hi,
Remember long ago I had a discussion with you about HPET that steals RTC irq in 'legacy replacement' mode, and rtc driver thus implements rtc on 'top' of hpet.
New rtc-cmos driver doesn't do this emulation, thus it isn't compatible with hpet driver.
But there is a solution, I didn't agree with firstly, but then I did, and I do agree now, and that to put hpet in normal mode.
What happened with patches that put hpet in normal independent mode?
Best regards,
Maxim Levitsky
Quoted 6 lines · Maxim Levitsky
Remember long ago I had a discussion with you about HPET that steals RTC irq in 'legacy replacement' mode, and rtc driver thus implements rtc on 'top' of hpet.
New rtc-cmos driver doesn't do this emulation, thus it isn't compatible with hpet driver.
That was fixed in 9d8af78b07976d4d84e0df491abd4e9db848d0ad (February) by Bernhard Walle <[email protected]> ... if you look at the bug report associated with this patch, you'll see that rtc-cmos was working OK with HPET, it's just the legacy RTC driver which got confused after the recent updates to clock handling.
Quoted 4 lines
But there is a solution, I didn't agree with firstly, but then I did, and I do agree now, and that to put hpet in normal mode.
What happened with patches that put hpet in normal independent mode?
The story from either Ingo or Thomas (I forget who) was that this is another case where we have to cope with BIOS braindamage. Not enough BIOS vendors expose the relevant IRQ routing that Linux could default to using HPET in what I'd call "sane" mode.
Now, that still kind of implies there could be an option to use sane HPET IRQ configuration (doesn't hijack RTC and other IRQs, and there could be a per-CPU HPET) on at least the systems where that IRQ routing is available. Over time I'd hope that systems like that could become the common case. But ... someone else would have to do that work. :)
- Dave
Quoted 26 lines · David Brownell
Quoted 6 lines · Maxim Levitsky
Remember long ago I had a discussion with you about HPET that steals RTC irq in 'legacy replacement' mode, and rtc driver thus implements rtc on 'top' of hpet.
New rtc-cmos driver doesn't do this emulation, thus it isn't compatible with hpet driver.
That was fixed in
9d8af78b07976d4d84e0df491abd4e9db848d0ad(February) by Bernhard Walle <[email protected]> ... if you look at the bug report associated with this patch, you'll see that rtc-cmos was working OK with HPET, it's just the legacy RTC driver which got confused after the recent updates to clock handling.Quoted 4 lines
But there is a solution, I didn't agree with firstly, but then I did, and I do agree now, and that to put hpet in normal mode.
What happened with patches that put hpet in normal independent mode?
The story from either Ingo or Thomas (I forget who) was that this is another case where we have to cope with BIOS braindamage. Not enough BIOS vendors expose the relevant IRQ routing that Linux could default to using HPET in what I'd call "sane" mode.
Quoted 7 lines
Now, that still kind of implies there could be an option to use sane HPET IRQ configuration (doesn't hijack RTC and other IRQs, and there could be a per-CPU HPET) on at least the systems where that IRQ routing is available. Over time I'd hope that systems like that could become the common case. But ... someone else would have to do that work. :)
- Dave
Thanks a lot, next time I compile the kernel, I will enable hpet
Best regards,
Maxim Levitsky
PS:
This is a question to ubuntu devs, I need to ask them, when they will switch to new rtc driver....
Old driver has some bugs, including no support for suspend/resume, some
troubles with alarm (it sets the alarm when writing to /proc/acpi/alarm, but it can be cleared by even just reading the time. New driver correctly sets the alarm at actual suspend time) Even hpet emulation has some bugs, I even wrote some patches to fix this
and add suspend/resume, but I guess that newer driver is way better, so no need to fix old one.
Quoted 11 lines · On Thu, 5 Jun 2008 22:41:44 -0700 David Brownell <[email protected]> wrote:
More
Kconfigtweaks related to the legacy PC RTC code:- Describe the legacy PC RTC driver as such ... it's never quite been clear that this driver is for PC RTCs, and now it's fair to call this the "legacy" driver.
- Force it to understand about HPET stealing its IRQs ... kernel code does this always when HPET is in use, there should be no option for users to goof up the config.
This seems to fix kernel bugzilla #10729.
hm. "seems" is a bit soft.
Do you think this should be in 2.6.26?
Quoted 8 lines · Andrew Morton
Quoted 6 lines · On Thu, 5 Jun 2008 22:41:44 -0700 David Brownell <[email protected]> wrote:
More
Kconfigtweaks related to the legacy PC RTC code:- Describe the legacy PC RTC driver as such ... it's never quite been clear that this driver is for PC RTCs, and now it's fair to call this the "legacy" driver.
Quoted 7 lines
Quoted 5 lines
- Force it to understand about HPET stealing its IRQs ... kernel code does this always when HPET is in use, there should be no option for users to goof up the config.
This seems to fix kernel bugzilla #10729.
hm. "seems" is a bit soft.
Fixes it for one reporter. Another reporter has yet to respond.
Quoted 1 line
Do you think this should be in 2.6.26?
Yes, unless someone more involved in the HPET stuff has a better solution. (Or that legacy RTC gets a maintainer, who disagrees...)
This does seem to suggest that we have an extra Kconfig variable here, by the way.
- dave