All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Will Deacon <will@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	linux-arm-kernel@lists.infradead.org, jslaby@suse.com
Subject: Re: [PATCH 2/3] arm64: lib: Use modern annotations for assembly functions
Date: Tue, 7 Jan 2020 17:47:41 +0000	[thread overview]
Message-ID: <20200107174741.GG4877@sirena.org.uk> (raw)
In-Reply-To: <20200107144445.GC29001@willie-the-truck>


[-- Attachment #1.1: Type: text/plain, Size: 2104 bytes --]

On Tue, Jan 07, 2020 at 02:44:46PM +0000, Will Deacon wrote:
> On Mon, Jan 06, 2020 at 07:58:17PM +0000, Mark Brown wrote:

> > -ENTRY(clear_page)
> > +SYM_FUNC_START(clear_page)
> >  	mrs	x1, dczid_el0
> >  	and	w1, w1, #0xf
> >  	mov	x2, #4

> Since this doesn't change behaviour, I think the patch is fine, however
> on reading Documentation/asm-annotations.rst it's not completely clear to
> me when SYM_FUNC_START() should be used. In this case, for example, we are
> *not* pushing a stackframe and that would appear to be at odds with the
> documentation.

> Jiri -- is it ok to omit the stack frame for leaf functions annotated with
> SYM_FUNC_START? I'm guessing it should be, since the link register isn't
> going to be clobbered. Could we update the documentation to reflect that?

Yeah, the documentation isn't great on that.  I was going on the basis
of both trying to minimize changes to the generated output as part of
the bulk change and looking at it from the point of view of the caller -
if as in this case the caller thinks it's a regular C function it seems
sensible to annotate it as such.

> > --- a/arch/arm64/lib/memcpy.S
> > +++ b/arch/arm64/lib/memcpy.S
> > @@ -57,11 +57,11 @@
> >  	.endm
> >  
> >  	.weak memcpy

> Hmm, any idea why we use .weak explicitly here? Maybe better off using
> the proper macros now? (same applies to many of the other lib/ functions
> you're touching)

Nope, there's a whole bunch of stuff where what we're currently doing is
a bit interesting and I'm a bit worried that we might be relying on some
of it.  My theory here was to do the bulk of the changes as a 1:1
replacement so the generated output is as close as possible for any big
changes and then do anything more detailed that isn't actually *needed*
on top of that.  It's looking like there'll also be some stuff that
definitely changes the output going in as well, I was going to do those
as individual patches so that it's easier to find any breakages that get
introduced and so the big, repetitive changes don't have other stuff
mixed in.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-01-07 17:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-06 19:58 [PATCH 0/3] arm64: Conversions to modern assembly annotations Mark Brown
2020-01-06 19:58 ` [PATCH 1/3] arm64: asm: Add new-style position independent function annotations Mark Brown
2020-01-07 14:44   ` Will Deacon
2020-01-07 16:45     ` Mark Brown
2020-01-06 19:58 ` [PATCH 2/3] arm64: lib: Use modern annotations for assembly functions Mark Brown
2020-01-07 14:44   ` Will Deacon
2020-01-07 17:47     ` Mark Brown [this message]
2020-01-08 12:29       ` Will Deacon
2020-01-10 16:56         ` Jiri Slaby
2020-01-15 18:43           ` Will Deacon
2020-01-06 19:58 ` [PATCH 3/3] arm64: mm: " Mark Brown
2020-01-07 14:43   ` Will Deacon
2020-01-07 16:42     ` Mark Brown
2020-01-08 12:17       ` Will Deacon
2020-01-08 13:50         ` Mark Brown
2020-01-08 14:56           ` Will Deacon

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=20200107174741.GG4877@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=jslaby@suse.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=will@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.