Skip to content

Commit 4c778a7

Browse files
committed
acpi: fix build errors
1 parent d4faad2 commit 4c778a7

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

acpi/src/handler.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use core::{fmt, ops::Deref, pin::Pin, ptr::NonNull};
1+
use core::{fmt, ops::{Deref, DerefMut}, pin::Pin, ptr::NonNull};
22

33
/// Describes a physical mapping created by `AcpiHandler::map_physical_region` and unmapped by
44
/// `AcpiHandler::unmap_physical_region`. The region mapped must be at least `size_of::<T>()`
@@ -102,6 +102,7 @@ where
102102

103103
impl<H, T> DerefMut for PhysicalMapping<H, T>
104104
where
105+
T: Unpin,
105106
H: AcpiHandler,
106107
{
107108
fn deref_mut(&mut self) -> &mut T {

acpi/src/madt.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ unsafe impl AcpiTable for Madt {
6161
}
6262

6363
impl Madt {
64-
pub fn get_mpwk_mailbox_addr(&self) -> Result<u64, AcpiError> {
64+
pub fn get_mpwk_mailbox_addr(self: Pin<&Self>) -> Result<u64, AcpiError> {
6565
for entry in self.entries() {
6666
if let MadtEntry::MultiprocessorWakeup(entry) = entry {
6767
return Ok(entry.mailbox_address);

acpi/src/platform/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ where
153153
H: AcpiHandler,
154154
{
155155
let madt = tables.find_table::<Madt>()?;
156-
let mailbox_addr = madt.get_mpwk_mailbox_addr()?;
156+
let mailbox_addr = madt.get().get_mpwk_mailbox_addr()?;
157157
let mut mpwk_mapping = unsafe {
158158
handler.map_physical_region::<MultiprocessorWakeupMailbox>(
159159
mailbox_addr as usize,

0 commit comments

Comments
 (0)