From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5CA9B51C38; Thu, 30 Nov 2023 14:47:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Z07Tt3+J" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D5E9C433C9; Thu, 30 Nov 2023 14:47:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701355631; bh=dNJWSo8E6GQ4fVWyXjpzy+fiTadQolXDNmtZRzZe2RQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Z07Tt3+J1NH+TmhZzsMsKbN95ezIMx9gO6IVPWDmheCO7/DZ4cIc3mKfBZkYG+mk8 DNjfF191aWJFzXt0tFERiWHMAhCgsUjIMtj0QjSyiYuScgky6GROZfN8oFVsLLV8Fh kqUsT5L/F04a2czctAFDaowp8TqZT5l2nFUBoQckD9o2xcx7hAQrMFTy0fQMeVc0TG Lx4Qsr+T9b7kqpyawUYdIeCbTpQdjuheHKqbeEr8vpcuV9DSItgV6Fp5A54853lPov QO6cnUqaX+qLgfYjV6oNryejUGgDSHhBDXDVii8gxX9wkIly2gFjzYAnGFkm8fnsP1 fNhXSojcCqUQw== Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-a19067009d2so66573366b.3; Thu, 30 Nov 2023 06:47:11 -0800 (PST) X-Gm-Message-State: AOJu0YwdDh55HylaVCV88VA6iW8d8GpOlRpPiMXw1/9mt9ipMujcw6xg rR4SWYooanPfwOPEXuSsW0u4ULMcIWqKyPzaXg== X-Google-Smtp-Source: AGHT+IHSmMEE+qYvPFQMyf7A7mr7f1220m4lfUsZ3/p1781IxEAccKr7vlPfmbnUSIcpUxea8isNLTGiW3bfb0ZEQ0w= X-Received: by 2002:a05:6512:2102:b0:50b:c543:c4cf with SMTP id q2-20020a056512210200b0050bc543c4cfmr3437536lfr.6.1701355609063; Thu, 30 Nov 2023 06:46:49 -0800 (PST) Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <950378c6f39270a255452733ff2305e56fb05cc5.1701268753.git.robin.murphy@arm.com> In-Reply-To: <950378c6f39270a255452733ff2305e56fb05cc5.1701268753.git.robin.murphy@arm.com> From: Rob Herring Date: Thu, 30 Nov 2023 08:46:36 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/7] OF: Retire dma-ranges mask workaround To: Robin Murphy Cc: Joerg Roedel , Christoph Hellwig , 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 , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Nov 29, 2023 at 11:43=E2=80=AFAM Robin Murphy wrote: > > From what I remember, the fixup adding 1 to the dma-ranges size was for > the benefit of some early AMD Seattle DTs. Those are likely extinct by > now, and anyone else 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. The commit has a tested by for Seattle, but the series adding this was for an issue on TI Keystone[1]. Looks like the patch adding this fixup and warning did 2 things. It added 1 to the default mask when 'dma-ranges' was not present (which keystone needed) and added 1 if the DT value was a mask along with the warning. It's not clear what Seattle needed, but there was a fix to dma-ranges about a year later[2]. I thought at some point we allowed 32-bit DTs to specify a ~0 size to avoid having to use 2 cells to express 4G size which wouldn't have been a warning, but I can't find any discussion on that. It would have been earlier than 2015 I think... Anyways, there is no upstream dts with that either, so I think we're good. > Signed-off-by: Robin Murphy > --- > drivers/of/device.c | 16 ---------------- > 1 file changed, 16 deletions(-) Acked-by: Rob Herring [1] https://lore.kernel.org/all/1425405134-24707-1-git-send-email-m-kariche= ri2@ti.com/ [2] https://lore.kernel.org/all/1455162671-16044-4-git-send-email-Suravee.S= uthikulpanit@amd.com/