aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-ia64/io.h4
-rw-r--r--include/asm-ia64/pal.h11
-rw-r--r--include/asm-s390/pgtable.h50
-rw-r--r--include/asm-s390/unistd.h3
4 files changed, 46 insertions, 22 deletions
diff --git a/include/asm-ia64/io.h b/include/asm-ia64/io.h
index 43bfff6c6b87..855c30af72a9 100644
--- a/include/asm-ia64/io.h
+++ b/include/asm-ia64/io.h
@@ -417,6 +417,8 @@ __writeq (unsigned long val, volatile void __iomem *addr)
417# define outl_p outl 417# define outl_p outl
418#endif 418#endif
419 419
420# ifdef __KERNEL__
421
420extern void __iomem * ioremap(unsigned long offset, unsigned long size); 422extern void __iomem * ioremap(unsigned long offset, unsigned long size);
421extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size); 423extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size);
422 424
@@ -430,8 +432,6 @@ iounmap (volatile void __iomem *addr)
430#define dmi_iounmap(x,l) iounmap(x) 432#define dmi_iounmap(x,l) iounmap(x)
431#define dmi_alloc(l) kmalloc(l, GFP_ATOMIC) 433#define dmi_alloc(l) kmalloc(l, GFP_ATOMIC)
432 434
433# ifdef __KERNEL__
434
435/* 435/*
436 * String version of IO memory access ops: 436 * String version of IO memory access ops:
437 */ 437 */
diff --git a/include/asm-ia64/pal.h b/include/asm-ia64/pal.h
index 2c8fd92d0ece..4283ddcc25fb 100644
--- a/include/asm-ia64/pal.h
+++ b/include/asm-ia64/pal.h
@@ -764,7 +764,7 @@ struct ia64_pal_retval {
764 * (generally 0) MUST be passed. Reserved parameters are not optional 764 * (generally 0) MUST be passed. Reserved parameters are not optional
765 * parameters. 765 * parameters.
766 */ 766 */
767extern struct ia64_pal_retval ia64_pal_call_static (u64, u64, u64, u64, u64); 767extern struct ia64_pal_retval ia64_pal_call_static (u64, u64, u64, u64);
768extern struct ia64_pal_retval ia64_pal_call_stacked (u64, u64, u64, u64); 768extern struct ia64_pal_retval ia64_pal_call_stacked (u64, u64, u64, u64);
769extern struct ia64_pal_retval ia64_pal_call_phys_static (u64, u64, u64, u64); 769extern struct ia64_pal_retval ia64_pal_call_phys_static (u64, u64, u64, u64);
770extern struct ia64_pal_retval ia64_pal_call_phys_stacked (u64, u64, u64, u64); 770extern struct ia64_pal_retval ia64_pal_call_phys_stacked (u64, u64, u64, u64);
@@ -774,14 +774,7 @@ extern void ia64_load_scratch_fpregs (struct ia64_fpreg *);
774#define PAL_CALL(iprv,a0,a1,a2,a3) do { \ 774#define PAL_CALL(iprv,a0,a1,a2,a3) do { \
775 struct ia64_fpreg fr[6]; \ 775 struct ia64_fpreg fr[6]; \
776 ia64_save_scratch_fpregs(fr); \ 776 ia64_save_scratch_fpregs(fr); \
777 iprv = ia64_pal_call_static(a0, a1, a2, a3, 0); \ 777 iprv = ia64_pal_call_static(a0, a1, a2, a3); \
778 ia64_load_scratch_fpregs(fr); \
779} while (0)
780
781#define PAL_CALL_IC_OFF(iprv,a0,a1,a2,a3) do { \
782 struct ia64_fpreg fr[6]; \
783 ia64_save_scratch_fpregs(fr); \
784 iprv = ia64_pal_call_static(a0, a1, a2, a3, 1); \
785 ia64_load_scratch_fpregs(fr); \ 778 ia64_load_scratch_fpregs(fr); \
786} while (0) 779} while (0)
787 780
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
366static inline int pte_none(pte_t pte) 393static 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
371static inline int pte_present(pte_t pte) 398static 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
377static inline int pte_file(pte_t pte) 406static 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/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