* [PATCH V2] ARM: tegra: add cpu_disable for hotplug
@ 2013-05-28 18:14 ` Stephen Warren
0 siblings, 0 replies; 4+ messages in thread
From: Stephen Warren @ 2013-05-28 18:14 UTC (permalink / raw)
To: Stephen Warren
Cc: Joseph Lo, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
Stephen Warren
From: Joseph Lo <josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
The Tegra114 could hotplug the CPU0, but the common cpu_disable didn't
support that. Adding a Tegra specific cpu_disable function for it.
Signed-off-by: Joseph Lo <josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
[swarren: adjusted the switch statement to be future-proof]
Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
arch/arm/mach-tegra/common.h | 1 +
arch/arm/mach-tegra/hotplug.c | 11 +++++++++++
arch/arm/mach-tegra/platsmp.c | 1 +
3 files changed, 13 insertions(+)
diff --git a/arch/arm/mach-tegra/common.h b/arch/arm/mach-tegra/common.h
index 5900cc4..32f8eb3 100644
--- a/arch/arm/mach-tegra/common.h
+++ b/arch/arm/mach-tegra/common.h
@@ -2,3 +2,4 @@ extern struct smp_operations tegra_smp_ops;
extern int tegra_cpu_kill(unsigned int cpu);
extern void tegra_cpu_die(unsigned int cpu);
+extern int tegra_cpu_disable(unsigned int cpu);
diff --git a/arch/arm/mach-tegra/hotplug.c b/arch/arm/mach-tegra/hotplug.c
index d07f152..a52c10e 100644
--- a/arch/arm/mach-tegra/hotplug.c
+++ b/arch/arm/mach-tegra/hotplug.c
@@ -46,6 +46,17 @@ void __ref tegra_cpu_die(unsigned int cpu)
BUG();
}
+int tegra_cpu_disable(unsigned int cpu)
+{
+ switch (tegra_chip_id) {
+ case TEGRA20:
+ case TEGRA30:
+ return cpu == 0 ? -EPERM : 0;
+ default:
+ return 0;
+ }
+}
+
void __init tegra_hotplug_init(void)
{
if (!IS_ENABLED(CONFIG_HOTPLUG_CPU))
diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c
index 554aedc..24db4ac 100644
--- a/arch/arm/mach-tegra/platsmp.c
+++ b/arch/arm/mach-tegra/platsmp.c
@@ -196,5 +196,6 @@ struct smp_operations tegra_smp_ops __initdata = {
#ifdef CONFIG_HOTPLUG_CPU
.cpu_kill = tegra_cpu_kill,
.cpu_die = tegra_cpu_die,
+ .cpu_disable = tegra_cpu_disable,
#endif
};
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH V2] ARM: tegra: add cpu_disable for hotplug
@ 2013-05-28 18:14 ` Stephen Warren
0 siblings, 0 replies; 4+ messages in thread
From: Stephen Warren @ 2013-05-28 18:14 UTC (permalink / raw)
To: linux-arm-kernel
From: Joseph Lo <josephl@nvidia.com>
The Tegra114 could hotplug the CPU0, but the common cpu_disable didn't
support that. Adding a Tegra specific cpu_disable function for it.
Signed-off-by: Joseph Lo <josephl@nvidia.com>
[swarren: adjusted the switch statement to be future-proof]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
arch/arm/mach-tegra/common.h | 1 +
arch/arm/mach-tegra/hotplug.c | 11 +++++++++++
arch/arm/mach-tegra/platsmp.c | 1 +
3 files changed, 13 insertions(+)
diff --git a/arch/arm/mach-tegra/common.h b/arch/arm/mach-tegra/common.h
index 5900cc4..32f8eb3 100644
--- a/arch/arm/mach-tegra/common.h
+++ b/arch/arm/mach-tegra/common.h
@@ -2,3 +2,4 @@ extern struct smp_operations tegra_smp_ops;
extern int tegra_cpu_kill(unsigned int cpu);
extern void tegra_cpu_die(unsigned int cpu);
+extern int tegra_cpu_disable(unsigned int cpu);
diff --git a/arch/arm/mach-tegra/hotplug.c b/arch/arm/mach-tegra/hotplug.c
index d07f152..a52c10e 100644
--- a/arch/arm/mach-tegra/hotplug.c
+++ b/arch/arm/mach-tegra/hotplug.c
@@ -46,6 +46,17 @@ void __ref tegra_cpu_die(unsigned int cpu)
BUG();
}
+int tegra_cpu_disable(unsigned int cpu)
+{
+ switch (tegra_chip_id) {
+ case TEGRA20:
+ case TEGRA30:
+ return cpu == 0 ? -EPERM : 0;
+ default:
+ return 0;
+ }
+}
+
void __init tegra_hotplug_init(void)
{
if (!IS_ENABLED(CONFIG_HOTPLUG_CPU))
diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c
index 554aedc..24db4ac 100644
--- a/arch/arm/mach-tegra/platsmp.c
+++ b/arch/arm/mach-tegra/platsmp.c
@@ -196,5 +196,6 @@ struct smp_operations tegra_smp_ops __initdata = {
#ifdef CONFIG_HOTPLUG_CPU
.cpu_kill = tegra_cpu_kill,
.cpu_die = tegra_cpu_die,
+ .cpu_disable = tegra_cpu_disable,
#endif
};
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH V2] ARM: tegra: add cpu_disable for hotplug
2013-05-28 18:14 ` Stephen Warren
@ 2013-05-28 21:31 ` Stephen Warren
-1 siblings, 0 replies; 4+ messages in thread
From: Stephen Warren @ 2013-05-28 21:31 UTC (permalink / raw)
To: Stephen Warren
Cc: Joseph Lo, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
Stephen Warren
On 05/28/2013 12:14 PM, Stephen Warren wrote:
> From: Joseph Lo <josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>
> The Tegra114 could hotplug the CPU0, but the common cpu_disable didn't
> support that. Adding a Tegra specific cpu_disable function for it.
>
> Signed-off-by: Joseph Lo <josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> [swarren: adjusted the switch statement to be future-proof]
> Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
I have applied this to Tegra's for-3.11/soc branch.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH V2] ARM: tegra: add cpu_disable for hotplug
@ 2013-05-28 21:31 ` Stephen Warren
0 siblings, 0 replies; 4+ messages in thread
From: Stephen Warren @ 2013-05-28 21:31 UTC (permalink / raw)
To: linux-arm-kernel
On 05/28/2013 12:14 PM, Stephen Warren wrote:
> From: Joseph Lo <josephl@nvidia.com>
>
> The Tegra114 could hotplug the CPU0, but the common cpu_disable didn't
> support that. Adding a Tegra specific cpu_disable function for it.
>
> Signed-off-by: Joseph Lo <josephl@nvidia.com>
> [swarren: adjusted the switch statement to be future-proof]
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
I have applied this to Tegra's for-3.11/soc branch.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-05-28 21:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-28 18:14 [PATCH V2] ARM: tegra: add cpu_disable for hotplug Stephen Warren
2013-05-28 18:14 ` Stephen Warren
[not found] ` <1369764881-20520-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-05-28 21:31 ` Stephen Warren
2013-05-28 21:31 ` Stephen Warren
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.