On Sat, Feb 8, 2025 at 11:32 AM Josh Poimboeuf wrote:
>
> On Sat, Feb 08, 2025 at 07:47:12AM -0800, Alexei Starovoitov wrote:
> > On Fri, Feb 7, 2025 at 10:42 PM Yafang Shao wrote:
> > >
> > > On Fri, Feb 7, 2025 at 2:01 AM Song Liu wrote:
> > > >
> > > > On Wed, Feb 5, 2025 at 6:55 PM Yafang Sh
Extract a private header and convert the prime_numbers self-test to a
KUnit test. I considered parameterizing the test using
`KUNIT_CASE_PARAM` but didn't see how it was possible since the test
logic is entangled with the test parameter generation logic.
Signed-off-by: Tamir Duberstein
---
lib/K
This Makefile has been dead code since it was added in commit
7fcc9b53216c ("lib/math: Add int_pow test suite"); the tests worked
because of the duplicated rules in the parent directory's Makefile. Wire
up tests/Makefile and remove the duplication.
Fixes: 7fcc9b53216c ("lib/math: Add int_pow test
:50:19] Testing complete. Ran 1 tests: failed: 1
Signed-off-by: Tamir Duberstein
---
Changes in v5:
- Rebase against mm/mm-everything.
- Correctly EXPORT_SYMBOL(with_primes).
- Link to v4:
https://lore.kernel.org/r/20250208-prime_numbers-kunit-convert-v4-0-76e36bca0...@gmail.com
Apologies for the
Fixed misspelling.
Signed-off-by: Eric Salem
---
tools/testing/selftests/mm/uffd-common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/mm/uffd-common.c
b/tools/testing/selftests/mm/uffd-common.c
index 717539eddf98..f23c57d9d1bd 100644
--- a/tools/t
Extract a private header and convert the prime_numbers self-test to a
KUnit test. I considered parameterizing the test using
`KUNIT_CASE_PARAM` but didn't see how it was possible since the test
logic is entangled with the test parameter generation logic.
Signed-off-by: Tamir Duberstein
---
lib/K
This Makefile has been dead code since it was added in commit
7fcc9b53216c ("lib/math: Add int_pow test suite"); the tests worked
because of the duplicated rules in the parent directory's Makefile. Wire
up tests/Makefile and remove the duplication.
Fixes: 7fcc9b53216c ("lib/math: Add int_pow test
:50:19] Testing complete. Ran 1 tests: failed: 1
Signed-off-by: Tamir Duberstein
---
Changes in v4:
- Use `#if IS_ENABLED` to handle `CONFIG_PRIME_NUMBERS_KUNIT_TEST=m`.
(Andrew Morton)
- Link to v3:
https://lore.kernel.org/r/20250208-prime_numbers-kunit-convert-v3-0-8ffd5816d...@gmail.com
On Sat, Feb 8, 2025 at 7:25 PM Andrew Morton wrote:
>
> On Sat, 08 Feb 2025 17:52:28 -0500 Tamir Duberstein wrote:
>
> > This is a clear example of a unit test.
> >
> > I tested this using:
> >
> > $ tools/testing/kunit/kunit.py run --arch arm64 --make_options LLVM=1
> > math-prime_numbers
> >
>
On Sat, 08 Feb 2025 17:52:28 -0500 Tamir Duberstein wrote:
> This is a clear example of a unit test.
>
> I tested this using:
>
> $ tools/testing/kunit/kunit.py run --arch arm64 --make_options LLVM=1
> math-prime_numbers
>
> On success:
> ; [08:51:41] == math-prime_numbers (1 subt
This Makefile has been dead code since it was added in commit
7fcc9b53216c ("lib/math: Add int_pow test suite"); the tests worked
because of the duplicated rules in the parent directory's Makefile. Wire
up tests/Makefile and remove the duplication.
Fixes: 7fcc9b53216c ("lib/math: Add int_pow test
Extract a private header and convert the prime_numbers self-test to a
KUnit test. I considered parameterizing the test using
`KUNIT_CASE_PARAM` but didn't see how it was possible since the test
logic is entangled with the test parameter generation logic.
Signed-off-by: Tamir Duberstein
---
lib/K
:50:19] Testing complete. Ran 1 tests: failed: 1
Signed-off-by: Tamir Duberstein
---
Changes in v3:
- Remove `selftest_max` again; snuck into v2.
- Restore `#include `.
- Sending v3 early because kernel test robot is sad.
- Link to v2:
https://lore.kernel.org/r/20250208-prime_numbers-kunit-convert
Hi Tamir,
kernel test robot noticed the following build errors:
[auto build test ERROR on 2014c95afecee3e76ca4a56956a936e23283f05b]
url:
https://github.com/intel-lab-lkp/linux/commits/Tamir-Duberstein/lib-math-Hook-up-tests-Makefile/20250208-220040
base
Hi Tamir,
kernel test robot noticed the following build errors:
[auto build test ERROR on 2014c95afecee3e76ca4a56956a936e23283f05b]
url:
https://github.com/intel-lab-lkp/linux/commits/Tamir-Duberstein/lib-math-Hook-up-tests-Makefile/20250208-220040
base
On 2025-02-02 23:45:51, Luca Weiss wrote:
> Configure the MDSS nodes for the phone and add the panel node.
>
> Signed-off-by: Luca Weiss
Glad to hear (and see in real life) that you're able to use the 1:1:1 topology
patches.
Reviewed-by: Marijn Suijten
Thanks!
> ---
> arch/arm64/boot/dts/qc
Hi Tamir,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 2014c95afecee3e76ca4a56956a936e23283f05b]
url:
https://github.com/intel-lab-lkp/linux/commits/Tamir-Duberstein/lib-math-Hook-up-tests-Makefile/20250208-220040
base
In the Pine64 PinePhone, the stk3310 chip is powered by a regulator that
is disabled at system boot and can be shut off during suspend. To ensure
that the chip properly initializes, both after boot and suspend, we need
to manage this regulator.
Additionally if the chip is shut off in suspend, we n
stk3310 and stk3311 are typically connected to power supplies for the
chip (vdd) and the infrared LED (leda). Add properties so we can power
these up / down appropriately.
Signed-off-by: Aren Moynihan
Reviewed-by: Krzysztof Kozlowski
---
Notes:
Changes in v2:
- add leda-supply
- a
Using devm callbacks helps to make the ordering of probe / remove
operations easier to reason about and removes some duplicate code
between the probe error path and driver remove.
Signed-off-by: Aren Moynihan
---
Notes:
Changes in v4:
- also replace mutex_init with devm_mutex_init
If the chip isn't powered, this call is likely to return an error.
Without a log here the driver will silently fail to probe. Potential
errors include ENXIO (when the chip isn't powered) and ETIMEDOUT (when
the i2c bus isn't powered).
This function is only called from stk3310_probe, and this condi
From: Ondrej Jirman
This allows the driver to properly handle powering this device, and
disable power during suspend.
Signed-off-by: Ondrej Jirman
Signed-off-by: Aren Moynihan
---
Notes:
Changes in v2:
- add leda-supply
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 2 ++
Using dev_err_probe instead of dev_err and return makes the errors
easier to understand by including the error name, and saves a little
code.
Signed-off-by: Aren Moynihan
---
Notes:
Changes in v4:
- Get a struct device ahead of time so it can be passed as "dev"
instead of "&clien
This reduces syntactic noise where the dev variable is used, which
should help improve readability.
Signed-off-by: Aren Moynihan
---
Notes:
Added in v5
drivers/iio/light/stk3310.c | 40 ++---
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/dr
This macro has a conditional return statement, which obfuscates control
flow. Inlining makes the control flow more clear.
This also switches to using dev_err_probe for error reporting, which is
a shorter way of expressing the same logic as before.
Signed-off-by: Aren Moynihan
---
Notes:
Add
The vdd and leda supplies must be powered on for the chip to function
and can be powered off during system suspend.
This is originally based on a patch by Ondrej Jirman, but has been
rewritten since.
Link:
https://codeberg.org/megi/linux/commit/a933aff8b7a0e6e3c9cf1d832dcba07022bbfa82
Signed-off
On Fri, Oct 11, 2024 at 07:53:43AM -0600, Shuah Khan wrote:
> On 10/11/24 01:25, David Gow wrote:
> > As discussed in [1], the KUnit test naming scheme has changed to avoid
> > name conflicts (and tab-completion woes) with the files being tested.
> > These renames and moves have caused a nasty set
On Sat, Feb 08, 2025 at 07:47:12AM -0800, Alexei Starovoitov wrote:
> On Fri, Feb 7, 2025 at 10:42 PM Yafang Shao wrote:
> >
> > On Fri, Feb 7, 2025 at 2:01 AM Song Liu wrote:
> > >
> > > On Wed, Feb 5, 2025 at 6:55 PM Yafang Shao wrote:
> > > [...]
> > > > > I think we should first understand w
Convert this very simple smoke test to a KUnit test.
Add a missing `htons` call that was spotted[0] by kernel test robot
after initial conversion to KUnit.
Link:
https://lore.kernel.org/oe-kbuild-all/202502090223.qcymbjwt-...@intel.com/ [0]
Signed-off-by: Tamir Duberstein
---
I tested this usi
On Sat, Feb 8, 2025 at 12:53 PM Yury Norov wrote:
>
> [...]
>
> Take over means that you'd at least add the Co-developed-by tag.
I didn't use their code - the thing being "taken over" is the work of
having these debates with the maintainers.
> [...]
>
> KUNIT is disabled in defconfig, at least o
Hi Tamir,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 2014c95afecee3e76ca4a56956a936e23283f05b]
url:
https://github.com/intel-lab-lkp/linux/commits/Tamir-Duberstein/blackhole_dev-convert-self-test-to-KUnit/20250208-074037
base
Hi Tamir,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 2014c95afecee3e76ca4a56956a936e23283f05b]
url:
https://github.com/intel-lab-lkp/linux/commits/Tamir-Duberstein/blackhole_dev-convert-self-test-to-KUnit/20250208-074037
base
On Fri, Feb 07, 2025 at 03:14:02PM -0500, Tamir Duberstein wrote:
> This has been unused since commit 3aa56885e516 ("bitmap: replace
> bitmap_{from,to}_u32array") in 2018. Remove it to avoid the need to port
> it to KUnit in this series.
>
> Signed-off-by: Tamir Duberstein
OK, 7 years is enough
On Fri, Feb 07, 2025 at 03:14:01PM -0500, Tamir Duberstein wrote:
> This is one of just 3 remaining "Test Module" kselftests (the others
> being printf and scanf), the rest having been converted to KUnit.
>
> I tested this using:
>
> $ tools/testing/kunit/kunit.py run --arch arm64 --make_options
On Fri, Feb 7, 2025 at 10:42 PM Yafang Shao wrote:
>
> On Fri, Feb 7, 2025 at 2:01 AM Song Liu wrote:
> >
> > On Wed, Feb 5, 2025 at 6:55 PM Yafang Shao wrote:
> > [...]
> > > > I think we should first understand why the trampoline is not
> > > > freed.
> > >
> > > IIUC, the fexit works as follo
Hi Frank,
kernel test robot noticed the following build errors:
[auto build test ERROR on 00f3246adeeacbda0bd0b303604e46eb59c32e6e]
url:
https://github.com/intel-lab-lkp/linux/commits/Frank-Li/platform-msi-Add-msi_remove_device_irq_domain-in-platform_device_msi_free_irqs_all/20250208-034445
Hi Frank,
kernel test robot noticed the following build errors:
[auto build test ERROR on 00f3246adeeacbda0bd0b303604e46eb59c32e6e]
url:
https://github.com/intel-lab-lkp/linux/commits/Frank-Li/platform-msi-Add-msi_remove_device_irq_domain-in-platform_device_msi_free_irqs_all/20250208-034445
Hi Frank,
kernel test robot noticed the following build errors:
[auto build test ERROR on 00f3246adeeacbda0bd0b303604e46eb59c32e6e]
url:
https://github.com/intel-lab-lkp/linux/commits/Frank-Li/platform-msi-Add-msi_remove_device_irq_domain-in-platform_device_msi_free_irqs_all/20250208-034445
On Sat, Feb 8, 2025 at 8:58 AM Tamir Duberstein wrote:
>
> [...]
>
> diff --git a/lib/math/prime_numbers.c b/lib/math/prime_numbers.c
> index 9a17ee9af93a..540d9b7b178f 100644
> --- a/lib/math/prime_numbers.c
> +++ b/lib/math/prime_numbers.c
> @@ -64,7 +58,13 @@ static const struct primes __rcu *p
Extract a private header and convert the prime_numbers self-test to a
KUnit test. I considered parameterizing the test using
`KUNIT_CASE_PARAM` but didn't see how it was possible since the test
logic is entangled with the test parameter generation logic.
Signed-off-by: Tamir Duberstein
---
lib/K
This Makefile has been dead code since it was added in commit
7fcc9b53216c ("lib/math: Add int_pow test suite"); the tests worked
because of the duplicated rules in the parent directory's Makefile. Wire
up tests/Makefile and remove the duplication.
Fixes: 7fcc9b53216c ("lib/math: Add int_pow test
This is a clear example of a unit test.
I tested this using:
$ tools/testing/kunit/kunit.py run --arch arm64 --make_options LLVM=1
math-prime_numbers
On success:
; [08:51:41] == math-prime_numbers (1 subtest) ==
; [08:51:41] [PASSED] prime_numbers_test
; [08:51:41] =
On Sat, Feb 8, 2025 at 4:07 AM David Gow wrote:
>
> On Sat, 8 Feb 2025 at 04:14, Tamir Duberstein wrote:
> >
> > Move some tests into `bitmap_test_cases` and parameterize
> > `test_bitmap_print_buf`. This gives us nicer output in the event of a
> > failure.
> >
> > Signed-off-by: Tamir Duberstein
From: André Apitzsch
Add of_match table for "dongwoon,dw9719" and "dongwoon,dw9761"
compatible string. This fixes automatic driver loading when using a
device-tree, and if built as a module like major linux distributions do.
Signed-off-by: André Apitzsch
---
This patch depends on
https://lore.
Hi Toke,
On 2/6/2025 11:05 PM, Toke Høiland-Jørgensen wrote:
> Hou Tao writes:
>
>> +cc Cody Haas
>>
>> Sorry for the resend. I sent the reply in the HTML format.
>>
>> On 2/4/2025 4:28 PM, Hou Tao wrote:
>>> Currently, the update of existing element in hash map involves two
>>> steps:
>>> 1) ins
On Sat, 8 Feb 2025 at 04:14, Tamir Duberstein wrote:
>
> This has been unused since commit 3aa56885e516 ("bitmap: replace
> bitmap_{from,to}_u32array") in 2018. Remove it to avoid the need to port
> it to KUnit in this series.
>
> Signed-off-by: Tamir Duberstein
> ---
Makes sense.
Reviewed-by:
On Sat, 8 Feb 2025 at 04:14, Tamir Duberstein wrote:
>
> Convert the bitmap() self-test to a KUnit test.
>
> In the interest of keeping the patch reasonably-sized this doesn't
> refactor the tests into proper parameterized tests - it's all one big
> test case.
>
> Signed-off-by: Tamir Duberstein
On Sat, 8 Feb 2025 at 04:14, Tamir Duberstein wrote:
>
> Move some tests into `bitmap_test_cases` and parameterize
> `test_bitmap_print_buf`. This gives us nicer output in the event of a
> failure.
>
> Signed-off-by: Tamir Duberstein
> ---
I very much like this cleanup: the static global 'kunitt
On Sat, 8 Feb 2025 at 04:14, Tamir Duberstein wrote:
>
> This is one of just 3 remaining "Test Module" kselftests (the others
> being printf and scanf), the rest having been converted to KUnit.
Thanks a lot, Tamir: these are great!
>
> I tested this using:
>
> $ tools/testing/kunit/kunit.py run
Also add fail_nth coverage too.
Signed-off-by: Nicolin Chen
---
tools/testing/selftests/iommu/iommufd.c | 97 +++
.../selftests/iommu/iommufd_fail_nth.c| 21
2 files changed, 118 insertions(+)
diff --git a/tools/testing/selftests/iommu/iommufd.c
b/tools/testi
The iopt_table_enforce_dev_resv_regions needs to access the sw_msi_start
and sw_msi_size stored in the idev, set by user space. So, pass in idev
pointer instead.
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/iommufd_private.h | 2 +-
drivers/iommu/iommufd/device.c | 5 ++---
dri
The new IOMMU_OPTION_SW_MSI_START/SIZE must not overlap with any existing
device reserved region, so add a testing region [0x8000, 0x8fff],
on top of the normal IOVA aperture for selftest program to run an overlap
test.
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/iommufd_test.h
Add a new MOCK_FLAGS_DEVICE_NO_ATTACH flag to allow the mock_domain cmd to
bypass the attach step, as IOMMU_OPTION_SW_MSI_START/SIZE only allow users
to set prior to an IOAS/HWPT attachment.
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/iommufd_test.h | 1 +
drivers/iommu/iommufd/selfte
For systems that require MSI pages to be mapped into the IOMMU translation
the IOMMU driver provides an IOMMU_RESV_SW_MSI range, which is the default
recommended IOVA window to place these mappings. However, there is nothing
special about this address. And to support the RMR trick in VMM for nested
From: Jason Gunthorpe
iommufd has a model where the iommu_domain can be changed while the VFIO
device is attached. In this case the MSI should continue to work. This
corner case has not worked because the dma-iommu implementation of sw_msi
is tied to a single domain.
Implement the sw_msi mapping
A "fault_data" was added exclusively for the iommufd_fault_iopf_handler()
used by IOPF/PRI use cases, along with the attach_handle. Now, the iommufd
version of sw_msi function will reuse the attach_handle and fault_data for
a non-fault case.
Rename "fault_data" to "iommufd_hwpt" so as not to confi
From: Jason Gunthorpe
SW_MSI supports IOMMU to translate an MSI message before the MSI message
is delivered to the interrupt controller. On such systems the iommu_domain
must have a translation for the MSI message for interrupts to work.
The IRQ subsystem will call into IOMMU to request that a p
The sw_msi_start was set from the per-device reserved region, so storing
it in the iommufd_device structure makes sense too. This will also ease
a following patch adding a SET_OPTION uAPI to set per-idev sw_msi args.
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/iommufd_private.h | 2 +-
Now that iommufd does not rely on dma-iommu.c for any purpose we can
combine the dma-iommu.c iova_cookie and the iommufd_hwpt under the
same union. This union is effectively 'owner data' can be used by the
entity that allocated the domain. Note that legacy vfio type1 flows
continue to use dma-iommu
From: Jason Gunthorpe
Currently IRQ_MSI_IOMMU is selected if DMA_IOMMU is available to provide
an implementation for iommu_dma_prepare/compose_msi_msg(). However it
makes more sense for the irqchips that call prepare/compose to select it
and that will trigger all the additional code and data to b
From: Jason Gunthorpe
The new function is used to take in a u64 MSI address and store it in the
msi_msg. If the iommu has provided an alternative address then that is
replaced instead.
All callers have a tidy u64 already so this also consolidates the repeated
low/high code into a small helper.
From: Jason Gunthorpe
All the iommu cases simply want to override the MSI page's address with
the IOVA that was mapped through the iommu. This doesn't need a cookie
pointer, we just need to store the IOVA and its page size in the msi_desc.
Instead provide msi_desc_set_iommu_msi_iova() which allo
[ Background ]
On ARM GIC systems and others, the target address of the MSI is translated
by the IOMMU. For GIC, the MSI address page is called "ITS" page. When the
IOMMU is disabled, the MSI address is programmed to the physical location
of the GIC ITS page (e.g. 0x2020). When the IOMMU is ena
On Sat, 8 Feb 2025 at 06:33, Tamir Duberstein wrote:
>
> Extract a private header and convert the prime_numbers self-test to a
> KUnit test. I considered parameterizing the test using
> `KUNIT_CASE_PARAM` but didn't see how it was possible since the test
> logic is entangled with the test paramete
On Sat, 8 Feb 2025 at 06:33, Tamir Duberstein wrote:
>
> This Makefile has been dead code since it was added in commit
> 7fcc9b53216c ("lib/math: Add int_pow test suite"); the tests worked
> because of the duplicated rules in the parent directory's Makefile. Wire
> up tests/Makefile and remove the
65 matches
Mail list logo