From: "Liviu Dudau" <liviu@dudau.co.uk>
To: Kumar Gala <galak@codeaurora.org>
Cc: Rob Herring <robherring2@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
Grant Likely <grant.likely@linaro.org>,
Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Bjorn Helgaas <bhelgaas@google.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
linux-arm-msm <linux-arm-msm@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Kishon Vijay Abraham I <kishon@ti.com>
Subject: Re: [PATCH] of: treat PCI config space as IORESOURCE_MEM type
Date: Fri, 30 May 2014 01:56:03 +0100 [thread overview]
Message-ID: <20140530005602.GE1677@bart.dudau.co.uk> (raw)
In-Reply-To: <47B1E3D0-4336-4529-80B0-172F4ACA5C97@codeaurora.org>
On Thu, May 29, 2014 at 03:51:28PM -0500, Kumar Gala wrote:
>
> On May 29, 2014, at 3:44 PM, Rob Herring <robherring2@gmail.com> wrote:
>
> > On Thu, May 29, 2014 at 11:03 AM, Kumar Gala <galak@codeaurora.org> wrote:
> >> If we have a PCI config space specified in something like a ranges
> >> property we should treat it as memory type resource.
> >
> > Config space should not be in ranges[1]. We have some cases that are,
> > but we don't want new ones.
>
> For the cases we have I agree, however an ECAM based cfg seems completely legit.
>
> >> Signed-off-by: Kumar Gala <galak@codeaurora.org>
> >> ---
> >> drivers/of/address.c | 3 +++
> >> 1 file changed, 3 insertions(+)
> >>
> >> diff --git a/drivers/of/address.c b/drivers/of/address.c
> >> index cb4242a..4e7ee59 100644
> >> --- a/drivers/of/address.c
> >> +++ b/drivers/of/address.c
> >> @@ -122,6 +122,9 @@ static unsigned int of_bus_pci_get_flags(const __be32 *addr)
> >> u32 w = be32_to_cpup(addr);
> >>
> >> switch((w >> 24) & 0x03) {
> >> + case 0x00: /* cfg space */
> >> + flags |= IORESOURCE_MEM;
> >> + break;
> >
> > How would you then distinguish actual memory ranges?
>
> One assumes you are still looking at pci_space as part of of_pci_range
That doesn't happen when you start scanning the bus. The existing code will
use the IORESOURCE_MEM for allocating memory space for devices, which is
not what you want. Did you test your patch on any PCI system? I'm pretty
sure that with my patch series that tries to make a generic framework for
host controllers this will fail.
We really need a IORESOURCE_CFG flag for this space.
Best regards,
Liviu
>
> >
> > Rob
> >
> > [1] http://www.spinics.net/lists/linux-pci/msg30585.html
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
>
> --
> Employee of Qualcomm Innovation Center, Inc.
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
-------------------
.oooO
( )
\ ( Oooo.
\_) ( )
) /
(_/
One small step
for me ...
WARNING: multiple messages have this Message-ID (diff)
From: liviu@dudau.co.uk (Liviu Dudau)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] of: treat PCI config space as IORESOURCE_MEM type
Date: Fri, 30 May 2014 01:56:03 +0100 [thread overview]
Message-ID: <20140530005602.GE1677@bart.dudau.co.uk> (raw)
In-Reply-To: <47B1E3D0-4336-4529-80B0-172F4ACA5C97@codeaurora.org>
On Thu, May 29, 2014 at 03:51:28PM -0500, Kumar Gala wrote:
>
> On May 29, 2014, at 3:44 PM, Rob Herring <robherring2@gmail.com> wrote:
>
> > On Thu, May 29, 2014 at 11:03 AM, Kumar Gala <galak@codeaurora.org> wrote:
> >> If we have a PCI config space specified in something like a ranges
> >> property we should treat it as memory type resource.
> >
> > Config space should not be in ranges[1]. We have some cases that are,
> > but we don't want new ones.
>
> For the cases we have I agree, however an ECAM based cfg seems completely legit.
>
> >> Signed-off-by: Kumar Gala <galak@codeaurora.org>
> >> ---
> >> drivers/of/address.c | 3 +++
> >> 1 file changed, 3 insertions(+)
> >>
> >> diff --git a/drivers/of/address.c b/drivers/of/address.c
> >> index cb4242a..4e7ee59 100644
> >> --- a/drivers/of/address.c
> >> +++ b/drivers/of/address.c
> >> @@ -122,6 +122,9 @@ static unsigned int of_bus_pci_get_flags(const __be32 *addr)
> >> u32 w = be32_to_cpup(addr);
> >>
> >> switch((w >> 24) & 0x03) {
> >> + case 0x00: /* cfg space */
> >> + flags |= IORESOURCE_MEM;
> >> + break;
> >
> > How would you then distinguish actual memory ranges?
>
> One assumes you are still looking at pci_space as part of of_pci_range
That doesn't happen when you start scanning the bus. The existing code will
use the IORESOURCE_MEM for allocating memory space for devices, which is
not what you want. Did you test your patch on any PCI system? I'm pretty
sure that with my patch series that tries to make a generic framework for
host controllers this will fail.
We really need a IORESOURCE_CFG flag for this space.
Best regards,
Liviu
>
> >
> > Rob
> >
> > [1] http://www.spinics.net/lists/linux-pci/msg30585.html
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
> > the body of a message to majordomo at vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
>
> --
> Employee of Qualcomm Innovation Center, Inc.
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
-------------------
.oooO
( )
\ ( Oooo.
\_) ( )
) /
(_/
One small step
for me ...
next prev parent reply other threads:[~2014-05-30 0:54 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-29 16:03 [PATCH] of: treat PCI config space as IORESOURCE_MEM type Kumar Gala
2014-05-29 16:03 ` Kumar Gala
2014-05-29 20:44 ` Rob Herring
2014-05-29 20:44 ` Rob Herring
2014-05-29 20:51 ` Kumar Gala
2014-05-29 20:51 ` Kumar Gala
2014-05-29 21:50 ` Rob Herring
2014-05-29 21:50 ` Rob Herring
2014-05-30 0:56 ` Liviu Dudau [this message]
2014-05-30 0:56 ` Liviu Dudau
[not found] ` <20140530005602.GE1677-hOhETlTuV5niMG9XS5x8Mg@public.gmane.org>
2014-05-30 1:29 ` Bjorn Helgaas
2014-05-30 1:29 ` Bjorn Helgaas
2014-05-30 1:29 ` Bjorn Helgaas
2014-05-30 1:41 ` Liviu Dudau
2014-05-30 1:41 ` Liviu Dudau
2014-05-30 20:37 ` Jason Gunthorpe
2014-05-30 20:37 ` Jason Gunthorpe
2014-05-30 20:44 ` Kumar Gala
2014-05-30 20:44 ` Kumar Gala
2014-05-30 20:45 ` Kumar Gala
2014-05-30 20:45 ` Kumar Gala
2014-05-30 23:11 ` Liviu Dudau
2014-05-30 23:11 ` Liviu Dudau
2014-05-30 23:16 ` Bjorn Helgaas
2014-05-30 23:16 ` Bjorn Helgaas
2014-05-30 23:30 ` Liviu Dudau
2014-05-30 23:30 ` Liviu Dudau
2014-05-31 0:36 ` Liviu Dudau
2014-05-31 0:36 ` Liviu Dudau
2014-05-31 0:36 ` [PATCH 1/2] pci: Add IORESOURCE_BIT entry for PCIe ECAM resources Liviu Dudau
2014-05-31 0:36 ` Liviu Dudau
2014-05-31 18:41 ` Arnd Bergmann
2014-05-31 18:41 ` Arnd Bergmann
2014-06-01 11:26 ` Liviu Dudau
2014-06-01 11:26 ` Liviu Dudau
2014-06-02 15:09 ` Grant Likely
2014-06-02 15:09 ` Grant Likely
2014-06-02 15:40 ` Kumar Gala
2014-06-02 15:40 ` Kumar Gala
2014-06-02 16:23 ` Grant Likely
2014-06-02 16:23 ` Grant Likely
2014-06-02 16:23 ` Grant Likely
2014-06-02 18:09 ` Kumar Gala
2014-06-02 18:09 ` Kumar Gala
2014-06-02 19:15 ` Arnd Bergmann
2014-06-02 19:15 ` Arnd Bergmann
2014-06-02 20:43 ` Kumar Gala
2014-06-02 20:43 ` Kumar Gala
2014-06-02 20:44 ` Arnd Bergmann
2014-06-02 20:44 ` Arnd Bergmann
2014-06-03 8:44 ` Grant Likely
2014-06-03 8:44 ` Grant Likely
2014-06-03 8:44 ` Grant Likely
2014-06-03 9:21 ` Arnd Bergmann
2014-06-03 9:21 ` Arnd Bergmann
2014-06-03 11:38 ` Grant Likely
2014-06-03 11:38 ` Grant Likely
2014-05-31 0:36 ` [PATCH 2/2] of: treat PCI config space as IORESOURCE_MEM type with special flags Liviu Dudau
2014-05-31 0:36 ` Liviu Dudau
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=20140530005602.GE1677@bart.dudau.co.uk \
--to=liviu@dudau.co.uk \
--cc=bhelgaas@google.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=grant.likely@linaro.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=kishon@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=robherring2@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.