utdebug.c 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691
  1. /******************************************************************************
  2. *
  3. * Module Name: utdebug - Debug print routines
  4. *
  5. *****************************************************************************/
  6. /*
  7. * Copyright (C) 2000 - 2013, Intel Corp.
  8. * All rights reserved.
  9. *
  10. * Redistribution and use in source and binary forms, with or without
  11. * modification, are permitted provided that the following conditions
  12. * are met:
  13. * 1. Redistributions of source code must retain the above copyright
  14. * notice, this list of conditions, and the following disclaimer,
  15. * without modification.
  16. * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  17. * substantially similar to the "NO WARRANTY" disclaimer below
  18. * ("Disclaimer") and any redistribution must be conditioned upon
  19. * including a substantially similar Disclaimer requirement for further
  20. * binary redistribution.
  21. * 3. Neither the names of the above-listed copyright holders nor the names
  22. * of any contributors may be used to endorse or promote products derived
  23. * from this software without specific prior written permission.
  24. *
  25. * Alternatively, this software may be distributed under the terms of the
  26. * GNU General Public License ("GPL") version 2 as published by the Free
  27. * Software Foundation.
  28. *
  29. * NO WARRANTY
  30. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  31. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  32. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
  33. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  34. * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  35. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  36. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  37. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  38. * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  39. * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  40. * POSSIBILITY OF SUCH DAMAGES.
  41. */
  42. #include <linux/export.h>
  43. #include <acpi/acpi.h>
  44. #include "accommon.h"
  45. #define _COMPONENT ACPI_UTILITIES
  46. ACPI_MODULE_NAME("utdebug")
  47. #ifdef ACPI_DEBUG_OUTPUT
  48. static acpi_thread_id acpi_gbl_prev_thread_id = (acpi_thread_id) 0xFFFFFFFF;
  49. static char *acpi_gbl_fn_entry_str = "----Entry";
  50. static char *acpi_gbl_fn_exit_str = "----Exit-";
  51. /* Local prototypes */
  52. static const char *acpi_ut_trim_function_name(const char *function_name);
  53. /*******************************************************************************
  54. *
  55. * FUNCTION: acpi_ut_init_stack_ptr_trace
  56. *
  57. * PARAMETERS: None
  58. *
  59. * RETURN: None
  60. *
  61. * DESCRIPTION: Save the current CPU stack pointer at subsystem startup
  62. *
  63. ******************************************************************************/
  64. void acpi_ut_init_stack_ptr_trace(void)
  65. {
  66. acpi_size current_sp;
  67. acpi_gbl_entry_stack_pointer = &current_sp;
  68. }
  69. /*******************************************************************************
  70. *
  71. * FUNCTION: acpi_ut_track_stack_ptr
  72. *
  73. * PARAMETERS: None
  74. *
  75. * RETURN: None
  76. *
  77. * DESCRIPTION: Save the current CPU stack pointer
  78. *
  79. ******************************************************************************/
  80. void acpi_ut_track_stack_ptr(void)
  81. {
  82. acpi_size current_sp;
  83. if (&current_sp < acpi_gbl_lowest_stack_pointer) {
  84. acpi_gbl_lowest_stack_pointer = &current_sp;
  85. }
  86. if (acpi_gbl_nesting_level > acpi_gbl_deepest_nesting) {
  87. acpi_gbl_deepest_nesting = acpi_gbl_nesting_level;
  88. }
  89. }
  90. /*******************************************************************************
  91. *
  92. * FUNCTION: acpi_ut_trim_function_name
  93. *
  94. * PARAMETERS: function_name - Ascii string containing a procedure name
  95. *
  96. * RETURN: Updated pointer to the function name
  97. *
  98. * DESCRIPTION: Remove the "Acpi" prefix from the function name, if present.
  99. * This allows compiler macros such as __FUNCTION__ to be used
  100. * with no change to the debug output.
  101. *
  102. ******************************************************************************/
  103. static const char *acpi_ut_trim_function_name(const char *function_name)
  104. {
  105. /* All Function names are longer than 4 chars, check is safe */
  106. if (*(ACPI_CAST_PTR(u32, function_name)) == ACPI_PREFIX_MIXED) {
  107. /* This is the case where the original source has not been modified */
  108. return (function_name + 4);
  109. }
  110. if (*(ACPI_CAST_PTR(u32, function_name)) == ACPI_PREFIX_LOWER) {
  111. /* This is the case where the source has been 'linuxized' */
  112. return (function_name + 5);
  113. }
  114. return (function_name);
  115. }
  116. /*******************************************************************************
  117. *
  118. * FUNCTION: acpi_debug_print
  119. *
  120. * PARAMETERS: requested_debug_level - Requested debug print level
  121. * line_number - Caller's line number (for error output)
  122. * function_name - Caller's procedure name
  123. * module_name - Caller's module name
  124. * component_id - Caller's component ID
  125. * format - Printf format field
  126. * ... - Optional printf arguments
  127. *
  128. * RETURN: None
  129. *
  130. * DESCRIPTION: Print error message with prefix consisting of the module name,
  131. * line number, and component ID.
  132. *
  133. ******************************************************************************/
  134. void ACPI_INTERNAL_VAR_XFACE
  135. acpi_debug_print(u32 requested_debug_level,
  136. u32 line_number,
  137. const char *function_name,
  138. const char *module_name,
  139. u32 component_id, const char *format, ...)
  140. {
  141. acpi_thread_id thread_id;
  142. va_list args;
  143. /* Check if debug output enabled */
  144. if (!ACPI_IS_DEBUG_ENABLED(requested_debug_level, component_id)) {
  145. return;
  146. }
  147. /*
  148. * Thread tracking and context switch notification
  149. */
  150. thread_id = acpi_os_get_thread_id();
  151. if (thread_id != acpi_gbl_prev_thread_id) {
  152. if (ACPI_LV_THREADS & acpi_dbg_level) {
  153. acpi_os_printf
  154. ("\n**** Context Switch from TID %u to TID %u ****\n\n",
  155. (u32)acpi_gbl_prev_thread_id, (u32)thread_id);
  156. }
  157. acpi_gbl_prev_thread_id = thread_id;
  158. }
  159. /*
  160. * Display the module name, current line number, thread ID (if requested),
  161. * current procedure nesting level, and the current procedure name
  162. */
  163. acpi_os_printf("%8s-%04ld ", module_name, line_number);
  164. if (ACPI_LV_THREADS & acpi_dbg_level) {
  165. acpi_os_printf("[%u] ", (u32)thread_id);
  166. }
  167. acpi_os_printf("[%02ld] %-22.22s: ",
  168. acpi_gbl_nesting_level,
  169. acpi_ut_trim_function_name(function_name));
  170. va_start(args, format);
  171. acpi_os_vprintf(format, args);
  172. va_end(args);
  173. }
  174. ACPI_EXPORT_SYMBOL(acpi_debug_print)
  175. /*******************************************************************************
  176. *
  177. * FUNCTION: acpi_debug_print_raw
  178. *
  179. * PARAMETERS: requested_debug_level - Requested debug print level
  180. * line_number - Caller's line number
  181. * function_name - Caller's procedure name
  182. * module_name - Caller's module name
  183. * component_id - Caller's component ID
  184. * format - Printf format field
  185. * ... - Optional printf arguments
  186. *
  187. * RETURN: None
  188. *
  189. * DESCRIPTION: Print message with no headers. Has same interface as
  190. * debug_print so that the same macros can be used.
  191. *
  192. ******************************************************************************/
  193. void ACPI_INTERNAL_VAR_XFACE
  194. acpi_debug_print_raw(u32 requested_debug_level,
  195. u32 line_number,
  196. const char *function_name,
  197. const char *module_name,
  198. u32 component_id, const char *format, ...)
  199. {
  200. va_list args;
  201. /* Check if debug output enabled */
  202. if (!ACPI_IS_DEBUG_ENABLED(requested_debug_level, component_id)) {
  203. return;
  204. }
  205. va_start(args, format);
  206. acpi_os_vprintf(format, args);
  207. va_end(args);
  208. }
  209. ACPI_EXPORT_SYMBOL(acpi_debug_print_raw)
  210. /*******************************************************************************
  211. *
  212. * FUNCTION: acpi_ut_trace
  213. *
  214. * PARAMETERS: line_number - Caller's line number
  215. * function_name - Caller's procedure name
  216. * module_name - Caller's module name
  217. * component_id - Caller's component ID
  218. *
  219. * RETURN: None
  220. *
  221. * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is
  222. * set in debug_level
  223. *
  224. ******************************************************************************/
  225. void
  226. acpi_ut_trace(u32 line_number,
  227. const char *function_name,
  228. const char *module_name, u32 component_id)
  229. {
  230. acpi_gbl_nesting_level++;
  231. acpi_ut_track_stack_ptr();
  232. /* Check if enabled up-front for performance */
  233. if (ACPI_IS_DEBUG_ENABLED(ACPI_LV_FUNCTIONS, component_id)) {
  234. acpi_debug_print(ACPI_LV_FUNCTIONS,
  235. line_number, function_name, module_name,
  236. component_id, "%s\n", acpi_gbl_fn_entry_str);
  237. }
  238. }
  239. ACPI_EXPORT_SYMBOL(acpi_ut_trace)
  240. /*******************************************************************************
  241. *
  242. * FUNCTION: acpi_ut_trace_ptr
  243. *
  244. * PARAMETERS: line_number - Caller's line number
  245. * function_name - Caller's procedure name
  246. * module_name - Caller's module name
  247. * component_id - Caller's component ID
  248. * pointer - Pointer to display
  249. *
  250. * RETURN: None
  251. *
  252. * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is
  253. * set in debug_level
  254. *
  255. ******************************************************************************/
  256. void
  257. acpi_ut_trace_ptr(u32 line_number,
  258. const char *function_name,
  259. const char *module_name, u32 component_id, void *pointer)
  260. {
  261. acpi_gbl_nesting_level++;
  262. acpi_ut_track_stack_ptr();
  263. /* Check if enabled up-front for performance */
  264. if (ACPI_IS_DEBUG_ENABLED(ACPI_LV_FUNCTIONS, component_id)) {
  265. acpi_debug_print(ACPI_LV_FUNCTIONS,
  266. line_number, function_name, module_name,
  267. component_id, "%s %p\n", acpi_gbl_fn_entry_str,
  268. pointer);
  269. }
  270. }
  271. /*******************************************************************************
  272. *
  273. * FUNCTION: acpi_ut_trace_str
  274. *
  275. * PARAMETERS: line_number - Caller's line number
  276. * function_name - Caller's procedure name
  277. * module_name - Caller's module name
  278. * component_id - Caller's component ID
  279. * string - Additional string to display
  280. *
  281. * RETURN: None
  282. *
  283. * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is
  284. * set in debug_level
  285. *
  286. ******************************************************************************/
  287. void
  288. acpi_ut_trace_str(u32 line_number,
  289. const char *function_name,
  290. const char *module_name, u32 component_id, char *string)
  291. {
  292. acpi_gbl_nesting_level++;
  293. acpi_ut_track_stack_ptr();
  294. /* Check if enabled up-front for performance */
  295. if (ACPI_IS_DEBUG_ENABLED(ACPI_LV_FUNCTIONS, component_id)) {
  296. acpi_debug_print(ACPI_LV_FUNCTIONS,
  297. line_number, function_name, module_name,
  298. component_id, "%s %s\n", acpi_gbl_fn_entry_str,
  299. string);
  300. }
  301. }
  302. /*******************************************************************************
  303. *
  304. * FUNCTION: acpi_ut_trace_u32
  305. *
  306. * PARAMETERS: line_number - Caller's line number
  307. * function_name - Caller's procedure name
  308. * module_name - Caller's module name
  309. * component_id - Caller's component ID
  310. * integer - Integer to display
  311. *
  312. * RETURN: None
  313. *
  314. * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is
  315. * set in debug_level
  316. *
  317. ******************************************************************************/
  318. void
  319. acpi_ut_trace_u32(u32 line_number,
  320. const char *function_name,
  321. const char *module_name, u32 component_id, u32 integer)
  322. {
  323. acpi_gbl_nesting_level++;
  324. acpi_ut_track_stack_ptr();
  325. /* Check if enabled up-front for performance */
  326. if (ACPI_IS_DEBUG_ENABLED(ACPI_LV_FUNCTIONS, component_id)) {
  327. acpi_debug_print(ACPI_LV_FUNCTIONS,
  328. line_number, function_name, module_name,
  329. component_id, "%s %08X\n",
  330. acpi_gbl_fn_entry_str, integer);
  331. }
  332. }
  333. /*******************************************************************************
  334. *
  335. * FUNCTION: acpi_ut_exit
  336. *
  337. * PARAMETERS: line_number - Caller's line number
  338. * function_name - Caller's procedure name
  339. * module_name - Caller's module name
  340. * component_id - Caller's component ID
  341. *
  342. * RETURN: None
  343. *
  344. * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is
  345. * set in debug_level
  346. *
  347. ******************************************************************************/
  348. void
  349. acpi_ut_exit(u32 line_number,
  350. const char *function_name,
  351. const char *module_name, u32 component_id)
  352. {
  353. /* Check if enabled up-front for performance */
  354. if (ACPI_IS_DEBUG_ENABLED(ACPI_LV_FUNCTIONS, component_id)) {
  355. acpi_debug_print(ACPI_LV_FUNCTIONS,
  356. line_number, function_name, module_name,
  357. component_id, "%s\n", acpi_gbl_fn_exit_str);
  358. }
  359. acpi_gbl_nesting_level--;
  360. }
  361. ACPI_EXPORT_SYMBOL(acpi_ut_exit)
  362. /*******************************************************************************
  363. *
  364. * FUNCTION: acpi_ut_status_exit
  365. *
  366. * PARAMETERS: line_number - Caller's line number
  367. * function_name - Caller's procedure name
  368. * module_name - Caller's module name
  369. * component_id - Caller's component ID
  370. * status - Exit status code
  371. *
  372. * RETURN: None
  373. *
  374. * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is
  375. * set in debug_level. Prints exit status also.
  376. *
  377. ******************************************************************************/
  378. void
  379. acpi_ut_status_exit(u32 line_number,
  380. const char *function_name,
  381. const char *module_name,
  382. u32 component_id, acpi_status status)
  383. {
  384. /* Check if enabled up-front for performance */
  385. if (ACPI_IS_DEBUG_ENABLED(ACPI_LV_FUNCTIONS, component_id)) {
  386. if (ACPI_SUCCESS(status)) {
  387. acpi_debug_print(ACPI_LV_FUNCTIONS,
  388. line_number, function_name,
  389. module_name, component_id, "%s %s\n",
  390. acpi_gbl_fn_exit_str,
  391. acpi_format_exception(status));
  392. } else {
  393. acpi_debug_print(ACPI_LV_FUNCTIONS,
  394. line_number, function_name,
  395. module_name, component_id,
  396. "%s ****Exception****: %s\n",
  397. acpi_gbl_fn_exit_str,
  398. acpi_format_exception(status));
  399. }
  400. }
  401. acpi_gbl_nesting_level--;
  402. }
  403. ACPI_EXPORT_SYMBOL(acpi_ut_status_exit)
  404. /*******************************************************************************
  405. *
  406. * FUNCTION: acpi_ut_value_exit
  407. *
  408. * PARAMETERS: line_number - Caller's line number
  409. * function_name - Caller's procedure name
  410. * module_name - Caller's module name
  411. * component_id - Caller's component ID
  412. * value - Value to be printed with exit msg
  413. *
  414. * RETURN: None
  415. *
  416. * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is
  417. * set in debug_level. Prints exit value also.
  418. *
  419. ******************************************************************************/
  420. void
  421. acpi_ut_value_exit(u32 line_number,
  422. const char *function_name,
  423. const char *module_name, u32 component_id, u64 value)
  424. {
  425. /* Check if enabled up-front for performance */
  426. if (ACPI_IS_DEBUG_ENABLED(ACPI_LV_FUNCTIONS, component_id)) {
  427. acpi_debug_print(ACPI_LV_FUNCTIONS,
  428. line_number, function_name, module_name,
  429. component_id, "%s %8.8X%8.8X\n",
  430. acpi_gbl_fn_exit_str,
  431. ACPI_FORMAT_UINT64(value));
  432. }
  433. acpi_gbl_nesting_level--;
  434. }
  435. ACPI_EXPORT_SYMBOL(acpi_ut_value_exit)
  436. /*******************************************************************************
  437. *
  438. * FUNCTION: acpi_ut_ptr_exit
  439. *
  440. * PARAMETERS: line_number - Caller's line number
  441. * function_name - Caller's procedure name
  442. * module_name - Caller's module name
  443. * component_id - Caller's component ID
  444. * ptr - Pointer to display
  445. *
  446. * RETURN: None
  447. *
  448. * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is
  449. * set in debug_level. Prints exit value also.
  450. *
  451. ******************************************************************************/
  452. void
  453. acpi_ut_ptr_exit(u32 line_number,
  454. const char *function_name,
  455. const char *module_name, u32 component_id, u8 *ptr)
  456. {
  457. /* Check if enabled up-front for performance */
  458. if (ACPI_IS_DEBUG_ENABLED(ACPI_LV_FUNCTIONS, component_id)) {
  459. acpi_debug_print(ACPI_LV_FUNCTIONS,
  460. line_number, function_name, module_name,
  461. component_id, "%s %p\n", acpi_gbl_fn_exit_str,
  462. ptr);
  463. }
  464. acpi_gbl_nesting_level--;
  465. }
  466. #endif
  467. /*******************************************************************************
  468. *
  469. * FUNCTION: acpi_ut_dump_buffer
  470. *
  471. * PARAMETERS: buffer - Buffer to dump
  472. * count - Amount to dump, in bytes
  473. * display - BYTE, WORD, DWORD, or QWORD display
  474. * offset - Beginning buffer offset (display only)
  475. *
  476. * RETURN: None
  477. *
  478. * DESCRIPTION: Generic dump buffer in both hex and ascii.
  479. *
  480. ******************************************************************************/
  481. void acpi_ut_dump_buffer(u8 *buffer, u32 count, u32 display, u32 base_offset)
  482. {
  483. u32 i = 0;
  484. u32 j;
  485. u32 temp32;
  486. u8 buf_char;
  487. if (!buffer) {
  488. acpi_os_printf("Null Buffer Pointer in DumpBuffer!\n");
  489. return;
  490. }
  491. if ((count < 4) || (count & 0x01)) {
  492. display = DB_BYTE_DISPLAY;
  493. }
  494. /* Nasty little dump buffer routine! */
  495. while (i < count) {
  496. /* Print current offset */
  497. acpi_os_printf("%6.4X: ", (base_offset + i));
  498. /* Print 16 hex chars */
  499. for (j = 0; j < 16;) {
  500. if (i + j >= count) {
  501. /* Dump fill spaces */
  502. acpi_os_printf("%*s", ((display * 2) + 1), " ");
  503. j += display;
  504. continue;
  505. }
  506. switch (display) {
  507. case DB_BYTE_DISPLAY:
  508. default: /* Default is BYTE display */
  509. acpi_os_printf("%02X ",
  510. buffer[(acpi_size) i + j]);
  511. break;
  512. case DB_WORD_DISPLAY:
  513. ACPI_MOVE_16_TO_32(&temp32,
  514. &buffer[(acpi_size) i + j]);
  515. acpi_os_printf("%04X ", temp32);
  516. break;
  517. case DB_DWORD_DISPLAY:
  518. ACPI_MOVE_32_TO_32(&temp32,
  519. &buffer[(acpi_size) i + j]);
  520. acpi_os_printf("%08X ", temp32);
  521. break;
  522. case DB_QWORD_DISPLAY:
  523. ACPI_MOVE_32_TO_32(&temp32,
  524. &buffer[(acpi_size) i + j]);
  525. acpi_os_printf("%08X", temp32);
  526. ACPI_MOVE_32_TO_32(&temp32,
  527. &buffer[(acpi_size) i + j +
  528. 4]);
  529. acpi_os_printf("%08X ", temp32);
  530. break;
  531. }
  532. j += display;
  533. }
  534. /*
  535. * Print the ASCII equivalent characters but watch out for the bad
  536. * unprintable ones (printable chars are 0x20 through 0x7E)
  537. */
  538. acpi_os_printf(" ");
  539. for (j = 0; j < 16; j++) {
  540. if (i + j >= count) {
  541. acpi_os_printf("\n");
  542. return;
  543. }
  544. buf_char = buffer[(acpi_size) i + j];
  545. if (ACPI_IS_PRINT(buf_char)) {
  546. acpi_os_printf("%c", buf_char);
  547. } else {
  548. acpi_os_printf(".");
  549. }
  550. }
  551. /* Done with that line. */
  552. acpi_os_printf("\n");
  553. i += 16;
  554. }
  555. return;
  556. }
  557. /*******************************************************************************
  558. *
  559. * FUNCTION: acpi_ut_debug_dump_buffer
  560. *
  561. * PARAMETERS: buffer - Buffer to dump
  562. * count - Amount to dump, in bytes
  563. * display - BYTE, WORD, DWORD, or QWORD display
  564. * component_ID - Caller's component ID
  565. *
  566. * RETURN: None
  567. *
  568. * DESCRIPTION: Generic dump buffer in both hex and ascii.
  569. *
  570. ******************************************************************************/
  571. void
  572. acpi_ut_debug_dump_buffer(u8 *buffer, u32 count, u32 display, u32 component_id)
  573. {
  574. /* Only dump the buffer if tracing is enabled */
  575. if (!((ACPI_LV_TABLES & acpi_dbg_level) &&
  576. (component_id & acpi_dbg_layer))) {
  577. return;
  578. }
  579. acpi_ut_dump_buffer(buffer, count, display, 0);
  580. }