* Kunit: kernel/resource.c: In function 'gfr_start': include/linux/mm.h:101:35: error: 'MAX_PHYSMEM_BITS' undeclared (first use in this function)
@ 2024-09-09 20:00 Naresh Kamboju
2024-09-09 20:20 ` Arnd Bergmann
0 siblings, 1 reply; 3+ messages in thread
From: Naresh Kamboju @ 2024-09-09 20:00 UTC (permalink / raw)
To: kunit-dev, Linux ARM, open list
Cc: Arnd Bergmann, Anders Roxell, Andy Shevchenko, Bjorn Helgaas, David Gow
The arm kunit builds failed on the Linux next-20240909 due to following
build warnings / errors with gcc-13 and clang-19 with extra Kconfigs
CONFIG_OF_KUNIT_TEST=y
CONFIG_KASAN=y
CONFIG_KUNIT=y
CONFIG_KUNIT_ALL_TESTS=y
First seen on next-20240909
Good: next-20240906
BAD: next-20240909
Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
build log:
--------
In file included from include/linux/ioport.h:15,
from kernel/resource.c:15:
kernel/resource.c: In function 'gfr_start':
include/linux/mm.h:101:35: error: 'MAX_PHYSMEM_BITS' undeclared (first
use in this function)
101 | # define PHYSMEM_END ((1ULL << MAX_PHYSMEM_BITS) - 1)
| ^~~~~~~~~~~~~~~~
Build Log links,
--------
- https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240909/testrun/25079447/suite/build/test/gcc-13-lkftconfig-kunit/log
Build failed comparison:
- https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240909/testrun/25079447/suite/build/test/gcc-13-lkftconfig-kunit/history/
metadata:
----
git describe: next-20240909
git repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next
git sha: 100cc857359b5d731407d1038f7e76cd0e871d94
kernel config:
https://storage.tuxsuite.com/public/linaro/lkft/builds/2lpXzTGrlTRMzsi0ZQdQUUn8rKy/config
build url: https://storage.tuxsuite.com/public/linaro/lkft/builds/2lpXzTGrlTRMzsi0ZQdQUUn8rKy/
toolchain: gcc-13, clang-19 and clang-nightly
config: multi_v5_defconfig + kunit
arch: arm
Steps to reproduce:
---------
- # tuxmake --runtime podman --target-arch arm --toolchain gcc-13
--kconfig https://storage.tuxsuite.com/public/linaro/lkft/builds/2lpXzTGrlTRMzsi0ZQdQUUn8rKy/config
- # tuxmake --runtime podman --target-arch arm --toolchain gcc-13
--kconfig multi_v5_defconfig --kconfig-add CONFIG_KUNIT=y
--kconfig-add CONFIG_KUNIT_ALL_TESTS=y
--
Linaro LKFT
https://lkft.linaro.org
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Kunit: kernel/resource.c: In function 'gfr_start': include/linux/mm.h:101:35: error: 'MAX_PHYSMEM_BITS' undeclared (first use in this function) 2024-09-09 20:00 Kunit: kernel/resource.c: In function 'gfr_start': include/linux/mm.h:101:35: error: 'MAX_PHYSMEM_BITS' undeclared (first use in this function) Naresh Kamboju @ 2024-09-09 20:20 ` Arnd Bergmann 2024-09-11 1:11 ` Huang, Ying 0 siblings, 1 reply; 3+ messages in thread From: Arnd Bergmann @ 2024-09-09 20:20 UTC (permalink / raw) To: Naresh Kamboju, kunit-dev, Linux ARM, open list Cc: Anders Roxell, Andy Shevchenko, Bjorn Helgaas, David Gow On Mon, Sep 9, 2024, at 20:00, Naresh Kamboju wrote: > The arm kunit builds failed on the Linux next-20240909 due to following > build warnings / errors with gcc-13 and clang-19 with extra Kconfigs > > CONFIG_OF_KUNIT_TEST=y > CONFIG_KASAN=y > CONFIG_KUNIT=y > CONFIG_KUNIT_ALL_TESTS=y > > First seen on next-20240909 > Good: next-20240906 > BAD: next-20240909 > > Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> > This patch below addresses the build regression, not sure if that is what we want. Arnd From 39601b1274354c710368f5cf40fe9e32540f7591 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann <arnd@arndb.de> Date: Mon, 9 Sep 2024 13:10:21 +0000 Subject: [PATCH] resource, kunit: add sparsemem dependency The testcase now selects CONFIG_GET_FREE_REGION, but that is only available for sparsemem configurations: WARNING: unmet direct dependencies detected for GET_FREE_REGION Depends on [n]: SPARSEMEM [=n] Selected by [m]: - RESOURCE_KUNIT_TEST [=m] && RUNTIME_TESTING_MENU [=y] && KUNIT [=y] In file included from include/linux/ioport.h:15, from kernel/resource.c:15: kernel/resource.c: In function 'gfr_start': include/linux/mm.h:101:35: error: 'MAX_PHYSMEM_BITS' undeclared (first use in this function) 101 | # define PHYSMEM_END ((1ULL << MAX_PHYSMEM_BITS) - 1) kernel/resource.c:1874:57: note: in expansion of macro 'PHYSMEM_END' 1874 | end = min_t(resource_size_t, base->end, PHYSMEM_END); | ^~~~~~~~~~~ It may be better to extend this to non-sparsemem, but a Kconfig dependency is the easiest way to address the build failure at the moment. Fixes: e2941fe697c8 ("resource, kunit: add test case for region_intersects()") Signed-off-by: Arnd Bergmann <arnd@arndb.de> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index b986050fc7e0..4c081a28fe96 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -2632,6 +2632,7 @@ config HASH_KUNIT_TEST config RESOURCE_KUNIT_TEST tristate "KUnit test for resource API" if !KUNIT_ALL_TESTS depends on KUNIT + depends on SPARSEMEM default KUNIT_ALL_TESTS select GET_FREE_REGION help ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Kunit: kernel/resource.c: In function 'gfr_start': include/linux/mm.h:101:35: error: 'MAX_PHYSMEM_BITS' undeclared (first use in this function) 2024-09-09 20:20 ` Arnd Bergmann @ 2024-09-11 1:11 ` Huang, Ying 0 siblings, 0 replies; 3+ messages in thread From: Huang, Ying @ 2024-09-11 1:11 UTC (permalink / raw) To: Arnd Bergmann Cc: Naresh Kamboju, kunit-dev, Linux ARM, open list, Anders Roxell, Andy Shevchenko, Bjorn Helgaas, David Gow Hi, Arnd, "Arnd Bergmann" <arnd@arndb.de> writes: > On Mon, Sep 9, 2024, at 20:00, Naresh Kamboju wrote: >> The arm kunit builds failed on the Linux next-20240909 due to following >> build warnings / errors with gcc-13 and clang-19 with extra Kconfigs >> >> CONFIG_OF_KUNIT_TEST=y >> CONFIG_KASAN=y >> CONFIG_KUNIT=y >> CONFIG_KUNIT_ALL_TESTS=y >> >> First seen on next-20240909 >> Good: next-20240906 >> BAD: next-20240909 >> >> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> >> > > This patch below addresses the build regression, not sure if that > is what we want. > > Arnd > >>From 39601b1274354c710368f5cf40fe9e32540f7591 Mon Sep 17 00:00:00 2001 > From: Arnd Bergmann <arnd@arndb.de> > Date: Mon, 9 Sep 2024 13:10:21 +0000 > Subject: [PATCH] resource, kunit: add sparsemem dependency > > The testcase now selects CONFIG_GET_FREE_REGION, but that > is only available for sparsemem configurations: > > WARNING: unmet direct dependencies detected for GET_FREE_REGION > Depends on [n]: SPARSEMEM [=n] > Selected by [m]: > - RESOURCE_KUNIT_TEST [=m] && RUNTIME_TESTING_MENU [=y] && KUNIT [=y] > In file included from include/linux/ioport.h:15, > from kernel/resource.c:15: > kernel/resource.c: In function 'gfr_start': > include/linux/mm.h:101:35: error: 'MAX_PHYSMEM_BITS' undeclared (first use in this function) > 101 | # define PHYSMEM_END ((1ULL << MAX_PHYSMEM_BITS) - 1) > kernel/resource.c:1874:57: note: in expansion of macro 'PHYSMEM_END' > 1874 | end = min_t(resource_size_t, base->end, PHYSMEM_END); > | ^~~~~~~~~~~ > > It may be better to extend this to non-sparsemem, but a Kconfig > dependency is the easiest way to address the build failure at the > moment. > > Fixes: e2941fe697c8 ("resource, kunit: add test case for region_intersects()") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index b986050fc7e0..4c081a28fe96 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -2632,6 +2632,7 @@ config HASH_KUNIT_TEST > config RESOURCE_KUNIT_TEST > tristate "KUnit test for resource API" if !KUNIT_ALL_TESTS > depends on KUNIT > + depends on SPARSEMEM > default KUNIT_ALL_TESTS > select GET_FREE_REGION > help Thanks for the fixing patch. I think that this is caused by merge conflict. For the fix, IMHO, resource kunit test may be used on architectures with SPARSEMEM=n. I have a fix patch in, https://lore.kernel.org/linux-mm/87wmjkyshl.fsf@yhuang6-desk2.ccr.corp.intel.com/ -- Best Regards, Huang, Ying ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-09-11 1:14 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-09-09 20:00 Kunit: kernel/resource.c: In function 'gfr_start': include/linux/mm.h:101:35: error: 'MAX_PHYSMEM_BITS' undeclared (first use in this function) Naresh Kamboju 2024-09-09 20:20 ` Arnd Bergmann 2024-09-11 1:11 ` Huang, Ying
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®