]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
Merge branch 'linus' into x86/header-guards
authorIngo Molnar <mingo@elte.hu>
Sat, 26 Jul 2008 13:30:40 +0000 (15:30 +0200)
committerIngo Molnar <mingo@elte.hu>
Sat, 26 Jul 2008 13:30:40 +0000 (15:30 +0200)
Conflicts:

include/asm-x86/gpio.h
include/asm-x86/ide.h

Signed-off-by: Ingo Molnar <mingo@elte.hu>
19 files changed:
1  2 
arch/x86/boot/compressed/misc.c
include/asm-x86/gpio.h
include/asm-x86/hugetlb.h
include/asm-x86/i387.h
include/asm-x86/io_32.h
include/asm-x86/io_64.h
include/asm-x86/ipi.h
include/asm-x86/page.h
include/asm-x86/paravirt.h
include/asm-x86/pgtable-3level.h
include/asm-x86/pgtable.h
include/asm-x86/pgtable_32.h
include/asm-x86/pgtable_64.h
include/asm-x86/processor-flags.h
include/asm-x86/processor.h
include/asm-x86/thread_info.h
include/asm-x86/unistd_32.h
include/asm-x86/unistd_64.h
include/asm-x86/xen/page.h

index 3ee338c7d1d1f078e96750a734c34c0723fdbbc0,9fea737064798bfd10ab78cf729b14cfd8b87681..aaf5a2131efceca569d6de7f88556ad13a661b2c
@@@ -16,7 -16,7 +16,7 @@@
   */
  #undef CONFIG_PARAVIRT
  #ifdef CONFIG_X86_32
 -#define _ASM_DESC_H_ 1
 +#define ASM_X86__DESC_H 1
  #endif
  
  #ifdef CONFIG_X86_64
@@@ -182,8 -182,6 +182,6 @@@ static unsigned            outcnt
  static int  fill_inbuf(void);
  static void flush_window(void);
  static void error(char *m);
- static void gzip_mark(void **);
- static void gzip_release(void **);
  
  /*
   * This is set up by the setup-routine at boot-time
@@@ -196,9 -194,6 +194,6 @@@ extern int input_len
  
  static long bytes_out;
  
- static void *malloc(int size);
- static void free(void *where);
  static void *memset(void *s, int c, unsigned n);
  static void *memcpy(void *dest, const void *src, unsigned n);
  
@@@ -220,40 -215,6 +215,6 @@@ static int lines, cols
  
  #include "../../../../lib/inflate.c"
  
- static void *malloc(int size)
- {
-       void *p;
-       if (size < 0)
-               error("Malloc error");
-       if (free_mem_ptr <= 0)
-               error("Memory error");
-       free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */
-       p = (void *)free_mem_ptr;
-       free_mem_ptr += size;
-       if (free_mem_ptr >= free_mem_end_ptr)
-               error("Out of memory");
-       return p;
- }
- static void free(void *where)
- {     /* Don't care */
- }
- static void gzip_mark(void **ptr)
- {
-       *ptr = (void *) free_mem_ptr;
- }
- static void gzip_release(void **ptr)
- {
-       free_mem_ptr = (memptr) *ptr;
- }
  static void scroll(void)
  {
        int i;
diff --combined include/asm-x86/gpio.h
index f269ff9cd40b5a0273146c985c1e34a3a2d21ee9,116e9147fe66473c0412685480e565a8a1fd8b76..f9e8f8918a9dfa0750d2a289c0be5ecc30a3047f
@@@ -1,6 -1,62 +1,62 @@@
- #ifndef ASM_X86__GPIO_H
- #define ASM_X86__GPIO_H
+ /*
+  * Generic GPIO API implementation for x86.
+  *
+  * Derived from the generic GPIO API for powerpc:
+  *
+  * Copyright (c) 2007-2008  MontaVista Software, Inc.
+  *
+  * Author: Anton Vorontsov <avorontsov@ru.mvista.com>
+  *
+  * This program is free software; you can redistribute it and/or modify
+  * it under the terms of the GNU General Public License as published by
+  * the Free Software Foundation; either version 2 of the License, or
+  * (at your option) any later version.
+  */
  
+ #ifndef _ASM_I386_GPIO_H
+ #define _ASM_I386_GPIO_H
+ #ifdef CONFIG_X86_RDC321X
  #include <gpio.h>
+ #else /* CONFIG_X86_RDC321X */
+ #include <asm-generic/gpio.h>
+ #ifdef CONFIG_GPIOLIB
+ /*
+  * Just call gpiolib.
+  */
+ static inline int gpio_get_value(unsigned int gpio)
+ {
+       return __gpio_get_value(gpio);
+ }
+ static inline void gpio_set_value(unsigned int gpio, int value)
+ {
+       __gpio_set_value(gpio, value);
+ }
+ static inline int gpio_cansleep(unsigned int gpio)
+ {
+       return __gpio_cansleep(gpio);
+ }
+ /*
+  * Not implemented, yet.
+  */
+ static inline int gpio_to_irq(unsigned int gpio)
+ {
+       return -ENOSYS;
+ }
+ static inline int irq_to_gpio(unsigned int irq)
+ {
+       return -EINVAL;
+ }
+ #endif /* CONFIG_GPIOLIB */
+ #endif /* CONFIG_X86_RDC321X */
  
 -#endif /* _ASM_I386_GPIO_H */
 +#endif /* ASM_X86__GPIO_H */
index 0e0a0828182ba69bd5dbed0f34d23a5f4db1fe6f,439a9acc132d10f77b469fc24b250f3acc2f51d9..0b7ec5dc08840df634deb5151e35279500a49577
@@@ -1,5 -1,5 +1,5 @@@
 -#ifndef _ASM_X86_HUGETLB_H
 -#define _ASM_X86_HUGETLB_H
 +#ifndef ASM_X86__HUGETLB_H
 +#define ASM_X86__HUGETLB_H
  
  #include <asm/page.h>
  
@@@ -14,11 -14,13 +14,13 @@@ static inline int is_hugepage_only_rang
   * If the arch doesn't supply something else, assume that hugepage
   * size aligned regions are ok without further preparation.
   */
- static inline int prepare_hugepage_range(unsigned long addr, unsigned long len)
+ static inline int prepare_hugepage_range(struct file *file,
+                       unsigned long addr, unsigned long len)
  {
-       if (len & ~HPAGE_MASK)
+       struct hstate *h = hstate_file(file);
+       if (len & ~huge_page_mask(h))
                return -EINVAL;
-       if (addr & ~HPAGE_MASK)
+       if (addr & ~huge_page_mask(h))
                return -EINVAL;
        return 0;
  }
@@@ -26,7 -28,7 +28,7 @@@
  static inline void hugetlb_prefault_arch_hook(struct mm_struct *mm) {
  }
  
- static inline void hugetlb_free_pgd_range(struct mmu_gather **tlb,
+ static inline void hugetlb_free_pgd_range(struct mmu_gather *tlb,
                                          unsigned long addr, unsigned long end,
                                          unsigned long floor,
                                          unsigned long ceiling)
@@@ -88,4 -90,4 +90,4 @@@ static inline void arch_release_hugepag
  {
  }
  
 -#endif /* _ASM_X86_HUGETLB_H */
 +#endif /* ASM_X86__HUGETLB_H */
diff --combined include/asm-x86/i387.h
index 3e83cbb728aeef5ca5c64876aa51306c3d42028d,96fa8449ff11de8dcf4926f3ac541286597168d3..6f60a6b8997314cf5e223f04fc2c387f9617c041
@@@ -7,8 -7,8 +7,8 @@@
   * x86-64 work by Andi Kleen 2002
   */
  
 -#ifndef _ASM_X86_I387_H
 -#define _ASM_X86_I387_H
 +#ifndef ASM_X86__I387_H
 +#define ASM_X86__I387_H
  
  #include <linux/sched.h>
  #include <linux/kernel_stat.h>
@@@ -137,60 -137,6 +137,6 @@@ static inline void __save_init_fpu(stru
        task_thread_info(tsk)->status &= ~TS_USEDFPU;
  }
  
- /*
-  * Signal frame handlers.
-  */
- static inline int save_i387(struct _fpstate __user *buf)
- {
-       struct task_struct *tsk = current;
-       int err = 0;
-       BUILD_BUG_ON(sizeof(struct user_i387_struct) !=
-                       sizeof(tsk->thread.xstate->fxsave));
-       if ((unsigned long)buf % 16)
-               printk("save_i387: bad fpstate %p\n", buf);
-       if (!used_math())
-               return 0;
-       clear_used_math(); /* trigger finit */
-       if (task_thread_info(tsk)->status & TS_USEDFPU) {
-               err = save_i387_checking((struct i387_fxsave_struct __user *)
-                                        buf);
-               if (err)
-                       return err;
-               task_thread_info(tsk)->status &= ~TS_USEDFPU;
-               stts();
-       } else {
-               if (__copy_to_user(buf, &tsk->thread.xstate->fxsave,
-                                  sizeof(struct i387_fxsave_struct)))
-                       return -1;
-       }
-       return 1;
- }
- /*
-  * This restores directly out of user space. Exceptions are handled.
-  */
- static inline int restore_i387(struct _fpstate __user *buf)
- {
-       struct task_struct *tsk = current;
-       int err;
-       if (!used_math()) {
-               err = init_fpu(tsk);
-               if (err)
-                       return err;
-       }
-       if (!(task_thread_info(current)->status & TS_USEDFPU)) {
-               clts();
-               task_thread_info(current)->status |= TS_USEDFPU;
-       }
-       return restore_fpu_checking((__force struct i387_fxsave_struct *)buf);
- }
  #else  /* CONFIG_X86_32 */
  
  extern void finit(void);
@@@ -360,4 -306,4 +306,4 @@@ static inline unsigned short get_fpu_mx
        }
  }
  
 -#endif        /* _ASM_X86_I387_H */
 +#endif /* ASM_X86__I387_H */
