/* * Copyright 2014, Michael Ellerman, IBM Corp. * Licensed under GPLv2. */ #include #include #include "ebb.h" /* * Basic test that counts user cycles and takes EBBs. */ int cycles(void) { struct event event; SKIP_IF(!ebb_is_supported()); 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)); ebb_enable_pmc_counting(1); setup_ebb_handler(standard_ebb_callee); ebb_global_enable(); FAIL_IF(ebb_event_enable(&event)); mtspr(SPRN_PMC1, pmc_sample_period(sample_period)); while (ebb_state.stats.ebb_count < 10) { FAIL_IF(core_busy_loop()); FAIL_IF(ebb_check_mmcr0()); } ebb_global_disable(); ebb_freeze_pmcs(); count_pmc(1, sample_period); dump_ebb_state(); event_close(&event); FAIL_IF(ebb_state.stats.ebb_count == 0); FAIL_IF(!ebb_check_count(1, sample_period, 100)); return 0; } int main(void) { return test_harness(cycles, "cycles"); } 44'/> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-02-04 10:38:09 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-02-04 10:38:09 -0800
commit252bf9f4c43fd58f96587a97866cb7cc980e7544 (patch)
treeaeff11933ae538381392f91ec10da99e49c61c91 /drivers/usb/misc/usbsevseg.c
parent8fcdcc42a5268f298ac91962a5e816294435006f (diff)
parentb17c1bba9cec1727451b906d9a0c209774624873 (diff)
Merge tag 'staging-4.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging/IIO fixes from Greg KH: "Here are a few small IIO and one staging driver fix for 4.10-rc7. They fix some reported issues with the drivers. All of them have been in linux-next for a week or so with no reported issues" * tag 'staging-4.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: greybus: timesync: validate platform state callback iio: dht11: Use usleep_range instead of msleep for start signal iio: adc: palmas_gpadc: retrieve a valid iio_dev in suspend/resume iio: health: max30100: fixed parenthesis around FIFO count check iio: health: afe4404: retrieve a valid iio_dev in suspend/resume iio: health: afe4403: retrieve a valid iio_dev in suspend/resume
Diffstat (limited to 'drivers/usb/misc/usbsevseg.c')