Lines Matching defs:cx
219 struct acpi_cstate *cx;
221 SLIST_FOREACH(cx, &sc->sc_cstates, link)
222 if (cx->state == state)
223 return cx;
347 struct acpi_cstate *cx;
354 (cx = SLIST_FIRST(&sc->sc_cstates)) == NULL ||
355 (cx->flags & CST_FLAG_FALLBACK) == 0) {
356 cx = malloc(sizeof(*cx), M_DEVBUF, M_WAITOK);
357 SLIST_INSERT_HEAD(&sc->sc_cstates, cx, link);
360 cx->state = state;
361 cx->method = method;
362 cx->flags = flags;
363 cx->latency = latency;
364 cx->power = power;
365 cx->address = address;
510 struct acpi_cstate *cx, *next_cx;
514 while ((cx = SLIST_FIRST(&sc->sc_cstates)) != NULL) {
516 free(cx, M_DEVBUF, sizeof(*cx));
530 cx = SLIST_FIRST(&sc->sc_cstates);
531 if (cx->flags & CST_FLAG_FALLBACK)
540 while ((next_cx = SLIST_NEXT(cx, link)) != NULL) {
541 if (cx->state > 1 &&
543 cx->flags |= CST_FLAG_SKIP;
544 else if (cx->method != CST_METH_MWAIT)
546 cx = next_cx;
591 acpicpu_print_one_cst(struct acpi_cstate *cx)
596 switch (cx->method) {
606 show_addr = cx->address != 0;
616 printf(" %sC%d(", (cx->flags & CST_FLAG_SKIP ? "!" : ""), cx->state);
617 if (cx->power != -1)
618 printf("%d", cx->power);
619 printf("@%d%s", cx->latency, meth);
620 if (cx->flags & ~CST_FLAG_SKIP) {
621 if (cx->flags & CST_FLAG_FALLBACK)
624 printf(".%x", (cx->flags & ~CST_FLAG_SKIP));
627 printf("@0x%llx", cx->address);
634 struct acpi_cstate *cx;
641 SLIST_FOREACH(cx, &sc->sc_cstates, link) {
644 acpicpu_print_one_cst(cx);
1168 struct acpi_cstate *best, *cx;
1187 best = cx = SLIST_FIRST(&sc->sc_cstates);
1188 while ((cx->flags & CST_FLAG_SKIP) ||
1189 cx->latency * 3 > sc->sc_prev_sleep) {
1190 if ((cx = SLIST_NEXT(cx, link)) == NULL)
1192 best = cx;
1201 while ((cx = SLIST_NEXT(cx, link)) != NULL) {
1202 if (cx->flags & CST_FLAG_SKIP)
1204 if (cx->state < 3 ||
1205 (cx->flags & CST_FLAG_MWAIT_BM_AVOIDANCE) == 0)
1208 best = cx;
1299 struct acpi_cstate *best, *cx;
1309 best = cx = SLIST_FIRST(&sc->sc_cstates);
1310 while ((cx->flags & CST_FLAG_SKIP)) {
1311 if ((cx = SLIST_NEXT(cx, link)) == NULL)
1313 best = cx;