aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-s390/pgtable.h
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2008-02-09 12:24:31 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-02-09 12:24:38 -0500
commit522d8dc08b16deb51c128d544ab1cb9c621c950e (patch)
tree8754b17e8d6583ef27d1fe016c96b3bded0f62fa /include/asm-s390/pgtable.h
parentb90b34c6802865d07f482650eff82a4b38df6d79 (diff)
[S390] VMEM_MAX_PHYS overflow on 31 bit.
With the new space saving spinlock_t and a non-debug configuration the struct page only has 32 bytes for 31 bit s390. The causes an overflow in the calculation of VMEM_MAX_PHYS which renders the kernel unbootable. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'include/asm-s390/pgtable.h')
-rw-r--r--include/asm-s390/pgtable.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h
index 3f520754e71c..65d333849150 100644
--- a/include/asm-s390/pgtable.h
+++ b/include/asm-s390/pgtable.h
@@ -127,8 +127,9 @@ extern char empty_zero_page[PAGE_SIZE];
127 * mapping. This needs to be calculated at compile time since the size of the 127 * mapping. This needs to be calculated at compile time since the size of the
128 * VMEM_MAP is static but the size of struct page can change. 128 * VMEM_MAP is static but the size of struct page can change.
129 */ 129 */
130#define VMEM_MAX_PHYS min(VMALLOC_START, ((VMEM_MAP_END - VMALLOC_END) / \ 130#define VMEM_MAX_PAGES ((VMEM_MAP_END - VMALLOC_END) / sizeof(struct page))
131 sizeof(struct page) * PAGE_SIZE) & ~((16 << 20) - 1)) 131#define VMEM_MAX_PFN min(VMALLOC_START >> PAGE_SHIFT, VMEM_MAX_PAGES)
132#define VMEM_MAX_PHYS ((VMEM_MAX_PFN << PAGE_SHIFT) & ~((16 << 20) - 1))
132#define VMEM_MAP ((struct page *) VMALLOC_END) 133#define VMEM_MAP ((struct page *) VMALLOC_END)
133 134
134/* 135/*