[2.6.19 PATCH 5/7] ehea: main header files
Michael Neuling
mikey at neuling.org
Sat Aug 19 04:03:41 EST 2006
> +static inline void ehea_update_sqa(struct ehea_qp *qp, u16 nr_wqes)
> +{
> + struct h_epa epa = qp->epas.kernel;
> + epa_store_acc(epa, QPTEMM_OFFSET(qpx_sqa),
> + EHEA_BMASK_SET(QPX_SQA_VALUE, nr_wqes));
> +}
> +
> +static inline void ehea_update_rq3a(struct ehea_qp *qp, u16 nr_wqes)
> +{
> + struct h_epa epa = qp->epas.kernel;
> + epa_store_acc(epa, QPTEMM_OFFSET(qpx_rq3a),
> + EHEA_BMASK_SET(QPX_RQ1A_VALUE, nr_wqes));
> +}
> +
> +static inline void ehea_update_rq2a(struct ehea_qp *qp, u16 nr_wqes)
> +{
> + struct h_epa epa = qp->epas.kernel;
> + epa_store_acc(epa, QPTEMM_OFFSET(qpx_rq2a),
> + EHEA_BMASK_SET(QPX_RQ1A_VALUE, nr_wqes));
> +}
> +
> +static inline void ehea_update_rq1a(struct ehea_qp *qp, u16 nr_wqes)
> +{
> + struct h_epa epa = qp->epas.kernel;
> + epa_store_acc(epa, QPTEMM_OFFSET(qpx_rq1a),
> + EHEA_BMASK_SET(QPX_RQ1A_VALUE, nr_wqes));
> +}
> +
> +static inline void ehea_update_feca(struct ehea_cq *cq, u32 nr_cqes)
> +{
> + struct h_epa epa = cq->epas.kernel;
> + epa_store_acc(epa, CQTEMM_OFFSET(cqx_feca),
> + EHEA_BMASK_SET(CQX_FECADDER, nr_cqes));
> +}
> +
> +static inline void ehea_reset_cq_n1(struct ehea_cq *cq)
> +{
> + struct h_epa epa = cq->epas.kernel;
> + epa_store_cq(epa, cqx_n1,
> + EHEA_BMASK_SET(CQX_N1_GENERATE_COMP_EVENT, 1));
> +}
> +
> +static inline void ehea_reset_cq_ep(struct ehea_cq *my_cq)
> +{
> + struct h_epa epa = my_cq->epas.kernel;
> + epa_store_acc(epa, CQTEMM_OFFSET(cqx_ep),
> + EHEA_BMASK_SET(CQX_EP_EVENT_PENDING, 0));
> +}
These are almost identical... I'm sure most (if not all) could be merged
into a single function or #define.
Mikey
More information about the Linuxppc-dev
mailing list