diff mbox series

[1/2] ARM: zynq: support smp in thumb mode

Message ID 20190806030718.29048-2-luaraneda@gmail.com (mailing list archive)
State Changes Requested
Headers show
Series ARM: zynq: smp improvements | expand

Commit Message

Luis Araneda Aug. 6, 2019, 3:07 a.m. UTC
Add .arm directive to headsmp.S to ensure that the
CPU starts in 32-bit ARM mode and the correct code
size is copied on smp bring-up

Additionally, start secondary CPUs on secondary_startup_arm
to automatically switch from ARM to thumb on a thumb kernel

Suggested-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Luis Araneda <luaraneda@gmail.com>
---
 arch/arm/mach-zynq/headsmp.S | 2 ++
 arch/arm/mach-zynq/platsmp.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

Comments

Greg KH Aug. 6, 2019, 5:17 a.m. UTC | #1
On Mon, Aug 05, 2019 at 11:07:17PM -0400, Luis Araneda wrote:
> Add .arm directive to headsmp.S to ensure that the
> CPU starts in 32-bit ARM mode and the correct code
> size is copied on smp bring-up
> 
> Additionally, start secondary CPUs on secondary_startup_arm
> to automatically switch from ARM to thumb on a thumb kernel
> 
> Suggested-by: Michal Simek <michal.simek@xilinx.com>
> Signed-off-by: Luis Araneda <luaraneda@gmail.com>
> ---
>  arch/arm/mach-zynq/headsmp.S | 2 ++
>  arch/arm/mach-zynq/platsmp.c | 2 +-
>  2 files changed, 3 insertions(+), 1 deletion(-)

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>
Michal Simek Aug. 6, 2019, 6:39 a.m. UTC | #2
On 06. 08. 19 5:07, Luis Araneda wrote:
> Add .arm directive to headsmp.S to ensure that the
> CPU starts in 32-bit ARM mode and the correct code
> size is copied on smp bring-up
> 
> Additionally, start secondary CPUs on secondary_startup_arm
> to automatically switch from ARM to thumb on a thumb kernel
> 
> Suggested-by: Michal Simek <michal.simek@xilinx.com>
> Signed-off-by: Luis Araneda <luaraneda@gmail.com>
> ---
>  arch/arm/mach-zynq/headsmp.S | 2 ++
>  arch/arm/mach-zynq/platsmp.c | 2 +-
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-zynq/headsmp.S b/arch/arm/mach-zynq/headsmp.S
> index ab85003cf9ad..3449e0d1f990 100644
> --- a/arch/arm/mach-zynq/headsmp.S
> +++ b/arch/arm/mach-zynq/headsmp.S
> @@ -7,6 +7,8 @@
>  #include <linux/init.h>
>  #include <asm/assembler.h>
>  
> +	.arm
> +
>  ENTRY(zynq_secondary_trampoline)
>  ARM_BE8(setend	be)				@ ensure we are in BE8 mode
>  	ldr	r0, zynq_secondary_trampoline_jump
> diff --git a/arch/arm/mach-zynq/platsmp.c b/arch/arm/mach-zynq/platsmp.c
> index a7cfe07156f4..38728badabd4 100644
> --- a/arch/arm/mach-zynq/platsmp.c
> +++ b/arch/arm/mach-zynq/platsmp.c
> @@ -81,7 +81,7 @@ EXPORT_SYMBOL(zynq_cpun_start);
>  
>  static int zynq_boot_secondary(unsigned int cpu, struct task_struct *idle)
>  {
> -	return zynq_cpun_start(__pa_symbol(secondary_startup), cpu);
> +	return zynq_cpun_start(__pa_symbol(secondary_startup_arm), cpu);
>  }
>  
>  /*
> 

It is really a question if this should go to stable tree. It is pretty
much new feature.
Will be good to also add link to similar patch for example this one
5616f36713ea77f57ae908bf2fef641364403c9f.

M
Luis Araneda Aug. 6, 2019, 12:40 p.m. UTC | #3
Hi,

On Tue, Aug 6, 2019 at 2:39 AM Michal Simek <michal.simek@xilinx.com> wrote:
>
> On 06. 08. 19 5:07, Luis Araneda wrote:
> > Add .arm directive to headsmp.S to ensure that the
> > CPU starts in 32-bit ARM mode and the correct code
> > size is copied on smp bring-up
> >
> > Additionally, start secondary CPUs on secondary_startup_arm
> > to automatically switch from ARM to thumb on a thumb kernel
[...]
>
> It is really a question if this should go to stable tree. It is pretty
> much new feature.
> Will be good to also add link to similar patch for example this one
> 5616f36713ea77f57ae908bf2fef641364403c9f.

Ok, I'm dropping stable from CC. From the previous comments, I thought
that the two patches were part of the same fix, but now I realized
this is a feature rather than a fix.

Michal, do you want a new version with the link to the similar patch
or would you take it in its current form?

Thanks,
Luis Araneda.
Michal Simek Aug. 8, 2019, 9:18 a.m. UTC | #4
On 06. 08. 19 14:40, Luis Araneda wrote:
> Hi,
> 
> On Tue, Aug 6, 2019 at 2:39 AM Michal Simek <michal.simek@xilinx.com> wrote:
>>
>> On 06. 08. 19 5:07, Luis Araneda wrote:
>>> Add .arm directive to headsmp.S to ensure that the
>>> CPU starts in 32-bit ARM mode and the correct code
>>> size is copied on smp bring-up
>>>
>>> Additionally, start secondary CPUs on secondary_startup_arm
>>> to automatically switch from ARM to thumb on a thumb kernel
> [...]
>>
>> It is really a question if this should go to stable tree. It is pretty
>> much new feature.
>> Will be good to also add link to similar patch for example this one
>> 5616f36713ea77f57ae908bf2fef641364403c9f.
> 
> Ok, I'm dropping stable from CC. From the previous comments, I thought
> that the two patches were part of the same fix, but now I realized
> this is a feature rather than a fix.
> 
> Michal, do you want a new version with the link to the similar patch
> or would you take it in its current form?

new version please.
M
diff mbox series

Patch

diff --git a/arch/arm/mach-zynq/headsmp.S b/arch/arm/mach-zynq/headsmp.S
index ab85003cf9ad..3449e0d1f990 100644
--- a/arch/arm/mach-zynq/headsmp.S
+++ b/arch/arm/mach-zynq/headsmp.S
@@ -7,6 +7,8 @@ 
 #include <linux/init.h>
 #include <asm/assembler.h>
 
+	.arm
+
 ENTRY(zynq_secondary_trampoline)
 ARM_BE8(setend	be)				@ ensure we are in BE8 mode
 	ldr	r0, zynq_secondary_trampoline_jump
diff --git a/arch/arm/mach-zynq/platsmp.c b/arch/arm/mach-zynq/platsmp.c
index a7cfe07156f4..38728badabd4 100644
--- a/arch/arm/mach-zynq/platsmp.c
+++ b/arch/arm/mach-zynq/platsmp.c
@@ -81,7 +81,7 @@  EXPORT_SYMBOL(zynq_cpun_start);
 
 static int zynq_boot_secondary(unsigned int cpu, struct task_struct *idle)
 {
-	return zynq_cpun_start(__pa_symbol(secondary_startup), cpu);
+	return zynq_cpun_start(__pa_symbol(secondary_startup_arm), cpu);
 }
 
 /*