lkml.org 
[lkml]   [2022]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] wait_on_bit: add an acquire memory barrier


On Sat, 27 Aug 2022, Ard Biesheuvel wrote:

> On Sat, 27 Aug 2022 at 08:32, Ard Biesheuvel <ardb@kernel.org> wrote:
> >
> > On Fri, 26 Aug 2022 at 21:10, Mikulas Patocka <mpatocka@redhat.com> wrote:
> > >
> > >
> > >
> > > On Fri, 26 Aug 2022, Ard Biesheuvel wrote:
> > >
> > > > Could you try booting with earlycon?
> > > >
> > > > Just 'earlycon' and if that does not help,
> > >
> > > It doesn't help.
> > >
> > > > 'earlycon=uart8250,mmio32,<uart PA>' [IIRC, mcbin uses 16550
> > > > compatible UARTs, right?]
> > >
> > > mcbin is the host system (running a stable kernel fine). The crash happens
> > > in a virtual machine. The vm uses /dev/ttyAMA0 as a console:
> > >
> > > Serial: AMBA PL011 UART driver
> > > 9000000.pl011: ttyAMA0 at MMIO 0x9000000 (irq = 45, base_baud = 0) is a PL011 rev1
> > > printk: console [ttyAMA0] enabled
> > >
> > > I tried earlycon=pl011,mmio32,0x9000000 - but it doesn't help, it hangs
> > > without printing anything.
> > >
> >
> > If you are using pl011, you should drop the mmio32 - it only takes a
> > physical address (and optionally baud rate etc, but QEMU doesn't need
> > those)
>
> Could you try the diff below please?
>
> --- a/arch/arm64/kernel/head.S
> +++ b/arch/arm64/kernel/head.S
> @@ -371,7 +371,9 @@ SYM_FUNC_END(create_idmap)
> SYM_FUNC_START_LOCAL(create_kernel_mapping)
> adrp x0, init_pg_dir
> mov_q x5, KIMAGE_VADDR // compile time __va(_text)
> +#ifdef CONFIG_RELOCATABLE
> add x5, x5, x23 // add KASLR displacement
> +#endif
> adrp x6, _end // runtime __pa(_end)
> adrp x3, _text // runtime __pa(_text)
> sub x6, x6, x3 // _end - _text
>

Yes - this patch fixes the crash.

Mikulas

\
 
 \ /
  Last update: 2022-08-27 10:43    [W:0.072 / U:1.776 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site