u-boot/common
Yao Zi 307666be28 riscv: Access gd with inline assembly when building with LTO or Clang
Similar to AArch64's case, Clang may wrongly fold accesses to gd pointer
which is defined with register qualifier into constants, breaking
various components.

This patch defines gd as a macro when building with Clang or LTO, which
expands to get_gd() that accesses gp pointer in assembly, making RISC-V
ports function properly and preparing for introduction of LTO in the
future. Board initialization code is also adapted for non-assignable gd.

Reported-by: Nathaniel Hourt <I@nathaniel.land>
Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2025-05-21 16:46:16 +08:00
..
eeprom Merge patch series "'eeprom' command improvements" 2024-06-07 10:48:41 -06:00
init riscv: Access gd with inline assembly when building with LTO or Clang 2025-05-21 16:46:16 +08:00
spl rockchip: Add SPL_PAD_TO Kconfig default value 2025-05-06 15:58:25 +08:00
autoboot.c common: Add NULL checks for malloc_cache_aligned in autoboot.c 2025-02-11 08:17:23 -06:00
avb_verify.c common: avb_verify: add str_avb_io_error/str_avb_slot_error 2024-02-15 10:38:34 +01:00
bloblist.c Merge patch series "bloblist: refactor xferlist and bloblist" 2025-02-19 18:49:47 -06:00
board_f.c common: Add CONFIG_SKIP_RELOCATE 2025-04-15 11:21:30 -06:00
board_info.c dm: sysinfo: Shorten the SYSINFO_ID prefix 2024-11-17 13:12:54 -06:00
board_r.c riscv: Access gd with inline assembly when building with LTO or Clang 2025-05-21 16:46:16 +08:00
bootstage.c bootstage: Do not sort records 2024-11-03 21:27:12 -06:00
bouncebuf.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
button_cmd.c include: Move snprintf to stdio.h 2024-05-22 08:55:29 -06:00
cli_getch.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
cli_hush_modern.c cli: modern_hush: Add upstream commits up to 13 July 2024 2024-09-13 13:43:56 -06:00
cli_hush_upstream.c cli_hush: support running bootcmd on boot retry 2025-04-11 15:28:14 +02:00
cli_hush.c cli_hush: support running bootcmd on boot retry 2025-04-11 15:28:14 +02:00
cli_readline.c global: Use CONFIG_XPL_BUILD instead of CONFIG_SPL_BUILD 2024-10-11 11:44:48 -06:00
cli_simple.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
cli.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
command.c use proper fallthrough annotations 2025-04-08 16:23:51 -06:00
console.c console: Support a format string for stderr output 2025-05-02 13:40:20 -06:00
cros_ec.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
cyclic.c cyclic: make cyclic_register safe to call on already-registered info 2025-05-16 13:44:19 +02:00
ddr_spd.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
dfu.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
dlmalloc.c common: Tidy up how malloc() is inited 2024-10-25 14:22:24 -06:00
dlmalloc.src
edid.c video: edid: guard standard timings EDID expansion behind kconfig 2025-03-19 10:59:23 +02:00
event.c event: signal when livetree has been built 2025-05-02 08:38:02 -06:00
exports.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
flash.c Merge patch series "Miscellaneous fixes" 2024-09-24 13:41:21 -06:00
hash.c lib: Allow crc16 code to be dropped 2025-02-03 16:00:42 -06:00
hwconfig.c global_data: Remove environment members if not used 2024-08-26 14:06:08 -06:00
iomux.c IOMUX: Fix stopping unused dropped consoles 2025-04-14 16:57:06 -06:00
iotrace.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
kallsyms.c common: Remove duplicate newlines 2024-07-15 12:12:17 -06:00
Kconfig arm64: Enable RW, RX and RO mappings for the relocated binary 2025-03-14 13:37:54 +02:00
kgdb_stubs.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
kgdb.c common: Remove duplicate newlines 2024-07-15 12:12:17 -06:00
log_console.c log: Avoid including function names by default 2024-08-23 15:58:41 -06:00
log_syslog.c log: Avoid including function names by default 2024-08-23 15:58:41 -06:00
log.c log: enable filtering on functions 2025-01-26 11:06:56 +01:00
main.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
Makefile common: memtop: add logic to detect ram_top 2024-11-15 14:32:02 +01:00
malloc_simple.c malloc: Show amount of used space when memory runs out 2024-12-27 15:16:10 -06:00
mcheck_core.inc.h mcheck: let mcheck_abortfunc_t print the pointer 2024-04-12 16:23:06 -06:00
memsize.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
memtop.c common: memtop: Fix the return type for find_ram_top 2024-12-20 09:17:43 +01:00
menu.c menu: add support to check if menu needs to be reprinted 2024-11-04 16:41:38 -06:00
miiphyutil.c net: miiphybb: Drop mdio_init() 2025-03-11 23:06:18 +01:00
qfw.c qemu: Move qfw kernel setup into a common file 2023-02-06 13:04:53 -05:00
s_record.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
scp03.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
splash_source.c boot: Use fit_image_get_data() to get data 2025-01-22 15:58:04 -06:00
splash.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
stackprot.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
stdio.c usb: gadget: Remove the legacy usbtty driver 2025-03-10 09:22:35 +01:00
system_map.c
update.c boot: Use fit_image_get_data() to get data 2025-01-22 15:58:04 -06:00
usb_hub.c common: Remove duplicate newlines 2024-07-15 12:12:17 -06:00
usb_kbd.c net: lwip: add DHCP support and dhcp commmand 2024-10-16 11:11:56 -06:00
usb_onboard_hub.c usb: onboard-hub: Update the bind function based on peer-hub property 2024-12-11 08:22:17 +01:00
usb_storage.c common: Remove duplicate newlines 2024-07-15 12:12:17 -06:00
usb.c common: Remove duplicate newlines 2024-07-15 12:12:17 -06:00
version.c version: Separate our version string from the version command 2023-11-07 14:48:19 -05:00
xyzModem.c xyz-modem: Add missing fallthrough annotation 2024-11-14 18:14:05 -06:00