generic: make PFN_PHYS explicitly return phys_addr_t
PFN_PHYS, as its name suggests, turns a pfn into a physical address. However, it is a macro which just operates on its argument without modifying its type. pfns are typed unsigned long, but an unsigned long may not be long enough to hold a physical address (32-bit systems with more than 32 bits of physcial address). Make sure we cast to phys_addr_t to return a complete result. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Ingo Molnar
parent
600715dcdf
commit
947d0496cf
@@ -111,9 +111,9 @@ unsigned long __init setup_memory(void)
|
||||
initrd_start, INITRD_SIZE);
|
||||
} else {
|
||||
printk("initrd extends beyond end of memory "
|
||||
"(0x%08lx > 0x%08lx)\ndisabling initrd\n",
|
||||
"(0x%08lx > 0x%08llx)\ndisabling initrd\n",
|
||||
INITRD_START + INITRD_SIZE,
|
||||
PFN_PHYS(max_low_pfn));
|
||||
(unsigned long long)PFN_PHYS(max_low_pfn));
|
||||
|
||||
initrd_start = 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user