From: Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>
To: Gregory CLEMENT
<gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Cc: Lior Amsalem <alior-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>,
Ike Pan <ike.pan-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>,
Nadav Haklai <nadavh-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
Ian Molton <ian.molton-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org>,
David Marlin <dmarlin-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Yehuda Yitschak <yehuday-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
Jani Monoses
<jani.monoses-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>,
Russell King <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
Tawfik Bayouk <tawfik-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
Dan Frazier
<dann.frazier-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>,
Eran Ben-Avi <benavi-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
Leif Lindholm <Leif.Lindholm-5wv7dgnIgG8@public.gmane.org>,
Sebastian Hesselbarth
<sebastian.hesselbarth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>,
"jcm-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org"
<jcm-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org"
<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>,
"rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org"
<rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>,
Mike Turquette
<mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWOunwaRDDq4rA@public.gmane.org>
Subject: Re: [PATCH V6 1/5] arm: mvebu: Add support for coherency fabric in mach-mvebu
Date: Wed, 21 Nov 2012 15:15:56 +0000 [thread overview]
Message-ID: <20121121151556.GO11990@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <1353509970-5237-2-git-send-email-gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
On Wed, Nov 21, 2012 at 02:59:26PM +0000, Gregory CLEMENT wrote:
> diff --git a/arch/arm/mach-mvebu/coherency_ll.S b/arch/arm/mach-mvebu/coherency_ll.S
> new file mode 100644
> index 0000000..74272b6
> --- /dev/null
> +++ b/arch/arm/mach-mvebu/coherency_ll.S
> @@ -0,0 +1,49 @@
> +/*
> + * Coherency fabric: low level functions
> + *
> + * Copyright (C) 2012 Marvell
> + *
> + * Gregory CLEMENT <gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> + *
> + * This file is licensed under the terms of the GNU General Public
> + * License version 2. This program is licensed "as is" without any
> + * warranty of any kind, whether express or implied.
> + *
> + * This file implements the assembly function to add a CPU to the
> + * coherency fabric. This function is called by each of the secondary
> + * CPUs during their early boot in an SMP kernel, this why this
> + * function have to callable from assembly. It can also be called by a
> + * primary CPU from C code during its boot.
> + */
> +
> +#include <linux/linkage.h>
> +#define ARMADA_XP_CFB_CTL_REG_OFFSET 0x0
> +#define ARMADA_XP_CFB_CFG_REG_OFFSET 0x4
> +
> + .text
> +/*
> + * r0: Coherency fabric base register address
> + * r1: HW CPU id
> + */
> +ENTRY(ll_set_cpu_coherent)
> + /* Create bit by cpu index */
> + mov r3, #(1 << 24)
> + lsl r1, r3, r1
> +
> + /* Add CPU to SMP group - Atomic */
> + add r3, r0, #ARMADA_XP_CFB_CTL_REG_OFFSET
> + ldr r2, [r3]
> + orr r2, r2, r1
> + str r2, [r0]
This should be storing to [r3] but you get away with it because your
immediate offset evaluates to zero.
If you fix that:
Reviewed-by: Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>
Will
next prev parent reply other threads:[~2012-11-21 15:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-21 14:59 [PATCH V6 0/5] SMP support for Armada XP Gregory CLEMENT
[not found] ` <1353509970-5237-1-git-send-email-gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2012-11-21 14:59 ` [PATCH V6 1/5] arm: mvebu: Add support for coherency fabric in mach-mvebu Gregory CLEMENT
[not found] ` <1353509970-5237-2-git-send-email-gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2012-11-21 15:15 ` Will Deacon [this message]
2012-11-21 14:59 ` [PATCH V6 2/5] arm: mvebu: Add initial support for power managmement service unit Gregory CLEMENT
2012-11-21 14:59 ` [PATCH V6 3/5] arm: mvebu: Add IPI support via doorbells Gregory CLEMENT
2012-11-21 14:59 ` [PATCH V6 4/5] arm: mm: Add support for PJ4B cpu and init routines Gregory CLEMENT
[not found] ` <1353509970-5237-5-git-send-email-gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2012-11-21 15:13 ` Will Deacon
2012-11-21 14:59 ` [PATCH V6 5/5] arm: mvebu: Add SMP support for Armada XP Gregory CLEMENT
[not found] ` <1353509970-5237-6-git-send-email-gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2012-11-21 15:17 ` 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=20121121151556.GO11990@mudshark.cambridge.arm.com \
--to=will.deacon-5wv7dgnigg8@public.gmane.org \
--cc=Leif.Lindholm-5wv7dgnIgG8@public.gmane.org \
--cc=alior-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org \
--cc=andrew-g2DYL2Zd6BY@public.gmane.org \
--cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=benavi-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org \
--cc=dann.frazier-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=dmarlin-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
--cc=ian.molton-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org \
--cc=ike.pan-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org \
--cc=jani.monoses-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org \
--cc=jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org \
--cc=jcm-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWOunwaRDDq4rA@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=nadavh-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org \
--cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
--cc=sebastian.hesselbarth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=tawfik-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org \
--cc=yehuday-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.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).