Skip to content

Commit 000ea48

Browse files
committed
rust: Hide irq::Domain behind CONFIG_IRQ_DOMAIN
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>
1 parent 825e9a4 commit 000ea48

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

rust/kernel/irq.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,12 @@ impl Drop for ChainedGuard<'_> {
352352
/// # Invariants
353353
///
354354
/// The pointer `Domain::ptr` is non-null and valid.
355+
#[cfg(CONFIG_IRQ_DOMAIN)]
355356
pub struct Domain {
356357
ptr: *mut bindings::irq_domain,
357358
}
358359

360+
#[cfg(CONFIG_IRQ_DOMAIN)]
359361
impl Domain {
360362
/// Constructs a new `struct irq_domain` wrapper.
361363
///

0 commit comments

Comments
 (0)