tools/testing/selftests/powerpc/pmu/event_code_tests/reserved_bits_mmcra_thresh_ctl_test.c
Source file repositories/reference/linux-study-clean/tools/testing/selftests/powerpc/pmu/event_code_tests/reserved_bits_mmcra_thresh_ctl_test.c
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/powerpc/pmu/event_code_tests/reserved_bits_mmcra_thresh_ctl_test.c- Extension
.c- Size
- 1020 bytes
- Lines
- 45
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
stdio.h../event.h../sampling_tests/misc.h
Detected Declarations
function Afunction main
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright 2022, Athira Rajeev, IBM Corp.
*/
#include <stdio.h>
#include "../event.h"
#include "../sampling_tests/misc.h"
/*
* Testcase for reserved bits in Monitor Mode
* Control Register A (MMCRA) thresh_ctl bits.
* For MMCRA[48:51]/[52:55]) Threshold Start/Stop,
* 0b11110000/0b00001111 is reserved.
*/
static int reserved_bits_mmcra_thresh_ctl(void)
{
struct event event;
/* Check for platform support for the test */
SKIP_IF(platform_check_for_tests());
/* Skip for Generic compat PMU */
SKIP_IF(check_for_generic_compat_pmu());
/*
* MMCRA[48:51]/[52:55]) Threshold Start/Stop
* events Selection. 0b11110000/0b00001111 is reserved.
* Expected to fail when using these reserved values.
*/
event_init(&event, 0xf0340401e0);
FAIL_IF(!event_open(&event));
event_init(&event, 0x0f340401e0);
FAIL_IF(!event_open(&event));
return 0;
}
int main(void)
{
return test_harness(reserved_bits_mmcra_thresh_ctl, "reserved_bits_mmcra_thresh_ctl");
}
Annotation
- Immediate include surface: `stdio.h`, `../event.h`, `../sampling_tests/misc.h`.
- Detected declarations: `function A`, `function main`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.