diff mbox

[1/2] clocksource: dbx500-prcmu: use relaxed readl variant

Message ID 1358770172-30125-1-git-send-email-fabio.baltieri@linaro.org (mailing list archive)
State New, archived
Headers show

Commit Message

Fabio Baltieri Jan. 21, 2013, 12:09 p.m. UTC
From: Rabin Vincent <rabin.vincent@stericsson.com>

Modify clksrc_dbx500_prcmu_read to replace readl() with readl_relaxed().
This speeds up calls to the function by about 40%.

Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
---
 drivers/clocksource/clksrc-dbx500-prcmu.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Comments

Fabio Baltieri Jan. 21, 2013, 12:22 p.m. UTC | #1
On Mon, Jan 21, 2013 at 01:09:31PM +0100, Fabio Baltieri wrote:
> From: Rabin Vincent <rabin.vincent@stericsson.com>
> 
> Modify clksrc_dbx500_prcmu_read to replace readl() with readl_relaxed().
> This speeds up calls to the function by about 40%.

Hello John,

these two patches may go in the existing ux500 clksrc branch
together with the nomadik-mtu's patches queued up some time ago.

Can I have your Acked-by for that?

Thanks,
Fabio
Linus Walleij Jan. 23, 2013, 10:16 a.m. UTC | #2
On Mon, Jan 21, 2013 at 1:22 PM, Fabio Baltieri
<fabio.baltieri@linaro.org> wrote:
> On Mon, Jan 21, 2013 at 01:09:31PM +0100, Fabio Baltieri wrote:
>> From: Rabin Vincent <rabin.vincent@stericsson.com>
>>
>> Modify clksrc_dbx500_prcmu_read to replace readl() with readl_relaxed().
>> This speeds up calls to the function by about 40%.
>
> Hello John,
>
> these two patches may go in the existing ux500 clksrc branch
> together with the nomadik-mtu's patches queued up some time ago.
>
> Can I have your Acked-by for that?

Actually now when I look at it these changes are fully orthogonal
to the other stuff, so these two should just go in through John's
timer tree as usual.

John?

Yours,
Linus Walleij
Fabio Baltieri Feb. 7, 2013, 9:04 a.m. UTC | #3
On Wed, Jan 23, 2013 at 11:16:19AM +0100, Linus Walleij wrote:
> On Mon, Jan 21, 2013 at 1:22 PM, Fabio Baltieri
> <fabio.baltieri@linaro.org> wrote:
> > On Mon, Jan 21, 2013 at 01:09:31PM +0100, Fabio Baltieri wrote:
> >> From: Rabin Vincent <rabin.vincent@stericsson.com>
> >>
> >> Modify clksrc_dbx500_prcmu_read to replace readl() with readl_relaxed().
> >> This speeds up calls to the function by about 40%.
> >
> > Hello John,
> >
> > these two patches may go in the existing ux500 clksrc branch
> > together with the nomadik-mtu's patches queued up some time ago.
> >
> > Can I have your Acked-by for that?
> 
> Actually now when I look at it these changes are fully orthogonal
> to the other stuff, so these two should just go in through John's
> timer tree as usual.
> 
> John?

Hi John,

any feedback from this two patches?

Thanks,
Fabio
diff mbox

Patch

diff --git a/drivers/clocksource/clksrc-dbx500-prcmu.c b/drivers/clocksource/clksrc-dbx500-prcmu.c
index c26c369..159f54a 100644
--- a/drivers/clocksource/clksrc-dbx500-prcmu.c
+++ b/drivers/clocksource/clksrc-dbx500-prcmu.c
@@ -33,15 +33,14 @@ 
 
 static void __iomem *clksrc_dbx500_timer_base;
 
-static cycle_t clksrc_dbx500_prcmu_read(struct clocksource *cs)
+static cycle_t notrace clksrc_dbx500_prcmu_read(struct clocksource *cs)
 {
+	void __iomem *base = clksrc_dbx500_timer_base;
 	u32 count, count2;
 
 	do {
-		count = readl(clksrc_dbx500_timer_base +
-			      PRCMU_TIMER_DOWNCOUNT);
-		count2 = readl(clksrc_dbx500_timer_base +
-			       PRCMU_TIMER_DOWNCOUNT);
+		count = readl_relaxed(base + PRCMU_TIMER_DOWNCOUNT);
+		count2 = readl_relaxed(base + PRCMU_TIMER_DOWNCOUNT);
 	} while (count2 != count);
 
 	/* Negate because the timer is a decrementing counter */