Skip to content

Commit 23c6357

Browse files
WhatAmISupposedToPutHerejannau
authored andcommitted
fixup! soc: apple: Add support for the PMP co-processor
1 parent 7984641 commit 23c6357

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/soc/apple/pmp.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,12 @@ impl PmpData {
187187
let n_entries = node.property_count_elem::<u64>(prop_name)? / 2;
188188
let ranges = node
189189
.property_read_array_vec::<u64>(prop_name, n_entries * 2)?
190-
.required_by(&self.dev)?;
190+
.optional();
191+
let ranges = if let Some(r) = ranges {
192+
r
193+
} else {
194+
return Ok((OPC_GET_IOVA_TABLE | OPC_ACK_MASK) << OPC_SHIFT);
195+
};
191196
let mut table = self.dev.while_bound_with(|bound_dev| {
192197
CoherentAllocation::alloc_coherent(bound_dev, 512, GFP_KERNEL)
193198
})?;

0 commit comments

Comments
 (0)