[PATCH v2 2/2] ARM: move device tree mapping out of linear region
Nicolas Pitre
nico at fluxnic.net
Wed Oct 7 12:40:03 EDT 2020
On Wed, 7 Oct 2020, Ard Biesheuvel wrote:
> On Wed, 7 Oct 2020 at 17:28, Nicolas Pitre <nico at fluxnic.net> 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.
> >
>
> Ah yes, well spotted. I'll add a NULL initializer.
OK. Then you may add
Reviewed-by: Nicolas Pitre <nico at fluxnic.net>
Nicolas
More information about the linux-arm-kernel
mailing list