From mboxrd@z Thu Jan 1 00:00:00 1970 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 C4A52C433EF for ; Fri, 19 Nov 2021 10:30:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A4EC7610A1 for ; Fri, 19 Nov 2021 10:30:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232196AbhKSKdR (ORCPT ); Fri, 19 Nov 2021 05:33:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234698AbhKSKdQ (ORCPT ); Fri, 19 Nov 2021 05:33:16 -0500 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9AADC061574; Fri, 19 Nov 2021 02:30:14 -0800 (PST) Received: by mail-pj1-x1033.google.com with SMTP id nh10-20020a17090b364a00b001a69adad5ebso8458683pjb.2; Fri, 19 Nov 2021 02:30:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=mI6KtEpWF619oecwW9ziIW9hw+HsMKzn28OULpWVurc=; b=KPFYp17Oy/uF3pbSIvlZbA7tgtmLiBC3HIruVIaKeBTx1ALHk1wBHI9RWH4Y/TRiM2 hAq35CyJOhqjAvnIz+XnfBNiKxqvsUzF8MUMqrbb+qoLapa3GCOHgXxaI6x9Km0AlL0K 2wG7B8CCYpBSr+ZNFswMkvUZagoAlzcdTSS//NHNiGf8CdixgEqb6uKPGS2QpTEgcUAp yArb+GP+Q+XhbKyaqKWupK7SJqNy6AAI7qZH/W5TKcSo7ZV4POw8PNPyAsvkQzKhD740 EiMIWTjA0fXMyULJynwnTQN6Kgk/iWbRQ1iPpWyGjz39JFmP0lOhp61wqe2NJVi1cPEy 0utQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=mI6KtEpWF619oecwW9ziIW9hw+HsMKzn28OULpWVurc=; b=cwJLLMTNvO00pR8CmpzKLxJqptfILtE6FW5yGdDI0ZRZTJJenCalNdDJU5iby6fS2P 8cbiiThNbuoAPpccyaMgu9A661i7Pk0J4auSTIZbYyH/D/Y8cD0J5sILDq+ZpeVkeCPf Tv6BjX84TrRErPblCgGAKs6y4SKRHT0pb1cfK5wjlzu7haBVUJaa4X/XNvA2dMQyYS85 GESe94zF9ZltHuQOkq2aHro8mSTePyeaeJ2CQX9zeqGi9PGsrGSSqcPjBP3cmXJ06wjz ZtPAsi1JK0GVDUHh17YSpTKP1iS+Edhrg9Sjllw/0TuTRf15HNp+cIvD4GVRVedme74j x7tA== X-Gm-Message-State: AOAM532UK6twORoNzF7EqMqkgQ99eW0G6y4MyRvi1i8JzOpPf0bcBSza +EWGuWxl9rhVjhYDyMMUcEU= X-Google-Smtp-Source: ABdhPJwCL45zphX6sAUQpCTH2XR0MI6TO3LxQucz8xUZnsL94laUGiXdLG1KlgE2xhwPB5DYkk54PQ== X-Received: by 2002:a17:902:bc85:b0:143:954e:8548 with SMTP id bb5-20020a170902bc8500b00143954e8548mr73204786plb.82.1637317814262; Fri, 19 Nov 2021 02:30:14 -0800 (PST) Received: from localhost ([103.99.179.247]) by smtp.gmail.com with ESMTPSA id u22sm2537834pfk.148.2021.11.19.02.30.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Nov 2021 02:30:14 -0800 (PST) Date: Fri, 19 Nov 2021 18:30:09 +0800 From: Calvin Zhang To: Andy Shevchenko Cc: Calvin Zhang , 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: Precedence: bulk List-ID: X-Mailing-List: linux-csky@vger.kernel.org On Fri, Nov 19, 2021 at 11:56:08AM +0200, Andy Shevchenko wrote: >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. AFAIK, x86 doesn't reserve memory through "/reserved-memory" node until now. Actually, I got the arch list from callers of early_init_fdt_scan_reserved_mem(). > >-- >With Best Regards, >Andy Shevchenko > > > Thanks, Calvin From mboxrd@z Thu Jan 1 00:00:00 1970 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 760CAC433EF for ; Fri, 19 Nov 2021 10:30:29 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 32068610A1 for ; Fri, 19 Nov 2021 10:30:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 32068610A1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YhGg4BrAIl4awkqIJ1E9H3W3CXzD1DrkS8eaWn1f8qE=; b=RdbxWpIpuMW7R9 krhjncvqARF09PzQhHTfHGZ6+scBcADQfNhdxqe+oOLE0O/UkWQ/1mOboTa66uiwPk7oNrvT/h4vP I65FqJAjAzLYsDYMb0SK1Y8OtqdSNOhBMZZfl3KGg6vbZ1KTq1LxIgEHvOWWVowiLBNOqxcWQwH72 AesOY7iJaooKjdL3+MciV6SY5HOKZJscKEQA6edDpO647Bf0VOEpDvP0OtXfCkUf2aNkG7NIJlcZD vtPkgYcaNDjZANH8rxQcBNdrWvReuh9x/jbuA8+1EdZQWM6g7Z6uH1zoY2VRKLEaHwE4F8ETbs22V H62DeOGaXAQI5PsjeNnw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mo19v-00A7bJ-Ov; Fri, 19 Nov 2021 10:30:19 +0000 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mo19r-00A7Zb-FH; Fri, 19 Nov 2021 10:30:18 +0000 Received: by mail-pl1-x633.google.com with SMTP id u17so7796623plg.9; Fri, 19 Nov 2021 02:30:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=mI6KtEpWF619oecwW9ziIW9hw+HsMKzn28OULpWVurc=; b=KPFYp17Oy/uF3pbSIvlZbA7tgtmLiBC3HIruVIaKeBTx1ALHk1wBHI9RWH4Y/TRiM2 hAq35CyJOhqjAvnIz+XnfBNiKxqvsUzF8MUMqrbb+qoLapa3GCOHgXxaI6x9Km0AlL0K 2wG7B8CCYpBSr+ZNFswMkvUZagoAlzcdTSS//NHNiGf8CdixgEqb6uKPGS2QpTEgcUAp yArb+GP+Q+XhbKyaqKWupK7SJqNy6AAI7qZH/W5TKcSo7ZV4POw8PNPyAsvkQzKhD740 EiMIWTjA0fXMyULJynwnTQN6Kgk/iWbRQ1iPpWyGjz39JFmP0lOhp61wqe2NJVi1cPEy 0utQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=mI6KtEpWF619oecwW9ziIW9hw+HsMKzn28OULpWVurc=; b=VgiYUepknX64A7hrwPKi+76RfciKvetKOYzYPkX4EP2bEBnBnlMSL4IE79/1dulnah tkJjnigtIIn3dLGDe+EgnENfZoXqiS7QTJ7TBVhK59SEmdOCwQOhniHQgLdkTw/A0WiE LFH7EJyarJNT3WjQW3hDjWtSM0B1GzXHjcX9Gg7Hh7hBRTq7ov7O/OaeEQBBAyrABosu OF0dzR7+q5XB+sgvBoftqRVnHEr4cOrl4WChcNTT0foOYz2GnrW8fiL2fOqgOvT2FRGJ QWhrqPXd25lkv8yUW5K0pVWIJmFXV02Ps6hQIdBmUjXG8CYpVzbSzBVG6FyolEqc2Mp4 AV0A== X-Gm-Message-State: AOAM530PTKkHiiOAUDwTW3KBZlfyQTVGCvGsIt2vPTIE96oPn1u3v9Ko rFG9fSjeltcmgDuovjH5Kt0= X-Google-Smtp-Source: ABdhPJwCL45zphX6sAUQpCTH2XR0MI6TO3LxQucz8xUZnsL94laUGiXdLG1KlgE2xhwPB5DYkk54PQ== X-Received: by 2002:a17:902:bc85:b0:143:954e:8548 with SMTP id bb5-20020a170902bc8500b00143954e8548mr73204786plb.82.1637317814262; Fri, 19 Nov 2021 02:30:14 -0800 (PST) Received: from localhost ([103.99.179.247]) by smtp.gmail.com with ESMTPSA id u22sm2537834pfk.148.2021.11.19.02.30.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Nov 2021 02:30:14 -0800 (PST) Date: Fri, 19 Nov 2021 18:30:09 +0800 From: Calvin Zhang To: Andy Shevchenko Cc: Calvin Zhang , 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-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211119_023015_530090_D1B4B650 X-CRM114-Status: GOOD ( 14.91 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Fri, Nov 19, 2021 at 11:56:08AM +0200, Andy Shevchenko wrote: >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. AFAIK, x86 doesn't reserve memory through "/reserved-memory" node until now. Actually, I got the arch list from callers of early_init_fdt_scan_reserved_mem(). > >-- >With Best Regards, >Andy Shevchenko > > > Thanks, Calvin _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 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 DB42BC433F5 for ; Fri, 19 Nov 2021 10:30:20 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A1D5E610A1 for ; Fri, 19 Nov 2021 10:30:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A1D5E610A1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BsvgTyAbIcJ9fI81thKnOtflZE4Gfso1q/4IqGr1w8o=; b=27A+NS7ThMe1iO hVeEbVanAIzUDVag++y9iKX9UkbnApidw/r4K8GTGJ0IB5qzKuOaX2cTojYZvu3GHwq19Pyha7qAw 7wCxxYkbHaRJyZ85EoXf0z223JHytUi2LKe8UW/9/E33Na72ezsMSp05k2D4hPi8yJFMvp+36Z4v5 iXZV1+cOm0u3w2/T4Nv2Y08lR5NkG1nhMJ1xnaJzuNqajtp3BVsBSY3oVEOtSCSyJlGFMjDV1nsqU L041Zt7dk8zdWBIIweHGjRRYrRt4mtTn3MquRCfWlZYTn83CUrckDsiucn9OlUNxsXOeYTQkBXnjd Ab1OVe1gI/U9DD3M0PRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mo19v-00A7bB-Gu; Fri, 19 Nov 2021 10:30:19 +0000 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mo19r-00A7Zb-FH; Fri, 19 Nov 2021 10:30:18 +0000 Received: by mail-pl1-x633.google.com with SMTP id u17so7796623plg.9; Fri, 19 Nov 2021 02:30:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=mI6KtEpWF619oecwW9ziIW9hw+HsMKzn28OULpWVurc=; b=KPFYp17Oy/uF3pbSIvlZbA7tgtmLiBC3HIruVIaKeBTx1ALHk1wBHI9RWH4Y/TRiM2 hAq35CyJOhqjAvnIz+XnfBNiKxqvsUzF8MUMqrbb+qoLapa3GCOHgXxaI6x9Km0AlL0K 2wG7B8CCYpBSr+ZNFswMkvUZagoAlzcdTSS//NHNiGf8CdixgEqb6uKPGS2QpTEgcUAp yArb+GP+Q+XhbKyaqKWupK7SJqNy6AAI7qZH/W5TKcSo7ZV4POw8PNPyAsvkQzKhD740 EiMIWTjA0fXMyULJynwnTQN6Kgk/iWbRQ1iPpWyGjz39JFmP0lOhp61wqe2NJVi1cPEy 0utQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=mI6KtEpWF619oecwW9ziIW9hw+HsMKzn28OULpWVurc=; b=VgiYUepknX64A7hrwPKi+76RfciKvetKOYzYPkX4EP2bEBnBnlMSL4IE79/1dulnah tkJjnigtIIn3dLGDe+EgnENfZoXqiS7QTJ7TBVhK59SEmdOCwQOhniHQgLdkTw/A0WiE LFH7EJyarJNT3WjQW3hDjWtSM0B1GzXHjcX9Gg7Hh7hBRTq7ov7O/OaeEQBBAyrABosu OF0dzR7+q5XB+sgvBoftqRVnHEr4cOrl4WChcNTT0foOYz2GnrW8fiL2fOqgOvT2FRGJ QWhrqPXd25lkv8yUW5K0pVWIJmFXV02Ps6hQIdBmUjXG8CYpVzbSzBVG6FyolEqc2Mp4 AV0A== X-Gm-Message-State: AOAM530PTKkHiiOAUDwTW3KBZlfyQTVGCvGsIt2vPTIE96oPn1u3v9Ko rFG9fSjeltcmgDuovjH5Kt0= X-Google-Smtp-Source: ABdhPJwCL45zphX6sAUQpCTH2XR0MI6TO3LxQucz8xUZnsL94laUGiXdLG1KlgE2xhwPB5DYkk54PQ== X-Received: by 2002:a17:902:bc85:b0:143:954e:8548 with SMTP id bb5-20020a170902bc8500b00143954e8548mr73204786plb.82.1637317814262; Fri, 19 Nov 2021 02:30:14 -0800 (PST) Received: from localhost ([103.99.179.247]) by smtp.gmail.com with ESMTPSA id u22sm2537834pfk.148.2021.11.19.02.30.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Nov 2021 02:30:14 -0800 (PST) Date: Fri, 19 Nov 2021 18:30:09 +0800 From: Calvin Zhang To: Andy Shevchenko Cc: Calvin Zhang , 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-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211119_023015_530090_D1B4B650 X-CRM114-Status: GOOD ( 14.91 ) X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org On Fri, Nov 19, 2021 at 11:56:08AM +0200, Andy Shevchenko wrote: >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. AFAIK, x86 doesn't reserve memory through "/reserved-memory" node until now. Actually, I got the arch list from callers of early_init_fdt_scan_reserved_mem(). > >-- >With Best Regards, >Andy Shevchenko > > > Thanks, Calvin _______________________________________________ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc From mboxrd@z Thu Jan 1 00:00:00 1970 From: Calvin Zhang Date: Fri, 19 Nov 2021 18:30:09 +0800 Subject: [OpenRISC] [PATCH 2/2] of: reserved_mem: Remove reserved regions count restriction In-Reply-To: References: <20211119075844.2902592-1-calvinzhang.cool@gmail.com> <20211119075844.2902592-3-calvinzhang.cool@gmail.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: openrisc@lists.librecores.org On Fri, Nov 19, 2021 at 11:56:08AM +0200, Andy Shevchenko wrote: >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. AFAIK, x86 doesn't reserve memory through "/reserved-memory" node until now. Actually, I got the arch list from callers of early_init_fdt_scan_reserved_mem(). > >-- >With Best Regards, >Andy Shevchenko > > > Thanks, Calvin From mboxrd@z Thu Jan 1 00:00:00 1970 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A66CAC433F5 for ; Sat, 20 Nov 2021 06:03:35 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Hx2yt0c0wz3cmV for ; Sat, 20 Nov 2021 17:03:34 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=KPFYp17O; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::1029; helo=mail-pj1-x1029.google.com; envelope-from=calvinzhang.cool@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=KPFYp17O; dkim-atps=neutral Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4HwXx94H0xz2yPs for ; Fri, 19 Nov 2021 21:30:19 +1100 (AEDT) Received: by mail-pj1-x1029.google.com with SMTP id np6-20020a17090b4c4600b001a90b011e06so8420636pjb.5 for ; Fri, 19 Nov 2021 02:30:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=mI6KtEpWF619oecwW9ziIW9hw+HsMKzn28OULpWVurc=; b=KPFYp17Oy/uF3pbSIvlZbA7tgtmLiBC3HIruVIaKeBTx1ALHk1wBHI9RWH4Y/TRiM2 hAq35CyJOhqjAvnIz+XnfBNiKxqvsUzF8MUMqrbb+qoLapa3GCOHgXxaI6x9Km0AlL0K 2wG7B8CCYpBSr+ZNFswMkvUZagoAlzcdTSS//NHNiGf8CdixgEqb6uKPGS2QpTEgcUAp yArb+GP+Q+XhbKyaqKWupK7SJqNy6AAI7qZH/W5TKcSo7ZV4POw8PNPyAsvkQzKhD740 EiMIWTjA0fXMyULJynwnTQN6Kgk/iWbRQ1iPpWyGjz39JFmP0lOhp61wqe2NJVi1cPEy 0utQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=mI6KtEpWF619oecwW9ziIW9hw+HsMKzn28OULpWVurc=; b=nDWFDcsYkR3beeJsx6MO11W5+N42LOOSN1t78KYjC1J0glVcH5URyEiN+FzVCw/mAZ 1GjGxSOhHO+5DfPk6/THK7FvUJZziebggM97UNTwld2ZLiYnkRuiWkrsRaqvUZZZlv65 rgPNqjJUAQkT1zAP2Q/Lw/iT9XoI+aBqDG/OzEZvfPfAUJ8aQ+CCUwj0qZT0zI4QUcvW XV4NGbpT3LD+DNQ4KczwSjs6WiGeQaKEeQEEg1Zh290TzIoVitlTS9cmjc2nVZLPK/9j k/XVIbwg6yK4DklJte9UHrw1mPggGXcPK4wNAZahdARirAMTEYB09dVoFqGYY51QBNqC WSXg== X-Gm-Message-State: AOAM530+bL8owZb8NJWQB8kYn262fLsxNqL0DmnduAPMPPv3gzaz4Cov 5CihaHCgW22Bk301pg+KrbU= X-Google-Smtp-Source: ABdhPJwCL45zphX6sAUQpCTH2XR0MI6TO3LxQucz8xUZnsL94laUGiXdLG1KlgE2xhwPB5DYkk54PQ== X-Received: by 2002:a17:902:bc85:b0:143:954e:8548 with SMTP id bb5-20020a170902bc8500b00143954e8548mr73204786plb.82.1637317814262; Fri, 19 Nov 2021 02:30:14 -0800 (PST) Received: from localhost ([103.99.179.247]) by smtp.gmail.com with ESMTPSA id u22sm2537834pfk.148.2021.11.19.02.30.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Nov 2021 02:30:14 -0800 (PST) Date: Fri, 19 Nov 2021 18:30:09 +0800 From: Calvin Zhang To: Andy Shevchenko 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: X-Mailman-Approved-At: Sat, 20 Nov 2021 17:01:52 +1100 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Kefeng Wang , Rich Felker , Jinyang He , David Hildenbrand , Lee Jones , linux-kernel@vger.kernel.org, openrisc@lists.librecores.org, Max Filippov , Anup Patel , Guo Ren , Guo Ren , Calvin Zhang , Nick Kossifidis , Vladimir Isaev , Tiezhu Yang , Vincent Chen , Will Deacon , Markus Elfring , Vitaly Wool , Jonas Bonn , Rob Herring , devicetree@vger.kernel.org, linux-snps-arc@lists.infradead.org, Yoshinori Sato , Palmer Dabbelt , linux-sh@vger.kernel.org, "Rafael J. Wysocki" , Christophe JAILLET , Russell King , Ley Foon Tan , Geert Uytterhoeven , "Aneesh Kumar K.V" , Catalin Marinas , Ganesh Goudar , David Brazdil , linux-riscv@lists.infradead.org, Guenter Roeck , uclinux-h8-devel@lists.sourceforge.jp, linux-xtensa@linux-xtensa.org, Albert Ou , Arnd Bergmann , Anshuman Khandual , Vineet Gupta , Wolfram Sang , Andreas Oetken , Stefan Kristiansson , "Russell King \(Oracle\)" , Rob Herring , Alexander Sverdlin , Greentime Hu , Paul Walmsley , Stafford Horne , linux-csky@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Andrey Konovalov , Christophe Leroy , Chris Zankel , Thomas Bogendoerfer , Alexandre Ghiti , Nick Hu , Atish Patra , linux-mips@vger.kernel.org, Randy Dunlap , Frank Rowand , Serge Semin , Dinh Nguyen , Zhang Yunkai , Palmer Dabbelt , Souptick Joarder , Marc Zyngier , Mauri Sandberg , Paul Mackerras , Andrew Morton , linuxppc-dev@lists.ozlabs.org, Mike Rapoport Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Fri, Nov 19, 2021 at 11:56:08AM +0200, Andy Shevchenko wrote: >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. AFAIK, x86 doesn't reserve memory through "/reserved-memory" node until now. Actually, I got the arch list from callers of early_init_fdt_scan_reserved_mem(). > >-- >With Best Regards, >Andy Shevchenko > > > Thanks, Calvin