#endif
struct meminfo;
+struct machine_desc;
-extern void arm_memblock_init(struct meminfo *);
+extern void arm_memblock_init(struct meminfo *, struct machine_desc *);
#endif
parse_early_param();
- arm_memblock_init(&meminfo);
+ arm_memblock_init(&meminfo, mdesc);
paging_init(mdesc);
request_standard_resources(&meminfo, mdesc);
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <linux/init.h>
-#include <linux/bootmem.h>
+#include <linux/memblock.h>
#include <linux/types.h>
#include <linux/string.h>
/* Reserve screen memory region at the start of main system memory. */
static void __init edb7211_reserve(void)
{
- reserve_bootmem(PHYS_OFFSET, 0x00020000, BOOTMEM_DEFAULT);
+ memblock_reserve(PHYS_OFFSET, 0x00020000);
}
static void __init
#include <linux/spinlock.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
-#include <linux/bootmem.h>
+#include <linux/memblock.h>
#include <linux/sched.h>
#include <linux/smp.h>
#include <linux/termios.h>
*/
void __init integrator_reserve(void)
{
- reserve_bootmem(PHYS_OFFSET, __pa(swapper_pg_dir) - PHYS_OFFSET, BOOTMEM_DEFAULT);
+ memblock_reserve(PHYS_OFFSET, __pa(swapper_pg_dir) - PHYS_OFFSET);
}
#include <linux/irq.h>
#include <linux/gpio_keys.h>
#include <linux/input.h>
-#include <linux/bootmem.h>
+#include <linux/memblock.h>
#include <linux/pda_power.h>
#include <linux/pwm_backlight.h>
#include <linux/gpio.h>
static void __init palmt5_reserve(void)
{
- reserve_bootmem(0xa0200000, 0x1000, BOOTMEM_EXCLUSIVE);
+ memblock_reserve(0xa0200000, 0x1000);
}
static void __init palmt5_init(void)
#include <linux/irq.h>
#include <linux/gpio_keys.h>
#include <linux/input.h>
-#include <linux/bootmem.h>
+#include <linux/memblock.h>
#include <linux/pda_power.h>
#include <linux/pwm_backlight.h>
#include <linux/gpio.h>
static void __init treo_reserve(void)
{
- reserve_bootmem(0xa0000000, 0x1000, BOOTMEM_EXCLUSIVE);
- reserve_bootmem(0xa2000000, 0x1000, BOOTMEM_EXCLUSIVE);
+ memblock_reserve(0xa0000000, 0x1000);
+ memblock_reserve(0xa2000000, 0x1000);
}
static void __init treo_init(void)
#include <linux/types.h>
#include <linux/interrupt.h>
#include <linux/list.h>
-#include <linux/bootmem.h>
+#include <linux/memblock.h>
#include <linux/timer.h>
#include <linux/init.h>
#include <linux/sysdev.h>
/* H1940 and RX3715 need to reserve this for suspend */
static void __init h1940_reserve(void)
{
- reserve_bootmem(0x30003000, 0x1000, BOOTMEM_DEFAULT);
- reserve_bootmem(0x30081000, 0x1000, BOOTMEM_DEFAULT);
+ memblock_reserve(0x30003000, 0x1000);
+ memblock_reserve(0x30081000, 0x1000);
}
static void __init h1940_init_irq(void)
#include <linux/types.h>
#include <linux/interrupt.h>
#include <linux/list.h>
-#include <linux/bootmem.h>
+#include <linux/memblock.h>
#include <linux/delay.h>
#include <linux/timer.h>
#include <linux/init.h>
/* H1940 and RX3715 need to reserve this for suspend */
static void __init rx1950_reserve(void)
{
- reserve_bootmem(0x30003000, 0x1000, BOOTMEM_DEFAULT);
- reserve_bootmem(0x30081000, 0x1000, BOOTMEM_DEFAULT);
+ memblock_reserve(0x30003000, 0x1000);
+ memblock_reserve(0x30081000, 0x1000);
}
MACHINE_START(RX1950, "HP iPAQ RX1950")
#include <linux/types.h>
#include <linux/interrupt.h>
#include <linux/list.h>
-#include <linux/bootmem.h>
+#include <linux/memblock.h>
#include <linux/timer.h>
#include <linux/init.h>
#include <linux/tty.h>
/* H1940 and RX3715 need to reserve this for suspend */
static void __init rx3715_reserve(void)
{
- reserve_bootmem(0x30003000, 0x1000, BOOTMEM_DEFAULT);
- reserve_bootmem(0x30081000, 0x1000, BOOTMEM_DEFAULT);
+ memblock_reserve(0x30003000, 0x1000);
+ memblock_reserve(0x30081000, 0x1000);
}
static void __init rx3715_init_irq(void)
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
-#include <linux/bootmem.h>
+#include <linux/memblock.h>
#include <linux/platform_device.h>
#include <linux/io.h>
#include <mach/hardware.h>
#ifdef CONFIG_MACH_U300_SINGLE_RAM
#if ((CONFIG_MACH_U300_ACCESS_MEM_SIZE & 1) == 1) && \
CONFIG_MACH_U300_2MB_ALIGNMENT_FIX
- reserve_bootmem(PHYS_OFFSET, 0x00100000, BOOTMEM_DEFAULT);
+ memblock_reserve(PHYS_OFFSET, 0x00100000);
#endif
#endif
}
}
#endif
-void __init arm_memblock_init(struct meminfo *mi)
+void __init arm_memblock_init(struct meminfo *mi, struct machine_desc *mdesc)
{
int i;
arm_mm_memblock_reserve();
+ /* reserve any platform specific memblock areas */
+ if (mdesc->reserve)
+ mdesc->reserve();
+
memblock_analyze();
memblock_dump_all();
}
-void __init bootmem_init(struct machine_desc *mdesc)
+void __init bootmem_init(void)
{
struct meminfo *mi = &meminfo;
unsigned long min, max_low, max_high;
arm_bootmem_init(mi, min, max_low);
- if (mdesc->reserve)
- mdesc->reserve();
-
/*
* Sparsemem tries to allocate bootmem in memory_present(),
* so must be done after the fixed reservations
#endif
-struct machine_desc;
-void __init bootmem_init(struct machine_desc *);
+void __init bootmem_init(void);
void arm_mm_memblock_reserve(void);
/* allocate the zero page. */
zero_page = early_alloc(PAGE_SIZE);
- bootmem_init(mdesc);
+ bootmem_init();
empty_zero_page = virt_to_page(zero_page);
__flush_dcache_page(NULL, empty_zero_page);
*/
void __init paging_init(struct machine_desc *mdesc)
{
- bootmem_init(mdesc);
+ bootmem_init();
}
/*