diff options
author | Arthur She <arthur.she@linaro.org> | 2014-09-18 11:25:00 -0700 |
---|---|---|
committer | Arthur She <arthur.she@linaro.org> | 2014-09-18 11:25:00 -0700 |
commit | 10d00136a81eacb6068ad6f153e6f6983b1355c9 (patch) | |
tree | b2ac61c7572a4bbb49aa5c871fe6f3fd68436db1 /powerpc/pmu/ebb/no_handler_test.c | |
parent | 8d5e98a61f52513749e459c98bcafd060d88b79c (diff) |
Update to 0111d0f13469831266d716e3b50d580a3e25cff9 from repo http://git.linaro.org/kernel/linux-linaro-stable.git branch linux-linaro-lsk-v3.140111d0f13469831266d716e3b50d580a3e25cff9linux-linaro-stable-3.14
Diffstat (limited to 'powerpc/pmu/ebb/no_handler_test.c')
-rw-r--r-- | powerpc/pmu/ebb/no_handler_test.c | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/powerpc/pmu/ebb/no_handler_test.c b/powerpc/pmu/ebb/no_handler_test.c deleted file mode 100644 index 2f9bf8e..0000000 --- a/powerpc/pmu/ebb/no_handler_test.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2014, Michael Ellerman, IBM Corp. - * Licensed under GPLv2. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <setjmp.h> -#include <signal.h> - -#include "ebb.h" - - -/* Test that things work sanely if we have no handler */ - -static int no_handler_test(void) -{ - struct event event; - u64 val; - int i; - - event_init_named(&event, 0x1001e, "cycles"); - event_leader_ebb_init(&event); - - event.attr.exclude_kernel = 1; - event.attr.exclude_hv = 1; - event.attr.exclude_idle = 1; - - FAIL_IF(event_open(&event)); - FAIL_IF(ebb_event_enable(&event)); - - val = mfspr(SPRN_EBBHR); - FAIL_IF(val != 0); - - /* Make sure it overflows quickly */ - sample_period = 1000; - mtspr(SPRN_PMC1, pmc_sample_period(sample_period)); - - /* Spin to make sure the event has time to overflow */ - for (i = 0; i < 1000; i++) - mb(); - - dump_ebb_state(); - - /* We expect to see the PMU frozen & PMAO set */ - val = mfspr(SPRN_MMCR0); - FAIL_IF(val != 0x0000000080000080); - - event_close(&event); - - dump_ebb_state(); - - /* The real test is that we never took an EBB at 0x0 */ - - return 0; -} - -int main(void) -{ - return test_harness(no_handler_test,"no_handler_test"); -} |