Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp1068199rdb; Fri, 9 Feb 2024 09:16:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IEYuAEFvR1xz9pSGNOyhkoD4ebj0MvdlypLzluqaZVge1E7w8b9mrNEe8mrpFqZsB6728pp X-Received: by 2002:a17:903:2582:b0:1da:eed:f25b with SMTP id jb2-20020a170903258200b001da0eedf25bmr2214969plb.46.1707499016503; Fri, 09 Feb 2024 09:16:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707499016; cv=pass; d=google.com; s=arc-20160816; b=qdNfuWVozxtONy23VhSOgXgt5ZxjWQLTvu4lYrWE1lP33himiOL4AbZeSvSBTvLkfK kZiPGEy6q1mGKs6cCKPA2+x/+TTl8rdAKtdO6sZUT8QIGoiko+CVgdwKfjRlkgRHPnIc sabfy94f3EVR3Uod3igVnL7kQpscCJCjU8FHWtjz8ts14sFrA5CcoMKTU+cAICIsk/zI CsAQ4KaZAnT8+7AGZQEn3nJ1iPzpyTPt/HISGC2SdLoi8MXIEQlJDTZ6/iumhPqrIh6C OHN6AktIEBwVuTp09AKeYvGu1TG+c22p2wd6vujEbVbtcjb1JZHvXRSvTKQ1xZHjQOIH FbQQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=lo5WCo84XMUZLomSoeZcC3ui5P1IgcAkfSqd59c/Ddc=; fh=opXw5aMBSz1Ukh0sFV34JGfPA5EWL842B/jQPCJeju4=; b=JkoPbPWj7vluMVaurtz9mm4DHu5RRyKxr7WCd9jfddpt5qks43JXq3tGl+MoDLPkHm juN1O9QmcmBeZ60qCfBQH31ocVHesW8Wl13/ePRpLSxJYAR1x6VxTpMa3b+o/y3ZhCaa gkfM0Et0r5dn6dh5FJndwCfUlCyrrUxtMsP+S6hcL70VjzHcnfLEcjjYZKOhmUlB5CVe SVWvTY53W5NLhwuNIvS7psCv1ANDa3y1OR9JXv67jSWaYa3MnxxFclJiVq4o4cm7UpUM BF79AesiB+q/4qYpBLl6t7TCjFCHOYSNASvB+K3tyUdpbG9QpbEfvRKb06WxdqbSgBrq 1E8g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-59673-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59673-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com X-Forwarded-Encrypted: i=2; AJvYcCXAiRg2No3pgpR9UmjubSEZe0TsDiA2O7DQ+Ghyx+wTT/Naer2+edeShltVcpFNcj5QRn46BfRlSY1h3/jwZ4z9BspzbtHFTEuIqi2KPQ== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id j11-20020a170902da8b00b001d78a87de63si2004523plx.205.2024.02.09.09.16.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 09:16:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59673-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-59673-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59673-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 4BE0EB2343B for ; Fri, 9 Feb 2024 16:54:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6988A80C1E; Fri, 9 Feb 2024 16:50:30 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2C89B80BF6; Fri, 9 Feb 2024 16:50:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707497429; cv=none; b=lNPfiRL9YA0mAN9VSOrb2pgvGAA9QwQUeJwfdkRSXYoiJnxhDG2COqIgacr50vaXw7a2k/rwm7rcivDB+H+gJtE2tG4e79JADmwg9KcdXE+bMuXizEuE+84OC3/CscvWifvzZn3+X+METq2cT9GNZOie9uStF3swImGYiHmfiVo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707497429; c=relaxed/simple; bh=78sazIr90PfD2p3pMcVPhdyFlfiEISIeaG+WW9mJPWA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=K2WZeKe83pXGBZ7MtnW/o91asr+8l4CXVtnv4xMNS1VZXNKtBFIq05eiGdKHykBaFqrtaBJ0SCoMbAukssgNJ8YGXy+fK2056kOgqHxxth1ly4AZ1lhOo57QW0cXGKzjSQL+LID9+YkdX7NIW8OJfrxDP4+hBIP+MnHEP1WTtMc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 A64EFFEC; Fri, 9 Feb 2024 08:51:08 -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 D0E8C3F64C; Fri, 9 Feb 2024 08:50:22 -0800 (PST) From: Robin Murphy To: Cc: Vineet Gupta , Russell King , Catalin Marinas , Will Deacon , Huacai Chen , WANG Xuerui , Thomas Bogendoerfer , Paul Walmsley , Palmer Dabbelt , Albert Ou , Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Suravee Suthikulpanit , David Woodhouse , Lu Baolu , Niklas Schnelle , Matthew Rosato , Gerald Schaefer , Jean-Philippe Brucker , Rob Herring , Frank Rowand , Marek Szyprowski , Jason Gunthorpe , 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 Subject: [PATCH v3 1/7] OF: Retire dma-ranges mask workaround Date: Fri, 9 Feb 2024 16:49:58 +0000 Message-Id: <3d759722a5bd898dc5736048b4a5f30689c33888.1707493264.git.robin.murphy@arm.com> X-Mailer: git-send-email 2.39.2.101.g768bb238c484.dirty In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Robin Murphy --- 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 de89f9906375..a988bee2ee5a 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; - } } /* -- 2.39.2.101.g768bb238c484.dirty