diff options
author | Paul Burton <paul.burton@imgtec.com> | 2014-02-14 11:30:52 -0500 |
---|---|---|
committer | Paul Burton <paul.burton@imgtec.com> | 2014-05-02 11:39:13 -0400 |
commit | 76306f4272e036e600254a98bc291df50cedd949 (patch) | |
tree | c06e7c4a48fe4b5276747bc3ad03fa22918689e7 /arch/mips/kernel/smp.c | |
parent | cc7964af8f997a20240d3ec5bf90c4fd20d3c48a (diff) |
MIPS: introduce cpu_coherent_mask
Add a mask of CPUs which are currently known to be operating coherently.
This is setup initially to be all present CPUs, but in a subsequent
patch CPUs in a MIPS Coherent Processing System will be cleared in this
mask as they enter non-coherent idle states. This will be used in order
to determine when a CPU within a CPS system may need to be powered back
up, but may also be used in future to optimise away wakeups for cache
operations or TLB invalidations.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Diffstat (limited to 'arch/mips/kernel/smp.c')
-rw-r--r-- | arch/mips/kernel/smp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index 9a5226443bc1..991ae968ef26 100644 --- a/arch/mips/kernel/smp.c +++ b/arch/mips/kernel/smp.c | |||
@@ -66,6 +66,8 @@ EXPORT_SYMBOL(cpu_sibling_map); | |||
66 | /* representing cpus for which sibling maps can be computed */ | 66 | /* representing cpus for which sibling maps can be computed */ |
67 | static cpumask_t cpu_sibling_setup_map; | 67 | static cpumask_t cpu_sibling_setup_map; |
68 | 68 | ||
69 | cpumask_t cpu_coherent_mask; | ||
70 | |||
69 | static inline void set_cpu_sibling_map(int cpu) | 71 | static inline void set_cpu_sibling_map(int cpu) |
70 | { | 72 | { |
71 | int i; | 73 | int i; |
@@ -124,6 +126,7 @@ asmlinkage void start_secondary(void) | |||
124 | cpu = smp_processor_id(); | 126 | cpu = smp_processor_id(); |
125 | cpu_data[cpu].udelay_val = loops_per_jiffy; | 127 | cpu_data[cpu].udelay_val = loops_per_jiffy; |
126 | 128 | ||
129 | cpu_set(cpu, cpu_coherent_mask); | ||
127 | notify_cpu_starting(cpu); | 130 | notify_cpu_starting(cpu); |
128 | 131 | ||
129 | set_cpu_online(cpu, true); | 132 | set_cpu_online(cpu, true); |
@@ -186,6 +189,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
186 | #ifndef CONFIG_HOTPLUG_CPU | 189 | #ifndef CONFIG_HOTPLUG_CPU |
187 | init_cpu_present(cpu_possible_mask); | 190 | init_cpu_present(cpu_possible_mask); |
188 | #endif | 191 | #endif |
192 | cpumask_copy(&cpu_coherent_mask, cpu_possible_mask); | ||
189 | } | 193 | } |
190 | 194 | ||
191 | /* preload SMP state for boot cpu */ | 195 | /* preload SMP state for boot cpu */ |