Skip to content

Commit 3ace3c4

Browse files
author
Alexander Gordeev
committed
Merge branch 'pci-device-recovery' into features
Niklas Schnelle says: =================== This patch series enhances the introspectability of the PCI device recovery for firmware. Until now when Linux performs recovery in response to a firmware error report. For example, until now firmware debug data would have no indication if the recovery was successfull or if it failed, for example due to KVM pass-through. Improve on this by reporting recovery status as well as some debug information such as device driver name and s390dbf/pci_msg/sprintf logs via the SCLP Write Event Data Action Qualifier 2 (Log Data provided) mechanism. =================== Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
2 parents 388cf16 + 4c41a48 commit 3ace3c4

9 files changed

Lines changed: 428 additions & 83 deletions

File tree

arch/s390/include/asm/debug.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ int debug_dflt_header_fn(debug_info_t *id, struct debug_view *view,
8585
int area, debug_entry_t *entry,
8686
char *out_buf, size_t out_buf_size);
8787

88+
#define DEBUG_SPRINTF_MAX_ARGS 10
89+
int debug_sprintf_format_fn(debug_info_t *id, struct debug_view *view,
90+
char *out_buf, size_t out_buf_size,
91+
const char *inbuf);
8892
struct debug_view {
8993
char name[DEBUG_MAX_NAME_LEN];
9094
debug_prolog_proc_t *prolog_proc;
@@ -114,6 +118,9 @@ debug_info_t *debug_register_mode(const char *name, int pages, int nr_areas,
114118
int buf_size, umode_t mode, uid_t uid,
115119
gid_t gid);
116120

121+
ssize_t debug_dump(debug_info_t *id, struct debug_view *view,
122+
char *buf, size_t buf_size, bool reverse);
123+
117124
void debug_unregister(debug_info_t *id);
118125

119126
void debug_set_level(debug_info_t *id, int new_level);

arch/s390/include/asm/sclp.h

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
/* 24 + 16 * SCLP_MAX_CORES */
1717
#define EXT_SCCB_READ_CPU (3 * PAGE_SIZE)
1818

19+
#define SCLP_ERRNOTIFY_AQ_RESET 0
20+
#define SCLP_ERRNOTIFY_AQ_REPAIR 1
21+
#define SCLP_ERRNOTIFY_AQ_INFO_LOG 2
22+
#define SCLP_ERRNOTIFY_AQ_OPTICS_DATA 3
23+
1924
#ifndef __ASSEMBLY__
2025
#include <linux/uio.h>
2126
#include <asm/chpid.h>
@@ -112,6 +117,34 @@ struct sclp_info {
112117
};
113118
extern struct sclp_info sclp;
114119

120+
struct sccb_header {
121+
u16 length;
122+
u8 function_code;
123+
u8 control_mask[3];
124+
u16 response_code;
125+
} __packed;
126+
127+
struct evbuf_header {
128+
u16 length;
129+
u8 type;
130+
u8 flags;
131+
u16 _reserved;
132+
} __packed;
133+
134+
struct err_notify_evbuf {
135+
struct evbuf_header header;
136+
u8 action;
137+
u8 atype;
138+
u32 fh;
139+
u32 fid;
140+
u8 data[];
141+
} __packed;
142+
143+
struct err_notify_sccb {
144+
struct sccb_header header;
145+
struct err_notify_evbuf evbuf;
146+
} __packed;
147+
115148
struct zpci_report_error_header {
116149
u8 version; /* Interface version byte */
117150
u8 action; /* Action qualifier byte

0 commit comments

Comments
 (0)