/* * Copyright 2014, Michael Ellerman, IBM Corp. * Licensed under GPLv2. */ #include <stdio.h> #include <stdlib.h> #include "event.h" #include "utils.h" #define MALLOC_SIZE (0x10000 * 10) /* Ought to be enough .. */ /* * Tests that the L3 bank handling is correct. We fixed it in commit e9aaac1. */ static int l3_bank_test(void) { struct event event; char *p; int i; p = malloc(MALLOC_SIZE); FAIL_IF(!p); event_init(&event, 0x84918F); FAIL_IF(event_open(&event)); for (i = 0; i < MALLOC_SIZE; i += 0x10000) p[i] = i; event_read(&event); event_report(&event); FAIL_IF(event.result.running == 0); FAIL_IF(event.result.enabled == 0); event_close(&event); free(p); return 0; } int main(void) { return test_harness(l3_bank_test, "l3_bank_test"); } cgit.cgi/'>index</a> : <a href='/cgit.cgi/linux/net-next.git/'>net-next.git</a></td><td class='form'><form method='get'> <input type='hidden' name='id' value='a49e6f584e29785f9e5eb8dd31435746818dd5c4'/><select name='h' onchange='this.form.submit();'> <option value='emaclite-cleanup'>emaclite-cleanup</option> <option value='master' selected='selected'>master</option> <option value='nds-private-remove'>nds-private-remove</option> <option value='packet-loop-back'>packet-loop-back</option> <option value='packet-rx-pump-back'>packet-rx-pump-back</option> </select> <input type='submit' value='switch'/></form></td></tr> <tr><td class='sub'>net-next plumbings</td><td class='sub right'>Tobias Klauser</td></tr></table> <table class='tabs'><tr><td> <a href='/cgit.cgi/linux/net-next.git/'>summary</a><a href='/cgit.cgi/linux/net-next.git/refs/?id=a49e6f584e29785f9e5eb8dd31435746818dd5c4'>refs</a><a class='active' href='/cgit.cgi/linux/net-next.git/log/tools/testing/selftests/rcutorture/configs/rcu/TASKS03.boot'>log</a><a href='/cgit.cgi/linux/net-next.git/tree/tools/testing/selftests/rcutorture/configs/rcu/TASKS03.boot?id=a49e6f584e29785f9e5eb8dd31435746818dd5c4'>tree</a><a href='/cgit.cgi/linux/net-next.git/commit/tools/testing/selftests/rcutorture/configs/rcu/TASKS03.boot?id=a49e6f584e29785f9e5eb8dd31435746818dd5c4'>commit</a><a href='/cgit.cgi/linux/net-next.git/diff/tools/testing/selftests/rcutorture/configs/rcu/TASKS03.boot?id=a49e6f584e29785f9e5eb8dd31435746818dd5c4'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/tools/testing/selftests/rcutorture/configs/rcu/TASKS03.boot'> <input type='hidden' name='id' value='a49e6f584e29785f9e5eb8dd31435746818dd5c4'/><select name='qt'> <option value='grep'>log msg</option> <option value='author'>author</option> <option value='committer'>committer</option> <option value='range'>range</option> </select> <input class='txt' type='search' size='10' name='q' value=''/> <input type='submit' value='search'/> </form> </td></tr></table> <div class='path'>path: <a href='/cgit.cgi/linux/net-next.git/log/?id=a49e6f584e29785f9e5eb8dd31435746818dd5c4'>root</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools?id=a49e6f584e29785f9e5eb8dd31435746818dd5c4'>tools</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools/testing?id=a49e6f584e29785f9e5eb8dd31435746818dd5c4'>testing</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools/testing/selftests?id=a49e6f584e29785f9e5eb8dd31435746818dd5c4'>selftests</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools/testing/selftests/rcutorture?id=a49e6f584e29785f9e5eb8dd31435746818dd5c4'>rcutorture</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools/testing/selftests/rcutorture/configs?id=a49e6f584e29785f9e5eb8dd31435746818dd5c4'>configs</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools/testing/selftests/rcutorture/configs/rcu?id=a49e6f584e29785f9e5eb8dd31435746818dd5c4'>rcu</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools/testing/selftests/rcutorture/configs/rcu/TASKS03.boot?id=a49e6f584e29785f9e5eb8dd31435746818dd5c4'>TASKS03.boot</a></div><div class='content'><table class='list nowrap'><tr class='nohover'><th class='left'>Age</th><th class='left'>Commit message (<a href='/cgit.cgi/linux/net-next.git/log/tools/testing/selftests/rcutorture/configs/rcu/TASKS03.boot?id=a49e6f584e29785f9e5eb8dd31435746818dd5c4&showmsg=1'>Expand</a>)</th><th class='left'>Author</th><th class='left'>Files</th><th class='left'>Lines</th></tr>