Received: by 10.192.165.148 with SMTP id m20csp3414197imm; Sun, 29 Apr 2018 22:52:17 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpiwjqWZMRt2mslo9TKtDekl0MTKXbH1BeUHiHvg9yoZhOuyMA5sHw96qxJ64W205fLmpaX X-Received: by 2002:a17:902:624:: with SMTP id 33-v6mr11262016plg.361.1525067537516; Sun, 29 Apr 2018 22:52:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525067537; cv=none; d=google.com; s=arc-20160816; b=QM6o467RYiV/7EpnucinvVNu/2bYuMYKmUJr5Wqmjn7tzkkcLkZOjMwcmC/6VOkN9N LvY8d+9EYzOZbQiAHXZFFDalmqWFtymXq/oK+9VsQ7+bvEogucs3dp1mY0TmQNz4ra5f /7/4SxgZ9gYJDyVMpXbFOkPjvGGwYA9umoGbdyNPzQhfxU9V6wNiFe9s0UBAoWsYI1Sf CEKEZ8w1k+e49A7cHb0jGSTFVdq9XVHI8tgDAYf/INOfuQsbYjan0Ta4PbMmVpkG5yA6 BQ+cmTqbx6l4brGKxdsUSIAM6bwWUXYRuIlYvTc6mODlChJri1BUgxn3k83/+Ng2QYxq tL/A== 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:cc:to:from :arc-authentication-results; bh=vsoQyCYXnP/8tMM3WxudS4lR6+GGnga7FdsGIvR+mKY=; b=BBREaKNa5j0zj+2W1m1ZirpIb7/VQimaYlM5DRnO8Dtza1vRyiVI+0nTCbEaXFKJjY tAp/JwPMSUP0v+CJB6AqDEmIb4WxkkyzTLeOs1brXXzVnfgpJb6pcIXyCqg9fJDWTEMy S4t75K2+R7ONZh36q8Loj0eS/Fp7rfgPDLqPm2K9YUlGwzFbcUTdHC0oYBfR0rTlI0Ex 7JvgsjXzDJvKV2O4A446fxezWhHwdtZu3OHWB+CGmOrSvDhBM4/1eJ+fxCZ35OoBxckt +8mE3dagfanihh4SDH/bafFwDf0ksAZzMU8gP4XprPr7RZ5bDm0rne2HJHl8BzQCDPeF aKDw== 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 f7-v6si6930545plb.285.2018.04.29.22.52.03; Sun, 29 Apr 2018 22:52: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 S1752418AbeD3FvP (ORCPT + 99 others); Mon, 30 Apr 2018 01:51:15 -0400 Received: from thoth.sbs.de ([192.35.17.2]:41346 "EHLO thoth.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751770AbeD3FtO (ORCPT ); Mon, 30 Apr 2018 01:49:14 -0400 Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id w3U5mkOI012442 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Apr 2018 07:48:46 +0200 Received: from md1f2u6c.ww002.siemens.net ([167.87.54.87]) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id w3U5mj6q003250; Mon, 30 Apr 2018 07:48:45 +0200 From: Jan Kiszka To: Bjorn Helgaas , Linux Kernel Mailing List , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Jingoo Han , Joao Pinto , Lorenzo Pieralisi , Will Deacon Subject: [PATCH v2 00/10] PCI: leak fixes, removable generic PCI host, assorted stuff Date: Mon, 30 Apr 2018 07:48:34 +0200 Message-Id: X-Mailer: git-send-email 2.13.6 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Changes in v2: - patch 1: commit message reworking as suggested by Lorenzo - patch 3-6: split-up as suggested by Bjorn - patch 8: new - patch 10: select PCI_DOMAINS from PCI_HOST_GENERIC, rather than allowing manual choice, as suggested by Lorenzo This primarily enables to unbind the generic PCI host controller without leaving lots of memory leaks behind. A previous proposal patch 5 was rejected because of those issues [1]. The fixes have been validated in the Jailhouse setup, where we add and remove a virtual PCI host controller on hypervisor activation/ deactivation, with the help of kmemleak. Besides that, there is tiny PCI API cleanup at the beginning and support for manually enabled PCI domains at the end that enables the Jailhouse scenario. Jan [1] http://lkml.iu.edu/hypermail/linux/kernel/1606.3/00072.html CC: Jingoo Han CC: Joao Pinto CC: Lorenzo Pieralisi CC: Will Deacon Jan Kiszka (10): PCI: Make pci_get_new_domain_nr() static PCI: Fix memory leak of devm_pci_alloc_host_bridge() PCI: Factor out __of_pci_get_host_bridge_resources() PCI: Add dev parameter to __of_pci_get_host_bridge_resources() PCI: Replace pr_*() with dev_*() in __of_pci_get_host_bridge_resources() PCI: Introduce devm_of_pci_get_host_bridge_resources() PCI: Convert of_pci_get_host_bridge_resources() users to devm variant PCI: Deprecate of_pci_get_host_bridge_resources() PCI: Add support for unbinding the generic PCI host controller PCI: Enable PCI_DOMAINS along with generic PCI host controller drivers/pci/dwc/pcie-designware-host.c | 2 +- drivers/pci/host/Kconfig | 1 + drivers/pci/host/pci-aardvark.c | 5 +- drivers/pci/host/pci-ftpci100.c | 4 +- drivers/pci/host/pci-host-common.c | 13 ++++ drivers/pci/host/pci-host-generic.c | 1 + drivers/pci/host/pci-v3-semi.c | 3 +- drivers/pci/host/pci-versatile.c | 3 +- drivers/pci/host/pci-xgene.c | 3 +- drivers/pci/host/pcie-altera.c | 5 +- drivers/pci/host/pcie-iproc-platform.c | 4 +- drivers/pci/host/pcie-rcar.c | 5 +- drivers/pci/host/pcie-rockchip.c | 4 +- drivers/pci/host/pcie-xilinx-nwl.c | 4 +- drivers/pci/host/pcie-xilinx.c | 4 +- drivers/pci/of.c | 105 +++++++++++++++++++++------------ drivers/pci/pci.c | 6 +- drivers/pci/probe.c | 4 +- include/linux/of_pci.h | 42 ++++++++++++- include/linux/pci-ecam.h | 1 + include/linux/pci.h | 3 - 21 files changed, 149 insertions(+), 73 deletions(-) -- 2.13.6