Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AtomicU64 on 32-bit architectures #1112

Open
FlyGoat opened this issue Sep 4, 2024 · 6 comments
Open

AtomicU64 on 32-bit architectures #1112

FlyGoat opened this issue Sep 4, 2024 · 6 comments

Comments

@FlyGoat
Copy link

FlyGoat commented Sep 4, 2024

With my WIP MIPS patches, rust compile may fail at:

  RUSTC L rust/kernel.o
error[E0432]: unresolved import `core::sync::atomic::AtomicU64`
  --> rust/kernel/block/mq/operations.rs:14:33
   |
14 | use core::{marker::PhantomData, sync::atomic::AtomicU64, sync::atomic::Ordering};
   |                                 ^^^^^^^^^^^^^^---------
   |                                 |             |
   |                                 |             help: a similar name exists in the module: `AtomicU32`
   |                                 no `AtomicU64` in `sync::atomic`

We should probably wire up atomic64.h C code for Rust side AtomicU64.

@fbq
Copy link
Member

fbq commented Sep 4, 2024

The plan is to use our own atomic implementations (same as C). It's a WIP

@metaspace
Copy link
Collaborator

For a quick fix you can change it to U32 or usize.

@GuilhermeGiacomoSimoes
Copy link

@FlyGoat
can you take for me a link for your patchs, and one brief explanation of how I can reproduce this issue ?
I think that I can work on this, I'm a beginer in the kernel

@FlyGoat
Copy link
Author

FlyGoat commented Oct 5, 2024

Hi @GuilhermeGiacomoSimoes:

Patch: https://lore.kernel.org/linux-mips/[email protected]/

make ARCH=mips 32r2el_defconfig LLVM=1

Then enable rust stuff in menuconfig and build kernel.

Thanks

@fbq
Copy link
Member

fbq commented Oct 5, 2024

I think that I can work on this, I'm a beginer in the kernel

As I mentioned earlier, this issue will be resolved after our atomic API which I'm currently working on.

@GuilhermeGiacomoSimoes
Copy link

@fbq ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants