From: Anshuman Khandual <anshuman.khandual@arm.com>
To: linux-mm@kvack.org
Cc: Anshuman Khandual <anshuman.khandual@arm.com>,
Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@redhat.com>,
Ryan Roberts <ryan.roberts@arm.com>,
"Mike Rapoport (IBM)" <rppt@kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
x86@kernel.org, linux-m68k@lists.linux-m68k.org,
linux-fsdevel@vger.kernel.org, kasan-dev@googlegroups.com,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>
Subject: [PATCH V2 2/7] x86/mm: Drop page table entry address output from pxd_ERROR()
Date: Tue, 17 Sep 2024 13:01:12 +0530 [thread overview]
Message-ID: <20240917073117.1531207-3-anshuman.khandual@arm.com> (raw)
In-Reply-To: <20240917073117.1531207-1-anshuman.khandual@arm.com>
This drops page table entry address output from all pxd_ERROR() definitions
which now matches with other architectures. This also prevents build issues
while transitioning into pxdp_get() based page table entry accesses.
The mentioned build error is caused with changed macros pxd_ERROR() ends up
doing &pxdp_get(pxd) which does not make sense and generates "error: lvalue
required as unary '&' operand" warning.
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: x86@kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
arch/x86/include/asm/pgtable-3level.h | 12 ++++++------
arch/x86/include/asm/pgtable_64.h | 20 ++++++++++----------
2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/arch/x86/include/asm/pgtable-3level.h b/arch/x86/include/asm/pgtable-3level.h
index dabafba957ea..e1fa4dd87753 100644
--- a/arch/x86/include/asm/pgtable-3level.h
+++ b/arch/x86/include/asm/pgtable-3level.h
@@ -10,14 +10,14 @@
*/
#define pte_ERROR(e) \
- pr_err("%s:%d: bad pte %p(%08lx%08lx)\n", \
- __FILE__, __LINE__, &(e), (e).pte_high, (e).pte_low)
+ pr_err("%s:%d: bad pte (%08lx%08lx)\n", \
+ __FILE__, __LINE__, (e).pte_high, (e).pte_low)
#define pmd_ERROR(e) \
- pr_err("%s:%d: bad pmd %p(%016Lx)\n", \
- __FILE__, __LINE__, &(e), pmd_val(e))
+ pr_err("%s:%d: bad pmd (%016Lx)\n", \
+ __FILE__, __LINE__, pmd_val(e))
#define pgd_ERROR(e) \
- pr_err("%s:%d: bad pgd %p(%016Lx)\n", \
- __FILE__, __LINE__, &(e), pgd_val(e))
+ pr_err("%s:%d: bad pgd (%016Lx)\n", \
+ __FILE__, __LINE__, pgd_val(e))
#define pxx_xchg64(_pxx, _ptr, _val) ({ \
_pxx##val_t *_p = (_pxx##val_t *)_ptr; \
diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h
index 3c4407271d08..4e462c825cab 100644
--- a/arch/x86/include/asm/pgtable_64.h
+++ b/arch/x86/include/asm/pgtable_64.h
@@ -32,24 +32,24 @@ extern void paging_init(void);
static inline void sync_initial_page_table(void) { }
#define pte_ERROR(e) \
- pr_err("%s:%d: bad pte %p(%016lx)\n", \
- __FILE__, __LINE__, &(e), pte_val(e))
+ pr_err("%s:%d: bad pte (%016lx)\n", \
+ __FILE__, __LINE__, pte_val(e))
#define pmd_ERROR(e) \
- pr_err("%s:%d: bad pmd %p(%016lx)\n", \
- __FILE__, __LINE__, &(e), pmd_val(e))
+ pr_err("%s:%d: bad pmd (%016lx)\n", \
+ __FILE__, __LINE__, pmd_val(e))
#define pud_ERROR(e) \
- pr_err("%s:%d: bad pud %p(%016lx)\n", \
- __FILE__, __LINE__, &(e), pud_val(e))
+ pr_err("%s:%d: bad pud (%016lx)\n", \
+ __FILE__, __LINE__, pud_val(e))
#if CONFIG_PGTABLE_LEVELS >= 5
#define p4d_ERROR(e) \
- pr_err("%s:%d: bad p4d %p(%016lx)\n", \
- __FILE__, __LINE__, &(e), p4d_val(e))
+ pr_err("%s:%d: bad p4d (%016lx)\n", \
+ __FILE__, __LINE__, p4d_val(e))
#endif
#define pgd_ERROR(e) \
- pr_err("%s:%d: bad pgd %p(%016lx)\n", \
- __FILE__, __LINE__, &(e), pgd_val(e))
+ pr_err("%s:%d: bad pgd (%016lx)\n", \
+ __FILE__, __LINE__, pgd_val(e))
struct mm_struct;
--
2.25.1
next prev parent reply other threads:[~2024-09-17 7:31 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-17 7:31 [PATCH V2 0/7] mm: Use pxdp_get() for accessing page table entries Anshuman Khandual
2024-09-17 7:31 ` [PATCH V2 1/7] m68k/mm: Change pmd_val() Anshuman Khandual
2024-09-17 8:40 ` Ryan Roberts
2024-09-17 10:20 ` David Hildenbrand
2024-09-17 10:27 ` Ryan Roberts
2024-09-17 10:30 ` David Hildenbrand
2024-09-17 7:31 ` Anshuman Khandual [this message]
2024-09-17 10:22 ` [PATCH V2 2/7] x86/mm: Drop page table entry address output from pxd_ERROR() David Hildenbrand
2024-09-17 11:19 ` Dave Hansen
2024-09-17 11:25 ` Anshuman Khandual
2024-09-17 11:31 ` David Hildenbrand
2024-09-17 7:31 ` [PATCH V2 3/7] mm: Use ptep_get() for accessing PTE entries Anshuman Khandual
2024-09-17 8:44 ` Ryan Roberts
2024-09-17 10:28 ` David Hildenbrand
2024-09-18 6:32 ` Anshuman Khandual
2024-09-19 8:04 ` David Hildenbrand
2024-09-19 9:20 ` Anshuman Khandual
2024-09-17 7:31 ` [PATCH V2 4/7] mm: Use pmdp_get() for accessing PMD entries Anshuman Khandual
2024-09-17 10:05 ` Ryan Roberts
2024-09-18 18:57 ` kernel test robot
2024-09-19 7:21 ` Anshuman Khandual
2024-09-18 19:07 ` kernel test robot
2024-09-19 7:12 ` Anshuman Khandual
2024-09-17 7:31 ` [PATCH V2 5/7] mm: Use pudp_get() for accessing PUD entries Anshuman Khandual
2024-09-17 7:31 ` [PATCH V2 6/7] mm: Use p4dp_get() for accessing P4D entries Anshuman Khandual
2024-09-17 7:31 ` [PATCH V2 7/7] mm: Use pgdp_get() for accessing PGD entries Anshuman Khandual
2024-09-18 20:30 ` kernel test robot
2024-09-19 7:55 ` Anshuman Khandual
2024-09-19 9:11 ` Russell King (Oracle)
2024-09-19 15:48 ` Ryan Roberts
2024-09-19 17:06 ` Russell King (Oracle)
2024-09-19 17:49 ` Ryan Roberts
2024-09-19 20:25 ` Russell King (Oracle)
2024-09-20 6:57 ` Ryan Roberts
2024-09-20 9:47 ` Russell King (Oracle)
2024-09-23 15:21 ` Ryan Roberts
2024-09-25 10:05 ` [PATCH V2 0/7] mm: Use pxdp_get() for accessing page table entries Christophe Leroy
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=20240917073117.1531207-3-anshuman.khandual@arm.com \
--to=anshuman.khandual@arm.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=david@redhat.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-mm@kvack.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rppt@kernel.org \
--cc=ryan.roberts@arm.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;
as well as URLs for NNTP newsgroup(s).