1/*
2 * Copyright (c) 2014 ETH Zurich.
3 * All rights reserved.
4 *
5 * This file is distributed under the terms in the attached LICENSE file.
6 * If you do not find this file, copies can be found by writing to:
7 * ETH Zurich D-INFK, Universitaetsstrasse 6, CH-8092 Zurich. Attn: Systems Group.
8 */
9
10#ifndef XEON_PHI_DEBUG_H_
11#define XEON_PHI_DEBUG_H_
12
13
14/*
15 * Debug output switches
16 */
17#define XDEBUG_ENABLED   1
18#define XDEBUG_BOOT      1
19#define XDEBUG_DMA       0
20#define XDEBUG_DMA_V     0
21#define XDEBUG_INT       1
22#define XDEBUG_SMPT      0
23#define XDEBUG_SERVICE   0
24#define XDEBUG_MESSAGING 0
25#define XDEBUG_SYSMEM    0
26#define XDEBUG_SPAWN     0
27#define XDEBUG_INTERPHI  0
28
29/*
30 * --------------------------------------------------------------------------
31 * Debug output generation
32 */
33#if XDEBUG_ENABLED
34#define XDEBUG(x...) debug_printf(x)
35#else
36#define XDEBUG_PRINT(x... )
37#endif
38#if XDEBUG_BOOT
39#define XBOOT_DEBUG(x...) XDEBUG("boot > " x)
40#else
41#define XBOOT_DEBUG(x...)
42#endif
43#if XDEBUG_DMA
44#define XDMA_DEBUG(x...) XDEBUG(" dma > " x)
45#if XDEBUG_DMA_V
46#define XDMAV_DEBUG(x...) XDEBUG("dmav > " x)
47#else
48#define XDMAV_DEBUG(x...)
49#endif
50#else
51#define XDMA_DEBUG(x...)
52#define XDMAV_DEBUG(x...)
53#endif
54
55#if XDEBUG_INT
56#define XINT_DEBUG(x...) XDEBUG("intr > " x)
57#else
58#define XINT_DEBUG(x...)
59#endif
60#if XDEBUG_SMPT
61#define XSMPT_DEBUG(x...) XDEBUG("smpt > " x)
62#else
63#define XSMPT_DEBUG(x...)
64#endif
65#if XDEBUG_SERVICE
66#define XSERVICE_DEBUG(x...) XDEBUG(" svc > " x)
67#else
68#define XSERVICE_DEBUG(x...)
69#endif
70#if XDEBUG_MESSAGING
71#define XMESSAGING_DEBUG(x...) XDEBUG(" msg > " x)
72#else
73#define XMESSAGING_DEBUG(x...)
74#endif
75#if XDEBUG_SYSMEM
76#define XSYSMEM_DEBUG(x...) XDEBUG("sysm > " x)
77#else
78#define XSYSMEM_DEBUG(x...)
79#endif
80#if XDEBUG_SPAWN
81#define XSPAWN_DEBUG(x...) XDEBUG("spawn > " x)
82#else
83#define XSPAWN_DEBUG(x...)
84#endif
85#if XDEBUG_INTERPHI
86#define XINTER_DEBUG(x...) XDEBUG("inter > " x)
87#else
88#define XINTER_DEBUG(x...)
89#endif
90
91
92
93#endif /* XEON_PHI_DEBUG_H_ */
94