Home
last modified time | relevance | path

Searched refs:try_into (Results 1 – 19 of 19) sorted by relevance

/DragonOS/kernel/src/arch/riscv64/pci/
H A Dpci_host_ecam.rs26 u32::from_be_bytes(bus_range[0..4].try_into().unwrap()), in pci_host_ecam_driver_init()
27 u32::from_be_bytes(bus_range[4..8].try_into().unwrap()), in pci_host_ecam_driver_init()
38 4 => u32::from_be_bytes(segement_group_number[0..4].try_into().unwrap()), in pci_host_ecam_driver_init()
53 segement_group_number.try_into().unwrap(), in pci_host_ecam_driver_init()
/DragonOS/kernel/src/arch/x86_64/asm/
H A Dbitops.rs11 return unsafe { _popcnt64((x & ((!x) - 1)).try_into().unwrap()) }; in ffz()
/DragonOS/kernel/src/bpf/map/
H A Darray_map.rs87 let index = u32::from_ne_bytes(key.try_into().map_err(|_| SystemError::EINVAL)?); in lookup_elem()
98 let index = u32::from_ne_bytes(key.try_into().map_err(|_| SystemError::EINVAL)?); in update_elem()
140 let index = u32::from_ne_bytes(key.try_into().map_err(|_| SystemError::EINVAL)?); in get_next_key()
247 let cpu_id = u32::from_ne_bytes(key.try_into().map_err(|_| SystemError::EINVAL)?); in lookup_elem()
253 let cpu_id = u32::from_ne_bytes(key.try_into().map_err(|_| SystemError::EINVAL)?); in update_elem()
259 let cpu_id = u32::from_ne_bytes(key.try_into().map_err(|_| SystemError::EINVAL)?); in delete_elem()
/DragonOS/kernel/crates/intertrait/src/
H A Dhasher.rs21 self.0 ^= u64::from_ne_bytes(u64_bytes.try_into().unwrap()); in write()
/DragonOS/kernel/src/libs/
H A Delf.rs444 let shoff: usize = ehdr.e_shoff.try_into()?; in parse_segments()
461 phnum = shdr0.sh_info.try_into()?; in parse_segments()
469 let phoff: usize = ehdr.e_phoff.try_into()?; in parse_segments()
565 seg.p_filesz.try_into().unwrap(), in load()
609 self.elf_page_start(VirtAddr::new(seg_to_load.p_vaddr.try_into().unwrap())), in load()
615 .try_into() in load()
659 let vaddr = VirtAddr::new(seg_to_load.p_vaddr.try_into().unwrap()); in load()
686 load_bias - TryInto::<usize>::try_into(seg_to_load.p_vaddr).unwrap(), in load()
728 + TryInto::<usize>::try_into(seg_to_load.p_vaddr).unwrap(), in load()
/DragonOS/kernel/src/driver/firmware/efi/
H A Dfdt.rs164 u32::from_be_bytes(prop.value[0..4].try_into().unwrap()) as u64 in do_get_fdt_prop()
166 u64::from_be_bytes(prop.value[0..8].try_into().unwrap()) in do_get_fdt_prop()
H A Dtables.rs125 let psize: usize = p.size.try_into().unwrap(); in parse_config_tables()
/DragonOS/kernel/src/driver/base/block/
H A Ddisk_info.rs58 fn try_into(self) -> Result<GeneralBlockRange, Self::Error> { in try_into() method
H A Dmanager.rs88 self.register_gendisk_with_range(dev, p.try_into()?)?; in check_mbr()
/DragonOS/user/apps/test_ebpf/src/
H A Dmain.rs27 let program: &mut KProbe = bpf.program_mut("syscall_ebpf").unwrap().try_into()?; in main()
/DragonOS/kernel/src/mm/
H A Dpercpu.rs74 if data.len() != cpu_num.try_into().unwrap() { in new()
/DragonOS/kernel/src/arch/x86_64/kvm/vmx/
H A Dvcpu.rs270 controlregs::cr0().bits().try_into().unwrap() in vmcs_init_host()
274 controlregs::cr4().bits().try_into().unwrap() in vmcs_init_host()
366 controlregs::cr0().bits().try_into().unwrap() in vmcs_init()
369 controlregs::cr4().bits().try_into().unwrap() in vmcs_init()
/DragonOS/kernel/src/time/
H A Dtimeconv.rs120 let guess_year = year + math_div(days.try_into().unwrap(), 365); in time_to_calendar()
H A Dclocksource.rs880 cs.set_unstable(cs_dev_nsec.abs_diff(wd_dev_nsec).try_into().unwrap())?; in clocksource_watchdog()
/DragonOS/kernel/src/driver/open_firmware/
H A Dfdt.rs470 u32::from_be_bytes(reg_value[base_index..base_index + 4].try_into().unwrap()) in read_cell()
478 u64::from_be_bytes(reg_value[base_index..base_index + 8].try_into().unwrap()), in read_cell()
/DragonOS/kernel/src/arch/x86_64/smp/
H A Dmod.rs126 (*p).cpu_count = cpu_count.try_into().unwrap(); in set_cpu_count()
/DragonOS/kernel/src/filesystem/
H A Deventfd.rs172 let val = u64::from_ne_bytes(buf[..8].try_into().unwrap()); in write_at()
/DragonOS/kernel/src/bpf/helper/
H A Dmod.rs84 let fd = u32::from_ne_bytes(fd.try_into().map_err(|_| SystemError::EINVAL)?); in perf_event_output()
/DragonOS/kernel/crates/rbpf/src/
H A Dcranelift.rs90 .try_into() in new()
1156 .try_into() in prepare_jump_blocks()