| /linux/drivers/android/binder/ |
| H A D | deferred_close.rs | 23 inner: KBox<DeferredFdCloserInner>, 48 inner: KBox::new( in new() 83 let inner = KBox::into_raw(self.inner); in close_fd() 115 unsafe { drop(KBox::from_raw(inner)) }; in close_fd() 178 let inner = unsafe { KBox::from_raw(inner.cast::<DeferredFdCloserInner>()) }; in do_close_fd()
|
| /linux/samples/rust/ |
| H A D | rust_debugfs_scoped.rs | 78 let blob = KBox::pin_init(new_mutex!([0x42; SZ_4K]), GFP_KERNEL)?; in create_file_write() 80 let scope = KBox::pin_init( in create_file_write() 102 _data: Pin<KBox<Scope<ModuleData>>>, 109 devices: Mutex<KVec<Pin<KBox<Scope<DeviceData>>>>>, 126 blob: Pin<KBox<Mutex<[u8; SZ_4K]>>>, 141 _data: KBox::pin_init(init_control(&base_dir, dyn_dirs), GFP_KERNEL)?, in init()
|
| H A D | rust_misc_device.rs | 156 type Ptr = Pin<KBox<Self>>; 158 fn open(_file: &File, misc: &MiscDeviceRegistration<Self>) -> Result<Pin<KBox<Self>>> { in open() 163 KBox::try_pin_init( in open()
|
| H A D | rust_configfs.rs | 31 bar: Mutex<(KBox<[u8; PAGE_SIZE]>, usize)>, 38 bar <- new_mutex!((KBox::new([0; PAGE_SIZE], flags::GFP_KERNEL)?, 0)), in new()
|
| /linux/rust/kernel/drm/ |
| H A D | file.rs | 21 fn open(device: &drm::Device<Self::Driver>) -> Result<Pin<KBox<Self>>>; 82 let driver_priv = KBox::into_raw(unsafe { Pin::into_inner_unchecked(inner) }); in open_callback() 98 // SAFETY: `file.driver_priv` has been created in `open_callback` through `KBox::into_raw`. 99 let _ = unsafe { KBox::from_raw(file.driver_priv()) };
|
| /linux/rust/kernel/ |
| H A D | rbtree.rs | 559 unsafe { drop(KBox::from_raw(this)) }; in drop() 925 let node = unsafe { KBox::from_raw(this) }; in remove_current() 961 let node = unsafe { KBox::from_raw(this) }; in remove_neighbor() 1190 node: KBox<MaybeUninit<Node<K, V>>>, 1198 node: KBox::new_uninit(flags)?, in new() 1215 let node = KBox::write( in into_node() 1232 node: KBox<Node<K, V>>, 1244 let node = KBox::into_inner(self.node); in to_key_value() 1268 node: KBox::drop_contents(self.node), in into_reservation() 1319 let node = KBox::into_raw(node.node); in insert() [all …]
|
| H A D | workqueue.rs | 350 self.enqueue(KBox::pin_init(init, flags).map_err(|_| AllocError)?); 366 type Pointer = Pin<KBox<Self>>; in run() 368 fn run(mut this: Pin<KBox<Self>>) { 434 /// This trait is implemented by `Pin<KBox<T>>`, [`Arc<T>`] and [`ARef<T>`], and 467 /// `Pin<KBox<Self>>`. 885 unsafe impl<T, const ID: u64> WorkItemPointer<ID> for Pin<KBox<T>> in run() 896 let boxed = unsafe { KBox::from_raw(ptr) }; 905 unsafe impl<T, const ID: u64> RawWorkItem<ID> for Pin<KBox<T>> in __enqueue() 919 let ptr = KBox::into_raw(boxed); in __enqueue() 921 // SAFETY: Pointers into a `KBox` poin in __enqueue() [all...] |
| H A D | device.rs | 227 let data = KBox::pin_init(data, GFP_KERNEL)?; in set_drvdata() 242 pub(crate) unsafe fn drvdata_obtain<T: 'static>(&self) -> Option<Pin<KBox<T>>> { in drvdata_obtain() 257 Some(unsafe { Pin::<KBox<T>>::from_foreign(ptr.cast()) }) in drvdata_obtain() 293 unsafe { Pin::<KBox<T>>::borrow(ptr.cast()) } in drvdata_unchecked()
|
| H A D | auxiliary.rs | 276 let _ = unsafe { KBox::<Opaque<bindings::auxiliary_device>>::from_raw(adev.cast()) }; in release() 349 let boxed = KBox::new(Opaque::<bindings::auxiliary_device>::zeroed(), GFP_KERNEL)?; in new() 367 let _ = KBox::into_raw(boxed); in new()
|
| H A D | prelude.rs | 65 KBox,
|
| H A D | alloc.rs | 11 pub use self::kbox::KBox;
|
| H A D | devres.rs | 430 let data = KBox::pin_init(data, flags)?; in register()
|
| H A D | cpufreq.rs | 903 pub struct Registration<T: Driver>(KBox<UnsafeCell<bindings::cpufreq_driver>>, PhantomData<T>); 1039 let mut drv = KBox::new(UnsafeCell::new(Self::VTABLE), GFP_KERNEL)?; in new()
|
| /linux/rust/kernel/sync/ |
| H A D | arc.rs | 20 alloc::{AllocError, Flags, KBox}, 227 let inner = KBox::new(value, flags)?; in new() 228 let inner = KBox::leak(inner).into(); in new() 367 const FOREIGN_ALIGN: usize = <KBox<ArcInner<T>> as ForeignOwnable>::FOREIGN_ALIGN; 467 unsafe { drop(KBox::from_raw(self.ptr.as_ptr())) }; in drop() 746 let inner = KBox::try_init::<AllocError>( in new_uninit() 756 inner: unsafe { Arc::from_inner(KBox::leak(inner).into()) }, in new_uninit()
|
| /linux/drivers/gpu/drm/nova/ |
| H A D | file.rs | 18 fn open(_dev: &NovaDevice) -> Result<Pin<KBox<Self>>> { in open() 19 Ok(KBox::new(Self, GFP_KERNEL)?.into()) in open()
|
| /linux/rust/kernel/drm/gem/ |
| H A D | mod.rs | 269 let obj: Pin<KBox<Self>> = KBox::pin_init( 284 let ptr = KBox::into_raw(unsafe { Pin::into_inner_unchecked(obj) }); 286 // SAFETY: `ptr` comes from `KBox::into_raw` and hence can't be NULL. 318 // SAFETY: All of our objects are allocated via `KBox`, and we're in the 321 let _ = unsafe { KBox::from_raw(this) };
|
| /linux/arch/arm64/boot/dts/freescale/ |
| H A D | fsl-ls1028a-kontron-kbox-a-230-ls.dts | 3 * Device Tree File for the Kontron KBox A-230-LS. 17 model = "Kontron KBox A-230-LS";
|
| /linux/drivers/block/rnull/ |
| H A D | rnull.rs | 74 type QueueData = KBox<QueueData>;
|
| /linux/drivers/gpu/nova-core/gsp/ |
| H A D | boot.rs | 153 let gsp_fw = KBox::pin_init(GspFirmware::new(dev, chipset, FIRMWARE_VERSION), GFP_KERNEL)?; in boot()
|
| /linux/rust/kernel/alloc/ |
| H A D | kvec.rs | 61 match $crate::alloc::KBox::new_uninit(GFP_KERNEL) { 62 Ok(b) => Ok($crate::alloc::KVec::from($crate::alloc::KBox::write(b, [$($x),+]))),
|
| H A D | kbox.rs | 93 pub type KBox<T> = Box<T, super::allocator::Kmalloc>; typedef
|