Linux-2.6.12-rc2
[linux-3.10.git] / arch / ia64 / kernel / mca_drv_asm.S
1 /*
2  * File:        mca_drv_asm.S
3  * Purpose:     Assembly portion of Generic MCA handling
4  *
5  * Copyright (C) 2004 FUJITSU LIMITED
6  * Copyright (C) Hidetoshi Seto (seto.hidetoshi@jp.fujitsu.com)
7  */
8 #include <linux/config.h>
9 #include <linux/threads.h>
10
11 #include <asm/asmmacro.h>
12 #include <asm/processor.h>
13
14 GLOBAL_ENTRY(mca_handler_bhhook)
15         invala                                          // clear RSE ?
16         ;;                                              //
17         cover                                           // 
18         ;;                                              //
19         clrrrb                                          //
20         ;;                                              
21         alloc           r16=ar.pfs,0,2,1,0              // make a new frame
22         ;;
23         mov             r13=IA64_KR(CURRENT)            // current task pointer
24         ;;
25         adds            r12=IA64_TASK_THREAD_KSP_OFFSET,r13
26         ;;
27         ld8             r12=[r12]                       // stack pointer
28         ;;
29         mov             loc0=r16
30         movl            loc1=mca_handler_bh             // recovery C function
31         ;;
32         mov             out0=r8                         // poisoned address
33         mov             b6=loc1
34         ;;
35         mov             loc1=rp
36         ;;
37         br.call.sptk.many    rp=b6                      // not return ...
38         ;;
39         mov             ar.pfs=loc0
40         mov             rp=loc1
41         ;;
42         mov             r8=r0
43         br.ret.sptk.many rp
44         ;;
45 END(mca_handler_bhhook)