Received: by 10.192.165.148 with SMTP id m20csp4796320imm; Tue, 24 Apr 2018 08:32:35 -0700 (PDT) X-Google-Smtp-Source: AIpwx48FK52T0O2kh8kXZGwViyfUk+Qoz8kZqHiaA2yGpdEIAktfOzzaTnZkIWJiOWPMLSNXDbHj X-Received: by 2002:a17:902:760c:: with SMTP id k12-v6mr25605607pll.338.1524583955297; Tue, 24 Apr 2018 08:32:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524583955; cv=none; d=google.com; s=arc-20160816; b=wcAKMs61BztTLDD6oyrdC/Uptj5ADDz91CpvpnhGGts5nG2PR7ooWTrOEHCAsrTdFB 03EE/NMt3FrmhuZcRcy0Ue8wFUOvumHv9jqBNc2BNOtyE2KKlckjbYreXRFHxYsS64/V U3Bo1X8PQrRE1wyq+kmkEDtUsVt671z+9tJObFzZ03YwDDwbE0yLI4XYlcd63n21GBj9 nn/iikPpVgaSlC9vGDT91+A9IFKiKUwzq0YSlwiapQwqIAfDjKbttnWAreWlSA8+ze8k pBHqgWSHRWRCbaOirCfGq7/3BQTsWm54QFbcB7R3jBN7FWzQy4pUcfuK1I5Oj4nPRQ8b LQmw== 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=7bVGE4BbGUatnMzNHT3KtNifAssIMhu0MJ0K8db2yOg=; b=kXGfdlSW9Oi/lurkeBb6JIUb0rWjYFpA7NXWWjnxCGCcxdAzYItl1OfYJ6gd7kad6G QXwzFHXIxa37sZPHWCjvYw1FzkabP5/rCVu5fZFJr8RUcZhpJjdOPxrvUyBvGd4OjzJk yZHYHTGGkmkPooXoqYlU6xSlaEfznuzANiImAeRs+80frupxXdJj5T1UVgrjA24QVQ3l a7p9yuuXm4O37dGDrz2/vUcmTQa3xXaJltAcxIsTveSXGLgr43++4LZ/6VWzcPxte5tE 7lexlE6hL2m7xVLD327u+pRJCFVjwToCsVEcpDqla8xwN5+ncUw7sz+oAI/157J4FqBN c2aw== 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 1-v6si9723688plj.122.2018.04.24.08.32.20; Tue, 24 Apr 2018 08:32:35 -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 S1750739AbeDXPay (ORCPT + 99 others); Tue, 24 Apr 2018 11:30:54 -0400 Received: from goliath.siemens.de ([192.35.17.28]:37560 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751262AbeDXPat (ORCPT ); Tue, 24 Apr 2018 11:30:49 -0400 Received: from mail2.siemens.de (mail2.siemens.de [139.25.208.11]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id w3OFDiBH031276 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 24 Apr 2018 17:13:44 +0200 Received: from md1f2u6c.ad001.siemens.net (md1q0hnc.ad001.siemens.net [139.25.68.37] (may be forged)) by mail2.siemens.de (8.15.2/8.15.2) with ESMTP id w3OFDhei031216; Tue, 24 Apr 2018 17:13:43 +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 0/6] PCI: leak fixes, removable generic PCI host, assorted stuff Date: Tue, 24 Apr 2018 17:13:36 +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 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 (6): PCI: Make pci_get_new_domain_nr static PCI: Fix memory leak of devm_pci_alloc_host_bridge PCI: Introduce devm_of_pci_get_host_bridge_resources PCI: Convert of_pci_get_host_bridge_resources users to devm variant PCI: Add support for unbinding the generic PCI host controller arm: Allow to enable PCI_DOMAINS manually arch/arm/Kconfig | 7 ++- drivers/pci/dwc/pcie-designware-host.c | 2 +- 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 | 93 ++++++++++++++++++++++------------ drivers/pci/pci.c | 6 +-- drivers/pci/probe.c | 4 +- include/linux/of_pci.h | 14 ++++- include/linux/pci-ecam.h | 1 + include/linux/pci.h | 3 -- 21 files changed, 120 insertions(+), 68 deletions(-) -- 2.13.6