instruction stringlengths 82 202 | input stringclasses 1
value | output stringlengths 73 23.9M |
|---|---|---|
Linux kernel'inin 'tools/testing/selftests/kvm/x86/kvm_clock_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2021, Google LLC.
*
* Tests for adjusting the KVM clock from userspace
*/
#include <asm/kvm_para.h>
#include <asm/pvclock.h>
#include <asm/pvclock-abi.h>
#include <stdint.h>
#include <string.h>
#include <sys/stat.h>
#include <time.h>
#include "test_u... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/hyperv_cpuid' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Test for x86 KVM_CAP_HYPERV_CPUID
*
* Copyright (C) 2018, Red Hat, Inc.
*
* This work is licensed under the terms of the GNU GPL, version 2.
*
*/
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include "test_util... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/svm_nested_clear_efer_svme' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2026, Google LLC.
*/
#include "kvm_util.h"
#include "vmx.h"
#include "svm_util.h"
#include "kselftest.h"
#define L2_GUEST_STACK_SIZE 64
static void l2_guest_code(void)
{
unsigned long efer = rdmsr(MSR_EFER);
/* generic_svm_setup() initializes EFER... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/hyperv_features' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2021, Red Hat, Inc.
*
* Tests for Hyper-V features enablement
*/
#include <asm/kvm_para.h>
#include <linux/kvm_para.h>
#include <stdint.h>
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
#include "hyperv.h"
/*
* HYPERV_CPUID_ENL... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/aperfmperf_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Test for KVM_X86_DISABLE_EXITS_APERFMPERF
*
* Copyright (C) 2025, Google LLC.
*
* Test the ability to disable VM-exits for rdmsr of IA32_APERF and
* IA32_MPERF. When these VM-exits are disabled, reads of these MSRs
* return the host's values.
*
* Note: Require... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/nx_huge_pages_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Usage: to be run via nx_huge_page_test.sh, which does the necessary
* environment setup and teardown
*
* Copyright (C) 2022, Google LLC.
*/
#include <fcntl.h>
#include <stdint.h>
#include <time.h>
#include <test_util.h>
#include "kvm_util.h"
#include "processor.h... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/xapic_ipi_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* xapic_ipi_test
*
* Copyright (C) 2020, Google LLC.
*
* This work is licensed under the terms of the GNU GPL, version 2.
*
* Test that when the APIC is in xAPIC mode, a vCPU can send an IPI to wake
* another vCPU that is halted when KVM's backing page for the APIC ac... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/kvm/x86/flds_emulation' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef SELFTEST_KVM_FLDS_EMULATION_H
#define SELFTEST_KVM_FLDS_EMULATION_H
#include "kvm_util.h"
#define FLDS_MEM_EAX ".byte 0xd9, 0x00"
/*
* flds is an instruction that the KVM instruction emulator is known not to
* support. This can be used in guest code along wi... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/tsc_msrs_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Tests for MSR_IA32_TSC and MSR_IA32_TSC_ADJUST.
*
* Copyright (C) 2020, Red Hat, Inc.
*/
#include <stdio.h>
#include <string.h>
#include "kvm_util.h"
#include "processor.h"
#define UNITY (1ull << 30)
#define HOST_ADJUST (UNITY * 64)
#define ... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/sev_migrate_tests' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#include <linux/kvm.h>
#include <linux/psp-sev.h>
#include <stdio.h>
#include <sys/ioctl.h>
#include <stdlib.h>
#include <errno.h>
#include <pthread.h>
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
#include "sev.h"
#include "kselftest.h"
#define NR_M... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/fastops_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
/*
* Execute a fastop() instruction, with or without forced emulation. BT bit 0
* to set RFLAGS.CF based on whether or not the input is even or odd, so that
* instructions like ADC and SBB are determin... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/hwcr_msr_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2023, Google LLC.
*/
#include <sys/ioctl.h>
#include "test_util.h"
#include "kvm_util.h"
#include "vmx.h"
void test_hwcr_bit(struct kvm_vcpu *vcpu, unsigned int bit)
{
const u64 ignored = BIT_ULL(3) | BIT_ULL(6) | BIT_ULL(8);
const u64 valid = BIT_ULL(18... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/vmx_msrs_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* VMX control MSR test
*
* Copyright (C) 2022 Google LLC.
*
* Tests for KVM ownership of bits in the VMX entry/exit control MSRs. Checks
* that KVM will set owned bits where appropriate, and will not if
* KVM_X86_QUIRK_TWEAK_VMX_CTRL_MSRS is disabled.
*/
#include... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/sev_init2_tests' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#include <linux/kvm.h>
#include <linux/psp-sev.h>
#include <stdio.h>
#include <sys/ioctl.h>
#include <stdlib.h>
#include <errno.h>
#include <pthread.h>
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
#include "svm_util.h"
#include "kselftest.h"
#define... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/nested_invalid_cr3_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2025, Google LLC.
*
* This test verifies that L1 fails to enter L2 with an invalid CR3, and
* succeeds otherwise.
*/
#include "kvm_util.h"
#include "vmx.h"
#include "svm_util.h"
#include "kselftest.h"
#define L2_GUEST_STACK_SIZE 64
static void l2_... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/xen_vmcall_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* xen_vmcall_test
*
* Copyright © 2020 Amazon.com, Inc. or its affiliates.
*
* Userspace hypercall testing
*/
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
#include "hyperv.h"
#define HCALL_REGION_GPA 0xc0000000ULL
#define HCALL_REGION_SLOT ... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/cpuid_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2021, Red Hat Inc.
*
* Generic tests for KVM CPUID set/get ioctls
*/
#include <asm/kvm_para.h>
#include <linux/kvm_para.h>
#include <stdint.h>
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
struct cpuid_mask {
union {
struct ... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/kvm_pv_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2020, Google LLC.
*
* Tests for KVM paravirtual feature disablement
*/
#include <asm/kvm_para.h>
#include <linux/kvm_para.h>
#include <stdint.h>
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
struct msr_data {
u32 idx;
const c... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/userspace_msr_exit_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2020, Google LLC.
*
* Tests for exiting into userspace on registered MSRs
*/
#include <sys/ioctl.h>
#include "kvm_test_harness.h"
#include "test_util.h"
#include "kvm_util.h"
#include "vmx.h"
#define MSR_NON_EXISTENT 0x474f4f00
static u64 deny_bits = 0;... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/nested_tsc_scaling_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* vmx_nested_tsc_scaling_test
*
* Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* This test case verifies that nested TSC scaling behaves as expected when
* both L1 and L2 are scaled using different ratios. For this test we scale
* L1 d... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/sync_regs_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Test for x86 KVM_CAP_SYNC_REGS
*
* Copyright (C) 2018, Google LLC.
*
* Verifies expected behavior of x86 KVM_CAP_SYNC_REGS functionality,
* including requesting an invalid register set, updates to/from values
* in kvm_run.s.regs when kvm_valid_regs and kvm_dirty... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/pmu_counters_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2023, Tencent, Inc.
*/
#include <x86intrin.h>
#include "pmu.h"
#include "processor.h"
/* Number of iterations of the loop for the guest measurement payload. */
#define NUM_LOOPS 10
/* Each iteration of the loop retires one branch instruction. */
#define... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/nested_exceptions_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#include "test_util.h"
#include "kvm_util.h"
#include "processor.h"
#include "vmx.h"
#include "svm_util.h"
#define L2_GUEST_STACK_SIZE 256
/*
* Arbitrary, never shoved into KVM/hardware, just need to avoid conflict with
* the "real" exceptions used, #SS/#GP/#DF (12/13/8... | |
Linux kernel'inin 'tools/testing/selftests/kvm/x86/xss_msr_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2019, Google LLC.
*
* Tests for the IA32_XSS MSR.
*/
#include <sys/ioctl.h>
#include "test_util.h"
#include "kvm_util.h"
#include "vmx.h"
#define MSR_BITS 64
int main(int argc, char *argv[])
{
bool xss_in_msr_list;
struct kvm_vm *vm;
struct kvm_... | |
Linux kernel'inin 'tools/testing/selftests/kvm/riscv/sbi_pmu_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* sbi_pmu_test.c - Tests the riscv64 SBI PMU functionality.
*
* Copyright (c) 2024, Rivos Inc.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include "kvm_util.h"
#include "test_util.h"
#include "processor.h... | |
Linux kernel'inin 'tools/testing/selftests/kvm/riscv/ebreak_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* RISC-V KVM ebreak test.
*
* Copyright 2024 Beijing ESWIN Computing Technology Co., Ltd.
*
*/
#include "kvm_util.h"
#include "ucall_common.h"
#define LABEL_ADDRESS(v) ((u64)&(v))
extern unsigned char sw_bp_1, sw_bp_2;
static u64 sw_bp_addr;
static void guest_code(voi... | |
Linux kernel'inin 'tools/testing/selftests/kvm/riscv/get-reg-list' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Check for KVM_GET_REG_LIST regressions.
*
* Copyright (c) 2023 Intel Corporation
*
*/
#include <stdio.h>
#include "kvm_util.h"
#include "test_util.h"
#include "processor.h"
#define REG_MASK (KVM_REG_ARCH_MASK | KVM_REG_SIZE_MASK)
enum {
VCPU_FEATURE_ISA_EXT = 0,
VC... | |
Linux kernel'inin 'tools/testing/selftests/kvm/riscv/arch_timer' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* arch_timer.c - Tests the riscv64 sstc timer IRQ functionality
*
* The test validates the sstc timer IRQs using vstimecmp registers.
* It's ported from the aarch64 arch_timer test.
*
* Copyright (c) 2024, Intel Corporation.
*/
#include "arch_timer.h"
#include "kv... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/harness' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright 2013, Michael Ellerman, IBM Corp.
*/
#include <errno.h>
#include <signal.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <elf.h>
#include <fcntl.h>
#include <link.h>
#... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/utils' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright 2013-2015, Michael Ellerman, IBM Corp.
*/
#define _GNU_SOURCE /* For CPU_ZERO etc. */
#include <elf.h>
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
#include <limits.h>
#include <link.h>
#include <sched.h>
#include <stdio.h>
#include <stdlib... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/dscr/dscr_explicit_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* POWER Data Stream Control Register (DSCR) explicit test
*
* This test modifies the DSCR value using mtspr instruction and
* verifies the change with mfspr instruction. It uses both the
* privilege state SPR and the problem state SPR for this purpose.
*
* When us... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/dscr/dscr_sysfs_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* POWER Data Stream Control Register (DSCR) sysfs interface test
*
* This test updates to system wide DSCR default through the sysfs interface
* and then verifies that all the CPU specific DSCR defaults are updated as
* well verified from their sysfs interfaces.
*
... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/dscr/dscr_sysfs_thread_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* POWER Data Stream Control Register (DSCR) sysfs thread test
*
* This test updates the system wide DSCR default value through
* sysfs interface which should then update all the CPU specific
* DSCR default values which must also be then visible to threads
* executi... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/dscr/dscr' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* POWER Data Stream Control Register (DSCR)
*
* This header file contains helper functions and macros
* required for all the DSCR related test cases.
*
* Copyright 2012, Anton Blanchard, IBM Corporation.
* Copyright 2015, Anshuman Khandual, IBM Corporation.
*/... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/dscr/dscr_inherit_exec_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* POWER Data Stream Control Register (DSCR) fork exec test
*
* This testcase modifies the DSCR using mtspr, forks & execs and
* verifies that the child is using the changed DSCR using mfspr.
*
* When using the privilege state SPR, the instructions such as
* mfspr ... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/dscr/dscr_user_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* POWER Data Stream Control Register (DSCR) SPR test
*
* This test modifies the DSCR value through both the SPR number
* based mtspr instruction and then makes sure that the same is
* reflected through mfspr instruction using either of the SPR
* numbers.
*
* When... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/dscr/dscr_default_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* POWER Data Stream Control Register (DSCR) default test
*
* This test modifies the system wide default DSCR through
* it's sysfs interface and then verifies that all threads
* see the correct changed DSCR value immediately.
*
* Copyright 2012, Anton Blanchard, IB... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/dscr/dscr_inherit_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* POWER Data Stream Control Register (DSCR) fork test
*
* This testcase modifies the DSCR using mtspr, forks and then
* verifies that the child process has the correct changed DSCR
* value using mfspr.
*
* When using the privilege state SPR, the instructions such ... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/papr_sysparm/papr_sysparm' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <asm/papr-sysparm.h>
#include "utils.h"
#define DEVPATH "/dev/papr-sysparm"
static int open_close(void)
{
const int devfd = open(DEVPATH, O_RDONLY);
SKIP_IF_M... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/nx-gzip/gzfht_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/* P9 gzip sample code for demonstrating the P9 NX hardware interface.
* Not intended for productive uses or for performance or compression
* ratio measurements. For simplicity of demonstration, this sample
* code compresses in to fixed Huffman blocks only (Deflate... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/nx-gzip/gzip_vas' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright 2020 IBM Corp.
*
* Author: Bulent Abali <abali@us.ibm.com>
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdint.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/fcntl... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/nx-gzip/gunz_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/* P9 gunzip sample code for demonstrating the P9 NX hardware
* interface. Not intended for productive uses or for performance or
* compression ratio measurements. Note also that /dev/crypto/gzip,
* VAS and skiboot support are required
*
* Copyright 2020 IBM Cor... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/nx-gzip/include/vas-api' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
/*
* Copyright 2019 IBM Corp.
*/
#ifndef _UAPI_MISC_VAS_H
#define _UAPI_MISC_VAS_H
#include <linux/types.h>
#include <asm/ioctl.h>
#define VAS_MAGIC 'v'
#define VAS_TX_WIN_OPEN _IOW(VAS_MAGIC, 0x20, struct vas_tx_win_open_attr)
/* Flags to VAS ... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/nx-gzip/include/nx_dbg' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright 2020 IBM Corporation
*
*/
#ifndef _NXU_DBG_H_
#define _NXU_DBG_H_
#include <sys/file.h>
#include <stdint.h>
#include <stdio.h>
#include <time.h>
#include <pthread.h>
extern FILE * nx_gzip_log;
extern int nx_gzip_trace;
extern unsigned int nx_gzip... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/nx-gzip/include/nxu' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Hardware interface of the NX-GZIP compression accelerator
*
* Copyright (C) IBM Corporation, 2020
*
* Author: Bulent Abali <abali@us.ibm.com>
*
*/
#ifndef _NXU_H
#define _NXU_H
#include <stdint.h>
#include <endian.h>
#include "nx.h"
/* deflate */
#defi... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/nx-gzip/include/nx' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright 2020 IBM Corp.
*
*/
#ifndef _NX_H
#define _NX_H
#include <stdbool.h>
#define NX_FUNC_COMP_842 1
#define NX_FUNC_COMP_GZIP 2
#ifndef __aligned
#define __aligned(x) __attribute__((aligned(x)))
#endif
struct nx842_func_args {
bool use_crc;
bool d... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/nx-gzip/include/copy-paste' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
/* From asm-compat.h */
#define __stringify_in_c(...) #__VA_ARGS__
#define stringify_in_c(...) __stringify_in_c(__VA_ARGS__) " "
/*
* Macros taken from arch/powerpc/include/asm/ppc-opcode.h and other
* header files.
*/
#define ___PPC_RA(a) (((a) & 0x1f) << 16... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/nx-gzip/include/crb' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef __CRB_H
#define __CRB_H
#include <linux/types.h>
#include "nx.h"
/* CCW 842 CI/FC masks
* NX P8 workbook, section 4.3.1, figure 4-6
* "CI/FC Boundary by NX CT type"
*/
#define CCW_CI_842 (0x00003ff8)
#define CCW_FC_842 (0x0000000... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/mce/vas-api' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
/*
* Copyright 2019 IBM Corp.
*/
#ifndef _UAPI_MISC_VAS_H
#define _UAPI_MISC_VAS_H
#include <linux/types.h>
#include <asm/ioctl.h>
#define VAS_MAGIC 'v'
#define VAS_TX_WIN_OPEN _IOW(VAS_MAGIC, 0x20, struct vas_tx_win_open_attr)
/* Flags to VAS ... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/mce/inject-ra-err' 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 <signal.h>
#include <stdio.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "vas-api.h"
#include "utils.h"
static bool faulted;... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/include/reg' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright 2014, Michael Ellerman, IBM Corp.
*/
#ifndef _SELFTESTS_POWERPC_REG_H
#define _SELFTESTS_POWERPC_REG_H
#define __stringify_1(x) #x
#define __stringify(x) __stringify_1(x)
#define mfspr(rn) ({unsigned long rval; \
asm volatile("mfsp... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/include/gpr_asm' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright 2016, Cyril Bur, IBM Corp.
*/
#ifndef _SELFTESTS_POWERPC_GPR_ASM_H
#define _SELFTESTS_POWERPC_GPR_ASM_H
#include "basic_asm.h"
#define __PUSH_NVREGS(top_pos); \
std r31,(top_pos)(%r1); \
std r30,(top_pos - 8)(%r1); \
std r29,(top_pos - 16)(%r1)... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/include/pkeys' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright 2020, Sandipan Das, IBM Corp.
*/
#ifndef _SELFTESTS_POWERPC_PKEYS_H
#define _SELFTESTS_POWERPC_PKEYS_H
#include <sys/mman.h>
#include "reg.h"
#include "utils.h"
/*
* Older versions of libc use the Intel-specific access rights.
* Hence, override the defi... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/include/instructions' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _SELFTESTS_POWERPC_INSTRUCTIONS_H
#define _SELFTESTS_POWERPC_INSTRUCTIONS_H
#include <stdio.h>
#include <stdlib.h>
/* This defines the "copy" instruction from Power ISA 3.0 Book II, section 4.4. */
#define __COPY(RA, RB, L) \
(0x7c00060c | (RA) << (31-15) | (RB) <<... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/include/vsx_asm' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright 2015, Cyril Bur, IBM Corp.
*/
#include "basic_asm.h"
/*
* Careful this will 'clobber' vsx (by design), VSX are always
* volatile though so unlike vmx this isn't so much of an issue
* Still should avoid calling from C
*/
FUNC_START(load_vsx)
li... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/include/vmx_asm' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright 2015, Cyril Bur, IBM Corp.
*/
#include "basic_asm.h"
/* POS MUST BE 16 ALIGNED! */
#define PUSH_VMX(pos,reg) \
li reg,pos; \
stvx v20,reg,%r1; \
addi reg,reg,16; \
stvx v21,reg,%r1; \
addi reg,reg,16; \
stvx v22,reg,%r1; \
addi reg,reg,16; \... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/include/basic_asm' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _SELFTESTS_POWERPC_BASIC_ASM_H
#define _SELFTESTS_POWERPC_BASIC_ASM_H
#include <ppc-asm.h>
#include <asm/unistd.h>
#ifdef __powerpc64__
#define PPC_LL ld
#define PPC_STL std
#define PPC_STLU stdu
#else
#define PPC_LL lwz
#define PPC_STL stw
#define PPC_STLU stwu... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/include/subunit' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright 2013, Michael Ellerman, IBM Corp.
*/
#ifndef _SELFTESTS_POWERPC_SUBUNIT_H
#define _SELFTESTS_POWERPC_SUBUNIT_H
static inline void test_start(const char *name)
{
printf("test: %s\n", name);
}
static inline void test_failure_detail(const char *name, co... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/include/utils' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright 2013, Michael Ellerman, IBM Corp.
*/
#ifndef _SELFTESTS_POWERPC_UTILS_H
#define _SELFTESTS_POWERPC_UTILS_H
#define __cacheline_aligned __attribute__((aligned(128)))
#include <stdint.h>
#include <stdio.h>
#include <stdbool.h>
#include <sys/signal.h>
#i... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/include/fpu_asm' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright 2016, Cyril Bur, IBM Corp.
*/
#ifndef _SELFTESTS_POWERPC_FPU_ASM_H
#define _SELFTESTS_POWERPC_FPU_ASM_H
#include "basic_asm.h"
#define PUSH_FPU(stack_size) \
stfd f31,(stack_size + STACK_FRAME_MIN_SIZE)(%r1); \
stfd f30,(stack_size + STACK_FRAME_... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/vphn/vphn' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <asm/byteorder.h>
#include <asm/vphn.h>
/*
* The associativity domain numbers are returned from the hypervisor as a
* stream of mixed 16-bit and 32-bit fields. The stream is terminated by the
* special value of "all ones" (aka. 0xffff) and its size may not exceed 48... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/vphn/test-vphn' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <stdio.h>
#include <byteswap.h>
#include "utils.h"
#include "subunit.h"
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#define cpu_to_be32(x) bswap_32(x)
#define be32_to_cpu(x) bswap_32(x)
#define be16_to_cpup(x) bswap_16(*x)
#define cpu_to_be64(x) bswap_64(x)
#else... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/vphn/asm/vphn' 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_VPHN_H
#define _ASM_POWERPC_VPHN_H
/* The H_HOME_NODE_ASSOCIATIVITY h_call returns 6 64-bit registers. */
#define VPHN_REGISTER_COUNT 6
/*
* 6 64-bit registers unpacked into up to 24 be32 associativity values. To
* form the complete property ... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/mm/stack_expansion_signal' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Test that signal delivery is able to expand the stack segment without
* triggering a SEGV.
*
* Based on test code by Tom Lane.
*/
#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <sys/types.h>
#include <unistd.h>
#include "../pmu/l... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/mm/prot_sao' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright 2016, Michael Ellerman, IBM Corp.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <unistd.h>
#include <asm/cputable.h>
#include "utils.h"
#define SIZE (64 * 1024)
int test_prot_sao(void)
{
char *p;
/*
*... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/mm/pkey_siginfo' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright 2020, Sandipan Das, IBM Corp.
*
* Test if the signal information reports the correct memory protection
* key upon getting a key access violation fault for a page that was
* attempted to be protected by two different keys from two competing
* threads at the ... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/mm/large_vm_fork_separation' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0+
//
// Copyright 2019, Michael Ellerman, IBM Corp.
//
// Test that allocating memory beyond the memory limit and then forking is
// handled correctly, ie. the child is able to access the mappings beyond the
// memory limit and the child's writes are not visible to the parent.
#... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/mm/exec_prot' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright 2022, Nicholas Miehlbradt, IBM Corporation
* based on pkey_exec_prot.c
*
* Test if applying execute protection on pages works as expected.
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <unist... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/mm/stack_expansion_ldst' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Test that loads/stores expand the stack segment, or trigger a SEGV, in
* various conditions.
*
* Based on test code by Tom Lane.
*/
#undef NDEBUG
#include <assert.h>
#include <err.h>
#include <errno.h>
#include <stdio.h>
#include <signal.h>
#include <stdlib.h>
#inclu... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/mm/large_vm_gpr_corruption' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0+
//
// Copyright 2022, Michael Ellerman, IBM Corp.
//
// Test that the 4PB address space SLB handling doesn't corrupt userspace registers
// (r9-r13) due to a SLB fault while saving the PPR.
//
// The bug was introduced in f384796c4 ("powerpc/mm: Add support for handling > 512TB... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/mm/tlbie_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright 2019, Nick Piggin, Gautham R. Shenoy, Aneesh Kumar K.V, IBM Corp.
*/
/*
*
* Test tlbie/mtpidr race. We have 4 threads doing flush/load/compare/store
* sequence in a loop. The same threads also rung a context switch task
* that does sched_yield() in loop.
... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/mm/pkey_exec_prot' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2020, Sandipan Das, IBM Corp.
*
* Test if applying execute protection on pages using memory
* protection keys works as expected.
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <unistd.h>
#in... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/mm/bad_accesses' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0+
//
// Copyright 2019, Michael Ellerman, IBM Corp.
//
// Test that out-of-bounds reads/writes behave as expected.
#include <setjmp.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/mm/subpage_prot' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
/*
* Copyright IBM Corp.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2.1 of the GNU Lesser General Public License
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it would be useful, but
* WITHOUT A... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/mm/wild_bctr' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2018, Michael Ellerman, IBM Corp.
*
* Test that an out-of-bounds branch to counter behaves as expected.
*/
#include <setjmp.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/wait.h>
#incl... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/mm/hugetlb_vs_thp_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <stdio.h>
#include <sys/mman.h>
#include <unistd.h>
#include "utils.h"
/* This must match the huge page & THP size */
#define SIZE (16 * 1024 * 1024)
static int test_body(void)
{
void *addr;
char *p;
addr = (void *)0xa0000000;
p = mmap(addr, SIZE, PROT_READ | P... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/mm/segv_errors' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright 2017 John Sperbeck
*
* Test that an access to a mapped but inaccessible area causes a SEGV and
* reports si_code == SEGV_ACCERR.
*/
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <signal.h>
#incl... | |
Linux kernel'inde 'tools/testing/selftests/powerpc/copyloops/memcpy_stubs' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
/* SPDX-License-Identifier: GPL-2.0 */
#include <asm/ppc_asm.h>
FUNC_START(memcpy)
b test_memcpy
FUNC_START(backwards_memcpy)
b test_backwards_memcpy
``` | |
Linux kernel'inin 'tools/testing/selftests/powerpc/copyloops/validate' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <malloc.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include "utils.h"
#define MAX_LEN 8192
#define MAX_OFFSET 16
#define MIN_REDZONE 128
#define BUFLEN (MAX_LEN+MAX_OFFSET+2*MIN_REDZONE)
#define POISON 0xa5
#ifdef VMX_TEST
#define VMX_COPY_THRESH... | |
Linux kernel'inde 'tools/testing/selftests/powerpc/copyloops/copy_tofrom_user_reference' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
#include <asm/ppc_asm.h>
_GLOBAL(copy_tofrom_user_reference)
cmpdi r5,0
beq 4f
mtctr r5
1: lbz r6,0(r4)
2: stb r6,0(r3)
addi r3,r3,1
addi r4,r4,1
bdnz 1b
3: mfctr r3
blr
4: mr r3,r5
blr
.section __ex_table,"a"
.llong 1b,3b
.llong 2b,3b
.text
``` | |
Linux kernel'inin 'tools/testing/selftests/powerpc/copyloops/memmove_validate' 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 <assert.h>
#include "utils.h"
void *TEST_MEMMOVE(const void *s1, const void *s2, size_t n);
#define BUF_LEN 65536
#define MAX_OFFSET 512
size_t max(size_t a, size_t b)
{
if (a >= b)
return a;
return b;
}... | |
Linux kernel'inde 'tools/testing/selftests/powerpc/copyloops/memcpy_64' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2002 Paul Mackerras, IBM Corp.
*/
#include <linux/export.h>
#include <asm/processor.h>
#include <asm/ppc_asm.h>
#include <asm/asm-compat.h>
#include <asm/feature-fixups.h>
#include <asm/kasan.h>
#ifndef SELFTEST_CASE
/* For big-endian, 0 ... | |
Linux kernel'inde 'tools/testing/selftests/powerpc/copyloops/mem_64' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* String handling functions for PowerPC.
*
* Copyright (C) 1996 Paul Mackerras.
*/
#include <linux/export.h>
#include <asm/processor.h>
#include <asm/errno.h>
#include <asm/ppc_asm.h>
#include <asm/kasan.h>
#ifndef CONFIG_KASAN
_GLOBAL(__memset16)
rlw... | |
Linux kernel'inde 'tools/testing/selftests/powerpc/copyloops/copyuser_64' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2002 Paul Mackerras, IBM Corp.
*/
#include <linux/export.h>
#include <asm/processor.h>
#include <asm/ppc_asm.h>
#include <asm/asm-compat.h>
#include <asm/feature-fixups.h>
#ifndef SELFTEST_CASE
/* 0 == most CPUs, 1 == POWER6, 2 == Cell */... | |
Linux kernel'inde 'tools/testing/selftests/powerpc/copyloops/stubs' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
#include <asm/ppc_asm.h>
FUNC_START(enter_vmx_ops)
li r3,1
blr
FUNC_START(exit_vmx_ops)
blr
FUNC_START(__copy_tofrom_user_base)
blr
``` | |
Linux kernel'inde 'tools/testing/selftests/powerpc/copyloops/memcpy_power7' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
*
* Copyright (C) IBM Corporation, 2012
*
* Author: Anton Blanchard <anton@au.ibm.com>
*/
#include <asm/ppc_asm.h>
#ifndef SELFTEST_CASE
/* 0 == don't use VMX, 1 == use VMX */
#define SELFTEST_CASE 0
#endif
#ifdef __BIG_ENDIAN__
#define LVS(VRT,RA,RB... | |
Linux kernel'inde 'tools/testing/selftests/powerpc/copyloops/copy_mc_64' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (C) IBM Corporation, 2011
* Derived from copyuser_power7.s by Anton Blanchard <anton@au.ibm.com>
* Author - Balbir Singh <bsingharora@gmail.com>
*/
#include <linux/export.h>
#include <asm/ppc_asm.h>
#include <asm/errno.h>
.macro err1
100:
EX_TABLE... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/copyloops/exc_validate' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
#include <sys/mman.h>
#include "utils.h"
extern char __start___ex_table[];
extern char __stop___ex_table[];
#if defined(__powerpc64__)
#define UCONTEXT_NIA(UC) (UC)->uc_mcontext.gp_regs[PT_NIP]
#elif defined(__pow... | |
Linux kernel'inde 'tools/testing/selftests/powerpc/copyloops/copyuser_power7' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
*
* Copyright (C) IBM Corporation, 2011
*
* Author: Anton Blanchard <anton@au.ibm.com>
*/
#include <linux/export.h>
#include <asm/ppc_asm.h>
#ifdef __BIG_ENDIAN__
#define LVS(VRT,RA,RB) lvsl VRT,RA,RB
#define VPERM(VRT,VRA,VRB,VRC) vperm VRT,VRA,VRB,... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/copyloops/asm/ppc_asm' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __SELFTESTS_POWERPC_PPC_ASM_H
#define __SELFTESTS_POWERPC_PPC_ASM_H
#include <ppc-asm.h>
#define CONFIG_ALTIVEC
#define r1 1
#define R14 r14
#define R15 r15
#define R16 r16
#define R17 r17
#define R18 r18
#define R19 r19
#define R20 r20
#define R21 r21
#define R22 ... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/syscalls/ipc_unmuxed' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright 2015, Michael Ellerman, IBM Corp.
*
* This test simply tests that certain syscalls are implemented. It doesn't
* actually exercise their logic in any way.
*/
#define _GNU_SOURCE
#include <errno.h>
#include <stdio.h>
#include <unistd.h>
#include <sys... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/powerpc/syscalls/ipc' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifdef __NR_semop
DO_TEST(semop, __NR_semop)
#endif
#ifdef __NR_semget
DO_TEST(semget, __NR_semget)
#endif
#ifdef __NR_semctl
DO_TEST(semctl, __NR_semctl)
#endif
#ifdef __NR_semtimedop
DO_TEST(semtimedop, __NR_semtimedop)
#endif
#ifdef __NR_msgsnd
DO_TEST(msgsnd, __NR_msg... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/syscalls/rtas_filter' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2005-2020 IBM Corporation.
*
* Includes code from librtas (https://github.com/ibm-power-utilities/librtas/)
*/
#include <byteswap.h>
#include <stdint.h>
#include <inttypes.h>
#include <linux/limits.h>
#include <stdio.h>
#include <string.h>
#include <sys/sysc... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/benchmarks/futex_bench' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright 2016, Anton Blanchard, Michael Ellerman, IBM Corp.
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <sys/syscall.h>
#include <time.h>
#include <unistd.h>
#include <linux/futex.h>
#include "utils.h"
#define ITERATIONS 100000000
#define futex(A, B, C, ... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/benchmarks/context_switch' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Context switch microbenchmark.
*
* Copyright (C) 2015 Anton Blanchard <anton@au.ibm.com>, IBM
*/
#define _GNU_SOURCE
#include <errno.h>
#include <sched.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <getopt.h>
#inclu... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/benchmarks/exec_target' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0+
/*
* Part of fork context switch microbenchmark.
*
* Copyright 2018, Anton Blanchard, IBM Corp.
*/
#define _GNU_SOURCE
#include <sys/syscall.h>
void _start(void)
{
asm volatile (
"li %%r0, %[sys_exit];"
"li %%r3, 0;"
"sc;"
:
: [sys_exit] "i" (SYS_exit)
/*
... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/benchmarks/mmap_bench' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright 2016, Anton Blanchard, Michael Ellerman, IBM Corp.
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <time.h>
#include <getopt.h>
#include "utils.h"
#define ITERATIONS 5000000
#define MEMSIZE (1UL << 27)
#define PAGE_SIZE (1UL << ... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/benchmarks/null_syscall' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Test null syscall performance
*
* Copyright (C) 2009-2015 Anton Blanchard, IBM
*/
#define NR_LOOPS 10000000
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
#include <sys/types.h>
#include <sys/time.h>
#include ... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/benchmarks/gettimeofday' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright 2015, Anton Blanchard, IBM Corp.
*/
#include <sys/time.h>
#include <stdio.h>
#include "utils.h"
static int test_gettimeofday(void)
{
int i;
struct timeval tv_start, tv_end, tv_diff;
gettimeofday(&tv_start, NULL);
for(i = 0; i < 100000000; i++) {
... | |
Linux kernel'inin 'tools/testing/selftests/powerpc/benchmarks/fork' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0+
/*
* Context switch microbenchmark.
*
* Copyright 2018, Anton Blanchard, IBM Corp.
*/
#define _GNU_SOURCE
#include <assert.h>
#include <errno.h>
#include <getopt.h>
#include <limits.h>
#include <linux/futex.h>
#include <pthread.h>
#include <sched.h>
#include <signal.h>
#i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.