sparc64: Implement HAVE_CONTEXT_TRACKING
Mark the places when the system are in user or are in kernel. This is used to make full dynticks system (tickless) -- CONFIG_NO_HZ_FULL dependence. Signed-off-by: Kirill Tkhai <tkhai@yandex.ru> CC: David Miller <davem@davemloft.net> Signed-off-by: David S. Miller <davem@davemloft.net>
这个提交包含在:
@@ -21,6 +21,7 @@
|
||||
#include <linux/kprobes.h>
|
||||
#include <linux/kdebug.h>
|
||||
#include <linux/percpu.h>
|
||||
#include <linux/context_tracking.h>
|
||||
|
||||
#include <asm/page.h>
|
||||
#include <asm/pgtable.h>
|
||||
@@ -272,6 +273,7 @@ static void noinline __kprobes bogus_32bit_fault_address(struct pt_regs *regs,
|
||||
|
||||
asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
|
||||
{
|
||||
enum ctx_state prev_state = exception_enter();
|
||||
struct mm_struct *mm = current->mm;
|
||||
struct vm_area_struct *vma;
|
||||
unsigned int insn = 0;
|
||||
@@ -282,7 +284,7 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
|
||||
fault_code = get_thread_fault_code();
|
||||
|
||||
if (notify_page_fault(regs))
|
||||
return;
|
||||
goto exit_exception;
|
||||
|
||||
si_code = SEGV_MAPERR;
|
||||
address = current_thread_info()->fault_address;
|
||||
@@ -313,7 +315,7 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
|
||||
/* Valid, no problems... */
|
||||
} else {
|
||||
bad_kernel_pc(regs, address);
|
||||
return;
|
||||
goto exit_exception;
|
||||
}
|
||||
} else
|
||||
flags |= FAULT_FLAG_USER;
|
||||
@@ -430,7 +432,7 @@ good_area:
|
||||
fault = handle_mm_fault(mm, vma, address, flags);
|
||||
|
||||
if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current))
|
||||
return;
|
||||
goto exit_exception;
|
||||
|
||||
if (unlikely(fault & VM_FAULT_ERROR)) {
|
||||
if (fault & VM_FAULT_OOM)
|
||||
@@ -482,6 +484,8 @@ good_area:
|
||||
|
||||
}
|
||||
#endif
|
||||
exit_exception:
|
||||
exception_exit(prev_state);
|
||||
return;
|
||||
|
||||
/*
|
||||
@@ -494,7 +498,7 @@ bad_area:
|
||||
|
||||
handle_kernel_fault:
|
||||
do_kernel_fault(regs, si_code, fault_code, insn, address);
|
||||
return;
|
||||
goto exit_exception;
|
||||
|
||||
/*
|
||||
* We ran out of memory, or some other thing happened to us that made
|
||||
@@ -505,7 +509,7 @@ out_of_memory:
|
||||
up_read(&mm->mmap_sem);
|
||||
if (!(regs->tstate & TSTATE_PRIV)) {
|
||||
pagefault_out_of_memory();
|
||||
return;
|
||||
goto exit_exception;
|
||||
}
|
||||
goto handle_kernel_fault;
|
||||
|
||||
|
在新工单中引用
屏蔽一个用户