summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/isci.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-06-08 03:50:55 +0200
committerDan Williams <dan.j.williams@intel.com>2011-07-03 13:04:51 +0200
commitac668c69709c7d927015c5cf3d9e87bf4eaaf57d (patch)
tree16a42117d260a86b8217d266ab65b25438c48e06 /drivers/scsi/isci/isci.h
parentisci: Disable link layer hang detection (diff)
downloadlinux-ac668c69709c7d927015c5cf3d9e87bf4eaaf57d.tar.xz
linux-ac668c69709c7d927015c5cf3d9e87bf4eaaf57d.zip
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/isci.h')
-rw-r--r--drivers/scsi/isci/isci.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/isci/isci.h b/drivers/scsi/isci/isci.h
index 714ed926171b..84ba533ca51e 100644
--- a/drivers/scsi/isci/isci.h
+++ b/drivers/scsi/isci/isci.h
@@ -112,6 +112,7 @@ static inline void check_sizes(void)
BUILD_BUG_ON_NOT_POWER_OF_2(SCU_MAX_UNSOLICITED_FRAMES);
BUILD_BUG_ON_NOT_POWER_OF_2(SCU_MAX_COMPLETION_QUEUE_ENTRIES);
BUILD_BUG_ON(SCU_MAX_UNSOLICITED_FRAMES > SCU_ABSOLUTE_MAX_UNSOLICITED_FRAMES);
+ BUILD_BUG_ON_NOT_POWER_OF_2(SCI_MAX_IO_REQUESTS);
}
/**