android_kernel_motorola_sm6375/arch
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ross Stutterheim 175925abd5 ARM: 9447/1: arm/memremap: fix arch_memremap_can_ram_remap()
commit 96e0b355883006554a0bee3697da475971d6bba8 upstream.

arm/memremap: fix arch_memremap_can_ram_remap()

commit 260364d112bc ("arm[64]/memremap: don't abuse pfn_valid() to ensure
presence of linear map") added the definition of
arch_memremap_can_ram_remap() for arm[64] specific filtering of what pages
can be used from the linear mapping. memblock_is_map_memory() was called
with the pfn of the address given to arch_memremap_can_ram_remap();
however, memblock_is_map_memory() expects to be given an address for arm,
not a pfn.

This results in calls to memremap() returning a newly mapped area when
it should return an address in the existing linear mapping.

Fix this by removing the address to pfn translation and pass the
address directly.

Fixes: 260364d112bc ("arm[64]/memremap: don't abuse pfn_valid() to ensure presence of linear map")
Signed-off-by: Ross Stutterheim <ross.stutterheim@garmin.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: stable@vger.kernel.org
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-06-27 11:02:51 +01:00
..
alpha alpha: replace hardcoded stack offsets with autogenerated ones 2025-03-13 12:43:18 +01:00
arc ARC: build: Try to guess GCC variant of cross compiler 2025-01-09 13:23:36 +01:00
arm ARM: 9447/1: arm/memremap: fix arch_memremap_can_ram_remap() 2025-06-27 11:02:51 +01:00
arm64 xen/arm: call uaccess_ttbr0_enable for dm_op hypercall 2025-06-27 11:02:50 +01:00
c6x
csky csky, hexagon: fix broken sys_sync_file_range 2024-07-05 09:08:31 +02:00
h8300
hexagon hexagon: Fix unbalanced spinlock in die() 2025-03-13 12:43:01 +01:00
ia64
m68k m68k: mac: Fix macintosh_config for Mac II 2025-06-27 11:02:45 +01:00
microblaze microblaze: don't treat zero reserved memory regions as error 2024-11-08 16:20:25 +01:00
mips MIPS: Move '-Wa,-msoft-float' check from as-option to cc-option 2025-06-27 11:02:50 +01:00
nds32
nios2
openrisc openrisc: Call setup_memory() earlier in the init sequence 2024-09-04 13:14:57 +02:00
parisc parisc: Fix double SIGFPE crash 2025-06-04 14:32:24 +02:00
powerpc powerpc/prom_init: Fixup missing #size-cells on PowerBook6,7 2025-06-04 14:32:31 +02:00
riscv riscv: Avoid fortify warning in syscall_get_arguments() 2025-05-02 07:39:20 +02:00
s390 KVM: s390: Don't use %pK through tracepoints 2025-05-02 07:39:29 +02:00
sh sh: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK 2024-12-14 19:44:37 +01:00
sparc sparc/mm: disable preemption in lazy mmu mode 2025-05-02 07:39:16 +02:00
um um: let 'make clean' properly clean underlying SUBARCH as well 2025-06-04 14:32:37 +02:00
unicore32
x86 x86/boot/compressed: prefer cc-option for CFLAGS additions 2025-06-27 11:02:50 +01:00
xtensa
.gitignore
Kconfig