| f5d45dc9 | 21-Mar-2016 |
Stafford Horne <[email protected]> |
openrisc: Add optimized memcpy routine
The generic memcpy routine provided in kernel does only byte copies. Using word copies we can lower boot time and cycles spend in memcpy quite significantly.
openrisc: Add optimized memcpy routine
The generic memcpy routine provided in kernel does only byte copies. Using word copies we can lower boot time and cycles spend in memcpy quite significantly.
Booting on my de0 nano I see boot times go from 7.2 to 5.6 seconds. The avg cycles in memcpy during boot go from 6467 to 1887.
I tested several algorithms (see code in previous patch mails)
The implementations I tested and avg cycles: - Word Copies + Loop Unrolls + Non Aligned 1882 - Word Copies + Loop Unrolls 1887 - Word Copies 2441 - Byte Copies + Loop Unrolls 6467 - Byte Copies 7600
In the end I ended up going with Word Copies + Loop Unrolls as it provides best tradeoff between simplicity and boot speedups.
Signed-off-by: Stafford Horne <[email protected]>
show more ...
|
| 807607f7 | 07-Aug-2012 |
Will Deacon <[email protected]> |
openrisc: delay: fix handling of counter overflow
If the counter overflows during a __delay operation, we will exit the loop prematurely. For example, calling __delay(0x100) with the counter at 0xff
openrisc: delay: fix handling of counter overflow
If the counter overflows during a __delay operation, we will exit the loop prematurely. For example, calling __delay(0x100) with the counter at 0xffffff00 gives us a target of 0x0. The unsigned comparison in the while loop will likely be false on the first iteration (if the counter is now anything other than 0) and we will return early.
This patch fixes the problem by comparing deltas in the loop rather than absolute values.
Cc: Jon Masters <[email protected]> Signed-off-by: Will Deacon <[email protected]> Signed-off-by: Jonas Bonn <[email protected]>
show more ...
|