diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-02-15 17:00:22 +0100 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-02-15 17:00:22 +0100 |
| commit | acc3a645ef4bb301366a609730df3cd6a52154a1 (patch) | |
| tree | 9b64ca50d954c29b29fed94656b3a6c916e3aae0 /lib/cpumask.c | |
| parent | e1d3209f95a19df16080b069265e172738189807 (diff) | |
| parent | 8a3f1f181d39892e6ca11485a3c3ec15bb8e1a60 (diff) | |
| download | linux-next-acc3a645ef4bb301366a609730df3cd6a52154a1.tar.gz linux-next-acc3a645ef4bb301366a609730df3cd6a52154a1.zip | |
Merge branches 'pm-cpuidle' and 'pm-cpufreq'
* pm-cpuidle:
MAINTAINERS: cpuidle: exynos: include header in file pattern
intel_idle: remove definition of DEBUG
* pm-cpufreq:
cpufreq: Remove unused flag CPUFREQ_PM_NO_WARN
cpufreq: Remove CPUFREQ_STICKY flag
cpufreq: intel_pstate: Remove repeated word
cpufreq: remove tango driver
cpufreq: brcmstb-avs-cpufreq: Fix resource leaks in ->remove()
cpufreq: brcmstb-avs-cpufreq: Free resources in error path
cpufreq: qcom-hw: enable boost support
cpufreq: tegra20: Use resource-managed API
cpufreq: intel_pstate: Get per-CPU max freq via MSR_HWP_CAPABILITIES if available
cpufreq: intel_pstate: Rename two functions
cpufreq: intel_pstate: Change intel_pstate_get_hwp_max() argument
cpufreq: intel_pstate: Always read hwp_cap_cached with READ_ONCE()
Diffstat (limited to 'lib/cpumask.c')
| -rw-r--r-- | lib/cpumask.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/lib/cpumask.c b/lib/cpumask.c index 35924025097b..c3c76b833384 100644 --- a/lib/cpumask.c +++ b/lib/cpumask.c @@ -6,7 +6,6 @@ #include <linux/export.h> #include <linux/memblock.h> #include <linux/numa.h> -#include <linux/sched/isolation.h> /** * cpumask_next - get the next cpu in a cpumask @@ -206,27 +205,22 @@ void __init free_bootmem_cpumask_var(cpumask_var_t mask) */ unsigned int cpumask_local_spread(unsigned int i, int node) { - int cpu, hk_flags; - const struct cpumask *mask; + int cpu; - hk_flags = HK_FLAG_DOMAIN | HK_FLAG_MANAGED_IRQ; - mask = housekeeping_cpumask(hk_flags); /* Wrap: we always want a cpu. */ - i %= cpumask_weight(mask); + i %= num_online_cpus(); if (node == NUMA_NO_NODE) { - for_each_cpu(cpu, mask) { + for_each_cpu(cpu, cpu_online_mask) if (i-- == 0) return cpu; - } } else { /* NUMA first. */ - for_each_cpu_and(cpu, cpumask_of_node(node), mask) { + for_each_cpu_and(cpu, cpumask_of_node(node), cpu_online_mask) if (i-- == 0) return cpu; - } - for_each_cpu(cpu, mask) { + for_each_cpu(cpu, cpu_online_mask) { /* Skip NUMA nodes, done above. */ if (cpumask_test_cpu(cpu, cpumask_of_node(node))) continue; |
