Commit 530d4c0c authored by Mike Rapoport's avatar Mike Rapoport Committed by Linus Torvalds

docs/boot-time-mm: remove bootmem documentation

Link: http://lkml.kernel.org/r/1536927045-23536-31-git-send-email-rppt@linux.vnet.ibm.comSigned-off-by: default avatarMike Rapoport <rppt@linux.vnet.ibm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Ley Foon Tan <lftan@altera.com>
Cc: Mark Salter <msalter@redhat.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Palmer Dabbelt <palmer@sifive.com>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Richard Kuo <rkuo@codeaurora.org>
Cc: Richard Weinberger <richard@nod.at>
Cc: Rich Felker <dalias@libc.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Serge Semin <fancer.lancer@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 57c8a661
...@@ -5,54 +5,23 @@ Boot time memory management ...@@ -5,54 +5,23 @@ Boot time memory management
Early system initialization cannot use "normal" memory management Early system initialization cannot use "normal" memory management
simply because it is not set up yet. But there is still need to simply because it is not set up yet. But there is still need to
allocate memory for various data structures, for instance for the allocate memory for various data structures, for instance for the
physical page allocator. To address this, a specialized allocator physical page allocator.
called the :ref:`Boot Memory Allocator <bootmem>`, or bootmem, was
introduced. Several years later PowerPC developers added a "Logical
Memory Blocks" allocator, which was later adopted by other
architectures and renamed to :ref:`memblock <memblock>`. There is also
a compatibility layer called `nobootmem` that translates bootmem
allocation interfaces to memblock calls.
The selection of the early allocator is done using A specialized allocator called ``memblock`` performs the
``CONFIG_NO_BOOTMEM`` and ``CONFIG_HAVE_MEMBLOCK`` kernel boot time memory management. The architecture specific initialization
configuration options. These options are enabled or disabled must set it up in :c:func:`setup_arch` and tear it down in
statically by the architectures' Kconfig files. :c:func:`mem_init` functions.
* Architectures that rely only on bootmem select
``CONFIG_NO_BOOTMEM=n && CONFIG_HAVE_MEMBLOCK=n``.
* The users of memblock with the nobootmem compatibility layer set
``CONFIG_NO_BOOTMEM=y && CONFIG_HAVE_MEMBLOCK=y``.
* And for those that use both memblock and bootmem the configuration
includes ``CONFIG_NO_BOOTMEM=n && CONFIG_HAVE_MEMBLOCK=y``.
Whichever allocator is used, it is the responsibility of the
architecture specific initialization to set it up in
:c:func:`setup_arch` and tear it down in :c:func:`mem_init` functions.
Once the early memory management is available it offers a variety of Once the early memory management is available it offers a variety of
functions and macros for memory allocations. The allocation request functions and macros for memory allocations. The allocation request
may be directed to the first (and probably the only) node or to a may be directed to the first (and probably the only) node or to a
particular node in a NUMA system. There are API variants that panic particular node in a NUMA system. There are API variants that panic
when an allocation fails and those that don't. And more recent and when an allocation fails and those that don't.
advanced memblock even allows controlling its own behaviour.
.. _bootmem:
Bootmem
=======
(mostly stolen from Mel Gorman's "Understanding the Linux Virtual Memblock also offers a variety of APIs that control its own behaviour.
Memory Manager" `book`_)
.. _book: https://www.kernel.org/doc/gorman/ Memblock Overview
=================
.. kernel-doc:: mm/bootmem.c
:doc: bootmem overview
.. _memblock:
Memblock
========
.. kernel-doc:: mm/memblock.c .. kernel-doc:: mm/memblock.c
:doc: memblock overview :doc: memblock overview
...@@ -61,26 +30,6 @@ Memblock ...@@ -61,26 +30,6 @@ Memblock
Functions and structures Functions and structures
======================== ========================
Common API
----------
The functions that are described in this section are available
regardless of what early memory manager is enabled.
.. kernel-doc:: mm/nobootmem.c
Bootmem specific API
--------------------
These interfaces available only with bootmem, i.e when ``CONFIG_NO_BOOTMEM=n``
.. kernel-doc:: include/linux/bootmem.h
.. kernel-doc:: mm/bootmem.c
:functions:
Memblock specific API
---------------------
Here is the description of memblock data structures, functions and Here is the description of memblock data structures, functions and
macros. Some of them are actually internal, but since they are macros. Some of them are actually internal, but since they are
documented it would be silly to omit them. Besides, reading the documented it would be silly to omit them. Besides, reading the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment