linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs/Kconfig: Enable HUGETLBFS only if ARCH_SUPPORTS_HUGETLBFS
@ 2025-07-11 10:29 Anshuman Khandual
  2025-07-12 23:15 ` Andrew Morton
  0 siblings, 1 reply; 7+ messages in thread
From: Anshuman Khandual @ 2025-07-11 10:29 UTC (permalink / raw)
  To: linux-mm, akpm
  Cc: Anshuman Khandual, David S. Miller, Thomas Gleixner, Ingo Molnar,
	x86, sparclinux, linux-kernel, linux-fsdevel

Enable HUGETLBFS only when platform subscrbes via ARCH_SUPPORTS_HUGETLBFS.
Hence select ARCH_SUPPORTS_HUGETLBFS on existing x86 and sparc for their
continuing HUGETLBFS support. While here also just drop existing 'BROKEN'
dependency.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: x86@kernel.org
Cc: sparclinux@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-mm@kvack.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
 arch/sparc/Kconfig | 1 +
 arch/x86/Kconfig   | 1 +
 fs/Kconfig         | 2 +-
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index 0f88123925a4..68549eedfe6d 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -97,6 +97,7 @@ config SPARC64
 	select HAVE_ARCH_AUDITSYSCALL
 	select ARCH_SUPPORTS_ATOMIC_RMW
 	select ARCH_SUPPORTS_DEBUG_PAGEALLOC
+	select ARCH_SUPPORTS_HUGETLBFS
 	select HAVE_NMI
 	select HAVE_REGS_AND_STACK_ACCESS_API
 	select ARCH_USE_QUEUED_RWLOCKS
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 71019b3b54ea..9630e5e1336b 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -126,6 +126,7 @@ config X86
 	select ARCH_SUPPORTS_ACPI
 	select ARCH_SUPPORTS_ATOMIC_RMW
 	select ARCH_SUPPORTS_DEBUG_PAGEALLOC
+	select ARCH_SUPPORTS_HUGETLBFS
 	select ARCH_SUPPORTS_PAGE_TABLE_CHECK	if X86_64
 	select ARCH_SUPPORTS_NUMA_BALANCING	if X86_64
 	select ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP	if NR_CPUS <= 4096
diff --git a/fs/Kconfig b/fs/Kconfig
index 44b6cdd36dc1..86a00a972442 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -256,7 +256,7 @@ config ARCH_SUPPORTS_HUGETLBFS
 
 menuconfig HUGETLBFS
 	bool "HugeTLB file system support"
-	depends on X86 || SPARC64 || ARCH_SUPPORTS_HUGETLBFS || BROKEN
+	depends on ARCH_SUPPORTS_HUGETLBFS
 	depends on (SYSFS || SYSCTL)
 	select MEMFD_CREATE
 	select PADATA if SMP
-- 
2.25.1


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

* Re: [PATCH] fs/Kconfig: Enable HUGETLBFS only if ARCH_SUPPORTS_HUGETLBFS
  2025-07-11 10:29 [PATCH] fs/Kconfig: Enable HUGETLBFS only if ARCH_SUPPORTS_HUGETLBFS Anshuman Khandual
@ 2025-07-12 23:15 ` Andrew Morton
  2025-07-14  2:35   ` Anshuman Khandual
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2025-07-12 23:15 UTC (permalink / raw)
  To: Anshuman Khandual
  Cc: linux-mm, David S. Miller, Thomas Gleixner, Ingo Molnar, x86,
	sparclinux, linux-kernel, linux-fsdevel

On Fri, 11 Jul 2025 15:59:34 +0530 Anshuman Khandual <anshuman.khandual@arm.com> wrote:

> Enable HUGETLBFS only when platform subscrbes via ARCH_SUPPORTS_HUGETLBFS.
> Hence select ARCH_SUPPORTS_HUGETLBFS on existing x86 and sparc for their
> continuing HUGETLBFS support.

Looks nice.

> While here also just drop existing 'BROKEN' dependency.

Why?

What is BROKEN for, anyway?  I don't recall having dealt with it
before.  It predates kernel git and we forgot to document it.

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

* Re: [PATCH] fs/Kconfig: Enable HUGETLBFS only if ARCH_SUPPORTS_HUGETLBFS
  2025-07-12 23:15 ` Andrew Morton
@ 2025-07-14  2:35   ` Anshuman Khandual
  2025-07-14  9:49     ` Borislav Petkov
  0 siblings, 1 reply; 7+ messages in thread
From: Anshuman Khandual @ 2025-07-14  2:35 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-mm, David S. Miller, Thomas Gleixner, Ingo Molnar, x86,
	sparclinux, linux-kernel, linux-fsdevel



On 13/07/25 4:45 AM, Andrew Morton wrote:
> On Fri, 11 Jul 2025 15:59:34 +0530 Anshuman Khandual <anshuman.khandual@arm.com> wrote:
> 
>> Enable HUGETLBFS only when platform subscrbes via ARCH_SUPPORTS_HUGETLBFS.
>> Hence select ARCH_SUPPORTS_HUGETLBFS on existing x86 and sparc for their
>> continuing HUGETLBFS support.
> 
> Looks nice.
> 
>> While here also just drop existing 'BROKEN' dependency.
> 
> Why?
> 
> What is BROKEN for, anyway?  I don't recall having dealt with it
> before.  It predates kernel git and we forgot to document it.

The original first commit had added 'BROKEN', although currently there
are no explanations about it in the tree. But looks like this might be
used for feature gating (selectively disabling features) etc. But I am
not much aware about it.

commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (tag: v2.6.12-rc2)
Author: Linus Torvalds <torvalds@ppc970.osdl.org>
Date:   Sat Apr 16 15:20:36 2005 -0700

    Linux-2.6.12-rc2

    Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

BROKEN still gets used for multiple config options.

git grep "depends on BROKEN"

arch/m68k/Kconfig.devices:      depends on BROKEN && (Q40 || SUN3X)
arch/mips/loongson64/Kconfig:   depends on BROKEN
arch/parisc/Kconfig:    depends on BROKEN
arch/powerpc/lib/crypto/Kconfig:        depends on BROKEN # Needs to be fixed to work in softirq context
drivers/edac/Kconfig:   depends on BROKEN
drivers/edac/Kconfig:   depends on BROKEN
drivers/gpu/drm/Kconfig.debug:  depends on BROKEN
drivers/gpu/drm/amd/display/Kconfig:    depends on BROKEN || !CC_IS_CLANG || ARM64 || LOONGARCH || RISCV || SPARC64 || X86_64
drivers/gpu/drm/i915/Kconfig.debug:     depends on BROKEN
drivers/net/wireless/intel/iwlwifi/Kconfig:     depends on BROKEN
drivers/s390/block/Kconfig:     depends on BROKEN
drivers/staging/gpib/TODO:- fix device drivers that are broken ("depends on BROKEN" in Kconfig)
drivers/tty/Kconfig:    depends on BROKEN
drivers/virtio/Kconfig:        depends on BROKEN
init/Kconfig:   depends on BROKEN || !SMP
init/Kconfig:   depends on BROKEN
lib/Kconfig.ubsan:      depends on BROKEN

git grep "&& BROKEN"

arch/parisc/Kconfig:    depends on PA8X00 && BROKEN && !KFENCE
arch/parisc/Kconfig:    depends on PA8X00 && BROKEN && !KFENCE
arch/powerpc/platforms/amigaone/Kconfig:        depends on PPC_BOOK3S_32 && BROKEN_ON_SMP
arch/powerpc/platforms/embedded6xx/Kconfig:     depends on PPC_BOOK3S_32 && BROKEN_ON_SMP
arch/sh/Kconfig.debug:  depends on DEBUG_KERNEL && BROKEN
drivers/gpu/drm/Kconfig.debug:  depends on DRM && EXPERT && BROKEN
drivers/i2c/busses/Kconfig:     depends on ISA && HAS_IOPORT_MAP && BROKEN_ON_SMP
drivers/leds/Kconfig:   depends on LEDS_CLASS && BROKEN
drivers/net/wireless/broadcom/b43/Kconfig:      depends on B43 && BROKEN
drivers/net/wireless/broadcom/b43/Kconfig:      depends on B43 && B43_BCMA && BROKEN
drivers/pps/generators/Kconfig: depends on PARPORT && BROKEN
drivers/staging/greybus/Kconfig:        depends on MEDIA_SUPPORT && LEDS_CLASS_FLASH && BROKEN
drivers/video/fbdev/Kconfig:    depends on FB && ((AMIGA && BROKEN) || PCI)
fs/quota/Kconfig:       depends on QUOTA && BROKEN
fs/smb/client/Kconfig:  depends on CIFS && BROKEN
net/ax25/Kconfig:       depends on AX25_DAMA_SLAVE && BROKEN

