From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f66.google.com (mail-pj1-f66.google.com [209.85.216.66]) (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 0BE9E3B777C for ; Fri, 5 Jun 2026 02:21:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.66 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780626107; cv=none; b=luleJnxED/Kv8OtdhNxLIV+QhnVPjvoBi/ePxPezaStJMQyNG8YyLJaewHWJCnjXyLcohKOS2hj+d0lxAc/6YHtK4zgU1afKvdWOrTkS2YKjJVp80NioetmbWKQi/q7goRY1Lu5zivy7cWwnVaOe4IYIdmh2sWTCdegeObanECI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780626107; c=relaxed/simple; bh=UpSqqvDHDdTEzixob6x+tfaItodOdKYq5bD+PPOrbxA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=EvzWp2uzGBBUl75OaOe1rnZOgt8nwxMj+0/ph92oleHBi3ebkeIzdS5tD6x044xMYhkfF0D2fhWNndFCvr9UBhyq1d1gsLUILN+MX6WlN4OvNjLqss8nDiBclu09sPBm9VoYVJE7XZp9MnQsXpj4O6KbHVqOoURdAU/x5OvloCc= 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=NmsL8FVZ; arc=none smtp.client-ip=209.85.216.66 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NmsL8FVZ" Received: by mail-pj1-f66.google.com with SMTP id 98e67ed59e1d1-36dac5d5d05so730650a91.2 for ; Thu, 04 Jun 2026 19:21:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780626101; x=1781230901; darn=vger.kernel.org; h=content-transfer-encoding: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; bh=QqLcGGd7rvwHMlJMGTwOXykGd0+t/FmTCrqNKr3eqvo=; b=NmsL8FVZX0NohIoqrw0t4LFQuA8mBZNNPQskuGIT6DK66I9DoNe4A8pP0kMtYtWCxj fJevjp0iE8mZDf7R+dG7YyV7m6yAFZF3T4EFv3kVQGktwQGzlF6s3869h4ZLGAbNtonl nB0jCVj7UxsLw8EnzMEBUt4UydLtNxf34FVZ5z3i63Z1WzClGUN6u7UiFZnfhhXFnvYZ gmiXP0gXOOfih+G26W3Lwq8HZ9L+jicMn0MsDyeRG0mjD2YrBXDinNeWxTdtRx06j3Ea HRYNeFSf0HV9OlZ4/gZQEfHkSljZjIXw73/gxvl/cQ+PTltg/J8LaihYlnkeSdYxhyza 09lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780626101; x=1781230901; h=content-transfer-encoding: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; bh=QqLcGGd7rvwHMlJMGTwOXykGd0+t/FmTCrqNKr3eqvo=; b=O9uK6gqvenbzlQJJTdzEBMD0A9jnhrY2EFA1avSzlWgXdiYoMZ9HQdxqPYYoEgvS2c FzbvAFxW1VQzzOGiQJjiNnkL2Gqcv/9NJ2NUOlqrpOV6RrZMmznIr5ulTxoLO1Tu+dLA ZRfOdSk6QxVmX6T+eCG+N7dRKcYVwYU6lsXOEWKjee2qpn9zdMCtX/1t5aktYoqF2U+H OLGpBAvf/dWxSb4okBBYOZs5tkYQSKDOh9onRV5uJWm4k7KwBpFmXnD+LAn7d/hjNgJb Cq7l9JVPiOwpErUlfWqn3+Lry+Xr1D59wrA7QguObmL3y9E5XZPsufu2Qv9T6kpKXnly W+Sw== X-Forwarded-Encrypted: i=1; AFNElJ+ZAwhxvIk9bTCkCkpaJyBKGHA4wV7wwqpqa9mVsI9av3Con0/XsaSiMuNyLmUlS1qsmQMU6fk5dJeEw9c=@vger.kernel.org X-Gm-Message-State: AOJu0Ywr1NPFLbPJEkLDQcn9KBYID87fTbfYxFw7PeIi3ec7hAJO2zJ7 QS2/5gN1TG0cK0CTAH6aamdTUH5H+GBWH5jvJbwUSSffwx4zHusSBKl8 X-Gm-Gg: Acq92OHP/9mQXxLzoGrK1Ucl01T4Pw2WHsNHqRB8AjoEkLtQt/Fl0A5zOhArYx2NKrJ GUcVaLCTzAVquDeg5Zx/UwW6pU5fEsAaiAYywWKd71pWeNSLn6khFEsi5knrRrcJOB+83gA4LiX XqcxLbtVl7mqquFTcNhqyAwDO/HK2/aOaBdfQvMCvkk1STnAF9dbTnKIisU0dXLwpMTosV7o0qH tewi6vA/7S5u6HYiB2Bxlu/eLAjQDesKeD47D2a1q/hvgleqIRZ6CCdL1VzkrVA+KwrdW+TFw+x 2IOquHtPKFrqyKQSmykax32GuIoI8S3skbTQk2Dr+4XluFrES59RYDn8mv/42JexaTqCvfsXECb XfDhNrwEW/1PdEfe0Oc7Se24WRt8spRFK62InfRAaSCadWtsy7akumTy+Slme2JmVGNX46/fGUd EfX8xf0BiupRnkeq1mdhyNsfgQTbf4G+DUrFVjeHnGsw== X-Received: by 2002:a17:90b:4fd0:b0:36d:66d4:270e with SMTP id 98e67ed59e1d1-370ee5450e3mr1789679a91.5.1780626100917; Thu, 04 Jun 2026 19:21:40 -0700 (PDT) Received: from [10.125.112.20] ([210.184.73.204]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-36f6dba8573sm6088363a91.14.2026.06.04.19.21.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 04 Jun 2026 19:21:40 -0700 (PDT) Message-ID: Date: Fri, 5 Jun 2026 10:21:34 +0800 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 2/2] of: reserved_mem: add config to extend dynamic reserved memory regions To: Rob Herring Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, saravanak@kernel.org References: <20260604073611.3954433-1-chenwandun1@gmail.com> <20260604073611.3954433-3-chenwandun1@gmail.com> <20260604193336.GB1057262-robh@kernel.org> Content-Language: en-US From: Wandun In-Reply-To: <20260604193336.GB1057262-robh@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 6/5/26 03:33, Rob Herring wrote: > On Thu, Jun 04, 2026 at 03:36:11PM +0800, Wandun Chen wrote: >> From: Wandun Chen >> >> Nowadays, the dynamic reserved memory regions is 64 by default, If >> the count of reserved memory regions defined in DTS bigger than 64, >> only 64 reserved memory can be handled properly. >> >> So add a config to configure the actual dynamic reserved memory >> regions count instead of modify the code. >> >> Signed-off-by: Wandun Chen >> --- >> drivers/of/Kconfig | 11 +++++++++++ >> drivers/of/of_private.h | 2 +- >> drivers/of/of_reserved_mem.c | 2 +- >> 3 files changed, 13 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig >> index 50697cc3b07e..d6496ec3765c 100644 >> --- a/drivers/of/Kconfig >> +++ b/drivers/of/Kconfig >> @@ -99,6 +99,17 @@ config OF_IRQ >> config OF_RESERVED_MEM >> def_bool OF_EARLY_FLATTREE >> >> +config OF_RESERVED_MEM_DYNAMIC_REGIONS >> + int "Maximum count of the dynamic reserved memory regions" >> + depends on OF_RESERVED_MEM >> + default 64 >> + range 1 256 > My opinion on making this a config option is well documented. That's the > primary reason we split dynamic regions. Get it. > > How many do you need and why do you need so many regions? Seems like an > abuse of reserved memory. I also agree that 64 dynamic regions should be sufficient for reasonable use cases. To give some context on why I wrote this patch: the 64 dynamic region limit is implicit, there is no message to inform the user, but more than 64 regions also seems like an abuse of reserved memory. I will drop this patch as well, thanks for the review. Best regards, Wandun > > Rob