--- zzzz-none-000/linux-2.6.19.2/drivers/infiniband/hw/ehca/ehca_main.c 2007-01-10 19:10:37.000000000 +0000 +++ davinci-8020-5505/linux-2.6.19.2/drivers/infiniband/hw/ehca/ehca_main.c 2007-01-11 07:38:19.000000000 +0000 @@ -40,9 +40,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifdef CONFIG_PPC_64K_PAGES -#include -#endif #include "ehca_classes.h" #include "ehca_iverbs.h" #include "ehca_mrmw.h" @@ -52,7 +49,7 @@ MODULE_LICENSE("Dual BSD/GPL"); MODULE_AUTHOR("Christoph Raisch "); MODULE_DESCRIPTION("IBM eServer HCA InfiniBand Device Driver"); -MODULE_VERSION("SVNEHCA_0018"); +MODULE_VERSION("SVNEHCA_0017"); int ehca_open_aqp1 = 0; int ehca_debug_level = 0; @@ -97,31 +94,11 @@ DEFINE_IDR(ehca_qp_idr); DEFINE_IDR(ehca_cq_idr); - static struct list_head shca_list; /* list of all registered ehcas */ static spinlock_t shca_list_lock; static struct timer_list poll_eqs_timer; -#ifdef CONFIG_PPC_64K_PAGES -static struct kmem_cache *ctblk_cache = NULL; - -void *ehca_alloc_fw_ctrlblock(void) -{ - void *ret = kmem_cache_zalloc(ctblk_cache, SLAB_KERNEL); - if (!ret) - ehca_gen_err("Out of memory for ctblk"); - return ret; -} - -void ehca_free_fw_ctrlblock(void *ptr) -{ - if (ptr) - kmem_cache_free(ctblk_cache, ptr); - -} -#endif - static int ehca_create_slab_caches(void) { int ret; @@ -156,17 +133,6 @@ goto create_slab_caches5; } -#ifdef CONFIG_PPC_64K_PAGES - ctblk_cache = kmem_cache_create("ehca_cache_ctblk", - EHCA_PAGESIZE, H_CB_ALIGNMENT, - SLAB_HWCACHE_ALIGN, - NULL, NULL); - if (!ctblk_cache) { - ehca_gen_err("Cannot create ctblk SLAB cache."); - ehca_cleanup_mrmw_cache(); - goto create_slab_caches5; - } -#endif return 0; create_slab_caches5: @@ -191,10 +157,6 @@ ehca_cleanup_qp_cache(); ehca_cleanup_cq_cache(); ehca_cleanup_pd_cache(); -#ifdef CONFIG_PPC_64K_PAGES - if (ctblk_cache) - kmem_cache_destroy(ctblk_cache); -#endif } #define EHCA_HCAAVER EHCA_BMASK_IBM(32,39) @@ -206,7 +168,7 @@ u64 h_ret; struct hipz_query_hca *rblock; - rblock = ehca_alloc_fw_ctrlblock(); + rblock = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); if (!rblock) { ehca_gen_err("Cannot allocate rblock memory."); return -ENOMEM; @@ -249,7 +211,7 @@ shca->sport[1].rate = IB_RATE_30_GBPS; num_ports1: - ehca_free_fw_ctrlblock(rblock); + kfree(rblock); return ret; } @@ -258,7 +220,7 @@ int ret = 0; struct hipz_query_hca *rblock; - rblock = ehca_alloc_fw_ctrlblock(); + rblock = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); if (!rblock) { ehca_err(&shca->ib_device, "Can't allocate rblock memory."); return -ENOMEM; @@ -273,7 +235,7 @@ memcpy(&shca->ib_device.node_guid, &rblock->node_guid, sizeof(u64)); init_node_guid1: - ehca_free_fw_ctrlblock(rblock); + kfree(rblock); return ret; } @@ -469,7 +431,7 @@ \ shca = dev->driver_data; \ \ - rblock = ehca_alloc_fw_ctrlblock(); \ + rblock = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); \ if (!rblock) { \ dev_err(dev, "Can't allocate rblock memory."); \ return 0; \ @@ -477,12 +439,12 @@ \ if (hipz_h_query_hca(shca->ipz_hca_handle, rblock) != H_SUCCESS) { \ dev_err(dev, "Can't query device properties"); \ - ehca_free_fw_ctrlblock(rblock); \ + kfree(rblock); \ return 0; \ } \ \ data = rblock->name; \ - ehca_free_fw_ctrlblock(rblock); \ + kfree(rblock); \ \ if ((strcmp(#name, "num_ports") == 0) && (ehca_nr_ports == 1)) \ return snprintf(buf, 256, "1\n"); \ @@ -790,7 +752,7 @@ int ret; printk(KERN_INFO "eHCA Infiniband Device Driver " - "(Rel.: SVNEHCA_0018)\n"); + "(Rel.: SVNEHCA_0017)\n"); idr_init(&ehca_qp_idr); idr_init(&ehca_cq_idr); spin_lock_init(&ehca_qp_idr_lock);