mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 23:30:53 +07:00
669b792c77
Turns on trace earlier, so crashes at kernel start should print out a trace, making things easier to debug. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <michael.frysinger@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
53 lines
1.2 KiB
C
53 lines
1.2 KiB
C
/*
|
|
* Common header file for blackfin family of processors.
|
|
*
|
|
*/
|
|
|
|
#ifndef _BLACKFIN_TRACE_
|
|
#define _BLACKFIN_TRACE_
|
|
|
|
#ifndef __ASSEMBLY__
|
|
/* Trace Macros for C files */
|
|
|
|
#define trace_buffer_save(x) \
|
|
do { \
|
|
(x) = bfin_read_TBUFCTL(); \
|
|
bfin_write_TBUFCTL((x) & ~TBUFEN); \
|
|
} while (0)
|
|
|
|
#define trace_buffer_restore(x) \
|
|
do { \
|
|
bfin_write_TBUFCTL((x)); \
|
|
} while (0)
|
|
|
|
#else
|
|
/* Trace Macros for Assembly files */
|
|
|
|
#define TRACE_BUFFER_START(preg, dreg) trace_buffer_start(preg, dreg)
|
|
#define TRACE_BUFFER_STOP(preg, dreg) trace_buffer_stop(preg, dreg)
|
|
|
|
#define trace_buffer_stop(preg, dreg) \
|
|
preg.L = LO(TBUFCTL); \
|
|
preg.H = HI(TBUFCTL); \
|
|
dreg = 0x1; \
|
|
[preg] = dreg;
|
|
|
|
#define trace_buffer_start(preg, dreg) \
|
|
preg.L = LO(TBUFCTL); \
|
|
preg.H = HI(TBUFCTL); \
|
|
dreg = 0x13; \
|
|
[preg] = dreg;
|
|
|
|
#ifdef CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE
|
|
# define DEBUG_START_HWTRACE(preg, dreg) trace_buffer_start(preg, dreg)
|
|
# define DEBUG_STOP_HWTRACE(preg, dreg) trace_buffer_stop(preg, dreg)
|
|
|
|
#else
|
|
# define DEBUG_START_HWTRACE(preg, dreg)
|
|
# define DEBUG_STOP_HWTRACE(preg, dreg)
|
|
#endif
|
|
|
|
#endif /* __ASSEMBLY__ */
|
|
|
|
#endif /* _BLACKFIN_TRACE_ */
|