ia64/linux-2.6.18-xen.hg

view include/asm-m32r/pgtable-2level.h @ 452:c7ed6fe5dca0

kexec: dont initialise regions in reserve_memory()

There is no need to initialise efi_memmap_res and boot_param_res in
reserve_memory() for the initial xen domain as it is done in
machine_kexec_setup_resources() using values from the kexec hypercall.

Signed-off-by: Simon Horman <horms@verge.net.au>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Feb 28 10:55:18 2008 +0000 (2008-02-28)
parents 831230e53067
children
line source
1 #ifndef _ASM_M32R_PGTABLE_2LEVEL_H
2 #define _ASM_M32R_PGTABLE_2LEVEL_H
4 #ifdef __KERNEL__
7 /*
8 * traditional M32R two-level paging structure:
9 */
11 #define PGDIR_SHIFT 22
12 #define PTRS_PER_PGD 1024
14 /*
15 * the M32R is two-level, so we don't really have any
16 * PMD directory physically.
17 */
18 #define PMD_SHIFT 22
19 #define PTRS_PER_PMD 1
21 #define PTRS_PER_PTE 1024
23 #define pte_ERROR(e) \
24 printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e))
25 #define pmd_ERROR(e) \
26 printk("%s:%d: bad pmd %08lx.\n", __FILE__, __LINE__, pmd_val(e))
27 #define pgd_ERROR(e) \
28 printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e))
30 /*
31 * The "pgd_xxx()" functions here are trivial for a folded two-level
32 * setup: the pgd is never bad, and a pmd always exists (as it's folded
33 * into the pgd entry)
34 */
35 static inline int pgd_none(pgd_t pgd) { return 0; }
36 static inline int pgd_bad(pgd_t pgd) { return 0; }
37 static inline int pgd_present(pgd_t pgd) { return 1; }
38 #define pgd_clear(xp) do { } while (0)
40 /*
41 * Certain architectures need to do special things when PTEs
42 * within a page table are directly modified. Thus, the following
43 * hook is made available.
44 */
45 #define set_pte(pteptr, pteval) (*(pteptr) = pteval)
46 #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval)
47 #define set_pte_atomic(pteptr, pteval) set_pte(pteptr, pteval)
48 /*
49 * (pmds are folded into pgds so this doesnt get actually called,
50 * but the define is needed for a generic inline function.)
51 */
52 #define set_pmd(pmdptr, pmdval) (*(pmdptr) = pmdval)
53 #define set_pgd(pgdptr, pgdval) (*(pgdptr) = pgdval)
55 #define pgd_page(pgd) \
56 ((unsigned long) __va(pgd_val(pgd) & PAGE_MASK))
58 static inline pmd_t *pmd_offset(pgd_t * dir, unsigned long address)
59 {
60 return (pmd_t *) dir;
61 }
63 #define ptep_get_and_clear(mm,addr,xp) __pte(xchg(&(xp)->pte, 0))
64 #define pte_same(a, b) (pte_val(a) == pte_val(b))
65 #define pte_page(x) pfn_to_page(pte_pfn(x))
66 #define pte_none(x) (!pte_val(x))
67 #define pte_pfn(x) (pte_val(x) >> PAGE_SHIFT)
68 #define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
69 #define pfn_pmd(pfn, prot) __pmd(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
71 #define PTE_FILE_MAX_BITS 29
72 #define pte_to_pgoff(pte) (((pte_val(pte) >> 2) & 0xef) | (((pte_val(pte) >> 10)) << 7))
73 #define pgoff_to_pte(off) ((pte_t) { (((off) & 0xef) << 2) | (((off) >> 7) << 10) | _PAGE_FILE })
75 #endif /* __KERNEL__ */
77 #endif /* _ASM_M32R_PGTABLE_2LEVEL_H */