Merge tag 'docs-5.14' of git://git.lwn.net/linux
[linux-2.6-microblaze.git] / lib / smp_processor_id.c
index 1c1dbd3..046ac62 100644 (file)
@@ -19,11 +19,7 @@ unsigned int check_preemption_disabled(const char *what1, const char *what2)
        if (irqs_disabled())
                goto out;
 
-       /*
-        * Kernel threads bound to a single CPU can safely use
-        * smp_processor_id():
-        */
-       if (current->nr_cpus_allowed == 1)
+       if (is_percpu_thread())
                goto out;
 
 #ifdef CONFIG_SMP