Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp323175imm; Tue, 15 May 2018 02:10:20 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrUFDfi8eDggNHGfhKMo9oeMENc1VBG7I/Z7u2OhrlzzE6Sy891pULiWKtc0T0cqtGHffA+ X-Received: by 2002:a62:cca:: with SMTP id 71-v6mr14171773pfm.61.1526375420544; Tue, 15 May 2018 02:10:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526375420; cv=none; d=google.com; s=arc-20160816; b=VH3t1mkjLshum57/89A0SzqXyfIoZRK0V4bvI3Yw3BFSOR1ZJA6zzX783E3EHfQ7W+ hCrZ2huJ9ONzrdIswXgfYJqNd4qa3R3LMfzyG5b+HkPnhJRH8D6KoDXIKjYRnE4fS+Q4 CR9YCbCFY81SdmuAnk4ayC//oJ9JVkZeAZ3wtIRXCqPM6l5Qj0HZgzRbnS8C+TurM1Me M2p9htBmqLEOmU07uNW4qDy3ch2SgxuGjdy+MGyzk58rmibQZMsNQIqFNDJEigcvmwdZ EQzxDDvIR0JFo+cK7w5Qf0ox2qm0Feyx96o52Ytl3aEZAFdVB5n3mGhEdVniPKY5e2S1 2UFQ== 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=Bu8awsGjIJlD4ELSobxAutii/RQQONYJSPYbaRpzuqQ=; b=lpR3OU5XjIpo/v8dgdHPjadSjwnE241Uk8QM9qUOO3uC7NAI5P6gWcpbyYtUHTLubh ngjZrh/tbIe5y6eAWsi+sUu6gg6cEHCtWfm9PtEFC/heYbnW4U6UIFYLpgUo8mPzZR1I zsp8NjPw3tCdJYvgsLEvhWgDxgdbK4TzsZroz99Ge0WA8AOLBQz3eghj7TA8Ikg/GEkl 7QSyMnGGTue7lD3AUb/7MeEOyr7++tOrfjoY3Cs244ZEPfF9BZjqsA3AtmnPIVKRSV3u nti/eSymAEw6HJMglMWOcqa1pd9iTOjDd1w3o3Fwt8DIfEeasr2rFUAUgPiPkA+yYpMm JMiw== 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 b19-v6si11380494pfh.358.2018.05.15.02.10.06; Tue, 15 May 2018 02:10:20 -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 S1752679AbeEOJJ1 (ORCPT + 99 others); Tue, 15 May 2018 05:09:27 -0400 Received: from thoth.sbs.de ([192.35.17.2]:43138 "EHLO thoth.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752427AbeEOJI1 (ORCPT ); Tue, 15 May 2018 05:08:27 -0400 Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id w4F97qpR002205 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 May 2018 11:07:52 +0200 Received: from md1f2u6c.ww002.siemens.net ([167.87.129.255]) by mail1.siemens.de (8.15.2/8.15.2) with ESMTP id w4F97lZK011567; Tue, 15 May 2018 11:07:49 +0200 From: Jan Kiszka To: Bjorn Helgaas , Linux Kernel Mailing List , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Vladimir Zapolskiy , Jingoo Han , Joao Pinto , Lorenzo Pieralisi , Will Deacon Subject: [PATCH v4 0/8] PCI: leak fixes, removable generic PCI host, assorted stuff Date: Tue, 15 May 2018 11:06:59 +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 v4: - restore pci_free_resource_list() in error path of of_pci_get_host_bridge_resources() Changes in v3: - refactor series to be both bisectable and simpler while reworking of_pci_get_host_bridge_resources() - include of_pci_get_host_bridge_resources() removal - include devm_of_pci_get_host_bridge_resources() error path fixes - effectively, no functional changes to v2 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 (8): PCI: Make pci_get_new_domain_nr() static PCI: Fix memory leak of devm_pci_alloc_host_bridge() PCI: Rename device node parameter of of_pci_get_host_bridge_resources() PCI: Replace dev_node parameter of of_pci_get_host_bridge_resources with device PCI: Replace pr_*() with dev_*() in of_pci_get_host_bridge_resources() PCI: Rework of_pci_get_host_bridge_resources() to devm_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 | 65 ++++++++++++++++------------------ drivers/pci/pci.c | 6 ++-- drivers/pci/probe.c | 4 ++- include/linux/of_pci.h | 4 +-- include/linux/pci-ecam.h | 1 + include/linux/pci.h | 3 -- 21 files changed, 76 insertions(+), 68 deletions(-) -- 2.13.6