Commit 272239dc authored by Anshuman Khandual's avatar Anshuman Khandual Committed by Andrew Morton
Browse files

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: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
Acked-by: Alexander Gordeev <agordeev@linux.ibm.com>	[s390]
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent b734b9d9
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -470,8 +470,6 @@ static void __create_pgd_mapping(pgd_t *pgdir, phys_addr_t phys,
	mutex_unlock(&fixmap_lock);
}

#define INVALID_PHYS_ADDR	(-1ULL)

static phys_addr_t __pgd_pgtable_alloc(struct mm_struct *mm, gfp_t gfp,
				       enum pgtable_type pgtable_type)
{
+0 −1
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@
#include "decompressor.h"
#include "boot.h"

#define INVALID_PHYS_ADDR (~(phys_addr_t)0)
struct ctlreg __bootdata_preserved(s390_invalid_asce);

#ifdef CONFIG_PROC_FS
+0 −2
Original line number Diff line number Diff line
@@ -17,8 +17,6 @@

#define IOVA_START_PFN 1

#define INVALID_PHYS_ADDR (~(phys_addr_t)0)

#define BOUNCE_MAP_SHIFT	12
#define BOUNCE_MAP_SIZE	(1 << BOUNCE_MAP_SHIFT)
#define BOUNCE_MAP_MASK	(~(BOUNCE_MAP_SIZE - 1))
+2 −0
Original line number Diff line number Diff line
@@ -105,6 +105,8 @@ extern int mmap_rnd_compat_bits __read_mostly;
# endif
#endif

#define INVALID_PHYS_ADDR (~(phys_addr_t)0)

#include <asm/page.h>
#include <asm/processor.h>

+0 −2
Original line number Diff line number Diff line
@@ -61,8 +61,6 @@
 */
#define IO_TLB_MIN_SLABS ((1<<20) >> IO_TLB_SHIFT)

#define INVALID_PHYS_ADDR (~(phys_addr_t)0)

/**
 * struct io_tlb_slot - IO TLB slot descriptor
 * @orig_addr:	The original address corresponding to a mapped entry.