Re: [PATCH 1/2] vgaarb: Select a default VGA device even if there's no legacy VGA

2017-10-12 Thread Bjorn Helgaas
On Thu, Oct 12, 2017 at 12:24:10PM +0100, Julien Thierry wrote: > Hi Bjorn, > > On 06/10/17 23:24, Bjorn Helgaas wrote: > >From: Bjorn Helgaas <bhelg...@google.com> > > > >Daniel Axtens reported that on the HiSilicon D05 board, the VGA device is > &

Re: [PATCH v3 2/2] pseries/eeh: Add Pseries pcibios_bus_add_device

2017-10-12 Thread Bjorn Helgaas
[+cc Alex, Bodong, Eli, Saeed] On Thu, Oct 12, 2017 at 02:59:23PM -0500, Bryant G. Ly wrote: > On 10/12/17 1:29 PM, Bjorn Helgaas wrote: > >On Thu, Oct 12, 2017 at 03:09:53PM +1100, Michael Ellerman wrote: > >>Bjorn Helgaas <helg...@kernel.org> writes: > >> > &

Re: [PATCH v3 2/2] pseries/eeh: Add Pseries pcibios_bus_add_device

2017-10-12 Thread Bjorn Helgaas
On Thu, Oct 12, 2017 at 03:09:53PM +1100, Michael Ellerman wrote: > Bjorn Helgaas <helg...@kernel.org> writes: > > > On Fri, Sep 22, 2017 at 09:19:28AM -0500, Bryant G. Ly wrote: > >> This patch adds the machine dependent call for > >> pcibios_bus_

Re: [PATCH v3 0/2] Prepartion for SR-IOV PowerVM Enablement

2017-10-11 Thread Bjorn Helgaas
On Fri, Sep 22, 2017 at 09:19:26AM -0500, Bryant G. Ly wrote: > This patch series is to prepare for enabling SR-IOV > on pseries. It separates the calls to be machine dependent > and does not change any current functionality. > > The patch linked below which is currently in review is a

Re: [PATCH v3 2/2] pseries/eeh: Add Pseries pcibios_bus_add_device

2017-10-11 Thread Bjorn Helgaas
On Fri, Sep 22, 2017 at 09:19:28AM -0500, Bryant G. Ly wrote: > This patch adds the machine dependent call for > pcibios_bus_add_device, since the previous patch > separated the calls out between the PowerNV and PowerVM. > > The difference here is that for the PowerVM environment > we do not want

Re: [PATCH 0/5] arm64: add ls1012a and ls1046a pcie support

2017-10-11 Thread Bjorn Helgaas
On Tue, Sep 19, 2017 at 05:26:53PM +0800, Zhiqiang Hou wrote: > From: Hou Zhiqiang > > This patch set adds ls1012a MSI and PCIe support, including driver > and device tree nodes. The ls1046a's MSI support patch and PCIe > driver patch has been applied, so only adds the PCIe

[PATCH 2/2] vgaarb: Factor out EFI and fallback default device selection

2017-10-06 Thread Bjorn Helgaas
From: Bjorn Helgaas <bhelg...@google.com> The default VGA device is normally set in vga_arbiter_add_pci_device() when we call it for the first enabled device that can be accessed with the legacy VGA resources ([mem 0xa-0xb], etc.) That default device can be overridden by an EFI

[PATCH 1/2] vgaarb: Select a default VGA device even if there's no legacy VGA

2017-10-06 Thread Bjorn Helgaas
From: Bjorn Helgaas <bhelg...@google.com> Daniel Axtens reported that on the HiSilicon D05 board, the VGA device is behind a bridge that doesn't support PCI_BRIDGE_CTL_VGA, so the VGA arbiter never selects it as the default, which means Xorg auto-detection doesn't work. VGA is a lega

[PATCH 0/2] vgaarb: Select fallback default VGA device

2017-10-06 Thread Bjorn Helgaas
(and the EFI override) from vga_arb_device_init() to make it easier to read. --- Bjorn Helgaas (2): vgaarb: Select a default VGA device even if there's no legacy VGA vgaarb: Factor out EFI and fallback default device selection arch/powerpc/kernel/pci-common.c | 12 -- drivers/gpu/vga

Re: [PATCH v3 0/3] Split default display handling out from VGA arbiter

2017-10-06 Thread Bjorn Helgaas
On Wed, Sep 27, 2017 at 01:52:55PM +1000, Daniel Axtens wrote: > Hi Bjorn, > > Yes, this works: > > Tested-by: Daniel Axtens # arm64, ppc64-qemu-tcg I guess I was assuming you'd pick this up, but that doesn't really make sense because I didn't give you a signed-off-by or

[PATCH 4/4] alpha/PCI: Make pdev_save_srm_config() static

2017-10-05 Thread Bjorn Helgaas
From: Bjorn Helgaas <bhelg...@google.com> pdev_save_srm_config() and struct pdev_srm_saved_conf are only used in arch/alpha/kernel/pci.c, so make them static there. Signed-off-by: Bjorn Helgaas <bhelg...@google.com> --- arch/alpha/kernel/pci.c | 11 ++- arch/

[PATCH 3/4] PCI: Remove unused declarations

2017-10-05 Thread Bjorn Helgaas
From: Bjorn Helgaas <bhelg...@google.com> Remove these unused declarations: pcibios_config_init() # never defined anywhere pcibios_scan_root()# only defined by x86 pcibios_get_irq_routing_table()# only defined by x86 pcibios_set_irq_r

[PATCH 2/4] PCI: Remove redundant pci_dev, pci_bus, resource declarations

