]> www.infradead.org Git - users/willy/pagecache.git/commitdiff
Merge tag 'char-misc-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregk...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 29 Nov 2024 19:58:27 +0000 (11:58 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 29 Nov 2024 19:58:27 +0000 (11:58 -0800)
Pull char/misc/IIO/whatever driver subsystem updates from Greg KH:
 "Here is the 'big and hairy' char/misc/iio and other small driver
  subsystem updates for 6.13-rc1.

  Loads of things in here, and even a fun merge conflict!

   - rust misc driver bindings and other rust changes to make misc
     drivers actually possible.

     I think this is the tipping point, expect to see way more rust
     drivers going forward now that these bindings are present. Next
     merge window hopefully we will have pci and platform drivers
     working, which will fully enable almost all driver subsystems to
     start accepting (or at least getting) rust drivers.

     This is the end result of a lot of work from a lot of people,
     congrats to all of them for getting this far, you've proved many of
     us wrong in the best way possible, working code :)

   - IIO driver updates, too many to list individually, that subsystem
     keeps growing and growing...

   - Interconnect driver updates

   - nvmem driver updates

   - pwm driver updates

   - platform_driver::remove() fixups, loads of them

   - counter driver updates

   - misc driver updates (keba?)

   - binder driver updates and fixes

   - loads of other small char/misc/etc driver updates and additions,
     full details in the shortlog.

  All of these have been in linux-next for a while, with no other
  reported issues other than that merge conflict"

* tag 'char-misc-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (401 commits)
  mei: vsc: Fix typo "maintstepping" -> "mainstepping"
  firmware: Switch back to struct platform_driver::remove()
  misc: isl29020: Fix the wrong format specifier
  scripts/tags.sh: Don't tag usages of DEFINE_MUTEX
  fpga: Switch back to struct platform_driver::remove()
  mei: vsc: Improve error logging in vsc_identify_silicon()
  mei: vsc: Do not re-enable interrupt from vsc_tp_reset()
  dt-bindings: spmi: qcom,x1e80100-spmi-pmic-arb: Add SAR2130P compatible
  dt-bindings: spmi: spmi-mtk-pmif: Add compatible for MT8188
  spmi: pmic-arb: fix return path in for_each_available_child_of_node()
  iio: Move __private marking before struct element priv in struct iio_dev
  docs: iio: ad7380: add adaq4370-4 and adaq4380-4
  iio: adc: ad7380: add support for adaq4370-4 and adaq4380-4
  iio: adc: ad7380: use local dev variable to shorten long lines
  iio: adc: ad7380: fix oversampling formula
  dt-bindings: iio: adc: ad7380: add adaq4370-4 and adaq4380-4 compatible parts
  bus: mhi: host: pci_generic: Use pcim_iomap_region() to request and map MHI BAR
  bus: mhi: host: Switch trace_mhi_gen_tre fields to native endian
  misc: atmel-ssc: Use of_property_present() for non-boolean properties
  misc: keba: Add hardware dependency
  ...

15 files changed:
1  2 
Documentation/devicetree/bindings/vendor-prefixes.yaml
MAINTAINERS
drivers/firmware/arm_scmi/driver.c
drivers/firmware/arm_scpi.c
drivers/firmware/microchip/mpfs-auto-update.c
drivers/firmware/xilinx/zynqmp.c
drivers/misc/Kconfig
drivers/misc/Makefile
drivers/nvmem/core.c
rust/bindings/bindings_helper.h
rust/kernel/lib.rs
rust/kernel/prelude.rs
rust/kernel/types.rs
rust/macros/module.rs
scripts/tags.sh

diff --cc MAINTAINERS
index f9de0420841fd95a166bf5d5c284ff44daf3b6ff,e69d1632c382fe0e366f7bb20e72ee0c9e91e30b..c1fcc56bf2fba4e82f87fd8ccb9686cb36af533e
@@@ -11942,8 -11918,16 +11978,16 @@@ S: Maintaine
  F:    Documentation/devicetree/bindings/iio/gyroscope/invensense,mpu3050.yaml
  F:    drivers/iio/gyro/mpu3050*
  
