| /kernel/linux/linux-5.10/tools/testing/selftests/cpu-hotplug/ |
| D | cpu-on-off-test.sh | 2 # SPDX-License-Identifier: GPL-2.0 5 # Kselftest framework requirement - SKIP code is 4. 17 taskset -p 01 $$ 19 SYSFS=`mount -t sysfs | head -1 | awk '{ print $3 }'` 21 if [ ! -d "$SYSFS" ]; then 26 if ! ls $SYSFS/devices/system/cpu/cpu* > /dev/null 2>&1; then 27 echo $msg cpu hotplug is not supported >&2 31 echo "CPU online/offline summary:" 32 online_cpus=`cat $SYSFS/devices/system/cpu/online` 33 online_max=${online_cpus##*-} [all …]
|
| /kernel/linux/linux-6.6/tools/testing/selftests/cpu-hotplug/ |
| D | cpu-on-off-test.sh | 2 # SPDX-License-Identifier: GPL-2.0 5 # Kselftest framework requirement - SKIP code is 4. 18 taskset -p 01 $$ 20 SYSFS=`mount -t sysfs | head -1 | awk '{ print $3 }'` 22 if [ ! -d "$SYSFS" ]; then 27 if ! ls $SYSFS/devices/system/cpu/cpu* > /dev/null 2>&1; then 28 echo $msg cpu hotplug is not supported >&2 32 echo "CPU online/offline summary:" 33 online_cpus=`cat $SYSFS/devices/system/cpu/online` 34 online_max=${online_cpus##*-} [all …]
|
| /kernel/linux/linux-5.10/tools/power/x86/intel-speed-select/ |
| D | isst-core.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Intel Speed Select -- Enumerate and control features 9 int isst_write_pm_config(int cpu, int cp_state) in isst_write_pm_config() argument 19 ret = isst_send_mbox_command(cpu, WRITE_PM_CONFIG, PM_FEATURE, 0, req, in isst_write_pm_config() 24 debug_printf("cpu:%d WRITE_PM_CONFIG resp:%x\n", cpu, resp); in isst_write_pm_config() 29 int isst_read_pm_config(int cpu, int *cp_state, int *cp_cap) in isst_read_pm_config() argument 34 ret = isst_send_mbox_command(cpu, READ_PM_CONFIG, PM_FEATURE, 0, 0, in isst_read_pm_config() 39 debug_printf("cpu:%d READ_PM_CONFIG resp:%x\n", cpu, resp); in isst_read_pm_config() 42 *cp_cap = resp & BIT(0) ? 1 : 0; in isst_read_pm_config() 47 int isst_get_ctdp_levels(int cpu, struct isst_pkg_ctdp *pkg_dev) in isst_get_ctdp_levels() argument [all …]
|
| /kernel/linux/linux-5.10/tools/power/cpupower/lib/ |
| D | cpupower.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * (C) 2004-2009 Dominik Brodowski <linux@dominikbrodowski.de> 23 if (fd == -1) in cpupower_read_sysfs() 26 numread = read(fd, buf, buflen - 1); in cpupower_read_sysfs() 27 if (numread < 1) { in cpupower_read_sysfs() 39 * Detect whether a CPU is online 42 * 1 -> if CPU is online 43 * 0 -> if CPU is offline 46 int cpupower_is_cpu_online(unsigned int cpu) in cpupower_is_cpu_online() argument 56 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u", cpu); in cpupower_is_cpu_online() [all …]
|
| /kernel/linux/linux-6.6/tools/power/cpupower/lib/ |
| D | cpupower.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * (C) 2004-2009 Dominik Brodowski <linux@dominikbrodowski.de> 19 if (access(path, F_OK) == -1) in is_valid_path() 21 return 1; in is_valid_path() 30 if (fd == -1) in cpupower_read_sysfs() 33 numread = read(fd, buf, buflen - 1); in cpupower_read_sysfs() 34 if (numread < 1) { in cpupower_read_sysfs() 51 if (fd == -1) in cpupower_write_sysfs() 54 numwritten = write(fd, buf, buflen - 1); in cpupower_write_sysfs() 55 if (numwritten < 1) { in cpupower_write_sysfs() [all …]
|
| /kernel/linux/linux-6.6/arch/arm/mach-bcm/ |
| D | platsmp-brcmstb.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Broadcom STB CPU SMP and hotplug support for ARM 5 * Copyright (C) 2013-2014 Broadcom Corporation 22 #include <asm/mach-types.h> 27 ZONE_MAN_RESET_CNTL_MASK = BIT(1), 40 CPU0_PWR_ZONE_CTRL_REG = 1, 52 * We must quiesce a dying CPU before it can be killed by the boot CPU. Because 59 static int per_cpu_sw_state_rd(u32 cpu) in per_cpu_sw_state_rd() argument 61 sync_cache_r(SHIFT_PERCPU_PTR(&per_cpu_sw_state, per_cpu_offset(cpu))); in per_cpu_sw_state_rd() 62 return per_cpu(per_cpu_sw_state, cpu); in per_cpu_sw_state_rd() [all …]
|
| /kernel/linux/linux-6.6/tools/perf/util/ |
| D | cpumap.c | 1 // SPDX-License-Identifier: GPL-2.0 22 * CPU number. 30 __u32 bit_mask32 = 1U << (i & 31); in perf_record_cpu_map_data__test_bit() 32 __u64 bit_mask64 = ((__u64)1) << (i & 63); in perf_record_cpu_map_data__test_bit() 34 return (data->mask32_data.long_size == 4) in perf_record_cpu_map_data__test_bit() 35 ? (bit_word32 < data->mask32_data.nr) && in perf_record_cpu_map_data__test_bit() 36 (data->mask32_data.mask[bit_word32] & bit_mask32) != 0 in perf_record_cpu_map_data__test_bit() 37 : (bit_word64 < data->mask64_data.nr) && in perf_record_cpu_map_data__test_bit() 38 (data->mask64_data.mask[bit_word64] & bit_mask64) != 0; in perf_record_cpu_map_data__test_bit() 41 /* Read ith mask value from data into the given 64-bit sized bitmap */ [all …]
|
| /kernel/linux/linux-5.10/Documentation/x86/ |
| D | topology.rst | 1 .. SPDX-License-Identifier: GPL-2.0 11 The architecture-agnostic topology definitions are in 12 Documentation/admin-guide/cputopology.rst. This file holds x86-specific 17 Needless to say, code should use the generic functions - this file is *only* 35 - packages 36 - cores 37 - threads 48 Package-related topology information in the kernel: 50 - cpuinfo_x86.x86_max_cores: 54 - cpuinfo_x86.x86_max_dies: [all …]
|
| /kernel/linux/linux-6.6/Documentation/arch/x86/ |
| D | topology.rst | 1 .. SPDX-License-Identifier: GPL-2.0 11 The architecture-agnostic topology definitions are in 12 Documentation/admin-guide/cputopology.rst. This file holds x86-specific 17 Needless to say, code should use the generic functions - this file is *only* 35 - packages 36 - cores 37 - threads 48 Package-related topology information in the kernel: 50 - cpuinfo_x86.x86_max_cores: 54 - cpuinfo_x86.x86_max_dies: [all …]
|
| /kernel/linux/linux-5.10/arch/arm/mach-bcm/ |
| D | platsmp-brcmstb.c | 2 * Broadcom STB CPU SMP and hotplug support for ARM 4 * Copyright (C) 2013-2014 Broadcom Corporation 30 #include <asm/mach-types.h> 35 ZONE_MAN_RESET_CNTL_MASK = BIT(1), 48 CPU0_PWR_ZONE_CTRL_REG = 1, 60 * We must quiesce a dying CPU before it can be killed by the boot CPU. Because 67 static int per_cpu_sw_state_rd(u32 cpu) in per_cpu_sw_state_rd() argument 69 sync_cache_r(SHIFT_PERCPU_PTR(&per_cpu_sw_state, per_cpu_offset(cpu))); in per_cpu_sw_state_rd() 70 return per_cpu(per_cpu_sw_state, cpu); in per_cpu_sw_state_rd() 73 static void per_cpu_sw_state_wr(u32 cpu, int val) in per_cpu_sw_state_wr() argument [all …]
|
| /kernel/linux/linux-5.10/tools/power/x86/x86_energy_perf_policy/ |
| D | x86_energy_perf_policy.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * x86_energy_perf_policy -- set the energy versus performance 7 * Copyright (c) 2010 - 2017 Intel Corporation. 30 #define OPTARG_NORMAL (INT_MAX - 1) 31 #define OPTARG_POWER (INT_MAX - 2) 32 #define OPTARG_BALANCE_POWER (INT_MAX - 3) 33 #define OPTARG_BALANCE_PERFORMANCE (INT_MAX - 4) 34 #define OPTARG_PERFORMANCE (INT_MAX - 5) 100 fprintf(stderr, "scope: --cpu cpu-list [--hwp-use-pkg #] | --pkg pkg-list\n"); in usage() 101 fprintf(stderr, "field: --all | --epb | --hwp-epp | --hwp-min | --hwp-max | --hwp-desired\n"); in usage() [all …]
|
| /kernel/linux/linux-5.10/include/linux/ |
| D | cpumask.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 7 * set of CPU's in a system, one bit position per CPU number. In general, 20 * cpumask_bits - get the bits in a cpumask 24 * a macro so it's const-correct. 26 #define cpumask_bits(maskp) ((maskp)->bits) 29 * cpumask_pr_args - printf args to output a cpumask 36 #if NR_CPUS == 1 37 #define nr_cpu_ids 1U 54 * cpu_possible_mask- has bit 'cpu' set iff cpu is populatable 55 * cpu_present_mask - has bit 'cpu' set iff cpu is populated [all …]
|
| /kernel/linux/linux-6.6/tools/power/x86/x86_energy_perf_policy/ |
| D | x86_energy_perf_policy.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * x86_energy_perf_policy -- set the energy versus performance 7 * Copyright (c) 2010 - 2017 Intel Corporation. 30 #define OPTARG_NORMAL (INT_MAX - 1) 31 #define OPTARG_POWER (INT_MAX - 2) 32 #define OPTARG_BALANCE_POWER (INT_MAX - 3) 33 #define OPTARG_BALANCE_PERFORMANCE (INT_MAX - 4) 34 #define OPTARG_PERFORMANCE (INT_MAX - 5) 94 #define PATH_TO_CPU "/sys/devices/system/cpu/" 103 fprintf(stderr, "scope: --cpu cpu-list [--hwp-use-pkg #] | --pkg pkg-list\n"); in usage() [all …]
|
| /kernel/linux/linux-5.10/arch/powerpc/kernel/ |
| D | smp.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 10 * PowerPC-64 Support added by Dave Engebretsen, Peter Bergner, and 29 #include <linux/cpu.h> 59 #include <asm/asm-prototypes.h> 73 /* State of each CPU during hotplug phases */ 102 #define THREAD_GROUP_SHARE_L1 1 111 * On big-cores system, cpu_l1_cache_map for each CPU corresponds to 112 * the set its siblings that share the L1-cache. 122 int smt_enabled_at_boot = 1; 125 * Returns 1 if the specified cpu should be brought up during boot. [all …]
|
| /kernel/linux/linux-6.6/tools/testing/selftests/net/forwarding/ |
| D | tsn_lib.sh | 2 # SPDX-License-Identifier: GPL-2.0 3 # Copyright 2021-2022 NXP 10 ISOCHRON_CPU=1 13 # https://github.com/vladimiroltean/tsn-scripts 14 # WARNING: isochron versions pre-1.0 are unstable, 25 local uds_address=$1 28 if ! [ -z "${uds_address}" ]; then 29 extra_args="${extra_args} -z ${uds_address}" 34 chrt -f 10 phc2sys -m \ 35 -a -rr \ [all …]
|
| /kernel/linux/linux-6.6/tools/perf/tests/ |
| D | topology.c | 1 // SPDX-License-Identifier: GPL-2.0 14 #define TEMPL "/tmp/perf-test-XXXXXX" 26 return -1; in get_temp() 44 session->evlist = evlist__new_default(); in session_write_header() 45 TEST_ASSERT_VAL("can't get evlist", session->evlist); in session_write_header() 47 perf_header__set_feat(&session->header, HEADER_CPU_TOPOLOGY); in session_write_header() 48 perf_header__set_feat(&session->header, HEADER_NRCPUS); in session_write_header() 49 perf_header__set_feat(&session->header, HEADER_ARCH); in session_write_header() 51 session->header.data_size += DATA_SIZE; in session_write_header() 54 !perf_session__write_header(session, session->evlist, data.file.fd, true)); in session_write_header() [all …]
|
| /kernel/linux/linux-6.6/arch/powerpc/kernel/ |
| D | smp.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 10 * PowerPC-64 Support added by Dave Engebretsen, Peter Bergner, and 29 #include <linux/cpu.h> 75 /* State of each CPU during hotplug phases */ 106 #define THREAD_GROUP_SHARE_L1 1 125 * On big-cores system, thread_group_l1_cache_map for each CPU corresponds to 126 * the set its siblings that share the L1-cache. 131 * On some big-cores system, thread_group_l2_cache_map for each CPU 133 * L2-cache. 138 * On P10, thread_group_l3_cache_map for each CPU is equal to the [all …]
|
| /kernel/linux/linux-6.6/tools/perf/pmu-events/arch/s390/cf_z16/ |
| D | extended.json | 3 "Unit": "CPU-M-CF", 6 "BriefDescription": "L1D Read-only Exclusive Writes", 7 …blicDescription": "A directory write to the Level-1 Data cache where the line was originally in a … 10 "Unit": "CPU-M-CF", 14 …Translation Lookaside Buffer 2 (TLB2) and the request was made by the Level-1 Data cache. This is … 17 "Unit": "CPU-M-CF", 21 …ress for a request made by the Level-1 Data cache. Incremented by one for every TLB2 miss in progr… 24 "Unit": "CPU-M-CF", 28 … into the Combined Region and Segment Table Entry array in the Level-2 TLB for a one-megabyte page… 31 "Unit": "CPU-M-CF", [all …]
|
| /kernel/linux/linux-6.6/include/linux/ |
| D | cpumask.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 7 * set of CPU's in a system, one bit position per CPU number. In general, 22 * cpumask_bits - get the bits in a cpumask 26 * a macro so it's const-correct. 28 #define cpumask_bits(maskp) ((maskp)->bits) 31 * cpumask_pr_args - printf args to output a cpumask 38 #if (NR_CPUS == 1) || defined(CONFIG_FORCE_NR_CPUS) 46 #if (NR_CPUS == 1) || defined(CONFIG_FORCE_NR_CPUS) in set_nr_cpu_ids() 58 * optimized routines that work for the single-word case, but only when 68 * they set bits or just don't have any faster fixed-sized versions. We [all …]
|
| /kernel/linux/linux-5.10/arch/x86/xen/ |
| D | smp.c | 1 // SPDX-License-Identifier: GPL-2.0 3 #include <linux/cpu.h> 10 #include <xen/hvc-console.h> 11 #include "xen-ops.h" 14 static DEFINE_PER_CPU(struct xen_common_irq, xen_resched_irq) = { .irq = -1 }; 15 static DEFINE_PER_CPU(struct xen_common_irq, xen_callfunc_irq) = { .irq = -1 }; 16 static DEFINE_PER_CPU(struct xen_common_irq, xen_callfuncsingle_irq) = { .irq = -1 }; 17 static DEFINE_PER_CPU(struct xen_common_irq, xen_debug_irq) = { .irq = -1 }; 33 void xen_smp_intr_free(unsigned int cpu) in xen_smp_intr_free() argument 35 kfree(per_cpu(xen_resched_irq, cpu).name); in xen_smp_intr_free() [all …]
|
| /kernel/linux/linux-5.10/tools/perf/util/ |
| D | cpumap.c | 1 // SPDX-License-Identifier: GPL-2.0 25 map = perf_cpu_map__empty_new(cpus->nr); in cpu_map__from_entries() 29 for (i = 0; i < cpus->nr; i++) { in cpu_map__from_entries() 31 * Special treatment for -1, which is not real cpu number, in cpu_map__from_entries() 32 * and we need to use (int) -1 to initialize map[i], in cpu_map__from_entries() 35 if (cpus->cpu[i] == (u16) -1) in cpu_map__from_entries() 36 map->map[i] = -1; in cpu_map__from_entries() 38 map->map[i] = (int) cpus->cpu[i]; in cpu_map__from_entries() 48 int nr, nbits = mask->nr * mask->long_size * BITS_PER_BYTE; in cpu_map__from_mask() 50 nr = bitmap_weight(mask->mask, nbits); in cpu_map__from_mask() [all …]
|
| /kernel/linux/linux-6.6/Documentation/devicetree/bindings/cpu/ |
| D | cpu-capacity.txt | 2 CPU capacity bindings 6 1 - Introduction 15 2 - CPU capacity definition 18 CPU capacity is a number that provides the scheduler information about CPUs 19 heterogeneity. Such heterogeneity can come from micro-architectural differences 23 capture a first-order approximation of the relative performance of CPUs. 25 CPU capacities are obtained by running a suitable benchmark. This binding makes 29 * A "single-threaded" or CPU affine benchmark 30 * Divided by the running frequency of the CPU executing the benchmark 31 * Not subject to dynamic frequency scaling of the CPU [all …]
|
| /kernel/linux/linux-5.10/Documentation/devicetree/bindings/arm/ |
| D | cpu-capacity.txt | 6 1 - Introduction 15 2 - CPU capacity definition 18 CPU capacity is a number that provides the scheduler information about CPUs 19 heterogeneity. Such heterogeneity can come from micro-architectural differences 23 capture a first-order approximation of the relative performance of CPUs. 25 CPU capacities are obtained by running a suitable benchmark. This binding makes 29 * A "single-threaded" or CPU affine benchmark 30 * Divided by the running frequency of the CPU executing the benchmark 31 * Not subject to dynamic frequency scaling of the CPU 36 CPU capacities are obtained by running the Dhrystone benchmark on each CPU at [all …]
|
| /kernel/linux/linux-6.6/tools/perf/pmu-events/arch/s390/cf_z196/ |
| D | basic.json | 3 "Unit": "CPU-M-CF", 7 …tion": "This counter counts the total number of CPU cycles, excluding the number of cycles while t… 10 "Unit": "CPU-M-CF", 11 "EventCode": "1", 14 "PublicDescription": "This counter counts the total number of instructions executed by the CPU." 17 "Unit": "CPU-M-CF", 20 "BriefDescription": "Level-1 I-Cache Directory Write Count", 21 …Description": "This counter counts the total number of level-1 instruction-cache or unified-cache … 24 "Unit": "CPU-M-CF", 27 "BriefDescription": "Level-1 I-Cache Penalty Cycle Count", [all …]
|
| /kernel/linux/linux-6.6/tools/perf/pmu-events/arch/s390/cf_z10/ |
| D | basic.json | 3 "Unit": "CPU-M-CF", 7 …tion": "This counter counts the total number of CPU cycles, excluding the number of cycles while t… 10 "Unit": "CPU-M-CF", 11 "EventCode": "1", 14 "PublicDescription": "This counter counts the total number of instructions executed by the CPU." 17 "Unit": "CPU-M-CF", 20 "BriefDescription": "Level-1 I-Cache Directory Write Count", 21 …Description": "This counter counts the total number of level-1 instruction-cache or unified-cache … 24 "Unit": "CPU-M-CF", 27 "BriefDescription": "Level-1 I-Cache Penalty Cycle Count", [all …]
|