* [PATCH] ARM: psci: keystone: remove keystone_smp_ops code if psci is supported
@ 2015-07-01 12:13 Vitaly Andrianov
2015-07-01 12:13 ` [PATCH] keystone: dts: add psci command definition Vitaly Andrianov
[not found] ` <1435752784-30639-1-git-send-email-vitalya-l0cyMroinI0@public.gmane.org>
0 siblings, 2 replies; 7+ messages in thread
From: Vitaly Andrianov @ 2015-07-01 12:13 UTC (permalink / raw)
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-lFZ/pmaqli7XmaaqVzeoHQ,
ssantosh-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A, pawel.moll-5wv7dgnIgG8,
ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
galak-sgV2jX0FEOL9JmXXK+q4OQ, devicetree-u79uwXL29TY76Z2rM5mHXA
Cc: Vitaly Andrianov
If we enable psci support we don't need keystone_smp_ops anymore.
Signed-off-by: Vitaly Andrianov <vitalya-l0cyMroinI0@public.gmane.org>
---
arch/arm/mach-keystone/Makefile | 2 ++
arch/arm/mach-keystone/keystone.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/arch/arm/mach-keystone/Makefile b/arch/arm/mach-keystone/Makefile
index 25d9239..5cc5ca4 100644
--- a/arch/arm/mach-keystone/Makefile
+++ b/arch/arm/mach-keystone/Makefile
@@ -3,7 +3,9 @@ obj-y := keystone.o smc.o
plus_sec := $(call as-instr,.arch_extension sec,+sec)
AFLAGS_smc.o :=-Wa,-march=armv7-a$(plus_sec)
+ifneq ($(CONFIG_ARM_PSCI),y)
obj-$(CONFIG_SMP) += platsmp.o
+endif
# PM domain driver for Keystone SOCs
obj-$(CONFIG_ARCH_KEYSTONE) += pm_domain.o
diff --git a/arch/arm/mach-keystone/keystone.c b/arch/arm/mach-keystone/keystone.c
index e2880105..9cc489c 100644
--- a/arch/arm/mach-keystone/keystone.c
+++ b/arch/arm/mach-keystone/keystone.c
@@ -105,7 +105,9 @@ DT_MACHINE_START(KEYSTONE, "Keystone")
#if defined(CONFIG_ZONE_DMA) && defined(CONFIG_ARM_LPAE)
.dma_zone_size = SZ_2G,
#endif
+#ifndef CONFIG_ARM_PSCI
.smp = smp_ops(keystone_smp_ops),
+#endif
.init_machine = keystone_init,
.dt_compat = keystone_match,
.pv_fixup = keystone_pv_fixup,
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH] keystone: dts: add psci command definition
2015-07-01 12:13 [PATCH] ARM: psci: keystone: remove keystone_smp_ops code if psci is supported Vitaly Andrianov
@ 2015-07-01 12:13 ` Vitaly Andrianov
[not found] ` <1435752784-30639-2-git-send-email-vitalya-l0cyMroinI0@public.gmane.org>
[not found] ` <1435752784-30639-1-git-send-email-vitalya-l0cyMroinI0@public.gmane.org>
1 sibling, 1 reply; 7+ messages in thread
From: Vitaly Andrianov @ 2015-07-01 12:13 UTC (permalink / raw)
To: linux-arm-kernel, linux-kernel, linux, ssantosh, mark.rutland,
robh+dt, pawel.moll, ijc+devicetree, galak, devicetree
Cc: Vitaly Andrianov
This commit adds definition for cpu_on, cpu_off and cpu_suspend commands.
These definitions must match the corresponding PSCI definitions in
boot monitor.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
---
arch/arm/boot/dts/keystone.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/keystone.dtsi b/arch/arm/boot/dts/keystone.dtsi
index c06542b..ab60fca 100644
--- a/arch/arm/boot/dts/keystone.dtsi
+++ b/arch/arm/boot/dts/keystone.dtsi
@@ -58,6 +58,14 @@
<GIC_SPI 23 IRQ_TYPE_EDGE_RISING>;
};
+ psci {
+ compatible = "arm,psci";
+ method = "smc";
+ cpu_suspend = <0x84000001>;
+ cpu_off = <0x84000002>;
+ cpu_on = <0x84000003>;
+ };
+
soc {
#address-cells = <1>;
#size-cells = <1>;
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread[parent not found: <1435752784-30639-1-git-send-email-vitalya-l0cyMroinI0@public.gmane.org>]
* Re: [PATCH] ARM: psci: keystone: remove keystone_smp_ops code if psci is supported
[not found] ` <1435752784-30639-1-git-send-email-vitalya-l0cyMroinI0@public.gmane.org>
@ 2015-07-01 12:39 ` Mark Rutland
2015-07-01 14:12 ` Russell King - ARM Linux
1 sibling, 0 replies; 7+ messages in thread
From: Mark Rutland @ 2015-07-01 12:39 UTC (permalink / raw)
To: Vitaly Andrianov
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org,
ssantosh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, Pawel Moll,
ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org,
galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
On Wed, Jul 01, 2015 at 01:13:03PM +0100, Vitaly Andrianov wrote:
> If we enable psci support we don't need keystone_smp_ops anymore.
You need them for existing users.
>
> Signed-off-by: Vitaly Andrianov <vitalya-l0cyMroinI0@public.gmane.org>
> ---
> arch/arm/mach-keystone/Makefile | 2 ++
> arch/arm/mach-keystone/keystone.c | 2 ++
> 2 files changed, 4 insertions(+)
>
> diff --git a/arch/arm/mach-keystone/Makefile b/arch/arm/mach-keystone/Makefile
> index 25d9239..5cc5ca4 100644
> --- a/arch/arm/mach-keystone/Makefile
> +++ b/arch/arm/mach-keystone/Makefile
> @@ -3,7 +3,9 @@ obj-y := keystone.o smc.o
> plus_sec := $(call as-instr,.arch_extension sec,+sec)
> AFLAGS_smc.o :=-Wa,-march=armv7-a$(plus_sec)
>
> +ifneq ($(CONFIG_ARM_PSCI),y)
> obj-$(CONFIG_SMP) += platsmp.o
> +endif
>
> # PM domain driver for Keystone SOCs
> obj-$(CONFIG_ARCH_KEYSTONE) += pm_domain.o
> diff --git a/arch/arm/mach-keystone/keystone.c b/arch/arm/mach-keystone/keystone.c
> index e2880105..9cc489c 100644
> --- a/arch/arm/mach-keystone/keystone.c
> +++ b/arch/arm/mach-keystone/keystone.c
> @@ -105,7 +105,9 @@ DT_MACHINE_START(KEYSTONE, "Keystone")
> #if defined(CONFIG_ZONE_DMA) && defined(CONFIG_ARM_LPAE)
> .dma_zone_size = SZ_2G,
> #endif
> +#ifndef CONFIG_ARM_PSCI
> .smp = smp_ops(keystone_smp_ops),
> +#endif
This will prevent building a kernel that supports PSCI and your legacy
SMP bringup.
I don't think this is necessary, given the code in setup_arch and the
absence of mdesc->smp_init for keystone. A single kernel can support
both, and it should support both.
Thanks,
Mark.
> .init_machine = keystone_init,
> .dt_compat = keystone_match,
> .pv_fixup = keystone_pv_fixup,
> --
> 1.9.1
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] ARM: psci: keystone: remove keystone_smp_ops code if psci is supported
[not found] ` <1435752784-30639-1-git-send-email-vitalya-l0cyMroinI0@public.gmane.org>
2015-07-01 12:39 ` [PATCH] ARM: psci: keystone: remove keystone_smp_ops code if psci is supported Mark Rutland
@ 2015-07-01 14:12 ` Russell King - ARM Linux
1 sibling, 0 replies; 7+ messages in thread
From: Russell King - ARM Linux @ 2015-07-01 14:12 UTC (permalink / raw)
To: Vitaly Andrianov
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
ssantosh-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A, pawel.moll-5wv7dgnIgG8,
ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
galak-sgV2jX0FEOL9JmXXK+q4OQ, devicetree-u79uwXL29TY76Z2rM5mHXA
On Wed, Jul 01, 2015 at 08:13:03AM -0400, Vitaly Andrianov wrote:
> If we enable psci support we don't need keystone_smp_ops anymore.
>
> Signed-off-by: Vitaly Andrianov <vitalya-l0cyMroinI0@public.gmane.org>
However, this is not necessary. If you look at arch/arm/kernel/setup.c,
it contains this:
psci_init();
#ifdef CONFIG_SMP
if (is_smp()) {
if (!mdesc->smp_init || !mdesc->smp_init()) {
if (psci_smp_available())
smp_set_ops(&psci_smp_ops);
else if (mdesc->smp)
smp_set_ops(mdesc->smp);
}
smp_init_cpus();
smp_build_mpidr_hash();
}
#endif
So, the platforms' SMP ops won't be used even if they're provided
when PSCI is available.
--
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-07-01 15:03 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-01 12:13 [PATCH] ARM: psci: keystone: remove keystone_smp_ops code if psci is supported Vitaly Andrianov
2015-07-01 12:13 ` [PATCH] keystone: dts: add psci command definition Vitaly Andrianov
[not found] ` <1435752784-30639-2-git-send-email-vitalya-l0cyMroinI0@public.gmane.org>
2015-07-01 12:41 ` Mark Rutland
2015-07-01 13:05 ` Vitaly Andrianov
[not found] ` <5593E59B.9090304-l0cyMroinI0@public.gmane.org>
2015-07-01 15:03 ` santosh shilimkar
[not found] ` <1435752784-30639-1-git-send-email-vitalya-l0cyMroinI0@public.gmane.org>
2015-07-01 12:39 ` [PATCH] ARM: psci: keystone: remove keystone_smp_ops code if psci is supported Mark Rutland
2015-07-01 14:12 ` Russell King - ARM Linux
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).