Add missing MSR programming for some events.
Submitted by: Davide Italiano <davide.italiano@gmail.com> MFC after: 3 days
This commit is contained in:
parent
d8e3baac46
commit
3444c31af6
@ -545,8 +545,14 @@ static struct ucp_event_descr ucp_events[] = {
|
||||
|
||||
UCPDESCR(0CH_01H, 0x0C, 0x01, UCP_F_FM | UCP_F_WM),
|
||||
UCPDESCR(0CH_02H, 0x0C, 0x02, UCP_F_FM | UCP_F_WM),
|
||||
UCPDESCR(0CH_04H, 0x0C, 0x04, UCP_F_FM | UCP_F_WM),
|
||||
UCPDESCR(0CH_08H, 0x0C, 0x08, UCP_F_FM | UCP_F_WM),
|
||||
UCPDESCR(0CH_04H_E, 0x0C, 0x04, UCP_F_FM | UCP_F_WM),
|
||||
UCPDESCR(0CH_04H_F, 0x0C, 0x04, UCP_F_FM | UCP_F_WM),
|
||||
UCPDESCR(0CH_04H_M, 0x0C, 0x04, UCP_F_FM | UCP_F_WM),
|
||||
UCPDESCR(0CH_04H_S, 0x0C, 0x04, UCP_F_FM | UCP_F_WM),
|
||||
UCPDESCR(0CH_08H_E, 0x0C, 0x08, UCP_F_FM | UCP_F_WM),
|
||||
UCPDESCR(0CH_08H_F, 0x0C, 0x08, UCP_F_FM | UCP_F_WM),
|
||||
UCPDESCR(0CH_08H_M, 0x0C, 0x08, UCP_F_FM | UCP_F_WM),
|
||||
UCPDESCR(0CH_08H_S, 0x0C, 0x08, UCP_F_FM | UCP_F_WM),
|
||||
|
||||
UCPDESCR(20H_01H, 0x20, 0x01, UCP_F_FM | UCP_F_I7 | UCP_F_WM),
|
||||
UCPDESCR(20H_02H, 0x20, 0x02, UCP_F_FM | UCP_F_I7 | UCP_F_WM),
|
||||
@ -965,6 +971,36 @@ ucp_start_pmc(int cpu, int ri)
|
||||
PMCDBG(MDP,STA,2, "ucp-start/2 cpu=%d ri=%d evselmsr=0x%x evsel=0x%x",
|
||||
cpu, ri, UCP_EVSEL0 + ri, evsel);
|
||||
|
||||
/* Event specific configuration. */
|
||||
switch (pm->pm_event) {
|
||||
case PMC_EV_UCP_EVENT_0CH_04H_E:
|
||||
wrmsr(MSR_GQ_SNOOP_MESF,0x2);
|
||||
break;
|
||||
case PMC_EV_UCP_EVENT_0CH_04H_F:
|
||||
wrmsr(MSR_GQ_SNOOP_MESF,0x8);
|
||||
break;
|
||||
case PMC_EV_UCP_EVENT_0CH_04H_M:
|
||||
wrmsr(MSR_GQ_SNOOP_MESF,0x1);
|
||||
break;
|
||||
case PMC_EV_UCP_EVENT_0CH_04H_S:
|
||||
wrmsr(MSR_GQ_SNOOP_MESF,0x4);
|
||||
break;
|
||||
case PMC_EV_UCP_EVENT_0CH_08H_E:
|
||||
wrmsr(MSR_GQ_SNOOP_MESF,0x2);
|
||||
break;
|
||||
case PMC_EV_UCP_EVENT_0CH_08H_F:
|
||||
wrmsr(MSR_GQ_SNOOP_MESF,0x8);
|
||||
break;
|
||||
case PMC_EV_UCP_EVENT_0CH_08H_M:
|
||||
wrmsr(MSR_GQ_SNOOP_MESF,0x1);
|
||||
break;
|
||||
case PMC_EV_UCP_EVENT_0CH_08H_S:
|
||||
wrmsr(MSR_GQ_SNOOP_MESF,0x4);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
wrmsr(UCP_EVSEL0 + ri, evsel);
|
||||
|
||||
do {
|
||||
|
@ -87,11 +87,18 @@ struct pmc_md_ucp_op_pmcallocate {
|
||||
#define UC_GLOBAL_CTRL 0x391
|
||||
#define UC_GLOBAL_OVF_CTRL 0x393
|
||||
|
||||
|
||||
#define UC_GLOBAL_STATUS_FLAG_CLRCHG (1ULL << 63)
|
||||
#define UC_GLOBAL_STATUS_FLAG_OVFPMI (1ULL << 61)
|
||||
#define UC_GLOBAL_CTRL_FLAG_FRZ (1ULL << 63)
|
||||
#define UC_GLOBAL_CTRL_FLAG_ENPMICORE0 (1ULL << 48)
|
||||
|
||||
/*
|
||||
* Model specific registers.
|
||||
*/
|
||||
|
||||
#define MSR_GQ_SNOOP_MESF 0x301
|
||||
|
||||
struct pmc_md_ucf_pmc {
|
||||
uint64_t pm_ucf_ctrl;
|
||||
};
|
||||
|
@ -2388,8 +2388,14 @@ __PMC_EV(UCP, EVENT_0BH_10H) \
|
||||
__PMC_EV(UCP, EVENT_0BH_1FH) \
|
||||
__PMC_EV(UCP, EVENT_0CH_01H) \
|
||||
__PMC_EV(UCP, EVENT_0CH_02H) \
|
||||
__PMC_EV(UCP, EVENT_0CH_04H) \
|
||||
__PMC_EV(UCP, EVENT_0CH_08H) \
|
||||
__PMC_EV(UCP, EVENT_0CH_04H_E) \
|
||||
__PMC_EV(UCP, EVENT_0CH_04H_F) \
|
||||
__PMC_EV(UCP, EVENT_0CH_04H_M) \
|
||||
__PMC_EV(UCP, EVENT_0CH_04H_S) \
|
||||
__PMC_EV(UCP, EVENT_0CH_08H_E) \
|
||||
__PMC_EV(UCP, EVENT_0CH_08H_F) \
|
||||
__PMC_EV(UCP, EVENT_0CH_08H_M) \
|
||||
__PMC_EV(UCP, EVENT_0CH_08H_S) \
|
||||
__PMC_EV(UCP, EVENT_20H_01H) \
|
||||
__PMC_EV(UCP, EVENT_20H_02H) \
|
||||
__PMC_EV(UCP, EVENT_20H_04H) \
|
||||
@ -2789,8 +2795,14 @@ __PMC_EV_ALIAS("L3_LINES_OUT.F_STATE", UCP_EVENT_0BH_10H) \
|
||||
__PMC_EV_ALIAS("L3_LINES_OUT.ANY", UCP_EVENT_0BH_1FH) \
|
||||
__PMC_EV_ALIAS("GQ_SNOOP.GOTO_S", UCP_EVENT_0CH_01H) \
|
||||
__PMC_EV_ALIAS("GQ_SNOOP.GOTO_I", UCP_EVENT_0CH_02H) \
|
||||
__PMC_EV_ALIAS("GQ_SNOOP.GOTO_S_HIT", UCP_EVENT_0CH_04H) \
|
||||
__PMC_EV_ALIAS("GQ_SNOOP.GOTO_I_HIT", UCP_EVENT_0CH_08H) \
|
||||
__PMC_EV_ALIAS("GQ_SNOOP.GOTO_S_HIT_E", UCP_EVENT_0CH_04H_E) \
|
||||
__PMC_EV_ALIAS("GQ_SNOOP.GOTO_S_HIT_F", UCP_EVENT_0CH_04H_F) \
|
||||
__PMC_EV_ALIAS("GQ_SNOOP.GOTO_S_HIT_M", UCP_EVENT_0CH_04H_M) \
|
||||
__PMC_EV_ALIAS("GQ_SNOOP.GOTO_S_HIT_S", UCP_EVENT_0CH_04H_S) \
|
||||
__PMC_EV_ALIAS("GQ_SNOOP.GOTO_I_HIT_E", UCP_EVENT_0CH_08H_E) \
|
||||
__PMC_EV_ALIAS("GQ_SNOOP.GOTO_I_HIT_F", UCP_EVENT_0CH_08H_F) \
|
||||
__PMC_EV_ALIAS("GQ_SNOOP.GOTO_I_HIT_M", UCP_EVENT_0CH_08H_M) \
|
||||
__PMC_EV_ALIAS("GQ_SNOOP.GOTO_I_HIT_S", UCP_EVENT_0CH_08H_S) \
|
||||
__PMC_EV_ALIAS("QHL_REQUESTS.IOH_READS", UCP_EVENT_20H_01H) \
|
||||
__PMC_EV_ALIAS("QHL_REQUESTS.IOH_WRITES", UCP_EVENT_20H_02H) \
|
||||
__PMC_EV_ALIAS("QHL_REQUESTS.REMOTE_READS", UCP_EVENT_20H_04H) \
|
||||
|
Loading…
Reference in New Issue
Block a user