Message ID | 6b4156c5061e29bfd95fdd2f6744ee727ea7f1a2.1702486837.git.robin.murphy@arm.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp7933519dys; Wed, 13 Dec 2023 09:18:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IGP00GZ0kpbV1rFJ7oJmt+BXZZg2TPV06CuVIOM4Wal3my4oqJpTFVSzO58hnfiaqO3UsFq X-Received: by 2002:a17:90b:186:b0:28a:d736:9c9a with SMTP id t6-20020a17090b018600b0028ad7369c9amr1049407pjs.2.1702487912872; Wed, 13 Dec 2023 09:18:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702487912; cv=none; d=google.com; s=arc-20160816; b=sQ3Vkv6axIL75OxfmhBEq16tQskqMsk8IXYObvJWeM5msQMkoQnjY7v8hDFM2LwX5A QRqpZikgnqEEP4OSDBO/uptkqrzhvSsY3uvhgR5o8s6Cqu2M2dJpYnV+yiu4A88Zqsc5 eTFiCjEm4DtXM6ns8vXwpoTduyEGEqE4aPypz5OfAhDgMealpm7P6gDltUq9WHw/fIKN HtxDaGKpp5ey7Sdao/pWLNhe354kUF2zx640rpZrm1wexGUAI5HcFyLbgvdgH2nD8AcU SfTp+AnD6NWkjUafD2J6nuWvN9ls3sZ2rDt3tHe1P7M8XuGKFkhKPnZ4Pb43H3jcC9sf rdXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=rMDy+xd9MhwVeUK1XaRRSGxD8KEhfBYajhsbnKwSH8M=; fh=YRHPxrs0RTRopLcUE8UdfrkTfnKt8jfs+6xe2yXg01k=; b=KxBabyV5JBVzcuCrdTaumadLGQ6QvvOa/sxvfTbwbSkC0l8crlUFcL1V2qpxAmPL9v aZON4WHm27v+7qWwCoOwQHtFMiotEpFURxhjzOLPHuTv/678zUCL7SZ+IjJMishp6yx4 xcRvsw1dPfoeDj3G5d33ECfcacQYEdqPVVnSn+QH9pG2DlPww6wBDtMCHYD3Zr1e7W2k Xmezjz26u+f1xonyxHOn5O1+YI8thIpdYp/J2P5Hv1Kl3pCRZTd0pie6ZhkR/VZA+DlI OcM/+0FfW4vGMPvLZDli9D5yOCkJFgkyBCRXs0VWgtOPXwYwBYppsksknH7bz6roHBgn UVsQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id x9-20020a17090aca0900b002866fa27195si9912307pjt.42.2023.12.13.09.18.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 09:18:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 761A480699F3; Wed, 13 Dec 2023 09:18:31 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378954AbjLMRSV (ORCPT <rfc822;dexuan.linux@gmail.com> + 99 others); Wed, 13 Dec 2023 12:18:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229458AbjLMRSU (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 13 Dec 2023 12:18:20 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 272BBD0; Wed, 13 Dec 2023 09:18:26 -0800 (PST) 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 D6C6A1516; Wed, 13 Dec 2023 09:19:11 -0800 (PST) Received: from e121345-lin.cambridge.arm.com (e121345-lin.cambridge.arm.com [10.1.196.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id CC9B23F762; Wed, 13 Dec 2023 09:18:21 -0800 (PST) From: Robin Murphy <robin.murphy@arm.com> To: Joerg Roedel <joro@8bytes.org>, Christoph Hellwig <hch@lst.de> Cc: Vineet Gupta <vgupta@kernel.org>, Russell King <linux@armlinux.org.uk>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Huacai Chen <chenhuacai@kernel.org>, WANG Xuerui <kernel@xen0n.name>, Thomas Bogendoerfer <tsbogend@alpha.franken.de>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Lorenzo Pieralisi <lpieralisi@kernel.org>, Hanjun Guo <guohanjun@huawei.com>, Sudeep Holla <sudeep.holla@arm.com>, "K. Y. Srinivasan" <kys@microsoft.com>, Haiyang Zhang <haiyangz@microsoft.com>, Wei Liu <wei.liu@kernel.org>, Dexuan Cui <decui@microsoft.com>, Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>, David Woodhouse <dwmw2@infradead.org>, Lu Baolu <baolu.lu@linux.intel.com>, Niklas Schnelle <schnelle@linux.ibm.com>, Matthew Rosato <mjrosato@linux.ibm.com>, Gerald Schaefer <gerald.schaefer@linux.ibm.com>, Jean-Philippe Brucker <jean-philippe@linaro.org>, Rob Herring <robh+dt@kernel.org>, Frank Rowand <frowand.list@gmail.com>, Marek Szyprowski <m.szyprowski@samsung.com>, Jason Gunthorpe <jgg@ziepe.ca>, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, Rob Herring <robh@kernel.org> Subject: [PATCH v2 1/7] OF: Retire dma-ranges mask workaround Date: Wed, 13 Dec 2023 17:17:54 +0000 Message-Id: <6b4156c5061e29bfd95fdd2f6744ee727ea7f1a2.1702486837.git.robin.murphy@arm.com> X-Mailer: git-send-email 2.39.2.101.g768bb238c484.dirty In-Reply-To: <cover.1702486837.git.robin.murphy@arm.com> References: <cover.1702486837.git.robin.murphy@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 13 Dec 2023 09:18:31 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785187965418778045 X-GMAIL-MSGID: 1785187965418778045 |
Series |
dma-mapping: Simplify arch_setup_dma_ops()
|
|
Commit Message
Robin Murphy
Dec. 13, 2023, 5:17 p.m. UTC
The fixup adding 1 to the dma-ranges size may have been for the benefit of some early AMD Seattle DTs, or may have merely been a just-in-case, but either way anyone who might have deserved to get the message has hopefully seen the warning in the 9 years we've had it there. The modern dma_range_map mechanism should happily handle odd-sized ranges with no ill effect, so there's little need to care anyway now. Clean it up. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Robin Murphy <robin.murphy@arm.com> --- v2: Tweak commit message --- drivers/of/device.c | 16 ---------------- 1 file changed, 16 deletions(-)
diff --git a/drivers/of/device.c b/drivers/of/device.c index 1ca42ad9dd15..526a42cdf66e 100644 --- a/drivers/of/device.c +++ b/drivers/of/device.c @@ -129,22 +129,6 @@ int of_dma_configure_id(struct device *dev, struct device_node *np, dma_end = r->dma_start + r->size; } size = dma_end - dma_start; - - /* - * Add a work around to treat the size as mask + 1 in case - * it is defined in DT as a mask. - */ - if (size & 1) { - dev_warn(dev, "Invalid size 0x%llx for dma-range(s)\n", - size); - size = size + 1; - } - - if (!size) { - dev_err(dev, "Adjusted size 0x%llx invalid\n", size); - kfree(map); - return -EINVAL; - } } /*