From: Steven Rostedt <rostedt@goodmis.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Andrew Morton <akpm@osdl.org>, Joseph Fannin <jfannin@gmail.com>,
linux-kernel@vger.kernel.org, arjan@infradead.org,
John Stultz <johnstul@us.ibm.com>,
Chase Venters <chase.venters@clientec.com>
Subject: [PATCH] remove unnecessary barrier in rtc_get_rtc_time
Date: Thu, 13 Jul 2006 23:57:53 -0400 [thread overview]
Message-ID: <1152849473.1883.19.camel@localhost.localdomain> (raw)
In-Reply-To: <20060711074541.GA5263@elte.hu>
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
next prev parent reply other threads:[~2006-07-14 3:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-09 5:05 [LOCKDEP] 2.6.18-rc1: inconsistent {hardirq-on-W} -> {in-hardirq-W} usage Joseph Fannin
2006-07-09 6:25 ` Andrew Morton
2006-07-09 7:45 ` Ingo Molnar
2006-07-11 5:11 ` Joseph Fannin
2006-07-11 7:45 ` [patch] lockdep: HPET/RTC fix Ingo Molnar
2006-07-14 3:57 ` Steven Rostedt [this message]
2006-08-05 21:59 ` Joseph Fannin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1152849473.1883.19.camel@localhost.localdomain \
--to=rostedt@goodmis.org \
--cc=akpm@osdl.org \
--cc=arjan@infradead.org \
--cc=chase.venters@clientec.com \
--cc=jfannin@gmail.com \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox