Drop the unused arguments from setup(), passing only the fdt. This allows setup() to be more easily shared with arm64. Signed-off-by: Andrew Jones <drjones@xxxxxxxxxx> --- arm/cstart.S | 12 ++++++++++-- lib/arm/setup.c | 3 +-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/arm/cstart.S b/arm/cstart.S index 1e3c3a32375fd..da496e9eae7e0 100644 --- a/arm/cstart.S +++ b/arm/cstart.S @@ -19,15 +19,23 @@ start: /* * bootloader params are in r0-r2 * See the kernel doc Documentation/arm/Booting + * r0 = 0 + * r1 = machine type number + * r2 = physical address of the dtb + * + * As we have no need for r0's nor r1's value, then + * put the dtb in r0. This allows setup to be consistent + * with arm64. */ ldr sp, =stacktop - push {r0-r3} + mov r0, r2 + push {r0-r1} /* set up vector table and mode stacks */ bl exceptions_init /* complete setup */ - pop {r0-r3} + pop {r0-r1} bl setup /* run the test */ diff --git a/lib/arm/setup.c b/lib/arm/setup.c index 9d2094da8a29c..8f58802e958ac 100644 --- a/lib/arm/setup.c +++ b/lib/arm/setup.c @@ -62,8 +62,7 @@ static void mem_init(phys_addr_t freemem_start) mmu_enable_idmap(); } -void setup(unsigned long arg __unused, unsigned long id __unused, - const void *fdt) +void setup(const void *fdt) { const char *bootargs; u32 fdt_size; -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html