linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Nicholas Piggin" <npiggin@gmail.com>
To: "Kautuk Consul" <kconsul@linux.vnet.ibm.com>
Cc: Fabiano Rosas <farosas@linux.ibm.com>,
	Alexey Kardashevskiy <aik@ozlabs.ru>,
	linux-kernel@vger.kernel.org,
	Sathvika Vasireddy <sv@linux.ibm.com>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v3 1/2] arch/powerpc/kvm: kvmppc_hv_entry: remove .global scope
Date: Mon, 27 Mar 2023 20:24:38 +1000	[thread overview]
Message-ID: <CRH3CENOOS9G.2EZ66CM1VSMUD@bobo> (raw)
In-Reply-To: <ZCFoBqReJekPd7GI@li-a450e7cc-27df-11b2-a85c-b5a9ac31e8ef.ibm.com>

On Mon Mar 27, 2023 at 7:55 PM AEST, Kautuk Consul wrote:
> On 2023-03-27 19:51:34, Nicholas Piggin wrote:
> > On Mon Mar 27, 2023 at 7:34 PM AEST, Kautuk Consul wrote:
> > > On 2023-03-27 14:58:03, Kautuk Consul wrote:
> > > > On 2023-03-27 19:19:37, Nicholas Piggin wrote:
> > > > > On Thu Mar 16, 2023 at 3:10 PM AEST, Kautuk Consul wrote:
> > > > > > kvmppc_hv_entry isn't called from anywhere other than
> > > > > > book3s_hv_rmhandlers.S itself. Removing .global scope for
> > > > > > this function and annotating it with SYM_INNER_LABEL.
> > > > > >
> > > > > > Signed-off-by: Kautuk Consul <kconsul@linux.vnet.ibm.com>
> > > > > > ---
> > > > > >  arch/powerpc/kvm/book3s_hv_rmhandlers.S | 3 +--
> > > > > >  1 file changed, 1 insertion(+), 2 deletions(-)
> > > > > >
> > > > > > diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> > > > > > index acf80915f406..b81ba4ee0521 100644
> > > > > > --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> > > > > > +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> > > > > > @@ -502,8 +502,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)
> > > > > >   *                                                                            *
> > > > > >   *****************************************************************************/
> > > > > >  
> > > > > > -.global kvmppc_hv_entry
> > > > > 
> > > > > I think this is okay.
> > > > > 
> > > > > > -kvmppc_hv_entry:
> > > > > > +SYM_INNER_LABEL(kvmppc_hv_entry, SYM_L_LOCAL)
> > > > > 
> > > > > The documentation for SYM_INNER_LABEL says it for labels inside a SYM
> > > > > function block, is that a problem? This is a function but doesn't have
> > > > > C calling convention, so asm annotation docs say that it should use
> > > > > SYM_CODE_START_LOCAL?
> > > > That is correct. Will create a v4 patch for this and send it.
> > > But using SYM_CODE_START_LOCAL again causes a warning in the build
> > > (which we were trying to avoid):
> > > arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0x48: unannotated intra-function call
> > 
> > Are you using SYM_FUNC_END as well? Looks like you need that to
> > annotate the type properly. It should be the same as SYM_INNER_LABEL
> > in the end AFAIKS.
>
> What about SYM_CODE_START_LOCAL and SYM_CODE_END ?
> This seems to work fine for me without any build warnings from objtool.

That's what I meant. So you were just missing SYM_CODE_END?

Thanks,
Nick

  parent reply	other threads:[~2023-03-27 10:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-16  5:10 [PATCH v3 0/2] Improving calls to kvmppc_hv_entry Kautuk Consul
2023-03-16  5:10 ` [PATCH v3 1/2] arch/powerpc/kvm: kvmppc_hv_entry: remove .global scope Kautuk Consul
2023-03-27  9:19   ` Nicholas Piggin
2023-03-27  9:27     ` Kautuk Consul
2023-03-27  9:34       ` Kautuk Consul
2023-03-27  9:43         ` Kautuk Consul
2023-03-27  9:51         ` Nicholas Piggin
2023-03-27  9:55           ` Kautuk Consul
2023-03-27 10:07             ` Kautuk Consul
2023-03-27 10:24             ` Nicholas Piggin [this message]
2023-03-16  5:10 ` [PATCH v3 2/2] arch/powerpc/kvm: kvmppc_hv_entry: remove r4 argument Kautuk Consul
2023-03-21  4:15   ` Nicholas Piggin
2023-03-21  4:54     ` Kautuk Consul
2023-03-21  8:37       ` Kautuk Consul
2023-03-22 12:17   ` Michael Ellerman
2023-03-23  4:53     ` Kautuk Consul

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=CRH3CENOOS9G.2EZ66CM1VSMUD@bobo \
    --to=npiggin@gmail.com \
    --cc=aik@ozlabs.ru \
    --cc=farosas@linux.ibm.com \
    --cc=kconsul@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=sv@linux.ibm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).