Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion arch/x86/events/zhaoxin/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ __init int zhaoxin_pmu_init(void)

if (boot_cpu_data.x86_model == 0x5b)
pr_cont("Yongfeng events, ");

if (boot_cpu_data.x86_model == 0x6b)
pr_cont("Shijidadao events, ");

Expand Down
17 changes: 9 additions & 8 deletions arch/x86/events/zhaoxin/uncore.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ static int kh40000_pcibus_limit[KH40000_MAX_SUBNODE_NUMBER];
#define KX7000_MC_B1_CHy_PMON_CTL0 0xee0
#define KX7000_MC_B1_CHy_PMON_BLK_CTL 0xef4

#define KX7000_ZDI_DL_MMIO_PMON_CTR0 0xf00
#define KX7000_ZDI_DL_MMIO_PMON_CTR0 0xf00
#define KX7000_ZDI_DL_MMIO_PMON_CTL0 0xf28
#define KX7000_ZDI_DL_MMIO_PMON_BLK_CTL 0xf44
#define KX7000_IOD_ZDI_DL_MMIO_BASE_OFFSET 0x168
Expand Down Expand Up @@ -397,24 +397,24 @@ DEFINE_PER_CPU(cpumask_t, zx_subnode_core_bits);

static void zx_gen_core_map(void)
{
int i, nr, cpu;
int cpu, i;
int cluster_id, subnode_id;

for_each_present_cpu(cpu) {
cluster_id = zx_topology_cluster_id(cpu);

for (i = 0; i < 4; i++) {
nr = (cluster_id << 2) + i;
cpumask_set_cpu(nr, &per_cpu(zx_cluster_core_bits, cpu));
for_each_present_cpu(i) {
if (zx_topology_cluster_id(i) == cluster_id)
cpumask_set_cpu(i, &per_cpu(zx_cluster_core_bits, cpu));
}
}

for_each_present_cpu(cpu) {
subnode_id = zx_topology_subnode_id(cpu);

for (i = 0; i < 8; i++) {
nr = (subnode_id << 3) + i;
cpumask_set_cpu(nr, &per_cpu(zx_subnode_core_bits, cpu));
for_each_present_cpu(i) {
if (zx_topology_subnode_id(i) == subnode_id)
cpumask_set_cpu(i, &per_cpu(zx_subnode_core_bits, cpu));
}
}
}
Expand Down Expand Up @@ -2829,6 +2829,7 @@ void kx7000_uncore_cpu_init(void)
{
u64 val;
int cpu;

uncore_msr_uncores = kx7000_msr_uncores;

/* clear bit 16 of MSR 0x1877 so that HIF can work normally */
Expand Down
6 changes: 3 additions & 3 deletions arch/x86/events/zhaoxin/uncore.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ struct zhaoxin_uncore_type {
unsigned int fixed_ctl;
unsigned int box_ctl;
union {
unsigned int msr_offset;
unsigned int mmio_offset;
};
unsigned int msr_offset;
unsigned int mmio_offset;
};
unsigned int num_shared_regs:8;
unsigned int single_fixed:1;
unsigned int pair_ctr_ctl:1;
Expand Down