Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp155704imm; Mon, 14 May 2018 22:59:44 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrPjMj18sBZnTysG9BgHiK5QT7ujiIM99/iC+/mMHYuSR1UAjulC7O2PoHKGmxd2kZz+7fQ X-Received: by 2002:a17:902:e8:: with SMTP id a95-v6mr13006005pla.274.1526363984893; Mon, 14 May 2018 22:59:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526363984; cv=none; d=google.com; s=arc-20160816; b=HfMbzUxew2jBNQDdO7dfHyRk4djnaGHYErJmKIlPND5N0MZ/ubr3XePmu29TRRksXM IX03eb+J/GO2/RH8RBR4sfvyLo31dNSHQrtZGKJfyPo7dQ9PwuPD5WDIuyTPE00Fb0Na ALNDv+tDYX7ktQxsksn6pnUKJCdEtzdW834NlHkkwLirBT0Rf6j0d3IWm0Y03JYt8362 8f4KeLPDLRxcV9/kgU+clTjJVjqFCRhspgK3DNoiycy9uHHcAVZt0Qenl9aHI66lyIpR 5SYaL9Lx3NxnSuEBZUbB8a9lzc4lGInFS9jtC8C7UXBzLKdlOrqPvrpGrZAqXqCi4oZt f8qA== 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=RhH/TpHbT0zOtz8P/Psde4lcDFQqw4lSpOrdheDUf1Y=; b=aGPLsTbfAUtSQGqdIVsdG3dgP/JsPxnIP0/9R41NKaQNF40I2N0OZryz1sP5g7j0ww tHSR71qtoHfBsHquA4tZtyJJk5mUv5JOAGEmrjVXPofkX+4u6377gJQptIj0ms5I1Cxo y+G0zOzHbDzFXKgpd4jRthj/iCSojLcQ/ZFiUAtKz2KHHE3L5RCt5vh/8acfULjjTSBx c4QQEdi79yRgWrRXNgjop+Hx1DZ7SYDMgfbVub1PF4F9oVLgfv9hOGqTBf6rb7fF75nR XY4xQSSssY2lz2K/68OKjGcB8LS4Ns2LK4sVVjUuAWLPu86H+mU9SQdS27b8ZdaxuQ1r u+sg== 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 g3-v6si8644850pgc.251.2018.05.14.22.59.30; Mon, 14 May 2018 22:59:44 -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 S1752334AbeEOF6y (ORCPT + 99 others); Tue, 15 May 2018 01:58:54 -0400 Received: from goliath.siemens.de ([192.35.17.28]:45052 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752290AbeEOF6u (ORCPT ); Tue, 15 May 2018 01:58:50 -0400 Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id w4F5wIlE000980 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 May 2018 07:58:18 +0200 Received: from md1f2u6c.zg.swisshotel-zug.ch ([167.87.56.156]) by mail1.siemens.de (8.15.2/8.15.2) with ESMTP id w4F5wHpV000761; Tue, 15 May 2018 07:58:17 +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 v3 0/8] PCI: leak fixes, removable generic PCI host, assorted stuff Date: Tue, 15 May 2018 07:58:08 +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 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 | 72 +++++++++++++++------------------- 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(+), 75 deletions(-) -- 2.13.6