Deleted Added
full compact
acpi_throttle.c (241856) acpi_throttle.c (241885)
1/*-
2 * Copyright (c) 2003-2005 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>
1/*-
2 * Copyright (c) 2003-2005 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_throttle.c 241856 2012-10-22 03:41:14Z eadler $");
29__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_throttle.c 241885 2012-10-22 13:06:09Z eadler $");
30
31#include "opt_acpi.h"
32#include <sys/param.h>
33#include <sys/bus.h>
34#include <sys/cpu.h>
35#include <sys/kernel.h>
36#include <sys/malloc.h>
37#include <sys/module.h>

--- 124 unchanged lines hidden (view full) ---

162 }
163 AcpiOsFree(obj);
164}
165
166static int
167acpi_throttle_probe(device_t dev)
168{
169
30
31#include "opt_acpi.h"
32#include <sys/param.h>
33#include <sys/bus.h>
34#include <sys/cpu.h>
35#include <sys/kernel.h>
36#include <sys/malloc.h>
37#include <sys/module.h>

--- 124 unchanged lines hidden (view full) ---

162 }
163 AcpiOsFree(obj);
164}
165
166static int
167acpi_throttle_probe(device_t dev)
168{
169
170 if (resource_disabled("acpi_throttle", 0))
171 return (ENXIO);
172
170 /*
171 * On i386 platforms at least, ACPI throttling is accomplished by
172 * the chipset modulating the STPCLK# pin based on the duty cycle.
173 * Since p4tcc uses the same mechanism (but internal to the CPU),
174 * we disable acpi_throttle when p4tcc is also present.
175 */
176 if (device_find_child(device_get_parent(dev), "p4tcc", -1) &&
177 !resource_disabled("p4tcc", 0))

--- 263 unchanged lines hidden ---
173 /*
174 * On i386 platforms at least, ACPI throttling is accomplished by
175 * the chipset modulating the STPCLK# pin based on the duty cycle.
176 * Since p4tcc uses the same mechanism (but internal to the CPU),
177 * we disable acpi_throttle when p4tcc is also present.
178 */
179 if (device_find_child(device_get_parent(dev), "p4tcc", -1) &&
180 !resource_disabled("p4tcc", 0))

--- 263 unchanged lines hidden ---