diff options
author | Claudiu Manoil <claudiu.manoil@freescale.com> | 2013-02-14 09:00:02 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-14 22:32:24 +0400 |
commit | 369ec162b30e34c29bef8ec5ce32c40d5697fd64 (patch) | |
tree | 4fc74e93960c792f3c057a9b92ea7d066e1aacb4 /drivers/net/ethernet/cirrus | |
parent | 41a2060976ca879a68108ffb181dc429d556adce (diff) | |
download | linux-369ec162b30e34c29bef8ec5ce32c40d5697fd64.tar.xz |
gianfar: Add device ref (dev) in gfar_private
Use device pointer (dev) to simplify the code and to
avoid double indirections, especially on the hot path.
Basically, instead of accessing priv to get the ofdev
reference and then accessing the ofdev structure to
dereference the needed dev pointer, we will get the
dev pointer directly from priv.
The dev pointer is required on the hot path, see gfar_new_rxbdp
or gfar_clean_rx_ring (or xmit), and this patch makes
it available directly from priv's 1st cacheline.
This change is reflected at asm level too, taking (the hot)
gfar_new_rxbdp():
initial version -
18c0: 7c 7e 1b 78 mr r30,r3
18d0: 81 69 04 3c lwz r11,1084(r9)
18d8: 34 6b 00 10 addic. r3,r11,16
18dc: 41 82 00 08 beq- 18e4
patched version -
18d0: 80 69 04 38 lwz r3,1080(r9)
18d8: 2f 83 00 00 cmpwi cr7,r3,0
18dc: 41 9e 00 08 beq- cr7,18e4
Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cirrus')
0 files changed, 0 insertions, 0 deletions