Home
last modified time | relevance | path

Searched refs:bindings (Results 1 – 25 of 2505) sorted by relevance

12345678910>>...101

/linux/rust/kernel/pci/
H A Did.rs8 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::PCI_CLASS_STORAGE_SATA_AHCI, // 0x010601
[all …]
/linux/drivers/gpu/nova-core/gsp/
H A Dfw.rs7 use r570_144 as bindings;
125 u64::from(bindings::GSP_FW_HEAP_PARAM_BASE_RM_SIZE_TU10X) in base_rm_size()
130 u64::from(bindings::GSP_FW_HEAP_PARAM_CLIENT_ALLOC_SIZE) in client_alloc_size()
140 u64::from(bindings::GSP_FW_HEAP_PARAM_SIZE_PER_GB_FB) in management_overhead()
158 carveout_size: num::u32_as_u64(bindings::GSP_FW_HEAP_PARAM_OS_SIZE_LIBOS2),
159 allowed_heap_size: num::u32_as_u64(bindings::GSP_FW_HEAP_SIZE_OVERRIDE_LIBOS2_MIN_MB)
161 ..num::u32_as_u64(bindings::GSP_FW_HEAP_SIZE_OVERRIDE_LIBOS2_MAX_MB)
167 carveout_size: num::u32_as_u64(bindings::GSP_FW_HEAP_PARAM_OS_SIZE_LIBOS3_BAREMETAL),
169 bindings::GSP_FW_HEAP_SIZE_OVERRIDE_LIBOS3_BAREMETAL_MIN_MB,
171 ..num::u32_as_u64(bindings::GSP_FW_HEAP_SIZE_OVERRIDE_LIBOS3_BAREMETAL_MAX_MB)
[all …]
/linux/rust/kernel/fs/
H A Dfile.rs11 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 Dsizes.rs8 pub const SZ_1K: usize = bindings::SZ_1K as usize;
10 pub const SZ_2K: usize = bindings::SZ_2K as usize;
12 pub const SZ_4K: usize = bindings::SZ_4K as usize;
14 pub const SZ_8K: usize = bindings::SZ_8K as usize;
16 pub const SZ_16K: usize = bindings::SZ_16K as usize;
18 pub const SZ_32K: usize = bindings::SZ_32K as usize;
20 pub const SZ_64K: usize = bindings::SZ_64K as usize;
22 pub const SZ_128K: usize = bindings::SZ_128K as usize;
24 pub const SZ_256K: usize = bindings::SZ_256K as usize;
26 pub const SZ_512K: usize = bindings::SZ_512K as usize;
[all …]
H A Dtask.rs8 bindings,
25 pub const TASK_INTERRUPTIBLE: c_int = bindings::TASK_INTERRUPTIBLE as c_int;
27 pub const TASK_UNINTERRUPTIBLE: c_int = bindings::TASK_UNINTERRUPTIBLE as c_int;
29 pub const TASK_FREEZABLE: c_int = bindings::TASK_FREEZABLE as c_int;
32 pub const TASK_NORMAL: c_uint = bindings::TASK_NORMAL as c_uint;
97 pub struct Task(pub(crate) Opaque<bindings::task_struct>);
149 pub type Pid = bindings::pid_t;
154 kuid: bindings::kuid_t,
162 pub fn current_raw() -> *mut bindings::task_struct { in current_raw()
164 unsafe { bindings::get_current() } in current_raw()
[all …]
H A Dopp.rs35 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 Dtime.rs34 pub const NSEC_PER_USEC: i64 = bindings::NSEC_PER_USEC as i64;
37 pub const NSEC_PER_MSEC: i64 = bindings::NSEC_PER_MSEC as i64;
40 pub const NSEC_PER_SEC: i64 = bindings::NSEC_PER_SEC as i64;
53 unsafe { bindings::__msecs_to_jiffies(msecs) } in msecs_to_jiffies()
67 const ID: bindings::clockid_t;
72 fn ktime_get() -> bindings::ktime_t; in ktime_get()
89 const ID: bindings::clockid_t = bindings::CLOCK_MONOTONIC as bindings::clockid_t;
91 fn ktime_get() -> bindings::ktime_t { in ktime_get()
93 unsafe { bindings::ktime_get() } in ktime_get()
114 const ID: bindings::clockid_t = bindings::CLOCK_REALTIME as bindings::clockid_t;
[all …]
H A Dusb.rs9 bindings,
45 type DriverType = bindings::usb_driver;
68 bindings::usb_register_driver(udrv.get(), module.0, name.as_char_ptr()) in register()
74 unsafe { bindings::usb_deregister(udrv.get()) }; in unregister()
80 intf: *mut bindings::usb_interface, in probe_callback()
81 id: *const bindings::usb_device_id, in probe_callback()
103 extern "C" fn disconnect_callback(intf: *mut bindings::usb_interface) { in disconnect_callback()
126 pub struct DeviceId(bindings::usb_device_id);
131 Self(bindings::usb_device_id { in from_id()
132 match_flags: bindings::USB_DEVICE_ID_MATCH_DEVICE as u16, in from_id()
[all …]
H A Dpwm.rs10 bindings,
46 impl From<bindings::pwm_waveform> for Waveform { in from()
47 fn from(wf: bindings::pwm_waveform) -> Self { in from()
56 impl From<Waveform> for bindings::pwm_waveform { in from()
58 bindings::pwm_waveform { in from()
78 pub struct Device(Opaque<bindings::pwm_device>);
87 pub(crate) unsafe fn from_raw<'a>(ptr: *mut bindings::pwm_device) -> &'a Self {
94 fn as_raw(&self) -> *mut bindings::pwm_device { in hwpwm()
127 let c_wf = bindings::pwm_waveform::from(*wf); in set_waveform()
132 to_result(unsafe { bindings
[all...]
H A Dkunit.rs25 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 Dconfigfs.rs130 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()
211 unsafe fn group(this: *const Self) -> *const bindings::config_group; in group()
219 unsafe fn container_of(group: *const bindings::config_group) -> *const Self; in container_of()
225 unsafe fn group(this: *const Self) -> *const bindings::config_group { in group()
[all …]
H A Dcpumask.rs49 pub struct Cpumask(Opaque<bindings::cpumask>);
58 pub unsafe fn from_raw_mut<'a>(ptr: *mut bindings::cpumask) -> &'a mut Self { in from_raw_mut()
72 pub unsafe fn from_raw<'a>(ptr: *const bindings::cpumask) -> &'a Self { in from_raw()
81 pub fn as_raw(&self) -> *mut bindings::cpumask { in as_raw()
94 unsafe { bindings::__cpumask_set_cpu(u32::from(cpu), self.as_raw()) }; in set()
106 unsafe { bindings::__cpumask_clear_cpu(i32::from(cpu), self.as_raw()) }; in clear()
115 unsafe { bindings::cpumask_test_cpu(i32::from(cpu), self.as_raw()) } in test()
124 unsafe { bindings::cpumask_setall(self.as_raw()) }; in setall()
133 unsafe { bindings::cpumask_empty(self.as_raw()) } in empty()
142 unsafe { bindings::cpumask_full(self.as_raw()) } in full()
[all …]
H A Dauxiliary.rs8 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 Dmiscdevice.rs12 bindings,
34 pub const fn into_raw<T: MiscDevice>(self) -> bindings::miscdevice { in into_raw()
35 let mut result: bindings::miscdevice = pin_init::zeroed(); in into_raw()
36 result.minor = bindings::MISC_DYNAMIC_MINOR as ffi::c_int; in into_raw()
58 inner: Opaque<bindings::miscdevice>,
73 inner <- Opaque::try_ffi_init(move |slot: *mut bindings::miscdevice| { in register()
82 to_result(unsafe { bindings::misc_register(slot) }) in register()
89 pub fn as_raw(&self) -> *mut bindings::miscdevice { in as_raw()
108 unsafe { bindings::misc_deregister(self.inner.get()) }; in drop()
203 unsafe extern "C" fn open(inode: *mut bindings::inode, raw_file: *mut bindings::file) -> c_int { in open()
[all …]
H A Dpci.rs8 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 …]
/linux/rust/kernel/mm/
H A Dvirt.rs18 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()
127 bindings::zap_page_range_single(self.as_ptr(), address, size, core::ptr::null_mut()) in zap_page_range_single()
185 pub unsafe fn from_raw<'a>(vma: *const bindings::vm_area_struct) -> &'a Self { in from_raw()
197 to_result(unsafe { bindings::vm_insert_page(self.as_ptr(), address, page.as_ptr()) }) in vm_insert_page()
234 pub unsafe fn from_raw<'a>(vma: *mut bindings::vm_area_struct) -> &'a Self { in from_raw()
388 pub use bindings::vm_flags_t;
393 use crate::bindings;
[all …]
/linux/rust/kernel/irq/
H A Dflags.rs4 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 Dfile_ops.rs33 operations: bindings::file_operations,
44 const unsafe fn new(operations: bindings::file_operations, mode: u16) -> Self { in new()
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_open()
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::seq_lseek),
[all …]
/linux/rust/kernel/net/
H A Dphy.rs74 pub struct Device(Opaque<bindings::phy_device>);
86 unsafe fn from_raw<'a>(ptr: *mut bindings::phy_device) -> &'a mut Self { in from_raw()
111 bindings::phy_state_PHY_DOWN => DeviceState::Down, in state()
112 bindings::phy_state_PHY_READY => DeviceState::Ready, in state()
113 bindings::phy_state_PHY_HALTED => DeviceState::Halted, in state()
114 bindings::phy_state_PHY_ERROR => DeviceState::Error, in state()
115 bindings::phy_state_PHY_UP => DeviceState::Up, in state()
116 bindings::phy_state_PHY_RUNNING => DeviceState::Running, in state()
117 bindings::phy_state_PHY_NOLINK => DeviceState::NoLink, in state()
118 bindings::phy_state_PHY_CABLETEST => DeviceState::CableTest, in state()
[all …]
/linux/rust/kernel/drm/gem/
H A Dmod.rs9 bindings, drm,
46 fn as_raw(&self) -> *mut bindings::drm_gem_object; in as_raw()
55 unsafe fn from_raw<'a>(self_ptr: *mut bindings::drm_gem_object) -> &'a Self; in from_raw()
59 raw_obj: *mut bindings::drm_gem_object, in open_callback()
60 raw_file: *mut bindings::drm_file, in open_callback()
76 raw_obj: *mut bindings::drm_gem_object, in close_callback()
77 raw_file: *mut bindings::drm_file, in close_callback()
90 fn as_raw(&self) -> *mut bindings::drm_gem_object { in as_raw()
94 unsafe fn from_raw<'a>(self_ptr: *mut bindings::drm_gem_object) -> &'a Self { in from_raw()
120 bindings in create_handle()
[all...]
/linux/rust/kernel/drm/
H A Ddriver.rs8 bindings, device, devres, drm,
16 pub(crate) const FEAT_GEM: u32 = bindings::drm_driver_feature_DRIVER_GEM;
36 dev: *mut bindings::drm_device,
38 ) -> *mut bindings::drm_gem_object,
42 dev: *mut bindings::drm_device,
43 file_priv: *mut bindings::drm_file,
51 dev: *mut bindings::drm_device,
52 file_priv: *mut bindings::drm_file,
59 dev: *mut bindings::drm_device,
60 dma_buf: *mut bindings
[all...]
/linux/rust/kernel/time/
H A Dhrtimer.rs89 timer: Opaque<bindings::hrtimer>,
110 timer <- Opaque::ffi_init(move |place: *mut bindings::hrtimer| { in new()
115 bindings::hrtimer_setup( in new()
135 unsafe fn raw_get(this: *const Self) -> *mut bindings::hrtimer { in raw_get()
169 unsafe { bindings::hrtimer_cancel(c_timer_ptr) != 0 } in raw_cancel()
188 bindings::hrtimer_forward(Self::raw_get(self_ptr), now.as_nanos(), interval.as_nanos()) in raw_forward()
376 unsafe extern "C" fn run(this: *mut bindings::hrtimer) -> bindings::hrtimer_restart; in run()
467 unsafe fn c_timer_ptr(this: *const Self) -> *const bindings::hrtimer { in c_timer_ptr()
486 bindings::hrtimer_start_range_ns( in start()
501 NoRestart = bindings::hrtimer_restart_HRTIMER_NORESTART,
[all …]
/linux/rust/kernel/block/mq/
H A Doperations.rs8 bindings,
86 hctx: *mut bindings::blk_mq_hw_ctx, in queue_rq_callback()
87 bd: *const bindings::blk_mq_queue_data, in queue_rq_callback()
88 ) -> bindings::blk_status_t { in queue_rq_callback()
127 bindings::BLK_STS_OK as bindings::blk_status_t in queue_rq_callback()
138 unsafe extern "C" fn commit_rqs_callback(hctx: *mut bindings::blk_mq_hw_ctx) { in commit_rqs_callback()
158 unsafe extern "C" fn complete_callback(rq: *mut bindings::request) { in complete_callback()
173 _hctx: *mut bindings::blk_mq_hw_ctx, in poll_callback()
174 _iob: *mut bindings::io_comp_batch, in poll_callback()
188 _hctx: *mut bindings::blk_mq_hw_ctx, in init_hctx_callback()
[all …]
/linux/rust/kernel/iommu/
H A Dpgtable.rs14 bindings,
25 use bindings::io_pgtable_fmt;
30 pub const READ: u32 = bindings::IOMMU_READ;
32 pub const WRITE: u32 = bindings::IOMMU_WRITE;
34 pub const CACHE: u32 = bindings::IOMMU_CACHE;
36 pub const NOEXEC: u32 = bindings::IOMMU_NOEXEC;
38 pub const MMIO: u32 = bindings::IOMMU_MMIO;
40 pub const PRIVILEGED: u32 = bindings::IOMMU_PRIV;
63 ptr: NonNull<bindings::io_pgtable_ops>,
97 let mut raw_cfg = bindings::io_pgtable_cfg { in new_raw()
[all …]
/linux/drivers/android/binder/
H A Ddeferred_close.rs13 bindings,
39 twork: MaybeUninit<bindings::callback_head>,
40 file: *mut bindings::file,
63 use bindings::task_work_notify_mode_TWA_RESUME as TWA_RESUME; in close_fd()
74 if unsafe { ((*current.as_ptr()).flags & bindings::PF_KTHREAD) != 0 } { in close_fd()
87 let callback_head = inner.cast::<bindings::callback_head>(); in close_fd()
95 unsafe { bindings::init_task_work(callback_head, Some(Self::do_close_fd)) }; in close_fd()
110 let res = unsafe { bindings::task_work_add(current, callback_head, TWA_RESUME) }; in close_fd()
126 let file = unsafe { bindings::file_close_fd(fd) }; in close_fd()
136 unsafe { bindings::get_file(file) }; in close_fd()
[all …]

12345678910>>...101