All of lore.kernel.org
 help / color / mirror / Atom feed
From: deller@kernel.org
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: "Laurent Vivier" <laurent@vivier.eu>,
	"Jiaxun Yang" <jiaxun.yang@flygoat.com>,
	deller@gmx.de, "Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PULL 09/11] linux-user: fixup termios2 related things on PowerPC
Date: Fri, 23 Jan 2026 21:52:28 +0100	[thread overview]
Message-ID: <20260123205230.33541-10-deller@kernel.org> (raw)
In-Reply-To: <20260123205230.33541-1-deller@kernel.org>

From: Icenowy Zheng <uwu@icenowy.me>

The termios things on PowerPC equal to termios2 things otherwhere.

Use some simple #define's to allow both termios and termios2 to map to
termios on PowerPC.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Link: https://github.com/AOSC-Dev/aosc-os-abbs/blob/8d77eeaa76e9b159c3f35adaf73c875751aa7d17/app-virtualization/qemu/01-shared/patches/0005-AOSCOS-linux-user-fixup-termios2-related-things-on-P.patch
Link: https://lore.kernel.org/qemu-devel/4403eb94ddbb2934f1f75d94ce921f0f1078ad9f.camel@icenowy.me
Reviewed-by: Helge Deller <deller@gmx.de>
---
 linux-user/syscall.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 9443eb3a17..64a2f1cbb2 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -148,6 +148,21 @@
 #include "fd-trans.h"
 #include "user/cpu_loop.h"
 
+#if defined(__powerpc__)
+/*
+ * On PowerPC termios2 is lacking and termios along with ioctls w/o 2
+ * behaves like termios2 and things with 2 on other architectures.
+ *
+ * Just define termios2-related things to be the same with termios-related
+ * ones to support PowerPC.
+ */
+#define host_termios2 host_termios
+#define TCGETS2 TCGETS
+#define TCSETS2 TCSETS
+#define TCSETSW2 TCSETSW
+#define TCSETSF2 TCSETSF
+#endif
+
 #ifndef CLONE_IO
 #define CLONE_IO                0x80000000      /* Clone io context */
 #endif
-- 
2.52.0



  parent reply	other threads:[~2026-01-23 20:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-23 20:52 [PULL 00/11] Linux user for v11 patches deller
2026-01-23 20:52 ` [PULL 01/11] linux-user: update statx emulation deller
2026-01-23 20:52 ` [PULL 02/11] linux-user: Add termios2 support deller
2026-01-23 20:52 ` [PULL 03/11] linux-user: Add termios2 support to alpha target deller
2026-01-23 20:52 ` [PULL 04/11] linux-user: Add termios2 support to hppa target deller
2026-01-23 20:52 ` [PULL 05/11] linux-user: Add termios2 support to mips target deller
2026-01-23 20:52 ` [PULL 06/11] linux-user: Add termios2 support to sh4 target deller
2026-01-23 20:52 ` [PULL 07/11] linux-user: Add termios2 support to sparc target deller
2026-01-23 20:52 ` [PULL 08/11] linux-user: Add missing termios baud rates deller
2026-01-23 20:52 ` deller [this message]
2026-01-23 20:52 ` [PULL 10/11] linux-user: strace: Fix 5th argument of futex syscall deller
2026-01-23 20:52 ` [PULL 11/11] linux-user: Fix MADV_XXX constants on hppa target deller
2026-01-24  0:56   ` Richard Henderson

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=20260123205230.33541-10-deller@kernel.org \
    --to=deller@kernel.org \
    --cc=deller@gmx.de \
    --cc=jiaxun.yang@flygoat.com \
    --cc=laurent@vivier.eu \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.