aboutsummaryrefslogtreecommitdiff
path: root/lib/utils/cppc/fdt_cppc_rpmi.c
diff options
context:
space:
mode:
authorJessica Clarke <jrtc27@jrtc27.com>2025-07-10 00:29:28 +0100
committerAnup Patel <anup@brainfault.org>2025-07-22 15:54:27 +0530
commitffd3ed976d88fa5cda56d9d2c139557c69eec5d8 (patch)
treece45dd7822f7a4928787584fc4232c5ce3fe15b4 /lib/utils/cppc/fdt_cppc_rpmi.c
parent0b7c2e0d6091e6f48b4b3b2a345fd588eb95ddfc (diff)
downloadopensbi-ffd3ed976d88fa5cda56d9d2c139557c69eec5d8.zip
opensbi-ffd3ed976d88fa5cda56d9d2c139557c69eec5d8.tar.gz
opensbi-ffd3ed976d88fa5cda56d9d2c139557c69eec5d8.tar.bz2
include: sbi: Use array for struct sbi_trap_regs and GET/SET macros
Rather than hand-rolling scaled pointer arithmetic with casts and shifts, let the compiler do so by indexing an array of GPRs, taking advantage of the language's type system to scale based on whatever type the register happens to be. This makes it easier to support CHERI where the registers are capabilities, not plain integers, and so this pointer arithmetic would need to change (and currently REGBYTES is both the size of a register and the size of an integer word upstream). Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20250709232932.37622-1-jrtc27@jrtc27.com Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'lib/utils/cppc/fdt_cppc_rpmi.c')
0 files changed, 0 insertions, 0 deletions