diff options
author | Dan Williams <dan.j.williams@intel.com> | 2011-06-09 16:04:28 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 04:04:51 -0700 |
commit | 994a9303d33f8238d57f58c26067b6d4ac9af222 (patch) | |
tree | 8a7a1f680761ee3cfb2a258c2784194eea69b703 /drivers/scsi/isci/host.h | |
parent | dd047c8e2bca22856050dbe0378a37cf44eecc97 (diff) | |
download | talos-obmc-linux-994a9303d33f8238d57f58c26067b6d4ac9af222.tar.gz talos-obmc-linux-994a9303d33f8238d57f58c26067b6d4ac9af222.zip |
isci: cleanup/optimize queue increment macros
Every single i/o or event completion incurs a test and branch to see if
the cycle bit changed. For power-of-2 queue sizes the cycle bit can be
read directly from the rollover of the queue pointer.
Likely premature optimization, but the hidden if() and hidden
assignments / side-effects in the macros were already asking to be
cleaned up.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/host.h')
-rw-r--r-- | drivers/scsi/isci/host.h | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/scsi/isci/host.h b/drivers/scsi/isci/host.h index 7d17ab80f1a9..94fd54dc9f01 100644 --- a/drivers/scsi/isci/host.h +++ b/drivers/scsi/isci/host.h @@ -524,22 +524,6 @@ static inline struct isci_host *scic_to_ihost(struct scic_sds_controller *scic) } /** - * INCREMENT_QUEUE_GET() - - * - * This macro will increment the specified index to and if the index wraps to 0 - * it will toggel the cycle bit. - */ -#define INCREMENT_QUEUE_GET(index, cycle, entry_count, bit_toggle) \ - { \ - if ((index) + 1 == entry_count) { \ - (index) = 0; \ - (cycle) = (cycle) ^ (bit_toggle); \ - } else { \ - index = index + 1; \ - } \ - } - -/** * scic_sds_controller_get_protocol_engine_group() - * * This macro returns the protocol engine group for this controller object. |