Skip to content

Commit

Permalink
sh: Kill off broken direct-mapped cache mode.
Browse files Browse the repository at this point in the history
Forcing direct-mapped worked on certain older 2-way set associative
parts, but was always error prone on 4-way parts. As these are the
norm these days, there is not much point in continuing to support this
mode. Most of the folks that used direct-mapped mode generally just
wanted writethrough caching in the first place..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Apr 2, 2009
1 parent e869a90 commit e820882
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
5 changes: 0 additions & 5 deletions arch/sh/kernel/cpu/sh4/probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,6 @@ int __init detect_cpu_and_cache_system(void)
break;
}

#ifdef CONFIG_SH_DIRECT_MAPPED
boot_cpu_data.icache.ways = 1;
boot_cpu_data.dcache.ways = 1;
#endif

#ifdef CONFIG_CPU_HAS_PTEA
boot_cpu_data.flags |= CPU_HAS_PTEA;
#endif
Expand Down
12 changes: 0 additions & 12 deletions arch/sh/mm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -251,18 +251,6 @@ config SH7705_CACHE_32KB
depends on CPU_SUBTYPE_SH7705
default y

config SH_DIRECT_MAPPED
bool "Use direct-mapped caching"
default n
help
Selecting this option will configure the caches to be direct-mapped,
even if the cache supports a 2 or 4-way mode. This is useful primarily
for debugging on platforms with 2 and 4-way caches (SH7750R/SH7751R,
SH4-202, SH4-501, etc.)

Turn this option off for platforms that do not have a direct-mapped
cache, and you have no need to run the caches in such a configuration.

choice
prompt "Cache mode"
default CACHE_WRITEBACK if CPU_SH2A || CPU_SH3 || CPU_SH4 || CPU_SH5
Expand Down

0 comments on commit e820882

Please sign in to comment.