qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 094/150] meson: convert hw/tpm


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 094/150] meson: convert hw/tpm
Date: Tue, 18 Aug 2020 12:55:27 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0

Hi Paolo, Marc-André,

On 8/17/20 4:36 PM, Paolo Bonzini wrote:
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  hw/Makefile.objs     | 1 -
>  hw/meson.build       | 1 +
>  hw/tpm/Makefile.objs | 6 ------
>  hw/tpm/meson.build   | 8 ++++++++
>  4 files changed, 9 insertions(+), 7 deletions(-)
>  delete mode 100644 hw/tpm/Makefile.objs
>  create mode 100644 hw/tpm/meson.build
> 
> diff --git a/hw/Makefile.objs b/hw/Makefile.objs
> index c2619bbb50..f0e5728d13 100644
> --- a/hw/Makefile.objs
> +++ b/hw/Makefile.objs
> @@ -29,7 +29,6 @@ devices-dirs-$(CONFIG_SCSI) += scsi/
>  devices-dirs-y += sd/
>  devices-dirs-y += ssi/
>  devices-dirs-y += timer/
> -devices-dirs-$(CONFIG_TPM) += tpm/

I suppose you simplified this line due to Kconfig selecting
CONFIG_TPM automatically. Maybe worth mentioning in the
description.

>  endif
>  
>  common-obj-y += $(devices-dirs-y)
> diff --git a/hw/meson.build b/hw/meson.build
> index 89bd6adb70..2ddf6bad33 100644
> --- a/hw/meson.build
> +++ b/hw/meson.build
> @@ -3,6 +3,7 @@ subdir('mem')
>  subdir('nubus')
>  subdir('semihosting')
>  subdir('smbios')
> +subdir('tpm')
>  subdir('usb')
>  subdir('vfio')
>  subdir('virtio')
> diff --git a/hw/tpm/Makefile.objs b/hw/tpm/Makefile.objs
> deleted file mode 100644
> index 6fc05be67c..0000000000
> --- a/hw/tpm/Makefile.objs
> +++ /dev/null
> @@ -1,6 +0,0 @@
> -obj-$(call lor,$(CONFIG_TPM_TIS),$(CONFIG_TPM_CRB)) += tpm_ppi.o
> -common-obj-$(CONFIG_TPM_TIS_ISA) += tpm_tis_isa.o
> -common-obj-$(CONFIG_TPM_TIS_SYSBUS) += tpm_tis_sysbus.o
> -common-obj-$(CONFIG_TPM_TIS) += tpm_tis_common.o
> -common-obj-$(CONFIG_TPM_CRB) += tpm_crb.o
> -obj-$(CONFIG_TPM_SPAPR) += tpm_spapr.o
> diff --git a/hw/tpm/meson.build b/hw/tpm/meson.build
> new file mode 100644
> index 0000000000..1c68d81d6a
> --- /dev/null
> +++ b/hw/tpm/meson.build
> @@ -0,0 +1,8 @@
> +softmmu_ss.add(when: 'CONFIG_TPM_TIS', if_true: files('tpm_tis_common.c'))
> +softmmu_ss.add(when: 'CONFIG_TPM_TIS_ISA', if_true: files('tpm_tis_isa.c'))
> +softmmu_ss.add(when: 'CONFIG_TPM_TIS_SYSBUS', if_true: 
> files('tpm_tis_sysbus.c'))
> +softmmu_ss.add(when: 'CONFIG_TPM_CRB', if_true: files('tpm_crb.c'))
> +
> +specific_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TPM_TIS'], if_true: 
> files('tpm_ppi.c'))
> +specific_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TPM_CRB'], if_true: 
> files('tpm_ppi.c'))

I don't understand the 'CONFIG_SOFTMMU' use.

Since specific_ss is a source_set(), why not simply use:

 specific_ss.add(when: 'CONFIG_TPM_TIS', if_true: files('tpm_ppi.c'))
 specific_ss.add(when: 'CONFIG_TPM_CRB', if_true: files('tpm_ppi.c'))

Thanks,

Phil.

> +specific_ss.add(when: 'CONFIG_TPM_SPAPR', if_true: files('tpm_spapr.c'))
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]