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 88E14C00144 for ; Wed, 27 Jul 2022 01:53:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239893AbiG0BxL (ORCPT ); Tue, 26 Jul 2022 21:53:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232925AbiG0BxI (ORCPT ); Tue, 26 Jul 2022 21:53:08 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15AE927CCD for ; Tue, 26 Jul 2022 18:53:08 -0700 (PDT) Received: from dggpemm500022.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4Lsxbc1GDwz9sy2; Wed, 27 Jul 2022 09:51:56 +0800 (CST) Received: from dggpemm500014.china.huawei.com (7.185.36.153) by dggpemm500022.china.huawei.com (7.185.36.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 27 Jul 2022 09:53:06 +0800 Received: from [10.174.178.120] (10.174.178.120) by dggpemm500014.china.huawei.com (7.185.36.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 27 Jul 2022 09:53:05 +0800 Message-ID: Date: Wed, 27 Jul 2022 09:53:05 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.0.3 CC: , , , , Subject: Re: [PATCH] memblock tests: compiling error Content-Language: en-US To: , References: <1658804705-16996-1-git-send-email-liuxp11@chinatelecom.cn> From: mawupeng In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.178.120] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm500014.china.huawei.com (7.185.36.153) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/7/27 9:01, Souptick Joarder wrote: > On Tue, Jul 26, 2022 at 8:35 AM Liu Xinpeng wrote: >> >> memblock.o: In function `memblock_find_in_range.constprop.9': >> memblock.c:(.text+0x4651): undefined reference to `pr_warn_ratelimited' >> memblock.o: In function `memblock_mark_mirror': >> memblock.c:(.text+0x7171): undefined reference to `mirrored_kernelcore' >> > > what is the steps to hit this compile error ? Do make -C tools/testing/memblock can hit this compile error. > >> Fixs: 902c2d91582 ("memblock: Disable mirror feature if kernelcore is not >> specified") >> Fixs: 14d9a675fd0 ("mm: Ratelimited mirrored memory related warning") >> >> Signed-off-by: Liu Xinpeng >> --- >> tools/testing/memblock/internal.h | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/tools/testing/memblock/internal.h b/tools/testing/memblock/internal.h >> index c2a492c..cf67e6e 100644 >> --- a/tools/testing/memblock/internal.h >> +++ b/tools/testing/memblock/internal.h >> @@ -9,6 +9,9 @@ >> static int memblock_debug = 1; >> #endif >> >> +#define pr_warn_ratelimited(fmt, ...) printf(fmt, ##__VA_ARGS__); >> + >> +bool mirrored_kernelcore = false; >> struct page {}; >> >> void memblock_free_pages(struct page *page, unsigned long pfn, >> -- >> 1.8.3.1 >> >>