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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B722EC43219 for ; Fri, 19 Nov 2021 09:58:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9A0216054F for ; Fri, 19 Nov 2021 09:58:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233324AbhKSKBt (ORCPT ); Fri, 19 Nov 2021 05:01:49 -0500 Received: from mga04.intel.com ([192.55.52.120]:17003 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229974AbhKSKBs (ORCPT ); Fri, 19 Nov 2021 05:01:48 -0500 X-IronPort-AV: E=McAfee;i="6200,9189,10172"; a="233110022" X-IronPort-AV: E=Sophos;i="5.87,247,1631602800"; d="scan'208";a="233110022" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Nov 2021 01:58:47 -0800 X-IronPort-AV: E=Sophos;i="5.87,247,1631602800"; d="scan'208";a="568845492" Received: from smile.fi.intel.com ([10.237.72.184]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Nov 2021 01:58:31 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1mo0cr-008Uqj-60; Fri, 19 Nov 2021 11:56:09 +0200 Date: Fri, 19 Nov 2021 11:56:08 +0200 From: Andy Shevchenko To: Calvin Zhang Cc: Vineet Gupta , Russell King , Catalin Marinas , Will Deacon , Guo Ren , Yoshinori Sato , Thomas Bogendoerfer , Nick Hu , Greentime Hu , Vincent Chen , Dinh Nguyen , Jonas Bonn , Stefan Kristiansson , Stafford Horne , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Paul Walmsley , Palmer Dabbelt , Albert Ou , Rich Felker , Chris Zankel , Max Filippov , Rob Herring , Frank Rowand , Mike Rapoport , Andrew Morton , David Hildenbrand , Kefeng Wang , Vladimir Isaev , Arnd Bergmann , "Russell King (Oracle)" , "Rafael J. Wysocki" , Guenter Roeck , Marc Zyngier , David Brazdil , Mark Rutland , Andrey Konovalov , Anshuman Khandual , Souptick Joarder , Jinyang He , Mauri Sandberg , Tiezhu Yang , Serge Semin , Alexander Sverdlin , Geert Uytterhoeven , Randy Dunlap , Ley Foon Tan , Andreas Oetken , Christophe JAILLET , Christophe Leroy , Ganesh Goudar , Markus Elfring , "Aneesh Kumar K.V" , Atish Patra , Anup Patel , Nick Kossifidis , Alexandre Ghiti , Vitaly Wool , Wolfram Sang , Lee Jones , Guo Ren , Rob Herring , Zhang Yunkai , Palmer Dabbelt , linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, linux-mips@vger.kernel.org, openrisc@lists.librecores.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, linux-xtensa@linux-xtensa.org, devicetree@vger.kernel.org Subject: Re: [PATCH 2/2] of: reserved_mem: Remove reserved regions count restriction Message-ID: References: <20211119075844.2902592-1-calvinzhang.cool@gmail.com> <20211119075844.2902592-3-calvinzhang.cool@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211119075844.2902592-3-calvinzhang.cool@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 19, 2021 at 03:58:19PM +0800, Calvin Zhang wrote: > Change to allocate reserved_mems dynamically. Static reserved regions > must be reserved before any memblock allocations. The reserved_mems > array couldn't be allocated until memblock and linear mapping are ready. > > So move the allocation and initialization of records and reserved memory > from early_init_fdt_scan_reserved_mem() to of_reserved_mem_init(). > arch/arc/mm/init.c | 3 ++ > arch/arm/kernel/setup.c | 2 + > arch/arm64/kernel/setup.c | 3 ++ > arch/csky/kernel/setup.c | 3 ++ > arch/h8300/kernel/setup.c | 2 + > arch/mips/kernel/setup.c | 3 ++ > arch/nds32/kernel/setup.c | 3 ++ > arch/nios2/kernel/setup.c | 2 + > arch/openrisc/kernel/setup.c | 3 ++ > arch/powerpc/kernel/setup-common.c | 3 ++ > arch/riscv/kernel/setup.c | 2 + > arch/sh/kernel/setup.c | 3 ++ > arch/xtensa/kernel/setup.c | 2 + Isn't x86 missed? Is it on purpose? Would be nice to have this in the commit message or fixed accordingly. -- With Best Regards, Andy Shevchenko