# This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/06/16 16:04:19-07:00 kaos@sgi.com # [PATCH] ia64: Support SN platform specific error features # # The SN prom supports fine grained error handling features, the OS needs # to tell the prom if the OS expects to use these platform specific # features. # # Signed-off-by: Keith Owens # Signed-off-by: David Mosberger # # include/asm-ia64/sn/sn_sal.h # 2004/06/16 06:14:42-07:00 kaos@sgi.com +34 -0 # ia64: Support SN platform specific error features # # arch/ia64/sn/kernel/setup.c # 2004/06/16 06:14:42-07:00 kaos@sgi.com +22 -1 # ia64: Support SN platform specific error features # Index: linux/arch/ia64/sn/kernel/setup.c =================================================================== --- linux.orig/arch/ia64/sn/kernel/setup.c 2004-11-01 14:31:42.000000000 -0600 +++ linux/arch/ia64/sn/kernel/setup.c 2004-11-01 16:01:35.000000000 -0600 @@ -234,6 +234,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 * @@ -320,6 +340,9 @@ master_node_bedrock_address); } + /* Tell the prom how to handle certain error types */ + sn_set_error_handling_features(); + /* * we set the default root device to /dev/hda * to make simulation easy Index: linux/include/asm-ia64/sn/sn_sal.h =================================================================== --- linux.orig/include/asm-ia64/sn/sn_sal.h 2004-11-01 14:31:42.000000000 -0600 +++ linux/include/asm-ia64/sn/sn_sal.h 2004-11-01 16:02:37.000000000 -0600 @@ -31,6 +31,7 @@ #define SN_SAL_NO_FAULT_ZONE_VIRTUAL 0x02000010 #define SN_SAL_NO_FAULT_ZONE_PHYSICAL 0x02000011 #define SN_SAL_PRINT_ERROR 0x02000012 +#define SN_SAL_SET_ERROR_HANDLING_FEATURES 0x0200001a // reentrant #define SN_SAL_GET_FIT_COMPT 0x0200001b // reentrant #define SN_SAL_CONSOLE_PUTC 0x02000021 #define SN_SAL_CONSOLE_GETC 0x02000022 @@ -108,6 +109,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 @@ -695,6 +709,26 @@ } /* + * 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 * controller network via the system controller device associated with * 'nasid'. Return the subchannel number or a negative error code.