diff options
author | Ralph Campbell <ralph.campbell@qlogic.com> | 2010-07-21 18:46:11 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2010-08-03 16:59:05 -0400 |
commit | 0502f94c62be79d1f4ae6f53ceaefde67ef3cea2 (patch) | |
tree | 93816ecd19b774b944a9d09ef6582a02d4b447ee /drivers/infiniband/hw | |
parent | bdf8edcb5732df554ef53096092e94d22ab5ffc9 (diff) |
IB/qib: Set cfgctxts to number of CPUs by default
Up to now, we have set the number of available user contexts based on
the number of hardware contexts which is set according to the number
of available CPUs. This was fine since most CPUs had a power of two
number of cores and the chip supported 4, 8, or 16 user contexts. Now
that some systems have 12 cores, the default isn't optimal and should
be set to 12 even though 16 hardware contexts need to be enabled.
Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/qib/qib_iba7322.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/hw/qib/qib_init.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c index fc14ef8e5597..584d443b5335 100644 --- a/drivers/infiniband/hw/qib/qib_iba7322.c +++ b/drivers/infiniband/hw/qib/qib_iba7322.c | |||
@@ -5864,7 +5864,7 @@ static void write_7322_initregs(struct qib_devdata *dd) | |||
5864 | * Doesn't clear any of the error bits that might be set. | 5864 | * Doesn't clear any of the error bits that might be set. |
5865 | */ | 5865 | */ |
5866 | val = TIDFLOW_ERRBITS; /* these are W1C */ | 5866 | val = TIDFLOW_ERRBITS; /* these are W1C */ |
5867 | for (i = 0; i < dd->ctxtcnt; i++) { | 5867 | for (i = 0; i < dd->cfgctxts; i++) { |
5868 | int flow; | 5868 | int flow; |
5869 | for (flow = 0; flow < NUM_TIDFLOWS_CTXT; flow++) | 5869 | for (flow = 0; flow < NUM_TIDFLOWS_CTXT; flow++) |
5870 | qib_write_ureg(dd, ur_rcvflowtable+flow, val, i); | 5870 | qib_write_ureg(dd, ur_rcvflowtable+flow, val, i); |
diff --git a/drivers/infiniband/hw/qib/qib_init.c b/drivers/infiniband/hw/qib/qib_init.c index a873dd596e81..f1d16d3a01f6 100644 --- a/drivers/infiniband/hw/qib/qib_init.c +++ b/drivers/infiniband/hw/qib/qib_init.c | |||
@@ -93,7 +93,7 @@ unsigned long *qib_cpulist; | |||
93 | void qib_set_ctxtcnt(struct qib_devdata *dd) | 93 | void qib_set_ctxtcnt(struct qib_devdata *dd) |
94 | { | 94 | { |
95 | if (!qib_cfgctxts) | 95 | if (!qib_cfgctxts) |
96 | dd->cfgctxts = dd->ctxtcnt; | 96 | dd->cfgctxts = dd->first_user_ctxt + num_online_cpus(); |
97 | else if (qib_cfgctxts < dd->num_pports) | 97 | else if (qib_cfgctxts < dd->num_pports) |
98 | dd->cfgctxts = dd->ctxtcnt; | 98 | dd->cfgctxts = dd->ctxtcnt; |
99 | else if (qib_cfgctxts <= dd->ctxtcnt) | 99 | else if (qib_cfgctxts <= dd->ctxtcnt) |