Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp1496166img; Tue, 19 Mar 2019 08:50:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqwnFH2NlsRoFf6EpeYF5q0y2ezhrQX8+R1/XVnMuvW5Kf2yw/gYdb7D6z4asLhQa6ofQd20 X-Received: by 2002:a65:4147:: with SMTP id x7mr2456521pgp.54.1553010617575; Tue, 19 Mar 2019 08:50:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553010617; cv=none; d=google.com; s=arc-20160816; b=LeEg6MDk7bHyk4163yGKiAboHkuRme5WXPGGJ44eIYVOzpU/PaA9magslo9t3YJLLS tZD58UzCONFVPvrHFq3hTsyC56tuugir8VlvOpiPwBeuRpIttIcCGTkY+yBzQ/JGDbGD gG0l0Y6ytOXwtdhNZ6UJ5XUJy5COiKuoTZOtseCVX7HPu922RrA/kK98aNJzBM/1NXyO qzxm6Ir7zdgB5xkoroNRV8unoAnm5F45Rl2Sz3/9puO23MRaNaufMjkUKm+ZYBF6fkrk ntu7/T6Y0/g3IPtdSdmKcZuXu7EGLoDKWB+rlQWmUqY4cEBPzpiSQGla5qSjrVlWHVn6 1Dbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:to:from; bh=GUmRsKjRYWfAgP8c4Tm9AxGzQw69JNBa6npkyPHHPEc=; b=Mp+6o1xxnqXoMXFKsfNluxsqJHEEvbG7ob2kpE/3o1s80O+wCNheH8MwTLL2z4j3hm aeCGqNEltzUukeOpYU3SJB9hiM3G4dt9x4nCnRhayEZSs9x73fkNBHqLhIvCah05l0WK Aw2EZQ754Sg/PEnMx2uTyL9AC1JgIfAyWYOt2Ec9FnsVWcuwSPHalwWHlJcWWrsfcBc1 yPc/7kE2QwQI9agPrgNDHUoXdQhQZEWobKXb7TG4rswwdvCUFy+rasDxFxNtiTE4xGK2 2oWaV3onRJuRWR5iFI3FpGJ9FEkyYEL/4h6j7GGhrUkdnoRC4JLhkr93tCPX+Rhaq/fX Asow== 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 h14si7099443pgv.168.2019.03.19.08.50.01; Tue, 19 Mar 2019 08:50:17 -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 S1727579AbfCSPsK (ORCPT + 99 others); Tue, 19 Mar 2019 11:48:10 -0400 Received: from mx2.suse.de ([195.135.220.15]:43668 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727368AbfCSPsK (ORCPT ); Tue, 19 Mar 2019 11:48:10 -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 BD537ACE1; Tue, 19 Mar 2019 15:48:08 +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:49 +0100 Message-Id: <20190319154755.31049-1-tbogendoerfer@suse.de> X-Mailer: git-send-email 2.13.7 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 (3): MIPS: SGI-IP27: move IP27 specific code out of pci-ip27.c into new file MIPS: SGI-IP27: use generic PCI driver MIPS: SGI-IP27: abstract chipset irq from bridge arch/mips/Kconfig | 3 + arch/mips/include/asm/mach-ip27/topology.h | 11 +- arch/mips/include/asm/pci/bridge.h | 14 +- arch/mips/include/asm/sn/irq_alloc.h | 11 + arch/mips/include/asm/xtalk/xtalk.h | 9 - arch/mips/pci/Makefile | 1 - arch/mips/pci/ops-bridge.c | 302 -------------- arch/mips/pci/pci-ip27.c | 214 ---------- arch/mips/sgi-ip27/Makefile | 4 +- arch/mips/sgi-ip27/ip27-init.c | 2 + arch/mips/sgi-ip27/ip27-irq.c | 191 ++++----- arch/mips/sgi-ip27/ip27-pci.c | 30 ++ arch/mips/sgi-ip27/ip27-xtalk.c | 61 ++- drivers/pci/controller/Kconfig | 3 + drivers/pci/controller/Makefile | 1 + drivers/pci/controller/pci-xtalk-bridge.c | 610 +++++++++++++++++++++++++++++ include/linux/platform_data/xtalk-bridge.h | 22 ++ 17 files changed, 822 insertions(+), 667 deletions(-) create mode 100644 arch/mips/include/asm/sn/irq_alloc.h delete mode 100644 arch/mips/pci/ops-bridge.c delete mode 100644 arch/mips/pci/pci-ip27.c create mode 100644 arch/mips/sgi-ip27/ip27-pci.c create mode 100644 drivers/pci/controller/pci-xtalk-bridge.c create mode 100644 include/linux/platform_data/xtalk-bridge.h -- 2.13.7