mbox series

[v2,00/10] MIPS: SGI-IP27 rework

Message ID 20190219155728.19163-1-tbogendoerfer@suse.de (mailing list archive)
Headers show
Series MIPS: SGI-IP27 rework | expand

Message

Thomas Bogendoerfer Feb. 19, 2019, 3:57 p.m. UTC
SGI IP27 (Origin/Onyx2) and SGI IP30 (Octane) have a similair
architecture and share some hardware (ioc3/bridge). To share
the software parts this patchset reworks SGI IP27 interrupt
and pci bridge code. By using features Linux gained during the
many years since SGI IP27 code was integrated this even results
in code reduction and IMHO cleaner code.

Tests have been done on a two module O200 (4 CPUs) and an
Origin 2000 (8 CPUs).

My next step in integrating SGI IP30 support is splitting ioc3eth
into a MFD and subdevice drivers. Prototype is working, but needs
still more clean ups.

Changes in v2:

- replaced HUB_L/HUB_S by __raw_readq/__raw_writeq
- removed union bridge_ate
- replaced remaing fields in slice_data by per_cpu data
- use generic_handle_irq instead of do_IRQ
- use hierarchy irq domain for stacking bridge and hub interrupt
- moved __dma_to_phys/__phy_to_dma to mach-ip27/dma-direct.h
- use dev_to_node() for pcibus_to_node() implementation

Thomas Bogendoerfer (10):
  MIPS: SGI-IP27: get rid of volatile and hubreg_t
  MIPS: SGI-IP27: clean up bridge access and header files
  MIPS: SGI-IP27: use pr_info/pr_emerg and pr_cont to fix output
  MIPS: SGI-IP27: do xtalk scanning later
  MIPS: SGI-IP27: do boot CPU init later
  MIPS: SGI-IP27: rework HUB interrupts
  PCI: call add_bus method also for root bus
  MIPS: SGI-IP27: use generic PCI driver
  genirq/irqdomain: fall back to default domain when creating hierarchy
    domain
  MIPS: SGI-IP27: abstract chipset irq from bridge

 arch/mips/Kconfig                               |   4 +
 arch/mips/include/asm/dma-direct.h              |   2 +
 arch/mips/include/asm/mach-generic/dma-direct.h |   7 +
 arch/mips/include/asm/mach-ip27/dma-direct.h    |  20 +
 arch/mips/include/asm/mach-ip27/irq.h           |  12 +-
 arch/mips/include/asm/mach-ip27/mmzone.h        |   9 -
 arch/mips/include/asm/mach-ip27/topology.h      |  13 +-
 arch/mips/include/asm/pci.h                     |   8 +
 arch/mips/include/asm/pci/bridge.h              | 211 ++++----
 arch/mips/include/asm/smp-ops.h                 |   1 +
 arch/mips/include/asm/sn/addrs.h                |  72 +--
 arch/mips/include/asm/sn/arch.h                 |   2 -
 arch/mips/include/asm/sn/intr.h                 |   6 +
 arch/mips/include/asm/sn/io.h                   |   2 +-
 arch/mips/include/asm/sn/sn0/addrs.h            |   5 -
 arch/mips/include/asm/xtalk/xtalk.h             |   9 -
 arch/mips/kernel/smp.c                          |   2 +
 arch/mips/pci/Makefile                          |   1 -
 arch/mips/pci/ops-bridge.c                      | 322 ------------
 arch/mips/pci/pci-ip27.c                        | 233 ---------
 arch/mips/sgi-ip27/Makefile                     |   3 +-
 arch/mips/sgi-ip27/ip27-hubio.c                 |   4 +-
 arch/mips/sgi-ip27/ip27-init.c                  |  41 +-
 arch/mips/sgi-ip27/ip27-irq-pci.c               | 266 ----------
 arch/mips/sgi-ip27/ip27-irq.c                   | 331 ++++++++-----
 arch/mips/sgi-ip27/ip27-irqno.c                 |  48 --
 arch/mips/sgi-ip27/ip27-memory.c                |  34 +-
 arch/mips/sgi-ip27/ip27-nmi.c                   |  64 +--
 arch/mips/sgi-ip27/ip27-smp.c                   |   5 +-
 arch/mips/sgi-ip27/ip27-timer.c                 |  42 +-
 arch/mips/sgi-ip27/ip27-xtalk.c                 |  44 +-
 drivers/pci/controller/Kconfig                  |   3 +
 drivers/pci/controller/Makefile                 |   1 +
 drivers/pci/controller/pci-xtalk-bridge.c       | 623 ++++++++++++++++++++++++
 drivers/pci/probe.c                             |   6 +
 include/linux/platform_data/xtalk-bridge.h      |  17 +
 kernel/irq/irqdomain.c                          |   5 +-
 37 files changed, 1126 insertions(+), 1352 deletions(-)
 create mode 100644 arch/mips/include/asm/mach-generic/dma-direct.h
 create mode 100644 arch/mips/include/asm/mach-ip27/dma-direct.h
 delete mode 100644 arch/mips/pci/ops-bridge.c
 delete mode 100644 arch/mips/pci/pci-ip27.c
 delete mode 100644 arch/mips/sgi-ip27/ip27-irq-pci.c
 delete mode 100644 arch/mips/sgi-ip27/ip27-irqno.c
 create mode 100644 drivers/pci/controller/pci-xtalk-bridge.c
 create mode 100644 include/linux/platform_data/xtalk-bridge.h

