version 1.238, 2011/02/20 06:45:32 |
version 1.239, 2011/02/20 16:24:54 |
Line 108 __KERNEL_RCSID(0, "$NetBSD$"); |
|
Line 108 __KERNEL_RCSID(0, "$NetBSD$"); |
|
#include <sys/param.h> |
#include <sys/param.h> |
#include <sys/device.h> |
#include <sys/device.h> |
#include <sys/kernel.h> |
#include <sys/kernel.h> |
|
#include <sys/kmem.h> |
#include <sys/malloc.h> |
#include <sys/malloc.h> |
#include <sys/module.h> |
#include <sys/module.h> |
#include <sys/mutex.h> |
#include <sys/mutex.h> |
Line 123 __KERNEL_RCSID(0, "$NetBSD$"); |
|
Line 124 __KERNEL_RCSID(0, "$NetBSD$"); |
|
#include <dev/acpi/acpi_timer.h> |
#include <dev/acpi/acpi_timer.h> |
#include <dev/acpi/acpi_wakedev.h> |
#include <dev/acpi/acpi_wakedev.h> |
|
|
|
#include <machine/acpi_machdep.h> |
|
|
#define _COMPONENT ACPI_BUS_COMPONENT |
#define _COMPONENT ACPI_BUS_COMPONENT |
ACPI_MODULE_NAME ("acpi") |
ACPI_MODULE_NAME ("acpi") |
|
|
#if defined(ACPI_PCI_FIXUP) |
|
#error The option ACPI_PCI_FIXUP has been obsoleted by PCI_INTR_FIXUP_DISABLED. Please adjust your kernel configuration file. |
|
#endif |
|
|
|
#ifdef PCI_INTR_FIXUP_DISABLED |
|
#include <dev/pci/pcidevs.h> |
|
#endif |
|
|
|
MALLOC_DECLARE(M_ACPI); |
|
|
|
#include <machine/acpi_machdep.h> |
|
|
|
/* |
/* |
* The acpi_active variable is set when the ACPI subsystem is active. |
* The acpi_active variable is set when the ACPI subsystem is active. |
* Machine-dependent code may wish to skip other steps (such as attaching |
* Machine-dependent code may wish to skip other steps (such as attaching |
Line 548 acpi_detach(device_t self, int flags) |
|
Line 539 acpi_detach(device_t self, int flags) |
|
return 0; |
return 0; |
} |
} |
|
|
/* |
|
* XXX: Need to reclaim any resources? Yes. |
|
*/ |
|
static void |
static void |
acpi_childdet(device_t self, device_t child) |
acpi_childdet(device_t self, device_t child) |
{ |
{ |
Line 559 acpi_childdet(device_t self, device_t ch |
|
Line 547 acpi_childdet(device_t self, device_t ch |
|
|
|
if (sc->sc_apmbus == child) |
if (sc->sc_apmbus == child) |
sc->sc_apmbus = NULL; |
sc->sc_apmbus = NULL; |
if (sc->sc_wdrt == child) |
|
|
if (sc->sc_wdrt == child) |
sc->sc_wdrt = NULL; |
sc->sc_wdrt = NULL; |
|
|
SIMPLEQ_FOREACH(ad, &sc->ad_head, ad_list) { |
SIMPLEQ_FOREACH(ad, &sc->ad_head, ad_list) { |
Line 670 acpi_make_devnode(ACPI_HANDLE handle, ui |
|
Line 659 acpi_make_devnode(ACPI_HANDLE handle, ui |
|
case ACPI_TYPE_THERMAL: |
case ACPI_TYPE_THERMAL: |
case ACPI_TYPE_POWER: |
case ACPI_TYPE_POWER: |
|
|
ad = malloc(sizeof(*ad), M_ACPI, M_NOWAIT | M_ZERO); |
ad = kmem_zalloc(sizeof(*ad), KM_NOSLEEP); |
|
|
if (ad == NULL) |
if (ad == NULL) |
return AE_NO_MEMORY; |
return AE_NO_MEMORY; |
Line 1726 acpi_print_dev_stub(const char *pnpstr) |
|
Line 1715 acpi_print_dev_stub(const char *pnpstr) |
|
acpi_print_dev(pnpstr); |
acpi_print_dev(pnpstr); |
} |
} |
|
|
|
MALLOC_DECLARE(M_ACPI); /* XXX: ACPI_ACTIVATE_DEV should use kmem(9). */ |
|
|
/* |
/* |
* ACPI_ACTIVATE_DEV. |
* ACPI_ACTIVATE_DEV. |
*/ |
*/ |