Commit 21a63b56 authored by Vineet Gupta's avatar Vineet Gupta

ARC: Change calling convention of do_page_fault()

switch the args (address, pt_regs) to match with all the other "C"
exception handlers.

This removes the awkwardness in EV_ProtV for page fault vs. unaligned
access.
Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
parent d4599baf
...@@ -337,9 +337,9 @@ ARC_ENTRY EV_TLBProtV ...@@ -337,9 +337,9 @@ ARC_ENTRY EV_TLBProtV
; vineetg: Mar 6th: Random Seg Fault issue #1 ; vineetg: Mar 6th: Random Seg Fault issue #1
; ecr and efa were not saved in case an Intr sneaks in ; ecr and efa were not saved in case an Intr sneaks in
; after fake rtie ; after fake rtie
;
lr r2, [ecr] lr r2, [ecr]
lr r1, [efa] ; Faulting Data address lr r0, [efa] ; Faulting Data address
; --------(4) Return from CPU Exception Mode --------- ; --------(4) Return from CPU Exception Mode ---------
; Fake a rtie, but rtie to next label ; Fake a rtie, but rtie to next label
...@@ -348,6 +348,8 @@ ARC_ENTRY EV_TLBProtV ...@@ -348,6 +348,8 @@ ARC_ENTRY EV_TLBProtV
FAKE_RET_FROM_EXCPN r9 FAKE_RET_FROM_EXCPN r9
mov r1, sp
;------ (5) Type of Protection Violation? ---------- ;------ (5) Type of Protection Violation? ----------
; ;
; ProtV Hardware Exception is triggered for Access Faults of 2 types ; ProtV Hardware Exception is triggered for Access Faults of 2 types
...@@ -358,14 +360,11 @@ ARC_ENTRY EV_TLBProtV ...@@ -358,14 +360,11 @@ ARC_ENTRY EV_TLBProtV
bbit1 r2, ECR_C_BIT_PROTV_MISALIG_DATA, 4f bbit1 r2, ECR_C_BIT_PROTV_MISALIG_DATA, 4f
;========= (6a) Access Violation Processing ======== ;========= (6a) Access Violation Processing ========
mov r0, sp ; pt_regs
bl do_page_fault bl do_page_fault
b ret_from_exception b ret_from_exception
;========== (6b) Non aligned access ============ ;========== (6b) Non aligned access ============
4: 4:
mov r0, r1
mov r1, sp ; pt_regs
#ifdef CONFIG_ARC_MISALIGN_ACCESS #ifdef CONFIG_ARC_MISALIGN_ACCESS
SAVE_CALLEE_SAVED_USER SAVE_CALLEE_SAVED_USER
......
...@@ -52,7 +52,7 @@ static int handle_vmalloc_fault(unsigned long address) ...@@ -52,7 +52,7 @@ static int handle_vmalloc_fault(unsigned long address)
return 1; return 1;
} }
void do_page_fault(struct pt_regs *regs, unsigned long address) void do_page_fault(unsigned long address, struct pt_regs *regs)
{ {
struct vm_area_struct *vma = NULL; struct vm_area_struct *vma = NULL;
struct task_struct *tsk = current; struct task_struct *tsk = current;
......
...@@ -369,8 +369,8 @@ do_slow_path_pf: ...@@ -369,8 +369,8 @@ do_slow_path_pf:
EXCEPTION_PROLOGUE EXCEPTION_PROLOGUE
; ------- setup args for Linux Page fault Hanlder --------- ; ------- setup args for Linux Page fault Hanlder ---------
mov_s r0, sp mov_s r1, sp
lr r1, [efa] lr r0, [efa]
; We don't want exceptions to be disabled while the fault is handled. ; We don't want exceptions to be disabled while the fault is handled.
; Now that we have saved the context we return from exception hence ; Now that we have saved the context we return from exception hence
......
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