mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-02 09:36:42 +07:00
cccd85bfb7
Rework the debug feature calls and initialization. There are now two debug feature entries used by the zcrypt code. The first is 'ap' with all the AP bus related stuff and the second is 'zcrypt' with all the zcrypt and devices and driver related entries. However, there isn't much traffic on both debug features. The ap bus code emits only some debug info and for zcrypt devices on appearance and disappearance there is an entry written. The new dbf invocations use the sprintf buffer layout, whereas the old implementation used the ascii dbf buffer. There are now 5*8=40 bytes used for each entry, resulting in 5 parameters per call. As the sprintf buffer needs a format string the first parameter provides this and so up to 4 more parameters can be used. Alltogehter the new layout should be much more human readable for customers and test. Signed-off-by: Harald Freudenberger <freude@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
29 lines
649 B
C
29 lines
649 B
C
/*
|
|
* Copyright IBM Corp. 2016
|
|
* Author(s): Harald Freudenberger <freude@de.ibm.com>
|
|
*/
|
|
#ifndef AP_DEBUG_H
|
|
#define AP_DEBUG_H
|
|
|
|
#include <asm/debug.h>
|
|
|
|
#define DBF_ERR 3 /* error conditions */
|
|
#define DBF_WARN 4 /* warning conditions */
|
|
#define DBF_INFO 5 /* informational */
|
|
#define DBF_DEBUG 6 /* for debugging only */
|
|
|
|
#define RC2ERR(rc) ((rc) ? DBF_ERR : DBF_INFO)
|
|
#define RC2WARN(rc) ((rc) ? DBF_WARN : DBF_INFO)
|
|
|
|
#define DBF_MAX_SPRINTF_ARGS 5
|
|
|
|
#define AP_DBF(...) \
|
|
debug_sprintf_event(ap_dbf_info, ##__VA_ARGS__)
|
|
|
|
extern debug_info_t *ap_dbf_info;
|
|
|
|
int ap_debug_init(void);
|
|
void ap_debug_exit(void);
|
|
|
|
#endif /* AP_DEBUG_H */
|