Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sh: Fix hugetlbfs dependencies for SH-3 && MMU configurations.

The hugetlb dependencies presently depend on SUPERH && MMU while the
hugetlb page size definitions depend on CPU_SH4 or CPU_SH5. This
unfortunately allows SH-3 + MMU configurations to enable hugetlbfs
without a corresponding HPAGE_SHIFT definition, resulting in the build
blowing up.

As SH-3 doesn't support variable page sizes, we tighten up the
dependenies a bit to prevent hugetlbfs from being enabled. These days
we also have a shiny new SYS_SUPPORTS_HUGETLBFS, so switch to using
that rather than adding to the list of corner cases in fs/Kconfig.

Reported-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

+8 -3
+5
arch/sh/Kconfig
··· 121 121 bool 122 122 select ARCH_SUSPEND_POSSIBLE 123 123 124 + config SYS_SUPPORTS_HUGETLBFS 125 + bool 126 + 124 127 config SYS_SUPPORTS_SMP 125 128 bool 126 129 ··· 198 195 select CPU_HAS_SR_RB 199 196 select CPU_HAS_FPU if !CPU_SH4AL_DSP 200 197 select SYS_SUPPORTS_TMU 198 + select SYS_SUPPORTS_HUGETLBFS if MMU 201 199 202 200 config CPU_SH4A 203 201 bool ··· 213 209 bool 214 210 select CPU_HAS_FPU 215 211 select SYS_SUPPORTS_TMU 212 + select SYS_SUPPORTS_HUGETLBFS if MMU 216 213 217 214 config CPU_SHX2 218 215 bool
+1 -1
arch/sh/mm/Kconfig
··· 227 227 228 228 choice 229 229 prompt "HugeTLB page size" 230 - depends on HUGETLB_PAGE && (CPU_SH4 || CPU_SH5) && MMU 230 + depends on HUGETLB_PAGE 231 231 default HUGETLB_PAGE_SIZE_1MB if PAGE_SIZE_64KB 232 232 default HUGETLB_PAGE_SIZE_64K 233 233
+2 -2
fs/Kconfig
··· 135 135 136 136 config HUGETLBFS 137 137 bool "HugeTLB file system support" 138 - depends on X86 || IA64 || PPC64 || SPARC64 || (SUPERH && MMU) || \ 139 - (S390 && 64BIT) || SYS_SUPPORTS_HUGETLBFS || BROKEN 138 + depends on X86 || IA64 || PPC64 || SPARC64 || (S390 && 64BIT) || \ 139 + SYS_SUPPORTS_HUGETLBFS || BROKEN 140 140 help 141 141 hugetlbfs is a filesystem backing for HugeTLB pages, based on 142 142 ramfs. For architectures that support it, say Y here and read