From patchwork Fri Mar 29 11:55:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jisheng Zhang X-Patchwork-Id: 10876913 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2088015AC for ; Fri, 29 Mar 2019 11:55:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C28228DD9 for ; Fri, 29 Mar 2019 11:55:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EFC0E29103; Fri, 29 Mar 2019 11:55:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8385E28DD9 for ; Fri, 29 Mar 2019 11:55:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729431AbfC2Lzm (ORCPT ); Fri, 29 Mar 2019 07:55:42 -0400 Received: from mail-eopbgr720048.outbound.protection.outlook.com ([40.107.72.48]:53387 "EHLO NAM05-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728800AbfC2Lzl (ORCPT ); Fri, 29 Mar 2019 07:55:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector1-synaptics-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Mculs6FQWyHu+mW8AEcLLHrkAvpleisOaFHuwIjCrWo=; b=ENoHtJRS+WIjdYClyXmd25Br7TEnphCKkijgBTCyTfSBUkefngJatwsXCSRqgjX2181H8UZIj+Yr/x5ANXKUz2jslNWzhwHF6s/GutokC9uEa1LfIIfmXSGMna5fo2K5zQoUl2opd0HvHz6TAcJNwjQYuHLybcjIbtETSjrZQy0= Received: from BYAPR03MB4773.namprd03.prod.outlook.com (20.179.92.152) by BYAPR03MB4616.namprd03.prod.outlook.com (20.179.90.205) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1730.19; Fri, 29 Mar 2019 11:55:36 +0000 Received: from BYAPR03MB4773.namprd03.prod.outlook.com ([fe80::1a8:1bc4:174b:472b]) by BYAPR03MB4773.namprd03.prod.outlook.com ([fe80::1a8:1bc4:174b:472b%2]) with mapi id 15.20.1750.017; Fri, 29 Mar 2019 11:55:36 +0000 From: Jisheng Zhang To: Jingoo Han , Gustavo Pimentel , Lorenzo Pieralisi , Bjorn Helgaas CC: "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Robin Murphy Subject: [PATCH v4 0/5] PCI: dwc: Support remove Thread-Topic: [PATCH v4 0/5] PCI: dwc: Support remove Thread-Index: AQHU5iZSipgXo/rRD0+KpsQPsTkaXg== Date: Fri, 29 Mar 2019 11:55:36 +0000 Message-ID: <20190329194750.265f6df6@xhacker.debian> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [124.74.246.114] x-clientproxiedby: TYCPR01CA0100.jpnprd01.prod.outlook.com (2603:1096:405:4::16) To BYAPR03MB4773.namprd03.prod.outlook.com (2603:10b6:a03:134::24) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Jisheng.Zhang@synaptics.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a262b79c-8202-46b8-51d4-08d6b43d7439 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020);SRVR:BYAPR03MB4616; x-ms-traffictypediagnostic: BYAPR03MB4616: x-microsoft-antispam-prvs: x-forefront-prvs: 0991CAB7B3 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(366004)(39850400004)(346002)(136003)(376002)(189003)(199004)(105586002)(6506007)(386003)(102836004)(8936002)(486006)(3846002)(52116002)(305945005)(478600001)(6116002)(50226002)(86362001)(4744005)(5660300002)(8676002)(110136005)(316002)(81166006)(6436002)(68736007)(81156014)(1076003)(26005)(14454004)(186003)(6486002)(72206003)(256004)(106356001)(54906003)(99286004)(9686003)(53936002)(2906002)(4326008)(476003)(25786009)(6512007)(66066001)(97736004)(71190400001)(71200400001)(7736002)(39210200001);DIR:OUT;SFP:1101;SCL:1;SRVR:BYAPR03MB4616;H:BYAPR03MB4773.namprd03.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:0; received-spf: None (protection.outlook.com: synaptics.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: CTLCkCScddFYOT5V49o9txc2VWm/iI8uVNlyemc9XSPejF6I9qUcbPcVmoiuyhy2sgB5jg9jqPGK8XsBLMNneds1m88KfHgnzKkCy5u6DYIw1jYXsrYOqn/QswB4LP5pqJt2BXBOnXqH5AVjnUjGHFUo5zYRR0hvxzxHs7mYfmVowgTyJMoNd7WgoNxKq3Nop7gSpARBjqOy3by/aWckhIVFn65DKbHBwx0TR4Q3ZQseV9gkkzqGMAg2gGirtIZcUU0aierJhnLxPeZdTnOlr5Ed+mejnVbrFXKWZb3SsfaDM6UJ4Lgviv+liR6fkluST0ye16ZFn/V5RnGY1jj9yOPFq9v6CIj0in3+jrXD8L/CQffpmnnyjNSOtlZlBT87hFZlS0Ot5j15wFYKfVFgeBuMbyJTPaXKIZjvKFRmt8k= Content-ID: <458082B79BCE304CA8FAC8FE862348E7@namprd03.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-Network-Message-Id: a262b79c-8202-46b8-51d4-08d6b43d7439 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Mar 2019 11:55:36.1336 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR03MB4616 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently, the PCI dwc host users don't support the remove, but nothing prevent us from supporting it. To achieve this goal, we need to ensure we can do necessary clean up work. Changes since v3: - add Gustavo's ACK to patch2, patch5 - remove IS_ENABLED(CONFIG_PCI_MSI) check Changes since v2: - address all Gustavo's comments - add Gustavo's ACK to patch1, patch3, patch4 Changes since v1: - address Bjorn's comments, I.E Capitalize, s/irq/IRQ/, s/msi/MSI/ Jisheng Zhang (5): PCI: dwc: Fix dw_pcie_free_msi() if msi_irq is invalid PCI: dwc: Free the page for MSI IRQ in dw_pcie_free_msi() PCI: dwc: Free MSI in the error code path of dw_pcie_host_init() PCI: dwc: Use devm_pci_alloc_host_bridge() to simplify the code PCI: dwc: Save root bus for driver remove .../pci/controller/dwc/pcie-designware-host.c | 60 ++++++++++--------- drivers/pci/controller/dwc/pcie-designware.h | 2 + 2 files changed, 34 insertions(+), 28 deletions(-)