Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Anshuman Khandual <anshuman.khandual@arm.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-mm@kvack.org, usama.arif@linux.dev, hughd@google.com,
	willy@infradead.org, ryan.roberts@arm.com,
	"David Hildenbrand (Arm)" <david@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2] mm: Standardize printing for pgtable entries
Date: Thu, 9 Jul 2026 09:12:54 +0530	[thread overview]
Message-ID: <40f1a8be-a6a3-4b6b-bab3-e27b16b52983@arm.com> (raw)
In-Reply-To: <ak4xw2JwyZk3uTPI@ashevche-desk.local>



On 08/07/26 4:47 PM, Andy Shevchenko wrote:
> On Wed, Jul 08, 2026 at 08:58:23AM +0530, Anshuman Khandual wrote:
> 
>> Bad page map reporting currently stores page table entry values in an
>> unsigned long long and prints them with fixed 64-bit-oriented format
>> strings. This is inconsistent across call sites and does not work well for
>> architectures where page table entry values are not naturally represented
>> as 64-bit values, such as 32-bit or 128-bit entries.
>>
>> Introduce a common helper to convert raw page table entry values into a
>> fixed-width hexadecimal string based on the actual entry size. Use it for
>> bad page map reporting and for dumping the page table walk in
>> __print_bad_page_map_pgtable().
>>
>> Pass page table entry values to the reporting path as raw bytes together
>> with their size, instead of forcing them through an unsigned long long.
>> It keeps the printed output consistent and avoids truncation or misleading
>> formatting for non-64-bit page table entries.
> 
> Why do you still use __auto_* instead of 'auto'?
> Please, see the comment in compiler_types.h about this.

/*
 * C23 introduces "auto" as a standard way to define type-inferred
 * variables, but "auto" has been a (useless) keyword even since K&R C,
 * so it has always been "namespace reserved."
 *
 * Until at some future time we require C23 support, we need the gcc
 * extension __auto_type, but there is no reason to put that elsewhere
 * in the source code.
 */
#if __STDC_VERSION__ < 202311L
# define auto __auto_type
#endif

Alright 'auto' could be used for toolschain both before and after C23.
Will do the replacement s/__auto_type/auto


  reply	other threads:[~2026-07-09  3:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-08  3:28 [PATCH V2] mm: Standardize printing for pgtable entries Anshuman Khandual
2026-07-08  8:01 ` David Hildenbrand (Arm)
2026-07-08  8:43   ` Anshuman Khandual
2026-07-08  8:52     ` David Hildenbrand (Arm)
2026-07-08 11:17 ` Andy Shevchenko
2026-07-09  3:42   ` Anshuman Khandual [this message]
2026-07-08 11:22 ` Ryan Roberts
2026-07-08 11:27   ` David Hildenbrand (Arm)
2026-07-08 12:43     ` Ryan Roberts
2026-07-08 12:58       ` David Hildenbrand (Arm)
2026-07-09  3:54         ` Anshuman Khandual

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40f1a8be-a6a3-4b6b-bab3-e27b16b52983@arm.com \
    --to=anshuman.khandual@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=david@kernel.org \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ryan.roberts@arm.com \
    --cc=usama.arif@linux.dev \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox