Lines Matching refs:afu
407 static inline struct cxl_afu *cxl_afu_get(struct cxl_afu *afu) in cxl_afu_get() argument
410 return (get_device(&afu->dev) == NULL) ? NULL : afu; in cxl_afu_get()
413 static inline void cxl_afu_put(struct cxl_afu *afu) in cxl_afu_put() argument
415 put_device(&afu->dev); in cxl_afu_put()
429 struct cxl_afu *afu; member
497 struct cxl_afu *afu[CXL_MAX_SLICES]; member
586 static inline void __iomem *_cxl_p1n_addr(struct cxl_afu *afu, cxl_p1n_reg_t reg) in _cxl_p1n_addr() argument
589 return afu->p1n_mmio + cxl_reg_off(reg); in _cxl_p1n_addr()
592 static inline void cxl_p1n_write(struct cxl_afu *afu, cxl_p1n_reg_t reg, u64 val) in cxl_p1n_write() argument
594 if (likely(cxl_adapter_link_ok(afu->adapter))) in cxl_p1n_write()
595 out_be64(_cxl_p1n_addr(afu, reg), val); in cxl_p1n_write()
598 static inline u64 cxl_p1n_read(struct cxl_afu *afu, cxl_p1n_reg_t reg) in cxl_p1n_read() argument
600 if (likely(cxl_adapter_link_ok(afu->adapter))) in cxl_p1n_read()
601 return in_be64(_cxl_p1n_addr(afu, reg)); in cxl_p1n_read()
606 static inline void __iomem *_cxl_p2n_addr(struct cxl_afu *afu, cxl_p2n_reg_t reg) in _cxl_p2n_addr() argument
608 return afu->p2n_mmio + cxl_reg_off(reg); in _cxl_p2n_addr()
611 static inline void cxl_p2n_write(struct cxl_afu *afu, cxl_p2n_reg_t reg, u64 val) in cxl_p2n_write() argument
613 if (likely(cxl_adapter_link_ok(afu->adapter))) in cxl_p2n_write()
614 out_be64(_cxl_p2n_addr(afu, reg), val); in cxl_p2n_write()
617 static inline u64 cxl_p2n_read(struct cxl_afu *afu, cxl_p2n_reg_t reg) in cxl_p2n_read() argument
619 if (likely(cxl_adapter_link_ok(afu->adapter))) in cxl_p2n_read()
620 return in_be64(_cxl_p2n_addr(afu, reg)); in cxl_p2n_read()
625 static inline u64 cxl_afu_cr_read64(struct cxl_afu *afu, int cr, u64 off) in cxl_afu_cr_read64() argument
627 if (likely(cxl_adapter_link_ok(afu->adapter))) in cxl_afu_cr_read64()
628 return in_le64((afu)->afu_desc_mmio + (afu)->crs_offset + in cxl_afu_cr_read64()
629 ((cr) * (afu)->crs_len) + (off)); in cxl_afu_cr_read64()
634 static inline u32 cxl_afu_cr_read32(struct cxl_afu *afu, int cr, u64 off) in cxl_afu_cr_read32() argument
636 if (likely(cxl_adapter_link_ok(afu->adapter))) in cxl_afu_cr_read32()
637 return in_le32((afu)->afu_desc_mmio + (afu)->crs_offset + in cxl_afu_cr_read32()
638 ((cr) * (afu)->crs_len) + (off)); in cxl_afu_cr_read32()
642 u16 cxl_afu_cr_read16(struct cxl_afu *afu, int cr, u64 off);
643 u8 cxl_afu_cr_read8(struct cxl_afu *afu, int cr, u64 off);
645 ssize_t cxl_afu_read_err_buffer(struct cxl_afu *afu, char *buf,
659 int cxl_alloc_spa(struct cxl_afu *afu);
660 void cxl_release_spa(struct cxl_afu *afu);
665 int cxl_register_afu(struct cxl_afu *afu);
666 int cxl_chardev_d_afu_add(struct cxl_afu *afu);
667 int cxl_chardev_m_afu_add(struct cxl_afu *afu);
668 int cxl_chardev_s_afu_add(struct cxl_afu *afu);
669 void cxl_chardev_afu_remove(struct cxl_afu *afu);
671 void cxl_context_detach_all(struct cxl_afu *afu);
677 int cxl_sysfs_afu_add(struct cxl_afu *afu);
678 void cxl_sysfs_afu_remove(struct cxl_afu *afu);
679 int cxl_sysfs_afu_m_add(struct cxl_afu *afu);
680 void cxl_sysfs_afu_m_remove(struct cxl_afu *afu);
682 int cxl_afu_activate_mode(struct cxl_afu *afu, int mode);
683 int _cxl_afu_deactivate_mode(struct cxl_afu *afu, int mode);
684 int cxl_afu_deactivate_mode(struct cxl_afu *afu);
685 int cxl_afu_select_best_mode(struct cxl_afu *afu);
687 int cxl_register_psl_irq(struct cxl_afu *afu);
688 void cxl_release_psl_irq(struct cxl_afu *afu);
691 int cxl_register_serr_irq(struct cxl_afu *afu);
692 void cxl_release_serr_irq(struct cxl_afu *afu);
702 int cxl_debugfs_afu_add(struct cxl_afu *afu);
703 void cxl_debugfs_afu_remove(struct cxl_afu *afu);
714 int cxl_context_init(struct cxl_context *ctx, struct cxl_afu *afu, bool master,
740 int cxl_get_irq(struct cxl_afu *afu, struct cxl_irq_info *info);
743 int cxl_check_error(struct cxl_afu *afu);
744 int cxl_afu_slbia(struct cxl_afu *afu);
746 int cxl_afu_disable(struct cxl_afu *afu);
747 int __cxl_afu_reset(struct cxl_afu *afu);
748 int cxl_afu_check_and_enable(struct cxl_afu *afu);
749 int cxl_psl_purge(struct cxl_afu *afu);
752 int cxl_pci_vphb_add(struct cxl_afu *afu);
753 void cxl_pci_vphb_reconfigure(struct cxl_afu *afu);
754 void cxl_pci_vphb_remove(struct cxl_afu *afu);