mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
memblock tests: add new pageblock related macro
Add new pageblock_start_pfn() and pageblock_align() macro which are needed by memblock tests. Link: https://lkml.kernel.org/r/20220907082643.186979-1-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> Cc: David Hildenbrand <david@redhat.com> Cc: Mike Rapoport <rppt@linux.ibm.com> Cc: Oscar Salvador <osalvador@suse.de> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
ee0913c471
commit
fc5dfebc80
@ -22,6 +22,8 @@ enum zone_type {
|
||||
|
||||
#define pageblock_order (MAX_ORDER - 1)
|
||||
#define pageblock_nr_pages BIT(pageblock_order)
|
||||
#define pageblock_align(pfn) ALIGN((pfn), pageblock_nr_pages)
|
||||
#define pageblock_start_pfn(pfn) ALIGN_DOWN((pfn), pageblock_nr_pages)
|
||||
|
||||
struct zone {
|
||||
atomic_long_t managed_pages;
|
||||
|
Loading…
Reference in New Issue
Block a user