Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp982724imm; Tue, 15 May 2018 12:01:31 -0700 (PDT) X-Google-Smtp-Source: AB8JxZonhYy0zUH6CnakmyC98bO80eONxCaY8V+n5GeFwzuQK3X3OnoNV1wMunN28WrdDLp6WnzY X-Received: by 2002:a17:902:7109:: with SMTP id a9-v6mr15860595pll.271.1526410891692; Tue, 15 May 2018 12:01:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526410891; cv=none; d=google.com; s=arc-20160816; b=sZJPZQ49kJB/JjmyBaITe2D+5Tf/3oK7tAICKnRKap3llhu82aiFdlynV3rudftRit 7qzqIXy12rTIi+rwgmu1yIZp2w/rL1MaAouzIOHPsmMhCd3GzKVl+7GOT2Z4h8WknPN+ IU3yJQjDbAcahnnEtN/Ak5MKpipmgETrCors8d4hJUaS8bT/DqJxgewkRor03W7oevfG L9pBTGmol5OjybIfTw4oLoppkX3G4Gh2r2t+EhZSvzgnqYk7qgXuZDYV+lwNXQ6LYeVd 7+lvgvXV84bar2VfxZlcJKTRLwSMKdym58aZNxXY5qtozvBFWGfwb569k3CE2W7v2wmd 6S2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=5LJYv76hdMzZUk8bcYIrYUUB5dEiXW4W+heGyERJZ28=; b=uI8zW7z57NfXSgAj+P0otGb+EI3D0gpLppzSiTdgoFXChsPJU5dhzBvqOyL0CXMM4F DL8dXCMPGvkV/OIQ89oJezE9vg8VfDn7fD89oY5JcRJd8vjaanh+4vBZ/ztadHLSBGLD 2iTLPpQwQVDcQdPoCrYVrHid8G5G9XDAnMF9yTdffVFMAAQWsfGwhmuRMdAX8/hgFSQI EE3o+JUHgpO1IsTVm+oqheUrmF9bcAAcceUSHfa64DE56IjUcRgPg2iodbzC83iZCgtW Ljpo7Tv2NEUvLYhBG2Yk1G6jUds6NkRPlmGxaDxZvc7+LrOeBU+7xeO05H03QAhSoftT ZRtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=taQmP2D2; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 92-v6si606884plc.452.2018.05.15.12.01.17; Tue, 15 May 2018 12:01:31 -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; dkim=pass header.i=@kernel.org header.s=default header.b=taQmP2D2; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752211AbeEOTBB (ORCPT + 99 others); Tue, 15 May 2018 15:01:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:41838 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750748AbeEOTA7 (ORCPT ); Tue, 15 May 2018 15:00:59 -0400 Received: from localhost (unknown [69.71.5.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C538C204EE; Tue, 15 May 2018 19:00:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1526410860; bh=T3ryjBy9VN6mLt04lIgCG0g8CVObph8oXU/kVI3q8PY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=taQmP2D2RAVkWj8KUuqpGavQsAuGoZX0jXrZVNmX2oXN9nsvK/8NwklhsaEiN7nsK qTRAE+EV89Bzc6dh/PMeV3sKZlFt94kS8KTcWLpO2StC+6sl6ylHaOtlRD9YuIFdyZ Obj9KD8K0q21nIOyp4THrCAat2B3w9/nT4lcEZas= Date: Tue, 15 May 2018 14:00:57 -0500 From: Bjorn Helgaas To: Jan Kiszka Cc: Bjorn Helgaas , Linux Kernel Mailing List , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Vladimir Zapolskiy , Jingoo Han , Joao Pinto , Lorenzo Pieralisi , Will Deacon Subject: Re: [PATCH v4 0/8] PCI: leak fixes, removable generic PCI host, assorted stuff Message-ID: <20180515190057.GA11156@bhelgaas-glaptop.roam.corp.google.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 15, 2018 at 11:06:59AM +0200, Jan Kiszka wrote: > 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. This is beautiful! Thanks for tweaking this one more time; I think it really makes the patches much more readable. I applied these with the tested-by/reviewed-by/acks to pci/resource for v4.18. Andy's comments certainly make sense, but doing it in the "Rework of_pci_get_host_bridge_resources()" patch would make that patch less obvious, so I'd rather do it as a cleanup on top. > [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 >