m68k/coldfire: use PFN_DOWN macro
Replace ((x) >> PAGE_SHIFT) with the predefined PFN_DOWN macro. Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
This commit is contained in:
parent
5bbc08fb0f
commit
50e48bd067
1 changed files with 5 additions and 4 deletions
|
@ -25,6 +25,7 @@
|
||||||
#include <asm/m54xxgpt.h>
|
#include <asm/m54xxgpt.h>
|
||||||
#ifdef CONFIG_MMU
|
#ifdef CONFIG_MMU
|
||||||
#include <asm/mmu_context.h>
|
#include <asm/mmu_context.h>
|
||||||
|
#include <linux/pfn.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
@ -91,13 +92,13 @@ static void __init mcf54xx_bootmem_alloc(void)
|
||||||
m68k_memory[0].size = _ramend - _rambase;
|
m68k_memory[0].size = _ramend - _rambase;
|
||||||
|
|
||||||
/* compute total pages in system */
|
/* compute total pages in system */
|
||||||
num_pages = (_ramend - _rambase) >> PAGE_SHIFT;
|
num_pages = PFN_DOWN(_ramend - _rambase);
|
||||||
|
|
||||||
/* page numbers */
|
/* page numbers */
|
||||||
memstart = PAGE_ALIGN(_ramstart);
|
memstart = PAGE_ALIGN(_ramstart);
|
||||||
min_low_pfn = _rambase >> PAGE_SHIFT;
|
min_low_pfn = PFN_DOWN(_rambase);
|
||||||
start_pfn = memstart >> PAGE_SHIFT;
|
start_pfn = PFN_DOWN(memstart);
|
||||||
max_low_pfn = _ramend >> PAGE_SHIFT;
|
max_low_pfn = PFN_DOWN(_ramend);
|
||||||
high_memory = (void *)_ramend;
|
high_memory = (void *)_ramend;
|
||||||
|
|
||||||
m68k_virt_to_node_shift = fls(_ramend - _rambase - 1) - 6;
|
m68k_virt_to_node_shift = fls(_ramend - _rambase - 1) - 6;
|
||||||
|
|
Loading…
Add table
Reference in a new issue