Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm: make INVALID_PHYS_ADDR a generic macro

INVALID_PHYS_ADDR has very similar definitions across the code base.
Hence just move that inside header <liux/mm.h> for more generic usage.
Also drop the now redundant ones which are no longer required.

Link: https://lkml.kernel.org/r/20251021025638.2420216-1-anshuman.khandual@arm.com
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Acked-by: Alexander Gordeev <agordeev@linux.ibm.com> [s390]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Anshuman Khandual and committed by
Andrew Morton
272239dc b734b9d9

+2 -7
-2
arch/arm64/mm/mmu.c
··· 470 470 mutex_unlock(&fixmap_lock); 471 471 } 472 472 473 - #define INVALID_PHYS_ADDR (-1ULL) 474 - 475 473 static phys_addr_t __pgd_pgtable_alloc(struct mm_struct *mm, gfp_t gfp, 476 474 enum pgtable_type pgtable_type) 477 475 {
-1
arch/s390/boot/vmem.c
··· 16 16 #include "decompressor.h" 17 17 #include "boot.h" 18 18 19 - #define INVALID_PHYS_ADDR (~(phys_addr_t)0) 20 19 struct ctlreg __bootdata_preserved(s390_invalid_asce); 21 20 22 21 #ifdef CONFIG_PROC_FS
-2
drivers/vdpa/vdpa_user/iova_domain.h
··· 17 17 18 18 #define IOVA_START_PFN 1 19 19 20 - #define INVALID_PHYS_ADDR (~(phys_addr_t)0) 21 - 22 20 #define BOUNCE_MAP_SHIFT 12 23 21 #define BOUNCE_MAP_SIZE (1 << BOUNCE_MAP_SHIFT) 24 22 #define BOUNCE_MAP_MASK (~(BOUNCE_MAP_SIZE - 1))
+2
include/linux/mm.h
··· 105 105 # endif 106 106 #endif 107 107 108 + #define INVALID_PHYS_ADDR (~(phys_addr_t)0) 109 + 108 110 #include <asm/page.h> 109 111 #include <asm/processor.h> 110 112
-2
kernel/dma/swiotlb.c
··· 61 61 */ 62 62 #define IO_TLB_MIN_SLABS ((1<<20) >> IO_TLB_SHIFT) 63 63 64 - #define INVALID_PHYS_ADDR (~(phys_addr_t)0) 65 - 66 64 /** 67 65 * struct io_tlb_slot - IO TLB slot descriptor 68 66 * @orig_addr: The original address corresponding to a mapped entry.