sparc - generic clock event support
I have now finised revising the patch to
provide support for generic clock event support
on sparc32.
The main focus has been to extend the core functionality (within sparc32) to allow us to share a lot of code between leon and the other platfroms.
I have in this process updated a few bits here and there. The patch set is build tested for leon, and runtime tested on my ss5 (sun4m).
I know this is easter - but this is what allows me to work on this stuff... But anyway - any feedback would be good. I hope to see this hit sparc-next.git soon so we can have it included in next merge window.
The diffstat tells us this is a relatively huge patch:
arch/sparc/kernel/irq.h | 19 ++ arch/sparc/kernel/leon_kernel.c | 49 +++++++ arch/sparc/kernel/pcic.c | 48 ++++--- arch/sparc/kernel/sun4c_irq.c | 11 + arch/sparc/kernel/sun4d_irq.c | 18 ++ arch/sparc/kernel/sun4m_irq.c | 22 ++- arch/sparc/kernel/time_32.c | 216 +++++++++++++++++++++++++++------- b/arch/sparc/Kconfig | 7 - b/arch/sparc/include/asm/cpudata_32.h | 1 b/arch/sparc/include/asm/leon.h | 2 b/arch/sparc/include/asm/timer_32.h | 29 ++++ b/arch/sparc/include/asm/timex_32.h | 1 b/arch/sparc/kernel/irq.h | 6 b/arch/sparc/kernel/irq_32.c | 2 b/arch/sparc/kernel/kernel.h | 2 b/arch/sparc/kernel/leon_kernel.c | 4 b/arch/sparc/kernel/leon_smp.c | 34 ----- b/arch/sparc/kernel/of_device_32.c | 4 b/arch/sparc/kernel/pcic.c | 2 b/arch/sparc/kernel/smp_32.c | 21 --- b/arch/sparc/kernel/sun4c_irq.c | 4 b/arch/sparc/kernel/sun4d_irq.c | 4 b/arch/sparc/kernel/sun4d_smp.c | 34 +---- b/arch/sparc/kernel/sun4m_irq.c | 4 b/arch/sparc/kernel/sun4m_smp.c | 38 ++--- b/arch/sparc/kernel/time_32.c | 3 26 files changed, 378 insertions(+), 207 deletions(-)
But I could not see any easy way to split this up in smaller bits.
There are only two patches:
sparc32: rename sparc_irq_config to sparc_config
sparc32: generic clockevent support
They will follow this mail.
Note that the second patch is a collaborative effort by Kirill, Konrad and me.
I found no better way to attribute that than
what is included in the patch description.
Adding Konrad's "Signed-off" would be wrong as
the patch did not pass through him.
Sam
Quoted 11 lines · Sam Ravnborg
I have now finised revising the patch to
provide support for generic clock event support
on sparc32.The main focus has been to extend the core functionality (within sparc32) to allow us to share a lot of code between leon and the other platfroms.
I have in this process updated a few bits here and there. The patch set is build tested for leon, and runtime tested on my ss5 (sun4m).
I'll test it today on Leon.
-- Konrad
Quoted 55 lines
I know this is easter - but this is what allows me to work on this stuff... But anyway - any feedback would be good. I hope to see this hit sparc-next.git soon so we can have it included in next merge window.
The diffstat tells us this is a relatively huge patch:
arch/sparc/kernel/irq.h | 19 ++ arch/sparc/kernel/leon_kernel.c | 49 +++++++ arch/sparc/kernel/pcic.c | 48 ++++--- arch/sparc/kernel/sun4c_irq.c | 11 + arch/sparc/kernel/sun4d_irq.c | 18 ++ arch/sparc/kernel/sun4m_irq.c | 22 ++- arch/sparc/kernel/time_32.c | 216 +++++++++++++++++++++++++++------- b/arch/sparc/Kconfig | 7 - b/arch/sparc/include/asm/cpudata_32.h | 1 b/arch/sparc/include/asm/leon.h | 2 b/arch/sparc/include/asm/timer_32.h | 29 ++++ b/arch/sparc/include/asm/timex_32.h | 1 b/arch/sparc/kernel/irq.h | 6 b/arch/sparc/kernel/irq_32.c | 2 b/arch/sparc/kernel/kernel.h | 2 b/arch/sparc/kernel/leon_kernel.c | 4 b/arch/sparc/kernel/leon_smp.c | 34 ----- b/arch/sparc/kernel/of_device_32.c | 4 b/arch/sparc/kernel/pcic.c | 2 b/arch/sparc/kernel/smp_32.c | 21 --- b/arch/sparc/kernel/sun4c_irq.c | 4 b/arch/sparc/kernel/sun4d_irq.c | 4 b/arch/sparc/kernel/sun4d_smp.c | 34 +---- b/arch/sparc/kernel/sun4m_irq.c | 4 b/arch/sparc/kernel/sun4m_smp.c | 38 ++--- b/arch/sparc/kernel/time_32.c | 3 26 files changed, 378 insertions(+), 207 deletions(-)But I could not see any easy way to split this up in smaller bits.
There are only two patches:
sparc32: rename
sparc_irq_configtosparc_config
sparc32: generic clockevent supportThey will follow this mail.
Note that the second patch is a collaborative effort by Kirill, Konrad and me.
I found no better way to attribute that than
what is included in the patch description.
Adding Konrad's "Signed-off" would be wrong as
the patch did not pass through him.Sam
Quoted 9 lines · Konrad Eisele
Quoted 8 lines · Sam Ravnborg
I have now finised revising the patch to
provide support for generic clock event support
on sparc32.The main focus has been to extend the core functionality (within sparc32) to allow us to share a lot of code between leon and the other platfroms.
Quoted 5 lines
Quoted 3 lines
I have in this process updated a few bits here and there. The patch set is build tested for leon, and runtime tested on my ss5 (sun4m).
I'll test it today on Leon.
Thanks Konrad!
I hope I did not broke it beyond repair :-)
Sam
Quoted 14 lines · Sam Ravnborg
Quoted 13 lines · Konrad Eisele
Quoted 11 lines · Sam Ravnborg
I have now finised revising the patch to
provide support for generic clock event support
on sparc32.The main focus has been to extend the core functionality (within sparc32) to allow us to share a lot of code between leon and the other platfroms.
I have in this process updated a few bits here and there. The patch set is build tested for leon, and runtime tested on my ss5 (sun4m).
Quoted 8 lines
Quoted 1 line
I'll test it today on Leon.
Thanks Konrad!
I hope I did not broke it beyond repair :-)Sam
I runtime tested your patch. For single-CPU the patch works fine. For SMP I cannot test because Leon-SMP for 3.x doesnt work right now, also without your patch. The last version that I could verify LEON-SMP was 2.6.36, 3.0 should also work, however there your patches dont apply. I'll have to make Leon-SMP work with 3.4 first , then I can test the SMP part of the patch. However I'll write this on my todo list for after easter. As for Leon-SMP is broken right now I would vote for that your patches are applied now and after that to try to fix Leon-SMP.
-- Konrad
------ single cpu -------------
# cd /proc # cat cpuinfo cpu : LEON fpu : GRFPU-Lite promlib : Version 0 Revision 0 prom : 0.0 type : leon ncpus probed : 1 ncpus active : 1 CPU0Bogo : 201.11 CPU0ClkTck : 202000 MMU type : LEON contexts : 256 nocache total : 3145728 nocache used : 114432 # cat timer_list Timer List Version: v0.6 HRTIMER_MAX_CLOCK_BASES: 3 now at 21370769625 nsecs
cpu: 0
clock 0:
.base: f03c1750
.index: 0
.resolution: 10000000 nsecs
.get_time: ktime_get
active timers:
clock 1:
.base: f03c1788
.index: 1
.resolution: 10000000 nsecs
.get_time: ktime_get_real
active timers:
clock 2:
.base: f03c17c0
.index: 2
.resolution: 10000000 nsecs
.get_time: ktime_get_boottime
active timers:
Tick Device: mode: 0
Per CPU device: 0
Clock Event Device: timer_ce
max_delta_ns: 0 min_delta_ns: 0 mult: 4294967 shift: 32 mode: 2 next_event: 2147483646999999999 nsecs set_next_event: <00000000> set_mode: timer_ce_set_mode event_handler: tick_handle_periodic retries: 0
#
Quoted 81 lines · Konrad Eisele
Quoted 14 lines · Sam Ravnborg
Quoted 13 lines · Konrad Eisele
Quoted 11 lines · Sam Ravnborg
I have now finised revising the patch to
provide support for generic clock event support
on sparc32.The main focus has been to extend the core functionality (within sparc32) to allow us to share a lot of code between leon and the other platfroms.
I have in this process updated a few bits here and there. The patch set is build tested for leon, and runtime tested on my ss5 (sun4m).
Quoted 8 lines
Quoted 1 line
I'll test it today on Leon.
Thanks Konrad!
I hope I did not broke it beyond repair :-)Sam
I runtime tested your patch. For single-CPU the patch works fine. For SMP I cannot test because Leon-SMP for 3.x doesnt work right now, also without your patch. The last version that I could verify LEON-SMP was 2.6.36, 3.0 should also work, however there your patches dont apply. I'll have to make Leon-SMP work with 3.4 first , then I can test the SMP part of the patch. However I'll write this on my todo list for after easter. As for Leon-SMP is broken right now I would vote for that your patches are applied now and after that to try to fix Leon-SMP.
-- Konrad------ single cpu -------------
# cd /proc # cat cpuinfo cpu : LEON fpu : GRFPU-Lite promlib : Version 0 Revision 0 prom : 0.0 type : leon ncpus probed : 1 ncpus active : 1 CPU0Bogo : 201.11 CPU0ClkTck : 202000 MMU type : LEON contexts : 256 nocache total : 3145728 nocache used : 114432 # cat timer_list Timer List Version: v0.6 HRTIMER_MAX_CLOCK_BASES: 3 now at 21370769625 nsecscpu: 0
clock 0:
.base:f03c1750
.index: 0
.resolution: 10000000 nsecs
.get_time:ktime_get
active timers:
clock 1:
.base:f03c1788
.index: 1
.resolution: 10000000 nsecs
.get_time:ktime_get_real
active timers:
clock 2:
.base:f03c17c0
.index: 2
.resolution: 10000000 nsecs
.get_time:ktime_get_boottime
active timers:Tick Device: mode: 0
Per CPU device: 0
Clock Event Device:timer_ce
Quoted 10 lines
max_delta_ns: 0 min_delta_ns: 0 mult: 4294967 shift: 32 mode: 2 next_event: 2147483646999999999 nsecs set_next_event: <00000000> set_mode: timer_ce_set_mode event_handler: tick_handle_periodic retries: 0
Thanks for testing!
I will update the changelog and resend tomorrow (bearing no other comments).
Sam
Quoted 11 lines
I runtime tested your patch. For single-CPU the patch works fine. For SMP I cannot test because Leon-SMP for 3.x doesnt work right now, also without your patch. The last version that I could verify LEON-SMP was 2.6.36, 3.0 should also work, however there your patches dont apply. I'll have to make Leon-SMP work with 3.4 first , then I can test the SMP part of the patch. However I'll write this on my todo list for after easter. As for Leon-SMP is broken right now I would vote for that your patches are applied now and after that to try to fix Leon-SMP.
-- Konrad
With SMP working again I tested your timer patch for sparc-leon SMP. It works!
-- Konrad
# cat /proc/cpuinfo cpu : LEON fpu : GRFPU promlib : Version 0 Revision 0 prom : 0.0 type : leon ncpus probed : 2 ncpus active : 2 Cpu0Bogo : 70.04 Cpu1Bogo : 70.86 MMU type : LEON contexts : 256 nocache total : 5242880 nocache used : 118528 State: CPU0 : online CPU1 : online # cat /proc/timer_list Timer List Version: v0.6 HRTIMER_MAX_CLOCK_BASES: 3 now at 22403528241 nsecs
cpu: 0
clock 0:
.base: f13d34e8
.index: 0
.resolution: 10000000 nsecs
.get_time: ktime_get
active timers:
clock 1:
.base: f13d3520
.index: 1
.resolution: 10000000 nsecs
.get_time: ktime_get_real
active timers:
clock 2:
.base: f13d3558
.index: 2
.resolution: 10000000 nsecs
.get_time: ktime_get_boottime
active timers:
cpu: 1
clock 0:
.base: f13db4e8
.index: 0
.resolution: 10000000 nsecs
.get_time: ktime_get
active timers:
clock 1:
.base: f13db520
.index: 1
.resolution: 10000000 nsecs
.get_time: ktime_get_real
active timers:
clock 2:
.base: f13db558
.index: 2
.resolution: 10000000 nsecs
.get_time: ktime_get_boottime
active timers:
Tick Device: mode: 0
Per CPU device: 0
Clock Event Device: percpu_ce
max_delta_ns: 1000000068 min_delta_ns: 100000 mult: 4294967 shift: 32 mode: 2 next_event: 2147483646999999999 nsecs set_next_event: percpu_ce_set_next_event set_mode: percpu_ce_setup event_handler: tick_handle_periodic retries: 0
Tick Device: mode: 0
Per CPU device: 1
Clock Event Device: percpu_ce
max_delta_ns: 1000000068 min_delta_ns: 100000 mult: 4294967 shift: 32 mode: 2 next_event: 2147483646999999999 nsecs set_next_event: percpu_ce_set_next_event set_mode: percpu_ce_setup event_handler: tick_handle_periodic retries: 0
#
Quoted 12 lines · Konrad Eisele
Quoted 11 lines
I runtime tested your patch. For single-CPU the patch works fine. For SMP I cannot test because Leon-SMP for 3.x doesnt work right now, also without your patch. The last version that I could verify LEON-SMP was 2.6.36, 3.0 should also work, however there your patches dont apply. I'll have to make Leon-SMP work with 3.4 first , then I can test the SMP part of the patch. However I'll write this on my todo list for after easter. As for Leon-SMP is broken right now I would vote for that your patches are applied now and after that to try to fix Leon-SMP.
-- Konrad
Quoted 2 lines
With SMP working again I tested your timer patch for sparc-leon SMP. It works!
Great - thanks for testing and letting us know!
Sam