Home
last modified time | relevance | path

Searched refs:cast (Results 1 – 25 of 104) sorted by relevance

12345

/linux-6.15/tools/testing/selftests/bpf/progs/
H A Dcpumask_success.c271 first = bpf_cpumask_first_and(cast(mask1), cast(mask2)); in BPF_PROG()
329 if (bpf_cpumask_and(dst1, cast(mask1), cast(mask2))) { in BPF_PROG()
338 bpf_cpumask_or(dst1, cast(mask1), cast(mask2)); in BPF_PROG()
348 bpf_cpumask_xor(dst2, cast(mask1), cast(mask2)); in BPF_PROG()
349 if (!bpf_cpumask_equal(cast(dst1), cast(dst2))) { in BPF_PROG()
380 bpf_cpumask_or(dst1, cast(mask1), cast(mask2)); in BPF_PROG()
381 if (!bpf_cpumask_subset(cast(mask1), cast(dst1))) { in BPF_PROG()
386 if (!bpf_cpumask_subset(cast(mask2), cast(dst1))) { in BPF_PROG()
391 if (bpf_cpumask_subset(cast(dst1), cast(mask1))) { in BPF_PROG()
418 bpf_cpumask_or(dst1, cast(mask1), cast(mask2)); in BPF_PROG()
[all …]
/linux-6.15/rust/kernel/alloc/
H A Dkbox.rs195 unsafe { Box::from_raw(raw.cast()) } in assume_init()
240 Ok(Box(ptr.cast(), PhantomData)) in new_uninit()
264 unsafe { Box::from_raw(ptr.cast()) } in forget_contents()
371 Box::into_raw(self).cast() in into_foreign()
377 unsafe { Box::from_raw(ptr.cast()) } in from_foreign()
383 unsafe { &*ptr.cast() } in borrow()
387 let ptr = ptr.cast(); in borrow_mut()
409 unsafe { Pin::new_unchecked(Box::from_raw(ptr.cast())) } in from_foreign()
417 let r = unsafe { &*ptr.cast() }; in borrow()
424 let ptr = ptr.cast(); in borrow_mut()
[all …]
H A Dallocator_test.rs57 unsafe { libc_free(src.cast()) }; in realloc()
109 unsafe { libc_free(src.cast()) }; in realloc()
H A Dkvec.rs443 Some(self.ptr.cast()), in reserve()
453 self.ptr = ptr.cast(); in reserve()
542 unsafe { A::free(self.ptr.cast(), self.layout.into()) }; in drop()
770 A::realloc(Some(buf.cast()), layout.into(), old_layout.into(), flags) in collect()
777 ptr.as_ptr().cast() in collect()
863 unsafe { A::free(self.buf.cast(), self.layout.into()) }; in drop()
/linux-6.15/scripts/gdb/linux/
H A Dcpus.py48 pointer = var_ptr.cast(utils.get_long_type()) + offset
49 return pointer.cast(var_ptr.type)
190 current_task = current_task_addr.cast(task_ptr_type)
200 current_task = current_tp.cast(task_ptr_type)
206 if (scratch_reg.cast(utils.get_ulong_type()) > current_tp.cast(utils.get_ulong_type())):
207 current_task = scratch_reg.cast(task_ptr_type)
H A Dstackdepot.py33 parts = handle.cast(handle_parts_t)
49 …stack = (pool + gdb.Value(offset).cast(utils.get_size_t_type())).cast(stack_record_type.get_type()…
50 size = int(stack['size'].cast(utils.get_ulong_type()))
82 stack_depot_print(gdb.Value(handle).cast(utils.get_uint_type()))
H A Dpage_owner.py72 if page_ext.cast(utils.get_ulong_type()) & PAGE_EXT_INVALID == PAGE_EXT_INVALID:
77 …return (base.cast(utils.get_ulong_type()) + self.page_ext_size * index).cast(page_ext_t.get_type()…
95 …addr = page_ext.cast(utils.get_ulong_type()) + gdb.parse_and_eval("page_owner_ops")["offset"].cast
96 return addr.cast(page_owner_t.get_type().pointer())
99 page = gdb.Value(struct_page_addr).cast(utils.get_page_type().pointer())
H A Dradixtree.py22 …return ((node.cast(long_type) & constants.LX_RADIX_TREE_ENTRY_MASK) == constants.LX_RADIX_TREE_INT…
27 indirect_ptr = node.cast(long_type) & ~constants.LX_RADIX_TREE_INTERNAL_NODE
28 return indirect_ptr.cast(radix_tree_node_type.get_type().pointer())
64 node = slot.cast(node.type.pointer()).dereference()
H A Drbtree.py27 node = root.address.cast(rb_root_type.get_type().pointer())
43 node = root.address.cast(rb_root_type.get_type().pointer())
59 return parent.cast(rb_node_type.get_type().pointer())
68 node = node.address.cast(rb_node_type.get_type().pointer())
91 node = node.address.cast(rb_node_type.get_type().pointer())
H A Dmm.py107 …self.vmemmap = gdb.Value(self.VMEMMAP_START).cast(utils.get_page_type().pointer()) - (self.memstar…
261 …return int(page.cast(utils.get_page_type().pointer()) - self.vmemmap.cast(utils.get_page_type().po…
267 return (self.vmemmap + pfn).cast(utils.get_page_type().pointer())
273 …__idx = int((page.cast(gdb.lookup_type("unsigned long")) - self.VMEMMAP_START).cast(utils.get_ulon…
282 return gdb.Value(addr).cast(utils.get_page_type().pointer())
313 page = gdb.Value(struct_page_addr).cast(utils.get_page_type().pointer())
328 page = gdb.Value(struct_page_addr).cast(utils.get_page_type().pointer())
343 page = gdb.Value(struct_page_addr).cast(utils.get_page_type().pointer())
H A Dslab.py39 return slab.cast(gdb.lookup_type("struct folio").pointer())
65 p = p.cast(utils.get_uint_type().pointer())
108 p = ptr_addr.cast(freeptr_t_ptr).dereference()
173 track = gdb.Value(p).cast(track_type.pointer())
209 addr = loc['addr'].cast(utils.get_ulong_type().pointer())
/linux-6.15/drivers/ata/
H A Dpata_cs5536.c167 u32 cast; in cs5536_set_piomode() local
174 cs5536_read(pdev, CAST, &cast); in cs5536_set_piomode()
176 cast &= ~(IDE_CAST_DRV_MASK << cshift); in cs5536_set_piomode()
177 cast |= addr_timings[mode] << cshift; in cs5536_set_piomode()
179 cast &= ~(IDE_CAST_CMD_MASK << IDE_CAST_CMD_SHIFT); in cs5536_set_piomode()
180 cast |= cmd_timings[cmdmode] << IDE_CAST_CMD_SHIFT; in cs5536_set_piomode()
182 cs5536_write(pdev, CAST, cast); in cs5536_set_piomode()
/linux-6.15/rust/kernel/fs/
H A Dfile.rs204 unsafe { bindings::fput(obj.cast().as_ptr()) } in dec_ref()
239 unsafe { bindings::fput(obj.cast().as_ptr()) } in dec_ref()
262 Ok(unsafe { ARef::from_raw(ptr.cast()) }) in fget()
279 unsafe { &*ptr.cast() } in from_raw_file()
303 unsafe { ARef::from_raw(ARef::into_raw(me).cast()) } in assume_no_fdget_pos()
353 unsafe { &*ptr.cast() } in from_raw_file()
/linux-6.15/rust/kernel/
H A Dtask.rs156 task: unsafe { &*current.cast() }, in current()
267 unsafe { &*ptr.cast() } in group_leader()
305 Some(unsafe { ARef::from_raw(ptr::NonNull::new_unchecked(ptr.cast::<PidNamespace>())) }) in get_pid_ns()
340 unsafe { bindings::put_task_struct(obj.cast().as_ptr()) } in dec_ref()
H A Duaccess.rs223 let out_ptr = out.as_mut_ptr().cast::<c_void>(); in read_raw()
266 out.as_mut_ptr().cast::<c_void>(), in read()
326 let data_ptr = data.as_ptr().cast::<c_void>(); in write_slice()
360 (value as *const T).cast::<c_void>(), in write()
H A Dpid_namespace.rs42 unsafe { &*ptr.cast() } in from_ptr()
57 unsafe { bindings::put_pid_ns(obj.cast().as_ptr()) } in dec_ref()
H A Dcred.rs54 unsafe { &*ptr.cast() } in from_ptr()
88 unsafe { bindings::put_cred(obj.cast().as_ptr()) }; in dec_ref()
H A Dplatform.rs65 let pdev = unsafe { &*pdev.cast::<Device<device::Core>>() }; in probe_callback()
200 let ptr = ptr.cast::<Device>(); in deref()
222 unsafe { bindings::platform_device_put(obj.cast().as_ptr()) } in dec_ref()
H A Dprint.rs26 let mut w = unsafe { RawFormatter::from_ptrs(buf.cast(), end.cast()) }; in rust_fmt_argument()
29 w.pos().cast() in rust_fmt_argument()
H A Dtypes.rs382 UnsafeCell::get(&self.value).cast::<T>() in get()
390 UnsafeCell::raw_get(this.cast::<UnsafeCell<MaybeUninit<T>>>()).cast::<T>() in raw_get()
H A Dpci.rs69 let pdev = unsafe { &*pdev.cast::<Device<device::Core>>() }; in probe_callback()
73 let id = unsafe { &*id.cast::<DeviceId>() }; in probe_callback()
432 let ptr = ptr.cast::<Device>(); in deref()
454 unsafe { bindings::pci_dev_put(obj.cast().as_ptr()) } in dec_ref()
/linux-6.15/drivers/scsi/fcoe/
H A Dfcoe_sysfs.c133 #define fcoe_ctlr_show_function(field, format_string, sz, cast) \ argument
142 cast fcoe_ctlr_##field(ctlr)); \
145 #define fcoe_fcf_show_function(field, format_string, sz, cast) \ argument
155 cast fcoe_fcf_##field(fcf)); \
158 #define fcoe_ctlr_private_show_function(field, format_string, sz, cast) \ argument
167 #define fcoe_fcf_private_show_function(field, format_string, sz, cast) \ argument
173 return snprintf(buf, sz, format_string, cast fcoe_fcf_##field(fcf)); \
196 #define fcoe_ctlr_private_rd_attr_cast(field, format_string, sz, cast) \ argument
197 fcoe_ctlr_private_show_function(field, format_string, sz, (cast)) \
201 #define fcoe_fcf_private_rd_attr_cast(field, format_string, sz, cast) \ argument
[all …]
/linux-6.15/rust/kernel/block/mq/
H A Doperations.rs78 let request = unsafe { &*(*bd).rq.cast::<Request<T>>() }; in queue_rq_callback()
186 let pdu = unsafe { Request::wrapper_ptr(rq.cast::<Request<T>>()) }; in init_request_callback()
211 let pdu = unsafe { bindings::blk_mq_rq_to_pdu(rq) }.cast::<RequestDataWrapper>(); in exit_request_callback()
/linux-6.15/scripts/atomic/
H A Dgen-atomic-long.sh27 local cast="$(gen_cast "$1" "${int}" "${atomic}")"
29 printf "${cast}${arg}"
/linux-6.15/tools/perf/util/
H A Dprobe-finder.c204 const char *cast, bool user_access) in convert_variable_type() argument
215 if (cast && strcmp(cast, "string") != 0 && strcmp(cast, "ustring") && in convert_variable_type()
216 strcmp(cast, "x") != 0 && in convert_variable_type()
217 strcmp(cast, "s") != 0 && strcmp(cast, "u") != 0) { in convert_variable_type()
220 tvar->type = strdup(cast); in convert_variable_type()
245 if (cast && (!strcmp(cast, "string") || !strcmp(cast, "ustring"))) { in convert_variable_type()
278 tvar->type = strdup(cast); in convert_variable_type()
282 if (cast && (strcmp(cast, "u") == 0)) in convert_variable_type()
284 else if (cast && (strcmp(cast, "s") == 0)) in convert_variable_type()
286 else if (cast && (strcmp(cast, "x") == 0) && in convert_variable_type()

12345