All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix CONFIG_TEST_KMOD with 256kB page size
@ 2021-11-29 23:01 Nathan Chancellor
  2021-11-29 23:01 ` [PATCH 1/3] arch/Kconfig: Split PAGE_SIZE_LESS_THAN_256KB from PAGE_SIZE_LESS_THAN_64KB Nathan Chancellor
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Nathan Chancellor @ 2021-11-29 23:01 UTC (permalink / raw)
  To: Andrew Morton, Chris Mason, Josef Bacik, David Sterba, Luis Chamberlain
  Cc: Nick Desaulniers, linux-btrfs, linux-kernel, Nathan Chancellor

The kernel test robot reported a build error [1] from a failed assertion
in fs/btrfs/inode.c with a hexagon randconfig that includes
CONFIG_PAGE_SIZE_256KB. This error is the same one that was addressed by
commit b05fbcc36be1 ("btrfs: disable build on platforms having page size
256K") but CONFIG_TEST_KMOD selects CONFIG_BTRFS without having the
"page size less than 256kB dependency", which results in the error
reappearing.

The first patch introduces CONFIG_PAGE_SIZE_LESS_THAN_256KB by splitting
it off from CONFIG_PAGE_SIZE_LESS_THAN_64KB, which was introduced in
commit 1f0e290cc5fd ("arch: Add generic Kconfig option indicating page
size smaller than 64k") for a similar reason in 5.16-rc3.

The second patch uses that configuration option for CONFIG_BTRFS to
reduce duplication.

The third patch resolves the build error by adding
CONFIG_PAGE_SIZE_LESS_THAN_256KB as a dependency to CONFIG_TEST_KMOD so
that CONFIG_BTRFS does not get enabled under that invalid configuration.

This series could go through either btrfs or -mm, as arch/Kconfig and
lib/Kconfig.debug have no formal maintainer. I have sent it to the
maintainers of both so that they can decide who will take it.

[1]: https://lore.kernel.org/r/202111270255.UYOoN5VN-lkp@intel.com/

Nathan Chancellor (3):
  arch/Kconfig: Split PAGE_SIZE_LESS_THAN_256KB from
    PAGE_SIZE_LESS_THAN_64KB
  btrfs: Use generic Kconfig option for 256kB page size limit
  lib/Kconfig.debug: Make TEST_KMOD depend on PAGE_SIZE_LESS_THAN_256KB

 arch/Kconfig      | 4 ++++
 fs/btrfs/Kconfig  | 3 +--
 lib/Kconfig.debug | 1 +
 3 files changed, 6 insertions(+), 2 deletions(-)


base-commit: d58071a8a76d779eedab38033ae4c821c30295a5
-- 
2.34.1


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

* [PATCH 1/3] arch/Kconfig: Split PAGE_SIZE_LESS_THAN_256KB from PAGE_SIZE_LESS_THAN_64KB
  2021-11-29 23:01 [PATCH 0/3] Fix CONFIG_TEST_KMOD with 256kB page size Nathan Chancellor
@ 2021-11-29 23:01 ` Nathan Chancellor
  2021-11-29 23:01 ` [PATCH 2/3] btrfs: Use generic Kconfig option for 256kB page size limit Nathan Chancellor
  2021-11-29 23:01 ` [PATCH 3/3] lib/Kconfig.debug: Make TEST_KMOD depend on PAGE_SIZE_LESS_THAN_256KB Nathan Chancellor
  2 siblings, 0 replies; 5+ messages in thread
From: Nathan Chancellor @ 2021-11-29 23:01 UTC (permalink / raw)
  To: Andrew Morton, Chris Mason, Josef Bacik, David Sterba, Luis Chamberlain
  Cc: Nick Desaulniers, linux-btrfs, linux-kernel, Nathan Chancellor

btrfs requires a page size smaller than 256kB. To use that dependency in
other places, introduce CONFIG_PAGE_SIZE_LESS_THAN_256KB and reuse that
dependency in CONFIG_PAGE_SIZE_LESS_THAN_64KB.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 arch/Kconfig | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/Kconfig b/arch/Kconfig
index d3c4ab249e9c..c1936e154e66 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -998,6 +998,10 @@ config PAGE_SIZE_LESS_THAN_64KB
 	depends on !PAGE_SIZE_64KB
 	depends on !PARISC_PAGE_SIZE_64KB
 	depends on !PPC_64K_PAGES
+	depends on PAGE_SIZE_LESS_THAN_256KB
+
+config PAGE_SIZE_LESS_THAN_256KB
+	def_bool y
 	depends on !PPC_256K_PAGES
 	depends on !PAGE_SIZE_256KB
 
-- 
2.34.1


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

* [PATCH 2/3] btrfs: Use generic Kconfig option for 256kB page size limit
  2021-11-29 23:01 [PATCH 0/3] Fix CONFIG_TEST_KMOD with 256kB page size Nathan Chancellor
  2021-11-29 23:01 ` [PATCH 1/3] arch/Kconfig: Split PAGE_SIZE_LESS_THAN_256KB from PAGE_SIZE_LESS_THAN_64KB Nathan Chancellor
@ 2021-11-29 23:01 ` Nathan Chancellor
  2021-11-30 14:34   ` David Sterba
  2021-11-29 23:01 ` [PATCH 3/3] lib/Kconfig.debug: Make TEST_KMOD depend on PAGE_SIZE_LESS_THAN_256KB Nathan Chancellor
  2 siblings, 1 reply; 5+ messages in thread
