• David Hildenbrand's avatar
    mm/memory_hotplug: guard more declarations by CONFIG_MEMORY_HOTPLUG · 3a0aaefe
    David Hildenbrand authored
    
    
    We soon want to pass flags via a new type to add_memory() and friends.
    That revealed that we currently don't guard some declarations by
    CONFIG_MEMORY_HOTPLUG.
    
    While some definitions could be moved to different places, let's keep it
    minimal for now and use CONFIG_MEMORY_HOTPLUG for all functions only
    compiled with CONFIG_MEMORY_HOTPLUG.
    
    Wrap sparse_decode_mem_map() into CONFIG_MEMORY_HOTPLUG, it's only called
    from CONFIG_MEMORY_HOTPLUG code.
    
    While at it, remove allow_online_pfn_range(), which is no longer around,
    and mhp_notimplemented(), which is unused.
    
    Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Cc: Michal Hocko <mhocko@suse.com>
    Cc: Dan Williams <dan.j.williams@intel.com>
    Cc: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
    Cc: Baoquan He <bhe@redhat.com>
    Cc: Wei Yang <richardw.yang@linux.intel.com>
    Cc: Anton Blanchard <anton@ozlabs.org>
    Cc: Ard Biesheuvel <ardb@kernel.org>
    Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
    Cc: Christian Borntraeger <borntraeger@de.ibm.com>
    Cc: Dave Jiang <dave.jiang@intel.com>
    Cc: Eric Biederman <ebiederm@xmission.com>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: Haiyang Zhang <haiyangz@microsoft.com>
    Cc: Heiko Carstens <hca@linux.ibm.com>
    Cc: Jason Gunthorpe <jgg@ziepe.ca>
    Cc: Jason Wang <jasowang@redhat.com>
    Cc: Juergen Gross <jgross@suse.com>
    Cc: Julien Grall <julien@xen.org>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: "K. Y. Srinivasan" <kys@microsoft.com>
    Cc: Len Brown <lenb@kernel.org>
    Cc: Leonardo Bras <leobras.c@gmail.com>
    Cc: Libor Pechacek <lpechacek@suse.cz>
    Cc: Michael Ellerman <mpe@ellerman.id.au>
    Cc: "Michael S. Tsirkin" <mst@redhat.com>
    Cc: Nathan Lynch <nathanl@linux.ibm.com>
    Cc: "Oliver O'Halloran" <oohall@gmail.com>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Pingfan Liu <kernelfans@gmail.com>
    Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
    Cc: Roger Pau Monné <roger.pau@citrix.com>
    Cc: Stefano Stabellini <sstabellini@kernel.org>
    Cc: Stephen Hemminger <sthemmin@microsoft.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Vasily Gorbik <gor@linux.ibm.com>
    Cc: Vishal Verma <vishal.l.verma@intel.com>
    Cc: Wei Liu <wei.liu@kernel.org>
    Link: https://lkml.kernel.org/r/20200911103459.10306-4-david@redhat.com
    
    
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    3a0aaefe