Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp787819imu; Thu, 13 Dec 2018 04:35:57 -0800 (PST) X-Google-Smtp-Source: AFSGD/XmgzrQ0dNghRPlR585N0TI/DGWmNR5bfC9skH9LK6Ugrm+noX9ehyotBHlIW+yoDW7ARbs X-Received: by 2002:a62:824c:: with SMTP id w73mr23761560pfd.150.1544704557711; Thu, 13 Dec 2018 04:35:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544704557; cv=none; d=google.com; s=arc-20160816; b=VwyX6uyJJ5Not9DYTiMPCqunlsoNjSMcMrdGS7z3S1z1rXiJLM87wjT3OJAYFsve+V QOybcbMqd5s3ilu3phGTanqg/nTqp990JW7RfYYs91nk3rHmDIrJIkUh9BCBfVgIYG/C yhUFZaJsE3iWaFn0XYwMRAtgSEg/DABDjvoozHYJxkthOCu7a/gqE+Am0xqf6JQzN5bb 1swqva3hxbnsNct6TQNj2SPrBcx2aJ63G5XpKEEeBPBWWCFeVZFv20IP8hl8GNblj/gp ePSAnCaiAJijhfbPrzksxzdfscjzODBig9npund+7lvAM6OYq/A33VL0nK+oqxu/EJDm dkyQ== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=vPXGbSJaM+8/RzY7YXLqKjeSeyJlK52UGb8dsBWtkqg=; b=Kfcgmdoqc0LXT44Q25ttkwJ7UrOHJlrhF2uuzjKbeB9btIN0g+xsnAbOXev4NkUUkj ap206e0jFVPv4ICRju2lmsJ/kJywOmN4j5R3dd646Iigdc7dI1PZWby006CV9LcRMZUW vZF3QYoHcPaO9dykAUaIMYfkAGZymCbrsp1HuA7scsSSePiEXn5p90ONXOWfdQEhRygQ O3rvk8FBxL7eoKv1Z5doDOBpvEay4DOlChGJwjMZyxMVpvHSTvQKjFLH/83NwwGnE7k9 qNxpk2nNak2XXfB/dVZ6B0Si2BGLQdfK1564xIaL99Kv3QF7O65bZAcy1qNRqmiDXjg3 Eo7w== 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 r197si1645255pfr.192.2018.12.13.04.35.41; Thu, 13 Dec 2018 04:35:57 -0800 (PST) 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 S1729149AbeLMMdW (ORCPT + 99 others); Thu, 13 Dec 2018 07:33:22 -0500 Received: from foss.arm.com ([217.140.101.70]:60858 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728517AbeLMMdW (ORCPT ); Thu, 13 Dec 2018 07:33:22 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 81326A78; Thu, 13 Dec 2018 04:33:21 -0800 (PST) Received: from red-moon (red-moon.cambridge.arm.com [10.1.197.39]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 298E23F575; Thu, 13 Dec 2018 04:33:20 -0800 (PST) Date: Thu, 13 Dec 2018 12:34:01 +0000 From: Lorenzo Pieralisi To: Lucas Stach Cc: Richard Zhu , "bhelgaas@google.com" , "andrew.smirnov@gmail.com" , "linux-pci@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [v2] PCI: imx: make msi work without pcieportbus Message-ID: <20181213123401.GA26763@red-moon> References: <1544687042-16595-1-git-send-email-hongxing.zhu@nxp.com> <1544692768.3137.25.camel@pengutronix.de> <1544695636.3137.27.camel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1544695636.3137.27.camel@pengutronix.de> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 13, 2018 at 11:07:16AM +0100, Lucas Stach wrote: > Am Donnerstag, den 13.12.2018, 09:57 +0000 schrieb Richard Zhu: > > Hi Lucas: > > > > > -----Original Message----- > > > > > From: Lucas Stach [mailto:l.stach@pengutronix.de] > > > Sent: 2018年12月13日 17:19 > > > > > > > To: Richard Zhu ; bhelgaas@google.com; > > > lorenzo.pieralisi@arm.com; andrew.smirnov@gmail.com > > > > > > > Cc: linux-pci@vger.kernel.org; linux-arm-kernel@lists.infradead.org; > > > linux-kernel@vger.kernel.org > > > Subject: Re: [v2] PCI: imx: make msi work without pcieportbus > > > > > > Hi Richard, > > > > > > Am Donnerstag, den 13.12.2018, 08:02 +0000 schrieb Richard Zhu: > > > > MSI_EN of iMX PCIe RC would be asserted when PCIEPORTBUS driver is > > > > selected. > > > > Thus, the MSI works fine on iMX PCIe before. > > > > Assert it unconditionally when MSI is supported. > > > > Otherwise, the MSI wouldn't be triggered although the EP is present > > > > and the MSIs are assigned. > > > > > > Thanks for digging into this issue. This seems like the right way forward. > > > However, did you test this with devices using legacy IRQs? > > > I.e. booting with "nomsi" on the kernel command line to see if legacy IRQs still > > > work if this bit is set, or if we need to avoid setting this when the user > > > explicitly requests to disable MSIs? > > > > > > Regards, > > > Lucas > > > > > > > [Richard Zhu] Thanks for your review. > > The Legacy INTx is broken. > > The MSI_EN bit shouldn't be asserted when the user explicitly requests to disable MSIs. > > Okay, so this patch should be extended with a check for > pci_msi_enabled() to see if the user explicitly want legacy IRQs. > > > BTW, regarding to Baruch's comments, it seems that all the (IS_ENABLED(CONFIG_PCI_MSI) check in > >  the dwc host drivers are not required anymore, since the depends on PCI_MSI_IRQ_DOMAIN, right? > > That's correct. This is mostly a historical artifact from the time when > we were able to build without MSI support. Those checks could be > cleaned up now that we depend on the MSI options. The question is whether we should really depend on PCI_MSI_IRQ_DOMAIN option, should we ? Lorenzo