Patch "MIPS: loongson64: fix bug when PAGE_SIZE > 16KB" has been added to the 5.10-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

    MIPS: loongson64: fix bug when PAGE_SIZE > 16KB

to the 5.10-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:
     mips-loongson64-fix-bug-when-page_size-16kb.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 8cd20bb0b72f03aace857a8259470545aac0d3df
Author: Huang Pei <huangpei@xxxxxxxxxxx>
Date:   Wed Mar 24 11:24:51 2021 +0800

    MIPS: loongson64: fix bug when PAGE_SIZE > 16KB
    
    [ Upstream commit 509d36a941a3466b78d4377913623d210b162458 ]
    
    When page size larger than 16KB, arguments "vaddr + size(16KB)" in
    "ioremap_page_range(vaddr, vaddr + size,...)" called by
    "add_legacy_isa_io" is not page-aligned.
    
    As loongson64 needs at least page size 16KB to get rid of cache alias,
    and "vaddr" is 64KB-aligned, and 64KB is largest page size supported,
    rounding "size" up to PAGE_SIZE is enough for all page size supported.
    
    Fixes: 6d0068ad15e4 ("MIPS: Loongson64: Process ISA Node in DeviceTree")
    Signed-off-by: Huang Pei <huangpei@xxxxxxxxxxx>
    Acked-by: Jiaxun Yang <jiaxun.yang@xxxxxxxxxxx>
    Signed-off-by: Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/mips/loongson64/init.c b/arch/mips/loongson64/init.c
index ed75f7971261..052cce6a8a99 100644
--- a/arch/mips/loongson64/init.c
+++ b/arch/mips/loongson64/init.c
@@ -82,7 +82,7 @@ static int __init add_legacy_isa_io(struct fwnode_handle *fwnode, resource_size_
 		return -ENOMEM;
 
 	range->fwnode = fwnode;
-	range->size = size;
+	range->size = size = round_up(size, PAGE_SIZE);
 	range->hw_start = hw_start;
 	range->flags = LOGIC_PIO_CPU_MMIO;
 



[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