Patch "memblock tests: Fix compilation errors." has been added to the 6.5-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    memblock tests: Fix compilation errors.

to the 6.5-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     memblock-tests-fix-compilation-errors.patch
and it can be found in the queue-6.5 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 1bcfa13d4fb6474d7aa12f2b0d6aafa1f4c573e6
Author: Rong Tao <rongtao@xxxxxxxx>
Date:   Mon Sep 11 22:32:56 2023 +0800

    memblock tests: Fix compilation errors.
    
    [ Upstream commit 4b2d631236931550f2ab0abc9a666958853ae846 ]
    
    This patch fix the follow errors.
    
    commit 61167ad5fecd ("mm: pass nid to reserve_bootmem_region()") pass nid
    parameter to reserve_bootmem_region(),
    
        $ make -C tools/testing/memblock/
        ...
        memblock.c: In function ‘memmap_init_reserved_pages’:
        memblock.c:2111:25: error: too many arguments to function ‘reserve_bootmem_region’
        2111 |                         reserve_bootmem_region(start, end, nid);
             |                         ^~~~~~~~~~~~~~~~~~~~~~
        ../../include/linux/mm.h:32:6: note: declared here
        32 | void reserve_bootmem_region(phys_addr_t start, phys_addr_t end);
           |      ^~~~~~~~~~~~~~~~~~~~~~
        memblock.c:2122:17: error: too many arguments to function ‘reserve_bootmem_region’
        2122 |                 reserve_bootmem_region(start, end, nid);
             |                 ^~~~~~~~~~~~~~~~~~~~~~
    
    commit dcdfdd40fa82 ("mm: Add support for unaccepted memory") call
    accept_memory() in memblock.c
    
        $ make -C tools/testing/memblock/
        ...
        cc -fsanitize=address -fsanitize=undefined  main.o memblock.o \
         lib/slab.o mmzone.o slab.o tests/alloc_nid_api.o \
         tests/alloc_helpers_api.o tests/alloc_api.o tests/basic_api.o \
         tests/common.o tests/alloc_exact_nid_api.o   -o main
        /usr/bin/ld: memblock.o: in function `memblock_alloc_range_nid':
        memblock.c:(.text+0x7ae4): undefined reference to `accept_memory'
    
    Signed-off-by: Rong Tao <rongtao@xxxxxxxx>
    Fixes: dcdfdd40fa82 ("mm: Add support for unaccepted memory")
    Fixes: 61167ad5fecd ("mm: pass nid to reserve_bootmem_region()")
    Link: https://lore.kernel.org/r/tencent_6F19BC082167F15DF2A8D8BEFE8EF220F60A@xxxxxx
    Signed-off-by: Mike Rapoport (IBM) <rppt@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/include/linux/mm.h b/tools/include/linux/mm.h
index a03d9bba51514..2bc94079d6166 100644
--- a/tools/include/linux/mm.h
+++ b/tools/include/linux/mm.h
@@ -29,7 +29,7 @@ static inline void *phys_to_virt(unsigned long address)
 	return __va(address);
 }
 
-void reserve_bootmem_region(phys_addr_t start, phys_addr_t end);
+void reserve_bootmem_region(phys_addr_t start, phys_addr_t end, int nid);
 
 static inline void totalram_pages_inc(void)
 {
diff --git a/tools/testing/memblock/internal.h b/tools/testing/memblock/internal.h
index fdb7f5db73082..f6c6e5474c3af 100644
--- a/tools/testing/memblock/internal.h
+++ b/tools/testing/memblock/internal.h
@@ -20,4 +20,8 @@ void memblock_free_pages(struct page *page, unsigned long pfn,
 {
 }
 
+static inline void accept_memory(phys_addr_t start, phys_addr_t end)
+{
+}
+
 #endif
diff --git a/tools/testing/memblock/mmzone.c b/tools/testing/memblock/mmzone.c
index 7b0909e8b759d..d3d58851864e7 100644
--- a/tools/testing/memblock/mmzone.c
+++ b/tools/testing/memblock/mmzone.c
@@ -11,7 +11,7 @@ struct pglist_data *next_online_pgdat(struct pglist_data *pgdat)
 	return NULL;
 }
 
-void reserve_bootmem_region(phys_addr_t start, phys_addr_t end)
+void reserve_bootmem_region(phys_addr_t start, phys_addr_t end, int nid)
 {
 }
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux