From: Rob Herring <robh@kernel.org>
To: Andreas Mohr <andi@lisas.de>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
Will Deacon <will.deacon@arm.com>, Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH] pci: introduce common pci config space accessors
Date: Mon, 5 Jan 2015 13:26:07 -0600 [thread overview]
Message-ID: <CAL_JsqKoMHDmTjbZdoTD9gCO5x8Yqw3+8tofJ=MB0RbasnCPtQ@mail.gmail.com> (raw)
In-Reply-To: <20150105184821.GA703@rhlx01.hs-esslingen.de>
On Mon, Jan 5, 2015 at 12:48 PM, Andreas Mohr <andi@lisas.de> wrote:
> Hi,
>
>> + if (size == 1)
>> + *val = readb(addr);
>> + else if (size == 2)
>> + *val = readw(addr);
>> + else
>> + *val = readl(addr);
> (pci_generic_config_read() and pci_generic_config_write())
>
> switch()
> default: WARN_ON(1);
> ?
If you look at PCI_OP_READ/PCI_OP_WRITE defines, the caller can only
have size of 1, 2 or 4. AFAIK, config accesses don't go thru any other
caller.
Rob
prev parent reply other threads:[~2015-01-05 19:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-05 2:19 [PATCH] pci: introduce common pci config space accessors Rob Herring
2015-01-05 9:16 ` Arnd Bergmann
2015-01-05 14:46 ` Rob Herring
2015-01-05 20:01 ` Arnd Bergmann
2015-01-05 22:28 ` Rob Herring
2015-01-06 20:39 ` Arnd Bergmann
2015-01-05 18:48 ` Andreas Mohr
2015-01-05 19:26 ` Rob Herring [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='CAL_JsqKoMHDmTjbZdoTD9gCO5x8Yqw3+8tofJ=MB0RbasnCPtQ@mail.gmail.com' \
--to=robh@kernel.org \
--cc=andi@lisas.de \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=will.deacon@arm.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).