Comments

Paul Burton Feb. 21, 2019, 8:50 p.m. UTC | #1
Hi Thomas,

On Tue, Feb 19, 2019 at 04:57:14PM +0100, Thomas Bogendoerfer wrote:
> SGI IP27 (Origin/Onyx2) and SGI IP30 (Octane) have a similair
> architecture and share some hardware (ioc3/bridge). To share
> the software parts this patchset reworks SGI IP27 interrupt
> and pci bridge code. By using features Linux gained during the
> many years since SGI IP27 code was integrated this even results
> in code reduction and IMHO cleaner code.
> 
> Tests have been done on a two module O200 (4 CPUs) and an
> Origin 2000 (8 CPUs).
> 
> My next step in integrating SGI IP30 support is splitting ioc3eth
> into a MFD and subdevice drivers. Prototype is working, but needs
> still more clean ups.
> 
> Changes in v2:
> 
> - replaced HUB_L/HUB_S by __raw_readq/__raw_writeq
> - removed union bridge_ate
> - replaced remaing fields in slice_data by per_cpu data
> - use generic_handle_irq instead of do_IRQ
> - use hierarchy irq domain for stacking bridge and hub interrupt
> - moved __dma_to_phys/__phy_to_dma to mach-ip27/dma-direct.h
> - use dev_to_node() for pcibus_to_node() implementation
> 
> Thomas Bogendoerfer (10):
>   MIPS: SGI-IP27: get rid of volatile and hubreg_t
>   MIPS: SGI-IP27: clean up bridge access and header files
>   MIPS: SGI-IP27: use pr_info/pr_emerg and pr_cont to fix output
>   MIPS: SGI-IP27: do xtalk scanning later
>   MIPS: SGI-IP27: do boot CPU init later
>   MIPS: SGI-IP27: rework HUB interrupts
>   PCI: call add_bus method also for root bus
>   MIPS: SGI-IP27: use generic PCI driver
>   genirq/irqdomain: fall back to default domain when creating hierarchy
>     domain
>   MIPS: SGI-IP27: abstract chipset irq from bridge

I have patches 1-6 applied locally - would you be happy for those to be
pushed to mips-next without 7-10? I know ip27_defconfig still builds but
have no idea whether it still works :)

I don't appear to have received patches 7 or 9 but I see from archives
there'll be a v3 of patch 9 at least.

So I can either apply 1-6 for v5.1 or defer the whole series. Let me
know - I'm happy either way.

Thanks,
    Paul
Thomas Bogendoerfer Feb. 22, 2019, 8:14 a.m. UTC | #2
On Thu, 21 Feb 2019 20:50:39 +0000
Paul Burton <paul.burton@mips.com> wrote:

> I don't appear to have received patches 7 or 9 but I see from archives
> there'll be a v3 of patch 9 at least.

I'm still fighting with git send-email to do proper collecting of addresses...
And the mails to your @mips.com address bounced yesterday.

> So I can either apply 1-6 for v5.1 or defer the whole series. Let me
> know - I'm happy either way.

All changes will happen in patches 7-10, so appreciate, if you could apply 1-6 :-)

Thank you,
Thomas.
Christoph Hellwig Feb. 22, 2019, 2:49 p.m. UTC | #3
On Fri, Feb 22, 2019 at 09:14:18AM +0100, Thomas Bogendoerfer wrote:
> 
> I'm still fighting with git send-email to do proper collecting of addresses...
> And the mails to your @mips.com address bounced yesterday.

FYI, it also bounced for me yesterday (or the day before, depending on
the time zone).
Paul Burton Feb. 25, 2019, 7:17 p.m. UTC | #4
Hi Thomas,

On Fri, Feb 22, 2019 at 09:14:18AM +0100, Thomas Bogendoerfer wrote:
> On Thu, 21 Feb 2019 20:50:39 +0000
> Paul Burton <paul.burton@mips.com> wrote:
> 
> > I don't appear to have received patches 7 or 9 but I see from archives
> > there'll be a v3 of patch 9 at least.
> 
> I'm still fighting with git send-email to do proper collecting of addresses...
> And the mails to your @mips.com address bounced yesterday.

Interesting - thanks for letting me know. Some of our IT infrastructure
has been physically moved over the weekend so hopefully it's just
fallout from that, and I seem to be able to email myself from gmail at
least. Will keep an eye on it though!

> > So I can either apply 1-6 for v5.1 or defer the whole series. Let me
> > know - I'm happy either way.
> 
> All changes will happen in patches 7-10, so appreciate, if you could
> apply 1-6 :-)

Great, I've pushed out mips-next with patches 1-6 applied. My ack email
script isn't yet smart enough to respond to the cover letter for a
series that's only partially applied, so apologies for the 6 separate
acks :)

Thanks,
    Paul