public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Laight <david.laight.linux@gmail.com>
To: Naresh Kamboju <naresh.kamboju@linaro.org>
Cc: linux-phy@lists.infradead.org,
	open list <linux-kernel@vger.kernel.org>,
	lkft-triage@lists.linaro.org,
	Linux Regressions <regressions@lists.linux.dev>,
	David Laight <david.laight@aculab.com>,
	Vinod Koul <vkoul@kernel.org>, Adam Ford <aford173@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Dan Carpenter <dan.carpenter@linaro.org>,
	Anders Roxell <anders.roxell@linaro.org>,
	Adam Ford <aford173@gmail.com>,
	Frieder Schrempf <frieder.schrempf@kontron.de>,
	Vinod Koul <vkoul@kernel.org>
Subject: Re: linus: arm64: error: call to '__compiletime_assert_536' declared with attribute error: FIELD_PREP: value too large for the field
Date: Thu, 30 Jan 2025 20:01:12 +0000	[thread overview]
Message-ID: <20250130200112.6ba7316e@pumpkin> (raw)
In-Reply-To: <CA+G9fYsHGrgZsEEVvP0XMcAhLyCYnrCPgZJ1puT6cfQBCGUB9g@mail.gmail.com>

On Thu, 30 Jan 2025 15:22:06 +0530
Naresh Kamboju <naresh.kamboju@linaro.org> wrote:

> The arm64 build failed with defconfig with gcc-8 toolchain failed due to
> following build warnings / errors on the mainline linux master branch.
> But the gcc-13 builds pass.
> 
> First seen on v6.13-9485-g72deda0abee6 on Jan. 30, 2025
> Good:  v6.13-9338-g05dbaf8dd8bf on Jan. 29, 2025
> Bad:  v6.13-9485-g72deda0abee6 on Jan. 30, 2025
> 
> arm64:
>   build:
>     * gcc-8-i386_defconfig
> 
> Reported-by: Linux Kernel Functional Testing
> 
> Build log:
> ---
> ake --silent --keep-going --jobs=8
> O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=arm64
> CROSS_COMPILE=aarch64-linux-gnu-
> CROSS_COMPILE_COMPAT=arm-linux-gnueabihf- 'CC=sccache
> aarch64-linux-gnu-gcc' 'HOSTCC=sccache gcc'
> In file included from <command-line>:
> In function 'fsl_samsung_hdmi_phy_configure_pll_lock_det.isra.10',
>     inlined from 'fsl_samsung_hdmi_phy_configure' at
> drivers/phy/freescale/phy-fsl-samsung-hdmi.c:469:2:
> include/linux/compiler_types.h:542:38: error: call to
> '__compiletime_assert_536' declared with attribute error: FIELD_PREP:
> value too large for the field
...
> drivers/phy/freescale/phy-fsl-samsung-hdmi.c:344:9: note: in expansion
> of macro 'FIELD_PREP'
>   writeb(FIELD_PREP(REG12_CK_DIV_MASK, div), phy->regs + PHY_REG(12));
>          ^~~~~~~~~~

Yep...
Broken by d567679f2b6a8

Preceded by:
        /* Find int_pllclk speed */
        for (div = 0; div < 4; div++) {
                int_pllclk = pclk / (1 << div);
                if (int_pllclk < (50 * MHZ))
                        break;
        }
with:
#define REG12_CK_DIV_MASK       GENMASK(5, 4)

The compiler has optimised (pessimised?) the code somewhat.
If pclk is very large the loop doesn't 'break' so div == 4.
It then does FIELD_PREP(GENMASK(5, 4), 4) - which is an error.

	David




  reply	other threads:[~2025-01-30 20:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-30  9:52 linus: arm64: error: call to '__compiletime_assert_536' declared with attribute error: FIELD_PREP: value too large for the field Naresh Kamboju
2025-01-30 20:01 ` David Laight [this message]
2025-01-30 20:20   ` Adam Ford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250130200112.6ba7316e@pumpkin \
    --to=david.laight.linux@gmail.com \
    --cc=aford173@gmail.com \
    --cc=anders.roxell@linaro.org \
    --cc=arnd@arndb.de \
    --cc=dan.carpenter@linaro.org \
    --cc=david.laight@aculab.com \
    --cc=frieder.schrempf@kontron.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=lkft-triage@lists.linaro.org \
    --cc=naresh.kamboju@linaro.org \
    --cc=regressions@lists.linux.dev \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox