aboutsummaryrefslogtreecommitdiffstats
path: root/arch
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 /arch
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 'arch')
-rw-r--r--arch/s390/kernel/setup.c2
-rw-r--r--arch/s390/mm/vmem.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 72d20f70f8a6..29ae165d1749 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -528,7 +528,7 @@ static void __init setup_memory_end(void)
528 memory_size = 0; 528 memory_size = 0;
529 memory_end &= PAGE_MASK; 529 memory_end &= PAGE_MASK;
530 530
531 max_mem = memory_end ? min(VMALLOC_START, memory_end) : VMALLOC_START; 531 max_mem = memory_end ? min(VMEM_MAX_PHYS, memory_end) : VMEM_MAX_PHYS;
532 memory_end = min(max_mem, memory_end); 532 memory_end = min(max_mem, memory_end);
533 533
534 /* 534 /*
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c
index 07e046777243..7c1287ccf788 100644
--- a/arch/s390/mm/vmem.c
+++ b/arch/s390/mm/vmem.c
@@ -250,7 +250,7 @@ static int insert_memory_segment(struct memory_segment *seg)
250{ 250{
251 struct memory_segment *tmp; 251 struct memory_segment *tmp;
252 252
253 if (seg->start + seg->size >= VMALLOC_START || 253 if (seg->start + seg->size >= VMEM_MAX_PHYS ||
254 seg->start + seg->size < seg->start) 254 seg->start + seg->size < seg->start)
255 return -ERANGE; 255 return -ERANGE;
256 256
@@ -360,7 +360,6 @@ void __init vmem_map_init(void)
360{ 360{
361 int i; 361 int i;
362 362
363 BUILD_BUG_ON((unsigned long)VMEM_MAP + VMEM_MAP_SIZE > VMEM_MAP_MAX);
364 NODE_DATA(0)->node_mem_map = VMEM_MAP; 363 NODE_DATA(0)->node_mem_map = VMEM_MAP;
365 for (i = 0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) 364 for (i = 0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++)
366 vmem_add_mem(memory_chunk[i].addr, memory_chunk[i].size); 365 vmem_add_mem(memory_chunk[i].addr, memory_chunk[i].size);