Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4355396pxj; Wed, 12 May 2021 03:57:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWdWhExuU8Oq+kBgZCzLOsWOzNXghdqqrU4HPf41UGy0BAer6FBII8YwxO10cEctXWxeeh X-Received: by 2002:a17:907:2cc2:: with SMTP id hg2mr35186846ejc.62.1620817069135; Wed, 12 May 2021 03:57:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620817069; cv=none; d=google.com; s=arc-20160816; b=DiZG95xKup6G1KhhrRkMR4sVZCy3/0xZJ1tiyrC/AWwDtbcUSiWsi9ZCF2YRBSG3Qw noWYxMh3d1B1svTQJmgP1MaHsWgo36g3Rh/Uk0AYaVUXt5d7s5SzX0z7IdDz+B/wdzs+ oQLOnUMERlmlxj4ZnziTRO8F6t0CtI7rZJWo6KxR7rzwS97euJcRTHrL6FTx7+o5rJv/ aML/LynQH6t9eWHZ6k3FonmxO/TftyQxZofa0cByeH/b1SwS8y+b0K0sfnkd7GCWEA3F I6q8YVACrSDabiSXY6LRcuY6Xv/q2wGIlPLbMz2IKIzN2ESpAJglH3DEGj5RzHhNvKSh dvQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=HLNK8RvTvKmlpYPvFe1wt2QinsOgjKUyLLA9NdybeCY=; b=pWnV4iOL4DL+SbkUORJenSrJbvZXNdqYt9apHBX9no5TUa/AykqBljfYmmFFjUIvY/ /Ur27I1oQSBj3PYnT8slDaS+3DLHftMoT2tTseVEEIqP/gs/Oi21aAdNOnOPkYYQzQo0 mA/YptmZq0DZGiO708/cyL8TkMq2+/f+rGVynww+05+60gupBzKi3+EeLU677/ZimV4k buq8mEahm9YQNMVmCvorDA9UHYwKaz0bUoZfJMbET771AWlHperStKgeAmj5ujepPk/i pLAtdP8taGa9AZkCcQ91mTMyotXfBKcqEFp9+sFXNXAOJbOqTBAiiP8RmH4CloO3fIhr TPaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=3dXEhjmQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i3si20572314edc.258.2021.05.12.03.57.21; Wed, 12 May 2021 03:57:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=3dXEhjmQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230139AbhELK5b (ORCPT + 99 others); Wed, 12 May 2021 06:57:31 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:34186 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230096AbhELK5a (ORCPT ); Wed, 12 May 2021 06:57:30 -0400 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 14CApkbl019914; Wed, 12 May 2021 12:55:57 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=HLNK8RvTvKmlpYPvFe1wt2QinsOgjKUyLLA9NdybeCY=; b=3dXEhjmQd98pBK6cfYSP2abqgW9LsPsRcW7KylHZeme/GLpkLurf1o63xzfaLpJ0rd9h nWe9hDgiSbMxqP1Sq5s+XawarIBKRJA0d2Z1MsMgTErOvKfLtz0wSlKbzQSAikiV/t5a oDGhLUr3EuAMoZmJqTX4B3XRX19CkMMhxhJsLE2saM9/Td7sDfzS4ajQAJxxBdGp4GYy YF8RxaFhXcV/Bahdzxe/j6foVPid5TQ2QOm4F1IraGiiljX6Gr1qxhH1cS7rQX+3AMPX 8FItocbYo2Cq+yGFVuvPhQ/BZ8noPN6bP3oaUZBApcvcvcpRZu2Bh9YZXfpJ22DS42XO tg== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 38fq9tpx0s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 May 2021 12:55:57 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 52AE510002A; Wed, 12 May 2021 12:55:55 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 24B7221C56F; Wed, 12 May 2021 12:55:55 +0200 (CEST) Received: from lmecxl0912.lme.st.com (10.75.127.49) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 12 May 2021 12:55:54 +0200 Subject: Re: [v5.4 stable] arm: stm32: Regression observed on "no-map" reserved memory region To: Quentin Perret CC: Florian Fainelli , Ard Biesheuvel , Rob Herring , Greg Kroah-Hartman , Sasha Levin , stable , Arnd Bergmann , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "linux-kernel@vger.kernel.org" , Nicolas Boichat , Stephen Boyd , KarimAllah Ahmed , Android Kernel Team , Architecture Mailman List , Frank Rowand , linux-arm-kernel References: <4a4734d6-49df-677b-71d3-b926c44d89a9@foss.st.com> <001f8550-b625-17d2-85a6-98a483557c70@foss.st.com> From: Alexandre TORGUE Message-ID: Date: Wed, 12 May 2021 12:55:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.75.127.49] X-ClientProxiedBy: SFHDAG2NODE3.st.com (10.75.127.6) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.761 definitions=2021-05-12_05:2021-05-12,2021-05-12 signatures=0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Quentin, On 5/10/21 12:09 PM, Quentin Perret wrote: > Hi Alexandre, > > On Friday 07 May 2021 at 17:15:20 (+0200), Alexandre TORGUE wrote: >> Did you get time to continue some tests on this issue ? > > I did try a few things, but still fail to reproduced :/ > >> On my side this DT is not working: >> >> memory@c0000000 { >> reg = <0xc0000000 0x20000000>; >> }; >> >> reserved-memory { >> #address-cells = <1>; >> #size-cells = <1>; >> ranges; >> >> gpu_reserved: gpu@d4000000 { >> reg = <0xd4000000 0x4000000>; >> no-map; >> }; >> }; > > So this does change how memory appears in /proc/iomem for me switching > from 5.4.101 to v5.4.102 -- for the former d4000000-d7ffffff doesn't > appear at all, and for the latter it appears as 'reserved'. > > But still, it never gets accounted as System RAM for me ... > >> Let me know if I can help. > > Could you please confirm you get a correct behaviour with 5.10.31 like > Florian? If so, then bisecting to figure out what we're missing in older > LTSes would help, but again it feels like we should just revert -- this > wasn't really a fix in the first place. We saw that patches [1] and [2] cause issue on stable version (at least for 5.4). As you said issue can be seen with above device tree and check in /proc/iomem than gpu_reserved region is taken by the kernel as "System RAM". On v5.10 stream there are no issues seen taking patches [1]&[2] and the reason is linked to patches [3]&[4] which have been introduced in v5.10.0. Reverting them give me the same behavior than on stable version. [1] of/fdt: Make sure no-map does not remove already reserved regions [2] fdt: Properly handle "no-map" field in the memory region [3] arch, drivers: replace for_each_membock() with for_each_mem_range() [4] memblock: use separate iterators for memory and reserved regions regards Alex > > Thanks, > Quentin >