userspace/libwr: use predefined constant for loops_per_msec
Our software runs only on a single kind of CPU, so we don't need to calculate
it at every boot. The way how daemons are spawned at boot changed
since the function shw_udelay_init was written. Before daemons were spawned one
after another, now they are spawned at the same time and compete during
initialization phase for the CPU.
The loop calculating loops_per_msec was interrupted by few context switches.
When using the kernel 2.6.39, the problem was not visible and usually
loops_per_msec was estimated correctly.
However, introduction new kernel 3.16 lowered probability of getting
correct results. Probably due to the different behaviour of the scheduler.
Bug was found because HAL was not able to detect SFP with
vn=ZyXEL
pn=SFP-BX1310-10-D
vs=S131151000226
Signed-off-by:
Adam Wujek <adam.wujek@cern.ch>
Please register or sign in to comment