Home
last modified time | relevance | path

Searched refs:slots (Results 1 – 25 of 473) sorted by relevance

12345678910>>...19

/linux/mm/
H A Dswap_slots.c3 * Manage cache of swap slots to be used for and returned from
10 * We allocate the swap slots from the global pool and put
17 * lock. We do not reuse the returned slots directly but
19 * allows the slots to coalesce and reduce fragmentation.
25 * The swap slots cache is protected by a mutex instead of
26 * a spin lock as when we search for slots with scan_swap_map,
43 /* Serialize swap slots cache enable/disable operations */
116 swp_entry_t *slots, *slots_ret; in alloc_swap_slot_cache() local
123 slots = kvcalloc(SWAP_SLOTS_CACHE_SIZE, sizeof(swp_entry_t), in alloc_swap_slot_cache()
125 if (!slots) in alloc_swap_slot_cache()
172 swp_entry_t *slots = NULL; drain_slots_cache_cpu() local
[all...]
H A Dz3fold.c113 struct z3fold_buddy_slots *slots; member
197 struct z3fold_buddy_slots *slots = kmem_cache_zalloc(pool->c_handle, in alloc_slots() local
200 if (slots) { in alloc_slots()
202 kmemleak_not_leak(slots); in alloc_slots()
203 slots->pool = (unsigned long)pool; in alloc_slots()
204 rwlock_init(&slots->lock); in alloc_slots()
207 return slots; in alloc_slots()
241 struct z3fold_buddy_slots *slots; in get_z3fold_header() local
246 slots = handle_to_slots(handle); in get_z3fold_header()
250 read_lock(&slots->lock); in get_z3fold_header()
[all …]
/linux/sound/pci/ac97/
H A Dac97_pcm.c312 unsigned short slots = 0; in get_pslots() local
326 slots |= (1<<AC97_SLOT_PCM_LEFT)|(1<<AC97_SLOT_PCM_RIGHT); in get_pslots()
328 slots |= (1<<AC97_SLOT_PCM_SLEFT)|(1<<AC97_SLOT_PCM_SRIGHT); in get_pslots()
330 slots |= (1<<AC97_SLOT_PCM_CENTER)|(1<<AC97_SLOT_LFE); in get_pslots()
343 slots |= (1<<AC97_SLOT_PCM_SLEFT)|(1<<AC97_SLOT_PCM_SRIGHT); in get_pslots()
345 slots |= (1<<AC97_SLOT_PCM_CENTER)|(1<<AC97_SLOT_LFE); in get_pslots()
355 slots |= (1<<AC97_SLOT_PCM_CENTER)|(1<<AC97_SLOT_LFE); in get_pslots()
361 return slots; in get_pslots()
363 unsigned short slots; in get_pslots() local
364 slots = (1<<AC97_SLOT_PCM_LEFT)|(1<<AC97_SLOT_PCM_RIGHT); in get_pslots()
[all …]
/linux/drivers/input/
H A Dinput-mt.c53 mt = kzalloc(struct_size(mt, slots, num_slots), GFP_KERNEL); in input_mt_init_slots()
94 input_mt_set_value(&mt->slots[i], ABS_MT_TRACKING_ID, -1); in input_mt_init_slots()
148 slot = &mt->slots[mt->slot]; in input_mt_report_slot_state()
213 struct input_mt_slot *ps = &mt->slots[i]; in input_mt_report_pointer_emulation()
269 if (input_mt_is_active(&mt->slots[i]) && in __input_mt_drop_unused()
270 !input_mt_is_used(mt, &mt->slots[i])) { in __input_mt_drop_unused()
415 for (s = mt->slots; s != mt->slots + mt->num_slots; s++) { in input_mt_set_matrix()
430 int *slots, int num_pos) in input_mt_set_slots() argument
436 slots[j] = -1; in input_mt_set_slots()
438 for (s = mt->slots; s != mt->slots + mt->num_slots; s++) { in input_mt_set_slots()
[all …]
/linux/tools/testing/selftests/kvm/lib/
H A Dmemstress.c125 uint64_t vcpu_memory_bytes, int slots, in memstress_create_vm() argument
154 TEST_ASSERT(guest_num_pages % slots == 0, in memstress_create_vm()
156 slots); in memstress_create_vm()
208 for (i = 0; i < slots; i++) { in memstress_create_vm()
209 uint64_t region_pages = guest_num_pages / slots; in memstress_create_vm()
322 static void toggle_dirty_logging(struct kvm_vm *vm, int slots, bool enable) in toggle_dirty_logging() argument
326 for (i = 0; i < slots; i++) { in toggle_dirty_logging()
334 void memstress_enable_dirty_logging(struct kvm_vm *vm, int slots) in memstress_enable_dirty_logging() argument
336 toggle_dirty_logging(vm, slots, true); in memstress_enable_dirty_logging()
339 void memstress_disable_dirty_logging(struct kvm_vm *vm, int slots) in memstress_disable_dirty_logging() argument
[all …]
/linux/fs/btrfs/
H A Dfile-item.c181 item = btrfs_item_ptr(leaf, path->slots[0], in btrfs_insert_hole_extent()
225 if (path->slots[0] == 0) in btrfs_lookup_csum()
227 path->slots[0]--; in btrfs_lookup_csum()
228 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_lookup_csum()
234 csums_in_item = btrfs_item_size(leaf, path->slots[0]); in btrfs_lookup_csum()
244 item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_csum_item); in btrfs_lookup_csum()
298 item = btrfs_item_ptr(path->nodes[0], path->slots[0], in search_csum_tree()
300 btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0]); in search_csum_tree()
301 itemsize = btrfs_item_size(path->nodes[0], path->slots[0]); in search_csum_tree()
318 btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0]); in search_csum_tree()
[all …]
H A Dinode-item.c101 return btrfs_find_name_in_ext_backref(path->nodes[0], path->slots[0], in btrfs_lookup_inode_extref()
141 extref = btrfs_find_name_in_ext_backref(path->nodes[0], path->slots[0], in btrfs_del_inode_extref()
150 item_size = btrfs_item_size(leaf, path->slots[0]); in btrfs_del_inode_extref()
164 item_start = btrfs_item_ptr_offset(leaf, path->slots[0]); in btrfs_del_inode_extref()
210 ref = btrfs_find_name_in_backref(path->nodes[0], path->slots[0], name); in btrfs_del_inode_ref()
217 item_size = btrfs_item_size(leaf, path->slots[0]); in btrfs_del_inode_ref()
228 item_start = btrfs_item_ptr_offset(leaf, path->slots[0]); in btrfs_del_inode_ref()
279 path->slots[0], in btrfs_insert_inode_extref()
291 ptr = (unsigned long)btrfs_item_ptr(leaf, path->slots[0], char); in btrfs_insert_inode_extref()
292 ptr += btrfs_item_size(leaf, path->slots[0]) - ins_len; in btrfs_insert_inode_extref()
[all …]
H A Dctree.c216 p->slots[i] = 0; in btrfs_release_path()
931 int orig_slot = path->slots[level]; in balance_level()
945 pslot = path->slots[level + 1]; in balance_level()
1157 path->slots[level + 1] -= 1; in balance_level()
1158 path->slots[level] = orig_slot; in balance_level()
1165 path->slots[level] = orig_slot; in balance_level()
1170 btrfs_node_blockptr(path->nodes[level], path->slots[level])) in balance_level()
1201 int orig_slot = path->slots[level]; in push_nodes_for_insert()
1211 pslot = path->slots[level + 1]; in push_nodes_for_insert()
1258 path->slots[level + 1] -= 1; in push_nodes_for_insert()
[all …]
H A Dfiemap.c313 path->slots[0]++; in fiemap_next_leaf_item()
314 if (path->slots[0] < btrfs_header_nritems(path->nodes[0])) in fiemap_next_leaf_item()
333 btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0]); in fiemap_next_leaf_item()
353 slot = path->slots[0]; in fiemap_next_leaf_item()
356 path->slots[0] = slot; in fiemap_next_leaf_item()
387 if (ret > 0 && path->slots[0] > 0) { in fiemap_search_slot()
388 btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0] - 1); in fiemap_search_slot()
390 path->slots[0]--; in fiemap_search_slot()
393 if (path->slots[0] >= btrfs_header_nritems(path->nodes[0])) { in fiemap_search_slot()
398 btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0]); in fiemap_search_slot()
[all …]
/linux/tools/testing/selftests/hid/tests/
H A Dtest_multitouch.py153 def event(self, slots, global_data=None, contact_count=None, incr_scantime=True): argument
158 slots = slots[: self.max_contacts]
163 global_data.contactcount = len(slots)
168 while len(slots):
170 application=self.cur_application, data=slots, global_data=global_data
261 slots=None, argument
282 if slots is None:
283 slots = [Data()]
285 return super().event(slots, global_data, contact_count, incr_scantime)
550 assert evdev.slots[0][libevdev.EV_ABS.ABS_MT_TRACKING_ID] == -1
[all …]
H A Dtest_sony.py149 assert evdev.slots[0][libevdev.EV_ABS.ABS_MT_TRACKING_ID] == 0
150 assert evdev.slots[0][libevdev.EV_ABS.ABS_MT_POSITION_X] == 50
151 assert evdev.slots[0][libevdev.EV_ABS.ABS_MT_POSITION_Y] == 100
158 assert evdev.slots[0][libevdev.EV_ABS.ABS_MT_TRACKING_ID] == -1
178 assert evdev.slots[0][libevdev.EV_ABS.ABS_MT_TRACKING_ID] == 0
179 assert evdev.slots[0][libevdev.EV_ABS.ABS_MT_POSITION_X] == 50
180 assert evdev.slots[0][libevdev.EV_ABS.ABS_MT_POSITION_Y] == 100
181 assert evdev.slots[1][libevdev.EV_ABS.ABS_MT_TRACKING_ID] == -1
194 assert evdev.slots[0][libevdev.EV_ABS.ABS_MT_TRACKING_ID] == 0
195 assert evdev.slots[0][libevdev.EV_ABS.ABS_MT_POSITION_X] == 50
[all …]
/linux/drivers/misc/mei/
H A Ddma-ring.c175 u32 rd_idx, rem, slots; in mei_dma_ring_read() local
187 slots = mei_data2slots(len); in mei_dma_ring_read()
193 if (rd_idx + slots > dbuf_depth) { in mei_dma_ring_read()
195 rem = slots - (dbuf_depth - rd_idx); in mei_dma_ring_read()
198 rem = slots; in mei_dma_ring_read()
203 WRITE_ONCE(ctrl->dbuf_rd_idx, ctrl->dbuf_rd_idx + slots); in mei_dma_ring_read()
252 u32 wr_idx, rem, slots; in mei_dma_ring_write() local
260 slots = mei_data2slots(len); in mei_dma_ring_write()
262 if (wr_idx + slots > hbuf_depth) { in mei_dma_ring_write()
264 rem = slots - (hbuf_depth - wr_idx); in mei_dma_ring_write()
[all …]
H A Dinterrupt.c259 int slots; in mei_cl_irq_disconnect_rsp() local
263 slots = mei_hbuf_empty_slots(dev); in mei_cl_irq_disconnect_rsp()
264 if (slots < 0) in mei_cl_irq_disconnect_rsp()
267 if ((u32)slots < msg_slots) in mei_cl_irq_disconnect_rsp()
291 int slots; in mei_cl_irq_read() local
298 slots = mei_hbuf_empty_slots(dev); in mei_cl_irq_read()
299 if (slots < 0) in mei_cl_irq_read()
302 if ((u32)slots < msg_slots) in mei_cl_irq_read()
361 struct list_head *cmpl_list, s32 *slots) in mei_irq_read_handler() argument
375 (*slots)--; in mei_irq_read_handler()
[all …]
/linux/lib/
H A Dassoc_array.c52 ptr = READ_ONCE(node->slots[slot]); /* Address dependency. */ in assoc_array_subtree_iterate()
81 ptr = READ_ONCE(node->slots[slot]); /* Address dependency. */ in assoc_array_subtree_iterate()
209 ptr = READ_ONCE(node->slots[slot]); /* Address dependency. */ in assoc_array_walk()
324 ptr = READ_ONCE(node->slots[slot]); /* Address dependency. */ in assoc_array_find()
382 struct assoc_array_ptr *ptr = node->slots[slot]; in assoc_array_destroy_subtree()
462 edit->leaf_p = &new_n0->slots[0]; in assoc_array_insert_in_empty_tree()
505 ptr = node->slots[i]; in assoc_array_insert_into_terminal_node()
514 edit->leaf_p = &node->slots[i]; in assoc_array_insert_into_terminal_node()
515 edit->dead_leaf = node->slots[i]; in assoc_array_insert_into_terminal_node()
526 edit->leaf_p = &node->slots[free_slot]; in assoc_array_insert_into_terminal_node()
[all …]
H A Dmaple_tree.c801 void __rcu **slots, unsigned char offset) in mt_slot() argument
803 return rcu_dereference_check(slots[offset], mt_locked(mt)); in mt_slot()
807 void __rcu **slots, unsigned char offset) in mt_slot_locked() argument
809 return rcu_dereference_protected(slots[offset], mt_write_locked(mt)); in mt_slot_locked()
820 void __rcu **slots, unsigned char offset) in mas_slot_locked() argument
822 return mt_slot_locked(mas->tree, slots, offset); in mas_slot_locked()
833 static __always_inline void *mas_slot(struct ma_state *mas, void __rcu **slots, in mas_slot() argument
836 return mt_slot(mas->tree, slots, offset); in mas_slot()
904 void __rcu **slots; in mt_clear_meta() local
911 slots = mn->mr64.slot; in mt_clear_meta()
[all …]
/linux/tools/testing/selftests/kvm/include/
H A Dmemstress.h59 uint64_t vcpu_memory_bytes, int slots,
74 void memstress_enable_dirty_logging(struct kvm_vm *vm, int slots);
75 void memstress_disable_dirty_logging(struct kvm_vm *vm, int slots);
76 void memstress_get_dirty_log(struct kvm_vm *vm, unsigned long *bitmaps[], int slots);
78 int slots, uint64_t pages_per_slot);
79 unsigned long **memstress_alloc_bitmaps(int slots, uint64_t pages_per_slot);
80 void memstress_free_bitmaps(unsigned long *bitmaps[], int slots);
/linux/arch/arm64/kernel/
H A Dhw_breakpoint.c189 static int hw_breakpoint_slot_setup(struct perf_event **slots, int max_slots, in hw_breakpoint_slot_setup() argument
197 slot = &slots[i]; in hw_breakpoint_slot_setup()
227 struct perf_event **slots; in hw_breakpoint_control() local
237 slots = this_cpu_ptr(bp_on_reg); in hw_breakpoint_control()
244 slots = this_cpu_ptr(wp_on_reg); in hw_breakpoint_control()
249 i = hw_breakpoint_slot_setup(slots, max_slots, bp, ops); in hw_breakpoint_control()
585 struct perf_event **slots; in toggle_bp_registers() local
589 slots = this_cpu_ptr(bp_on_reg); in toggle_bp_registers()
593 slots = this_cpu_ptr(wp_on_reg); in toggle_bp_registers()
601 if (!slots[i]) in toggle_bp_registers()
[all …]
/linux/kernel/dma/
H A Dswiotlb.c289 mem->slots[i].list = min(IO_TLB_SEGSIZE - io_tlb_offset(i), in swiotlb_init_io_tlb_pool()
291 mem->slots[i].orig_addr = INVALID_PHYS_ADDR; in swiotlb_init_io_tlb_pool()
292 mem->slots[i].alloc_size = 0; in swiotlb_init_io_tlb_pool()
293 mem->slots[i].pad_slots = 0; in swiotlb_init_io_tlb_pool()
398 alloc_size = PAGE_ALIGN(array_size(sizeof(*mem->slots), nslabs)); in swiotlb_init_remap()
399 mem->slots = memblock_alloc(alloc_size, PAGE_SIZE); in swiotlb_init_remap()
400 if (!mem->slots) { in swiotlb_init_remap()
504 mem->slots = (void *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, in swiotlb_init_late()
505 get_order(array_size(sizeof(*mem->slots), nslabs))); in swiotlb_init_late()
506 if (!mem->slots) in swiotlb_init_late()
[all …]
/linux/arch/loongarch/kernel/
H A Dhw_breakpoint.c115 static int hw_breakpoint_slot_setup(struct perf_event **slots, int max_slots, in hw_breakpoint_slot_setup() argument
122 slot = &slots[i]; in hw_breakpoint_slot_setup()
180 struct perf_event **slots; in hw_breakpoint_control() local
194 slots = this_cpu_ptr(bp_on_reg); in hw_breakpoint_control()
198 slots = this_cpu_ptr(wp_on_reg); in hw_breakpoint_control()
202 i = hw_breakpoint_slot_setup(slots, max_slots, bp, ops); in hw_breakpoint_control()
420 struct perf_event **slots; in update_bp_registers() local
425 slots = this_cpu_ptr(bp_on_reg); in update_bp_registers()
429 slots = this_cpu_ptr(wp_on_reg); in update_bp_registers()
437 if (!slots[i]) in update_bp_registers()
[all …]
/linux/drivers/input/touchscreen/
H A Dpenmount.c58 struct mt_slot slots[PM_MAX_MTSLOT]; member
73 pm->slots[i].active); in pm_mtevent()
74 if (pm->slots[i].active) { in pm_mtevent()
75 input_event(input, EV_ABS, ABS_MT_POSITION_X, pm->slots[i].x); in pm_mtevent()
76 input_event(input, EV_ABS, ABS_MT_POSITION_Y, pm->slots[i].y); in pm_mtevent()
136 pm->slots[slotnum].active = pm->data[0] & 0x30; in pm_parse_3000()
137 pm->slots[slotnum].x = pm->data[2] * 256 + pm->data[1]; in pm_parse_3000()
138 pm->slots[slotnum].y = pm->data[4] * 256 + pm->data[3]; in pm_parse_3000()
152 pm->slots[slotnum].active = pm->data[0] & 0x40; in pm_parse_6250()
153 pm->slots[slotnum].x = pm->data[2] * 256 + pm->data[1]; in pm_parse_6250()
[all …]
/linux/tools/testing/selftests/kvm/
H A Ddirty_log_perf_test.c131 int slots; member
153 p->slots, p->backing_src, in run_test()
161 pages_per_slot = host_num_pages / p->slots; in run_test()
163 bitmaps = memstress_alloc_bitmaps(p->slots, pages_per_slot); in run_test()
204 memstress_enable_dirty_logging(vm, p->slots); in run_test()
233 memstress_get_dirty_log(vm, bitmaps, p->slots); in run_test()
242 memstress_clear_dirty_log(vm, bitmaps, p->slots, in run_test()
262 memstress_disable_dirty_logging(vm, p->slots); in run_test()
287 memstress_free_bitmaps(bitmaps, p->slots); in run_test()
343 .slots = 1, in main()
[all …]
/linux/tools/perf/arch/arm64/util/
H A Dpmu.c11 unsigned long long slots = 0; in pmu_metrics_table__find()
16 pmu->name, "caps/slots"); in pmu_metrics_table__find()
18 * The value of slots is not greater than 32 bits, but in pmu_metrics_table__find()
22 filename__read_ull(path, &slots); in pmu_metrics_table__find()
25 return slots; in pmu_metrics_table__find()
30 unsigned long long slots = 0; perf_pmu__cpu_slots_per_cycle() local
/linux/drivers/gpu/drm/amd/display/dc/hpo/dcn31/
H A Ddcn31_hpo_dp_link_encoder.c268 uint32_t *slots) in fill_stream_allocation_row_info() argument
274 *slots = stream_allocation->slot_count; in fill_stream_allocation_row_info()
277 *slots = 0; in fill_stream_allocation_row_info()
287 uint32_t slots = 0; in dcn31_hpo_dp_link_enc_update_stream_allocation_table() local
302 &slots); in dcn31_hpo_dp_link_enc_update_stream_allocation_table()
305 slots = 0; in dcn31_hpo_dp_link_enc_update_stream_allocation_table()
310 SAT_SLOT_COUNT, slots); in dcn31_hpo_dp_link_enc_update_stream_allocation_table()
316 &slots); in dcn31_hpo_dp_link_enc_update_stream_allocation_table()
319 slots = 0; in dcn31_hpo_dp_link_enc_update_stream_allocation_table()
324 SAT_SLOT_COUNT, slots); in dcn31_hpo_dp_link_enc_update_stream_allocation_table()
[all …]
/linux/sound/soc/fsl/
H A Dimx-card.c97 unsigned int slots; member
250 if (link_data->slots > 2) in format_is_tdm()
273 int slots, int slot_width) in akcodec_get_mclk_rate() argument
279 unsigned int width = slots * slot_width; in akcodec_get_mclk_rate()
322 unsigned int slots, slot_width; in imx_aif_hw_params() local
325 slots = link_data->slots; in imx_aif_hw_params()
330 slots = 1; in imx_aif_hw_params()
335 slots = 2; in imx_aif_hw_params()
348 BIT(slots) - 1, in imx_aif_hw_params()
349 BIT(slots) - 1, in imx_aif_hw_params()
[all …]
/linux/drivers/dma/ioat/
H A Ddca.c214 int slots = 0; in ioat_dca_count_dca_slots() local
223 req = readl(iobase + global_req_table + (slots * sizeof(u32))); in ioat_dca_count_dca_slots()
224 slots++; in ioat_dca_count_dca_slots()
227 return slots; in ioat_dca_count_dca_slots()
251 int slots; in ioat_dca_init() local
274 slots = ioat_dca_count_dca_slots(iobase, dca_offset); in ioat_dca_init()
275 if (slots == 0) in ioat_dca_init()
279 struct_size(ioatdca, req_slots, slots)); in ioat_dca_init()
286 ioatdca->max_requesters = slots; in ioat_dca_init()

12345678910>>...19