From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 53A3BCCF9FE for ; Fri, 31 Oct 2025 13:26:45 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEp8Z-0002fj-Le; Fri, 31 Oct 2025 09:25:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vEp8X-0002bk-Md for qemu-devel@nongnu.org; Fri, 31 Oct 2025 09:25:49 -0400 Received: from bonnix2.bonnix.it ([37.247.49.194]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEp8T-00059b-Bs for qemu-devel@nongnu.org; Fri, 31 Oct 2025 09:25:49 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 bonnix2.bonnix.it 697872647C9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bonslack.org; s=20220805; t=1761917134; bh=W2OJ0ZEIDcjr8mzDjx17aPHBir+oW8a924GEtx8MvQo=; h=Date:From:Subject:To:Cc; b=eXaaveWY8zsDgmxdv5M8kT70wfkO5Kfzlx3lyugnSkFoasia033yhf3GCaL+lyYxS I+fRnBmwsmlPRHHff6gAb/f82/k4AR0YEmUmVWhAdmMiymOaPA6U91k7IzcCt8E/an 2OY/clkLUTzkMSroHTjONe1aklg1gOMaRnp73qiY= Received: from [10.0.0.70] (dynamic-adsl-84-220-72-247.clienti.tiscali.it [84.220.72.247]) by bonnix2.bonnix.it (Postfix) with ESMTPSA id 697872647C9; Fri, 31 Oct 2025 14:25:34 +0100 (CET) Message-ID: <361aa9c5-4464-4d27-8a2c-9ab767324530@bonslack.org> Date: Fri, 31 Oct 2025 14:25:34 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Luca Bonissi Subject: [PATCH 4/7] Add termios2 support to mips target To: Richard Henderson , Laurent Vivier Cc: qemu-devel@nongnu.org Content-Language: it Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=37.247.49.194; envelope-from=qemu@bonslack.org; helo=bonnix2.bonnix.it X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org >From aa8e926036177554388e531c7e2422e5fac398c1 Mon Sep 17 00:00:00 2001 From: Luca Bonissi Date: Fri, 31 Oct 2025 13:31:15 +0100 Subject: [PATCH 4/7] Add termios2 support to mips target Signed-off-by: Luca Bonissi --- linux-user/mips/termbits.h | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/linux-user/mips/termbits.h b/linux-user/mips/termbits.h index e8b4b58d87..27610f7c4d 100644 --- a/linux-user/mips/termbits.h +++ b/linux-user/mips/termbits.h @@ -18,6 +18,29 @@ struct target_termios { target_cc_t c_cc[TARGET_NCCS]; /* control characters */ }; +struct target_termios2 { + target_tcflag_t c_iflag; /* input mode flags */ + target_tcflag_t c_oflag; /* output mode flags */ + target_tcflag_t c_cflag; /* control mode flags */ + target_tcflag_t c_lflag; /* local mode flags */ + target_cc_t c_line; /* line discipline */ + target_cc_t c_cc[TARGET_NCCS]; /* control characters */ + target_speed_t c_ispeed; /* input speed */ + target_speed_t c_ospeed; /* output speed */ +}; + +struct target_ktermios { + target_tcflag_t c_iflag; /* input mode flags */ + target_tcflag_t c_oflag; /* output mode flags */ + target_tcflag_t c_cflag; /* control mode flags */ + target_tcflag_t c_lflag; /* local mode flags */ + target_cc_t c_line; /* line discipline */ + target_cc_t c_cc[TARGET_NCCS]; /* control characters */ + target_speed_t c_ispeed; /* input speed */ + target_speed_t c_ospeed; /* output speed */ +}; + + /* c_iflag bits */ #define TARGET_IGNBRK 0000001 #define TARGET_BRKINT 0000002 @@ -227,10 +250,10 @@ struct target_termios { #define TARGET_TIOCSBRK 0x5427 /* BSD compatibility */ #define TARGET_TIOCCBRK 0x5428 /* BSD compatibility */ #define TARGET_TIOCGSID 0x7416 /* Return the session ID of FD */ -#define TARGET_TCGETS2 TARGET_IOR('T', 0x2A, struct termios2) -#define TARGET_TCSETS2 TARGET_IOW('T', 0x2B, struct termios2) -#define TARGET_TCSETSW2 TARGET_IOW('T', 0x2C, struct termios2) -#define TARGET_TCSETSF2 TARGET_IOW('T', 0x2D, struct termios2) +#define TARGET_TCGETS2 TARGET_IOR('T', 0x2A, struct target_termios2) +#define TARGET_TCSETS2 TARGET_IOW('T', 0x2B, struct target_termios2) +#define TARGET_TCSETSW2 TARGET_IOW('T', 0x2C, struct target_termios2) +#define TARGET_TCSETSF2 TARGET_IOW('T', 0x2D, struct target_termios2) #define TARGET_TIOCGRS485 TARGET_IOR('T', 0x2E, struct serial_rs485) #define TARGET_TIOCSRS485 TARGET_IOWR('T', 0x2F, struct serial_rs485) #define TARGET_TIOCGPTN TARGET_IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ -- 2.50.1