diff options
| author | Tejun Heo <htejun@gmail.com> | 2005-10-30 18:02:42 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-30 20:37:22 -0500 |
| commit | 1426d7a81dea8e9d85f9d69de85ab04ba37018ab (patch) | |
| tree | f2a7bbe0e60437cf73199b6003da677ee8ff0424 | |
| parent | c7e9dd4dd0b8dd75c410011b3c8f9980112fd0f8 (diff) | |
[PATCH] vm: remove unused/broken page_pte[_prot] macros
This patch removes page_pte_prot and page_pte macros from all
architectures. Some architectures define both, some only page_pte (broken)
and others none. These macros are not used anywhere.
page_pte_prot(page, prot) is identical to mk_pte(page, prot) and
page_pte(page) is identical to page_pte_prot(page, __pgprot(0)).
* The following architectures define both page_pte_prot and page_pte
arm, arm26, ia64, sh64, sparc, sparc64
* The following architectures define only page_pte (broken)
frv, i386, m32r, mips, sh, x86-64
* All other architectures define neither
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| -rw-r--r-- | include/asm-arm/pgtable.h | 3 | ||||
| -rw-r--r-- | include/asm-arm26/pgtable.h | 2 | ||||
| -rw-r--r-- | include/asm-frv/pgtable.h | 2 | ||||
| -rw-r--r-- | include/asm-i386/pgtable.h | 2 | ||||
| -rw-r--r-- | include/asm-ia64/pgtable.h | 3 | ||||
| -rw-r--r-- | include/asm-m32r/pgtable.h | 2 | ||||
| -rw-r--r-- | include/asm-mips/pgtable-64.h | 1 | ||||
| -rw-r--r-- | include/asm-mips/pgtable.h | 1 | ||||
| -rw-r--r-- | include/asm-sh/pgtable.h | 2 | ||||
| -rw-r--r-- | include/asm-sh64/pgtable.h | 3 | ||||
| -rw-r--r-- | include/asm-sparc/pgtable.h | 2 | ||||
| -rw-r--r-- | include/asm-sparc64/pgtable.h | 3 | ||||
| -rw-r--r-- | include/asm-x86_64/pgtable.h | 2 |
13 files changed, 0 insertions, 28 deletions
diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h index 366bafbdfbb1..5a0d19b466b0 100644 --- a/include/asm-arm/pgtable.h +++ b/include/asm-arm/pgtable.h | |||
| @@ -397,9 +397,6 @@ static inline pte_t *pmd_page_kernel(pmd_t pmd) | |||
| 397 | #define pgd_clear(pgdp) do { } while (0) | 397 | #define pgd_clear(pgdp) do { } while (0) |
| 398 | #define set_pgd(pgd,pgdp) do { } while (0) | 398 | #define set_pgd(pgd,pgdp) do { } while (0) |
| 399 | 399 | ||
| 400 | #define page_pte_prot(page,prot) mk_pte(page, prot) | ||
| 401 | #define page_pte(page) mk_pte(page, __pgprot(0)) | ||
| 402 | |||
| 403 | /* to find an entry in a page-table-directory */ | 400 | /* to find an entry in a page-table-directory */ |
| 404 | #define pgd_index(addr) ((addr) >> PGDIR_SHIFT) | 401 | #define pgd_index(addr) ((addr) >> PGDIR_SHIFT) |
| 405 | 402 | ||
diff --git a/include/asm-arm26/pgtable.h b/include/asm-arm26/pgtable.h index f602cf572411..a590250277f8 100644 --- a/include/asm-arm26/pgtable.h +++ b/include/asm-arm26/pgtable.h | |||
| @@ -98,8 +98,6 @@ extern struct page *empty_zero_page; | |||
| 98 | #define pfn_pte(pfn,prot) (__pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))) | 98 | #define pfn_pte(pfn,prot) (__pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))) |
| 99 | #define pages_to_mb(x) ((x) >> (20 - PAGE_SHIFT)) | 99 | #define pages_to_mb(x) ((x) >> (20 - PAGE_SHIFT)) |
| 100 | #define mk_pte(page,prot) pfn_pte(page_to_pfn(page),prot) | 100 | #define mk_pte(page,prot) pfn_pte(page_to_pfn(page),prot) |
| 101 | #define page_pte_prot(page,prot) mk_pte(page, prot) | ||
| 102 | #define page_pte(page) mk_pte(page, __pgprot(0)) | ||
| 103 | 101 | ||
| 104 | /* | 102 | /* |
| 105 | * Terminology: PGD = Page Directory, PMD = Page Middle Directory, | 103 | * Terminology: PGD = Page Directory, PMD = Page Middle Directory, |
diff --git a/include/asm-frv/pgtable.h b/include/asm-frv/pgtable.h index 473fb4bb6329..b247e99dff49 100644 --- a/include/asm-frv/pgtable.h +++ b/include/asm-frv/pgtable.h | |||
| @@ -436,8 +436,6 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
| 436 | return pte; | 436 | return pte; |
| 437 | } | 437 | } |
| 438 | 438 | ||
| 439 | #define page_pte(page) page_pte_prot((page), __pgprot(0)) | ||
| 440 | |||
| 441 | /* to find an entry in a page-table-directory. */ | 439 | /* to find an entry in a page-table-directory. */ |
| 442 | #define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1)) | 440 | #define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1)) |
| 443 | #define pgd_index_k(addr) pgd_index(addr) | 441 | #define pgd_index_k(addr) pgd_index(addr) |
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h index 38ec33eb6f12..03f3c8ac6383 100644 --- a/include/asm-i386/pgtable.h +++ b/include/asm-i386/pgtable.h | |||
| @@ -323,8 +323,6 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
| 323 | return pte; | 323 | return pte; |
| 324 | } | 324 | } |
| 325 | 325 | ||
| 326 | #define page_pte(page) page_pte_prot(page, __pgprot(0)) | ||
| 327 | |||
| 328 | #define pmd_large(pmd) \ | 326 | #define pmd_large(pmd) \ |
| 329 | ((pmd_val(pmd) & (_PAGE_PSE|_PAGE_PRESENT)) == (_PAGE_PSE|_PAGE_PRESENT)) | 327 | ((pmd_val(pmd) & (_PAGE_PSE|_PAGE_PRESENT)) == (_PAGE_PSE|_PAGE_PRESENT)) |
| 330 | 328 | ||
diff --git a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h index 3339c7b55a6f..21e32a06bc82 100644 --- a/include/asm-ia64/pgtable.h +++ b/include/asm-ia64/pgtable.h | |||
| @@ -236,9 +236,6 @@ ia64_phys_addr_valid (unsigned long addr) | |||
| 236 | #define pte_modify(_pte, newprot) \ | 236 | #define pte_modify(_pte, newprot) \ |
| 237 | (__pte((pte_val(_pte) & ~_PAGE_CHG_MASK) | (pgprot_val(newprot) & _PAGE_CHG_MASK))) | 237 | (__pte((pte_val(_pte) & ~_PAGE_CHG_MASK) | (pgprot_val(newprot) & _PAGE_CHG_MASK))) |
| 238 | 238 | ||
| 239 | #define page_pte_prot(page,prot) mk_pte(page, prot) | ||
| 240 | #define page_pte(page) page_pte_prot(page, __pgprot(0)) | ||
| 241 | |||
| 242 | #define pte_none(pte) (!pte_val(pte)) | 239 | #define pte_none(pte) (!pte_val(pte)) |
| 243 | #define pte_present(pte) (pte_val(pte) & (_PAGE_P | _PAGE_PROTNONE)) | 240 | #define pte_present(pte) (pte_val(pte) & (_PAGE_P | _PAGE_PROTNONE)) |
| 244 | #define pte_clear(mm,addr,pte) (pte_val(*(pte)) = 0UL) | 241 | #define pte_clear(mm,addr,pte) (pte_val(*(pte)) = 0UL) |
diff --git a/include/asm-m32r/pgtable.h b/include/asm-m32r/pgtable.h index 388e5ee9fa27..1cd5fd4a5b2c 100644 --- a/include/asm-m32r/pgtable.h +++ b/include/asm-m32r/pgtable.h | |||
| @@ -324,8 +324,6 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
| 324 | return pte; | 324 | return pte; |
| 325 | } | 325 | } |
| 326 | 326 | ||
| 327 | #define page_pte(page) page_pte_prot(page, __pgprot(0)) | ||
| 328 | |||
| 329 | /* | 327 | /* |
| 330 | * Conversion functions: convert a page and protection to a page entry, | 328 | * Conversion functions: convert a page and protection to a page entry, |
| 331 | * and a page entry and page directory to the page they refer to. | 329 | * and a page entry and page directory to the page they refer to. |
diff --git a/include/asm-mips/pgtable-64.h b/include/asm-mips/pgtable-64.h index 3e0a522c0f0e..82166b254b27 100644 --- a/include/asm-mips/pgtable-64.h +++ b/include/asm-mips/pgtable-64.h | |||
| @@ -169,7 +169,6 @@ static inline void pud_clear(pud_t *pudp) | |||
| 169 | #define __pgd_offset(address) pgd_index(address) | 169 | #define __pgd_offset(address) pgd_index(address) |
| 170 | #define __pud_offset(address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD-1)) | 170 | #define __pud_offset(address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD-1)) |
| 171 | #define __pmd_offset(address) pmd_index(address) | 171 | #define __pmd_offset(address) pmd_index(address) |
| 172 | #define page_pte(page) page_pte_prot(page, __pgprot(0)) | ||
| 173 | 172 | ||
| 174 | /* to find an entry in a kernel page-table-directory */ | 173 | /* to find an entry in a kernel page-table-directory */ |
| 175 | #define pgd_offset_k(address) pgd_offset(&init_mm, 0) | 174 | #define pgd_offset_k(address) pgd_offset(&init_mm, 0) |
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h index 1e8ae2723be4..34facd996503 100644 --- a/include/asm-mips/pgtable.h +++ b/include/asm-mips/pgtable.h | |||
| @@ -75,7 +75,6 @@ extern void paging_init(void); | |||
| 75 | * Conversion functions: convert a page and protection to a page entry, | 75 | * Conversion functions: convert a page and protection to a page entry, |
| 76 | * and a page entry and page directory to the page they refer to. | 76 | * and a page entry and page directory to the page they refer to. |
| 77 | */ | 77 | */ |
| 78 | #define page_pte(page) page_pte_prot(page, __pgprot(0)) | ||
| 79 | #define pmd_phys(pmd) (pmd_val(pmd) - PAGE_OFFSET) | 78 | #define pmd_phys(pmd) (pmd_val(pmd) - PAGE_OFFSET) |
| 80 | #define pmd_page(pmd) (pfn_to_page(pmd_phys(pmd) >> PAGE_SHIFT)) | 79 | #define pmd_page(pmd) (pfn_to_page(pmd_phys(pmd) >> PAGE_SHIFT)) |
| 81 | #define pmd_page_kernel(pmd) pmd_val(pmd) | 80 | #define pmd_page_kernel(pmd) pmd_val(pmd) |
diff --git a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h index 0f4bcaae61bd..aef8ae43de13 100644 --- a/include/asm-sh/pgtable.h +++ b/include/asm-sh/pgtable.h | |||
| @@ -224,8 +224,6 @@ static inline pgprot_t pgprot_noncached(pgprot_t _prot) | |||
| 224 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 224 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
| 225 | { set_pte(&pte, __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot))); return pte; } | 225 | { set_pte(&pte, __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot))); return pte; } |
| 226 | 226 | ||
| 227 | #define page_pte(page) page_pte_prot(page, __pgprot(0)) | ||
| 228 | |||
| 229 | #define pmd_page_kernel(pmd) \ | 227 | #define pmd_page_kernel(pmd) \ |
| 230 | ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) | 228 | ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) |
| 231 | 229 | ||
diff --git a/include/asm-sh64/pgtable.h b/include/asm-sh64/pgtable.h index 51db4307bfaf..51b05818e4eb 100644 --- a/include/asm-sh64/pgtable.h +++ b/include/asm-sh64/pgtable.h | |||
| @@ -457,9 +457,6 @@ extern inline pte_t pte_mkhuge(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _ | |||
| 457 | extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 457 | extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
| 458 | { set_pte(&pte, __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot))); return pte; } | 458 | { set_pte(&pte, __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot))); return pte; } |
| 459 | 459 | ||
| 460 | #define page_pte_prot(page, prot) mk_pte(page, prot) | ||
| 461 | #define page_pte(page) page_pte_prot(page, __pgprot(0)) | ||
| 462 | |||
| 463 | typedef pte_t *pte_addr_t; | 460 | typedef pte_t *pte_addr_t; |
| 464 | #define pgtable_cache_init() do { } while (0) | 461 | #define pgtable_cache_init() do { } while (0) |
| 465 | 462 | ||
diff --git a/include/asm-sparc/pgtable.h b/include/asm-sparc/pgtable.h index a14e98677500..b33c35411e82 100644 --- a/include/asm-sparc/pgtable.h +++ b/include/asm-sparc/pgtable.h | |||
| @@ -255,8 +255,6 @@ BTFIXUPDEF_CALL_CONST(pte_t, pte_mkyoung, pte_t) | |||
| 255 | #define pte_mkdirty(pte) BTFIXUP_CALL(pte_mkdirty)(pte) | 255 | #define pte_mkdirty(pte) BTFIXUP_CALL(pte_mkdirty)(pte) |
| 256 | #define pte_mkyoung(pte) BTFIXUP_CALL(pte_mkyoung)(pte) | 256 | #define pte_mkyoung(pte) BTFIXUP_CALL(pte_mkyoung)(pte) |
| 257 | 257 | ||
| 258 | #define page_pte_prot(page, prot) mk_pte(page, prot) | ||
| 259 | #define page_pte(page) mk_pte(page, __pgprot(0)) | ||
| 260 | #define pfn_pte(pfn, prot) mk_pte(pfn_to_page(pfn), prot) | 258 | #define pfn_pte(pfn, prot) mk_pte(pfn_to_page(pfn), prot) |
| 261 | 259 | ||
| 262 | BTFIXUPDEF_CALL(unsigned long, pte_pfn, pte_t) | 260 | BTFIXUPDEF_CALL(unsigned long, pte_pfn, pte_t) |
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h index 8c6dfc6c7af6..9a02879b235d 100644 --- a/include/asm-sparc64/pgtable.h +++ b/include/asm-sparc64/pgtable.h | |||
| @@ -231,9 +231,6 @@ extern struct page *mem_map_zero; | |||
| 231 | #define pte_pfn(x) ((pte_val(x) & _PAGE_PADDR)>>PAGE_SHIFT) | 231 | #define pte_pfn(x) ((pte_val(x) & _PAGE_PADDR)>>PAGE_SHIFT) |
| 232 | #define pte_page(x) pfn_to_page(pte_pfn(x)) | 232 | #define pte_page(x) pfn_to_page(pte_pfn(x)) |
| 233 | 233 | ||
| 234 | #define page_pte_prot(page, prot) mk_pte(page, prot) | ||
| 235 | #define page_pte(page) page_pte_prot(page, __pgprot(0)) | ||
| 236 | |||
| 237 | static inline pte_t pte_modify(pte_t orig_pte, pgprot_t new_prot) | 234 | static inline pte_t pte_modify(pte_t orig_pte, pgprot_t new_prot) |
| 238 | { | 235 | { |
| 239 | pte_t __pte; | 236 | pte_t __pte; |
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h index dd8711ecaf2f..7a07196a7202 100644 --- a/include/asm-x86_64/pgtable.h +++ b/include/asm-x86_64/pgtable.h | |||
| @@ -318,8 +318,6 @@ static inline int pmd_large(pmd_t pte) { | |||
| 318 | * and a page entry and page directory to the page they refer to. | 318 | * and a page entry and page directory to the page they refer to. |
| 319 | */ | 319 | */ |
| 320 | 320 | ||
| 321 | #define page_pte(page) page_pte_prot(page, __pgprot(0)) | ||
| 322 | |||
| 323 | /* | 321 | /* |
| 324 | * Level 4 access. | 322 | * Level 4 access. |
| 325 | */ | 323 | */ |
