From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 F0D103DDDDA for ; Mon, 24 Aug 2026 13:23:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787577805; cv=none; b=u0/AIhYQ+61SmvphqRJLgQjtbQSdWax1+hY6LDGdpYH8lIeHUhtsqkSDHMwnT7V8NmjqVyxOlIRy70SldrOAeCaT82pk2Qra7yq5NxUq3x5ZfxLqxlDnQ1LJxJS4HkgCQY+QmasDBVYzP074DOsOPpDSyH7MSsMFFMKpvib2r00= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787577805; c=relaxed/simple; bh=c84EENtMlpj4dcqmfrCTzYWwu1VFPCw85ytM+ZGBn/c=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=QCBDZZgk4Et/xk/UmHWcar3VFTmvGMdJTi/G0FbZinDRC2wOaN860Nq6uBra6O7cbE0ZhGRZmkrG6+yw8y+U3+BdUjdDKPlvdTIHT7hHVma7gC+W/goN8+X4JuWcmX0xmh6TzTJZfNajAVou3ku5BU8SrVu5pUDxwE3CIkFTWrk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=LVu7C1jo; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=cqQzOAGo; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="LVu7C1jo"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="cqQzOAGo" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67OCvFcL2579543 for ; Mon, 24 Aug 2026 13:23:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= Ht/73UpQIIZyUpRTYArGJnPpIGG8cQZGTaPS+SJfDcE=; b=LVu7C1jo62a64VKS xh0Nb4RJvu0BxOGQFyVX3Yr4kMrYrY1quBwAs/9hrAwSrKAT8VPfzC2v1NN7DtZw Gp5biwo0Du7HEHUOzZOaVwXeTLjYHOKyedkkBNS1fgLbeN19NyIsWEzN5IMLja0d Z15Lkc2tfNw03DWcLx1lDXP64huNMtJeyiWrW8YzGygNIJB8Sp/uNwe+7L/do0ZR IF1u3+Oi48DWa4bjzOCM9ZeXonhhgila2Xr7wUFg3t43blukYM17w89yxkTuHiUb qqAARehG00CH8bFH4IkWqy5QvnIOxXQuuBTBtGnGd9dPk4xjjFEGPPqHWVVwsFqt 5aSyag== Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4g8gdshujf-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 24 Aug 2026 13:23:22 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-930bd2bfc45so74985085a.1 for ; Mon, 24 Aug 2026 06:23:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1787577802; x=1788182602; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Ht/73UpQIIZyUpRTYArGJnPpIGG8cQZGTaPS+SJfDcE=; b=cqQzOAGo1DzN4qiNShKmCyRafY32qopunVOWIunnE3U+6Nc9hFcJL2T/X7a0A4/+D2 4mAX6xsD0eAYNbULzjjQyGB/M3VyKaLfkoa/fzBvyHSrLwUdB9CvqZOavBMNh62FBfM+ Tzl1JeW6d18WhJHa5134PqJ496kCmNvI5kW81zmbWzRHped7EuDDma0ESM5LtXG+cC8o /ARi8ay1wQbiY+LnEk6Brb3YwG9/ZxWfoo7Mr28NipHWKrsrjTDTU81w7kJv72rHt4pX fS6eWHRa6Z7wL18f7jHbpxDTrUyacTWP/M7/WUGMvcW+aJLLwzuZXU5TKtgCF6nMfHmO wJkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787577802; x=1788182602; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Ht/73UpQIIZyUpRTYArGJnPpIGG8cQZGTaPS+SJfDcE=; b=ZlYUWcSSU5GfBNYY6Ci69E/UYc5WUEnh+AxRPRsTN+zFAnSsRPe9OO9tHVFWpOb4E0 vuKaLWc+z7Zum07hz6MYWGr2F/7PhBsDxxs/KdHQXaH4x4geMYxUy8flGEXyMS9JlptK MKsUOeGjNKWTUBnYt1kFrRVGqZOkyBpe9NeL3Ipjd7257bf9hx0bsnB5sXTpsIhIaewg sCo+pqftCVsY2U0cs16zHVReBiyfgdL03UUtGoeW/hgHP7qeFZQnJLU+q96Ypv4r5r1u PTkSpifpPNoeVDby7COU1lJ0iSlrq0fyw7Tf/hS1SnakVdPWe+LIWG/vtMp38df5dLNi iWzw== X-Forwarded-Encrypted: i=1; AHgh+RoXikqpM14nANiQKsOYPabgxrUSa7Wxbu1fDaqek4G8n+tiWno9sjcrP45TU+RK8wn/LoQH/aA5wvW+g6E=@vger.kernel.org X-Gm-Message-State: AFuF++lF3TJ/zPPTgBdDKfMeKRZI2H2DlKbuvgezRluAow+GAhypw1BW cFwTobSQJPKFZbLwMreAMk97SOD9IDdh6Zc0pJosh3OON6ul4LQMqqA6tTz2JnIJ0Y4VbW53ZGI vt6bCZ4yeXG59WWbTw2d/QN2lV1mwjiz6J9wjl7HWCLbx9Rv2iCAmqbIlfTnX5fFT14U= X-Gm-Gg: AR+sD13Q9R8LZqDfM4Q9JRv0+qpHjfJjZ+r1ioAXZwEyN2nQB+vrgWOBBZN1RkStKXk HEXvCAaNGoqjIdraxgfr3gMWSYnhCZkUqTmCxo6RMAsUJpffVplROk6pabcma8+BW5FaPo9sg4/ t+kzTBzPb+UmbvaJftF4A7sgiCI7nyBcP9pVAqs1O3BhoyZLBt4Nx6ZEVURPseWxlVq4yqO8YGk X+NzvIE6yQTyNIhpGbomU6+YnaqE0evnv8wLW/3LoJrkoxi4Vy9T9KnRVexXdr8EhFs8FvvpAKT 04s2GpLfK1KXd6MsJDFe4j0xl0Kby32Y/IaQ7shB4uT+5oUKcJ0Nv7gvmTEVaX/BYIdm6KxvYBt mRgm+2Np45tRPZzWrLZgwvoYy X-Received: by 2002:a05:620a:2806:b0:92e:6485:f640 with SMTP id af79cd13be357-937395ae7ecmr1685241685a.4.1787577802136; Mon, 24 Aug 2026 06:23:22 -0700 (PDT) X-Received: by 2002:a05:620a:2806:b0:92e:6485:f640 with SMTP id af79cd13be357-937395ae7ecmr1685235085a.4.1787577801667; Mon, 24 Aug 2026 06:23:21 -0700 (PDT) Received: from [192.168.120.193] ([178.235.128.140]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-3a1c2fe663esm14943741fa.35.2026.08.24.06.23.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 Aug 2026 06:23:20 -0700 (PDT) Message-ID: Date: Mon, 24 Aug 2026 15:23:19 +0200 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] arm64: dts: qcom: sm6125-xiaomi-laurel-sprout: reserve firmware-owned DRAM To: Roman Linev , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: =?UTF-8?B?QmFybmFiw6FzIEN6w6ltw6Fu?= , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260821032541.1856299-1-admin@mswin.me> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <20260821032541.1856299-1-admin@mswin.me> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-GUID: 7ZwG1RYnSzIfL3t9eHUDc49rkivVGmL- X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODI0MDExMiBTYWx0ZWRfXwZc2HKoxLrqZ Qk4F9ipRnR9iDWj9XIQjOxKMKgabN05X5LQMXkMQH7HnWbXu1/rXKgSxtcDjdTv/6x+hFunB5m+ /wUTCcL9XJ+ZG2z9yUCT5S8R6G+VXoyG28ZbiA6S4WWg6gfk4wy5xwH0MtJwUbhOyjpk4FuquMG locad8kYXNxMKtI5ge1T5O99RhMYVyntn0iz6SVWR6PovFuApEPwikxdktf5UaRXMQneVJXnv5x 5GTeFRHGWpT3j3k/hC93c9pq+5eQDs0x8iJafxLtnHoIoH6LDZXl7Ykz8iWlX5DhdmQlO1w7Q/p 5USzhvj/PZhX4s20tlkx/fIQcVrOOOAJut1HOr7ZQ4upUl8hsM3/rjsmkWaRD1HOU/rdRWjePFa YVwounMEV7UoqaUoZry7lQX4+bwelkcVLLZZLuIh2wgg6dBH8A6bH6LKgYZ4qH+rgpxITLnHHqR R+Y/8zgZAex6zDIi7lA== X-Authority-Analysis: v=2.4 cv=Fqo1OWrq c=1 sm=1 tr=0 ts=6a8c45cb cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=PRfkaYvzSr8QmIIGAkY2Sg==:17 a=IkcTkHD0fZMA:10 a=Sv0fKeRqtYgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=cPhRdkEELQjuWZljFz4A:9 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-ORIG-GUID: 7ZwG1RYnSzIfL3t9eHUDc49rkivVGmL- X-Proofpoint-Spam-Info: AW1haW4tMjYwODI0MDExMiBTYWx0ZWRfXyXfAjG33gznk aEgXFi+o76bFEaERPZV+jWc+cmh+gIAtaRT0/ngJAZB210VcdZSWMDMG+ELjaQlMbDTpa1wtCuk ilmQYnSC86B9UiY1CUDS6lLE42S507o= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-24_04,2026-08-24_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 malwarescore=0 adultscore=0 lowpriorityscore=0 suspectscore=0 impostorscore=0 phishscore=0 spamscore=0 clxscore=1015 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608240112 On 8/21/26 5:25 AM, Roman Linev wrote: > sm6125.dtsi sizes reserved_mem1@46200000 at 0x2d00000 (45 MiB), so it ends > at 0x48f00000. On laurel-sprout the firmware owns 0x4900000 (73 MiB) at > that base: the downstream device tree overrides the SoC region with > > removed_region@46200000 { reg = <0 0x46200000 0 0x4900000>; }; > > which ends exactly at 0x4ab00000, where mainline places camera_mem. The > 28 MiB between 0x48f00000 and 0x4ab00000 is therefore firmware-owned on > this board while mainline leaves it as free System RAM and hands it to the > page allocator. > > On Qualcomm a "removed_region" is XPU-protected, so this is not a matter of > reading stale data: the region is not the kernel's to allocate. Not necessarily, XPU protection is a specialized mechanism, there may be other owners that don't like tampering with their memory (hyp, tz..) > The observed symptom is hard lockups under sustained buffered reads, where > page-cache pressure eventually reaches the disputed range. Before this > change the device wedged at a rate of roughly one lockup per 59 MiB of > buffered reads from the SD card, reproducibly enough to fire on demand. > With the region reserved, the same workload has run 691 GiB of buffered > reads with zero lockups. CONFIG_MEMTEST=y and `memtest=1` in cmdline is good to run to confirm your memory map checks out [...] > + /* > + * The SoC dtsi sizes reserved_mem1 at 0x2d00000 (45 MiB), ending > + * at 0x48f00000. This device's firmware owns 0x4900000 (73 MiB) > + * there -- downstream laurel_sprout carves out > + * removed_region@46200000 with that size, ending exactly at > + * camera_mem's 0x4ab00000. The 28 MiB in between is XPU-owned > + * on this board and mainline currently hands it to the buddy > + * allocator. > + */ > + reserved_mem1_laurel: memory@48f00000 { The label is unused, you can drop it. I think you should just do something like this: /* This carveout is larger than on other devices */ &reserved_mem1 { reg = <0x0 0x46200000 0x0 foo>; }; Konrad