diff options
Diffstat (limited to 'include/asm-s390/pgtable.h')
-rw-r--r-- | include/asm-s390/pgtable.h | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h index 9be741bb1496..859b5e969826 100644 --- a/include/asm-s390/pgtable.h +++ b/include/asm-s390/pgtable.h | |||
@@ -319,7 +319,7 @@ extern char empty_zero_page[PAGE_SIZE]; | |||
319 | * within a page table are directly modified. Thus, the following | 319 | * within a page table are directly modified. Thus, the following |
320 | * hook is made available. | 320 | * hook is made available. |
321 | */ | 321 | */ |
322 | extern inline void set_pte(pte_t *pteptr, pte_t pteval) | 322 | static inline void set_pte(pte_t *pteptr, pte_t pteval) |
323 | { | 323 | { |
324 | *pteptr = pteval; | 324 | *pteptr = pteval; |
325 | } | 325 | } |
@@ -330,63 +330,63 @@ extern inline void set_pte(pte_t *pteptr, pte_t pteval) | |||
330 | */ | 330 | */ |
331 | #ifndef __s390x__ | 331 | #ifndef __s390x__ |
332 | 332 | ||
333 | extern inline int pgd_present(pgd_t pgd) { return 1; } | 333 | static inline int pgd_present(pgd_t pgd) { return 1; } |
334 | extern inline int pgd_none(pgd_t pgd) { return 0; } | 334 | static inline int pgd_none(pgd_t pgd) { return 0; } |
335 | extern inline int pgd_bad(pgd_t pgd) { return 0; } | 335 | static inline int pgd_bad(pgd_t pgd) { return 0; } |
336 | 336 | ||
337 | extern inline int pmd_present(pmd_t pmd) { return pmd_val(pmd) & _SEG_PRESENT; } | 337 | static inline int pmd_present(pmd_t pmd) { return pmd_val(pmd) & _SEG_PRESENT; } |
338 | extern inline int pmd_none(pmd_t pmd) { return pmd_val(pmd) & _PAGE_TABLE_INV; } | 338 | static inline int pmd_none(pmd_t pmd) { return pmd_val(pmd) & _PAGE_TABLE_INV; } |
339 | extern inline int pmd_bad(pmd_t pmd) | 339 | static inline int pmd_bad(pmd_t pmd) |
340 | { | 340 | { |
341 | return (pmd_val(pmd) & (~PAGE_MASK & ~_PAGE_TABLE_INV)) != _PAGE_TABLE; | 341 | return (pmd_val(pmd) & (~PAGE_MASK & ~_PAGE_TABLE_INV)) != _PAGE_TABLE; |
342 | } | 342 | } |
343 | 343 | ||
344 | #else /* __s390x__ */ | 344 | #else /* __s390x__ */ |
345 | 345 | ||
346 | extern inline int pgd_present(pgd_t pgd) | 346 | static inline int pgd_present(pgd_t pgd) |
347 | { | 347 | { |
348 | return (pgd_val(pgd) & ~PAGE_MASK) == _PGD_ENTRY; | 348 | return (pgd_val(pgd) & ~PAGE_MASK) == _PGD_ENTRY; |
349 | } | 349 | } |
350 | 350 | ||
351 | extern inline int pgd_none(pgd_t pgd) | 351 | static inline int pgd_none(pgd_t pgd) |
352 | { | 352 | { |
353 | return pgd_val(pgd) & _PGD_ENTRY_INV; | 353 | return pgd_val(pgd) & _PGD_ENTRY_INV; |
354 | } | 354 | } |
355 | 355 | ||
356 | extern inline int pgd_bad(pgd_t pgd) | 356 | static inline int pgd_bad(pgd_t pgd) |
357 | { | 357 | { |
358 | return (pgd_val(pgd) & (~PAGE_MASK & ~_PGD_ENTRY_INV)) != _PGD_ENTRY; | 358 | return (pgd_val(pgd) & (~PAGE_MASK & ~_PGD_ENTRY_INV)) != _PGD_ENTRY; |
359 | } | 359 | } |
360 | 360 | ||
361 | extern inline int pmd_present(pmd_t pmd) | 361 | static inline int pmd_present(pmd_t pmd) |
362 | { | 362 | { |
363 | return (pmd_val(pmd) & ~PAGE_MASK) == _PMD_ENTRY; | 363 | return (pmd_val(pmd) & ~PAGE_MASK) == _PMD_ENTRY; |
364 | } | 364 | } |
365 | 365 | ||
366 | extern inline int pmd_none(pmd_t pmd) | 366 | static inline int pmd_none(pmd_t pmd) |
367 | { | 367 | { |
368 | return pmd_val(pmd) & _PMD_ENTRY_INV; | 368 | return pmd_val(pmd) & _PMD_ENTRY_INV; |
369 | } | 369 | } |
370 | 370 | ||
371 | extern inline int pmd_bad(pmd_t pmd) | 371 | static inline int pmd_bad(pmd_t pmd) |
372 | { | 372 | { |
373 | return (pmd_val(pmd) & (~PAGE_MASK & ~_PMD_ENTRY_INV)) != _PMD_ENTRY; | 373 | return (pmd_val(pmd) & (~PAGE_MASK & ~_PMD_ENTRY_INV)) != _PMD_ENTRY; |
374 | } | 374 | } |
375 | 375 | ||
376 | #endif /* __s390x__ */ | 376 | #endif /* __s390x__ */ |
377 | 377 | ||
378 | extern inline int pte_none(pte_t pte) | 378 | static inline int pte_none(pte_t pte) |
379 | { | 379 | { |
380 | return (pte_val(pte) & _PAGE_INVALID_MASK) == _PAGE_INVALID_EMPTY; | 380 | return (pte_val(pte) & _PAGE_INVALID_MASK) == _PAGE_INVALID_EMPTY; |
381 | } | 381 | } |
382 | 382 | ||
383 | extern inline int pte_present(pte_t pte) | 383 | static inline int pte_present(pte_t pte) |
384 | { | 384 | { |
385 | return !(pte_val(pte) & _PAGE_INVALID) || | 385 | return !(pte_val(pte) & _PAGE_INVALID) || |
386 | (pte_val(pte) & _PAGE_INVALID_MASK) == _PAGE_INVALID_NONE; | 386 | (pte_val(pte) & _PAGE_INVALID_MASK) == _PAGE_INVALID_NONE; |
387 | } | 387 | } |
388 | 388 | ||
389 | extern inline int pte_file(pte_t pte) | 389 | static inline int pte_file(pte_t pte) |
390 | { | 390 | { |
391 | return (pte_val(pte) & _PAGE_INVALID_MASK) == _PAGE_INVALID_FILE; | 391 | return (pte_val(pte) & _PAGE_INVALID_MASK) == _PAGE_INVALID_FILE; |
392 | } | 392 | } |
@@ -397,12 +397,12 @@ extern inline int pte_file(pte_t pte) | |||
397 | * query functions pte_write/pte_dirty/pte_young only work if | 397 | * query functions pte_write/pte_dirty/pte_young only work if |
398 | * pte_present() is true. Undefined behaviour if not.. | 398 | * pte_present() is true. Undefined behaviour if not.. |
399 | */ | 399 | */ |
400 | extern inline int pte_write(pte_t pte) | 400 | static inline int pte_write(pte_t pte) |
401 | { | 401 | { |
402 | return (pte_val(pte) & _PAGE_RO) == 0; | 402 | return (pte_val(pte) & _PAGE_RO) == 0; |
403 | } | 403 | } |
404 | 404 | ||
405 | extern inline int pte_dirty(pte_t pte) | 405 | static inline int pte_dirty(pte_t pte) |
406 | { | 406 | { |
407 | /* A pte is neither clean nor dirty on s/390. The dirty bit | 407 | /* A pte is neither clean nor dirty on s/390. The dirty bit |
408 | * is in the storage key. See page_test_and_clear_dirty for | 408 | * is in the storage key. See page_test_and_clear_dirty for |
@@ -411,7 +411,7 @@ extern inline int pte_dirty(pte_t pte) | |||
411 | return 0; | 411 | return 0; |
412 | } | 412 | } |
413 | 413 | ||
414 | extern inline int pte_young(pte_t pte) | 414 | static inline int pte_young(pte_t pte) |
415 | { | 415 | { |
416 | /* A pte is neither young nor old on s/390. The young bit | 416 | /* A pte is neither young nor old on s/390. The young bit |
417 | * is in the storage key. See page_test_and_clear_young for | 417 | * is in the storage key. See page_test_and_clear_young for |
@@ -420,7 +420,7 @@ extern inline int pte_young(pte_t pte) | |||
420 | return 0; | 420 | return 0; |
421 | } | 421 | } |
422 | 422 | ||
423 | extern inline int pte_read(pte_t pte) | 423 | static inline int pte_read(pte_t pte) |
424 | { | 424 | { |
425 | /* All pages are readable since we don't use the fetch | 425 | /* All pages are readable since we don't use the fetch |
426 | * protection bit in the storage key. | 426 | * protection bit in the storage key. |
@@ -434,9 +434,9 @@ extern inline int pte_read(pte_t pte) | |||
434 | 434 | ||
435 | #ifndef __s390x__ | 435 | #ifndef __s390x__ |
436 | 436 | ||
437 | extern inline void pgd_clear(pgd_t * pgdp) { } | 437 | static inline void pgd_clear(pgd_t * pgdp) { } |
438 | 438 | ||
439 | extern inline void pmd_clear(pmd_t * pmdp) | 439 | static inline void pmd_clear(pmd_t * pmdp) |
440 | { | 440 | { |
441 | pmd_val(pmdp[0]) = _PAGE_TABLE_INV; | 441 | pmd_val(pmdp[0]) = _PAGE_TABLE_INV; |
442 | pmd_val(pmdp[1]) = _PAGE_TABLE_INV; | 442 | pmd_val(pmdp[1]) = _PAGE_TABLE_INV; |
@@ -446,12 +446,12 @@ extern inline void pmd_clear(pmd_t * pmdp) | |||
446 | 446 | ||
447 | #else /* __s390x__ */ | 447 | #else /* __s390x__ */ |
448 | 448 | ||
449 | extern inline void pgd_clear(pgd_t * pgdp) | 449 | static inline void pgd_clear(pgd_t * pgdp) |
450 | { | 450 | { |
451 | pgd_val(*pgdp) = _PGD_ENTRY_INV | _PGD_ENTRY; | 451 | pgd_val(*pgdp) = _PGD_ENTRY_INV | _PGD_ENTRY; |
452 | } | 452 | } |
453 | 453 | ||
454 | extern inline void pmd_clear(pmd_t * pmdp) | 454 | static inline void pmd_clear(pmd_t * pmdp) |
455 | { | 455 | { |
456 | pmd_val(*pmdp) = _PMD_ENTRY_INV | _PMD_ENTRY; | 456 | pmd_val(*pmdp) = _PMD_ENTRY_INV | _PMD_ENTRY; |
457 | pmd_val1(*pmdp) = _PMD_ENTRY_INV | _PMD_ENTRY; | 457 | pmd_val1(*pmdp) = _PMD_ENTRY_INV | _PMD_ENTRY; |
@@ -459,7 +459,7 @@ extern inline void pmd_clear(pmd_t * pmdp) | |||
459 | 459 | ||
460 | #endif /* __s390x__ */ | 460 | #endif /* __s390x__ */ |
461 | 461 | ||
462 | extern inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) | 462 | static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) |
463 | { | 463 | { |
464 | pte_val(*ptep) = _PAGE_INVALID_EMPTY; | 464 | pte_val(*ptep) = _PAGE_INVALID_EMPTY; |
465 | } | 465 | } |
@@ -468,14 +468,14 @@ extern inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *pt | |||
468 | * The following pte modification functions only work if | 468 | * The following pte modification functions only work if |
469 | * pte_present() is true. Undefined behaviour if not.. | 469 | * pte_present() is true. Undefined behaviour if not.. |
470 | */ | 470 | */ |
471 | extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 471 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
472 | { | 472 | { |
473 | pte_val(pte) &= PAGE_MASK; | 473 | pte_val(pte) &= PAGE_MASK; |
474 | pte_val(pte) |= pgprot_val(newprot); | 474 | pte_val(pte) |= pgprot_val(newprot); |
475 | return pte; | 475 | return pte; |
476 | } | 476 | } |
477 | 477 | ||
478 | extern inline pte_t pte_wrprotect(pte_t pte) | 478 | static inline pte_t pte_wrprotect(pte_t pte) |
479 | { | 479 | { |
480 | /* Do not clobber _PAGE_INVALID_NONE pages! */ | 480 | /* Do not clobber _PAGE_INVALID_NONE pages! */ |
481 | if (!(pte_val(pte) & _PAGE_INVALID)) | 481 | if (!(pte_val(pte) & _PAGE_INVALID)) |
@@ -483,13 +483,13 @@ extern inline pte_t pte_wrprotect(pte_t pte) | |||
483 | return pte; | 483 | return pte; |
484 | } | 484 | } |
485 | 485 | ||
486 | extern inline pte_t pte_mkwrite(pte_t pte) | 486 | static inline pte_t pte_mkwrite(pte_t pte) |
487 | { | 487 | { |
488 | pte_val(pte) &= ~_PAGE_RO; | 488 | pte_val(pte) &= ~_PAGE_RO; |
489 | return pte; | 489 | return pte; |
490 | } | 490 | } |
491 | 491 | ||
492 | extern inline pte_t pte_mkclean(pte_t pte) | 492 | static inline pte_t pte_mkclean(pte_t pte) |
493 | { | 493 | { |
494 | /* The only user of pte_mkclean is the fork() code. | 494 | /* The only user of pte_mkclean is the fork() code. |
495 | We must *not* clear the *physical* page dirty bit | 495 | We must *not* clear the *physical* page dirty bit |
@@ -498,7 +498,7 @@ extern inline pte_t pte_mkclean(pte_t pte) | |||
498 | return pte; | 498 | return pte; |
499 | } | 499 | } |
500 | 500 | ||
501 | extern inline pte_t pte_mkdirty(pte_t pte) | 501 | static inline pte_t pte_mkdirty(pte_t pte) |
502 | { | 502 | { |
503 | /* We do not explicitly set the dirty bit because the | 503 | /* We do not explicitly set the dirty bit because the |
504 | * sske instruction is slow. It is faster to let the | 504 | * sske instruction is slow. It is faster to let the |
@@ -507,7 +507,7 @@ extern inline pte_t pte_mkdirty(pte_t pte) | |||
507 | return pte; | 507 | return pte; |
508 | } | 508 | } |
509 | 509 | ||
510 | extern inline pte_t pte_mkold(pte_t pte) | 510 | static inline pte_t pte_mkold(pte_t pte) |
511 | { | 511 | { |
512 | /* S/390 doesn't keep its dirty/referenced bit in the pte. | 512 | /* S/390 doesn't keep its dirty/referenced bit in the pte. |
513 | * There is no point in clearing the real referenced bit. | 513 | * There is no point in clearing the real referenced bit. |
@@ -515,7 +515,7 @@ extern inline pte_t pte_mkold(pte_t pte) | |||
515 | return pte; | 515 | return pte; |
516 | } | 516 | } |
517 | 517 | ||
518 | extern inline pte_t pte_mkyoung(pte_t pte) | 518 | static inline pte_t pte_mkyoung(pte_t pte) |
519 | { | 519 | { |
520 | /* S/390 doesn't keep its dirty/referenced bit in the pte. | 520 | /* S/390 doesn't keep its dirty/referenced bit in the pte. |
521 | * There is no point in setting the real referenced bit. | 521 | * There is no point in setting the real referenced bit. |
@@ -695,7 +695,7 @@ static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot) | |||
695 | #ifndef __s390x__ | 695 | #ifndef __s390x__ |
696 | 696 | ||
697 | /* Find an entry in the second-level page table.. */ | 697 | /* Find an entry in the second-level page table.. */ |
698 | extern inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address) | 698 | static inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address) |
699 | { | 699 | { |
700 | return (pmd_t *) dir; | 700 | return (pmd_t *) dir; |
701 | } | 701 | } |
@@ -758,7 +758,7 @@ extern inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address) | |||
758 | #else | 758 | #else |
759 | #define __SWP_OFFSET_MASK (~0UL >> 11) | 759 | #define __SWP_OFFSET_MASK (~0UL >> 11) |
760 | #endif | 760 | #endif |
761 | extern inline pte_t mk_swap_pte(unsigned long type, unsigned long offset) | 761 | static inline pte_t mk_swap_pte(unsigned long type, unsigned long offset) |
762 | { | 762 | { |
763 | pte_t pte; | 763 | pte_t pte; |
764 | offset &= __SWP_OFFSET_MASK; | 764 | offset &= __SWP_OFFSET_MASK; |