From: Lina Iyer <ilina@codeaurora.org>
To: tglx@linutronix.de, jason@lakedaemon.net, marc.zyngier@arm.com
Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
sboyd@codeaurora.org, rnayak@codeaurora.org,
asathyak@codeaurora.org, Lina Iyer <ilina@codeaurora.org>,
Steven Rostedt <rostedt@goodmis.org>
Subject: [PATCH RFC v2 3/3] drivers: irqchip: pdc: log PDC info in FTRACE
Date: Fri, 2 Feb 2018 07:22:00 -0700 [thread overview]
Message-ID: <20180202142200.6229-4-ilina@codeaurora.org> (raw)
In-Reply-To: <20180202142200.6229-1-ilina@codeaurora.org>
From: Archana Sathyakumar <asathyak@codeaurora.org>
Log key PDC pin configuration in FTRACE.
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
---
drivers/irqchip/qcom-pdc.c | 7 ++++++
include/trace/events/pdc.h | 55 ++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 62 insertions(+)
create mode 100644 include/trace/events/pdc.h
diff --git a/drivers/irqchip/qcom-pdc.c b/drivers/irqchip/qcom-pdc.c
index a392380eada6..7f177ad88713 100644
--- a/drivers/irqchip/qcom-pdc.c
+++ b/drivers/irqchip/qcom-pdc.c
@@ -26,6 +26,8 @@
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/types.h>
+#define CREATE_TRACE_POINTS
+#include "trace/events/pdc.h"
#define PDC_MAX_IRQS 126
@@ -68,6 +70,8 @@ static inline void pdc_enable_intr(struct irq_data *d, bool on)
enable = on ? ENABLE_INTR(enable, mask) : CLEAR_INTR(enable, mask);
pdc_reg_write(IRQ_ENABLE_BANK, index, enable);
spin_unlock_irqrestore(&pdc_lock, flags);
+
+ trace_irq_pin_config(PDC_ENTRY, pin_out, (u64)d->chip_data, 0, on);
}
static void qcom_pdc_gic_mask(struct irq_data *d)
@@ -149,6 +153,9 @@ static int qcom_pdc_gic_set_type(struct irq_data *d, unsigned int type)
pdc_reg_write(IRQ_i_CFG, pin_out, pdc_type);
+ trace_irq_pin_config(PDC_TYPE_CONFIG, pin_out, (u64)d->chip_data,
+ pdc_type, 0);
+
return irq_chip_set_type_parent(d, type);
}
diff --git a/include/trace/events/pdc.h b/include/trace/events/pdc.h
new file mode 100644
index 000000000000..0e894bbc9e85
--- /dev/null
+++ b/include/trace/events/pdc.h
@@ -0,0 +1,55 @@
+/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM pdc
+
+#if !defined(_TRACE_PDC_) || defined(TRACE_HEADER_MULTI_READ)
+#define _TRACE_PDC_H_
+
+#include <linux/tracepoint.h>
+
+#define PDC_ENTRY 1
+#define PDC_TYPE_CONFIG 2
+
+TRACE_EVENT(irq_pin_config,
+
+ TP_PROTO(u32 func, int pin, u64 hwirq, u32 type, u32 enable),
+
+ TP_ARGS(func, pin, hwirq, type, enable),
+
+ TP_STRUCT__entry(
+ __field(u32, func)
+ __field(int, pin)
+ __field(u64, hwirq)
+ __field(u32, type)
+ __field(u32, enable)
+ ),
+
+ TP_fast_assign(
+ __entry->func = func;
+ __entry->pin = pin;
+ __entry->hwirq = hwirq;
+ __entry->type = type;
+ __entry->enable = enable;
+ ),
+
+ TP_printk("%s hwirq:%lu pin:%d type:%u enable:%u",
+ print_symbolic(__entry->func,
+ { PDC_ENTRY, "pdc_entry" },
+ { PDC_TYPE_CONFIG, "pdc_type_config" }),
+ __entry->pin, __entry->hwirq, __entry->type, __entry->enable)
+);
+
+#endif
+#define TRACE_INCLUDE_FILE pdc
+#include <trace/define_trace.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2018-02-02 14:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-02 14:21 [PATCH RFC v2 0/3] irqchip: qcom: add support for PDC interrupt controller Lina Iyer
2018-02-02 14:21 ` [PATCH RFC v2 1/3] drivers: irqchip: pdc: Add PDC interrupt controller for QCOM SoCs Lina Iyer
2018-02-02 14:58 ` Marc Zyngier
2018-02-02 16:40 ` Lina Iyer
2018-02-02 15:37 ` Thomas Gleixner
2018-02-02 16:41 ` Lina Iyer
[not found] ` <20180202142200.6229-1-ilina-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-02-02 14:21 ` [PATCH RFC v2 2/3] dt-bindings/interrupt-controller: pdc: descibe PDC device binding Lina Iyer
2018-02-02 16:28 ` Marc Zyngier
[not found] ` <396cfc2f-7deb-0c93-7178-d9f5524f110e-5wv7dgnIgG8@public.gmane.org>
2018-02-02 16:46 ` Lina Iyer
2018-02-02 17:02 ` Marc Zyngier
2018-02-02 14:22 ` Lina Iyer [this message]
2018-02-02 15:57 ` [PATCH RFC v2 3/3] drivers: irqchip: pdc: log PDC info in FTRACE Thomas Gleixner
2018-02-02 23:02 ` Lina Iyer
2018-02-05 15:18 ` Lina Iyer
2018-02-05 16:57 ` Steven Rostedt
2018-02-02 16:32 ` Steven Rostedt
2018-02-02 22:53 ` Lina Iyer
2018-02-05 15:50 ` Lina Iyer
2018-02-05 17:00 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180202142200.6229-4-ilina@codeaurora.org \
--to=ilina@codeaurora.org \
--cc=asathyak@codeaurora.org \
--cc=jason@lakedaemon.net \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=rnayak@codeaurora.org \
--cc=rostedt@goodmis.org \
--cc=sboyd@codeaurora.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).