Home
last modified time | relevance | path

Searched refs:size (Results 1 – 22 of 22) sorted by relevance

/rust/kernel/alloc/
A Dallocator_test.rs27 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 Dallocator.rs54 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 Dlayout.rs67 Some(size) if size <= ISIZE_MAX => { in new()
/rust/helpers/
A Ddma.c5 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 Dvmalloc.c6 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 Dslab.c12 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 Dio.c6 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 Dmem.rs166 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 Dresource.rs46 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 Dioctl.rs13 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 Dfirmware.rs95 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 Dbug.rs42 size = const ::core::mem::size_of::<$crate::bindings::bug_entry>(),
68 size = const ::core::mem::size_of::<$crate::bindings::bug_entry>(),
A Ddma.rs309 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 Ddevice_id.rs64 pub const fn size(&self) -> usize { in size() method
203 static $module_table_name: [::core::mem::MaybeUninit<u8>; $table_name.raw_ids().size()] =
A Dio.rs199 const fn offset_valid<U>(offset: usize, size: usize) -> bool { in offset_valid()
202 end <= size && offset % type_size == 0 in offset_valid()
A Dconfigfs.rs567 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 Dstr.rs899 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 Dlinked_list.rs71 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 Dmod.rs20 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 Dgen_disk.rs48 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 Dvirt.rs116 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 Ddriver.rs37 size: usize,

Completed in 36 milliseconds