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: 84565 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2558828vqo; Mon, 17 Apr 2023 20:39:52 -0700 (PDT) X-Google-Smtp-Source: AKy350b2GGW49yZ1EA4Q6hSLiYH1xhi20ONhG4YPlko2Pn1ni16hJWnjuiOCFFoonTe0gmG2SnZo X-Received: by 2002:a05:6a20:4413:b0:ee:b102:2efd with SMTP id ce19-20020a056a20441300b000eeb1022efdmr13789408pzb.3.1681789192690; Mon, 17 Apr 2023 20:39:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681789192; cv=none; d=google.com; s=arc-20160816; b=CBPHUxEUqwNhm3BleNzx99ZhnLrLqNv+rgdQ5dO3nDHkg0l5u1UDD4Gq0W29mHf0P0 BHHrGlj9nSBpsKFjRT9eYB8t7ej+GuXoq5SXC7PzHXA4I9liq0vwT9trW8pYP1YeA0a7 qc6qu1aN9eSy9o+7UHpR4QWjHMOkeXLEqQokoRO8Arj9VpPTcb1k5w7OA6jQXI0raea7 +h2fm7M/zvnubBWqcFuP27e8Ou7N6f9dSHEUnJ3CL1gD6bjGQnUn4XrpSuw6FDVV8y8r Y04tC7ubLJvpOyF20xKCRudqBvXmhg5ZB68LsEt9zG9+ar0EoUerXcYZibJvqNQZLaxt KgYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:to:from; bh=4pc1NWmXDTjQzs2HiIEI7k1Bis+2lgG7wExwVZ8DsQ8=; b=pAbKX4w3HbXYjvh+M6+sHxX8ZXgi7mCHWtvDeZmg6wtbeL958/OEUKlZmhHeI60Sa7 EBZ+iVORxEMM/zaZL3saD58DVSJ48J5JD363ZRSyKRonFu51HvxpYOjnGdXNt7gfwKPt 9twK6avHGIlYhMqxE0c7GsLYCzXuVwuhiUwScrq0l3w9hbZnNLi7oF24qJk5hrnhK6dS xKstl9sLY39Qb3ntEhlWwmyELAIXLDEVcFF3agnhqhVxn5egbMB1fP/GDAsKR1LRusJN waF9qe4/5ZMN4QoYRwhLtTDq+oPx+fkRbUGoR8OfuW9ZA4pcPlcGL1XVRXh8UkHDgkv8 ifQQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m17-20020a656a11000000b0050f74bf6b3asi15190237pgu.700.2023.04.17.20.39.37; Mon, 17 Apr 2023 20:39:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230053AbjDRDeO (ORCPT + 99 others); Mon, 17 Apr 2023 23:34:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229662AbjDRDeN (ORCPT ); Mon, 17 Apr 2023 23:34:13 -0400 Received: from SHSQR01.spreadtrum.com (unknown [222.66.158.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C16B81FCA for ; Mon, 17 Apr 2023 20:34:09 -0700 (PDT) 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-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,HEXHASH_WORD, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763483784234848461?= X-GMAIL-MSGID: =?utf-8?q?1763483784234848461?= 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);