Messages in this thread Patch in this message | | | Subject | [PATCH] remove unnecessary barrier in rtc_get_rtc_time | From | Steven Rostedt <> | Date | Thu, 13 Jul 2006 23:57:53 -0400 |
| |
On Tue, 2006-07-11 at 09:45 +0200, Ingo Molnar wrote:
> > ouch! That's another HPET bug i believe. AFAICS rtc_get_rtc_time() is > really not meant to be called from any sort of timer interrupt! In > particular this looping code: > > while (rtc_is_updating() != 0 && jiffies - uip_watchdog < 2*HZ/100) { > barrier(); > cpu_relax(); > }
Seeing this after reading the volatile thread and then Chase's patch:
([PATCH] Make cpu_relax() imply barrier() on all arches) http://marc.theaimsgroup.com/?l=linux-kernel&m=115237514517594&w=2
(yes I'm a bit behind in my LKML reading... 1663 messages to go)
There's no reason to have a barrier in this loop.
-- Steve
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Index: linux-2.6.18-rc1/drivers/char/rtc.c =================================================================== --- linux-2.6.18-rc1.orig/drivers/char/rtc.c 2006-07-13 23:40:58.000000000 -0400 +++ linux-2.6.18-rc1/drivers/char/rtc.c 2006-07-13 23:41:06.000000000 -0400 @@ -1238,10 +1238,8 @@ void rtc_get_rtc_time(struct rtc_time *r * Once the read clears, read the RTC time (again via ioctl). Easy. */ - while (rtc_is_updating() != 0 && jiffies - uip_watchdog < 2*HZ/100) { - barrier(); + while (rtc_is_updating() != 0 && jiffies - uip_watchdog < 2*HZ/100) cpu_relax(); - } /* * Only the values that we read from the RTC are set. We leave
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |