aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-s390
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2008-02-05 10:50:49 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-02-05 10:51:01 -0500
commit0189103c69f47712a0c542a8bc28ff46ebe53a8a (patch)
tree35dcc4e4bc91c3a8dd5bc2eeb14b6ffd07614234 /include/asm-s390
parente35e1fadb4585e3143fab34dd4f5070698b3305b (diff)
[S390] Remove BUILD_BUG_ON() in vmem code.
Remove BUILD_BUG_ON() in vmem code since it causes build failures if the size of struct page increases. Instead calculate at compile time the address of the highest physical address that can be added to the 1:1 mapping. This supposed to fix a build failure with the page owner tracking leak detector patches as reported by akpm. page-owner-tracking-leak-detector-broken-on-s390.patch can be removed from -mm again when this is merged. Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'include/asm-s390')
-rw-r--r--include/asm-s390/pgtable.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h
index 79b9eab1a0c7..3f520754e71c 100644
--- a/include/asm-s390/pgtable.h
+++ b/include/asm-s390/pgtable.h
@@ -115,15 +115,21 @@ extern char empty_zero_page[PAGE_SIZE];
115#ifndef __s390x__ 115#ifndef __s390x__
116#define VMALLOC_START 0x78000000UL 116#define VMALLOC_START 0x78000000UL
117#define VMALLOC_END 0x7e000000UL 117#define VMALLOC_END 0x7e000000UL
118#define VMEM_MAP_MAX 0x80000000UL 118#define VMEM_MAP_END 0x80000000UL
119#else /* __s390x__ */ 119#else /* __s390x__ */
120#define VMALLOC_START 0x3e000000000UL 120#define VMALLOC_START 0x3e000000000UL
121#define VMALLOC_END 0x3e040000000UL 121#define VMALLOC_END 0x3e040000000UL
122#define VMEM_MAP_MAX 0x40000000000UL 122#define VMEM_MAP_END 0x40000000000UL
123#endif /* __s390x__ */ 123#endif /* __s390x__ */
124 124
125/*
126 * VMEM_MAX_PHYS is the highest physical address that can be added to the 1:1
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.
129 */
130#define VMEM_MAX_PHYS min(VMALLOC_START, ((VMEM_MAP_END - VMALLOC_END) / \
131 sizeof(struct page) * PAGE_SIZE) & ~((16 << 20) - 1))
125#define VMEM_MAP ((struct page *) VMALLOC_END) 132#define VMEM_MAP ((struct page *) VMALLOC_END)
126#define VMEM_MAP_SIZE ((VMALLOC_START / PAGE_SIZE) * sizeof(struct page))
127 133
128/* 134/*
129 * A 31 bit pagetable entry of S390 has following format: 135 * A 31 bit pagetable entry of S390 has following format: