diff options
author | 2021-12-06 23:03:53 +0800 | |
---|---|---|
committer | 2022-01-19 09:56:35 -0800 | |
commit | 805a3ebed59f81155ded218648db58bdc886a881 (patch) | |
tree | 81f7e1b3778646615a46819c6b0736b9b6e5bc3f /tools/perf/scripts/python/export-to-postgresql.py | |
parent | riscv: mm: init: try IS_ENABLED(CONFIG_XIP_KERNEL) instead of #ifdef (diff) | |
download | linux-dev-805a3ebed59f81155ded218648db58bdc886a881.tar.xz linux-dev-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 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions