[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <76b8174e-3c4c-4db4-83d0-aa8d241c7afe@intel.com>
Date: Mon, 24 Feb 2025 09:59:23 -0800
From: Dave Hansen <dave.hansen@...el.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
linux-kernel@...r.kernel.org
Cc: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>,
kernel test robot <lkp@...el.com>
Subject: Re: [PATCH v1 1/1] x86/mm: Check if PTRS_PER_PMD is defined before
use
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.
Powered by blists - more mailing lists