# HG changeset patch # User yamahata@xxxxxxxxxxxxx # Date 1164694413 -32400 # Node ID 90caddcb9ef712c8e940fa9bec14ebfa36565dbb # Parent 7e7846ea4ab321e6d6b7ad34bbcd808cd2bbcfff move pgtable-nopud.h to modify from linux/ to linux-xen/. PATCHNAME: move_pgtable_nopud_h Signed-off-by: Isaku Yamahata diff -r 7e7846ea4ab3 -r 90caddcb9ef7 xen/include/asm-ia64/linux-xen/asm-generic/README.origin --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xen/include/asm-ia64/linux-xen/asm-generic/README.origin Tue Nov 28 15:13:33 2006 +0900 @@ -0,0 +1,8 @@ +# Source files in this directory are near-identical copies of linux-2.6.13 +# files: + +# NOTE: ALL changes to these files should be clearly marked +# (e.g. with #ifdef XEN or XEN in a comment) so that they can be +# easily updated to future versions of the corresponding Linux files. + +pgtable-nopud.h -> linux/include/asm-generic/pgtable-nopud.h diff -r 7e7846ea4ab3 -r 90caddcb9ef7 xen/include/asm-ia64/linux-xen/asm-generic/pgtable-nopud.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xen/include/asm-ia64/linux-xen/asm-generic/pgtable-nopud.h Tue Nov 28 15:13:33 2006 +0900 @@ -0,0 +1,61 @@ +#ifndef _PGTABLE_NOPUD_H +#define _PGTABLE_NOPUD_H + +#ifndef __ASSEMBLY__ + +#define __PAGETABLE_PUD_FOLDED + +/* + * Having the pud type consist of a pgd gets the size right, and allows + * us to conceptually access the pgd entry that this pud is folded into + * without casting. + */ +typedef struct { pgd_t pgd; } pud_t; + +#define PUD_SHIFT PGDIR_SHIFT +#define PTRS_PER_PUD 1 +#define PUD_SIZE (1UL << PUD_SHIFT) +#define PUD_MASK (~(PUD_SIZE-1)) + +/* + * The "pgd_xxx()" functions here are trivial for a folded two-level + * setup: the pud is never bad, and a pud always exists (as it's folded + * into the pgd entry) + */ +static inline int pgd_none(pgd_t pgd) { return 0; } +static inline int pgd_bad(pgd_t pgd) { return 0; } +static inline int pgd_present(pgd_t pgd) { return 1; } +static inline void pgd_clear(pgd_t *pgd) { } +#define pud_ERROR(pud) (pgd_ERROR((pud).pgd)) + +#define pgd_populate(mm, pgd, pud) do { } while (0) +/* + * (puds are folded into pgds so this doesn't get actually called, + * but the define is needed for a generic inline function.) + */ +#define set_pgd(pgdptr, pgdval) set_pud((pud_t *)(pgdptr), (pud_t) { pgdval }) + +static inline pud_t * pud_offset(pgd_t * pgd, unsigned long address) +{ + return (pud_t *)pgd; +} + +#define pud_val(x) (pgd_val((x).pgd)) +#define __pud(x) ((pud_t) { __pgd(x) } ) + +#define pgd_page(pgd) (pud_page((pud_t){ pgd })) +#define pgd_page_kernel(pgd) (pud_page_kernel((pud_t){ pgd })) + +/* + * allocating and freeing a pud is trivial: the 1-entry pud is + * inside the pgd, so has no extra memory associated with it. + */ +#define pud_alloc_one(mm, address) NULL +#define pud_free(x) do { } while (0) +#define __pud_free_tlb(tlb, x) do { } while (0) + +#undef pud_addr_end +#define pud_addr_end(addr, end) (end) + +#endif /* __ASSEMBLY__ */ +#endif /* _PGTABLE_NOPUD_H */ diff -r 7e7846ea4ab3 -r 90caddcb9ef7 xen/include/asm-ia64/linux/asm-generic/README.origin --- a/xen/include/asm-ia64/linux/asm-generic/README.origin Mon Nov 27 10:10:57 2006 -0700 +++ b/xen/include/asm-ia64/linux/asm-generic/README.origin Tue Nov 28 15:13:33 2006 +0900 @@ -9,7 +9,6 @@ iomap.h -> linux/include/asm-generic/i iomap.h -> linux/include/asm-generic/iomap.h pci.h -> linux/include/asm-generic/pci.h pgtable.h -> linux/include/asm-generic/pgtable.h -pgtable-nopud.h -> linux/include/asm-generic/pgtable-nopud.h sections.h -> linux/include/asm-generic/sections.h topology.h -> linux/include/asm-generic/topology.h unaligned.h -> linux/include/asm-generic/unaligned.h diff -r 7e7846ea4ab3 -r 90caddcb9ef7 xen/include/asm-ia64/linux/asm-generic/pgtable-nopud.h --- a/xen/include/asm-ia64/linux/asm-generic/pgtable-nopud.h Mon Nov 27 10:10:57 2006 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -#ifndef _PGTABLE_NOPUD_H -#define _PGTABLE_NOPUD_H - -#ifndef __ASSEMBLY__ - -#define __PAGETABLE_PUD_FOLDED - -/* - * Having the pud type consist of a pgd gets the size right, and allows - * us to conceptually access the pgd entry that this pud is folded into - * without casting. - */ -typedef struct { pgd_t pgd; } pud_t; - -#define PUD_SHIFT PGDIR_SHIFT -#define PTRS_PER_PUD 1 -#define PUD_SIZE (1UL << PUD_SHIFT) -#define PUD_MASK (~(PUD_SIZE-1)) - -/* - * The "pgd_xxx()" functions here are trivial for a folded two-level - * setup: the pud is never bad, and a pud always exists (as it's folded - * into the pgd entry) - */ -static inline int pgd_none(pgd_t pgd) { return 0; } -static inline int pgd_bad(pgd_t pgd) { return 0; } -static inline int pgd_present(pgd_t pgd) { return 1; } -static inline void pgd_clear(pgd_t *pgd) { } -#define pud_ERROR(pud) (pgd_ERROR((pud).pgd)) - -#define pgd_populate(mm, pgd, pud) do { } while (0) -/* - * (puds are folded into pgds so this doesn't get actually called, - * but the define is needed for a generic inline function.) - */ -#define set_pgd(pgdptr, pgdval) set_pud((pud_t *)(pgdptr), (pud_t) { pgdval }) - -static inline pud_t * pud_offset(pgd_t * pgd, unsigned long address) -{ - return (pud_t *)pgd; -} - -#define pud_val(x) (pgd_val((x).pgd)) -#define __pud(x) ((pud_t) { __pgd(x) } ) - -#define pgd_page(pgd) (pud_page((pud_t){ pgd })) -#define pgd_page_kernel(pgd) (pud_page_kernel((pud_t){ pgd })) - -/* - * allocating and freeing a pud is trivial: the 1-entry pud is - * inside the pgd, so has no extra memory associated with it. - */ -#define pud_alloc_one(mm, address) NULL -#define pud_free(x) do { } while (0) -#define __pud_free_tlb(tlb, x) do { } while (0) - -#undef pud_addr_end -#define pud_addr_end(addr, end) (end) - -#endif /* __ASSEMBLY__ */ -#endif /* _PGTABLE_NOPUD_H */