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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44717C433EF for ; Thu, 23 Dec 2021 07:33:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346868AbhLWHdX (ORCPT ); Thu, 23 Dec 2021 02:33:23 -0500 Received: from szxga02-in.huawei.com ([45.249.212.188]:16853 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346855AbhLWHdX (ORCPT ); Thu, 23 Dec 2021 02:33:23 -0500 Received: from dggpemm500021.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4JKMNF6Z8jz91sQ; Thu, 23 Dec 2021 15:32:29 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by dggpemm500021.china.huawei.com (7.185.36.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Thu, 23 Dec 2021 15:33:21 +0800 Received: from [10.174.178.55] (10.174.178.55) by dggpemm500006.china.huawei.com (7.185.36.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Thu, 23 Dec 2021 15:33:20 +0800 Subject: Re: [PATCHv3] efi: apply memblock cap after memblock_add() From: "Leizhen (ThunderTown)" To: Pingfan Liu , , CC: Rob Herring , Catalin Marinas , Will Deacon , Andrew Morton , Mike Rapoport , "Geert Uytterhoeven" , Frank Rowand , Ard Biesheuvel , Nick Terrell , References: <20211214040157.27443-3-kernelfans@gmail.com> <20211215021348.8766-1-kernelfans@gmail.com> <7060b244-03d3-e81f-f545-cf2d4fe5c2dd@huawei.com> Message-ID: <99322a5a-42c3-29b8-df57-f096f9ac95e9@huawei.com> Date: Thu, 23 Dec 2021 15:33:08 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <7060b244-03d3-e81f-f545-cf2d4fe5c2dd@huawei.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.178.55] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm500006.china.huawei.com (7.185.36.236) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 2021/12/22 16:00, Leizhen (ThunderTown) wrote: > > > On 2021/12/15 10:13, Pingfan Liu wrote: >> >> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c >> index 18a2df431bfd..aa07ef5cab5f 100644 >> --- a/drivers/of/fdt.c >> +++ b/drivers/of/fdt.c >> @@ -972,7 +972,7 @@ static unsigned long chosen_node_offset = -FDT_ERR_NOTFOUND; >> * location from flat tree >> * @node: reference to node containing usable memory range location ('chosen') >> */ >> -static void __init early_init_dt_check_for_usable_mem_range(void) >> +void __init early_init_dt_check_for_usable_mem_range(void) > > Why do I see a parameter 'node'? Sorry, I just saw that the patch 1/2 in v2 was also applied. > > master: > drivers/of/fdt.c:976:static void __init early_init_dt_check_for_usable_mem_range(unsigned long node) > > next: > drivers/of/fdt.c:980:static void __init early_init_dt_check_for_usable_mem_range(unsigned long node) > >> { >> const __be32 *prop; >> int len; >> diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h >> index cf48983d3c86..ad09beb6d13c 100644 >> --- a/include/linux/of_fdt.h >> +++ b/include/linux/of_fdt.h >> @@ -62,6 +62,7 @@ extern int early_init_dt_scan_chosen(unsigned long node, const char *uname, >> int depth, void *data); >> extern int early_init_dt_scan_memory(unsigned long node, const char *uname, >> int depth, void *data); >> +extern void early_init_dt_check_for_usable_mem_range(void); >> extern int early_init_dt_scan_chosen_stdout(void); >> extern void early_init_fdt_scan_reserved_mem(void); >> extern void early_init_fdt_reserve_self(void); >> @@ -86,6 +87,7 @@ extern void unflatten_and_copy_device_tree(void); >> extern void early_init_devtree(void *); >> extern void early_get_first_memblock_info(void *, phys_addr_t *); >> #else /* CONFIG_OF_EARLY_FLATTREE */ >> +static inline void early_init_dt_check_for_usable_mem_range(void) {} >> static inline int early_init_dt_scan_chosen_stdout(void) { return -ENODEV; } >> static inline void early_init_fdt_scan_reserved_mem(void) {} >> static inline void early_init_fdt_reserve_self(void) {} >> 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 26414C433F5 for ; Thu, 23 Dec 2021 07:35:20 +0000 (UTC) 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:Date: Message-ID:References:CC:To:From:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=KG3ykvCUW1l4lVjsoLuRsOBUwDjjlM0vB2BxjNJDWOw=; b=z5AxvBLhE3guX2Gz1bf2dR6O1m lZwwM2/DuT8ht0cNyz23GEawhohN+Ysp+913mdwyWyRYAOiFsaCJuqU+uMZo3cTEVN0CL0ycMSTdb G0dkXxJe38GUBhpqe1KobAWFfKLaWTeE9wmvylbgNB9kCPas1ht4VxX6bFvA8Xn3VtuCo1mMbaNT4 AibyWfgf0/aDnc6MyXJIv9vaZNNGebJRpLcX+QdLFFZ6LmvQgKW4xGsc7V6Zr7w0rkmfLmLaYsq6Q +Mye/nnO/WFtnYwJ8F10mN2/e99RdkkbzVeyi82vj8Dy2GQfOQPXZOhq3PfQ0u7GjYqjUuPrU58nw ff282dUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n0IbS-00ByOR-Bv; Thu, 23 Dec 2021 07:33:30 +0000 Received: from szxga02-in.huawei.com ([45.249.212.188]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n0IbN-00ByNq-Kx for linux-arm-kernel@lists.infradead.org; Thu, 23 Dec 2021 07:33:27 +0000 Received: from dggpemm500021.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4JKMNF6Z8jz91sQ; Thu, 23 Dec 2021 15:32:29 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by dggpemm500021.china.huawei.com (7.185.36.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Thu, 23 Dec 2021 15:33:21 +0800 Received: from [10.174.178.55] (10.174.178.55) by dggpemm500006.china.huawei.com (7.185.36.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Thu, 23 Dec 2021 15:33:20 +0800 Subject: Re: [PATCHv3] efi: apply memblock cap after memblock_add() From: "Leizhen (ThunderTown)" To: Pingfan Liu , , CC: Rob Herring , Catalin Marinas , Will Deacon , Andrew Morton , Mike Rapoport , "Geert Uytterhoeven" , Frank Rowand , Ard Biesheuvel , Nick Terrell , References: <20211214040157.27443-3-kernelfans@gmail.com> <20211215021348.8766-1-kernelfans@gmail.com> <7060b244-03d3-e81f-f545-cf2d4fe5c2dd@huawei.com> Message-ID: <99322a5a-42c3-29b8-df57-f096f9ac95e9@huawei.com> Date: Thu, 23 Dec 2021 15:33:08 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <7060b244-03d3-e81f-f545-cf2d4fe5c2dd@huawei.com> Content-Language: en-US X-Originating-IP: [10.174.178.55] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm500006.china.huawei.com (7.185.36.236) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211222_233326_070365_CC76B50D X-CRM114-Status: GOOD ( 11.26 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2021/12/22 16:00, Leizhen (ThunderTown) wrote: > > > On 2021/12/15 10:13, Pingfan Liu wrote: >> >> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c >> index 18a2df431bfd..aa07ef5cab5f 100644 >> --- a/drivers/of/fdt.c >> +++ b/drivers/of/fdt.c >> @@ -972,7 +972,7 @@ static unsigned long chosen_node_offset = -FDT_ERR_NOTFOUND; >> * location from flat tree >> * @node: reference to node containing usable memory range location ('chosen') >> */ >> -static void __init early_init_dt_check_for_usable_mem_range(void) >> +void __init early_init_dt_check_for_usable_mem_range(void) > > Why do I see a parameter 'node'? Sorry, I just saw that the patch 1/2 in v2 was also applied. > > master: > drivers/of/fdt.c:976:static void __init early_init_dt_check_for_usable_mem_range(unsigned long node) > > next: > drivers/of/fdt.c:980:static void __init early_init_dt_check_for_usable_mem_range(unsigned long node) > >> { >> const __be32 *prop; >> int len; >> diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h >> index cf48983d3c86..ad09beb6d13c 100644 >> --- a/include/linux/of_fdt.h >> +++ b/include/linux/of_fdt.h >> @@ -62,6 +62,7 @@ extern int early_init_dt_scan_chosen(unsigned long node, const char *uname, >> int depth, void *data); >> extern int early_init_dt_scan_memory(unsigned long node, const char *uname, >> int depth, void *data); >> +extern void early_init_dt_check_for_usable_mem_range(void); >> extern int early_init_dt_scan_chosen_stdout(void); >> extern void early_init_fdt_scan_reserved_mem(void); >> extern void early_init_fdt_reserve_self(void); >> @@ -86,6 +87,7 @@ extern void unflatten_and_copy_device_tree(void); >> extern void early_init_devtree(void *); >> extern void early_get_first_memblock_info(void *, phys_addr_t *); >> #else /* CONFIG_OF_EARLY_FLATTREE */ >> +static inline void early_init_dt_check_for_usable_mem_range(void) {} >> static inline int early_init_dt_scan_chosen_stdout(void) { return -ENODEV; } >> static inline void early_init_fdt_scan_reserved_mem(void) {} >> static inline void early_init_fdt_reserve_self(void) {} >> _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel