Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp772119lqt; Fri, 19 Apr 2024 09:55:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWV2GmXvjTpPeNrP1vXCOo5Pk/T6ihT20/C/gPi6yeta6mXjCkxF+t5E9B8GvJSErW82x/DA8GcGk4fSogqOCubZOA3ZChNkatomZDvLw== X-Google-Smtp-Source: AGHT+IEHekj4xwwyPZCwi4nIymHqcMoaldgkRL2SS7KOVvjVipLGu1x1068dE4VH1WXCaM25sLFM X-Received: by 2002:ac2:5fb0:0:b0:517:5ee6:4f5a with SMTP id s16-20020ac25fb0000000b005175ee64f5amr1585348lfe.66.1713545725832; Fri, 19 Apr 2024 09:55:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713545725; cv=pass; d=google.com; s=arc-20160816; b=GNAeNVGwVIt3sqLk/OKMKNMV44ztzfgKp9u4u2zd7LBZXXltDB/7LLAvIrlFlp6KN0 LBTQ8XsFsbfzsW8QUH9xDqdFvh8tfO3TWPTpRdWkYxUsThCCGxeKK542aUdZCQuQXAfR 3UJT5orJDT4sB9nCNLcb8q7vrRUGI2nk5UPOSTrcVNdj3hvcmqjyRIbLC8nC1c7Nxv8O OWT2Gf13ba1ovuOPg9YThUuOU395izhXL+8N7IFCDuxjJR2ebmgTTexlC0KoCBcLXEk5 QA4dcqhsfzlGeU9/Yd5TobU+FztbVoDD5+fNZGkJAANojtmNqZh82ykzmsZbnN8Y0+bq TULQ== 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=YRHPxrs0RTRopLcUE8UdfrkTfnKt8jfs+6xe2yXg01k=; b=HxGg9ZJokzxxod9vvYJ2JD76YOzLeUSUXkUNh+hCGeRp755KcVSHpQogjx09Psmr0F czeAlg5HTqTAtnzhj4Dcz4WpxQwe5LEbnc0sZpI8NEXgGPUV+foe2CiIuHrVA3h8hDYh n+hncfxDYKuDRxZpRO6iuLGsMmPdjgkM9FP3sl7u/rdjosDP+JjkoBpDcdGJglaYf0uG LWrRHD8LvOkRUKseMFiEUodfx7YMUIDclg5M0WnoGj/8etoFRq287aOicK6hJ8Wgnaho NBxyJCiDUDk2yRos6r9UqaYjZqw+MSD7HXLMLxT1LdU4yKsDI3zqXzsTgo+vlTz8l7GC LtDw==; 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-151785-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151785-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 9-20020a170906310900b00a46f27b23dcsi2402728ejx.432.2024.04.19.09.55.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 09:55:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151785-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; 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-151785-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151785-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 88D771F2364B for ; Fri, 19 Apr 2024 16:55:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B72AB136E27; Fri, 19 Apr 2024 16:55:10 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E0C511386D5; Fri, 19 Apr 2024 16:55:08 +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=1713545710; cv=none; b=FQiMmMAugQS72mr68fyTO3m/J2E+Ro1WHi6Vy3mNHNWvEVHAlg9GYVJD0CykkiGWUzgq4CPh0ghKCI27fvx+bn6iuiHDqHviGG2UPWYS2fAtEfFENK0JGAMpVgtCbwMdyRO46kfDRbP4rKrShvMaNx5dvhOBxlRnk0TFBIIVc2Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713545710; c=relaxed/simple; bh=78sazIr90PfD2p3pMcVPhdyFlfiEISIeaG+WW9mJPWA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Qe4XuGvtR8MrVTl7jCUOSmf7jt7YREVaLN/I9sG7FT6WIyXO16joRHOVz7mXM0ypfZJbNmM5Pk7nrxBSk4Q9rwjEHu7nKXF9qoQc0aJaRuR7VClgMZErekDAXhkJ5Gp2J6n38/KX1P+8c6lbjdjdeMg+kjFSm3Afo/BFV2K5EnA= 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 D1CC7339; Fri, 19 Apr 2024 09:55:36 -0700 (PDT) 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 BB1F03F8A4; Fri, 19 Apr 2024 09:55:03 -0700 (PDT) From: Robin Murphy To: Joerg Roedel , Christoph Hellwig 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 v4 1/7] OF: Retire dma-ranges mask workaround Date: Fri, 19 Apr 2024 17:54:40 +0100 Message-Id: <26620039901fdae52079ec1c8a4b2b324964a13e.1713523152.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