Address error and recovery for AER and DPC
v8 cover Address error and recovery for AER and DPC
This patch set brings in error handling support for DPC
The current implementation of AER and error message broadcasting to the EP driver is tightly coupled and limited to AER service driver. It is important to factor out broadcasting and other link handling callbacks. So that not only when AER gets triggered, but also when DPC get triggered (for e.g. ERR_FATAL), callbacks are handled appropriately.
DPC should enumerate the devices after recovering the link, which is achieved by implementing error_resume callback.
Changes since v7:
Rebased the code on pci master
> https://kernel.googlesource.com/pub/scm/linux/kernel/git/helgaas/pci
Changes since v6:
Sinan's and Stefan's comments implemented.
> reordered patch 6 and 7
> cleaned up
Changes since v5:
Sinan's and Keith's comments incorporated.
> made separate patch for mutex
> unified error repotting codes into driver/pci/pci.h
> got rid of wait link active/inactive and
made generic function in driver/pci/pci.c
Changes since v4:
Bjorn's comments incorporated.
> Renamed only do_recovery.
> moved the things more locally to drivers/pci/pci.h
Changes since v3:
Bjorn's comments incorporated.
> Made separate patch renaming generic pci_err.c
> Introduce pci_err.h to contain all the error types and recovery > removed all the dependencies on pci.h
Changes since v2:
Based on feedback from Keith:
"
When DPC is triggered due to receipt of an uncorrectable error Message, the Requester ID from the Message is recorded in the DPC Error Source ID register and that Message is discarded and not forwarded Upstream. "
Removed the patch where AER checks if DPC service is active
Changes since v1:
Kbuild errors fixed:
> pci_find_dpc_dev made static
> ras_event.h updated
> pci_find_aer_service call with CONFIG check
> pci_find_dpc_service call with CONFIG check
Oza Pawandeep (7):
PCI/AER: Rename error recovery to generic pci naming PCI/AER: factor out error reporting from AER PCI/ERR: add mutex to synchronize recovery PCI/DPC: Unify and plumb error handling into DPC PCI/AER: Unify aer error defines at single space PCI/DPC: Enumerate the devices after DPC trigger event
PCI: Unify wait for link active into generic pci
drivers/acpi/apei/ghes.c | 1 + drivers/pci/hotplug/pciehp_hpc.c | 21 +- drivers/pci/pci.c | 39 +++- drivers/pci/pci.h | 11 + drivers/pci/pcie/Makefile | 2 +- drivers/pci/pcie/aer/aerdrv.h | 30 --- drivers/pci/pcie/aer/aerdrv_core.c | 293 +------------------------- drivers/pci/pcie/aer/aerdrv_errprint.c | 1 + drivers/pci/pcie/pcie-dpc.c | 115 ++++++++++- drivers/pci/pcie/pcie-err.c | 366 +++++++++++++++++++++++++++++++++ drivers/pci/pcie/portdrv.h | 2 + include/linux/aer.h | 4 - include/linux/pci.h | 1 + 13 files changed, 534 insertions(+), 352 deletions(-) create mode 100644 drivers/pci/pcie/pcie-err.c
Signature · 2 lines
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc., a Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v8 1/7 PCI/AER: Rename error recovery to generic pci naming
This patch renames error recovery to generic name with pci prefix
drivers/pci/pcie/aer/aerdrv_core.c +4 -4
@@ -478,7 +478,7 @@ static pci_ers_result_t reset_link(struct pci_dev *dev) }/** -* do_recovery - handle nonfatal/fatal error recovery process +* pci_do_recovery - handle nonfatal/fatal error recovery process * @dev: pointer to a pci_dev data structure of agent detecting an error * @severity: error severity type *
@@ -486,7 +486,7 @@ static pci_ers_result_t reset_link(struct pci_dev *dev)* error detected message to all downstream drivers within a hierarchy in * question and return the returned code. */ -static void do_recovery (struct pci_dev *dev,int severity) +static void pci_do_recovery (struct pci_dev *dev,int severity) {pci_ers_result_t status, result =PCI_ERS_RESULT_RECOVERED ;enum pci_channel_state state;
@@ -566,7 +566,7 @@ static void handle_error_source(struct pcie_device *aerdev,pci_write_config_dword (dev, pos +PCI_ERR_COR_STATUS , info->status); }else -do_recovery (dev, info->severity); +pci_do_recovery (dev, info->severity); }#ifdef CONFIG_ACPI_APEI_PCIEAER
@@ -631,7 +631,7 @@ static void aer_recover_work_func(struct work_struct *work) }cper_print_aer (pdev, entry.severity, entry.regs);if (entry.severity !=AER_CORRECTABLE ) -do_recovery (pdev, entry.severity); +pci_do_recovery (pdev, entry.severity);pci_dev_put (pdev); } }
Signature · 2 lines
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc., a Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v8 2/7 PCI/AER: factor out error reporting from AER
In reply to Oza PawandeepThis patch factors out error reporting callbacks, which are currently tightly coupled with AER.
DPC should be able to register callbacks and attmept recovery when DPC trigger event occurs.
drivers/pci/pci.h +3 -0
@@ -342,6 +342,9 @@ static inline resource_size_t pci_resource_alignment(struct pci_dev *dev,void pci_enable_acs (struct pci_dev *dev); +/* PCI error reporting and recovery */ +void pci_do_recovery (struct pci_dev *dev,int severity); +#ifdef CONFIG_PCIEASPM void pcie_aspm_init_link_state (struct pci_dev *pdev);void pcie_aspm_exit_link_state (struct pci_dev *pdev);
drivers/pci/pcie/Makefile +1 -1
@@ -6,7 +6,7 @@ # Build PCI Express ASPM if needed obj-$(CONFIG_PCIEASPM) += aspm.o -pcieportdrv-y := portdrv_core.o portdrv_pci.o portdrv_bus.o +pcieportdrv-y := portdrv_core.o portdrv_pci.o portdrv_bus.o pcie-err.o pcieportdrv-$(CONFIG_ACPI) += portdrv_acpi.o obj-$(CONFIG_PCIEPORTBUS) += pcieportdrv.o
drivers/pci/pcie/aer/aerdrv.h +0 -30
@@ -76,36 +76,6 @@ struct aer_rpc {*/ }; -struct aer_broadcast_data { -enum pci_channel_state state; -enum pci_ers_result result; -}; - -static inline pci_ers_result_t merge_result (enum pci_ers_result orig, -enum pci_ers_result new) -{ -if (new ==PCI_ERS_RESULT_NO_AER_DRIVER ) -return PCI_ERS_RESULT_NO_AER_DRIVER ; - -if (new ==PCI_ERS_RESULT_NONE ) -return orig; - -switch (orig) { -case PCI_ERS_RESULT_CAN_RECOVER : -case PCI_ERS_RESULT_RECOVERED : - orig = new; -break ; -case PCI_ERS_RESULT_DISCONNECT : -if (new ==PCI_ERS_RESULT_NEED_RESET ) - orig =PCI_ERS_RESULT_NEED_RESET ; -break ; -default : -break ; - } - -return orig; -} -extern struct bus_type pcie_port_bus_type;void aer_isr (struct work_struct *work);void aer_print_error (struct pci_dev *dev,struct aer_err_info *info);
drivers/pci/pcie/aer/aerdrv_core.c +3 -287
314 lines not on this page · raw message
drivers/pci/pcie/pcie-err.c new file +334 -0
334 lines not on this page · raw message
drivers/pci/pcie/portdrv.h +1 -0
@@ -79,4 +79,5 @@ static inline void pcie_port_platform_notify(struct pci_dev *port, int *mask)static inline void pcie_port_platform_notify (struct pci_dev *port,int *mask){}#endif /* !CONFIG_ACPI */ +struct pcie_port_service_driver *pci_find_aer_service (struct pci_dev *dev);#endif /* _PORTDRV_H_ */
Signature · 2 lines
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc., a Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v8 3/7 PCI/ERR: add mutex to synchronize recovery
In reply to Oza PawandeepThis patch protects pci_do_recovery with mutex.
drivers/pci/pcie/pcie-err.c +6 -0
@@ -20,6 +20,8 @@#include <linux/pcieport_if.h> #include "portdrv.h" +static DEFINE_MUTEX (pci_err_recovery_lock); +struct aer_broadcast_data {enum pci_channel_state state;enum pci_ers_result result;
@@ -283,6 +285,8 @@ void pci_do_recovery(struct pci_dev *dev, int severity)pci_ers_result_t status, result =PCI_ERS_RESULT_RECOVERED ;enum pci_channel_state state; +mutex_lock (&pci_err_recovery_lock); +if (severity ==AER_FATAL ) state = pci_channel_io_frozen;else
@@ -326,9 +330,11 @@ void pci_do_recovery(struct pci_dev *dev, int severity) report_resume);dev_info (&dev->dev,"Device recovery successful\n" ); +mutex_unlock (&pci_err_recovery_lock);return ; failed:/* TODO: Should kernel panic here? */ dev_info (&dev->dev,"Device recovery failed\n" ); +mutex_unlock (&pci_err_recovery_lock); }
Signature · 2 lines
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc., a Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v8 4/7 PCI/DPC: Unify and plumb error handling into DPC
In reply to Oza PawandeepCurrent DPC driver does not do recovery, e.g. calling end-point's driver's callbacks, which sanitize the sw.
DPC driver implements link_reset callback, and calls pci_do_recovery.
drivers/pci/pci.h +2 -0
@@ -343,6 +343,8 @@ static inline resource_size_t pci_resource_alignment(struct pci_dev *dev,void pci_enable_acs (struct pci_dev *dev);/* PCI error reporting and recovery */ +#define DPC_FATAL 4 +void pci_do_recovery (struct pci_dev *dev,int severity);#ifdef CONFIG_PCIEASPM
drivers/pci/pcie/pcie-dpc.c +86 -7
137 lines not on this page · raw message
drivers/pci/pcie/pcie-err.c +21 -6
@@ -19,6 +19,7 @@#include <linux/aer.h> #include <linux/pcieport_if.h> #include "portdrv.h" +#include "./../pci.h" static DEFINE_MUTEX (pci_err_recovery_lock);
@@ -181,7 +182,7 @@ static pci_ers_result_t default_reset_link(struct pci_dev *dev)return PCI_ERS_RESULT_RECOVERED ; } -static pci_ers_result_t reset_link (struct pci_dev *dev) +static pci_ers_result_t reset_link (struct pci_dev *dev,int severity) {struct pci_dev *udev;pci_ers_result_t status;
@@ -195,9 +196,17 @@ static pci_ers_result_t reset_link(struct pci_dev *dev) udev = dev->bus->self; } + +/* Use the service driver of the component firstly */ +#if IS_ENABLED (CONFIG_PCIE_DPC ) +if (severity ==DPC_FATAL ) + driver =pci_find_dpc_service (udev); +#endif #if IS_ENABLED (CONFIG_PCIEAER ) -/* Use the aer driver of the component firstly */ - driver =pci_find_aer_service (udev); +if ((severity ==AER_FATAL ) || + (severity ==AER_NONFATAL ) || + (severity ==AER_CORRECTABLE )) + driver =pci_find_aer_service (udev);#endif if (driver && driver->reset_link) {
@@ -287,7 +296,8 @@ void pci_do_recovery(struct pci_dev *dev, int severity)mutex_lock (&pci_err_recovery_lock); -if (severity ==AER_FATAL ) +if ((severity ==AER_FATAL ) || + (severity ==DPC_FATAL )) state = pci_channel_io_frozen;else state = pci_channel_io_normal;
@@ -297,10 +307,14 @@ void pci_do_recovery(struct pci_dev *dev, int severity)"error_detected" , report_error_detected); -if (severity ==AER_FATAL ) { - result =reset_link (dev); +if ((severity ==AER_FATAL ) || + (severity ==DPC_FATAL )) { + result =reset_link (dev, severity);if (result !=PCI_ERS_RESULT_RECOVERED ) goto failed; +else if (severity ==DPC_FATAL ) + goto resume; + }if (status ==PCI_ERS_RESULT_CAN_RECOVER )
@@ -324,6 +338,7 @@ void pci_do_recovery(struct pci_dev *dev, int severity)if (status !=PCI_ERS_RESULT_RECOVERED ) goto failed; +resume: broadcast_error_message(dev, state, "resume",
drivers/pci/pcie/portdrv.h +1 -0
@@ -80,4 +80,5 @@ static inline void pcie_port_platform_notify(struct pci_dev *port, int *mask){}#endif /* !CONFIG_ACPI */ struct pcie_port_service_driver *pci_find_aer_service (struct pci_dev *dev); +struct pcie_port_service_driver *pci_find_dpc_service (struct pci_dev *dev);#endif /* _PORTDRV_H_ */
Signature · 2 lines
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc., a Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v8 5/7 PCI/AER: Unify aer error defines at single space
In reply to Oza PawandeepThis patch moves AER error defines to drivers/pci/pci.h.
So that it unifies the error repoting codes at single place along with dpc
drivers/acpi/apei/ghes.c +1 -0
@@ -56,6 +56,7 @@#include <ras/ras_event.h> #include "apei-internal.h" +#include "../../pci/pci.h" #define GHES_PFX "GHES: "
drivers/pci/pci.h +5 -1
@@ -343,7 +343,11 @@ static inline resource_size_t pci_resource_alignment(struct pci_dev *dev,void pci_enable_acs (struct pci_dev *dev);/* PCI error reporting and recovery */ -#define DPC_FATAL 4 +#define AER_NONFATAL 0 +#define AER_FATAL 1 +#define AER_CORRECTABLE 2 + +#define DPC_FATAL 4void pci_do_recovery (struct pci_dev *dev,int severity);
drivers/pci/pcie/aer/aerdrv_errprint.c +1 -0
@@ -19,6 +19,7 @@#include <linux/cper.h> #include "aerdrv.h" +#include "../../pci.h" #include <ras/ras_event.h> #define AER_AGENT_RECEIVER 0
include/linux/aer.h +0 -4
@@ -11,10 +11,6 @@#include <linux/errno.h> #include <linux/types.h> -#define AER_NONFATAL 0 -#define AER_FATAL 1 -#define AER_CORRECTABLE 2 -struct pci_dev ;struct aer_header_log_regs {
Signature · 2 lines
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc., a Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
kbuild test robot
build botRe: [PATCH v8 5/7] PCI/AER: Unify aer error defines at single space
Thank you for the patch! Yet something to improve:
Hi Oza,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on pci/next]
[also build test ERROR on v4.16-rc2 next-20180221]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Oza-Pawandeep/Address-error-and-recovery-for-AER-and-DPC/20180222-060518 base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next config: sh-allmodconfig (attached as .config) compiler: sh4-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=sh
All error/warnings (new ones prefixed by >>):
In file included from include/trace/define_trace.h:96:0,
from include/ras/ras_event.h:414,
from drivers//ras/ras.c:15:
include/trace/../../include/ras/ras_event.h: In function 'trace_raw_output_aer_event':
>> include/trace/../../include/ras/ras_event.h:319:24: error: 'AER_CORRECTABLE' undeclared (first use in this function); did you mean 'NR_UNEVICTABLE'?
__entry->severity == AER_CORRECTABLE ? "Corrected" :
^
include/trace/trace_events.h:360:22: note: in definition of macro 'DECLARE_EVENT_CLASS'
trace_seq_printf(s, print); \
^~~~~
include/trace/trace_events.h:79:9: note: in expansion of macro 'PARAMS'
PARAMS(print)); \
^~~~~~
>> include/trace/../../include/ras/ras_event.h:298:1: note: in expansion of macro 'TRACE_EVENT'
TRACE_EVENT(aer_event,
^~~~~~~~~~~
>> include/trace/../../include/ras/ras_event.h:317:2: note: in expansion of macro 'TP_printk'
TP_printk("%s PCIe Bus Error: severity=%s, %s\n",
^~~~~~~~~
include/trace/../../include/ras/ras_event.h:319:24: note: each undeclared identifier is reported only once for each function it appears in
__entry->severity == AER_CORRECTABLE ? "Corrected" :
^
include/trace/trace_events.h:360:22: note: in definition of macro 'DECLARE_EVENT_CLASS'
trace_seq_printf(s, print); \
^~~~~
include/trace/trace_events.h:79:9: note: in expansion of macro 'PARAMS'
PARAMS(print)); \
^~~~~~
>> include/trace/../../include/ras/ras_event.h:298:1: note: in expansion of macro 'TRACE_EVENT'
TRACE_EVENT(aer_event,
^~~~~~~~~~~
>> include/trace/../../include/ras/ras_event.h:317:2: note: in expansion of macro 'TP_printk'
TP_printk("%s PCIe Bus Error: severity=%s, %s\n",
^~~~~~~~~
>> include/trace/../../include/ras/ras_event.h:320:25: error: 'AER_FATAL' undeclared (first use in this function); did you mean 'NET_ATALK'?
__entry->severity == AER_FATAL ?
^
include/trace/trace_events.h:360:22: note: in definition of macro 'DECLARE_EVENT_CLASS'
trace_seq_printf(s, print); \
^~~~~
include/trace/trace_events.h:79:9: note: in expansion of macro 'PARAMS'
PARAMS(print)); \
^~~~~~
>> include/trace/../../include/ras/ras_event.h:298:1: note: in expansion of macro 'TRACE_EVENT'
TRACE_EVENT(aer_event,
^~~~~~~~~~~
>> include/trace/../../include/ras/ras_event.h:317:2: note: in expansion of macro 'TP_printk'TP_printk("%s PCIe Bus Error: severity=%s, %s\n", ^~~~~~~~~
vim +319 include/trace/../../include/ras/ras_event.h
297b64c7 Tyler Baicar 2017-06-21 254
297b64c7 Tyler Baicar 2017-06-21 255 /*
0a2409aa Chen, Gong 2014-06-11 256 * PCIe AER Trace event
0a2409aa Chen, Gong 2014-06-11 257 *
0a2409aa Chen, Gong 2014-06-11 258 * These events are generated when hardware detects a corrected or
0a2409aa Chen, Gong 2014-06-11 259 * uncorrected event on a PCIe device. The event report has
0a2409aa Chen, Gong 2014-06-11 260 * the following structure:
0a2409aa Chen, Gong 2014-06-11 261 *
0a2409aa Chen, Gong 2014-06-11 262 * char * dev_name - The name of the slot where the device resides
0a2409aa Chen, Gong 2014-06-11 263 * ([domain:]bus:device.function).
0a2409aa Chen, Gong 2014-06-11 264 * u32 status - Either the correctable or uncorrectable register
0a2409aa Chen, Gong 2014-06-11 265 * indicating what error or errors have been seen
0a2409aa Chen, Gong 2014-06-11 266 * u8 severity - error severity 0:NONFATAL 1:FATAL 2:CORRECTED
0a2409aa Chen, Gong 2014-06-11 267 */
0a2409aa Chen, Gong 2014-06-11 268
0a2409aa Chen, Gong 2014-06-11 269 #define aer_correctable_errors \
99d44024 Chen, Gong 2014-08-13 270 {PCI_ERR_COR_RCVR, "Receiver Error"}, \
99d44024 Chen, Gong 2014-08-13 271 {PCI_ERR_COR_BAD_TLP, "Bad TLP"}, \
99d44024 Chen, Gong 2014-08-13 272 {PCI_ERR_COR_BAD_DLLP, "Bad DLLP"}, \
99d44024 Chen, Gong 2014-08-13 273 {PCI_ERR_COR_REP_ROLL, "RELAY_NUM Rollover"}, \
99d44024 Chen, Gong 2014-08-13 274 {PCI_ERR_COR_REP_TIMER, "Replay Timer Timeout"}, \
cb9a684a Chen, Gong 2014-08-13 275 {PCI_ERR_COR_ADV_NFAT, "Advisory Non-Fatal Error"}, \
cb9a684a Chen, Gong 2014-08-13 276 {PCI_ERR_COR_INTERNAL, "Corrected Internal Error"}, \
cb9a684a Chen, Gong 2014-08-13 277 {PCI_ERR_COR_LOG_OVER, "Header Log Overflow"}
0a2409aa Chen, Gong 2014-06-11 278
0a2409aa Chen, Gong 2014-06-11 279 #define aer_uncorrectable_errors \
846fc709 Chen, Gong 2014-08-13 280 {PCI_ERR_UNC_UND, "Undefined"}, \
cb9a684a Chen, Gong 2014-08-13 281 {PCI_ERR_UNC_DLP, "Data Link Protocol Error"}, \
cb9a684a Chen, Gong 2014-08-13 282 {PCI_ERR_UNC_SURPDN, "Surprise Down Error"}, \
99d44024 Chen, Gong 2014-08-13 283 {PCI_ERR_UNC_POISON_TLP,"Poisoned TLP"}, \
cb9a684a Chen, Gong 2014-08-13 284 {PCI_ERR_UNC_FCP, "Flow Control Protocol Error"}, \
99d44024 Chen, Gong 2014-08-13 285 {PCI_ERR_UNC_COMP_TIME, "Completion Timeout"}, \
99d44024 Chen, Gong 2014-08-13 286 {PCI_ERR_UNC_COMP_ABORT,"Completer Abort"}, \
99d44024 Chen, Gong 2014-08-13 287 {PCI_ERR_UNC_UNX_COMP, "Unexpected Completion"}, \
99d44024 Chen, Gong 2014-08-13 288 {PCI_ERR_UNC_RX_OVER, "Receiver Overflow"}, \
99d44024 Chen, Gong 2014-08-13 289 {PCI_ERR_UNC_MALF_TLP, "Malformed TLP"}, \
cb9a684a Chen, Gong 2014-08-13 290 {PCI_ERR_UNC_ECRC, "ECRC Error"}, \
cb9a684a Chen, Gong 2014-08-13 291 {PCI_ERR_UNC_UNSUP, "Unsupported Request Error"}, \
cb9a684a Chen, Gong 2014-08-13 292 {PCI_ERR_UNC_ACSV, "ACS Violation"}, \
cb9a684a Chen, Gong 2014-08-13 293 {PCI_ERR_UNC_INTN, "Uncorrectable Internal Error"},\
cb9a684a Chen, Gong 2014-08-13 294 {PCI_ERR_UNC_MCBTLP, "MC Blocked TLP"}, \
cb9a684a Chen, Gong 2014-08-13 295 {PCI_ERR_UNC_ATOMEG, "AtomicOp Egress Blocked"}, \
cb9a684a Chen, Gong 2014-08-13 296 {PCI_ERR_UNC_TLPPRE, "TLP Prefix Blocked Error"}
0a2409aa Chen, Gong 2014-06-11 297
0a2409aa Chen, Gong 2014-06-11 @298 TRACE_EVENT(aer_event,
0a2409aa Chen, Gong 2014-06-11 299 TP_PROTO(const char *dev_name,
0a2409aa Chen, Gong 2014-06-11 300 const u32 status,
0a2409aa Chen, Gong 2014-06-11 301 const u8 severity),
0a2409aa Chen, Gong 2014-06-11 302
0a2409aa Chen, Gong 2014-06-11 303 TP_ARGS(dev_name, status, severity),
0a2409aa Chen, Gong 2014-06-11 304
0a2409aa Chen, Gong 2014-06-11 305 TP_STRUCT__entry(
0a2409aa Chen, Gong 2014-06-11 306 __string( dev_name, dev_name )
0a2409aa Chen, Gong 2014-06-11 307 __field( u32, status )
0a2409aa Chen, Gong 2014-06-11 308 __field( u8, severity )
0a2409aa Chen, Gong 2014-06-11 309 ),
0a2409aa Chen, Gong 2014-06-11 310
0a2409aa Chen, Gong 2014-06-11 311 TP_fast_assign(
0a2409aa Chen, Gong 2014-06-11 312 __assign_str(dev_name, dev_name);
0a2409aa Chen, Gong 2014-06-11 313 __entry->status = status;
0a2409aa Chen, Gong 2014-06-11 314 __entry->severity = severity;
0a2409aa Chen, Gong 2014-06-11 315 ),
0a2409aa Chen, Gong 2014-06-11 316
0a2409aa Chen, Gong 2014-06-11 @317 TP_printk("%s PCIe Bus Error: severity=%s, %s\n",
0a2409aa Chen, Gong 2014-06-11 318 __get_str(dev_name),
0a2409aa Chen, Gong 2014-06-11 @319 __entry->severity == AER_CORRECTABLE ? "Corrected" :
0a2409aa Chen, Gong 2014-06-11 @320 __entry->severity == AER_FATAL ?
0a2409aa Chen, Gong 2014-06-11 321 "Fatal" : "Uncorrected, non-fatal",
0a2409aa Chen, Gong 2014-06-11 322 __entry->severity == AER_CORRECTABLE ?
0a2409aa Chen, Gong 2014-06-11 323 __print_flags(__entry->status, "|", aer_correctable_errors) :
0a2409aa Chen, Gong 2014-06-11 324 __print_flags(__entry->status, "|", aer_uncorrectable_errors))
0a2409aa Chen, Gong 2014-06-11 325 );
0a2409aa Chen, Gong 2014-06-11 326 :::::: The code at line 319 was first introduced by commit
:::::: 0a2409aad38e97b1db55e6515b990be7b17060f6 trace, AER: Move trace into unified interface
:::::: TO: Chen, Gong <[email protected]>
:::::: CC: Tony Luck <[email protected]>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
kbuild test robot
build botRe: [PATCH v8 5/7] PCI/AER: Unify aer error defines at single space
In reply to Oza PawandeepThank you for the patch! Yet something to improve:
Hi Oza,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on pci/next]
[also build test ERROR on v4.16-rc2 next-20180221]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Oza-Pawandeep/Address-error-and-recovery-for-AER-and-DPC/20180222-060518 base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next config: x86_64-randconfig-s2-02220611 (attached as .config) compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026 reproduce: # save the attached .config to linux build tree make ARCH=x86_64
All errors (new ones prefixed by >>):
In file included from include/trace/define_trace.h:96:0,
from include/ras/ras_event.h:414,
from drivers//ras/ras.c:15:
include/trace/../../include/ras/ras_event.h: In function 'trace_raw_output_aer_event':
>> include/trace/../../include/ras/ras_event.h:319:24: error: 'AER_CORRECTABLE' undeclared (first use in this function)
__entry->severity == AER_CORRECTABLE ? "Corrected" :
^
include/trace/trace_events.h:360:22: note: in definition of macro 'DECLARE_EVENT_CLASS'
trace_seq_printf(s, print); \
^~~~~
include/trace/trace_events.h:79:9: note: in expansion of macro 'PARAMS'
PARAMS(print)); \
^~~~~~
include/trace/../../include/ras/ras_event.h:298:1: note: in expansion of macro 'TRACE_EVENT'
TRACE_EVENT(aer_event,
^~~~~~~~~~~
include/trace/../../include/ras/ras_event.h:317:2: note: in expansion of macro 'TP_printk'
TP_printk("%s PCIe Bus Error: severity=%s, %s\n",
^~~~~~~~~
include/trace/../../include/ras/ras_event.h:319:24: note: each undeclared identifier is reported only once for each function it appears in
__entry->severity == AER_CORRECTABLE ? "Corrected" :
^
include/trace/trace_events.h:360:22: note: in definition of macro 'DECLARE_EVENT_CLASS'
trace_seq_printf(s, print); \
^~~~~
include/trace/trace_events.h:79:9: note: in expansion of macro 'PARAMS'
PARAMS(print)); \
^~~~~~
include/trace/../../include/ras/ras_event.h:298:1: note: in expansion of macro 'TRACE_EVENT'
TRACE_EVENT(aer_event,
^~~~~~~~~~~
include/trace/../../include/ras/ras_event.h:317:2: note: in expansion of macro 'TP_printk'
TP_printk("%s PCIe Bus Error: severity=%s, %s\n",
^~~~~~~~~
>> include/trace/../../include/ras/ras_event.h:320:25: error: 'AER_FATAL' undeclared (first use in this function)
__entry->severity == AER_FATAL ?
^
include/trace/trace_events.h:360:22: note: in definition of macro 'DECLARE_EVENT_CLASS'
trace_seq_printf(s, print); \
^~~~~
include/trace/trace_events.h:79:9: note: in expansion of macro 'PARAMS'
PARAMS(print)); \
^~~~~~
include/trace/../../include/ras/ras_event.h:298:1: note: in expansion of macro 'TRACE_EVENT'
TRACE_EVENT(aer_event,
^~~~~~~~~~~ include/trace/../../include/ras/ras_event.h:317:2: note: in expansion of macro 'TP_printk'
TP_printk("%s PCIe Bus Error: severity=%s, %s\n",
^~~~~~~~~
vim +/AER_CORRECTABLE +319 include/trace/../../include/ras/ras_event.h
297b64c7 Tyler Baicar 2017-06-21 254
297b64c7 Tyler Baicar 2017-06-21 255 /*
0a2409aa Chen, Gong 2014-06-11 256 * PCIe AER Trace event
0a2409aa Chen, Gong 2014-06-11 257 *
0a2409aa Chen, Gong 2014-06-11 258 * These events are generated when hardware detects a corrected or
0a2409aa Chen, Gong 2014-06-11 259 * uncorrected event on a PCIe device. The event report has
0a2409aa Chen, Gong 2014-06-11 260 * the following structure:
0a2409aa Chen, Gong 2014-06-11 261 *
0a2409aa Chen, Gong 2014-06-11 262 * char * dev_name - The name of the slot where the device resides
0a2409aa Chen, Gong 2014-06-11 263 * ([domain:]bus:device.function).
0a2409aa Chen, Gong 2014-06-11 264 * u32 status - Either the correctable or uncorrectable register
0a2409aa Chen, Gong 2014-06-11 265 * indicating what error or errors have been seen
0a2409aa Chen, Gong 2014-06-11 266 * u8 severity - error severity 0:NONFATAL 1:FATAL 2:CORRECTED
0a2409aa Chen, Gong 2014-06-11 267 */
0a2409aa Chen, Gong 2014-06-11 268
0a2409aa Chen, Gong 2014-06-11 269 #define aer_correctable_errors \
99d44024 Chen, Gong 2014-08-13 270 {PCI_ERR_COR_RCVR, "Receiver Error"}, \
99d44024 Chen, Gong 2014-08-13 271 {PCI_ERR_COR_BAD_TLP, "Bad TLP"}, \
99d44024 Chen, Gong 2014-08-13 272 {PCI_ERR_COR_BAD_DLLP, "Bad DLLP"}, \
99d44024 Chen, Gong 2014-08-13 273 {PCI_ERR_COR_REP_ROLL, "RELAY_NUM Rollover"}, \
99d44024 Chen, Gong 2014-08-13 274 {PCI_ERR_COR_REP_TIMER, "Replay Timer Timeout"}, \
cb9a684a Chen, Gong 2014-08-13 275 {PCI_ERR_COR_ADV_NFAT, "Advisory Non-Fatal Error"}, \
cb9a684a Chen, Gong 2014-08-13 276 {PCI_ERR_COR_INTERNAL, "Corrected Internal Error"}, \
cb9a684a Chen, Gong 2014-08-13 277 {PCI_ERR_COR_LOG_OVER, "Header Log Overflow"}
0a2409aa Chen, Gong 2014-06-11 278
0a2409aa Chen, Gong 2014-06-11 279 #define aer_uncorrectable_errors \
846fc709 Chen, Gong 2014-08-13 280 {PCI_ERR_UNC_UND, "Undefined"}, \
cb9a684a Chen, Gong 2014-08-13 281 {PCI_ERR_UNC_DLP, "Data Link Protocol Error"}, \
cb9a684a Chen, Gong 2014-08-13 282 {PCI_ERR_UNC_SURPDN, "Surprise Down Error"}, \
99d44024 Chen, Gong 2014-08-13 283 {PCI_ERR_UNC_POISON_TLP,"Poisoned TLP"}, \
cb9a684a Chen, Gong 2014-08-13 284 {PCI_ERR_UNC_FCP, "Flow Control Protocol Error"}, \
99d44024 Chen, Gong 2014-08-13 285 {PCI_ERR_UNC_COMP_TIME, "Completion Timeout"}, \
99d44024 Chen, Gong 2014-08-13 286 {PCI_ERR_UNC_COMP_ABORT,"Completer Abort"}, \
99d44024 Chen, Gong 2014-08-13 287 {PCI_ERR_UNC_UNX_COMP, "Unexpected Completion"}, \
99d44024 Chen, Gong 2014-08-13 288 {PCI_ERR_UNC_RX_OVER, "Receiver Overflow"}, \
99d44024 Chen, Gong 2014-08-13 289 {PCI_ERR_UNC_MALF_TLP, "Malformed TLP"}, \
cb9a684a Chen, Gong 2014-08-13 290 {PCI_ERR_UNC_ECRC, "ECRC Error"}, \
cb9a684a Chen, Gong 2014-08-13 291 {PCI_ERR_UNC_UNSUP, "Unsupported Request Error"}, \
cb9a684a Chen, Gong 2014-08-13 292 {PCI_ERR_UNC_ACSV, "ACS Violation"}, \
cb9a684a Chen, Gong 2014-08-13 293 {PCI_ERR_UNC_INTN, "Uncorrectable Internal Error"},\
cb9a684a Chen, Gong 2014-08-13 294 {PCI_ERR_UNC_MCBTLP, "MC Blocked TLP"}, \
cb9a684a Chen, Gong 2014-08-13 295 {PCI_ERR_UNC_ATOMEG, "AtomicOp Egress Blocked"}, \
cb9a684a Chen, Gong 2014-08-13 296 {PCI_ERR_UNC_TLPPRE, "TLP Prefix Blocked Error"}
0a2409aa Chen, Gong 2014-06-11 297
0a2409aa Chen, Gong 2014-06-11 @298 TRACE_EVENT(aer_event,
0a2409aa Chen, Gong 2014-06-11 299 TP_PROTO(const char *dev_name,
0a2409aa Chen, Gong 2014-06-11 300 const u32 status,
0a2409aa Chen, Gong 2014-06-11 301 const u8 severity),
0a2409aa Chen, Gong 2014-06-11 302
0a2409aa Chen, Gong 2014-06-11 303 TP_ARGS(dev_name, status, severity),
0a2409aa Chen, Gong 2014-06-11 304
0a2409aa Chen, Gong 2014-06-11 305 TP_STRUCT__entry(
0a2409aa Chen, Gong 2014-06-11 306 __string( dev_name, dev_name )
0a2409aa Chen, Gong 2014-06-11 307 __field( u32, status )
0a2409aa Chen, Gong 2014-06-11 308 __field( u8, severity )
0a2409aa Chen, Gong 2014-06-11 309 ),
0a2409aa Chen, Gong 2014-06-11 310
0a2409aa Chen, Gong 2014-06-11 311 TP_fast_assign(
0a2409aa Chen, Gong 2014-06-11 312 __assign_str(dev_name, dev_name);
0a2409aa Chen, Gong 2014-06-11 313 __entry->status = status;
0a2409aa Chen, Gong 2014-06-11 314 __entry->severity = severity;
0a2409aa Chen, Gong 2014-06-11 315 ),
0a2409aa Chen, Gong 2014-06-11 316
0a2409aa Chen, Gong 2014-06-11 317 TP_printk("%s PCIe Bus Error: severity=%s, %s\n",
0a2409aa Chen, Gong 2014-06-11 318 __get_str(dev_name),
0a2409aa Chen, Gong 2014-06-11 @319 __entry->severity == AER_CORRECTABLE ? "Corrected" :
0a2409aa Chen, Gong 2014-06-11 @320 __entry->severity == AER_FATAL ?
0a2409aa Chen, Gong 2014-06-11 321 "Fatal" : "Uncorrected, non-fatal",
0a2409aa Chen, Gong 2014-06-11 322 __entry->severity == AER_CORRECTABLE ?
0a2409aa Chen, Gong 2014-06-11 323 __print_flags(__entry->status, "|", aer_correctable_errors) :
0a2409aa Chen, Gong 2014-06-11 324 __print_flags(__entry->status, "|", aer_uncorrectable_errors))
0a2409aa Chen, Gong 2014-06-11 325 );
0a2409aa Chen, Gong 2014-06-11 326 :::::: The code at line 319 was first introduced by commit
:::::: 0a2409aad38e97b1db55e6515b990be7b17060f6 trace, AER: Move trace into unified interface
:::::: TO: Chen, Gong <[email protected]>
:::::: CC: Tony Luck <[email protected]>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
kbuild test robot
build botRe: [PATCH v8 5/7] PCI/AER: Unify aer error defines at single space
In reply to Oza PawandeepThank you for the patch! Perhaps something to improve:
Hi Oza,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on pci/next]
[also build test WARNING on v4.16-rc2 next-20180222]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Oza-Pawandeep/Address-error-and-recovery-for-AER-and-DPC/20180222-060518 base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
include/linux/init.h:134:6: sparse: attribute 'indirect_branch': unknown attribute include/linux/init.h:135:5: sparse: attribute 'indirect_branch': unknown attribute include/linux/init.h:268:6: sparse: attribute 'indirect_branch': unknown attribute include/linux/init.h:269:6: sparse: attribute 'indirect_branch': unknown attribute include/linux/printk.h:200:6: sparse: attribute 'indirect_branch': unknown attribute arch/x86/include/asm/mem_encrypt.h:32:6: sparse: attribute 'indirect_branch': unknown attribute arch/x86/include/asm/mem_encrypt.h:34:6: sparse: attribute 'indirect_branch': unknown attribute arch/x86/include/asm/mem_encrypt.h:37:6: sparse: attribute 'indirect_branch': unknown attribute arch/x86/include/asm/mem_encrypt.h:38:6: sparse: attribute 'indirect_branch': unknown attribute arch/x86/include/asm/mem_encrypt.h:40:6: sparse: attribute 'indirect_branch': unknown attribute arch/x86/include/asm/mem_encrypt.h:42:6: sparse: attribute 'indirect_branch': unknown attribute arch/x86/include/asm/mem_encrypt.h:43:6: sparse: attribute 'indirect_branch': unknown attribute arch/x86/include/asm/mem_encrypt.h:45:5: sparse: attribute 'indirect_branch': unknown attribute arch/x86/include/asm/mem_encrypt.h:46:5: sparse: attribute 'indirect_branch': unknown attribute arch/x86/include/asm/mem_encrypt.h:49:6: sparse: attribute 'indirect_branch': unknown attribute arch/x86/include/asm/qspinlock.h:53:32: sparse: attribute 'indirect_branch': unknown attribute include/linux/wait_bit.h:41:13: sparse: attribute 'indirect_branch': unknown attribute include/linux/workqueue.h:646:5: sparse: attribute 'indirect_branch': unknown attribute include/linux/workqueue.h:647:5: sparse: attribute 'indirect_branch': unknown attribute arch/x86/include/asm/numa.h:34:12: sparse: attribute 'indirect_branch': unknown attribute arch/x86/include/asm/numa.h:35:13: sparse: attribute 'indirect_branch': unknown attribute arch/x86/include/asm/numa.h:62:13: sparse: attribute 'indirect_branch': unknown attribute include/linux/vmalloc.h:64:13: sparse: attribute 'indirect_branch': unknown attribute include/linux/vmalloc.h:173:8: sparse: attribute 'indirect_branch': unknown attribute include/linux/vmalloc.h:174:8: sparse: attribute 'indirect_branch': unknown attribute arch/x86/include/asm/fixmap.h:174:6: sparse: attribute 'indirect_branch': unknown attribute arch/x86/include/asm/fixmap.h:176:6: sparse: attribute 'indirect_branch': unknown attribute arch/x86/include/asm/fixmap.h:178:6: sparse: attribute 'indirect_branch': unknown attribute arch/x86/include/asm/fixmap.h:180:6: sparse: attribute 'indirect_branch': unknown attribute arch/x86/include/asm/apic.h:254:13: sparse: attribute 'indirect_branch': unknown attribute arch/x86/include/asm/apic.h:430:13: sparse: attribute 'indirect_branch': unknown attribute arch/x86/include/asm/io_apic.h:184:13: sparse: attribute 'indirect_branch': unknown attribute include/linux/smp.h:113:6: sparse: attribute 'indirect_branch': unknown attribute include/linux/smp.h:125:13: sparse: attribute 'indirect_branch': unknown attribute include/linux/smp.h:126:13: sparse: attribute 'indirect_branch': unknown attribute include/linux/percpu.h:110:33: sparse: attribute 'indirect_branch': unknown attribute include/linux/percpu.h:112:13: sparse: attribute 'indirect_branch': unknown attribute include/linux/percpu.h:114:12: sparse: attribute 'indirect_branch': unknown attribute include/linux/percpu.h:118:12: sparse: attribute 'indirect_branch': unknown attribute include/linux/percpu.h:126:12: sparse: attribute 'indirect_branch': unknown attribute include/linux/fs.h:63:13: sparse: attribute 'indirect_branch': unknown attribute include/linux/fs.h:64:13: sparse: attribute 'indirect_branch': unknown attribute include/linux/fs.h:65:13: sparse: attribute 'indirect_branch': unknown attribute include/linux/fs.h:66:13: sparse: attribute 'indirect_branch': unknown attribute include/linux/memory_hotplug.h:221:13: sparse: attribute 'indirect_branch': unknown attribute include/linux/mmzone.h:1292:15: sparse: attribute 'indirect_branch': unknown attribute include/linux/fs.h:2421:13: sparse: attribute 'indirect_branch': unknown attribute include/linux/fs.h:2422:13: sparse: attribute 'indirect_branch': unknown attribute include/linux/fs.h:3329:5: sparse: attribute 'indirect_branch': unknown attribute include/linux/ras.h:20:6: sparse: attribute 'indirect_branch': unknown attribute include/linux/ras.h:21:5: sparse: attribute 'indirect_branch': unknown attribute include/linux/hrtimer.h:497:13: sparse: attribute 'indirect_branch': unknown attribute include/linux/cred.h:167:13: sparse: attribute 'indirect_branch': unknown attribute include/linux/io.h:47:6: sparse: attribute 'indirect_branch': unknown attribute include/linux/kmemleak.h:29:33: sparse: attribute 'indirect_branch': unknown attribute arch/x86/include/asm/kasan.h:29:6: sparse: attribute 'indirect_branch': unknown attribute arch/x86/include/asm/kasan.h:30:6: sparse: attribute 'indirect_branch': unknown attribute arch/x86/include/asm/pgtable.h:28:5: sparse: attribute 'indirect_branch': unknown attribute include/linux/slab.h:135:6: sparse: attribute 'indirect_branch': unknown attribute include/linux/slab.h:716:6: sparse: attribute 'indirect_branch': unknown attribute include/linux/mm.h:1753:6: sparse: attribute 'indirect_branch': unknown attribute include/linux/mm.h:1941:13: sparse: attribute 'indirect_branch': unknown attribute include/linux/mm.h:2083:13: sparse: attribute 'indirect_branch': unknown attribute include/linux/mm.h:2671:6: sparse: attribute 'indirect_branch': unknown attribute include/linux/pci.h:1924:6: sparse: attribute 'indirect_branch': unknown attribute include/linux/pci.h:1925:6: sparse: attribute 'indirect_branch': unknown attribute include/linux/swiotlb.h:39:13: sparse: attribute 'indirect_branch': unknown attribute include/linux/swiotlb.h:124:13: sparse: attribute 'indirect_branch': unknown attribute arch/x86/include/asm/swiotlb.h:9:12: sparse: attribute 'indirect_branch': unknown attribute arch/x86/include/asm/swiotlb.h:10:12: sparse: attribute 'indirect_branch': unknown attribute arch/x86/include/asm/swiotlb.h:11:13: sparse: attribute 'indirect_branch': unknown attribute arch/x86/include/asm/swiotlb.h:12:13: sparse: attribute 'indirect_branch': unknown attribute include/linux/dma-contiguous.h:85:5: sparse: attribute 'indirect_branch': unknown attribute include/linux/nsproxy.h:74:5: sparse: attribute 'indirect_branch': unknown attribute arch/x86/include/asm/vdso.h:44:13: sparse: attribute 'indirect_branch': unknown attribute include/linux/ftrace.h:462:6: sparse: attribute 'indirect_branch': unknown attribute include/trace/../../include/ras/ras_event.h:27:1: sparse: attribute 'indirect_branch': unknown attribute include/trace/../../include/ras/ras_event.h:98:1: sparse: attribute 'indirect_branch': unknown attribute include/trace/../../include/ras/ras_event.h:171:1: sparse: attribute 'indirect_branch': unknown attribute include/trace/../../include/ras/ras_event.h:219:1: sparse: attribute 'indirect_branch': unknown attribute include/trace/../../include/ras/ras_event.h:298:1: sparse: attribute 'indirect_branch': unknown attribute include/trace/../../include/ras/ras_event.h:385:1: sparse: attribute 'indirect_branch': unknown attribute drivers/ras/ras.c:29:12: sparse: attribute 'indirect_branch': unknown attribute drivers/ras/ras.c:47:12: sparse: attribute 'indirect_branch': unknown attribute include/trace/../../include/ras/ras_event.h:298:1: sparse: undefined identifier 'AER_CORRECTABLE'
>> include/trace/../../include/ras/ras_event.h:298:1: sparse: call with no type!
In file included from include/trace/define_trace.h:96:0,
from include/ras/ras_event.h:414,
from drivers/ras/ras.c:15:
include/trace/../../include/ras/ras_event.h: In function 'trace_raw_output_aer_event':
include/trace/../../include/ras/ras_event.h:319:24: error: 'AER_CORRECTABLE' undeclared (first use in this function); did you mean
__entry->severity == AER_CORRECTABLE "Corrected" :
^
include/trace/trace_events.h:360:22: note: in definition of macro 'DECLARE_EVENT_CLASS'
trace_seq_printf(s, print); 96- ^~~~~
include/trace/trace_events.h:79:9: note: in expansion of macro 'PARAMS'
PARAMS(print)); 99- ^~~~~~
include/trace/../../include/ras/ras_event.h:298:1: note: in expansion of macro 'TRACE_EVENT'
TRACE_EVENT(aer_event,
^~~~~~~~~~~
include/trace/../../include/ras/ras_event.h:317:2: note: in expansion of macro 'TP_printk'
TP_printk("%s PCIe Bus Error: severity=%s, %sn",
^~~~~~~~~
include/trace/../../include/ras/ras_event.h:319:24: note: each undeclared identifier is reported only once for each function it appears in
__entry->severity == AER_CORRECTABLE "Corrected" :
^
include/trace/trace_events.h:360:22: note: in definition of macro 'DECLARE_EVENT_CLASS'
trace_seq_printf(s, print); 111- ^~~~~
include/trace/trace_events.h:79:9: note: in expansion of macro 'PARAMS'
PARAMS(print)); 114- ^~~~~~
include/trace/../../include/ras/ras_event.h:298:1: note: in expansion of macro 'TRACE_EVENT'
TRACE_EVENT(aer_event,
^~~~~~~~~~~
include/trace/../../include/ras/ras_event.h:317:2: note: in expansion of macro 'TP_printk'
TP_printk("%s PCIe Bus Error: severity=%s, %sn",
^~~~~~~~~
include/trace/../../include/ras/ras_event.h:320:25: error: 'AER_FATAL' undeclared (first use in this function); did you mean
__entry->severity == AER_FATAL
^
include/trace/trace_events.h:360:22: note: in definition of macro 'DECLARE_EVENT_CLASS'
trace_seq_printf(s, print); 126- ^~~~~
include/trace/trace_events.h:79:9: note: in expansion of macro 'PARAMS'
PARAMS(print)); 129- ^~~~~~
include/trace/../../include/ras/ras_event.h:298:1: note: in expansion of macro 'TRACE_EVENT'
TRACE_EVENT(aer_event,
^~~~~~~~~~~ include/trace/../../include/ras/ras_event.h:317:2: note: in expansion of macro 'TP_printk'
TP_printk("%s PCIe Bus Error: severity=%s, %sn",
^~~~~~~~~
vim +298 include/trace/../../include/ras/ras_event.h
297b64c7 Tyler Baicar 2017-06-21 254
297b64c7 Tyler Baicar 2017-06-21 255 /*
0a2409aa Chen, Gong 2014-06-11 256 * PCIe AER Trace event
0a2409aa Chen, Gong 2014-06-11 257 *
0a2409aa Chen, Gong 2014-06-11 258 * These events are generated when hardware detects a corrected or
0a2409aa Chen, Gong 2014-06-11 259 * uncorrected event on a PCIe device. The event report has
0a2409aa Chen, Gong 2014-06-11 260 * the following structure:
0a2409aa Chen, Gong 2014-06-11 261 *
0a2409aa Chen, Gong 2014-06-11 262 * char * dev_name - The name of the slot where the device resides
0a2409aa Chen, Gong 2014-06-11 263 * ([domain:]bus:device.function).
0a2409aa Chen, Gong 2014-06-11 264 * u32 status - Either the correctable or uncorrectable register
0a2409aa Chen, Gong 2014-06-11 265 * indicating what error or errors have been seen
0a2409aa Chen, Gong 2014-06-11 266 * u8 severity - error severity 0:NONFATAL 1:FATAL 2:CORRECTED
0a2409aa Chen, Gong 2014-06-11 267 */
0a2409aa Chen, Gong 2014-06-11 268
0a2409aa Chen, Gong 2014-06-11 269 #define aer_correctable_errors \
99d44024 Chen, Gong 2014-08-13 270 {PCI_ERR_COR_RCVR, "Receiver Error"}, \
99d44024 Chen, Gong 2014-08-13 271 {PCI_ERR_COR_BAD_TLP, "Bad TLP"}, \
99d44024 Chen, Gong 2014-08-13 272 {PCI_ERR_COR_BAD_DLLP, "Bad DLLP"}, \
99d44024 Chen, Gong 2014-08-13 273 {PCI_ERR_COR_REP_ROLL, "RELAY_NUM Rollover"}, \
99d44024 Chen, Gong 2014-08-13 274 {PCI_ERR_COR_REP_TIMER, "Replay Timer Timeout"}, \
cb9a684a Chen, Gong 2014-08-13 275 {PCI_ERR_COR_ADV_NFAT, "Advisory Non-Fatal Error"}, \
cb9a684a Chen, Gong 2014-08-13 276 {PCI_ERR_COR_INTERNAL, "Corrected Internal Error"}, \
cb9a684a Chen, Gong 2014-08-13 277 {PCI_ERR_COR_LOG_OVER, "Header Log Overflow"}
0a2409aa Chen, Gong 2014-06-11 278
0a2409aa Chen, Gong 2014-06-11 279 #define aer_uncorrectable_errors \
846fc709 Chen, Gong 2014-08-13 280 {PCI_ERR_UNC_UND, "Undefined"}, \
cb9a684a Chen, Gong 2014-08-13 281 {PCI_ERR_UNC_DLP, "Data Link Protocol Error"}, \
cb9a684a Chen, Gong 2014-08-13 282 {PCI_ERR_UNC_SURPDN, "Surprise Down Error"}, \
99d44024 Chen, Gong 2014-08-13 283 {PCI_ERR_UNC_POISON_TLP,"Poisoned TLP"}, \
cb9a684a Chen, Gong 2014-08-13 284 {PCI_ERR_UNC_FCP, "Flow Control Protocol Error"}, \
99d44024 Chen, Gong 2014-08-13 285 {PCI_ERR_UNC_COMP_TIME, "Completion Timeout"}, \
99d44024 Chen, Gong 2014-08-13 286 {PCI_ERR_UNC_COMP_ABORT,"Completer Abort"}, \
99d44024 Chen, Gong 2014-08-13 287 {PCI_ERR_UNC_UNX_COMP, "Unexpected Completion"}, \
99d44024 Chen, Gong 2014-08-13 288 {PCI_ERR_UNC_RX_OVER, "Receiver Overflow"}, \
99d44024 Chen, Gong 2014-08-13 289 {PCI_ERR_UNC_MALF_TLP, "Malformed TLP"}, \
cb9a684a Chen, Gong 2014-08-13 290 {PCI_ERR_UNC_ECRC, "ECRC Error"}, \
cb9a684a Chen, Gong 2014-08-13 291 {PCI_ERR_UNC_UNSUP, "Unsupported Request Error"}, \
cb9a684a Chen, Gong 2014-08-13 292 {PCI_ERR_UNC_ACSV, "ACS Violation"}, \
cb9a684a Chen, Gong 2014-08-13 293 {PCI_ERR_UNC_INTN, "Uncorrectable Internal Error"},\
cb9a684a Chen, Gong 2014-08-13 294 {PCI_ERR_UNC_MCBTLP, "MC Blocked TLP"}, \
cb9a684a Chen, Gong 2014-08-13 295 {PCI_ERR_UNC_ATOMEG, "AtomicOp Egress Blocked"}, \
cb9a684a Chen, Gong 2014-08-13 296 {PCI_ERR_UNC_TLPPRE, "TLP Prefix Blocked Error"}
0a2409aa Chen, Gong 2014-06-11 297
0a2409aa Chen, Gong 2014-06-11 @298 TRACE_EVENT(aer_event,
0a2409aa Chen, Gong 2014-06-11 299 TP_PROTO(const char *dev_name,
0a2409aa Chen, Gong 2014-06-11 300 const u32 status,
0a2409aa Chen, Gong 2014-06-11 301 const u8 severity),
0a2409aa Chen, Gong 2014-06-11 302
0a2409aa Chen, Gong 2014-06-11 303 TP_ARGS(dev_name, status, severity),
0a2409aa Chen, Gong 2014-06-11 304
0a2409aa Chen, Gong 2014-06-11 305 TP_STRUCT__entry(
0a2409aa Chen, Gong 2014-06-11 306 __string( dev_name, dev_name )
0a2409aa Chen, Gong 2014-06-11 307 __field( u32, status )
0a2409aa Chen, Gong 2014-06-11 308 __field( u8, severity )
0a2409aa Chen, Gong 2014-06-11 309 ),
0a2409aa Chen, Gong 2014-06-11 310
0a2409aa Chen, Gong 2014-06-11 311 TP_fast_assign(
0a2409aa Chen, Gong 2014-06-11 312 __assign_str(dev_name, dev_name);
0a2409aa Chen, Gong 2014-06-11 313 __entry->status = status;
0a2409aa Chen, Gong 2014-06-11 314 __entry->severity = severity;
0a2409aa Chen, Gong 2014-06-11 315 ),
0a2409aa Chen, Gong 2014-06-11 316
0a2409aa Chen, Gong 2014-06-11 317 TP_printk("%s PCIe Bus Error: severity=%s, %s\n",
0a2409aa Chen, Gong 2014-06-11 318 __get_str(dev_name),
0a2409aa Chen, Gong 2014-06-11 319 __entry->severity == AER_CORRECTABLE ? "Corrected" :
0a2409aa Chen, Gong 2014-06-11 320 __entry->severity == AER_FATAL ?
0a2409aa Chen, Gong 2014-06-11 321 "Fatal" : "Uncorrected, non-fatal",
0a2409aa Chen, Gong 2014-06-11 322 __entry->severity == AER_CORRECTABLE ?
0a2409aa Chen, Gong 2014-06-11 323 __print_flags(__entry->status, "|", aer_correctable_errors) :
0a2409aa Chen, Gong 2014-06-11 324 __print_flags(__entry->status, "|", aer_uncorrectable_errors))
0a2409aa Chen, Gong 2014-06-11 325 );
0a2409aa Chen, Gong 2014-06-11 326 :::::: The code at line 298 was first introduced by commit
:::::: 0a2409aad38e97b1db55e6515b990be7b17060f6 trace, AER: Move trace into unified interface
:::::: TO: Chen, Gong <[email protected]>
:::::: CC: Tony Luck <[email protected]>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
PATCH v8 6/7 PCI: Unify wait for link active into generic pci
In reply to Oza PawandeepClients such as pciehp, dpc are using pcie_wait_link_active, which waits till the link becomes active or inactive.
Made generic function and moved it to drivers/pci/pci.c
drivers/pci/hotplug/pciehp_hpc.c +4 -17
@@ -231,25 +231,12 @@ bool pciehp_check_link_active(struct controller *ctrl)return ret; } -static void __pcie_wait_link_active (struct controller *ctrl,bool active) +static bool pcie_wait_link_active (struct controller *ctrl) { -int timeout =1000 ; - -if (pciehp_check_link_active (ctrl) == active) -return ; -while (timeout >0 ) { -msleep (10 ); - timeout -=10 ; -if (pciehp_check_link_active (ctrl) == active) -return ; - } -ctrl_dbg (ctrl,"Data Link Layer Link Active not %s in 1000 msec\n" , - active ?"set" :"cleared" ); -} +struct pci_dev *pdev =ctrl_dev (ctrl); +bool active = true; -static void pcie_wait_link_active (struct controller *ctrl) -{ -__pcie_wait_link_active (ctrl, true); +return pci_wait_for_link (pdev, active); }static bool pci_bus_check_dev (struct pci_bus *bus,int devfn)
drivers/pci/pci.c +35 -0
@@ -4176,6 +4176,41 @@ static int pci_pm_reset(struct pci_dev *dev, int probe)return 0 ; } +/** +* pci__wait_for_link - Wait for link till its active/inactive +* @dev: Bridge device +* @active: waiting for active or inactive ? +* +* Use this to wait till link becomes active or inactive. +*/ + +bool pci_wait_for_link (struct pci_dev *pdev,bool active) +{ +int timeout =1000 ; +bool ret; +u16 lnk_status; + +pcie_capability_read_word (pdev,PCI_EXP_LNKSTA , &lnk_status); + ret = !!(lnk_status &PCI_EXP_LNKSTA_DLLLA ); + +while ((ret != active) && (timeout >0 )) { +msleep (10 ); + timeout -=10 ; +pcie_capability_read_word (pdev,PCI_EXP_LNKSTA , &lnk_status); + ret = !!(lnk_status &PCI_EXP_LNKSTA_DLLLA ); + } + +if (ret == active) +return true; + +dev_printk (KERN_DEBUG , &pdev->dev, +"Data Link Layer Link Active not %s in 1000 msec\n" , + active ?"set" :"cleared" ); + +return false; +} +EXPORT_SYMBOL (pci_wait_for_link); +void pci_reset_secondary_bus (struct pci_dev *dev) {u16 ctrl;
drivers/pci/pcie/pcie-dpc.c +2 -11
@@ -122,19 +122,10 @@ static int dpc_wait_rp_inactive(struct dpc_dev *dpc)static void dpc_wait_link_inactive (struct dpc_dev *dpc) { -unsigned long timeout = jiffies +HZ ;struct pci_dev *pdev = dpc->dev->port; -struct device *dev = &dpc->dev->device; -u16 lnk_status; +bool active = false; -pcie_capability_read_word (pdev,PCI_EXP_LNKSTA , &lnk_status); -while (lnk_status &PCI_EXP_LNKSTA_DLLLA && - !time_after (jiffies, timeout)) { -msleep (10 ); -pcie_capability_read_word (pdev,PCI_EXP_LNKSTA , &lnk_status); - } -if (lnk_status &PCI_EXP_LNKSTA_DLLLA ) -dev_warn (dev,"Link state not disabled for DPC event\n" ); +pci_wait_for_link (pdev, active); }/**
include/linux/pci.h +1 -0
@@ -1195,6 +1195,7 @@ int pci_add_ext_cap_save_buffer(struct pci_dev *dev,int pci_request_selected_regions (struct pci_dev *,int ,const char *);int pci_request_selected_regions_exclusive (struct pci_dev *,int ,const char *);void pci_release_selected_regions (struct pci_dev *,int ); +bool pci_wait_for_link (struct pci_dev *pdev,bool active);/* drivers/pci/bus.c */ struct pci_bus *pci_bus_get (struct pci_bus *bus);
Signature · 2 lines
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc., a Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
kbuild test robot
build botRe: [PATCH v8 6/7] PCI: Unify wait for link active into generic pci
Thank you for the patch! Perhaps something to improve:
Hi Oza,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on pci/next]
[also build test WARNING on v4.16-rc2 next-20180221]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Oza-Pawandeep/Address-error-and-recovery-for-AER-and-DPC/20180222-060518 base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next reproduce: make htmldocs
All warnings (new ones prefixed by >>):
WARNING: convert(1) not found, for SVG to PDF conversion install ImageMagick (https://www.imagemagick.org)
include/linux/crypto.h:477: warning: Function parameter or member 'cra_u.ablkcipher' not described in 'crypto_alg' include/linux/crypto.h:477: warning: Function parameter or member 'cra_u.blkcipher' not described in 'crypto_alg' include/linux/crypto.h:477: warning: Function parameter or member 'cra_u.cipher' not described in 'crypto_alg' include/linux/crypto.h:477: warning: Function parameter or member 'cra_u.compress' not described in 'crypto_alg' include/net/cfg80211.h:4129: warning: Function parameter or member 'wext.ibss' not described in 'wireless_dev' include/net/cfg80211.h:4129: warning: Function parameter or member 'wext.connect' not described in 'wireless_dev' include/net/cfg80211.h:4129: warning: Function parameter or member 'wext.keys' not described in 'wireless_dev' include/net/cfg80211.h:4129: warning: Function parameter or member 'wext.ie' not described in 'wireless_dev' include/net/cfg80211.h:4129: warning: Function parameter or member 'wext.ie_len' not described in 'wireless_dev' include/net/cfg80211.h:4129: warning: Function parameter or member 'wext.bssid' not described in 'wireless_dev' include/net/cfg80211.h:4129: warning: Function parameter or member 'wext.prev_bssid' not described in 'wireless_dev' include/net/cfg80211.h:4129: warning: Function parameter or member 'wext.ssid' not described in 'wireless_dev' include/net/cfg80211.h:4129: warning: Function parameter or member 'wext.default_key' not described in 'wireless_dev' include/net/cfg80211.h:4129: warning: Function parameter or member 'wext.default_mgmt_key' not described in 'wireless_dev' include/net/cfg80211.h:4129: warning: Function parameter or member 'wext.prev_bssid_valid' not described in 'wireless_dev' include/net/mac80211.h:2259: warning: Function parameter or member 'radiotap_timestamp.units_pos' not described in 'ieee80211_hw' include/net/mac80211.h:2259: warning: Function parameter or member 'radiotap_timestamp.accuracy' not described in 'ieee80211_hw' include/net/mac80211.h:950: warning: Function parameter or member 'rates' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'control.rts_cts_rate_idx' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'control.use_rts' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'control.use_cts_prot' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'control.short_preamble' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'control.skip_table' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'control.jiffies' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'control.vif' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'control.hw_key' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'control.flags' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'control.enqueue_time' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'ack' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'ack.cookie' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'status.rates' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'status.ack_signal' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'status.ampdu_ack_len' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'status.ampdu_len' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'status.antenna' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'status.tx_time' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'status_driver_data' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'driver_rates' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'pad' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'rate_driver_data' not described in 'ieee80211_tx_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'rx_stats_avg' not described in 'sta_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'rx_stats_avg.signal' not described in 'sta_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'rx_stats_avg.chain_signal' not described in 'sta_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'status_stats.filtered' not described in 'sta_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'status_stats.retry_failed' not described in 'sta_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'status_stats.retry_count' not described in 'sta_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'status_stats.lost_packets' not described in 'sta_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'status_stats.last_tdls_pkt_time' not described in 'sta_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'msdu_retries' not described in 'sta_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'msdu_failed' not described in 'sta_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'status_stats.last_ack' not described in 'sta_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'tx_stats.packets' not described in 'sta_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'tx_stats.bytes' not described in 'sta_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'tx_stats.last_rate' not described in 'sta_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'msdu' not described in 'sta_info' include/linux/dma-buf.h:307: warning: Function parameter or member 'cb_excl.cb' not described in 'dma_buf' include/linux/dma-buf.h:307: warning: Function parameter or member 'cb_excl.poll' not described in 'dma_buf' include/linux/dma-buf.h:307: warning: Function parameter or member 'cb_excl.active' not described in 'dma_buf' include/linux/dma-buf.h:307: warning: Function parameter or member 'cb_shared.cb' not described in 'dma_buf' include/linux/dma-buf.h:307: warning: Function parameter or member 'cb_shared.poll' not described in 'dma_buf' include/linux/dma-buf.h:307: warning: Function parameter or member 'cb_shared.active' not described in 'dma_buf' include/linux/dma-fence-array.h:54: warning: Function parameter or member 'work' not described in 'dma_fence_array' include/linux/gpio/driver.h:142: warning: Function parameter or member 'request_key' not described in 'gpio_irq_chip' include/linux/iio/iio.h:270: warning: Function parameter or member 'scan_type.sign' not described in 'iio_chan_spec' include/linux/iio/iio.h:270: warning: Function parameter or member 'scan_type.realbits' not described in 'iio_chan_spec' include/linux/iio/iio.h:270: warning: Function parameter or member 'scan_type.storagebits' not described in 'iio_chan_spec' include/linux/iio/iio.h:270: warning: Function parameter or member 'scan_type.shift' not described in 'iio_chan_spec' include/linux/iio/iio.h:270: warning: Function parameter or member 'scan_type.repeat' not described in 'iio_chan_spec' include/linux/iio/iio.h:270: warning: Function parameter or member 'scan_type.endianness' not described in 'iio_chan_spec' include/linux/iio/hw-consumer.h:1: warning: no structured comments found
include/linux/device.h:294: warning: Function parameter or member 'coredump' not described in 'device_driver' include/linux/input/sparse-keymap.h:46: warning: Function parameter or member 'sw' not described in 'key_entry' include/linux/mtd/rawnand.h:709: warning: Function parameter or member 'timings.sdr' not described in 'nand_data_interface' include/linux/mtd/rawnand.h:774: warning: Function parameter or member 'buf' not described in 'nand_op_data_instr' include/linux/mtd/rawnand.h:774: warning: Function parameter or member 'buf.in' not described in 'nand_op_data_instr' include/linux/mtd/rawnand.h:774: warning: Function parameter or member 'buf.out' not described in 'nand_op_data_instr' include/linux/mtd/rawnand.h:820: warning: Function parameter or member 'ctx' not described in 'nand_op_instr' include/linux/mtd/rawnand.h:820: warning: Function parameter or member 'ctx.cmd' not described in 'nand_op_instr' include/linux/mtd/rawnand.h:820: warning: Function parameter or member 'ctx.addr' not described in 'nand_op_instr' include/linux/mtd/rawnand.h:820: warning: Function parameter or member 'ctx.data' not described in 'nand_op_instr' include/linux/mtd/rawnand.h:820: warning: Function parameter or member 'ctx.waitrdy' not described in 'nand_op_instr' include/linux/mtd/rawnand.h:967: warning: Function parameter or member 'ctx' not described in 'nand_op_parser_pattern_elem' include/linux/mtd/rawnand.h:967: warning: Function parameter or member 'ctx.addr' not described in 'nand_op_parser_pattern_elem' include/linux/mtd/rawnand.h:967: warning: Function parameter or member 'ctx.data' not described in 'nand_op_parser_pattern_elem' include/linux/mtd/rawnand.h:1281: warning: Function parameter or member 'manufacturer.desc' not described in 'nand_chip' include/linux/mtd/rawnand.h:1281: warning: Function parameter or member 'manufacturer.priv' not described in 'nand_chip'
>> drivers/pci/pci.c:4189: warning: Function parameter or member 'pdev' not described in 'pci_wait_for_link'
drivers/pci/pci.c:4189: warning: Excess function parameter 'dev' description in 'pci_wait_for_link' include/linux/regulator/driver.h:221: warning: Function parameter or member 'resume_early' not described in 'regulator_ops' drivers/regulator/core.c:4299: warning: Excess function parameter 'state' description in 'regulator_suspend_late' arch/s390/include/asm/cio.h:245: warning: Function parameter or member 'esw.esw0' not described in 'irb' arch/s390/include/asm/cio.h:245: warning: Function parameter or member 'esw.esw1' not described in 'irb' arch/s390/include/asm/cio.h:245: warning: Function parameter or member 'esw.esw2' not described in 'irb' arch/s390/include/asm/cio.h:245: warning: Function parameter or member 'esw.esw3' not described in 'irb' arch/s390/include/asm/cio.h:245: warning: Function parameter or member 'esw.eadm' not described in 'irb' include/drm/drm_drv.h:609: warning: Function parameter or member 'gem_prime_pin' not described in 'drm_driver' include/drm/drm_drv.h:609: warning: Function parameter or member 'gem_prime_unpin' not described in 'drm_driver' include/drm/drm_drv.h:609: warning: Function parameter or member 'gem_prime_res_obj' not described in 'drm_driver' include/drm/drm_drv.h:609: warning: Function parameter or member 'gem_prime_get_sg_table' not described in 'drm_driver' include/drm/drm_drv.h:609: warning: Function parameter or member 'gem_prime_import_sg_table' not described in 'drm_driver' include/drm/drm_drv.h:609: warning: Function parameter or member 'gem_prime_vmap' not described in 'drm_driver' include/drm/drm_drv.h:609: warning: Function parameter or member 'gem_prime_vunmap' not described in 'drm_driver' include/drm/drm_drv.h:609: warning: Function parameter or member 'gem_prime_mmap' not described in 'drm_driver' include/drm/drm_connector.h:370: warning: Function parameter or member 'margins.left' not described in 'drm_tv_connector_state' include/drm/drm_connector.h:370: warning: Function parameter or member 'margins.right' not described in 'drm_tv_connector_state' include/drm/drm_connector.h:370: warning: Function parameter or member 'margins.top' not described in 'drm_tv_connector_state' include/drm/drm_connector.h:370: warning: Function parameter or member 'margins.bottom' not described in 'drm_tv_connector_state' include/drm/drm_vblank.h:63: warning: Function parameter or member 'event.base' not described in 'drm_pending_vblank_event' include/drm/drm_vblank.h:63: warning: Function parameter or member 'event.vbl' not described in 'drm_pending_vblank_event' include/drm/drm_vblank.h:63: warning: Function parameter or member 'event.seq' not described in 'drm_pending_vblank_event' drivers/gpu/drm/tve200/tve200_drv.c:1: warning: no structured comments found
include/linux/skbuff.h:846: warning: Function parameter or member 'dev_scratch' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'skb_mstamp' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member '__cloned_offset' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'head_frag' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member '__unused' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member '__pkt_type_offset' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'pfmemalloc' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'encapsulation' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'encap_hdr_csum' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'csum_valid' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'csum_complete_sw' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'csum_level' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'inner_protocol_type' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'remcsum_offload' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'offload_fwd_mark' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'offload_mr_fwd_mark' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'sender_cpu' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'reserved_tailroom' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'inner_ipproto' not described in 'sk_buff' include/net/sock.h:234: warning: Function parameter or member 'skc_addrpair' not described in 'sock_common' include/net/sock.h:234: warning: Function parameter or member 'skc_portpair' not described in 'sock_common' include/net/sock.h:234: warning: Function parameter or member 'skc_ipv6only' not described in 'sock_common' include/net/sock.h:234: warning: Function parameter or member 'skc_net_refcnt' not described in 'sock_common' include/net/sock.h:234: warning: Function parameter or member 'skc_v6_daddr' not described in 'sock_common' include/net/sock.h:234: warning: Function parameter or member 'skc_v6_rcv_saddr' not described in 'sock_common' include/net/sock.h:234: warning: Function parameter or member 'skc_cookie' not described in 'sock_common' include/net/sock.h:234: warning: Function parameter or member 'skc_listener' not described in 'sock_common' include/net/sock.h:234: warning: Function parameter or member 'skc_tw_dr' not described in 'sock_common' include/net/sock.h:234: warning: Function parameter or member 'skc_rcv_wnd' not described in 'sock_common' include/net/sock.h:234: warning: Function parameter or member 'skc_tw_rcv_nxt' not described in 'sock_common' include/net/sock.h:487: warning: Function parameter or member 'sk_backlog.rmem_alloc' not described in 'sock' include/net/sock.h:487: warning: Function parameter or member 'sk_backlog.len' not described in 'sock'
include/net/sock.h:487: warning: Function parameter or member 'sk_backlog.head' not described in 'sock'
include/net/sock.h:487: warning: Function parameter or member 'sk_backlog.tail' not described in 'sock'
include/net/sock.h:487: warning: Function parameter or member 'sk_wq_raw' not described in 'sock'
include/net/sock.h:487: warning: Function parameter or member 'tcp_rtx_queue' not described in 'sock' include/linux/netdevice.h:1940: warning: Function parameter or member 'adj_list.upper' not described in 'net_device' include/linux/netdevice.h:1940: warning: Function parameter or member 'adj_list.lower' not described in 'net_device' include/linux/netdevice.h:1940: warning: Function parameter or member 'gso_partial_features' not described in 'net_device' include/linux/netdevice.h:1940: warning: Function parameter or member 'switchdev_ops' not described in 'net_device' include/linux/netdevice.h:1940: warning: Function parameter or member 'l3mdev_ops' not described in 'net_device' include/linux/netdevice.h:1940: warning: Function parameter or member 'xfrmdev_ops' not described in 'net_device' include/linux/netdevice.h:1940: warning: Function parameter or member 'name_assign_type' not described in 'net_device' include/linux/netdevice.h:1940: warning: Function parameter or member 'ieee802154_ptr' not described in 'net_device' include/linux/netdevice.h:1940: warning: Function parameter or member 'mpls_ptr' not described in 'net_device' include/linux/netdevice.h:1940: warning: Function parameter or member 'xdp_prog' not described in 'net_device' include/linux/netdevice.h:1940: warning: Function parameter or member 'gro_flush_timeout' not described in 'net_device' include/linux/netdevice.h:1940: warning: Function parameter or member 'nf_hooks_ingress' not described in 'net_device' include/linux/netdevice.h:1940: warning: Function parameter or member '____cacheline_aligned_in_smp' not described in 'net_device' include/linux/netdevice.h:1940: warning: Function parameter or member 'qdisc_hash' not described in 'net_device' include/linux/phylink.h:56: warning: Function parameter or member '__ETHTOOL_DECLARE_LINK_MODE_MASK(advertising' not described in 'phylink_link_state' include/linux/phylink.h:56: warning: Function parameter or member '__ETHTOOL_DECLARE_LINK_MODE_MASK(lp_advertising' not described in 'phylink_link_state' include/linux/rcupdate.h:570: ERROR: Unexpected indentation.
include/linux/rcupdate.h:574: ERROR: Unexpected indentation.
include/linux/rcupdate.h:578: WARNING: Block quote ends without a blank line; unexpected unindent. include/linux/rcupdate.h:580: WARNING: Block quote ends without a blank line; unexpected unindent. include/linux/rcupdate.h:580: WARNING: Inline literal start-string without end-string.
kernel/time/timer.c:1259: ERROR: Unexpected indentation.
kernel/time/timer.c:1261: ERROR: Unexpected indentation.
kernel/time/timer.c:1262: WARNING: Block quote ends without a blank line; unexpected unindent.
include/linux/wait.h:110: WARNING: Block quote ends without a blank line; unexpected unindent.
include/linux/wait.h:113: ERROR: Unexpected indentation.
include/linux/wait.h:115: WARNING: Block quote ends without a blank line; unexpected unindent.
kernel/time/hrtimer.c:1113: WARNING: Block quote ends without a blank line; unexpected unindent.
kernel/signal.c:327: WARNING: Inline literal start-string without end-string.
drivers/video/fbdev/core/modedb.c:647: WARNING: Inline strong start-string without end-string. drivers/video/fbdev/core/modedb.c:647: WARNING: Inline strong start-string without end-string. drivers/video/fbdev/core/modedb.c:647: WARNING: Inline strong start-string without end-string. drivers/video/fbdev/core/modedb.c:647: WARNING: Inline strong start-string without end-string.
include/linux/iio/iio.h:191: ERROR: Unexpected indentation.
include/linux/iio/iio.h:192: WARNING: Block quote ends without a blank line; unexpected unindent.
include/linux/iio/iio.h:198: WARNING: Definition list ends without a blank line; unexpected unindent. drivers/ata/libata-core.c:5920: ERROR: Unknown target name: "hw".
drivers/message/fusion/mptbase.c:5052: WARNING: Definition list ends without a blank line; unexpected unindent. drivers/tty/serial/serial_core.c:1901: WARNING: Definition list ends without a blank line; unexpected unindent. include/linux/mtd/rawnand.h:805: ERROR: Unexpected indentation.
vim +4189 drivers/pci/pci.c
4178
4179 /**
4180 * pci__wait_for_link - Wait for link till its active/inactive
4181 * @dev: Bridge device
4182 * @active: waiting for active or inactive ?
4183 *
4184 * Use this to wait till link becomes active or inactive.
4185 */
4186
4187 bool pci_wait_for_link(struct pci_dev *pdev, bool active)
4188 {
> 4189 int timeout = 1000;
4190 bool ret;
4191 u16 lnk_status;
4192
4193 pcie_capability_read_word(pdev, PCI_EXP_LNKSTA, &lnk_status);
4194 ret = !!(lnk_status & PCI_EXP_LNKSTA_DLLLA);
4195
4196 while ((ret != active) && (timeout > 0)) {
4197 msleep(10);
4198 timeout -= 10;
4199 pcie_capability_read_word(pdev, PCI_EXP_LNKSTA, &lnk_status);
4200 ret = !!(lnk_status & PCI_EXP_LNKSTA_DLLLA);
4201 }
4202
4203 if (ret == active)
4204 return true;
4205
4206 dev_printk(KERN_DEBUG, &pdev->dev,
4207 "Data Link Layer Link Active not %s in 1000 msec\n",
4208 active ? "set" : "cleared");
4209
4210 return false;
4211 }
4212 EXPORT_SYMBOL(pci_wait_for_link);
4213
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
PATCH v8 7/7 PCI/DPC: Enumerate the devices after DPC trigger event
In reply to Oza PawandeepImplement error_resume callback in DPC so, after DPC trigger event enumerates the devices beneath.
drivers/pci/pcie/pcie-dpc.c +18 -0
@@ -129,6 +129,23 @@ static void dpc_wait_link_inactive(struct dpc_dev *dpc) }/** +* dpc_error_resume - enumerate the devices beneath +* @dev: pointer to Root Port's pci_dev data structure +* +* Invoked by Port Bus driver during nonfatal recovery. +*/ +static void dpc_error_resume (struct pci_dev *pdev) +{ +bool active = true; + +if (pci_wait_for_link (pdev, active)) { +pci_lock_rescan_remove (); +pci_rescan_bus (pdev->bus); +pci_unlock_rescan_remove (); + } +} + +/** * dpc_reset_link - reset link DPC routine * @dev: pointer to Root Port's pci_dev data structure *
@@ -366,6 +383,7 @@ static void dpc_remove(struct pcie_device *dev) .service = PCIE_PORT_SERVICE_DPC, .probe = dpc_probe, .remove = dpc_remove, + .error_resume = dpc_error_resume, .reset_link = dpc_reset_link, };
drivers/pci/pcie/pcie-err.c +20 -5
@@ -236,6 +236,7 @@ static pci_ers_result_t reset_link(struct pci_dev *dev, int severity)* @state: error state * @error_mesg: message to print * @cb: callback to be broadcasted +* @severity: error severity * * Invoked during error recovery process. Once being invoked, the content * of error severity will be broadcasted to all downstream drivers in a
@@ -244,7 +245,8 @@ static pci_ers_result_t reset_link(struct pci_dev *dev, int severity)static pci_ers_result_t broadcast_error_message (struct pci_dev *dev,enum pci_channel_state state,char *error_mesg, -int (*cb)(struct pci_dev *,void *)) +int (*cb)(struct pci_dev *,void *), +int severity) {struct aer_broadcast_data result_data;
@@ -256,6 +258,15 @@ static pci_ers_result_t broadcast_error_message(struct pci_dev *dev, result_data.result =PCI_ERS_RESULT_RECOVERED ;if (dev->hdr_type ==PCI_HEADER_TYPE_BRIDGE ) { +/* If DPC is triggered, call resume error hanlder +* because, at this point we can safely assume that +* link recovery has happened. +*/ +if ((severity ==DPC_FATAL ) && + (cb == report_resume)) { +cb (dev,NULL ); +return PCI_ERS_RESULT_RECOVERED ; + }/* * If the error is reported by a bridge, we think this error * is related to the downstream link of the bridge, so we
@@ -305,7 +316,8 @@ void pci_do_recovery(struct pci_dev *dev, int severity) status =broadcast_error_message (dev, state,"error_detected" , - report_error_detected); + report_error_detected, + severity);if ((severity ==AER_FATAL ) || (severity ==DPC_FATAL )) {
@@ -321,7 +333,8 @@ void pci_do_recovery(struct pci_dev *dev, int severity) status =broadcast_error_message (dev, state,"mmio_enabled" , - report_mmio_enabled); + report_mmio_enabled, + severity);if (status ==PCI_ERS_RESULT_NEED_RESET ) {/*
@@ -332,7 +345,8 @@ void pci_do_recovery(struct pci_dev *dev, int severity) status =broadcast_error_message (dev, state,"slot_reset" , - report_slot_reset); + report_slot_reset, + severity); }if (status !=PCI_ERS_RESULT_RECOVERED )
@@ -342,7 +356,8 @@ void pci_do_recovery(struct pci_dev *dev, int severity)broadcast_error_message (dev, state,"resume" , - report_resume); + report_resume, + severity);dev_info (&dev->dev,"Device recovery successful\n" );mutex_unlock (&pci_err_recovery_lock);
Signature · 2 lines
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc., a Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.