From: Zoltan Menyhart <Zoltan.Menyhart@bull.net>
To: linux-ia64@vger.kernel.org
Subject: SAL calling conventions + locking
Date: Fri, 09 Dec 2005 16:42:22 +0000 [thread overview]
Message-ID: <4399B3EE.6050408@bull.net> (raw)
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
next reply other threads:[~2005-12-09 16:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-09 16:42 Zoltan Menyhart [this message]
2005-12-09 17:03 ` SAL calling conventions + locking Luck, Tony
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4399B3EE.6050408@bull.net \
--to=zoltan.menyhart@bull.net \
--cc=linux-ia64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox