linux/arch/arm64
Anshuman Khandual 093bbe211e arm64/mm: Reorganize pfn_valid()
There are multiple instances of pfn_to_section_nr() and __pfn_to_section()
when CONFIG_SPARSEMEM is enabled. This can be optimized if memory section
is fetched earlier. This replaces the open coded PFN and ADDR conversion
with PFN_PHYS() and PHYS_PFN() helpers. While there, also add a comment.
This does not cause any functional change.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/1614921898-4099-3-git-send-email-anshuman.khandual@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2021-03-08 18:04:00 +00:00
..
boot regulator: Updates for v5.12 2021-02-22 09:16:38 -08:00
configs Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid 2021-02-23 14:52:22 -08:00
crypto crypto: arm64/crc-t10dif - move NEON yield to C code 2021-02-10 17:55:58 +11:00
include RISC-V Patches for the 5.12 Merge Window 2021-02-26 10:28:35 -08:00
kernel arm64: Drop support for CMDLINE_EXTEND 2021-03-08 12:56:34 +00:00
kvm arm64 fixes for -rc1 2021-02-26 10:19:03 -08:00
lib arm64: kasan: simplify and inline MTE functions 2021-02-26 09:41:03 -08:00
mm arm64/mm: Reorganize pfn_valid() 2021-03-08 18:04:00 +00:00
net bpf: Rename BPF_XADD and prepare to encode other atomics in .imm 2021-01-14 18:34:29 -08:00
xen
Kbuild
Kconfig arm64/mm: Drop THP conditionality from FORCE_MAX_ZONEORDER 2021-03-08 13:03:54 +00:00
Kconfig.debug
Kconfig.platforms Updates for the irq subsystem: 2021-02-21 11:53:06 -08:00
Makefile arm64: do not descend to vdso directories twice 2021-01-20 12:18:46 +00:00