j * 4, be32_to_cpu(((u32 *) av)[j])); 
j * 4, be32_to_cpu(((__be32 *) av)[j])); 
int mthca_create_ah(struct mthca_dev *dev,		    struct mthca_pd *pd,		    struct ib_ah_attr *ah_attr,		    struct mthca_ah *ah){	u32 index = -1;	struct mthca_av *av = NULL;	ah->type = MTHCA_AH_PCI_POOL;	if (mthca_is_memfree(dev)) {		ah->av   = kmalloc(sizeof *ah->av, GFP_ATOMIC);		if (!ah->av)			return -ENOMEM;		ah->type = MTHCA_AH_KMALLOC;		av       = ah->av;	} else if (!atomic_read(&pd->sqp_count) &&		 !(dev->mthca_flags & MTHCA_FLAG_DDR_HIDDEN)) {		index = mthca_alloc(&dev->av_table.alloc);		/* fall back to allocate in host memory */		if (index == -1)			goto on_hca_fail;		av = kmalloc(sizeof *av, GFP_ATOMIC);		if (!av)			goto on_hca_fail;		ah->type = MTHCA_AH_ON_HCA;		ah->avdma  = dev->av_table.ddr_av_base +			index * MTHCA_AV_SIZE;	}on_hca_fail:	if (ah->type == MTHCA_AH_PCI_POOL) {		ah->av = pci_pool_alloc(dev->av_table.pool,					SLAB_ATOMIC, &ah->avdma);		if (!ah->av)			return -ENOMEM;		av = ah->av;	}	ah->key = pd->ntmr.ibmr.lkey;	memset(av, 0, MTHCA_AV_SIZE);	av->port_pd = cpu_to_be32(pd->pd_num | (ah_attr->port_num << 24));	av->g_slid  = ah_attr->src_path_bits;	av->dlid    = cpu_to_be16(ah_attr->dlid);	av->msg_sr  = (3 << 4) | /* 2K message */		ah_attr->static_rate;	av->sl_tclass_flowlabel = cpu_to_be32(ah_attr->sl << 28);	if (ah_attr->ah_flags & IB_AH_GRH) {		av->g_slid |= 0x80;		av->gid_index = (ah_attr->port_num - 1) * dev->limits.gid_table_len +			ah_attr->grh.sgid_index;		av->hop_limit = ah_attr->grh.hop_limit;		av->sl_tclass_flowlabel |=			cpu_to_be32((ah_attr->grh.traffic_class << 20) |				    ah_attr->grh.flow_label);		memcpy(av->dgid, ah_attr->grh.dgid.raw, 16);	} else {		/* Arbel workaround -- low byte of GID must be 2 */		av->dgid[3] = cpu_to_be32(2);	}	if (0) {		int j;		mthca_dbg(dev, "Created UDAV at %p/%08lx:\n",			  av, (unsigned long) ah->avdma);		for (j = 0; j < 8; ++j)			printk(KERN_DEBUG "  [%2x] %08x\n",			       j * 4, be32_to_cpu(((u32 *) av)[j]));	}	if (ah->type == MTHCA_AH_ON_HCA) {		memcpy_toio(dev->av_table.av_map + index * MTHCA_AV_SIZE,			    av, MTHCA_AV_SIZE);		kfree(av);	}	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/97f52eb438be7caebe026421545619d8a0c1398a/mthca_av.c/clean/drivers/infiniband/hw/mthca/mthca_av.c