Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions kernel/src/arch/x86_64/driver/tsc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ impl TSCManager {
return Err(SystemError::ENODEV);
}

if Self::cpu_khz() != 0 && Self::tsc_khz() != 0 {
return Ok(());
}

if unsafe { TSC_KHZ == 0 } {
if let Err(e) = Self::determine_cpu_tsc_frequency(false) {
error!("Failed to determine CPU TSC frequency: {:?}", e);
Expand Down Expand Up @@ -389,14 +385,6 @@ impl TSCManager {
TSC_KHZ = khz;
}
}

pub(crate) fn set_khz_from_kvm(khz: u64) {
if khz == 0 {
return;
}
Self::set_cpu_khz(khz);
Self::set_tsc_khz(khz);
}
}

/// # 从calibrate_cpu_by_pit_hpet_ptimer 解耦出,减少calibrate_cpu_by_pit_hpet_ptimer的栈帧
Expand Down
6 changes: 2 additions & 4 deletions kernel/src/arch/x86_64/init/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use x86::dtables::DescriptorTablePointer;

use crate::{
arch::{fpu::FpState, interrupt::trap::arch_trap_init, process::table::TSSManager},
driver::clocksource::{acpi_pm::init_acpi_pm_clocksource, kvm_clock},
driver::clocksource::acpi_pm::init_acpi_pm_clocksource,
init::init::start_kernel,
mm::{MemoryManagementArch, PhysAddr},
};
Expand Down Expand Up @@ -109,12 +109,10 @@ pub fn setup_arch() -> Result<(), SystemError> {
/// 架构相关的初始化(在IDLE的最后一个阶段)
#[inline(never)]
pub fn setup_arch_post() -> Result<(), SystemError> {
let kvmclock_ok = kvm_clock::kvmclock_init();

let ret = hpet_init();
if ret.is_ok() {
hpet_instance().hpet_enable().expect("hpet enable failed");
} else if !kvmclock_ok {
} else {
init_acpi_pm_clocksource().expect("acpi_pm_timer inits failed");
}
TSCManager::init().expect("tsc init failed");
Expand Down
45 changes: 0 additions & 45 deletions kernel/src/arch/x86_64/kvm_para.rs

This file was deleted.

2 changes: 0 additions & 2 deletions kernel/src/arch/x86_64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ pub mod interrupt;
pub mod ipc;
pub mod kexec;
pub mod kprobe;
pub mod kvm_para;
pub mod libs;
pub mod mm;
pub mod msi;
pub mod pci;
pub mod process;
pub mod pvclock;
pub mod rand;
pub mod reboot;
pub mod sched;
Expand Down
146 changes: 0 additions & 146 deletions kernel/src/arch/x86_64/pvclock.rs

This file was deleted.

Loading
Loading