# This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/11/11 12:04:26-06:00 maule@attica.americas.sgi.com # sn2-mca-features # # include/asm-ia64/sn/sn_sal.h # 2004/11/01 16:02:37-06:00 maule@attica.americas.sgi.com +33 -0 # Import patch sn2-mca-features # # arch/ia64/sn/kernel/setup.c # 2004/11/01 16:01:35-06:00 maule@attica.americas.sgi.com +23 -0 # Import patch sn2-mca-features # diff -Nru a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c --- a/arch/ia64/sn/kernel/setup.c 2004-11-11 12:06:35 -06:00 +++ b/arch/ia64/sn/kernel/setup.c 2004-11-11 12:06:35 -06:00 @@ -230,6 +230,26 @@ } /** + * sn_set_error_handling_features - Tell the SN prom how to handle certain + * error types. + */ +static void __init +sn_set_error_handling_features(void) +{ + u64 ret; + u64 sn_ehf_bits[7]; /* see ia64_sn_set_error_handling_features */ + memset(sn_ehf_bits, 0, sizeof(sn_ehf_bits)); +#define EHF(x) __set_bit(SN_SAL_EHF_ ## x, sn_ehf_bits) + EHF(MCA_SLV_TO_OS_INIT_SLV); + EHF(NO_RZ_TLBC); + // Uncomment once Jesse's code goes in - EHF(NO_RZ_IO_READ); +#undef EHF + ret = ia64_sn_set_error_handling_features(sn_ehf_bits); + if (ret) + printk(KERN_ERR "%s: failed, return code %ld\n", __FUNCTION__, ret); +} + +/** * sn_setup - SN platform setup routine * @cmdline_p: kernel command line * @@ -313,6 +333,9 @@ * to make simulation easy */ ROOT_DEV = Root_HDA1; + + /* Tell the prom how to handle certain error types */ + sn_set_error_handling_features(); /* * Create the PDAs and NODEPDAs for all the cpus. diff -Nru a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h --- a/include/asm-ia64/sn/sn_sal.h 2004-11-11 12:06:35 -06:00 +++ b/include/asm-ia64/sn/sn_sal.h 2004-11-11 12:06:35 -06:00 @@ -111,6 +111,19 @@ #define SAL_IROUTER_INTR_XMIT SAL_CONSOLE_INTR_XMIT #define SAL_IROUTER_INTR_RECV SAL_CONSOLE_INTR_RECV +/* + * SN_SAL_SET_ERROR_HANDLING_FEATURES bit settings + */ +enum +{ + /* if "rz always" is set, have the mca slaves call os_init_slave */ + SN_SAL_EHF_MCA_SLV_TO_OS_INIT_SLV=0, + /* do not rz on tlb checks, even if "rz always" is set */ + SN_SAL_EHF_NO_RZ_TLBC, + /* do not rz on PIO reads to I/O space, even if "rz always" is set */ + SN_SAL_EHF_NO_RZ_IO_READ, +}; + /* * SAL Error Codes @@ -697,6 +710,26 @@ return 0; } + +/* + * Tell the prom how the OS wants to handle specific error features. + * It takes an array of 7 u64. + */ +static inline u64 +ia64_sn_set_error_handling_features(const u64 *feature_bits) +{ + struct ia64_sal_retval rv = {0, 0, 0, 0}; + + SAL_CALL_REENTRANT(rv, SN_SAL_SET_ERROR_HANDLING_FEATURES, + feature_bits[0], + feature_bits[1], + feature_bits[2], + feature_bits[3], + feature_bits[4], + feature_bits[5], + feature_bits[6]); + return rv.status; +} /* * Open a subchannel for sending arbitrary data to the system