Commit c42ff65d authored by Johannes Berg's avatar Johannes Berg Committed by Luca Coelho

iwlwifi: pcie: add MSI-X interrupt tracing

We have tracing for both pre-ICT and ICT interrupts, including all
the data read there. Extend the tracing to MSI-X interrupts.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent e6835942
/****************************************************************************** /******************************************************************************
* *
* Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2016 Intel Deutschland GmbH * Copyright(c) 2016-2017 Intel Deutschland GmbH
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as * under the terms of version 2 of the GNU General Public License as
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#define __IWLWIFI_DEVICE_TRACE_IO #define __IWLWIFI_DEVICE_TRACE_IO
#include <linux/tracepoint.h> #include <linux/tracepoint.h>
#include <linux/pci.h>
#undef TRACE_SYSTEM #undef TRACE_SYSTEM
#define TRACE_SYSTEM iwlwifi_io #define TRACE_SYSTEM iwlwifi_io
...@@ -165,6 +166,29 @@ TRACE_EVENT(iwlwifi_dev_irq, ...@@ -165,6 +166,29 @@ TRACE_EVENT(iwlwifi_dev_irq,
TP_printk("%d", 0) TP_printk("%d", 0)
); );
TRACE_EVENT(iwlwifi_dev_irq_msix,
TP_PROTO(const struct device *dev, struct msix_entry *msix_entry,
bool defirq, u32 inta_fh, u32 inta_hw),
TP_ARGS(dev, msix_entry, defirq, inta_fh, inta_hw),
TP_STRUCT__entry(
DEV_ENTRY
__field(u32, entry)
__field(u8, defirq)
__field(u32, inta_fh)
__field(u32, inta_hw)
),
TP_fast_assign(
DEV_ASSIGN;
__entry->entry = msix_entry->entry;
__entry->defirq = defirq;
__entry->inta_fh = inta_fh;
__entry->inta_hw = inta_hw;
),
TP_printk("entry:%d defirq:%d fh:0x%x, hw:0x%x",
__entry->entry, __entry->defirq,
__entry->inta_fh, __entry->inta_hw)
);
TRACE_EVENT(iwlwifi_dev_ict_read, TRACE_EVENT(iwlwifi_dev_ict_read,
TP_PROTO(const struct device *dev, u32 index, u32 value), TP_PROTO(const struct device *dev, u32 index, u32 value),
TP_ARGS(dev, index, value), TP_ARGS(dev, index, value),
......
...@@ -1391,6 +1391,8 @@ irqreturn_t iwl_pcie_irq_rx_msix_handler(int irq, void *dev_id) ...@@ -1391,6 +1391,8 @@ irqreturn_t iwl_pcie_irq_rx_msix_handler(int irq, void *dev_id)
struct iwl_trans_pcie *trans_pcie = iwl_pcie_get_trans_pcie(entry); struct iwl_trans_pcie *trans_pcie = iwl_pcie_get_trans_pcie(entry);
struct iwl_trans *trans = trans_pcie->trans; struct iwl_trans *trans = trans_pcie->trans;
trace_iwlwifi_dev_irq_msix(trans->dev, entry, false, 0, 0);
if (WARN_ON(entry->entry >= trans->num_rx_queues)) if (WARN_ON(entry->entry >= trans->num_rx_queues))
return IRQ_NONE; return IRQ_NONE;
...@@ -1932,6 +1934,8 @@ irqreturn_t iwl_pcie_irq_msix_handler(int irq, void *dev_id) ...@@ -1932,6 +1934,8 @@ irqreturn_t iwl_pcie_irq_msix_handler(int irq, void *dev_id)
iwl_write32(trans, CSR_MSIX_HW_INT_CAUSES_AD, inta_hw); iwl_write32(trans, CSR_MSIX_HW_INT_CAUSES_AD, inta_hw);
spin_unlock(&trans_pcie->irq_lock); spin_unlock(&trans_pcie->irq_lock);
trace_iwlwifi_dev_irq_msix(trans->dev, entry, true, inta_fh, inta_hw);
if (unlikely(!(inta_fh | inta_hw))) { if (unlikely(!(inta_fh | inta_hw))) {
IWL_DEBUG_ISR(trans, "Ignore interrupt, inta == 0\n"); IWL_DEBUG_ISR(trans, "Ignore interrupt, inta == 0\n");
lock_map_release(&trans->sync_cmd_lockdep_map); lock_map_release(&trans->sync_cmd_lockdep_map);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment