From: Tomasz Figa <tomasz.figa@gmail.com>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: Tomasz Figa <t.figa@samsung.com>,
linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
Kyungmin Park <kyungmin.park@samsung.com>,
Kukjin Kim <kgene.kim@samsung.com>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [PATCH] ARM: EXYNOS: Add support for secondary CPU bring-up on Exynos4412
Date: Tue, 28 Aug 2012 19:43:30 +0200 [thread overview]
Message-ID: <2038010.NUtf96WSJU@flatron> (raw)
In-Reply-To: <503CF014.8010503@codeaurora.org>
Hi,
Thanks for reviewing the patch.
On Tuesday 28 of August 2012 09:21:40 Stephen Boyd wrote:
> On 8/28/2012 4:13 AM, Tomasz Figa wrote:
> > diff --git a/arch/arm/mach-exynos/platsmp.c
> > b/arch/arm/mach-exynos/platsmp.c index 36c3984..1114ced 100644
> > --- a/arch/arm/mach-exynos/platsmp.c
> > +++ b/arch/arm/mach-exynos/platsmp.c
> > @@ -34,8 +34,19 @@
> >
> > extern void exynos4_secondary_startup(void);
> >
> > -#define CPU1_BOOT_REG (samsung_rev() == EXYNOS4210_REV_1_1 ? \
> > - S5P_INFORM5 : S5P_VA_SYSRAM)
> > +static inline volatile void *cpu_boot_reg_base(void)
>
> __iomem?
Sorry, bad habit. I will fix it.
> > +{
> > + if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_1_1)
> > + return S5P_INFORM5;
> > + return S5P_VA_SYSRAM;
> > +}
> > +
> > +static inline volatile void *cpu_boot_reg(int cpu)
>
> __iomem? And why volatile?
Ditto.
> > +{
> > + if (soc_is_exynos4412())
> > + return cpu_boot_reg_base() + 4*cpu;
> > + return cpu_boot_reg_base();
> > +}
> >
> > /*
> >
> > * control for which core is the next to come out of the secondary
> >
> > @@ -195,6 +208,8 @@ void __init platform_smp_prepare_cpus(unsigned int
> > max_cpus)>
> > * until it receives a soft interrupt, and then the
> > * secondary CPU branches to this address.
> > */
> >
> > - __raw_writel(virt_to_phys(exynos4_secondary_startup),
> > - CPU1_BOOT_REG);
> > + for (i = 1; i < max_cpus; ++i) {
> > + __raw_writel(virt_to_phys(exynos4_secondary_startup),
> > + cpu_boot_reg(i));
>
> Do you need to use cpu_logical_map()?
Correct me if I am wrong, but physical to logical CPU mapping will not be
1:1 only if booted on physical CPU other than 0. I have not seen yet an
Exynos-based board which does it.
However it might be wiser to use cpu_logical_map() just to be safe indeed.
I will add it in next version of the patch.
--
Best regards,
Tomasz Figa
WARNING: multiple messages have this Message-ID (diff)
From: tomasz.figa@gmail.com (Tomasz Figa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: EXYNOS: Add support for secondary CPU bring-up on Exynos4412
Date: Tue, 28 Aug 2012 19:43:30 +0200 [thread overview]
Message-ID: <2038010.NUtf96WSJU@flatron> (raw)
In-Reply-To: <503CF014.8010503@codeaurora.org>
Hi,
Thanks for reviewing the patch.
On Tuesday 28 of August 2012 09:21:40 Stephen Boyd wrote:
> On 8/28/2012 4:13 AM, Tomasz Figa wrote:
> > diff --git a/arch/arm/mach-exynos/platsmp.c
> > b/arch/arm/mach-exynos/platsmp.c index 36c3984..1114ced 100644
> > --- a/arch/arm/mach-exynos/platsmp.c
> > +++ b/arch/arm/mach-exynos/platsmp.c
> > @@ -34,8 +34,19 @@
> >
> > extern void exynos4_secondary_startup(void);
> >
> > -#define CPU1_BOOT_REG (samsung_rev() == EXYNOS4210_REV_1_1 ? \
> > - S5P_INFORM5 : S5P_VA_SYSRAM)
> > +static inline volatile void *cpu_boot_reg_base(void)
>
> __iomem?
Sorry, bad habit. I will fix it.
> > +{
> > + if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_1_1)
> > + return S5P_INFORM5;
> > + return S5P_VA_SYSRAM;
> > +}
> > +
> > +static inline volatile void *cpu_boot_reg(int cpu)
>
> __iomem? And why volatile?
Ditto.
> > +{
> > + if (soc_is_exynos4412())
> > + return cpu_boot_reg_base() + 4*cpu;
> > + return cpu_boot_reg_base();
> > +}
> >
> > /*
> >
> > * control for which core is the next to come out of the secondary
> >
> > @@ -195,6 +208,8 @@ void __init platform_smp_prepare_cpus(unsigned int
> > max_cpus)>
> > * until it receives a soft interrupt, and then the
> > * secondary CPU branches to this address.
> > */
> >
> > - __raw_writel(virt_to_phys(exynos4_secondary_startup),
> > - CPU1_BOOT_REG);
> > + for (i = 1; i < max_cpus; ++i) {
> > + __raw_writel(virt_to_phys(exynos4_secondary_startup),
> > + cpu_boot_reg(i));
>
> Do you need to use cpu_logical_map()?
Correct me if I am wrong, but physical to logical CPU mapping will not be
1:1 only if booted on physical CPU other than 0. I have not seen yet an
Exynos-based board which does it.
However it might be wiser to use cpu_logical_map() just to be safe indeed.
I will add it in next version of the patch.
--
Best regards,
Tomasz Figa
next prev parent reply other threads:[~2012-08-28 17:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-28 11:13 [PATCH] ARM: EXYNOS: Add support for secondary CPU bring-up on Exynos4412 Tomasz Figa
2012-08-28 11:13 ` Tomasz Figa
2012-08-28 16:21 ` Stephen Boyd
2012-08-28 16:21 ` Stephen Boyd
2012-08-28 17:43 ` Tomasz Figa [this message]
2012-08-28 17:43 ` Tomasz Figa
-- strict thread matches above, loose matches on Subject: below --
2012-11-22 15:50 Tomasz Figa
2012-11-22 15:50 ` Tomasz Figa
2012-11-23 2:14 ` Kukjin Kim
2012-11-23 2:14 ` Kukjin Kim
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=2038010.NUtf96WSJU@flatron \
--to=tomasz.figa@gmail.com \
--cc=kgene.kim@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=sboyd@codeaurora.org \
--cc=t.figa@samsung.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 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.