Commit Graph
1646 Commits
Author SHA1 Message Date
Mark Brown fa528a6a52 Merge branch 'kunit' of https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git 2026-07-31 16:34:46 +01:00
Mark Brown 08525eabdd Merge branch 'char-misc-next' of https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
# Conflicts:
#	rust/kernel/task.rs
2026-07-31 16:03:34 +01:00
Mark Brown 7e58277f4e Merge branch 'usb-next' of https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git 2026-07-31 16:03:22 +01:00
Mark Brown 895f8dd2ba Merge branch 'driver-core-next' of https://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git
# Conflicts:
#	drivers/gpu/drm/xe/xe_i2c.c
#	drivers/gpu/nova-core/gpu.rs
#	include/linux/platform_device.h
2026-07-31 16:03:20 +01:00
Mark Brown f15294f83a Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/rcu/linux 2026-07-31 15:30:06 +01:00
Mark Brown 86cadce2af Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux.git 2026-07-31 15:26:44 +01:00
Mark Brown abc05cef20 Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm.git 2026-07-31 15:26:26 +01:00
Mark Brown 9270269cf1 Merge branch 'modules-next' of https://git.kernel.org/pub/scm/linux/kernel/git/modules/linux.git 2026-07-31 15:26:01 +01:00
Mark Brown cb5336ee4d Merge branch 'for-linux-next' of https://gitlab.freedesktop.org/drm/rust/kernel.git 2026-07-31 15:25:45 +01:00
Mark Brown 1dd749ad5b Merge branch 'cpufreq/arm/linux-next' of https://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git 2026-07-31 14:50:29 +01:00
Mark Brown 67be8c626e Merge branch 'linux-next' of https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git 2026-07-31 14:50:27 +01:00
Mark Brown c1155d477c Merge branch 'rust-i2c-next' of https://github.com/ikrtn/rust-for-linux 2026-07-31 14:50:16 +01:00
Joerg Roedel b4f6d7b19f Merge branches 'arm/smmu/updates', 'arm/smmu/bindings', 'mediatek', 'qualcomm/msm', 'rockchip', 'ti/omap', 'riscv', 'amd/amd-vi', 'core' and 'typos' into next 2026-07-30 17:55:57 +02:00
Priya Bala GovindasamyandViresh Kumar 8aa9318195 rust: cpufreq: Fix temporary write in Registration::bios_limit_callback
In `Registration::bios_limit_callback`, the expression
`&mut (unsafe { *limit })` creates a reference to a temporary copy
of the value pointed to by `limit` on the stack.
Therefore, writes made by `T::bios_limit` go to this temporary
instead of the memory location pointed to by `limit`.

Additionally, `limit` may be uninitialized, such as when
`Registration::bios_limit_callback` is invoked by `show_bios_limit`
in drivers/cpufreq/cpufreq.c. Therefore creating a reference to
`limit` is unsound.

Fix this by changing the signature of `T::bios_limit` to return the limit
value.
`Registration::bios_limit_callback` can then update `limit` directly.

Fixes: c6af9a1191 ("rust: cpufreq: Extend abstractions for driver registration")
Reported-by: Dylan Zueck<dzueck@uci.edu>
Reported-by: Yuan Tan<ytan089@ucr.edu>
Assisted-by: ChatGPT:gpt-5.4
Signed-off-by: Priya Bala Govindasamy<pgovind2@uci.edu>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2026-07-28 14:14:18 +05:30
Priya Bala GovindasamyandViresh Kumar 25682036f5 rust: cpufreq: Add CPUFREQ_TABLE_END as last table entry in TableBuilder::to_table
The `TableBuilder::to_table` function adds `Hertz(c_ulong::MAX).as_khz()`
as the last frequency entry in the frequency table.
But the C API expects the last entry to have frequency set to
`CPUFREQ_TABLE_END` which is `~1u` as per include/linux/cpufreq.h.

Fix this by setting the last frequency entry to `CPUFREQ_TABLE_END`
instead of `Hertz(c_ulong::MAX).as_khz()`.

Fixes: 2207856ff0 ("rust: cpufreq: Add initial abstractions for cpufreq framework")
Reported-by: Dylan Zueck<dzueck@uci.edu>
Reported-by: Yuan Tan<ytan089@ucr.edu>
Assisted-by: ChatGPT:gpt-5.6-terra
Signed-off-by: Priya Bala Govindasamy<pgovind2@uci.edu>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2026-07-28 14:14:09 +05:30
Gary GuoandDanilo Krummrich a1f1b3b478 rust: devres: use cast_pin_init instead of manual reimplementation
Remove the manual type-casting which is already available as
`cast_pin_init`.

Signed-off-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260722-merge-init-v1-2-d4594de76538@garyguo.net
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-07-27 22:29:34 +02:00
Greg Kroah-Hartman 0957fbab97 Merge 7.2-rc5 into char-misc-next
We need the char/misc fixes AND this resolves two merge conflicts in:
	drivers/android/binder/thread.rs
	drivers/misc/nsm.c

