Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*
*** 453,463 ****
fm_ereport_post(ereport, EVCH_SLEEP);
goto out;
/* Count errors as drops. */
err: if (fmhdl)
! atomic_add_64(&fmhdl->fh_kstat.fek_erpt_dropped.value.ui64, 1);
/* Free up nvlists if normal interfaces were used to allocate memory */
out: if (ereport && (nva == NULL))
fm_nvlist_destroy(ereport, FM_NVA_FREE);
if (detector && (nva == NULL))
--- 453,463 ----
fm_ereport_post(ereport, EVCH_SLEEP);
goto out;
/* Count errors as drops. */
err: if (fmhdl)
! atomic_inc_64(&fmhdl->fh_kstat.fek_erpt_dropped.value.ui64);
/* Free up nvlists if normal interfaces were used to allocate memory */
out: if (ereport && (nva == NULL))
fm_nvlist_destroy(ereport, FM_NVA_FREE);
if (detector && (nva == NULL))
*** 1017,1027 ****
struct i_ddi_fmhdl *fmhdl = DEVI(hdlp->ah_dip)->devi_fmhdl;
i_hdlp->ahi_err->err_ena = ena;
i_hdlp->ahi_err->err_status = status;
i_hdlp->ahi_err->err_expected = flag;
! atomic_add_64(&fmhdl->fh_kstat.fek_acc_err.value.ui64, 1);
}
void
i_ddi_fm_dma_err_set(ddi_dma_handle_t handle, uint64_t ena, int status,
int flag)
--- 1017,1027 ----
struct i_ddi_fmhdl *fmhdl = DEVI(hdlp->ah_dip)->devi_fmhdl;
i_hdlp->ahi_err->err_ena = ena;
i_hdlp->ahi_err->err_status = status;
i_hdlp->ahi_err->err_expected = flag;
! atomic_inc_64(&fmhdl->fh_kstat.fek_acc_err.value.ui64);
}
void
i_ddi_fm_dma_err_set(ddi_dma_handle_t handle, uint64_t ena, int status,
int flag)
*** 1030,1040 ****
struct i_ddi_fmhdl *fmhdl = DEVI(hdlp->dmai_rdip)->devi_fmhdl;
hdlp->dmai_error.err_ena = ena;
hdlp->dmai_error.err_status = status;
hdlp->dmai_error.err_expected = flag;
! atomic_add_64(&fmhdl->fh_kstat.fek_dma_err.value.ui64, 1);
}
ddi_fmcompare_t
i_ddi_fm_acc_err_cf_get(ddi_acc_handle_t handle)
{
--- 1030,1040 ----
struct i_ddi_fmhdl *fmhdl = DEVI(hdlp->dmai_rdip)->devi_fmhdl;
hdlp->dmai_error.err_ena = ena;
hdlp->dmai_error.err_status = status;
hdlp->dmai_error.err_expected = flag;
! atomic_inc_64(&fmhdl->fh_kstat.fek_dma_err.value.ui64);
}
ddi_fmcompare_t
i_ddi_fm_acc_err_cf_get(ddi_acc_handle_t handle)
{