/linux/tools/testing/selftests/net/forwarding/ |
H A D | tsn_lib.sh | 2 # SPDX-License-Identifier: GPL-2.0 3 # Copyright 2021-2022 NXP 13 # https://github.com/vladimiroltean/tsn-scripts 14 # WARNING: isochron versions pre-1.0 are unstable, 25 local uds_address=$1 26 local extra_args="" 28 if ! [ -z "${uds_address}" ]; then 29 extra_args="${extra_args} -z ${uds_address}" 34 chrt -f 10 phc2sys -m \ 35 -a -rr \ [all …]
|
/linux/tools/perf/tests/shell/ |
H A D | daemon.sh | 3 # SPDX-License-Identifier: GPL-2.0 7 local line=$1 8 local name=$2 9 local base=$3 10 local output=$4 11 local lock=$5 12 local up=$6 14 local line_name 16 local line_base 18 local line_output [all …]
|
/linux/tools/testing/selftests/bpf/progs/ |
H A D | task_kfunc_success.c | 1 // SPDX-License-Identifier: GPL-2.0 13 int err, pid; variable 24 /* The two-param bpf_task_acquire doesn't exist */ 36 return pid == cur_pid; in is_test_kfunc_task() 54 asm volatile ("goto -1"); /* for (;;); */ in test_acquire_release() 147 struct __tasks_kfunc_map_value *v, *local; in BPF_PROG() local 166 kptr = bpf_kptr_xchg(&v->task, NULL); in BPF_PROG() 172 local = bpf_obj_new(typeof(*local)); in BPF_PROG() 173 if (!local) { in BPF_PROG() 179 kptr = bpf_kptr_xchg(&local->task, kptr); in BPF_PROG() [all …]
|
H A D | local_storage.c | 1 // SPDX-License-Identifier: GPL-2.0 17 int inode_storage_result = -1; 18 int sk_storage_result = -1; 19 int task_storage_result = -1; 64 __u32 pid = bpf_get_current_pid_tgid() >> 32; in BPF_PROG() local 70 if (pid != monitored_pid) in BPF_PROG() 77 task_storage_result = -1; in BPF_PROG() 84 is_self_unlink = storage->exec_inode == victim->d_inode; in BPF_PROG() 88 if (!storage || storage->value) in BPF_PROG() 98 local_storage = task->bpf_storage; in BPF_PROG() [all …]
|
H A D | bpf_loop.c | 1 // SPDX-License-Identifier: GPL-2.0 23 u32 stop_index = -1; 25 int pid; variable 42 ctx->output += index; in callback() 70 if (bpf_get_current_pid_tgid() >> 32 != pid) in test_prog() 86 if (bpf_get_current_pid_tgid() >> 32 != pid) in prog_null_ctx() 99 if (bpf_get_current_pid_tgid() >> 32 != pid) in prog_invalid_flags() 112 if (bpf_get_current_pid_tgid() >> 32 != pid) in prog_nested_calls() 136 * non-constant callback is a corner case for bpf_loop inline logic 141 if (bpf_get_current_pid_tgid() >> 32 != pid) in prog_non_constant_callback() [all …]
|
/linux/tools/testing/selftests/net/ |
H A D | gre_gso.sh | 2 # SPDX-License-Identifier: GPL-2.0 8 # all tests in this script. Can be overridden with -t option 15 PID= 19 local rc=$1 20 local expected=$2 21 local msg="$3" 23 if [ ${rc} -eq ${expected} ]; then 24 printf " TEST: %-60s [ OK ]\n" "${msg}" 29 printf " TEST: %-60s [FAIL]\n" "${msg}" 48 set -e [all …]
|
/linux/kernel/cgroup/ |
H A D | pids.c | 1 // SPDX-License-Identifier: GPL-2.0-only 9 * in place, PIDs are a fundamental resource. As such, PID exhaustion must be 18 * violate a cgroup policy through fork(). fork() will return -EAGAIN if forking 22 * for all new cgroups (N.B. that PID limits are hierarchical, so the most 53 * Use 64-bit types so that we can safely represent "max" as 60 /* Handles for pids.events[.local] */ 75 return css_pids(pids->css.parent); in parent_pids() 85 return ERR_PTR(-ENOMEM); in pids_css_alloc() 87 atomic64_set(&pids->limit, PIDS_MAX); in pids_css_alloc() 88 return &pids->css; in pids_css_alloc() [all …]
|
/linux/tools/testing/selftests/breakpoints/ |
H A D | breakpoint_test.c | 1 // SPDX-License-Identifier: GPL-2.0-only 54 int local, int global, int set) in toggle_breakpoint() argument 94 if (local) { in toggle_breakpoint() 112 exit(-1); in toggle_breakpoint() 205 int len, local, global, i; in trigger_tests() local 219 for (local = 0; local < 2; local++) { in trigger_tests() 221 if (!local && !global) in trigger_tests() 233 for (local = 0; local < 2; local++) { in trigger_tests() 235 if (!local && !global) in trigger_tests() 244 for (local = 0; local < 2; local++) { in trigger_tests() [all …]
|
/linux/drivers/infiniband/core/ |
H A D | iwpm_msg.c | 15 * - Redistributions of source code must retain the above 19 * - Redistributions in binary form must reproduce the above 42 * iwpm_valid_pid - Check if the userspace iwarp port mapper pid is valid 44 * Returns true if the pid is greater than zero, otherwise returns false 52 * iwpm_register_pid - Send a netlink query to userspace 53 * to get the iwarp port mapper pid 70 int ret = -EINVAL; in iwpm_register_pid() 80 nlh->nlmsg_seq = iwpm_get_nlmsg_seq(); in iwpm_register_pid() 81 nlmsg_request = iwpm_get_nlmsg_request(nlh->nlmsg_seq, nl_client, GFP_KERNEL); in iwpm_register_pid() 88 /* fill in the pid request message */ in iwpm_register_pid() [all …]
|
/linux/arch/alpha/kernel/ |
H A D | sys_marvel.c | 1 // SPDX-License-Identifier: GPL-2.0 43 unsigned int pid; in io7_device_interrupt() local 52 * -----+-----+--------+--- in io7_device_interrupt() 57 * 0x0800 - 0x0ff0 - 0x0800 + (LSI id << 4) in io7_device_interrupt() 58 * 0x1000 - 0x2ff0 - 0x1000 + (MSI_DAT<8:0> << 4) in io7_device_interrupt() 60 pid = vector >> 16; in io7_device_interrupt() 61 irq = ((vector & 0xffff) - 0x800) >> 4; in io7_device_interrupt() 65 irq |= pid << MARVEL_IRQ_VEC_PE_SHIFT; /* merge the pid */ in io7_device_interrupt() 74 unsigned int pid; in io7_get_irq_ctl() local 77 pid = irq >> MARVEL_IRQ_VEC_PE_SHIFT; in io7_get_irq_ctl() [all …]
|
/linux/tools/perf/Documentation/ |
H A D | perf-c2c.txt | 1 perf-c2c(1) 5 ---- 6 perf-c2c - Shared Data C2C/HITM Analyzer. 9 -------- 12 'perf c2c record' [<options>] \-- [<record command options>] <command> 16 ----------- 27 required. See linkperf:perf-arm-spe[1] for a setup guide. Due to the 32 - memory address of the access 33 - type of the access (load and store details) 34 - latency (in cycles) of the load access [all …]
|
H A D | perf-probe.txt | 1 perf-probe(1) 5 ---- 6 perf-probe - Define new dynamic tracepoints 9 -------- 11 'perf probe' [options] --add='PROBE' [...] 15 'perf probe' [options] --del='[GROUP:]EVENT' [...] 17 'perf probe' --list[=[GROUP:]EVENT] 19 'perf probe' [options] --line='LINE' 21 'perf probe' [options] --vars='PROBEPOINT' 23 'perf probe' [options] --funcs [all …]
|
/linux/arch/powerpc/kvm/ |
H A D | e500.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2008-2011 Freescale Semiconductor, Inc. All rights reserved. 36 * (guestAS,guestTID,guestPR) --> ID of physical cpu 49 * ID --> address of vcpu_id_table item. 58 /* This variable keeps last used shadow ID on local core. 73 int ret = -1; in local_sid_setup_one() 78 entry->val = sid; in local_sid_setup_one() 79 entry->pentry = this_cpu_ptr(&pcpu_sids.entry[sid]); in local_sid_setup_one() 84 * If sid == NUM_TIDS, we've run out of sids. We return -1, and in local_sid_setup_one() 106 if (entry && entry->val != 0 && in local_sid_lookup() [all …]
|
/linux/tools/testing/selftests/nci/ |
H A D | nci_dev.c | 1 // SPDX-License-Identifier: GPL-2.0-only 22 #define GENLMSG_PAYLOAD(glh) (NLMSG_PAYLOAD(glh, 0) - GENL_HDRLEN) 24 #define NLA_PAYLOAD(len) ((len) - NLA_HDRLEN) 93 struct sockaddr_nl local; in create_nl_socket() local 97 return -1; in create_nl_socket() 99 memset(&local, 0, sizeof(local)); in create_nl_socket() 100 local.nl_family = AF_NETLINK; in create_nl_socket() 102 if (bind(fd, (struct sockaddr *)&local, sizeof(local)) < 0) in create_nl_socket() 108 return -1; in create_nl_socket() 133 na->nla_type = nla_type[cnt]; in send_cmd_mt_nla() [all …]
|
/linux/drivers/hid/bpf/progs/ |
H A D | README | 1 # HID-BPF programs 9 They should be loaded in the kernel by `udev-hid-bpf`: 11 https://gitlab.freedesktop.org/libevdev/udev-hid-bpf 17 Once a .bpf.c file is accepted here, it is duplicated in `udev-hid-bpf` 20 land in distributions when they update `udev-hid-bpf` 30 Just run `sudo udev-hid-bpf install ./my-awesome-fix.bpf.o` 34 - copy the `.bpf.o` you want in `/etc/udev-hid-bpf/` 35 - create a new udev rule to automatically load it 37 The following should do the trick (assuming udev-hid-bpf is available in 41 $> cp xppen-ArtistPro16Gen2.bpf.o /etc/udev-hid-bpf/ [all …]
|
/linux/drivers/soc/qcom/ |
H A D | smp2p.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. 26 * of a single 32-bit value between two processors. Each value has a single 27 * writer (the local side) and a single reader (the remote side). Values are 28 * uniquely identified in the system by the directed edge (local processor ID 32 * item is writable by the local processor and readable by the remote 33 * processor. By using two separate SMEM items that are single-reader and 34 * single-writer, SMP2P does not require any remote locking mechanisms. 52 * struct smp2p_smem_item - in memory communication structure 54 * @version: version - must be 1 [all …]
|
/linux/tools/testing/selftests/bpf/benchs/ |
H A D | bench_local_storage_rcu_tasks_trace.c | 1 // SPDX-License-Identifier: GPL-2.0 28 { "kthread_pid", ARG_KTHREAD_PID, "PID", 0, 29 "Pid of rcu_tasks_trace kthread for ticks tracking"}, 72 fprintf(stderr, "benchmark doesn't support multi-producer!\n"); in validate() 94 return -1; in kthread_pid_ticks() 157 printf("Spun up %u procs (our pid %d)\n", args.nr_procs, runner_pid); in local_storage_tasks_trace_setup() 169 if (!bpf_program__attach(ctx.skel->progs.get_local)) { in local_storage_tasks_trace_setup() 174 if (!bpf_program__attach(ctx.skel->progs.pregp_step)) { in local_storage_tasks_trace_setup() 179 if (!bpf_program__attach(ctx.skel->progs.postgp)) { in local_storage_tasks_trace_setup() 193 res->gp_ct = atomic_swap(&ctx.skel->bss->gp_hits, 0); in measure() [all …]
|
/linux/arch/powerpc/include/asm/ |
H A D | vas.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 3 * Copyright 2016-17 IBM Corp. 11 #include <uapi/asm/vas-api.h> 15 * (Local FIFO Size Register) of the VAS workbook. 46 #define MASK_LSH(m) (__builtin_ffsl(m) - 1) 51 * Co-processor Engine type. 65 * to pid and mm until windows are closed. 66 * Stores pid, mm, and tgid for each window. 69 struct pid *pid; /* PID of owner */ member 70 struct pid *tgid; /* Thread group ID of owner */ [all …]
|
/linux/tools/usb/usbip/doc/ |
H A D | usbipd.8 | 3 usbipd \- USB/IP server daemon 21 \fB\-4\fR, \fB\-\-ipv4\fR 27 \fB\-6\fR, \fB\-\-ipv6\fR 33 \fB\-e\fR, \fB\-\-device\fR 39 \fB\-D\fR, \fB\-\-daemon\fR 45 \fB\-d\fR, \fB\-\-debug\fR 51 \fB\-PFILE\fR, \fB\-\-pid FILE\fR 55 If no FILE specified, use /var/run/usbipd.pid 58 \fB\-tPORT\fR, \fB\-\-tcp\-port PORT\fR 63 \fB\-h\fR, \fB\-\-help\fR [all …]
|
/linux/arch/powerpc/mm/book3s64/ |
H A D | radix_tlb.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright 2015-2016, Aneesh Kumar K.V, IBM Corporation. 15 #include <asm/ppc-opcode.h> 29 unsigned int pid, in tlbiel_radix_set_isa300() argument 36 rs = ((unsigned long)pid << PPC_BITLSHIFT(31)); in tlbiel_radix_set_isa300() 95 WARN(1, "%s called on pre-POWER9 CPU\n", __func__); in radix__tlbiel_all() 100 static __always_inline void __tlbiel_pid(unsigned long pid, int set, in __tlbiel_pid() argument 107 rs = ((unsigned long)pid) << PPC_BITLSHIFT(31); in __tlbiel_pid() 116 static __always_inline void __tlbie_pid(unsigned long pid, unsigned long ric) in __tlbie_pid() argument 121 rs = pid << PPC_BITLSHIFT(31); in __tlbie_pid() [all …]
|
/linux/tools/accounting/ |
H A D | procacct.c | 1 // SPDX-License-Identifier: GPL-2.0 10 * The TGID together with the PID and the AGROUP flag allow 11 * identification of threads in a process and single-threaded processes. 12 * The ac_tgetime field gives proper whole-process walltime. 18 * Utility to get per-pid and per-tgid delay accounting statistics 50 #define GENLMSG_PAYLOAD(glh) (NLMSG_PAYLOAD(glh, 0) - GENL_HDRLE 98 struct sockaddr_nl local; create_nl_socket() local [all...] |
H A D | getdelays.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * Utility to get per-pid and per-tgid delay accounting statistics 12 * gcc -I/usr/src/linux/include getdelays.c -o getdelays 38 #define GENLMSG_PAYLOAD(glh) (NLMSG_PAYLOAD(glh, 0) - GENL_HDRLEN) 40 #define NLA_PAYLOAD(len) (len - NLA_HDRLEN) 76 fprintf(stderr, "getdelays [-dilv] [-w logfile] [-r bufsize] " in usage() 77 "[-m cpumask] [-t tgid] [-p pid]\n"); in usage() 78 fprintf(stderr, " -d: print delayacct stats\n"); in usage() 79 fprintf(stderr, " -i: print IO accounting (works only with -p)\n"); in usage() 80 fprintf(stderr, " -l: listen forever\n"); in usage() [all …]
|
/linux/arch/powerpc/include/asm/nohash/ |
H A D | tlbflush.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 8 * - flush_tlb_mm(mm) flushes the specified mm context TLB's 9 * - flush_tlb_page(vma, vmaddr) flushes one page 10 * - local_flush_tlb_mm(mm, full) flushes the specified mm context on 11 * the local processor 12 * - local_flush_tlb_page(vma, vmaddr) flushes one page on the local processor 13 * - flush_tlb_range(vma, start, end) flushes a range of pages 14 * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages 29 #define MMU_NO_CONTEXT ((unsigned int)-1) 37 unsigned int pid = READ_ONCE(mm->context.id); in local_flush_tlb_mm() local [all …]
|
/linux/tools/testing/selftests/cgroup/ |
H A D | with_stress.sh | 2 # SPDX-License-Identifier: GPL-2.0 4 # Kselftest framework requirement - SKIP code is 4. 17 local verb=+ 20 [ $verb = "+" ] && verb=- || verb=+ 28 sysfs=`mount -t cgroup2 | head -1 | awk '{ print $3 }'` 29 if [ ! -d "$sysfs" ]; then 39 if ! echo -$subsys_ctrl >$sysfs/cgroup.subtree_control ; then 45 declare -a stresses 46 declare -a stress_pids 61 echo "Usage $0 [ -s stress ] ... [ -d duration ] [-c controller] cmd args .." [all …]
|
/linux/tools/testing/selftests/net/mptcp/ |
H A D | userspace_pm.sh | 2 # SPDX-License-Identifier: GPL-2.0 58 MPTCP_LIB_TEST_FORMAT="%02u %-68s" 88 if [ ${#} -gt 0 ] 103 local pid 104 for pid in $client4_pid $server4_pid $client6_pid $server6_pid\ 107 mptcp_lib_kill_wait $pid 112 rm -rf $file $client_evts $server_evts 122 ip netns exec "$i" sysctl -q net.mptcp.pm_type=1 131 ip -net "$ns1" addr add 10.0.1.1/24 dev ns1eth2 132 ip -net "$ns1" addr add 10.0.2.1/24 dev ns1eth2 [all …]
|