From patchwork Fri Aug 3 02:59:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 174862 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C55382C0081 for ; Fri, 3 Aug 2012 13:45:46 +1000 (EST) Received: from localhost ([::1]:34918 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sx8Ep-0007Q6-7R for incoming@patchwork.ozlabs.org; Thu, 02 Aug 2012 23:07:43 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sx8DG-0004ml-AJ for qemu-devel@nongnu.org; Thu, 02 Aug 2012 23:06:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sx8DB-00068D-KZ for qemu-devel@nongnu.org; Thu, 02 Aug 2012 23:06:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39545) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sx8DA-000679-Sh for qemu-devel@nongnu.org; Thu, 02 Aug 2012 23:06:01 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q73360Uw024484 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 2 Aug 2012 23:06:00 -0400 Received: from blackpad.lan.raisama.net (vpn1-5-140.gru2.redhat.com [10.97.5.140]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q7335xIY024822; Thu, 2 Aug 2012 23:06:00 -0400 Received: by blackpad.lan.raisama.net (Postfix, from userid 500) id C5C37202096; Thu, 2 Aug 2012 23:59:31 -0300 (BRT) From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Thu, 2 Aug 2012 23:59:10 -0300 Message-Id: <1343962766-22024-4-git-send-email-ehabkost@redhat.com> In-Reply-To: <1343962766-22024-1-git-send-email-ehabkost@redhat.com> References: <1343962766-22024-1-git-send-email-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Igor Mammedov , =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [Qemu-devel] [RFC 03/19] i386: x86_def_t: rename 'flags' field 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 The field is being used for a single purpose: to indicate if the CPU model is a builtin one. So, instead of an opaque and confusing 'flags' field name, use a boolean 'is_builtin' field to indicate if the model is a built-in one. No behavior change, just a field rename. Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index d546534..1154a34 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -236,7 +236,7 @@ typedef struct x86_def_t { uint32_t xlevel; char model_id[48]; int vendor_override; - uint32_t flags; + bool is_builtin; /* Store the results of Centaur's CPUID instructions */ uint32_t ext4_features; uint32_t xlevel2; @@ -1309,7 +1309,7 @@ void x86_cpu_list(FILE *f, fprintf_function cpu_fprintf, const char *optarg) return; } for (def = x86_defs; def; def = def->next) { - snprintf(buf, sizeof(buf), def->flags ? "[%s]" : "%s", def->name); + snprintf(buf, sizeof(buf), def->is_builtin ? "[%s]" : "%s", def->name); if (model || dump) { (*cpu_fprintf)(f, "x86 %16s %-48s\n", buf, def->model_id); } else { @@ -1528,7 +1528,7 @@ void x86_cpudef_setup(void) for (i = 0; i < ARRAY_SIZE(builtin_x86_defs); ++i) { x86_def_t *def = &builtin_x86_defs[i]; def->next = x86_defs; - def->flags = 1; + def->is_builtin = true; /* Look for specific "cpudef" models that */ /* have the QEMU version in .model_id */