[PATCH v3 42/74] x86/cpu/vfm: Update tpm files

Tony Luck posted 74 patches 1 year, 8 months ago
Only 73 patches received!
There is a newer version of this series
[PATCH v3 42/74] x86/cpu/vfm: Update tpm files
Posted by Tony Luck 1 year, 8 months ago
New CPU #defines encode vendor and family as well as model.

Signed-off-by: Tony Luck <tony.luck@intel.com>
---
 drivers/char/tpm/tpm.h          | 1 +
 drivers/char/tpm/tpm_tis_core.h | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
index 61445f1dc46d..895f2dba266c 100644
--- a/drivers/char/tpm/tpm.h
+++ b/drivers/char/tpm/tpm.h
@@ -28,6 +28,7 @@
 #include <linux/tpm_eventlog.h>
 
 #ifdef CONFIG_X86
+#include <asm/cpu_device_id.h>
 #include <asm/intel-family.h>
 #endif
 
diff --git a/drivers/char/tpm/tpm_tis_core.h b/drivers/char/tpm/tpm_tis_core.h
index 13e99cf65efe..c940fd18988e 100644
--- a/drivers/char/tpm/tpm_tis_core.h
+++ b/drivers/char/tpm/tpm_tis_core.h
@@ -210,7 +210,7 @@ static inline int tpm_tis_verify_crc(struct tpm_tis_data *data, size_t len,
 static inline bool is_bsw(void)
 {
 #ifdef CONFIG_X86
-	return ((boot_cpu_data.x86_model == INTEL_FAM6_ATOM_AIRMONT) ? 1 : 0);
+	return ((boot_cpu_data.x86_vfm == INTEL_ATOM_AIRMONT) ? 1 : 0);
 #else
 	return false;
 #endif
-- 
2.44.0
Re: [PATCH v3 42/74] x86/cpu/vfm: Update tpm files
Posted by Paul Menzel 1 year, 8 months ago
Dear Tony,


Thank you for your patch. It’d be great if you changed the commit 
message summary/title to be more specific. Currently, the short log, 
`git log --oneline`, is not very meaningful. Maybe:

tpm: Use new VFM macro INTEL_ATOM_AIRMONT

or

x86/cpu/vfm: Use macro INTEL_ATOM_AIRMONT in tpm


Kind regards,

Paul
RE: [PATCH v3 42/74] x86/cpu/vfm: Update tpm files
Posted by Luck, Tony 1 year, 8 months ago
> Thank you for your patch. It’d be great if you changed the commit 
> message summary/title to be more specific. Currently, the short log, 
> `git log --oneline`, is not very meaningful. Maybe:
>
> tpm: Use new VFM macro INTEL_ATOM_AIRMONT
>
> or
>
> x86/cpu/vfm: Use macro INTEL_ATOM_AIRMONT in tpm

Paul,

With 74 patches in this series there was a lot of automation. I'll
see about updating "Subject:" lines to match subsystem conventions
before these are applied.

Apart from that, are you OK with the contents of this patch?

-Tony
Re: [PATCH v3 42/74] x86/cpu/vfm: Update tpm files
Posted by Jarkko Sakkinen 1 year, 8 months ago
On Wed Apr 17, 2024 at 7:43 PM EEST, Luck, Tony wrote:
> > Thank you for your patch. It’d be great if you changed the commit 
> > message summary/title to be more specific. Currently, the short log, 
> > `git log --oneline`, is not very meaningful. Maybe:
> >
> > tpm: Use new VFM macro INTEL_ATOM_AIRMONT
> >
> > or
> >
> > x86/cpu/vfm: Use macro INTEL_ATOM_AIRMONT in tpm
>
> Paul,
>
> With 74 patches in this series there was a lot of automation. I'll
> see about updating "Subject:" lines to match subsystem conventions
> before these are applied.
>
> Apart from that, are you OK with the contents of this patch?
>
> -Tony

For the possible subject-line change: please *do not* remove my reviewed-by :-)

BR, Jarkko
Re: [PATCH v3 42/74] x86/cpu/vfm: Update tpm files
Posted by Jarkko Sakkinen 1 year, 8 months ago
On Wed Apr 17, 2024 at 12:22 AM EEST, Tony Luck wrote:
> New CPU #defines encode vendor and family as well as model.
>
> Signed-off-by: Tony Luck <tony.luck@intel.com>
> ---
>  drivers/char/tpm/tpm.h          | 1 +
>  drivers/char/tpm/tpm_tis_core.h | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
> index 61445f1dc46d..895f2dba266c 100644
> --- a/drivers/char/tpm/tpm.h
> +++ b/drivers/char/tpm/tpm.h
> @@ -28,6 +28,7 @@
>  #include <linux/tpm_eventlog.h>
>  
>  #ifdef CONFIG_X86
> +#include <asm/cpu_device_id.h>
>  #include <asm/intel-family.h>
>  #endif
>  
> diff --git a/drivers/char/tpm/tpm_tis_core.h b/drivers/char/tpm/tpm_tis_core.h
> index 13e99cf65efe..c940fd18988e 100644
> --- a/drivers/char/tpm/tpm_tis_core.h
> +++ b/drivers/char/tpm/tpm_tis_core.h
> @@ -210,7 +210,7 @@ static inline int tpm_tis_verify_crc(struct tpm_tis_data *data, size_t len,
>  static inline bool is_bsw(void)
>  {
>  #ifdef CONFIG_X86
> -	return ((boot_cpu_data.x86_model == INTEL_FAM6_ATOM_AIRMONT) ? 1 : 0);
> +	return ((boot_cpu_data.x86_vfm == INTEL_ATOM_AIRMONT) ? 1 : 0);
>  #else
>  	return false;
>  #endif

Thanks!

Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>

You want me to pick this?

BR, Jarkko
RE: [PATCH v3 42/74] x86/cpu/vfm: Update tpm files
Posted by Luck, Tony 1 year, 8 months ago
> >  #ifdef CONFIG_X86
> > -   return ((boot_cpu_data.x86_model == INTEL_FAM6_ATOM_AIRMONT) ? 1 : 0);
> > +   return ((boot_cpu_data.x86_vfm == INTEL_ATOM_AIRMONT) ? 1 : 0);
> >  #else
> >     return false;
> >  #endif
>
> Thanks!
>
> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
>
> You want me to pick this?

This depends on patches 1,2,3 in this series. Boris may be applying those to TIP soon.

Are you Ok with this patch also going into the TIP tree to keep all the parts in sync?

Otherwise it can wait until this moves from TIP to Linus. I'm not in a great rush.

-Tony
Re: [PATCH v3 42/74] x86/cpu/vfm: Update tpm files
Posted by Jarkko Sakkinen 1 year, 8 months ago
On Wed Apr 17, 2024 at 7:38 PM EEST, Luck, Tony wrote:
> > >  #ifdef CONFIG_X86
> > > -   return ((boot_cpu_data.x86_model == INTEL_FAM6_ATOM_AIRMONT) ? 1 : 0);
> > > +   return ((boot_cpu_data.x86_vfm == INTEL_ATOM_AIRMONT) ? 1 : 0);
> > >  #else
> > >     return false;
> > >  #endif
> >
> > Thanks!
> >
> > Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
> >
> > You want me to pick this?
>
> This depends on patches 1,2,3 in this series. Boris may be applying those to TIP soon.
>
> Are you Ok with this patch also going into the TIP tree to keep all the parts in sync?
>
> Otherwise it can wait until this moves from TIP to Linus. I'm not in a great rush.

I don't mind Boris applying this. It is very unlikely to cause any
possible merge issues with other patches.

>
> -Tony

BR, Jarkko