From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH boot-wrapper-aarch64 2/4] psci: remove sentinel from id_table
Date: Wed, 14 Jan 2015 11:10:38 +0000 [thread overview]
Message-ID: <20150114111037.GD12069@leverpostej> (raw)
In-Reply-To: <1421115304-19580-3-git-send-email-zlim@broadcom.com>
Hi,
On Tue, Jan 13, 2015 at 02:15:02AM +0000, Zi Shen Lim wrote:
> Tweak the limit check in find_logical_id so we can
> do away with the sentinel from id_table.
>
> While at it, also remove unused label and fix up spacing.
>
> Signed-off-by: Zi Shen Lim <zlim@broadcom.com>
This looks like a nice cleanup to me.
So long as this passes build and boot testing I'll apply this shortly.
Thanks,
Mark.
> ---
> psci.S | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/psci.S b/psci.S
> index 234493d..d045e56 100644
> --- a/psci.S
> +++ b/psci.S
> @@ -69,7 +69,6 @@ vector:
> id_table:
> .quad CPU_IDS
> __id_end:
> - .quad MPIDR_INVALID
>
> .equ nr_cpus, ((__id_end - id_table) / 8)
>
> @@ -159,17 +158,16 @@ psci_cpu_on:
> * Clobbers x1, x2, x3
> */
> find_logical_id:
> -__find_logical_index:
> adr x2, id_table
> mov x1, xzr
> 1: mov x3, #nr_cpus // check we haven't walked off the end of the array
> cmp x1, x3
> - b.gt 3f
> + b.ge 3f
> ldr x3, [x2, x1, lsl #3]
> cmp x3, x0
> b.eq 2f
> add x1, x1, #1
> - b 1b
> + b 1b
> 2: mov x0, x1
> ret
> 3: mov x0, #MPIDR_INVALID
> --
> 2.1.0
>
>
next prev parent reply other threads:[~2015-01-14 11:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-13 2:15 [PATCH boot-wrapper-aarch64 0/4] psci cleanups + simple v0.2 implementation Zi Shen Lim
2015-01-13 2:15 ` [PATCH boot-wrapper-aarch64 1/4] psci: use MPIDR_INVALID instead of -1 Zi Shen Lim
2015-01-14 11:03 ` Mark Rutland
2015-01-14 18:24 ` Z Lim
2015-01-13 2:15 ` [PATCH boot-wrapper-aarch64 2/4] psci: remove sentinel from id_table Zi Shen Lim
2015-01-14 11:10 ` Mark Rutland [this message]
2015-01-13 2:15 ` [PATCH boot-wrapper-aarch64 3/4] psci: use PSCI v0.2 function IDs Zi Shen Lim
2015-01-13 2:15 ` [PATCH boot-wrapper-aarch64 4/4] psci: implement PSCI v0.2 Zi Shen Lim
2015-01-14 11:53 ` [PATCH boot-wrapper-aarch64 0/4] psci cleanups + simple v0.2 implementation Mark Rutland
2015-01-14 18:46 ` Z Lim
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=20150114111037.GD12069@leverpostej \
--to=mark.rutland@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.