From patchwork Thu Sep 10 22:20:47 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 33389 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id 385B3B7043 for ; Fri, 11 Sep 2009 08:25:08 +1000 (EST) Received: from localhost ([127.0.0.1]:52701 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mls4a-0004bB-DW for incoming@patchwork.ozlabs.org; Thu, 10 Sep 2009 18:25:00 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mls3u-0004ZJ-Do for qemu-devel@nongnu.org; Thu, 10 Sep 2009 18:24:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mls3n-0004Nh-IW for qemu-devel@nongnu.org; Thu, 10 Sep 2009 18:24:15 -0400 Received: from [199.232.76.173] (port=40026 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mls3n-0004NU-Cz for qemu-devel@nongnu.org; Thu, 10 Sep 2009 18:24:11 -0400 Received: from tx2ehsobe002.messaging.microsoft.com ([65.55.88.12]:51101 helo=TX2EHSOBE004.bigfish.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.60) (envelope-from ) id 1Mls3m-0001JE-Vc for qemu-devel@nongnu.org; Thu, 10 Sep 2009 18:24:11 -0400 Received: from mail140-tx2-R.bigfish.com (10.9.14.249) by TX2EHSOBE004.bigfish.com (10.9.40.24) with Microsoft SMTP Server id 8.1.340.0; Thu, 10 Sep 2009 22:24:09 +0000 Received: from mail140-tx2 (localhost.localdomain [127.0.0.1]) by mail140-tx2-R.bigfish.com (Postfix) with ESMTP id 72C641950160 for ; Thu, 10 Sep 2009 22:24:09 +0000 (UTC) Received: by mail140-tx2 (MessageSwitch) id 1252621448333089_10864; Thu, 10 Sep 2009 22:24:08 +0000 (UCT) Received: from TX2EHSMHS010.bigfish.com (unknown [10.9.14.236]) by mail140-tx2.bigfish.com (Postfix) with ESMTP id 4E48B9E004E for ; Thu, 10 Sep 2009 22:24:08 +0000 (UTC) Received: from ausb3extmailp02.amd.com (163.181.251.22) by TX2EHSMHS010.bigfish.com (10.9.99.110) with Microsoft SMTP Server (TLS) id 14.0.482.32; Thu, 10 Sep 2009 22:24:07 +0000 Received: from ausb3twp02.amd.com ([163.181.250.38]) by ausb3extmailp02.amd.com (Switch-3.2.7/Switch-3.2.7) with ESMTP id n8AMO3Ku021738 for ; Thu, 10 Sep 2009 17:24:06 -0500 X-WSS-ID: 0KPS0W1-02-O89-02 X-M-MSG: Received: from sausexbh2.amd.com (SAUSEXBH2.amd.com [163.181.22.102]) by ausb3twp02.amd.com (Tumbleweed MailGate 3.7.0) with ESMTP id 2DC34C850A for ; Thu, 10 Sep 2009 17:24:01 -0500 (CDT) Received: from sausexmb4.amd.com ([163.181.3.15]) by sausexbh2.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 10 Sep 2009 17:24:02 -0500 Received: from SDRSEXMB1.amd.com ([172.20.3.116]) by sausexmb4.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 10 Sep 2009 17:24:02 -0500 Received: from localhost.localdomain ([165.204.15.42]) by SDRSEXMB1.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 11 Sep 2009 00:23:54 +0200 From: Andre Przywara To: qemu-devel@nongnu.org Date: Fri, 11 Sep 2009 00:20:47 +0200 Message-ID: <1252621257-26364-3-git-send-email-andre.przywara@amd.com> X-Mailer: git-send-email 1.6.1.3 In-Reply-To: <1252621257-26364-1-git-send-email-andre.przywara@amd.com> References: <1252621257-26364-1-git-send-email-andre.przywara@amd.com> X-OriginalArrivalTime: 10 Sep 2009 22:23:54.0840 (UTC) FILETIME=[61DC6580:01CA3265] MIME-Version: 1.0 X-Reverse-DNS: ausb3extmailp02.amd.com X-detected-operating-system: by monty-python.gnu.org: Windows 2000 SP4, XP SP1+ Cc: Andre Przywara Subject: [Qemu-devel] [PATCH 02/12] cpuid: fix over-long lines X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org split lines longer than 80 characters. Only code formatting changed. Signed-off-by: Andre Przywara --- target-i386/cpuid.c | 25 +++++++++++++++++-------- 1 files changed, 17 insertions(+), 8 deletions(-) diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c index 0c0c0b7..b610834 100644 --- a/target-i386/cpuid.c +++ b/target-i386/cpuid.c @@ -289,8 +289,10 @@ static x86_def_t x86_defs[] = { .family = 6, .model = 2, .stepping = 3, - .features = PPRO_FEATURES | CPUID_PSE36 | CPUID_VME | CPUID_MTRR | CPUID_MCA, - .ext2_features = (PPRO_FEATURES & 0x0183F3FF) | CPUID_EXT2_MMXEXT | CPUID_EXT2_3DNOW | CPUID_EXT2_3DNOWEXT, + .features = PPRO_FEATURES | CPUID_PSE36 | CPUID_VME | + CPUID_MTRR | CPUID_MCA, + .ext2_features = (PPRO_FEATURES & EXT2_FEATURE_MASK) | + CPUID_EXT2_MMXEXT | CPUID_EXT2_3DNOW | CPUID_EXT2_3DNOWEXT, .xlevel = 0x80000008, /* XXX: put another string ? */ .model_id = "QEMU Virtual CPU version " QEMU_VERSION, @@ -373,8 +375,10 @@ static int cpu_x86_find_by_name(x86_def_t *x86_cpu_def, const char *cpu_model) char *s = strdup(cpu_model); char *featurestr, *name = strtok(s, ","); - uint32_t plus_features = 0, plus_ext_features = 0, plus_ext2_features = 0, plus_ext3_features = 0; - uint32_t minus_features = 0, minus_ext_features = 0, minus_ext2_features = 0, minus_ext3_features = 0; + uint32_t plus_features = 0, plus_ext_features = 0; + uint32_t plus_ext2_features = 0, plus_ext3_features = 0; + uint32_t minus_features = 0, minus_ext_features = 0; + uint32_t minus_ext2_features = 0, minus_ext3_features = 0; uint32_t numvalue; def = NULL; @@ -400,9 +404,12 @@ static int cpu_x86_find_by_name(x86_def_t *x86_cpu_def, const char *cpu_model) while (featurestr) { char *val; if (featurestr[0] == '+') { - add_flagname_to_bitmaps(featurestr + 1, &plus_features, &plus_ext_features, &plus_ext2_features, &plus_ext3_features); + add_flagname_to_bitmaps(featurestr + 1, &plus_features, + &plus_ext_features, &plus_ext2_features, &plus_ext3_features); } else if (featurestr[0] == '-') { - add_flagname_to_bitmaps(featurestr + 1, &minus_features, &minus_ext_features, &minus_ext2_features, &minus_ext3_features); + add_flagname_to_bitmaps(featurestr + 1, + &minus_features, &minus_ext_features, + &minus_ext2_features, &minus_ext3_features); } else if ((val = strchr(featurestr, '='))) { *val = 0; val++; if (!strcmp(featurestr, "family")) { @@ -470,7 +477,8 @@ static int cpu_x86_find_by_name(x86_def_t *x86_cpu_def, const char *cpu_model) goto error; } } else { - fprintf(stderr, "feature string `%s' not in format (+feature|-feature|feature=xyz)\n", featurestr); + fprintf(stderr, "feature string `%s' not in format " + "(+feature|-feature|feature=xyz)\n", featurestr); goto error; } featurestr = strtok(NULL, ","); @@ -609,7 +617,8 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count, break; case 1: *eax = env->cpuid_version; - *ebx = (env->cpuid_apic_id << 24) | 8 << 8; /* CLFLUSH size in quad words, Linux wants it. */ + /* CLFLUSH size in quad words, Linux wants it. */ + *ebx = (env->cpuid_apic_id << 24) | 8 << 8; *ecx = env->cpuid_ext_features; *edx = env->cpuid_features; if (env->nr_cores * env->nr_threads > 1) {