From patchwork Sat May 10 11:25:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 29928 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f197.google.com (mail-pd0-f197.google.com [209.85.192.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 747DD202FE for ; Sat, 10 May 2014 11:25:57 +0000 (UTC) Received: by mail-pd0-f197.google.com with SMTP id g10sf21194517pdj.8 for ; Sat, 10 May 2014 04:25:56 -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:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=FZYm12rpcvOV6zIegH3nH/EEq3Bx+W10oKhqQ+lzx/c=; b=ItFn0fSp645raCoz/b2qOmxIJOU6zUOSFRqgf1kvgqUvgKr20dzXr1VySVE4Cm17Ti PBvj5r0mOjP11Qhft2raHWnr1rVw40A4c04yue998A8UV/flNmxVArNlZOfyOMZmrkE/ Sbm4bVjQdgKO6kfsSkrSI3CGLmjBMSpR7BY4nelamsxlnGoAbbZMUIRjEkVQLHA5ZjBJ IpByOy8fP5RyaRuBpPYi+QshnM9/p7gDqLKouJvG+VQw63XPokgx+IVxPLZ0iUtzn4l7 fwKdxtN2LeO3CeCChYEAlxogXq1U6Ax4HT/2lxC6uub7CnmqVTs9+uemAjP4LChrU3Ub LRBw== X-Gm-Message-State: ALoCoQmqrAJvY6dfiaVC3gLSuXDeADo5Tb+w4HL8llzjCIsEWXGvH4n6km6777MIRt4Sr/ZF2jU3 X-Received: by 10.67.4.170 with SMTP id cf10mr5493307pad.31.1399721156354; Sat, 10 May 2014 04:25:56 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.101.247 with SMTP id u110ls680914qge.79.gmail; Sat, 10 May 2014 04:25:56 -0700 (PDT) X-Received: by 10.220.167.2 with SMTP id o2mr13204791vcy.8.1399721156182; Sat, 10 May 2014 04:25:56 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id or7si1170965vcb.61.2014.05.10.04.25.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 10 May 2014 04:25:56 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.175 as permitted sender) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id jw12so6567411veb.34 for ; Sat, 10 May 2014 04:25:56 -0700 (PDT) X-Received: by 10.52.185.105 with SMTP id fb9mr10963996vdc.12.1399721156052; Sat, 10 May 2014 04:25:56 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp49995vcb; Sat, 10 May 2014 04:25:55 -0700 (PDT) X-Received: by 10.180.90.132 with SMTP id bw4mr7313247wib.43.1399721155118; Sat, 10 May 2014 04:25:55 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id ej2si752104wib.118.2014.05.10.04.25.54 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 10 May 2014 04:25:55 -0700 (PDT) Received-SPF: none (google.com: pm215@archaic.org.uk does not designate permitted sender hosts) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1Wj5Pd-0005nJ-EN; Sat, 10 May 2014 12:25:53 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Riku Voipio Subject: [PATCH] linux-user/uname: Return correct uname string for x86_64 Date: Sat, 10 May 2014 12:25:53 +0100 Message-Id: <1399721153-22248-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@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.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 --- 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);