Re: [PATCH v1 15/25] PCI: generic: Free resource list close to where it's allocated

2016-06-20 Thread Lorenzo Pieralisi
On Mon, Jun 20, 2016 at 09:56:45AM -0700, Tyler Baker wrote: > Hi Bjorn, > > On 6 June 2016 at 16:06, Bjorn Helgaas wrote: > > Previously we allocated the PCI resource list in > > gen_pci_parse_request_of_pci_ranges(), but if we had an error, we freed it > > on error in

Re: [RFC] pci: Provide a domain limited version of pdev_fixup_irq

2016-07-21 Thread Lorenzo Pieralisi
Hi Phil, On Fri, Jul 08, 2016 at 12:49:55PM +0100, Phil Edworthy wrote: > Hi Bjorn, > > I've marked this as RFC as I guess there might be a better way to do > this, but I'm not sure how. I would appreciate your thoughts on this. There is a more generic solution to this issue, that has been

Re: [RFC] pci: Provide a domain limited version of pdev_fixup_irq

2016-08-09 Thread Lorenzo Pieralisi
my point, but I need to have another thorough look myself before commenting any further. Thanks, Lorenzo > I'll take another look at it. > > > > -Original Message- > > > From: linux-pci-ow...@vger.kernel.org [mailto:linux-pci- > > > ow...@vger.kernel.

Re: [PATCH] PCI: rcar-pcie: Fix memory leak when no PCIe card is inserted

2017-08-02 Thread Lorenzo Pieralisi
t error exit behaviour. Fixes: 90634e854079 ("PCI: rcar: Convert PCI scan API to pci_scan_root_bus_bridge()") Signed-off-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> --- drivers/pci/host/pcie-rcar.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --gi

Re: [PATCH 0/2] PCI: rcar: Misc error path fixes

2017-12-12 Thread Lorenzo Pieralisi
On Tue, Dec 12, 2017 at 11:16:58AM -0600, Bjorn Helgaas wrote: > On Thu, Dec 07, 2017 at 11:15:18AM +0100, Geert Uytterhoeven wrote: > > Hi Simon, Lorenzo, Bjorn, > > > > This patch series fixes two issues in the error path for the R-Car PCIe > > host bridge driver. > > > > The first issue

Re: [PATCH 2/2] PCI: rcar: Handle rcar_pcie_parse_request_of_pci_ranges() failures

