Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/uebayasi-xip]: src/sys Sync with HEAD (-D20101022).



details:   https://anonhg.NetBSD.org/src/rev/21da4891eec2
branches:  uebayasi-xip
changeset: 751810:21da4891eec2
user:      uebayasi <uebayasi%NetBSD.org@localhost>
date:      Fri Oct 22 07:21:53 2010 +0000

description:
Sync with HEAD (-D20101022).

diffstat:

 sys/dev/acpi/acpi_pci.c                                   |    40 +-
 sys/dev/acpi/acpi_power.c                                 |    27 +-
 sys/dev/acpi/acpi_quirks.c                                |    32 +-
 sys/dev/acpi/acpi_verbose.c                               |     7 +-
 sys/dev/acpi/acpi_wakedev.c                               |    27 +-
 sys/dev/acpi/acpireg.h                                    |    13 +-
 sys/dev/acpi/acpivar.h                                    |    14 +-
 sys/dev/acpi/files.acpi                                   |    10 +-
 sys/dev/acpi/sony_acpi.c                                  |    13 +-
 sys/dev/acpi/wb_acpi.c                                    |    54 +-
 sys/dev/acpi/wss_acpi.c                                   |     7 +-
 sys/dev/acpi/ym_acpi.c                                    |     6 +-
 sys/dev/adb/adb_bt.c                                      |     7 +-
 sys/dev/dm/device-mapper.c                                |     4 +-
 sys/dev/dm/dm_target.c                                    |     4 +-
 sys/dev/i2c/dbcool.c                                      |     8 +-
 sys/dev/i2c/files.i2c                                     |     9 +-
 sys/dev/i2c/g760a.c                                       |   261 +
 sys/dev/i2c/g760areg.h                                    |    53 +
 sys/dev/i2c/m41st84.c                                     |    13 +-
 sys/dev/ic/ciss.c                                         |    33 +-
 sys/dev/ic/dm9000.c                                       |   839 +
 sys/dev/ic/dm9000reg.h                                    |   202 +
 sys/dev/ic/dm9000var.h                                    |   146 +
 sys/dev/ic/esiop.c                                        |    26 +-
 sys/dev/ic/isp_netbsd.c                                   |     6 +-
 sys/dev/ic/lan9118reg.h                                   |     7 +-
 sys/dev/ic/nslm7x.c                                       |     8 +-
 sys/dev/ic/pcdisplay_subr.c                               |     9 +-
 sys/dev/ic/siop.c                                         |    27 +-
 sys/dev/ic/vga.c                                          |     9 +-
 sys/dev/ic/w83l518d.c                                     |    25 +-
 sys/dev/ic/w83l518d_sdmmc.c                               |    48 +-
 sys/dev/ic/w83l518d_sdmmc.h                               |     4 +-
 sys/dev/ic/w83l518dvar.h                                  |     6 +-
 sys/dev/ieee1394/firewire.c                               |    58 +-
 sys/dev/ieee1394/firewirereg.h                            |     4 +-
 sys/dev/ieee1394/fwcrom.c                                 |    57 +-
 sys/dev/ieee1394/fwdev.c                                  |    20 +-
 sys/dev/ieee1394/fwohci.c                                 |    12 +-
 sys/dev/ieee1394/iec13213.h                               |     4 +-
 sys/dev/ieee1394/sbp.h                                    |     4 +-
 sys/dev/isa/isa.c                                         |    13 +-
 sys/dev/marvell/com_mv.c                                  |     6 +-
 sys/dev/marvell/ehci_mv.c                                 |   427 +
 sys/dev/marvell/files.discovery                           |    12 +-
 sys/dev/marvell/gttwsi.c                                  |    17 +-
 sys/dev/marvell/if_mvgbe.c                                |    93 +-
 sys/dev/marvell/mvgbereg.h                                |    14 +-
 sys/dev/marvell/mvsdio.c                                  |   717 +
 sys/dev/marvell/mvsdioreg.h                               |   179 +
 sys/dev/mii/mii_physubr.c                                 |     9 +-
 sys/dev/pad/pad.c                                         |    18 +-
 sys/dev/pci/agp.c                                         |    39 +-
 sys/dev/pci/genfb_pci.c                                   |     9 +-
 sys/dev/pci/hdaudio/files.hdaudio                         |     3 +-
 sys/dev/pci/hdaudio/hdaudio.c                             |     6 +-
 sys/dev/pci/hdaudio/hdaudio_afg.c                         |    64 +-
 sys/dev/pci/hdaudio/hdaudio_ids.c                         |   267 +
 sys/dev/pci/hdaudio/hdaudio_ids.h                         |    49 +
 sys/dev/pci/if_bge.c                                      |     7 +-
 sys/dev/pci/if_bwi_pci.c                                  |     6 +-
 sys/dev/pci/if_iwn.c                                      |    10 +-
 sys/dev/pci/if_wm.c                                       |    12 +-
 sys/dev/pci/machfb.c                                      |    12 +-
 sys/dev/pci/pci_subr.c                                    |     9 +-
 sys/dev/pci/pcidevs                                       |    11 +-
 sys/dev/pci/pcidevs.h                                     |    13 +-
 sys/dev/pci/pcidevs_data.h                                |  9390 ++++++------
 sys/dev/pci/r128fb.c                                      |   278 +-
 sys/dev/pci/r128fbreg.h                                   |    59 +-
 sys/dev/pci/radeonfb.c                                    |    79 +-
 sys/dev/pci/radeonfbvar.h                                 |     3 +-
 sys/dev/pci/voodoofb.c                                    |    34 +-
 sys/dev/putter/putter.c                                   |     5 +-
 sys/dev/raidframe/rf_engine.c                             |     6 +-
 sys/dev/sbus/cgthree_sbus.c                               |     9 +-
 sys/dev/sbus/cgtwelve.c                                   |   155 +-
 sys/dev/sbus/files.sbus                                   |     4 +-
 sys/dev/sbus/genfb_sbus.c                                 |     7 +-
 sys/dev/scsipi/scsipi_base.c                              |     7 +-
 sys/dev/scsipi/scsipiconf.c                               |     9 +-
 sys/dev/sdmmc/ld_sdmmc.c                                  |    14 +-
 sys/dev/sdmmc/sdhc.c                                      |    19 +-
 sys/dev/sdmmc/sdmmc.c                                     |    69 +-
 sys/dev/sdmmc/sdmmc_cis.c                                 |   234 +-
 sys/dev/sdmmc/sdmmc_io.c                                  |    59 +-
 sys/dev/sdmmc/sdmmc_ioreg.h                               |    40 +-
 sys/dev/sdmmc/sdmmc_mem.c                                 |   480 +-
 sys/dev/sdmmc/sdmmcchip.h                                 |     9 +-
 sys/dev/sdmmc/sdmmcreg.h                                  |    36 +-
 sys/dev/sdmmc/sdmmcvar.h                                  |    14 +-
 sys/dev/sun/cgsix.c                                       |    18 +-
 sys/dev/sun/cgthree.c                                     |    25 +-
 sys/dev/sysmon/files.sysmon                               |     7 +-
 sys/dev/sysmon/swsensor.c                                 |   195 +
 sys/dev/sysmon/sysmon_envsys_events.c                     |    17 +-
 sys/dev/usb/ehci.c                                        |    13 +-
 sys/dev/usb/ehcivar.h                                     |     5 +-
 sys/dev/usb/if_aue.c                                      |     5 +-
 sys/dev/usb/if_upgt.c                                     |    28 +-
 sys/dev/usb/ucom.c                                        |    14 +-
 sys/dev/usb/uhub.c                                        |    12 +-
 sys/dev/usb/umass_quirks.c                                |    13 +-
 sys/dev/usb/umidi.c                                       |     6 +-
 sys/dev/usb/umodem_common.c                               |    14 +-
 sys/dev/usb/usb_quirks.c                                  |     6 +-
 sys/dev/usb/usb_quirks.h                                  |     3 +-
 sys/dev/usb/usb_subr.c                                    |     9 +-
 sys/dev/usb/usbdevs                                       |    11 +-
 sys/dev/usb/usbdevs.h                                     |    13 +-
 sys/dev/usb/usbdevs_data.h                                |    24 +-
 sys/dev/usb/usbdi_util.c                                  |     7 +-
 sys/dev/videomode/pickmode.c                              |    14 +-
 sys/dev/wscons/wsconsio.h                                 |    11 +-
 sys/dev/wscons/wsdisplay_vcons.c                          |    82 +-
 sys/dev/wscons/wsdisplay_vconsvar.h                       |    10 +-
 sys/dev/wsfb/files.wsfb                                   |     6 +-
 sys/dev/wsfb/genfb.c                                      |   144 +-
 sys/dev/wsfb/genfbvar.h                                   |    19 +-
 sys/dist/ipf/netinet/ip_fil_netbsd.c                      |    26 +-
 sys/external/bsd/drm/dist/shared-core/via_drv.c           |   194 +-
 sys/external/intel-public/acpica/dist/executer/exconfig.c |     4 +-
 sys/fs/udf/udf.h                                          |    10 +-
 sys/fs/udf/udf_subr.c                                     |    38 +-
 sys/kern/exec_elf.c                                       |    63 +-
 sys/kern/exec_subr.c                                      |    10 +-
 sys/kern/init_main.c                                      |     5 +-
 sys/kern/init_sysent.c                                    |     6 +-
 sys/kern/kern_cfglock.c                                   |   101 +
 sys/kern/kern_descrip.c                                   |     6 +-
 sys/kern/kern_event.c                                     |     8 +-
 sys/kern/kern_exec.c                                      |     8 +-
 sys/kern/kern_ktrace.c                                    |    30 +-
 sys/kern/kern_module.c                                    |   136 +-
 sys/kern/kern_pax.c                                       |     6 +-
 sys/kern/kern_prot.c                                      |     5 +-
 sys/kern/kern_syscall.c                                   |    21 +-
 sys/kern/makesyscalls.sh                                  |    13 +-
 sys/kern/subr_autoconf.c                                  |     6 +-
 sys/kern/subr_disk.c                                      |     8 +-
 sys/kern/subr_lockdebug.c                                 |    42 +-
 sys/kern/subr_userconf.c                                  |     6 +-
 sys/kern/sys_module.c                                     |    10 +-
 sys/kern/sys_select.c                                     |     6 +-
 sys/kern/sys_sig.c                                        |    10 +-
 sys/kern/syscalls.c                                       |     6 +-
 sys/kern/syscalls.master                                  |    50 +-
 sys/kern/tty.c                                            |     7 +-
 sys/kern/tty_pty.c                                        |   120 +-
 sys/kern/uipc_accf.c                                      |     6 +-
 sys/kern/uipc_socket.c                                    |     6 +-
 sys/kern/uipc_usrreq.c                                    |     8 +-
 sys/kern/vfs_subr.c                                       |    53 +-
 sys/kern/vfs_syscalls.c                                   |     6 +-
 sys/kern/vfs_vnops.c                                      |    13 +-
 sys/kern/vfs_wapbl.c                                      |     8 +-
 sys/lib/libkern/arch/i386/random.S                        |     6 +-
 sys/lib/libsa/cd9660.c                                    |    13 +-
 sys/lib/libsa/loadfile.h                                  |     4 +-
 sys/lib/libsa/loadfile_elf32.c                            |    69 +-
 sys/miscfs/genfs/genfs_io.c                               |    49 +-
 sys/miscfs/genfs/genfs_node.h                             |     3 +-
 sys/miscfs/genfs/genfs_vnops.c                            |    12 +-
 sys/miscfs/procfs/procfs_map.c                            |    14 +-
 sys/miscfs/specfs/spec_vnops.c                            |     8 +-
 sys/modules/Makefile                                      |    16 +-
 sys/modules/acpicpu/Makefile                              |     5 +-
 sys/modules/exec_elf32/Makefile                           |     4 +-
 sys/modules/vnd/Makefile                                  |     4 +-
 sys/net/Makefile                                          |     4 +-
 sys/net/if.c                                              |     6 +-
 sys/net/if.h                                              |     3 +-
 sys/net/if_ppp.c                                          |     8 +-
 sys/net/if_srt.c                                          |     8 +-
 sys/net/pfkeyv2.h                                         |    10 +-
 sys/netbt/hci_link.c                                      |    16 +-
 sys/netinet/files.ipfilter                                |    23 +-
 sys/netinet/ip_reass.c                                    |   307 +-
 sys/netinet/ip_var.h                                      |     6 +-
 sys/netinet6/icmp6.c                                      |     6 +-
 sys/netinet6/in6_pcb.c                                    |     8 +-
 sys/netinet6/in6_proto.c                                  |     8 +-
 sys/netinet6/ip6_etherip.c                                |    16 +-
 sys/netinet6/ip6_etherip.h                                |     4 +-
 sys/netinet6/ip6_mroute.c                                 |     6 +-
 sys/netipsec/key.c                                        |   178 +-
 sys/netipsec/keydb.h                                      |     4 +-
 sys/netipsec/xform_ipcomp.c                               |     8 +-
 sys/netkey/key.c                                          |   357 +-
 sys/nfs/nfs_boot.c                                        |    54 +-
 sys/nfs/nfs_bootdhcp.c                                    |    27 +-
 sys/nfs/nfs_node.c                                        |    36 +-
 sys/nfs/nfsdiskless.h                                     |     8 +-
 sys/nfs/nfsmount.h                                        |     4 +-
 sys/nfs/nfsnode.h                                         |     4 +-
 sys/rump/dev/Makefile.rumpdev                             |     4 +-
 sys/rump/dev/files.rump                                   |     5 +-
 sys/rump/dev/lib/libdm/component.c                        |     7 +-
 sys/rump/dev/lib/libsysmon/Makefile                       |     4 +-
 sys/rump/dev/lib/libsysmon/component.c                    |     7 +-
 sys/rump/dev/lib/libucom/UCOM.ioconf                      |     3 +-
 sys/rump/dev/lib/libulpt/ULPT.ioconf                      |     3 +-
 sys/rump/dev/lib/libumass/Makefile                        |    21 +-
 sys/rump/dev/lib/libumass/UMASS.ioconf                    |    21 +-
 sys/rump/dev/lib/libumass/component.c                     |    19 +
 sys/rump/dev/lib/libumass/opt/atapibus.h                  |     3 -
 sys/rump/dev/lib/libumass/opt/opt_compat_freebsd.h        |     1 -
 sys/rump/dev/lib/libumass/opt/opt_scsi.h                  |     1 -
 sys/rump/dev/lib/libumass/opt/scsibus.h                   |     3 -
 sys/rump/dev/lib/libumass/opt/wd.h                        |     1 -
 sys/rump/dev/lib/libumass/sd_at_scsibus_at_umass.c        |    41 -
 sys/rump/include/machine/intr.h                           |    22 +-
 sys/rump/include/rump/Makefile                            |     4 +-
 sys/rump/include/rump/rump.h                              |    26 +-
 sys/rump/include/rump/rump_syscalls.h                     |    28 +-
 sys/rump/include/rump/rump_syscalls_compat.h              |     4 +-
 sys/rump/include/rump/rumpkern_if_pub.h                   |    19 +-
 sys/rump/include/rump/rumpvfs_if_pub.h                    |     8 +-
 sys/rump/include/rump/scsitest.h                          |    38 +
 sys/rump/librump/makerumpif.sh                            |    12 +-
 sys/rump/librump/rumpkern/Makefile.rumpkern               |    71 +-
 sys/rump/librump/rumpkern/emul.c                          |    28 +-
 sys/rump/librump/rumpkern/intr.c                          |    29 +-
 sys/rump/librump/rumpkern/lwproc.c                        |   342 +
 sys/rump/librump/rumpkern/rump.3                          |   157 -
 sys/rump/librump/rumpkern/rump.c                          |   204 +-
 sys/rump/librump/rumpkern/rump_private.h                  |    13 +-
 sys/rump/librump/rumpkern/rump_syscalls.c                 |   550 +-
 sys/rump/librump/rumpkern/rumpkern.ifspec                 |    18 +-
 sys/rump/librump/rumpkern/rumpkern_if_priv.h              |    19 +-
 sys/rump/librump/rumpkern/rumpkern_if_wrappers.c          |    87 +-
 sys/rump/librump/rumpkern/scheduler.c                     |   116 +-
 sys/rump/librump/rumpkern/sysproxy_socket.c               |    14 +-
 sys/rump/librump/rumpkern/threads.c                       |     8 +-
 sys/rump/librump/rumpkern/vm.c                            |   435 +-
 sys/rump/librump/rumpvfs/compat.c                         |    24 +-
 sys/rump/librump/rumpvfs/rump_vfs.c                       |    53 +-
 sys/rump/librump/rumpvfs/rump_vfs_private.h               |     4 +-
 sys/rump/librump/rumpvfs/rumpblk.c                        |     6 +-
 sys/rump/librump/rumpvfs/rumpfs.c                         |     8 +-
 sys/rump/librump/rumpvfs/rumpvfs.ifspec                   |     6 +-
 sys/rump/librump/rumpvfs/rumpvfs_if_priv.h                |     8 +-
 sys/rump/librump/rumpvfs/rumpvfs_if_wrappers.c            |    27 +-
 sys/rump/librump/rumpvfs/vm_vfs.c                         |    63 +-
 sys/rump/net/lib/libnet/component.c                       |     7 +-
 sys/rump/net/lib/libshmif/if_shmem.c                      |   185 +-
 sys/rump/net/lib/libshmif/shmif_busops.c                  |    45 +-
 sys/rump/net/lib/libvirtif/component.c                    |     9 +-
 sys/rump/net/lib/libvirtif/if_virt.c                      |    44 +-
 sys/sys/Makefile                                          |     4 +-
 sys/sys/agpio.h                                           |     4 +-
 sys/sys/cdefs_elf.h                                       |     6 +-
 sys/sys/exec.h                                            |     3 +-
 sys/sys/exec_elf.h                                        |    93 +-
 sys/sys/fcntl.h                                           |    11 +-
 sys/sys/lwp.h                                             |     3 +-
 sys/sys/module.h                                          |     3 +-
 sys/sys/param.h                                           |     4 +-
 sys/sys/rb.h                                              |   191 -
 sys/sys/rbtree.h                                          |   194 +
 sys/sys/syscall.h                                         |     4 +-
 sys/sys/syscallargs.h                                     |     4 +-
 sys/sys/systm.h                                           |    10 +-
 sys/ufs/ufs/ufs_inode.c                                   |    29 +-
 sys/uvm/uvm_map.c                                         |    63 +-
 sys/uvm/uvm_map.h                                         |     4 +-
 sys/uvm/uvm_object.h                                      |     6 +-
 sys/uvm/uvm_page.c                                        |    38 +-
 sys/uvm/uvm_page.h                                        |     4 +-
 sys/uvm/uvm_pager.h                                       |     3 +-
 sys/uvm/uvm_pdaemon.h                                     |     6 +-
 sys/uvm/uvm_readahead.c                                   |     8 +-
 273 files changed, 14009 insertions(+), 7893 deletions(-)

