diff options
author | Fenghua Yu <fenghua.yu@intel.com> | 2006-12-08 19:17:31 -0500 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2007-01-29 18:29:56 -0500 |
commit | 1138b7e2d40711b024768034beb64885994271e4 (patch) | |
tree | b175b368e75dabbbc540e2cb7add05a749056151 /include | |
parent | 539d517ad10bbaac2c04e0ee22916a360c5bcc0d (diff) |
[IA64] Itanium MC Error Injection Tool: pal_mc_error_inject() interface
This patch implements pal_mc_error_inject() interface in kernel. Both physical
mode and virtual mode are supported.
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-ia64/pal.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/include/asm-ia64/pal.h b/include/asm-ia64/pal.h index bc768153f3c9..56e9210733d6 100644 --- a/include/asm-ia64/pal.h +++ b/include/asm-ia64/pal.h | |||
@@ -89,6 +89,8 @@ | |||
89 | #define PAL_GET_PSTATE_TYPE_AVGNORESET 2 | 89 | #define PAL_GET_PSTATE_TYPE_AVGNORESET 2 |
90 | #define PAL_GET_PSTATE_TYPE_INSTANT 3 | 90 | #define PAL_GET_PSTATE_TYPE_INSTANT 3 |
91 | 91 | ||
92 | #define PAL_MC_ERROR_INJECT 276 /* Injects processor error or returns injection capabilities */ | ||
93 | |||
92 | #ifndef __ASSEMBLY__ | 94 | #ifndef __ASSEMBLY__ |
93 | 95 | ||
94 | #include <linux/types.h> | 96 | #include <linux/types.h> |
@@ -1234,6 +1236,37 @@ ia64_pal_mc_error_info (u64 info_index, u64 type_index, u64 *size, u64 *error_in | |||
1234 | return iprv.status; | 1236 | return iprv.status; |
1235 | } | 1237 | } |
1236 | 1238 | ||
1239 | /* Injects the requested processor error or returns info on | ||
1240 | * supported injection capabilities for current processor implementation | ||
1241 | */ | ||
1242 | static inline s64 | ||
1243 | ia64_pal_mc_error_inject_phys (u64 err_type_info, u64 err_struct_info, | ||
1244 | u64 err_data_buffer, u64 *capabilities, u64 *resources) | ||
1245 | { | ||
1246 | struct ia64_pal_retval iprv; | ||
1247 | PAL_CALL_PHYS_STK(iprv, PAL_MC_ERROR_INJECT, err_type_info, | ||
1248 | err_struct_info, err_data_buffer); | ||
1249 | if (capabilities) | ||
1250 | *capabilities= iprv.v0; | ||
1251 | if (resources) | ||
1252 | *resources= iprv.v1; | ||
1253 | return iprv.status; | ||
1254 | } | ||
1255 | |||
1256 | static inline s64 | ||
1257 | ia64_pal_mc_error_inject_virt (u64 err_type_info, u64 err_struct_info, | ||
1258 | u64 err_data_buffer, u64 *capabilities, u64 *resources) | ||
1259 | { | ||
1260 | struct ia64_pal_retval iprv; | ||
1261 | PAL_CALL_STK(iprv, PAL_MC_ERROR_INJECT, err_type_info, | ||
1262 | err_struct_info, err_data_buffer); | ||
1263 | if (capabilities) | ||
1264 | *capabilities= iprv.v0; | ||
1265 | if (resources) | ||
1266 | *resources= iprv.v1; | ||
1267 | return iprv.status; | ||
1268 | } | ||
1269 | |||
1237 | /* Inform PALE_CHECK whether a machine check is expected so that PALE_CHECK willnot | 1270 | /* Inform PALE_CHECK whether a machine check is expected so that PALE_CHECK willnot |
1238 | * attempt to correct any expected machine checks. | 1271 | * attempt to correct any expected machine checks. |
1239 | */ | 1272 | */ |