mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 14:19:16 +00:00
[PATCH] bootmem: use MAX_DMA_ADDRESS instead of LOW32LIMIT
Introduce ARCH_LOW_ADDRESS_LIMIT which can be set per architecture to override the 4GB default limit used by the bootmem allocater within __alloc_bootmem_low() and __alloc_bootmem_low_node(). E.g. s390 needs a 2GB limit instead of 4GB. Acked-by: Ingo Molnar <mingo@elte.hu> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
b72f160443
commit
dfd54cbcc0
2 changed files with 10 additions and 3 deletions
|
@ -337,6 +337,8 @@ struct notifier_block;
|
||||||
int register_idle_notifier(struct notifier_block *nb);
|
int register_idle_notifier(struct notifier_block *nb);
|
||||||
int unregister_idle_notifier(struct notifier_block *nb);
|
int unregister_idle_notifier(struct notifier_block *nb);
|
||||||
|
|
||||||
|
#define ARCH_LOW_ADDRESS_LIMIT 0x7fffffffUL
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
11
mm/bootmem.c
11
mm/bootmem.c
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
#include <asm/bug.h>
|
#include <asm/bug.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
|
#include <asm/processor.h>
|
||||||
|
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
|
||||||
|
@ -453,7 +454,9 @@ void * __init __alloc_bootmem_node(pg_data_t *pgdat, unsigned long size,
|
||||||
return __alloc_bootmem(size, align, goal);
|
return __alloc_bootmem(size, align, goal);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LOW32LIMIT 0xffffffff
|
#ifndef ARCH_LOW_ADDRESS_LIMIT
|
||||||
|
#define ARCH_LOW_ADDRESS_LIMIT 0xffffffffUL
|
||||||
|
#endif
|
||||||
|
|
||||||
void * __init __alloc_bootmem_low(unsigned long size, unsigned long align,
|
void * __init __alloc_bootmem_low(unsigned long size, unsigned long align,
|
||||||
unsigned long goal)
|
unsigned long goal)
|
||||||
|
@ -462,7 +465,8 @@ void * __init __alloc_bootmem_low(unsigned long size, unsigned long align,
|
||||||
void *ptr;
|
void *ptr;
|
||||||
|
|
||||||
list_for_each_entry(bdata, &bdata_list, list) {
|
list_for_each_entry(bdata, &bdata_list, list) {
|
||||||
ptr = __alloc_bootmem_core(bdata, size, align, goal, LOW32LIMIT);
|
ptr = __alloc_bootmem_core(bdata, size, align, goal,
|
||||||
|
ARCH_LOW_ADDRESS_LIMIT);
|
||||||
if (ptr)
|
if (ptr)
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
@ -478,5 +482,6 @@ void * __init __alloc_bootmem_low(unsigned long size, unsigned long align,
|
||||||
void * __init __alloc_bootmem_low_node(pg_data_t *pgdat, unsigned long size,
|
void * __init __alloc_bootmem_low_node(pg_data_t *pgdat, unsigned long size,
|
||||||
unsigned long align, unsigned long goal)
|
unsigned long align, unsigned long goal)
|
||||||
{
|
{
|
||||||
return __alloc_bootmem_core(pgdat->bdata, size, align, goal, LOW32LIMIT);
|
return __alloc_bootmem_core(pgdat->bdata, size, align, goal,
|
||||||
|
ARCH_LOW_ADDRESS_LIMIT);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue