From nobody Sun Apr 6 01:58:08 2025 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=1736371049; cv=none; d=zohomail.com; s=zohoarc; b=Y7ko6U0ENMmxyWSTbm9Hvd/Ptj6mzkq4s55seCEEuAO8FBy64k72c+umPro1IHgGO/iP8a/Uh28kvCS/m0//u1iN8T1mkYFh59aQriWWbfgr8s11NTICxylL9TVM7tcYmOQfPuhaGjxiO2NQksF02/506DCDA7/ezKH/v53ATGg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1736371049; h=Content-Type:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=QD2gb077zj/9nFBVxpKNr1MS1G76uyKB1D/gcqFIqgo=; b=JzGgVxc5J8ZUzHzxail+VEwDysB8Apku/Bc2K7/ag0e3Jm0e2vOrlfiBQgHukx5d4mzb6fAqPmNLYMf7PKIuafkmixgjx0rFNFy92an4bwsFLPQJD2ouH4VoIQbbQ4QFqijPSXWpZdz+Pm3Y4eYndXF8+ZlWSOm4yw/xasClUY8= 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 1736371049093551.547612144677; Wed, 8 Jan 2025 13:17:29 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVdPz-0008Td-80; Wed, 08 Jan 2025 16:16:47 -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 1tVdPy-0008TV-31 for qemu-devel@nongnu.org; Wed, 08 Jan 2025 16:16:46 -0500 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tVdPw-0002Vz-79 for qemu-devel@nongnu.org; Wed, 08 Jan 2025 16:16:45 -0500 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 4D4895C5694; Wed, 8 Jan 2025 21:15:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30991C4CED3; Wed, 8 Jan 2025 21:16:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1736370995; bh=I7GRQFr384582pMoul1vLbgXHyoJtm1fafNIJKxg0T4=; h=Date:From:To:Subject:From; b=sEIwYTvAromNEIurvxQLPtaF235kDj29YRgUckiVKawphfaVeAFaLdw4QRDs0T5IL xmfB3jzV6vKhpP7kWHoPCN0y8VcvXHZbFrqUE3mXpnNKka/SpFIIGe1JdLCskVaDHA 0pR1cS/4g0aqxFranyRYGTzrgYyC6cClCrh3pun06doDwQYaBrII5LAlf0H4GbcC// eaoYfd7K4sue8jPu5wpv2fIsGbGOWEpK3qH340bo16vau+5ZmGbegqzL7S8JO0mddR JYwWgQoDAJoKc6spH0l/8A1l3A9AUbGw+8WWrPjkU9mrytvWjxI5DSQKdZCowE9jHP 3jUA/xiUQnEDg== Date: Wed, 8 Jan 2025 22:16:31 +0100 From: Helge Deller To: Laurent Vivier , qemu-devel@nongnu.org Subject: [PATCH] linux-user: Add missing /proc/cpuinfo fields for sparc Message-ID: MIME-Version: 1.0 Content-Disposition: inline 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=2604:1380:4641:c500::1; envelope-from=deller@kernel.org; helo=dfw.source.kernel.org X-Spam_score_int: -47 X-Spam_score: -4.8 X-Spam_bar: ---- X-Spam_report: (-4.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.432, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @kernel.org) X-ZM-MESSAGEID: 1736371050027116600 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add some missing fields which may be parsed by userspace applications. Signed-off-by: Helge Deller diff --git a/linux-user/sparc/target_proc.h b/linux-user/sparc/target_proc.h index 3bb3134a47..172d089fed 100644 --- a/linux-user/sparc/target_proc.h +++ b/linux-user/sparc/target_proc.h @@ -8,7 +8,23 @@ =20 static int open_cpuinfo(CPUArchState *cpu_env, int fd) { + int i, num_cpus; + + num_cpus =3D sysconf(_SC_NPROCESSORS_ONLN); + + dprintf(fd, "cpu\t\t: TI UltraSparc II QEMU (BlackBird)\n"); + dprintf(fd, "fpu\t\t: UltraSparc II integrated FPU\n"); + dprintf(fd, "promlib\t\t: Version 3 Revision 17\n"); + dprintf(fd, "prom\t\t: 3.17.0\n"); dprintf(fd, "type\t\t: sun4u\n"); + dprintf(fd, "ncpus probed\t: %d\n", num_cpus); + dprintf(fd, "ncpus active\t: %d\n", num_cpus); + dprintf(fd, "MMU Type\t: Spitfire\n"); + dprintf(fd, "State:\n"); + for (i =3D 0; i < num_cpus; i++) { + dprintf(fd, "CPU%d:\t\t: online\n", i); + } + return 0; } #define HAVE_ARCH_PROC_CPUINFO