summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnze Li <lienze@kylinos.cn>2026-08-31 07:26:09 -0700
committerAndrew Morton <akpm@linux-foundation.org>2026-10-06 17:39:16 -0700
commitfb14504f2e8fdbf5efe4faf0051397d180bff4af (patch)
treed28d669b340b35f8ab4e3f8d8d41d7a584406df0
parent3009b0a76cd19d63c45da6b11ce910b00e9f630b (diff)
samples/damon/mtier: add comment for struct region_range
The mtier sample defines a local struct region_range using phys_addr_t instead of damon_addr_range which uses unsigned long. Add a comment explaining the rationale: on 32-bit systems with more than 4GiB memory, phys_addr_t will be 64-bit while unsigned long is 32-bit. Link: https://lore.kernel.org/20260831142611.77572-8-sj@kernel.org Signed-off-by: Enze Li <lienze@kylinos.cn> Signed-off-by: SJ Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: SJ Park <sj@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Hari Mishal <harimishal1@gmail.com> Cc: Jaeyeon Lee <jaeyeon.lee.dev@gmail.com> Cc: Li Youhong <liyouhong@kylinos.cn> Cc: Shuah Khan <shuah@kernel.org> Cc: "Zenghui Yu (Huawei)" <zenghui.yu@linux.dev> Cc: zhaozhengzhuo <zhaozhengzhuo@uniontech.com>
-rw-r--r--samples/damon/mtier.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/samples/damon/mtier.c b/samples/damon/mtier.c
index d1123ebbfab9..bea45c87cc9b 100644
--- a/samples/damon/mtier.c
+++ b/samples/damon/mtier.c
@@ -52,6 +52,11 @@ module_param(detect_node_addresses, bool, 0600);
static struct damon_ctx *ctxs[2];
+/*
+ * Use phys_addr_t instead of damon_addr_range (unsigned long) for physical
+ * addresses. On 32-bit systems with more than 4GB memory, phys_addr_t will
+ * be 64-bit while unsigned long is 32-bit.
+ */
struct region_range {
phys_addr_t start;
phys_addr_t end;