+ INVENSENSE MPU-6050 IMU DRIVER
+ M:    Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
+ L:    linux-iio@vger.kernel.org
+ S:    Maintained
+ W:    https://invensense.tdk.com/
+ F:    Documentation/devicetree/bindings/iio/imu/invensense,mpu6050.yaml
+ F:    drivers/iio/imu/inv_mpu6050/
  IOC3 ETHERNET DRIVER
 -M:    Ralf Baechle <ralf@linux-mips.org>
 +M:    Thomas Bogendoerfer <tsbogend@alpha.franken.de>
  L:    linux-mips@vger.kernel.org
  S:    Maintained
  F:    drivers/net/ethernet/sgi/ioc3-eth.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 54bc8a8c5c88a84996f0bd980fb26e8b3f85cbed,84303bf221dd95808cf7eeae7909a3fe8fbc492e..5c4dfe22f41a5a106330e8c43ffbd342c69c4e0b
  #include <linux/blk-mq.h>
  #include <linux/blk_types.h>
  #include <linux/blkdev.h>
 +#include <linux/cred.h>
  #include <linux/errname.h>
  #include <linux/ethtool.h>
 +#include <linux/file.h>
  #include <linux/firmware.h>
 +#include <linux/fs.h>
  #include <linux/jiffies.h>
 +#include <linux/jump_label.h>
  #include <linux/mdio.h>
+ #include <linux/miscdevice.h>
  #include <linux/phy.h>
 +#include <linux/pid_namespace.h>
 +#include <linux/poll.h>
  #include <linux/refcount.h>
  #include <linux/sched.h>
 +#include <linux/security.h>
  #include <linux/slab.h>
 +#include <linux/tracepoint.h>
  #include <linux/wait.h>
  #include <linux/workqueue.h>
 +#include <trace/events/rust_sample.h>
  
  /* `bindgen` gets confused at certain things. */
  const size_t RUST_CONST_HELPER_ARCH_SLAB_MINALIGN = ARCH_SLAB_MINALIGN;
index 04dbee70d3e66a256240c4fb5c36b2a05d07db03,638c8db4ce549c60435f05f2fbe310badb173d17..e1065a7551a39e68d6379031d80d4be336e652a3
@@@ -92,9 -82,32 +93,32 @@@ pub trait Module: Sized + Sync + Send 
      fn init(module: &'static ThisModule) -> error::Result<Self>;
  }
  
+ /// A module that is pinned and initialised in-place.
+ pub trait InPlaceModule: Sync + Send {
+     /// Creates an initialiser for the module.
+     ///
+     /// It is called when the module is loaded.
+     fn init(module: &'static ThisModule) -> impl init::PinInit<Self, error::Error>;
+ }
+ impl<T: Module> InPlaceModule for T {
+     fn init(module: &'static ThisModule) -> impl init::PinInit<Self, error::Error> {
+         let initer = move |slot: *mut Self| {
+             let m = <Self as Module>::init(module)?;
+             // SAFETY: `slot` is valid for write per the contract with `pin_init_from_closure`.
+             unsafe { slot.write(m) };
+             Ok(())
+         };
+         // SAFETY: On success, `initer` always fully initialises an instance of `Self`.
+         unsafe { init::pin_init_from_closure(initer) }
+     }
+ }
  /// Equivalent to `THIS_MODULE` in the C API.
  ///
 -/// C header: [`include/linux/export.h`](srctree/include/linux/export.h)
 +/// C header: [`include/linux/init.h`](srctree/include/linux/init.h)
  pub struct ThisModule(*mut bindings::module);
  
  // SAFETY: `THIS_MODULE` may be used from all threads within a module.
Simple merge
Simple merge
index e7a087b7e88494103c35b1ac7b499df77f2639b1,a03266a78cfbafd6a3f82233f86bffddc006cc25..2587f41b0d3929af7ceac5f42b4711f70b4f8749
@@@ -330,21 -332,15 +332,15 @@@ pub(crate) fn module(ts: TokenStream) -
                      /// # Safety
                      ///
                      /// This function must only be called once.
 -                    unsafe fn __init() -> core::ffi::c_int {{
 +                    unsafe fn __init() -> kernel::ffi::c_int {{
-                         match <{type_} as kernel::Module>::init(&super::super::THIS_MODULE) {{
-                             Ok(m) => {{
-                                 // SAFETY: No data race, since `__MOD` can only be accessed by this
-                                 // module and there only `__init` and `__exit` access it. These
-                                 // functions are only called once and `__exit` cannot be called
-                                 // before or during `__init`.
-                                 unsafe {{
-                                     __MOD = Some(m);
-                                 }}
-                                 return 0;
-                             }}
-                             Err(e) => {{
-                                 return e.to_errno();
-                             }}
+                         let initer =
+                             <{type_} as kernel::InPlaceModule>::init(&super::super::THIS_MODULE);
+                         // SAFETY: No data race, since `__MOD` can only be accessed by this module
+                         // and there only `__init` and `__exit` access it. These functions are only
+                         // called once and `__exit` cannot be called before or during `__init`.
+                         match unsafe {{ initer.__pinned_init(__MOD.as_mut_ptr()) }} {{
+                             Ok(m) => 0,
+                             Err(e) => e.to_errno(),
                          }}
                      }}
  
diff --cc scripts/tags.sh
Simple merge