Release 4.18 tools/testing/selftests/powerpc/pmu/ebb/reg_access_test.c
  
  
  
/*
 * Copyright 2014, Michael Ellerman, IBM Corp.
 * Licensed under GPLv2.
 */
#include <stdio.h>
#include <stdlib.h>
#include "ebb.h"
/*
 * Test basic access to the EBB regs, they should be user accessible with no
 * kernel interaction required.
 */
int reg_access(void)
{
	uint64_t val, expected;
	SKIP_IF(!ebb_is_supported());
	expected = 0x8000000100000000ull;
	mtspr(SPRN_BESCR, expected);
	val = mfspr(SPRN_BESCR);
	FAIL_IF(val != expected);
	expected = 0x0000000001000000ull;
	mtspr(SPRN_EBBHR, expected);
	val = mfspr(SPRN_EBBHR);
	FAIL_IF(val != expected);
	return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Michael Ellerman | 65 | 90.28% | 1 | 50.00% | 
| Denis Kirjanov | 7 | 9.72% | 1 | 50.00% | 
| Total | 72 | 100.00% | 2 | 100.00% | 
int main(void)
{
	return test_harness(reg_access, "reg_access");
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Michael Ellerman | 15 | 100.00% | 1 | 100.00% | 
| Total | 15 | 100.00% | 1 | 100.00% | 
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Michael Ellerman | 91 | 92.86% | 1 | 50.00% | 
| Denis Kirjanov | 7 | 7.14% | 1 | 50.00% | 
| Total | 98 | 100.00% | 2 | 100.00% | 
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.