Reported-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-27 14:17:19 +02:00
Rafael J. Wysocki a59098bff2 Merge branch 'pm-cpufreq' into linux-next
* pm-cpufreq:
  cpufreq/amd-pstate: handle missing policy in dynamic EPP callbacks
  cpufreq/amd-pstate: Cache the firmware programmed EPP value
  cpufreq/amd-pstate: Toggle auto_sel in active mode on shared memory systems
  cpufreq/amd-pstate: Fix EPP return type and handle errors during initialization
  cpufreq: amd-pstate-ut: Skip tests when amd-pstate driver is not active
  cpufreq: schedutil: Replace sprintf() with sysfs_emit() in sysfs show
  cpufreq: schedutil: Fix self-contradictory comment in sugov_iowait_apply()
  Documentation: admin-guide: cpufreq: fix sampling_rate example command
  cpufreq: intel_pstate: Move two functions closer to callers
  cpufreq: intel_pstate: Consolidate frequency values computation
  cpufreq: intel_pstate: Introduce intel_pstate_update_freq_limits()
  cpufreq: intel_pstate: Fix setting minimum P-state at init time
  cpufreq: intel_pstate: Rename INTEL_PSTATE_HWP_BROADWELL
  cpufreq: intel_pstate: Simplify HWP handling on Broadwell
  cpufreq: intel_pstate: Adjust the .adjust_perf() driver callback
  cpufreq: intel_pstate: Rearrange checks in hybrid_get_cost()
2026-07-27 12:59:06 +02:00
Greg Kroah-Hartman 5d5fd841c3 Merge 7.2-rc5 into usb-next
We need the USB fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-27 08:40:53 +02:00
Markus ProbstandDanilo Krummrich 99f59aa823 rust: add basic serial device bus abstractions
Implement the basic serial device bus abstractions required to write a
serial device bus device driver with or without the need for initial device
data. This includes the following data structures:

The `serdev::Driver` trait represents the interface to the driver.

The `serdev::Device` abstraction represents a `struct serdev_device`.

In order to provide the Serdev specific parts to a generic
`driver::Registration` the `driver::RegistrationOps` trait is
implemented by `serdev::Adapter`.

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Markus Probst <markus.probst@posteo.de>
Link: https://patch.msgid.link/20260718-rust_serdev-v16-1-5809384d2e1b@posteo.de
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-07-23 22:48:24 +02:00
Zhi WangandDanilo Krummrich 6afbbc27f5 rust: pci: add sriov_get_totalvfs() helper
Expose pci_sriov_get_totalvfs() to Rust PCI drivers so they can query
how many SR-IOV VFs a device supports.

Use a conditional C helper because the !CONFIG_PCI_IOV version of
pci_sriov_get_totalvfs() is a static inline function and is therefore
not emitted into the Rust bindings. Return Option<NonZero<u16>> so Rust
callers must handle the zero value that represents unavailable SR-IOV.

Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Cc: Alexandre Courbot <acourbot@nvidia.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: David Laight <david.laight.linux@gmail.com>
Cc: Gary Guo <gary@garyguo.net>
Cc: linux-pci@vger.kernel.org
Link: https://lore.kernel.org/all/DJHPRE4TGGT8.BUTMYOF5YE05@nvidia.com/
Signed-off-by: Zhi Wang <zhiw@nvidia.com>
Link: https://patch.msgid.link/20260722073913.1807677-3-zhiw@nvidia.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-07-23 14:20:24 +02:00
Younes AkhouayriandDanilo Krummrich 01899cb7b9 rust: irq: fix C header path in module docs
The IRQ module documentation displays `include/linux/device.h`, while
the link points to `include/linux/interrupt.h`. The module wraps the IRQ
registration interfaces declared in `include/linux/interrupt.h`, so fix
the displayed header path.

Fixes: 1f54d5e5cd ("rust: irq: add irq module")
Link: https://github.com/Rust-for-Linux/linux/issues/1246
Signed-off-by: Younes Akhouayri <git@younes.io>
Link: https://patch.msgid.link/20260717-docs-irq-rustdoc-header-v1-1-36749192aa04@younes.io
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-07-21 00:48:45 +02:00
Gary GuoandDanilo Krummrich c2d8b26205 rust: io: document const-offset requirement for infallible accessors
Due to the usage of `build_assert!` for address validity checking, these
accessors want constant offsets. Non-constant offsets can work but it
depend on compiler optimization levels, so it should be avoided.

Signed-off-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Link: https://patch.msgid.link/20260716142545.3622278-1-gary@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-07-21 00:48:25 +02:00
Gary GuoandDanilo Krummrich f7acb19abc rust: device: make lifetime on Core and CoreInternal invariant
Currently the lifetime on `Core` and `CoreInternal` is covariant. This
means that they can be coerced into shorter living lifetimes. On `probe`
function, signature has `&'bound Device<Core<'a>>`; the type's wellformness
would imply `'a: 'bound` and thus the type can be coerced `&'bound
Device<Core<'bound>>`, defeating the purpose of having the lifetime bound
to prevent users of the `Core` type to escape the function.

Fix this by making the lifetime invariant, so the coercion is impossible.
The lifetime here only needs to be "branded" so it does not coerce or unify
with other lifetimes, so we do not need to ensure `'bound: 'a`.

This requires modifying `nova-core` which relies on this implied bound due
to pre-2024 capture rule. The "use" bound can be removed if built with
edition 2024.

Fixes: 24799831d6 ("rust: device: make Core and CoreInternal lifetime-parameterized")
Signed-off-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260713201455.640151-1-gary@kernel.org
[ Fixup the debugfs sample to use an explicit lifetime instead of
  Core<'_>. - Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-07-21 00:46:17 +02:00
Gary GuoandDanilo Krummrich 22e77d81d0 rust: drm: fix non-const read8 in unit test
With CONFIG_CC_OPTIMIZE_FOR_SIZE, the address validity check in non-const
`read8` invocaction is not optimized away, leading to build failure.

Fixes: d055768429 ("rust: drm: gem: shmem: Add vmap functions")
Signed-off-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260716142545.3622278-2-gary@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-07-19 16:29:18 +02:00