diff options
| -rw-r--r-- | arch/ia64/kernel/minstate.h | 13 | ||||
| -rw-r--r-- | arch/ia64/kernel/paravirt_inst.h | 29 | ||||
| -rw-r--r-- | include/asm-ia64/native/inst.h | 2 |
3 files changed, 38 insertions, 6 deletions
diff --git a/arch/ia64/kernel/minstate.h b/arch/ia64/kernel/minstate.h index 74b6d670aaef..292e214a3b84 100644 --- a/arch/ia64/kernel/minstate.h +++ b/arch/ia64/kernel/minstate.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #include <asm/cache.h> | 2 | #include <asm/cache.h> |
| 3 | 3 | ||
| 4 | #include "entry.h" | 4 | #include "entry.h" |
| 5 | #include "paravirt_inst.h" | ||
| 5 | 6 | ||
| 6 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 7 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
| 7 | /* read ar.itc in advance, and use it before leaving bank 0 */ | 8 | /* read ar.itc in advance, and use it before leaving bank 0 */ |
| @@ -43,16 +44,16 @@ | |||
| 43 | * Note that psr.ic is NOT turned on by this macro. This is so that | 44 | * Note that psr.ic is NOT turned on by this macro. This is so that |
| 44 | * we can pass interruption state as arguments to a handler. | 45 | * we can pass interruption state as arguments to a handler. |
| 45 | */ | 46 | */ |
| 46 | #define DO_SAVE_MIN(COVER,SAVE_IFS,EXTRA,WORKAROUND) \ | 47 | #define IA64_NATIVE_DO_SAVE_MIN(__COVER,SAVE_IFS,EXTRA,WORKAROUND) \ |
| 47 | mov r16=IA64_KR(CURRENT); /* M */ \ | 48 | mov r16=IA64_KR(CURRENT); /* M */ \ |
| 48 | mov r27=ar.rsc; /* M */ \ | 49 | mov r27=ar.rsc; /* M */ \ |
| 49 | mov r20=r1; /* A */ \ | 50 | mov r20=r1; /* A */ \ |
| 50 | mov r25=ar.unat; /* M */ \ | 51 | mov r25=ar.unat; /* M */ \ |
| 51 | mov r29=cr.ipsr; /* M */ \ | 52 | MOV_FROM_IPSR(p0,r29); /* M */ \ |
| 52 | mov r26=ar.pfs; /* I */ \ | 53 | mov r26=ar.pfs; /* I */ \ |
| 53 | mov r28=cr.iip; /* M */ \ | 54 | MOV_FROM_IIP(r28); /* M */ \ |
| 54 | mov r21=ar.fpsr; /* M */ \ | 55 | mov r21=ar.fpsr; /* M */ \ |
| 55 | COVER; /* B;; (or nothing) */ \ | 56 | __COVER; /* B;; (or nothing) */ \ |
| 56 | ;; \ | 57 | ;; \ |
| 57 | adds r16=IA64_TASK_THREAD_ON_USTACK_OFFSET,r16; \ | 58 | adds r16=IA64_TASK_THREAD_ON_USTACK_OFFSET,r16; \ |
| 58 | ;; \ | 59 | ;; \ |
| @@ -244,6 +245,6 @@ | |||
| 244 | 1: \ | 245 | 1: \ |
| 245 | .pred.rel "mutex", pKStk, pUStk | 246 | .pred.rel "mutex", pKStk, pUStk |
| 246 | 247 | ||
| 247 | #define SAVE_MIN_WITH_COVER DO_SAVE_MIN(cover, mov r30=cr.ifs, , RSE_WORKAROUND) | 248 | #define SAVE_MIN_WITH_COVER DO_SAVE_MIN(COVER, mov r30=cr.ifs, , RSE_WORKAROUND) |
| 248 | #define SAVE_MIN_WITH_COVER_R19 DO_SAVE_MIN(cover, mov r30=cr.ifs, mov r15=r19, RSE_WORKAROUND) | 249 | #define SAVE_MIN_WITH_COVER_R19 DO_SAVE_MIN(COVER, mov r30=cr.ifs, mov r15=r19, RSE_WORKAROUND) |
| 249 | #define SAVE_MIN DO_SAVE_MIN( , mov r30=r0, , ) | 250 | #define SAVE_MIN DO_SAVE_MIN( , mov r30=r0, , ) |
diff --git a/arch/ia64/kernel/paravirt_inst.h b/arch/ia64/kernel/paravirt_inst.h new file mode 100644 index 000000000000..5cad6fb2ed19 --- /dev/null +++ b/arch/ia64/kernel/paravirt_inst.h | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | /****************************************************************************** | ||
| 2 | * linux/arch/ia64/xen/paravirt_inst.h | ||
| 3 | * | ||
| 4 | * Copyright (c) 2008 Isaku Yamahata <yamahata at valinux co jp> | ||
| 5 | * VA Linux Systems Japan K.K. | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License as published by | ||
| 9 | * the Free Software Foundation; either version 2 of the License, or | ||
| 10 | * (at your option) any later version. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 20 | * | ||
| 21 | */ | ||
| 22 | |||
| 23 | #ifdef __IA64_ASM_PARAVIRTUALIZED_XEN | ||
| 24 | #include <asm/xen/inst.h> | ||
| 25 | #include <asm/xen/minstate.h> | ||
| 26 | #else | ||
| 27 | #include <asm/native/inst.h> | ||
| 28 | #endif | ||
| 29 | |||
diff --git a/include/asm-ia64/native/inst.h b/include/asm-ia64/native/inst.h index 2a50b70b969f..f1072ace0cfa 100644 --- a/include/asm-ia64/native/inst.h +++ b/include/asm-ia64/native/inst.h | |||
| @@ -20,6 +20,8 @@ | |||
| 20 | * | 20 | * |
| 21 | */ | 21 | */ |
| 22 | 22 | ||
| 23 | #define DO_SAVE_MIN IA64_NATIVE_DO_SAVE_MIN | ||
| 24 | |||
| 23 | #ifdef CONFIG_PARAVIRT_GUEST_ASM_CLOBBER_CHECK | 25 | #ifdef CONFIG_PARAVIRT_GUEST_ASM_CLOBBER_CHECK |
| 24 | # define PARAVIRT_POISON 0xdeadbeefbaadf00d | 26 | # define PARAVIRT_POISON 0xdeadbeefbaadf00d |
| 25 | # define CLOBBER(clob) \ | 27 | # define CLOBBER(clob) \ |
