/DragonOS/kernel/src/libs/ |
H A D | cpumask.rs | 5 use crate::{mm::percpu::PerCpu, smp::cpu::ProcessorId}; 28 pub fn from_cpu(cpu: ProcessorId) -> Self { in from_cpu() 35 pub fn first(&self) -> Option<ProcessorId> { in first() argument 38 .map(|index| ProcessorId::new(index as u32)) in first() 42 pub fn first_zero(&self) -> Option<ProcessorId> { in first_zero() argument 45 .map(|index| ProcessorId::new(index as u32)) in first_zero() 49 pub fn last(&self) -> Option<ProcessorId> { in last() argument 52 .map(|index| ProcessorId::new(index as u32)) in last() 56 pub fn next_index(&self, cpu: ProcessorId) -> Option<ProcessorId> { in next_index() argument 59 .map(|index| ProcessorId::new(index as u32)) in next_index() [all …]
|
/DragonOS/kernel/src/arch/riscv64/ |
H A D | cpu.rs | 7 smp::cpu::{ProcessorId, SmpCpuManager}, 18 pub fn current_cpu_id() -> ProcessorId { in current_cpu_id() 27 impl Into<HartMask> for ProcessorId { implementation 58 pub current_cpu: ProcessorId, 67 pub fn new(cpu: ProcessorId) -> Self { in new() 74 pub fn current_cpu(&self) -> ProcessorId { in current_cpu() argument 78 pub fn set_current_cpu(&mut self, cpu: ProcessorId) { in set_current_cpu() argument 120 data.push(LocalContext::new(ProcessorId::new(i))); in init_local_context() 135 pub fn arch_init(_boot_cpu: ProcessorId) { in arch_init() argument
|
/DragonOS/kernel/src/arch/x86_64/ |
H A D | acpi.rs | 2 use crate::{driver::acpi::acpi_manager, mm::percpu::PerCpu, smp::cpu::ProcessorId}; 14 ProcessorId::new(0), in early_acpi_boot_init() 17 let mut cnt = ProcessorId::new(1); in early_acpi_boot_init() 23 cnt = ProcessorId::new(cnt.data() + 1); in early_acpi_boot_init()
|
H A D | cpu.rs | 5 use crate::smp::cpu::ProcessorId; 9 pub fn current_cpu_id() -> ProcessorId { in current_cpu_id() 12 return ProcessorId::new(cpu_id); in current_cpu_id()
|
/DragonOS/kernel/src/smp/cpu/ |
H A D | mod.rs | 17 int_like!(ProcessorId, AtomicProcessorId, u32, AtomicU32); 19 impl ProcessorId { impl 20 pub const INVALID: ProcessorId = ProcessorId::new(u32::MAX); 115 pub unsafe fn set_possible_cpu(&self, cpu: ProcessorId, value: bool) { in set_possible_cpu() argument 145 pub unsafe fn set_present_cpu(&self, cpu: ProcessorId, value: bool) { in set_present_cpu() argument 163 pub fn cpuhp_state(&self, cpu_id: ProcessorId) -> &CpuHpCpuState { in cpuhp_state() 168 fn cpuhp_state_mut(&self, cpu_id: ProcessorId) -> &mut CpuHpCpuState { in cpuhp_state_mut() 175 cpu_id: ProcessorId, in set_cpuhp_state() argument 188 pub fn set_online_cpu(&self, cpu_id: ProcessorId) { in set_online_cpu() argument 215 fn cpu_up(&self, cpu_id: ProcessorId, target_state: CpuHpState) -> Result<(), SystemError> { in cpu_up() argument [all …]
|
/DragonOS/kernel/src/smp/ |
H A D | core.rs | 1 use super::cpu::ProcessorId; 5 pub fn smp_get_processor_id() -> ProcessorId { in smp_get_processor_id()
|
H A D | mod.rs | 10 cpu::{smp_cpu_manager, smp_cpu_manager_init, CpuHpCpuState, ProcessorId}, 18 pub fn kick_cpu(cpu_id: ProcessorId) -> Result<(), SystemError> { in kick_cpu() 41 fn start_cpu(cpu_id: ProcessorId, hp_state: &CpuHpCpuState) -> Result<(), SystemError>; in start_cpu() argument
|
/DragonOS/kernel/src/arch/x86_64/smp/ |
H A D | mod.rs | 18 cpu::{smp_cpu_manager, CpuHpCpuState, ProcessorId, SmpCpuManager}, 128 pub unsafe fn set_phys_id(&self, cpu_id: ProcessorId, phys_id: usize) { in set_phys_id() argument 164 smp_cpu_manager().set_possible_cpu(ProcessorId::new(0), true); in build_cpu_map() 165 smp_cpu_manager().set_present_cpu(ProcessorId::new(0), true); in build_cpu_map() 166 smp_cpu_manager().set_online_cpu(ProcessorId::new(0)); in build_cpu_map() 171 smp_cpu_manager().set_possible_cpu(ProcessorId::new(cpu as u32), true); in build_cpu_map() 172 smp_cpu_manager().set_present_cpu(ProcessorId::new(cpu as u32), true); in build_cpu_map() 215 fn start_cpu(cpu_id: ProcessorId, _cpu_hpstate: &CpuHpCpuState) -> Result<(), SystemError> { in start_cpu() argument 261 pub fn arch_init(_boot_cpu: ProcessorId) { in arch_init() argument
|
/DragonOS/kernel/src/arch/x86_64/kvm/vmx/ |
H A D | ept.rs | 8 use crate::smp::cpu::ProcessorId; 30 const EPT_MAPPER_NO_PROCESSOR: ProcessorId = ProcessorId::INVALID; 46 fn lock_cpu(cpuid: ProcessorId, mapper: PageMapper) -> Self { in lock_cpu() argument
|
/DragonOS/kernel/src/arch/riscv64/smp/ |
H A D | mod.rs | 5 cpu::{CpuHpCpuState, ProcessorId}, 18 fn start_cpu(_cpu_id: ProcessorId, _hp_state: &CpuHpCpuState) -> Result<(), SystemError> { in start_cpu() argument
|
/DragonOS/kernel/src/time/ |
H A D | tick_common.rs | 4 smp::{core::smp_get_processor_id, cpu::ProcessorId}, 18 fn tick_periodic(cpu_id: ProcessorId, trap_frame: &TrapFrame) { in tick_periodic() argument
|
/DragonOS/kernel/src/mm/ |
H A D | kernel_mapper.rs | 14 cpu::{AtomicProcessorId, ProcessorId}, 24 const KERNEL_MAPPER_NO_PROCESSOR: ProcessorId = ProcessorId::INVALID; 39 fn lock_cpu(cpuid: ProcessorId, mapper: PageMapper) -> Self { in lock_cpu() argument
|
H A D | percpu.rs | 9 cpu::{smp_cpu_manager, ProcessorId}, 99 pub unsafe fn force_get(&self, cpu_id: ProcessorId) -> &T { in force_get() 104 pub unsafe fn force_get_mut(&self, cpu_id: ProcessorId) -> &mut T { in force_get_mut()
|
/DragonOS/kernel/src/arch/riscv64/init/ |
H A D | mod.rs | 15 smp::cpu::ProcessorId, 30 pub boot_hartid: ProcessorId, 38 boot_hartid: ProcessorId::new(0), 121 arch_boot_params_guard.arch.boot_hartid = ProcessorId::new(hartid); in early_setup_arch()
|
/DragonOS/kernel/src/process/ |
H A D | idle.rs | 12 smp::{core::smp_get_processor_id, cpu::ProcessorId}, 31 smp_get_processor_id() == ProcessorId::new(0), in init_idle() 61 idle_pcb.sched_info().set_on_cpu(Some(ProcessorId::new(i))); in init_idle()
|
H A D | mod.rs | 61 cpu::{AtomicProcessorId, ProcessorId}, 1276 pub fn new(on_cpu: Option<ProcessorId>) -> Self { in new() 1277 let cpu_id = on_cpu.unwrap_or(ProcessorId::INVALID); in new() 1300 pub fn on_cpu(&self) -> Option<ProcessorId> { in on_cpu() argument 1302 if on_cpu == ProcessorId::INVALID { in on_cpu() 1309 pub fn set_on_cpu(&self, on_cpu: Option<ProcessorId>) { in set_on_cpu() argument 1313 self.on_cpu.store(ProcessorId::INVALID, Ordering::SeqCst); in set_on_cpu()
|
/DragonOS/kernel/src/exception/ |
H A D | ipi.rs | 11 smp::cpu::ProcessorId, 40 Specified(ProcessorId),
|
H A D | softirq.rs | 21 smp::{core::smp_get_processor_id, cpu::ProcessorId}, 61 fn cpu_pending(cpu_id: ProcessorId) -> &'static mut VecStatus { in cpu_pending()
|
/DragonOS/kernel/src/arch/x86_64/driver/apic/ |
H A D | lapic_vector.rs | 30 smp::{core::smp_get_processor_id, cpu::ProcessorId}, 135 cpu: ProcessorId, in new() argument 162 cpu: ProcessorId, 163 prev_cpu: Option<ProcessorId>,
|
H A D | apic_timer.rs | 16 use crate::smp::cpu::ProcessorId; 39 cpu_id: ProcessorId, in local_apic_timer_instance() argument 46 cpu_id: ProcessorId, in local_apic_timer_instance_mut() argument 110 let mut local_apic_timer = local_apic_timer_instance_mut(ProcessorId::new(0)); in init_bsp_apic_timer()
|
/DragonOS/kernel/src/bpf/map/ |
H A D | lru.rs | 4 use crate::smp::cpu::ProcessorId; 144 .force_get_mut(ProcessorId::new(cpu)) in lookup_percpu_elem()
|
H A D | hash_map.rs | 5 use crate::smp::cpu::ProcessorId; 146 .force_get_mut(ProcessorId::new(cpu)) in lookup_percpu_elem()
|
/DragonOS/kernel/src/arch/x86_64/interrupt/ |
H A D | ipi.rs | 17 smp::cpu::ProcessorId, 103 fn cpu_id_to_apic_id(cpu_id: ProcessorId) -> x86::apic::ApicId { in cpu_id_to_apic_id() 194 pub fn ipi_send_smp_startup(target_cpu: ProcessorId) -> Result<(), SystemError> { in ipi_send_smp_startup()
|
/DragonOS/kernel/src/arch/riscv64/mm/ |
H A D | mod.rs | 19 smp::cpu::ProcessorId, 48 cpu: ProcessorId, in remote_invalidate_page() argument 62 pub fn remote_invalidate_all(cpu: ProcessorId) -> Result<(), SbiRet> { in remote_invalidate_all()
|
/DragonOS/kernel/src/sched/ |
H A D | mod.rs | 36 smp::{core::smp_get_processor_id, cpu::ProcessorId}, 76 .force_get(ProcessorId::new(cpu as u32)) in cpu_rq() 656 send_resched_ipi(ProcessorId::new(cpu as u32)); in resched_current() 970 fn __set_task_cpu(pcb: &Arc<ProcessControlBlock>, cpu: ProcessorId) { in __set_task_cpu() argument 999 pub fn send_resched_ipi(cpu: ProcessorId) { in send_resched_ipi() argument
|