-
Notifications
You must be signed in to change notification settings - Fork 435
Comparing changes
Open a pull request
base repository: Rust-for-Linux/linux
base: baa41ff37d5087ac38dcf99018eb9862ea53a9bb
head repository: Rust-for-Linux/linux
compare: c13f777a3a5e5a9a4ae8c1415d327742618233c3
- 18 commits
- 29 files changed
- 4 contributors
Commits on Mar 1, 2024
-
driver, of: Mangle the device ID machinery further to remove const_tr…
…ait_impl This unstable feature is broken/gone in 1.73. To work around this without breaking the API, turn IdArray::new() into a macro so that it can use concrete types (which can still have const associated functions) instead of a trait. This is quite ugly... Signed-off-by: Asahi Lina <[email protected]> (cherry picked from commit 71e6c52) Signed-off-by: Fabien Parent <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ce41d4c - Browse repository at this point
Copy the full SHA ce41d4cView commit details -
rust: kernel: lock: Add Lock::pin_init()
This allows initializing a lock using pin_init!(), instead of requiring the inner data to be passed through the stack. Signed-off-by: Asahi Lina <[email protected]> (cherry picked from commit 05abc1d) Signed-off-by: Fabien Parent <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c69fc2d - Browse repository at this point
Copy the full SHA c69fc2dView commit details -
rust: sync: Add dummy LockClassKey implementation for !CONFIG_LOCKDEP
Lock classes aren't used without lockdep. The C side declares the key as an empty struct in that case, but let's make it an explicit ZST in Rust, implemented in a separate module. This allows us to more easily guarantee that the lockdep code will be trivially optimized out without CONFIG_LOCKDEP, including LockClassKey arguments that are passed around. Depending on whether CONFIG_LOCKDEP is enabled or not, we then import the real lockdep implementation or the dummy one. Signed-off-by: Asahi Lina <[email protected]> (cherry picked from commit 3d8fea8) Signed-off-by: Fabien Parent <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 31b295a - Browse repository at this point
Copy the full SHA 31b295aView commit details -
rust: sync: Replace static LockClassKey refs with a pointer wrapper
We want to be able to handle dynamic lock class creation and using pointers to things that aren't a real lock_class_key as lock classes. Doing this by casting around Rust references is difficult without accidentally invoking UB. Instead, switch LockClassKey to being a raw pointer wrapper around a lock_class_key, which means there is no UB possible on the Rust side just by creating and consuming these objects. The C code also should never actually dereference lock classes, only use their address (possibly with an offset). We still provide a dummy ZST version of this wrapper, to be used when lockdep is disabled. Signed-off-by: Asahi Lina <[email protected]> (cherry picked from commit 1f50256) Signed-off-by: Fabien Parent <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 15afb4a - Browse repository at this point
Copy the full SHA 15afb4aView commit details -
*RFL import: The rest of kernel::device (minus clk stuff)
Commit reference: 3dfc5eb Signed-off-by: Asahi Lina <[email protected]> (cherry picked from commit 495dd6c) Signed-off-by: Fabien Parent <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for aeefa92 - Browse repository at this point
Copy the full SHA aeefa92View commit details -
rust: add I2C driver module macro
Signed-off-by: Finn Behrens <[email protected]> Signed-off-by: Fabien Parent <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7581a40 - Browse repository at this point
Copy the full SHA 7581a40View commit details -
Signed-off-by: Fabien Parent <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5f894b9 - Browse repository at this point
Copy the full SHA 5f894b9View commit details -
rust: i2c: add method to retrieve raw client pointer
Signed-off-by: Fabien Parent <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 15c3522 - Browse repository at this point
Copy the full SHA 15c3522View commit details -
rust: i2c: add function to retrieve Device out of a Client
Signed-off-by: Fabien Parent <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 611788a - Browse repository at this point
Copy the full SHA 611788aView commit details -
samples: rust: add i2c client driver sample
Add a basic sample for using the I2C client driver. Signed-off-by: Fabien Parent <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a370144 - Browse repository at this point
Copy the full SHA a370144View commit details -
rust: add function to create masks
Create a function that is equivalent to Linux's GENMASK macro. Signed-off-by: Fabien Parent <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7b4547c - Browse repository at this point
Copy the full SHA 7b4547cView commit details -
rust: macros: get paste! { [A $pos] } to work for integers
Signed-off-by: Fabien Parent <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6f150e2 - Browse repository at this point
Copy the full SHA 6f150e2View commit details -
Signed-off-by: Fabien Parent <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for da7df7f - Browse repository at this point
Copy the full SHA da7df7fView commit details -
rust: Add new abstraction for regmap
Signed-off-by: Fabien Parent <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a88ecd3 - Browse repository at this point
Copy the full SHA a88ecd3View commit details -
This allows you to get a raw pointer to THIS_MODULE for use in unsafe code. The Rust Binder RFC uses it when defining fops for the binderfs component [1]. This doesn't really need to go in now - it could go in together with Rust Binder like how it is sent in the Rust Binder RFC. However, the upcoming 1.77.0 release of the Rust compiler introduces a new warning, and applying this patch now will silence that warning. That allows us to avoid adding the #[allow(dead_code)] annotation seen in [2]. Link: https://lore.kernel.org/rust-for-linux/[email protected]/ [1] Link: https://lore.kernel.org/all/[email protected]/ [2] Signed-off-by: Alice Ryhl <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 62f3e40 - Browse repository at this point
Copy the full SHA 62f3e40View commit details -
rust: error: Add declaration for ENOTRECOVERABLE error
Add a missing errno for ENOTRECOVERABLE. Signed-off-by: Fabien Parent <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ee3fa46 - Browse repository at this point
Copy the full SHA ee3fa46View commit details -
rust: regulator: add regulator consumer abstractions
Add a rust abstraction for the regulator consumer API. Signed-off-by: Fabien Parent <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 523f9d9 - Browse repository at this point
Copy the full SHA 523f9d9View commit details -
rust: regulator: add abstraction to write regulator drivers
Signed-off-by: Fabien Parent <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c13f777 - Browse repository at this point
Copy the full SHA c13f777View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff baa41ff37d5087ac38dcf99018eb9862ea53a9bb...c13f777a3a5e5a9a4ae8c1415d327742618233c3