git grep "|| BROKEN"

arch/sh/Kconfig.debug:  depends on DEBUG_KERNEL && (MMU || BROKEN) && !PAGE_SIZE_64KB
drivers/misc/Kconfig:   depends on X86_64 || BROKEN
drivers/net/ethernet/faraday/Kconfig:   depends on !64BIT || BROKEN
drivers/net/ethernet/faraday/Kconfig:   depends on !64BIT || BROKEN
drivers/net/ethernet/intel/Kconfig:     depends on PCI && (!SPARC32 || BROKEN)
drivers/usb/gadget/udc/Kconfig: depends on !64BIT || BROKEN
kernel/power/Kconfig:           if ARCH_WANTS_FREEZER_CONTROL || BROKEN

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

* Re: [PATCH] fs/Kconfig: Enable HUGETLBFS only if ARCH_SUPPORTS_HUGETLBFS
  2025-07-14  2:35   ` Anshuman Khandual
@ 2025-07-14  9:49     ` Borislav Petkov
  2025-07-15  0:31       ` Andrew Morton
  0 siblings, 1 reply; 7+ messages in thread
From: Borislav Petkov @ 2025-07-14  9:49 UTC (permalink / raw)
  To: Anshuman Khandual
  Cc: Andrew Morton, linux-mm, David S. Miller, Thomas Gleixner,
	Ingo Molnar, x86, sparclinux, linux-kernel, linux-fsdevel

On Mon, Jul 14, 2025 at 08:05:31AM +0530, Anshuman Khandual wrote:
> The original first commit had added 'BROKEN', although currently there
> are no explanations about it in the tree.

commit c0dde7404aff064bff46ae1d5f1584d38e30c3bf
Author: Linus Torvalds <torvalds@home.osdl.org>
Date:   Sun Aug 17 21:23:57 2003 -0700

    Add CONFIG_BROKEN (default 'n') to hide known-broken drivers.

diff --git a/init/Kconfig b/init/Kconfig
index 0d1629e23398..5c012aeb2a8f 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -32,6 +32,17 @@ config EXPERIMENTAL
 	  you say Y here, you will be offered the choice of using features or
 	  drivers that are currently considered to be in the alpha-test phase.
 
+config BROKEN
+	bool "Prompt for old and known-broken drivers"
+	depends on EXPERIMENTAL
+	default n
+	help
+	  This option allows you to choose whether you want to try to
+	  compile (and fix) old drivers that haven't been updated to
+	  new infrastructure.
+
+	  If unsure, say N.
+
 endmenu
 

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

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

* Re: [PATCH] fs/Kconfig: Enable HUGETLBFS only if ARCH_SUPPORTS_HUGETLBFS
  2025-07-14  9:49     ` Borislav Petkov
@ 2025-07-15  0:31       ` Andrew Morton
  2025-07-29 15:50         ` Christophe Leroy
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2025-07-15  0:31 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Anshuman Khandual, linux-mm, David S. Miller, Thomas Gleixner,
	Ingo Molnar, x86, sparclinux, linux-kernel, linux-fsdevel

On Mon, 14 Jul 2025 11:49:09 +0200 Borislav Petkov <bp@alien8.de> wrote:

> On Mon, Jul 14, 2025 at 08:05:31AM +0530, Anshuman Khandual wrote:
> > The original first commit had added 'BROKEN', although currently there
> > are no explanations about it in the tree.
> 
> commit c0dde7404aff064bff46ae1d5f1584d38e30c3bf
> Author: Linus Torvalds <torvalds@home.osdl.org>
> Date:   Sun Aug 17 21:23:57 2003 -0700
> 
>     Add CONFIG_BROKEN (default 'n') to hide known-broken drivers.

Thanks.  That was unkind of someone.  How's this?


From: Andrew Morton <akpm@linux-foundation.org>
Subject: init/Kconfig: restore CONFIG_BROKEN help text
Date: Mon Jul 14 05:20:02 PM PDT 2025