diff --combined include/asm-x86/io_32.h
index d9d1e3f269a87ece8aa230da6c56357e091e6a13,e876d89ac15618f88ea4b624de64c6b1fc27e9cd..4f7d878bda1819a51541b67bda6dc7f4c53ac248
@@@ -1,5 -1,5 +1,5 @@@
 -#ifndef _ASM_IO_H
 -#define _ASM_IO_H
 +#ifndef ASM_X86__IO_32_H
 +#define ASM_X86__IO_32_H
  
  #include <linux/string.h>
  #include <linux/compiler.h>
@@@ -110,6 -110,8 +110,8 @@@ static inline void *phys_to_virt(unsign
   */
  extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size);
  extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size);
+ extern void __iomem *ioremap_prot(resource_size_t offset, unsigned long size,
+                               unsigned long prot_val);
  
  /*
   * The default ioremap() behavior is non-cached:
@@@ -279,4 -281,4 +281,4 @@@ BUILDIO(b, b, char
  BUILDIO(w, w, short)
  BUILDIO(l, , int)
  
 -#endif
 +#endif /* ASM_X86__IO_32_H */
diff --combined include/asm-x86/io_64.h
index 00ac4729e527060d27a98a4d6e2b10a0d160f34a,22995c5c5adc0d001bb40730fbeb15d47951ff01..f436532f1935094b4dff25b8ce766aa1d5c72998
@@@ -1,5 -1,5 +1,5 @@@
 -#ifndef _ASM_IO_H
 -#define _ASM_IO_H
 +#ifndef ASM_X86__IO_64_H
 +#define ASM_X86__IO_64_H
  
  
  /*
@@@ -175,6 -175,8 +175,8 @@@ extern void early_iounmap(void *addr, u
   */
  extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size);
  extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size);
+ extern void __iomem *ioremap_prot(resource_size_t offset, unsigned long size,
+                               unsigned long prot_val);
  
  /*
   * The default ioremap() behavior is non-cached:
@@@ -243,4 -245,4 +245,4 @@@ extern int iommu_bio_merge
  
  #endif /* __KERNEL__ */
  
 -#endif
 +#endif /* ASM_X86__IO_64_H */
diff --combined include/asm-x86/ipi.h
index 63390ea87d13b1b3188f4f8f875c06b5ce88c3d2,bb1c09f7a76ced4cd028d631d79a13d0171e8c2c..c1b2267975181fb18da479d464fdea9096b80591
@@@ -1,5 -1,5 +1,5 @@@
 -#ifndef __ASM_IPI_H
 -#define __ASM_IPI_H
 +#ifndef ASM_X86__IPI_H
 +#define ASM_X86__IPI_H
  
  /*
   * Copyright 2004 James Cleverdon, IBM.
@@@ -122,11 -122,11 +122,11 @@@ static inline void send_IPI_mask_sequen
         * - mbligh
         */
        local_irq_save(flags);
-       for_each_cpu_mask(query_cpu, mask) {
+       for_each_cpu_mask_nr(query_cpu, mask) {
                __send_IPI_dest_field(per_cpu(x86_cpu_to_apicid, query_cpu),
                                      vector, APIC_DEST_PHYSICAL);
        }
        local_irq_restore(flags);
  }
  
 -#endif /* __ASM_IPI_H */
 +#endif /* ASM_X86__IPI_H */
