/linux/lib/ |
H A D | list-test.c | 3 * KUnit test for the Kernel Linked-list structures. 10 #include <linux/list.h> 15 struct list_head list; member 20 /* Test the different ways of initialising a list. */ in list_test_list_init() 50 LIST_HEAD(list); in list_test_list_add() 52 list_add(&a, &list); in list_test_list_add() 53 list_add(&b, &list); in list_test_list_add() 55 /* should be [list] -> b -> a */ in list_test_list_add() 56 KUNIT_EXPECT_PTR_EQ(test, list.next, &b); in list_test_list_add() 57 KUNIT_EXPECT_PTR_EQ(test, b.prev, &list); in list_test_list_add() [all …]
|
/linux/tools/include/linux/ |
H A D | list.h | 11 * Simple doubly linked list implementation. 25 static inline void INIT_LIST_HEAD(struct list_head *list) in INIT_LIST_HEAD() argument 27 list->next = list; in INIT_LIST_HEAD() 28 list->prev = list; in INIT_LIST_HEAD() 34 * This is only for internal list manipulation where we know 56 * @head: list head to add it after 70 * @head: list head to add it before 81 * Delete a list entry by making the prev/next entries 84 * This is only for internal list manipulation where we know 94 * list_del - deletes entry from list. [all …]
|
/linux/include/linux/ |
H A D | rculist.h | 8 * RCU-protected list version 10 #include <linux/list.h> 15 * @list: list to be initialized 18 * cleanup tasks, when readers have no access to the list being initialized. 19 * However, if the list being initialized is visible to readers, you 22 static inline void INIT_LIST_HEAD_RCU(struct list_head *list) in INIT_LIST_HEAD_RCU() argument 24 WRITE_ONCE(list->next, list); in INIT_LIST_HEAD_RCU() 25 WRITE_ONCE(list->prev, list); in INIT_LIST_HEAD_RCU() 32 #define list_next_rcu(list) (*((struct list_head __rcu **)(&(list)->next))) argument 37 * Any list traversed with list_bidir_prev_rcu() must never use [all …]
|
H A D | llist.h | 5 * Lock-less NULL terminated single linked list 16 * needed. This is because llist_del_first depends on list->first->next not 19 * preempted back, the list->first is the same as before causing the cmpxchg in 35 * The list entries deleted via llist_del_all can be traversed with 36 * traversing function such as llist_for_each etc. But the list 37 * entries can not be traversed safely before deleted from the list. 42 * The basic atomic operation of this list is cmpxchg on long. On 44 * list can NOT be used in NMI handlers. So code that uses the list in 68 * init_llist_head - initialize lock-less list head 69 * @head: the head for your lock-less list [all …]
|
H A D | rculist_nulls.h | 8 * RCU-protected list version 14 * hlist_nulls_del_init_rcu - deletes entry from hash list with re-initialization 15 * @n: the element to delete from the hash list. 19 * must know if the list entry is still hashed or already unhashed. 22 * that may still be used for walking the hash list and we can only 28 * list-mutation primitive, such as hlist_nulls_add_head_rcu() or 29 * hlist_nulls_del_rcu(), running on this same list. However, it is 30 * perfectly legal to run concurrently with the _rcu list-traversal 42 * hlist_nulls_first_rcu - returns the first element of the hash list. 43 * @head: the head of the list. [all …]
|
/linux/drivers/clk/samsung/ |
H A D | clk.c | 106 /* register a list of aliases */ 108 const struct samsung_clock_alias *list, in samsung_clk_register_alias() argument 114 for (idx = 0; idx < nr_clk; idx++, list++) { in samsung_clk_register_alias() 115 if (!list->id) { in samsung_clk_register_alias() 121 clk_hw = ctx->clk_data.hws[list->id]; in samsung_clk_register_alias() 124 list->id); in samsung_clk_register_alias() 128 ret = clk_hw_register_clkdev(clk_hw, list->alias, in samsung_clk_register_alias() 129 list->dev_name); in samsung_clk_register_alias() 132 __func__, list->alias); in samsung_clk_register_alias() 136 /* register a list of fixed clocks */ [all …]
|
/linux/tools/firewire/ |
H A D | list.h | 2 struct list { struct 3 struct list *next, *prev; argument 7 list_init(struct list *list) in list_init() argument 9 list->next = list; in list_init() 10 list->prev = list; in list_init() 14 list_empty(struct list *list) in list_empty() argument 16 return list->next == list; in list_empty() 20 list_insert(struct list *link, struct list *new_link) in list_insert() 29 list_append(struct list *list, struct list *new_link) in list_append() argument 31 list_insert((struct list *)list, new_link); in list_append() [all …]
|
/linux/io_uring/ |
H A D | slist.h | 15 #define wq_list_empty(list) (READ_ONCE((list)->first) == NULL) argument 17 #define INIT_WQ_LIST(list) do { \ argument 18 (list)->first = NULL; \ 23 struct io_wq_work_list *list) in wq_list_add_after() argument 30 list->last = node; in wq_list_add_after() 34 struct io_wq_work_list *list) in wq_list_add_tail() argument 37 if (!list->first) { in wq_list_add_tail() 38 list->last = node; in wq_list_add_tail() 39 WRITE_ONCE(list->first, node); in wq_list_add_tail() 41 list->last->next = node; in wq_list_add_tail() [all …]
|
/linux/scripts/include/ |
H A D | list.h | 30 * Circular doubly linked list implementation. 46 * @list: list_head structure to be initialized. 48 * Initializes the list_head to point to itself. If it is a list header, 49 * the result is an empty list. 51 static inline void INIT_LIST_HEAD(struct list_head *list) in INIT_LIST_HEAD() argument 53 list->next = list; in INIT_LIST_HEAD() 54 list->prev = list; in INIT_LIST_HEAD() 60 * This is only for internal list manipulation where we know 76 * @head: list head to add it after 89 * @head: list head to add it before [all …]
|
/linux/drivers/clk/x86/ |
H A D | clk-cgu.c | 26 const struct lgm_clk_branch *list) in lgm_clk_register_fixed() argument 29 if (list->div_flags & CLOCK_FLAG_VAL_INIT) in lgm_clk_register_fixed() 30 lgm_set_clk_val(ctx->membase, list->div_off, list->div_shift, in lgm_clk_register_fixed() 31 list->div_width, list->div_val); in lgm_clk_register_fixed() 33 return clk_hw_register_fixed_rate(NULL, list->name, in lgm_clk_register_fixed() 34 list->parent_data[0].name, in lgm_clk_register_fixed() 35 list->flags, list->mux_flags); in lgm_clk_register_fixed() 82 const struct lgm_clk_branch *list) in lgm_clk_register_mux() argument 84 unsigned long cflags = list->mux_flags; in lgm_clk_register_mux() 86 u8 shift = list->mux_shift; in lgm_clk_register_mux() [all …]
|
/linux/drivers/net/wireless/quantenna/qtnfmac/ |
H A D | util.c | 7 void qtnf_sta_list_init(struct qtnf_sta_list *list) in qtnf_sta_list_init() argument 9 if (unlikely(!list)) in qtnf_sta_list_init() 12 INIT_LIST_HEAD(&list->head); in qtnf_sta_list_init() 13 atomic_set(&list->size, 0); in qtnf_sta_list_init() 16 struct qtnf_sta_node *qtnf_sta_list_lookup(struct qtnf_sta_list *list, in qtnf_sta_list_lookup() argument 24 list_for_each_entry(node, &list->head, list) { in qtnf_sta_list_lookup() 32 struct qtnf_sta_node *qtnf_sta_list_lookup_index(struct qtnf_sta_list *list, in qtnf_sta_list_lookup_index() argument 37 if (qtnf_sta_list_size(list) <= index) in qtnf_sta_list_lookup_index() 40 list_for_each_entry(node, &list->head, list) { in qtnf_sta_list_lookup_index() 51 struct qtnf_sta_list *list = &vif->sta_list; in qtnf_sta_list_add() local [all …]
|
/linux/drivers/media/platform/renesas/vsp1/ |
H A D | vsp1_dl.c | 3 * vsp1_dl.c -- R-Car VSP1 Display List 41 * struct vsp1_dl_ext_header - Extended display list header 45 * @pre_ext_dl_plist: start address of pre-extended display list bodies 47 * @post_ext_dl_plist: start address of post-extended display list bodies 79 * struct vsp1_pre_ext_dl_body - Pre Extended Display List Body 80 * @opcode: Extended display list command operation code 93 * struct vsp1_dl_body - Display list body 94 * @list: entry in the display list list of bodies 95 * @free: entry in the pool free body list 105 struct list_head list; member [all …]
|
/linux/drivers/hid/ |
H A D | hidraw.c | 41 static inline bool hidraw_is_revoked(struct hidraw_list *list) in hidraw_is_revoked() argument 43 return list->revoked; in hidraw_is_revoked() 48 struct hidraw_list *list = file->private_data; in hidraw_read() local 52 if (hidraw_is_revoked(list)) in hidraw_read() 55 mutex_lock(&list->read_mutex); in hidraw_read() 58 if (list->head == list->tail) { in hidraw_read() 59 add_wait_queue(&list->hidraw->wait, &wait); in hidraw_read() 62 while (list->head == list->tail) { in hidraw_read() 67 if (!list->hidraw->exist) { in hidraw_read() 77 mutex_unlock(&list->read_mutex); in hidraw_read() [all …]
|
/linux/arch/sh/include/mach-ecovec24/mach/ |
H A D | partner-jet-setup.txt | 1 LIST "SPDX-License-Identifier: GPL-2.0" 2 LIST "partner-jet-setup.txt" 3 LIST "(C) Copyright 2009 Renesas Solutions Corp" 4 LIST "Kuninori Morimoto <morimoto.kuninori@renesas.com>" 5 LIST "--------------------------------" 6 LIST "zImage (RAM boot)" 7 LIST "This script can be used to boot the kernel from RAM via JTAG:" 8 LIST "> < partner-jet-setup.txt" 9 LIST "> RD zImage, 0xa8800000" 10 LIST "> G=0xa8800000" [all …]
|
/linux/drivers/net/ethernet/intel/ice/ |
H A D | ice_fltr.c | 10 * @h: pointer to the list head to be freed 26 * ice_fltr_add_entry_to_list - allocate and add filter entry to list 28 * @info: filter info struct that gets added to the passed in list 29 * @list: pointer to the list which contains MAC filters entry 33 struct list_head *list) in ice_fltr_add_entry_to_list() argument 44 list_add(&entry->list_entry, list); in ice_fltr_add_entry_to_list() 144 * ice_fltr_add_mac_list - add list of MAC filters 146 * @list: list of filters 148 int ice_fltr_add_mac_list(struct ice_vsi *vsi, struct list_head *list) in ice_fltr_add_mac_list() argument 150 return ice_add_mac(&vsi->back->hw, list); in ice_fltr_add_mac_list() [all …]
|
/linux/drivers/hid/usbhid/ |
H A D | hiddev.c | 62 struct list_head *list; in hiddev_lookup_report() local 79 list = report_enum->report_list.next; in hiddev_lookup_report() 80 report = list_entry(list, struct hid_report, list); in hiddev_lookup_report() 89 list = report->list.next; in hiddev_lookup_report() 90 if (list == &report_enum->report_list) in hiddev_lookup_report() 93 report = list_entry(list, struct hid_report, list); in hiddev_lookup_report() 123 list_for_each_entry(report, &report_enum->report_list, list) { in hiddev_lookup_usage() 144 struct hiddev_list *list; in hiddev_send_event() local 148 list_for_each_entry(list, &hiddev->list, node) { in hiddev_send_event() 150 (list->flags & HIDDEV_FLAG_REPORT) != 0) { in hiddev_send_event() [all …]
|
/linux/security/integrity/platform_certs/ |
H A D | efi_parser.c | 2 /* EFI signature/key/certificate list parser 15 * parse_efi_signature_list - Parse an EFI signature list for certificates 21 * Parse an EFI signature list looking for elements of interest. A list is 32 * Error EBADMSG is returned if the list doesn't parse correctly and 0 is 33 * returned if the list was parsed correctly. No error can be returned from 49 efi_signature_list_t list; in parse_efi_signature_list() local 52 if (size < sizeof(list)) in parse_efi_signature_list() 55 memcpy(&list, data, sizeof(list)); in parse_efi_signature_list() 56 pr_devel("LIST[%04x] guid=%pUl ls=%x hs=%x ss=%x\n", in parse_efi_signature_list() 58 &list.signature_type, list.signature_list_size, in parse_efi_signature_list() [all …]
|
/linux/net/netlabel/ |
H A D | netlabel_addrlist.c | 5 * This file contains network address list functions used to manage ordered 19 #include <linux/list.h> 32 * Address List Functions 38 * @head: the list head 41 * Searches the IPv4 address list given by @head. If a matching address entry 51 list_for_each_entry_rcu(iter, head, list) in netlbl_af4list_search() 62 * @head: the list head 65 * Searches the IPv4 address list given by @head. If an exact match if found 76 list_for_each_entry_rcu(iter, head, list) in netlbl_af4list_search_exact() 88 * @head: the list head [all …]
|
/linux/arch/sh/include/mach-kfr2r09/mach/ |
H A D | partner-jet-setup.txt | 1 LIST "SPDX-License-Identifier: GPL-2.0" 2 LIST "partner-jet-setup.txt - 20090729 Magnus Damm" 3 LIST "set up enough of the kfr2r09 hardware to boot the kernel" 5 LIST "zImage (RAM boot)" 6 LIST "This script can be used to boot the kernel from RAM via JTAG:" 7 LIST "> < partner-jet-setup.txt" 8 LIST "> RD zImage, 0xa8800000" 9 LIST "> G=0xa8800000" 11 LIST "romImage (Flash boot)" 12 LIST "Use the following command to burn the zImage to flash via JTAG:" [all …]
|
/linux/tools/memory-model/scripts/ |
H A D | newlitmushist.sh | 11 # See scripts/parseargs.sh for list of arguments. 39 # Create a list of the C-language litmus tests previously run. 42 xargs -r grep -L "^P${LKMM_PROCS}"> $T/list-C-already 44 # Form full list of litmus tests with no more than the specified 46 find litmus -name '*.litmus' -print | mselect7 -arch C > $T/list-C-all 47 xargs < $T/list-C-all -r grep -L "^P${LKMM_PROCS}" > $T/list-C-short 49 # Form list of new tests. Note: This does not handle litmus-test deletion! 50 sort $T/list-C-already $T/list-C-short | uniq -u > $T/list-C-new 52 # Form list of litmus tests that have changed since the last run. 53 sed < $T/list-C-short -e 's,^.*$,if test & -nt '"$LKMM_DESTDIR"'/&.out; then echo &; fi,' > $T/list… [all …]
|
/linux/drivers/gpu/drm/amd/amdgpu/ |
H A D | amdgpu_bo_list.c | 42 struct amdgpu_bo_list *list = container_of(rcu, struct amdgpu_bo_list, in amdgpu_bo_list_free_rcu() local 44 mutex_destroy(&list->bo_list_mutex); in amdgpu_bo_list_free_rcu() 45 kvfree(list); in amdgpu_bo_list_free_rcu() 50 struct amdgpu_bo_list *list = container_of(ref, struct amdgpu_bo_list, in amdgpu_bo_list_free() local 54 amdgpu_bo_list_for_each_entry(e, list) in amdgpu_bo_list_free() 56 call_rcu(&list->rhead, amdgpu_bo_list_free_rcu); in amdgpu_bo_list_free() 76 struct amdgpu_bo_list *list; in amdgpu_bo_list_create() local 81 list = kvzalloc(struct_size(list, entries, num_entries), GFP_KERNEL); in amdgpu_bo_list_create() 82 if (!list) in amdgpu_bo_list_create() 85 kref_init(&list->refcount); in amdgpu_bo_list_create() [all …]
|
/linux/drivers/usb/core/ |
H A D | phy.c | 11 #include <linux/list.h> 19 struct list_head list; member 24 struct list_head *list) in usb_phy_roothub_add_phy_by_name() argument 37 INIT_LIST_HEAD(&roothub_entry->list); in usb_phy_roothub_add_phy_by_name() 41 list_add_tail(&roothub_entry->list, list); in usb_phy_roothub_add_phy_by_name() 47 struct list_head *list) in usb_phy_roothub_add_phy() argument 64 INIT_LIST_HEAD(&roothub_entry->list); in usb_phy_roothub_add_phy() 68 list_add_tail(&roothub_entry->list, list); in usb_phy_roothub_add_phy() 90 INIT_LIST_HEAD(&phy_roothub->list); in usb_phy_roothub_alloc() 92 if (!usb_phy_roothub_add_phy_by_name(dev, "usb2-phy", &phy_roothub->list)) in usb_phy_roothub_alloc() [all …]
|
/linux/net/netfilter/ |
H A D | nf_conncount.c | 21 #include <linux/list.h> 51 struct nf_conncount_list list; member 85 static void conn_free(struct nf_conncount_list *list, in conn_free() argument 88 lockdep_assert_held(&list->list_lock); in conn_free() 90 list->count--; in conn_free() 97 find_or_evict(struct net *net, struct nf_conncount_list *list, in find_or_evict() argument 118 conn_free(list, conn); in find_or_evict() 126 struct nf_conncount_list *list, in __nf_conncount_add() argument 135 if ((u32)jiffies == list->last_gc) in __nf_conncount_add() 139 list_for_each_entry_safe(conn, conn_n, &list->head, node) { in __nf_conncount_add() [all …]
|
/linux/drivers/crypto/marvell/octeontx2/ |
H A D | otx2_cpt_reqmgr.h | 213 struct otx2_cpt_buf_ptr *list, in setup_sgio_components() argument 220 if (unlikely(!list)) { in setup_sgio_components() 221 dev_err(&pdev->dev, "Input list pointer is NULL\n"); in setup_sgio_components() 226 if (unlikely(!list[i].vptr)) in setup_sgio_components() 228 list[i].dma_addr = dma_map_single(&pdev->dev, list[i].vptr, in setup_sgio_components() 229 list[i].size, in setup_sgio_components() 231 if (unlikely(dma_mapping_error(&pdev->dev, list[i].dma_addr))) { in setup_sgio_components() 239 sg_ptr->len0 = cpu_to_be16(list[i * SG_COMPS_MAX + 0].size); in setup_sgio_components() 240 sg_ptr->len1 = cpu_to_be16(list[i * SG_COMPS_MAX + 1].size); in setup_sgio_components() 241 sg_ptr->len2 = cpu_to_be16(list[i * SG_COMPS_MAX + 2].size); in setup_sgio_components() [all …]
|
/linux/Documentation/RCU/ |
H A D | listRCU.rst | 7 (``struct list_head`` in list.h). One big advantage of this approach is 8 that all of the required memory ordering is provided by the list macros. 9 This document describes several list-based RCU use cases. 11 When iterating a list while holding the rcu_read_lock(), writers may 12 modify the list. The reader is guaranteed to see all of the elements 13 which were added to the list before they acquired the rcu_read_lock() 14 and are still on the list when they drop the rcu_read_unlock(). 15 Elements which are added to, or removed from the list may or may not 21 Example 1: Read-mostly list: Deferred Destruction 25 all processes in the system. ``task_struct::tasks`` represents the list node that [all …]
|