IB/ehca: Assure 4K alignment for firmware control blocks
authorHoang-Nam Nguyen <hnguyen@de.ibm.com>
Mon, 6 Nov 2006 23:56:39 +0000 (00:56 +0100)
committerRoland Dreier <rolandd@cisco.com>
Thu, 9 Nov 2006 20:41:57 +0000 (12:41 -0800)
commit7e28db5d8ff63b1cabc221c5cb84a5f45752f1c2
tree4271d9afb545ab7e522a3a6e95c67a171f29cf84
parent40eb006685387b2861bd7196be0ab7144c5d5b71
IB/ehca: Assure 4K alignment for firmware control blocks

Assure 4K alignment for firmware control blocks in 64K page mode,
because kzalloc()'s result address might not be 4K aligned if 64K
pages are enabled. Thus, we introduce wrappers called
ehca_{alloc,free}_fw_ctrlblock(), which use a slab cache for objects
with 4K length and 4K alignment in order to alloc/free firmware
control blocks in 64K page mode. In 4K page mode those wrappers just
are defines of get_zeroed_page() and free_page().

Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ehca/ehca_hca.c
drivers/infiniband/hw/ehca/ehca_irq.c
drivers/infiniband/hw/ehca/ehca_iverbs.h
drivers/infiniband/hw/ehca/ehca_main.c
drivers/infiniband/hw/ehca/ehca_mrmw.c
drivers/infiniband/hw/ehca/ehca_qp.c