Fix multiple issues pointed out by the new compiler

This commit is contained in:
Zhang Junyang
2024-10-13 21:39:47 +08:00
committed by Tate, Hongliang Tian
parent 5f2bd9d0ac
commit 9e4257b655
62 changed files with 211 additions and 178 deletions

View File

@ -195,6 +195,7 @@ impl ApicId {
/// In x2APIC mode, the 32-bit logical x2APIC ID, which can be read from
/// LDR, is derived from the 32-bit local x2APIC ID:
/// Logical x2APIC ID = [(x2APIC ID[19:4] << 16) | (1 << x2APIC ID[3:0])]
#[allow(unused)]
pub fn x2apic_logical_id(&self) -> u32 {
self.x2apic_logical_cluster_id() << 16 | 1 << self.x2apic_logical_field_id()
}