Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4671140ybv; Wed, 26 Feb 2020 01:03:28 -0800 (PST) X-Google-Smtp-Source: APXvYqxIwev/kpr1USmIOSiDeMsyGpUM6M4VnEWaTbeDMg3Lm5FV+vuJPNtjwpJnoZdGoWTaFuzP X-Received: by 2002:a05:6808:251:: with SMTP id m17mr2191406oie.15.1582707808793; Wed, 26 Feb 2020 01:03:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582707808; cv=none; d=google.com; s=arc-20160816; b=FGTr3z/mOIKpcN2cCKOGUxXBOsTQctaDt2DgvjJaTcbOBdi78DKJMO/RzUJoCPaPbQ WnaL/80fm1rafmAb7FhlECPOhKlriwOioUXvBcI8oqZLWhs0Udppss0GMET0IJXI4+UD 4bm15lPUtunq2PokqWjH79zVlcxs4IK7OPu37i1RggeRJqZJb6w1nVjkil3tmD8EteZ+ T4BgG3gKzlCHzFieXCRqR2pzEzrTJ1i7dUVkB/sYLLtGe+l2tfBQQ8zPANgttJJOtumO JhfmZoYsWLGAFBezfuVpqhozVBZ8PGZH+eAd5uaQsur/ZQo2fd4BwyQ1YqknB60Oy09H RTDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=macTDBjGsJBFAkzTEbnQgMgA+V2t6di5RYgPeZ4V0yA=; b=G1ph4r+Prio1Zg89UxGRLafOK0VLuBOdiMKxOCV34wwZCNhv6Ai3lPEV+PtpuYWaw3 0sHhJnds/HOR7z72hdXzD5P5G5riKozzhrcYJ2LI7aaQZDwAJ10+kOewul7/dHPsP6Qy o9HKKMKbL/C3vL//53lZ7v6Rq/mHLjzvZ5IXh4Vmph3WHPVCIWlk5k/CvTP0ha4gJwTJ bna8csD83I+9u6x4tcj5e95yPZ0h3iK7Kn+w8RbPAWvtlRZQnntzjkecO4NWIgAF1CuP hN+uI6+jT2aWJ+AGQI2pu6ZL+RtAk6xc1MUcAASccIhpshbE/EPiclrdNRbpYWxP3oxz Wuyg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z20si754785oib.26.2020.02.26.01.03.15; Wed, 26 Feb 2020 01:03:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726764AbgBZJBt (ORCPT + 99 others); Wed, 26 Feb 2020 04:01:49 -0500 Received: from mail-oi1-f194.google.com ([209.85.167.194]:37775 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726057AbgBZJBt (ORCPT ); Wed, 26 Feb 2020 04:01:49 -0500 Received: by mail-oi1-f194.google.com with SMTP id q84so2299860oic.4; Wed, 26 Feb 2020 01:01:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=macTDBjGsJBFAkzTEbnQgMgA+V2t6di5RYgPeZ4V0yA=; b=hTWUuvBZps7CewVa9mBfqWRcqnS9pZNCBGDqzJTgDsCB9yt4urdSUod4478a2L2yqZ NL/ANKdG3GjbN1syU6LYLEGvHfDoNEiu/VCNkkEcLZiLZ+Ms88tUg8Lz2g6w15SGsRrV i/y7vX0buGyOARcLoEUQDeG6w/RbJr3XaiYjYL+/vWiqi5U6IstDor7pPu72vpNmFdB6 Pk6Ux1E431wdVU9W1mJzItQfw93CqrsoyS+DiJ9ZvrLMq1w6hgrpvcU6YG6dhmB8isos CycrcHQg1a02iCJmX/VoA3XnjFxmbjzAHXNUHnNFLcDlXfb2F23jBKounGGkwVus0wHS WU6Q== X-Gm-Message-State: APjAAAXRIukChcEIEsgR9w92TGrKDQT7P+RLbXR8NQ9OOoRB2IphkwOp FDcseQgD/BG1VLtMAb4jJPv4VuGq4NZNSRggtow= X-Received: by 2002:aca:c4d2:: with SMTP id u201mr2289731oif.54.1582707708187; Wed, 26 Feb 2020 01:01:48 -0800 (PST) MIME-Version: 1.0 References: <1582567352-4664-1-git-send-email-isaacm@codeaurora.org> In-Reply-To: <1582567352-4664-1-git-send-email-isaacm@codeaurora.org> From: Geert Uytterhoeven Date: Wed, 26 Feb 2020 10:01:37 +0100 Message-ID: Subject: Re: [PATCH] of: of_reserved_mem: Increase limit on number of reserved regions To: "Isaac J. Manjarres" Cc: Rob Herring , Frank Rowand , Patrick Daly , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Kernel Mailing List , lmark@codeaurora.org, Pratik Patel , Android Kernel Team Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Isaac, On Mon, Feb 24, 2020 at 7:03 PM Isaac J. Manjarres wrote: > From: Patrick Daly > > Certain SoCs need to support a large amount of reserved memory > regions. For example, Qualcomm's SM8150 SoC requires that 20 > regions of memory be reserved for a variety of reasons (e.g. > loading a peripheral subsystem's firmware image into a > particular space). > > When adding more reserved memory regions to cater to different > usecases, the remaining number of reserved memory regions--12 > to be exact--becomes too small. Thus, double the existing > limit of reserved memory regions. > > Signed-off-by: Patrick Daly > Signed-off-by: Isaac J. Manjarres Thanks for your patch! > --- a/drivers/of/of_reserved_mem.c > +++ b/drivers/of/of_reserved_mem.c > @@ -22,7 +22,7 @@ > #include > #include > > -#define MAX_RESERVED_REGIONS 32 > +#define MAX_RESERVED_REGIONS 64 > static struct reserved_mem reserved_mem[MAX_RESERVED_REGIONS]; > static int reserved_mem_count; This increases the size of reserved_mem[] by 896 (32-bit), 1280 (32-bit LPAE), or 1792 (64-bit) bytes. While some systems don't need reserved memory regions at all, and may be RAM-limited. Perhaps this array can be replaced by some dynamically increasing structure? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds