Commit 0ecfaf68 authored by Keith Owens's avatar Keith Owens Committed by David Mosberger

[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: default avatarKeith Owens <kaos@sgi.com>
Signed-off-by: default avatarDavid Mosberger <davidm@hpl.hp.com>
parent 537c27f6
......@@ -226,7 +226,25 @@ sn_check_for_wars(void)
shub_1_1_found = 1;
}
/**
* 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
......@@ -318,6 +336,9 @@ sn_setup(char **cmdline_p)
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
......
......@@ -33,6 +33,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_CONSOLE_PUTC 0x02000021
#define SN_SAL_CONSOLE_GETC 0x02000022
#define SN_SAL_CONSOLE_PUTS 0x02000023
......@@ -92,6 +93,19 @@
#define SALRET_INVALID_ARG -2
#define SALRET_ERROR -3
/*
* 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,
};
/**
* sn_sal_rev_major - get the major SGI SAL revision number
......@@ -670,4 +684,24 @@ ia64_sn_sysctl_iobrick_pci_op(nasid_t n, u64 connection_type,
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;
}
#endif /* _ASM_IA64_SN_SN_SAL_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment