x86-32: tighten the bound on additional memory to map
[pandora-kernel.git] / arch / x86 / kernel / head_32.S
index fc884b9..3068388 100644 (file)
@@ -60,7 +60,8 @@
 #endif
 
 /* Enough space to fit pagetables for the low memory linear map */
-MAPPING_BEYOND_END = (PAGE_TABLE_SIZE(1 << (32 - PAGE_SHIFT)) * PAGE_SIZE)
+MAPPING_BEYOND_END = \
+       PAGE_TABLE_SIZE(((1<<32) - __PAGE_OFFSET) >> PAGE_SHIFT) << PAGE_SHIFT
 
 /*
  * Worst-case size of the kernel mapping we need to make: