From patchwork Tue Jun 17 14:56:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 32041 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 0FE3F206A0 for ; Tue, 17 Jun 2014 15:02:27 +0000 (UTC) Received: by mail-pd0-f197.google.com with SMTP id fp1sf10629531pdb.8 for ; Tue, 17 Jun 2014 08:02:27 -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: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=P0hWwsuItf+96MwmEzI4GGwUxoXEU/0iqZUShWEdLSLGxfU6YugcbqVmghHYagrbfk sR7hAwLvwR5RSKQgyqN4d0X5V4ncmE+UwDmlPslXNiEwXkZ5WAsRnlW1RDL6SVJXkQjb 5r8tvbjSjvUFZyGs1aENGVaiIt6QyieY3lNETKPCT+7Wcefn5GssQYJFIeOLVibK0jXY kuYXn6bh0qjNiMrDjpVOtcOVkCf9JcvA3xYM2GlGLeibmNrXyJYmUXuG9mtIt8ghtsPY 82T+sC2VgHpjm0dR8wezKhuDFfGzyaNugXRJ/5zM1tOwdNhuPxSyb6rDcF8/BYNLYnDj craQ== X-Gm-Message-State: ALoCoQnS0AlRWrDEDchl3gukthrshmd0dBQLkPd9LNTbznykMLp+yL2YY+eT7+TBQnV4JDQm4Wed X-Received: by 10.66.216.130 with SMTP id oq2mr3500263pac.44.1403017347305; Tue, 17 Jun 2014 08:02:27 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.49.130 with SMTP id q2ls4986234qga.91.gmail; Tue, 17 Jun 2014 08:02:27 -0700 (PDT) X-Received: by 10.53.2.129 with SMTP id bo1mr671540vdd.77.1403017347091; Tue, 17 Jun 2014 08:02:27 -0700 (PDT) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by mx.google.com with ESMTPS id tf2si5571241vcb.77.2014.06.17.08.02.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Jun 2014 08:02:27 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.173 as permitted sender) client-ip=209.85.128.173; Received: by mail-ve0-f173.google.com with SMTP id db11so7668824veb.18 for ; Tue, 17 Jun 2014 08:02:27 -0700 (PDT) X-Received: by 10.220.44.141 with SMTP id a13mr815433vcf.71.1403017347025; Tue, 17 Jun 2014 08:02:27 -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 vs6csp216024vcb; Tue, 17 Jun 2014 08:02:26 -0700 (PDT) X-Received: by 10.140.24.98 with SMTP id 89mr34852698qgq.33.1403017346430; Tue, 17 Jun 2014 08:02:26 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id f51si3604547qga.6.2014.06.17.08.02.26 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 17 Jun 2014 08:02:26 -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]:51176 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wwuu2-00052r-2s for patch@linaro.org; Tue, 17 Jun 2014 11:02:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wwuoz-0005hW-0G for qemu-devel@nongnu.org; Tue, 17 Jun 2014 10:57:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wwuos-0004QW-9Z for qemu-devel@nongnu.org; Tue, 17 Jun 2014 10:57:12 -0400 Received: from afflict.kos.to ([92.243.29.197]:46244) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wwuos-0004PB-2a for qemu-devel@nongnu.org; Tue, 17 Jun 2014 10:57:06 -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 D60BC26589; Tue, 17 Jun 2014 16:57:03 +0200 (CEST) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Tue, 17 Jun 2014 17:56:57 +0300 Message-Id: <4d13be8b8b817cbca7db2f880628d7ae5b74799f.1403016610.git.riku.voipio@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: 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 v2 14/17] 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.173 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);