Lines Matching refs:top

572 static inline int ehea_init_bmap(struct ehea_bmap *ehea_bmap, int top, int dir)
574 if (!ehea_bmap->top[top]) {
575 ehea_bmap->top[top] =
577 if (!ehea_bmap->top[top])
580 return ehea_init_top_bmap(ehea_bmap->top[top], dir);
592 int top, dir, idx;
594 for (top = 0; top < EHEA_MAP_ENTRIES; top++) {
598 if (!ehea_bmap->top[top])
600 ehea_top = ehea_bmap->top[top];
622 ehea_bmap->top[top] = NULL;
646 int top = ehea_calc_index(i, EHEA_TOP_INDEX_SHIFT);
651 int ret = ehea_init_bmap(ehea_bmap, top, dir);
657 if (!ehea_bmap->top[top])
659 if (!ehea_bmap->top[top]->dir[dir])
665 ehea_bmap->top[top]->dir[dir]->ent[idx] = flag;
755 int top, dir;
760 for (top = 0; top < EHEA_MAP_ENTRIES; top++) {
761 if (!ehea_bmap->top[top])
765 if (!ehea_bmap->top[top]->dir[dir])
768 kfree(ehea_bmap->top[top]->dir[dir]);
771 kfree(ehea_bmap->top[top]);
782 int top, dir, idx;
789 top = (index >> EHEA_TOP_INDEX_SHIFT) & EHEA_INDEX_MASK;
790 if (!ehea_bmap->top[top])
794 if (!ehea_bmap->top[top]->dir[dir])
798 if (!ehea_bmap->top[top]->dir[dir]->ent[idx])
802 return ehea_bmap->top[top]->dir[dir]->ent[idx] | offset;
805 static inline void *ehea_calc_sectbase(int top, int dir, int idx)
809 ret |= top << EHEA_TOP_INDEX_SHIFT;
813 static u64 ehea_reg_mr_section(int top, int dir, int idx, u64 *pt,
822 void *sectbase = ehea_calc_sectbase(top, dir, idx);
844 static u64 ehea_reg_mr_sections(int top, int dir, u64 *pt,
852 if (!ehea_bmap->top[top]->dir[dir]->ent[idx])
855 hret = ehea_reg_mr_section(top, dir, idx, pt, adapter, mr);
862 static u64 ehea_reg_mr_dir_sections(int top, u64 *pt,
870 if (!ehea_bmap->top[top]->dir[dir])
873 hret = ehea_reg_mr_sections(top, dir, pt, adapter, mr);
887 unsigned long top;
913 for (top = 0; top < EHEA_MAP_ENTRIES; top++) {
914 if (!ehea_bmap->top[top])
917 hret = ehea_reg_mr_dir_sections(top, pt, adapter, mr);