From: Nathan Chancellor @ 2021-11-29 23:01 UTC (permalink / raw)
  To: Andrew Morton, Chris Mason, Josef Bacik, David Sterba, Luis Chamberlain
  Cc: Nick Desaulniers, linux-btrfs, linux-kernel, Nathan Chancellor

Use the newly introduced CONFIG_PAGE_SIZE_LESS_THAN_256KB to describe
the dependency introduced by commit b05fbcc36be1 ("btrfs: disable build
on platforms having page size 256K").

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 fs/btrfs/Kconfig | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/btrfs/Kconfig b/fs/btrfs/Kconfig
index 520a0f6a7d9e..183e5c4aed34 100644
--- a/fs/btrfs/Kconfig
+++ b/fs/btrfs/Kconfig
@@ -18,8 +18,7 @@ config BTRFS_FS
 	select RAID6_PQ
 	select XOR_BLOCKS
 	select SRCU
-	depends on !PPC_256K_PAGES	# powerpc
-	depends on !PAGE_SIZE_256KB	# hexagon
+	depends on PAGE_SIZE_LESS_THAN_256KB
 
 	help
 	  Btrfs is a general purpose copy-on-write filesystem with extents,
-- 
2.34.1


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

* [PATCH 3/3] lib/Kconfig.debug: Make TEST_KMOD depend on PAGE_SIZE_LESS_THAN_256KB
  2021-11-29 23:01 [PATCH 0/3] Fix CONFIG_TEST_KMOD with 256kB page size Nathan Chancellor
  2021-11-29 23:01 ` [PATCH 1/3] arch/Kconfig: Split PAGE_SIZE_LESS_THAN_256KB from PAGE_SIZE_LESS_THAN_64KB Nathan Chancellor
  2021-11-29 23:01 ` [PATCH 2/3] btrfs: Use generic Kconfig option for 256kB page size limit Nathan Chancellor
@ 2021-11-29 23:01 ` Nathan Chancellor
  2 siblings, 0 replies; 5+ messages in thread
From: Nathan Chancellor @ 2021-11-29 23:01 UTC (permalink / raw)
  To: Andrew Morton, Chris Mason, Josef Bacik, David Sterba, Luis Chamberlain
  Cc: Nick Desaulniers, linux-btrfs, linux-kernel, Nathan Chancellor,
	kernel test robot

Commit b05fbcc36be1 ("btrfs: disable build on platforms having page size
256K") disabled btrfs for configurations that used a 256kB page size.
However, it did not fully solve the problem because CONFIG_TEST_KMOD
selects CONFIG_BTRFS, which does not account for the dependency. This
results in a Kconfig warning and the failed BUILD_BUG_ON error
returning.

WARNING: unmet direct dependencies detected for BTRFS_FS
  Depends on [n]: BLOCK [=y] && !PPC_256K_PAGES && !PAGE_SIZE_256KB [=y]
  Selected by [m]:
  - TEST_KMOD [=m] && RUNTIME_TESTING_MENU [=y] && m && MODULES [=y] && NETDEVICES [=y] && NET_CORE [=y] && INET [=y] && BLOCK [=y]

To resolve this, add CONFIG_PAGE_SIZE_LESS_THAN_256KB as a dependency of
CONFIG_TEST_KMOD so there is no more invalid configuration or build
errors.

Fixes: b05fbcc36be1 ("btrfs: disable build on platforms having page size 256K")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 lib/Kconfig.debug | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 5c12bde10996..a32f6bb4642c 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -2486,6 +2486,7 @@ config TEST_KMOD
 	depends on m
 	depends on NETDEVICES && NET_CORE && INET # for TUN
 	depends on BLOCK
+	depends on PAGE_SIZE_LESS_THAN_256KB # for BTRFS
 	select TEST_LKM
 	select XFS_FS
 	select TUN
-- 
2.34.1


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

* Re: [PATCH 2/3] btrfs: Use generic Kconfig option for 256kB page size limit
  2021-11-29 23:01 ` [PATCH 2/3] btrfs: Use generic Kconfig option for 256kB page size limit Nathan Chancellor
@ 2021-11-30 14:34   ` David Sterba
  0 siblings, 0 replies; 5+ messages in thread
From: David Sterba @ 2021-11-30 14:34 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Andrew Morton, Chris Mason, Josef Bacik, David Sterba,
	Luis Chamberlain, Nick Desaulniers, linux-btrfs, linux-kernel

On Mon, Nov 29, 2021 at 04:01:40PM -0700, Nathan Chancellor wrote:
> Use the newly introduced CONFIG_PAGE_SIZE_LESS_THAN_256KB to describe
> the dependency introduced by commit b05fbcc36be1 ("btrfs: disable build
> on platforms having page size 256K").
> 
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>

Acked-by: David Sterba <dsterba@suse.com>

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

end of thread, other threads:[~2021-11-30 14:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-29 23:01 [PATCH 0/3] Fix CONFIG_TEST_KMOD with 256kB page size Nathan Chancellor
2021-11-29 23:01 ` [PATCH 1/3] arch/Kconfig: Split PAGE_SIZE_LESS_THAN_256KB from PAGE_SIZE_LESS_THAN_64KB Nathan Chancellor
2021-11-29 23:01 ` [PATCH 2/3] btrfs: Use generic Kconfig option for 256kB page size limit Nathan Chancellor
2021-11-30 14:34   ` David Sterba
2021-11-29 23:01 ` [PATCH 3/3] lib/Kconfig.debug: Make TEST_KMOD depend on PAGE_SIZE_LESS_THAN_256KB Nathan Chancellor

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.