From: "Derrick, Jonathan" <jonathan.derrick@intel.com>
To: "helgaas@kernel.org" <helgaas@kernel.org>,
"David.Laight@ACULAB.COM" <David.Laight@ACULAB.COM>
Cc: "heiko@sntech.de" <heiko@sntech.de>,
"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
"kw@linux.com" <kw@linux.com>,
"robh@kernel.org" <robh@kernel.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
"thomas.petazzoni@bootlin.com" <thomas.petazzoni@bootlin.com>,
"toan@os.amperecomputing.com" <toan@os.amperecomputing.com>,
"rjui@broadcom.com" <rjui@broadcom.com>,
"Jonathan.Cameron@huawei.com" <Jonathan.Cameron@huawei.com>,
"jonnyc@amazon.com" <jonnyc@amazon.com>,
"bcm-kernel-feedback-list@broadcom.com"
<bcm-kernel-feedback-list@broadcom.com>,
"sbranden@broadcom.com" <sbranden@broadcom.com>,
"nsaenzjulienne@suse.de" <nsaenzjulienne@suse.de>,
"wangzhou1@hisilicon.com" <wangzhou1@hisilicon.com>,
"rrichter@marvell.com" <rrichter@marvell.com>,
"will@kernel.org" <will@kernel.org>,
"shawn.lin@rock-chips.com" <shawn.lin@rock-chips.com>,
"linux-rpi-kernel@lists.infradead.org"
<linux-rpi-kernel@lists.infradead.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"lorenzo.pieralisi@arm.com" <lorenzo.pieralisi@arm.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"linux-rockchip@lists.infradead.org"
<linux-rockchip@lists.infradead.org>,
"paulus@samba.org" <paulus@samba.org>,
"bhelgaas@google.com" <bhelgaas@google.com>,
"michal.simek@xilinx.com" <michal.simek@xilinx.com>
Subject: Re: [PATCH v6 4/5] PCI: vmd: Update type of the __iomem pointers
Date: Mon, 30 Nov 2020 18:19:32 +0000 [thread overview]
Message-ID: <f562dfc0043763ad6df3574dc9b7f0440687e66e.camel@intel.com> (raw)
In-Reply-To: <20201130172058.GA1088391@bjorn-Precision-5520>
On Mon, 2020-11-30 at 11:20 -0600, Bjorn Helgaas wrote:
> On Mon, Nov 30, 2020 at 09:06:56AM +0000, David Laight wrote:
> > From: Krzysztof Wilczynski
> > > Sent: 29 November 2020 23:08
> > >
> > > Use "void __iomem" instead "char __iomem" pointer type when working with
> > > the accessor functions (with names like readb() or writel(), etc.) to
> > > better match a given accessor function signature where commonly the
> > > address pointing to an I/O memory region would be a "void __iomem"
> > > pointer.
> >
> > ISTM that is heading in the wrong direction.
> >
> > I think (form the variable names etc) that these are pointers
> > to specific registers.
> >
> > So what you ought to have is a type for that register block.
> > Typically this is actually a structure - to give some type
> > checking that the offsets are being used with the correct
> > base address.
>
> In this case, "cfgbar" is not really a pointer to a register; it's the
> address of memory-mapped config space. The VMD hardware turns
> accesses to that space into PCI config transactions on its secondary
> side. xgene_pcie_get_cfg_base() and brcm_pcie_map_conf() are similar
> situations and use "void *".
>
> Bjorn
Yes it's just the passthrough window for PCI config bus ops.
Reviewed-by: Jon Derrick <jonathan.derrick@intel.com>
next prev parent reply other threads:[~2020-11-30 18:20 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-29 23:07 [PATCH v6 0/5] PCI: Unify ECAM constants in native PCI Express drivers Krzysztof Wilczyński
2020-11-29 23:07 ` [PATCH v6 1/5] " Krzysztof Wilczyński
2020-11-30 11:08 ` Lorenzo Pieralisi
2020-11-30 15:30 ` Krzysztof Wilczyński
2020-11-30 18:23 ` Derrick, Jonathan
2020-12-06 20:16 ` Krzysztof Wilczyński
2020-12-07 3:25 ` Florian Fainelli
2020-12-07 20:29 ` Jim Quinlan
2020-11-29 23:07 ` [PATCH v6 2/5] PCI: thunder-pem: Add constant for custom ".bus_shit" initialiser Krzysztof Wilczyński
2020-11-29 23:07 ` [PATCH v6 3/5] PCI: iproc: Convert to use the new ECAM constants Krzysztof Wilczyński
2020-11-29 23:07 ` [PATCH v6 4/5] PCI: vmd: Update type of the __iomem pointers Krzysztof Wilczyński
2020-11-30 9:06 ` David Laight
2020-11-30 17:20 ` Bjorn Helgaas
2020-11-30 18:19 ` Derrick, Jonathan [this message]
2020-11-29 23:07 ` [PATCH v6 5/5] PCI: xgene: Removed unused ".bus_shift" initialisers from pci-xgene.c Krzysztof Wilczyński
2020-12-01 15:34 ` [PATCH v6 0/5] PCI: Unify ECAM constants in native PCI Express drivers Lorenzo Pieralisi
2020-12-08 15:41 ` Michael Walle
2020-12-08 21:06 ` Bjorn Helgaas
2020-12-08 21:11 ` Michael Walle
2020-12-09 12:36 ` Bjorn Helgaas
2020-12-09 13:08 ` Michael Walle
2020-12-09 14:57 ` Bjorn Helgaas
2020-12-09 15:40 ` Michael Walle
2020-12-09 20:29 ` Vladimir Oltean
2020-12-09 20:59 ` Bjorn Helgaas
2020-12-09 21:20 ` Vladimir Oltean
2020-12-09 21:34 ` Bjorn Helgaas
2020-12-09 21:43 ` Vladimir Oltean
2020-12-09 22:05 ` Bjorn Helgaas
2020-12-10 17:38 ` Bjorn Helgaas
2020-12-10 19:58 ` Michael Walle
2020-12-08 16:07 ` Qian Cai
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=f562dfc0043763ad6df3574dc9b7f0440687e66e.camel@intel.com \
--to=jonathan.derrick@intel.com \
--cc=David.Laight@ACULAB.COM \
--cc=Jonathan.Cameron@huawei.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=bhelgaas@google.com \
--cc=f.fainelli@gmail.com \
--cc=heiko@sntech.de \
--cc=helgaas@kernel.org \
--cc=jonnyc@amazon.com \
--cc=kw@linux.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=michal.simek@xilinx.com \
--cc=nsaenzjulienne@suse.de \
--cc=paulus@samba.org \
--cc=rjui@broadcom.com \
--cc=robh@kernel.org \
--cc=rrichter@marvell.com \
--cc=sbranden@broadcom.com \
--cc=shawn.lin@rock-chips.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=toan@os.amperecomputing.com \
--cc=wangzhou1@hisilicon.com \
--cc=will@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;
as well as URLs for NNTP newsgroup(s).