Skip to content

Commit

Permalink
Merge tag 'microblaze-v5.12' of git://git.monstr.eu/linux-2.6-microblaze
Browse files Browse the repository at this point in the history
Pull microblaze updates from Michal Simek:

 - Fix DTB alignment

 - Remove code for very old GCC versions

 - Remove TRACING_SUPPORT selection

* tag 'microblaze-v5.12' of git://git.monstr.eu/linux-2.6-microblaze:
  microblaze: Fix built-in DTB alignment to be 8-byte aligned
  microblaze: Remove support for gcc < 4
  microblaze: do not select TRACING_SUPPORT directly
  • Loading branch information
Linus Torvalds committed Feb 23, 2021
2 parents a56ff24 + 48783be commit 7426869
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 28 deletions.
1 change: 0 additions & 1 deletion arch/microblaze/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,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
Expand Down
26 changes: 0 additions & 26 deletions arch/microblaze/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion arch/microblaze/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 7426869

Please sign in to comment.