From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: patrice.chotard@st.com
Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] ARM: STi: Restore secondary CPU's bringup
Date: Tue, 18 Dec 2018 15:52:40 +0000 [thread overview]
Message-ID: <20181218155239.GP26090@n2100.armlinux.org.uk> (raw)
In-Reply-To: <1545144493-11600-1-git-send-email-patrice.chotard@st.com>
On Tue, Dec 18, 2018 at 03:48:13PM +0100, patrice.chotard@st.com wrote:
> From: Patrice Chotard <patrice.chotard@st.com>
>
> Due to pen_release and boot_lock removal, secondary CPU's bringup
> was broken. Restore CPU's bringup by reworking properly
> .smp_prepare_cpus and .smp_boot_secondary STi callbacks.
Sorry, maybe I don't understand your commit message, but you seem to be
saying that removal of the pen_release and boot_lock broke STi's secondary
CPU bring up? Please clarify, and explain how that happened.
Thanks.
>
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
> ---
> arch/arm/mach-sti/platsmp.c | 31 ++++++++++++++++---------------
> 1 file changed, 16 insertions(+), 15 deletions(-)
>
> diff --git a/arch/arm/mach-sti/platsmp.c b/arch/arm/mach-sti/platsmp.c
> index 2166850..9bfc93a 100644
> --- a/arch/arm/mach-sti/platsmp.c
> +++ b/arch/arm/mach-sti/platsmp.c
> @@ -28,8 +28,21 @@
>
> #include "smp.h"
>
> +static u32 __iomem *cpu_strt_ptr;
> +
> static int sti_boot_secondary(unsigned int cpu, struct task_struct *idle)
> {
> + unsigned long entry_pa = __pa_symbol(secondary_startup);
> +
> + __raw_writel(entry_pa, cpu_strt_ptr);
> +
> + /*
> + * wmb so that data is actually written
> + * before cache flush is done
> + */
> + smp_wmb();
> + sync_cache_w(cpu_strt_ptr);
> +
> /*
> * Send the secondary CPU a soft interrupt, thereby causing
> * it to jump to the secondary entrypoint.
> @@ -43,10 +56,8 @@ static void __init sti_smp_prepare_cpus(unsigned int max_cpus)
> {
> struct device_node *np;
> void __iomem *scu_base;
> - u32 __iomem *cpu_strt_ptr;
> u32 release_phys;
> int cpu;
> - unsigned long entry_pa = __pa_symbol(secondary_startup);
>
> np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-scu");
>
> @@ -74,8 +85,8 @@ static void __init sti_smp_prepare_cpus(unsigned int max_cpus)
> }
>
> /*
> - * holding pen is usually configured in SBC DMEM but can also be
> - * in RAM.
> + * cpu-release-addr is usually configured in SBC DMEM but can
> + * also be in RAM.
> */
>
> if (!memblock_is_memory(release_phys))
> @@ -85,17 +96,7 @@ static void __init sti_smp_prepare_cpus(unsigned int max_cpus)
> cpu_strt_ptr =
> (u32 __iomem *)phys_to_virt(release_phys);
>
> - __raw_writel(entry_pa, cpu_strt_ptr);
> -
> - /*
> - * wmb so that data is actually written
> - * before cache flush is done
> - */
> - smp_wmb();
> - sync_cache_w(cpu_strt_ptr);
> -
> - if (!memblock_is_memory(release_phys))
> - iounmap(cpu_strt_ptr);
> + set_cpu_possible(cpu, true);
> }
> }
>
> --
> 1.9.1
>
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
next prev parent reply other threads:[~2018-12-18 15:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-18 14:48 [PATCH 1/1] ARM: STi: Restore secondary CPU's bringup patrice.chotard
2018-12-18 15:52 ` Russell King - ARM Linux [this message]
2018-12-18 17:05 ` Patrice CHOTARD
2018-12-18 17:27 ` Russell King - ARM Linux
2018-12-19 10:31 ` Patrice CHOTARD
2018-12-19 11:28 ` Russell King - ARM Linux
2018-12-19 12:14 ` Patrice CHOTARD
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=20181218155239.GP26090@n2100.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patrice.chotard@st.com \
/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