Skip to content

Commit 3757600

Browse files
committed
refactor(x86_64): don't import is_uhyve directly
1 parent 274120e commit 3757600

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/arch/x86_64/kernel/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use x86_64::registers::control::{Cr0, Cr4};
1010

1111
pub(crate) use self::apic::{set_oneshot_timer, wakeup_core};
1212
use crate::arch::x86_64::kernel::core_local::*;
13-
use crate::env::{self, is_uhyve};
13+
use crate::env;
1414

1515
#[cfg(feature = "acpi")]
1616
pub mod acpi;
@@ -64,7 +64,7 @@ pub fn boot_processor_init() {
6464
processor::detect_features();
6565
processor::configure();
6666

67-
if cfg!(feature = "vga") && !is_uhyve() {
67+
if cfg!(feature = "vga") && !env::is_uhyve() {
6868
#[cfg(feature = "vga")]
6969
vga::init();
7070
}
@@ -84,7 +84,7 @@ pub fn boot_processor_init() {
8484
interrupts::install();
8585
systemtime::init();
8686

87-
if !is_uhyve() {
87+
if !env::is_uhyve() {
8888
#[cfg(feature = "acpi")]
8989
acpi::init();
9090
}
@@ -114,7 +114,7 @@ pub fn application_processor_init() {
114114
}
115115

116116
fn finish_processor_init() {
117-
if is_uhyve() {
117+
if env::is_uhyve() {
118118
// uhyve does not use apic::detect_from_acpi and therefore does not know the number of processors and
119119
// their APIC IDs in advance.
120120
// Therefore, we have to add each booted processor into the CPU_LOCAL_APIC_IDS vector ourselves.
@@ -132,7 +132,7 @@ pub fn boot_next_processor() {
132132
// to initialize the next processor.
133133
let cpu_online = CPU_ONLINE.fetch_add(1, Ordering::Release);
134134

135-
if !is_uhyve() {
135+
if !env::is_uhyve() {
136136
if cpu_online == 0 {
137137
#[cfg(all(target_os = "none", feature = "smp"))]
138138
apic::boot_application_processors();

0 commit comments

Comments
 (0)