Home
last modified time | relevance | path

Searched +full:cpu +full:- +full:map (Results 1 – 25 of 1026) sorted by relevance

12345678910>>...42

/Linux-v6.1/tools/perf/tests/
Dtopology.c1 // SPDX-License-Identifier: GPL-2.0
14 #define TEMPL "/tmp/perf-test-XXXXXX"
26 return -1; in get_temp()
45 session->evlist = evlist__new_default(); in session_write_header()
46 TEST_ASSERT_VAL("can't get evlist", session->evlist); in session_write_header()
50 session->evlist = evlist__new(); in session_write_header()
51 TEST_ASSERT_VAL("can't get evlist", session->evlist); in session_write_header()
53 parse_events(session->evlist, "cpu_core/cycles/", &err); in session_write_header()
57 perf_header__set_feat(&session->header, HEADER_CPU_TOPOLOGY); in session_write_header()
58 perf_header__set_feat(&session->header, HEADER_NRCPUS); in session_write_header()
[all …]
Dcpumap.c1 // SPDX-License-Identifier: GPL-2.0
6 #include "util/synthetic-events.h"
19 struct perf_record_cpu_map *map_event = &event->cpu_map; in process_event_mask()
21 struct perf_cpu_map *map; in process_event_mask() local
24 data = &map_event->data; in process_event_mask()
26 TEST_ASSERT_VAL("wrong type", data->type == PERF_CPU_MAP__MASK); in process_event_mask()
28 long_size = data->mask32_data.long_size; in process_event_mask()
32 TEST_ASSERT_VAL("wrong nr", data->mask32_data.nr == 1); in process_event_mask()
34 TEST_ASSERT_VAL("wrong cpu", perf_record_cpu_map_data__test_bit(0, data)); in process_event_mask()
35 TEST_ASSERT_VAL("wrong cpu", !perf_record_cpu_map_data__test_bit(1, data)); in process_event_mask()
[all …]
Dmem2node.c1 // SPDX-License-Identifier: GPL-2.0
15 const char *map; member
17 { .node = 0, .map = "0" },
18 { .node = 1, .map = "1-2" },
19 { .node = 3, .map = "5-7,9" },
26 struct perf_cpu_map *map = perf_cpu_map__new(str); in get_bitmap() local
31 if (map && bm) { in get_bitmap()
32 struct perf_cpu cpu; in get_bitmap() local
35 perf_cpu_map__for_each_cpu(cpu, i, map) in get_bitmap()
36 set_bit(cpu.cpu, bm); in get_bitmap()
[all …]
/Linux-v6.1/arch/powerpc/platforms/cell/
Dcbe_regs.c1 // SPDX-License-Identifier: GPL-2.0-only
20 #include <asm/cell-regs.h>
23 * Current implementation uses "cpu" nodes. We build our own mapping
24 * array of cpu numbers to cpu nodes locally for now to allow interrupt
26 * we implement cpu hotplug, we'll have to install an appropriate notifier
27 * in order to release references to the cpu going away
49 static cpumask_t cbe_local_mask[MAX_CBE] = { [0 ... MAX_CBE-1] = {CPU_BITS_NONE} };
65 if (np->data) in cbe_find_map()
66 return np->data; in cbe_find_map()
68 /* walk up path until cpu or be node was found */ in cbe_find_map()
[all …]
/Linux-v6.1/tools/lib/perf/
Dcpumap.c1 // SPDX-License-Identifier: GPL-2.0-only
18 cpus->nr = nr_cpus; in perf_cpu_map__alloc()
19 refcount_set(&cpus->refcnt, 1); in perf_cpu_map__alloc()
30 cpus->map[0].cpu = -1; in perf_cpu_map__dummy_new()
35 static void cpu_map__delete(struct perf_cpu_map *map) in cpu_map__delete() argument
37 if (map) { in cpu_map__delete()
38 WARN_ONCE(refcount_read(&map->refcnt) != 0, in cpu_map__delete()
40 free(map); in cpu_map__delete()
44 struct perf_cpu_map *perf_cpu_map__get(struct perf_cpu_map *map) in perf_cpu_map__get() argument
46 if (map) in perf_cpu_map__get()
[all …]
Devlist.c1 // SPDX-License-Identifier: GPL-2.0
30 INIT_LIST_HEAD(&evlist->entries); in perf_evlist__init()
31 evlist->nr_entries = 0; in perf_evlist__init()
32 fdarray__init(&evlist->pollfd, 64); in perf_evlist__init()
41 * keep it, if there's no target cpu list defined. in __perf_evlist__propagate_maps()
43 if (evsel->system_wide) { in __perf_evlist__propagate_maps()
44 perf_cpu_map__put(evsel->cpus); in __perf_evlist__propagate_maps()
45 evsel->cpus = perf_cpu_map__new(NULL); in __perf_evlist__propagate_maps()
46 } else if (!evsel->own_cpus || evlist->has_user_cpus || in __perf_evlist__propagate_maps()
47 (!evsel->requires_cpu && perf_cpu_map__empty(evlist->user_requested_cpus))) { in __perf_evlist__propagate_maps()
[all …]
/Linux-v6.1/tools/perf/util/
Dcpumap.c1 // SPDX-License-Identifier: GPL-2.0
21 * CPU number.
33 return (data->mask32_data.long_size == 4) in perf_record_cpu_map_data__test_bit()
34 ? (bit_word32 < data->mask32_data.nr) && in perf_record_cpu_map_data__test_bit()
35 (data->mask32_data.mask[bit_word32] & bit_mask32) != 0 in perf_record_cpu_map_data__test_bit()
36 : (bit_word64 < data->mask64_data.nr) && in perf_record_cpu_map_data__test_bit()
37 (data->mask64_data.mask[bit_word64] & bit_mask64) != 0; in perf_record_cpu_map_data__test_bit()
40 /* Read ith mask value from data into the given 64-bit sized bitmap */
45 if (data->mask32_data.long_size == 4) in perf_record_cpu_map_data__read_one_mask()
46 bitmap[0] = data->mask32_data.mask[i]; in perf_record_cpu_map_data__read_one_mask()
[all …]
Dmmap.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2011-2017, Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com>
5 * Parts came from evlist.c builtin-{top,stat,record}.c, see those files for further
34 len = bitmap_scnprintf(mask->bits, mask->nbits, buf, MASK_SIZE); in mmap_cpu_mask__scnprintf()
36 pr_debug("%p: %s mask[%zd]: %s\n", mask, tag, mask->nbits, buf); in mmap_cpu_mask__scnprintf()
39 size_t mmap__mmap_len(struct mmap *map) in mmap__mmap_len() argument
41 return perf_mmap__mmap_len(&map->core); in mmap__mmap_len()
71 static int perf_mmap__aio_enabled(struct mmap *map) in perf_mmap__aio_enabled() argument
73 return map->aio.nr_cblocks > 0; in perf_mmap__aio_enabled()
77 static int perf_mmap__aio_alloc(struct mmap *map, int idx) in perf_mmap__aio_alloc() argument
[all …]
/Linux-v6.1/block/
Dblk-mq-cpumap.c1 // SPDX-License-Identifier: GPL-2.0
3 * CPU <-> hardware queue mapping helpers
5 * Copyright (C) 2013-2014 Jens Axboe
12 #include <linux/cpu.h>
14 #include <linux/blk-mq.h>
16 #include "blk-mq.h"
21 return qmap->queue_offset + (q % nr_queues); in queue_index()
24 static int get_first_sibling(unsigned int cpu) in get_first_sibling() argument
28 ret = cpumask_first(topology_sibling_cpumask(cpu)); in get_first_sibling()
32 return cpu; in get_first_sibling()
[all …]
/Linux-v6.1/Documentation/devicetree/bindings/cpu/
Dcpu-topology.txt2 CPU topology binding description
6 1 - Introduction
12 - socket
13 - cluster
14 - core
15 - thread
18 symmetric multi-threading (SMT) is supported or not.
20 For instance in a system where CPUs support SMT, "cpu" nodes represent all
21 threads existing in the system and map to the hierarchy level "thread" above.
22 In systems where SMT is not supported "cpu" nodes represent all cores present
[all …]
/Linux-v6.1/kernel/bpf/
Dcpumap.c1 // SPDX-License-Identifier: GPL-2.0-only
7 /* The 'cpumap' is primarily used as a backend map for XDP BPF helper
11 * this map type redirects raw XDP frames to another CPU. The remote
12 * CPU will do SKB-allocation and call the normal network stack.
17 * basically allows for 10G wirespeed pre-filtering via bpf.
35 /* General idea: XDP packets getting XDP redirected to another CPU,
36 * will maximum be stored/queued for one driver ->poll() call. It is
38 * same CPU. Thus, cpu_map_flush operation can deduct via this_cpu_ptr()
42 #define CPU_MAP_BULK_SIZE 8 /* 8 == one cacheline on 64-bit archs */
53 /* Struct for every remote "destination" CPU in map */
[all …]
Dlocal_storage.c1 // SPDX-License-Identifier: GPL-2.0
2 #include <linux/bpf-cgroup.h>
16 #include "../cgroup/cgroup-internal.h"
22 struct bpf_map map; member
29 static struct bpf_cgroup_storage_map *map_to_storage(struct bpf_map *map) in map_to_storage() argument
31 return container_of(map, struct bpf_cgroup_storage_map, map); in map_to_storage()
34 static bool attach_type_isolated(const struct bpf_map *map) in attach_type_isolated() argument
36 return map->key_size == sizeof(struct bpf_cgroup_storage_key); in attach_type_isolated()
39 static int bpf_cgroup_storage_key_cmp(const struct bpf_cgroup_storage_map *map, in bpf_cgroup_storage_key_cmp() argument
42 if (attach_type_isolated(&map->map)) { in bpf_cgroup_storage_key_cmp()
[all …]
Dhashtab.c1 // SPDX-License-Identifier: GPL-2.0-only
2 /* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com
46 * from sys_bpf(). BPF recursion is prevented by incrementing the per CPU
50 * by pinning the task to the current CPU and incrementing the recursion
51 * protection across the map operation.
72 * it is only safe to use raw spinlock for preallocated hash map on a RT kernel,
74 * after hash map was fully converted to use bpf_mem_alloc, there will be
75 * non-synchronous memory allocation for non-preallocated hash map, so it is
84 #define HASHTAB_MAP_LOCK_MASK (HASHTAB_MAP_LOCK_COUNT - 1)
87 struct bpf_map map; member
[all …]
Darraymap.c1 // SPDX-License-Identifier: GPL-2.0-only
2 /* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com
26 for (i = 0; i < array->map.max_entries; i++) { in bpf_array_free_percpu()
27 free_percpu(array->pptrs[i]); in bpf_array_free_percpu()
37 for (i = 0; i < array->map.max_entries; i++) { in bpf_array_alloc_percpu()
38 ptr = bpf_map_alloc_percpu(&array->map, array->elem_size, 8, in bpf_array_alloc_percpu()
42 return -ENOMEM; in bpf_array_alloc_percpu()
44 array->pptrs[i] = ptr; in bpf_array_alloc_percpu()
54 bool percpu = attr->map_type == BPF_MAP_TYPE_PERCPU_ARRAY; in array_map_alloc_check()
58 if (attr->max_entries == 0 || attr->key_size != 4 || in array_map_alloc_check()
[all …]
/Linux-v6.1/drivers/clocksource/
Dingenic-timer.c1 // SPDX-License-Identifier: GPL-2.0
13 #include <linux/mfd/ingenic-tcu.h>
24 #include <dt-bindings/clock/ingenic,tcu.h>
33 unsigned int cpu; member
41 struct regmap *map; member
57 regmap_read(tcu->map, TCU_REG_TCNTc(tcu->cs_channel), &count); in ingenic_tcu_timer_read()
70 return container_of(timer, struct ingenic_tcu, timers[timer->cpu]); in to_ingenic_tcu()
84 regmap_write(tcu->map, TCU_REG_TECR, BIT(timer->channel)); in ingenic_tcu_cevt_set_state_shutdown()
96 return -EINVAL; in ingenic_tcu_cevt_set_next()
98 regmap_write(tcu->map, TCU_REG_TDFRc(timer->channel), next); in ingenic_tcu_cevt_set_next()
[all …]
/Linux-v6.1/samples/bpf/
Dmap_perf_test_user.c1 // SPDX-License-Identifier: GPL-2.0-only
82 static void test_hash_prealloc(int cpu) in test_hash_prealloc() argument
90 printf("%d:hash_map_perf pre-alloc %lld events per sec\n", in test_hash_prealloc()
91 cpu, max_cnt * 1000000000ll / (time_get_ns() - start_time)); in test_hash_prealloc()
106 * It is fine that the user requests for a map with in pre_test_lru_hash_lookup()
108 * may return not found. For LRU map, we are not interested in pre_test_lru_hash_lookup()
109 * in such small map performance. in pre_test_lru_hash_lookup()
120 static void do_test_lru(enum test_type test, int cpu) in do_test_lru() argument
129 if (test == INNER_LRU_HASH_PREALLOC && cpu) { in do_test_lru()
130 /* If CPU is not 0, create inner_lru hash map and insert the fd in do_test_lru()
[all …]
/Linux-v6.1/drivers/gpu/drm/i915/gem/selftests/
Di915_gem_coherency.c2 * SPDX-License-Identifier: MIT
27 void *map; in cpu_set() local
28 u32 *cpu; in cpu_set() local
31 i915_gem_object_lock(ctx->obj, NULL); in cpu_set()
32 err = i915_gem_object_prepare_write(ctx->obj, &needs_clflush); in cpu_set()
36 page = i915_gem_object_get_page(ctx->obj, offset >> PAGE_SHIFT); in cpu_set()
37 map = kmap_atomic(page); in cpu_set()
38 cpu = map + offset_in_page(offset); in cpu_set()
41 drm_clflush_virt_range(cpu, sizeof(*cpu)); in cpu_set()
43 *cpu = v; in cpu_set()
[all …]
/Linux-v6.1/lib/
Dcpu_rmap.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * cpu_rmap.c: CPU affinity reverse-map support
13 * objects with CPU affinities. This can be seen as a reverse-map of
14 * CPU affinity. However, we do not assume that the object affinities
17 * CPU topology.
21 * alloc_cpu_rmap - allocate CPU affinity reverse-map
28 unsigned int cpu; in alloc_cpu_rmap() local
39 rmap = kzalloc(obj_offset + size * sizeof(rmap->obj[0]), flags); in alloc_cpu_rmap()
43 kref_init(&rmap->refcount); in alloc_cpu_rmap()
44 rmap->obj = (void **)((char *)rmap + obj_offset); in alloc_cpu_rmap()
[all …]
/Linux-v6.1/arch/sh/kernel/cpu/sh4/
Dsq.c1 // SPDX-License-Identifier: GPL-2.0
3 * arch/sh/kernel/cpu/sh4/sq.c
5 * General management API for SH-4 integrated Store Queues
7 * Copyright (C) 2001 - 2006 Paul Mundt
11 #include <linux/cpu.h>
23 #include <cpu/sq.h>
50 * sq_flush_range - Flush (prefetch) a specific SQ range
62 for (len >>= 5; len--; sq += 8) in sq_flush_range()
70 static inline void sq_mapping_list_add(struct sq_mapping *map) in sq_mapping_list_add() argument
78 p = &tmp->next; in sq_mapping_list_add()
[all …]
/Linux-v6.1/arch/arm64/boot/dts/qcom/
Dsm6125.dtsi1 // SPDX-License-Identifier: BSD-3-Clause
6 #include <dt-bindings/clock/qcom,gcc-sm6125.h>
7 #include <dt-bindings/clock/qcom,rpmcc.h>
8 #include <dt-bindings/gpio/gpio.h>
9 #include <dt-bindings/interrupt-controller/arm-gic.h>
10 #include <dt-bindings/power/qcom-rpmpd.h>
13 interrupt-parent = <&intc>;
14 #address-cells = <2>;
15 #size-cells = <2>;
20 xo_board: xo-board {
[all …]
/Linux-v6.1/Documentation/bpf/
Dmap_cgroup_storage.rst1 .. SPDX-License-Identifier: GPL-2.0-only
8 The ``BPF_MAP_TYPE_CGROUP_STORAGE`` map type represents a local fix-sized
13 The map provide a local storage at the cgroup that the BPF program is attached
19 ``BPF_MAP_TYPE_CGROUP_STORAGE`` map type. Some of its behaviors was changed in
25 The map uses key of type of either ``__u64 cgroup_inode_id`` or
38 map will share the same storage. Otherwise, if the type is
44 void *bpf_get_local_storage(void *map, u64 flags)
75 Userspace accessing map declared above::
80 __u32 map_lookup(struct bpf_map *map, __u64 cgrp, enum bpf_attach_type type)
87 bpf_map_lookup_elem(bpf_map__fd(map), &key, &value);
[all …]
/Linux-v6.1/arch/arm/kernel/
Ddevtree.c1 // SPDX-License-Identifier: GPL-2.0-only
25 #include <asm/mach-types.h>
40 if (of_property_read_string(node, "enable-method", &method)) in set_smp_ops_by_method()
43 for (; m->method; m++) in set_smp_ops_by_method()
44 if (!strcmp(m->method, method)) { in set_smp_ops_by_method()
45 smp_set_ops(m->ops); in set_smp_ops_by_method()
60 * arm_dt_init_cpu_maps - Function retrieves cpu nodes from the device tree
61 * and builds the cpu logical map array containing MPIDR values related to
64 * Updates the cpu possible mask with the number of parsed cpu nodes
69 * Temp logical map is initialized with UINT_MAX values that are in arm_dt_init_cpu_maps()
[all …]
/Linux-v6.1/Documentation/ABI/stable/
Dsysfs-devices-system-cpu1 What: /sys/devices/system/cpu/dscr_default
2 Date: 13-May-2014
6 /sys/devices/system/cpu/cpuN/dscr on all CPUs.
9 all per-CPU defaults at the same time.
12 What: /sys/devices/system/cpu/cpu[0-9]+/dscr
13 Date: 13-May-2014
17 a CPU.
22 on any CPU where it executes (overriding the value described
27 What: /sys/devices/system/cpu/cpuX/topology/physical_package_id
33 What: /sys/devices/system/cpu/cpuX/topology/die_id
[all …]
/Linux-v6.1/arch/arc/plat-axs10x/
Daxs10x.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 2013-15 Synopsys, Inc. (www.synopsys.com)
12 #include <asm/asm-offsets.h>
31 * Peripherals on CPU Card and Mother Board are wired to cpu intc via in axs10x_enable_gpio_intc_wire()
34 * --------------------- in axs10x_enable_gpio_intc_wire()
35 * | snps,arc700-intc | in axs10x_enable_gpio_intc_wire()
36 * --------------------- in axs10x_enable_gpio_intc_wire()
38 * ------------------- ------------------- in axs10x_enable_gpio_intc_wire()
39 * | snps,dw-apb-gpio | | snps,dw-apb-gpio | in axs10x_enable_gpio_intc_wire()
40 * ------------------- ------------------- in axs10x_enable_gpio_intc_wire()
[all …]
/Linux-v6.1/tools/lib/perf/include/perf/
Dcpumap.h1 /* SPDX-License-Identifier: GPL-2.0 */
10 /** A wrapper around a CPU to avoid confusion with the perf_cpu_map's map's indices. */
12 int cpu; member
19 LIBPERF_API struct perf_cpu_map *perf_cpu_map__get(struct perf_cpu_map *map);
22 LIBPERF_API void perf_cpu_map__put(struct perf_cpu_map *map);
25 LIBPERF_API bool perf_cpu_map__empty(const struct perf_cpu_map *map);
26 LIBPERF_API struct perf_cpu perf_cpu_map__max(const struct perf_cpu_map *map);
27 LIBPERF_API bool perf_cpu_map__has(const struct perf_cpu_map *map, struct perf_cpu cpu);
29 #define perf_cpu_map__for_each_cpu(cpu, idx, cpus) \ argument
30 for ((idx) = 0, (cpu) = perf_cpu_map__cpu(cpus, idx); \
[all …]

12345678910>>...42