]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
mm: use CPU_BITS_NONE to initialize init_mm.cpu_bitmask
authorMike Rapoport <rppt@linux.ibm.com>
Mon, 23 Sep 2019 22:36:45 +0000 (15:36 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 24 Sep 2019 22:54:10 +0000 (15:54 -0700)
Replace open-coded bitmap array initialization of init_mm.cpu_bitmask with
neat CPU_BITS_NONE macro.

And, since init_mm.cpu_bitmask is statically set to zero, there is no way
to clear it again in start_kernel().

Link: http://lkml.kernel.org/r/1565703815-8584-1-git-send-email-rppt@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
init/main.c
mm/init-mm.c

index 99a5f55e0d02e39ddf4402974ea522e85db358c6..208b8fa1808e029db9cf74270ba06007f340e111 100644 (file)
@@ -594,7 +594,6 @@ asmlinkage __visible void __init start_kernel(void)
        page_address_init();
        pr_notice("%s", linux_banner);
        setup_arch(&command_line);
-       mm_init_cpumask(&init_mm);
        setup_command_line(command_line);
        setup_nr_cpu_ids();
        setup_per_cpu_areas();
index a787a319211ef9aea4d0bebb84055b377b52dfae..fb1e15028ef06b6ff5b68a125df7e434d52787b8 100644 (file)
@@ -35,6 +35,6 @@ struct mm_struct init_mm = {
        .arg_lock       =  __SPIN_LOCK_UNLOCKED(init_mm.arg_lock),
        .mmlist         = LIST_HEAD_INIT(init_mm.mmlist),
        .user_ns        = &init_user_ns,
-       .cpu_bitmap     = { [BITS_TO_LONGS(NR_CPUS)] = 0},
+       .cpu_bitmap     = CPU_BITS_NONE,
        INIT_MM_CONTEXT(init_mm)
 };