Skip to content
  • Claudiu Manoil's avatar
    gianfar: Cleanup and optimize struct gfar_private · b597d20d
    Claudiu Manoil authored
    
    
    Group run-time critical fields within the 1st cacheline (32B)
    followed by the tx|rx_queue reference arrays and the interrupt
    group instances (gfargrp), all cacheline aligned.
    
    This has several benefits. Firstly comes the performance benefit
    by having the members required by the driver's hot path re-grouped
    in the structure's first cache lines, whereas the unimportant
    members were pushed towards the end of the struct.
    Another benefit comes from eliminating a 24 byte memory hole that
    was rendering gfar_priv's 2nd cacheline useless. The default gcc
    layout of gfar_private leaves an implicit 24 byte hole after the
    errata (enum) member. This patch fixes it.
    
    The uchar bitfields were pushed towards the end of the struct
    as these are not run-time performance critical (used for init
    time operations). Because there is no other 2 byte member
    around to couple the uchar bitfields memeber with, we will
    have an addititnal 2 byte hole after the bitfields. This is
    unsignificant however, and it doesn't influence gfar_priv's
    size, because the whole structure is padded to be a 32B multiple.
    
    Signed-off-by: default avatarClaudiu Manoil <claudiu.manoil@freescale.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    b597d20d