From: Daniel Axtens <dja@axtens.net>
To: linuxppc-dev@ozlabs.org, benh@kernel.crashing.org, mpe@ellerman.id.au
Cc: Yijing Wang <wangyijing@huawei.com>, Daniel Axtens <dja@axtens.net>
Subject: [RFC PATCH 0/2] First steps to using generic controller ops
Date: Tue, 14 Apr 2015 14:33:59 +1000 [thread overview]
Message-ID: <1428986041-25657-1-git-send-email-dja@axtens.net> (raw)
Recently I reviewed some patches from Yijing Wang that added a generic
PHB operations structure. I said that we needed further work on our
end to take full advantage of it.
This is a proposed set of first steps to do that.
In short, it allows us to trivially kill off another ppc_md function. :)
In more detail:
- Previously, the generic ops were set in pci-common.c: the same ops
were used across all of PowerPC. This moves generic ops to our
pci_controller structure, next to our existing pci_controller_ops
structure. [1] The idea is that we'll progressively move ops out of
pci_controller_ops and into pci_host_bridge_ops, until
pci_controller_ops is just arch-specific ops.
- pci_ops are moved from pci_controller to pci_host_bridge_ops.
- pseries is the only platform that defines a ppc_md hook for
pcibios_set_root_bus_speed. That's in the new generic structure, so
move the function into that. Delete the ppc_md pointer and the
pcibios call that calls it.
I haven't figured out a good way to handle scan_bus. Currently, it's
populated with the generic function in a way that's a bit dirty, so
I'd like to make that a bit cleaner. There are also a couple of cases
of similar-ish code (in pci-hotplug.c and pci_of_scan.c); it'd be nice to
see if we could simplify that all down a bit... Suggestions welcome.
Regards,
Daniel
[1] Having ops specfied on a per PHB basis is helpful for the case of
multiple types of PHB, which occurs with CXL (aka CAPI).
Daniel Axtens (2):
powerpc: Add pci_controller.generic_ops and move pci_controller.ops in
powerpc: Migrate pseries to host_bridge_ops, remove
pcibios_set_root_bus_speed
arch/powerpc/include/asm/machdep.h | 2 --
arch/powerpc/include/asm/pci-bridge.h | 2 +-
arch/powerpc/kernel/pci-common.c | 21 +++++++--------------
arch/powerpc/kernel/rtas_pci.c | 2 +-
arch/powerpc/platforms/52xx/efika.c | 2 +-
arch/powerpc/platforms/52xx/mpc52xx_pci.c | 2 +-
arch/powerpc/platforms/chrp/pci.c | 6 +++---
arch/powerpc/platforms/maple/pci.c | 6 +++---
arch/powerpc/platforms/pasemi/pci.c | 2 +-
arch/powerpc/platforms/powermac/pci.c | 12 ++++++------
arch/powerpc/platforms/powernv/pci-ioda.c | 2 +-
arch/powerpc/platforms/powernv/pci-p5ioc2.c | 2 +-
arch/powerpc/platforms/pseries/setup.c | 7 +++++--
arch/powerpc/sysdev/fsl_pci.c | 6 +++---
arch/powerpc/sysdev/indirect_pci.c | 2 +-
arch/powerpc/sysdev/ppc4xx_pci.c | 2 +-
arch/powerpc/sysdev/tsi108_pci.c | 2 +-
17 files changed, 37 insertions(+), 43 deletions(-)
--
2.1.4
next reply other threads:[~2015-04-14 4:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-14 4:33 Daniel Axtens [this message]
2015-04-14 4:34 ` [RFC PATCH 1/2] powerpc: Add pci_controller.generic_ops and move pci_controller.ops in Daniel Axtens
2015-04-14 4:34 ` [RFC PATCH 2/2] powerpc: Migrate pseries to host_bridge_ops, remove pcibios_set_root_bus_speed Daniel Axtens
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=1428986041-25657-1-git-send-email-dja@axtens.net \
--to=dja@axtens.net \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=wangyijing@huawei.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 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).