| /linux/rust/kernel/pci/ |
| H A D | id.rs | 8 bindings, 178 NOT_DEFINED = bindings::PCI_CLASS_NOT_DEFINED, // 0x000000 179 NOT_DEFINED_VGA = bindings::PCI_CLASS_NOT_DEFINED_VGA, // 0x000100 181 STORAGE_SCSI = bindings::PCI_CLASS_STORAGE_SCSI, // 0x010000 182 STORAGE_IDE = bindings::PCI_CLASS_STORAGE_IDE, // 0x010100 183 STORAGE_FLOPPY = bindings::PCI_CLASS_STORAGE_FLOPPY, // 0x010200 184 STORAGE_IPI = bindings::PCI_CLASS_STORAGE_IPI, // 0x010300 185 STORAGE_RAID = bindings::PCI_CLASS_STORAGE_RAID, // 0x010400 186 STORAGE_SATA = bindings::PCI_CLASS_STORAGE_SATA, // 0x010600 187 STORAGE_SATA_AHCI = bindings [all...] |
| /linux/drivers/gpu/nova-core/gsp/ |
| H A D | fw.rs | 7 use r570_144 as bindings; 98 num::u32_as_usize(bindings::GSP_MSG_QUEUE_ELEMENT_SIZE_MAX); 113 u64::from(bindings::GSP_FW_HEAP_PARAM_BASE_RM_SIZE_TU10X) in base_rm_size() 118 u64::from(bindings::GSP_FW_HEAP_PARAM_CLIENT_ALLOC_SIZE) in client_alloc_size() 128 u64::from(bindings::GSP_FW_HEAP_PARAM_SIZE_PER_GB_FB) in management_overhead() 146 carveout_size: num::u32_as_u64(bindings::GSP_FW_HEAP_PARAM_OS_SIZE_LIBOS2), 147 allowed_heap_size: num::u32_as_u64(bindings::GSP_FW_HEAP_SIZE_OVERRIDE_LIBOS2_MIN_MB) 149 ..num::u32_as_u64(bindings::GSP_FW_HEAP_SIZE_OVERRIDE_LIBOS2_MAX_MB) 155 carveout_size: num::u32_as_u64(bindings::GSP_FW_HEAP_PARAM_OS_SIZE_LIBOS3_BAREMETAL), 157 bindings::GSP_FW_HEAP_SIZE_OVERRIDE_LIBOS3_BAREMETAL_MIN_MB, [all …]
|
| /linux/rust/kernel/fs/ |
| H A D | file.rs | 11 bindings, 23 pub type Offset = bindings::loff_t; 28 pub const O_APPEND: u32 = bindings::O_APPEND; 31 pub const O_ASYNC: u32 = bindings::FASYNC; 34 pub const O_CLOEXEC: u32 = bindings::O_CLOEXEC; 37 pub const O_CREAT: u32 = bindings::O_CREAT; 40 pub const O_DIRECT: u32 = bindings::O_DIRECT; 43 pub const O_DIRECTORY: u32 = bindings::O_DIRECTORY; 46 pub const O_DSYNC: u32 = bindings::O_DSYNC; 49 pub const O_EXCL: u32 = bindings::O_EXCL; [all …]
|
| /linux/rust/kernel/ |
| H A D | sizes.rs | 93 pub const $name: usize = bindings::$name as usize;
|
| H A D | task.rs | 8 bindings, 24 pub const TASK_INTERRUPTIBLE: c_int = bindings::TASK_INTERRUPTIBLE as c_int; 26 pub const TASK_UNINTERRUPTIBLE: c_int = bindings::TASK_UNINTERRUPTIBLE as c_int; 28 pub const TASK_FREEZABLE: c_int = bindings::TASK_FREEZABLE as c_int; 31 pub const TASK_NORMAL: c_uint = bindings::TASK_NORMAL as c_uint; 96 pub struct Task(pub(crate) Opaque<bindings::task_struct>); 148 pub type Pid = bindings::pid_t; 153 kuid: bindings::kuid_t, 161 pub fn current_raw() -> *mut bindings::task_struct { in current_raw() 163 unsafe { bindings::get_current() } in current_raw() [all …]
|
| H A D | opp.rs | 35 ptr: *mut bindings::cpufreq_frequency_table, 41 let mut ptr: *mut bindings::cpufreq_frequency_table = ptr::null_mut(); in new() 46 bindings::dev_pm_opp_init_cpufreq_table(table.dev.as_raw(), &mut ptr) in new() 77 bindings::dev_pm_opp_free_cpufreq_table(self.dev.as_raw(), &mut self.as_raw()) in drop() 185 to_result(unsafe { bindings::dev_pm_opp_add_dynamic(dev.as_raw(), &mut data.0) })?; in new() 197 unsafe { bindings::dev_pm_opp_remove(self.dev.as_raw(), self.freq.into()) }; in drop() 225 pub struct Data(bindings::dev_pm_opp_data); 232 Self(bindings::dev_pm_opp_data { in new() 306 _data: *mut *mut bindings::regulator, in config_regulators() 322 unsafe { bindings::dev_pm_opp_clear_config(self.0) }; in drop() [all …]
|
| H A D | usb.rs | 9 bindings, 38 // - `bindings::usb_driver` is a C type declared as `repr(C)`. 43 type DriverType = bindings::usb_driver; 66 bindings::usb_register_driver(udrv.get(), module.0, name.as_char_ptr()) in register() 72 unsafe { bindings::usb_deregister(udrv.get()) }; in unregister() 78 intf: *mut bindings::usb_interface, 79 id: *const bindings::usb_device_id, in probe_callback() 101 extern "C" fn disconnect_callback(intf: *mut bindings::usb_interface) { in probe_callback() 124 pub struct DeviceId(bindings::usb_device_id); 129 Self(bindings [all...] |
| H A D | kunit.rs | 25 bindings::_printk( in err() 45 bindings::_printk( in info() 73 let kunit_test = unsafe { $crate::bindings::kunit_get_current_test() }; 96 struct Location($crate::bindings::kunit_loc); 99 struct UnaryAssert($crate::bindings::kunit_unary_assert); 109 static LOCATION: Location = Location($crate::bindings::kunit_loc { 113 static ASSERTION: UnaryAssert = UnaryAssert($crate::bindings::kunit_unary_assert { 114 assert: $crate::bindings::kunit_assert {}, 138 $crate::bindings::__kunit_do_failed_assertion( 141 $crate::bindings::kunit_assert_type_KUNIT_ASSERTION, [all …]
|
| H A D | configfs.rs | 130 subsystem: Opaque<bindings::configfs_subsystem>, 154 |place: &mut Opaque<bindings::configfs_subsystem>| { in new() 157 bindings::config_group_init_type_name( in new() 166 bindings::__mutex_init( in new() 180 unsafe { bindings::configfs_register_subsystem(this.subsystem.get()) }, in new() 190 unsafe { bindings::configfs_unregister_subsystem(self.subsystem.get()) }; in drop() 192 unsafe { bindings::mutex_destroy(&raw mut (*self.subsystem.get()).su_mutex) }; in drop() 197 /// `bindings::config_group`. 203 /// - Implementers of this trait must embed a `bindings::config_group`. 206 /// Return the address of the `bindings [all...] |
| H A D | auxiliary.rs | 8 bindings, 43 type DriverType = bindings::auxiliary_driver; 66 bindings::__auxiliary_driver_register(adrv.get(), module.0, name.as_char_ptr()) in register() 72 unsafe { bindings::auxiliary_driver_unregister(adrv.get()) } in unregister() 78 adev: *mut bindings::auxiliary_device, in probe_callback() 79 id: *const bindings::auxiliary_device_id, in probe_callback() 100 extern "C" fn remove_callback(adev: *mut bindings::auxiliary_device) { in remove_callback() 127 pub struct DeviceId(bindings::auxiliary_device_id); 135 let mut id: bindings::auxiliary_device_id = pin_init::zeroed(); in new() 159 type RawType = bindings::auxiliary_device_id; [all …]
|
| H A D | pci.rs | 8 bindings, 66 type DriverType = bindings::pci_driver; 89 bindings::__pci_register_driver(pdrv.get(), module.0, name.as_char_ptr()) in register() 95 unsafe { bindings::pci_unregister_driver(pdrv.get()) } in unregister() 101 pdev: *mut bindings::pci_dev, in probe_callback() 102 id: *const bindings::pci_device_id, in probe_callback() 123 extern "C" fn remove_callback(pdev: *mut bindings::pci_dev) { in remove_callback() 164 pub struct DeviceId(bindings::pci_device_id); 174 Self(bindings::pci_device_id { in from_id() 191 Self(bindings::pci_device_id { in from_class() [all …]
|
| H A D | mm.rs | 15 bindings, 49 mm: Opaque<bindings::mm_struct>, 62 unsafe { bindings::mmgrab(self.as_raw()) }; in inc_ref() 68 unsafe { bindings::mmdrop(obj.cast().as_ptr()) }; in dec_ref() 98 unsafe { bindings::mmget(self.as_raw()) }; in inc_ref() 104 unsafe { bindings::mmput(obj.cast().as_ptr()) }; in dec_ref() 122 pub fn as_raw(&self) -> *mut bindings::mm_struct { in as_raw() 133 pub unsafe fn from_raw<'a>(ptr: *const bindings::mm_struct) -> &'a Mm { in from_raw() 143 let success = unsafe { bindings::mmget_not_zero(self.as_raw()) }; in mmget_not_zero() 163 pub unsafe fn from_raw<'a>(ptr: *const bindings::mm_struct) -> &'a MmWithUser { in from_raw() [all …]
|
| H A D | cpufreq.rs | 38 const CPUFREQ_NAME_LEN: usize = bindings::CPUFREQ_NAME_LEN as usize; 41 pub const DEFAULT_TRANSITION_LATENCY_NS: u32 = bindings::CPUFREQ_DEFAULT_TRANSITION_LATENCY_NS; 130 pub struct PolicyData(Opaque<bindings::cpufreq_policy_data>); 140 pub unsafe fn from_raw_mut<'a>(ptr: *mut bindings::cpufreq_policy_data) -> &'a mut Self { in from_raw_mut() 150 pub fn as_raw(&self) -> *mut bindings::cpufreq_policy_data { in as_raw() 159 to_result(unsafe { bindings::cpufreq_generic_frequency_table_verify(self.as_raw()) }) in generic_verify() 224 pub struct Table(Opaque<bindings::cpufreq_frequency_table>); 234 pub unsafe fn from_raw<'a>(ptr: *const bindings::cpufreq_frequency_table) -> &'a Self { in from_raw() 244 pub fn as_raw(&self) -> *mut bindings::cpufreq_frequency_table { in as_raw() 278 entries: Pin<KVec<bindings::cpufreq_frequency_table>>, [all …]
|
| H A D | scatterlist.rs | 34 bindings, 54 pub struct SGEntry(Opaque<bindings::scatterlist>); 70 unsafe fn from_raw<'a>(ptr: *mut bindings::scatterlist) -> &'a Self { in from_raw() 78 fn as_raw(&self) -> *mut bindings::scatterlist { in as_raw() 88 unsafe { bindings::sg_dma_address(self.as_raw()) } in dma_address() 96 unsafe { bindings::sg_dma_len(self.as_raw()) }.into() in dma_len() 103 pub struct Borrowed(Opaque<bindings::sg_table>); 145 pub unsafe fn from_raw<'a>(ptr: *mut bindings::sg_table) -> &'a Self { in from_raw() 152 fn as_raw(&self) -> *mut bindings::sg_table { in as_raw() 185 sgt: NonNull<bindings [all...] |
| H A D | xarray.rs | 8 alloc, bindings, build_assert, 23 /// `self.xa` is always an initialized and valid [`bindings::xarray`] whose entries are either 58 xa: Opaque<bindings::xarray>, 75 unsafe { bindings::xa_destroy(self.xa.get()) }; in drop() 91 AllocKind::Alloc => bindings::XA_FLAGS_ALLOC, in new() 92 AllocKind::Alloc1 => bindings::XA_FLAGS_ALLOC1, in new() 97 // INVARIANT: `xa` is initialized here to an empty, valid [`bindings::xarray`]. in new() 99 bindings::xa_init_flags(xa, flags) in new() 110 bindings::xa_find(self.xa.get(), &mut index, usize::MAX, bindings in iter() [all...] |
| H A D | clk.rs | 129 pub struct Clk(*mut bindings::clk); 151 bindings::clk_get(dev.as_raw(), con_id) in as_raw() 157 pub fn as_raw(&self) -> *mut bindings::clk { 170 to_result(unsafe { bindings::clk_enable(self.as_raw()) }) 182 unsafe { bindings::clk_disable(self.as_raw()) }; 194 to_result(unsafe { bindings::clk_prepare(self.as_raw()) }) 206 unsafe { bindings::clk_unprepare(self.as_raw()) }; 216 to_result(unsafe { bindings::clk_prepare_enable(self.as_raw()) }) 226 unsafe { bindings::clk_disable_unprepare(self.as_raw()) }; 238 Hertz(unsafe { bindings [all...] |
| H A D | i2c.rs | 38 pub struct DeviceId(bindings::i2c_device_id); 48 let mut i2c: bindings::i2c_device_id = pin_init::zeroed(); in new() 62 type RawType = bindings::i2c_device_id; 67 const DRIVER_DATA_OFFSET: usize = core::mem::offset_of!(bindings::i2c_device_id, driver_data); 95 // - `bindings::i2c_driver` is a C type declared as `repr(C)`. 100 type DriverType = bindings::i2c_driver; 145 to_result(unsafe { bindings::i2c_register_driver(module.0, idrv.get()) }) in register() 150 unsafe { bindings::i2c_del_driver(idrv.get()) } in unregister() 155 extern "C" fn probe_callback(idev: *mut bindings::i2c_client) -> kernel::ffi::c_int { 173 extern "C" fn remove_callback(idev: *mut bindings in probe_callback() [all...] |
| H A D | device.rs | 8 bindings, 26 static_assert!(core::mem::size_of::<bindings::driver_type>() >= core::mem::size_of::<TypeId>()); 83 /// Opaque<bindings::bus_device_type>, 129 /// dev: Opaque<bindings::class_device_type>, 163 /// `bindings::device::release` is valid to be called from any thread, hence `ARef<Device>` can be 170 pub struct Device<Ctx: DeviceContext = Normal>(Opaque<bindings::device>, PhantomData<Ctx>); 181 /// It must also be ensured that `bindings::device::release` can be called from any thread. 183 pub unsafe fn get_device(ptr: *mut bindings::device) -> ARef<Self> { in get_device() 230 unsafe { bindings::dev_set_drvdata(self.as_raw(), data.into_foreign().cast()) }; in set_drvdata() 244 let ptr = unsafe { bindings in drvdata_obtain() [all...] |
| /linux/rust/kernel/mm/ |
| H A D | virt.rs | 18 bindings, 36 vma: Opaque<bindings::vm_area_struct>, 49 pub unsafe fn from_raw<'a>(vma: *const bindings::vm_area_struct) -> &'a Self { in from_raw() 56 pub fn as_ptr(&self) -> *mut bindings::vm_area_struct { in as_ptr() 126 unsafe { bindings::zap_vma_range(self.as_ptr(), address, size) }; in zap_page_range_single() 183 pub unsafe fn from_raw<'a>(vma: *const bindings::vm_area_struct) -> &'a Self { 195 to_result(unsafe { bindings::vm_insert_page(self.as_ptr(), address, page.as_ptr()) }) in vm_insert_page() 232 pub unsafe fn from_raw<'a>(vma: *mut bindings::vm_area_struct) -> &'a Self { 386 pub use bindings::vm_flags_t; 391 use crate::bindings; [all...] |
| /linux/rust/kernel/irq/ |
| H A D | flags.rs | 4 use crate::bindings; 31 pub const TRIGGER_NONE: Flags = Flags::new(bindings::IRQF_TRIGGER_NONE); 34 pub const TRIGGER_RISING: Flags = Flags::new(bindings::IRQF_TRIGGER_RISING); 37 pub const TRIGGER_FALLING: Flags = Flags::new(bindings::IRQF_TRIGGER_FALLING); 40 pub const TRIGGER_HIGH: Flags = Flags::new(bindings::IRQF_TRIGGER_HIGH); 43 pub const TRIGGER_LOW: Flags = Flags::new(bindings::IRQF_TRIGGER_LOW); 46 pub const SHARED: Flags = Flags::new(bindings::IRQF_SHARED); 49 pub const PROBE_SHARED: Flags = Flags::new(bindings::IRQF_PROBE_SHARED); 52 pub const TIMER: Flags = Flags::new(bindings::IRQF_TIMER); 55 pub const PERCPU: Flags = Flags::new(bindings::IRQF_PERCPU); [all …]
|
| /linux/rust/kernel/debugfs/ |
| H A D | file_ops.rs | 33 operations: bindings::file_operations, 44 const unsafe fn new(operations: bindings::file_operations, mode: u16) -> Self { 69 type Target = bindings::file_operations; 92 inode: *mut bindings::inode, in writer_open() 93 file: *mut bindings::file, in writer_open() 103 unsafe { bindings::single_open(file, Some(writer_act::<T>), data) } in writer_act() 113 seq: *mut bindings::seq_file, in writer_act() 133 let operations = bindings::file_operations { 134 read: Some(bindings::seq_read), 135 llseek: Some(bindings [all...] |
| /linux/rust/kernel/drm/gem/ |
| H A D | mod.rs | 8 bindings, 53 unsafe { bindings::drm_gem_object_get(self.as_raw()) }; 61 unsafe { bindings::drm_gem_object_put(obj) }; 104 fn as_raw(&self) -> *mut bindings::drm_gem_object; in as_raw() 113 unsafe fn from_raw<'a>(self_ptr: *mut bindings::drm_gem_object) -> &'a Self; in from_raw() 117 raw_obj: *mut bindings::drm_gem_object, in open_callback() 118 raw_file: *mut bindings::drm_file, in open_callback() 134 raw_obj: *mut bindings::drm_gem_object, in close_callback() 135 raw_file: *mut bindings::drm_file, in close_callback() 148 fn as_raw(&self) -> *mut bindings::drm_gem_object { in as_raw() [all …]
|
| H A D | shmem.rs | 63 obj: Opaque<bindings::drm_gem_shmem_object>, 80 const VTABLE: bindings::drm_gem_object_funcs = bindings::drm_gem_object_funcs { 84 print_info: Some(bindings::drm_gem_shmem_object_print_info), 86 pin: Some(bindings::drm_gem_shmem_object_pin), 87 unpin: Some(bindings::drm_gem_shmem_object_unpin), 88 get_sg_table: Some(bindings::drm_gem_shmem_object_get_sg_table), 89 vmap: Some(bindings::drm_gem_shmem_object_vmap), 90 vunmap: Some(bindings::drm_gem_shmem_object_vunmap), 91 mmap: Some(bindings::drm_gem_shmem_object_mmap), 96 vm_ops: unsafe { &raw const bindings::drm_gem_shmem_vm_ops }, constant [all …]
|
| /linux/rust/kernel/sync/ |
| H A D | completion.rs | 9 use crate::{bindings, prelude::*, types::Opaque}; 69 inner: Opaque<bindings::completion>, 82 inner <- Opaque::ffi_init(|slot: *mut bindings::completion| { in new() 84 unsafe { bindings::init_completion(slot) }; in new() 89 fn as_raw(&self) -> *mut bindings::completion { in as_raw() 99 unsafe { bindings::complete_all(self.as_raw()) }; in complete_all() 110 unsafe { bindings::wait_for_completion(self.as_raw()) }; in wait_for_completion()
|
| /linux/drivers/android/binder/ |
| H A D | page_range.rs | 25 bindings, 45 inner: Opaque<*mut bindings::shrinker>, 46 list_lru: Opaque<bindings::list_lru>, 77 let ret = unsafe { bindings::__list_lru_init(self.list_lru.get(), false, ptr::null_mut()) }; in register() 83 let shrinker = unsafe { bindings::shrinker_alloc(0, name.as_char_ptr()) }; in register() 86 unsafe { bindings::list_lru_destroy(self.list_lru.get()) }; in register() 99 unsafe { bindings::shrinker_register(shrinker) }; in register() 148 static BINDER_VM_OPS: AssertSync<bindings::vm_operations_struct> = AssertSync(pin_init::zeroed()); 200 lru: bindings::list_head, 255 unsafe { bindings::list_lru_add(shrinker.list_lru.get(), lru_ptr, nid, ptr::null_mut()) }; in list_lru_add() [all …]
|