Skip to contentSkip to conversation

Remove more checks for CONFIG_SYS_TEXT_BASE being set

PATCH In review Alexey Brodkin 2 participants 3 messages Feb 1, 2018 – Feb 11, 2018 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove more checks for CONFIG_SYS_TEXT_BASE being set

Now when Blackfin is gone CONFIG_SYS_TEXT_BASE is supposed to be set for each and every board which makes checks for this macro being set completely redundant.

Note there're still checks for CONFIG_SYS_TEXT_BASE in quite a few board configurations in "include/configs/XXX.h" which at some point might be cleaned-up too.

But at least sources are clean now.

Cc Masahiro Yamada <[email protected]>
Cc Tom Rini <[email protected]>
---
 arch/x86/lib/relocate.c | 4 ----
 common/autoboot.c       | 4 ++--
 common/board_f.c        | 6 ------
 3 files changed, 2 insertions(+), 12 deletions(-)
arch/x86/lib/relocate.c +0 -4
index 114f602f7aba..352f5512a9ea 100644
@@ -145,11 +145,7 @@ int do_elf_reloc_fixups(void)
 	if (re_src == re_end)
 		panic("No relocation data");
 
-#ifdef CONFIG_SYS_TEXT_BASE
 	text_base = CONFIG_SYS_TEXT_BASE;
-#else
-	panic("No CONFIG_SYS_TEXT_BASE");
-#endif
 #if CONFIG_IS_ENABLED(X86_64)
 	do_elf_reloc_fixups64(text_base, size, re_src, re_end);
 #else
common/autoboot.c +2 -2
index 2eef7a04cc73..3d029c35a122 100644
@@ -272,7 +272,7 @@ static int abortboot(int bootdelay)
 
 static void process_fdt_options(const void *blob)
 {
-#if defined(CONFIG_OF_CONTROL) && defined(CONFIG_SYS_TEXT_BASE)
+#ifdef CONFIG_OF_CONTROL
 	ulong addr;
 
 	/* Add an env variable to point to a kernel payload, if available */
@@ -284,7 +284,7 @@ static void process_fdt_options(const void *blob)
 	addr = fdtdec_get_config_int(gd->fdt_blob, "rootdisk-offset", 0);
 	if (addr)
 		env_set_addr("rootaddr", (void *)(CONFIG_SYS_TEXT_BASE + addr));
-#endif /* CONFIG_OF_CONTROL && CONFIG_SYS_TEXT_BASE */
+#endif /* CONFIG_OF_CONTROL */
 }
 
 const char *bootdelay_process(void)
common/board_f.c +0 -6
index c6bc53e1bf05..a4f614a5322a 100644
@@ -129,11 +129,7 @@ static int display_text_info(void)
 	bss_start = (ulong)&__bss_start;
 	bss_end = (ulong)&__bss_end;
 
-#ifdef CONFIG_SYS_TEXT_BASE
 	text_base = CONFIG_SYS_TEXT_BASE;
-#else
-	text_base = CONFIG_SYS_MONITOR_BASE;
-#endif
 
 	debug("U-Boot code: %08lX -> %08lX  BSS: -> %08lX\n",
 	      text_base, bss_start, bss_end);
@@ -620,7 +616,6 @@ static int setup_reloc(void)
 		return 0;
 	}
 
-#ifdef CONFIG_SYS_TEXT_BASE
 #ifdef ARM
 	gd->reloc_off = gd->relocaddr - (unsigned long)__image_copy_start;
 #elif defined(CONFIG_M68K)
@@ -631,7 +626,6 @@ static int setup_reloc(void)
 	gd->reloc_off = gd->relocaddr - (CONFIG_SYS_TEXT_BASE + 0x400);
 #else
 	gd->reloc_off = gd->relocaddr - CONFIG_SYS_TEXT_BASE;
-#endif
 #endif
 	memcpy(gd->new_gd, (char *)gd, sizeof(gd_t));
 
Signature · 1 line
2.14.3
#1 lore raw

PATCH 1/1 Remove more checks for CONFIG_SYS_TEXT_BASE being set

Quoted 8 lines · Alexey Brodkin

Now when Blackfin is gone CONFIG_SYS_TEXT_BASE is supposed to be set for each and every board which makes checks for this macro being set completely redundant.

Note there're still checks for CONFIG_SYS_TEXT_BASE in quite a few board configurations in "include/configs/XXX.h" which at some point might be cleaned-up too.

Quoted 5 lines

But at least sources are clean now.

Cc Masahiro Yamada <[email protected]>
Cc Tom Rini <[email protected]>

common/board_f.c static int setup_reloc(void) · line 621

Quoted 8 lines
common/board_f.c +0 -1
@@ -620,7 +616,6 @@ static int setup_reloc(void)
 		return 0;
 	}
 
-#ifdef CONFIG_SYS_TEXT_BASE
 #ifdef ARM
 	gd->reloc_off = gd->relocaddr - (unsigned long)__image_copy_start;
 #elif defined(CONFIG_M68K)

Follow up that I should do, if no one else does, is remove this 'ifdef ARM' hunk. That's not set now.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180201/c277cf39/attachment.sig>
#2 lore raw
In reply to Alexey Brodkin
Quoted 8 lines · Alexey Brodkin

Now when Blackfin is gone CONFIG_SYS_TEXT_BASE is supposed to be set for each and every board which makes checks for this macro being set completely redundant.

Note there're still checks for CONFIG_SYS_TEXT_BASE in quite a few board configurations in "include/configs/XXX.h" which at some point might be cleaned-up too.

Quoted 6 lines

But at least sources are clean now.

NAK. For x86:
https://travis-ci.org/trini/u-boot/jobs/340140869
And for xtensa:
https://travis-ci.org/trini/u-boot/jobs/340140899

Signature · 1 line
Tom