summaryrefslogtreecommitdiffstats
path: root/lib/memcat_p.c
diff options
context:
space:
mode:
authorJisheng Zhang <jszhang@kernel.org>2021-12-06 23:03:53 +0800
committerPalmer Dabbelt <palmer@rivosinc.com>2022-01-19 09:56:35 -0800
commit805a3ebed59f81155ded218648db58bdc886a881 (patch)
tree81f7e1b3778646615a46819c6b0736b9b6e5bc3f /lib/memcat_p.c
parentfe036db7d8a93cfbfd254f76e0ecf81aecbbf6b4 (diff)
downloadlinux-805a3ebed59f81155ded218648db58bdc886a881.tar.gz
linux-805a3ebed59f81155ded218648db58bdc886a881.tar.bz2
linux-805a3ebed59f81155ded218648db58bdc886a881.zip
riscv: mm: init: try best to remove #ifdef CONFIG_XIP_KERNEL usage
Currently, the #ifdef CONFIG_XIP_KERNEL usage can be divided into the following three types: The first one is for functions/declarations only used in XIP case. The second one is for XIP_FIXUP case. Something as below: |foo_type foo; |#ifdef CONFIG_XIP_KERNEL |#define foo (*(foo_type *)XIP_FIXUP(&foo)) |#endif Usually, it's better to let the foo macro sit with the foo var together. But if various foos are defined adjacently, we can save some #ifdef CONFIG_XIP_KERNEL usage by grouping them together. The third one is for different implementations for XIP, usually, this is a #ifdef...#else...#endif case. This patch moves the pt_ops macro to adjacent #ifdef CONFIG_XIP_KERNEL and group first type usage cases into one. Signed-off-by: Jisheng Zhang <jszhang@kernel.org> Reviewed-by: Alexandre Ghiti <alex@ghiti.fr> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'lib/memcat_p.c')
0 files changed, 0 insertions, 0 deletions