aboutsummaryrefslogtreecommitdiff
path: root/net/switchdev/switchdev.c
diff options
context:
space:
mode:
authorDenys Vlasenko <[email protected]>2016-04-20 17:45:56 +0200
committerJeff Kirsher <[email protected]>2016-05-13 14:56:35 -0700
commitab507c9a54ce3580e6a3829c9f4c24a13c32cbac (patch)
tree1f9da7034ffee2c96ef95b9a5dd1cf045c1da412 /net/switchdev/switchdev.c
parenta07fd74d5ea9c45a5c6e41f7cb4b997cf40d50f3 (diff)
e1000e: e1000e_cyclecounter_read(): do overflow check only if needed
SYSTIMH:SYSTIML registers are incremented by 24-bit value TIMINCA[23..0] er32(SYSTIML) are probably moderately expensive (they are pci bus reads). Can we avoid one of them? Yes, we can. If the SYSTIML value we see is smaller than 0xff000000, the overflow into SYSTIMH would require at least two increments. We do two reads, er32(SYSTIML) and er32(SYSTIMH), in this order. Even if one increment happens between them, the overflow into SYSTIMH is impossible, and we can avoid doing another er32(SYSTIML) read and overflow check. Signed-off-by: Denys Vlasenko <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions