Skip to contentSkip to conversation

xtensa: Switch to sched_clock_register()

PATCH In review Stephen Boyd 3 participants 5 messages Nov 15, 2013 – Dec 13, 2013 Tensilica Xtensa port (xtensa)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xtensa: Switch to sched_clock_register()

The 32 bit sched_clock interface now supports 64 bits. Upgrade to the 64 bit function to allow us to remove the 32 bit registration interface.

---

Patch is based on Linus' tip. Not event compile tested.

 arch/xtensa/kernel/time.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/xtensa/kernel/time.c +2 -2
index 9af3dd8..415c3f6 100644
@@ -36,7 +36,7 @@ static cycle_t ccount_read(struct clocksource *cs)
 	return (cycle_t)get_ccount();
 }
 
-static u32 notrace ccount_sched_clock_read(void)
+static u64 notrace ccount_sched_clock_read(void)
 {
 	return get_ccount();
 }
@@ -141,7 +141,7 @@ void __init time_init(void)
 	setup_irq(ccount_timer.evt.irq, &timer_irqaction);
 	ccount_timer.irq_enabled = 1;
 
-	setup_sched_clock(ccount_sched_clock_read, 32, ccount_freq);
+	sched_clock_register(ccount_sched_clock_read, 32, ccount_freq);
 }
 
 /*
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Stephen Boyd

The 32 bit sched_clock interface now supports 64 bits. Upgrade to the 64 bit function to allow us to remove the 32 bit registration interface.

---

Patch is based on Linus' tip. Not event compile tested.

 arch/xtensa/kernel/time.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Build and run-tested, appears to work.

Should it go through xtensa tree, or through some other tree as a part of a bigger conversion series?

Quoted 26 lines
arch/xtensa/kernel/time.c +2 -3
index 9af3dd8..415c3f6 100644
@@ -36,7 +36,7 @@ static cycle_t ccount_read(struct clocksource *cs)
        return (cycle_t)get_ccount();
 }
 
-static u32 notrace ccount_sched_clock_read(void)
+static u64 notrace ccount_sched_clock_read(void)
 {
        return get_ccount();
 }
@@ -141,7 +141,7 @@ void __init time_init(void)
        setup_irq(ccount_timer.evt.irq, &timer_irqaction);
        ccount_timer.irq_enabled = 1;
 
-       setup_sched_clock(ccount_sched_clock_read, 32, ccount_freq);
+       sched_clock_register(ccount_sched_clock_read, 32, ccount_freq);
 }
 
 /*
--

The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation

Signature · 2 lines
Thanks.
-- Max
#2 lore raw
Quoted 10 lines · Max Filippov
Quoted 9 lines · Stephen Boyd

The 32 bit sched_clock interface now supports 64 bits. Upgrade to the 64 bit function to allow us to remove the 32 bit registration interface.

---

Patch is based on Linus' tip. Not event compile tested.

Quoted 7 lines
Quoted 2 lines
 arch/xtensa/kernel/time.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Build and run-tested, appears to work.

Should it go through xtensa tree, or through some other tree as a part of a bigger conversion series?

If it can go through xtensa that sounds like the best option. Otherwise we can send it through the tip/timers tree.

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 · Max Filippov
Quoted 11 lines · Stephen Boyd

The 32 bit sched_clock interface now supports 64 bits. Upgrade to the 64 bit function to allow us to remove the 32 bit registration interface.

---

Patch is based on Linus' tip. Not event compile tested.

 arch/xtensa/kernel/time.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 8 lines
Quoted 5 lines

Build and run-tested, appears to work.

Should it go through xtensa tree, or through some other tree as a part of a bigger conversion series?

If it can go through xtensa that sounds like the best option. Otherwise we can send it through the tip/timers tree.

Ping? I don't see this patch in linux-next yet so should I send this through the tip/timers tree?

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
maintainer
#4 lore raw

Hi Stephen,

Sorry for the delay. Will add it later today.

Thanks,
-Chris

Quoted 25 lines · Stephen Boyd
Quoted 13 lines · Stephen Boyd
Quoted 12 lines · Max Filippov
Quoted 11 lines · Stephen Boyd

The 32 bit sched_clock interface now supports 64 bits. Upgrade to the 64 bit function to allow us to remove the 32 bit registration interface.

---

Patch is based on Linus' tip. Not event compile tested.

  arch/xtensa/kernel/time.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 8 lines
Quoted 5 lines

Build and run-tested, appears to work.

Should it go through xtensa tree, or through some other tree as a part of a bigger conversion series?

If it can go through xtensa that sounds like the best option. Otherwise we can send it through the tip/timers tree.

Ping? I don't see this patch in linux-next yet so should I send this through the tip/timers tree?