linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org,
	corbet@lwn.net, kernel-team@android.com,
	Will Deacon <will@kernel.org>, Mark Brown <broonie@kernel.org>,
	Jiri Slaby <jslaby@suse.com>
Subject: [PATCH] Documentation: Call out example SYM_FUNC_* usage as x86-specific
Date: Wed, 15 Jan 2020 18:43:05 +0000	[thread overview]
Message-ID: <20200115184305.1187-1-will@kernel.org> (raw)

The example given in asm-annotations.rst to describe the constraints that
a function should meet in order to be annotated with a SYM_FUNC_* macro
is x86-specific, and not necessarily applicable to architectures using
branch-and-link style calling conventions such as arm64.

Tweak the example text to call out the x86-specific text.

Cc: Mark Brown <broonie@kernel.org>
Cc: Jiri Slaby <jslaby@suse.com>
Signed-off-by: Will Deacon <will@kernel.org>
---

As an aside: if somebody could explain the high-level guarantees required
here for things like livepatching, then I'd be happy to try to put together
another patch adding an example for arm64. I'm currently not completely sure
about what is required in the face of things like leaf functions and tail calls.

 Documentation/asm-annotations.rst | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/Documentation/asm-annotations.rst b/Documentation/asm-annotations.rst
index f55c2bb74d00..32ea57483378 100644
--- a/Documentation/asm-annotations.rst
+++ b/Documentation/asm-annotations.rst
@@ -73,10 +73,11 @@ The new macros are prefixed with the ``SYM_`` prefix and can be divided into
 three main groups:
 
 1. ``SYM_FUNC_*`` -- to annotate C-like functions. This means functions with
-   standard C calling conventions, i.e. the stack contains a return address at
-   the predefined place and a return from the function can happen in a
-   standard way. When frame pointers are enabled, save/restore of frame
-   pointer shall happen at the start/end of a function, respectively, too.
+   standard C calling conventions. For example, on x86, this means that the
+   stack contains a return address at the predefined place and a return from
+   the function can happen in a standard way. When frame pointers are enabled,
+   save/restore of frame pointer shall happen at the start/end of a function,
+   respectively, too.
 
    Checking tools like ``objtool`` should ensure such marked functions conform
    to these rules. The tools can also easily annotate these functions with
-- 
2.25.0.rc1.283.g88dfdc4193-goog


             reply	other threads:[~2020-01-15 18:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-15 18:43 Will Deacon [this message]
2020-01-16 19:53 ` [PATCH] Documentation: Call out example SYM_FUNC_* usage as x86-specific Jonathan Corbet

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=20200115184305.1187-1-will@kernel.org \
    --to=will@kernel.org \
    --cc=broonie@kernel.org \
    --cc=corbet@lwn.net \
    --cc=jslaby@suse.com \
    --cc=kernel-team@android.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --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 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).