[PATCH v2 2/2] ARM: move device tree mapping out of linear region
Russell King - ARM Linux admin
linux at armlinux.org.uk
Wed Oct 7 17:32:53 EDT 2020
On Wed, Oct 07, 2020 at 11:28:03AM -0400, Nicolas Pitre wrote:
> On Wed, 7 Oct 2020, Ard Biesheuvel wrote:
>
> > @@ -1078,13 +1078,18 @@ void __init hyp_mode_check(void)
> > void __init setup_arch(char **cmdline_p)
> > {
> > const struct machine_desc *mdesc = NULL;
> > + void *atags_vaddr;
> >
> > if (__atags_pointer)
> > - atags_vaddr = phys_to_virt(__atags_pointer);
> > + atags_vaddr = FDT_VIRT_ADDR(__atags_pointer);
> >
> > setup_processor();
> > - if (atags_vaddr)
> > + if (atags_vaddr) {
> > mdesc = setup_machine_fdt(atags_vaddr);
>
> If __atags_pointer is zero, you'll end up with atags_vaddr being
> undefined here. I'm surprised the compiler didn't warn about that.
The warning has been disabled. See commit
78a5255ffb6a1af189a83e493d916ba1c54d8c75.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
More information about the linux-arm-kernel
mailing list