From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 239A7C31E48 for ; Wed, 12 Jun 2019 10:54:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F23B9208C4 for ; Wed, 12 Jun 2019 10:54:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408269AbfFLKyS (ORCPT ); Wed, 12 Jun 2019 06:54:18 -0400 Received: from foss.arm.com ([217.140.110.172]:50176 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406068AbfFLKyS (ORCPT ); Wed, 12 Jun 2019 06:54:18 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0017028; Wed, 12 Jun 2019 03:54:17 -0700 (PDT) Received: from redmoon (unknown [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B18973F246; Wed, 12 Jun 2019 03:55:57 -0700 (PDT) Date: Wed, 12 Jun 2019 11:54:10 +0100 From: Lorenzo Pieralisi To: Marc Zyngier Cc: "Z.q. Hou" , "mark.rutland@arm.com" , "devicetree@vger.kernel.org" , Xiaowei Bao , "linux-pci@vger.kernel.org" , "l.subrahmanya@mobiveil.co.in" , "will.deacon@arm.com" , "linux-kernel@vger.kernel.org" , Leo Li , "M.h. Lian" , "robh+dt@kernel.org" , Mingkai Hu , "catalin.marinas@arm.com" , "bhelgaas@google.com" , "shawnguo@kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCHv5 04/20] PCI: mobiveil: Remove the flag MSI_FLAG_MULTI_PCI_MSI Message-ID: <20190612105410.GA9918@redmoon> References: <20190412083635.33626-1-Zhiqiang.Hou@nxp.com> <20190412083635.33626-5-Zhiqiang.Hou@nxp.com> <20190611165935.GA22836@redmoon> <3b883516-1d63-1504-bdc9-22ac9c6f2d46@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3b883516-1d63-1504-bdc9-22ac9c6f2d46@arm.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 11, 2019 at 06:29:49PM +0100, Marc Zyngier wrote: > On 11/06/2019 17:59, Lorenzo Pieralisi wrote: > > On Fri, Apr 12, 2019 at 08:35:36AM +0000, Z.q. Hou wrote: > >> From: Hou Zhiqiang > >> > >> The current code does not support multiple MSIs, so remove > >> the corresponding flag from the msi_domain_info structure. > > > > Please explain me what's the problem before removing multi MSI > > support. > > The reason seems to be the following code in the allocator: > > WARN_ON(nr_irqs != 1); > mutex_lock(&msi->lock); > > bit = find_first_zero_bit(msi->msi_irq_in_use, msi->num_of_vectors); > if (bit >= msi->num_of_vectors) { > mutex_unlock(&msi->lock); > return -ENOSPC; > } > > set_bit(bit, msi->msi_irq_in_use); > > So instead of fixing the allocator, the author prefers disabling > the feature. I'm not sure whether that is an acceptable outcome... :) No it is not that's why I asked and I am waiting for an answer. Lorenzo From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lorenzo Pieralisi Subject: Re: [PATCHv5 04/20] PCI: mobiveil: Remove the flag MSI_FLAG_MULTI_PCI_MSI Date: Wed, 12 Jun 2019 11:54:10 +0100 Message-ID: <20190612105410.GA9918@redmoon> References: <20190412083635.33626-1-Zhiqiang.Hou@nxp.com> <20190412083635.33626-5-Zhiqiang.Hou@nxp.com> <20190611165935.GA22836@redmoon> <3b883516-1d63-1504-bdc9-22ac9c6f2d46@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <3b883516-1d63-1504-bdc9-22ac9c6f2d46@arm.com> Sender: linux-kernel-owner@vger.kernel.org To: Marc Zyngier Cc: "Z.q. Hou" , "mark.rutland@arm.com" , "devicetree@vger.kernel.org" , Xiaowei Bao , "linux-pci@vger.kernel.org" , "l.subrahmanya@mobiveil.co.in" , "will.deacon@arm.com" , "linux-kernel@vger.kernel.org" , Leo Li , "M.h. Lian" , "robh+dt@kernel.org" , Mingkai Hu , "catalin.marinas@arm.com" , "bhelgaas@google.com" , "shawnguo@kernel.org" , "linux-arm-kernel@lists.infradead.org" List-Id: devicetree@vger.kernel.org On Tue, Jun 11, 2019 at 06:29:49PM +0100, Marc Zyngier wrote: > On 11/06/2019 17:59, Lorenzo Pieralisi wrote: > > On Fri, Apr 12, 2019 at 08:35:36AM +0000, Z.q. Hou wrote: > >> From: Hou Zhiqiang > >> > >> The current code does not support multiple MSIs, so remove > >> the corresponding flag from the msi_domain_info structure. > > > > Please explain me what's the problem before removing multi MSI > > support. > > The reason seems to be the following code in the allocator: > > WARN_ON(nr_irqs != 1); > mutex_lock(&msi->lock); > > bit = find_first_zero_bit(msi->msi_irq_in_use, msi->num_of_vectors); > if (bit >= msi->num_of_vectors) { > mutex_unlock(&msi->lock); > return -ENOSPC; > } > > set_bit(bit, msi->msi_irq_in_use); > > So instead of fixing the allocator, the author prefers disabling > the feature. I'm not sure whether that is an acceptable outcome... :) No it is not that's why I asked and I am waiting for an answer. Lorenzo From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65230C31E46 for ; Wed, 12 Jun 2019 10:54:30 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3A1FF208C2 for ; Wed, 12 Jun 2019 10:54:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qq/LM9bt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3A1FF208C2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RGdmoJ7RsaNHVFl8xalJTLgSoJTkmjIQxKqvdy6TVvQ=; b=qq/LM9btIWGI5D 5zT/nLfeheAil0c8djhEyu/SQqTInl6+oTfSG6kM0BElwwnCEgV2yHMT4SE5abUGNEKbKPAd7OZOn KYVGJSdLICbLchnGg2rDr1eTr3MaUD/sZB+bVmmJpkOFMB34Vx+xiWpPt5pmA1n2Y3rcdleeC+UTD ZGdN3sb0NkhBIOTwORstxZxRiNq6jvrI9qiytQp5mLPlRCQgQ4CXVVBvzgecJTifCA7GYFFRSKxyO aSqsXfSfFQG6DA70PdieGkgBZ8FuR3t/y1FGjssiXMUg5XOh7Fz5l5mALOHyWH/cyPph4t5r+4Oqt Kd/2QBvZaciZR1GmGkSA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hb0tZ-0003jy-QV; Wed, 12 Jun 2019 10:54:21 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hb0tX-0003j9-9P for linux-arm-kernel@lists.infradead.org; Wed, 12 Jun 2019 10:54:20 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0017028; Wed, 12 Jun 2019 03:54:17 -0700 (PDT) Received: from redmoon (unknown [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B18973F246; Wed, 12 Jun 2019 03:55:57 -0700 (PDT) Date: Wed, 12 Jun 2019 11:54:10 +0100 From: Lorenzo Pieralisi To: Marc Zyngier Subject: Re: [PATCHv5 04/20] PCI: mobiveil: Remove the flag MSI_FLAG_MULTI_PCI_MSI Message-ID: <20190612105410.GA9918@redmoon> References: <20190412083635.33626-1-Zhiqiang.Hou@nxp.com> <20190412083635.33626-5-Zhiqiang.Hou@nxp.com> <20190611165935.GA22836@redmoon> <3b883516-1d63-1504-bdc9-22ac9c6f2d46@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <3b883516-1d63-1504-bdc9-22ac9c6f2d46@arm.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190612_035419_369247_02A83CF2 X-CRM114-Status: GOOD ( 13.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "mark.rutland@arm.com" , "devicetree@vger.kernel.org" , Xiaowei Bao , "linux-pci@vger.kernel.org" , "Z.q. Hou" , "l.subrahmanya@mobiveil.co.in" , "will.deacon@arm.com" , "linux-kernel@vger.kernel.org" , Leo Li , "M.h. Lian" , "robh+dt@kernel.org" , "linux-arm-kernel@lists.infradead.org" , "catalin.marinas@arm.com" , "bhelgaas@google.com" , "shawnguo@kernel.org" , Mingkai Hu Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jun 11, 2019 at 06:29:49PM +0100, Marc Zyngier wrote: > On 11/06/2019 17:59, Lorenzo Pieralisi wrote: > > On Fri, Apr 12, 2019 at 08:35:36AM +0000, Z.q. Hou wrote: > >> From: Hou Zhiqiang > >> > >> The current code does not support multiple MSIs, so remove > >> the corresponding flag from the msi_domain_info structure. > > > > Please explain me what's the problem before removing multi MSI > > support. > > The reason seems to be the following code in the allocator: > > WARN_ON(nr_irqs != 1); > mutex_lock(&msi->lock); > > bit = find_first_zero_bit(msi->msi_irq_in_use, msi->num_of_vectors); > if (bit >= msi->num_of_vectors) { > mutex_unlock(&msi->lock); > return -ENOSPC; > } > > set_bit(bit, msi->msi_irq_in_use); > > So instead of fixing the allocator, the author prefers disabling > the feature. I'm not sure whether that is an acceptable outcome... :) No it is not that's why I asked and I am waiting for an answer. Lorenzo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel