Linux-EDAC Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v1 1/1] EDAC, {skx,i10nm}: Use CPU stepping macro to pass configurations
@ 2020-05-09  1:08 Qiuxu Zhuo
  2020-05-10 12:29 ` kbuild test robot
  2020-05-10 19:37 ` kbuild test robot
  0 siblings, 2 replies; 3+ messages in thread
From: Qiuxu Zhuo @ 2020-05-09  1:08 UTC (permalink / raw)
  To: bp; +Cc: tony.luck, aris, mchehab, linux-edac, Qiuxu Zhuo

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(-)

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);
-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 1/1] EDAC, {skx,i10nm}: Use CPU stepping macro to pass configurations
  2020-05-09  1:08 [PATCH v1 1/1] EDAC, {skx,i10nm}: Use CPU stepping macro to pass configurations Qiuxu Zhuo
@ 2020-05-10 12:29 ` kbuild test robot
  2020-05-10 19:37 ` kbuild test robot
  1 sibling, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2020-05-10 12:29 UTC (permalink / raw)
  To: Qiuxu Zhuo, bp, tony.luck, aris, mchehab, linux-edac
  Cc: kbuild-all, tony.luck, aris, mchehab, linux-edac


[-- Attachment #1: Type: text/plain, Size: 3383 bytes --]

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 73357 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 1/1] EDAC, {skx,i10nm}: Use CPU stepping macro to pass configurations
  2020-05-09  1:08 [PATCH v1 1/1] EDAC, {skx,i10nm}: Use CPU stepping macro to pass configurations Qiuxu Zhuo
  2020-05-10 12:29 ` kbuild test robot
@ 2020-05-10 19:37 ` kbuild test robot
  1 sibling, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2020-05-10 19:37 UTC (permalink / raw)
  To: Qiuxu Zhuo, bp, tony.luck, aris, mchehab, linux-edac
  Cc: kbuild-all, tony.luck, aris, mchehab, linux-edac


[-- Attachment #1: Type: text/plain, Size: 2370 bytes --]

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31068 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-09  1:08 [PATCH v1 1/1] EDAC, {skx,i10nm}: Use CPU stepping macro to pass configurations Qiuxu Zhuo
2020-05-10 12:29 ` kbuild test robot
2020-05-10 19:37 ` kbuild test robot

Linux-EDAC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-edac/0 linux-edac/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-edac linux-edac/ https://lore.kernel.org/linux-edac \
		linux-edac@vger.kernel.org
	public-inbox-index linux-edac

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-edac


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git