diff options
author | Claudiu Manoil <claudiu.manoil@freescale.com> | 2013-02-14 09:00:03 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-14 22:32:24 +0400 |
commit | b597d20d59b84f0fc3735de75c3efd6e6eb4365d (patch) | |
tree | 5ebb34d5ca07986434e233b0f7ecc842e4772917 /drivers/iio/magnetometer | |
parent | 369ec162b30e34c29bef8ec5ce32c40d5697fd64 (diff) | |
download | linux-b597d20d59b84f0fc3735de75c3efd6e6eb4365d.tar.xz |
gianfar: Cleanup and optimize struct gfar_private
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: Claudiu Manoil <claudiu.manoil@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/iio/magnetometer')
0 files changed, 0 insertions, 0 deletions