From: Dave Hansen <dave.hansen@intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-kernel@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
kernel test robot <lkp@intel.com>
Subject: Re: [PATCH v1 1/1] x86/mm: Check if PTRS_PER_PMD is defined before use
Date: Mon, 24 Feb 2025 09:59:23 -0800 [thread overview]
Message-ID: <76b8174e-3c4c-4db4-83d0-aa8d241c7afe@intel.com> (raw)
In-Reply-To: <20250224173940.219820-1-andriy.shevchenko@linux.intel.com>
On 2/24/25 09:39, Andy Shevchenko wrote:
> Compiler is not happy about PTRS_PER_PMD being undefined
>
> In file included from arch/x86/kernel/head_32.S:29:
> arch/x86/include/asm/pgtable_32.h:59:5: error: "PTRS_PER_PMD" is not defined, evaluates to 0 [-Werror=undef]
> 59 | #if PTRS_PER_PMD > 1
>
> Add a check to make sure PTRS_PER_PMD is defined before use.
Hi Andy,
From reading the "Closes:" link, it appears this is a new issue that
originates from a new compile flag. So it doesn't seem like it's worth
backporting.
Also, the _behavior_ of "#if PTRS_PER_PMD > 1" was fine, right? It
didn't cause the logic to go backwards from what was intended, does it?
This:
https://gcc.gnu.org/onlinedocs/gcc-3.0.2/cpp_4.html
says: "Identifiers that are not macros, which are all considered to be
the number zero."
Which would yield the correct behavior.
So I think this is purely a fix for new warning in new kernels. We
shouldn't need to backport this anywhere at all.
next prev parent reply other threads:[~2025-02-24 17:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-24 17:39 [PATCH v1 1/1] x86/mm: Check if PTRS_PER_PMD is defined before use Andy Shevchenko
2025-02-24 17:59 ` Dave Hansen [this message]
2025-02-24 18:11 ` Andy Shevchenko
2025-02-24 18:37 ` Dave Hansen
2025-02-24 20:36 ` Andy Shevchenko
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=76b8174e-3c4c-4db4-83d0-aa8d241c7afe@intel.com \
--to=dave.hansen@intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.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