linux/drivers/infiniband/hw/ehca
Kyle McMartin bd50f8924c IB/ehca: Fix ilog2() compile failure
I'm getting compile failures building this driver, which I narrowed
down to the ilog2 call in ehca_get_max_hwpage_size...

    ERROR: ".____ilog2_NaN" [drivers/infiniband/hw/ehca/ib_ehca.ko]
    undefined!
    make[1]: *** [__modpost] Error 1
    make: *** [modules] Error 2

The use of shca->hca_cap_mr_pgsize is confusing the compiler, and
resulting in the __builtin_constant_p in ilog2 going insane.

I tried making it take the u32 pgsize as an argument and the expansion
of shca->_pgsize in the caller, but that failed as well.

With this patch in place, the driver compiles on my GCC 4.6.2 here.

Suggested-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Kyle McMartin <kmcmarti@redhat.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
2012-03-05 10:12:35 -08:00
..
ehca_av.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ehca_classes_pSeries.h IB/ehca: Remove superfluous bitmasks from QP control block 2009-06-03 13:25:42 -07:00
ehca_classes.h module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
ehca_cq.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ehca_eq.c IB/ehca: Remove IRQF_DISABLED, since it's a no-op 2011-10-06 09:33:04 -07:00
ehca_hca.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ehca_irq.c IB/ehca: Use kthread_create_on_node() 2012-02-25 17:47:21 -08:00
ehca_irq.h IB/ehca: Refactor sync between completions and destroy_cq using atomic_t 2007-07-09 20:12:27 -07:00
ehca_iverbs.h IB/ehca: Generate flush status CQ entries 2008-09-20 20:05:21 -07:00
ehca_main.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
ehca_mcast.c IB/ehca: Fix printk format warnings from u64 type change 2009-01-16 14:55:28 -08:00
ehca_mrmw.c IB/ehca: Fix ilog2() compile failure 2012-03-05 10:12:35 -08:00
ehca_mrmw.h IB/ehca: Tolerate dynamic memory operations before driver load 2009-06-22 22:18:51 -07:00
ehca_pd.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ehca_qes.h tree-wide: Assorted spelling fixes 2010-02-09 11:13:56 +01:00
ehca_qp.c RDMA/core: Add SRQ type field 2011-10-13 09:13:26 -07:00
ehca_reqs.c tree-wide: Assorted spelling fixes 2010-02-09 11:13:56 +01:00
ehca_sqp.c IB/ehca: Require in_wc in process_mad() 2010-02-19 11:13:39 -08:00
ehca_tools.h atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
ehca_uverbs.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
hcp_if.c IB/ehca: Catch failing ioremap() 2010-07-21 12:46:29 -07:00
hcp_if.h fix typos concerning "initiali[zs]e" 2010-06-16 18:05:05 +02:00
hcp_phyp.c IB/ehca: Catch failing ioremap() 2010-07-21 12:46:29 -07:00
hcp_phyp.h IB/ehca: Catch failing ioremap() 2010-07-21 12:46:29 -07:00
hipz_fns_core.h IB/ehca: Fix warnings issued by checkpatch.pl 2007-07-17 18:37:40 -07:00
hipz_fns.h
hipz_hw.h IB/ehca: Serialize HCA-related hCalls if necessary 2007-12-12 14:09:43 -08:00
ipz_pt_fn.c RDMA: Use vzalloc() to replace vmalloc()+memset(0) 2011-01-12 11:11:58 -08:00
ipz_pt_fn.h IB/ehca: Move extern declarations from .c files to .h files 2007-07-28 21:47:53 -07:00
Kconfig
Makefile