diff --combined include/asm-x86/page.h
index 068a636e0bb1502cca3d3015c24109b6b8365f6d,49982110e4d94e4025896a6c05d7fddecca382ae..79544e6ffb8b8b06060ddb93988972b618e3ef02
@@@ -1,5 -1,5 +1,5 @@@
 -#ifndef _ASM_X86_PAGE_H
 -#define _ASM_X86_PAGE_H
 +#ifndef ASM_X86__PAGE_H
 +#define ASM_X86__PAGE_H
  
  #include <linux/const.h>
  
     (ie, 32-bit PAE). */
  #define PHYSICAL_PAGE_MASK    (((signed long)PAGE_MASK) & __PHYSICAL_MASK)
  
- /* PTE_MASK extracts the PFN from a (pte|pmd|pud|pgd)val_t */
- #define PTE_MASK              ((pteval_t)PHYSICAL_PAGE_MASK)
+ /* PTE_PFN_MASK extracts the PFN from a (pte|pmd|pud|pgd)val_t */
+ #define PTE_PFN_MASK          ((pteval_t)PHYSICAL_PAGE_MASK)
+ /* PTE_FLAGS_MASK extracts the flags from a (pte|pmd|pud|pgd)val_t */
+ #define PTE_FLAGS_MASK                (~PTE_PFN_MASK)
  
  #define PMD_PAGE_SIZE         (_AC(1, UL) << PMD_SHIFT)
  #define PMD_PAGE_MASK         (~(PMD_PAGE_SIZE-1))
@@@ -29,8 -32,7 +32,7 @@@
  #define HPAGE_MASK            (~(HPAGE_SIZE - 1))
  #define HUGETLB_PAGE_ORDER    (HPAGE_SHIFT - PAGE_SHIFT)
  
- /* to align the pointer to the (next) page boundary */
- #define PAGE_ALIGN(addr)      (((addr)+PAGE_SIZE-1)&PAGE_MASK)
+ #define HUGE_MAX_HSTATE 2
  
  #ifndef __ASSEMBLY__
  #include <linux/types.h>
@@@ -144,6 -146,11 +146,11 @@@ static inline pteval_t native_pte_val(p
        return pte.pte;
  }
  
+ static inline pteval_t native_pte_flags(pte_t pte)
+ {
+       return native_pte_val(pte) & PTE_FLAGS_MASK;
+ }
  #define pgprot_val(x) ((x).pgprot)
  #define __pgprot(x)   ((pgprot_t) { (x) } )
  
  #endif
  
  #define pte_val(x)    native_pte_val(x)
- #define pte_flags(x)  native_pte_val(x)
+ #define pte_flags(x)  native_pte_flags(x)
  #define __pte(x)      native_make_pte(x)
  
  #endif        /* CONFIG_PARAVIRT */
  #define __HAVE_ARCH_GATE_AREA 1
  
  #endif        /* __KERNEL__ */
 -#endif        /* _ASM_X86_PAGE_H */
 +#endif /* ASM_X86__PAGE_H */
index 1b7eff0b41beadc2201c42d178abf4083582950e,fbbde93f12d6d5ad0aaca4fb1e6db0860cb5a351..2e6821a0b6e78b0f6d03ecce89dd58377364e3b4
@@@ -1,5 -1,5 +1,5 @@@
 -#ifndef __ASM_PARAVIRT_H
 -#define __ASM_PARAVIRT_H
 +#ifndef ASM_X86__PARAVIRT_H
 +#define ASM_X86__PARAVIRT_H
  /* Various instructions on x86 need to be replaced for
   * para-virtualization: those hooks are defined here. */
  
@@@ -1088,6 -1088,9 +1088,9 @@@ static inline pteval_t pte_flags(pte_t 
                ret = PVOP_CALL1(pteval_t, pv_mmu_ops.pte_flags,
                                 pte.pte);
  
+ #ifdef CONFIG_PARAVIRT_DEBUG
+       BUG_ON(ret & PTE_PFN_MASK);
+ #endif
        return ret;
  }
  
@@@ -1631,4 -1634,4 +1634,4 @@@ static inline unsigned long __raw_local
  
  #endif /* __ASSEMBLY__ */
  #endif /* CONFIG_PARAVIRT */
 -#endif        /* __ASM_PARAVIRT_H */
 +#endif /* ASM_X86__PARAVIRT_H */
