From: Nicolas Pitre <nicolas.pitre@linaro.org>
To: Vyacheslav Tyrtov <v.tyrtov@samsung.com>
Cc: linux-kernel@vger.kernel.org,
Rob Herring <rob.herring@calxeda.com>,
Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Stephen Warren <swarren@wwwdotorg.org>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Rob Landley <rob@landley.net>, Kukjin Kim <kgene.kim@samsung.com>,
Russell King <linux@arm.linux.org.uk>,
Ben Dooks <ben-linux@fluff.org>,
Mike Turquette <mturquette@linaro.org>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>,
Heiko Stuebner <heiko@sntech.de>,
Naour Romain <romain.naour@openwide.fr>,
devicetree@vger.kernel.org, linux-doc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org,
Tarek Dakhran <t.dakhran@samsung.com>,
Dave Martin <Dave.Martin@arm.com>,
tomasz.figa@gmail.com
Subject: Re: [PATCH v4 4/4] ARM: EXYNOS: add Exynos Dual Cluster Support
Date: Wed, 27 Nov 2013 13:00:33 -0500 (EST) [thread overview]
Message-ID: <alpine.LFD.2.10.1311271246010.9667@knanqh.ubzr> (raw)
In-Reply-To: <1385456288-20398-5-git-send-email-v.tyrtov@samsung.com>
On Tue, 26 Nov 2013, Vyacheslav Tyrtov wrote:
> From: Tarek Dakhran <t.dakhran@samsung.com>
>
> Add EDCS(Exynos Dual Cluster Support) for Samsung Exynos5410 SoC.
> This enables all 8 cores, 4 x A7 and 4 x A15 run at the same time.
>
> Signed-off-by: Tarek Dakhran <t.dakhran@samsung.com>
> Signed-off-by: Vyacheslav Tyrtov <v.tyrtov@samsung.com>
Just some minor comments in addition to those Dave already provided.
[...]
> +/*
> + * Enable cluster-level coherency, in preparation for turning on the MMU.
> + */
> +static void __naked edcs_power_up_setup(unsigned int affinity_level)
> +{
> + asm volatile ("\n"
> + "b cci_enable_port_for_self");
> +}
You should need to turn on the CCI port only for the first CPU to power
up a cluster. This is indicated by the affinity level passed into r0.
See tc2_pm_power_up_setup for example.
> +static int __init edcs_init(void)
> +{
> + int ret;
> + struct device_node *node;
> +
> + node = of_find_compatible_node(NULL, NULL, "samsung,exynos5410");
> + if (!node)
> + return -ENODEV;
> +
> + if (!cci_probed())
> + return -ENODEV;
> +
> + /*
> + * Future entries into the kernel can now go
> + * through the cluster entry vectors.
> + */
> + writel_relaxed(virt_to_phys(mcpm_entry_point), REG_ENTRY_ADDR);
> +
> + edcs_data_init();
> + mcpm_smp_set_ops();
> +
> + ret = mcpm_platform_register(&edcs_power_ops);
> + if (!ret) {
> + mcpm_sync_init(edcs_power_up_setup);
> + pr_info("EDCS power management initialized\n");
> + }
> + return ret;
> +}
Here I'd suggest initializing EG_ENTRY_ADDR only after mcpm_sync_init()
is done. If ever a secondary CPU, seeing that the address is no longer
zero, decides to enter the kernel while the state machine is not
initialized yet, might lead to all sorts of funny behaviors.
Nicolas
next prev parent reply other threads:[~2013-11-27 18:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-26 8:58 [PATCH v4 0/4] Exynos 5410 Dual cluster support Vyacheslav Tyrtov
2013-11-26 8:58 ` [PATCH v4 1/4] ARM: EXYNOS: Add support for EXYNOS5410 SoC Vyacheslav Tyrtov
2013-11-26 8:58 ` [PATCH v4 2/4] clk: exynos5410: register clocks using common clock framework Vyacheslav Tyrtov
2013-12-09 16:34 ` Tomasz Figa
2013-12-09 20:37 ` Kukjin Kim
2013-12-10 9:50 ` Tarek Dakhran
2013-11-26 8:58 ` [PATCH v4 3/4] ARM: dts: Add initial device tree support for EXYNOS5410 Vyacheslav Tyrtov
[not found] ` <1385456288-20398-1-git-send-email-v.tyrtov-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-11-26 8:58 ` [PATCH v4 4/4] ARM: EXYNOS: add Exynos Dual Cluster Support Vyacheslav Tyrtov
2013-11-26 16:40 ` Dave Martin
2013-11-27 17:44 ` Nicolas Pitre
2013-11-27 18:00 ` Nicolas Pitre [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-11-26 15:30 Dave Martin
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=alpine.LFD.2.10.1311271246010.9667@knanqh.ubzr \
--to=nicolas.pitre@linaro.org \
--cc=Dave.Martin@arm.com \
--cc=ben-linux@fluff.org \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=ijc+devicetree@hellion.org.uk \
--cc=kgene.kim@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mark.rutland@arm.com \
--cc=mturquette@linaro.org \
--cc=pawel.moll@arm.com \
--cc=rob.herring@calxeda.com \
--cc=rob@landley.net \
--cc=romain.naour@openwide.fr \
--cc=swarren@wwwdotorg.org \
--cc=t.dakhran@samsung.com \
--cc=tglx@linutronix.de \
--cc=tomasz.figa@gmail.com \
--cc=v.tyrtov@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 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).