aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/system.h6
-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
-rw-r--r--include/linux/vt_kern.h5
-rw-r--r--include/net/compat.h3
9 files changed, 215 insertions, 79 deletions
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h
index 95b3abf4851b..7c9568d30307 100644
--- a/include/asm-arm/system.h
+++ b/include/asm-arm/system.h
@@ -127,6 +127,12 @@ static inline int cpu_is_xsc3(void)
127} 127}
128#endif 128#endif
129 129
130#if !defined(CONFIG_CPU_XSCALE) && !defined(CONFIG_CPU_XSC3)
131#define cpu_is_xscale() 0
132#else
133#define cpu_is_xscale() 1
134#endif
135
130#define set_cr(x) \ 136#define set_cr(x) \
131 __asm__ __volatile__( \ 137 __asm__ __volatile__( \
132 "mcr p15, 0, %0, c1, c0, 0 @ set CR" \ 138 "mcr p15, 0, %0, c1, c0, 0 @ set CR" \
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 69cebbd9f3e0..f80fe75c7800 100644
--- a/include/asm-mips/pgtable.h
+++ b/include/asm-mips/pgtable.h
@@ -90,10 +90,11 @@ extern void paging_init(void);
90#define pmd_page(pmd) (pfn_to_page(pmd_phys(pmd) >> PAGE_SHIFT)) 90#define pmd_page(pmd) (pfn_to_page(pmd_phys(pmd) >> PAGE_SHIFT))
91#define pmd_page_kernel(pmd) pmd_val(pmd) 91#define pmd_page_kernel(pmd) pmd_val(pmd)
92 92
93#define pte_none(pte) (!(pte_val(pte) & ~_PAGE_GLOBAL))
94#define pte_present(pte) (pte_val(pte) & _PAGE_PRESENT)
95
96#if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32_R1) 93#if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32_R1)
94
95#define pte_none(pte) (!(((pte).pte_low | (pte).pte_high) & ~_PAGE_GLOBAL))
96#define pte_present(pte) ((pte).pte_low & _PAGE_PRESENT)
97
97static inline void set_pte(pte_t *ptep, pte_t pte) 98static inline void set_pte(pte_t *ptep, pte_t pte)
98{ 99{
99 ptep->pte_high = pte.pte_high; 100 ptep->pte_high = pte.pte_high;
@@ -101,27 +102,35 @@ static inline void set_pte(pte_t *ptep, pte_t pte)
101 ptep->pte_low = pte.pte_low; 102 ptep->pte_low = pte.pte_low;
102 //printk("pte_high %x pte_low %x\n", ptep->pte_high, ptep->pte_low); 103 //printk("pte_high %x pte_low %x\n", ptep->pte_high, ptep->pte_low);
103 104
104 if (pte_val(pte) & _PAGE_GLOBAL) { 105 if (pte.pte_low & _PAGE_GLOBAL) {
105 pte_t *buddy = ptep_buddy(ptep); 106 pte_t *buddy = ptep_buddy(ptep);
106 /* 107 /*
107 * Make sure the buddy is global too (if it's !none, 108 * Make sure the buddy is global too (if it's !none,
108 * it better already be global) 109 * it better already be global)
109 */ 110 */
110 if (pte_none(*buddy)) 111 if (pte_none(*buddy)) {
111 buddy->pte_low |= _PAGE_GLOBAL; 112 buddy->pte_low |= _PAGE_GLOBAL;
113 buddy->pte_high |= _PAGE_GLOBAL;
114 }
112 } 115 }
113} 116}
114#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) 117#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval)
115 118
116static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) 119static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
117{ 120{
121 pte_t null = __pte(0);
122
118 /* Preserve global status for the pair */ 123 /* Preserve global status for the pair */
119 if (pte_val(*ptep_buddy(ptep)) & _PAGE_GLOBAL) 124 if (ptep_buddy(ptep)->pte_low & _PAGE_GLOBAL)
120 set_pte_at(mm, addr, ptep, __pte(_PAGE_GLOBAL)); 125 null.pte_low = null.pte_high = _PAGE_GLOBAL;
121 else 126
122 set_pte_at(mm, addr, ptep, __pte(0)); 127 set_pte_at(mm, addr, ptep, null);
123} 128}
124#else 129#else
130
131#define pte_none(pte) (!(pte_val(pte) & ~_PAGE_GLOBAL))
132#define pte_present(pte) (pte_val(pte) & _PAGE_PRESENT)
133
125/* 134/*
126 * Certain architectures need to do special things when pte's 135 * Certain architectures need to do special things when pte's
127 * within a page table are directly modified. Thus, the following 136 * within a page table are directly modified. Thus, the following
@@ -182,75 +191,76 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
182 */ 191 */
183static inline int pte_user(pte_t pte) { BUG(); return 0; } 192static inline int pte_user(pte_t pte) { BUG(); return 0; }
184#if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32_R1) 193#if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32_R1)
185static inline int pte_read(pte_t pte) { return (pte).pte_low & _PAGE_READ; } 194static inline int pte_read(pte_t pte) { return pte.pte_low & _PAGE_READ; }
186static inline int pte_write(pte_t pte) { return (pte).pte_low & _PAGE_WRITE; } 195static inline int pte_write(pte_t pte) { return pte.pte_low & _PAGE_WRITE; }
187static inline int pte_dirty(pte_t pte) { return (pte).pte_low & _PAGE_MODIFIED; } 196static inline int pte_dirty(pte_t pte) { return pte.pte_low & _PAGE_MODIFIED; }
188static inline int pte_young(pte_t pte) { return (pte).pte_low & _PAGE_ACCESSED; } 197static inline int pte_young(pte_t pte) { return pte.pte_low & _PAGE_ACCESSED; }
189static inline int pte_file(pte_t pte) { return (pte).pte_low & _PAGE_FILE; } 198static inline int pte_file(pte_t pte) { return pte.pte_low & _PAGE_FILE; }
199
190static inline pte_t pte_wrprotect(pte_t pte) 200static inline pte_t pte_wrprotect(pte_t pte)
191{ 201{
192 (pte).pte_low &= ~(_PAGE_WRITE | _PAGE_SILENT_WRITE); 202 pte.pte_low &= ~(_PAGE_WRITE | _PAGE_SILENT_WRITE);
193 (pte).pte_high &= ~_PAGE_SILENT_WRITE; 203 pte.pte_high &= ~_PAGE_SILENT_WRITE;
194 return pte; 204 return pte;
195} 205}
196 206
197static inline pte_t pte_rdprotect(pte_t pte) 207static inline pte_t pte_rdprotect(pte_t pte)
198{ 208{
199 (pte).pte_low &= ~(_PAGE_READ | _PAGE_SILENT_READ); 209 pte.pte_low &= ~(_PAGE_READ | _PAGE_SILENT_READ);
200 (pte).pte_high &= ~_PAGE_SILENT_READ; 210 pte.pte_high &= ~_PAGE_SILENT_READ;
201 return pte; 211 return pte;
202} 212}
203 213
204static inline pte_t pte_mkclean(pte_t pte) 214static inline pte_t pte_mkclean(pte_t pte)
205{ 215{
206 (pte).pte_low &= ~(_PAGE_MODIFIED|_PAGE_SILENT_WRITE); 216 pte.pte_low &= ~(_PAGE_MODIFIED | _PAGE_SILENT_WRITE);
207 (pte).pte_high &= ~_PAGE_SILENT_WRITE; 217 pte.pte_high &= ~_PAGE_SILENT_WRITE;
208 return pte; 218 return pte;
209} 219}
210 220
211static inline pte_t pte_mkold(pte_t pte) 221static inline pte_t pte_mkold(pte_t pte)
212{ 222{
213 (pte).pte_low &= ~(_PAGE_ACCESSED|_PAGE_SILENT_READ); 223 pte.pte_low &= ~(_PAGE_ACCESSED | _PAGE_SILENT_READ);
214 (pte).pte_high &= ~_PAGE_SILENT_READ; 224 pte.pte_high &= ~_PAGE_SILENT_READ;
215 return pte; 225 return pte;
216} 226}
217 227
218static inline pte_t pte_mkwrite(pte_t pte) 228static inline pte_t pte_mkwrite(pte_t pte)
219{ 229{
220 (pte).pte_low |= _PAGE_WRITE; 230 pte.pte_low |= _PAGE_WRITE;
221 if ((pte).pte_low & _PAGE_MODIFIED) { 231 if (pte.pte_low & _PAGE_MODIFIED) {
222 (pte).pte_low |= _PAGE_SILENT_WRITE; 232 pte.pte_low |= _PAGE_SILENT_WRITE;
223 (pte).pte_high |= _PAGE_SILENT_WRITE; 233 pte.pte_high |= _PAGE_SILENT_WRITE;
224 } 234 }
225 return pte; 235 return pte;
226} 236}
227 237
228static inline pte_t pte_mkread(pte_t pte) 238static inline pte_t pte_mkread(pte_t pte)
229{ 239{
230 (pte).pte_low |= _PAGE_READ; 240 pte.pte_low |= _PAGE_READ;
231 if ((pte).pte_low & _PAGE_ACCESSED) { 241 if (pte.pte_low & _PAGE_ACCESSED) {
232 (pte).pte_low |= _PAGE_SILENT_READ; 242 pte.pte_low |= _PAGE_SILENT_READ;
233 (pte).pte_high |= _PAGE_SILENT_READ; 243 pte.pte_high |= _PAGE_SILENT_READ;
234 } 244 }
235 return pte; 245 return pte;
236} 246}
237 247
238static inline pte_t pte_mkdirty(pte_t pte) 248static inline pte_t pte_mkdirty(pte_t pte)
239{ 249{
240 (pte).pte_low |= _PAGE_MODIFIED; 250 pte.pte_low |= _PAGE_MODIFIED;
241 if ((pte).pte_low & _PAGE_WRITE) { 251 if (pte.pte_low & _PAGE_WRITE) {
242 (pte).pte_low |= _PAGE_SILENT_WRITE; 252 pte.pte_low |= _PAGE_SILENT_WRITE;
243 (pte).pte_high |= _PAGE_SILENT_WRITE; 253 pte.pte_high |= _PAGE_SILENT_WRITE;
244 } 254 }
245 return pte; 255 return pte;
246} 256}
247 257
248static inline pte_t pte_mkyoung(pte_t pte) 258static inline pte_t pte_mkyoung(pte_t pte)
249{ 259{
250 (pte).pte_low |= _PAGE_ACCESSED; 260 pte.pte_low |= _PAGE_ACCESSED;
251 if ((pte).pte_low & _PAGE_READ) 261 if (pte.pte_low & _PAGE_READ)
252 (pte).pte_low |= _PAGE_SILENT_READ; 262 pte.pte_low |= _PAGE_SILENT_READ;
253 (pte).pte_high |= _PAGE_SILENT_READ; 263 pte.pte_high |= _PAGE_SILENT_READ;
254 return pte; 264 return pte;
255} 265}
256#else 266#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;
diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h
index 530ae3f4248c..fab5aed8ca31 100644
--- a/include/linux/vt_kern.h
+++ b/include/linux/vt_kern.h
@@ -73,11 +73,6 @@ int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc);
73int vt_waitactive(int vt); 73int vt_waitactive(int vt);
74void change_console(struct vc_data *new_vc); 74void change_console(struct vc_data *new_vc);
75void reset_vc(struct vc_data *vc); 75void reset_vc(struct vc_data *vc);
76#ifdef CONFIG_VT
77int is_console_suspend_safe(void);
78#else
79static inline int is_console_suspend_safe(void) { return 1; }
80#endif
81 76
82/* 77/*
83 * vc_screen.c shares this temporary buffer with the console write code so that 78 * vc_screen.c shares this temporary buffer with the console write code so that
diff --git a/include/net/compat.h b/include/net/compat.h
index 8662b8f43df5..e65cbedb6abc 100644
--- a/include/net/compat.h
+++ b/include/net/compat.h
@@ -3,6 +3,8 @@
3 3
4#include <linux/config.h> 4#include <linux/config.h>
5 5
6struct sock;
7
6#if defined(CONFIG_COMPAT) 8#if defined(CONFIG_COMPAT)
7 9
8#include <linux/compat.h> 10#include <linux/compat.h>
@@ -23,7 +25,6 @@ struct compat_cmsghdr {
23 compat_int_t cmsg_type; 25 compat_int_t cmsg_type;
24}; 26};
25 27
26struct sock;
27extern int compat_sock_get_timestamp(struct sock *, struct timeval __user *); 28extern int compat_sock_get_timestamp(struct sock *, struct timeval __user *);
28 29
29#else /* defined(CONFIG_COMPAT) */ 30#else /* defined(CONFIG_COMPAT) */