Received: by 2002:ac0:de83:0:0:0:0:0 with SMTP id b3csp928443imk; Sun, 3 Jul 2022 12:26:57 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uQXWBatFqaiB57FRP5pifP+a8P0TbI+3oBAzjfU9AkmmgVpHQhleMrnGTgQaHHjotqMICT X-Received: by 2002:a05:6402:43c7:b0:435:8a92:e8d0 with SMTP id p7-20020a05640243c700b004358a92e8d0mr34149369edc.174.1656876417208; Sun, 03 Jul 2022 12:26:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656876417; cv=none; d=google.com; s=arc-20160816; b=u8nLDg3VZdgUfG76BFQKPka6PGJWyLCo/H1l/MKJQuZEiQ1RsriROGHBTOoCyCG4Vb HxxNAmECWH9cmhoEj5gWpZ2sPi0ergr8yHxYNEyjSqPB/RIOeRoqQ4Pu6af93sa2fb5p bvNj2oCP+llAkUrbfNbgsIv6icrsXZ2rEfwLshon3g41y5+QM6BKFuz+hu5/i4U1Xy1q kul5DmMPF0k7Yy2qsI1FZ3MJzpvaDDwmzinH+MD/g4G6gvW8T6a34s+wvSjvwdWvORfZ JUHUyrQ7ti/NIxR+aAzyFDl0pfTcHGfSKLfhPKBFX9smZKgPQvkB0ISENzKnl9E394AN bXCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=HodKenU2DqzSAsTr3GOaLCVqw1DOEowtMVHlqD3WUxM=; b=I4ahDnttlxXH8NI6Kq7Gu69LjrDDq71T4OgkqW3yKWZKfhvIKI6A8tReaGh2g9eZpV ELvZxeAnbcEyPVF2/zwD0/bqVq+eZA/IjYdrqajrtb3/i91a2JOKBvzbFdnAnUNlqpx5 vBM27/sRxDTkyxjoBMggIU0W2xu4laCZ7G3qpar4xN/8dwvF+heuC8XYANIwHJK5rTyA FPzsBqiPNHHOas7iVeUaGtyVk+vMCXxsChitFEijOKkM9J4x653Kzkeb2uSWbxO5Z4CG sAxLyz9J4MHau10Q823sWgjX3anLbCJpd3we5FsiO1FgWy5YSFxO3yQQdXccRhnwGkSJ 7M8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CVxzasIg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g16-20020a056402321000b00439eafef712si5828594eda.72.2022.07.03.12.26.32; Sun, 03 Jul 2022 12:26:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CVxzasIg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232059AbiGCSuv (ORCPT + 99 others); Sun, 3 Jul 2022 14:50:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229794AbiGCSut (ORCPT ); Sun, 3 Jul 2022 14:50:49 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D87192DCA for ; Sun, 3 Jul 2022 11:50:46 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id n15so8579516ljg.8 for ; Sun, 03 Jul 2022 11:50:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=HodKenU2DqzSAsTr3GOaLCVqw1DOEowtMVHlqD3WUxM=; b=CVxzasIgMMg1pGWidgzNRAOOjqyXaih7Ino2F33/WtmphQ2G35DoChFRM2GMulF6qG RZeAkWgaTLNCKg04WDjgpCbQ20Rc+QdUSoL4H2KT/lPGaN3SWeahcaW/E92RnP/4/5mZ hEOElL2md1ExhXOjnTFhgp1nXv/pwQYqNUsr9glnz3YntmEndmlpmKHFSSgRXB9su2ed EHuUG7Cuba9c7Mhok5IO3HAh4jWKu2BLBrpxhwShteT5hzS4JqnHMj7tscuqtPZVBzu5 BHoinNNJqzenJrVc2bLsA3h7Inj6bPR5xf0q3un0x/hCj1bUl/HihG7F6q+BmQ8veBuk uFIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=HodKenU2DqzSAsTr3GOaLCVqw1DOEowtMVHlqD3WUxM=; b=kiOLobjT959Y82KLxqt67immnPKGYSpdiQXuh80qHtf+61IFhpHD9q599CpmsjqJgs JVe1G0Y1jvUF/rIZG4DuxjUHlykdDSScwFKNJ81seFVNJg7uyc+whzU+P0kgwqKgyfOM VhTKqKK7Zf11n8dBGdC7nIvkLqAPHyC3P2OE1fJmo2NL3216QK/TlABEx4hL3s7Lgl2L ngd3tadctlh+OsGKvhxDgabnZQ52bg+QRug3nsxhnH7Pib+O8hXnP7XpRLhzRy/9o6vu nqPBPwIImQeK7d+naQldRSpbMYBYhjqrHxtXPMdMzf49ObIdW9iCPFsXwOWebvmif5kl 2f3w== X-Gm-Message-State: AJIora92M79I+DilpKoTv6FAo9RzFQ6w73EtRNL4uhilyX0Lt1mWhkq4 yf5rlw/0UztpyxzoyurDESv0XAM0/Z4ts+hZKSU= X-Received: by 2002:a05:651c:11c1:b0:25a:8968:b834 with SMTP id z1-20020a05651c11c100b0025a8968b834mr13980932ljo.212.1656874245240; Sun, 03 Jul 2022 11:50:45 -0700 (PDT) Received: from [192.168.1.52] ([84.20.121.239]) by smtp.gmail.com with ESMTPSA id p7-20020a05651238c700b0047f66294ff4sm4808396lft.151.2022.07.03.11.50.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 03 Jul 2022 11:50:44 -0700 (PDT) Message-ID: <9afb1e98-706f-ed61-892c-e3cc321364b4@linaro.org> Date: Sun, 3 Jul 2022 20:50:43 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH 1/4] iommu/exynos: Set correct dma mask for SysMMU v5+ Content-Language: en-US To: Sam Protsenko , Marek Szyprowski Cc: Joerg Roedel , Will Deacon , Robin Murphy , Janghyuck Kim , Cho KyongHo , Daniel Mentz , Sumit Semwal , iommu@lists.linux-foundation.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220702213724.3949-1-semen.protsenko@linaro.org> <20220702213724.3949-2-semen.protsenko@linaro.org> From: Krzysztof Kozlowski In-Reply-To: <20220702213724.3949-2-semen.protsenko@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/07/2022 23:37, Sam Protsenko wrote: > SysMMU v5+ supports 36 bit physical address space. Set corresponding DMA > mask to avoid falling back to SWTLBIO usage in dma_map_single() because > of failed dma_capable() check. > > The original code for this fix was suggested by Marek. > > Originally-by: Marek Szyprowski This is some tip specific tag, I don't think checkpatch allows it. Either use suggesgted-by or co-developed-by + SoB. > Signed-off-by: Sam Protsenko > --- > drivers/iommu/exynos-iommu.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c > index 71f2018e23fe..28f8c8d93aa3 100644 > --- a/drivers/iommu/exynos-iommu.c > +++ b/drivers/iommu/exynos-iommu.c > @@ -647,6 +647,14 @@ static int exynos_sysmmu_probe(struct platform_device *pdev) > } > } > > + if (MMU_MAJ_VER(data->version) >= 5) { > + ret = dma_set_mask(dev, DMA_BIT_MASK(36)); > + if (ret) { > + dev_err(dev, "Unable to set DMA mask: %d\n", ret); Missing cleanup: iommu_device_unregister and probably also: iommu_device_sysfs_remove > + return ret; > + } > + } > + > /* > * use the first registered sysmmu device for performing > * dma mapping operations on iommu page tables (cpu cache flush) Best regards, Krzysztof