Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/jump_label: make use of HAVE_JUMP_LABEL_BATCH

Specify HAVE_JUMP_LABEL_BATCH in header file. This allows to make use
of the arch_jump_label_transform_queue()/arch_jump_label_transform_apply()
mechanism.

However unlike on x86, which currently is the only user of this
mechanism, the to be patched instructions are still directly
modified. The only difference to before is that serialization is only
done after all instructions have been modified. This way the number of
serialization/synchronization events is reduced.

Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>

authored by

Heiko Carstens and committed by
Vasily Gorbik
4e0502b8 e5873d6f

+15
+2
arch/s390/include/asm/jump_label.h
··· 2 2 #ifndef _ASM_S390_JUMP_LABEL_H 3 3 #define _ASM_S390_JUMP_LABEL_H 4 4 5 + #define HAVE_JUMP_LABEL_BATCH 6 + 5 7 #ifndef __ASSEMBLY__ 6 8 7 9 #include <linux/types.h>
+13
arch/s390/kernel/jump_label.c
··· 79 79 text_poke_sync(); 80 80 } 81 81 82 + bool arch_jump_label_transform_queue(struct jump_entry *entry, 83 + enum jump_label_type type) 84 + { 85 + __jump_label_transform(entry, type, 0); 86 + return true; 87 + } 88 + 89 + void arch_jump_label_transform_apply(void) 90 + { 91 + text_poke_sync(); 92 + } 93 + 82 94 void arch_jump_label_transform_static(struct jump_entry *entry, 83 95 enum jump_label_type type) 84 96 { 85 97 __jump_label_transform(entry, type, 1); 98 + text_poke_sync(); 86 99 }