Re: Linux 6.1-rc1

From: Conor Dooley
Date: Mon Oct 17 2022 - 14:55:12 EST


On Mon, Oct 17, 2022 at 11:28:53AM -0700, Guenter Roeck wrote:
> On 10/17/22 10:39, Linus Torvalds wrote:
> > On Mon, Oct 17, 2022 at 5:35 AM Guenter Roeck <linux@xxxxxxxxxxxx> wrote:
> > >
> > > Build results:
> > > total: 152 pass: 152 fail: 0
> > > Qemu test results:
> > > total: 490 pass: 420 fail: 70
> >
> > Strange. You claim zero build failures, but then:
> >
> > > Build failures
> > >
> > > Building riscv:defconfig ... failed
> >
> > so I think your stats may be wrong somehow ;)
> >
>
> Puzzled ... the logs show that the builds for riscv[32/64] succeeded
> with no error, but a manual build test still shows the failure.
>
> Ah .... the build fails with gcc 11.3.0 / binutils 2.38, but passes
> with gcc 11.3.0 / binutils 2.39. I had switched my builders to the
> latter last night to fix a problem with powerpc builds. At the same time,
> the manual test I just ran still used binutils 2.38.
>
> That is interesting; I didn't expect that the binutils version would
> make a difference, but apparently it does. Comparing defconfig:
>
> 10c10
> < CONFIG_AS_VERSION=23900
> ---
> > CONFIG_AS_VERSION=23800
> 12c12
> < CONFIG_LD_VERSION=23900
> ---
> > CONFIG_LD_VERSION=23800
> 260d259
> < CONFIG_RISCV_DMA_NONCOHERENT=y
> 297,298d295
> < CONFIG_CC_HAS_ZICBOM=y
> < CONFIG_RISCV_ISA_ZICBOM=y
> 4134,4137d4130
> < CONFIG_ARCH_HAS_SETUP_DMA_OPS=y
> < CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y
> < CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU=y
> < CONFIG_ARCH_HAS_DMA_PREP_COHERENT=y
> 4140,4142d4132
> < CONFIG_DMA_NONCOHERENT_MMAP=y
> < CONFIG_DMA_COHERENT_POOL=y
> < CONFIG_DMA_DIRECT_REMAP=y
>
> The build failure is only seen with CONFIG_RISCV_ISA_ZICBOM=n,
> or in other words with binutils 2.38 or earlier.

+CC Palmer since he's the maintainer of the code being changed by the
fix.

The Zicbom extension only got support in binutils 2.39, so it's
automatically disabled for your older binutils, along with non-coherent
DMA support. As pointed out, we've already got a reviewed fix for it, so
hopefully that lands soon.

Kinda surprised this didn't trigger complaints from more than just you
and an LKP report, but it may be that having some other options selected
hides the problem.

Palmer, the fix is here if you get a chance to look at it:
https://lore.kernel.org/all/20221013134217.1850349-1-ajones@xxxxxxxxxxxxxxxx/

Thanks,
Conor.