All of lore.kernel.org
 help / color / mirror / Atom feed
* sparc - generic clock event support
@ 2012-04-04 20:07 Sam Ravnborg
  2012-04-05  6:55 ` Konrad Eisele
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Sam Ravnborg @ 2012-04-04 20:07 UTC (permalink / raw)
  To: sparclinux

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: sparc - generic clock event support
  2012-04-04 20:07 sparc - generic clock event support Sam Ravnborg
@ 2012-04-05  6:55 ` Konrad Eisele
  2012-04-05  7:26 ` Sam Ravnborg
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Konrad Eisele @ 2012-04-05  6:55 UTC (permalink / raw)
  To: sparclinux

Sam Ravnborg wrote:
> 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

>
> 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
>
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: sparc - generic clock event support
  2012-04-04 20:07 sparc - generic clock event support Sam Ravnborg
  2012-04-05  6:55 ` Konrad Eisele
@ 2012-04-05  7:26 ` Sam Ravnborg
  2012-04-05 14:23 ` Konrad Eisele
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Sam Ravnborg @ 2012-04-05  7:26 UTC (permalink / raw)
  To: sparclinux

On Thu, Apr 05, 2012 at 08:55:21AM +0200, Konrad Eisele wrote:
> Sam Ravnborg wrote:
>> 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.

Thanks Konrad!
I hope I did not broke it beyond repair :-)

	Sam

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: sparc - generic clock event support
  2012-04-04 20:07 sparc - generic clock event support Sam Ravnborg
  2012-04-05  6:55 ` Konrad Eisele
  2012-04-05  7:26 ` Sam Ravnborg
@ 2012-04-05 14:23 ` Konrad Eisele
  2012-04-05 15:12 ` Sam Ravnborg
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Konrad Eisele @ 2012-04-05 14:23 UTC (permalink / raw)
  To: sparclinux

Sam Ravnborg wrote:
> On Thu, Apr 05, 2012 at 08:55:21AM +0200, Konrad Eisele wrote:
>> Sam Ravnborg wrote:
>>> 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.
>
> 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

#

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: sparc - generic clock event support
  2012-04-04 20:07 sparc - generic clock event support Sam Ravnborg
                   ` (2 preceding siblings ...)
  2012-04-05 14:23 ` Konrad Eisele
@ 2012-04-05 15:12 ` Sam Ravnborg
  2012-04-20  8:21 ` Konrad Eisele
  2012-04-20 14:46 ` Sam Ravnborg
  5 siblings, 0 replies; 7+ messages in thread
From: Sam Ravnborg @ 2012-04-05 15:12 UTC (permalink / raw)
  To: sparclinux

On Thu, Apr 05, 2012 at 04:23:08PM +0200, Konrad Eisele wrote:
> Sam Ravnborg wrote:
>> On Thu, Apr 05, 2012 at 08:55:21AM +0200, Konrad Eisele wrote:
>>> Sam Ravnborg wrote:
>>>> 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.
>>
>> 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

Thanks for testing!
I will update the changelog and resend tomorrow (bearing no other comments).

	Sam

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: sparc - generic clock event support
  2012-04-04 20:07 sparc - generic clock event support Sam Ravnborg
                   ` (3 preceding siblings ...)
  2012-04-05 15:12 ` Sam Ravnborg
@ 2012-04-20  8:21 ` Konrad Eisele
  2012-04-20 14:46 ` Sam Ravnborg
  5 siblings, 0 replies; 7+ messages in thread
From: Konrad Eisele @ 2012-04-20  8:21 UTC (permalink / raw)
  To: sparclinux

> 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

#

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: sparc - generic clock event support
  2012-04-04 20:07 sparc - generic clock event support Sam Ravnborg
                   ` (4 preceding siblings ...)
  2012-04-20  8:21 ` Konrad Eisele
@ 2012-04-20 14:46 ` Sam Ravnborg
  5 siblings, 0 replies; 7+ messages in thread
From: Sam Ravnborg @ 2012-04-20 14:46 UTC (permalink / raw)
  To: sparclinux

On Fri, Apr 20, 2012 at 10:21:51AM +0200, Konrad Eisele wrote:
>> 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!

Great - thanks for testing and letting us know!

	Sam

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-04-20 14:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-04 20:07 sparc - generic clock event support Sam Ravnborg
2012-04-05  6:55 ` Konrad Eisele
2012-04-05  7:26 ` Sam Ravnborg
2012-04-05 14:23 ` Konrad Eisele
2012-04-05 15:12 ` Sam Ravnborg
2012-04-20  8:21 ` Konrad Eisele
2012-04-20 14:46 ` Sam Ravnborg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.