Skip to contentSkip to conversation

x86/cpu: Allow INTEL_CPU_FAM_ANY() to take integers

PATCH In review Andy Shevchenko 2 participants 3 messages Feb 15, 2019 – Feb 28, 2019

Subsystems (2)
lore
Share & tools
lore
#1 lore raw

PATCH 2/2 x86/cpu: Split Tremont based Atoms from the rest

In reply to Andy Shevchenko

Split Tremont based Atoms from the rest to keep logical grouping.

---
 arch/x86/include/asm/intel-family.h | 1 +
 1 file changed, 1 insertion(+)
arch/x86/include/asm/intel-family.h +1 -0
index 4120dfcd8891..0b918d813f3c 100644
@@ -73,6 +73,7 @@
 #define INTEL_FAM6_ATOM_GOLDMONT	0x5C /* Apollo Lake */
 #define INTEL_FAM6_ATOM_GOLDMONT_X	0x5F /* Denverton */
 #define INTEL_FAM6_ATOM_GOLDMONT_PLUS	0x7A /* Gemini Lake */
+
 #define INTEL_FAM6_ATOM_TREMONT_X	0x86 /* Jacobsville */
 
 /* Xeon Phi */
Signature · 1 line
2.20.1
#0 lore raw

PATCH 1/2 x86/cpu: Allow INTEL_CPU_FAM_ANY() to take integers

Driver data can be a plain integer and we have such users. For now they are implementing a custom macro to accept this.

Let's allow them to use generic one by moving address-of operation outside of the INTEL_CPU_FAM_ANY() macro.

---
 arch/x86/include/asm/intel-family.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/include/asm/intel-family.h +2 -2
index 698d53852919..4120dfcd8891 100644
@@ -87,10 +87,10 @@
 	.family		= _family,				\
 	.model		= _model,				\
 	.feature	= X86_FEATURE_ANY,			\
-	.driver_data	= (kernel_ulong_t)&_driver_data		\
+	.driver_data	= (kernel_ulong_t)_driver_data		\
 }
 
 #define INTEL_CPU_FAM6(_model, _driver_data)			\
-	INTEL_CPU_FAM_ANY(6, INTEL_FAM6_##_model, _driver_data)
+	INTEL_CPU_FAM_ANY(6, INTEL_FAM6_##_model, &_driver_data)
 
 #endif /* _ASM_X86_INTEL_FAMILY_H */
Signature · 1 line
2.20.1
#2 lore raw
Quoted 2 lines · Andy Shevchenko

Driver data can be a plain integer and we have such users. For now they are implementing a custom macro to accept this.

It would be nice to actually see the conversions as well.

Thanks,

tglx