mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
powerpc: Add file forgotten in r346144
Forgot to add the changes for DELAY(), which lowers priority during the delay period. Also, mark the timebase read as volatile so newer GCC does not optimize it away, as it reportedly does currently. MFC after: 2 weeks MFC with: r346144
This commit is contained in:
parent
e5355d3319
commit
77eb50c7a3
1 changed files with 4 additions and 1 deletions
|
|
@ -303,13 +303,16 @@ decr_get_timecount(struct timecounter *tc)
|
|||
void
|
||||
DELAY(int n)
|
||||
{
|
||||
u_quad_t tb, ttb;
|
||||
volatile u_quad_t tb;
|
||||
u_quad_t ttb;
|
||||
|
||||
TSENTER();
|
||||
tb = mftb();
|
||||
ttb = tb + howmany((uint64_t)n * 1000000, ps_per_tick);
|
||||
nop_prio_vlow();
|
||||
while (tb < ttb)
|
||||
tb = mftb();
|
||||
nop_prio_medium();
|
||||
TSEXIT();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue