Skip to contentSkip to conversation

ARM: Kconfig: select GENERIC_CLOCKEVENTS_BROADCAST also on UP

PATCH New Lucas Stach 2 participants 3 messages Jan 20, 2017 – Feb 7, 2017 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: Kconfig: select GENERIC_CLOCKEVENTS_BROADCAST also on UP

Quite a few systems have deeper idle states where the local timer tick stops to fire, that rely on the GENERIC_CLOCKEVENTS_BROADCAST infrastructure to switch to a global (non-stopping) clockevent device. This is also true on UP systems, so select GENERIC_CLOCKEVENTS_BROADCAST unconditionally.

Instead only select ARCH_HAS_TICK_BROADCAST if SMP is present, as this is only implemented for SMP systems.

---
v2: Only select GENERIC_CLOCKEVENTS_BROADCAST if the architecture
supports GENERIC_CLOCKEVENTS.

---
 arch/arm/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/Kconfig +2 -2
index 5fab553fd03a..f4b7432554e2 100644
@@ -4,7 +4,7 @@ config ARM
 	select ARCH_CLOCKSOURCE_DATA
 	select ARCH_HAS_DEVMEM_IS_ALLOWED
 	select ARCH_HAS_ELF_RANDOMIZE
-	select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
+	select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST && SMP
 	select ARCH_HAVE_CUSTOM_GPIO_H
 	select ARCH_HAS_GCOV_PROFILE_ALL
 	select ARCH_MIGHT_HAVE_PC_PARPORT
@@ -20,7 +20,7 @@ config ARM
 	select EDAC_ATOMIC_SCRUB
 	select GENERIC_ALLOCATOR
 	select GENERIC_ATOMIC64 if (CPU_V7M || CPU_V6 || !CPU_32v6K || !AEABI)
-	select GENERIC_CLOCKEVENTS_BROADCAST if SMP
+	select GENERIC_CLOCKEVENTS_BROADCAST if GENERIC_CLOCKEVENTS
 	select GENERIC_EARLY_IOREMAP
 	select GENERIC_IDLE_POLL_SETUP
 	select GENERIC_IRQ_PROBE
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 ARM: Kconfig: select GENERIC_CLOCKEVENTS_BROADCAST also on UP

Quoted 6 lines · Lucas Stach

Quite a few systems have deeper idle states where the local timer tick stops to fire, that rely on the GENERIC_CLOCKEVENTS_BROADCAST infrastructure to switch to a global (non-stopping) clockevent device. This is also true on UP systems, so select GENERIC_CLOCKEVENTS_BROADCAST unconditionally.

Quoted 7 lines

Instead only select ARCH_HAS_TICK_BROADCAST if SMP is present, as this is only implemented for SMP systems.

---
v2: Only select GENERIC_CLOCKEVENTS_BROADCAST if the architecture
supports GENERIC_CLOCKEVENTS.

Provided this solves the problems identified by the 0-day builder with your previous patch, please submit it to the patch system, thanks.

Signature · 3 lines
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
#2 lore raw

PATCH 1/1 ARM: Kconfig: select GENERIC_CLOCKEVENTS_BROADCAST also on UP

Quoted 10 lines · Russell King - ARM Linux
Quoted 9 lines · Lucas Stach

Quite a few systems have deeper idle states where the local timer tick stops to fire, that rely on the GENERIC_CLOCKEVENTS_BROADCAST infrastructure to switch to a global (non-stopping) clockevent device. This is also true on UP systems, so select GENERIC_CLOCKEVENTS_BROADCAST unconditionally.

Instead only select ARCH_HAS_TICK_BROADCAST if SMP is present, as this is only implemented for SMP systems.

Quoted 7 lines
Quoted 4 lines

---
v2: Only select GENERIC_CLOCKEVENTS_BROADCAST if the architecture
supports GENERIC_CLOCKEVENTS.

Provided this solves the problems identified by the 0-day builder with your previous patch, please submit it to the patch system, thanks.

I think this causes OMAP builds to fail:

arch/arm/mach-omap2/timer.c:325:8: error: expected identifier or '(' before 'void' arch/arm/mach-omap2/timer.c:325:15: error: expected ')' before numeric constant

     #if !defined(CONFIG_SMP) && defined(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST)
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

void tick_broadcast(const struct cpumask *mask)

     {
     }
     #endif

vs

     # ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
     #  ifdef CONFIG_ARCH_HAS_TICK_BROADCAST
     extern void tick_broadcast(const struct cpumask *mask);
     #  else
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

# define tick_broadcast NULL

     #  endif
     extern int tick_receive_broadcast(void);
     # endif

So, I'm dropping this change.

Signature · 3 lines
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.