aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/mm
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2012-09-28 10:25:52 -0400
committerRalf Baechle <ralf@linux-mips.org>2012-09-28 10:25:52 -0400
commit77a0d763c461da81c2a3fc9a7e58162a40854a1a (patch)
treebc5ca1d08c8f9b98fd8c8726e88788d4fc618118 /arch/mips/mm
parent8922c9b4b2e3b1b845b46e8da61ad228d8f1b121 (diff)
parent05857c64ecf897209c16ffad9bb3e8d359dd5dca (diff)
Merge branch 'rixi-3.7' of git://git.linux-mips.org/pub/scm/sjhill/linux-sjhill into mips-for-linux-next
Diffstat (limited to 'arch/mips/mm')
-rw-r--r--arch/mips/mm/cache.c2
-rw-r--r--arch/mips/mm/fault.c2
-rw-r--r--arch/mips/mm/tlb-r4k.c2
-rw-r--r--arch/mips/mm/tlbex.c14
4 files changed, 10 insertions, 10 deletions
diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c
index 829320c7b175..07cec4407b0c 100644
--- a/arch/mips/mm/cache.c
+++ b/arch/mips/mm/cache.c
@@ -142,7 +142,7 @@ EXPORT_SYMBOL(_page_cachable_default);
142 142
143static inline void setup_protection_map(void) 143static inline void setup_protection_map(void)
144{ 144{
145 if (kernel_uses_smartmips_rixi) { 145 if (cpu_has_rixi) {
146 protection_map[0] = __pgprot(_page_cachable_default | _PAGE_PRESENT | _PAGE_NO_EXEC | _PAGE_NO_READ); 146 protection_map[0] = __pgprot(_page_cachable_default | _PAGE_PRESENT | _PAGE_NO_EXEC | _PAGE_NO_READ);
147 protection_map[1] = __pgprot(_page_cachable_default | _PAGE_PRESENT | _PAGE_NO_EXEC); 147 protection_map[1] = __pgprot(_page_cachable_default | _PAGE_PRESENT | _PAGE_NO_EXEC);
148 protection_map[2] = __pgprot(_page_cachable_default | _PAGE_PRESENT | _PAGE_NO_EXEC | _PAGE_NO_READ); 148 protection_map[2] = __pgprot(_page_cachable_default | _PAGE_PRESENT | _PAGE_NO_EXEC | _PAGE_NO_READ);
diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c
index c14f6dfed995..7a19957735e9 100644
--- a/arch/mips/mm/fault.c
+++ b/arch/mips/mm/fault.c
@@ -114,7 +114,7 @@ good_area:
114 if (!(vma->vm_flags & VM_WRITE)) 114 if (!(vma->vm_flags & VM_WRITE))
115 goto bad_area; 115 goto bad_area;
116 } else { 116 } else {
117 if (kernel_uses_smartmips_rixi) { 117 if (cpu_has_rixi) {
118 if (address == regs->cp0_epc && !(vma->vm_flags & VM_EXEC)) { 118 if (address == regs->cp0_epc && !(vma->vm_flags & VM_EXEC)) {
119#if 0 119#if 0
120 pr_notice("Cpu%d[%s:%d:%0*lx:%ld:%0*lx] XI violation\n", 120 pr_notice("Cpu%d[%s:%d:%0*lx:%ld:%0*lx] XI violation\n",
diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c
index d2572cb232db..87b9cfcc30ff 100644
--- a/arch/mips/mm/tlb-r4k.c
+++ b/arch/mips/mm/tlb-r4k.c
@@ -401,7 +401,7 @@ void __cpuinit tlb_init(void)
401 current_cpu_type() == CPU_R14000) 401 current_cpu_type() == CPU_R14000)
402 write_c0_framemask(0); 402 write_c0_framemask(0);
403 403
404 if (kernel_uses_smartmips_rixi) { 404 if (cpu_has_rixi) {
405 /* 405 /*
406 * Enable the no read, no exec bits, and enable large virtual 406 * Enable the no read, no exec bits, and enable large virtual
407 * address. 407 * address.
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index 03eb0ef91580..1832f17e6be4 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -586,7 +586,7 @@ static void __cpuinit build_tlb_write_entry(u32 **p, struct uasm_label **l,
586static __cpuinit __maybe_unused void build_convert_pte_to_entrylo(u32 **p, 586static __cpuinit __maybe_unused void build_convert_pte_to_entrylo(u32 **p,
587 unsigned int reg) 587 unsigned int reg)
588{ 588{
589 if (kernel_uses_smartmips_rixi) { 589 if (cpu_has_rixi) {
590 UASM_i_SRL(p, reg, reg, ilog2(_PAGE_NO_EXEC)); 590 UASM_i_SRL(p, reg, reg, ilog2(_PAGE_NO_EXEC));
591 UASM_i_ROTR(p, reg, reg, ilog2(_PAGE_GLOBAL) - ilog2(_PAGE_NO_EXEC)); 591 UASM_i_ROTR(p, reg, reg, ilog2(_PAGE_GLOBAL) - ilog2(_PAGE_NO_EXEC));
592 } else { 592 } else {
@@ -990,7 +990,7 @@ static void __cpuinit build_update_entries(u32 **p, unsigned int tmp,
990 if (cpu_has_64bits) { 990 if (cpu_has_64bits) {
991 uasm_i_ld(p, tmp, 0, ptep); /* get even pte */ 991 uasm_i_ld(p, tmp, 0, ptep); /* get even pte */
992 uasm_i_ld(p, ptep, sizeof(pte_t), ptep); /* get odd pte */ 992 uasm_i_ld(p, ptep, sizeof(pte_t), ptep); /* get odd pte */
993 if (kernel_uses_smartmips_rixi) { 993 if (cpu_has_rixi) {
994 UASM_i_SRL(p, tmp, tmp, ilog2(_PAGE_NO_EXEC)); 994 UASM_i_SRL(p, tmp, tmp, ilog2(_PAGE_NO_EXEC));
995 UASM_i_SRL(p, ptep, ptep, ilog2(_PAGE_NO_EXEC)); 995 UASM_i_SRL(p, ptep, ptep, ilog2(_PAGE_NO_EXEC));
996 UASM_i_ROTR(p, tmp, tmp, ilog2(_PAGE_GLOBAL) - ilog2(_PAGE_NO_EXEC)); 996 UASM_i_ROTR(p, tmp, tmp, ilog2(_PAGE_GLOBAL) - ilog2(_PAGE_NO_EXEC));
@@ -1017,7 +1017,7 @@ static void __cpuinit build_update_entries(u32 **p, unsigned int tmp,
1017 UASM_i_LW(p, ptep, sizeof(pte_t), ptep); /* get odd pte */ 1017 UASM_i_LW(p, ptep, sizeof(pte_t), ptep); /* get odd pte */
1018 if (r45k_bvahwbug()) 1018 if (r45k_bvahwbug())
1019 build_tlb_probe_entry(p); 1019 build_tlb_probe_entry(p);
1020 if (kernel_uses_smartmips_rixi) { 1020 if (cpu_has_rixi) {
1021 UASM_i_SRL(p, tmp, tmp, ilog2(_PAGE_NO_EXEC)); 1021 UASM_i_SRL(p, tmp, tmp, ilog2(_PAGE_NO_EXEC));
1022 UASM_i_SRL(p, ptep, ptep, ilog2(_PAGE_NO_EXEC)); 1022 UASM_i_SRL(p, ptep, ptep, ilog2(_PAGE_NO_EXEC));
1023 UASM_i_ROTR(p, tmp, tmp, ilog2(_PAGE_GLOBAL) - ilog2(_PAGE_NO_EXEC)); 1023 UASM_i_ROTR(p, tmp, tmp, ilog2(_PAGE_GLOBAL) - ilog2(_PAGE_NO_EXEC));
@@ -1183,7 +1183,7 @@ build_fast_tlb_refill_handler (u32 **p, struct uasm_label **l,
1183 UASM_i_LW(p, even, 0, ptr); /* get even pte */ 1183 UASM_i_LW(p, even, 0, ptr); /* get even pte */
1184 UASM_i_LW(p, odd, sizeof(pte_t), ptr); /* get odd pte */ 1184 UASM_i_LW(p, odd, sizeof(pte_t), ptr); /* get odd pte */
1185 } 1185 }
1186 if (kernel_uses_smartmips_rixi) { 1186 if (cpu_has_rixi) {
1187 uasm_i_dsrl_safe(p, even, even, ilog2(_PAGE_NO_EXEC)); 1187 uasm_i_dsrl_safe(p, even, even, ilog2(_PAGE_NO_EXEC));
1188 uasm_i_dsrl_safe(p, odd, odd, ilog2(_PAGE_NO_EXEC)); 1188 uasm_i_dsrl_safe(p, odd, odd, ilog2(_PAGE_NO_EXEC));
1189 uasm_i_drotr(p, even, even, 1189 uasm_i_drotr(p, even, even,
@@ -1545,7 +1545,7 @@ build_pte_present(u32 **p, struct uasm_reloc **r,
1545{ 1545{
1546 int t = scratch >= 0 ? scratch : pte; 1546 int t = scratch >= 0 ? scratch : pte;
1547 1547
1548 if (kernel_uses_smartmips_rixi) { 1548 if (cpu_has_rixi) {
1549 if (use_bbit_insns()) { 1549 if (use_bbit_insns()) {
1550 uasm_il_bbit0(p, r, pte, ilog2(_PAGE_PRESENT), lid); 1550 uasm_il_bbit0(p, r, pte, ilog2(_PAGE_PRESENT), lid);
1551 uasm_i_nop(p); 1551 uasm_i_nop(p);
@@ -1875,7 +1875,7 @@ static void __cpuinit build_r4000_tlb_load_handler(void)
1875 if (m4kc_tlbp_war()) 1875 if (m4kc_tlbp_war())
1876 build_tlb_probe_entry(&p); 1876 build_tlb_probe_entry(&p);
1877 1877
1878 if (kernel_uses_smartmips_rixi) { 1878 if (cpu_has_rixi) {
1879 /* 1879 /*
1880 * If the page is not _PAGE_VALID, RI or XI could not 1880 * If the page is not _PAGE_VALID, RI or XI could not
1881 * have triggered it. Skip the expensive test.. 1881 * have triggered it. Skip the expensive test..
@@ -1929,7 +1929,7 @@ static void __cpuinit build_r4000_tlb_load_handler(void)
1929 build_pte_present(&p, &r, wr.r1, wr.r2, wr.r3, label_nopage_tlbl); 1929 build_pte_present(&p, &r, wr.r1, wr.r2, wr.r3, label_nopage_tlbl);
1930 build_tlb_probe_entry(&p); 1930 build_tlb_probe_entry(&p);
1931 1931
1932 if (kernel_uses_smartmips_rixi) { 1932 if (cpu_has_rixi) {
1933 /* 1933 /*
1934 * If the page is not _PAGE_VALID, RI or XI could not 1934 * If the page is not _PAGE_VALID, RI or XI could not
1935 * have triggered it. Skip the expensive test.. 1935 * have triggered it. Skip the expensive test..