diffs (truncated from 34556 to 300 lines):

diff -r bd63bffa3cc4 -r 21da4891eec2 sys/dev/acpi/acpi_pci.c
--- a/sys/dev/acpi/acpi_pci.c   Fri Oct 22 07:11:52 2010 +0000
+++ b/sys/dev/acpi/acpi_pci.c   Fri Oct 22 07:21:53 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_pci.c,v 1.2.2.2 2010/08/17 06:46:00 uebayasi Exp $ */
+/* $NetBSD: acpi_pci.c,v 1.2.2.3 2010/10/22 07:21:53 uebayasi Exp $ */
 
 /*
  * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_pci.c,v 1.2.2.2 2010/08/17 06:46:00 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_pci.c,v 1.2.2.3 2010/10/22 07:21:53 uebayasi Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -113,9 +113,10 @@
        if (ACPI_FAILURE(rv))
                return rv;
 
-       if (bus < 0 || bus > 0xFFFF)
+       if (bus == -1)
                return AE_NOT_EXIST;
 
+       /* Here it holds that 0 <= bus <= 0xFFFF. */
        *busp = (uint16_t)bus;
 
        return rv;
@@ -142,7 +143,10 @@
        if (*bus != -1)
                return AE_ALREADY_EXISTS;
 
-       *bus = addr64.Minimum;
+       if (addr64.Minimum > 0xFFFF)
+               return AE_BAD_DATA;
+
+       *bus = (int32_t)addr64.Minimum;
 
        return AE_OK;
 }
