x86/CPU: Add more Icelake model number
Subsystems (3)
PATCH 1/3 x86/CPU: Add more Icelake model number
From: Kan Liang <[email protected]>
Add the CPUID model number of Icelake (ICL) desktop and server processors to the Intel family list.
--- arch/x86/include/asm/intel-family.h | 3 +++ 1 file changed, 3 insertions(+)
arch/x86/include/asm/intel-family.h +3 -0
@@ -52,6 +52,9 @@#define INTEL_FAM6_CANNONLAKE_MOBILE 0x66 +#define INTEL_FAM6_ICELAKE_X 0x6A +#define INTEL_FAM6_ICELAKE_XEON_D 0x6C +#define INTEL_FAM6_ICELAKE_DESKTOP 0x7D#define INTEL_FAM6_ICELAKE_MOBILE 0x7E/* "Small Core" Processors (Atom) */
Signature · 1 line
2.14.5
PATCH 2/3 perf/x86/intel: Add more Icelake CPUIDs
From: Kan Liang <[email protected]>
Add new model number for Icelake desktop and server to perf.
The data source encoding for Icelake server is the same as Skylake server.
--- arch/x86/events/intel/core.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
arch/x86/events/intel/core.c +6 -1
@@ -4940,6 +4940,9 @@ __init int intel_pmu_init(void)break ;case INTEL_FAM6_ICELAKE_MOBILE : +case INTEL_FAM6_ICELAKE_DESKTOP : +case INTEL_FAM6_ICELAKE_X : +case INTEL_FAM6_ICELAKE_XEON_D : x86_pmu.late_ack = true;memcpy (hw_cache_event_ids, skl_hw_cache_event_ids,sizeof (hw_cache_event_ids));memcpy (hw_cache_extra_regs, skl_hw_cache_extra_regs,sizeof (hw_cache_extra_regs));
@@ -4962,7 +4965,9 @@ __init int intel_pmu_init(void) x86_pmu.cpu_events =get_icl_events_attrs (); x86_pmu.rtm_abort_event = X86_CONFIG(.event=0xca, .umask=0x02); x86_pmu.lbr_pt_coexist = true; -intel_pmu_pebs_data_source_skl (false); +intel_pmu_pebs_data_source_skl ( + (boot_cpu_data.x86_model ==INTEL_FAM6_ICELAKE_X ) || + (boot_cpu_data.x86_model ==INTEL_FAM6_ICELAKE_XEON_D ));pr_cont ("Icelake events, " ); name ="icelake" ;break ;
Signature · 1 line
2.14.5
Peter Zijlstra
maintainerRe: [PATCH 2/3] perf/x86/intel: Add more Icelake CPUIDs
Review __init int intel_pmu_init(void) · line 4970
Quoted 8 lines · On Mon, Jun 03, 2019 at 06:41:21AM -0700, [email protected] wrote:
(quoted diff) +3
-1@@ -4962,7 +4965,9 @@ __init int intel_pmu_init(void) x86_pmu.cpu_events = get_icl_events_attrs(); x86_pmu.rtm_abort_event = X86_CONFIG(.event=0xca, .umask=0x02); x86_pmu.lbr_pt_coexist = true; - intel_pmu_pebs_data_source_skl(false); + intel_pmu_pebs_data_source_skl( + (boot_cpu_data.x86_model == INTEL_FAM6_ICELAKE_X) || + (boot_cpu_data.x86_model == INTEL_FAM6_ICELAKE_XEON_D));
That's pretty sad, a model switch inside a model switch :/
Review __init int intel_pmu_init(void) · line 4973
Quoted 3 lines
(quoted diff) +0
-0pr_cont("Icelake events, "); name = "icelake"; break;
Would something like so not be nicer?
---
arch/x86/events/intel/core.c +9 -4
@@ -4485,6 +4485,7 @@ __init int intel_pmu_init(void)struct event_constraint *c;unsigned int unused;struct extra_reg *er; +bool pmem = false;int version, i;char *name;
@@ -4936,9 +4937,10 @@ __init int intel_pmu_init(void) name ="knights-landing" ;break ; +case INTEL_FAM6_SKYLAKE_X : + pmem = true;case INTEL_FAM6_SKYLAKE_MOBILE :case INTEL_FAM6_SKYLAKE_DESKTOP : -case INTEL_FAM6_SKYLAKE_X :case INTEL_FAM6_KABYLAKE_MOBILE :case INTEL_FAM6_KABYLAKE_DESKTOP :x86_add_quirk (intel_pebs_isolation_quirk);
@@ -4970,8 +4972,7 @@ __init int intel_pmu_init(void) td_attr = hsw_events_attrs; mem_attr = hsw_mem_events_attrs; tsx_attr = hsw_tsx_events_attrs; -intel_pmu_pebs_data_source_skl ( - boot_cpu_data.x86_model ==INTEL_FAM6_SKYLAKE_X ); +intel_pmu_pebs_data_source_skl (pmem);if (boot_cpu_has (X86_FEATURE_TSX_FORCE_ABORT )) { x86_pmu.flags |=PMU_FL_TFA ;
@@ -4985,7 +4986,11 @@ __init int intel_pmu_init(void) name ="skylake" ;break ; +case INTEL_FAM6_ICELAKE_X : +case INTEL_FAM6_ICELAKE_XEON_D : + pmem = true;case INTEL_FAM6_ICELAKE_MOBILE : +case INTEL_FAM6_ICELAKE_DESKTOP : x86_pmu.late_ack = true;memcpy (hw_cache_event_ids, skl_hw_cache_event_ids,sizeof (hw_cache_event_ids));memcpy (hw_cache_extra_regs, skl_hw_cache_extra_regs,sizeof (hw_cache_extra_regs));
@@ -5009,7 +5014,7 @@ __init int intel_pmu_init(void) tsx_attr = icl_tsx_events_attrs; x86_pmu.rtm_abort_event = X86_CONFIG(.event=0xca, .umask=0x02); x86_pmu.lbr_pt_coexist = true; -intel_pmu_pebs_data_source_skl (false); +intel_pmu_pebs_data_source_skl (pmem);pr_cont ("Icelake events, " ); name ="icelake" ;break ;
Re: [PATCH 2/3] perf/x86/intel: Add more Icelake CPUIDs
Quoted 12 lines · Peter Zijlstra
Review __init int intel_pmu_init(void) · line 4970
Quoted 8 lines · On Mon, Jun 03, 2019 at 06:41:21AM -0700, [email protected] wrote:
(quoted diff) +3
-1@@ -4962,7 +4965,9 @@ __init int intel_pmu_init(void) x86_pmu.cpu_events = get_icl_events_attrs(); x86_pmu.rtm_abort_event = X86_CONFIG(.event=0xca, .umask=0x02); x86_pmu.lbr_pt_coexist = true; - intel_pmu_pebs_data_source_skl(false); + intel_pmu_pebs_data_source_skl( + (boot_cpu_data.x86_model == INTEL_FAM6_ICELAKE_X) || + (boot_cpu_data.x86_model == INTEL_FAM6_ICELAKE_XEON_D));That's pretty sad, a model switch inside a model switch :/
Quoted 5 lines
arch/x86/events/intel/core.c __init int intel_pmu_init(void) · line 5020
Quoted 3 lines
arch/x86/events/intel/core.c +0
-0pr_cont ("Icelake events, " ); name ="icelake" ;break ;Would something like so not be nicer?
Yes, it looks better. Thanks.
Should I combine your patch with mine, and send out V2? Or are you prefer to add your patch on top of this patch set?
Thanks,
Kan
Quoted 56 lines
---
arch/x86/events/intel/core.c +9
-4@@ -4485,6 +4485,7 @@ __init int intel_pmu_init(void)struct event_constraint *c;unsigned int unused;struct extra_reg *er; +bool pmem = false;int version, i;char *name;@@ -4936,9 +4937,10 @@ __init int intel_pmu_init(void) name ="knights-landing" ;break ; +case INTEL_FAM6_SKYLAKE_X : + pmem = true;case INTEL_FAM6_SKYLAKE_MOBILE :case INTEL_FAM6_SKYLAKE_DESKTOP : -case INTEL_FAM6_SKYLAKE_X :case INTEL_FAM6_KABYLAKE_MOBILE :case INTEL_FAM6_KABYLAKE_DESKTOP :x86_add_quirk (intel_pebs_isolation_quirk);@@ -4970,8 +4972,7 @@ __init int intel_pmu_init(void) td_attr = hsw_events_attrs; mem_attr = hsw_mem_events_attrs; tsx_attr = hsw_tsx_events_attrs; -intel_pmu_pebs_data_source_skl ( - boot_cpu_data.x86_model ==INTEL_FAM6_SKYLAKE_X ); +intel_pmu_pebs_data_source_skl (pmem);if (boot_cpu_has (X86_FEATURE_TSX_FORCE_ABORT )) { x86_pmu.flags |=PMU_FL_TFA ;@@ -4985,7 +4986,11 @@ __init int intel_pmu_init(void) name ="skylake" ;break ; +case INTEL_FAM6_ICELAKE_X : +case INTEL_FAM6_ICELAKE_XEON_D : + pmem = true;case INTEL_FAM6_ICELAKE_MOBILE : +case INTEL_FAM6_ICELAKE_DESKTOP : x86_pmu.late_ack = true;memcpy (hw_cache_event_ids, skl_hw_cache_event_ids,sizeof (hw_cache_event_ids));memcpy (hw_cache_extra_regs, skl_hw_cache_extra_regs,sizeof (hw_cache_extra_regs));@@ -5009,7 +5014,7 @@ __init int intel_pmu_init(void) tsx_attr = icl_tsx_events_attrs; x86_pmu.rtm_abort_event = X86_CONFIG(.event=0xca, .umask=0x02); x86_pmu.lbr_pt_coexist = true; -intel_pmu_pebs_data_source_skl (false); +intel_pmu_pebs_data_source_skl (pmem);pr_cont ("Icelake events, " ); name ="icelake" ;break ;
Peter Zijlstra
maintainerRe: [PATCH 2/3] perf/x86/intel: Add more Icelake CPUIDs
Quoted 19 lines · Kan
Quoted 16 lines · Peter Zijlstra
Review __init int intel_pmu_init(void) · line 4970
Quoted 8 lines · On Mon, Jun 03, 2019 at 06:41:21AM -0700, [email protected] wrote:
(quoted diff) +3
-1@@ -4962,7 +4965,9 @@ __init int intel_pmu_init(void) x86_pmu.cpu_events = get_icl_events_attrs(); x86_pmu.rtm_abort_event = X86_CONFIG(.event=0xca, .umask=0x02); x86_pmu.lbr_pt_coexist = true; - intel_pmu_pebs_data_source_skl(false); + intel_pmu_pebs_data_source_skl( + (boot_cpu_data.x86_model == INTEL_FAM6_ICELAKE_X) || + (boot_cpu_data.x86_model == INTEL_FAM6_ICELAKE_XEON_D));That's pretty sad, a model switch inside a model switch :/
Quoted 3 lines
arch/x86/events/intel/core.c +0
-0pr_cont ("Icelake events, " ); name ="icelake" ;break ;
Quoted 6 lines
Quoted 1 line
Would something like so not be nicer?
Yes, it looks better. Thanks.
Should I combine your patch with mine, and send out V2? Or are you prefer to add your patch on top of this patch set?
I'll frob it. Thanks!
tip-bot for Kan Liang
merge bot[tip:perf/core] perf/x86/intel: Add more Icelake CPUIDs
In reply to [email protected]perf/x86/intel: Add more Icelake CPUIDs
Commit-ID: faaeff98666c24376cebd0b106504d05a36881d1 Gitweb: https://git.kernel.org/tip/faaeff98666c24376cebd0b106504d05a36881d1 Author: Kan Liang <[email protected]> AuthorDate: Mon, 3 Jun 2019 06:41:21 -0700 Committer: Ingo Molnar <[email protected]> CommitDate: Mon, 17 Jun 2019 12:36:16 +0200
perf/x86/intel: Add more Icelake CPUIDs
Add new model number for Icelake desktop and server to perf.
The data source encoding for Icelake server is the same as Skylake server.
--- arch/x86/events/intel/core.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
arch/x86/events/intel/core.c +9 -4
@@ -4485,6 +4485,7 @@ __init int intel_pmu_init(void)struct event_constraint *c;unsigned int unused;struct extra_reg *er; +bool pmem = false;int version, i;char *name;
@@ -4936,9 +4937,10 @@ __init int intel_pmu_init(void) name ="knights-landing" ;break ; +case INTEL_FAM6_SKYLAKE_X : + pmem = true;case INTEL_FAM6_SKYLAKE_MOBILE :case INTEL_FAM6_SKYLAKE_DESKTOP : -case INTEL_FAM6_SKYLAKE_X :case INTEL_FAM6_KABYLAKE_MOBILE :case INTEL_FAM6_KABYLAKE_DESKTOP :x86_add_quirk (intel_pebs_isolation_quirk);
@@ -4970,8 +4972,7 @@ __init int intel_pmu_init(void) td_attr = hsw_events_attrs; mem_attr = hsw_mem_events_attrs; tsx_attr = hsw_tsx_events_attrs; -intel_pmu_pebs_data_source_skl ( - boot_cpu_data.x86_model ==INTEL_FAM6_SKYLAKE_X ); +intel_pmu_pebs_data_source_skl (pmem);if (boot_cpu_has (X86_FEATURE_TSX_FORCE_ABORT )) { x86_pmu.flags |=PMU_FL_TFA ;
@@ -4985,7 +4986,11 @@ __init int intel_pmu_init(void) name ="skylake" ;break ; +case INTEL_FAM6_ICELAKE_X : +case INTEL_FAM6_ICELAKE_XEON_D : + pmem = true;case INTEL_FAM6_ICELAKE_MOBILE : +case INTEL_FAM6_ICELAKE_DESKTOP : x86_pmu.late_ack = true;memcpy (hw_cache_event_ids, skl_hw_cache_event_ids,sizeof (hw_cache_event_ids));memcpy (hw_cache_extra_regs, skl_hw_cache_extra_regs,sizeof (hw_cache_extra_regs));
@@ -5009,7 +5014,7 @@ __init int intel_pmu_init(void) tsx_attr = icl_tsx_events_attrs; x86_pmu.rtm_abort_event = X86_CONFIG(.event=0xca, .umask=0x02); x86_pmu.lbr_pt_coexist = true; -intel_pmu_pebs_data_source_skl (false); +intel_pmu_pebs_data_source_skl (pmem);pr_cont ("Icelake events, " ); name ="icelake" ;break ;
PATCH 3/3 perf/x86/intel: Add Icelake desktop CPUID
In reply to [email protected]From: Kan Liang <[email protected]>
Add new Icelake desktop CPUID for RAPL, CSTATE and UNCORE.
--- arch/x86/events/intel/cstate.c | 1 + arch/x86/events/intel/rapl.c | 1 + arch/x86/events/intel/uncore.c | 1 + 3 files changed, 3 insertions(+)
arch/x86/events/intel/cstate.c +1 -0
@@ -580,6 +580,7 @@ static const struct x86_cpu_id intel_cstates_match[] __initconst = {X86_CSTATES_MODEL (INTEL_FAM6_ATOM_GOLDMONT_PLUS , glm_cstates),X86_CSTATES_MODEL (INTEL_FAM6_ICELAKE_MOBILE , snb_cstates), +X86_CSTATES_MODEL (INTEL_FAM6_ICELAKE_DESKTOP , snb_cstates), { }, };MODULE_DEVICE_TABLE (x86cpu, intel_cstates_match);
arch/x86/events/intel/rapl.c +1 -0
@@ -777,6 +777,7 @@ static const struct x86_cpu_id rapl_cpu_match[] __initconst = {X86_RAPL_MODEL_MATCH (INTEL_FAM6_ATOM_GOLDMONT_PLUS , hsw_rapl_init),X86_RAPL_MODEL_MATCH (INTEL_FAM6_ICELAKE_MOBILE , skl_rapl_init), + X86_RAPL_MODEL_MATCH(INTEL_FAM6_ICELAKE_DESKTOP, skl_rapl_init), {}, };
arch/x86/events/intel/uncore.c +1 -0
@@ -1399,6 +1399,7 @@ static const struct x86_cpu_id intel_uncore_match[] __initconst = {X86_UNCORE_MODEL_MATCH (INTEL_FAM6_KABYLAKE_MOBILE , skl_uncore_init),X86_UNCORE_MODEL_MATCH (INTEL_FAM6_KABYLAKE_DESKTOP , skl_uncore_init),X86_UNCORE_MODEL_MATCH (INTEL_FAM6_ICELAKE_MOBILE , icl_uncore_init), + X86_UNCORE_MODEL_MATCH(INTEL_FAM6_ICELAKE_DESKTOP, icl_uncore_init), {}, };
Signature · 1 line
2.14.5
tip-bot for Kan Liang
merge bot[tip:perf/core] perf/x86/intel: Add Icelake desktop CPUID
perf/x86/intel: Add Icelake desktop CPUID
Commit-ID: 2a538fda82824a7722e296be656bb5d11d91a9cb Gitweb: https://git.kernel.org/tip/2a538fda82824a7722e296be656bb5d11d91a9cb Author: Kan Liang <[email protected]> AuthorDate: Mon, 3 Jun 2019 06:41:22 -0700 Committer: Ingo Molnar <[email protected]> CommitDate: Mon, 17 Jun 2019 12:36:14 +0200
perf/x86/intel: Add Icelake desktop CPUID
Add new Icelake desktop CPUID for RAPL, CSTATE and UNCORE.
--- arch/x86/events/intel/cstate.c | 1 + arch/x86/events/intel/rapl.c | 1 + arch/x86/events/intel/uncore.c | 1 + 3 files changed, 3 insertions(+)
arch/x86/events/intel/cstate.c +1 -0
@@ -580,6 +580,7 @@ static const struct x86_cpu_id intel_cstates_match[] __initconst = {X86_CSTATES_MODEL (INTEL_FAM6_ATOM_GOLDMONT_PLUS , glm_cstates),X86_CSTATES_MODEL (INTEL_FAM6_ICELAKE_MOBILE , snb_cstates), +X86_CSTATES_MODEL (INTEL_FAM6_ICELAKE_DESKTOP , snb_cstates), { }, };MODULE_DEVICE_TABLE (x86cpu, intel_cstates_match);
arch/x86/events/intel/rapl.c +1 -0
@@ -778,6 +778,7 @@ static const struct x86_cpu_id rapl_cpu_match[] __initconst = {X86_RAPL_MODEL_MATCH (INTEL_FAM6_ATOM_GOLDMONT_PLUS , hsw_rapl_init),X86_RAPL_MODEL_MATCH (INTEL_FAM6_ICELAKE_MOBILE , skl_rapl_init), + X86_RAPL_MODEL_MATCH(INTEL_FAM6_ICELAKE_DESKTOP, skl_rapl_init), {}, };
arch/x86/events/intel/uncore.c +1 -0
@@ -1403,6 +1403,7 @@ static const struct x86_cpu_id intel_uncore_match[] __initconst = {X86_UNCORE_MODEL_MATCH (INTEL_FAM6_KABYLAKE_DESKTOP , skl_uncore_init),X86_UNCORE_MODEL_MATCH (INTEL_FAM6_ICELAKE_MOBILE , icl_uncore_init),X86_UNCORE_MODEL_MATCH (INTEL_FAM6_ICELAKE_NNPI , icl_uncore_init), + X86_UNCORE_MODEL_MATCH(INTEL_FAM6_ICELAKE_DESKTOP, icl_uncore_init), {}, };
Borislav Petkov
maintainerQuoted 7 lines · On Mon, Jun 03, 2019 at 06:41:20AM -0700, [email protected] wrote:
From: Kan Liang <[email protected]>
Add the CPUID model number of Icelake (ICL) desktop and server processors to the Intel family list.
Signed-off-by Kan Liang <[email protected]>Signed-off-by Qiuxu Zhuo <[email protected]>
You're sending this patch but it has Qiuxu's SOB too. What's that supposed to mean?
Signature · 4 lines
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.Quoted 11 lines
From: Borislav Petkov [mailto:[email protected]]
...Quoted 7 lines
From: Kan Liang <[email protected]>
Add the CPUID model number of Icelake (ICL) desktop and server processors to the Intel family list.
Signed-off-by Kan Liang <[email protected]>Signed-off-by Qiuxu Zhuo <[email protected]>You're sending this patch but it has Qiuxu's SOB too. What's that supposed to mean?
Hi Boris,
During internal co-work, based on Kan's original patch, I got the "#define" in the Ice Lake group sorted by model number(the header of the file requires the sorting) and added my SOB. Dropping my SOB or adding a text "[Qiuxu: Get the macros in the Ice Lake group sorted by model number.]" at the end of the commit message - which one is better/clear for you?
Thanks!
-Qiuxu
Borislav Petkov
maintainerQuoted 6 lines · Qiuxu
During internal co-work, based on Kan's original patch, I got the "#define" in the Ice Lake group sorted by model number(the header of the file requires the sorting) and added my SOB. Dropping my SOB or adding a text "[Qiuxu: Get the macros in the Ice Lake group sorted by model number.]" at the end of the commit message - which one is better/clear for you?
I'll add that note when applying.
Thx.
Signature · 4 lines
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.Quoted 8 lines
From: Borislav Petkov [mailto:[email protected]]
Quoted 3 lines
...
Dropping my SOB or adding a text "[Qiuxu: Get the macros in the Ice Lake group sorted by model number.]" at the end of the commit message - which one is better/clear for you?I'll add that note when applying.
Thx.
Thanks Boris!
-Qiuxu
tip-bot for Kan Liang
merge bot[tip:x86/urgent] x86/CPU: Add more Icelake model numbers
In reply to [email protected]x86/CPU: Add more Icelake model numbers
Commit-ID: e35faeb64146f2015f2aec14b358ae508e4066db Gitweb: https://git.kernel.org/tip/e35faeb64146f2015f2aec14b358ae508e4066db Author: Kan Liang <[email protected]> AuthorDate: Mon, 3 Jun 2019 06:41:20 -0700 Committer: Borislav Petkov <[email protected]> CommitDate: Thu, 6 Jun 2019 09:42:36 +0200
x86/CPU: Add more Icelake model numbers
Add the CPUID model numbers of Icelake (ICL) desktop and server processors to the Intel family list.
[ Qiuxu: Sort the macros by model number. ]
--- arch/x86/include/asm/intel-family.h | 3 +++ 1 file changed, 3 insertions(+)
arch/x86/include/asm/intel-family.h +3 -0
@@ -52,6 +52,9 @@#define INTEL_FAM6_CANNONLAKE_MOBILE 0x66 +#define INTEL_FAM6_ICELAKE_X 0x6A +#define INTEL_FAM6_ICELAKE_XEON_D 0x6C +#define INTEL_FAM6_ICELAKE_DESKTOP 0x7D#define INTEL_FAM6_ICELAKE_MOBILE 0x7E/* "Small Core" Processors (Atom) */