diff options
Diffstat (limited to 'arch/ppc64/mm/hash_utils.c')
-rw-r--r-- | arch/ppc64/mm/hash_utils.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/ppc64/mm/hash_utils.c b/arch/ppc64/mm/hash_utils.c index 1647b1c6f28e..623b5d130c31 100644 --- a/arch/ppc64/mm/hash_utils.c +++ b/arch/ppc64/mm/hash_utils.c | |||
@@ -75,8 +75,8 @@ | |||
75 | extern unsigned long dart_tablebase; | 75 | extern unsigned long dart_tablebase; |
76 | #endif /* CONFIG_U3_DART */ | 76 | #endif /* CONFIG_U3_DART */ |
77 | 77 | ||
78 | HPTE *htab_address; | 78 | hpte_t *htab_address; |
79 | unsigned long htab_hash_mask; | 79 | unsigned long htab_hash_mask; |
80 | 80 | ||
81 | extern unsigned long _SDR1; | 81 | extern unsigned long _SDR1; |
82 | 82 | ||
@@ -97,11 +97,15 @@ static inline void create_pte_mapping(unsigned long start, unsigned long end, | |||
97 | unsigned long addr; | 97 | unsigned long addr; |
98 | unsigned int step; | 98 | unsigned int step; |
99 | unsigned long tmp_mode; | 99 | unsigned long tmp_mode; |
100 | unsigned long vflags; | ||
100 | 101 | ||
101 | if (large) | 102 | if (large) { |
102 | step = 16*MB; | 103 | step = 16*MB; |
103 | else | 104 | vflags = HPTE_V_BOLTED | HPTE_V_LARGE; |
105 | } else { | ||
104 | step = 4*KB; | 106 | step = 4*KB; |
107 | vflags = HPTE_V_BOLTED; | ||
108 | } | ||
105 | 109 | ||
106 | for (addr = start; addr < end; addr += step) { | 110 | for (addr = start; addr < end; addr += step) { |
107 | unsigned long vpn, hash, hpteg; | 111 | unsigned long vpn, hash, hpteg; |
@@ -129,12 +133,12 @@ static inline void create_pte_mapping(unsigned long start, unsigned long end, | |||
129 | if (systemcfg->platform & PLATFORM_LPAR) | 133 | if (systemcfg->platform & PLATFORM_LPAR) |
130 | ret = pSeries_lpar_hpte_insert(hpteg, va, | 134 | ret = pSeries_lpar_hpte_insert(hpteg, va, |
131 | virt_to_abs(addr) >> PAGE_SHIFT, | 135 | virt_to_abs(addr) >> PAGE_SHIFT, |
132 | 0, tmp_mode, 1, large); | 136 | vflags, tmp_mode); |
133 | else | 137 | else |
134 | #endif /* CONFIG_PPC_PSERIES */ | 138 | #endif /* CONFIG_PPC_PSERIES */ |
135 | ret = native_hpte_insert(hpteg, va, | 139 | ret = native_hpte_insert(hpteg, va, |
136 | virt_to_abs(addr) >> PAGE_SHIFT, | 140 | virt_to_abs(addr) >> PAGE_SHIFT, |
137 | 0, tmp_mode, 1, large); | 141 | vflags, tmp_mode); |
138 | 142 | ||
139 | if (ret == -1) { | 143 | if (ret == -1) { |
140 | ppc64_terminate_msg(0x20, "create_pte_mapping"); | 144 | ppc64_terminate_msg(0x20, "create_pte_mapping"); |