diff options
author | Peter Zijlstra <peterz@infradead.org> | 2014-08-12 03:15:25 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-08-13 01:51:18 -0400 |
commit | ddcd0973fe02aad3d4bdc59dd0f1db90f51105a9 (patch) | |
tree | 9570d2e2111083be882b1f90bf24dc2a7e7b2841 | |
parent | 85a16ef66cc8a053de80aadf13722a2c1254d346 (diff) |
perf/x86/uncore: Rename IvyTown to IvyBridge-EP
Keeping track of all the various CPU names is hard enough; adding extra
silly names for no reason is just not helping. If we know the base arch
name (IvyBridge) then we can do the client/server parts with the well
known {,EP,EX} postfixes, no need to remember endless amounts of
unrelated and pointless names for this.
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/n/tip-8559jke61dsyr7d0i74iutli@git.kernel.org
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Yan, Zheng <zheng.z.yan@intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_intel_uncore.c | 8 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_intel_uncore.h | 4 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c | 340 |
3 files changed, 176 insertions, 176 deletions
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c index b1f84d9ccc48..4785ee8ac599 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c | |||
@@ -880,8 +880,8 @@ static int __init uncore_pci_init(void) | |||
880 | case 45: /* Sandy Bridge-EP */ | 880 | case 45: /* Sandy Bridge-EP */ |
881 | ret = snbep_uncore_pci_init(); | 881 | ret = snbep_uncore_pci_init(); |
882 | break; | 882 | break; |
883 | case 62: /* IvyTown */ | 883 | case 62: /* Ivy Bridge-EP */ |
884 | ret = ivt_uncore_pci_init(); | 884 | ret = ivbep_uncore_pci_init(); |
885 | break; | 885 | break; |
886 | case 42: /* Sandy Bridge */ | 886 | case 42: /* Sandy Bridge */ |
887 | ret = snb_uncore_pci_init(); | 887 | ret = snb_uncore_pci_init(); |
@@ -1187,8 +1187,8 @@ static int __init uncore_cpu_init(void) | |||
1187 | case 47: /* Westmere-EX aka. Xeon E7 */ | 1187 | case 47: /* Westmere-EX aka. Xeon E7 */ |
1188 | nhmex_uncore_cpu_init(); | 1188 | nhmex_uncore_cpu_init(); |
1189 | break; | 1189 | break; |
1190 | case 62: /* IvyTown */ | 1190 | case 62: /* Ivy Bridge-EP */ |
1191 | ivt_uncore_cpu_init(); | 1191 | ivbep_uncore_cpu_init(); |
1192 | break; | 1192 | break; |
1193 | 1193 | ||
1194 | default: | 1194 | default: |
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.h b/arch/x86/kernel/cpu/perf_event_intel_uncore.h index b91559936d49..1d7e89416018 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.h +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.h | |||
@@ -330,8 +330,8 @@ void nhm_uncore_cpu_init(void); | |||
330 | /* perf_event_intel_uncore_snbep.c */ | 330 | /* perf_event_intel_uncore_snbep.c */ |
331 | int snbep_uncore_pci_init(void); | 331 | int snbep_uncore_pci_init(void); |
332 | void snbep_uncore_cpu_init(void); | 332 | void snbep_uncore_cpu_init(void); |
333 | int ivt_uncore_pci_init(void); | 333 | int ivbep_uncore_pci_init(void); |
334 | void ivt_uncore_cpu_init(void); | 334 | void ivbep_uncore_cpu_init(void); |
335 | 335 | ||
336 | /* perf_event_intel_uncore_nhmex.c */ | 336 | /* perf_event_intel_uncore_nhmex.c */ |
337 | void nhmex_uncore_cpu_init(void); | 337 | void nhmex_uncore_cpu_init(void); |
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c b/arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c index 00bd0485ed13..d3e9c55d984a 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c | |||
@@ -111,43 +111,43 @@ | |||
111 | #define SNBEP_PCU_MSR_CORE_C3_CTR 0x3fc | 111 | #define SNBEP_PCU_MSR_CORE_C3_CTR 0x3fc |
112 | #define SNBEP_PCU_MSR_CORE_C6_CTR 0x3fd | 112 | #define SNBEP_PCU_MSR_CORE_C6_CTR 0x3fd |
113 | 113 | ||
114 | /* IVT event control */ | 114 | /* IVBEP event control */ |
115 | #define IVT_PMON_BOX_CTL_INT (SNBEP_PMON_BOX_CTL_RST_CTRL | \ | 115 | #define IVBEP_PMON_BOX_CTL_INT (SNBEP_PMON_BOX_CTL_RST_CTRL | \ |
116 | SNBEP_PMON_BOX_CTL_RST_CTRS) | 116 | SNBEP_PMON_BOX_CTL_RST_CTRS) |
117 | #define IVT_PMON_RAW_EVENT_MASK (SNBEP_PMON_CTL_EV_SEL_MASK | \ | 117 | #define IVBEP_PMON_RAW_EVENT_MASK (SNBEP_PMON_CTL_EV_SEL_MASK | \ |
118 | SNBEP_PMON_CTL_UMASK_MASK | \ | 118 | SNBEP_PMON_CTL_UMASK_MASK | \ |
119 | SNBEP_PMON_CTL_EDGE_DET | \ | 119 | SNBEP_PMON_CTL_EDGE_DET | \ |
120 | SNBEP_PMON_CTL_TRESH_MASK) | 120 | SNBEP_PMON_CTL_TRESH_MASK) |
121 | /* IVT Ubox */ | 121 | /* IVBEP Ubox */ |
122 | #define IVT_U_MSR_PMON_GLOBAL_CTL 0xc00 | 122 | #define IVBEP_U_MSR_PMON_GLOBAL_CTL 0xc00 |
123 | #define IVT_U_PMON_GLOBAL_FRZ_ALL (1 << 31) | 123 | #define IVBEP_U_PMON_GLOBAL_FRZ_ALL (1 << 31) |
124 | #define IVT_U_PMON_GLOBAL_UNFRZ_ALL (1 << 29) | 124 | #define IVBEP_U_PMON_GLOBAL_UNFRZ_ALL (1 << 29) |
125 | 125 | ||
126 | #define IVT_U_MSR_PMON_RAW_EVENT_MASK \ | 126 | #define IVBEP_U_MSR_PMON_RAW_EVENT_MASK \ |
127 | (SNBEP_PMON_CTL_EV_SEL_MASK | \ | 127 | (SNBEP_PMON_CTL_EV_SEL_MASK | \ |
128 | SNBEP_PMON_CTL_UMASK_MASK | \ | 128 | SNBEP_PMON_CTL_UMASK_MASK | \ |
129 | SNBEP_PMON_CTL_EDGE_DET | \ | 129 | SNBEP_PMON_CTL_EDGE_DET | \ |
130 | SNBEP_U_MSR_PMON_CTL_TRESH_MASK) | 130 | SNBEP_U_MSR_PMON_CTL_TRESH_MASK) |
131 | /* IVT Cbo */ | 131 | /* IVBEP Cbo */ |
132 | #define IVT_CBO_MSR_PMON_RAW_EVENT_MASK (IVT_PMON_RAW_EVENT_MASK | \ | 132 | #define IVBEP_CBO_MSR_PMON_RAW_EVENT_MASK (IVBEP_PMON_RAW_EVENT_MASK | \ |
133 | SNBEP_CBO_PMON_CTL_TID_EN) | 133 | SNBEP_CBO_PMON_CTL_TID_EN) |
134 | 134 | ||
135 | #define IVT_CB0_MSR_PMON_BOX_FILTER_TID (0x1fULL << 0) | 135 | #define IVBEP_CB0_MSR_PMON_BOX_FILTER_TID (0x1fULL << 0) |
136 | #define IVT_CB0_MSR_PMON_BOX_FILTER_LINK (0xfULL << 5) | 136 | #define IVBEP_CB0_MSR_PMON_BOX_FILTER_LINK (0xfULL << 5) |
137 | #define IVT_CB0_MSR_PMON_BOX_FILTER_STATE (0x3fULL << 17) | 137 | #define IVBEP_CB0_MSR_PMON_BOX_FILTER_STATE (0x3fULL << 17) |
138 | #define IVT_CB0_MSR_PMON_BOX_FILTER_NID (0xffffULL << 32) | 138 | #define IVBEP_CB0_MSR_PMON_BOX_FILTER_NID (0xffffULL << 32) |
139 | #define IVT_CB0_MSR_PMON_BOX_FILTER_OPC (0x1ffULL << 52) | 139 | #define IVBEP_CB0_MSR_PMON_BOX_FILTER_OPC (0x1ffULL << 52) |
140 | #define IVT_CB0_MSR_PMON_BOX_FILTER_C6 (0x1ULL << 61) | 140 | #define IVBEP_CB0_MSR_PMON_BOX_FILTER_C6 (0x1ULL << 61) |
141 | #define IVT_CB0_MSR_PMON_BOX_FILTER_NC (0x1ULL << 62) | 141 | #define IVBEP_CB0_MSR_PMON_BOX_FILTER_NC (0x1ULL << 62) |
142 | #define IVT_CB0_MSR_PMON_BOX_FILTER_IOSC (0x1ULL << 63) | 142 | #define IVBEP_CB0_MSR_PMON_BOX_FILTER_IOSC (0x1ULL << 63) |
143 | 143 | ||
144 | /* IVT home agent */ | 144 | /* IVBEP home agent */ |
145 | #define IVT_HA_PCI_PMON_CTL_Q_OCC_RST (1 << 16) | 145 | #define IVBEP_HA_PCI_PMON_CTL_Q_OCC_RST (1 << 16) |
146 | #define IVT_HA_PCI_PMON_RAW_EVENT_MASK \ | 146 | #define IVBEP_HA_PCI_PMON_RAW_EVENT_MASK \ |
147 | (IVT_PMON_RAW_EVENT_MASK | \ | 147 | (IVBEP_PMON_RAW_EVENT_MASK | \ |
148 | IVT_HA_PCI_PMON_CTL_Q_OCC_RST) | 148 | IVBEP_HA_PCI_PMON_CTL_Q_OCC_RST) |
149 | /* IVT PCU */ | 149 | /* IVBEP PCU */ |
150 | #define IVT_PCU_MSR_PMON_RAW_EVENT_MASK \ | 150 | #define IVBEP_PCU_MSR_PMON_RAW_EVENT_MASK \ |
151 | (SNBEP_PMON_CTL_EV_SEL_MASK | \ | 151 | (SNBEP_PMON_CTL_EV_SEL_MASK | \ |
152 | SNBEP_PMON_CTL_EV_SEL_EXT | \ | 152 | SNBEP_PMON_CTL_EV_SEL_EXT | \ |
153 | SNBEP_PCU_MSR_PMON_CTL_OCC_SEL_MASK | \ | 153 | SNBEP_PCU_MSR_PMON_CTL_OCC_SEL_MASK | \ |
@@ -155,9 +155,9 @@ | |||
155 | SNBEP_PCU_MSR_PMON_CTL_TRESH_MASK | \ | 155 | SNBEP_PCU_MSR_PMON_CTL_TRESH_MASK | \ |
156 | SNBEP_PCU_MSR_PMON_CTL_OCC_INVERT | \ | 156 | SNBEP_PCU_MSR_PMON_CTL_OCC_INVERT | \ |
157 | SNBEP_PCU_MSR_PMON_CTL_OCC_EDGE_DET) | 157 | SNBEP_PCU_MSR_PMON_CTL_OCC_EDGE_DET) |
158 | /* IVT QPI */ | 158 | /* IVBEP QPI */ |
159 | #define IVT_QPI_PCI_PMON_RAW_EVENT_MASK \ | 159 | #define IVBEP_QPI_PCI_PMON_RAW_EVENT_MASK \ |
160 | (IVT_PMON_RAW_EVENT_MASK | \ | 160 | (IVBEP_PMON_RAW_EVENT_MASK | \ |
161 | SNBEP_PMON_CTL_EV_SEL_EXT) | 161 | SNBEP_PMON_CTL_EV_SEL_EXT) |
162 | 162 | ||
163 | #define __BITS_VALUE(x, i, n) ((typeof(x))(((x) >> ((i) * (n))) & \ | 163 | #define __BITS_VALUE(x, i, n) ((typeof(x))(((x) >> ((i) * (n))) & \ |
@@ -1088,34 +1088,34 @@ int snbep_uncore_pci_init(void) | |||
1088 | /* end of Sandy Bridge-EP uncore support */ | 1088 | /* end of Sandy Bridge-EP uncore support */ |
1089 | 1089 | ||
1090 | /* IvyTown uncore support */ | 1090 | /* IvyTown uncore support */ |
1091 | static void ivt_uncore_msr_init_box(struct intel_uncore_box *box) | 1091 | static void ivbep_uncore_msr_init_box(struct intel_uncore_box *box) |
1092 | { | 1092 | { |
1093 | unsigned msr = uncore_msr_box_ctl(box); | 1093 | unsigned msr = uncore_msr_box_ctl(box); |
1094 | if (msr) | 1094 | if (msr) |
1095 | wrmsrl(msr, IVT_PMON_BOX_CTL_INT); | 1095 | wrmsrl(msr, IVBEP_PMON_BOX_CTL_INT); |
1096 | } | 1096 | } |
1097 | 1097 | ||
1098 | static void ivt_uncore_pci_init_box(struct intel_uncore_box *box) | 1098 | static void ivbep_uncore_pci_init_box(struct intel_uncore_box *box) |
1099 | { | 1099 | { |
1100 | struct pci_dev *pdev = box->pci_dev; | 1100 | struct pci_dev *pdev = box->pci_dev; |
1101 | 1101 | ||
1102 | pci_write_config_dword(pdev, SNBEP_PCI_PMON_BOX_CTL, IVT_PMON_BOX_CTL_INT); | 1102 | pci_write_config_dword(pdev, SNBEP_PCI_PMON_BOX_CTL, IVBEP_PMON_BOX_CTL_INT); |
1103 | } | 1103 | } |
1104 | 1104 | ||
1105 | #define IVT_UNCORE_MSR_OPS_COMMON_INIT() \ | 1105 | #define IVBEP_UNCORE_MSR_OPS_COMMON_INIT() \ |
1106 | .init_box = ivt_uncore_msr_init_box, \ | 1106 | .init_box = ivbep_uncore_msr_init_box, \ |
1107 | .disable_box = snbep_uncore_msr_disable_box, \ | 1107 | .disable_box = snbep_uncore_msr_disable_box, \ |
1108 | .enable_box = snbep_uncore_msr_enable_box, \ | 1108 | .enable_box = snbep_uncore_msr_enable_box, \ |
1109 | .disable_event = snbep_uncore_msr_disable_event, \ | 1109 | .disable_event = snbep_uncore_msr_disable_event, \ |
1110 | .enable_event = snbep_uncore_msr_enable_event, \ | 1110 | .enable_event = snbep_uncore_msr_enable_event, \ |
1111 | .read_counter = uncore_msr_read_counter | 1111 | .read_counter = uncore_msr_read_counter |
1112 | 1112 | ||
1113 | static struct intel_uncore_ops ivt_uncore_msr_ops = { | 1113 | static struct intel_uncore_ops ivbep_uncore_msr_ops = { |
1114 | IVT_UNCORE_MSR_OPS_COMMON_INIT(), | 1114 | IVBEP_UNCORE_MSR_OPS_COMMON_INIT(), |
1115 | }; | 1115 | }; |
1116 | 1116 | ||
1117 | static struct intel_uncore_ops ivt_uncore_pci_ops = { | 1117 | static struct intel_uncore_ops ivbep_uncore_pci_ops = { |
1118 | .init_box = ivt_uncore_pci_init_box, | 1118 | .init_box = ivbep_uncore_pci_init_box, |
1119 | .disable_box = snbep_uncore_pci_disable_box, | 1119 | .disable_box = snbep_uncore_pci_disable_box, |
1120 | .enable_box = snbep_uncore_pci_enable_box, | 1120 | .enable_box = snbep_uncore_pci_enable_box, |
1121 | .disable_event = snbep_uncore_pci_disable_event, | 1121 | .disable_event = snbep_uncore_pci_disable_event, |
@@ -1123,15 +1123,15 @@ static struct intel_uncore_ops ivt_uncore_pci_ops = { | |||
1123 | .read_counter = snbep_uncore_pci_read_counter, | 1123 | .read_counter = snbep_uncore_pci_read_counter, |
1124 | }; | 1124 | }; |
1125 | 1125 | ||
1126 | #define IVT_UNCORE_PCI_COMMON_INIT() \ | 1126 | #define IVBEP_UNCORE_PCI_COMMON_INIT() \ |
1127 | .perf_ctr = SNBEP_PCI_PMON_CTR0, \ | 1127 | .perf_ctr = SNBEP_PCI_PMON_CTR0, \ |
1128 | .event_ctl = SNBEP_PCI_PMON_CTL0, \ | 1128 | .event_ctl = SNBEP_PCI_PMON_CTL0, \ |
1129 | .event_mask = IVT_PMON_RAW_EVENT_MASK, \ | 1129 | .event_mask = IVBEP_PMON_RAW_EVENT_MASK, \ |
1130 | .box_ctl = SNBEP_PCI_PMON_BOX_CTL, \ | 1130 | .box_ctl = SNBEP_PCI_PMON_BOX_CTL, \ |
1131 | .ops = &ivt_uncore_pci_ops, \ | 1131 | .ops = &ivbep_uncore_pci_ops, \ |
1132 | .format_group = &ivt_uncore_format_group | 1132 | .format_group = &ivbep_uncore_format_group |
1133 | 1133 | ||
1134 | static struct attribute *ivt_uncore_formats_attr[] = { | 1134 | static struct attribute *ivbep_uncore_formats_attr[] = { |
1135 | &format_attr_event.attr, | 1135 | &format_attr_event.attr, |
1136 | &format_attr_umask.attr, | 1136 | &format_attr_umask.attr, |
1137 | &format_attr_edge.attr, | 1137 | &format_attr_edge.attr, |
@@ -1140,7 +1140,7 @@ static struct attribute *ivt_uncore_formats_attr[] = { | |||
1140 | NULL, | 1140 | NULL, |
1141 | }; | 1141 | }; |
1142 | 1142 | ||
1143 | static struct attribute *ivt_uncore_ubox_formats_attr[] = { | 1143 | static struct attribute *ivbep_uncore_ubox_formats_attr[] = { |
1144 | &format_attr_event.attr, | 1144 | &format_attr_event.attr, |
1145 | &format_attr_umask.attr, | 1145 | &format_attr_umask.attr, |
1146 | &format_attr_edge.attr, | 1146 | &format_attr_edge.attr, |
@@ -1149,7 +1149,7 @@ static struct attribute *ivt_uncore_ubox_formats_attr[] = { | |||
1149 | NULL, | 1149 | NULL, |
1150 | }; | 1150 | }; |
1151 | 1151 | ||
1152 | static struct attribute *ivt_uncore_cbox_formats_attr[] = { | 1152 | static struct attribute *ivbep_uncore_cbox_formats_attr[] = { |
1153 | &format_attr_event.attr, | 1153 | &format_attr_event.attr, |
1154 | &format_attr_umask.attr, | 1154 | &format_attr_umask.attr, |
1155 | &format_attr_edge.attr, | 1155 | &format_attr_edge.attr, |
@@ -1163,7 +1163,7 @@ static struct attribute *ivt_uncore_cbox_formats_attr[] = { | |||
1163 | NULL, | 1163 | NULL, |
1164 | }; | 1164 | }; |
1165 | 1165 | ||
1166 | static struct attribute *ivt_uncore_pcu_formats_attr[] = { | 1166 | static struct attribute *ivbep_uncore_pcu_formats_attr[] = { |
1167 | &format_attr_event_ext.attr, | 1167 | &format_attr_event_ext.attr, |
1168 | &format_attr_occ_sel.attr, | 1168 | &format_attr_occ_sel.attr, |
1169 | &format_attr_edge.attr, | 1169 | &format_attr_edge.attr, |
@@ -1177,7 +1177,7 @@ static struct attribute *ivt_uncore_pcu_formats_attr[] = { | |||
1177 | NULL, | 1177 | NULL, |
1178 | }; | 1178 | }; |
1179 | 1179 | ||
1180 | static struct attribute *ivt_uncore_qpi_formats_attr[] = { | 1180 | static struct attribute *ivbep_uncore_qpi_formats_attr[] = { |
1181 | &format_attr_event_ext.attr, | 1181 | &format_attr_event_ext.attr, |
1182 | &format_attr_umask.attr, | 1182 | &format_attr_umask.attr, |
1183 | &format_attr_edge.attr, | 1183 | &format_attr_edge.attr, |
@@ -1203,32 +1203,32 @@ static struct attribute *ivt_uncore_qpi_formats_attr[] = { | |||
1203 | NULL, | 1203 | NULL, |
1204 | }; | 1204 | }; |
1205 | 1205 | ||
1206 | static struct attribute_group ivt_uncore_format_group = { | 1206 | static struct attribute_group ivbep_uncore_format_group = { |
1207 | .name = "format", | 1207 | .name = "format", |
1208 | .attrs = ivt_uncore_formats_attr, | 1208 | .attrs = ivbep_uncore_formats_attr, |
1209 | }; | 1209 | }; |
1210 | 1210 | ||
1211 | static struct attribute_group ivt_uncore_ubox_format_group = { | 1211 | static struct attribute_group ivbep_uncore_ubox_format_group = { |
1212 | .name = "format", | 1212 | .name = "format", |
1213 | .attrs = ivt_uncore_ubox_formats_attr, | 1213 | .attrs = ivbep_uncore_ubox_formats_attr, |
1214 | }; | 1214 | }; |
1215 | 1215 | ||
1216 | static struct attribute_group ivt_uncore_cbox_format_group = { | 1216 | static struct attribute_group ivbep_uncore_cbox_format_group = { |
1217 | .name = "format", | 1217 | .name = "format", |
1218 | .attrs = ivt_uncore_cbox_formats_attr, | 1218 | .attrs = ivbep_uncore_cbox_formats_attr, |
1219 | }; | 1219 | }; |
1220 | 1220 | ||
1221 | static struct attribute_group ivt_uncore_pcu_format_group = { | 1221 | static struct attribute_group ivbep_uncore_pcu_format_group = { |
1222 | .name = "format", | 1222 | .name = "format", |
1223 | .attrs = ivt_uncore_pcu_formats_attr, | 1223 | .attrs = ivbep_uncore_pcu_formats_attr, |
1224 | }; | 1224 | }; |
1225 | 1225 | ||
1226 | static struct attribute_group ivt_uncore_qpi_format_group = { | 1226 | static struct attribute_group ivbep_uncore_qpi_format_group = { |
1227 | .name = "format", | 1227 | .name = "format", |
1228 | .attrs = ivt_uncore_qpi_formats_attr, | 1228 | .attrs = ivbep_uncore_qpi_formats_attr, |
1229 | }; | 1229 | }; |
1230 | 1230 | ||
1231 | static struct intel_uncore_type ivt_uncore_ubox = { | 1231 | static struct intel_uncore_type ivbep_uncore_ubox = { |
1232 | .name = "ubox", | 1232 | .name = "ubox", |
1233 | .num_counters = 2, | 1233 | .num_counters = 2, |
1234 | .num_boxes = 1, | 1234 | .num_boxes = 1, |
@@ -1236,14 +1236,14 @@ static struct intel_uncore_type ivt_uncore_ubox = { | |||
1236 | .fixed_ctr_bits = 48, | 1236 | .fixed_ctr_bits = 48, |
1237 | .perf_ctr = SNBEP_U_MSR_PMON_CTR0, | 1237 | .perf_ctr = SNBEP_U_MSR_PMON_CTR0, |
1238 | .event_ctl = SNBEP_U_MSR_PMON_CTL0, | 1238 | .event_ctl = SNBEP_U_MSR_PMON_CTL0, |
1239 | .event_mask = IVT_U_MSR_PMON_RAW_EVENT_MASK, | 1239 | .event_mask = IVBEP_U_MSR_PMON_RAW_EVENT_MASK, |
1240 | .fixed_ctr = SNBEP_U_MSR_PMON_UCLK_FIXED_CTR, | 1240 | .fixed_ctr = SNBEP_U_MSR_PMON_UCLK_FIXED_CTR, |
1241 | .fixed_ctl = SNBEP_U_MSR_PMON_UCLK_FIXED_CTL, | 1241 | .fixed_ctl = SNBEP_U_MSR_PMON_UCLK_FIXED_CTL, |
1242 | .ops = &ivt_uncore_msr_ops, | 1242 | .ops = &ivbep_uncore_msr_ops, |
1243 | .format_group = &ivt_uncore_ubox_format_group, | 1243 | .format_group = &ivbep_uncore_ubox_format_group, |
1244 | }; | 1244 | }; |
1245 | 1245 | ||
1246 | static struct extra_reg ivt_uncore_cbox_extra_regs[] = { | 1246 | static struct extra_reg ivbep_uncore_cbox_extra_regs[] = { |
1247 | SNBEP_CBO_EVENT_EXTRA_REG(SNBEP_CBO_PMON_CTL_TID_EN, | 1247 | SNBEP_CBO_EVENT_EXTRA_REG(SNBEP_CBO_PMON_CTL_TID_EN, |
1248 | SNBEP_CBO_PMON_CTL_TID_EN, 0x1), | 1248 | SNBEP_CBO_PMON_CTL_TID_EN, 0x1), |
1249 | SNBEP_CBO_EVENT_EXTRA_REG(0x1031, 0x10ff, 0x2), | 1249 | SNBEP_CBO_EVENT_EXTRA_REG(0x1031, 0x10ff, 0x2), |
@@ -1284,37 +1284,37 @@ static struct extra_reg ivt_uncore_cbox_extra_regs[] = { | |||
1284 | EVENT_EXTRA_END | 1284 | EVENT_EXTRA_END |
1285 | }; | 1285 | }; |
1286 | 1286 | ||
1287 | static u64 ivt_cbox_filter_mask(int fields) | 1287 | static u64 ivbep_cbox_filter_mask(int fields) |
1288 | { | 1288 | { |
1289 | u64 mask = 0; | 1289 | u64 mask = 0; |
1290 | 1290 | ||
1291 | if (fields & 0x1) | 1291 | if (fields & 0x1) |
1292 | mask |= IVT_CB0_MSR_PMON_BOX_FILTER_TID; | 1292 | mask |= IVBEP_CB0_MSR_PMON_BOX_FILTER_TID; |
1293 | if (fields & 0x2) | 1293 | if (fields & 0x2) |
1294 | mask |= IVT_CB0_MSR_PMON_BOX_FILTER_LINK; | 1294 | mask |= IVBEP_CB0_MSR_PMON_BOX_FILTER_LINK; |
1295 | if (fields & 0x4) | 1295 | if (fields & 0x4) |
1296 | mask |= IVT_CB0_MSR_PMON_BOX_FILTER_STATE; | 1296 | mask |= IVBEP_CB0_MSR_PMON_BOX_FILTER_STATE; |
1297 | if (fields & 0x8) | 1297 | if (fields & 0x8) |
1298 | mask |= IVT_CB0_MSR_PMON_BOX_FILTER_NID; | 1298 | mask |= IVBEP_CB0_MSR_PMON_BOX_FILTER_NID; |
1299 | if (fields & 0x10) | 1299 | if (fields & 0x10) |
1300 | mask |= IVT_CB0_MSR_PMON_BOX_FILTER_OPC; | 1300 | mask |= IVBEP_CB0_MSR_PMON_BOX_FILTER_OPC; |
1301 | 1301 | ||
1302 | return mask; | 1302 | return mask; |
1303 | } | 1303 | } |
1304 | 1304 | ||
1305 | static struct event_constraint * | 1305 | static struct event_constraint * |
1306 | ivt_cbox_get_constraint(struct intel_uncore_box *box, struct perf_event *event) | 1306 | ivbep_cbox_get_constraint(struct intel_uncore_box *box, struct perf_event *event) |
1307 | { | 1307 | { |
1308 | return __snbep_cbox_get_constraint(box, event, ivt_cbox_filter_mask); | 1308 | return __snbep_cbox_get_constraint(box, event, ivbep_cbox_filter_mask); |
1309 | } | 1309 | } |
1310 | 1310 | ||
1311 | static int ivt_cbox_hw_config(struct intel_uncore_box *box, struct perf_event *event) | 1311 | static int ivbep_cbox_hw_config(struct intel_uncore_box *box, struct perf_event *event) |
1312 | { | 1312 | { |
1313 | struct hw_perf_event_extra *reg1 = &event->hw.extra_reg; | 1313 | struct hw_perf_event_extra *reg1 = &event->hw.extra_reg; |
1314 | struct extra_reg *er; | 1314 | struct extra_reg *er; |
1315 | int idx = 0; | 1315 | int idx = 0; |
1316 | 1316 | ||
1317 | for (er = ivt_uncore_cbox_extra_regs; er->msr; er++) { | 1317 | for (er = ivbep_uncore_cbox_extra_regs; er->msr; er++) { |
1318 | if (er->event != (event->hw.config & er->config_mask)) | 1318 | if (er->event != (event->hw.config & er->config_mask)) |
1319 | continue; | 1319 | continue; |
1320 | idx |= er->idx; | 1320 | idx |= er->idx; |
@@ -1323,13 +1323,13 @@ static int ivt_cbox_hw_config(struct intel_uncore_box *box, struct perf_event *e | |||
1323 | if (idx) { | 1323 | if (idx) { |
1324 | reg1->reg = SNBEP_C0_MSR_PMON_BOX_FILTER + | 1324 | reg1->reg = SNBEP_C0_MSR_PMON_BOX_FILTER + |
1325 | SNBEP_CBO_MSR_OFFSET * box->pmu->pmu_idx; | 1325 | SNBEP_CBO_MSR_OFFSET * box->pmu->pmu_idx; |
1326 | reg1->config = event->attr.config1 & ivt_cbox_filter_mask(idx); | 1326 | reg1->config = event->attr.config1 & ivbep_cbox_filter_mask(idx); |
1327 | reg1->idx = idx; | 1327 | reg1->idx = idx; |
1328 | } | 1328 | } |
1329 | return 0; | 1329 | return 0; |
1330 | } | 1330 | } |
1331 | 1331 | ||
1332 | static void ivt_cbox_enable_event(struct intel_uncore_box *box, struct perf_event *event) | 1332 | static void ivbep_cbox_enable_event(struct intel_uncore_box *box, struct perf_event *event) |
1333 | { | 1333 | { |
1334 | struct hw_perf_event *hwc = &event->hw; | 1334 | struct hw_perf_event *hwc = &event->hw; |
1335 | struct hw_perf_event_extra *reg1 = &hwc->extra_reg; | 1335 | struct hw_perf_event_extra *reg1 = &hwc->extra_reg; |
@@ -1343,78 +1343,78 @@ static void ivt_cbox_enable_event(struct intel_uncore_box *box, struct perf_even | |||
1343 | wrmsrl(hwc->config_base, hwc->config | SNBEP_PMON_CTL_EN); | 1343 | wrmsrl(hwc->config_base, hwc->config | SNBEP_PMON_CTL_EN); |
1344 | } | 1344 | } |
1345 | 1345 | ||
1346 | static struct intel_uncore_ops ivt_uncore_cbox_ops = { | 1346 | static struct intel_uncore_ops ivbep_uncore_cbox_ops = { |
1347 | .init_box = ivt_uncore_msr_init_box, | 1347 | .init_box = ivbep_uncore_msr_init_box, |
1348 | .disable_box = snbep_uncore_msr_disable_box, | 1348 | .disable_box = snbep_uncore_msr_disable_box, |
1349 | .enable_box = snbep_uncore_msr_enable_box, | 1349 | .enable_box = snbep_uncore_msr_enable_box, |
1350 | .disable_event = snbep_uncore_msr_disable_event, | 1350 | .disable_event = snbep_uncore_msr_disable_event, |
1351 | .enable_event = ivt_cbox_enable_event, | 1351 | .enable_event = ivbep_cbox_enable_event, |
1352 | .read_counter = uncore_msr_read_counter, | 1352 | .read_counter = uncore_msr_read_counter, |
1353 | .hw_config = ivt_cbox_hw_config, | 1353 | .hw_config = ivbep_cbox_hw_config, |
1354 | .get_constraint = ivt_cbox_get_constraint, | 1354 | .get_constraint = ivbep_cbox_get_constraint, |
1355 | .put_constraint = snbep_cbox_put_constraint, | 1355 | .put_constraint = snbep_cbox_put_constraint, |
1356 | }; | 1356 | }; |
1357 | 1357 | ||
1358 | static struct intel_uncore_type ivt_uncore_cbox = { | 1358 | static struct intel_uncore_type ivbep_uncore_cbox = { |
1359 | .name = "cbox", | 1359 | .name = "cbox", |
1360 | .num_counters = 4, | 1360 | .num_counters = 4, |
1361 | .num_boxes = 15, | 1361 | .num_boxes = 15, |
1362 | .perf_ctr_bits = 44, | 1362 | .perf_ctr_bits = 44, |
1363 | .event_ctl = SNBEP_C0_MSR_PMON_CTL0, | 1363 | .event_ctl = SNBEP_C0_MSR_PMON_CTL0, |
1364 | .perf_ctr = SNBEP_C0_MSR_PMON_CTR0, | 1364 | .perf_ctr = SNBEP_C0_MSR_PMON_CTR0, |
1365 | .event_mask = IVT_CBO_MSR_PMON_RAW_EVENT_MASK, | 1365 | .event_mask = IVBEP_CBO_MSR_PMON_RAW_EVENT_MASK, |
1366 | .box_ctl = SNBEP_C0_MSR_PMON_BOX_CTL, | 1366 | .box_ctl = SNBEP_C0_MSR_PMON_BOX_CTL, |
1367 | .msr_offset = SNBEP_CBO_MSR_OFFSET, | 1367 | .msr_offset = SNBEP_CBO_MSR_OFFSET, |
1368 | .num_shared_regs = 1, | 1368 | .num_shared_regs = 1, |
1369 | .constraints = snbep_uncore_cbox_constraints, | 1369 | .constraints = snbep_uncore_cbox_constraints, |
1370 | .ops = &ivt_uncore_cbox_ops, | 1370 | .ops = &ivbep_uncore_cbox_ops, |
1371 | .format_group = &ivt_uncore_cbox_format_group, | 1371 | .format_group = &ivbep_uncore_cbox_format_group, |
1372 | }; | 1372 | }; |
1373 | 1373 | ||
1374 | static struct intel_uncore_ops ivt_uncore_pcu_ops = { | 1374 | static struct intel_uncore_ops ivbep_uncore_pcu_ops = { |
1375 | IVT_UNCORE_MSR_OPS_COMMON_INIT(), | 1375 | IVBEP_UNCORE_MSR_OPS_COMMON_INIT(), |
1376 | .hw_config = snbep_pcu_hw_config, | 1376 | .hw_config = snbep_pcu_hw_config, |
1377 | .get_constraint = snbep_pcu_get_constraint, | 1377 | .get_constraint = snbep_pcu_get_constraint, |
1378 | .put_constraint = snbep_pcu_put_constraint, | 1378 | .put_constraint = snbep_pcu_put_constraint, |
1379 | }; | 1379 | }; |
1380 | 1380 | ||
1381 | static struct intel_uncore_type ivt_uncore_pcu = { | 1381 | static struct intel_uncore_type ivbep_uncore_pcu = { |
1382 | .name = "pcu", | 1382 | .name = "pcu", |
1383 | .num_counters = 4, | 1383 | .num_counters = 4, |
1384 | .num_boxes = 1, | 1384 | .num_boxes = 1, |
1385 | .perf_ctr_bits = 48, | 1385 | .perf_ctr_bits = 48, |
1386 | .perf_ctr = SNBEP_PCU_MSR_PMON_CTR0, | 1386 | .perf_ctr = SNBEP_PCU_MSR_PMON_CTR0, |
1387 | .event_ctl = SNBEP_PCU_MSR_PMON_CTL0, | 1387 | .event_ctl = SNBEP_PCU_MSR_PMON_CTL0, |
1388 | .event_mask = IVT_PCU_MSR_PMON_RAW_EVENT_MASK, | 1388 | .event_mask = IVBEP_PCU_MSR_PMON_RAW_EVENT_MASK, |
1389 | .box_ctl = SNBEP_PCU_MSR_PMON_BOX_CTL, | 1389 | .box_ctl = SNBEP_PCU_MSR_PMON_BOX_CTL, |
1390 | .num_shared_regs = 1, | 1390 | .num_shared_regs = 1, |
1391 | .ops = &ivt_uncore_pcu_ops, | 1391 | .ops = &ivbep_uncore_pcu_ops, |
1392 | .format_group = &ivt_uncore_pcu_format_group, | 1392 | .format_group = &ivbep_uncore_pcu_format_group, |
1393 | }; | 1393 | }; |
1394 | 1394 | ||
1395 | static struct intel_uncore_type *ivt_msr_uncores[] = { | 1395 | static struct intel_uncore_type *ivbep_msr_uncores[] = { |
1396 | &ivt_uncore_ubox, | 1396 | &ivbep_uncore_ubox, |
1397 | &ivt_uncore_cbox, | 1397 | &ivbep_uncore_cbox, |
1398 | &ivt_uncore_pcu, | 1398 | &ivbep_uncore_pcu, |
1399 | NULL, | 1399 | NULL, |
1400 | }; | 1400 | }; |
1401 | 1401 | ||
1402 | void ivt_uncore_cpu_init(void) | 1402 | void ivbep_uncore_cpu_init(void) |
1403 | { | 1403 | { |
1404 | if (ivt_uncore_cbox.num_boxes > boot_cpu_data.x86_max_cores) | 1404 | if (ivbep_uncore_cbox.num_boxes > boot_cpu_data.x86_max_cores) |
1405 | ivt_uncore_cbox.num_boxes = boot_cpu_data.x86_max_cores; | 1405 | ivbep_uncore_cbox.num_boxes = boot_cpu_data.x86_max_cores; |
1406 | uncore_msr_uncores = ivt_msr_uncores; | 1406 | uncore_msr_uncores = ivbep_msr_uncores; |
1407 | } | 1407 | } |
1408 | 1408 | ||
1409 | static struct intel_uncore_type ivt_uncore_ha = { | 1409 | static struct intel_uncore_type ivbep_uncore_ha = { |
1410 | .name = "ha", | 1410 | .name = "ha", |
1411 | .num_counters = 4, | 1411 | .num_counters = 4, |
1412 | .num_boxes = 2, | 1412 | .num_boxes = 2, |
1413 | .perf_ctr_bits = 48, | 1413 | .perf_ctr_bits = 48, |
1414 | IVT_UNCORE_PCI_COMMON_INIT(), | 1414 | IVBEP_UNCORE_PCI_COMMON_INIT(), |
1415 | }; | 1415 | }; |
1416 | 1416 | ||
1417 | static struct intel_uncore_type ivt_uncore_imc = { | 1417 | static struct intel_uncore_type ivbep_uncore_imc = { |
1418 | .name = "imc", | 1418 | .name = "imc", |
1419 | .num_counters = 4, | 1419 | .num_counters = 4, |
1420 | .num_boxes = 8, | 1420 | .num_boxes = 8, |
@@ -1423,64 +1423,64 @@ static struct intel_uncore_type ivt_uncore_imc = { | |||
1423 | .fixed_ctr = SNBEP_MC_CHy_PCI_PMON_FIXED_CTR, | 1423 | .fixed_ctr = SNBEP_MC_CHy_PCI_PMON_FIXED_CTR, |
1424 | .fixed_ctl = SNBEP_MC_CHy_PCI_PMON_FIXED_CTL, | 1424 | .fixed_ctl = SNBEP_MC_CHy_PCI_PMON_FIXED_CTL, |
1425 | .event_descs = snbep_uncore_imc_events, | 1425 | .event_descs = snbep_uncore_imc_events, |
1426 | IVT_UNCORE_PCI_COMMON_INIT(), | 1426 | IVBEP_UNCORE_PCI_COMMON_INIT(), |
1427 | }; | 1427 | }; |
1428 | 1428 | ||
1429 | /* registers in IRP boxes are not properly aligned */ | 1429 | /* registers in IRP boxes are not properly aligned */ |
1430 | static unsigned ivt_uncore_irp_ctls[] = {0xd8, 0xdc, 0xe0, 0xe4}; | 1430 | static unsigned ivbep_uncore_irp_ctls[] = {0xd8, 0xdc, 0xe0, 0xe4}; |
1431 | static unsigned ivt_uncore_irp_ctrs[] = {0xa0, 0xb0, 0xb8, 0xc0}; | 1431 | static unsigned ivbep_uncore_irp_ctrs[] = {0xa0, 0xb0, 0xb8, 0xc0}; |
1432 | 1432 | ||
1433 | static void ivt_uncore_irp_enable_event(struct intel_uncore_box *box, struct perf_event *event) | 1433 | static void ivbep_uncore_irp_enable_event(struct intel_uncore_box *box, struct perf_event *event) |
1434 | { | 1434 | { |
1435 | struct pci_dev *pdev = box->pci_dev; | 1435 | struct pci_dev *pdev = box->pci_dev; |
1436 | struct hw_perf_event *hwc = &event->hw; | 1436 | struct hw_perf_event *hwc = &event->hw; |
1437 | 1437 | ||
1438 | pci_write_config_dword(pdev, ivt_uncore_irp_ctls[hwc->idx], | 1438 | pci_write_config_dword(pdev, ivbep_uncore_irp_ctls[hwc->idx], |
1439 | hwc->config | SNBEP_PMON_CTL_EN); | 1439 | hwc->config | SNBEP_PMON_CTL_EN); |
1440 | } | 1440 | } |
1441 | 1441 | ||
1442 | static void ivt_uncore_irp_disable_event(struct intel_uncore_box *box, struct perf_event *event) | 1442 | static void ivbep_uncore_irp_disable_event(struct intel_uncore_box *box, struct perf_event *event) |
1443 | { | 1443 | { |
1444 | struct pci_dev *pdev = box->pci_dev; | 1444 | struct pci_dev *pdev = box->pci_dev; |
1445 | struct hw_perf_event *hwc = &event->hw; | 1445 | struct hw_perf_event *hwc = &event->hw; |
1446 | 1446 | ||
1447 | pci_write_config_dword(pdev, ivt_uncore_irp_ctls[hwc->idx], hwc->config); | 1447 | pci_write_config_dword(pdev, ivbep_uncore_irp_ctls[hwc->idx], hwc->config); |
1448 | } | 1448 | } |
1449 | 1449 | ||
1450 | static u64 ivt_uncore_irp_read_counter(struct intel_uncore_box *box, struct perf_event *event) | 1450 | static u64 ivbep_uncore_irp_read_counter(struct intel_uncore_box *box, struct perf_event *event) |
1451 | { | 1451 | { |
1452 | struct pci_dev *pdev = box->pci_dev; | 1452 | struct pci_dev *pdev = box->pci_dev; |
1453 | struct hw_perf_event *hwc = &event->hw; | 1453 | struct hw_perf_event *hwc = &event->hw; |
1454 | u64 count = 0; | 1454 | u64 count = 0; |
1455 | 1455 | ||
1456 | pci_read_config_dword(pdev, ivt_uncore_irp_ctrs[hwc->idx], (u32 *)&count); | 1456 | pci_read_config_dword(pdev, ivbep_uncore_irp_ctrs[hwc->idx], (u32 *)&count); |
1457 | pci_read_config_dword(pdev, ivt_uncore_irp_ctrs[hwc->idx] + 4, (u32 *)&count + 1); | 1457 | pci_read_config_dword(pdev, ivbep_uncore_irp_ctrs[hwc->idx] + 4, (u32 *)&count + 1); |
1458 | 1458 | ||
1459 | return count; | 1459 | return count; |
1460 | } | 1460 | } |
1461 | 1461 | ||
1462 | static struct intel_uncore_ops ivt_uncore_irp_ops = { | 1462 | static struct intel_uncore_ops ivbep_uncore_irp_ops = { |
1463 | .init_box = ivt_uncore_pci_init_box, | 1463 | .init_box = ivbep_uncore_pci_init_box, |
1464 | .disable_box = snbep_uncore_pci_disable_box, | 1464 | .disable_box = snbep_uncore_pci_disable_box, |
1465 | .enable_box = snbep_uncore_pci_enable_box, | 1465 | .enable_box = snbep_uncore_pci_enable_box, |
1466 | .disable_event = ivt_uncore_irp_disable_event, | 1466 | .disable_event = ivbep_uncore_irp_disable_event, |
1467 | .enable_event = ivt_uncore_irp_enable_event, | 1467 | .enable_event = ivbep_uncore_irp_enable_event, |
1468 | .read_counter = ivt_uncore_irp_read_counter, | 1468 | .read_counter = ivbep_uncore_irp_read_counter, |
1469 | }; | 1469 | }; |
1470 | 1470 | ||
1471 | static struct intel_uncore_type ivt_uncore_irp = { | 1471 | static struct intel_uncore_type ivbep_uncore_irp = { |
1472 | .name = "irp", | 1472 | .name = "irp", |
1473 | .num_counters = 4, | 1473 | .num_counters = 4, |
1474 | .num_boxes = 1, | 1474 | .num_boxes = 1, |
1475 | .perf_ctr_bits = 48, | 1475 | .perf_ctr_bits = 48, |
1476 | .event_mask = IVT_PMON_RAW_EVENT_MASK, | 1476 | .event_mask = IVBEP_PMON_RAW_EVENT_MASK, |
1477 | .box_ctl = SNBEP_PCI_PMON_BOX_CTL, | 1477 | .box_ctl = SNBEP_PCI_PMON_BOX_CTL, |
1478 | .ops = &ivt_uncore_irp_ops, | 1478 | .ops = &ivbep_uncore_irp_ops, |
1479 | .format_group = &ivt_uncore_format_group, | 1479 | .format_group = &ivbep_uncore_format_group, |
1480 | }; | 1480 | }; |
1481 | 1481 | ||
1482 | static struct intel_uncore_ops ivt_uncore_qpi_ops = { | 1482 | static struct intel_uncore_ops ivbep_uncore_qpi_ops = { |
1483 | .init_box = ivt_uncore_pci_init_box, | 1483 | .init_box = ivbep_uncore_pci_init_box, |
1484 | .disable_box = snbep_uncore_pci_disable_box, | 1484 | .disable_box = snbep_uncore_pci_disable_box, |
1485 | .enable_box = snbep_uncore_pci_enable_box, | 1485 | .enable_box = snbep_uncore_pci_enable_box, |
1486 | .disable_event = snbep_uncore_pci_disable_event, | 1486 | .disable_event = snbep_uncore_pci_disable_event, |
@@ -1491,129 +1491,129 @@ static struct intel_uncore_ops ivt_uncore_qpi_ops = { | |||
1491 | .put_constraint = uncore_put_constraint, | 1491 | .put_constraint = uncore_put_constraint, |
1492 | }; | 1492 | }; |
1493 | 1493 | ||
1494 | static struct intel_uncore_type ivt_uncore_qpi = { | 1494 | static struct intel_uncore_type ivbep_uncore_qpi = { |
1495 | .name = "qpi", | 1495 | .name = "qpi", |
1496 | .num_counters = 4, | 1496 | .num_counters = 4, |
1497 | .num_boxes = 3, | 1497 | .num_boxes = 3, |
1498 | .perf_ctr_bits = 48, | 1498 | .perf_ctr_bits = 48, |
1499 | .perf_ctr = SNBEP_PCI_PMON_CTR0, | 1499 | .perf_ctr = SNBEP_PCI_PMON_CTR0, |
1500 | .event_ctl = SNBEP_PCI_PMON_CTL0, | 1500 | .event_ctl = SNBEP_PCI_PMON_CTL0, |
1501 | .event_mask = IVT_QPI_PCI_PMON_RAW_EVENT_MASK, | 1501 | .event_mask = IVBEP_QPI_PCI_PMON_RAW_EVENT_MASK, |
1502 | .box_ctl = SNBEP_PCI_PMON_BOX_CTL, | 1502 | .box_ctl = SNBEP_PCI_PMON_BOX_CTL, |
1503 | .num_shared_regs = 1, | 1503 | .num_shared_regs = 1, |
1504 | .ops = &ivt_uncore_qpi_ops, | 1504 | .ops = &ivbep_uncore_qpi_ops, |
1505 | .format_group = &ivt_uncore_qpi_format_group, | 1505 | .format_group = &ivbep_uncore_qpi_format_group, |
1506 | }; | 1506 | }; |
1507 | 1507 | ||
1508 | static struct intel_uncore_type ivt_uncore_r2pcie = { | 1508 | static struct intel_uncore_type ivbep_uncore_r2pcie = { |
1509 | .name = "r2pcie", | 1509 | .name = "r2pcie", |
1510 | .num_counters = 4, | 1510 | .num_counters = 4, |
1511 | .num_boxes = 1, | 1511 | .num_boxes = 1, |
1512 | .perf_ctr_bits = 44, | 1512 | .perf_ctr_bits = 44, |
1513 | .constraints = snbep_uncore_r2pcie_constraints, | 1513 | .constraints = snbep_uncore_r2pcie_constraints, |
1514 | IVT_UNCORE_PCI_COMMON_INIT(), | 1514 | IVBEP_UNCORE_PCI_COMMON_INIT(), |
1515 | }; | 1515 | }; |
1516 | 1516 | ||
1517 | static struct intel_uncore_type ivt_uncore_r3qpi = { | 1517 | static struct intel_uncore_type ivbep_uncore_r3qpi = { |
1518 | .name = "r3qpi", | 1518 | .name = "r3qpi", |
1519 | .num_counters = 3, | 1519 | .num_counters = 3, |
1520 | .num_boxes = 2, | 1520 | .num_boxes = 2, |
1521 | .perf_ctr_bits = 44, | 1521 | .perf_ctr_bits = 44, |
1522 | .constraints = snbep_uncore_r3qpi_constraints, | 1522 | .constraints = snbep_uncore_r3qpi_constraints, |
1523 | IVT_UNCORE_PCI_COMMON_INIT(), | 1523 | IVBEP_UNCORE_PCI_COMMON_INIT(), |
1524 | }; | 1524 | }; |
1525 | 1525 | ||
1526 | enum { | 1526 | enum { |
1527 | IVT_PCI_UNCORE_HA, | 1527 | IVBEP_PCI_UNCORE_HA, |
1528 | IVT_PCI_UNCORE_IMC, | 1528 | IVBEP_PCI_UNCORE_IMC, |
1529 | IVT_PCI_UNCORE_IRP, | 1529 | IVBEP_PCI_UNCORE_IRP, |
1530 | IVT_PCI_UNCORE_QPI, | 1530 | IVBEP_PCI_UNCORE_QPI, |
1531 | IVT_PCI_UNCORE_R2PCIE, | 1531 | IVBEP_PCI_UNCORE_R2PCIE, |
1532 | IVT_PCI_UNCORE_R3QPI, | 1532 | IVBEP_PCI_UNCORE_R3QPI, |
1533 | }; | 1533 | }; |
1534 | 1534 | ||
1535 | static struct intel_uncore_type *ivt_pci_uncores[] = { | 1535 | static struct intel_uncore_type *ivbep_pci_uncores[] = { |
1536 | [IVT_PCI_UNCORE_HA] = &ivt_uncore_ha, | 1536 | [IVBEP_PCI_UNCORE_HA] = &ivbep_uncore_ha, |
1537 | [IVT_PCI_UNCORE_IMC] = &ivt_uncore_imc, | 1537 | [IVBEP_PCI_UNCORE_IMC] = &ivbep_uncore_imc, |
1538 | [IVT_PCI_UNCORE_IRP] = &ivt_uncore_irp, | 1538 | [IVBEP_PCI_UNCORE_IRP] = &ivbep_uncore_irp, |
1539 | [IVT_PCI_UNCORE_QPI] = &ivt_uncore_qpi, | 1539 | [IVBEP_PCI_UNCORE_QPI] = &ivbep_uncore_qpi, |
1540 | [IVT_PCI_UNCORE_R2PCIE] = &ivt_uncore_r2pcie, | 1540 | [IVBEP_PCI_UNCORE_R2PCIE] = &ivbep_uncore_r2pcie, |
1541 | [IVT_PCI_UNCORE_R3QPI] = &ivt_uncore_r3qpi, | 1541 | [IVBEP_PCI_UNCORE_R3QPI] = &ivbep_uncore_r3qpi, |
1542 | NULL, | 1542 | NULL, |
1543 | }; | 1543 | }; |
1544 | 1544 | ||
1545 | static DEFINE_PCI_DEVICE_TABLE(ivt_uncore_pci_ids) = { | 1545 | static DEFINE_PCI_DEVICE_TABLE(ivbep_uncore_pci_ids) = { |
1546 | { /* Home Agent 0 */ | 1546 | { /* Home Agent 0 */ |
1547 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe30), | 1547 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe30), |
1548 | .driver_data = UNCORE_PCI_DEV_DATA(IVT_PCI_UNCORE_HA, 0), | 1548 | .driver_data = UNCORE_PCI_DEV_DATA(IVBEP_PCI_UNCORE_HA, 0), |
1549 | }, | 1549 | }, |
1550 | { /* Home Agent 1 */ | 1550 | { /* Home Agent 1 */ |
1551 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe38), | 1551 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe38), |
1552 | .driver_data = UNCORE_PCI_DEV_DATA(IVT_PCI_UNCORE_HA, 1), | 1552 | .driver_data = UNCORE_PCI_DEV_DATA(IVBEP_PCI_UNCORE_HA, 1), |
1553 | }, | 1553 | }, |
1554 | { /* MC0 Channel 0 */ | 1554 | { /* MC0 Channel 0 */ |
1555 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xeb4), | 1555 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xeb4), |
1556 | .driver_data = UNCORE_PCI_DEV_DATA(IVT_PCI_UNCORE_IMC, 0), | 1556 | .driver_data = UNCORE_PCI_DEV_DATA(IVBEP_PCI_UNCORE_IMC, 0), |
1557 | }, | 1557 | }, |
1558 | { /* MC0 Channel 1 */ | 1558 | { /* MC0 Channel 1 */ |
1559 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xeb5), | 1559 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xeb5), |
1560 | .driver_data = UNCORE_PCI_DEV_DATA(IVT_PCI_UNCORE_IMC, 1), | 1560 | .driver_data = UNCORE_PCI_DEV_DATA(IVBEP_PCI_UNCORE_IMC, 1), |
1561 | }, | 1561 | }, |
1562 | { /* MC0 Channel 3 */ | 1562 | { /* MC0 Channel 3 */ |
1563 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xeb0), | 1563 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xeb0), |
1564 | .driver_data = UNCORE_PCI_DEV_DATA(IVT_PCI_UNCORE_IMC, 2), | 1564 | .driver_data = UNCORE_PCI_DEV_DATA(IVBEP_PCI_UNCORE_IMC, 2), |
1565 | }, | 1565 | }, |
1566 | { /* MC0 Channel 4 */ | 1566 | { /* MC0 Channel 4 */ |
1567 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xeb1), | 1567 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xeb1), |
1568 | .driver_data = UNCORE_PCI_DEV_DATA(IVT_PCI_UNCORE_IMC, 3), | 1568 | .driver_data = UNCORE_PCI_DEV_DATA(IVBEP_PCI_UNCORE_IMC, 3), |
1569 | }, | 1569 | }, |
1570 | { /* MC1 Channel 0 */ | 1570 | { /* MC1 Channel 0 */ |
1571 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xef4), | 1571 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xef4), |
1572 | .driver_data = UNCORE_PCI_DEV_DATA(IVT_PCI_UNCORE_IMC, 4), | 1572 | .driver_data = UNCORE_PCI_DEV_DATA(IVBEP_PCI_UNCORE_IMC, 4), |
1573 | }, | 1573 | }, |
1574 | { /* MC1 Channel 1 */ | 1574 | { /* MC1 Channel 1 */ |
1575 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xef5), | 1575 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xef5), |
1576 | .driver_data = UNCORE_PCI_DEV_DATA(IVT_PCI_UNCORE_IMC, 5), | 1576 | .driver_data = UNCORE_PCI_DEV_DATA(IVBEP_PCI_UNCORE_IMC, 5), |
1577 | }, | 1577 | }, |
1578 | { /* MC1 Channel 3 */ | 1578 | { /* MC1 Channel 3 */ |
1579 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xef0), | 1579 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xef0), |
1580 | .driver_data = UNCORE_PCI_DEV_DATA(IVT_PCI_UNCORE_IMC, 6), | 1580 | .driver_data = UNCORE_PCI_DEV_DATA(IVBEP_PCI_UNCORE_IMC, 6), |
1581 | }, | 1581 | }, |
1582 | { /* MC1 Channel 4 */ | 1582 | { /* MC1 Channel 4 */ |
1583 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xef1), | 1583 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xef1), |
1584 | .driver_data = UNCORE_PCI_DEV_DATA(IVT_PCI_UNCORE_IMC, 7), | 1584 | .driver_data = UNCORE_PCI_DEV_DATA(IVBEP_PCI_UNCORE_IMC, 7), |
1585 | }, | 1585 | }, |
1586 | { /* IRP */ | 1586 | { /* IRP */ |
1587 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe39), | 1587 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe39), |
1588 | .driver_data = UNCORE_PCI_DEV_DATA(IVT_PCI_UNCORE_IRP, 0), | 1588 | .driver_data = UNCORE_PCI_DEV_DATA(IVBEP_PCI_UNCORE_IRP, 0), |
1589 | }, | 1589 | }, |
1590 | { /* QPI0 Port 0 */ | 1590 | { /* QPI0 Port 0 */ |
1591 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe32), | 1591 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe32), |
1592 | .driver_data = UNCORE_PCI_DEV_DATA(IVT_PCI_UNCORE_QPI, 0), | 1592 | .driver_data = UNCORE_PCI_DEV_DATA(IVBEP_PCI_UNCORE_QPI, 0), |
1593 | }, | 1593 | }, |
1594 | { /* QPI0 Port 1 */ | 1594 | { /* QPI0 Port 1 */ |
1595 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe33), | 1595 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe33), |
1596 | .driver_data = UNCORE_PCI_DEV_DATA(IVT_PCI_UNCORE_QPI, 1), | 1596 | .driver_data = UNCORE_PCI_DEV_DATA(IVBEP_PCI_UNCORE_QPI, 1), |
1597 | }, | 1597 | }, |
1598 | { /* QPI1 Port 2 */ | 1598 | { /* QPI1 Port 2 */ |
1599 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe3a), | 1599 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe3a), |
1600 | .driver_data = UNCORE_PCI_DEV_DATA(IVT_PCI_UNCORE_QPI, 2), | 1600 | .driver_data = UNCORE_PCI_DEV_DATA(IVBEP_PCI_UNCORE_QPI, 2), |
1601 | }, | 1601 | }, |
1602 | { /* R2PCIe */ | 1602 | { /* R2PCIe */ |
1603 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe34), | 1603 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe34), |
1604 | .driver_data = UNCORE_PCI_DEV_DATA(IVT_PCI_UNCORE_R2PCIE, 0), | 1604 | .driver_data = UNCORE_PCI_DEV_DATA(IVBEP_PCI_UNCORE_R2PCIE, 0), |
1605 | }, | 1605 | }, |
1606 | { /* R3QPI0 Link 0 */ | 1606 | { /* R3QPI0 Link 0 */ |
1607 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe36), | 1607 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe36), |
1608 | .driver_data = UNCORE_PCI_DEV_DATA(IVT_PCI_UNCORE_R3QPI, 0), | 1608 | .driver_data = UNCORE_PCI_DEV_DATA(IVBEP_PCI_UNCORE_R3QPI, 0), |
1609 | }, | 1609 | }, |
1610 | { /* R3QPI0 Link 1 */ | 1610 | { /* R3QPI0 Link 1 */ |
1611 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe37), | 1611 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe37), |
1612 | .driver_data = UNCORE_PCI_DEV_DATA(IVT_PCI_UNCORE_R3QPI, 1), | 1612 | .driver_data = UNCORE_PCI_DEV_DATA(IVBEP_PCI_UNCORE_R3QPI, 1), |
1613 | }, | 1613 | }, |
1614 | { /* R3QPI1 Link 2 */ | 1614 | { /* R3QPI1 Link 2 */ |
1615 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe3e), | 1615 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe3e), |
1616 | .driver_data = UNCORE_PCI_DEV_DATA(IVT_PCI_UNCORE_R3QPI, 2), | 1616 | .driver_data = UNCORE_PCI_DEV_DATA(IVBEP_PCI_UNCORE_R3QPI, 2), |
1617 | }, | 1617 | }, |
1618 | { /* QPI Port 0 filter */ | 1618 | { /* QPI Port 0 filter */ |
1619 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe86), | 1619 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe86), |
@@ -1628,18 +1628,18 @@ static DEFINE_PCI_DEVICE_TABLE(ivt_uncore_pci_ids) = { | |||
1628 | { /* end: all zeroes */ } | 1628 | { /* end: all zeroes */ } |
1629 | }; | 1629 | }; |
1630 | 1630 | ||
1631 | static struct pci_driver ivt_uncore_pci_driver = { | 1631 | static struct pci_driver ivbep_uncore_pci_driver = { |
1632 | .name = "ivt_uncore", | 1632 | .name = "ivbep_uncore", |
1633 | .id_table = ivt_uncore_pci_ids, | 1633 | .id_table = ivbep_uncore_pci_ids, |
1634 | }; | 1634 | }; |
1635 | 1635 | ||
1636 | int ivt_uncore_pci_init(void) | 1636 | int ivbep_uncore_pci_init(void) |
1637 | { | 1637 | { |
1638 | int ret = snbep_pci2phy_map_init(0x0e1e); | 1638 | int ret = snbep_pci2phy_map_init(0x0e1e); |
1639 | if (ret) | 1639 | if (ret) |
1640 | return ret; | 1640 | return ret; |
1641 | uncore_pci_uncores = ivt_pci_uncores; | 1641 | uncore_pci_uncores = ivbep_pci_uncores; |
1642 | uncore_pci_driver = &ivt_uncore_pci_driver; | 1642 | uncore_pci_driver = &ivbep_uncore_pci_driver; |
1643 | return 0; | 1643 | return 0; |
1644 | } | 1644 | } |
1645 | /* end of IvyTown uncore support */ | 1645 | /* end of IvyTown uncore support */ |