| /kernel/linux/linux-5.10/drivers/mtd/ |
| D | mtdpart.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 7 * Copyright © 2000-2010 David Woodhouse <dwmw2@infradead.org> 30 kfree(mtd->name); in free_partition() 34 static struct mtd_info *allocate_partition(struct mtd_info *parent, in allocate_partition() argument 38 struct mtd_info *master = mtd_get_master(parent); in allocate_partition() 39 int wr_alignment = (parent->flags & MTD_NO_ERASE) ? in allocate_partition() 40 master->writesize : master->erasesize; in allocate_partition() 41 u64 parent_size = mtd_is_partition(parent) ? in allocate_partition() 42 parent->part.size : parent->size; in allocate_partition() 43 struct mtd_info *child; in allocate_partition() local [all …]
|
| /kernel/linux/linux-6.6/drivers/mtd/ |
| D | mtdpart.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 7 * Copyright © 2000-2010 David Woodhouse <dwmw2@infradead.org> 31 kfree(mtd->name); in free_partition() 37 WARN_ON(!list_empty(&mtd->part.node)); in release_mtd_partition() 41 static struct mtd_info *allocate_partition(struct mtd_info *parent, in allocate_partition() argument 45 struct mtd_info *master = mtd_get_master(parent); in allocate_partition() 46 int wr_alignment = (parent->flags & MTD_NO_ERASE) ? in allocate_partition() 47 master->writesize : master->erasesize; in allocate_partition() 48 u64 parent_size = mtd_is_partition(parent) ? in allocate_partition() 49 parent->part.size : parent->size; in allocate_partition() [all …]
|
| /kernel/linux/linux-5.10/drivers/pwm/ |
| D | sysfs.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 18 struct device child; member 24 static struct pwm_export *child_to_pwm_export(struct device *child) in child_to_pwm_export() argument 26 return container_of(child, struct pwm_export, child); in child_to_pwm_export() 29 static struct pwm_device *child_to_pwm_device(struct device *child) in child_to_pwm_device() argument 31 struct pwm_export *export = child_to_pwm_export(child); in child_to_pwm_device() 33 return export->pwm; in child_to_pwm_device() 36 static ssize_t period_show(struct device *child, in period_show() argument 40 const struct pwm_device *pwm = child_to_pwm_device(child); in period_show() 48 static ssize_t period_store(struct device *child, in period_store() argument [all …]
|
| /kernel/linux/linux-6.6/drivers/pwm/ |
| D | sysfs.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 18 struct device child; member 24 static struct pwm_export *child_to_pwm_export(struct device *child) in child_to_pwm_export() argument 26 return container_of(child, struct pwm_export, child); in child_to_pwm_export() 29 static struct pwm_device *child_to_pwm_device(struct device *child) in child_to_pwm_device() argument 31 struct pwm_export *export = child_to_pwm_export(child); in child_to_pwm_device() 33 return export->pwm; in child_to_pwm_device() 36 static ssize_t period_show(struct device *child, in period_show() argument 40 const struct pwm_device *pwm = child_to_pwm_device(child); in period_show() 48 static ssize_t period_store(struct device *child, in period_store() argument [all …]
|
| /kernel/linux/linux-6.6/security/landlock/ |
| D | ptrace.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Landlock LSM - Ptrace hooks 5 * Copyright © 2017-2020 Mickaël Salaün <mic@digikod.net> 6 * Copyright © 2019-2020 ANSSI 24 * domain_scope_le - Checks domain ordering for scoped ptrace 26 * @parent: Parent domain. 27 * @child: Potential child of @parent. 29 * Checks if the @parent domain is less or equal to (i.e. an ancestor, which 30 * means a subset of) the @child domain. 32 static bool domain_scope_le(const struct landlock_ruleset *const parent, in domain_scope_le() argument [all …]
|
| /kernel/linux/linux-6.6/tools/testing/selftests/cgroup/ |
| D | test_core.c | 1 /* SPDX-License-Identifier: GPL-2.0 */ 30 return -1; in touch_anon() 38 return -1; in touch_anon() 42 size -= ret; in touch_anon() 59 return -1; in alloc_and_touch_anon_noexit() 63 return -1; in alloc_and_touch_anon_noexit() 74 * Create a child process that allocates and touches 100MB, then waits to be 75 * killed. Wait until the child is attached to the cgroup, kill all processes 102 /* wait for the child to enter cgroup */ in test_cgcore_destroy() 133 * A(0) - B(0) - C(1) [all …]
|
| D | test_cpuset.c | 1 // SPDX-License-Identifier: GPL-2.0 32 const char *child = cgroup; in do_controller_fn() local 33 const char *parent = arg; in do_controller_fn() local 38 if (!cg_read_strstr(child, "cgroup.controllers", "cpuset")) in do_controller_fn() 41 if (cg_write(parent, "cgroup.subtree_control", "+cpuset")) in do_controller_fn() 44 if (cg_read_strstr(child, "cgroup.controllers", "cpuset")) in do_controller_fn() 47 if (cg_write(parent, "cgroup.subtree_control", "-cpuset")) in do_controller_fn() 50 if (!cg_read_strstr(child, "cgroup.controllers", "cpuset")) in do_controller_fn() 58 * The success should only depend on the parent cgroup permissions and not the 67 char *parent = NULL, *child_src = NULL, *child_dst = NULL; in test_cpuset_perms_object() local [all …]
|
| D | test_kmem.c | 1 // SPDX-License-Identifier: GPL-2.0 38 "/something-non-existent-with-a-long-name-%64lu-%d", in alloc_dcache() 105 int ret = -1; in alloc_kmem_smp() 109 return -1; in alloc_kmem_smp() 115 return -1; in alloc_kmem_smp() 129 static int cg_run_in_subcgroups(const char *parent, in cg_run_in_subcgroups() argument 133 char *child; in cg_run_in_subcgroups() local 137 child = cg_name_indexed(parent, "child", i); in cg_run_in_subcgroups() 138 if (!child) in cg_run_in_subcgroups() 139 return -1; in cg_run_in_subcgroups() [all …]
|
| D | test_cpu.c | 1 // SPDX-License-Identifier: GPL-2.0 40 char *parent = NULL, *child = NULL, *parent2 = NULL, *child2 = NULL; in test_cpucg_subtree_control() local 44 parent = cg_name(root, "cpucg_test_0"); in test_cpucg_subtree_control() 45 if (!parent) in test_cpucg_subtree_control() 48 if (cg_create(parent)) in test_cpucg_subtree_control() 51 if (cg_write(parent, "cgroup.subtree_control", "+cpu")) in test_cpucg_subtree_control() 54 child = cg_name(parent, "cpucg_test_child"); in test_cpucg_subtree_control() 55 if (!child) in test_cpucg_subtree_control() 58 if (cg_create(child)) in test_cpucg_subtree_control() 61 if (cg_read_strstr(child, "cgroup.controllers", "cpu")) in test_cpucg_subtree_control() [all …]
|
| /kernel/linux/linux-5.10/tools/testing/selftests/cgroup/ |
| D | test_core.c | 1 /* SPDX-License-Identifier: GPL-2.0 */ 28 return -1; in touch_anon() 36 return -1; in touch_anon() 40 size -= ret; in touch_anon() 57 return -1; in alloc_and_touch_anon_noexit() 61 return -1; in alloc_and_touch_anon_noexit() 72 * Create a child process that allocates and touches 100MB, then waits to be 73 * killed. Wait until the child is attached to the cgroup, kill all processes 100 /* wait for the child to enter cgroup */ in test_cgcore_destroy() 131 * A(0) - B(0) - C(1) [all …]
|
| D | test_kmem.c | 1 // SPDX-License-Identifier: GPL-2.0 38 "/something-non-existent-with-a-long-name-%64lu-%d", in alloc_dcache() 101 int ret = -1; in alloc_kmem_smp() 105 return -1; in alloc_kmem_smp() 111 return -1; in alloc_kmem_smp() 125 static int cg_run_in_subcgroups(const char *parent, in cg_run_in_subcgroups() argument 129 char *child; in cg_run_in_subcgroups() local 133 child = cg_name_indexed(parent, "child", i); in cg_run_in_subcgroups() 134 if (!child) in cg_run_in_subcgroups() 135 return -1; in cg_run_in_subcgroups() [all …]
|
| /kernel/linux/linux-6.6/tools/testing/selftests/landlock/ |
| D | ptrace_test.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Landlock tests - Ptrace 5 * Copyright © 2017-2020 Mickaël Salaün <mic@digikod.net> 6 * Copyright © 2019-2020 ANSSI 80 return -1; in get_yama_ptrace_scope() 88 /* clang-format off */ 90 /* clang-format on */ 100 * Test multiple tracing combinations between a parent process P1 and a child 111 * P1-. P1 -> P2 : allow 112 * \ P2 -> P1 : allow [all …]
|
| /kernel/linux/linux-5.10/drivers/pci/pcie/ |
| D | aspm.c | 1 // SPDX-License-Identifier: GPL-2.0 53 struct pcie_link_state *parent; /* pointer to the parent Link state */ member 121 return link->aspm_default; in policy_to_aspm_state() 137 return link->clkpm_default; in policy_to_clkpm_state() 144 struct pci_dev *child; in pcie_set_clkpm_nocheck() local 145 struct pci_bus *linkbus = link->pdev->subordinate; in pcie_set_clkpm_nocheck() 148 list_for_each_entry(child, &linkbus->devices, bus_list) in pcie_set_clkpm_nocheck() 149 pcie_capability_clear_and_set_word(child, PCI_EXP_LNKCTL, in pcie_set_clkpm_nocheck() 152 link->clkpm_enabled = !!enable; in pcie_set_clkpm_nocheck() 161 if (!link->clkpm_capable || link->clkpm_disable) in pcie_set_clkpm() [all …]
|
| /kernel/linux/linux-5.10/fs/ |
| D | pnode.c | 1 // SPDX-License-Identifier: GPL-2.0-only 19 return list_entry(p->mnt_share.next, struct mount, mnt_share); in next_peer() 24 return list_entry(p->mnt_slave_list.next, struct mount, mnt_slave); in first_slave() 29 return list_entry(p->mnt_slave_list.prev, struct mount, mnt_slave); in last_slave() 34 return list_entry(p->mnt_slave.next, struct mount, mnt_slave); in next_slave() 45 if (m->mnt_ns == ns && is_path_reachable(m, m->mnt.mnt_root, root)) in get_peer_under_root() 64 for (m = mnt->mnt_master; m != NULL; m = m->mnt_master) { in get_dominating_id() 65 struct mount *d = get_peer_under_root(m, mnt->mnt_ns, root); in get_dominating_id() 67 return d->mnt_group_id; in get_dominating_id() 77 if (list_empty(&mnt->mnt_share)) { in do_make_slave() [all …]
|
| /kernel/linux/linux-6.6/drivers/scsi/libsas/ |
| D | sas_expander.c | 1 // SPDX-License-Identifier: GPL-2.0 29 /* ---------- SMP task management ---------- */ 40 to_sas_internal(dev->port->ha->shost->transportt); in smp_execute_task_sg() 41 struct sas_ha_struct *ha = dev->port->ha; in smp_execute_task_sg() 43 pm_runtime_get_sync(ha->dev); in smp_execute_task_sg() 44 mutex_lock(&dev->ex_dev.cmd_mutex); in smp_execute_task_sg() 46 if (test_bit(SAS_DEV_GONE, &dev->state)) { in smp_execute_task_sg() 47 res = -ECOMM; in smp_execute_task_sg() 53 res = -ENOMEM; in smp_execute_task_sg() 56 task->dev = dev; in smp_execute_task_sg() [all …]
|
| /kernel/linux/linux-5.10/drivers/scsi/libsas/ |
| D | sas_expander.c | 1 // SPDX-License-Identifier: GPL-2.0 29 /* ---------- SMP task management ---------- */ 34 struct sas_task *task = slow->task; in smp_task_timedout() 37 spin_lock_irqsave(&task->task_state_lock, flags); in smp_task_timedout() 38 if (!(task->task_state_flags & SAS_TASK_STATE_DONE)) { in smp_task_timedout() 39 task->task_state_flags |= SAS_TASK_STATE_ABORTED; in smp_task_timedout() 40 complete(&task->slow_task->completion); in smp_task_timedout() 42 spin_unlock_irqrestore(&task->task_state_lock, flags); in smp_task_timedout() 47 del_timer(&task->slow_task->timer); in smp_task_done() 48 complete(&task->slow_task->completion); in smp_task_done() [all …]
|
| /kernel/linux/linux-6.6/drivers/pci/pcie/ |
| D | aspm.c | 1 // SPDX-License-Identifier: GPL-2.0 49 struct pcie_link_state *parent; /* pointer to the parent Link state */ member 99 struct pci_dev *child; in pci_function_0() local 101 list_for_each_entry(child, &linkbus->devices, bus_list) in pci_function_0() 102 if (PCI_FUNC(child->devfn) == 0) in pci_function_0() 103 return child; in pci_function_0() 120 return link->aspm_default; in policy_to_aspm_state() 136 return link->clkpm_default; in policy_to_clkpm_state() 143 struct pci_dev *child; in pcie_set_clkpm_nocheck() local 144 struct pci_bus *linkbus = link->pdev->subordinate; in pcie_set_clkpm_nocheck() [all …]
|
| /kernel/linux/linux-6.6/include/linux/ |
| 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. 50 __rb_insert_augmented(node, root, augment->rotate); in rb_insert_augmented() 59 root->rb_leftmost = node; in rb_insert_augmented_cached() 60 rb_insert_augmented(node, &root->rb_root, augment); in rb_insert_augmented_cached() 68 struct rb_node **link = &tree->rb_root.rb_node; in rb_add_augmented_cached() 69 struct rb_node *parent = NULL; in rb_add_augmented_cached() local 73 parent = *link; in rb_add_augmented_cached() 74 if (less(node, parent)) { in rb_add_augmented_cached() [all …]
|
| /kernel/linux/linux-6.6/fs/ |
| D | pnode.c | 1 // SPDX-License-Identifier: GPL-2.0-only 19 return list_entry(p->mnt_share.next, struct mount, mnt_share); in next_peer() 24 return list_entry(p->mnt_slave_list.next, struct mount, mnt_slave); in first_slave() 29 return list_entry(p->mnt_slave_list.prev, struct mount, mnt_slave); in last_slave() 34 return list_entry(p->mnt_slave.next, struct mount, mnt_slave); in next_slave() 45 if (m->mnt_ns == ns && is_path_reachable(m, m->mnt.mnt_root, root)) in get_peer_under_root() 64 for (m = mnt->mnt_master; m != NULL; m = m->mnt_master) { in get_dominating_id() 65 struct mount *d = get_peer_under_root(m, mnt->mnt_ns, root); in get_dominating_id() 67 return d->mnt_group_id; in get_dominating_id() 77 if (list_empty(&mnt->mnt_share)) { in do_make_slave() [all …]
|
| /kernel/linux/linux-5.10/include/linux/ |
| 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. 50 __rb_insert_augmented(node, root, augment->rotate); in rb_insert_augmented() 59 root->rb_leftmost = node; in rb_insert_augmented_cached() 60 rb_insert_augmented(node, &root->rb_root, augment); in rb_insert_augmented_cached() 83 rb = rb_parent(&node->RBFIELD); \ 91 new->RBAUGMENTED = old->RBAUGMENTED; \ 98 new->RBAUGMENTED = old->RBAUGMENTED; \ 117 * RBCOMPUTE: name of function that returns the per-node RBTYPE scalar [all …]
|
| /kernel/linux/linux-6.6/tools/include/linux/ |
| 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. 52 __rb_insert_augmented(node, root, augment->rotate); in rb_insert_augmented() 61 root->rb_leftmost = node; in rb_insert_augmented_cached() 62 rb_insert_augmented(node, &root->rb_root, augment); in rb_insert_augmented_cached() 85 rb = rb_parent(&node->RBFIELD); \ 93 new->RBAUGMENTED = old->RBAUGMENTED; \ 100 new->RBAUGMENTED = old->RBAUGMENTED; \ 119 * RBCOMPUTE: name of function that returns the per-node RBTYPE scalar [all …]
|
| /kernel/linux/linux-5.10/tools/include/linux/ |
| 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. 52 __rb_insert_augmented(node, root, augment->rotate); in rb_insert_augmented() 61 root->rb_leftmost = node; in rb_insert_augmented_cached() 62 rb_insert_augmented(node, &root->rb_root, augment); in rb_insert_augmented_cached() 85 rb = rb_parent(&node->RBFIELD); \ 93 new->RBAUGMENTED = old->RBAUGMENTED; \ 100 new->RBAUGMENTED = old->RBAUGMENTED; \ 119 * RBCOMPUTE: name of function that returns the per-node RBTYPE scalar [all …]
|
| /kernel/linux/linux-5.10/drivers/firmware/efi/ |
| D | dev-path-parser.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * dev-path-parser.c - EFI Device Path parser 28 if (adev->pnp.unique_id) in match_acpi_dev() 29 return !strcmp(adev->pnp.unique_id, hid_uid.uid); in match_acpi_dev() 35 struct device *parent, struct device **child) in parse_acpi_path() argument 40 if (node->header.length != 12) in parse_acpi_path() 41 return -EINVAL; in parse_acpi_path() 44 'A' + ((node->acpi.hid >> 10) & 0x1f) - 1, in parse_acpi_path() 45 'A' + ((node->acpi.hid >> 5) & 0x1f) - 1, in parse_acpi_path() 46 'A' + ((node->acpi.hid >> 0) & 0x1f) - 1, in parse_acpi_path() [all …]
|
| /kernel/liteos_a/kernel/extended/container/ |
| D | los_pid_container.c | 2 * Copyright (c) 2023-2023 Huawei Device Co., Ltd. All rights reserved. 45 PidContainer *pidContainer = processCB->container->pidContainer; in FreeVpid() 46 UINT32 vpid = processCB->processID; in FreeVpid() 49 ProcessVid *processVid = &pidContainer->pidArray[vpid]; in FreeVpid() 50 processVid->cb = (UINTPTR)g_defaultProcessCB; in FreeVpid() 51 vpid = processVid->vpid; in FreeVpid() 52 processVid->vpid = OS_INVALID_VALUE; in FreeVpid() 53 LOS_ListTailInsert(&pidContainer->pidFreeList, &processVid->node); in FreeVpid() 54 LOS_AtomicDec(&pidContainer->rc); in FreeVpid() 55 PidContainer *parentPidContainer = pidContainer->parent; in FreeVpid() [all …]
|
| /kernel/linux/linux-6.6/drivers/iio/multiplexer/ |
| D | iio-mux.c | 1 // SPDX-License-Identifier: GPL-2.0 32 struct iio_channel *parent; member 36 struct mux_child *child; member 42 struct mux_child *child = &mux->child[idx]; in iio_mux_select() local 43 struct iio_chan_spec const *chan = &mux->chan[idx]; in iio_mux_select() 47 ret = mux_control_select_delay(mux->control, chan->channel, in iio_mux_select() 48 mux->delay_us); in iio_mux_select() 50 mux->cached_state = -1; in iio_mux_select() 54 if (mux->cached_state == chan->channel) in iio_mux_select() 57 if (chan->ext_info) { in iio_mux_select() [all …]
|