Skip to content

Commit

Permalink
sh: Fix hugetlbfs dependencies for SH-3 && MMU configurations.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Mundt committed Oct 26, 2009
1 parent a5c461b commit ffb4a73
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions arch/sh/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ config SYS_SUPPORTS_APM_EMULATION
bool
select ARCH_SUSPEND_POSSIBLE

config SYS_SUPPORTS_HUGETLBFS
bool

config SYS_SUPPORTS_SMP
bool

Expand Down Expand Up @@ -195,6 +198,7 @@ config CPU_SH4
select CPU_HAS_SR_RB
select CPU_HAS_FPU if !CPU_SH4AL_DSP
select SYS_SUPPORTS_TMU
select SYS_SUPPORTS_HUGETLBFS if MMU

config CPU_SH4A
bool
Expand All @@ -209,6 +213,7 @@ config CPU_SH5
bool
select CPU_HAS_FPU
select SYS_SUPPORTS_TMU
select SYS_SUPPORTS_HUGETLBFS if MMU

config CPU_SHX2
bool
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/mm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ endchoice

choice
prompt "HugeTLB page size"
depends on HUGETLB_PAGE && (CPU_SH4 || CPU_SH5) && MMU
depends on HUGETLB_PAGE
default HUGETLB_PAGE_SIZE_1MB if PAGE_SIZE_64KB
default HUGETLB_PAGE_SIZE_64K

Expand Down
4 changes: 2 additions & 2 deletions fs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ config TMPFS_POSIX_ACL

config HUGETLBFS
bool "HugeTLB file system support"
depends on X86 || IA64 || PPC64 || SPARC64 || (SUPERH && MMU) || \
(S390 && 64BIT) || SYS_SUPPORTS_HUGETLBFS || BROKEN
depends on X86 || IA64 || PPC64 || SPARC64 || (S390 && 64BIT) || \
SYS_SUPPORTS_HUGETLBFS || BROKEN
help
hugetlbfs is a filesystem backing for HugeTLB pages, based on
ramfs. For architectures that support it, say Y here and read
Expand Down

0 comments on commit ffb4a73

Please sign in to comment.