Skip to contentSkip to conversation

clocksource: timer-sun5i: Switch to sched_clock_register()

PATCH In review Stephen Boyd 4 participants 6 messages Jan 17, 2014 – Jan 19, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clocksource: timer-sun5i: Switch to sched_clock_register()

The 32 bit sched_clock interface supports 64 bits since 3.13-rc1. Upgrade to the 64 bit function to allow us to remove the 32 bit registration interface.

---

Cc'in Ingo because this is simple enough to probably just apply to timers/core

 drivers/clocksource/timer-sun5i.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clocksource/timer-sun5i.c +2 -2
index bddc52233d2a..deebcd6469fc 100644
@@ -136,7 +136,7 @@ static struct irqaction sun5i_timer_irq = {
 	.dev_id = &sun5i_clockevent,
 };
 
-static u32 sun5i_timer_sched_read(void)
+static u64 sun5i_timer_sched_read(void)
 {
 	return ~readl(timer_base + TIMER_CNTVAL_LO_REG(1));
 }
@@ -166,7 +166,7 @@ static void __init sun5i_timer_init(struct device_node *node)
 	writel(TIMER_CTL_ENABLE | TIMER_CTL_RELOAD,
 	       timer_base + TIMER_CTL_REG(1));
 
-	setup_sched_clock(sun5i_timer_sched_read, 32, rate);
+	sched_clock_register(sun5i_timer_sched_read, 32, rate);
 	clocksource_mmio_init(timer_base + TIMER_CNTVAL_LO_REG(1), node->name,
 			      rate, 340, 32, clocksource_mmio_readl_down);
 
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
#1 lore raw
Quoted 9 lines · Stephen Boyd

The 32 bit sched_clock interface supports 64 bits since 3.13-rc1. Upgrade to the 64 bit function to allow us to remove the 32 bit registration interface.

---

Cc'in Ingo because this is simple enough to probably just apply to timers/core

Hi Stephen,

I applied your patch in my tree for 3.15.

Thanks
-- Daniel

Quoted 26 lines
  drivers/clocksource/timer-sun5i.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clocksource/timer-sun5i.c +2 -2
index bddc52233d2a..deebcd6469fc 100644
@@ -136,7 +136,7 @@ static struct irqaction sun5i_timer_irq = {
  	.dev_id = &sun5i_clockevent,
  };
 
-static u32 sun5i_timer_sched_read(void)
+static u64 sun5i_timer_sched_read(void)
  {
  	return ~readl(timer_base + TIMER_CNTVAL_LO_REG(1));
  }
@@ -166,7 +166,7 @@ static void __init sun5i_timer_init(struct device_node *node)
  	writel(TIMER_CTL_ENABLE | TIMER_CTL_RELOAD,
  	       timer_base + TIMER_CTL_REG(1));
 
-	setup_sched_clock(sun5i_timer_sched_read, 32, rate);
+	sched_clock_register(sun5i_timer_sched_read, 32, rate);
  	clocksource_mmio_init(timer_base + TIMER_CNTVAL_LO_REG(1), node->name,
  			      rate, 340, 32, clocksource_mmio_readl_down);
 
Signature · 5 lines
  <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#2 lore raw
Quoted 9 lines · Daniel Lezcano
Quoted 8 lines · Stephen Boyd

The 32 bit sched_clock interface supports 64 bits since 3.13-rc1. Upgrade to the 64 bit function to allow us to remove the 32 bit registration interface.

---

Quoted 7 lines
Quoted 2 lines

Cc'in Ingo because this is simple enough to probably just apply to timers/core

Hi Stephen,

I applied your patch in my tree for 3.15.

I was hoping we could remove setup_sched_clock() in 3.14-rc1 timeline, but if we delay this until 3.15 we'll have to wait another 3 months. Is there any chance we can get this in for 3.14?

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
#3 lore raw
Quoted 13 lines · Stephen Boyd
Quoted 12 lines · Daniel Lezcano
Quoted 10 lines · Stephen Boyd

The 32 bit sched_clock interface supports 64 bits since 3.13-rc1. Upgrade to the 64 bit function to allow us to remove the 32 bit registration interface.

---

Cc'in Ingo because this is simple enough to probably just apply to timers/core

Quoted 8 lines
Quoted 4 lines

Hi Stephen,

I applied your patch in my tree for 3.15.

I was hoping we could remove setup_sched_clock() in 3.14-rc1 timeline, but if we delay this until 3.15 we'll have to wait another 3 months. Is there any chance we can get this in for 3.14?

I am ok with that. It is up to Ingo.

Signature · 5 lines
  <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#4 lore raw
Quoted 16 lines · Daniel Lezcano
Quoted 15 lines · Stephen Boyd
Quoted 14 lines · Daniel Lezcano
Quoted 10 lines · Stephen Boyd

The 32 bit sched_clock interface supports 64 bits since 3.13-rc1. Upgrade to the 64 bit function to allow us to remove the 32 bit registration interface.

---

Cc'in Ingo because this is simple enough to probably just apply to timers/core

Hi Stephen,

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

I applied your patch in my tree for 3.15.

I was hoping we could remove setup_sched_clock() in 3.14-rc1 timeline, but if we delay this until 3.15 we'll have to wait another 3 months. Is there any chance we can get this in for 3.14?

I am ok with that. It is up to Ingo.

Such simple patches are generally not a problem, I've applied it to timers/core with your Acked-by.

Thanks,

Ingo

#5 lore raw

[tip:timers/core] clocksource: Timer-sun5i: Switch to sched_clock_register()

In reply to Stephen Boyd
clocksource: Timer-sun5i: Switch to sched_clock_register()
Commit-ID:  00e2bcd6d35f59fce7fa0e76e24d08f74c6a8506
Gitweb:     http://git.kernel.org/tip/00e2bcd6d35f59fce7fa0e76e24d08f74c6a8506
Author:     Stephen Boyd <[email protected]>
AuthorDate: Thu, 16 Jan 2014 17:38:06 -0800
Committer:  Ingo Molnar <[email protected]>
CommitDate: Sun, 19 Jan 2014 13:23:23 +0100

clocksource: Timer-sun5i: Switch to sched_clock_register()

The 32-bit sched_clock() interface supports 64 bits since 3.13-rc1. Upgrade to the 64-bit function to allow us to remove the 32-bit registration interface.

---
 drivers/clocksource/timer-sun5i.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clocksource/timer-sun5i.c +2 -2
index bddc522..deebcd6 100644
@@ -136,7 +136,7 @@ static struct irqaction sun5i_timer_irq = {
 	.dev_id = &sun5i_clockevent,
 };
 
-static u32 sun5i_timer_sched_read(void)
+static u64 sun5i_timer_sched_read(void)
 {
 	return ~readl(timer_base + TIMER_CNTVAL_LO_REG(1));
 }
@@ -166,7 +166,7 @@ static void __init sun5i_timer_init(struct device_node *node)
 	writel(TIMER_CTL_ENABLE | TIMER_CTL_RELOAD,
 	       timer_base + TIMER_CTL_REG(1));
 
-	setup_sched_clock(sun5i_timer_sched_read, 32, rate);
+	sched_clock_register(sun5i_timer_sched_read, 32, rate);
 	clocksource_mmio_init(timer_base + TIMER_CNTVAL_LO_REG(1), node->name,
 			      rate, 340, 32, clocksource_mmio_readl_down);