aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-05-31 19:48:05 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-05-31 19:48:05 -0400
commitba8f5baba79da8eb502f8534c3a8ecb64aceb790 (patch)
tree39a0438607446681bdf5173c7480ff90f3825945 /include
parent5cedae9ca752a43cfb1074907d12c9f01fbebd45 (diff)
parent44d921b246923380f26b8010e47ac5dfe48fcec5 (diff)
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: [MIPS] Treat R14000 like R10000. [MIPS] Remove EXPERIMENTAL from PAGE_SIZE_16KB [MIPS] Update/Fix instruction definitions [MIPS] DSP and MDMX share the same config flag bit. [MIPS] Fix deadlock on MP with cache aliases. [MIPS] Use generic STABS_DEBUG macro. [MIPS] Create consistency in "system type" selection. [MIPS] Use generic DWARF_DEBUG [MIPS] Fix kgdb exception handler from user mode. [MIPS] Update struct sigcontext member names [MIPS] Update/fix futex assembly [MIPS] Remove support for sysmips(2) SETNAME and MIPS_RDNVRAM operations. [MIPS] Fix detection and handling of the 74K processor. [MIPS] Add missing 34K processor IDs [MIPS] Fix marking buddy of pte global for MIPS32 w/36-bit physical address [MIPS] AU1xxx mips_timer_interrupt() fixes [MIPS] Fix typo
Diffstat (limited to 'include')
-rw-r--r--include/asm-mips/cpu.h6
-rw-r--r--include/asm-mips/futex.h141
-rw-r--r--include/asm-mips/inst.h33
-rw-r--r--include/asm-mips/mipsregs.h2
-rw-r--r--include/asm-mips/pgtable.h88
-rw-r--r--include/asm-mips/sigcontext.h10
6 files changed, 207 insertions, 73 deletions
diff --git a/include/asm-mips/cpu.h b/include/asm-mips/cpu.h
index 818b9a97e214..dff2a0a52f8f 100644
--- a/include/asm-mips/cpu.h
+++ b/include/asm-mips/cpu.h
@@ -51,6 +51,7 @@
51#define PRID_IMP_R4300 0x0b00 51#define PRID_IMP_R4300 0x0b00
52#define PRID_IMP_VR41XX 0x0c00 52#define PRID_IMP_VR41XX 0x0c00
53#define PRID_IMP_R12000 0x0e00 53#define PRID_IMP_R12000 0x0e00
54#define PRID_IMP_R14000 0x0f00
54#define PRID_IMP_R8000 0x1000 55#define PRID_IMP_R8000 0x1000
55#define PRID_IMP_PR4450 0x1200 56#define PRID_IMP_PR4450 0x1200
56#define PRID_IMP_R4600 0x2000 57#define PRID_IMP_R4600 0x2000
@@ -87,6 +88,7 @@
87#define PRID_IMP_24K 0x9300 88#define PRID_IMP_24K 0x9300
88#define PRID_IMP_34K 0x9500 89#define PRID_IMP_34K 0x9500
89#define PRID_IMP_24KE 0x9600 90#define PRID_IMP_24KE 0x9600
91#define PRID_IMP_74K 0x9700
90 92
91/* 93/*
92 * These are the PRID's for when 23:16 == PRID_COMP_SIBYTE 94 * These are the PRID's for when 23:16 == PRID_COMP_SIBYTE
@@ -196,7 +198,9 @@
196#define CPU_34K 60 198#define CPU_34K 60
197#define CPU_PR4450 61 199#define CPU_PR4450 61
198#define CPU_SB1A 62 200#define CPU_SB1A 62
199#define CPU_LAST 62 201#define CPU_74K 63
202#define CPU_R14000 64
203#define CPU_LAST 64
200 204
201/* 205/*
202 * ISA Level encodings 206 * ISA Level encodings
diff --git a/include/asm-mips/futex.h b/include/asm-mips/futex.h
index a554089991f2..12d118f1bc9c 100644
--- a/include/asm-mips/futex.h
+++ b/include/asm-mips/futex.h
@@ -7,6 +7,7 @@
7#include <linux/futex.h> 7#include <linux/futex.h>
8#include <asm/errno.h> 8#include <asm/errno.h>
9#include <asm/uaccess.h> 9#include <asm/uaccess.h>
10#include <asm/war.h>
10 11
11#ifdef CONFIG_SMP 12#ifdef CONFIG_SMP
12#define __FUTEX_SMP_SYNC " sync \n" 13#define __FUTEX_SMP_SYNC " sync \n"
@@ -16,30 +17,58 @@
16 17
17#define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ 18#define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \
18{ \ 19{ \
19 __asm__ __volatile__( \ 20 if (cpu_has_llsc && R10000_LLSC_WAR) { \
20 " .set push \n" \ 21 __asm__ __volatile__( \
21 " .set noat \n" \ 22 " .set push \n" \
22 " .set mips3 \n" \ 23 " .set noat \n" \
23 "1: ll %1, (%3) # __futex_atomic_op1 \n" \ 24 " .set mips3 \n" \
24 " .set mips0 \n" \ 25 "1: ll %1, (%3) # __futex_atomic_op \n" \
25 " " insn " \n" \ 26 " .set mips0 \n" \
26 " .set mips3 \n" \ 27 " " insn " \n" \
27 "2: sc $1, (%3) \n" \ 28 " .set mips3 \n" \
28 " beqzl $1, 1b \n" \ 29 "2: sc $1, (%3) \n" \
29 __FUTEX_SMP_SYNC \ 30 " beqzl $1, 1b \n" \
30 "3: \n" \ 31 __FUTEX_SMP_SYNC \
31 " .set pop \n" \ 32 "3: \n" \
32 " .set mips0 \n" \ 33 " .set pop \n" \
33 " .section .fixup,\"ax\" \n" \ 34 " .set mips0 \n" \
34 "4: li %0, %5 \n" \ 35 " .section .fixup,\"ax\" \n" \
35 " j 2b \n" \ 36 "4: li %0, %5 \n" \
36 " .previous \n" \ 37 " j 2b \n" \
37 " .section __ex_table,\"a\" \n" \ 38 " .previous \n" \
38 " "__UA_ADDR "\t1b, 4b \n" \ 39 " .section __ex_table,\"a\" \n" \
39 " "__UA_ADDR "\t2b, 4b \n" \ 40 " "__UA_ADDR "\t1b, 4b \n" \
40 " .previous \n" \ 41 " "__UA_ADDR "\t2b, 4b \n" \
41 : "=r" (ret), "=r" (oldval) \ 42 " .previous \n" \
42 : "0" (0), "r" (uaddr), "Jr" (oparg), "i" (-EFAULT)); \ 43 : "=r" (ret), "=r" (oldval) \
44 : "0" (0), "r" (uaddr), "Jr" (oparg), "i" (-EFAULT)); \
45 } else if (cpu_has_llsc) { \
46 __asm__ __volatile__( \
47 " .set push \n" \
48 " .set noat \n" \
49 " .set mips3 \n" \
50 "1: ll %1, (%3) # __futex_atomic_op \n" \
51 " .set mips0 \n" \
52 " " insn " \n" \
53 " .set mips3 \n" \
54 "2: sc $1, (%3) \n" \
55 " beqz $1, 1b \n" \
56 __FUTEX_SMP_SYNC \
57 "3: \n" \
58 " .set pop \n" \
59 " .set mips0 \n" \
60 " .section .fixup,\"ax\" \n" \
61 "4: li %0, %5 \n" \
62 " j 2b \n" \
63 " .previous \n" \
64 " .section __ex_table,\"a\" \n" \
65 " "__UA_ADDR "\t1b, 4b \n" \
66 " "__UA_ADDR "\t2b, 4b \n" \
67 " .previous \n" \
68 : "=r" (ret), "=r" (oldval) \
69 : "0" (0), "r" (uaddr), "Jr" (oparg), "i" (-EFAULT)); \
70 } else \
71 ret = -ENOSYS; \
43} 72}
44 73
45static inline int 74static inline int
@@ -102,7 +131,69 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
102static inline int 131static inline int
103futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) 132futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
104{ 133{
105 return -ENOSYS; 134 int retval;
135
136 if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
137 return -EFAULT;
138
139 if (cpu_has_llsc && R10000_LLSC_WAR) {
140 __asm__ __volatile__(
141 "# futex_atomic_cmpxchg_inatomic \n"
142 " .set push \n"
143 " .set noat \n"
144 " .set mips3 \n"
145 "1: ll %0, %2 \n"
146 " bne %0, %z3, 3f \n"
147 " .set mips0 \n"
148 " move $1, %z4 \n"
149 " .set mips3 \n"
150 "2: sc $1, %1 \n"
151 " beqzl $1, 1b \n"
152 __FUTEX_SMP_SYNC
153 "3: \n"
154 " .set pop \n"
155 " .section .fixup,\"ax\" \n"
156 "4: li %0, %5 \n"
157 " j 3b \n"
158 " .previous \n"
159 " .section __ex_table,\"a\" \n"
160 " "__UA_ADDR "\t1b, 4b \n"
161 " "__UA_ADDR "\t2b, 4b \n"
162 " .previous \n"
163 : "=&r" (retval), "=R" (*uaddr)
164 : "R" (*uaddr), "Jr" (oldval), "Jr" (newval), "i" (-EFAULT)
165 : "memory");
166 } else if (cpu_has_llsc) {
167 __asm__ __volatile__(
168 "# futex_atomic_cmpxchg_inatomic \n"
169 " .set push \n"
170 " .set noat \n"
171 " .set mips3 \n"
172 "1: ll %0, %2 \n"
173 " bne %0, %z3, 3f \n"
174 " .set mips0 \n"
175 " move $1, %z4 \n"
176 " .set mips3 \n"
177 "2: sc $1, %1 \n"
178 " beqz $1, 1b \n"
179 __FUTEX_SMP_SYNC
180 "3: \n"
181 " .set pop \n"
182 " .section .fixup,\"ax\" \n"
183 "4: li %0, %5 \n"
184 " j 3b \n"
185 " .previous \n"
186 " .section __ex_table,\"a\" \n"
187 " "__UA_ADDR "\t1b, 4b \n"
188 " "__UA_ADDR "\t2b, 4b \n"
189 " .previous \n"
190 : "=&r" (retval), "=R" (*uaddr)
191 : "R" (*uaddr), "Jr" (oldval), "Jr" (newval), "i" (-EFAULT)
192 : "memory");
193 } else
194 return -ENOSYS;
195
196 return retval;
106} 197}
107 198
108#endif 199#endif
diff --git a/include/asm-mips/inst.h b/include/asm-mips/inst.h
index e0745f4ff624..1ed8d0f62577 100644
--- a/include/asm-mips/inst.h
+++ b/include/asm-mips/inst.h
@@ -6,6 +6,7 @@
6 * for more details. 6 * for more details.
7 * 7 *
8 * Copyright (C) 1996, 2000 by Ralf Baechle 8 * Copyright (C) 1996, 2000 by Ralf Baechle
9 * Copyright (C) 2006 by Thiemo Seufer
9 */ 10 */
10#ifndef _ASM_INST_H 11#ifndef _ASM_INST_H
11#define _ASM_INST_H 12#define _ASM_INST_H
@@ -21,14 +22,14 @@ enum major_op {
21 cop0_op, cop1_op, cop2_op, cop1x_op, 22 cop0_op, cop1_op, cop2_op, cop1x_op,
22 beql_op, bnel_op, blezl_op, bgtzl_op, 23 beql_op, bnel_op, blezl_op, bgtzl_op,
23 daddi_op, daddiu_op, ldl_op, ldr_op, 24 daddi_op, daddiu_op, ldl_op, ldr_op,
24 major_1c_op, jalx_op, major_1e_op, major_1f_op, 25 spec2_op, jalx_op, mdmx_op, spec3_op,
25 lb_op, lh_op, lwl_op, lw_op, 26 lb_op, lh_op, lwl_op, lw_op,
26 lbu_op, lhu_op, lwr_op, lwu_op, 27 lbu_op, lhu_op, lwr_op, lwu_op,
27 sb_op, sh_op, swl_op, sw_op, 28 sb_op, sh_op, swl_op, sw_op,
28 sdl_op, sdr_op, swr_op, cache_op, 29 sdl_op, sdr_op, swr_op, cache_op,
29 ll_op, lwc1_op, lwc2_op, pref_op, 30 ll_op, lwc1_op, lwc2_op, pref_op,
30 lld_op, ldc1_op, ldc2_op, ld_op, 31 lld_op, ldc1_op, ldc2_op, ld_op,
31 sc_op, swc1_op, swc2_op, rdhwr_op, 32 sc_op, swc1_op, swc2_op, major_3b_op,
32 scd_op, sdc1_op, sdc2_op, sd_op 33 scd_op, sdc1_op, sdc2_op, sd_op
33}; 34};
34 35
@@ -37,7 +38,7 @@ enum major_op {
37 */ 38 */
38enum spec_op { 39enum spec_op {
39 sll_op, movc_op, srl_op, sra_op, 40 sll_op, movc_op, srl_op, sra_op,
40 sllv_op, srlv_op, srav_op, spec1_unused_op, /* Opcode 0x07 is unused */ 41 sllv_op, pmon_op, srlv_op, srav_op,
41 jr_op, jalr_op, movz_op, movn_op, 42 jr_op, jalr_op, movz_op, movn_op,
42 syscall_op, break_op, spim_op, sync_op, 43 syscall_op, break_op, spim_op, sync_op,
43 mfhi_op, mthi_op, mflo_op, mtlo_op, 44 mfhi_op, mthi_op, mflo_op, mtlo_op,
@@ -55,6 +56,28 @@ enum spec_op {
55}; 56};
56 57
57/* 58/*
59 * func field of spec2 opcode.
60 */
61enum spec2_op {
62 madd_op, maddu_op, mul_op, spec2_3_unused_op,
63 msub_op, msubu_op, /* more unused ops */
64 clz_op = 0x20, clo_op,
65 dclz_op = 0x24, dclo_op,
66 sdbpp_op = 0x3f
67};
68
69/*
70 * func field of spec3 opcode.
71 */
72enum spec3_op {
73 ext_op, dextm_op, dextu_op, dext_op,
74 ins_op, dinsm_op, dinsu_op, dins_op,
75 bshfl_op = 0x20,
76 dbshfl_op = 0x24,
77 rdhwr_op = 0x3f
78};
79
80/*
58 * rt field of bcond opcodes. 81 * rt field of bcond opcodes.
59 */ 82 */
60enum rt_op { 83enum rt_op {
@@ -151,8 +174,8 @@ enum cop1x_func {
151 * func field for mad opcodes (MIPS IV). 174 * func field for mad opcodes (MIPS IV).
152 */ 175 */
153enum mad_func { 176enum mad_func {
154 madd_op = 0x08, msub_op = 0x0a, 177 madd_fp_op = 0x08, msub_fp_op = 0x0a,
155 nmadd_op = 0x0c, nmsub_op = 0x0e 178 nmadd_fp_op = 0x0c, nmsub_fp_op = 0x0e
156}; 179};
157 180
158/* 181/*
diff --git a/include/asm-mips/mipsregs.h b/include/asm-mips/mipsregs.h
index a2ef579f6b1a..5af7517fce8a 100644
--- a/include/asm-mips/mipsregs.h
+++ b/include/asm-mips/mipsregs.h
@@ -291,7 +291,7 @@
291#define ST0_DL (_ULCAST_(1) << 24) 291#define ST0_DL (_ULCAST_(1) << 24)
292 292
293/* 293/*
294 * Enable the MIPS DSP ASE 294 * Enable the MIPS MDMX and DSP ASEs
295 */ 295 */
296#define ST0_MX 0x01000000 296#define ST0_MX 0x01000000
297 297
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h
index 702a28fa7a34..174a3cda8c26 100644
--- a/include/asm-mips/pgtable.h
+++ b/include/asm-mips/pgtable.h
@@ -82,10 +82,11 @@ extern void paging_init(void);
82#define pmd_page(pmd) (pfn_to_page(pmd_phys(pmd) >> PAGE_SHIFT)) 82#define pmd_page(pmd) (pfn_to_page(pmd_phys(pmd) >> PAGE_SHIFT))
83#define pmd_page_kernel(pmd) pmd_val(pmd) 83#define pmd_page_kernel(pmd) pmd_val(pmd)
84 84
85#define pte_none(pte) (!(pte_val(pte) & ~_PAGE_GLOBAL))
86#define pte_present(pte) (pte_val(pte) & _PAGE_PRESENT)
87
88#if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32_R1) 85#if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32_R1)
86
87#define pte_none(pte) (!(((pte).pte_low | (pte).pte_high) & ~_PAGE_GLOBAL))
88#define pte_present(pte) ((pte).pte_low & _PAGE_PRESENT)
89
89static inline void set_pte(pte_t *ptep, pte_t pte) 90static inline void set_pte(pte_t *ptep, pte_t pte)
90{ 91{
91 ptep->pte_high = pte.pte_high; 92 ptep->pte_high = pte.pte_high;
@@ -93,27 +94,35 @@ static inline void set_pte(pte_t *ptep, pte_t pte)
93 ptep->pte_low = pte.pte_low; 94 ptep->pte_low = pte.pte_low;
94 //printk("pte_high %x pte_low %x\n", ptep->pte_high, ptep->pte_low); 95 //printk("pte_high %x pte_low %x\n", ptep->pte_high, ptep->pte_low);
95 96
96 if (pte_val(pte) & _PAGE_GLOBAL) { 97 if (pte.pte_low & _PAGE_GLOBAL) {
97 pte_t *buddy = ptep_buddy(ptep); 98 pte_t *buddy = ptep_buddy(ptep);
98 /* 99 /*
99 * Make sure the buddy is global too (if it's !none, 100 * Make sure the buddy is global too (if it's !none,
100 * it better already be global) 101 * it better already be global)
101 */ 102 */
102 if (pte_none(*buddy)) 103 if (pte_none(*buddy)) {
103 buddy->pte_low |= _PAGE_GLOBAL; 104 buddy->pte_low |= _PAGE_GLOBAL;
105 buddy->pte_high |= _PAGE_GLOBAL;
106 }
104 } 107 }
105} 108}
106#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) 109#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval)
107 110
108static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) 111static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
109{ 112{
113 pte_t null = __pte(0);
114
110 /* Preserve global status for the pair */ 115 /* Preserve global status for the pair */
111 if (pte_val(*ptep_buddy(ptep)) & _PAGE_GLOBAL) 116 if (ptep_buddy(ptep)->pte_low & _PAGE_GLOBAL)
112 set_pte_at(mm, addr, ptep, __pte(_PAGE_GLOBAL)); 117 null.pte_low = null.pte_high = _PAGE_GLOBAL;
113 else 118
114 set_pte_at(mm, addr, ptep, __pte(0)); 119 set_pte_at(mm, addr, ptep, null);
115} 120}
116#else 121#else
122
123#define pte_none(pte) (!(pte_val(pte) & ~_PAGE_GLOBAL))
124#define pte_present(pte) (pte_val(pte) & _PAGE_PRESENT)
125
117/* 126/*
118 * Certain architectures need to do special things when pte's 127 * Certain architectures need to do special things when pte's
119 * within a page table are directly modified. Thus, the following 128 * within a page table are directly modified. Thus, the following
@@ -174,75 +183,76 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
174 */ 183 */
175static inline int pte_user(pte_t pte) { BUG(); return 0; } 184static inline int pte_user(pte_t pte) { BUG(); return 0; }
176#if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32_R1) 185#if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32_R1)
177static inline int pte_read(pte_t pte) { return (pte).pte_low & _PAGE_READ; } 186static inline int pte_read(pte_t pte) { return pte.pte_low & _PAGE_READ; }
178static inline int pte_write(pte_t pte) { return (pte).pte_low & _PAGE_WRITE; } 187static inline int pte_write(pte_t pte) { return pte.pte_low & _PAGE_WRITE; }
179static inline int pte_dirty(pte_t pte) { return (pte).pte_low & _PAGE_MODIFIED; } 188static inline int pte_dirty(pte_t pte) { return pte.pte_low & _PAGE_MODIFIED; }
180static inline int pte_young(pte_t pte) { return (pte).pte_low & _PAGE_ACCESSED; } 189static inline int pte_young(pte_t pte) { return pte.pte_low & _PAGE_ACCESSED; }
181static inline int pte_file(pte_t pte) { return (pte).pte_low & _PAGE_FILE; } 190static inline int pte_file(pte_t pte) { return pte.pte_low & _PAGE_FILE; }
191
182static inline pte_t pte_wrprotect(pte_t pte) 192static inline pte_t pte_wrprotect(pte_t pte)
183{ 193{
184 (pte).pte_low &= ~(_PAGE_WRITE | _PAGE_SILENT_WRITE); 194 pte.pte_low &= ~(_PAGE_WRITE | _PAGE_SILENT_WRITE);
185 (pte).pte_high &= ~_PAGE_SILENT_WRITE; 195 pte.pte_high &= ~_PAGE_SILENT_WRITE;
186 return pte; 196 return pte;
187} 197}
188 198
189static inline pte_t pte_rdprotect(pte_t pte) 199static inline pte_t pte_rdprotect(pte_t pte)
190{ 200{
191 (pte).pte_low &= ~(_PAGE_READ | _PAGE_SILENT_READ); 201 pte.pte_low &= ~(_PAGE_READ | _PAGE_SILENT_READ);
192 (pte).pte_high &= ~_PAGE_SILENT_READ; 202 pte.pte_high &= ~_PAGE_SILENT_READ;
193 return pte; 203 return pte;
194} 204}
195 205
196static inline pte_t pte_mkclean(pte_t pte) 206static inline pte_t pte_mkclean(pte_t pte)
197{ 207{
198 (pte).pte_low &= ~(_PAGE_MODIFIED|_PAGE_SILENT_WRITE); 208 pte.pte_low &= ~(_PAGE_MODIFIED | _PAGE_SILENT_WRITE);
199 (pte).pte_high &= ~_PAGE_SILENT_WRITE; 209 pte.pte_high &= ~_PAGE_SILENT_WRITE;
200 return pte; 210 return pte;
201} 211}
202 212
203static inline pte_t pte_mkold(pte_t pte) 213static inline pte_t pte_mkold(pte_t pte)
204{ 214{
205 (pte).pte_low &= ~(_PAGE_ACCESSED|_PAGE_SILENT_READ); 215 pte.pte_low &= ~(_PAGE_ACCESSED | _PAGE_SILENT_READ);
206 (pte).pte_high &= ~_PAGE_SILENT_READ; 216 pte.pte_high &= ~_PAGE_SILENT_READ;
207 return pte; 217 return pte;
208} 218}
209 219
210static inline pte_t pte_mkwrite(pte_t pte) 220static inline pte_t pte_mkwrite(pte_t pte)
211{ 221{
212 (pte).pte_low |= _PAGE_WRITE; 222 pte.pte_low |= _PAGE_WRITE;
213 if ((pte).pte_low & _PAGE_MODIFIED) { 223 if (pte.pte_low & _PAGE_MODIFIED) {
214 (pte).pte_low |= _PAGE_SILENT_WRITE; 224 pte.pte_low |= _PAGE_SILENT_WRITE;
215 (pte).pte_high |= _PAGE_SILENT_WRITE; 225 pte.pte_high |= _PAGE_SILENT_WRITE;
216 } 226 }
217 return pte; 227 return pte;
218} 228}
219 229
220static inline pte_t pte_mkread(pte_t pte) 230static inline pte_t pte_mkread(pte_t pte)
221{ 231{
222 (pte).pte_low |= _PAGE_READ; 232 pte.pte_low |= _PAGE_READ;
223 if ((pte).pte_low & _PAGE_ACCESSED) { 233 if (pte.pte_low & _PAGE_ACCESSED) {
224 (pte).pte_low |= _PAGE_SILENT_READ; 234 pte.pte_low |= _PAGE_SILENT_READ;
225 (pte).pte_high |= _PAGE_SILENT_READ; 235 pte.pte_high |= _PAGE_SILENT_READ;
226 } 236 }
227 return pte; 237 return pte;
228} 238}
229 239
230static inline pte_t pte_mkdirty(pte_t pte) 240static inline pte_t pte_mkdirty(pte_t pte)
231{ 241{
232 (pte).pte_low |= _PAGE_MODIFIED; 242 pte.pte_low |= _PAGE_MODIFIED;
233 if ((pte).pte_low & _PAGE_WRITE) { 243 if (pte.pte_low & _PAGE_WRITE) {
234 (pte).pte_low |= _PAGE_SILENT_WRITE; 244 pte.pte_low |= _PAGE_SILENT_WRITE;
235 (pte).pte_high |= _PAGE_SILENT_WRITE; 245 pte.pte_high |= _PAGE_SILENT_WRITE;
236 } 246 }
237 return pte; 247 return pte;
238} 248}
239 249
240static inline pte_t pte_mkyoung(pte_t pte) 250static inline pte_t pte_mkyoung(pte_t pte)
241{ 251{
242 (pte).pte_low |= _PAGE_ACCESSED; 252 pte.pte_low |= _PAGE_ACCESSED;
243 if ((pte).pte_low & _PAGE_READ) 253 if (pte.pte_low & _PAGE_READ)
244 (pte).pte_low |= _PAGE_SILENT_READ; 254 pte.pte_low |= _PAGE_SILENT_READ;
245 (pte).pte_high |= _PAGE_SILENT_READ; 255 pte.pte_high |= _PAGE_SILENT_READ;
246 return pte; 256 return pte;
247} 257}
248#else 258#else
diff --git a/include/asm-mips/sigcontext.h b/include/asm-mips/sigcontext.h
index 8edabb0be23f..cefa657dd04a 100644
--- a/include/asm-mips/sigcontext.h
+++ b/include/asm-mips/sigcontext.h
@@ -55,8 +55,14 @@ struct sigcontext {
55struct sigcontext { 55struct sigcontext {
56 unsigned long sc_regs[32]; 56 unsigned long sc_regs[32];
57 unsigned long sc_fpregs[32]; 57 unsigned long sc_fpregs[32];
58 unsigned long sc_hi[4]; 58 unsigned long sc_mdhi;
59 unsigned long sc_lo[4]; 59 unsigned long sc_hi1;
60 unsigned long sc_hi2;
61 unsigned long sc_hi3;
62 unsigned long sc_mdlo;
63 unsigned long sc_lo1;
64 unsigned long sc_lo2;
65 unsigned long sc_lo3;
60 unsigned long sc_pc; 66 unsigned long sc_pc;
61 unsigned int sc_fpc_csr; 67 unsigned int sc_fpc_csr;
62 unsigned int sc_used_math; 68 unsigned int sc_used_math;