Received: by 2002:ab2:6486:0:b0:1ef:eae8:a797 with SMTP id de6csp444695lqb; Sat, 16 Mar 2024 10:28:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWl73BfDUR2cHh6jn0d1KP+gavk7L4FLeLjp616SeStcG0dA0usPG3oiPeKZNQHswMevmmuCD4VDIm2Pi4mU5nryUCp1V3n55evqx+X5A== X-Google-Smtp-Source: AGHT+IG1phVT2FnYj08REjQx5oo1F/lLk86DPzhvWopwqKAeeXK3k3PqeA5DnSD1tK/vQzYH/7yD X-Received: by 2002:a17:906:5f8f:b0:a46:64e3:e284 with SMTP id a15-20020a1709065f8f00b00a4664e3e284mr5151282eju.74.1710610104331; Sat, 16 Mar 2024 10:28:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710610104; cv=pass; d=google.com; s=arc-20160816; b=n8QWZ7YylKCwJ//9CguAkje1frNURoFn0SurIzjSTXYv1zutV/gMMEt9sm66OnlzRe gz2B54YigS5A4mfmj8vVdl1hTefxEnDMcB2DaELwhy7WHa234k4tvQSo29mArzJYCTXF Qv8F8v64pLju3Hm/kLuIbXzOP/B8Nln/F/JGRpdqaFdHQNHwgAQwkmbYNmGcx3fmvBal kBkUXGHJ8JaLxHmRhLNfz34taUo623uWRJ8C7tFVSECbeochX/kqFM/tiUJmYaFszycJ +WNV9AWoKvonLk2MDK9kJaayIeDuv5h9d7BV5KKd5dg/gvdAVwcCw0ttqy17fkgJdXTq kN2A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=spcfTWXjA2X48vafZucRsKf/vF9L2dt52hvSePI2WpU=; fh=UjpYOBY1I0nppwFLEyNPpBad8bjN3giPvSUOHWT0LjY=; b=C8k+fuhUJY7kQO2o3BqENG87rD5fjHo7TvXEoUcTrE0auflOuq2s8QpIrBP7sNo6ve q8o7r4jw5mBmfL0G+bbg2N2na0fyD+7siVAYgYxQ4m6FPmUbHASmpQYbnmQDl3zpX524 muO7oxI7sGoadZNrbzGs+4laKe2SlPahJu9eospwqqes/45VjaLNXEQi7Z1qxEvybqnW +/Z117GU/Fdm803hBgdzpBL2jWqjgZ26hTN8BjUy87il4fTFhOtaPfRZx9t634OAaB5o Im2D+vCNZWMds4X/3ygjv/6dBAP57hOtVfi9TlyPEMRSqQps0w3VK3rf45onOHBAlbdj 6mDA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=evGO440P; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-105251-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105251-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id kk17-20020a170907767100b00a462bd4d385si2714774ejc.480.2024.03.16.10.28.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Mar 2024 10:28:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-105251-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=evGO440P; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-105251-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105251-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 D79E61F21E60 for ; Sat, 16 Mar 2024 17:28:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9BF641BF34; Sat, 16 Mar 2024 17:28:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="evGO440P" Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 076501CA82; Sat, 16 Mar 2024 17:28:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710610094; cv=none; b=FIl4r+3hJ/1dSdDq0RlEWW5mQUiXIyPILMmylAGWDlG3x/6xqFA6+pLCG3cnYhytQcgnxyglgxa1cMDgv/+0AkR8skp7bKURfoFV7vIqcHX1IKEnaISLk83zggfbSHOeR4zvWp+X5wzz1tVUDi6S/4FgnnzbWGfHWFpIAOT1SY8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710610094; c=relaxed/simple; bh=cjMrzIK3A3GK4ocpb4wGvm+ToDWgy2tz7vSO2aQaK5s=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=g8957ct5xewQgVZZmsjNnLk0wcQVaaQFE18N4o448yZ1Ye8U8M+elXOgea9SpgqVqN2JPYweAJ/ZInCcs5K8unHtsYvvDnJP0b3HWKKpGqHPxdMTqUoKR8UbaJz7AwtWEQZKNx4xaLK6kqRg6acpF681qD4yOkF2lOA8mWmX1v4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=evGO440P; arc=none smtp.client-ip=209.85.218.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-a466c85ae5fso27733866b.0; Sat, 16 Mar 2024 10:28:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710610091; x=1711214891; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=spcfTWXjA2X48vafZucRsKf/vF9L2dt52hvSePI2WpU=; b=evGO440PcC+SDXy1XderlysVZR9u5FGidBy+smgdqp6sXlQ1URICK6UqfwkmSXawAa FA6ekuyqGalO0E9j1tQelNyzHHt+Y0hHjdl0Npr45Oa8WdQsvAw4UXKUYRylqTNJyVqD lRc5Z9dwpEMA8p2rR0771tzI9mbToRuJme4TfLbLc5uqBe8tjpO3OYWUmqGBiXWdLgRB 7EFPlRtD0hJnKDLXUjHm93EFXJjQveQV44PDwmaam0aSE6bPi0ytxzcuIV2yIRvd2tbm yQh+Cu6iLHBgtQHdT7qDMnnqGH82H3MjfsOtPhyiL8xnUa1RM8DYvD8qtOUyOPxXhuWj 3EOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710610091; x=1711214891; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=spcfTWXjA2X48vafZucRsKf/vF9L2dt52hvSePI2WpU=; b=EE3VbnjrK2zDcDY3pdjwdOL6HKycXPWG9KJGa/HYEbhy5jWOXiXOb2x7hib63gP/uP HdhvTYJJWt2V93OuvKp8s/zh+u4twBKgV+e4qAi/9JiyqxQTDX4gS2a8Bu9xCKfdVz7a 3F2hPtVRtW8B0OAf//L/4de2fMR1Pvkea6mSaOW5nIQq5tq0SDxCWDVw/3voJ9wFh1dd c5gRt9W5FesPgdND3PgZaQpKoHRJ3JZ9MUdeDeoaBtKKMkhtS+GLlFNulXXLHbhzDVlw nomAHgnYt//FKQ+n9Fn5sDCOAJ1D/TZX4QRAFKDbF+4et5YaVPG0OptFWtWrVElHMPBb x9EA== X-Forwarded-Encrypted: i=1; AJvYcCUe92qWGQhtPWagiW9UojYKZrOFW1vknXcvHr4bowmaX83VQMlW/2ybIhscnexghXfV+BG6GXFESs8O6U2fcBsciZ0ADWQ7Fs0gx1sNzZMzfNh3w9miky4OOXmYJ2fupW7SWEL9ThySy4VQR6uUyoU= X-Gm-Message-State: AOJu0Ywh1IY3azbgq8YZhxj1Rq6TuygEKeGbjifkOIoof2urh03RpqmI 7YRudhX61H5FWEMHpFAQQab7KWXj8fc3JzY61hjfGXGZIvstz0N+ X-Received: by 2002:a17:906:38f:b0:a46:4be4:2aac with SMTP id b15-20020a170906038f00b00a464be42aacmr4307096eja.77.1710610090995; Sat, 16 Mar 2024 10:28:10 -0700 (PDT) Received: from [192.168.50.244] (83.8.206.203.ipv4.supernova.orange.pl. [83.8.206.203]) by smtp.gmail.com with ESMTPSA id qw37-20020a1709066a2500b00a4131367204sm2925892ejc.80.2024.03.16.10.28.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 16 Mar 2024 10:28:10 -0700 (PDT) Message-ID: Date: Sat, 16 Mar 2024 18:28:09 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] ARM: dts: exynos4212-tab3: limit usable memory range Content-Language: en-US To: Krzysztof Kozlowski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht References: <20240217-tab3-limit-usable-memory-range-v1-1-49cc9c86a5cc@gmail.com> <15ab6aa6-fb30-4970-9c50-546afb933e03@linaro.org> <5d67441e-df61-4894-ba52-2bed8a1143d6@linaro.org> From: Artur Weber In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 22.02.2024 16:55, Krzysztof Kozlowski wrote: > On 21/02/2024 09:26, Krzysztof Kozlowski wrote: >> On 19/02/2024 20:49, Artur Weber wrote: >>> On 19.02.2024 08:44, Krzysztof Kozlowski wrote: >>>> On 17/02/2024 20:02, Artur Weber wrote: >>>>> The stock bootloader on the Samsung Galaxy Tab 3 8.0 provides an >>>>> incorrect available memory range over ATAG_MEM. Limit the usable >>>>> memory in the DTS to prevent it from doing so, without having to >>>>> disable ATAG support. >>>>> >>>>> Signed-off-by: Artur Weber >>>>> --- >>>>> arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi | 6 ++++++ >>>>> 1 file changed, 6 insertions(+) >>>>> >>>>> diff --git a/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi b/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi >>>>> index e5254e32aa8f..9bc05961577d 100644 >>>>> --- a/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi >>>>> +++ b/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi >>>>> @@ -45,6 +45,12 @@ chosen { >>>>> /* Default S-BOOT bootloader loads initramfs here */ >>>>> linux,initrd-start = <0x42000000>; >>>>> linux,initrd-end = <0x42800000>; >>>>> + >>>>> + /* >>>>> + * Stock bootloader provides incorrect memory size in ATAG_MEM; >>>>> + * override it here >>>>> + */ >>>>> + linux,usable-memory-range = <0x40000000 0x3fc00000>; >>>> >>>> Applied and dropped: >>>> chosen: linux,usable-memory-range:0: [4611686019496935424] is too short >>> >>> This seems to be a binding issue; the DT schema expects a 64-bit memory >>> address and size, and doesn't allow a 32-bit range. I've tested the DTS >>> on my device and this property seems to be handled fine, so I think this >>> should allow 32-bit values as well. >> >> Regardless where is the issue: please test before sending. >> >>> >>> I've opened a PR[1] against devicetree-org/dt-schema (where the schema >>> for the chosen node is stored) to try and fix this. If my approach is >>> incorrect, feel free to comment there as well. >> >> >> According to Rob's comments, the DTS is the issue. > > With updated dtschema I still see the same warning. Is something else > missing? My bad, turns out I didn't test my dt-schemas patch correctly... looks like this has been *properly* fixed now in latest dt-schema[1][2], and I no longer get warnings about the linux,usable-memory-range property. (There are some new warnings though, for some nodes in exynos4.dtsi that have 2 reg values, but that's out of scope for this patch.) Sorry for the general confusion, I'll make sure to double-check my patches next time... Best regards Artur [1] https://github.com/devicetree-org/dt-schema/commit/08eff8e6167e9e0bc1694af6c298b4584105a057 [2] https://github.com/devicetree-org/dt-schema/commit/c95c9ad63c51f8d9cfb258e6f17a8001efab6d64