2017-10-05 Thread Bjorn Helgaas
From: Bjorn Helgaas <bhelg...@google.com> defines struct pci_bus and struct pci_dev and includes the struct resource definition before including . Nobody includes directly, so they don't need their own declarations. Remove the redundant struct pci_dev, pci_bus, resource declarations.

[PATCH 1/4] PCI: Remove redundant pcibios_set_master() declarations

2017-10-05 Thread Bjorn Helgaas
From: Bjorn Helgaas <bhelg...@google.com> All users of pcibios_set_master() include , which already has a declaration. Remove the unnecessary declarations from the files. Signed-off-by: Bjorn Helgaas <bhelg...@google.com> --- arch/alpha/include/asm/pci.h |2 -- arch/cris

[PATCH 0/4] PCI: Cleanup unused stuff

2017-10-05 Thread Bjorn Helgaas
Sorry for the long cc list. These are pretty trivial; they just remove some unnecessary declarations across several arches. --- Bjorn Helgaas (4): PCI: Remove redundant pcibios_set_master() declarations PCI: Remove redundant pci_dev, pci_bus, resource declarations PCI: Remove

Re: [PATCH 1/2] PCI: Remove reset argument from pci_iov_{add,remove}_virtfn()

2017-09-26 Thread Bjorn Helgaas
On Wed, Sep 06, 2017 at 01:21:22AM +0200, Jan H. Schönherr wrote: > The reset argument passed to pci_iov_add_virtfn() and > pci_iov_remove_virtfn() is always zero since commit 46cb7b1bd86fc227a > ("PCI: Remove unused SR-IOV VF Migration support"). > > Remove the argument together with the

Re: [PATCH v3 0/3] Split default display handling out from VGA arbiter

2017-09-25 Thread Bjorn Helgaas
On Fri, Sep 01, 2017 at 05:27:41PM +1000, Daniel Axtens wrote: > This patch set: > > - splits the default display handling out from VGA arbiter, into its >own file and behind its own Kconfig option (and gives the functions >better names). > > - adds extra detection of default devices.

Re: [PATCH v1 1/3] powerpc/kernel: Split up pci_bus_add_device

2017-09-21 Thread Bjorn Helgaas
On Mon, Sep 18, 2017 at 02:26:49PM -0500, Bryant G. Ly wrote: > When enabling SR-IOV one might want to have their > own version of starting device drivers for the VFs. > This patch allows for SR-IOV callers to use > pci_bus_add_virtfn_device instead of generic > pci_bus_add_device. > > When

Re: [PATCH kernel] PCI: Disable IOV before pcibios_sriov_disable()

2017-08-31 Thread Bjorn Helgaas
On Wed, Aug 30, 2017 at 02:02:06PM -0500, Bjorn Helgaas wrote: > On Fri, Aug 11, 2017 at 06:19:33PM +1000, Alexey Kardashevskiy wrote: > > From: Gavin Shan <gws...@linux.vnet.ibm.com> > > > > The PowerNV platform is the only user of pcibios_sriov_disable(). >

Re: [PATCH kernel] PCI: Disable IOV before pcibios_sriov_disable()

2017-08-30 Thread Bjorn Helgaas
enabled. This effectively dropped the resource update pcibios_sriov_disable() intended to do. Disable VF memory decoding before calling pcibios_sriov_disable(). Reported-by: Carol L Soto <cls...@us.ibm.com> Tested-by: Carol L Soto <cls...@us.ibm.com> Signed-o

Re: [PATCH v2 1/1] Split VGA default device handler out of VGA arbiter

2017-08-24 Thread Bjorn Helgaas
On Thu, Aug 24, 2017 at 10:57:26AM +1000, Dave Airlie wrote: > > Yeah, maybe it's time to disconnect the "default display device" idea > > from the VGA arbiter. I have no idea what (if any) dependencies X has > > on the legacy VGA resources. I assume X works fine on power, where it > > sounds

Re: [PATCH v2 1/1] Split VGA default device handler out of VGA arbiter

2017-08-23 Thread Bjorn Helgaas
On Wed, Aug 23, 2017 at 02:48:42PM +0100, Ard Biesheuvel wrote: > On 22 August 2017 at 23:19, Bjorn Helgaas <helg...@kernel.org> wrote: > > On Mon, Aug 21, 2017 at 11:53:01AM +0100, Lorenzo Pieralisi wrote: > >> On Thu, Aug 17, 2017 at 09:30:28PM +1000, Daniel Axtens wrote:

Re: [PATCH v2 1/1] Split VGA default device handler out of VGA arbiter

2017-08-22 Thread Bjorn Helgaas
On Mon, Aug 21, 2017 at 11:53:01AM +0100, Lorenzo Pieralisi wrote: > On Thu, Aug 17, 2017 at 09:30:28PM +1000, Daniel Axtens wrote: > > A system without PCI legacy resources (e.g. ARM64) may find that no > > default/boot VGA device has been marked, because the VGA arbiter > > checks for legacy

Re: [PATCH v2 1/1] Split VGA default device handler out of VGA arbiter

2017-08-20 Thread Bjorn Helgaas
On Sun, Aug 20, 2017 at 12:08:20PM -0700, Benjamin Herrenschmidt wrote: > On Sat, 2017-08-19 at 10:47 -0500, Bjorn Helgaas wrote: > > So if ARM64 doesn't have these PCI legacy resources, does that mean an > > ARM64 host bridge cannot generate these legacy addresses on PCI? That

Re: [PATCH v2 1/1] Split VGA default device handler out of VGA arbiter

