<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/clk/.kunitconfig, branch master</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>clk: Disable KUNIT_UML_PCI</title>
<updated>2026-02-03T00:42:07+00:00</updated>
<author>
<name>Peng Fan</name>
<email>peng.fan@nxp.com</email>
</author>
<published>2025-12-22T07:06:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b079e4e628c8866340cafedca9f7451dfc8fa263'/>
<id>b079e4e628c8866340cafedca9f7451dfc8fa263</id>
<content type='text'>
commit 031cdd3bc3f3 ("kunit: Enable PCI on UML without triggering WARN()")
enables KUNIT_UML_PCI, but clk driver could not work with it.
Deselect KUNIT_UML_PCI to avoid the failure. Dump as below:
WARNING: CPU: 0 PID: 227 at lib/logic_iomem.c:141 __raw_readl+0xac/0xe0
CPU: 0 UID: 0 PID: 227 Comm: kunit_try_catch Tainted: G
Tainted: [N]=TEST
Stack:
 a0883d00 00000001 00000000 ffffff00
 603ef142 60044832 6002598b 00000000
 00000000 600211b3 00000001 00000000
Call Trace:
 [&lt;6032534c&gt;] ? __raw_readl+0xac/0xe0
 [&lt;60044832&gt;] ? dump_stack_lvl+0x57/0x73
 [&lt;6002598b&gt;] ? _printk+0x0/0x61
 [&lt;600211b3&gt;] ? __warn.cold+0x61/0xeb
 [&lt;600212cc&gt;] ? warn_slowpath_fmt+0x8f/0x9c
 [&lt;6002123d&gt;] ? warn_slowpath_fmt+0x0/0x9c
 [&lt;6032534c&gt;] ? __raw_readl+0xac/0xe0
 [&lt;6002123d&gt;] ? warn_slowpath_fmt+0x0/0x9c
 [&lt;6029e2ad&gt;] ? clk_gate_endisable+0xcd/0x110
 [&lt;6029e315&gt;] ? clk_gate_enable+0x15/0x20
 [&lt;6028795e&gt;] ? clk_core_enable+0x6e/0xf0
 [&lt;60289f1f&gt;] ? clk_enable+0x4f/0xa0
 [&lt;602a06af&gt;] ? clk_gate_test_enable+0xbf/0x360
 [&lt;60053df9&gt;] ? os_nsecs+0x29/0x40
 [&lt;600cd300&gt;] ? ktime_get_ts64+0x0/0x130
 [&lt;600816c0&gt;] ? to_kthread+0x0/0x50
 [&lt;602507bb&gt;] ? kunit_try_run_case+0x7b/0x100
 [&lt;600816c0&gt;] ? to_kthread+0x0/0x50
 [&lt;60252aa0&gt;] ? kunit_generic_run_threadfn_adapter+0x0/0x30
 [&lt;60252ab2&gt;] ? kunit_generic_run_threadfn_adapter+0x12/0x30
 [&lt;60082091&gt;] ? kthread+0xf1/0x270
 [&lt;60047591&gt;] ? new_thread_handler+0x41/0x60
---[ end trace 0000000000000000 ]---

Reviewed-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 031cdd3bc3f3 ("kunit: Enable PCI on UML without triggering WARN()")
enables KUNIT_UML_PCI, but clk driver could not work with it.
Deselect KUNIT_UML_PCI to avoid the failure. Dump as below:
WARNING: CPU: 0 PID: 227 at lib/logic_iomem.c:141 __raw_readl+0xac/0xe0
CPU: 0 UID: 0 PID: 227 Comm: kunit_try_catch Tainted: G
Tainted: [N]=TEST
Stack:
 a0883d00 00000001 00000000 ffffff00
 603ef142 60044832 6002598b 00000000
 00000000 600211b3 00000001 00000000
Call Trace:
 [&lt;6032534c&gt;] ? __raw_readl+0xac/0xe0
 [&lt;60044832&gt;] ? dump_stack_lvl+0x57/0x73
 [&lt;6002598b&gt;] ? _printk+0x0/0x61
 [&lt;600211b3&gt;] ? __warn.cold+0x61/0xeb
 [&lt;600212cc&gt;] ? warn_slowpath_fmt+0x8f/0x9c
 [&lt;6002123d&gt;] ? warn_slowpath_fmt+0x0/0x9c
 [&lt;6032534c&gt;] ? __raw_readl+0xac/0xe0
 [&lt;6002123d&gt;] ? warn_slowpath_fmt+0x0/0x9c
 [&lt;6029e2ad&gt;] ? clk_gate_endisable+0xcd/0x110
 [&lt;6029e315&gt;] ? clk_gate_enable+0x15/0x20
 [&lt;6028795e&gt;] ? clk_core_enable+0x6e/0xf0
 [&lt;60289f1f&gt;] ? clk_enable+0x4f/0xa0
 [&lt;602a06af&gt;] ? clk_gate_test_enable+0xbf/0x360
 [&lt;60053df9&gt;] ? os_nsecs+0x29/0x40
 [&lt;600cd300&gt;] ? ktime_get_ts64+0x0/0x130
 [&lt;600816c0&gt;] ? to_kthread+0x0/0x50
 [&lt;602507bb&gt;] ? kunit_try_run_case+0x7b/0x100
 [&lt;600816c0&gt;] ? to_kthread+0x0/0x50
 [&lt;60252aa0&gt;] ? kunit_generic_run_threadfn_adapter+0x0/0x30
 [&lt;60252ab2&gt;] ? kunit_generic_run_threadfn_adapter+0x12/0x30
 [&lt;60082091&gt;] ? kthread+0xf1/0x270
 [&lt;60047591&gt;] ? new_thread_handler+0x41/0x60
---[ end trace 0000000000000000 ]---

Reviewed-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: Allow kunit tests to run without OF_OVERLAY enabled</title>
<updated>2024-10-22T21:09:20+00:00</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@kernel.org</email>
</author>
<published>2024-10-16T21:27:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=94e6fdd028a12ff2abe7d915f8b6bbdb923cc04d'/>
<id>94e6fdd028a12ff2abe7d915f8b6bbdb923cc04d</id>
<content type='text'>
Some configurations want to enable CONFIG_KUNIT without enabling
CONFIG_OF_OVERLAY. The kunit overlay code already skips if
CONFIG_OF_OVERLAY isn't enabled, so these selects here aren't really
doing anything besides making it easier to run the tests without them
skipping. Remove the select and move the config setting to the
drivers/clk/.kunitconfig file so that the clk tests can be run with or
without CONFIG_OF_OVERLAY set to test either behavior.

Fixes: 5776526beb95 ("clk: Add KUnit tests for clk fixed rate basic type")
Fixes: 274aff8711b2 ("clk: Add KUnit tests for clks registered with struct clk_parent_data")
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Link: https://lore.kernel.org/r/20241016212738.897691-1-sboyd@kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some configurations want to enable CONFIG_KUNIT without enabling
CONFIG_OF_OVERLAY. The kunit overlay code already skips if
CONFIG_OF_OVERLAY isn't enabled, so these selects here aren't really
doing anything besides making it easier to run the tests without them
skipping. Remove the select and move the config setting to the
drivers/clk/.kunitconfig file so that the clk tests can be run with or
without CONFIG_OF_OVERLAY set to test either behavior.

Fixes: 5776526beb95 ("clk: Add KUnit tests for clk fixed rate basic type")
Fixes: 274aff8711b2 ("clk: Add KUnit tests for clks registered with struct clk_parent_data")
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Link: https://lore.kernel.org/r/20241016212738.897691-1-sboyd@kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: Add KUnit tests for clk fixed rate basic type</title>
<updated>2024-07-29T22:33:13+00:00</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@kernel.org</email>
</author>
<published>2024-07-18T21:05:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5776526beb9513a6593250f742cbc634b17711eb'/>
<id>5776526beb9513a6593250f742cbc634b17711eb</id>
<content type='text'>
Test that the fixed rate basic type clk works as intended.

Cc: Brendan Higgins &lt;brendan.higgins@linux.dev&gt;
Cc: David Gow &lt;davidgow@google.com&gt;
Cc: Rae Moar &lt;rmoar@google.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Link: https://lore.kernel.org/r/20240718210513.3801024-8-sboyd@kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Test that the fixed rate basic type clk works as intended.

Cc: Brendan Higgins &lt;brendan.higgins@linux.dev&gt;
Cc: David Gow &lt;davidgow@google.com&gt;
Cc: Rae Moar &lt;rmoar@google.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Link: https://lore.kernel.org/r/20240718210513.3801024-8-sboyd@kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: fractional-divider: tests: Add test suite for edge cases</title>
<updated>2023-10-12T22:05:00+00:00</updated>
<author>
<name>Frank Oltmanns</name>
<email>frank@oltmanns.dev</email>
</author>
<published>2023-06-17T13:10:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2790e2a33aa9e0710354aaabce8ae1a92925348f'/>
<id>2790e2a33aa9e0710354aaabce8ae1a92925348f</id>
<content type='text'>
In light of the recent discovery that the fractional divisor
approximation does not utilize the full available range for clocks that
are flagged CLK_FRAC_DIVIDER_ZERO_BASED [1], implement tests for the
edge cases of this clock type.

Signed-off-by: Frank Oltmanns &lt;frank@oltmanns.dev&gt;
Link: https://lore.kernel.org/lkml/20230529133433.56215-1-frank@oltmanns.dev [1]
Link: https://lore.kernel.org/r/20230617131041.18313-3-frank@oltmanns.dev
[sboyd@kernel.org: Rename suite and tests slightly, drop unused
includes, store parent rate to compare instead of repeating equation]
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In light of the recent discovery that the fractional divisor
approximation does not utilize the full available range for clocks that
are flagged CLK_FRAC_DIVIDER_ZERO_BASED [1], implement tests for the
edge cases of this clock type.

Signed-off-by: Frank Oltmanns &lt;frank@oltmanns.dev&gt;
Link: https://lore.kernel.org/lkml/20230529133433.56215-1-frank@oltmanns.dev [1]
Link: https://lore.kernel.org/r/20230617131041.18313-3-frank@oltmanns.dev
[sboyd@kernel.org: Rename suite and tests slightly, drop unused
includes, store parent rate to compare instead of repeating equation]
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: explicitly disable CONFIG_UML_PCI_OVER_VIRTIO in .kunitconfig</title>
<updated>2022-07-14T16:35:44+00:00</updated>
<author>
<name>Daniel Latypov</name>
<email>dlatypov@google.com</email>
</author>
<published>2022-07-11T16:27:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f84a9e9658337e5a8407819971c79fd97bb7d408'/>
<id>f84a9e9658337e5a8407819971c79fd97bb7d408</id>
<content type='text'>
CONFIG_UML_PCI_OVER_VIRTIO=y is needed to enable CONFIG_PCI=y on UML.
However, this causes test failures when running the clk tests, i.e.
$ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/clk

A snippet of the particular error is:
&gt;     ok 1 - clk_gate_test_parent_rate
&gt; ------------[ cut here ]------------
&gt; WARNING: CPU: 0 PID: 45 at lib/logic_iomem.c:141 __raw_readl+0x9f/0xd0

This is triggered by this cast in the test:
   143          ctx-&gt;fake_mem = (void __force __iomem *)&amp;ctx-&gt;fake_reg;
this seems to work except when logic iomem is enabled, i.e.
CONFIG_INDIRECT_IOMEM=y.

As a short-term fix, explicitly disable CONFIG_UML_PCI_OVER_VIRTIO in
drivers/clk/.kunitconfig so we can enable it for everyone else by
default in kunit.py.

