Patches contributed by Eötvös Lorand University
commit 22796b15725488002437ebbf98a22fdbe596cf89
Merge: bf33a70a7387 0fb807c3e573
Author: Ingo Molnar <mingo@elte.hu>
Date: Fri Feb 13 21:05:03 2009 +0100
Merge branch 'core/header-fixes' into x86/headers
Conflicts:
arch/x86/include/asm/setup.h
diff --cc arch/x86/include/asm/setup.h
index 45b40278b582,5a3a13715756..c230189462a2
--- a/arch/x86/include/asm/setup.h
+++ b/arch/x86/include/asm/setup.h
@@@ -48,14 -31,10 +33,8 @@@ struct x86_quirks
int (*update_genapic)(void);
};
- extern struct x86_quirks *x86_quirks;
- extern unsigned long saved_video_mode;
-
- #ifndef CONFIG_PARAVIRT
- #define paravirt_post_allocator_init() do {} while (0)
- #endif
#endif /* __ASSEMBLY__ */
-#ifdef __KERNEL__
-
#ifdef __i386__
#include <linux/pfn.h>
commit beb6943d8df7ce9278282101af4e0f6f7b648451
Author: Ingo Molnar <mingo@elte.hu>
Date: Fri Feb 13 13:36:47 2009 +0100
x86 headers: protect page_32.h via __ASSEMBLY__
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/x86/include/asm/page_32.h b/arch/x86/include/asm/page_32.h
index b3f0bf79e843..da4e762406f7 100644
--- a/arch/x86/include/asm/page_32.h
+++ b/arch/x86/include/asm/page_32.h
@@ -3,6 +3,8 @@
#include <asm/page_32_types.h>
+#ifndef __ASSEMBLY__
+
#ifdef CONFIG_HUGETLB_PAGE
#define HAVE_ARCH_HUGETLB_UNMAPPED_AREA
#endif
@@ -19,8 +21,6 @@ extern unsigned long __phys_addr(unsigned long);
#define pfn_valid(pfn) ((pfn) < max_mapnr)
#endif /* CONFIG_FLATMEM */
-#ifndef __ASSEMBLY__
-
#ifdef CONFIG_X86_USE_3DNOW
#include <asm/mmx.h>
commit e43623b4ed1d0a1a86f0e05a2df8b9637b90ddd7
Author: Ingo Molnar <mingo@elte.hu>
Date: Fri Feb 13 13:24:19 2009 +0100
x86 headers: include page_types.h in pgtable_types.h
To properly pick up details like PTE_FLAGS_MASK.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h
index a7452f10930e..9dafe87be2de 100644
--- a/arch/x86/include/asm/pgtable_types.h
+++ b/arch/x86/include/asm/pgtable_types.h
@@ -2,6 +2,7 @@
#define _ASM_X86_PGTABLE_DEFS_H
#include <linux/const.h>
+#include <asm/page_types.h>
#define FIRST_USER_ADDRESS 0
commit 56cefcea7c8769ffc04a5609e6ac849e36685468
Author: Ingo Molnar <mingo@elte.hu>
Date: Fri Feb 13 13:23:02 2009 +0100
x86 headers: include linux/types.h
To properly pick up types relied on by prototypes like 'bool'.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/x86/include/asm/page.h b/arch/x86/include/asm/page.h
index 467ce69306b2..89ed9d70b0aa 100644
--- a/arch/x86/include/asm/page.h
+++ b/arch/x86/include/asm/page.h
@@ -1,6 +1,8 @@
#ifndef _ASM_X86_PAGE_H
#define _ASM_X86_PAGE_H
+#include <linux/types.h>
+
#ifdef __KERNEL__
#include <asm/page_types.h>
commit 999c7880cc8eeb0cbe6610b8c6d0ab0ec51cd848
Author: Ingo Molnar <mingo@elte.hu>
Date: Fri Feb 13 13:15:55 2009 +0100
x86 headers: remove duplicate pud_large() definition
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 62024ff897d9..1c097a3a6669 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -387,13 +387,6 @@ static inline unsigned long pages_to_mb(unsigned long npg)
#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \
remap_pfn_range(vma, vaddr, pfn, size, prot)
-#if PAGETABLE_LEVELS == 2
-static inline int pud_large(pud_t pud)
-{
- return 0;
-}
-#endif
-
#if PAGETABLE_LEVELS > 2
static inline int pud_none(pud_t pud)
{
commit b233969eaa98c7b339d955fe25a58bf6bf25739a
Merge: d040c1614c24 54321d947ae9
Author: Ingo Molnar <mingo@elte.hu>
Date: Fri Feb 13 13:09:00 2009 +0100
Merge branch 'x86/untangle2' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen into x86/headers
Conflicts:
arch/x86/include/asm/page.h
arch/x86/include/asm/pgtable.h
arch/x86/mach-voyager/voyager_smp.c
arch/x86/mm/fault.c
diff --cc arch/x86/include/asm/page_types.h
index 000000000000,9f0c95963358..2c52ff767584
mode 000000,100644..100644
--- a/arch/x86/include/asm/page_types.h
+++ b/arch/x86/include/asm/page_types.h
@@@ -1,0 -1,64 +1,63 @@@
+ #ifndef _ASM_X86_PAGE_DEFS_H
+ #define _ASM_X86_PAGE_DEFS_H
+
+ #include <linux/const.h>
+
+ /* PAGE_SHIFT determines the page size */
+ #define PAGE_SHIFT 12
+ #define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
+ #define PAGE_MASK (~(PAGE_SIZE-1))
+
+ #define __PHYSICAL_MASK ((phys_addr_t)(1ULL << __PHYSICAL_MASK_SHIFT) - 1)
+ #define __VIRTUAL_MASK ((1UL << __VIRTUAL_MASK_SHIFT) - 1)
+
+ /* Cast PAGE_MASK to a signed type so that it is sign-extended if
+ virtual addresses are 32-bits but physical addresses are larger
+ (ie, 32-bit PAE). */
+ #define PHYSICAL_PAGE_MASK (((signed long)PAGE_MASK) & __PHYSICAL_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))
+
+ #define HPAGE_SHIFT PMD_SHIFT
+ #define HPAGE_SIZE (_AC(1,UL) << HPAGE_SHIFT)
+ #define HPAGE_MASK (~(HPAGE_SIZE - 1))
+ #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
+
+ #define HUGE_MAX_HSTATE 2
+
+ #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
+
+ #define VM_DATA_DEFAULT_FLAGS \
+ (((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \
+ VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
+
+ #ifdef CONFIG_X86_64
+ #include <asm/page_64_types.h>
+ #else
+ #include <asm/page_32_types.h>
+ #endif /* CONFIG_X86_64 */
+
+ #ifndef __ASSEMBLY__
+
+ struct pgprot;
+
+ extern int page_is_ram(unsigned long pagenr);
-extern int pagerange_is_ram(unsigned long start, unsigned long end);
+ extern int devmem_is_allowed(unsigned long pagenr);
+ extern void map_devmem(unsigned long pfn, unsigned long size,
+ struct pgprot vma_prot);
+ extern void unmap_devmem(unsigned long pfn, unsigned long size,
+ struct pgprot vma_prot);
+
+ extern unsigned long max_low_pfn_mapped;
+ extern unsigned long max_pfn_mapped;
+
+ #endif /* !__ASSEMBLY__ */
+
+ #endif /* _ASM_X86_PAGE_DEFS_H */
diff --cc arch/x86/include/asm/pgtable.h
index 8fef0f6bfbb6,b0d1066ab6a5..62024ff897d9
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@@ -316,26 -216,10 +216,24 @@@ static inline pte_t pte_mkspecial(pte_
return pte_set_flags(pte, _PAGE_SPECIAL);
}
- extern pteval_t __supported_pte_mask;
-
+/*
+ * Mask out unsupported bits in a present pgprot. Non-present pgprots
+ * can use those bits for other purposes, so leave them be.
+ */
+static inline pgprotval_t massage_pgprot(pgprot_t pgprot)
+{
+ pgprotval_t protval = pgprot_val(pgprot);
+
+ if (protval & _PAGE_PRESENT)
+ protval &= __supported_pte_mask;
+
+ return protval;
+}
+
static inline pte_t pfn_pte(unsigned long page_nr, pgprot_t pgprot)
{
- return __pte((((phys_addr_t)page_nr << PAGE_SHIFT) |
- pgprot_val(pgprot)) & __supported_pte_mask);
+ return __pte(((phys_addr_t)page_nr << PAGE_SHIFT) |
+ massage_pgprot(pgprot));
}
static inline pmd_t pfn_pmd(unsigned long page_nr, pgprot_t pgprot)
diff --cc arch/x86/mm/fault.c
index 94c4e7262197,976b5a72ec30..29644175490f
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@@ -851,7 -848,8 +851,8 @@@ void __kprobes do_page_fault(struct pt_
return;
}
+ /* kprobes don't want to hook the spurious faults. */
- if (notify_page_fault(regs))
+ if (unlikely(notify_page_fault(regs)))
return;
/*
* It's safe to allow irq's after cr2 has been saved and the
commit d040c1614c24162adc3fe106b182596999264e26
Merge: d88316c243e5 7032e8696726
Author: Ingo Molnar <mingo@elte.hu>
Date: Fri Feb 13 13:05:57 2009 +0100
Merge branch 'x86/core' into x86/headers
commit 8f8573ae9f5deefada6f5d64d0a52c9b39c730c7
Merge: 37bed90094fd 0e43785c57fe 005bf0e6fa0e 548c8933801c
Author: Ingo Molnar <mingo@elte.hu>
Date: Fri Feb 13 11:57:18 2009 +0100
Merge branches 'irq/genirq', 'irq/sparseirq' and 'irq/urgent' into irq/core
diff --cc arch/mips/kernel/irq.c
index a0ff2b66e22b,a0ff2b66e22b,7b845ba9dff4,a0ff2b66e22b..7c2dafa0f584
--- a/arch/mips/kernel/irq.c
+++ b/arch/mips/kernel/irq.c
@@@@@ -108,10 -108,10 -108,9 -108,10 +108,10 @@@@@ int show_interrupts(struct seq_file *p
seq_printf(p, "%10u ", kstat_irqs(i));
#else
for_each_online_cpu(j)
-- - seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
++ + seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
#endif
seq_printf(p, " %14s", irq_desc[i].chip->name);
+ seq_printf(p, "-%-8s", irq_desc[i].name);
seq_printf(p, " %s", action->name);
for (action=action->next; action; action = action->next)
commit 5fb896a4e916e72efec4772b66be1cce3d6a9143
Merge: d351c8db9595 2a7b8df04c11
Author: Ingo Molnar <mingo@elte.hu>
Date: Fri Feb 13 11:02:40 2009 +0100
Merge branch 'tip/tracing/core' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into tracing/ftrace
commit d351c8db95953b1b673de3966cb39640dc6c2f5f
Merge: 1c511f740fe7 45141d4667d2
Author: Ingo Molnar <mingo@elte.hu>
Date: Fri Feb 13 10:26:45 2009 +0100
Merge branch 'tip/tracing/ftrace' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into tracing/ftrace