sched/isolation: Use single feature type while referring to housekeeping cpumask
authorFrederic Weisbecker <frederic@kernel.org>
Mon, 7 Feb 2022 15:59:06 +0000 (16:59 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 16 Feb 2022 14:57:55 +0000 (15:57 +0100)
Refer to housekeeping APIs using single feature types instead of flags.
This prevents from passing multiple isolation features at once to
housekeeping interfaces, which soon won't be possible anymore as each
isolation features will have their own cpumask.

Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Juri Lelli <juri.lelli@redhat.com>
Reviewed-by: Phil Auld <pauld@redhat.com>
Link: https://lore.kernel.org/r/20220207155910.527133-5-frederic@kernel.org
19 files changed:
arch/x86/kernel/cpu/aperfmperf.c
arch/x86/kvm/x86.c
drivers/base/cpu.c
drivers/pci/pci-driver.c
include/linux/sched/isolation.h
kernel/cgroup/cpuset.c
kernel/cpu.c
kernel/irq/cpuhotplug.c
kernel/irq/manage.c
kernel/kthread.c
kernel/rcu/tasks.h
kernel/rcu/tree_plugin.h
kernel/sched/core.c
kernel/sched/fair.c
kernel/sched/isolation.c
kernel/sched/topology.c
kernel/watchdog.c
kernel/workqueue.c
net/core/net-sysfs.c

index 22911deacb6e441ad60ddb57190ef3772afb3cf0..9ca008f9e9b1ad8449b0053ab4a99e51e7c30bf7 100644 (file)
@@ -91,7 +91,7 @@ unsigned int aperfmperf_get_khz(int cpu)
        if (!boot_cpu_has(X86_FEATURE_APERFMPERF))
                return 0;
 
-       if (!housekeeping_cpu(cpu, HK_FLAG_MISC))
+       if (!housekeeping_cpu(cpu, HK_TYPE_MISC))
                return 0;
 
        if (rcu_is_idle_cpu(cpu))
@@ -114,7 +114,7 @@ void arch_freq_prepare_all(void)
                return;
 
        for_each_online_cpu(cpu) {
-               if (!housekeeping_cpu(cpu, HK_FLAG_MISC))
+               if (!housekeeping_cpu(cpu, HK_TYPE_MISC))
                        continue;
                if (rcu_is_idle_cpu(cpu))
                        continue; /* Idle CPUs are completely uninteresting. */
@@ -136,7 +136,7 @@ unsigned int arch_freq_get_on_cpu(int cpu)
        if (!boot_cpu_has(X86_FEATURE_APERFMPERF))
                return 0;
 
-       if (!housekeeping_cpu(cpu, HK_FLAG_MISC))
+       if (!housekeeping_cpu(cpu, HK_TYPE_MISC))
                return 0;
 
        if (aperfmperf_snapshot_cpu(cpu, ktime_get(), true))
index 9e43d756312f17063dbf7a68adb3b6d1066f9080..02a7ac1b6bb21e7ee15a79b88efb48184429a973 100644 (file)
@@ -8769,7 +8769,7 @@ int kvm_arch_init(void *opaque)
        }
 
        if (pi_inject_timer == -1)
-               pi_inject_timer = housekeeping_enabled(HK_FLAG_TIMER);
+               pi_inject_timer = housekeeping_enabled(HK_TYPE_TIMER);
 #ifdef CONFIG_X86_64
        pvclock_gtod_register_notifier(&pvclock_gtod_notifier);
 
index 5fc258073bc7575905e64801bb71d464126c66ac..2ef23fce0860c5d780d41c3eb13e51ad6132da26 100644 (file)
@@ -275,7 +275,7 @@ static ssize_t print_cpus_isolated(struct device *dev,
                return -ENOMEM;
 
        cpumask_andnot(isolated, cpu_possible_mask,
-                      housekeeping_cpumask(HK_FLAG_DOMAIN));
+                      housekeeping_cpumask(HK_TYPE_DOMAIN));
        len = sysfs_emit(buf, "%*pbl\n", cpumask_pr_args(isolated));
 
        free_cpumask_var(isolated);
index 4a5792c82d0839fb265835d1b069c3afd94ba9ef..f61c40a4789125f13c84005c012070505fe04804 100644 (file)
@@ -377,8 +377,8 @@ static int pci_call_probe(struct pci_driver *drv, struct pci_dev *dev,
                        goto out;
                }
                cpumask_and(wq_domain_mask,
-                           housekeeping_cpumask(HK_FLAG_WQ),
-                           housekeeping_cpumask(HK_FLAG_DOMAIN));
+                           housekeeping_cpumask(HK_TYPE_WQ),
+                           housekeeping_cpumask(HK_TYPE_DOMAIN));
 
                cpu = cpumask_any_and(cpumask_of_node(node),
                                      wq_domain_mask);
