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 Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 15AE7C433EF for ; Mon, 29 Nov 2021 12:58:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 97C9C402DF; Mon, 29 Nov 2021 12:58:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eKvJ61kEchxC; Mon, 29 Nov 2021 12:58:52 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTPS id 5C86440295; Mon, 29 Nov 2021 12:58:52 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 3F4BAC001C; Mon, 29 Nov 2021 12:58:52 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 88473C000A for ; Mon, 29 Nov 2021 12:58:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 635BF402DF for ; Mon, 29 Nov 2021 12:58:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KCH7pw28OFyK for ; Mon, 29 Nov 2021 12:58:49 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by smtp4.osuosl.org (Postfix) with ESMTPS id B80B340295 for ; Mon, 29 Nov 2021 12:58:49 +0000 (UTC) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1638190727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=e3FciFdKO2khQ7f3Cmj7EZjTaeR+RNoaHikUdH9wKA4=; b=n/cJ6xXeDR0gfPdjD4YQQT6Q6+jc5VrNxxb/wMO1CCL68nw2ivWvCi9Oc5jRQP1vmykI2L wpM4ivbSXnNWtwWg2OMXcPoZHzFO/AGGAjG93eYJmpri4EZB5NYcUKVTUA6tLcXbKQxiVf PgtATQCKLuF+FaTJEgRWVfVNRjp4fW0VBSqZRDYs1JIvyPxR2VSAtYwkT2Ktl7we2swKMa g5AVSA4LFn5citpFX56X18aS9mj7c9i9SbNhRQePzqQeBXdCP73LY2CoabUjdXkXf4G7SV XE6SiQ1P1OMABrt6rekZNAKLNNTpwhPlI8WmKH8Vf+HIO7MpEkvLG1D22S5tnQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1638190727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=e3FciFdKO2khQ7f3Cmj7EZjTaeR+RNoaHikUdH9wKA4=; b=uzqwAVQ3mlWAmoUWkKfqvuEYkEasky/aV9Ezf1NXjZIqVG+VhtAHegMwxJu+JHXrQe2PJm sxMNfZT3wK1xjhCg== To: Will Deacon Subject: Re: [patch 33/37] iommu/arm-smmu-v3: Use msi_get_virq() In-Reply-To: <87lf17dsyp.ffs@tglx> References: <20211126224100.303046749@linutronix.de> <20211126230525.885757679@linutronix.de> <20211129105506.GA22761@willie-the-truck> <87lf17dsyp.ffs@tglx> Date: Mon, 29 Nov 2021 13:58:46 +0100 Message-ID: <87ilwbdsop.ffs@tglx> MIME-Version: 1.0 Cc: Nishanth Menon , Mark Rutland , Stuart Yoder , linux-pci@vger.kernel.org, Ashok Raj , Marc Zygnier , x86@kernel.org, Sinan Kaya , iommu@lists.linux-foundation.org, Bjorn Helgaas , Megha Dey , Jason Gunthorpe , Kevin Tian , Alex Williamson , Santosh Shilimkar , linux-arm-kernel@lists.infradead.org, Tero Kristo , Greg Kroah-Hartman , LKML , Vinod Koul , dmaengine@vger.kernel.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Mon, Nov 29 2021 at 13:52, Thomas Gleixner wrote: > On Mon, Nov 29 2021 at 10:55, Will Deacon wrote: >> On Sat, Nov 27, 2021 at 02:20:59AM +0100, Thomas Gleixner wrote: >>> + smmu->evtq.q.irq = msi_get_virq(dev, EVTQ_MSI_INDEX); >>> + smmu->gerr_irq = msi_get_virq(dev, GERROR_MSI_INDEX); >>> + smmu->priq.q.irq = msi_get_virq(dev, PRIQ_MSI_INDEX); >> >> Prviously, if retrieval of the MSI failed then we'd fall back to wired >> interrupts. Now, I think we'll clobber the interrupt with 0 instead. Can >> we make the assignments to smmu->*irq here conditional on the MSI being >> valid, please? > > So the wired irq number is in ->irq already and MSI does an override > if available. Not really obvious... But, this happens right after: ret = platform_msi_domain_alloc_irqs(dev, nvec, arm_smmu_write_msi_msg); So if that succeeded then the descriptors exist and have interrupts assigned. Thanks, tglx _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2DCC4C433EF for ; Mon, 29 Nov 2021 13:00:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231500AbhK2NEG (ORCPT ); Mon, 29 Nov 2021 08:04:06 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:53504 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240431AbhK2NCG (ORCPT ); Mon, 29 Nov 2021 08:02:06 -0500 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1638190727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=e3FciFdKO2khQ7f3Cmj7EZjTaeR+RNoaHikUdH9wKA4=; b=n/cJ6xXeDR0gfPdjD4YQQT6Q6+jc5VrNxxb/wMO1CCL68nw2ivWvCi9Oc5jRQP1vmykI2L wpM4ivbSXnNWtwWg2OMXcPoZHzFO/AGGAjG93eYJmpri4EZB5NYcUKVTUA6tLcXbKQxiVf PgtATQCKLuF+FaTJEgRWVfVNRjp4fW0VBSqZRDYs1JIvyPxR2VSAtYwkT2Ktl7we2swKMa g5AVSA4LFn5citpFX56X18aS9mj7c9i9SbNhRQePzqQeBXdCP73LY2CoabUjdXkXf4G7SV XE6SiQ1P1OMABrt6rekZNAKLNNTpwhPlI8WmKH8Vf+HIO7MpEkvLG1D22S5tnQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1638190727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=e3FciFdKO2khQ7f3Cmj7EZjTaeR+RNoaHikUdH9wKA4=; b=uzqwAVQ3mlWAmoUWkKfqvuEYkEasky/aV9Ezf1NXjZIqVG+VhtAHegMwxJu+JHXrQe2PJm sxMNfZT3wK1xjhCg== To: Will Deacon Cc: LKML , Bjorn Helgaas , Marc Zygnier , Alex Williamson , Kevin Tian , Jason Gunthorpe , Megha Dey , Ashok Raj , linux-pci@vger.kernel.org, Greg Kroah-Hartman , Santosh Shilimkar , iommu@lists.linux-foundation.org, dmaengine@vger.kernel.org, Stuart Yoder , Laurentiu Tudor , Nishanth Menon , Tero Kristo , linux-arm-kernel@lists.infradead.org, x86@kernel.org, Vinod Koul , Mark Rutland , Sinan Kaya Subject: Re: [patch 33/37] iommu/arm-smmu-v3: Use msi_get_virq() In-Reply-To: <87lf17dsyp.ffs@tglx> References: <20211126224100.303046749@linutronix.de> <20211126230525.885757679@linutronix.de> <20211129105506.GA22761@willie-the-truck> <87lf17dsyp.ffs@tglx> Date: Mon, 29 Nov 2021 13:58:46 +0100 Message-ID: <87ilwbdsop.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org On Mon, Nov 29 2021 at 13:52, Thomas Gleixner wrote: > On Mon, Nov 29 2021 at 10:55, Will Deacon wrote: >> On Sat, Nov 27, 2021 at 02:20:59AM +0100, Thomas Gleixner wrote: >>> + smmu->evtq.q.irq = msi_get_virq(dev, EVTQ_MSI_INDEX); >>> + smmu->gerr_irq = msi_get_virq(dev, GERROR_MSI_INDEX); >>> + smmu->priq.q.irq = msi_get_virq(dev, PRIQ_MSI_INDEX); >> >> Prviously, if retrieval of the MSI failed then we'd fall back to wired >> interrupts. Now, I think we'll clobber the interrupt with 0 instead. Can >> we make the assignments to smmu->*irq here conditional on the MSI being >> valid, please? > > So the wired irq number is in ->irq already and MSI does an override > if available. Not really obvious... But, this happens right after: ret = platform_msi_domain_alloc_irqs(dev, nvec, arm_smmu_write_msi_msg); So if that succeeded then the descriptors exist and have interrupts assigned. Thanks, tglx 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id D8C2FC433F5 for ; Mon, 29 Nov 2021 13:00:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LrFibniiOIDpafaoEASfqvQ9LyFmg+pzhLw8W5KI9j0=; b=S9UHiBXVaJ3DUn sFd3HB+5aVj9b2zyY/uHXOc1q4JtE8Baz3j0m+HTlD3qexu85WO7ezBsQ303ifIvIkl/tSYqYe2rL GBj4/U/RDe8iyGKaHU/V6C/ZodEgp/vAo3/OMMmitOK5hALieYIvz48BmMqkM9dnHdeIOcQQVGobL NqU8qBYyQJ/0xV72DYLSXhFZCd0zcUre4K76x/djRDc9nws+n9x2z68+uQRJ1cXtMdDNaIkodmQGm P8+V8Y9ON+6ETFHuhwwXgAC5r1619FJ3QlGtCUL3yd4x6jF8waZYgPqEzrnWvtaOgmf6tH0hjuMqm QXOygFaAqIJdxWVKuHTA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mrgF9-000ls2-HJ; Mon, 29 Nov 2021 12:58:51 +0000 Received: from galois.linutronix.de ([2a0a:51c0:0:12e:550::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mrgF6-000lrL-Iy for linux-arm-kernel@lists.infradead.org; Mon, 29 Nov 2021 12:58:49 +0000 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1638190727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=e3FciFdKO2khQ7f3Cmj7EZjTaeR+RNoaHikUdH9wKA4=; b=n/cJ6xXeDR0gfPdjD4YQQT6Q6+jc5VrNxxb/wMO1CCL68nw2ivWvCi9Oc5jRQP1vmykI2L wpM4ivbSXnNWtwWg2OMXcPoZHzFO/AGGAjG93eYJmpri4EZB5NYcUKVTUA6tLcXbKQxiVf PgtATQCKLuF+FaTJEgRWVfVNRjp4fW0VBSqZRDYs1JIvyPxR2VSAtYwkT2Ktl7we2swKMa g5AVSA4LFn5citpFX56X18aS9mj7c9i9SbNhRQePzqQeBXdCP73LY2CoabUjdXkXf4G7SV XE6SiQ1P1OMABrt6rekZNAKLNNTpwhPlI8WmKH8Vf+HIO7MpEkvLG1D22S5tnQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1638190727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=e3FciFdKO2khQ7f3Cmj7EZjTaeR+RNoaHikUdH9wKA4=; b=uzqwAVQ3mlWAmoUWkKfqvuEYkEasky/aV9Ezf1NXjZIqVG+VhtAHegMwxJu+JHXrQe2PJm sxMNfZT3wK1xjhCg== To: Will Deacon Cc: LKML , Bjorn Helgaas , Marc Zygnier , Alex Williamson , Kevin Tian , Jason Gunthorpe , Megha Dey , Ashok Raj , linux-pci@vger.kernel.org, Greg Kroah-Hartman , Santosh Shilimkar , iommu@lists.linux-foundation.org, dmaengine@vger.kernel.org, Stuart Yoder , Laurentiu Tudor , Nishanth Menon , Tero Kristo , linux-arm-kernel@lists.infradead.org, x86@kernel.org, Vinod Koul , Mark Rutland , Sinan Kaya Subject: Re: [patch 33/37] iommu/arm-smmu-v3: Use msi_get_virq() In-Reply-To: <87lf17dsyp.ffs@tglx> References: <20211126224100.303046749@linutronix.de> <20211126230525.885757679@linutronix.de> <20211129105506.GA22761@willie-the-truck> <87lf17dsyp.ffs@tglx> Date: Mon, 29 Nov 2021 13:58:46 +0100 Message-ID: <87ilwbdsop.ffs@tglx> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211129_045848_793839_DF5D8EB9 X-CRM114-Status: GOOD ( 10.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Nov 29 2021 at 13:52, Thomas Gleixner wrote: > On Mon, Nov 29 2021 at 10:55, Will Deacon wrote: >> On Sat, Nov 27, 2021 at 02:20:59AM +0100, Thomas Gleixner wrote: >>> + smmu->evtq.q.irq = msi_get_virq(dev, EVTQ_MSI_INDEX); >>> + smmu->gerr_irq = msi_get_virq(dev, GERROR_MSI_INDEX); >>> + smmu->priq.q.irq = msi_get_virq(dev, PRIQ_MSI_INDEX); >> >> Prviously, if retrieval of the MSI failed then we'd fall back to wired >> interrupts. Now, I think we'll clobber the interrupt with 0 instead. Can >> we make the assignments to smmu->*irq here conditional on the MSI being >> valid, please? > > So the wired irq number is in ->irq already and MSI does an override > if available. Not really obvious... But, this happens right after: ret = platform_msi_domain_alloc_irqs(dev, nvec, arm_smmu_write_msi_msg); So if that succeeded then the descriptors exist and have interrupts assigned. Thanks, tglx _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel