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: 31563 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f71.google.com (mail-oa0-f71.google.com [209.85.219.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 05CAB20675 for ; Mon, 9 Jun 2014 13:14:06 +0000 (UTC) Received: by mail-oa0-f71.google.com with SMTP id m1sf36006603oag.10 for ; Mon, 09 Jun 2014 06:14:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=ZHpld8DtXUNktETq/NoknBjZrb1QB+UHBjOtD4I/J+I=; b=SeElM5YWaaVmRNWzgqy9BGRqPxJoMf4sKX9h0lrn71AYQuh2NOhzlZce1hQPoCO4EA Dv1JW9GQdu/vzWPq8RbtxchvyXeJ7+hYqfxXH0eRa8APm0vd/vi2ryh9pHcBGcllFUXZ 9NQ2C0kBRC6VYKdR/f+4/rXlm3kVMrPOfFSbcFmZr0joz7a68KXRIN8Eggwm490SldMW LFlKn5sbF4XLRkxMbQOFqFvKJje+Uz4hH6mvIzu4Dz2zQmacdQPxR3hMNvkmw+yZxtdJ zUL2nRXne7M6IV0Q455sSguVpySjn30SYBeU1JCkcpcVlhqF+MJbYrIgSnYhAuaPkSIP m+qw== X-Gm-Message-State: ALoCoQmMBISoy/uhw1WDEYAxZ9VGXAIFXsq4OlJOFxCd8Dc345b95BKawEAWOD6KjFmy8Hh7X+sD X-Received: by 10.182.106.229 with SMTP id gx5mr13032168obb.31.1402319646608; Mon, 09 Jun 2014 06:14:06 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.32.67 with SMTP id g61ls1625266qgg.12.gmail; Mon, 09 Jun 2014 06:14:06 -0700 (PDT) X-Received: by 10.52.164.237 with SMTP id yt13mr21798822vdb.18.1402319646431; Mon, 09 Jun 2014 06:14:06 -0700 (PDT) Received: from mail-ve0-f174.google.com (mail-ve0-f174.google.com [209.85.128.174]) by mx.google.com with ESMTPS id o10si11836264vdo.29.2014.06.09.06.14.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 09 Jun 2014 06:14:06 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.174 as permitted sender) client-ip=209.85.128.174; Received: by mail-ve0-f174.google.com with SMTP id us18so4315267veb.19 for ; Mon, 09 Jun 2014 06:14:06 -0700 (PDT) X-Received: by 10.58.185.165 with SMTP id fd5mr23914392vec.41.1402319646323; Mon, 09 Jun 2014 06:14:06 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp145042vcb; Mon, 9 Jun 2014 06:14:06 -0700 (PDT) X-Received: by 10.140.51.172 with SMTP id u41mr30485376qga.69.1402319645683; Mon, 09 Jun 2014 06:14:05 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id p16si23607708qax.121.2014.06.09.06.14.05 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 09 Jun 2014 06:14:05 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:60923 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wtz6n-0001yd-5T for patch@linaro.org; Mon, 09 Jun 2014 08:55:29 -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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: riku.voipio@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.174 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 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);