Skip to content

Commit

Permalink
ARM: shmobile: Remove shmobile_boot_arg
Browse files Browse the repository at this point in the history
CPU boot configuration writes to shmobile_boot_arg, which is located in
the .text section, and thus should not be written to.

As of commit 1d33a35 ("ARM: shmobile: Per-CPU SMP boot / sleep
code for SCU SoCs"), and ignoring accidental remainings,
shmobile_boot_arg is always set to MPIDR_HWID_BITMASK by C code.
Hence we can just hardcode this in the assembler code, and remove the
variable, and thus also remove the need to write to this variable.

Signed-off-by: Geert Uytterhoeven <[email protected]>
Acked-by: Nicolas Pitre <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
  • Loading branch information
geertu authored and horms committed Feb 17, 2016
1 parent 4e960f5 commit 901c5ff
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 9 deletions.
1 change: 0 additions & 1 deletion arch/arm/mach-shmobile/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
extern void shmobile_init_delay(void);
extern void shmobile_boot_vector(void);
extern unsigned long shmobile_boot_fn;
extern unsigned long shmobile_boot_arg;
extern unsigned long shmobile_boot_size;
extern void shmobile_smp_boot(void);
extern void shmobile_smp_sleep(void);
Expand Down
8 changes: 2 additions & 6 deletions arch/arm/mach-shmobile/headsmp.S
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
.arm
.align 12
ENTRY(shmobile_boot_vector)
ldr r0, 2f
ldr r1, 1f
bx r1

Expand All @@ -34,9 +33,6 @@ ENDPROC(shmobile_boot_vector)
.globl shmobile_boot_fn
shmobile_boot_fn:
1: .space 4
.globl shmobile_boot_arg
shmobile_boot_arg:
2: .space 4
.globl shmobile_boot_size
shmobile_boot_size:
.long . - shmobile_boot_vector
Expand All @@ -46,9 +42,9 @@ shmobile_boot_size:
*/

ENTRY(shmobile_smp_boot)
@ r0 = MPIDR_HWID_BITMASK
mrc p15, 0, r1, c0, c0, 5 @ r1 = MPIDR
and r0, r1, r0 @ r0 = cpu_logical_map() value
and r0, r1, #0xffffff @ MPIDR_HWID_BITMASK
@ r0 = cpu_logical_map() value
mov r1, #0 @ r1 = CPU index
adr r2, 1f
ldmia r2, {r5, r6, r7}
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-shmobile/platsmp-apmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ void __init shmobile_smp_apmu_prepare_cpus(unsigned int max_cpus,
{
/* install boot code shared by all CPUs */
shmobile_boot_fn = virt_to_phys(shmobile_smp_boot);
shmobile_boot_arg = MPIDR_HWID_BITMASK;

/* perform per-cpu setup */
apmu_parse_cfg(apmu_init_cpu, apmu_config, num);
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-shmobile/platsmp-scu.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ void __init shmobile_smp_scu_prepare_cpus(unsigned int max_cpus)
{
/* install boot code shared by all CPUs */
shmobile_boot_fn = virt_to_phys(shmobile_smp_boot);
shmobile_boot_arg = MPIDR_HWID_BITMASK;

/* enable SCU and cache coherency on booting CPU */
scu_enable(shmobile_scu_base);
Expand Down

0 comments on commit 901c5ff

Please sign in to comment.