Skip to content

Commit 8abbcfe

Browse files
Kan LiangPeter Zijlstra
authored andcommitted
perf/x86/intel/uncore: Split the Ice Lake and Tiger Lake MSR uncore support
Previously, the MSR uncore for the Ice Lake and Tiger Lake are identical. The code path is shared. However, with recent update, the global MSR_UNC_PERF_GLOBAL_CTRL register and ARB uncore unit are changed for the Ice Lake. Split the Ice Lake and Tiger Lake MSR uncore support. The changes only impact the MSR ops() and the ARB uncore unit. Other codes can still be shared between the Ice Lake and the Tiger Lake. Signed-off-by: Kan Liang <kan.liang@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20200925134905.8839-1-kan.liang@linux.intel.com
1 parent a3b1e84 commit 8abbcfe

3 files changed

Lines changed: 19 additions & 2 deletions

File tree

arch/x86/events/intel/uncore.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1627,12 +1627,12 @@ static const struct intel_uncore_init_fun icl_uncore_init __initconst = {
16271627
};
16281628

16291629
static const struct intel_uncore_init_fun tgl_uncore_init __initconst = {
1630-
.cpu_init = icl_uncore_cpu_init,
1630+
.cpu_init = tgl_uncore_cpu_init,
16311631
.mmio_init = tgl_uncore_mmio_init,
16321632
};
16331633

16341634
static const struct intel_uncore_init_fun tgl_l_uncore_init __initconst = {
1635-
.cpu_init = icl_uncore_cpu_init,
1635+
.cpu_init = tgl_uncore_cpu_init,
16361636
.mmio_init = tgl_l_uncore_mmio_init,
16371637
};
16381638

arch/x86/events/intel/uncore.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,7 @@ void snb_uncore_cpu_init(void);
568568
void nhm_uncore_cpu_init(void);
569569
void skl_uncore_cpu_init(void);
570570
void icl_uncore_cpu_init(void);
571+
void tgl_uncore_cpu_init(void);
571572
void tgl_uncore_mmio_init(void);
572573
void tgl_l_uncore_mmio_init(void);
573574
int snb_pci2phy_map_init(int devid);

arch/x86/events/intel/uncore_snb.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,22 @@ void icl_uncore_cpu_init(void)
377377
snb_uncore_arb.ops = &skl_uncore_msr_ops;
378378
}
379379

380+
static struct intel_uncore_type *tgl_msr_uncores[] = {
381+
&icl_uncore_cbox,
382+
&snb_uncore_arb,
383+
&icl_uncore_clockbox,
384+
NULL,
385+
};
386+
387+
void tgl_uncore_cpu_init(void)
388+
{
389+
uncore_msr_uncores = tgl_msr_uncores;
390+
icl_uncore_cbox.num_boxes = icl_get_cbox_num();
391+
icl_uncore_cbox.ops = &skl_uncore_msr_ops;
392+
icl_uncore_clockbox.ops = &skl_uncore_msr_ops;
393+
snb_uncore_arb.ops = &skl_uncore_msr_ops;
394+
}
395+
380396
enum {
381397
SNB_PCI_UNCORE_IMC,
382398
};

0 commit comments

Comments
 (0)