diff options
author | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-11-22 13:06:44 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-11-22 13:06:44 -0500 |
commit | 0bd2af46839ad6262d25714a6ec0365db9d6b98f (patch) | |
tree | dcced72d230d69fd0c5816ac6dd03ab84799a93e /include/asm-s390 | |
parent | e138a5d2356729b8752e88520cc1525fae9794ac (diff) | |
parent | f26b90440cd74c78fe10c9bd5160809704a9627c (diff) |
Merge ../scsi-rc-fixes-2.6
Diffstat (limited to 'include/asm-s390')
-rw-r--r-- | include/asm-s390/cio.h | 6 | ||||
-rw-r--r-- | include/asm-s390/pgtable.h | 50 | ||||
-rw-r--r-- | include/asm-s390/timer.h | 2 | ||||
-rw-r--r-- | include/asm-s390/unistd.h | 3 |
4 files changed, 49 insertions, 12 deletions
diff --git a/include/asm-s390/cio.h b/include/asm-s390/cio.h index da063cd5f0a0..81287d86329d 100644 --- a/include/asm-s390/cio.h +++ b/include/asm-s390/cio.h | |||
@@ -275,6 +275,12 @@ struct ccw_dev_id { | |||
275 | u16 devno; | 275 | u16 devno; |
276 | }; | 276 | }; |
277 | 277 | ||
278 | static inline int ccw_dev_id_is_equal(struct ccw_dev_id *dev_id1, | ||
279 | struct ccw_dev_id *dev_id2) | ||
280 | { | ||
281 | return !memcmp(dev_id1, dev_id2, sizeof(struct ccw_dev_id)); | ||
282 | } | ||
283 | |||
278 | extern int diag210(struct diag210 *addr); | 284 | extern int diag210(struct diag210 *addr); |
279 | 285 | ||
280 | extern void wait_cons_dev(void); | 286 | extern void wait_cons_dev(void); |
diff --git a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h index 519f0a5ff181..36bb6dacf008 100644 --- a/include/asm-s390/pgtable.h +++ b/include/asm-s390/pgtable.h | |||
@@ -200,18 +200,45 @@ extern char empty_zero_page[PAGE_SIZE]; | |||
200 | */ | 200 | */ |
201 | 201 | ||
202 | /* Hardware bits in the page table entry */ | 202 | /* Hardware bits in the page table entry */ |
203 | #define _PAGE_RO 0x200 /* HW read-only */ | 203 | #define _PAGE_RO 0x200 /* HW read-only bit */ |
204 | #define _PAGE_INVALID 0x400 /* HW invalid */ | 204 | #define _PAGE_INVALID 0x400 /* HW invalid bit */ |
205 | #define _PAGE_SWT 0x001 /* SW pte type bit t */ | ||
206 | #define _PAGE_SWX 0x002 /* SW pte type bit x */ | ||
205 | 207 | ||
206 | /* Mask and six different types of pages. */ | 208 | /* Six different types of pages. */ |
207 | #define _PAGE_TYPE_MASK 0x601 | ||
208 | #define _PAGE_TYPE_EMPTY 0x400 | 209 | #define _PAGE_TYPE_EMPTY 0x400 |
209 | #define _PAGE_TYPE_NONE 0x401 | 210 | #define _PAGE_TYPE_NONE 0x401 |
210 | #define _PAGE_TYPE_SWAP 0x600 | 211 | #define _PAGE_TYPE_SWAP 0x403 |
211 | #define _PAGE_TYPE_FILE 0x601 | 212 | #define _PAGE_TYPE_FILE 0x601 /* bit 0x002 is used for offset !! */ |
212 | #define _PAGE_TYPE_RO 0x200 | 213 | #define _PAGE_TYPE_RO 0x200 |
213 | #define _PAGE_TYPE_RW 0x000 | 214 | #define _PAGE_TYPE_RW 0x000 |
214 | 215 | ||
216 | /* | ||
217 | * PTE type bits are rather complicated. handle_pte_fault uses pte_present, | ||
218 | * pte_none and pte_file to find out the pte type WITHOUT holding the page | ||
219 | * table lock. ptep_clear_flush on the other hand uses ptep_clear_flush to | ||
220 | * invalidate a given pte. ipte sets the hw invalid bit and clears all tlbs | ||
221 | * for the page. The page table entry is set to _PAGE_TYPE_EMPTY afterwards. | ||
222 | * This change is done while holding the lock, but the intermediate step | ||
223 | * of a previously valid pte with the hw invalid bit set can be observed by | ||
224 | * handle_pte_fault. That makes it necessary that all valid pte types with | ||
225 | * the hw invalid bit set must be distinguishable from the four pte types | ||
226 | * empty, none, swap and file. | ||
227 | * | ||
228 | * irxt ipte irxt | ||
229 | * _PAGE_TYPE_EMPTY 1000 -> 1000 | ||
230 | * _PAGE_TYPE_NONE 1001 -> 1001 | ||
231 | * _PAGE_TYPE_SWAP 1011 -> 1011 | ||
232 | * _PAGE_TYPE_FILE 11?1 -> 11?1 | ||
233 | * _PAGE_TYPE_RO 0100 -> 1100 | ||
234 | * _PAGE_TYPE_RW 0000 -> 1000 | ||
235 | * | ||
236 | * pte_none is true for bits combinations 1000, 1100 | ||
237 | * pte_present is true for bits combinations 0000, 0010, 0100, 0110, 1001 | ||
238 | * pte_file is true for bits combinations 1101, 1111 | ||
239 | * swap pte is 1011 and 0001, 0011, 0101, 0111, 1010 and 1110 are invalid. | ||
240 | */ | ||
241 | |||
215 | #ifndef __s390x__ | 242 | #ifndef __s390x__ |
216 | 243 | ||
217 | /* Bits in the segment table entry */ | 244 | /* Bits in the segment table entry */ |
@@ -365,18 +392,21 @@ static inline int pmd_bad(pmd_t pmd) | |||
365 | 392 | ||
366 | static inline int pte_none(pte_t pte) | 393 | static inline int pte_none(pte_t pte) |
367 | { | 394 | { |
368 | return (pte_val(pte) & _PAGE_TYPE_MASK) == _PAGE_TYPE_EMPTY; | 395 | return (pte_val(pte) & _PAGE_INVALID) && !(pte_val(pte) & _PAGE_SWT); |
369 | } | 396 | } |
370 | 397 | ||
371 | static inline int pte_present(pte_t pte) | 398 | static inline int pte_present(pte_t pte) |
372 | { | 399 | { |
373 | return !(pte_val(pte) & _PAGE_INVALID) || | 400 | unsigned long mask = _PAGE_RO | _PAGE_INVALID | _PAGE_SWT | _PAGE_SWX; |
374 | (pte_val(pte) & _PAGE_TYPE_MASK) == _PAGE_TYPE_NONE; | 401 | return (pte_val(pte) & mask) == _PAGE_TYPE_NONE || |
402 | (!(pte_val(pte) & _PAGE_INVALID) && | ||
403 | !(pte_val(pte) & _PAGE_SWT)); | ||
375 | } | 404 | } |
376 | 405 | ||
377 | static inline int pte_file(pte_t pte) | 406 | static inline int pte_file(pte_t pte) |
378 | { | 407 | { |
379 | return (pte_val(pte) & _PAGE_TYPE_MASK) == _PAGE_TYPE_FILE; | 408 | unsigned long mask = _PAGE_RO | _PAGE_INVALID | _PAGE_SWT; |
409 | return (pte_val(pte) & mask) == _PAGE_TYPE_FILE; | ||
380 | } | 410 | } |
381 | 411 | ||
382 | #define pte_same(a,b) (pte_val(a) == pte_val(b)) | 412 | #define pte_same(a,b) (pte_val(a) == pte_val(b)) |
diff --git a/include/asm-s390/timer.h b/include/asm-s390/timer.h index fcd6c256a2d1..30e5cbe570f2 100644 --- a/include/asm-s390/timer.h +++ b/include/asm-s390/timer.h | |||
@@ -26,7 +26,7 @@ struct vtimer_list { | |||
26 | spinlock_t lock; | 26 | spinlock_t lock; |
27 | unsigned long magic; | 27 | unsigned long magic; |
28 | 28 | ||
29 | void (*function)(unsigned long, struct pt_regs*); | 29 | void (*function)(unsigned long); |
30 | unsigned long data; | 30 | unsigned long data; |
31 | }; | 31 | }; |
32 | 32 | ||
diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h index a19238cbcffa..71d3c21b84f0 100644 --- a/include/asm-s390/unistd.h +++ b/include/asm-s390/unistd.h | |||
@@ -249,8 +249,9 @@ | |||
249 | #define __NR_vmsplice 309 | 249 | #define __NR_vmsplice 309 |
250 | /* Number 310 is reserved for new sys_move_pages */ | 250 | /* Number 310 is reserved for new sys_move_pages */ |
251 | #define __NR_getcpu 311 | 251 | #define __NR_getcpu 311 |
252 | #define __NR_epoll_pwait 312 | ||
252 | 253 | ||
253 | #define NR_syscalls 312 | 254 | #define NR_syscalls 313 |
254 | 255 | ||
255 | /* | 256 | /* |
256 | * There are some system calls that are not present on 64 bit, some | 257 | * There are some system calls that are not present on 64 bit, some |