From: jchandra@broadcom.com (Jayachandran C.)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V1 00/11] MMCONFIG refactoring and ARM64 PCI hostbridge init based on ACPI
Date: Wed, 16 Dec 2015 18:21:37 +0530 [thread overview]
Message-ID: <20151216125136.GE5890@jayachandranc.netlogicmicro.com> (raw)
In-Reply-To: <20151209155511.GB21048@red-moon>
On Wed, Dec 09, 2015 at 03:55:11PM +0000, Lorenzo Pieralisi wrote:
> On Wed, Dec 09, 2015 at 03:31:41PM +0530, Jayachandran C. wrote:
> > [trimmed the cc list a bit]
> > On Mon, Dec 07, 2015 at 02:31:17PM -0600, Bjorn Helgaas wrote:
> > > On Tue, Oct 27, 2015 at 05:38:31PM +0100, Tomasz Nowicki wrote:
> > [...]
> > > >
> > > > Tomasz Nowicki (10):
> > > > x86, pci: Reorder logic of pci_mmconfig_insert() function
> > > > x86, pci, acpi: Move arch-agnostic MMCONFIG (aka ECAM) and ACPI code
> > > > out of arch/x86/ directory
> > > > pci, acpi, mcfg: Provide generic implementation of MCFG code
> > > > initialization.
> > > > x86, pci: mmconfig_{32,64}.c code refactoring - remove code
> > > > duplication.
> > > > x86, pci, ecam: mmconfig_64.c becomes default implementation for ECAM
> > > > driver.
> > > > pci, acpi, mcfg: Provide default RAW ACPI PCI config space accessors.
> > > > pci, acpi, ecam: Add flag to indicate whether ECAM region was hot
> > > > added or not.
> > > > x86, pci: Use previously added ECAM hot_added flag to remove ECAM
> > > > regions.
> > [...]
> > >
> > > Waiting for an updated version after all the discussion.
> >
> > Hi Bjorn,
> >
> > After looking thru the code, I don't think moving the mmconfig code out
> > of x86 and using it in ARM64 is a good idea.
> >
> > The code maintains a list of mapping of ECAM regions which can modified
> > at run time, and ends doing this sequence for doing a config access:
> >
> > rcu_read_lock();
> > addr = pci_dev_base(seg, bus, devfn);
> > list_for_each_entry_rcu(cfg, &pci_mmcfg_list, list)
> > ...find mapping...
> > do pci operation
> > rcu_read_unlock();
> >
> > A lot of the complexity in mmconfig_*.c is to maintain and validate
> > the pci_mmcfg_list which seems to be unecessary.
>
> That list is there to manage hotplug bridges, what makes you think
> it is not necessary ? Jiang (in CC) can certainly comment on that and
> how that list handling can be updated/simplified, if possible.
Looking thru the code, I think moving the MCFG code to common can be
done in a simpler way. I have posted a new patchset for this.
(And I don't see how the hotplug case needs the list, but that is not
relevant now)
> > The better way would be to keep the mapping of ECAM region in the PCI
> > host bridge sysdata like pci-host-generic and directly access using
> > map_bus/read/write.
> >
> > I see that early raw_pci_read/raw_pci_write may need to be supported.
> > I am not sure if this is needed in ARM64 - and if it is, we can handle
> > this by taking an early mapping for ECAM regions until the PCI host
> > bridges are setup, and dropping the mapping at that point.
>
> I do not think it is needed (and if it is it can be added later, it
> should not block this series), this was already debated in previous
> threads (and in the ASWG, where basically nobody could provide a reason
> why those raw accessors in ACPICA are meant to exist, they are there for
> AML to access config space, why that has to be happen before PCI busses
> are enumerated is still a mystery to me).
The posted patchset adds raw_pci_read/raw_pci_write as well.
JC.
next prev parent reply other threads:[~2015-12-16 12:51 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-27 16:38 [PATCH V1 00/11] MMCONFIG refactoring and ARM64 PCI hostbridge init based on ACPI Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 01/11] x86, pci: Reorder logic of pci_mmconfig_insert() function Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 02/11] x86, pci, acpi: Move arch-agnostic MMCONFIG (aka ECAM) and ACPI code out of arch/x86/ directory Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 03/11] pci, acpi, mcfg: Provide generic implementation of MCFG code initialization Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 04/11] x86, pci: mmconfig_{32, 64}.c code refactoring - remove code duplication Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 05/11] x86, pci, ecam: mmconfig_64.c becomes default implementation for ECAM driver Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 06/11] pci, acpi, mcfg: Provide default RAW ACPI PCI config space accessors Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 07/11] XEN / PCI: Remove the dependence on arch x86 when PCI_MMCONFIG=y Tomasz Nowicki
2015-10-27 16:47 ` [Linaro-acpi] " Tomasz Nowicki
2015-10-27 17:25 ` Boris Ostrovsky
2015-10-28 10:49 ` Stefano Stabellini
2015-10-28 10:56 ` Tomasz Nowicki
2015-10-28 13:45 ` Hanjun Guo
2015-10-28 14:07 ` Boris Ostrovsky
2015-10-27 16:38 ` [PATCH V1 08/11] pci, acpi, ecam: Add flag to indicate whether ECAM region was hot added or not Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 09/11] x86, pci: Use previously added ECAM hot_added flag to remove ECAM regions Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 10/11] pci, acpi: Provide generic way to assign bus domain number Tomasz Nowicki
2015-10-28 11:38 ` Liviu.Dudau at arm.com
2015-10-28 12:47 ` [Linaro-acpi] " Tomasz Nowicki
2015-11-03 16:10 ` Lorenzo Pieralisi
2015-11-04 10:04 ` [Linaro-acpi] " Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 11/11] arm64, pci, acpi: Support for ACPI based PCI hostbridge init Tomasz Nowicki
2015-10-28 11:49 ` Liviu.Dudau at arm.com
2015-10-28 13:42 ` Tomasz Nowicki
2015-10-28 13:51 ` Liviu.Dudau at arm.com
2015-11-03 14:32 ` Lorenzo Pieralisi
2015-11-03 16:28 ` Liviu.Dudau at arm.com
2015-10-28 18:46 ` Sinan Kaya
2015-10-28 20:36 ` Sinan Kaya
2015-10-29 11:38 ` Tomasz Nowicki
2015-10-29 15:01 ` Sinan Kaya
2015-10-29 15:53 ` Tomasz Nowicki
2015-10-29 16:20 ` Sinan Kaya
2015-10-29 14:57 ` Sinan Kaya
2015-10-29 16:27 ` Tomasz Nowicki
2015-11-03 14:15 ` Lorenzo Pieralisi
2015-11-03 14:39 ` Tomasz Nowicki
2015-11-03 15:10 ` Sinan Kaya
2015-11-03 15:59 ` Arnd Bergmann
2015-11-03 16:33 ` Sinan Kaya
2015-11-03 16:55 ` Arnd Bergmann
2015-11-03 17:43 ` Sinan Kaya
2015-11-05 14:48 ` [Linaro-acpi] " Sinan Kaya
2015-11-03 15:19 ` Hanjun Guo
2015-11-03 17:39 ` David Daney
2015-11-03 18:00 ` Gabriele Paoloni
2015-11-03 16:55 ` Lorenzo Pieralisi
2015-11-04 9:59 ` Tomasz Nowicki
2015-11-04 10:11 ` Tomasz Nowicki
2015-10-30 4:07 ` [PATCH V1 00/11] MMCONFIG refactoring and ARM64 PCI hostbridge init based on ACPI Jon Masters
2015-10-30 4:50 ` Hanjun Guo
2015-10-30 8:26 ` Tomasz Nowicki
2015-10-30 16:38 ` Suravee Suthikulpanit
2015-12-07 20:31 ` Bjorn Helgaas
2015-12-09 10:01 ` Jayachandran C.
2015-12-09 15:55 ` Lorenzo Pieralisi
2015-12-16 12:51 ` Jayachandran C. [this message]
2015-12-16 14:05 ` Lorenzo Pieralisi
2015-12-08 17:43 ` Jeremy Linton
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=20151216125136.GE5890@jayachandranc.netlogicmicro.com \
--to=jchandra@broadcom.com \
--cc=linux-arm-kernel@lists.infradead.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).