diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-12-07 15:48:15 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-12-07 15:48:15 -0500 |
commit | 34161db6b14d984fb9b06c735b7b42f8803f6851 (patch) | |
tree | 99656278b6697f1cde5b05894b7c0ee22c63a00e /include/asm-sh/pgtable-2level.h | |
parent | 5847e1f4d058677c5e46dc6c3e3c70e8855ea3ba (diff) | |
parent | 620034c84d1d939717bdfbe02c51a3fee43541c3 (diff) |
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/ into merge_linus
Conflicts:
include/linux/sunrpc/xprt.h
net/sunrpc/xprtsock.c
Fix up conflicts with the workqueue changes.
Diffstat (limited to 'include/asm-sh/pgtable-2level.h')
-rw-r--r-- | include/asm-sh/pgtable-2level.h | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/include/asm-sh/pgtable-2level.h b/include/asm-sh/pgtable-2level.h deleted file mode 100644 index b525db6f61c6..000000000000 --- a/include/asm-sh/pgtable-2level.h +++ /dev/null | |||
@@ -1,70 +0,0 @@ | |||
1 | #ifndef __ASM_SH_PGTABLE_2LEVEL_H | ||
2 | #define __ASM_SH_PGTABLE_2LEVEL_H | ||
3 | |||
4 | /* | ||
5 | * traditional two-level paging structure: | ||
6 | */ | ||
7 | |||
8 | #define PGDIR_SHIFT 22 | ||
9 | #define PTRS_PER_PGD 1024 | ||
10 | |||
11 | /* | ||
12 | * this is two-level, so we don't really have any | ||
13 | * PMD directory physically. | ||
14 | */ | ||
15 | #define PMD_SHIFT 22 | ||
16 | #define PTRS_PER_PMD 1 | ||
17 | |||
18 | #define PTRS_PER_PTE 1024 | ||
19 | |||
20 | #ifndef __ASSEMBLY__ | ||
21 | #define pte_ERROR(e) \ | ||
22 | printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e)) | ||
23 | #define pmd_ERROR(e) \ | ||
24 | printk("%s:%d: bad pmd %08lx.\n", __FILE__, __LINE__, pmd_val(e)) | ||
25 | #define pgd_ERROR(e) \ | ||
26 | printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e)) | ||
27 | |||
28 | /* | ||
29 | * The "pgd_xxx()" functions here are trivial for a folded two-level | ||
30 | * setup: the pgd is never bad, and a pmd always exists (as it's folded | ||
31 | * into the pgd entry) | ||
32 | */ | ||
33 | static inline int pgd_none(pgd_t pgd) { return 0; } | ||
34 | static inline int pgd_bad(pgd_t pgd) { return 0; } | ||
35 | static inline int pgd_present(pgd_t pgd) { return 1; } | ||
36 | static inline void pgd_clear (pgd_t * pgdp) { } | ||
37 | |||
38 | /* | ||
39 | * Certain architectures need to do special things when PTEs | ||
40 | * within a page table are directly modified. Thus, the following | ||
41 | * hook is made available. | ||
42 | */ | ||
43 | #define set_pte(pteptr, pteval) (*(pteptr) = pteval) | ||
44 | #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) | ||
45 | |||
46 | /* | ||
47 | * (pmds are folded into pgds so this doesn't get actually called, | ||
48 | * but the define is needed for a generic inline function.) | ||
49 | */ | ||
50 | #define set_pmd(pmdptr, pmdval) (*(pmdptr) = pmdval) | ||
51 | #define set_pgd(pgdptr, pgdval) (*(pgdptr) = pgdval) | ||
52 | |||
53 | #define pgd_page_vaddr(pgd) \ | ||
54 | ((unsigned long) __va(pgd_val(pgd) & PAGE_MASK)) | ||
55 | |||
56 | #define pgd_page(pgd) \ | ||
57 | (phys_to_page(pgd_val(pgd))) | ||
58 | |||
59 | static inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address) | ||
60 | { | ||
61 | return (pmd_t *) dir; | ||
62 | } | ||
63 | |||
64 | #define pte_pfn(x) ((unsigned long)(((x).pte >> PAGE_SHIFT))) | ||
65 | #define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) | ||
66 | #define pfn_pmd(pfn, prot) __pmd(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) | ||
67 | |||
68 | #endif /* !__ASSEMBLY__ */ | ||
69 | |||
70 | #endif /* __ASM_SH_PGTABLE_2LEVEL_H */ | ||