]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branches 'release', 'bugzilla-11880', 'bugzilla-12037' and 'bugzilla-12257...
authorLen Brown <len.brown@intel.com>
Fri, 9 Jan 2009 08:37:11 +0000 (03:37 -0500)
committerLen Brown <len.brown@intel.com>
Fri, 9 Jan 2009 08:37:11 +0000 (03:37 -0500)
345 files changed:
Documentation/arm/mem_alignment
Documentation/kernel-parameters.txt
Documentation/sound/alsa/ALSA-Configuration.txt
Documentation/usb/gadget_serial.txt
Documentation/usb/proc_usb_info.txt
Documentation/usb/usbmon.txt
MAINTAINERS
Makefile
arch/arm/common/sa1111.c
arch/arm/kernel/armksyms.c
arch/arm/kernel/traps.c
arch/arm/mach-pxa/include/mach/reset.h
arch/arm/mm/fault.c
arch/avr32/boards/favr-32/flash.c
arch/avr32/boards/favr-32/setup.c
arch/avr32/boot/images/Makefile
arch/avr32/configs/atstk1006_defconfig
arch/avr32/mach-at32ap/at32ap700x.c
arch/ia64/hp/sim/Kconfig
arch/ia64/include/asm/acpi-ext.h
arch/ia64/include/asm/sn/acpi.h
arch/ia64/sn/kernel/io_acpi_init.c
arch/ia64/sn/kernel/io_common.c
arch/mips/Kconfig.debug
arch/mips/configs/ip32_defconfig
arch/mips/include/asm/asmmacro.h
arch/mips/include/asm/byteorder.h
arch/mips/include/asm/elf.h
arch/mips/mm/dma-default.c
arch/parisc/include/asm/tlbflush.h
arch/powerpc/boot/Makefile
arch/powerpc/kernel/misc_32.S
arch/powerpc/lib/rheap.c
arch/powerpc/mm/hugetlbpage.c
arch/powerpc/mm/numa.c
arch/powerpc/platforms/cell/axon_msi.c
arch/sh/Kconfig
arch/sparc/include/asm/ptrace_32.h
arch/sparc/include/asm/ptrace_64.h
arch/x86/Kconfig.cpu
arch/x86/include/asm/vmi.h
arch/x86/kernel/acpi/boot.c
arch/x86/kernel/amd_iommu.c
arch/x86/kernel/amd_iommu_init.c
arch/x86/kernel/cpu/mcheck/mce_64.c
arch/x86/kernel/microcode_core.c
arch/x86/kernel/microcode_intel.c
arch/x86/kernel/pci-gart_64.c
arch/x86/kernel/setup.c
arch/x86/kernel/smpboot.c
arch/x86/kernel/vmi_32.c
crypto/async_tx/async_xor.c
drivers/acpi/Makefile
drivers/acpi/acpica/Makefile [new file with mode: 0644]
drivers/acpi/acpica/accommon.h [new file with mode: 0644]
drivers/acpi/acpica/acconfig.h [moved from include/acpi/acconfig.h with 98% similarity]
drivers/acpi/acpica/acdebug.h [moved from include/acpi/acdebug.h with 100% similarity]
drivers/acpi/acpica/acdispat.h [moved from include/acpi/acdispat.h with 100% similarity]
drivers/acpi/acpica/acevents.h [moved from include/acpi/acevents.h with 97% similarity]
drivers/acpi/acpica/acglobal.h [moved from include/acpi/acglobal.h with 97% similarity]
drivers/acpi/acpica/achware.h [moved from include/acpi/achware.h with 89% similarity]
drivers/acpi/acpica/acinterp.h [moved from include/acpi/acinterp.h with 100% similarity]
drivers/acpi/acpica/aclocal.h [moved from include/acpi/aclocal.h with 95% similarity]
drivers/acpi/acpica/acmacros.h [moved from include/acpi/acmacros.h with 83% similarity]
drivers/acpi/acpica/acnamesp.h [moved from include/acpi/acnamesp.h with 98% similarity]
drivers/acpi/acpica/acobject.h [moved from include/acpi/acobject.h with 100% similarity]
drivers/acpi/acpica/acopcode.h [moved from include/acpi/acopcode.h with 100% similarity]
drivers/acpi/acpica/acparser.h [moved from include/acpi/acparser.h with 100% similarity]
drivers/acpi/acpica/acpredef.h [moved from include/acpi/acpredef.h with 100% similarity]
drivers/acpi/acpica/acresrc.h [moved from include/acpi/acresrc.h with 100% similarity]
drivers/acpi/acpica/acstruct.h [moved from include/acpi/acstruct.h with 100% similarity]
drivers/acpi/acpica/actables.h [moved from include/acpi/actables.h with 98% similarity]
drivers/acpi/acpica/acutils.h [moved from include/acpi/acutils.h with 93% similarity]
drivers/acpi/acpica/amlcode.h [moved from include/acpi/amlcode.h with 100% similarity]
drivers/acpi/acpica/amlresrc.h [moved from include/acpi/amlresrc.h with 100% similarity]
drivers/acpi/acpica/dsfield.c [moved from drivers/acpi/dispatcher/dsfield.c with 99% similarity]
drivers/acpi/acpica/dsinit.c [moved from drivers/acpi/dispatcher/dsinit.c with 98% similarity]
drivers/acpi/acpica/dsmethod.c [moved from drivers/acpi/dispatcher/dsmethod.c with 98% similarity]
drivers/acpi/acpica/dsmthdat.c [moved from drivers/acpi/dispatcher/dsmthdat.c with 99% similarity]
drivers/acpi/acpica/dsobject.c [moved from drivers/acpi/dispatcher/dsobject.c with 99% similarity]
drivers/acpi/acpica/dsopcode.c [moved from drivers/acpi/dispatcher/dsopcode.c with 96% similarity]
drivers/acpi/acpica/dsutils.c [moved from drivers/acpi/dispatcher/dsutils.c with 99% similarity]
drivers/acpi/acpica/dswexec.c [moved from drivers/acpi/dispatcher/dswexec.c with 99% similarity]
drivers/acpi/acpica/dswload.c [moved from drivers/acpi/dispatcher/dswload.c with 99% similarity]
drivers/acpi/acpica/dswscope.c [moved from drivers/acpi/dispatcher/dswscope.c with 99% similarity]
drivers/acpi/acpica/dswstate.c [moved from drivers/acpi/dispatcher/dswstate.c with 99% similarity]
drivers/acpi/acpica/evevent.c [moved from drivers/acpi/events/evevent.c with 96% similarity]
drivers/acpi/acpica/evgpe.c [moved from drivers/acpi/events/evgpe.c with 94% similarity]
drivers/acpi/acpica/evgpeblk.c [moved from drivers/acpi/events/evgpeblk.c with 94% similarity]
drivers/acpi/acpica/evmisc.c [moved from drivers/acpi/events/evmisc.c with 93% similarity]
drivers/acpi/acpica/evregion.c [moved from drivers/acpi/events/evregion.c with 91% similarity]
drivers/acpi/acpica/evrgnini.c [moved from drivers/acpi/events/evrgnini.c with 95% similarity]
drivers/acpi/acpica/evsci.c [moved from drivers/acpi/events/evsci.c with 95% similarity]
drivers/acpi/acpica/evxface.c [moved from drivers/acpi/events/evxface.c with 99% similarity]
drivers/acpi/acpica/evxfevnt.c [moved from drivers/acpi/events/evxfevnt.c with 81% similarity]
drivers/acpi/acpica/evxfregn.c [moved from drivers/acpi/events/evxfregn.c with 99% similarity]
drivers/acpi/acpica/exconfig.c [moved from drivers/acpi/executer/exconfig.c with 99% similarity]
drivers/acpi/acpica/exconvrt.c [moved from drivers/acpi/executer/exconvrt.c with 99% similarity]
drivers/acpi/acpica/excreate.c [moved from drivers/acpi/executer/excreate.c with 99% similarity]
drivers/acpi/acpica/exdump.c [moved from drivers/acpi/executer/exdump.c with 99% similarity]
drivers/acpi/acpica/exfield.c [moved from drivers/acpi/executer/exfield.c with 99% similarity]
drivers/acpi/acpica/exfldio.c [moved from drivers/acpi/executer/exfldio.c with 98% similarity]
drivers/acpi/acpica/exmisc.c [moved from drivers/acpi/executer/exmisc.c with 99% similarity]
drivers/acpi/acpica/exmutex.c [moved from drivers/acpi/executer/exmutex.c with 99% similarity]
drivers/acpi/acpica/exnames.c [moved from drivers/acpi/executer/exnames.c with 99% similarity]
drivers/acpi/acpica/exoparg1.c [moved from drivers/acpi/executer/exoparg1.c with 99% similarity]
drivers/acpi/acpica/exoparg2.c [moved from drivers/acpi/executer/exoparg2.c with 99% similarity]
drivers/acpi/acpica/exoparg3.c [moved from drivers/acpi/executer/exoparg3.c with 98% similarity]
drivers/acpi/acpica/exoparg6.c [moved from drivers/acpi/executer/exoparg6.c with 99% similarity]
drivers/acpi/acpica/exprep.c [moved from drivers/acpi/executer/exprep.c with 99% similarity]
drivers/acpi/acpica/exregion.c [moved from drivers/acpi/executer/exregion.c with 99% similarity]
drivers/acpi/acpica/exresnte.c [moved from drivers/acpi/executer/exresnte.c with 98% similarity]
drivers/acpi/acpica/exresolv.c [moved from drivers/acpi/executer/exresolv.c with 99% similarity]
drivers/acpi/acpica/exresop.c [moved from drivers/acpi/executer/exresop.c with 99% similarity]
drivers/acpi/acpica/exstore.c [moved from drivers/acpi/executer/exstore.c with 99% similarity]
drivers/acpi/acpica/exstoren.c [moved from drivers/acpi/executer/exstoren.c with 99% similarity]
drivers/acpi/acpica/exstorob.c [moved from drivers/acpi/executer/exstorob.c with 99% similarity]
drivers/acpi/acpica/exsystem.c [moved from drivers/acpi/executer/exsystem.c with 99% similarity]
drivers/acpi/acpica/exutils.c [moved from drivers/acpi/executer/exutils.c with 99% similarity]
drivers/acpi/acpica/hwacpi.c [moved from drivers/acpi/hardware/hwacpi.c with 99% similarity]
drivers/acpi/acpica/hwgpe.c [moved from drivers/acpi/hardware/hwgpe.c with 86% similarity]
drivers/acpi/acpica/hwregs.c [new file with mode: 0644]
drivers/acpi/acpica/hwsleep.c [moved from drivers/acpi/hardware/hwsleep.c with 91% similarity]
drivers/acpi/acpica/hwtimer.c [moved from drivers/acpi/hardware/hwtimer.c with 99% similarity]
drivers/acpi/acpica/hwxface.c [moved from drivers/acpi/hardware/hwregs.c with 62% similarity]
drivers/acpi/acpica/nsaccess.c [moved from drivers/acpi/namespace/nsaccess.c with 98% similarity]
drivers/acpi/acpica/nsalloc.c [moved from drivers/acpi/namespace/nsalloc.c with 99% similarity]
drivers/acpi/acpica/nsdump.c [moved from drivers/acpi/namespace/nsdump.c with 99% similarity]
drivers/acpi/acpica/nsdumpdv.c [moved from drivers/acpi/namespace/nsdumpdv.c with 99% similarity]
drivers/acpi/acpica/nseval.c [moved from drivers/acpi/namespace/nseval.c with 81% similarity]
drivers/acpi/acpica/nsinit.c [moved from drivers/acpi/namespace/nsinit.c with 99% similarity]
drivers/acpi/acpica/nsload.c [moved from drivers/acpi/namespace/nsload.c with 99% similarity]
drivers/acpi/acpica/nsnames.c [moved from drivers/acpi/namespace/nsnames.c with 99% similarity]
drivers/acpi/acpica/nsobject.c [moved from drivers/acpi/namespace/nsobject.c with 99% similarity]
drivers/acpi/acpica/nsparse.c [moved from drivers/acpi/namespace/nsparse.c with 98% similarity]
drivers/acpi/acpica/nspredef.c [moved from drivers/acpi/namespace/nspredef.c with 76% similarity]
drivers/acpi/acpica/nssearch.c [moved from drivers/acpi/namespace/nssearch.c with 99% similarity]
drivers/acpi/acpica/nsutils.c [moved from drivers/acpi/namespace/nsutils.c with 98% similarity]
drivers/acpi/acpica/nswalk.c [moved from drivers/acpi/namespace/nswalk.c with 99% similarity]
drivers/acpi/acpica/nsxfeval.c [moved from drivers/acpi/namespace/nsxfeval.c with 99% similarity]
drivers/acpi/acpica/nsxfname.c [moved from drivers/acpi/namespace/nsxfname.c with 99% similarity]
drivers/acpi/acpica/nsxfobj.c [moved from drivers/acpi/namespace/nsxfobj.c with 99% similarity]
drivers/acpi/acpica/psargs.c [moved from drivers/acpi/parser/psargs.c with 99% similarity]
drivers/acpi/acpica/psloop.c [moved from drivers/acpi/parser/psloop.c with 99% similarity]
drivers/acpi/acpica/psopcode.c [moved from drivers/acpi/parser/psopcode.c with 99% similarity]
drivers/acpi/acpica/psparse.c [moved from drivers/acpi/parser/psparse.c with 97% similarity]
drivers/acpi/acpica/psscope.c [moved from drivers/acpi/parser/psscope.c with 99% similarity]
drivers/acpi/acpica/pstree.c [moved from drivers/acpi/parser/pstree.c with 99% similarity]
drivers/acpi/acpica/psutils.c [moved from drivers/acpi/parser/psutils.c with 99% similarity]
drivers/acpi/acpica/pswalk.c [moved from drivers/acpi/parser/pswalk.c with 98% similarity]
drivers/acpi/acpica/psxface.c [moved from drivers/acpi/parser/psxface.c with 90% similarity]
drivers/acpi/acpica/rsaddr.c [moved from drivers/acpi/resources/rsaddr.c with 99% similarity]
drivers/acpi/acpica/rscalc.c [moved from drivers/acpi/resources/rscalc.c with 99% similarity]
drivers/acpi/acpica/rscreate.c [moved from drivers/acpi/resources/rscreate.c with 99% similarity]
drivers/acpi/acpica/rsdump.c [moved from drivers/acpi/resources/rsdump.c with 99% similarity]
drivers/acpi/acpica/rsinfo.c [moved from drivers/acpi/resources/rsinfo.c with 99% similarity]
drivers/acpi/acpica/rsio.c [moved from drivers/acpi/resources/rsio.c with 99% similarity]
drivers/acpi/acpica/rsirq.c [moved from drivers/acpi/resources/rsirq.c with 99% similarity]
drivers/acpi/acpica/rslist.c [moved from drivers/acpi/resources/rslist.c with 99% similarity]
drivers/acpi/acpica/rsmemory.c [moved from drivers/acpi/resources/rsmemory.c with 99% similarity]
drivers/acpi/acpica/rsmisc.c [moved from drivers/acpi/resources/rsmisc.c with 99% similarity]
drivers/acpi/acpica/rsutils.c [moved from drivers/acpi/resources/rsutils.c with 99% similarity]
drivers/acpi/acpica/rsxface.c [moved from drivers/acpi/resources/rsxface.c with 99% similarity]
drivers/acpi/acpica/tbfadt.c [moved from drivers/acpi/tables/tbfadt.c with 67% similarity]
drivers/acpi/acpica/tbfind.c [moved from drivers/acpi/tables/tbfind.c with 99% similarity]
drivers/acpi/acpica/tbinstal.c [moved from drivers/acpi/tables/tbinstal.c with 99% similarity]
drivers/acpi/acpica/tbutils.c [moved from drivers/acpi/tables/tbutils.c with 96% similarity]
drivers/acpi/acpica/tbxface.c [moved from drivers/acpi/tables/tbxface.c with 99% similarity]
drivers/acpi/acpica/tbxfroot.c [moved from drivers/acpi/tables/tbxfroot.c with 99% similarity]
drivers/acpi/acpica/utalloc.c [moved from drivers/acpi/utilities/utalloc.c with 99% similarity]
drivers/acpi/acpica/utcopy.c [moved from drivers/acpi/utilities/utcopy.c with 99% similarity]
drivers/acpi/acpica/utdebug.c [moved from drivers/acpi/utilities/utdebug.c with 89% similarity]
drivers/acpi/acpica/utdelete.c [moved from drivers/acpi/utilities/utdelete.c with 99% similarity]
drivers/acpi/acpica/uteval.c [moved from drivers/acpi/utilities/uteval.c with 99% similarity]
drivers/acpi/acpica/utglobal.c [moved from drivers/acpi/utilities/utglobal.c with 99% similarity]
drivers/acpi/acpica/utinit.c [moved from drivers/acpi/utilities/utinit.c with 98% similarity]
drivers/acpi/acpica/utmath.c [moved from drivers/acpi/utilities/utmath.c with 99% similarity]
drivers/acpi/acpica/utmisc.c [moved from drivers/acpi/utilities/utmisc.c with 97% similarity]
drivers/acpi/acpica/utmutex.c [moved from drivers/acpi/utilities/utmutex.c with 99% similarity]
drivers/acpi/acpica/utobject.c [moved from drivers/acpi/utilities/utobject.c with 99% similarity]
drivers/acpi/acpica/utresrc.c [moved from drivers/acpi/utilities/utresrc.c with 99% similarity]
drivers/acpi/acpica/utstate.c [moved from drivers/acpi/utilities/utstate.c with 99% similarity]
drivers/acpi/acpica/utxface.c [moved from drivers/acpi/utilities/utxface.c with 97% similarity]
drivers/acpi/battery.c
drivers/acpi/bus.c
drivers/acpi/cm_sbs.c
drivers/acpi/debug.c
drivers/acpi/dispatcher/Makefile [deleted file]
drivers/acpi/ec.c
drivers/acpi/events/Makefile [deleted file]
drivers/acpi/executer/Makefile [deleted file]
drivers/acpi/hardware/Makefile [deleted file]
drivers/acpi/main.c [moved from drivers/acpi/sleep/main.c with 98% similarity]
drivers/acpi/namespace/Makefile [deleted file]
drivers/acpi/numa.c
drivers/acpi/osl.c
drivers/acpi/parser/Makefile [deleted file]
drivers/acpi/power.c
drivers/acpi/proc.c [moved from drivers/acpi/sleep/proc.c with 92% similarity]
drivers/acpi/reboot.c
drivers/acpi/resources/Makefile [deleted file]
drivers/acpi/sbshc.c
drivers/acpi/scan.c
drivers/acpi/sleep.h [moved from drivers/acpi/sleep/sleep.h with 100% similarity]
drivers/acpi/sleep/Makefile [deleted file]
drivers/acpi/system.c
drivers/acpi/tables/Makefile [deleted file]
drivers/acpi/toshiba_acpi.c
drivers/acpi/utilities/Makefile [deleted file]
drivers/acpi/utilities/utcache.c [deleted file]
drivers/acpi/wakeup.c [moved from drivers/acpi/sleep/wakeup.c with 96% similarity]
drivers/ata/libata-acpi.c
drivers/ata/libata-core.c
drivers/ata/pata_acpi.c
drivers/ata/pata_hpt366.c
drivers/block/cciss.c
drivers/cdrom/cdrom.c
drivers/char/cp437.uni
drivers/char/tpm/tpm_bios.c
drivers/char/vt.c
drivers/char/xilinx_hwicap/buffer_icap.c
drivers/char/xilinx_hwicap/buffer_icap.h
drivers/char/xilinx_hwicap/fifo_icap.c
drivers/char/xilinx_hwicap/fifo_icap.h
drivers/char/xilinx_hwicap/xilinx_hwicap.c
drivers/char/xilinx_hwicap/xilinx_hwicap.h
drivers/dma/dmaengine.c
drivers/dma/ioat_dma.c
drivers/dma/iop-adma.c
drivers/dma/mv_xor.c
drivers/edac/edac_device.c
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/radeon/radeon_irq.c
drivers/i2c/busses/i2c-cpm.c
drivers/i2c/busses/i2c-highlander.c
drivers/i2c/busses/i2c-pmcmsp.c
drivers/i2c/busses/i2c-s3c2410.c
drivers/ide/cs5530.c
drivers/ide/ide-acpi.c
drivers/ide/sc1200.c
drivers/ieee1394/nodemgr.c
drivers/md/bitmap.c
drivers/media/dvb/b2c2/Kconfig
drivers/media/dvb/b2c2/flexcop-fe-tuner.c
drivers/media/dvb/b2c2/flexcop-i2c.c
drivers/media/dvb/bt8xx/Kconfig
drivers/media/dvb/dvb-usb/Kconfig
drivers/media/dvb/dvb-usb/dib0700_devices.c
drivers/media/dvb/ttpci/Kconfig
drivers/media/video/compat_ioctl32.c
drivers/media/video/cx18/Kconfig
drivers/media/video/cx23885/Kconfig
drivers/media/video/cx88/Kconfig
drivers/media/video/em28xx/em28xx-video.c
drivers/media/video/gspca/gspca.c
drivers/media/video/pvrusb2/Kconfig
drivers/media/video/saa7134/Kconfig
drivers/message/fusion/mptscsih.c
drivers/misc/Kconfig
drivers/misc/panasonic-laptop.c
drivers/misc/sony-laptop.c
drivers/misc/tc1100-wmi.c
drivers/misc/thinkpad_acpi.c
drivers/net/bnx2.c
drivers/net/e1000e/ich8lan.c
drivers/net/enc28j60.c
drivers/net/jme.h
drivers/net/phy/mdio_bus.c
drivers/net/ppp_generic.c
drivers/net/starfire.c
drivers/net/sungem.c
drivers/net/tlan.c
drivers/pci/hotplug/acpi_pcihp.c
drivers/pci/hotplug/acpiphp.h
drivers/pci/hotplug/acpiphp_core.c
drivers/pci/hotplug/acpiphp_glue.c
drivers/pci/hotplug/ibmphp_core.c
drivers/pci/hotplug/pciehp.h
drivers/pci/hotplug/pciehp_core.c
drivers/pci/pci-acpi.c
drivers/pci/pcie/aer/aerdrv_core.c
drivers/pcmcia/bfin_cf_pcmcia.c
drivers/pnp/pnpacpi/core.c
drivers/rtc/rtc-isl1208.c
drivers/scsi/aacraid/linit.c
drivers/scsi/device_handler/scsi_dh_hp_sw.c
drivers/scsi/ibmvscsi/ibmvstgt.c
drivers/scsi/libiscsi.c
drivers/scsi/scsi_lib.c
drivers/sh/maple/maple.c
drivers/staging/Kconfig
drivers/usb/class/usbtmc.c
drivers/usb/core/driver.c
drivers/usb/gadget/f_rndis.c
drivers/usb/serial/ftdi_sio.c
drivers/usb/serial/ftdi_sio.h
drivers/usb/serial/pl2303.c
drivers/usb/serial/pl2303.h
drivers/usb/serial/ti_usb_3410_5052.c
drivers/usb/storage/unusual_devs.h
drivers/w1/w1_io.c
fs/9p/fid.c
fs/9p/v9fs.c
fs/9p/vfs_dentry.c
fs/9p/vfs_inode.c
fs/cifs/cifssmb.c
fs/ocfs2/ocfs2_fs.h
fs/ocfs2/xattr.c
include/acpi/acdisasm.h [deleted file]
include/acpi/acexcep.h
include/acpi/acoutput.h
include/acpi/acpi.h
include/acpi/acpiosxf.h
include/acpi/acpixf.h
include/acpi/acrestyp.h [new file with mode: 0644]
include/acpi/actbl.h
include/acpi/actbl1.h
include/acpi/actypes.h
include/acpi/platform/acenv.h
include/acpi/platform/aclinux.h
include/linux/netdevice.h
include/linux/netfilter/nfnetlink_conntrack.h
include/linux/pci_hotplug.h
include/linux/smp.h
include/linux/usb/ch9.h
include/net/irda/irda_device.h
kernel/cgroup.c
kernel/posix-timers.c
kernel/sched_clock.c
lib/dynamic_printk.c
mm/migrate.c
mm/slob.c
net/bluetooth/rfcomm/core.c
net/core/netpoll.c
net/ipv4/netfilter/nf_nat_rule.c
net/ipv4/tcp_vegas.c
net/ipv6/ndisc.c
net/netlabel/netlabel_unlabeled.c
net/phonet/pep-gprs.c
net/sched/sch_netem.c
net/socket.c
sound/pci/hda/patch_sigmatel.c
sound/soc/omap/omap-pcm.c

index d145ccca169a37aa3ff42b06c734d9068525d9d7..c7c7a114c78c795c702f8543c57c7558466a9a4b 100644 (file)
@@ -24,7 +24,7 @@ real bad - it changes the behaviour of all unaligned instructions in user
 space, and might cause programs to fail unexpectedly.
 
 To change the alignment trap behavior, simply echo a number into
-/proc/sys/debug/alignment.  The number is made up from various bits:
+/proc/cpu/alignment.  The number is made up from various bits:
 
 bit            behavior when set
 ---            -----------------
index e0f346d201edb70fae654c55f6be842c4465a5ff..c9115c1b672c6e9eadb9ce59c2c198fea024823c 100644 (file)
@@ -220,14 +220,17 @@ and is between 256 and 4096 characters. It is defined in the file
                        Bits in debug_level correspond to a level in
                        ACPI_DEBUG_PRINT statements, e.g.,
                            ACPI_DEBUG_PRINT((ACPI_DB_INFO, ...
-                       See Documentation/acpi/debug.txt for more information
-                       about debug layers and levels.
+                       The debug_level mask defaults to "info".  See
+                       Documentation/acpi/debug.txt for more information about
+                       debug layers and levels.
 
+                       Enable processor driver info messages:
+                           acpi.debug_layer=0x20000000
+                       Enable PCI/PCI interrupt routing info messages:
+                           acpi.debug_layer=0x400000
                        Enable AML "Debug" output, i.e., stores to the Debug
                        object while interpreting AML:
                            acpi.debug_layer=0xffffffff acpi.debug_level=0x2
-                       Enable PCI/PCI interrupt routing info messages:
-                           acpi.debug_layer=0x400000 acpi.debug_level=0x4
                        Enable all messages related to ACPI hardware:
                            acpi.debug_layer=0x2 acpi.debug_level=0xffffffff
 
index 3cd2ad958176c9e4f4969de00597ea55633d0c2c..394d7d378dc74daf6899621d2bca0c37cdd598cf 100644 (file)
@@ -1063,6 +1063,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
 
        STAC9227/9228/9229/927x
          ref           Reference board
+         ref-no-jd     Reference board without HP/Mic jack detection
          3stack        D965 3stack
          5stack        D965 5stack + SPDIF
          dell-3stack   Dell Dimension E520
@@ -1076,6 +1077,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
 
        STAC92HD73*
          ref           Reference board
+         no-jd         BIOS setup but without jack-detection
          dell-m6-amic  Dell desktops/laptops with analog mics
          dell-m6-dmic  Dell desktops/laptops with digital mics
          dell-m6       Dell desktops/laptops with both type of mics
index 9b22bd14c3481789ac126c34842002ef7093a72a..eac7df94d8e3b7a9367e47f0c74e690502969be7 100644 (file)
@@ -114,11 +114,11 @@ modules.
 Then you must load the gadget serial driver.  To load it as an
 ACM device (recommended for interoperability), do this:
 
-  modprobe g_serial use_acm=1
+  modprobe g_serial
 
 To load it as a vendor specific bulk in/out device, do this:
 
-  modprobe g_serial
+  modprobe g_serial use_acm=0
 
 This will also automatically load the underlying gadget peripheral
 controller driver.  This must be done each time you reboot the gadget
index 077e9032d0cda17b08be1e8f85b496f37cef6b85..fafcd47232600a1a80351fcd5dfc79492e6ce8e9 100644 (file)
@@ -49,8 +49,10 @@ it and 002/048 sometime later.
 
 These files can be read as binary data.  The binary data consists
 of first the device descriptor, then the descriptors for each
-configuration of the device.  That information is also shown in
-text form by the /proc/bus/usb/devices file, described later.
+configuration of the device.  Multi-byte fields in the device and
+configuration descriptors, but not other descriptors, are converted
+to host endianness by the kernel.  This information is also shown
+in text form by the /proc/bus/usb/devices file, described later.
 
 These files may also be used to write user-level drivers for the USB
 devices.  You would open the /proc/bus/usb/BBB/DDD file read/write,
index 2917ce4ffdc4f5df267bdc9b5f239a9679c2e6d4..270481906dc80d1b25a0c29f607ef55e83ae16be 100644 (file)
@@ -34,11 +34,12 @@ if usbmon is built into the kernel.
 Verify that bus sockets are present.
 
 # ls /sys/kernel/debug/usbmon
-0s  0t  0u  1s  1t  1u  2s  2t  2u  3s  3t  3u  4s  4t  4u
+0s  0u  1s  1t  1u  2s  2t  2u  3s  3t  3u  4s  4t  4u
 #
 
-Now you can choose to either use the sockets numbered '0' (to capture packets on
-all buses), and skip to step #3, or find the bus used by your device with step #2.
+Now you can choose to either use the socket '0u' (to capture packets on all
+buses), and skip to step #3, or find the bus used by your device with step #2.
+This allows to filter away annoying devices that talk continuously.
 
 2. Find which bus connects to the desired device
 
@@ -99,8 +100,9 @@ on the event type, but there is a set of words, common for all types.
 
 Here is the list of words, from left to right:
 
-- URB Tag. This is used to identify URBs is normally a kernel mode address
- of the URB structure in hexadecimal.
+- URB Tag. This is used to identify URBs, and is normally an in-kernel address
+  of the URB structure in hexadecimal, but can be a sequence number or any
+  other unique string, within reason.
 
 - Timestamp in microseconds, a decimal number. The timestamp's resolution
   depends on available clock, and so it can be much worse than a microsecond
index 24741de12a39b8d680974f385770842e0b376bf0..fbc8fa58d56d4ec7cd09603341a4941f0a42788c 100644 (file)
@@ -1527,10 +1527,10 @@ W:      http://ebtables.sourceforge.net/
 S:     Maintained
 
 ECRYPT FILE SYSTEM
-P:     Mike Halcrow, Phillip Hellewell
-M:     mhalcrow@us.ibm.com, phillip@hellewell.homeip.net
-L:     ecryptfs-devel@lists.sourceforge.net
-W:     http://ecryptfs.sourceforge.net/
+P:     Tyler Hicks, Dustin Kirkland
+M:     tyhicks@linux.vnet.ibm.com, kirkland@canonical.com
+L:     ecryptfs-devel@lists.launchpad.net
+W:     https://launchpad.net/ecryptfs
 S:     Supported
 
 EDAC-CORE
@@ -2191,9 +2191,9 @@ S:        Supported
 
 INOTIFY
 P:     John McCutchan
-M:     ttb@tentacle.dhs.org
+M:     john@johnmccutchan.com
 P:     Robert Love
-M:     rml@novell.com
+M:     rlove@rlove.org
 L:     linux-kernel@vger.kernel.org
 S:     Maintained
 
@@ -4529,7 +4529,7 @@ S:        Maintained
 USB VIDEO CLASS
 P:     Laurent Pinchart
 M:     laurent.pinchart@skynet.be
-L:     linux-uvc-devel@lists.berlios.de
+L:     linux-uvc-devel@lists.berlios.de (subscribers-only)
 L:     video4linux-list@redhat.com
 W:     http://linux-uvc.berlios.de
 S:     Maintained
index 6c2f51b70454578b8c2210e8069b2e1388d722f8..71e98e9e6acd3fd69d868843a000e7d8fc0363f2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 28
-EXTRAVERSION = -rc8
+EXTRAVERSION =
 NAME = Erotic Pickled Herring
 
 # *DOCUMENTATION*
index 47ccec95f3e867ce5141f7e0db7bdb7f2e57667d..ef12794c3c68f7f2d6be4ec3dcda643540ed091d 100644 (file)
@@ -630,7 +630,7 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq)
                return -ENOMEM;
 
        sachip->clk = clk_get(me, "SA1111_CLK");
-       if (!sachip->clk) {
+       if (IS_ERR(sachip->clk)) {
                ret = PTR_ERR(sachip->clk);
                goto err_free;
        }
index c74f766ffc124406e56ab76918db8bdf4c1e30ec..23af3c972c9a7d202c0a71a340e29067d4ac8d74 100644 (file)
@@ -115,6 +115,8 @@ EXPORT_SYMBOL(__strnlen_user);
 EXPORT_SYMBOL(__strncpy_from_user);
 
 #ifdef CONFIG_MMU
+EXPORT_SYMBOL(copy_page);
+
 EXPORT_SYMBOL(__copy_from_user);
 EXPORT_SYMBOL(__copy_to_user);
 EXPORT_SYMBOL(__clear_user);
@@ -181,8 +183,6 @@ EXPORT_SYMBOL(_find_first_bit_be);
 EXPORT_SYMBOL(_find_next_bit_be);
 #endif
 
-EXPORT_SYMBOL(copy_page);
-
 #ifdef CONFIG_FUNCTION_TRACER
 EXPORT_SYMBOL(mcount);
 #endif
index 57e6874d0b809a21a27afe21d436fa8dca9046e9..79abc4ddc0cf602cf8ae77728fefd8d2080ea826 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/personality.h>
 #include <linux/kallsyms.h>
 #include <linux/delay.h>
+#include <linux/hardirq.h>
 #include <linux/init.h>
 #include <linux/uaccess.h>
 
index 7b8842cfa5fce30753914f538a0d125d2d1a349d..31e6a7b6ad80d27f055b9ce49da0b7e036e06755 100644 (file)
@@ -12,9 +12,8 @@ extern void clear_reset_status(unsigned int mask);
 
 /**
  * init_gpio_reset() - register GPIO as reset generator
- *
- * @gpio - gpio nr
- * @output - set gpio as out/low instead of input during normal work
+ * @gpio: gpio nr
+ * @output: set gpio as out/low instead of input during normal work
  */
 extern int init_gpio_reset(int gpio, int output);
 
index 2df8d9facf5741c060bb9f028c93b7c3bbe33a6e..22c9530e91e2fd8568fa78e1e5aec95ed7a72a24 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/module.h>
 #include <linux/signal.h>
 #include <linux/mm.h>
+#include <linux/hardirq.h>
 #include <linux/init.h>
 #include <linux/kprobes.h>
 #include <linux/uaccess.h>
index 5f139b7cb5f7c0aeb22d7b9b2cdba3b3682702f1..604bbd5e41d9b6c6c98dd7ceec835a345e1b22fd 100644 (file)
@@ -13,7 +13,7 @@
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/physmap.h>
 
-#include <asm/arch/smc.h>
+#include <mach/smc.h>
 
 static struct smc_timing flash_timing __initdata = {
        .ncs_read_setup         = 0,
index 7538f3d2b9e0742a4a5647cc37a5b1fa7f6e611d..1ee4faf0742dba057a8dd6db0eb589e9758d5936 100644 (file)
 
 #include <asm/setup.h>
 
-#include <asm/arch/at32ap700x.h>
-#include <asm/arch/init.h>
-#include <asm/arch/board.h>
-#include <asm/arch/portmux.h>
+#include <mach/at32ap700x.h>
+#include <mach/init.h>
+#include <mach/board.h>
+#include <mach/portmux.h>
 
 /* Oscillator frequencies. These are board-specific */
 unsigned long at32_board_osc_rates[3] = {
index 219720a47bf93772c77d8a57787fe46812bbb006..1848bf0d7f62642568356ded4833102e91724216 100644 (file)
@@ -10,7 +10,7 @@ MKIMAGE               := $(srctree)/scripts/mkuboot.sh
 
 extra-y                := vmlinux.bin vmlinux.gz
 
-OBJCOPYFLAGS_vmlinux.bin := -O binary
+OBJCOPYFLAGS_vmlinux.bin := -O binary -R .note.gnu.build-id
 $(obj)/vmlinux.bin: vmlinux FORCE
        $(call if_changed,objcopy)
 
index 8b6e54c9946aa835c1afb055350b8c3d166f839c..6c45a3b77aa3a877dc327ae0b978c7b42cae2d07 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.27-rc1
-# Tue Aug  5 15:40:26 2008
+# Linux kernel version: 2.6.28-rc8
+# Thu Dec 18 11:22:23 2008
 #
 CONFIG_AVR32=y
 CONFIG_GENERIC_GPIO=y
@@ -67,6 +67,7 @@ CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_SLUB_DEBUG=y
 # CONFIG_SLAB is not set
@@ -77,15 +78,8 @@ CONFIG_PROFILING=y
 CONFIG_OPROFILE=m
 CONFIG_HAVE_OPROFILE=y
 CONFIG_KPROBES=y
-# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
-# CONFIG_HAVE_IOREMAP_PROT is not set
 CONFIG_HAVE_KPROBES=y
-# CONFIG_HAVE_KRETPROBES is not set
-# CONFIG_HAVE_ARCH_TRACEHOOK is not set
-# CONFIG_HAVE_DMA_ATTRS is not set
-# CONFIG_USE_GENERIC_SMP_HELPERS is not set
 CONFIG_HAVE_CLK=y
-CONFIG_PROC_PAGE_MONITOR=y
 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
@@ -118,6 +112,7 @@ CONFIG_DEFAULT_CFQ=y
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="cfq"
 CONFIG_CLASSIC_RCU=y
+CONFIG_FREEZER=y
 
 #
 # System Type and features
@@ -134,6 +129,8 @@ CONFIG_CPU_AT32AP700X=y
 CONFIG_CPU_AT32AP7000=y
 CONFIG_BOARD_ATSTK1000=y
 # CONFIG_BOARD_ATNGW100 is not set
+# CONFIG_BOARD_FAVR_32 is not set
+# CONFIG_BOARD_MIMC200 is not set
 # CONFIG_BOARD_ATSTK1002 is not set
 # CONFIG_BOARD_ATSTK1003 is not set
 # CONFIG_BOARD_ATSTK1004 is not set
@@ -171,14 +168,14 @@ CONFIG_FLATMEM_MANUAL=y
 # CONFIG_SPARSEMEM_MANUAL is not set
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
-# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=0
 CONFIG_NR_QUICK=2
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
 # CONFIG_OWNERSHIP_TRACE is not set
 CONFIG_NMI_DEBUGGING=y
 # CONFIG_HZ_100 is not set
@@ -186,7 +183,7 @@ CONFIG_HZ_250=y
 # CONFIG_HZ_300 is not set
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
-# CONFIG_SCHED_HRTICK is not set
+CONFIG_SCHED_HRTICK=y
 CONFIG_CMDLINE=""
 
 #
@@ -228,6 +225,8 @@ CONFIG_CPU_FREQ_AT32AP=y
 # Executable file formats
 #
 CONFIG_BINFMT_ELF=y
+CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
+# CONFIG_HAVE_AOUT is not set
 # CONFIG_BINFMT_MISC is not set
 CONFIG_NET=y
 
@@ -299,6 +298,7 @@ CONFIG_IPV6_TUNNEL=m
 # CONFIG_ATM is not set
 CONFIG_STP=m
 CONFIG_BRIDGE=m
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 CONFIG_LLC=m
@@ -321,14 +321,8 @@ CONFIG_LLC=m
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-
-#
-# Wireless
-#
-# CONFIG_CFG80211 is not set
-# CONFIG_WIRELESS_EXT is not set
-# CONFIG_MAC80211 is not set
-# CONFIG_IEEE80211 is not set
+# CONFIG_PHONET is not set
+# CONFIG_WIRELESS is not set
 # CONFIG_RFKILL is not set
 # CONFIG_NET_9P is not set
 
@@ -359,6 +353,7 @@ CONFIG_MTD_CMDLINE_PARTS=y
 # User Modules And Translation Layers
 #
 CONFIG_MTD_CHAR=y
+CONFIG_HAVE_MTD_OTP=y
 CONFIG_MTD_BLKDEVS=y
 CONFIG_MTD_BLOCK=y
 # CONFIG_FTL is not set
@@ -407,6 +402,8 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
 # Self-contained MTD device drivers
 #
 CONFIG_MTD_DATAFLASH=m
+# CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set
+CONFIG_MTD_DATAFLASH_OTP=y
 CONFIG_MTD_M25P80=m
 CONFIG_M25PXX_USE_FAST_READ=y
 # CONFIG_MTD_SLRAM is not set
@@ -464,9 +461,10 @@ CONFIG_ATMEL_TCLIB=y
 CONFIG_ATMEL_TCB_CLKSRC=y
 CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0
 # CONFIG_EEPROM_93CX6 is not set
+# CONFIG_ICS932S401 is not set
 CONFIG_ATMEL_SSC=m
 # CONFIG_ENCLOSURE_SERVICES is not set
-# CONFIG_HAVE_IDE is not set
+# CONFIG_C2PORT is not set
 
 #
 # SCSI device support
@@ -548,6 +546,9 @@ CONFIG_MACB=y
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 # CONFIG_B44 is not set
 # CONFIG_NETDEV_1000 is not set
 # CONFIG_NETDEV_10000 is not set
@@ -653,6 +654,7 @@ CONFIG_UNIX98_PTYS=y
 CONFIG_I2C=m
 CONFIG_I2C_BOARDINFO=y
 CONFIG_I2C_CHARDEV=m
+CONFIG_I2C_HELPER_AUTO=y
 CONFIG_I2C_ALGOBIT=m
 
 #
@@ -716,6 +718,10 @@ CONFIG_GPIOLIB=y
 # CONFIG_DEBUG_GPIO is not set
 CONFIG_GPIO_SYSFS=y
 
+#
+# Memory mapped GPIO expanders:
+#
+
 #
 # I2C GPIO expanders:
 #
@@ -745,11 +751,11 @@ CONFIG_WATCHDOG=y
 #
 # CONFIG_SOFT_WATCHDOG is not set
 CONFIG_AT32AP700X_WDT=y
+CONFIG_SSB_POSSIBLE=y
 
 #
 # Sonics Silicon Backplane
 #
-CONFIG_SSB_POSSIBLE=y
 # CONFIG_SSB is not set
 
 #
@@ -758,6 +764,10 @@ CONFIG_SSB_POSSIBLE=y
 # CONFIG_MFD_CORE is not set
 # CONFIG_MFD_SM501 is not set
 # CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
@@ -783,6 +793,7 @@ CONFIG_SSB_POSSIBLE=y
 CONFIG_FB=y
 # CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
@@ -804,10 +815,13 @@ CONFIG_FB_CFB_IMAGEBLIT=y
 # CONFIG_FB_S1D13XXX is not set
 CONFIG_FB_ATMEL=y
 # CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
 CONFIG_BACKLIGHT_LCD_SUPPORT=y
 CONFIG_LCD_CLASS_DEVICE=y
 CONFIG_LCD_LTV350QV=y
 # CONFIG_LCD_ILI9320 is not set
+# CONFIG_LCD_TDO24M is not set
 # CONFIG_LCD_VGG2432A4 is not set
 # CONFIG_LCD_PLATFORM is not set
 # CONFIG_BACKLIGHT_CLASS_DEVICE is not set
@@ -818,6 +832,7 @@ CONFIG_LCD_LTV350QV=y
 # CONFIG_DISPLAY_SUPPORT is not set
 # CONFIG_LOGO is not set
 CONFIG_SOUND=m
+CONFIG_SOUND_OSS_CORE=y
 CONFIG_SND=m
 CONFIG_SND_TIMER=m
 CONFIG_SND_PCM=m
@@ -848,28 +863,32 @@ CONFIG_USB_SUPPORT=y
 # CONFIG_USB_ARCH_HAS_EHCI is not set
 # CONFIG_USB_OTG_WHITELIST is not set
 # CONFIG_USB_OTG_BLACKLIST_HUB is not set
+# CONFIG_USB_MUSB_HDRC is not set
+# CONFIG_USB_GADGET_MUSB_HDRC is not set
 
 #
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
 #
 CONFIG_USB_GADGET=y
 # CONFIG_USB_GADGET_DEBUG is not set
 # CONFIG_USB_GADGET_DEBUG_FILES is not set
 # CONFIG_USB_GADGET_DEBUG_FS is not set
+CONFIG_USB_GADGET_VBUS_DRAW=2
 CONFIG_USB_GADGET_SELECTED=y
-# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_AT91 is not set
 CONFIG_USB_GADGET_ATMEL_USBA=y
 CONFIG_USB_ATMEL_USBA=y
 # CONFIG_USB_GADGET_FSL_USB2 is not set
-# CONFIG_USB_GADGET_NET2280 is not set
-# CONFIG_USB_GADGET_PXA25X is not set
-# CONFIG_USB_GADGET_M66592 is not set
-# CONFIG_USB_GADGET_PXA27X is not set
-# CONFIG_USB_GADGET_GOKU is not set
 # CONFIG_USB_GADGET_LH7A40X is not set
 # CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_PXA25X is not set
+# CONFIG_USB_GADGET_PXA27X is not set
 # CONFIG_USB_GADGET_S3C2410 is not set
-# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_FSL_QE is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_GOKU is not set
 # CONFIG_USB_GADGET_DUMMY_HCD is not set
 CONFIG_USB_GADGET_DUALSPEED=y
 CONFIG_USB_ZERO=m
@@ -887,7 +906,7 @@ CONFIG_MMC=y
 # CONFIG_MMC_UNSAFE_RESUME is not set
 
 #
-# MMC/SD Card Drivers
+# MMC/SD/SDIO Card Drivers
 #
 CONFIG_MMC_BLOCK=y
 CONFIG_MMC_BLOCK_BOUNCE=y
@@ -895,10 +914,11 @@ CONFIG_MMC_BLOCK_BOUNCE=y
 # CONFIG_MMC_TEST is not set
 
 #
-# MMC/SD Host Controller Drivers
+# MMC/SD/SDIO Host Controller Drivers
 #
 # CONFIG_MMC_SDHCI is not set
 CONFIG_MMC_ATMELMCI=y
+# CONFIG_MMC_ATMELMCI_DMA is not set
 CONFIG_MMC_SPI=m
 # CONFIG_MEMSTICK is not set
 CONFIG_NEW_LEDS=y
@@ -918,6 +938,7 @@ CONFIG_LEDS_GPIO=m
 CONFIG_LEDS_TRIGGERS=y
 CONFIG_LEDS_TRIGGER_TIMER=m
 CONFIG_LEDS_TRIGGER_HEARTBEAT=m
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
 CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
 # CONFIG_ACCESSIBILITY is not set
 CONFIG_RTC_LIB=y
@@ -950,25 +971,31 @@ CONFIG_RTC_INTF_DEV=y
 # CONFIG_RTC_DRV_M41T80 is not set
 # CONFIG_RTC_DRV_S35390A is not set
 # CONFIG_RTC_DRV_FM3130 is not set
+# CONFIG_RTC_DRV_RX8581 is not set
 
 #
 # SPI RTC drivers
 #
 # CONFIG_RTC_DRV_M41T94 is not set
 # CONFIG_RTC_DRV_DS1305 is not set
+# CONFIG_RTC_DRV_DS1390 is not set
 # CONFIG_RTC_DRV_MAX6902 is not set
 # CONFIG_RTC_DRV_R9701 is not set
 # CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_DS3234 is not set
 
 #
 # Platform RTC drivers
 #
+# CONFIG_RTC_DRV_DS1286 is not set
 # CONFIG_RTC_DRV_DS1511 is not set
 # CONFIG_RTC_DRV_DS1553 is not set
 # CONFIG_RTC_DRV_DS1742 is not set
 # CONFIG_RTC_DRV_STK17TA8 is not set
 # CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
 # CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
 # CONFIG_RTC_DRV_V3020 is not set
 
 #
@@ -989,6 +1016,8 @@ CONFIG_DMA_ENGINE=y
 # CONFIG_NET_DMA is not set
 CONFIG_DMATEST=m
 # CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # File systems
@@ -998,12 +1027,17 @@ CONFIG_EXT2_FS=m
 # CONFIG_EXT2_FS_XIP is not set
 CONFIG_EXT3_FS=m
 # CONFIG_EXT3_FS_XATTR is not set
-# CONFIG_EXT4DEV_FS is not set
+CONFIG_EXT4_FS=m
+CONFIG_EXT4DEV_COMPAT=y
+# CONFIG_EXT4_FS_XATTR is not set
 CONFIG_JBD=m
 # CONFIG_JBD_DEBUG is not set
+CONFIG_JBD2=m
+# CONFIG_JBD2_DEBUG is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
 # CONFIG_XFS_FS is not set
 # CONFIG_OCFS2_FS is not set
 # CONFIG_DNOTIFY is not set
@@ -1036,6 +1070,7 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
@@ -1054,7 +1089,8 @@ CONFIG_TMPFS=y
 # CONFIG_EFS_FS is not set
 CONFIG_JFFS2_FS=y
 CONFIG_JFFS2_FS_DEBUG=0
-# CONFIG_JFFS2_FS_WRITEBUFFER is not set
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
 # CONFIG_JFFS2_SUMMARY is not set
 # CONFIG_JFFS2_FS_XATTR is not set
 # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
@@ -1088,6 +1124,7 @@ CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
@@ -1185,10 +1222,21 @@ CONFIG_DEBUG_BUGVERBOSE=y
 CONFIG_FRAME_POINTER=y
 # CONFIG_BOOT_PRINTK_DELAY is not set
 # CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 # CONFIG_KPROBES_SANITY_TEST is not set
 # CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
 # CONFIG_LKDTM is not set
 # CONFIG_FAULT_INJECTION is not set
+
+#
+# Tracers
+#
+# CONFIG_IRQSOFF_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
 # CONFIG_SAMPLES is not set
 
 #
@@ -1196,17 +1244,26 @@ CONFIG_FRAME_POINTER=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_CRYPTO=y
 
 #
 # Crypto core or helper
 #
+CONFIG_CRYPTO_FIPS=y
 CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_ALGAPI2=y
 CONFIG_CRYPTO_AEAD=m
+CONFIG_CRYPTO_AEAD2=y
 CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_BLKCIPHER2=y
 CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_RNG=m
+CONFIG_CRYPTO_RNG2=y
 CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_MANAGER2=y
 # CONFIG_CRYPTO_GF128MUL is not set
 # CONFIG_CRYPTO_NULL is not set
 # CONFIG_CRYPTO_CRYPTD is not set
@@ -1257,7 +1314,7 @@ CONFIG_CRYPTO_SHA1=m
 #
 # Ciphers
 #
-# CONFIG_CRYPTO_AES is not set
+CONFIG_CRYPTO_AES=m
 # CONFIG_CRYPTO_ANUBIS is not set
 # CONFIG_CRYPTO_ARC4 is not set
 # CONFIG_CRYPTO_BLOWFISH is not set
@@ -1278,14 +1335,17 @@ CONFIG_CRYPTO_DES=m
 #
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_LZO=y
+
+#
+# Random Number Generation
+#
+CONFIG_CRYPTO_ANSI_CPRNG=m
 # CONFIG_CRYPTO_HW is not set
 
 #
 # Library routines
 #
 CONFIG_BITREVERSE=y
-# CONFIG_GENERIC_FIND_FIRST_BIT is not set
-# CONFIG_GENERIC_FIND_NEXT_BIT is not set
 CONFIG_CRC_CCITT=m
 CONFIG_CRC16=y
 CONFIG_CRC_T10DIF=m
index 0c6e02f80a31ce6cd562aa2147d0144a3e89b913..066252eebf614e98ffb96c1c58705cbb9e35840b 100644 (file)
@@ -967,28 +967,28 @@ static inline void configure_usart0_pins(void)
 {
        u32 pin_mask = (1 << 8) | (1 << 9); /* RXD & TXD */
 
-       select_peripheral(PIOA, pin_mask, PERIPH_B, 0);
+       select_peripheral(PIOA, pin_mask, PERIPH_B, AT32_GPIOF_PULLUP);
 }
 
 static inline void configure_usart1_pins(void)
 {
        u32 pin_mask = (1 << 17) | (1 << 18); /* RXD & TXD */
 
-       select_peripheral(PIOA, pin_mask, PERIPH_A, 0);
+       select_peripheral(PIOA, pin_mask, PERIPH_A, AT32_GPIOF_PULLUP);
 }
 
 static inline void configure_usart2_pins(void)
 {
        u32 pin_mask = (1 << 26) | (1 << 27); /* RXD & TXD */
 
-       select_peripheral(PIOB, pin_mask, PERIPH_B, 0);
+       select_peripheral(PIOB, pin_mask, PERIPH_B, AT32_GPIOF_PULLUP);
 }
 
 static inline void configure_usart3_pins(void)
 {
        u32 pin_mask = (1 << 18) | (1 << 17); /* RXD & TXD */
 
-       select_peripheral(PIOB, pin_mask, PERIPH_B, 0);
+       select_peripheral(PIOB, pin_mask, PERIPH_B, AT32_GPIOF_PULLUP);
 }
 
 static struct platform_device *__initdata at32_usarts[4];
index f92306bbedb848eb146ece3afde7729abdddac13..8d513a8c5266b4db31ef1cb6fd6eb75777c7dda3 100644 (file)
@@ -4,6 +4,7 @@ menu "HP Simulator drivers"
 
 config HP_SIMETH
        bool "Simulated Ethernet "
+       depends on NET
 
 config HP_SIMSERIAL
        bool "Simulated serial driver support"
index 734d137dda6ecb22f1f58c9cc09f6925fe605e03..7f8362b379eb9f5661829de36ca93c38a76d0388 100644 (file)
@@ -14,7 +14,6 @@
 #define _ASM_IA64_ACPI_EXT_H
 
 #include <linux/types.h>
-#include <acpi/actypes.h>
 
 extern acpi_status hp_acpi_csr_space (acpi_handle, u64 *base, u64 *length);
 
index 9ce2801cbd5725a87fa19953d3eed714889febe6..fd480db255659bfe85d8bc29ae9f3dd5ebb3000e 100644 (file)
@@ -9,8 +9,6 @@
 #ifndef _ASM_IA64_SN_ACPI_H
 #define _ASM_IA64_SN_ACPI_H
 
-#include "acpi/acglobal.h"
-
 extern int sn_acpi_rev;
 #define SN_ACPI_BASE_SUPPORT()   (sn_acpi_rev >= 0x20101)
 
index bc610a6c7851bab9c4a58c639cea8d12778724c9..c5a214026a775c5d82e27fddd1c85cad2d883598 100644 (file)
@@ -13,7 +13,6 @@
 #include <asm/sn/sn_sal.h>
 #include "xtalk/hubdev.h"
 #include <linux/acpi.h>
-#include <acpi/acnamesp.h>
 
 
 /*
@@ -64,6 +63,7 @@ static acpi_status __init
 sn_acpi_hubdev_init(acpi_handle handle, u32 depth, void *context, void **ret)
 {
        struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
+       struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL };
        u64 addr;
        struct hubdev_info *hubdev;
        struct hubdev_info *hubdev_ptr;
@@ -77,11 +77,12 @@ sn_acpi_hubdev_init(acpi_handle handle, u32 depth, void *context, void **ret)
        status = acpi_get_vendor_resource(handle, METHOD_NAME__CRS,
                                          &sn_uuid, &buffer);
        if (ACPI_FAILURE(status)) {
+               acpi_get_name(handle, ACPI_FULL_PATHNAME, &name_buffer);
                printk(KERN_ERR
                       "sn_acpi_hubdev_init: acpi_get_vendor_resource() "
-                      "(0x%x) failed for: ", status);
-               acpi_ns_print_node_pathname(handle, NULL);
-               printk("\n");
+                      "(0x%x) failed for: %s\n", status,
+                       (char *)name_buffer.pointer);
+               kfree(name_buffer.pointer);
                return AE_OK;           /* Continue walking namespace */
        }
 
@@ -89,11 +90,12 @@ sn_acpi_hubdev_init(acpi_handle handle, u32 depth, void *context, void **ret)
        vendor = &resource->data.vendor_typed;
        if ((vendor->byte_length - sizeof(struct acpi_vendor_uuid)) !=
            sizeof(struct hubdev_info *)) {
+               acpi_get_name(handle, ACPI_FULL_PATHNAME, &name_buffer);
                printk(KERN_ERR
-                      "sn_acpi_hubdev_init: Invalid vendor data length: %d for: ",
-                       vendor->byte_length);
-               acpi_ns_print_node_pathname(handle, NULL);
-               printk("\n");
+                      "sn_acpi_hubdev_init: Invalid vendor data length: "
+                      "%d for: %s\n",
+                       vendor->byte_length, (char *)name_buffer.pointer);
+               kfree(name_buffer.pointer);
                goto exit;
        }
 
@@ -120,6 +122,7 @@ sn_get_bussoft_ptr(struct pci_bus *bus)
 {
        u64 addr;
        struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
+       struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL };
        acpi_handle handle;
        struct pcibus_bussoft *prom_bussoft_ptr;
        struct acpi_resource *resource;
@@ -131,11 +134,11 @@ sn_get_bussoft_ptr(struct pci_bus *bus)
        status = acpi_get_vendor_resource(handle, METHOD_NAME__CRS,
                                          &sn_uuid, &buffer);
        if (ACPI_FAILURE(status)) {
+               acpi_get_name(handle, ACPI_FULL_PATHNAME, &name_buffer);
                printk(KERN_ERR "%s: "
-                      "acpi_get_vendor_resource() failed (0x%x) for: ",
-                      __func__, status);
-               acpi_ns_print_node_pathname(handle, NULL);
-               printk("\n");
+                      "acpi_get_vendor_resource() failed (0x%x) for: %s\n",
+                      __func__, status, (char *)name_buffer.pointer);
+               kfree(name_buffer.pointer);
                return NULL;
        }
        resource = buffer.pointer;
@@ -168,6 +171,7 @@ sn_extract_device_info(acpi_handle handle, struct pcidev_info **pcidev_info,
 {
        u64 addr;
        struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
+       struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL };
        struct sn_irq_info *irq_info, *irq_info_prom;
        struct pcidev_info *pcidev_ptr, *pcidev_prom_ptr;
        struct acpi_resource *resource;
@@ -182,11 +186,11 @@ sn_extract_device_info(acpi_handle handle, struct pcidev_info **pcidev_info,
        status = acpi_get_vendor_resource(handle, METHOD_NAME__CRS,
                                          &sn_uuid, &buffer);
        if (ACPI_FAILURE(status)) {
+               acpi_get_name(handle, ACPI_FULL_PATHNAME, &name_buffer);
                printk(KERN_ERR
-                      "%s: acpi_get_vendor_resource() failed (0x%x) for: ",
-                       __func__, status);
-               acpi_ns_print_node_pathname(handle, NULL);
-               printk("\n");
+                      "%s: acpi_get_vendor_resource() failed (0x%x) for: %s\n",
+                       __func__, status, (char *)name_buffer.pointer);
+               kfree(name_buffer.pointer);
                return 1;
        }
 
@@ -194,11 +198,12 @@ sn_extract_device_info(acpi_handle handle, struct pcidev_info **pcidev_info,
        vendor = &resource->data.vendor_typed;
        if ((vendor->byte_length - sizeof(struct acpi_vendor_uuid)) !=
            sizeof(struct pci_devdev_info *)) {
+               acpi_get_name(handle, ACPI_FULL_PATHNAME, &name_buffer);
                printk(KERN_ERR
-                      "%s: Invalid vendor data length: %d for: ",
-                       __func__, vendor->byte_length);
-               acpi_ns_print_node_pathname(handle, NULL);
-               printk("\n");
+                      "%s: Invalid vendor data length: %d for: %s\n",
+                        __func__, vendor->byte_length,
+                       (char *)name_buffer.pointer);
+               kfree(name_buffer.pointer);
                ret = 1;
                goto exit;
        }
@@ -239,6 +244,9 @@ get_host_devfn(acpi_handle device_handle, acpi_handle rootbus_handle)
        acpi_handle parent;
        int slot;
        acpi_status status;
+       struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL };
+
+       acpi_get_name(device_handle, ACPI_FULL_PATHNAME, &name_buffer);
 
        /*
         * Do an upward search to find the root bus device, and
@@ -249,9 +257,8 @@ get_host_devfn(acpi_handle device_handle, acpi_handle rootbus_handle)
                status = acpi_get_parent(child, &parent);
                if (ACPI_FAILURE(status)) {
                        printk(KERN_ERR "%s: acpi_get_parent() failed "
-                              "(0x%x) for: ", __func__, status);
-                       acpi_ns_print_node_pathname(child, NULL);
-                       printk("\n");
+                              "(0x%x) for: %s\n", __func__, status,
+                               (char *)name_buffer.pointer);
                        panic("%s: Unable to find host devfn\n", __func__);
                }
                if (parent == rootbus_handle)
@@ -259,22 +266,20 @@ get_host_devfn(acpi_handle device_handle, acpi_handle rootbus_handle)
                child = parent;
        }
        if (!child) {
-               printk(KERN_ERR "%s: Unable to find root bus for: ",
-                      __func__);
-               acpi_ns_print_node_pathname(device_handle, NULL);
-               printk("\n");
+               printk(KERN_ERR "%s: Unable to find root bus for: %s\n",
+                      __func__, (char *)name_buffer.pointer);
                BUG();
        }
 
        status = acpi_evaluate_integer(child, METHOD_NAME__ADR, NULL, &adr);
        if (ACPI_FAILURE(status)) {
-               printk(KERN_ERR "%s: Unable to get _ADR (0x%x) for: ",
-                      __func__, status);
-               acpi_ns_print_node_pathname(child, NULL);
-               printk("\n");
+               printk(KERN_ERR "%s: Unable to get _ADR (0x%x) for: %s\n",
+                      __func__, status, (char *)name_buffer.pointer);
                panic("%s: Unable to find host devfn\n", __func__);
        }
 
+       kfree(name_buffer.pointer);
+
        slot = (adr >> 16) & 0xffff;
        function = adr & 0xffff;
        devfn = PCI_DEVFN(slot, function);
@@ -300,27 +305,28 @@ find_matching_device(acpi_handle handle, u32 lvl, void *context, void **rv)
        int function;
        int slot;
        struct sn_pcidev_match *info = context;
+       struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL };
 
         status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL,
                                        &adr);
         if (ACPI_SUCCESS(status)) {
                status = acpi_get_parent(handle, &parent);
                if (ACPI_FAILURE(status)) {
+                       acpi_get_name(handle, ACPI_FULL_PATHNAME, &name_buffer);
                        printk(KERN_ERR
-                              "%s: acpi_get_parent() failed (0x%x) for: ",
-                                       __func__, status);
-                       acpi_ns_print_node_pathname(handle, NULL);
-                       printk("\n");
+                              "%s: acpi_get_parent() failed (0x%x) for: %s\n",
+                               __func__, status, (char *)name_buffer.pointer);
+                       kfree(name_buffer.pointer);
                        return AE_OK;
                }
                status = acpi_evaluate_integer(parent, METHOD_NAME__BBN,
                                               NULL, &bbn);
                if (ACPI_FAILURE(status)) {
+                       acpi_get_name(handle, ACPI_FULL_PATHNAME, &name_buffer);
                        printk(KERN_ERR
-                         "%s: Failed to find _BBN in parent of: ",
-                                       __func__);
-                       acpi_ns_print_node_pathname(handle, NULL);
-                       printk("\n");
+                         "%s: Failed to find _BBN in parent of: %s\n",
+                                       __func__, (char *)name_buffer.pointer);
+                       kfree(name_buffer.pointer);
                        return AE_OK;
                }
 
@@ -350,24 +356,27 @@ sn_acpi_get_pcidev_info(struct pci_dev *dev, struct pcidev_info **pcidev_info,
        acpi_handle rootbus_handle;
        unsigned long long segment;
        acpi_status status;
+       struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL };
 
        rootbus_handle = PCI_CONTROLLER(dev)->acpi_handle;
         status = acpi_evaluate_integer(rootbus_handle, METHOD_NAME__SEG, NULL,
                                        &segment);
         if (ACPI_SUCCESS(status)) {
                if (segment != pci_domain_nr(dev)) {
+                       acpi_get_name(rootbus_handle, ACPI_FULL_PATHNAME,
+                               &name_buffer);
                        printk(KERN_ERR
-                              "%s: Segment number mismatch, 0x%llx vs 0x%x for: ",
-                              __func__, segment, pci_domain_nr(dev));
-                       acpi_ns_print_node_pathname(rootbus_handle, NULL);
-                       printk("\n");
+                              "%s: Segment number mismatch, 0x%llx vs 0x%x for: %s\n",
+                              __func__, segment, pci_domain_nr(dev),
+                              (char *)name_buffer.pointer);
+                       kfree(name_buffer.pointer);
                        return 1;
                }
        } else {
-               printk(KERN_ERR "%s: Unable to get __SEG from: ",
-                      __func__);
-               acpi_ns_print_node_pathname(rootbus_handle, NULL);
-               printk("\n");
+               acpi_get_name(rootbus_handle, ACPI_FULL_PATHNAME, &name_buffer);
+               printk(KERN_ERR "%s: Unable to get __SEG from: %s\n",
+                      __func__, (char *)name_buffer.pointer);
+               kfree(name_buffer.pointer);
                return 1;
        }
 
index 8a924a5661ddffff994bb59a74762b9f5bd5555a..0d4ffa4da1da755361b5506c945333a246d6a694 100644 (file)
@@ -26,7 +26,6 @@
 #include <linux/acpi.h>
 #include <asm/sn/sn2/sn_hwperf.h>
 #include <asm/sn/acpi.h>
-#include "acpi/acglobal.h"
 
 extern void sn_init_cpei_timer(void);
 extern void register_sn_procfs(void);
@@ -473,7 +472,7 @@ sn_io_early_init(void)
        {
                struct acpi_table_header *header = NULL;
 
-               acpi_get_table_by_index(ACPI_TABLE_INDEX_DSDT, &header);
+               acpi_get_table(ACPI_SIG_DSDT, 1, &header);
                BUG_ON(header == NULL);
                sn_acpi_rev = header->oem_revision;
        }
@@ -505,7 +504,7 @@ sn_io_early_init(void)
 
        {
                struct acpi_table_header *header;
-               (void)acpi_get_table_by_index(ACPI_TABLE_INDEX_DSDT, &header);
+               (void)acpi_get_table(ACPI_SIG_DSDT, 1, &header);
                printk(KERN_INFO "ACPI  DSDT OEM Rev 0x%x\n",
                        header->oem_revision);
        }
index 765c8e287d2b2b45f2687f607c61ecc1d1096cad..364ca89388072bdef9c9083183b329cec5828af7 100644 (file)
@@ -48,7 +48,7 @@ config RUNTIME_DEBUG
        help
          If you say Y here, some debugging macros will do run-time checking.
          If you say N here, those macros will mostly turn to no-ops.  See
-         include/asm-mips/debug.h for debuging macros.
+         arch/mips/include/asm/debug.h for debugging macros.
          If unsure, say N.
 
 endmenu
index fe4699df9626c27fc1113c0d6d9e09c36c7277e8..de4c7a0a96ddde228e6b2806ea5f5a48a8758a4c 100644 (file)
@@ -1,71 +1,71 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.20
-# Tue Feb 20 21:47:33 2007
+# Linux kernel version: 2.6.28-rc7
+# Wed Dec 10 14:39:08 2008
 #
 CONFIG_MIPS=y
 
 #
 # Machine selection
 #
-CONFIG_ZONE_DMA=y
-# CONFIG_MIPS_MTX1 is not set
-# CONFIG_MIPS_BOSPORUS is not set
-# CONFIG_MIPS_PB1000 is not set
-# CONFIG_MIPS_PB1100 is not set
-# CONFIG_MIPS_PB1500 is not set
-# CONFIG_MIPS_PB1550 is not set
-# CONFIG_MIPS_PB1200 is not set
-# CONFIG_MIPS_DB1000 is not set
-# CONFIG_MIPS_DB1100 is not set
-# CONFIG_MIPS_DB1500 is not set
-# CONFIG_MIPS_DB1550 is not set
-# CONFIG_MIPS_DB1200 is not set
-# CONFIG_MIPS_MIRAGE is not set
+# CONFIG_MACH_ALCHEMY is not set
 # CONFIG_BASLER_EXCITE is not set
+# CONFIG_BCM47XX is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MACH_JAZZ is not set
+# CONFIG_LASAT is not set
+# CONFIG_LEMOTE_FULONG is not set
 # CONFIG_MIPS_MALTA is not set
-# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
-# CONFIG_MOMENCO_JAGUAR_ATX is not set
-# CONFIG_MIPS_XXS1500 is not set
+# CONFIG_MACH_EMMA is not set
+# CONFIG_MACH_VR41XX is not set
+# CONFIG_NXP_STB220 is not set
+# CONFIG_NXP_STB225 is not set
 # CONFIG_PNX8550_JBS is not set
 # CONFIG_PNX8550_STB810 is not set
-# CONFIG_MACH_VR41XX is not set
+# CONFIG_PMC_MSP is not set
 # CONFIG_PMC_YOSEMITE is not set
-# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
+# CONFIG_SGI_IP28 is not set
 CONFIG_SGI_IP32=y
-# CONFIG_SIBYTE_BIGSUR is not set
-# CONFIG_SIBYTE_SWARM is not set
-# CONFIG_SIBYTE_SENTOSA is not set
-# CONFIG_SIBYTE_RHONE is not set
-# CONFIG_SIBYTE_CARMEL is not set
-# CONFIG_SIBYTE_LITTLESUR is not set
 # CONFIG_SIBYTE_CRHINE is not set
+# CONFIG_SIBYTE_CARMEL is not set
 # CONFIG_SIBYTE_CRHONE is not set
+# CONFIG_SIBYTE_RHONE is not set
+# CONFIG_SIBYTE_SWARM is not set
+# CONFIG_SIBYTE_LITTLESUR is not set
+# CONFIG_SIBYTE_SENTOSA is not set
+# CONFIG_SIBYTE_BIGSUR is not set
 # CONFIG_SNI_RM is not set
-# CONFIG_TOSHIBA_JMR3927 is not set
-# CONFIG_TOSHIBA_RBTX4927 is not set
-# CONFIG_TOSHIBA_RBTX4938 is not set
+# CONFIG_MACH_TX39XX is not set
+# CONFIG_MACH_TX49XX is not set
+# CONFIG_MIKROTIK_RB532 is not set
+# CONFIG_WR_PPMC is not set
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # CONFIG_ARCH_HAS_ILOG2_U32 is not set
 # CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_ARCH_SUPPORTS_OPROFILE=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CMOS_UPDATE=y
 CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 # CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
 CONFIG_ARC=y
+CONFIG_CEVT_R4K=y
+CONFIG_CSRC_R4K=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
+# CONFIG_HOTPLUG_CPU is not set
+# CONFIG_NO_IOPORT is not set
 CONFIG_CPU_BIG_ENDIAN=y
 # CONFIG_CPU_LITTLE_ENDIAN is not set
 CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
+CONFIG_IRQ_CPU=y
 CONFIG_ARC32=y
 CONFIG_BOOT_ELF32=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
@@ -75,6 +75,7 @@ CONFIG_ARC_PROMLIB=y
 #
 # CPU selection
 #
+# CONFIG_CPU_LOONGSON2 is not set
 # CONFIG_CPU_MIPS32_R1 is not set
 # CONFIG_CPU_MIPS32_R2 is not set
 # CONFIG_CPU_MIPS64_R1 is not set
@@ -87,6 +88,7 @@ CONFIG_ARC_PROMLIB=y
 # CONFIG_CPU_TX49XX is not set
 CONFIG_CPU_R5000=y
 # CONFIG_CPU_R5432 is not set
+# CONFIG_CPU_R5500 is not set
 # CONFIG_CPU_R6000 is not set
 # CONFIG_CPU_NEVADA is not set
 # CONFIG_CPU_R8000 is not set
@@ -116,65 +118,73 @@ CONFIG_RM7000_CPU_SCACHE=y
 CONFIG_MIPS_MT_DISABLED=y
 # CONFIG_MIPS_MT_SMP is not set
 # CONFIG_MIPS_MT_SMTC is not set
-# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
 # CONFIG_DISCONTIGMEM_MANUAL is not set
 # CONFIG_SPARSEMEM_MANUAL is not set
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 CONFIG_RESOURCES_64BIT=y
-CONFIG_ZONE_DMA_FLAG=1
+CONFIG_PHYS_ADDR_T_64BIT=y
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
-# CONFIG_HZ_250 is not set
+CONFIG_HZ_250=y
 # CONFIG_HZ_256 is not set
-CONFIG_HZ_1000=y
+# CONFIG_HZ_1000 is not set
 # CONFIG_HZ_1024 is not set
 CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
-CONFIG_HZ=1000
-# CONFIG_PREEMPT_NONE is not set
-CONFIG_PREEMPT_VOLUNTARY=y
+CONFIG_HZ=250
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
 # CONFIG_KEXEC is not set
+# CONFIG_SECCOMP is not set
 CONFIG_LOCKDEP_SUPPORT=y
 CONFIG_STACKTRACE_SUPPORT=y
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
-# Code maturity level options
+# General setup
 #
 CONFIG_EXPERIMENTAL=y
 CONFIG_BROKEN_ON_SMP=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
 CONFIG_LOCALVERSION=""
 CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
-# CONFIG_IPC_NS is not set
 CONFIG_SYSVIPC_SYSCTL=y
-# CONFIG_POSIX_MQUEUE is not set
+CONFIG_POSIX_MQUEUE=y
 CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
 # CONFIG_TASKSTATS is not set
-# CONFIG_UTS_NS is not set
-# CONFIG_AUDIT is not set
-# CONFIG_IKCONFIG is not set
+CONFIG_AUDIT=y
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_GROUP_SCHED is not set
 CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
 CONFIG_RELAY=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+# CONFIG_NAMESPACES is not set
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_SYSCTL=y
 CONFIG_EMBEDDED=y
 CONFIG_SYSCTL_SYSCALL=y
@@ -184,27 +194,43 @@ CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
+CONFIG_PCSPKR_PLATFORM=y
+CONFIG_COMPAT_BRK=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
 CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
-CONFIG_SLAB=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_PCI_QUIRKS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_PROFILING=y
+# CONFIG_MARKERS is not set
+CONFIG_OPROFILE=m
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
+CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
-
-#
-# Loadable module support
-#
-# CONFIG_MODULES is not set
-
-#
-# Block layer
-#
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
 CONFIG_BLOCK=y
 # CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+CONFIG_BLOCK_COMPAT=y
 
 #
 # IO Schedulers
@@ -213,59 +239,50 @@ CONFIG_IOSCHED_NOOP=y
 CONFIG_IOSCHED_AS=y
 CONFIG_IOSCHED_DEADLINE=y
 CONFIG_IOSCHED_CFQ=y
-CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_AS is not set
 # CONFIG_DEFAULT_DEADLINE is not set
-# CONFIG_DEFAULT_CFQ is not set
+CONFIG_DEFAULT_CFQ=y
 # CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="anticipatory"
+CONFIG_DEFAULT_IOSCHED="cfq"
+CONFIG_CLASSIC_RCU=y
+# CONFIG_FREEZER is not set
 
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
 CONFIG_HW_HAS_PCI=y
 CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCI_LEGACY is not set
 CONFIG_MMU=y
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
 # CONFIG_PCCARD is not set
-
-#
-# PCI Hotplug Support
-#
 # CONFIG_HOTPLUG_PCI is not set
 
 #
 # Executable file formats
 #
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+# CONFIG_HAVE_AOUT is not set
 CONFIG_BINFMT_MISC=y
-# CONFIG_BUILD_ELF64 is not set
 CONFIG_MIPS32_COMPAT=y
 CONFIG_COMPAT=y
 CONFIG_SYSVIPC_COMPAT=y
 CONFIG_MIPS32_O32=y
-# CONFIG_MIPS32_N32 is not set
+CONFIG_MIPS32_N32=y
 CONFIG_BINFMT_ELF32=y
 
 #
 # Power management options
 #
-CONFIG_PM=y
-# CONFIG_PM_LEGACY is not set
-# CONFIG_PM_DEBUG is not set
-# CONFIG_PM_SYSFS_DEPRECATED is not set
-
-#
-# Networking
-#
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+# CONFIG_PM is not set
 CONFIG_NET=y
 
 #
 # Networking options
 #
-# CONFIG_NETDEBUG is not set
 CONFIG_PACKET=y
 CONFIG_PACKET_MMAP=y
 CONFIG_UNIX=y
@@ -273,56 +290,83 @@ CONFIG_XFRM=y
 CONFIG_XFRM_USER=y
 # CONFIG_XFRM_SUB_POLICY is not set
 CONFIG_XFRM_MIGRATE=y
+# CONFIG_XFRM_STATISTICS is not set
+CONFIG_XFRM_IPCOMP=m
 CONFIG_NET_KEY=y
 CONFIG_NET_KEY_MIGRATE=y
 CONFIG_INET=y
-# CONFIG_IP_MULTICAST is not set
+CONFIG_IP_MULTICAST=y
 # CONFIG_IP_ADVANCED_ROUTER is not set
 CONFIG_IP_FIB_HASH=y
 CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_DHCP is not set
+CONFIG_IP_PNP_DHCP=y
 CONFIG_IP_PNP_BOOTP=y
 # CONFIG_IP_PNP_RARP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
+CONFIG_NET_IPIP=m
+CONFIG_NET_IPGRE=m
+# CONFIG_NET_IPGRE_BROADCAST is not set
+# CONFIG_IP_MROUTE is not set
 # CONFIG_ARPD is not set
 # CONFIG_SYN_COOKIES is not set
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-# CONFIG_INET_XFRM_TUNNEL is not set
-# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_AH=m
+CONFIG_INET_ESP=m
+CONFIG_INET_IPCOMP=m
+CONFIG_INET_XFRM_TUNNEL=m
+CONFIG_INET_TUNNEL=m
 CONFIG_INET_XFRM_MODE_TRANSPORT=y
 CONFIG_INET_XFRM_MODE_TUNNEL=y
 CONFIG_INET_XFRM_MODE_BEET=y
+# CONFIG_INET_LRO is not set
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
-# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_ADVANCED=y
+CONFIG_TCP_CONG_BIC=m
 CONFIG_TCP_CONG_CUBIC=y
+CONFIG_TCP_CONG_WESTWOOD=m
+CONFIG_TCP_CONG_HTCP=m
+# CONFIG_TCP_CONG_HSTCP is not set
+# CONFIG_TCP_CONG_HYBLA is not set
+# CONFIG_TCP_CONG_VEGAS is not set
+# CONFIG_TCP_CONG_SCALABLE is not set
+# CONFIG_TCP_CONG_LP is not set
+# CONFIG_TCP_CONG_VENO is not set
+# CONFIG_TCP_CONG_YEAH is not set
+# CONFIG_TCP_CONG_ILLINOIS is not set
+# CONFIG_DEFAULT_BIC is not set
+CONFIG_DEFAULT_CUBIC=y
+# CONFIG_DEFAULT_HTCP is not set
+# CONFIG_DEFAULT_VEGAS is not set
+# CONFIG_DEFAULT_WESTWOOD is not set
+# CONFIG_DEFAULT_RENO is not set
 CONFIG_DEFAULT_TCP_CONG="cubic"
 CONFIG_TCP_MD5SIG=y
-# CONFIG_IPV6 is not set
-# CONFIG_INET6_XFRM_TUNNEL is not set
-# CONFIG_INET6_TUNNEL is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+# CONFIG_IPV6_MIP6 is not set
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_NDISC_NODETYPE=y
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_IPV6_MROUTE is not set
 CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
-
-#
-# DCCP Configuration (EXPERIMENTAL)
-#
 # CONFIG_IP_DCCP is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
 # CONFIG_IP_SCTP is not set
-
-#
-# TIPC Configuration (EXPERIMENTAL)
-#
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 # CONFIG_LLC2 is not set
@@ -332,10 +376,6 @@ CONFIG_NETWORK_SECMARK=y
 # CONFIG_LAPB is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
 # CONFIG_NET_SCHED is not set
 
 #
@@ -343,15 +383,14 @@ CONFIG_NETWORK_SECMARK=y
 #
 # CONFIG_NET_PKTGEN is not set
 # CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
-CONFIG_IEEE80211=y
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=y
-CONFIG_IEEE80211_CRYPT_CCMP=y
-CONFIG_IEEE80211_SOFTMAC=y
-# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
-CONFIG_WIRELESS_EXT=y
+# CONFIG_AF_RXRPC is not set
+# CONFIG_PHONET is not set
+# CONFIG_WIRELESS is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
 
 #
 # Device Drivers
@@ -360,60 +399,40 @@ CONFIG_WIRELESS_EXT=y
 #
 # Generic Driver Options
 #
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
 # CONFIG_SYS_HYPERVISOR is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
 CONFIG_CONNECTOR=y
 CONFIG_PROC_EVENTS=y
-
-#
-# Memory Technology Devices (MTD)
-#
 # CONFIG_MTD is not set
-
-#
-# Parallel port support
-#
 # CONFIG_PARPORT is not set
-
-#
-# Plug and Play support
-#
-# CONFIG_PNPACPI is not set
-
-#
-# Block devices
-#
+CONFIG_BLK_DEV=y
 # CONFIG_BLK_CPQ_DA is not set
 # CONFIG_BLK_CPQ_CISS_DA is not set
 # CONFIG_BLK_DEV_DAC960 is not set
 # CONFIG_BLK_DEV_UMEM is not set
 # CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=y
-# CONFIG_BLK_DEV_CRYPTOLOOP is not set
-# CONFIG_BLK_DEV_NBD is not set
+CONFIG_BLK_DEV_LOOP=m
+CONFIG_BLK_DEV_CRYPTOLOOP=m
+CONFIG_BLK_DEV_NBD=m
 # CONFIG_BLK_DEV_SX8 is not set
 # CONFIG_BLK_DEV_RAM is not set
-# CONFIG_BLK_DEV_INITRD is not set
-CONFIG_CDROM_PKTCDVD=y
-CONFIG_CDROM_PKTCDVD_BUFFERS=8
-# CONFIG_CDROM_PKTCDVD_WCACHE is not set
-CONFIG_ATA_OVER_ETH=y
-
-#
-# Misc devices
-#
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_BLK_DEV_HD is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_PHANTOM is not set
+# CONFIG_EEPROM_93CX6 is not set
 CONFIG_SGI_IOC4=y
 # CONFIG_TIFM_CORE is not set
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
+# CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_HP_ILO is not set
+# CONFIG_C2PORT is not set
+CONFIG_HAVE_IDE=y
 # CONFIG_IDE is not set
 
 #
@@ -421,19 +440,20 @@ CONFIG_SGI_IOC4=y
 #
 CONFIG_RAID_ATTRS=y
 CONFIG_SCSI=y
+CONFIG_SCSI_DMA=y
 CONFIG_SCSI_TGT=y
-CONFIG_SCSI_NETLINK=y
+# CONFIG_SCSI_NETLINK is not set
 CONFIG_SCSI_PROC_FS=y
 
 #
 # SCSI support type (disk, tape, CD-ROM)
 #
 CONFIG_BLK_DEV_SD=y
-CONFIG_CHR_DEV_ST=y
-CONFIG_CHR_DEV_OSST=y
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
 CONFIG_BLK_DEV_SR=y
 CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=y
+CONFIG_CHR_DEV_SG=m
 # CONFIG_CHR_DEV_SCH is not set
 
 #
@@ -443,35 +463,36 @@ CONFIG_SCSI_MULTI_LUN=y
 CONFIG_SCSI_CONSTANTS=y
 CONFIG_SCSI_LOGGING=y
 CONFIG_SCSI_SCAN_ASYNC=y
+CONFIG_SCSI_WAIT_SCAN=m
 
 #
 # SCSI Transports
 #
 CONFIG_SCSI_SPI_ATTRS=y
-CONFIG_SCSI_FC_ATTRS=y
+# CONFIG_SCSI_FC_ATTRS is not set
 # CONFIG_SCSI_ISCSI_ATTRS is not set
 CONFIG_SCSI_SAS_ATTRS=y
 CONFIG_SCSI_SAS_LIBSAS=y
+CONFIG_SCSI_SAS_HOST_SMP=y
 # CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
-
-#
-# SCSI low-level drivers
-#
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
 # CONFIG_ISCSI_TCP is not set
 # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
 # CONFIG_SCSI_3W_9XXX is not set
 # CONFIG_SCSI_ACARD is not set
 # CONFIG_SCSI_AACRAID is not set
 CONFIG_SCSI_AIC7XXX=y
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=8
+CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
 CONFIG_AIC7XXX_RESET_DELAY_MS=15000
 CONFIG_AIC7XXX_DEBUG_ENABLE=y
 CONFIG_AIC7XXX_DEBUG_MASK=0
 CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
 # CONFIG_SCSI_AIC7XXX_OLD is not set
 # CONFIG_SCSI_AIC79XX is not set
-CONFIG_SCSI_AIC94XX=y
-# CONFIG_AIC94XX_DEBUG is not set
+# CONFIG_SCSI_AIC94XX is not set
+# CONFIG_SCSI_DPT_I2O is not set
+# CONFIG_SCSI_ADVANSYS is not set
 # CONFIG_SCSI_ARCMSR is not set
 # CONFIG_MEGARAID_NEWGEN is not set
 # CONFIG_MEGARAID_LEGACY is not set
@@ -482,6 +503,7 @@ CONFIG_SCSI_AIC94XX=y
 # CONFIG_SCSI_IPS is not set
 # CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_MVSAS is not set
 # CONFIG_SCSI_STEX is not set
 # CONFIG_SCSI_SYM53C8XX_2 is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
@@ -492,147 +514,81 @@ CONFIG_SCSI_AIC94XX=y
 # CONFIG_SCSI_DC390T is not set
 # CONFIG_SCSI_DEBUG is not set
 # CONFIG_SCSI_SRP is not set
-
-#
-# Serial ATA (prod) and Parallel ATA (experimental) drivers
-#
+# CONFIG_SCSI_DH is not set
 # CONFIG_ATA is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
 # CONFIG_MD is not set
-
-#
-# Fusion MPT device support
-#
 # CONFIG_FUSION is not set
-# CONFIG_FUSION_SPI is not set
-# CONFIG_FUSION_FC is not set
-# CONFIG_FUSION_SAS is not set
 
 #
 # IEEE 1394 (FireWire) support
 #
-# CONFIG_IEEE1394 is not set
 
 #
-# I2O device support
+# Enable only one of the two stacks, unless you know what you are doing
 #
+# CONFIG_FIREWIRE is not set
+# CONFIG_IEEE1394 is not set
 # CONFIG_I2O is not set
-
-#
-# Network device support
-#
 CONFIG_NETDEVICES=y
-# CONFIG_DUMMY is not set
-# CONFIG_BONDING is not set
+CONFIG_DUMMY=m
+CONFIG_BONDING=m
+# CONFIG_MACVLAN is not set
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
-
-#
-# ARCnet devices
-#
+# CONFIG_VETH is not set
 # CONFIG_ARCNET is not set
-
-#
-# PHY device support
-#
-CONFIG_PHYLIB=y
-
-#
-# MII PHY device drivers
-#
-CONFIG_MARVELL_PHY=y
-CONFIG_DAVICOM_PHY=y
-CONFIG_QSEMI_PHY=y
-CONFIG_LXT_PHY=y
-CONFIG_CICADA_PHY=y
-CONFIG_VITESSE_PHY=y
-CONFIG_SMSC_PHY=y
-# CONFIG_BROADCOM_PHY is not set
-# CONFIG_FIXED_PHY is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
+# CONFIG_PHYLIB is not set
 CONFIG_NET_ETHERNET=y
-# CONFIG_MII is not set
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
 CONFIG_SGI_O2MACE_ETH=y
 # CONFIG_HAPPYMEAL is not set
 # CONFIG_SUNGEM is not set
 # CONFIG_CASSINI is not set
 # CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_SMC91X is not set
 # CONFIG_DM9000 is not set
-
-#
-# Tulip family network device support
-#
-# CONFIG_NET_TULIP is not set
+CONFIG_NET_TULIP=y
+CONFIG_DE2104X=m
+CONFIG_TULIP=m
+# CONFIG_TULIP_MWI is not set
+CONFIG_TULIP_MMIO=y
+# CONFIG_TULIP_NAPI is not set
+# CONFIG_DE4X5 is not set
+# CONFIG_WINBOND_840 is not set
+# CONFIG_DM9102 is not set
+# CONFIG_ULI526X is not set
 # CONFIG_HP100 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 # CONFIG_NET_PCI is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_E1000 is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_R8169 is not set
-# CONFIG_SIS190 is not set
-# CONFIG_SKGE is not set
-# CONFIG_SKY2 is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_TIGON3 is not set
-# CONFIG_BNX2 is not set
-CONFIG_QLA3XXX=y
-# CONFIG_ATL1 is not set
-
-#
-# Ethernet (10000 Mbit)
-#
-# CONFIG_CHELSIO_T1 is not set
-CONFIG_CHELSIO_T3=y
-# CONFIG_IXGB is not set
-# CONFIG_S2IO is not set
-# CONFIG_MYRI10GE is not set
-CONFIG_NETXEN_NIC=y
-
-#
-# Token Ring devices
-#
+# CONFIG_B44 is not set
+# CONFIG_ATL2 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
 # CONFIG_TR is not set
 
 #
-# Wireless LAN (non-hamradio)
-#
-# CONFIG_NET_RADIO is not set
-
-#
-# Wan interfaces
+# Wireless LAN
 #
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+# CONFIG_IWLWIFI_LEDS is not set
 # CONFIG_WAN is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 # CONFIG_NET_FC is not set
-# CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 # CONFIG_NETPOLL is not set
 # CONFIG_NET_POLL_CONTROLLER is not set
-
-#
-# ISDN subsystem
-#
 # CONFIG_ISDN is not set
-
-#
-# Telephony Support
-#
 # CONFIG_PHONE is not set
 
 #
@@ -640,6 +596,7 @@ CONFIG_NETXEN_NIC=y
 #
 CONFIG_INPUT=y
 # CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
 
 #
 # Userland interfaces
@@ -649,16 +606,32 @@ CONFIG_INPUT_MOUSEDEV_PSAUX=y
 CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_TSDEV is not set
-# CONFIG_INPUT_EVDEV is not set
+CONFIG_INPUT_EVDEV=m
 # CONFIG_INPUT_EVBUG is not set
 
 #
 # Input Device Drivers
 #
-# CONFIG_INPUT_KEYBOARD is not set
-# CONFIG_INPUT_MOUSE is not set
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+CONFIG_MOUSE_PS2_ALPS=y
+CONFIG_MOUSE_PS2_LOGIPS2PP=y
+CONFIG_MOUSE_PS2_SYNAPTICS=y
+CONFIG_MOUSE_PS2_LIFEBOOK=y
+CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_ELANTECH is not set
+# CONFIG_MOUSE_PS2_TOUCHKIT is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_VSXXXAA is not set
 # CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
 # CONFIG_INPUT_TOUCHSCREEN is not set
 # CONFIG_INPUT_MISC is not set
 
@@ -669,8 +642,8 @@ CONFIG_SERIO=y
 # CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_PCIPS2 is not set
-# CONFIG_SERIO_MACEPS2 is not set
-# CONFIG_SERIO_LIBPS2 is not set
+CONFIG_SERIO_MACEPS2=y
+CONFIG_SERIO_LIBPS2=y
 CONFIG_SERIO_RAW=y
 # CONFIG_GAMEPORT is not set
 
@@ -678,10 +651,13 @@ CONFIG_SERIO_RAW=y
 # Character devices
 #
 CONFIG_VT=y
+# CONFIG_CONSOLE_TRANSLATIONS is not set
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
-CONFIG_VT_HW_CONSOLE_BINDING=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
 # CONFIG_SERIAL_NONSTANDARD is not set
+# CONFIG_NOZOMI is not set
 
 #
 # Serial drivers
@@ -702,192 +678,304 @@ CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
-
-#
-# IPMI
-#
 # CONFIG_IPMI_HANDLER is not set
-
-#
-# Watchdog Cards
-#
-# CONFIG_WATCHDOG is not set
-# CONFIG_HW_RANDOM is not set
-# CONFIG_RTC is not set
-# CONFIG_GEN_RTC is not set
-# CONFIG_DTLK is not set
+CONFIG_HW_RANDOM=y
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
-# CONFIG_DRM is not set
 # CONFIG_RAW_DRIVER is not set
-
-#
-# TPM devices
-#
 # CONFIG_TCG_TPM is not set
+CONFIG_DEVPORT=y
+# CONFIG_I2C is not set
+# CONFIG_SPI is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_I5K_AMB is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_F71882FG is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_SIS5595 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_VIA686A is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_SENSORS_VT8231 is not set
+# CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+# CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
 
 #
-# I2C support
+# Watchdog Device Drivers
 #
-# CONFIG_I2C is not set
+# CONFIG_SOFT_WATCHDOG is not set
+# CONFIG_ALIM7101_WDT is not set
 
 #
-# SPI support
+# PCI-based Watchdog Cards
 #
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
+# CONFIG_PCIPCWATCHDOG is not set
+# CONFIG_WDTPCI is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
-# Dallas's 1-wire bus
+# Sonics Silicon Backplane
 #
-# CONFIG_W1 is not set
+# CONFIG_SSB is not set
 
 #
-# Hardware Monitoring support
+# Multifunction device drivers
 #
-# CONFIG_HWMON is not set
-# CONFIG_HWMON_VID is not set
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
 #
-# CONFIG_VIDEO_DEV is not set
 
 #
-# Digital Video Broadcasting Devices
+# Multimedia core support
 #
-# CONFIG_DVB is not set
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L2_COMMON=m
+CONFIG_VIDEO_ALLOW_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+# CONFIG_DVB_CORE is not set
+CONFIG_VIDEO_MEDIA=m
 
 #
-# Graphics support
+# Multimedia drivers
 #
-# CONFIG_FIRMWARE_EDID is not set
-# CONFIG_FB is not set
+# CONFIG_MEDIA_ATTACH is not set
+CONFIG_VIDEO_V4L2=m
+CONFIG_VIDEO_V4L1=m
+CONFIG_VIDEOBUF_GEN=m
+CONFIG_VIDEOBUF_VMALLOC=m
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+CONFIG_VIDEO_VIVI=m
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_STRADIS is not set
+# CONFIG_SOC_CAMERA is not set
+CONFIG_RADIO_ADAPTERS=y
+# CONFIG_RADIO_GEMTEK_PCI is not set
+# CONFIG_RADIO_MAXIRADIO is not set
+# CONFIG_RADIO_MAESTRO is not set
+CONFIG_DAB=y
 
 #
-# Console display driver support
+# Graphics support
 #
-# CONFIG_VGA_CONSOLE is not set
-CONFIG_DUMMY_CONSOLE=y
+# CONFIG_DRM is not set
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=y
+CONFIG_FB=y
+CONFIG_FIRMWARE_EDID=y
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_CIRRUS is not set
+# CONFIG_FB_PM2 is not set
+# CONFIG_FB_CYBER2000 is not set
+# CONFIG_FB_ASILIANT is not set
+# CONFIG_FB_IMSTT is not set
+# CONFIG_FB_UVESA is not set
+CONFIG_FB_GBE=y
+CONFIG_FB_GBE_MEM=4
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_NVIDIA is not set
+# CONFIG_FB_RIVA is not set
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_RADEON is not set
+# CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
+# CONFIG_FB_S3 is not set
+# CONFIG_FB_SAVAGE is not set
+# CONFIG_FB_SIS is not set
+# CONFIG_FB_VIA is not set
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_KYRO is not set
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_VT8623 is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_ARK is not set
+# CONFIG_FB_PM3 is not set
+# CONFIG_FB_CARMINE is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
-# Sound
+# Display device support
 #
-# CONFIG_SOUND is not set
+# CONFIG_DISPLAY_SUPPORT is not set
 
 #
-# HID Devices
+# Console display driver support
 #
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+# CONFIG_LOGO_LINUX_CLUT224 is not set
+CONFIG_LOGO_SGI_CLUT224=y
+# CONFIG_SOUND is not set
+CONFIG_HID_SUPPORT=y
 CONFIG_HID=y
 # CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+# CONFIG_HID_PID is not set
 
 #
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB_ARCH_HAS_EHCI=y
-# CONFIG_USB is not set
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
+# Special HID drivers
 #
+CONFIG_HID_COMPAT=y
+# CONFIG_USB_SUPPORT is not set
+# CONFIG_UWB is not set
 # CONFIG_MMC is not set
-
-#
-# LED devices
-#
+# CONFIG_MEMSTICK is not set
 # CONFIG_NEW_LEDS is not set
-
-#
-# LED drivers
-#
-
-#
-# LED Triggers
-#
-
-#
-# InfiniBand support
-#
+# CONFIG_ACCESSIBILITY is not set
 # CONFIG_INFINIBAND is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+# CONFIG_RTC_HCTOSYS is not set
+# CONFIG_RTC_DEBUG is not set
 
 #
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+# RTC interfaces
 #
+# CONFIG_RTC_INTF_SYSFS is not set
+# CONFIG_RTC_INTF_PROC is not set
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
 
 #
-# Real Time Clock
+# SPI RTC drivers
 #
-# CONFIG_RTC_CLASS is not set
 
 #
-# DMA Engine support
+# Platform RTC drivers
 #
-# CONFIG_DMA_ENGINE is not set
+CONFIG_RTC_DRV_CMOS=y
+# CONFIG_RTC_DRV_DS1286 is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
+# CONFIG_RTC_DRV_V3020 is not set
 
 #
-# DMA Clients
-#
-
-#
-# DMA Devices
-#
-
-#
-# Auxiliary Display support
-#
-
-#
-# Virtualization
+# on-CPU RTC drivers
 #
+# CONFIG_DMADEVICES is not set
+# CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # File systems
 #
 CONFIG_EXT2_FS=y
-# CONFIG_EXT2_FS_XATTR is not set
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
 # CONFIG_EXT2_FS_XIP is not set
-# CONFIG_EXT3_FS is not set
-# CONFIG_EXT4DEV_FS is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+# CONFIG_EXT4_FS is not set
+CONFIG_JBD=y
+CONFIG_FS_MBCACHE=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
+CONFIG_FILE_LOCKING=y
 # CONFIG_XFS_FS is not set
 # CONFIG_GFS2_FS is not set
 # CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
+CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
-# CONFIG_QUOTA is not set
-CONFIG_DNOTIFY=y
-# CONFIG_AUTOFS_FS is not set
-# CONFIG_AUTOFS4_FS is not set
-CONFIG_FUSE_FS=y
+CONFIG_QUOTA=y
+# CONFIG_QUOTA_NETLINK_INTERFACE is not set
+CONFIG_PRINT_QUOTA_WARNING=y
+CONFIG_QFMT_V1=m
+CONFIG_QFMT_V2=m
+CONFIG_QUOTACTL=y
+CONFIG_AUTOFS_FS=m
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
 CONFIG_GENERIC_ACL=y
 
 #
 # CD-ROM/DVD Filesystems
 #
-# CONFIG_ISO9660_FS is not set
-# CONFIG_UDF_FS is not set
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_UDF_FS=m
+CONFIG_UDF_NLS=y
 
 #
 # DOS/FAT/NT Filesystems
 #
-# CONFIG_MSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 # CONFIG_NTFS_FS is not set
 
 #
@@ -896,11 +984,11 @@ CONFIG_GENERIC_ACL=y
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 CONFIG_TMPFS_POSIX_ACL=y
 # CONFIG_HUGETLB_PAGE is not set
-CONFIG_RAMFS=y
 CONFIG_CONFIGFS_FS=y
 
 #
@@ -916,33 +1004,42 @@ CONFIG_CONFIGFS_FS=y
 # CONFIG_EFS_FS is not set
 # CONFIG_CRAMFS is not set
 # CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
 # CONFIG_HPFS_FS is not set
 # CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
+CONFIG_NETWORK_FILESYSTEMS=y
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
 # CONFIG_NFS_V3_ACL is not set
 # CONFIG_NFS_V4 is not set
-# CONFIG_NFS_DIRECTIO is not set
-# CONFIG_NFSD is not set
 CONFIG_ROOT_NFS=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+# CONFIG_NFSD_V4 is not set
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
-# CONFIG_CIFS is not set
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_UPCALL is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
 
 #
 # Partition Types
@@ -953,45 +1050,83 @@ CONFIG_PARTITION_ADVANCED=y
 # CONFIG_AMIGA_PARTITION is not set
 # CONFIG_ATARI_PARTITION is not set
 # CONFIG_MAC_PARTITION is not set
-# CONFIG_MSDOS_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
 # CONFIG_LDM_PARTITION is not set
 CONFIG_SGI_PARTITION=y
 # CONFIG_ULTRIX_PARTITION is not set
 # CONFIG_SUN_PARTITION is not set
 # CONFIG_KARMA_PARTITION is not set
 # CONFIG_EFI_PARTITION is not set
-
-#
-# Native Language Support
-#
-# CONFIG_NLS is not set
-
-#
-# Distributed Lock Manager
-#
-CONFIG_DLM=y
-CONFIG_DLM_TCP=y
-# CONFIG_DLM_SCTP is not set
-# CONFIG_DLM_DEBUG is not set
-
-#
-# Profiling support
-#
-# CONFIG_PROFILING is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=m
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=m
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=m
+# CONFIG_DLM is not set
 
 #
 # Kernel hacking
 #
 CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
 CONFIG_ENABLE_MUST_CHECK=y
-# CONFIG_MAGIC_SYSRQ is not set
+CONFIG_FRAME_WARN=2048
+CONFIG_MAGIC_SYSRQ=y
 # CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_FS is not set
 # CONFIG_HEADERS_CHECK is not set
 # CONFIG_DEBUG_KERNEL is not set
-CONFIG_LOG_BUF_SHIFT=14
-CONFIG_CROSSCOMPILE=y
+# CONFIG_DEBUG_MEMORY_INIT is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+
+#
+# Tracers
+#
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
 CONFIG_CMDLINE=""
 
 #
@@ -1000,51 +1135,99 @@ CONFIG_CMDLINE=""
 CONFIG_KEYS=y
 CONFIG_KEYS_DEBUG_PROC_KEYS=y
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
 
 #
-# Cryptographic options
+# Crypto core or helper
 #
-CONFIG_CRYPTO=y
+# CONFIG_CRYPTO_FIPS is not set
 CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_AEAD=y
 CONFIG_CRYPTO_BLKCIPHER=y
 CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_RNG=y
 CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_GF128MUL=y
+CONFIG_CRYPTO_NULL=y
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_AUTHENC=m
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_LRW=y
+CONFIG_CRYPTO_PCBC=y
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
 CONFIG_CRYPTO_HMAC=y
 CONFIG_CRYPTO_XCBC=y
-CONFIG_CRYPTO_NULL=y
+
+#
+# Digest
+#
+CONFIG_CRYPTO_CRC32C=y
 CONFIG_CRYPTO_MD4=y
 CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_MICHAEL_MIC=y
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
 CONFIG_CRYPTO_SHA1=y
 CONFIG_CRYPTO_SHA256=y
 CONFIG_CRYPTO_SHA512=y
-CONFIG_CRYPTO_WP512=y
 CONFIG_CRYPTO_TGR192=y
-CONFIG_CRYPTO_GF128MUL=y
-CONFIG_CRYPTO_ECB=y
-CONFIG_CRYPTO_CBC=y
-CONFIG_CRYPTO_PCBC=y
-CONFIG_CRYPTO_LRW=y
-CONFIG_CRYPTO_DES=y
-CONFIG_CRYPTO_FCRYPT=y
-CONFIG_CRYPTO_BLOWFISH=y
-CONFIG_CRYPTO_TWOFISH=y
-CONFIG_CRYPTO_TWOFISH_COMMON=y
-CONFIG_CRYPTO_SERPENT=y
+CONFIG_CRYPTO_WP512=y
+
+#
+# Ciphers
+#
 CONFIG_CRYPTO_AES=y
+CONFIG_CRYPTO_ANUBIS=y
+CONFIG_CRYPTO_ARC4=y
+CONFIG_CRYPTO_BLOWFISH=y
+CONFIG_CRYPTO_CAMELLIA=y
 CONFIG_CRYPTO_CAST5=y
 CONFIG_CRYPTO_CAST6=y
-CONFIG_CRYPTO_TEA=y
-CONFIG_CRYPTO_ARC4=y
+CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_FCRYPT=y
 CONFIG_CRYPTO_KHAZAD=y
-CONFIG_CRYPTO_ANUBIS=y
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_SERPENT=y
+CONFIG_CRYPTO_TEA=y
+CONFIG_CRYPTO_TWOFISH=y
+CONFIG_CRYPTO_TWOFISH_COMMON=y
+
+#
+# Compression
+#
 CONFIG_CRYPTO_DEFLATE=y
-CONFIG_CRYPTO_MICHAEL_MIC=y
-CONFIG_CRYPTO_CRC32C=y
-CONFIG_CRYPTO_CAMELLIA=y
+# CONFIG_CRYPTO_LZO is not set
 
 #
-# Hardware crypto devices
+# Random Number Generation
 #
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+CONFIG_CRYPTO_HW=y
+# CONFIG_CRYPTO_DEV_HIFN_795X is not set
 
 #
 # Library routines
@@ -1052,10 +1235,15 @@ CONFIG_CRYPTO_CAMELLIA=y
 CONFIG_BITREVERSE=y
 # CONFIG_CRC_CCITT is not set
 CONFIG_CRC16=y
+CONFIG_CRC_T10DIF=y
+CONFIG_CRC_ITU_T=m
 CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
 CONFIG_LIBCRC32C=y
+CONFIG_AUDIT_GENERIC=y
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
 CONFIG_PLIST=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
index 7a881755800f94a4be165b989a9f2f54fb6ffaa1..6c8342ae74db88cd3187d1964274aa03c6031165 100644 (file)
        mtc0    \reg, CP0_TCSTATUS
        _ehb
        .endm
+#elif defined(CONFIG_CPU_MIPSR2)
+       .macro  local_irq_enable reg=t0
+       ei
+       irq_enable_hazard
+       .endm
+
+       .macro  local_irq_disable reg=t0
+       di
+       irq_disable_hazard
+       .endm
 #else
        .macro  local_irq_enable reg=t0
        mfc0    \reg, CP0_STATUS
index 2988d29a0867f4c0ce187040e710e3c87344030d..33790b9e0cc0d46ee41f0ec8d3f3dbf181c8a9fc 100644 (file)
@@ -50,9 +50,8 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
 static inline __attribute_const__ __u64 __arch_swab64(__u64 x)
 {
        __asm__(
-       "       dsbh    %0, %1                  \n"
-       "       dshd    %0, %0                  \n"
-       "       drotr   %0, %0, 32              \n"
+       "       dsbh    %0, %1\n"
+       "       dshd    %0, %0"
        : "=r" (x)
        : "r" (x));
 
index a8eac1697b3ddcf05dccc71d42267c549cc40904..d58f128aa747be974ac10ffd5fb1749d3292f505 100644 (file)
@@ -232,7 +232,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
  */
 #ifdef __MIPSEB__
 #define ELF_DATA       ELFDATA2MSB
-#elif __MIPSEL__
+#elif defined(__MIPSEL__)
 #define ELF_DATA       ELFDATA2LSB
 #endif
 #define ELF_ARCH       EM_MIPS
index 5b98d0e731c2238ae0f8ff64d3a3d139aa4ef562..e6708b3ad343f478e15a7d1102a90df2c7f61841 100644 (file)
@@ -111,6 +111,7 @@ EXPORT_SYMBOL(dma_alloc_coherent);
 void dma_free_noncoherent(struct device *dev, size_t size, void *vaddr,
        dma_addr_t dma_handle)
 {
+       plat_unmap_dma_mem(dma_handle);
        free_pages((unsigned long) vaddr, get_order(size));
 }
 
@@ -121,6 +122,8 @@ void dma_free_coherent(struct device *dev, size_t size, void *vaddr,
 {
        unsigned long addr = (unsigned long) vaddr;
 
+       plat_unmap_dma_mem(dma_handle);
+
        if (!plat_device_is_coherent(dev))
                addr = CAC_ADDR(addr);
 
index b72ec66db699e56f0985ebd6d88d82a7ceb14411..1f6fd4fc05b91b518f4f574b3ada13ddd24b285a 100644 (file)
@@ -44,9 +44,12 @@ static inline void flush_tlb_mm(struct mm_struct *mm)
 {
        BUG_ON(mm == &init_mm); /* Should never happen */
 
-#ifdef CONFIG_SMP
+#if 1 || defined(CONFIG_SMP)
        flush_tlb_all();
 #else
+       /* FIXME: currently broken, causing space id and protection ids
+        *  to go out of sync, resulting in faults on userspace accesses.
+        */
        if (mm) {
                if (mm->context != 0)
                        free_sid(mm->context);
index 8fc6d72849ae435c095ec75a94acb677f0815d5e..3d3daa674299038072e3d8e7f2d36f3181b5cb1f 100644 (file)
@@ -41,6 +41,7 @@ $(obj)/4xx.o: BOOTCFLAGS += -mcpu=405
 $(obj)/ebony.o: BOOTCFLAGS += -mcpu=405
 $(obj)/cuboot-taishan.o: BOOTCFLAGS += -mcpu=405
 $(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=405
+$(obj)/cuboot-acadia.o: BOOTCFLAGS += -mcpu=405
 $(obj)/treeboot-walnut.o: BOOTCFLAGS += -mcpu=405
 $(obj)/virtex405-head.o: BOOTAFLAGS += -mcpu=405
 
index bdc8b0e860e5e1b25cc3dafe23455ec1a738812b..5c33bc14bd9fe161a75d7c12bc6809e77cba5a93 100644 (file)
@@ -479,17 +479,20 @@ _GLOBAL(_tlbil_pid)
  * (no broadcast)
  */
 _GLOBAL(_tlbil_va)
+       mfmsr   r10
+       wrteei  0
        slwi    r4,r4,16
        mtspr   SPRN_MAS6,r4            /* assume AS=0 for now */
        tlbsx   0,r3
        mfspr   r4,SPRN_MAS1            /* check valid */
        andis.  r3,r4,MAS1_VALID@h
-       beqlr
+       beq     1f
        rlwinm  r4,r4,0,1,31
        mtspr   SPRN_MAS1,r4
        tlbwe
        msync
        isync
+1:     wrtee   r10
        blr
 #endif /* CONFIG_FSL_BOOKE */
 
index 29b2941cada0b67ac5be0248c2a1321179bf19a6..45907c1dae66da343344b5e1cfe9c682afc409ff 100644 (file)
@@ -556,6 +556,7 @@ unsigned long rh_alloc_fixed(rh_info_t * info, unsigned long start, int size, co
                be = blk->start + blk->size;
                if (s >= bs && e <= be)
                        break;
+               blk = NULL;
        }
 
        if (blk == NULL)
index 7bbf4e4ed4306b3a395906b6307808df326fb7cf..f0c3b88d50fa5a5f98847bd1914be1881885af9d 100644 (file)
@@ -507,6 +507,9 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
 {
        struct hstate *hstate = hstate_file(file);
        int mmu_psize = shift_to_mmu_psize(huge_page_shift(hstate));
+
+       if (!mmu_huge_psizes[mmu_psize])
+               return -EINVAL;
        return slice_get_unmapped_area(addr, len, flags, mmu_psize, 1, 0);
 }
 
index a8397bbad3d4d54a5cd50ae9ee201118c767d1d4..cf81049e1e51a0ce98d0ebdf9b7a74d5901de211 100644 (file)
@@ -901,10 +901,17 @@ static void mark_reserved_regions_for_nid(int nid)
                        if (end_pfn > node_ar.end_pfn)
                                reserve_size = (node_ar.end_pfn << PAGE_SHIFT)
                                        - (start_pfn << PAGE_SHIFT);
-                       dbg("reserve_bootmem %lx %lx nid=%d\n", physbase,
-                               reserve_size, node_ar.nid);
-                       reserve_bootmem_node(NODE_DATA(node_ar.nid), physbase,
-                                               reserve_size, BOOTMEM_DEFAULT);
+                       /*
+                        * Only worry about *this* node, others may not
+                        * yet have valid NODE_DATA().
+                        */
+                       if (node_ar.nid == nid) {
+                               dbg("reserve_bootmem %lx %lx nid=%d\n",
+                                       physbase, reserve_size, node_ar.nid);
+                               reserve_bootmem_node(NODE_DATA(node_ar.nid),
+                                               physbase, reserve_size,
+                                               BOOTMEM_DEFAULT);
+                       }
                        /*
                         * if reserved region is contained in the active region
                         * then done.
@@ -929,7 +936,6 @@ static void mark_reserved_regions_for_nid(int nid)
 void __init do_init_bootmem(void)
 {
        int nid;
-       unsigned int i;
 
        min_low_pfn = 0;
        max_low_pfn = lmb_end_of_DRAM() >> PAGE_SHIFT;
index 442cf36aa172920b355710e65a68624d43293d33..0ce45c2b42f8eb67a1ea5156fcf476bdb3f3924a 100644 (file)
@@ -413,6 +413,9 @@ static int axon_msi_probe(struct of_device *device,
                        MSIC_CTRL_IRQ_ENABLE | MSIC_CTRL_ENABLE |
                        MSIC_CTRL_FIFO_SIZE);
 
+       msic->read_offset = dcr_read(msic->dcr_host, MSIC_WRITE_OFFSET_REG)
+                               & MSIC_FIFO_SIZE_MASK;
+
        device->dev.platform_data = msic;
 
        ppc_md.setup_msi_irqs = axon_msi_setup_msi_irqs;
index 80119b3398e7f2acb1f2a1091c247cb8193e947e..5c9cbfc14c4d5ad9ad06bf18f3a4b2f523eebd0b 100644 (file)
@@ -55,6 +55,8 @@ config GENERIC_HARDIRQS
 
 config GENERIC_HARDIRQS_NO__DO_IRQ
        def_bool y
+       depends on SUPERH32 && (!SH_DREAMCAST && !SH_SH4202_MICRODEV && \
+                               !SH_7751_SYSTEMH && !HD64461)
 
 config GENERIC_IRQ_PROBE
        def_bool y
index d409c4f21a5cdea420e75fef24a2ceec1cb0e834..4cef450167dd6ae697e7e429078979f2277f92fd 100644 (file)
@@ -62,6 +62,8 @@ struct sparc_stackf {
 
 #ifdef __KERNEL__
 
+#include <asm/system.h>
+
 static inline bool pt_regs_is_syscall(struct pt_regs *regs)
 {
        return (regs->psr & PSR_SYSCALL);
@@ -72,6 +74,14 @@ static inline bool pt_regs_clear_syscall(struct pt_regs *regs)
        return (regs->psr &= ~PSR_SYSCALL);
 }
 
+#define arch_ptrace_stop_needed(exit_code, info) \
+({     flush_user_windows(); \
+       current_thread_info()->w_saved != 0;    \
+})
+
+#define arch_ptrace_stop(exit_code, info) \
+       synchronize_user_stack()
+
 #define user_mode(regs) (!((regs)->psr & PSR_PS))
 #define instruction_pointer(regs) ((regs)->pc)
 #define user_stack_pointer(regs) ((regs)->u_regs[UREG_FP])
index 84e969f06afe318d986a9890d130cbf26759b704..cd6fbfc2043533636dd16fec2918cf0a07124be1 100644 (file)
@@ -114,6 +114,7 @@ struct sparc_trapf {
 #ifdef __KERNEL__
 
 #include <linux/threads.h>
+#include <asm/system.h>
 
 static inline int pt_regs_trap_type(struct pt_regs *regs)
 {
@@ -130,6 +131,14 @@ static inline bool pt_regs_clear_syscall(struct pt_regs *regs)
        return (regs->tstate &= ~TSTATE_SYSCALL);
 }
 
+#define arch_ptrace_stop_needed(exit_code, info) \
+({     flush_user_windows(); \
+       get_thread_wsaved() != 0; \
+})
+
+#define arch_ptrace_stop(exit_code, info) \
+       synchronize_user_stack()
+
 struct global_reg_snapshot {
        unsigned long           tstate;
        unsigned long           tpc;
index b815664fe3700b77aa031fab7711be4128c858d1..8e99073b9e0f2cad52d1346fd7a525c835681b1a 100644 (file)
@@ -520,6 +520,7 @@ config X86_PTRACE_BTS
        bool "Branch Trace Store"
        default y
        depends on X86_DEBUGCTLMSR
+       depends on BROKEN
        help
          This adds a ptrace interface to the hardware's branch trace store.
 
index b7c0dea119fed8f8ea62e520ecf1e504e65e05f0..61e08c0a290785c5527d9faf607c0c2ab2e384e2 100644 (file)
@@ -223,9 +223,15 @@ struct pci_header {
 } __attribute__((packed));
 
 /* Function prototypes for bootstrapping */
+#ifdef CONFIG_VMI
 extern void vmi_init(void);
+extern void vmi_activate(void);
 extern void vmi_bringup(void);
-extern void vmi_apply_boot_page_allocations(void);
+#else
+static inline void vmi_init(void) {}
+static inline void vmi_activate(void) {}
+static inline void vmi_bringup(void) {}
+#endif
 
 /* State needed to start an application processor in an SMP system. */
 struct vmi_ap_state {
index 4c51a2f8fd315900071de65e6ee3bee43ea2718f..de8ce79dd8818a5295c712a1dd656703026c32be 100644 (file)
@@ -1359,6 +1359,17 @@ static void __init acpi_process_madt(void)
                               "Invalid BIOS MADT, disabling ACPI\n");
                        disable_acpi();
                }
+       } else {
+               /*
+                * ACPI found no MADT, and so ACPI wants UP PIC mode.
+                * In the event an MPS table was found, forget it.
+                * Boot with "acpi=off" to use MPS on such a system.
+                */
+               if (smp_found_config) {
+                       printk(KERN_WARNING PREFIX
+                               "No APIC-table, disabling MPS\n");
+                       smp_found_config = 0;
+               }
        }
 #endif
        return;
index a7b6dec6fc3f4afc72f57651b1523156d415431b..0a60d60ed036b264e6d4c05174dfc3b464574852 100644 (file)
@@ -235,8 +235,9 @@ static int iommu_completion_wait(struct amd_iommu *iommu)
        status &= ~MMIO_STATUS_COM_WAIT_INT_MASK;
        writel(status, iommu->mmio_base + MMIO_STATUS_OFFSET);
 
-       if (unlikely((i == EXIT_LOOP_COUNT) && printk_ratelimit()))
-               printk(KERN_WARNING "AMD IOMMU: Completion wait loop failed\n");
+       if (unlikely(i == EXIT_LOOP_COUNT))
+               panic("AMD IOMMU: Completion wait loop failed\n");
+
 out:
        spin_unlock_irqrestore(&iommu->lock, flags);
 
index 30ae2701b3df1b8976400d5996ed72a4a98baeea..c6cc22815d35f232dd21fae7d2718a3c161b373c 100644 (file)
@@ -427,6 +427,10 @@ static u8 * __init alloc_command_buffer(struct amd_iommu *iommu)
        memcpy_toio(iommu->mmio_base + MMIO_CMD_BUF_OFFSET,
                        &entry, sizeof(entry));
 
+       /* set head and tail to zero manually */
+       writel(0x00, iommu->mmio_base + MMIO_CMD_HEAD_OFFSET);
+       writel(0x00, iommu->mmio_base + MMIO_CMD_TAIL_OFFSET);
+
        iommu_feature_enable(iommu, CONTROL_CMDBUF_EN);
 
        return cmd_buf;
@@ -1074,7 +1078,8 @@ int __init amd_iommu_init(void)
                goto free;
 
        /* IOMMU rlookup table - find the IOMMU for a specific device */
-       amd_iommu_rlookup_table = (void *)__get_free_pages(GFP_KERNEL,
+       amd_iommu_rlookup_table = (void *)__get_free_pages(
+                       GFP_KERNEL | __GFP_ZERO,
                        get_order(rlookup_table_size));
        if (amd_iommu_rlookup_table == NULL)
                goto free;
index 4b031a4ac8562d3ed69f14f0d750dfe8519a057e..1c838032fd3732fde9bff776cbb63a2821115d60 100644 (file)
@@ -510,12 +510,9 @@ static void __cpuinit mce_cpu_features(struct cpuinfo_x86 *c)
  */
 void __cpuinit mcheck_init(struct cpuinfo_x86 *c)
 {
-       static cpumask_t mce_cpus = CPU_MASK_NONE;
-
        mce_cpu_quirks(c);
 
        if (mce_dont_init ||
-           cpu_test_and_set(smp_processor_id(), mce_cpus) ||
            !mce_available(c))
                return;
 
index 82fb2809ce32208eacd7231c38597938031d4036..c4b5b24e0217c585cbb8d0f8011a8b6c87229a6f 100644 (file)
@@ -272,13 +272,18 @@ static struct attribute_group mc_attr_group = {
        .name = "microcode",
 };
 
-static void microcode_fini_cpu(int cpu)
+static void __microcode_fini_cpu(int cpu)
 {
        struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
 
-       mutex_lock(&microcode_mutex);
        microcode_ops->microcode_fini_cpu(cpu);
        uci->valid = 0;
+}
+
+static void microcode_fini_cpu(int cpu)
+{
+       mutex_lock(&microcode_mutex);
+       __microcode_fini_cpu(cpu);
        mutex_unlock(&microcode_mutex);
 }
 
@@ -306,12 +311,16 @@ static int microcode_resume_cpu(int cpu)
         * to this cpu (a bit of paranoia):
         */
        if (microcode_ops->collect_cpu_info(cpu, &nsig)) {
-               microcode_fini_cpu(cpu);
+               __microcode_fini_cpu(cpu);
+               printk(KERN_ERR "failed to collect_cpu_info for resuming cpu #%d\n",
+                               cpu);
                return -1;
        }
 
-       if (memcmp(&nsig, &uci->cpu_sig, sizeof(nsig))) {
-               microcode_fini_cpu(cpu);
+       if ((nsig.sig != uci->cpu_sig.sig) || (nsig.pf != uci->cpu_sig.pf)) {
+               __microcode_fini_cpu(cpu);
+               printk(KERN_ERR "cached ucode doesn't match the resuming cpu #%d\n",
+                               cpu);
                /* Should we look for a new ucode here? */
                return 1;
        }
index 622dc4a217848d1c8d16941796a4f82f868fc967..a8e62792d171c6c63645582441b3d9482fffcbac 100644 (file)
@@ -155,6 +155,7 @@ static DEFINE_SPINLOCK(microcode_update_lock);
 static int collect_cpu_info(int cpu_num, struct cpu_signature *csig)
 {
        struct cpuinfo_x86 *c = &cpu_data(cpu_num);
+       unsigned long flags;
        unsigned int val[2];
 
        memset(csig, 0, sizeof(*csig));
@@ -174,11 +175,16 @@ static int collect_cpu_info(int cpu_num, struct cpu_signature *csig)
                csig->pf = 1 << ((val[1] >> 18) & 7);
        }
 
+       /* serialize access to the physical write to MSR 0x79 */
+       spin_lock_irqsave(&microcode_update_lock, flags);
+
        wrmsr(MSR_IA32_UCODE_REV, 0, 0);
        /* see notes above for revision 1.07.  Apparent chip bug */
        sync_core();
        /* get the current revision from MSR 0x8B */
        rdmsr(MSR_IA32_UCODE_REV, val[0], csig->rev);
+       spin_unlock_irqrestore(&microcode_update_lock, flags);
+
        pr_debug("microcode: collect_cpu_info : sig=0x%x, pf=0x%x, rev=0x%x\n",
                        csig->sig, csig->pf, csig->rev);
 
index ba7ad83e20a8f80d5b0ca7de95d6c1c0fbe6b27c..a35eaa379ff632fb142367df58a8fdeaaad81267 100644 (file)
@@ -745,10 +745,8 @@ void __init gart_iommu_init(void)
        unsigned long scratch;
        long i;
 
-       if (cache_k8_northbridges() < 0 || num_k8_northbridges == 0) {
-               printk(KERN_INFO "PCI-GART: No AMD GART found.\n");
+       if (cache_k8_northbridges() < 0 || num_k8_northbridges == 0)
                return;
-       }
 
 #ifndef CONFIG_AGP_AMD64
        no_agp = 1;
index 9d5674f7b6ccbfbdef7f5ad16901f9dc9dc08ad0..bdec76e5559433d77366b85535f0563451614501 100644 (file)
@@ -794,6 +794,9 @@ void __init setup_arch(char **cmdline_p)
        printk(KERN_INFO "Command line: %s\n", boot_command_line);
 #endif
 
+       /* VMI may relocate the fixmap; do this before touching ioremap area */
+       vmi_init();
+
        early_cpu_init();
        early_ioremap_init();
 
@@ -880,13 +883,8 @@ void __init setup_arch(char **cmdline_p)
        check_efer();
 #endif
 
-#if defined(CONFIG_VMI) && defined(CONFIG_X86_32)
-       /*
-        * Must be before kernel pagetables are setup
-        * or fixmap area is touched.
-        */
-       vmi_init();
-#endif
+       /* Must be before kernel pagetables are setup */
+       vmi_activate();
 
        /* after early param, so could get panic from serial */
        reserve_early_setup_data();
index 7b1093397319766b2e4848a5a883b0dc35f49804..f71f96fc9e62ea8e4f027a78cb3aafcd96fdbf99 100644 (file)
@@ -294,9 +294,7 @@ static void __cpuinit start_secondary(void *unused)
         * fragile that we want to limit the things done here to the
         * most necessary things.
         */
-#ifdef CONFIG_VMI
        vmi_bringup();
-#endif
        cpu_init();
        preempt_disable();
        smp_callin();
index 8b6c393ab9fd14f06b86d9deb656b3643d9006f3..22fd6577156a9ac81453792185e3cc0a317d96d2 100644 (file)
@@ -960,8 +960,6 @@ static inline int __init activate_vmi(void)
 
 void __init vmi_init(void)
 {
-       unsigned long flags;
-
        if (!vmi_rom)
                probe_vmi_rom();
        else
@@ -973,13 +971,21 @@ void __init vmi_init(void)
 
        reserve_top_address(-vmi_rom->virtual_top);
 
-       local_irq_save(flags);
-       activate_vmi();
-
 #ifdef CONFIG_X86_IO_APIC
        /* This is virtual hardware; timer routing is wired correctly */
        no_timer_check = 1;
 #endif
+}
+
+void vmi_activate(void)
+{
+       unsigned long flags;
+
+       if (!vmi_rom)
+               return;
+
+       local_irq_save(flags);
+       activate_vmi();
        local_irq_restore(flags & X86_EFLAGS_IF);
 }
 
index c029d3eb9ef0a76ed248deb4a40e47511ba12afe..595b78672b36ad90e27cf50ed28126bb43970fb5 100644 (file)
@@ -53,10 +53,17 @@ do_async_xor(struct dma_chan *chan, struct page *dest, struct page **src_list,
        int xor_src_cnt;
        dma_addr_t dma_dest;
 
-       dma_dest = dma_map_page(dma->dev, dest, offset, len, DMA_FROM_DEVICE);
-       for (i = 0; i < src_cnt; i++)
+       /* map the dest bidrectional in case it is re-used as a source */
+       dma_dest = dma_map_page(dma->dev, dest, offset, len, DMA_BIDIRECTIONAL);
+       for (i = 0; i < src_cnt; i++) {
+               /* only map the dest once */
+               if (unlikely(src_list[i] == dest)) {
+                       dma_src[i] = dma_dest;
+                       continue;
+               }
                dma_src[i] = dma_map_page(dma->dev, src_list[i], offset,
                                          len, DMA_TO_DEVICE);
+       }
 
        while (src_cnt) {
                async_flags = flags;
index 3c0c93300f127ffe91343f8514e27b174742bdb0..5d23c13ac7d48efe54de227ac337ceea1d75ee4c 100644 (file)
@@ -2,15 +2,8 @@
 # Makefile for the Linux ACPI interpreter
 #
 
-export ACPI_CFLAGS
-
-ACPI_CFLAGS    := -Os
-
-ifdef CONFIG_ACPI_DEBUG
-  ACPI_CFLAGS  += -DACPI_DEBUG_OUTPUT
-endif
-
-EXTRA_CFLAGS   += $(ACPI_CFLAGS)
+ccflags-y                      := -Os
+ccflags-$(CONFIG_ACPI_DEBUG)   += -DACPI_DEBUG_OUTPUT
 
 #
 # ACPI Boot-Time Table Parsing
@@ -22,9 +15,13 @@ obj-$(CONFIG_X86)            += blacklist.o
 # ACPI Core Subsystem (Interpreter)
 #
 obj-y                          += osl.o utils.o reboot.o\
-                                  dispatcher/ events/ executer/ hardware/ \
-                                  namespace/ parser/ resources/ tables/ \
-                                  utilities/
+                                       acpica/
+
+# sleep related files
+obj-y                          += wakeup.o
+obj-y                          += main.o
+obj-$(CONFIG_ACPI_SLEEP)       += proc.o
+
 
 #
 # ACPI Bus and Device Drivers
@@ -35,7 +32,6 @@ ifdef CONFIG_CPU_FREQ
 processor-objs += processor_perflib.o
 endif
 
-obj-y                          += sleep/
 obj-y                          += bus.o glue.o
 obj-y                          += scan.o
 # Keep EC driver first. Initialization of others depend on it.
diff --git a/drivers/acpi/acpica/Makefile b/drivers/acpi/acpica/Makefile
new file mode 100644 (file)
index 0000000..3f23298
--- /dev/null
@@ -0,0 +1,44 @@
+#
+# Makefile for ACPICA Core interpreter
+#
+
+ccflags-y                      := -Os
+ccflags-$(CONFIG_ACPI_DEBUG)   += -DACPI_DEBUG_OUTPUT
+
+obj-y := dsfield.o   dsmthdat.o  dsopcode.o  dswexec.o  dswscope.o \
+        dsmethod.o  dsobject.o  dsutils.o   dswload.o  dswstate.o \
+        dsinit.o
+
+obj-y += evevent.o  evregion.o  evsci.o    evxfevnt.o \
+        evmisc.o   evrgnini.o  evxface.o  evxfregn.o \
+        evgpe.o    evgpeblk.o
+
+obj-y += exconfig.o  exfield.o  exnames.o   exoparg6.o  exresolv.o  exstorob.o\
+        exconvrt.o  exfldio.o  exoparg1.o  exprep.o    exresop.o   exsystem.o\
+        excreate.o  exmisc.o   exoparg2.o  exregion.o  exstore.o   exutils.o \
+        exdump.o    exmutex.o  exoparg3.o  exresnte.o  exstoren.o
+
+obj-y += hwacpi.o  hwgpe.o  hwregs.o  hwsleep.o hwxface.o
+
+obj-$(ACPI_FUTURE_USAGE) += hwtimer.o
+
+obj-y += nsaccess.o  nsload.o    nssearch.o  nsxfeval.o \
+        nsalloc.o   nseval.o    nsnames.o   nsutils.o   nsxfname.o \
+        nsdump.o    nsinit.o    nsobject.o  nswalk.o    nsxfobj.o  \
+        nsparse.o   nspredef.o
+
+obj-$(ACPI_FUTURE_USAGE) += nsdumpdv.o
+
+obj-y += psargs.o    psparse.o  psloop.o pstree.o   pswalk.o  \
+        psopcode.o  psscope.o  psutils.o  psxface.o
+
+obj-y += rsaddr.o rscreate.o rsinfo.o rsio.o rslist.o rsmisc.o rsxface.o \
+        rscalc.o  rsirq.o  rsmemory.o  rsutils.o
+
+obj-$(ACPI_FUTURE_USAGE) += rsdump.o
+
+obj-y += tbxface.o tbinstal.o tbutils.o tbfind.o tbfadt.o tbxfroot.o
+
+obj-y += utalloc.o utdebug.o uteval.o utinit.o utmisc.o utxface.o \
+               utcopy.o utdelete.o utglobal.o utmath.o utobject.o \
+               utstate.o utmutex.o utobject.o utresrc.o
diff --git a/drivers/acpi/acpica/accommon.h b/drivers/acpi/acpica/accommon.h
new file mode 100644 (file)
index 0000000..3b20786
--- /dev/null
@@ -0,0 +1,63 @@
+/******************************************************************************
+ *
+ * Name: accommon.h - Common include files for generation of ACPICA source
+ *
+ *****************************************************************************/
+
+/*
+ * Copyright (C) 2000 - 2008, Intel Corp.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer,
+ *    without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ *    substantially similar to the "NO WARRANTY" disclaimer below
+ *    ("Disclaimer") and any redistribution must be conditioned upon
+ *    including a substantially similar Disclaimer requirement for further
+ *    binary redistribution.
+ * 3. Neither the names of the above-listed copyright holders nor the names
+ *    of any contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGES.
+ */
+
+#ifndef __ACCOMMON_H__
+#define __ACCOMMON_H__
+
+/*
+ * Common set of includes for all ACPICA source files.
+ * We put them here because we don't want to duplicate them
+ * in the the source code again and again.
+ *
+ * Note: The order of these include files is important.
+ */
+#include "acconfig.h"          /* Global configuration constants */
+#include "acmacros.h"          /* C macros */
+#include "aclocal.h"           /* Internal data types */
+#include "acobject.h"          /* ACPI internal object */
+#include "acstruct.h"          /* Common structures */
+#include "acglobal.h"          /* All global variables */
+#include "achware.h"           /* Hardware defines and interfaces */
+#include "acutils.h"           /* Utility interfaces */
+
+#endif                         /* __ACCOMMON_H__ */
similarity index 98%
rename from include/acpi/acconfig.h
rename to drivers/acpi/acpica/acconfig.h
index 29feee27f0ea8aeef29352635eb4f6720f55e1f2..e6777fb883d25b59d1e5acac89a7ccd24ab09f21 100644 (file)
  *
  */
 
-/* Current ACPICA subsystem version in YYYYMMDD format */
-
-#define ACPI_CA_VERSION                 0x20080926
-
 /*
  * OS name, used for the _OS object.  The _OS object is essentially obsolete,
  * but there is a large base of ASL/AML code in existing machines that check
 
 #define ACPI_ROOT_TABLE_SIZE_INCREMENT  4
 
+/* Maximum number of While() loop iterations before forced abort */
+
+#define ACPI_MAX_LOOP_ITERATIONS        0xFFFF
+
 /******************************************************************************
  *
  * ACPI Specification constants (Do not change unless the specification changes)
similarity index 97%
rename from include/acpi/acevents.h
rename to drivers/acpi/acpica/acevents.h
index d5d099bf349cb67c140ae1e73e536c942672af8a..07e20135f01b30873d1f4aca495d7278a81962cd 100644 (file)
@@ -93,11 +93,13 @@ struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device,
  */
 u8 acpi_ev_valid_gpe_event(struct acpi_gpe_event_info *gpe_event_info);
 
-acpi_status acpi_ev_walk_gpe_list(acpi_gpe_callback gpe_walk_callback);
+acpi_status
+acpi_ev_walk_gpe_list(acpi_gpe_callback gpe_walk_callback, void *context);
 
 acpi_status
 acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
-                           struct acpi_gpe_block_info *gpe_block);
+                           struct acpi_gpe_block_info *gpe_block,
+                           void *context);
 
 acpi_status
 acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device,
similarity index 97%
rename from include/acpi/acglobal.h
rename to drivers/acpi/acpica/acglobal.h
index 15dda46b70d1c1e36c949d9555efc7a805ccf321..ddb40f5c68fc25e35e9cab318fb232c4a9015723 100644 (file)
@@ -102,6 +102,12 @@ ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_create_osi_method, TRUE);
  */
 ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_leave_wake_gpes_disabled, TRUE);
 
+/*
+ * Optionally use default values for the ACPI register widths. Set this to
+ * TRUE to use the defaults, if an FADT contains incorrect widths/lengths.
+ */
+ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_use_default_register_widths, TRUE);
+
 /*****************************************************************************
  *
  * Debug support
@@ -140,7 +146,7 @@ ACPI_EXTERN u32 acpi_gbl_trace_flags;
  */
 ACPI_EXTERN struct acpi_internal_rsdt acpi_gbl_root_table_list;
 ACPI_EXTERN struct acpi_table_fadt acpi_gbl_FADT;
-extern u8 acpi_gbl_permanent_mmap;
+ACPI_EXTERN struct acpi_table_facs *acpi_gbl_FACS;
 
 /* These addresses are calculated from FADT address values */
 
@@ -326,6 +332,7 @@ ACPI_EXTERN struct acpi_fixed_event_handler
 ACPI_EXTERN struct acpi_gpe_xrupt_info *acpi_gbl_gpe_xrupt_list_head;
 ACPI_EXTERN struct acpi_gpe_block_info
 *acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS];
+ACPI_EXTERN u32 acpi_current_gpe_count;
 
 /*****************************************************************************
  *
similarity index 89%
rename from include/acpi/achware.h
rename to drivers/acpi/acpica/achware.h
index 97a72b19327683843bc95219d643406b04426b59..58c69dc49ab43b62207afde56235a5266834dfb4 100644 (file)
 #ifndef __ACHWARE_H__
 #define __ACHWARE_H__
 
-/* PM Timer ticks per second (HZ) */
-
-#define PM_TIMER_FREQUENCY  3579545
-
-/* Values for the _SST reserved method */
+/* Values for the _SST predefined method */
 
 #define ACPI_SST_INDICATOR_OFF  0
 #define ACPI_SST_WORKING        1
@@ -56,8 +52,6 @@
 #define ACPI_SST_SLEEPING       3
 #define ACPI_SST_SLEEP_CONTEXT  4
 
-/* Prototypes */
-
 /*
  * hwacpi - high level functions
  */
@@ -75,13 +69,6 @@ acpi_hw_register_read(u32 register_id, u32 * return_value);
 
 acpi_status acpi_hw_register_write(u32 register_id, u32 value);
 
-acpi_status
-acpi_hw_low_level_read(u32 width,
-                      u32 * value, struct acpi_generic_address *reg);
-
-acpi_status
-acpi_hw_low_level_write(u32 width, u32 value, struct acpi_generic_address *reg);
-
 acpi_status acpi_hw_clear_acpi_status(void);
 
 /*
@@ -94,13 +81,13 @@ acpi_hw_write_gpe_enable_reg(struct acpi_gpe_event_info *gpe_event_info);
 
 acpi_status
 acpi_hw_disable_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
-                         struct acpi_gpe_block_info *gpe_block);
+                         struct acpi_gpe_block_info *gpe_block, void *context);
 
 acpi_status acpi_hw_clear_gpe(struct acpi_gpe_event_info *gpe_event_info);
 
 acpi_status
 acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
-                       struct acpi_gpe_block_info *gpe_block);
+                       struct acpi_gpe_block_info *gpe_block, void *context);
 
 acpi_status
 acpi_hw_get_gpe_status(struct acpi_gpe_event_info *gpe_event_info,
@@ -114,7 +101,8 @@ acpi_status acpi_hw_enable_all_wakeup_gpes(void);
 
 acpi_status
 acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
-                                struct acpi_gpe_block_info *gpe_block);
+                                struct acpi_gpe_block_info *gpe_block,
+                                void *context);
 
 #ifdef ACPI_FUTURE_USAGE
 /*
similarity index 95%
rename from include/acpi/aclocal.h
rename to drivers/acpi/acpica/aclocal.h
index ecab527cf78ef72afe33309782bf184a12c13641..492d02761bb7b34a8d2291c2508eb786a98869c8 100644 (file)
@@ -46,8 +46,6 @@
 
 /* acpisrc:struct_defs -- for acpisrc conversion */
 
-#define ACPI_WAIT_FOREVER               0xFFFF /* u16, as per ACPI spec */
-#define ACPI_DO_NOT_WAIT                0
 #define ACPI_SERIALIZED                 0xFF
 
 typedef u32 acpi_mutex_handle;
@@ -120,11 +118,6 @@ static char *acpi_gbl_mutex_names[ACPI_NUM_MUTEX] = {
 #define ACPI_MAX_LOCK                   1
 #define ACPI_NUM_LOCK                   ACPI_MAX_LOCK+1
 
-/* Owner IDs are used to track namespace nodes for selective deletion */
-
-typedef u8 acpi_owner_id;
-#define ACPI_OWNER_ID_MAX               0xFF
-
 /* This Thread ID means that the mutex is not in use (unlocked) */
 
 #define ACPI_MUTEX_NOT_ACQUIRED         (acpi_thread_id) 0
@@ -165,11 +158,6 @@ typedef enum {
        ACPI_IMODE_EXECUTE = 0x03
 } acpi_interpreter_mode;
 
-union acpi_name_union {
-       u32 integer;
-       char ascii[4];
-};
-
 /*
  * The Namespace Node describes a named object that appears in the AML.
  * descriptor_type is used to differentiate between internal descriptors.
@@ -216,26 +204,6 @@ struct acpi_namespace_node {
 #define ANOBJ_IS_BIT_OFFSET             0x40   /* i_aSL only: Reference is a bit offset */
 #define ANOBJ_IS_REFERENCED             0x80   /* i_aSL only: Object was referenced */
 
-/*
- * ACPI Table Descriptor.  One per ACPI table
- */
-struct acpi_table_desc {
-       acpi_physical_address address;
-       struct acpi_table_header *pointer;
-       u32 length;             /* Length fixed at 32 bits */
-       union acpi_name_union signature;
-       acpi_owner_id owner_id;
-       u8 flags;
-};
-
-/* Flags for above */
-
-#define ACPI_TABLE_ORIGIN_UNKNOWN       (0)
-#define ACPI_TABLE_ORIGIN_MAPPED        (1)
-#define ACPI_TABLE_ORIGIN_ALLOCATED     (2)
-#define ACPI_TABLE_ORIGIN_MASK          (3)
-#define ACPI_TABLE_IS_LOADED            (4)
-
 /* One internal RSDT for table management */
 
 struct acpi_internal_rsdt {
@@ -266,15 +234,6 @@ struct acpi_ns_search_data {
        struct acpi_namespace_node *node;
 };
 
-/*
- * Predefined Namespace items
- */
-struct acpi_predefined_names {
-       char *name;
-       u8 type;
-       char *val;
-};
-
 /* Object types used during package copies */
 
 #define ACPI_COPY_TYPE_SIMPLE           0
@@ -487,10 +446,15 @@ struct acpi_gpe_walk_info {
        struct acpi_gpe_block_info *gpe_block;
 };
 
-typedef acpi_status(*acpi_gpe_callback) (struct acpi_gpe_xrupt_info *
-                                        gpe_xrupt_info,
-                                        struct acpi_gpe_block_info *
-                                        gpe_block);
+struct acpi_gpe_device_info {
+       u32 index;
+       u32 next_block_base_index;
+       acpi_status status;
+       struct acpi_namespace_node *gpe_device;
+};
+
+typedef acpi_status(*acpi_gpe_callback) (struct acpi_gpe_xrupt_info *gpe_xrupt_info,
+               struct acpi_gpe_block_info *gpe_block, void *context);
 
 /* Information about each particular fixed event */
 
@@ -566,6 +530,7 @@ struct acpi_control_state {
        union acpi_parse_object *predicate_op;
        u8 *aml_predicate_start;        /* Start of if/while predicate */
        u8 *package_end;        /* End of if/while block */
+       u32 loop_count;         /* While() loop counter */
 };
 
 /*
@@ -671,6 +636,12 @@ union acpi_parse_value {
        union acpi_parse_object *arg;   /* arguments and contained ops */
 };
 
+#ifdef ACPI_DISASSEMBLER
+#define ACPI_DISASM_ONLY_MEMBERS(a)     a;
+#else
+#define ACPI_DISASM_ONLY_MEMBERS(a)
+#endif
+
 #define ACPI_PARSE_COMMON \
        union acpi_parse_object         *parent;        /* Parent op */\
        u8                              descriptor_type; /* To differentiate various internal objs */\
@@ -790,9 +761,6 @@ struct acpi_parse_state {
  *
  ****************************************************************************/
 
-#define PCI_ROOT_HID_STRING             "PNP0A03"
-#define PCI_EXPRESS_ROOT_HID_STRING     "PNP0A08"
-
 struct acpi_bit_register_info {
        u8 parent_register;
        u8 bit_position;
@@ -1019,26 +987,4 @@ struct acpi_debug_mem_block {
 #define ACPI_MEM_LIST_MAX               1
 #define ACPI_NUM_MEM_LISTS              2
 
-struct acpi_memory_list {
-       char *list_name;
-       void *list_head;
-       u16 object_size;
-       u16 max_depth;
-       u16 current_depth;
-       u16 link_offset;
-
-#ifdef ACPI_DBG_TRACK_ALLOCATIONS
-
-       /* Statistics for debug memory tracking only */
-
-       u32 total_allocated;
-       u32 total_freed;
-       u32 max_occupied;
-       u32 total_size;
-       u32 current_total_size;
-       u32 requests;
-       u32 hits;
-#endif
-};
-
 #endif                         /* __ACLOCAL_H__ */
similarity index 83%
rename from include/acpi/acmacros.h
rename to drivers/acpi/acpica/acmacros.h
index a597207e28352ab4de53a69d9d6eb8d29f6c0a28..c57286a3acebb46c54728118db4bcf24f0688aeb 100644 (file)
 #ifndef __ACMACROS_H__
 #define __ACMACROS_H__
 
-/*
- * Data manipulation macros
- */
-#define ACPI_LOWORD(l)                  ((u16)(u32)(l))
-#define ACPI_HIWORD(l)                  ((u16)((((u32)(l)) >> 16) & 0xFFFF))
-#define ACPI_LOBYTE(l)                  ((u8)(u16)(l))
-#define ACPI_HIBYTE(l)                  ((u8)((((u16)(l)) >> 8) & 0xFF))
-
-#define ACPI_SET_BIT(target,bit)        ((target) |= (bit))
-#define ACPI_CLEAR_BIT(target,bit)      ((target) &= ~(bit))
-#define ACPI_MIN(a,b)                   (((a)<(b))?(a):(b))
-#define ACPI_MAX(a,b)                   (((a)>(b))?(a):(b))
-
-/* Size calculation */
-
-#define ACPI_ARRAY_LENGTH(x)            (sizeof(x) / sizeof((x)[0]))
-
 /*
  * Extract data using a pointer. Any more than a byte and we
  * get into potential aligment issues -- see the STORE macros below.
 #define ACPI_SET32(ptr)                 *ACPI_CAST_PTR (u32, ptr)
 #define ACPI_SET64(ptr)                 *ACPI_CAST_PTR (u64, ptr)
 
-/*
- * Pointer manipulation
- */
-#define ACPI_CAST_PTR(t, p)             ((t *) (acpi_uintptr_t) (p))
-#define ACPI_CAST_INDIRECT_PTR(t, p)    ((t **) (acpi_uintptr_t) (p))
-#define ACPI_ADD_PTR(t, a, b)          ACPI_CAST_PTR (t, (ACPI_CAST_PTR (u8, (a)) + (acpi_size)(b)))
-#define ACPI_PTR_DIFF(a, b)            (acpi_size) (ACPI_CAST_PTR (u8, (a)) - ACPI_CAST_PTR (u8, (b)))
-
-/* Pointer/Integer type conversions */
-
-#define ACPI_TO_POINTER(i)             ACPI_ADD_PTR (void, (void *) NULL, (acpi_size) i)
-#define ACPI_TO_INTEGER(p)              ACPI_PTR_DIFF (p, (void *) NULL)
-#define ACPI_OFFSET(d, f)               (acpi_size) ACPI_PTR_DIFF (&(((d *)0)->f), (void *) NULL)
-#define ACPI_PHYSADDR_TO_PTR(i)         ACPI_TO_POINTER(i)
-#define ACPI_PTR_TO_PHYSADDR(i)         ACPI_TO_INTEGER(i)
-
-#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
-#define ACPI_COMPARE_NAME(a, b)         (*ACPI_CAST_PTR (u32, (a)) == *ACPI_CAST_PTR (u32, (b)))
-#else
-#define ACPI_COMPARE_NAME(a, b)         (!ACPI_STRNCMP (ACPI_CAST_PTR (char, (a)), ACPI_CAST_PTR (char, (b)), ACPI_NAME_SIZE))
-#endif
-
-/*
- * Full 64-bit integer must be available on both 32-bit and 64-bit platforms
- */
-struct acpi_integer_overlay {
-       u32 lo_dword;
-       u32 hi_dword;
-};
-
-#define ACPI_LODWORD(integer)           (ACPI_CAST_PTR (struct acpi_integer_overlay, &integer)->lo_dword)
-#define ACPI_HIDWORD(integer)           (ACPI_CAST_PTR (struct acpi_integer_overlay, &integer)->hi_dword)
-
 /*
  * printf() format helpers
  */
@@ -209,7 +159,7 @@ struct acpi_integer_overlay {
 /*
  * The hardware does not support unaligned transfers. We must move the
  * data one byte at a time. These macros work whether the source or
- * the destination (or both) is/are unaligned.  (Little-endian move)
+ * the destination (or both) is/are unaligned. (Little-endian move)
  */
 
 /* 16-bit source, 16/32/64 destination */
@@ -357,12 +307,6 @@ struct acpi_integer_overlay {
        {(u32)(Pargs), (u32)(Iargs), (u32)(flags), obj_type, class, type}
 #endif
 
-#ifdef ACPI_DISASSEMBLER
-#define ACPI_DISASM_ONLY_MEMBERS(a)     a;
-#else
-#define ACPI_DISASM_ONLY_MEMBERS(a)
-#endif
-
 #define ARG_TYPE_WIDTH                  5
 #define ARG_1(x)                        ((u32)(x))
 #define ARG_2(x)                        ((u32)(x) << (1 * ARG_TYPE_WIDTH))
@@ -388,32 +332,16 @@ struct acpi_integer_overlay {
 #define GET_CURRENT_ARG_TYPE(list)      (list & ((u32) 0x1F))
 #define INCREMENT_ARG_LIST(list)        (list >>= ((u32) ARG_TYPE_WIDTH))
 
-#if defined (ACPI_DEBUG_OUTPUT) || !defined (ACPI_NO_ERROR_MESSAGES)
-/*
- * Module name is include in both debug and non-debug versions primarily for
- * error messages. The __FILE__ macro is not very useful for this, because it
- * often includes the entire pathname to the module
- */
-#define ACPI_MODULE_NAME(name)         static const char ACPI_UNUSED_VAR _acpi_module_name[] = name;
-#else
-#define ACPI_MODULE_NAME(name)
-#endif
-
 /*
  * Ascii error messages can be configured out
  */
 #ifndef ACPI_NO_ERROR_MESSAGES
-#define AE_INFO                         _acpi_module_name, __LINE__
 
 /*
  * Error reporting. Callers module and line number are inserted by AE_INFO,
  * the plist contains a set of parens to allow variable-length lists.
  * These macros are used for both the debug and non-debug versions of the code.
  */
-#define ACPI_INFO(plist)                acpi_ut_info plist
-#define ACPI_WARNING(plist)             acpi_ut_warning plist
-#define ACPI_EXCEPTION(plist)           acpi_ut_exception plist
-#define ACPI_ERROR(plist)               acpi_ut_error plist
 #define ACPI_ERROR_NAMESPACE(s, e)      acpi_ns_report_error (AE_INFO, s, e);
 #define ACPI_ERROR_METHOD(s, n, p, e)   acpi_ns_report_method_error (AE_INFO, s, n, p, e);
 
@@ -421,50 +349,18 @@ struct acpi_integer_overlay {
 
 /* No error messages */
 
-#define ACPI_INFO(plist)
-#define ACPI_WARNING(plist)
-#define ACPI_EXCEPTION(plist)
-#define ACPI_ERROR(plist)
 #define ACPI_ERROR_NAMESPACE(s, e)
 #define ACPI_ERROR_METHOD(s, n, p, e)
-#endif
+#endif         /* ACPI_NO_ERROR_MESSAGES */
 
 /*
  * Debug macros that are conditionally compiled
  */
 #ifdef ACPI_DEBUG_OUTPUT
 
-/*
- * Common parameters used for debug output functions:
- * line number, function name, module(file) name, component ID
- */
-#define ACPI_DEBUG_PARAMETERS           __LINE__, ACPI_GET_FUNCTION_NAME, _acpi_module_name, _COMPONENT
-
 /*
  * Function entry tracing
  */
-
-/*
- * If ACPI_GET_FUNCTION_NAME was not defined in the compiler-dependent header,
- * define it now. This is the case where there the compiler does not support
- * a __func__ macro or equivalent.
- */
-#ifndef ACPI_GET_FUNCTION_NAME
-#define ACPI_GET_FUNCTION_NAME          _acpi_function_name
-/*
- * The Name parameter should be the procedure name as a quoted string.
- * The function name is also used by the function exit macros below.
- * Note: (const char) is used to be compatible with the debug interfaces
- * and macros such as __func__.
- */
-#define ACPI_FUNCTION_NAME(name)       static const char _acpi_function_name[] = #name;
-
-#else
-/* Compiler supports __func__ (or equivalent) -- Ignore this macro */
-
-#define ACPI_FUNCTION_NAME(name)
-#endif
-
 #ifdef CONFIG_ACPI_DEBUG_FUNC_TRACE
 
 #define ACPI_FUNCTION_TRACE(a)          ACPI_FUNCTION_NAME(a) \
@@ -584,15 +480,6 @@ struct acpi_integer_overlay {
 #define ACPI_DUMP_RESOURCE_LIST(a)      acpi_rs_dump_resource_list(a)
 #define ACPI_DUMP_BUFFER(a, b)          acpi_ut_dump_buffer((u8 *) a, b, DB_BYTE_DISPLAY, _COMPONENT)
 
-/*
- * Master debug print macros
- * Print iff:
- *    1) Debug print for the current component is enabled
- *    2) Debug error level or trace level for the print statement is enabled
- */
-#define ACPI_DEBUG_PRINT(plist)         acpi_ut_debug_print plist
-#define ACPI_DEBUG_PRINT_RAW(plist)     acpi_ut_debug_print_raw plist
-
 #else
 /*
  * This is the non-debug case -- make everything go away,
@@ -603,7 +490,6 @@ struct acpi_integer_overlay {
 
 #define ACPI_DEBUG_DEFINE(a)           do { } while(0)
 #define ACPI_DEBUG_ONLY_MEMBERS(a)     do { } while(0)
-#define ACPI_FUNCTION_NAME(a)          do { } while(0)
 #define ACPI_FUNCTION_TRACE(a)         do { } while(0)
 #define ACPI_FUNCTION_TRACE_PTR(a, b)  do { } while(0)
 #define ACPI_FUNCTION_TRACE_U32(a, b)  do { } while(0)
@@ -619,8 +505,6 @@ struct acpi_integer_overlay {
 #define ACPI_DUMP_PATHNAME(a, b, c, d) do { } while(0)
 #define ACPI_DUMP_RESOURCE_LIST(a)     do { } while(0)
 #define ACPI_DUMP_BUFFER(a, b)         do { } while(0)
-#define ACPI_DEBUG_PRINT(pl)           do { } while(0)
-#define ACPI_DEBUG_PRINT_RAW(pl)       do { } while(0)
 
 #define return_VOID                     return
 #define return_ACPI_STATUS(s)           return(s)
@@ -629,7 +513,7 @@ struct acpi_integer_overlay {
 #define return_UINT32(s)                return(s)
 #define return_PTR(s)                   return(s)
 
-#endif
+#endif                         /* ACPI_DEBUG_OUTPUT */
 
 /*
  * Some code only gets executed when the debugger is built in.
similarity index 98%
rename from include/acpi/acnamesp.h
rename to drivers/acpi/acpica/acnamesp.h
index db4e6f677855293c1533c142ea575ce1a1306b00..46cb5b46d2803fd43bf7691bf0ee065fcf039dfc 100644 (file)
@@ -182,7 +182,9 @@ acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info);
  */
 acpi_status
 acpi_ns_check_predefined_names(struct acpi_namespace_node *node,
-                              union acpi_operand_object *return_object);
+                              u32 user_param_count,
+                              acpi_status return_status,
+                              union acpi_operand_object **return_object);
 
 const union acpi_predefined_info *acpi_ns_check_for_predefined_name(struct
                                                                    acpi_namespace_node
@@ -191,6 +193,7 @@ const union acpi_predefined_info *acpi_ns_check_for_predefined_name(struct
 void
 acpi_ns_check_parameter_count(char *pathname,
                              struct acpi_namespace_node *node,
+                             u32 user_param_count,
                              const union acpi_predefined_info *info);
 
 /*
similarity index 98%
rename from include/acpi/actables.h
rename to drivers/acpi/acpica/actables.h
index 0cbe1b9ab52249e38adcd12c5fe0c8009d8ebbd9..7ce6e33c7f781ef71f308bd9ebd35ab33c282da7 100644 (file)
@@ -94,6 +94,8 @@ void acpi_tb_set_table_loaded_flag(u32 table_index, u8 is_loaded);
 /*
  * tbutils - table manager utilities
  */
+acpi_status acpi_tb_initialize_facs(void);
+
 u8 acpi_tb_tables_loaded(void);
 
 void
similarity index 93%
rename from include/acpi/acutils.h
rename to drivers/acpi/acpica/acutils.h
index d8307b2987e371b706ac7e0c96359606fb5cd900..80d8813484fe1ee71cb633e1647644815fc05d6f 100644 (file)
@@ -297,42 +297,6 @@ void acpi_ut_report_info(char *module_name, u32 line_number);
 
 void acpi_ut_report_warning(char *module_name, u32 line_number);
 
-/* Error and message reporting interfaces */
-
-void ACPI_INTERNAL_VAR_XFACE
-acpi_ut_debug_print(u32 requested_debug_level,
-                   u32 line_number,
-                   const char *function_name,
-                   const char *module_name,
-                   u32 component_id,
-                   const char *format, ...) ACPI_PRINTF_LIKE(6);
-
-void ACPI_INTERNAL_VAR_XFACE
-acpi_ut_debug_print_raw(u32 requested_debug_level,
-                       u32 line_number,
-                       const char *function_name,
-                       const char *module_name,
-                       u32 component_id,
-                       const char *format, ...) ACPI_PRINTF_LIKE(6);
-
-void ACPI_INTERNAL_VAR_XFACE
-acpi_ut_error(const char *module_name,
-             u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3);
-
-void ACPI_INTERNAL_VAR_XFACE
-acpi_ut_exception(const char *module_name,
-                 u32 line_number,
-                 acpi_status status,
-                 const char *format, ...) ACPI_PRINTF_LIKE(4);
-
-void ACPI_INTERNAL_VAR_XFACE
-acpi_ut_warning(const char *module_name,
-               u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3);
-
-void ACPI_INTERNAL_VAR_XFACE
-acpi_ut_info(const char *module_name,
-            u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3);
-
 /*
  * utdelete - Object deletion and reference counts
  */
similarity index 99%
rename from drivers/acpi/dispatcher/dsfield.c
rename to drivers/acpi/acpica/dsfield.c
index f988a5e7d2b4f504b62214260788ee28afefa367..53e27bc5a734214cb9b76e2db9fec5cea0fbdf26 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/amlcode.h>
-#include <acpi/acdispat.h>
-#include <acpi/acinterp.h>
-#include <acpi/acnamesp.h>
-#include <acpi/acparser.h>
+#include "accommon.h"
+#include "amlcode.h"
+#include "acdispat.h"
+#include "acinterp.h"
+#include "acnamesp.h"
+#include "acparser.h"
 
 #define _COMPONENT          ACPI_DISPATCHER
 ACPI_MODULE_NAME("dsfield")
similarity index 98%
rename from drivers/acpi/dispatcher/dsinit.c
rename to drivers/acpi/acpica/dsinit.c
index 949f7c75029ee05380cc23e01f17c6e2d43e6fe1..eb144b13d8fa434f93618fb953f498771b7e3a87 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acdispat.h>
-#include <acpi/acnamesp.h>
-#include <acpi/actables.h>
+#include "accommon.h"
+#include "acdispat.h"
+#include "acnamesp.h"
+#include "actables.h"
 
 #define _COMPONENT          ACPI_DISPATCHER
 ACPI_MODULE_NAME("dsinit")
similarity index 98%
rename from drivers/acpi/dispatcher/dsmethod.c
rename to drivers/acpi/acpica/dsmethod.c
index 279a5a60a0dd492a2b27f144b12b353b9de78a2a..14b8b8ed802367c15c814f87695372856d3ca1af 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/amlcode.h>
-#include <acpi/acdispat.h>
-#include <acpi/acinterp.h>
-#include <acpi/acnamesp.h>
+#include "accommon.h"
+#include "amlcode.h"
+#include "acdispat.h"
+#include "acinterp.h"
+#include "acnamesp.h"
+#ifdef ACPI_DISASSEMBLER
 #include <acpi/acdisasm.h>
+#endif
 
 #define _COMPONENT          ACPI_DISPATCHER
 ACPI_MODULE_NAME("dsmethod")
@@ -412,6 +415,9 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
 
        if (obj_desc->method.method_flags & AML_METHOD_INTERNAL_ONLY) {
                status = obj_desc->method.implementation(next_walk_state);
+               if (status == AE_OK) {
+                       status = AE_CTRL_TERMINATE;
+               }
        }
 
        return_ACPI_STATUS(status);
similarity index 99%
rename from drivers/acpi/dispatcher/dsmthdat.c
rename to drivers/acpi/acpica/dsmthdat.c
index d03f81bd1bcb01f02cd6704732c37d54a2ae6822..da0f5468184cc15fbc8fd887bf8b6bc09fd06ec6 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acdispat.h>
-#include <acpi/acnamesp.h>
-#include <acpi/acinterp.h>
+#include "accommon.h"
+#include "acdispat.h"
+#include "acnamesp.h"
+#include "acinterp.h"
 
 #define _COMPONENT          ACPI_DISPATCHER
 ACPI_MODULE_NAME("dsmthdat")
similarity index 99%
rename from drivers/acpi/dispatcher/dsobject.c
rename to drivers/acpi/acpica/dsobject.c
index 4f08e599d07e2a62eb257fefa2b6ba812b132578..15c628e6aa0032f0a2486c8f6ade61fc3b8f556d 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acparser.h>
-#include <acpi/amlcode.h>
-#include <acpi/acdispat.h>
-#include <acpi/acnamesp.h>
-#include <acpi/acinterp.h>
+#include "accommon.h"
+#include "acparser.h"
+#include "amlcode.h"
+#include "acdispat.h"
+#include "acnamesp.h"
+#include "acinterp.h"
 
 #define _COMPONENT          ACPI_DISPATCHER
 ACPI_MODULE_NAME("dsobject")
similarity index 96%
rename from drivers/acpi/dispatcher/dsopcode.c
rename to drivers/acpi/acpica/dsopcode.c
index 69fae5905bb8219af26b0e0684ae22cedc1b84dc..0c3b4dd60e8a5ae9bfdcb2713a33ee8455d1daec 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acparser.h>
-#include <acpi/amlcode.h>
-#include <acpi/acdispat.h>
-#include <acpi/acinterp.h>
-#include <acpi/acnamesp.h>
-#include <acpi/acevents.h>
-#include <acpi/actables.h>
+#include "accommon.h"
+#include "acparser.h"
+#include "amlcode.h"
+#include "acdispat.h"
+#include "acinterp.h"
+#include "acnamesp.h"
+#include "acevents.h"
+#include "actables.h"
 
 #define _COMPONENT          ACPI_DISPATCHER
 ACPI_MODULE_NAME("dsopcode")
@@ -1140,9 +1141,28 @@ acpi_ds_exec_begin_control_op(struct acpi_walk_state *walk_state,
                          op->common.aml_opcode, walk_state));
 
        switch (op->common.aml_opcode) {
-       case AML_IF_OP:
        case AML_WHILE_OP:
 
+               /*
+                * If this is an additional iteration of a while loop, continue.
+                * There is no need to allocate a new control state.
+                */
+               if (walk_state->control_state) {
+                       if (walk_state->control_state->control.aml_predicate_start
+                               == (walk_state->parser_state.aml - 1)) {
+
+                               /* Reset the state to start-of-loop */
+
+                               walk_state->control_state->common.state =
+                                   ACPI_CONTROL_CONDITIONAL_EXECUTING;
+                               break;
+                       }
+               }
+
+               /*lint -fallthrough */
+
+       case AML_IF_OP:
+
                /*
                 * IF/WHILE: Create a new control state to manage these
                 * constructs. We need to manage these as a stack, in order
@@ -1243,13 +1263,36 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state,
 
                ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, "[WHILE_OP] Op=%p\n", op));
 
-               if (walk_state->control_state->common.value) {
+               control_state = walk_state->control_state;
+               if (control_state->common.value) {
 
-                       /* Predicate was true, go back and evaluate it again! */
+                       /* Predicate was true, the body of the loop was just executed */
 
+                       /*
+                        * This loop counter mechanism allows the interpreter to escape
+                        * possibly infinite loops. This can occur in poorly written AML
+                        * when the hardware does not respond within a while loop and the
+                        * loop does not implement a timeout.
+                        */
+                       control_state->control.loop_count++;
+                       if (control_state->control.loop_count >
+                               ACPI_MAX_LOOP_ITERATIONS) {
+                               status = AE_AML_INFINITE_LOOP;
+                               break;
+                       }
+
+                       /*
+                        * Go back and evaluate the predicate and maybe execute the loop
+                        * another time
+                        */
                        status = AE_CTRL_PENDING;
+                       walk_state->aml_last_while =
+                           control_state->control.aml_predicate_start;
+                       break;
                }
 
+               /* Predicate was false, terminate this while loop */
+
                ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
                                  "[WHILE_OP] termination! Op=%p\n", op));
 
@@ -1257,9 +1300,6 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state,
 
                control_state =
                    acpi_ut_pop_generic_state(&walk_state->control_state);
-
-               walk_state->aml_last_while =
-                   control_state->control.aml_predicate_start;
                acpi_ut_delete_generic_state(control_state);
                break;
 
similarity index 99%
rename from drivers/acpi/dispatcher/dsutils.c
rename to drivers/acpi/acpica/dsutils.c
index b398982f0d8baef2e534efc85108a5b338fa0f1a..dabc23a46176b478d5f5ead5df1adca3d9127ef5 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acparser.h>
-#include <acpi/amlcode.h>
-#include <acpi/acdispat.h>
-#include <acpi/acinterp.h>
-#include <acpi/acnamesp.h>
-#include <acpi/acdebug.h>
+#include "accommon.h"
+#include "acparser.h"
+#include "amlcode.h"
+#include "acdispat.h"
+#include "acinterp.h"
+#include "acnamesp.h"
+#include "acdebug.h"
 
 #define _COMPONENT          ACPI_DISPATCHER
 ACPI_MODULE_NAME("dsutils")
similarity index 99%
rename from drivers/acpi/dispatcher/dswexec.c
rename to drivers/acpi/acpica/dswexec.c
index 396fe12078cd1595f99199c8bf837be59df7f3ae..350e6656bc8963951f7861a1f60ebcb422cd7831 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acparser.h>
-#include <acpi/amlcode.h>
-#include <acpi/acdispat.h>
-#include <acpi/acinterp.h>
-#include <acpi/acnamesp.h>
-#include <acpi/acdebug.h>
+#include "accommon.h"
+#include "acparser.h"
+#include "amlcode.h"
+#include "acdispat.h"
+#include "acinterp.h"
+#include "acnamesp.h"
+#include "acdebug.h"
 
 #define _COMPONENT          ACPI_DISPATCHER
 ACPI_MODULE_NAME("dswexec")
similarity index 99%
rename from drivers/acpi/dispatcher/dswload.c
rename to drivers/acpi/acpica/dswload.c
index dff7a3e445a88e7dbd694f858536a7fd5dba3612..3023ceaa8d544d8d0c52a53d0dff2dc13facbd6c 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acparser.h>
-#include <acpi/amlcode.h>
-#include <acpi/acdispat.h>
-#include <acpi/acinterp.h>
-#include <acpi/acnamesp.h>
-#include <acpi/acevents.h>
+#include "accommon.h"
+#include "acparser.h"
+#include "amlcode.h"
+#include "acdispat.h"
+#include "acinterp.h"
+#include "acnamesp.h"
+#include "acevents.h"
 
 #ifdef ACPI_ASL_COMPILER
 #include <acpi/acdisasm.h>
similarity index 99%
rename from drivers/acpi/dispatcher/dswscope.c
rename to drivers/acpi/acpica/dswscope.c
index 9e60732658734c4c1741f32c3eb1ff236da20e61..908645e72f0320477f1f05e83bd43d5a63135cc0 100644 (file)
@@ -42,7 +42,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acdispat.h>
+#include "accommon.h"
+#include "acdispat.h"
 
 #define _COMPONENT          ACPI_DISPATCHER
 ACPI_MODULE_NAME("dswscope")
similarity index 99%
rename from drivers/acpi/dispatcher/dswstate.c
rename to drivers/acpi/acpica/dswstate.c
index b00d4af791aaa7829e4c020fdc19680dba1b1433..40f92bf7dce5cc2e7bf33cd5fd83013d544d4328 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acparser.h>
-#include <acpi/acdispat.h>
-#include <acpi/acnamesp.h>
+#include "accommon.h"
+#include "acparser.h"
+#include "acdispat.h"
+#include "acnamesp.h"
 
 #define _COMPONENT          ACPI_DISPATCHER
 ACPI_MODULE_NAME("dswstate")
similarity index 96%
rename from drivers/acpi/events/evevent.c
rename to drivers/acpi/acpica/evevent.c
index c56c5c6ea77b9d5c8cd0d35cc794aad5ed3ba16b..803edd9e3f6a65f853b31232b07d5719a787c7a2 100644 (file)
@@ -42,7 +42,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acevents.h>
+#include "accommon.h"
+#include "acevents.h"
 
 #define _COMPONENT          ACPI_EVENTS
 ACPI_MODULE_NAME("evevent")
@@ -72,8 +73,8 @@ acpi_status acpi_ev_initialize_events(void)
 
        /*
         * Initialize the Fixed and General Purpose Events. This is done prior to
-        * enabling SCIs to prevent interrupts from occurring before the handlers are
-        * installed.
+        * enabling SCIs to prevent interrupts from occurring before the handlers
+        * are installed.
         */
        status = acpi_ev_fixed_event_initialize();
        if (ACPI_FAILURE(status)) {
@@ -192,8 +193,8 @@ static acpi_status acpi_ev_fixed_event_initialize(void)
        acpi_status status;
 
        /*
-        * Initialize the structure that keeps track of fixed event handlers
-        * and enable the fixed events.
+        * Initialize the structure that keeps track of fixed event handlers and
+        * enable the fixed events.
         */
        for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++) {
                acpi_gbl_fixed_event_handlers[i].handler = NULL;
@@ -237,7 +238,7 @@ u32 acpi_ev_fixed_event_detect(void)
 
        /*
         * Read the fixed feature status and enable registers, as all the cases
-        * depend on their values.  Ignore errors here.
+        * depend on their values. Ignore errors here.
         */
        (void)acpi_hw_register_read(ACPI_REGISTER_PM1_STATUS, &fixed_status);
        (void)acpi_hw_register_read(ACPI_REGISTER_PM1_ENABLE, &fixed_enable);
@@ -291,8 +292,8 @@ static u32 acpi_ev_fixed_event_dispatch(u32 event)
                                status_register_id, 1);
 
        /*
-        * Make sure we've got a handler.  If not, report an error.
-        * The event is disabled to prevent further interrupts.
+        * Make sure we've got a handler. If not, report an error. The event is
+        * disabled to prevent further interrupts.
         */
        if (NULL == acpi_gbl_fixed_event_handlers[event].handler) {
                (void)acpi_set_register(acpi_gbl_fixed_event_info[event].
similarity index 94%
rename from drivers/acpi/events/evgpe.c
rename to drivers/acpi/acpica/evgpe.c
index f45c74fe745e59d1aee76512c7abfc4dbf0f6300..f345ced3647731f4365f4e8e657caec8aaac84d8 100644 (file)
@@ -42,8 +42,9 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acevents.h>
-#include <acpi/acnamesp.h>
+#include "accommon.h"
+#include "acevents.h"
+#include "acnamesp.h"
 
 #define _COMPONENT          ACPI_EVENTS
 ACPI_MODULE_NAME("evgpe")
@@ -125,7 +126,7 @@ acpi_ev_update_gpe_enable_masks(struct acpi_gpe_event_info *gpe_event_info,
            (1 <<
             (gpe_event_info->gpe_number - gpe_register_info->base_gpe_number));
 
-       /* 1) Disable case.  Simply clear all enable bits */
+       /* 1) Disable case. Simply clear all enable bits */
 
        if (type == ACPI_GPE_DISABLE) {
                ACPI_CLEAR_BIT(gpe_register_info->enable_for_wake,
@@ -134,7 +135,7 @@ acpi_ev_update_gpe_enable_masks(struct acpi_gpe_event_info *gpe_event_info,
                return_ACPI_STATUS(AE_OK);
        }
 
-       /* 2) Enable case.  Set/Clear the appropriate enable bits */
+       /* 2) Enable case. Set/Clear the appropriate enable bits */
 
        switch (gpe_event_info->flags & ACPI_GPE_TYPE_MASK) {
        case ACPI_GPE_TYPE_WAKE:
@@ -295,7 +296,7 @@ acpi_status acpi_ev_disable_gpe(struct acpi_gpe_event_info *gpe_event_info)
  *
  * FUNCTION:    acpi_ev_get_gpe_event_info
  *
- * PARAMETERS:  gpe_device          - Device node.  NULL for GPE0/GPE1
+ * PARAMETERS:  gpe_device          - Device node. NULL for GPE0/GPE1
  *              gpe_number          - Raw GPE number
  *
  * RETURN:      A GPE event_info struct. NULL if not a valid GPE
@@ -372,7 +373,7 @@ struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device,
  *
  * RETURN:      INTERRUPT_HANDLED or INTERRUPT_NOT_HANDLED
  *
- * DESCRIPTION: Detect if any GP events have occurred.  This function is
+ * DESCRIPTION: Detect if any GP events have occurred. This function is
  *              executed at interrupt level.
  *
  ******************************************************************************/
@@ -400,8 +401,8 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
 
        /*
         * We need to obtain the GPE lock for both the data structs and registers
-        * Note: Not necessary to obtain the hardware lock, since the GPE registers
-        * are owned by the gpe_lock.
+        * Note: Not necessary to obtain the hardware lock, since the GPE
+        * registers are owned by the gpe_lock.
         */
        flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
 
@@ -410,9 +411,8 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
        gpe_block = gpe_xrupt_list->gpe_block_list_head;
        while (gpe_block) {
                /*
-                * Read all of the 8-bit GPE status and enable registers
-                * in this GPE block, saving all of them.
-                * Find all currently active GP events.
+                * Read all of the 8-bit GPE status and enable registers in this GPE
+                * block, saving all of them. Find all currently active GP events.
                 */
                for (i = 0; i < gpe_block->register_count; i++) {
 
@@ -423,10 +423,8 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
                        /* Read the Status Register */
 
                        status =
-                           acpi_hw_low_level_read(ACPI_GPE_REGISTER_WIDTH,
-                                                  &status_reg,
-                                                  &gpe_register_info->
-                                                  status_address);
+                           acpi_read(&status_reg,
+                                     &gpe_register_info->status_address);
                        if (ACPI_FAILURE(status)) {
                                goto unlock_and_exit;
                        }
@@ -434,10 +432,8 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
                        /* Read the Enable Register */
 
                        status =
-                           acpi_hw_low_level_read(ACPI_GPE_REGISTER_WIDTH,
-                                                  &enable_reg,
-                                                  &gpe_register_info->
-                                                  enable_address);
+                           acpi_read(&enable_reg,
+                                     &gpe_register_info->enable_address);
                        if (ACPI_FAILURE(status)) {
                                goto unlock_and_exit;
                        }
@@ -527,8 +523,8 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
        (void)acpi_ev_enable_gpe(gpe_event_info, FALSE);
 
        /*
-        * Take a snapshot of the GPE info for this level - we copy the
-        * info to prevent a race condition with remove_handler/remove_block.
+        * Take a snapshot of the GPE info for this level - we copy the info to
+        * prevent a race condition with remove_handler/remove_block.
         */
        ACPI_MEMCPY(&local_gpe_event_info, gpe_event_info,
                    sizeof(struct acpi_gpe_event_info));
@@ -539,8 +535,8 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
        }
 
        /*
-        * Must check for control method type dispatch one more
-        * time to avoid race with ev_gpe_install_handler
+        * Must check for control method type dispatch one more time to avoid a
+        * race with ev_gpe_install_handler
         */
        if ((local_gpe_event_info.flags & ACPI_GPE_DISPATCH_MASK) ==
            ACPI_GPE_DISPATCH_METHOD) {
@@ -584,8 +580,8 @@ static void acpi_ev_asynch_enable_gpe(void *context)
        if ((gpe_event_info->flags & ACPI_GPE_XRUPT_TYPE_MASK) ==
            ACPI_GPE_LEVEL_TRIGGERED) {
                /*
-                * GPE is level-triggered, we clear the GPE status bit after
-                * handling the event.
+                * GPE is level-triggered, we clear the GPE status bit after handling
+                * the event.
                 */
                status = acpi_hw_clear_gpe(gpe_event_info);
                if (ACPI_FAILURE(status)) {
@@ -624,7 +620,7 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number)
        acpi_os_gpe_count(gpe_number);
 
        /*
-        * If edge-triggered, clear the GPE status bit now.  Note that
+        * If edge-triggered, clear the GPE status bit now. Note that
         * level-triggered events are cleared after the GPE is serviced.
         */
        if ((gpe_event_info->flags & ACPI_GPE_XRUPT_TYPE_MASK) ==
@@ -650,7 +646,8 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number)
 
                /*
                 * Invoke the installed handler (at interrupt level)
-                * Ignore return status for now.  TBD: leave GPE disabled on error?
+                * Ignore return status for now.
+                * TBD: leave GPE disabled on error?
                 */
                (void)gpe_event_info->dispatch.handler->address(gpe_event_info->
                                                                dispatch.
@@ -708,7 +705,7 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number)
                            gpe_number));
 
                /*
-                * Disable the GPE. The GPE will remain disabled until the ACPI
+                * Disable the GPE. The GPE will remain disabled until the ACPICA
                 * Core Subsystem is restarted, or a handler is installed.
                 */
                status = acpi_ev_disable_gpe(gpe_event_info);
similarity index 94%
rename from drivers/acpi/events/evgpeblk.c
rename to drivers/acpi/acpica/evgpeblk.c
index 73c058e2f5c213b9aa3b8e01f958bc7f81b52d26..484cc0565d5baffd708e93de337da6be4c0f9074 100644 (file)
@@ -42,8 +42,9 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acevents.h>
-#include <acpi/acnamesp.h>
+#include "accommon.h"
+#include "acevents.h"
+#include "acnamesp.h"
 
 #define _COMPONENT          ACPI_EVENTS
 ACPI_MODULE_NAME("evgpeblk")
@@ -124,6 +125,7 @@ u8 acpi_ev_valid_gpe_event(struct acpi_gpe_event_info *gpe_event_info)
  * FUNCTION:    acpi_ev_walk_gpe_list
  *
  * PARAMETERS:  gpe_walk_callback   - Routine called for each GPE block
+ *              Context             - Value passed to callback
  *
  * RETURN:      Status
  *
@@ -131,7 +133,8 @@ u8 acpi_ev_valid_gpe_event(struct acpi_gpe_event_info *gpe_event_info)
  *
  ******************************************************************************/
 
-acpi_status acpi_ev_walk_gpe_list(acpi_gpe_callback gpe_walk_callback)
+acpi_status
+acpi_ev_walk_gpe_list(acpi_gpe_callback gpe_walk_callback, void *context)
 {
        struct acpi_gpe_block_info *gpe_block;
        struct acpi_gpe_xrupt_info *gpe_xrupt_info;
@@ -154,8 +157,13 @@ acpi_status acpi_ev_walk_gpe_list(acpi_gpe_callback gpe_walk_callback)
 
                        /* One callback per GPE block */
 
-                       status = gpe_walk_callback(gpe_xrupt_info, gpe_block);
+                       status =
+                           gpe_walk_callback(gpe_xrupt_info, gpe_block,
+                                             context);
                        if (ACPI_FAILURE(status)) {
+                               if (status == AE_CTRL_END) {    /* Callback abort */
+                                       status = AE_OK;
+                               }
                                goto unlock_and_exit;
                        }
 
@@ -186,7 +194,8 @@ acpi_status acpi_ev_walk_gpe_list(acpi_gpe_callback gpe_walk_callback)
 
 acpi_status
 acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
-                           struct acpi_gpe_block_info *gpe_block)
+                           struct acpi_gpe_block_info *gpe_block,
+                           void *context)
 {
        struct acpi_gpe_event_info *gpe_event_info;
        u32 i;
@@ -309,17 +318,17 @@ acpi_ev_save_method_info(acpi_handle obj_handle,
             (gpe_block->block_base_number +
              (gpe_block->register_count * 8)))) {
                /*
-                * Not valid for this GPE block, just ignore it
-                * However, it may be valid for a different GPE block, since GPE0 and GPE1
-                * methods both appear under \_GPE.
+                * Not valid for this GPE block, just ignore it. However, it may be
+                * valid for a different GPE block, since GPE0 and GPE1 methods both
+                * appear under \_GPE.
                 */
                return_ACPI_STATUS(AE_OK);
        }
 
        /*
-        * Now we can add this information to the gpe_event_info block
-        * for use during dispatch of this GPE. Default type is RUNTIME, although
-        * this may change when the _PRW methods are executed later.
+        * Now we can add this information to the gpe_event_info block for use
+        * during dispatch of this GPE. Default type is RUNTIME, although this may
+        * change when the _PRW methods are executed later.
         */
        gpe_event_info =
            &gpe_block->event_info[gpe_number - gpe_block->block_base_number];
@@ -394,8 +403,8 @@ acpi_ev_match_prw_and_gpe(acpi_handle obj_handle,
        gpe_block = gpe_info->gpe_block;
 
        /*
-        * The _PRW object must return a package, we are only interested
-        * in the first element
+        * The _PRW object must return a package, we are only interested in the
+        * first element
         */
        obj_desc = pkg_desc->package.elements[0];
 
@@ -434,7 +443,7 @@ acpi_ev_match_prw_and_gpe(acpi_handle obj_handle,
        /*
         * Is this GPE within this block?
         *
-        * TRUE iff these conditions are true:
+        * TRUE if and only if these conditions are true:
         *     1) The GPE devices match.
         *     2) The GPE index(number) is within the range of the Gpe Block
         *          associated with the GPE device.
@@ -457,6 +466,7 @@ acpi_ev_match_prw_and_gpe(acpi_handle obj_handle,
                if (ACPI_FAILURE(status)) {
                        goto cleanup;
                }
+
                status =
                    acpi_ev_update_gpe_enable_masks(gpe_event_info,
                                                    ACPI_GPE_DISABLE);
@@ -476,9 +486,9 @@ acpi_ev_match_prw_and_gpe(acpi_handle obj_handle,
  * RETURN:      A GPE interrupt block
  *
  * DESCRIPTION: Get or Create a GPE interrupt block. There is one interrupt
- *              block per unique interrupt level used for GPEs.
- *              Should be called only when the GPE lists are semaphore locked
- *              and not subject to change.
+ *              block per unique interrupt level used for GPEs. Should be
+ *              called only when the GPE lists are semaphore locked and not
+ *              subject to change.
  *
  ******************************************************************************/
 
@@ -608,8 +618,9 @@ acpi_ev_delete_gpe_xrupt(struct acpi_gpe_xrupt_info *gpe_xrupt)
  *
  * FUNCTION:    acpi_ev_install_gpe_block
  *
- * PARAMETERS:  gpe_block       - New GPE block
- *              interrupt_number - Xrupt to be associated with this GPE block
+ * PARAMETERS:  gpe_block               - New GPE block
+ *              interrupt_number        - Xrupt to be associated with this
+ *                                        GPE block
  *
  * RETURN:      Status
  *
@@ -666,7 +677,7 @@ acpi_ev_install_gpe_block(struct acpi_gpe_block_info *gpe_block,
  *
  * FUNCTION:    acpi_ev_delete_gpe_block
  *
- * PARAMETERS:  gpe_block       - Existing GPE block
+ * PARAMETERS:  gpe_block           - Existing GPE block
  *
  * RETURN:      Status
  *
@@ -688,7 +699,8 @@ acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block)
 
        /* Disable all GPEs in this block */
 
-       status = acpi_hw_disable_gpe_block(gpe_block->xrupt_block, gpe_block);
+       status =
+           acpi_hw_disable_gpe_block(gpe_block->xrupt_block, gpe_block, NULL);
 
        if (!gpe_block->previous && !gpe_block->next) {
 
@@ -715,6 +727,9 @@ acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block)
                acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
        }
 
+       acpi_current_gpe_count -=
+           gpe_block->register_count * ACPI_GPE_REGISTER_WIDTH;
+
        /* Free the gpe_block */
 
        ACPI_FREE(gpe_block->register_info);
@@ -786,9 +801,9 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)
 
        /*
         * Initialize the GPE Register and Event structures. A goal of these
-        * tables is to hide the fact that there are two separate GPE register sets
-        * in a given GPE hardware block, the status registers occupy the first half,
-        * and the enable registers occupy the second half.
+        * tables is to hide the fact that there are two separate GPE register
+        * sets in a given GPE hardware block, the status registers occupy the
+        * first half, and the enable registers occupy the second half.
         */
        this_register = gpe_register_info;
        this_event = gpe_event_info;
@@ -816,10 +831,8 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)
                    ACPI_GPE_REGISTER_WIDTH;
                this_register->enable_address.bit_width =
                    ACPI_GPE_REGISTER_WIDTH;
-               this_register->status_address.bit_offset =
-                   ACPI_GPE_REGISTER_WIDTH;
-               this_register->enable_address.bit_offset =
-                   ACPI_GPE_REGISTER_WIDTH;
+               this_register->status_address.bit_offset = 0;
+               this_register->enable_address.bit_offset = 0;
 
                /* Init the event_info for each GPE within this register */
 
@@ -832,18 +845,14 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)
 
                /* Disable all GPEs within this register */
 
-               status = acpi_hw_low_level_write(ACPI_GPE_REGISTER_WIDTH, 0x00,
-                                                &this_register->
-                                                enable_address);
+               status = acpi_write(0x00, &this_register->enable_address);
                if (ACPI_FAILURE(status)) {
                        goto error_exit;
                }
 
                /* Clear any pending GPE events within this register */
 
-               status = acpi_hw_low_level_write(ACPI_GPE_REGISTER_WIDTH, 0xFF,
-                                                &this_register->
-                                                status_address);
+               status = acpi_write(0xFF, &this_register->status_address);
                if (ACPI_FAILURE(status)) {
                        goto error_exit;
                }
@@ -956,6 +965,9 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device,
                          gpe_device->name.ascii, gpe_block->register_count,
                          interrupt_number));
 
+       /* Update global count of currently available GPEs */
+
+       acpi_current_gpe_count += register_count * ACPI_GPE_REGISTER_WIDTH;
        return_ACPI_STATUS(AE_OK);
 }
 
@@ -1055,7 +1067,7 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device,
 
        /* Enable all valid runtime GPEs found above */
 
-       status = acpi_hw_enable_runtime_gpe_block(NULL, gpe_block);
+       status = acpi_hw_enable_runtime_gpe_block(NULL, gpe_block, NULL);
        if (ACPI_FAILURE(status)) {
                ACPI_ERROR((AE_INFO, "Could not enable GPEs in GpeBlock %p",
                            gpe_block));
similarity index 93%
rename from drivers/acpi/events/evmisc.c
rename to drivers/acpi/acpica/evmisc.c
index 1d5670be729ab3cc13e8d57c639463adce8788dc..5f893057bcc617909cb08294089e6f0e98f9dc53 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acevents.h>
-#include <acpi/acnamesp.h>
-#include <acpi/acinterp.h>
+#include "accommon.h"
+#include "acevents.h"
+#include "acnamesp.h"
+#include "acinterp.h"
 
 #define _COMPONENT          ACPI_EVENTS
 ACPI_MODULE_NAME("evmisc")
 
-/* Pointer to FACS needed for the Global Lock */
-static struct acpi_table_facs *facs = NULL;
-
 /* Local prototypes */
-
 static void ACPI_SYSTEM_XFACE acpi_ev_notify_dispatch(void *context);
 
 static u32 acpi_ev_global_lock_handler(void *context);
@@ -152,7 +149,9 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node,
                        break;
 
                default:
+
                        /* All other types are not supported */
+
                        return (AE_TYPE);
                }
        }
@@ -193,9 +192,8 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node,
                        acpi_ut_delete_generic_state(notify_info);
                }
        } else {
-               /*
-                * There is no notify handler (per-device or system) for this device.
-                */
+               /* There is no notify handler (per-device or system) for this device */
+
                ACPI_DEBUG_PRINT((ACPI_DB_INFO,
                                  "No notify handler for Notify (%4.4s, %X) node %p\n",
                                  acpi_ut_get_node_name(node), notify_value,
@@ -229,9 +227,8 @@ static void ACPI_SYSTEM_XFACE acpi_ev_notify_dispatch(void *context)
        ACPI_FUNCTION_ENTRY();
 
        /*
-        * We will invoke a global notify handler if installed.
-        * This is done _before_ we invoke the per-device handler attached
-        * to the device.
+        * We will invoke a global notify handler if installed. This is done
+        * _before_ we invoke the per-device handler attached to the device.
         */
        if (notify_info->notify.value <= ACPI_MAX_SYS_NOTIFY) {
 
@@ -299,7 +296,7 @@ static u32 acpi_ev_global_lock_handler(void *context)
         * If we don't get it now, it will be marked pending and we will
         * take another interrupt when it becomes free.
         */
-       ACPI_ACQUIRE_GLOBAL_LOCK(facs, acquired);
+       ACPI_ACQUIRE_GLOBAL_LOCK(acpi_gbl_FACS, acquired);
        if (acquired) {
 
                /* Got the lock, now wake all threads waiting for it */
@@ -336,34 +333,27 @@ acpi_status acpi_ev_init_global_lock_handler(void)
 
        ACPI_FUNCTION_TRACE(ev_init_global_lock_handler);
 
-       status = acpi_get_table_by_index(ACPI_TABLE_INDEX_FACS,
-                                        ACPI_CAST_INDIRECT_PTR(struct
-                                                               acpi_table_header,
-                                                               &facs));
-       if (ACPI_FAILURE(status)) {
-               return_ACPI_STATUS(status);
-       }
+       /* Attempt installation of the global lock handler */
 
-       acpi_gbl_global_lock_present = TRUE;
        status = acpi_install_fixed_event_handler(ACPI_EVENT_GLOBAL,
                                                  acpi_ev_global_lock_handler,
                                                  NULL);
 
        /*
-        * If the global lock does not exist on this platform, the attempt
-        * to enable GBL_STATUS will fail (the GBL_ENABLE bit will not stick)
-        * Map to AE_OK, but mark global lock as not present.
-        * Any attempt to actually use the global lock will be flagged
-        * with an error.
+        * If the global lock does not exist on this platform, the attempt to
+        * enable GBL_STATUS will fail (the GBL_ENABLE bit will not stick).
+        * Map to AE_OK, but mark global lock as not present. Any attempt to
+        * actually use the global lock will be flagged with an error.
         */
        if (status == AE_NO_HARDWARE_RESPONSE) {
                ACPI_ERROR((AE_INFO,
                            "No response from Global Lock hardware, disabling lock"));
 
                acpi_gbl_global_lock_present = FALSE;
-               status = AE_OK;
+               return_ACPI_STATUS(AE_OK);
        }
 
+       acpi_gbl_global_lock_present = TRUE;
        return_ACPI_STATUS(status);
 }
 
@@ -462,8 +452,8 @@ acpi_status acpi_ev_acquire_global_lock(u16 timeout)
        }
 
        /*
-        * Make sure that a global lock actually exists. If not, just treat
-        * the lock as a standard mutex.
+        * Make sure that a global lock actually exists. If not, just treat the
+        * lock as a standard mutex.
         */
        if (!acpi_gbl_global_lock_present) {
                acpi_gbl_global_lock_acquired = TRUE;
@@ -472,7 +462,7 @@ acpi_status acpi_ev_acquire_global_lock(u16 timeout)
 
        /* Attempt to acquire the actual hardware lock */
 
-       ACPI_ACQUIRE_GLOBAL_LOCK(facs, acquired);
+       ACPI_ACQUIRE_GLOBAL_LOCK(acpi_gbl_FACS, acquired);
        if (acquired) {
 
                /* We got the lock */
@@ -536,7 +526,7 @@ acpi_status acpi_ev_release_global_lock(void)
 
                /* Allow any thread to release the lock */
 
-               ACPI_RELEASE_GLOBAL_LOCK(facs, pending);
+               ACPI_RELEASE_GLOBAL_LOCK(acpi_gbl_FACS, pending);
 
                /*
                 * If the pending bit was set, we must write GBL_RLS to the control
@@ -582,8 +572,8 @@ void acpi_ev_terminate(void)
 
        if (acpi_gbl_events_initialized) {
                /*
-                * Disable all event-related functionality.
-                * In all cases, on error, print a message but obviously we don't abort.
+                * Disable all event-related functionality. In all cases, on error,
+                * print a message but obviously we don't abort.
                 */
 
                /* Disable all fixed events */
@@ -599,7 +589,7 @@ void acpi_ev_terminate(void)
 
                /* Disable all GPEs in all GPE blocks */
 
-               status = acpi_ev_walk_gpe_list(acpi_hw_disable_gpe_block);
+               status = acpi_ev_walk_gpe_list(acpi_hw_disable_gpe_block, NULL);
 
                /* Remove SCI handler */
 
@@ -617,7 +607,7 @@ void acpi_ev_terminate(void)
 
        /* Deallocate all handler objects installed within GPE info structs */
 
-       status = acpi_ev_walk_gpe_list(acpi_ev_delete_gpe_handlers);
+       status = acpi_ev_walk_gpe_list(acpi_ev_delete_gpe_handlers, NULL);
 
        /* Return to original mode if necessary */
 
similarity index 91%
rename from drivers/acpi/events/evregion.c
rename to drivers/acpi/acpica/evregion.c
index 236fbd1ca438ae35c1cff68c76cc0df69556b82f..665c0887ab4de9af51e4414106539058e9bc909b 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acevents.h>
-#include <acpi/acnamesp.h>
-#include <acpi/acinterp.h>
+#include "accommon.h"
+#include "acevents.h"
+#include "acnamesp.h"
+#include "acinterp.h"
 
 #define _COMPONENT          ACPI_EVENTS
 ACPI_MODULE_NAME("evregion")
-#define ACPI_NUM_DEFAULT_SPACES     4
-static u8 acpi_gbl_default_address_spaces[ACPI_NUM_DEFAULT_SPACES] = {
-       ACPI_ADR_SPACE_SYSTEM_MEMORY,
-       ACPI_ADR_SPACE_SYSTEM_IO,
-       ACPI_ADR_SPACE_PCI_CONFIG,
-       ACPI_ADR_SPACE_DATA_TABLE
-};
 
 /* Local prototypes */
-
 static acpi_status
 acpi_ev_reg_run(acpi_handle obj_handle,
                u32 level, void *context, void **return_value);
@@ -66,6 +59,17 @@ static acpi_status
 acpi_ev_install_handler(acpi_handle obj_handle,
                        u32 level, void *context, void **return_value);
 
+/* These are the address spaces that will get default handlers */
+
+#define ACPI_NUM_DEFAULT_SPACES     4
+
+static u8 acpi_gbl_default_address_spaces[ACPI_NUM_DEFAULT_SPACES] = {
+       ACPI_ADR_SPACE_SYSTEM_MEMORY,
+       ACPI_ADR_SPACE_SYSTEM_IO,
+       ACPI_ADR_SPACE_PCI_CONFIG,
+       ACPI_ADR_SPACE_DATA_TABLE
+};
+
 /*******************************************************************************
  *
  * FUNCTION:    acpi_ev_install_region_handlers
@@ -91,18 +95,19 @@ acpi_status acpi_ev_install_region_handlers(void)
        }
 
        /*
-        * All address spaces (PCI Config, EC, SMBus) are scope dependent
-        * and registration must occur for a specific device.
+        * All address spaces (PCI Config, EC, SMBus) are scope dependent and
+        * registration must occur for a specific device.
         *
-        * In the case of the system memory and IO address spaces there is currently
-        * no device associated with the address space.  For these we use the root.
+        * In the case of the system memory and IO address spaces there is
+        * currently no device associated with the address space. For these we
+        * use the root.
         *
-        * We install the default PCI config space handler at the root so
-        * that this space is immediately available even though the we have
-        * not enumerated all the PCI Root Buses yet.  This is to conform
-        * to the ACPI specification which states that the PCI config
-        * space must be always available -- even though we are nowhere
-        * near ready to find the PCI root buses at this point.
+        * We install the default PCI config space handler at the root so that
+        * this space is immediately available even though the we have not
+        * enumerated all the PCI Root Buses yet. This is to conform to the ACPI
+        * specification which states that the PCI config space must be always
+        * available -- even though we are nowhere near ready to find the PCI root
+        * buses at this point.
         *
         * NOTE: We ignore AE_ALREADY_EXISTS because this means that a handler
         * has already been installed (via acpi_install_address_space_handler).
@@ -160,12 +165,11 @@ acpi_status acpi_ev_initialize_op_regions(void)
                return_ACPI_STATUS(status);
        }
 
-       /*
-        * Run the _REG methods for op_regions in each default address space
-        */
-       for (i = 0; i < ACPI_NUM_DEFAULT_SPACES; i++) {
+       /* Run the _REG methods for op_regions in each default address space */
 
-               /* TBD: Make sure handler is the DEFAULT handler, otherwise
+       for (i = 0; i < ACPI_NUM_DEFAULT_SPACES; i++) {
+               /*
+                * TBD: Make sure handler is the DEFAULT handler, otherwise
                 * _REG will have already been run.
                 */
                status = acpi_ev_execute_reg_methods(acpi_gbl_root_node,
@@ -318,13 +322,13 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
        }
 
        /*
-        * It may be the case that the region has never been initialized
+        * It may be the case that the region has never been initialized.
         * Some types of regions require special init code
         */
        if (!(region_obj->region.flags & AOPOBJ_SETUP_COMPLETE)) {
-               /*
-                * This region has not been initialized yet, do it
-                */
+
+               /* This region has not been initialized yet, do it */
+
                region_setup = handler_desc->address_space.setup;
                if (!region_setup) {
 
@@ -339,9 +343,9 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
                }
 
                /*
-                * We must exit the interpreter because the region
-                * setup will potentially execute control methods
-                * (e.g., _REG method for this region)
+                * We must exit the interpreter because the region setup will
+                * potentially execute control methods (for example, the _REG method
+                * for this region)
                 */
                acpi_ex_exit_interpreter();
 
@@ -364,9 +368,8 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
                        return_ACPI_STATUS(status);
                }
 
-               /*
-                * Region initialization may have been completed by region_setup
-                */
+               /* Region initialization may have been completed by region_setup */
+
                if (!(region_obj->region.flags & AOPOBJ_SETUP_COMPLETE)) {
                        region_obj->region.flags |= AOPOBJ_SETUP_COMPLETE;
 
@@ -521,8 +524,8 @@ acpi_ev_detach_region(union acpi_operand_object *region_obj,
                        }
 
                        /*
-                        * If the region has been activated, call the setup handler
-                        * with the deactivate notification
+                        * If the region has been activated, call the setup handler with
+                        * the deactivate notification
                         */
                        if (region_obj->region.flags & AOPOBJ_SETUP_COMPLETE) {
                                region_setup = handler_obj->address_space.setup;
@@ -668,8 +671,8 @@ acpi_ev_install_handler(acpi_handle obj_handle,
        }
 
        /*
-        * We only care about regions.and objects
-        * that are allowed to have address space handlers
+        * We only care about regions and objects that are allowed to have
+        * address space handlers
         */
        if ((node->type != ACPI_TYPE_DEVICE) &&
            (node->type != ACPI_TYPE_REGION) && (node != acpi_gbl_root_node)) {
@@ -710,9 +713,9 @@ acpi_ev_install_handler(acpi_handle obj_handle,
                                /*
                                 * Since the object we found it on was a device, then it
                                 * means that someone has already installed a handler for
-                                * the branch of the namespace from this device on.  Just
+                                * the branch of the namespace from this device on. Just
                                 * bail out telling the walk routine to not traverse this
-                                * branch.  This preserves the scoping rule for handlers.
+                                * branch. This preserves the scoping rule for handlers.
                                 */
                                return (AE_CTRL_DEPTH);
                        }
@@ -723,9 +726,8 @@ acpi_ev_install_handler(acpi_handle obj_handle,
                }
 
                /*
-                * As long as the device didn't have a handler for this
-                * space we don't care about it.  We just ignore it and
-                * proceed.
+                * As long as the device didn't have a handler for this space we
+                * don't care about it. We just ignore it and proceed.
                 */
                return (AE_OK);
        }
@@ -733,16 +735,14 @@ acpi_ev_install_handler(acpi_handle obj_handle,
        /* Object is a Region */
 
        if (obj_desc->region.space_id != handler_obj->address_space.space_id) {
-               /*
-                * This region is for a different address space
-                * -- just ignore it
-                */
+
+               /* This region is for a different address space, just ignore it */
+
                return (AE_OK);
        }
 
        /*
-        * Now we have a region and it is for the handler's address
-        * space type.
+        * Now we have a region and it is for the handler's address space type.
         *
         * First disconnect region for any previous handler (if any)
         */
@@ -786,9 +786,8 @@ acpi_ev_install_space_handler(struct acpi_namespace_node * node,
        ACPI_FUNCTION_TRACE(ev_install_space_handler);
 
        /*
-        * This registration is valid for only the types below
-        * and the root.  This is where the default handlers
-        * get placed.
+        * This registration is valid for only the types below and the root. This
+        * is where the default handlers get placed.
         */
        if ((node->type != ACPI_TYPE_DEVICE) &&
            (node->type != ACPI_TYPE_PROCESSOR) &&
@@ -848,8 +847,8 @@ acpi_ev_install_space_handler(struct acpi_namespace_node * node,
        obj_desc = acpi_ns_get_attached_object(node);
        if (obj_desc) {
                /*
-                * The attached device object already exists.
-                * Make sure the handler is not already installed.
+                * The attached device object already exists. Make sure the handler
+                * is not already installed.
                 */
                handler_obj = obj_desc->device.handler;
 
@@ -864,8 +863,8 @@ acpi_ev_install_space_handler(struct acpi_namespace_node * node,
                                    handler) {
                                        /*
                                         * It is (relatively) OK to attempt to install the SAME
-                                        * handler twice. This can easily happen
-                                        * with PCI_Config space.
+                                        * handler twice. This can easily happen with the
+                                        * PCI_Config space.
                                         */
                                        status = AE_SAME_HANDLER;
                                        goto unlock_and_exit;
@@ -925,9 +924,8 @@ acpi_ev_install_space_handler(struct acpi_namespace_node * node,
        /*
         * Install the handler
         *
-        * At this point there is no existing handler.
-        * Just allocate the object for the handler and link it
-        * into the list.
+        * At this point there is no existing handler. Just allocate the object
+        * for the handler and link it into the list.
         */
        handler_obj =
            acpi_ut_create_internal_object(ACPI_TYPE_LOCAL_ADDRESS_HANDLER);
@@ -1000,11 +998,10 @@ acpi_ev_execute_reg_methods(struct acpi_namespace_node *node,
        ACPI_FUNCTION_TRACE(ev_execute_reg_methods);
 
        /*
-        * Run all _REG methods for all Operation Regions for this
-        * space ID.  This is a separate walk in order to handle any
-        * interdependencies between regions and _REG methods.  (i.e. handlers
-        * must be installed for all regions of this Space ID before we
-        * can run any _REG methods)
+        * Run all _REG methods for all Operation Regions for this space ID. This
+        * is a separate walk in order to handle any interdependencies between
+        * regions and _REG methods. (i.e. handlers must be installed for all
+        * regions of this Space ID before we can run any _REG methods)
         */
        status = acpi_ns_walk_namespace(ACPI_TYPE_ANY, node, ACPI_UINT32_MAX,
                                        ACPI_NS_WALK_UNLOCK, acpi_ev_reg_run,
@@ -1042,8 +1039,8 @@ acpi_ev_reg_run(acpi_handle obj_handle,
        }
 
        /*
-        * We only care about regions.and objects
-        * that are allowed to have address space handlers
+        * We only care about regions.and objects that are allowed to have address
+        * space handlers
         */
        if ((node->type != ACPI_TYPE_REGION) && (node != acpi_gbl_root_node)) {
                return (AE_OK);
@@ -1062,10 +1059,9 @@ acpi_ev_reg_run(acpi_handle obj_handle,
        /* Object is a Region */
 
        if (obj_desc->region.space_id != space_id) {
-               /*
-                * This region is for a different address space
-                * -- just ignore it
-                */
+
+               /* This region is for a different address space, just ignore it */
+
                return (AE_OK);
        }
 
similarity index 95%
rename from drivers/acpi/events/evrgnini.c
rename to drivers/acpi/acpica/evrgnini.c
index 6b94b38df07dd30b77580af0459c81e640776d29..f3f1fb45c3dcd542bcbb871960d060fbb15a304b 100644 (file)
@@ -42,8 +42,9 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acevents.h>
-#include <acpi/acnamesp.h>
+#include "accommon.h"
+#include "acevents.h"
+#include "acnamesp.h"
 
 #define _COMPONENT          ACPI_EVENTS
 ACPI_MODULE_NAME("evrgnini")
@@ -233,9 +234,9 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,
                                if (ACPI_FAILURE(status)) {
                                        if (status == AE_SAME_HANDLER) {
                                                /*
-                                                * It is OK if the handler is already installed on the root
-                                                * bridge.  Still need to return a context object for the
-                                                * new PCI_Config operation region, however.
+                                                * It is OK if the handler is already installed on the
+                                                * root bridge. Still need to return a context object
+                                                * for the new PCI_Config operation region, however.
                                                 */
                                                status = AE_OK;
                                        } else {
@@ -272,8 +273,8 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,
        }
 
        /*
-        * For PCI_Config space access, we need the segment, bus,
-        * device and function numbers.  Acquire them here.
+        * For PCI_Config space access, we need the segment, bus, device and
+        * function numbers. Acquire them here.
         *
         * Find the parent device object. (This allows the operation region to be
         * within a subscope under the device, such as a control method.)
@@ -289,16 +290,16 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,
        }
 
        /*
-        * Get the PCI device and function numbers from the _ADR object
-        * contained in the parent's scope.
+        * Get the PCI device and function numbers from the _ADR object contained
+        * in the parent's scope.
         */
        status =
            acpi_ut_evaluate_numeric_object(METHOD_NAME__ADR, pci_device_node,
                                            &pci_value);
 
        /*
-        * The default is zero, and since the allocation above zeroed
-        * the data, just do nothing on failure.
+        * The default is zero, and since the allocation above zeroed the data,
+        * just do nothing on failure.
         */
        if (ACPI_SUCCESS(status)) {
                pci_id->device = ACPI_HIWORD(ACPI_LODWORD(pci_value));
@@ -382,9 +383,8 @@ static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node)
        struct acpi_compatible_id_list *cid;
        u32 i;
 
-       /*
-        * Get the _HID and check for a PCI Root Bridge
-        */
+       /* Get the _HID and check for a PCI Root Bridge */
+
        status = acpi_ut_execute_HID(node, &hid);
        if (ACPI_FAILURE(status)) {
                return (FALSE);
@@ -394,10 +394,8 @@ static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node)
                return (TRUE);
        }
 
-       /*
-        * The _HID did not match.
-        * Get the _CID and check for a PCI Root Bridge
-        */
+       /* The _HID did not match. Get the _CID and check for a PCI Root Bridge */
+
        status = acpi_ut_execute_CID(node, &cid);
        if (ACPI_FAILURE(status)) {
                return (FALSE);
@@ -516,9 +514,9 @@ acpi_ev_default_region_setup(acpi_handle handle,
  *              Get the appropriate address space handler for a newly
  *              created region.
  *
- *              This also performs address space specific initialization.  For
+ *              This also performs address space specific initialization. For
  *              example, PCI regions must have an _ADR object that contains
- *              a PCI address in the scope of the definition.  This address is
+ *              a PCI address in the scope of the definition. This address is
  *              required to perform an access to PCI config space.
  *
  * MUTEX:       Interpreter should be unlocked, because we may run the _REG
@@ -572,7 +570,7 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj,
        if (ACPI_SUCCESS(status)) {
                /*
                 * The _REG method is optional and there can be only one per region
-                * definition.  This will be executed when the handler is attached
+                * definition. This will be executed when the handler is attached
                 * or removed
                 */
                region_obj2->extra.method_REG = method_node;
@@ -670,10 +668,8 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj,
                        }
                }
 
-               /*
-                * This node does not have the handler we need;
-                * Pop up one level
-                */
+               /* This node does not have the handler we need; Pop up one level */
+
                node = acpi_ns_get_parent_node(node);
        }
 
similarity index 95%
rename from drivers/acpi/events/evsci.c
rename to drivers/acpi/acpica/evsci.c
index 2a8b77877610a13df05762d10a9a77ce4adf8eb1..567b356c85affb780175f5009ebbb12faa0cb8db 100644 (file)
@@ -43,7 +43,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acevents.h>
+#include "accommon.h"
+#include "acevents.h"
 
 #define _COMPONENT          ACPI_EVENTS
 ACPI_MODULE_NAME("evsci")
@@ -115,10 +116,8 @@ u32 ACPI_SYSTEM_XFACE acpi_ev_gpe_xrupt_handler(void *context)
         * if this interrupt handler is installed, ACPI is enabled.
         */
 
-       /*
-        * GPEs:
-        * Check for and dispatch any GPEs that have occurred
-        */
+       /* GPEs: Check for and dispatch any GPEs that have occurred */
+
        interrupt_handled |= acpi_ev_gpe_detect(gpe_xrupt_list);
 
        return_UINT32(interrupt_handled);
@@ -158,11 +157,11 @@ u32 acpi_ev_install_sci_handler(void)
  * RETURN:      E_OK if handler uninstalled OK, E_ERROR if handler was not
  *              installed to begin with
  *
- * DESCRIPTION: Remove the SCI interrupt handler.  No further SCIs will be
+ * DESCRIPTION: Remove the SCI interrupt handler. No further SCIs will be
  *              taken.
  *
  * Note:  It doesn't seem important to disable all events or set the event
- *        enable registers to their original values.  The OS should disable
+ *        enable registers to their original values. The OS should disable
  *        the SCI interrupt level when the handler is removed, so no more
  *        events will come in.
  *
similarity index 99%
rename from drivers/acpi/events/evxface.c
rename to drivers/acpi/acpica/evxface.c
index 94a6efe020bed116118c408e92f35f30a0d23a2e..3aca9010a11eb16f4ded8775e009ae99cb010bf9 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acnamesp.h>
-#include <acpi/acevents.h>
-#include <acpi/acinterp.h>
+#include "accommon.h"
+#include "acnamesp.h"
+#include "acevents.h"
+#include "acinterp.h"
 
 #define _COMPONENT          ACPI_EVENTS
 ACPI_MODULE_NAME("evxface")
@@ -267,7 +268,7 @@ acpi_install_notify_handler(acpi_handle device,
        /*
         * Root Object:
         * Registering a notify handler on the root object indicates that the
-        * caller wishes to receive notifications for all objects.  Note that
+        * caller wishes to receive notifications for all objects. Note that
         * only one <external> global handler can be regsitered (per notify type).
         */
        if (device == ACPI_ROOT_OBJECT) {
similarity index 81%
rename from drivers/acpi/events/evxfevnt.c
rename to drivers/acpi/acpica/evxfevnt.c
index 41554f736b682700b3830a955cfd12e45e13b5a5..35485e4b60a67df4d5a09e8cd8aa1e2cbe3b1000 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acevents.h>
-#include <acpi/acnamesp.h>
-#include <acpi/actables.h>
+#include "accommon.h"
+#include "acevents.h"
+#include "acnamesp.h"
+#include "actables.h"
 
 #define _COMPONENT          ACPI_EVENTS
 ACPI_MODULE_NAME("evxfevnt")
 
+/* Local prototypes */
+acpi_status
+acpi_ev_get_gpe_device(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
+                      struct acpi_gpe_block_info *gpe_block, void *context);
+
 /*******************************************************************************
  *
  * FUNCTION:    acpi_enable
@@ -60,6 +66,7 @@ ACPI_MODULE_NAME("evxfevnt")
  * DESCRIPTION: Transfers the system into ACPI mode.
  *
  ******************************************************************************/
+
 acpi_status acpi_enable(void)
 {
        acpi_status status = AE_OK;
@@ -161,8 +168,8 @@ acpi_status acpi_enable_event(u32 event, u32 flags)
        }
 
        /*
-        * Enable the requested fixed event (by writing a one to the
-        * enable register bit)
+        * Enable the requested fixed event (by writing a one to the enable
+        * register bit)
         */
        status =
            acpi_set_register(acpi_gbl_fixed_event_info[event].
@@ -343,8 +350,8 @@ acpi_status acpi_disable_event(u32 event, u32 flags)
        }
 
        /*
-        * Disable the requested fixed event (by writing a zero to the
-        * enable register bit)
+        * Disable the requested fixed event (by writing a zero to the enable
+        * register bit)
         */
        status =
            acpi_set_register(acpi_gbl_fixed_event_info[event].
@@ -396,8 +403,8 @@ acpi_status acpi_clear_event(u32 event)
        }
 
        /*
-        * Clear the requested fixed event (By writing a one to the
-        * status register bit)
+        * Clear the requested fixed event (By writing a one to the status
+        * register bit)
         */
        status =
            acpi_set_register(acpi_gbl_fixed_event_info[event].
@@ -717,3 +724,148 @@ acpi_status acpi_remove_gpe_block(acpi_handle gpe_device)
 }
 
 ACPI_EXPORT_SYMBOL(acpi_remove_gpe_block)
+
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_get_gpe_device
+ *
+ * PARAMETERS:  Index               - System GPE index (0-current_gpe_count)
+ *              gpe_device          - Where the parent GPE Device is returned
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Obtain the GPE device associated with the input index. A NULL
+ *              gpe device indicates that the gpe number is contained in one of
+ *              the FADT-defined gpe blocks. Otherwise, the GPE block device.
+ *
+ ******************************************************************************/
+acpi_status
+acpi_get_gpe_device(u32 index, acpi_handle *gpe_device)
+{
+       struct acpi_gpe_device_info info;
+       acpi_status status;
+
+       ACPI_FUNCTION_TRACE(acpi_get_gpe_device);
+
+       if (!gpe_device) {
+               return_ACPI_STATUS(AE_BAD_PARAMETER);
+       }
+
+       if (index >= acpi_current_gpe_count) {
+               return_ACPI_STATUS(AE_NOT_EXIST);
+       }
+
+       /* Setup and walk the GPE list */
+
+       info.index = index;
+       info.status = AE_NOT_EXIST;
+       info.gpe_device = NULL;
+       info.next_block_base_index = 0;
+
+       status = acpi_ev_walk_gpe_list(acpi_ev_get_gpe_device, &info);
+       if (ACPI_FAILURE(status)) {
+               return_ACPI_STATUS(status);
+       }
+
+       *gpe_device = info.gpe_device;
+       return_ACPI_STATUS(info.status);
+}
+
+ACPI_EXPORT_SYMBOL(acpi_get_gpe_device)
+
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_ev_get_gpe_device
+ *
+ * PARAMETERS:  GPE_WALK_CALLBACK
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Matches the input GPE index (0-current_gpe_count) with a GPE
+ *              block device. NULL if the GPE is one of the FADT-defined GPEs.
+ *
+ ******************************************************************************/
+acpi_status
+acpi_ev_get_gpe_device(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
+                      struct acpi_gpe_block_info *gpe_block, void *context)
+{
+       struct acpi_gpe_device_info *info = context;
+
+       /* Increment Index by the number of GPEs in this block */
+
+       info->next_block_base_index +=
+           (gpe_block->register_count * ACPI_GPE_REGISTER_WIDTH);
+
+       if (info->index < info->next_block_base_index) {
+               /*
+                * The GPE index is within this block, get the node. Leave the node
+                * NULL for the FADT-defined GPEs
+                */
+               if ((gpe_block->node)->type == ACPI_TYPE_DEVICE) {
+                       info->gpe_device = gpe_block->node;
+               }
+
+               info->status = AE_OK;
+               return (AE_CTRL_END);
+       }
+
+       return (AE_OK);
+}
+
+/******************************************************************************
+ *
+ * FUNCTION:    acpi_disable_all_gpes
+ *
+ * PARAMETERS:  None
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Disable and clear all GPEs in all GPE blocks
+ *
+ ******************************************************************************/
+
+acpi_status acpi_disable_all_gpes(void)
+{
+       acpi_status status;
+
+       ACPI_FUNCTION_TRACE(acpi_disable_all_gpes);
+
+       status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS);
+       if (ACPI_FAILURE(status)) {
+               return_ACPI_STATUS(status);
+       }
+
+       status = acpi_hw_disable_all_gpes();
+       (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS);
+
+       return_ACPI_STATUS(status);
+}
+
+/******************************************************************************
+ *
+ * FUNCTION:    acpi_enable_all_runtime_gpes
+ *
+ * PARAMETERS:  None
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Enable all "runtime" GPEs, in all GPE blocks
+ *
+ ******************************************************************************/
+
+acpi_status acpi_enable_all_runtime_gpes(void)
+{
+       acpi_status status;
+
+       ACPI_FUNCTION_TRACE(acpi_enable_all_runtime_gpes);
+
+       status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS);
+       if (ACPI_FAILURE(status)) {
+               return_ACPI_STATUS(status);
+       }
+
+       status = acpi_hw_enable_all_runtime_gpes();
+       (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS);
+
+       return_ACPI_STATUS(status);
+}
similarity index 99%
rename from drivers/acpi/events/evxfregn.c
rename to drivers/acpi/acpica/evxfregn.c
index e8750807e57d004151fab56cc56198f73acb29b6..479e7a3721be2b59045d97347bf21eea58f03687 100644 (file)
@@ -43,8 +43,9 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acnamesp.h>
-#include <acpi/acevents.h>
+#include "accommon.h"
+#include "acnamesp.h"
+#include "acevents.h"
 
 #define _COMPONENT          ACPI_EVENTS
 ACPI_MODULE_NAME("evxfregn")
similarity index 99%
rename from drivers/acpi/executer/exconfig.c
rename to drivers/acpi/acpica/exconfig.c
index 74da6fa52ef183e4db2b3e9db7b24c7d75da5f12..932bbc26aa048322c843b9be95b355ee1ecb9cbd 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acinterp.h>
-#include <acpi/acnamesp.h>
-#include <acpi/actables.h>
-#include <acpi/acdispat.h>
+#include "accommon.h"
+#include "acinterp.h"
+#include "acnamesp.h"
+#include "actables.h"
+#include "acdispat.h"
 
 #define _COMPONENT          ACPI_EXECUTER
 ACPI_MODULE_NAME("exconfig")
similarity index 99%
rename from drivers/acpi/executer/exconvrt.c
rename to drivers/acpi/acpica/exconvrt.c
index 1d1f35adddde65cfd0558ff4a2be97f087759c95..0be10188316e0091fa83d11715eaba690ce19313 100644 (file)
@@ -42,8 +42,9 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acinterp.h>
-#include <acpi/amlcode.h>
+#include "accommon.h"
+#include "acinterp.h"
+#include "amlcode.h"
 
 #define _COMPONENT          ACPI_EXECUTER
 ACPI_MODULE_NAME("exconvrt")
similarity index 99%
rename from drivers/acpi/executer/excreate.c
rename to drivers/acpi/acpica/excreate.c
index ad09696d50690c7116a3eb741dd3d92cb9a49f4d..a57ad2564ab0c7c66a1594601efcf161971dd4be 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acinterp.h>
-#include <acpi/amlcode.h>
-#include <acpi/acnamesp.h>
+#include "accommon.h"
+#include "acinterp.h"
+#include "amlcode.h"
+#include "acnamesp.h"
 
 #define _COMPONENT          ACPI_EXECUTER
 ACPI_MODULE_NAME("excreate")
similarity index 99%
rename from drivers/acpi/executer/exdump.c
rename to drivers/acpi/acpica/exdump.c
index d087a7d28aa53f34173cb7d64d688db119017086..aa313574b0df5066eb7e367080b073e82799b698 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acinterp.h>
-#include <acpi/amlcode.h>
-#include <acpi/acnamesp.h>
+#include "accommon.h"
+#include "acinterp.h"
+#include "amlcode.h"
+#include "acnamesp.h"
 
 #define _COMPONENT          ACPI_EXECUTER
 ACPI_MODULE_NAME("exdump")
similarity index 99%
rename from drivers/acpi/executer/exfield.c
rename to drivers/acpi/acpica/exfield.c
index 3e440d84226a4e85aea18a5b49156145e1bfbfd7..a352d0233857dbf461c85f96038d9a247107005e 100644 (file)
@@ -42,8 +42,9 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acdispat.h>
-#include <acpi/acinterp.h>
+#include "accommon.h"
+#include "acdispat.h"
+#include "acinterp.h"
 
 #define _COMPONENT          ACPI_EXECUTER
 ACPI_MODULE_NAME("exfield")
similarity index 98%
rename from drivers/acpi/executer/exfldio.c
rename to drivers/acpi/acpica/exfldio.c
index 9ff9d1f4615d8841eac8650bf4605e7e3cfb24fa..ef58ac4e687b8bd8f0e170647e0d2afe12abc525 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acinterp.h>
-#include <acpi/amlcode.h>
-#include <acpi/acevents.h>
-#include <acpi/acdispat.h>
+#include "accommon.h"
+#include "acinterp.h"
+#include "amlcode.h"
+#include "acevents.h"
+#include "acdispat.h"
 
 #define _COMPONENT          ACPI_EXECUTER
 ACPI_MODULE_NAME("exfldio")
@@ -498,14 +499,13 @@ acpi_ex_field_datum_io(union acpi_operand_object *obj_desc,
                        return_ACPI_STATUS(status);
                }
 
-               ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
-                                 "I/O to Data Register: ValuePtr %p\n",
-                                 value));
-
                if (read_write == ACPI_READ) {
 
                        /* Read the datum from the data_register */
 
+                       ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
+                                         "Read from Data Register\n"));
+
                        status =
                            acpi_ex_extract_from_field(obj_desc->index_field.
                                                       data_obj, value,
@@ -513,6 +513,10 @@ acpi_ex_field_datum_io(union acpi_operand_object *obj_desc,
                } else {
                        /* Write the datum to the data_register */
 
+                       ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
+                                         "Write to Data Register: Value %8.8X%8.8X\n",
+                                         ACPI_FORMAT_UINT64(*value)));
+
                        status =
                            acpi_ex_insert_into_field(obj_desc->index_field.
                                                      data_obj, value,
similarity index 99%
rename from drivers/acpi/executer/exmisc.c
rename to drivers/acpi/acpica/exmisc.c
index efb19134005951cb8adce2b7b473c8734b44b610..6b0747ac683b37edf6967c2aaec1790027173e19 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acinterp.h>
-#include <acpi/amlcode.h>
-#include <acpi/amlresrc.h>
+#include "accommon.h"
+#include "acinterp.h"
+#include "amlcode.h"
+#include "amlresrc.h"
 
 #define _COMPONENT          ACPI_EXECUTER
 ACPI_MODULE_NAME("exmisc")
similarity index 99%
rename from drivers/acpi/executer/exmutex.c
rename to drivers/acpi/acpica/exmutex.c
index a8bf3d713e2821db5c6e32588f4cc52f38e326bc..d301c1f363ef0fceb3749ee679d8f1366ec7fb32 100644 (file)
@@ -43,8 +43,9 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acinterp.h>
-#include <acpi/acevents.h>
+#include "accommon.h"
+#include "acinterp.h"
+#include "acevents.h"
 
 #define _COMPONENT          ACPI_EXECUTER
 ACPI_MODULE_NAME("exmutex")
similarity index 99%
rename from drivers/acpi/executer/exnames.c
rename to drivers/acpi/acpica/exnames.c
index 817e67be36977c12aa7db442217ecf25c87676f3..ffdae122d94af6e365aca484d95678b77d81e759 100644 (file)
@@ -43,8 +43,9 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acinterp.h>
-#include <acpi/amlcode.h>
+#include "accommon.h"
+#include "acinterp.h"
+#include "amlcode.h"
 
 #define _COMPONENT          ACPI_EXECUTER
 ACPI_MODULE_NAME("exnames")
similarity index 99%
rename from drivers/acpi/executer/exoparg1.c
rename to drivers/acpi/acpica/exoparg1.c
index f622f9eac8a1a85bfe0bfb4afbed5854b5435609..b530480cc7d55a7792c644d5d5c7a885a9e28dcd 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acparser.h>
-#include <acpi/acdispat.h>
-#include <acpi/acinterp.h>
-#include <acpi/amlcode.h>
-#include <acpi/acnamesp.h>
+#include "accommon.h"
+#include "acparser.h"
+#include "acdispat.h"
+#include "acinterp.h"
+#include "amlcode.h"
+#include "acnamesp.h"
 
 #define _COMPONENT          ACPI_EXECUTER
 ACPI_MODULE_NAME("exoparg1")
similarity index 99%
rename from drivers/acpi/executer/exoparg2.c
rename to drivers/acpi/acpica/exoparg2.c
index 368def5dffceb0ffc47be5866d640b83e18f6c53..0b4f513ca885342fc9fc1cffb511d8e1f5e2a6c7 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acparser.h>
-#include <acpi/acinterp.h>
-#include <acpi/acevents.h>
-#include <acpi/amlcode.h>
+#include "accommon.h"
+#include "acparser.h"
+#include "acinterp.h"
+#include "acevents.h"
+#include "amlcode.h"
 
 #define _COMPONENT          ACPI_EXECUTER
 ACPI_MODULE_NAME("exoparg2")
similarity index 98%
rename from drivers/acpi/executer/exoparg3.c
rename to drivers/acpi/acpica/exoparg3.c
index 9cb4197681af11a6d7e2d59904781cb3e0cee05e..c6520bbf882bae57da1257669a587fb9d4ef4b17 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acinterp.h>
-#include <acpi/acparser.h>
-#include <acpi/amlcode.h>
+#include "accommon.h"
+#include "acinterp.h"
+#include "acparser.h"
+#include "amlcode.h"
 
 #define _COMPONENT          ACPI_EXECUTER
 ACPI_MODULE_NAME("exoparg3")
similarity index 99%
rename from drivers/acpi/executer/exoparg6.c
rename to drivers/acpi/acpica/exoparg6.c
index 67d48737af5360011b7facec5aa909d62f2d9425..ae43f7670a6c34fa576a1873c653dbda9151020c 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acinterp.h>
-#include <acpi/acparser.h>
-#include <acpi/amlcode.h>
+#include "accommon.h"
+#include "acinterp.h"
+#include "acparser.h"
+#include "amlcode.h"
 
 #define _COMPONENT          ACPI_EXECUTER
 ACPI_MODULE_NAME("exoparg6")
similarity index 99%
rename from drivers/acpi/executer/exprep.c
rename to drivers/acpi/acpica/exprep.c
index 5d438c32989d892be3d41b08e738c167ff1ad3c2..33c66eb3ae39134b1d75181f1da80f9ff7300d36 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acinterp.h>
-#include <acpi/amlcode.h>
-#include <acpi/acnamesp.h>
+#include "accommon.h"
+#include "acinterp.h"
+#include "amlcode.h"
+#include "acnamesp.h"
 
 #define _COMPONENT          ACPI_EXECUTER
 ACPI_MODULE_NAME("exprep")
similarity index 99%
rename from drivers/acpi/executer/exregion.c
rename to drivers/acpi/acpica/exregion.c
index 7a41c409ae4d89e14165c8f28bdc131d88d1b5e1..76ec8ff903b8e1f766bf550953303652dfdd85cb 100644 (file)
@@ -43,7 +43,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acinterp.h>
+#include "accommon.h"
+#include "acinterp.h"
 
 #define _COMPONENT          ACPI_EXECUTER
 ACPI_MODULE_NAME("exregion")
similarity index 98%
rename from drivers/acpi/executer/exresnte.c
rename to drivers/acpi/acpica/exresnte.c
index 423ad3635f3d0aa702e8d5f3652ecf0b572af954..a063a74006f69572d37b7cf4596dea301336b63d 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acdispat.h>
-#include <acpi/acinterp.h>
-#include <acpi/acnamesp.h>
+#include "accommon.h"
+#include "acdispat.h"
+#include "acinterp.h"
+#include "acnamesp.h"
 
 #define _COMPONENT          ACPI_EXECUTER
 ACPI_MODULE_NAME("exresnte")
similarity index 99%
rename from drivers/acpi/executer/exresolv.c
rename to drivers/acpi/acpica/exresolv.c
index 89571b92a52279258812e7cc6f93ad5024acc28b..3673d2b2c4ac07a592479b0585131a5408e8a164 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/amlcode.h>
-#include <acpi/acdispat.h>
-#include <acpi/acinterp.h>
-#include <acpi/acnamesp.h>
+#include "accommon.h"
+#include "amlcode.h"
+#include "acdispat.h"
+#include "acinterp.h"
+#include "acnamesp.h"
 
 #define _COMPONENT          ACPI_EXECUTER
 ACPI_MODULE_NAME("exresolv")
similarity index 99%
rename from drivers/acpi/executer/exresop.c
rename to drivers/acpi/acpica/exresop.c
index 0bb82593da724d62ca766a2a843827a9cf33376c..3c3802764bfbe828dee9a9d1db7c71d37766c634 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/amlcode.h>
-#include <acpi/acparser.h>
-#include <acpi/acinterp.h>
-#include <acpi/acnamesp.h>
+#include "accommon.h"
+#include "amlcode.h"
+#include "acparser.h"
+#include "acinterp.h"
+#include "acnamesp.h"
 
 #define _COMPONENT          ACPI_EXECUTER
 ACPI_MODULE_NAME("exresop")
similarity index 99%
rename from drivers/acpi/executer/exstore.c
rename to drivers/acpi/acpica/exstore.c
index 3318df4cbd989191fc46de95e3cbd209ccf0f525..7c6d7e53e41e7a26ce81f49114da8263db77d003 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acdispat.h>
-#include <acpi/acinterp.h>
-#include <acpi/amlcode.h>
-#include <acpi/acnamesp.h>
+#include "accommon.h"
+#include "acdispat.h"
+#include "acinterp.h"
+#include "amlcode.h"
+#include "acnamesp.h"
 
 #define _COMPONENT          ACPI_EXECUTER
 ACPI_MODULE_NAME("exstore")
similarity index 99%
rename from drivers/acpi/executer/exstoren.c
rename to drivers/acpi/acpica/exstoren.c
index eef61a00803edf560bf2917e1cf66d7c8587e9cc..145d15305f70a6d860d668e87cedc7b7e70ba713 100644 (file)
@@ -44,8 +44,9 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acinterp.h>
-#include <acpi/amlcode.h>
+#include "accommon.h"
+#include "acinterp.h"
+#include "amlcode.h"
 
 #define _COMPONENT          ACPI_EXECUTER
 ACPI_MODULE_NAME("exstoren")
similarity index 99%
rename from drivers/acpi/executer/exstorob.c
rename to drivers/acpi/acpica/exstorob.c
index 9a75ff09fb0c46b38bf849261d6b860949251cf7..67340cc70142209d1aa97ae360b21587cefc321b 100644 (file)
@@ -43,7 +43,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acinterp.h>
+#include "accommon.h"
+#include "acinterp.h"
 
 #define _COMPONENT          ACPI_EXECUTER
 ACPI_MODULE_NAME("exstorob")
similarity index 99%
rename from drivers/acpi/executer/exsystem.c
rename to drivers/acpi/acpica/exsystem.c
index 68990f1df371df76886f196ecbc5d42a7a867da3..3d00b9357233a56ee0d4ff00f96cbd54c7b2560a 100644 (file)
@@ -43,7 +43,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acinterp.h>
+#include "accommon.h"
+#include "acinterp.h"
 
 #define _COMPONENT          ACPI_EXECUTER
 ACPI_MODULE_NAME("exsystem")
similarity index 99%
rename from drivers/acpi/executer/exutils.c
rename to drivers/acpi/acpica/exutils.c
index 86c03880b5233a32a524d7efc5a583c4fb73ea7e..32b85d68e756ffd117e801031acb308086d1f6c3 100644 (file)
@@ -59,8 +59,9 @@
 #define DEFINE_AML_GLOBALS
 
 #include <acpi/acpi.h>
-#include <acpi/acinterp.h>
-#include <acpi/amlcode.h>
+#include "accommon.h"
+#include "acinterp.h"
+#include "amlcode.h"
 
 #define _COMPONENT          ACPI_EXECUTER
 ACPI_MODULE_NAME("exutils")
similarity index 99%
rename from drivers/acpi/hardware/hwacpi.c
rename to drivers/acpi/acpica/hwacpi.c
index 816894ea839eba7fe21a85bd68f97f9329a715dc..a9d4fea4167f37833e2ef2a855d4748fdd644217 100644 (file)
@@ -43,6 +43,7 @@
  */
 
 #include <acpi/acpi.h>
+#include "accommon.h"
 
 #define _COMPONENT          ACPI_HARDWARE
 ACPI_MODULE_NAME("hwacpi")
similarity index 86%
rename from drivers/acpi/hardware/hwgpe.c
rename to drivers/acpi/acpica/hwgpe.c
index 0b80db9d91979e17ce418f840a56d3096afb5f2d..2013b66745d2c90cf1edb48317cb1235c605e89e 100644 (file)
@@ -43,7 +43,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acevents.h>
+#include "accommon.h"
+#include "acevents.h"
 
 #define _COMPONENT          ACPI_HARDWARE
 ACPI_MODULE_NAME("hwgpe")
@@ -51,7 +52,8 @@ ACPI_MODULE_NAME("hwgpe")
 /* Local prototypes */
 static acpi_status
 acpi_hw_enable_wakeup_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
-                               struct acpi_gpe_block_info *gpe_block);
+                               struct acpi_gpe_block_info *gpe_block,
+                               void *context);
 
 /******************************************************************************
  *
@@ -80,8 +82,7 @@ acpi_status acpi_hw_low_disable_gpe(struct acpi_gpe_event_info *gpe_event_info)
 
        /* Get current value of the enable register that contains this GPE */
 
-       status = acpi_hw_low_level_read(ACPI_GPE_REGISTER_WIDTH, &enable_mask,
-                                       &gpe_register_info->enable_address);
+       status = acpi_read(&enable_mask, &gpe_register_info->enable_address);
        if (ACPI_FAILURE(status)) {
                return (status);
        }
@@ -95,9 +96,7 @@ acpi_status acpi_hw_low_disable_gpe(struct acpi_gpe_event_info *gpe_event_info)
 
        /* Write the updated enable mask */
 
-       status = acpi_hw_low_level_write(ACPI_GPE_REGISTER_WIDTH, enable_mask,
-                                        &gpe_register_info->enable_address);
-
+       status = acpi_write(enable_mask, &gpe_register_info->enable_address);
        return (status);
 }
 
@@ -132,8 +131,8 @@ acpi_hw_write_gpe_enable_reg(struct acpi_gpe_event_info * gpe_event_info)
 
        /* Write the entire GPE (runtime) enable register */
 
-       status = acpi_hw_low_level_write(8, gpe_register_info->enable_for_run,
-                                        &gpe_register_info->enable_address);
+       status = acpi_write(gpe_register_info->enable_for_run,
+                           &gpe_register_info->enable_address);
 
        return (status);
 }
@@ -166,9 +165,8 @@ acpi_status acpi_hw_clear_gpe(struct acpi_gpe_event_info * gpe_event_info)
         * Write a one to the appropriate bit in the status register to
         * clear this GPE.
         */
-       status = acpi_hw_low_level_write(8, register_bit,
-                                        &gpe_event_info->register_info->
-                                        status_address);
+       status = acpi_write(register_bit,
+                           &gpe_event_info->register_info->status_address);
 
        return (status);
 }
@@ -227,9 +225,7 @@ acpi_hw_get_gpe_status(struct acpi_gpe_event_info * gpe_event_info,
 
        /* GPE currently active (status bit == 1)? */
 
-       status =
-           acpi_hw_low_level_read(8, &in_byte,
-                                  &gpe_register_info->status_address);
+       status = acpi_read(&in_byte, &gpe_register_info->status_address);
        if (ACPI_FAILURE(status)) {
                goto unlock_and_exit;
        }
@@ -260,8 +256,8 @@ acpi_hw_get_gpe_status(struct acpi_gpe_event_info * gpe_event_info,
  ******************************************************************************/
 
 acpi_status
-acpi_hw_disable_gpe_block(struct acpi_gpe_xrupt_info * gpe_xrupt_info,
-                         struct acpi_gpe_block_info * gpe_block)
+acpi_hw_disable_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
+                         struct acpi_gpe_block_info *gpe_block, void *context)
 {
        u32 i;
        acpi_status status;
@@ -272,9 +268,9 @@ acpi_hw_disable_gpe_block(struct acpi_gpe_xrupt_info * gpe_xrupt_info,
 
                /* Disable all GPEs in this register */
 
-               status = acpi_hw_low_level_write(8, 0x00,
-                                                &gpe_block->register_info[i].
-                                                enable_address);
+               status =
+                   acpi_write(0x00,
+                              &gpe_block->register_info[i].enable_address);
                if (ACPI_FAILURE(status)) {
                        return (status);
                }
@@ -297,8 +293,8 @@ acpi_hw_disable_gpe_block(struct acpi_gpe_xrupt_info * gpe_xrupt_info,
  ******************************************************************************/
 
 acpi_status
-acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info * gpe_xrupt_info,
-                       struct acpi_gpe_block_info * gpe_block)
+acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
+                       struct acpi_gpe_block_info *gpe_block, void *context)
 {
        u32 i;
        acpi_status status;
@@ -309,9 +305,9 @@ acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info * gpe_xrupt_info,
 
                /* Clear status on all GPEs in this register */
 
-               status = acpi_hw_low_level_write(8, 0xFF,
-                                                &gpe_block->register_info[i].
-                                                status_address);
+               status =
+                   acpi_write(0xFF,
+                              &gpe_block->register_info[i].status_address);
                if (ACPI_FAILURE(status)) {
                        return (status);
                }
@@ -335,8 +331,8 @@ acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info * gpe_xrupt_info,
  ******************************************************************************/
 
 acpi_status
-acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info * gpe_xrupt_info,
-                                struct acpi_gpe_block_info * gpe_block)
+acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
+                                struct acpi_gpe_block_info *gpe_block, void *context)
 {
        u32 i;
        acpi_status status;
@@ -352,12 +348,9 @@ acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info * gpe_xrupt_info,
 
                /* Enable all "runtime" GPEs in this register */
 
-               status =
-                   acpi_hw_low_level_write(8,
-                                           gpe_block->register_info[i].
-                                           enable_for_run,
-                                           &gpe_block->register_info[i].
-                                           enable_address);
+               status = acpi_write(gpe_block->register_info[i].enable_for_run,
+                                   &gpe_block->register_info[i].
+                                   enable_address);
                if (ACPI_FAILURE(status)) {
                        return (status);
                }
@@ -382,7 +375,8 @@ acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info * gpe_xrupt_info,
 
 static acpi_status
 acpi_hw_enable_wakeup_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
-                               struct acpi_gpe_block_info *gpe_block)
+                               struct acpi_gpe_block_info *gpe_block,
+                               void *context)
 {
        u32 i;
        acpi_status status;
@@ -396,11 +390,9 @@ acpi_hw_enable_wakeup_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
 
                /* Enable all "wake" GPEs in this register */
 
-               status = acpi_hw_low_level_write(8,
-                                                gpe_block->register_info[i].
-                                                enable_for_wake,
-                                                &gpe_block->register_info[i].
-                                                enable_address);
+               status = acpi_write(gpe_block->register_info[i].enable_for_wake,
+                                   &gpe_block->register_info[i].
+                                   enable_address);
                if (ACPI_FAILURE(status)) {
                        return (status);
                }
@@ -427,8 +419,8 @@ acpi_status acpi_hw_disable_all_gpes(void)
 
        ACPI_FUNCTION_TRACE(hw_disable_all_gpes);
 
-       status = acpi_ev_walk_gpe_list(acpi_hw_disable_gpe_block);
-       status = acpi_ev_walk_gpe_list(acpi_hw_clear_gpe_block);
+       status = acpi_ev_walk_gpe_list(acpi_hw_disable_gpe_block, NULL);
+       status = acpi_ev_walk_gpe_list(acpi_hw_clear_gpe_block, NULL);
        return_ACPI_STATUS(status);
 }
 
@@ -450,7 +442,7 @@ acpi_status acpi_hw_enable_all_runtime_gpes(void)
 
        ACPI_FUNCTION_TRACE(hw_enable_all_runtime_gpes);
 
-       status = acpi_ev_walk_gpe_list(acpi_hw_enable_runtime_gpe_block);
+       status = acpi_ev_walk_gpe_list(acpi_hw_enable_runtime_gpe_block, NULL);
        return_ACPI_STATUS(status);
 }
 
@@ -472,6 +464,6 @@ acpi_status acpi_hw_enable_all_wakeup_gpes(void)
 
        ACPI_FUNCTION_TRACE(hw_enable_all_wakeup_gpes);
 
-       status = acpi_ev_walk_gpe_list(acpi_hw_enable_wakeup_gpe_block);
+       status = acpi_ev_walk_gpe_list(acpi_hw_enable_wakeup_gpe_block, NULL);
        return_ACPI_STATUS(status);
 }
diff --git a/drivers/acpi/acpica/hwregs.c b/drivers/acpi/acpica/hwregs.c
new file mode 100644 (file)
index 0000000..4dc43b0
--- /dev/null
@@ -0,0 +1,353 @@
+
+/*******************************************************************************
+ *
+ * Module Name: hwregs - Read/write access functions for the various ACPI
+ *                       control and status registers.
+ *
+ ******************************************************************************/
+
+/*
+ * Copyright (C) 2000 - 2008, Intel Corp.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer,
+ *    without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ *    substantially similar to the "NO WARRANTY" disclaimer below
+ *    ("Disclaimer") and any redistribution must be conditioned upon
+ *    including a substantially similar Disclaimer requirement for further
+ *    binary redistribution.
+ * 3. Neither the names of the above-listed copyright holders nor the names
+ *    of any contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGES.
+ */
+
+#include <acpi/acpi.h>
+#include "accommon.h"
+#include "acnamesp.h"
+#include "acevents.h"
+
+#define _COMPONENT          ACPI_HARDWARE
+ACPI_MODULE_NAME("hwregs")
+
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_hw_clear_acpi_status
+ *
+ * PARAMETERS:  None
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Clears all fixed and general purpose status bits
+ *              THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
+ *
+ ******************************************************************************/
+acpi_status acpi_hw_clear_acpi_status(void)
+{
+       acpi_status status;
+       acpi_cpu_flags lock_flags = 0;
+
+       ACPI_FUNCTION_TRACE(hw_clear_acpi_status);
+
+       ACPI_DEBUG_PRINT((ACPI_DB_IO, "About to write %04X to %04X\n",
+                         ACPI_BITMASK_ALL_FIXED_STATUS,
+                         (u16) acpi_gbl_FADT.xpm1a_event_block.address));
+
+       lock_flags = acpi_os_acquire_lock(acpi_gbl_hardware_lock);
+
+       status = acpi_hw_register_write(ACPI_REGISTER_PM1_STATUS,
+                                       ACPI_BITMASK_ALL_FIXED_STATUS);
+       if (ACPI_FAILURE(status)) {
+               goto unlock_and_exit;
+       }
+
+       /* Clear the fixed events */
+
+       if (acpi_gbl_FADT.xpm1b_event_block.address) {
+               status = acpi_write(ACPI_BITMASK_ALL_FIXED_STATUS,
+                                   &acpi_gbl_FADT.xpm1b_event_block);
+               if (ACPI_FAILURE(status)) {
+                       goto unlock_and_exit;
+               }
+       }
+
+       /* Clear the GPE Bits in all GPE registers in all GPE blocks */
+
+       status = acpi_ev_walk_gpe_list(acpi_hw_clear_gpe_block, NULL);
+
+      unlock_and_exit:
+       acpi_os_release_lock(acpi_gbl_hardware_lock, lock_flags);
+       return_ACPI_STATUS(status);
+}
+
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_hw_get_register_bit_mask
+ *
+ * PARAMETERS:  register_id         - Index of ACPI Register to access
+ *
+ * RETURN:      The bitmask to be used when accessing the register
+ *
+ * DESCRIPTION: Map register_id into a register bitmask.
+ *
+ ******************************************************************************/
+
+struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id)
+{
+       ACPI_FUNCTION_ENTRY();
+
+       if (register_id > ACPI_BITREG_MAX) {
+               ACPI_ERROR((AE_INFO, "Invalid BitRegister ID: %X",
+                           register_id));
+               return (NULL);
+       }
+
+       return (&acpi_gbl_bit_register_info[register_id]);
+}
+
+/******************************************************************************
+ *
+ * FUNCTION:    acpi_hw_register_read
+ *
+ * PARAMETERS:  register_id         - ACPI Register ID
+ *              return_value        - Where the register value is returned
+ *
+ * RETURN:      Status and the value read.
+ *
+ * DESCRIPTION: Read from the specified ACPI register
+ *
+ ******************************************************************************/
+acpi_status
+acpi_hw_register_read(u32 register_id, u32 * return_value)
+{
+       u32 value1 = 0;
+       u32 value2 = 0;
+       acpi_status status;
+
+       ACPI_FUNCTION_TRACE(hw_register_read);
+
+       switch (register_id) {
+       case ACPI_REGISTER_PM1_STATUS:  /* 16-bit access */
+
+               status = acpi_read(&value1, &acpi_gbl_FADT.xpm1a_event_block);
+               if (ACPI_FAILURE(status)) {
+                       goto exit;
+               }
+
+               /* PM1B is optional */
+
+               status = acpi_read(&value2, &acpi_gbl_FADT.xpm1b_event_block);
+               value1 |= value2;
+               break;
+
+       case ACPI_REGISTER_PM1_ENABLE:  /* 16-bit access */
+
+               status = acpi_read(&value1, &acpi_gbl_xpm1a_enable);
+               if (ACPI_FAILURE(status)) {
+                       goto exit;
+               }
+
+               /* PM1B is optional */
+
+               status = acpi_read(&value2, &acpi_gbl_xpm1b_enable);
+               value1 |= value2;
+               break;
+
+       case ACPI_REGISTER_PM1_CONTROL: /* 16-bit access */
+
+               status = acpi_read(&value1, &acpi_gbl_FADT.xpm1a_control_block);
+               if (ACPI_FAILURE(status)) {
+                       goto exit;
+               }
+
+               status = acpi_read(&value2, &acpi_gbl_FADT.xpm1b_control_block);
+               value1 |= value2;
+               break;
+
+       case ACPI_REGISTER_PM2_CONTROL: /* 8-bit access */
+
+               status = acpi_read(&value1, &acpi_gbl_FADT.xpm2_control_block);
+               break;
+
+       case ACPI_REGISTER_PM_TIMER:    /* 32-bit access */
+
+               status = acpi_read(&value1, &acpi_gbl_FADT.xpm_timer_block);
+               break;
+
+       case ACPI_REGISTER_SMI_COMMAND_BLOCK:   /* 8-bit access */
+
+               status =
+                   acpi_os_read_port(acpi_gbl_FADT.smi_command, &value1, 8);
+               break;
+
+       default:
+               ACPI_ERROR((AE_INFO, "Unknown Register ID: %X", register_id));
+               status = AE_BAD_PARAMETER;
+               break;
+       }
+
+      exit:
+
+       if (ACPI_SUCCESS(status)) {
+               *return_value = value1;
+       }
+
+       return_ACPI_STATUS(status);
+}
+
+/******************************************************************************
+ *
+ * FUNCTION:    acpi_hw_register_write
+ *
+ * PARAMETERS:  register_id         - ACPI Register ID
+ *              Value               - The value to write
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Write to the specified ACPI register
+ *
+ * NOTE: In accordance with the ACPI specification, this function automatically
+ * preserves the value of the following bits, meaning that these bits cannot be
+ * changed via this interface:
+ *
+ * PM1_CONTROL[0] = SCI_EN
+ * PM1_CONTROL[9]
+ * PM1_STATUS[11]
+ *
+ * ACPI References:
+ * 1) Hardware Ignored Bits: When software writes to a register with ignored
+ *      bit fields, it preserves the ignored bit fields
+ * 2) SCI_EN: OSPM always preserves this bit position
+ *
+ ******************************************************************************/
+
+acpi_status acpi_hw_register_write(u32 register_id, u32 value)
+{
+       acpi_status status;
+       u32 read_value;
+
+       ACPI_FUNCTION_TRACE(hw_register_write);
+
+       switch (register_id) {
+       case ACPI_REGISTER_PM1_STATUS:  /* 16-bit access */
+
+               /* Perform a read first to preserve certain bits (per ACPI spec) */
+
+               status = acpi_hw_register_read(ACPI_REGISTER_PM1_STATUS,
+                                              &read_value);
+               if (ACPI_FAILURE(status)) {
+                       goto exit;
+               }
+
+               /* Insert the bits to be preserved */
+
+               ACPI_INSERT_BITS(value, ACPI_PM1_STATUS_PRESERVED_BITS,
+                                read_value);
+
+               /* Now we can write the data */
+
+               status = acpi_write(value, &acpi_gbl_FADT.xpm1a_event_block);
+               if (ACPI_FAILURE(status)) {
+                       goto exit;
+               }
+
+               /* PM1B is optional */
+
+               status = acpi_write(value, &acpi_gbl_FADT.xpm1b_event_block);
+               break;
+
+       case ACPI_REGISTER_PM1_ENABLE:  /* 16-bit access */
+
+               status = acpi_write(value, &acpi_gbl_xpm1a_enable);
+               if (ACPI_FAILURE(status)) {
+                       goto exit;
+               }
+
+               /* PM1B is optional */
+
+               status = acpi_write(value, &acpi_gbl_xpm1b_enable);
+               break;
+
+       case ACPI_REGISTER_PM1_CONTROL: /* 16-bit access */
+
+               /*
+                * Perform a read first to preserve certain bits (per ACPI spec)
+                */
+               status = acpi_hw_register_read(ACPI_REGISTER_PM1_CONTROL,
+                                              &read_value);
+               if (ACPI_FAILURE(status)) {
+                       goto exit;
+               }
+
+               /* Insert the bits to be preserved */
+
+               ACPI_INSERT_BITS(value, ACPI_PM1_CONTROL_PRESERVED_BITS,
+                                read_value);
+
+               /* Now we can write the data */
+
+               status = acpi_write(value, &acpi_gbl_FADT.xpm1a_control_block);
+               if (ACPI_FAILURE(status)) {
+                       goto exit;
+               }
+
+               status = acpi_write(value, &acpi_gbl_FADT.xpm1b_control_block);
+               break;
+
+       case ACPI_REGISTER_PM1A_CONTROL:        /* 16-bit access */
+
+               status = acpi_write(value, &acpi_gbl_FADT.xpm1a_control_block);
+               break;
+
+       case ACPI_REGISTER_PM1B_CONTROL:        /* 16-bit access */
+
+               status = acpi_write(value, &acpi_gbl_FADT.xpm1b_control_block);
+               break;
+
+       case ACPI_REGISTER_PM2_CONTROL: /* 8-bit access */
+
+               status = acpi_write(value, &acpi_gbl_FADT.xpm2_control_block);
+               break;
+
+       case ACPI_REGISTER_PM_TIMER:    /* 32-bit access */
+
+               status = acpi_write(value, &acpi_gbl_FADT.xpm_timer_block);
+               break;
+
+       case ACPI_REGISTER_SMI_COMMAND_BLOCK:   /* 8-bit access */
+
+               /* SMI_CMD is currently always in IO space */
+
+               status =
+                   acpi_os_write_port(acpi_gbl_FADT.smi_command, value, 8);
+               break;
+
+       default:
+               status = AE_BAD_PARAMETER;
+               break;
+       }
+
+      exit:
+       return_ACPI_STATUS(status);
+}
similarity index 91%
rename from drivers/acpi/hardware/hwsleep.c
rename to drivers/acpi/acpica/hwsleep.c
index 25dccdf179b9e4814ca52669f268f4409b34ce6b..a2af2a4f2f268d9116098cf926bc81bd92a915db 100644 (file)
@@ -43,7 +43,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/actables.h>
+#include "accommon.h"
+#include "actables.h"
 
 #define _COMPONENT          ACPI_HARDWARE
 ACPI_MODULE_NAME("hwsleep")
@@ -52,31 +53,19 @@ ACPI_MODULE_NAME("hwsleep")
  *
  * FUNCTION:    acpi_set_firmware_waking_vector
  *
- * PARAMETERS:  physical_address    - Physical address of ACPI real mode
+ * PARAMETERS:  physical_address    - 32-bit physical address of ACPI real mode
  *                                    entry point.
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Access function for the firmware_waking_vector field in FACS
+ * DESCRIPTION: Sets the 32-bit firmware_waking_vector field of the FACS
  *
  ******************************************************************************/
 acpi_status
-acpi_set_firmware_waking_vector(acpi_physical_address physical_address)
+acpi_set_firmware_waking_vector(u32 physical_address)
 {
-       struct acpi_table_facs *facs;
-       acpi_status status;
-
        ACPI_FUNCTION_TRACE(acpi_set_firmware_waking_vector);
 
-       /* Get the FACS */
-
-       status = acpi_get_table_by_index(ACPI_TABLE_INDEX_FACS,
-                                        ACPI_CAST_INDIRECT_PTR(struct
-                                                               acpi_table_header,
-                                                               &facs));
-       if (ACPI_FAILURE(status)) {
-               return_ACPI_STATUS(status);
-       }
 
        /*
         * According to the ACPI specification 2.0c and later, the 64-bit
@@ -85,10 +74,16 @@ acpi_set_firmware_waking_vector(acpi_physical_address physical_address)
         * Protected Mode.  Some systems (for example HP dv5-1004nr) are known
         * to fail to resume if the 64-bit vector is used.
         */
-       if (facs->version >= 1)
-               facs->xfirmware_waking_vector = 0;
 
-       facs->firmware_waking_vector = (u32)physical_address;
+       /* Set the 32-bit vector */
+
+       acpi_gbl_FACS->firmware_waking_vector = physical_address;
+
+       /* Clear the 64-bit vector if it exists */
+
+       if ((acpi_gbl_FACS->length > 32) && (acpi_gbl_FACS->version >= 1)) {
+               acpi_gbl_FACS->xfirmware_waking_vector = 0;
+       }
 
        return_ACPI_STATUS(AE_OK);
 }
@@ -97,48 +92,39 @@ ACPI_EXPORT_SYMBOL(acpi_set_firmware_waking_vector)
 
 /*******************************************************************************
  *
- * FUNCTION:    acpi_get_firmware_waking_vector
+ * FUNCTION:    acpi_set_firmware_waking_vector64
  *
- * PARAMETERS:  *physical_address   - Where the contents of
- *                                    the firmware_waking_vector field of
- *                                    the FACS will be returned.
+ * PARAMETERS:  physical_address    - 64-bit physical address of ACPI protected
+ *                                    mode entry point.
  *
- * RETURN:      Status, vector
+ * RETURN:      Status
  *
- * DESCRIPTION: Access function for the firmware_waking_vector field in FACS
+ * DESCRIPTION: Sets the 64-bit X_firmware_waking_vector field of the FACS, if
+ *              it exists in the table.
  *
  ******************************************************************************/
-#ifdef ACPI_FUTURE_USAGE
 acpi_status
-acpi_get_firmware_waking_vector(acpi_physical_address * physical_address)
+acpi_set_firmware_waking_vector64(u64 physical_address)
 {
-       struct acpi_table_facs *facs;
-       acpi_status status;
+       ACPI_FUNCTION_TRACE(acpi_set_firmware_waking_vector64);
 
-       ACPI_FUNCTION_TRACE(acpi_get_firmware_waking_vector);
-
-       if (!physical_address) {
-               return_ACPI_STATUS(AE_BAD_PARAMETER);
-       }
 
-       /* Get the FACS */
+       /* Determine if the 64-bit vector actually exists */
 
-       status = acpi_get_table_by_index(ACPI_TABLE_INDEX_FACS,
-                                        ACPI_CAST_INDIRECT_PTR(struct
-                                                               acpi_table_header,
-                                                               &facs));
-       if (ACPI_FAILURE(status)) {
-               return_ACPI_STATUS(status);
+       if ((acpi_gbl_FACS->length <= 32) || (acpi_gbl_FACS->version < 1)) {
+               return_ACPI_STATUS(AE_NOT_EXIST);
        }
 
-       /* Get the vector */
-       *physical_address = (acpi_physical_address)facs->firmware_waking_vector;
+       /* Clear 32-bit vector, set the 64-bit X_ vector */
+
+       acpi_gbl_FACS->firmware_waking_vector = 0;
+       acpi_gbl_FACS->xfirmware_waking_vector = physical_address;
 
        return_ACPI_STATUS(AE_OK);
 }
 
-ACPI_EXPORT_SYMBOL(acpi_get_firmware_waking_vector)
-#endif
+ACPI_EXPORT_SYMBOL(acpi_set_firmware_waking_vector64)
+
 /*******************************************************************************
  *
  * FUNCTION:    acpi_enter_sleep_state_prep
similarity index 99%
rename from drivers/acpi/hardware/hwtimer.c
rename to drivers/acpi/acpica/hwtimer.c
index b53d575491b908719643dc7b6f02d7405909d5cb..b7f522c8f023d48686d40d7267196d6d296b6e44 100644 (file)
@@ -43,6 +43,7 @@
  */
 
 #include <acpi/acpi.h>
+#include "accommon.h"
 
 #define _COMPONENT          ACPI_HARDWARE
 ACPI_MODULE_NAME("hwtimer")
similarity index 62%
rename from drivers/acpi/hardware/hwregs.c
rename to drivers/acpi/acpica/hwxface.c
index ddf792adcf9619fe581c9067c06761d8b2780955..ae597c0ab53f38da0feb8cc5716fa6c3e41463c0 100644 (file)
@@ -1,10 +1,9 @@
 
-/*******************************************************************************
+/******************************************************************************
  *
- * Module Name: hwregs - Read/write access functions for the various ACPI
- *                       control and status registers.
+ * Module Name: hwxface - Public ACPICA hardware interfaces
  *
- ******************************************************************************/
+ *****************************************************************************/
 
 /*
  * Copyright (C) 2000 - 2008, Intel Corp.
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acnamesp.h>
-#include <acpi/acevents.h>
+#include "accommon.h"
+#include "acnamesp.h"
 
 #define _COMPONENT          ACPI_HARDWARE
-ACPI_MODULE_NAME("hwregs")
+ACPI_MODULE_NAME("hwxface")
 
-/*******************************************************************************
+/******************************************************************************
  *
- * FUNCTION:    acpi_hw_clear_acpi_status
+ * FUNCTION:    acpi_reset
  *
  * PARAMETERS:  None
  *
- * RETURN:      None
+ * RETURN:      Status
  *
- * DESCRIPTION: Clears all fixed and general purpose status bits
- *              THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
+ * DESCRIPTION: Set reset register in memory or IO space. Note: Does not
+ *              support reset register in PCI config space, this must be
+ *              handled separately.
  *
  ******************************************************************************/
-acpi_status acpi_hw_clear_acpi_status(void)
+acpi_status acpi_reset(void)
 {
+       struct acpi_generic_address *reset_reg;
        acpi_status status;
-       acpi_cpu_flags lock_flags = 0;
-
-       ACPI_FUNCTION_TRACE(hw_clear_acpi_status);
-
-       ACPI_DEBUG_PRINT((ACPI_DB_IO, "About to write %04X to %04X\n",
-                         ACPI_BITMASK_ALL_FIXED_STATUS,
-                         (u16) acpi_gbl_FADT.xpm1a_event_block.address));
 
-       lock_flags = acpi_os_acquire_lock(acpi_gbl_hardware_lock);
+       ACPI_FUNCTION_TRACE(acpi_reset);
 
-       status = acpi_hw_register_write(ACPI_REGISTER_PM1_STATUS,
-                                       ACPI_BITMASK_ALL_FIXED_STATUS);
-       if (ACPI_FAILURE(status)) {
-               goto unlock_and_exit;
-       }
+       reset_reg = &acpi_gbl_FADT.reset_register;
 
-       /* Clear the fixed events */
+       /* Check if the reset register is supported */
 
-       if (acpi_gbl_FADT.xpm1b_event_block.address) {
-               status =
-                   acpi_hw_low_level_write(16, ACPI_BITMASK_ALL_FIXED_STATUS,
-                                           &acpi_gbl_FADT.xpm1b_event_block);
-               if (ACPI_FAILURE(status)) {
-                       goto unlock_and_exit;
-               }
+       if (!(acpi_gbl_FADT.flags & ACPI_FADT_RESET_REGISTER) ||
+           !reset_reg->address) {
+               return_ACPI_STATUS(AE_NOT_EXIST);
        }
 
-       /* Clear the GPE Bits in all GPE registers in all GPE blocks */
+       /* Write the reset value to the reset register */
 
-       status = acpi_ev_walk_gpe_list(acpi_hw_clear_gpe_block);
-
-      unlock_and_exit:
-       acpi_os_release_lock(acpi_gbl_hardware_lock, lock_flags);
+       status = acpi_write(acpi_gbl_FADT.reset_value, reset_reg);
        return_ACPI_STATUS(status);
 }
 
-/*******************************************************************************
+ACPI_EXPORT_SYMBOL(acpi_reset)
+
+/******************************************************************************
  *
- * FUNCTION:    acpi_get_sleep_type_data
+ * FUNCTION:    acpi_read
  *
- * PARAMETERS:  sleep_state         - Numeric sleep state
- *              *sleep_type_a        - Where SLP_TYPa is returned
- *              *sleep_type_b        - Where SLP_TYPb is returned
+ * PARAMETERS:  Value               - Where the value is returned
+ *              Reg                 - GAS register structure
  *
- * RETURN:      Status - ACPI status
+ * RETURN:      Status
  *
- * DESCRIPTION: Obtain the SLP_TYPa and SLP_TYPb values for the requested sleep
- *              state.
+ * DESCRIPTION: Read from either memory or IO space.
  *
  ******************************************************************************/
-
-acpi_status
-acpi_get_sleep_type_data(u8 sleep_state, u8 * sleep_type_a, u8 * sleep_type_b)
+acpi_status acpi_read(u32 *value, struct acpi_generic_address *reg)
 {
-       acpi_status status = AE_OK;
-       struct acpi_evaluate_info *info;
-
-       ACPI_FUNCTION_TRACE(acpi_get_sleep_type_data);
-
-       /* Validate parameters */
-
-       if ((sleep_state > ACPI_S_STATES_MAX) || !sleep_type_a || !sleep_type_b) {
-               return_ACPI_STATUS(AE_BAD_PARAMETER);
-       }
+       u32 width;
+       u64 address;
+       acpi_status status;
 
-       /* Allocate the evaluation information block */
+       ACPI_FUNCTION_NAME(acpi_read);
 
-       info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info));
-       if (!info) {
-               return_ACPI_STATUS(AE_NO_MEMORY);
+       /*
+        * Must have a valid pointer to a GAS structure, and
+        * a non-zero address within. However, don't return an error
+        * because the PM1A/B code must not fail if B isn't present.
+        */
+       if (!reg) {
+               return (AE_OK);
        }
 
-       info->pathname =
-           ACPI_CAST_PTR(char, acpi_gbl_sleep_state_names[sleep_state]);
-
-       /* Evaluate the namespace object containing the values for this state */
-
-       status = acpi_ns_evaluate(info);
-       if (ACPI_FAILURE(status)) {
-               ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
-                                 "%s while evaluating SleepState [%s]\n",
-                                 acpi_format_exception(status),
-                                 info->pathname));
+       /* Get a local copy of the address. Handles possible alignment issues */
 
-               goto cleanup;
+       ACPI_MOVE_64_TO_64(&address, &reg->address);
+       if (!address) {
+               return (AE_OK);
        }
 
-       /* Must have a return object */
+       /* Supported widths are 8/16/32 */
 
-       if (!info->return_object) {
-               ACPI_ERROR((AE_INFO, "No Sleep State object returned from [%s]",
-                           info->pathname));
-               status = AE_NOT_EXIST;
+       width = reg->bit_width;
+       if ((width != 8) && (width != 16) && (width != 32)) {
+               return (AE_SUPPORT);
        }
 
-       /* It must be of type Package */
+       /* Initialize entire 32-bit return value to zero */
 
-       else if (ACPI_GET_OBJECT_TYPE(info->return_object) != ACPI_TYPE_PACKAGE) {
-               ACPI_ERROR((AE_INFO,
-                           "Sleep State return object is not a Package"));
-               status = AE_AML_OPERAND_TYPE;
-       }
+       *value = 0;
 
        /*
-        * The package must have at least two elements. NOTE (March 2005): This
-        * goes against the current ACPI spec which defines this object as a
-        * package with one encoded DWORD element. However, existing practice
-        * by BIOS vendors seems to be to have 2 or more elements, at least
-        * one per sleep type (A/B).
+        * Two address spaces supported: Memory or IO.
+        * PCI_Config is not supported here because the GAS struct is insufficient
         */
-       else if (info->return_object->package.count < 2) {
-               ACPI_ERROR((AE_INFO,
-                           "Sleep State return package does not have at least two elements"));
-               status = AE_AML_NO_OPERAND;
-       }
+       switch (reg->space_id) {
+       case ACPI_ADR_SPACE_SYSTEM_MEMORY:
 
-       /* The first two elements must both be of type Integer */
+               status = acpi_os_read_memory((acpi_physical_address) address,
+                                            value, width);
+               break;
 
-       else if ((ACPI_GET_OBJECT_TYPE(info->return_object->package.elements[0])
-                 != ACPI_TYPE_INTEGER) ||
-                (ACPI_GET_OBJECT_TYPE(info->return_object->package.elements[1])
-                 != ACPI_TYPE_INTEGER)) {
-               ACPI_ERROR((AE_INFO,
-                           "Sleep State return package elements are not both Integers (%s, %s)",
-                           acpi_ut_get_object_type_name(info->return_object->
-                                                        package.elements[0]),
-                           acpi_ut_get_object_type_name(info->return_object->
-                                                        package.elements[1])));
-               status = AE_AML_OPERAND_TYPE;
-       } else {
-               /* Valid _Sx_ package size, type, and value */
+       case ACPI_ADR_SPACE_SYSTEM_IO:
 
-               *sleep_type_a = (u8)
-                   (info->return_object->package.elements[0])->integer.value;
-               *sleep_type_b = (u8)
-                   (info->return_object->package.elements[1])->integer.value;
-       }
+               status =
+                   acpi_os_read_port((acpi_io_address) address, value, width);
+               break;
 
-       if (ACPI_FAILURE(status)) {
-               ACPI_EXCEPTION((AE_INFO, status,
-                               "While evaluating SleepState [%s], bad Sleep object %p type %s",
-                               info->pathname, info->return_object,
-                               acpi_ut_get_object_type_name(info->
-                                                            return_object)));
+       default:
+               ACPI_ERROR((AE_INFO,
+                           "Unsupported address space: %X", reg->space_id));
+               return (AE_BAD_PARAMETER);
        }
 
-       acpi_ut_remove_reference(info->return_object);
+       ACPI_DEBUG_PRINT((ACPI_DB_IO,
+                         "Read:  %8.8X width %2d from %8.8X%8.8X (%s)\n",
+                         *value, width, ACPI_FORMAT_UINT64(address),
+                         acpi_ut_get_region_name(reg->space_id)));
 
-      cleanup:
-       ACPI_FREE(info);
-       return_ACPI_STATUS(status);
+       return (status);
 }
 
-ACPI_EXPORT_SYMBOL(acpi_get_sleep_type_data)
+ACPI_EXPORT_SYMBOL(acpi_read)
 
-/*******************************************************************************
+/******************************************************************************
  *
- * FUNCTION:    acpi_hw_get_register_bit_mask
+ * FUNCTION:    acpi_write
  *
- * PARAMETERS:  register_id         - Index of ACPI Register to access
+ * PARAMETERS:  Value               - To be written
+ *              Reg                 - GAS register structure
  *
- * RETURN:      The bitmask to be used when accessing the register
+ * RETURN:      Status
  *
- * DESCRIPTION: Map register_id into a register bitmask.
+ * DESCRIPTION: Write to either memory or IO space.
  *
  ******************************************************************************/
-struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id)
+acpi_status acpi_write(u32 value, struct acpi_generic_address *reg)
 {
-       ACPI_FUNCTION_ENTRY();
+       u32 width;
+       u64 address;
+       acpi_status status;
 
-       if (register_id > ACPI_BITREG_MAX) {
-               ACPI_ERROR((AE_INFO, "Invalid BitRegister ID: %X",
-                           register_id));
-               return (NULL);
+       ACPI_FUNCTION_NAME(acpi_write);
+
+       /*
+        * Must have a valid pointer to a GAS structure, and
+        * a non-zero address within. However, don't return an error
+        * because the PM1A/B code must not fail if B isn't present.
+        */
+       if (!reg) {
+               return (AE_OK);
+       }
+
+       /* Get a local copy of the address. Handles possible alignment issues */
+
+       ACPI_MOVE_64_TO_64(&address, &reg->address);
+       if (!address) {
+               return (AE_OK);
+       }
+
+       /* Supported widths are 8/16/32 */
+
+       width = reg->bit_width;
+       if ((width != 8) && (width != 16) && (width != 32)) {
+               return (AE_SUPPORT);
+       }
+
+       /*
+        * Two address spaces supported: Memory or IO.
+        * PCI_Config is not supported here because the GAS struct is insufficient
+        */
+       switch (reg->space_id) {
+       case ACPI_ADR_SPACE_SYSTEM_MEMORY:
+
+               status = acpi_os_write_memory((acpi_physical_address) address,
+                                             value, width);
+               break;
+
+       case ACPI_ADR_SPACE_SYSTEM_IO:
+
+               status = acpi_os_write_port((acpi_io_address) address, value,
+                                           width);
+               break;
+
+       default:
+               ACPI_ERROR((AE_INFO,
+                           "Unsupported address space: %X", reg->space_id));
+               return (AE_BAD_PARAMETER);
        }
 
-       return (&acpi_gbl_bit_register_info[register_id]);
+       ACPI_DEBUG_PRINT((ACPI_DB_IO,
+                         "Wrote: %8.8X width %2d   to %8.8X%8.8X (%s)\n",
+                         value, width, ACPI_FORMAT_UINT64(address),
+                         acpi_ut_get_region_name(reg->space_id)));
+
+       return (status);
 }
 
+ACPI_EXPORT_SYMBOL(acpi_write)
+
 /*******************************************************************************
  *
- * FUNCTION:    acpi_get_register
+ * FUNCTION:    acpi_get_register_unlocked
  *
  * PARAMETERS:  register_id     - ID of ACPI bit_register to access
  *              return_value    - Value that was read from the register
@@ -254,17 +252,16 @@ struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id)
  * RETURN:      Status and the value read from specified Register. Value
  *              returned is normalized to bit0 (is shifted all the way right)
  *
- * DESCRIPTION: ACPI bit_register read function.
+ * DESCRIPTION: ACPI bit_register read function. Does not acquire the HW lock.
  *
  ******************************************************************************/
-
-acpi_status acpi_get_register_unlocked(u32 register_id, u32 * return_value)
+acpi_status acpi_get_register_unlocked(u32 register_id, u32 *return_value)
 {
        u32 register_value = 0;
        struct acpi_bit_register_info *bit_reg_info;
        acpi_status status;
 
-       ACPI_FUNCTION_TRACE(acpi_get_register);
+       ACPI_FUNCTION_TRACE(acpi_get_register_unlocked);
 
        /* Get the info structure corresponding to the requested ACPI Register */
 
@@ -296,14 +293,31 @@ acpi_status acpi_get_register_unlocked(u32 register_id, u32 * return_value)
        return_ACPI_STATUS(status);
 }
 
-acpi_status acpi_get_register(u32 register_id, u32 * return_value)
+ACPI_EXPORT_SYMBOL(acpi_get_register_unlocked)
+
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_get_register
+ *
+ * PARAMETERS:  register_id     - ID of ACPI bit_register to access
+ *              return_value    - Value that was read from the register
+ *
+ * RETURN:      Status and the value read from specified Register. Value
+ *              returned is normalized to bit0 (is shifted all the way right)
+ *
+ * DESCRIPTION: ACPI bit_register read function.
+ *
+ ******************************************************************************/
+acpi_status acpi_get_register(u32 register_id, u32 *return_value)
 {
        acpi_status status;
        acpi_cpu_flags flags;
+
        flags = acpi_os_acquire_lock(acpi_gbl_hardware_lock);
        status = acpi_get_register_unlocked(register_id, return_value);
        acpi_os_release_lock(acpi_gbl_hardware_lock, flags);
-       return status;
+
+       return (status);
 }
 
 ACPI_EXPORT_SYMBOL(acpi_get_register)
@@ -370,8 +384,9 @@ acpi_status acpi_set_register(u32 register_id, u32 value)
                                                   bit_reg_info->
                                                   access_bit_mask);
                if (value) {
-                       status = acpi_hw_register_write(ACPI_REGISTER_PM1_STATUS,
-                                                       (u16) value);
+                       status =
+                           acpi_hw_register_write(ACPI_REGISTER_PM1_STATUS,
+                                                  (u16) value);
                        register_value = 0;
                }
                break;
@@ -459,399 +474,120 @@ acpi_status acpi_set_register(u32 register_id, u32 value)
 
 ACPI_EXPORT_SYMBOL(acpi_set_register)
 
-/******************************************************************************
+/*******************************************************************************
  *
- * FUNCTION:    acpi_hw_register_read
+ * FUNCTION:    acpi_get_sleep_type_data
  *
- * PARAMETERS:  register_id         - ACPI Register ID
- *              return_value        - Where the register value is returned
+ * PARAMETERS:  sleep_state         - Numeric sleep state
+ *              *sleep_type_a        - Where SLP_TYPa is returned
+ *              *sleep_type_b        - Where SLP_TYPb is returned
  *
- * RETURN:      Status and the value read.
+ * RETURN:      Status - ACPI status
  *
- * DESCRIPTION: Read from the specified ACPI register
+ * DESCRIPTION: Obtain the SLP_TYPa and SLP_TYPb values for the requested sleep
+ *              state.
  *
  ******************************************************************************/
 acpi_status
-acpi_hw_register_read(u32 register_id, u32 * return_value)
+acpi_get_sleep_type_data(u8 sleep_state, u8 *sleep_type_a, u8 *sleep_type_b)
 {
-       u32 value1 = 0;
-       u32 value2 = 0;
-       acpi_status status;
-
-       ACPI_FUNCTION_TRACE(hw_register_read);
+       acpi_status status = AE_OK;
+       struct acpi_evaluate_info *info;
 
-       switch (register_id) {
-       case ACPI_REGISTER_PM1_STATUS:  /* 16-bit access */
+       ACPI_FUNCTION_TRACE(acpi_get_sleep_type_data);
 
-               status =
-                   acpi_hw_low_level_read(16, &value1,
-                                          &acpi_gbl_FADT.xpm1a_event_block);
-               if (ACPI_FAILURE(status)) {
-                       goto exit;
-               }
+       /* Validate parameters */
 
-               /* PM1B is optional */
+       if ((sleep_state > ACPI_S_STATES_MAX) || !sleep_type_a || !sleep_type_b) {
+               return_ACPI_STATUS(AE_BAD_PARAMETER);
+       }
 
-               status =
-                   acpi_hw_low_level_read(16, &value2,
-                                          &acpi_gbl_FADT.xpm1b_event_block);
-               value1 |= value2;
-               break;
+       /* Allocate the evaluation information block */
 
-       case ACPI_REGISTER_PM1_ENABLE:  /* 16-bit access */
+       info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info));
+       if (!info) {
+               return_ACPI_STATUS(AE_NO_MEMORY);
+       }
 
-               status =
-                   acpi_hw_low_level_read(16, &value1, &acpi_gbl_xpm1a_enable);
-               if (ACPI_FAILURE(status)) {
-                       goto exit;
-               }
+       info->pathname =
+           ACPI_CAST_PTR(char, acpi_gbl_sleep_state_names[sleep_state]);
 
-               /* PM1B is optional */
+       /* Evaluate the namespace object containing the values for this state */
 
-               status =
-                   acpi_hw_low_level_read(16, &value2, &acpi_gbl_xpm1b_enable);
-               value1 |= value2;
-               break;
-
-       case ACPI_REGISTER_PM1_CONTROL: /* 16-bit access */
-
-               status =
-                   acpi_hw_low_level_read(16, &value1,
-                                          &acpi_gbl_FADT.xpm1a_control_block);
-               if (ACPI_FAILURE(status)) {
-                       goto exit;
-               }
-
-               status =
-                   acpi_hw_low_level_read(16, &value2,
-                                          &acpi_gbl_FADT.xpm1b_control_block);
-               value1 |= value2;
-               break;
-
-       case ACPI_REGISTER_PM2_CONTROL: /* 8-bit access */
-
-               status =
-                   acpi_hw_low_level_read(8, &value1,
-                                          &acpi_gbl_FADT.xpm2_control_block);
-               break;
-
-       case ACPI_REGISTER_PM_TIMER:    /* 32-bit access */
-
-               status =
-                   acpi_hw_low_level_read(32, &value1,
-                                          &acpi_gbl_FADT.xpm_timer_block);
-               break;
-
-       case ACPI_REGISTER_SMI_COMMAND_BLOCK:   /* 8-bit access */
-
-               status =
-                   acpi_os_read_port(acpi_gbl_FADT.smi_command, &value1, 8);
-               break;
-
-       default:
-               ACPI_ERROR((AE_INFO, "Unknown Register ID: %X", register_id));
-               status = AE_BAD_PARAMETER;
-               break;
-       }
-
-      exit:
-
-       if (ACPI_SUCCESS(status)) {
-               *return_value = value1;
-       }
-
-       return_ACPI_STATUS(status);
-}
-
-/******************************************************************************
- *
- * FUNCTION:    acpi_hw_register_write
- *
- * PARAMETERS:  register_id         - ACPI Register ID
- *              Value               - The value to write
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Write to the specified ACPI register
- *
- * NOTE: In accordance with the ACPI specification, this function automatically
- * preserves the value of the following bits, meaning that these bits cannot be
- * changed via this interface:
- *
- * PM1_CONTROL[0] = SCI_EN
- * PM1_CONTROL[9]
- * PM1_STATUS[11]
- *
- * ACPI References:
- * 1) Hardware Ignored Bits: When software writes to a register with ignored
- *      bit fields, it preserves the ignored bit fields
- * 2) SCI_EN: OSPM always preserves this bit position
- *
- ******************************************************************************/
-
-acpi_status acpi_hw_register_write(u32 register_id, u32 value)
-{
-       acpi_status status;
-       u32 read_value;
-
-       ACPI_FUNCTION_TRACE(hw_register_write);
-
-       switch (register_id) {
-       case ACPI_REGISTER_PM1_STATUS:  /* 16-bit access */
-
-               /* Perform a read first to preserve certain bits (per ACPI spec) */
-
-               status = acpi_hw_register_read(ACPI_REGISTER_PM1_STATUS,
-                                              &read_value);
-               if (ACPI_FAILURE(status)) {
-                       goto exit;
-               }
-
-               /* Insert the bits to be preserved */
-
-               ACPI_INSERT_BITS(value, ACPI_PM1_STATUS_PRESERVED_BITS,
-                                read_value);
-
-               /* Now we can write the data */
-
-               status =
-                   acpi_hw_low_level_write(16, value,
-                                           &acpi_gbl_FADT.xpm1a_event_block);
-               if (ACPI_FAILURE(status)) {
-                       goto exit;
-               }
-
-               /* PM1B is optional */
-
-               status =
-                   acpi_hw_low_level_write(16, value,
-                                           &acpi_gbl_FADT.xpm1b_event_block);
-               break;
-
-       case ACPI_REGISTER_PM1_ENABLE:  /* 16-bit access */
-
-               status =
-                   acpi_hw_low_level_write(16, value, &acpi_gbl_xpm1a_enable);
-               if (ACPI_FAILURE(status)) {
-                       goto exit;
-               }
-
-               /* PM1B is optional */
-
-               status =
-                   acpi_hw_low_level_write(16, value, &acpi_gbl_xpm1b_enable);
-               break;
-
-       case ACPI_REGISTER_PM1_CONTROL: /* 16-bit access */
-
-               /*
-                * Perform a read first to preserve certain bits (per ACPI spec)
-                */
-               status = acpi_hw_register_read(ACPI_REGISTER_PM1_CONTROL,
-                                              &read_value);
-               if (ACPI_FAILURE(status)) {
-                       goto exit;
-               }
-
-               /* Insert the bits to be preserved */
-
-               ACPI_INSERT_BITS(value, ACPI_PM1_CONTROL_PRESERVED_BITS,
-                                read_value);
-
-               /* Now we can write the data */
-
-               status =
-                   acpi_hw_low_level_write(16, value,
-                                           &acpi_gbl_FADT.xpm1a_control_block);
-               if (ACPI_FAILURE(status)) {
-                       goto exit;
-               }
-
-               status =
-                   acpi_hw_low_level_write(16, value,
-                                           &acpi_gbl_FADT.xpm1b_control_block);
-               break;
-
-       case ACPI_REGISTER_PM1A_CONTROL:        /* 16-bit access */
-
-               status =
-                   acpi_hw_low_level_write(16, value,
-                                           &acpi_gbl_FADT.xpm1a_control_block);
-               break;
-
-       case ACPI_REGISTER_PM1B_CONTROL:        /* 16-bit access */
-
-               status =
-                   acpi_hw_low_level_write(16, value,
-                                           &acpi_gbl_FADT.xpm1b_control_block);
-               break;
-
-       case ACPI_REGISTER_PM2_CONTROL: /* 8-bit access */
-
-               status =
-                   acpi_hw_low_level_write(8, value,
-                                           &acpi_gbl_FADT.xpm2_control_block);
-               break;
-
-       case ACPI_REGISTER_PM_TIMER:    /* 32-bit access */
-
-               status =
-                   acpi_hw_low_level_write(32, value,
-                                           &acpi_gbl_FADT.xpm_timer_block);
-               break;
-
-       case ACPI_REGISTER_SMI_COMMAND_BLOCK:   /* 8-bit access */
-
-               /* SMI_CMD is currently always in IO space */
-
-               status =
-                   acpi_os_write_port(acpi_gbl_FADT.smi_command, value, 8);
-               break;
+       status = acpi_ns_evaluate(info);
+       if (ACPI_FAILURE(status)) {
+               ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
+                                 "%s while evaluating SleepState [%s]\n",
+                                 acpi_format_exception(status),
+                                 info->pathname));
 
-       default:
-               status = AE_BAD_PARAMETER;
-               break;
+               goto cleanup;
        }
 
-      exit:
-       return_ACPI_STATUS(status);
-}
-
-/******************************************************************************
- *
- * FUNCTION:    acpi_hw_low_level_read
- *
- * PARAMETERS:  Width               - 8, 16, or 32
- *              Value               - Where the value is returned
- *              Reg                 - GAS register structure
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Read from either memory or IO space.
- *
- ******************************************************************************/
-
-acpi_status
-acpi_hw_low_level_read(u32 width, u32 * value, struct acpi_generic_address *reg)
-{
-       u64 address;
-       acpi_status status;
-
-       ACPI_FUNCTION_NAME(hw_low_level_read);
+       /* Must have a return object */
 
-       /*
-        * Must have a valid pointer to a GAS structure, and
-        * a non-zero address within. However, don't return an error
-        * because the PM1A/B code must not fail if B isn't present.
-        */
-       if (!reg) {
-               return (AE_OK);
+       if (!info->return_object) {
+               ACPI_ERROR((AE_INFO, "No Sleep State object returned from [%s]",
+                           info->pathname));
+               status = AE_NOT_EXIST;
        }
 
-       /* Get a local copy of the address. Handles possible alignment issues */
+       /* It must be of type Package */
 
-       ACPI_MOVE_64_TO_64(&address, &reg->address);
-       if (!address) {
-               return (AE_OK);
+       else if (ACPI_GET_OBJECT_TYPE(info->return_object) != ACPI_TYPE_PACKAGE) {
+               ACPI_ERROR((AE_INFO,
+                           "Sleep State return object is not a Package"));
+               status = AE_AML_OPERAND_TYPE;
        }
-       *value = 0;
 
        /*
-        * Two address spaces supported: Memory or IO.
-        * PCI_Config is not supported here because the GAS struct is insufficient
+        * The package must have at least two elements. NOTE (March 2005): This
+        * goes against the current ACPI spec which defines this object as a
+        * package with one encoded DWORD element. However, existing practice
+        * by BIOS vendors seems to be to have 2 or more elements, at least
+        * one per sleep type (A/B).
         */
-       switch (reg->space_id) {
-       case ACPI_ADR_SPACE_SYSTEM_MEMORY:
-
-               status = acpi_os_read_memory((acpi_physical_address) address,
-                                            value, width);
-               break;
-
-       case ACPI_ADR_SPACE_SYSTEM_IO:
-
-               status =
-                   acpi_os_read_port((acpi_io_address) address, value, width);
-               break;
-
-       default:
+       else if (info->return_object->package.count < 2) {
                ACPI_ERROR((AE_INFO,
-                           "Unsupported address space: %X", reg->space_id));
-               return (AE_BAD_PARAMETER);
+                           "Sleep State return package does not have at least two elements"));
+               status = AE_AML_NO_OPERAND;
        }
 
-       ACPI_DEBUG_PRINT((ACPI_DB_IO,
-                         "Read:  %8.8X width %2d from %8.8X%8.8X (%s)\n",
-                         *value, width, ACPI_FORMAT_UINT64(address),
-                         acpi_ut_get_region_name(reg->space_id)));
-
-       return (status);
-}
-
-/******************************************************************************
- *
- * FUNCTION:    acpi_hw_low_level_write
- *
- * PARAMETERS:  Width               - 8, 16, or 32
- *              Value               - To be written
- *              Reg                 - GAS register structure
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Write to either memory or IO space.
- *
- ******************************************************************************/
-
-acpi_status
-acpi_hw_low_level_write(u32 width, u32 value, struct acpi_generic_address * reg)
-{
-       u64 address;
-       acpi_status status;
-
-       ACPI_FUNCTION_NAME(hw_low_level_write);
-
-       /*
-        * Must have a valid pointer to a GAS structure, and
-        * a non-zero address within. However, don't return an error
-        * because the PM1A/B code must not fail if B isn't present.
-        */
-       if (!reg) {
-               return (AE_OK);
-       }
+       /* The first two elements must both be of type Integer */
 
-       /* Get a local copy of the address. Handles possible alignment issues */
+       else if ((ACPI_GET_OBJECT_TYPE(info->return_object->package.elements[0])
+                 != ACPI_TYPE_INTEGER) ||
+                (ACPI_GET_OBJECT_TYPE(info->return_object->package.elements[1])
+                 != ACPI_TYPE_INTEGER)) {
+               ACPI_ERROR((AE_INFO,
+                           "Sleep State return package elements are not both Integers (%s, %s)",
+                           acpi_ut_get_object_type_name(info->return_object->
+                                                        package.elements[0]),
+                           acpi_ut_get_object_type_name(info->return_object->
+                                                        package.elements[1])));
+               status = AE_AML_OPERAND_TYPE;
+       } else {
+               /* Valid _Sx_ package size, type, and value */
 
-       ACPI_MOVE_64_TO_64(&address, &reg->address);
-       if (!address) {
-               return (AE_OK);
+               *sleep_type_a = (u8)
+                   (info->return_object->package.elements[0])->integer.value;
+               *sleep_type_b = (u8)
+                   (info->return_object->package.elements[1])->integer.value;
        }
 
-       /*
-        * Two address spaces supported: Memory or IO.
-        * PCI_Config is not supported here because the GAS struct is insufficient
-        */
-       switch (reg->space_id) {
-       case ACPI_ADR_SPACE_SYSTEM_MEMORY:
-
-               status = acpi_os_write_memory((acpi_physical_address) address,
-                                             value, width);
-               break;
-
-       case ACPI_ADR_SPACE_SYSTEM_IO:
-
-               status = acpi_os_write_port((acpi_io_address) address, value,
-                                           width);
-               break;
-
-       default:
-               ACPI_ERROR((AE_INFO,
-                           "Unsupported address space: %X", reg->space_id));
-               return (AE_BAD_PARAMETER);
+       if (ACPI_FAILURE(status)) {
+               ACPI_EXCEPTION((AE_INFO, status,
+                               "While evaluating SleepState [%s], bad Sleep object %p type %s",
+                               info->pathname, info->return_object,
+                               acpi_ut_get_object_type_name(info->
+                                                            return_object)));
        }
 
-       ACPI_DEBUG_PRINT((ACPI_DB_IO,
-                         "Wrote: %8.8X width %2d   to %8.8X%8.8X (%s)\n",
-                         value, width, ACPI_FORMAT_UINT64(address),
-                         acpi_ut_get_region_name(reg->space_id)));
+       acpi_ut_remove_reference(info->return_object);
 
-       return (status);
+      cleanup:
+       ACPI_FREE(info);
+       return_ACPI_STATUS(status);
 }
+
+ACPI_EXPORT_SYMBOL(acpi_get_sleep_type_data)
similarity index 98%
rename from drivers/acpi/namespace/nsaccess.c
rename to drivers/acpi/acpica/nsaccess.c
index c39a7f68b88929adb1fd86c94c6db3922b6a0829..88303ebe924cb7c5ec6167127edfe2cabae0923a 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/amlcode.h>
-#include <acpi/acnamesp.h>
-#include <acpi/acdispat.h>
+#include "accommon.h"
+#include "amlcode.h"
+#include "acnamesp.h"
+#include "acdispat.h"
 
 #define _COMPONENT          ACPI_NAMESPACE
 ACPI_MODULE_NAME("nsaccess")
@@ -165,11 +166,8 @@ acpi_status acpi_ns_root_initialize(void)
 
                                obj_desc->method.method_flags =
                                    AML_METHOD_INTERNAL_ONLY;
-
-#ifndef ACPI_DUMP_APP
                                obj_desc->method.implementation =
                                    acpi_ut_osi_implementation;
-#endif
 #endif
                                break;
 
@@ -521,11 +519,11 @@ acpi_ns_lookup(union acpi_generic_state *scope_info,
        }
 
        /*
-        * Search namespace for each segment of the name.  Loop through and
+        * Search namespace for each segment of the name. Loop through and
         * verify (or add to the namespace) each name segment.
         *
         * The object type is significant only at the last name
-        * segment.  (We don't care about the types along the path, only
+        * segment. (We don't care about the types along the path, only
         * the type of the final target object.)
         */
        this_search_type = ACPI_TYPE_ANY;
@@ -591,6 +589,10 @@ acpi_ns_lookup(union acpi_generic_state *scope_info,
                         * segments).
                         */
                        if (this_node->type == ACPI_TYPE_LOCAL_ALIAS) {
+                               if (!this_node->object) {
+                                       return_ACPI_STATUS(AE_NOT_EXIST);
+                               }
+
                                if (acpi_ns_opens_scope
                                    (((struct acpi_namespace_node *)this_node->
                                      object)->type)) {
similarity index 99%
rename from drivers/acpi/namespace/nsalloc.c
rename to drivers/acpi/acpica/nsalloc.c
index 3a1740ac2edcc012a7b51eabe889e03c3bd637d4..f976d848fe8241c0845ad4063d8a86c554aaefec 100644 (file)
@@ -42,7 +42,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acnamesp.h>
+#include "accommon.h"
+#include "acnamesp.h"
 
 #define _COMPONENT          ACPI_NAMESPACE
 ACPI_MODULE_NAME("nsalloc")
similarity index 99%
rename from drivers/acpi/namespace/nsdump.c
rename to drivers/acpi/acpica/nsdump.c
index cc0ae39440e4358838626c73c63d43ccc8e15d01..0da33c8e9ba272d99979e80fd26ccb30255cb21b 100644 (file)
@@ -42,7 +42,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acnamesp.h>
+#include "accommon.h"
+#include "acnamesp.h"
 
 #define _COMPONENT          ACPI_NAMESPACE
 ACPI_MODULE_NAME("nsdump")
similarity index 99%
rename from drivers/acpi/namespace/nsdumpdv.c
rename to drivers/acpi/acpica/nsdumpdv.c
index 428f50fde11a8cbe876d2a130e7cc09b791df75f..41994fe7fbb8a20c95e4505ad6878938a5381a7f 100644 (file)
@@ -42,6 +42,7 @@
  */
 
 #include <acpi/acpi.h>
+#include "accommon.h"
 
 /* TBD: This entire module is apparently obsolete and should be removed */
 
@@ -49,7 +50,7 @@
 ACPI_MODULE_NAME("nsdumpdv")
 #ifdef ACPI_OBSOLETE_FUNCTIONS
 #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
-#include <acpi/acnamesp.h>
+#include "acnamesp.h"
 /*******************************************************************************
  *
  * FUNCTION:    acpi_ns_dump_one_device
similarity index 81%
rename from drivers/acpi/namespace/nseval.c
rename to drivers/acpi/acpica/nseval.c
index 4cdf03ac2b467803189d97e8c5b7d11feabc073e..0f3d5f9b59664f1aff2540606bb51660ef8b5328 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acparser.h>
-#include <acpi/acinterp.h>
-#include <acpi/acnamesp.h>
+#include "accommon.h"
+#include "acparser.h"
+#include "acinterp.h"
+#include "acnamesp.h"
 
 #define _COMPONENT          ACPI_NAMESPACE
 ACPI_MODULE_NAME("nseval")
@@ -89,6 +90,7 @@ acpi_status acpi_ns_evaluate(struct acpi_evaluate_info * info)
        /* Initialize the return value to an invalid object */
 
        info->return_object = NULL;
+       info->param_count = 0;
 
        /*
         * Get the actual namespace node for the target object. Handles these cases:
@@ -141,41 +143,17 @@ acpi_status acpi_ns_evaluate(struct acpi_evaluate_info * info)
                        return_ACPI_STATUS(AE_NULL_OBJECT);
                }
 
-               /*
-                * Calculate the number of arguments being passed to the method
-                */
+               /* Count the number of arguments being passed to the method */
 
-               info->param_count = 0;
                if (info->parameters) {
-                       while (info->parameters[info->param_count])
+                       while (info->parameters[info->param_count]) {
+                               if (info->param_count > ACPI_METHOD_MAX_ARG) {
+                                       return_ACPI_STATUS(AE_LIMIT);
+                               }
                                info->param_count++;
+                       }
                }
 
-               /*
-                * Warning if too few or too many arguments have been passed by the
-                * caller. We don't want to abort here with an error because an
-                * incorrect number of arguments may not cause the method to fail.
-                * However, the method will fail if there are too few arguments passed
-                * and the method attempts to use one of the missing ones.
-                */
-
-               if (info->param_count < info->obj_desc->method.param_count) {
-                       ACPI_WARNING((AE_INFO,
-                                   "Insufficient arguments - "
-                                   "method [%4.4s] needs %d, found %d",
-                                   acpi_ut_get_node_name(info->resolved_node),
-                                   info->obj_desc->method.param_count,
-                                   info->param_count));
-               } else if (info->param_count >
-                               info->obj_desc->method.param_count) {
-                       ACPI_WARNING((AE_INFO,
-                                     "Excess arguments - "
-                                     "method [%4.4s] needs %d, found %d",
-                                     acpi_ut_get_node_name(info->
-                                                           resolved_node),
-                                     info->obj_desc->method.param_count,
-                                     info->param_count));
-               }
 
                ACPI_DUMP_PATHNAME(info->resolved_node, "Execute Method:",
                                   ACPI_LV_INFO, _COMPONENT);
@@ -264,32 +242,13 @@ acpi_status acpi_ns_evaluate(struct acpi_evaluate_info * info)
                }
        }
 
-       /* Validation of return values for ACPI-predefined methods and objects */
-
-       if ((status == AE_OK) || (status == AE_CTRL_RETURN_VALUE)) {
-               /*
-                * If this is the first evaluation, check the return value. This
-                * ensures that any warnings will only be emitted during the very
-                * first evaluation of the object.
-                */
-               if (!(node->flags & ANOBJ_EVALUATED)) {
-                       /*
-                        * Check for a predefined ACPI name. If found, validate the
-                        * returned object.
-                        *
-                        * Note: Ignore return status for now, emit warnings if there are
-                        * problems with the returned object. May change later to abort
-                        * the method on invalid return object.
-                        */
-                       (void)acpi_ns_check_predefined_names(node,
-                                                            info->
-                                                            return_object);
-               }
-
-               /* Mark the node as having been evaluated */
-
-               node->flags |= ANOBJ_EVALUATED;
-       }
+       /*
+        * Check input argument count against the ASL-defined count for a method.
+        * Also check predefined names: argument count and return value against
+        * the ACPI specification. Some incorrect return value types are repaired.
+        */
+       (void)acpi_ns_check_predefined_names(node, info->param_count,
+               status, &info->return_object);
 
        /* Check if there is a return value that must be dealt with */
 
similarity index 99%
rename from drivers/acpi/namespace/nsinit.c
rename to drivers/acpi/acpica/nsinit.c
index e4c57510d798753cd8366f4a2fbbaecb4d545450..13501cb81863b329f9aaa30dfe5a90e1a7c1d79f 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acnamesp.h>
-#include <acpi/acdispat.h>
-#include <acpi/acinterp.h>
+#include "accommon.h"
+#include "acnamesp.h"
+#include "acdispat.h"
+#include "acinterp.h"
 #include <linux/nmi.h>
 
 #define _COMPONENT          ACPI_NAMESPACE
similarity index 99%
rename from drivers/acpi/namespace/nsload.c
rename to drivers/acpi/acpica/nsload.c
index a4a412b7c029526faabd771b3742fd65db3ba7a3..a0ba9e12379efa250728e801a6f2eec1ec649401 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acnamesp.h>
-#include <acpi/acdispat.h>
-#include <acpi/actables.h>
+#include "accommon.h"
+#include "acnamesp.h"
+#include "acdispat.h"
+#include "actables.h"
 
 #define _COMPONENT          ACPI_NAMESPACE
 ACPI_MODULE_NAME("nsload")
similarity index 99%
rename from drivers/acpi/namespace/nsnames.c
rename to drivers/acpi/acpica/nsnames.c
index 42a39a7c96e913a519e6b1bf7b5a79d152dd4a4d..ae3dc10a7e817c4c9f11d7c5d6549e7cff2e0f61 100644 (file)
@@ -42,8 +42,9 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/amlcode.h>
-#include <acpi/acnamesp.h>
+#include "accommon.h"
+#include "amlcode.h"
+#include "acnamesp.h"
 
 #define _COMPONENT          ACPI_NAMESPACE
 ACPI_MODULE_NAME("nsnames")
similarity index 99%
rename from drivers/acpi/namespace/nsobject.c
rename to drivers/acpi/acpica/nsobject.c
index 15fe09e24f71ef3698ac25824c91b5849e567bf3..08a97a57f8f985c998dc5b8c926fab0a6e954093 100644 (file)
@@ -43,7 +43,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acnamesp.h>
+#include "accommon.h"
+#include "acnamesp.h"
 
 #define _COMPONENT          ACPI_NAMESPACE
 ACPI_MODULE_NAME("nsobject")
similarity index 98%
rename from drivers/acpi/namespace/nsparse.c
rename to drivers/acpi/acpica/nsparse.c
index a82271a9dbb3d5b42495f7f10a809313730fc1c3..b9e8d0070b6f0049d9a96b4887237d70ed690609 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acnamesp.h>
-#include <acpi/acparser.h>
-#include <acpi/acdispat.h>
-#include <acpi/actables.h>
+#include "accommon.h"
+#include "acnamesp.h"
+#include "acparser.h"
+#include "acdispat.h"
+#include "actables.h"
 
 #define _COMPONENT          ACPI_NAMESPACE
 ACPI_MODULE_NAME("nsparse")
similarity index 76%
rename from drivers/acpi/namespace/nspredef.c
rename to drivers/acpi/acpica/nspredef.c
index 0f17cf0898c9a564d9e5357838dbdae06efb4a09..452703290d35e81bff9b98d4c706520c5c0a64a8 100644 (file)
@@ -43,8 +43,9 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acnamesp.h>
-#include <acpi/acpredef.h>
+#include "accommon.h"
+#include "acnamesp.h"
+#include "acpredef.h"
 
 #define _COMPONENT          ACPI_NAMESPACE
 ACPI_MODULE_NAME("nspredef")
@@ -72,7 +73,7 @@ ACPI_MODULE_NAME("nspredef")
 /* Local prototypes */
 static acpi_status
 acpi_ns_check_package(char *pathname,
-                     union acpi_operand_object *return_object,
+                     union acpi_operand_object **return_object_ptr,
                      const union acpi_predefined_info *predefined);
 
 static acpi_status
@@ -82,13 +83,18 @@ acpi_ns_check_package_elements(char *pathname,
 
 static acpi_status
 acpi_ns_check_object_type(char *pathname,
-                         union acpi_operand_object *return_object,
+                         union acpi_operand_object **return_object_ptr,
                          u32 expected_btypes, u32 package_index);
 
 static acpi_status
 acpi_ns_check_reference(char *pathname,
                        union acpi_operand_object *return_object);
 
+static acpi_status
+acpi_ns_repair_object(u32 expected_btypes,
+                     u32 package_index,
+                     union acpi_operand_object **return_object_ptr);
+
 /*
  * Names for the types that can be returned by the predefined objects.
  * Used for warning messages. Must be in the same order as the ACPI_RTYPEs
@@ -108,8 +114,8 @@ static const char *acpi_rtype_names[] = {
  * FUNCTION:    acpi_ns_check_predefined_names
  *
  * PARAMETERS:  Node            - Namespace node for the method/object
- *              return_object   - Object returned from the evaluation of this
- *                                method/object
+ *              return_object_ptr - Pointer to the object returned from the
+ *                                evaluation of a method or object
  *
  * RETURN:      Status
  *
@@ -119,8 +125,11 @@ static const char *acpi_rtype_names[] = {
 
 acpi_status
 acpi_ns_check_predefined_names(struct acpi_namespace_node *node,
-                              union acpi_operand_object *return_object)
+                              u32 user_param_count,
+                              acpi_status return_status,
+                              union acpi_operand_object **return_object_ptr)
 {
+       union acpi_operand_object *return_object = *return_object_ptr;
        acpi_status status = AE_OK;
        const union acpi_predefined_info *predefined;
        char *pathname;
@@ -128,12 +137,6 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node,
        /* Match the name for this method/object against the predefined list */
 
        predefined = acpi_ns_check_for_predefined_name(node);
-       if (!predefined) {
-
-               /* Name was not one of the predefined names */
-
-               return (AE_OK);
-       }
 
        /* Get the full pathname to the object, for use in error messages */
 
@@ -143,10 +146,37 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node,
        }
 
        /*
-        * Check that the parameter count for this method is in accordance
-        * with the ACPI specification.
+        * Check that the parameter count for this method matches the ASL
+        * definition. For predefined names, ensure that both the caller and
+        * the method itself are in accordance with the ACPI specification.
         */
-       acpi_ns_check_parameter_count(pathname, node, predefined);
+       acpi_ns_check_parameter_count(pathname, node, user_param_count,
+                                     predefined);
+
+       /* If not a predefined name, we cannot validate the return object */
+
+       if (!predefined) {
+               goto exit;
+       }
+
+       /* If the method failed, we cannot validate the return object */
+
+       if ((return_status != AE_OK) && (return_status != AE_CTRL_RETURN_VALUE)) {
+               goto exit;
+       }
+
+       /*
+        * Only validate the return value on the first successful evaluation of
+        * the method. This ensures that any warnings will only be emitted during
+        * the very first evaluation of the method/object.
+        */
+       if (node->flags & ANOBJ_EVALUATED) {
+               goto exit;
+       }
+
+       /* Mark the node as having been successfully evaluated */
+
+       node->flags |= ANOBJ_EVALUATED;
 
        /*
         * If there is no return value, check if we require a return value for
@@ -171,7 +201,7 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node,
         * We have a return value, but if one wasn't expected, just exit, this is
         * not a problem
         *
-        * For example, if "Implicit return value" is enabled, methods will
+        * For example, if the "Implicit Return" feature is enabled, methods will
         * always return a value
         */
        if (!predefined->info.expected_btypes) {
@@ -182,7 +212,7 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node,
         * Check that the type of the return object is what is expected for
         * this predefined name
         */
-       status = acpi_ns_check_object_type(pathname, return_object,
+       status = acpi_ns_check_object_type(pathname, return_object_ptr,
                                           predefined->info.expected_btypes,
                                           ACPI_NOT_PACKAGE);
        if (ACPI_FAILURE(status)) {
@@ -193,11 +223,12 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node,
 
        if (ACPI_GET_OBJECT_TYPE(return_object) == ACPI_TYPE_PACKAGE) {
                status =
-                   acpi_ns_check_package(pathname, return_object, predefined);
+                   acpi_ns_check_package(pathname, return_object_ptr,
+                                         predefined);
        }
 
       exit:
-       if (pathname) {
+       if (pathname != predefined->info.name) {
                ACPI_FREE(pathname);
        }
 
@@ -210,6 +241,7 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node,
  *
  * PARAMETERS:  Pathname        - Full pathname to the node (for error msgs)
  *              Node            - Namespace node for the method/object
+ *              user_param_count - Number of args passed in by the caller
  *              Predefined      - Pointer to entry in predefined name table
  *
  * RETURN:      None
@@ -223,32 +255,76 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node,
 void
 acpi_ns_check_parameter_count(char *pathname,
                              struct acpi_namespace_node *node,
+                             u32 user_param_count,
                              const union acpi_predefined_info *predefined)
 {
        u32 param_count;
        u32 required_params_current;
        u32 required_params_old;
 
-       /*
-        * Check that the ASL-defined parameter count is what is expected for
-        * this predefined name.
-        *
-        * Methods have 0-7 parameters. All other types have zero.
-        */
+       /* Methods have 0-7 parameters. All other types have zero. */
+
        param_count = 0;
        if (node->type == ACPI_TYPE_METHOD) {
                param_count = node->object->method.param_count;
        }
 
-       /* Validate parameter count - allow two different legal counts (_SCP) */
+       /* Argument count check for non-predefined methods/objects */
+
+       if (!predefined) {
+               /*
+                * Warning if too few or too many arguments have been passed by the
+                * caller. An incorrect number of arguments may not cause the method
+                * to fail. However, the method will fail if there are too few
+                * arguments and the method attempts to use one of the missing ones.
+                */
+               if (user_param_count < param_count) {
+                       ACPI_WARNING((AE_INFO,
+                                     "%s: Insufficient arguments - needs %d, found %d",
+                                     pathname, param_count, user_param_count));
+               } else if (user_param_count > param_count) {
+                       ACPI_WARNING((AE_INFO,
+                                     "%s: Excess arguments - needs %d, found %d",
+                                     pathname, param_count, user_param_count));
+               }
+               return;
+       }
+
+       /* Allow two different legal argument counts (_SCP, etc.) */
 
        required_params_current = predefined->info.param_count & 0x0F;
        required_params_old = predefined->info.param_count >> 4;
 
+       if (user_param_count != ACPI_UINT32_MAX) {
+
+               /* Validate the user-supplied parameter count */
+
+               if ((user_param_count != required_params_current) &&
+                   (user_param_count != required_params_old)) {
+                       ACPI_WARNING((AE_INFO,
+                                     "%s: Parameter count mismatch - caller passed %d, ACPI requires %d",
+                                     pathname, user_param_count,
+                                     required_params_current));
+               }
+       }
+
+       /*
+        * Only validate the argument count on the first successful evaluation of
+        * the method. This ensures that any warnings will only be emitted during
+        * the very first evaluation of the method/object.
+        */
+       if (node->flags & ANOBJ_EVALUATED) {
+               return;
+       }
+
+       /*
+        * Check that the ASL-defined parameter count is what is expected for
+        * this predefined name.
+        */
        if ((param_count != required_params_current) &&
            (param_count != required_params_old)) {
                ACPI_WARNING((AE_INFO,
-                             "%s: Parameter count mismatch - ASL declared %d, expected %d",
+                             "%s: Parameter count mismatch - ASL declared %d, ACPI requires %d",
                              pathname, param_count, required_params_current));
        }
 }
@@ -307,8 +383,8 @@ const union acpi_predefined_info *acpi_ns_check_for_predefined_name(struct
  * FUNCTION:    acpi_ns_check_package
  *
  * PARAMETERS:  Pathname        - Full pathname to the node (for error msgs)
- *              return_object   - Object returned from the evaluation of a
- *                                method or object
+ *              return_object_ptr - Pointer to the object returned from the
+ *                                evaluation of a method or object
  *              Predefined      - Pointer to entry in predefined name table
  *
  * RETURN:      Status
@@ -320,9 +396,10 @@ const union acpi_predefined_info *acpi_ns_check_for_predefined_name(struct
 
 static acpi_status
 acpi_ns_check_package(char *pathname,
-                     union acpi_operand_object *return_object,
+                     union acpi_operand_object **return_object_ptr,
                      const union acpi_predefined_info *predefined)
 {
+       union acpi_operand_object *return_object = *return_object_ptr;
        const union acpi_predefined_info *package;
        union acpi_operand_object *sub_package;
        union acpi_operand_object **elements;
@@ -408,7 +485,7 @@ acpi_ns_check_package(char *pathname,
                 * elements must be of the same type
                 */
                for (i = 0; i < count; i++) {
-                       status = acpi_ns_check_object_type(pathname, *elements,
+                       status = acpi_ns_check_object_type(pathname, elements,
                                                           package->ret_info.
                                                           object_type1, i);
                        if (ACPI_FAILURE(status)) {
@@ -441,7 +518,7 @@ acpi_ns_check_package(char *pathname,
 
                                status =
                                    acpi_ns_check_object_type(pathname,
-                                                             *elements,
+                                                             elements,
                                                              package->
                                                              ret_info3.
                                                              object_type[i],
@@ -454,7 +531,7 @@ acpi_ns_check_package(char *pathname,
 
                                status =
                                    acpi_ns_check_object_type(pathname,
-                                                             *elements,
+                                                             elements,
                                                              package->
                                                              ret_info3.
                                                              tail_object_type,
@@ -471,7 +548,7 @@ acpi_ns_check_package(char *pathname,
 
                /* First element is the (Integer) count of sub-packages to follow */
 
-               status = acpi_ns_check_object_type(pathname, *elements,
+               status = acpi_ns_check_object_type(pathname, elements,
                                                   ACPI_RTYPE_INTEGER, 0);
                if (ACPI_FAILURE(status)) {
                        return (status);
@@ -509,7 +586,7 @@ acpi_ns_check_package(char *pathname,
                        /* Each sub-object must be of type Package */
 
                        status =
-                           acpi_ns_check_object_type(pathname, sub_package,
+                           acpi_ns_check_object_type(pathname, &sub_package,
                                                      ACPI_RTYPE_PACKAGE, i);
                        if (ACPI_FAILURE(status)) {
                                return (status);
@@ -567,12 +644,8 @@ acpi_ns_check_package(char *pathname,
                                for (j = 0; j < expected_count; j++) {
                                        status =
                                            acpi_ns_check_object_type(pathname,
-                                                                     sub_elements
-                                                                     [j],
-                                                                     package->
-                                                                     ret_info2.
-                                                                     object_type
-                                                                     [j], j);
+                                               &sub_elements[j],
+                                               package->ret_info2.object_type[j], j);
                                        if (ACPI_FAILURE(status)) {
                                                return (status);
                                        }
@@ -611,7 +684,7 @@ acpi_ns_check_package(char *pathname,
 
                                status =
                                    acpi_ns_check_object_type(pathname,
-                                                             *sub_elements,
+                                                             sub_elements,
                                                              ACPI_RTYPE_INTEGER,
                                                              0);
                                if (ACPI_FAILURE(status)) {
@@ -708,7 +781,7 @@ acpi_ns_check_package_elements(char *pathname,
         * The second group can have a count of zero.
         */
        for (i = 0; i < count1; i++) {
-               status = acpi_ns_check_object_type(pathname, *this_element,
+               status = acpi_ns_check_object_type(pathname, this_element,
                                                   type1, i);
                if (ACPI_FAILURE(status)) {
                        return (status);
@@ -717,7 +790,7 @@ acpi_ns_check_package_elements(char *pathname,
        }
 
        for (i = 0; i < count2; i++) {
-               status = acpi_ns_check_object_type(pathname, *this_element,
+               status = acpi_ns_check_object_type(pathname, this_element,
                                                   type2, (i + count1));
                if (ACPI_FAILURE(status)) {
                        return (status);
@@ -733,8 +806,8 @@ acpi_ns_check_package_elements(char *pathname,
  * FUNCTION:    acpi_ns_check_object_type
  *
  * PARAMETERS:  Pathname        - Full pathname to the node (for error msgs)
- *              return_object   - Object return from the execution of this
- *                                method/object
+ *              return_object_ptr - Pointer to the object returned from the
+ *                                evaluation of a method or object
  *              expected_btypes - Bitmap of expected return type(s)
  *              package_index   - Index of object within parent package (if
  *                                applicable - ACPI_NOT_PACKAGE otherwise)
@@ -748,9 +821,10 @@ acpi_ns_check_package_elements(char *pathname,
 
 static acpi_status
 acpi_ns_check_object_type(char *pathname,
-                         union acpi_operand_object *return_object,
+                         union acpi_operand_object **return_object_ptr,
                          u32 expected_btypes, u32 package_index)
 {
+       union acpi_operand_object *return_object = *return_object_ptr;
        acpi_status status = AE_OK;
        u32 return_btype;
        char type_buffer[48];   /* Room for 5 types */
@@ -814,6 +888,14 @@ acpi_ns_check_object_type(char *pathname,
        /* Is the object one of the expected types? */
 
        if (!(return_btype & expected_btypes)) {
+
+               /* Type mismatch -- attempt repair of the returned object */
+
+               status = acpi_ns_repair_object(expected_btypes, package_index,
+                                              return_object_ptr);
+               if (ACPI_SUCCESS(status)) {
+                       return (status);
+               }
                goto type_error_exit;
        }
 
@@ -898,3 +980,86 @@ acpi_ns_check_reference(char *pathname,
 
        return (AE_AML_OPERAND_TYPE);
 }
+
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_ns_repair_object
+ *
+ * PARAMETERS:  Pathname        - Full pathname to the node (for error msgs)
+ *              package_index   - Used to determine if target is in a package
+ *              return_object_ptr - Pointer to the object returned from the
+ *                                evaluation of a method or object
+ *
+ * RETURN:      Status. AE_OK if repair was successful.
+ *
+ * DESCRIPTION: Attempt to repair/convert a return object of a type that was
+ *              not expected.
+ *
+ ******************************************************************************/
+
+static acpi_status
+acpi_ns_repair_object(u32 expected_btypes,
+                     u32 package_index,
+                     union acpi_operand_object **return_object_ptr)
+{
+       union acpi_operand_object *return_object = *return_object_ptr;
+       union acpi_operand_object *new_object;
+       acpi_size length;
+
+       switch (ACPI_GET_OBJECT_TYPE(return_object)) {
+       case ACPI_TYPE_BUFFER:
+
+               if (!(expected_btypes & ACPI_RTYPE_STRING)) {
+                       return (AE_AML_OPERAND_TYPE);
+               }
+
+               /*
+                * Have a Buffer, expected a String, convert. Use a to_string
+                * conversion, no transform performed on the buffer data. The best
+                * example of this is the _BIF method, where the string data from
+                * the battery is often (incorrectly) returned as buffer object(s).
+                */
+               length = 0;
+               while ((length < return_object->buffer.length) &&
+                      (return_object->buffer.pointer[length])) {
+                       length++;
+               }
+
+               /* Allocate a new string object */
+
+               new_object = acpi_ut_create_string_object(length);
+               if (!new_object) {
+                       return (AE_NO_MEMORY);
+               }
+
+               /*
+                * Copy the raw buffer data with no transform. String is already NULL
+                * terminated at Length+1.
+                */
+               ACPI_MEMCPY(new_object->string.pointer,
+                           return_object->buffer.pointer, length);
+
+               /* Install the new return object */
+
+               acpi_ut_remove_reference(return_object);
+               *return_object_ptr = new_object;
+
+               /*
+                * If the object is a package element, we need to:
+                * 1. Decrement the reference count of the orignal object, it was
+                *    incremented when building the package
+                * 2. Increment the reference count of the new object, it will be
+                *    decremented when releasing the package
+                */
+               if (package_index != ACPI_NOT_PACKAGE) {
+                       acpi_ut_remove_reference(return_object);
+                       acpi_ut_add_reference(new_object);
+               }
+               return (AE_OK);
+
+       default:
+               break;
+       }
+
+       return (AE_AML_OPERAND_TYPE);
+}
similarity index 99%
rename from drivers/acpi/namespace/nssearch.c
rename to drivers/acpi/acpica/nssearch.c
index a9a80bf811b3ecca3239006a41e546b6ce1973de..6fea13f3f52dbf88a7ac664f63cc1bc0a47f99b5 100644 (file)
@@ -42,7 +42,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acnamesp.h>
+#include "accommon.h"
+#include "acnamesp.h"
 
 #define _COMPONENT          ACPI_NAMESPACE
 ACPI_MODULE_NAME("nssearch")
similarity index 98%
rename from drivers/acpi/namespace/nsutils.c
rename to drivers/acpi/acpica/nsutils.c
index b0817e1127b105c15108ae5055240008b3a0ec6d..3e1149bf4aa5838259bc0161621dbf9c36c8d65b 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acnamesp.h>
-#include <acpi/amlcode.h>
-#include <acpi/actables.h>
+#include "accommon.h"
+#include "acnamesp.h"
+#include "amlcode.h"
+#include "actables.h"
 
 #define _COMPONENT          ACPI_NAMESPACE
 ACPI_MODULE_NAME("nsutils")
@@ -314,9 +315,15 @@ void acpi_ns_get_internal_name_length(struct acpi_namestring_info *info)
         *
         * strlen() + 1 covers the first name_seg, which has no path separator
         */
-       if (acpi_ns_valid_root_prefix(next_external_char[0])) {
+       if (acpi_ns_valid_root_prefix(*next_external_char)) {
                info->fully_qualified = TRUE;
                next_external_char++;
+
+               /* Skip redundant root_prefix, like \\_SB.PCI0.SBRG.EC0 */
+
+               while (acpi_ns_valid_root_prefix(*next_external_char)) {
+                       next_external_char++;
+               }
        } else {
                /*
                 * Handle Carat prefixes
similarity index 99%
rename from drivers/acpi/namespace/nswalk.c
rename to drivers/acpi/acpica/nswalk.c
index 3c905ce26d7d209d93b0b28242fc79b851a18bc7..200895fa272886a4b24a70191ea87894b486499d 100644 (file)
@@ -42,7 +42,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acnamesp.h>
+#include "accommon.h"
+#include "acnamesp.h"
 
 #define _COMPONENT          ACPI_NAMESPACE
 ACPI_MODULE_NAME("nswalk")
similarity index 99%
rename from drivers/acpi/namespace/nsxfeval.c
rename to drivers/acpi/acpica/nsxfeval.c
index a085cc39c055703bea5b144f01fb5db3478cff7e..22a7171ac1ed5888d0642e4ba20315d5b0a61d2a 100644 (file)
@@ -43,8 +43,9 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acnamesp.h>
-#include <acpi/acinterp.h>
+#include "accommon.h"
+#include "acnamesp.h"
+#include "acinterp.h"
 
 #define _COMPONENT          ACPI_NAMESPACE
 ACPI_MODULE_NAME("nsxfeval")
similarity index 99%
rename from drivers/acpi/namespace/nsxfname.c
rename to drivers/acpi/acpica/nsxfname.c
index 5efa4e7ddb0b18088f8cf68a34ba262f9e8aa677..9589fea2499790bc4fc989baeb3700d49137390e 100644 (file)
@@ -43,7 +43,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acnamesp.h>
+#include "accommon.h"
+#include "acnamesp.h"
 
 #define _COMPONENT          ACPI_NAMESPACE
 ACPI_MODULE_NAME("nsxfname")
similarity index 99%
rename from drivers/acpi/namespace/nsxfobj.c
rename to drivers/acpi/acpica/nsxfobj.c
index 2b375ee80cef794f835e699b2ac61330a45751de..1c7efc15225f6a63dcf4fc5e8ff763bbe8f7e327 100644 (file)
@@ -43,7 +43,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acnamesp.h>
+#include "accommon.h"
+#include "acnamesp.h"
 
 #define _COMPONENT          ACPI_NAMESPACE
 ACPI_MODULE_NAME("nsxfobj")
similarity index 99%
rename from drivers/acpi/parser/psargs.c
rename to drivers/acpi/acpica/psargs.c
index d830b29b85b120ceb87f793f4ddde61db98fbd4f..b161f3544b51eaa82ab98350350b155f0669cf68 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acparser.h>
-#include <acpi/amlcode.h>
-#include <acpi/acnamesp.h>
-#include <acpi/acdispat.h>
+#include "accommon.h"
+#include "acparser.h"
+#include "amlcode.h"
+#include "acnamesp.h"
+#include "acdispat.h"
 
 #define _COMPONENT          ACPI_PARSER
 ACPI_MODULE_NAME("psargs")
similarity index 99%
rename from drivers/acpi/parser/psloop.c
rename to drivers/acpi/acpica/psloop.c
index 4647039a0d8a2c7183f1cc25653a673cf7657ff4..c5f6ce19a4019ae87c683f07cc0fbc1ee3b4563d 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acparser.h>
-#include <acpi/acdispat.h>
-#include <acpi/amlcode.h>
+#include "accommon.h"
+#include "acparser.h"
+#include "acdispat.h"
+#include "amlcode.h"
 
 #define _COMPONENT          ACPI_PARSER
 ACPI_MODULE_NAME("psloop")
similarity index 99%
rename from drivers/acpi/parser/psopcode.c
rename to drivers/acpi/acpica/psopcode.c
index f425ab30eae83b05fabe07ef7a9ff4ef23e5dabd..3bc3a60194d61cdd91ee3b60def0e67377aa6212 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acparser.h>
-#include <acpi/acopcode.h>
-#include <acpi/amlcode.h>
+#include "accommon.h"
+#include "acparser.h"
+#include "acopcode.h"
+#include "amlcode.h"
 
 #define _COMPONENT          ACPI_PARSER
 ACPI_MODULE_NAME("psopcode")
similarity index 97%
rename from drivers/acpi/parser/psparse.c
rename to drivers/acpi/acpica/psparse.c
index 68e932f215ea5ef73c407a241a4d11d3367897fa..70838e9b608ccb62cf2310f8a3a4c33dced77883 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acparser.h>
-#include <acpi/acdispat.h>
-#include <acpi/amlcode.h>
-#include <acpi/acnamesp.h>
-#include <acpi/acinterp.h>
+#include "accommon.h"
+#include "acparser.h"
+#include "acdispat.h"
+#include "amlcode.h"
+#include "acnamesp.h"
+#include "acinterp.h"
 
 #define _COMPONENT          ACPI_PARSER
 ACPI_MODULE_NAME("psparse")
@@ -447,10 +448,22 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state)
                          walk_state, walk_state->parser_state.aml,
                          walk_state->parser_state.aml_size));
 
+       if (!walk_state->parser_state.aml) {
+               return_ACPI_STATUS(AE_NULL_OBJECT);
+       }
+
        /* Create and initialize a new thread state */
 
        thread = acpi_ut_create_thread_state();
        if (!thread) {
+               if (walk_state->method_desc) {
+
+                       /* Executing a control method - additional cleanup */
+
+                       acpi_ds_terminate_control_method(
+                               walk_state->method_desc, walk_state);
+               }
+
                acpi_ds_delete_walk_state(walk_state);
                return_ACPI_STATUS(AE_NO_MEMORY);
        }
similarity index 99%
rename from drivers/acpi/parser/psscope.c
rename to drivers/acpi/acpica/psscope.c
index ee50e67c94431d28d9cd7052ce6ada8a92af020e..2feca5ca95811caf12ca6957ee6f0a9fee2ca918 100644 (file)
@@ -42,7 +42,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acparser.h>
+#include "accommon.h"
+#include "acparser.h"
 
 #define _COMPONENT          ACPI_PARSER
 ACPI_MODULE_NAME("psscope")
similarity index 99%
rename from drivers/acpi/parser/pstree.c
rename to drivers/acpi/acpica/pstree.c
index 1dd355ddd182da6b2a903b3579589e23564cb35d..4d3389118ec3b481edab739987352d629de53e17 100644 (file)
@@ -42,8 +42,9 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acparser.h>
-#include <acpi/amlcode.h>
+#include "accommon.h"
+#include "acparser.h"
+#include "amlcode.h"
 
 #define _COMPONENT          ACPI_PARSER
 ACPI_MODULE_NAME("pstree")
similarity index 99%
rename from drivers/acpi/parser/psutils.c
rename to drivers/acpi/acpica/psutils.c
index 7cf1f65cd5bb833a9c328b94ba27fecb0a57af53..e636e078ad3deb7edd07259df902b5f4bb2618e5 100644 (file)
@@ -42,8 +42,9 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acparser.h>
-#include <acpi/amlcode.h>
+#include "accommon.h"
+#include "acparser.h"
+#include "amlcode.h"
 
 #define _COMPONENT          ACPI_PARSER
 ACPI_MODULE_NAME("psutils")
similarity index 98%
rename from drivers/acpi/parser/pswalk.c
rename to drivers/acpi/acpica/pswalk.c
index 8b86ad5a3201395e47be1801c6721e087f7a8aae..78b8b791f2ae4c3473cbabd111a6bcb881ce7917 100644 (file)
@@ -42,7 +42,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acparser.h>
+#include "accommon.h"
+#include "acparser.h"
 
 #define _COMPONENT          ACPI_PARSER
 ACPI_MODULE_NAME("pswalk")
similarity index 90%
rename from drivers/acpi/parser/psxface.c
rename to drivers/acpi/acpica/psxface.c
index 270469aae8429201df4edfae11db91d8c5628133..ff06032c0f061eb0fba27442a13fe5dbb559c214 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acparser.h>
-#include <acpi/acdispat.h>
-#include <acpi/acinterp.h>
+#include "accommon.h"
+#include "acparser.h"
+#include "acdispat.h"
+#include "acinterp.h"
+#include "amlcode.h"
 
 #define _COMPONENT          ACPI_PARSER
 ACPI_MODULE_NAME("psxface")
@@ -278,6 +280,38 @@ acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info)
                goto cleanup;
        }
 
+       /* Invoke an internal method if necessary */
+
+       if (info->obj_desc->method.method_flags & AML_METHOD_INTERNAL_ONLY) {
+               status = info->obj_desc->method.implementation(walk_state);
+               info->return_object = walk_state->return_desc;
+
+               /* Cleanup states */
+
+               acpi_ds_scope_stack_clear(walk_state);
+               acpi_ps_cleanup_scope(&walk_state->parser_state);
+               acpi_ds_terminate_control_method(walk_state->method_desc,
+                                                walk_state);
+               acpi_ds_delete_walk_state(walk_state);
+               goto cleanup;
+       }
+
+       /*
+        * Start method evaluation with an implicit return of zero.
+        * This is done for Windows compatibility.
+        */
+       if (acpi_gbl_enable_interpreter_slack) {
+               walk_state->implicit_return_obj =
+                   acpi_ut_create_internal_object(ACPI_TYPE_INTEGER);
+               if (!walk_state->implicit_return_obj) {
+                       status = AE_NO_MEMORY;
+                       acpi_ds_delete_walk_state(walk_state);
+                       goto cleanup;
+               }
+
+               walk_state->implicit_return_obj->integer.value = 0;
+       }
+
        /* Parse the AML */
 
        status = acpi_ps_parse_aml(walk_state);
similarity index 99%
rename from drivers/acpi/resources/rsaddr.c
rename to drivers/acpi/acpica/rsaddr.c
index 7f96332822bf2cff8bab0a3a88d1ed1c19c7329a..1e437bfd8db5c3a1f0e95473d18cec813b673999 100644 (file)
@@ -42,7 +42,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acresrc.h>
+#include "accommon.h"
+#include "acresrc.h"
 
 #define _COMPONENT          ACPI_RESOURCES
 ACPI_MODULE_NAME("rsaddr")
similarity index 99%
rename from drivers/acpi/resources/rscalc.c
rename to drivers/acpi/acpica/rscalc.c
index 8eaaecf9200939ea4cb72b9a2f9842e4b80af5a7..52865ee6bc773824065fd9fe2152baafd684fbbb 100644 (file)
@@ -42,8 +42,9 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acresrc.h>
-#include <acpi/acnamesp.h>
+#include "accommon.h"
+#include "acresrc.h"
+#include "acnamesp.h"
 
 #define _COMPONENT          ACPI_RESOURCES
 ACPI_MODULE_NAME("rscalc")
similarity index 99%
rename from drivers/acpi/resources/rscreate.c
rename to drivers/acpi/acpica/rscreate.c
index c0bbfa2c419319f92d9f561a98afe0eabb296971..9eb3a2a6840854fa0fcef1f8d1a1ad89fe72c221 100644 (file)
@@ -42,8 +42,9 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acresrc.h>
-#include <acpi/acnamesp.h>
+#include "accommon.h"
+#include "acresrc.h"
+#include "acnamesp.h"
 
 #define _COMPONENT          ACPI_RESOURCES
 ACPI_MODULE_NAME("rscreate")
similarity index 99%
rename from drivers/acpi/resources/rsdump.c
rename to drivers/acpi/acpica/rsdump.c
index 6bbbb7b8941a4f77a8456dc308f62f1625670934..3f0ca5a12d345f870cd7c9d3adddce5c6e9f5fae 100644 (file)
@@ -42,7 +42,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acresrc.h>
+#include "accommon.h"
+#include "acresrc.h"
 
 #define _COMPONENT          ACPI_RESOURCES
 ACPI_MODULE_NAME("rsdump")
similarity index 99%
rename from drivers/acpi/resources/rsinfo.c
rename to drivers/acpi/acpica/rsinfo.c
index 3f0a1fedbe0ec96a0671f25e4a343f1df07f9dec..77b25fdb459c1e5036026854ed710f28363e21c9 100644 (file)
@@ -42,7 +42,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acresrc.h>
+#include "accommon.h"
+#include "acresrc.h"
 
 #define _COMPONENT          ACPI_RESOURCES
 ACPI_MODULE_NAME("rsinfo")
similarity index 99%
rename from drivers/acpi/resources/rsio.c
rename to drivers/acpi/acpica/rsio.c
index b66d42e7402e4430a7f85f951e2b57bafcf8f934..35a49aa956096c8d0d5bf8cb9e4e4c4bab9bdb72 100644 (file)
@@ -42,7 +42,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acresrc.h>
+#include "accommon.h"
+#include "acresrc.h"
 
 #define _COMPONENT          ACPI_RESOURCES
 ACPI_MODULE_NAME("rsio")
similarity index 99%
rename from drivers/acpi/resources/rsirq.c
rename to drivers/acpi/acpica/rsirq.c
index a8805efc036658d4622dac5dadfb631fcd6493a6..2e0256983aa60b7edf6ee5a21ad1e5896a8e0902 100644 (file)
@@ -42,7 +42,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acresrc.h>
+#include "accommon.h"
+#include "acresrc.h"
 
 #define _COMPONENT          ACPI_RESOURCES
 ACPI_MODULE_NAME("rsirq")
similarity index 99%
rename from drivers/acpi/resources/rslist.c
rename to drivers/acpi/acpica/rslist.c
index b78c7e797a1955ad8be12526d7657d926d98e237..1b1dbc69f08719921cd58a1ff0eb20b0a57ff97f 100644 (file)
@@ -42,7 +42,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acresrc.h>
+#include "accommon.h"
+#include "acresrc.h"
 
 #define _COMPONENT          ACPI_RESOURCES
 ACPI_MODULE_NAME("rslist")
similarity index 99%
rename from drivers/acpi/resources/rsmemory.c
rename to drivers/acpi/acpica/rsmemory.c
index 63b21abd90bb42c994a43b7895519344cabad853..ddc76cebdc925c7457ee4632c327caa2a325bb1c 100644 (file)
@@ -42,7 +42,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acresrc.h>
+#include "accommon.h"
+#include "acresrc.h"
 
 #define _COMPONENT          ACPI_RESOURCES
 ACPI_MODULE_NAME("rsmemory")
similarity index 99%
rename from drivers/acpi/resources/rsmisc.c
rename to drivers/acpi/acpica/rsmisc.c
index 96a6c0353255fed289e059dab481624f651681a3..5bc49a553284bd3abb7804e73cce1a5bb7e84727 100644 (file)
@@ -42,7 +42,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acresrc.h>
+#include "accommon.h"
+#include "acresrc.h"
 
 #define _COMPONENT          ACPI_RESOURCES
 ACPI_MODULE_NAME("rsmisc")
similarity index 99%
rename from drivers/acpi/resources/rsutils.c
rename to drivers/acpi/acpica/rsutils.c
index f7b3bcd59ba788e341c9b5aca199a108aeed873b..bc03d59668298df64502fa3292d22a7e18b25820 100644 (file)
@@ -42,8 +42,9 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acnamesp.h>
-#include <acpi/acresrc.h>
+#include "accommon.h"
+#include "acnamesp.h"
+#include "acresrc.h"
 
 #define _COMPONENT          ACPI_RESOURCES
 ACPI_MODULE_NAME("rsutils")
similarity index 99%
rename from drivers/acpi/resources/rsxface.c
rename to drivers/acpi/acpica/rsxface.c
index f59f4c4e034c023c46f99691b09404698b4c8918..69a2aa5b5d831ae83ac0ba901732a121f918ad16 100644 (file)
@@ -42,8 +42,9 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acresrc.h>
-#include <acpi/acnamesp.h>
+#include "accommon.h"
+#include "acresrc.h"
+#include "acnamesp.h"
 
 #define _COMPONENT          ACPI_RESOURCES
 ACPI_MODULE_NAME("rsxface")
similarity index 67%
rename from drivers/acpi/tables/tbfadt.c
rename to drivers/acpi/acpica/tbfadt.c
index 2817158fb6a1b7cd8f2b2ad01f522e19af67b9f1..3636e4f8fb7331e66f6b59f6aa059b9b820fb620 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/actables.h>
+#include "accommon.h"
+#include "actables.h"
 
 #define _COMPONENT          ACPI_TABLES
 ACPI_MODULE_NAME("tbfadt")
 
 /* Local prototypes */
-static void inline
+static inline void
 acpi_tb_init_generic_address(struct acpi_generic_address *generic_address,
-                            u8 byte_width, u64 address);
+                            u8 space_id, u8 byte_width, u64 address);
 
 static void acpi_tb_convert_fadt(void);
 
@@ -60,9 +61,10 @@ static void acpi_tb_validate_fadt(void);
 
 typedef struct acpi_fadt_info {
        char *name;
-       u8 target;
-       u8 source;
+       u8 address64;
+       u8 address32;
        u8 length;
+       u8 default_length;
        u8 type;
 
 } acpi_fadt_info;
@@ -71,37 +73,61 @@ typedef struct acpi_fadt_info {
 #define ACPI_FADT_SEPARATE_LENGTH   2
 
 static struct acpi_fadt_info fadt_info_table[] = {
-       {"Pm1aEventBlock", ACPI_FADT_OFFSET(xpm1a_event_block),
+       {"Pm1aEventBlock",
+        ACPI_FADT_OFFSET(xpm1a_event_block),
         ACPI_FADT_OFFSET(pm1a_event_block),
-        ACPI_FADT_OFFSET(pm1_event_length), ACPI_FADT_REQUIRED},
+        ACPI_FADT_OFFSET(pm1_event_length),
+        ACPI_PM1_REGISTER_WIDTH * 2,   /* Enable + Status register */
+        ACPI_FADT_REQUIRED},
 
-       {"Pm1bEventBlock", ACPI_FADT_OFFSET(xpm1b_event_block),
+       {"Pm1bEventBlock",
+        ACPI_FADT_OFFSET(xpm1b_event_block),
         ACPI_FADT_OFFSET(pm1b_event_block),
-        ACPI_FADT_OFFSET(pm1_event_length), 0},
+        ACPI_FADT_OFFSET(pm1_event_length),
+        ACPI_PM1_REGISTER_WIDTH * 2,   /* Enable + Status register */
+        0},
 
-       {"Pm1aControlBlock", ACPI_FADT_OFFSET(xpm1a_control_block),
+       {"Pm1aControlBlock",
+        ACPI_FADT_OFFSET(xpm1a_control_block),
         ACPI_FADT_OFFSET(pm1a_control_block),
-        ACPI_FADT_OFFSET(pm1_control_length), ACPI_FADT_REQUIRED},
+        ACPI_FADT_OFFSET(pm1_control_length),
+        ACPI_PM1_REGISTER_WIDTH,
+        ACPI_FADT_REQUIRED},
 
-       {"Pm1bControlBlock", ACPI_FADT_OFFSET(xpm1b_control_block),
+       {"Pm1bControlBlock",
+        ACPI_FADT_OFFSET(xpm1b_control_block),
         ACPI_FADT_OFFSET(pm1b_control_block),
-        ACPI_FADT_OFFSET(pm1_control_length), 0},
+        ACPI_FADT_OFFSET(pm1_control_length),
+        ACPI_PM1_REGISTER_WIDTH,
+        0},
 
-       {"Pm2ControlBlock", ACPI_FADT_OFFSET(xpm2_control_block),
+       {"Pm2ControlBlock",
+        ACPI_FADT_OFFSET(xpm2_control_block),
         ACPI_FADT_OFFSET(pm2_control_block),
-        ACPI_FADT_OFFSET(pm2_control_length), ACPI_FADT_SEPARATE_LENGTH},
+        ACPI_FADT_OFFSET(pm2_control_length),
+        ACPI_PM2_REGISTER_WIDTH,
+        ACPI_FADT_SEPARATE_LENGTH},
 
-       {"PmTimerBlock", ACPI_FADT_OFFSET(xpm_timer_block),
+       {"PmTimerBlock",
+        ACPI_FADT_OFFSET(xpm_timer_block),
         ACPI_FADT_OFFSET(pm_timer_block),
-        ACPI_FADT_OFFSET(pm_timer_length), ACPI_FADT_REQUIRED},
+        ACPI_FADT_OFFSET(pm_timer_length),
+        ACPI_PM_TIMER_WIDTH,
+        ACPI_FADT_REQUIRED},
 
-       {"Gpe0Block", ACPI_FADT_OFFSET(xgpe0_block),
+       {"Gpe0Block",
+        ACPI_FADT_OFFSET(xgpe0_block),
         ACPI_FADT_OFFSET(gpe0_block),
-        ACPI_FADT_OFFSET(gpe0_block_length), ACPI_FADT_SEPARATE_LENGTH},
+        ACPI_FADT_OFFSET(gpe0_block_length),
+        0,
+        ACPI_FADT_SEPARATE_LENGTH},
 
-       {"Gpe1Block", ACPI_FADT_OFFSET(xgpe1_block),
+       {"Gpe1Block",
+        ACPI_FADT_OFFSET(xgpe1_block),
         ACPI_FADT_OFFSET(gpe1_block),
-        ACPI_FADT_OFFSET(gpe1_block_length), ACPI_FADT_SEPARATE_LENGTH}
+        ACPI_FADT_OFFSET(gpe1_block_length),
+        0,
+        ACPI_FADT_SEPARATE_LENGTH}
 };
 
 #define ACPI_FADT_INFO_ENTRIES        (sizeof (fadt_info_table) / sizeof (struct acpi_fadt_info))
@@ -122,9 +148,9 @@ static struct acpi_fadt_info fadt_info_table[] = {
  *
  ******************************************************************************/
 
-static void inline
+static inline void
 acpi_tb_init_generic_address(struct acpi_generic_address *generic_address,
-                            u8 byte_width, u64 address)
+                            u8 space_id, u8 byte_width, u64 address)
 {
 
        /*
@@ -135,10 +161,10 @@ acpi_tb_init_generic_address(struct acpi_generic_address *generic_address,
 
        /* All other fields are byte-wide */
 
-       generic_address->space_id = ACPI_ADR_SPACE_SYSTEM_IO;
-       generic_address->bit_width = byte_width << 3;
+       generic_address->space_id = space_id;
+       generic_address->bit_width = (u8)ACPI_MUL_8(byte_width);
        generic_address->bit_offset = 0;
-       generic_address->access_width = 0;
+       generic_address->access_width = 0;      /* Access width ANY */
 }
 
 /*******************************************************************************
@@ -225,7 +251,8 @@ void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length)
         */
        if (length > sizeof(struct acpi_table_fadt)) {
                ACPI_WARNING((AE_INFO,
-                             "FADT (revision %u) is longer than ACPI 2.0 version, truncating length 0x%X to 0x%zX",
+                             "FADT (revision %u) is longer than ACPI 2.0 version, "
+                             "truncating length 0x%X to 0x%zX",
                              table->revision, (unsigned)length,
                              sizeof(struct acpi_table_fadt)));
        }
@@ -244,7 +271,6 @@ void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length)
         * 2) Validate some of the important values within the FADT
         */
        acpi_tb_convert_fadt();
-       acpi_tb_validate_fadt();
 }
 
 /*******************************************************************************
@@ -278,22 +304,36 @@ void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length)
 
 static void acpi_tb_convert_fadt(void)
 {
-       u8 pm1_register_length;
-       struct acpi_generic_address *target;
+       u8 pm1_register_bit_width;
+       u8 pm1_register_byte_width;
+       struct acpi_generic_address *target64;
        u32 i;
 
        /* Update the local FADT table header length */
 
        acpi_gbl_FADT.header.length = sizeof(struct acpi_table_fadt);
 
-       /* Expand the 32-bit FACS and DSDT addresses to 64-bit as necessary */
-
+       /*
+        * Expand the 32-bit FACS and DSDT addresses to 64-bit as necessary.
+        * Later code will always use the X 64-bit field. Also, check for an
+        * address mismatch between the 32-bit and 64-bit address fields
+        * (FIRMWARE_CTRL/X_FIRMWARE_CTRL, DSDT/X_DSDT) which would indicate
+        * the presence of two FACS or two DSDT tables.
+        */
        if (!acpi_gbl_FADT.Xfacs) {
                acpi_gbl_FADT.Xfacs = (u64) acpi_gbl_FADT.facs;
+       } else if (acpi_gbl_FADT.facs &&
+                  (acpi_gbl_FADT.Xfacs != (u64) acpi_gbl_FADT.facs)) {
+               ACPI_WARNING((AE_INFO,
+                   "32/64 FACS address mismatch in FADT - two FACS tables!"));
        }
 
        if (!acpi_gbl_FADT.Xdsdt) {
                acpi_gbl_FADT.Xdsdt = (u64) acpi_gbl_FADT.dsdt;
+       } else if (acpi_gbl_FADT.dsdt &&
+                  (acpi_gbl_FADT.Xdsdt != (u64) acpi_gbl_FADT.dsdt)) {
+               ACPI_WARNING((AE_INFO,
+                   "32/64 DSDT address mismatch in FADT - two DSDT tables!"));
        }
 
        /*
@@ -312,18 +352,23 @@ static void acpi_tb_convert_fadt(void)
        }
 
        /*
-        * Expand the ACPI 1.0 32-bit V1.0 addresses to the ACPI 2.0 64-bit "X"
-        * generic address structures as necessary.
+        * Expand the ACPI 1.0 32-bit addresses to the ACPI 2.0 64-bit "X"
+        * generic address structures as necessary. Later code will always use
+        * the 64-bit address structures.
         */
        for (i = 0; i < ACPI_FADT_INFO_ENTRIES; i++) {
-               target =
+               target64 =
                    ACPI_ADD_PTR(struct acpi_generic_address, &acpi_gbl_FADT,
-                                fadt_info_table[i].target);
+                                fadt_info_table[i].address64);
 
-               /* Expand only if the X target is null */
+               /* Expand only if the 64-bit X target is null */
 
-               if (!target->address) {
-                       acpi_tb_init_generic_address(target,
+               if (!target64->address) {
+
+                       /* The space_id is always I/O for the 32-bit legacy address fields */
+
+                       acpi_tb_init_generic_address(target64,
+                                                    ACPI_ADR_SPACE_SYSTEM_IO,
                                                     *ACPI_ADD_PTR(u8,
                                                                   &acpi_gbl_FADT,
                                                                   fadt_info_table
@@ -332,10 +377,63 @@ static void acpi_tb_convert_fadt(void)
                                                                          &acpi_gbl_FADT,
                                                                          fadt_info_table
                                                                          [i].
-                                                                         source));
+                                                                         address32));
+               }
+       }
+
+       /* Validate FADT values now, before we make any changes */
+
+       acpi_tb_validate_fadt();
+
+       /*
+        * Optionally check all register lengths against the default values and
+        * update them if they are incorrect.
+        */
+       if (acpi_gbl_use_default_register_widths) {
+               for (i = 0; i < ACPI_FADT_INFO_ENTRIES; i++) {
+                       target64 =
+                           ACPI_ADD_PTR(struct acpi_generic_address,
+                                        &acpi_gbl_FADT,
+                                        fadt_info_table[i].address64);
+
+                       /*
+                        * If a valid register (Address != 0) and the (default_length > 0)
+                        * (Not a GPE register), then check the width against the default.
+                        */
+                       if ((target64->address) &&
+                           (fadt_info_table[i].default_length > 0) &&
+                           (fadt_info_table[i].default_length !=
+                            target64->bit_width)) {
+                               ACPI_WARNING((AE_INFO,
+                                             "Invalid length for %s: %d, using default %d",
+                                             fadt_info_table[i].name,
+                                             target64->bit_width,
+                                             fadt_info_table[i].
+                                             default_length));
+
+                               /* Incorrect size, set width to the default */
+
+                               target64->bit_width =
+                                   fadt_info_table[i].default_length;
+                       }
                }
        }
 
+       /*
+        * Get the length of the individual PM1 registers (enable and status).
+        * Each register is defined to be (event block length / 2).
+        */
+       pm1_register_bit_width =
+           (u8)ACPI_DIV_2(acpi_gbl_FADT.xpm1a_event_block.bit_width);
+       pm1_register_byte_width = (u8)ACPI_DIV_8(pm1_register_bit_width);
+
+       /*
+        * Adjust the lengths of the PM1 Event Blocks so that they can be used to
+        * access the PM1 status register(s). Use (width / 2)
+        */
+       acpi_gbl_FADT.xpm1a_event_block.bit_width = pm1_register_bit_width;
+       acpi_gbl_FADT.xpm1b_event_block.bit_width = pm1_register_bit_width;
+
        /*
         * Calculate separate GAS structs for the PM1 Enable registers.
         * These addresses do not appear (directly) in the FADT, so it is
@@ -356,14 +454,14 @@ static void acpi_tb_convert_fadt(void)
                       " PM1_EVT_LEN (%u)\n",
                       acpi_gbl_FADT.xpm1a_event_block.bit_width,
                       acpi_gbl_FADT.pm1_event_length);
-       pm1_register_length = (u8) ACPI_DIV_2(acpi_gbl_FADT.pm1_event_length);
 
        /* The PM1A register block is required */
 
        acpi_tb_init_generic_address(&acpi_gbl_xpm1a_enable,
-                                    pm1_register_length,
+                                    acpi_gbl_FADT.xpm1a_event_block.space_id,
+                                    pm1_register_byte_width,
                                     (acpi_gbl_FADT.xpm1a_event_block.address +
-                                     pm1_register_length));
+                                     pm1_register_byte_width));
        /* Don't forget to copy space_id of the GAS */
        acpi_gbl_xpm1a_enable.space_id =
            acpi_gbl_FADT.xpm1a_event_block.space_id;
@@ -379,9 +477,10 @@ static void acpi_tb_convert_fadt(void)
                               acpi_gbl_FADT.xpm1b_event_block.bit_width,
                               acpi_gbl_FADT.pm1_event_length);
                acpi_tb_init_generic_address(&acpi_gbl_xpm1b_enable,
-                                            pm1_register_length,
+                                            acpi_gbl_FADT.xpm1b_event_block.space_id,
+                                            pm1_register_byte_width,
                                             (acpi_gbl_FADT.xpm1b_event_block.
-                                             address + pm1_register_length));
+                                             address + pm1_register_byte_width));
                /* Don't forget to copy space_id of the GAS */
                acpi_gbl_xpm1b_enable.space_id =
                    acpi_gbl_FADT.xpm1b_event_block.space_id;
@@ -411,26 +510,63 @@ static void acpi_tb_convert_fadt(void)
 
 static void acpi_tb_validate_fadt(void)
 {
+       char *name;
        u32 *address32;
        struct acpi_generic_address *address64;
        u8 length;
        u32 i;
 
-       /* Examine all of the 64-bit extended address fields (X fields) */
+       /*
+        * Check for FACS and DSDT address mismatches. An address mismatch between
+        * the 32-bit and 64-bit address fields (FIRMWARE_CTRL/X_FIRMWARE_CTRL and
+        * DSDT/X_DSDT) would indicate the presence of two FACS or two DSDT tables.
+        */
+       if (acpi_gbl_FADT.facs &&
+           (acpi_gbl_FADT.Xfacs != (u64) acpi_gbl_FADT.facs)) {
+               ACPI_WARNING((AE_INFO,
+                             "32/64X FACS address mismatch in FADT - "
+                             "two FACS tables! %8.8X/%8.8X%8.8X",
+                             acpi_gbl_FADT.facs,
+                             ACPI_FORMAT_UINT64(acpi_gbl_FADT.Xfacs)));
+       }
 
-       for (i = 0; i < ACPI_FADT_INFO_ENTRIES; i++) {
+       if (acpi_gbl_FADT.dsdt &&
+           (acpi_gbl_FADT.Xdsdt != (u64) acpi_gbl_FADT.dsdt)) {
+               ACPI_WARNING((AE_INFO,
+                             "32/64X DSDT address mismatch in FADT - "
+                             "two DSDT tables! %8.8X/%8.8X%8.8X",
+                             acpi_gbl_FADT.dsdt,
+                             ACPI_FORMAT_UINT64(acpi_gbl_FADT.Xdsdt)));
+       }
 
-               /* Generate pointers to the 32-bit and 64-bit addresses and get the length */
+       /* Examine all of the 64-bit extended address fields (X fields) */
 
-               address64 =
-                   ACPI_ADD_PTR(struct acpi_generic_address, &acpi_gbl_FADT,
-                                fadt_info_table[i].target);
+       for (i = 0; i < ACPI_FADT_INFO_ENTRIES; i++) {
+               /*
+                * Generate pointers to the 32-bit and 64-bit addresses, get the
+                * register length (width), and the register name
+                */
+               address64 = ACPI_ADD_PTR(struct acpi_generic_address,
+                                        &acpi_gbl_FADT,
+                                        fadt_info_table[i].address64);
                address32 =
                    ACPI_ADD_PTR(u32, &acpi_gbl_FADT,
-                                fadt_info_table[i].source);
+                                fadt_info_table[i].address32);
                length =
                    *ACPI_ADD_PTR(u8, &acpi_gbl_FADT,
                                  fadt_info_table[i].length);
+               name = fadt_info_table[i].name;
+
+               /*
+                * For each extended field, check for length mismatch between the
+                * legacy length field and the corresponding 64-bit X length field.
+                */
+               if (address64 && (address64->bit_width != ACPI_MUL_8(length))) {
+                       ACPI_WARNING((AE_INFO,
+                                     "32/64X length mismatch in %s: %d/%d",
+                                     name, ACPI_MUL_8(length),
+                                     address64->bit_width));
+               }
 
                if (fadt_info_table[i].type & ACPI_FADT_REQUIRED) {
                        /*
@@ -439,8 +575,8 @@ static void acpi_tb_validate_fadt(void)
                         */
                        if (!address64->address || !length) {
                                ACPI_ERROR((AE_INFO,
-                                           "Required field \"%s\" has zero address and/or length: %8.8X%8.8X/%X",
-                                           fadt_info_table[i].name,
+                                           "Required field %s has zero address and/or length: %8.8X%8.8X/%X",
+                                           name,
                                            ACPI_FORMAT_UINT64(address64->
                                                               address),
                                            length));
@@ -453,8 +589,8 @@ static void acpi_tb_validate_fadt(void)
                        if ((address64->address && !length)
                            || (!address64->address && length)) {
                                ACPI_WARNING((AE_INFO,
-                                             "Optional field \"%s\" has zero address or length: %8.8X%8.8X/%X",
-                                             fadt_info_table[i].name,
+                                             "Optional field %s has zero address or length: %8.8X%8.8X/%X",
+                                             name,
                                              ACPI_FORMAT_UINT64(address64->
                                                                 address),
                                              length));
@@ -466,8 +602,8 @@ static void acpi_tb_validate_fadt(void)
                if (address64->address && *address32 &&
                    (address64->address != (u64) * address32)) {
                        ACPI_ERROR((AE_INFO,
-                                   "32/64X address mismatch in \"%s\": [%8.8X] [%8.8X%8.8X], using 64X",
-                                   fadt_info_table[i].name, *address32,
+                                   "32/64X address mismatch in %s: %8.8X/%8.8X%8.8X, using 64X",
+                                   name, *address32,
                                    ACPI_FORMAT_UINT64(address64->address)));
                }
        }
similarity index 99%
rename from drivers/acpi/tables/tbfind.c
rename to drivers/acpi/acpica/tbfind.c
index 531584defbb826596c742acb2b5c9a90a3b45fc1..1054dfd49207dcc51910ae1846dd2cf16a20b290 100644 (file)
@@ -42,7 +42,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/actables.h>
+#include "accommon.h"
+#include "actables.h"
 
 #define _COMPONENT          ACPI_TABLES
 ACPI_MODULE_NAME("tbfind")
similarity index 99%
rename from drivers/acpi/tables/tbinstal.c
rename to drivers/acpi/acpica/tbinstal.c
index 18747ce8dd2f2b15b83e6e5465fc8b34c8118258..37374b21969d4574c298945a869e3a714795529f 100644 (file)
@@ -42,8 +42,9 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acnamesp.h>
-#include <acpi/actables.h>
+#include "accommon.h"
+#include "acnamesp.h"
+#include "actables.h"
 
 #define _COMPONENT          ACPI_TABLES
 ACPI_MODULE_NAME("tbinstal")
similarity index 96%
rename from drivers/acpi/tables/tbutils.c
rename to drivers/acpi/acpica/tbutils.c
index 0cc92ef5236fc261a2167a5a6aa8acb9fbe43d55..3a8d8d2eee9210ee17ce21e2892b722837152f36 100644 (file)
@@ -42,7 +42,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/actables.h>
+#include "accommon.h"
+#include "actables.h"
 
 #define _COMPONENT          ACPI_TABLES
 ACPI_MODULE_NAME("tbutils")
@@ -111,6 +112,30 @@ acpi_tb_check_xsdt(acpi_physical_address address)
                return AE_OK;
 }
 
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_tb_initialize_facs
+ *
+ * PARAMETERS:  None
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Create a permanent mapping for the FADT and save it in a global
+ *              for accessing the Global Lock and Firmware Waking Vector
+ *
+ ******************************************************************************/
+
+acpi_status acpi_tb_initialize_facs(void)
+{
+       acpi_status status;
+
+       status = acpi_get_table_by_index(ACPI_TABLE_INDEX_FACS,
+                                        ACPI_CAST_INDIRECT_PTR(struct
+                                                               acpi_table_header,
+                                                               &acpi_gbl_FACS));
+       return status;
+}
+
 /*******************************************************************************
  *
  * FUNCTION:    acpi_tb_tables_loaded
similarity index 99%
rename from drivers/acpi/tables/tbxface.c
rename to drivers/acpi/acpica/tbxface.c
index fd7770aa10618e256816350fe2638b78bb9af450..c3e841f3cde924239ce34f94a75818cfc194a211 100644 (file)
@@ -43,8 +43,9 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acnamesp.h>
-#include <acpi/actables.h>
+#include "accommon.h"
+#include "acnamesp.h"
+#include "actables.h"
 
 #define _COMPONENT          ACPI_TABLES
 ACPI_MODULE_NAME("tbxface")
similarity index 99%
rename from drivers/acpi/tables/tbxfroot.c
rename to drivers/acpi/acpica/tbxfroot.c
index 2d157e0f98d2716d3965f4390fcf6db1ae60edba..b7fc8dd43341eba70c124d68a7052b9090f4fdca 100644 (file)
@@ -42,7 +42,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/actables.h>
+#include "accommon.h"
+#include "actables.h"
 
 #define _COMPONENT          ACPI_TABLES
 ACPI_MODULE_NAME("tbxfroot")
similarity index 99%
rename from drivers/acpi/utilities/utalloc.c
rename to drivers/acpi/acpica/utalloc.c
index 241c535c1753bb7f844a14805a8aaea88960e586..7580f6b3069ec5ecaf7303be5ff88eb5087683c4 100644 (file)
@@ -42,7 +42,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acdebug.h>
+#include "accommon.h"
+#include "acdebug.h"
 
 #define _COMPONENT          ACPI_UTILITIES
 ACPI_MODULE_NAME("utalloc")
similarity index 99%
rename from drivers/acpi/utilities/utcopy.c
rename to drivers/acpi/acpica/utcopy.c
index 5b2f7c27b705f2714c9fce18f997837ff8bdf6f3..b0dcfd3c872a453ef06f54950859e6e00fc7434d 100644 (file)
@@ -42,7 +42,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acnamesp.h>
+#include "accommon.h"
+#include "acnamesp.h"
 
 
 #define _COMPONENT          ACPI_UTILITIES
similarity index 89%
rename from drivers/acpi/utilities/utdebug.c
rename to drivers/acpi/acpica/utdebug.c
index fd66ecb6741e3a2675a0e2c0358192807c8b2e5e..38821f53042c34c215d6776ba6599434b3273f5f 100644 (file)
@@ -42,6 +42,7 @@
  */
 
 #include <acpi/acpi.h>
+#include "accommon.h"
 
 #define _COMPONENT          ACPI_UTILITIES
 ACPI_MODULE_NAME("utdebug")
@@ -136,7 +137,7 @@ static const char *acpi_ut_trim_function_name(const char *function_name)
 
 /*******************************************************************************
  *
- * FUNCTION:    acpi_ut_debug_print
+ * FUNCTION:    acpi_debug_print
  *
  * PARAMETERS:  requested_debug_level - Requested debug print level
  *              line_number         - Caller's line number (for error output)
@@ -154,11 +155,11 @@ static const char *acpi_ut_trim_function_name(const char *function_name)
  ******************************************************************************/
 
 void ACPI_INTERNAL_VAR_XFACE
-acpi_ut_debug_print(u32 requested_debug_level,
-                   u32 line_number,
-                   const char *function_name,
-                   const char *module_name,
-                   u32 component_id, const char *format, ...)
+acpi_debug_print(u32 requested_debug_level,
+                u32 line_number,
+                const char *function_name,
+                const char *module_name,
+                u32 component_id, const char *format, ...)
 {
        acpi_thread_id thread_id;
        va_list args;
@@ -205,11 +206,11 @@ acpi_ut_debug_print(u32 requested_debug_level,
        va_end(args);
 }
 
-ACPI_EXPORT_SYMBOL(acpi_ut_debug_print)
+ACPI_EXPORT_SYMBOL(acpi_debug_print)
 
 /*******************************************************************************
  *
- * FUNCTION:    acpi_ut_debug_print_raw
+ * FUNCTION:    acpi_debug_print_raw
  *
  * PARAMETERS:  requested_debug_level - Requested debug print level
  *              line_number         - Caller's line number
@@ -226,11 +227,11 @@ ACPI_EXPORT_SYMBOL(acpi_ut_debug_print)
  *
  ******************************************************************************/
 void ACPI_INTERNAL_VAR_XFACE
-acpi_ut_debug_print_raw(u32 requested_debug_level,
-                       u32 line_number,
-                       const char *function_name,
-                       const char *module_name,
-                       u32 component_id, const char *format, ...)
+acpi_debug_print_raw(u32 requested_debug_level,
+                    u32 line_number,
+                    const char *function_name,
+                    const char *module_name,
+                    u32 component_id, const char *format, ...)
 {
        va_list args;
 
@@ -244,7 +245,7 @@ acpi_ut_debug_print_raw(u32 requested_debug_level,
        va_end(args);
 }
 
-ACPI_EXPORT_SYMBOL(acpi_ut_debug_print_raw)
+ACPI_EXPORT_SYMBOL(acpi_debug_print_raw)
 
 /*******************************************************************************
  *
@@ -270,9 +271,9 @@ acpi_ut_trace(u32 line_number,
        acpi_gbl_nesting_level++;
        acpi_ut_track_stack_ptr();
 
-       acpi_ut_debug_print(ACPI_LV_FUNCTIONS,
-                           line_number, function_name, module_name,
-                           component_id, "%s\n", acpi_gbl_fn_entry_str);
+       acpi_debug_print(ACPI_LV_FUNCTIONS,
+                        line_number, function_name, module_name, component_id,
+                        "%s\n", acpi_gbl_fn_entry_str);
 }
 
 ACPI_EXPORT_SYMBOL(acpi_ut_trace)
@@ -301,10 +302,9 @@ acpi_ut_trace_ptr(u32 line_number,
        acpi_gbl_nesting_level++;
        acpi_ut_track_stack_ptr();
 
-       acpi_ut_debug_print(ACPI_LV_FUNCTIONS,
-                           line_number, function_name, module_name,
-                           component_id, "%s %p\n", acpi_gbl_fn_entry_str,
-                           pointer);
+       acpi_debug_print(ACPI_LV_FUNCTIONS,
+                        line_number, function_name, module_name, component_id,
+                        "%s %p\n", acpi_gbl_fn_entry_str, pointer);
 }
 
 /*******************************************************************************
@@ -333,10 +333,9 @@ acpi_ut_trace_str(u32 line_number,
        acpi_gbl_nesting_level++;
        acpi_ut_track_stack_ptr();
 
-       acpi_ut_debug_print(ACPI_LV_FUNCTIONS,
-                           line_number, function_name, module_name,
-                           component_id, "%s %s\n", acpi_gbl_fn_entry_str,
-                           string);
+       acpi_debug_print(ACPI_LV_FUNCTIONS,
+                        line_number, function_name, module_name, component_id,
+                        "%s %s\n", acpi_gbl_fn_entry_str, string);
 }
 
 /*******************************************************************************
@@ -365,10 +364,9 @@ acpi_ut_trace_u32(u32 line_number,
        acpi_gbl_nesting_level++;
        acpi_ut_track_stack_ptr();
 
-       acpi_ut_debug_print(ACPI_LV_FUNCTIONS,
-                           line_number, function_name, module_name,
-                           component_id, "%s %08X\n", acpi_gbl_fn_entry_str,
-                           integer);
+       acpi_debug_print(ACPI_LV_FUNCTIONS,
+                        line_number, function_name, module_name, component_id,
+                        "%s %08X\n", acpi_gbl_fn_entry_str, integer);
 }
 
 /*******************************************************************************
@@ -393,9 +391,9 @@ acpi_ut_exit(u32 line_number,
             const char *module_name, u32 component_id)
 {
 
-       acpi_ut_debug_print(ACPI_LV_FUNCTIONS,
-                           line_number, function_name, module_name,
-                           component_id, "%s\n", acpi_gbl_fn_exit_str);
+       acpi_debug_print(ACPI_LV_FUNCTIONS,
+                        line_number, function_name, module_name, component_id,
+                        "%s\n", acpi_gbl_fn_exit_str);
 
        acpi_gbl_nesting_level--;
 }
@@ -426,17 +424,16 @@ acpi_ut_status_exit(u32 line_number,
 {
 
        if (ACPI_SUCCESS(status)) {
-               acpi_ut_debug_print(ACPI_LV_FUNCTIONS,
-                                   line_number, function_name, module_name,
-                                   component_id, "%s %s\n",
-                                   acpi_gbl_fn_exit_str,
-                                   acpi_format_exception(status));
+               acpi_debug_print(ACPI_LV_FUNCTIONS,
+                                line_number, function_name, module_name,
+                                component_id, "%s %s\n", acpi_gbl_fn_exit_str,
+                                acpi_format_exception(status));
        } else {
-               acpi_ut_debug_print(ACPI_LV_FUNCTIONS,
-                                   line_number, function_name, module_name,
-                                   component_id, "%s ****Exception****: %s\n",
-                                   acpi_gbl_fn_exit_str,
-                                   acpi_format_exception(status));
+               acpi_debug_print(ACPI_LV_FUNCTIONS,
+                                line_number, function_name, module_name,
+                                component_id, "%s ****Exception****: %s\n",
+                                acpi_gbl_fn_exit_str,
+                                acpi_format_exception(status));
        }
 
        acpi_gbl_nesting_level--;
@@ -467,10 +464,10 @@ acpi_ut_value_exit(u32 line_number,
                   u32 component_id, acpi_integer value)
 {
 
-       acpi_ut_debug_print(ACPI_LV_FUNCTIONS,
-                           line_number, function_name, module_name,
-                           component_id, "%s %8.8X%8.8X\n",
-                           acpi_gbl_fn_exit_str, ACPI_FORMAT_UINT64(value));
+       acpi_debug_print(ACPI_LV_FUNCTIONS,
+                        line_number, function_name, module_name, component_id,
+                        "%s %8.8X%8.8X\n", acpi_gbl_fn_exit_str,
+                        ACPI_FORMAT_UINT64(value));
 
        acpi_gbl_nesting_level--;
 }
@@ -499,9 +496,9 @@ acpi_ut_ptr_exit(u32 line_number,
                 const char *module_name, u32 component_id, u8 *ptr)
 {
 
-       acpi_ut_debug_print(ACPI_LV_FUNCTIONS,
-                           line_number, function_name, module_name,
-                           component_id, "%s %p\n", acpi_gbl_fn_exit_str, ptr);
+       acpi_debug_print(ACPI_LV_FUNCTIONS,
+                        line_number, function_name, module_name, component_id,
+                        "%s %p\n", acpi_gbl_fn_exit_str, ptr);
 
        acpi_gbl_nesting_level--;
 }
similarity index 99%
rename from drivers/acpi/utilities/utdelete.c
rename to drivers/acpi/acpica/utdelete.c
index d197c6b29e170e2381e2fcd0765c4368e090121a..a0be9e39531e0d2eddab79736d0dd6b8e1e56622 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acinterp.h>
-#include <acpi/acnamesp.h>
-#include <acpi/acevents.h>
+#include "accommon.h"
+#include "acinterp.h"
+#include "acnamesp.h"
+#include "acevents.h"
 
 #define _COMPONENT          ACPI_UTILITIES
 ACPI_MODULE_NAME("utdelete")
similarity index 99%
rename from drivers/acpi/utilities/uteval.c
rename to drivers/acpi/acpica/uteval.c
index 352747e49c7a623930fd17491533a436394099ad..da9450bc60f7062e05f0f0ba385572525e5a4f23 100644 (file)
@@ -42,8 +42,9 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acnamesp.h>
-#include <acpi/acinterp.h>
+#include "accommon.h"
+#include "acnamesp.h"
+#include "acinterp.h"
 
 #define _COMPONENT          ACPI_UTILITIES
 ACPI_MODULE_NAME("uteval")
@@ -129,7 +130,7 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state)
 
                        /* The interface is supported */
 
-                       return_ACPI_STATUS(AE_CTRL_TERMINATE);
+                       return_ACPI_STATUS(AE_OK);
                }
        }
 
@@ -143,13 +144,13 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state)
 
                /* The interface is supported */
 
-               return_ACPI_STATUS(AE_CTRL_TERMINATE);
+               return_ACPI_STATUS(AE_OK);
        }
 
        /* The interface is not supported */
 
        return_desc->integer.value = 0;
-       return_ACPI_STATUS(AE_CTRL_TERMINATE);
+       return_ACPI_STATUS(AE_OK);
 }
 
 /*******************************************************************************
similarity index 99%
rename from drivers/acpi/utilities/utglobal.c
rename to drivers/acpi/acpica/utglobal.c
index 670551b95e56e44fecfc075d9cbd5255a2aebc55..a3ab9d9da29971caf16195765f2058edce83d05c 100644 (file)
 #define DEFINE_ACPI_GLOBALS
 
 #include <acpi/acpi.h>
-#include <acpi/acnamesp.h>
+#include "accommon.h"
+#include "acnamesp.h"
 
-ACPI_EXPORT_SYMBOL(acpi_gbl_FADT)
 #define _COMPONENT          ACPI_UTILITIES
-    ACPI_MODULE_NAME("utglobal")
+ACPI_MODULE_NAME("utglobal")
 
 /*******************************************************************************
  *
@@ -64,7 +64,7 @@ u32 acpi_dbg_level = ACPI_DEBUG_DEFAULT;
 
 /* Debug switch - layer (component) mask */
 
-u32 acpi_dbg_layer = ACPI_COMPONENT_DEFAULT | ACPI_ALL_DRIVERS;
+u32 acpi_dbg_layer = 0;
 u32 acpi_gbl_nesting_level = 0;
 
 /* Debugger globals */
@@ -352,7 +352,7 @@ const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] = {
        "PCI_Config",
        "EmbeddedControl",
        "SMBus",
-       "CMOS",
+       "SystemCMOS",
        "PCIBARTarget",
        "DataTable"
 };
@@ -756,6 +756,7 @@ acpi_status acpi_ut_init_globals(void)
        acpi_gbl_gpe_xrupt_list_head = NULL;
        acpi_gbl_gpe_fadt_blocks[0] = NULL;
        acpi_gbl_gpe_fadt_blocks[1] = NULL;
+       acpi_current_gpe_count = 0;
 
        /* Global handlers */
 
@@ -771,6 +772,7 @@ acpi_status acpi_ut_init_globals(void)
        acpi_gbl_global_lock_mutex = NULL;
        acpi_gbl_global_lock_acquired = FALSE;
        acpi_gbl_global_lock_handle = 0;
+       acpi_gbl_global_lock_present = FALSE;
 
        /* Miscellaneous variables */
 
@@ -815,5 +817,7 @@ acpi_status acpi_ut_init_globals(void)
        return_ACPI_STATUS(AE_OK);
 }
 
+ACPI_EXPORT_SYMBOL(acpi_gbl_FADT)
 ACPI_EXPORT_SYMBOL(acpi_dbg_level)
 ACPI_EXPORT_SYMBOL(acpi_dbg_layer)
+ACPI_EXPORT_SYMBOL(acpi_current_gpe_count)
similarity index 98%
rename from drivers/acpi/utilities/utinit.c
rename to drivers/acpi/acpica/utinit.c
index cae515fc02d318db0091f1c98591e39549c97256..a54ca84eb3625e15a6fe48fdd0b0469d6b6f5f35 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acnamesp.h>
-#include <acpi/acevents.h>
-#include <acpi/actables.h>
+#include "accommon.h"
+#include "acnamesp.h"
+#include "acevents.h"
+#include "actables.h"
 
 #define _COMPONENT          ACPI_UTILITIES
 ACPI_MODULE_NAME("utinit")
similarity index 99%
rename from drivers/acpi/utilities/utmath.c
rename to drivers/acpi/acpica/utmath.c
index c927324fdd26536a2905088397900a858208079c..c9f682d640efb05edd8ba1b4b18116328ed3ab2b 100644 (file)
@@ -42,6 +42,7 @@
  */
 
 #include <acpi/acpi.h>
+#include "accommon.h"
 
 #define _COMPONENT          ACPI_UTILITIES
 ACPI_MODULE_NAME("utmath")
similarity index 97%
rename from drivers/acpi/utilities/utmisc.c
rename to drivers/acpi/acpica/utmisc.c
index 9089a158a8740c4fd47d5b75d56c6b3d6e350e67..c1f7f4e1a72df52908944cfa49fc0d951fa32343 100644 (file)
@@ -44,7 +44,8 @@
 #include <linux/module.h>
 
 #include <acpi/acpi.h>
-#include <acpi/acnamesp.h>
+#include "accommon.h"
+#include "acnamesp.h"
 
 #define _COMPONENT          ACPI_UTILITIES
 ACPI_MODULE_NAME("utmisc")
@@ -1016,7 +1017,7 @@ acpi_ut_walk_package_tree(union acpi_operand_object * source_object,
 
 /*******************************************************************************
  *
- * FUNCTION:    acpi_ut_error, acpi_ut_warning, acpi_ut_info
+ * FUNCTION:    acpi_error, acpi_exception, acpi_warning, acpi_info
  *
  * PARAMETERS:  module_name         - Caller's module name (for error output)
  *              line_number         - Caller's line number (for error output)
@@ -1029,7 +1030,7 @@ acpi_ut_walk_package_tree(union acpi_operand_object * source_object,
  ******************************************************************************/
 
 void ACPI_INTERNAL_VAR_XFACE
-acpi_ut_error(const char *module_name, u32 line_number, const char *format, ...)
+acpi_error(const char *module_name, u32 line_number, const char *format, ...)
 {
        va_list args;
 
@@ -1042,8 +1043,8 @@ acpi_ut_error(const char *module_name, u32 line_number, const char *format, ...)
 }
 
 void ACPI_INTERNAL_VAR_XFACE
-acpi_ut_exception(const char *module_name,
-                 u32 line_number, acpi_status status, const char *format, ...)
+acpi_exception(const char *module_name,
+              u32 line_number, acpi_status status, const char *format, ...)
 {
        va_list args;
 
@@ -1056,11 +1057,8 @@ acpi_ut_exception(const char *module_name,
        va_end(args);
 }
 
-EXPORT_SYMBOL(acpi_ut_exception);
-
 void ACPI_INTERNAL_VAR_XFACE
-acpi_ut_warning(const char *module_name,
-               u32 line_number, const char *format, ...)
+acpi_warning(const char *module_name, u32 line_number, const char *format, ...)
 {
        va_list args;
 
@@ -1073,7 +1071,7 @@ acpi_ut_warning(const char *module_name,
 }
 
 void ACPI_INTERNAL_VAR_XFACE
-acpi_ut_info(const char *module_name, u32 line_number, const char *format, ...)
+acpi_info(const char *module_name, u32 line_number, const char *format, ...)
 {
        va_list args;
 
@@ -1088,3 +1086,8 @@ acpi_ut_info(const char *module_name, u32 line_number, const char *format, ...)
        acpi_os_printf("\n");
        va_end(args);
 }
+
+ACPI_EXPORT_SYMBOL(acpi_error)
+ACPI_EXPORT_SYMBOL(acpi_exception)
+ACPI_EXPORT_SYMBOL(acpi_warning)
+ACPI_EXPORT_SYMBOL(acpi_info)
similarity index 99%
rename from drivers/acpi/utilities/utmutex.c
rename to drivers/acpi/acpica/utmutex.c
index 7331dde9e1b3d9dd9b15677cfa410ed82ed2d07e..14eb52c4d647445e7a6346208bde77d2f34cbf7b 100644 (file)
@@ -42,6 +42,7 @@
  */
 
 #include <acpi/acpi.h>
+#include "accommon.h"
 
 #define _COMPONENT          ACPI_UTILITIES
 ACPI_MODULE_NAME("utmutex")
similarity index 99%
rename from drivers/acpi/utilities/utobject.c
rename to drivers/acpi/acpica/utobject.c
index c354e7a42bcde3ea4168ea0a0107a4b9ccfa358d..4279ed3a8782f15c633d87e3e437f22b548f5d6a 100644 (file)
@@ -42,7 +42,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acnamesp.h>
+#include "accommon.h"
+#include "acnamesp.h"
 
 #define _COMPONENT          ACPI_UTILITIES
 ACPI_MODULE_NAME("utobject")
similarity index 99%
rename from drivers/acpi/utilities/utresrc.c
rename to drivers/acpi/acpica/utresrc.c
index c3e3e1308edc76a6a572f59090ff448db5187525..91b7c00236f41f5e1d9858d6a1f4cc5ddf8e9909 100644 (file)
@@ -42,7 +42,8 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/amlresrc.h>
+#include "accommon.h"
+#include "amlresrc.h"
 
 #define _COMPONENT          ACPI_UTILITIES
 ACPI_MODULE_NAME("utresrc")
similarity index 99%
rename from drivers/acpi/utilities/utstate.c
rename to drivers/acpi/acpica/utstate.c
index 63a6d3d77d88fc0c4e9de3105904a2a4302c278c..0440c958f5a47fc9cc001b4b459d967bbc68e07b 100644 (file)
@@ -42,6 +42,7 @@
  */
 
 #include <acpi/acpi.h>
+#include "accommon.h"
 
 #define _COMPONENT          ACPI_UTILITIES
 ACPI_MODULE_NAME("utstate")
similarity index 97%
rename from drivers/acpi/utilities/utxface.c
rename to drivers/acpi/acpica/utxface.c
index c198a4d40583e7f14fc0e1a545d496c118c98b96..078a22728c6b847eb01a6fdb24a64b220d4dfd7e 100644 (file)
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acevents.h>
-#include <acpi/acnamesp.h>
-#include <acpi/acdebug.h>
+#include "accommon.h"
+#include "acevents.h"
+#include "acnamesp.h"
+#include "acdebug.h"
+#include "actables.h"
 
 #define _COMPONENT          ACPI_UTILITIES
 ACPI_MODULE_NAME("utxface")
@@ -147,6 +149,16 @@ acpi_status acpi_enable_subsystem(u32 flags)
                }
        }
 
+       /*
+        * Obtain a permanent mapping for the FACS. This is required for the
+        * Global Lock and the Firmware Waking Vector
+        */
+       status = acpi_tb_initialize_facs();
+       if (ACPI_FAILURE(status)) {
+               ACPI_WARNING((AE_INFO, "Could not map the FACS table"));
+               return_ACPI_STATUS(status);
+       }
+
        /*
         * Install the default op_region handlers. These are installed unless
         * other handlers have already been installed via the
index 1423b0c0cd2eecc6e3c7b2f5c78746cee5fac4eb..65132f9204596eb9908b8e0424531ec682a8b731 100644 (file)
@@ -471,7 +471,7 @@ static void sysfs_remove_battery(struct acpi_battery *battery)
 
 static int acpi_battery_update(struct acpi_battery *battery)
 {
-       int result;
+       int result, old_present = acpi_battery_present(battery);
        result = acpi_battery_get_status(battery);
        if (result)
                return result;
@@ -482,7 +482,8 @@ static int acpi_battery_update(struct acpi_battery *battery)
                return 0;
        }
 #endif
-       if (!battery->update_time) {
+       if (!battery->update_time ||
+           old_present != acpi_battery_present(battery)) {
                result = acpi_battery_get_info(battery);
                if (result)
                        return result;
index 7edf6d913c1318fded1fd4cf6a448b2f799a0849..765fd1c56cd66bc445ab5228f562177b9eb469e1 100644 (file)
@@ -688,14 +688,6 @@ void __init acpi_early_init(void)
        if (acpi_disabled)
                return;
 
-       /*
-        * ACPI CA initializes acpi_dbg_level to non-zero, which means
-        * we get debug output merely by turning on CONFIG_ACPI_DEBUG.
-        * Turn it off so we don't get output unless the user specifies
-        * acpi.debug_level.
-        */
-       acpi_dbg_level = 0;
-
        printk(KERN_INFO PREFIX "Core revision %08x\n", ACPI_CA_VERSION);
 
        /* enable workarounds, unless strict ACPI spec. compliance */
index 307963bd10436c896e85766f23fc2ad6a6c85ad2..332fe4b217085ea9a188a5b48183df87aafe0636 100644 (file)
@@ -27,9 +27,6 @@
 #include <linux/seq_file.h>
 #include <acpi/acpi_bus.h>
 #include <acpi/acpi_drivers.h>
-#include <acpi/acmacros.h>
-#include <acpi/actypes.h>
-#include <acpi/acutils.h>
 
 ACPI_MODULE_NAME("cm_sbs");
 #define ACPI_AC_CLASS          "ac_adapter"
index c483968920085f13da610c387fd685ebe07ca654..20223cbd0d1cb3544f27b1da96ecf579566ffb89 100644 (file)
@@ -9,7 +9,6 @@
 #include <linux/moduleparam.h>
 #include <asm/uaccess.h>
 #include <acpi/acpi_drivers.h>
-#include <acpi/acglobal.h>
 
 #define _COMPONENT             ACPI_SYSTEM_COMPONENT
 ACPI_MODULE_NAME("debug");
diff --git a/drivers/acpi/dispatcher/Makefile b/drivers/acpi/dispatcher/Makefile
deleted file mode 100644 (file)
index eb7e602..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# Makefile for all Linux ACPI interpreter subdirectories
-#
-
-obj-y := dsfield.o   dsmthdat.o  dsopcode.o  dswexec.o  dswscope.o \
-        dsmethod.o  dsobject.o  dsutils.o   dswload.o  dswstate.o \
-        dsinit.o
-
-EXTRA_CFLAGS += $(ACPI_CFLAGS)
index 30f3ef236ecb1b354548c5bb2570866eaa8ec6be..2e8317bf723e960824a7ec9d8856d369ec10c385 100644 (file)
@@ -42,7 +42,6 @@
 #include <asm/io.h>
 #include <acpi/acpi_bus.h>
 #include <acpi/acpi_drivers.h>
-#include <acpi/actypes.h>
 
 #define ACPI_EC_CLASS                  "embedded_controller"
 #define ACPI_EC_DEVICE_NAME            "Embedded Controller"
@@ -756,10 +755,15 @@ static acpi_status
 acpi_ec_register_query_methods(acpi_handle handle, u32 level,
                               void *context, void **return_value)
 {
-       struct acpi_namespace_node *node = handle;
+       char node_name[5];
+       struct acpi_buffer buffer = { sizeof(node_name), node_name };
        struct acpi_ec *ec = context;
        int value = 0;
-       if (sscanf(node->name.ascii, "_Q%x", &value) == 1) {
+       acpi_status status;
+
+       status = acpi_get_name(handle, ACPI_SINGLE_NAME, &buffer);
+
+       if (ACPI_SUCCESS(status) && sscanf(node_name, "_Q%x", &value) == 1) {
                acpi_ec_add_query_handler(ec, value, handle, NULL, NULL);
        }
        return AE_OK;
@@ -978,9 +982,9 @@ static const struct acpi_device_id ec_device_ids[] = {
 
 int __init acpi_ec_ecdt_probe(void)
 {
-       int ret;
        acpi_status status;
        struct acpi_table_ecdt *ecdt_ptr;
+       acpi_handle dummy;
 
        boot_ec = make_acpi_ec();
        if (!boot_ec)
@@ -1006,30 +1010,31 @@ int __init acpi_ec_ecdt_probe(void)
                boot_ec->gpe = ecdt_ptr->gpe;
                boot_ec->handle = ACPI_ROOT_OBJECT;
                acpi_get_handle(ACPI_ROOT_OBJECT, ecdt_ptr->id, &boot_ec->handle);
-       } else {
-               /* This workaround is needed only on some broken machines,
-                * which require early EC, but fail to provide ECDT */
-               acpi_handle x;
-               printk(KERN_DEBUG PREFIX "Look up EC in DSDT\n");
-               status = acpi_get_devices(ec_device_ids[0].id, ec_parse_device,
-                                               boot_ec, NULL);
-               /* Check that acpi_get_devices actually find something */
-               if (ACPI_FAILURE(status) || !boot_ec->handle)
-                       goto error;
-               /* We really need to limit this workaround, the only ASUS,
-                * which needs it, has fake EC._INI method, so use it as flag.
-                * Keep boot_ec struct as it will be needed soon.
-                */
-               if (ACPI_FAILURE(acpi_get_handle(boot_ec->handle, "_INI", &x)))
-                       return -ENODEV;
+               /* Add some basic check against completely broken table */
+               if (boot_ec->data_addr != boot_ec->command_addr)
+                       goto install;
+       /* fall through */
        }
-
-       ret = ec_install_handlers(boot_ec);
-       if (!ret) {
+       /* This workaround is needed only on some broken machines,
+        * which require early EC, but fail to provide ECDT */
+       printk(KERN_DEBUG PREFIX "Look up EC in DSDT\n");
+       status = acpi_get_devices(ec_device_ids[0].id, ec_parse_device,
+                                       boot_ec, NULL);
+       /* Check that acpi_get_devices actually find something */
+       if (ACPI_FAILURE(status) || !boot_ec->handle)
+               goto error;
+       /* We really need to limit this workaround, the only ASUS,
+        * which needs it, has fake EC._INI method, so use it as flag.
+        * Keep boot_ec struct as it will be needed soon.
+        */
+       if (ACPI_FAILURE(acpi_get_handle(boot_ec->handle, "_INI", &dummy)))
+               return -ENODEV;
+install:
+       if (!ec_install_handlers(boot_ec)) {
                first_ec = boot_ec;
                return 0;
        }
-      error:
+error:
        kfree(boot_ec);
        boot_ec = NULL;
        return -ENODEV;
diff --git a/drivers/acpi/events/Makefile b/drivers/acpi/events/Makefile
deleted file mode 100644 (file)
index d29f2ee..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# Makefile for all Linux ACPI interpreter subdirectories
-#
-
-obj-y := evevent.o  evregion.o  evsci.o    evxfevnt.o \
-        evmisc.o   evrgnini.o  evxface.o  evxfregn.o \
-        evgpe.o    evgpeblk.o
-
-EXTRA_CFLAGS += $(ACPI_CFLAGS)
diff --git a/drivers/acpi/executer/Makefile b/drivers/acpi/executer/Makefile
deleted file mode 100644 (file)
index e09998a..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Makefile for all Linux ACPI interpreter subdirectories
-#
-
-obj-y := exconfig.o  exfield.o  exnames.o   exoparg6.o  exresolv.o  exstorob.o\
-        exconvrt.o  exfldio.o  exoparg1.o  exprep.o    exresop.o   exsystem.o\
-        excreate.o  exmisc.o   exoparg2.o  exregion.o  exstore.o   exutils.o \
-        exdump.o    exmutex.o  exoparg3.o  exresnte.o  exstoren.o
-
-EXTRA_CFLAGS += $(ACPI_CFLAGS)
diff --git a/drivers/acpi/hardware/Makefile b/drivers/acpi/hardware/Makefile
deleted file mode 100644 (file)
index 438ad37..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# Makefile for all Linux ACPI interpreter subdirectories
-#
-
-obj-y := hwacpi.o  hwgpe.o  hwregs.o  hwsleep.o
-
-obj-$(ACPI_FUTURE_USAGE) += hwtimer.o
-
-EXTRA_CFLAGS += $(ACPI_CFLAGS)
similarity index 98%
rename from drivers/acpi/sleep/main.c
rename to drivers/acpi/main.c
index 28a691cc625ebec8827454e98cfaa94b5260b9ce..d8242772de9285767354cac0f568705176761fa1 100644 (file)
@@ -107,7 +107,7 @@ static bool set_sci_en_on_resume;
  */
 static int acpi_pm_disable_gpes(void)
 {
-       acpi_hw_disable_all_gpes();
+       acpi_disable_all_gpes();
        return 0;
 }
 
@@ -135,7 +135,7 @@ static int acpi_pm_prepare(void)
        int error = __acpi_pm_prepare();
 
        if (!error)
-               acpi_hw_disable_all_gpes();
+               acpi_disable_all_gpes();
        return error;
 }
 
@@ -267,7 +267,7 @@ static int acpi_suspend_enter(suspend_state_t pm_state)
         * (like wakeup GPE) haven't handler, this can avoid such GPE misfire.
         * acpi_leave_sleep_state will reenable specific GPEs later
         */
-       acpi_hw_disable_all_gpes();
+       acpi_disable_all_gpes();
 
        local_irq_restore(flags);
        printk(KERN_DEBUG "Back to C!\n");
@@ -436,7 +436,7 @@ static void acpi_hibernation_leave(void)
 
 static void acpi_pm_enable_gpes(void)
 {
-       acpi_hw_enable_all_runtime_gpes();
+       acpi_enable_all_runtime_gpes();
 }
 
 static struct platform_hibernation_ops acpi_hibernation_ops = {
@@ -622,7 +622,7 @@ static void acpi_power_off_prepare(void)
 {
        /* Prepare to power off the system */
        acpi_sleep_prepare(ACPI_STATE_S5);
-       acpi_hw_disable_all_gpes();
+       acpi_disable_all_gpes();
 }
 
 static void acpi_power_off(void)
@@ -671,7 +671,7 @@ int __init acpi_sleep_init(void)
                sleep_states[ACPI_STATE_S4] = 1;
                printk(" S4");
                if (!nosigcheck) {
-                       acpi_get_table_by_index(ACPI_TABLE_INDEX_FACS,
+                       acpi_get_table(ACPI_SIG_FACS, 1,
                                (struct acpi_table_header **)&facs);
                        if (facs)
                                s4_hardware_signature =
diff --git a/drivers/acpi/namespace/Makefile b/drivers/acpi/namespace/Makefile
deleted file mode 100644 (file)
index 371a2da..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# Makefile for all Linux ACPI interpreter subdirectories
-#
-
-obj-y := nsaccess.o  nsload.o    nssearch.o  nsxfeval.o \
-        nsalloc.o   nseval.o    nsnames.o   nsutils.o   nsxfname.o \
-        nsdump.o    nsinit.o    nsobject.o  nswalk.o    nsxfobj.o  \
-        nsparse.o   nspredef.o
-
-obj-$(ACPI_FUTURE_USAGE) += nsdumpdv.o
-
-EXTRA_CFLAGS += $(ACPI_CFLAGS)
index 25ceae9191ef3f1bed834cd2f88d4094e3ba61cb..c5e292aab0e34c77f94d1089942ebba06ffcd3d8 100644 (file)
@@ -29,7 +29,6 @@
 #include <linux/errno.h>
 #include <linux/acpi.h>
 #include <acpi/acpi_bus.h>
-#include <acpi/acmacros.h>
 
 #define ACPI_NUMA      0x80000000
 #define _COMPONENT     ACPI_NUMA
index c8111424dcb88b8a8cdc0e401f025a79149dfaa1..6729a4992f2bd73543a561f36454f037db01298d 100644 (file)
@@ -726,7 +726,7 @@ static acpi_status __acpi_os_execute(acpi_execute_type type,
 
        dpc = kmalloc(sizeof(struct acpi_os_dpc), GFP_ATOMIC);
        if (!dpc)
-               return_ACPI_STATUS(AE_NO_MEMORY);
+               return AE_NO_MEMORY;
 
        dpc->function = function;
        dpc->context = context;
@@ -747,7 +747,7 @@ static acpi_status __acpi_os_execute(acpi_execute_type type,
                status = AE_ERROR;
                kfree(dpc);
        }
-       return_ACPI_STATUS(status);
+       return status;
 }
 
 acpi_status acpi_os_execute(acpi_execute_type type,
diff --git a/drivers/acpi/parser/Makefile b/drivers/acpi/parser/Makefile
deleted file mode 100644 (file)
index db24ee0..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# Makefile for all Linux ACPI interpreter subdirectories
-#
-
-obj-y := psargs.o    psparse.o  psloop.o pstree.o   pswalk.o  \
-        psopcode.o  psscope.o  psutils.o  psxface.o
-
-EXTRA_CFLAGS += $(ACPI_CFLAGS)
index bb7d50dd28186d3c1d7e5d3d1bdb735aeab1944c..c926e7d4a0d619fd5b16a3b8d4806b05bba5aeeb 100644 (file)
@@ -139,6 +139,8 @@ static int acpi_power_get_state(acpi_handle handle, int *state)
 {
        acpi_status status = AE_OK;
        unsigned long long sta = 0;
+       char node_name[5];
+       struct acpi_buffer buffer = { sizeof(node_name), node_name };
 
 
        if (!handle || !state)
@@ -151,8 +153,10 @@ static int acpi_power_get_state(acpi_handle handle, int *state)
        *state = (sta & 0x01)?ACPI_POWER_RESOURCE_STATE_ON:
                              ACPI_POWER_RESOURCE_STATE_OFF;
 
+       acpi_get_name(handle, ACPI_SINGLE_NAME, &buffer);
+
        ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] is %s\n",
-                         acpi_ut_get_node_name(handle),
+                         node_name,
                                *state ? "on" : "off"));
 
        return 0;
similarity index 92%
rename from drivers/acpi/sleep/proc.c
rename to drivers/acpi/proc.c
index 4dbc2271acf5009cda80e48fdf19048f28b722a7..428c911dba086511281e3b89b80642657a480d90 100644 (file)
@@ -28,8 +28,6 @@ static int acpi_system_sleep_seq_show(struct seq_file *seq, void *offset)
 {
        int i;
 
-       ACPI_FUNCTION_TRACE("acpi_system_sleep_seq_show");
-
        for (i = 0; i <= ACPI_STATE_S5; i++) {
                if (sleep_states[i]) {
                        seq_printf(seq, "S%d ", i);
@@ -86,49 +84,44 @@ acpi_system_write_sleep(struct file *file,
 
 #ifdef HAVE_ACPI_LEGACY_ALARM
 
+static u32 cmos_bcd_read(int offset, int rtc_control);
+
 static int acpi_system_alarm_seq_show(struct seq_file *seq, void *offset)
 {
        u32 sec, min, hr;
        u32 day, mo, yr, cent = 0;
+       u32 today = 0;
        unsigned char rtc_control = 0;
        unsigned long flags;
 
-       ACPI_FUNCTION_TRACE("acpi_system_alarm_seq_show");
-
        spin_lock_irqsave(&rtc_lock, flags);
 
-       sec = CMOS_READ(RTC_SECONDS_ALARM);
-       min = CMOS_READ(RTC_MINUTES_ALARM);
-       hr = CMOS_READ(RTC_HOURS_ALARM);
        rtc_control = CMOS_READ(RTC_CONTROL);
+       sec = cmos_bcd_read(RTC_SECONDS_ALARM, rtc_control);
+       min = cmos_bcd_read(RTC_MINUTES_ALARM, rtc_control);
+       hr = cmos_bcd_read(RTC_HOURS_ALARM, rtc_control);
 
        /* If we ever get an FACP with proper values... */
-       if (acpi_gbl_FADT.day_alarm)
+       if (acpi_gbl_FADT.day_alarm) {
                /* ACPI spec: only low 6 its should be cared */
                day = CMOS_READ(acpi_gbl_FADT.day_alarm) & 0x3F;
-       else
-               day = CMOS_READ(RTC_DAY_OF_MONTH);
+               if (!(rtc_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD)
+                       day = bcd2bin(day);
+       } else
+               day = cmos_bcd_read(RTC_DAY_OF_MONTH, rtc_control);
        if (acpi_gbl_FADT.month_alarm)
-               mo = CMOS_READ(acpi_gbl_FADT.month_alarm);
-       else
-               mo = CMOS_READ(RTC_MONTH);
+               mo = cmos_bcd_read(acpi_gbl_FADT.month_alarm, rtc_control);
+       else {
+               mo = cmos_bcd_read(RTC_MONTH, rtc_control);
+               today = cmos_bcd_read(RTC_DAY_OF_MONTH, rtc_control);
+       }
        if (acpi_gbl_FADT.century)
-               cent = CMOS_READ(acpi_gbl_FADT.century);
+               cent = cmos_bcd_read(acpi_gbl_FADT.century, rtc_control);
 
-       yr = CMOS_READ(RTC_YEAR);
+       yr = cmos_bcd_read(RTC_YEAR, rtc_control);
 
        spin_unlock_irqrestore(&rtc_lock, flags);
 
-       if (!(rtc_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
-               sec = bcd2bin(sec);
-               min = bcd2bin(min);
-               hr = bcd2bin(hr);
-               day = bcd2bin(day);
-               mo = bcd2bin(mo);
-               yr = bcd2bin(yr);
-               cent = bcd2bin(cent);
-       }
-
        /* we're trusting the FADT (see above) */
        if (!acpi_gbl_FADT.century)
                /* If we're not trusting the FADT, we should at least make it
@@ -153,6 +146,20 @@ static int acpi_system_alarm_seq_show(struct seq_file *seq, void *offset)
        else
                yr += cent * 100;
 
+       /*
+        * Show correct dates for alarms up to a month into the future.
+        * This solves issues for nearly all situations with the common
+        * 30-day alarm clocks in PC hardware.
+        */
+       if (day < today) {
+               if (mo < 12) {
+                       mo += 1;
+               } else {
+                       mo = 1;
+                       yr += 1;
+               }
+       }
+
        seq_printf(seq, "%4.4u-", yr);
        (mo > 12) ? seq_puts(seq, "**-") : seq_printf(seq, "%2.2u-", mo);
        (day > 31) ? seq_puts(seq, "** ") : seq_printf(seq, "%2.2u ", day);
@@ -227,13 +234,11 @@ acpi_system_write_alarm(struct file *file,
        int adjust = 0;
        unsigned char rtc_control = 0;
 
-       ACPI_FUNCTION_TRACE("acpi_system_write_alarm");
-
        if (count > sizeof(alarm_string) - 1)
-               return_VALUE(-EINVAL);
+               return -EINVAL;
 
        if (copy_from_user(alarm_string, buffer, count))
-               return_VALUE(-EFAULT);
+               return -EFAULT;
 
        alarm_string[count] = '\0';
 
@@ -334,7 +339,7 @@ acpi_system_write_alarm(struct file *file,
 
        result = 0;
       end:
-       return_VALUE(result ? result : count);
+       return result ? result : count;
 }
 #endif                         /* HAVE_ACPI_LEGACY_ALARM */
 
index a6b662c00b67764d311366963171a1a5b289f73d..93f91142d7ad5ca01fc62b8dc16569660cfa0434 100644 (file)
@@ -42,7 +42,7 @@ void acpi_reboot(void)
        case ACPI_ADR_SPACE_SYSTEM_MEMORY:
        case ACPI_ADR_SPACE_SYSTEM_IO:
                printk(KERN_DEBUG "ACPI MEMORY or I/O RESET_REG.\n");
-               acpi_hw_low_level_write(8, reset_value, rr);
+               acpi_reset();
                break;
        }
        /* Wait ten seconds */
diff --git a/drivers/acpi/resources/Makefile b/drivers/acpi/resources/Makefile
deleted file mode 100644 (file)
index 8de4f69..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Makefile for all Linux ACPI interpreter subdirectories
-#
-
-obj-y := rsaddr.o rscreate.o rsinfo.o rsio.o rslist.o rsmisc.o rsxface.o \
-        rscalc.o  rsirq.o  rsmemory.o  rsutils.o
-
-obj-$(ACPI_FUTURE_USAGE) += rsdump.o
-
-EXTRA_CFLAGS += $(ACPI_CFLAGS)
index e53e590252c01346e09ab317d6595cc218d3a72f..0619734895b29232d8f3b1e960efb8b777e808c5 100644 (file)
@@ -10,7 +10,6 @@
 
 #include <acpi/acpi_bus.h>
 #include <acpi/acpi_drivers.h>
-#include <acpi/actypes.h>
 #include <linux/wait.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
index 39b7233c348592670ef86b1df5747f3d90151dc9..c54d7b6c406680b5b82d0df4e0aa9b1a0ac8688d 100644 (file)
@@ -10,7 +10,6 @@
 #include <linux/kthread.h>
 
 #include <acpi/acpi_drivers.h>
-#include <acpi/acinterp.h>     /* for acpi_ex_eisa_id_to_string() */
 
 #define _COMPONENT             ACPI_BUS_COMPONENT
 ACPI_MODULE_NAME("scan");
diff --git a/drivers/acpi/sleep/Makefile b/drivers/acpi/sleep/Makefile
deleted file mode 100644 (file)
index f1fb888..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-obj-y                                  := wakeup.o
-obj-y                                  += main.o
-obj-$(CONFIG_ACPI_SLEEP)               += proc.o
-
-EXTRA_CFLAGS += $(ACPI_CFLAGS)
index 6e4107f824039bdee65174c38dbcce06672ee119..391d0358a592ce6ab389687f321bfb8e0e4b62c3 100644 (file)
@@ -192,65 +192,6 @@ static struct attribute_group interrupt_stats_attr_group = {
 };
 static struct kobj_attribute *counter_attrs;
 
-static int count_num_gpes(void)
-{
-       int count = 0;
-       struct acpi_gpe_xrupt_info *gpe_xrupt_info;
-       struct acpi_gpe_block_info *gpe_block;
-       acpi_cpu_flags flags;
-
-       flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
-
-       gpe_xrupt_info = acpi_gbl_gpe_xrupt_list_head;
-       while (gpe_xrupt_info) {
-               gpe_block = gpe_xrupt_info->gpe_block_list_head;
-               while (gpe_block) {
-                       count += gpe_block->register_count *
-                           ACPI_GPE_REGISTER_WIDTH;
-                       gpe_block = gpe_block->next;
-               }
-               gpe_xrupt_info = gpe_xrupt_info->next;
-       }
-       acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
-
-       return count;
-}
-
-static int get_gpe_device(int index, acpi_handle *handle)
-{
-       struct acpi_gpe_xrupt_info *gpe_xrupt_info;
-       struct acpi_gpe_block_info *gpe_block;
-       acpi_cpu_flags flags;
-       struct acpi_namespace_node *node;
-
-       flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
-
-       gpe_xrupt_info = acpi_gbl_gpe_xrupt_list_head;
-       while (gpe_xrupt_info) {
-               gpe_block = gpe_xrupt_info->gpe_block_list_head;
-               node = gpe_block->node;
-               while (gpe_block) {
-                       index -= gpe_block->register_count *
-                           ACPI_GPE_REGISTER_WIDTH;
-                       if (index < 0) {
-                               acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
-                               /* return NULL if it's FADT GPE */
-                               if (node->type != ACPI_TYPE_DEVICE)
-                                       *handle = NULL;
-                               else
-                                       *handle = node;
-                               return 0;
-                       }
-                       node = gpe_block->node;
-                       gpe_block = gpe_block->next;
-               }
-               gpe_xrupt_info = gpe_xrupt_info->next;
-       }
-       acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
-
-       return -ENODEV;
-}
-
 static void delete_gpe_attr_array(void)
 {
        struct event_counter *tmp = all_counters;
@@ -309,7 +250,7 @@ static int get_status(u32 index, acpi_event_status *status, acpi_handle *handle)
                goto end;
 
        if (index < num_gpes) {
-               result = get_gpe_device(index, handle);
+               result = acpi_get_gpe_device(index, handle);
                if (result) {
                        ACPI_EXCEPTION((AE_INFO, AE_NOT_FOUND,
                                "Invalid GPE 0x%x\n", index));
@@ -436,7 +377,7 @@ void acpi_irq_stats_init(void)
        if (all_counters)
                return;
 
-       num_gpes = count_num_gpes();
+       num_gpes = acpi_current_gpe_count;
        num_counters = num_gpes + ACPI_NUM_FIXED_EVENTS + NUM_COUNTERS_EXTRA;
 
        all_attrs = kzalloc(sizeof(struct attribute *) * (num_counters + 1),
diff --git a/drivers/acpi/tables/Makefile b/drivers/acpi/tables/Makefile
deleted file mode 100644 (file)
index 7385efa..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# Makefile for all Linux ACPI interpreter subdirectories
-#
-
-obj-y := tbxface.o tbinstal.o tbutils.o tbfind.o tbfadt.o tbxfroot.o
-
-EXTRA_CFLAGS += $(ACPI_CFLAGS)
index 25f531d892deacbb5082b0696f0ba460c48a5494..40e60fc2e596daead5c656396aa84fca0587868b 100644 (file)
@@ -824,32 +824,36 @@ static int __init toshiba_acpi_init(void)
                        toshiba_acpi_exit();
                        return -ENOMEM;
                }
-       }
 
-       /* Register input device for kill switch */
-       toshiba_acpi.poll_dev = input_allocate_polled_device();
-       if (!toshiba_acpi.poll_dev) {
-               printk(MY_ERR "unable to allocate kill-switch input device\n");
-               toshiba_acpi_exit();
-               return -ENOMEM;
-       }
-       toshiba_acpi.poll_dev->private = &toshiba_acpi;
-       toshiba_acpi.poll_dev->poll = bt_poll_rfkill;
-       toshiba_acpi.poll_dev->poll_interval = 1000; /* msecs */
-
-       toshiba_acpi.poll_dev->input->name = toshiba_acpi.rfk_name;
-       toshiba_acpi.poll_dev->input->id.bustype = BUS_HOST;
-       toshiba_acpi.poll_dev->input->id.vendor = 0x0930; /* Toshiba USB ID */
-       set_bit(EV_SW, toshiba_acpi.poll_dev->input->evbit);
-       set_bit(SW_RFKILL_ALL, toshiba_acpi.poll_dev->input->swbit);
-       input_report_switch(toshiba_acpi.poll_dev->input, SW_RFKILL_ALL, TRUE);
-       input_sync(toshiba_acpi.poll_dev->input);
-
-       ret = input_register_polled_device(toshiba_acpi.poll_dev);
-       if (ret) {
-               printk(MY_ERR "unable to register kill-switch input device\n");
-               toshiba_acpi_exit();
-               return ret;
+               /* Register input device for kill switch */
+               toshiba_acpi.poll_dev = input_allocate_polled_device();
+               if (!toshiba_acpi.poll_dev) {
+                       printk(MY_ERR
+                              "unable to allocate kill-switch input device\n");
+                       toshiba_acpi_exit();
+                       return -ENOMEM;
+               }
+               toshiba_acpi.poll_dev->private = &toshiba_acpi;
+               toshiba_acpi.poll_dev->poll = bt_poll_rfkill;
+               toshiba_acpi.poll_dev->poll_interval = 1000; /* msecs */
+
+               toshiba_acpi.poll_dev->input->name = toshiba_acpi.rfk_name;
+               toshiba_acpi.poll_dev->input->id.bustype = BUS_HOST;
+               /* Toshiba USB ID */
+               toshiba_acpi.poll_dev->input->id.vendor = 0x0930;
+               set_bit(EV_SW, toshiba_acpi.poll_dev->input->evbit);
+               set_bit(SW_RFKILL_ALL, toshiba_acpi.poll_dev->input->swbit);
+               input_report_switch(toshiba_acpi.poll_dev->input,
+                                   SW_RFKILL_ALL, TRUE);
+               input_sync(toshiba_acpi.poll_dev->input);
+
+               ret = input_register_polled_device(toshiba_acpi.poll_dev);
+               if (ret) {
+                       printk(MY_ERR
+                              "unable to register kill-switch input device\n");
+                       toshiba_acpi_exit();
+                       return ret;
+               }
        }
 
        return 0;
diff --git a/drivers/acpi/utilities/Makefile b/drivers/acpi/utilities/Makefile
deleted file mode 100644 (file)
index 88eff14..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# Makefile for all Linux ACPI interpreter subdirectories
-#
-
-obj-y := utalloc.o utdebug.o uteval.o utinit.o utmisc.o utxface.o \
-               utcopy.o utdelete.o utglobal.o utmath.o utobject.o \
-               utstate.o utmutex.o utobject.o utcache.o utresrc.o
-
-EXTRA_CFLAGS += $(ACPI_CFLAGS)
diff --git a/drivers/acpi/utilities/utcache.c b/drivers/acpi/utilities/utcache.c
deleted file mode 100644 (file)
index 245fa80..0000000
+++ /dev/null
@@ -1,314 +0,0 @@
-/******************************************************************************
- *
- * Module Name: utcache - local cache allocation routines
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2008, Intel Corp.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
- * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGES.
- */
-
-#include <acpi/acpi.h>
-
-#define _COMPONENT          ACPI_UTILITIES
-ACPI_MODULE_NAME("utcache")
-#ifdef ACPI_USE_LOCAL_CACHE
-/*******************************************************************************
- *
- * FUNCTION:    acpi_os_create_cache
- *
- * PARAMETERS:  cache_name      - Ascii name for the cache
- *              object_size     - Size of each cached object
- *              max_depth       - Maximum depth of the cache (in objects)
- *              return_cache    - Where the new cache object is returned
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Create a cache object
- *
- ******************************************************************************/
-acpi_status
-acpi_os_create_cache(char *cache_name,
-                    u16 object_size,
-                    u16 max_depth, struct acpi_memory_list ** return_cache)
-{
-       struct acpi_memory_list *cache;
-
-       ACPI_FUNCTION_ENTRY();
-
-       if (!cache_name || !return_cache || (object_size < 16)) {
-               return (AE_BAD_PARAMETER);
-       }
-
-       /* Create the cache object */
-
-       cache = acpi_os_allocate(sizeof(struct acpi_memory_list));
-       if (!cache) {
-               return (AE_NO_MEMORY);
-       }
-
-       /* Populate the cache object and return it */
-
-       ACPI_MEMSET(cache, 0, sizeof(struct acpi_memory_list));
-       cache->link_offset = 8;
-       cache->list_name = cache_name;
-       cache->object_size = object_size;
-       cache->max_depth = max_depth;
-
-       *return_cache = cache;
-       return (AE_OK);
-}
-
-/*******************************************************************************
- *
- * FUNCTION:    acpi_os_purge_cache
- *
- * PARAMETERS:  Cache           - Handle to cache object
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Free all objects within the requested cache.
- *
- ******************************************************************************/
-
-acpi_status acpi_os_purge_cache(struct acpi_memory_list * cache)
-{
-       char *next;
-
-       ACPI_FUNCTION_ENTRY();
-
-       if (!cache) {
-               return (AE_BAD_PARAMETER);
-       }
-
-       /* Walk the list of objects in this cache */
-
-       while (cache->list_head) {
-
-               /* Delete and unlink one cached state object */
-
-               next = *(ACPI_CAST_INDIRECT_PTR(char,
-                                               &(((char *)cache->
-                                                  list_head)[cache->
-                                                             link_offset])));
-               ACPI_FREE(cache->list_head);
-
-               cache->list_head = next;
-               cache->current_depth--;
-       }
-
-       return (AE_OK);
-}
-
-/*******************************************************************************
- *
- * FUNCTION:    acpi_os_delete_cache
- *
- * PARAMETERS:  Cache           - Handle to cache object
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Free all objects within the requested cache and delete the
- *              cache object.
- *
- ******************************************************************************/
-
-acpi_status acpi_os_delete_cache(struct acpi_memory_list * cache)
-{
-       acpi_status status;
-
-       ACPI_FUNCTION_ENTRY();
-
-       /* Purge all objects in the cache */
-
-       status = acpi_os_purge_cache(cache);
-       if (ACPI_FAILURE(status)) {
-               return (status);
-       }
-
-       /* Now we can delete the cache object */
-
-       ACPI_FREE(cache);
-       return (AE_OK);
-}
-
-/*******************************************************************************
- *
- * FUNCTION:    acpi_os_release_object
- *
- * PARAMETERS:  Cache       - Handle to cache object
- *              Object      - The object to be released
- *
- * RETURN:      None
- *
- * DESCRIPTION: Release an object to the specified cache.  If cache is full,
- *              the object is deleted.
- *
- ******************************************************************************/
-
-acpi_status
-acpi_os_release_object(struct acpi_memory_list * cache, void *object)
-{
-       acpi_status status;
-
-       ACPI_FUNCTION_ENTRY();
-
-       if (!cache || !object) {
-               return (AE_BAD_PARAMETER);
-       }
-
-       /* If cache is full, just free this object */
-
-       if (cache->current_depth >= cache->max_depth) {
-               ACPI_FREE(object);
-               ACPI_MEM_TRACKING(cache->total_freed++);
-       }
-
-       /* Otherwise put this object back into the cache */
-
-       else {
-               status = acpi_ut_acquire_mutex(ACPI_MTX_CACHES);
-               if (ACPI_FAILURE(status)) {
-                       return (status);
-               }
-
-               /* Mark the object as cached */
-
-               ACPI_MEMSET(object, 0xCA, cache->object_size);
-               ACPI_SET_DESCRIPTOR_TYPE(object, ACPI_DESC_TYPE_CACHED);
-
-               /* Put the object at the head of the cache list */
-
-               *(ACPI_CAST_INDIRECT_PTR(char,
-                                        &(((char *)object)[cache->
-                                                           link_offset]))) =
-                   cache->list_head;
-               cache->list_head = object;
-               cache->current_depth++;
-
-               (void)acpi_ut_release_mutex(ACPI_MTX_CACHES);
-       }
-
-       return (AE_OK);
-}
-
-/*******************************************************************************
- *
- * FUNCTION:    acpi_os_acquire_object
- *
- * PARAMETERS:  Cache           - Handle to cache object
- *
- * RETURN:      the acquired object.  NULL on error
- *
- * DESCRIPTION: Get an object from the specified cache.  If cache is empty,
- *              the object is allocated.
- *
- ******************************************************************************/
-
-void *acpi_os_acquire_object(struct acpi_memory_list *cache)
-{
-       acpi_status status;
-       void *object;
-
-       ACPI_FUNCTION_NAME(os_acquire_object);
-
-       if (!cache) {
-               return (NULL);
-       }
-
-       status = acpi_ut_acquire_mutex(ACPI_MTX_CACHES);
-       if (ACPI_FAILURE(status)) {
-               return (NULL);
-       }
-
-       ACPI_MEM_TRACKING(cache->requests++);
-
-       /* Check the cache first */
-
-       if (cache->list_head) {
-
-               /* There is an object available, use it */
-
-               object = cache->list_head;
-               cache->list_head = *(ACPI_CAST_INDIRECT_PTR(char,
-                                                           &(((char *)
-                                                              object)[cache->
-                                                                      link_offset])));
-
-               cache->current_depth--;
-
-               ACPI_MEM_TRACKING(cache->hits++);
-               ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
-                                 "Object %p from %s cache\n", object,
-                                 cache->list_name));
-
-               status = acpi_ut_release_mutex(ACPI_MTX_CACHES);
-               if (ACPI_FAILURE(status)) {
-                       return (NULL);
-               }
-
-               /* Clear (zero) the previously used Object */
-
-               ACPI_MEMSET(object, 0, cache->object_size);
-       } else {
-               /* The cache is empty, create a new object */
-
-               ACPI_MEM_TRACKING(cache->total_allocated++);
-
-#ifdef ACPI_DBG_TRACK_ALLOCATIONS
-               if ((cache->total_allocated - cache->total_freed) >
-                   cache->max_occupied) {
-                       cache->max_occupied =
-                           cache->total_allocated - cache->total_freed;
-               }
-#endif
-
-               /* Avoid deadlock with ACPI_ALLOCATE_ZEROED */
-
-               status = acpi_ut_release_mutex(ACPI_MTX_CACHES);
-               if (ACPI_FAILURE(status)) {
-                       return (NULL);
-               }
-
-               object = ACPI_ALLOCATE_ZEROED(cache->object_size);
-               if (!object) {
-                       return (NULL);
-               }
-       }
-
-       return (object);
-}
-#endif                         /* ACPI_USE_LOCAL_CACHE */
similarity index 96%
rename from drivers/acpi/sleep/wakeup.c
rename to drivers/acpi/wakeup.c
index dea4c23df7648bb8ed3781bc455edb835a58b0b8..2d34806d45dd704cf43222bec4ed50e8c33839c0 100644 (file)
@@ -8,7 +8,6 @@
 #include <acpi/acpi_drivers.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
-#include <acpi/acevents.h>
 #include "sleep.h"
 
 #define _COMPONENT             ACPI_SYSTEM_COMPONENT
@@ -28,8 +27,6 @@ void acpi_enable_wakeup_device_prep(u8 sleep_state)
 {
        struct list_head *node, *next;
 
-       ACPI_FUNCTION_TRACE("acpi_enable_wakeup_device_prep");
-
        spin_lock(&acpi_device_lock);
        list_for_each_safe(node, next, &acpi_wakeup_device_list) {
                struct acpi_device *dev = container_of(node,
@@ -61,7 +58,6 @@ void acpi_enable_wakeup_device(u8 sleep_state)
         * Caution: this routine must be invoked when interrupt is disabled 
         * Refer ACPI2.0: P212
         */
-       ACPI_FUNCTION_TRACE("acpi_enable_wakeup_device");
        spin_lock(&acpi_device_lock);
        list_for_each_safe(node, next, &acpi_wakeup_device_list) {
                struct acpi_device *dev =
@@ -103,8 +99,6 @@ void acpi_disable_wakeup_device(u8 sleep_state)
 {
        struct list_head *node, *next;
 
-       ACPI_FUNCTION_TRACE("acpi_disable_wakeup_device");
-
        spin_lock(&acpi_device_lock);
        list_for_each_safe(node, next, &acpi_wakeup_device_list) {
                struct acpi_device *dev =
index c012307d0ba6a726f7a0c9b30eac55f698da5b0b..246987f0b88c0c40d03902f7068525ddc623830e 100644 (file)
 #include "libata.h"
 
 #include <acpi/acpi_bus.h>
-#include <acpi/acnames.h>
-#include <acpi/acnamesp.h>
-#include <acpi/acparser.h>
-#include <acpi/acexcep.h>
-#include <acpi/acmacros.h>
-#include <acpi/actypes.h>
 
 enum {
        ATA_ACPI_FILTER_SETXFER = 1 << 0,
index 5e2eb740df46cff3ddb41d434b4e41a3c67cbb8b..bc6695e3c8482927e5b6de7ae4017c9884bea4a8 100644 (file)
@@ -4050,17 +4050,70 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
        { "ST3160023AS",        "3.42",         ATA_HORKAGE_NONCQ },
 
        /* Seagate NCQ + FLUSH CACHE firmware bug */
-       { "ST31500341AS",       "9JU138",       ATA_HORKAGE_NONCQ |
+       { "ST31500341AS",       "SD15",         ATA_HORKAGE_NONCQ |
                                                ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST31000333AS",       "9FZ136",       ATA_HORKAGE_NONCQ |
+       { "ST31500341AS",       "SD16",         ATA_HORKAGE_NONCQ |
                                                ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST3640623AS",        "9FZ164",       ATA_HORKAGE_NONCQ |
+       { "ST31500341AS",       "SD17",         ATA_HORKAGE_NONCQ |
                                                ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST3640323AS",        "9FZ134",       ATA_HORKAGE_NONCQ |
+       { "ST31500341AS",       "SD18",         ATA_HORKAGE_NONCQ |
                                                ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST3320813AS",        "9FZ182",       ATA_HORKAGE_NONCQ |
+       { "ST31500341AS",       "SD19",         ATA_HORKAGE_NONCQ |
                                                ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST3320613AS",        "9FZ162",       ATA_HORKAGE_NONCQ |
+
+       { "ST31000333AS",       "SD15",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST31000333AS",       "SD16",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST31000333AS",       "SD17",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST31000333AS",       "SD18",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST31000333AS",       "SD19",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+
+       { "ST3640623AS",        "SD15",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3640623AS",        "SD16",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3640623AS",        "SD17",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3640623AS",        "SD18",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3640623AS",        "SD19",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+
+       { "ST3640323AS",        "SD15",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3640323AS",        "SD16",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3640323AS",        "SD17",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3640323AS",        "SD18",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3640323AS",        "SD19",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+
+       { "ST3320813AS",        "SD15",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3320813AS",        "SD16",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3320813AS",        "SD17",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3320813AS",        "SD18",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3320813AS",        "SD19",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+
+       { "ST3320613AS",        "SD15",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3320613AS",        "SD16",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3320613AS",        "SD17",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3320613AS",        "SD18",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3320613AS",        "SD19",         ATA_HORKAGE_NONCQ |
                                                ATA_HORKAGE_FIRMWARE_WARN },
 
        /* Blacklist entries taken from Silicon Image 3124/3132
index e2e332d8ff952753940b1f7b7e086e3e1945a073..8b77a9802df16c9f87b19c32a3984c4ca3009333 100644 (file)
 #include <linux/device.h>
 #include <scsi/scsi_host.h>
 #include <acpi/acpi_bus.h>
-#include <acpi/acnames.h>
-#include <acpi/acnamesp.h>
-#include <acpi/acparser.h>
-#include <acpi/acexcep.h>
-#include <acpi/acmacros.h>
-#include <acpi/actypes.h>
 
 #include <linux/libata.h>
 #include <linux/ata.h>
index a098ba8eaab6141ed52ec9e90666cbe0b8081cc3..e0c4f05d7d579a807becb30af2bf44b3a9ea7260 100644 (file)
@@ -183,7 +183,9 @@ static unsigned long hpt366_filter(struct ata_device *adev, unsigned long mask)
                        mask &= ~(0xF8 << ATA_SHIFT_UDMA);
                if (hpt_dma_blacklisted(adev, "UDMA4", bad_ata66_4))
                        mask &= ~(0xF0 << ATA_SHIFT_UDMA);
-       }
+       } else if (adev->class == ATA_DEV_ATAPI)
+               mask &= ~(ATA_MASK_MWDMA | ATA_MASK_UDMA);
+
        return ata_bmdma_mode_filter(adev, mask);
 }
 
@@ -211,11 +213,15 @@ static u32 hpt36x_find_mode(struct ata_port *ap, int speed)
 
 static int hpt36x_cable_detect(struct ata_port *ap)
 {
-       u8 ata66;
        struct pci_dev *pdev = to_pci_dev(ap->host->dev);
+       u8 ata66;
 
+       /*
+        * Each channel of pata_hpt366 occupies separate PCI function
+        * as the primary channel and bit1 indicates the cable type.
+        */
        pci_read_config_byte(pdev, 0x5A, &ata66);
-       if (ata66 & (1 << ap->port_no))
+       if (ata66 & 2)
                return ATA_CBL_PATA40;
        return ATA_CBL_PATA80;
 }
index 9364dc554257e5af44a3a4a2aff7fc3f6598fa27..9f7c543cc04b265344b0e37443c4349147e88574 100644 (file)
@@ -1693,6 +1693,11 @@ static int rebuild_lun_table(ctlr_info_t *h, int first_time)
        for (i = 0; i <= h->highest_lun; i++) {
                int j;
                drv_found = 0;
+
+               /* skip holes in the array from already deleted drives */
+               if (h->drv[i].raid_level == -1)
+                       continue;
+
                for (j = 0; j < num_luns; j++) {
                        memcpy(&lunid, &ld_buff->LUN[j][0], 4);
                        lunid = le32_to_cpu(lunid);
index d16b02423d6192f43ad8121776ca419f08cc01c2..7d2e91cccb13e99068a4499bc469ef9bc032c67b 100644 (file)
@@ -2081,10 +2081,6 @@ static int cdrom_read_cdda_bpc(struct cdrom_device_info *cdi, __u8 __user *ubuf,
        if (!q)
                return -ENXIO;
 
-       rq = blk_get_request(q, READ, GFP_KERNEL);
-       if (!rq)
-               return -ENOMEM;
-
        cdi->last_sense = 0;
 
        while (nframes) {
@@ -2096,9 +2092,17 @@ static int cdrom_read_cdda_bpc(struct cdrom_device_info *cdi, __u8 __user *ubuf,
 
                len = nr * CD_FRAMESIZE_RAW;
 
+               rq = blk_get_request(q, READ, GFP_KERNEL);
+               if (!rq) {
+                       ret = -ENOMEM;
+                       break;
+               }
+
                ret = blk_rq_map_user(q, rq, NULL, ubuf, len, GFP_KERNEL);
-               if (ret)
+               if (ret) {
+                       blk_put_request(rq);
                        break;
+               }
 
                rq->cmd[0] = GPCMD_READ_CD;
                rq->cmd[1] = 1 << 2;
@@ -2124,6 +2128,7 @@ static int cdrom_read_cdda_bpc(struct cdrom_device_info *cdi, __u8 __user *ubuf,
 
                if (blk_rq_unmap_user(bio))
                        ret = -EFAULT;
+               blk_put_request(rq);
 
                if (ret)
                        break;
@@ -2133,7 +2138,6 @@ static int cdrom_read_cdda_bpc(struct cdrom_device_info *cdi, __u8 __user *ubuf,
                ubuf += len;
        }
 
-       blk_put_request(rq);
        return ret;
 }
 
index 1f06889a96b97e033bdaa294dece945eb8310cc4..bc6163484f62573389fcdcc0388f62270e6bbf53 100644 (file)
@@ -27,7 +27,7 @@
 0x0c   U+2640
 0x0d   U+266a
 0x0e   U+266b
-0x0f   U+263c
+0x0f   U+263c U+00a4
 0x10   U+25b6 U+25ba
 0x11   U+25c0 U+25c4
 0x12   U+2195
@@ -55,7 +55,7 @@
 0x24   U+0024
 0x25   U+0025
 0x26   U+0026
-0x27   U+0027
+0x27   U+0027 U+00b4
 0x28   U+0028
 0x29   U+0029
 0x2a   U+002a
@@ -84,7 +84,7 @@
 0x41   U+0041 U+00c0 U+00c1 U+00c2 U+00c3
 0x42   U+0042
 0x43   U+0043 U+00a9
-0x44   U+0044
+0x44   U+0044 U+00d0
 0x45   U+0045 U+00c8 U+00ca U+00cb
 0x46   U+0046
 0x47   U+0047
 0x79   U+0079 U+00fd
 0x7a   U+007a
 0x7b   U+007b
-0x7c   U+007c U+00a5
+0x7c   U+007c U+00a6
 0x7d   U+007d
 0x7e   U+007e
 #
 0xe8   U+03a6 U+00d8
 0xe9   U+0398
 0xea   U+03a9 U+2126
-0xeb   U+03b4
+0xeb   U+03b4 U+00f0
 0xec   U+221e
 0xed   U+03c6 U+00f8
-0xee   U+03b5
+0xee   U+03b5 U+2208
 0xef   U+2229
 0xf0   U+2261
 0xf1   U+00b1
index 68f052b42ed7807e9771761a171778bcd6fc3f1e..ed306eb1057fde9a7b0c66e093fa8d91464eba4d 100644 (file)
@@ -23,8 +23,6 @@
 #include <linux/security.h>
 #include <linux/module.h>
 #include <acpi/acpi.h>
-#include <acpi/actypes.h>
-#include <acpi/actbl.h>
 #include "tpm.h"
 
 #define TCG_EVENT_NAME_LEN_MAX 255
index a5af6072e2b34760ade3cf63b879dd16f4015957..008176edbd64511148ac5e1e40d21d3fbf1883d5 100644 (file)
@@ -2274,7 +2274,7 @@ rescan_last_byte:
                                    continue; /* nothing to display */
                                }
                                /* Glyph not found */
-                               if ((!(vc->vc_utf && !vc->vc_disp_ctrl) || c < 128) && !(c & ~charmask)) {
+                               if ((!(vc->vc_utf && !vc->vc_disp_ctrl) && c < 128) && !(c & ~charmask)) {
                                    /* In legacy mode use the glyph we get by a 1:1 mapping.
                                       This would make absolutely no sense with Unicode in mind,
                                       but do this for ASCII characters since a font may lack
index aa7f7962a9a0e678b0e3cdfdd9da1058c3798d14..05d897764f027489a346774cedc0ded600f28d2c 100644 (file)
@@ -21,9 +21,6 @@
  *     INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  *     FOR A PARTICULAR PURPOSE.
  *
- *     Xilinx products are not intended for use in life support appliances,
- *     devices, or systems. Use in such applications is expressly prohibited.
- *
  *     (c) Copyright 2003-2008 Xilinx Inc.
  *     All rights reserved.
  *
index 8b0252bf06e221ea89a0b9b6b3f89f0eda301722..d4f419ee87abbfc6fb0d41fd98ab8665524514cf 100644 (file)
@@ -21,9 +21,6 @@
  *     INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  *     FOR A PARTICULAR PURPOSE.
  *
- *     Xilinx products are not intended for use in life support appliances,
- *     devices, or systems. Use in such applications is expressly prohibited.
- *
  *     (c) Copyright 2003-2008 Xilinx Inc.
  *     All rights reserved.
  *
index 776b505284783cc0f128763a65925c9dbbd622e1..02225eb19cf6bd2e6d99085b6edea7aa4801c30b 100644 (file)
@@ -21,9 +21,6 @@
  *     INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  *     FOR A PARTICULAR PURPOSE.
  *
- *     Xilinx products are not intended for use in life support appliances,
- *     devices, or systems. Use in such applications is expressly prohibited.
- *
  *     (c) Copyright 2007-2008 Xilinx Inc.
  *     All rights reserved.
  *
index 62bda453c90b8a6101e91d11f00ec24406ab48b4..4c9dd9a3b62ac4b0266389141a4f66b9e2e34fd6 100644 (file)
@@ -21,9 +21,6 @@
  *     INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  *     FOR A PARTICULAR PURPOSE.
  *
- *     Xilinx products are not intended for use in life support appliances,
- *     devices, or systems. Use in such applications is expressly prohibited.
- *
  *     (c) Copyright 2007-2008 Xilinx Inc.
  *     All rights reserved.
  *
index d16131949097696cc8a72d2d07ae6a393094ebb7..f40ab699860f4645a693f76a239473812e767493 100644 (file)
@@ -21,9 +21,6 @@
  *     INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  *     FOR A PARTICULAR PURPOSE.
  *
- *     Xilinx products are not intended for use in life support appliances,
- *     devices, or systems. Use in such applications is expressly prohibited.
- *
  *     (c) Copyright 2002 Xilinx Inc., Systems Engineering Group
  *     (c) Copyright 2004 Xilinx Inc., Systems Engineering Group
  *     (c) Copyright 2007-2008 Xilinx Inc.
index 24d0d9b938fb39e485c56d9e74d1d9ff6effa5e6..8cca11981c5ff73036eaaeb915fbcf0a050a87c5 100644 (file)
@@ -21,9 +21,6 @@
  *     INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  *     FOR A PARTICULAR PURPOSE.
  *
- *     Xilinx products are not intended for use in life support appliances,
- *     devices, or systems. Use in such applications is expressly prohibited.
- *
  *     (c) Copyright 2003-2007 Xilinx Inc.
  *     All rights reserved.
  *
index 5317e08221ecb2a34e699c77bac4f72a505f59e6..657996517374f30f51f10257dd0ef0ee40ae66b9 100644 (file)
@@ -388,7 +388,10 @@ int dma_async_device_register(struct dma_device *device)
 
        init_completion(&device->done);
        kref_init(&device->refcount);
+
+       mutex_lock(&dma_list_mutex);
        device->dev_id = id++;
+       mutex_unlock(&dma_list_mutex);
 
        /* represent channels in sysfs. Probably want devs too */
        list_for_each_entry(chan, &device->channels, device_node) {
index ecd743f7cc617b9921b7d08e553da0264d8c401c..6607fdd00b1cd3a31655cc6b53fca580919f3354 100644 (file)
@@ -1341,10 +1341,12 @@ static void ioat_dma_start_null_desc(struct ioat_dma_chan *ioat_chan)
  */
 #define IOAT_TEST_SIZE 2000
 
+DECLARE_COMPLETION(test_completion);
 static void ioat_dma_test_callback(void *dma_async_param)
 {
        printk(KERN_ERR "ioatdma: ioat_dma_test_callback(%p)\n",
                dma_async_param);
+       complete(&test_completion);
 }
 
 /**
@@ -1410,7 +1412,8 @@ static int ioat_dma_self_test(struct ioatdma_device *device)
                goto free_resources;
        }
        device->common.device_issue_pending(dma_chan);
-       msleep(1);
+
+       wait_for_completion_timeout(&test_completion, msecs_to_jiffies(3000));
 
        if (device->common.device_is_tx_complete(dma_chan, cookie, NULL, NULL)
                                        != DMA_SUCCESS) {
index c7a9306d951d2c61f622c601ef2d49af422b679e..6be3172622009ff67ec502b049f167d6ccebe1cd 100644 (file)
@@ -85,18 +85,28 @@ iop_adma_run_tx_complete_actions(struct iop_adma_desc_slot *desc,
                        enum dma_ctrl_flags flags = desc->async_tx.flags;
                        u32 src_cnt;
                        dma_addr_t addr;
+                       dma_addr_t dest;
 
+                       src_cnt = unmap->unmap_src_cnt;
+                       dest = iop_desc_get_dest_addr(unmap, iop_chan);
                        if (!(flags & DMA_COMPL_SKIP_DEST_UNMAP)) {
-                               addr = iop_desc_get_dest_addr(unmap, iop_chan);
-                               dma_unmap_page(dev, addr, len, DMA_FROM_DEVICE);
+                               enum dma_data_direction dir;
+
+                               if (src_cnt > 1) /* is xor? */
+                                       dir = DMA_BIDIRECTIONAL;
+                               else
+                                       dir = DMA_FROM_DEVICE;
+
+                               dma_unmap_page(dev, dest, len, dir);
                        }
 
                        if (!(flags & DMA_COMPL_SKIP_SRC_UNMAP)) {
-                               src_cnt = unmap->unmap_src_cnt;
                                while (src_cnt--) {
                                        addr = iop_desc_get_src_addr(unmap,
                                                                     iop_chan,
                                                                     src_cnt);
+                                       if (addr == dest)
+                                               continue;
                                        dma_unmap_page(dev, addr, len,
                                                       DMA_TO_DEVICE);
                                }
index 0328da020a1084e6c7f0fcfd0e729a00e079702d..bcda17426411ea6f4c311aa5b077a1e91e906b63 100644 (file)
@@ -311,17 +311,26 @@ mv_xor_run_tx_complete_actions(struct mv_xor_desc_slot *desc,
                        enum dma_ctrl_flags flags = desc->async_tx.flags;
                        u32 src_cnt;
                        dma_addr_t addr;
+                       dma_addr_t dest;
 
+                       src_cnt = unmap->unmap_src_cnt;
+                       dest = mv_desc_get_dest_addr(unmap);
                        if (!(flags & DMA_COMPL_SKIP_DEST_UNMAP)) {
-                               addr = mv_desc_get_dest_addr(unmap);
-                               dma_unmap_page(dev, addr, len, DMA_FROM_DEVICE);
+                               enum dma_data_direction dir;
+
+                               if (src_cnt > 1) /* is xor ? */
+                                       dir = DMA_BIDIRECTIONAL;
+                               else
+                                       dir = DMA_FROM_DEVICE;
+                               dma_unmap_page(dev, dest, len, dir);
                        }
 
                        if (!(flags & DMA_COMPL_SKIP_SRC_UNMAP)) {
-                               src_cnt = unmap->unmap_src_cnt;
                                while (src_cnt--) {
                                        addr = mv_desc_get_src_addr(unmap,
                                                                    src_cnt);
+                                       if (addr == dest)
+                                               continue;
                                        dma_unmap_page(dev, addr, len,
                                                       DMA_TO_DEVICE);
                                }
index 5fcd3d89c75d91cda65acd42fe34be8d987e9c67..4041e91432837b2d2cc9b898e10f04f20cc778ce 100644 (file)
@@ -394,6 +394,12 @@ static void edac_device_workq_function(struct work_struct *work_req)
 
        mutex_lock(&device_ctls_mutex);
 
+       /* If we are being removed, bail out immediately */
+       if (edac_dev->op_state == OP_OFFLINE) {
+               mutex_unlock(&device_ctls_mutex);
+               return;
+       }
+
        /* Only poll controllers that are running polled and have a check */
        if ((edac_dev->op_state == OP_RUNNING_POLL) &&
                (edac_dev->edac_check != NULL)) {
@@ -585,14 +591,14 @@ struct edac_device_ctl_info *edac_device_del_device(struct device *dev)
        /* mark this instance as OFFLINE */
        edac_dev->op_state = OP_OFFLINE;
 
-       /* clear workq processing on this instance */
-       edac_device_workq_teardown(edac_dev);
-
        /* deregister from global list */
        del_edac_device_from_global_list(edac_dev);
 
        mutex_unlock(&device_ctls_mutex);
 
+       /* clear workq processing on this instance */
+       edac_device_workq_teardown(edac_dev);
+
        /* Tear down the sysfs entries for this instance */
        edac_device_remove_sysfs(edac_dev);
 
index 553dd4bc307547cc1ac4928209c7f8b3423ce8a3..afa8a12cd00902c1c34ea4f4ba83e55c3b7a74e2 100644 (file)
@@ -717,7 +717,7 @@ static int i915_getparam(struct drm_device *dev, void *data,
                value = dev->pci_device;
                break;
        case I915_PARAM_HAS_GEM:
-               value = 1;
+               value = dev_priv->has_gem;
                break;
        default:
                DRM_ERROR("Unknown parameter %d\n", param->param);
@@ -830,6 +830,14 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
 
        dev_priv->regs = ioremap(base, size);
 
+#ifdef CONFIG_HIGHMEM64G
+       /* don't enable GEM on PAE - needs agp + set_memory_* interface fixes */
+       dev_priv->has_gem = 0;
+#else
+       /* enable GEM by default */
+       dev_priv->has_gem = 1;
+#endif
+
        i915_gem_load(dev);
 
        /* Init HWS */
index adc972cc6bfc03a28038841b2f6a43ff578e0fb3..b3cc4731aa7c07b43d2d9825068f3e8a70ce34bd 100644 (file)
@@ -106,6 +106,8 @@ struct intel_opregion {
 typedef struct drm_i915_private {
        struct drm_device *dev;
 
+       int has_gem;
+
        void __iomem *regs;
        drm_local_map_t *sarea;
 
index ad672d8548289b8e7a934123d2ff4878f272b6e0..24fe8c10b4b22c6bac1cfa17d79d55f02dd59179 100644 (file)
@@ -2309,7 +2309,14 @@ i915_gem_busy_ioctl(struct drm_device *dev, void *data,
        }
 
        obj_priv = obj->driver_private;
-       args->busy = obj_priv->active;
+       /* Don't count being on the flushing list against the object being
+        * done.  Otherwise, a buffer left on the flushing list but not getting
+        * flushed (because nobody's flushing that domain) won't ever return
+        * unbusy and get reused by libdrm's bo cache.  The other expected
+        * consumer of this interface, OpenGL's occlusion queries, also specs
+        * that the objects get unbusy "eventually" without any interference.
+        */
+       args->busy = obj_priv->active && obj_priv->last_rendering_seqno != 0;
 
        drm_gem_object_unreference(obj);
        mutex_unlock(&dev->struct_mutex);
index 99be11418ac2dcecf8b3718ca5e8ba82478dc0b1..8289e16419a8d24566559223489037860809ec54 100644 (file)
@@ -44,7 +44,7 @@ void radeon_irq_set_state(struct drm_device *dev, u32 mask, int state)
        else
                dev_priv->irq_enable_reg &= ~mask;
 
-       if (!dev->irq_enabled)
+       if (dev->irq_enabled)
                RADEON_WRITE(RADEON_GEN_INT_CNTL, dev_priv->irq_enable_reg);
 }
 
@@ -57,7 +57,7 @@ static void r500_vbl_irq_set_state(struct drm_device *dev, u32 mask, int state)
        else
                dev_priv->r500_disp_irq_reg &= ~mask;
 
-       if (!dev->irq_enabled)
+       if (dev->irq_enabled)
                RADEON_WRITE(R500_DxMODE_INT_MASK, dev_priv->r500_disp_irq_reg);
 }
 
index 228f75723063968c4e77fbb374e5421e5c87e393..3fcf78e906db185187d10c87466786fb3c3280c2 100644 (file)
@@ -365,6 +365,7 @@ static int cpm_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
                pmsg = &msgs[tptr];
                if (pmsg->flags & I2C_M_RD)
                        ret = wait_event_interruptible_timeout(cpm->i2c_wait,
+                               (in_be16(&tbdf[tptr].cbd_sc) & BD_SC_NAK) ||
                                !(in_be16(&rbdf[rptr].cbd_sc) & BD_SC_EMPTY),
                                1 * HZ);
                else
index f4d22ae9d294a48fb69e1f53e4f46d5d496f7ce7..e5a8dae4a2890435f065e2b97017b83179647bcc 100644 (file)
@@ -92,7 +92,7 @@ static void highlander_i2c_setup(struct highlander_i2c_dev *dev)
 static void smbus_write_data(u8 *src, u16 *dst, int len)
 {
        for (; len > 1; len -= 2) {
-               *dst++ = be16_to_cpup((u16 *)src);
+               *dst++ = be16_to_cpup((__be16 *)src);
                src += 2;
        }
 
@@ -103,7 +103,7 @@ static void smbus_write_data(u8 *src, u16 *dst, int len)
 static void smbus_read_data(u16 *src, u8 *dst, int len)
 {
        for (; len > 1; len -= 2) {
-               *(u16 *)dst = cpu_to_be16p(src++);
+               *(__be16 *)dst = cpu_to_be16p(src++);
                dst += 2;
        }
 
index dcf2045b5222b44aac99b568f7170701ecf0ae78..0bdb2d7f0570bd465e59b4b87ef23dd33db04b1d 100644 (file)
@@ -486,7 +486,7 @@ static enum pmcmsptwi_xfer_result pmcmsptwi_xfer_cmd(
 
        if (cmd->type == MSP_TWI_CMD_WRITE ||
            cmd->type == MSP_TWI_CMD_WRITE_READ) {
-               __be64 tmp = cpu_to_be64p((u64 *)cmd->write_data);
+               u64 tmp = be64_to_cpup((__be64 *)cmd->write_data);
                tmp >>= (MSP_MAX_BYTES_PER_RW - cmd->write_len) * 8;
                dev_dbg(&pmcmsptwi_adapter.dev, "Writing 0x%016llx\n", tmp);
                pmcmsptwi_writel(tmp & 0x00000000ffffffffLL,
index 1fac4e233133879c8b06b07045c5318d87b91840..b7434d24904ebfa9750d655df8ab42f521ec2c40 100644 (file)
@@ -56,6 +56,7 @@ enum s3c24xx_i2c_state {
 struct s3c24xx_i2c {
        spinlock_t              lock;
        wait_queue_head_t       wait;
+       unsigned int            suspended:1;
 
        struct i2c_msg          *msg;
        unsigned int            msg_num;
@@ -507,7 +508,7 @@ static int s3c24xx_i2c_doxfer(struct s3c24xx_i2c *i2c, struct i2c_msg *msgs, int
        unsigned long timeout;
        int ret;
 
-       if (!(readl(i2c->regs + S3C2410_IICCON) & S3C2410_IICCON_IRQEN))
+       if (i2c->suspended)
                return -EIO;
 
        ret = s3c24xx_i2c_set_master(i2c);
@@ -986,17 +987,26 @@ static int s3c24xx_i2c_remove(struct platform_device *pdev)
 }
 
 #ifdef CONFIG_PM
+static int s3c24xx_i2c_suspend_late(struct platform_device *dev,
+                                   pm_message_t msg)
+{
+       struct s3c24xx_i2c *i2c = platform_get_drvdata(dev);
+       i2c->suspended = 1;
+       return 0;
+}
+
 static int s3c24xx_i2c_resume(struct platform_device *dev)
 {
        struct s3c24xx_i2c *i2c = platform_get_drvdata(dev);
 
-       if (i2c != NULL)
-               s3c24xx_i2c_init(i2c);
+       i2c->suspended = 0;
+       s3c24xx_i2c_init(i2c);
 
        return 0;
 }
 
 #else
+#define s3c24xx_i2c_suspend_late NULL
 #define s3c24xx_i2c_resume NULL
 #endif
 
@@ -1005,6 +1015,7 @@ static int s3c24xx_i2c_resume(struct platform_device *dev)
 static struct platform_driver s3c2410_i2c_driver = {
        .probe          = s3c24xx_i2c_probe,
        .remove         = s3c24xx_i2c_remove,
+       .suspend_late   = s3c24xx_i2c_suspend_late,
        .resume         = s3c24xx_i2c_resume,
        .driver         = {
                .owner  = THIS_MODULE,
@@ -1015,6 +1026,7 @@ static struct platform_driver s3c2410_i2c_driver = {
 static struct platform_driver s3c2440_i2c_driver = {
        .probe          = s3c24xx_i2c_probe,
        .remove         = s3c24xx_i2c_remove,
+       .suspend_late   = s3c24xx_i2c_suspend_late,
        .resume         = s3c24xx_i2c_resume,
        .driver         = {
                .owner  = THIS_MODULE,
index 53f079cc00afc010f2cf62b643fe98432feceea8..d8ede85fe17f4428be6713394e678af59c1457b2 100644 (file)
@@ -81,11 +81,12 @@ static u8 cs5530_udma_filter(ide_drive_t *drive)
 {
        ide_hwif_t *hwif = drive->hwif;
        ide_drive_t *mate = ide_get_pair_dev(drive);
-       u16 *mateid = mate->id;
+       u16 *mateid;
        u8 mask = hwif->ultra_mask;
 
        if (mate == NULL)
                goto out;
+       mateid = mate->id;
 
        if (ata_id_has_dma(mateid) && __ide_dma_bad_drive(mate) == 0) {
                if ((mateid[ATA_ID_FIELD_VALID] & 4) &&
index 244a8a052ce85ff3b7bdbe6a28ab5a234b847359..9e8d52a4f3066b1e1df712f9df407ec25c5b8d89 100644 (file)
 #include <linux/dmi.h>
 
 #include <acpi/acpi_bus.h>
-#include <acpi/acnames.h>
-#include <acpi/acnamesp.h>
-#include <acpi/acparser.h>
-#include <acpi/acexcep.h>
-#include <acpi/acmacros.h>
-#include <acpi/actypes.h>
 
 #define REGS_PER_GTF           7
 struct taskfile_array {
index f1a8758e3a99f7d8b6953782c4150c35fefb8097..ec7f766ef5e44ff6387e962592c5a985282de4c9 100644 (file)
@@ -104,11 +104,12 @@ static u8 sc1200_udma_filter(ide_drive_t *drive)
 {
        ide_hwif_t *hwif = drive->hwif;
        ide_drive_t *mate = ide_get_pair_dev(drive);
-       u16 *mateid = mate->id;
+       u16 *mateid;
        u8 mask = hwif->ultra_mask;
 
        if (mate == NULL)
                goto out;
+       mateid = mate->id;
 
        if (ata_id_has_dma(mateid) && __ide_dma_bad_drive(mate) == 0) {
                if ((mateid[ATA_ID_FIELD_VALID] & 4) &&
index d333ae22459c9d697c9d71ba7dd462f2af2f51d6..79ef5fd928ae42c0d8252f1d8bf07c479782be9c 100644 (file)
@@ -115,8 +115,14 @@ static int nodemgr_bus_read(struct csr1212_csr *csr, u64 addr, u16 length,
        return error;
 }
 
+#define OUI_FREECOM_TECHNOLOGIES_GMBH 0x0001db
+
 static int nodemgr_get_max_rom(quadlet_t *bus_info_data, void *__ci)
 {
+       /* Freecom FireWire Hard Drive firmware bug */
+       if (be32_to_cpu(bus_info_data[3]) >> 8 == OUI_FREECOM_TECHNOLOGIES_GMBH)
+               return 0;
+
        return (be32_to_cpu(bus_info_data[2]) >> 8) & 0x3;
 }
 
index ac89a5deaca2e12fa62ccb78f1d62b088039675c..ab7c8e4a61f943c516ae5a3534e8775c33180f6b 100644 (file)
@@ -208,15 +208,18 @@ static void bitmap_checkfree(struct bitmap *bitmap, unsigned long page)
  */
 
 /* IO operations when bitmap is stored near all superblocks */
-static struct page *read_sb_page(mddev_t *mddev, long offset, unsigned long index)
+static struct page *read_sb_page(mddev_t *mddev, long offset,
+                                struct page *page,
+                                unsigned long index, int size)
 {
        /* choose a good rdev and read the page from there */
 
        mdk_rdev_t *rdev;
        struct list_head *tmp;
-       struct page *page = alloc_page(GFP_KERNEL);
        sector_t target;
 
+       if (!page)
+               page = alloc_page(GFP_KERNEL);
        if (!page)
                return ERR_PTR(-ENOMEM);
 
@@ -227,7 +230,9 @@ static struct page *read_sb_page(mddev_t *mddev, long offset, unsigned long inde
 
                target = rdev->sb_start + offset + index * (PAGE_SIZE/512);
 
-               if (sync_page_io(rdev->bdev, target, PAGE_SIZE, page, READ)) {
+               if (sync_page_io(rdev->bdev, target,
+                                roundup(size, bdev_hardsect_size(rdev->bdev)),
+                                page, READ)) {
                        page->index = index;
                        attach_page_buffers(page, NULL); /* so that free_buffer will
                                                          * quietly no-op */
@@ -544,7 +549,9 @@ static int bitmap_read_sb(struct bitmap *bitmap)
 
                bitmap->sb_page = read_page(bitmap->file, 0, bitmap, bytes);
        } else {
-               bitmap->sb_page = read_sb_page(bitmap->mddev, bitmap->offset, 0);
+               bitmap->sb_page = read_sb_page(bitmap->mddev, bitmap->offset,
+                                              NULL,
+                                              0, sizeof(bitmap_super_t));
        }
        if (IS_ERR(bitmap->sb_page)) {
                err = PTR_ERR(bitmap->sb_page);
@@ -957,11 +964,16 @@ static int bitmap_init_from_disk(struct bitmap *bitmap, sector_t start)
                                 */
                                page = bitmap->sb_page;
                                offset = sizeof(bitmap_super_t);
+                               read_sb_page(bitmap->mddev, bitmap->offset,
+                                            page,
+                                            index, count);
                        } else if (file) {
                                page = read_page(file, index, bitmap, count);
                                offset = 0;
                        } else {
-                               page = read_sb_page(bitmap->mddev, bitmap->offset, index);
+                               page = read_sb_page(bitmap->mddev, bitmap->offset,
+                                                   NULL,
+                                                   index, count);
                                offset = 0;
                        }
                        if (IS_ERR(page)) { /* read error */
index 73dc2ee9b014021a5681d83be1badd96802010bc..b34301d56cd2859f7b248ee0df8c7899317d59d5 100644 (file)
@@ -9,11 +9,11 @@ config DVB_B2C2_FLEXCOP
        select DVB_STV0297 if !DVB_FE_CUSTOMISE
        select DVB_BCM3510 if !DVB_FE_CUSTOMISE
        select DVB_LGDT330X if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_SIMPLE if !DVB_FE_CUSTOMISE
        select DVB_S5H1420 if !DVB_FE_CUSTOMISE
        select DVB_TUNER_ITD1000 if !DVB_FE_CUSTOMISE
        select DVB_ISL6421 if !DVB_FE_CUSTOMISE
        select DVB_CX24123 if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_SIMPLE if !MEDIA_TUNER_CUSTOMIZE
        help
          Support for the digital TV receiver chip made by B2C2 Inc. included in
          Technisats PCI cards and USB boxes.
index a127a4175c402a45c1940d7dec586762557544b5..5cded370854167b2d3db6ffec80e7914ad7437f1 100644 (file)
@@ -628,12 +628,14 @@ int flexcop_frontend_init(struct flexcop_device *fc)
        }
 
        /* try the cable dvb (stv0297) */
+       fc->fc_i2c_adap[0].no_base_addr = 1;
        fc->fe = dvb_attach(stv0297_attach, &alps_tdee4_stv0297_config, i2c);
        if (fc->fe != NULL) {
                fc->dev_type = FC_CABLE;
                fc->fe->ops.tuner_ops.set_params = alps_tdee4_stv0297_tuner_set_params;
                goto fe_found;
        }
+       fc->fc_i2c_adap[0].no_base_addr = 0;
 
        /* try the sky v2.3 (vp310/Samsung tbdu18132(tsa5059)) */
        fc->fe = dvb_attach(mt312_attach,
index 43a112ec6d44f146b260c64cf12446d036e1283a..f13783f08f0f4e09bd054c38806792e1289af3a4 100644 (file)
@@ -47,8 +47,12 @@ static int flexcop_i2c_read4(struct flexcop_i2c_adapter *i2c,
        int len = r100.tw_sm_c_100.total_bytes, /* remember total_bytes is buflen-1 */
                ret;
 
-       r100.tw_sm_c_100.no_base_addr_ack_error = i2c->no_base_addr;
        ret = flexcop_i2c_operation(i2c->fc, &r100);
+       if (ret != 0) {
+               deb_i2c("Retrying operation\n");
+               r100.tw_sm_c_100.no_base_addr_ack_error = i2c->no_base_addr;
+               ret = flexcop_i2c_operation(i2c->fc, &r100);
+       }
        if (ret != 0) {
                deb_i2c("read failed. %d\n", ret);
                return ret;
index 7e9c090fc04ea9ae2e7273890fce6f5c04241db1..27edb0ece58752b0617f9bdb2bd26ef05500f510 100644 (file)
@@ -8,7 +8,7 @@ config DVB_BT8XX
        select DVB_OR51211 if !DVB_FE_CUSTOMISE
        select DVB_LGDT330X if !DVB_FE_CUSTOMISE
        select DVB_ZL10353 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_SIMPLE if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_SIMPLE if !MEDIA_TUNER_CUSTOMIZE
        help
          Support for PCI cards based on the Bt8xx PCI bridge. Examples are
          the Nebula cards, the Pinnacle PCTV cards, the Twinhan DST cards,
index 62b68c291d9968636ebe62a2a1605afc9a712d38..49f7b20c25d6f134f883d5c3c1e15cbebeb5a547 100644 (file)
@@ -24,8 +24,8 @@ config DVB_USB_A800
        tristate "AVerMedia AverTV DVB-T USB 2.0 (A800)"
        depends on DVB_USB
        select DVB_DIB3000MC
-       select MEDIA_TUNER_MT2060 if !DVB_FE_CUSTOMISE
        select DVB_PLL if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_MT2060 if !MEDIA_TUNER_CUSTOMIZE
        help
          Say Y here to support the AVerMedia AverTV DVB-T USB 2.0 (A800) receiver.
 
@@ -34,7 +34,7 @@ config DVB_USB_DIBUSB_MB
        depends on DVB_USB
        select DVB_PLL if !DVB_FE_CUSTOMISE
        select DVB_DIB3000MB
-       select MEDIA_TUNER_MT2060 if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_MT2060 if !MEDIA_TUNER_CUSTOMIZE
        help
          Support for USB 1.1 and 2.0 DVB-T receivers based on reference designs made by
          DiBcom (<http://www.dibcom.fr>) equipped with a DiB3000M-B demodulator.
@@ -55,7 +55,7 @@ config DVB_USB_DIBUSB_MC
        tristate "DiBcom USB DVB-T devices (based on the DiB3000M-C/P) (see help for device list)"
        depends on DVB_USB
        select DVB_DIB3000MC
-       select MEDIA_TUNER_MT2060 if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_MT2060 if !MEDIA_TUNER_CUSTOMIZE
        help
          Support for USB2.0 DVB-T receivers based on reference designs made by
          DiBcom (<http://www.dibcom.fr>) equipped with a DiB3000M-C/P demodulator.
@@ -73,11 +73,11 @@ config DVB_USB_DIB0700
        select DVB_DIB7000M
        select DVB_DIB3000MC
        select DVB_S5H1411 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_MT2060 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_MT2266 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_XC2028 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_XC5000 if !DVB_FE_CUSTOMIZE
        select DVB_TUNER_DIB0070
+       select MEDIA_TUNER_MT2060 if !MEDIA_TUNER_CUSTOMIZE
+       select MEDIA_TUNER_MT2266 if !MEDIA_TUNER_CUSTOMIZE
+       select MEDIA_TUNER_XC2028 if !MEDIA_TUNER_CUSTOMIZE
+       select MEDIA_TUNER_XC5000 if !MEDIA_TUNER_CUSTOMIZE
        help
          Support for USB2.0/1.1 DVB receivers based on the DiB0700 USB bridge. The
          USB bridge is also present in devices having the DiB7700 DVB-T-USB
@@ -95,7 +95,7 @@ config DVB_USB_UMT_010
        depends on DVB_USB
        select DVB_PLL if !DVB_FE_CUSTOMISE
        select DVB_DIB3000MC
-       select MEDIA_TUNER_MT2060 if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_MT2060 if !MEDIA_TUNER_CUSTOMIZE
        help
          Say Y here to support the HanfTek UMT-010 USB2.0 stick-sized DVB-T receiver.
 
@@ -107,11 +107,11 @@ config DVB_USB_CXUSB
        select DVB_LGDT330X if !DVB_FE_CUSTOMISE
        select DVB_MT352 if !DVB_FE_CUSTOMISE
        select DVB_ZL10353 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_SIMPLE if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_XC2028 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_MXL5005S if !DVB_FE_CUSTOMISE
        select DVB_DIB7000P if !DVB_FE_CUSTOMISE
        select DVB_TUNER_DIB0070 if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_SIMPLE if !MEDIA_TUNER_CUSTOMIZE
+       select MEDIA_TUNER_XC2028 if !MEDIA_TUNER_CUSTOMIZE
+       select MEDIA_TUNER_MXL5005S if !MEDIA_TUNER_CUSTOMIZE
        help
          Say Y here to support the Conexant USB2.0 hybrid reference design.
          Currently, only DVB and ATSC modes are supported, analog mode
@@ -124,9 +124,9 @@ config DVB_USB_M920X
        tristate "Uli m920x DVB-T USB2.0 support"
        depends on DVB_USB
        select DVB_MT352 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_QT1010 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_TDA827X if !DVB_FE_CUSTOMISE
        select DVB_TDA1004X if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_QT1010 if !MEDIA_TUNER_CUSTOMIZE
+       select MEDIA_TUNER_TDA827X if !MEDIA_TUNER_CUSTOMIZE
        help
          Say Y here to support the MSI Mega Sky 580 USB2.0 DVB-T receiver.
          Currently, only devices with a product id of
@@ -137,7 +137,7 @@ config DVB_USB_GL861
        tristate "Genesys Logic GL861 USB2.0 support"
        depends on DVB_USB
        select DVB_ZL10353 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_QT1010 if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_QT1010 if !MEDIA_TUNER_CUSTOMIZE
        help
          Say Y here to support the MSI Megasky 580 (55801) DVB-T USB2.0
          receiver with USB ID 0db0:5581.
@@ -146,7 +146,7 @@ config DVB_USB_AU6610
        tristate "Alcor Micro AU6610 USB2.0 support"
        depends on DVB_USB
        select DVB_ZL10353 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_QT1010 if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_QT1010 if !MEDIA_TUNER_CUSTOMIZE
        help
          Say Y here to support the Sigmatek DVB-110 DVB-T USB2.0 receiver.
 
@@ -198,8 +198,8 @@ config DVB_USB_NOVA_T_USB2
        tristate "Hauppauge WinTV-NOVA-T usb2 DVB-T USB2.0 support"
        depends on DVB_USB
        select DVB_DIB3000MC
-       select MEDIA_TUNER_MT2060 if !DVB_FE_CUSTOMISE
        select DVB_PLL if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_MT2060 if !MEDIA_TUNER_CUSTOMIZE
        help
          Say Y here to support the Hauppauge WinTV-NOVA-T usb2 DVB-T USB2.0 receiver.
 
@@ -235,8 +235,8 @@ config DVB_USB_OPERA1
 config DVB_USB_AF9005
        tristate "Afatech AF9005 DVB-T USB1.1 support"
        depends on DVB_USB && EXPERIMENTAL
-       select MEDIA_TUNER_MT2060 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_QT1010 if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_MT2060 if !MEDIA_TUNER_CUSTOMIZE
+       select MEDIA_TUNER_QT1010 if !MEDIA_TUNER_CUSTOMIZE
        help
          Say Y here to support the Afatech AF9005 based DVB-T USB1.1 receiver
          and the TerraTec Cinergy T USB XE (Rev.1)
@@ -284,7 +284,7 @@ config DVB_USB_DTV5100
        tristate "AME DTV-5100 USB2.0 DVB-T support"
        depends on DVB_USB
        select DVB_ZL10353 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_QT1010 if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_QT1010 if !MEDIA_TUNER_CUSTOMIZE
        help
          Say Y here to support the AME DTV-5100 USB2.0 DVB-T receiver.
 
@@ -293,9 +293,9 @@ config DVB_USB_AF9015
        depends on DVB_USB && EXPERIMENTAL
        select DVB_AF9013
        select DVB_PLL              if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_MT2060   if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_QT1010   if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_TDA18271 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_MXL5005S if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_MT2060   if !MEDIA_TUNER_CUSTOMIZE
+       select MEDIA_TUNER_QT1010   if !MEDIA_TUNER_CUSTOMIZE
+       select MEDIA_TUNER_TDA18271 if !MEDIA_TUNER_CUSTOMIZE
+       select MEDIA_TUNER_MXL5005S if !MEDIA_TUNER_CUSTOMIZE
        help
          Say Y here to support the Afatech AF9015 based DVB-T USB2.0 receiver
index f28d3ae59e046cd8e9d1d6c74565848ccb4a9833..3917327889117bcff8cf27f315c8a3d70fcb27c7 100644 (file)
@@ -446,13 +446,13 @@ static int stk7700ph_tuner_attach(struct dvb_usb_adapter *adap)
                == NULL ? -ENODEV : 0;
 }
 
-#define DEFAULT_RC_INTERVAL 150
+#define DEFAULT_RC_INTERVAL 50
 
 static u8 rc_request[] = { REQUEST_POLL_RC, 0 };
 
 /* Number of keypresses to ignore before start repeating */
-#define RC_REPEAT_DELAY 2
-#define RC_REPEAT_DELAY_V1_20 5
+#define RC_REPEAT_DELAY 6
+#define RC_REPEAT_DELAY_V1_20 10
 
 
 
index 867027ceab3e71d29ce43b3944104043670eeb99..401a04effc06817befbc4d6772565c430648d78a 100644 (file)
@@ -106,7 +106,7 @@ config DVB_BUDGET_CI
        select DVB_TDA1004X if !DVB_FE_CUSTOMISE
        select DVB_LNBP21 if !DVB_FE_CUSTOMISE
        select DVB_TDA10023 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_TDA827X if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_TDA827X if !MEDIA_TUNER_CUSTOMIZE
        select VIDEO_IR
        help
          Support for simple SAA7146 based DVB cards
index e6ca4012b5f0f78fab90212e546aa1b6f0cd4946..0ea85a05e5c0d86911d9a62fe3445e472cf1e877 100644 (file)
@@ -831,7 +831,7 @@ long v4l_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg)
 {
        int ret = -ENOIOCTLCMD;
 
-       if (!file->f_op->ioctl)
+       if (!file->f_op->ioctl && !file->f_op->unlocked_ioctl)
                return ret;
 
        switch (cmd) {
index ef48565de7f1b7c5fdcd61e69fdb6e78b9ca9f83..8940b5387decc4fda02d8f41a3a86189d2380803 100644 (file)
@@ -9,7 +9,7 @@ config VIDEO_CX18
        select VIDEO_CX2341X
        select VIDEO_CS5345
        select DVB_S5H1409 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_MXL5005S if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_MXL5005S if !MEDIA_TUNER_CUSTOMIZE
        ---help---
          This is a video4linux driver for Conexant cx23418 based
          PCI combo video recorder devices.
index 8c1b7fa47a41cc36f35d3f4c763ff65c190e792c..00f1e2e8889e7fe23431827e17ce9f8b862d2714 100644 (file)
@@ -11,16 +11,16 @@ config VIDEO_CX23885
        select VIDEO_CX25840
        select VIDEO_CX2341X
        select DVB_DIB7000P if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_MT2131 if !DVB_FE_CUSTOMISE
        select DVB_S5H1409 if !DVB_FE_CUSTOMISE
        select DVB_S5H1411 if !DVB_FE_CUSTOMISE
        select DVB_LGDT330X if !DVB_FE_CUSTOMISE
        select DVB_ZL10353 if !DVB_FE_CUSTOMISE
+       select DVB_TDA10048 if !DVB_FE_CUSTOMIZE
+       select MEDIA_TUNER_MT2131 if !MEDIA_TUNER_CUSTOMIZE
        select MEDIA_TUNER_XC2028 if !DVB_FE_CUSTOMIZE
        select MEDIA_TUNER_TDA8290 if !DVB_FE_CUSTOMIZE
        select MEDIA_TUNER_TDA18271 if !DVB_FE_CUSTOMIZE
        select MEDIA_TUNER_XC5000 if !DVB_FE_CUSTOMIZE
-       select DVB_TDA10048 if !DVB_FE_CUSTOMIZE
        ---help---
          This is a video4linux driver for Conexant 23885 based
          TV cards.
index 0b9e5fac6239f5783e0f42e24f8eb9d1c700dfed..b0f837588e01ee9bb5a8d4c14f7617958a33be19 100644 (file)
@@ -56,12 +56,12 @@ config VIDEO_CX88_DVB
        select DVB_NXT200X if !DVB_FE_CUSTOMISE
        select DVB_CX24123 if !DVB_FE_CUSTOMISE
        select DVB_ISL6421 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_SIMPLE if !DVB_FE_CUSTOMISE
        select DVB_S5H1411 if !DVB_FE_CUSTOMISE
        select DVB_CX24116 if !DVB_FE_CUSTOMISE
        select DVB_STV0299 if !DVB_FE_CUSTOMISE
        select DVB_STV0288 if !DVB_FE_CUSTOMISE
        select DVB_STB6000 if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_SIMPLE if !MEDIA_TUNER_CUSTOMIZE
        ---help---
          This adds support for DVB/ATSC cards based on the
          Conexant 2388x chip.
index 610f535a257cd3c47b40d80484ad952177aaec38..4ea1f1e048979e51859652d93e24846a7f39fd3e 100644 (file)
@@ -549,10 +549,11 @@ static int em28xx_config(struct em28xx *dev)
 static void em28xx_config_i2c(struct em28xx *dev)
 {
        struct v4l2_routing route;
+       int zero = 0;
 
        route.input = INPUT(dev->ctl_input)->vmux;
        route.output = 0;
-       em28xx_i2c_call_clients(dev, VIDIOC_INT_RESET, NULL);
+       em28xx_i2c_call_clients(dev, VIDIOC_INT_RESET, &zero);
        em28xx_i2c_call_clients(dev, VIDIOC_INT_S_VIDEO_ROUTING, &route);
        em28xx_i2c_call_clients(dev, VIDIOC_STREAMON, NULL);
 }
index 748a87e82e4423e2b9ecfb4c4ac621a339231e4a..02a6e9ef033740d7401b6bd1ccd5966552add823 100644 (file)
@@ -1264,10 +1264,10 @@ static int vidioc_s_jpegcomp(struct file *file, void *priv,
        struct gspca_dev *gspca_dev = priv;
        int ret;
 
-       if (mutex_lock_interruptible(&gspca_dev->usb_lock))
-               return -ERESTARTSYS;
        if (!gspca_dev->sd_desc->set_jcomp)
                return -EINVAL;
+       if (mutex_lock_interruptible(&gspca_dev->usb_lock))
+               return -ERESTARTSYS;
        ret = gspca_dev->sd_desc->set_jcomp(gspca_dev, jpegcomp);
        mutex_unlock(&gspca_dev->usb_lock);
        return ret;
index 19eb274c9cd09d2f361154ed764d152472df709f..854c2a88535880a3e2a6c2d560303c46faaa8f2f 100644 (file)
@@ -42,7 +42,7 @@ config VIDEO_PVRUSB2_DVB
        select DVB_S5H1411 if !DVB_FE_CUSTOMISE
        select DVB_TDA10048 if !DVB_FE_CUSTOMIZE
        select MEDIA_TUNER_TDA18271 if !DVB_FE_CUSTOMIZE
-       select MEDIA_TUNER_SIMPLE if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_SIMPLE if !MEDIA_TUNER_CUSTOMIZE
        select MEDIA_TUNER_TDA8290 if !DVB_FE_CUSTOMIZE
        ---help---
 
index 7021bbf5897b3ac6988fd5d42d28bc70a4231c9f..fc2164e28e76d11bbcb12fa60de4cb69d8acb7f3 100644 (file)
@@ -34,9 +34,9 @@ config VIDEO_SAA7134_DVB
        select DVB_NXT200X if !DVB_FE_CUSTOMISE
        select DVB_TDA10086 if !DVB_FE_CUSTOMISE
        select DVB_TDA826X if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_TDA827X if !DVB_FE_CUSTOMISE
        select DVB_ISL6421 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_SIMPLE if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_TDA827X if !MEDIA_TUNER_CUSTOMIZE
+       select MEDIA_TUNER_SIMPLE if !MEDIA_TUNER_CUSTOMIZE
        ---help---
          This adds support for DVB cards based on the
          Philips saa7134 chip.
index d62fd4f6b52e054db684e2af1e30ac12fa3a9240..ee090413e598e4254cad01d211e465e46e081f48 100644 (file)
@@ -2008,6 +2008,9 @@ mptscsih_host_reset(struct scsi_cmnd *SCpnt)
                return FAILED;
        }
 
+       /* make sure we have no outstanding commands at this stage */
+       mptscsih_flush_running_cmds(hd);
+
        ioc = hd->ioc;
        printk(MYIOC_s_INFO_FMT "attempting host reset! (sc=%p)\n",
            ioc->name, SCpnt);
index fee7304102af8158ca3882bccb854f0f6fcb2bbe..d9aac2e653912624106f69a10624a88b9d41798d 100644 (file)
@@ -428,10 +428,10 @@ config EEEPC_LAPTOP
        tristate "Eee PC Hotkey Driver (EXPERIMENTAL)"
        depends on X86
        depends on ACPI
-       depends on BACKLIGHT_CLASS_DEVICE
-       depends on HWMON
        depends on EXPERIMENTAL
-       depends on RFKILL
+       select BACKLIGHT_CLASS_DEVICE
+       select HWMON
+       select RFKILL
        ---help---
          This driver supports the Fn-Fx keys on Eee PC laptops.
          It also adds the ability to switch camera/wlan on/off.
index 4a1bc64485d5a61523a2eaee5975555c843ac859..f30db367c82eed36540b9db55f7e6b9abb72267b 100644 (file)
@@ -241,8 +241,6 @@ static int acpi_pcc_write_sset(struct pcc_acpi *pcc, int func, int val)
        };
        acpi_status status = AE_OK;
 
-       ACPI_FUNCTION_TRACE("acpi_pcc_write_sset");
-
        status = acpi_evaluate_object(pcc->handle, METHOD_HKEY_SSET,
                                      &params, NULL);
 
@@ -254,8 +252,6 @@ static inline int acpi_pcc_get_sqty(struct acpi_device *device)
        unsigned long long s;
        acpi_status status;
 
-       ACPI_FUNCTION_TRACE("acpi_pcc_get_sqty");
-
        status = acpi_evaluate_integer(device->handle, METHOD_HKEY_SQTY,
                                       NULL, &s);
        if (ACPI_SUCCESS(status))
@@ -274,8 +270,6 @@ static int acpi_pcc_retrieve_biosdata(struct pcc_acpi *pcc, u32 *sinf)
        union acpi_object *hkey = NULL;
        int i;
 
-       ACPI_FUNCTION_TRACE("acpi_pcc_retrieve_biosdata");
-
        status = acpi_evaluate_object(pcc->handle, METHOD_HKEY_SINF, 0,
                                      &buffer);
        if (ACPI_FAILURE(status)) {
@@ -501,8 +495,6 @@ static void acpi_pcc_generate_keyinput(struct pcc_acpi *pcc)
        int key_code, hkey_num;
        unsigned long long result;
 
-       ACPI_FUNCTION_TRACE("acpi_pcc_generate_keyinput");
-
        rc = acpi_evaluate_integer(pcc->handle, METHOD_HKEY_QUERY,
                                   NULL, &result);
        if (!ACPI_SUCCESS(rc)) {
@@ -538,8 +530,6 @@ static void acpi_pcc_hotkey_notify(acpi_handle handle, u32 event, void *data)
 {
        struct pcc_acpi *pcc = (struct pcc_acpi *) data;
 
-       ACPI_FUNCTION_TRACE("acpi_pcc_hotkey_notify");
-
        switch (event) {
        case HKEY_NOTIFY:
                acpi_pcc_generate_keyinput(pcc);
@@ -554,8 +544,6 @@ static int acpi_pcc_init_input(struct pcc_acpi *pcc)
 {
        int i, rc;
 
-       ACPI_FUNCTION_TRACE("acpi_pcc_init_input");
-
        pcc->input_dev = input_allocate_device();
        if (!pcc->input_dev) {
                ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
@@ -597,8 +585,6 @@ static int acpi_pcc_hotkey_resume(struct acpi_device *device)
        struct pcc_acpi *pcc = acpi_driver_data(device);
        acpi_status status = AE_OK;
 
-       ACPI_FUNCTION_TRACE("acpi_pcc_hotkey_resume");
-
        if (device == NULL || pcc == NULL)
                return -EINVAL;
 
@@ -616,8 +602,6 @@ static int acpi_pcc_hotkey_add(struct acpi_device *device)
        struct pcc_acpi *pcc;
        int num_sifr, result;
 
-       ACPI_FUNCTION_TRACE("acpi_pcc_hotkey_add");
-
        if (!device)
                return -EINVAL;
 
@@ -714,8 +698,6 @@ static int __init acpi_pcc_init(void)
 {
        int result = 0;
 
-       ACPI_FUNCTION_TRACE("acpi_pcc_init");
-
        if (acpi_disabled)
                return -ENODEV;
 
@@ -733,8 +715,6 @@ static int acpi_pcc_hotkey_remove(struct acpi_device *device, int type)
 {
        struct pcc_acpi *pcc = acpi_driver_data(device);
 
-       ACPI_FUNCTION_TRACE("acpi_pcc_hotkey_remove");
-
        if (!device || !pcc)
                return -EINVAL;
 
@@ -757,8 +737,6 @@ static int acpi_pcc_hotkey_remove(struct acpi_device *device, int type)
 
 static void __exit acpi_pcc_exit(void)
 {
-       ACPI_FUNCTION_TRACE("acpi_pcc_exit");
-
        acpi_bus_unregister_driver(&acpi_pcc_driver);
 }
 
index 571b211608d1a7224575d99fe3ca5e27cccd03a2..537959d07148a9c3f1e76ec0637b6de3c65ac1cb 100644 (file)
@@ -935,14 +935,17 @@ static void sony_acpi_notify(acpi_handle handle, u32 event, void *data)
 static acpi_status sony_walk_callback(acpi_handle handle, u32 level,
                                      void *context, void **return_value)
 {
-       struct acpi_namespace_node *node;
-       union acpi_operand_object *operand;
+       struct acpi_device_info *info;
+       struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
 
-       node = (struct acpi_namespace_node *)handle;
-       operand = (union acpi_operand_object *)node->object;
+       if (ACPI_SUCCESS(acpi_get_object_info(handle, &buffer))) {
+               info = buffer.pointer;
 
-       printk(KERN_WARNING DRV_PFX "method: name: %4.4s, args %X\n", node->name.ascii,
-              (u32) operand->method.param_count);
+               printk(KERN_WARNING DRV_PFX "method: name: %4.4s, args %X\n",
+                       (char *)&info->name, info->param_count);
+
+               kfree(buffer.pointer);
+       }
 
        return AE_OK;
 }
index f25e4c974dcf9d7f4ff557451d234cd6d2a05428..b4a4aa9ee482edacecb4224b4245ee8db2ba0c7f 100644 (file)
@@ -30,7 +30,6 @@
 #include <linux/init.h>
 #include <linux/types.h>
 #include <acpi/acpi.h>
-#include <acpi/actypes.h>
 #include <acpi/acpi_bus.h>
 #include <acpi/acpi_drivers.h>
 #include <linux/platform_device.h>
index 899766e16fa822cdfd7abc240e2ce0ee7ea329e4..3478453eba7a3e8e2997cc25fcdd807f377efb86 100644 (file)
@@ -76,7 +76,6 @@
 #include <linux/workqueue.h>
 
 #include <acpi/acpi_drivers.h>
-#include <acpi/acnamesp.h>
 
 #include <linux/pci_ids.h>
 
index a1a3d0e5d2b4ac6c30637ca3f8a308a7d56c5d3a..9e8222f9e90ee0f69416ffe985103d0f6b183df5 100644 (file)
@@ -543,9 +543,9 @@ bnx2_free_rx_mem(struct bnx2 *bp)
                for (j = 0; j < bp->rx_max_pg_ring; j++) {
                        if (rxr->rx_pg_desc_ring[j])
                                pci_free_consistent(bp->pdev, RXBD_RING_SIZE,
-                                                   rxr->rx_pg_desc_ring[i],
-                                                   rxr->rx_pg_desc_mapping[i]);
-                       rxr->rx_pg_desc_ring[i] = NULL;
+                                                   rxr->rx_pg_desc_ring[j],
+                                                   rxr->rx_pg_desc_mapping[j]);
+                       rxr->rx_pg_desc_ring[j] = NULL;
                }
                if (rxr->rx_pg_ring)
                        vfree(rxr->rx_pg_ring);
index 523b9716a543aec21d923b58a07cd5162b3edab3..d115a6d30f29c0b3acb81c8038c6215993980e8d 100644 (file)
@@ -1893,12 +1893,17 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw)
                ctrl |= E1000_CTRL_PHY_RST;
        }
        ret_val = e1000_acquire_swflag_ich8lan(hw);
+       /* Whether or not the swflag was acquired, we need to reset the part */
        hw_dbg(hw, "Issuing a global reset to ich8lan");
        ew32(CTRL, (ctrl | E1000_CTRL_RST));
        msleep(20);
 
-       /* release the swflag because it is not reset by hardware reset */
-       e1000_release_swflag_ich8lan(hw);
+       if (!ret_val) {
+               /* release the swflag because it is not reset by
+                * hardware reset
+                */
+               e1000_release_swflag_ich8lan(hw);
+       }
 
        ret_val = e1000e_get_auto_rd_done(hw);
        if (ret_val) {
index c414554ac3217f22845b8e71901117bc5fffaaad..36cb6e95b465c2545b822d30c14a675b6bd39e07 100644 (file)
@@ -959,7 +959,7 @@ static void enc28j60_hw_rx(struct net_device *ndev)
                        ndev->stats.rx_packets++;
                        ndev->stats.rx_bytes += len;
                        ndev->last_rx = jiffies;
-                       netif_rx(skb);
+                       netif_rx_ni(skb);
                }
        }
        /*
index f863aee6648b49b0db38d2cdc077640669a2a424..3f5d91543246c88936d8fc086abf37c2cd3f6686 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #ifndef __JME_H_INCLUDED__
-#define __JME_H_INCLUDEE__
+#define __JME_H_INCLUDED__
 
 #define DRV_NAME       "jme"
 #define DRV_VERSION    "1.0.3"
index 536bda1f428b6c09360be41448f7b0b7d4c16679..289fc267edf30eb5094d24f416ca644c9494d401 100644 (file)
@@ -105,8 +105,6 @@ int mdiobus_register(struct mii_bus *bus)
                return -EINVAL;
        }
 
-       bus->state = MDIOBUS_REGISTERED;
-
        mutex_init(&bus->mdio_lock);
 
        if (bus->reset)
@@ -123,6 +121,9 @@ int mdiobus_register(struct mii_bus *bus)
                }
        }
 
+       if (!err)
+               bus->state = MDIOBUS_REGISTERED;
+
        pr_info("%s: probed\n", bus->name);
 
        return err;
index 7e857e938adb582ae432b26d35114e8099d51eb2..714a23035de1980a968c19a835712d587c007c17 100644 (file)
@@ -116,6 +116,7 @@ struct ppp {
        unsigned long   last_xmit;      /* jiffies when last pkt sent 9c */
        unsigned long   last_recv;      /* jiffies when last pkt rcvd a0 */
        struct net_device *dev;         /* network interface device a4 */
+       int             closing;        /* is device closing down? a8 */
 #ifdef CONFIG_PPP_MULTILINK
        int             nxchan;         /* next channel to send something on */
        u32             nxseq;          /* next sequence number to send */
@@ -995,7 +996,7 @@ ppp_xmit_process(struct ppp *ppp)
        struct sk_buff *skb;
 
        ppp_xmit_lock(ppp);
-       if (ppp->dev) {
+       if (!ppp->closing) {
                ppp_push(ppp);
                while (!ppp->xmit_pending
                       && (skb = skb_dequeue(&ppp->file.xq)))
@@ -1463,8 +1464,7 @@ static inline void
 ppp_do_recv(struct ppp *ppp, struct sk_buff *skb, struct channel *pch)
 {
        ppp_recv_lock(ppp);
-       /* ppp->dev == 0 means interface is closing down */
-       if (ppp->dev)
+       if (!ppp->closing)
                ppp_receive_frame(ppp, skb, pch);
        else
                kfree_skb(skb);
@@ -2498,18 +2498,16 @@ init_ppp_file(struct ppp_file *pf, int kind)
  */
 static void ppp_shutdown_interface(struct ppp *ppp)
 {
-       struct net_device *dev;
-
        mutex_lock(&all_ppp_mutex);
-       ppp_lock(ppp);
-       dev = ppp->dev;
-       ppp->dev = NULL;
-       ppp_unlock(ppp);
        /* This will call dev_close() for us. */
-       if (dev) {
-               unregister_netdev(dev);
-               free_netdev(dev);
-       }
+       ppp_lock(ppp);
+       if (!ppp->closing) {
+               ppp->closing = 1;
+               ppp_unlock(ppp);
+               unregister_netdev(ppp->dev);
+       } else
+               ppp_unlock(ppp);
+
        cardmap_set(&all_ppp_units, ppp->file.index, NULL);
        ppp->file.dead = 1;
        ppp->owner = NULL;
@@ -2554,7 +2552,7 @@ static void ppp_destroy_interface(struct ppp *ppp)
        if (ppp->xmit_pending)
                kfree_skb(ppp->xmit_pending);
 
-       kfree(ppp);
+       free_netdev(ppp->dev);
 }
 
 /*
@@ -2616,7 +2614,7 @@ ppp_connect_channel(struct channel *pch, int unit)
        if (pch->file.hdrlen > ppp->file.hdrlen)
                ppp->file.hdrlen = pch->file.hdrlen;
        hdrlen = pch->file.hdrlen + 2;  /* for protocol bytes */
-       if (ppp->dev && hdrlen > ppp->dev->hard_header_len)
+       if (hdrlen > ppp->dev->hard_header_len)
                ppp->dev->hard_header_len = hdrlen;
        list_add_tail(&pch->clist, &ppp->channels);
        ++ppp->n_channels;
index 1d2ef8f47780904da79f621bf2ac09d284b50753..5a40f2d78beb1a9114478ac9e0385556c29d30bf 100644 (file)
@@ -1509,6 +1509,11 @@ static int __netdev_rx(struct net_device *dev, int *quota)
                desc->status = 0;
                np->rx_done = (np->rx_done + 1) % DONE_Q_SIZE;
        }
+
+       if (*quota == 0) {      /* out of rx quota */
+               retcode = 1;
+               goto out;
+       }
        writew(np->rx_done, np->base + CompletionQConsumerIdx);
 
  out:
index 1349e419673ca348dbe5aa22b3b5b27f1a1056dd..fed7eba65ead6268e292eddc66c73905d8e263c7 100644 (file)
@@ -1142,6 +1142,70 @@ static int gem_start_xmit(struct sk_buff *skb, struct net_device *dev)
        return NETDEV_TX_OK;
 }
 
+static void gem_pcs_reset(struct gem *gp)
+{
+       int limit;
+       u32 val;
+
+       /* Reset PCS unit. */
+       val = readl(gp->regs + PCS_MIICTRL);
+       val |= PCS_MIICTRL_RST;
+       writel(val, gp->regs + PCS_MIICTRL);
+
+       limit = 32;
+       while (readl(gp->regs + PCS_MIICTRL) & PCS_MIICTRL_RST) {
+               udelay(100);
+               if (limit-- <= 0)
+                       break;
+       }
+       if (limit <= 0)
+               printk(KERN_WARNING "%s: PCS reset bit would not clear.\n",
+                      gp->dev->name);
+}
+
+static void gem_pcs_reinit_adv(struct gem *gp)
+{
+       u32 val;
+
+       /* Make sure PCS is disabled while changing advertisement
+        * configuration.
+        */
+       val = readl(gp->regs + PCS_CFG);
+       val &= ~(PCS_CFG_ENABLE | PCS_CFG_TO);
+       writel(val, gp->regs + PCS_CFG);
+
+       /* Advertise all capabilities except assymetric
+        * pause.
+        */
+       val = readl(gp->regs + PCS_MIIADV);
+       val |= (PCS_MIIADV_FD | PCS_MIIADV_HD |
+               PCS_MIIADV_SP | PCS_MIIADV_AP);
+       writel(val, gp->regs + PCS_MIIADV);
+
+       /* Enable and restart auto-negotiation, disable wrapback/loopback,
+        * and re-enable PCS.
+        */
+       val = readl(gp->regs + PCS_MIICTRL);
+       val |= (PCS_MIICTRL_RAN | PCS_MIICTRL_ANE);
+       val &= ~PCS_MIICTRL_WB;
+       writel(val, gp->regs + PCS_MIICTRL);
+
+       val = readl(gp->regs + PCS_CFG);
+       val |= PCS_CFG_ENABLE;
+       writel(val, gp->regs + PCS_CFG);
+
+       /* Make sure serialink loopback is off.  The meaning
+        * of this bit is logically inverted based upon whether
+        * you are in Serialink or SERDES mode.
+        */
+       val = readl(gp->regs + PCS_SCTRL);
+       if (gp->phy_type == phy_serialink)
+               val &= ~PCS_SCTRL_LOOP;
+       else
+               val |= PCS_SCTRL_LOOP;
+       writel(val, gp->regs + PCS_SCTRL);
+}
+
 #define STOP_TRIES 32
 
 /* Must be invoked under gp->lock and gp->tx_lock. */
@@ -1168,6 +1232,9 @@ static void gem_reset(struct gem *gp)
 
        if (limit <= 0)
                printk(KERN_ERR "%s: SW reset is ghetto.\n", gp->dev->name);
+
+       if (gp->phy_type == phy_serialink || gp->phy_type == phy_serdes)
+               gem_pcs_reinit_adv(gp);
 }
 
 /* Must be invoked under gp->lock and gp->tx_lock. */
@@ -1324,7 +1391,7 @@ static int gem_set_link_modes(struct gem *gp)
                   gp->phy_type == phy_serdes) {
                u32 pcs_lpa = readl(gp->regs + PCS_MIILP);
 
-               if (pcs_lpa & PCS_MIIADV_FD)
+               if ((pcs_lpa & PCS_MIIADV_FD) || gp->phy_type == phy_serdes)
                        full_duplex = 1;
                speed = SPEED_1000;
        }
@@ -1488,6 +1555,9 @@ static void gem_link_timer(unsigned long data)
                        val = readl(gp->regs + PCS_MIISTAT);
 
                if ((val & PCS_MIISTAT_LS) != 0) {
+                       if (gp->lstate == link_up)
+                               goto restart;
+
                        gp->lstate = link_up;
                        netif_carrier_on(gp->dev);
                        (void)gem_set_link_modes(gp);
@@ -1708,61 +1778,8 @@ static void gem_init_phy(struct gem *gp)
                if (gp->phy_mii.def && gp->phy_mii.def->ops->init)
                        gp->phy_mii.def->ops->init(&gp->phy_mii);
        } else {
-               u32 val;
-               int limit;
-
-               /* Reset PCS unit. */
-               val = readl(gp->regs + PCS_MIICTRL);
-               val |= PCS_MIICTRL_RST;
-               writel(val, gp->regs + PCS_MIICTRL);
-
-               limit = 32;
-               while (readl(gp->regs + PCS_MIICTRL) & PCS_MIICTRL_RST) {
-                       udelay(100);
-                       if (limit-- <= 0)
-                               break;
-               }
-               if (limit <= 0)
-                       printk(KERN_WARNING "%s: PCS reset bit would not clear.\n",
-                              gp->dev->name);
-
-               /* Make sure PCS is disabled while changing advertisement
-                * configuration.
-                */
-               val = readl(gp->regs + PCS_CFG);
-               val &= ~(PCS_CFG_ENABLE | PCS_CFG_TO);
-               writel(val, gp->regs + PCS_CFG);
-
-               /* Advertise all capabilities except assymetric
-                * pause.
-                */
-               val = readl(gp->regs + PCS_MIIADV);
-               val |= (PCS_MIIADV_FD | PCS_MIIADV_HD |
-                       PCS_MIIADV_SP | PCS_MIIADV_AP);
-               writel(val, gp->regs + PCS_MIIADV);
-
-               /* Enable and restart auto-negotiation, disable wrapback/loopback,
-                * and re-enable PCS.
-                */
-               val = readl(gp->regs + PCS_MIICTRL);
-               val |= (PCS_MIICTRL_RAN | PCS_MIICTRL_ANE);
-               val &= ~PCS_MIICTRL_WB;
-               writel(val, gp->regs + PCS_MIICTRL);
-
-               val = readl(gp->regs + PCS_CFG);
-               val |= PCS_CFG_ENABLE;
-               writel(val, gp->regs + PCS_CFG);
-
-               /* Make sure serialink loopback is off.  The meaning
-                * of this bit is logically inverted based upon whether
-                * you are in Serialink or SERDES mode.
-                */
-               val = readl(gp->regs + PCS_SCTRL);
-               if (gp->phy_type == phy_serialink)
-                       val &= ~PCS_SCTRL_LOOP;
-               else
-                       val |= PCS_SCTRL_LOOP;
-               writel(val, gp->regs + PCS_SCTRL);
+               gem_pcs_reset(gp);
+               gem_pcs_reinit_adv(gp);
        }
 
        /* Default aneg parameters */
@@ -2680,6 +2697,21 @@ static int gem_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
                cmd->speed = 0;
                cmd->duplex = cmd->port = cmd->phy_address =
                        cmd->transceiver = cmd->autoneg = 0;
+
+               /* serdes means usually a Fibre connector, with most fixed */
+               if (gp->phy_type == phy_serdes) {
+                       cmd->port = PORT_FIBRE;
+                       cmd->supported = (SUPPORTED_1000baseT_Half |
+                               SUPPORTED_1000baseT_Full |
+                               SUPPORTED_FIBRE | SUPPORTED_Autoneg |
+                               SUPPORTED_Pause | SUPPORTED_Asym_Pause);
+                       cmd->advertising = cmd->supported;
+                       cmd->transceiver = XCVR_INTERNAL;
+                       if (gp->lstate == link_up)
+                               cmd->speed = SPEED_1000;
+                       cmd->duplex = DUPLEX_FULL;
+                       cmd->autoneg = 1;
+               }
        }
        cmd->maxtxpkt = cmd->maxrxpkt = 0;
 
index c41d68761364550ebe2d2d8376f2a8c293b5d799..e60498232b94f83dede6c6d4ae153d8d135d7b19 100644 (file)
@@ -1098,6 +1098,7 @@ static int TLan_StartTx( struct sk_buff *skb, struct net_device *dev )
        dma_addr_t      tail_list_phys;
        u8              *tail_buffer;
        unsigned long   flags;
+       unsigned int    txlen;
 
        if ( ! priv->phyOnline ) {
                TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT:  %s PHY is not ready\n",
@@ -1108,6 +1109,7 @@ static int TLan_StartTx( struct sk_buff *skb, struct net_device *dev )
 
        if (skb_padto(skb, TLAN_MIN_FRAME_SIZE))
                return 0;
+       txlen = max(skb->len, (unsigned int)TLAN_MIN_FRAME_SIZE);
 
        tail_list = priv->txList + priv->txTail;
        tail_list_phys = priv->txListDMA + sizeof(TLanList) * priv->txTail;
@@ -1125,16 +1127,16 @@ static int TLan_StartTx( struct sk_buff *skb, struct net_device *dev )
 
        if ( bbuf ) {
                tail_buffer = priv->txBuffer + ( priv->txTail * TLAN_MAX_FRAME_SIZE );
-               skb_copy_from_linear_data(skb, tail_buffer, skb->len);
+               skb_copy_from_linear_data(skb, tail_buffer, txlen);
        } else {
                tail_list->buffer[0].address = pci_map_single(priv->pciDev,
-                                                             skb->data, skb->len,
+                                                             skb->data, txlen,
                                                              PCI_DMA_TODEVICE);
                TLan_StoreSKB(tail_list, skb);
        }
 
-       tail_list->frameSize = (u16) skb->len;
-       tail_list->buffer[0].count = TLAN_LAST_BUFFER | (u32) skb->len;
+       tail_list->frameSize = (u16) txlen;
+       tail_list->buffer[0].count = TLAN_LAST_BUFFER | (u32) txlen;
        tail_list->buffer[1].count = 0;
        tail_list->buffer[1].address = 0;
 
@@ -1431,7 +1433,9 @@ static u32 TLan_HandleTxEOF( struct net_device *dev, u16 host_int )
                if ( ! bbuf ) {
                        struct sk_buff *skb = TLan_GetSKB(head_list);
                        pci_unmap_single(priv->pciDev, head_list->buffer[0].address,
-                                        skb->len, PCI_DMA_TODEVICE);
+                                        max(skb->len,
+                                            (unsigned int)TLAN_MIN_FRAME_SIZE),
+                                        PCI_DMA_TODEVICE);
                        dev_kfree_skb_any(skb);
                        head_list->buffer[8].address = 0;
                        head_list->buffer[9].address = 0;
@@ -2055,9 +2059,12 @@ static void TLan_FreeLists( struct net_device *dev )
                        list = priv->txList + i;
                        skb = TLan_GetSKB(list);
                        if ( skb ) {
-                               pci_unmap_single(priv->pciDev,
-                                                list->buffer[0].address, skb->len,
-                                                PCI_DMA_TODEVICE);
+                               pci_unmap_single(
+                                       priv->pciDev,
+                                       list->buffer[0].address,
+                                       max(skb->len,
+                                           (unsigned int)TLAN_MIN_FRAME_SIZE),
+                                       PCI_DMA_TODEVICE);
                                dev_kfree_skb_any( skb );
                                list->buffer[8].address = 0;
                                list->buffer[9].address = 0;
index e17ef54f0efced2d0173a9f5af250c2f0fa93517..2c981cbb0719c61f6faed445719c5f48f4d523cf 100644 (file)
@@ -33,7 +33,6 @@
 #include <linux/pci-acpi.h>
 #include <acpi/acpi.h>
 #include <acpi/acpi_bus.h>
-#include <acpi/actypes.h>
 
 #define MY_NAME        "acpi_pcihp"
 
index f9e244da30aef9ea9e170c5cce58a524ab5f87a6..9bcb6cbd5aa93988e39bdf2b8c9285512d74df22 100644 (file)
@@ -113,7 +113,7 @@ struct acpiphp_slot {
 
        u8              device;         /* pci device# */
 
-       u32             sun;            /* ACPI _SUN (slot unique number) */
+       unsigned long long sun;         /* ACPI _SUN (slot unique number) */
        u32             flags;          /* see below */
 };
 
index 95b536a23d25d8d9f76d5aa757a411540017fef0..43c10bd261b48612b4ec2fa2620fa14207628805 100644 (file)
@@ -337,7 +337,7 @@ int acpiphp_register_hotplug_slot(struct acpiphp_slot *acpiphp_slot)
        slot->hotplug_slot->info->cur_bus_speed = PCI_SPEED_UNKNOWN;
 
        acpiphp_slot->slot = slot;
-       snprintf(name, SLOT_NAME_SIZE, "%u", slot->acpi_slot->sun);
+       snprintf(name, SLOT_NAME_SIZE, "%llu", slot->acpi_slot->sun);
 
        retval = pci_hp_register(slot->hotplug_slot,
                                        acpiphp_slot->bridge->pci_bus,
index 955aae4071f7a64eeb5cb716aaacf8ebb26c7a11..3affc6472e65253c94b77bcc8aa97061480b85d7 100644 (file)
@@ -255,13 +255,13 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv)
 
                bridge->nr_slots++;
 
-               dbg("found ACPI PCI Hotplug slot %d at PCI %04x:%02x:%02x\n",
+               dbg("found ACPI PCI Hotplug slot %llu at PCI %04x:%02x:%02x\n",
                                slot->sun, pci_domain_nr(bridge->pci_bus),
                                bridge->pci_bus->number, slot->device);
                retval = acpiphp_register_hotplug_slot(slot);
                if (retval) {
                        if (retval == -EBUSY)
-                               warn("Slot %d already registered by another "
+                               warn("Slot %llu already registered by another "
                                        "hotplug driver\n", slot->sun);
                        else
                                warn("acpiphp_register_hotplug_slot failed "
index c892daae74d6dc325a77dc9050c0f6cd8a5105c8..633e743442ac711d0b02d6b85a8252a1ee74dbb5 100644 (file)
@@ -1402,10 +1402,6 @@ static int __init ibmphp_init(void)
                goto error;
        }
 
-       /* lock ourselves into memory with a module 
-        * count of -1 so that no one can unload us. */
-       module_put(THIS_MODULE);
-
 exit:
        return rc;
 
@@ -1423,4 +1419,3 @@ static void __exit ibmphp_exit(void)
 }
 
 module_init(ibmphp_init);
-module_exit(ibmphp_exit);
index b2801a7ee37f8d14864f6275181f2616bd8e7fd1..7072952ea1d28b6337ccc302a8b4d11b470fc1c6 100644 (file)
@@ -217,7 +217,6 @@ struct hpc_ops {
 #ifdef CONFIG_ACPI
 #include <acpi/acpi.h>
 #include <acpi/acpi_bus.h>
-#include <acpi/actypes.h>
 #include <linux/pci-acpi.h>
 
 static inline int pciehp_get_hp_hw_control_from_firmware(struct pci_dev *dev)
index 4b23bc39b11e513be82a54df9f01db2b268b5bb4..39cf248d24e3cd0592b61dee392f748e441301c0 100644 (file)
@@ -432,18 +432,19 @@ static int pciehp_probe(struct pcie_device *dev, const struct pcie_port_service_
                goto err_out_release_ctlr;
        }
 
+       /* Check if slot is occupied */
        t_slot = pciehp_find_slot(ctrl, ctrl->slot_device_offset);
-
-       t_slot->hpc_ops->get_adapter_status(t_slot, &value); /* Check if slot is occupied */
-       if (value && pciehp_force) {
-               rc = pciehp_enable_slot(t_slot);
-               if (rc) /* -ENODEV: shouldn't happen, but deal with it */
-                       value = 0;
-       }
-       if ((POWER_CTRL(ctrl)) && !value) {
-               rc = t_slot->hpc_ops->power_off_slot(t_slot); /* Power off slot if not occupied*/
-               if (rc)
-                       goto err_out_free_ctrl_slot;
+       t_slot->hpc_ops->get_adapter_status(t_slot, &value);
+       if (value) {
+               if (pciehp_force)
+                       pciehp_enable_slot(t_slot);
+       } else {
+               /* Power off slot if not occupied */
+               if (POWER_CTRL(ctrl)) {
+                       rc = t_slot->hpc_ops->power_off_slot(t_slot);
+                       if (rc)
+                               goto err_out_free_ctrl_slot;
+               }
        }
 
        return 0;
index ae5ec76dca77a636bf5b1f1a6cf4c52b03b8d9c8..9d976d51d406ddc5a55d414da87fd382c7b504ec 100644 (file)
@@ -13,8 +13,6 @@
 #include <linux/module.h>
 #include <linux/pci-aspm.h>
 #include <acpi/acpi.h>
-#include <acpi/acnamesp.h>
-#include <acpi/acresrc.h>
 #include <acpi/acpi_bus.h>
 
 #include <linux/pci-acpi.h>
index dfc63d01f20a0a7c072f9a65039f2776537b3e8e..aac7006949f15c9eb52b56968a4dca6ef812e3c2 100644 (file)
@@ -252,7 +252,7 @@ static void report_resume(struct pci_dev *dev, void *data)
 
        if (!dev->driver ||
                !dev->driver->err_handler ||
-               !dev->driver->err_handler->slot_reset)
+               !dev->driver->err_handler->resume)
                return;
 
        err_handler = dev->driver->err_handler;
index bb7338863fb9aabeedfbb941b59f026176919673..b59d4115d20f541e5176ba309cb694687c1c1d17 100644 (file)
@@ -334,6 +334,6 @@ static void __exit bfin_cf_exit(void)
 module_init(bfin_cf_init);
 module_exit(bfin_cf_exit);
 
-MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>")
+MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
 MODULE_DESCRIPTION("BFIN CF/PCMCIA Driver");
 MODULE_LICENSE("GPL");
index 383e47c392a4c8ea69fe7459e302e6d76ee77cff..2834846a185dd26a2d94ffd361dba3d6fbbce8a7 100644 (file)
@@ -23,7 +23,6 @@
 #include <linux/pnp.h>
 #include <linux/mod_devicetable.h>
 #include <acpi/acpi_bus.h>
-#include <acpi/actypes.h>
 
 #include "../base.h"
 #include "pnpacpi.h"
index 2cd77ab8fc66b06e43d3b908884a9f4fe8603ca1..054e05294af8566e30d3834fc23c793b615239f9 100644 (file)
@@ -328,6 +328,13 @@ isl1208_i2c_set_time(struct i2c_client *client, struct rtc_time const *tm)
        int sr;
        u8 regs[ISL1208_RTC_SECTION_LEN] = { 0, };
 
+       /* The clock has an 8 bit wide bcd-coded register (they never learn)
+        * for the year. tm_year is an offset from 1900 and we are interested
+        * in the 2000-2099 range, so any value less than 100 is invalid.
+        */
+       if (tm->tm_year < 100)
+               return -EINVAL;
+
        regs[ISL1208_REG_SC] = bin2bcd(tm->tm_sec);
        regs[ISL1208_REG_MN] = bin2bcd(tm->tm_min);
        regs[ISL1208_REG_HR] = bin2bcd(tm->tm_hour) | ISL1208_REG_HR_MIL;
index 162cd927d94b8e975edb1438db13cd9d0bcc6f8f..94acbeed4e7cfe7bc59ebc8003fdd7ae96e66ec4 100644 (file)
@@ -175,8 +175,8 @@ static struct aac_driver_ident aac_drivers[] = {
        { aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* PERC 3/Di (Boxster/PERC3DiB) */
        { aac_rx_init, "aacraid",  "ADAPTEC ", "catapult        ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* catapult */
        { aac_rx_init, "aacraid",  "ADAPTEC ", "tomcat          ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* tomcat */
-       { aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2120S   ", 1, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* Adaptec 2120S (Crusader) */
-       { aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2200S   ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* Adaptec 2200S (Vulcan) */
+       { aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2120S   ", 1, AAC_QUIRK_31BIT | AAC_QUIRK_34SG },                     /* Adaptec 2120S (Crusader) */
+       { aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2200S   ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG },                     /* Adaptec 2200S (Vulcan) */
        { aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2200S   ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* Adaptec 2200S (Vulcan-2m) */
        { aac_rx_init, "aacraid",  "Legend  ", "Legend S220     ", 1, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* Legend S220 (Legend Crusader) */
        { aac_rx_init, "aacraid",  "Legend  ", "Legend S230     ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* Legend S230 (Legend Vulcan) */
index 9aec4ca64e56cf3f06f102b4860691ce94c12c94..f7da7530875e732a0b8155aa6887f8626ed8decf 100644 (file)
@@ -107,6 +107,7 @@ static int hp_sw_tur(struct scsi_device *sdev, struct hp_sw_dh_data *h)
        struct request *req;
        int ret;
 
+retry:
        req = blk_get_request(sdev->request_queue, WRITE, GFP_NOIO);
        if (!req)
                return SCSI_DH_RES_TEMP_UNAVAIL;
@@ -121,7 +122,6 @@ static int hp_sw_tur(struct scsi_device *sdev, struct hp_sw_dh_data *h)
        memset(req->sense, 0, SCSI_SENSE_BUFFERSIZE);
        req->sense_len = 0;
 
-retry:
        ret = blk_execute_rq(req->q, NULL, req, 1);
        if (ret == -EIO) {
                if (req->sense_len > 0) {
@@ -136,8 +136,10 @@ retry:
                h->path_state = HP_SW_PATH_ACTIVE;
                ret = SCSI_DH_OK;
        }
-       if (ret == SCSI_DH_IMM_RETRY)
+       if (ret == SCSI_DH_IMM_RETRY) {
+               blk_put_request(req);
                goto retry;
+       }
        if (ret == SCSI_DH_DEV_OFFLINED) {
                h->path_state = HP_SW_PATH_PASSIVE;
                ret = SCSI_DH_OK;
@@ -200,6 +202,7 @@ static int hp_sw_start_stop(struct scsi_device *sdev, struct hp_sw_dh_data *h)
        struct request *req;
        int ret, retry;
 
+retry:
        req = blk_get_request(sdev->request_queue, WRITE, GFP_NOIO);
        if (!req)
                return SCSI_DH_RES_TEMP_UNAVAIL;
@@ -216,7 +219,6 @@ static int hp_sw_start_stop(struct scsi_device *sdev, struct hp_sw_dh_data *h)
        req->sense_len = 0;
        retry = h->retries;
 
-retry:
        ret = blk_execute_rq(req->q, NULL, req, 1);
        if (ret == -EIO) {
                if (req->sense_len > 0) {
@@ -231,8 +233,10 @@ retry:
                ret = SCSI_DH_OK;
 
        if (ret == SCSI_DH_RETRY) {
-               if (--retry)
+               if (--retry) {
+                       blk_put_request(req);
                        goto retry;
+               }
                ret = SCSI_DH_IO;
        }
 
index 2a5b29d12172e4a72bb774453d2662b7d29192ee..e2dd6a45924a5f598f6dafa05eff545b2aa5292b 100644 (file)
@@ -864,21 +864,23 @@ static int ibmvstgt_probe(struct vio_dev *dev, const struct vio_device_id *id)
 
        INIT_WORK(&vport->crq_work, handle_crq);
 
-       err = crq_queue_create(&vport->crq_queue, target);
+       err = scsi_add_host(shost, target->dev);
        if (err)
                goto free_srp_target;
 
-       err = scsi_add_host(shost, target->dev);
+       err = scsi_tgt_alloc_queue(shost);
        if (err)
-               goto destroy_queue;
+               goto remove_host;
 
-       err = scsi_tgt_alloc_queue(shost);
+       err = crq_queue_create(&vport->crq_queue, target);
        if (err)
-               goto destroy_queue;
+               goto free_queue;
 
        return 0;
-destroy_queue:
-       crq_queue_destroy(target);
+free_queue:
+       scsi_tgt_free_queue(shost);
+remove_host:
+       scsi_remove_host(shost);
 free_srp_target:
        srp_target_free(target);
 put_host:
index 801c7cf54d2ebb29b209fbd692eb7c807514fdc6..3fdee7370cccd235d9ad37aa8482c29cac715b7a 100644 (file)
@@ -489,12 +489,6 @@ __iscsi_conn_send_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
                if (!__kfifo_get(session->cmdpool.queue,
                                 (void*)&task, sizeof(void*)))
                        return NULL;
-
-               if ((hdr->opcode == (ISCSI_OP_NOOP_OUT | ISCSI_OP_IMMEDIATE)) &&
-                    hdr->ttt == RESERVED_ITT) {
-                       conn->ping_task = task;
-                       conn->last_ping = jiffies;
-               }
        }
        /*
         * released in complete pdu for task we expect a response for, and
@@ -703,6 +697,11 @@ static void iscsi_send_nopout(struct iscsi_conn *conn, struct iscsi_nopin *rhdr)
        task = __iscsi_conn_send_pdu(conn, (struct iscsi_hdr *)&hdr, NULL, 0);
        if (!task)
                iscsi_conn_printk(KERN_ERR, conn, "Could not send nopout\n");
+       else if (!rhdr) {
+               /* only track our nops */
+               conn->ping_task = task;
+               conn->last_ping = jiffies;
+       }
 }
 
 static int iscsi_handle_reject(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
index fa45a1a668676c667dbe2bc1749ad44227061d6b..148d3af92aefad04fa42c48780ba4138e8033e59 100644 (file)
@@ -648,8 +648,8 @@ static void scsi_requeue_command(struct request_queue *q, struct scsi_cmnd *cmd)
        struct request *req = cmd->request;
        unsigned long flags;
 
-       scsi_unprep_request(req);
        spin_lock_irqsave(q->queue_lock, flags);
+       scsi_unprep_request(req);
        blk_requeue_request(q, req);
        spin_unlock_irqrestore(q->queue_lock, flags);
 
index d1812d32f47d40c4c5e3c028aae8727c755f451f..63f0de29aa14eeb508645dd0b917e7c4163950c1 100644 (file)
@@ -827,7 +827,7 @@ static int __init maple_bus_init(void)
 
        maple_queue_cache =
            kmem_cache_create("maple_queue_cache", 0x400, 0,
-                             SLAB_POISON|SLAB_HWCACHE_ALIGN, NULL);
+                             SLAB_HWCACHE_ALIGN, NULL);
 
        if (!maple_queue_cache)
                goto cleanup_bothirqs;
index c95b286a1239e8a6cbdb4da4a292e5d85c9079f1..5d457c96bd7ed596bdaab11852fc9ad45acaa635 100644 (file)
@@ -22,6 +22,8 @@ menuconfig STAGING
          If in doubt, say N here.
 
 
+if STAGING
+
 config STAGING_EXCLUDE_BUILD
        bool "Exclude Staging drivers from being built" if STAGING
        default y
@@ -62,3 +64,4 @@ source "drivers/staging/at76_usb/Kconfig"
 source "drivers/staging/poch/Kconfig"
 
 endif # !STAGING_EXCLUDE_BUILD
+endif # STAGING
index 8e74657f106c01d152c8e5244e75100bdd94f682..43a863c5cc430367ad045625eb4c3faecbfba7f9 100644 (file)
@@ -51,6 +51,7 @@ static struct usb_device_id usbtmc_devices[] = {
        { USB_INTERFACE_INFO(USB_CLASS_APP_SPEC, 3, 0), },
        { 0, } /* terminating entry */
 };
+MODULE_DEVICE_TABLE(usb, usbtmc_devices);
 
 /*
  * This structure is the capabilities for the device
index 3d7793d93031525400d3ed746a60639ebed1d52f..8c081308b0e2d8bf2349d6b9e9703de0548213ac 100644 (file)
@@ -279,7 +279,9 @@ static int usb_unbind_interface(struct device *dev)
         * altsetting means creating new endpoint device entries).
         * When either of these happens, defer the Set-Interface.
         */
-       if (!error && intf->dev.power.status == DPM_ON)
+       if (intf->cur_altsetting->desc.bAlternateSetting == 0)
+               ;       /* Already in altsetting 0 so skip Set-Interface */
+       else if (!error && intf->dev.power.status == DPM_ON)
                usb_set_interface(udev, intf->altsetting[0].
                                desc.bInterfaceNumber, 0);
        else
index 428b5993575a9126104da3ec32ea695e7881c9e8..3a8bb53fc473269e31366d0c11069490a30cb7bf 100644 (file)
@@ -651,6 +651,8 @@ rndis_bind(struct usb_configuration *c, struct usb_function *f)
                                fs_in_desc.bEndpointAddress;
                hs_out_desc.bEndpointAddress =
                                fs_out_desc.bEndpointAddress;
+               hs_notify_desc.bEndpointAddress =
+                               fs_notify_desc.bEndpointAddress;
 
                /* copy descriptors, and track endpoint copies */
                f->hs_descriptors = usb_copy_descriptors(eth_hs_function);
@@ -662,6 +664,8 @@ rndis_bind(struct usb_configuration *c, struct usb_function *f)
                                f->hs_descriptors, &hs_in_desc);
                rndis->hs.out = usb_find_endpoint(eth_hs_function,
                                f->hs_descriptors, &hs_out_desc);
+               rndis->hs.notify = usb_find_endpoint(eth_hs_function,
+                               f->hs_descriptors, &hs_notify_desc);
        }
 
        rndis->port.open = rndis_open;
index aad1359a3eb18719c30dff180f70482b131ae886..fb6f2933b01badb0075c285078fb6067fc7b6827 100644 (file)
@@ -143,6 +143,7 @@ static struct ftdi_sio_quirk ftdi_HE_TIRA1_quirk = {
 static struct usb_device_id id_table_combined [] = {
        { USB_DEVICE(FTDI_VID, FTDI_AMC232_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_CANUSB_PID) },
+       { USB_DEVICE(FTDI_VID, FTDI_CANDAPTER_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_0_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_1_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_2_PID) },
@@ -166,6 +167,7 @@ static struct usb_device_id id_table_combined [] = {
        { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_PID) },
        { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) },
        { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) },
+       { USB_DEVICE(FTDI_VID, FTDI_SPROG_II) },
        { USB_DEVICE(FTDI_VID, FTDI_XF_632_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_XF_634_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_XF_547_PID) },
index 07a3992abad2b546095e35d247a3d7e68aec1eec..373ee09975bbd8c80b2a158aa32b9c6595a3bfbe 100644 (file)
@@ -40,6 +40,9 @@
 /* AlphaMicro Components AMC-232USB01 device */
 #define FTDI_AMC232_PID 0xFF00 /* Product Id */
 
+/* www.candapter.com Ewert Energy Systems CANdapter device */
+#define FTDI_CANDAPTER_PID 0x9F80 /* Product Id */
+
 /* SCS HF Radio Modems PID's (http://www.scs-ptc.com) */
 /* the VID is the standard ftdi vid (FTDI_VID) */
 #define FTDI_SCS_DEVICE_0_PID 0xD010    /* SCS PTC-IIusb */
@@ -75,6 +78,9 @@
 /* OpenDCC (www.opendcc.de) product id */
 #define FTDI_OPENDCC_PID       0xBFD8
 
+/* Sprog II (Andrew Crosland's SprogII DCC interface) */
+#define FTDI_SPROG_II          0xF0C8
+
 /* www.crystalfontz.com devices - thanx for providing free devices for evaluation ! */
 /* they use the ftdi chipset for the USB interface and the vendor id is the same */
 #define FTDI_XF_632_PID 0xFC08 /* 632: 16x2 Character Display */
index 491c8857b6448277a5cd49c51e88f6ac496233ad..1aed584be5eb9a528d904b3b3209afef29f40383 100644 (file)
@@ -91,6 +91,8 @@ static struct usb_device_id id_table [] = {
        { USB_DEVICE(WS002IN_VENDOR_ID, WS002IN_PRODUCT_ID) },
        { USB_DEVICE(COREGA_VENDOR_ID, COREGA_PRODUCT_ID) },
        { USB_DEVICE(YCCABLE_VENDOR_ID, YCCABLE_PRODUCT_ID) },
+       { USB_DEVICE(SUPERIAL_VENDOR_ID, SUPERIAL_PRODUCT_ID) },
+       { USB_DEVICE(HP_VENDOR_ID, HP_LD220_PRODUCT_ID) },
        { }                                     /* Terminating entry */
 };
 
index a3bd039c78e96769beeff504e4da6c32f63daa14..54974f446a8c2f51f213d293d3a2f53bcaf6479d 100644 (file)
 /* Y.C. Cable U.S.A., Inc - USB to RS-232 */
 #define YCCABLE_VENDOR_ID      0x05ad
 #define YCCABLE_PRODUCT_ID     0x0fba
+
+/* "Superial" USB - Serial */
+#define SUPERIAL_VENDOR_ID     0x5372
+#define SUPERIAL_PRODUCT_ID    0x2303
+
+/* Hewlett-Packard LD220-HP POS Pole Display */
+#define HP_VENDOR_ID           0x03f0
+#define HP_LD220_PRODUCT_ID    0x3524
index 31c42d1cae13cf746e49cce12c9f588247da2c5c..01d0c70d60e9b41129b44e76893958990f780b10 100644 (file)
  * For questions or problems with this driver, contact Texas Instruments
  * technical support, or Al Borchers <alborchers@steinerpoint.com>, or
  * Peter Berger <pberger@brimson.com>.
- *
- * This driver needs this hotplug script in /etc/hotplug/usb/ti_usb_3410_5052
- * or in /etc/hotplug.d/usb/ti_usb_3410_5052.hotplug to set the device
- * configuration.
- *
- * #!/bin/bash
- *
- * BOOT_CONFIG=1
- * ACTIVE_CONFIG=2
- *
- * if [[ "$ACTION" != "add" ]]
- * then
- *     exit
- * fi
- *
- * CONFIG_PATH=/sys${DEVPATH%/?*}/bConfigurationValue
- *
- * if [[ 0`cat $CONFIG_PATH` -ne $BOOT_CONFIG ]]
- * then
- *     exit
- * fi
- *
- * PRODUCT=${PRODUCT%/?*}              # delete version
- * VENDOR_ID=`printf "%d" 0x${PRODUCT%/?*}`
- * PRODUCT_ID=`printf "%d" 0x${PRODUCT#*?/}`
- *
- * PARAM_PATH=/sys/module/ti_usb_3410_5052/parameters
- *
- * function scan() {
- *     s=$1
- *     shift
- *     for i
- *     do
- *             if [[ $s -eq $i ]]
- *             then
- *                     return 0
- *             fi
- *     done
- *     return 1
- * }
- *
- * IFS=$IFS,
- *
- * if (scan $VENDOR_ID 1105 `cat $PARAM_PATH/vendor_3410` &&
- * scan $PRODUCT_ID 13328 `cat $PARAM_PATH/product_3410`) ||
- * (scan $VENDOR_ID 1105 `cat $PARAM_PATH/vendor_5052` &&
- * scan $PRODUCT_ID 20562 20818 20570 20575 `cat $PARAM_PATH/product_5052`)
- * then
- *     echo $ACTIVE_CONFIG > $CONFIG_PATH
- * fi
  */
 
 #include <linux/kernel.h>
@@ -457,9 +407,10 @@ static int ti_startup(struct usb_serial *serial)
                goto free_tdev;
        }
 
-       /* the second configuration must be set (in sysfs by hotplug script) */
+       /* the second configuration must be set */
        if (dev->actconfig->desc.bConfigurationValue == TI_BOOT_CONFIG) {
-               status = -ENODEV;
+               status = usb_driver_set_configuration(dev, TI_ACTIVE_CONFIG);
+               status = status ? status : -ENODEV;
                goto free_tdev;
        }
 
index e61f2bfc64add77ab938367c45c08db542c589e0..bfcc1fe82518d0e5739b1e936cf43d1b1430390c 100644 (file)
@@ -167,8 +167,22 @@ UNUSUAL_DEV(  0x0421, 0x005d, 0x0001, 0x0600,
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_FIX_CAPACITY ),
 
+/* Reported by Ozan Sener <themgzzy@gmail.com> */
+UNUSUAL_DEV(  0x0421, 0x0060, 0x0551, 0x0551,
+               "Nokia",
+               "3500c",
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_FIX_CAPACITY ),
+
+/* Reported by CSECSY Laszlo <boobaa@frugalware.org> */
+UNUSUAL_DEV(  0x0421, 0x0063, 0x0001, 0x0601,
+               "Nokia",
+               "Nokia 3109c",
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_FIX_CAPACITY ),
+
 /* Patch for Nokia 5310 capacity */
-UNUSUAL_DEV(  0x0421, 0x006a, 0x0000, 0x0591,
+UNUSUAL_DEV(  0x0421, 0x006a, 0x0000, 0x0701,
                "Nokia",
                "5310",
                US_SC_DEVICE, US_PR_DEVICE, NULL,
index 0d15b0eaf79a7b5a56eb50bb00efc1a9571280e6..5139c25ca96288474cf976cf5577be12c6d6d30b 100644 (file)
@@ -356,7 +356,9 @@ int w1_reset_select_slave(struct w1_slave *sl)
                w1_write_8(sl->master, W1_SKIP_ROM);
        else {
                u8 match[9] = {W1_MATCH_ROM, };
-               memcpy(&match[1], (u8 *)&sl->reg_num, 8);
+               u64 rn = le64_to_cpu(*((u64*)&sl->reg_num));
+
+               memcpy(&match[1], &rn, 8);
                w1_write_block(sl->master, match, 9);
        }
        return 0;
index 3031e3233dd625302715ff10c3e49ddc4b1aa7f7..2a983d49d19cba78984b5ae317ded774605121c1 100644 (file)
@@ -45,7 +45,7 @@ int v9fs_fid_add(struct dentry *dentry, struct p9_fid *fid)
        struct v9fs_dentry *dent;
 
        P9_DPRINTK(P9_DEBUG_VFS, "fid %d dentry %s\n",
-                                       fid->fid, dentry->d_iname);
+                                       fid->fid, dentry->d_name.name);
 
        dent = dentry->d_fsdata;
        if (!dent) {
@@ -79,7 +79,7 @@ static struct p9_fid *v9fs_fid_find(struct dentry *dentry, u32 uid, int any)
        struct p9_fid *fid, *ret;
 
        P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p) uid %d any %d\n",
-               dentry->d_iname, dentry, uid, any);
+               dentry->d_name.name, dentry, uid, any);
        dent = (struct v9fs_dentry *) dentry->d_fsdata;
        ret = NULL;
        if (dent) {
index 24eb01087b6d63313404dff82b4f192177189342..332b5ff02fec11b8e8e43645c93ae09679ac9a61 100644 (file)
@@ -160,7 +160,7 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses)
                                v9ses->flags |= V9FS_ACCESS_ANY;
                        else {
                                v9ses->flags |= V9FS_ACCESS_SINGLE;
-                               v9ses->uid = simple_strtol(s, &e, 10);
+                               v9ses->uid = simple_strtoul(s, &e, 10);
                                if (*e != '\0')
                                        v9ses->uid = ~0;
                        }
index f9534f18df0a1a2bafdf70cd1b00466b8c5fb6b7..06dcc7c4f2343ebb9cced85a8da46c880849794f 100644 (file)
@@ -52,7 +52,8 @@
 
 static int v9fs_dentry_delete(struct dentry *dentry)
 {
-       P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry);
+       P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_name.name,
+                                                                       dentry);
 
        return 1;
 }
@@ -69,7 +70,8 @@ static int v9fs_dentry_delete(struct dentry *dentry)
 static int v9fs_cached_dentry_delete(struct dentry *dentry)
 {
        struct inode *inode = dentry->d_inode;
-       P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry);
+       P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_name.name,
+                                                                       dentry);
 
        if(!inode)
                return 1;
@@ -88,7 +90,8 @@ void v9fs_dentry_release(struct dentry *dentry)
        struct v9fs_dentry *dent;
        struct p9_fid *temp, *current_fid;
 
-       P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry);
+       P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_name.name,
+                                                                       dentry);
        dent = dentry->d_fsdata;
        if (dent) {
                list_for_each_entry_safe(current_fid, temp, &dent->fidlist,
index 8314d3f43b716f41560e4517d42eaade5cfc1459..2dfcf5487efebff886a9f42c23733875d4264608 100644 (file)
@@ -963,7 +963,8 @@ static int v9fs_vfs_readlink(struct dentry *dentry, char __user * buffer,
        if (buflen > PATH_MAX)
                buflen = PATH_MAX;
 
-       P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry);
+       P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_name.name,
+                                                                       dentry);
 
        retval = v9fs_readlink(dentry, link, buflen);
 
@@ -1022,7 +1023,8 @@ v9fs_vfs_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
 {
        char *s = nd_get_link(nd);
 
-       P9_DPRINTK(P9_DEBUG_VFS, " %s %s\n", dentry->d_name.name, s);
+       P9_DPRINTK(P9_DEBUG_VFS, " %s %s\n", dentry->d_name.name,
+               IS_ERR(s) ? "<error>" : s);
        if (!IS_ERR(s))
                __putname(s);
 }
index 2af8626ced435c10bea3654e38570f7decaa8a7d..6d51696dc762d3b6656ed027fe2d7ed40d549409 100644 (file)
@@ -3983,7 +3983,8 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,
 
                node->flags = le16_to_cpu(pSMBr->DFSFlags);
                if (is_unicode) {
-                       __le16 *tmp = kmalloc(strlen(searchName)*2, GFP_KERNEL);
+                       __le16 *tmp = kmalloc(strlen(searchName)*2 + 2,
+                                               GFP_KERNEL);
                        cifsConvertToUCS((__le16 *) tmp, searchName,
                                        PATH_MAX, nls_codepage, remap);
                        node->path_consumed = hostlen_fromUCS(tmp,
index 5f180cf7abbd6f4e21dc1a662932f06ad56a6407..5e0c0d0aef7dcbcf1c9baae7b108cc47bce1f9cf 100644 (file)
@@ -86,7 +86,8 @@
 #define OCFS2_CLEAR_INCOMPAT_FEATURE(sb,mask)                  \
        OCFS2_SB(sb)->s_feature_incompat &= ~(mask)
 
-#define OCFS2_FEATURE_COMPAT_SUPP      OCFS2_FEATURE_COMPAT_BACKUP_SB
+#define OCFS2_FEATURE_COMPAT_SUPP      (OCFS2_FEATURE_COMPAT_BACKUP_SB \
+                                        | OCFS2_FEATURE_COMPAT_JBD2_SB)
 #define OCFS2_FEATURE_INCOMPAT_SUPP    (OCFS2_FEATURE_INCOMPAT_LOCAL_MOUNT \
                                         | OCFS2_FEATURE_INCOMPAT_SPARSE_ALLOC \
                                         | OCFS2_FEATURE_INCOMPAT_INLINE_DATA \
  */
 #define OCFS2_FEATURE_COMPAT_BACKUP_SB         0x0001
 
+/*
+ * The filesystem will correctly handle journal feature bits.
+ */
+#define OCFS2_FEATURE_COMPAT_JBD2_SB           0x0002
+
 /*
  * Unwritten extents support.
  */
index 054e2efb0b7e71f196025c777d61f2cc5954e0f9..74d7367ade13e1e36cb74a13327ca65573fabf86 100644 (file)
@@ -2645,9 +2645,9 @@ static int ocfs2_xattr_update_xattr_search(struct inode *inode,
                                return ret;
                        }
 
-                       i = xs->here - old_xh->xh_entries;
-                       xs->here = &xs->header->xh_entries[i];
                }
+               i = xs->here - old_xh->xh_entries;
+               xs->here = &xs->header->xh_entries[i];
        }
 
        return ret;
diff --git a/include/acpi/acdisasm.h b/include/acpi/acdisasm.h
deleted file mode 100644 (file)
index 0c1ed38..0000000
+++ /dev/null
@@ -1,445 +0,0 @@
-/******************************************************************************
- *
- * Name: acdisasm.h - AML disassembler
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2008, Intel Corp.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
- * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGES.
- */
-
-#ifndef __ACDISASM_H__
-#define __ACDISASM_H__
-
-#include "amlresrc.h"
-
-#define BLOCK_NONE              0
-#define BLOCK_PAREN             1
-#define BLOCK_BRACE             2
-#define BLOCK_COMMA_LIST        4
-#define ACPI_DEFAULT_RESNAME    *(u32 *) "__RD"
-
-struct acpi_external_list {
-       char *path;
-       char *internal_path;
-       struct acpi_external_list *next;
-       u32 value;
-       u16 length;
-       u8 type;
-};
-
-extern struct acpi_external_list *acpi_gbl_external_list;
-
-typedef const struct acpi_dmtable_info {
-       u8 opcode;
-       u8 offset;
-       char *name;
-
-} acpi_dmtable_info;
-
-/*
- * Values for Opcode above.
- * Note: 0-7 must not change, used as a flag shift value
- */
-#define ACPI_DMT_FLAG0                  0
-#define ACPI_DMT_FLAG1                  1
-#define ACPI_DMT_FLAG2                  2
-#define ACPI_DMT_FLAG3                  3
-#define ACPI_DMT_FLAG4                  4
-#define ACPI_DMT_FLAG5                  5
-#define ACPI_DMT_FLAG6                  6
-#define ACPI_DMT_FLAG7                  7
-#define ACPI_DMT_FLAGS0                 8
-#define ACPI_DMT_FLAGS2                 9
-#define ACPI_DMT_UINT8                  10
-#define ACPI_DMT_UINT16                 11
-#define ACPI_DMT_UINT24                 12
-#define ACPI_DMT_UINT32                 13
-#define ACPI_DMT_UINT56                 14
-#define ACPI_DMT_UINT64                 15
-#define ACPI_DMT_STRING                 16
-#define ACPI_DMT_NAME4                  17
-#define ACPI_DMT_NAME6                  18
-#define ACPI_DMT_NAME8                  19
-#define ACPI_DMT_CHKSUM                 20
-#define ACPI_DMT_SPACEID                21
-#define ACPI_DMT_GAS                    22
-#define ACPI_DMT_ASF                    23
-#define ACPI_DMT_DMAR                   24
-#define ACPI_DMT_HEST                   25
-#define ACPI_DMT_HESTNTFY               26
-#define ACPI_DMT_HESTNTYP               27
-#define ACPI_DMT_MADT                   28
-#define ACPI_DMT_SRAT                   29
-#define ACPI_DMT_EXIT                   30
-#define ACPI_DMT_SIG                    31
-
-typedef
-void (*acpi_dmtable_handler) (struct acpi_table_header * table);
-
-struct acpi_dmtable_data {
-       char *signature;
-       struct acpi_dmtable_info *table_info;
-       acpi_dmtable_handler table_handler;
-       char *name;
-};
-
-struct acpi_op_walk_info {
-       u32 level;
-       u32 last_level;
-       u32 count;
-       u32 bit_offset;
-       u32 flags;
-       struct acpi_walk_state *walk_state;
-};
-
-typedef
-acpi_status(*asl_walk_callback) (union acpi_parse_object * op,
-                                u32 level, void *context);
-
-struct acpi_resource_tag {
-       u32 bit_index;
-       char *tag;
-};
-
-/* Strings used for decoding flags to ASL keywords */
-
-extern const char *acpi_gbl_word_decode[];
-extern const char *acpi_gbl_irq_decode[];
-extern const char *acpi_gbl_lock_rule[];
-extern const char *acpi_gbl_access_types[];
-extern const char *acpi_gbl_update_rules[];
-extern const char *acpi_gbl_match_ops[];
-
-extern struct acpi_dmtable_info acpi_dm_table_info_asf0[];
-extern struct acpi_dmtable_info acpi_dm_table_info_asf1[];
-extern struct acpi_dmtable_info acpi_dm_table_info_asf1a[];
-extern struct acpi_dmtable_info acpi_dm_table_info_asf2[];
-extern struct acpi_dmtable_info acpi_dm_table_info_asf2a[];
-extern struct acpi_dmtable_info acpi_dm_table_info_asf3[];
-extern struct acpi_dmtable_info acpi_dm_table_info_asf4[];
-extern struct acpi_dmtable_info acpi_dm_table_info_asf_hdr[];
-extern struct acpi_dmtable_info acpi_dm_table_info_boot[];
-extern struct acpi_dmtable_info acpi_dm_table_info_bert[];
-extern struct acpi_dmtable_info acpi_dm_table_info_cpep[];
-extern struct acpi_dmtable_info acpi_dm_table_info_cpep0[];
-extern struct acpi_dmtable_info acpi_dm_table_info_dbgp[];
-extern struct acpi_dmtable_info acpi_dm_table_info_dmar[];
-extern struct acpi_dmtable_info acpi_dm_table_info_dmar_hdr[];
-extern struct acpi_dmtable_info acpi_dm_table_info_dmar_scope[];
-extern struct acpi_dmtable_info acpi_dm_table_info_dmar0[];
-extern struct acpi_dmtable_info acpi_dm_table_info_dmar1[];
-extern struct acpi_dmtable_info acpi_dm_table_info_dmar2[];
-extern struct acpi_dmtable_info acpi_dm_table_info_ecdt[];
-extern struct acpi_dmtable_info acpi_dm_table_info_einj[];
-extern struct acpi_dmtable_info acpi_dm_table_info_einj0[];
-extern struct acpi_dmtable_info acpi_dm_table_info_erst[];
-extern struct acpi_dmtable_info acpi_dm_table_info_facs[];
-extern struct acpi_dmtable_info acpi_dm_table_info_fadt1[];
-extern struct acpi_dmtable_info acpi_dm_table_info_fadt2[];
-extern struct acpi_dmtable_info acpi_dm_table_info_gas[];
-extern struct acpi_dmtable_info acpi_dm_table_info_header[];
-extern struct acpi_dmtable_info acpi_dm_table_info_hest[];
-extern struct acpi_dmtable_info acpi_dm_table_info_hest9[];
-extern struct acpi_dmtable_info acpi_dm_table_info_hest_notify[];
-extern struct acpi_dmtable_info acpi_dm_table_info_hpet[];
-extern struct acpi_dmtable_info acpi_dm_table_info_madt[];
-extern struct acpi_dmtable_info acpi_dm_table_info_madt0[];
-extern struct acpi_dmtable_info acpi_dm_table_info_madt1[];
-extern struct acpi_dmtable_info acpi_dm_table_info_madt2[];
-extern struct acpi_dmtable_info acpi_dm_table_info_madt3[];
-extern struct acpi_dmtable_info acpi_dm_table_info_madt4[];
-extern struct acpi_dmtable_info acpi_dm_table_info_madt5[];
-extern struct acpi_dmtable_info acpi_dm_table_info_madt6[];
-extern struct acpi_dmtable_info acpi_dm_table_info_madt7[];
-extern struct acpi_dmtable_info acpi_dm_table_info_madt8[];
-extern struct acpi_dmtable_info acpi_dm_table_info_madt9[];
-extern struct acpi_dmtable_info acpi_dm_table_info_madt10[];
-extern struct acpi_dmtable_info acpi_dm_table_info_madt_hdr[];
-extern struct acpi_dmtable_info acpi_dm_table_info_mcfg[];
-extern struct acpi_dmtable_info acpi_dm_table_info_mcfg0[];
-extern struct acpi_dmtable_info acpi_dm_table_info_rsdp1[];
-extern struct acpi_dmtable_info acpi_dm_table_info_rsdp2[];
-extern struct acpi_dmtable_info acpi_dm_table_info_sbst[];
-extern struct acpi_dmtable_info acpi_dm_table_info_slic[];
-extern struct acpi_dmtable_info acpi_dm_table_info_slit[];
-extern struct acpi_dmtable_info acpi_dm_table_info_spcr[];
-extern struct acpi_dmtable_info acpi_dm_table_info_spmi[];
-extern struct acpi_dmtable_info acpi_dm_table_info_srat[];
-extern struct acpi_dmtable_info acpi_dm_table_info_srat_hdr[];
-extern struct acpi_dmtable_info acpi_dm_table_info_srat0[];
-extern struct acpi_dmtable_info acpi_dm_table_info_srat1[];
-extern struct acpi_dmtable_info acpi_dm_table_info_srat2[];
-extern struct acpi_dmtable_info acpi_dm_table_info_tcpa[];
-extern struct acpi_dmtable_info acpi_dm_table_info_wdrt[];
-
-/*
- * dmtable
- */
-void acpi_dm_dump_data_table(struct acpi_table_header *table);
-
-acpi_status
-acpi_dm_dump_table(u32 table_length,
-                  u32 table_offset,
-                  void *table,
-                  u32 sub_table_length, struct acpi_dmtable_info *info);
-
-void acpi_dm_line_header(u32 offset, u32 byte_length, char *name);
-
-void acpi_dm_line_header2(u32 offset, u32 byte_length, char *name, u32 value);
-
-/*
- * dmtbdump
- */
-void acpi_dm_dump_asf(struct acpi_table_header *table);
-
-void acpi_dm_dump_cpep(struct acpi_table_header *table);
-
-void acpi_dm_dump_dmar(struct acpi_table_header *table);
-
-void acpi_dm_dump_einj(struct acpi_table_header *table);
-
-void acpi_dm_dump_erst(struct acpi_table_header *table);
-
-void acpi_dm_dump_fadt(struct acpi_table_header *table);
-
-void acpi_dm_dump_hest(struct acpi_table_header *table);
-
-void acpi_dm_dump_mcfg(struct acpi_table_header *table);
-
-void acpi_dm_dump_madt(struct acpi_table_header *table);
-
-u32 acpi_dm_dump_rsdp(struct acpi_table_header *table);
-
-void acpi_dm_dump_rsdt(struct acpi_table_header *table);
-
-void acpi_dm_dump_slit(struct acpi_table_header *table);
-
-void acpi_dm_dump_srat(struct acpi_table_header *table);
-
-void acpi_dm_dump_xsdt(struct acpi_table_header *table);
-
-/*
- * dmwalk
- */
-void
-acpi_dm_disassemble(struct acpi_walk_state *walk_state,
-                   union acpi_parse_object *origin, u32 num_opcodes);
-
-void
-acpi_dm_walk_parse_tree(union acpi_parse_object *op,
-                       asl_walk_callback descending_callback,
-                       asl_walk_callback ascending_callback, void *context);
-
-/*
- * dmopcode
- */
-void
-acpi_dm_disassemble_one_op(struct acpi_walk_state *walk_state,
-                          struct acpi_op_walk_info *info,
-                          union acpi_parse_object *op);
-
-void acpi_dm_decode_internal_object(union acpi_operand_object *obj_desc);
-
-u32 acpi_dm_list_type(union acpi_parse_object *op);
-
-void acpi_dm_method_flags(union acpi_parse_object *op);
-
-void acpi_dm_field_flags(union acpi_parse_object *op);
-
-void acpi_dm_address_space(u8 space_id);
-
-void acpi_dm_region_flags(union acpi_parse_object *op);
-
-void acpi_dm_match_op(union acpi_parse_object *op);
-
-u8 acpi_dm_comma_if_list_member(union acpi_parse_object *op);
-
-void acpi_dm_comma_if_field_member(union acpi_parse_object *op);
-
-/*
- * dmnames
- */
-u32 acpi_dm_dump_name(char *name);
-
-acpi_status
-acpi_ps_display_object_pathname(struct acpi_walk_state *walk_state,
-                               union acpi_parse_object *op);
-
-void acpi_dm_namestring(char *name);
-
-/*
- * dmobject
- */
-void
-acpi_dm_display_internal_object(union acpi_operand_object *obj_desc,
-                               struct acpi_walk_state *walk_state);
-
-void acpi_dm_display_arguments(struct acpi_walk_state *walk_state);
-
-void acpi_dm_display_locals(struct acpi_walk_state *walk_state);
-
-void
-acpi_dm_dump_method_info(acpi_status status,
-                        struct acpi_walk_state *walk_state,
-                        union acpi_parse_object *op);
-
-/*
- * dmbuffer
- */
-void acpi_dm_disasm_byte_list(u32 level, u8 * byte_data, u32 byte_count);
-
-void
-acpi_dm_byte_list(struct acpi_op_walk_info *info, union acpi_parse_object *op);
-
-void acpi_dm_is_eisa_id(union acpi_parse_object *op);
-
-void acpi_dm_eisa_id(u32 encoded_id);
-
-u8 acpi_dm_is_unicode_buffer(union acpi_parse_object *op);
-
-u8 acpi_dm_is_string_buffer(union acpi_parse_object *op);
-
-/*
- * dmresrc
- */
-void acpi_dm_dump_integer8(u8 value, char *name);
-
-void acpi_dm_dump_integer16(u16 value, char *name);
-
-void acpi_dm_dump_integer32(u32 value, char *name);
-
-void acpi_dm_dump_integer64(u64 value, char *name);
-
-void
-acpi_dm_resource_template(struct acpi_op_walk_info *info,
-                         union acpi_parse_object *op,
-                         u8 * byte_data, u32 byte_count);
-
-acpi_status acpi_dm_is_resource_template(union acpi_parse_object *op);
-
-void acpi_dm_indent(u32 level);
-
-void acpi_dm_bit_list(u16 mask);
-
-void acpi_dm_decode_attribute(u8 attribute);
-
-void acpi_dm_descriptor_name(void);
-
-/*
- * dmresrcl
- */
-void
-acpi_dm_word_descriptor(union aml_resource *resource, u32 length, u32 level);
-
-void
-acpi_dm_dword_descriptor(union aml_resource *resource, u32 length, u32 level);
-
-void
-acpi_dm_extended_descriptor(union aml_resource *resource,
-                           u32 length, u32 level);
-
-void
-acpi_dm_qword_descriptor(union aml_resource *resource, u32 length, u32 level);
-
-void
-acpi_dm_memory24_descriptor(union aml_resource *resource,
-                           u32 length, u32 level);
-
-void
-acpi_dm_memory32_descriptor(union aml_resource *resource,
-                           u32 length, u32 level);
-
-void
-acpi_dm_fixed_memory32_descriptor(union aml_resource *resource,
-                                 u32 length, u32 level);
-
-void
-acpi_dm_generic_register_descriptor(union aml_resource *resource,
-                                   u32 length, u32 level);
-
-void
-acpi_dm_interrupt_descriptor(union aml_resource *resource,
-                            u32 length, u32 level);
-
-void
-acpi_dm_vendor_large_descriptor(union aml_resource *resource,
-                               u32 length, u32 level);
-
-void acpi_dm_vendor_common(char *name, u8 * byte_data, u32 length, u32 level);
-
-/*
- * dmresrcs
- */
-void
-acpi_dm_irq_descriptor(union aml_resource *resource, u32 length, u32 level);
-
-void
-acpi_dm_dma_descriptor(union aml_resource *resource, u32 length, u32 level);
-
-void acpi_dm_io_descriptor(union aml_resource *resource, u32 length, u32 level);
-
-void
-acpi_dm_fixed_io_descriptor(union aml_resource *resource,
-                           u32 length, u32 level);
-
-void
-acpi_dm_start_dependent_descriptor(union aml_resource *resource,
-                                  u32 length, u32 level);
-
-void
-acpi_dm_end_dependent_descriptor(union aml_resource *resource,
-                                u32 length, u32 level);
-
-void
-acpi_dm_vendor_small_descriptor(union aml_resource *resource,
-                               u32 length, u32 level);
-
-/*
- * dmutils
- */
-void acpi_dm_add_to_external_list(char *path, u8 type, u32 value);
-
-/*
- * dmrestag
- */
-void acpi_dm_find_resources(union acpi_parse_object *root);
-
-void
-acpi_dm_check_resource_reference(union acpi_parse_object *op,
-                                struct acpi_walk_state *walk_state);
-
-#endif                         /* __ACDISASM_H__ */
index 84f5cb242863c28829c3919b62c57c1e699c68e3..eda04546cdf64c7d8a2c050a48c63c1fee609f6c 100644 (file)
 #define AE_AML_CIRCULAR_REFERENCE       (acpi_status) (0x001E | AE_CODE_AML)
 #define AE_AML_BAD_RESOURCE_LENGTH      (acpi_status) (0x001F | AE_CODE_AML)
 #define AE_AML_ILLEGAL_ADDRESS          (acpi_status) (0x0020 | AE_CODE_AML)
+#define AE_AML_INFINITE_LOOP            (acpi_status) (0x0021 | AE_CODE_AML)
 
-#define AE_CODE_AML_MAX                 0x0020
+#define AE_CODE_AML_MAX                 0x0021
 
 /*
  * Internal exceptions used for control
 
 #define AE_CODE_CTRL_MAX                0x000D
 
+/* Exception strings for acpi_format_exception */
+
 #ifdef DEFINE_ACPI_GLOBALS
 
 /*
@@ -267,6 +270,7 @@ char const *acpi_gbl_exception_names_aml[] = {
        "AE_AML_CIRCULAR_REFERENCE",
        "AE_AML_BAD_RESOURCE_LENGTH",
        "AE_AML_ILLEGAL_ADDRESS",
+       "AE_AML_INFINITE_LOOP"
 };
 
 char const *acpi_gbl_exception_names_ctrl[] = {
index 09d33c7740f0bfbf48f195c57bb209a03297baf4..5c823d5ab7839f003f34f702992411f35d0e0a21 100644 (file)
@@ -45,9 +45,9 @@
 #define __ACOUTPUT_H__
 
 /*
- * Debug levels and component IDs.  These are used to control the
- * granularity of the output of the DEBUG_PRINT macro -- on a per-
- * component basis and a per-exception-type basis.
+ * Debug levels and component IDs. These are used to control the
+ * granularity of the output of the ACPI_DEBUG_PRINT macro -- on a
+ * per-component basis and a per-exception-type basis.
  */
 
 /* Component IDs are used in the global "DebugLayer" */
 
 #define ACPI_COMPILER               0x00001000
 #define ACPI_TOOLS                  0x00002000
+#define ACPI_EXAMPLE                0x00004000
+#define ACPI_DRIVER                 0x00008000
 
-#define ACPI_ALL_COMPONENTS         0x00003FFF
+#define ACPI_ALL_COMPONENTS         0x0000FFFF
 #define ACPI_COMPONENT_DEFAULT      (ACPI_ALL_COMPONENTS)
 
 /* Component IDs reserved for ACPI drivers */
@@ -78,7 +80,7 @@
 #define ACPI_ALL_DRIVERS            0xFFFF0000
 
 /*
- * Raw debug output levels, do not use these in the DEBUG_PRINT macros
+ * Raw debug output levels, do not use these in the ACPI_DEBUG_PRINT macros
  */
 #define ACPI_LV_INIT                0x00000001
 #define ACPI_LV_DEBUG_OBJECT        0x00000002
 
 /* Defaults for debug_level, debug and normal */
 
-#define ACPI_DEBUG_DEFAULT          (ACPI_LV_INIT | ACPI_LV_DEBUG_OBJECT)
+#define ACPI_DEBUG_DEFAULT          (ACPI_LV_INFO)
 #define ACPI_NORMAL_DEFAULT         (ACPI_LV_INIT | ACPI_LV_DEBUG_OBJECT)
 #define ACPI_DEBUG_ALL              (ACPI_LV_AML_DISASSEMBLE | ACPI_LV_ALL_EXCEPTIONS | ACPI_LV_ALL)
 
+#if defined (ACPI_DEBUG_OUTPUT) || !defined (ACPI_NO_ERROR_MESSAGES)
+/*
+ * Module name is included in both debug and non-debug versions primarily for
+ * error messages. The __FILE__ macro is not very useful for this, because it
+ * often includes the entire pathname to the module
+ */
+#define ACPI_MODULE_NAME(name)          static const char ACPI_UNUSED_VAR _acpi_module_name[] = name;
+#else
+#define ACPI_MODULE_NAME(name)
+#endif
+
+/*
+ * Ascii error messages can be configured out
+ */
+#ifndef ACPI_NO_ERROR_MESSAGES
+#define AE_INFO                         _acpi_module_name, __LINE__
+
+/*
+ * Error reporting. Callers module and line number are inserted by AE_INFO,
+ * the plist contains a set of parens to allow variable-length lists.
+ * These macros are used for both the debug and non-debug versions of the code.
+ */
+#define ACPI_INFO(plist)                acpi_info plist
+#define ACPI_WARNING(plist)             acpi_warning plist
+#define ACPI_EXCEPTION(plist)           acpi_exception plist
+#define ACPI_ERROR(plist)               acpi_error plist
+
+#else
+
+/* No error messages */
+
+#define ACPI_INFO(plist)
+#define ACPI_WARNING(plist)
+#define ACPI_EXCEPTION(plist)
+#define ACPI_ERROR(plist)
+
+#endif                         /* ACPI_NO_ERROR_MESSAGES */
+
+/*
+ * Debug macros that are conditionally compiled
+ */
+#ifdef ACPI_DEBUG_OUTPUT
+
+/*
+ * If ACPI_GET_FUNCTION_NAME was not defined in the compiler-dependent header,
+ * define it now. This is the case where there the compiler does not support
+ * a __FUNCTION__ macro or equivalent.
+ */
+#ifndef ACPI_GET_FUNCTION_NAME
+#define ACPI_GET_FUNCTION_NAME          _acpi_function_name
+
+/*
+ * The Name parameter should be the procedure name as a quoted string.
+ * The function name is also used by the function exit macros below.
+ * Note: (const char) is used to be compatible with the debug interfaces
+ * and macros such as __FUNCTION__.
+ */
+#define ACPI_FUNCTION_NAME(name)        static const char _acpi_function_name[] = #name;
+
+#else
+/* Compiler supports __FUNCTION__ (or equivalent) -- Ignore this macro */
+
+#define ACPI_FUNCTION_NAME(name)
+#endif                         /* ACPI_GET_FUNCTION_NAME */
+
+/*
+ * Common parameters used for debug output functions:
+ * line number, function name, module(file) name, component ID
+ */
+#define ACPI_DEBUG_PARAMETERS           __LINE__, ACPI_GET_FUNCTION_NAME, _acpi_module_name, _COMPONENT
+
+/*
+ * Master debug print macros
+ * Print message if and only if:
+ *    1) Debug print for the current component is enabled
+ *    2) Debug error level or trace level for the print statement is enabled
+ */
+#define ACPI_DEBUG_PRINT(plist)         acpi_debug_print plist
+#define ACPI_DEBUG_PRINT_RAW(plist)     acpi_debug_print_raw plist
+
+#else
+/*
+ * This is the non-debug case -- make everything go away,
+ * leaving no executable debug code!
+ */
+#define ACPI_FUNCTION_NAME(a)
+#define ACPI_DEBUG_PRINT(pl)
+#define ACPI_DEBUG_PRINT_RAW(pl)
+
+#endif                         /* ACPI_DEBUG_OUTPUT */
+
 #endif                         /* __ACOUTPUT_H__ */
index c515ef6cc89e2c7f23d2267c3bd665b1db601180..472b7bf0c5d4ebe9161d7f4d099169fe615f00b8 100644 (file)
@@ -1,6 +1,6 @@
 /******************************************************************************
  *
- * Name: acpi.h - Master include file, Publics and external data.
+ * Name: acpi.h - Master public include file used to interface to ACPICA
  *
  *****************************************************************************/
 
 #define __ACPI_H__
 
 /*
- * Common includes for all ACPI driver files
- * We put them here because we don't want to duplicate them
- * in the rest of the source code again and again.
+ * Public include files for use by code that will interface to ACPICA.
+ *
+ * Information includes the ACPICA data types, names, exceptions, and
+ * external interface prototypes. Also included are the definitions for
+ * all ACPI tables (FADT, MADT, etc.)
+ *
+ * Note: The order of these include files is important.
  */
-#include "acnames.h"           /* Global ACPI names and strings */
-#include "acconfig.h"          /* Configuration constants */
-#include "platform/acenv.h"    /* Target environment specific items */
-#include "actypes.h"           /* Fundamental common data types */
-#include "acexcep.h"           /* ACPI exception codes */
-#include "acmacros.h"          /* C macros */
+#include "platform/acenv.h"    /* Environment-specific items */
+#include "acnames.h"           /* Common ACPI names and strings */
+#include "actypes.h"           /* ACPICA data types and structures */
+#include "acexcep.h"           /* ACPICA exceptions */
 #include "actbl.h"             /* ACPI table definitions */
-#include "aclocal.h"           /* Internal data types */
 #include "acoutput.h"          /* Error output and Debug macros */
-#include "acpiosxf.h"          /* Interfaces to the ACPI-to-OS layer */
+#include "acrestyp.h"          /* Resource Descriptor structs */
+#include "acpiosxf.h"          /* OSL interfaces (ACPICA-to-OS) */
 #include "acpixf.h"            /* ACPI core subsystem external interfaces */
-#include "acobject.h"          /* ACPI internal object */
-#include "acstruct.h"          /* Common structures */
-#include "acglobal.h"          /* All global variables */
-#include "achware.h"           /* Hardware defines and interfaces */
-#include "acutils.h"           /* Utility interfaces */
 
 #endif                         /* __ACPI_H__ */
index b91440ac0d168e0865d0e5e4156d1e7fe8356958..a62720a7edc0165b7b698a5d7a2d14841a78f27f 100644 (file)
@@ -121,8 +121,11 @@ acpi_os_wait_semaphore(acpi_semaphore handle, u32 units, u16 timeout);
 acpi_status acpi_os_signal_semaphore(acpi_semaphore handle, u32 units);
 
 /*
- * Mutex primitives
+ * Mutex primitives. May be configured to use semaphores instead via
+ * ACPI_MUTEX_TYPE (see platform/acenv.h)
  */
+#if (ACPI_MUTEX_TYPE != ACPI_BINARY_SEMAPHORE)
+
 acpi_status acpi_os_create_mutex(acpi_mutex * out_handle);
 
 void acpi_os_delete_mutex(acpi_mutex handle);
@@ -130,13 +133,7 @@ void acpi_os_delete_mutex(acpi_mutex handle);
 acpi_status acpi_os_acquire_mutex(acpi_mutex handle, u16 timeout);
 
 void acpi_os_release_mutex(acpi_mutex handle);
-
-/* Temporary macros for Mutex* interfaces, map to existing semaphore xfaces */
-
-#define acpi_os_create_mutex(out_handle)    acpi_os_create_semaphore (1, 1, out_handle)
-#define acpi_os_delete_mutex(handle)        (void) acpi_os_delete_semaphore (handle)
-#define acpi_os_acquire_mutex(handle,time)  acpi_os_wait_semaphore (handle, 1, time)
-#define acpi_os_release_mutex(handle)       (void) acpi_os_signal_semaphore (handle, 1)
+#endif
 
 /*
  * Memory allocation and mapping
index 33bc0e3b19546e8c1e8fb4225ec8615162c69d12..7c7074f20087ad1b7073a2f9ba54a790fcc8bb96 100644 (file)
 #ifndef __ACXFACE_H__
 #define __ACXFACE_H__
 
+/* Current ACPICA subsystem version in YYYYMMDD format */
+
+#define ACPI_CA_VERSION                 0x20081204
+
 #include "actypes.h"
 #include "actbl.h"
 
+extern u8 acpi_gbl_permanent_mmap;
+
+/*
+ * Globals that are publically available, allowing for
+ * run time configuration
+ */
+extern u32 acpi_dbg_level;
+extern u32 acpi_dbg_layer;
+extern u8 acpi_gbl_enable_interpreter_slack;
+extern u8 acpi_gbl_all_methods_serialized;
+extern u8 acpi_gbl_create_osi_method;
+extern u8 acpi_gbl_leave_wake_gpes_disabled;
+extern acpi_name acpi_gbl_trace_method_name;
+extern u32 acpi_gbl_trace_flags;
+
+extern u32 acpi_current_gpe_count;
+extern struct acpi_table_fadt acpi_gbl_FADT;
+
 /*
  * Global interfaces
  */
@@ -79,11 +101,6 @@ const char *acpi_format_exception(acpi_status exception);
 
 acpi_status acpi_purge_cached_objects(void);
 
-#ifdef ACPI_FUTURE_USAGE
-acpi_status
-acpi_install_initialization_handler(acpi_init_handler handler, u32 function);
-#endif
-
 /*
  * ACPI Memory management
  */
@@ -193,8 +210,11 @@ acpi_status acpi_get_id(acpi_handle object, acpi_owner_id * out_type);
 acpi_status acpi_get_parent(acpi_handle object, acpi_handle * out_handle);
 
 /*
- * Event handler interfaces
+ * Handler interfaces
  */
+acpi_status
+acpi_install_initialization_handler(acpi_init_handler handler, u32 function);
+
 acpi_status
 acpi_install_fixed_event_handler(u32 acpi_event,
                                 acpi_event_handler handler, void *context);
@@ -227,6 +247,10 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
                         u32 gpe_number,
                         u32 type, acpi_event_handler address, void *context);
 
+acpi_status
+acpi_remove_gpe_handler(acpi_handle gpe_device,
+                       u32 gpe_number, acpi_event_handler address);
+
 #ifdef ACPI_FUTURE_USAGE
 acpi_status acpi_install_exception_handler(acpi_exception_handler handler);
 #endif
@@ -238,10 +262,6 @@ acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle);
 
 acpi_status acpi_release_global_lock(u32 handle);
 
-acpi_status
-acpi_remove_gpe_handler(acpi_handle gpe_device,
-                       u32 gpe_number, acpi_event_handler address);
-
 acpi_status acpi_enable_event(u32 event, u32 flags);
 
 acpi_status acpi_disable_event(u32 event, u32 flags);
@@ -250,6 +270,9 @@ acpi_status acpi_clear_event(u32 event);
 
 acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status);
 
+/*
+ * GPE Interfaces
+ */
 acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type);
 
 acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number);
@@ -263,6 +286,12 @@ acpi_get_gpe_status(acpi_handle gpe_device,
                    u32 gpe_number,
                    u32 flags, acpi_event_status * event_status);
 
+acpi_status acpi_disable_all_gpes(void);
+
+acpi_status acpi_enable_all_runtime_gpes(void);
+
+acpi_status acpi_get_gpe_device(u32 gpe_index, acpi_handle *gpe_device);
+
 acpi_status
 acpi_install_gpe_block(acpi_handle gpe_device,
                       struct acpi_generic_address *gpe_block_address,
@@ -313,6 +342,8 @@ acpi_resource_to_address64(struct acpi_resource *resource,
 /*
  * Hardware (ACPI device) interfaces
  */
+acpi_status acpi_reset(void);
+
 acpi_status acpi_get_register(u32 register_id, u32 * return_value);
 
 acpi_status acpi_get_register_unlocked(u32 register_id, u32 *return_value);
@@ -320,12 +351,14 @@ acpi_status acpi_get_register_unlocked(u32 register_id, u32 *return_value);
 acpi_status acpi_set_register(u32 register_id, u32 value);
 
 acpi_status
-acpi_set_firmware_waking_vector(acpi_physical_address physical_address);
+acpi_set_firmware_waking_vector(u32 physical_address);
 
-#ifdef ACPI_FUTURE_USAGE
 acpi_status
-acpi_get_firmware_waking_vector(acpi_physical_address * physical_address);
-#endif
+acpi_set_firmware_waking_vector64(u64 physical_address);
+
+acpi_status acpi_read(u32 *value, struct acpi_generic_address *reg);
+
+acpi_status acpi_write(u32 value, struct acpi_generic_address *reg);
 
 acpi_status
 acpi_get_sleep_type_data(u8 sleep_state, u8 * slp_typ_a, u8 * slp_typ_b);
@@ -340,4 +373,42 @@ acpi_status acpi_leave_sleep_state_prep(u8 sleep_state);
 
 acpi_status acpi_leave_sleep_state(u8 sleep_state);
 
+/*
+ * Debug output
+ */
+void ACPI_INTERNAL_VAR_XFACE
+acpi_error(const char *module_name,
+          u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3);
+
+void ACPI_INTERNAL_VAR_XFACE
+acpi_exception(const char *module_name,
+              u32 line_number,
+              acpi_status status, const char *format, ...) ACPI_PRINTF_LIKE(4);
+
+void ACPI_INTERNAL_VAR_XFACE
+acpi_warning(const char *module_name,
+            u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3);
+
+void ACPI_INTERNAL_VAR_XFACE
+acpi_info(const char *module_name,
+         u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3);
+
+#ifdef ACPI_DEBUG_OUTPUT
+
+void ACPI_INTERNAL_VAR_XFACE
+acpi_debug_print(u32 requested_debug_level,
+                u32 line_number,
+                const char *function_name,
+                const char *module_name,
+                u32 component_id, const char *format, ...) ACPI_PRINTF_LIKE(6);
+
+void ACPI_INTERNAL_VAR_XFACE
+acpi_debug_print_raw(u32 requested_debug_level,
+                    u32 line_number,
+                    const char *function_name,
+                    const char *module_name,
+                    u32 component_id,
+                    const char *format, ...) ACPI_PRINTF_LIKE(6);
+#endif
+
 #endif                         /* __ACXFACE_H__ */
diff --git a/include/acpi/acrestyp.h b/include/acpi/acrestyp.h
new file mode 100644 (file)
index 0000000..9ffe00f
--- /dev/null
@@ -0,0 +1,405 @@
+/******************************************************************************
+ *
+ * Name: acrestyp.h - Defines, types, and structures for resource descriptors
+ *
+ *****************************************************************************/
+
+/*
+ * Copyright (C) 2000 - 2008, Intel Corp.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer,
+ *    without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ *    substantially similar to the "NO WARRANTY" disclaimer below
+ *    ("Disclaimer") and any redistribution must be conditioned upon
+ *    including a substantially similar Disclaimer requirement for further
+ *    binary redistribution.
+ * 3. Neither the names of the above-listed copyright holders nor the names
+ *    of any contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGES.
+ */
+
+#ifndef __ACRESTYP_H__
+#define __ACRESTYP_H__
+
+/*
+ * Definitions for Resource Attributes
+ */
+typedef u16 acpi_rs_length;    /* Resource Length field is fixed at 16 bits */
+typedef u32 acpi_rsdesc_size;  /* Max Resource Descriptor size is (Length+3) = (64_k-1)+3 */
+
+/*
+ * Memory Attributes
+ */
+#define ACPI_READ_ONLY_MEMORY           (u8) 0x00
+#define ACPI_READ_WRITE_MEMORY          (u8) 0x01
+
+#define ACPI_NON_CACHEABLE_MEMORY       (u8) 0x00
+#define ACPI_CACHABLE_MEMORY            (u8) 0x01
+#define ACPI_WRITE_COMBINING_MEMORY     (u8) 0x02
+#define ACPI_PREFETCHABLE_MEMORY        (u8) 0x03
+
+/*
+ * IO Attributes
+ * The ISA IO ranges are:     n000-n0_fFh, n400-n4_fFh, n800-n8_fFh, n_c00-n_cFFh.
+ * The non-ISA IO ranges are: n100-n3_fFh, n500-n7_fFh, n900-n_bFFh, n_cd0-n_fFFh.
+ */
+#define ACPI_NON_ISA_ONLY_RANGES        (u8) 0x01
+#define ACPI_ISA_ONLY_RANGES            (u8) 0x02
+#define ACPI_ENTIRE_RANGE               (ACPI_NON_ISA_ONLY_RANGES | ACPI_ISA_ONLY_RANGES)
+
+/* Type of translation - 1=Sparse, 0=Dense */
+
+#define ACPI_SPARSE_TRANSLATION         (u8) 0x01
+
+/*
+ * IO Port Descriptor Decode
+ */
+#define ACPI_DECODE_10                  (u8) 0x00      /* 10-bit IO address decode */
+#define ACPI_DECODE_16                  (u8) 0x01      /* 16-bit IO address decode */
+
+/*
+ * IRQ Attributes
+ */
+#define ACPI_LEVEL_SENSITIVE            (u8) 0x00
+#define ACPI_EDGE_SENSITIVE             (u8) 0x01
+
+#define ACPI_ACTIVE_HIGH                (u8) 0x00
+#define ACPI_ACTIVE_LOW                 (u8) 0x01
+
+#define ACPI_EXCLUSIVE                  (u8) 0x00
+#define ACPI_SHARED                     (u8) 0x01
+
+/*
+ * DMA Attributes
+ */
+#define ACPI_COMPATIBILITY              (u8) 0x00
+#define ACPI_TYPE_A                     (u8) 0x01
+#define ACPI_TYPE_B                     (u8) 0x02
+#define ACPI_TYPE_F                     (u8) 0x03
+
+#define ACPI_NOT_BUS_MASTER             (u8) 0x00
+#define ACPI_BUS_MASTER                 (u8) 0x01
+
+#define ACPI_TRANSFER_8                 (u8) 0x00
+#define ACPI_TRANSFER_8_16              (u8) 0x01
+#define ACPI_TRANSFER_16                (u8) 0x02
+
+/*
+ * Start Dependent Functions Priority definitions
+ */
+#define ACPI_GOOD_CONFIGURATION         (u8) 0x00
+#define ACPI_ACCEPTABLE_CONFIGURATION   (u8) 0x01
+#define ACPI_SUB_OPTIMAL_CONFIGURATION  (u8) 0x02
+
+/*
+ * 16, 32 and 64-bit Address Descriptor resource types
+ */
+#define ACPI_MEMORY_RANGE               (u8) 0x00
+#define ACPI_IO_RANGE                   (u8) 0x01
+#define ACPI_BUS_NUMBER_RANGE           (u8) 0x02
+
+#define ACPI_ADDRESS_NOT_FIXED          (u8) 0x00
+#define ACPI_ADDRESS_FIXED              (u8) 0x01
+
+#define ACPI_POS_DECODE                 (u8) 0x00
+#define ACPI_SUB_DECODE                 (u8) 0x01
+
+#define ACPI_PRODUCER                   (u8) 0x00
+#define ACPI_CONSUMER                   (u8) 0x01
+
+/*
+ * If possible, pack the following structures to byte alignment
+ */
+#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
+#pragma pack(1)
+#endif
+
+/* UUID data structures for use in vendor-defined resource descriptors */
+
+struct acpi_uuid {
+       u8 data[ACPI_UUID_LENGTH];
+};
+
+struct acpi_vendor_uuid {
+       u8 subtype;
+       u8 data[ACPI_UUID_LENGTH];
+};
+
+/*
+ * Structures used to describe device resources
+ */
+struct acpi_resource_irq {
+       u8 descriptor_length;
+       u8 triggering;
+       u8 polarity;
+       u8 sharable;
+       u8 interrupt_count;
+       u8 interrupts[1];
+};
+
+struct acpi_resource_dma {
+       u8 type;
+       u8 bus_master;
+       u8 transfer;
+       u8 channel_count;
+       u8 channels[1];
+};
+
+struct acpi_resource_start_dependent {
+       u8 descriptor_length;
+       u8 compatibility_priority;
+       u8 performance_robustness;
+};
+
+/*
+ * The END_DEPENDENT_FUNCTIONS_RESOURCE struct is not
+ * needed because it has no fields
+ */
+
+struct acpi_resource_io {
+       u8 io_decode;
+       u8 alignment;
+       u8 address_length;
+       u16 minimum;
+       u16 maximum;
+};
+
+struct acpi_resource_fixed_io {
+       u16 address;
+       u8 address_length;
+};
+
+struct acpi_resource_vendor {
+       u16 byte_length;
+       u8 byte_data[1];
+};
+
+/* Vendor resource with UUID info (introduced in ACPI 3.0) */
+
+struct acpi_resource_vendor_typed {
+       u16 byte_length;
+       u8 uuid_subtype;
+       u8 uuid[ACPI_UUID_LENGTH];
+       u8 byte_data[1];
+};
+
+struct acpi_resource_end_tag {
+       u8 checksum;
+};
+
+struct acpi_resource_memory24 {
+       u8 write_protect;
+       u16 minimum;
+       u16 maximum;
+       u16 alignment;
+       u16 address_length;
+};
+
+struct acpi_resource_memory32 {
+       u8 write_protect;
+       u32 minimum;
+       u32 maximum;
+       u32 alignment;
+       u32 address_length;
+};
+
+struct acpi_resource_fixed_memory32 {
+       u8 write_protect;
+       u32 address;
+       u32 address_length;
+};
+
+struct acpi_memory_attribute {
+       u8 write_protect;
+       u8 caching;
+       u8 range_type;
+       u8 translation;
+};
+
+struct acpi_io_attribute {
+       u8 range_type;
+       u8 translation;
+       u8 translation_type;
+       u8 reserved1;
+};
+
+union acpi_resource_attribute {
+       struct acpi_memory_attribute mem;
+       struct acpi_io_attribute io;
+
+       /* Used for the *word_space macros */
+
+       u8 type_specific;
+};
+
+struct acpi_resource_source {
+       u8 index;
+       u16 string_length;
+       char *string_ptr;
+};
+
+/* Fields common to all address descriptors, 16/32/64 bit */
+
+#define ACPI_RESOURCE_ADDRESS_COMMON \
+       u8                                      resource_type; \
+       u8                                      producer_consumer; \
+       u8                                      decode; \
+       u8                                      min_address_fixed; \
+       u8                                      max_address_fixed; \
+       union acpi_resource_attribute           info;
+
+struct acpi_resource_address {
+ACPI_RESOURCE_ADDRESS_COMMON};
+
+struct acpi_resource_address16 {
+       ACPI_RESOURCE_ADDRESS_COMMON u16 granularity;
+       u16 minimum;
+       u16 maximum;
+       u16 translation_offset;
+       u16 address_length;
+       struct acpi_resource_source resource_source;
+};
+
+struct acpi_resource_address32 {
+       ACPI_RESOURCE_ADDRESS_COMMON u32 granularity;
+       u32 minimum;
+       u32 maximum;
+       u32 translation_offset;
+       u32 address_length;
+       struct acpi_resource_source resource_source;
+};
+
+struct acpi_resource_address64 {
+       ACPI_RESOURCE_ADDRESS_COMMON u64 granularity;
+       u64 minimum;
+       u64 maximum;
+       u64 translation_offset;
+       u64 address_length;
+       struct acpi_resource_source resource_source;
+};
+
+struct acpi_resource_extended_address64 {
+       ACPI_RESOURCE_ADDRESS_COMMON u8 revision_iD;
+       u64 granularity;
+       u64 minimum;
+       u64 maximum;
+       u64 translation_offset;
+       u64 address_length;
+       u64 type_specific;
+};
+
+struct acpi_resource_extended_irq {
+       u8 producer_consumer;
+       u8 triggering;
+       u8 polarity;
+       u8 sharable;
+       u8 interrupt_count;
+       struct acpi_resource_source resource_source;
+       u32 interrupts[1];
+};
+
+struct acpi_resource_generic_register {
+       u8 space_id;
+       u8 bit_width;
+       u8 bit_offset;
+       u8 access_size;
+       u64 address;
+};
+
+/* ACPI_RESOURCE_TYPEs */
+
+#define ACPI_RESOURCE_TYPE_IRQ                  0
+#define ACPI_RESOURCE_TYPE_DMA                  1
+#define ACPI_RESOURCE_TYPE_START_DEPENDENT      2
+#define ACPI_RESOURCE_TYPE_END_DEPENDENT        3
+#define ACPI_RESOURCE_TYPE_IO                   4
+#define ACPI_RESOURCE_TYPE_FIXED_IO             5
+#define ACPI_RESOURCE_TYPE_VENDOR               6
+#define ACPI_RESOURCE_TYPE_END_TAG              7
+#define ACPI_RESOURCE_TYPE_MEMORY24             8
+#define ACPI_RESOURCE_TYPE_MEMORY32             9
+#define ACPI_RESOURCE_TYPE_FIXED_MEMORY32       10
+#define ACPI_RESOURCE_TYPE_ADDRESS16            11
+#define ACPI_RESOURCE_TYPE_ADDRESS32            12
+#define ACPI_RESOURCE_TYPE_ADDRESS64            13
+#define ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64   14     /* ACPI 3.0 */
+#define ACPI_RESOURCE_TYPE_EXTENDED_IRQ         15
+#define ACPI_RESOURCE_TYPE_GENERIC_REGISTER     16
+#define ACPI_RESOURCE_TYPE_MAX                  16
+
+/* Master union for resource descriptors */
+
+union acpi_resource_data {
+       struct acpi_resource_irq irq;
+       struct acpi_resource_dma dma;
+       struct acpi_resource_start_dependent start_dpf;
+       struct acpi_resource_io io;
+       struct acpi_resource_fixed_io fixed_io;
+       struct acpi_resource_vendor vendor;
+       struct acpi_resource_vendor_typed vendor_typed;
+       struct acpi_resource_end_tag end_tag;
+       struct acpi_resource_memory24 memory24;
+       struct acpi_resource_memory32 memory32;
+       struct acpi_resource_fixed_memory32 fixed_memory32;
+       struct acpi_resource_address16 address16;
+       struct acpi_resource_address32 address32;
+       struct acpi_resource_address64 address64;
+       struct acpi_resource_extended_address64 ext_address64;
+       struct acpi_resource_extended_irq extended_irq;
+       struct acpi_resource_generic_register generic_reg;
+
+       /* Common fields */
+
+       struct acpi_resource_address address;   /* Common 16/32/64 address fields */
+};
+
+/* Common resource header */
+
+struct acpi_resource {
+       u32 type;
+       u32 length;
+       union acpi_resource_data data;
+};
+
+/* restore default alignment */
+
+#pragma pack()
+
+#define ACPI_RS_SIZE_NO_DATA                8  /* Id + Length fields */
+#define ACPI_RS_SIZE_MIN                    (u32) ACPI_ROUND_UP_TO_NATIVE_WORD (12)
+#define ACPI_RS_SIZE(type)                  (u32) (ACPI_RS_SIZE_NO_DATA + sizeof (type))
+
+#define ACPI_NEXT_RESOURCE(res)             (struct acpi_resource *)((u8 *) res + res->length)
+
+struct acpi_pci_routing_table {
+       u32 length;
+       u32 pin;
+       acpi_integer address;   /* here for 64-bit alignment */
+       u32 source_index;
+       char source[4];         /* pad to 64 bits so sizeof() works in all cases */
+};
+
+#endif                         /* __ACRESTYP_H__ */
index 13a3d9ad92db79f57c2063f60be9302d3525e77c..813e4b6c2c0d2f82aa3251e5b4a65d091c5f2daa 100644 (file)
@@ -288,6 +288,31 @@ enum acpi_prefered_pm_profiles {
 
 #define ACPI_FADT_OFFSET(f)             (u8) ACPI_OFFSET (struct acpi_table_fadt, f)
 
+union acpi_name_union {
+       u32 integer;
+       char ascii[4];
+};
+
+/*
+ * Internal ACPI Table Descriptor. One per ACPI table
+ */
+struct acpi_table_desc {
+       acpi_physical_address address;
+       struct acpi_table_header *pointer;
+       u32 length;             /* Length fixed at 32 bits */
+       union acpi_name_union signature;
+       acpi_owner_id owner_id;
+       u8 flags;
+};
+
+/* Flags for above */
+
+#define ACPI_TABLE_ORIGIN_UNKNOWN       (0)
+#define ACPI_TABLE_ORIGIN_MAPPED        (1)
+#define ACPI_TABLE_ORIGIN_ALLOCATED     (2)
+#define ACPI_TABLE_ORIGIN_MASK          (3)
+#define ACPI_TABLE_IS_LOADED            (4)
+
 /*
  * Get the remaining ACPI tables
  */
index 63f5b4cf4de1e06c9075164ad65cea947b77ed94..18963b9681149dea6546dac30244fa60ad2bf6c5 100644 (file)
@@ -627,7 +627,7 @@ struct acpi_hest_aer_common {
        u32 uncorrectable_error_mask;
        u32 uncorrectable_error_severity;
        u32 correctable_error_mask;
-       u32 advanced_error_cababilities;
+       u32 advanced_error_capabilities;
 };
 
 /* Hardware Error Notification */
index 7220361790b3ce105869e2dddc65c361d27e9d14..03744d28dcf6ed660fc3453244ac05276dc9f9f9 100644 (file)
@@ -204,11 +204,10 @@ typedef u32 acpi_physical_address;
 
 /*******************************************************************************
  *
- * OS-dependent and compiler-dependent types
+ * OS-dependent types
  *
  * If the defaults below are not appropriate for the host system, they can
- * be defined in the compiler-specific or OS-specific header, and this will
- * take precedence.
+ * be defined in the OS-specific header, and this will take precedence.
  *
  ******************************************************************************/
 
@@ -218,12 +217,6 @@ typedef u32 acpi_physical_address;
 #define acpi_thread_id                 acpi_size
 #endif
 
-/* Object returned from acpi_os_create_lock */
-
-#ifndef acpi_spinlock
-#define acpi_spinlock                   void *
-#endif
-
 /* Flags for acpi_os_acquire_lock/acpi_os_release_lock */
 
 #ifndef acpi_cpu_flags
@@ -233,9 +226,51 @@ typedef u32 acpi_physical_address;
 /* Object returned from acpi_os_create_cache */
 
 #ifndef acpi_cache_t
+#ifdef ACPI_USE_LOCAL_CACHE
 #define acpi_cache_t                    struct acpi_memory_list
+#else
+#define acpi_cache_t                    void *
+#endif
+#endif
+
+/*
+ * Synchronization objects - Mutexes, Semaphores, and spin_locks
+ */
+#if (ACPI_MUTEX_TYPE == ACPI_BINARY_SEMAPHORE)
+/*
+ * These macros are used if the host OS does not support a mutex object.
+ * Map the OSL Mutex interfaces to binary semaphores.
+ */
+#define acpi_mutex                      acpi_semaphore
+#define acpi_os_create_mutex(out_handle) acpi_os_create_semaphore (1, 1, out_handle)
+#define acpi_os_delete_mutex(handle)    (void) acpi_os_delete_semaphore (handle)
+#define acpi_os_acquire_mutex(handle,time) acpi_os_wait_semaphore (handle, 1, time)
+#define acpi_os_release_mutex(handle)   (void) acpi_os_signal_semaphore (handle, 1)
+#endif
+
+/* Configurable types for synchronization objects */
+
+#ifndef acpi_spinlock
+#define acpi_spinlock                   void *
+#endif
+
+#ifndef acpi_semaphore
+#define acpi_semaphore                  void *
+#endif
+
+#ifndef acpi_mutex
+#define acpi_mutex                      void *
 #endif
 
+/*******************************************************************************
+ *
+ * Compiler-dependent types
+ *
+ * If the defaults below are not appropriate for the host compiler, they can
+ * be defined in the compiler-specific header, and this will take precedence.
+ *
+ ******************************************************************************/
+
 /* Use C99 uintptr_t for pointer casting if available, "void *" otherwise */
 
 #ifndef acpi_uintptr_t
@@ -268,6 +303,43 @@ typedef u32 acpi_physical_address;
 #define ACPI_EXPORT_SYMBOL(symbol)
 #endif
 
+/******************************************************************************
+ *
+ * ACPI Specification constants (Do not change unless the specification changes)
+ *
+ *****************************************************************************/
+
+/* Number of distinct FADT-based GPE register blocks (GPE0 and GPE1) */
+
+#define ACPI_MAX_GPE_BLOCKS             2
+
+/* Default ACPI register widths */
+
+#define ACPI_GPE_REGISTER_WIDTH         8
+#define ACPI_PM1_REGISTER_WIDTH         16
+#define ACPI_PM2_REGISTER_WIDTH         8
+#define ACPI_PM_TIMER_WIDTH             32
+
+/* Names within the namespace are 4 bytes long */
+
+#define ACPI_NAME_SIZE                  4
+#define ACPI_PATH_SEGMENT_LENGTH        5      /* 4 chars for name + 1 char for separator */
+#define ACPI_PATH_SEPARATOR             '.'
+
+/* Sizes for ACPI table headers */
+
+#define ACPI_OEM_ID_SIZE                6
+#define ACPI_OEM_TABLE_ID_SIZE          8
+
+/* ACPI/PNP hardware IDs */
+
+#define PCI_ROOT_HID_STRING             "PNP0A03"
+#define PCI_EXPRESS_ROOT_HID_STRING     "PNP0A08"
+
+/* PM Timer ticks per second (HZ) */
+
+#define PM_TIMER_FREQUENCY  3579545
+
 /*******************************************************************************
  *
  * Independent types
@@ -291,13 +363,18 @@ typedef u32 acpi_physical_address;
 #endif
 
 /*
- * Mescellaneous types
+ * Miscellaneous types
  */
 typedef u32 acpi_status;       /* All ACPI Exceptions */
 typedef u32 acpi_name;         /* 4-byte ACPI name */
 typedef char *acpi_string;     /* Null terminated ASCII string */
 typedef void *acpi_handle;     /* Actually a ptr to a NS Node */
 
+/* Owner IDs are used to track namespace nodes for selective deletion */
+
+typedef u8 acpi_owner_id;
+#define ACPI_OWNER_ID_MAX               0xFF
+
 struct uint64_struct {
        u32 lo;
        u32 hi;
@@ -313,13 +390,8 @@ struct uint32_struct {
        u32 hi;
 };
 
-/* Synchronization objects */
-
-#define acpi_mutex                      void *
-#define acpi_semaphore                  void *
-
 /*
- * Acpi integer width. In ACPI version 1, integers are 32 bits.  In ACPI
+ * Acpi integer width. In ACPI version 1, integers are 32 bits. In ACPI
  * version 2, integers are 64 bits. Note that this pertains to the ACPI integer
  * type only, not other integers used in the implementation of the ACPI CA
  * subsystem.
@@ -338,10 +410,75 @@ typedef unsigned long long acpi_integer;
 #define ACPI_MAX16_DECIMAL_DIGITS        5
 #define ACPI_MAX8_DECIMAL_DIGITS         3
 
+/* PM Timer ticks per second (HZ) */
+
+#define PM_TIMER_FREQUENCY  3579545
+
 /*
  * Constants with special meanings
  */
 #define ACPI_ROOT_OBJECT                ACPI_ADD_PTR (acpi_handle, NULL, ACPI_MAX_PTR)
+#define ACPI_WAIT_FOREVER               0xFFFF /* u16, as per ACPI spec */
+#define ACPI_DO_NOT_WAIT                0
+
+/*******************************************************************************
+ *
+ * Commonly used macros
+ *
+ ******************************************************************************/
+
+/* Data manipulation */
+
+#define ACPI_LOWORD(l)                  ((u16)(u32)(l))
+#define ACPI_HIWORD(l)                  ((u16)((((u32)(l)) >> 16) & 0xFFFF))
+#define ACPI_LOBYTE(l)                  ((u8)(u16)(l))
+#define ACPI_HIBYTE(l)                  ((u8)((((u16)(l)) >> 8) & 0xFF))
+
+/* Full 64-bit integer must be available on both 32-bit and 64-bit platforms */
+
+struct acpi_integer_overlay {
+       u32 lo_dword;
+       u32 hi_dword;
+};
+
+#define ACPI_LODWORD(integer)           (ACPI_CAST_PTR (struct acpi_integer_overlay, &integer)->lo_dword)
+#define ACPI_HIDWORD(integer)           (ACPI_CAST_PTR (struct acpi_integer_overlay, &integer)->hi_dword)
+
+#define ACPI_SET_BIT(target,bit)        ((target) |= (bit))
+#define ACPI_CLEAR_BIT(target,bit)      ((target) &= ~(bit))
+#define ACPI_MIN(a,b)                   (((a)<(b))?(a):(b))
+#define ACPI_MAX(a,b)                   (((a)>(b))?(a):(b))
+
+/* Size calculation */
+
+#define ACPI_ARRAY_LENGTH(x)            (sizeof(x) / sizeof((x)[0]))
+
+/* Pointer manipulation */
+
+#define ACPI_CAST_PTR(t, p)             ((t *) (acpi_uintptr_t) (p))
+#define ACPI_CAST_INDIRECT_PTR(t, p)    ((t **) (acpi_uintptr_t) (p))
+#define ACPI_ADD_PTR(t, a, b)           ACPI_CAST_PTR (t, (ACPI_CAST_PTR (u8, (a)) + (acpi_size)(b)))
+#define ACPI_PTR_DIFF(a, b)             (acpi_size) (ACPI_CAST_PTR (u8, (a)) - ACPI_CAST_PTR (u8, (b)))
+
+/* Pointer/Integer type conversions */
+
+#define ACPI_TO_POINTER(i)              ACPI_ADD_PTR (void, (void *) NULL,(acpi_size) i)
+#define ACPI_TO_INTEGER(p)              ACPI_PTR_DIFF (p, (void *) NULL)
+#define ACPI_OFFSET(d, f)               (acpi_size) ACPI_PTR_DIFF (&(((d *)0)->f), (void *) NULL)
+#define ACPI_PHYSADDR_TO_PTR(i)         ACPI_TO_POINTER(i)
+#define ACPI_PTR_TO_PHYSADDR(i)         ACPI_TO_INTEGER(i)
+
+#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
+#define ACPI_COMPARE_NAME(a,b)          (*ACPI_CAST_PTR (u32, (a)) == *ACPI_CAST_PTR (u32, (b)))
+#else
+#define ACPI_COMPARE_NAME(a,b)          (!ACPI_STRNCMP (ACPI_CAST_PTR (char, (a)), ACPI_CAST_PTR (char, (b)), ACPI_NAME_SIZE))
+#endif
+
+/*******************************************************************************
+ *
+ * Miscellaneous constants
+ *
+ ******************************************************************************/
 
 /*
  * Initialization sequence
@@ -414,7 +551,7 @@ typedef unsigned long long acpi_integer;
 #define ACPI_NOTIFY_MAX                 0x0B
 
 /*
- * Types associated with ACPI names and objects.  The first group of
+ * Types associated with ACPI names and objects. The first group of
  * values (up to ACPI_TYPE_EXTERNAL_MAX) correspond to the definition
  * of the ACPI object_type() operator (See the ACPI Spec). Therefore,
  * only add to the first group if the spec changes.
@@ -731,6 +868,15 @@ struct acpi_buffer {
 #define ACPI_SINGLE_NAME                1
 #define ACPI_NAME_TYPE_MAX              1
 
+/*
+ * Predefined Namespace items
+ */
+struct acpi_predefined_names {
+       char *name;
+       u8 type;
+       char *val;
+};
+
 /*
  * Structure and flags for acpi_get_system_info
  */
@@ -787,7 +933,7 @@ acpi_status(*acpi_exception_handler) (acpi_status aml_status,
                                      u16 opcode,
                                      u32 aml_offset, void *context);
 
-/* Table Event handler (Load, load_table etc) and types */
+/* Table Event handler (Load, load_table, etc.) and types */
 
 typedef
 acpi_status(*acpi_tbl_handler) (u32 event, void *table, void *context);
@@ -823,6 +969,12 @@ acpi_status(*acpi_walk_callback) (acpi_handle obj_handle,
 #define ACPI_INTERRUPT_NOT_HANDLED      0x00
 #define ACPI_INTERRUPT_HANDLED          0x01
 
+/* Length of _HID, _UID, _CID, and UUID values */
+
+#define ACPI_DEVICE_ID_LENGTH           0x09
+#define ACPI_MAX_CID_LENGTH             48
+#define ACPI_UUID_LENGTH                16
+
 /* Common string version of device HIDs and UIDs */
 
 struct acpica_device_id {
@@ -900,357 +1052,28 @@ struct acpi_mem_space_context {
 };
 
 /*
- * Definitions for Resource Attributes
- */
-typedef u16 acpi_rs_length;    /* Resource Length field is fixed at 16 bits */
-typedef u32 acpi_rsdesc_size;  /* Max Resource Descriptor size is (Length+3) = (64_k-1)+3 */
-
-/*
- *  Memory Attributes
- */
-#define ACPI_READ_ONLY_MEMORY           (u8) 0x00
-#define ACPI_READ_WRITE_MEMORY          (u8) 0x01
-
-#define ACPI_NON_CACHEABLE_MEMORY       (u8) 0x00
-#define ACPI_CACHABLE_MEMORY            (u8) 0x01
-#define ACPI_WRITE_COMBINING_MEMORY     (u8) 0x02
-#define ACPI_PREFETCHABLE_MEMORY        (u8) 0x03
-
-/*
- *  IO Attributes
- *  The ISA IO ranges are:     n000-n0_fFh, n400-n4_fFh, n800-n8_fFh, n_c00-n_cFFh.
- *  The non-ISA IO ranges are: n100-n3_fFh, n500-n7_fFh, n900-n_bFFh, n_cd0-n_fFFh.
+ * struct acpi_memory_list is used only if the ACPICA local cache is enabled
  */
-#define ACPI_NON_ISA_ONLY_RANGES        (u8) 0x01
-#define ACPI_ISA_ONLY_RANGES            (u8) 0x02
-#define ACPI_ENTIRE_RANGE               (ACPI_NON_ISA_ONLY_RANGES | ACPI_ISA_ONLY_RANGES)
-
-/* Type of translation - 1=Sparse, 0=Dense */
-
-#define ACPI_SPARSE_TRANSLATION         (u8) 0x01
-
-/*
- *  IO Port Descriptor Decode
- */
-#define ACPI_DECODE_10                  (u8) 0x00      /* 10-bit IO address decode */
-#define ACPI_DECODE_16                  (u8) 0x01      /* 16-bit IO address decode */
-
-/*
- *  IRQ Attributes
- */
-#define ACPI_LEVEL_SENSITIVE            (u8) 0x00
-#define ACPI_EDGE_SENSITIVE             (u8) 0x01
-
-#define ACPI_ACTIVE_HIGH                (u8) 0x00
-#define ACPI_ACTIVE_LOW                 (u8) 0x01
-
-#define ACPI_EXCLUSIVE                  (u8) 0x00
-#define ACPI_SHARED                     (u8) 0x01
-
-/*
- *  DMA Attributes
- */
-#define ACPI_COMPATIBILITY              (u8) 0x00
-#define ACPI_TYPE_A                     (u8) 0x01
-#define ACPI_TYPE_B                     (u8) 0x02
-#define ACPI_TYPE_F                     (u8) 0x03
-
-#define ACPI_NOT_BUS_MASTER             (u8) 0x00
-#define ACPI_BUS_MASTER                 (u8) 0x01
-
-#define ACPI_TRANSFER_8                 (u8) 0x00
-#define ACPI_TRANSFER_8_16              (u8) 0x01
-#define ACPI_TRANSFER_16                (u8) 0x02
-
-/*
- * Start Dependent Functions Priority definitions
- */
-#define ACPI_GOOD_CONFIGURATION         (u8) 0x00
-#define ACPI_ACCEPTABLE_CONFIGURATION   (u8) 0x01
-#define ACPI_SUB_OPTIMAL_CONFIGURATION  (u8) 0x02
-
-/*
- *  16, 32 and 64-bit Address Descriptor resource types
- */
-#define ACPI_MEMORY_RANGE               (u8) 0x00
-#define ACPI_IO_RANGE                   (u8) 0x01
-#define ACPI_BUS_NUMBER_RANGE           (u8) 0x02
-
-#define ACPI_ADDRESS_NOT_FIXED          (u8) 0x00
-#define ACPI_ADDRESS_FIXED              (u8) 0x01
-
-#define ACPI_POS_DECODE                 (u8) 0x00
-#define ACPI_SUB_DECODE                 (u8) 0x01
-
-#define ACPI_PRODUCER                   (u8) 0x00
-#define ACPI_CONSUMER                   (u8) 0x01
-
-/*
- * If possible, pack the following structures to byte alignment
- */
-#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
-#pragma pack(1)
+struct acpi_memory_list {
+       char *list_name;
+       void *list_head;
+       u16 object_size;
+       u16 max_depth;
+       u16 current_depth;
+       u16 link_offset;
+
+#ifdef ACPI_DBG_TRACK_ALLOCATIONS
+
+       /* Statistics for debug memory tracking only */
+
+       u32 total_allocated;
+       u32 total_freed;
+       u32 max_occupied;
+       u32 total_size;
+       u32 current_total_size;
+       u32 requests;
+       u32 hits;
 #endif
-
-/* UUID data structures for use in vendor-defined resource descriptors */
-
-struct acpi_uuid {
-       u8 data[ACPI_UUID_LENGTH];
-};
-
-struct acpi_vendor_uuid {
-       u8 subtype;
-       u8 data[ACPI_UUID_LENGTH];
-};
-
-/*
- *  Structures used to describe device resources
- */
-struct acpi_resource_irq {
-       u8 descriptor_length;
-       u8 triggering;
-       u8 polarity;
-       u8 sharable;
-       u8 interrupt_count;
-       u8 interrupts[1];
-};
-
-struct acpi_resource_dma {
-       u8 type;
-       u8 bus_master;
-       u8 transfer;
-       u8 channel_count;
-       u8 channels[1];
-};
-
-struct acpi_resource_start_dependent {
-       u8 descriptor_length;
-       u8 compatibility_priority;
-       u8 performance_robustness;
-};
-
-/*
- * END_DEPENDENT_FUNCTIONS_RESOURCE struct is not
- * needed because it has no fields
- */
-
-struct acpi_resource_io {
-       u8 io_decode;
-       u8 alignment;
-       u8 address_length;
-       u16 minimum;
-       u16 maximum;
-};
-
-struct acpi_resource_fixed_io {
-       u16 address;
-       u8 address_length;
-};
-
-struct acpi_resource_vendor {
-       u16 byte_length;
-       u8 byte_data[1];
-};
-
-/* Vendor resource with UUID info (introduced in ACPI 3.0) */
-
-struct acpi_resource_vendor_typed {
-       u16 byte_length;
-       u8 uuid_subtype;
-       u8 uuid[ACPI_UUID_LENGTH];
-       u8 byte_data[1];
-};
-
-struct acpi_resource_end_tag {
-       u8 checksum;
-};
-
-struct acpi_resource_memory24 {
-       u8 write_protect;
-       u16 minimum;
-       u16 maximum;
-       u16 alignment;
-       u16 address_length;
-};
-
-struct acpi_resource_memory32 {
-       u8 write_protect;
-       u32 minimum;
-       u32 maximum;
-       u32 alignment;
-       u32 address_length;
-};
-
-struct acpi_resource_fixed_memory32 {
-       u8 write_protect;
-       u32 address;
-       u32 address_length;
-};
-
-struct acpi_memory_attribute {
-       u8 write_protect;
-       u8 caching;
-       u8 range_type;
-       u8 translation;
-};
-
-struct acpi_io_attribute {
-       u8 range_type;
-       u8 translation;
-       u8 translation_type;
-       u8 reserved1;
-};
-
-union acpi_resource_attribute {
-       struct acpi_memory_attribute mem;
-       struct acpi_io_attribute io;
-
-       /* Used for the *word_space macros */
-
-       u8 type_specific;
-};
-
-struct acpi_resource_source {
-       u8 index;
-       u16 string_length;
-       char *string_ptr;
-};
-
-/* Fields common to all address descriptors, 16/32/64 bit */
-
-#define ACPI_RESOURCE_ADDRESS_COMMON \
-       u8                              resource_type; \
-       u8                              producer_consumer; \
-       u8                              decode; \
-       u8                              min_address_fixed; \
-       u8                              max_address_fixed; \
-       union acpi_resource_attribute   info;
-
-struct acpi_resource_address {
-ACPI_RESOURCE_ADDRESS_COMMON};
-
-struct acpi_resource_address16 {
-       ACPI_RESOURCE_ADDRESS_COMMON u16 granularity;
-       u16 minimum;
-       u16 maximum;
-       u16 translation_offset;
-       u16 address_length;
-       struct acpi_resource_source resource_source;
-};
-
-struct acpi_resource_address32 {
-       ACPI_RESOURCE_ADDRESS_COMMON u32 granularity;
-       u32 minimum;
-       u32 maximum;
-       u32 translation_offset;
-       u32 address_length;
-       struct acpi_resource_source resource_source;
-};
-
-struct acpi_resource_address64 {
-       ACPI_RESOURCE_ADDRESS_COMMON u64 granularity;
-       u64 minimum;
-       u64 maximum;
-       u64 translation_offset;
-       u64 address_length;
-       struct acpi_resource_source resource_source;
-};
-
-struct acpi_resource_extended_address64 {
-       ACPI_RESOURCE_ADDRESS_COMMON u8 revision_iD;
-       u64 granularity;
-       u64 minimum;
-       u64 maximum;
-       u64 translation_offset;
-       u64 address_length;
-       u64 type_specific;
-};
-
-struct acpi_resource_extended_irq {
-       u8 producer_consumer;
-       u8 triggering;
-       u8 polarity;
-       u8 sharable;
-       u8 interrupt_count;
-       struct acpi_resource_source resource_source;
-       u32 interrupts[1];
-};
-
-struct acpi_resource_generic_register {
-       u8 space_id;
-       u8 bit_width;
-       u8 bit_offset;
-       u8 access_size;
-       u64 address;
-};
-
-/* ACPI_RESOURCE_TYPEs */
-
-#define ACPI_RESOURCE_TYPE_IRQ                  0
-#define ACPI_RESOURCE_TYPE_DMA                  1
-#define ACPI_RESOURCE_TYPE_START_DEPENDENT      2
-#define ACPI_RESOURCE_TYPE_END_DEPENDENT        3
-#define ACPI_RESOURCE_TYPE_IO                   4
-#define ACPI_RESOURCE_TYPE_FIXED_IO             5
-#define ACPI_RESOURCE_TYPE_VENDOR               6
-#define ACPI_RESOURCE_TYPE_END_TAG              7
-#define ACPI_RESOURCE_TYPE_MEMORY24             8
-#define ACPI_RESOURCE_TYPE_MEMORY32             9
-#define ACPI_RESOURCE_TYPE_FIXED_MEMORY32       10
-#define ACPI_RESOURCE_TYPE_ADDRESS16            11
-#define ACPI_RESOURCE_TYPE_ADDRESS32            12
-#define ACPI_RESOURCE_TYPE_ADDRESS64            13
-#define ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64   14     /* ACPI 3.0 */
-#define ACPI_RESOURCE_TYPE_EXTENDED_IRQ         15
-#define ACPI_RESOURCE_TYPE_GENERIC_REGISTER     16
-#define ACPI_RESOURCE_TYPE_MAX                  16
-
-union acpi_resource_data {
-       struct acpi_resource_irq irq;
-       struct acpi_resource_dma dma;
-       struct acpi_resource_start_dependent start_dpf;
-       struct acpi_resource_io io;
-       struct acpi_resource_fixed_io fixed_io;
-       struct acpi_resource_vendor vendor;
-       struct acpi_resource_vendor_typed vendor_typed;
-       struct acpi_resource_end_tag end_tag;
-       struct acpi_resource_memory24 memory24;
-       struct acpi_resource_memory32 memory32;
-       struct acpi_resource_fixed_memory32 fixed_memory32;
-       struct acpi_resource_address16 address16;
-       struct acpi_resource_address32 address32;
-       struct acpi_resource_address64 address64;
-       struct acpi_resource_extended_address64 ext_address64;
-       struct acpi_resource_extended_irq extended_irq;
-       struct acpi_resource_generic_register generic_reg;
-
-       /* Common fields */
-
-       struct acpi_resource_address address;   /* Common 16/32/64 address fields */
-};
-
-struct acpi_resource {
-       u32 type;
-       u32 length;
-       union acpi_resource_data data;
-};
-
-/* restore default alignment */
-
-#pragma pack()
-
-#define ACPI_RS_SIZE_NO_DATA                8  /* Id + Length fields */
-#define ACPI_RS_SIZE_MIN                    (u32) ACPI_ROUND_UP_TO_NATIVE_WORD (12)
-#define ACPI_RS_SIZE(type)                  (u32) (ACPI_RS_SIZE_NO_DATA + sizeof (type))
-
-#define ACPI_NEXT_RESOURCE(res)             (struct acpi_resource *)((u8 *) res + res->length)
-
-struct acpi_pci_routing_table {
-       u32 length;
-       u32 pin;
-       acpi_integer address;   /* here for 64-bit alignment */
-       u32 source_index;
-       char source[4];         /* pad to 64 bits so sizeof() works in all cases */
 };
 
 #endif                         /* __ACTYPES_H__ */
index fcd2572e428c1a24a45e2ac0e19abde178654c8e..e62f10d9a7d844e680a265d1f45b547fb00bacfc 100644 (file)
 #ifndef __ACENV_H__
 #define __ACENV_H__
 
-/*
+/* Types for ACPI_MUTEX_TYPE */
+
+#define ACPI_BINARY_SEMAPHORE       0
+#define ACPI_OSL_MUTEX              1
+
+/* Types for DEBUGGER_THREADING */
+
+#define DEBUGGER_SINGLE_THREADED    0
+#define DEBUGGER_MULTI_THREADED     1
+
+/******************************************************************************
+ *
  * Configuration for ACPI tools and utilities
- */
+ *
+ *****************************************************************************/
 
 #ifdef ACPI_LIBRARY
 /*
  * Note: The non-debug version of the acpi_library does not contain any
- * debug support, for minimimal size. The debug version uses ACPI_FULL_DEBUG
+ * debug support, for minimal size. The debug version uses ACPI_FULL_DEBUG
  */
 #define ACPI_USE_LOCAL_CACHE
 #endif
 #define ACPI_DBG_TRACK_ALLOCATIONS
 #endif
 
-#ifdef ACPI_DASM_APP
-#ifndef MSDOS
-#define ACPI_DEBUG_OUTPUT
-#endif
-#define ACPI_APPLICATION
-#define ACPI_DISASSEMBLER
-#define ACPI_NO_METHOD_EXECUTION
-#define ACPI_LARGE_NAMESPACE_NODE
-#define ACPI_DATA_TABLE_DISASSEMBLY
-#endif
-
 #ifdef ACPI_APPLICATION
 #define ACPI_USE_SYSTEM_CLIBRARY
 #define ACPI_USE_LOCAL_CACHE
 
 /*! [End] no source code translation !*/
 
+/******************************************************************************
+ *
+ * Miscellaneous configuration
+ *
+ *****************************************************************************/
+
+/*
+ * Are mutexes supported by the host? default is no, use binary semaphores.
+ */
+#ifndef ACPI_MUTEX_TYPE
+#define ACPI_MUTEX_TYPE             ACPI_BINARY_SEMAPHORE
+#endif
+
 /*
  * Debugger threading model
  * Use single threaded if the entire subsystem is contained in an application
  * By default the model is single threaded if ACPI_APPLICATION is set,
  * multi-threaded if ACPI_APPLICATION is not set.
  */
-#define DEBUGGER_SINGLE_THREADED    0
-#define DEBUGGER_MULTI_THREADED     1
-
 #ifndef DEBUGGER_THREADING
 #ifdef ACPI_APPLICATION
 #define DEBUGGER_THREADING          DEBUGGER_SINGLE_THREADED
index 029c8c06c151ab4f7153d4aeb143bb51ed4d258c..3cabf888c8af192543afa043bc78a6706314b7c6 100644 (file)
@@ -46,6 +46,7 @@
 
 #define ACPI_USE_SYSTEM_CLIBRARY
 #define ACPI_USE_DO_WHILE_0
+#define ACPI_MUTEX_TYPE             ACPI_BINARY_SEMAPHORE
 
 #ifdef __KERNEL__
 
@@ -141,6 +142,10 @@ static inline void *acpi_os_acquire_object(acpi_cache_t * cache)
 /*
  * We need to show where it is safe to preempt execution of ACPICA
  */
-#define ACPI_PREEMPTION_POINT()        cond_resched()
+#define ACPI_PREEMPTION_POINT()                \
+       do {                            \
+               if (!irqs_disabled())   \
+                       cond_resched(); \
+       } while (0)
 
 #endif                         /* __ACLINUX_H__ */
index 9d77b1d7dca806e540838d27bbc632961a340f0e..e26f54952892e9c46be142344e36ceb37f19f6f0 100644 (file)
@@ -319,6 +319,7 @@ enum
 {
        NAPI_STATE_SCHED,       /* Poll is scheduled */
        NAPI_STATE_DISABLE,     /* Disable pending */
+       NAPI_STATE_NPSVC,       /* Netpoll - don't dequeue from poll_list */
 };
 
 extern void __napi_schedule(struct napi_struct *n);
@@ -1497,6 +1498,12 @@ static inline void netif_rx_complete(struct net_device *dev,
 {
        unsigned long flags;
 
+       /*
+        * don't let napi dequeue from the cpu poll list
+        * just in case its running on a different cpu
+        */
+       if (unlikely(test_bit(NAPI_STATE_NPSVC, &napi->state)))
+               return;
        local_irq_save(flags);
        __netif_rx_complete(dev, napi);
        local_irq_restore(flags);
index c19595c8930491d8e0f64a2795d36cb127ee3b60..29fe9ea1d3463a5964ee158eeb1a39211b1c756f 100644 (file)
@@ -141,6 +141,7 @@ enum ctattr_protonat {
 #define CTA_PROTONAT_MAX (__CTA_PROTONAT_MAX - 1)
 
 enum ctattr_natseq {
+       CTA_NAT_SEQ_UNSPEC,
        CTA_NAT_SEQ_CORRECTION_POS,
        CTA_NAT_SEQ_OFFSET_BEFORE,
        CTA_NAT_SEQ_OFFSET_AFTER,
index a00bd1a0f156d729447d4d06d026f55d2287e930..c2d1a7d1886abc8829452531a703a5b57e959370 100644 (file)
@@ -223,7 +223,6 @@ struct hotplug_params {
 #ifdef CONFIG_ACPI
 #include <acpi/acpi.h>
 #include <acpi/acpi_bus.h>
-#include <acpi/actypes.h>
 extern acpi_status acpi_get_hp_params_from_firmware(struct pci_bus *bus,
                                struct hotplug_params *hpp);
 int acpi_get_hp_hw_control_from_firmware(struct pci_dev *dev, u32 flags);
index 3f9a60043a975617a3b8217f8e69b24751c13e01..6e7ba16ff454f878d28315c02f66572b9734bd09 100644 (file)
@@ -146,6 +146,8 @@ static inline void smp_send_reschedule(int cpu) { }
 })
 #define smp_call_function_mask(mask, func, info, wait) \
                        (up_smp_call_function(func, info))
+#define smp_call_function_many(mask, func, info, wait) \
+                       (up_smp_call_function(func, info))
 static inline void init_call_single_data(void)
 {
 }
index 73a2f4eb1f7ae1a6f9c23131a56f5d1d6d631d58..9b42baed39009c75c8e3932a8c9be3cfbb0984f0 100644 (file)
@@ -158,8 +158,12 @@ struct usb_ctrlrequest {
  * (rarely) accepted by SET_DESCRIPTOR.
  *
  * Note that all multi-byte values here are encoded in little endian
- * byte order "on the wire".  But when exposed through Linux-USB APIs,
- * they've been converted to cpu byte order.
+ * byte order "on the wire".  Within the kernel and when exposed
+ * through the Linux-USB APIs, they are not converted to cpu byte
+ * order; it is the responsibility of the client code to do this.
+ * The single exception is when device and configuration descriptors (but
+ * not other descriptors) are read from usbfs (i.e. /proc/bus/usb/BBB/DDD);
+ * in this case the fields are converted to host endianness by the kernel.
  */
 
 /*
index 3025ae17ddbeb46207ca71e88b3d31d6aaad44a8..94c852d47d0f8d5c7d033279bf2f67ca3fd861dd 100644 (file)
@@ -135,9 +135,11 @@ struct dongle_reg {
 
 /* 
  * Per-packet information we need to hide inside sk_buff 
- * (must not exceed 48 bytes, check with struct sk_buff) 
+ * (must not exceed 48 bytes, check with struct sk_buff)
+ * The default_qdisc_pad field is a temporary hack.
  */
 struct irda_skb_cb {
+       unsigned int default_qdisc_pad;
        magic_t magic;       /* Be sure that we can trust the information */
        __u32   next_speed;  /* The Speed to be set *after* this frame */
        __u16   mtt;         /* Minimum turn around time */
index fe00b3b983a86387332234703217abb1d28ca202..2606d0fb4e54e8f120618328c7b72c01634dc35d 100644 (file)
@@ -702,7 +702,7 @@ static int rebind_subsystems(struct cgroupfs_root *root,
         * any child cgroups exist. This is theoretically supportable
         * but involves complex error handling, so it's being left until
         * later */
-       if (!list_empty(&cgrp->children))
+       if (root->number_of_cgroups > 1)
                return -EBUSY;
 
        /* Process each subsystem */
@@ -1024,7 +1024,7 @@ static int cgroup_get_sb(struct file_system_type *fs_type,
                if (ret == -EBUSY) {
                        mutex_unlock(&cgroup_mutex);
                        mutex_unlock(&inode->i_mutex);
-                       goto drop_new_super;
+                       goto free_cg_links;
                }
 
                /* EBUSY should be the only error here */
@@ -1073,10 +1073,11 @@ static int cgroup_get_sb(struct file_system_type *fs_type,
 
        return simple_set_mnt(mnt, sb);
 
+ free_cg_links:
+       free_cg_links(&tmp_cg_links);
  drop_new_super:
        up_write(&sb->s_umount);
        deactivate_super(sb);
-       free_cg_links(&tmp_cg_links);
        return ret;
 }
 
@@ -2934,9 +2935,6 @@ int cgroup_clone(struct task_struct *tsk, struct cgroup_subsys *subsys,
  again:
        root = subsys->root;
        if (root == &rootnode) {
-               printk(KERN_INFO
-                      "Not cloning cgroup for unused subsystem %s\n",
-                      subsys->name);
                mutex_unlock(&cgroup_mutex);
                return 0;
        }
index 5e79c662294bf542750af232be67a1e92bed858d..a140e44eebbacbe88b989e98b1bbdc744a99c94f 100644 (file)
@@ -197,6 +197,11 @@ static int common_timer_create(struct k_itimer *new_timer)
        return 0;
 }
 
+static int no_timer_create(struct k_itimer *new_timer)
+{
+       return -EOPNOTSUPP;
+}
+
 /*
  * Return nonzero if we know a priori this clockid_t value is bogus.
  */
@@ -248,6 +253,7 @@ static __init int init_posix_timers(void)
                .clock_getres = hrtimer_get_res,
                .clock_get = posix_get_monotonic_raw,
                .clock_set = do_posix_clock_nosettime,
+               .timer_create = no_timer_create,
        };
 
        register_posix_clock(CLOCK_REALTIME, &clock_realtime);
index 81787248b60fda5bc58b6231be84a6a54a763cb0..e8ab096ddfe399dc3007e32b169b46d02ed9cb48 100644 (file)
@@ -118,13 +118,13 @@ static u64 __update_sched_clock(struct sched_clock_data *scd, u64 now)
 
        /*
         * scd->clock = clamp(scd->tick_gtod + delta,
-        *                    max(scd->tick_gtod, scd->clock),
-        *                    max(scd->clock, scd->tick_gtod + TICK_NSEC));
+        *                    max(scd->tick_gtod, scd->clock),
+        *                    scd->tick_gtod + TICK_NSEC);
         */
 
        clock = scd->tick_gtod + delta;
        min_clock = wrap_max(scd->tick_gtod, scd->clock);
-       max_clock = wrap_max(scd->clock, scd->tick_gtod + TICK_NSEC);
+       max_clock = scd->tick_gtod + TICK_NSEC;
 
        clock = wrap_max(clock, min_clock);
        clock = wrap_min(clock, max_clock);
index d83660fd6fdde53617121f3f72e38b58158126b9..8e30295e8566579515ca8126a694150e290107aa 100644 (file)
@@ -135,7 +135,7 @@ int unregister_dynamic_debug_module(char *mod_name)
        nr_entries--;
 out:
        up(&debug_list_mutex);
-       return 0;
+       return ret;
 }
 EXPORT_SYMBOL_GPL(unregister_dynamic_debug_module);
 
@@ -289,7 +289,7 @@ static ssize_t pr_debug_write(struct file *file, const char __user *buf,
                                        dynamic_enabled = DYNAMIC_ENABLED_SOME;
                                        err = 0;
                                        printk(KERN_DEBUG
-                                              "debugging enabled for module %s",
+                                              "debugging enabled for module %s\n",
                                               elem->name);
                                } else if (!value && (elem->enable == 1)) {
                                        elem->enable = 0;
@@ -309,7 +309,7 @@ static ssize_t pr_debug_write(struct file *file, const char __user *buf,
                                        err = 0;
                                        printk(KERN_DEBUG
                                               "debugging disabled for module "
-                                              "%s", elem->name);
+                                              "%s\n", elem->name);
                                }
                        }
                }
index d8f07667fc8045e6690ab74a6e58806c7093ed7c..037b0967c1e3b40cda18e57a775d61867bafb95f 100644 (file)
@@ -998,7 +998,7 @@ static void do_pages_stat_array(struct mm_struct *mm, unsigned long nr_pages,
                unsigned long addr = (unsigned long)(*pages);
                struct vm_area_struct *vma;
                struct page *page;
-               int err;
+               int err = -EFAULT;
 
                vma = find_vma(mm, addr);
                if (!vma)
index cb675d1267914dc263100b9c4a9ea5eb20fefa48..bf7e8fc3aed806542e44cc7b1d222d9e2b56dc3a 100644 (file)
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -535,7 +535,7 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size,
        struct kmem_cache *c;
 
        c = slob_alloc(sizeof(struct kmem_cache),
-               flags, ARCH_KMALLOC_MINALIGN, -1);
+               GFP_KERNEL, ARCH_KMALLOC_MINALIGN, -1);
 
        if (c) {
                c->name = name;
index ba537fae0a4ca653b4a7eedb7b941deb8aef613b..ce68e046d963840e4a3822972ed33f2a30a86244 100644 (file)
@@ -1786,8 +1786,6 @@ static inline void rfcomm_accept_connection(struct rfcomm_session *s)
        if (err < 0)
                return;
 
-       __module_get(nsock->ops->owner);
-
        /* Set our callbacks */
        nsock->sk->sk_data_ready   = rfcomm_l2data_ready;
        nsock->sk->sk_state_change = rfcomm_l2state_change;
index 6c7af390be0a515cfb1d09d2db79f16776e0dbe4..dadac6281f20392d0431d80a9001a6169ab94ca7 100644 (file)
@@ -133,9 +133,11 @@ static int poll_one_napi(struct netpoll_info *npinfo,
 
        npinfo->rx_flags |= NETPOLL_RX_DROP;
        atomic_inc(&trapped);
+       set_bit(NAPI_STATE_NPSVC, &napi->state);
 
        work = napi->poll(napi, budget);
 
+       clear_bit(NAPI_STATE_NPSVC, &napi->state);
        atomic_dec(&trapped);
        npinfo->rx_flags &= ~NETPOLL_RX_DROP;
 
index bea54a685109ed3b6fa1fe3f621fb7522ceb2de8..8d489e746b21cb513d0d1b49b3984b514f6e634c 100644 (file)
@@ -61,7 +61,7 @@ static struct
 static struct xt_table nat_table = {
        .name           = "nat",
        .valid_hooks    = NAT_VALID_HOOKS,
-       .lock           = __RW_LOCK_UNLOCKED(__nat_table.lock),
+       .lock           = __RW_LOCK_UNLOCKED(nat_table.lock),
        .me             = THIS_MODULE,
        .af             = AF_INET,
 };
index 7cd22262de3af3fa0f2917eefaea885c068855ac..a453aac91bd3b740ef44363ef10e5be5390bf6dc 100644 (file)
 
 #include "tcp_vegas.h"
 
-/* Default values of the Vegas variables, in fixed-point representation
- * with V_PARAM_SHIFT bits to the right of the binary point.
- */
-#define V_PARAM_SHIFT 1
-static int alpha = 2<<V_PARAM_SHIFT;
-static int beta  = 4<<V_PARAM_SHIFT;
-static int gamma = 1<<V_PARAM_SHIFT;
+static int alpha = 2;
+static int beta  = 4;
+static int gamma = 1;
 
 module_param(alpha, int, 0644);
-MODULE_PARM_DESC(alpha, "lower bound of packets in network (scale by 2)");
+MODULE_PARM_DESC(alpha, "lower bound of packets in network");
 module_param(beta, int, 0644);
-MODULE_PARM_DESC(beta, "upper bound of packets in network (scale by 2)");
+MODULE_PARM_DESC(beta, "upper bound of packets in network");
 module_param(gamma, int, 0644);
 MODULE_PARM_DESC(gamma, "limit on increase (scale by 2)");
 
@@ -172,49 +168,13 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 in_flight)
                return;
        }
 
-       /* The key players are v_beg_snd_una and v_beg_snd_nxt.
-        *
-        * These are so named because they represent the approximate values
-        * of snd_una and snd_nxt at the beginning of the current RTT. More
-        * precisely, they represent the amount of data sent during the RTT.
-        * At the end of the RTT, when we receive an ACK for v_beg_snd_nxt,
-        * we will calculate that (v_beg_snd_nxt - v_beg_snd_una) outstanding
-        * bytes of data have been ACKed during the course of the RTT, giving
-        * an "actual" rate of:
-        *
-        *     (v_beg_snd_nxt - v_beg_snd_una) / (rtt duration)
-        *
-        * Unfortunately, v_beg_snd_una is not exactly equal to snd_una,
-        * because delayed ACKs can cover more than one segment, so they
-        * don't line up nicely with the boundaries of RTTs.
-        *
-        * Another unfortunate fact of life is that delayed ACKs delay the
-        * advance of the left edge of our send window, so that the number
-        * of bytes we send in an RTT is often less than our cwnd will allow.
-        * So we keep track of our cwnd separately, in v_beg_snd_cwnd.
-        */
-
        if (after(ack, vegas->beg_snd_nxt)) {
                /* Do the Vegas once-per-RTT cwnd adjustment. */
-               u32 old_wnd, old_snd_cwnd;
-
-
-               /* Here old_wnd is essentially the window of data that was
-                * sent during the previous RTT, and has all
-                * been acknowledged in the course of the RTT that ended
-                * with the ACK we just received. Likewise, old_snd_cwnd
-                * is the cwnd during the previous RTT.
-                */
-               old_wnd = (vegas->beg_snd_nxt - vegas->beg_snd_una) /
-                       tp->mss_cache;
-               old_snd_cwnd = vegas->beg_snd_cwnd;
 
                /* Save the extent of the current window so we can use this
                 * at the end of the next RTT.
                 */
-               vegas->beg_snd_una  = vegas->beg_snd_nxt;
                vegas->beg_snd_nxt  = tp->snd_nxt;
-               vegas->beg_snd_cwnd = tp->snd_cwnd;
 
                /* We do the Vegas calculations only if we got enough RTT
                 * samples that we can be reasonably sure that we got
@@ -252,22 +212,14 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 in_flight)
                         *
                         * This is:
                         *     (actual rate in segments) * baseRTT
-                        * We keep it as a fixed point number with
-                        * V_PARAM_SHIFT bits to the right of the binary point.
                         */
-                       target_cwnd = ((u64)old_wnd * vegas->baseRTT);
-                       target_cwnd <<= V_PARAM_SHIFT;
-                       do_div(target_cwnd, rtt);
+                       target_cwnd = tp->snd_cwnd * vegas->baseRTT / rtt;
 
                        /* Calculate the difference between the window we had,
                         * and the window we would like to have. This quantity
                         * is the "Diff" from the Arizona Vegas papers.
-                        *
-                        * Again, this is a fixed point number with
-                        * V_PARAM_SHIFT bits to the right of the binary
-                        * point.
                         */
-                       diff = (old_wnd << V_PARAM_SHIFT) - target_cwnd;
+                       diff = tp->snd_cwnd * (rtt-vegas->baseRTT) / vegas->baseRTT;
 
                        if (diff > gamma && tp->snd_ssthresh > 2 ) {
                                /* Going too fast. Time to slow down
@@ -282,16 +234,13 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 in_flight)
                                 * truncation robs us of full link
                                 * utilization.
                                 */
-                               tp->snd_cwnd = min(tp->snd_cwnd,
-                                                  ((u32)target_cwnd >>
-                                                   V_PARAM_SHIFT)+1);
+                               tp->snd_cwnd = min(tp->snd_cwnd, (u32)target_cwnd+1);
 
                        } else if (tp->snd_cwnd <= tp->snd_ssthresh) {
                                /* Slow start.  */
                                tcp_slow_start(tp);
                        } else {
                                /* Congestion avoidance. */
-                               u32 next_snd_cwnd;
 
                                /* Figure out where we would like cwnd
                                 * to be.
@@ -300,26 +249,17 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 in_flight)
                                        /* The old window was too fast, so
                                         * we slow down.
                                         */
-                                       next_snd_cwnd = old_snd_cwnd - 1;
+                                       tp->snd_cwnd--;
                                } else if (diff < alpha) {
                                        /* We don't have enough extra packets
                                         * in the network, so speed up.
                                         */
-                                       next_snd_cwnd = old_snd_cwnd + 1;
+                                       tp->snd_cwnd++;
                                } else {
                                        /* Sending just as fast as we
                                         * should be.
                                         */
-                                       next_snd_cwnd = old_snd_cwnd;
                                }
-
-                               /* Adjust cwnd upward or downward, toward the
-                                * desired value.
-                                */
-                               if (next_snd_cwnd > tp->snd_cwnd)
-                                       tp->snd_cwnd++;
-                               else if (next_snd_cwnd < tp->snd_cwnd)
-                                       tp->snd_cwnd--;
                        }
 
                        if (tp->snd_cwnd < 2)
index 172438320eec74287b045cd6b784bb3de0b38b0f..d0f54d18e19b92de1407eb9a36fed5344363d01d 100644 (file)
@@ -912,8 +912,13 @@ static void ndisc_recv_na(struct sk_buff *skb)
                   is invalid, but ndisc specs say nothing
                   about it. It could be misconfiguration, or
                   an smart proxy agent tries to help us :-)
+
+                  We should not print the error if NA has been
+                  received from loopback - it is just our own
+                  unsolicited advertisement.
                 */
-               ND_PRINTK1(KERN_WARNING
+               if (skb->pkt_type != PACKET_LOOPBACK)
+                       ND_PRINTK1(KERN_WARNING
                           "ICMPv6 NA: someone advertises our address on %s!\n",
                           ifp->idev->dev->name);
                in6_ifa_put(ifp);
index 90c8506a0aac913afd2ad4d62d0d234039fc9315..8c03080321784fe7fee76ec1ea2ebd3d85187765 100644 (file)
@@ -562,7 +562,6 @@ static int netlbl_unlhsh_remove_addr4(struct net *net,
                                      const struct in_addr *mask,
                                      struct netlbl_audit *audit_info)
 {
-       int ret_val = 0;
        struct netlbl_af4list *list_entry;
        struct netlbl_unlhsh_addr4 *entry;
        struct audit_buffer *audit_buf;
@@ -577,7 +576,7 @@ static int netlbl_unlhsh_remove_addr4(struct net *net,
        if (list_entry != NULL)
                entry = netlbl_unlhsh_addr4_entry(list_entry);
        else
-               ret_val = -ENOENT;
+               entry = NULL;
 
        audit_buf = netlbl_audit_start_common(AUDIT_MAC_UNLBL_STCDEL,
                                              audit_info);
@@ -588,19 +587,21 @@ static int netlbl_unlhsh_remove_addr4(struct net *net,
                                          addr->s_addr, mask->s_addr);
                if (dev != NULL)
                        dev_put(dev);
-               if (entry && security_secid_to_secctx(entry->secid,
-                                                     &secctx,
-                                                     &secctx_len) == 0) {
+               if (entry != NULL &&
+                   security_secid_to_secctx(entry->secid,
+                                            &secctx, &secctx_len) == 0) {
                        audit_log_format(audit_buf, " sec_obj=%s", secctx);
                        security_release_secctx(secctx, secctx_len);
                }
-               audit_log_format(audit_buf, " res=%u", ret_val == 0 ? 1 : 0);
+               audit_log_format(audit_buf, " res=%u", entry != NULL ? 1 : 0);
                audit_log_end(audit_buf);
        }
 
-       if (ret_val == 0)
-               call_rcu(&entry->rcu, netlbl_unlhsh_free_addr4);
-       return ret_val;
+       if (entry == NULL)
+               return -ENOENT;
+
+       call_rcu(&entry->rcu, netlbl_unlhsh_free_addr4);
+       return 0;
 }
 
 #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
@@ -624,7 +625,6 @@ static int netlbl_unlhsh_remove_addr6(struct net *net,
                                      const struct in6_addr *mask,
                                      struct netlbl_audit *audit_info)
 {
-       int ret_val = 0;
        struct netlbl_af6list *list_entry;
        struct netlbl_unlhsh_addr6 *entry;
        struct audit_buffer *audit_buf;
@@ -638,7 +638,7 @@ static int netlbl_unlhsh_remove_addr6(struct net *net,
        if (list_entry != NULL)
                entry = netlbl_unlhsh_addr6_entry(list_entry);
        else
-               ret_val = -ENOENT;
+               entry = NULL;
 
        audit_buf = netlbl_audit_start_common(AUDIT_MAC_UNLBL_STCDEL,
                                              audit_info);
@@ -649,19 +649,21 @@ static int netlbl_unlhsh_remove_addr6(struct net *net,
                                          addr, mask);
                if (dev != NULL)
                        dev_put(dev);
-               if (entry && security_secid_to_secctx(entry->secid,
-                                                     &secctx,
-                                                     &secctx_len) == 0) {
+               if (entry != NULL &&
+                   security_secid_to_secctx(entry->secid,
+                                            &secctx, &secctx_len) == 0) {
                        audit_log_format(audit_buf, " sec_obj=%s", secctx);
                        security_release_secctx(secctx, secctx_len);
                }
-               audit_log_format(audit_buf, " res=%u", ret_val == 0 ? 1 : 0);
+               audit_log_format(audit_buf, " res=%u", entry != NULL ? 1 : 0);
                audit_log_end(audit_buf);
        }
 
-       if (ret_val == 0)
-               call_rcu(&entry->rcu, netlbl_unlhsh_free_addr6);
-       return ret_val;
+       if (entry == NULL)
+               return -ENOENT;
+
+       call_rcu(&entry->rcu, netlbl_unlhsh_free_addr6);
+       return 0;
 }
 #endif /* IPv6 */
 
index 9978afbd9f2ad5033375df896358f88b929ecfcc..803eeef0aa856877ddced0e45fc283f4641da2ab 100644 (file)
@@ -155,12 +155,13 @@ static void gprs_data_ready(struct sock *sk, int len)
 static void gprs_write_space(struct sock *sk)
 {
        struct gprs_dev *dev = sk->sk_user_data;
+       struct net_device *net = dev->net;
        unsigned credits = pep_writeable(sk);
 
        spin_lock_bh(&dev->tx_lock);
        dev->tx_max = credits;
-       if (credits > skb_queue_len(&dev->tx_queue))
-               netif_wake_queue(dev->net);
+       if (credits > skb_queue_len(&dev->tx_queue) && netif_running(net))
+               netif_wake_queue(net);
        spin_unlock_bh(&dev->tx_lock);
 }
 
@@ -168,6 +169,23 @@ static void gprs_write_space(struct sock *sk)
  * Network device callbacks
  */
 
+static int gprs_open(struct net_device *dev)
+{
+       struct gprs_dev *gp = netdev_priv(dev);
+
+       gprs_write_space(gp->sk);
+       return 0;
+}
+
+static int gprs_close(struct net_device *dev)
+{
+       struct gprs_dev *gp = netdev_priv(dev);
+
+       netif_stop_queue(dev);
+       flush_work(&gp->tx_work);
+       return 0;
+}
+
 static int gprs_xmit(struct sk_buff *skb, struct net_device *net)
 {
        struct gprs_dev *dev = netdev_priv(net);
@@ -254,6 +272,8 @@ static void gprs_setup(struct net_device *net)
        net->tx_queue_len       = 10;
 
        net->destructor         = free_netdev;
+       net->open               = gprs_open;
+       net->stop               = gprs_close;
        net->hard_start_xmit    = gprs_xmit; /* mandatory */
        net->change_mtu         = gprs_set_mtu;
        net->get_stats          = gprs_get_stats;
@@ -318,7 +338,6 @@ int gprs_attach(struct sock *sk)
        dev->sk = sk;
 
        printk(KERN_DEBUG"%s: attached\n", net->name);
-       gprs_write_space(sk); /* kick off TX */
        return net->ifindex;
 
 out_rel:
@@ -341,7 +360,5 @@ void gprs_detach(struct sock *sk)
 
        printk(KERN_DEBUG"%s: detached\n", net->name);
        unregister_netdev(net);
-       flush_scheduled_work();
        sock_put(sk);
-       skb_queue_purge(&dev->tx_queue);
 }
index a11959908d9a68c405114d56c5073c0d77647402..98402f0efa47727677b8d57acfe2ecd7cb9441b2 100644 (file)
@@ -46,9 +46,6 @@
         layering other disciplines.  It does not need to do bandwidth
         control either since that can be handled by using token
         bucket or other rate control.
-
-        The simulator is limited by the Linux timer resolution
-        and will create packet bursts on the HZ boundary (1ms).
 */
 
 struct netem_sched_data {
index 92764d836891833e1cb7f8255a38edacad1f3b7f..76ba80aeac1a86217ae77edc0e239084840f90d6 100644 (file)
@@ -2307,6 +2307,7 @@ int kernel_accept(struct socket *sock, struct socket **newsock, int flags)
        }
 
        (*newsock)->ops = sock->ops;
+       __module_get((*newsock)->ops->owner);
 
 done:
        return err;
index 5dd3e89f620a2753511097d1fe86b4e6673afefa..b77f330d2650b7c13d23d1d0f84d9344d973940a 100644 (file)
@@ -69,6 +69,7 @@ enum {
 };
 
 enum {
+       STAC_92HD73XX_NO_JD, /* no jack-detection */
        STAC_92HD73XX_REF,
        STAC_DELL_M6_AMIC,
        STAC_DELL_M6_DMIC,
@@ -127,6 +128,7 @@ enum {
 };
 
 enum {
+       STAC_D965_REF_NO_JD, /* no jack-detection */
        STAC_D965_REF,
        STAC_D965_3ST,
        STAC_D965_5ST,
@@ -857,6 +859,7 @@ static struct hda_verb stac92hd83xxx_core_init[] = {
 
        /* power state controls amps */
        { 0x01, AC_VERB_SET_EAPD, 1 << 2},
+       {}
 };
 
 static struct hda_verb stac92hd71bxx_core_init[] = {
@@ -868,6 +871,7 @@ static struct hda_verb stac92hd71bxx_core_init[] = {
        { 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
        { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
        { 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
+       {}
 };
 
 #define HD_DISABLE_PORTF 2
@@ -1611,6 +1615,7 @@ static unsigned int *stac92hd73xx_brd_tbl[STAC_92HD73XX_MODELS] = {
 };
 
 static const char *stac92hd73xx_models[STAC_92HD73XX_MODELS] = {
+       [STAC_92HD73XX_NO_JD] = "no-jd",
        [STAC_92HD73XX_REF] = "ref",
        [STAC_DELL_M6_AMIC] = "dell-m6-amic",
        [STAC_DELL_M6_DMIC] = "dell-m6-dmic",
@@ -1640,6 +1645,8 @@ static struct snd_pci_quirk stac92hd73xx_cfg_tbl[] = {
                                "unknown Dell", STAC_DELL_M6_DMIC),
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x029f,
                                "Dell Studio 1537", STAC_DELL_M6_DMIC),
+       SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02a0,
+                               "Dell Studio 17", STAC_DELL_M6_DMIC),
        {} /* terminator */
 };
 
@@ -1662,6 +1669,7 @@ static struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = {
        /* SigmaTel reference board */
        SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
                      "DFI LanParty", STAC_92HD71BXX_REF),
+       {} /* terminator */
 };
 
 static unsigned int ref92hd71bxx_pin_configs[11] = {
@@ -2027,6 +2035,7 @@ static unsigned int dell_3st_pin_configs[14] = {
 };
 
 static unsigned int *stac927x_brd_tbl[STAC_927X_MODELS] = {
+       [STAC_D965_REF_NO_JD] = ref927x_pin_configs,
        [STAC_D965_REF]  = ref927x_pin_configs,
        [STAC_D965_3ST]  = d965_3st_pin_configs,
        [STAC_D965_5ST]  = d965_5st_pin_configs,
@@ -2035,6 +2044,7 @@ static unsigned int *stac927x_brd_tbl[STAC_927X_MODELS] = {
 };
 
 static const char *stac927x_models[STAC_927X_MODELS] = {
+       [STAC_D965_REF_NO_JD]   = "ref-no-jd",
        [STAC_D965_REF]         = "ref",
        [STAC_D965_3ST]         = "3stack",
        [STAC_D965_5ST]         = "5stack",
@@ -2896,7 +2906,7 @@ static int stac92xx_auto_create_multi_out_ctls(struct hda_codec *codec,
        }
 
        if ((spec->multiout.num_dacs - cfg->line_outs) > 0 &&
-                       cfg->hp_outs && !spec->multiout.hp_nid)
+           cfg->hp_outs == 1 && !spec->multiout.hp_nid)
                spec->multiout.hp_nid = nid;
 
        if (cfg->hp_outs > 1 && cfg->line_out_type == AUTO_PIN_LINE_OUT) {
@@ -4254,14 +4264,17 @@ again:
 
        switch (spec->multiout.num_dacs) {
        case 0x3: /* 6 Channel */
+               spec->multiout.hp_nid = 0x17;
                spec->mixer = stac92hd73xx_6ch_mixer;
                spec->init = stac92hd73xx_6ch_core_init;
                break;
        case 0x4: /* 8 Channel */
+               spec->multiout.hp_nid = 0x18;
                spec->mixer = stac92hd73xx_8ch_mixer;
                spec->init = stac92hd73xx_8ch_core_init;
                break;
        case 0x5: /* 10 Channel */
+               spec->multiout.hp_nid = 0x19;
                spec->mixer = stac92hd73xx_10ch_mixer;
                spec->init = stac92hd73xx_10ch_core_init;
        };
@@ -4297,6 +4310,7 @@ again:
                spec->amp_nids = &stac92hd73xx_amp_nids[DELL_M6_AMP];
                spec->eapd_switch = 0;
                spec->num_amps = 1;
+               spec->multiout.hp_nid = 0; /* dual HPs */
 
                if (!spec->init)
                        spec->init = dell_m6_core_init;
@@ -4351,6 +4365,9 @@ again:
                return err;
        }
 
+       if (spec->board_config == STAC_92HD73XX_NO_JD)
+               spec->hp_detect = 0;
+
        codec->patch_ops = stac92xx_patch_ops;
 
        return 0;
@@ -4899,6 +4916,10 @@ static int patch_stac927x(struct hda_codec *codec)
         */
        codec->bus->needs_damn_long_delay = 1;
 
+       /* no jack detecion for ref-no-jd model */
+       if (spec->board_config == STAC_D965_REF_NO_JD)
+               spec->hp_detect = 0;
+
        return 0;
 }
 
index e9084fdd2082efcbc14695e801ec6ad89ff66599..acd68efb2b758dc59692036d4bd6f445854dc985 100644 (file)
@@ -233,7 +233,7 @@ static int omap_pcm_open(struct snd_pcm_substream *substream)
        if (ret < 0)
                goto out;
 
-       prtd = kzalloc(sizeof(prtd), GFP_KERNEL);
+       prtd = kzalloc(sizeof(*prtd), GFP_KERNEL);
        if (prtd == NULL) {
                ret = -ENOMEM;
                goto out;