Lines Matching refs:throttling

35 MODULE_PARM_DESC(ignore_tpc, "Disable broken BIOS _TPC throttling support");
78 pthrottling = &(pr->throttling);
100 pthrottling = &pr->throttling;
124 match_pthrottling = &(match_pr->throttling);
157 match_pthrottling = &(match_pr->throttling);
184 pthrottling = &(pr->throttling);
223 if (!pr->flags.throttling) {
229 p_throttling = &(pr->throttling);
317 if (throttling_limit >= pr->throttling.state_count) {
322 current_state = pr->throttling.state;
339 * Unnecessary to change the throttling state
345 * will be forced to switch to the throttling state defined
370 /* When one CPU is offline, the T-state throttling
373 pr->flags.throttling = 0;
379 if (!pr->throttling.state_count) {
383 pr->flags.throttling = 0;
386 pr->flags.throttling = 1;
388 /* Disable throttling (if enabled). We'll let subsequent
397 if (pr->throttling.state) {
405 pr->flags.throttling = 0;
417 struct acpi_processor_throttling *throttling;
449 memcpy(&pr->throttling.control_register, obj.buffer.pointer,
466 memcpy(&pr->throttling.status_register, obj.buffer.pointer,
469 throttling = &pr->throttling;
471 if ((throttling->control_register.bit_width +
472 throttling->control_register.bit_offset) > 32) {
478 if ((throttling->status_register.bit_width +
479 throttling->status_register.bit_offset) > 32) {
519 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found %d throttling states\n",
522 pr->throttling.state_count = tss->package.count;
523 pr->throttling.states_tss =
527 if (!pr->throttling.states_tss) {
532 for (i = 0; i < pr->throttling.state_count; i++) {
535 (struct acpi_processor_tx_tss *)&(pr->throttling.
548 kfree(pr->throttling.states_tss);
556 kfree(pr->throttling.states_tss);
581 pthrottling = &pr->throttling;
605 pdomain = &(pr->throttling.domain_info);
630 pthrottling = &pr->throttling;
664 if (!pr->flags.throttling)
674 request_region(pr->throttling.address, 6, "ACPI CPU throttle");
676 pr->throttling.state = 0;
678 duty_mask = pr->throttling.state_count - 1;
680 duty_mask <<= pr->throttling.duty_offset;
684 value = inl(pr->throttling.address);
687 * Compute the current throttling state when throttling is enabled
692 duty_value >>= pr->throttling.duty_offset;
695 state = pr->throttling.state_count - duty_value;
698 pr->throttling.state = state;
703 "Throttling state is T%d (%d%% throttling applied)\n",
704 state, pr->throttling.states[state].performance));
771 struct acpi_processor_throttling *throttling;
774 throttling = &pr->throttling;
775 switch (throttling->status_register.space_id) {
777 bit_width = throttling->status_register.bit_width;
778 bit_offset = throttling->status_register.bit_offset;
780 acpi_os_read_port((acpi_io_address) throttling->status_register.
792 (u32) (throttling->status_register.space_id));
803 struct acpi_processor_throttling *throttling;
806 throttling = &pr->throttling;
807 switch (throttling->control_register.space_id) {
809 bit_width = throttling->control_register.bit_width;
810 bit_offset = throttling->control_register.bit_offset;
814 acpi_os_write_port((acpi_io_address) throttling->
825 (u32) (throttling->control_register.space_id));
835 for (i = 0; i < pr->throttling.state_count; i++) {
837 (struct acpi_processor_tx_tss *)&(pr->throttling.
850 if (state >= 0 && state <= pr->throttling.state_count) {
852 (struct acpi_processor_tx_tss *)&(pr->throttling.
869 if (!pr->flags.throttling)
872 pr->throttling.state = 0;
880 "Invalid throttling state, reset\n"));
887 pr->throttling.state = state;
897 return pr->throttling.acpi_processor_get_throttling(pr);
905 if (!pr->flags.throttling)
924 if (!pr->throttling.address) {
925 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No throttling register\n"));
927 } else if (!pr->throttling.duty_width) {
928 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No throttling states\n"));
932 else if ((pr->throttling.duty_offset + pr->throttling.duty_width) > 4) {
937 pr->throttling.state_count = 1 << acpi_gbl_FADT.duty_width;
940 * Compute state values. Note that throttling displays a linear power
945 step = (1000 / pr->throttling.state_count);
947 for (i = 0; i < pr->throttling.state_count; i++) {
948 pr->throttling.states[i].performance = 1000 - step * i;
949 pr->throttling.states[i].power = 1000 - step * i;
964 if ((state < 0) || (state > (pr->throttling.state_count - 1)))
967 if (!pr->flags.throttling)
970 if (!force && (state == pr->throttling.state))
979 duty_value = pr->throttling.state_count - state;
981 duty_value <<= pr->throttling.duty_offset;
984 duty_mask = pr->throttling.state_count - 1;
993 * Disable throttling by writing a 0 to bit 4. Note that we must
996 value = inl(pr->throttling.address);
999 outl(value, pr->throttling.address);
1003 * Write the new duty_value and then enable throttling. Note
1004 * that a state value of 0 leaves throttling disabled.
1009 outl(value, pr->throttling.address);
1012 outl(value, pr->throttling.address);
1015 pr->throttling.state = state;
1021 (pr->throttling.states[state].performance ? pr->
1022 throttling.states[state].performance / 10 : 0)));
1036 if ((state < 0) || (state > (pr->throttling.state_count - 1)))
1039 if (!pr->flags.throttling)
1042 if (!force && (state == pr->throttling.state))
1052 pr->throttling.state = state;
1063 return pr->throttling.acpi_processor_set_throttling(pr,
1080 if (!pr->flags.throttling)
1083 if ((state < 0) || (state > (pr->throttling.state_count - 1)))
1089 * the throttling state any more.
1095 p_throttling = &(pr->throttling);
1098 * The throttling notifier will be called for every
1138 * If the throttling control is unsupported on CPU i,
1141 if (!match_pr->flags.throttling) {
1157 * throttling notifier is called for every
1183 pr->throttling.address,
1184 pr->throttling.duty_offset,
1185 pr->throttling.duty_width));
1195 pr->throttling.acpi_processor_get_throttling =
1197 pr->throttling.acpi_processor_set_throttling =
1202 pr->throttling.acpi_processor_get_throttling =
1204 pr->throttling.acpi_processor_set_throttling =
1213 pthrottling = &pr->throttling;
1220 * PIIX4 Errata: We don't support throttling on the original PIIX4.
1230 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found %d throttling states\n",
1231 pr->throttling.state_count));
1233 pr->flags.throttling = 1;
1236 * Disable throttling (if enabled). We'll let subsequent policy (e.g.
1245 if (pr->throttling.state) {
1247 "Disabling throttling (was T%d)\n",
1248 pr->throttling.state));
1256 pr->flags.throttling = 0;