@@ -211,7 +215,7 @@
                ap->ap_function = ACPI_LOLODWORD(ad->ad_devinfo->Address);
 
                if (ap->ap_bus > 255 || ap->ap_device > 31 ||
-                   ap->ap_function > 7) {
+                   (ap->ap_function > 7 && ap->ap_function != 0xFFFF)) {
                        aprint_error_dev(ad->ad_root,
                            "invalid PCI address for %s\n", ad->ad_name);
                        kmem_free(ap, sizeof(*ap));
@@ -246,21 +250,31 @@
                ap->ap_device = ACPI_HILODWORD(ad->ad_devinfo->Address);
                ap->ap_function = ACPI_LOLODWORD(ad->ad_devinfo->Address);
 
-               if (ap->ap_device > 31 || ap->ap_function > 7) {
+               if (ap->ap_device > 31 ||
+                   (ap->ap_function > 7 && ap->ap_function != 0xFFFF)) {
                        aprint_error_dev(ad->ad_root,
                            "invalid PCI address for %s\n", ad->ad_name);
                        kmem_free(ap, sizeof(*ap));
                        goto rec;
                }
 
-               /*
-                * Check whether this device is a PCI-to-PCI
-                * bridge and get its secondary bus number.
-                */
-               rv = acpi_pcidev_ppb_downbus(ap->ap_segment, ap->ap_bus,
-                   ap->ap_device, ap->ap_function, &ap->ap_downbus);
+               if (ap->ap_function == 0xFFFF) {
+                       /*
+                        * Assume that this device is not a PCI-to-PCI bridge.
+                        * XXX: Do we need to be smarter?
+                        */
+                       ap->ap_bridge = false;
+               } else {
+                       /*
+                        * Check whether this device is a PCI-to-PCI
+                        * bridge and get its secondary bus number.
+                        */
+                       rv = acpi_pcidev_ppb_downbus(ap->ap_segment, ap->ap_bus,
+                           ap->ap_device, ap->ap_function, &ap->ap_downbus);
 
-               ap->ap_bridge = (rv != AE_OK) ? false : true;
+                       ap->ap_bridge = (rv != AE_OK) ? false : true;
+               }
+
                ad->ad_pciinfo = ap;
 
                goto rec;
diff -r bd63bffa3cc4 -r 21da4891eec2 sys/dev/acpi/acpi_power.c
--- a/sys/dev/acpi/acpi_power.c Fri Oct 22 07:11:52 2010 +0000
+++ b/sys/dev/acpi/acpi_power.c Fri Oct 22 07:21:53 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_power.c,v 1.11.2.3 2010/08/17 06:46:00 uebayasi Exp $ */
+/* $NetBSD: acpi_power.c,v 1.11.2.4 2010/10/22 07:21:53 uebayasi Exp $ */
 
 /*-
  * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_power.c,v 1.11.2.3 2010/08/17 06:46:00 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_power.c,v 1.11.2.4 2010/10/22 07:21:53 uebayasi Exp $");
 
 #include <sys/param.h>
 #include <sys/kmem.h>
@@ -99,7 +99,8 @@
 static TAILQ_HEAD(, acpi_power_res) res_head =
        TAILQ_HEAD_INITIALIZER(res_head);
 
-static const struct sysctlnode *anode = NULL;
+static int32_t acpi_power_acpinode = CTL_EOL;
+static int32_t acpi_power_powernode = CTL_EOL;
 
 static struct acpi_power_res   *acpi_power_res_init(ACPI_HANDLE);
 static struct acpi_power_res   *acpi_power_res_get(ACPI_HANDLE);
@@ -691,6 +692,7 @@
 
 SYSCTL_SETUP(sysctl_acpi_power_setup, "sysctl hw.acpi.power subtree setup")
 {
+       const struct sysctlnode *anode;
        int err;
 
        err = sysctl_createv(NULL, 0, NULL, &anode,
@@ -699,7 +701,7 @@
            CTL_HW, CTL_EOL);
 
        if (err != 0)
-               goto fail;
+               return;
 
        err = sysctl_createv(NULL, 0, &anode, &anode,
            CTLFLAG_PERMANENT, CTLTYPE_NODE, "acpi",
@@ -707,7 +709,9 @@
            CTL_CREATE, CTL_EOL);
 
        if (err != 0)
-               goto fail;
+               return;
+
+       acpi_power_acpinode = anode->sysctl_num;
 
        err = sysctl_createv(NULL, 0, &anode, &anode,
            CTLFLAG_PERMANENT, CTLTYPE_NODE,
@@ -716,12 +720,9 @@
            CTL_CREATE, CTL_EOL);
 
        if (err != 0)
-               goto fail;
+               return;
 
-       return;
-
-fail:
-       anode = NULL;
+       acpi_power_powernode = anode->sysctl_num;
 }
 
 void
@@ -732,7 +733,8 @@
        KASSERT(ad != NULL && ad->ad_root != NULL);
        KASSERT((ad->ad_flags & ACPI_DEVICE_POWER) != 0);
 
-       if (anode == NULL)
+       if (acpi_power_acpinode == CTL_EOL ||
+           acpi_power_powernode == CTL_EOL)
                return;
 
        /*
@@ -740,9 +742,10 @@
         * may power multiple devices, it is unclear whether
         * power resources should be controllable by an user.
         */
-       err = sysctl_createv(NULL, 0, &anode, NULL,
+       err = sysctl_createv(NULL, 0, NULL, NULL,
            CTLFLAG_READONLY, CTLTYPE_STRING, ad->ad_name,
            NULL, acpi_power_sysctl, 0, ad, 0,
+           CTL_HW, acpi_power_acpinode, acpi_power_powernode,
            CTL_CREATE, CTL_EOL);
 
        if (err != 0)
diff -r bd63bffa3cc4 -r 21da4891eec2 sys/dev/acpi/acpi_quirks.c
--- a/sys/dev/acpi/acpi_quirks.c        Fri Oct 22 07:11:52 2010 +0000
+++ b/sys/dev/acpi/acpi_quirks.c        Fri Oct 22 07:21:53 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acpi_quirks.c,v 1.10.4.2 2010/08/17 06:46:00 uebayasi Exp $    */
+/*     $NetBSD: acpi_quirks.c,v 1.10.4.3 2010/10/22 07:21:53 uebayasi Exp $    */
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: acpi_quirks.c,v 1.10.4.2 2010/08/17 06:46:00 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_quirks.c,v 1.10.4.3 2010/10/22 07:21:53 uebayasi Exp $");
 
 #include "opt_acpi.h"
 
@@ -69,9 +69,6 @@
        { ACPI_SIG_FADT, "NVIDIA", 0x06040000, AQ_EQ, "CK8     ",
          ACPI_QUIRK_IRQ0 },
 
-       { ACPI_SIG_DSDT, "NVIDIA", 0x00001000, AQ_EQ, "AWRDACPI",
-         ACPI_QUIRK_BROKEN },
-
        { ACPI_SIG_FADT, "HP    ", 0x06040012, AQ_LTE, "HWPC20F ",
          ACPI_QUIRK_BROKEN },
 };
@@ -109,6 +106,25 @@
        return 1;
 }
 
+#ifdef ACPI_BLACKLIST_YEAR
+static int
+acpi_find_bios_year(void)
+{
+       const char *datestr = pmf_get_platform("firmware-date");
+       unsigned long date;
+
+       if (datestr == NULL)
+               return -1;
+
+       date = strtoul(datestr, NULL, 10);
+       if (date == 0 || date == ULONG_MAX)
+               return -1;
+       if (date < 19000000 || date > 99999999)
+               return -1;
+       return date / 10000;
+}
+#endif
+
 /*
  * Simple function to search the quirk table. Only to be used after
  * AcpiLoadTables has been successfully called.
@@ -119,6 +135,12 @@
        int i, nquirks;
        struct acpi_quirk *aqp;
        ACPI_TABLE_HEADER fadt, dsdt, xsdt, *hdr;
+#ifdef ACPI_BLACKLIST_YEAR
+       int year = acpi_find_bios_year();
+
+       if (year != -1 && year <= ACPI_BLACKLIST_YEAR)
+               return ACPI_QUIRK_OLDBIOS;
+#endif
 
        nquirks = __arraycount(acpi_quirks);
 
diff -r bd63bffa3cc4 -r 21da4891eec2 sys/dev/acpi/acpi_verbose.c
--- a/sys/dev/acpi/acpi_verbose.c       Fri Oct 22 07:11:52 2010 +0000
+++ b/sys/dev/acpi/acpi_verbose.c       Fri Oct 22 07:21:53 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acpi_verbose.c,v 1.10.4.2 2010/08/17 06:46:01 uebayasi Exp $ */
+/*     $NetBSD: acpi_verbose.c,v 1.10.4.3 2010/10/22 07:21:53 uebayasi Exp $ */
 
 /*-
  * Copyright (c) 2003, 2007, 2010 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_verbose.c,v 1.10.4.2 2010/08/17 06:46:01 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_verbose.c,v 1.10.4.3 2010/10/22 07:21:53 uebayasi Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -510,6 +510,9 @@
        struct pci_softc *pci;
        deviter_t di;
 
+       if (ap->ap_function == 0xFFFF)
+               return NULL;
+
        for (dv = deviter_first(&di, DEVITER_F_ROOT_FIRST); dv != NULL;
             dv = deviter_next(&di)) {
                pr = device_parent(dv);
diff -r bd63bffa3cc4 -r 21da4891eec2 sys/dev/acpi/acpi_wakedev.c
--- a/sys/dev/acpi/acpi_wakedev.c       Fri Oct 22 07:11:52 2010 +0000
+++ b/sys/dev/acpi/acpi_wakedev.c       Fri Oct 22 07:21:53 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_wakedev.c,v 1.2.6.2 2010/08/17 06:46:01 uebayasi Exp $ */
+/* $NetBSD: acpi_wakedev.c,v 1.2.6.3 2010/10/22 07:21:53 uebayasi Exp $ */
 
 /*-
  * Copyright (c) 2009, 2010 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_wakedev.c,v 1.2.6.2 2010/08/17 06:46:01 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_wakedev.c,v 1.2.6.3 2010/10/22 07:21:53 uebayasi Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -50,7 +50,8 @@
        NULL,
 };



Home | Main Index | Thread Index | Old Index