Skip to contentSkip to conversation

build error: undefined reference to `sie_exit'

s390x Zhouping Liu 2 participants 3 messages Jul 25, 2013 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hello All,

I met the below error on b3a3a9c441 with s390x arch:

# make
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CHK     include/generated/uapi/linux/version.h
  LINK    vmlinux
  LD      vmlinux.o
  MODPOST vmlinux.o
  GEN     .version
  CHK     include/generated/compile.h
  UPD     include/generated/compile.h
  CC      init/version.o
  LD      init/built-in.o
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
Signature · 2 lines
Thanks,
Zhouping
#2 lore raw
Quoted 8 lines · Zhouping Liu

Hello All,

I met the below error on b3a3a9c441 with s390x arch:
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

Thanks for reporting, I just committed the patch below to our local branch:

Quoted 1 line

From c073dc1f474094b5610739e752d83bcb547b1d7d Mon Sep 17 00:00:00 2001

From: Heiko Carstens <[email protected]>
Date: Thu, 25 Jul 2013 11:16:48 +0200
Subject: [PATCH] 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

---
 arch/s390/kernel/perf_event.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
arch/s390/kernel/perf_event.c +5 -4
index a6fc037..500aa10 100644
@@ -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)
 {
-	unsigned long ip = instruction_pointer(regs);
-
 	if (user_mode(regs))
 		return false;
-
-	return ip == (unsigned long) &sie_exit;
+#if defined(CONFIG_KVM) || defined(CONFIG_KVM_MODULE)
+	return instruction_pointer(regs) == (unsigned long) &sie_exit;
+#else
+	return false;
+#endif
 }
 
 static unsigned long guest_is_user_mode(struct pt_regs *regs)
Signature · 1 line
1.8.2.3
author Tested-by
#3 lore raw
Quoted 17 lines · Heiko Carstens
Quoted 8 lines · Zhouping Liu

Hello All,

I met the below error on b3a3a9c441 with s390x arch:
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

Thanks for reporting, I just committed the patch below to our local branch:

From c073dc1f474094b5610739e752d83bcb547b1d7d Mon Sep 17 00:00:00 2001
From: Heiko Carstens <[email protected]>
Date: Thu, 25 Jul 2013 11:16:48 +0200
Subject: [PATCH] s390/perf: fix compile error (undefined reference sie_exit)

Quoted 8 lines

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

The patch is good for me.

Thanks,
Zhouping

Quoted 28 lines
---
  arch/s390/kernel/perf_event.c | 9 +++++----
  1 file changed, 5 insertions(+), 4 deletions(-)
arch/s390/kernel/perf_event.c +5 -4
index a6fc037..500aa10 100644
@@ -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)
  {
-	unsigned long ip = instruction_pointer(regs);
-
  	if (user_mode(regs))
  		return false;
-
-	return ip == (unsigned long) &sie_exit;
+#if defined(CONFIG_KVM) || defined(CONFIG_KVM_MODULE)
+	return instruction_pointer(regs) == (unsigned long) &sie_exit;
+#else
+	return false;
+#endif
  }
 
  static unsigned long guest_is_user_mode(struct pt_regs *regs)