2017-12-19 Thread Lorenzo Pieralisi
On Thu, Dec 07, 2017 at 11:15:20AM +0100, Geert Uytterhoeven wrote: > rcar_pcie_parse_request_of_pci_ranges() can fail and return an error > code, but this is not checked nor handled. > > Fix this by adding the missing error handling. > > Fixes: 5d2917d469faab72 ("PCI: rcar: Convert to DT

Re: [PATCH V2 4/5] PCI: rcar: Support runtime PM, link state L1 handling

2017-11-17 Thread Lorenzo Pieralisi
Hi Marek, On Fri, Nov 10, 2017 at 10:58:42PM +0100, Marek Vasut wrote: > From: Phil Edworthy > > Most PCIe host controllers support L0s and L1 power states via ASPM. > The R-Car hardware only supports L0s, so when the system suspends and > resumes we have to manually

Re: [PATCH 2/2] PCI: rcar: Handle rcar_pcie_parse_request_of_pci_ranges() failures

2017-12-08 Thread Lorenzo Pieralisi
CI: rcar: Convert to DT resource parsing API") > Signed-off-by: Geert Uytterhoeven <geert+rene...@glider.be> > --- > drivers/pci/host/pcie-rcar.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) Acked-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> > diff

Re: [PATCH 1/2] PCI: rcar: Fix use-after-free in probe error path

2017-12-08 Thread Lorenzo Pieralisi
car.c | 8 ++++ > 1 file changed, 4 insertions(+), 4 deletions(-) Acked-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> > diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c > index 12796eccb2befd91..52ab3cb0a0bfe065 100644 > --- a/drivers/

Re: [1/2] drivers: firmware: psci: Add psci_is_available()

2017-10-25 Thread Lorenzo Pieralisi
On Wed, Oct 11, 2017 at 10:03:01AM +0200, Geert Uytterhoeven wrote: > PSCI support may be disabled at build time (by configuration) or at > run-time (PSCI firmware not present). While CONFIG_ARM_PSCI_FW can be > used to check for build time enablement, there is currently no simple > way to check

Re: [PATCH V5] PCI: rcar: Use runtime PM to control controller clock

2018-05-14 Thread Lorenzo Pieralisi
On Mon, May 14, 2018 at 05:32:04PM +0200, Marek Vasut wrote: > On 05/01/2018 12:55 PM, Lorenzo Pieralisi wrote: > > On Fri, Apr 13, 2018 at 02:48:19PM +0200, Simon Horman wrote: > >> On Tue, Apr 10, 2018 at 06:17:04PM +0200, Marek Vasut wrote: > >>> On 04/10/2018 05:2

Re: [PATCH] PCI: rcar: Reuse generic pci_parse_request_of_pci_ranges() function

2018-05-08 Thread Lorenzo Pieralisi
On Wed, Apr 25, 2018 at 06:21:25PM +0300, Vladimir Zapolskiy wrote: > The non-functional change removes a custom function to parse and > allocate PCI resources in favour of pci_parse_request_of_pci_ranges(). > > Signed-off-by: Vladimir Zapolskiy > --- >

Re: [PATCH v3 0/5] Add R8A77980 PCIe support & some driver cleanups

2018-05-04 Thread Lorenzo Pieralisi
On Thu, May 03, 2018 at 10:32:41PM +0300, Sergei Shtylyov wrote: > Hello! > > Here's a set of 5 patches against the 'pci/rcar' branch of Lorenzo Pieralisi's > 'pci.git' repo. These are the changes needed for better R-Car gen3 support > (namely for R8A77980 support) plus some PCIe driver

Re: [PATCH V5] PCI: rcar: Use runtime PM to control controller clock

2018-05-21 Thread Lorenzo Pieralisi
On Mon, May 21, 2018 at 01:08:36PM +0200, Marek Vasut wrote: > On 05/14/2018 05:49 PM, Lorenzo Pieralisi wrote: > > On Mon, May 14, 2018 at 05:32:04PM +0200, Marek Vasut wrote: > >> On 05/01/2018 12:55 PM, Lorenzo Pieralisi wrote: > >>> On Fri, Apr 13, 2018 at 02:48:

Re: [PATCH v4 0/6] PCI: rcar: Failpath fixes

2018-05-25 Thread Lorenzo Pieralisi
th > > drivers/pci/host/pcie-rcar.c | 82 > +++- > 1 file changed, 66 insertions(+), 16 deletions(-) > > Signed-off-by: Marek Vasut <marek.vasut+rene...@gmail.com> > Cc: Geert Uytterhoeven <geert+rene...@glider.be> > Cc: Lorenzo Pieral

Re: [PATCH v4 0/6] PCI: rcar: Failpath fixes

2018-05-25 Thread Lorenzo Pieralisi
On Fri, May 25, 2018 at 11:39:08AM +0200, Geert Uytterhoeven wrote: > Hi Lorenzo, > > On Fri, May 25, 2018 at 11:35 AM, Lorenzo Pieralisi > <lorenzo.pieral...@arm.com> wrote: > > Can I retain your review tags on this series so that I can queue > > the patches ? I

Re: [PATCH v4 0/6] PCI: rcar: Failpath fixes

2018-05-25 Thread Lorenzo Pieralisi
or two weeks so it is possible that what's in pci/rcar at present will be what gets into v4.18, apologies, that's all I can do. Lorenzo > Signed-off-by: Marek Vasut <marek.vasut+rene...@gmail.com> > Cc: Geert Uytterhoeven <geert+rene...@glider.be> > Cc: Lorenzo Pieralisi <lorenzo.

Re: [PATCH 1/4] PCI: rcar: Rename rcar_pcie_parse_request_of_pci_ranges()

2018-05-24 Thread Lorenzo Pieralisi
On Thu, May 24, 2018 at 09:24:27AM +0200, Marek Vasut wrote: > On 05/23/2018 11:56 PM, Bjorn Helgaas wrote: > > On Wed, May 23, 2018 at 07:05:06PM +0200, Marek Vasut wrote: > >> On 05/23/2018 06:17 PM, Lorenzo Pieralisi wrote: > >>> On Mon, May 21, 2018 at 03:11

Re: [PATCH V3] PCI: rcar: Poll more often in rcar_pcie_wait_for_dl()

2018-05-24 Thread Lorenzo Pieralisi
On Tue, May 22, 2018 at 02:24:20PM +0200, Marek Vasut wrote: > The data link active signal usually takes ~20 uSec to be asserted, > poll the bit more often to avoid useless delays in this function. > Use udelay() instead of usleep() for such a small delay as suggested > by the timer documentation

Re: [PATCH 1/4] PCI: rcar: Rename rcar_pcie_parse_request_of_pci_ranges()

2018-05-23 Thread Lorenzo Pieralisi
On Mon, May 21, 2018 at 03:11:20PM +0200, Marek Vasut wrote: > The function name is just too confusing, rename it, no functional change. > Rename the function to rcar_pcie_alloc_and_parse_pci_resource_list() as > it's matching failpath function is pci_free_resource_list() so the names > align much

Re: [PATCH V2 4/5] PCI: rcar: Support runtime PM, link state L1 handling

2018-06-14 Thread Lorenzo Pieralisi
On Wed, Jun 13, 2018 at 12:25:59PM -0500, Bjorn Helgaas wrote: > On Wed, Jun 13, 2018 at 04:52:52PM +0100, Lorenzo Pieralisi wrote: > > On Wed, Jun 13, 2018 at 08:53:08AM -0500, Bjorn Helgaas wrote: > > > On Wed, Jun 13, 2018 at 01:54:51AM +0200, Marek Vasut wrote: > > &g

Re: [PATCH V2 4/5] PCI: rcar: Support runtime PM, link state L1 handling

2018-06-13 Thread Lorenzo Pieralisi
On Wed, Jun 13, 2018 at 08:53:08AM -0500, Bjorn Helgaas wrote: > On Wed, Jun 13, 2018 at 01:54:51AM +0200, Marek Vasut wrote: > > On 06/11/2018 03:59 PM, Bjorn Helgaas wrote: > > > On Sun, Jun 10, 2018 at 03:57:10PM +0200, Marek Vasut wrote: > > >> On 11/17/2017 06:

Re: [PATCH] pci: fix I/O space page leak

2018-07-02 Thread Lorenzo Pieralisi
On Sat, Jun 30, 2018 at 01:37:18PM +0300, Sergei Shtylyov wrote: > Hello! > > On 6/28/2018 5:26 PM, Lorenzo Pieralisi wrote: > > >>>When testing the R-Car PCIe driver on the Condor board, I noticed that iff > >>>I left the PCIe PHY driver disable

Re: [PATCH] pci: fix I/O space page leak

2018-07-02 Thread Lorenzo Pieralisi
On Mon, Jul 02, 2018 at 01:08:45PM +0200, Geert Uytterhoeven wrote: > Hi Lorenzo, > > On Mon, Jul 2, 2018 at 12:31 PM Lorenzo Pieralisi > wrote: > > On Sat, Jun 30, 2018 at 01:37:18PM +0300, Sergei Shtylyov wrote: > > > On 6/28/2018 5:26 PM, Lorenzo Pieralisi wrote:

Re: [PATCH V3] PCI: rcar: Clean up the macros

2018-05-01 Thread Lorenzo Pieralisi
On Tue, May 01, 2018 at 07:53:19AM +0200, Simon Horman wrote: > On Sun, Apr 08, 2018 at 08:04:31PM +0200, Marek Vasut wrote: > > This patch replaces the (1 << n) with BIT(n) and cleans up whitespace, > > no functional change. > > > > Signed-off-by: Marek Vasut > >

Re: [PATCH v2 0/5] Add R8A77980 PCIe support & some driver cleanups

2018-05-01 Thread Lorenzo Pieralisi
On Tue, May 01, 2018 at 07:55:53AM +0200, Simon Horman wrote: > On Sun, Apr 08, 2018 at 08:57:13PM +0300, Sergei Shtylyov wrote: > > Hello! > > > > Here's a set of 5 patches against the 'pci/rcar' branch of Lorenzo > > Pieralisi's > > 'pci.git' repo. These are the changes needed for better R-Car

Re: [PATCH V5] PCI: rcar: Use runtime PM to control controller clock

2018-05-01 Thread Lorenzo Pieralisi
On Fri, Apr 13, 2018 at 02:48:19PM +0200, Simon Horman wrote: > On Tue, Apr 10, 2018 at 06:17:04PM +0200, Marek Vasut wrote: > > On 04/10/2018 05:28 PM, Geert Uytterhoeven wrote: > > ... > > > >>> rcar_pcie_get_resources() is called while the device is > > >>> runtime-enabled/resumed, > > >>>

Re: [PATCH v2 0/5] Add R8A77980 PCIe support & some driver cleanups

2018-05-03 Thread Lorenzo Pieralisi
On Thu, May 03, 2018 at 06:26:43PM +0300, Sergei Shtylyov wrote: > On 05/01/2018 01:57 PM, Lorenzo Pieralisi wrote: > > >>> Hello! > >>> > >>> Here's a set of 5 patches against the 'pci/rcar' branch of Lorenzo > >>> Pieralisi's > >>

Re: [PATCH] PCI: rcar-gen2: remove duplicated bit-wise or of RCAR_PCI_INT_SIGRETABORT

2018-02-23 Thread Lorenzo Pieralisi
On Fri, Feb 23, 2018 at 12:29:49PM +, Colin King wrote: > From: Colin Ian King > > Bit pattern RCAR_PCI_INT_SIGRETABORT is being bit-wise or'd twice; > remove the redundant 2nd RCAR_PCI_INT_SIGRETABORT. > > Signed-off-by: Colin Ian King >

Re: [PATCH V2 4/5] PCI: rcar: Support runtime PM, link state L1 handling

2018-08-14 Thread Lorenzo Pieralisi
On Wed, Jun 13, 2018 at 12:25:59PM -0500, Bjorn Helgaas wrote: > Putting this workaround in the config accessor makes sense to me > because in this situation the endpoint thinks it's in L1 and it won't > receive TLPs for config accesses. Apparently forcing the RP to L1 > completes the L1

Re: [PATCH V2 4/5] PCI: rcar: Support runtime PM, link state L1 handling

2018-08-20 Thread Lorenzo Pieralisi
On Mon, Aug 20, 2018 at 01:44:48PM +, Phil Edworthy wrote: [...] > However, both before and after this patch, the RP does not transition L1 > when the endpoints change to L1. > This patch only transitions the RP to L1 during accessing a card's > config registers, if the RP is not in L1 link

Re: [PATCH V2 4/5] PCI: rcar: Support runtime PM, link state L1 handling

2018-08-21 Thread Lorenzo Pieralisi
On Tue, Aug 21, 2018 at 08:58:38AM +, Phil Edworthy wrote: > Hi Lorenzo, > > On 20 August 2018 15:48 Lorenzo Pieralisi wrote: > > On Mon, Aug 20, 2018 at 01:44:48PM +, Phil Edworthy wrote: > > > > [...] > > > > > However, both before and af

Re: [PATCH] drivers/firmware: psci_checker: stash and use topology_core_cpumask for hotplug tests

2018-07-18 Thread Lorenzo Pieralisi
a1a91a9a4 ("arm64: smp: remove cpu and numa topology > information when hotplugging out CPU") > Reported-by: Geert Uytterhoeven > Tested-by: Geert Uytterhoeven > Cc: Mark Rutland > Cc: Lorenzo Pieralisi > Signed-off-by: Sudeep Holla > --- > drivers/firmware/psci

Re: [PATCH v2] drivers/firmware: psci_checker: stash and use topology_core_cpumask for hotplug tests

2018-07-19 Thread Lorenzo Pieralisi
a1a91a9a4 ("arm64: smp: remove cpu and numa topology > information when hotplugging out CPU") > Reported-by: Geert Uytterhoeven > Tested-by: Geert Uytterhoeven > Cc: Mark Rutland > Cc: Lorenzo Pieralisi > Signed-off-by: Sudeep Holla > --- > drivers/firmware/

Re: [PATCH 0/8] Fix PCI I/O space page leaks

2018-07-16 Thread Lorenzo Pieralisi
On Sun, Jul 15, 2018 at 07:00:21PM +0300, Sergei Shtylyov wrote: > Hello! > > Here's a set of 8 patches against the 'pci/controller-fixes' branch of Lorenzo > Pieralisi's 'pci.git' repo. They are the fixes for the PCI I/O space page > leaks > (and the kernel BUG caused by them on deferred

Re: [PATCH V3] PCI: rcar: Use runtime PM to control controller clock

2018-03-13 Thread Lorenzo Pieralisi
Hi Marek, On Fri, Nov 10, 2017 at 10:54:11PM +0100, Marek Vasut wrote: > From: Dien Pham > > The controller clock can be switched off during suspend/resume, > let runtime PM take care of that. > > Signed-off-by: Dien Pham >

Re: [PATCH] PCI: fix semicolon.cocci warnings

2018-03-14 Thread Lorenzo Pieralisi
On Wed, Mar 07, 2018 at 09:34:29AM +0100, Julia Lawall wrote: > From: Fengguang Wu > > Remove unneeded semicolon. > > Generated by: scripts/coccinelle/misc/semicolon.cocci > > Signed-off-by: Fengguang Wu > Signed-off-by: Julia Lawall

Re: [PATCH v2] dt-bindings: PCI: rcar: Add device tree support for r8a7743

2018-03-06 Thread Lorenzo Pieralisi
On Tue, Nov 14, 2017 at 09:59:03AM +, Biju Das wrote: > Add support for r8a7743. The Renesas RZ/G1M(R8A7743)PCIe controller > is identical to the R-Car Gen2 family. > > No driver change is needed due to the fallback compatible value > "renesas,pcie-rcar-gen2". > Adding the SoC-specific

Re: [PATCH V5] PCI: rcar: Use runtime PM to control controller clock

2018-04-13 Thread Lorenzo Pieralisi
On Fri, Apr 13, 2018 at 02:48:19PM +0200, Simon Horman wrote: > On Tue, Apr 10, 2018 at 06:17:04PM +0200, Marek Vasut wrote: > > On 04/10/2018 05:28 PM, Geert Uytterhoeven wrote: > > ... > > > >>> rcar_pcie_get_resources() is called while the device is > > >>> runtime-enabled/resumed, > > >>>

Re: [PATCH] pci: fix I/O space page leak

2018-06-28 Thread Lorenzo Pieralisi
On Thu, Jun 28, 2018 at 08:22:59AM -0500, Bjorn Helgaas wrote: > On Wed, Jun 20, 2018 at 08:51:37PM +0300, Sergei Shtylyov wrote: > > When testing the R-Car PCIe driver on the Condor board, I noticed that iff > > I left the PCIe PHY driver disabled, the kernel crashed with this BUG: > > > > [

Re: [PATCH v4 6/6] PCI: rcar: Shut the PHY down in failpath

2018-06-29 Thread Lorenzo Pieralisi
which starts the PHY, yet has no counterpart in the failpath. > Add that counterpart. > > Signed-off-by: Marek Vasut > Cc: Geert Uytterhoeven > Cc: Lorenzo Pieralisi > Cc: Phil Edworthy > Cc: Simon Horman > Cc: Wolfram Sang > Cc: linux-renesas-soc@vger.kernel.org >

Re: [PATCH] PCI: rcar: Clean up PHY init on failure

2018-06-29 Thread Lorenzo Pieralisi
Reported-by: Geert Uytterhoeven > Cc: Geert Uytterhoeven > Cc: Lorenzo Pieralisi > Cc: Phil Edworthy > Cc: Simon Horman > Cc: Wolfram Sang > Cc: linux-renesas-soc@vger.kernel.org > Fixes: 517ca93a7159 ("PCI: rcar: Add R-Car gen3 PHY support") > --- > drive

Re: [PATCH] dt-bindings: PCI: rcar: Add device tree support for r8a7744

2018-10-12 Thread Lorenzo Pieralisi
On Mon, Oct 08, 2018 at 09:34:45AM +0200, Simon Horman wrote: > On Thu, Oct 04, 2018 at 05:07:47PM +0100, Biju Das wrote: > > Add support for r8a7744. The Renesas RZ/G1N (R8A7744) PCIe controller > > is identical to the R-Car Gen2 family. > > > > Signed-off-by: Biju Das > > Reviewed-by: Chris

Re: [PATCH] DT: pci: rcar-pci: document R8A77990 bindings

2018-10-02 Thread Lorenzo Pieralisi
On Sat, Sep 22, 2018 at 05:02:52PM +0200, Marek Vasut wrote: > From: Tho Vu > > Document the R-Car E3 (R8A77990) SoC in the R-Car PCIe bindings. > > Signed-off-by: Tho Vu > Signed-off-by: Kazuya Mizuguchi > Signed-off-by: Marek Vasut > Cc: Geert Uytterhoeven >

Re: [PATCH][RFC] PCI: rcar: Add bus notifier so we can limit the DMA range

2018-09-18 Thread Lorenzo Pieralisi
On Tue, May 22, 2018 at 12:05:14AM +0200, Marek Vasut wrote: > From: Phil Edworthy > > The PCIe DMA controller on RCar Gen2 and earlier is on 32bit bus, > so limit the DMA range to 32bit. > > Signed-off-by: Phil Edworthy > Signed-off-by: Marek Vasut > Cc: Arnd Bergmann > Cc: Geert