All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhouping Liu <zliu@redhat.com>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [s390x] build error: undefined reference to `sie_exit'
Date: Fri, 26 Jul 2013 00:40:18 +0800	[thread overview]
Message-ID: <51F154F2.20400@redhat.com> (raw)
In-Reply-To: <20130725092123.GD4288@osiris>

On 07/25/2013 05:21 PM, Heiko Carstens wrote:
> On Wed, Jul 24, 2013 at 10:09:13PM -0400, Zhouping Liu wrote:
>> 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 <heiko.carstens@de.ibm.com>
> 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

The patch is good for me.

Tested-by: Zhouping Liu <zliu@redhat.com>

Thanks,
Zhouping

> Reported-by: Zhouping Liu <zliu@redhat.com>
> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
> ---
>   arch/s390/kernel/perf_event.c | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/arch/s390/kernel/perf_event.c b/arch/s390/kernel/perf_event.c
> index a6fc037..500aa10 100644
> --- a/arch/s390/kernel/perf_event.c
> +++ b/arch/s390/kernel/perf_event.c
> @@ -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)


      reply	other threads:[~2013-07-25 16:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <209887675.5191065.1374718087774.JavaMail.root@redhat.com>
2013-07-25  2:09 ` [s390x] build error: undefined reference to `sie_exit' Zhouping Liu
2013-07-25  9:21   ` Heiko Carstens
2013-07-25 16:40     ` Zhouping Liu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51F154F2.20400@redhat.com \
    --to=zliu@redhat.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.