Commit c61e211d authored by Harvey Harrison's avatar Harvey Harrison Committed by Ingo Molnar

x86: unify fault_32|64.c

Unify includes in moved fault.c.

Modify Makefiles to pick up unified file.
Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent f8c2ee22
......@@ -2,7 +2,7 @@
# Makefile for the linux i386-specific parts of the memory manager.
#
obj-y := init_32.o pgtable_32.o fault_32.o ioremap.o extable.o pageattr.o mmap.o
obj-y := init_32.o pgtable_32.o fault.o ioremap.o extable.o pageattr.o mmap.o
obj-$(CONFIG_NUMA) += discontig_32.o
obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
......
......@@ -2,7 +2,7 @@
# Makefile for the linux x86_64-specific parts of the memory manager.
#
obj-y := init_64.o fault_64.o ioremap.o extable.o pageattr.o mmap.o
obj-y := init_64.o fault.o ioremap.o extable.o pageattr.o mmap.o
obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
obj-$(CONFIG_NUMA) += numa_64.o
obj-$(CONFIG_K8_NUMA) += k8topology_64.o
......
......@@ -18,6 +18,8 @@
#include <linux/tty.h>
#include <linux/vt_kern.h> /* For unblank_screen() */
#include <linux/compiler.h>
#include <linux/highmem.h>
#include <linux/bootmem.h> /* for max_low_pfn */
#include <linux/vmalloc.h>
#include <linux/module.h>
#include <linux/kprobes.h>
......@@ -25,6 +27,8 @@
#include <linux/kdebug.h>
#include <asm/system.h>
#include <asm/desc.h>
#include <asm/segment.h>
#include <asm/pgalloc.h>
#include <asm/smp.h>
#include <asm/tlbflush.h>
......@@ -88,16 +92,15 @@ static int is_prefetch(struct pt_regs *regs, unsigned long addr,
unsigned char *max_instr;
#ifdef CONFIG_X86_32
if (unlikely(boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
boot_cpu_data.x86 >= 6)) {
/* Catch an obscure case of prefetch inside an NX page. */
# ifdef CONFIG_X86_PAE
/* If it was a exec fault on NX page, ignore */
if (nx_enabled && (error_code & PF_INSTR))
return 0;
} else {
# else
return 0;
}
#else
/* If it was a exec fault ignore */
# endif
#else /* CONFIG_X86_64 */
/* If it was a exec fault on NX page, ignore */
if (error_code & PF_INSTR)
return 0;
#endif
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment