aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sh/mm/Kconfig11
-rw-r--r--arch/sh/mm/Makefile2
-rw-r--r--include/asm-sh/pgtable.h17
3 files changed, 29 insertions, 1 deletions
diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig
index a7bbc2cbbf8c..8192c872a69a 100644
--- a/arch/sh/mm/Kconfig
+++ b/arch/sh/mm/Kconfig
@@ -46,9 +46,20 @@ config MEMORY_SIZE
46 as 0x00400000 which was the default value before this became 46 as 0x00400000 which was the default value before this became
47 configurable. 47 configurable.
48 48
49# Physical addressing modes
50
51config 29BIT
52 def_bool !32BIT
53 depends on SUPERH32
54
49config 32BIT 55config 32BIT
56 bool
57 default y if CPU_SH5
58
59config PMB
50 bool "Support 32-bit physical addressing through PMB" 60 bool "Support 32-bit physical addressing through PMB"
51 depends on MMU && (CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7785) 61 depends on MMU && (CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7785)
62 select 32BIT
52 default y 63 default y
53 help 64 help
54 If you say Y here, physical addressing will be extended to 65 If you say Y here, physical addressing will be extended to
diff --git a/arch/sh/mm/Makefile b/arch/sh/mm/Makefile
index aa44607f072d..d35caccd0aaa 100644
--- a/arch/sh/mm/Makefile
+++ b/arch/sh/mm/Makefile
@@ -31,7 +31,7 @@ endif
31endif 31endif
32 32
33obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o 33obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
34obj-$(CONFIG_32BIT) += pmb.o 34obj-$(CONFIG_PMB) += pmb.o
35obj-$(CONFIG_NUMA) += numa.o 35obj-$(CONFIG_NUMA) += numa.o
36 36
37EXTRA_CFLAGS += -Werror 37EXTRA_CFLAGS += -Werror
diff --git a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h
index 8f1e8be8d15d..6ab3ba82d255 100644
--- a/include/asm-sh/pgtable.h
+++ b/include/asm-sh/pgtable.h
@@ -29,6 +29,23 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
29#endif /* !__ASSEMBLY__ */ 29#endif /* !__ASSEMBLY__ */
30 30
31/* 31/*
32 * Effective and physical address definitions, to aid with sign
33 * extension.
34 */
35#define NEFF 32
36#define NEFF_SIGN (1LL << (NEFF - 1))
37#define NEFF_MASK (-1LL << NEFF)
38
39#ifdef CONFIG_29BIT
40#define NPHYS 29
41#else
42#define NPHYS 32
43#endif
44
45#define NPHYS_SIGN (1LL << (NPHYS - 1))
46#define NPHYS_MASK (-1LL << NPHYS)
47
48/*
32 * traditional two-level paging structure 49 * traditional two-level paging structure
33 */ 50 */
34/* PTE bits */ 51/* PTE bits */