[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <106d22a58b4971a2e41ca65d9ceb30ed81fcf727.1736299058.git-series.apopple@nvidia.com>
Date: Wed, 8 Jan 2025 12:18:45 +1100
From: Alistair Popple <apopple@...dia.com>
To: akpm@...ux-foundation.org,
linux-mm@...ck.org
Cc: Alistair Popple <apopple@...dia.com>,
gerald.schaefer@...ux.ibm.com,
dan.j.williams@...el.com,
jgg@...pe.ca,
willy@...radead.org,
david@...hat.com,
linux-kernel@...r.kernel.org,
nvdimm@...ts.linux.dev,
linux-fsdevel@...r.kernel.org,
linux-ext4@...r.kernel.org,
linux-xfs@...r.kernel.org,
jhubbard@...dia.com,
hch@....de
Subject: [RFC 1/4] mm: Remove PFN_MAP, PFN_SG_CHAIN and PFN_SG_LAST
The PFN_MAP flag is no longer used for anything, so remove it. The
PFN_SG_CHAIN and PFN_SG_LAST flags never appear to have been used so
also remove them.
Signed-off-by: Alistair Popple <apopple@...dia.com>
---
include/linux/pfn_t.h | 10 ++--------
tools/testing/nvdimm/test/iomap.c | 4 ----
2 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/include/linux/pfn_t.h b/include/linux/pfn_t.h
index 76e519b..75bb77c 100644
--- a/include/linux/pfn_t.h
+++ b/include/linux/pfn_t.h
@@ -11,16 +11,10 @@
* PFN_MAP - pfn has a dynamic page mapping established by a device driver
*/
#define PFN_FLAGS_MASK (((u64) (~PAGE_MASK)) << (BITS_PER_LONG_LONG - PAGE_SHIFT))
-#define PFN_SG_CHAIN (1ULL << (BITS_PER_LONG_LONG - 1))
-#define PFN_SG_LAST (1ULL << (BITS_PER_LONG_LONG - 2))
#define PFN_DEV (1ULL << (BITS_PER_LONG_LONG - 3))
-#define PFN_MAP (1ULL << (BITS_PER_LONG_LONG - 4))
#define PFN_FLAGS_TRACE \
- { PFN_SG_CHAIN, "SG_CHAIN" }, \
- { PFN_SG_LAST, "SG_LAST" }, \
- { PFN_DEV, "DEV" }, \
- { PFN_MAP, "MAP" }
+ { PFN_DEV, "DEV" }
static inline pfn_t __pfn_to_pfn_t(unsigned long pfn, u64 flags)
{
@@ -42,7 +36,7 @@ static inline pfn_t phys_to_pfn_t(phys_addr_t addr, u64 flags)
static inline bool pfn_t_has_page(pfn_t pfn)
{
- return (pfn.val & PFN_MAP) == PFN_MAP || (pfn.val & PFN_DEV) == 0;
+ return (pfn.val & PFN_DEV) == 0;
}
static inline unsigned long pfn_t_to_pfn(pfn_t pfn)
diff --git a/tools/testing/nvdimm/test/iomap.c b/tools/testing/nvdimm/test/iomap.c
index e431372..ddceb04 100644
--- a/tools/testing/nvdimm/test/iomap.c
+++ b/tools/testing/nvdimm/test/iomap.c
@@ -137,10 +137,6 @@ EXPORT_SYMBOL_GPL(__wrap_devm_memremap_pages);
pfn_t __wrap_phys_to_pfn_t(phys_addr_t addr, unsigned long flags)
{
- struct nfit_test_resource *nfit_res = get_nfit_res(addr);
-
- if (nfit_res)
- flags &= ~PFN_MAP;
return phys_to_pfn_t(addr, flags);
}
EXPORT_SYMBOL(__wrap_phys_to_pfn_t);
--
git-series 0.9.1
Powered by blists - more mailing lists