/linux/kernel/events/ |
H A D | hw_breakpoint.c | 1 // SPDX-License-Identifier: GPL-2.0+ 15 * HW_breakpoint: a unified kernel/user-space hardware breakpoint facility, 16 * using the CPU's debug registers. 17 * This file contains the arch-independent routines. 24 #include <linux/cpu.h> 32 #include <linux/percpu-rwsem.h> 51 * Per-CPU constraints data. 54 /* Number of pinned CPU breakpoints in a CPU. */ 56 /* Histogram of pinned task breakpoints in a CPU. */ 62 static struct bp_cpuinfo *get_bp_info(int cpu, enum bp_type_idx type) in get_bp_info() argument [all …]
|
/linux/arch/riscv/boot/dts/sophgo/ |
H A D | sg2042-cpus.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0 OR MIT) 8 #address-cells = <1>; 9 #size-cells = <0>; 10 timebase-frequency = <50000000>; 12 cpu-map { 16 cpu = <&cpu0>; 19 cpu = <&cpu1>; 22 cpu = <&cpu2>; 25 cpu = <&cpu3>; 31 cpu = <&cpu4>; [all …]
|
/linux/drivers/base/ |
H A D | cacheinfo.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * cacheinfo support - processor cache information via sysfs 5 * Based on arch/x86/kernel/cpu/intel_cacheinfo.c 14 #include <linux/cpu.h> 23 /* pointer to per cpu cacheinfo */ 25 #define ci_cacheinfo(cpu) (&per_cpu(ci_cpu_cacheinfo, cpu)) argument 26 #define cache_leaves(cpu) (ci_cacheinfo(cpu)->num_leaves) argument 27 #define per_cpu_cacheinfo(cpu) (ci_cacheinfo(cpu)->info_list) argument 28 #define per_cpu_cacheinfo_idx(cpu, idx) \ argument 29 (per_cpu_cacheinfo(cpu) + (idx)) [all …]
|
/linux/drivers/acpi/ |
H A D | pptt.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * pptt.c - parsing of Processor Properties Topology Table (PPTT) 33 if (pptt_ref + sizeof(struct acpi_subtable_header) > table_hdr->length) in fetch_pptt_subtable() 38 if (entry->length == 0) in fetch_pptt_subtable() 41 if (pptt_ref + entry->length > table_hdr->length) in fetch_pptt_subtable() 65 if (resource >= node->number_of_priv_resources) in acpi_get_pptt_resource() 74 static inline bool acpi_pptt_match_type(int table_type, int type) in acpi_pptt_match_type() argument 76 return ((table_type & ACPI_PPTT_MASK_CACHE_TYPE) == type || in acpi_pptt_match_type() 77 table_type & ACPI_PPTT_CACHE_TYPE_UNIFIED & type); in acpi_pptt_match_type() 81 * acpi_pptt_walk_cache() - Attempt to find the requested acpi_pptt_cache [all …]
|
/linux/kernel/sched/ |
H A D | isolation.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * any CPU: unbound workqueues, timers, kthreads and any offloadable work. 7 * Copyright (C) 2017-2018 SUSE, Frederic Weisbecker 33 bool housekeeping_enabled(enum hk_type type) in housekeeping_enabled() argument 35 return !!(housekeeping.flags & BIT(type)); in housekeeping_enabled() 39 int housekeeping_any_cpu(enum hk_type type) in housekeeping_any_cpu() argument 41 int cpu; in housekeeping_any_cpu() local 44 if (housekeeping.flags & BIT(type)) { in housekeeping_any_cpu() 45 cpu = sched_numa_find_closest(housekeeping.cpumasks[type], smp_processor_id()); in housekeeping_any_cpu() 46 if (cpu < nr_cpu_ids) in housekeeping_any_cpu() [all …]
|
/linux/arch/arm/boot/dts/samsung/ |
H A D | exynos5422-odroidxu3-common.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 3 * Hardkernel Odroid XU3/XU3-Lite/XU4 boards common device tree source 12 #include <dt-bindings/input/input.h> 13 #include "exynos5422-odroid-core.dtsi" 20 gpio-keys { 21 compatible = "gpio-keys"; 22 pinctrl-names = "default"; 23 pinctrl-0 = <&power_key>; 25 power-key { 36 debounce-interval = <0>; [all …]
|
H A D | exynos5422-odroidhc1.dts | 1 // SPDX-License-Identifier: GPL-2.0 10 /dts-v1/; 11 #include <dt-bindings/leds/common.h> 12 #include "exynos5422-odroid-core.dtsi" 16 compatible = "hardkernel,odroid-hc1", "samsung,exynos5800", \ 19 led-controller { 20 compatible = "pwm-leds"; 22 led-1 { 26 pwm-names = "pwm2"; 27 max-brightness = <255>; [all …]
|
/linux/drivers/bus/ |
H A D | mips_cdmm.c | 4 * Copyright (C) 2014-2015 Imagination Technologies Ltd. 13 #include <linux/cpu.h> 53 for (; table->type; ++table) { in mips_cdmm_lookup() 54 ret = (dev->type == table->type); in mips_cdmm_lookup() 67 return mips_cdmm_lookup(cdrv->id_table, cdev) != NULL; in mips_cdmm_match() 75 retval = add_uevent_var(env, "CDMM_CPU=%u", cdev->cpu); in mips_cdmm_uevent() 79 retval = add_uevent_var(env, "CDMM_TYPE=0x%02x", cdev->type); in mips_cdmm_uevent() 83 retval = add_uevent_var(env, "CDMM_REV=%u", cdev->rev); in mips_cdmm_uevent() 87 retval = add_uevent_var(env, "MODALIAS=mipscdmm:t%02X", cdev->type); in mips_cdmm_uevent() 102 CDMM_ATTR(cpu, "%u\n", dev->cpu); [all …]
|
H A D | arm-cci.c | 17 #include <linux/arm-cci.h> 49 {.compatible = "arm,cci-400", .data = CCI400_PORTS_DATA }, 52 { .compatible = "arm,cci-500", }, 53 { .compatible = "arm,cci-550", }, 59 OF_DEV_AUXDATA("arm,cci-400-pmu", 0, NULL, &cci_ctrl_base), 60 OF_DEV_AUXDATA("arm,cci-400-pmu,r0", 0, NULL, &cci_ctrl_base), 61 OF_DEV_AUXDATA("arm,cci-400-pmu,r1", 0, NULL, &cci_ctrl_base), 62 OF_DEV_AUXDATA("arm,cci-500-pmu,r0", 0, NULL, &cci_ctrl_base), 63 OF_DEV_AUXDATA("arm,cci-550-pmu,r0", 0, NULL, &cci_ctrl_base), 67 #define DRIVER_NAME "ARM-CCI" [all …]
|
/linux/include/linux/ |
H A D | percpu-defs.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 3 * linux/percpu-defs.h - basic definitions for percpu areas 40 * Base implementations of per-CPU variable declarations and definitions, where 86 #define DECLARE_PER_CPU_SECTION(type, name, sec) \ argument 88 extern __PCPU_ATTRS(sec) __typeof__(type) name 90 #define DEFINE_PER_CPU_SECTION(type, name, sec) \ argument 94 extern __PCPU_ATTRS(sec) __typeof__(type) name; \ 95 __PCPU_ATTRS(sec) __weak __typeof__(type) name 100 #define DECLARE_PER_CPU_SECTION(type, name, sec) \ argument 101 extern __PCPU_ATTRS(sec) __typeof__(type) name [all …]
|
/linux/tools/perf/util/ |
H A D | bpf_kwork_top.c | 1 // SPDX-License-Identifier: GPL-2.0 45 __u32 type; member 52 __u32 cpu; member 67 skel->bss->from_timestamp = (u64)ts.tv_sec * NSEC_PER_SEC + ts.tv_nsec; in perf_kwork__top_start() 68 skel->bss->enabled = 1; in perf_kwork__top_start() 69 pr_debug("perf kwork top start at: %lld\n", skel->bss->from_timestamp); in perf_kwork__top_start() 76 skel->bss->enabled = 0; in perf_kwork__top_finish() 78 skel->bss->to_timestamp = (u64)ts.tv_sec * NSEC_PER_SEC + ts.tv_nsec; in perf_kwork__top_finish() 79 pr_debug("perf kwork top finish at: %lld\n", skel->bss->to_timestamp); in perf_kwork__top_finish() 84 bpf_program__set_autoload(skel->progs.on_irq_handler_entry, true); in irq_load_prepare() [all …]
|
H A D | bpf_kwork.c | 1 // SPDX-License-Identifier: GPL-2.0 31 u32 type; member 32 u32 cpu; member 59 skel->bss->enabled = 1; in perf_kwork__trace_start() 65 skel->bss->enabled = 0; in perf_kwork__trace_finish() 71 int fd = bpf_map__fd(skel->maps.perf_kwork_names); in get_work_name_from_map() 84 return -1; in get_work_name_from_map() 93 if (kwork->report == KWORK_REPORT_RUNTIME) { in irq_load_prepare() 94 bpf_program__set_autoload(skel->progs.report_irq_handler_entry, true); in irq_load_prepare() 95 bpf_program__set_autoload(skel->progs.report_irq_handler_exit, true); in irq_load_prepare() [all …]
|
/linux/kernel/bpf/ |
H A D | bpf_lru_list.c | 1 // SPDX-License-Identifier: GPL-2.0-only 17 #define LOCAL_LIST_IDX(t) ((t) - BPF_LOCAL_LIST_T_OFFSET) 22 static int get_next_cpu(int cpu) in get_next_cpu() argument 24 cpu = cpumask_next(cpu, cpu_possible_mask); in get_next_cpu() 25 if (cpu >= nr_cpu_ids) in get_next_cpu() 26 cpu = cpumask_first(cpu_possible_mask); in get_next_cpu() 27 return cpu; in get_next_cpu() 33 return &loc_l->lists[LOCAL_FREE_LIST_IDX]; in local_free_list() 38 return &loc_l->lists[LOCAL_PENDING_LIST_IDX]; in local_pending_list() 44 return READ_ONCE(node->ref); in bpf_lru_node_is_ref() [all …]
|
/linux/tools/perf/util/bpf_skel/ |
H A D | kwork_top.bpf.c | 1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 40 __u32 type; member 47 __u32 cpu; member 51 __uint(type, BPF_MAP_TYPE_TASK_STORAGE); 58 __uint(type, BPF_MAP_TYPE_PERCPU_HASH); 65 __uint(type, BPF_MAP_TYPE_HASH); 72 __uint(type, BPF_MAP_TYPE_PERCPU_HASH); 79 __uint(type, BPF_MAP_TYPE_HASH); 92 static __always_inline int cpu_is_filtered(__u32 cpu) in cpu_is_filtered() argument 97 cpu_val = bpf_map_lookup_elem(&kwork_top_cpu_filter, &cpu); in cpu_is_filtered() [all …]
|
/linux/Documentation/devicetree/bindings/powerpc/ |
H A D | ibm,powerpc-cpu-features.txt | 3 (skiboot/doc/device-tree/ibm,powerpc-cpu-features/binding.txt) 9 ibm,powerpc-cpu-features binding 12 This device tree binding describes CPU features available to software, with 19 /cpus/ibm,powerpc-cpu-features node binding 20 ------------------------------------------- 22 Node: ibm,powerpc-cpu-features 24 Description: Container of CPU feature nodes. 26 The node name must be "ibm,powerpc-cpu-features". 35 - compatible 37 Value type: string [all …]
|
/linux/arch/arm64/boot/dts/exynos/ |
H A D | exynos7-trip-points.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 10 cpu-alert-0 { 13 type = "passive"; 15 cpu-alert-1 { 18 type = "passive"; 20 cpu-alert-2 { 23 type = "passive"; 25 cpu-alert-3 { 28 type = "passive"; 30 cpu-alert-4 { [all …]
|
/linux/tools/bpf/bpftool/ |
H A D | map_perf_ring.c | 1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 53 int cpu; member 58 print_bpf_output(void *private_data, int cpu, struct perf_event_header *event) in print_bpf_output() argument 67 int idx = ctx->all_cpus ? cpu : ctx->idx; in print_bpf_output() 71 jsonw_name(json_wtr, "type"); in print_bpf_output() 72 jsonw_uint(json_wtr, e->header.type); in print_bpf_output() 73 jsonw_name(json_wtr, "cpu"); in print_bpf_output() 74 jsonw_uint(json_wtr, cpu); in print_bpf_output() 77 if (e->header.type == PERF_RECORD_SAMPLE) { in print_bpf_output() 79 jsonw_uint(json_wtr, e->time); in print_bpf_output() [all …]
|
/linux/net/core/ |
H A D | gen_stats.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 24 gnet_stats_copy(struct gnet_dump *d, int type, void *buf, int size, int padattr) in gnet_stats_copy() argument 26 if (nla_put_64bit(d->skb, type, size, buf, padattr)) in gnet_stats_copy() 31 if (d->lock) in gnet_stats_copy() 32 spin_unlock_bh(d->lock); in gnet_stats_copy() 33 kfree(d->xstats); in gnet_stats_copy() 34 d->xstats = NULL; in gnet_stats_copy() 35 d->xstats_len = 0; in gnet_stats_copy() 36 return -1; in gnet_stats_copy() 40 * gnet_stats_start_copy_compat - start dumping procedure in compatibility mode [all …]
|
/linux/arch/x86/events/intel/ |
H A D | uncore.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 #include <asm/intel-family.h> 43 int die_id = -1; in uncore_pcibus_to_dieid() 47 if (map->segment == pci_domain_nr(bus)) { in uncore_pcibus_to_dieid() 48 die_id = map->pbus_to_dieid[bus->number]; in uncore_pcibus_to_dieid() 66 return bus ? pci_domain_nr(bus) : -EINVAL; in uncore_die_to_segment() 71 int node = pcibus_to_node(dev->bus); in uncore_device_to_die() 72 int cpu; in uncore_device_to_die() local 74 for_each_cpu(cpu, cpumask_of_pcibus(dev->bus)) { in uncore_device_to_die() 75 struct cpuinfo_x86 *c = &cpu_data(cpu); in uncore_device_to_die() [all …]
|
/linux/Documentation/devicetree/bindings/csky/ |
H A D | cpus.txt | 2 C-SKY CPU Bindings 6 the "cpus" node, which in turn contains a number of subnodes (ie "cpu") 7 defining properties for every cpu. 13 cpus and cpu node bindings definition 16 - cpus node 18 Description: Container of cpu nodes 24 - #address-cells 26 Value type: <u32> 28 - #size-cells 30 Value type: <u32> [all …]
|
/linux/tools/testing/selftests/mm/ |
H A D | uffd-stress.c | 1 // SPDX-License-Identifier: GPL-2.0-only 11 * There are three threads running per CPU: 13 * 1) one per-CPU thread takes a per-page pthread_mutex in a random 15 * area_src), and increments a per-page counter in the same page, 18 * 2) another per-CPU thread handles the userfaults generated by 22 * 3) one last per-CPU thread transfers the memory in the background 24 * 2). Each cpu thread takes cares of transferring a portion of the 27 * When all threads of type 3 completed the transfer, one bounce is 32 * per-CPU threads 1 by triggering userfaults inside 36 #include <asm-generic/unistd.h> [all …]
|
/linux/tools/perf/tests/ |
H A D | perf-record.c | 1 // SPDX-License-Identifier: GPL-2.0 19 int i, cpu = -1, nrcpus = 1024; in sched__get_first_possible_cpu() local 23 if (sched_getaffinity(pid, sizeof(*maskp), maskp) == -1) { in sched__get_first_possible_cpu() 29 return -1; in sched__get_first_possible_cpu() 34 if (cpu == -1) in sched__get_first_possible_cpu() 35 cpu = i; in sched__get_first_possible_cpu() 41 return cpu; in sched__get_first_possible_cpu() 68 int err = -1, errs = 0, i, wakeups = 0; in test__PERF_RECORD() 69 u32 cpu; in test__PERF_RECORD() local 83 * we start with all threads and cpus (-1, -1) but then in in test__PERF_RECORD() [all …]
|
/linux/tools/perf/arch/arm/util/ |
H A D | cs-etm.c | 1 // SPDX-License-Identifier: GPL-2.0 11 #include <linux/coresight-pmu.h> 18 #include "cs-etm.h" 29 #include "../../../util/cs-etm.h" 71 static bool cs_etm_is_ete(struct perf_pmu *cs_etm_pmu, struct perf_cpu cpu); 72 static int cs_etm_get_ro(struct perf_pmu *pmu, struct perf_cpu cpu, const char *path, __u64 *val); 73 static bool cs_etm_pmu_path_exists(struct perf_pmu *pmu, struct perf_cpu cpu, const char *path); 76 struct perf_cpu cpu) in cs_etm_get_version() argument 78 if (cs_etm_is_ete(cs_etm_pmu, cpu)) in cs_etm_get_version() 80 else if (cs_etm_pmu_path_exists(cs_etm_pmu, cpu, metadata_etmv4_ro[CS_ETMV4_TRCIDR0])) in cs_etm_get_version() [all …]
|
/linux/Documentation/power/ |
H A D | suspend-and-cpuhotplug.rst | 2 Interaction of Suspend code (S3) with the CPU hotplug infrastructure 5 (C) 2011 - 2014 Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> 8 I. Differences between CPU hotplug and Suspend-to-RAM 11 How does the regular CPU hotplug code differ from how the Suspend-to-RAM 14 Well, a picture is worth a thousand words... So ASCII art follows :-) 17 interactions involving the freezer and CPU hotplug and also tries to explain 21 What happens when regular CPU hotplug and Suspend-to-RAM race with each other 24 On a high level, the suspend-resume cycle goes like this:: 26 |Freeze| -> |Disable nonboot| -> |Do suspend| -> |Enable nonboot| -> |Thaw | 33 ----------------- [all …]
|
/linux/Documentation/networking/dsa/ |
H A D | configuration.rst | 1 .. SPDX-License-Identifier: GPL-2.0 10 .. _dsa-config-showcases: 13 ----------------------- 33 interface. The CPU port is the switch port connected to an Ethernet MAC chip. 42 - when a DSA user interface is brought up, the conduit interface is 44 - when the conduit interface is brought down, all DSA user interfaces are 71 * lan1: 192.0.2.1/30 (192.0.2.0 - 192.0.2.3) 72 * lan2: 192.0.2.5/30 (192.0.2.4 - 192.0.2.7) 73 * lan3: 192.0.2.9/30 (192.0.2.8 - 192.0.2.11) 76 * br0: 192.0.2.129/25 (192.0.2.128 - 192.0.2.255) [all …]
|