public inbox for linux-parisc@vger.kernel.org
 help / color / mirror / Atom feed
From: Helge Deller <deller@kernel.org>
To: linux-parisc@vger.kernel.org
Subject: [PATCH 1/5] parisc: Avoid compat syscalls when COMPAT=n
Date: Wed,  8 Apr 2026 00:27:10 +0200	[thread overview]
Message-ID: <20260407222714.178861-1-deller@kernel.org> (raw)

From: Helge Deller <deller@gmx.de>

Drop unnecessary code and syscall tables when we run a 64-bit
kernel with conpat mode disabled.

Signed-off-by: Helge Deller <deller@gmx.de>
---
 arch/parisc/kernel/syscall.S | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S
index f58c4bccfbce..bc5421ca537f 100644
--- a/arch/parisc/kernel/syscall.S
+++ b/arch/parisc/kernel/syscall.S
@@ -241,7 +241,7 @@ linux_gateway_entry:
 	/* Note!  We cannot use the syscall table that is mapped
 	nearby since the gateway page is mapped execute-only. */
 
-#ifdef CONFIG_64BIT
+#if defined(CONFIG_64BIT) && defined(CONFIG_COMPAT)
 	ldil	L%sys_call_table, %r1
 	or,ev	%r2,%r2,%r2
 	ldil	L%sys_call_table64, %r1
@@ -250,7 +250,7 @@ linux_gateway_entry:
 	ldo	R%sys_call_table64(%r1), %r19
 #else
 	load32	sys_call_table, %r19
-#endif	
+#endif
 	comiclr,>>	__NR_Linux_syscalls, %r20, %r0
 	b,n	.Lsyscall_nosys
 	
@@ -374,7 +374,7 @@ tracesys_next:
 	/* Note!  We cannot use the syscall table that is mapped
 	nearby since the gateway page is mapped execute-only. */
 
-#ifdef CONFIG_64BIT
+#if defined(CONFIG_64BIT) && defined(CONFIG_COMPAT)
 	LDREG	TASK_PT_GR30(%r1), %r19		/* get users sp back */
 	extrd,u	%r19,63,1,%r2			/* W hidden in bottom bit */
 
@@ -1326,16 +1326,19 @@ ENTRY(lws_table)
 END(lws_table)
 	/* End of lws table */
 
-#ifdef CONFIG_64BIT
+#ifdef CONFIG_COMPAT
 #define __SYSCALL_WITH_COMPAT(nr, native, compat)	__SYSCALL(nr, compat)
 #else
 #define __SYSCALL_WITH_COMPAT(nr, native, compat)	__SYSCALL(nr, native)
 #endif
 #define __SYSCALL(nr, entry)	ASM_ULONG_INSN entry
+
 	.align 8
 ENTRY(sys_call_table)
 	.export sys_call_table,data
+#if defined(CONFIG_COMPAT) || !defined(CONFIG_64BIT)
 #include <asm/syscall_table_32.h>    /* 32-bit syscalls */
+#endif
 END(sys_call_table)
 
 #ifdef CONFIG_64BIT
-- 
2.53.0


             reply	other threads:[~2026-04-07 22:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-07 22:27 Helge Deller [this message]
2026-04-07 22:27 ` [PATCH 2/5] parisc: let is_compat_task() return false for COMPAT=n Helge Deller
2026-04-07 22:27 ` [PATCH 3/5] parisc: Fix signal code to depend on CONFIG_COMPAT instead of CONFIG_64BIT Helge Deller
2026-04-07 22:27 ` [PATCH 4/5] parisc: Fix default stack size when COMPAT=n Helge Deller
2026-04-07 22:27 ` [PATCH 5/5] parisc: Allow to disable COMPAT mode on 64-bit kernel Helge Deller
2026-04-08 15:22 ` [PATCH 1/5] parisc: Avoid compat syscalls when COMPAT=n Thomas Weißschuh
2026-04-08 15:40   ` Helge Deller
2026-04-08 17:42 ` Mikulas Patocka
2026-04-08 18:15   ` Helge Deller
2026-04-08 19:47     ` John David Anglin

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=20260407222714.178861-1-deller@kernel.org \
    --to=deller@kernel.org \
    --cc=linux-parisc@vger.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