Skip to content

Commit

Permalink
x86: Use memblock_set_current_limit() to set limit for memblock.
Browse files Browse the repository at this point in the history
In setup_arch() of x86, it set memblock.current_limit directly.
We should use memblock_set_current_limit(). If the implementation
is changed, it is easy to maintain.

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
Link: http://lkml.kernel.org/r/1376451844-15682-1-git-send-email-tangchen@cn.fujitsu.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
  • Loading branch information
Tang Chen authored and H. Peter Anvin committed Aug 14, 2013
1 parent d4f5228 commit 2449f34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/x86/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ void __init setup_arch(char **cmdline_p)

cleanup_highmap();

memblock.current_limit = ISA_END_ADDRESS;
memblock_set_current_limit(ISA_END_ADDRESS);
memblock_x86_fill();

/*
Expand Down Expand Up @@ -1103,7 +1103,7 @@ void __init setup_arch(char **cmdline_p)

setup_real_mode();

memblock.current_limit = get_max_mapped();
memblock_set_current_limit(get_max_mapped());
dma_contiguous_reserve(0);

/*
Expand Down

0 comments on commit 2449f34

Please sign in to comment.