* [PATCH v2 4/3] memblock tests: add new pageblock related macro
@ 2022-09-07 8:26 Kefeng Wang
2022-09-08 4:16 ` Mike Rapoport
0 siblings, 1 reply; 2+ messages in thread
From: Kefeng Wang @ 2022-09-07 8:26 UTC (permalink / raw)
To: Andrew Morton, linux-mm
Cc: Mike Rapoport, David Hildenbrand, Oscar Salvador, linux-kernel,
Vlastimil Babka, Kefeng Wang
Add new pageblock_start_pfn() and pageblock_align() macro
which are needed by memblock tests.
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
tools/testing/memblock/linux/mmzone.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/memblock/linux/mmzone.h b/tools/testing/memblock/linux/mmzone.h
index 7c2eb5c9bb54..e65f89b12f1c 100644
--- a/tools/testing/memblock/linux/mmzone.h
+++ b/tools/testing/memblock/linux/mmzone.h
@@ -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;
--
2.35.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 4/3] memblock tests: add new pageblock related macro
2022-09-07 8:26 [PATCH v2 4/3] memblock tests: add new pageblock related macro Kefeng Wang
@ 2022-09-08 4:16 ` Mike Rapoport
0 siblings, 0 replies; 2+ messages in thread
From: Mike Rapoport @ 2022-09-08 4:16 UTC (permalink / raw)
To: Andrew Morton
Cc: Kefeng Wang, linux-mm, David Hildenbrand, Oscar Salvador,
linux-kernel, Vlastimil Babka
Andrew,
Do you mind taking this along with the pageblock macros series?
On Wed, Sep 07, 2022 at 04:26:43PM +0800, Kefeng Wang wrote:
> Add new pageblock_start_pfn() and pageblock_align() macro
> which are needed by memblock tests.
>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
> tools/testing/memblock/linux/mmzone.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tools/testing/memblock/linux/mmzone.h b/tools/testing/memblock/linux/mmzone.h
> index 7c2eb5c9bb54..e65f89b12f1c 100644
> --- a/tools/testing/memblock/linux/mmzone.h
> +++ b/tools/testing/memblock/linux/mmzone.h
> @@ -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;
> --
> 2.35.3
>
--
Sincerely yours,
Mike.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-08 4:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-07 8:26 [PATCH v2 4/3] memblock tests: add new pageblock related macro Kefeng Wang
2022-09-08 4:16 ` Mike Rapoport
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).