public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* SAL calling conventions + locking
@ 2005-12-09 16:42 Zoltan Menyhart
  2005-12-09 17:03 ` Luck, Tony
  0 siblings, 1 reply; 2+ messages in thread
From: Zoltan Menyhart @ 2005-12-09 16:42 UTC (permalink / raw)
  To: linux-ia64

The SAL specification does say that the SAL procedures should be called
with interrupts enabled if we call them in virtual mode.

Here is the simplified CPEI handler control flow:

ia64_mca_cpe_int_handler():

	/* SAL spec states this should run w/ interrupts enabled */
	local_irq_enable();
	ia64_mca_log_sal_error_record(SAL_INFO_TYPE_CPE):

		ia64_log_get():

			IA64_LOG_LOCK():

				spin_lock_irqsave():

			ia64_sal_get_state_info();
			IA64_LOG_UNLOCK()

		salinfo_log_wakeup()
		if (rh->severity = sal_log_severity_corrected)
			ia64_sal_clear_state_info();

Despite the note "SAL spec ... w/ interrupts enabled" the interrupts
are disabled before "ia64_sal_get_state_info()" is invoked.

Can someone please tell me:
- why the spec. requires to call the SAL with interrupts enabled,
- why Linux calls the SAL with interrupts disabled,
- what happens if the SAL is called with interrupts disabled?

The second issue is:
The lock of the log is released before "salinfo_log_wakeup()" could record
the existence of the current log. Two more logs can arrive and overwrite
the current log without even indicting the loss of the information.
(E.g. CPEI-s with interrupt redirection, CMCI-s on multiple CPUs.)
Should not we keep the log lock at least while "salinfo_log_wakeup()"
executes?

Thanks.

Zoltan Menyhart

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-12-09 17:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-09 16:42 SAL calling conventions + locking Zoltan Menyhart
2005-12-09 17:03 ` Luck, Tony

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox