From patchwork Tue Dec 11 18:01:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 153484 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp919650ljp; Tue, 11 Dec 2018 10:05:58 -0800 (PST) X-Google-Smtp-Source: AFSGD/WnrBp1j7bhvCvGGTeGdMr+nXqpiXXAEE6+hl96CyIrTBtgh3dLaOru0xMcN7VviF8aWIar X-Received: by 2002:ac8:4405:: with SMTP id j5mr16757112qtn.295.1544551558020; Tue, 11 Dec 2018 10:05:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544551558; cv=none; d=google.com; s=arc-20160816; b=oeq2men4Uexink5BiqlGKLVKXVWECvv+umPQo/i1QWwFusIGoS+wfLG0bYEL6X2XlK kxYiSkALZ/tbL0+gpDJABvrQeU+571lIGPfvg9j4ld+fV9tuqIFQwJTKTkZQO2aQ3hVj AjjmnL5mSNn4aClsRm38E97TBrR30SWkaMNPBLCNzqTu0kzTYCSDHOQU5ag3jzNAmTPh QL13RdAgj2R39vAFeESoarMaEjAJqUQI/7L1n+0/JBagxGRVkRPwWD6GoaF/EPIgJeVk zJHq/tn1e8sGhTxR2kWU4QfdlKP8hJvLOlX7dN0tH/KBfNHqlE+FOF1bJiF0nc92m9/p 4KCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from; bh=6URso+FrBr5Pdk+9WDVu2KFG9jPXlglyBTn0JR4NUxw=; b=cjIPvHVDSyT1LQhDsgtXEcNERUvYxtIxLT/tUrtEI+vfEV3QRHJZZS03iQte4TbIQ1 7kaUKnh84zkYaraZYeUiXxwctHN4ICC0aKOtjOLiwqSu2k3LAuejrMY141+wuj87vXMF 2WRuAMOmdNMFiyjdswjGrG34gm216Dy9TZb/9nGtgtHE/K8crfLqWYjFstm8DlpnJwvC sbEhyTjp5WCsw8dLS79aJ/j3NDdHD7TDIuYtDFSm8cgNUpc8h/8xRn/jN8qhvyFnmrmW 8hxwhQKfEgsPwz9x8IMTeOMJrExwuMYXwDC9SvVdMaowoL321A4QEODMnNFhk8M2Gs6E Iekg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id t24si3750967qtr.128.2018.12.11.10.05.57 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 11 Dec 2018 10:05:58 -0800 (PST) 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; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:40546 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gWmPt-00009T-CR for patch@linaro.org; Tue, 11 Dec 2018 13:05:57 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41403) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gWmML-0005a9-TP for qemu-devel@nongnu.org; Tue, 11 Dec 2018 13:02:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gWmMD-0004uG-Tm for qemu-devel@nongnu.org; Tue, 11 Dec 2018 13:02:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58122) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gWmMD-0004tb-Gt for qemu-devel@nongnu.org; Tue, 11 Dec 2018 13:02:09 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DB7A8307D85E; Tue, 11 Dec 2018 18:02:06 +0000 (UTC) Received: from localhost (ovpn-116-63.gru2.redhat.com [10.97.116.63]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0EBA919748; Tue, 11 Dec 2018 18:02:03 +0000 (UTC) From: Eduardo Habkost To: Peter Maydell , qemu-devel@nongnu.org Date: Tue, 11 Dec 2018 16:01:15 -0200 Message-Id: <20181211180129.7661-11-ehabkost@redhat.com> In-Reply-To: <20181211180129.7661-1-ehabkost@redhat.com> References: <20181211180129.7661-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Tue, 11 Dec 2018 18:02:08 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 10/24] i386: Rename bools in PCMachineState to end in _enabled X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Corey Minyard , Richard Henderson , Paolo Bonzini Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Corey Minyard This makes their function more clear and prevents conflicts when adding the actual devices to the machine state, if necessary. Signed-off-by: Corey Minyard Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Message-Id: <20181107152434.22219-1-minyard@acm.org> Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Eduardo Habkost --- include/hw/i386/pc.h | 6 +++--- hw/i386/pc.c | 18 +++++++++--------- hw/i386/pc_piix.c | 3 ++- hw/i386/pc_q35.c | 6 +++--- 4 files changed, 17 insertions(+), 16 deletions(-) -- 2.18.0.rc1.1.g3f1ff2140 diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 136fe497b6..7bb52b4762 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -49,9 +49,9 @@ struct PCMachineState { AcpiNVDIMMState acpi_nvdimm_state; bool acpi_build_enabled; - bool smbus; - bool sata; - bool pit; + bool smbus_enabled; + bool sata_enabled; + bool pit_enabled; /* RAM information (sizes, addresses, configuration): */ ram_addr_t below_4g_mem_size, above_4g_mem_size; diff --git a/hw/i386/pc.c b/hw/i386/pc.c index f095725dba..4cd2fbca4d 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -2222,42 +2222,42 @@ static bool pc_machine_get_smbus(Object *obj, Error **errp) { PCMachineState *pcms = PC_MACHINE(obj); - return pcms->smbus; + return pcms->smbus_enabled; } static void pc_machine_set_smbus(Object *obj, bool value, Error **errp) { PCMachineState *pcms = PC_MACHINE(obj); - pcms->smbus = value; + pcms->smbus_enabled = value; } static bool pc_machine_get_sata(Object *obj, Error **errp) { PCMachineState *pcms = PC_MACHINE(obj); - return pcms->sata; + return pcms->sata_enabled; } static void pc_machine_set_sata(Object *obj, bool value, Error **errp) { PCMachineState *pcms = PC_MACHINE(obj); - pcms->sata = value; + pcms->sata_enabled = value; } static bool pc_machine_get_pit(Object *obj, Error **errp) { PCMachineState *pcms = PC_MACHINE(obj); - return pcms->pit; + return pcms->pit_enabled; } static void pc_machine_set_pit(Object *obj, bool value, Error **errp) { PCMachineState *pcms = PC_MACHINE(obj); - pcms->pit = value; + pcms->pit_enabled = value; } static void pc_machine_initfn(Object *obj) @@ -2271,9 +2271,9 @@ static void pc_machine_initfn(Object *obj) pcms->acpi_nvdimm_state.is_enabled = false; /* acpi build is enabled by default if machine supports it */ pcms->acpi_build_enabled = PC_MACHINE_GET_CLASS(pcms)->has_acpi_build; - pcms->smbus = true; - pcms->sata = true; - pcms->pit = true; + pcms->smbus_enabled = true; + pcms->sata_enabled = true; + pcms->pit_enabled = true; } static void pc_machine_reset(void) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 7092d6d13f..2d996162f1 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -239,7 +239,8 @@ static void pc_init1(MachineState *machine, /* init basic PC hardware */ pc_basic_device_init(isa_bus, pcms->gsi, &rtc_state, true, - (pcms->vmport != ON_OFF_AUTO_ON), pcms->pit, 0x4); + (pcms->vmport != ON_OFF_AUTO_ON), pcms->pit_enabled, + 0x4); pc_nic_init(pcmc, isa_bus, pci_bus); diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 4702bb13c4..6e3d81f5be 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -236,13 +236,13 @@ static void pc_q35_init(MachineState *machine) /* init basic PC hardware */ pc_basic_device_init(isa_bus, pcms->gsi, &rtc_state, !mc->no_floppy, - (pcms->vmport != ON_OFF_AUTO_ON), pcms->pit, + (pcms->vmport != ON_OFF_AUTO_ON), pcms->pit_enabled, 0xff0104); /* connect pm stuff to lpc */ ich9_lpc_pm_init(lpc, pc_machine_is_smm_enabled(pcms)); - if (pcms->sata) { + if (pcms->sata_enabled) { /* ahci and SATA device, for q35 1 ahci controller is built-in */ ahci = pci_create_simple_multifunction(host_bus, PCI_DEVFN(ICH9_SATA1_DEV, @@ -262,7 +262,7 @@ static void pc_q35_init(MachineState *machine) ehci_create_ich9_with_companions(host_bus, 0x1d); } - if (pcms->smbus) { + if (pcms->smbus_enabled) { /* TODO: Populate SPD eeprom data. */ smbus_eeprom_init(ich9_smb_init(host_bus, PCI_DEVFN(ICH9_SMB_DEV, ICH9_SMB_FUNC),