Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp1495437img; Tue, 19 Mar 2019 08:49:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqzEXj48jlDegU9s/VUQlvf6HARrAwsBe7ewzl7K8TG5PICR29DpzGVI6Qc2rMWVg1i6yWCQ X-Received: by 2002:a65:51c2:: with SMTP id i2mr2432347pgq.295.1553010561066; Tue, 19 Mar 2019 08:49:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553010561; cv=none; d=google.com; s=arc-20160816; b=GTpzsd4tai+AJo2rlmNMVZhXjWb/IpNqQNSKAgg0ll6VbVa9XpvUhLDvoHuBdb4DGn /9Q23oqL4bxrBC3CTTwUkqdysfc9Firyx0Xd338Xsdtg7MSGxtkmuAwmzvf6WitrWgIs Tig47l1TDmza7XcxQxeeKPUrnr/duqdqaUAFWsWnOgnQ6nw6ixE7BsACOsXxVScOwCCZ 1+binmui7/L7D3anas8BHqFhQzgMqeMEGEHCjaMNhQgcynFhhPkYJ6D+xD/sAvZQWlTR 2Lvzy7fBN3cHWMiXV2PcCvWbIK9FQVj9niQBjvdJ2ennUlR/Nsp1FcXfrLa8JyqcYuT2 LHAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:to:from; bh=vDXiiPPvA0sv2f3cuDoJ/s6rr2fwn2zeYS45eSlhIek=; b=l5LFQoXVj281vWvRbwzM0LhnXEnoPjgZoZVTcNb3l0StDgKLkaRlDTrbLMpwMdeFp5 xgBW4NCdfGfWhVc/uH9MQx15u4md0s5YANTOBE4Sz1K2FsA3clMOslwdJ9Kz091KrMD8 BjPLHsb/bGRU1paVv4rlLOV5JSvc7bfPyl+N6SM552beoSA4P/g91+WB4IqdrzYx/kZ9 sfaiAltA06Sc3R781A9CCIHZ60eDoao1XLTSHUC0Fo9hQaUjbP+nNp0Bemp1fzGl3X7B CEM+qx/rYU8lvOgDbj8XuKjJ1Hk4gRoOVoxsYr+hqvC4fNoiihygZ1Uqe5szQ60iDjjR 0+Xg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t19si12296030plr.402.2019.03.19.08.49.05; Tue, 19 Mar 2019 08:49:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727889AbfCSPsW (ORCPT + 99 others); Tue, 19 Mar 2019 11:48:22 -0400 Received: from mx2.suse.de ([195.135.220.15]:43798 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727824AbfCSPsT (ORCPT ); Tue, 19 Mar 2019 11:48:19 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id B5EBCB127; Tue, 19 Mar 2019 15:48:16 +0000 (UTC) From: Thomas Bogendoerfer To: Ralf Baechle , Paul Burton , James Hogan , Lorenzo Pieralisi , Bjorn Helgaas , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH v3 00/3] MIPS: SGI-IP27 rework part2 Date: Tue, 19 Mar 2019 16:47:53 +0100 Message-Id: <20190319154755.31049-5-tbogendoerfer@suse.de> X-Mailer: git-send-email 2.13.7 In-Reply-To: <20190319154755.31049-1-tbogendoerfer@suse.de> References: <20190319154755.31049-1-tbogendoerfer@suse.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, which will be submitted soon. Changes in v3: - dropped patches accepted by Paul - moved IP27 specific __phys_to_dma/__dma_to_phys into its own file - moved pcibios_to_node into IP27 specific file - moved PCI bus address resources setup out of pci-xtalk code into IP27 specific code - dropped bit from hub_irq_data and use hwirq from irq_data - introduced intr_addr for setting up bridge interrupts (IP30 preperation) 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 -- 2.13.7