mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-24 12:34:31 +00:00
aarch64: Fix size prop in swiotlb
Devicetree bindings for restricted-dma-pool say that *either* "size" or
"reg" property should be used (but do not allow for both).
Each child node may either use a 'reg' property ... or a 'size'
property ...
Presently, "size" property is added even when fixed swiotlb region is
used. Apply the "size" property only when using dynamically allocated
swiotlb.
BUG=b:244630071
Fixes: 653f62a4a3
("aarch64: static swiotlb allocation")
Change-Id: I1c88c9be043133e698e1da9072e5353ad7419e27
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4680283
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Frederick Mayle <fmayle@google.com>
This commit is contained in:
parent
ff80c3f9c8
commit
479cb9c89a
1 changed files with 3 additions and 2 deletions
|
@ -115,11 +115,12 @@ fn create_resv_memory_node(
|
|||
fdt.property_array_u64("reg", &[resv_addr.0, resv_size])?;
|
||||
node
|
||||
} else {
|
||||
fdt.begin_node("restricted_dma_reserved")?
|
||||
let node = fdt.begin_node("restricted_dma_reserved")?;
|
||||
fdt.property_u64("size", resv_size)?;
|
||||
node
|
||||
};
|
||||
fdt.property_u32("phandle", PHANDLE_RESTRICTED_DMA_POOL)?;
|
||||
fdt.property_string("compatible", "restricted-dma-pool")?;
|
||||
fdt.property_u64("size", resv_size)?;
|
||||
fdt.property_u64("alignment", base::pagesize() as u64)?;
|
||||
fdt.end_node(restricted_dma_pool)?;
|
||||
|
||||
|
|
Loading…
Reference in a new issue