Lines Matching +full:idle +full:- +full:halt
1 // SPDX-License-Identifier: GPL-2.0-only
61 (highest_subcstate - 1); in power_saving_mwait_init()
78 /* TSC could halt in idle */ in power_saving_mwait_init()
85 static int tsk_in_cpu[NR_CPUS] = {[0 ... NR_CPUS-1] = -1};
92 unsigned long min_weight = -1; in round_robin_cpu()
118 if (tsk_in_cpu[tsk_index] != -1) in round_robin_cpu()
134 if (tsk_in_cpu[tsk_index] != -1) { in exit_round_robin()
136 tsk_in_cpu[tsk_index] = -1; in exit_round_robin()
162 expire_time = jiffies + HZ * (100 - idle_pct) / 100; in power_saving_thread()
166 /* TSC could halt in idle, so notify users */ in power_saving_thread()
167 mark_tsc_unstable("TSC halts in idle"); in power_saving_thread()
241 ps_tsk_num--; in destroy_power_saving_task()
281 return -EINVAL; in rrtime_store()
283 return -EINVAL; in rrtime_store()
303 return -EINVAL; in idlepct_store()
305 return -EINVAL; in idlepct_store()
325 return -EINVAL; in idlecpus_store()
345 result = device_create_file(&device->dev, &dev_attr_idlecpus); in acpi_pad_add_sysfs()
347 return -ENODEV; in acpi_pad_add_sysfs()
348 result = device_create_file(&device->dev, &dev_attr_idlepct); in acpi_pad_add_sysfs()
350 device_remove_file(&device->dev, &dev_attr_idlecpus); in acpi_pad_add_sysfs()
351 return -ENODEV; in acpi_pad_add_sysfs()
353 result = device_create_file(&device->dev, &dev_attr_rrtime); in acpi_pad_add_sysfs()
355 device_remove_file(&device->dev, &dev_attr_idlecpus); in acpi_pad_add_sysfs()
356 device_remove_file(&device->dev, &dev_attr_idlepct); in acpi_pad_add_sysfs()
357 return -ENODEV; in acpi_pad_add_sysfs()
364 device_remove_file(&device->dev, &dev_attr_idlecpus); in acpi_pad_remove_sysfs()
365 device_remove_file(&device->dev, &dev_attr_idlepct); in acpi_pad_remove_sysfs()
366 device_remove_file(&device->dev, &dev_attr_rrtime); in acpi_pad_remove_sysfs()
370 * Query firmware how many CPUs should be idle
371 * return -1 on failure
377 int num = -1; in acpi_pad_pur()
387 if (package->type == ACPI_TYPE_PACKAGE && in acpi_pad_pur()
388 package->package.count == 2 && in acpi_pad_pur()
389 package->package.elements[0].integer.value == 1) /* rev 1 */ in acpi_pad_pur()
391 num = package->package.elements[1].integer.value; in acpi_pad_pur()
426 acpi_bus_generate_netlink_event(device->pnp.device_class, in acpi_pad_notify()
427 dev_name(&device->dev), event, 0); in acpi_pad_notify()
443 return -ENODEV; in acpi_pad_add()
445 status = acpi_install_notify_handler(device->handle, in acpi_pad_add()
449 return -ENODEV; in acpi_pad_add()
461 acpi_remove_notify_handler(device->handle, in acpi_pad_remove()
486 return -ENODEV; in acpi_pad_init()
490 return -EINVAL; in acpi_pad_init()