[PATCH] [V2]powerpc/dts: fix not include DTC_FLAGS
A central rule exists to create `$(obj)/%.dtb` from `$(src)/%.dts`,DTC_FLAGS flag must be used with it. See other architecture and Documentation: arch/microblaze/boot/dts/Makefile Documentation/kbuild/makefiles.rst +1433 Signed-off-by: Youlin Song --- arch/powerpc/boot/Makefile | 2 -- arch/powerpc/boot/dts/Makefile | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 2b8da923ceca..a3bc3aec3c0c 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -72,8 +72,6 @@ endif BOOTCFLAGS += -I$(objtree)/$(obj) -I$(srctree)/$(obj) -DTC_FLAGS ?= -p 1024 - $(obj)/4xx.o: BOOTCFLAGS += -mcpu=405 $(obj)/ebony.o: BOOTCFLAGS += -mcpu=440 $(obj)/cuboot-hotfoot.o: BOOTCFLAGS += -mcpu=405 diff --git a/arch/powerpc/boot/dts/Makefile b/arch/powerpc/boot/dts/Makefile index fb335d05aae8..c21165c0cd76 100644 --- a/arch/powerpc/boot/dts/Makefile +++ b/arch/powerpc/boot/dts/Makefile @@ -2,5 +2,6 @@ subdir-y += fsl +DTC_FLAGS ?= -p 1024 dtstree:= $(srctree)/$(src) dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts)) -- 2.25.1
[PATCH] powerpc/dts: fix not include DTC_FLAGS
I wanted to build the fsl dts in my machine and found that the dtb have not extra space,so uboot will cause about FDT_ERR_NOSPACE issue. Signed-off-by: Youlin Song --- arch/powerpc/boot/dts/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/boot/dts/Makefile b/arch/powerpc/boot/dts/Makefile index fb335d05aae8..c21165c0cd76 100644 --- a/arch/powerpc/boot/dts/Makefile +++ b/arch/powerpc/boot/dts/Makefile @@ -2,5 +2,6 @@ subdir-y += fsl +DTC_FLAGS ?= -p 1024 dtstree:= $(srctree)/$(src) dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts)) -- 2.25.1
[PATCH] powerpc: memblock alloc fixes
If the memory starts at 64MB physical address,the memblock will not be allocated.Because it was in the range of 0~64M (according to TLB) to alloc when the system was started, but the memblock calculates whether it is in this space based on the actual physical address(offset 64M). Signed-off-by: Youlin Song --- arch/powerpc/kernel/prom.c | 2 ++ arch/powerpc/mm/nohash/fsl_booke.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 9a4797d1d40d..addc05c6f8ff 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -785,6 +785,8 @@ void __init early_init_devtree(void *params) DBG("Phys. mem: %llx\n", (unsigned long long)memblock_phys_mem_size()); + memblock_set_bottom_up(true); + /* We may need to relocate the flat tree, do it now. * FIXME .. and the initrd too? */ move_device_tree(); diff --git a/arch/powerpc/mm/nohash/fsl_booke.c b/arch/powerpc/mm/nohash/fsl_booke.c index 03dacbe940e5..f6f36e78ec41 100644 --- a/arch/powerpc/mm/nohash/fsl_booke.c +++ b/arch/powerpc/mm/nohash/fsl_booke.c @@ -264,7 +264,7 @@ void setup_initial_memory_limit(phys_addr_t first_memblock_base, phys_addr_t limit = first_memblock_base + first_memblock_size; /* 64M mapped initially according to head_fsl_booke.S */ - memblock_set_current_limit(min_t(u64, limit, 0x0400)); + memblock_set_current_limit(min_t(u64, limit, first_memblock_base + 0x0400)); } #ifdef CONFIG_RELOCATABLE -- 2.25.1
[PATCH] powerpc/prom: move the device tree to the right space
If the device tree has been allocated memory and it will be in the memblock reserved space.Obviously it is in a valid memory declaration and will be mapped by the kernel. Signed-off-by: Youlin Song --- arch/powerpc/kernel/prom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 9a4797d1d40d..ef5f93e7d7f2 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -121,7 +121,7 @@ static void __init move_device_tree(void) size = fdt_totalsize(initial_boot_params); if ((memory_limit && (start + size) > PHYSICAL_START + memory_limit) || - !memblock_is_memory(start + size - 1) || + (!memblock_is_memory(start + size - 1) && !memblock_is_reserved(start + size - 1)) || overlaps_crashkernel(start, size) || overlaps_initrd(start, size)) { p = memblock_alloc_raw(size, PAGE_SIZE); if (!p) -- 2.25.1