From nobody Tue Apr 7 21:27:05 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=1773262627; cv=none; d=zohomail.com; s=zohoarc; b=n5HS9nc+tsCkWdQLGzB772K1LH07pojbTDMqhnO8xnz/lsqE3jAc21gfb4jVg5p1FwQIx/Q8kyapQiQX/vLKMsLCuu9+YMldYC1k7if5ChfzQ4zHAs96sMHJxHH4s6WpaxHYK8XpPh5psfZ82MSer3Lr76NlLrfEnfqGxay0LsE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773262627; 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=TqAJGj0xyBk/Iw5ZLvLAJZp7SAQ/yDW+tqGEjH0ylEXpNyFFVNre7wI51i/W40eogRsK1x2eQDjbjC+srFhpL6k3t0zRLbqFlz1PPElH6RnQ25AGjucj9y0eBfbVbfftJRXyCKjc+FTJsERGjfjQ5P61/8FeKJvz2yuHCeoaLd8= 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 1773262626628936.6520558184648; Wed, 11 Mar 2026 13:57:06 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w0Qat-0003r6-IE; Wed, 11 Mar 2026 16:55: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 1w0Qao-0003lD-FE; Wed, 11 Mar 2026 16:55:46 -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 1w0Qal-0008FI-CF; Wed, 11 Mar 2026 16:55:46 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 0E7561921F2; Wed, 11 Mar 2026 23:54:29 +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 6B59637C4D7; Wed, 11 Mar 2026 23:55:07 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tls.msk.ru; s=202602; t=1773262469; bh=AcNMYIFDrEN54FI0tN/yss+Qg87nVMQ2Wyhg1uY/8v4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=R/RpijkIDUEzvztXohHh74cU22bDDulRaPK5OTLZtkswPXyz7UD4D0W31/KyLmVNw KYMxca1VodUoo5OaSODRmwDlfwQdO94FOzLQNuHnAIyi18ZTLtSz3BRe9d6KjyRRZv 5iVKPt3shNIPb2wZOq4l9imSIsA5MbuRZ8II7RSvGPwBlL+p3TTI2OwzvliTITX09U 5Yim/H0PV1xqPx0k7bR3QbutuJHfQfFXcrF0+h91IqZTNIRtH12U9hW011gAQhuA+V lI0cuWqfgxsWjWZE6AH6/aNiRGZB6dMKxiksTZTO7vXnAoUfs4fvK56TR4jmFGxv/d bapG7oELG7gsw== From: Michael Tokarev To: qemu-devel@nongnu.org Cc: Michael Tokarev , qemu-trivial@nongnu.org, Richard Henderson Subject: [PATCH trivial v2 5/7] linux-user: assume epoll is always present Date: Wed, 11 Mar 2026 23:54:53 +0300 Message-ID: <20260311205459.1101023-6-mjt@tls.msk.ru> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260311205459.1101023-1-mjt@tls.msk.ru> References: <20260311205459.1101023-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: 1773262627911158500 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