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