Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5737474pxb; Tue, 16 Feb 2021 06:29:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJyoJME1s+5IrwPmiay5m7bTZvY8gc1bbYlZjxAtmmCmbUDWuWFj7umTokFTQh+aFRdon9nE X-Received: by 2002:aa7:c555:: with SMTP id s21mr5903894edr.43.1613485791248; Tue, 16 Feb 2021 06:29:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613485791; cv=none; d=google.com; s=arc-20160816; b=QgjE4R5mqX2HbwRzgnX2JRpJuZHQUt08VEy353Vf76CKsLGWejHo1Ija/nuS6ULoJw sYaHmc1kJLm8+srQQS8EfDZ00rAfbN24g65WqyzD1TXudXJMLpKn4bYfsmDobiXk7leO FX6XgGV+YVd7PzsoJ16fPnh+Rn70DJdZkmn1ipI81a6t1fzAwb0TWO6ROhx4lxmKgpfX IVeMMSIiLW/C9EZ86b85So7Et9MouLxOOKjlb/7JtA+OgPU03OIJoAshWZwhdpSbb62d jyCqwYOCcACz1NeZj1xSZaEIDFGsheEjExtsz5UHMnwubaP5olSVv4eit+9I7Vo/rh9t X4wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=faHK0cyvGGeTK0Lu2KFV2g1IzncYxmvTiObKgbcKmx0=; b=qpFUKQJyRI5dznsyeq4H5rHJEHxJCxHYGmc/NgVU1Gkl12+SUBFvDBQqAiAXAOHd5x 91AwiqVMvGBlXDGzFvpLxFYHvjaVDXgSW2R70x9CKkWSJJcjXViBprzsuEB2wG67wfyt lrYd0i8iOC8QeXIOknz9eqw3WKdkbjD2PaU0ATQi1z3UPxSLJr1dlyGdlTyI9GbTxVPJ eWMFSeBbFaLw9LHtEYukBvQHPx5noZHlX7h2U7+10onksoXLpMsn7nTDin6AZgt0V5ET yyZd59UXNhBUBO+iraRBsSXX2U2iRF7GjEj4HpNWAUVOq5bjuhoTOmau3xoTLYRVyvLo LmZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qRlbmw9Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w10si6069658edx.104.2021.02.16.06.29.28; Tue, 16 Feb 2021 06:29:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qRlbmw9Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230307AbhBPO1r (ORCPT + 99 others); Tue, 16 Feb 2021 09:27:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230206AbhBPO1K (ORCPT ); Tue, 16 Feb 2021 09:27:10 -0500 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D792C061574; Tue, 16 Feb 2021 06:26:29 -0800 (PST) Received: by mail-pg1-x530.google.com with SMTP id z68so6337394pgz.0; Tue, 16 Feb 2021 06:26:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=faHK0cyvGGeTK0Lu2KFV2g1IzncYxmvTiObKgbcKmx0=; b=qRlbmw9QjZCjMvUcUGVN8zUC3MT5NH+dYnEVedbk1SZi/hod3HnSm239TTk2FHeNkJ 47kpT0p57IWaSec4PR9BFHfJ8jg52O/paiSrSEaYF2BVX4EdeUYREInTzKa1SvGmxqfw 05bwsThstX++KCMslLXP1SgjzvDSBk+XCe/yc3DFAjmryMHMM54cpZ/AmqSIqJtVQxtf Vif7+CBybed6x9vCFHj0QNLoQRFRdSbarw8AZENJgoIm2ayyyN9V6KLSpkyuKkUs1H/H 8TkNhjds0aFcVmiaXvPsNa9Uq0QbKHam/pt+Rv5nxXrgVw0wXaiviNQrn9jYK2ayYByY 5QsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=faHK0cyvGGeTK0Lu2KFV2g1IzncYxmvTiObKgbcKmx0=; b=PVzVHW0+cIVND28siBgn5ME+ZiTYltipgLrXo5D7vJsovbtuIuYe9Z9shZEkGWxIGy tNZAGeT3EVRvYLvzvH5fMKIv/XqwXTtaNBFum2MSYyBkmcXWJCOWczSmDJVPUVY/V3UR mJPX3ljqG43ijbD5DHhUlIT84fe8FtQNPdlGal1cR3roq0ocksFg4I4waDdchSp6ZyBH I53goXJt07+5OQMC/2Gz8L9Kgc5vi11Yeb4OWTlCsmHbd9G2UYSNfTlThLD9ZSXk/mzP QJwNes/o+Ufa4nJDyI8SUh/UtO9ArejGkg4A3i/rNYxjhn0ydOhdxir0ADUSGNAb4V+y bE9Q== X-Gm-Message-State: AOAM533B+CFikrlbHwlp1XTrq3bn19HK+HmHbet3yA4mWnd1O9xM4m54 KEKg+G87JY5oFwODsPlH9GE= X-Received: by 2002:a63:af1b:: with SMTP id w27mr19028491pge.162.1613485588909; Tue, 16 Feb 2021 06:26:28 -0800 (PST) Received: from localhost (185.212.56.4.16clouds.com. [185.212.56.4]) by smtp.gmail.com with ESMTPSA id t1sm22289668pfl.194.2021.02.16.06.26.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Feb 2021 06:26:28 -0800 (PST) Date: Tue, 16 Feb 2021 22:26:26 +0800 From: Dejin Zheng To: Andy Shevchenko Cc: Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , corbet@lwn.net, jarkko.nikula@linux.intel.com, mika.westerberg@linux.intel.com, rric@kernel.org, helgaas@kernel.org, wsa@kernel.org, linux-doc@vger.kernel.org, linux-i2c@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 1/4] PCI: Introduce pcim_alloc_irq_vectors() Message-ID: <20210216142626.GA747814@nuc8i5> References: <20210215181550.714101-1-zhengdejin5@gmail.com> <20210215181550.714101-2-zhengdejin5@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 16, 2021 at 12:12:39PM +0200, Andy Shevchenko wrote: > On Mon, Feb 15, 2021 at 09:55:06PM +0100, Krzysztof WilczyƄski wrote: > > > Question: wouldn't you need to call pci_free_irq_vectors() somewhere, > > possibly to pcim_release() callback? Although, I am not sure where the > > right place would be. > > > > I am asking, as the documentation (see [4]) suggests that one would have > > to release allocated IRQ vectors (relevant exceprt): > > It's done in pcim_release() but not explicitly. > > if (dev->msi_enabled) > pci_disable_msi(dev); > if (dev->msix_enabled) > pci_disable_msix(dev); > > Maybe above can be replaced by pci_free_irq_vectors() to be sure that any > future change to PCI IRQ allocation APIs. > > Yes, I have checked and currently the above code is equivalent to > pci_free_irq_vectors(). > > Dejin, please update your patch accordingly. > Hi Andy and Krzysztof, I have modified it and sent patch v2. thank you very much! BR, Dejin > > -- > With Best Regards, > Andy Shevchenko > >