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'
Fixs: 902c2d91582 ("memblock: Disable mirror feature if kernelcore is not
specified")
Fixs: 14d9a675fd0 ("mm: Ratelimited mirrored memory related warning")
Signed-off-by: Liu Xinpeng <[email protected]>
---
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
On Tue, Jul 26, 2022 at 8:35 AM Liu Xinpeng <[email protected]> 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 ?
> Fixs: 902c2d91582 ("memblock: Disable mirror feature if kernelcore is not
> specified")
> Fixs: 14d9a675fd0 ("mm: Ratelimited mirrored memory related warning")
>
> Signed-off-by: Liu Xinpeng <[email protected]>
> ---
> 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
>
>
On 2022/7/26 11:05, 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'
>
> Fixs: 902c2d91582 ("memblock: Disable mirror feature if kernelcore is not
> specified")
Fixs should not have word warp.
Tested-by: Ma Wupeng <[email protected]>
> Fixs: 14d9a675fd0 ("mm: Ratelimited mirrored memory related warning")
>
> Signed-off-by: Liu Xinpeng <[email protected]>
> ---
> 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,
>On 2022/7/26 11:05, 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'
>> Fixs: 902c2d91582 ("memblock: Disable mirror feature if kernelcore is not
>> specified")
>Fixs should not have word warp.
>Tested-by: Ma Wupeng <[email protected]>
I will send patch v2, such as,
Fixs: 902c2d91582 ("memblock: Disable mirror feature if kernelcore is not
specified") and 14d9a675fd0 ("mm: Ratelimited mirrored memory related warning")
> +#define pr_warn_ratelimited(fmt, ...) printf(fmt, ##__VA_ARGS__);
And removed the comma.
thanks your test,
Liu Xinpeng