diff mbox series

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

Message ID 20240416212202.9452-1-tony.luck@intel.com (mailing list archive)
State New, archived
Headers show
Series None | expand

Commit Message

Tony Luck April 16, 2024, 9:22 p.m. UTC
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(-)

Comments

Jarkko Sakkinen April 17, 2024, 3:41 p.m. UTC | #1
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
Paul Menzel April 17, 2024, 4:07 p.m. UTC | #2
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
Tony Luck April 17, 2024, 4:38 p.m. UTC | #3
> >  #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
Tony Luck April 17, 2024, 4:43 p.m. UTC | #4
> 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
Jarkko Sakkinen April 17, 2024, 10:10 p.m. UTC | #5
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
Jarkko Sakkinen April 17, 2024, 10:48 p.m. UTC | #6
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
diff mbox series

Patch

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