Skip to content

Commit

Permalink
rust: Hide irq::Domain behind CONFIG_IRQ_DOMAIN
Browse files Browse the repository at this point in the history
IRQ domains are not supported under all architectures, so hide the
Domain struct (and its implementation) behind CONFIG_IRQ_DOMAIN.

This is required for CONFIG_RUST to build and run under UML.

Signed-off-by: David Gow <davidgow@google.com>
  • Loading branch information
sulix committed May 10, 2022
1 parent 825e9a4 commit 000ea48
Showing 1 changed file with 2 additions and 0 deletions.
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

0 comments on commit 000ea48

Please sign in to comment.