diff mbox series

[v1,1/1] EDAC, {skx,i10nm}: Use CPU stepping macro to pass configurations

Message ID 20200509010822.76331-1-qiuxu.zhuo@intel.com (mailing list archive)
State New, archived
Headers show
Series [v1,1/1] EDAC, {skx,i10nm}: Use CPU stepping macro to pass configurations | expand

Commit Message

Zhuo, Qiuxu May 9, 2020, 1:08 a.m. UTC
Use the X86_MATCH_INTEL_FAM6_MODEL_STEPPINGS() macro to pass CPU
stepping specific configurations to {skx,i10nm}_init(), so can delete
the CPU stepping check from 10nm_init().

Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
---
 drivers/edac/i10nm_base.c | 12 +++++-------
 drivers/edac/skx_base.c   |  2 +-
 2 files changed, 6 insertions(+), 8 deletions(-)

Comments

kernel test robot May 10, 2020, 12:29 p.m. UTC | #1
Hi Qiuxu,

I love your patch! Yet something to improve:

[auto build test ERROR on ras/edac-for-next]
[also build test ERROR on next-20200508]
[cannot apply to v5.7-rc4]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Qiuxu-Zhuo/EDAC-skx-i10nm-Use-CPU-stepping-macro-to-pass-configurations/20200509-114154
base:   https://git.kernel.org/pub/scm/linux/kernel/git/ras/ras.git edac-for-next
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/edac/i10nm_base.c:138:2: error: implicit declaration of function 'X86_MATCH_INTEL_FAM6_MODEL_STEPPINGS'; did you mean 'X86_MATCH_INTEL_FAM6_MODEL'? [-Werror=implicit-function-declaration]
     X86_MATCH_INTEL_FAM6_MODEL_STEPPINGS(ATOM_TREMONT_D, X86_STEPPINGS(0x0, 0x3), &i10nm_cfg0),
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     X86_MATCH_INTEL_FAM6_MODEL
>> drivers/edac/i10nm_base.c:138:39: error: 'ATOM_TREMONT_D' undeclared here (not in a function)
     X86_MATCH_INTEL_FAM6_MODEL_STEPPINGS(ATOM_TREMONT_D, X86_STEPPINGS(0x0, 0x3), &i10nm_cfg0),
                                          ^~~~~~~~~~~~~~
>> drivers/edac/i10nm_base.c:138:55: error: implicit declaration of function 'X86_STEPPINGS'; did you mean 'CPU_STEPPING_MASK'? [-Werror=implicit-function-declaration]
     X86_MATCH_INTEL_FAM6_MODEL_STEPPINGS(ATOM_TREMONT_D, X86_STEPPINGS(0x0, 0x3), &i10nm_cfg0),
                                                          ^~~~~~~~~~~~~
                                                          CPU_STEPPING_MASK
>> drivers/edac/i10nm_base.c:140:39: error: 'ICELAKE_X' undeclared here (not in a function)
     X86_MATCH_INTEL_FAM6_MODEL_STEPPINGS(ICELAKE_X,  X86_STEPPINGS(0x0, 0x3), &i10nm_cfg0),
                                          ^~~~~~~~~
>> drivers/edac/i10nm_base.c:142:39: error: 'ICELAKE_D' undeclared here (not in a function); did you mean 'ICELAKE_X'?
     X86_MATCH_INTEL_FAM6_MODEL_STEPPINGS(ICELAKE_D,  X86_STEPPINGS(0x0, 0xf), &i10nm_cfg1),
                                          ^~~~~~~~~
                                          ICELAKE_X
   cc1: some warnings being treated as errors

vim +138 drivers/edac/i10nm_base.c

   136	
   137	static const struct x86_cpu_id i10nm_cpuids[] = {
 > 138		X86_MATCH_INTEL_FAM6_MODEL_STEPPINGS(ATOM_TREMONT_D,	X86_STEPPINGS(0x0, 0x3), &i10nm_cfg0),
   139		X86_MATCH_INTEL_FAM6_MODEL_STEPPINGS(ATOM_TREMONT_D,	X86_STEPPINGS(0x4, 0xf), &i10nm_cfg1),
 > 140		X86_MATCH_INTEL_FAM6_MODEL_STEPPINGS(ICELAKE_X,		X86_STEPPINGS(0x0, 0x3), &i10nm_cfg0),
   141		X86_MATCH_INTEL_FAM6_MODEL_STEPPINGS(ICELAKE_X,		X86_STEPPINGS(0x4, 0xf), &i10nm_cfg1),
 > 142		X86_MATCH_INTEL_FAM6_MODEL_STEPPINGS(ICELAKE_D,		X86_STEPPINGS(0x0, 0xf), &i10nm_cfg1),
   143		{}
   144	};
   145	MODULE_DEVICE_TABLE(x86cpu, i10nm_cpuids);
   146	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
kernel test robot May 10, 2020, 7:37 p.m. UTC | #2
Hi Qiuxu,

I love your patch! Yet something to improve:

[auto build test ERROR on ras/edac-for-next]
[also build test ERROR on next-20200508]
[cannot apply to v5.7-rc4]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Qiuxu-Zhuo/EDAC-skx-i10nm-Use-CPU-stepping-macro-to-pass-configurations/20200509-114154
base:   https://git.kernel.org/pub/scm/linux/kernel/git/ras/ras.git edac-for-next
config: x86_64-lkp (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/edac/skx_base.c:167:2: error: implicit declaration of function 'X86_MATCH_INTEL_FAM6_MODEL_STEPPINGS'; did you mean 'X86_MATCH_INTEL_FAM6_MODEL'? [-Werror=implicit-function-declaration]
     X86_MATCH_INTEL_FAM6_MODEL_STEPPINGS(SKYLAKE_X, X86_STEPPINGS(0x0, 0xf), &skx_cfg),
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     X86_MATCH_INTEL_FAM6_MODEL
   drivers/edac/skx_base.c:167:39: error: 'SKYLAKE_X' undeclared here (not in a function)
     X86_MATCH_INTEL_FAM6_MODEL_STEPPINGS(SKYLAKE_X, X86_STEPPINGS(0x0, 0xf), &skx_cfg),
                                          ^~~~~~~~~
>> drivers/edac/skx_base.c:167:50: error: implicit declaration of function 'X86_STEPPINGS'; did you mean 'CPU_STEPPING_MASK'? [-Werror=implicit-function-declaration]
     X86_MATCH_INTEL_FAM6_MODEL_STEPPINGS(SKYLAKE_X, X86_STEPPINGS(0x0, 0xf), &skx_cfg),
                                                     ^~~~~~~~~~~~~
                                                     CPU_STEPPING_MASK
   cc1: some warnings being treated as errors

vim +167 drivers/edac/skx_base.c

   165	
   166	static const struct x86_cpu_id skx_cpuids[] = {
 > 167		X86_MATCH_INTEL_FAM6_MODEL_STEPPINGS(SKYLAKE_X, X86_STEPPINGS(0x0, 0xf), &skx_cfg),
   168		{ }
   169	};
   170	MODULE_DEVICE_TABLE(x86cpu, skx_cpuids);
   171	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff mbox series

Patch

diff --git a/drivers/edac/i10nm_base.c b/drivers/edac/i10nm_base.c
index a6bc54b02de4..ea8f2127e238 100644
--- a/drivers/edac/i10nm_base.c
+++ b/drivers/edac/i10nm_base.c
@@ -135,9 +135,11 @@  static struct res_config i10nm_cfg1 = {
 };
 
 static const struct x86_cpu_id i10nm_cpuids[] = {
-	X86_MATCH_INTEL_FAM6_MODEL(ATOM_TREMONT_D,	&i10nm_cfg0),
-	X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_X,		&i10nm_cfg0),
-	X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_D,		&i10nm_cfg1),
+	X86_MATCH_INTEL_FAM6_MODEL_STEPPINGS(ATOM_TREMONT_D,	X86_STEPPINGS(0x0, 0x3), &i10nm_cfg0),
+	X86_MATCH_INTEL_FAM6_MODEL_STEPPINGS(ATOM_TREMONT_D,	X86_STEPPINGS(0x4, 0xf), &i10nm_cfg1),
+	X86_MATCH_INTEL_FAM6_MODEL_STEPPINGS(ICELAKE_X,		X86_STEPPINGS(0x0, 0x3), &i10nm_cfg0),
+	X86_MATCH_INTEL_FAM6_MODEL_STEPPINGS(ICELAKE_X,		X86_STEPPINGS(0x4, 0xf), &i10nm_cfg1),
+	X86_MATCH_INTEL_FAM6_MODEL_STEPPINGS(ICELAKE_D,		X86_STEPPINGS(0x0, 0xf), &i10nm_cfg1),
 	{}
 };
 MODULE_DEVICE_TABLE(x86cpu, i10nm_cpuids);
@@ -264,10 +266,6 @@  static int __init i10nm_init(void)
 
 	cfg = (struct res_config *)id->driver_data;
 
-	/* Newer steppings have different offset for ATOM_TREMONT_D/ICELAKE_X */
-	if (boot_cpu_data.x86_stepping >= 4)
-		cfg->busno_cfg_offset = 0xd0;
-
 	rc = skx_get_hi_lo(0x09a2, off, &tolm, &tohm);
 	if (rc)
 		return rc;
diff --git a/drivers/edac/skx_base.c b/drivers/edac/skx_base.c
index 94c942fd06c1..1ff22136cf72 100644
--- a/drivers/edac/skx_base.c
+++ b/drivers/edac/skx_base.c
@@ -164,7 +164,7 @@  static struct res_config skx_cfg = {
 };
 
 static const struct x86_cpu_id skx_cpuids[] = {
-	X86_MATCH_INTEL_FAM6_MODEL(SKYLAKE_X,	&skx_cfg),
+	X86_MATCH_INTEL_FAM6_MODEL_STEPPINGS(SKYLAKE_X, X86_STEPPINGS(0x0, 0xf), &skx_cfg),
 	{ }
 };
 MODULE_DEVICE_TABLE(x86cpu, skx_cpuids);