From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: Andrew Murray <amurray@embedded-bits.co.uk>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
jg1.han@samsung.com, Jason Cooper <jason@lakedaemon.net>,
mohit.kumar@st.com
Subject: Re: Serialization of configuration accesses for mvebu/designware
Date: Thu, 20 Feb 2014 21:42:41 +0100 [thread overview]
Message-ID: <20140220214241.633a5a2b@skate> (raw)
In-Reply-To: <CAPcvp5FJLcpe8PunwAyjRBvzESqxx1kv4Sqy0Oqc87Gn9AY3Eg@mail.gmail.com>
Dear Andrew Murray,
On Thu, 20 Feb 2014 18:51:32 +0000, Andrew Murray wrote:
> I've noticed that the mvebu and designware both use spinlocks to
> serialize access to the configuration space (pci_ops.[read|write]).
> However the read/write ops are only ever used from the pci core
> (access.c, pci.c) where they are already protected with the pci_lock.
>
> As far as I can tell these extra spinlocks are superfluous, therefore...
>
> Can they be removed?
> Can future host bridge drivers assume that calls to the pci_ops are serialized?
Just had a quick look, and indeed all the PCI configuration space
access functions in drivers/pci/access.c seem to be taking the
pci_lock, making the internal driver lock useless. Patches welcome! :-)
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
prev parent reply other threads:[~2014-02-20 20:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-20 18:51 Serialization of configuration accesses for mvebu/designware Andrew Murray
2014-02-20 20:42 ` Thomas Petazzoni [this message]
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=20140220214241.633a5a2b@skate \
--to=thomas.petazzoni@free-electrons.com \
--cc=amurray@embedded-bits.co.uk \
--cc=jason@lakedaemon.net \
--cc=jg1.han@samsung.com \
--cc=linux-pci@vger.kernel.org \
--cc=mohit.kumar@st.com \
/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;
as well as URLs for NNTP newsgroup(s).