2 * Jump label s390 support
4 * Copyright IBM Corp. 2011
5 * Author(s): Jan Glauber <jang@linux.vnet.ibm.com>
7 #include <linux/module.h>
8 #include <linux/uaccess.h>
9 #include <linux/stop_machine.h>
10 #include <linux/jump_label.h>
13 #ifdef HAVE_JUMP_LABEL
21 unsigned long *target;
26 static int __arch_jump_label_transform(void *data)
28 struct insn_args *args = data;
31 rc = probe_kernel_write(args->target, args->insn, args->size);
36 void arch_jump_label_transform(struct jump_entry *entry,
37 enum jump_label_type type)
39 struct insn_args args;
42 if (type == JUMP_LABEL_ENABLE) {
45 insn.offset = (entry->target - entry->code) >> 1;
52 args.target = (void *) entry->code;
54 args.size = JUMP_LABEL_NOP_SIZE;
56 stop_machine(__arch_jump_label_transform, &args, NULL);