index cc9f393e2a70603ed16974afeb60aa6569bcd26d..8c15abd67aed9e8989a846e78f2bb5e6474fd59f 100644 (file)
@@ -5,54 +5,55 @@
 #include <linux/init.h>
 #include <linux/tick.h>
 
-enum hk_flags {
-       HK_FLAG_TIMER           = 1,
-       HK_FLAG_RCU             = (1 << 1),
-       HK_FLAG_MISC            = (1 << 2),
-       HK_FLAG_SCHED           = (1 << 3),
-       HK_FLAG_TICK            = (1 << 4),
-       HK_FLAG_DOMAIN          = (1 << 5),
-       HK_FLAG_WQ              = (1 << 6),
-       HK_FLAG_MANAGED_IRQ     = (1 << 7),
-       HK_FLAG_KTHREAD         = (1 << 8),
+enum hk_type {
+       HK_TYPE_TIMER,
+       HK_TYPE_RCU,
+       HK_TYPE_MISC,
+       HK_TYPE_SCHED,
+       HK_TYPE_TICK,
+       HK_TYPE_DOMAIN,
+       HK_TYPE_WQ,
+       HK_TYPE_MANAGED_IRQ,
+       HK_TYPE_KTHREAD,
+       HK_TYPE_MAX
 };
 
 #ifdef CONFIG_CPU_ISOLATION
 DECLARE_STATIC_KEY_FALSE(housekeeping_overridden);
-extern int housekeeping_any_cpu(enum hk_flags flags);
-extern const struct cpumask *housekeeping_cpumask(enum hk_flags flags);
-extern bool housekeeping_enabled(enum hk_flags flags);
-extern void housekeeping_affine(struct task_struct *t, enum hk_flags flags);
-extern bool housekeeping_test_cpu(int cpu, enum hk_flags flags);
+extern int housekeeping_any_cpu(enum hk_type type);
+extern const struct cpumask *housekeeping_cpumask(enum hk_type type);
+extern bool housekeeping_enabled(enum hk_type type);
+extern void housekeeping_affine(struct task_struct *t, enum hk_type type);
+extern bool housekeeping_test_cpu(int cpu, enum hk_type type);
 extern void __init housekeeping_init(void);
 
 #else
 
-static inline int housekeeping_any_cpu(enum hk_flags flags)
+static inline int housekeeping_any_cpu(enum hk_type type)
 {
        return smp_processor_id();
 }
 
-static inline const struct cpumask *housekeeping_cpumask(enum hk_flags flags)
+static inline const struct cpumask *housekeeping_cpumask(enum hk_type type)
 {
        return cpu_possible_mask;
 }
 
-static inline bool housekeeping_enabled(enum hk_flags flags)
+static inline bool housekeeping_enabled(enum hk_type type)
 {
        return false;
 }
 
 static inline void housekeeping_affine(struct task_struct *t,
-                                      enum hk_flags flags) { }
+                                      enum hk_type type) { }
 static inline void housekeeping_init(void) { }
 #endif /* CONFIG_CPU_ISOLATION */
 
-static inline bool housekeeping_cpu(int cpu, enum hk_flags flags)
+static inline bool housekeeping_cpu(int cpu, enum hk_type type)
 {
 #ifdef CONFIG_CPU_ISOLATION
        if (static_branch_unlikely(&housekeeping_overridden))
-               return housekeeping_test_cpu(cpu, flags);
+               return housekeeping_test_cpu(cpu, type);
 #endif
        return true;
 }
