From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] ARM: psci: move psci firmware calls out of line
Date: Wed, 18 Mar 2015 10:30:14 +0000 [thread overview]
Message-ID: <20150318103014.GD18951@arm.com> (raw)
In-Reply-To: <20150318102029.GC8656@n2100.arm.linux.org.uk>
On Wed, Mar 18, 2015 at 10:20:29AM +0000, Russell King - ARM Linux wrote:
> On Wed, Feb 25, 2015 at 12:10:36PM +0000, Will Deacon wrote:
> > -/*
> > - * The following two functions are invoked via the invoke_psci_fn pointer
> > - * and will not be inlined, allowing us to piggyback on the AAPCS.
> > - */
> > -static noinline int __invoke_psci_fn_hvc(u32 function_id, u32 arg0, u32 arg1,
> > - u32 arg2)
> > -{
> > - asm volatile(
> > - __asmeq("%0", "r0")
> > - __asmeq("%1", "r1")
> > - __asmeq("%2", "r2")
> > - __asmeq("%3", "r3")
> > - __HVC(0)
> > - : "+r" (function_id)
> > - : "r" (arg0), "r" (arg1), "r" (arg2));
> > -
> > - return function_id;
> > -}
>
> Why not convert these to:
>
> static int __naked __invoke_psci_fn_hvc(u32 function_id, u32 arg0, u32 arg1,
> u32 arg2)
> {
> asm(
> __HVC(0)
> "bx lr");
> }
>
> ?
I tried this, but the compiler printed a diagnostic along the lines of
"Ignoring __naked attribute", so we moved the functions out-of-line like
we have on arm64 instead. Assuming it worked reliably, what's the
advantage of __naked over having these out-of-line?
Will
next prev parent reply other threads:[~2015-03-18 10:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-25 12:10 [PATCH 1/2] arm64: psci: move psci firmware calls out of line Will Deacon
2015-02-25 12:10 ` [PATCH 2/2] ARM: " Will Deacon
2015-03-18 10:20 ` Russell King - ARM Linux
2015-03-18 10:30 ` Will Deacon [this message]
2015-03-18 10:35 ` Russell King - ARM Linux
2015-03-18 10:39 ` 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=20150318103014.GD18951@arm.com \
--to=will.deacon@arm.com \
--cc=linux-arm-kernel@lists.infradead.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.