* [PATCH v4 0/2] clk: clocking-wizard: add user clock monitor support
@ 2026-02-14 18:10 Harry Austen
2026-02-14 18:10 ` [PATCH v4 1/2] dt-bindings: clock: xilinx: add description of user monitor interrupt Harry Austen
2026-02-14 18:10 ` [PATCH v4 2/2] clk: clocking-wizard: add user clock monitor support Harry Austen
0 siblings, 2 replies; 10+ messages in thread
From: Harry Austen @ 2026-02-14 18:10 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Michal Simek
Cc: Shubhrajyoti Datta, linux-clk, devicetree, linux-kernel,
linux-arm-kernel, Harry Austen
Add support for the clock monitor functionality added in version 6.0 of the
Xilinx clocking wizard IP core, through use of devcoredump.
This is a follow up from a patchset I submitted quite a while ago [1],
where I was attempting to utilise the UIO subsystem instead. Stephen Boyd
suggested use of devcoredump instead [2] and I have finally got round to
giving this a go.
This is currently untested on hardware, so any help testing this would be
much appreciated!
v3 -> v4:
- Patches 1-4,8-9 dropped, as they were submitted/accepted separately [3]
- Patch 7 removed, as no longer creating a new UIO driver
- DT binding patch mostly unchanged. Slight rework and rebase, so removed
Krzysztof's R-b tag just in case
- Clock monitor support patch now reworked to make use of devcoredump
- Rebased on top of clk-next
v2 -> v3:
- Move kernel doc variable comment to bottom in clk_hw transition patch (2)
- Remove extra line (and add Krzysztof's R-b tag) in binding patch (5)
- Add Krzysztof's A-b tag to dynamic reconfig binding patch (8)
v1 -> v2:
- Split and improve clk_hw+devres transition patch (2+3)
- Fix/improve DT binding patches (5+8)
- Utilise auxiliary bus in monitor support patch (6)
- Add dedicated UIO driver for monitor support (7)
[1]: https://lore.kernel.org/linux-clk/20240826123602.1872-1-hpausten@protonmail.com/
[2]: https://lore.kernel.org/linux-clk/1bd17a02bab46391872e4934895b83e8.sboyd@kernel.org/
[3]: https://lore.kernel.org/linux-clk/20240913191037.2690-1-hpausten@protonmail.com/
Harry Austen (2):
dt-bindings: clock: xilinx: add description of user monitor interrupt
clk: clocking-wizard: add user clock monitor support
.../bindings/clock/xlnx,clocking-wizard.yaml | 24 ++++++-
drivers/clk/xilinx/Kconfig | 1 +
drivers/clk/xilinx/clk-xlnx-clock-wizard.c | 69 +++++++++++++++++--
3 files changed, 89 insertions(+), 5 deletions(-)
---
base-commit: ea7282e99ead6d2a294cef40acd2a29ada3ab71d
--
2.53.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v4 1/2] dt-bindings: clock: xilinx: add description of user monitor interrupt
2026-02-14 18:10 [PATCH v4 0/2] clk: clocking-wizard: add user clock monitor support Harry Austen
@ 2026-02-14 18:10 ` Harry Austen
2026-02-14 20:39 ` Krzysztof Kozlowski
2026-02-15 8:45 ` Krzysztof Kozlowski
2026-02-14 18:10 ` [PATCH v4 2/2] clk: clocking-wizard: add user clock monitor support Harry Austen
1 sibling, 2 replies; 10+ messages in thread
From: Harry Austen @ 2026-02-14 18:10 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Michal Simek
Cc: Shubhrajyoti Datta, linux-clk, devicetree, linux-kernel,
linux-arm-kernel, Harry Austen
This Xilinx clocking wizard IP core outputs this interrupt signal to
indicate when one of the four optional user clock inputs is either
stopped, overruns, underruns or glitches.
This functionality was only added from version 6.0 onwards, so restrict
it to particular compatible strings.
Signed-off-by: Harry Austen <hpausten@protonmail.com>
---
v3 -> v4: Slight rework and rebase, removing Krzysztof's R-b tag
v2 -> v3: Add Krzysztof's R-b tag
v1 -> v2: Fix binding errors by moving interrupts up front, restrict later
.../bindings/clock/xlnx,clocking-wizard.yaml | 24 ++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml b/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
index b497c28e8094f..7688601f1f31b 100644
--- a/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
+++ b/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
@@ -38,6 +38,14 @@ properties:
- const: clk_in1
- const: s_axi_aclk
+ interrupts:
+ items:
+ - description: user clock monitor interrupt
+
+ interrupt-names:
+ items:
+ - const: monitor
+
xlnx,static-config:
$ref: /schemas/types.yaml#/definitions/flag
description:
@@ -66,12 +74,24 @@ required:
- xlnx,speed-grade
- xlnx,nr-outputs
+if:
+ properties:
+ compatible:
+ enum:
+ - xlnx,clocking-wizard
+ - xlnx,clocking-wizard-v5.2
+then:
+ properties:
+ interrupts: false
+ interrupt-names: false
+
additionalProperties: false
examples:
- |
+ #include <dt-bindings/interrupt-controller/irq.h>
clock-controller@b0000000 {
- compatible = "xlnx,clocking-wizard";
+ compatible = "xlnx,clocking-wizard-v6.0";
reg = <0xb0000000 0x10000>;
#clock-cells = <1>;
xlnx,static-config;
@@ -79,5 +99,7 @@ examples:
xlnx,nr-outputs = <6>;
clock-names = "clk_in1", "s_axi_aclk";
clocks = <&clkc 15>, <&clkc 15>;
+ interrupts-extended = <&intc 52 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "monitor";
};
...
--
2.53.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v4 2/2] clk: clocking-wizard: add user clock monitor support
2026-02-14 18:10 [PATCH v4 0/2] clk: clocking-wizard: add user clock monitor support Harry Austen
2026-02-14 18:10 ` [PATCH v4 1/2] dt-bindings: clock: xilinx: add description of user monitor interrupt Harry Austen
@ 2026-02-14 18:10 ` Harry Austen
2026-02-19 6:52 ` Dan Carpenter
1 sibling, 1 reply; 10+ messages in thread
From: Harry Austen @ 2026-02-14 18:10 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Michal Simek
Cc: Shubhrajyoti Datta, linux-clk, devicetree, linux-kernel,
linux-arm-kernel, Harry Austen
Xilinx clocking wizard IP core supports monitoring of up to four
optional user clock inputs, with a corresponding interrupt for
notification in change of clock state (stop, underrun, overrun or
glitch). Give userspace access to this monitor logic through use of the
devcoredump framework.
Use presence of the user monitor interrupt description in devicetree to
indicate whether or not this functionality should be enabled. Also, this
functionality is only supported from v6.0 onwards, so add indication of
support to the device match data, in order to be tied to the utilised
compatible string.
All 16 user clock monitor trigger sources are enabled in the IER. When
triggered, the values of the first 5 registers are recorded through
devcoredump.
Signed-off-by: Harry Austen <hpausten@protonmail.com>
---
v3 -> v4: Rework from auxiliary bus and UIO to devcoredump
v2 -> v3: No change
v1 -> v2:
- Remove direct UIO dependency by utilising auxiliary device
- Move some logic from probe into clk_wzrd_setup_monitor for tidiness
drivers/clk/xilinx/Kconfig | 1 +
drivers/clk/xilinx/clk-xlnx-clock-wizard.c | 69 ++++++++++++++++++++--
2 files changed, 66 insertions(+), 4 deletions(-)
diff --git a/drivers/clk/xilinx/Kconfig b/drivers/clk/xilinx/Kconfig
index 051756953558b..37758ac9ab552 100644
--- a/drivers/clk/xilinx/Kconfig
+++ b/drivers/clk/xilinx/Kconfig
@@ -21,6 +21,7 @@ config COMMON_CLK_XLNX_CLKWZRD
tristate "Xilinx Clocking Wizard"
depends on OF
depends on HAS_IOMEM
+ select WANT_DEV_COREDUMP
help
Support for the Xilinx Clocking Wizard IP core clock generator.
Adds support for clocking wizard and compatible.
diff --git a/drivers/clk/xilinx/clk-xlnx-clock-wizard.c b/drivers/clk/xilinx/clk-xlnx-clock-wizard.c
index 4a0136349f71a..f14d1ec80a321 100644
--- a/drivers/clk/xilinx/clk-xlnx-clock-wizard.c
+++ b/drivers/clk/xilinx/clk-xlnx-clock-wizard.c
@@ -12,6 +12,7 @@
#include <linux/platform_device.h>
#include <linux/clk.h>
#include <linux/clk-provider.h>
+#include <linux/devcoredump.h>
#include <linux/slab.h>
#include <linux/io.h>
#include <linux/of.h>
@@ -19,11 +20,15 @@
#include <linux/module.h>
#include <linux/overflow.h>
#include <linux/err.h>
+#include <linux/interrupt.h>
#include <linux/iopoll.h>
#define WZRD_NUM_OUTPUTS 7
#define WZRD_ACLK_MAX_FREQ 250000000UL
+#define WZRD_NUM_DUMP_REGS 5
+#define WZRD_INTR_STATUS 0x0C
+#define WZRD_INTR_ENABLE 0x10
#define WZRD_CLK_CFG_REG(v, n) (0x200 + 0x130 * (v) + 4 * (n))
#define WZRD_CLKOUT0_FRAC_EN BIT(18)
@@ -124,6 +129,7 @@ enum clk_wzrd_int_clks {
/**
* struct clk_wzrd - Clock wizard private data structure
*
+ * @pdev: Platform device
* @nb: Notifier block
* @base: Memory base
* @clk_in1: Handle to input clock 'clk_in1'
@@ -131,9 +137,11 @@ enum clk_wzrd_int_clks {
* @clks_internal: Internal clocks
* @speed_grade: Speed grade of the device
* @suspended: Flag indicating power state of the device
+ * @work: Delayed work for devcoredump
* @clk_data: Output clock data
*/
struct clk_wzrd {
+ struct platform_device *pdev;
struct notifier_block nb;
void __iomem *base;
struct clk *clk_in1;
@@ -141,6 +149,7 @@ struct clk_wzrd {
struct clk_hw *clks_internal[wzrd_clk_int_max];
unsigned int speed_grade;
bool suspended;
+ struct delayed_work work;
struct clk_hw_onecell_data clk_data;
};
@@ -177,8 +186,9 @@ struct clk_wzrd_divider {
spinlock_t *lock; /* divider lock */
};
-struct versal_clk_data {
+struct clk_wzrd_data {
bool is_versal;
+ bool has_monitor;
};
#define to_clk_wzrd(_nb) container_of(_nb, struct clk_wzrd, nb)
@@ -984,8 +994,13 @@ static int __maybe_unused clk_wzrd_resume(struct device *dev)
static SIMPLE_DEV_PM_OPS(clk_wzrd_dev_pm_ops, clk_wzrd_suspend,
clk_wzrd_resume);
-static const struct versal_clk_data versal_data = {
+static const struct clk_wzrd_data version_6_0_data = {
+ .is_versal = false,
+ .has_monitor = true,
+};
+static const struct clk_wzrd_data versal_data = {
.is_versal = true,
+ .has_monitor = true,
};
static int clk_wzrd_register_output_clocks(struct device *dev, int nr_outputs)
@@ -993,7 +1008,7 @@ static int clk_wzrd_register_output_clocks(struct device *dev, int nr_outputs)
const char *clkout_name, *clk_name, *clk_mul_name;
struct clk_wzrd *clk_wzrd = dev_get_drvdata(dev);
u32 regl, regh, edge, regld, reghd, edged, div;
- const struct versal_clk_data *data;
+ const struct clk_wzrd_data *data;
unsigned long flags = 0;
bool is_versal = false;
void __iomem *ctrl_reg;
@@ -1150,14 +1165,45 @@ static int clk_wzrd_register_output_clocks(struct device *dev, int nr_outputs)
return 0;
}
+static irqreturn_t clk_wzrd_user_mon_intr_handler(int irq, void *data)
+{
+ struct clk_wzrd *clk_wzrd = platform_get_drvdata(data);
+
+ schedule_delayed_work(&clk_wzrd->work, msecs_to_jiffies(10));
+ return IRQ_HANDLED;
+}
+
+static void clk_wzrd_user_mon_work(struct work_struct *work)
+{
+ struct clk_wzrd *clk_wzrd = container_of(work, struct clk_wzrd, work.work);
+ u32 *dump = vmalloc(WZRD_NUM_DUMP_REGS * sizeof(*dump));
+
+ ioread32_rep(clk_wzrd->base, dump, WZRD_NUM_DUMP_REGS);
+ dev_coredumpv(&clk_wzrd->pdev->dev, dump, WZRD_NUM_DUMP_REGS * sizeof(*dump), GFP_KERNEL);
+ iowrite32(dump[WZRD_INTR_STATUS / sizeof(*dump)], clk_wzrd->base + WZRD_INTR_STATUS);
+}
+
+static void clk_wzrd_cancel_delayed_work(void *data)
+{
+ struct delayed_work *work = data;
+
+ cancel_delayed_work_sync(work);
+}
+
static int clk_wzrd_probe(struct platform_device *pdev)
{
+ const struct clk_wzrd_data *data = device_get_match_data(&pdev->dev);
struct device_node *np = pdev->dev.of_node;
struct clk_wzrd *clk_wzrd;
unsigned long rate;
int nr_outputs;
+ int irq;
int ret;
+ irq = platform_get_irq_optional(pdev, 0);
+ if (irq < 0 && irq != -ENXIO)
+ return dev_err_probe(&pdev->dev, irq, "failed to get irq\n");
+
ret = of_property_read_u32(np, "xlnx,nr-outputs", &nr_outputs);
if (ret || nr_outputs > WZRD_NUM_OUTPUTS)
return -EINVAL;
@@ -1226,6 +1272,21 @@ static int clk_wzrd_probe(struct platform_device *pdev)
}
}
+ if (data && data->has_monitor && irq > 0) {
+ ret = devm_request_irq(&pdev->dev, irq, clk_wzrd_user_mon_intr_handler, IRQF_SHARED,
+ "user_mon", clk_wzrd);
+ if (ret)
+ return dev_err_probe(&pdev->dev, ret, "failed to request irq\n");
+
+ INIT_DELAYED_WORK(&clk_wzrd->work, clk_wzrd_user_mon_work);
+ ret = devm_add_action_or_reset(&pdev->dev, clk_wzrd_cancel_delayed_work,
+ &clk_wzrd->work);
+ if (ret)
+ return ret;
+
+ writel(GENMASK(15, 0), clk_wzrd->base + WZRD_INTR_ENABLE);
+ }
+
return 0;
}
@@ -1233,7 +1294,7 @@ static const struct of_device_id clk_wzrd_ids[] = {
{ .compatible = "xlnx,versal-clk-wizard", .data = &versal_data },
{ .compatible = "xlnx,clocking-wizard" },
{ .compatible = "xlnx,clocking-wizard-v5.2" },
- { .compatible = "xlnx,clocking-wizard-v6.0" },
+ { .compatible = "xlnx,clocking-wizard-v6.0", .data = &version_6_0_data },
{ },
};
MODULE_DEVICE_TABLE(of, clk_wzrd_ids);
--
2.53.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v4 1/2] dt-bindings: clock: xilinx: add description of user monitor interrupt
2026-02-14 18:10 ` [PATCH v4 1/2] dt-bindings: clock: xilinx: add description of user monitor interrupt Harry Austen
@ 2026-02-14 20:39 ` Krzysztof Kozlowski
2026-02-14 20:57 ` Harry Austen
2026-02-15 8:45 ` Krzysztof Kozlowski
1 sibling, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-14 20:39 UTC (permalink / raw)
To: Harry Austen
Cc: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Michal Simek, Shubhrajyoti Datta, linux-clk,
devicetree, linux-kernel, linux-arm-kernel
On Sat, Feb 14, 2026 at 06:10:16PM +0000, Harry Austen wrote:
> This Xilinx clocking wizard IP core outputs this interrupt signal to
> indicate when one of the four optional user clock inputs is either
> stopped, overruns, underruns or glitches.
>
> This functionality was only added from version 6.0 onwards, so restrict
> it to particular compatible strings.
>
> Signed-off-by: Harry Austen <hpausten@protonmail.com>
> ---
> v3 -> v4: Slight rework and rebase, removing Krzysztof's R-b tag
What exactly changed that you removed the tag? Rebase is not a reason.
You MUST be here specific about the reason, otherwise why would I like
to review if next time any rebase and slight rework will drop my tag?
> v2 -> v3: Add Krzysztof's R-b tag
> v1 -> v2: Fix binding errors by moving interrupts up front, restrict later
>
> .../bindings/clock/xlnx,clocking-wizard.yaml | 24 ++++++++++++++++++-
> 1 file changed, 23 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml b/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
> index b497c28e8094f..7688601f1f31b 100644
> --- a/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
> +++ b/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
> @@ -38,6 +38,14 @@ properties:
> - const: clk_in1
> - const: s_axi_aclk
>
> + interrupts:
> + items:
> + - description: user clock monitor interrupt
> +
> + interrupt-names:
> + items:
> + - const: monitor
> +
> xlnx,static-config:
> $ref: /schemas/types.yaml#/definitions/flag
> description:
> @@ -66,12 +74,24 @@ required:
> - xlnx,speed-grade
> - xlnx,nr-outputs
>
> +if:
Why isn't this in allOf? Code is fine, but why changing it?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v4 1/2] dt-bindings: clock: xilinx: add description of user monitor interrupt
2026-02-14 20:39 ` Krzysztof Kozlowski
@ 2026-02-14 20:57 ` Harry Austen
2026-02-14 20:59 ` Krzysztof Kozlowski
0 siblings, 1 reply; 10+ messages in thread
From: Harry Austen @ 2026-02-14 20:57 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Michal Simek, Shubhrajyoti Datta, linux-clk,
devicetree, linux-kernel, linux-arm-kernel
On Saturday, 14 February 2026 at 20:40, Krzysztof Kozlowski <krzk@kernel.org> wrote:
> On Sat, Feb 14, 2026 at 06:10:16PM +0000, Harry Austen wrote:
> > This Xilinx clocking wizard IP core outputs this interrupt signal to
> > indicate when one of the four optional user clock inputs is either
> > stopped, overruns, underruns or glitches.
> >
> > This functionality was only added from version 6.0 onwards, so restrict
> > it to particular compatible strings.
> >
> > Signed-off-by: Harry Austen <hpausten@protonmail.com>
> > ---
> > v3 -> v4: Slight rework and rebase, removing Krzysztof's R-b tag
>
> What exactly changed that you removed the tag? Rebase is not a reason.
> You MUST be here specific about the reason, otherwise why would I like
> to review if next time any rebase and slight rework will drop my tag?
Sorry, good point. By _rework_ I mean that I have removed the allOf. I will
be more specific next time.
>
>
> > v2 -> v3: Add Krzysztof's R-b tag
> > v1 -> v2: Fix binding errors by moving interrupts up front, restrict later
> >
> > .../bindings/clock/xlnx,clocking-wizard.yaml | 24 ++++++++++++++++++-
> > 1 file changed, 23 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml b/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
> > index b497c28e8094f..7688601f1f31b 100644
> > --- a/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
> > +++ b/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
> > @@ -38,6 +38,14 @@ properties:
> > - const: clk_in1
> > - const: s_axi_aclk
> >
> > + interrupts:
> > + items:
> > + - description: user clock monitor interrupt
> > +
> > + interrupt-names:
> > + items:
> > + - const: monitor
> > +
> > xlnx,static-config:
> > $ref: /schemas/types.yaml#/definitions/flag
> > description:
> > @@ -66,12 +74,24 @@ required:
> > - xlnx,speed-grade
> > - xlnx,nr-outputs
> >
> > +if:
>
> Why isn't this in allOf? Code is fine, but why changing it?
There is only a single if condition, so the allOf is not required. Removed
for simplicity and reduced indentation.
>
> Best regards,
> Krzysztof
>
>
Thanks for the review!
Harry
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v4 1/2] dt-bindings: clock: xilinx: add description of user monitor interrupt
2026-02-14 20:57 ` Harry Austen
@ 2026-02-14 20:59 ` Krzysztof Kozlowski
2026-02-14 21:09 ` Harry Austen
0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-14 20:59 UTC (permalink / raw)
To: Harry Austen
Cc: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Michal Simek, Shubhrajyoti Datta, linux-clk,
devicetree, linux-kernel, linux-arm-kernel
On 14/02/2026 21:57, Harry Austen wrote:
>>>
>>> + interrupts:
>>> + items:
>>> + - description: user clock monitor interrupt
>>> +
>>> + interrupt-names:
>>> + items:
>>> + - const: monitor
>>> +
>>> xlnx,static-config:
>>> $ref: /schemas/types.yaml#/definitions/flag
>>> description:
>>> @@ -66,12 +74,24 @@ required:
>>> - xlnx,speed-grade
>>> - xlnx,nr-outputs
>>>
>>> +if:
>>
>> Why isn't this in allOf? Code is fine, but why changing it?
>
> There is only a single if condition, so the allOf is not required. Removed
> for simplicity and reduced indentation.
>
Heh, you might need to add it soon re-indenting everything on adding
just one more if, so for me that was wrong choice. And you got a review :/
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v4 1/2] dt-bindings: clock: xilinx: add description of user monitor interrupt
2026-02-14 20:59 ` Krzysztof Kozlowski
@ 2026-02-14 21:09 ` Harry Austen
0 siblings, 0 replies; 10+ messages in thread
From: Harry Austen @ 2026-02-14 21:09 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Michal Simek, Shubhrajyoti Datta, linux-clk,
devicetree, linux-kernel, linux-arm-kernel
On Saturday, 14 February 2026 at 20:59, Krzysztof Kozlowski <krzk@kernel.org> wrote:
> On 14/02/2026 21:57, Harry Austen wrote:
> >>>
> >>> + interrupts:
> >>> + items:
> >>> + - description: user clock monitor interrupt
> >>> +
> >>> + interrupt-names:
> >>> + items:
> >>> + - const: monitor
> >>> +
> >>> xlnx,static-config:
> >>> $ref: /schemas/types.yaml#/definitions/flag
> >>> description:
> >>> @@ -66,12 +74,24 @@ required:
> >>> - xlnx,speed-grade
> >>> - xlnx,nr-outputs
> >>>
> >>> +if:
> >>
> >> Why isn't this in allOf? Code is fine, but why changing it?
> >
> > There is only a single if condition, so the allOf is not required. Removed
> > for simplicity and reduced indentation.
> >
>
> Heh, you might need to add it soon re-indenting everything on adding
> just one more if, so for me that was wrong choice. And you got a review :/
Very fair points. Agreed, it was definitely the wrong thing to do. Not sure
what I was thinking. Do you think it is okay as is, or would you like me to
add the allOf back again?
>
> Best regards,
> Krzysztof
>
Thanks again,
Harry
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v4 1/2] dt-bindings: clock: xilinx: add description of user monitor interrupt
2026-02-14 18:10 ` [PATCH v4 1/2] dt-bindings: clock: xilinx: add description of user monitor interrupt Harry Austen
2026-02-14 20:39 ` Krzysztof Kozlowski
@ 2026-02-15 8:45 ` Krzysztof Kozlowski
1 sibling, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-15 8:45 UTC (permalink / raw)
To: Harry Austen, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Michal Simek
Cc: Shubhrajyoti Datta, linux-clk, devicetree, linux-kernel,
linux-arm-kernel
On 14/02/2026 19:10, Harry Austen wrote:
> This Xilinx clocking wizard IP core outputs this interrupt signal to
> indicate when one of the four optional user clock inputs is either
> stopped, overruns, underruns or glitches.
>
> This functionality was only added from version 6.0 onwards, so restrict
> it to particular compatible strings.
>
> Signed-off-by: Harry Austen <hpausten@protonmail.com>
> ---
> v3 -> v4: Slight rework and rebase, removing Krzysztof's R-b tag
> v2 -> v3: Add Krzysztof's R-b tag
> v1 -> v2: Fix binding errors by moving interrupts up front, restrict later
>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v4 2/2] clk: clocking-wizard: add user clock monitor support
2026-02-14 18:10 ` [PATCH v4 2/2] clk: clocking-wizard: add user clock monitor support Harry Austen
@ 2026-02-19 6:52 ` Dan Carpenter
2026-02-20 14:33 ` Harry Austen
0 siblings, 1 reply; 10+ messages in thread
From: Dan Carpenter @ 2026-02-19 6:52 UTC (permalink / raw)
To: oe-kbuild, Harry Austen, Michael Turquette, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Michal Simek
Cc: lkp, oe-kbuild-all, Shubhrajyoti Datta, linux-clk, devicetree,
linux-kernel, linux-arm-kernel, Harry Austen
Hi Harry,
kernel test robot noticed the following build warnings:
url: https://github.com/intel-lab-lkp/linux/commits/Harry-Austen/dt-bindings-clock-xilinx-add-description-of-user-monitor-interrupt/20260215-021554
base: ea7282e99ead6d2a294cef40acd2a29ada3ab71d
patch link: https://lore.kernel.org/r/20260214180933.42143-3-hpausten%40protonmail.com
patch subject: [PATCH v4 2/2] clk: clocking-wizard: add user clock monitor support
config: microblaze-randconfig-r072-20260215 (https://download.01.org/0day-ci/archive/20260215/202602151704.qepyfVlc-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 14.3.0
smatch version: v0.5.0-8994-gd50c5a4c
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202602151704.qepyfVlc-lkp@intel.com/
smatch warnings:
drivers/clk/xilinx/clk-xlnx-clock-wizard.c:1183 clk_wzrd_user_mon_work() error: dereferencing freed memory 'dump' (line 1182)
vim +/dump +1183 drivers/clk/xilinx/clk-xlnx-clock-wizard.c
68614f228e6cbe Harry Austen 2026-02-14 1176 static void clk_wzrd_user_mon_work(struct work_struct *work)
68614f228e6cbe Harry Austen 2026-02-14 1177 {
68614f228e6cbe Harry Austen 2026-02-14 1178 struct clk_wzrd *clk_wzrd = container_of(work, struct clk_wzrd, work.work);
68614f228e6cbe Harry Austen 2026-02-14 1179 u32 *dump = vmalloc(WZRD_NUM_DUMP_REGS * sizeof(*dump));
68614f228e6cbe Harry Austen 2026-02-14 1180
68614f228e6cbe Harry Austen 2026-02-14 1181 ioread32_rep(clk_wzrd->base, dump, WZRD_NUM_DUMP_REGS);
68614f228e6cbe Harry Austen 2026-02-14 @1182 dev_coredumpv(&clk_wzrd->pdev->dev, dump, WZRD_NUM_DUMP_REGS * sizeof(*dump), GFP_KERNEL);
68614f228e6cbe Harry Austen 2026-02-14 @1183 iowrite32(dump[WZRD_INTR_STATUS / sizeof(*dump)], clk_wzrd->base + WZRD_INTR_STATUS);
^^^^
dev_coredumpv() can free dump.
68614f228e6cbe Harry Austen 2026-02-14 1184 }
68614f228e6cbe Harry Austen 2026-02-14 1185
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v4 2/2] clk: clocking-wizard: add user clock monitor support
2026-02-19 6:52 ` Dan Carpenter
@ 2026-02-20 14:33 ` Harry Austen
0 siblings, 0 replies; 10+ messages in thread
From: Harry Austen @ 2026-02-20 14:33 UTC (permalink / raw)
To: Dan Carpenter, oe-kbuild, Harry Austen, Michael Turquette,
Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Michal Simek
Cc: lkp, oe-kbuild-all, Shubhrajyoti Datta, linux-clk, devicetree,
linux-kernel, linux-arm-kernel
On Thu Feb 19, 2026 at 6:52 AM GMT, Dan Carpenter wrote:
> Hi Harry,
>
> kernel test robot noticed the following build warnings:
>
> url: https://github.com/intel-lab-lkp/linux/commits/Harry-Austen/dt-bindings-clock-xilinx-add-description-of-user-monitor-interrupt/20260215-021554
> base: ea7282e99ead6d2a294cef40acd2a29ada3ab71d
> patch link: https://lore.kernel.org/r/20260214180933.42143-3-hpausten%40protonmail.com
> patch subject: [PATCH v4 2/2] clk: clocking-wizard: add user clock monitor support
> config: microblaze-randconfig-r072-20260215 (https://download.01.org/0day-ci/archive/20260215/202602151704.qepyfVlc-lkp@intel.com/config)
> compiler: microblaze-linux-gcc (GCC) 14.3.0
> smatch version: v0.5.0-8994-gd50c5a4c
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> | Closes: https://lore.kernel.org/r/202602151704.qepyfVlc-lkp@intel.com/
>
> smatch warnings:
> drivers/clk/xilinx/clk-xlnx-clock-wizard.c:1183 clk_wzrd_user_mon_work() error: dereferencing freed memory 'dump' (line 1182)
>
> vim +/dump +1183 drivers/clk/xilinx/clk-xlnx-clock-wizard.c
>
> 68614f228e6cbe Harry Austen 2026-02-14 1176 static void clk_wzrd_user_mon_work(struct work_struct *work)
> 68614f228e6cbe Harry Austen 2026-02-14 1177 {
> 68614f228e6cbe Harry Austen 2026-02-14 1178 struct clk_wzrd *clk_wzrd = container_of(work, struct clk_wzrd, work.work);
> 68614f228e6cbe Harry Austen 2026-02-14 1179 u32 *dump = vmalloc(WZRD_NUM_DUMP_REGS * sizeof(*dump));
> 68614f228e6cbe Harry Austen 2026-02-14 1180
> 68614f228e6cbe Harry Austen 2026-02-14 1181 ioread32_rep(clk_wzrd->base, dump, WZRD_NUM_DUMP_REGS);
> 68614f228e6cbe Harry Austen 2026-02-14 @1182 dev_coredumpv(&clk_wzrd->pdev->dev, dump, WZRD_NUM_DUMP_REGS * sizeof(*dump), GFP_KERNEL);
> 68614f228e6cbe Harry Austen 2026-02-14 @1183 iowrite32(dump[WZRD_INTR_STATUS / sizeof(*dump)], clk_wzrd->base + WZRD_INTR_STATUS);
> ^^^^
> dev_coredumpv() can free dump.
Whoops. That makes total sense. Pretty sure this can be easily resolved by moving the
dev_coredumpv call after iowrite32. Will do in next patch version.
>
> 68614f228e6cbe Harry Austen 2026-02-14 1184 }
> 68614f228e6cbe Harry Austen 2026-02-14 1185
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
Thanks for the report!
Harry
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2026-02-20 14:33 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-14 18:10 [PATCH v4 0/2] clk: clocking-wizard: add user clock monitor support Harry Austen
2026-02-14 18:10 ` [PATCH v4 1/2] dt-bindings: clock: xilinx: add description of user monitor interrupt Harry Austen
2026-02-14 20:39 ` Krzysztof Kozlowski
2026-02-14 20:57 ` Harry Austen
2026-02-14 20:59 ` Krzysztof Kozlowski
2026-02-14 21:09 ` Harry Austen
2026-02-15 8:45 ` Krzysztof Kozlowski
2026-02-14 18:10 ` [PATCH v4 2/2] clk: clocking-wizard: add user clock monitor support Harry Austen
2026-02-19 6:52 ` Dan Carpenter
2026-02-20 14:33 ` Harry Austen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox