From patchwork Mon Jun 9 12:46:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 357451 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 9FD31140096 for ; Mon, 9 Jun 2014 22:55:19 +1000 (EST) Received: from localhost ([::1]:60923 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wtz6b-0001yd-Dp for incoming@patchwork.ozlabs.org; Mon, 09 Jun 2014 08:55:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WtyyU-0005cW-K4 for qemu-devel@nongnu.org; Mon, 09 Jun 2014 08:47:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WtyyN-0007iJ-Hf for qemu-devel@nongnu.org; Mon, 09 Jun 2014 08:46:54 -0400 Received: from afflict.kos.to ([92.243.29.197]:40164) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WtyyN-0007hN-A1 for qemu-devel@nongnu.org; Mon, 09 Jun 2014 08:46:47 -0400 Received: from afflict.kos.to (afflict [92.243.29.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by afflict.kos.to (Postfix) with ESMTPSA id 2F7D226589; Mon, 9 Jun 2014 14:46:45 +0200 (CEST) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Mon, 9 Jun 2014 15:46:39 +0300 Message-Id: <3b9bbe8d1836063fb6c8df00671c9c08b2daec18.1402317549.git.riku.voipio@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 92.243.29.197 Cc: peter.maydell@linaro.org Subject: [Qemu-devel] [PULL 14/18] linux-user/uname: Return correct uname string for x86_64 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Peter Maydell We were returning the incorrect uname string (with a hyphen, not an underscore) for x86_64. Fix this by removing the x86_64 special case, since the default "just use UNAME_MACHINE" behaviour suffices. This leaves cpu_to_uname_machine() special cases for only those architectures which need to vary the string based on runtime CPU features. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/uname.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/linux-user/uname.c b/linux-user/uname.c index f5d4c66..1e6560d 100644 --- a/linux-user/uname.c +++ b/linux-user/uname.c @@ -52,9 +52,7 @@ const char *cpu_to_uname_machine(void *cpu_env) /* earliest emulated CPU is ARMv5TE; qemu can emulate the 1026, but not its * Jazelle support */ return "armv5te" utsname_suffix; -#elif defined(TARGET_X86_64) - return "x86-64"; -#elif defined(TARGET_I386) +#elif defined(TARGET_I386) && !defined(TARGET_X86_64) /* see arch/x86/kernel/cpu/bugs.c: check_bugs(), 386, 486, 586, 686 */ CPUState *cpu = ENV_GET_CPU((CPUX86State *)cpu_env); int family = object_property_get_int(OBJECT(cpu), "family", NULL);