public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@debian.org>
To: linux-ia64@vger.kernel.org
Subject: Re: SAL PCI config space
Date: Fri, 30 Apr 2004 18:23:13 +0000	[thread overview]
Message-ID: <20040430182313.GU22558@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <20040430175138.GT22558@parcelfarce.linux.theplanet.co.uk>

On Fri, Apr 30, 2004 at 11:04:44AM -0700, Luck, Tony wrote:
> >ia64_sal_pci_config_read() and ia64_sal_pci_config_write() use 
> >SAL_CALL(). This takes an IRQ-safe spinlock, but SAL 3.2 says that 
> >SAL_PCI_CONFIG_READ and SAL_PCI_CONFIG_WRITE are both MP-safe and
> >reentrant.  So is there any reason we shouldn't use SAL_CALL_REENTRANT?
> 
> Theoretically there might be older SAL implementations where these
> aren't re-entrant ... so to be really safe, you'd have to check that
> the SAL version is >= 3.2 before using the SAL_CALL_REENTRANT form.

Gack.  I went and dug up some older SAL specs.

SAL 3.1 is ambiguous.  On page 9-4, it says "Yes" under "Re-entrancy
requirement" for these calls, but then on 9-18 and 9-19, it says,
"Good programming practices dictate that indexed accesses to the
configuration space be serialized in order to be MP-safe."

(this seems rather looney to me.  how can you have something that's
reentrant but not MP-safe?  I think it's an unintended carry-over from
SAL 3.0)

SAL 3.0 states "SAL procedures are not re-entrant with respect to any
runtime service (including itself)."

So what's actually shipping in systems?  David's against runtime checks
due to some of the buggy firmware hp's managed to ship.  I agree with
him that it would have been much more sensible had the SAL spec specifid
new calls rather than changing the semantics of existing calls.

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain

  parent reply	other threads:[~2004-04-30 18:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-30 17:51 SAL PCI config space Matthew Wilcox
2004-04-30 18:04 ` Alex Williamson
2004-04-30 18:04 ` Luck, Tony
2004-04-30 18:23 ` Matthew Wilcox [this message]
2004-04-30 20:09 ` Luck, Tony
2004-04-30 20:27 ` John Lee
2004-04-30 21:45 ` Grant Grundler
2004-04-30 21:59 ` Luck, Tony
2004-04-30 22:03 ` John Lee
2004-04-30 22:06 ` John Lee

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=20040430182313.GU22558@parcelfarce.linux.theplanet.co.uk \
    --to=willy@debian.org \
    --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