From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AAD62C54E5D for ; Sat, 16 Mar 2024 17:28:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vH/GuOl0+oLb1Fyi0MQaHDLP+a+h6CpcDJgobd1JfcM=; b=cMA11XYOhHkguz ihmTW4Ib3rO/etIfii8gO4hBFPjvcvod04I96rsm2Zz2OInm3COqIbUpFgE6jWoatq3ThYiYtnq4p LlFYcPUivs8mfoanzTN+NMb8NRZ0hw9sClQsYxktJG8H/s1NfZ5ZE7oYLjnd/NUfaAni/eJDwAkPo y/CA8hKQ3WBPlj+qR+059s8/e67+EosCcYdVa9bPUAh1nK67uFnVTUHoQ0p+ZqS6S/QDVPkZgTQhq kz1/YLJP5EwyhDgBzzRebfhb/0WkWMJMyKbJqeWQ2A+ndm5vurogb7Cr7DuZ9eLKeHPZfXK2hT7ru HgcA0D4SXWOaqDZwmTdg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rlXpX-00000003ZpJ-2hzv; Sat, 16 Mar 2024 17:28:23 +0000 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rlXpU-00000003ZnG-3e8T for linux-arm-kernel@lists.infradead.org; Sat, 16 Mar 2024 17:28:22 +0000 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a466fc8fcccso364275566b.1 for ; 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=lists.infradead.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=P+tp3mUEHMjNeE+Ou46/Z5+ShFqnUhlw1AbjEbIGRPpmGscVpyL4tL8ZTahbdWBje0 DnB6aqVyxcTQRXv8hnf9tbKb/M+VgMAMLdr7aU0c3sTpM3ECA8ItjaGe1OIGTM+U2jHr tP1y/dBOawGv1d+G7dO+y2BmrXy9PNt4RI6G7G2u79JyBXgCgksqww+fQ2fvmGZpXqWA kyNj2vQdSVfAwgYy1DTx2x7AmoIngvdPFz5wMrSWgpt51jfsaEJCYEFwh5wnv+E+0v/w pXbziF/O4KwNAgq3bkFTWPQrazDwnc1PZArF1Q8OJfMZcJ9/Q9AspBlSi4h0xJbOzkXk xCPA== 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=Qcn5xjahTyGPy0uSX2CJajgRC4JoZnFV9AU3kvUAS2vx1shf4yzm7EdLd4HI32oIqq DWlEZC6YX3qjVFuUwVJ64mffzIchPavHiXCANpb7RX6SnjZV4UtLObi5temtdyNJdtg3 yJEYxdur9/V6HFvAax+x+U1z5yaAJ9kwqKDo4h1kHaPcgzDACcE0ARYHPnLgPtoO6Ykn j0O7EAx01J1ZQRPe80D/vuBvQfb5/CVUQSeLf7/I5hQ2zU7w3Mabpe4E+VD6SPhFHcm4 J6q7iLIZC75e/qZUEb8JX55tZXqmTk0fe82Yge2NJkSjGeN6obugiyJeXXg8CQrX5Q17 OU7w== X-Forwarded-Encrypted: i=1; AJvYcCUl+wtHI0OALjU+bqfohRsj1L/NCKsjW90jXIUiXuSDADEWpko00XCVVTFnxK+GqBTpVA3zgw+asClMeTjS8qxSwqwNCUjm0VxGY+mGyaORQ77KyBg= X-Gm-Message-State: AOJu0YwFYkdygLfSnc8dFl969MJN2AUUQq1N0qNlmFNbRgEiM+7OxCWh lvwy8GXdHT2kRf6Hy8VREFyamW/DoVFMz93fHUUPF2w4xlM6eTT68Ma1UFcz X-Google-Smtp-Source: AGHT+IHZrk3NvoOarVuBPv99GazyJl67C0TJk3R85D0i5hqPXN5zJz2QSCsKKJqIZdXnQifvK/3Liw== 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 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: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240316_102820_952103_A2B6A2E5 X-CRM114-Status: GOOD ( 17.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel