diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-alpha/termbits.h | 1 | ||||
-rw-r--r-- | include/asm-arm/arch-ixp23xx/memory.h | 2 | ||||
-rw-r--r-- | include/asm-arm/system.h | 6 | ||||
-rw-r--r-- | include/asm-generic/pgtable.h | 11 | ||||
-rw-r--r-- | include/asm-mips/cpu.h | 6 | ||||
-rw-r--r-- | include/asm-mips/futex.h | 141 | ||||
-rw-r--r-- | include/asm-mips/inst.h | 33 | ||||
-rw-r--r-- | include/asm-mips/mipsregs.h | 2 | ||||
-rw-r--r-- | include/asm-mips/pgtable.h | 98 | ||||
-rw-r--r-- | include/asm-mips/sigcontext.h | 10 | ||||
-rw-r--r-- | include/asm-powerpc/termbits.h | 1 | ||||
-rw-r--r-- | include/asm-sparc64/pgtable.h | 17 | ||||
-rw-r--r-- | include/asm-x86_64/elf.h | 2 | ||||
-rw-r--r-- | include/linux/input.h | 13 | ||||
-rw-r--r-- | include/linux/pci_ids.h | 1 | ||||
-rw-r--r-- | include/linux/vt_kern.h | 5 | ||||
-rw-r--r-- | include/net/compat.h | 3 |
17 files changed, 252 insertions, 100 deletions
diff --git a/include/asm-alpha/termbits.h b/include/asm-alpha/termbits.h index f4837fa29420..5541101b58ae 100644 --- a/include/asm-alpha/termbits.h +++ b/include/asm-alpha/termbits.h | |||
@@ -148,6 +148,7 @@ struct termios { | |||
148 | #define HUPCL 00040000 | 148 | #define HUPCL 00040000 |
149 | 149 | ||
150 | #define CLOCAL 00100000 | 150 | #define CLOCAL 00100000 |
151 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | ||
151 | #define CRTSCTS 020000000000 /* flow control */ | 152 | #define CRTSCTS 020000000000 /* flow control */ |
152 | 153 | ||
153 | /* c_lflag bits */ | 154 | /* c_lflag bits */ |
diff --git a/include/asm-arm/arch-ixp23xx/memory.h b/include/asm-arm/arch-ixp23xx/memory.h index 6e19f46d54d1..c85fc06a043c 100644 --- a/include/asm-arm/arch-ixp23xx/memory.h +++ b/include/asm-arm/arch-ixp23xx/memory.h | |||
@@ -49,7 +49,7 @@ static inline int __ixp23xx_arch_is_coherent(void) | |||
49 | { | 49 | { |
50 | extern unsigned int processor_id; | 50 | extern unsigned int processor_id; |
51 | 51 | ||
52 | if (((processor_id & 15) >= 2) || machine_is_roadrunner()) | 52 | if (((processor_id & 15) >= 4) || machine_is_roadrunner()) |
53 | return 1; | 53 | return 1; |
54 | 54 | ||
55 | return 0; | 55 | return 0; |
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-generic/pgtable.h b/include/asm-generic/pgtable.h index 358e4d309ceb..c2059a3a0621 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h | |||
@@ -159,17 +159,8 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addres | |||
159 | #define lazy_mmu_prot_update(pte) do { } while (0) | 159 | #define lazy_mmu_prot_update(pte) do { } while (0) |
160 | #endif | 160 | #endif |
161 | 161 | ||
162 | #ifndef __HAVE_ARCH_MULTIPLE_ZERO_PAGE | 162 | #ifndef __HAVE_ARCH_MOVE_PTE |
163 | #define move_pte(pte, prot, old_addr, new_addr) (pte) | 163 | #define move_pte(pte, prot, old_addr, new_addr) (pte) |
164 | #else | ||
165 | #define move_pte(pte, prot, old_addr, new_addr) \ | ||
166 | ({ \ | ||
167 | pte_t newpte = (pte); \ | ||
168 | if (pte_present(pte) && pfn_valid(pte_pfn(pte)) && \ | ||
169 | pte_page(pte) == ZERO_PAGE(old_addr)) \ | ||
170 | newpte = mk_pte(ZERO_PAGE(new_addr), (prot)); \ | ||
171 | newpte; \ | ||
172 | }) | ||
173 | #endif | 164 | #endif |
174 | 165 | ||
175 | /* | 166 | /* |
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 | ||
45 | static inline int | 74 | static inline int |
@@ -102,7 +131,69 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
102 | static inline int | 131 | static inline int |
103 | futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) | 132 | futex_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 | */ |
38 | enum spec_op { | 39 | enum 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 | */ | ||
61 | enum 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 | */ | ||
72 | enum 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 | */ |
60 | enum rt_op { | 83 | enum 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 | */ |
153 | enum mad_func { | 176 | enum 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..f80fe75c7800 100644 --- a/include/asm-mips/pgtable.h +++ b/include/asm-mips/pgtable.h | |||
@@ -70,7 +70,15 @@ extern unsigned long zero_page_mask; | |||
70 | #define ZERO_PAGE(vaddr) \ | 70 | #define ZERO_PAGE(vaddr) \ |
71 | (virt_to_page(empty_zero_page + (((unsigned long)(vaddr)) & zero_page_mask))) | 71 | (virt_to_page(empty_zero_page + (((unsigned long)(vaddr)) & zero_page_mask))) |
72 | 72 | ||
73 | #define __HAVE_ARCH_MULTIPLE_ZERO_PAGE | 73 | #define __HAVE_ARCH_MOVE_PTE |
74 | #define move_pte(pte, prot, old_addr, new_addr) \ | ||
75 | ({ \ | ||
76 | pte_t newpte = (pte); \ | ||
77 | if (pte_present(pte) && pfn_valid(pte_pfn(pte)) && \ | ||
78 | pte_page(pte) == ZERO_PAGE(old_addr)) \ | ||
79 | newpte = mk_pte(ZERO_PAGE(new_addr), (prot)); \ | ||
80 | newpte; \ | ||
81 | }) | ||
74 | 82 | ||
75 | extern void paging_init(void); | 83 | extern void paging_init(void); |
76 | 84 | ||
@@ -82,10 +90,11 @@ extern void paging_init(void); | |||
82 | #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)) |
83 | #define pmd_page_kernel(pmd) pmd_val(pmd) | 91 | #define pmd_page_kernel(pmd) pmd_val(pmd) |
84 | 92 | ||
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) | 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 | |||
89 | static inline void set_pte(pte_t *ptep, pte_t pte) | 98 | static inline void set_pte(pte_t *ptep, pte_t pte) |
90 | { | 99 | { |
91 | ptep->pte_high = pte.pte_high; | 100 | ptep->pte_high = pte.pte_high; |
@@ -93,27 +102,35 @@ static inline void set_pte(pte_t *ptep, pte_t pte) | |||
93 | ptep->pte_low = pte.pte_low; | 102 | ptep->pte_low = pte.pte_low; |
94 | //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); |
95 | 104 | ||
96 | if (pte_val(pte) & _PAGE_GLOBAL) { | 105 | if (pte.pte_low & _PAGE_GLOBAL) { |
97 | pte_t *buddy = ptep_buddy(ptep); | 106 | pte_t *buddy = ptep_buddy(ptep); |
98 | /* | 107 | /* |
99 | * Make sure the buddy is global too (if it's !none, | 108 | * Make sure the buddy is global too (if it's !none, |
100 | * it better already be global) | 109 | * it better already be global) |
101 | */ | 110 | */ |
102 | if (pte_none(*buddy)) | 111 | if (pte_none(*buddy)) { |
103 | buddy->pte_low |= _PAGE_GLOBAL; | 112 | buddy->pte_low |= _PAGE_GLOBAL; |
113 | buddy->pte_high |= _PAGE_GLOBAL; | ||
114 | } | ||
104 | } | 115 | } |
105 | } | 116 | } |
106 | #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) |
107 | 118 | ||
108 | static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) | 119 | static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) |
109 | { | 120 | { |
121 | pte_t null = __pte(0); | ||
122 | |||
110 | /* Preserve global status for the pair */ | 123 | /* Preserve global status for the pair */ |
111 | if (pte_val(*ptep_buddy(ptep)) & _PAGE_GLOBAL) | 124 | if (ptep_buddy(ptep)->pte_low & _PAGE_GLOBAL) |
112 | set_pte_at(mm, addr, ptep, __pte(_PAGE_GLOBAL)); | 125 | null.pte_low = null.pte_high = _PAGE_GLOBAL; |
113 | else | 126 | |
114 | set_pte_at(mm, addr, ptep, __pte(0)); | 127 | set_pte_at(mm, addr, ptep, null); |
115 | } | 128 | } |
116 | #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 | |||
117 | /* | 134 | /* |
118 | * Certain architectures need to do special things when pte's | 135 | * Certain architectures need to do special things when pte's |
119 | * within a page table are directly modified. Thus, the following | 136 | * within a page table are directly modified. Thus, the following |
@@ -174,75 +191,76 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; | |||
174 | */ | 191 | */ |
175 | static inline int pte_user(pte_t pte) { BUG(); return 0; } | 192 | static inline int pte_user(pte_t pte) { BUG(); return 0; } |
176 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32_R1) | 193 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32_R1) |
177 | static inline int pte_read(pte_t pte) { return (pte).pte_low & _PAGE_READ; } | 194 | static inline int pte_read(pte_t pte) { return pte.pte_low & _PAGE_READ; } |
178 | static inline int pte_write(pte_t pte) { return (pte).pte_low & _PAGE_WRITE; } | 195 | static inline int pte_write(pte_t pte) { return pte.pte_low & _PAGE_WRITE; } |
179 | static inline int pte_dirty(pte_t pte) { return (pte).pte_low & _PAGE_MODIFIED; } | 196 | static inline int pte_dirty(pte_t pte) { return pte.pte_low & _PAGE_MODIFIED; } |
180 | static inline int pte_young(pte_t pte) { return (pte).pte_low & _PAGE_ACCESSED; } | 197 | static inline int pte_young(pte_t pte) { return pte.pte_low & _PAGE_ACCESSED; } |
181 | static inline int pte_file(pte_t pte) { return (pte).pte_low & _PAGE_FILE; } | 198 | static inline int pte_file(pte_t pte) { return pte.pte_low & _PAGE_FILE; } |
199 | |||
182 | static inline pte_t pte_wrprotect(pte_t pte) | 200 | static inline pte_t pte_wrprotect(pte_t pte) |
183 | { | 201 | { |
184 | (pte).pte_low &= ~(_PAGE_WRITE | _PAGE_SILENT_WRITE); | 202 | pte.pte_low &= ~(_PAGE_WRITE | _PAGE_SILENT_WRITE); |
185 | (pte).pte_high &= ~_PAGE_SILENT_WRITE; | 203 | pte.pte_high &= ~_PAGE_SILENT_WRITE; |
186 | return pte; | 204 | return pte; |
187 | } | 205 | } |
188 | 206 | ||
189 | static inline pte_t pte_rdprotect(pte_t pte) | 207 | static inline pte_t pte_rdprotect(pte_t pte) |
190 | { | 208 | { |
191 | (pte).pte_low &= ~(_PAGE_READ | _PAGE_SILENT_READ); | 209 | pte.pte_low &= ~(_PAGE_READ | _PAGE_SILENT_READ); |
192 | (pte).pte_high &= ~_PAGE_SILENT_READ; | 210 | pte.pte_high &= ~_PAGE_SILENT_READ; |
193 | return pte; | 211 | return pte; |
194 | } | 212 | } |
195 | 213 | ||
196 | static inline pte_t pte_mkclean(pte_t pte) | 214 | static inline pte_t pte_mkclean(pte_t pte) |
197 | { | 215 | { |
198 | (pte).pte_low &= ~(_PAGE_MODIFIED|_PAGE_SILENT_WRITE); | 216 | pte.pte_low &= ~(_PAGE_MODIFIED | _PAGE_SILENT_WRITE); |
199 | (pte).pte_high &= ~_PAGE_SILENT_WRITE; | 217 | pte.pte_high &= ~_PAGE_SILENT_WRITE; |
200 | return pte; | 218 | return pte; |
201 | } | 219 | } |
202 | 220 | ||
203 | static inline pte_t pte_mkold(pte_t pte) | 221 | static inline pte_t pte_mkold(pte_t pte) |
204 | { | 222 | { |
205 | (pte).pte_low &= ~(_PAGE_ACCESSED|_PAGE_SILENT_READ); | 223 | pte.pte_low &= ~(_PAGE_ACCESSED | _PAGE_SILENT_READ); |
206 | (pte).pte_high &= ~_PAGE_SILENT_READ; | 224 | pte.pte_high &= ~_PAGE_SILENT_READ; |
207 | return pte; | 225 | return pte; |
208 | } | 226 | } |
209 | 227 | ||
210 | static inline pte_t pte_mkwrite(pte_t pte) | 228 | static inline pte_t pte_mkwrite(pte_t pte) |
211 | { | 229 | { |
212 | (pte).pte_low |= _PAGE_WRITE; | 230 | pte.pte_low |= _PAGE_WRITE; |
213 | if ((pte).pte_low & _PAGE_MODIFIED) { | 231 | if (pte.pte_low & _PAGE_MODIFIED) { |
214 | (pte).pte_low |= _PAGE_SILENT_WRITE; | 232 | pte.pte_low |= _PAGE_SILENT_WRITE; |
215 | (pte).pte_high |= _PAGE_SILENT_WRITE; | 233 | pte.pte_high |= _PAGE_SILENT_WRITE; |
216 | } | 234 | } |
217 | return pte; | 235 | return pte; |
218 | } | 236 | } |
219 | 237 | ||
220 | static inline pte_t pte_mkread(pte_t pte) | 238 | static inline pte_t pte_mkread(pte_t pte) |
221 | { | 239 | { |
222 | (pte).pte_low |= _PAGE_READ; | 240 | pte.pte_low |= _PAGE_READ; |
223 | if ((pte).pte_low & _PAGE_ACCESSED) { | 241 | if (pte.pte_low & _PAGE_ACCESSED) { |
224 | (pte).pte_low |= _PAGE_SILENT_READ; | 242 | pte.pte_low |= _PAGE_SILENT_READ; |
225 | (pte).pte_high |= _PAGE_SILENT_READ; | 243 | pte.pte_high |= _PAGE_SILENT_READ; |
226 | } | 244 | } |
227 | return pte; | 245 | return pte; |
228 | } | 246 | } |
229 | 247 | ||
230 | static inline pte_t pte_mkdirty(pte_t pte) | 248 | static inline pte_t pte_mkdirty(pte_t pte) |
231 | { | 249 | { |
232 | (pte).pte_low |= _PAGE_MODIFIED; | 250 | pte.pte_low |= _PAGE_MODIFIED; |
233 | if ((pte).pte_low & _PAGE_WRITE) { | 251 | if (pte.pte_low & _PAGE_WRITE) { |
234 | (pte).pte_low |= _PAGE_SILENT_WRITE; | 252 | pte.pte_low |= _PAGE_SILENT_WRITE; |
235 | (pte).pte_high |= _PAGE_SILENT_WRITE; | 253 | pte.pte_high |= _PAGE_SILENT_WRITE; |
236 | } | 254 | } |
237 | return pte; | 255 | return pte; |
238 | } | 256 | } |
239 | 257 | ||
240 | static inline pte_t pte_mkyoung(pte_t pte) | 258 | static inline pte_t pte_mkyoung(pte_t pte) |
241 | { | 259 | { |
242 | (pte).pte_low |= _PAGE_ACCESSED; | 260 | pte.pte_low |= _PAGE_ACCESSED; |
243 | if ((pte).pte_low & _PAGE_READ) | 261 | if (pte.pte_low & _PAGE_READ) |
244 | (pte).pte_low |= _PAGE_SILENT_READ; | 262 | pte.pte_low |= _PAGE_SILENT_READ; |
245 | (pte).pte_high |= _PAGE_SILENT_READ; | 263 | pte.pte_high |= _PAGE_SILENT_READ; |
246 | return pte; | 264 | return pte; |
247 | } | 265 | } |
248 | #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 { | |||
55 | struct sigcontext { | 55 | struct 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/asm-powerpc/termbits.h b/include/asm-powerpc/termbits.h index ebf6055481dc..6d533b07aaf5 100644 --- a/include/asm-powerpc/termbits.h +++ b/include/asm-powerpc/termbits.h | |||
@@ -153,6 +153,7 @@ struct termios { | |||
153 | #define HUPCL 00040000 | 153 | #define HUPCL 00040000 |
154 | 154 | ||
155 | #define CLOCAL 00100000 | 155 | #define CLOCAL 00100000 |
156 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | ||
156 | #define CRTSCTS 020000000000 /* flow control */ | 157 | #define CRTSCTS 020000000000 /* flow control */ |
157 | 158 | ||
158 | /* c_lflag bits */ | 159 | /* c_lflag bits */ |
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h index c44e7466534e..cd464f469a2c 100644 --- a/include/asm-sparc64/pgtable.h +++ b/include/asm-sparc64/pgtable.h | |||
@@ -689,6 +689,23 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *p | |||
689 | #define pte_clear(mm,addr,ptep) \ | 689 | #define pte_clear(mm,addr,ptep) \ |
690 | set_pte_at((mm), (addr), (ptep), __pte(0UL)) | 690 | set_pte_at((mm), (addr), (ptep), __pte(0UL)) |
691 | 691 | ||
692 | #ifdef DCACHE_ALIASING_POSSIBLE | ||
693 | #define __HAVE_ARCH_MOVE_PTE | ||
694 | #define move_pte(pte, prot, old_addr, new_addr) \ | ||
695 | ({ \ | ||
696 | pte_t newpte = (pte); \ | ||
697 | if (tlb_type != hypervisor && pte_present(pte)) { \ | ||
698 | unsigned long this_pfn = pte_pfn(pte); \ | ||
699 | \ | ||
700 | if (pfn_valid(this_pfn) && \ | ||
701 | (((old_addr) ^ (new_addr)) & (1 << 13))) \ | ||
702 | flush_dcache_page_all(current->mm, \ | ||
703 | pfn_to_page(this_pfn)); \ | ||
704 | } \ | ||
705 | newpte; \ | ||
706 | }) | ||
707 | #endif | ||
708 | |||
692 | extern pgd_t swapper_pg_dir[2048]; | 709 | extern pgd_t swapper_pg_dir[2048]; |
693 | extern pmd_t swapper_low_pmd_dir[2048]; | 710 | extern pmd_t swapper_low_pmd_dir[2048]; |
694 | 711 | ||
diff --git a/include/asm-x86_64/elf.h b/include/asm-x86_64/elf.h index c98633af07d2..b4f8f4a41a6e 100644 --- a/include/asm-x86_64/elf.h +++ b/include/asm-x86_64/elf.h | |||
@@ -159,7 +159,7 @@ extern int dump_task_fpu (struct task_struct *, elf_fpregset_t *); | |||
159 | #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs) | 159 | #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs) |
160 | 160 | ||
161 | /* 1GB for 64bit, 8MB for 32bit */ | 161 | /* 1GB for 64bit, 8MB for 32bit */ |
162 | #define STACK_RND_MASK (is_compat_task() ? 0x7ff : 0x3fffff) | 162 | #define STACK_RND_MASK (test_thread_flag(TIF_IA32) ? 0x7ff : 0x3fffff) |
163 | 163 | ||
164 | #endif | 164 | #endif |
165 | 165 | ||
diff --git a/include/linux/input.h b/include/linux/input.h index 50e338d2ffda..ce1a756c4c30 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -345,6 +345,8 @@ struct input_absinfo { | |||
345 | #define KEY_SAVE 234 | 345 | #define KEY_SAVE 234 |
346 | #define KEY_DOCUMENTS 235 | 346 | #define KEY_DOCUMENTS 235 |
347 | 347 | ||
348 | #define KEY_BATTERY 236 | ||
349 | |||
348 | #define KEY_UNKNOWN 240 | 350 | #define KEY_UNKNOWN 240 |
349 | 351 | ||
350 | #define BTN_MISC 0x100 | 352 | #define BTN_MISC 0x100 |
@@ -577,14 +579,9 @@ struct input_absinfo { | |||
577 | * Switch events | 579 | * Switch events |
578 | */ | 580 | */ |
579 | 581 | ||
580 | #define SW_0 0x00 | 582 | #define SW_LID 0x00 /* set = lid shut */ |
581 | #define SW_1 0x01 | 583 | #define SW_TABLET_MODE 0x01 /* set = tablet mode */ |
582 | #define SW_2 0x02 | 584 | #define SW_HEADPHONE_INSERT 0x02 /* set = inserted */ |
583 | #define SW_3 0x03 | ||
584 | #define SW_4 0x04 | ||
585 | #define SW_5 0x05 | ||
586 | #define SW_6 0x06 | ||
587 | #define SW_7 0x07 | ||
588 | #define SW_MAX 0x0f | 585 | #define SW_MAX 0x0f |
589 | 586 | ||
590 | /* | 587 | /* |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index d6fe048376ab..590dc6dca315 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1231,6 +1231,7 @@ | |||
1231 | #define PCI_DEVICE_ID_VIA_8380_0 0x0204 | 1231 | #define PCI_DEVICE_ID_VIA_8380_0 0x0204 |
1232 | #define PCI_DEVICE_ID_VIA_3238_0 0x0238 | 1232 | #define PCI_DEVICE_ID_VIA_3238_0 0x0238 |
1233 | #define PCI_DEVICE_ID_VIA_PT880 0x0258 | 1233 | #define PCI_DEVICE_ID_VIA_PT880 0x0258 |
1234 | #define PCI_DEVICE_ID_VIA_PT880ULTRA 0x0308 | ||
1234 | #define PCI_DEVICE_ID_VIA_PX8X0_0 0x0259 | 1235 | #define PCI_DEVICE_ID_VIA_PX8X0_0 0x0259 |
1235 | #define PCI_DEVICE_ID_VIA_3269_0 0x0269 | 1236 | #define PCI_DEVICE_ID_VIA_3269_0 0x0269 |
1236 | #define PCI_DEVICE_ID_VIA_K8T800PRO_0 0x0282 | 1237 | #define PCI_DEVICE_ID_VIA_K8T800PRO_0 0x0282 |
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); | |||
73 | int vt_waitactive(int vt); | 73 | int vt_waitactive(int vt); |
74 | void change_console(struct vc_data *new_vc); | 74 | void change_console(struct vc_data *new_vc); |
75 | void reset_vc(struct vc_data *vc); | 75 | void reset_vc(struct vc_data *vc); |
76 | #ifdef CONFIG_VT | ||
77 | int is_console_suspend_safe(void); | ||
78 | #else | ||
79 | static 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 | ||
6 | struct 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 | ||
26 | struct sock; | ||
27 | extern int compat_sock_get_timestamp(struct sock *, struct timeval __user *); | 28 | extern int compat_sock_get_timestamp(struct sock *, struct timeval __user *); |
28 | 29 | ||
29 | #else /* defined(CONFIG_COMPAT) */ | 30 | #else /* defined(CONFIG_COMPAT) */ |