From 57ddf08642f0b1912c97791413d8c1fe31b6a339 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 24 Dec 2020 00:29:46 +0900 Subject: [PATCH 1/3] microblaze: do not select TRACING_SUPPORT directly Microblaze is the only architecture that selects TRACING_SUPPORT. In my understanding, it is computed by kernel/trace/Kconfig: config TRACING_SUPPORT bool depends on TRACE_IRQFLAGS_SUPPORT depends on STACKTRACE_SUPPORT default y Microblaze enables both TRACE_IRQFLAGS_SUPPORT and STACKTRACE_SUPPORT, so there is no change in the resulted configuration. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20201223152947.698744-1-masahiroy@kernel.org Signed-off-by: Michal Simek --- arch/microblaze/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig index f82795592ce5..b4ad4943d078 100644 --- a/arch/microblaze/Kconfig +++ b/arch/microblaze/Kconfig @@ -39,7 +39,6 @@ config MICROBLAZE select OF_EARLY_FLATTREE select PCI_DOMAINS_GENERIC if PCI select PCI_SYSCALL if PCI - select TRACING_SUPPORT select VIRT_TO_BUS select CPU_NO_EFFICIENT_FFS select MMU_GATHER_NO_RANGE From b68c8736a01f5eb21e4c2461f7c3c505e845e6ab Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Wed, 10 Feb 2021 15:11:40 +0100 Subject: [PATCH 2/3] microblaze: Remove support for gcc < 4 Since commit cafa0010cd51fb71 ("Raise the minimum required gcc version to 4.6") , the kernel can no longer be compiled using gcc-3. Hence drop support code for gcc-3. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20210210141140.1506212-5-geert+renesas@glider.be Signed-off-by: Michal Simek --- arch/microblaze/kernel/module.c | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/arch/microblaze/kernel/module.c b/arch/microblaze/kernel/module.c index 9f12e3c2bb42..e5db3a57b9e3 100644 --- a/arch/microblaze/kernel/module.c +++ b/arch/microblaze/kernel/module.c @@ -24,9 +24,6 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, Elf32_Sym *sym; unsigned long int *location; unsigned long int value; -#if __GNUC__ < 4 - unsigned long int old_value; -#endif pr_debug("Applying add relocation section %u to %u\n", relsec, sechdrs[relsec].sh_info); @@ -49,40 +46,17 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, */ case R_MICROBLAZE_32: -#if __GNUC__ < 4 - old_value = *location; - *location = value + old_value; - - pr_debug("R_MICROBLAZE_32 (%08lx->%08lx)\n", - old_value, value); -#else *location = value; -#endif break; case R_MICROBLAZE_64: -#if __GNUC__ < 4 - /* Split relocs only required/used pre gcc4.1.1 */ - old_value = ((location[0] & 0x0000FFFF) << 16) | - (location[1] & 0x0000FFFF); - value += old_value; -#endif location[0] = (location[0] & 0xFFFF0000) | (value >> 16); location[1] = (location[1] & 0xFFFF0000) | (value & 0xFFFF); -#if __GNUC__ < 4 - pr_debug("R_MICROBLAZE_64 (%08lx->%08lx)\n", - old_value, value); -#endif break; case R_MICROBLAZE_64_PCREL: -#if __GNUC__ < 4 - old_value = (location[0] & 0xFFFF) << 16 | - (location[1] & 0xFFFF); - value -= old_value; -#endif value -= (unsigned long int)(location) + 4; location[0] = (location[0] & 0xFFFF0000) | (value >> 16); From 48783be427c70a377c83a17d045eee98c90220da Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Fri, 12 Feb 2021 19:16:24 -0600 Subject: [PATCH 3/3] microblaze: Fix built-in DTB alignment to be 8-byte aligned Commit 79edff12060f ("scripts/dtc: Update to upstream version v1.6.0-51-g183df9e9c2b9") broke booting on Microblaze systems depending on the build. The problem is libfdt gained an 8-byte starting alignment check, but the Microblaze built-in DTB area is only 4-byte aligned. This affected not just built-in DTBs as bootloader passed DTBs are copied into the built-in DTB region. Other arches using built-in DTBs use a common linker macro which has sufficient alignment. Fixes: 79edff12060f ("scripts/dtc: Update to upstream version v1.6.0-51-g183df9e9c2b9") Reported-by: Guenter Roeck Tested-by: Guenter Roeck Cc: Michal Simek Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210213011624.251838-1-robh@kernel.org Signed-off-by: Michal Simek --- arch/microblaze/kernel/vmlinux.lds.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/microblaze/kernel/vmlinux.lds.S b/arch/microblaze/kernel/vmlinux.lds.S index df07b3d06cd6..fb31747ec092 100644 --- a/arch/microblaze/kernel/vmlinux.lds.S +++ b/arch/microblaze/kernel/vmlinux.lds.S @@ -45,7 +45,7 @@ SECTIONS { _etext = . ; } - . = ALIGN (4) ; + . = ALIGN (8) ; __fdt_blob : AT(ADDR(__fdt_blob) - LOAD_OFFSET) { _fdt_start = . ; /* place for fdt blob */ *(__fdt_blob) ; /* Any link-placed DTB */