2017-08-19 Thread Bjorn Helgaas
On Thu, Aug 17, 2017 at 09:30:28PM +1000, Daniel Axtens wrote: > A system without PCI legacy resources (e.g. ARM64) Can you be a little more specific about what you mean by "a system without PCI legacy resources"? I'm not sure what the connection with ARM64 as an architecture is. My

Re: [PATCH kernel] PCI: Disable IOV before pcibios_sriov_disable()

2017-08-18 Thread Bjorn Helgaas
On Fri, Aug 18, 2017 at 08:05:42AM +1000, Alexey Kardashevskiy wrote: > On 11/08/17 18:19, Alexey Kardashevskiy wrote: > > From: Gavin Shan > > > > The PowerNV platform is the only user of pcibios_sriov_disable(). > > The IOV BAR could be shifted by

Re: [PATCH 0/4] Allow non-legacy cards to be vgaarb default

2017-08-11 Thread Bjorn Helgaas
On Tue, Jul 25, 2017 at 03:56:20PM +, Gabriele Paoloni wrote: > > Having practically zero background in gfx development (either kernel or > > Xorg), I think the problem is that vga_default_device() / > > vga_set_default_device(), which -- apparently -- "boot_vga" is based > > upon, come from

Re: [PATCH 1/3] powerpc: simplify and fix VGA default device behaviour

2017-08-11 Thread Bjorn Helgaas
On Fri, Aug 04, 2017 at 08:20:31PM +1000, Daniel Axtens wrote: > Some powerpc devices provide a PCI display that isn't picked up by > the VGA arbiter, presumably because it doesn't support the PCI > legacy VGA ranges. > > Commit c2e1d84523ad ("powerpc: Set default VGA device") introduced > an

Re: [PATCH] PCI: Convert to using %pOF instead of full_name

2017-08-11 Thread Bjorn Helgaas
[+cc Tyrel] On Wed, Aug 09, 2017 at 05:04:43PM -0500, Rob Herring wrote: > On Wed, Aug 2, 2017 at 5:39 PM, Bjorn Helgaas <helg...@kernel.org> wrote: > > On Tue, Jul 18, 2017 at 04:43:21PM -0500, Rob Herring wrote: > >> Now that we have a custom printf format

Re: [PATCH 1/3] PCI: dwc: Handle host_init failures

2017-08-03 Thread Bjorn Helgaas
On Sat, Jul 15, 2017 at 11:39:45PM -0700, Bjorn Andersson wrote: > In several dwc based drivers host_init can fail, so make sure to > propagate and handle this to avoid continuing operation of a driver or > hardware in an invalid state. > > Signed-off-by: Bjorn Andersson

Re: [PATCH] PCI: Convert to using %pOF instead of full_name

2017-08-02 Thread Bjorn Helgaas
.@kernel.org> > Cc: Thomas Petazzoni <thomas.petazz...@free-electrons.com> > Cc: Jason Cooper <ja...@lakedaemon.net> > Cc: Bjorn Helgaas <bhelg...@google.com> > Cc: Thierry Reding <thierry.red...@gmail.com> > Cc: Jonathan Hunter <jonath...@nvidia.com>

Re: [PATCH] PCI: dwc: Constify dw_pcie_host_ops structures

2017-06-12 Thread Bjorn Helgaas
On Mon, Jun 05, 2017 at 04:53:46PM +0800, Jisheng Zhang wrote: > The dw_pcie_host_ops structures are never modified. Constify these > structures such that these can be write-protected. > > Signed-off-by: Jisheng Zhang Applied with Jingoo's ack to pci/host-designware for

Re: [PATCH v11 4/7] powerpc/powernv: Override pcibios_default_alignment() to force PCI devices to be page aligned

2017-04-19 Thread Bjorn Helgaas
On Tue, Apr 18, 2017 at 9:12 PM, Yongji Xie <elohi...@gmail.com> wrote: > On 19 April 2017 at 09:47, Michael Ellerman <m...@ellerman.id.au> wrote: >> Bjorn Helgaas <bhelg...@google.com> writes: >> >>> On Mon, Apr 17, 2017 at 4:36 PM, Bjorn Helgaas <bhel

Re: [PATCH v11 4/7] powerpc/powernv: Override pcibios_default_alignment() to force PCI devices to be page aligned

2017-04-18 Thread Bjorn Helgaas
On Mon, Apr 17, 2017 at 4:36 PM, Bjorn Helgaas <bhelg...@google.com> wrote: > From: Yongji Xie <elohi...@gmail.com> > > This overrides pcibios_default_alignment() to set default alignment > to PAGE_SIZE for all PCI devices on PowerNV platform. Thus sub-page > BARs would

[PATCH v11 7/7] PCI: Don't resize resources when realigning all devices in system

2017-04-17 Thread Bjorn Helgaas
helgaas: comment, changelog] Signed-off-by: Yongji Xie <elohi...@gmail.com> Signed-off-by: Bjorn Helgaas <bhelg...@google.com> --- drivers/pci/pci.c | 59 +++-- 1 file changed, 43 insertions(+), 16 deletions(-) diff --git a/drivers/pci/pci

[PATCH v11 6/7] PCI: Don't reassign resources that are already aligned

2017-04-17 Thread Bjorn Helgaas
is already sufficiently aligned, leave it alone and don't try to reassign it. Signed-off-by: Bjorn Helgaas <bhelg...@google.com> --- drivers/pci/pci.c | 40 +++- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/drivers/pci/pci.c b/drivers

[PATCH v11 5/7] PCI: Factor pci_reassigndev_resource_alignment()

2017-04-17 Thread Bjorn Helgaas
Pull the BAR size adjustment out into a new function, pci_request_resource_alignment(), and add a comment about how and why we increase the resource size and alignment. Signed-off-by: Bjorn Helgaas <bhelg...@google.com> --- drivers/pci/pci.c

