Commit a3f657ec authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau

mt76: move dev_irq tracepoint in mt76 module

Move dev_irq tracepoint in common code in order to be reused by mt7603
and mt7615 drivers
Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent c388d858
// SPDX-License-Identifier: ISC
#include "mt7603.h"
#include "../trace.h"
void mt7603_rx_poll_complete(struct mt76_dev *mdev, enum mt76_rxq_id q)
{
......@@ -20,6 +21,8 @@ irqreturn_t mt7603_irq_handler(int irq, void *dev_instance)
if (!test_bit(MT76_STATE_INITIALIZED, &dev->mphy.state))
return IRQ_NONE;
trace_dev_irq(&dev->mt76, intr, dev->mt76.mmio.irqmask);
intr &= dev->mt76.mmio.irqmask;
if (intr & MT_INT_MAC_IRQ3) {
......
......@@ -11,6 +11,7 @@
#include "mt7615.h"
#include "mac.h"
#include "../trace.h"
static const struct pci_device_id mt7615_pci_device_table[] = {
{ PCI_DEVICE(0x14c3, 0x7615) },
......@@ -46,6 +47,8 @@ static irqreturn_t mt7615_irq_handler(int irq, void *dev_instance)
if (!test_bit(MT76_STATE_INITIALIZED, &dev->mphy.state))
return IRQ_NONE;
trace_dev_irq(&dev->mt76, intr, dev->mt76.mmio.irqmask);
intr &= dev->mt76.mmio.irqmask;
if (intr & MT_INT_TX_DONE_ALL) {
......
......@@ -9,7 +9,7 @@
#include "mt76x02.h"
#include "mt76x02_mcu.h"
#include "mt76x02_trace.h"
#include "trace.h"
static void mt76x02_pre_tbtt_tasklet(unsigned long arg)
{
......@@ -271,7 +271,7 @@ irqreturn_t mt76x02_irq_handler(int irq, void *dev_instance)
if (!test_bit(MT76_STATE_INITIALIZED, &dev->mphy.state))
return IRQ_NONE;
trace_dev_irq(dev, intr, dev->mt76.mmio.irqmask);
trace_dev_irq(&dev->mt76, intr, dev->mt76.mmio.irqmask);
intr &= dev->mt76.mmio.irqmask;
......
......@@ -100,29 +100,6 @@ TRACE_EVENT(mac_txstat_fetch,
)
);
TRACE_EVENT(dev_irq,
TP_PROTO(struct mt76x02_dev *dev, u32 val, u32 mask),
TP_ARGS(dev, val, mask),
TP_STRUCT__entry(
DEV_ENTRY
__field(u32, val)
__field(u32, mask)
),
TP_fast_assign(
DEV_ASSIGN;
__entry->val = val;
__entry->mask = mask;
),
TP_printk(
DEV_PR_FMT " %08x & %08x",
DEV_PR_ARG, __entry->val, __entry->mask
)
);
#endif
#undef TRACE_INCLUDE_PATH
......
......@@ -9,4 +9,6 @@
#define CREATE_TRACE_POINTS
#include "trace.h"
EXPORT_TRACEPOINT_SYMBOL_GPL(dev_irq);
#endif
......@@ -51,6 +51,29 @@ DEFINE_EVENT(dev_reg_evt, reg_wr,
TP_ARGS(dev, reg, val)
);
TRACE_EVENT(dev_irq,
TP_PROTO(struct mt76_dev *dev, u32 val, u32 mask),
TP_ARGS(dev, val, mask),
TP_STRUCT__entry(
DEV_ENTRY
__field(u32, val)
__field(u32, mask)
),
TP_fast_assign(
DEV_ASSIGN;
__entry->val = val;
__entry->mask = mask;
),
TP_printk(
DEV_PR_FMT " %08x & %08x",
DEV_PR_ARG, __entry->val, __entry->mask
)
);
#endif
#undef TRACE_INCLUDE_PATH
......
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