From nobody Tue Apr 7 06:15:58 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1773645100; cv=none; d=zohomail.com; s=zohoarc; b=Gp1gc9NawQ/V4wlv5ym1Ep/GFekolfpb+8cdr9DXpL/Tlu32M3Q0P1AuAVy6JE9Txh5Wy725USYGd1eyQk9UPbOWXGDcL2NsvOpoxbKYlssB8xS3Q2YOuLR84T/zkji9MNW6BJPPzfWoFb8QHWnbYUrcluGMAsp642GpbhJZh1g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773645100; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=2qVl7QEYj/cG67w4WMpHzKvP3d45+BfryP7DmZUj8Wk=; b=L2HldhjZGXBGIUmtV+GSBMYZ64DrsGI/Xw6/lk/BRUHwiTLgE4eMWSYgwu+PmG8QJulh1YYQCjbMqkmmHVVHY9dvXPgCAYmZY9jtMxQP16YupDO1oACAqCGSlJs2PUGsTszgKMYtY+9MfJgeSPxc7JmkVUOf+TQjEojiYDPR+OU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773645100387793.2078296120274; Mon, 16 Mar 2026 00:11:40 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w226a-00087x-FD; Mon, 16 Mar 2026 03:11:12 -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 1w2269-0007bO-WD; Mon, 16 Mar 2026 03:10:47 -0400 Received: from isrv.corpit.ru ([212.248.84.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2268-0007oI-37; Mon, 16 Mar 2026 03:10:45 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 2E9A9193C2E; Mon, 16 Mar 2026 10:10:03 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 38932380056; Mon, 16 Mar 2026 10:10:06 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tls.msk.ru; s=202602; t=1773645003; bh=AcNMYIFDrEN54FI0tN/yss+Qg87nVMQ2Wyhg1uY/8v4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=fTUFqLYZeTdXsf/bbzvYejIBTF22JvNTowKf6F2sLkqxZonUPxP5S6UhQuSgLtJM7 /289IUYXOfse1Ry7R3omMbVsEr/SPOCHP0UDrEsidd1IfaIvatHbfe5D7hI2FO/8VA ylg1mT52VptGKH/+DvMKV0xBZXb6B6wPtFfxrypTSK5bKtdJSLGEJGYTflzPInxqup vF5dn5+s6gMzlmY+5yHTf2Eem8E6L0gSVHFXWADZ/VJH6r4//KWVETZ0G7/87bHael HsE7pipG1zIjXqiSCsq71DKIq0mjceBagUs+qH9BbCnxwRO6Npr0bRJWyS+AYwYpb9 wxjgPtn7xavNA== From: Michael Tokarev To: qemu-devel@nongnu.org Cc: Michael Tokarev , qemu-trivial@nongnu.org Subject: [PULL 12/14] linux-user: assume epoll is always present Date: Mon, 16 Mar 2026 10:10:00 +0300 Message-ID: <20260316071005.91624-13-mjt@tls.msk.ru> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260316071005.91624-1-mjt@tls.msk.ru> References: <20260316071005.91624-1-mjt@tls.msk.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=212.248.84.144; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -2 X-Spam_score: -0.3 X-Spam_bar: / X-Spam_report: (-0.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @tls.msk.ru) X-ZM-MESSAGEID: 1773645103012154100 Content-Type: text/plain; charset="utf-8" epoll is in linux since 2.6 (glibc 2.3.2). epoll_init1 has been added in 2.6.27 (glibc 2.9). There's no need to check for its presence, including all other epoll-related syscalls. Modern architectures don't have epoll_create(), only epoll_create1(), so keep conditional around the former. Reviewed-by: Richard Henderson Signed-off-by: Michael Tokarev --- linux-user/syscall.c | 10 ++-------- linux-user/syscall_defs.h | 3 --- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 1f28e7e93f..7832a1aba5 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -73,9 +73,7 @@ #ifdef CONFIG_EVENTFD #include #endif -#ifdef CONFIG_EPOLL #include -#endif #ifdef CONFIG_ATTR #include "qemu/xattr.h" #endif @@ -13732,16 +13730,13 @@ static abi_long do_syscall1(CPUArchState *cpu_env= , int num, abi_long arg1, case TARGET_NR_signalfd: return do_signalfd4(arg1, arg2, 0); #endif -#if defined(CONFIG_EPOLL) + #if defined(TARGET_NR_epoll_create) case TARGET_NR_epoll_create: return get_errno(epoll_create(arg1)); #endif -#if defined(TARGET_NR_epoll_create1) && defined(CONFIG_EPOLL_CREATE1) case TARGET_NR_epoll_create1: return get_errno(epoll_create1(target_to_host_bitmask(arg1, fcntl_= flags_tbl))); -#endif -#if defined(TARGET_NR_epoll_ctl) case TARGET_NR_epoll_ctl: { struct epoll_event ep; @@ -13770,7 +13765,6 @@ static abi_long do_syscall1(CPUArchState *cpu_env, = int num, abi_long arg1, } return get_errno(epoll_ctl(arg1, arg2, arg3, epp)); } -#endif =20 #if defined(TARGET_NR_epoll_wait) case TARGET_NR_epoll_wait: @@ -13856,7 +13850,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, = int num, abi_long arg1, g_free(ep); return ret; } -#endif /* CONFIG_EPOLL */ + #ifdef TARGET_NR_prlimit64 case TARGET_NR_prlimit64: { diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 20d862fd8b..aac8b0c574 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -2595,7 +2595,6 @@ struct target_drm_i915_getparam { #define FUTEX_CLOCK_REALTIME 256 #define FUTEX_CMD_MASK ~(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIM= E) =20 -#ifdef CONFIG_EPOLL #if defined(TARGET_X86_64) #define TARGET_EPOLL_PACKED QEMU_PACKED #else @@ -2616,8 +2615,6 @@ struct target_epoll_event { =20 #define TARGET_EP_MAX_EVENTS (INT_MAX / sizeof(struct target_epoll_event)) =20 -#endif - struct target_ucred { abi_uint pid; abi_uint uid; --=20 2.47.3