int spapr_vio_check_tces(VIOsPAPRDevice *dev, target_ulong ioba,

                         target_ulong len, enum VIOsPAPR_TCEAccess access)

{

    int start, end, i;



    start = ioba >> SPAPR_VIO_TCE_PAGE_SHIFT;

    end = (ioba + len - 1) >> SPAPR_VIO_TCE_PAGE_SHIFT;



    for (i = start; i <= end; i++) {

        if ((dev->rtce_table[i].tce & access) != access) {

#ifdef DEBUG_TCE

            fprintf(stderr, "FAIL on %d\n", i);

#endif

            return -1;

        }

    }



    return 0;

}

int spapr_vio_check_tces(VIOsPAPRDevice *dev, target_ulong ioba,

                         target_ulong len, enum VIOsPAPR_TCEAccess access)

{

    int start, end, i;



    start = ioba >> SPAPR_VIO_TCE_PAGE_SHIFT;

    end = (ioba + len - 1) >> SPAPR_VIO_TCE_PAGE_SHIFT;



    for (i = start; i <= end; i++) {

        if ((dev->rtce_table[i].tce & access) != access) {

#ifdef DEBUG_TCE

            fprintf(stderr, "FAIL on %d\n", i);

#endif

            return -1;

        }

    }



    return 0;

}

#ifdef DEBUG_TCE #endif int spapr_vio_check_tces(VIOsPAPRDevice *dev, target_ulong ioba,                          target_ulong len, enum VIOsPAPR_TCEAccess access)     int start, end, i;     start = ioba >> SPAPR_VIO_TCE_PAGE_SHIFT;     end = (ioba + len - 1) >> SPAPR_VIO_TCE_PAGE_SHIFT;     for (i = start; i <= end; i++) {         if ((dev->rtce_table[i].tce & access) != access) { #ifdef DEBUG_TCE             fprintf(stderr, "FAIL on %d\n", i); #endif             return -1;     return 0; #ifdef DEBUG_TCE #endif #ifdef DEBUG_TCE #endif #ifdef DEBUG_TCE #endif     return 0; #ifdef DEBUG_TCE #endif #ifdef DEBUG_TCE #endif #ifdef DEBUG_TCE #endif #ifdef DEBUG_TCE #endif int spapr_vio_check_tces(VIOsPAPRDevice *dev, target_ulong ioba,
int FUNC_0(VIOsPAPRDevice *VAR_0, target_ulong VAR_1,

                         target_ulong VAR_2, enum VIOsPAPR_TCEAccess VAR_3)

{

    int VAR_4, VAR_5, VAR_6;



    VAR_4 = VAR_1 >> SPAPR_VIO_TCE_PAGE_SHIFT;

    VAR_5 = (VAR_1 + VAR_2 - 1) >> SPAPR_VIO_TCE_PAGE_SHIFT;



    for (VAR_6 = VAR_4; VAR_6 <= VAR_5; VAR_6++) {

        if ((VAR_0->rtce_table[VAR_6].tce & VAR_3) != VAR_3) {

#ifdef DEBUG_TCE

            fprintf(stderr, "FAIL on %d\n", VAR_6);

#endif

            return -1;

        }

    }



    return 0;

}

int FUNC_0(VIOsPAPRDevice *VAR_0, target_ulong VAR_1,
target_ulong VAR_2, enum VIOsPAPR_TCEAccess VAR_3)
{ int VAR_4, VAR_5, VAR_6; VAR_4 = VAR_1 >> SPAPR_VIO_TCE_PAGE_SHIFT; VAR_5 = (VAR_1 + VAR_2 - 1) >> SPAPR_VIO_TCE_PAGE_SHIFT; for (VAR_6 = VAR_4; VAR_6 <= VAR_5; VAR_6++) { if ((VAR_0->rtce_table[VAR_6].tce & VAR_3) != VAR_3) { #ifdef DEBUG_TCE
fprintf(stderr, "FAIL on %d\n", VAR_6); #endif
return -1; } } return 0; }