aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/host.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-06-07 21:50:55 -0400
committerDan Williams <dan.j.williams@intel.com>2011-07-03 07:04:51 -0400
commitac668c69709c7d927015c5cf3d9e87bf4eaaf57d (patch)
tree16a42117d260a86b8217d266ab65b25438c48e06 /drivers/scsi/isci/host.h
parent9b917987fd16d0687afe550a02f68099419f5d43 (diff)
isci: cleanup/optimize pool implementation
The circ_buf macros are ~6% faster, as measured by perf, because they take advantage of power-of-two math assumptions i.e. no test and branch for rollover. Their semantics are clearer than the hidden side effects in pool.h (like sci_pool_get() which hides an assignment). 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.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/scsi/isci/host.h b/drivers/scsi/isci/host.h
index 740350043d89..c61a9fa130b7 100644
--- a/drivers/scsi/isci/host.h
+++ b/drivers/scsi/isci/host.h
@@ -57,7 +57,6 @@
57 57
58#include "remote_device.h" 58#include "remote_device.h"
59#include "phy.h" 59#include "phy.h"
60#include "pool.h"
61#include "isci.h" 60#include "isci.h"
62#include "remote_node_table.h" 61#include "remote_node_table.h"
63#include "registers.h" 62#include "registers.h"
@@ -180,11 +179,6 @@ struct scic_sds_controller {
180 struct scic_remote_node_table available_remote_nodes; 179 struct scic_remote_node_table available_remote_nodes;
181 180
182 /** 181 /**
183 * This field is the TCi pool used to manage the task context index.
184 */
185 SCI_POOL_CREATE(tci_pool, u16, SCI_MAX_IO_REQUESTS);
186
187 /**
188 * This filed is the struct scic_power_control data used to controll when direct 182 * This filed is the struct scic_power_control data used to controll when direct
189 * attached devices can consume power. 183 * attached devices can consume power.
190 */ 184 */
@@ -310,6 +304,10 @@ struct scic_sds_controller {
310 304
311struct isci_host { 305struct isci_host {
312 struct scic_sds_controller sci; 306 struct scic_sds_controller sci;
307 u16 tci_head;
308 u16 tci_tail;
309 u16 tci_pool[SCI_MAX_IO_REQUESTS];
310
313 union scic_oem_parameters oem_parameters; 311 union scic_oem_parameters oem_parameters;
314 312
315 int id; /* unique within a given pci device */ 313 int id; /* unique within a given pci device */
@@ -423,8 +421,6 @@ enum scic_sds_controller_states {
423 SCIC_FAILED, 421 SCIC_FAILED,
424}; 422};
425 423
426
427
428/** 424/**
429 * struct isci_pci_info - This class represents the pci function containing the 425 * struct isci_pci_info - This class represents the pci function containing the
430 * controllers. Depending on PCI SKU, there could be up to 2 controllers in 426 * controllers. Depending on PCI SKU, there could be up to 2 controllers in