From nobody Sun Jan 25 11:57:34 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; dmarc=pass(p=quarantine dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1769181103; cv=none; d=zohomail.com; s=zohoarc; b=JB1vx0mjDCd0pxt6TQOHu9wexje7Oen9SxAZz8kxES+DmbcRsj0XkoC+fALslfsdrbsGoppJDkHbfC/V4IiDGfjKBzeqRVNZYTBtlChW1+X8vuaRlZ2aDUWTxdaksxqIV4RQA9SZT0sgZnxmYvnh19HyqN9MKZHMOLOMNFq0rF8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769181103; 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=qX/eqP/If/7QDzv8nS9kPksBKpblK7+fz2pbg1BNaQ0=; b=IEO7EMedKBSwtwdbMCCETqLFYYumLdDkKomj4A3/zY4iPtjnXmPEyfwmCPHSZRCMUxsmrgUxR5AwKpm+xHPOUf8N1QwhcU2pFyajaRV9pFO91hUgfqND+dPq85DKHb4oUftLIoQp2okGP8EEFnGgPSeFVxgQsZ8NUuyjR5ujTdM= 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; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769181103528198.259528654002; Fri, 23 Jan 2026 07:11:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vjInm-0007Lh-5P; Fri, 23 Jan 2026 10:10:23 -0500 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 1vjInH-00072e-JC for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:09:52 -0500 Received: from sea.source.kernel.org ([172.234.252.31]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vjInE-0002xQ-P9 for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:09:51 -0500 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id E545443B95; Fri, 23 Jan 2026 15:09:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E55ADC19422; Fri, 23 Jan 2026 15:09:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769180979; bh=eU/gRZpkT9Xv1WWpNiUg1u46/4lFqNWL0BWL6PbrP8c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vmav/WeY9cnMLv/bHnkHbx018GvpzMNiiVaiif+SF785JtCuk+XDmiPXOZuxdkzou QwQ7Oj6EnaEpp9iCFVVtku/vtVMK6GGD3B8y3QT9Tyz3mRRbjIxtjpJxUaZ/1uEl0c qxmMyMuvHxBkhOzFleOWXb1YB/4BHwTf6TpHLgkaI8x/LztYJUF5hkkv1kqbqORfA3 YkIqPeXU7RH5LxsTFFZVXZq1OD/lPrzl+YZZ+ZPiw0UwqByGkan+9GlCkhegaiQprV DuuTxtWt0tZfu+WIQEBupL0X51dj6NXLG2xEp2y5sVGRb0/DAfqJp3p3iIpg1Ijgcf QfSF7nmtmas8w== From: deller@kernel.org To: Laurent Vivier , qemu-devel@nongnu.org Cc: Helge Deller Subject: [PATCH 3/3] linux-user: Fix MADV_XXX constants on hppa target Date: Fri, 23 Jan 2026 16:08:00 +0100 Message-ID: <20260123150921.17891-4-deller@kernel.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260123150921.17891-1-deller@kernel.org> References: <20260123150921.17891-1-deller@kernel.org> 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=172.234.252.31; envelope-from=deller@kernel.org; helo=sea.source.kernel.org X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.079, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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: 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 @kernel.org) X-ZM-MESSAGEID: 1769181104690158500 Content-Type: text/plain; charset="utf-8" From: Helge Deller Older hppa binaries may still use the old MADV_XXX constants for the madivise() syscall. Fix it up in the same manner as it's done in the Linux kernel in the parisc_madvise() function. Signed-off-by: Helge Deller Reviewed-by: Peter Maydell --- linux-user/syscall.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 7cb9de97e9..80f7355ccd 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -12929,6 +12929,20 @@ static abi_long do_syscall1(CPUArchState *cpu_env,= int num, abi_long arg1, =20 #ifdef TARGET_NR_madvise case TARGET_NR_madvise: +#ifdef TARGET_HPPA + /* Emulate old hppa mapping of MADV_xxx constants. */ + switch (arg3) { + case 65: arg3 =3D MADV_MERGEABLE; break; + case 66: arg3 =3D MADV_UNMERGEABLE; break; + case 67: arg3 =3D MADV_HUGEPAGE; break; + case 68: arg3 =3D MADV_NOHUGEPAGE; break; + case 69: arg3 =3D MADV_DONTDUMP; break; + case 70: arg3 =3D MADV_DODUMP; break; + case 71: arg3 =3D MADV_WIPEONFORK; break; + case 72: arg3 =3D MADV_KEEPONFORK; break; + case 73: arg3 =3D MADV_COLLAPSE; break; + } +#endif /* TARGET_HPPA */ return target_madvise(arg1, arg2, arg3); #endif #ifdef TARGET_NR_fcntl64 --=20 2.52.0