-
Notifications
You must be signed in to change notification settings - Fork 2
Add a {k0,tlb}lock test case #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
b3eb49f to
452c5ef
Compare
452c5ef to
1c3a9f2
Compare
| *qtmr_cntp_ctl = 1; | ||
| } | ||
|
|
||
| void add_translation(void *va, void *pa, int cacheability); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this defined in hexagon_standalone.h?
| // Verify total interrupt counts are reasonable (greater than 10) | ||
| if (total_ints_by_tid <= 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be 10 instead of 1?
| if (total_ints_by_irq <= 1) { | ||
| printf("ERROR: Total interrupts by IRQ (%d) should be greater than 10\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
| printf("SWI instructions issued: %d\n", swi_issued_count); | ||
| printf("Expected total interrupts: %d\n", total_expected_interrupts); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we assert here?
| return 0; | ||
| } | ||
|
|
||
| static bool verify_no_overlaps(void) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! :)
| static bool verify_no_overlaps(void) { | ||
| int total_records = global_round_counter; | ||
|
|
||
| assert(total_records > 100); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: this will aways be > N_THREADS * 400, no? Is this assertion necessary?
This new test case improves upon existing tests by making stricter assertions. The test runs concurrent HW threads trying to access the lock and each recording the time stamps from when it was held, then compares the threads' results to make sure there's no intersection. Signed-off-by: Brian Cain <[email protected]>
b1d0466 to
de7ace2
Compare
This new test case improves upon existing tests by making stricter assertions. The test runs concurrent HW threads trying to access the lock and each recording the time stamps from when it was held, then compares the threads' results to make sure there's no intersection.