Skip to content

Commit

Permalink
Merge pull request torvalds#766 from sulix/rust-uml
Browse files Browse the repository at this point in the history
Add support for building under x86_64 User-Mode-Linux (UML)
  • Loading branch information
ojeda authored May 10, 2022
2 parents 165a7fa + 73d4a4a commit fbf6cf4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions arch/um/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ config UML
select TRACE_IRQFLAGS_SUPPORT
select TTY # Needed for line.c
select HAVE_ARCH_VMAP_STACK
select HAVE_RUST if X86_64

config MMU
bool
Expand Down
2 changes: 2 additions & 0 deletions rust/kernel/irq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,12 @@ impl Drop for ChainedGuard<'_> {
/// # Invariants
///
/// The pointer `Domain::ptr` is non-null and valid.
#[cfg(CONFIG_IRQ_DOMAIN)]
pub struct Domain {
ptr: *mut bindings::irq_domain,
}

#[cfg(CONFIG_IRQ_DOMAIN)]
impl Domain {
/// Constructs a new `struct irq_domain` wrapper.
///
Expand Down
1 change: 1 addition & 0 deletions rust/kernel/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ pub mod sync;
pub mod sysctl;

pub mod io_buffer;
#[cfg(CONFIG_HAS_IOMEM)]
pub mod io_mem;
pub mod iov_iter;
pub mod of;
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate_rust_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ fn main() {
features += ",+c";
}
ts.push("features", features);
} else if cfg.has("X86") {
} else if cfg.has("X86_64") {
ts.push("arch", "x86_64");
ts.push(
"data-layout",
Expand Down

0 comments on commit fbf6cf4

Please sign in to comment.