| /linux/tools/include/linux/ |
| H A D | rbtree_augmented.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 22 * Please note - only struct rb_augment_callbacks and the prototypes for 26 * See Documentation/core-api/rbtree.rst for documentation and samples. 30 void (*propagate)(struct rb_node *node, struct rb_node *stop); 35 extern void __rb_insert_augmented(struct rb_node *node, struct rb_root *root, 42 * leading to the inserted node, the 49 rb_insert_augmented(struct rb_node * node,struct rb_root * root,const struct rb_augment_callbacks * augment) rb_insert_augmented() argument 56 rb_insert_augmented_cached(struct rb_node * node,struct rb_root_cached * root,bool newleft,const struct rb_augment_callbacks * augment) rb_insert_augmented_cached() argument 187 __rb_erase_augmented(struct rb_node * node,struct rb_root * root,const struct rb_augment_callbacks * augment) __rb_erase_augmented() argument 190 struct rb_node *child = node->rb_right; __rb_erase_augmented() local 291 rb_erase_augmented(struct rb_node * node,struct rb_root * root,const struct rb_augment_callbacks * augment) rb_erase_augmented() argument 300 rb_erase_augmented_cached(struct rb_node * node,struct rb_root_cached * root,const struct rb_augment_callbacks * augment) rb_erase_augmented_cached() argument [all...] |
| /linux/include/linux/ |
| H A D | rbtree_augmented.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 20 * Please note - only struct rb_augment_callbacks and the prototypes for 24 * See Documentation/core-api/rbtree.rst for documentation and samples. 28 void (*propagate)(struct rb_node *node, struct rb_node *stop); 33 extern void __rb_insert_augmented(struct rb_node *node, struct rb_root *root, 40 * leading to the inserted node, then call rb_link_node() as usual and 47 rb_insert_augmented(struct rb_node *node, struct rb_root *root, in rb_insert_augmented() argument 50 __rb_insert_augmented(node, root, augment->rotate); in rb_insert_augmented() 54 rb_insert_augmented_cached(struct rb_node *node, in rb_insert_augmented_cached() argument 59 root->rb_leftmost = node; in rb_insert_augmented_cached() [all …]
|
| H A D | of.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 8 * Copyright (C) 1996-2005 Paul Mackerras. 19 #include <linux/device-id/of.h> 57 struct device_node *child; member 91 struct device_node *node; member 104 * of_node_init - initialize a devicetree node 105 * @node: Pointer to device node that has been created by kzalloc() 108 * on @node when done to free the memory allocated for it. If the node 109 * is NOT a dynamic node the memory will not be freed. The decision of 110 * whether to free the memory will be done by node->release(), which is [all …]
|
| /linux/drivers/net/ethernet/mellanox/mlx5/core/en/ |
| H A D | htb.c | 1 // SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB 16 u32 classid; /* 16-bit, except root. */ 36 struct mlx5e_qos_node *node = NULL; in mlx5e_htb_enumerate_leaves() local 39 hash_for_each(htb->qos_tc2node, bkt, node, hnode) { in mlx5e_htb_enumerate_leaves() 40 if (node->qid == MLX5E_QOS_QID_INNER) in mlx5e_htb_enumerate_leaves() 42 err = callback(data, node->qid, node->hw_id); in mlx5e_htb_enumerate_leaves() 53 last = find_last_bit(htb->qos_used_qids, mlx5e_qos_max_leaf_nodes(htb->mdev)); in mlx5e_htb_cur_leaf_nodes() 54 return last == mlx5e_qos_max_leaf_nodes(htb->mdev) ? 0 : last + 1; in mlx5e_htb_cur_leaf_nodes() 59 int size = mlx5e_qos_max_leaf_nodes(htb->mdev); in mlx5e_htb_find_unused_qos_qid() 60 struct mlx5e_priv *priv = htb->priv; in mlx5e_htb_find_unused_qos_qid() [all …]
|
| /linux/drivers/acpi/acpica/ |
| H A D | nsalloc.c | 1 // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 4 * Module Name: nsalloc - Namespace allocation and deletion utilities 19 * PARAMETERS: name - Name of the new node (4 char ACPI name) 21 * RETURN: New namespace node (Null on failure) 23 * DESCRIPTION: Create a namespace node 28 struct acpi_namespace_node *node; in acpi_ns_create_node() local 35 node = acpi_os_acquire_object(acpi_gbl_namespace_cache); in acpi_ns_create_node() 36 if (!node) { in acpi_ns_create_node() 40 ACPI_MEM_TRACKING(acpi_gbl_ns_node_list->total_allocated++); in acpi_ns_create_node() 43 temp = acpi_gbl_ns_node_list->total_allocated - in acpi_ns_create_node() [all …]
|
| /linux/lib/ |
| H A D | radix-tree.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 24 #include <linux/radix-tree.h> 30 #include "radix-tree.h" 33 * Radix tree node cache. 38 * The radix tree is variable-height, so an insert operation not only has 45 * of RADIX_TREE_MAX_PATH size to be created, with only the root node shared. 48 #define RADIX_TREE_PRELOAD_SIZE (RADIX_TREE_MAX_PATH * 2 - 1) 54 #define IDR_INDEX_BITS (8 /* CHAR_BIT */ * sizeof(int) - 1) 57 #define IDR_PRELOAD_SIZE (IDR_MAX_PATH * 2 - 1) 60 * Per-cpu pool of preloaded nodes [all …]
|
| H A D | bootconfig.c | 1 // SPDX-License-Identifier: GPL-2.0 31 /* embedded_bootconfig_data is defined in bootconfig-data.S */ 37 *size = embedded_bootconfig_data_end - embedded_bootconfig_data; in xbc_get_embedded_bootconfig() 43 /* embedded_kernel_cmdline is defined in embedded-cmdline.S */ 51 * str_prepend() - Prepend @src in front of the string in @dst, in place 52 * @dst: NUL-terminated destination buffer, currently @dst_len bytes long 54 * @src: bytes to prepend (not NUL-terminated) 69 * xbc_prepend_embedded_cmdline() - Prepend embedded bootconfig cmdline 73 * Prepend the build-time-rendered "kernel" subtree of the embedded 87 size_t embed_len = embedded_kernel_cmdline_end - embedded_kernel_cmdline; in xbc_prepend_embedded_cmdline() [all …]
|
| H A D | btree.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * lib/btree.c - Simple In-memory B+Tree 5 * Copyright (c) 2007-2008 Joern Engel <joern@purestorage.com> 9 * see http://programming.kicks-ass.net/kernel-patches/vma_lookup/btree.patch 16 * well is that access to a random tree node is much faster than a large number 17 * of operations within each node. 27 * ~98% pointers - hard to beat. Very sparse radix trees contain only ~2% 35 * values are to the right, not to the left. All used slots within a node 94 unsigned long *node; in btree_node_alloc() local 96 node = mempool_alloc(head->mempool, gfp); in btree_node_alloc() [all …]
|
| /linux/scripts/gdb/linux/ |
| H A D | radixtree.py | 1 # SPDX-License-Identifier: GPL-2.0 20 def is_internal_node(node): argument 22 …return ((node.cast(long_type) & constants.LX_RADIX_TREE_ENTRY_MASK) == constants.LX_RADIX_TREE_INT… 24 def entry_to_node(node): argument 26 node_type = node.type 27 indirect_ptr = node.cast(long_type) & ~constants.LX_RADIX_TREE_INTERNAL_NODE 30 def node_maxindex(node): argument 31 return (constants.LX_RADIX_TREE_MAP_SIZE << node['shift']) - 1 43 node = root['xa_head'] 44 if node == 0: [all …]
|
| /linux/tools/verification/rvgen/rvgen/ |
| H A D | ltl2ba.py | 2 # SPDX-License-Identifier: GPL-2.0-only 6 # Simple On-the-fly Automatic Verification of Linear Temporal Logic. 7 # https://doi.org/10.1007/978-0-387-34892- 120 expand(self, node, node_set) global() argument [all...] |
| /linux/drivers/regulator/ |
| H A D | of_regulator.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 19 [PM_SUSPEND_STANDBY] = "regulator-state-standby", 20 [PM_SUSPEND_MEM] = "regulator-state-mem", 21 [PM_SUSPEND_MAX] = "regulator-state-disk", 41 "regulator-oc-%s-microamp", in of_get_regulator_prot_limits() 42 "regulator-ov-%s-microvolt", in of_get_regulator_prot_limits() 43 "regulator-temp-%s-kelvin", in of_get_regulator_prot_limits() 44 "regulator-uv-%s-microvolt", in of_get_regulator_prot_limits() 47 &constraints->over_curr_limits, in of_get_regulator_prot_limits() 48 &constraints->over_voltage_limits, in of_get_regulator_prot_limits() [all …]
|
| /linux/tools/perf/util/ |
| H A D | callchain.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2009-2011, Frederic Weisbecker <fweisbec@gmail.com> 5 * Handle the callchains from the stream in an ad-hoc radix tree and then 55 * -e cycles/call-graph=dwarf/ 63 /* Used for thread-local struct callchain_cursor. */ 89 return -1; in parse_callchain_mode() 104 return - in parse_callchain_order() 431 __sort_chain_flat(struct rb_root * rb_root,struct callchain_node * node,u64 min_hit) __sort_chain_flat() argument 435 struct callchain_node *child; __sort_chain_flat() local 461 __sort_chain_graph_abs(struct callchain_node * node,u64 min_hit) __sort_chain_graph_abs() argument 465 struct callchain_node *child; __sort_chain_graph_abs() local 489 __sort_chain_graph_rel(struct callchain_node * node,double min_percent) __sort_chain_graph_rel() argument 493 struct callchain_node *child; __sort_chain_graph_rel() local 559 struct callchain_node *child; create_child() local 584 fill_node(struct callchain_node * node,struct callchain_cursor * cursor) fill_node() argument 737 match_chain(struct callchain_cursor_node * node,struct callchain_list * cnode) match_chain() argument 860 struct callchain_cursor_node *node; split_add_child() local 907 struct callchain_cursor_node *node; append_chain_children() local 966 struct callchain_cursor_node *node; append_chain() local 1038 struct callchain_node *child; merge_chain_branch() local 1094 struct callchain_cursor_node *node = *cursor->last; callchain_cursor_append() local 1148 fill_callchain_info(struct addr_location * al,struct callchain_cursor_node * node,bool hide_unresolved) fill_callchain_info() argument 1222 callchain_node__scnprintf_value(struct callchain_node * node,char * bf,size_t bfsize,u64 total) callchain_node__scnprintf_value() argument 1251 callchain_node__fprintf_value(struct callchain_node * node,FILE * fp,u64 total) callchain_node__fprintf_value() argument 1277 callchain_counts_value(struct callchain_node * node,u64 * branch_count,u64 * predicted_count,u64 * abort_count,u64 * cycles_count) callchain_counts_value() argument 1298 callchain_node_branch_counts_cumul(struct callchain_node * node,u64 * branch_count,u64 * predicted_count,u64 * abort_count,u64 * cycles_count) callchain_node_branch_counts_cumul() argument 1304 struct callchain_node *child; callchain_node_branch_counts_cumul() local 1495 free_callchain_node(struct callchain_node * node) free_callchain_node() argument 1498 struct callchain_node *child; free_callchain_node() local 1534 decay_callchain_node(struct callchain_node * node) decay_callchain_node() argument 1536 struct callchain_node *child; decay_callchain_node() local 1562 callchain_node__make_parent_list(struct callchain_node * node) callchain_node__make_parent_list() argument 1606 struct callchain_cursor_node *node, *next; callchain_cursor__delete() local 1649 struct callchain_cursor_node *node; callchain_cursor__copy() local 1675 struct callchain_cursor_node *node; callchain_cursor_reset() local 1768 struct callchain_node *node; count_callchain_hits() local 1830 struct callchain_cursor_node *node = callchain_cursor_current(cursor); sample__for_each_callchain_node() local [all...] |
| /linux/drivers/powercap/ |
| H A D | dtpm.c | 1 // SPDX-License-Identifier: GPL-2.0-only 12 * parent node is a virtual description of the aggregation of the 42 return -ENOSYS; in get_time_window_us() 47 return -ENOSYS; in set_time_window_us() 54 *max_power_uw = dtpm->power_max - dtpm->power_min; in get_max_power_range_uw() 61 struct dtpm *child; in __get_power_uw() local 65 if (dtpm->ops) { in __get_power_uw() 66 *power_uw = dtpm->ops->get_power_uw(dtpm); in __get_power_uw() 72 list_for_each_entry(child, &dtpm->children, sibling) { in __get_power_uw() 73 ret = __get_power_uw(child, &power); in __get_power_uw() [all …]
|
| /linux/Documentation/networking/ |
| H A D | fib_trie.rst | 1 .. SPDX-License-Identifier: GPL-2.0 4 LC-trie implementation notes 7 Node types 8 ---------- 10 An end node with data. This has a copy of the relevant key, along 14 trie node or tnode 15 An internal node, holding an array of child (leaf or tnode) pointers, 19 ------------------------ 22 child array - the "child index". See Level Compression. 26 the child array. See Path Compression. [all …]
|
| /linux/drivers/gpu/drm/nouveau/nvkm/core/ |
| H A D | object.c | 36 spin_lock_irqsave(&client->obj_lock, flags); in nvkm_object_search() 37 struct rb_node *node = client->objroot.rb_node; in nvkm_object_search() local 38 while (node) { in nvkm_object_search() 39 object = rb_entry(node, typeof(*object), node); in nvkm_object_search() 40 if (handle < object->object) in nvkm_object_search() 41 node = node->rb_left; in nvkm_object_search() 43 if (handle > object->object) in nvkm_object_search() 44 node = node->rb_right; in nvkm_object_search() 46 spin_unlock_irqrestore(&client->obj_lock, flags); in nvkm_object_search() 50 spin_unlock_irqrestore(&client->obj_lock, flags); in nvkm_object_search() [all …]
|
| /linux/drivers/md/persistent-data/ |
| H A D | dm-btree-remove.c | 1 // SPDX-License-Identifier: GPL-2.0-only 8 #include "dm-btree.h" 9 #include "dm-btree-internal.h" 10 #include "dm-transaction-manager.h" 13 #include <linux/device-mapper.h> 21 * A very important constraint for our btree is that no node, except the 29 * Each node may have a left or right sibling. When decending the spine, 30 * if a node contains only MIN_ENTRIES then we try and increase this to at 33 * [A] No siblings => this can only happen if the node is the root, in which 37 * ==> rebalance(node, right sibling) [all …]
|
| /linux/drivers/of/ |
| H A D | of_reserved_mem.c | 1 // SPDX-License-Identifier: GPL-2.0+ 46 return -ENOMEM; in early_init_dt_alloc_reserved_memory_arch() 62 * alloc_reserved_mem_array() - allocate memory for the reserved_mem 83 ret = -EOVERFLOW; in alloc_reserved_mem_array() 89 ret = -ENOMEM; in alloc_reserved_mem_array() 96 ret = -EOVERFLOW; in alloc_reserved_mem_array() 100 memset_size = alloc_size - copy_size; in alloc_reserved_mem_array() 114 static void fdt_init_reserved_mem_node(unsigned long node, const char *uname, 116 static int fdt_validate_reserved_mem_node(unsigned long node, 118 static int fdt_fixup_reserved_mem_node(unsigned long node, [all …]
|
| /linux/drivers/pci/pwrctrl/ |
| H A D | core.c | 1 // SPDX-License-Identifier: GPL-2.0-only 15 #include <linux/pci-pwrctrl.h> 28 if (dev_fwnode(dev) != dev_fwnode(pwrctrl->dev)) in pci_pwrctrl_notify() 35 * drivers on different buses but consuming the same DT node. We in pci_pwrctrl_notify() 40 * power control platform device. Mark its OF node as reused. in pci_pwrctrl_notify() 50 * pci_pwrctrl_init() - Initialize the PCI power control context struct 57 pwrctrl->dev = dev; in pci_pwrctrl_init() 63 * pci_pwrctrl_device_set_ready() - Notify the pwrctrl subsystem that the PCI 64 * device is powered-up and ready to be detected. 80 if (!pwrctrl->dev) in pci_pwrctrl_device_set_ready() [all …]
|
| /linux/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ |
| H A D | ipoib_vlan.c | 14 * - Redistributions of source code must retain the above 18 * - Redistributions in binary form must reproduce the above 56 return -ENOMEM; in mlx5i_pkey_qpn_ht_init() 58 ipriv->qpn_htbl = qpn_htbl; in mlx5i_pkey_qpn_ht_init() 59 spin_lock_init(&qpn_htbl->ht_lock); in mlx5i_pkey_qpn_ht_init() 68 kfree(ipriv->qpn_htbl); in mlx5i_pkey_qpn_ht_cleanup() 75 struct qpn_to_netdev *node; in mlx5i_find_qpn_to_netdev_node() local 77 hlist_for_each_entry(node, h, hlist) { in mlx5i_find_qpn_to_netdev_node() 78 if (node->underlay_qpn == qpn) in mlx5i_find_qpn_to_netdev_node() 79 return node; in mlx5i_find_qpn_to_netdev_node() [all …]
|
| /linux/drivers/cpuidle/ |
| H A D | dt_idle_genpd.c | 1 // SPDX-License-Identifier: GPL-2.0-only 12 #define pr_fmt(fmt) "dt-idle-genpd: " fmt 38 ret = -ENOMEM; in pd_parse_state_nodes() 48 i--; in pd_parse_state_nodes() 49 for (; i >= 0; i--) in pd_parse_state_nodes() 86 pd_free_states(pd->states, pd->state_count); in dt_idle_pd_free() 87 kfree(pd->name); in dt_idle_pd_free() 102 pd->name = kasprintf(GFP_KERNEL, "%pOF", np); in dt_idle_pd_alloc() 103 if (!pd->name) in dt_idle_pd_alloc() 108 * for those being compatible with "domain-idle-state". in dt_idle_pd_alloc() [all …]
|
| /linux/arch/powerpc/kernel/ |
| H A D | pci_of_scan.c | 1 // SPDX-License-Identifier: GPL-2.0-only 17 #include <asm/pci-bridge.h> 20 * get_int_prop - Decode a u32 from a device tree property 34 * pci_parse_of_flags - Parse the flags cell of a device tree PCI address 38 * PCI Bus Binding to IEEE Std 1275-1994 49 * t is 1 if the address is aliased (for non-relocatable I/O), 54 * 10 denotes 32-bit-address Memory Space 55 * 11 denotes 64-bit-address Memory Space 56 * bbbbbbbb is the 8-bit Bus Number 57 * ddddd is the 5-bit Device Number [all …]
|
| /linux/drivers/acpi/ |
| H A D | property.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2014 - 2023, Intel Corporation 38 * https://github.com/UEFI/DSD-Guide/blob/main/src/dsd-guide.adoc 41 /* ACPI _DSD device properties GUID [1]: daffd814-6eba-4d8c-8a91-bc9bbf4aa301 */ 44 /* Hotplug in D3 GUID: 6211e2c0-58a3-4af3-90e1-927a4e0c55a4 */ 47 /* External facing port GUID: efcc06cc-73ac-4bc3-bff0-76143807c389 */ 50 /* Thunderbolt GUID for IMR_VALID: c44d002f-69f9-4e7d-a904-a7baabdf43f7 */ 53 /* Thunderbolt GUID for WAKE_SUPPORTED: 6c501103-c189-4296-ba72-9bf5a26ebe5d */ 56 /* Storage device needs D3 GUID: 5025030f-842f-4ab4-a561-99a5189762d0 */ 61 /* ACPI _DSD data subnodes GUID [1]: dbb8e3e6-5886-4ba6-8795-1319f52a966b */ [all …]
|
| /linux/security/yama/ |
| H A D | yama_lsm.c | 1 // SPDX-License-Identifier: GPL-2.0-only 35 struct list_head node; member 58 target_cmd = kstrdup_quotable_cmdline(info->target, GFP_KERNEL); in __report_access() 59 agent_cmd = kstrdup_quotable_cmdline(info->agent, GFP_KERNEL); in __report_access() 63 info->access, target_cmd, info->target->pid, agent_cmd, in __report_access() 64 info->agent->pid); in __report_access() 69 put_task_struct(info->agent); in __report_access() 70 put_task_struct(info->target); in __report_access() 80 assert_spin_locked(&target->alloc_lock); /* for target->comm */ in report_access() 82 if (current->flags & PF_KTHREAD) { in report_access() [all …]
|
| /linux/drivers/video/fbdev/omap2/omapfb/dss/ |
| H A D | omapdss-boot-init.c | 1 // SPDX-License-Identifier: GPL-2.0-only 9 * DT-data in generic manner, we convert the compatible strings of the panel and 10 * encoder nodes from "panel-foo" to "omapdss,panel-foo". This way we can have 28 struct device_node *node; member 34 const char *p = prop->value; in omapdss_count_strings() 38 for (i = 0; total < prop->length; total += l, p += l, i++) in omapdss_count_strings() 44 static void __init omapdss_update_prop(struct device_node *node, char *compat, in omapdss_update_prop() argument 53 prop->name = "compatible"; in omapdss_update_prop() 54 prop->value = compat; in omapdss_update_prop() 55 prop->length = len; in omapdss_update_prop() [all …]
|
| /linux/drivers/input/gameport/ |
| H A D | gameport.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (c) 1999-2002 Vojtech Pavlik 53 #define DELTA(x,y) ((y)-(x)+((y)<(x)?1193182/HZ:0)) 98 t = (t2 - t1) - (t3 - t2); in gameport_measure_speed() 130 if ((t = DELTA(t2,t1) - DELTA(t3,t2)) < tx) tx = t; in old_gameport_measure_speed() 153 if (t2 - t1 < tx) tx = t2 - t1; in old_gameport_measure_speed() 178 spin_lock(&gameport->timer_lock); in gameport_start_polling() 180 if (!gameport->poll_cnt++) { in gameport_start_polling() 181 BUG_ON(!gameport->poll_handler); in gameport_start_polling() 182 BUG_ON(!gameport->poll_interval); in gameport_start_polling() [all …]
|