From: Petr Pavlu <petr.pavlu@suse.com>
To: Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Peter Huewe <peterhuewe@gmx.de>,
Jarkko Sakkinen <jarkko@kernel.org>,
Luis Chamberlain <mcgrof@kernel.org>,
Petr Pavlu <petr.pavlu@suse.com>,
Daniel Gomez <da.gomez@kernel.org>,
Sami Tolvanen <samitolvanen@google.com>
Cc: Xin Li <xin@zytor.com>, "H. Peter Anvin" <hpa@zytor.com>,
Andy Lutomirski <luto@kernel.org>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Sven Schnelle <svens@linux.ibm.com>,
Janosch Frank <frankja@linux.ibm.com>,
Claudio Imbrenda <imbrenda@linux.ibm.com>,
David Hildenbrand <david@kernel.org>,
Jason Gunthorpe <jgg@ziepe.ca>,
Aaron Tomlin <atomlin@atomlin.com>,
linux-s390@vger.kernel.org, kvm@vger.kernel.org,
linux-integrity@vger.kernel.org, linux-modules@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 4/6] s390: Remove the asm/mmu_context.h include from asm/elf.h
Date: Fri, 11 Sep 2026 16:40:34 +0200 [thread overview]
Message-ID: <20260911-module-include-elf-v2-4-954c732975fb@suse.com> (raw)
In-Reply-To: <20260911-module-include-elf-v2-0-954c732975fb@suse.com>
The asm/mmu_context.h include was added to asm/elf.h by commit 146e4b3c8b92
("[S390] 1K/2K page table pages.") in 2008, when the new macro
elf_read_implies_exec() used disable_noexec() /
current->mm->context.noexec. Commit 043d07084b53 ("[S390] Remove data
execution protection") removed that macro in 2011 and asm/elf.h no longer
needs asm/mmu_context.h.
Several s390 files currently depend on declarations provided indirectly
through asm/elf.h -> asm/mmu_context.h:
* arch/s390/mm/mmap.c: check_asce_limit() -> asm/pgalloc.h,
* arch/s390/kernel/processor.c: enter_lazy_tlb() -> asm/mmu_context.h.
Add the missing includes to these files and remove the asm/mmu_context.h
include from asm/elf.h.
This is a preparatory cleanup for adding the asm/elf.h include in
linux/cpufeature.h, which would otherwise create the following cycle:
linux/pgtable.h -> asm/pgtable.h -> linux/cpufeature.h -> asm/elf.h ->
asm/mmu_context.h -> asm/pgalloc.h -> linux/mm.h -> linux/pgtable.h
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
---
arch/s390/include/asm/elf.h | 1 -
arch/s390/kernel/processor.c | 1 +
arch/s390/mm/mmap.c | 1 +
3 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/s390/include/asm/elf.h b/arch/s390/include/asm/elf.h
index bb63fa4d20bb..e22e3ab25760 100644
--- a/arch/s390/include/asm/elf.h
+++ b/arch/s390/include/asm/elf.h
@@ -170,7 +170,6 @@ typedef s390_fp_regs elf_fpregset_t;
typedef s390_regs elf_gregset_t;
#include <linux/sched/mm.h> /* for task_struct */
-#include <asm/mmu_context.h>
/*
* This is used to ensure we don't load something for the wrong architecture.
diff --git a/arch/s390/kernel/processor.c b/arch/s390/kernel/processor.c
index e33a3eccda56..76b2c7478c6e 100644
--- a/arch/s390/kernel/processor.c
+++ b/arch/s390/kernel/processor.c
@@ -27,6 +27,7 @@
#include <asm/param.h>
#include <asm/sclp.h>
#include <asm/smp.h>
+#include <asm/mmu_context.h>
unsigned long __read_mostly elf_hwcap;
char elf_platform[ELF_PLATFORM_SIZE];
diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c
index ef7bfc87758c..8206f347e00e 100644
--- a/arch/s390/mm/mmap.c
+++ b/arch/s390/mm/mmap.c
@@ -18,6 +18,7 @@
#include <linux/security.h>
#include <linux/hugetlb.h>
#include <asm/elf.h>
+#include <asm/pgalloc.h>
static unsigned long stack_maxrandom_size(void)
{
--
2.55.0
next prev parent reply other threads:[~2026-09-11 14:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-11 14:40 [PATCH v2 0/6] module: Limit ELF includes in linux/module.h to uapi/linux/elf.h Petr Pavlu
2026-09-11 14:40 ` [PATCH v2 1/6] x86: Avoid indirect includes through linux/module.h -> linux/elf.h Petr Pavlu
2026-09-11 14:44 ` sashiko-bot
2026-09-11 14:40 ` [PATCH v2 2/6] s390: " Petr Pavlu
2026-09-11 14:45 ` sashiko-bot
2026-09-11 14:40 ` [PATCH v2 3/6] drivers: Include linux/slab.h for kmalloc() functions Petr Pavlu
2026-09-11 14:44 ` sashiko-bot
2026-09-11 14:40 ` Petr Pavlu [this message]
2026-09-11 14:48 ` [PATCH v2 4/6] s390: Remove the asm/mmu_context.h include from asm/elf.h sashiko-bot
2026-09-11 14:40 ` [PATCH v2 5/6] cpufeature: Include asm/elf.h for ELF_PLATFORM Petr Pavlu
2026-09-11 14:46 ` sashiko-bot
2026-09-11 14:40 ` [PATCH v2 6/6] module: Limit ELF includes in linux/module.h to uapi/linux/elf.h Petr Pavlu
2026-09-11 14:55 ` sashiko-bot
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=20260911-module-include-elf-v2-4-954c732975fb@suse.com \
--to=petr.pavlu@suse.com \
--cc=agordeev@linux.ibm.com \
--cc=atomlin@atomlin.com \
--cc=borntraeger@linux.ibm.com \
--cc=bp@alien8.de \
--cc=da.gomez@kernel.org \
--cc=dave.hansen@linux.intel.com \
--cc=david@kernel.org \
--cc=frankja@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=hpa@zytor.com \
--cc=imbrenda@linux.ibm.com \
--cc=jarkko@kernel.org \
--cc=jgg@ziepe.ca \
--cc=kvm@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mcgrof@kernel.org \
--cc=mingo@redhat.com \
--cc=peterhuewe@gmx.de \
--cc=samitolvanen@google.com \
--cc=svens@linux.ibm.com \
--cc=tglx@kernel.org \
--cc=x86@kernel.org \
--cc=xin@zytor.com \
/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