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

s390/uprobes: fix compile for !KPROBES

Fix the following compile error(s) if CONFIG_KPROBES is disabled:

arch/s390/kernel/uprobes.c:79:14:
error: implicit declaration of function 'probe_get_fixup_type'
arch/s390/kernel/uprobes.c:87:14:
error: 'FIXUP_PSW_NORMAL' undeclared (first use in this function)

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

authored by

Heiko Carstens and committed by
Martin Schwidefsky
db55947d 085b6ba0

+13 -10
+2
arch/s390/include/asm/dis.h
··· 40 40 return ((((int) code + 64) >> 7) + 1) << 1; 41 41 } 42 42 43 + struct pt_regs; 44 + 43 45 void show_code(struct pt_regs *regs); 44 46 void print_fn_code(unsigned char *code, unsigned long len); 45 47 int insn_to_mnemonic(unsigned char *instruction, char *buf, unsigned int len);
+10 -10
arch/s390/include/asm/kprobes.h
··· 27 27 * 2005-Dec Used as a template for s390 by Mike Grundy 28 28 * <grundym@us.ibm.com> 29 29 */ 30 + #include <linux/types.h> 30 31 #include <asm-generic/kprobes.h> 31 32 32 33 #define BREAKPOINT_INSTRUCTION 0x0002 33 34 35 + #define FIXUP_PSW_NORMAL 0x08 36 + #define FIXUP_BRANCH_NOT_TAKEN 0x04 37 + #define FIXUP_RETURN_REGISTER 0x02 38 + #define FIXUP_NOT_REQUIRED 0x01 39 + 40 + int probe_is_prohibited_opcode(u16 *insn); 41 + int probe_get_fixup_type(u16 *insn); 42 + int probe_is_insn_relative_long(u16 *insn); 43 + 34 44 #ifdef CONFIG_KPROBES 35 - #include <linux/types.h> 36 45 #include <linux/ptrace.h> 37 46 #include <linux/percpu.h> 38 47 #include <linux/sched/task_stack.h> ··· 64 55 #define kretprobe_blacklist_size 0 65 56 66 57 #define KPROBE_SWAP_INST 0x10 67 - 68 - #define FIXUP_PSW_NORMAL 0x08 69 - #define FIXUP_BRANCH_NOT_TAKEN 0x04 70 - #define FIXUP_RETURN_REGISTER 0x02 71 - #define FIXUP_NOT_REQUIRED 0x01 72 58 73 59 /* Architecture specific copy of original instruction */ 74 60 struct arch_specific_insn { ··· 93 89 int kprobe_fault_handler(struct pt_regs *regs, int trapnr); 94 90 int kprobe_exceptions_notify(struct notifier_block *self, 95 91 unsigned long val, void *data); 96 - 97 - int probe_is_prohibited_opcode(u16 *insn); 98 - int probe_get_fixup_type(u16 *insn); 99 - int probe_is_insn_relative_long(u16 *insn); 100 92 101 93 #define flush_insn_slot(p) do { } while (0) 102 94
+1
arch/s390/lib/probes.c
··· 4 4 * Copyright IBM Corp. 2014 5 5 */ 6 6 7 + #include <linux/errno.h> 7 8 #include <asm/kprobes.h> 8 9 #include <asm/dis.h> 9 10