From ac668c69709c7d927015c5cf3d9e87bf4eaaf57d Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 7 Jun 2011 18:50:55 -0700 Subject: 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 --- drivers/scsi/isci/host.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'drivers/scsi/isci/host.h') diff --git a/drivers/scsi/isci/host.h b/drivers/scsi/isci/host.h index 74035004..c61a9fa 100644 --- a/drivers/scsi/isci/host.h +++ b/drivers/scsi/isci/host.h @@ -57,7 +57,6 @@ #include "remote_device.h" #include "phy.h" -#include "pool.h" #include "isci.h" #include "remote_node_table.h" #include "registers.h" @@ -180,11 +179,6 @@ struct scic_sds_controller { struct scic_remote_node_table available_remote_nodes; /** - * This field is the TCi pool used to manage the task context index. - */ - SCI_POOL_CREATE(tci_pool, u16, SCI_MAX_IO_REQUESTS); - - /** * This filed is the struct scic_power_control data used to controll when direct * attached devices can consume power. */ @@ -310,6 +304,10 @@ struct scic_sds_controller { struct isci_host { struct scic_sds_controller sci; + u16 tci_head; + u16 tci_tail; + u16 tci_pool[SCI_MAX_IO_REQUESTS]; + union scic_oem_parameters oem_parameters; int id; /* unique within a given pci device */ @@ -423,8 +421,6 @@ enum scic_sds_controller_states { SCIC_FAILED, }; - - /** * struct isci_pci_info - This class represents the pci function containing the * controllers. Depending on PCI SKU, there could be up to 2 controllers in -- cgit v1.1