From patchwork Tue Apr 18 03:33:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "zhaoyang.huang" X-Patchwork-Id: 13215019 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67BEEC77B71 for ; Tue, 18 Apr 2023 03:34:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B7F416B0074; Mon, 17 Apr 2023 23:33:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B08286B0075; Mon, 17 Apr 2023 23:33:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9A98A8E0001; Mon, 17 Apr 2023 23:33:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 870796B0074 for ; Mon, 17 Apr 2023 23:33:59 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 566941A060E for ; Tue, 18 Apr 2023 03:33:59 +0000 (UTC) X-FDA: 80693092998.29.097859F Received: from SHSQR01.spreadtrum.com (mx1.unisoc.com [222.66.158.135]) by imf20.hostedemail.com (Postfix) with ESMTP id A45BC1C0003 for ; Tue, 18 Apr 2023 03:33:56 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf20.hostedemail.com: domain of zhaoyang.huang@unisoc.com designates 222.66.158.135 as permitted sender) smtp.mailfrom=zhaoyang.huang@unisoc.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1681788837; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references; bh=4pc1NWmXDTjQzs2HiIEI7k1Bis+2lgG7wExwVZ8DsQ8=; b=oOG5J8M8YqwZxLM9gxoFHWMjWEHNSyhUeNDf5YqVjh0oApQEwSKQ17zjSMfn++7Ab8eER6 dnULWSgOYvHVwZ0TqLJwKMJYZ0K+fBotqs2NwF6TrrRtYnYzer+h33HadGl70h2DEmsW9Q /Z4+rzbcB03pxSRe2xzrXmSf5qqDObc= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf20.hostedemail.com: domain of zhaoyang.huang@unisoc.com designates 222.66.158.135 as permitted sender) smtp.mailfrom=zhaoyang.huang@unisoc.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1681788837; a=rsa-sha256; cv=none; b=biXrVBLazTkxWPE8VNIaG9B/Wjf+ALMAUubh+Dg3eysp5Zbs0+AxRVF8T9Decs/QNqfb8W ffxhaEtdi/qIuLYr4N6ibPDcsmqZ9ZGsQIy+zUWAWA4orueViKyuwSpmKyLTDUM+DYmVLU wMxrD3c/3xXNKageMXCd8a1mHSU5kBQ= Received: from SHSend.spreadtrum.com (bjmbx01.spreadtrum.com [10.0.64.7]) by SHSQR01.spreadtrum.com with ESMTP id 33I3XRlX088878; Tue, 18 Apr 2023 11:33:27 +0800 (+08) (envelope-from zhaoyang.huang@unisoc.com) Received: from bj03382pcu.spreadtrum.com (10.0.74.65) by BJMBX01.spreadtrum.com (10.0.64.7) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Tue, 18 Apr 2023 11:33:23 +0800 From: "zhaoyang.huang" To: Andrew Morton , Minchan Kim , Joonsoo Kim , , , Zhaoyang Huang , Subject: [PATCH] mm: fix printk format within cma Date: Tue, 18 Apr 2023 11:33:09 +0800 Message-ID: <1681788789-19679-1-git-send-email-zhaoyang.huang@unisoc.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.0.74.65] X-ClientProxiedBy: SHCAS03.spreadtrum.com (10.0.1.207) To BJMBX01.spreadtrum.com (10.0.64.7) X-MAIL: SHSQR01.spreadtrum.com 33I3XRlX088878 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: A45BC1C0003 X-Stat-Signature: odkgmsxtn4gp8fnjb4qa8ehohjbmutmq X-Rspam-User: X-HE-Tag: 1681788836-121101 X-HE-Meta: U2FsdGVkX1911RoG1s5r7GrzJwSJCrEy8wNXZEt/Z3iHJEUOfrWY3S86nJEahqQH7bvIr5nEeZE2XBCdGOm5kVfHIr3yzXK3FtMoJAvO/O//KgwJR4EEdB1ng7fiBYC5M3eiv11sPk1mcphRkVq7XqwE1OsWP+OyILrIuV/gMaa/bTPNQ+FZwdO8ZOXgRqP4TSKgtXt+4MdhK9L0vrbSc+oNEhZqUrPBY26scBKHEqBI4IVcUjiZy1FmFSEYVJNoDpSsV347JICCPRSzU5HBYgxCvtC25UbqkaqYG/26J2XeElzdgXmIeg8zWGlNzFVTouTlcefOYzx5pAhyk78+eivM64TzFoXWSJzuOMm4CmSStV5BKt4BL8sYN+3aWRoxNKaoGgqdy6V52IJzS6rcrtEt6HCQypmb6ou4btTtp5UXNE0U4cAA0mSAZOjZ/ztS/9HPWb1jSMn4f6TWV7TIHMProSOrfd/bfWTbgsP/mvSaSAOQeXYjHD6NM8NxoFhm1HhCInEUqMrq/cDOPYmC3ZbDFBqD3vQZaTXPK/sM5fl11y72YmbO4qXJwG+J/CgTwn8ILsju9VBPV2s4qzGLnigA/XxGF0L+f2mc+7bmNgXOqzHZvrFTJHU2yFHDELscNpHDamgOBhPKI/Yfm3+yRuHdX7pvq3N1MSMnzXDbuWFfGl/CUFsrLZ9+SPpUrsV6Fxa0ZvVZhrYBZyePW7Zv1ilmkMY3rTJcEIDoPzBoU4QKWHFzQqJWHJFd0jjyoNxX7PCpGPhf2da+550fCDM0Hdgw7KIAzlejjyyzIb9mJuABl2+rX68l7Kpdi5ryJzky46ZfaKDkxqmhaSSDzGp1HlLCBuZhkPDYz4P9M96sPeI1Pm97vxHUwDZDYvKiGoP/WVmGKPvJY52RX7UlSo+2L1PiRqAugq/zsYh6FX7Qe38ZGK9J8GmjUVNe+cId/TKUCGldPewzOfWBjVKFIvK /2B7Zhip ysRWoeOlLy3njPVghftG3d9eENeLAkmxikKCvTiSW7UAW2Sflzb1NkpaADP+daMB4Pe1UnjcQiD3oM8V0nbyTf9mZodN8IjxmRAQNXvEIbGpk83iacSwA4/QcDtckp6cTGwkvaSlp96TUneaffrEhuFl4sObEkYIhsTJqm/R7AW6HHkZv+62ZNv6KHVsHa5wxlO46xEIE/IVq4NXm0Ydjxhe9mfFWaPanx5rGpT7R6ga+KJtJEKToX5ew+pBOiBmtzGDPfNH/mvcFKybvYz9umGq6jw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Zhaoyang Huang 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 --- 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);