X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fia64%2Fkernel%2Fsalinfo.c;h=d227fabecd023d741880d4fed93dcec60c012a3f;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=500e1050c0b7e739c526c890e4b0fe3959a307eb;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/arch/ia64/kernel/salinfo.c b/arch/ia64/kernel/salinfo.c index 500e1050c..d227fabec 100644 --- a/arch/ia64/kernel/salinfo.c +++ b/arch/ia64/kernel/salinfo.c @@ -19,6 +19,9 @@ * * Jan 28 2004 kaos@sgi.com * Periodically check for outstanding MCA or INIT records. + * + * Dec 5 2004 kaos@sgi.com + * Standardize which records are cleared automatically. */ #include @@ -230,8 +233,8 @@ salinfo_log_wakeup(int type, u8 *buffer, u64 size, int irqsafe) } } -/* Check for outstanding MCA/INIT records every 5 minutes (arbitrary) */ -#define SALINFO_TIMER_DELAY (5*60*HZ) +/* Check for outstanding MCA/INIT records every minute (arbitrary) */ +#define SALINFO_TIMER_DELAY (60*HZ) static struct timer_list salinfo_timer; static void @@ -382,8 +385,11 @@ static void salinfo_log_read_cpu(void *context) { struct salinfo_data *data = context; + sal_log_record_header_t *rh; data->log_size = ia64_sal_get_state_info(data->type, (u64 *) data->log_buffer); - if (data->type == SAL_INFO_TYPE_CPE || data->type == SAL_INFO_TYPE_CMC) + rh = (sal_log_record_header_t *)(data->log_buffer); + /* Clear corrected errors as they are read from SAL */ + if (rh->severity == sal_log_severity_corrected) ia64_sal_clear_state_info(data->type); } @@ -457,6 +463,7 @@ salinfo_log_clear_cpu(void *context) static int salinfo_log_clear(struct salinfo_data *data, int cpu) { + sal_log_record_header_t *rh; data->state = STATE_NO_DATA; if (!test_bit(cpu, &data->cpu_event)) return 0; @@ -469,10 +476,9 @@ salinfo_log_clear(struct salinfo_data *data, int cpu) data->saved_num = 0; spin_unlock_irqrestore(&data_saved_lock, flags); } - /* ia64_mca_log_sal_error_record or salinfo_log_read_cpu already cleared - * CPE and CMC errors - */ - if (data->type != SAL_INFO_TYPE_CPE && data->type != SAL_INFO_TYPE_CMC) + rh = (sal_log_record_header_t *)(data->log_buffer); + /* Corrected errors have already been cleared from SAL */ + if (rh->severity != sal_log_severity_corrected) call_on_cpu(cpu, salinfo_log_clear_cpu, data); /* clearing a record may make a new record visible */ salinfo_log_new_read(cpu, data);