Patch "riscv: fix VMALLOC_START definition" has been added to the 5.15-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

    riscv: fix VMALLOC_START definition

to the 5.15-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:
     riscv-fix-vmalloc_start-definition.patch
and it can be found in the queue-5.15 subdirectory.

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



commit 750f2f9797d617ba246aef00363fdad9e79c22b5
Author: Baoquan He <bhe@xxxxxxxxxx>
Date:   Tue Dec 5 11:02:55 2023 +0800

    riscv: fix VMALLOC_START definition
    
    [ Upstream commit ac88ff6b9d7dea9f0907c86bdae204dde7d5c0e6 ]
    
    When below config items are set, compiler complained:
    
    --------------------
    CONFIG_CRASH_CORE=y
    CONFIG_KEXEC_CORE=y
    CONFIG_CRASH_DUMP=y
    ......
    -----------------------
    
    -------------------------------------------------------------------
    arch/riscv/kernel/crash_core.c: In function 'arch_crash_save_vmcoreinfo':
    arch/riscv/kernel/crash_core.c:11:58: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'int' [-Wformat=]
    11 |         vmcoreinfo_append_str("NUMBER(VMALLOC_START)=0x%lx\n", VMALLOC_START);
       |                                                        ~~^
       |                                                          |
       |                                                          long unsigned int
       |                                                        %x
    ----------------------------------------------------------------------
    
    This is because on riscv macro VMALLOC_START has different type when
    CONFIG_MMU is set or unset.
    
    arch/riscv/include/asm/pgtable.h:
    --------------------------------------------------
    
    Changing it to _AC(0, UL) in case CONFIG_MMU=n can fix the warning.
    
    Link: https://lkml.kernel.org/r/ZW7OsX4zQRA3mO4+@MiWiFi-R3L-srv
    Signed-off-by: Baoquan He <bhe@xxxxxxxxxx>
    Reported-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
    Acked-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
    Tested-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx> # build-tested
    Cc: Eric DeVolder <eric_devolder@xxxxxxxxx>
    Cc: Ignat Korchagin <ignat@xxxxxxxxxxxxxx>
    Cc: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
    Cc: Paul Walmsley <paul.walmsley@xxxxxxxxxx>
    Cc: Palmer Dabbelt <palmer@xxxxxxxxxxx>
    Cc: Albert Ou <aou@xxxxxxxxxxxxxxxxx>
    Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
    Stable-dep-of: 6065e736f82c ("riscv: Fix TASK_SIZE on 64-bit NOMMU")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
index 9a3d9b68f2ff4..17e22eb76a815 100644
--- a/arch/riscv/include/asm/pgtable.h
+++ b/arch/riscv/include/asm/pgtable.h
@@ -676,7 +676,7 @@ static inline pmd_t pmdp_establish(struct vm_area_struct *vma,
 #define PAGE_KERNEL		__pgprot(0)
 #define swapper_pg_dir		NULL
 #define TASK_SIZE		0xffffffffUL
-#define VMALLOC_START		0
+#define VMALLOC_START		_AC(0, UL)
 #define VMALLOC_END		TASK_SIZE
 
 #endif /* !CONFIG_MMU */




[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