From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2FB7B3E7179 for ; Mon, 13 Jul 2026 11:36:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783942617; cv=none; b=NM9fi3ujGrMJMD7Y9OFf7CzXGzLF7Ke0vgHrSvBcYsqeB4BtrLKZbRs7Utku6E2k5BVpeR+3c16ysnHxwW1LMtmi7k3pByarP6ggCZ1Yo2Y4fcHm6yoW9t3AlDcm1ejUPv9+MiDXl+f+5bx05MKqYU8wlPpBXIPfKaPFkEgJOqA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783942617; c=relaxed/simple; bh=n5UuU/aRZLo/pGJ5FmIUsayUkgQ1F1cb/IBnmdJ/Ahs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ESUbZoO4/7FknsUSxcldaQqHBZ8nftRXBPv8Dw92FL8Mt8tN0ffdfvwWfA1FWYDJLO4eyTssCVoAUIVK+fJu+LKJoRxwUG+4sAdTxhGzFEB1IltVDEBwtdu8UaJG/n4Nk+TWkTrTEYFO2UHTw6QohmHs+QslQsUnBxZDShsABG4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=ECBt4JBH; arc=none smtp.client-ip=198.175.65.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ECBt4JBH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1783942615; x=1815478615; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=n5UuU/aRZLo/pGJ5FmIUsayUkgQ1F1cb/IBnmdJ/Ahs=; b=ECBt4JBHqt8qm4vbhX+GnzrpIb+Q9GD0YR5xH+z6VlqQWWeRlM5pfZNd W/Z0LZ+dBvyiGyGSEHJypvWJlJQwnKO2OOtLJX17dD0izqZNis82RE+s4 EokTE2pD3XKPYUxH2ErHgr6l/Qs60FKsj1t7m5GVc/KzaKWqdTuiVdMQf gK2JzMgnCNWYxn0/OyZUo1mCr6byfGSDpvH7XdOE9cBHK0Kk1KDzB+KL8 Rus1HxF5e7zpBQltUUEfxqmH+UY7Iu4pV76UoQW0HkjAaMyh9e1s/mC76 lbdIrxz7x1R1J35VSwP1xWuJm+k9boizwnX5UTRDgBDLacvlMf7xdTcbA Q==; X-CSE-ConnectionGUID: Own2Ey5EQh6NMRnlLqjf+Q== X-CSE-MsgGUID: q7ByJeCZTBK+2/4ZHytUbA== X-IronPort-AV: E=McAfee;i="6800,10657,11841"; a="88452600" X-IronPort-AV: E=Sophos;i="6.25,154,1779174000"; d="scan'208";a="88452600" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2026 04:36:55 -0700 X-CSE-ConnectionGUID: UXwbby/pTku/vCRV/hTd9A== X-CSE-MsgGUID: kNAWKrjtTQSPp5amXCCIAg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,154,1779174000"; d="scan'208";a="253791771" Received: from ijarvine-mobl1.ger.corp.intel.com (HELO localhost) ([10.245.245.88]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2026 04:36:52 -0700 Date: Mon, 13 Jul 2026 14:36:50 +0300 From: Andy Shevchenko To: "David Hildenbrand (Arm)" Cc: Anshuman Khandual , Matthew Wilcox , linux-mm@kvack.org, usama.arif@linux.dev, hughd@google.com, ryan.roberts@arm.com, Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [PATCH V3] mm: Standardize printing for pgtable entries Message-ID: References: <20260709044334.1741263-1-anshuman.khandual@arm.com> <5ee8783e-4deb-48fc-a4c4-96b02d79a6cb@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo On Mon, Jul 13, 2026 at 11:30:08AM +0200, David Hildenbrand (Arm) wrote: > On 7/13/26 04:37, Anshuman Khandual wrote: > > On 11/07/26 10:28 AM, Matthew Wilcox wrote: > >> On Thu, Jul 09, 2026 at 10:13:34AM +0530, Anshuman Khandual wrote: ... > >>> if (!pgd_present(*pgdp) || pgd_leaf(*pgdp)) { > >>> - pr_alert("pgd:%08llx\n", pgdv); > >>> + pr_alert("pgd:%s\n", pgd_str); > >> > >> Why can't we do this as: > >> > >> pr_alert("pgd:%*phN\n", sizeof(pgdv), &pgdv); > > > > %*phN dumps raw memory bytes and will have different formats on little > > vs big endian platforms which is not desired here. Debug print here is > > expected to report pgtable entry canonical value where various platform > > specific fields can be inspected. > > If we'd want to go that route I guess we'd have to add a new specifier that will > print the pointed number in the size specified by the second argument. We could > start by supporting 8/16/32/64/128 bit only, no weird stuff in between. FWIW, we have hex_dump_to_buffer() for that already. -- With Best Regards, Andy Shevchenko