Skip to contentSkip to conversation

x86/split_lock: Enumerate split lock feature on Sapphire Rapids and Alder Lake

PATCH Applied Fenghua Yu 3 participants 3 messages Jul 24, 2020 – Aug 2, 2020 x86

lore
Share & tools
lore

Fenghua Yu

author
#0 lore raw

PATCH 1/1 x86/split_lock: Enumerate split lock feature on Sapphire Rapids and Alder Lake

Add Sapphire Rapids and Alder Lake processors to CPU list to enumerate split lock feature.

---

This patch supersedes
https://lore.kernel.org/lkml/[email protected]/
and is applied on top of Alder Lake Intel family patch:
https://lore.kernel.org/lkml/[email protected]/#iZ30arch:x86:include:asm:intel-family.h

 arch/x86/kernel/cpu/intel.c | 2 ++
 1 file changed, 2 insertions(+)
arch/x86/kernel/cpu/intel.c +2 -0
index 0ab48f1cdf84..b6b7b38dff5f 100644
@@ -1156,6 +1156,8 @@ static const struct x86_cpu_id split_lock_cpu_ids[] __initconst = {
 	X86_MATCH_INTEL_FAM6_MODEL(ATOM_TREMONT_L,	1),
 	X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE_L,		1),
 	X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE,		1),
+	X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X,	1),
+	X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE,		1),
 	{}
 };
 
Signature · 1 line
2.19.1
merge bot Applied
#1 lore raw

[tip: x86/cpu] x86/split_lock: Enable the split lock feature on Sapphire Rapids and Alder Lake CPUs

The following commit has been merged into the x86/cpu branch of tip:

The following commit has been merged into the x86/cpu branch of tip:

Commit-ID:     3aae57f0c3ba57715cf89201b5a5f290684078a5
Gitweb:        https://git.kernel.org/tip/3aae57f0c3ba57715cf89201b5a5f290684078a5
Author:        Fenghua Yu <[email protected]>
AuthorDate:    Fri, 24 Jul 2020 16:45:20 -07:00
Committer:     Ingo Molnar <[email protected]>
CommitterDate: Sat, 25 Jul 2020 12:17:00 +02:00

x86/split_lock: Enable the split lock feature on Sapphire Rapids and Alder Lake CPUs

Add Sapphire Rapids and Alder Lake processors to CPU list to enumerate and enable the split lock feature.

---
 arch/x86/kernel/cpu/intel.c | 2 ++
 1 file changed, 2 insertions(+)
arch/x86/kernel/cpu/intel.c +2 -0
index 0ab48f1..b6b7b38 100644
@@ -1156,6 +1156,8 @@ static const struct x86_cpu_id split_lock_cpu_ids[] __initconst = {
 	X86_MATCH_INTEL_FAM6_MODEL(ATOM_TREMONT_L,	1),
 	X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE_L,		1),
 	X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE,		1),
+	X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X,	1),
+	X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE,		1),
 	{}
 };
 
#2 lore raw
In reply to Fenghua Yu
I love your patch! Yet something to improve:

Hi Fenghua,

I love your patch! Yet something to improve:

[auto build test ERROR on tip/auto-latest]
[also build test ERROR on tip/x86/core v5.8-rc7]
[cannot apply to bp/for-next next-20200731]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Fenghua-Yu/x86-split_lock-Enumerate-split-lock-feature-on-Sapphire-Rapids-and-Alder-Lake/20200725-074728
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git a1f91a8f560f43e1c24897d2e7f53c0952880d60
config: x86_64-rhel-8.3 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate

All errors (new ones prefixed by >>):

In file included from arch/x86/kernel/cpu/intel.c:22:

>> arch/x86/include/asm/cpu_device_id.h:161:39: error: 'INTEL_FAM6_ALDERLAKE' undeclared here (not in a function); did you mean 'INTEL_FAM6_TIGERLAKE'?
     161 |  X86_MATCH_VENDOR_FAM_MODEL(INTEL, 6, INTEL_FAM6_##model, data)
         |                                       ^~~~~~~~~~~
   arch/x86/include/asm/cpu_device_id.h:46:12: note: in definition of macro 'X86_MATCH_VENDOR_FAM_MODEL_STEPPINGS_FEATURE'
      46 |  .model  = _model,     \
         |            ^~~~~~
   arch/x86/include/asm/cpu_device_id.h:129:2: note: in expansion of macro 'X86_MATCH_VENDOR_FAM_MODEL_FEATURE'
     129 |  X86_MATCH_VENDOR_FAM_MODEL_FEATURE(vendor, family, model, \
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/include/asm/cpu_device_id.h:161:2: note: in expansion of macro 'X86_MATCH_VENDOR_FAM_MODEL'
     161 |  X86_MATCH_VENDOR_FAM_MODEL(INTEL, 6, INTEL_FAM6_##model, data)
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/kernel/cpu/intel.c:1160:2: note: in expansion of macro 'X86_MATCH_INTEL_FAM6_MODEL'
    1160 |  X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE,  1),
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~~

vim +161 arch/x86/include/asm/cpu_device_id.h

ba5bade4cc0d201 Thomas Gleixner 2020-03-20   51  
e9d7144597b10ff Mark Gross      2020-04-16   52  /**
e9d7144597b10ff Mark Gross      2020-04-16   53   * X86_MATCH_VENDOR_FAM_MODEL_FEATURE - Macro for CPU matching
e9d7144597b10ff Mark Gross      2020-04-16   54   * @_vendor:	The vendor name, e.g. INTEL, AMD, HYGON, ..., ANY
e9d7144597b10ff Mark Gross      2020-04-16   55   *		The name is expanded to X86_VENDOR_(a)_vendor
e9d7144597b10ff Mark Gross      2020-04-16   56   * @_family:	The family number or X86_FAMILY_ANY
e9d7144597b10ff Mark Gross      2020-04-16   57   * @_model:	The model number, model constant or X86_MODEL_ANY
e9d7144597b10ff Mark Gross      2020-04-16   58   * @_feature:	A X86_FEATURE bit or X86_FEATURE_ANY
e9d7144597b10ff Mark Gross      2020-04-16   59   * @_data:	Driver specific data or NULL. The internal storage
e9d7144597b10ff Mark Gross      2020-04-16   60   *		format is unsigned long. The supplied value, pointer
e9d7144597b10ff Mark Gross      2020-04-16   61   *		etc. is casted to unsigned long internally.
e9d7144597b10ff Mark Gross      2020-04-16   62   *
e9d7144597b10ff Mark Gross      2020-04-16   63   * The steppings arguments of X86_MATCH_VENDOR_FAM_MODEL_STEPPINGS_FEATURE() is
e9d7144597b10ff Mark Gross      2020-04-16   64   * set to wildcards.
e9d7144597b10ff Mark Gross      2020-04-16   65   */
e9d7144597b10ff Mark Gross      2020-04-16   66  #define X86_MATCH_VENDOR_FAM_MODEL_FEATURE(vendor, family, model, feature, data) \
e9d7144597b10ff Mark Gross      2020-04-16   67  	X86_MATCH_VENDOR_FAM_MODEL_STEPPINGS_FEATURE(vendor, family, model, \
e9d7144597b10ff Mark Gross      2020-04-16   68  						X86_STEPPING_ANY, feature, data)
e9d7144597b10ff Mark Gross      2020-04-16   69  
20d437447c0089c Thomas Gleixner 2020-03-20   70  /**
20d437447c0089c Thomas Gleixner 2020-03-20   71   * X86_MATCH_VENDOR_FAM_FEATURE - Macro for matching vendor, family and CPU feature
20d437447c0089c Thomas Gleixner 2020-03-20   72   * @vendor:	The vendor name, e.g. INTEL, AMD, HYGON, ..., ANY
20d437447c0089c Thomas Gleixner 2020-03-20   73   *		The name is expanded to X86_VENDOR_(a)vendor
20d437447c0089c Thomas Gleixner 2020-03-20   74   * @family:	The family number or X86_FAMILY_ANY
20d437447c0089c Thomas Gleixner 2020-03-20   75   * @feature:	A X86_FEATURE bit
20d437447c0089c Thomas Gleixner 2020-03-20   76   * @data:	Driver specific data or NULL. The internal storage
20d437447c0089c Thomas Gleixner 2020-03-20   77   *		format is unsigned long. The supplied value, pointer
20d437447c0089c Thomas Gleixner 2020-03-20   78   *		etc. is casted to unsigned long internally.
20d437447c0089c Thomas Gleixner 2020-03-20   79   *
20d437447c0089c Thomas Gleixner 2020-03-20   80   * All other missing arguments of X86_MATCH_VENDOR_FAM_MODEL_FEATURE() are
20d437447c0089c Thomas Gleixner 2020-03-20   81   * set to wildcards.
20d437447c0089c Thomas Gleixner 2020-03-20   82   */
20d437447c0089c Thomas Gleixner 2020-03-20   83  #define X86_MATCH_VENDOR_FAM_FEATURE(vendor, family, feature, data)	\
20d437447c0089c Thomas Gleixner 2020-03-20   84  	X86_MATCH_VENDOR_FAM_MODEL_FEATURE(vendor, family,		\
20d437447c0089c Thomas Gleixner 2020-03-20   85  					   X86_MODEL_ANY, feature, data)
20d437447c0089c Thomas Gleixner 2020-03-20   86  
20d437447c0089c Thomas Gleixner 2020-03-20   87  /**
20d437447c0089c Thomas Gleixner 2020-03-20   88   * X86_MATCH_VENDOR_FEATURE - Macro for matching vendor and CPU feature
20d437447c0089c Thomas Gleixner 2020-03-20   89   * @vendor:	The vendor name, e.g. INTEL, AMD, HYGON, ..., ANY
20d437447c0089c Thomas Gleixner 2020-03-20   90   *		The name is expanded to X86_VENDOR_(a)vendor
20d437447c0089c Thomas Gleixner 2020-03-20   91   * @feature:	A X86_FEATURE bit
20d437447c0089c Thomas Gleixner 2020-03-20   92   * @data:	Driver specific data or NULL. The internal storage
20d437447c0089c Thomas Gleixner 2020-03-20   93   *		format is unsigned long. The supplied value, pointer
20d437447c0089c Thomas Gleixner 2020-03-20   94   *		etc. is casted to unsigned long internally.
20d437447c0089c Thomas Gleixner 2020-03-20   95   *
20d437447c0089c Thomas Gleixner 2020-03-20   96   * All other missing arguments of X86_MATCH_VENDOR_FAM_MODEL_FEATURE() are
20d437447c0089c Thomas Gleixner 2020-03-20   97   * set to wildcards.
20d437447c0089c Thomas Gleixner 2020-03-20   98   */
20d437447c0089c Thomas Gleixner 2020-03-20   99  #define X86_MATCH_VENDOR_FEATURE(vendor, feature, data)			\
20d437447c0089c Thomas Gleixner 2020-03-20  100  	X86_MATCH_VENDOR_FAM_FEATURE(vendor, X86_FAMILY_ANY, feature, data)
20d437447c0089c Thomas Gleixner 2020-03-20  101  
20d437447c0089c Thomas Gleixner 2020-03-20  102  /**
20d437447c0089c Thomas Gleixner 2020-03-20  103   * X86_MATCH_FEATURE - Macro for matching a CPU feature
20d437447c0089c Thomas Gleixner 2020-03-20  104   * @feature:	A X86_FEATURE bit
20d437447c0089c Thomas Gleixner 2020-03-20  105   * @data:	Driver specific data or NULL. The internal storage
20d437447c0089c Thomas Gleixner 2020-03-20  106   *		format is unsigned long. The supplied value, pointer
20d437447c0089c Thomas Gleixner 2020-03-20  107   *		etc. is casted to unsigned long internally.
20d437447c0089c Thomas Gleixner 2020-03-20  108   *
20d437447c0089c Thomas Gleixner 2020-03-20  109   * All other missing arguments of X86_MATCH_VENDOR_FAM_MODEL_FEATURE() are
20d437447c0089c Thomas Gleixner 2020-03-20  110   * set to wildcards.
20d437447c0089c Thomas Gleixner 2020-03-20  111   */
20d437447c0089c Thomas Gleixner 2020-03-20  112  #define X86_MATCH_FEATURE(feature, data)				\
20d437447c0089c Thomas Gleixner 2020-03-20  113  	X86_MATCH_VENDOR_FEATURE(ANY, feature, data)
20d437447c0089c Thomas Gleixner 2020-03-20  114  
20d437447c0089c Thomas Gleixner 2020-03-20  115  /**
20d437447c0089c Thomas Gleixner 2020-03-20  116   * X86_MATCH_VENDOR_FAM_MODEL - Match vendor, family and model
20d437447c0089c Thomas Gleixner 2020-03-20  117   * @vendor:	The vendor name, e.g. INTEL, AMD, HYGON, ..., ANY
20d437447c0089c Thomas Gleixner 2020-03-20  118   *		The name is expanded to X86_VENDOR_(a)vendor
20d437447c0089c Thomas Gleixner 2020-03-20  119   * @family:	The family number or X86_FAMILY_ANY
20d437447c0089c Thomas Gleixner 2020-03-20  120   * @model:	The model number, model constant or X86_MODEL_ANY
20d437447c0089c Thomas Gleixner 2020-03-20  121   * @data:	Driver specific data or NULL. The internal storage
20d437447c0089c Thomas Gleixner 2020-03-20  122   *		format is unsigned long. The supplied value, pointer
20d437447c0089c Thomas Gleixner 2020-03-20  123   *		etc. is casted to unsigned long internally.
20d437447c0089c Thomas Gleixner 2020-03-20  124   *
20d437447c0089c Thomas Gleixner 2020-03-20  125   * All other missing arguments of X86_MATCH_VENDOR_FAM_MODEL_FEATURE() are
20d437447c0089c Thomas Gleixner 2020-03-20  126   * set to wildcards.
20d437447c0089c Thomas Gleixner 2020-03-20  127   */
20d437447c0089c Thomas Gleixner 2020-03-20  128  #define X86_MATCH_VENDOR_FAM_MODEL(vendor, family, model, data)		\
20d437447c0089c Thomas Gleixner 2020-03-20  129  	X86_MATCH_VENDOR_FAM_MODEL_FEATURE(vendor, family, model,	\
20d437447c0089c Thomas Gleixner 2020-03-20  130  					   X86_FEATURE_ANY, data)
20d437447c0089c Thomas Gleixner 2020-03-20  131  
20d437447c0089c Thomas Gleixner 2020-03-20  132  /**
20d437447c0089c Thomas Gleixner 2020-03-20  133   * X86_MATCH_VENDOR_FAM - Match vendor and family
20d437447c0089c Thomas Gleixner 2020-03-20  134   * @vendor:	The vendor name, e.g. INTEL, AMD, HYGON, ..., ANY
20d437447c0089c Thomas Gleixner 2020-03-20  135   *		The name is expanded to X86_VENDOR_(a)vendor
20d437447c0089c Thomas Gleixner 2020-03-20  136   * @family:	The family number or X86_FAMILY_ANY
20d437447c0089c Thomas Gleixner 2020-03-20  137   * @data:	Driver specific data or NULL. The internal storage
20d437447c0089c Thomas Gleixner 2020-03-20  138   *		format is unsigned long. The supplied value, pointer
20d437447c0089c Thomas Gleixner 2020-03-20  139   *		etc. is casted to unsigned long internally.
20d437447c0089c Thomas Gleixner 2020-03-20  140   *
20d437447c0089c Thomas Gleixner 2020-03-20  141   * All other missing arguments to X86_MATCH_VENDOR_FAM_MODEL_FEATURE() are
20d437447c0089c Thomas Gleixner 2020-03-20  142   * set of wildcards.
20d437447c0089c Thomas Gleixner 2020-03-20  143   */
20d437447c0089c Thomas Gleixner 2020-03-20  144  #define X86_MATCH_VENDOR_FAM(vendor, family, data)			\
20d437447c0089c Thomas Gleixner 2020-03-20  145  	X86_MATCH_VENDOR_FAM_MODEL(vendor, family, X86_MODEL_ANY, data)
20d437447c0089c Thomas Gleixner 2020-03-20  146  
20d437447c0089c Thomas Gleixner 2020-03-20  147  /**
20d437447c0089c Thomas Gleixner 2020-03-20  148   * X86_MATCH_INTEL_FAM6_MODEL - Match vendor INTEL, family 6 and model
20d437447c0089c Thomas Gleixner 2020-03-20  149   * @model:	The model name without the INTEL_FAM6_ prefix or ANY
20d437447c0089c Thomas Gleixner 2020-03-20  150   *		The model name is expanded to INTEL_FAM6_(a)model internally
20d437447c0089c Thomas Gleixner 2020-03-20  151   * @data:	Driver specific data or NULL. The internal storage
20d437447c0089c Thomas Gleixner 2020-03-20  152   *		format is unsigned long. The supplied value, pointer
20d437447c0089c Thomas Gleixner 2020-03-20  153   *		etc. is casted to unsigned long internally.
20d437447c0089c Thomas Gleixner 2020-03-20  154   *
20d437447c0089c Thomas Gleixner 2020-03-20  155   * The vendor is set to INTEL, the family to 6 and all other missing
20d437447c0089c Thomas Gleixner 2020-03-20  156   * arguments of X86_MATCH_VENDOR_FAM_MODEL_FEATURE() are set to wildcards.
20d437447c0089c Thomas Gleixner 2020-03-20  157   *
20d437447c0089c Thomas Gleixner 2020-03-20  158   * See X86_MATCH_VENDOR_FAM_MODEL_FEATURE() for further information.
20d437447c0089c Thomas Gleixner 2020-03-20  159   */
20d437447c0089c Thomas Gleixner 2020-03-20  160  #define X86_MATCH_INTEL_FAM6_MODEL(model, data)				\

20d437447c0089c Thomas Gleixner 2020-03-20 @161 X86_MATCH_VENDOR_FAM_MODEL(INTEL, 6, INTEL_FAM6_##model, data)
20d437447c0089c Thomas Gleixner 2020-03-20 162

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org