index dc653ab26e50e0a42632490172c225a8b9c3fcd5..e4e18a2cb4047547ccc33d81d23e4a87a03449d7 100644 (file)
@@ -803,7 +803,7 @@ static int generate_sched_domains(cpumask_var_t **domains,
                        update_domain_attr_tree(dattr, &top_cpuset);
                }
                cpumask_and(doms[0], top_cpuset.effective_cpus,
-                           housekeeping_cpumask(HK_FLAG_DOMAIN));
+                           housekeeping_cpumask(HK_TYPE_DOMAIN));
 
                goto done;
        }
@@ -833,7 +833,7 @@ static int generate_sched_domains(cpumask_var_t **domains,
                if (!cpumask_empty(cp->cpus_allowed) &&
                    !(is_sched_load_balance(cp) &&
                      cpumask_intersects(cp->cpus_allowed,
-                                        housekeeping_cpumask(HK_FLAG_DOMAIN))))
+                                        housekeeping_cpumask(HK_TYPE_DOMAIN))))
                        continue;
 
                if (root_load_balance &&
@@ -922,7 +922,7 @@ restart:
 
                        if (apn == b->pn) {
                                cpumask_or(dp, dp, b->effective_cpus);
-                               cpumask_and(dp, dp, housekeeping_cpumask(HK_FLAG_DOMAIN));
+                               cpumask_and(dp, dp, housekeeping_cpumask(HK_TYPE_DOMAIN));
                                if (dattr)
                                        update_domain_attr_tree(dattr + nslot, b);
 
index 407a2568f35ebb77424320b10287dd499c9572b9..f39eb0b52dfeddfbbad8dc3fd4394eedbde2f8e5 100644 (file)
@@ -1488,8 +1488,8 @@ int freeze_secondary_cpus(int primary)
        cpu_maps_update_begin();
        if (primary == -1) {
                primary = cpumask_first(cpu_online_mask);
-               if (!housekeeping_cpu(primary, HK_FLAG_TIMER))
-                       primary = housekeeping_any_cpu(HK_FLAG_TIMER);
+               if (!housekeeping_cpu(primary, HK_TYPE_TIMER))
+                       primary = housekeeping_any_cpu(HK_TYPE_TIMER);
        } else {
                if (!cpu_online(primary))
                        primary = cpumask_first(cpu_online_mask);
index 39a41c56ad4fe1c97dfca19dced650b3ef215a8a..1ed2b1739363b855bee1404e35f5c036056bdd1f 100644 (file)
@@ -176,10 +176,10 @@ static bool hk_should_isolate(struct irq_data *data, unsigned int cpu)
 {
        const struct cpumask *hk_mask;
 
-       if (!housekeeping_enabled(HK_FLAG_MANAGED_IRQ))
+       if (!housekeeping_enabled(HK_TYPE_MANAGED_IRQ))
                return false;
 
-       hk_mask = housekeeping_cpumask(HK_FLAG_MANAGED_IRQ);
+       hk_mask = housekeeping_cpumask(HK_TYPE_MANAGED_IRQ);
        if (cpumask_subset(irq_data_get_effective_affinity_mask(data), hk_mask))
                return false;
 
index f23ffd30385b1e3f290e52ec3f05391df1056a3d..c03f71d5ec1016541494c37211846ce572b1611a 100644 (file)
@@ -247,13 +247,13 @@ int irq_do_set_affinity(struct irq_data *data, const struct cpumask *mask,
         * online.
         */
        if (irqd_affinity_is_managed(data) &&
-           housekeeping_enabled(HK_FLAG_MANAGED_IRQ)) {
+           housekeeping_enabled(HK_TYPE_MANAGED_IRQ)) {
                const struct cpumask *hk_mask, *prog_mask;
 
                static DEFINE_RAW_SPINLOCK(tmp_mask_lock);
                static struct cpumask tmp_mask;
 
-               hk_mask = housekeeping_cpumask(HK_FLAG_MANAGED_IRQ);
+               hk_mask = housekeeping_cpumask(HK_TYPE_MANAGED_IRQ);
 
                raw_spin_lock(&tmp_mask_lock);
                cpumask_and(&tmp_mask, mask, hk_mask);
index 38c6dd822da87e9ccff4613402e7683cd92e7338..d100d5a15b38fa6ea2ef7e0716bbe836ea7100d8 100644 (file)
@@ -356,7 +356,7 @@ static int kthread(void *_create)
         * back to default in case they have been changed.
         */
        sched_setscheduler_nocheck(current, SCHED_NORMAL, &param);
-       set_cpus_allowed_ptr(current, housekeeping_cpumask(HK_FLAG_KTHREAD));
+       set_cpus_allowed_ptr(current, housekeeping_cpumask(HK_TYPE_KTHREAD));
 
        /* OK, tell user we're spawned, wait for stop or wakeup */
        __set_current_state(TASK_UNINTERRUPTIBLE);
@@ -722,7 +722,7 @@ int kthreadd(void *unused)
        /* Setup a clean context for our children to inherit. */
        set_task_comm(tsk, "kthreadd");
        ignore_signals(tsk);
-       set_cpus_allowed_ptr(tsk, housekeeping_cpumask(HK_FLAG_KTHREAD));
+       set_cpus_allowed_ptr(tsk, housekeeping_cpumask(HK_TYPE_KTHREAD));
        set_mems_allowed(node_states[N_MEMORY]);
 
        current->flags |= PF_NOFREEZE;
index 84f1d91604cc2f87d30f02cf04ad191dda750478..6093b200dff7e728f8aae876514f766a55a49500 100644 (file)
@@ -492,7 +492,7 @@ static int __noreturn rcu_tasks_kthread(void *arg)
        struct rcu_tasks *rtp = arg;
 
        /* Run on housekeeping CPUs by default.  Sysadm can move if desired. */
-       housekeeping_affine(current, HK_FLAG_RCU);
+       housekeeping_affine(current, HK_TYPE_RCU);
        WRITE_ONCE(rtp->kthread_ptr, current); // Let GPs start!
 
        /*
index c5b45c2f68a159574b63479ffd5adb8b936e9298..65f25a32f6d75c78eb27a61fcc4c5ad69a2e0e38 100644 (file)
@@ -1214,9 +1214,9 @@ static void rcu_boost_kthread_setaffinity(struct rcu_node *rnp, int outgoingcpu)
                if ((mask & leaf_node_cpu_bit(rnp, cpu)) &&
                    cpu != outgoingcpu)
                        cpumask_set_cpu(cpu, cm);
-       cpumask_and(cm, cm, housekeeping_cpumask(HK_FLAG_RCU));
+       cpumask_and(cm, cm, housekeeping_cpumask(HK_TYPE_RCU));
        if (cpumask_weight(cm) == 0)
-               cpumask_copy(cm, housekeeping_cpumask(HK_FLAG_RCU));
+               cpumask_copy(cm, housekeeping_cpumask(HK_TYPE_RCU));
        set_cpus_allowed_ptr(t, cm);
        free_cpumask_var(cm);
 }
@@ -1291,7 +1291,7 @@ static void rcu_bind_gp_kthread(void)
 {
        if (!tick_nohz_full_enabled())
                return;
-       housekeeping_affine(current, HK_FLAG_RCU);
+       housekeeping_affine(current, HK_TYPE_RCU);
 }
 
 /* Record the current task on dyntick-idle entry. */
index b2226922206d49d0bbb2c9bdf01f2902344c0f3e..1e08b02e0cd5588a8abcabc529cb8df258c3b7af 100644 (file)
@@ -1025,13 +1025,13 @@ int get_nohz_timer_target(void)
        struct sched_domain *sd;
        const struct cpumask *hk_mask;
 
-       if (housekeeping_cpu(cpu, HK_FLAG_TIMER)) {
+       if (housekeeping_cpu(cpu, HK_TYPE_TIMER)) {
                if (!idle_cpu(cpu))
                        return cpu;
                default_cpu = cpu;
        }
 
-       hk_mask = housekeeping_cpumask(HK_FLAG_TIMER);
+       hk_mask = housekeeping_cpumask(HK_TYPE_TIMER);
 
        rcu_read_lock();
        for_each_domain(cpu, sd) {
@@ -1047,7 +1047,7 @@ int get_nohz_timer_target(void)
        }
 
        if (default_cpu == -1)
-               default_cpu = housekeeping_any_cpu(HK_FLAG_TIMER);
+               default_cpu = housekeeping_any_cpu(HK_TYPE_TIMER);
        cpu = default_cpu;
 unlock:
        rcu_read_unlock();
@@ -5371,7 +5371,7 @@ static void sched_tick_start(int cpu)
        int os;
        struct tick_work *twork;
 
-       if (housekeeping_cpu(cpu, HK_FLAG_TICK))
+       if (housekeeping_cpu(cpu, HK_TYPE_TICK))
                return;
 
        WARN_ON_ONCE(!tick_work_cpu);
@@ -5392,7 +5392,7 @@ static void sched_tick_stop(int cpu)
        struct tick_work *twork;
        int os;
 
-       if (housekeeping_cpu(cpu, HK_FLAG_TICK))
+       if (housekeeping_cpu(cpu, HK_TYPE_TICK))
                return;
 
        WARN_ON_ONCE(!tick_work_cpu);
@@ -9251,7 +9251,7 @@ void __init sched_init_smp(void)
        mutex_unlock(&sched_domains_mutex);
 
        /* Move init over to a non-isolated CPU */
-       if (set_cpus_allowed_ptr(current, housekeeping_cpumask(HK_FLAG_DOMAIN)) < 0)
+       if (set_cpus_allowed_ptr(current, housekeeping_cpumask(HK_TYPE_DOMAIN)) < 0)
                BUG();
        current->flags &= ~PF_NO_SETAFFINITY;
        sched_init_granularity();
index 11a72e1b3b2c0e6da31964390e1d069fe34e4b70..dcbd3110c687295c29fd5fa77c7a1127c24eae3f 100644 (file)
@@ -10337,7 +10337,7 @@ static inline int on_null_domain(struct rq *rq)
  * - When one of the busy CPUs notice that there may be an idle rebalancing
  *   needed, they will kick the idle load balancer, which then does idle
  *   load balancing for all the idle CPUs.
- * - HK_FLAG_MISC CPUs are used for this task, because HK_FLAG_SCHED not set
+ * - HK_TYPE_MISC CPUs are used for this task, because HK_TYPE_SCHED not set
  *   anywhere yet.
  */
 
@@ -10346,7 +10346,7 @@ static inline int find_new_ilb(void)
        int ilb;
        const struct cpumask *hk_mask;
 
-       hk_mask = housekeeping_cpumask(HK_FLAG_MISC);
+       hk_mask = housekeeping_cpumask(HK_TYPE_MISC);
 
        for_each_cpu_and(ilb, nohz.idle_cpus_mask, hk_mask) {
 
@@ -10362,7 +10362,7 @@ static inline int find_new_ilb(void)
 
 /*
  * Kick a CPU to do the nohz balancing, if it is time for it. We pick any
- * idle CPU in the HK_FLAG_MISC housekeeping set (if there is one).
+ * idle CPU in the HK_TYPE_MISC housekeeping set (if there is one).
  */
 static void kick_ilb(unsigned int flags)
 {
@@ -10575,7 +10575,7 @@ void nohz_balance_enter_idle(int cpu)
                return;
 
        /* Spare idle load balancing on CPUs that don't want to be disturbed: */
-       if (!housekeeping_cpu(cpu, HK_FLAG_SCHED))
+       if (!housekeeping_cpu(cpu, HK_TYPE_SCHED))
                return;
 
        /*
@@ -10791,7 +10791,7 @@ static void nohz_newidle_balance(struct rq *this_rq)
         * This CPU doesn't want to be disturbed by scheduler
         * housekeeping
         */
-       if (!housekeeping_cpu(this_cpu, HK_FLAG_SCHED))
+       if (!housekeeping_cpu(this_cpu, HK_TYPE_SCHED))
                return;
 
        /* Will wake up very soon. No time for doing anything else*/
index 7f06eaf1281883f4284f9d2ab780fcf32489b270..a735d9e229ddef9a3a2c32a823cd704f15e82727 100644 (file)
@@ -9,23 +9,35 @@
  */
 #include "sched.h"
 
+enum hk_flags {
+       HK_FLAG_TIMER           = BIT(HK_TYPE_TIMER),
+       HK_FLAG_RCU             = BIT(HK_TYPE_RCU),
+       HK_FLAG_MISC            = BIT(HK_TYPE_MISC),
+       HK_FLAG_SCHED           = BIT(HK_TYPE_SCHED),
+       HK_FLAG_TICK            = BIT(HK_TYPE_TICK),
+       HK_FLAG_DOMAIN          = BIT(HK_TYPE_DOMAIN),
+       HK_FLAG_WQ              = BIT(HK_TYPE_WQ),
+       HK_FLAG_MANAGED_IRQ     = BIT(HK_TYPE_MANAGED_IRQ),
+       HK_FLAG_KTHREAD         = BIT(HK_TYPE_KTHREAD),
+};
+
 DEFINE_STATIC_KEY_FALSE(housekeeping_overridden);
 EXPORT_SYMBOL_GPL(housekeeping_overridden);
 static cpumask_var_t housekeeping_mask;
 static unsigned int housekeeping_flags;
 
-bool housekeeping_enabled(enum hk_flags flags)
+bool housekeeping_enabled(enum hk_type type)
 {
-       return !!(housekeeping_flags & flags);
+       return !!(housekeeping_flags & BIT(type));
 }
 EXPORT_SYMBOL_GPL(housekeeping_enabled);
 
-int housekeeping_any_cpu(enum hk_flags flags)
+int housekeeping_any_cpu(enum hk_type type)
 {
        int cpu;
 
        if (static_branch_unlikely(&housekeeping_overridden)) {
-               if (housekeeping_flags & flags) {
+               if (housekeeping_flags & BIT(type)) {
                        cpu = sched_numa_find_closest(housekeeping_mask, smp_processor_id());
                        if (cpu < nr_cpu_ids)
                                return cpu;
@@ -37,27 +49,27 @@ int housekeeping_any_cpu(enum hk_flags flags)
 }
 EXPORT_SYMBOL_GPL(housekeeping_any_cpu);
 
-const struct cpumask *housekeeping_cpumask(enum hk_flags flags)
+const struct cpumask *housekeeping_cpumask(enum hk_type type)
 {
        if (static_branch_unlikely(&housekeeping_overridden))
-               if (housekeeping_flags & flags)
+               if (housekeeping_flags & BIT(type))
                        return housekeeping_mask;
        return cpu_possible_mask;
 }
 EXPORT_SYMBOL_GPL(housekeeping_cpumask);
 
-void housekeeping_affine(struct task_struct *t, enum hk_flags flags)
+void housekeeping_affine(struct task_struct *t, enum hk_type type)
 {
        if (static_branch_unlikely(&housekeeping_overridden))
-               if (housekeeping_flags & flags)
+               if (housekeeping_flags & BIT(type))
                        set_cpus_allowed_ptr(t, housekeeping_mask);
 }
 EXPORT_SYMBOL_GPL(housekeeping_affine);
 
-bool housekeeping_test_cpu(int cpu, enum hk_flags flags)
+bool housekeeping_test_cpu(int cpu, enum hk_type type)
 {
        if (static_branch_unlikely(&housekeeping_overridden))
-               if (housekeeping_flags & flags)
+               if (housekeeping_flags & BIT(type))
                        return cpumask_test_cpu(cpu, housekeeping_mask);
        return true;
 }
index 5db322c9cb3f9bcccf9fe2baee391bc266df0aff..32841c6741d1499e24a2d176d7d3e47d83c9c3f3 100644 (file)
@@ -1366,7 +1366,7 @@ static void asym_cpu_capacity_scan(void)
        list_for_each_entry(entry, &asym_cap_list, link)
                cpumask_clear(cpu_capacity_span(entry));
 
-       for_each_cpu_and(cpu, cpu_possible_mask, housekeeping_cpumask(HK_FLAG_DOMAIN))
+       for_each_cpu_and(cpu, cpu_possible_mask, housekeeping_cpumask(HK_TYPE_DOMAIN))
                asym_cpu_capacity_update_data(cpu);
 
        list_for_each_entry_safe(entry, next, &asym_cap_list, link) {
@@ -2440,7 +2440,7 @@ int sched_init_domains(const struct cpumask *cpu_map)
        doms_cur = alloc_sched_domains(ndoms_cur);
        if (!doms_cur)
                doms_cur = &fallback_doms;
-       cpumask_and(doms_cur[0], cpu_map, housekeeping_cpumask(HK_FLAG_DOMAIN));
+       cpumask_and(doms_cur[0], cpu_map, housekeeping_cpumask(HK_TYPE_DOMAIN));
        err = build_sched_domains(doms_cur[0], NULL);
 
        return err;
@@ -2529,7 +2529,7 @@ void partition_sched_domains_locked(int ndoms_new, cpumask_var_t doms_new[],
                if (doms_new) {
                        n = 1;
                        cpumask_and(doms_new[0], cpu_active_mask,
-                                   housekeeping_cpumask(HK_FLAG_DOMAIN));
+                                   housekeeping_cpumask(HK_TYPE_DOMAIN));
                }
        } else {
                n = ndoms_new;
@@ -2564,7 +2564,7 @@ match1:
                n = 0;
                doms_new = &fallback_doms;
                cpumask_and(doms_new[0], cpu_active_mask,
-                           housekeeping_cpumask(HK_FLAG_DOMAIN));
+                           housekeeping_cpumask(HK_TYPE_DOMAIN));
        }
 
        /* Build new domains: */
index 99afb88d2e85a8d0d14a06c53c9b90f1f6128bb4..9166220457bcbbf12852a591d617b442da3b2c37 100644 (file)
@@ -848,7 +848,7 @@ void __init lockup_detector_init(void)
                pr_info("Disabling watchdog on nohz_full cores by default\n");
 
        cpumask_copy(&watchdog_cpumask,
-                    housekeeping_cpumask(HK_FLAG_TIMER));
+                    housekeeping_cpumask(HK_TYPE_TIMER));
 
        if (!watchdog_nmi_probe())
                nmi_watchdog_available = true;
index 61ed310621ea6e85bc847d766ee8d8b31fa79725..52e9abbb77591917d2cb17041543ec37836a3588 100644 (file)
@@ -6011,8 +6011,8 @@ void __init workqueue_init_early(void)
        BUILD_BUG_ON(__alignof__(struct pool_workqueue) < __alignof__(long long));
 
        BUG_ON(!alloc_cpumask_var(&wq_unbound_cpumask, GFP_KERNEL));
-       cpumask_copy(wq_unbound_cpumask, housekeeping_cpumask(HK_FLAG_WQ));
-       cpumask_and(wq_unbound_cpumask, wq_unbound_cpumask, housekeeping_cpumask(HK_FLAG_DOMAIN));
+       cpumask_copy(wq_unbound_cpumask, housekeeping_cpumask(HK_TYPE_WQ));
+       cpumask_and(wq_unbound_cpumask, wq_unbound_cpumask, housekeeping_cpumask(HK_TYPE_DOMAIN));
 
        pwq_cache = KMEM_CACHE(pool_workqueue, SLAB_PANIC);
 
index ed8da7b8d35bfc6e536ad972e883b01e6575c7b0..7ceb3460161b7cc3ef983ee4ac77f3fe59046cd8 100644 (file)
@@ -839,8 +839,8 @@ static ssize_t store_rps_map(struct netdev_rx_queue *queue,
        }
 
        if (!cpumask_empty(mask)) {
-               cpumask_and(mask, mask, housekeeping_cpumask(HK_FLAG_DOMAIN));
-               cpumask_and(mask, mask, housekeeping_cpumask(HK_FLAG_WQ));
+               cpumask_and(mask, mask, housekeeping_cpumask(HK_TYPE_DOMAIN));
+               cpumask_and(mask, mask, housekeeping_cpumask(HK_TYPE_WQ));
                if (cpumask_empty(mask)) {
                        free_cpumask_var(mask);
                        return -EINVAL;