aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/kernel')
-rw-r--r--arch/ia64/kernel/entry.h2
-rw-r--r--arch/ia64/kernel/ivt.S13
-rw-r--r--arch/ia64/kernel/ptrace.c15
-rw-r--r--arch/ia64/kernel/signal.c5
-rw-r--r--arch/ia64/kernel/smp.c2
5 files changed, 24 insertions, 13 deletions
diff --git a/arch/ia64/kernel/entry.h b/arch/ia64/kernel/entry.h
index 6d4ecec989b5..78eeb0793419 100644
--- a/arch/ia64/kernel/entry.h
+++ b/arch/ia64/kernel/entry.h
@@ -60,7 +60,7 @@
60 .spillsp @priunat,SW(AR_UNAT)+16+(off); \ 60 .spillsp @priunat,SW(AR_UNAT)+16+(off); \
61 .spillsp ar.rnat,SW(AR_RNAT)+16+(off); \ 61 .spillsp ar.rnat,SW(AR_RNAT)+16+(off); \
62 .spillsp ar.bspstore,SW(AR_BSPSTORE)+16+(off); \ 62 .spillsp ar.bspstore,SW(AR_BSPSTORE)+16+(off); \
63 .spillsp pr,SW(PR)+16+(off)) 63 .spillsp pr,SW(PR)+16+(off)
64 64
65#define DO_SAVE_SWITCH_STACK \ 65#define DO_SAVE_SWITCH_STACK \
66 movl r28=1f; \ 66 movl r28=1f; \
diff --git a/arch/ia64/kernel/ivt.S b/arch/ia64/kernel/ivt.S
index d9c05d53435b..2bc085a73e30 100644
--- a/arch/ia64/kernel/ivt.S
+++ b/arch/ia64/kernel/ivt.S
@@ -405,17 +405,22 @@ ENTRY(nested_dtlb_miss)
405 * r30: continuation address 405 * r30: continuation address
406 * r31: saved pr 406 * r31: saved pr
407 * 407 *
408 * Clobbered: b0, r18, r19, r21, psr.dt (cleared) 408 * Clobbered: b0, r18, r19, r21, r22, psr.dt (cleared)
409 */ 409 */
410 rsm psr.dt // switch to using physical data addressing 410 rsm psr.dt // switch to using physical data addressing
411 mov r19=IA64_KR(PT_BASE) // get the page table base address 411 mov r19=IA64_KR(PT_BASE) // get the page table base address
412 shl r21=r16,3 // shift bit 60 into sign bit 412 shl r21=r16,3 // shift bit 60 into sign bit
413 mov r18=cr.itir
413 ;; 414 ;;
414 shr.u r17=r16,61 // get the region number into r17 415 shr.u r17=r16,61 // get the region number into r17
416 extr.u r18=r18,2,6 // get the faulting page size
415 ;; 417 ;;
416 cmp.eq p6,p7=5,r17 // is faulting address in region 5? 418 cmp.eq p6,p7=5,r17 // is faulting address in region 5?
417 shr.u r18=r16,PGDIR_SHIFT // get bits 33-63 of faulting address 419 add r22=-PAGE_SHIFT,r18 // adjustment for hugetlb address
420 add r18=PGDIR_SHIFT-PAGE_SHIFT,r18
418 ;; 421 ;;
422 shr.u r22=r16,r22
423 shr.u r18=r16,r18
419(p7) dep r17=r17,r19,(PAGE_SHIFT-3),3 // put region number bits in place 424(p7) dep r17=r17,r19,(PAGE_SHIFT-3),3 // put region number bits in place
420 425
421 srlz.d 426 srlz.d
@@ -428,7 +433,7 @@ ENTRY(nested_dtlb_miss)
428(p6) dep r17=r18,r19,3,(PAGE_SHIFT-3) // r17=PTA + IFA(33,42)*8 433(p6) dep r17=r18,r19,3,(PAGE_SHIFT-3) // r17=PTA + IFA(33,42)*8
429(p7) dep r17=r18,r17,3,(PAGE_SHIFT-6) // r17=PTA + (((IFA(61,63) << 7) | IFA(33,39))*8) 434(p7) dep r17=r18,r17,3,(PAGE_SHIFT-6) // r17=PTA + (((IFA(61,63) << 7) | IFA(33,39))*8)
430 cmp.eq p7,p6=0,r21 // unused address bits all zeroes? 435 cmp.eq p7,p6=0,r21 // unused address bits all zeroes?
431 shr.u r18=r16,PMD_SHIFT // shift L2 index into position 436 shr.u r18=r22,PMD_SHIFT // shift L2 index into position
432 ;; 437 ;;
433 ld8 r17=[r17] // fetch the L1 entry (may be 0) 438 ld8 r17=[r17] // fetch the L1 entry (may be 0)
434 ;; 439 ;;
@@ -436,7 +441,7 @@ ENTRY(nested_dtlb_miss)
436 dep r17=r18,r17,3,(PAGE_SHIFT-3) // compute address of L2 page table entry 441 dep r17=r18,r17,3,(PAGE_SHIFT-3) // compute address of L2 page table entry
437 ;; 442 ;;
438(p7) ld8 r17=[r17] // fetch the L2 entry (may be 0) 443(p7) ld8 r17=[r17] // fetch the L2 entry (may be 0)
439 shr.u r19=r16,PAGE_SHIFT // shift L3 index into position 444 shr.u r19=r22,PAGE_SHIFT // shift L3 index into position
440 ;; 445 ;;
441(p7) cmp.eq.or.andcm p6,p7=r17,r0 // was L2 entry NULL? 446(p7) cmp.eq.or.andcm p6,p7=r17,r0 // was L2 entry NULL?
442 dep r17=r19,r17,3,(PAGE_SHIFT-3) // compute address of L3 page table entry 447 dep r17=r19,r17,3,(PAGE_SHIFT-3) // compute address of L3 page table entry
diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c
index 575a8f657b31..6d57aebad485 100644
--- a/arch/ia64/kernel/ptrace.c
+++ b/arch/ia64/kernel/ptrace.c
@@ -945,6 +945,13 @@ access_uarea (struct task_struct *child, unsigned long addr,
945 *data = (pt->cr_ipsr & IPSR_MASK); 945 *data = (pt->cr_ipsr & IPSR_MASK);
946 return 0; 946 return 0;
947 947
948 case PT_AR_RSC:
949 if (write_access)
950 pt->ar_rsc = *data | (3 << 2); /* force PL3 */
951 else
952 *data = pt->ar_rsc;
953 return 0;
954
948 case PT_AR_RNAT: 955 case PT_AR_RNAT:
949 urbs_end = ia64_get_user_rbs_end(child, pt, NULL); 956 urbs_end = ia64_get_user_rbs_end(child, pt, NULL);
950 rnat_addr = (long) ia64_rse_rnat_addr((long *) 957 rnat_addr = (long) ia64_rse_rnat_addr((long *)
@@ -996,9 +1003,6 @@ access_uarea (struct task_struct *child, unsigned long addr,
996 case PT_AR_BSPSTORE: 1003 case PT_AR_BSPSTORE:
997 ptr = pt_reg_addr(pt, ar_bspstore); 1004 ptr = pt_reg_addr(pt, ar_bspstore);
998 break; 1005 break;
999 case PT_AR_RSC:
1000 ptr = pt_reg_addr(pt, ar_rsc);
1001 break;
1002 case PT_AR_UNAT: 1006 case PT_AR_UNAT:
1003 ptr = pt_reg_addr(pt, ar_unat); 1007 ptr = pt_reg_addr(pt, ar_unat);
1004 break; 1008 break;
@@ -1234,7 +1238,7 @@ ptrace_getregs (struct task_struct *child, struct pt_all_user_regs __user *ppr)
1234static long 1238static long
1235ptrace_setregs (struct task_struct *child, struct pt_all_user_regs __user *ppr) 1239ptrace_setregs (struct task_struct *child, struct pt_all_user_regs __user *ppr)
1236{ 1240{
1237 unsigned long psr, ec, lc, rnat, bsp, cfm, nat_bits, val = 0; 1241 unsigned long psr, rsc, ec, lc, rnat, bsp, cfm, nat_bits, val = 0;
1238 struct unw_frame_info info; 1242 struct unw_frame_info info;
1239 struct switch_stack *sw; 1243 struct switch_stack *sw;
1240 struct ia64_fpreg fpval; 1244 struct ia64_fpreg fpval;
@@ -1267,7 +1271,7 @@ ptrace_setregs (struct task_struct *child, struct pt_all_user_regs __user *ppr)
1267 /* app regs */ 1271 /* app regs */
1268 1272
1269 retval |= __get_user(pt->ar_pfs, &ppr->ar[PT_AUR_PFS]); 1273 retval |= __get_user(pt->ar_pfs, &ppr->ar[PT_AUR_PFS]);
1270 retval |= __get_user(pt->ar_rsc, &ppr->ar[PT_AUR_RSC]); 1274 retval |= __get_user(rsc, &ppr->ar[PT_AUR_RSC]);
1271 retval |= __get_user(pt->ar_bspstore, &ppr->ar[PT_AUR_BSPSTORE]); 1275 retval |= __get_user(pt->ar_bspstore, &ppr->ar[PT_AUR_BSPSTORE]);
1272 retval |= __get_user(pt->ar_unat, &ppr->ar[PT_AUR_UNAT]); 1276 retval |= __get_user(pt->ar_unat, &ppr->ar[PT_AUR_UNAT]);
1273 retval |= __get_user(pt->ar_ccv, &ppr->ar[PT_AUR_CCV]); 1277 retval |= __get_user(pt->ar_ccv, &ppr->ar[PT_AUR_CCV]);
@@ -1365,6 +1369,7 @@ ptrace_setregs (struct task_struct *child, struct pt_all_user_regs __user *ppr)
1365 retval |= __get_user(nat_bits, &ppr->nat); 1369 retval |= __get_user(nat_bits, &ppr->nat);
1366 1370
1367 retval |= access_uarea(child, PT_CR_IPSR, &psr, 1); 1371 retval |= access_uarea(child, PT_CR_IPSR, &psr, 1);
1372 retval |= access_uarea(child, PT_AR_RSC, &rsc, 1);
1368 retval |= access_uarea(child, PT_AR_EC, &ec, 1); 1373 retval |= access_uarea(child, PT_AR_EC, &ec, 1);
1369 retval |= access_uarea(child, PT_AR_LC, &lc, 1); 1374 retval |= access_uarea(child, PT_AR_LC, &lc, 1);
1370 retval |= access_uarea(child, PT_AR_RNAT, &rnat, 1); 1375 retval |= access_uarea(child, PT_AR_RNAT, &rnat, 1);
diff --git a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c
index 499b7e5317cf..edd9f07860b2 100644
--- a/arch/ia64/kernel/signal.c
+++ b/arch/ia64/kernel/signal.c
@@ -94,7 +94,7 @@ sys_sigaltstack (const stack_t __user *uss, stack_t __user *uoss, long arg2,
94static long 94static long
95restore_sigcontext (struct sigcontext __user *sc, struct sigscratch *scr) 95restore_sigcontext (struct sigcontext __user *sc, struct sigscratch *scr)
96{ 96{
97 unsigned long ip, flags, nat, um, cfm; 97 unsigned long ip, flags, nat, um, cfm, rsc;
98 long err; 98 long err;
99 99
100 /* Always make any pending restarted system calls return -EINTR */ 100 /* Always make any pending restarted system calls return -EINTR */
@@ -106,7 +106,7 @@ restore_sigcontext (struct sigcontext __user *sc, struct sigscratch *scr)
106 err |= __get_user(ip, &sc->sc_ip); /* instruction pointer */ 106 err |= __get_user(ip, &sc->sc_ip); /* instruction pointer */
107 err |= __get_user(cfm, &sc->sc_cfm); 107 err |= __get_user(cfm, &sc->sc_cfm);
108 err |= __get_user(um, &sc->sc_um); /* user mask */ 108 err |= __get_user(um, &sc->sc_um); /* user mask */
109 err |= __get_user(scr->pt.ar_rsc, &sc->sc_ar_rsc); 109 err |= __get_user(rsc, &sc->sc_ar_rsc);
110 err |= __get_user(scr->pt.ar_unat, &sc->sc_ar_unat); 110 err |= __get_user(scr->pt.ar_unat, &sc->sc_ar_unat);
111 err |= __get_user(scr->pt.ar_fpsr, &sc->sc_ar_fpsr); 111 err |= __get_user(scr->pt.ar_fpsr, &sc->sc_ar_fpsr);
112 err |= __get_user(scr->pt.ar_pfs, &sc->sc_ar_pfs); 112 err |= __get_user(scr->pt.ar_pfs, &sc->sc_ar_pfs);
@@ -119,6 +119,7 @@ restore_sigcontext (struct sigcontext __user *sc, struct sigscratch *scr)
119 err |= __copy_from_user(&scr->pt.r15, &sc->sc_gr[15], 8); /* r15 */ 119 err |= __copy_from_user(&scr->pt.r15, &sc->sc_gr[15], 8); /* r15 */
120 120
121 scr->pt.cr_ifs = cfm | (1UL << 63); 121 scr->pt.cr_ifs = cfm | (1UL << 63);
122 scr->pt.ar_rsc = rsc | (3 << 2); /* force PL3 */
122 123
123 /* establish new instruction pointer: */ 124 /* establish new instruction pointer: */
124 scr->pt.cr_iip = ip & ~0x3UL; 125 scr->pt.cr_iip = ip & ~0x3UL;
diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c
index 953095e2ce15..b49d4ddaab93 100644
--- a/arch/ia64/kernel/smp.c
+++ b/arch/ia64/kernel/smp.c
@@ -269,7 +269,7 @@ smp_call_function_single (int cpuid, void (*func) (void *info), void *info, int
269 int me = get_cpu(); /* prevent preemption and reschedule on another processor */ 269 int me = get_cpu(); /* prevent preemption and reschedule on another processor */
270 270
271 if (cpuid == me) { 271 if (cpuid == me) {
272 printk("%s: trying to call self\n", __FUNCTION__); 272 printk(KERN_INFO "%s: trying to call self\n", __FUNCTION__);
273 put_cpu(); 273 put_cpu();
274 return -EBUSY; 274 return -EBUSY;
275 } 275 }