summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorSean Chang <seanwascoding@gmail.com>2026-06-08 18:52:52 +0300
committerAnup Patel <anup@brainfault.org>2026-06-14 08:39:41 +0300
commit52738352a6f29279e15285fcb7b50241ef867e27 (patch)
treef453566bb45fa9f15fc56cf993dbb885c937926f /scripts/Makefile.thinlto
parenta5f8307e2eaaf5d3acae6554d84fcd2683613cc4 (diff)
downloadlinux-52738352a6f29279e15285fcb7b50241ef867e27.tar.xz
riscv: kvm: Use endian-specific __lelong for NACL shared memory
When compiling with sparse enabled (C=2), bitwise type warnings are triggered in the RISC-V KVM implementation. This occurs because the user-space data unboxing macro '__get_user_asm' performs implicit casting on restricted types without forcing the compiler's compliance. Additionally, raw 'unsigned long *' pointers are used to access the SBI NACL shared memory, whereas the RISC-V SBI specification mandates that these structures must follow little-endian byte ordering. Fix these by: 1. Adding a '__force' cast to '__get_user_asm()' to safely suppress implicit cast warnings during user-space data fetching. 2. Introducing the '__lelong' type macro, which dynamically resolves to '__le32' or '__le64' depending on XLEN, and replacing 'unsigned long *' with '__lelong *' to enforce proper compile-time endianness checks. Signed-off-by: Sean Chang <seanwascoding@gmail.com> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20260608155252.4292-1-seanwascoding@gmail.com Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions