Commit 4e0502b8 authored by Heiko Carstens's avatar Heiko Carstens Committed by Vasily Gorbik
Browse files

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: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent e5873d6f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2,6 +2,8 @@
#ifndef _ASM_S390_JUMP_LABEL_H
#define _ASM_S390_JUMP_LABEL_H

#define HAVE_JUMP_LABEL_BATCH

#ifndef __ASSEMBLY__

#include <linux/types.h>
+13 −0
Original line number Diff line number Diff line
@@ -79,8 +79,21 @@ void arch_jump_label_transform(struct jump_entry *entry,
	text_poke_sync();
}

bool arch_jump_label_transform_queue(struct jump_entry *entry,
				     enum jump_label_type type)
{
	__jump_label_transform(entry, type, 0);
	return true;
}

void arch_jump_label_transform_apply(void)
{
	text_poke_sync();
}

void arch_jump_label_transform_static(struct jump_entry *entry,
				      enum jump_label_type type)
{
	__jump_label_transform(entry, type, 1);
	text_poke_sync();
}