[PATCH v11 4/7] powerpc/powernv: Override pcibios_default_alignment() to force PCI devices to be page aligned

2017-04-17 Thread Bjorn Helgaas
<elohi...@gmail.com> Signed-off-by: Bjorn Helgaas <bhelg...@google.com> --- arch/powerpc/include/asm/machdep.h|2 ++ arch/powerpc/kernel/pci-common.c |8 arch/powerpc/platforms/powernv/pci-ioda.c |7 +++ 3 files changed, 17 insertions(+) diff --

[PATCH v11 3/7] PCI: Add pcibios_default_alignment() for arch-specific alignment control

2017-04-17 Thread Bjorn Helgaas
roblem. Add a weak function to set default alignment for all PCI devices. An arch can override it to force the PCI core to place memory BARs on their own pages. Signed-off-by: Yongji Xie <elohi...@gmail.com> Signed-off-by: Bjorn Helgaas <bhelg...@google.com> --- drivers/pci/pci.c |

[PATCH v11 2/7] PCI: A fix for caculating bridge window's size and alignment

2017-04-17 Thread Bjorn Helgaas
From: Yongji Xie <elohi...@gmail.com> In case that one device's alignment is greater than its size, we may get an incorrect size and alignment for its bus's memory window in pbus_size_mem(). This patch fixes this case. Signed-off-by: Yongji Xie <elohi...@gmail.com> Signed-off-by: B

[PATCH v11 1/7] PCI: Ignore requested alignment for IOV BARs

2017-04-17 Thread Bjorn Helgaas
s only determined by the VF BAR size. Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com> Signed-off-by: Bjorn Helgaas <bhelg...@google.com> Reviewed-by: Gavin Shan <gws...@linux.vnet.ibm.com> --- drivers/pci/pci.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

[PATCH v11 0/7] PCI: Introduce a way to enforce all MMIO BARs not to share PAGE_SIZE

2017-04-17 Thread Bjorn Helgaas
the same code but was posted separately. These are all on my pci/resource branch, and if all goes well, I plan to merge these for v4.12. Changelog v11: - Include patch to ignore IOV alignment - Add patches to factor out realignment - Add comment about "resize" usage --- Bjorn Helgaas (2):

Re: [PATCH v10 4/4] PCI: Don't extend device's size when using default alignment for all devices

2017-04-17 Thread Bjorn Helgaas
On Mon, Apr 17, 2017 at 1:27 AM, Yongji Xie <elohi...@gmail.com> wrote: > 2017-04-15 6:54 GMT+08:00 Bjorn Helgaas <helg...@kernel.org>: >> >> On Mon, Apr 10, 2017 at 07:58:14PM +0800, Yongji Xie wrote: >> > Currently we reassign the al

Re: [PATCH v10 3/4] powerpc/powernv: Override pcibios_default_alignment() to force PCI devices to be page aligned

2017-04-17 Thread Bjorn Helgaas
On Sat, Apr 15, 2017 at 5:06 PM, Benjamin Herrenschmidt <b...@kernel.crashing.org> wrote: > On Sat, 2017-04-15 at 11:36 -0500, Bjorn Helgaas wrote: >> > I agree in principle. I'm surprised that PowerPC is the only one >> > interested here though, what about other platfor

Re: [PATCH v10 3/4] powerpc/powernv: Override pcibios_default_alignment() to force PCI devices to be page aligned

2017-04-15 Thread Bjorn Helgaas
On Fri, Apr 14, 2017 at 4:52 PM, Benjamin Herrenschmidt <b...@kernel.crashing.org> wrote: > On Fri, 2017-04-14 at 10:58 -0500, Bjorn Helgaas wrote: >> On Mon, Apr 10, 2017 at 07:58:13PM +0800, Yongji Xie wrote: >> > This overrides pcibios_default_alignment()

Re: [PATCH v10 4/4] PCI: Don't extend device's size when using default alignment for all devices

2017-04-14 Thread Bjorn Helgaas
On Mon, Apr 10, 2017 at 07:58:14PM +0800, Yongji Xie wrote: > Currently we reassign the alignment by extending resources' size in > pci_reassigndev_resource_alignment(). This could potentially break > some drivers when the driver uses the size to locate register > whose length is related to the

Re: [PATCH v10 3/4] powerpc/powernv: Override pcibios_default_alignment() to force PCI devices to be page aligned

2017-04-14 Thread Bjorn Helgaas
On Mon, Apr 10, 2017 at 07:58:13PM +0800, Yongji Xie wrote: > This overrides pcibios_default_alignment() to set default alignment > to PAGE_SIZE for all PCI devices on PowerNV platform. Thus sub-page > BARs would not share a page and could be mapped into guest when VFIO > passthrough them. Thanks

Re: [PATCH v9 2/3] PCI: Add a macro to set default alignment for all PCI devices

2017-03-30 Thread Bjorn Helgaas
On Mon, Mar 27, 2017 at 09:25:50PM +1100, Benjamin Herrenschmidt wrote: > On Mon, 2017-03-27 at 21:17 +1100, Michael Ellerman wrote: > > > If so, is it acceptable to force that kernel to user 64K alignment > > > even > > > when it's running on non-PowerNV systems? > > > > Probably, but I'm not

Re: [PATCH v9 2/3] PCI: Add a macro to set default alignment for all PCI devices

2017-03-23 Thread Bjorn Helgaas
On Thu, Mar 23, 2017 at 03:53:42PM -0500, Bjorn Helgaas wrote: > Hi Yongji, > > On Wed, Feb 15, 2017 at 02:45:05PM +0800, Yongji Xie wrote: > > When vfio passthroughs a PCI device of which MMIO BARs are > > smaller than PAGE_SIZE, guest will not handle the mmio > >

