Re: [PATCH 2.4] salinfo patch

From: Keith Owens <kaos_at_sgi.com>
Date: 2003-12-24 17:26:38
On Tue, 23 Dec 2003 17:37:48 -0800, 
Ben Woodard <ben@zork.net> wrote:
>Wouldn't a better way to fix this potential problem to add:
>...
>That way each and every ia64_sal_get_state_info() has a corresponding
>ia64_sal_clear_state_info().

The idea is right, the patch needed a bit of cleaning up.
Bjorn/DavidM, please apply, the patch fits both 2.4 and 2.6 (with
offsets).  Credit to Ben Woodard <ben@zork.net>.

Avoid double clear of CMC/CPE records.

--- linux/arch/ia64/kernel/salinfo.c	Wed Dec 24 17:16:12 2003
+++ linux/arch/ia64/kernel/salinfo.c	Wed Dec 24 17:15:08 2003
@@ -356,6 +356,8 @@
 {
 	struct salinfo_data *data = context;
 	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)
+		ia64_sal_clear_state_info(data->type);
 }
 
 static void
@@ -448,8 +450,11 @@
 		data->saved_num = 0;
 		spin_unlock_irqrestore(&data_saved_lock, flags);
 	}
-	call_on_cpu(cpu, salinfo_log_clear_cpu, data);
-
+	/* 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)
+		call_on_cpu(cpu, salinfo_log_clear_cpu, data);
 	/* clearing a record may make a new record visible */
 	salinfo_log_new_read(cpu, data);
 	if (data->state == STATE_LOG_RECORD &&

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Dec 24 01:27:36 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:21 EST