op_model_amd.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636
  1. /*
  2. * @file op_model_amd.c
  3. * athlon / K7 / K8 / Family 10h model-specific MSR operations
  4. *
  5. * @remark Copyright 2002-2009 OProfile authors
  6. * @remark Read the file COPYING
  7. *
  8. * @author John Levon
  9. * @author Philippe Elie
  10. * @author Graydon Hoare
  11. * @author Robert Richter <robert.richter@amd.com>
  12. * @author Barry Kasindorf <barry.kasindorf@amd.com>
  13. * @author Jason Yeh <jason.yeh@amd.com>
  14. * @author Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
  15. */
  16. #include <linux/oprofile.h>
  17. #include <linux/device.h>
  18. #include <linux/pci.h>
  19. #include <linux/percpu.h>
  20. #include <asm/ptrace.h>
  21. #include <asm/msr.h>
  22. #include <asm/nmi.h>
  23. #include <asm/apic.h>
  24. #include <asm/processor.h>
  25. #include <asm/cpufeature.h>
  26. #include "op_x86_model.h"
  27. #include "op_counter.h"
  28. #define NUM_COUNTERS 4
  29. #define NUM_CONTROLS 4
  30. #ifdef CONFIG_OPROFILE_EVENT_MULTIPLEX
  31. #define NUM_VIRT_COUNTERS 32
  32. #define NUM_VIRT_CONTROLS 32
  33. #else
  34. #define NUM_VIRT_COUNTERS NUM_COUNTERS
  35. #define NUM_VIRT_CONTROLS NUM_CONTROLS
  36. #endif
  37. #define OP_EVENT_MASK 0x0FFF
  38. #define OP_CTR_OVERFLOW (1ULL<<31)
  39. #define MSR_AMD_EVENTSEL_RESERVED ((0xFFFFFCF0ULL<<32)|(1ULL<<21))
  40. static unsigned long reset_value[NUM_VIRT_COUNTERS];
  41. /* IbsFetchCtl bits/masks */
  42. #define IBS_FETCH_RAND_EN (1ULL<<57)
  43. #define IBS_FETCH_VAL (1ULL<<49)
  44. #define IBS_FETCH_ENABLE (1ULL<<48)
  45. #define IBS_FETCH_CNT_MASK 0xFFFF0000ULL
  46. /* IbsOpCtl bits */
  47. #define IBS_OP_CNT_CTL (1ULL<<19)
  48. #define IBS_OP_VAL (1ULL<<18)
  49. #define IBS_OP_ENABLE (1ULL<<17)
  50. #define IBS_FETCH_SIZE 6
  51. #define IBS_OP_SIZE 12
  52. static u32 ibs_caps;
  53. struct op_ibs_config {
  54. unsigned long op_enabled;
  55. unsigned long fetch_enabled;
  56. unsigned long max_cnt_fetch;
  57. unsigned long max_cnt_op;
  58. unsigned long rand_en;
  59. unsigned long dispatched_ops;
  60. };
  61. static struct op_ibs_config ibs_config;
  62. static u64 ibs_op_ctl;
  63. /*
  64. * IBS cpuid feature detection
  65. */
  66. #define IBS_CPUID_FEATURES 0x8000001b
  67. /*
  68. * Same bit mask as for IBS cpuid feature flags (Fn8000_001B_EAX), but
  69. * bit 0 is used to indicate the existence of IBS.
  70. */
  71. #define IBS_CAPS_AVAIL (1LL<<0)
  72. #define IBS_CAPS_RDWROPCNT (1LL<<3)
  73. #define IBS_CAPS_OPCNT (1LL<<4)
  74. /*
  75. * IBS randomization macros
  76. */
  77. #define IBS_RANDOM_BITS 12
  78. #define IBS_RANDOM_MASK ((1ULL << IBS_RANDOM_BITS) - 1)
  79. #define IBS_RANDOM_MAXCNT_OFFSET (1ULL << (IBS_RANDOM_BITS - 5))
  80. static u32 get_ibs_caps(void)
  81. {
  82. u32 ibs_caps;
  83. unsigned int max_level;
  84. if (!boot_cpu_has(X86_FEATURE_IBS))
  85. return 0;
  86. /* check IBS cpuid feature flags */
  87. max_level = cpuid_eax(0x80000000);
  88. if (max_level < IBS_CPUID_FEATURES)
  89. return IBS_CAPS_AVAIL;
  90. ibs_caps = cpuid_eax(IBS_CPUID_FEATURES);
  91. if (!(ibs_caps & IBS_CAPS_AVAIL))
  92. /* cpuid flags not valid */
  93. return IBS_CAPS_AVAIL;
  94. return ibs_caps;
  95. }
  96. #ifdef CONFIG_OPROFILE_EVENT_MULTIPLEX
  97. static void op_mux_fill_in_addresses(struct op_msrs * const msrs)
  98. {
  99. int i;
  100. for (i = 0; i < NUM_VIRT_COUNTERS; i++) {
  101. int hw_counter = op_x86_virt_to_phys(i);
  102. if (reserve_perfctr_nmi(MSR_K7_PERFCTR0 + i))
  103. msrs->multiplex[i].addr = MSR_K7_PERFCTR0 + hw_counter;
  104. else
  105. msrs->multiplex[i].addr = 0;
  106. }
  107. }
  108. static void op_mux_switch_ctrl(struct op_x86_model_spec const *model,
  109. struct op_msrs const * const msrs)
  110. {
  111. u64 val;
  112. int i;
  113. /* enable active counters */
  114. for (i = 0; i < NUM_COUNTERS; ++i) {
  115. int virt = op_x86_phys_to_virt(i);
  116. if (!counter_config[virt].enabled)
  117. continue;
  118. rdmsrl(msrs->controls[i].addr, val);
  119. val &= model->reserved;
  120. val |= op_x86_get_ctrl(model, &counter_config[virt]);
  121. wrmsrl(msrs->controls[i].addr, val);
  122. }
  123. }
  124. #else
  125. static inline void op_mux_fill_in_addresses(struct op_msrs * const msrs) { }
  126. #endif
  127. /* functions for op_amd_spec */
  128. static void op_amd_fill_in_addresses(struct op_msrs * const msrs)
  129. {
  130. int i;
  131. for (i = 0; i < NUM_COUNTERS; i++) {
  132. if (reserve_perfctr_nmi(MSR_K7_PERFCTR0 + i))
  133. msrs->counters[i].addr = MSR_K7_PERFCTR0 + i;
  134. else
  135. msrs->counters[i].addr = 0;
  136. }
  137. for (i = 0; i < NUM_CONTROLS; i++) {
  138. if (reserve_evntsel_nmi(MSR_K7_EVNTSEL0 + i))
  139. msrs->controls[i].addr = MSR_K7_EVNTSEL0 + i;
  140. else
  141. msrs->controls[i].addr = 0;
  142. }
  143. op_mux_fill_in_addresses(msrs);
  144. }
  145. static void op_amd_setup_ctrs(struct op_x86_model_spec const *model,
  146. struct op_msrs const * const msrs)
  147. {
  148. u64 val;
  149. int i;
  150. /* setup reset_value */
  151. for (i = 0; i < NUM_VIRT_COUNTERS; ++i) {
  152. if (counter_config[i].enabled)
  153. reset_value[i] = counter_config[i].count;
  154. else
  155. reset_value[i] = 0;
  156. }
  157. /* clear all counters */
  158. for (i = 0; i < NUM_CONTROLS; ++i) {
  159. if (unlikely(!msrs->controls[i].addr)) {
  160. if (counter_config[i].enabled && !smp_processor_id())
  161. /*
  162. * counter is reserved, this is on all
  163. * cpus, so report only for cpu #0
  164. */
  165. op_x86_warn_reserved(i);
  166. continue;
  167. }
  168. rdmsrl(msrs->controls[i].addr, val);
  169. if (val & ARCH_PERFMON_EVENTSEL0_ENABLE)
  170. op_x86_warn_in_use(i);
  171. val &= model->reserved;
  172. wrmsrl(msrs->controls[i].addr, val);
  173. }
  174. /* avoid a false detection of ctr overflows in NMI handler */
  175. for (i = 0; i < NUM_COUNTERS; ++i) {
  176. if (unlikely(!msrs->counters[i].addr))
  177. continue;
  178. wrmsrl(msrs->counters[i].addr, -1LL);
  179. }
  180. /* enable active counters */
  181. for (i = 0; i < NUM_COUNTERS; ++i) {
  182. int virt = op_x86_phys_to_virt(i);
  183. if (!counter_config[virt].enabled)
  184. continue;
  185. if (!msrs->counters[i].addr)
  186. continue;
  187. /* setup counter registers */
  188. wrmsrl(msrs->counters[i].addr, -(u64)reset_value[virt]);
  189. /* setup control registers */
  190. rdmsrl(msrs->controls[i].addr, val);
  191. val &= model->reserved;
  192. val |= op_x86_get_ctrl(model, &counter_config[virt]);
  193. wrmsrl(msrs->controls[i].addr, val);
  194. }
  195. }
  196. /*
  197. * 16-bit Linear Feedback Shift Register (LFSR)
  198. *
  199. * 16 14 13 11
  200. * Feedback polynomial = X + X + X + X + 1
  201. */
  202. static unsigned int lfsr_random(void)
  203. {
  204. static unsigned int lfsr_value = 0xF00D;
  205. unsigned int bit;
  206. /* Compute next bit to shift in */
  207. bit = ((lfsr_value >> 0) ^
  208. (lfsr_value >> 2) ^
  209. (lfsr_value >> 3) ^
  210. (lfsr_value >> 5)) & 0x0001;
  211. /* Advance to next register value */
  212. lfsr_value = (lfsr_value >> 1) | (bit << 15);
  213. return lfsr_value;
  214. }
  215. /*
  216. * IBS software randomization
  217. *
  218. * The IBS periodic op counter is randomized in software. The lower 12
  219. * bits of the 20 bit counter are randomized. IbsOpCurCnt is
  220. * initialized with a 12 bit random value.
  221. */
  222. static inline u64 op_amd_randomize_ibs_op(u64 val)
  223. {
  224. unsigned int random = lfsr_random();
  225. if (!(ibs_caps & IBS_CAPS_RDWROPCNT))
  226. /*
  227. * Work around if the hw can not write to IbsOpCurCnt
  228. *
  229. * Randomize the lower 8 bits of the 16 bit
  230. * IbsOpMaxCnt [15:0] value in the range of -128 to
  231. * +127 by adding/subtracting an offset to the
  232. * maximum count (IbsOpMaxCnt).
  233. *
  234. * To avoid over or underflows and protect upper bits
  235. * starting at bit 16, the initial value for
  236. * IbsOpMaxCnt must fit in the range from 0x0081 to
  237. * 0xff80.
  238. */
  239. val += (s8)(random >> 4);
  240. else
  241. val |= (u64)(random & IBS_RANDOM_MASK) << 32;
  242. return val;
  243. }
  244. static inline void
  245. op_amd_handle_ibs(struct pt_regs * const regs,
  246. struct op_msrs const * const msrs)
  247. {
  248. u64 val, ctl;
  249. struct op_entry entry;
  250. if (!ibs_caps)
  251. return;
  252. if (ibs_config.fetch_enabled) {
  253. rdmsrl(MSR_AMD64_IBSFETCHCTL, ctl);
  254. if (ctl & IBS_FETCH_VAL) {
  255. rdmsrl(MSR_AMD64_IBSFETCHLINAD, val);
  256. oprofile_write_reserve(&entry, regs, val,
  257. IBS_FETCH_CODE, IBS_FETCH_SIZE);
  258. oprofile_add_data64(&entry, val);
  259. oprofile_add_data64(&entry, ctl);
  260. rdmsrl(MSR_AMD64_IBSFETCHPHYSAD, val);
  261. oprofile_add_data64(&entry, val);
  262. oprofile_write_commit(&entry);
  263. /* reenable the IRQ */
  264. ctl &= ~(IBS_FETCH_VAL | IBS_FETCH_CNT_MASK);
  265. ctl |= IBS_FETCH_ENABLE;
  266. wrmsrl(MSR_AMD64_IBSFETCHCTL, ctl);
  267. }
  268. }
  269. if (ibs_config.op_enabled) {
  270. rdmsrl(MSR_AMD64_IBSOPCTL, ctl);
  271. if (ctl & IBS_OP_VAL) {
  272. rdmsrl(MSR_AMD64_IBSOPRIP, val);
  273. oprofile_write_reserve(&entry, regs, val,
  274. IBS_OP_CODE, IBS_OP_SIZE);
  275. oprofile_add_data64(&entry, val);
  276. rdmsrl(MSR_AMD64_IBSOPDATA, val);
  277. oprofile_add_data64(&entry, val);
  278. rdmsrl(MSR_AMD64_IBSOPDATA2, val);
  279. oprofile_add_data64(&entry, val);
  280. rdmsrl(MSR_AMD64_IBSOPDATA3, val);
  281. oprofile_add_data64(&entry, val);
  282. rdmsrl(MSR_AMD64_IBSDCLINAD, val);
  283. oprofile_add_data64(&entry, val);
  284. rdmsrl(MSR_AMD64_IBSDCPHYSAD, val);
  285. oprofile_add_data64(&entry, val);
  286. oprofile_write_commit(&entry);
  287. /* reenable the IRQ */
  288. ctl = op_amd_randomize_ibs_op(ibs_op_ctl);
  289. wrmsrl(MSR_AMD64_IBSOPCTL, ctl);
  290. }
  291. }
  292. }
  293. static inline void op_amd_start_ibs(void)
  294. {
  295. u64 val;
  296. if (!ibs_caps)
  297. return;
  298. if (ibs_config.fetch_enabled) {
  299. val = (ibs_config.max_cnt_fetch >> 4) & 0xFFFF;
  300. val |= ibs_config.rand_en ? IBS_FETCH_RAND_EN : 0;
  301. val |= IBS_FETCH_ENABLE;
  302. wrmsrl(MSR_AMD64_IBSFETCHCTL, val);
  303. }
  304. if (ibs_config.op_enabled) {
  305. ibs_op_ctl = ibs_config.max_cnt_op >> 4;
  306. if (!(ibs_caps & IBS_CAPS_RDWROPCNT)) {
  307. /*
  308. * IbsOpCurCnt not supported. See
  309. * op_amd_randomize_ibs_op() for details.
  310. */
  311. ibs_op_ctl = clamp(ibs_op_ctl, 0x0081ULL, 0xFF80ULL);
  312. } else {
  313. /*
  314. * The start value is randomized with a
  315. * positive offset, we need to compensate it
  316. * with the half of the randomized range. Also
  317. * avoid underflows.
  318. */
  319. ibs_op_ctl = min(ibs_op_ctl + IBS_RANDOM_MAXCNT_OFFSET,
  320. 0xFFFFULL);
  321. }
  322. if (ibs_caps & IBS_CAPS_OPCNT && ibs_config.dispatched_ops)
  323. ibs_op_ctl |= IBS_OP_CNT_CTL;
  324. ibs_op_ctl |= IBS_OP_ENABLE;
  325. val = op_amd_randomize_ibs_op(ibs_op_ctl);
  326. wrmsrl(MSR_AMD64_IBSOPCTL, val);
  327. }
  328. }
  329. static void op_amd_stop_ibs(void)
  330. {
  331. if (!ibs_caps)
  332. return;
  333. if (ibs_config.fetch_enabled)
  334. /* clear max count and enable */
  335. wrmsrl(MSR_AMD64_IBSFETCHCTL, 0);
  336. if (ibs_config.op_enabled)
  337. /* clear max count and enable */
  338. wrmsrl(MSR_AMD64_IBSOPCTL, 0);
  339. }
  340. static int op_amd_check_ctrs(struct pt_regs * const regs,
  341. struct op_msrs const * const msrs)
  342. {
  343. u64 val;
  344. int i;
  345. for (i = 0; i < NUM_COUNTERS; ++i) {
  346. int virt = op_x86_phys_to_virt(i);
  347. if (!reset_value[virt])
  348. continue;
  349. rdmsrl(msrs->counters[i].addr, val);
  350. /* bit is clear if overflowed: */
  351. if (val & OP_CTR_OVERFLOW)
  352. continue;
  353. oprofile_add_sample(regs, virt);
  354. wrmsrl(msrs->counters[i].addr, -(u64)reset_value[virt]);
  355. }
  356. op_amd_handle_ibs(regs, msrs);
  357. /* See op_model_ppro.c */
  358. return 1;
  359. }
  360. static void op_amd_start(struct op_msrs const * const msrs)
  361. {
  362. u64 val;
  363. int i;
  364. for (i = 0; i < NUM_COUNTERS; ++i) {
  365. if (!reset_value[op_x86_phys_to_virt(i)])
  366. continue;
  367. rdmsrl(msrs->controls[i].addr, val);
  368. val |= ARCH_PERFMON_EVENTSEL0_ENABLE;
  369. wrmsrl(msrs->controls[i].addr, val);
  370. }
  371. op_amd_start_ibs();
  372. }
  373. static void op_amd_stop(struct op_msrs const * const msrs)
  374. {
  375. u64 val;
  376. int i;
  377. /*
  378. * Subtle: stop on all counters to avoid race with setting our
  379. * pm callback
  380. */
  381. for (i = 0; i < NUM_COUNTERS; ++i) {
  382. if (!reset_value[op_x86_phys_to_virt(i)])
  383. continue;
  384. rdmsrl(msrs->controls[i].addr, val);
  385. val &= ~ARCH_PERFMON_EVENTSEL0_ENABLE;
  386. wrmsrl(msrs->controls[i].addr, val);
  387. }
  388. op_amd_stop_ibs();
  389. }
  390. static void op_amd_shutdown(struct op_msrs const * const msrs)
  391. {
  392. int i;
  393. for (i = 0; i < NUM_COUNTERS; ++i) {
  394. if (msrs->counters[i].addr)
  395. release_perfctr_nmi(MSR_K7_PERFCTR0 + i);
  396. }
  397. for (i = 0; i < NUM_CONTROLS; ++i) {
  398. if (msrs->controls[i].addr)
  399. release_evntsel_nmi(MSR_K7_EVNTSEL0 + i);
  400. }
  401. }
  402. static u8 ibs_eilvt_off;
  403. static inline void apic_init_ibs_nmi_per_cpu(void *arg)
  404. {
  405. ibs_eilvt_off = setup_APIC_eilvt_ibs(0, APIC_EILVT_MSG_NMI, 0);
  406. }
  407. static inline void apic_clear_ibs_nmi_per_cpu(void *arg)
  408. {
  409. setup_APIC_eilvt_ibs(0, APIC_EILVT_MSG_FIX, 1);
  410. }
  411. static int init_ibs_nmi(void)
  412. {
  413. #define IBSCTL_LVTOFFSETVAL (1 << 8)
  414. #define IBSCTL 0x1cc
  415. struct pci_dev *cpu_cfg;
  416. int nodes;
  417. u32 value = 0;
  418. /* per CPU setup */
  419. on_each_cpu(apic_init_ibs_nmi_per_cpu, NULL, 1);
  420. nodes = 0;
  421. cpu_cfg = NULL;
  422. do {
  423. cpu_cfg = pci_get_device(PCI_VENDOR_ID_AMD,
  424. PCI_DEVICE_ID_AMD_10H_NB_MISC,
  425. cpu_cfg);
  426. if (!cpu_cfg)
  427. break;
  428. ++nodes;
  429. pci_write_config_dword(cpu_cfg, IBSCTL, ibs_eilvt_off
  430. | IBSCTL_LVTOFFSETVAL);
  431. pci_read_config_dword(cpu_cfg, IBSCTL, &value);
  432. if (value != (ibs_eilvt_off | IBSCTL_LVTOFFSETVAL)) {
  433. pci_dev_put(cpu_cfg);
  434. printk(KERN_DEBUG "Failed to setup IBS LVT offset, "
  435. "IBSCTL = 0x%08x", value);
  436. return 1;
  437. }
  438. } while (1);
  439. if (!nodes) {
  440. printk(KERN_DEBUG "No CPU node configured for IBS");
  441. return 1;
  442. }
  443. return 0;
  444. }
  445. /* uninitialize the APIC for the IBS interrupts if needed */
  446. static void clear_ibs_nmi(void)
  447. {
  448. if (ibs_caps)
  449. on_each_cpu(apic_clear_ibs_nmi_per_cpu, NULL, 1);
  450. }
  451. /* initialize the APIC for the IBS interrupts if available */
  452. static void ibs_init(void)
  453. {
  454. ibs_caps = get_ibs_caps();
  455. if (!ibs_caps)
  456. return;
  457. if (init_ibs_nmi()) {
  458. ibs_caps = 0;
  459. return;
  460. }
  461. printk(KERN_INFO "oprofile: AMD IBS detected (0x%08x)\n",
  462. (unsigned)ibs_caps);
  463. }
  464. static void ibs_exit(void)
  465. {
  466. if (!ibs_caps)
  467. return;
  468. clear_ibs_nmi();
  469. }
  470. static int (*create_arch_files)(struct super_block *sb, struct dentry *root);
  471. static int setup_ibs_files(struct super_block *sb, struct dentry *root)
  472. {
  473. struct dentry *dir;
  474. int ret = 0;
  475. /* architecture specific files */
  476. if (create_arch_files)
  477. ret = create_arch_files(sb, root);
  478. if (ret)
  479. return ret;
  480. if (!ibs_caps)
  481. return ret;
  482. /* model specific files */
  483. /* setup some reasonable defaults */
  484. ibs_config.max_cnt_fetch = 250000;
  485. ibs_config.fetch_enabled = 0;
  486. ibs_config.max_cnt_op = 250000;
  487. ibs_config.op_enabled = 0;
  488. ibs_config.dispatched_ops = 0;
  489. dir = oprofilefs_mkdir(sb, root, "ibs_fetch");
  490. oprofilefs_create_ulong(sb, dir, "enable",
  491. &ibs_config.fetch_enabled);
  492. oprofilefs_create_ulong(sb, dir, "max_count",
  493. &ibs_config.max_cnt_fetch);
  494. oprofilefs_create_ulong(sb, dir, "rand_enable",
  495. &ibs_config.rand_en);
  496. dir = oprofilefs_mkdir(sb, root, "ibs_op");
  497. oprofilefs_create_ulong(sb, dir, "enable",
  498. &ibs_config.op_enabled);
  499. oprofilefs_create_ulong(sb, dir, "max_count",
  500. &ibs_config.max_cnt_op);
  501. if (ibs_caps & IBS_CAPS_OPCNT)
  502. oprofilefs_create_ulong(sb, dir, "dispatched_ops",
  503. &ibs_config.dispatched_ops);
  504. return 0;
  505. }
  506. static int op_amd_init(struct oprofile_operations *ops)
  507. {
  508. ibs_init();
  509. create_arch_files = ops->create_files;
  510. ops->create_files = setup_ibs_files;
  511. return 0;
  512. }
  513. static void op_amd_exit(void)
  514. {
  515. ibs_exit();
  516. }
  517. struct op_x86_model_spec op_amd_spec = {
  518. .num_counters = NUM_COUNTERS,
  519. .num_controls = NUM_CONTROLS,
  520. .num_virt_counters = NUM_VIRT_COUNTERS,
  521. .reserved = MSR_AMD_EVENTSEL_RESERVED,
  522. .event_mask = OP_EVENT_MASK,
  523. .init = op_amd_init,
  524. .exit = op_amd_exit,
  525. .fill_in_addresses = &op_amd_fill_in_addresses,
  526. .setup_ctrs = &op_amd_setup_ctrs,
  527. .check_ctrs = &op_amd_check_ctrs,
  528. .start = &op_amd_start,
  529. .stop = &op_amd_stop,
  530. .shutdown = &op_amd_shutdown,
  531. #ifdef CONFIG_OPROFILE_EVENT_MULTIPLEX
  532. .switch_ctrl = &op_mux_switch_ctrl,
  533. #endif
  534. };