Re: [PATCH v9 3/3] PCI: Don't extend device's size when using default alignment for all devices

2017-03-23 Thread Bjorn Helgaas
On Wed, Feb 15, 2017 at 02:45:06PM +0800, Yongji Xie wrote: > Currently we reassign the alignment by extending resources' size in > pci_reassigndev_resource_alignment(). This could potentially break > some drivers when the driver uses the size to locate register > whose length is related to the

Re: [PATCH v9 2/3] PCI: Add a macro to set default alignment for all PCI devices

2017-03-23 Thread Bjorn Helgaas
ge page sizes, e.g., PowerNV with 64K pages, BARs are more likely to share a page and performance is more of a problem. Add a macro to set default alignment for all PCI devices. An arch can set this to PAGE_SIZE to prevent memory BARs from sharing a page. [bhelgaas: add default P

Re: [PATCH v2 2/4] asm-generic/io.h: Remove unused generic __ioremap() definition

2017-03-21 Thread Bjorn Helgaas
On Tue, Mar 21, 2017 at 11:37:11AM +0100, Geert Uytterhoeven wrote: > Hi Björn, > > On Mon, Mar 20, 2017 at 7:42 PM, Bjorn Helgaas <bhelg...@google.com> wrote: > > Several arches use __ioremap() to help implement the generic ioremap(), > > ioremap_nocache(),

Re: [PATCH 0/3] pci/hotplug/pnv-php: More bug fixes

2017-02-16 Thread Bjorn Helgaas
On Fri, Feb 17, 2017 at 09:38:08AM +1100, Gavin Shan wrote: > On Thu, Feb 16, 2017 at 08:09:26AM -0600, Bjorn Helgaas wrote: > >On Thu, Feb 16, 2017 at 10:22:31AM +1100, Gavin Shan wrote: > >> This series bases on the series: https://patchwork.ozlabs.org/patch/713513. > >&g

Re: [PATCH 0/3] pci/hotplug/pnv-php: More bug fixes

2017-02-16 Thread Bjorn Helgaas
On Thu, Feb 16, 2017 at 10:22:31AM +1100, Gavin Shan wrote: > This series bases on the series: https://patchwork.ozlabs.org/patch/713513. > This series fixes couple of issues: > >* Remove WARN_ON() in pnv_php_put_slot(). The parent slot's refcount > is decreased when releasing PCI slot.

Re: [PATCH 00/10] PCI: dwc: Rework and cleanup designware driver

2017-02-15 Thread Bjorn Helgaas
On Wed, Feb 15, 2017 at 06:48:09PM +0530, Kishon Vijay Abraham I wrote: > This series reworks designware driver in preparation for adding endpoint > mode support to designware driver. > > This series was previously sent as part of endpoint support series > https://lkml.org/lkml/2017/1/13/562 > >

Re: [PATCH 1 0/4] PCI: Use of_device_get_match_data() to simplify probe

2017-02-03 Thread Bjorn Helgaas
On Tue, Jan 31, 2017 at 02:19:51PM -0600, Bjorn Helgaas wrote: > This turned into much ado about nothing, but Shailendra's hisi patch > prompted similar cleanups in other drivers. It's a minor simplification, > but I think worth doing consistently across drivers. > > Basically

[PATCH 1 4/4] PCI: rcar: Use of_device_get_match_data() to simplify probe

2017-01-31 Thread Bjorn Helgaas
urn -EINVAL, which is easy to ignore. We'd rather take the NULL pointer dereference so we notice the problem and fix it. Use of_device_get_match_data() to retrieve the hw_init_fn pointer. No functional change intended. Suggested-by: Geert Uytterhoeven <ge...@linux-m68k.org> Signed-off-by: Bjor

[PATCH 1 3/4] PCI: layerscape: Use of_device_get_match_data() to simplify probe

2017-01-31 Thread Bjorn Helgaas
The only way to call ls_pcie_probe() is to match an entry in ls_pcie_of_match[], so match cannot be NULL. Use of_device_get_match_data() to retrieve the drvdata pointer. No functional change intended. Based-on-suggestion-from: Geert Uytterhoeven <ge...@linux-m68k.org> Signed-off-by:

[PATCH 1 2/4] PCI: iproc: Use of_device_get_match_data() to simplify probe

2017-01-31 Thread Bjorn Helgaas
igned-off-by: Bjorn Helgaas <bhelg...@google.com> --- drivers/pci/host/pcie-iproc-platform.c |7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/pci/host/pcie-iproc-platform.c b/drivers/pci/host/pcie-iproc-platform.c index 22d814a78a78..f4909bb0b2ad 100644 --

[PATCH 1 1/4] PCI: hisi: Use of_device_get_match_data() to simplify probe

2017-01-31 Thread Bjorn Helgaas
h_data(), changelog] Based-on-suggestion-from: Geert Uytterhoeven <ge...@linux-m68k.org> Signed-off-by: Shailendra Verma <shailendr...@samsung.com> Signed-off-by: Bjorn Helgaas <bhelg...@google.com> --- drivers/pci/host/pcie-hisi.c |8 +++- 1 file changed, 3 insertions(

[PATCH 1 0/4] PCI: Use of_device_get_match_data() to simplify probe

2017-01-31 Thread Bjorn Helgaas
of matching something in , a subsequent of_match_device(, dev) call should never fail. Therefore, instead of this: struct of_device_id *match; match = of_match_device(, dev); ... = match->data; we can do this: ... = of_device_get_match_data(dev); --- Bjorn Helgaas (3):

Re: [PATCH v2] pci: hotplug: This patch removes unnecessary return statement using spatch tool

2017-01-11 Thread Bjorn Helgaas
On Sat, Dec 24, 2016 at 03:08:00PM +0530, Rahul Krishnan wrote: > > This patch removes unnecessary return statement using spatch tool > > Signed-off-by: Rahul Krishnan Applied to pci/hotplug for v4.11 with Tyrel's Reviewed-by, thanks! Are there other similar

Re: [PATCH v4 0/7] Disable VF's memory space on updating IOV BARs

2016-12-01 Thread Bjorn Helgaas
On Mon, Nov 28, 2016 at 10:13:41PM -0600, Bjorn Helgaas wrote: > This is a v4 of Gavin's series for handling VF BAR updates. The > important piece is the first patch ("PCI: Do any VF BAR updates before > enabling the BARs"). That makes sure that if we update VF BARs, we do &

Re: [PATCH v4 3/7] PCI: Separate VF BAR updates from standard BAR updates

2016-11-30 Thread Bjorn Helgaas
On Thu, Dec 01, 2016 at 10:02:54AM +1100, Gavin Shan wrote: > On Tue, Nov 29, 2016 at 06:06:05PM -0600, Bjorn Helgaas wrote: > >On Wed, Nov 30, 2016 at 10:20:28AM +1100, Gavin Shan wrote: > >> On Tue, Nov 29, 2016 at 08:48:26AM -0600, Bjorn Helgaas wrote: > >> >On T

Re: [PATCH v4 4/7] PCI: Don't update VF BARs while VF memory space is enabled

2016-11-30 Thread Bjorn Helgaas
[Your response didn't make it to the list, I think because it's some non-plaintext encoding that is rejected by the list (see http://vger.kernel.org/majordomo-info.html)] On Wed, Nov 30, 2016 at 11:56 AM, David Laight <david.lai...@aculab.com> wrote: > From: Bjorn Helgaas >> Se

Re: [PATCH v4 3/7] PCI: Separate VF BAR updates from standard BAR updates

2016-11-29 Thread Bjorn Helgaas
On Wed, Nov 30, 2016 at 10:20:28AM +1100, Gavin Shan wrote: > On Tue, Nov 29, 2016 at 08:48:26AM -0600, Bjorn Helgaas wrote: > >On Tue, Nov 29, 2016 at 03:55:46PM +1100, Gavin Shan wrote: > >> On Mon, Nov 28, 2016 at 10:15:06PM -0600, Bjorn Helgaas wrote: > >> >

Re: [PATCH v4 3/7] PCI: Separate VF BAR updates from standard BAR updates

2016-11-29 Thread Bjorn Helgaas
On Tue, Nov 29, 2016 at 03:55:46PM +1100, Gavin Shan wrote: > On Mon, Nov 28, 2016 at 10:15:06PM -0600, Bjorn Helgaas wrote: > >Previously pci_update_resource() used the same code path for updating > >standard BARs and VF BARs in SR-IOV capabilities. > > > >Split t

[PATCH v4 7/7] PCI: Add comments about ROM BAR updating

2016-11-28 Thread Bjorn Helgaas
look more rational. The code changes are from 755528c860b0 ("Ignore disabled ROM resources at setup") and 8085ce084c0f ("[PATCH] Fix PCI ROM mapping"). Link: https://lkml.org/lkml/2005/8/30/138 Signed-off-by: Bjorn Helgaas <bhelg...@google.com> --- drivers/pci/rom.c

[PATCH v4 6/7] PCI: Decouple IORESOURCE_ROM_ENABLE and PCI_ROM_ADDRESS_ENABLE

2016-11-28 Thread Bjorn Helgaas
. Signed-off-by: Bjorn Helgaas <bhelg...@google.com> --- drivers/pci/probe.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index ab00267..cf7670e 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -227,7 +227,8

[PATCH v4 5/7] PCI: Remove pci_resource_bar() and pci_iov_resource_bar()

2016-11-28 Thread Bjorn Helgaas
pci_std_update_resource() only deals with standard BARs, so we don't have to worry about the complications of VF BARs in an SR-IOV capability. Compute the BAR address inline and remove pci_resource_bar(). That makes pci_iov_resource_bar() unused, so remove that as well. Signed-off-by: Bjorn

[PATCH v4 4/7] PCI: Don't update VF BARs while VF memory space is enabled

2016-11-28 Thread Bjorn Helgaas
conflict with another device, and an access by a driver unrelated to the VF may cause a bus error. Warn about attempts to update VF BARs while they are enabled. This is a programming error, so use dev_WARN() to get a backtrace. Signed-off-by: Bjorn Helgaas <bhelg...@google.

[PATCH v4 3/7] PCI: Separate VF BAR updates from standard BAR updates

2016-11-28 Thread Bjorn Helgaas
() and pci_iov_resource_bar()). This patch: - Renames pci_update_resource() to pci_std_update_resource(), - Adds pci_iov_update_resource(), - Makes pci_update_resource() a wrapper that calls the appropriate one, No functional change intended. Signed-off-by: Bjorn Helgaas <bhelg...@google.

[PATCH v4 2/7] PCI: Ignore BAR updates on virtual functions

2016-11-28 Thread Bjorn Helgaas
r standard and SR-IOV BARs. Signed-off-by: Bjorn Helgaas <bhelg...@google.com> CC: Wei Yang <richard.weiy...@gmail.com> --- drivers/pci/pci.c |4 drivers/pci/setup-res.c |5 ++--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/pci/pci.c b/d

[PATCH v4 1/7] PCI: Do any VF BAR updates before enabling the BARs

2016-11-28 Thread Bjorn Helgaas
Tested-by: Carol Soto <cls...@us.ibm.com> Signed-off-by: Gavin Shan <gws...@linux.vnet.ibm.com> Signed-off-by: Bjorn Helgaas <bhelg...@google.com> --- drivers/pci/iov.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/pci/iov.c b/drivers

[PATCH v4 0/7] Disable VF's memory space on updating IOV BARs

2016-11-28 Thread Bjorn Helgaas
* Add comments about why ROMs are updated differently. v3: * Disable VF's memory space when IOV BARs are updated in pcibios_sriov_enable(). v2: * Added one patch calling pcibios_sriov_enable() before the VF and VF BARs are enabled. --- Bjorn Helgaas (6): PCI: Ignore BAR updates

Re: [PATCH v3 0/2] Disable VF's memory space on updating IOV BARs

2016-11-28 Thread Bjorn Helgaas
On Wed, Nov 23, 2016 at 05:49:10PM -0600, Bjorn Helgaas wrote: > On Wed, Oct 26, 2016 at 12:15:34PM +1100, Gavin Shan wrote: > > This moves pcibios_sriov_enable() to the point before VF and VF BARs > > are enabled on PowerNV platform. Also, pci_update_resource() is used > &g

Re: [PATCH v3 0/2] Disable VF's memory space on updating IOV BARs

2016-11-23 Thread Bjorn Helgaas
On Wed, Oct 26, 2016 at 12:15:34PM +1100, Gavin Shan wrote: > This moves pcibios_sriov_enable() to the point before VF and VF BARs > are enabled on PowerNV platform. Also, pci_update_resource() is used > to update IOV BARs on PowerNV platform, the PF might have been functional > when the function

Re: [PATCH 1/2] PCI: Add pci_set_vpd_timeout() to set VPD access timeout

2016-11-21 Thread Bjorn Helgaas
Hi Matthew, On Mon, Nov 21, 2016 at 03:09:49PM -0600, Matthew R. Ochs wrote: > The PCI core uses a fixed 50ms timeout when waiting for VPD accesses to > complete. When an access does not complete within this period, a warning > is logged and an error returned to the caller. > > While this

Re: [PATCH -next] PCI: layerscape: Remove redundant dev_err call in ls_pcie_probe()

2016-11-11 Thread Bjorn Helgaas
On Mon, Oct 17, 2016 at 02:55:40PM +, Wei Yongjun wrote: > From: Wei Yongjun > > There is a error message within devm_ioremap_resource > already, so remove the dev_err call to avoid redundant > error message. > > Signed-off-by: Wei Yongjun

Re: [PATCH v2 2/2] PCI: Don't disable PF's memory decoding when enabling SRIOV

2016-10-24 Thread Bjorn Helgaas
On Tue, Oct 25, 2016 at 12:47:28PM +1100, Gavin Shan wrote: > On Mon, Oct 24, 2016 at 09:03:16AM -0500, Bjorn Helgaas wrote: > >On Mon, Oct 24, 2016 at 10:28:02AM +1100, Gavin Shan wrote: > >> On Fri, Oct 21, 2016 at 11:50:34AM -0500, Bjorn Helgaas wrote: > >> >Hi G

Re: [PATCH v2 2/2] PCI: Don't disable PF's memory decoding when enabling SRIOV

2016-10-24 Thread Bjorn Helgaas
On Mon, Oct 24, 2016 at 10:28:02AM +1100, Gavin Shan wrote: > On Fri, Oct 21, 2016 at 11:50:34AM -0500, Bjorn Helgaas wrote: > >Hi Gavin, > > > >On Fri, Sep 30, 2016 at 09:47:50AM +1000, Gavin Shan wrote: > >> pci_update_resource() might be called to update (shift

Re: [PATCH v2 1/2] pci: Call pcibios_sriov_enable() before IOV BARs are enabled

2016-10-21 Thread Bjorn Helgaas
On Fri, Sep 30, 2016 at 09:47:49AM +1000, Gavin Shan wrote: > In current implementation, pcibios_sriov_enable() is used by PPC > PowerNV platform only. In PowerNV specific pcibios_sriov_enable(), > PF's IOV BARs might be updated (shifted) by pci_update_resource(). > It means the IOV BARs aren't

Re: [PATCH v2 2/2] PCI: Don't disable PF's memory decoding when enabling SRIOV

2016-10-21 Thread Bjorn Helgaas
Hi Gavin, On Fri, Sep 30, 2016 at 09:47:50AM +1000, Gavin Shan wrote: > pci_update_resource() might be called to update (shift) IOV BARs > in PPC PowerNV specific pcibios_sriov_enable() when enabling PF's > SRIOV capability. At that point, the PF have been functional if > the SRIOV is enabled

Re: [PATCH v2 0/7] PCI: layerscape: Cleanups

2016-10-12 Thread Bjorn Helgaas
On Wed, Oct 12, 2016 at 08:57:22AM -0500, Bjorn Helgaas wrote: > - Add local "dev" pointers to reduce repetition of things like > ">dev". > > - Remove platform drvdata because it appears unused (we called > platform_set_drvdata() but not pl

[PATCH v2 7/7] PCI: layerscape: Reorder struct ls_pcie

2016-10-12 Thread Bjorn Helgaas
Reorder struct ls_pcie to put generic fields first. No functional change intended. Signed-off-by: Bjorn Helgaas <bhelg...@google.com> --- drivers/pci/host/pci-layerscape.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/host/pci-layerscape.c b/drive

[PATCH v2 6/7] PCI: layerscape: Remove unused ls_add_pcie_port() platform_device arg

2016-10-12 Thread Bjorn Helgaas
ls_add_pcie_port() doesn't use the platform_device pointer passed to it, so remove it. No functional change intended. Signed-off-by: Bjorn Helgaas <bhelg...@google.com> --- drivers/pci/host/pci-layerscape.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drive

[PATCH v2 5/7] PCI: layerscape: Move struct pcie_port setup to probe function

2016-10-12 Thread Bjorn Helgaas
Do the basic pcie_port setup in the probe function for consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas <bhelg...@google.com> --- drivers/pci/host/pci-layerscape.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/d

[PATCH v2 4/7] PCI: layerscape: Pass device-specific struct to internal functions

2016-10-12 Thread Bjorn Helgaas
-off-by: Bjorn Helgaas <bhelg...@google.com> --- drivers/pci/host/pci-layerscape.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pci/host/pci-layerscape.c b/drivers/pci/host/pci-layerscape.c index bdafe55..2b31296 100644 --- a/drivers/pci/host/pci-layers

[PATCH v2 3/7] PCI: layerscape: Remove redundant struct ls_pcie.dbi

2016-10-12 Thread Bjorn Helgaas
Remove the struct ls_pcie.dbi member, which is a duplicate of the generic pp.dbi_base member. No functional change intended. Signed-off-by: Bjorn Helgaas <bhelg...@google.com> --- drivers/pci/host/pci-layerscape.c | 24 +++- 1 file changed, 11 insertions(+), 13 del

[PATCH v2 2/7] PCI: layerscape: Remove unused platform data

2016-10-12 Thread Bjorn Helgaas
The layerscape driver never uses the platform drvdata pointer, so don't bother setting it. No functional change intended. Signed-off-by: Bjorn Helgaas <bhelg...@google.com> --- drivers/pci/host/pci-layerscape.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/pci/ho

[PATCH v2 1/7] PCI: layerscape: Add local struct device pointers

2016-10-12 Thread Bjorn Helgaas
Use a local "struct device *dev" for brevity and consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas <bhelg...@google.com> --- drivers/pci/host/pci-layerscape.c | 26 +++--- 1 file changed, 15 insertions(+), 11 de

[PATCH v2 0/7] PCI: layerscape: Cleanups

2016-10-12 Thread Bjorn Helgaas
e it was a lot of churn for questionable benefit: PCI: layerscape: Name private struct pointer "ls" consistently --- Bjorn Helgaas (7): PCI: layerscape: Add local struct device pointers PCI: layerscape: Remove unused platform data PCI: layerscape: Remove redundant struct ls_pci

Re: [PATCH 1/7] PCI: layerscape: Name private struct pointer "ls" consistently

2016-10-07 Thread Bjorn Helgaas
On Fri, Oct 07, 2016 at 05:05:05PM +, Roy Zang wrote: > On 10/07/2016 11:42 AM, Bjorn Helgaas wrote: > > Use a device-specific name, "ls", for struct ls_pcie pointers > > to hint that this is device-specific information. No functional change > > intended. >

[PATCH 7/7] PCI: layerscape: Remove unused ls_add_pcie_port() platform_device arg

2016-10-07 Thread Bjorn Helgaas
ls_add_pcie_port() doesn't use the platform_device pointer passed to it, so remove it. No functional change intended. Signed-off-by: Bjorn Helgaas <bhelg...@google.com> --- drivers/pci/host/pci-layerscape.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drive

[PATCH 6/7] PCI: layerscape: Move struct pcie_port setup to probe function

2016-10-07 Thread Bjorn Helgaas
Do the basic pcie_port setup in the probe function for consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas <bhelg...@google.com> --- drivers/pci/host/pci-layerscape.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff

[PATCH 5/7] PCI: layerscape: Add local struct device pointers

2016-10-07 Thread Bjorn Helgaas
Use a local "struct device *dev" for brevity and consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas <bhelg...@google.com> --- drivers/pci/host/pci-layerscape.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff

[PATCH 4/7] PCI: layerscape: Reorder struct ls_pcie

2016-10-07 Thread Bjorn Helgaas
Reorder struct ls_pcie to put generic fields first. No functional change intended. Signed-off-by: Bjorn Helgaas <bhelg...@google.com> --- drivers/pci/host/pci-layerscape.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/host/pci-layerscape.c b/drive

[PATCH 3/7] PCI: layerscape: Remove redundant struct ls_pcie.dbi

2016-10-07 Thread Bjorn Helgaas
Remove the struct ls_pcie.dbi member, which is a duplicate of the generic pp.dbi_base member. No functional change intended. Signed-off-by: Bjorn Helgaas <bhelg...@google.com> --- drivers/pci/host/pci-layerscape.c | 24 +++- 1 file changed, 11 insertions(+), 13 del

[PATCH 2/7] PCI: layerscape: Pass device-specific struct to internal functions

2016-10-07 Thread Bjorn Helgaas
-off-by: Bjorn Helgaas <bhelg...@google.com> --- drivers/pci/host/pci-layerscape.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pci/host/pci-layerscape.c b/drivers/pci/host/pci-layerscape.c index a1dccb0..85a90f1e 100644 --- a/drivers/pci/host/pci-layers

[PATCH 1/7] PCI: layerscape: Name private struct pointer "ls" consistently

2016-10-07 Thread Bjorn Helgaas
Use a device-specific name, "ls", for struct ls_pcie pointers to hint that this is device-specific information. No functional change intended. Signed-off-by: Bjorn Helgaas <bhelg...@google.com> --- drivers/pci/host/pci-layerscape.c | 86 +++--

<    1   2   3   4   5   6   7   8   9   >