Commit 198b1bf8 authored by Heiko Carstens's avatar Heiko Carstens Committed by Martin Schwidefsky

s390/perf: fix compile error (undefined reference sie_exit)

The perf_event code references sie_exit even if KVM is not available.
So add proper ifdefs to fix this one:

arch/s390/built-in.o: In function `sys_call_table_emu':
(.rodata+0x2b98): undefined reference to `sie_exit'
arch/s390/built-in.o: In function `sys_call_table_emu':
(.rodata+0x2ba0): undefined reference to `sie_exit'
make: *** [vmlinux] Error 1
Reported-by: default avatarZhouping Liu <zliu@redhat.com>
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 3b0040a4
...@@ -52,12 +52,13 @@ static struct kvm_s390_sie_block *sie_block(struct pt_regs *regs) ...@@ -52,12 +52,13 @@ static struct kvm_s390_sie_block *sie_block(struct pt_regs *regs)
static bool is_in_guest(struct pt_regs *regs) static bool is_in_guest(struct pt_regs *regs)
{ {
unsigned long ip = instruction_pointer(regs);
if (user_mode(regs)) if (user_mode(regs))
return false; return false;
#if defined(CONFIG_KVM) || defined(CONFIG_KVM_MODULE)
return ip == (unsigned long) &sie_exit; return instruction_pointer(regs) == (unsigned long) &sie_exit;
#else
return false;
#endif
} }
static unsigned long guest_is_user_mode(struct pt_regs *regs) static unsigned long guest_is_user_mode(struct pt_regs *regs)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment