From 0502f94c62be79d1f4ae6f53ceaefde67ef3cea2 Mon Sep 17 00:00:00 2001 From: Ralph Campbell Date: Wed, 21 Jul 2010 22:46:11 +0000 Subject: 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 Signed-off-by: Roland Dreier --- drivers/infiniband/hw/qib/qib_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/infiniband/hw/qib/qib_init.c') diff --git a/drivers/infiniband/hw/qib/qib_init.c b/drivers/infiniband/hw/qib/qib_init.c index a873dd596e8..f1d16d3a01f 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; void qib_set_ctxtcnt(struct qib_devdata *dd) { if (!qib_cfgctxts) - dd->cfgctxts = dd->ctxtcnt; + dd->cfgctxts = dd->first_user_ctxt + num_online_cpus(); else if (qib_cfgctxts < dd->num_pports) dd->cfgctxts = dd->ctxtcnt; else if (qib_cfgctxts <= dd->ctxtcnt) -- cgit v1.2.3-70-g09d2