| /rust/kernel/alloc/ |
| A D | allocator_test.rs | 27 fn libc_aligned_alloc(align: usize, size: usize) -> *mut crate::ffi::c_void; in libc_aligned_alloc() 46 if old_layout.size() == 0 { in realloc() 55 if layout.size() == 0 { in realloc() 85 let dst = unsafe { libc_aligned_alloc(layout.align(), layout.size()) }.cast::<u8>(); in realloc() 91 unsafe { dst.as_ptr().write_bytes(0, layout.size()) }; in realloc() 103 cmp::min(layout.size(), old_layout.size()), in realloc() 111 Ok(NonNull::slice_from_raw_parts(dst, layout.size())) in realloc()
|
| A D | allocator.rs | 54 layout.size() in aligned_size() 91 let size = aligned_size(layout); in call() 94 if old_layout.size() == 0 { in call() 113 self.0(ptr.cast(), size, flags.0).cast() in call() 116 let ptr = if size == 0 { in call() 122 Ok(NonNull::slice_from_raw_parts(ptr, size)) in call()
|
| A D | layout.rs | 67 Some(size) if size <= ISIZE_MAX => { in new()
|
| /rust/helpers/ |
| A D | dma.c | 5 void *rust_helper_dma_alloc_attrs(struct device *dev, size_t size, in rust_helper_dma_alloc_attrs() argument 9 return dma_alloc_attrs(dev, size, dma_handle, flag, attrs); in rust_helper_dma_alloc_attrs() 12 void rust_helper_dma_free_attrs(struct device *dev, size_t size, void *cpu_addr, in rust_helper_dma_free_attrs() argument 15 dma_free_attrs(dev, size, cpu_addr, dma_handle, attrs); in rust_helper_dma_free_attrs()
|
| A D | vmalloc.c | 6 rust_helper_vrealloc(const void *p, size_t size, gfp_t flags) in rust_helper_vrealloc() argument 8 return vrealloc(p, size, flags); in rust_helper_vrealloc()
|
| A D | slab.c | 12 rust_helper_kvrealloc(const void *p, size_t size, gfp_t flags) in rust_helper_kvrealloc() argument 14 return kvrealloc(p, size, flags); in rust_helper_kvrealloc()
|
| A D | io.c | 6 void __iomem *rust_helper_ioremap(phys_addr_t offset, size_t size) in rust_helper_ioremap() argument 8 return ioremap(offset, size); in rust_helper_ioremap() 11 void __iomem *rust_helper_ioremap_np(phys_addr_t offset, size_t size) in rust_helper_ioremap_np() argument 13 return ioremap_np(offset, size); in rust_helper_ioremap_np()
|
| /rust/kernel/io/ |
| A D | mem.rs | 166 let size = resource.size(); in ioremap() 172 size, in ioremap() 224 let size = resource.size().try_into()?; in ioremap() 225 if size == 0 { in ioremap() 238 unsafe { bindings::ioremap_np(res_start, size) } in ioremap() 243 unsafe { bindings::ioremap(res_start, size) } in ioremap() 250 let io = IoRaw::new(addr as usize, size)?; in ioremap()
|
| A D | resource.rs | 46 let (flags, start, size) = { in drop() 48 (res.flags(), res.start(), res.size()) in drop() 58 unsafe { release_fn(start, size) }; in drop() 101 size: ResourceSize, in request_region() 114 size, in request_region() 127 pub fn size(&self) -> ResourceSize { in size() method
|
| /rust/kernel/ |
| A D | ioctl.rs | 13 const fn _IOC(dir: u32, ty: u32, nr: u32, size: usize) -> u32 { in _IOC() 17 build_assert!(size <= (uapi::_IOC_SIZEMASK as usize)); in _IOC() 22 | ((size as u32) << uapi::_IOC_SIZESHIFT) in _IOC()
|
| A D | firmware.rs | 95 pub fn size(&self) -> usize { in size() method 97 unsafe { (*self.as_raw()).size } in size() 105 unsafe { core::slice::from_raw_parts((*self.as_raw()).data, self.size()) } in data()
|
| A D | bug.rs | 42 size = const ::core::mem::size_of::<$crate::bindings::bug_entry>(), 68 size = const ::core::mem::size_of::<$crate::bindings::bug_entry>(),
|
| A D | dma.rs | 309 let size = count in alloc_attrs() 317 size, in alloc_attrs() 360 pub fn size(&self) -> usize { in size() method 551 let size = self.count * core::mem::size_of::<T>(); in drop() 558 size, in drop()
|
| A D | device_id.rs | 64 pub const fn size(&self) -> usize { in size() method 203 static $module_table_name: [::core::mem::MaybeUninit<u8>; $table_name.raw_ids().size()] =
|
| A D | io.rs | 199 const fn offset_valid<U>(offset: usize, size: usize) -> bool { in offset_valid() 202 end <= size && offset % type_size == 0 in offset_valid()
|
| A D | configfs.rs | 567 Ok(size) => size as isize, in show() 586 size: usize, in store() 601 unsafe { core::slice::from_raw_parts(page.cast(), size) }, in store() 605 Ok(()) => size as isize, in store()
|
| A D | str.rs | 899 let size = f.bytes_written(); in try_from_fmt() 902 let mut buf = KVec::with_capacity(size, GFP_KERNEL)?; in try_from_fmt() 904 let mut f = unsafe { Formatter::from_buffer(buf.as_mut_ptr(), size) }; in try_from_fmt()
|
| /rust/pin-init/examples/ |
| A D | linked_list.rs | 71 pub fn size(&self) -> usize { in size() method 72 let mut size = 1; in size() variables 76 size += 1; in size() 78 size in size()
|
| /rust/kernel/drm/gem/ |
| A D | mod.rs | 20 fn new(dev: &drm::Device<T::Driver>, size: usize) -> impl PinInit<Self, Error>; in new() 137 fn size(&self) -> usize { in size() method 139 unsafe { (*self.as_raw()).size } in size() 232 pub fn new(dev: &drm::Device<T::Driver>, size: usize) -> Result<ARef<Self>> { in new() 236 data <- T::new(dev, size), in new() 248 to_result(unsafe { bindings::drm_gem_object_init(dev.as_raw(), obj.obj.get(), size) })?; in new()
|
| /rust/kernel/block/mq/ |
| A D | gen_disk.rs | 48 fn validate_block_size(size: u32) -> Result { in validate_block_size() 49 if !(512..=bindings::PAGE_SIZE as u32).contains(&size) || !size.is_power_of_two() { in validate_block_size()
|
| /rust/kernel/mm/ |
| A D | virt.rs | 116 pub fn zap_page_range_single(&self, address: usize, size: usize) { in zap_page_range_single() 117 let (end, did_overflow) = address.overflowing_add(size); in zap_page_range_single() 127 bindings::zap_page_range_single(self.as_ptr(), address, size, core::ptr::null_mut()) in zap_page_range_single()
|
| /rust/kernel/drm/ |
| A D | driver.rs | 37 size: usize,
|