Skip to content

Commit eea2d5d

Browse files
committed
Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm
Pull ARM fixes from Russell King: - fix CPU topology setup for SCHED_MC case - fix VDSO regression * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8947/1: Fix __arch_get_hw_counter() access to CNTVCT ARM: 8943/1: Fix topology setup in case of CPU hotplug for CONFIG_SCHED_MC
2 parents 347f56f + 04bb964 commit eea2d5d

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

arch/arm/include/asm/vdso/gettimeofday.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ static __always_inline u64 __arch_get_hw_counter(int clock_mode)
7575
#ifdef CONFIG_ARM_ARCH_TIMER
7676
u64 cycle_now;
7777

78+
if (!clock_mode)
79+
return -EINVAL;
80+
7881
isb();
7982
cycle_now = read_sysreg(CNTVCT);
8083

arch/arm/kernel/smp.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,10 @@ int __cpu_disable(void)
240240
if (ret)
241241
return ret;
242242

243+
#ifdef CONFIG_GENERIC_ARCH_TOPOLOGY
244+
remove_cpu_topology(cpu);
245+
#endif
246+
243247
/*
244248
* Take this CPU offline. Once we clear this, we can't return,
245249
* and we must not schedule until we're ready to give up the cpu.

arch/arm/kernel/topology.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,8 @@ void store_cpu_topology(unsigned int cpuid)
196196
struct cpu_topology *cpuid_topo = &cpu_topology[cpuid];
197197
unsigned int mpidr;
198198

199-
/* If the cpu topology has been already set, just return */
200-
if (cpuid_topo->core_id != -1)
201-
return;
199+
if (cpuid_topo->package_id != -1)
200+
goto topology_populated;
202201

203202
mpidr = read_cpuid_mpidr();
204203

@@ -231,14 +230,15 @@ void store_cpu_topology(unsigned int cpuid)
231230
cpuid_topo->package_id = -1;
232231
}
233232

234-
update_siblings_masks(cpuid);
235-
236233
update_cpu_capacity(cpuid);
237234

238235
pr_info("CPU%u: thread %d, cpu %d, socket %d, mpidr %x\n",
239236
cpuid, cpu_topology[cpuid].thread_id,
240237
cpu_topology[cpuid].core_id,
241238
cpu_topology[cpuid].package_id, mpidr);
239+
240+
topology_populated:
241+
update_siblings_masks(cpuid);
242242
}
243243

244244
static inline int cpu_corepower_flags(void)

0 commit comments

Comments
 (0)