Home
last modified time | relevance | path

Searched refs:ProcessorId (Results 1 – 25 of 31) sorted by relevance

12

/DragonOS/kernel/src/libs/
H A Dcpumask.rs5 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 Dcpu.rs7 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 Dcpu.rs5 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()
H A Dacpi.rs2 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()
/DragonOS/kernel/src/smp/cpu/
H A Dmod.rs17 int_like!(ProcessorId, AtomicProcessorId, u32, AtomicU32);
19 impl ProcessorId { implementation
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 Dcore.rs1 use super::cpu::ProcessorId;
5 pub fn smp_get_processor_id() -> ProcessorId { in smp_get_processor_id()
H A Dmod.rs10 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 Dmod.rs19 cpu::{smp_cpu_manager, CpuHpCpuState, ProcessorId, SmpCpuManager},
130 pub unsafe fn set_phys_id(&self, cpu_id: ProcessorId, phys_id: usize) { in set_phys_id() argument
166 smp_cpu_manager().set_possible_cpu(ProcessorId::new(0), true); in build_cpu_map()
167 smp_cpu_manager().set_present_cpu(ProcessorId::new(0), true); in build_cpu_map()
168 smp_cpu_manager().set_online_cpu(ProcessorId::new(0)); in build_cpu_map()
173 smp_cpu_manager().set_possible_cpu(ProcessorId::new(cpu as u32), true); in build_cpu_map()
174 smp_cpu_manager().set_present_cpu(ProcessorId::new(cpu as u32), true); in build_cpu_map()
217 fn start_cpu(cpu_id: ProcessorId, _cpu_hpstate: &CpuHpCpuState) -> Result<(), SystemError> { in start_cpu() argument
263 pub fn arch_init(_boot_cpu: ProcessorId) { in arch_init() argument
/DragonOS/kernel/src/arch/x86_64/kvm/vmx/
H A Dept.rs8 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 Dmod.rs5 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 Dtick_common.rs4 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 Dkernel_mapper.rs14 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 Dpercpu.rs9 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 Dmod.rs15 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 Didle.rs12 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 Dmod.rs61 cpu::{AtomicProcessorId, ProcessorId},
1273 pub fn new(on_cpu: Option<ProcessorId>) -> Self { in new()
1274 let cpu_id = on_cpu.unwrap_or(ProcessorId::INVALID); in new()
1297 pub fn on_cpu(&self) -> Option<ProcessorId> { in on_cpu() argument
1299 if on_cpu == ProcessorId::INVALID { in on_cpu()
1306 pub fn set_on_cpu(&self, on_cpu: Option<ProcessorId>) { in set_on_cpu() argument
1310 self.on_cpu.store(ProcessorId::INVALID, Ordering::SeqCst); in set_on_cpu()
/DragonOS/kernel/src/exception/
H A Dipi.rs11 smp::cpu::ProcessorId,
40 Specified(ProcessorId),
H A Dsoftirq.rs21 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 Dlapic_vector.rs30 smp::{core::smp_get_processor_id, cpu::ProcessorId},
135 cpu: ProcessorId, in new() argument
162 cpu: ProcessorId,
163 prev_cpu: Option<ProcessorId>,
H A Dapic_timer.rs16 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 Dlru.rs4 use crate::smp::cpu::ProcessorId;
144 .force_get_mut(ProcessorId::new(cpu)) in lookup_percpu_elem()
H A Dhash_map.rs5 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 Dipi.rs17 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 Dmod.rs19 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 Dmod.rs36 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

12