Lines Matching refs:idx

377 	int		idx;
434 for (idx = 0; idx < count; idx++)
435 drctl_req[idx].res_cpu_id = req_cpus[idx];
483 for (idx = 0; idx < count; idx++) {
493 if (res[idx].result != DR_CPU_RES_OK) {
494 drctl_req[idx].status = DRCTL_STATUS_CONFIG_FAILURE;
499 result = (*dr_fn)(req_cpus[idx], &status, force);
502 res[idx].result = result;
503 res[idx].status = status;
506 drctl_req[idx].status = (result != DR_CPU_RES_OK) ?
510 __func__, req_cpus[idx], drctl_req[idx].status, result,
511 (res[idx].string) ? res[idx].string : "");
549 int idx;
562 for (idx = 0; idx < nrsrc; idx++) {
563 res[idx].cpuid = rsrc[idx].res_cpu_id;
564 res[idx].result = DR_CPU_RES_OK;
566 if (rsrc[idx].status == DRCTL_STATUS_ALLOW)
572 res[idx].result = DR_CPU_RES_BLOCKED;
573 res[idx].status = (req->msg_type == DR_CPU_CONFIGURE) ?
582 if (rsrc[idx].offset != NULL) {
583 err_str = (char *)rsrc + rsrc[idx].offset;
586 res[idx].string = kmem_alloc(err_len, KM_SLEEP);
588 __func__, (void *)(res[idx].string), err_len);
589 bcopy(err_str, res[idx].string, err_len);
599 int idx;
602 for (idx = 0; idx < nres; idx++) {
604 if (res[idx].string) {
605 str_len = strlen(res[idx].string) + 1;
607 __func__, (void *)(res[idx].string), str_len);
608 kmem_free(res[idx].string, str_len);
626 int idx;
650 for (idx = 0; idx < nstat; idx++) {
651 if (res[idx].string != NULL) {
652 resp_len += strlen(res[idx].string) + 1;
677 for (idx = 0; idx < nstat; idx++) {
678 resp_stat[idx].cpuid = res[idx].cpuid;
679 resp_stat[idx].result = res[idx].result;
680 resp_stat[idx].status = res[idx].status;
682 if (res[idx].string != NULL) {
684 str_len = strlen(res[idx].string) + 1;
685 bcopy(res[idx].string, curr_str, str_len);
686 resp_stat[idx].string_off = curr_off;
709 int idx;
732 for (idx = 0; idx < req->num_records; idx++) {
735 if (res[idx].result != DR_CPU_RES_OK)
738 if ((cp = cpu_get(cpuids[idx])) == NULL)
753 (void) dr_cpu_check_bound_thr(cp, &res[idx]);
952 int idx;
984 for (idx = 0; idx < req->num_records; idx++) {
986 result = dr_cpu_status(cpuids[idx], &status);
992 stat[idx].cpuid = cpuids[idx];
993 stat[idx].result = result;
994 stat[idx].status = status;
1019 for (idx = 0; idx < req->num_records; idx++) {
1021 if (stat[idx].result != DR_CPU_RES_FAILURE)
1025 cpunode = dr_cpu_find_node_md(stat[idx].cpuid, mdp, listp);
1027 stat[idx].result = DR_CPU_RES_OK;
1030 stat[idx].status = DR_CPU_STAT_NOT_PRESENT;
1032 stat[idx].status = DR_CPU_STAT_UNCONFIGURED;
1315 int idx = 0;
1348 str_arr[idx++] = curr;
1351 if (idx == STR_ARR_LEN) {
1358 "compatible", str_arr, idx) != DDI_SUCCESS) {
1606 int idx;
1631 for (idx = 0; idx < nnodes; idx++) {
1633 if (md_get_prop_val(mdp, listp[idx], "id", &cpuid_prop)) {
1635 idx);
1643 result = listp[idx];