]> git.baikalelectronics.ru Git - kernel.git/commit
IB/ipath: Convert old cpumask api into new one
authorMotohiro KOSAKI <kosaki.motohiro@jp.fujitsu.com>
Thu, 19 May 2011 01:04:42 +0000 (01:04 +0000)
committerRoland Dreier <roland@purestorage.com>
Mon, 18 Jul 2011 18:56:18 +0000 (11:56 -0700)
commit89fe8b1030771dceed5a7d4d7ed31aea54123a67
treee5ecab401a54d5f1882469fcac26cc85caded44c
parenta0b2d12fc8244e5f7412c83344ab7a26abff7360
IB/ipath: Convert old cpumask api into new one

Adapt to new api.  We plan to remove old one later.  Almost all
changes are trivial, but there is one real fix: the following code is
unsafe:

int ncpus = num_online_cpus()
for (i = 0; i < ncpus; i++) {
..
}

because 1) we don't guarantee last bit of online cpus is equal to
num_online_cpus(). some arch assign sparse cpu number.  2) cpu
hotplugging may change cpu_online_mask at same time.  we need to pin
it by get_online_cpus().

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/ipath/ipath_file_ops.c