ia64/linux-2.6.18-xen.hg

view include/asm-m32r/pgalloc.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_PGALLOC_H
2 #define _ASM_M32R_PGALLOC_H
4 /* $Id$ */
6 #include <linux/mm.h>
8 #include <asm/io.h>
10 #define pmd_populate_kernel(mm, pmd, pte) \
11 set_pmd(pmd, __pmd(_PAGE_TABLE + __pa(pte)))
13 static __inline__ void pmd_populate(struct mm_struct *mm, pmd_t *pmd,
14 struct page *pte)
15 {
16 set_pmd(pmd, __pmd(_PAGE_TABLE + page_to_phys(pte)));
17 }
19 /*
20 * Allocate and free page tables.
21 */
22 static __inline__ pgd_t *pgd_alloc(struct mm_struct *mm)
23 {
24 pgd_t *pgd = (pgd_t *)__get_free_page(GFP_KERNEL|__GFP_ZERO);
26 return pgd;
27 }
29 static __inline__ void pgd_free(pgd_t *pgd)
30 {
31 free_page((unsigned long)pgd);
32 }
34 static __inline__ pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
35 unsigned long address)
36 {
37 pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_ZERO);
39 return pte;
40 }
42 static __inline__ struct page *pte_alloc_one(struct mm_struct *mm,
43 unsigned long address)
44 {
45 struct page *pte = alloc_page(GFP_KERNEL|__GFP_ZERO);
48 return pte;
49 }
51 static __inline__ void pte_free_kernel(pte_t *pte)
52 {
53 free_page((unsigned long)pte);
54 }
56 static __inline__ void pte_free(struct page *pte)
57 {
58 __free_page(pte);
59 }
61 #define __pte_free_tlb(tlb, pte) pte_free((pte))
63 /*
64 * allocating and freeing a pmd is trivial: the 1-entry pmd is
65 * inside the pgd, so has no extra memory associated with it.
66 * (In the PAE case we free the pmds as part of the pgd.)
67 */
69 #define pmd_alloc_one(mm, addr) ({ BUG(); ((pmd_t *)2); })
70 #define pmd_free(x) do { } while (0)
71 #define __pmd_free_tlb(tlb, x) do { } while (0)
72 #define pgd_populate(mm, pmd, pte) BUG()
74 #define check_pgt_cache() do { } while (0)
76 #endif /* _ASM_M32R_PGALLOC_H */