u64 and usize are not the same type, sorry

This commit is contained in:
Guillaume DIDIER 2024-07-03 11:14:32 +02:00
parent 94af9a99cc
commit 35b3ec7143

View File

@ -98,10 +98,10 @@ fn monitor_core(addr: *const u8, cpu: u8) -> Result<Vec<u64>, Error> {
}; };
eprint!("Finding the number of CBox available... "); eprint!("Finding the number of CBox available... ");
let max_cbox = read_msr_on_cpu(performance_counters.msr_unc_cbo_config, cpu)? & 0xF; // TODO magic number (mask for bit 3:0) let max_cbox = (read_msr_on_cpu(performance_counters.msr_unc_cbo_config, cpu)? & 0xF) as usize; // TODO magic number (mask for bit 3:0)
eprintln!("{}", max_cbox); eprintln!("{}", max_cbox);
if max_cbox > performance_counters.max_slice as u64 { if max_cbox > performance_counters.max_slice as usize {
return Err(InvalidParameter); return Err(InvalidParameter);
} }