More fixes for 32-bit x86

This commit is contained in:
Jeremy Soller
2024-02-16 20:58:54 -07:00
parent 2a4e292e1d
commit 2c672a0568
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -69,7 +69,7 @@ pub enum CfgType {
const_assert_eq!(core::mem::size_of::<CfgType>(), 1);
#[derive(Debug)]
#[repr(C, packed)]
#[repr(C)]
pub struct CommonCfg {
// About the whole device.
/// The driver uses this to select which feature bits device_feature shows.
@@ -152,6 +152,8 @@ pub struct CommonCfg {
pub queue_reset: VolatileCell<u16>,
}
//TODO: why does this fail on x86?
#[cfg(not(target_arch = "x86"))]
const_assert_eq!(core::mem::size_of::<CommonCfg>(), 64);
#[derive(Debug, Copy, Clone)]
+1 -1
View File
@@ -12,7 +12,7 @@ use std::sync::{Arc, Mutex};
use std::env;
use pcid_interface::{MsiSetFeatureInfo, PcidServerHandle, PciFeature, PciFeatureInfo, SetFeatureInfo};
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
#[cfg(target_arch = "x86_64")]
use pcid_interface::irq_helpers::allocate_single_interrupt_vector_for_msi;
use pcid_interface::irq_helpers::read_bsp_apic_id;
use pcid_interface::msi::MsixTableEntry;