Lines Matching refs:bte

46 static inline void bte_start_transfer(struct bteinfo_s *bte, u64 len, u64 mode)  in bte_start_transfer()  argument
49 BTE_CTRL_STORE(bte, (IBLS_BUSY | ((len) | (mode) << 24))); in bte_start_transfer()
51 BTE_LNSTAT_STORE(bte, len); in bte_start_transfer()
52 BTE_CTRL_STORE(bte, mode); in bte_start_transfer()
85 struct bteinfo_s *bte; in bte_copy() local
138 bte = bte_if_on_node(nasid_to_try[nasid_index],bte_if_index); in bte_copy()
140 if (bte == NULL) { in bte_copy()
145 if (spin_trylock(&bte->spinlock)) { in bte_copy()
146 if (!(*bte->most_rcnt_na & BTE_WORD_AVAILABLE) || in bte_copy()
147 (BTE_LNSTAT_LOAD(bte) & BTE_ACTIVE)) { in bte_copy()
149 spin_unlock(&bte->spinlock); in bte_copy()
164 bte = NULL; in bte_copy()
167 if (bte != NULL) { in bte_copy()
180 bte->most_rcnt_na = &bte->notify; in bte_copy()
182 bte->most_rcnt_na = notification; in bte_copy()
189 *bte->most_rcnt_na = BTE_WORD_BUSY; in bte_copy()
190 notif_phys_addr = (u64)bte->most_rcnt_na; in bte_copy()
194 BTE_SRC_STORE(bte, src); in bte_copy()
196 BTE_DEST_STORE(bte, dest); in bte_copy()
200 BTE_NOTIF_STORE(bte, notif_phys_addr); in bte_copy()
204 bte_start_transfer(bte, transfer_size, BTE_VALID_MODE(mode)); in bte_copy()
208 spin_unlock_irqrestore(&bte->spinlock, irq_flags); in bte_copy()
214 while ((transfer_stat = *bte->most_rcnt_na) == BTE_WORD_BUSY) { in bte_copy()
218 NASID_GET(bte->bte_base_addr), bte->bte_num, in bte_copy()
219 BTE_LNSTAT_LOAD(bte), *bte->most_rcnt_na) ); in bte_copy()
220 bte->bte_error_count++; in bte_copy()
221 bte->bh_error = IBLS_ERROR; in bte_copy()
222 bte_error_handler((unsigned long)NODEPDA(bte->bte_cnode)); in bte_copy()
223 *bte->most_rcnt_na = BTE_WORD_AVAILABLE; in bte_copy()
229 BTE_LNSTAT_LOAD(bte), *bte->most_rcnt_na)); in bte_copy()
236 *bte->most_rcnt_na = BTE_WORD_AVAILABLE; in bte_copy()
239 BTE_LNSTAT_LOAD(bte), *bte->most_rcnt_na)); in bte_copy()