instruction stringlengths 82 202 | input stringclasses 1
value | output stringlengths 73 23.9M |
|---|---|---|
Linux kernel'inin 'tools/testing/selftests/powerpc/tm/tm-tmspr' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright 2015, Michael Neuling, IBM Corp.
*
* Original: Michael Neuling 3/4/2014
* Modified: Rashmica Gupta 8/12/2015
*
* Check if any of the Transaction Memory SPRs get corrupted.
* - TFIAR - stores address of location of transaction failure
* - TFHAR - sto... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/tm/tm-tar' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright 2015, Michael Neuling, IBM Corp.
* Original: Michael Neuling 19/7/2013
* Edited: Rashmica Gupta 01/12/2015
*
* Do some transactions, see if the tar is corrupted.
* If the transaction is aborted, the TAR should be rolled back to the
* checkpointed value... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/tm/tm-resched-dscr' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/* Test context switching to see if the DSCR SPR is correctly preserved
* when within a transaction.
*
* Note: We assume that the DSCR has been left at the default value (0)
* for all CPUs.
*
* Method:
*
* Set a value into the DSCR.
*
* Start a transaction, and suspend... | |
Linux kernel'inde 'tools/testing/selftests/powerpc/tm/tm-signal' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright 2015, Cyril Bur, IBM Corp.
*/
#include "basic_asm.h"
#include "gpr_asm.h"
#include "fpu_asm.h"
#include "vmx_asm.h"
#include "vsx_asm.h"
/*
* Large caveat here being that the caller cannot expect the
* signal to always be sent! The hardwar... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/tm/tm-signal-msr-resv' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright 2015, Michael Neuling, IBM Corp.
*
* Test the kernel's signal return code to ensure that it doesn't
* crash when both the transactional and suspend MSR bits are set in
* the signal context.
*
* For this test, we send ourselves a SIGUSR1. In the SIGUSR... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/tm/tm-signal-context-chk-vmx' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright 2016, Cyril Bur, IBM Corp.
*
* Test the kernel's signal frame code.
*
* The kernel sets up two sets of ucontexts if the signal was to be
* delivered while the thread was in a transaction (referred too as
* first and second contexts).
* Expected be... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/tm/tm-fork' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright 2015, Michael Neuling, IBM Corp.
*
* Edited: Rashmica Gupta, Nov 2015
*
* This test does a fork syscall inside a transaction. Basic sniff test
* to see if we can enter the kernel during a transaction.
*/
#include <errno.h>
#include <inttypes.h>
#inclu... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/tm/tm-vmx-unavail' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright 2017, Michael Neuling, IBM Corp.
* Original: Breno Leitao <brenohl@br.ibm.com> &
* Gustavo Bueno Romero <gromero@br.ibm.com>
* Edited: Michael Neuling
*
* Force VMX unavailable during a transaction and see if it corrupts
* the checkpointed VM... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/signal/signal_tm' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright 2016, Cyril Bur, IBM Corp.
*
* Sending one self a signal should always get delivered.
*/
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <signal.h>
#include <unistd.h>
#include <altivec.h>
#include "utils.h"
#... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/signal/sigfuz' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright 2018, Breno Leitao, IBM Corp.
* Licensed under GPLv2.
*
* Sigfuz(tm): A PowerPC TM-aware signal fuzzer.
*
* This is a new selftest that raises SIGUSR1 signals and handles it in a set
* of different ways, trying to create different scenario for testing
* pu... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/signal/sig_sc_double_restart' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Test that a syscall does not get restarted twice, handled by trap_norestart()
*
* Based on Al's description, and a test for the bug fixed in this commit:
*
* commit 9a81c16b527528ad307843be5571111aa8d35a80
* Author: Al Viro <viro@zeniv.linux.org.uk>
* Date: ... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/signal/signal' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright 2016, Cyril Bur, IBM Corp.
*
* Sending one self a signal should always get delivered.
*/
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <altive... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/signal/sigreturn_kernel' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Test that we can't sigreturn to kernel addresses, or to kernel mode.
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <signal.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include "utils.h"
#define MSR_PR (1ul << 14)
stati... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/signal/sigreturn_unaligned' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Test sigreturn to an unaligned address, ie. low 2 bits set.
* Nothing bad should happen.
* This was able to trigger warnings with CONFIG_PPC_RFI_SRR_DEBUG=y.
*/
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ucontext.h>
#includ... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/signal/sigreturn_vdso' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Test that we can take signals with and without the VDSO mapped, which trigger
* different paths in the signal handling code.
*
* See handle_rt_signal64() and setup_trampoline() in signal_64.c
*/
#define _GNU_SOURCE
#include <errno.h>
#include <stdio.h>
#include <sign... | |
Linux kernel'inde 'tools/testing/selftests/powerpc/signal/signal' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright 2015, Cyril Bur, IBM Corp.
*/
#include "basic_asm.h"
/* long signal_self(pid_t pid, int sig); */
FUNC_START(signal_self)
li r0,37 /* sys_kill */
/* r3 already has our pid in it */
/* r4 already has signal type in it */
sc
bc 4,3,1f
sub... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/ptrace/ptrace-tar' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Ptrace test for TAR, PPR, DSCR registers
*
* Copyright (C) 2015 Anshuman Khandual, IBM Corporation.
*/
#include "ptrace.h"
#include "ptrace-tar.h"
/* Tracer and Tracee Shared Data */
int shm_id;
int *cptr;
int *pptr;
void tar(void)
{
unsigned long reg[3];
i... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/ptrace/ptrace-vsx' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Ptrace test for VMX/VSX registers
*
* Copyright (C) 2015 Anshuman Khandual, IBM Corporation.
*/
#include "ptrace.h"
#include "ptrace-vsx.h"
/* Tracer and Tracee Shared Data */
int shm_id;
int *cptr, *pptr;
unsigned long fp_load[VEC_MAX];
unsigned long fp_load... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/ptrace/ptrace' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Ptrace interface test helper functions
*
* Copyright (C) 2015 Anshuman Khandual, IBM Corporation.
*/
#define __SANE_USERSPACE_TYPES__
#include <inttypes.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <errno.h>
#... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/ptrace/core-pkey' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0+
/*
* Ptrace test for Memory Protection Key registers
*
* Copyright (C) 2015 Anshuman Khandual, IBM Corporation.
* Copyright (C) 2018 IBM Corporation.
*/
#include <limits.h>
#include <linux/kernel.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#includ... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/ptrace/child' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
// SPDX-License-Identifier: GPL-2.0+
/*
* Helper functions to sync execution between parent and child processes.
*
* Copyright 2018, Thiago Jung Bauermann, IBM Corporation.
*/
#include <stdio.h>
#include <stdbool.h>
#include <semaphore.h>
/*
* Information in a shared memory location for synchronization betwe... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/ptrace/ptrace-tar' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2015 Anshuman Khandual, IBM Corporation.
*/
#define TAR_1 10
#define TAR_2 20
#define TAR_3 30
#define TAR_4 40
#define TAR_5 50
#define DSCR_1 100
#define DSCR_2 200
#define DSCR_3 300
#define DSCR_4 400
#define DSCR_5 500
#defi... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/ptrace/ptrace-tm-spr' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Ptrace test TM SPR registers
*
* Copyright (C) 2015 Anshuman Khandual, IBM Corporation.
*/
#include "ptrace.h"
#include "tm.h"
/* Tracee and tracer shared data */
struct shared {
int flag;
struct tm_spr_regs regs;
};
unsigned long tfhar;
int shm_id;
struct ... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/ptrace/ptrace-tm-spd-vsx' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Ptrace test for VMX/VSX registers in the TM Suspend context
*
* Copyright (C) 2015 Anshuman Khandual, IBM Corporation.
*/
#include "ptrace.h"
#include "tm.h"
#include "ptrace-vsx.h"
int shm_id;
int *cptr, *pptr;
unsigned long fp_load[VEC_MAX];
unsigned long f... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/ptrace/ptrace-vsx' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2015 Anshuman Khandual, IBM Corporation.
*/
#define VEC_MAX 128
#define VSX_MAX 32
#define VMX_MAX 32
/*
* unsigned long vsx[32]
* unsigned long load[128]
*/
int validate_vsx(unsigned long *vsx, unsigned long *load)
{
int i;
for (i = 0; i ... | |
Linux kernel'inde 'tools/testing/selftests/powerpc/ptrace/ptrace-perf-asm' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <ppc-asm.h>
.global same_watch_addr_load
.global same_watch_addr_trap
FUNC_START(same_watch_addr_child)
nop
same_watch_addr_load:
ld 0,0(3)
nop
same_watch_addr_trap:
trap
blr
FUNC_END(same_watch_addr_child)
.global perf_then_ptrace_load1
.gl... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/ptrace/ptrace-gpr' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2015 Anshuman Khandual, IBM Corporation.
*/
#define GPR_1 1
#define GPR_2 2
#define GPR_3 3
#define GPR_4 4
#define FPR_1 0.001
#define FPR_2 0.002
#define FPR_3 0.003
#define FPR_4 0.004
#define FPR_1_REP 0x3f50624dd2f1a9fcull
#define FPR_2_RE... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/ptrace/ptrace-tm-spd-gpr' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Ptrace test for GPR/FPR registers in TM Suspend context
*
* Copyright (C) 2015 Anshuman Khandual, IBM Corporation.
*/
#include "ptrace.h"
#include "ptrace-gpr.h"
#include "tm.h"
/* Tracer and Tracee Shared Data */
int shm_id;
int *cptr, *pptr;
double a = FPR_... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/ptrace/ptrace-tm-tar' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Ptrace test for TAR, PPR, DSCR registers in the TM context
*
* Copyright (C) 2015 Anshuman Khandual, IBM Corporation.
*/
#include "ptrace.h"
#include "tm.h"
#include "ptrace-tar.h"
int shm_id;
unsigned long *cptr, *pptr;
void tm_tar(void)
{
unsigned long re... | |
Linux kernel'inde 'tools/testing/selftests/powerpc/ptrace/ptrace-gpr' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* test helper assembly functions
*
* Copyright (C) 2016 Simon Guo, IBM Corporation.
* Copyright 2022 Michael Ellerman, IBM Corporation.
*/
#include "basic_asm.h"
#define GPR_SIZE __SIZEOF_LONG__
#define FIRST_GPR 14
#define NUM_GPRS (32 - FIRST_GPR)
#... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/ptrace/perf-hwbreak' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* perf events self profiling example test case for hw breakpoints.
*
* This tests perf PERF_TYPE_BREAKPOINT parameters
* 1) tests all variants of the break on read/write flags
* 2) tests exclude_user == 0 and 1
* 3) test array matches (if DAWR is supported))
*... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/ptrace/ptrace-syscall' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* A ptrace test for testing PTRACE_SYSEMU, PTRACE_SETREGS and
* PTRACE_GETREG. This test basically create a child process that executes
* syscalls and the parent process check if it is being traced appropriated.
*
* This test is heavily based on tools/testing/selftests/... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/ptrace/ptrace-perf-hwbreak' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0+
#include <asm/unistd.h>
#include <linux/hw_breakpoint.h>
#include <linux/ptrace.h>
#include <memory.h>
#include <stdlib.h>
#include <sys/wait.h>
#include "utils.h"
/*
* Child subroutine that performs a load on the address, then traps
*/
void same_watch_addr_child(unsigned ... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/ptrace/ptrace-gpr' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Ptrace test for GPR/FPR registers
*
* Copyright (C) 2015 Anshuman Khandual, IBM Corporation.
*/
#include "ptrace.h"
#include "ptrace-gpr.h"
#include "reg.h"
#include <time.h>
/* Tracer and Tracee Shared Data */
int shm_id;
int *cptr, *pptr;
extern void gpr_ch... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/ptrace/ptrace-tm-spd-tar' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Ptrace test for TAR, PPR, DSCR registers in the TM Suspend context
*
* Copyright (C) 2015 Anshuman Khandual, IBM Corporation.
*/
#include "ptrace.h"
#include "tm.h"
#include "ptrace-tar.h"
int shm_id;
int *cptr, *pptr;
__attribute__((used)) void wait_parent(v... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/ptrace/ptrace-tm-vsx' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Ptrace test for VMX/VSX registers in the TM context
*
* Copyright (C) 2015 Anshuman Khandual, IBM Corporation.
*/
#include "ptrace.h"
#include "tm.h"
#include "ptrace-vsx.h"
int shm_id;
unsigned long *cptr, *pptr;
unsigned long fp_load[VEC_MAX];
unsigned long... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/ptrace/ptrace-hwbreak' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0+
/*
* Ptrace test for hw breakpoints
*
* Based on tools/testing/selftests/breakpoints/breakpoint_test.c
*
* This test forks and the parent then traces the child doing various
* types of ptrace enabled breakpoints
*
* Copyright (C) 2018 Michael Neuling, IBM Corporation.
... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/ptrace/ptrace-tm-gpr' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Ptrace test for GPR/FPR registers in TM context
*
* Copyright (C) 2015 Anshuman Khandual, IBM Corporation.
*/
#include "ptrace.h"
#include "ptrace-gpr.h"
#include "tm.h"
/* Tracer and Tracee Shared Data */
int shm_id;
unsigned long *cptr, *pptr;
double a = FP... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/ptrace/ptrace-pkey' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0+
/*
* Ptrace test for Memory Protection Key registers
*
* Copyright (C) 2015 Anshuman Khandual, IBM Corporation.
* Copyright (C) 2018 IBM Corporation.
*/
#include "ptrace.h"
#include "child.h"
#include "pkeys.h"
static const char user_read[] = "[User Read (Running)]";
stat... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/papr_vpd/papr_vpd' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <asm/papr-vpd.h>
#include "utils.h"
#define DEVPATH "/dev/papr-vpd"
static int dev_papr_vpd_open_close(void)
{
const in... | |
Linux kernel'inde 'tools/testing/selftests/powerpc/math/vsx_asm' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright 2015, Cyril Bur, IBM Corp.
*/
#include "basic_asm.h"
#include "vsx_asm.h"
#long check_vsx(vector int *r3);
#This function wraps storeing VSX regs to the end of an array and a
#call to a comparison function in C which boils down to a memcmp()... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/math/mma' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Test basic matrix multiply assist (MMA) functionality if available.
*
* Copyright 2020, Alistair Popple, IBM Corp.
*/
#include <stdio.h>
#include <stdint.h>
#include "utils.h"
extern void test_mma(uint16_t (*)[8], uint16_t (*)[8], uint32_t (*)[4*4]);
static ... | |
Linux kernel'inde 'tools/testing/selftests/powerpc/math/fpu_asm' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright 2015, Cyril Bur, IBM Corp.
*/
#include "basic_asm.h"
#include "fpu_asm.h"
FUNC_START(check_fpu)
mr r4,r3
li r3,1 # assume a bad result
lfd f0,0(r4)
fcmpu cr1,f0,f14
bne cr1,1f
lfd f0,8(r4)
fcmpu cr1,f0,f15
bne cr1,1f
lfd f0,16(r4)
... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/math/fpu' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright 2023, Michael Ellerman, IBM Corporation.
*/
#ifndef _SELFTESTS_POWERPC_FPU_H
#define _SELFTESTS_POWERPC_FPU_H
static inline void randomise_darray(double *darray, int num)
{
long val;
for (int i = 0; i < num; i++) {
val = random();
if (val & ... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/math/fpu_syscall' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright 2015, Cyril Bur, IBM Corp.
*
* This test attempts to see if the FPU registers change across a syscall (fork).
*/
#include <stdio.h>
#include <unistd.h>
#include <sys/syscall.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/wait.h>
#inclu... | |
Linux kernel'inde 'tools/testing/selftests/powerpc/math/mma' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
/* SPDX-License-Identifier: GPL-2.0-or-later
*
* Test basic matrix multiply assist (MMA) functionality if available.
*
* Copyright 2020, Alistair Popple, IBM Corp.
*/
.global test_mma
test_mma:
/* Load accumulator via VSX registers from image passed in r3 */
lxvh8x 4,0,3
lxvh8x 5,0,4
/* Clear and... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/math/fpu_denormal' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright IBM Corp. 2020
*
* This test attempts to cause a FP denormal exception on POWER8 CPUs. Unfortunately
* if the denormal handler is not configured or working properly, this can cause a bad
* crash in kernel mode when the kernel tries to save FP registe... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/math/fpu_signal' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright 2015, Cyril Bur, IBM Corp.
*
* This test attempts to see if the FPU registers are correctly reported in a
* signal context. Each worker just spins checking its FPU registers, at some
* point a signal will interrupt it and C code will check the signal... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/math/fpu_preempt' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright 2015, Cyril Bur, IBM Corp.
* Copyright 2023, Michael Ellerman, IBM Corp.
*
* This test attempts to see if the FPU registers change across preemption.
* There is no way to be sure preemption happened so this test just uses many
* threads and a long w... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/math/vsx_preempt' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright 2015, Cyril Bur, IBM Corp.
*
* This test attempts to see if the VSX registers change across preemption.
* There is no way to be sure preemption happened so this test just
* uses many threads and a long wait. As such, a successful test
* doesn't mean... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/math/vmx_syscall' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright 2015, Cyril Bur, IBM Corp.
*
* This test attempts to see if the VMX registers change across a syscall (fork).
*/
#include <altivec.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/syscall.h>
#include <sys/time.h>
#include <stdlib.h>
#include <... | |
Linux kernel'inde 'tools/testing/selftests/powerpc/math/vmx_asm' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright 2015, Cyril Bur, IBM Corp.
*/
#include "basic_asm.h"
#include "vmx_asm.h"
# Should be safe from C, only touches r4, r5 and v0,v1,v2
FUNC_START(check_vmx)
PUSH_BASIC_STACK(32)
mr r4,r3
li r3,1 # assume a bad result
li r5,0
lvx v0,r5,r4
... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/math/vmx_signal' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright 2015, Cyril Bur, IBM Corp.
*
* This test attempts to see if the VMX registers are correctly reported in a
* signal context. Each worker just spins checking its VMX registers, at some
* point a signal will interrupt it and C code will check the signal... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/math/vmx_preempt' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright 2015, Cyril Bur, IBM Corp.
*
* This test attempts to see if the VMX registers change across preemption.
* Two things should be noted here a) The check_vmx function in asm only checks
* the non volatile registers as it is reused from the syscall test ... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/cache_shape/cache_shape' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright 2017, Michael Ellerman, IBM Corp.
*/
#include <elf.h>
#include <errno.h>
#include <fcntl.h>
#include <link.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/alignment/alignment_handler' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Test the powerpc alignment handler on POWER8/POWER9
*
* Copyright (C) 2017 IBM Corporation (Michael Neuling, Andrew Donnellan)
*/
/*
* This selftest exercises the powerpc alignment fault handler.
*
* We create two sets of source and destination buffers, one... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/alignment/copy_first_unaligned' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright 2016, Chris Smart, IBM Corporation.
*
* Calls to copy_first which are not 128-byte aligned should be
* caught and sent a SIGBUS.
*/
#include <signal.h>
#include <string.h>
#include <unistd.h>
#include "utils.h"
#include "instructions.h"
unsigned in... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/stringloops/string' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Copied from linux/lib/string.c
*
* Copyright (C) 1991, 1992 Linus Torvalds
*/
#include <stddef.h>
/**
* strlen - Find the length of a string
* @s: The string to be sized
*/
size_t test_strlen(const char *s)
{
const char *sc;
for (sc = s; *sc != '\0'; ++sc)
/... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/stringloops/strlen' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <malloc.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "utils.h"
#define SIZE 256
#define ITERATIONS 1000
#define ITERATIONS_BENCH 100000
int test_strlen(const void *s);
/* test all offsets and lengths */
static void test_one(char *s)
{
unsign... | |
Linux kernel'inde 'tools/testing/selftests/powerpc/stringloops/memcmp_32' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
/* SPDX-License-Identifier: GPL-2.0 */
/*
* memcmp for PowerPC32
*
* Copyright (C) 1996 Paul Mackerras.
*
*/
#include <linux/export.h>
#include <asm/ppc_asm.h>
.text
_GLOBAL(memcmp)
srawi. r7, r5, 2 /* Divide len by 4 */
mr r6, r3
beq- 3f
mtctr r7
li r7, 0
1: lwzx r3, r6, r7
lwzx r0, r4, r7... | |
Linux kernel'inde 'tools/testing/selftests/powerpc/stringloops/strlen_32' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
/* SPDX-License-Identifier: GPL-2.0 */
/*
* strlen() for PPC32
*
* Copyright (C) 2018 Christophe Leroy CS Systemes d'Information.
*
* Inspired from glibc implementation
*/
#include <linux/export.h>
#include <asm/ppc_asm.h>
#include <asm/cache.h>
.text
/*
* Algorithm:
*
* 1) Given a word 'x', we ... | |
Linux kernel'inde 'tools/testing/selftests/powerpc/stringloops/memcmp_64' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Author: Anton Blanchard <anton@au.ibm.com>
* Copyright 2015 IBM Corporation.
*/
#include <linux/export.h>
#include <asm/ppc_asm.h>
#include <asm/ppc-opcode.h>
#define off8 r6
#define off16 r7
#define off24 r8
#define rA r9
#define rB r10
#define rC r... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/stringloops/memcmp' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <malloc.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <time.h>
#include "utils.h"
#define SIZE 256
#define ITERATIONS 10000
#define LARGE_SIZE (5 * 1024)
#define LARGE_ITERATIONS 1000
#define LARGE_MAX_OFFSET 32
#define LARGE_SIZE_START 40... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/stringloops/asm/ppc-opcode' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright 2009 Freescale Semiconductor, Inc.
*
* provides masks and opcode images for use by code generation, emulation
* and for instructions that older assemblers might not know about
*/
#ifndef _ASM_POWERPC_PPC_OPCODE_H
#define _ASM_POWERPC_PPC_OPCODE_H
... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/stringloops/asm/ppc_asm' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _PPC_ASM_H
#define _PPC_ASM_H
#include <ppc-asm.h>
#ifndef r1
#define r1 sp
#endif
#define _GLOBAL(A) FUNC_START(test_ ## A)
#define _GLOBAL_TOC(A) FUNC_START(test_ ## A)
#define CFUNC(name) name
#define CONFIG_ALTIVEC
#define R14 r14
#define R15 r15
#define R16 r... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/dexcr/lsdexcr' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0+
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <sys/prctl.h>
#include "dexcr.h"
#include "utils.h"
static unsigned int dexcr;
static unsigned int hdexcr;
static unsigned int effective;
static void print_list(const char *list[], size_t len)
{
for (size_... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/dexcr/chdexcr' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
#include <errno.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/prctl.h>
#include "dexcr.h"
#include "utils.h"
static void die(const char *msg)
{
printf("%s\n", msg);
exit(1);
}
static void help(void)
{
printf("Invo... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/dexcr/dexcr_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <sys/prctl.h>
#include <unistd.h>
#include "dexcr.h"
#include "utils.h"
/*
* Helper function for testing the behaviour of a newly exec-ed process
*/
static int dexcr_prctl_onexec... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/dexcr/hashchk_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0+
#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <sched.h>
#include <setjmp.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/prctl.h>
#include <unistd.h>
#include "dexc... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/dexcr/dexcr' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* POWER Dynamic Execution Control Facility (DEXCR)
*
* This header file contains helper functions and macros
* required for all the DEXCR related test cases.
*/
#ifndef _SELFTESTS_POWERPC_DEXCR_DEXCR_H
#define _SELFTESTS_POWERPC_DEXCR_DEXCR_H
#include <stdbo... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/dexcr/dexcr' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0+
#include <errno.h>
#include <setjmp.h>
#include <signal.h>
#include <sys/prctl.h>
#include <sys/types.h>
#include <sys/wait.h>
#include "dexcr.h"
#include "reg.h"
#include "utils.h"
static jmp_buf generic_signal_jump_buf;
static void generic_signal_handler(int signum, sigin... | |
Linux kernel'inde 'tools/testing/selftests/powerpc/security/branch_loops' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2019, Michael Ellerman, IBM Corp.
*/
#include <ppc-asm.h>
.data
jump_table:
.long 0x0
.long (.Lstate_1 - .Lstate_0)
.long (.Lstate_2 - .Lstate_0)
.long (.Lstate_3 - .Lstate_0)
.long (.Lstate_4 - .Lstate_0)
.long (.Lstate_5 - .Lstate_0)
.long ... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/security/entry_flush' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2018 IBM Corporation.
*/
#define __SANE_USERSPACE_TYPES__
#include <sys/types.h>
#include <stdint.h>
#include <malloc.h>
#include <unistd.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "utils.h"
#include "flush_uti... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/security/spectre_v2' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2018-2019 IBM Corporation.
*/
#define __SANE_USERSPACE_TYPES__
#include <sys/types.h>
#include <stdint.h>
#include <malloc.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <sys/prctl.h>
#include "utils.h"
#include "... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/security/uaccess_flush' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2018 IBM Corporation.
* Copyright 2020 Canonical Ltd.
*/
#define __SANE_USERSPACE_TYPES__
#include <sys/types.h>
#include <stdint.h>
#include <malloc.h>
#include <unistd.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#incl... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/security/flush_utils' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2018 IBM Corporation.
*/
#define __SANE_USERSPACE_TYPES__
#include <sys/types.h>
#include <stdint.h>
#include <unistd.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <sys/utsname.h>
#include "reg.h"
#include "utils.... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/security/flush_utils' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright 2018 IBM Corporation.
*/
#ifndef _SELFTESTS_POWERPC_SECURITY_FLUSH_UTILS_H
#define _SELFTESTS_POWERPC_SECURITY_FLUSH_UTILS_H
#define CACHELINE_SIZE 128
#define PERF_L1D_READ_MISS_CONFIG ((PERF_COUNT_HW_CACHE_L1D) | \
(PERF_COUNT_HW_CACHE_OP_READ <... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/security/rfi_flush' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2018 IBM Corporation.
*/
#define __SANE_USERSPACE_TYPES__
#include <sys/types.h>
#include <stdint.h>
#include <malloc.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "utils.h"
#include "flush_utils.h"
int rfi_flus... | |
Linux kernel'inde 'tools/testing/selftests/powerpc/switch_endian/switch_endian_test' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
/* SPDX-License-Identifier: GPL-2.0 */
#include "common.h"
.data
.balign 8
success_message:
.ascii "success: switch_endian_test\n\0"
.balign 8
failure_message:
.ascii "failure: switch_endian_test\n\0"
.section ".toc"
.balign 8
pattern:
.8byte 0x5555AAAA5555AAAA
.text
FUNC_START(_start)
/* Load... | |
Linux kernel'inde 'tools/testing/selftests/powerpc/switch_endian/check' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
/* SPDX-License-Identifier: GPL-2.0 */
#include "common.h"
/*
* Checks that registers contain what we expect, ie. they were not clobbered by
* the syscall.
*
* r15: pattern to check registers against.
*
* At the end r3 == 0 if everything's OK.
*/
nop # guaranteed to be illegal in reverse-endian
... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/switch_endian/common' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#include <ppc-asm.h>
#include <asm/unistd.h>
#ifndef __NR_switch_endian
#define __NR_switch_endian 363
#endif
``` | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/primitives/word-at-a-time' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
#ifndef _ASM_WORD_AT_A_TIME_H
#define _ASM_WORD_AT_A_TIME_H
/*
* Word-at-a-time interfaces for PowerPC.
*/
#include <linux/bitops.h>
#include <linux/wordpart.h>
#include <asm/asm-compat.h>
#include <asm/extable.h>
#ifdef __BIG_ENDIAN__
struct word_at_a_time {
const unsigned long high_bits, low_bits;
};
#def... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/primitives/load_unaligned_zeropad' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Userspace test harness for load_unaligned_zeropad. Creates two
* pages and uses mprotect to prevent access to the second page and
* a SEGV handler that walks the exception tables and runs the fixup
* routine.
*
* The results are compared against a normal load... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/primitives/linux/wordpart' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_WORDPART_H
#define _LINUX_WORDPART_H
/**
* upper_32_bits - return bits 32-63 of a number
* @n: the number we're accessing
*
* A basic shift-right of a 64- or 32-bit quantity. Use this to suppress
* the "right shift count >= width of type" warning when t... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/primitives/asm/asm-compat' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
#ifndef _ASM_POWERPC_ASM_COMPAT_H
#define _ASM_POWERPC_ASM_COMPAT_H
#include <asm/asm-const.h>
#include <asm/types.h>
#include <asm/ppc-opcode.h>
#ifdef __powerpc64__
/* operations for longs and pointers */
#define PPC_LL stringify_in_c(ld)
#define PPC_STL stringify_in_c(std)
#define PPC_STLU stringify_in_c(s... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/primitives/asm/feature-fixups' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef __ASM_POWERPC_FEATURE_FIXUPS_H
#define __ASM_POWERPC_FEATURE_FIXUPS_H
#include <asm/asm-const.h>
/*
*/
/*
* Feature section common macros
*
* Note that the entries now contain offsets between the table entry
* and the code rather than absolute code po... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/primitives/asm/asm-const' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
#ifndef _ASM_POWERPC_ASM_CONST_H
#define _ASM_POWERPC_ASM_CONST_H
#ifdef __ASSEMBLER__
# define stringify_in_c(...) __VA_ARGS__
# define ASM_CONST(x) x
#else
/* This version of stringify will deal with commas... */
# define __stringify_in_c(...) #__VA_ARGS__
# define stringify_in_c(...) __stringify_in_c(__VA... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/primitives/asm/ppc_asm' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/*
* Copyright (C) 1995-1999 Gary Thomas, Paul Mackerras, Cort Dougan.
*/
#ifndef _ASM_POWERPC_PPC_ASM_H
#define _ASM_POWERPC_PPC_ASM_H
#include <linux/stringify.h>
#include <asm/asm-compat.h>
#include <asm/processor.h>
#include <asm/ppc-opcode.h>
#include <asm/firmware.h>
#include <asm/feature-fixups.h>
#inclu... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/primitives/asm/extable' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ARCH_POWERPC_EXTABLE_H
#define _ARCH_POWERPC_EXTABLE_H
/*
* The exception table consists of pairs of relative addresses: the first is
* the address of an instruction that is allowed to fault, and the second is
* the address at which the program should continue. ... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/papr_attributes/attr_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* PAPR Energy attributes sniff test
* This checks if the papr folders and contents are populated relating to
* the energy and frequency attributes
*
* Copyright 2022, Pratik Rajesh Sampat, IBM Corp.
*/
#include <errno.h>
#include <stdio.h>
#include <string.h>
... | |
Linux kernel'inin 'tools/testing/selftests/openat2/helpers' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Author: Aleksa Sarai <cyphar@cyphar.com>
* Copyright (C) 2018-2019 SUSE LLC.
*/
#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <stdbool.h>
#include <string.h>
#include <syscall.h>
#include <limits.h>
#include "helpers.h"
bool needs_openat2... | |
Linux kernel'inin 'tools/testing/selftests/openat2/rename_attack_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Author: Aleksa Sarai <cyphar@cyphar.com>
* Copyright (C) 2018-2019 SUSE LLC.
*/
#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <sched.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/mount.h>
#include <sys/mman.h>
#include <sys/... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/openat2/helpers' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Author: Aleksa Sarai <cyphar@cyphar.com>
* Copyright (C) 2018-2019 SUSE LLC.
*/
#ifndef __RESOLVEAT_H__
#define __RESOLVEAT_H__
#define _GNU_SOURCE
#include <stdint.h>
#include <stdbool.h>
#include <errno.h>
#include <linux/types.h>
#include "kselftest.h"
#de... | |
Linux kernel'inin 'tools/testing/selftests/openat2/openat2_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Author: Aleksa Sarai <cyphar@cyphar.com>
* Copyright (C) 2018-2019 SUSE LLC.
*/
#define _GNU_SOURCE
#define __SANE_USERSPACE_TYPES__ // Use ll64
#include <fcntl.h>
#include <sched.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/mount.h>
#include <... | |
Linux kernel'inin 'tools/testing/selftests/openat2/resolve_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Author: Aleksa Sarai <cyphar@cyphar.com>
* Copyright (C) 2018-2019 SUSE LLC.
*/
#define _GNU_SOURCE
#include <fcntl.h>
#include <sched.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/mount.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stri... | |
Linux kernel'inin 'tools/testing/selftests/sched_ext/select_cpu_dfl' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2023 Meta Platforms, Inc. and affiliates.
* Copyright (c) 2023 David Vernet <dvernet@meta.com>
* Copyright (c) 2023 Tejun Heo <tj@kernel.org>
*/
#include <bpf/bpf.h>
#include <scx/common.h>
#include <sys/wait.h>
#include <unistd.h>
#include "select_cpu_... | |
Linux kernel'inin 'tools/testing/selftests/sched_ext/maximal' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2024 Meta Platforms, Inc. and affiliates.
* Copyright (c) 2024 David Vernet <dvernet@meta.com>
*/
#include <bpf/bpf.h>
#include <scx/common.h>
#include <sys/wait.h>
#include <unistd.h>
#include "maximal.bpf.skel.h"
#include "scx_test.h"
static enum scx_... | |
Linux kernel'inin 'tools/testing/selftests/sched_ext/peek_dsq.bpf' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* A BPF program for testing DSQ operations and peek in particular.
*
* Copyright (c) 2025 Meta Platforms, Inc. and affiliates.
* Copyright (c) 2025 Ryan Newton <ryan.newton@alum.mit.edu>
*/
#include <scx/common.bpf.h>
#include <scx/compat.bpf.h>
char _license[] SEC("li... | |
Linux kernel'inin 'tools/testing/selftests/sched_ext/select_cpu_vtime.bpf' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
/*
* A scheduler that validates that enqueue flags are properly stored and
* applied at dispatch time when a task is directly dispatched from
* ops.select_cpu(). We validate this by using scx_bpf_dsq_insert_vtime(),
* and making the test a very basic vtime scheduler.
*
... | |
Linux kernel'inin 'tools/testing/selftests/sched_ext/dsp_local_on.bpf' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2024 Meta Platforms, Inc. and affiliates.
* Copyright (c) 2024 David Vernet <dvernet@meta.com>
*/
#include <scx/common.bpf.h>
char _license[] SEC("license") = "GPL";
const volatile s32 nr_cpus;
UEI_DEFINE(uei);
struct {
__uint(type, BPF_MAP_TYPE_QUEU... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.