From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 2002:a05:6512:3aa:0:0:0:0 with SMTP id v10csp2246311lfp; Fri, 14 Feb 2020 10:38:18 -0800 (PST) X-Google-Smtp-Source: APXvYqzDJcyFXVHauIeePqHViDpwT9WhlcTqovicdoqmjZp2L89GtdCzb/I+O+X7wo2cus/M4DQX X-Received: by 2002:a05:620a:c96:: with SMTP id q22mr3990317qki.330.1581705498408; Fri, 14 Feb 2020 10:38:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581705498; cv=none; d=google.com; s=arc-20160816; b=EhKZAGpsfEWK6mKF3+BufFDlswLl8RHchgUb8zB40V8gQP8XYNoZQ58AZBIjskxo1q 7VMvtHzLiPUg7G9bzkNf38NsQGliKQybxdcqasmUURpPbXwI5MpqF9pmn4vzwN2fp7dA E/EBwOTXeVS3+jhbuQvRQ/6fuYI2yoZ2b8Zj8iD3F+8c05DizGivqQ6q297YoweijESG N1jX9NYc3X/UaZ4cOkx3rbVoEVuC69GDOFPQ7nZ7aIX71yh9+bZpiSnClfJH8OGTeybM xv6PRp6481pxOxeZJBYTtYGCaSk5wJZDlTWSWaiT+ZfxT/a5B42pm+vYSH5idRslV/gk Nulw== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Ja4uYOb2xkQsvSshHRqUk3d7RyGWhnjR+15xNTdqOnU=; b=zEz5Bpk6+5yEy3bhxc0BFqgzj8NAtJf5ukvC1uIg4bn9ydKudXSzQGsi1BqKKS+JqO UBlmxVc+yGW9bTMCrTouugg0Rbe7IR+AsN6xA2SxGz5KX0KDWNrBWDdUw6CVHgDCAQH6 vAIowfU8050dy+/1AoctYgCxltjwOiGvEv7Zm/HfNRxFIwG+2Vo5Dux11yBynLAthmN7 UYrmJ09WfC43Bdvty4oJwHORutxyt9T+q8s13Czce2ofZhuXaxdGOTx4pFr/kp02ky1i A5Z8VRqjIHcnk/8lkSOuPl84eOz67eBDXS1dXMbB2HA1W2LavYSnkwb6A341oG408Wde tcjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b=G0zYm4h2; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=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. [209.51.188.17]) by mx.google.com with ESMTPS id y17si3004211qtn.1.2020.02.14.10.38.18 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 14 Feb 2020 10:38:18 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b=G0zYm4h2; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:44024 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2fqz-00038B-Qj for alex.bennee@linaro.org; Fri, 14 Feb 2020 13:38:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37050) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2fqC-0001Oa-6U for qemu-arm@nongnu.org; Fri, 14 Feb 2020 13:37:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2fqB-0003oQ-1F for qemu-arm@nongnu.org; Fri, 14 Feb 2020 13:37:28 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:56289 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j2fqA-0003nj-UO for qemu-arm@nongnu.org; Fri, 14 Feb 2020 13:37:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581705446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ja4uYOb2xkQsvSshHRqUk3d7RyGWhnjR+15xNTdqOnU=; b=G0zYm4h27KBbinqbMemYmrqw26ezwXRdyQs3O3bp38LWe8sWjHNDfYNCG4JIhJ2b+e4cog dcWdC9CFgd1HUzm8X06OmQaYrPRjYcjZwKy89ZL2FaA7wVkX/8tMd3shvUb2XbixG+Cez8 ep8yvLV2uq3q+KzGr2VqU0e8NWEVjsc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-166-KrIk_Lr4M0y52xLeswaqbA-1; Fri, 14 Feb 2020 13:37:24 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7CC82107ACC9; Fri, 14 Feb 2020 18:37:23 +0000 (UTC) Received: from laptop.redhat.com (ovpn-116-37.ams2.redhat.com [10.36.116.37]) by smtp.corp.redhat.com (Postfix) with ESMTP id 902B25DA7D; Fri, 14 Feb 2020 18:37:19 +0000 (UTC) From: Eric Auger To: eric.auger.pro@gmail.com, eric.auger@redhat.com, stefanb@linux.ibm.com, qemu-devel@nongnu.org, qemu-arm@nongnu.org, peter.maydell@linaro.org Subject: [RFC v2 1/6] tpm: rename TPM_TIS into TPM_TIS_ISA Date: Fri, 14 Feb 2020 19:36:59 +0100 Message-Id: <20200214183704.14389-2-eric.auger@redhat.com> In-Reply-To: <20200214183704.14389-1-eric.auger@redhat.com> References: <20200214183704.14389-1-eric.auger@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: KrIk_Lr4M0y52xLeswaqbA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.61 X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, lersek@redhat.com, ardb@kernel.org, philmd@redhat.com Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: N9c9gk/kUKoP As we plan to introduce a sysbus TPM_TIS, let's rename TPM_TIS into TPM_TIS_ISA. Signed-off-by: Eric Auger --- hw/i386/acpi-build.c | 6 +++--- hw/tpm/tpm_tis.c | 4 ++-- include/sysemu/tpm.h | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 9c4e46fa74..26777f8828 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2026,7 +2026,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, } } =20 - if (TPM_IS_TIS(tpm_find())) { + if (TPM_IS_TIS_ISA(tpm_find())) { aml_append(crs, aml_memory32_fixed(TPM_TIS_ADDR_BASE, TPM_TIS_ADDR_SIZE, AML_READ_WRITE)); } @@ -2197,7 +2197,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, /* Scan all PCI buses. Generate tables to support hotplug. */ build_append_pci_bus_devices(scope, bus, pm->pcihp_bridge_en); =20 - if (TPM_IS_TIS(tpm)) { + if (TPM_IS_TIS_ISA(tpm)) { if (misc->tpm_version =3D=3D TPM_VERSION_2_0) { dev =3D aml_device("TPM"); aml_append(dev, aml_name_decl("_HID", @@ -2304,7 +2304,7 @@ build_tpm2(GArray *table_data, BIOSLinker *linker, GA= rray *tcpalog) (char *)&tpm2_ptr->log_area_start_address - table_data->data; =20 tpm2_ptr->platform_class =3D cpu_to_le16(TPM2_ACPI_CLASS_CLIENT); - if (TPM_IS_TIS(tpm_find())) { + if (TPM_IS_TIS_ISA(tpm_find())) { tpm2_ptr->control_area_address =3D cpu_to_le64(0); tpm2_ptr->start_method =3D cpu_to_le32(TPM2_START_METHOD_MMIO); } else if (TPM_IS_CRB(tpm_find())) { diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c index 31facb896d..c609737272 100644 --- a/hw/tpm/tpm_tis.c +++ b/hw/tpm/tpm_tis.c @@ -91,7 +91,7 @@ typedef struct TPMState { TPMPPI ppi; } TPMState; =20 -#define TPM(obj) OBJECT_CHECK(TPMState, (obj), TYPE_TPM_TIS) +#define TPM(obj) OBJECT_CHECK(TPMState, (obj), TYPE_TPM_TIS_ISA) =20 #define DEBUG_TIS 0 =20 @@ -1008,7 +1008,7 @@ static void tpm_tis_class_init(ObjectClass *klass, vo= id *data) } =20 static const TypeInfo tpm_tis_info =3D { - .name =3D TYPE_TPM_TIS, + .name =3D TYPE_TPM_TIS_ISA, .parent =3D TYPE_ISA_DEVICE, .instance_size =3D sizeof(TPMState), .instance_init =3D tpm_tis_initfn, diff --git a/include/sysemu/tpm.h b/include/sysemu/tpm.h index 15979a3647..1691b92c28 100644 --- a/include/sysemu/tpm.h +++ b/include/sysemu/tpm.h @@ -43,12 +43,12 @@ typedef struct TPMIfClass { enum TPMVersion (*get_version)(TPMIf *obj); } TPMIfClass; =20 -#define TYPE_TPM_TIS "tpm-tis" +#define TYPE_TPM_TIS_ISA "tpm-tis" #define TYPE_TPM_CRB "tpm-crb" #define TYPE_TPM_SPAPR "tpm-spapr" =20 -#define TPM_IS_TIS(chr) \ - object_dynamic_cast(OBJECT(chr), TYPE_TPM_TIS) +#define TPM_IS_TIS_ISA(chr) \ + object_dynamic_cast(OBJECT(chr), TYPE_TPM_TIS_ISA) #define TPM_IS_CRB(chr) \ object_dynamic_cast(OBJECT(chr), TYPE_TPM_CRB) #define TPM_IS_SPAPR(chr) \ --=20 2.20.1