* [PATCH v4 01/71] tpm: Switch to new Intel CPU model defines
[not found] <20240424181245.41141-1-tony.luck@intel.com>
@ 2024-04-24 18:14 ` Tony Luck
2024-04-25 4:48 ` Jarkko Sakkinen
0 siblings, 1 reply; 3+ messages in thread
From: Tony Luck @ 2024-04-24 18:14 UTC (permalink / raw)
To: Borislav Petkov, Peter Huewe, Jarkko Sakkinen
Cc: Jason Gunthorpe, linux-integrity, linux-kernel, patches,
Tony Luck
New CPU #defines encode vendor and family as well as model.
Signed-off-by: Tony Luck <tony.luck@intel.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
---
drivers/char/tpm/tpm.h | 2 +-
drivers/char/tpm/tpm_tis_core.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
index 61445f1dc46d..7b38ce007bdc 100644
--- a/drivers/char/tpm/tpm.h
+++ b/drivers/char/tpm/tpm.h
@@ -28,7 +28,7 @@
#include <linux/tpm_eventlog.h>
#ifdef CONFIG_X86
-#include <asm/intel-family.h>
+#include <asm/cpu_device_id.h>
#endif
#define TPM_MINOR 224 /* officially assigned */
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v4 01/71] tpm: Switch to new Intel CPU model defines
2024-04-24 18:14 ` [PATCH v4 01/71] tpm: Switch to new Intel CPU model defines Tony Luck
@ 2024-04-25 4:48 ` Jarkko Sakkinen
2024-04-25 4:50 ` Jarkko Sakkinen
0 siblings, 1 reply; 3+ messages in thread
From: Jarkko Sakkinen @ 2024-04-25 4:48 UTC (permalink / raw)
To: Tony Luck, Borislav Petkov, Peter Huewe
Cc: Jason Gunthorpe, linux-integrity, linux-kernel, patches
On Wed Apr 24, 2024 at 9:14 PM EEST, Tony Luck wrote:
> New CPU #defines encode vendor and family as well as model.
>
> Signed-off-by: Tony Luck <tony.luck@intel.com>
> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
> ---
> drivers/char/tpm/tpm.h | 2 +-
> drivers/char/tpm/tpm_tis_core.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
> index 61445f1dc46d..7b38ce007bdc 100644
> --- a/drivers/char/tpm/tpm.h
> +++ b/drivers/char/tpm/tpm.h
> @@ -28,7 +28,7 @@
> #include <linux/tpm_eventlog.h>
>
> #ifdef CONFIG_X86
> -#include <asm/intel-family.h>
> +#include <asm/cpu_device_id.h>
> #endif
>
> #define TPM_MINOR 224 /* officially assigned */
> 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
+1
BR, Jarkko
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v4 01/71] tpm: Switch to new Intel CPU model defines
2024-04-25 4:48 ` Jarkko Sakkinen
@ 2024-04-25 4:50 ` Jarkko Sakkinen
0 siblings, 0 replies; 3+ messages in thread
From: Jarkko Sakkinen @ 2024-04-25 4:50 UTC (permalink / raw)
To: Jarkko Sakkinen, Tony Luck, Borislav Petkov, Peter Huewe
Cc: Jason Gunthorpe, linux-integrity, linux-kernel, patches
On Thu Apr 25, 2024 at 7:48 AM EEST, Jarkko Sakkinen wrote:
> On Wed Apr 24, 2024 at 9:14 PM EEST, Tony Luck wrote:
> > New CPU #defines encode vendor and family as well as model.
> >
> > Signed-off-by: Tony Luck <tony.luck@intel.com>
> > Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
> > ---
> > drivers/char/tpm/tpm.h | 2 +-
> > drivers/char/tpm/tpm_tis_core.h | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
> > index 61445f1dc46d..7b38ce007bdc 100644
> > --- a/drivers/char/tpm/tpm.h
> > +++ b/drivers/char/tpm/tpm.h
> > @@ -28,7 +28,7 @@
> > #include <linux/tpm_eventlog.h>
> >
> > #ifdef CONFIG_X86
> > -#include <asm/intel-family.h>
> > +#include <asm/cpu_device_id.h>
> > #endif
> >
> > #define TPM_MINOR 224 /* officially assigned */
> > 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);
Umh I guess one could complain about extra parentheses ;-)
Not sure if I care, if no other updates needed, probably don't.
> > #else
> > return false;
> > #endif
>
> +1
>
> BR, Jarkko
BR, Jarkko
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-25 4:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20240424181245.41141-1-tony.luck@intel.com>
2024-04-24 18:14 ` [PATCH v4 01/71] tpm: Switch to new Intel CPU model defines Tony Luck
2024-04-25 4:48 ` Jarkko Sakkinen
2024-04-25 4:50 ` Jarkko Sakkinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox