Lines Matching refs:sg
202 static inline dma_addr_t qm_sg_addr(const struct qm_sg_entry *sg) in qm_sg_addr() argument
204 return be64_to_cpu(sg->data) & 0xffffffffffLLU; in qm_sg_addr()
207 static inline u64 qm_sg_entry_get64(const struct qm_sg_entry *sg) in qm_sg_entry_get64() argument
209 return be64_to_cpu(sg->data) & 0xffffffffffLLU; in qm_sg_entry_get64()
212 static inline void qm_sg_entry_set64(struct qm_sg_entry *sg, u64 addr) in qm_sg_entry_set64() argument
214 sg->addr_hi = upper_32_bits(addr); in qm_sg_entry_set64()
215 sg->addr_lo = cpu_to_be32(lower_32_bits(addr)); in qm_sg_entry_set64()
218 static inline bool qm_sg_entry_is_final(const struct qm_sg_entry *sg) in qm_sg_entry_is_final() argument
220 return be32_to_cpu(sg->cfg) & QM_SG_FIN; in qm_sg_entry_is_final()
223 static inline bool qm_sg_entry_is_ext(const struct qm_sg_entry *sg) in qm_sg_entry_is_ext() argument
225 return be32_to_cpu(sg->cfg) & QM_SG_EXT; in qm_sg_entry_is_ext()
228 static inline int qm_sg_entry_get_len(const struct qm_sg_entry *sg) in qm_sg_entry_get_len() argument
230 return be32_to_cpu(sg->cfg) & QM_SG_LEN_MASK; in qm_sg_entry_get_len()
233 static inline void qm_sg_entry_set_len(struct qm_sg_entry *sg, int len) in qm_sg_entry_set_len() argument
235 sg->cfg = cpu_to_be32(len & QM_SG_LEN_MASK); in qm_sg_entry_set_len()
238 static inline void qm_sg_entry_set_f(struct qm_sg_entry *sg, int len) in qm_sg_entry_set_f() argument
240 sg->cfg = cpu_to_be32(QM_SG_FIN | (len & QM_SG_LEN_MASK)); in qm_sg_entry_set_f()
243 static inline int qm_sg_entry_get_off(const struct qm_sg_entry *sg) in qm_sg_entry_get_off() argument
245 return be32_to_cpu(sg->offset) & QM_SG_OFF_MASK; in qm_sg_entry_get_off()