index a9ad971a733dd5ed9ba3ed868ac52a2563adf2c6,105057f34032f0a23610ea5822e32cf12d51b4f7..e713bd5f39a684b4c88ef81aa7c6f9a468db9c88
@@@ -1,5 -1,5 +1,5 @@@
 -#ifndef _I386_PGTABLE_3LEVEL_H
 -#define _I386_PGTABLE_3LEVEL_H
 +#ifndef ASM_X86__PGTABLE_3LEVEL_H
 +#define ASM_X86__PGTABLE_3LEVEL_H
  
  /*
   * Intel Physical Address Extension (PAE) Mode - three-level page
@@@ -25,7 -25,7 +25,7 @@@ static inline int pud_none(pud_t pud
  
  static inline int pud_bad(pud_t pud)
  {
-       return (pud_val(pud) & ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER)) != 0;
+       return (pud_val(pud) & ~(PTE_PFN_MASK | _KERNPG_TABLE | _PAGE_USER)) != 0;
  }
  
  static inline int pud_present(pud_t pud)
@@@ -120,9 -120,9 +120,9 @@@ static inline void pud_clear(pud_t *pud
                write_cr3(pgd);
  }
  
- #define pud_page(pud) ((struct page *) __va(pud_val(pud) & PTE_MASK))
+ #define pud_page(pud) ((struct page *) __va(pud_val(pud) & PTE_PFN_MASK))
  
- #define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PTE_MASK))
+ #define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PTE_PFN_MASK))
  
  
  /* Find an entry in the second-level page table.. */
@@@ -160,7 -160,7 +160,7 @@@ static inline int pte_none(pte_t pte
  
  static inline unsigned long pte_pfn(pte_t pte)
  {
-       return (pte_val(pte) & PTE_MASK) >> PAGE_SHIFT;
+       return (pte_val(pte) & PTE_PFN_MASK) >> PAGE_SHIFT;
  }
  
  /*
  #define __pte_to_swp_entry(pte)               ((swp_entry_t){ (pte).pte_high })
  #define __swp_entry_to_pte(x)         ((pte_t){ { .pte_high = (x).val } })
  
 -#endif /* _I386_PGTABLE_3LEVEL_H */
 +#endif /* ASM_X86__PGTABLE_3LEVEL_H */
index b8d7c530054ecdbbfe42fcf99d8dff4921fb22d9,3e5dbc4195f4f71fc61ee906fbcc8f8dec0beb79..3ca03f902e05d872b844341ce276baba33332a0a
@@@ -1,5 -1,5 +1,5 @@@
 -#ifndef _ASM_X86_PGTABLE_H
 -#define _ASM_X86_PGTABLE_H
 +#ifndef ASM_X86__PGTABLE_H
 +#define ASM_X86__PGTABLE_H
  
  #define FIRST_USER_ADDRESS    0
  
@@@ -53,7 -53,7 +53,7 @@@
                         _PAGE_DIRTY)
  
  /* Set of bits not changed in pte_modify */
- #define _PAGE_CHG_MASK        (PTE_MASK | _PAGE_PCD | _PAGE_PWT |             \
+ #define _PAGE_CHG_MASK        (PTE_PFN_MASK | _PAGE_PCD | _PAGE_PWT |         \
                         _PAGE_ACCESSED | _PAGE_DIRTY)
  
  #define _PAGE_CACHE_MASK      (_PAGE_PCD | _PAGE_PWT)
@@@ -286,7 -286,7 +286,7 @@@ static inline pgprot_t pgprot_modify(pg
        return __pgprot(preservebits | addbits);
  }
  
- #define pte_pgprot(x) __pgprot(pte_flags(x) & ~PTE_MASK)
+ #define pte_pgprot(x) __pgprot(pte_flags(x) & PTE_FLAGS_MASK)
  
  #define canon_pgprot(p) __pgprot(pgprot_val(p) & __supported_pte_mask)
  
@@@ -518,4 -518,4 +518,4 @@@ static inline void clone_pgd_range(pgd_
  #include <asm-generic/pgtable.h>
  #endif        /* __ASSEMBLY__ */
  
 -#endif        /* _ASM_X86_PGTABLE_H */
 +#endif /* ASM_X86__PGTABLE_H */
index 4fa3b046e1b11473bf3f6d022d6bbc5129f8cdb0,5c3b26567a95e46144cb3e2ca68601e572111e87..bbc136f3ac5fade384b4dd23bab505eefd1be210
@@@ -1,5 -1,5 +1,5 @@@
 -#ifndef _I386_PGTABLE_H
 -#define _I386_PGTABLE_H
 +#ifndef ASM_X86__PGTABLE_32_H
 +#define ASM_X86__PGTABLE_32_H
  
  
  /*
@@@ -88,7 -88,7 +88,7 @@@ extern unsigned long pg0[]
  /* To avoid harmful races, pmd_none(x) should check only the lower when PAE */
  #define pmd_none(x)   (!(unsigned long)pmd_val((x)))
  #define pmd_present(x)        (pmd_val((x)) & _PAGE_PRESENT)
- #define pmd_bad(x) ((pmd_val(x) & (~PTE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE)
+ #define pmd_bad(x) ((pmd_val(x) & (PTE_FLAGS_MASK & ~_PAGE_USER)) != _KERNPG_TABLE)
  
  #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT))
  
@@@ -139,7 -139,7 +139,7 @@@ static inline int pud_large(pud_t pud) 
  #define pmd_page(pmd) (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT))
  
  #define pmd_page_vaddr(pmd)                                   \
-       ((unsigned long)__va(pmd_val((pmd)) & PTE_MASK))
+       ((unsigned long)__va(pmd_val((pmd)) & PTE_PFN_MASK))
  
  #if defined(CONFIG_HIGHPTE)
  #define pte_offset_map(dir, address)                                  \
@@@ -186,4 -186,4 +186,4 @@@ do {                                               
  #define io_remap_pfn_range(vma, vaddr, pfn, size, prot)       \
        remap_pfn_range(vma, vaddr, pfn, size, prot)
  
 -#endif /* _I386_PGTABLE_H */
 +#endif /* ASM_X86__PGTABLE_32_H */
index b80c0d7658c3ebc3a4fb43464db58837f8305647,ac5fff4cc58aaf364eb41d5027f8e851aceef915..609c24975c663d85b168f36748443b15df1b260d
@@@ -1,5 -1,5 +1,5 @@@
 -#ifndef _X86_64_PGTABLE_H
 -#define _X86_64_PGTABLE_H
 +#ifndef ASM_X86__PGTABLE_64_H
 +#define ASM_X86__PGTABLE_64_H
  
  #include <linux/const.h>
  #ifndef __ASSEMBLY__
@@@ -158,17 -158,17 +158,17 @@@ static inline void native_pgd_clear(pgd
  
  static inline int pgd_bad(pgd_t pgd)
  {
-       return (pgd_val(pgd) & ~(PTE_MASK | _PAGE_USER)) != _KERNPG_TABLE;
+       return (pgd_val(pgd) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE;
  }
  
  static inline int pud_bad(pud_t pud)
  {
-       return (pud_val(pud) & ~(PTE_MASK | _PAGE_USER)) != _KERNPG_TABLE;
+       return (pud_val(pud) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE;
  }
  
  static inline int pmd_bad(pmd_t pmd)
  {
-       return (pmd_val(pmd) & ~(PTE_MASK | _PAGE_USER)) != _KERNPG_TABLE;
+       return (pmd_val(pmd) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE;
  }
  
  #define pte_none(x)   (!pte_val((x)))
   * Level 4 access.
   */
  #define pgd_page_vaddr(pgd)                                           \
-       ((unsigned long)__va((unsigned long)pgd_val((pgd)) & PTE_MASK))
+       ((unsigned long)__va((unsigned long)pgd_val((pgd)) & PTE_PFN_MASK))
  #define pgd_page(pgd)         (pfn_to_page(pgd_val((pgd)) >> PAGE_SHIFT))
  #define pgd_present(pgd) (pgd_val(pgd) & _PAGE_PRESENT)
  static inline int pgd_large(pgd_t pgd) { return 0; }
@@@ -216,7 -216,7 +216,7 @@@ static inline int pud_large(pud_t pte
  }
  
  /* PMD  - Level 2 access */
- #define pmd_page_vaddr(pmd) ((unsigned long) __va(pmd_val((pmd)) & PTE_MASK))
+ #define pmd_page_vaddr(pmd) ((unsigned long) __va(pmd_val((pmd)) & PTE_PFN_MASK))
  #define pmd_page(pmd)         (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT))
  
  #define pmd_index(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD - 1))
@@@ -284,4 -284,4 +284,4 @@@ extern void cleanup_highmap(void)
  #define __HAVE_ARCH_PTE_SAME
  #endif /* !__ASSEMBLY__ */
  
 -#endif /* _X86_64_PGTABLE_H */
 +#endif /* ASM_X86__PGTABLE_64_H */
index ae1d434f1972f3d7ee20b2ff97e982c426d43f88,eff2ecd7fff067caf89bc48cd81bebe111a43363..5dd79774f693c176d66e8e2d5ef7639d85569c25
@@@ -1,5 -1,5 +1,5 @@@
 -#ifndef __ASM_I386_PROCESSOR_FLAGS_H
 -#define __ASM_I386_PROCESSOR_FLAGS_H
 +#ifndef ASM_X86__PROCESSOR_FLAGS_H
 +#define ASM_X86__PROCESSOR_FLAGS_H
  /* Various flags defined: can be included from assembler. */
  
  /*
  #define CX86_ARR_BASE 0xc4
  #define CX86_RCR_BASE 0xdc
  
+ #ifdef __KERNEL__
  #ifdef CONFIG_VM86
  #define X86_VM_MASK   X86_EFLAGS_VM
  #else
  #define X86_VM_MASK   0 /* No VM86 support */
  #endif
+ #endif
  
 -#endif        /* __ASM_I386_PROCESSOR_FLAGS_H */
 +#endif /* ASM_X86__PROCESSOR_FLAGS_H */
index a9a28baef69b3f9d1dd9e4e552e5bf0cfc9f6d9d,5f58da401b43696ee861377fb9aba53500af8b8e..d60b4d81febefdbc632088f00adebffbfcd5f5f4
@@@ -1,5 -1,5 +1,5 @@@
 -#ifndef __ASM_X86_PROCESSOR_H
 -#define __ASM_X86_PROCESSOR_H
 +#ifndef ASM_X86__PROCESSOR_H
 +#define ASM_X86__PROCESSOR_H
  
  #include <asm/processor-flags.h>
  
@@@ -134,7 -134,7 +134,7 @@@ extern __u32                       cleared_cpu_caps[NCAPINT
  #ifdef CONFIG_SMP
  DECLARE_PER_CPU(struct cpuinfo_x86, cpu_info);
  #define cpu_data(cpu)         per_cpu(cpu_info, cpu)
- #define current_cpu_data      cpu_data(smp_processor_id())
+ #define current_cpu_data      __get_cpu_var(cpu_info)
  #else
  #define cpu_data(cpu)         boot_cpu_data
  #define current_cpu_data      boot_cpu_data
@@@ -920,4 -920,4 +920,4 @@@ extern void start_thread(struct pt_reg
  extern int get_tsc_mode(unsigned long adr);
  extern int set_tsc_mode(unsigned int val);
  
 -#endif
 +#endif /* ASM_X86__PROCESSOR_H */
index 50315a5dd183ea40ceac0513a2e875dd5c0ce37e,da0a675adf94a1a753792d1bca54c45d4fe3bed4..e64be8863b762fc49e3b89829d6b7ca87d034e43
@@@ -4,8 -4,8 +4,8 @@@
   * - Incorporating suggestions made by Linus Torvalds and Dave Miller
   */
  
 -#ifndef _ASM_X86_THREAD_INFO_H
 -#define _ASM_X86_THREAD_INFO_H
 +#ifndef ASM_X86__THREAD_INFO_H
 +#define ASM_X86__THREAD_INFO_H
  
  #include <linux/compiler.h>
  #include <asm/page.h>
@@@ -79,7 -79,6 +79,6 @@@ struct thread_info 
  #define TIF_SYSCALL_AUDIT     7       /* syscall auditing active */
  #define TIF_SECCOMP           8       /* secure computing */
  #define TIF_MCE_NOTIFY                10      /* notify userspace of an MCE */
- #define TIF_HRTICK_RESCHED    11      /* reprogram hrtick timer */
  #define TIF_NOTSC             16      /* TSC is not accessible in userland */
  #define TIF_IA32              17      /* 32bit process */
  #define TIF_FORK              18      /* ret_from_fork */
  #define _TIF_SYSCALL_AUDIT    (1 << TIF_SYSCALL_AUDIT)
  #define _TIF_SECCOMP          (1 << TIF_SECCOMP)
  #define _TIF_MCE_NOTIFY               (1 << TIF_MCE_NOTIFY)
- #define _TIF_HRTICK_RESCHED   (1 << TIF_HRTICK_RESCHED)
  #define _TIF_NOTSC            (1 << TIF_NOTSC)
  #define _TIF_IA32             (1 << TIF_IA32)
  #define _TIF_FORK             (1 << TIF_FORK)
  
  /* Only used for 64 bit */
  #define _TIF_DO_NOTIFY_MASK                                           \
-       (_TIF_SIGPENDING|_TIF_MCE_NOTIFY|_TIF_HRTICK_RESCHED)
+       (_TIF_SIGPENDING|_TIF_MCE_NOTIFY)
  
  /* flags to check in __switch_to() */
  #define _TIF_WORK_CTXSW                                                       \
  #define THREAD_FLAGS GFP_KERNEL
  #endif
  
+ #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR
  #define alloc_thread_info(tsk)                                                \
        ((struct thread_info *)__get_free_pages(THREAD_FLAGS, THREAD_ORDER))
  
@@@ -258,4 -258,4 +258,4 @@@ extern void free_thread_info(struct thr
  extern int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src);
  #define arch_task_cache_init arch_task_cache_init
  #endif
 -#endif /* _ASM_X86_THREAD_INFO_H */
 +#endif /* ASM_X86__THREAD_INFO_H */
index 602ddd88c6834c14f1899cebaacad84c8950308a,d7394673b772442677ed3ec7063a4ea384ad7b62..017f4a87c9132bbce98f194b55d80c95ea3bfd65
@@@ -1,5 -1,5 +1,5 @@@
 -#ifndef _ASM_I386_UNISTD_H_
 -#define _ASM_I386_UNISTD_H_
 +#ifndef ASM_X86__UNISTD_32_H
 +#define ASM_X86__UNISTD_32_H
  
  /*
   * This file contains the system call numbers.
  #define __NR_fallocate                324
  #define __NR_timerfd_settime  325
  #define __NR_timerfd_gettime  326
+ #define __NR_signalfd4                327
+ #define __NR_eventfd2         328
+ #define __NR_epoll_create1    329
+ #define __NR_dup3             330
+ #define __NR_pipe2            331
+ #define __NR_inotify_init1    332
  
  #ifdef __KERNEL__
  
  #endif
  
  #endif /* __KERNEL__ */
 -#endif /* _ASM_I386_UNISTD_H_ */
 +#endif /* ASM_X86__UNISTD_32_H */
index 1e10189ed6b0f359f8ba59f6c3ac38a034e9d96d,3a341d791792ad41999893f7034e529cce28e880..ace83f1f678730134569f1efb3656a1d869156d4
@@@ -1,5 -1,5 +1,5 @@@
 -#ifndef _ASM_X86_64_UNISTD_H_
 -#define _ASM_X86_64_UNISTD_H_
 +#ifndef ASM_X86__UNISTD_64_H
 +#define ASM_X86__UNISTD_64_H
  
  #ifndef __SYSCALL
  #define __SYSCALL(a, b)
@@@ -639,6 -639,20 +639,20 @@@ __SYSCALL(__NR_fallocate, sys_fallocate
  __SYSCALL(__NR_timerfd_settime, sys_timerfd_settime)
  #define __NR_timerfd_gettime                  287
  __SYSCALL(__NR_timerfd_gettime, sys_timerfd_gettime)
+ #define __NR_paccept                          288
+ __SYSCALL(__NR_paccept, sys_paccept)
+ #define __NR_signalfd4                                289
+ __SYSCALL(__NR_signalfd4, sys_signalfd4)
+ #define __NR_eventfd2                         290
+ __SYSCALL(__NR_eventfd2, sys_eventfd2)
+ #define __NR_epoll_create1                    291
+ __SYSCALL(__NR_epoll_create1, sys_epoll_create1)
+ #define __NR_dup3                             292
+ __SYSCALL(__NR_dup3, sys_dup3)
+ #define __NR_pipe2                            293
+ __SYSCALL(__NR_pipe2, sys_pipe2)
+ #define __NR_inotify_init1                    294
+ __SYSCALL(__NR_inotify_init1, sys_inotify_init1)
  
  
  #ifndef __NO_STUBS
  #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
  #endif        /* __KERNEL__ */
  
 -#endif /* _ASM_X86_64_UNISTD_H_ */
 +#endif /* ASM_X86__UNISTD_64_H */
index a17a86433c774c1ef9e9efb563188be63ce2e33c,7b3835d3b77d9b910228fc0362b19747eb441e26..c50185dccec192bdef7e0d936863d5503cc304d5
@@@ -1,5 -1,5 +1,5 @@@
 -#ifndef __XEN_PAGE_H
 -#define __XEN_PAGE_H
 +#ifndef ASM_X86__XEN__PAGE_H
 +#define ASM_X86__XEN__PAGE_H
  
  #include <linux/pfn.h>
  
@@@ -124,7 -124,7 +124,7 @@@ static inline unsigned long mfn_to_loca
  
  static inline unsigned long pte_mfn(pte_t pte)
  {
-       return (pte.pte & PTE_MASK) >> PAGE_SHIFT;
+       return (pte.pte & PTE_PFN_MASK) >> PAGE_SHIFT;
  }
  
  static inline pte_t mfn_pte(unsigned long page_nr, pgprot_t pgprot)
@@@ -162,4 -162,4 +162,4 @@@ xmaddr_t arbitrary_virt_to_machine(voi
  void make_lowmem_page_readonly(void *vaddr);
  void make_lowmem_page_readwrite(void *vaddr);
  
 -#endif /* __XEN_PAGE_H */
 +#endif /* ASM_X86__XEN__PAGE_H */