Lines Matching refs:throttling
31 MODULE_PARM_DESC(ignore_tpc, "Disable broken BIOS _TPC throttling support");
74 pthrottling = &(pr->throttling);
96 pthrottling = &pr->throttling;
119 match_pthrottling = &(match_pr->throttling);
151 match_pthrottling = &(match_pr->throttling);
178 pthrottling = &(pr->throttling);
213 if (!pr->flags.throttling) {
220 p_throttling = &(pr->throttling);
306 if (throttling_limit >= pr->throttling.state_count) {
311 current_state = pr->throttling.state;
328 * Unnecessary to change the throttling state
334 * will be forced to switch to the throttling state defined
359 /* When one CPU is offline, the T-state throttling
362 pr->flags.throttling = 0;
368 if (!pr->throttling.state_count) {
372 pr->flags.throttling = 0;
375 pr->flags.throttling = 1;
377 /* Disable throttling (if enabled). We'll let subsequent
386 if (pr->throttling.state) {
394 pr->flags.throttling = 0;
406 struct acpi_processor_throttling *throttling;
437 memcpy(&pr->throttling.control_register, obj.buffer.pointer,
454 memcpy(&pr->throttling.status_register, obj.buffer.pointer,
457 throttling = &pr->throttling;
459 if ((throttling->control_register.bit_width +
460 throttling->control_register.bit_offset) > 32) {
466 if ((throttling->status_register.bit_width +
467 throttling->status_register.bit_offset) > 32) {
507 acpi_handle_debug(pr->handle, "Found %d throttling states\n",
510 pr->throttling.state_count = tss->package.count;
511 pr->throttling.states_tss =
515 if (!pr->throttling.states_tss) {
520 for (i = 0; i < pr->throttling.state_count; i++) {
523 (struct acpi_processor_tx_tss *)&(pr->throttling.
537 kfree(pr->throttling.states_tss);
544 kfree(pr->throttling.states_tss);
569 pthrottling = &pr->throttling;
593 pdomain = &(pr->throttling.domain_info);
618 pthrottling = &pr->throttling;
652 if (!pr->flags.throttling)
662 request_region(pr->throttling.address, 6, "ACPI CPU throttle");
664 pr->throttling.state = 0;
666 duty_mask = pr->throttling.state_count - 1;
668 duty_mask <<= pr->throttling.duty_offset;
672 value = inl(pr->throttling.address);
675 * Compute the current throttling state when throttling is enabled
680 duty_value >>= pr->throttling.duty_offset;
683 state = pr->throttling.state_count - duty_value;
686 pr->throttling.state = state;
691 "Throttling state is T%d (%d%% throttling applied)\n",
692 state, pr->throttling.states[state].performance);
755 struct acpi_processor_throttling *throttling;
758 throttling = &pr->throttling;
759 switch (throttling->status_register.space_id) {
761 bit_width = throttling->status_register.bit_width;
762 bit_offset = throttling->status_register.bit_offset;
764 acpi_os_read_port((acpi_io_address) throttling->status_register.
776 (u32) (throttling->status_register.space_id));
787 struct acpi_processor_throttling *throttling;
790 throttling = &pr->throttling;
791 switch (throttling->control_register.space_id) {
793 bit_width = throttling->control_register.bit_width;
794 bit_offset = throttling->control_register.bit_offset;
798 acpi_os_write_port((acpi_io_address) throttling->
809 (u32) (throttling->control_register.space_id));
819 for (i = 0; i < pr->throttling.state_count; i++) {
821 (struct acpi_processor_tx_tss *)&(pr->throttling.
834 if (state >= 0 && state <= pr->throttling.state_count) {
836 (struct acpi_processor_tx_tss *)&(pr->throttling.
853 if (!pr->flags.throttling)
856 pr->throttling.state = 0;
864 "Invalid throttling state, reset\n");
871 pr->throttling.state = state;
881 return pr->throttling.acpi_processor_get_throttling(pr);
889 if (!pr->flags.throttling)
908 if (!pr->throttling.address) {
909 acpi_handle_debug(pr->handle, "No throttling register\n");
911 } else if (!pr->throttling.duty_width) {
912 acpi_handle_debug(pr->handle, "No throttling states\n");
916 else if ((pr->throttling.duty_offset + pr->throttling.duty_width) > 4) {
921 pr->throttling.state_count = 1 << acpi_gbl_FADT.duty_width;
924 * Compute state values. Note that throttling displays a linear power
929 step = (1000 / pr->throttling.state_count);
931 for (i = 0; i < pr->throttling.state_count; i++) {
932 pr->throttling.states[i].performance = 1000 - step * i;
933 pr->throttling.states[i].power = 1000 - step * i;
948 if ((state < 0) || (state > (pr->throttling.state_count - 1)))
951 if (!pr->flags.throttling)
954 if (!force && (state == pr->throttling.state))
963 duty_value = pr->throttling.state_count - state;
965 duty_value <<= pr->throttling.duty_offset;
968 duty_mask = pr->throttling.state_count - 1;
977 * Disable throttling by writing a 0 to bit 4. Note that we must
980 value = inl(pr->throttling.address);
983 outl(value, pr->throttling.address);
987 * Write the new duty_value and then enable throttling. Note
988 * that a state value of 0 leaves throttling disabled.
993 outl(value, pr->throttling.address);
996 outl(value, pr->throttling.address);
999 pr->throttling.state = state;
1005 (pr->throttling.states[state].performance ? pr->
1006 throttling.states[state].performance / 10 : 0));
1020 if ((state < 0) || (state > (pr->throttling.state_count - 1)))
1023 if (!pr->flags.throttling)
1026 if (!force && (state == pr->throttling.state))
1036 pr->throttling.state = state;
1047 return pr->throttling.acpi_processor_set_throttling(pr,
1064 if (!pr->flags.throttling)
1067 if ((state < 0) || (state > (pr->throttling.state_count - 1)))
1073 * the throttling state any more.
1079 p_throttling = &(pr->throttling);
1082 * The throttling notifier will be called for every
1122 * If the throttling control is unsupported on CPU i,
1125 if (!match_pr->flags.throttling) {
1140 * throttling notifier is called for every
1166 pr->throttling.address,
1167 pr->throttling.duty_offset,
1168 pr->throttling.duty_width);
1177 pr->throttling.acpi_processor_get_throttling =
1179 pr->throttling.acpi_processor_set_throttling =
1184 pr->throttling.acpi_processor_get_throttling =
1186 pr->throttling.acpi_processor_set_throttling =
1195 pthrottling = &pr->throttling;
1202 * PIIX4 Errata: We don't support throttling on the original PIIX4.
1212 acpi_handle_debug(pr->handle, "Found %d throttling states\n",
1213 pr->throttling.state_count);
1215 pr->flags.throttling = 1;
1218 * Disable throttling (if enabled). We'll let subsequent policy (e.g.
1227 if (pr->throttling.state) {
1229 "Disabling throttling (was T%d)\n",
1230 pr->throttling.state);
1238 pr->flags.throttling = 0;