1/*- 2 * Copyright (c) 2003 Nate Lawson (SDG) 3 * Copyright (c) 2001 Michael Smith 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_cpu.c 136366 2004-10-11 05:39:15Z njl $"); |
30 31#include "opt_acpi.h" 32#include <sys/param.h> 33#include <sys/bus.h> 34#include <sys/kernel.h> 35#include <sys/malloc.h> 36#include <sys/module.h> 37#include <sys/pcpu.h> 38#include <sys/power.h> 39#include <sys/proc.h> 40#include <sys/sbuf.h> 41#include <sys/smp.h> 42 43#include <dev/pci/pcivar.h> 44#include <machine/atomic.h> 45#include <machine/bus.h> |
46#include <sys/rman.h> 47 48#include "acpi.h" 49#include <dev/acpica/acpivar.h> 50 51/* 52 * Support for ACPI Processor devices, including ACPI 2.0 throttling 53 * and C[1-3] sleep states. --- 93 unchanged lines hidden (view full) --- 147static int acpi_cpu_throttle_probe(struct acpi_cpu_softc *sc); 148static int acpi_cpu_cx_probe(struct acpi_cpu_softc *sc); 149static int acpi_cpu_cx_cst(struct acpi_cpu_softc *sc); 150static void acpi_cpu_startup(void *arg); 151static void acpi_cpu_startup_throttling(void); 152static void acpi_cpu_startup_cx(void); 153static void acpi_cpu_throttle_set(uint32_t speed); 154static void acpi_cpu_idle(void); |
155static void acpi_cpu_notify(ACPI_HANDLE h, UINT32 notify, void *context); 156static int acpi_cpu_quirks(struct acpi_cpu_softc *sc); 157static int acpi_cpu_throttle_sysctl(SYSCTL_HANDLER_ARGS); 158static int acpi_cpu_usage_sysctl(SYSCTL_HANDLER_ARGS); 159static int acpi_cpu_cx_lowest_sysctl(SYSCTL_HANDLER_ARGS); 160 161static device_method_t acpi_cpu_methods[] = { 162 /* Device interface */ --- 746 unchanged lines hidden (view full) --- 909 } 910 911 /* Find the actual time asleep in microseconds, minus overhead. */ 912 end_time = acpi_TimerDelta(end_time, start_time); 913 sc->cpu_prev_sleep = PM_USEC(end_time) - cx_next->trans_lat; 914 ACPI_ENABLE_IRQS(); 915} 916 |
917/* 918 * Re-evaluate the _PSS and _CST objects when we are notified that they 919 * have changed. 920 * 921 * XXX Re-evaluation disabled until locking is done. 922 */ 923static void 924acpi_cpu_notify(ACPI_HANDLE h, UINT32 notify, void *context) --- 165 unchanged lines hidden --- |