提交 520ddad4 编写于 作者: J Jisheng Zhang 提交者: Daniel Lezcano

clocksource/drivers/dw_apb_timer: Inline apbt_readl and apbt_writel

It seems gcc can automatically inline apbt_writel() for us, but
apbt_real isn't inlined. This patch makes them inline to get a trivial
performance improvement: 4096 rounds of __apbt_read_clocksource() call
spend time on Marvell BG4CT platform:

 before the patch 1275240ns on average
 after the patch 1263240ns on average

so we get 1% performance improvement.
Signed-off-by: NJisheng Zhang <jszhang@marvell.com>
Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
上级 39d3611f
......@@ -49,13 +49,13 @@ clocksource_to_dw_apb_clocksource(struct clocksource *cs)
return container_of(cs, struct dw_apb_clocksource, cs);
}
static u32 apbt_readl(struct dw_apb_timer *timer, unsigned long offs)
static inline u32 apbt_readl(struct dw_apb_timer *timer, unsigned long offs)
{
return readl(timer->base + offs);
}
static void apbt_writel(struct dw_apb_timer *timer, u32 val,
unsigned long offs)
static inline void apbt_writel(struct dw_apb_timer *timer, u32 val,
unsigned long offs)
{
writel(val, timer->base + offs);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部