Files
linux/arch/sparc/kernel
Pavel Tatashin b8a83fcb78 sparc64: access tick function from variable
In timer_64.c tick functions are access via pointer (tick_ops), every time
clock is read, there is one extra load to get to the function.

This patch optimizes it, by accessing functions pointer from value.

Current ched_clock():
sethi  %hi(0xb9b400), %g1
ldx  [ %g1 + 0x250 ], %g1  ! <tick_ops>
ldx  [ %g1 ], %g1
call  %g1
nop
sethi  %hi(0xb9b400), %g1
ldx  [ %g1 + 0x300 ], %g1  ! <timer_ticks_per_nsec_quotient>
mulx  %o0, %g1, %g1
rett  %i7 + 8
srlx  %g1, 0xa, %o0

New sched_clock():
sethi  %hi(0xb9b400), %g1
ldx  [ %g1 + 0x340 ], %g1
call  %g1
nop
sethi  %hi(0xb9b400), %g1
ldx  [ %g1 + 0x378 ], %g1
mulx  %o0, %g1, %g1
rett  %i7 + 8
srlx  %g1, 0xa, %o0

Before three loads, now two loads.

Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Reviewed-by: Steven Sistare <steven.sistare@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-06-12 15:44:02 -07:00
..
2014-05-18 19:01:30 -07:00
2014-05-18 19:01:29 -07:00
2017-06-01 09:42:46 -07:00
2016-08-07 23:55:43 -04:00
2017-03-28 18:24:00 -04:00
2016-08-07 23:55:43 -04:00
2016-11-18 11:16:59 -08:00
2016-08-07 23:55:43 -04:00
2016-07-27 22:53:17 -07:00
2017-06-06 16:41:47 -04:00
2017-06-06 13:45:29 -07:00
2015-03-19 10:17:22 -05:00
2016-12-11 18:01:51 -08:00
2017-03-27 21:51:40 -07:00
2015-03-19 18:54:49 -07:00
2013-06-13 22:12:14 +01:00
2012-03-28 18:30:03 +01:00
2017-03-27 21:51:40 -07:00
2017-06-06 13:45:29 -07:00
2017-03-27 21:51:40 -07:00
2014-07-21 22:27:56 -07:00
2017-04-23 18:28:55 -07:00
2017-04-23 18:28:55 -07:00
2017-06-06 13:45:29 -07:00
2017-03-27 21:51:40 -07:00
2017-03-27 21:51:40 -07:00