Linus added it in 2003, it later was removed.  Put it back.

Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Borislav Betkov <bp@alien8.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Thomas Gleinxer <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 init/Kconfig |    4 ++++
 1 file changed, 4 insertions(+)

--- a/init/Kconfig~a
+++ a/init/Kconfig
@@ -169,6 +169,10 @@ menu "General setup"
 
 config BROKEN
 	bool
+	help
+	  This option allows you to choose whether you want to try to
+	  compile (and fix) old drivers that haven't been updated to
+	  new infrastructure.
 
 config BROKEN_ON_SMP
 	bool
_


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

* Re: [PATCH] fs/Kconfig: Enable HUGETLBFS only if ARCH_SUPPORTS_HUGETLBFS
  2025-07-15  0:31       ` Andrew Morton
@ 2025-07-29 15:50         ` Christophe Leroy
  2025-07-29 15:52           ` Christophe Leroy
  0 siblings, 1 reply; 7+ messages in thread
From: Christophe Leroy @ 2025-07-29 15:50 UTC (permalink / raw)
  To: Andrew Morton, Borislav Petkov
  Cc: Anshuman Khandual, linux-mm, David S. Miller, Thomas Gleixner,
	Ingo Molnar, x86, sparclinux, linux-kernel, linux-fsdevel



Le 15/07/2025 à 02:31, Andrew Morton a écrit :
> On Mon, 14 Jul 2025 11:49:09 +0200 Borislav Petkov <bp@alien8.de> wrote:
> 
>> On Mon, Jul 14, 2025 at 08:05:31AM +0530, Anshuman Khandual wrote:
>>> The original first commit had added 'BROKEN', although currently there
>>> are no explanations about it in the tree.
>>
>> commit c0dde7404aff064bff46ae1d5f1584d38e30c3bf
>> Author: Linus Torvalds <torvalds@home.osdl.org>
>> Date:   Sun Aug 17 21:23:57 2003 -0700
>>
>>      Add CONFIG_BROKEN (default 'n') to hide known-broken drivers.
> 
> Thanks.  That was unkind of someone.  How's this?
> 
> 
> From: Andrew Morton <akpm@linux-foundation.org>
> Subject: init/Kconfig: restore CONFIG_BROKEN help text
> Date: Mon Jul 14 05:20:02 PM PDT 2025
> 
> Linus added it in 2003, it later was removed.  Put it back.

Was removed by:

commit 3be71ba84f17f39131900f44e8ef513c696a5b11
Author: Linus Torvalds <torvalds@home.osdl.org>
Date:   Mon Sep 1 21:30:14 2003 -0700

     Instead of asking for "broken drivers", ask for a "clean compile".

     This makes "allyesconfig" do a better job.

diff --git a/init/Kconfig b/init/Kconfig
index 3b6e6d580e1d..c296f6bee03c 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -32,16 +32,19 @@ config EXPERIMENTAL
  	  you say Y here, you will be offered the choice of using features or
  	  drivers that are currently considered to be in the alpha-test phase.

-config BROKEN
-	bool "Prompt for old and known-broken drivers"
-	depends on EXPERIMENTAL
-	default n
+config CLEAN_COMPILE
+	bool "Don't select drivers known to be broken" if EXPERIMENTAL
+	default y
  	help
-	  This option allows you to choose whether you want to try to
-	  compile (and fix) old drivers that haven't been updated to
-	  new infrastructure.
+	  Select this option if you don't even want to see the option
+	  to configure known-broken drivers.

-	  If unsure, say N.
+	  If unsure, say Y
+
+config BROKEN
+	bool
+	depends on !CLEAN_COMPILE
+	default y

  config BROKEN_ON_SMP
  	bool



> 
> Cc: Anshuman Khandual <anshuman.khandual@arm.com>
> Cc: Borislav Betkov <bp@alien8.de>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Thomas Gleinxer <tglx@linutronix.de>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
> 
>   init/Kconfig |    4 ++++
>   1 file changed, 4 insertions(+)
> 
> --- a/init/Kconfig~a
> +++ a/init/Kconfig
> @@ -169,6 +169,10 @@ menu "General setup"
>   
>   config BROKEN
>   	bool
> +	help
> +	  This option allows you to choose whether you want to try to
> +	  compile (and fix) old drivers that haven't been updated to
> +	  new infrastructure.
>   
>   config BROKEN_ON_SMP
>   	bool
> _
> 
> 


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

* Re: [PATCH] fs/Kconfig: Enable HUGETLBFS only if ARCH_SUPPORTS_HUGETLBFS
  2025-07-29 15:50         ` Christophe Leroy
@ 2025-07-29 15:52           ` Christophe Leroy
  0 siblings, 0 replies; 7+ messages in thread
From: Christophe Leroy @ 2025-07-29 15:52 UTC (permalink / raw)
  To: Andrew Morton, Borislav Petkov
  Cc: Anshuman Khandual, linux-mm, David S. Miller, Thomas Gleixner,
	Ingo Molnar, x86, sparclinux, linux-kernel, linux-fsdevel



Le 29/07/2025 à 17:50, Christophe Leroy a écrit :
> 
> 
> Le 15/07/2025 à 02:31, Andrew Morton a écrit :
>> On Mon, 14 Jul 2025 11:49:09 +0200 Borislav Petkov <bp@alien8.de> wrote:
>>
>>> On Mon, Jul 14, 2025 at 08:05:31AM +0530, Anshuman Khandual wrote:
>>>> The original first commit had added 'BROKEN', although currently there
>>>> are no explanations about it in the tree.
>>>
>>> commit c0dde7404aff064bff46ae1d5f1584d38e30c3bf
>>> Author: Linus Torvalds <torvalds@home.osdl.org>
>>> Date:   Sun Aug 17 21:23:57 2003 -0700
>>>
>>>      Add CONFIG_BROKEN (default 'n') to hide known-broken drivers.
>>
>> Thanks.  That was unkind of someone.  How's this?
>>
>>
>> From: Andrew Morton <akpm@linux-foundation.org>
>> Subject: init/Kconfig: restore CONFIG_BROKEN help text
>> Date: Mon Jul 14 05:20:02 PM PDT 2025
>>
>> Linus added it in 2003, it later was removed.  Put it back.
> 
> Was removed by:
> 
> commit 3be71ba84f17f39131900f44e8ef513c696a5b11
> Author: Linus Torvalds <torvalds@home.osdl.org>
> Date:   Mon Sep 1 21:30:14 2003 -0700
> 
>      Instead of asking for "broken drivers", ask for a "clean compile".
> 
>      This makes "allyesconfig" do a better job.

Which was then later removed by:

commit 3636641bb2c7a806c1099ca092ec8cd180063f9b
Author: Adrian Bunk <bunk@stusta.de>
Date:   Fri Feb 3 03:04:00 2006 -0800

     [PATCH] don't allow users to set CONFIG_BROKEN=y

     Do not allow people to create configurations with CONFIG_BROKEN=y.

     The sole reason for CONFIG_BROKEN=y would be if you are working on 
fixing a
     broken driver, but in this case editing the Kconfig file is trivial.

     Never ever should a user enable CONFIG_BROKEN.

     Signed-off-by: Adrian Bunk <bunk@stusta.de>
     Signed-off-by: Andrew Morton <akpm@osdl.org>
     Signed-off-by: Linus Torvalds <torvalds@osdl.org>

diff --git a/init/Kconfig b/init/Kconfig
index b9923b1434a2f..8b7abae87bf9c 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -31,19 +31,8 @@ config EXPERIMENTAL
  	  you say Y here, you will be offered the choice of using features or
  	  drivers that are currently considered to be in the alpha-test phase.

-config CLEAN_COMPILE
-	bool "Select only drivers expected to compile cleanly" if EXPERIMENTAL
-	default y
-	help
-	  Select this option if you don't even want to see the option
-	  to configure known-broken drivers.
-
-	  If unsure, say Y
-
  config BROKEN
  	bool
-	depends on !CLEAN_COMPILE
-	default y

  config BROKEN_ON_SMP
  	bool


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

end of thread, other threads:[~2025-07-29 16:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-11 10:29 [PATCH] fs/Kconfig: Enable HUGETLBFS only if ARCH_SUPPORTS_HUGETLBFS Anshuman Khandual
2025-07-12 23:15 ` Andrew Morton
2025-07-14  2:35   ` Anshuman Khandual
2025-07-14  9:49     ` Borislav Petkov
2025-07-15  0:31       ` Andrew Morton
2025-07-29 15:50         ` Christophe Leroy
2025-07-29 15:52           ` Christophe Leroy

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).