Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f599861 authored by Paul Mundt's avatar Paul Mundt
Browse files

sh: Add a machvec callback for early memblock reservations.



This adds in a callback to the machvec to allow platforms to do early
reservations through memblock.

Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent e54be894
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ struct sh_machine_vector {
	int (*mv_mode_pins)(void);

	void (*mv_mem_init)(void);
	void (*mv_mem_reserve)(void);
};

extern struct sh_machine_vector sh_mv;
+8 −2
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
 * linux/arch/sh/mm/init.c
 *
 *  Copyright (C) 1999  Niibe Yutaka
 *  Copyright (C) 2002 - 2010  Paul Mundt
 *  Copyright (C) 2002 - 2011  Paul Mundt
 *
 *  Based on linux/arch/i386/mm/init.c:
 *   Copyright (C) 1995  Linus Torvalds
@@ -325,11 +325,17 @@ void __init paging_init(void)
	int nid;

	memblock_init();

	sh_mv.mv_mem_init();

	early_reserve_mem();

	/*
	 * Once the early reservations are out of the way, give the
	 * platforms a chance to kick out some memory.
	 */
	if (sh_mv.mv_mem_reserve)
		sh_mv.mv_mem_reserve();

	memblock_enforce_memory_limit(memory_limit);
	memblock_analyze();