Deleted Added
full compact
acpi_machdep.c (215072) acpi_machdep.c (215097)
1/*-
2 * Copyright (c) 2001 Mitsuru IWASAKI
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2001 Mitsuru IWASAKI
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/i386/acpica/acpi_machdep.c 215072 2010-11-10 01:29:56Z jkim $");
28__FBSDID("$FreeBSD: head/sys/i386/acpica/acpi_machdep.c 215097 2010-11-10 18:50:12Z jkim $");
29
30#include <sys/param.h>
31#include <sys/bus.h>
32#include <sys/kernel.h>
33#include <sys/module.h>
34#include <sys/sysctl.h>
35
36#include <vm/vm.h>

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

56
57static int intr_model = ACPI_INTR_PIC;
58
59int
60acpi_machdep_init(device_t dev)
61{
62 struct acpi_softc *sc;
63
29
30#include <sys/param.h>
31#include <sys/bus.h>
32#include <sys/kernel.h>
33#include <sys/module.h>
34#include <sys/sysctl.h>
35
36#include <vm/vm.h>

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

56
57static int intr_model = ACPI_INTR_PIC;
58
59int
60acpi_machdep_init(device_t dev)
61{
62 struct acpi_softc *sc;
63
64 sc = devclass_get_softc(devclass_find("acpi"), 0);
64 sc = device_get_softc(dev);
65
65
66 /* Create a clone for /dev/acpi also. */
67 sc->acpi_clone = acpi_apm_create_clone(sc->acpi_dev_t, sc);
66 acpi_apm_init(sc);
68 acpi_install_wakeup_handler(sc);
69
70 if (intr_model == ACPI_INTR_PIC)
71 BUS_CONFIG_INTR(dev, AcpiGbl_FADT.SciInterrupt,
72 INTR_TRIGGER_LEVEL, INTR_POLARITY_LOW);
73 else
74 acpi_SetIntrModel(intr_model);
75

--- 323 unchanged lines hidden ---
67 acpi_install_wakeup_handler(sc);
68
69 if (intr_model == ACPI_INTR_PIC)
70 BUS_CONFIG_INTR(dev, AcpiGbl_FADT.SciInterrupt,
71 INTR_TRIGGER_LEVEL, INTR_POLARITY_LOW);
72 else
73 acpi_SetIntrModel(intr_model);
74

--- 323 unchanged lines hidden ---