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=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 AF545C48BE5 for ; Tue, 15 Jun 2021 18:08:47 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 3ABEF610A0 for ; Tue, 15 Jun 2021 18:08:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3ABEF610A0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id EE08340296; Tue, 15 Jun 2021 18:08:46 +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 HEVMvp_mvTga; Tue, 15 Jun 2021 18:08:46 +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 9A3AC40225; Tue, 15 Jun 2021 18:08:45 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 6131EC000D; Tue, 15 Jun 2021 18:08:45 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id E68E1C000B for ; Tue, 15 Jun 2021 18:08:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id D578283521 for ; Tue, 15 Jun 2021 18:08:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AN0tvcbiNAzJ for ; Tue, 15 Jun 2021 18:08:42 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp1.osuosl.org (Postfix) with ESMTP id A1D8B834C7 for ; Tue, 15 Jun 2021 18:08:42 +0000 (UTC) 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 CCFD4ED1; Tue, 15 Jun 2021 11:08:41 -0700 (PDT) Received: from [10.57.9.136] (unknown [10.57.9.136]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6A32B3F694; Tue, 15 Jun 2021 11:08:40 -0700 (PDT) Subject: Re: [PATCH v3 3/9] iommu/arm-smmu: Implement ->probe_finalize() To: Marek Szyprowski , Thierry Reding , Will Deacon , Krzysztof Kozlowski References: <20210603164632.1000458-1-thierry.reding@gmail.com> <20210603164632.1000458-4-thierry.reding@gmail.com> <46e65ade-49cb-5437-5863-1f11ccc2205e@samsung.com> From: Robin Murphy Message-ID: Date: Tue, 15 Jun 2021 19:08:34 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <46e65ade-49cb-5437-5863-1f11ccc2205e@samsung.com> Content-Language: en-GB Cc: linux-tegra@vger.kernel.org, iommu@lists.linux-foundation.org, Nicolin Chen , linux-arm-kernel@lists.infradead.org, Jon Hunter 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On 2021-06-15 19:01, Marek Szyprowski wrote: > Hi, > > On 03.06.2021 18:46, Thierry Reding wrote: >> From: Thierry Reding >> >> Implement a ->probe_finalize() callback that can be used by vendor >> implementations to perform extra programming necessary after devices >> have been attached to the SMMU. >> >> Signed-off-by: Thierry Reding > > This patch landed recently in linux-next as commit 0d97174aeadf > ("iommu/arm-smmu: Implement ->probe_finalize()"). It causes the > following issue on ARM Juno R1 board: [...] >> +static void arm_smmu_probe_finalize(struct device *dev) >> +{ >> + struct arm_smmu_master_cfg *cfg; >> + struct arm_smmu_device *smmu; >> + >> + cfg = dev_iommu_priv_get(dev); >> + smmu = cfg->smmu; >> + >> + if (smmu->impl->probe_finalize) Oops, indeed that needs to check smmu->impl first. Robin. >> + smmu->impl->probe_finalize(smmu, dev); >> +} >> + _______________________________________________ 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 X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 05C54C48BDF for ; Tue, 15 Jun 2021 18:08:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D747C610A0 for ; Tue, 15 Jun 2021 18:08:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229494AbhFOSKt (ORCPT ); Tue, 15 Jun 2021 14:10:49 -0400 Received: from foss.arm.com ([217.140.110.172]:42508 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230370AbhFOSKr (ORCPT ); Tue, 15 Jun 2021 14:10:47 -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 CCFD4ED1; Tue, 15 Jun 2021 11:08:41 -0700 (PDT) Received: from [10.57.9.136] (unknown [10.57.9.136]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6A32B3F694; Tue, 15 Jun 2021 11:08:40 -0700 (PDT) Subject: Re: [PATCH v3 3/9] iommu/arm-smmu: Implement ->probe_finalize() To: Marek Szyprowski , Thierry Reding , Will Deacon , Krzysztof Kozlowski Cc: iommu@lists.linux-foundation.org, Jon Hunter , Nicolin Chen , linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20210603164632.1000458-1-thierry.reding@gmail.com> <20210603164632.1000458-4-thierry.reding@gmail.com> <46e65ade-49cb-5437-5863-1f11ccc2205e@samsung.com> From: Robin Murphy Message-ID: Date: Tue, 15 Jun 2021 19:08:34 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <46e65ade-49cb-5437-5863-1f11ccc2205e@samsung.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org On 2021-06-15 19:01, Marek Szyprowski wrote: > Hi, > > On 03.06.2021 18:46, Thierry Reding wrote: >> From: Thierry Reding >> >> Implement a ->probe_finalize() callback that can be used by vendor >> implementations to perform extra programming necessary after devices >> have been attached to the SMMU. >> >> Signed-off-by: Thierry Reding > > This patch landed recently in linux-next as commit 0d97174aeadf > ("iommu/arm-smmu: Implement ->probe_finalize()"). It causes the > following issue on ARM Juno R1 board: [...] >> +static void arm_smmu_probe_finalize(struct device *dev) >> +{ >> + struct arm_smmu_master_cfg *cfg; >> + struct arm_smmu_device *smmu; >> + >> + cfg = dev_iommu_priv_get(dev); >> + smmu = cfg->smmu; >> + >> + if (smmu->impl->probe_finalize) Oops, indeed that needs to check smmu->impl first. Robin. >> + smmu->impl->probe_finalize(smmu, dev); >> +} >> + 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=-10.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 A130DC48BDF for ; Tue, 15 Jun 2021 21:48:01 +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 6D4E561159 for ; Tue, 15 Jun 2021 21:48:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6D4E561159 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=tZLA1qh94GOh2zu7E2jt0bybFrQR9KQYOW0ZL7vPs9g=; b=UBCfZktkraV7LIvelBW9fqOIUh i39jkuTiwOS7vEl9W2tYHZpC342y+wUDBJYPxt3PLGn6GXP2F8huqZQ+n6fStm3rah+kImnW2XWmF rZ/Oy04lTaWT74zxRbjKuiAuFXUTz3oYH6U8dfXvVQAMshU+ipZ8q/lI7FFki+WiX2+JsqEclAf+S qAV/+QF9tVe1ALPfKT7dJ/ONF3rIgtZARQhpgGOTs5xIvu38M2ik175HLvwVBVscmWIqnGTL+pTC2 hJDFxsPfiJLXbQDYQokzjHiXmf202DzyNWWdvWxjJIwsmOqQNhISKyWMxwUNgbk53CJYIjqelJ8Xe l8Rq/yyw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltGsv-003I4W-Vv; Tue, 15 Jun 2021 21:46:14 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltDUQ-0020VG-UH for linux-arm-kernel@lists.infradead.org; Tue, 15 Jun 2021 18:08:44 +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 CCFD4ED1; Tue, 15 Jun 2021 11:08:41 -0700 (PDT) Received: from [10.57.9.136] (unknown [10.57.9.136]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6A32B3F694; Tue, 15 Jun 2021 11:08:40 -0700 (PDT) Subject: Re: [PATCH v3 3/9] iommu/arm-smmu: Implement ->probe_finalize() To: Marek Szyprowski , Thierry Reding , Will Deacon , Krzysztof Kozlowski Cc: iommu@lists.linux-foundation.org, Jon Hunter , Nicolin Chen , linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20210603164632.1000458-1-thierry.reding@gmail.com> <20210603164632.1000458-4-thierry.reding@gmail.com> <46e65ade-49cb-5437-5863-1f11ccc2205e@samsung.com> From: Robin Murphy Message-ID: Date: Tue, 15 Jun 2021 19:08:34 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <46e65ade-49cb-5437-5863-1f11ccc2205e@samsung.com> Content-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210615_110843_099443_DB672863 X-CRM114-Status: GOOD ( 12.95 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2021-06-15 19:01, Marek Szyprowski wrote: > Hi, > > On 03.06.2021 18:46, Thierry Reding wrote: >> From: Thierry Reding >> >> Implement a ->probe_finalize() callback that can be used by vendor >> implementations to perform extra programming necessary after devices >> have been attached to the SMMU. >> >> Signed-off-by: Thierry Reding > > This patch landed recently in linux-next as commit 0d97174aeadf > ("iommu/arm-smmu: Implement ->probe_finalize()"). It causes the > following issue on ARM Juno R1 board: [...] >> +static void arm_smmu_probe_finalize(struct device *dev) >> +{ >> + struct arm_smmu_master_cfg *cfg; >> + struct arm_smmu_device *smmu; >> + >> + cfg = dev_iommu_priv_get(dev); >> + smmu = cfg->smmu; >> + >> + if (smmu->impl->probe_finalize) Oops, indeed that needs to check smmu->impl first. Robin. >> + smmu->impl->probe_finalize(smmu, dev); >> +} >> + _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel