mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-08 15:48:23 +00:00
ARC: mm: do_page_fault refactor #2: remove short lived variable
Compiler will do this anyways, still.. No functional change. Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
This commit is contained in:
parent
450e5b6f65
commit
13e2cc1240
1 changed files with 1 additions and 6 deletions
|
@ -64,23 +64,18 @@ void do_page_fault(unsigned long address, struct pt_regs *regs)
|
||||||
struct task_struct *tsk = current;
|
struct task_struct *tsk = current;
|
||||||
struct mm_struct *mm = tsk->mm;
|
struct mm_struct *mm = tsk->mm;
|
||||||
int si_code = SEGV_MAPERR;
|
int si_code = SEGV_MAPERR;
|
||||||
int ret;
|
|
||||||
vm_fault_t fault;
|
vm_fault_t fault;
|
||||||
int write = regs->ecr_cause & ECR_C_PROTV_STORE; /* ST/EX */
|
int write = regs->ecr_cause & ECR_C_PROTV_STORE; /* ST/EX */
|
||||||
unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE;
|
unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We fault-in kernel-space virtual memory on-demand. The
|
|
||||||
* 'reference' page table is init_mm.pgd.
|
|
||||||
*
|
|
||||||
* NOTE! We MUST NOT take any locks for this case. We may
|
* NOTE! We MUST NOT take any locks for this case. We may
|
||||||
* be in an interrupt or a critical region, and should
|
* be in an interrupt or a critical region, and should
|
||||||
* only copy the information from the master page table,
|
* only copy the information from the master page table,
|
||||||
* nothing more.
|
* nothing more.
|
||||||
*/
|
*/
|
||||||
if (address >= VMALLOC_START && !user_mode(regs)) {
|
if (address >= VMALLOC_START && !user_mode(regs)) {
|
||||||
ret = handle_kernel_vaddr_fault(address);
|
if (unlikely(handle_kernel_vaddr_fault(address)))
|
||||||
if (unlikely(ret))
|
|
||||||
goto no_context;
|
goto no_context;
|
||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue