linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* next: arm64: build/gcc-12-lkftconfig-64k_page_size - error: call to '__compiletime_assert_494' declared with attribute error: BUILD_BUG_ON failed: (((16 - 3) * (4 - (2)) + 3)-16) > 10
@ 2023-05-17 13:26 Naresh Kamboju
  2023-05-19 10:36 ` Naresh Kamboju
  0 siblings, 1 reply; 3+ messages in thread
From: Naresh Kamboju @ 2023-05-17 13:26 UTC (permalink / raw)
  To: Linux-Next Mailing List, open list, linux-mm, Linux ARM, lkft-triage
  Cc: Ard Biesheuvel, Arnd Bergmann, Anders Roxell, Dan Carpenter,
	Andrew Morton, David Hildenbrand

Following arm64 builds failed on Linux next-20230517.

 - build/gcc-12-lkftconfig-64k_page_size
 - build/gcc-11-lkftconfig-64k_page_size

Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>

Build log:
======
include/asm-generic/div64.h:46:27: warning: conversion from 'long
unsigned int' to 'uint32_t' {aka 'unsigned int'} changes value from
'4398046511104' to '0' [-Woverflow]
   46 |         uint32_t __base = (base);                               \
      |                           ^
include/linux/math.h:40:44: note: in expansion of macro 'do_div'
   40 |         ({ unsigned long long _tmp = (ll); do_div(_tmp, d); _tmp; })
      |                                            ^~~~~~
include/linux/math.h:43:9: note: in expansion of macro 'DIV_ROUND_DOWN_ULL'
   43 |         DIV_ROUND_DOWN_ULL((unsigned long long)(ll) + (d) - 1, (d))
      |         ^~~~~~~~~~~~~~~~~~
arch/arm64/kvm/mmu.c:95:22: note: in expansion of macro 'DIV_ROUND_UP_ULL'
   95 |                 n += DIV_ROUND_UP_ULL(range, PUD_SIZE);
      |                      ^~~~~~~~~~~~~~~~
In file included from <command-line>:
mm/huge_memory.c: In function 'hugepage_init':
include/linux/compiler_types.h:397:45: error: call to
'__compiletime_assert_494' declared with attribute error: BUILD_BUG_ON
failed: (((16 - 3) * (4 - (2)) + 3)-16) > 10
  397 |         _compiletime_assert(condition, msg,
__compiletime_assert_, __COUNTER__)
      |                                             ^
include/linux/compiler_types.h:378:25: note: in definition of macro
'__compiletime_assert'
  378 |                         prefix ## suffix();
         \
      |                         ^~~~~~
include/linux/compiler_types.h:397:9: note: in expansion of macro
'_compiletime_assert'
  397 |         _compiletime_assert(condition, msg,
__compiletime_assert_, __COUNTER__)
      |         ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro
'compiletime_assert'
   39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
      |                                     ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
   50 |         BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
      |         ^~~~~~~~~~~~~~~~
include/linux/bug.h:24:25: note: in expansion of macro 'BUILD_BUG_ON'
   24 |                         BUILD_BUG_ON(cond);             \
      |                         ^~~~~~~~~~~~
mm/huge_memory.c:470:9: note: in expansion of macro 'MAYBE_BUILD_BUG_ON'
  470 |         MAYBE_BUILD_BUG_ON(HPAGE_PMD_ORDER > MAX_ORDER);
      |         ^~~~~~~~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:252: mm/huge_memory.o] Error 1


logs:
=====
 - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230517/testrun/17031010/suite/build/test/gcc-12-lkftconfig-64k_page_size/log
 - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230517/testrun/17031010/suite/build/test/gcc-12-lkftconfig-64k_page_size/history/
 - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230517/testrun/17031010/suite/build/test/gcc-12-lkftconfig-64k_page_size/details/


Steps to reproduce:
====
# To install tuxmake on your system globally:
# sudo pip3 install -U tuxmake
#
# See https://docs.tuxmake.org/ for complete documentation.
# Original tuxmake command with fragments listed below.
# tuxmake   \
 --runtime podman   \
 --target-arch arm64   \
 --toolchain gcc-12   \
 --kconfig defconfig   \
 --kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-kernel/linux/files/lkft.config
  \
 --kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-kernel/linux/files/lkft-crypto.config
  \
 --kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-kernel/linux/files/distro-overrides.config
  \
 --kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-kernel/linux/files/systemd.config
  \
 --kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-kernel/linux/files/virtio.config
  \
 --kconfig-add CONFIG_ARM64_MODULE_PLTS=y   \
 --kconfig-add CONFIG_SYN_COOKIES=y   \
 --kconfig-add CONFIG_SCHEDSTATS=y   \
 --kconfig-add CONFIG_ARM64_64K_PAGES=y

OR

tuxmake   \
 --runtime podman   \
 --target-arch arm64   \
 --toolchain gcc-12   \
 --kconfig https://storage.tuxsuite.com/public/linaro/lkft/builds/2PtylMMZpP2yGvgCnhE5SZngOYJ/config


--
Linaro LKFT
https://lkft.linaro.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: next: arm64: build/gcc-12-lkftconfig-64k_page_size - error: call to '__compiletime_assert_494' declared with attribute error: BUILD_BUG_ON failed: (((16 - 3) * (4 - (2)) + 3)-16) > 10
  2023-05-17 13:26 next: arm64: build/gcc-12-lkftconfig-64k_page_size - error: call to '__compiletime_assert_494' declared with attribute error: BUILD_BUG_ON failed: (((16 - 3) * (4 - (2)) + 3)-16) > 10 Naresh Kamboju
@ 2023-05-19 10:36 ` Naresh Kamboju
  2023-05-19 10:45   ` Catalin Marinas
  0 siblings, 1 reply; 3+ messages in thread
From: Naresh Kamboju @ 2023-05-19 10:36 UTC (permalink / raw)
  To: Linux-Next Mailing List, open list, linux-mm, Linux ARM,
	lkft-triage, Catalin Marinas
  Cc: Ard Biesheuvel, Arnd Bergmann, Dan Carpenter, Andrew Morton,
	David Hildenbrand, Will Deacon, Mike Rapoport, jforbes,
	Anders Roxell

On Wed, 17 May 2023 at 18:56, Naresh Kamboju <naresh.kamboju@linaro.org> wrote:
>
> Following arm64 builds failed on Linux next-20230517.
>
>  - build/gcc-12-lkftconfig-64k_page_size
>  - build/gcc-11-lkftconfig-64k_page_size
>
> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
>
> Build log:
> ======
> include/asm-generic/div64.h:46:27: warning: conversion from 'long
> unsigned int' to 'uint32_t' {aka 'unsigned int'} changes value from
> '4398046511104' to '0' [-Woverflow]
>    46 |         uint32_t __base = (base);                               \
>       |                           ^
> include/linux/math.h:40:44: note: in expansion of macro 'do_div'
>    40 |         ({ unsigned long long _tmp = (ll); do_div(_tmp, d); _tmp; })
>       |                                            ^~~~~~
> include/linux/math.h:43:9: note: in expansion of macro 'DIV_ROUND_DOWN_ULL'
>    43 |         DIV_ROUND_DOWN_ULL((unsigned long long)(ll) + (d) - 1, (d))
>       |         ^~~~~~~~~~~~~~~~~~
> arch/arm64/kvm/mmu.c:95:22: note: in expansion of macro 'DIV_ROUND_UP_ULL'
>    95 |                 n += DIV_ROUND_UP_ULL(range, PUD_SIZE);
>       |                      ^~~~~~~~~~~~~~~~
> In file included from <command-line>:
> mm/huge_memory.c: In function 'hugepage_init':
> include/linux/compiler_types.h:397:45: error: call to
> '__compiletime_assert_494' declared with attribute error: BUILD_BUG_ON
> failed: (((16 - 3) * (4 - (2)) + 3)-16) > 10
>   397 |         _compiletime_assert(condition, msg,
> __compiletime_assert_, __COUNTER__)
>       |                                             ^
> include/linux/compiler_types.h:378:25: note: in definition of macro
> '__compiletime_assert'
>   378 |                         prefix ## suffix();
>          \
>       |                         ^~~~~~
> include/linux/compiler_types.h:397:9: note: in expansion of macro
> '_compiletime_assert'
>   397 |         _compiletime_assert(condition, msg,
> __compiletime_assert_, __COUNTER__)
>       |         ^~~~~~~~~~~~~~~~~~~
> include/linux/build_bug.h:39:37: note: in expansion of macro
> 'compiletime_assert'
>    39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
>       |                                     ^~~~~~~~~~~~~~~~~~
> include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
>    50 |         BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
>       |         ^~~~~~~~~~~~~~~~
> include/linux/bug.h:24:25: note: in expansion of macro 'BUILD_BUG_ON'
>    24 |                         BUILD_BUG_ON(cond);             \
>       |                         ^~~~~~~~~~~~
> mm/huge_memory.c:470:9: note: in expansion of macro 'MAYBE_BUILD_BUG_ON'
>   470 |         MAYBE_BUILD_BUG_ON(HPAGE_PMD_ORDER > MAX_ORDER);
>       |         ^~~~~~~~~~~~~~~~~~
> make[3]: *** [scripts/Makefile.build:252: mm/huge_memory.o] Error 1

Linux next 20230517 arm64 64k page size build failed.

  - CONFIG_ARM64_64K_PAGES=y

Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>

Anders bisected and found the following is the first bad commit.

commit fd2d1cb8c5454888f67aba4c6218e30106862070
Author: Catalin Marinas <catalin.marinas@arm.com>
Date:   Wed May 3 13:33:42 2023 +0100

    arm64: Make the ARCH_FORCE_MAX_ORDER config input prompt unconditional

    Commit 34affcd7577a ("arm64: drop ranges in definition of
    ARCH_FORCE_MAX_ORDER") dropped the ranges from the config entry and
    introduced an EXPERT condition on the input prompt instead. This change
    may affect some distro kernels that change ARCH_FORCE_MAX_ORDER but do
    not want to enable EXPERT.

    Drop EXPERT from the input prompt together with the (ARM64_4K_PAGES ||
    ARM64_16K_PAGES) condition as the latter no longer makes sense after the
    ranges were removed. The latter makes all the page size configurations
    consistent w.r.t. ARCH_FORCE_MAX_ORDER.

    Fixes: 34affcd7577a ("arm64: drop ranges in definition of
ARCH_FORCE_MAX_ORDER")
    Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
    Reported-by: Justin M. Forbes <jforbes@fedoraproject.org>
    Cc: Will Deacon <will@kernel.org>
    Cc: Mike Rapoport <rppt@kernel.org>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Acked-by: Justin M. Forbes <jforbes@fedoraproject.org>
    Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
    Link: https://lore.kernel.org/r/20230503123342.90538-1-catalin.marinas@arm.com
    Signed-off-by: Will Deacon <will@kernel.org>

 arch/arm64/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


--
Linaro LKFT
https://lkft.linaro.org


>
>
> logs:
> =====
>  - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230517/testrun/17031010/suite/build/test/gcc-12-lkftconfig-64k_page_size/log
>  - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230517/testrun/17031010/suite/build/test/gcc-12-lkftconfig-64k_page_size/history/
>  - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230517/testrun/17031010/suite/build/test/gcc-12-lkftconfig-64k_page_size/details/
>
>
> Steps to reproduce:
> ====
> # To install tuxmake on your system globally:
> # sudo pip3 install -U tuxmake
> #
> # See https://docs.tuxmake.org/ for complete documentation.
> # Original tuxmake command with fragments listed below.
> # tuxmake   \
>  --runtime podman   \
>  --target-arch arm64   \
>  --toolchain gcc-12   \
>  --kconfig defconfig   \
>  --kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-kernel/linux/files/lkft.config
>   \
>  --kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-kernel/linux/files/lkft-crypto.config
>   \
>  --kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-kernel/linux/files/distro-overrides.config
>   \
>  --kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-kernel/linux/files/systemd.config
>   \
>  --kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-kernel/linux/files/virtio.config
>   \
>  --kconfig-add CONFIG_ARM64_MODULE_PLTS=y   \
>  --kconfig-add CONFIG_SYN_COOKIES=y   \
>  --kconfig-add CONFIG_SCHEDSTATS=y   \
>  --kconfig-add CONFIG_ARM64_64K_PAGES=y
>
> OR
>
> tuxmake   \
>  --runtime podman   \
>  --target-arch arm64   \
>  --toolchain gcc-12   \
>  --kconfig https://storage.tuxsuite.com/public/linaro/lkft/builds/2PtylMMZpP2yGvgCnhE5SZngOYJ/config
>
>
> --
> Linaro LKFT
> https://lkft.linaro.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: next: arm64: build/gcc-12-lkftconfig-64k_page_size - error: call to '__compiletime_assert_494' declared with attribute error: BUILD_BUG_ON failed: (((16 - 3) * (4 - (2)) + 3)-16) > 10
  2023-05-19 10:36 ` Naresh Kamboju
@ 2023-05-19 10:45   ` Catalin Marinas
  0 siblings, 0 replies; 3+ messages in thread
From: Catalin Marinas @ 2023-05-19 10:45 UTC (permalink / raw)
  To: Naresh Kamboju
  Cc: Linux-Next Mailing List, open list, linux-mm, Linux ARM,
	lkft-triage, Ard Biesheuvel, Arnd Bergmann, Dan Carpenter,
	Andrew Morton, David Hildenbrand, Will Deacon, Mike Rapoport,
	jforbes, Anders Roxell

On Fri, May 19, 2023 at 04:06:35PM +0530, Naresh Kamboju wrote:
> On Wed, 17 May 2023 at 18:56, Naresh Kamboju <naresh.kamboju@linaro.org> wrote:
> > Following arm64 builds failed on Linux next-20230517.
> >
> >  - build/gcc-12-lkftconfig-64k_page_size
> >  - build/gcc-11-lkftconfig-64k_page_size
> >
> > Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> >
> > Build log:
> > ======
> > include/asm-generic/div64.h:46:27: warning: conversion from 'long
> > unsigned int' to 'uint32_t' {aka 'unsigned int'} changes value from
> > '4398046511104' to '0' [-Woverflow]
> >    46 |         uint32_t __base = (base);                               \
> >       |                           ^
> > include/linux/math.h:40:44: note: in expansion of macro 'do_div'
> >    40 |         ({ unsigned long long _tmp = (ll); do_div(_tmp, d); _tmp; })
> >       |                                            ^~~~~~
> > include/linux/math.h:43:9: note: in expansion of macro 'DIV_ROUND_DOWN_ULL'
> >    43 |         DIV_ROUND_DOWN_ULL((unsigned long long)(ll) + (d) - 1, (d))
> >       |         ^~~~~~~~~~~~~~~~~~
> > arch/arm64/kvm/mmu.c:95:22: note: in expansion of macro 'DIV_ROUND_UP_ULL'
> >    95 |                 n += DIV_ROUND_UP_ULL(range, PUD_SIZE);
> >       |                      ^~~~~~~~~~~~~~~~
> > In file included from <command-line>:
> > mm/huge_memory.c: In function 'hugepage_init':
> > include/linux/compiler_types.h:397:45: error: call to
> > '__compiletime_assert_494' declared with attribute error: BUILD_BUG_ON
> > failed: (((16 - 3) * (4 - (2)) + 3)-16) > 10
> >   397 |         _compiletime_assert(condition, msg,
> > __compiletime_assert_, __COUNTER__)
> >       |                                             ^
> > include/linux/compiler_types.h:378:25: note: in definition of macro
> > '__compiletime_assert'
> >   378 |                         prefix ## suffix();
> >          \
> >       |                         ^~~~~~
> > include/linux/compiler_types.h:397:9: note: in expansion of macro
> > '_compiletime_assert'
> >   397 |         _compiletime_assert(condition, msg,
> > __compiletime_assert_, __COUNTER__)
> >       |         ^~~~~~~~~~~~~~~~~~~
> > include/linux/build_bug.h:39:37: note: in expansion of macro
> > 'compiletime_assert'
> >    39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
> >       |                                     ^~~~~~~~~~~~~~~~~~
> > include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
> >    50 |         BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
> >       |         ^~~~~~~~~~~~~~~~
> > include/linux/bug.h:24:25: note: in expansion of macro 'BUILD_BUG_ON'
> >    24 |                         BUILD_BUG_ON(cond);             \
> >       |                         ^~~~~~~~~~~~
> > mm/huge_memory.c:470:9: note: in expansion of macro 'MAYBE_BUILD_BUG_ON'
> >   470 |         MAYBE_BUILD_BUG_ON(HPAGE_PMD_ORDER > MAX_ORDER);
> >       |         ^~~~~~~~~~~~~~~~~~
> > make[3]: *** [scripts/Makefile.build:252: mm/huge_memory.o] Error 1
> 
> Linux next 20230517 arm64 64k page size build failed.
> 
>   - CONFIG_ARM64_64K_PAGES=y
> 
> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> 
> Anders bisected and found the following is the first bad commit.
> 
> commit fd2d1cb8c5454888f67aba4c6218e30106862070
> Author: Catalin Marinas <catalin.marinas@arm.com>
> Date:   Wed May 3 13:33:42 2023 +0100
> 
>     arm64: Make the ARCH_FORCE_MAX_ORDER config input prompt unconditional

We are dropping this commit for now but the problem is still there with
EXPERT enabled.

The problem is that we start with ARCH_FORCE_MAX_ORDER of 10 in
defconfig and we then change the page size to 64K but this value is no
longer valid (only 13 works for this page size).

I'll send a patch dropping the config description entirely, unless there
are some strong requirements to have the ranges back.

-- 
Catalin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-05-19 10:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-17 13:26 next: arm64: build/gcc-12-lkftconfig-64k_page_size - error: call to '__compiletime_assert_494' declared with attribute error: BUILD_BUG_ON failed: (((16 - 3) * (4 - (2)) + 3)-16) > 10 Naresh Kamboju
2023-05-19 10:36 ` Naresh Kamboju
2023-05-19 10:45   ` Catalin Marinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).