mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-04 05:34:40 +00:00
arm64: set initrd_start/initrd_end for fdt scan
In order to unify the initrd scanning for DT across architectures, make arm64 use initrd_start and initrd_end instead of the physical addresses. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: linux-arm-kernel@lists.infradead.org
This commit is contained in:
parent
65939301ac
commit
ec2eaa73b3
1 changed files with 6 additions and 18 deletions
|
@ -39,17 +39,9 @@
|
||||||
|
|
||||||
#include "mm.h"
|
#include "mm.h"
|
||||||
|
|
||||||
static unsigned long phys_initrd_start __initdata = 0;
|
|
||||||
static unsigned long phys_initrd_size __initdata = 0;
|
|
||||||
|
|
||||||
phys_addr_t memstart_addr __read_mostly = 0;
|
phys_addr_t memstart_addr __read_mostly = 0;
|
||||||
|
|
||||||
void __init early_init_dt_setup_initrd_arch(u64 start, u64 end)
|
#ifdef CONFIG_BLK_DEV_INITRD
|
||||||
{
|
|
||||||
phys_initrd_start = start;
|
|
||||||
phys_initrd_size = end - start;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int __init early_initrd(char *p)
|
static int __init early_initrd(char *p)
|
||||||
{
|
{
|
||||||
unsigned long start, size;
|
unsigned long start, size;
|
||||||
|
@ -59,12 +51,13 @@ static int __init early_initrd(char *p)
|
||||||
if (*endp == ',') {
|
if (*endp == ',') {
|
||||||
size = memparse(endp + 1, NULL);
|
size = memparse(endp + 1, NULL);
|
||||||
|
|
||||||
phys_initrd_start = start;
|
initrd_start = (unsigned long)__va(start);
|
||||||
phys_initrd_size = size;
|
initrd_end = (unsigned long)__va(start + size);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
early_param("initrd", early_initrd);
|
early_param("initrd", early_initrd);
|
||||||
|
#endif
|
||||||
|
|
||||||
#define MAX_DMA32_PFN ((4UL * 1024 * 1024 * 1024) >> PAGE_SHIFT)
|
#define MAX_DMA32_PFN ((4UL * 1024 * 1024 * 1024) >> PAGE_SHIFT)
|
||||||
|
|
||||||
|
@ -137,13 +130,8 @@ void __init arm64_memblock_init(void)
|
||||||
/* Register the kernel text, kernel data and initrd with memblock */
|
/* Register the kernel text, kernel data and initrd with memblock */
|
||||||
memblock_reserve(__pa(_text), _end - _text);
|
memblock_reserve(__pa(_text), _end - _text);
|
||||||
#ifdef CONFIG_BLK_DEV_INITRD
|
#ifdef CONFIG_BLK_DEV_INITRD
|
||||||
if (phys_initrd_size) {
|
if (initrd_start)
|
||||||
memblock_reserve(phys_initrd_start, phys_initrd_size);
|
memblock_reserve(__virt_to_phys(initrd_start), initrd_end - initrd_start);
|
||||||
|
|
||||||
/* Now convert initrd to virtual addresses */
|
|
||||||
initrd_start = __phys_to_virt(phys_initrd_start);
|
|
||||||
initrd_end = initrd_start + phys_initrd_size;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue