On Fri, 17 Aug 2018, Arnd Bergmann wrote: > On Fri, Aug 17, 2018 at 9:10 PM Mikulas Patocka <mpatocka@xxxxxxxxxx> wrote: > > > > Hi > > > > The commit 9ce8654323d69273b4977f76f11c9e2d345ab130 breaks the Alpha > > Avanti platform. There is temporary 40-second hang during boot when > > detecting serial ports (although the hang eventually resolves and the > > machine boots) and there's total hang during shutdown when saving the > > hardware clock. > > > > The bug can be fixed with the patch below - apparently, there's something > > in the Alpha Avanti platform code that expects that the barrier should be > > after the I/O write instructions. > > I have two theories here: > > - there might be a driver oddity (can't really call it bug) that > relies on writel() > etc to imply a barrier afterwards when that guarantee isn't there elsewhere > > - For outb()/outw()/outl(), we ought to provide stronger barriers than for > writeb()/writew()/writel(), as PCI drivers should expect the store to have > arrived at the device by the time the function returns. > > Could you try the patch below that would address the second issue but not > the first? > > Arnd I've tried this patch and it doesn't help. Mikulas > diff --git a/arch/alpha/include/asm/io.h b/arch/alpha/include/asm/io.h > index 4c533fc94d62..0a479ac27cab 100644 > --- a/arch/alpha/include/asm/io.h > +++ b/arch/alpha/include/asm/io.h > @@ -364,11 +364,13 @@ extern inline u16 inw(unsigned long port) > extern inline void outb(u8 b, unsigned long port) > { > iowrite8(b, ioport_map(port, 1)); > + mb(); > } > > extern inline void outw(u16 b, unsigned long port) > { > iowrite16(b, ioport_map(port, 2)); > + mb(); > } > #endif > > @@ -394,6 +396,7 @@ extern inline u32 inl(unsigned long port) > extern inline void outl(u32 b, unsigned long port) > { > iowrite32(b, ioport_map(port, 4)); > + mb(); > } > #endif >