aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2013-09-18 06:55:40 -0400
committerVineet Gupta <vgupta@synopsys.com>2013-11-06 00:11:39 -0500
commit21a63b56044706aa37637315dd27d9d465bbd5c4 (patch)
treec92bbd890472c22c99b89dd0749a117c7ca0a51e /arch
parentd4599baf5c773660f32ee6bc35c1afab009a52d9 (diff)
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: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arc/kernel/entry.S9
-rw-r--r--arch/arc/mm/fault.c2
-rw-r--r--arch/arc/mm/tlbex.S4
3 files changed, 7 insertions, 8 deletions
diff --git a/arch/arc/kernel/entry.S b/arch/arc/kernel/entry.S
index b908dde8a331..eb3f3c5a700a 100644
--- a/arch/arc/kernel/entry.S
+++ b/arch/arc/kernel/entry.S
@@ -337,9 +337,9 @@ ARC_ENTRY EV_TLBProtV
337 ; vineetg: Mar 6th: Random Seg Fault issue #1 337 ; vineetg: Mar 6th: Random Seg Fault issue #1
338 ; ecr and efa were not saved in case an Intr sneaks in 338 ; ecr and efa were not saved in case an Intr sneaks in
339 ; after fake rtie 339 ; after fake rtie
340 ; 340
341 lr r2, [ecr] 341 lr r2, [ecr]
342 lr r1, [efa] ; Faulting Data address 342 lr r0, [efa] ; Faulting Data address
343 343
344 ; --------(4) Return from CPU Exception Mode --------- 344 ; --------(4) Return from CPU Exception Mode ---------
345 ; Fake a rtie, but rtie to next label 345 ; Fake a rtie, but rtie to next label
@@ -348,6 +348,8 @@ ARC_ENTRY EV_TLBProtV
348 348
349 FAKE_RET_FROM_EXCPN r9 349 FAKE_RET_FROM_EXCPN r9
350 350
351 mov r1, sp
352
351 ;------ (5) Type of Protection Violation? ---------- 353 ;------ (5) Type of Protection Violation? ----------
352 ; 354 ;
353 ; ProtV Hardware Exception is triggered for Access Faults of 2 types 355 ; ProtV Hardware Exception is triggered for Access Faults of 2 types
@@ -358,14 +360,11 @@ ARC_ENTRY EV_TLBProtV
358 bbit1 r2, ECR_C_BIT_PROTV_MISALIG_DATA, 4f 360 bbit1 r2, ECR_C_BIT_PROTV_MISALIG_DATA, 4f
359 361
360 ;========= (6a) Access Violation Processing ======== 362 ;========= (6a) Access Violation Processing ========
361 mov r0, sp ; pt_regs
362 bl do_page_fault 363 bl do_page_fault
363 b ret_from_exception 364 b ret_from_exception
364 365
365 ;========== (6b) Non aligned access ============ 366 ;========== (6b) Non aligned access ============
3664: 3674:
367 mov r0, r1
368 mov r1, sp ; pt_regs
369 368
370#ifdef CONFIG_ARC_MISALIGN_ACCESS 369#ifdef CONFIG_ARC_MISALIGN_ACCESS
371 SAVE_CALLEE_SAVED_USER 370 SAVE_CALLEE_SAVED_USER
diff --git a/arch/arc/mm/fault.c b/arch/arc/mm/fault.c
index 0c14d8a52683..9c69552350c4 100644
--- a/arch/arc/mm/fault.c
+++ b/arch/arc/mm/fault.c
@@ -52,7 +52,7 @@ bad_area:
52 return 1; 52 return 1;
53} 53}
54 54
55void do_page_fault(struct pt_regs *regs, unsigned long address) 55void do_page_fault(unsigned long address, struct pt_regs *regs)
56{ 56{
57 struct vm_area_struct *vma = NULL; 57 struct vm_area_struct *vma = NULL;
58 struct task_struct *tsk = current; 58 struct task_struct *tsk = current;
diff --git a/arch/arc/mm/tlbex.S b/arch/arc/mm/tlbex.S
index cf7d7d9ad695..3fcfdb38d242 100644
--- a/arch/arc/mm/tlbex.S
+++ b/arch/arc/mm/tlbex.S
@@ -369,8 +369,8 @@ do_slow_path_pf:
369 EXCEPTION_PROLOGUE 369 EXCEPTION_PROLOGUE
370 370
371 ; ------- setup args for Linux Page fault Hanlder --------- 371 ; ------- setup args for Linux Page fault Hanlder ---------
372 mov_s r0, sp 372 mov_s r1, sp
373 lr r1, [efa] 373 lr r0, [efa]
374 374
375 ; We don't want exceptions to be disabled while the fault is handled. 375 ; We don't want exceptions to be disabled while the fault is handled.
376 ; Now that we have saved the context we return from exception hence 376 ; Now that we have saved the context we return from exception hence