Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -2,7 +2,7 @@
# Makefile for the linux i386-specific parts of the memory manager.
# 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_NUMA) += discontig_32.o
obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
+1 −1
Original line number Original line Diff line number Diff line
@@ -2,7 +2,7 @@
# Makefile for the linux x86_64-specific parts of the memory manager.
# 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_HUGETLB_PAGE) += hugetlbpage.o
obj-$(CONFIG_NUMA) += numa_64.o
obj-$(CONFIG_NUMA) += numa_64.o
obj-$(CONFIG_K8_NUMA) += k8topology_64.o
obj-$(CONFIG_K8_NUMA) += k8topology_64.o
+12 −9
Original line number Original line Diff line number Diff line
@@ -18,6 +18,8 @@
#include <linux/tty.h>
#include <linux/tty.h>
#include <linux/vt_kern.h>		/* For unblank_screen() */
#include <linux/vt_kern.h>		/* For unblank_screen() */
#include <linux/compiler.h>
#include <linux/compiler.h>
#include <linux/highmem.h>
#include <linux/bootmem.h>		/* for max_low_pfn */
#include <linux/vmalloc.h>
#include <linux/vmalloc.h>
#include <linux/module.h>
#include <linux/module.h>
#include <linux/kprobes.h>
#include <linux/kprobes.h>
@@ -25,6 +27,8 @@
#include <linux/kdebug.h>
#include <linux/kdebug.h>


#include <asm/system.h>
#include <asm/system.h>
#include <asm/desc.h>
#include <asm/segment.h>
#include <asm/pgalloc.h>
#include <asm/pgalloc.h>
#include <asm/smp.h>
#include <asm/smp.h>
#include <asm/tlbflush.h>
#include <asm/tlbflush.h>
@@ -88,16 +92,15 @@ static int is_prefetch(struct pt_regs *regs, unsigned long addr,
	unsigned char *max_instr;
	unsigned char *max_instr;


#ifdef CONFIG_X86_32
#ifdef CONFIG_X86_32
	if (unlikely(boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
# ifdef CONFIG_X86_PAE
		     boot_cpu_data.x86 >= 6)) {
	/* If it was a exec fault on NX page, ignore */
		/* Catch an obscure case of prefetch inside an NX page. */
	if (nx_enabled && (error_code & PF_INSTR))
	if (nx_enabled && (error_code & PF_INSTR))
		return 0;
		return 0;
	} else {
		return 0;
	}
# else
# else
	/* If it was a exec fault ignore */
	return 0;
# endif
#else /* CONFIG_X86_64 */
	/* If it was a exec fault on NX page, ignore */
	if (error_code & PF_INSTR)
	if (error_code & PF_INSTR)
		return 0;
		return 0;
#endif
#endif

arch/x86/mm/fault_32.c

deleted100644 → 0
+0 −949

File deleted.

Preview size limit exceeded, changes collapsed.