mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-30 23:55:50 +00:00
s390/qdio: fix truncated debug output of hex values
Calling debug_event the s390 debug feature only logs up to buf_size bytes of the debug view. If debug_event is called with more bytes than buf_size the additional data is ignored and not logged in the debug view. Use multiple calls to debug_event if the length exceeds buf_size. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
c0162b07b3
commit
d3feb48108
@ -37,10 +37,14 @@ static inline int qdio_dbf_passes(debug_info_t *dbf_grp, int level)
|
|||||||
debug_text_event(qdio_dbf_setup, DBF_ERR, debug_buffer); \
|
debug_text_event(qdio_dbf_setup, DBF_ERR, debug_buffer); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define DBF_HEX(addr, len) \
|
static inline void DBF_HEX(void *addr, int len)
|
||||||
do { \
|
{
|
||||||
debug_event(qdio_dbf_setup, DBF_ERR, (void*)(addr), len); \
|
while (len > 0) {
|
||||||
} while (0)
|
debug_event(qdio_dbf_setup, DBF_ERR, addr, len);
|
||||||
|
len -= qdio_dbf_setup->buf_size;
|
||||||
|
addr += qdio_dbf_setup->buf_size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#define DBF_ERROR(text...) \
|
#define DBF_ERROR(text...) \
|
||||||
do { \
|
do { \
|
||||||
@ -49,11 +53,14 @@ static inline int qdio_dbf_passes(debug_info_t *dbf_grp, int level)
|
|||||||
debug_text_event(qdio_dbf_error, DBF_ERR, debug_buffer); \
|
debug_text_event(qdio_dbf_error, DBF_ERR, debug_buffer); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define DBF_ERROR_HEX(addr, len) \
|
static inline void DBF_ERROR_HEX(void *addr, int len)
|
||||||
do { \
|
{
|
||||||
debug_event(qdio_dbf_error, DBF_ERR, (void*)(addr), len); \
|
while (len > 0) {
|
||||||
} while (0)
|
debug_event(qdio_dbf_error, DBF_ERR, addr, len);
|
||||||
|
len -= qdio_dbf_error->buf_size;
|
||||||
|
addr += qdio_dbf_error->buf_size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#define DBF_DEV_EVENT(level, device, text...) \
|
#define DBF_DEV_EVENT(level, device, text...) \
|
||||||
do { \
|
do { \
|
||||||
@ -64,10 +71,15 @@ static inline int qdio_dbf_passes(debug_info_t *dbf_grp, int level)
|
|||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define DBF_DEV_HEX(level, device, addr, len) \
|
static inline void DBF_DEV_HEX(struct qdio_irq *dev, void *addr,
|
||||||
do { \
|
int len, int level)
|
||||||
debug_event(device->debug_area, level, (void*)(addr), len); \
|
{
|
||||||
} while (0)
|
while (len > 0) {
|
||||||
|
debug_event(dev->debug_area, level, addr, len);
|
||||||
|
len -= dev->debug_area->buf_size;
|
||||||
|
addr += dev->debug_area->buf_size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void qdio_allocate_dbf(struct qdio_initialize *init_data,
|
void qdio_allocate_dbf(struct qdio_initialize *init_data,
|
||||||
struct qdio_irq *irq_ptr);
|
struct qdio_irq *irq_ptr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user