perf_event_intel_ds.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664
  1. #ifdef CONFIG_CPU_SUP_INTEL
  2. /* The maximal number of PEBS events: */
  3. #define MAX_PEBS_EVENTS 4
  4. /* The size of a BTS record in bytes: */
  5. #define BTS_RECORD_SIZE 24
  6. #define BTS_BUFFER_SIZE (PAGE_SIZE << 4)
  7. #define PEBS_BUFFER_SIZE PAGE_SIZE
  8. /*
  9. * pebs_record_32 for p4 and core not supported
  10. struct pebs_record_32 {
  11. u32 flags, ip;
  12. u32 ax, bc, cx, dx;
  13. u32 si, di, bp, sp;
  14. };
  15. */
  16. struct pebs_record_core {
  17. u64 flags, ip;
  18. u64 ax, bx, cx, dx;
  19. u64 si, di, bp, sp;
  20. u64 r8, r9, r10, r11;
  21. u64 r12, r13, r14, r15;
  22. };
  23. struct pebs_record_nhm {
  24. u64 flags, ip;
  25. u64 ax, bx, cx, dx;
  26. u64 si, di, bp, sp;
  27. u64 r8, r9, r10, r11;
  28. u64 r12, r13, r14, r15;
  29. u64 status, dla, dse, lat;
  30. };
  31. /*
  32. * A debug store configuration.
  33. *
  34. * We only support architectures that use 64bit fields.
  35. */
  36. struct debug_store {
  37. u64 bts_buffer_base;
  38. u64 bts_index;
  39. u64 bts_absolute_maximum;
  40. u64 bts_interrupt_threshold;
  41. u64 pebs_buffer_base;
  42. u64 pebs_index;
  43. u64 pebs_absolute_maximum;
  44. u64 pebs_interrupt_threshold;
  45. u64 pebs_event_reset[MAX_PEBS_EVENTS];
  46. };
  47. static void init_debug_store_on_cpu(int cpu)
  48. {
  49. struct debug_store *ds = per_cpu(cpu_hw_events, cpu).ds;
  50. if (!ds)
  51. return;
  52. wrmsr_on_cpu(cpu, MSR_IA32_DS_AREA,
  53. (u32)((u64)(unsigned long)ds),
  54. (u32)((u64)(unsigned long)ds >> 32));
  55. }
  56. static void fini_debug_store_on_cpu(int cpu)
  57. {
  58. if (!per_cpu(cpu_hw_events, cpu).ds)
  59. return;
  60. wrmsr_on_cpu(cpu, MSR_IA32_DS_AREA, 0, 0);
  61. }
  62. static void release_ds_buffers(void)
  63. {
  64. int cpu;
  65. if (!x86_pmu.bts && !x86_pmu.pebs)
  66. return;
  67. get_online_cpus();
  68. for_each_online_cpu(cpu)
  69. fini_debug_store_on_cpu(cpu);
  70. for_each_possible_cpu(cpu) {
  71. struct debug_store *ds = per_cpu(cpu_hw_events, cpu).ds;
  72. if (!ds)
  73. continue;
  74. per_cpu(cpu_hw_events, cpu).ds = NULL;
  75. kfree((void *)(unsigned long)ds->pebs_buffer_base);
  76. kfree((void *)(unsigned long)ds->bts_buffer_base);
  77. kfree(ds);
  78. }
  79. put_online_cpus();
  80. }
  81. static int reserve_ds_buffers(void)
  82. {
  83. int cpu, err = 0;
  84. if (!x86_pmu.bts && !x86_pmu.pebs)
  85. return 0;
  86. get_online_cpus();
  87. for_each_possible_cpu(cpu) {
  88. struct debug_store *ds;
  89. void *buffer;
  90. int max, thresh;
  91. err = -ENOMEM;
  92. ds = kzalloc(sizeof(*ds), GFP_KERNEL);
  93. if (unlikely(!ds))
  94. break;
  95. per_cpu(cpu_hw_events, cpu).ds = ds;
  96. if (x86_pmu.bts) {
  97. buffer = kzalloc(BTS_BUFFER_SIZE, GFP_KERNEL);
  98. if (unlikely(!buffer))
  99. break;
  100. max = BTS_BUFFER_SIZE / BTS_RECORD_SIZE;
  101. thresh = max / 16;
  102. ds->bts_buffer_base = (u64)(unsigned long)buffer;
  103. ds->bts_index = ds->bts_buffer_base;
  104. ds->bts_absolute_maximum = ds->bts_buffer_base +
  105. max * BTS_RECORD_SIZE;
  106. ds->bts_interrupt_threshold = ds->bts_absolute_maximum -
  107. thresh * BTS_RECORD_SIZE;
  108. }
  109. if (x86_pmu.pebs) {
  110. buffer = kzalloc(PEBS_BUFFER_SIZE, GFP_KERNEL);
  111. if (unlikely(!buffer))
  112. break;
  113. max = PEBS_BUFFER_SIZE / x86_pmu.pebs_record_size;
  114. ds->pebs_buffer_base = (u64)(unsigned long)buffer;
  115. ds->pebs_index = ds->pebs_buffer_base;
  116. ds->pebs_absolute_maximum = ds->pebs_buffer_base +
  117. max * x86_pmu.pebs_record_size;
  118. /*
  119. * Always use single record PEBS
  120. */
  121. ds->pebs_interrupt_threshold = ds->pebs_buffer_base +
  122. x86_pmu.pebs_record_size;
  123. }
  124. err = 0;
  125. }
  126. if (err)
  127. release_ds_buffers();
  128. else {
  129. for_each_online_cpu(cpu)
  130. init_debug_store_on_cpu(cpu);
  131. }
  132. put_online_cpus();
  133. return err;
  134. }
  135. /*
  136. * BTS
  137. */
  138. static struct event_constraint bts_constraint =
  139. EVENT_CONSTRAINT(0, 1ULL << X86_PMC_IDX_FIXED_BTS, 0);
  140. static void intel_pmu_enable_bts(u64 config)
  141. {
  142. unsigned long debugctlmsr;
  143. debugctlmsr = get_debugctlmsr();
  144. debugctlmsr |= DEBUGCTLMSR_TR;
  145. debugctlmsr |= DEBUGCTLMSR_BTS;
  146. debugctlmsr |= DEBUGCTLMSR_BTINT;
  147. if (!(config & ARCH_PERFMON_EVENTSEL_OS))
  148. debugctlmsr |= DEBUGCTLMSR_BTS_OFF_OS;
  149. if (!(config & ARCH_PERFMON_EVENTSEL_USR))
  150. debugctlmsr |= DEBUGCTLMSR_BTS_OFF_USR;
  151. update_debugctlmsr(debugctlmsr);
  152. }
  153. static void intel_pmu_disable_bts(void)
  154. {
  155. struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
  156. unsigned long debugctlmsr;
  157. if (!cpuc->ds)
  158. return;
  159. debugctlmsr = get_debugctlmsr();
  160. debugctlmsr &=
  161. ~(DEBUGCTLMSR_TR | DEBUGCTLMSR_BTS | DEBUGCTLMSR_BTINT |
  162. DEBUGCTLMSR_BTS_OFF_OS | DEBUGCTLMSR_BTS_OFF_USR);
  163. update_debugctlmsr(debugctlmsr);
  164. }
  165. static void intel_pmu_drain_bts_buffer(void)
  166. {
  167. struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
  168. struct debug_store *ds = cpuc->ds;
  169. struct bts_record {
  170. u64 from;
  171. u64 to;
  172. u64 flags;
  173. };
  174. struct perf_event *event = cpuc->events[X86_PMC_IDX_FIXED_BTS];
  175. struct bts_record *at, *top;
  176. struct perf_output_handle handle;
  177. struct perf_event_header header;
  178. struct perf_sample_data data;
  179. struct pt_regs regs;
  180. if (!event)
  181. return;
  182. if (!ds)
  183. return;
  184. at = (struct bts_record *)(unsigned long)ds->bts_buffer_base;
  185. top = (struct bts_record *)(unsigned long)ds->bts_index;
  186. if (top <= at)
  187. return;
  188. ds->bts_index = ds->bts_buffer_base;
  189. perf_sample_data_init(&data, 0);
  190. data.period = event->hw.last_period;
  191. regs.ip = 0;
  192. /*
  193. * Prepare a generic sample, i.e. fill in the invariant fields.
  194. * We will overwrite the from and to address before we output
  195. * the sample.
  196. */
  197. perf_prepare_sample(&header, &data, event, &regs);
  198. if (perf_output_begin(&handle, event, header.size * (top - at), 1, 1))
  199. return;
  200. for (; at < top; at++) {
  201. data.ip = at->from;
  202. data.addr = at->to;
  203. perf_output_sample(&handle, &header, &data, event);
  204. }
  205. perf_output_end(&handle);
  206. /* There's new data available. */
  207. event->hw.interrupts++;
  208. event->pending_kill = POLL_IN;
  209. }
  210. /*
  211. * PEBS
  212. */
  213. static struct event_constraint intel_core_pebs_events[] = {
  214. PEBS_EVENT_CONSTRAINT(0x00c0, 0x1), /* INSTR_RETIRED.ANY */
  215. PEBS_EVENT_CONSTRAINT(0xfec1, 0x1), /* X87_OPS_RETIRED.ANY */
  216. PEBS_EVENT_CONSTRAINT(0x00c5, 0x1), /* BR_INST_RETIRED.MISPRED */
  217. PEBS_EVENT_CONSTRAINT(0x1fc7, 0x1), /* SIMD_INST_RETURED.ANY */
  218. PEBS_EVENT_CONSTRAINT(0x01cb, 0x1), /* MEM_LOAD_RETIRED.L1D_MISS */
  219. PEBS_EVENT_CONSTRAINT(0x02cb, 0x1), /* MEM_LOAD_RETIRED.L1D_LINE_MISS */
  220. PEBS_EVENT_CONSTRAINT(0x04cb, 0x1), /* MEM_LOAD_RETIRED.L2_MISS */
  221. PEBS_EVENT_CONSTRAINT(0x08cb, 0x1), /* MEM_LOAD_RETIRED.L2_LINE_MISS */
  222. PEBS_EVENT_CONSTRAINT(0x10cb, 0x1), /* MEM_LOAD_RETIRED.DTLB_MISS */
  223. EVENT_CONSTRAINT_END
  224. };
  225. static struct event_constraint intel_nehalem_pebs_events[] = {
  226. PEBS_EVENT_CONSTRAINT(0x00c0, 0xf), /* INSTR_RETIRED.ANY */
  227. PEBS_EVENT_CONSTRAINT(0xfec1, 0xf), /* X87_OPS_RETIRED.ANY */
  228. PEBS_EVENT_CONSTRAINT(0x00c5, 0xf), /* BR_INST_RETIRED.MISPRED */
  229. PEBS_EVENT_CONSTRAINT(0x1fc7, 0xf), /* SIMD_INST_RETURED.ANY */
  230. PEBS_EVENT_CONSTRAINT(0x01cb, 0xf), /* MEM_LOAD_RETIRED.L1D_MISS */
  231. PEBS_EVENT_CONSTRAINT(0x02cb, 0xf), /* MEM_LOAD_RETIRED.L1D_LINE_MISS */
  232. PEBS_EVENT_CONSTRAINT(0x04cb, 0xf), /* MEM_LOAD_RETIRED.L2_MISS */
  233. PEBS_EVENT_CONSTRAINT(0x08cb, 0xf), /* MEM_LOAD_RETIRED.L2_LINE_MISS */
  234. PEBS_EVENT_CONSTRAINT(0x10cb, 0xf), /* MEM_LOAD_RETIRED.DTLB_MISS */
  235. EVENT_CONSTRAINT_END
  236. };
  237. static struct event_constraint *
  238. intel_pebs_constraints(struct perf_event *event)
  239. {
  240. struct event_constraint *c;
  241. if (!event->attr.precise)
  242. return NULL;
  243. if (x86_pmu.pebs_constraints) {
  244. for_each_event_constraint(c, x86_pmu.pebs_constraints) {
  245. if ((event->hw.config & c->cmask) == c->code)
  246. return c;
  247. }
  248. }
  249. return &emptyconstraint;
  250. }
  251. static void intel_pmu_pebs_enable(struct perf_event *event)
  252. {
  253. struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
  254. struct hw_perf_event *hwc = &event->hw;
  255. hwc->config &= ~ARCH_PERFMON_EVENTSEL_INT;
  256. cpuc->pebs_enabled |= 1ULL << hwc->idx;
  257. WARN_ON_ONCE(cpuc->enabled);
  258. if (x86_pmu.intel_cap.pebs_trap)
  259. intel_pmu_lbr_enable(event);
  260. }
  261. static void intel_pmu_pebs_disable(struct perf_event *event)
  262. {
  263. struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
  264. struct hw_perf_event *hwc = &event->hw;
  265. cpuc->pebs_enabled &= ~(1ULL << hwc->idx);
  266. if (cpuc->enabled)
  267. wrmsrl(MSR_IA32_PEBS_ENABLE, cpuc->pebs_enabled);
  268. hwc->config |= ARCH_PERFMON_EVENTSEL_INT;
  269. if (x86_pmu.intel_cap.pebs_trap)
  270. intel_pmu_lbr_disable(event);
  271. }
  272. static void intel_pmu_pebs_enable_all(void)
  273. {
  274. struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
  275. if (cpuc->pebs_enabled)
  276. wrmsrl(MSR_IA32_PEBS_ENABLE, cpuc->pebs_enabled);
  277. }
  278. static void intel_pmu_pebs_disable_all(void)
  279. {
  280. struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
  281. if (cpuc->pebs_enabled)
  282. wrmsrl(MSR_IA32_PEBS_ENABLE, 0);
  283. }
  284. #include <asm/insn.h>
  285. static inline bool kernel_ip(unsigned long ip)
  286. {
  287. #ifdef CONFIG_X86_32
  288. return ip > PAGE_OFFSET;
  289. #else
  290. return (long)ip < 0;
  291. #endif
  292. }
  293. static int intel_pmu_pebs_fixup_ip(struct pt_regs *regs)
  294. {
  295. struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
  296. unsigned long from = cpuc->lbr_entries[0].from;
  297. unsigned long old_to, to = cpuc->lbr_entries[0].to;
  298. unsigned long ip = regs->ip;
  299. /*
  300. * We don't need to fixup if the PEBS assist is fault like
  301. */
  302. if (!x86_pmu.intel_cap.pebs_trap)
  303. return 1;
  304. /*
  305. * No LBR entry, no basic block, no rewinding
  306. */
  307. if (!cpuc->lbr_stack.nr || !from || !to)
  308. return 0;
  309. /*
  310. * Basic blocks should never cross user/kernel boundaries
  311. */
  312. if (kernel_ip(ip) != kernel_ip(to))
  313. return 0;
  314. /*
  315. * unsigned math, either ip is before the start (impossible) or
  316. * the basic block is larger than 1 page (sanity)
  317. */
  318. if ((ip - to) > PAGE_SIZE)
  319. return 0;
  320. /*
  321. * We sampled a branch insn, rewind using the LBR stack
  322. */
  323. if (ip == to) {
  324. regs->ip = from;
  325. return 1;
  326. }
  327. do {
  328. struct insn insn;
  329. u8 buf[MAX_INSN_SIZE];
  330. void *kaddr;
  331. old_to = to;
  332. if (!kernel_ip(ip)) {
  333. int bytes, size = MAX_INSN_SIZE;
  334. bytes = copy_from_user_nmi(buf, (void __user *)to, size);
  335. if (bytes != size)
  336. return 0;
  337. kaddr = buf;
  338. } else
  339. kaddr = (void *)to;
  340. kernel_insn_init(&insn, kaddr);
  341. insn_get_length(&insn);
  342. to += insn.length;
  343. } while (to < ip);
  344. if (to == ip) {
  345. regs->ip = old_to;
  346. return 1;
  347. }
  348. /*
  349. * Even though we decoded the basic block, the instruction stream
  350. * never matched the given IP, either the TO or the IP got corrupted.
  351. */
  352. return 0;
  353. }
  354. static int intel_pmu_save_and_restart(struct perf_event *event);
  355. static void intel_pmu_drain_pebs_core(struct pt_regs *iregs)
  356. {
  357. struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
  358. struct debug_store *ds = cpuc->ds;
  359. struct perf_event *event = cpuc->events[0]; /* PMC0 only */
  360. struct pebs_record_core *at, *top;
  361. struct perf_sample_data data;
  362. struct perf_raw_record raw;
  363. struct pt_regs regs;
  364. int n;
  365. if (!ds || !x86_pmu.pebs)
  366. return;
  367. at = (struct pebs_record_core *)(unsigned long)ds->pebs_buffer_base;
  368. top = (struct pebs_record_core *)(unsigned long)ds->pebs_index;
  369. /*
  370. * Whatever else happens, drain the thing
  371. */
  372. ds->pebs_index = ds->pebs_buffer_base;
  373. if (!test_bit(0, cpuc->active_mask))
  374. return;
  375. WARN_ON_ONCE(!event);
  376. if (!event->attr.precise)
  377. return;
  378. n = top - at;
  379. if (n <= 0)
  380. return;
  381. if (!intel_pmu_save_and_restart(event))
  382. return;
  383. /*
  384. * Should not happen, we program the threshold at 1 and do not
  385. * set a reset value.
  386. */
  387. WARN_ON_ONCE(n > 1);
  388. at += n - 1;
  389. perf_sample_data_init(&data, 0);
  390. data.period = event->hw.last_period;
  391. if (event->attr.sample_type & PERF_SAMPLE_RAW) {
  392. raw.size = x86_pmu.pebs_record_size;
  393. raw.data = at;
  394. data.raw = &raw;
  395. }
  396. /*
  397. * We use the interrupt regs as a base because the PEBS record
  398. * does not contain a full regs set, specifically it seems to
  399. * lack segment descriptors, which get used by things like
  400. * user_mode().
  401. *
  402. * In the simple case fix up only the IP and BP,SP regs, for
  403. * PERF_SAMPLE_IP and PERF_SAMPLE_CALLCHAIN to function properly.
  404. * A possible PERF_SAMPLE_REGS will have to transfer all regs.
  405. */
  406. regs = *iregs;
  407. regs.ip = at->ip;
  408. regs.bp = at->bp;
  409. regs.sp = at->sp;
  410. if (intel_pmu_pebs_fixup_ip(&regs))
  411. regs.flags |= PERF_EFLAGS_EXACT;
  412. else
  413. regs.flags &= ~PERF_EFLAGS_EXACT;
  414. if (perf_event_overflow(event, 1, &data, &regs))
  415. x86_pmu_stop(event);
  416. }
  417. static void intel_pmu_drain_pebs_nhm(struct pt_regs *iregs)
  418. {
  419. struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
  420. struct debug_store *ds = cpuc->ds;
  421. struct pebs_record_nhm *at, *top;
  422. struct perf_sample_data data;
  423. struct perf_event *event = NULL;
  424. struct perf_raw_record raw;
  425. struct pt_regs regs;
  426. u64 status = 0;
  427. int bit, n;
  428. if (!ds || !x86_pmu.pebs)
  429. return;
  430. at = (struct pebs_record_nhm *)(unsigned long)ds->pebs_buffer_base;
  431. top = (struct pebs_record_nhm *)(unsigned long)ds->pebs_index;
  432. ds->pebs_index = ds->pebs_buffer_base;
  433. n = top - at;
  434. if (n <= 0)
  435. return;
  436. /*
  437. * Should not happen, we program the threshold at 1 and do not
  438. * set a reset value.
  439. */
  440. WARN_ON_ONCE(n > MAX_PEBS_EVENTS);
  441. for ( ; at < top; at++) {
  442. for_each_set_bit(bit, (unsigned long *)&at->status, MAX_PEBS_EVENTS) {
  443. event = cpuc->events[bit];
  444. if (!test_bit(bit, cpuc->active_mask))
  445. continue;
  446. WARN_ON_ONCE(!event);
  447. if (!event->attr.precise)
  448. continue;
  449. if (__test_and_set_bit(bit, (unsigned long *)&status))
  450. continue;
  451. break;
  452. }
  453. if (!event || bit >= MAX_PEBS_EVENTS)
  454. continue;
  455. if (!intel_pmu_save_and_restart(event))
  456. continue;
  457. perf_sample_data_init(&data, 0);
  458. data.period = event->hw.last_period;
  459. if (event->attr.sample_type & PERF_SAMPLE_RAW) {
  460. raw.size = x86_pmu.pebs_record_size;
  461. raw.data = at;
  462. data.raw = &raw;
  463. }
  464. /*
  465. * See the comment in intel_pmu_drain_pebs_core()
  466. */
  467. regs = *iregs;
  468. regs.ip = at->ip;
  469. regs.bp = at->bp;
  470. regs.sp = at->sp;
  471. if (intel_pmu_pebs_fixup_ip(&regs))
  472. regs.flags |= PERF_EFLAGS_EXACT;
  473. else
  474. regs.flags &= ~PERF_EFLAGS_EXACT;
  475. if (perf_event_overflow(event, 1, &data, &regs))
  476. x86_pmu_stop(event);
  477. }
  478. }
  479. /*
  480. * BTS, PEBS probe and setup
  481. */
  482. static void intel_ds_init(void)
  483. {
  484. /*
  485. * No support for 32bit formats
  486. */
  487. if (!boot_cpu_has(X86_FEATURE_DTES64))
  488. return;
  489. x86_pmu.bts = boot_cpu_has(X86_FEATURE_BTS);
  490. x86_pmu.pebs = boot_cpu_has(X86_FEATURE_PEBS);
  491. if (x86_pmu.pebs) {
  492. char pebs_type = x86_pmu.intel_cap.pebs_trap ? '+' : '-';
  493. int format = x86_pmu.intel_cap.pebs_format;
  494. switch (format) {
  495. case 0:
  496. printk(KERN_CONT "PEBS fmt0%c, ", pebs_type);
  497. x86_pmu.pebs_record_size = sizeof(struct pebs_record_core);
  498. x86_pmu.drain_pebs = intel_pmu_drain_pebs_core;
  499. x86_pmu.pebs_constraints = intel_core_pebs_events;
  500. break;
  501. case 1:
  502. printk(KERN_CONT "PEBS fmt1%c, ", pebs_type);
  503. x86_pmu.pebs_record_size = sizeof(struct pebs_record_nhm);
  504. x86_pmu.drain_pebs = intel_pmu_drain_pebs_nhm;
  505. x86_pmu.pebs_constraints = intel_nehalem_pebs_events;
  506. break;
  507. default:
  508. printk(KERN_CONT "no PEBS fmt%d%c, ", format, pebs_type);
  509. x86_pmu.pebs = 0;
  510. break;
  511. }
  512. }
  513. }
  514. #else /* CONFIG_CPU_SUP_INTEL */
  515. static int reserve_ds_buffers(void)
  516. {
  517. return 0;
  518. }
  519. static void release_ds_buffers(void)
  520. {
  521. }
  522. #endif /* CONFIG_CPU_SUP_INTEL */