The long-term fix probably requires something more complicated, like
  #ifdef CONFIG_INDIRECT_IOMEM
    logic_iomem_add_region(...);
  #endif

Signed-off-by: Daniel Latypov &lt;dlatypov@google.com&gt;
Reported-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Tested-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Acked-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Reviewed-by: David Gow &lt;davidgow@google.com&gt;
Acked-by: Brendan Higgins &lt;brendanhiggins@google.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
CONFIG_UML_PCI_OVER_VIRTIO=y is needed to enable CONFIG_PCI=y on UML.
However, this causes test failures when running the clk tests, i.e.
$ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/clk

A snippet of the particular error is:
&gt;     ok 1 - clk_gate_test_parent_rate
&gt; ------------[ cut here ]------------
&gt; WARNING: CPU: 0 PID: 45 at lib/logic_iomem.c:141 __raw_readl+0x9f/0xd0

This is triggered by this cast in the test:
   143          ctx-&gt;fake_mem = (void __force __iomem *)&amp;ctx-&gt;fake_reg;
this seems to work except when logic iomem is enabled, i.e.
CONFIG_INDIRECT_IOMEM=y.

As a short-term fix, explicitly disable CONFIG_UML_PCI_OVER_VIRTIO in
drivers/clk/.kunitconfig so we can enable it for everyone else by
default in kunit.py.

The long-term fix probably requires something more complicated, like
  #ifdef CONFIG_INDIRECT_IOMEM
    logic_iomem_add_region(...);
  #endif

Signed-off-by: Daniel Latypov &lt;dlatypov@google.com&gt;
Reported-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Tested-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Acked-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Reviewed-by: David Gow &lt;davidgow@google.com&gt;
Acked-by: Brendan Higgins &lt;brendanhiggins@google.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: Introduce Kunit Tests for the framework</title>
<updated>2022-03-12T03:14:38+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime@cerno.tech</email>
</author>
<published>2022-02-25T14:35:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=723d0530d9d778cdceab4ebd0d0efc2d3a021c3c'/>
<id>723d0530d9d778cdceab4ebd0d0efc2d3a021c3c</id>
<content type='text'>
Let's test various parts of the rate-related clock API with the kunit
testing framework.

Cc: kunit-dev@googlegroups.com
Tested-by: Daniel Latypov &lt;dlatypov@google.com&gt;
Suggested-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Link: https://lore.kernel.org/r/20220225143534.405820-3-maxime@cerno.tech
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Let's test various parts of the rate-related clock API with the kunit
testing framework.

Cc: kunit-dev@googlegroups.com
Tested-by: Daniel Latypov &lt;dlatypov@google.com&gt;
Suggested-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Link: https://lore.kernel.org/r/20220225143534.405820-3-maxime@cerno.tech
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: gate: Add some kunit test suites</title>
<updated>2022-01-25T01:22:53+00:00</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@kernel.org</email>
</author>
<published>2022-01-20T17:59:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a992acbb219a74fb025f8c2d65760fe05e775c7b'/>
<id>a992acbb219a74fb025f8c2d65760fe05e775c7b</id>
<content type='text'>
Test various parts of the clk gate implementation with the kunit testing
framework.

Reviewed-by: Brendan Higgins &lt;brendanhiggins@google.com&gt;
Acked-by: Daniel Latypov &lt;dlatypov@google.com&gt;
Cc: &lt;kunit-dev@googlegroups.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Link: https://lore.kernel.org/r/20220120175902.2165958-1-sboyd@kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Test various parts of the clk gate implementation with the kunit testing
framework.

Reviewed-by: Brendan Higgins &lt;brendanhiggins@google.com&gt;
Acked-by: Daniel Latypov &lt;dlatypov@google.com&gt;
Cc: &lt;kunit-dev@googlegroups.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Link: https://lore.kernel.org/r/20220120175902.2165958-1-sboyd@kernel.org
</pre>
</div>
</content>
</entry>
</feed>
