Commit 44eeb9b5 authored by Helge Deller's avatar Helge Deller

parisc: Prevent ldil() to sign-extend into upper 32 bits

Add some build time checks to prevent that the various usages of
	"ldil L%(TMPALIAS_MAP_START), %reg"
sign-extends into the upper 32 bits when building a 64-bit kernel.
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent c64c782e
...@@ -555,6 +555,12 @@ void __init mem_init(void) ...@@ -555,6 +555,12 @@ void __init mem_init(void)
BUILD_BUG_ON(PT_INITIAL > PTRS_PER_PGD); BUILD_BUG_ON(PT_INITIAL > PTRS_PER_PGD);
#endif #endif
#ifdef CONFIG_64BIT
/* avoid ldil_%L() asm statements to sign-extend into upper 32-bits */
BUILD_BUG_ON(__PAGE_OFFSET >= 0x80000000);
BUILD_BUG_ON(TMPALIAS_MAP_START >= 0x80000000);
#endif
high_memory = __va((max_pfn << PAGE_SHIFT)); high_memory = __va((max_pfn << PAGE_SHIFT));
set_max_mapnr(max_low_pfn); set_max_mapnr(max_low_pfn);
memblock_free_all(); memblock_free_all();
......
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