Loading arch/Kconfig +3 −0 Original line number Diff line number Diff line Loading @@ -359,6 +359,9 @@ config HAVE_PERF_USER_STACK_DUMP config HAVE_ARCH_JUMP_LABEL bool config HAVE_ARCH_JUMP_LABEL_RELATIVE bool config HAVE_RCU_TABLE_FREE bool Loading arch/arm64/Kconfig +1 −0 Original line number Diff line number Diff line Loading @@ -104,6 +104,7 @@ config ARM64 select HAVE_ARCH_BITREVERSE select HAVE_ARCH_HUGE_VMAP select HAVE_ARCH_JUMP_LABEL select HAVE_ARCH_JUMP_LABEL_RELATIVE select HAVE_ARCH_KASAN if !(ARM64_16K_PAGES && ARM64_VA_BITS_48) select HAVE_ARCH_KGDB select HAVE_ARCH_MMAP_RND_BITS Loading arch/arm64/include/asm/jump_label.h +18 −20 Original line number Diff line number Diff line Loading @@ -26,12 +26,15 @@ #define JUMP_LABEL_NOP_SIZE AARCH64_INSN_SIZE static __always_inline bool arch_static_branch(struct static_key *key, bool branch) static __always_inline bool arch_static_branch(struct static_key *key, bool branch) { asm_volatile_goto("1: nop\n\t" asm_volatile_goto( "1: nop \n\t" " .pushsection __jump_table, \"aw\" \n\t" " .align 3 \n\t" ".quad 1b, %l[l_yes], %c0\n\t" " .long 1b - ., %l[l_yes] - . \n\t" " .quad %c0 - . \n\t" " .popsection \n\t" : : "i"(&((char *)key)[branch]) : : l_yes); Loading @@ -40,12 +43,15 @@ static __always_inline bool arch_static_branch(struct static_key *key, bool bran return true; } static __always_inline bool arch_static_branch_jump(struct static_key *key, bool branch) static __always_inline bool arch_static_branch_jump(struct static_key *key, bool branch) { asm_volatile_goto("1: b %l[l_yes]\n\t" asm_volatile_goto( "1: b %l[l_yes] \n\t" " .pushsection __jump_table, \"aw\" \n\t" " .align 3 \n\t" ".quad 1b, %l[l_yes], %c0\n\t" " .long 1b - ., %l[l_yes] - . \n\t" " .quad %c0 - . \n\t" " .popsection \n\t" : : "i"(&((char *)key)[branch]) : : l_yes); Loading @@ -54,13 +60,5 @@ static __always_inline bool arch_static_branch_jump(struct static_key *key, bool return true; } typedef u64 jump_label_t; struct jump_entry { jump_label_t code; jump_label_t target; jump_label_t key; }; #endif /* __ASSEMBLY__ */ #endif /* __ASM_JUMP_LABEL_H */ arch/arm64/kernel/jump_label.c +3 −3 Original line number Diff line number Diff line Loading @@ -25,12 +25,12 @@ void arch_jump_label_transform(struct jump_entry *entry, enum jump_label_type type) { void *addr = (void *)entry->code; void *addr = (void *)jump_entry_code(entry); u32 insn; if (type == JUMP_LABEL_JMP) { insn = aarch64_insn_gen_branch_imm(entry->code, entry->target, insn = aarch64_insn_gen_branch_imm(jump_entry_code(entry), jump_entry_target(entry), AARCH64_INSN_BRANCH_NOLINK); } else { insn = aarch64_insn_gen_nop(); Loading arch/s390/Kconfig +1 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,7 @@ config S390 select HAVE_ALIGNED_STRUCT_PAGE if SLUB select HAVE_ARCH_AUDITSYSCALL select HAVE_ARCH_JUMP_LABEL select HAVE_ARCH_JUMP_LABEL_RELATIVE select CPU_NO_EFFICIENT_FFS if !HAVE_MARCH_Z9_109_FEATURES select HAVE_ARCH_SECCOMP_FILTER select HAVE_ARCH_SOFT_DIRTY Loading Loading
arch/Kconfig +3 −0 Original line number Diff line number Diff line Loading @@ -359,6 +359,9 @@ config HAVE_PERF_USER_STACK_DUMP config HAVE_ARCH_JUMP_LABEL bool config HAVE_ARCH_JUMP_LABEL_RELATIVE bool config HAVE_RCU_TABLE_FREE bool Loading
arch/arm64/Kconfig +1 −0 Original line number Diff line number Diff line Loading @@ -104,6 +104,7 @@ config ARM64 select HAVE_ARCH_BITREVERSE select HAVE_ARCH_HUGE_VMAP select HAVE_ARCH_JUMP_LABEL select HAVE_ARCH_JUMP_LABEL_RELATIVE select HAVE_ARCH_KASAN if !(ARM64_16K_PAGES && ARM64_VA_BITS_48) select HAVE_ARCH_KGDB select HAVE_ARCH_MMAP_RND_BITS Loading
arch/arm64/include/asm/jump_label.h +18 −20 Original line number Diff line number Diff line Loading @@ -26,12 +26,15 @@ #define JUMP_LABEL_NOP_SIZE AARCH64_INSN_SIZE static __always_inline bool arch_static_branch(struct static_key *key, bool branch) static __always_inline bool arch_static_branch(struct static_key *key, bool branch) { asm_volatile_goto("1: nop\n\t" asm_volatile_goto( "1: nop \n\t" " .pushsection __jump_table, \"aw\" \n\t" " .align 3 \n\t" ".quad 1b, %l[l_yes], %c0\n\t" " .long 1b - ., %l[l_yes] - . \n\t" " .quad %c0 - . \n\t" " .popsection \n\t" : : "i"(&((char *)key)[branch]) : : l_yes); Loading @@ -40,12 +43,15 @@ static __always_inline bool arch_static_branch(struct static_key *key, bool bran return true; } static __always_inline bool arch_static_branch_jump(struct static_key *key, bool branch) static __always_inline bool arch_static_branch_jump(struct static_key *key, bool branch) { asm_volatile_goto("1: b %l[l_yes]\n\t" asm_volatile_goto( "1: b %l[l_yes] \n\t" " .pushsection __jump_table, \"aw\" \n\t" " .align 3 \n\t" ".quad 1b, %l[l_yes], %c0\n\t" " .long 1b - ., %l[l_yes] - . \n\t" " .quad %c0 - . \n\t" " .popsection \n\t" : : "i"(&((char *)key)[branch]) : : l_yes); Loading @@ -54,13 +60,5 @@ static __always_inline bool arch_static_branch_jump(struct static_key *key, bool return true; } typedef u64 jump_label_t; struct jump_entry { jump_label_t code; jump_label_t target; jump_label_t key; }; #endif /* __ASSEMBLY__ */ #endif /* __ASM_JUMP_LABEL_H */
arch/arm64/kernel/jump_label.c +3 −3 Original line number Diff line number Diff line Loading @@ -25,12 +25,12 @@ void arch_jump_label_transform(struct jump_entry *entry, enum jump_label_type type) { void *addr = (void *)entry->code; void *addr = (void *)jump_entry_code(entry); u32 insn; if (type == JUMP_LABEL_JMP) { insn = aarch64_insn_gen_branch_imm(entry->code, entry->target, insn = aarch64_insn_gen_branch_imm(jump_entry_code(entry), jump_entry_target(entry), AARCH64_INSN_BRANCH_NOLINK); } else { insn = aarch64_insn_gen_nop(); Loading
arch/s390/Kconfig +1 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,7 @@ config S390 select HAVE_ALIGNED_STRUCT_PAGE if SLUB select HAVE_ARCH_AUDITSYSCALL select HAVE_ARCH_JUMP_LABEL select HAVE_ARCH_JUMP_LABEL_RELATIVE select CPU_NO_EFFICIENT_FFS if !HAVE_MARCH_Z9_109_FEATURES select HAVE_ARCH_SECCOMP_FILTER select HAVE_ARCH_SOFT_DIRTY Loading