Skip to content

Commit f46ada0

Browse files
committed
Merge tag 'renesas-arm-soc-for-v6.7-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/arm
Renesas ARM SoC updates for v6.7 - Reserve boot area when SMP is enabled to prevent conflicts with FLASH, - Miscellaneous fixes and improvements. * tag 'renesas-arm-soc-for-v6.7-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: ARM: shmobile: sh73a0: Reserve boot area when SMP is enabled ARM: shmobile: r8a7779: Reserve boot area when SMP is enabled ARM: shmobile: rcar-gen2: Reserve boot area when SMP is enabled ARM: shmobile: rcar-gen2: Remove unneeded once handling Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
2 parents 646fe2e + 435d422 commit f46ada0

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

arch/arm/mach-shmobile/pm-rcar-gen2.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,16 @@ void __init rcar_gen2_pm_init(void)
4646
{
4747
void __iomem *p;
4848
u32 bar;
49-
static int once;
5049
struct device_node *np;
5150
bool has_a7 = false;
5251
bool has_a15 = false;
5352
struct resource res;
5453
int error;
5554

56-
if (once++)
55+
if (!request_mem_region(0, SZ_256K, "Boot Area")) {
56+
pr_err("Failed to request boot area\n");
5757
return;
58+
}
5859

5960
for_each_of_cpu_node(np) {
6061
if (of_device_is_compatible(np, "arm,cortex-a15"))

arch/arm/mach-shmobile/smp-r8a7779.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,14 @@ static int r8a7779_boot_secondary(unsigned int cpu, struct task_struct *idle)
3838

3939
static void __init r8a7779_smp_prepare_cpus(unsigned int max_cpus)
4040
{
41-
void __iomem *base = ioremap(HPBREG_BASE, 0x1000);
41+
void __iomem *base;
42+
43+
if (!request_mem_region(0, SZ_4K, "Boot Area")) {
44+
pr_err("Failed to request boot area\n");
45+
return;
46+
}
47+
48+
base = ioremap(HPBREG_BASE, 0x1000);
4249

4350
/* Map the reset vector (in headsmp-scu.S, headsmp.S) */
4451
writel(__pa(shmobile_boot_vector), base + AVECR);

arch/arm/mach-shmobile/smp-sh73a0.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,16 @@ static int sh73a0_boot_secondary(unsigned int cpu, struct task_struct *idle)
4444

4545
static void __init sh73a0_smp_prepare_cpus(unsigned int max_cpus)
4646
{
47-
void __iomem *ap = ioremap(AP_BASE, PAGE_SIZE);
48-
void __iomem *sysc = ioremap(SYSC_BASE, PAGE_SIZE);
47+
void __iomem *ap, *sysc;
48+
49+
if (!request_mem_region(0, SZ_4K, "Boot Area")) {
50+
pr_err("Failed to request boot area\n");
51+
return;
52+
}
4953

5054
/* Map the reset vector (in headsmp.S) */
55+
ap = ioremap(AP_BASE, PAGE_SIZE);
56+
sysc = ioremap(SYSC_BASE, PAGE_SIZE);
5157
writel(0, ap + APARMBAREA); /* 4k */
5258
writel(__pa(shmobile_boot_vector), sysc + SBAR);
5359
iounmap(sysc);

0 commit comments

Comments
 (0)