diff options
author | Mike Rapoport <rppt@linux.ibm.com> | 2019-02-12 10:32:36 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-09 23:26:17 +0200 |
commit | f4d9a23d3dad0252f375901bf4ff6523a2c97241 (patch) | |
tree | 432421c225e82793c7318b9773b73495893be1d6 /samples | |
parent | sparc: use struct_size() in kzalloc() (diff) | |
download | linux-f4d9a23d3dad0252f375901bf4ff6523a2c97241.tar.xz linux-f4d9a23d3dad0252f375901bf4ff6523a2c97241.zip |
sparc64: simplify reduce_memory() function
The reduce_memory() function clampls the available memory to a limit
defined by the "mem=" command line parameter. It takes into account the
amount of already reserved memory and excludes it from the limit
calculations.
Rather than traverse memblocks and remove them by hand, use
memblock_reserved_size() to account the reserved memory and
memblock_enforce_memory_limit() to clamp the available memory.
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions