lkml.org 
[lkml]   [2023]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] mm: fix printk format within cma
Date
From: Zhaoyang Huang <zhaoyang.huang@unisoc.com>

cma and page pointer printed via %p are hash value which make debug to be hard.
change them to %px.

[63321.482751] [c7] cma: cma_alloc(): memory range at 000000000b5e462c is busy, retrying
[63321.482786] [c7] cma: cma_alloc(): memory range at 000000000f7d6fae is busy, retrying
[63321.482823] [c7] cma: cma_alloc(): memory range at 00000000e653b59b is busy, retrying
[63322.378890] [c7] cma: cma_release(page 00000000dd53cf48)
[63322.378913] [c7] cma: cma_release(page 00000000315f703d)
[63322.378925] [c7] cma: cma_release(page 00000000791e3a5f)

Signed-off-by: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
---
mm/cma.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mm/cma.c b/mm/cma.c
index 4a978e0..dfe9813 100644
--- a/mm/cma.c
+++ b/mm/cma.c
@@ -435,7 +435,7 @@ struct page *cma_alloc(struct cma *cma, unsigned long count,
if (!cma || !cma->count || !cma->bitmap)
goto out;

- pr_debug("%s(cma %p, count %lu, align %d)\n", __func__, (void *)cma,
+ pr_debug("%s(cma %px, count %lu, align %d)\n", __func__, (void *)cma,
count, align);

if (!count)
@@ -534,7 +534,7 @@ bool cma_pages_valid(struct cma *cma, const struct page *pages,
pfn = page_to_pfn(pages);

if (pfn < cma->base_pfn || pfn >= cma->base_pfn + cma->count) {
- pr_debug("%s(page %p, count %lu)\n", __func__,
+ pr_debug("%s(page %px, count %lu)\n", __func__,
(void *)pages, count);
return false;
}
@@ -560,7 +560,7 @@ bool cma_release(struct cma *cma, const struct page *pages,
if (!cma_pages_valid(cma, pages, count))
return false;

- pr_debug("%s(page %p, count %lu)\n", __func__, (void *)pages, count);
+ pr_debug("%s(page %px, count %lu)\n", __func__, (void *)pages, count);

pfn = page_to_pfn(pages);

--
1.9.1
\
 
 \ /
  Last update: 2023-04-18 05:35    [W:0.066 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site