Lines Matching refs:cx
426 static void acpi_processor_ffh_cstate_enter(struct acpi_processor_cx *cx) in acpi_processor_ffh_cstate_enter() argument
428 mwait_idle_with_hints(cx->address, MWAIT_ECX_INTERRUPT_BREAK); in acpi_processor_ffh_cstate_enter()
431 static void acpi_idle_do_entry(struct acpi_processor_cx *cx) in acpi_idle_do_entry() argument
433 switch ( cx->entry_method ) in acpi_idle_do_entry()
437 acpi_processor_ffh_cstate_enter(cx); in acpi_idle_do_entry()
441 inb(cx->address); in acpi_idle_do_entry()
520 struct acpi_processor_cx *cx, uint64_t ticks) in update_last_cx_stat() argument
525 power->last_state = cx; in update_last_cx_stat()
531 struct acpi_processor_cx *cx, in update_idle_stats() argument
539 cx->usage++; in update_idle_stats()
543 cx->time += sleep_ticks; in update_idle_stats()
554 struct acpi_processor_cx *cx = NULL; in acpi_processor_idle() local
563 cx = &power->states[next_state]; in acpi_processor_idle()
564 if ( cx->type == ACPI_STATE_C3 && power->flags.bm_check && in acpi_processor_idle()
566 cx = power->safe_state; in acpi_processor_idle()
567 if ( cx->idx > max_cstate ) in acpi_processor_idle()
568 cx = &power->states[max_cstate]; in acpi_processor_idle()
571 if ( !cx ) in acpi_processor_idle()
600 if ( (cx->type == ACPI_STATE_C3) && errata_c6_eoi_workaround() ) in acpi_processor_idle()
601 cx = power->safe_state; in acpi_processor_idle()
609 switch ( cx->type ) in acpi_processor_idle()
613 if ( cx->type == ACPI_STATE_C1 || local_apic_timer_c2_ok ) in acpi_processor_idle()
618 TRACE_4D(TRC_PM_IDLE_ENTRY, cx->idx, t1, exp, pred); in acpi_processor_idle()
620 update_last_cx_stat(power, cx, t1); in acpi_processor_idle()
623 acpi_idle_do_entry(cx); in acpi_processor_idle()
628 TRACE_6D(TRC_PM_IDLE_EXIT, cx->idx, t2, in acpi_processor_idle()
631 update_idle_stats(power, cx, t1, t2); in acpi_processor_idle()
649 TRACE_4D(TRC_PM_IDLE_ENTRY, cx->idx, t1, exp, pred); in acpi_processor_idle()
651 update_last_cx_stat(power, cx, t1); in acpi_processor_idle()
663 if ( cx->type != ACPI_STATE_C3 ) in acpi_processor_idle()
685 acpi_idle_do_entry(cx); in acpi_processor_idle()
687 if ( (cx->type == ACPI_STATE_C3) && in acpi_processor_idle()
704 TRACE_6D(TRC_PM_IDLE_EXIT, cx->idx, t2, in acpi_processor_idle()
708 update_idle_stats(power, cx, t1, t2); in acpi_processor_idle()
738 struct acpi_processor_cx *cx; in acpi_dead_idle() local
743 if ( (cx = &power->states[power->count-1]) == NULL ) in acpi_dead_idle()
746 if ( cx->entry_method == ACPI_CSTATE_EM_FFH ) in acpi_dead_idle()
772 __mwait(cx->address, 0); in acpi_dead_idle()
776 cx->entry_method == ACPI_CSTATE_EM_SYSIO ) in acpi_dead_idle()
781 u32 address = cx->address; in acpi_dead_idle()
833 static int acpi_processor_ffh_cstate_probe(xen_processor_cx_t *cx) in acpi_processor_ffh_cstate_probe() argument
855 cstate_type = (cx->reg.address >> MWAIT_SUBSTATE_SIZE) + 1; in acpi_processor_ffh_cstate_probe()
859 if ( num_cstate_subtype < (cx->reg.address & MWAIT_SUBSTATE_MASK) ) in acpi_processor_ffh_cstate_probe()
865 else if ( opt_cpu_info || cx->type >= BITS_PER_LONG || in acpi_processor_ffh_cstate_probe()
866 !test_and_set_bit(cx->type, &printed) ) in acpi_processor_ffh_cstate_probe()
868 cx->type); in acpi_processor_ffh_cstate_probe()
914 static int check_cx(struct acpi_processor_power *power, xen_processor_cx_t *cx) in check_cx() argument
919 switch ( cx->reg.space_id ) in check_cx()
922 if ( cx->reg.address == 0 ) in check_cx()
927 if ( cx->reg.bit_width != VENDOR_INTEL || in check_cx()
928 cx->reg.bit_offset != NATIVE_CSTATE_BEYOND_HALT ) in check_cx()
932 if ( acpi_processor_ffh_cstate_probe(cx) ) in check_cx()
940 switch ( cx->type ) in check_cx()
1023 struct acpi_processor_cx *cx; in set_cx() local
1031 cx = &acpi_power->states[1]; in set_cx()
1041 cx = &acpi_power->states[acpi_power->count]; in set_cx()
1042 cx->type = xen_cx->type; in set_cx()
1046 cx->address = xen_cx->reg.address; in set_cx()
1054 cx->entry_method = ACPI_CSTATE_EM_FFH; in set_cx()
1056 cx->entry_method = ACPI_CSTATE_EM_HALT; in set_cx()
1059 if ( ioports_deny_access(hardware_domain, cx->address, cx->address) ) in set_cx()
1061 cx->address); in set_cx()
1062 cx->entry_method = ACPI_CSTATE_EM_SYSIO; in set_cx()
1065 cx->entry_method = ACPI_CSTATE_EM_NONE; in set_cx()
1069 cx->latency = xen_cx->latency; in set_cx()
1070 cx->target_residency = cx->latency * latency_factor; in set_cx()
1073 acpi_power->count += (cx->type != ACPI_STATE_C1); in set_cx()
1074 if ( cx->type == ACPI_STATE_C1 || cx->type == ACPI_STATE_C2 ) in set_cx()
1075 acpi_power->safe_state = cx; in set_cx()