diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2024-09-24 15:32:20 +0800 |
---|---|---|
committer | Huacai Chen <chenhuacai@loongson.cn> | 2024-09-24 15:32:20 +0800 |
commit | d4f31acf1302088a5b16d1e4de890729acfa9638 (patch) | |
tree | b7728594e41ae20c7df7573ff5673f26c5c4d863 /arch/loongarch/pci/acpi.c | |
parent | f93f67d06b1023313ef1662eac490e29c025c030 (diff) |
LoongArch: Simplify _percpu_read() and _percpu_write()
Now _percpu_read() and _percpu_write() macros call __percpu_read()
and __percpu_write() static inline functions that result in a single
assembly instruction. However, percpu infrastructure expects its leaf
definitions to encode the size of their percpu variable, so the patch
merges all the asm clauses from the static inline function into the
corresponding leaf macros.
The secondary effect of this change is to avoid explicit __percpu
annotations for function arguments. Currently, __percpu macro is defined
in include/linux/compiler_types.h, but with proposed patch [1], __percpu
definition will need macros from include/asm-generic/percpu.h, creating
forward dependency loop.
The proposed solution is the same as x86 architecture uses.
[1] https://lore.kernel.org/lkml/20240812115945.484051-4-ubizjak@gmail.com/
Tested-by: Xi Ruoyao <xry111@xry111.site>
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/pci/acpi.c')
0 files changed, 0 insertions, 0 deletions