diff options
| author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2025-08-05 18:22:52 +0100 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2025-09-13 16:55:07 -0700 |
| commit | 56d578c1300f7efe9605b75714173dd3fda16fe2 (patch) | |
| tree | 586f384aac18bb0a59fa7e7072c1d9bd24726150 /include/asm-generic/memory_model.h | |
| parent | mm: introduce memdesc_flags_t (diff) | |
| download | linux-56d578c1300f7efe9605b75714173dd3fda16fe2.tar.gz linux-56d578c1300f7efe9605b75714173dd3fda16fe2.zip | |
mm: convert page_to_section() to memdesc_section()
Pass in the memdesc_flags_t instead of a pointer to the page. This will
allow us to remove a few conversions to struct page in upcoming patches.
Link: https://lkml.kernel.org/r/20250805172307.1302730-3-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Zi Yan <ziy@nvidia.com>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/asm-generic/memory_model.h')
| -rw-r--r-- | include/asm-generic/memory_model.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asm-generic/memory_model.h b/include/asm-generic/memory_model.h index 74d0077cc5fa..efa6610acbc7 100644 --- a/include/asm-generic/memory_model.h +++ b/include/asm-generic/memory_model.h @@ -53,7 +53,7 @@ static inline int pfn_valid(unsigned long pfn) */ #define __page_to_pfn(pg) \ ({ const struct page *__pg = (pg); \ - int __sec = page_to_section(__pg); \ + int __sec = memdesc_section(__pg->flags); \ (unsigned long)(__pg - __section_mem_map_addr(__nr_to_section(__sec))); \ }) |
