• Home
  • Raw
  • Download

Lines Matching refs:top

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