On Mon, 2016-06-20 at 11:27 +0200, Jonas Gorski wrote: > Instead of rewriting the arguments to match the UHI spec, store the > address of a appended or UHI supplied dtb in fw_supplied_dtb. > > That way the original bootloader arugments are kept intact while still > making the use of an appended dtb invisible for mach code. > > Mach code can still find out if it is an appended dtb by comparing > fw_arg1 with fw_supplied_dtb. > > Signed-off-by: Jonas Gorski <jogo@xxxxxxxxxxx> > --- > v1 -> v2: > * no changes > > arch/mips/ath79/setup.c | 4 ++-- > arch/mips/bmips/setup.c | 4 ++-- > arch/mips/include/asm/bootinfo.h | 4 ++++ > arch/mips/kernel/head.S | 21 ++++++++++++++------- > arch/mips/kernel/setup.c | 4 ++++ > arch/mips/lantiq/prom.c | 4 ++-- > arch/mips/pic32/pic32mzda/init.c | 4 ++-- > 7 files changed, 30 insertions(+), 15 deletions(-) [snip] > - else if (fw_arg0 == -2) /* UHI interface */ > - dtb = (void *)fw_arg1; > + else if (fw_passed_dtb) /* UHI interface */ > + dtb = (void *)fw_passed_dtb; I just now realized that this is also incorrect, on each platform. The check for fw_passed_dtb should be in addition (prior) to checking for UHI via fw_arg0 == -2, not instead of it. A side effect of correcting this would be that the original questionable line for pic32 could be left intact, with an unrelated check for fw_passed_dtb before it that doesn't look at fw_arg2.