Skip to contentSkip to conversation

TWD: enable one-shot mode

PATCH New Russell King - ARM Linux 3 participants 5 messages Dec 24, 2010 – Jan 14, 2011

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

PATCH 1/1 TWD: enable one-shot mode

Allow one shot timer mode to be used with the TWD. This allows NOHZ mode to be used on SMP systems using the TWD localtimer.

Tested on Versatile Express.

---
Acks/Tested-by's would be appreciated, thanks.

Merry Christmas.

 arch/arm/Kconfig |    1 +
 1 file changed, 1 insertion(+)
arch/arm/Kconfig +1 -0
index 5634dce..4a6c4d7 100644
@@ -1282,6 +1282,7 @@ config HAVE_ARM_SCU
 config HAVE_ARM_TWD
 	bool
 	depends on SMP
+	select TICK_ONESHOT
 	help
 	  This options enables support for the ARM timer and watchdog unit
 
#1 lore raw

PATCH 1/1 TWD: enable one-shot mode

2010/12/24 Russell King - ARM Linux <[email protected]>:

Quoted 8 lines

Allow one shot timer mode to be used with the TWD. ?This allows NOHZ mode to be used on SMP systems using the TWD localtimer.

Tested on Versatile Express.

---
Acks/Tested-by's would be appreciated, thanks.

Tested on the U8500 and doesn't seem to break anything...

Local interrupts after a few minutes of use before patching (and enabling NO_HZ):
LOC: 8203 8224

After patching;
LOC: 233 322

Looks like it's working, too.

Yours,
Linus Walleij

#2 lore raw

PATCH 1/1 TWD: enable one-shot mode

In reply to Russell King - ARM Linux
Quoted 9 lines · Russell King - ARM Linux

Allow one shot timer mode to be used with the TWD. This allows NOHZ mode to be used on SMP systems using the TWD localtimer.

Tested on Versatile Express.

---
Acks/Tested-by's would be appreciated, thanks.

I see this patch was already tested and merged but can you elaborate on why this was done? From what I understand, NOHZ selects one-shot (like is done in this patch), so why don't the machines with a TWD choose NOHZ or high res timers?

Putting it another way, if my machine supports a oneshot capable clockevent device should I be selecting oneshot regardless of the NOHZ and high res config option being chosen?

Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#3 lore raw

PATCH 1/1 TWD: enable one-shot mode

Quoted 11 lines · Stephen Boyd
Quoted 9 lines · Russell King - ARM Linux

Allow one shot timer mode to be used with the TWD. This allows NOHZ mode to be used on SMP systems using the TWD localtimer.

Tested on Versatile Express.

---
Acks/Tested-by's would be appreciated, thanks.

Quoted 4 lines

I see this patch was already tested and merged but can you elaborate on why this was done? From what I understand, NOHZ selects one-shot (like is done in this patch), so why don't the machines with a TWD choose NOHZ or high res timers?

You're right - so it's not actually required. It should probably be reverted, though it does no damage...

#4 lore raw

PATCH 1/1 TWD: enable one-shot mode

Quoted 9 lines · Russell King - ARM Linux
Quoted 5 lines · Stephen Boyd

I see this patch was already tested and merged but can you elaborate on why this was done? From what I understand, NOHZ selects one-shot (like is done in this patch), so why don't the machines with a TWD choose NOHZ or high res timers?

You're right - so it's not actually required. It should probably be reverted, though it does no damage...

Now I'm wondering why there are other 'select TICK_ONESHOT' lines in arch/arm/Kconfig. Can we just remove them all? Otherwise it feels like we're making it confusing for others later on.

----->8---[cut here]----8<-----

arch/arm/Kconfig +0 -4
index e2f8011..7750a78 100644
@@ -532,7 +532,6 @@ config ARCH_MMP
        select CLKDEV_LOOKUP
        select GENERIC_CLOCKEVENTS
        select HAVE_SCHED_CLOCK
-       select TICK_ONESHOT
        select PLAT_PXA
        select SPARSE_IRQ
        help
@@ -613,7 +612,6 @@ config ARCH_PXA
        select ARCH_REQUIRE_GPIOLIB
        select GENERIC_CLOCKEVENTS
        select HAVE_SCHED_CLOCK
-       select TICK_ONESHOT
        select PLAT_PXA
        select SPARSE_IRQ
        help
@@ -668,7 +666,6 @@ config ARCH_SA1100
        select GENERIC_CLOCKEVENTS
        select HAVE_CLK
        select HAVE_SCHED_CLOCK
-       select TICK_ONESHOT
        select ARCH_REQUIRE_GPIOLIB
        help
          Support for StrongARM 11x0 based boards.
@@ -1300,7 +1297,6 @@ config HAVE_ARM_SCU
 config HAVE_ARM_TWD
        bool
        depends on SMP
-       select TICK_ONESHOT
        help
          This options enables support for the ARM timer and watchdog unit
 
Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.