From 62c0d645ca9f2306ed36b14365159de979d224f8 Mon Sep 17 00:00:00 2001 From: Mark Lord Date: Tue, 9 Dec 2008 10:46:30 -0500 Subject: [PATCH] --- yaml --- r: 128065 b: refs/heads/master c: 48452e5f99ab35d643df0463b6ad11aea8ea7bdc h: refs/heads/master i: 128063: 0fd9a69f6f0889b0ed2141e26c3a5acb211b5e04 v: v3 --- [refs] | 2 +- trunk/Documentation/arm/mem_alignment | 2 +- trunk/Documentation/kernel-parameters.txt | 11 +- .../sound/alsa/ALSA-Configuration.txt | 2 - trunk/Documentation/usb/gadget_serial.txt | 4 +- trunk/Documentation/usb/proc_usb_info.txt | 6 +- trunk/Documentation/usb/usbmon.txt | 12 +- trunk/MAINTAINERS | 14 +- trunk/Makefile | 2 +- trunk/arch/arm/common/sa1111.c | 2 +- trunk/arch/arm/kernel/armksyms.c | 4 +- trunk/arch/arm/kernel/traps.c | 1 - trunk/arch/arm/mach-pxa/include/mach/reset.h | 5 +- trunk/arch/arm/mm/fault.c | 1 - trunk/arch/avr32/boards/favr-32/flash.c | 2 +- trunk/arch/avr32/boards/favr-32/setup.c | 8 +- trunk/arch/avr32/boot/images/Makefile | 2 +- trunk/arch/avr32/configs/atstk1006_defconfig | 134 +-- trunk/arch/avr32/mach-at32ap/at32ap700x.c | 8 +- trunk/arch/ia64/configs/generic_defconfig | 218 ++-- trunk/arch/ia64/hp/sim/Kconfig | 1 - trunk/arch/ia64/include/asm/acpi-ext.h | 1 + trunk/arch/ia64/include/asm/paravirt_privop.h | 1 + trunk/arch/ia64/include/asm/sn/acpi.h | 2 + trunk/arch/ia64/kernel/topology.c | 4 +- trunk/arch/ia64/sn/kernel/io_acpi_init.c | 103 +- trunk/arch/ia64/sn/kernel/io_common.c | 5 +- trunk/arch/ia64/sn/kernel/irq.c | 9 +- trunk/arch/ia64/sn/kernel/setup.c | 9 +- trunk/arch/mips/Kconfig.debug | 2 +- trunk/arch/mips/configs/ip32_defconfig | 1060 +++++++---------- trunk/arch/mips/include/asm/asmmacro.h | 10 - trunk/arch/mips/include/asm/byteorder.h | 5 +- trunk/arch/mips/include/asm/elf.h | 2 +- trunk/arch/mips/include/asm/pci.h | 5 - trunk/arch/mips/mm/dma-default.c | 3 - trunk/arch/mips/pci/pci.c | 24 - trunk/arch/mn10300/kernel/entry.S | 3 +- trunk/arch/mn10300/kernel/mn10300-serial.c | 5 - trunk/arch/mn10300/kernel/setup.c | 2 +- trunk/arch/mn10300/kernel/vmlinux.lds.S | 22 +- trunk/arch/parisc/include/asm/tlbflush.h | 5 +- trunk/arch/powerpc/boot/Makefile | 1 - trunk/arch/powerpc/kernel/misc_32.S | 5 +- trunk/arch/powerpc/lib/rheap.c | 1 - trunk/arch/powerpc/mm/hugetlbpage.c | 3 - trunk/arch/powerpc/mm/numa.c | 16 +- trunk/arch/powerpc/platforms/cell/axon_msi.c | 3 - trunk/arch/sh/Kconfig | 2 - trunk/arch/sparc/include/asm/ptrace_32.h | 10 - trunk/arch/sparc/include/asm/ptrace_64.h | 9 - trunk/arch/um/drivers/mconsole_kern.c | 4 +- trunk/arch/x86/Kconfig.cpu | 1 - trunk/arch/x86/include/asm/vmi.h | 8 +- trunk/arch/x86/kernel/amd_iommu.c | 5 +- trunk/arch/x86/kernel/amd_iommu_init.c | 7 +- trunk/arch/x86/kernel/cpu/mcheck/mce_64.c | 3 + trunk/arch/x86/kernel/microcode_core.c | 19 +- trunk/arch/x86/kernel/microcode_intel.c | 6 - trunk/arch/x86/kernel/pci-gart_64.c | 4 +- trunk/arch/x86/kernel/setup.c | 12 +- trunk/arch/x86/kernel/smpboot.c | 2 + trunk/arch/x86/kernel/vmi_32.c | 16 +- trunk/crypto/Kconfig | 36 +- trunk/crypto/Makefile | 18 +- trunk/crypto/async_tx/async_xor.c | 11 +- trunk/drivers/acpi/Makefile | 22 +- trunk/drivers/acpi/acpica/Makefile | 44 - trunk/drivers/acpi/acpica/accommon.h | 63 - trunk/drivers/acpi/acpica/hwregs.c | 353 ------ trunk/drivers/acpi/bus.c | 8 + trunk/drivers/acpi/cm_sbs.c | 3 + trunk/drivers/acpi/debug.c | 1 + trunk/drivers/acpi/dispatcher/Makefile | 9 + .../acpi/{acpica => dispatcher}/dsfield.c | 11 +- .../acpi/{acpica => dispatcher}/dsinit.c | 7 +- .../acpi/{acpica => dispatcher}/dsmethod.c | 14 +- .../acpi/{acpica => dispatcher}/dsmthdat.c | 7 +- .../acpi/{acpica => dispatcher}/dsobject.c | 11 +- .../acpi/{acpica => dispatcher}/dsopcode.c | 66 +- .../acpi/{acpica => dispatcher}/dsutils.c | 13 +- .../acpi/{acpica => dispatcher}/dswexec.c | 13 +- .../acpi/{acpica => dispatcher}/dswload.c | 13 +- .../acpi/{acpica => dispatcher}/dswscope.c | 3 +- .../acpi/{acpica => dispatcher}/dswstate.c | 7 +- trunk/drivers/acpi/ec.c | 10 +- trunk/drivers/acpi/events/Makefile | 9 + .../drivers/acpi/{acpica => events}/evevent.c | 17 +- trunk/drivers/acpi/{acpica => events}/evgpe.c | 53 +- .../acpi/{acpica => events}/evgpeblk.c | 82 +- .../drivers/acpi/{acpica => events}/evmisc.c | 62 +- .../acpi/{acpica => events}/evregion.c | 140 +-- .../acpi/{acpica => events}/evrgnini.c | 46 +- trunk/drivers/acpi/{acpica => events}/evsci.c | 13 +- .../drivers/acpi/{acpica => events}/evxface.c | 9 +- .../acpi/{acpica => events}/evxfevnt.c | 170 +-- .../acpi/{acpica => events}/evxfregn.c | 5 +- trunk/drivers/acpi/executer/Makefile | 10 + .../acpi/{acpica => executer}/exconfig.c | 9 +- .../acpi/{acpica => executer}/exconvrt.c | 5 +- .../acpi/{acpica => executer}/excreate.c | 7 +- .../acpi/{acpica => executer}/exdump.c | 7 +- .../acpi/{acpica => executer}/exfield.c | 5 +- .../acpi/{acpica => executer}/exfldio.c | 20 +- .../acpi/{acpica => executer}/exmisc.c | 7 +- .../acpi/{acpica => executer}/exmutex.c | 5 +- .../acpi/{acpica => executer}/exnames.c | 5 +- .../acpi/{acpica => executer}/exoparg1.c | 11 +- .../acpi/{acpica => executer}/exoparg2.c | 9 +- .../acpi/{acpica => executer}/exoparg3.c | 7 +- .../acpi/{acpica => executer}/exoparg6.c | 7 +- .../acpi/{acpica => executer}/exprep.c | 7 +- .../acpi/{acpica => executer}/exregion.c | 3 +- .../acpi/{acpica => executer}/exresnte.c | 7 +- .../acpi/{acpica => executer}/exresolv.c | 9 +- .../acpi/{acpica => executer}/exresop.c | 9 +- .../acpi/{acpica => executer}/exstore.c | 9 +- .../acpi/{acpica => executer}/exstoren.c | 5 +- .../acpi/{acpica => executer}/exstorob.c | 3 +- .../acpi/{acpica => executer}/exsystem.c | 3 +- .../acpi/{acpica => executer}/exutils.c | 5 +- trunk/drivers/acpi/hardware/Makefile | 9 + .../acpi/{acpica => hardware}/hwacpi.c | 1 - .../drivers/acpi/{acpica => hardware}/hwgpe.c | 78 +- .../{acpica/hwxface.c => hardware/hwregs.c} | 748 ++++++++---- .../acpi/{acpica => hardware}/hwsleep.c | 76 +- .../acpi/{acpica => hardware}/hwtimer.c | 1 - trunk/drivers/acpi/namespace/Makefile | 12 + .../acpi/{acpica => namespace}/nsaccess.c | 18 +- .../acpi/{acpica => namespace}/nsalloc.c | 3 +- .../acpi/{acpica => namespace}/nsdump.c | 3 +- .../acpi/{acpica => namespace}/nsdumpdv.c | 3 +- .../acpi/{acpica => namespace}/nseval.c | 77 +- .../acpi/{acpica => namespace}/nsinit.c | 7 +- .../acpi/{acpica => namespace}/nsload.c | 7 +- .../acpi/{acpica => namespace}/nsnames.c | 5 +- .../acpi/{acpica => namespace}/nsobject.c | 3 +- .../acpi/{acpica => namespace}/nsparse.c | 9 +- .../acpi/{acpica => namespace}/nspredef.c | 261 +--- .../acpi/{acpica => namespace}/nssearch.c | 3 +- .../acpi/{acpica => namespace}/nsutils.c | 15 +- .../acpi/{acpica => namespace}/nswalk.c | 3 +- .../acpi/{acpica => namespace}/nsxfeval.c | 5 +- .../acpi/{acpica => namespace}/nsxfname.c | 3 +- .../acpi/{acpica => namespace}/nsxfobj.c | 3 +- trunk/drivers/acpi/numa.c | 1 + trunk/drivers/acpi/osl.c | 4 +- trunk/drivers/acpi/parser/Makefile | 8 + .../drivers/acpi/{acpica => parser}/psargs.c | 9 +- .../drivers/acpi/{acpica => parser}/psloop.c | 7 +- .../acpi/{acpica => parser}/psopcode.c | 7 +- .../drivers/acpi/{acpica => parser}/psparse.c | 23 +- .../drivers/acpi/{acpica => parser}/psscope.c | 3 +- .../drivers/acpi/{acpica => parser}/pstree.c | 5 +- .../drivers/acpi/{acpica => parser}/psutils.c | 5 +- .../drivers/acpi/{acpica => parser}/pswalk.c | 3 +- .../drivers/acpi/{acpica => parser}/psxface.c | 40 +- trunk/drivers/acpi/power.c | 6 +- trunk/drivers/acpi/reboot.c | 2 +- trunk/drivers/acpi/resources/Makefile | 10 + .../acpi/{acpica => resources}/rsaddr.c | 3 +- .../acpi/{acpica => resources}/rscalc.c | 5 +- .../acpi/{acpica => resources}/rscreate.c | 5 +- .../acpi/{acpica => resources}/rsdump.c | 3 +- .../acpi/{acpica => resources}/rsinfo.c | 3 +- .../drivers/acpi/{acpica => resources}/rsio.c | 3 +- .../acpi/{acpica => resources}/rsirq.c | 3 +- .../acpi/{acpica => resources}/rslist.c | 3 +- .../acpi/{acpica => resources}/rsmemory.c | 3 +- .../acpi/{acpica => resources}/rsmisc.c | 3 +- .../acpi/{acpica => resources}/rsutils.c | 5 +- .../acpi/{acpica => resources}/rsxface.c | 5 +- trunk/drivers/acpi/sbshc.c | 1 + trunk/drivers/acpi/scan.c | 1 + trunk/drivers/acpi/sleep/Makefile | 5 + trunk/drivers/acpi/{ => sleep}/main.c | 12 +- trunk/drivers/acpi/{ => sleep}/proc.c | 65 +- trunk/drivers/acpi/{ => sleep}/sleep.h | 0 trunk/drivers/acpi/{ => sleep}/wakeup.c | 6 + trunk/drivers/acpi/system.c | 63 +- trunk/drivers/acpi/tables/Makefile | 7 + .../drivers/acpi/{acpica => tables}/tbfadt.c | 252 +--- .../drivers/acpi/{acpica => tables}/tbfind.c | 3 +- .../acpi/{acpica => tables}/tbinstal.c | 5 +- .../drivers/acpi/{acpica => tables}/tbutils.c | 27 +- .../drivers/acpi/{acpica => tables}/tbxface.c | 5 +- .../acpi/{acpica => tables}/tbxfroot.c | 3 +- trunk/drivers/acpi/toshiba_acpi.c | 54 +- trunk/drivers/acpi/utilities/Makefile | 9 + .../acpi/{acpica => utilities}/utalloc.c | 3 +- trunk/drivers/acpi/utilities/utcache.c | 314 +++++ .../acpi/{acpica => utilities}/utcopy.c | 3 +- .../acpi/{acpica => utilities}/utdebug.c | 95 +- .../acpi/{acpica => utilities}/utdelete.c | 7 +- .../acpi/{acpica => utilities}/uteval.c | 11 +- .../acpi/{acpica => utilities}/utglobal.c | 14 +- .../acpi/{acpica => utilities}/utinit.c | 7 +- .../acpi/{acpica => utilities}/utmath.c | 1 - .../acpi/{acpica => utilities}/utmisc.c | 23 +- .../acpi/{acpica => utilities}/utmutex.c | 1 - .../acpi/{acpica => utilities}/utobject.c | 3 +- .../acpi/{acpica => utilities}/utresrc.c | 3 +- .../acpi/{acpica => utilities}/utstate.c | 1 - .../acpi/{acpica => utilities}/utxface.c | 18 +- trunk/drivers/ata/libata-acpi.c | 6 + trunk/drivers/ata/libata-core.c | 65 +- trunk/drivers/ata/pata_acpi.c | 6 + trunk/drivers/ata/pata_hpt366.c | 12 +- trunk/drivers/block/cciss.c | 5 - trunk/drivers/block/pktcdvd.c | 2 +- trunk/drivers/cdrom/cdrom.c | 16 +- trunk/drivers/char/cp437.uni | 12 +- trunk/drivers/char/tpm/tpm_bios.c | 2 + trunk/drivers/char/vt.c | 2 +- .../drivers/char/xilinx_hwicap/buffer_icap.c | 3 + .../drivers/char/xilinx_hwicap/buffer_icap.h | 3 + trunk/drivers/char/xilinx_hwicap/fifo_icap.c | 3 + trunk/drivers/char/xilinx_hwicap/fifo_icap.h | 3 + .../char/xilinx_hwicap/xilinx_hwicap.c | 3 + .../char/xilinx_hwicap/xilinx_hwicap.h | 3 + trunk/drivers/dma/dmaengine.c | 3 - trunk/drivers/dma/ioat_dma.c | 5 +- trunk/drivers/dma/iop-adma.c | 16 +- trunk/drivers/dma/mv_xor.c | 15 +- trunk/drivers/edac/edac_device.c | 12 +- trunk/drivers/firewire/fw-ohci.c | 11 +- trunk/drivers/firewire/fw-transaction.c | 3 - trunk/drivers/firewire/fw-transaction.h | 2 - trunk/drivers/gpu/drm/i915/i915_dma.c | 10 +- trunk/drivers/gpu/drm/i915/i915_drv.h | 2 - trunk/drivers/gpu/drm/i915/i915_gem.c | 9 +- trunk/drivers/gpu/drm/radeon/radeon_irq.c | 4 +- trunk/drivers/i2c/busses/i2c-cpm.c | 1 - trunk/drivers/i2c/busses/i2c-highlander.c | 4 +- trunk/drivers/i2c/busses/i2c-pmcmsp.c | 2 +- trunk/drivers/i2c/busses/i2c-s3c2410.c | 18 +- trunk/drivers/ide/cs5530.c | 3 +- trunk/drivers/ide/ide-acpi.c | 6 + trunk/drivers/ide/sc1200.c | 3 +- trunk/drivers/ide/sgiioc4.c | 6 +- trunk/drivers/ieee1394/nodemgr.c | 8 - trunk/drivers/md/bitmap.c | 22 +- trunk/drivers/media/dvb/b2c2/Kconfig | 2 +- .../drivers/media/dvb/b2c2/flexcop-fe-tuner.c | 2 - trunk/drivers/media/dvb/b2c2/flexcop-i2c.c | 6 +- trunk/drivers/media/dvb/bt8xx/Kconfig | 2 +- trunk/drivers/media/dvb/dvb-usb/Kconfig | 46 +- .../media/dvb/dvb-usb/dib0700_devices.c | 6 +- trunk/drivers/media/dvb/ttpci/Kconfig | 2 +- trunk/drivers/media/video/compat_ioctl32.c | 2 +- trunk/drivers/media/video/cx18/Kconfig | 2 +- trunk/drivers/media/video/cx23885/Kconfig | 4 +- trunk/drivers/media/video/cx88/Kconfig | 2 +- .../drivers/media/video/em28xx/em28xx-video.c | 3 +- trunk/drivers/media/video/gspca/gspca.c | 4 +- trunk/drivers/media/video/pvrusb2/Kconfig | 2 +- trunk/drivers/media/video/saa7134/Kconfig | 4 +- trunk/drivers/message/fusion/mptscsih.c | 3 - trunk/drivers/misc/panasonic-laptop.c | 22 + trunk/drivers/misc/sgi-gru/grufault.c | 4 - trunk/drivers/misc/sony-laptop.c | 15 +- trunk/drivers/misc/tc1100-wmi.c | 1 + trunk/drivers/misc/thinkpad_acpi.c | 1 + trunk/drivers/net/bnx2.c | 6 +- trunk/drivers/net/e1000e/ich8lan.c | 9 +- trunk/drivers/net/enc28j60.c | 2 +- trunk/drivers/net/jme.h | 2 +- trunk/drivers/net/phy/mdio_bus.c | 5 +- trunk/drivers/net/ppp_generic.c | 28 +- trunk/drivers/net/starfire.c | 5 - trunk/drivers/net/sungem.c | 144 +-- trunk/drivers/net/tlan.c | 23 +- trunk/drivers/pci/hotplug/acpi_pcihp.c | 1 + trunk/drivers/pci/hotplug/acpiphp.h | 2 +- trunk/drivers/pci/hotplug/acpiphp_core.c | 2 +- trunk/drivers/pci/hotplug/acpiphp_glue.c | 4 +- trunk/drivers/pci/hotplug/ibmphp_core.c | 5 + trunk/drivers/pci/hotplug/pciehp.h | 1 + trunk/drivers/pci/hotplug/pciehp_core.c | 23 +- trunk/drivers/pci/pci-acpi.c | 2 + trunk/drivers/pci/pcie/aer/aerdrv_core.c | 2 +- trunk/drivers/pci/pcie/aspm.c | 29 +- trunk/drivers/pci/slot.c | 1 - trunk/drivers/pcmcia/bfin_cf_pcmcia.c | 2 +- trunk/drivers/pnp/pnpacpi/core.c | 1 + trunk/drivers/rtc/rtc-ds1672.c | 6 - trunk/drivers/rtc/rtc-isl1208.c | 7 - trunk/drivers/rtc/rtc-max6900.c | 6 - trunk/drivers/rtc/rtc-twl4030.c | 2 +- trunk/drivers/scsi/aacraid/linit.c | 4 +- .../scsi/device_handler/scsi_dh_hp_sw.c | 12 +- trunk/drivers/scsi/ibmvscsi/ibmvstgt.c | 16 +- trunk/drivers/scsi/libiscsi.c | 11 +- trunk/drivers/scsi/scsi_lib.c | 2 +- trunk/drivers/serial/ioc3_serial.c | 6 +- trunk/drivers/serial/s3c2440.c | 2 +- trunk/drivers/sh/maple/maple.c | 2 +- trunk/drivers/staging/Kconfig | 3 - trunk/drivers/usb/class/usbtmc.c | 1 - trunk/drivers/usb/core/driver.c | 4 +- trunk/drivers/usb/gadget/f_rndis.c | 4 - trunk/drivers/usb/serial/ftdi_sio.c | 2 - trunk/drivers/usb/serial/ftdi_sio.h | 6 - trunk/drivers/usb/serial/pl2303.c | 2 - trunk/drivers/usb/serial/pl2303.h | 8 - trunk/drivers/usb/serial/ti_usb_3410_5052.c | 55 +- trunk/drivers/usb/storage/unusual_devs.h | 16 +- trunk/drivers/video/aty/radeon_accel.c | 295 +++-- trunk/drivers/video/aty/radeon_backlight.c | 2 +- trunk/drivers/video/aty/radeon_base.c | 46 +- trunk/drivers/video/aty/radeon_pm.c | 6 +- trunk/drivers/video/aty/radeonfb.h | 40 +- trunk/drivers/video/console/fbcon.c | 6 - trunk/drivers/video/mb862xx/mb862xxfb.c | 4 +- trunk/drivers/w1/w1_io.c | 4 +- trunk/fs/9p/fid.c | 4 +- trunk/fs/9p/v9fs.c | 2 +- trunk/fs/9p/vfs_dentry.c | 9 +- trunk/fs/9p/vfs_inode.c | 6 +- trunk/fs/cifs/cifssmb.c | 3 +- trunk/fs/exec.c | 10 +- trunk/fs/ext4/balloc.c | 4 +- trunk/fs/inotify.c | 2 - trunk/fs/ocfs2/ocfs2_fs.h | 8 +- trunk/fs/ocfs2/xattr.c | 4 +- trunk/fs/proc/base.c | 2 +- trunk/fs/proc/task_mmu.c | 4 +- .../acpi/acpica => include/acpi}/acconfig.h | 8 +- .../acpi/acpica => include/acpi}/acdebug.h | 0 trunk/include/acpi/acdisasm.h | 445 +++++++ .../acpi/acpica => include/acpi}/acdispat.h | 0 .../acpi/acpica => include/acpi}/acevents.h | 6 +- trunk/include/acpi/acexcep.h | 6 +- .../acpi/acpica => include/acpi}/acglobal.h | 9 +- .../acpi/acpica => include/acpi}/achware.h | 22 +- .../acpi/acpica => include/acpi}/acinterp.h | 0 .../acpi/acpica => include/acpi}/aclocal.h | 86 +- .../acpi/acpica => include/acpi}/acmacros.h | 122 +- .../acpi/acpica => include/acpi}/acnamesp.h | 5 +- .../acpi/acpica => include/acpi}/acobject.h | 0 .../acpi/acpica => include/acpi}/acopcode.h | 0 trunk/include/acpi/acoutput.h | 105 +- .../acpi/acpica => include/acpi}/acparser.h | 0 trunk/include/acpi/acpi.h | 31 +- trunk/include/acpi/acpiosxf.h | 13 +- trunk/include/acpi/acpixf.h | 99 +- .../acpi/acpica => include/acpi}/acpredef.h | 0 .../acpi/acpica => include/acpi}/acresrc.h | 0 trunk/include/acpi/acrestyp.h | 405 ------- .../acpi/acpica => include/acpi}/acstruct.h | 0 .../acpi/acpica => include/acpi}/actables.h | 2 - trunk/include/acpi/actbl.h | 25 - trunk/include/acpi/actbl1.h | 2 +- trunk/include/acpi/actypes.h | 557 ++++++--- .../acpi/acpica => include/acpi}/acutils.h | 36 + .../acpi/acpica => include/acpi}/amlcode.h | 0 .../acpi/acpica => include/acpi}/amlresrc.h | 0 trunk/include/acpi/platform/acenv.h | 45 +- trunk/include/acpi/platform/aclinux.h | 7 +- trunk/include/asm-generic/atomic.h | 2 +- trunk/include/asm-mn10300/uaccess.h | 2 +- trunk/include/linux/ftrace.h | 3 +- trunk/include/linux/netdevice.h | 7 - .../linux/netfilter/nfnetlink_conntrack.h | 1 - trunk/include/linux/pci_hotplug.h | 1 + trunk/include/linux/smp.h | 2 - trunk/include/linux/usb/ch9.h | 8 +- trunk/include/net/irda/irda_device.h | 4 +- trunk/include/video/radeon.h | 18 +- trunk/kernel/cgroup.c | 10 +- trunk/kernel/fork.c | 15 +- trunk/kernel/latencytop.c | 2 +- trunk/kernel/posix-timers.c | 6 - trunk/kernel/relay.c | 7 +- trunk/kernel/sched.c | 2 - trunk/kernel/sched_clock.c | 6 +- trunk/lib/dynamic_printk.c | 6 +- trunk/lib/idr.c | 8 +- trunk/lib/percpu_counter.c | 7 +- trunk/mm/backing-dev.c | 2 +- trunk/mm/migrate.c | 59 +- trunk/mm/page_cgroup.c | 3 - trunk/mm/slob.c | 2 +- trunk/mm/slub.c | 2 +- trunk/mm/swap.c | 13 + trunk/mm/vmalloc.c | 2 +- trunk/net/bluetooth/rfcomm/core.c | 2 + trunk/net/core/netpoll.c | 2 - trunk/net/ipv4/netfilter/nf_nat_rule.c | 2 +- trunk/net/ipv4/tcp_vegas.c | 80 +- trunk/net/ipv6/ndisc.c | 7 +- trunk/net/netlabel/netlabel_unlabeled.c | 38 +- trunk/net/phonet/pep-gprs.c | 27 +- trunk/net/sched/sch_netem.c | 3 + trunk/net/socket.c | 1 - trunk/sound/pci/hda/patch_sigmatel.c | 23 +- trunk/sound/soc/omap/omap-pcm.c | 2 +- 397 files changed, 4525 insertions(+), 5216 deletions(-) delete mode 100644 trunk/drivers/acpi/acpica/Makefile delete mode 100644 trunk/drivers/acpi/acpica/accommon.h delete mode 100644 trunk/drivers/acpi/acpica/hwregs.c create mode 100644 trunk/drivers/acpi/dispatcher/Makefile rename trunk/drivers/acpi/{acpica => dispatcher}/dsfield.c (99%) rename trunk/drivers/acpi/{acpica => dispatcher}/dsinit.c (98%) rename trunk/drivers/acpi/{acpica => dispatcher}/dsmethod.c (98%) rename trunk/drivers/acpi/{acpica => dispatcher}/dsmthdat.c (99%) rename trunk/drivers/acpi/{acpica => dispatcher}/dsobject.c (99%) rename trunk/drivers/acpi/{acpica => dispatcher}/dsopcode.c (96%) rename trunk/drivers/acpi/{acpica => dispatcher}/dsutils.c (99%) rename trunk/drivers/acpi/{acpica => dispatcher}/dswexec.c (99%) rename trunk/drivers/acpi/{acpica => dispatcher}/dswload.c (99%) rename trunk/drivers/acpi/{acpica => dispatcher}/dswscope.c (99%) rename trunk/drivers/acpi/{acpica => dispatcher}/dswstate.c (99%) create mode 100644 trunk/drivers/acpi/events/Makefile rename trunk/drivers/acpi/{acpica => events}/evevent.c (96%) rename trunk/drivers/acpi/{acpica => events}/evgpe.c (94%) rename trunk/drivers/acpi/{acpica => events}/evgpeblk.c (94%) rename trunk/drivers/acpi/{acpica => events}/evmisc.c (93%) rename trunk/drivers/acpi/{acpica => events}/evregion.c (91%) rename trunk/drivers/acpi/{acpica => events}/evrgnini.c (95%) rename trunk/drivers/acpi/{acpica => events}/evsci.c (95%) rename trunk/drivers/acpi/{acpica => events}/evxface.c (99%) rename trunk/drivers/acpi/{acpica => events}/evxfevnt.c (81%) rename trunk/drivers/acpi/{acpica => events}/evxfregn.c (99%) create mode 100644 trunk/drivers/acpi/executer/Makefile rename trunk/drivers/acpi/{acpica => executer}/exconfig.c (99%) rename trunk/drivers/acpi/{acpica => executer}/exconvrt.c (99%) rename trunk/drivers/acpi/{acpica => executer}/excreate.c (99%) rename trunk/drivers/acpi/{acpica => executer}/exdump.c (99%) rename trunk/drivers/acpi/{acpica => executer}/exfield.c (99%) rename trunk/drivers/acpi/{acpica => executer}/exfldio.c (98%) rename trunk/drivers/acpi/{acpica => executer}/exmisc.c (99%) rename trunk/drivers/acpi/{acpica => executer}/exmutex.c (99%) rename trunk/drivers/acpi/{acpica => executer}/exnames.c (99%) rename trunk/drivers/acpi/{acpica => executer}/exoparg1.c (99%) rename trunk/drivers/acpi/{acpica => executer}/exoparg2.c (99%) rename trunk/drivers/acpi/{acpica => executer}/exoparg3.c (98%) rename trunk/drivers/acpi/{acpica => executer}/exoparg6.c (99%) rename trunk/drivers/acpi/{acpica => executer}/exprep.c (99%) rename trunk/drivers/acpi/{acpica => executer}/exregion.c (99%) rename trunk/drivers/acpi/{acpica => executer}/exresnte.c (98%) rename trunk/drivers/acpi/{acpica => executer}/exresolv.c (99%) rename trunk/drivers/acpi/{acpica => executer}/exresop.c (99%) rename trunk/drivers/acpi/{acpica => executer}/exstore.c (99%) rename trunk/drivers/acpi/{acpica => executer}/exstoren.c (99%) rename trunk/drivers/acpi/{acpica => executer}/exstorob.c (99%) rename trunk/drivers/acpi/{acpica => executer}/exsystem.c (99%) rename trunk/drivers/acpi/{acpica => executer}/exutils.c (99%) create mode 100644 trunk/drivers/acpi/hardware/Makefile rename trunk/drivers/acpi/{acpica => hardware}/hwacpi.c (99%) rename trunk/drivers/acpi/{acpica => hardware}/hwgpe.c (86%) rename trunk/drivers/acpi/{acpica/hwxface.c => hardware/hwregs.c} (62%) rename trunk/drivers/acpi/{acpica => hardware}/hwsleep.c (91%) rename trunk/drivers/acpi/{acpica => hardware}/hwtimer.c (99%) create mode 100644 trunk/drivers/acpi/namespace/Makefile rename trunk/drivers/acpi/{acpica => namespace}/nsaccess.c (98%) rename trunk/drivers/acpi/{acpica => namespace}/nsalloc.c (99%) rename trunk/drivers/acpi/{acpica => namespace}/nsdump.c (99%) rename trunk/drivers/acpi/{acpica => namespace}/nsdumpdv.c (99%) rename trunk/drivers/acpi/{acpica => namespace}/nseval.c (81%) rename trunk/drivers/acpi/{acpica => namespace}/nsinit.c (99%) rename trunk/drivers/acpi/{acpica => namespace}/nsload.c (99%) rename trunk/drivers/acpi/{acpica => namespace}/nsnames.c (99%) rename trunk/drivers/acpi/{acpica => namespace}/nsobject.c (99%) rename trunk/drivers/acpi/{acpica => namespace}/nsparse.c (98%) rename trunk/drivers/acpi/{acpica => namespace}/nspredef.c (76%) rename trunk/drivers/acpi/{acpica => namespace}/nssearch.c (99%) rename trunk/drivers/acpi/{acpica => namespace}/nsutils.c (98%) rename trunk/drivers/acpi/{acpica => namespace}/nswalk.c (99%) rename trunk/drivers/acpi/{acpica => namespace}/nsxfeval.c (99%) rename trunk/drivers/acpi/{acpica => namespace}/nsxfname.c (99%) rename trunk/drivers/acpi/{acpica => namespace}/nsxfobj.c (99%) create mode 100644 trunk/drivers/acpi/parser/Makefile rename trunk/drivers/acpi/{acpica => parser}/psargs.c (99%) rename trunk/drivers/acpi/{acpica => parser}/psloop.c (99%) rename trunk/drivers/acpi/{acpica => parser}/psopcode.c (99%) rename trunk/drivers/acpi/{acpica => parser}/psparse.c (97%) rename trunk/drivers/acpi/{acpica => parser}/psscope.c (99%) rename trunk/drivers/acpi/{acpica => parser}/pstree.c (99%) rename trunk/drivers/acpi/{acpica => parser}/psutils.c (99%) rename trunk/drivers/acpi/{acpica => parser}/pswalk.c (98%) rename trunk/drivers/acpi/{acpica => parser}/psxface.c (90%) create mode 100644 trunk/drivers/acpi/resources/Makefile rename trunk/drivers/acpi/{acpica => resources}/rsaddr.c (99%) rename trunk/drivers/acpi/{acpica => resources}/rscalc.c (99%) rename trunk/drivers/acpi/{acpica => resources}/rscreate.c (99%) rename trunk/drivers/acpi/{acpica => resources}/rsdump.c (99%) rename trunk/drivers/acpi/{acpica => resources}/rsinfo.c (99%) rename trunk/drivers/acpi/{acpica => resources}/rsio.c (99%) rename trunk/drivers/acpi/{acpica => resources}/rsirq.c (99%) rename trunk/drivers/acpi/{acpica => resources}/rslist.c (99%) rename trunk/drivers/acpi/{acpica => resources}/rsmemory.c (99%) rename trunk/drivers/acpi/{acpica => resources}/rsmisc.c (99%) rename trunk/drivers/acpi/{acpica => resources}/rsutils.c (99%) rename trunk/drivers/acpi/{acpica => resources}/rsxface.c (99%) create mode 100644 trunk/drivers/acpi/sleep/Makefile rename trunk/drivers/acpi/{ => sleep}/main.c (98%) rename trunk/drivers/acpi/{ => sleep}/proc.c (91%) rename trunk/drivers/acpi/{ => sleep}/sleep.h (100%) rename trunk/drivers/acpi/{ => sleep}/wakeup.c (96%) create mode 100644 trunk/drivers/acpi/tables/Makefile rename trunk/drivers/acpi/{acpica => tables}/tbfadt.c (67%) rename trunk/drivers/acpi/{acpica => tables}/tbfind.c (99%) rename trunk/drivers/acpi/{acpica => tables}/tbinstal.c (99%) rename trunk/drivers/acpi/{acpica => tables}/tbutils.c (96%) rename trunk/drivers/acpi/{acpica => tables}/tbxface.c (99%) rename trunk/drivers/acpi/{acpica => tables}/tbxfroot.c (99%) create mode 100644 trunk/drivers/acpi/utilities/Makefile rename trunk/drivers/acpi/{acpica => utilities}/utalloc.c (99%) create mode 100644 trunk/drivers/acpi/utilities/utcache.c rename trunk/drivers/acpi/{acpica => utilities}/utcopy.c (99%) rename trunk/drivers/acpi/{acpica => utilities}/utdebug.c (89%) rename trunk/drivers/acpi/{acpica => utilities}/utdelete.c (99%) rename trunk/drivers/acpi/{acpica => utilities}/uteval.c (99%) rename trunk/drivers/acpi/{acpica => utilities}/utglobal.c (99%) rename trunk/drivers/acpi/{acpica => utilities}/utinit.c (98%) rename trunk/drivers/acpi/{acpica => utilities}/utmath.c (99%) rename trunk/drivers/acpi/{acpica => utilities}/utmisc.c (97%) rename trunk/drivers/acpi/{acpica => utilities}/utmutex.c (99%) rename trunk/drivers/acpi/{acpica => utilities}/utobject.c (99%) rename trunk/drivers/acpi/{acpica => utilities}/utresrc.c (99%) rename trunk/drivers/acpi/{acpica => utilities}/utstate.c (99%) rename trunk/drivers/acpi/{acpica => utilities}/utxface.c (97%) rename trunk/{drivers/acpi/acpica => include/acpi}/acconfig.h (98%) rename trunk/{drivers/acpi/acpica => include/acpi}/acdebug.h (100%) create mode 100644 trunk/include/acpi/acdisasm.h rename trunk/{drivers/acpi/acpica => include/acpi}/acdispat.h (100%) rename trunk/{drivers/acpi/acpica => include/acpi}/acevents.h (97%) rename trunk/{drivers/acpi/acpica => include/acpi}/acglobal.h (97%) rename trunk/{drivers/acpi/acpica => include/acpi}/achware.h (89%) rename trunk/{drivers/acpi/acpica => include/acpi}/acinterp.h (100%) rename trunk/{drivers/acpi/acpica => include/acpi}/aclocal.h (95%) rename trunk/{drivers/acpi/acpica => include/acpi}/acmacros.h (83%) rename trunk/{drivers/acpi/acpica => include/acpi}/acnamesp.h (98%) rename trunk/{drivers/acpi/acpica => include/acpi}/acobject.h (100%) rename trunk/{drivers/acpi/acpica => include/acpi}/acopcode.h (100%) rename trunk/{drivers/acpi/acpica => include/acpi}/acparser.h (100%) rename trunk/{drivers/acpi/acpica => include/acpi}/acpredef.h (100%) rename trunk/{drivers/acpi/acpica => include/acpi}/acresrc.h (100%) delete mode 100644 trunk/include/acpi/acrestyp.h rename trunk/{drivers/acpi/acpica => include/acpi}/acstruct.h (100%) rename trunk/{drivers/acpi/acpica => include/acpi}/actables.h (98%) rename trunk/{drivers/acpi/acpica => include/acpi}/acutils.h (93%) rename trunk/{drivers/acpi/acpica => include/acpi}/amlcode.h (100%) rename trunk/{drivers/acpi/acpica => include/acpi}/amlresrc.h (100%) diff --git a/[refs] b/[refs] index 16b88ddae3d7..94cb8d194dad 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e2f7a7772880458edff1b1cc5a988947229fac26 +refs/heads/master: 48452e5f99ab35d643df0463b6ad11aea8ea7bdc diff --git a/trunk/Documentation/arm/mem_alignment b/trunk/Documentation/arm/mem_alignment index c7c7a114c78c..d145ccca169a 100644 --- a/trunk/Documentation/arm/mem_alignment +++ b/trunk/Documentation/arm/mem_alignment @@ -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/cpu/alignment. The number is made up from various bits: +/proc/sys/debug/alignment. The number is made up from various bits: bit behavior when set --- ----------------- diff --git a/trunk/Documentation/kernel-parameters.txt b/trunk/Documentation/kernel-parameters.txt index c9115c1b672c..e0f346d201ed 100644 --- a/trunk/Documentation/kernel-parameters.txt +++ b/trunk/Documentation/kernel-parameters.txt @@ -220,17 +220,14 @@ 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, ... - The debug_level mask defaults to "info". See - Documentation/acpi/debug.txt for more information about - debug layers and levels. + 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 diff --git a/trunk/Documentation/sound/alsa/ALSA-Configuration.txt b/trunk/Documentation/sound/alsa/ALSA-Configuration.txt index 394d7d378dc7..3cd2ad958176 100644 --- a/trunk/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/trunk/Documentation/sound/alsa/ALSA-Configuration.txt @@ -1063,7 +1063,6 @@ 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 @@ -1077,7 +1076,6 @@ 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 diff --git a/trunk/Documentation/usb/gadget_serial.txt b/trunk/Documentation/usb/gadget_serial.txt index eac7df94d8e3..9b22bd14c348 100644 --- a/trunk/Documentation/usb/gadget_serial.txt +++ b/trunk/Documentation/usb/gadget_serial.txt @@ -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 + modprobe g_serial use_acm=1 To load it as a vendor specific bulk in/out device, do this: - modprobe g_serial use_acm=0 + modprobe g_serial This will also automatically load the underlying gadget peripheral controller driver. This must be done each time you reboot the gadget diff --git a/trunk/Documentation/usb/proc_usb_info.txt b/trunk/Documentation/usb/proc_usb_info.txt index fafcd4723260..077e9032d0cd 100644 --- a/trunk/Documentation/usb/proc_usb_info.txt +++ b/trunk/Documentation/usb/proc_usb_info.txt @@ -49,10 +49,8 @@ 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. 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. +configuration of the device. That 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, diff --git a/trunk/Documentation/usb/usbmon.txt b/trunk/Documentation/usb/usbmon.txt index 270481906dc8..2917ce4ffdc4 100644 --- a/trunk/Documentation/usb/usbmon.txt +++ b/trunk/Documentation/usb/usbmon.txt @@ -34,12 +34,11 @@ if usbmon is built into the kernel. Verify that bus sockets are present. # ls /sys/kernel/debug/usbmon -0s 0u 1s 1t 1u 2s 2t 2u 3s 3t 3u 4s 4t 4u +0s 0t 0u 1s 1t 1u 2s 2t 2u 3s 3t 3u 4s 4t 4u # -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. +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. 2. Find which bus connects to the desired device @@ -100,9 +99,8 @@ 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, 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. +- URB Tag. This is used to identify URBs is normally a kernel mode address + of the URB structure in hexadecimal. - Timestamp in microseconds, a decimal number. The timestamp's resolution depends on available clock, and so it can be much worse than a microsecond diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index fbc8fa58d56d..24741de12a39 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -1527,10 +1527,10 @@ W: http://ebtables.sourceforge.net/ S: Maintained ECRYPT FILE SYSTEM -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 +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/ S: Supported EDAC-CORE @@ -2191,9 +2191,9 @@ S: Supported INOTIFY P: John McCutchan -M: john@johnmccutchan.com +M: ttb@tentacle.dhs.org P: Robert Love -M: rlove@rlove.org +M: rml@novell.com 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 (subscribers-only) +L: linux-uvc-devel@lists.berlios.de L: video4linux-list@redhat.com W: http://linux-uvc.berlios.de S: Maintained diff --git a/trunk/Makefile b/trunk/Makefile index 71e98e9e6acd..9a49960f7aad 100644 --- a/trunk/Makefile +++ b/trunk/Makefile @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 28 -EXTRAVERSION = +EXTRAVERSION = -rc7 NAME = Erotic Pickled Herring # *DOCUMENTATION* diff --git a/trunk/arch/arm/common/sa1111.c b/trunk/arch/arm/common/sa1111.c index ef12794c3c68..47ccec95f3e8 100644 --- a/trunk/arch/arm/common/sa1111.c +++ b/trunk/arch/arm/common/sa1111.c @@ -630,7 +630,7 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq) return -ENOMEM; sachip->clk = clk_get(me, "SA1111_CLK"); - if (IS_ERR(sachip->clk)) { + if (!sachip->clk) { ret = PTR_ERR(sachip->clk); goto err_free; } diff --git a/trunk/arch/arm/kernel/armksyms.c b/trunk/arch/arm/kernel/armksyms.c index 23af3c972c9a..c74f766ffc12 100644 --- a/trunk/arch/arm/kernel/armksyms.c +++ b/trunk/arch/arm/kernel/armksyms.c @@ -115,8 +115,6 @@ 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); @@ -183,6 +181,8 @@ 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 diff --git a/trunk/arch/arm/kernel/traps.c b/trunk/arch/arm/kernel/traps.c index 79abc4ddc0cf..57e6874d0b80 100644 --- a/trunk/arch/arm/kernel/traps.c +++ b/trunk/arch/arm/kernel/traps.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/mach-pxa/include/mach/reset.h b/trunk/arch/arm/mach-pxa/include/mach/reset.h index 31e6a7b6ad80..7b8842cfa5fc 100644 --- a/trunk/arch/arm/mach-pxa/include/mach/reset.h +++ b/trunk/arch/arm/mach-pxa/include/mach/reset.h @@ -12,8 +12,9 @@ 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); diff --git a/trunk/arch/arm/mm/fault.c b/trunk/arch/arm/mm/fault.c index 22c9530e91e2..2df8d9facf57 100644 --- a/trunk/arch/arm/mm/fault.c +++ b/trunk/arch/arm/mm/fault.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/avr32/boards/favr-32/flash.c b/trunk/arch/avr32/boards/favr-32/flash.c index 604bbd5e41d9..5f139b7cb5f7 100644 --- a/trunk/arch/avr32/boards/favr-32/flash.c +++ b/trunk/arch/avr32/boards/favr-32/flash.c @@ -13,7 +13,7 @@ #include #include -#include +#include static struct smc_timing flash_timing __initdata = { .ncs_read_setup = 0, diff --git a/trunk/arch/avr32/boards/favr-32/setup.c b/trunk/arch/avr32/boards/favr-32/setup.c index 1ee4faf0742d..7538f3d2b9e0 100644 --- a/trunk/arch/avr32/boards/favr-32/setup.c +++ b/trunk/arch/avr32/boards/favr-32/setup.c @@ -25,10 +25,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include /* Oscillator frequencies. These are board-specific */ unsigned long at32_board_osc_rates[3] = { diff --git a/trunk/arch/avr32/boot/images/Makefile b/trunk/arch/avr32/boot/images/Makefile index 1848bf0d7f62..219720a47bf9 100644 --- a/trunk/arch/avr32/boot/images/Makefile +++ b/trunk/arch/avr32/boot/images/Makefile @@ -10,7 +10,7 @@ MKIMAGE := $(srctree)/scripts/mkuboot.sh extra-y := vmlinux.bin vmlinux.gz -OBJCOPYFLAGS_vmlinux.bin := -O binary -R .note.gnu.build-id +OBJCOPYFLAGS_vmlinux.bin := -O binary $(obj)/vmlinux.bin: vmlinux FORCE $(call if_changed,objcopy) diff --git a/trunk/arch/avr32/configs/atstk1006_defconfig b/trunk/arch/avr32/configs/atstk1006_defconfig index 6c45a3b77aa3..8b6e54c9946a 100644 --- a/trunk/arch/avr32/configs/atstk1006_defconfig +++ b/trunk/arch/avr32/configs/atstk1006_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.28-rc8 -# Thu Dec 18 11:22:23 2008 +# Linux kernel version: 2.6.27-rc1 +# Tue Aug 5 15:40:26 2008 # CONFIG_AVR32=y CONFIG_GENERIC_GPIO=y @@ -67,7 +67,6 @@ 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 @@ -78,8 +77,15 @@ 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 @@ -112,7 +118,6 @@ 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 @@ -129,8 +134,6 @@ 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 @@ -168,14 +171,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 @@ -183,7 +186,7 @@ CONFIG_HZ_250=y # CONFIG_HZ_300 is not set # CONFIG_HZ_1000 is not set CONFIG_HZ=250 -CONFIG_SCHED_HRTICK=y +# CONFIG_SCHED_HRTICK is not set CONFIG_CMDLINE="" # @@ -225,8 +228,6 @@ 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 @@ -298,7 +299,6 @@ 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,8 +321,14 @@ CONFIG_LLC=m # CONFIG_IRDA is not set # CONFIG_BT is not set # CONFIG_AF_RXRPC is not set -# CONFIG_PHONET is not set -# CONFIG_WIRELESS 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_RFKILL is not set # CONFIG_NET_9P is not set @@ -353,7 +359,6 @@ 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 @@ -402,8 +407,6 @@ 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 @@ -461,10 +464,9 @@ 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_C2PORT is not set +# CONFIG_HAVE_IDE is not set # # SCSI device support @@ -546,9 +548,6 @@ 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 @@ -654,7 +653,6 @@ CONFIG_UNIX98_PTYS=y CONFIG_I2C=m CONFIG_I2C_BOARDINFO=y CONFIG_I2C_CHARDEV=m -CONFIG_I2C_HELPER_AUTO=y CONFIG_I2C_ALGOBIT=m # @@ -718,10 +716,6 @@ CONFIG_GPIOLIB=y # CONFIG_DEBUG_GPIO is not set CONFIG_GPIO_SYSFS=y -# -# Memory mapped GPIO expanders: -# - # # I2C GPIO expanders: # @@ -751,11 +745,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 # @@ -764,10 +758,6 @@ 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 @@ -793,7 +783,6 @@ 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 @@ -815,13 +804,10 @@ 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 @@ -832,7 +818,6 @@ 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 @@ -863,32 +848,28 @@ 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 depends on SCSI but BLK_DEV_SD may also be needed; +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' # 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_AT91 is not set +# CONFIG_USB_GADGET_AMD5536UDC 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_LH7A40X is not set -# CONFIG_USB_GADGET_OMAP is not set +# CONFIG_USB_GADGET_NET2280 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_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_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_S3C2410 is not set +# CONFIG_USB_GADGET_AT91 is not set # CONFIG_USB_GADGET_DUMMY_HCD is not set CONFIG_USB_GADGET_DUALSPEED=y CONFIG_USB_ZERO=m @@ -906,7 +887,7 @@ CONFIG_MMC=y # CONFIG_MMC_UNSAFE_RESUME is not set # -# MMC/SD/SDIO Card Drivers +# MMC/SD Card Drivers # CONFIG_MMC_BLOCK=y CONFIG_MMC_BLOCK_BOUNCE=y @@ -914,11 +895,10 @@ CONFIG_MMC_BLOCK_BOUNCE=y # CONFIG_MMC_TEST is not set # -# MMC/SD/SDIO Host Controller Drivers +# MMC/SD 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 @@ -938,7 +918,6 @@ 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 @@ -971,31 +950,25 @@ 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 # @@ -1016,8 +989,6 @@ 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 @@ -1027,17 +998,12 @@ CONFIG_EXT2_FS=m # CONFIG_EXT2_FS_XIP is not set CONFIG_EXT3_FS=m # CONFIG_EXT3_FS_XATTR is not set -CONFIG_EXT4_FS=m -CONFIG_EXT4DEV_COMPAT=y -# CONFIG_EXT4_FS_XATTR is not set +# CONFIG_EXT4DEV_FS 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 @@ -1070,7 +1036,6 @@ 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 @@ -1089,8 +1054,7 @@ CONFIG_TMPFS=y # CONFIG_EFS_FS is not set CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -# CONFIG_JFFS2_FS_WBUF_VERIFY is not set +# CONFIG_JFFS2_FS_WRITEBUFFER is not set # CONFIG_JFFS2_SUMMARY is not set # CONFIG_JFFS2_FS_XATTR is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set @@ -1124,7 +1088,6 @@ 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 @@ -1222,21 +1185,10 @@ 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 # @@ -1244,26 +1196,17 @@ 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 @@ -1314,7 +1257,7 @@ CONFIG_CRYPTO_SHA1=m # # Ciphers # -CONFIG_CRYPTO_AES=m +# CONFIG_CRYPTO_AES is not set # CONFIG_CRYPTO_ANUBIS is not set # CONFIG_CRYPTO_ARC4 is not set # CONFIG_CRYPTO_BLOWFISH is not set @@ -1335,17 +1278,14 @@ 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 diff --git a/trunk/arch/avr32/mach-at32ap/at32ap700x.c b/trunk/arch/avr32/mach-at32ap/at32ap700x.c index 066252eebf61..0c6e02f80a31 100644 --- a/trunk/arch/avr32/mach-at32ap/at32ap700x.c +++ b/trunk/arch/avr32/mach-at32ap/at32ap700x.c @@ -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, AT32_GPIOF_PULLUP); + select_peripheral(PIOA, pin_mask, PERIPH_B, 0); } static inline void configure_usart1_pins(void) { u32 pin_mask = (1 << 17) | (1 << 18); /* RXD & TXD */ - select_peripheral(PIOA, pin_mask, PERIPH_A, AT32_GPIOF_PULLUP); + select_peripheral(PIOA, pin_mask, PERIPH_A, 0); } static inline void configure_usart2_pins(void) { u32 pin_mask = (1 << 26) | (1 << 27); /* RXD & TXD */ - select_peripheral(PIOB, pin_mask, PERIPH_B, AT32_GPIOF_PULLUP); + select_peripheral(PIOB, pin_mask, PERIPH_B, 0); } static inline void configure_usart3_pins(void) { u32 pin_mask = (1 << 18) | (1 << 17); /* RXD & TXD */ - select_peripheral(PIOB, pin_mask, PERIPH_B, AT32_GPIOF_PULLUP); + select_peripheral(PIOB, pin_mask, PERIPH_B, 0); } static struct platform_device *__initdata at32_usarts[4]; diff --git a/trunk/arch/ia64/configs/generic_defconfig b/trunk/arch/ia64/configs/generic_defconfig index 27eb67604c53..e05f9e1d3faa 100644 --- a/trunk/arch/ia64/configs/generic_defconfig +++ b/trunk/arch/ia64/configs/generic_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.28-rc7 -# Mon Dec 8 08:12:07 2008 +# Linux kernel version: 2.6.27-rc1 +# Mon Aug 4 15:38:01 2008 # CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" @@ -26,7 +26,6 @@ CONFIG_LOG_BUF_SHIFT=20 CONFIG_CGROUPS=y # CONFIG_CGROUP_DEBUG is not set # CONFIG_CGROUP_NS is not set -# CONFIG_CGROUP_FREEZER is not set # CONFIG_CGROUP_DEVICE is not set CONFIG_CPUSETS=y # CONFIG_GROUP_SCHED is not set @@ -47,6 +46,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_SYSCTL=y # CONFIG_EMBEDDED is not set CONFIG_SYSCTL_SYSCALL=y +CONFIG_SYSCTL_SYSCALL_CHECK=y CONFIG_KALLSYMS=y CONFIG_KALLSYMS_ALL=y # CONFIG_KALLSYMS_EXTRA_PASS is not set @@ -63,9 +63,7 @@ CONFIG_SIGNALFD=y CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y -CONFIG_AIO=y CONFIG_VM_EVENT_COUNTERS=y -CONFIG_PCI_QUIRKS=y CONFIG_SLUB_DEBUG=y # CONFIG_SLAB is not set CONFIG_SLUB=y @@ -74,11 +72,15 @@ CONFIG_SLUB=y # CONFIG_MARKERS is not set CONFIG_HAVE_OPROFILE=y # CONFIG_KPROBES is not set +# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set +# CONFIG_HAVE_IOREMAP_PROT is not set CONFIG_HAVE_KPROBES=y CONFIG_HAVE_KRETPROBES=y -CONFIG_HAVE_ARCH_TRACEHOOK=y +# CONFIG_HAVE_ARCH_TRACEHOOK is not set CONFIG_HAVE_DMA_ATTRS=y CONFIG_USE_GENERIC_SMP_HELPERS=y +# CONFIG_HAVE_CLK is not set +CONFIG_PROC_PAGE_MONITOR=y # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set CONFIG_SLABINFO=y CONFIG_RT_MUTEXES=y @@ -111,7 +113,6 @@ CONFIG_DEFAULT_AS=y # CONFIG_DEFAULT_NOOP is not set CONFIG_DEFAULT_IOSCHED="anticipatory" CONFIG_CLASSIC_RCU=y -# CONFIG_FREEZER is not set # # Processor type and features @@ -124,6 +125,8 @@ CONFIG_MMU=y CONFIG_SWIOTLB=y CONFIG_IOMMU_HELPER=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y +# CONFIG_ARCH_HAS_ILOG2_U32 is not set +# CONFIG_ARCH_HAS_ILOG2_U64 is not set CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_CALIBRATE_DELAY=y @@ -136,16 +139,13 @@ CONFIG_GENERIC_IOMAP=y CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_IA64_UNCACHED_ALLOCATOR=y CONFIG_AUDIT_ARCH=y -# CONFIG_PARAVIRT_GUEST is not set CONFIG_IA64_GENERIC=y # CONFIG_IA64_DIG is not set -# CONFIG_IA64_DIG_VTD is not set # CONFIG_IA64_HP_ZX1 is not set # CONFIG_IA64_HP_ZX1_SWIOTLB is not set # CONFIG_IA64_SGI_SN2 is not set # CONFIG_IA64_SGI_UV is not set # CONFIG_IA64_HP_SIM is not set -# CONFIG_IA64_XEN_GUEST is not set # CONFIG_ITANIUM is not set CONFIG_MCKINLEY=y # CONFIG_IA64_PAGE_SIZE_4KB is not set @@ -182,17 +182,16 @@ CONFIG_DISCONTIGMEM_MANUAL=y CONFIG_DISCONTIGMEM=y CONFIG_FLAT_NODE_MEM_MAP=y CONFIG_NEED_MULTIPLE_NODES=y +# CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y CONFIG_PAGEFLAGS_EXTENDED=y CONFIG_SPLIT_PTLOCK_CPUS=4 CONFIG_MIGRATION=y CONFIG_RESOURCES_64BIT=y -CONFIG_PHYS_ADDR_T_64BIT=y CONFIG_ZONE_DMA_FLAG=1 CONFIG_BOUNCE=y CONFIG_NR_QUICK=1 CONFIG_VIRT_TO_BUS=y -CONFIG_UNEVICTABLE_LRU=y CONFIG_MMU_NOTIFIER=y CONFIG_ARCH_SELECT_MEMORY_MODEL=y CONFIG_ARCH_DISCONTIGMEM_ENABLE=y @@ -232,12 +231,12 @@ CONFIG_EFI_VARS=y CONFIG_EFI_PCDP=y CONFIG_DMIID=y CONFIG_BINFMT_ELF=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -# CONFIG_HAVE_AOUT is not set CONFIG_BINFMT_MISC=m +# CONFIG_DMAR is not set + # -# Power management and ACPI options +# Power management and ACPI # CONFIG_PM=y # CONFIG_PM_DEBUG is not set @@ -249,6 +248,7 @@ CONFIG_ACPI_PROC_EVENT=y CONFIG_ACPI_BUTTON=m CONFIG_ACPI_FAN=m CONFIG_ACPI_DOCK=y +# CONFIG_ACPI_BAY is not set CONFIG_ACPI_PROCESSOR=m CONFIG_ACPI_HOTPLUG_CPU=y CONFIG_ACPI_THERMAL=m @@ -256,7 +256,9 @@ CONFIG_ACPI_NUMA=y # CONFIG_ACPI_CUSTOM_DSDT is not set CONFIG_ACPI_BLACKLIST_YEAR=0 # CONFIG_ACPI_DEBUG is not set +CONFIG_ACPI_EC=y # CONFIG_ACPI_PCI_SLOT is not set +CONFIG_ACPI_POWER=y CONFIG_ACPI_SYSTEM=y CONFIG_ACPI_CONTAINER=m @@ -273,7 +275,7 @@ CONFIG_PCI_DOMAINS=y CONFIG_PCI_SYSCALL=y # CONFIG_PCIEPORTBUS is not set CONFIG_ARCH_SUPPORTS_MSI=y -CONFIG_PCI_MSI=y +# CONFIG_PCI_MSI is not set CONFIG_PCI_LEGACY=y # CONFIG_PCI_DEBUG is not set CONFIG_HOTPLUG_PCI=m @@ -284,7 +286,6 @@ CONFIG_HOTPLUG_PCI_ACPI=m # CONFIG_HOTPLUG_PCI_SHPC is not set # CONFIG_HOTPLUG_PCI_SGI is not set # CONFIG_PCCARD is not set -CONFIG_DMAR=y CONFIG_NET=y # @@ -332,7 +333,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic" # 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 @@ -353,10 +353,11 @@ CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_IRDA is not set # CONFIG_BT is not set # CONFIG_AF_RXRPC is not set -# CONFIG_PHONET is not set -CONFIG_WIRELESS=y + +# +# Wireless +# # CONFIG_CFG80211 is not set -CONFIG_WIRELESS_OLD_REGULATORY=y # CONFIG_WIRELESS_EXT is not set # CONFIG_MAC80211 is not set # CONFIG_IEEE80211 is not set @@ -384,7 +385,7 @@ CONFIG_PROC_EVENTS=y # CONFIG_MTD is not set # CONFIG_PARPORT is not set CONFIG_PNP=y -# CONFIG_PNP_DEBUG_MESSAGES is not set +# CONFIG_PNP_DEBUG is not set # # Protocols @@ -418,9 +419,10 @@ CONFIG_SGI_XP=m # CONFIG_HP_ILO is not set CONFIG_SGI_GRU=m # CONFIG_SGI_GRU_DEBUG is not set -# CONFIG_C2PORT is not set CONFIG_HAVE_IDE=y CONFIG_IDE=y +CONFIG_IDE_MAX_HWIFS=4 +CONFIG_BLK_DEV_IDE=y # # Please see Documentation/ide/ide.txt for help/info on IDE drives @@ -428,12 +430,12 @@ CONFIG_IDE=y CONFIG_IDE_TIMINGS=y CONFIG_IDE_ATAPI=y # CONFIG_BLK_DEV_IDE_SATA is not set -CONFIG_IDE_GD=y -CONFIG_IDE_GD_ATA=y -# CONFIG_IDE_GD_ATAPI is not set +CONFIG_BLK_DEV_IDEDISK=y +# CONFIG_IDEDISK_MULTI_MODE is not set CONFIG_BLK_DEV_IDECD=y CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y # CONFIG_BLK_DEV_IDETAPE is not set +CONFIG_BLK_DEV_IDEFLOPPY=y CONFIG_BLK_DEV_IDESCSI=m # CONFIG_BLK_DEV_IDEACPI is not set # CONFIG_IDE_TASK_IOCTL is not set @@ -703,9 +705,6 @@ CONFIG_TULIP=m # 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=y # CONFIG_PCNET32 is not set # CONFIG_AMD8111_ETH is not set @@ -726,11 +725,11 @@ CONFIG_E100=m # CONFIG_TLAN is not set # CONFIG_VIA_RHINE is not set # CONFIG_SC92031 is not set -# CONFIG_ATL2 is not set CONFIG_NETDEV_1000=y # CONFIG_ACENIC is not set # CONFIG_DL2K is not set CONFIG_E1000=y +# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set # CONFIG_E1000E is not set # CONFIG_IP1000 is not set CONFIG_IGB=y @@ -748,22 +747,18 @@ CONFIG_TIGON3=y # CONFIG_QLA3XXX is not set # CONFIG_ATL1 is not set # CONFIG_ATL1E is not set -# CONFIG_JME is not set CONFIG_NETDEV_10000=y # CONFIG_CHELSIO_T1 is not set # CONFIG_CHELSIO_T3 is not set -# CONFIG_ENIC is not set # CONFIG_IXGBE is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set # CONFIG_MYRI10GE is not set # CONFIG_NETXEN_NIC is not set # CONFIG_NIU is not set -# CONFIG_MLX4_EN is not set # CONFIG_MLX4_CORE is not set # CONFIG_TEHUTI is not set # CONFIG_BNX2X is not set -# CONFIG_QLGE is not set # CONFIG_SFC is not set # CONFIG_TR is not set @@ -831,11 +826,9 @@ 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_APPLETOUCH is not set -# CONFIG_MOUSE_BCM5974 is not set # CONFIG_MOUSE_VSXXXAA is not set # CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_TABLET is not set @@ -949,16 +942,15 @@ CONFIG_HWMON=y # CONFIG_SENSORS_VT8231 is not set # CONFIG_SENSORS_W83627HF is not set # CONFIG_SENSORS_W83627EHF is not set -# CONFIG_SENSORS_LIS3LV02D is not set # CONFIG_HWMON_DEBUG_CHIP is not set CONFIG_THERMAL=m # CONFIG_THERMAL_HWMON is not set # CONFIG_WATCHDOG is not set -CONFIG_SSB_POSSIBLE=y # # Sonics Silicon Backplane # +CONFIG_SSB_POSSIBLE=y # CONFIG_SSB is not set # @@ -967,8 +959,6 @@ 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_REGULATOR is not set # # Multimedia devices @@ -1019,7 +1009,6 @@ CONFIG_VGA_CONSOLE=y # CONFIG_VGACON_SOFT_SCROLLBACK is not set CONFIG_DUMMY_CONSOLE=y CONFIG_SOUND=m -CONFIG_SOUND_OSS_CORE=y CONFIG_SND=m CONFIG_SND_TIMER=m CONFIG_SND_PCM=m @@ -1124,7 +1113,8 @@ CONFIG_HID=y # USB Input Devices # CONFIG_USB_HID=m -# CONFIG_HID_PID is not set +# CONFIG_USB_HIDINPUT_POWERBOOK is not set +# CONFIG_HID_FF is not set # CONFIG_USB_HIDDEV is not set # @@ -1132,34 +1122,6 @@ CONFIG_USB_HID=m # # CONFIG_USB_KBD is not set # CONFIG_USB_MOUSE is not set - -# -# Special HID drivers -# -CONFIG_HID_COMPAT=y -CONFIG_HID_A4TECH=m -CONFIG_HID_APPLE=m -CONFIG_HID_BELKIN=m -CONFIG_HID_BRIGHT=m -CONFIG_HID_CHERRY=m -CONFIG_HID_CHICONY=m -CONFIG_HID_CYPRESS=m -CONFIG_HID_DELL=m -CONFIG_HID_EZKEY=m -CONFIG_HID_GYRATION=m -CONFIG_HID_LOGITECH=m -# CONFIG_LOGITECH_FF is not set -# CONFIG_LOGIRUMBLEPAD2_FF is not set -CONFIG_HID_MICROSOFT=m -CONFIG_HID_MONTEREY=m -CONFIG_HID_PANTHERLORD=m -# CONFIG_PANTHERLORD_FF is not set -CONFIG_HID_PETALYNX=m -CONFIG_HID_SAMSUNG=m -CONFIG_HID_SONY=m -CONFIG_HID_SUNPLUS=m -# CONFIG_THRUSTMASTER_FF is not set -# CONFIG_ZEROPLUS_FF is not set CONFIG_USB_SUPPORT=y CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y @@ -1176,9 +1138,6 @@ CONFIG_USB_DEVICE_CLASS=y # CONFIG_USB_DYNAMIC_MINORS is not set # CONFIG_USB_SUSPEND is not set # CONFIG_USB_OTG is not set -CONFIG_USB_MON=y -# CONFIG_USB_WUSB is not set -# CONFIG_USB_WUSB_CBAF is not set # # USB Host Controller Drivers @@ -1196,12 +1155,6 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y CONFIG_USB_UHCI_HCD=m # CONFIG_USB_SL811_HCD is not set # CONFIG_USB_R8A66597_HCD is not set -# CONFIG_USB_WHCI_HCD is not set -# CONFIG_USB_HWA_HCD is not set - -# -# Enable Host or Gadget support to see Inventra options -# # # USB Device Class drivers @@ -1209,14 +1162,13 @@ CONFIG_USB_UHCI_HCD=m # CONFIG_USB_ACM is not set # CONFIG_USB_PRINTER is not set # CONFIG_USB_WDM is not set -# CONFIG_USB_TMC is not set # -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' # # -# see USB_STORAGE Help for more information +# may also be needed; see USB_STORAGE Help for more information # CONFIG_USB_STORAGE=m # CONFIG_USB_STORAGE_DEBUG is not set @@ -1239,6 +1191,7 @@ CONFIG_USB_STORAGE=m # # CONFIG_USB_MDC800 is not set # CONFIG_USB_MICROTEK is not set +CONFIG_USB_MON=y # # USB port drivers @@ -1251,7 +1204,7 @@ CONFIG_USB_STORAGE=m # CONFIG_USB_EMI62 is not set # CONFIG_USB_EMI26 is not set # CONFIG_USB_ADUTUX is not set -# CONFIG_USB_SEVSEG is not set +# CONFIG_USB_AUERSWALD is not set # CONFIG_USB_RIO500 is not set # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set @@ -1269,9 +1222,7 @@ CONFIG_USB_STORAGE=m # CONFIG_USB_IOWARRIOR is not set # CONFIG_USB_TEST is not set # CONFIG_USB_ISIGHTFW is not set -# CONFIG_USB_VST is not set # CONFIG_USB_GADGET is not set -# CONFIG_UWB is not set # CONFIG_MMC is not set # CONFIG_MEMSTICK is not set # CONFIG_NEW_LEDS is not set @@ -1295,15 +1246,6 @@ CONFIG_INFINIBAND_IPOIB_DEBUG=y # CONFIG_RTC_CLASS is not set # CONFIG_DMADEVICES is not set # CONFIG_UIO is not set -# CONFIG_STAGING is not set -CONFIG_STAGING_EXCLUDE_BUILD=y - -# -# HP Simulator drivers -# -# CONFIG_HP_SIMETH is not set -# CONFIG_HP_SIMSERIAL is not set -# CONFIG_HP_SIMSCSI is not set CONFIG_MSPEC=m # @@ -1318,7 +1260,7 @@ 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_EXT4DEV_FS is not set CONFIG_JBD=y CONFIG_FS_MBCACHE=y CONFIG_REISERFS_FS=y @@ -1329,7 +1271,6 @@ CONFIG_REISERFS_FS_POSIX_ACL=y CONFIG_REISERFS_FS_SECURITY=y # CONFIG_JFS_FS is not set CONFIG_FS_POSIX_ACL=y -CONFIG_FILE_LOCKING=y CONFIG_XFS_FS=y # CONFIG_XFS_QUOTA is not set # CONFIG_XFS_POSIX_ACL is not set @@ -1341,8 +1282,8 @@ CONFIG_DNOTIFY=y CONFIG_INOTIFY=y CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set -CONFIG_AUTOFS_FS=m -CONFIG_AUTOFS4_FS=m +CONFIG_AUTOFS_FS=y +CONFIG_AUTOFS4_FS=y # CONFIG_FUSE_FS is not set # @@ -1373,7 +1314,6 @@ CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y CONFIG_PROC_VMCORE=y CONFIG_PROC_SYSCTL=y -CONFIG_PROC_PAGE_MONITOR=y CONFIG_SYSFS=y CONFIG_TMPFS=y # CONFIG_TMPFS_POSIX_ACL is not set @@ -1416,7 +1356,6 @@ CONFIG_NFS_COMMON=y CONFIG_SUNRPC=m CONFIG_SUNRPC_GSS=m CONFIG_SUNRPC_XPRT_RDMA=m -# CONFIG_SUNRPC_REGISTER_V4 is not set CONFIG_RPCSEC_GSS_KRB5=m # CONFIG_RPCSEC_GSS_SPKM3 is not set CONFIG_SMB_FS=m @@ -1494,6 +1433,38 @@ CONFIG_NLS_KOI8_R=m CONFIG_NLS_KOI8_U=m CONFIG_NLS_UTF8=m # CONFIG_DLM is not set +CONFIG_HAVE_KVM=y +CONFIG_VIRTUALIZATION=y +# CONFIG_KVM is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +# CONFIG_GENERIC_FIND_FIRST_BIT is not set +# CONFIG_CRC_CCITT is not set +# CONFIG_CRC16 is not set +CONFIG_CRC_T10DIF=y +CONFIG_CRC_ITU_T=m +CONFIG_CRC32=y +# CONFIG_CRC7 is not set +# CONFIG_LIBCRC32C is not set +CONFIG_GENERIC_ALLOCATOR=y +CONFIG_PLIST=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_PENDING_IRQ=y +CONFIG_IRQ_PER_CPU=y + +# +# HP Simulator drivers +# +# CONFIG_HP_SIMETH is not set +# CONFIG_HP_SIMSERIAL is not set +# CONFIG_HP_SIMSCSI is not set # # Kernel hacking @@ -1532,19 +1503,8 @@ CONFIG_DEBUG_MEMORY_INIT=y # CONFIG_DEBUG_SG is not set # CONFIG_BOOT_PRINTK_DELAY is not set # CONFIG_RCU_TORTURE_TEST is not set -# CONFIG_RCU_CPU_STALL_DETECTOR is not set # CONFIG_BACKTRACE_SELF_TEST is not set -# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set # CONFIG_FAULT_INJECTION is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y - -# -# Tracers -# -# 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 CONFIG_IA64_GRANULE_16MB=y # CONFIG_IA64_GRANULE_64MB is not set @@ -1559,19 +1519,14 @@ CONFIG_SYSVIPC_COMPAT=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 is not set CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_AEAD=m CONFIG_CRYPTO_BLKCIPHER=m -CONFIG_CRYPTO_HASH=m -CONFIG_CRYPTO_RNG=m CONFIG_CRYPTO_MANAGER=m # CONFIG_CRYPTO_GF128MUL is not set # CONFIG_CRYPTO_NULL is not set @@ -1644,36 +1599,5 @@ CONFIG_CRYPTO_DES=m # # CONFIG_CRYPTO_DEFLATE is not set # CONFIG_CRYPTO_LZO is not set - -# -# Random Number Generation -# -# CONFIG_CRYPTO_ANSI_CPRNG is not set CONFIG_CRYPTO_HW=y # CONFIG_CRYPTO_DEV_HIFN_795X is not set -CONFIG_HAVE_KVM=y -CONFIG_VIRTUALIZATION=y -# CONFIG_KVM is not set -# CONFIG_VIRTIO_PCI is not set -# CONFIG_VIRTIO_BALLOON is not set - -# -# Library routines -# -CONFIG_BITREVERSE=y -# CONFIG_CRC_CCITT is not set -# CONFIG_CRC16 is not set -CONFIG_CRC_T10DIF=y -CONFIG_CRC_ITU_T=m -CONFIG_CRC32=y -# CONFIG_CRC7 is not set -# CONFIG_LIBCRC32C is not set -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_PLIST=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_PENDING_IRQ=y -CONFIG_IRQ_PER_CPU=y diff --git a/trunk/arch/ia64/hp/sim/Kconfig b/trunk/arch/ia64/hp/sim/Kconfig index 8d513a8c5266..f92306bbedb8 100644 --- a/trunk/arch/ia64/hp/sim/Kconfig +++ b/trunk/arch/ia64/hp/sim/Kconfig @@ -4,7 +4,6 @@ menu "HP Simulator drivers" config HP_SIMETH bool "Simulated Ethernet " - depends on NET config HP_SIMSERIAL bool "Simulated serial driver support" diff --git a/trunk/arch/ia64/include/asm/acpi-ext.h b/trunk/arch/ia64/include/asm/acpi-ext.h index 7f8362b379eb..734d137dda6e 100644 --- a/trunk/arch/ia64/include/asm/acpi-ext.h +++ b/trunk/arch/ia64/include/asm/acpi-ext.h @@ -14,6 +14,7 @@ #define _ASM_IA64_ACPI_EXT_H #include +#include extern acpi_status hp_acpi_csr_space (acpi_handle, u64 *base, u64 *length); diff --git a/trunk/arch/ia64/include/asm/paravirt_privop.h b/trunk/arch/ia64/include/asm/paravirt_privop.h index 33c8e55f5775..0b597424fcfc 100644 --- a/trunk/arch/ia64/include/asm/paravirt_privop.h +++ b/trunk/arch/ia64/include/asm/paravirt_privop.h @@ -83,6 +83,7 @@ extern unsigned long ia64_native_getreg_func(int regnum); #define paravirt_getreg(reg) \ ({ \ unsigned long res; \ + BUILD_BUG_ON(!__builtin_constant_p(reg)); \ if ((reg) == _IA64_REG_IP) \ res = ia64_native_getreg(_IA64_REG_IP); \ else \ diff --git a/trunk/arch/ia64/include/asm/sn/acpi.h b/trunk/arch/ia64/include/asm/sn/acpi.h index fd480db25565..9ce2801cbd57 100644 --- a/trunk/arch/ia64/include/asm/sn/acpi.h +++ b/trunk/arch/ia64/include/asm/sn/acpi.h @@ -9,6 +9,8 @@ #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) diff --git a/trunk/arch/ia64/kernel/topology.c b/trunk/arch/ia64/kernel/topology.c index c75b914f2d6b..26228e2d01ae 100644 --- a/trunk/arch/ia64/kernel/topology.c +++ b/trunk/arch/ia64/kernel/topology.c @@ -53,12 +53,10 @@ int __ref arch_register_cpu(int num) } EXPORT_SYMBOL(arch_register_cpu); -void __ref arch_unregister_cpu(int num) +void arch_unregister_cpu(int num) { unregister_cpu(&sysfs_cpus[num].cpu); -#ifdef CONFIG_ACPI unmap_cpu_from_node(num, cpu_to_node(num)); -#endif } EXPORT_SYMBOL(arch_unregister_cpu); #else diff --git a/trunk/arch/ia64/sn/kernel/io_acpi_init.c b/trunk/arch/ia64/sn/kernel/io_acpi_init.c index c5a214026a77..bc610a6c7851 100644 --- a/trunk/arch/ia64/sn/kernel/io_acpi_init.c +++ b/trunk/arch/ia64/sn/kernel/io_acpi_init.c @@ -13,6 +13,7 @@ #include #include "xtalk/hubdev.h" #include +#include /* @@ -63,7 +64,6 @@ 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,12 +77,11 @@ 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: %s\n", status, - (char *)name_buffer.pointer); - kfree(name_buffer.pointer); + "(0x%x) failed for: ", status); + acpi_ns_print_node_pathname(handle, NULL); + printk("\n"); return AE_OK; /* Continue walking namespace */ } @@ -90,12 +89,11 @@ 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: %s\n", - vendor->byte_length, (char *)name_buffer.pointer); - kfree(name_buffer.pointer); + "sn_acpi_hubdev_init: Invalid vendor data length: %d for: ", + vendor->byte_length); + acpi_ns_print_node_pathname(handle, NULL); + printk("\n"); goto exit; } @@ -122,7 +120,6 @@ 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; @@ -134,11 +131,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: %s\n", - __func__, status, (char *)name_buffer.pointer); - kfree(name_buffer.pointer); + "acpi_get_vendor_resource() failed (0x%x) for: ", + __func__, status); + acpi_ns_print_node_pathname(handle, NULL); + printk("\n"); return NULL; } resource = buffer.pointer; @@ -171,7 +168,6 @@ 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; @@ -186,11 +182,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: %s\n", - __func__, status, (char *)name_buffer.pointer); - kfree(name_buffer.pointer); + "%s: acpi_get_vendor_resource() failed (0x%x) for: ", + __func__, status); + acpi_ns_print_node_pathname(handle, NULL); + printk("\n"); return 1; } @@ -198,12 +194,11 @@ 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: %s\n", - __func__, vendor->byte_length, - (char *)name_buffer.pointer); - kfree(name_buffer.pointer); + "%s: Invalid vendor data length: %d for: ", + __func__, vendor->byte_length); + acpi_ns_print_node_pathname(handle, NULL); + printk("\n"); ret = 1; goto exit; } @@ -244,9 +239,6 @@ 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 @@ -257,8 +249,9 @@ 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: %s\n", __func__, status, - (char *)name_buffer.pointer); + "(0x%x) for: ", __func__, status); + acpi_ns_print_node_pathname(child, NULL); + printk("\n"); panic("%s: Unable to find host devfn\n", __func__); } if (parent == rootbus_handle) @@ -266,20 +259,22 @@ 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: %s\n", - __func__, (char *)name_buffer.pointer); + printk(KERN_ERR "%s: Unable to find root bus for: ", + __func__); + acpi_ns_print_node_pathname(device_handle, NULL); + printk("\n"); 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: %s\n", - __func__, status, (char *)name_buffer.pointer); + printk(KERN_ERR "%s: Unable to get _ADR (0x%x) for: ", + __func__, status); + acpi_ns_print_node_pathname(child, NULL); + printk("\n"); 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); @@ -305,28 +300,27 @@ 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: %s\n", - __func__, status, (char *)name_buffer.pointer); - kfree(name_buffer.pointer); + "%s: acpi_get_parent() failed (0x%x) for: ", + __func__, status); + acpi_ns_print_node_pathname(handle, NULL); + printk("\n"); 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: %s\n", - __func__, (char *)name_buffer.pointer); - kfree(name_buffer.pointer); + "%s: Failed to find _BBN in parent of: ", + __func__); + acpi_ns_print_node_pathname(handle, NULL); + printk("\n"); return AE_OK; } @@ -356,27 +350,24 @@ 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: %s\n", - __func__, segment, pci_domain_nr(dev), - (char *)name_buffer.pointer); - kfree(name_buffer.pointer); + "%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"); return 1; } } else { - 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); + printk(KERN_ERR "%s: Unable to get __SEG from: ", + __func__); + acpi_ns_print_node_pathname(rootbus_handle, NULL); + printk("\n"); return 1; } diff --git a/trunk/arch/ia64/sn/kernel/io_common.c b/trunk/arch/ia64/sn/kernel/io_common.c index 0d4ffa4da1da..8a924a5661dd 100644 --- a/trunk/arch/ia64/sn/kernel/io_common.c +++ b/trunk/arch/ia64/sn/kernel/io_common.c @@ -26,6 +26,7 @@ #include #include #include +#include "acpi/acglobal.h" extern void sn_init_cpei_timer(void); extern void register_sn_procfs(void); @@ -472,7 +473,7 @@ sn_io_early_init(void) { struct acpi_table_header *header = NULL; - acpi_get_table(ACPI_SIG_DSDT, 1, &header); + acpi_get_table_by_index(ACPI_TABLE_INDEX_DSDT, &header); BUG_ON(header == NULL); sn_acpi_rev = header->oem_revision; } @@ -504,7 +505,7 @@ sn_io_early_init(void) { struct acpi_table_header *header; - (void)acpi_get_table(ACPI_SIG_DSDT, 1, &header); + (void)acpi_get_table_by_index(ACPI_TABLE_INDEX_DSDT, &header); printk(KERN_INFO "ACPI DSDT OEM Rev 0x%x\n", header->oem_revision); } diff --git a/trunk/arch/ia64/sn/kernel/irq.c b/trunk/arch/ia64/sn/kernel/irq.c index 0c66dbdd1d72..96c31b4180c3 100644 --- a/trunk/arch/ia64/sn/kernel/irq.c +++ b/trunk/arch/ia64/sn/kernel/irq.c @@ -5,7 +5,7 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. * - * Copyright (c) 2000-2008 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2007 Silicon Graphics, Inc. All Rights Reserved. */ #include @@ -375,7 +375,6 @@ void sn_irq_fixup(struct pci_dev *pci_dev, struct sn_irq_info *sn_irq_info) int cpu = nasid_slice_to_cpuid(nasid, slice); #ifdef CONFIG_SMP int cpuphys; - irq_desc_t *desc; #endif pci_dev_get(pci_dev); @@ -392,12 +391,6 @@ void sn_irq_fixup(struct pci_dev *pci_dev, struct sn_irq_info *sn_irq_info) #ifdef CONFIG_SMP cpuphys = cpu_physical_id(cpu); set_irq_affinity_info(sn_irq_info->irq_irq, cpuphys, 0); - desc = irq_to_desc(sn_irq_info->irq_irq); - /* - * Affinity was set by the PROM, prevent it from - * being reset by the request_irq() path. - */ - desc->status |= IRQ_AFFINITY_SET; #endif } diff --git a/trunk/arch/ia64/sn/kernel/setup.c b/trunk/arch/ia64/sn/kernel/setup.c index 02c5b8a9fb60..bb1d24929640 100644 --- a/trunk/arch/ia64/sn/kernel/setup.c +++ b/trunk/arch/ia64/sn/kernel/setup.c @@ -200,7 +200,7 @@ static int __cpuinitdata shub_1_1_found; * Set flag for enabling shub specific wars */ -static inline int __cpuinit is_shub_1_1(int nasid) +static inline int __init is_shub_1_1(int nasid) { unsigned long id; int rev; @@ -212,7 +212,7 @@ static inline int __cpuinit is_shub_1_1(int nasid) return rev <= 2; } -static void __cpuinit sn_check_for_wars(void) +static void __init sn_check_for_wars(void) { int cnode; @@ -512,6 +512,7 @@ static void __init sn_init_pdas(char **cmdline_p) for_each_online_node(cnode) { nodepdaindr[cnode] = alloc_bootmem_node(NODE_DATA(cnode), sizeof(nodepda_t)); + memset(nodepdaindr[cnode], 0, sizeof(nodepda_t)); memset(nodepdaindr[cnode]->phys_cpuid, -1, sizeof(nodepdaindr[cnode]->phys_cpuid)); spin_lock_init(&nodepdaindr[cnode]->ptc_lock); @@ -520,9 +521,11 @@ static void __init sn_init_pdas(char **cmdline_p) /* * Allocate & initialize nodepda for TIOs. For now, put them on node 0. */ - for (cnode = num_online_nodes(); cnode < num_cnodes; cnode++) + for (cnode = num_online_nodes(); cnode < num_cnodes; cnode++) { nodepdaindr[cnode] = alloc_bootmem_node(NODE_DATA(0), sizeof(nodepda_t)); + memset(nodepdaindr[cnode], 0, sizeof(nodepda_t)); + } /* * Now copy the array of nodepda pointers to each nodepda. diff --git a/trunk/arch/mips/Kconfig.debug b/trunk/arch/mips/Kconfig.debug index 364ca8938807..765c8e287d2b 100644 --- a/trunk/arch/mips/Kconfig.debug +++ b/trunk/arch/mips/Kconfig.debug @@ -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 - arch/mips/include/asm/debug.h for debugging macros. + include/asm-mips/debug.h for debuging macros. If unsure, say N. endmenu diff --git a/trunk/arch/mips/configs/ip32_defconfig b/trunk/arch/mips/configs/ip32_defconfig index de4c7a0a96dd..fe4699df9626 100644 --- a/trunk/arch/mips/configs/ip32_defconfig +++ b/trunk/arch/mips/configs/ip32_defconfig @@ -1,71 +1,71 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.28-rc7 -# Wed Dec 10 14:39:08 2008 +# Linux kernel version: 2.6.20 +# Tue Feb 20 21:47:33 2007 # CONFIG_MIPS=y # # Machine selection # -# CONFIG_MACH_ALCHEMY is not set +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_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_MACH_EMMA is not set -# CONFIG_MACH_VR41XX is not set -# CONFIG_NXP_STB220 is not set -# CONFIG_NXP_STB225 is not set +# CONFIG_MOMENCO_JAGUAR_ATX is not set +# CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_JBS is not set # CONFIG_PNX8550_STB810 is not set -# CONFIG_PMC_MSP is not set +# CONFIG_MACH_VR41XX 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_CRHINE is not set -# CONFIG_SIBYTE_CARMEL is not set -# CONFIG_SIBYTE_CRHONE is not set -# CONFIG_SIBYTE_RHONE is not set +# CONFIG_SIBYTE_BIGSUR 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_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_CRHONE is not set # CONFIG_SNI_RM 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_TOSHIBA_JMR3927 is not set +# CONFIG_TOSHIBA_RBTX4927 is not set +# CONFIG_TOSHIBA_RBTX4938 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,7 +75,6 @@ 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 @@ -88,7 +87,6 @@ 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 @@ -118,73 +116,65 @@ 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_PAGEFLAGS_EXTENDED=y +# CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 CONFIG_RESOURCES_64BIT=y -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_ZONE_DMA_FLAG=1 # CONFIG_HZ_48 is not set # CONFIG_HZ_100 is not set # CONFIG_HZ_128 is not set -CONFIG_HZ_250=y +# CONFIG_HZ_250 is not set # CONFIG_HZ_256 is not set -# CONFIG_HZ_1000 is not set +CONFIG_HZ_1000=y # CONFIG_HZ_1024 is not set CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=250 -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_HZ=1000 +# CONFIG_PREEMPT_NONE is not set +CONFIG_PREEMPT_VOLUNTARY=y # 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" # -# General setup +# Code maturity level options # 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=y +# CONFIG_POSIX_MQUEUE is not set CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set # CONFIG_TASKSTATS 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_UTS_NS is not set +# CONFIG_AUDIT is not set +# CONFIG_IKCONFIG is not set CONFIG_SYSFS_DEPRECATED=y -CONFIG_SYSFS_DEPRECATED_V2=y CONFIG_RELAY=y -# CONFIG_NAMESPACES is not set -# CONFIG_BLK_DEV_INITRD is not set -CONFIG_CC_OPTIMIZE_FOR_SIZE=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_SYSCTL=y CONFIG_EMBEDDED=y CONFIG_SYSCTL_SYSCALL=y @@ -194,43 +184,27 @@ 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_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_VM_EVENT_COUNTERS=y CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 -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_SLOB is not set + +# +# Loadable module support +# +# CONFIG_MODULES is not set + +# +# Block layer +# 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 @@ -239,50 +213,59 @@ CONFIG_IOSCHED_NOOP=y CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_AS is not set +CONFIG_DEFAULT_AS=y # CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_CFQ is not set # CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" -CONFIG_CLASSIC_RCU=y -# CONFIG_FREEZER is not set +CONFIG_DEFAULT_IOSCHED="anticipatory" # # 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=y +# CONFIG_MIPS32_N32 is not set CONFIG_BINFMT_ELF32=y # # Power management options # -CONFIG_ARCH_SUSPEND_POSSIBLE=y -# CONFIG_PM is not set +CONFIG_PM=y +# CONFIG_PM_LEGACY is not set +# CONFIG_PM_DEBUG is not set +# CONFIG_PM_SYSFS_DEPRECATED is not set + +# +# Networking +# CONFIG_NET=y # # Networking options # +# CONFIG_NETDEBUG is not set CONFIG_PACKET=y CONFIG_PACKET_MMAP=y CONFIG_UNIX=y @@ -290,83 +273,56 @@ 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=y +# CONFIG_IP_MULTICAST is not set # CONFIG_IP_ADVANCED_ROUTER is not set CONFIG_IP_FIB_HASH=y CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y +# CONFIG_IP_PNP_DHCP is not set CONFIG_IP_PNP_BOOTP=y # CONFIG_IP_PNP_RARP 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_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set # CONFIG_ARPD is not set # CONFIG_SYN_COOKIES 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_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_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=y -CONFIG_TCP_CONG_BIC=m +# CONFIG_TCP_CONG_ADVANCED is not set 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=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_IPV6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL 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 @@ -376,6 +332,10 @@ 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 # @@ -383,14 +343,15 @@ 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_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 +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 # # Device Drivers @@ -399,40 +360,60 @@ CONFIG_NETWORK_SECMARK=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 -CONFIG_BLK_DEV=y + +# +# Plug and Play support +# +# CONFIG_PNPACPI is not set + +# +# Block devices +# # 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=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m +CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +# CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_RAM is not set -# 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_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_SGI_IOC4=y # CONFIG_TIFM_CORE is not set -# CONFIG_ENCLOSURE_SERVICES is not set -# CONFIG_HP_ILO is not set -# CONFIG_C2PORT is not set -CONFIG_HAVE_IDE=y + +# +# ATA/ATAPI/MFM/RLL support +# # CONFIG_IDE is not set # @@ -440,20 +421,19 @@ CONFIG_HAVE_IDE=y # CONFIG_RAID_ATTRS=y CONFIG_SCSI=y -CONFIG_SCSI_DMA=y CONFIG_SCSI_TGT=y -# CONFIG_SCSI_NETLINK is not set +CONFIG_SCSI_NETLINK=y CONFIG_SCSI_PROC_FS=y # # SCSI support type (disk, tape, CD-ROM) # CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set +CONFIG_CHR_DEV_ST=y +CONFIG_CHR_DEV_OSST=y CONFIG_BLK_DEV_SR=y CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m +CONFIG_CHR_DEV_SG=y # CONFIG_CHR_DEV_SCH is not set # @@ -463,36 +443,35 @@ 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 is not set +CONFIG_SCSI_FC_ATTRS=y # 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 -# CONFIG_SCSI_SRP_ATTRS is not set -CONFIG_SCSI_LOWLEVEL=y + +# +# SCSI low-level drivers +# # 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=32 +CONFIG_AIC7XXX_CMDS_PER_DEVICE=8 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 is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_SCSI_ADVANSYS is not set +CONFIG_SCSI_AIC94XX=y +# CONFIG_AIC94XX_DEBUG is not set # CONFIG_SCSI_ARCMSR is not set # CONFIG_MEGARAID_NEWGEN is not set # CONFIG_MEGARAID_LEGACY is not set @@ -503,7 +482,6 @@ CONFIG_AIC7XXX_REG_PRETTY_PRINT=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 @@ -514,81 +492,147 @@ CONFIG_AIC7XXX_REG_PRETTY_PRINT=y # CONFIG_SCSI_DC390T is not set # CONFIG_SCSI_DEBUG is not set # CONFIG_SCSI_SRP is not set -# CONFIG_SCSI_DH is not set + +# +# Serial ATA (prod) and Parallel ATA (experimental) drivers +# # 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 # -# Enable only one of the two stacks, unless you know what you are doing +# I2O device support # -# CONFIG_FIREWIRE is not set -# CONFIG_IEEE1394 is not set # CONFIG_I2O is not set + +# +# Network device support +# CONFIG_NETDEVICES=y -CONFIG_DUMMY=m -CONFIG_BONDING=m -# CONFIG_MACVLAN is not set +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set -# CONFIG_VETH is not set + +# +# ARCnet devices +# # CONFIG_ARCNET is not set -# CONFIG_PHYLIB 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_NET_ETHERNET=y -CONFIG_MII=y -# CONFIG_AX88796 is not set +# CONFIG_MII 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 -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 + +# +# Tulip family network device support +# +# CONFIG_NET_TULIP 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 -# CONFIG_B44 is not set -# CONFIG_ATL2 is not set -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 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_TR is not set # -# Wireless LAN +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces # -# 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 # @@ -596,7 +640,6 @@ CONFIG_TULIP_MMIO=y # CONFIG_INPUT=y # CONFIG_INPUT_FF_MEMLESS is not set -# CONFIG_INPUT_POLLDEV is not set # # Userland interfaces @@ -606,32 +649,16 @@ 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_EVDEV=m +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set # CONFIG_INPUT_EVBUG is not set # # Input Device Drivers # -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_KEYBOARD is not set +# CONFIG_INPUT_MOUSE 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 @@ -642,8 +669,8 @@ CONFIG_SERIO=y # CONFIG_SERIO_I8042 is not set CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_MACEPS2=y -CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_MACEPS2 is not set +# CONFIG_SERIO_LIBPS2 is not set CONFIG_SERIO_RAW=y # CONFIG_GAMEPORT is not set @@ -651,13 +678,10 @@ 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 is not set -CONFIG_DEVKMEM=y +CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set -# CONFIG_NOZOMI is not set # # Serial drivers @@ -678,304 +702,192 @@ 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 -CONFIG_HW_RANDOM=y + +# +# 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_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 # -# Watchdog Device Drivers +# I2C support # -# CONFIG_SOFT_WATCHDOG is not set -# CONFIG_ALIM7101_WDT is not set +# CONFIG_I2C is not set # -# PCI-based Watchdog Cards +# SPI support # -# CONFIG_PCIPCWATCHDOG is not set -# CONFIG_WDTPCI is not set -CONFIG_SSB_POSSIBLE=y +# CONFIG_SPI is not set +# CONFIG_SPI_MASTER is not set # -# Sonics Silicon Backplane +# Dallas's 1-wire bus # -# CONFIG_SSB is not set +# CONFIG_W1 is not set # -# Multifunction device drivers +# Hardware Monitoring support # -# 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 +# CONFIG_HWMON is not set +# CONFIG_HWMON_VID is not set # # Multimedia devices # +# CONFIG_VIDEO_DEV is not set # -# Multimedia core support +# Digital Video Broadcasting Devices # -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 +# CONFIG_DVB is not set # -# Multimedia drivers +# Graphics support # -# 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 +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB is not set # -# Graphics support +# Console display driver support # -# 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_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y # CONFIG_BACKLIGHT_LCD_SUPPORT is not set # -# Display device support +# Sound # -# CONFIG_DISPLAY_SUPPORT is not set +# CONFIG_SOUND is not set # -# Console display driver support +# HID Devices # -# 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 # -# Special HID drivers +# 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 # -CONFIG_HID_COMPAT=y -# CONFIG_USB_SUPPORT is not set -# CONFIG_UWB is not set # CONFIG_MMC is not set -# CONFIG_MEMSTICK is not set + +# +# LED devices +# # CONFIG_NEW_LEDS is not set -# CONFIG_ACCESSIBILITY is not set + +# +# LED drivers +# + +# +# LED Triggers +# + +# +# InfiniBand support +# # 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 # -# RTC interfaces +# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) # -# 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 # -# SPI RTC drivers +# Real Time Clock # +# CONFIG_RTC_CLASS is not set # -# Platform RTC drivers +# DMA Engine support # -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 +# CONFIG_DMA_ENGINE is not set # -# on-CPU RTC drivers +# DMA Clients +# + +# +# DMA Devices +# + +# +# Auxiliary Display support +# + +# +# Virtualization # -# 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=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y +# CONFIG_EXT2_FS_XATTR is not set # CONFIG_EXT2_FS_XIP 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_EXT3_FS is not set +# CONFIG_EXT4DEV_FS is not set # 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_DNOTIFY=y +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y CONFIG_INOTIFY_USER=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_QUOTA is not set +CONFIG_DNOTIFY=y +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +CONFIG_FUSE_FS=y CONFIG_GENERIC_ACL=y # # CD-ROM/DVD Filesystems # -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set # # DOS/FAT/NT Filesystems # -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_MSDOS_FS is not set +# CONFIG_VFAT_FS is not set # CONFIG_NTFS_FS is not set # @@ -984,11 +896,11 @@ 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=y # CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y CONFIG_CONFIGFS_FS=y # @@ -1004,42 +916,33 @@ 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 -CONFIG_NETWORK_FILESYSTEMS=y + +# +# Network File Systems +# 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=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_CIFS 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 @@ -1050,83 +953,45 @@ 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=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_MSDOS_PARTITION 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 -# 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 + +# +# 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 # # Kernel hacking # CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_PRINTK_TIME is not set -CONFIG_ENABLE_WARN_DEPRECATED=y CONFIG_ENABLE_MUST_CHECK=y -CONFIG_FRAME_WARN=2048 -CONFIG_MAGIC_SYSRQ=y +# CONFIG_MAGIC_SYSRQ is not set # 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_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_LOG_BUF_SHIFT=14 +CONFIG_CROSSCOMPILE=y CONFIG_CMDLINE="" # @@ -1135,99 +1000,51 @@ 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 # -# Crypto core or helper +# Cryptographic options # -# CONFIG_CRYPTO_FIPS is not set +CONFIG_CRYPTO=y 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 - -# -# Digest -# -CONFIG_CRYPTO_CRC32C=y +CONFIG_CRYPTO_NULL=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_TGR192=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_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_KHAZAD=y -# CONFIG_CRYPTO_SALSA20 is not set -# CONFIG_CRYPTO_SEED is not set -CONFIG_CRYPTO_SERPENT=y -CONFIG_CRYPTO_TEA=y +CONFIG_CRYPTO_BLOWFISH=y CONFIG_CRYPTO_TWOFISH=y CONFIG_CRYPTO_TWOFISH_COMMON=y - -# -# Compression -# +CONFIG_CRYPTO_SERPENT=y +CONFIG_CRYPTO_AES=y +CONFIG_CRYPTO_CAST5=y +CONFIG_CRYPTO_CAST6=y +CONFIG_CRYPTO_TEA=y +CONFIG_CRYPTO_ARC4=y +CONFIG_CRYPTO_KHAZAD=y +CONFIG_CRYPTO_ANUBIS=y CONFIG_CRYPTO_DEFLATE=y -# CONFIG_CRYPTO_LZO is not set +CONFIG_CRYPTO_MICHAEL_MIC=y +CONFIG_CRYPTO_CRC32C=y +CONFIG_CRYPTO_CAMELLIA=y # -# Random Number Generation +# Hardware crypto devices # -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRYPTO_HW=y -# CONFIG_CRYPTO_DEV_HIFN_795X is not set # # Library routines @@ -1235,15 +1052,10 @@ CONFIG_CRYPTO_HW=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 diff --git a/trunk/arch/mips/include/asm/asmmacro.h b/trunk/arch/mips/include/asm/asmmacro.h index 6c8342ae74db..7a881755800f 100644 --- a/trunk/arch/mips/include/asm/asmmacro.h +++ b/trunk/arch/mips/include/asm/asmmacro.h @@ -35,16 +35,6 @@ 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 diff --git a/trunk/arch/mips/include/asm/byteorder.h b/trunk/arch/mips/include/asm/byteorder.h index 33790b9e0cc0..2988d29a0867 100644 --- a/trunk/arch/mips/include/asm/byteorder.h +++ b/trunk/arch/mips/include/asm/byteorder.h @@ -50,8 +50,9 @@ 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" + " dsbh %0, %1 \n" + " dshd %0, %0 \n" + " drotr %0, %0, 32 \n" : "=r" (x) : "r" (x)); diff --git a/trunk/arch/mips/include/asm/elf.h b/trunk/arch/mips/include/asm/elf.h index d58f128aa747..a8eac1697b3d 100644 --- a/trunk/arch/mips/include/asm/elf.h +++ b/trunk/arch/mips/include/asm/elf.h @@ -232,7 +232,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; */ #ifdef __MIPSEB__ #define ELF_DATA ELFDATA2MSB -#elif defined(__MIPSEL__) +#elif __MIPSEL__ #define ELF_DATA ELFDATA2LSB #endif #define ELF_ARCH EM_MIPS diff --git a/trunk/arch/mips/include/asm/pci.h b/trunk/arch/mips/include/asm/pci.h index 053e4634acee..5510c53b7feb 100644 --- a/trunk/arch/mips/include/asm/pci.h +++ b/trunk/arch/mips/include/asm/pci.h @@ -79,11 +79,6 @@ static inline void pcibios_penalize_isa_irq(int irq, int active) /* We don't do dynamic PCI IRQ allocation */ } -#define HAVE_PCI_MMAP - -extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, - enum pci_mmap_state mmap_state, int write_combine); - /* * Dynamic DMA mapping stuff. * MIPS has everything mapped statically. diff --git a/trunk/arch/mips/mm/dma-default.c b/trunk/arch/mips/mm/dma-default.c index e6708b3ad343..5b98d0e731c2 100644 --- a/trunk/arch/mips/mm/dma-default.c +++ b/trunk/arch/mips/mm/dma-default.c @@ -111,7 +111,6 @@ 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)); } @@ -122,8 +121,6 @@ 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); diff --git a/trunk/arch/mips/pci/pci.c b/trunk/arch/mips/pci/pci.c index 62cae740e250..a377e9d2d029 100644 --- a/trunk/arch/mips/pci/pci.c +++ b/trunk/arch/mips/pci/pci.c @@ -354,30 +354,6 @@ EXPORT_SYMBOL(PCIBIOS_MIN_IO); EXPORT_SYMBOL(PCIBIOS_MIN_MEM); #endif -int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, - enum pci_mmap_state mmap_state, int write_combine) -{ - unsigned long prot; - - /* - * I/O space can be accessed via normal processor loads and stores on - * this platform but for now we elect not to do this and portable - * drivers should not do this anyway. - */ - if (mmap_state == pci_mmap_io) - return -EINVAL; - - /* - * Ignore write-combine; for now only return uncached mappings. - */ - prot = pgprot_val(vma->vm_page_prot); - prot = (prot & ~_CACHE_MASK) | _CACHE_UNCACHED; - vma->vm_page_prot = __pgprot(prot); - - return remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, - vma->vm_end - vma->vm_start, vma->vm_page_prot); -} - char * (*pcibios_plat_setup)(char *str) __devinitdata; char *__devinit pcibios_setup(char *str) diff --git a/trunk/arch/mn10300/kernel/entry.S b/trunk/arch/mn10300/kernel/entry.S index 62fba8aa9b6e..b7cbb1487af4 100644 --- a/trunk/arch/mn10300/kernel/entry.S +++ b/trunk/arch/mn10300/kernel/entry.S @@ -180,7 +180,6 @@ ENTRY(resume_userspace) #ifdef CONFIG_PREEMPT ENTRY(resume_kernel) - __cli mov (TI_preempt_count,a2),d0 # non-zero preempt_count ? cmp 0,d0 bne restore_all @@ -191,7 +190,7 @@ need_resched: mov (REG_EPSW,fp),d0 and EPSW_IM,d0 cmp EPSW_IM_7,d0 # interrupts off (exception path) ? - bne restore_all + beq restore_all call preempt_schedule_irq[],0 jmp need_resched #endif diff --git a/trunk/arch/mn10300/kernel/mn10300-serial.c b/trunk/arch/mn10300/kernel/mn10300-serial.c index 59b9c4bf9583..aa07d0cd1905 100644 --- a/trunk/arch/mn10300/kernel/mn10300-serial.c +++ b/trunk/arch/mn10300/kernel/mn10300-serial.c @@ -566,11 +566,6 @@ static void mn10300_serial_transmit_interrupt(struct mn10300_serial_port *port) { _enter("%s", port->name); - if (!port->uart.info || !port->uart.info->port.tty) { - mn10300_serial_dis_tx_intr(port); - return; - } - if (uart_tx_stopped(&port->uart) || uart_circ_empty(&port->uart.info->xmit)) mn10300_serial_dis_tx_intr(port); diff --git a/trunk/arch/mn10300/kernel/setup.c b/trunk/arch/mn10300/kernel/setup.c index e1d88ab51008..017121ce896f 100644 --- a/trunk/arch/mn10300/kernel/setup.c +++ b/trunk/arch/mn10300/kernel/setup.c @@ -161,7 +161,7 @@ void __init setup_arch(char **cmdline_p) reserve the page it is occupying. */ if (CONFIG_INTERRUPT_VECTOR_BASE >= CONFIG_KERNEL_RAM_BASE_ADDRESS && CONFIG_INTERRUPT_VECTOR_BASE < memory_end) - reserve_bootmem(CONFIG_INTERRUPT_VECTOR_BASE, PAGE_SIZE, + reserve_bootmem(CONFIG_INTERRUPT_VECTOR_BASE, 1, BOOTMEM_DEFAULT); reserve_bootmem(PAGE_ALIGN(PFN_PHYS(free_pfn)), bootmap_size, diff --git a/trunk/arch/mn10300/kernel/vmlinux.lds.S b/trunk/arch/mn10300/kernel/vmlinux.lds.S index b8259668f7dc..a3e80f444f55 100644 --- a/trunk/arch/mn10300/kernel/vmlinux.lds.S +++ b/trunk/arch/mn10300/kernel/vmlinux.lds.S @@ -11,7 +11,6 @@ #define __VMLINUX_LDS__ #include #include -#include OUTPUT_FORMAT("elf32-am33lin", "elf32-am33lin", "elf32-am33lin") OUTPUT_ARCH(mn10300) @@ -56,13 +55,13 @@ SECTIONS CONSTRUCTORS } - . = ALIGN(PAGE_SIZE); + . = ALIGN(4096); __nosave_begin = .; .data_nosave : { *(.data.nosave) } - . = ALIGN(PAGE_SIZE); + . = ALIGN(4096); __nosave_end = .; - . = ALIGN(PAGE_SIZE); + . = ALIGN(4096); .data.page_aligned : { *(.data.idt) } . = ALIGN(32); @@ -79,7 +78,7 @@ SECTIONS .data.init_task : { *(.data.init_task) } /* might get freed after init */ - . = ALIGN(PAGE_SIZE); + . = ALIGN(4096); .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) { __smp_locks = .; *(.smp_locks) @@ -87,7 +86,7 @@ SECTIONS } /* will be freed after init */ - . = ALIGN(PAGE_SIZE); /* Init code and data */ + . = ALIGN(4096); /* Init code and data */ __init_begin = .; .init.text : { _sinittext = .; @@ -121,14 +120,17 @@ SECTIONS .exit.data : { *(.exit.data) } #ifdef CONFIG_BLK_DEV_INITRD - . = ALIGN(PAGE_SIZE); + . = ALIGN(4096); __initramfs_start = .; .init.ramfs : { *(.init.ramfs) } __initramfs_end = .; #endif - PERCPU(32) - . = ALIGN(PAGE_SIZE); + . = ALIGN(32); + __per_cpu_start = .; + .data.percpu : { *(.data.percpu) } + __per_cpu_end = .; + . = ALIGN(4096); __init_end = .; /* freed after init ends here */ @@ -143,7 +145,7 @@ SECTIONS _end = . ; /* This is where the kernel creates the early boot page tables */ - . = ALIGN(PAGE_SIZE); + . = ALIGN(4096); pg0 = .; /* Sections to be discarded */ diff --git a/trunk/arch/parisc/include/asm/tlbflush.h b/trunk/arch/parisc/include/asm/tlbflush.h index 1f6fd4fc05b9..b72ec66db699 100644 --- a/trunk/arch/parisc/include/asm/tlbflush.h +++ b/trunk/arch/parisc/include/asm/tlbflush.h @@ -44,12 +44,9 @@ static inline void flush_tlb_mm(struct mm_struct *mm) { BUG_ON(mm == &init_mm); /* Should never happen */ -#if 1 || defined(CONFIG_SMP) +#ifdef 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); diff --git a/trunk/arch/powerpc/boot/Makefile b/trunk/arch/powerpc/boot/Makefile index 3d3daa674299..8fc6d72849ae 100644 --- a/trunk/arch/powerpc/boot/Makefile +++ b/trunk/arch/powerpc/boot/Makefile @@ -41,7 +41,6 @@ $(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 diff --git a/trunk/arch/powerpc/kernel/misc_32.S b/trunk/arch/powerpc/kernel/misc_32.S index 5c33bc14bd9f..bdc8b0e860e5 100644 --- a/trunk/arch/powerpc/kernel/misc_32.S +++ b/trunk/arch/powerpc/kernel/misc_32.S @@ -479,20 +479,17 @@ _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 - beq 1f + beqlr rlwinm r4,r4,0,1,31 mtspr SPRN_MAS1,r4 tlbwe msync isync -1: wrtee r10 blr #endif /* CONFIG_FSL_BOOKE */ diff --git a/trunk/arch/powerpc/lib/rheap.c b/trunk/arch/powerpc/lib/rheap.c index 45907c1dae66..29b2941cada0 100644 --- a/trunk/arch/powerpc/lib/rheap.c +++ b/trunk/arch/powerpc/lib/rheap.c @@ -556,7 +556,6 @@ 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) diff --git a/trunk/arch/powerpc/mm/hugetlbpage.c b/trunk/arch/powerpc/mm/hugetlbpage.c index f0c3b88d50fa..7bbf4e4ed430 100644 --- a/trunk/arch/powerpc/mm/hugetlbpage.c +++ b/trunk/arch/powerpc/mm/hugetlbpage.c @@ -507,9 +507,6 @@ 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); } diff --git a/trunk/arch/powerpc/mm/numa.c b/trunk/arch/powerpc/mm/numa.c index cf81049e1e51..a8397bbad3d4 100644 --- a/trunk/arch/powerpc/mm/numa.c +++ b/trunk/arch/powerpc/mm/numa.c @@ -901,17 +901,10 @@ 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); - /* - * 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); - } + 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. @@ -936,6 +929,7 @@ 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; diff --git a/trunk/arch/powerpc/platforms/cell/axon_msi.c b/trunk/arch/powerpc/platforms/cell/axon_msi.c index 0ce45c2b42f8..442cf36aa172 100644 --- a/trunk/arch/powerpc/platforms/cell/axon_msi.c +++ b/trunk/arch/powerpc/platforms/cell/axon_msi.c @@ -413,9 +413,6 @@ 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; diff --git a/trunk/arch/sh/Kconfig b/trunk/arch/sh/Kconfig index 5c9cbfc14c4d..80119b3398e7 100644 --- a/trunk/arch/sh/Kconfig +++ b/trunk/arch/sh/Kconfig @@ -55,8 +55,6 @@ 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 diff --git a/trunk/arch/sparc/include/asm/ptrace_32.h b/trunk/arch/sparc/include/asm/ptrace_32.h index 4cef450167dd..d409c4f21a5c 100644 --- a/trunk/arch/sparc/include/asm/ptrace_32.h +++ b/trunk/arch/sparc/include/asm/ptrace_32.h @@ -62,8 +62,6 @@ struct sparc_stackf { #ifdef __KERNEL__ -#include - static inline bool pt_regs_is_syscall(struct pt_regs *regs) { return (regs->psr & PSR_SYSCALL); @@ -74,14 +72,6 @@ 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]) diff --git a/trunk/arch/sparc/include/asm/ptrace_64.h b/trunk/arch/sparc/include/asm/ptrace_64.h index cd6fbfc20435..84e969f06afe 100644 --- a/trunk/arch/sparc/include/asm/ptrace_64.h +++ b/trunk/arch/sparc/include/asm/ptrace_64.h @@ -114,7 +114,6 @@ struct sparc_trapf { #ifdef __KERNEL__ #include -#include static inline int pt_regs_trap_type(struct pt_regs *regs) { @@ -131,14 +130,6 @@ 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; diff --git a/trunk/arch/um/drivers/mconsole_kern.c b/trunk/arch/um/drivers/mconsole_kern.c index 8f44ebb0dec8..19d579d74d27 100644 --- a/trunk/arch/um/drivers/mconsole_kern.c +++ b/trunk/arch/um/drivers/mconsole_kern.c @@ -16,8 +16,6 @@ #include #include #include -#include -#include #include #include #include @@ -787,7 +785,7 @@ static int __init mconsole_init(void) /* long to avoid size mismatch warnings from gcc */ long sock; int err; - char file[UNIX_PATH_MAX]; + char file[256]; if (umid_file_name("mconsole", file, sizeof(file))) return -1; diff --git a/trunk/arch/x86/Kconfig.cpu b/trunk/arch/x86/Kconfig.cpu index 8e99073b9e0f..b815664fe370 100644 --- a/trunk/arch/x86/Kconfig.cpu +++ b/trunk/arch/x86/Kconfig.cpu @@ -520,7 +520,6 @@ 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. diff --git a/trunk/arch/x86/include/asm/vmi.h b/trunk/arch/x86/include/asm/vmi.h index 61e08c0a2907..b7c0dea119fe 100644 --- a/trunk/arch/x86/include/asm/vmi.h +++ b/trunk/arch/x86/include/asm/vmi.h @@ -223,15 +223,9 @@ 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); -#else -static inline void vmi_init(void) {} -static inline void vmi_activate(void) {} -static inline void vmi_bringup(void) {} -#endif +extern void vmi_apply_boot_page_allocations(void); /* State needed to start an application processor in an SMP system. */ struct vmi_ap_state { diff --git a/trunk/arch/x86/kernel/amd_iommu.c b/trunk/arch/x86/kernel/amd_iommu.c index 0a60d60ed036..a7b6dec6fc3f 100644 --- a/trunk/arch/x86/kernel/amd_iommu.c +++ b/trunk/arch/x86/kernel/amd_iommu.c @@ -235,9 +235,8 @@ 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)) - panic("AMD IOMMU: Completion wait loop failed\n"); - + if (unlikely((i == EXIT_LOOP_COUNT) && printk_ratelimit())) + printk(KERN_WARNING "AMD IOMMU: Completion wait loop failed\n"); out: spin_unlock_irqrestore(&iommu->lock, flags); diff --git a/trunk/arch/x86/kernel/amd_iommu_init.c b/trunk/arch/x86/kernel/amd_iommu_init.c index c6cc22815d35..30ae2701b3df 100644 --- a/trunk/arch/x86/kernel/amd_iommu_init.c +++ b/trunk/arch/x86/kernel/amd_iommu_init.c @@ -427,10 +427,6 @@ 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; @@ -1078,8 +1074,7 @@ 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 | __GFP_ZERO, + amd_iommu_rlookup_table = (void *)__get_free_pages(GFP_KERNEL, get_order(rlookup_table_size)); if (amd_iommu_rlookup_table == NULL) goto free; diff --git a/trunk/arch/x86/kernel/cpu/mcheck/mce_64.c b/trunk/arch/x86/kernel/cpu/mcheck/mce_64.c index 1c838032fd37..4b031a4ac856 100644 --- a/trunk/arch/x86/kernel/cpu/mcheck/mce_64.c +++ b/trunk/arch/x86/kernel/cpu/mcheck/mce_64.c @@ -510,9 +510,12 @@ 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; diff --git a/trunk/arch/x86/kernel/microcode_core.c b/trunk/arch/x86/kernel/microcode_core.c index c4b5b24e0217..82fb2809ce32 100644 --- a/trunk/arch/x86/kernel/microcode_core.c +++ b/trunk/arch/x86/kernel/microcode_core.c @@ -272,18 +272,13 @@ 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(µcode_mutex); microcode_ops->microcode_fini_cpu(cpu); uci->valid = 0; -} - -static void microcode_fini_cpu(int cpu) -{ - mutex_lock(µcode_mutex); - __microcode_fini_cpu(cpu); mutex_unlock(µcode_mutex); } @@ -311,16 +306,12 @@ 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); - printk(KERN_ERR "failed to collect_cpu_info for resuming cpu #%d\n", - cpu); + microcode_fini_cpu(cpu); return -1; } - 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); + if (memcmp(&nsig, &uci->cpu_sig, sizeof(nsig))) { + microcode_fini_cpu(cpu); /* Should we look for a new ucode here? */ return 1; } diff --git a/trunk/arch/x86/kernel/microcode_intel.c b/trunk/arch/x86/kernel/microcode_intel.c index a8e62792d171..622dc4a21784 100644 --- a/trunk/arch/x86/kernel/microcode_intel.c +++ b/trunk/arch/x86/kernel/microcode_intel.c @@ -155,7 +155,6 @@ 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)); @@ -175,16 +174,11 @@ 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(µcode_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(µcode_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); diff --git a/trunk/arch/x86/kernel/pci-gart_64.c b/trunk/arch/x86/kernel/pci-gart_64.c index a35eaa379ff6..ba7ad83e20a8 100644 --- a/trunk/arch/x86/kernel/pci-gart_64.c +++ b/trunk/arch/x86/kernel/pci-gart_64.c @@ -745,8 +745,10 @@ void __init gart_iommu_init(void) unsigned long scratch; long i; - if (cache_k8_northbridges() < 0 || num_k8_northbridges == 0) + if (cache_k8_northbridges() < 0 || num_k8_northbridges == 0) { + printk(KERN_INFO "PCI-GART: No AMD GART found.\n"); return; + } #ifndef CONFIG_AGP_AMD64 no_agp = 1; diff --git a/trunk/arch/x86/kernel/setup.c b/trunk/arch/x86/kernel/setup.c index bdec76e55594..9d5674f7b6cc 100644 --- a/trunk/arch/x86/kernel/setup.c +++ b/trunk/arch/x86/kernel/setup.c @@ -794,9 +794,6 @@ 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(); @@ -883,8 +880,13 @@ void __init setup_arch(char **cmdline_p) check_efer(); #endif - /* Must be before kernel pagetables are setup */ - vmi_activate(); +#if defined(CONFIG_VMI) && defined(CONFIG_X86_32) + /* + * Must be before kernel pagetables are setup + * or fixmap area is touched. + */ + vmi_init(); +#endif /* after early param, so could get panic from serial */ reserve_early_setup_data(); diff --git a/trunk/arch/x86/kernel/smpboot.c b/trunk/arch/x86/kernel/smpboot.c index f71f96fc9e62..7b1093397319 100644 --- a/trunk/arch/x86/kernel/smpboot.c +++ b/trunk/arch/x86/kernel/smpboot.c @@ -294,7 +294,9 @@ 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(); diff --git a/trunk/arch/x86/kernel/vmi_32.c b/trunk/arch/x86/kernel/vmi_32.c index 22fd6577156a..8b6c393ab9fd 100644 --- a/trunk/arch/x86/kernel/vmi_32.c +++ b/trunk/arch/x86/kernel/vmi_32.c @@ -960,6 +960,8 @@ static inline int __init activate_vmi(void) void __init vmi_init(void) { + unsigned long flags; + if (!vmi_rom) probe_vmi_rom(); else @@ -971,21 +973,13 @@ 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); } diff --git a/trunk/crypto/Kconfig b/trunk/crypto/Kconfig index dc20a34ba5ef..39dbd8e4dde1 100644 --- a/trunk/crypto/Kconfig +++ b/trunk/crypto/Kconfig @@ -31,63 +31,35 @@ config CRYPTO_FIPS config CRYPTO_ALGAPI tristate - select CRYPTO_ALGAPI2 help This option provides the API for cryptographic algorithms. -config CRYPTO_ALGAPI2 - tristate - config CRYPTO_AEAD tristate - select CRYPTO_AEAD2 select CRYPTO_ALGAPI -config CRYPTO_AEAD2 - tristate - select CRYPTO_ALGAPI2 - config CRYPTO_BLKCIPHER tristate - select CRYPTO_BLKCIPHER2 select CRYPTO_ALGAPI - -config CRYPTO_BLKCIPHER2 - tristate - select CRYPTO_ALGAPI2 - select CRYPTO_RNG2 + select CRYPTO_RNG config CRYPTO_HASH tristate - select CRYPTO_HASH2 select CRYPTO_ALGAPI -config CRYPTO_HASH2 - tristate - select CRYPTO_ALGAPI2 - config CRYPTO_RNG tristate - select CRYPTO_RNG2 select CRYPTO_ALGAPI -config CRYPTO_RNG2 - tristate - select CRYPTO_ALGAPI2 - config CRYPTO_MANAGER tristate "Cryptographic algorithm manager" - select CRYPTO_MANAGER2 + select CRYPTO_AEAD + select CRYPTO_HASH + select CRYPTO_BLKCIPHER help Create default cryptographic template instantiations such as cbc(aes). -config CRYPTO_MANAGER2 - def_tristate CRYPTO_MANAGER || (CRYPTO_MANAGER!=n && CRYPTO_ALGAPI=y) - select CRYPTO_AEAD2 - select CRYPTO_HASH2 - select CRYPTO_BLKCIPHER2 - config CRYPTO_GF128MUL tristate "GF(2^128) multiplication functions (EXPERIMENTAL)" depends on EXPERIMENTAL diff --git a/trunk/crypto/Makefile b/trunk/crypto/Makefile index cd4a4ed078ff..5862b807334e 100644 --- a/trunk/crypto/Makefile +++ b/trunk/crypto/Makefile @@ -9,24 +9,24 @@ obj-$(CONFIG_CRYPTO_FIPS) += fips.o crypto_algapi-$(CONFIG_PROC_FS) += proc.o crypto_algapi-objs := algapi.o scatterwalk.o $(crypto_algapi-y) -obj-$(CONFIG_CRYPTO_ALGAPI2) += crypto_algapi.o +obj-$(CONFIG_CRYPTO_ALGAPI) += crypto_algapi.o -obj-$(CONFIG_CRYPTO_AEAD2) += aead.o +obj-$(CONFIG_CRYPTO_AEAD) += aead.o crypto_blkcipher-objs := ablkcipher.o crypto_blkcipher-objs += blkcipher.o -obj-$(CONFIG_CRYPTO_BLKCIPHER2) += crypto_blkcipher.o -obj-$(CONFIG_CRYPTO_BLKCIPHER2) += chainiv.o -obj-$(CONFIG_CRYPTO_BLKCIPHER2) += eseqiv.o +obj-$(CONFIG_CRYPTO_BLKCIPHER) += crypto_blkcipher.o +obj-$(CONFIG_CRYPTO_BLKCIPHER) += chainiv.o +obj-$(CONFIG_CRYPTO_BLKCIPHER) += eseqiv.o obj-$(CONFIG_CRYPTO_SEQIV) += seqiv.o crypto_hash-objs := hash.o crypto_hash-objs += ahash.o -obj-$(CONFIG_CRYPTO_HASH2) += crypto_hash.o +obj-$(CONFIG_CRYPTO_HASH) += crypto_hash.o cryptomgr-objs := algboss.o testmgr.o -obj-$(CONFIG_CRYPTO_MANAGER2) += cryptomgr.o +obj-$(CONFIG_CRYPTO_MANAGER) += cryptomgr.o obj-$(CONFIG_CRYPTO_HMAC) += hmac.o obj-$(CONFIG_CRYPTO_XCBC) += xcbc.o obj-$(CONFIG_CRYPTO_NULL) += crypto_null.o @@ -73,8 +73,8 @@ obj-$(CONFIG_CRYPTO_MICHAEL_MIC) += michael_mic.o obj-$(CONFIG_CRYPTO_CRC32C) += crc32c.o obj-$(CONFIG_CRYPTO_AUTHENC) += authenc.o obj-$(CONFIG_CRYPTO_LZO) += lzo.o -obj-$(CONFIG_CRYPTO_RNG2) += rng.o -obj-$(CONFIG_CRYPTO_RNG2) += krng.o +obj-$(CONFIG_CRYPTO_RNG) += rng.o +obj-$(CONFIG_CRYPTO_RNG) += krng.o obj-$(CONFIG_CRYPTO_ANSI_CPRNG) += ansi_cprng.o obj-$(CONFIG_CRYPTO_TEST) += tcrypt.o diff --git a/trunk/crypto/async_tx/async_xor.c b/trunk/crypto/async_tx/async_xor.c index 595b78672b36..c029d3eb9ef0 100644 --- a/trunk/crypto/async_tx/async_xor.c +++ b/trunk/crypto/async_tx/async_xor.c @@ -53,17 +53,10 @@ do_async_xor(struct dma_chan *chan, struct page *dest, struct page **src_list, int xor_src_cnt; dma_addr_t dma_dest; - /* 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_dest = dma_map_page(dma->dev, dest, offset, len, DMA_FROM_DEVICE); + for (i = 0; i < src_cnt; i++) dma_src[i] = dma_map_page(dma->dev, src_list[i], offset, len, DMA_TO_DEVICE); - } while (src_cnt) { async_flags = flags; diff --git a/trunk/drivers/acpi/Makefile b/trunk/drivers/acpi/Makefile index 5d23c13ac7d4..3c0c93300f12 100644 --- a/trunk/drivers/acpi/Makefile +++ b/trunk/drivers/acpi/Makefile @@ -2,8 +2,15 @@ # Makefile for the Linux ACPI interpreter # -ccflags-y := -Os -ccflags-$(CONFIG_ACPI_DEBUG) += -DACPI_DEBUG_OUTPUT +export ACPI_CFLAGS + +ACPI_CFLAGS := -Os + +ifdef CONFIG_ACPI_DEBUG + ACPI_CFLAGS += -DACPI_DEBUG_OUTPUT +endif + +EXTRA_CFLAGS += $(ACPI_CFLAGS) # # ACPI Boot-Time Table Parsing @@ -15,13 +22,9 @@ obj-$(CONFIG_X86) += blacklist.o # ACPI Core Subsystem (Interpreter) # obj-y += osl.o utils.o reboot.o\ - acpica/ - -# sleep related files -obj-y += wakeup.o -obj-y += main.o -obj-$(CONFIG_ACPI_SLEEP) += proc.o - + dispatcher/ events/ executer/ hardware/ \ + namespace/ parser/ resources/ tables/ \ + utilities/ # # ACPI Bus and Device Drivers @@ -32,6 +35,7 @@ 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/trunk/drivers/acpi/acpica/Makefile b/trunk/drivers/acpi/acpica/Makefile deleted file mode 100644 index 3f23298ee3fd..000000000000 --- a/trunk/drivers/acpi/acpica/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -# -# 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/trunk/drivers/acpi/acpica/accommon.h b/trunk/drivers/acpi/acpica/accommon.h deleted file mode 100644 index 3b20786cbb0d..000000000000 --- a/trunk/drivers/acpi/acpica/accommon.h +++ /dev/null @@ -1,63 +0,0 @@ -/****************************************************************************** - * - * 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__ */ diff --git a/trunk/drivers/acpi/acpica/hwregs.c b/trunk/drivers/acpi/acpica/hwregs.c deleted file mode 100644 index 4dc43b018517..000000000000 --- a/trunk/drivers/acpi/acpica/hwregs.c +++ /dev/null @@ -1,353 +0,0 @@ - -/******************************************************************************* - * - * 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 -#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); -} diff --git a/trunk/drivers/acpi/bus.c b/trunk/drivers/acpi/bus.c index 765fd1c56cd6..7edf6d913c13 100644 --- a/trunk/drivers/acpi/bus.c +++ b/trunk/drivers/acpi/bus.c @@ -688,6 +688,14 @@ 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 */ diff --git a/trunk/drivers/acpi/cm_sbs.c b/trunk/drivers/acpi/cm_sbs.c index 332fe4b21708..307963bd1043 100644 --- a/trunk/drivers/acpi/cm_sbs.c +++ b/trunk/drivers/acpi/cm_sbs.c @@ -27,6 +27,9 @@ #include #include #include +#include +#include +#include ACPI_MODULE_NAME("cm_sbs"); #define ACPI_AC_CLASS "ac_adapter" diff --git a/trunk/drivers/acpi/debug.c b/trunk/drivers/acpi/debug.c index 20223cbd0d1c..c48396892008 100644 --- a/trunk/drivers/acpi/debug.c +++ b/trunk/drivers/acpi/debug.c @@ -9,6 +9,7 @@ #include #include #include +#include #define _COMPONENT ACPI_SYSTEM_COMPONENT ACPI_MODULE_NAME("debug"); diff --git a/trunk/drivers/acpi/dispatcher/Makefile b/trunk/drivers/acpi/dispatcher/Makefile new file mode 100644 index 000000000000..eb7e602a83cd --- /dev/null +++ b/trunk/drivers/acpi/dispatcher/Makefile @@ -0,0 +1,9 @@ +# +# 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) diff --git a/trunk/drivers/acpi/acpica/dsfield.c b/trunk/drivers/acpi/dispatcher/dsfield.c similarity index 99% rename from trunk/drivers/acpi/acpica/dsfield.c rename to trunk/drivers/acpi/dispatcher/dsfield.c index 53e27bc5a734..f988a5e7d2b4 100644 --- a/trunk/drivers/acpi/acpica/dsfield.c +++ b/trunk/drivers/acpi/dispatcher/dsfield.c @@ -42,12 +42,11 @@ */ #include -#include "accommon.h" -#include "amlcode.h" -#include "acdispat.h" -#include "acinterp.h" -#include "acnamesp.h" -#include "acparser.h" +#include +#include +#include +#include +#include #define _COMPONENT ACPI_DISPATCHER ACPI_MODULE_NAME("dsfield") diff --git a/trunk/drivers/acpi/acpica/dsinit.c b/trunk/drivers/acpi/dispatcher/dsinit.c similarity index 98% rename from trunk/drivers/acpi/acpica/dsinit.c rename to trunk/drivers/acpi/dispatcher/dsinit.c index eb144b13d8fa..949f7c75029e 100644 --- a/trunk/drivers/acpi/acpica/dsinit.c +++ b/trunk/drivers/acpi/dispatcher/dsinit.c @@ -42,10 +42,9 @@ */ #include -#include "accommon.h" -#include "acdispat.h" -#include "acnamesp.h" -#include "actables.h" +#include +#include +#include #define _COMPONENT ACPI_DISPATCHER ACPI_MODULE_NAME("dsinit") diff --git a/trunk/drivers/acpi/acpica/dsmethod.c b/trunk/drivers/acpi/dispatcher/dsmethod.c similarity index 98% rename from trunk/drivers/acpi/acpica/dsmethod.c rename to trunk/drivers/acpi/dispatcher/dsmethod.c index 14b8b8ed8023..279a5a60a0dd 100644 --- a/trunk/drivers/acpi/acpica/dsmethod.c +++ b/trunk/drivers/acpi/dispatcher/dsmethod.c @@ -42,14 +42,11 @@ */ #include -#include "accommon.h" -#include "amlcode.h" -#include "acdispat.h" -#include "acinterp.h" -#include "acnamesp.h" -#ifdef ACPI_DISASSEMBLER +#include +#include +#include +#include #include -#endif #define _COMPONENT ACPI_DISPATCHER ACPI_MODULE_NAME("dsmethod") @@ -415,9 +412,6 @@ 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); diff --git a/trunk/drivers/acpi/acpica/dsmthdat.c b/trunk/drivers/acpi/dispatcher/dsmthdat.c similarity index 99% rename from trunk/drivers/acpi/acpica/dsmthdat.c rename to trunk/drivers/acpi/dispatcher/dsmthdat.c index da0f5468184c..d03f81bd1bcb 100644 --- a/trunk/drivers/acpi/acpica/dsmthdat.c +++ b/trunk/drivers/acpi/dispatcher/dsmthdat.c @@ -42,10 +42,9 @@ */ #include -#include "accommon.h" -#include "acdispat.h" -#include "acnamesp.h" -#include "acinterp.h" +#include +#include +#include #define _COMPONENT ACPI_DISPATCHER ACPI_MODULE_NAME("dsmthdat") diff --git a/trunk/drivers/acpi/acpica/dsobject.c b/trunk/drivers/acpi/dispatcher/dsobject.c similarity index 99% rename from trunk/drivers/acpi/acpica/dsobject.c rename to trunk/drivers/acpi/dispatcher/dsobject.c index 15c628e6aa00..4f08e599d07e 100644 --- a/trunk/drivers/acpi/acpica/dsobject.c +++ b/trunk/drivers/acpi/dispatcher/dsobject.c @@ -42,12 +42,11 @@ */ #include -#include "accommon.h" -#include "acparser.h" -#include "amlcode.h" -#include "acdispat.h" -#include "acnamesp.h" -#include "acinterp.h" +#include +#include +#include +#include +#include #define _COMPONENT ACPI_DISPATCHER ACPI_MODULE_NAME("dsobject") diff --git a/trunk/drivers/acpi/acpica/dsopcode.c b/trunk/drivers/acpi/dispatcher/dsopcode.c similarity index 96% rename from trunk/drivers/acpi/acpica/dsopcode.c rename to trunk/drivers/acpi/dispatcher/dsopcode.c index 0c3b4dd60e8a..69fae5905bb8 100644 --- a/trunk/drivers/acpi/acpica/dsopcode.c +++ b/trunk/drivers/acpi/dispatcher/dsopcode.c @@ -43,14 +43,13 @@ */ #include -#include "accommon.h" -#include "acparser.h" -#include "amlcode.h" -#include "acdispat.h" -#include "acinterp.h" -#include "acnamesp.h" -#include "acevents.h" -#include "actables.h" +#include +#include +#include +#include +#include +#include +#include #define _COMPONENT ACPI_DISPATCHER ACPI_MODULE_NAME("dsopcode") @@ -1141,27 +1140,8 @@ 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_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: + case AML_WHILE_OP: /* * IF/WHILE: Create a new control state to manage these @@ -1263,36 +1243,13 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state, ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, "[WHILE_OP] Op=%p\n", op)); - control_state = walk_state->control_state; - if (control_state->common.value) { + if (walk_state->control_state->common.value) { - /* Predicate was true, the body of the loop was just executed */ + /* Predicate was true, go back and evaluate it again! */ - /* - * 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)); @@ -1300,6 +1257,9 @@ 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; diff --git a/trunk/drivers/acpi/acpica/dsutils.c b/trunk/drivers/acpi/dispatcher/dsutils.c similarity index 99% rename from trunk/drivers/acpi/acpica/dsutils.c rename to trunk/drivers/acpi/dispatcher/dsutils.c index dabc23a46176..b398982f0d8b 100644 --- a/trunk/drivers/acpi/acpica/dsutils.c +++ b/trunk/drivers/acpi/dispatcher/dsutils.c @@ -42,13 +42,12 @@ */ #include -#include "accommon.h" -#include "acparser.h" -#include "amlcode.h" -#include "acdispat.h" -#include "acinterp.h" -#include "acnamesp.h" -#include "acdebug.h" +#include +#include +#include +#include +#include +#include #define _COMPONENT ACPI_DISPATCHER ACPI_MODULE_NAME("dsutils") diff --git a/trunk/drivers/acpi/acpica/dswexec.c b/trunk/drivers/acpi/dispatcher/dswexec.c similarity index 99% rename from trunk/drivers/acpi/acpica/dswexec.c rename to trunk/drivers/acpi/dispatcher/dswexec.c index 350e6656bc89..396fe12078cd 100644 --- a/trunk/drivers/acpi/acpica/dswexec.c +++ b/trunk/drivers/acpi/dispatcher/dswexec.c @@ -43,13 +43,12 @@ */ #include -#include "accommon.h" -#include "acparser.h" -#include "amlcode.h" -#include "acdispat.h" -#include "acinterp.h" -#include "acnamesp.h" -#include "acdebug.h" +#include +#include +#include +#include +#include +#include #define _COMPONENT ACPI_DISPATCHER ACPI_MODULE_NAME("dswexec") diff --git a/trunk/drivers/acpi/acpica/dswload.c b/trunk/drivers/acpi/dispatcher/dswload.c similarity index 99% rename from trunk/drivers/acpi/acpica/dswload.c rename to trunk/drivers/acpi/dispatcher/dswload.c index 3023ceaa8d54..dff7a3e445a8 100644 --- a/trunk/drivers/acpi/acpica/dswload.c +++ b/trunk/drivers/acpi/dispatcher/dswload.c @@ -42,13 +42,12 @@ */ #include -#include "accommon.h" -#include "acparser.h" -#include "amlcode.h" -#include "acdispat.h" -#include "acinterp.h" -#include "acnamesp.h" -#include "acevents.h" +#include +#include +#include +#include +#include +#include #ifdef ACPI_ASL_COMPILER #include diff --git a/trunk/drivers/acpi/acpica/dswscope.c b/trunk/drivers/acpi/dispatcher/dswscope.c similarity index 99% rename from trunk/drivers/acpi/acpica/dswscope.c rename to trunk/drivers/acpi/dispatcher/dswscope.c index 908645e72f03..9e6073265873 100644 --- a/trunk/drivers/acpi/acpica/dswscope.c +++ b/trunk/drivers/acpi/dispatcher/dswscope.c @@ -42,8 +42,7 @@ */ #include -#include "accommon.h" -#include "acdispat.h" +#include #define _COMPONENT ACPI_DISPATCHER ACPI_MODULE_NAME("dswscope") diff --git a/trunk/drivers/acpi/acpica/dswstate.c b/trunk/drivers/acpi/dispatcher/dswstate.c similarity index 99% rename from trunk/drivers/acpi/acpica/dswstate.c rename to trunk/drivers/acpi/dispatcher/dswstate.c index 40f92bf7dce5..b00d4af791aa 100644 --- a/trunk/drivers/acpi/acpica/dswstate.c +++ b/trunk/drivers/acpi/dispatcher/dswstate.c @@ -42,10 +42,9 @@ */ #include -#include "accommon.h" -#include "acparser.h" -#include "acdispat.h" -#include "acnamesp.h" +#include +#include +#include #define _COMPONENT ACPI_DISPATCHER ACPI_MODULE_NAME("dswstate") diff --git a/trunk/drivers/acpi/ec.c b/trunk/drivers/acpi/ec.c index 3105e0410e9b..30f3ef236ecb 100644 --- a/trunk/drivers/acpi/ec.c +++ b/trunk/drivers/acpi/ec.c @@ -42,6 +42,7 @@ #include #include #include +#include #define ACPI_EC_CLASS "embedded_controller" #define ACPI_EC_DEVICE_NAME "Embedded Controller" @@ -755,15 +756,10 @@ static acpi_status acpi_ec_register_query_methods(acpi_handle handle, u32 level, void *context, void **return_value) { - char node_name[5]; - struct acpi_buffer buffer = { sizeof(node_name), node_name }; + struct acpi_namespace_node *node = handle; struct acpi_ec *ec = context; int value = 0; - acpi_status status; - - status = acpi_get_name(handle, ACPI_SINGLE_NAME, &buffer); - - if (ACPI_SUCCESS(status) && sscanf(node_name, "_Q%x", &value) == 1) { + if (sscanf(node->name.ascii, "_Q%x", &value) == 1) { acpi_ec_add_query_handler(ec, value, handle, NULL, NULL); } return AE_OK; diff --git a/trunk/drivers/acpi/events/Makefile b/trunk/drivers/acpi/events/Makefile new file mode 100644 index 000000000000..d29f2ee449cc --- /dev/null +++ b/trunk/drivers/acpi/events/Makefile @@ -0,0 +1,9 @@ +# +# 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/trunk/drivers/acpi/acpica/evevent.c b/trunk/drivers/acpi/events/evevent.c similarity index 96% rename from trunk/drivers/acpi/acpica/evevent.c rename to trunk/drivers/acpi/events/evevent.c index 803edd9e3f6a..c56c5c6ea77b 100644 --- a/trunk/drivers/acpi/acpica/evevent.c +++ b/trunk/drivers/acpi/events/evevent.c @@ -42,8 +42,7 @@ */ #include -#include "accommon.h" -#include "acevents.h" +#include #define _COMPONENT ACPI_EVENTS ACPI_MODULE_NAME("evevent") @@ -73,8 +72,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)) { @@ -193,8 +192,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; @@ -238,7 +237,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); @@ -292,8 +291,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]. diff --git a/trunk/drivers/acpi/acpica/evgpe.c b/trunk/drivers/acpi/events/evgpe.c similarity index 94% rename from trunk/drivers/acpi/acpica/evgpe.c rename to trunk/drivers/acpi/events/evgpe.c index f345ced36477..f45c74fe745e 100644 --- a/trunk/drivers/acpi/acpica/evgpe.c +++ b/trunk/drivers/acpi/events/evgpe.c @@ -42,9 +42,8 @@ */ #include -#include "accommon.h" -#include "acevents.h" -#include "acnamesp.h" +#include +#include #define _COMPONENT ACPI_EVENTS ACPI_MODULE_NAME("evgpe") @@ -126,7 +125,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, @@ -135,7 +134,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: @@ -296,7 +295,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 @@ -373,7 +372,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. * ******************************************************************************/ @@ -401,8 +400,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); @@ -411,8 +410,9 @@ 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,8 +423,10 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list) /* Read the Status Register */ status = - acpi_read(&status_reg, - &gpe_register_info->status_address); + acpi_hw_low_level_read(ACPI_GPE_REGISTER_WIDTH, + &status_reg, + &gpe_register_info-> + status_address); if (ACPI_FAILURE(status)) { goto unlock_and_exit; } @@ -432,8 +434,10 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list) /* Read the Enable Register */ status = - acpi_read(&enable_reg, - &gpe_register_info->enable_address); + acpi_hw_low_level_read(ACPI_GPE_REGISTER_WIDTH, + &enable_reg, + &gpe_register_info-> + enable_address); if (ACPI_FAILURE(status)) { goto unlock_and_exit; } @@ -523,8 +527,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)); @@ -535,8 +539,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 a - * race with ev_gpe_install_handler + * Must check for control method type dispatch one more + * time to avoid race with ev_gpe_install_handler */ if ((local_gpe_event_info.flags & ACPI_GPE_DISPATCH_MASK) == ACPI_GPE_DISPATCH_METHOD) { @@ -580,8 +584,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)) { @@ -620,7 +624,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) == @@ -646,8 +650,7 @@ 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. @@ -705,7 +708,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 ACPICA + * Disable the GPE. The GPE will remain disabled until the ACPI * Core Subsystem is restarted, or a handler is installed. */ status = acpi_ev_disable_gpe(gpe_event_info); diff --git a/trunk/drivers/acpi/acpica/evgpeblk.c b/trunk/drivers/acpi/events/evgpeblk.c similarity index 94% rename from trunk/drivers/acpi/acpica/evgpeblk.c rename to trunk/drivers/acpi/events/evgpeblk.c index 484cc0565d5b..73c058e2f5c2 100644 --- a/trunk/drivers/acpi/acpica/evgpeblk.c +++ b/trunk/drivers/acpi/events/evgpeblk.c @@ -42,9 +42,8 @@ */ #include -#include "accommon.h" -#include "acevents.h" -#include "acnamesp.h" +#include +#include #define _COMPONENT ACPI_EVENTS ACPI_MODULE_NAME("evgpeblk") @@ -125,7 +124,6 @@ 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 * @@ -133,8 +131,7 @@ 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, void *context) +acpi_status acpi_ev_walk_gpe_list(acpi_gpe_callback gpe_walk_callback) { struct acpi_gpe_block_info *gpe_block; struct acpi_gpe_xrupt_info *gpe_xrupt_info; @@ -157,13 +154,8 @@ acpi_ev_walk_gpe_list(acpi_gpe_callback gpe_walk_callback, void *context) /* One callback per GPE block */ - status = - gpe_walk_callback(gpe_xrupt_info, gpe_block, - context); + status = gpe_walk_callback(gpe_xrupt_info, gpe_block); if (ACPI_FAILURE(status)) { - if (status == AE_CTRL_END) { /* Callback abort */ - status = AE_OK; - } goto unlock_and_exit; } @@ -194,8 +186,7 @@ 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, - void *context) + struct acpi_gpe_block_info *gpe_block) { struct acpi_gpe_event_info *gpe_event_info; u32 i; @@ -318,17 +309,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]; @@ -403,8 +394,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]; @@ -443,7 +434,7 @@ acpi_ev_match_prw_and_gpe(acpi_handle obj_handle, /* * Is this GPE within this block? * - * TRUE if and only if these conditions are true: + * TRUE iff 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. @@ -466,7 +457,6 @@ 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); @@ -486,9 +476,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. * ******************************************************************************/ @@ -618,9 +608,8 @@ 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 * @@ -677,7 +666,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 * @@ -699,8 +688,7 @@ 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, NULL); + status = acpi_hw_disable_gpe_block(gpe_block->xrupt_block, gpe_block); if (!gpe_block->previous && !gpe_block->next) { @@ -727,9 +715,6 @@ 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); @@ -801,9 +786,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; @@ -831,8 +816,10 @@ 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 = 0; - this_register->enable_address.bit_offset = 0; + this_register->status_address.bit_offset = + ACPI_GPE_REGISTER_WIDTH; + this_register->enable_address.bit_offset = + ACPI_GPE_REGISTER_WIDTH; /* Init the event_info for each GPE within this register */ @@ -845,14 +832,18 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block) /* Disable all GPEs within this register */ - status = acpi_write(0x00, &this_register->enable_address); + status = acpi_hw_low_level_write(ACPI_GPE_REGISTER_WIDTH, 0x00, + &this_register-> + enable_address); if (ACPI_FAILURE(status)) { goto error_exit; } /* Clear any pending GPE events within this register */ - status = acpi_write(0xFF, &this_register->status_address); + status = acpi_hw_low_level_write(ACPI_GPE_REGISTER_WIDTH, 0xFF, + &this_register-> + status_address); if (ACPI_FAILURE(status)) { goto error_exit; } @@ -965,9 +956,6 @@ 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); } @@ -1067,7 +1055,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, NULL); + status = acpi_hw_enable_runtime_gpe_block(NULL, gpe_block); if (ACPI_FAILURE(status)) { ACPI_ERROR((AE_INFO, "Could not enable GPEs in GpeBlock %p", gpe_block)); diff --git a/trunk/drivers/acpi/acpica/evmisc.c b/trunk/drivers/acpi/events/evmisc.c similarity index 93% rename from trunk/drivers/acpi/acpica/evmisc.c rename to trunk/drivers/acpi/events/evmisc.c index 5f893057bcc6..1d5670be729a 100644 --- a/trunk/drivers/acpi/acpica/evmisc.c +++ b/trunk/drivers/acpi/events/evmisc.c @@ -42,15 +42,18 @@ */ #include -#include "accommon.h" -#include "acevents.h" -#include "acnamesp.h" -#include "acinterp.h" +#include +#include +#include #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); @@ -149,9 +152,7 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node, break; default: - /* All other types are not supported */ - return (AE_TYPE); } } @@ -192,8 +193,9 @@ 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, @@ -227,8 +229,9 @@ 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) { @@ -296,7 +299,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(acpi_gbl_FACS, acquired); + ACPI_ACQUIRE_GLOBAL_LOCK(facs, acquired); if (acquired) { /* Got the lock, now wake all threads waiting for it */ @@ -333,27 +336,34 @@ acpi_status acpi_ev_init_global_lock_handler(void) ACPI_FUNCTION_TRACE(ev_init_global_lock_handler); - /* Attempt installation of the 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); + } + 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; - return_ACPI_STATUS(AE_OK); + status = AE_OK; } - acpi_gbl_global_lock_present = TRUE; return_ACPI_STATUS(status); } @@ -452,8 +462,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; @@ -462,7 +472,7 @@ acpi_status acpi_ev_acquire_global_lock(u16 timeout) /* Attempt to acquire the actual hardware lock */ - ACPI_ACQUIRE_GLOBAL_LOCK(acpi_gbl_FACS, acquired); + ACPI_ACQUIRE_GLOBAL_LOCK(facs, acquired); if (acquired) { /* We got the lock */ @@ -526,7 +536,7 @@ acpi_status acpi_ev_release_global_lock(void) /* Allow any thread to release the lock */ - ACPI_RELEASE_GLOBAL_LOCK(acpi_gbl_FACS, pending); + ACPI_RELEASE_GLOBAL_LOCK(facs, pending); /* * If the pending bit was set, we must write GBL_RLS to the control @@ -572,8 +582,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 */ @@ -589,7 +599,7 @@ void acpi_ev_terminate(void) /* Disable all GPEs in all GPE blocks */ - status = acpi_ev_walk_gpe_list(acpi_hw_disable_gpe_block, NULL); + status = acpi_ev_walk_gpe_list(acpi_hw_disable_gpe_block); /* Remove SCI handler */ @@ -607,7 +617,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, NULL); + status = acpi_ev_walk_gpe_list(acpi_ev_delete_gpe_handlers); /* Return to original mode if necessary */ diff --git a/trunk/drivers/acpi/acpica/evregion.c b/trunk/drivers/acpi/events/evregion.c similarity index 91% rename from trunk/drivers/acpi/acpica/evregion.c rename to trunk/drivers/acpi/events/evregion.c index 665c0887ab4d..236fbd1ca438 100644 --- a/trunk/drivers/acpi/acpica/evregion.c +++ b/trunk/drivers/acpi/events/evregion.c @@ -42,15 +42,22 @@ */ #include -#include "accommon.h" -#include "acevents.h" -#include "acnamesp.h" -#include "acinterp.h" +#include +#include +#include #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); @@ -59,17 +66,6 @@ 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 @@ -95,19 +91,18 @@ 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). @@ -165,11 +160,12 @@ acpi_status acpi_ev_initialize_op_regions(void) return_ACPI_STATUS(status); } - /* Run the _REG methods for op_regions in each default address space */ - + /* + * Run the _REG methods for op_regions in each default address space + */ for (i = 0; i < ACPI_NUM_DEFAULT_SPACES; i++) { - /* - * TBD: Make sure handler is the DEFAULT handler, otherwise + + /* 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, @@ -322,13 +318,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) { @@ -343,9 +339,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 (for example, the _REG method - * for this region) + * We must exit the interpreter because the region + * setup will potentially execute control methods + * (e.g., _REG method for this region) */ acpi_ex_exit_interpreter(); @@ -368,8 +364,9 @@ 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; @@ -524,8 +521,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; @@ -671,8 +668,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)) { @@ -713,9 +710,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); } @@ -726,8 +723,9 @@ 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); } @@ -735,14 +733,16 @@ 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,8 +786,9 @@ 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) && @@ -847,8 +848,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; @@ -863,8 +864,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 the - * PCI_Config space. + * handler twice. This can easily happen + * with PCI_Config space. */ status = AE_SAME_HANDLER; goto unlock_and_exit; @@ -924,8 +925,9 @@ 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); @@ -998,10 +1000,11 @@ 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, @@ -1039,8 +1042,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); @@ -1059,9 +1062,10 @@ 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); } diff --git a/trunk/drivers/acpi/acpica/evrgnini.c b/trunk/drivers/acpi/events/evrgnini.c similarity index 95% rename from trunk/drivers/acpi/acpica/evrgnini.c rename to trunk/drivers/acpi/events/evrgnini.c index f3f1fb45c3dc..6b94b38df07d 100644 --- a/trunk/drivers/acpi/acpica/evrgnini.c +++ b/trunk/drivers/acpi/events/evrgnini.c @@ -42,9 +42,8 @@ */ #include -#include "accommon.h" -#include "acevents.h" -#include "acnamesp.h" +#include +#include #define _COMPONENT ACPI_EVENTS ACPI_MODULE_NAME("evrgnini") @@ -234,9 +233,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 { @@ -273,8 +272,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.) @@ -290,16 +289,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)); @@ -383,8 +382,9 @@ 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,8 +394,10 @@ 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); @@ -514,9 +516,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 @@ -570,7 +572,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; @@ -668,8 +670,10 @@ 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); } diff --git a/trunk/drivers/acpi/acpica/evsci.c b/trunk/drivers/acpi/events/evsci.c similarity index 95% rename from trunk/drivers/acpi/acpica/evsci.c rename to trunk/drivers/acpi/events/evsci.c index 567b356c85af..2a8b77877610 100644 --- a/trunk/drivers/acpi/acpica/evsci.c +++ b/trunk/drivers/acpi/events/evsci.c @@ -43,8 +43,7 @@ */ #include -#include "accommon.h" -#include "acevents.h" +#include #define _COMPONENT ACPI_EVENTS ACPI_MODULE_NAME("evsci") @@ -116,8 +115,10 @@ 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); @@ -157,11 +158,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. * diff --git a/trunk/drivers/acpi/acpica/evxface.c b/trunk/drivers/acpi/events/evxface.c similarity index 99% rename from trunk/drivers/acpi/acpica/evxface.c rename to trunk/drivers/acpi/events/evxface.c index 3aca9010a11e..94a6efe020be 100644 --- a/trunk/drivers/acpi/acpica/evxface.c +++ b/trunk/drivers/acpi/events/evxface.c @@ -42,10 +42,9 @@ */ #include -#include "accommon.h" -#include "acnamesp.h" -#include "acevents.h" -#include "acinterp.h" +#include +#include +#include #define _COMPONENT ACPI_EVENTS ACPI_MODULE_NAME("evxface") @@ -268,7 +267,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 global handler can be regsitered (per notify type). */ if (device == ACPI_ROOT_OBJECT) { diff --git a/trunk/drivers/acpi/acpica/evxfevnt.c b/trunk/drivers/acpi/events/evxfevnt.c similarity index 81% rename from trunk/drivers/acpi/acpica/evxfevnt.c rename to trunk/drivers/acpi/events/evxfevnt.c index 35485e4b60a6..41554f736b68 100644 --- a/trunk/drivers/acpi/acpica/evxfevnt.c +++ b/trunk/drivers/acpi/events/evxfevnt.c @@ -42,19 +42,13 @@ */ #include -#include "accommon.h" -#include "acevents.h" -#include "acnamesp.h" -#include "actables.h" +#include +#include +#include #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 @@ -66,7 +60,6 @@ acpi_ev_get_gpe_device(struct acpi_gpe_xrupt_info *gpe_xrupt_info, * DESCRIPTION: Transfers the system into ACPI mode. * ******************************************************************************/ - acpi_status acpi_enable(void) { acpi_status status = AE_OK; @@ -168,8 +161,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]. @@ -350,8 +343,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]. @@ -403,8 +396,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]. @@ -724,148 +717,3 @@ 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); -} diff --git a/trunk/drivers/acpi/acpica/evxfregn.c b/trunk/drivers/acpi/events/evxfregn.c similarity index 99% rename from trunk/drivers/acpi/acpica/evxfregn.c rename to trunk/drivers/acpi/events/evxfregn.c index 479e7a3721be..e8750807e57d 100644 --- a/trunk/drivers/acpi/acpica/evxfregn.c +++ b/trunk/drivers/acpi/events/evxfregn.c @@ -43,9 +43,8 @@ */ #include -#include "accommon.h" -#include "acnamesp.h" -#include "acevents.h" +#include +#include #define _COMPONENT ACPI_EVENTS ACPI_MODULE_NAME("evxfregn") diff --git a/trunk/drivers/acpi/executer/Makefile b/trunk/drivers/acpi/executer/Makefile new file mode 100644 index 000000000000..e09998aa012f --- /dev/null +++ b/trunk/drivers/acpi/executer/Makefile @@ -0,0 +1,10 @@ +# +# 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/trunk/drivers/acpi/acpica/exconfig.c b/trunk/drivers/acpi/executer/exconfig.c similarity index 99% rename from trunk/drivers/acpi/acpica/exconfig.c rename to trunk/drivers/acpi/executer/exconfig.c index 932bbc26aa04..74da6fa52ef1 100644 --- a/trunk/drivers/acpi/acpica/exconfig.c +++ b/trunk/drivers/acpi/executer/exconfig.c @@ -42,11 +42,10 @@ */ #include -#include "accommon.h" -#include "acinterp.h" -#include "acnamesp.h" -#include "actables.h" -#include "acdispat.h" +#include +#include +#include +#include #define _COMPONENT ACPI_EXECUTER ACPI_MODULE_NAME("exconfig") diff --git a/trunk/drivers/acpi/acpica/exconvrt.c b/trunk/drivers/acpi/executer/exconvrt.c similarity index 99% rename from trunk/drivers/acpi/acpica/exconvrt.c rename to trunk/drivers/acpi/executer/exconvrt.c index 0be10188316e..1d1f35adddde 100644 --- a/trunk/drivers/acpi/acpica/exconvrt.c +++ b/trunk/drivers/acpi/executer/exconvrt.c @@ -42,9 +42,8 @@ */ #include -#include "accommon.h" -#include "acinterp.h" -#include "amlcode.h" +#include +#include #define _COMPONENT ACPI_EXECUTER ACPI_MODULE_NAME("exconvrt") diff --git a/trunk/drivers/acpi/acpica/excreate.c b/trunk/drivers/acpi/executer/excreate.c similarity index 99% rename from trunk/drivers/acpi/acpica/excreate.c rename to trunk/drivers/acpi/executer/excreate.c index a57ad2564ab0..ad09696d5069 100644 --- a/trunk/drivers/acpi/acpica/excreate.c +++ b/trunk/drivers/acpi/executer/excreate.c @@ -42,10 +42,9 @@ */ #include -#include "accommon.h" -#include "acinterp.h" -#include "amlcode.h" -#include "acnamesp.h" +#include +#include +#include #define _COMPONENT ACPI_EXECUTER ACPI_MODULE_NAME("excreate") diff --git a/trunk/drivers/acpi/acpica/exdump.c b/trunk/drivers/acpi/executer/exdump.c similarity index 99% rename from trunk/drivers/acpi/acpica/exdump.c rename to trunk/drivers/acpi/executer/exdump.c index aa313574b0df..d087a7d28aa5 100644 --- a/trunk/drivers/acpi/acpica/exdump.c +++ b/trunk/drivers/acpi/executer/exdump.c @@ -42,10 +42,9 @@ */ #include -#include "accommon.h" -#include "acinterp.h" -#include "amlcode.h" -#include "acnamesp.h" +#include +#include +#include #define _COMPONENT ACPI_EXECUTER ACPI_MODULE_NAME("exdump") diff --git a/trunk/drivers/acpi/acpica/exfield.c b/trunk/drivers/acpi/executer/exfield.c similarity index 99% rename from trunk/drivers/acpi/acpica/exfield.c rename to trunk/drivers/acpi/executer/exfield.c index a352d0233857..3e440d84226a 100644 --- a/trunk/drivers/acpi/acpica/exfield.c +++ b/trunk/drivers/acpi/executer/exfield.c @@ -42,9 +42,8 @@ */ #include -#include "accommon.h" -#include "acdispat.h" -#include "acinterp.h" +#include +#include #define _COMPONENT ACPI_EXECUTER ACPI_MODULE_NAME("exfield") diff --git a/trunk/drivers/acpi/acpica/exfldio.c b/trunk/drivers/acpi/executer/exfldio.c similarity index 98% rename from trunk/drivers/acpi/acpica/exfldio.c rename to trunk/drivers/acpi/executer/exfldio.c index ef58ac4e687b..9ff9d1f4615d 100644 --- a/trunk/drivers/acpi/acpica/exfldio.c +++ b/trunk/drivers/acpi/executer/exfldio.c @@ -42,11 +42,10 @@ */ #include -#include "accommon.h" -#include "acinterp.h" -#include "amlcode.h" -#include "acevents.h" -#include "acdispat.h" +#include +#include +#include +#include #define _COMPONENT ACPI_EXECUTER ACPI_MODULE_NAME("exfldio") @@ -499,13 +498,14 @@ 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,10 +513,6 @@ 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, diff --git a/trunk/drivers/acpi/acpica/exmisc.c b/trunk/drivers/acpi/executer/exmisc.c similarity index 99% rename from trunk/drivers/acpi/acpica/exmisc.c rename to trunk/drivers/acpi/executer/exmisc.c index 6b0747ac683b..efb191340059 100644 --- a/trunk/drivers/acpi/acpica/exmisc.c +++ b/trunk/drivers/acpi/executer/exmisc.c @@ -43,10 +43,9 @@ */ #include -#include "accommon.h" -#include "acinterp.h" -#include "amlcode.h" -#include "amlresrc.h" +#include +#include +#include #define _COMPONENT ACPI_EXECUTER ACPI_MODULE_NAME("exmisc") diff --git a/trunk/drivers/acpi/acpica/exmutex.c b/trunk/drivers/acpi/executer/exmutex.c similarity index 99% rename from trunk/drivers/acpi/acpica/exmutex.c rename to trunk/drivers/acpi/executer/exmutex.c index d301c1f363ef..a8bf3d713e28 100644 --- a/trunk/drivers/acpi/acpica/exmutex.c +++ b/trunk/drivers/acpi/executer/exmutex.c @@ -43,9 +43,8 @@ */ #include -#include "accommon.h" -#include "acinterp.h" -#include "acevents.h" +#include +#include #define _COMPONENT ACPI_EXECUTER ACPI_MODULE_NAME("exmutex") diff --git a/trunk/drivers/acpi/acpica/exnames.c b/trunk/drivers/acpi/executer/exnames.c similarity index 99% rename from trunk/drivers/acpi/acpica/exnames.c rename to trunk/drivers/acpi/executer/exnames.c index ffdae122d94a..817e67be3697 100644 --- a/trunk/drivers/acpi/acpica/exnames.c +++ b/trunk/drivers/acpi/executer/exnames.c @@ -43,9 +43,8 @@ */ #include -#include "accommon.h" -#include "acinterp.h" -#include "amlcode.h" +#include +#include #define _COMPONENT ACPI_EXECUTER ACPI_MODULE_NAME("exnames") diff --git a/trunk/drivers/acpi/acpica/exoparg1.c b/trunk/drivers/acpi/executer/exoparg1.c similarity index 99% rename from trunk/drivers/acpi/acpica/exoparg1.c rename to trunk/drivers/acpi/executer/exoparg1.c index b530480cc7d5..f622f9eac8a1 100644 --- a/trunk/drivers/acpi/acpica/exoparg1.c +++ b/trunk/drivers/acpi/executer/exoparg1.c @@ -43,12 +43,11 @@ */ #include -#include "accommon.h" -#include "acparser.h" -#include "acdispat.h" -#include "acinterp.h" -#include "amlcode.h" -#include "acnamesp.h" +#include +#include +#include +#include +#include #define _COMPONENT ACPI_EXECUTER ACPI_MODULE_NAME("exoparg1") diff --git a/trunk/drivers/acpi/acpica/exoparg2.c b/trunk/drivers/acpi/executer/exoparg2.c similarity index 99% rename from trunk/drivers/acpi/acpica/exoparg2.c rename to trunk/drivers/acpi/executer/exoparg2.c index 0b4f513ca885..368def5dffce 100644 --- a/trunk/drivers/acpi/acpica/exoparg2.c +++ b/trunk/drivers/acpi/executer/exoparg2.c @@ -42,11 +42,10 @@ */ #include -#include "accommon.h" -#include "acparser.h" -#include "acinterp.h" -#include "acevents.h" -#include "amlcode.h" +#include +#include +#include +#include #define _COMPONENT ACPI_EXECUTER ACPI_MODULE_NAME("exoparg2") diff --git a/trunk/drivers/acpi/acpica/exoparg3.c b/trunk/drivers/acpi/executer/exoparg3.c similarity index 98% rename from trunk/drivers/acpi/acpica/exoparg3.c rename to trunk/drivers/acpi/executer/exoparg3.c index c6520bbf882b..9cb4197681af 100644 --- a/trunk/drivers/acpi/acpica/exoparg3.c +++ b/trunk/drivers/acpi/executer/exoparg3.c @@ -43,10 +43,9 @@ */ #include -#include "accommon.h" -#include "acinterp.h" -#include "acparser.h" -#include "amlcode.h" +#include +#include +#include #define _COMPONENT ACPI_EXECUTER ACPI_MODULE_NAME("exoparg3") diff --git a/trunk/drivers/acpi/acpica/exoparg6.c b/trunk/drivers/acpi/executer/exoparg6.c similarity index 99% rename from trunk/drivers/acpi/acpica/exoparg6.c rename to trunk/drivers/acpi/executer/exoparg6.c index ae43f7670a6c..67d48737af53 100644 --- a/trunk/drivers/acpi/acpica/exoparg6.c +++ b/trunk/drivers/acpi/executer/exoparg6.c @@ -43,10 +43,9 @@ */ #include -#include "accommon.h" -#include "acinterp.h" -#include "acparser.h" -#include "amlcode.h" +#include +#include +#include #define _COMPONENT ACPI_EXECUTER ACPI_MODULE_NAME("exoparg6") diff --git a/trunk/drivers/acpi/acpica/exprep.c b/trunk/drivers/acpi/executer/exprep.c similarity index 99% rename from trunk/drivers/acpi/acpica/exprep.c rename to trunk/drivers/acpi/executer/exprep.c index 33c66eb3ae39..5d438c32989d 100644 --- a/trunk/drivers/acpi/acpica/exprep.c +++ b/trunk/drivers/acpi/executer/exprep.c @@ -43,10 +43,9 @@ */ #include -#include "accommon.h" -#include "acinterp.h" -#include "amlcode.h" -#include "acnamesp.h" +#include +#include +#include #define _COMPONENT ACPI_EXECUTER ACPI_MODULE_NAME("exprep") diff --git a/trunk/drivers/acpi/acpica/exregion.c b/trunk/drivers/acpi/executer/exregion.c similarity index 99% rename from trunk/drivers/acpi/acpica/exregion.c rename to trunk/drivers/acpi/executer/exregion.c index 76ec8ff903b8..7a41c409ae4d 100644 --- a/trunk/drivers/acpi/acpica/exregion.c +++ b/trunk/drivers/acpi/executer/exregion.c @@ -43,8 +43,7 @@ */ #include -#include "accommon.h" -#include "acinterp.h" +#include #define _COMPONENT ACPI_EXECUTER ACPI_MODULE_NAME("exregion") diff --git a/trunk/drivers/acpi/acpica/exresnte.c b/trunk/drivers/acpi/executer/exresnte.c similarity index 98% rename from trunk/drivers/acpi/acpica/exresnte.c rename to trunk/drivers/acpi/executer/exresnte.c index a063a74006f6..423ad3635f3d 100644 --- a/trunk/drivers/acpi/acpica/exresnte.c +++ b/trunk/drivers/acpi/executer/exresnte.c @@ -43,10 +43,9 @@ */ #include -#include "accommon.h" -#include "acdispat.h" -#include "acinterp.h" -#include "acnamesp.h" +#include +#include +#include #define _COMPONENT ACPI_EXECUTER ACPI_MODULE_NAME("exresnte") diff --git a/trunk/drivers/acpi/acpica/exresolv.c b/trunk/drivers/acpi/executer/exresolv.c similarity index 99% rename from trunk/drivers/acpi/acpica/exresolv.c rename to trunk/drivers/acpi/executer/exresolv.c index 3673d2b2c4ac..89571b92a522 100644 --- a/trunk/drivers/acpi/acpica/exresolv.c +++ b/trunk/drivers/acpi/executer/exresolv.c @@ -43,11 +43,10 @@ */ #include -#include "accommon.h" -#include "amlcode.h" -#include "acdispat.h" -#include "acinterp.h" -#include "acnamesp.h" +#include +#include +#include +#include #define _COMPONENT ACPI_EXECUTER ACPI_MODULE_NAME("exresolv") diff --git a/trunk/drivers/acpi/acpica/exresop.c b/trunk/drivers/acpi/executer/exresop.c similarity index 99% rename from trunk/drivers/acpi/acpica/exresop.c rename to trunk/drivers/acpi/executer/exresop.c index 3c3802764bfb..0bb82593da72 100644 --- a/trunk/drivers/acpi/acpica/exresop.c +++ b/trunk/drivers/acpi/executer/exresop.c @@ -43,11 +43,10 @@ */ #include -#include "accommon.h" -#include "amlcode.h" -#include "acparser.h" -#include "acinterp.h" -#include "acnamesp.h" +#include +#include +#include +#include #define _COMPONENT ACPI_EXECUTER ACPI_MODULE_NAME("exresop") diff --git a/trunk/drivers/acpi/acpica/exstore.c b/trunk/drivers/acpi/executer/exstore.c similarity index 99% rename from trunk/drivers/acpi/acpica/exstore.c rename to trunk/drivers/acpi/executer/exstore.c index 7c6d7e53e41e..3318df4cbd98 100644 --- a/trunk/drivers/acpi/acpica/exstore.c +++ b/trunk/drivers/acpi/executer/exstore.c @@ -43,11 +43,10 @@ */ #include -#include "accommon.h" -#include "acdispat.h" -#include "acinterp.h" -#include "amlcode.h" -#include "acnamesp.h" +#include +#include +#include +#include #define _COMPONENT ACPI_EXECUTER ACPI_MODULE_NAME("exstore") diff --git a/trunk/drivers/acpi/acpica/exstoren.c b/trunk/drivers/acpi/executer/exstoren.c similarity index 99% rename from trunk/drivers/acpi/acpica/exstoren.c rename to trunk/drivers/acpi/executer/exstoren.c index 145d15305f70..eef61a00803e 100644 --- a/trunk/drivers/acpi/acpica/exstoren.c +++ b/trunk/drivers/acpi/executer/exstoren.c @@ -44,9 +44,8 @@ */ #include -#include "accommon.h" -#include "acinterp.h" -#include "amlcode.h" +#include +#include #define _COMPONENT ACPI_EXECUTER ACPI_MODULE_NAME("exstoren") diff --git a/trunk/drivers/acpi/acpica/exstorob.c b/trunk/drivers/acpi/executer/exstorob.c similarity index 99% rename from trunk/drivers/acpi/acpica/exstorob.c rename to trunk/drivers/acpi/executer/exstorob.c index 67340cc70142..9a75ff09fb0c 100644 --- a/trunk/drivers/acpi/acpica/exstorob.c +++ b/trunk/drivers/acpi/executer/exstorob.c @@ -43,8 +43,7 @@ */ #include -#include "accommon.h" -#include "acinterp.h" +#include #define _COMPONENT ACPI_EXECUTER ACPI_MODULE_NAME("exstorob") diff --git a/trunk/drivers/acpi/acpica/exsystem.c b/trunk/drivers/acpi/executer/exsystem.c similarity index 99% rename from trunk/drivers/acpi/acpica/exsystem.c rename to trunk/drivers/acpi/executer/exsystem.c index 3d00b9357233..68990f1df371 100644 --- a/trunk/drivers/acpi/acpica/exsystem.c +++ b/trunk/drivers/acpi/executer/exsystem.c @@ -43,8 +43,7 @@ */ #include -#include "accommon.h" -#include "acinterp.h" +#include #define _COMPONENT ACPI_EXECUTER ACPI_MODULE_NAME("exsystem") diff --git a/trunk/drivers/acpi/acpica/exutils.c b/trunk/drivers/acpi/executer/exutils.c similarity index 99% rename from trunk/drivers/acpi/acpica/exutils.c rename to trunk/drivers/acpi/executer/exutils.c index 32b85d68e756..86c03880b523 100644 --- a/trunk/drivers/acpi/acpica/exutils.c +++ b/trunk/drivers/acpi/executer/exutils.c @@ -59,9 +59,8 @@ #define DEFINE_AML_GLOBALS #include -#include "accommon.h" -#include "acinterp.h" -#include "amlcode.h" +#include +#include #define _COMPONENT ACPI_EXECUTER ACPI_MODULE_NAME("exutils") diff --git a/trunk/drivers/acpi/hardware/Makefile b/trunk/drivers/acpi/hardware/Makefile new file mode 100644 index 000000000000..438ad373b9ad --- /dev/null +++ b/trunk/drivers/acpi/hardware/Makefile @@ -0,0 +1,9 @@ +# +# 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) diff --git a/trunk/drivers/acpi/acpica/hwacpi.c b/trunk/drivers/acpi/hardware/hwacpi.c similarity index 99% rename from trunk/drivers/acpi/acpica/hwacpi.c rename to trunk/drivers/acpi/hardware/hwacpi.c index a9d4fea4167f..816894ea839e 100644 --- a/trunk/drivers/acpi/acpica/hwacpi.c +++ b/trunk/drivers/acpi/hardware/hwacpi.c @@ -43,7 +43,6 @@ */ #include -#include "accommon.h" #define _COMPONENT ACPI_HARDWARE ACPI_MODULE_NAME("hwacpi") diff --git a/trunk/drivers/acpi/acpica/hwgpe.c b/trunk/drivers/acpi/hardware/hwgpe.c similarity index 86% rename from trunk/drivers/acpi/acpica/hwgpe.c rename to trunk/drivers/acpi/hardware/hwgpe.c index 2013b66745d2..0b80db9d9197 100644 --- a/trunk/drivers/acpi/acpica/hwgpe.c +++ b/trunk/drivers/acpi/hardware/hwgpe.c @@ -43,8 +43,7 @@ */ #include -#include "accommon.h" -#include "acevents.h" +#include #define _COMPONENT ACPI_HARDWARE ACPI_MODULE_NAME("hwgpe") @@ -52,8 +51,7 @@ 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, - void *context); + struct acpi_gpe_block_info *gpe_block); /****************************************************************************** * @@ -82,7 +80,8 @@ 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_read(&enable_mask, &gpe_register_info->enable_address); + status = acpi_hw_low_level_read(ACPI_GPE_REGISTER_WIDTH, &enable_mask, + &gpe_register_info->enable_address); if (ACPI_FAILURE(status)) { return (status); } @@ -96,7 +95,9 @@ acpi_status acpi_hw_low_disable_gpe(struct acpi_gpe_event_info *gpe_event_info) /* Write the updated enable mask */ - status = acpi_write(enable_mask, &gpe_register_info->enable_address); + status = acpi_hw_low_level_write(ACPI_GPE_REGISTER_WIDTH, enable_mask, + &gpe_register_info->enable_address); + return (status); } @@ -131,8 +132,8 @@ acpi_hw_write_gpe_enable_reg(struct acpi_gpe_event_info * gpe_event_info) /* Write the entire GPE (runtime) enable register */ - status = acpi_write(gpe_register_info->enable_for_run, - &gpe_register_info->enable_address); + status = acpi_hw_low_level_write(8, gpe_register_info->enable_for_run, + &gpe_register_info->enable_address); return (status); } @@ -165,8 +166,9 @@ 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_write(register_bit, - &gpe_event_info->register_info->status_address); + status = acpi_hw_low_level_write(8, register_bit, + &gpe_event_info->register_info-> + status_address); return (status); } @@ -225,7 +227,9 @@ acpi_hw_get_gpe_status(struct acpi_gpe_event_info * gpe_event_info, /* GPE currently active (status bit == 1)? */ - status = acpi_read(&in_byte, &gpe_register_info->status_address); + status = + acpi_hw_low_level_read(8, &in_byte, + &gpe_register_info->status_address); if (ACPI_FAILURE(status)) { goto unlock_and_exit; } @@ -256,8 +260,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, void *context) +acpi_hw_disable_gpe_block(struct acpi_gpe_xrupt_info * gpe_xrupt_info, + struct acpi_gpe_block_info * gpe_block) { u32 i; acpi_status status; @@ -268,9 +272,9 @@ acpi_hw_disable_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, /* Disable all GPEs in this register */ - status = - acpi_write(0x00, - &gpe_block->register_info[i].enable_address); + status = acpi_hw_low_level_write(8, 0x00, + &gpe_block->register_info[i]. + enable_address); if (ACPI_FAILURE(status)) { return (status); } @@ -293,8 +297,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, void *context) +acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info * gpe_xrupt_info, + struct acpi_gpe_block_info * gpe_block) { u32 i; acpi_status status; @@ -305,9 +309,9 @@ acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, /* Clear status on all GPEs in this register */ - status = - acpi_write(0xFF, - &gpe_block->register_info[i].status_address); + status = acpi_hw_low_level_write(8, 0xFF, + &gpe_block->register_info[i]. + status_address); if (ACPI_FAILURE(status)) { return (status); } @@ -331,8 +335,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, void *context) +acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info * gpe_xrupt_info, + struct acpi_gpe_block_info * gpe_block) { u32 i; acpi_status status; @@ -348,9 +352,12 @@ acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, /* Enable all "runtime" GPEs in this register */ - status = acpi_write(gpe_block->register_info[i].enable_for_run, - &gpe_block->register_info[i]. - enable_address); + status = + acpi_hw_low_level_write(8, + gpe_block->register_info[i]. + enable_for_run, + &gpe_block->register_info[i]. + enable_address); if (ACPI_FAILURE(status)) { return (status); } @@ -375,8 +382,7 @@ 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, - void *context) + struct acpi_gpe_block_info *gpe_block) { u32 i; acpi_status status; @@ -390,9 +396,11 @@ acpi_hw_enable_wakeup_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, /* Enable all "wake" GPEs in this register */ - status = acpi_write(gpe_block->register_info[i].enable_for_wake, - &gpe_block->register_info[i]. - enable_address); + status = acpi_hw_low_level_write(8, + gpe_block->register_info[i]. + enable_for_wake, + &gpe_block->register_info[i]. + enable_address); if (ACPI_FAILURE(status)) { return (status); } @@ -419,8 +427,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, NULL); - status = acpi_ev_walk_gpe_list(acpi_hw_clear_gpe_block, NULL); + status = acpi_ev_walk_gpe_list(acpi_hw_disable_gpe_block); + status = acpi_ev_walk_gpe_list(acpi_hw_clear_gpe_block); return_ACPI_STATUS(status); } @@ -442,7 +450,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, NULL); + status = acpi_ev_walk_gpe_list(acpi_hw_enable_runtime_gpe_block); return_ACPI_STATUS(status); } @@ -464,6 +472,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, NULL); + status = acpi_ev_walk_gpe_list(acpi_hw_enable_wakeup_gpe_block); return_ACPI_STATUS(status); } diff --git a/trunk/drivers/acpi/acpica/hwxface.c b/trunk/drivers/acpi/hardware/hwregs.c similarity index 62% rename from trunk/drivers/acpi/acpica/hwxface.c rename to trunk/drivers/acpi/hardware/hwregs.c index ae597c0ab53f..ddf792adcf96 100644 --- a/trunk/drivers/acpi/acpica/hwxface.c +++ b/trunk/drivers/acpi/hardware/hwregs.c @@ -1,9 +1,10 @@ -/****************************************************************************** +/******************************************************************************* * - * Module Name: hwxface - Public ACPICA hardware interfaces + * Module Name: hwregs - Read/write access functions for the various ACPI + * control and status registers. * - *****************************************************************************/ + ******************************************************************************/ /* * Copyright (C) 2000 - 2008, Intel Corp. @@ -43,208 +44,209 @@ */ #include -#include "accommon.h" -#include "acnamesp.h" +#include +#include #define _COMPONENT ACPI_HARDWARE -ACPI_MODULE_NAME("hwxface") +ACPI_MODULE_NAME("hwregs") -/****************************************************************************** +/******************************************************************************* * - * FUNCTION: acpi_reset + * FUNCTION: acpi_hw_clear_acpi_status * * PARAMETERS: None * - * RETURN: Status + * RETURN: None * - * DESCRIPTION: Set reset register in memory or IO space. Note: Does not - * support reset register in PCI config space, this must be - * handled separately. + * DESCRIPTION: Clears all fixed and general purpose status bits + * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED * ******************************************************************************/ -acpi_status acpi_reset(void) +acpi_status acpi_hw_clear_acpi_status(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)); - ACPI_FUNCTION_TRACE(acpi_reset); + lock_flags = acpi_os_acquire_lock(acpi_gbl_hardware_lock); - reset_reg = &acpi_gbl_FADT.reset_register; + status = acpi_hw_register_write(ACPI_REGISTER_PM1_STATUS, + ACPI_BITMASK_ALL_FIXED_STATUS); + if (ACPI_FAILURE(status)) { + goto unlock_and_exit; + } - /* Check if the reset register is supported */ + /* Clear the fixed events */ - if (!(acpi_gbl_FADT.flags & ACPI_FADT_RESET_REGISTER) || - !reset_reg->address) { - return_ACPI_STATUS(AE_NOT_EXIST); + 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; + } } - /* Write the reset value to the reset register */ + /* Clear the GPE Bits in all GPE registers in all GPE blocks */ - status = acpi_write(acpi_gbl_FADT.reset_value, reset_reg); + status = acpi_ev_walk_gpe_list(acpi_hw_clear_gpe_block); + + unlock_and_exit: + acpi_os_release_lock(acpi_gbl_hardware_lock, lock_flags); return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_reset) - -/****************************************************************************** +/******************************************************************************* * - * FUNCTION: acpi_read + * FUNCTION: acpi_get_sleep_type_data * - * PARAMETERS: Value - Where the value is returned - * Reg - GAS register structure + * PARAMETERS: sleep_state - Numeric sleep state + * *sleep_type_a - Where SLP_TYPa is returned + * *sleep_type_b - Where SLP_TYPb is returned * - * RETURN: Status + * RETURN: Status - ACPI status * - * DESCRIPTION: Read from either memory or IO space. + * DESCRIPTION: Obtain the SLP_TYPa and SLP_TYPb values for the requested sleep + * state. * ******************************************************************************/ -acpi_status acpi_read(u32 *value, struct acpi_generic_address *reg) + +acpi_status +acpi_get_sleep_type_data(u8 sleep_state, u8 * sleep_type_a, u8 * sleep_type_b) { - u32 width; - u64 address; - acpi_status status; + acpi_status status = AE_OK; + struct acpi_evaluate_info *info; - ACPI_FUNCTION_NAME(acpi_read); + ACPI_FUNCTION_TRACE(acpi_get_sleep_type_data); - /* - * 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); + /* Validate parameters */ + + if ((sleep_state > ACPI_S_STATES_MAX) || !sleep_type_a || !sleep_type_b) { + return_ACPI_STATUS(AE_BAD_PARAMETER); } - /* Get a local copy of the address. Handles possible alignment issues */ + /* Allocate the evaluation information block */ - ACPI_MOVE_64_TO_64(&address, ®->address); - if (!address) { - return (AE_OK); + info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info)); + if (!info) { + return_ACPI_STATUS(AE_NO_MEMORY); + } + + 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)); + + goto cleanup; } - /* Supported widths are 8/16/32 */ + /* Must have a return object */ - width = reg->bit_width; - if ((width != 8) && (width != 16) && (width != 32)) { - return (AE_SUPPORT); + if (!info->return_object) { + ACPI_ERROR((AE_INFO, "No Sleep State object returned from [%s]", + info->pathname)); + status = AE_NOT_EXIST; } - /* Initialize entire 32-bit return value to zero */ + /* It must be of type Package */ - *value = 0; + 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; + } /* - * 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: + 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; + } - status = acpi_os_read_memory((acpi_physical_address) address, - value, width); - break; + /* The first two elements must both be of type Integer */ - case ACPI_ADR_SPACE_SYSTEM_IO: + 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 */ - status = - acpi_os_read_port((acpi_io_address) address, value, width); - break; + *sleep_type_a = (u8) + (info->return_object->package.elements[0])->integer.value; + *sleep_type_b = (u8) + (info->return_object->package.elements[1])->integer.value; + } - 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, - "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))); + acpi_ut_remove_reference(info->return_object); - return (status); + cleanup: + ACPI_FREE(info); + return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_read) +ACPI_EXPORT_SYMBOL(acpi_get_sleep_type_data) -/****************************************************************************** +/******************************************************************************* * - * FUNCTION: acpi_write + * FUNCTION: acpi_hw_get_register_bit_mask * - * PARAMETERS: Value - To be written - * Reg - GAS register structure + * PARAMETERS: register_id - Index of ACPI Register to access * - * RETURN: Status + * RETURN: The bitmask to be used when accessing the register * - * DESCRIPTION: Write to either memory or IO space. + * DESCRIPTION: Map register_id into a register bitmask. * ******************************************************************************/ -acpi_status acpi_write(u32 value, struct acpi_generic_address *reg) +struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id) { - u32 width; - u64 address; - acpi_status status; - - 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, ®->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; + ACPI_FUNCTION_ENTRY(); - default: - ACPI_ERROR((AE_INFO, - "Unsupported address space: %X", reg->space_id)); - return (AE_BAD_PARAMETER); + if (register_id > ACPI_BITREG_MAX) { + ACPI_ERROR((AE_INFO, "Invalid BitRegister ID: %X", + register_id)); + return (NULL); } - 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); + return (&acpi_gbl_bit_register_info[register_id]); } -ACPI_EXPORT_SYMBOL(acpi_write) - /******************************************************************************* * - * FUNCTION: 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 @@ -252,16 +254,17 @@ ACPI_EXPORT_SYMBOL(acpi_write) * 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. Does not acquire the HW lock. + * DESCRIPTION: ACPI bit_register read function. * ******************************************************************************/ -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_unlocked); + ACPI_FUNCTION_TRACE(acpi_get_register); /* Get the info structure corresponding to the requested ACPI Register */ @@ -293,31 +296,14 @@ acpi_status acpi_get_register_unlocked(u32 register_id, u32 *return_value) return_ACPI_STATUS(status); } -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 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) @@ -384,9 +370,8 @@ 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; @@ -474,120 +459,399 @@ acpi_status acpi_set_register(u32 register_id, u32 value) ACPI_EXPORT_SYMBOL(acpi_set_register) -/******************************************************************************* +/****************************************************************************** * - * FUNCTION: acpi_get_sleep_type_data + * FUNCTION: acpi_hw_register_read * - * PARAMETERS: sleep_state - Numeric sleep state - * *sleep_type_a - Where SLP_TYPa is returned - * *sleep_type_b - Where SLP_TYPb is returned + * PARAMETERS: register_id - ACPI Register ID + * return_value - Where the register value is returned * - * RETURN: Status - ACPI status + * RETURN: Status and the value read. * - * DESCRIPTION: Obtain the SLP_TYPa and SLP_TYPb values for the requested sleep - * state. + * DESCRIPTION: Read from the specified ACPI register * ******************************************************************************/ acpi_status -acpi_get_sleep_type_data(u8 sleep_state, u8 *sleep_type_a, u8 *sleep_type_b) +acpi_hw_register_read(u32 register_id, u32 * return_value) { - acpi_status status = AE_OK; - struct acpi_evaluate_info *info; + u32 value1 = 0; + u32 value2 = 0; + acpi_status status; - ACPI_FUNCTION_TRACE(acpi_get_sleep_type_data); + ACPI_FUNCTION_TRACE(hw_register_read); - /* Validate parameters */ + switch (register_id) { + case ACPI_REGISTER_PM1_STATUS: /* 16-bit access */ - 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, &value1, + &acpi_gbl_FADT.xpm1a_event_block); + if (ACPI_FAILURE(status)) { + goto exit; + } - /* Allocate the evaluation information block */ + /* PM1B is optional */ - info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info)); - if (!info) { - return_ACPI_STATUS(AE_NO_MEMORY); - } + status = + acpi_hw_low_level_read(16, &value2, + &acpi_gbl_FADT.xpm1b_event_block); + value1 |= value2; + break; - info->pathname = - ACPI_CAST_PTR(char, acpi_gbl_sleep_state_names[sleep_state]); + case ACPI_REGISTER_PM1_ENABLE: /* 16-bit access */ - /* Evaluate the namespace object containing the values for this state */ + status = + acpi_hw_low_level_read(16, &value1, &acpi_gbl_xpm1a_enable); + if (ACPI_FAILURE(status)) { + goto exit; + } - 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)); + /* PM1B is optional */ - goto cleanup; + 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; } - /* Must have a return object */ + exit: - if (!info->return_object) { - ACPI_ERROR((AE_INFO, "No Sleep State object returned from [%s]", - info->pathname)); - status = AE_NOT_EXIST; + if (ACPI_SUCCESS(status)) { + *return_value = value1; } - /* It must be of type Package */ + return_ACPI_STATUS(status); +} - 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; +/****************************************************************************** + * + * 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; + + default: + status = AE_BAD_PARAMETER; + break; } + 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); + /* - * 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). + * 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. */ - 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; + 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_MOVE_64_TO_64(&address, ®->address); + if (!address) { + return (AE_OK); + } + *value = 0; + + /* + * 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_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: 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 */ + "Unsupported address space: %X", reg->space_id)); + return (AE_BAD_PARAMETER); + } - *sleep_type_a = (u8) - (info->return_object->package.elements[0])->integer.value; - *sleep_type_b = (u8) - (info->return_object->package.elements[1])->integer.value; + 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); } - 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))); + /* Get a local copy of the address. Handles possible alignment issues */ + + ACPI_MOVE_64_TO_64(&address, ®->address); + if (!address) { + return (AE_OK); } - acpi_ut_remove_reference(info->return_object); + /* + * 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: - cleanup: - ACPI_FREE(info); - return_ACPI_STATUS(status); -} + status = acpi_os_write_memory((acpi_physical_address) address, + value, width); + break; -ACPI_EXPORT_SYMBOL(acpi_get_sleep_type_data) + 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); + } + + 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); +} diff --git a/trunk/drivers/acpi/acpica/hwsleep.c b/trunk/drivers/acpi/hardware/hwsleep.c similarity index 91% rename from trunk/drivers/acpi/acpica/hwsleep.c rename to trunk/drivers/acpi/hardware/hwsleep.c index a2af2a4f2f26..25dccdf179b9 100644 --- a/trunk/drivers/acpi/acpica/hwsleep.c +++ b/trunk/drivers/acpi/hardware/hwsleep.c @@ -43,8 +43,7 @@ */ #include -#include "accommon.h" -#include "actables.h" +#include #define _COMPONENT ACPI_HARDWARE ACPI_MODULE_NAME("hwsleep") @@ -53,19 +52,31 @@ ACPI_MODULE_NAME("hwsleep") * * FUNCTION: acpi_set_firmware_waking_vector * - * PARAMETERS: physical_address - 32-bit physical address of ACPI real mode + * PARAMETERS: physical_address - Physical address of ACPI real mode * entry point. * * RETURN: Status * - * DESCRIPTION: Sets the 32-bit firmware_waking_vector field of the FACS + * DESCRIPTION: Access function for the firmware_waking_vector field in FACS * ******************************************************************************/ acpi_status -acpi_set_firmware_waking_vector(u32 physical_address) +acpi_set_firmware_waking_vector(acpi_physical_address 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 @@ -74,16 +85,10 @@ acpi_set_firmware_waking_vector(u32 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; - /* 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; - } + facs->firmware_waking_vector = (u32)physical_address; return_ACPI_STATUS(AE_OK); } @@ -92,39 +97,48 @@ ACPI_EXPORT_SYMBOL(acpi_set_firmware_waking_vector) /******************************************************************************* * - * FUNCTION: acpi_set_firmware_waking_vector64 + * FUNCTION: acpi_get_firmware_waking_vector * - * PARAMETERS: physical_address - 64-bit physical address of ACPI protected - * mode entry point. + * PARAMETERS: *physical_address - Where the contents of + * the firmware_waking_vector field of + * the FACS will be returned. * - * RETURN: Status + * RETURN: Status, vector * - * DESCRIPTION: Sets the 64-bit X_firmware_waking_vector field of the FACS, if - * it exists in the table. + * DESCRIPTION: Access function for the firmware_waking_vector field in FACS * ******************************************************************************/ +#ifdef ACPI_FUTURE_USAGE acpi_status -acpi_set_firmware_waking_vector64(u64 physical_address) +acpi_get_firmware_waking_vector(acpi_physical_address * physical_address) { - ACPI_FUNCTION_TRACE(acpi_set_firmware_waking_vector64); - + struct acpi_table_facs *facs; + acpi_status status; - /* Determine if the 64-bit vector actually exists */ + ACPI_FUNCTION_TRACE(acpi_get_firmware_waking_vector); - if ((acpi_gbl_FACS->length <= 32) || (acpi_gbl_FACS->version < 1)) { - return_ACPI_STATUS(AE_NOT_EXIST); + if (!physical_address) { + return_ACPI_STATUS(AE_BAD_PARAMETER); } - /* Clear 32-bit vector, set the 64-bit X_ vector */ + /* Get the FACS */ - acpi_gbl_FACS->firmware_waking_vector = 0; - acpi_gbl_FACS->xfirmware_waking_vector = physical_address; + 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); + } + + /* Get the vector */ + *physical_address = (acpi_physical_address)facs->firmware_waking_vector; return_ACPI_STATUS(AE_OK); } -ACPI_EXPORT_SYMBOL(acpi_set_firmware_waking_vector64) - +ACPI_EXPORT_SYMBOL(acpi_get_firmware_waking_vector) +#endif /******************************************************************************* * * FUNCTION: acpi_enter_sleep_state_prep diff --git a/trunk/drivers/acpi/acpica/hwtimer.c b/trunk/drivers/acpi/hardware/hwtimer.c similarity index 99% rename from trunk/drivers/acpi/acpica/hwtimer.c rename to trunk/drivers/acpi/hardware/hwtimer.c index b7f522c8f023..b53d575491b9 100644 --- a/trunk/drivers/acpi/acpica/hwtimer.c +++ b/trunk/drivers/acpi/hardware/hwtimer.c @@ -43,7 +43,6 @@ */ #include -#include "accommon.h" #define _COMPONENT ACPI_HARDWARE ACPI_MODULE_NAME("hwtimer") diff --git a/trunk/drivers/acpi/namespace/Makefile b/trunk/drivers/acpi/namespace/Makefile new file mode 100644 index 000000000000..371a2daf837f --- /dev/null +++ b/trunk/drivers/acpi/namespace/Makefile @@ -0,0 +1,12 @@ +# +# 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) diff --git a/trunk/drivers/acpi/acpica/nsaccess.c b/trunk/drivers/acpi/namespace/nsaccess.c similarity index 98% rename from trunk/drivers/acpi/acpica/nsaccess.c rename to trunk/drivers/acpi/namespace/nsaccess.c index 88303ebe924c..c39a7f68b889 100644 --- a/trunk/drivers/acpi/acpica/nsaccess.c +++ b/trunk/drivers/acpi/namespace/nsaccess.c @@ -42,10 +42,9 @@ */ #include -#include "accommon.h" -#include "amlcode.h" -#include "acnamesp.h" -#include "acdispat.h" +#include +#include +#include #define _COMPONENT ACPI_NAMESPACE ACPI_MODULE_NAME("nsaccess") @@ -166,8 +165,11 @@ 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; @@ -519,11 +521,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; @@ -589,10 +591,6 @@ 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)) { diff --git a/trunk/drivers/acpi/acpica/nsalloc.c b/trunk/drivers/acpi/namespace/nsalloc.c similarity index 99% rename from trunk/drivers/acpi/acpica/nsalloc.c rename to trunk/drivers/acpi/namespace/nsalloc.c index f976d848fe82..3a1740ac2edc 100644 --- a/trunk/drivers/acpi/acpica/nsalloc.c +++ b/trunk/drivers/acpi/namespace/nsalloc.c @@ -42,8 +42,7 @@ */ #include -#include "accommon.h" -#include "acnamesp.h" +#include #define _COMPONENT ACPI_NAMESPACE ACPI_MODULE_NAME("nsalloc") diff --git a/trunk/drivers/acpi/acpica/nsdump.c b/trunk/drivers/acpi/namespace/nsdump.c similarity index 99% rename from trunk/drivers/acpi/acpica/nsdump.c rename to trunk/drivers/acpi/namespace/nsdump.c index 0da33c8e9ba2..cc0ae39440e4 100644 --- a/trunk/drivers/acpi/acpica/nsdump.c +++ b/trunk/drivers/acpi/namespace/nsdump.c @@ -42,8 +42,7 @@ */ #include -#include "accommon.h" -#include "acnamesp.h" +#include #define _COMPONENT ACPI_NAMESPACE ACPI_MODULE_NAME("nsdump") diff --git a/trunk/drivers/acpi/acpica/nsdumpdv.c b/trunk/drivers/acpi/namespace/nsdumpdv.c similarity index 99% rename from trunk/drivers/acpi/acpica/nsdumpdv.c rename to trunk/drivers/acpi/namespace/nsdumpdv.c index 41994fe7fbb8..428f50fde11a 100644 --- a/trunk/drivers/acpi/acpica/nsdumpdv.c +++ b/trunk/drivers/acpi/namespace/nsdumpdv.c @@ -42,7 +42,6 @@ */ #include -#include "accommon.h" /* TBD: This entire module is apparently obsolete and should be removed */ @@ -50,7 +49,7 @@ ACPI_MODULE_NAME("nsdumpdv") #ifdef ACPI_OBSOLETE_FUNCTIONS #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) -#include "acnamesp.h" +#include /******************************************************************************* * * FUNCTION: acpi_ns_dump_one_device diff --git a/trunk/drivers/acpi/acpica/nseval.c b/trunk/drivers/acpi/namespace/nseval.c similarity index 81% rename from trunk/drivers/acpi/acpica/nseval.c rename to trunk/drivers/acpi/namespace/nseval.c index 0f3d5f9b5966..4cdf03ac2b46 100644 --- a/trunk/drivers/acpi/acpica/nseval.c +++ b/trunk/drivers/acpi/namespace/nseval.c @@ -42,10 +42,9 @@ */ #include -#include "accommon.h" -#include "acparser.h" -#include "acinterp.h" -#include "acnamesp.h" +#include +#include +#include #define _COMPONENT ACPI_NAMESPACE ACPI_MODULE_NAME("nseval") @@ -90,7 +89,6 @@ 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: @@ -143,17 +141,41 @@ acpi_status acpi_ns_evaluate(struct acpi_evaluate_info * info) return_ACPI_STATUS(AE_NULL_OBJECT); } - /* Count the number of arguments being passed to the method */ + /* + * Calculate the number of arguments being passed to the method + */ + info->param_count = 0; if (info->parameters) { - while (info->parameters[info->param_count]) { - if (info->param_count > ACPI_METHOD_MAX_ARG) { - return_ACPI_STATUS(AE_LIMIT); - } + while (info->parameters[info->param_count]) 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); @@ -242,13 +264,32 @@ acpi_status acpi_ns_evaluate(struct acpi_evaluate_info * info) } } - /* - * 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); + /* 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 if there is a return value that must be dealt with */ diff --git a/trunk/drivers/acpi/acpica/nsinit.c b/trunk/drivers/acpi/namespace/nsinit.c similarity index 99% rename from trunk/drivers/acpi/acpica/nsinit.c rename to trunk/drivers/acpi/namespace/nsinit.c index 13501cb81863..e4c57510d798 100644 --- a/trunk/drivers/acpi/acpica/nsinit.c +++ b/trunk/drivers/acpi/namespace/nsinit.c @@ -42,10 +42,9 @@ */ #include -#include "accommon.h" -#include "acnamesp.h" -#include "acdispat.h" -#include "acinterp.h" +#include +#include +#include #include #define _COMPONENT ACPI_NAMESPACE diff --git a/trunk/drivers/acpi/acpica/nsload.c b/trunk/drivers/acpi/namespace/nsload.c similarity index 99% rename from trunk/drivers/acpi/acpica/nsload.c rename to trunk/drivers/acpi/namespace/nsload.c index a0ba9e12379e..a4a412b7c029 100644 --- a/trunk/drivers/acpi/acpica/nsload.c +++ b/trunk/drivers/acpi/namespace/nsload.c @@ -42,10 +42,9 @@ */ #include -#include "accommon.h" -#include "acnamesp.h" -#include "acdispat.h" -#include "actables.h" +#include +#include +#include #define _COMPONENT ACPI_NAMESPACE ACPI_MODULE_NAME("nsload") diff --git a/trunk/drivers/acpi/acpica/nsnames.c b/trunk/drivers/acpi/namespace/nsnames.c similarity index 99% rename from trunk/drivers/acpi/acpica/nsnames.c rename to trunk/drivers/acpi/namespace/nsnames.c index ae3dc10a7e81..42a39a7c96e9 100644 --- a/trunk/drivers/acpi/acpica/nsnames.c +++ b/trunk/drivers/acpi/namespace/nsnames.c @@ -42,9 +42,8 @@ */ #include -#include "accommon.h" -#include "amlcode.h" -#include "acnamesp.h" +#include +#include #define _COMPONENT ACPI_NAMESPACE ACPI_MODULE_NAME("nsnames") diff --git a/trunk/drivers/acpi/acpica/nsobject.c b/trunk/drivers/acpi/namespace/nsobject.c similarity index 99% rename from trunk/drivers/acpi/acpica/nsobject.c rename to trunk/drivers/acpi/namespace/nsobject.c index 08a97a57f8f9..15fe09e24f71 100644 --- a/trunk/drivers/acpi/acpica/nsobject.c +++ b/trunk/drivers/acpi/namespace/nsobject.c @@ -43,8 +43,7 @@ */ #include -#include "accommon.h" -#include "acnamesp.h" +#include #define _COMPONENT ACPI_NAMESPACE ACPI_MODULE_NAME("nsobject") diff --git a/trunk/drivers/acpi/acpica/nsparse.c b/trunk/drivers/acpi/namespace/nsparse.c similarity index 98% rename from trunk/drivers/acpi/acpica/nsparse.c rename to trunk/drivers/acpi/namespace/nsparse.c index b9e8d0070b6f..a82271a9dbb3 100644 --- a/trunk/drivers/acpi/acpica/nsparse.c +++ b/trunk/drivers/acpi/namespace/nsparse.c @@ -42,11 +42,10 @@ */ #include -#include "accommon.h" -#include "acnamesp.h" -#include "acparser.h" -#include "acdispat.h" -#include "actables.h" +#include +#include +#include +#include #define _COMPONENT ACPI_NAMESPACE ACPI_MODULE_NAME("nsparse") diff --git a/trunk/drivers/acpi/acpica/nspredef.c b/trunk/drivers/acpi/namespace/nspredef.c similarity index 76% rename from trunk/drivers/acpi/acpica/nspredef.c rename to trunk/drivers/acpi/namespace/nspredef.c index 452703290d35..0f17cf0898c9 100644 --- a/trunk/drivers/acpi/acpica/nspredef.c +++ b/trunk/drivers/acpi/namespace/nspredef.c @@ -43,9 +43,8 @@ */ #include -#include "accommon.h" -#include "acnamesp.h" -#include "acpredef.h" +#include +#include #define _COMPONENT ACPI_NAMESPACE ACPI_MODULE_NAME("nspredef") @@ -73,7 +72,7 @@ ACPI_MODULE_NAME("nspredef") /* Local prototypes */ static acpi_status acpi_ns_check_package(char *pathname, - union acpi_operand_object **return_object_ptr, + union acpi_operand_object *return_object, const union acpi_predefined_info *predefined); static acpi_status @@ -83,18 +82,13 @@ acpi_ns_check_package_elements(char *pathname, static acpi_status acpi_ns_check_object_type(char *pathname, - union acpi_operand_object **return_object_ptr, + union acpi_operand_object *return_object, 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 @@ -114,8 +108,8 @@ static const char *acpi_rtype_names[] = { * FUNCTION: acpi_ns_check_predefined_names * * PARAMETERS: Node - Namespace node for the method/object - * return_object_ptr - Pointer to the object returned from the - * evaluation of a method or object + * return_object - Object returned from the evaluation of this + * method/object * * RETURN: Status * @@ -125,11 +119,8 @@ static const char *acpi_rtype_names[] = { acpi_status acpi_ns_check_predefined_names(struct acpi_namespace_node *node, - u32 user_param_count, - acpi_status return_status, - union acpi_operand_object **return_object_ptr) + union acpi_operand_object *return_object) { - union acpi_operand_object *return_object = *return_object_ptr; acpi_status status = AE_OK; const union acpi_predefined_info *predefined; char *pathname; @@ -137,6 +128,12 @@ 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 */ @@ -146,37 +143,10 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node, } /* - * 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. + * Check that the parameter count for this method is in accordance + * with the ACPI specification. */ - 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; + acpi_ns_check_parameter_count(pathname, node, predefined); /* * If there is no return value, check if we require a return value for @@ -201,7 +171,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 the "Implicit Return" feature is enabled, methods will + * For example, if "Implicit return value" is enabled, methods will * always return a value */ if (!predefined->info.expected_btypes) { @@ -212,7 +182,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_ptr, + status = acpi_ns_check_object_type(pathname, return_object, predefined->info.expected_btypes, ACPI_NOT_PACKAGE); if (ACPI_FAILURE(status)) { @@ -223,12 +193,11 @@ 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_ptr, - predefined); + acpi_ns_check_package(pathname, return_object, predefined); } exit: - if (pathname != predefined->info.name) { + if (pathname) { ACPI_FREE(pathname); } @@ -241,7 +210,6 @@ 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 @@ -255,76 +223,32 @@ 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; - /* Methods have 0-7 parameters. All other types have zero. */ - + /* + * 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. + */ param_count = 0; if (node->type == ACPI_TYPE_METHOD) { param_count = node->object->method.param_count; } - /* 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.) */ + /* Validate parameter count - allow two different legal counts (_SCP) */ 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, ACPI requires %d", + "%s: Parameter count mismatch - ASL declared %d, expected %d", pathname, param_count, required_params_current)); } } @@ -383,8 +307,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_ptr - Pointer to the object returned from the - * evaluation of a method or object + * return_object - Object returned from the evaluation of a + * method or object * Predefined - Pointer to entry in predefined name table * * RETURN: Status @@ -396,10 +320,9 @@ 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_ptr, + union acpi_operand_object *return_object, 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; @@ -485,7 +408,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)) { @@ -518,7 +441,7 @@ acpi_ns_check_package(char *pathname, status = acpi_ns_check_object_type(pathname, - elements, + *elements, package-> ret_info3. object_type[i], @@ -531,7 +454,7 @@ acpi_ns_check_package(char *pathname, status = acpi_ns_check_object_type(pathname, - elements, + *elements, package-> ret_info3. tail_object_type, @@ -548,7 +471,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); @@ -586,7 +509,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); @@ -644,8 +567,12 @@ 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); } @@ -684,7 +611,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)) { @@ -781,7 +708,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); @@ -790,7 +717,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); @@ -806,8 +733,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_ptr - Pointer to the object returned from the - * evaluation of a method or object + * return_object - Object return from the execution of this + * method/object * expected_btypes - Bitmap of expected return type(s) * package_index - Index of object within parent package (if * applicable - ACPI_NOT_PACKAGE otherwise) @@ -821,10 +748,9 @@ acpi_ns_check_package_elements(char *pathname, static acpi_status acpi_ns_check_object_type(char *pathname, - union acpi_operand_object **return_object_ptr, + union acpi_operand_object *return_object, 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 */ @@ -888,14 +814,6 @@ 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; } @@ -980,86 +898,3 @@ 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); -} diff --git a/trunk/drivers/acpi/acpica/nssearch.c b/trunk/drivers/acpi/namespace/nssearch.c similarity index 99% rename from trunk/drivers/acpi/acpica/nssearch.c rename to trunk/drivers/acpi/namespace/nssearch.c index 6fea13f3f52d..a9a80bf811b3 100644 --- a/trunk/drivers/acpi/acpica/nssearch.c +++ b/trunk/drivers/acpi/namespace/nssearch.c @@ -42,8 +42,7 @@ */ #include -#include "accommon.h" -#include "acnamesp.h" +#include #define _COMPONENT ACPI_NAMESPACE ACPI_MODULE_NAME("nssearch") diff --git a/trunk/drivers/acpi/acpica/nsutils.c b/trunk/drivers/acpi/namespace/nsutils.c similarity index 98% rename from trunk/drivers/acpi/acpica/nsutils.c rename to trunk/drivers/acpi/namespace/nsutils.c index 3e1149bf4aa5..b0817e1127b1 100644 --- a/trunk/drivers/acpi/acpica/nsutils.c +++ b/trunk/drivers/acpi/namespace/nsutils.c @@ -43,10 +43,9 @@ */ #include -#include "accommon.h" -#include "acnamesp.h" -#include "amlcode.h" -#include "actables.h" +#include +#include +#include #define _COMPONENT ACPI_NAMESPACE ACPI_MODULE_NAME("nsutils") @@ -315,15 +314,9 @@ 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)) { + if (acpi_ns_valid_root_prefix(next_external_char[0])) { 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 diff --git a/trunk/drivers/acpi/acpica/nswalk.c b/trunk/drivers/acpi/namespace/nswalk.c similarity index 99% rename from trunk/drivers/acpi/acpica/nswalk.c rename to trunk/drivers/acpi/namespace/nswalk.c index 200895fa2728..3c905ce26d7d 100644 --- a/trunk/drivers/acpi/acpica/nswalk.c +++ b/trunk/drivers/acpi/namespace/nswalk.c @@ -42,8 +42,7 @@ */ #include -#include "accommon.h" -#include "acnamesp.h" +#include #define _COMPONENT ACPI_NAMESPACE ACPI_MODULE_NAME("nswalk") diff --git a/trunk/drivers/acpi/acpica/nsxfeval.c b/trunk/drivers/acpi/namespace/nsxfeval.c similarity index 99% rename from trunk/drivers/acpi/acpica/nsxfeval.c rename to trunk/drivers/acpi/namespace/nsxfeval.c index 22a7171ac1ed..a085cc39c055 100644 --- a/trunk/drivers/acpi/acpica/nsxfeval.c +++ b/trunk/drivers/acpi/namespace/nsxfeval.c @@ -43,9 +43,8 @@ */ #include -#include "accommon.h" -#include "acnamesp.h" -#include "acinterp.h" +#include +#include #define _COMPONENT ACPI_NAMESPACE ACPI_MODULE_NAME("nsxfeval") diff --git a/trunk/drivers/acpi/acpica/nsxfname.c b/trunk/drivers/acpi/namespace/nsxfname.c similarity index 99% rename from trunk/drivers/acpi/acpica/nsxfname.c rename to trunk/drivers/acpi/namespace/nsxfname.c index 9589fea24997..5efa4e7ddb0b 100644 --- a/trunk/drivers/acpi/acpica/nsxfname.c +++ b/trunk/drivers/acpi/namespace/nsxfname.c @@ -43,8 +43,7 @@ */ #include -#include "accommon.h" -#include "acnamesp.h" +#include #define _COMPONENT ACPI_NAMESPACE ACPI_MODULE_NAME("nsxfname") diff --git a/trunk/drivers/acpi/acpica/nsxfobj.c b/trunk/drivers/acpi/namespace/nsxfobj.c similarity index 99% rename from trunk/drivers/acpi/acpica/nsxfobj.c rename to trunk/drivers/acpi/namespace/nsxfobj.c index 1c7efc15225f..2b375ee80cef 100644 --- a/trunk/drivers/acpi/acpica/nsxfobj.c +++ b/trunk/drivers/acpi/namespace/nsxfobj.c @@ -43,8 +43,7 @@ */ #include -#include "accommon.h" -#include "acnamesp.h" +#include #define _COMPONENT ACPI_NAMESPACE ACPI_MODULE_NAME("nsxfobj") diff --git a/trunk/drivers/acpi/numa.c b/trunk/drivers/acpi/numa.c index c5e292aab0e3..25ceae9191ef 100644 --- a/trunk/drivers/acpi/numa.c +++ b/trunk/drivers/acpi/numa.c @@ -29,6 +29,7 @@ #include #include #include +#include #define ACPI_NUMA 0x80000000 #define _COMPONENT ACPI_NUMA diff --git a/trunk/drivers/acpi/osl.c b/trunk/drivers/acpi/osl.c index 6729a4992f2b..c8111424dcb8 100644 --- a/trunk/drivers/acpi/osl.c +++ b/trunk/drivers/acpi/osl.c @@ -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 AE_NO_MEMORY; + return_ACPI_STATUS(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 status; + return_ACPI_STATUS(status); } acpi_status acpi_os_execute(acpi_execute_type type, diff --git a/trunk/drivers/acpi/parser/Makefile b/trunk/drivers/acpi/parser/Makefile new file mode 100644 index 000000000000..db24ee09cf11 --- /dev/null +++ b/trunk/drivers/acpi/parser/Makefile @@ -0,0 +1,8 @@ +# +# 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) diff --git a/trunk/drivers/acpi/acpica/psargs.c b/trunk/drivers/acpi/parser/psargs.c similarity index 99% rename from trunk/drivers/acpi/acpica/psargs.c rename to trunk/drivers/acpi/parser/psargs.c index b161f3544b51..d830b29b85b1 100644 --- a/trunk/drivers/acpi/acpica/psargs.c +++ b/trunk/drivers/acpi/parser/psargs.c @@ -42,11 +42,10 @@ */ #include -#include "accommon.h" -#include "acparser.h" -#include "amlcode.h" -#include "acnamesp.h" -#include "acdispat.h" +#include +#include +#include +#include #define _COMPONENT ACPI_PARSER ACPI_MODULE_NAME("psargs") diff --git a/trunk/drivers/acpi/acpica/psloop.c b/trunk/drivers/acpi/parser/psloop.c similarity index 99% rename from trunk/drivers/acpi/acpica/psloop.c rename to trunk/drivers/acpi/parser/psloop.c index c5f6ce19a401..4647039a0d8a 100644 --- a/trunk/drivers/acpi/acpica/psloop.c +++ b/trunk/drivers/acpi/parser/psloop.c @@ -50,10 +50,9 @@ */ #include -#include "accommon.h" -#include "acparser.h" -#include "acdispat.h" -#include "amlcode.h" +#include +#include +#include #define _COMPONENT ACPI_PARSER ACPI_MODULE_NAME("psloop") diff --git a/trunk/drivers/acpi/acpica/psopcode.c b/trunk/drivers/acpi/parser/psopcode.c similarity index 99% rename from trunk/drivers/acpi/acpica/psopcode.c rename to trunk/drivers/acpi/parser/psopcode.c index 3bc3a60194d6..f425ab30eae8 100644 --- a/trunk/drivers/acpi/acpica/psopcode.c +++ b/trunk/drivers/acpi/parser/psopcode.c @@ -42,10 +42,9 @@ */ #include -#include "accommon.h" -#include "acparser.h" -#include "acopcode.h" -#include "amlcode.h" +#include +#include +#include #define _COMPONENT ACPI_PARSER ACPI_MODULE_NAME("psopcode") diff --git a/trunk/drivers/acpi/acpica/psparse.c b/trunk/drivers/acpi/parser/psparse.c similarity index 97% rename from trunk/drivers/acpi/acpica/psparse.c rename to trunk/drivers/acpi/parser/psparse.c index 70838e9b608c..68e932f215ea 100644 --- a/trunk/drivers/acpi/acpica/psparse.c +++ b/trunk/drivers/acpi/parser/psparse.c @@ -51,12 +51,11 @@ */ #include -#include "accommon.h" -#include "acparser.h" -#include "acdispat.h" -#include "amlcode.h" -#include "acnamesp.h" -#include "acinterp.h" +#include +#include +#include +#include +#include #define _COMPONENT ACPI_PARSER ACPI_MODULE_NAME("psparse") @@ -448,22 +447,10 @@ 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); } diff --git a/trunk/drivers/acpi/acpica/psscope.c b/trunk/drivers/acpi/parser/psscope.c similarity index 99% rename from trunk/drivers/acpi/acpica/psscope.c rename to trunk/drivers/acpi/parser/psscope.c index 2feca5ca9581..ee50e67c9443 100644 --- a/trunk/drivers/acpi/acpica/psscope.c +++ b/trunk/drivers/acpi/parser/psscope.c @@ -42,8 +42,7 @@ */ #include -#include "accommon.h" -#include "acparser.h" +#include #define _COMPONENT ACPI_PARSER ACPI_MODULE_NAME("psscope") diff --git a/trunk/drivers/acpi/acpica/pstree.c b/trunk/drivers/acpi/parser/pstree.c similarity index 99% rename from trunk/drivers/acpi/acpica/pstree.c rename to trunk/drivers/acpi/parser/pstree.c index 4d3389118ec3..1dd355ddd182 100644 --- a/trunk/drivers/acpi/acpica/pstree.c +++ b/trunk/drivers/acpi/parser/pstree.c @@ -42,9 +42,8 @@ */ #include -#include "accommon.h" -#include "acparser.h" -#include "amlcode.h" +#include +#include #define _COMPONENT ACPI_PARSER ACPI_MODULE_NAME("pstree") diff --git a/trunk/drivers/acpi/acpica/psutils.c b/trunk/drivers/acpi/parser/psutils.c similarity index 99% rename from trunk/drivers/acpi/acpica/psutils.c rename to trunk/drivers/acpi/parser/psutils.c index e636e078ad3d..7cf1f65cd5bb 100644 --- a/trunk/drivers/acpi/acpica/psutils.c +++ b/trunk/drivers/acpi/parser/psutils.c @@ -42,9 +42,8 @@ */ #include -#include "accommon.h" -#include "acparser.h" -#include "amlcode.h" +#include +#include #define _COMPONENT ACPI_PARSER ACPI_MODULE_NAME("psutils") diff --git a/trunk/drivers/acpi/acpica/pswalk.c b/trunk/drivers/acpi/parser/pswalk.c similarity index 98% rename from trunk/drivers/acpi/acpica/pswalk.c rename to trunk/drivers/acpi/parser/pswalk.c index 78b8b791f2ae..8b86ad5a3201 100644 --- a/trunk/drivers/acpi/acpica/pswalk.c +++ b/trunk/drivers/acpi/parser/pswalk.c @@ -42,8 +42,7 @@ */ #include -#include "accommon.h" -#include "acparser.h" +#include #define _COMPONENT ACPI_PARSER ACPI_MODULE_NAME("pswalk") diff --git a/trunk/drivers/acpi/acpica/psxface.c b/trunk/drivers/acpi/parser/psxface.c similarity index 90% rename from trunk/drivers/acpi/acpica/psxface.c rename to trunk/drivers/acpi/parser/psxface.c index ff06032c0f06..270469aae842 100644 --- a/trunk/drivers/acpi/acpica/psxface.c +++ b/trunk/drivers/acpi/parser/psxface.c @@ -42,11 +42,9 @@ */ #include -#include "accommon.h" -#include "acparser.h" -#include "acdispat.h" -#include "acinterp.h" -#include "amlcode.h" +#include +#include +#include #define _COMPONENT ACPI_PARSER ACPI_MODULE_NAME("psxface") @@ -280,38 +278,6 @@ 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); diff --git a/trunk/drivers/acpi/power.c b/trunk/drivers/acpi/power.c index c926e7d4a0d6..bb7d50dd2818 100644 --- a/trunk/drivers/acpi/power.c +++ b/trunk/drivers/acpi/power.c @@ -139,8 +139,6 @@ 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) @@ -153,10 +151,8 @@ 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", - node_name, + acpi_ut_get_node_name(handle), *state ? "on" : "off")); return 0; diff --git a/trunk/drivers/acpi/reboot.c b/trunk/drivers/acpi/reboot.c index 93f91142d7ad..a6b662c00b67 100644 --- a/trunk/drivers/acpi/reboot.c +++ b/trunk/drivers/acpi/reboot.c @@ -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_reset(); + acpi_hw_low_level_write(8, reset_value, rr); break; } /* Wait ten seconds */ diff --git a/trunk/drivers/acpi/resources/Makefile b/trunk/drivers/acpi/resources/Makefile new file mode 100644 index 000000000000..8de4f69dfa09 --- /dev/null +++ b/trunk/drivers/acpi/resources/Makefile @@ -0,0 +1,10 @@ +# +# 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) diff --git a/trunk/drivers/acpi/acpica/rsaddr.c b/trunk/drivers/acpi/resources/rsaddr.c similarity index 99% rename from trunk/drivers/acpi/acpica/rsaddr.c rename to trunk/drivers/acpi/resources/rsaddr.c index 1e437bfd8db5..7f96332822bf 100644 --- a/trunk/drivers/acpi/acpica/rsaddr.c +++ b/trunk/drivers/acpi/resources/rsaddr.c @@ -42,8 +42,7 @@ */ #include -#include "accommon.h" -#include "acresrc.h" +#include #define _COMPONENT ACPI_RESOURCES ACPI_MODULE_NAME("rsaddr") diff --git a/trunk/drivers/acpi/acpica/rscalc.c b/trunk/drivers/acpi/resources/rscalc.c similarity index 99% rename from trunk/drivers/acpi/acpica/rscalc.c rename to trunk/drivers/acpi/resources/rscalc.c index 52865ee6bc77..8eaaecf92009 100644 --- a/trunk/drivers/acpi/acpica/rscalc.c +++ b/trunk/drivers/acpi/resources/rscalc.c @@ -42,9 +42,8 @@ */ #include -#include "accommon.h" -#include "acresrc.h" -#include "acnamesp.h" +#include +#include #define _COMPONENT ACPI_RESOURCES ACPI_MODULE_NAME("rscalc") diff --git a/trunk/drivers/acpi/acpica/rscreate.c b/trunk/drivers/acpi/resources/rscreate.c similarity index 99% rename from trunk/drivers/acpi/acpica/rscreate.c rename to trunk/drivers/acpi/resources/rscreate.c index 9eb3a2a68408..c0bbfa2c4193 100644 --- a/trunk/drivers/acpi/acpica/rscreate.c +++ b/trunk/drivers/acpi/resources/rscreate.c @@ -42,9 +42,8 @@ */ #include -#include "accommon.h" -#include "acresrc.h" -#include "acnamesp.h" +#include +#include #define _COMPONENT ACPI_RESOURCES ACPI_MODULE_NAME("rscreate") diff --git a/trunk/drivers/acpi/acpica/rsdump.c b/trunk/drivers/acpi/resources/rsdump.c similarity index 99% rename from trunk/drivers/acpi/acpica/rsdump.c rename to trunk/drivers/acpi/resources/rsdump.c index 3f0ca5a12d34..6bbbb7b8941a 100644 --- a/trunk/drivers/acpi/acpica/rsdump.c +++ b/trunk/drivers/acpi/resources/rsdump.c @@ -42,8 +42,7 @@ */ #include -#include "accommon.h" -#include "acresrc.h" +#include #define _COMPONENT ACPI_RESOURCES ACPI_MODULE_NAME("rsdump") diff --git a/trunk/drivers/acpi/acpica/rsinfo.c b/trunk/drivers/acpi/resources/rsinfo.c similarity index 99% rename from trunk/drivers/acpi/acpica/rsinfo.c rename to trunk/drivers/acpi/resources/rsinfo.c index 77b25fdb459c..3f0a1fedbe0e 100644 --- a/trunk/drivers/acpi/acpica/rsinfo.c +++ b/trunk/drivers/acpi/resources/rsinfo.c @@ -42,8 +42,7 @@ */ #include -#include "accommon.h" -#include "acresrc.h" +#include #define _COMPONENT ACPI_RESOURCES ACPI_MODULE_NAME("rsinfo") diff --git a/trunk/drivers/acpi/acpica/rsio.c b/trunk/drivers/acpi/resources/rsio.c similarity index 99% rename from trunk/drivers/acpi/acpica/rsio.c rename to trunk/drivers/acpi/resources/rsio.c index 35a49aa95609..b66d42e7402e 100644 --- a/trunk/drivers/acpi/acpica/rsio.c +++ b/trunk/drivers/acpi/resources/rsio.c @@ -42,8 +42,7 @@ */ #include -#include "accommon.h" -#include "acresrc.h" +#include #define _COMPONENT ACPI_RESOURCES ACPI_MODULE_NAME("rsio") diff --git a/trunk/drivers/acpi/acpica/rsirq.c b/trunk/drivers/acpi/resources/rsirq.c similarity index 99% rename from trunk/drivers/acpi/acpica/rsirq.c rename to trunk/drivers/acpi/resources/rsirq.c index 2e0256983aa6..a8805efc0366 100644 --- a/trunk/drivers/acpi/acpica/rsirq.c +++ b/trunk/drivers/acpi/resources/rsirq.c @@ -42,8 +42,7 @@ */ #include -#include "accommon.h" -#include "acresrc.h" +#include #define _COMPONENT ACPI_RESOURCES ACPI_MODULE_NAME("rsirq") diff --git a/trunk/drivers/acpi/acpica/rslist.c b/trunk/drivers/acpi/resources/rslist.c similarity index 99% rename from trunk/drivers/acpi/acpica/rslist.c rename to trunk/drivers/acpi/resources/rslist.c index 1b1dbc69f087..b78c7e797a19 100644 --- a/trunk/drivers/acpi/acpica/rslist.c +++ b/trunk/drivers/acpi/resources/rslist.c @@ -42,8 +42,7 @@ */ #include -#include "accommon.h" -#include "acresrc.h" +#include #define _COMPONENT ACPI_RESOURCES ACPI_MODULE_NAME("rslist") diff --git a/trunk/drivers/acpi/acpica/rsmemory.c b/trunk/drivers/acpi/resources/rsmemory.c similarity index 99% rename from trunk/drivers/acpi/acpica/rsmemory.c rename to trunk/drivers/acpi/resources/rsmemory.c index ddc76cebdc92..63b21abd90bb 100644 --- a/trunk/drivers/acpi/acpica/rsmemory.c +++ b/trunk/drivers/acpi/resources/rsmemory.c @@ -42,8 +42,7 @@ */ #include -#include "accommon.h" -#include "acresrc.h" +#include #define _COMPONENT ACPI_RESOURCES ACPI_MODULE_NAME("rsmemory") diff --git a/trunk/drivers/acpi/acpica/rsmisc.c b/trunk/drivers/acpi/resources/rsmisc.c similarity index 99% rename from trunk/drivers/acpi/acpica/rsmisc.c rename to trunk/drivers/acpi/resources/rsmisc.c index 5bc49a553284..96a6c0353255 100644 --- a/trunk/drivers/acpi/acpica/rsmisc.c +++ b/trunk/drivers/acpi/resources/rsmisc.c @@ -42,8 +42,7 @@ */ #include -#include "accommon.h" -#include "acresrc.h" +#include #define _COMPONENT ACPI_RESOURCES ACPI_MODULE_NAME("rsmisc") diff --git a/trunk/drivers/acpi/acpica/rsutils.c b/trunk/drivers/acpi/resources/rsutils.c similarity index 99% rename from trunk/drivers/acpi/acpica/rsutils.c rename to trunk/drivers/acpi/resources/rsutils.c index bc03d5966829..f7b3bcd59ba7 100644 --- a/trunk/drivers/acpi/acpica/rsutils.c +++ b/trunk/drivers/acpi/resources/rsutils.c @@ -42,9 +42,8 @@ */ #include -#include "accommon.h" -#include "acnamesp.h" -#include "acresrc.h" +#include +#include #define _COMPONENT ACPI_RESOURCES ACPI_MODULE_NAME("rsutils") diff --git a/trunk/drivers/acpi/acpica/rsxface.c b/trunk/drivers/acpi/resources/rsxface.c similarity index 99% rename from trunk/drivers/acpi/acpica/rsxface.c rename to trunk/drivers/acpi/resources/rsxface.c index 69a2aa5b5d83..f59f4c4e034c 100644 --- a/trunk/drivers/acpi/acpica/rsxface.c +++ b/trunk/drivers/acpi/resources/rsxface.c @@ -42,9 +42,8 @@ */ #include -#include "accommon.h" -#include "acresrc.h" -#include "acnamesp.h" +#include +#include #define _COMPONENT ACPI_RESOURCES ACPI_MODULE_NAME("rsxface") diff --git a/trunk/drivers/acpi/sbshc.c b/trunk/drivers/acpi/sbshc.c index 0619734895b2..e53e590252c0 100644 --- a/trunk/drivers/acpi/sbshc.c +++ b/trunk/drivers/acpi/sbshc.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/trunk/drivers/acpi/scan.c b/trunk/drivers/acpi/scan.c index c54d7b6c4066..39b7233c3485 100644 --- a/trunk/drivers/acpi/scan.c +++ b/trunk/drivers/acpi/scan.c @@ -10,6 +10,7 @@ #include #include +#include /* for acpi_ex_eisa_id_to_string() */ #define _COMPONENT ACPI_BUS_COMPONENT ACPI_MODULE_NAME("scan"); diff --git a/trunk/drivers/acpi/sleep/Makefile b/trunk/drivers/acpi/sleep/Makefile new file mode 100644 index 000000000000..f1fb888c2d29 --- /dev/null +++ b/trunk/drivers/acpi/sleep/Makefile @@ -0,0 +1,5 @@ +obj-y := wakeup.o +obj-y += main.o +obj-$(CONFIG_ACPI_SLEEP) += proc.o + +EXTRA_CFLAGS += $(ACPI_CFLAGS) diff --git a/trunk/drivers/acpi/main.c b/trunk/drivers/acpi/sleep/main.c similarity index 98% rename from trunk/drivers/acpi/main.c rename to trunk/drivers/acpi/sleep/main.c index d8242772de92..28a691cc625e 100644 --- a/trunk/drivers/acpi/main.c +++ b/trunk/drivers/acpi/sleep/main.c @@ -107,7 +107,7 @@ static bool set_sci_en_on_resume; */ static int acpi_pm_disable_gpes(void) { - acpi_disable_all_gpes(); + acpi_hw_disable_all_gpes(); return 0; } @@ -135,7 +135,7 @@ static int acpi_pm_prepare(void) int error = __acpi_pm_prepare(); if (!error) - acpi_disable_all_gpes(); + acpi_hw_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_disable_all_gpes(); + acpi_hw_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_enable_all_runtime_gpes(); + acpi_hw_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_disable_all_gpes(); + acpi_hw_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(ACPI_SIG_FACS, 1, + acpi_get_table_by_index(ACPI_TABLE_INDEX_FACS, (struct acpi_table_header **)&facs); if (facs) s4_hardware_signature = diff --git a/trunk/drivers/acpi/proc.c b/trunk/drivers/acpi/sleep/proc.c similarity index 91% rename from trunk/drivers/acpi/proc.c rename to trunk/drivers/acpi/sleep/proc.c index 1c4851ff2657..232d4b64140b 100644 --- a/trunk/drivers/acpi/proc.c +++ b/trunk/drivers/acpi/sleep/proc.c @@ -28,6 +28,8 @@ 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); @@ -82,49 +84,48 @@ acpi_system_write_sleep(struct file *file, #define HAVE_ACPI_LEGACY_ALARM #endif +static u32 cmos_bcd_read(int offset, int rtc_control); + #ifdef HAVE_ACPI_LEGACY_ALARM 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 @@ -149,6 +150,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); @@ -223,11 +238,13 @@ 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 -EINVAL; + return_VALUE(-EINVAL); if (copy_from_user(alarm_string, buffer, count)) - return -EFAULT; + return_VALUE(-EFAULT); alarm_string[count] = '\0'; @@ -328,7 +345,7 @@ acpi_system_write_alarm(struct file *file, result = 0; end: - return result ? result : count; + return_VALUE(result ? result : count); } #endif /* HAVE_ACPI_LEGACY_ALARM */ diff --git a/trunk/drivers/acpi/sleep.h b/trunk/drivers/acpi/sleep/sleep.h similarity index 100% rename from trunk/drivers/acpi/sleep.h rename to trunk/drivers/acpi/sleep/sleep.h diff --git a/trunk/drivers/acpi/wakeup.c b/trunk/drivers/acpi/sleep/wakeup.c similarity index 96% rename from trunk/drivers/acpi/wakeup.c rename to trunk/drivers/acpi/sleep/wakeup.c index 2d34806d45dd..dea4c23df764 100644 --- a/trunk/drivers/acpi/wakeup.c +++ b/trunk/drivers/acpi/sleep/wakeup.c @@ -8,6 +8,7 @@ #include #include #include +#include #include "sleep.h" #define _COMPONENT ACPI_SYSTEM_COMPONENT @@ -27,6 +28,8 @@ 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, @@ -58,6 +61,7 @@ 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 = @@ -99,6 +103,8 @@ 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 = diff --git a/trunk/drivers/acpi/system.c b/trunk/drivers/acpi/system.c index 391d0358a592..6e4107f82403 100644 --- a/trunk/drivers/acpi/system.c +++ b/trunk/drivers/acpi/system.c @@ -192,6 +192,65 @@ 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; @@ -250,7 +309,7 @@ static int get_status(u32 index, acpi_event_status *status, acpi_handle *handle) goto end; if (index < num_gpes) { - result = acpi_get_gpe_device(index, handle); + result = get_gpe_device(index, handle); if (result) { ACPI_EXCEPTION((AE_INFO, AE_NOT_FOUND, "Invalid GPE 0x%x\n", index)); @@ -377,7 +436,7 @@ void acpi_irq_stats_init(void) if (all_counters) return; - num_gpes = acpi_current_gpe_count; + num_gpes = count_num_gpes(); num_counters = num_gpes + ACPI_NUM_FIXED_EVENTS + NUM_COUNTERS_EXTRA; all_attrs = kzalloc(sizeof(struct attribute *) * (num_counters + 1), diff --git a/trunk/drivers/acpi/tables/Makefile b/trunk/drivers/acpi/tables/Makefile new file mode 100644 index 000000000000..7385efa61622 --- /dev/null +++ b/trunk/drivers/acpi/tables/Makefile @@ -0,0 +1,7 @@ +# +# 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) diff --git a/trunk/drivers/acpi/acpica/tbfadt.c b/trunk/drivers/acpi/tables/tbfadt.c similarity index 67% rename from trunk/drivers/acpi/acpica/tbfadt.c rename to trunk/drivers/acpi/tables/tbfadt.c index 3636e4f8fb73..2817158fb6a1 100644 --- a/trunk/drivers/acpi/acpica/tbfadt.c +++ b/trunk/drivers/acpi/tables/tbfadt.c @@ -42,16 +42,15 @@ */ #include -#include "accommon.h" -#include "actables.h" +#include #define _COMPONENT ACPI_TABLES ACPI_MODULE_NAME("tbfadt") /* Local prototypes */ -static inline void +static void inline acpi_tb_init_generic_address(struct acpi_generic_address *generic_address, - u8 space_id, u8 byte_width, u64 address); + u8 byte_width, u64 address); static void acpi_tb_convert_fadt(void); @@ -61,10 +60,9 @@ static void acpi_tb_validate_fadt(void); typedef struct acpi_fadt_info { char *name; - u8 address64; - u8 address32; + u8 target; + u8 source; u8 length; - u8 default_length; u8 type; } acpi_fadt_info; @@ -73,61 +71,37 @@ 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_PM1_REGISTER_WIDTH * 2, /* Enable + Status register */ - ACPI_FADT_REQUIRED}, + ACPI_FADT_OFFSET(pm1_event_length), 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), - ACPI_PM1_REGISTER_WIDTH * 2, /* Enable + Status register */ - 0}, + ACPI_FADT_OFFSET(pm1_event_length), 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_PM1_REGISTER_WIDTH, - ACPI_FADT_REQUIRED}, + ACPI_FADT_OFFSET(pm1_control_length), 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), - ACPI_PM1_REGISTER_WIDTH, - 0}, + ACPI_FADT_OFFSET(pm1_control_length), 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_PM2_REGISTER_WIDTH, - ACPI_FADT_SEPARATE_LENGTH}, + ACPI_FADT_OFFSET(pm2_control_length), 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_PM_TIMER_WIDTH, - ACPI_FADT_REQUIRED}, + ACPI_FADT_OFFSET(pm_timer_length), 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), - 0, - ACPI_FADT_SEPARATE_LENGTH}, + ACPI_FADT_OFFSET(gpe0_block_length), 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), - 0, - ACPI_FADT_SEPARATE_LENGTH} + ACPI_FADT_OFFSET(gpe1_block_length), ACPI_FADT_SEPARATE_LENGTH} }; #define ACPI_FADT_INFO_ENTRIES (sizeof (fadt_info_table) / sizeof (struct acpi_fadt_info)) @@ -148,9 +122,9 @@ static struct acpi_fadt_info fadt_info_table[] = { * ******************************************************************************/ -static inline void +static void inline acpi_tb_init_generic_address(struct acpi_generic_address *generic_address, - u8 space_id, u8 byte_width, u64 address) + u8 byte_width, u64 address) { /* @@ -161,10 +135,10 @@ acpi_tb_init_generic_address(struct acpi_generic_address *generic_address, /* All other fields are byte-wide */ - generic_address->space_id = space_id; - generic_address->bit_width = (u8)ACPI_MUL_8(byte_width); + generic_address->space_id = ACPI_ADR_SPACE_SYSTEM_IO; + generic_address->bit_width = byte_width << 3; generic_address->bit_offset = 0; - generic_address->access_width = 0; /* Access width ANY */ + generic_address->access_width = 0; } /******************************************************************************* @@ -251,8 +225,7 @@ 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))); } @@ -271,6 +244,7 @@ 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(); } /******************************************************************************* @@ -304,36 +278,22 @@ void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length) static void acpi_tb_convert_fadt(void) { - u8 pm1_register_bit_width; - u8 pm1_register_byte_width; - struct acpi_generic_address *target64; + u8 pm1_register_length; + struct acpi_generic_address *target; 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. - * 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. - */ + /* Expand the 32-bit FACS and DSDT addresses to 64-bit as necessary */ + 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!")); } /* @@ -352,23 +312,18 @@ static void acpi_tb_convert_fadt(void) } /* - * 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. + * Expand the ACPI 1.0 32-bit V1.0 addresses to the ACPI 2.0 64-bit "X" + * generic address structures as necessary. */ for (i = 0; i < ACPI_FADT_INFO_ENTRIES; i++) { - target64 = + target = ACPI_ADD_PTR(struct acpi_generic_address, &acpi_gbl_FADT, - fadt_info_table[i].address64); + fadt_info_table[i].target); - /* Expand only if the 64-bit X target is null */ + /* Expand only if the X target is null */ - 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, + if (!target->address) { + acpi_tb_init_generic_address(target, *ACPI_ADD_PTR(u8, &acpi_gbl_FADT, fadt_info_table @@ -377,63 +332,10 @@ static void acpi_tb_convert_fadt(void) &acpi_gbl_FADT, fadt_info_table [i]. - 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; - } + source)); } } - /* - * 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 @@ -454,14 +356,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, - acpi_gbl_FADT.xpm1a_event_block.space_id, - pm1_register_byte_width, + pm1_register_length, (acpi_gbl_FADT.xpm1a_event_block.address + - pm1_register_byte_width)); + pm1_register_length)); /* Don't forget to copy space_id of the GAS */ acpi_gbl_xpm1a_enable.space_id = acpi_gbl_FADT.xpm1a_event_block.space_id; @@ -477,10 +379,9 @@ 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, - acpi_gbl_FADT.xpm1b_event_block.space_id, - pm1_register_byte_width, + pm1_register_length, (acpi_gbl_FADT.xpm1b_event_block. - address + pm1_register_byte_width)); + address + pm1_register_length)); /* Don't forget to copy space_id of the GAS */ acpi_gbl_xpm1b_enable.space_id = acpi_gbl_FADT.xpm1b_event_block.space_id; @@ -510,63 +411,26 @@ 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; - /* - * 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))); - } - - 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))); - } - /* Examine all of the 64-bit extended address fields (X fields) */ 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); + + /* Generate pointers to the 32-bit and 64-bit addresses and get the length */ + + address64 = + ACPI_ADD_PTR(struct acpi_generic_address, &acpi_gbl_FADT, + fadt_info_table[i].target); address32 = ACPI_ADD_PTR(u32, &acpi_gbl_FADT, - fadt_info_table[i].address32); + fadt_info_table[i].source); 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) { /* @@ -575,8 +439,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", - name, + "Required field \"%s\" has zero address and/or length: %8.8X%8.8X/%X", + fadt_info_table[i].name, ACPI_FORMAT_UINT64(address64-> address), length)); @@ -589,8 +453,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", - name, + "Optional field \"%s\" has zero address or length: %8.8X%8.8X/%X", + fadt_info_table[i].name, ACPI_FORMAT_UINT64(address64-> address), length)); @@ -602,8 +466,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", - name, *address32, + "32/64X address mismatch in \"%s\": [%8.8X] [%8.8X%8.8X], using 64X", + fadt_info_table[i].name, *address32, ACPI_FORMAT_UINT64(address64->address))); } } diff --git a/trunk/drivers/acpi/acpica/tbfind.c b/trunk/drivers/acpi/tables/tbfind.c similarity index 99% rename from trunk/drivers/acpi/acpica/tbfind.c rename to trunk/drivers/acpi/tables/tbfind.c index 1054dfd49207..531584defbb8 100644 --- a/trunk/drivers/acpi/acpica/tbfind.c +++ b/trunk/drivers/acpi/tables/tbfind.c @@ -42,8 +42,7 @@ */ #include -#include "accommon.h" -#include "actables.h" +#include #define _COMPONENT ACPI_TABLES ACPI_MODULE_NAME("tbfind") diff --git a/trunk/drivers/acpi/acpica/tbinstal.c b/trunk/drivers/acpi/tables/tbinstal.c similarity index 99% rename from trunk/drivers/acpi/acpica/tbinstal.c rename to trunk/drivers/acpi/tables/tbinstal.c index 37374b21969d..18747ce8dd2f 100644 --- a/trunk/drivers/acpi/acpica/tbinstal.c +++ b/trunk/drivers/acpi/tables/tbinstal.c @@ -42,9 +42,8 @@ */ #include -#include "accommon.h" -#include "acnamesp.h" -#include "actables.h" +#include +#include #define _COMPONENT ACPI_TABLES ACPI_MODULE_NAME("tbinstal") diff --git a/trunk/drivers/acpi/acpica/tbutils.c b/trunk/drivers/acpi/tables/tbutils.c similarity index 96% rename from trunk/drivers/acpi/acpica/tbutils.c rename to trunk/drivers/acpi/tables/tbutils.c index 3a8d8d2eee92..0cc92ef5236f 100644 --- a/trunk/drivers/acpi/acpica/tbutils.c +++ b/trunk/drivers/acpi/tables/tbutils.c @@ -42,8 +42,7 @@ */ #include -#include "accommon.h" -#include "actables.h" +#include #define _COMPONENT ACPI_TABLES ACPI_MODULE_NAME("tbutils") @@ -112,30 +111,6 @@ 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 diff --git a/trunk/drivers/acpi/acpica/tbxface.c b/trunk/drivers/acpi/tables/tbxface.c similarity index 99% rename from trunk/drivers/acpi/acpica/tbxface.c rename to trunk/drivers/acpi/tables/tbxface.c index c3e841f3cde9..fd7770aa1061 100644 --- a/trunk/drivers/acpi/acpica/tbxface.c +++ b/trunk/drivers/acpi/tables/tbxface.c @@ -43,9 +43,8 @@ */ #include -#include "accommon.h" -#include "acnamesp.h" -#include "actables.h" +#include +#include #define _COMPONENT ACPI_TABLES ACPI_MODULE_NAME("tbxface") diff --git a/trunk/drivers/acpi/acpica/tbxfroot.c b/trunk/drivers/acpi/tables/tbxfroot.c similarity index 99% rename from trunk/drivers/acpi/acpica/tbxfroot.c rename to trunk/drivers/acpi/tables/tbxfroot.c index b7fc8dd43341..2d157e0f98d2 100644 --- a/trunk/drivers/acpi/acpica/tbxfroot.c +++ b/trunk/drivers/acpi/tables/tbxfroot.c @@ -42,8 +42,7 @@ */ #include -#include "accommon.h" -#include "actables.h" +#include #define _COMPONENT ACPI_TABLES ACPI_MODULE_NAME("tbxfroot") diff --git a/trunk/drivers/acpi/toshiba_acpi.c b/trunk/drivers/acpi/toshiba_acpi.c index 40e60fc2e596..25f531d892de 100644 --- a/trunk/drivers/acpi/toshiba_acpi.c +++ b/trunk/drivers/acpi/toshiba_acpi.c @@ -824,36 +824,32 @@ 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 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; - } + /* 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; } return 0; diff --git a/trunk/drivers/acpi/utilities/Makefile b/trunk/drivers/acpi/utilities/Makefile new file mode 100644 index 000000000000..88eff14c4894 --- /dev/null +++ b/trunk/drivers/acpi/utilities/Makefile @@ -0,0 +1,9 @@ +# +# 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/trunk/drivers/acpi/acpica/utalloc.c b/trunk/drivers/acpi/utilities/utalloc.c similarity index 99% rename from trunk/drivers/acpi/acpica/utalloc.c rename to trunk/drivers/acpi/utilities/utalloc.c index 7580f6b3069e..241c535c1753 100644 --- a/trunk/drivers/acpi/acpica/utalloc.c +++ b/trunk/drivers/acpi/utilities/utalloc.c @@ -42,8 +42,7 @@ */ #include -#include "accommon.h" -#include "acdebug.h" +#include #define _COMPONENT ACPI_UTILITIES ACPI_MODULE_NAME("utalloc") diff --git a/trunk/drivers/acpi/utilities/utcache.c b/trunk/drivers/acpi/utilities/utcache.c new file mode 100644 index 000000000000..245fa80cf600 --- /dev/null +++ b/trunk/drivers/acpi/utilities/utcache.c @@ -0,0 +1,314 @@ +/****************************************************************************** + * + * 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 + +#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 */ diff --git a/trunk/drivers/acpi/acpica/utcopy.c b/trunk/drivers/acpi/utilities/utcopy.c similarity index 99% rename from trunk/drivers/acpi/acpica/utcopy.c rename to trunk/drivers/acpi/utilities/utcopy.c index b0dcfd3c872a..5b2f7c27b705 100644 --- a/trunk/drivers/acpi/acpica/utcopy.c +++ b/trunk/drivers/acpi/utilities/utcopy.c @@ -42,8 +42,7 @@ */ #include -#include "accommon.h" -#include "acnamesp.h" +#include #define _COMPONENT ACPI_UTILITIES diff --git a/trunk/drivers/acpi/acpica/utdebug.c b/trunk/drivers/acpi/utilities/utdebug.c similarity index 89% rename from trunk/drivers/acpi/acpica/utdebug.c rename to trunk/drivers/acpi/utilities/utdebug.c index 38821f53042c..fd66ecb6741e 100644 --- a/trunk/drivers/acpi/acpica/utdebug.c +++ b/trunk/drivers/acpi/utilities/utdebug.c @@ -42,7 +42,6 @@ */ #include -#include "accommon.h" #define _COMPONENT ACPI_UTILITIES ACPI_MODULE_NAME("utdebug") @@ -137,7 +136,7 @@ static const char *acpi_ut_trim_function_name(const char *function_name) /******************************************************************************* * - * FUNCTION: acpi_debug_print + * FUNCTION: acpi_ut_debug_print * * PARAMETERS: requested_debug_level - Requested debug print level * line_number - Caller's line number (for error output) @@ -155,11 +154,11 @@ static const char *acpi_ut_trim_function_name(const char *function_name) ******************************************************************************/ 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_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_thread_id thread_id; va_list args; @@ -206,11 +205,11 @@ acpi_debug_print(u32 requested_debug_level, va_end(args); } -ACPI_EXPORT_SYMBOL(acpi_debug_print) +ACPI_EXPORT_SYMBOL(acpi_ut_debug_print) /******************************************************************************* * - * FUNCTION: acpi_debug_print_raw + * FUNCTION: acpi_ut_debug_print_raw * * PARAMETERS: requested_debug_level - Requested debug print level * line_number - Caller's line number @@ -227,11 +226,11 @@ ACPI_EXPORT_SYMBOL(acpi_debug_print) * ******************************************************************************/ 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_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, ...) { va_list args; @@ -245,7 +244,7 @@ acpi_debug_print_raw(u32 requested_debug_level, va_end(args); } -ACPI_EXPORT_SYMBOL(acpi_debug_print_raw) +ACPI_EXPORT_SYMBOL(acpi_ut_debug_print_raw) /******************************************************************************* * @@ -271,9 +270,9 @@ acpi_ut_trace(u32 line_number, acpi_gbl_nesting_level++; acpi_ut_track_stack_ptr(); - acpi_debug_print(ACPI_LV_FUNCTIONS, - line_number, function_name, module_name, component_id, - "%s\n", acpi_gbl_fn_entry_str); + acpi_ut_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) @@ -302,9 +301,10 @@ acpi_ut_trace_ptr(u32 line_number, acpi_gbl_nesting_level++; acpi_ut_track_stack_ptr(); - acpi_debug_print(ACPI_LV_FUNCTIONS, - line_number, function_name, module_name, component_id, - "%s %p\n", acpi_gbl_fn_entry_str, pointer); + acpi_ut_debug_print(ACPI_LV_FUNCTIONS, + line_number, function_name, module_name, + component_id, "%s %p\n", acpi_gbl_fn_entry_str, + pointer); } /******************************************************************************* @@ -333,9 +333,10 @@ acpi_ut_trace_str(u32 line_number, acpi_gbl_nesting_level++; acpi_ut_track_stack_ptr(); - acpi_debug_print(ACPI_LV_FUNCTIONS, - line_number, function_name, module_name, component_id, - "%s %s\n", acpi_gbl_fn_entry_str, string); + acpi_ut_debug_print(ACPI_LV_FUNCTIONS, + line_number, function_name, module_name, + component_id, "%s %s\n", acpi_gbl_fn_entry_str, + string); } /******************************************************************************* @@ -364,9 +365,10 @@ acpi_ut_trace_u32(u32 line_number, acpi_gbl_nesting_level++; acpi_ut_track_stack_ptr(); - acpi_debug_print(ACPI_LV_FUNCTIONS, - line_number, function_name, module_name, component_id, - "%s %08X\n", acpi_gbl_fn_entry_str, integer); + acpi_ut_debug_print(ACPI_LV_FUNCTIONS, + line_number, function_name, module_name, + component_id, "%s %08X\n", acpi_gbl_fn_entry_str, + integer); } /******************************************************************************* @@ -391,9 +393,9 @@ acpi_ut_exit(u32 line_number, const char *module_name, u32 component_id) { - acpi_debug_print(ACPI_LV_FUNCTIONS, - line_number, function_name, module_name, component_id, - "%s\n", acpi_gbl_fn_exit_str); + acpi_ut_debug_print(ACPI_LV_FUNCTIONS, + line_number, function_name, module_name, + component_id, "%s\n", acpi_gbl_fn_exit_str); acpi_gbl_nesting_level--; } @@ -424,16 +426,17 @@ acpi_ut_status_exit(u32 line_number, { if (ACPI_SUCCESS(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)); + 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)); } else { - 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_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_gbl_nesting_level--; @@ -464,10 +467,10 @@ acpi_ut_value_exit(u32 line_number, u32 component_id, acpi_integer 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_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_gbl_nesting_level--; } @@ -496,9 +499,9 @@ acpi_ut_ptr_exit(u32 line_number, const char *module_name, u32 component_id, u8 *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_ut_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--; } diff --git a/trunk/drivers/acpi/acpica/utdelete.c b/trunk/drivers/acpi/utilities/utdelete.c similarity index 99% rename from trunk/drivers/acpi/acpica/utdelete.c rename to trunk/drivers/acpi/utilities/utdelete.c index a0be9e39531e..d197c6b29e17 100644 --- a/trunk/drivers/acpi/acpica/utdelete.c +++ b/trunk/drivers/acpi/utilities/utdelete.c @@ -42,10 +42,9 @@ */ #include -#include "accommon.h" -#include "acinterp.h" -#include "acnamesp.h" -#include "acevents.h" +#include +#include +#include #define _COMPONENT ACPI_UTILITIES ACPI_MODULE_NAME("utdelete") diff --git a/trunk/drivers/acpi/acpica/uteval.c b/trunk/drivers/acpi/utilities/uteval.c similarity index 99% rename from trunk/drivers/acpi/acpica/uteval.c rename to trunk/drivers/acpi/utilities/uteval.c index da9450bc60f7..352747e49c7a 100644 --- a/trunk/drivers/acpi/acpica/uteval.c +++ b/trunk/drivers/acpi/utilities/uteval.c @@ -42,9 +42,8 @@ */ #include -#include "accommon.h" -#include "acnamesp.h" -#include "acinterp.h" +#include +#include #define _COMPONENT ACPI_UTILITIES ACPI_MODULE_NAME("uteval") @@ -130,7 +129,7 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state) /* The interface is supported */ - return_ACPI_STATUS(AE_OK); + return_ACPI_STATUS(AE_CTRL_TERMINATE); } } @@ -144,13 +143,13 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state) /* The interface is supported */ - return_ACPI_STATUS(AE_OK); + return_ACPI_STATUS(AE_CTRL_TERMINATE); } /* The interface is not supported */ return_desc->integer.value = 0; - return_ACPI_STATUS(AE_OK); + return_ACPI_STATUS(AE_CTRL_TERMINATE); } /******************************************************************************* diff --git a/trunk/drivers/acpi/acpica/utglobal.c b/trunk/drivers/acpi/utilities/utglobal.c similarity index 99% rename from trunk/drivers/acpi/acpica/utglobal.c rename to trunk/drivers/acpi/utilities/utglobal.c index a3ab9d9da299..670551b95e56 100644 --- a/trunk/drivers/acpi/acpica/utglobal.c +++ b/trunk/drivers/acpi/utilities/utglobal.c @@ -44,11 +44,11 @@ #define DEFINE_ACPI_GLOBALS #include -#include "accommon.h" -#include "acnamesp.h" +#include +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 = 0; +u32 acpi_dbg_layer = ACPI_COMPONENT_DEFAULT | ACPI_ALL_DRIVERS; 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", - "SystemCMOS", + "CMOS", "PCIBARTarget", "DataTable" }; @@ -756,7 +756,6 @@ 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 */ @@ -772,7 +771,6 @@ 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 */ @@ -817,7 +815,5 @@ 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) diff --git a/trunk/drivers/acpi/acpica/utinit.c b/trunk/drivers/acpi/utilities/utinit.c similarity index 98% rename from trunk/drivers/acpi/acpica/utinit.c rename to trunk/drivers/acpi/utilities/utinit.c index a54ca84eb362..cae515fc02d3 100644 --- a/trunk/drivers/acpi/acpica/utinit.c +++ b/trunk/drivers/acpi/utilities/utinit.c @@ -42,10 +42,9 @@ */ #include -#include "accommon.h" -#include "acnamesp.h" -#include "acevents.h" -#include "actables.h" +#include +#include +#include #define _COMPONENT ACPI_UTILITIES ACPI_MODULE_NAME("utinit") diff --git a/trunk/drivers/acpi/acpica/utmath.c b/trunk/drivers/acpi/utilities/utmath.c similarity index 99% rename from trunk/drivers/acpi/acpica/utmath.c rename to trunk/drivers/acpi/utilities/utmath.c index c9f682d640ef..c927324fdd26 100644 --- a/trunk/drivers/acpi/acpica/utmath.c +++ b/trunk/drivers/acpi/utilities/utmath.c @@ -42,7 +42,6 @@ */ #include -#include "accommon.h" #define _COMPONENT ACPI_UTILITIES ACPI_MODULE_NAME("utmath") diff --git a/trunk/drivers/acpi/acpica/utmisc.c b/trunk/drivers/acpi/utilities/utmisc.c similarity index 97% rename from trunk/drivers/acpi/acpica/utmisc.c rename to trunk/drivers/acpi/utilities/utmisc.c index c1f7f4e1a72d..9089a158a874 100644 --- a/trunk/drivers/acpi/acpica/utmisc.c +++ b/trunk/drivers/acpi/utilities/utmisc.c @@ -44,8 +44,7 @@ #include #include -#include "accommon.h" -#include "acnamesp.h" +#include #define _COMPONENT ACPI_UTILITIES ACPI_MODULE_NAME("utmisc") @@ -1017,7 +1016,7 @@ acpi_ut_walk_package_tree(union acpi_operand_object * source_object, /******************************************************************************* * - * FUNCTION: acpi_error, acpi_exception, acpi_warning, acpi_info + * FUNCTION: acpi_ut_error, acpi_ut_warning, acpi_ut_info * * PARAMETERS: module_name - Caller's module name (for error output) * line_number - Caller's line number (for error output) @@ -1030,7 +1029,7 @@ acpi_ut_walk_package_tree(union acpi_operand_object * source_object, ******************************************************************************/ void ACPI_INTERNAL_VAR_XFACE -acpi_error(const char *module_name, u32 line_number, const char *format, ...) +acpi_ut_error(const char *module_name, u32 line_number, const char *format, ...) { va_list args; @@ -1043,8 +1042,8 @@ acpi_error(const char *module_name, u32 line_number, const char *format, ...) } void ACPI_INTERNAL_VAR_XFACE -acpi_exception(const char *module_name, - u32 line_number, acpi_status status, const char *format, ...) +acpi_ut_exception(const char *module_name, + u32 line_number, acpi_status status, const char *format, ...) { va_list args; @@ -1057,8 +1056,11 @@ acpi_exception(const char *module_name, va_end(args); } +EXPORT_SYMBOL(acpi_ut_exception); + void ACPI_INTERNAL_VAR_XFACE -acpi_warning(const char *module_name, u32 line_number, const char *format, ...) +acpi_ut_warning(const char *module_name, + u32 line_number, const char *format, ...) { va_list args; @@ -1071,7 +1073,7 @@ acpi_warning(const char *module_name, u32 line_number, const char *format, ...) } void ACPI_INTERNAL_VAR_XFACE -acpi_info(const char *module_name, u32 line_number, const char *format, ...) +acpi_ut_info(const char *module_name, u32 line_number, const char *format, ...) { va_list args; @@ -1086,8 +1088,3 @@ acpi_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) diff --git a/trunk/drivers/acpi/acpica/utmutex.c b/trunk/drivers/acpi/utilities/utmutex.c similarity index 99% rename from trunk/drivers/acpi/acpica/utmutex.c rename to trunk/drivers/acpi/utilities/utmutex.c index 14eb52c4d647..7331dde9e1b3 100644 --- a/trunk/drivers/acpi/acpica/utmutex.c +++ b/trunk/drivers/acpi/utilities/utmutex.c @@ -42,7 +42,6 @@ */ #include -#include "accommon.h" #define _COMPONENT ACPI_UTILITIES ACPI_MODULE_NAME("utmutex") diff --git a/trunk/drivers/acpi/acpica/utobject.c b/trunk/drivers/acpi/utilities/utobject.c similarity index 99% rename from trunk/drivers/acpi/acpica/utobject.c rename to trunk/drivers/acpi/utilities/utobject.c index 4279ed3a8782..c354e7a42bcd 100644 --- a/trunk/drivers/acpi/acpica/utobject.c +++ b/trunk/drivers/acpi/utilities/utobject.c @@ -42,8 +42,7 @@ */ #include -#include "accommon.h" -#include "acnamesp.h" +#include #define _COMPONENT ACPI_UTILITIES ACPI_MODULE_NAME("utobject") diff --git a/trunk/drivers/acpi/acpica/utresrc.c b/trunk/drivers/acpi/utilities/utresrc.c similarity index 99% rename from trunk/drivers/acpi/acpica/utresrc.c rename to trunk/drivers/acpi/utilities/utresrc.c index 91b7c00236f4..c3e3e1308edc 100644 --- a/trunk/drivers/acpi/acpica/utresrc.c +++ b/trunk/drivers/acpi/utilities/utresrc.c @@ -42,8 +42,7 @@ */ #include -#include "accommon.h" -#include "amlresrc.h" +#include #define _COMPONENT ACPI_UTILITIES ACPI_MODULE_NAME("utresrc") diff --git a/trunk/drivers/acpi/acpica/utstate.c b/trunk/drivers/acpi/utilities/utstate.c similarity index 99% rename from trunk/drivers/acpi/acpica/utstate.c rename to trunk/drivers/acpi/utilities/utstate.c index 0440c958f5a4..63a6d3d77d88 100644 --- a/trunk/drivers/acpi/acpica/utstate.c +++ b/trunk/drivers/acpi/utilities/utstate.c @@ -42,7 +42,6 @@ */ #include -#include "accommon.h" #define _COMPONENT ACPI_UTILITIES ACPI_MODULE_NAME("utstate") diff --git a/trunk/drivers/acpi/acpica/utxface.c b/trunk/drivers/acpi/utilities/utxface.c similarity index 97% rename from trunk/drivers/acpi/acpica/utxface.c rename to trunk/drivers/acpi/utilities/utxface.c index 078a22728c6b..c198a4d40583 100644 --- a/trunk/drivers/acpi/acpica/utxface.c +++ b/trunk/drivers/acpi/utilities/utxface.c @@ -42,11 +42,9 @@ */ #include -#include "accommon.h" -#include "acevents.h" -#include "acnamesp.h" -#include "acdebug.h" -#include "actables.h" +#include +#include +#include #define _COMPONENT ACPI_UTILITIES ACPI_MODULE_NAME("utxface") @@ -149,16 +147,6 @@ 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 diff --git a/trunk/drivers/ata/libata-acpi.c b/trunk/drivers/ata/libata-acpi.c index 246987f0b88c..c012307d0ba6 100644 --- a/trunk/drivers/ata/libata-acpi.c +++ b/trunk/drivers/ata/libata-acpi.c @@ -19,6 +19,12 @@ #include "libata.h" #include +#include +#include +#include +#include +#include +#include enum { ATA_ACPI_FILTER_SETXFER = 1 << 0, diff --git a/trunk/drivers/ata/libata-core.c b/trunk/drivers/ata/libata-core.c index bc6695e3c848..5e2eb740df46 100644 --- a/trunk/drivers/ata/libata-core.c +++ b/trunk/drivers/ata/libata-core.c @@ -4050,70 +4050,17 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { { "ST3160023AS", "3.42", ATA_HORKAGE_NONCQ }, /* Seagate NCQ + FLUSH CACHE firmware bug */ - { "ST31500341AS", "SD15", ATA_HORKAGE_NONCQ | + { "ST31500341AS", "9JU138", ATA_HORKAGE_NONCQ | ATA_HORKAGE_FIRMWARE_WARN }, - { "ST31500341AS", "SD16", ATA_HORKAGE_NONCQ | + { "ST31000333AS", "9FZ136", ATA_HORKAGE_NONCQ | ATA_HORKAGE_FIRMWARE_WARN }, - { "ST31500341AS", "SD17", ATA_HORKAGE_NONCQ | + { "ST3640623AS", "9FZ164", ATA_HORKAGE_NONCQ | ATA_HORKAGE_FIRMWARE_WARN }, - { "ST31500341AS", "SD18", ATA_HORKAGE_NONCQ | + { "ST3640323AS", "9FZ134", ATA_HORKAGE_NONCQ | ATA_HORKAGE_FIRMWARE_WARN }, - { "ST31500341AS", "SD19", ATA_HORKAGE_NONCQ | + { "ST3320813AS", "9FZ182", ATA_HORKAGE_NONCQ | ATA_HORKAGE_FIRMWARE_WARN }, - - { "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 | + { "ST3320613AS", "9FZ162", ATA_HORKAGE_NONCQ | ATA_HORKAGE_FIRMWARE_WARN }, /* Blacklist entries taken from Silicon Image 3124/3132 diff --git a/trunk/drivers/ata/pata_acpi.c b/trunk/drivers/ata/pata_acpi.c index 8b77a9802df1..e2e332d8ff95 100644 --- a/trunk/drivers/ata/pata_acpi.c +++ b/trunk/drivers/ata/pata_acpi.c @@ -13,6 +13,12 @@ #include #include #include +#include +#include +#include +#include +#include +#include #include #include diff --git a/trunk/drivers/ata/pata_hpt366.c b/trunk/drivers/ata/pata_hpt366.c index e0c4f05d7d57..a098ba8eaab6 100644 --- a/trunk/drivers/ata/pata_hpt366.c +++ b/trunk/drivers/ata/pata_hpt366.c @@ -183,9 +183,7 @@ 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); } @@ -213,15 +211,11 @@ static u32 hpt36x_find_mode(struct ata_port *ap, int speed) static int hpt36x_cable_detect(struct ata_port *ap) { - struct pci_dev *pdev = to_pci_dev(ap->host->dev); u8 ata66; + struct pci_dev *pdev = to_pci_dev(ap->host->dev); - /* - * 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 & 2) + if (ata66 & (1 << ap->port_no)) return ATA_CBL_PATA40; return ATA_CBL_PATA80; } diff --git a/trunk/drivers/block/cciss.c b/trunk/drivers/block/cciss.c index 9f7c543cc04b..9364dc554257 100644 --- a/trunk/drivers/block/cciss.c +++ b/trunk/drivers/block/cciss.c @@ -1693,11 +1693,6 @@ 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); diff --git a/trunk/drivers/block/pktcdvd.c b/trunk/drivers/block/pktcdvd.c index dc7a8c352da2..edda7b6b077b 100644 --- a/trunk/drivers/block/pktcdvd.c +++ b/trunk/drivers/block/pktcdvd.c @@ -302,7 +302,7 @@ static struct kobj_type kobj_pkt_type_wqueue = { static void pkt_sysfs_dev_new(struct pktcdvd_device *pd) { if (class_pktcdvd) { - pd->dev = device_create(class_pktcdvd, NULL, MKDEV(0, 0), NULL, + pd->dev = device_create(class_pktcdvd, NULL, pd->pkt_dev, NULL, "%s", pd->name); if (IS_ERR(pd->dev)) pd->dev = NULL; diff --git a/trunk/drivers/cdrom/cdrom.c b/trunk/drivers/cdrom/cdrom.c index 7d2e91cccb13..d16b02423d61 100644 --- a/trunk/drivers/cdrom/cdrom.c +++ b/trunk/drivers/cdrom/cdrom.c @@ -2081,6 +2081,10 @@ 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) { @@ -2092,17 +2096,9 @@ 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) { - blk_put_request(rq); + if (ret) break; - } rq->cmd[0] = GPCMD_READ_CD; rq->cmd[1] = 1 << 2; @@ -2128,7 +2124,6 @@ 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; @@ -2138,6 +2133,7 @@ static int cdrom_read_cdda_bpc(struct cdrom_device_info *cdi, __u8 __user *ubuf, ubuf += len; } + blk_put_request(rq); return ret; } diff --git a/trunk/drivers/char/cp437.uni b/trunk/drivers/char/cp437.uni index bc6163484f62..1f06889a96b9 100644 --- a/trunk/drivers/char/cp437.uni +++ b/trunk/drivers/char/cp437.uni @@ -27,7 +27,7 @@ 0x0c U+2640 0x0d U+266a 0x0e U+266b -0x0f U+263c U+00a4 +0x0f U+263c 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 U+00b4 +0x27 U+0027 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 U+00d0 +0x44 U+0044 0x45 U+0045 U+00c8 U+00ca U+00cb 0x46 U+0046 0x47 U+0047 @@ -140,7 +140,7 @@ 0x79 U+0079 U+00fd 0x7a U+007a 0x7b U+007b -0x7c U+007c U+00a6 +0x7c U+007c U+00a5 0x7d U+007d 0x7e U+007e # @@ -263,10 +263,10 @@ 0xe8 U+03a6 U+00d8 0xe9 U+0398 0xea U+03a9 U+2126 -0xeb U+03b4 U+00f0 +0xeb U+03b4 0xec U+221e 0xed U+03c6 U+00f8 -0xee U+03b5 U+2208 +0xee U+03b5 0xef U+2229 0xf0 U+2261 0xf1 U+00b1 diff --git a/trunk/drivers/char/tpm/tpm_bios.c b/trunk/drivers/char/tpm/tpm_bios.c index ed306eb1057f..68f052b42ed7 100644 --- a/trunk/drivers/char/tpm/tpm_bios.c +++ b/trunk/drivers/char/tpm/tpm_bios.c @@ -23,6 +23,8 @@ #include #include #include +#include +#include #include "tpm.h" #define TCG_EVENT_NAME_LEN_MAX 255 diff --git a/trunk/drivers/char/vt.c b/trunk/drivers/char/vt.c index 008176edbd64..a5af6072e2b3 100644 --- a/trunk/drivers/char/vt.c +++ b/trunk/drivers/char/vt.c @@ -2274,7 +2274,7 @@ static int do_con_write(struct tty_struct *tty, const unsigned char *buf, int co 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 diff --git a/trunk/drivers/char/xilinx_hwicap/buffer_icap.c b/trunk/drivers/char/xilinx_hwicap/buffer_icap.c index 05d897764f02..aa7f7962a9a0 100644 --- a/trunk/drivers/char/xilinx_hwicap/buffer_icap.c +++ b/trunk/drivers/char/xilinx_hwicap/buffer_icap.c @@ -21,6 +21,9 @@ * 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. * diff --git a/trunk/drivers/char/xilinx_hwicap/buffer_icap.h b/trunk/drivers/char/xilinx_hwicap/buffer_icap.h index d4f419ee87ab..8b0252bf06e2 100644 --- a/trunk/drivers/char/xilinx_hwicap/buffer_icap.h +++ b/trunk/drivers/char/xilinx_hwicap/buffer_icap.h @@ -21,6 +21,9 @@ * 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. * diff --git a/trunk/drivers/char/xilinx_hwicap/fifo_icap.c b/trunk/drivers/char/xilinx_hwicap/fifo_icap.c index 02225eb19cf6..776b50528478 100644 --- a/trunk/drivers/char/xilinx_hwicap/fifo_icap.c +++ b/trunk/drivers/char/xilinx_hwicap/fifo_icap.c @@ -21,6 +21,9 @@ * 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. * diff --git a/trunk/drivers/char/xilinx_hwicap/fifo_icap.h b/trunk/drivers/char/xilinx_hwicap/fifo_icap.h index 4c9dd9a3b62a..62bda453c90b 100644 --- a/trunk/drivers/char/xilinx_hwicap/fifo_icap.h +++ b/trunk/drivers/char/xilinx_hwicap/fifo_icap.h @@ -21,6 +21,9 @@ * 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. * diff --git a/trunk/drivers/char/xilinx_hwicap/xilinx_hwicap.c b/trunk/drivers/char/xilinx_hwicap/xilinx_hwicap.c index f40ab699860f..d16131949097 100644 --- a/trunk/drivers/char/xilinx_hwicap/xilinx_hwicap.c +++ b/trunk/drivers/char/xilinx_hwicap/xilinx_hwicap.c @@ -21,6 +21,9 @@ * 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. diff --git a/trunk/drivers/char/xilinx_hwicap/xilinx_hwicap.h b/trunk/drivers/char/xilinx_hwicap/xilinx_hwicap.h index 8cca11981c5f..24d0d9b938fb 100644 --- a/trunk/drivers/char/xilinx_hwicap/xilinx_hwicap.h +++ b/trunk/drivers/char/xilinx_hwicap/xilinx_hwicap.h @@ -21,6 +21,9 @@ * 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. * diff --git a/trunk/drivers/dma/dmaengine.c b/trunk/drivers/dma/dmaengine.c index 657996517374..5317e08221ec 100644 --- a/trunk/drivers/dma/dmaengine.c +++ b/trunk/drivers/dma/dmaengine.c @@ -388,10 +388,7 @@ 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) { diff --git a/trunk/drivers/dma/ioat_dma.c b/trunk/drivers/dma/ioat_dma.c index 6607fdd00b1c..ecd743f7cc61 100644 --- a/trunk/drivers/dma/ioat_dma.c +++ b/trunk/drivers/dma/ioat_dma.c @@ -1341,12 +1341,10 @@ 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); } /** @@ -1412,8 +1410,7 @@ static int ioat_dma_self_test(struct ioatdma_device *device) goto free_resources; } device->common.device_issue_pending(dma_chan); - - wait_for_completion_timeout(&test_completion, msecs_to_jiffies(3000)); + msleep(1); if (device->common.device_is_tx_complete(dma_chan, cookie, NULL, NULL) != DMA_SUCCESS) { diff --git a/trunk/drivers/dma/iop-adma.c b/trunk/drivers/dma/iop-adma.c index 6be317262200..c7a9306d951d 100644 --- a/trunk/drivers/dma/iop-adma.c +++ b/trunk/drivers/dma/iop-adma.c @@ -85,28 +85,18 @@ 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)) { - 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); + addr = iop_desc_get_dest_addr(unmap, iop_chan); + dma_unmap_page(dev, addr, len, DMA_FROM_DEVICE); } 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); } diff --git a/trunk/drivers/dma/mv_xor.c b/trunk/drivers/dma/mv_xor.c index bcda17426411..0328da020a10 100644 --- a/trunk/drivers/dma/mv_xor.c +++ b/trunk/drivers/dma/mv_xor.c @@ -311,26 +311,17 @@ 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)) { - 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); + addr = mv_desc_get_dest_addr(unmap); + dma_unmap_page(dev, addr, len, DMA_FROM_DEVICE); } 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); } diff --git a/trunk/drivers/edac/edac_device.c b/trunk/drivers/edac/edac_device.c index 4041e9143283..5fcd3d89c75d 100644 --- a/trunk/drivers/edac/edac_device.c +++ b/trunk/drivers/edac/edac_device.c @@ -394,12 +394,6 @@ 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)) { @@ -591,14 +585,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); diff --git a/trunk/drivers/firewire/fw-ohci.c b/trunk/drivers/firewire/fw-ohci.c index ab9c01e462ef..46610b090415 100644 --- a/trunk/drivers/firewire/fw-ohci.c +++ b/trunk/drivers/firewire/fw-ohci.c @@ -974,7 +974,6 @@ at_context_queue_packet(struct context *ctx, struct fw_packet *packet) packet->ack = RCODE_SEND_ERROR; return -1; } - packet->payload_bus = payload_bus; d[2].req_count = cpu_to_le16(packet->payload_length); d[2].data_address = cpu_to_le32(payload_bus); @@ -1026,6 +1025,7 @@ static int handle_at_packet(struct context *context, struct driver_data *driver_data; struct fw_packet *packet; struct fw_ohci *ohci = context->ohci; + dma_addr_t payload_bus; int evt; if (last->transfer_status == 0) @@ -1038,8 +1038,9 @@ static int handle_at_packet(struct context *context, /* This packet was cancelled, just continue. */ return 1; - if (packet->payload_bus) - dma_unmap_single(ohci->card.device, packet->payload_bus, + payload_bus = le32_to_cpu(last->data_address); + if (payload_bus != 0) + dma_unmap_single(ohci->card.device, payload_bus, packet->payload_length, DMA_TO_DEVICE); evt = le16_to_cpu(last->transfer_status) & 0x1f; @@ -1696,10 +1697,6 @@ static int ohci_cancel_packet(struct fw_card *card, struct fw_packet *packet) if (packet->ack != 0) goto out; - if (packet->payload_bus) - dma_unmap_single(ohci->card.device, packet->payload_bus, - packet->payload_length, DMA_TO_DEVICE); - log_ar_at_event('T', packet->speed, packet->header, 0x20); driver_data->packet = NULL; packet->ack = RCODE_CANCELLED; diff --git a/trunk/drivers/firewire/fw-transaction.c b/trunk/drivers/firewire/fw-transaction.c index 2884f876397b..022ac4fabb67 100644 --- a/trunk/drivers/firewire/fw-transaction.c +++ b/trunk/drivers/firewire/fw-transaction.c @@ -207,7 +207,6 @@ fw_fill_request(struct fw_packet *packet, int tcode, int tlabel, packet->speed = speed; packet->generation = generation; packet->ack = 0; - packet->payload_bus = 0; } /** @@ -582,8 +581,6 @@ fw_fill_response(struct fw_packet *response, u32 *request_header, BUG(); return; } - - response->payload_bus = 0; } EXPORT_SYMBOL(fw_fill_response); diff --git a/trunk/drivers/firewire/fw-transaction.h b/trunk/drivers/firewire/fw-transaction.h index 839466f0a795..aed7dbb17cda 100644 --- a/trunk/drivers/firewire/fw-transaction.h +++ b/trunk/drivers/firewire/fw-transaction.h @@ -27,7 +27,6 @@ #include #include #include -#include #include #define TCODE_IS_READ_REQUEST(tcode) (((tcode) & ~1) == 4) @@ -154,7 +153,6 @@ struct fw_packet { size_t header_length; void *payload; size_t payload_length; - dma_addr_t payload_bus; u32 timestamp; /* diff --git a/trunk/drivers/gpu/drm/i915/i915_dma.c b/trunk/drivers/gpu/drm/i915/i915_dma.c index afa8a12cd009..553dd4bc3075 100644 --- a/trunk/drivers/gpu/drm/i915/i915_dma.c +++ b/trunk/drivers/gpu/drm/i915/i915_dma.c @@ -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 = dev_priv->has_gem; + value = 1; break; default: DRM_ERROR("Unknown parameter %d\n", param->param); @@ -830,14 +830,6 @@ 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 */ diff --git a/trunk/drivers/gpu/drm/i915/i915_drv.h b/trunk/drivers/gpu/drm/i915/i915_drv.h index b3cc4731aa7c..adc972cc6bfc 100644 --- a/trunk/drivers/gpu/drm/i915/i915_drv.h +++ b/trunk/drivers/gpu/drm/i915/i915_drv.h @@ -106,8 +106,6 @@ struct intel_opregion { typedef struct drm_i915_private { struct drm_device *dev; - int has_gem; - void __iomem *regs; drm_local_map_t *sarea; diff --git a/trunk/drivers/gpu/drm/i915/i915_gem.c b/trunk/drivers/gpu/drm/i915/i915_gem.c index 24fe8c10b4b2..ad672d854828 100644 --- a/trunk/drivers/gpu/drm/i915/i915_gem.c +++ b/trunk/drivers/gpu/drm/i915/i915_gem.c @@ -2309,14 +2309,7 @@ i915_gem_busy_ioctl(struct drm_device *dev, void *data, } obj_priv = obj->driver_private; - /* 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; + args->busy = obj_priv->active; drm_gem_object_unreference(obj); mutex_unlock(&dev->struct_mutex); diff --git a/trunk/drivers/gpu/drm/radeon/radeon_irq.c b/trunk/drivers/gpu/drm/radeon/radeon_irq.c index 8289e16419a8..99be11418ac2 100644 --- a/trunk/drivers/gpu/drm/radeon/radeon_irq.c +++ b/trunk/drivers/gpu/drm/radeon/radeon_irq.c @@ -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); } diff --git a/trunk/drivers/i2c/busses/i2c-cpm.c b/trunk/drivers/i2c/busses/i2c-cpm.c index 3fcf78e906db..228f75723063 100644 --- a/trunk/drivers/i2c/busses/i2c-cpm.c +++ b/trunk/drivers/i2c/busses/i2c-cpm.c @@ -365,7 +365,6 @@ 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 diff --git a/trunk/drivers/i2c/busses/i2c-highlander.c b/trunk/drivers/i2c/busses/i2c-highlander.c index e5a8dae4a289..f4d22ae9d294 100644 --- a/trunk/drivers/i2c/busses/i2c-highlander.c +++ b/trunk/drivers/i2c/busses/i2c-highlander.c @@ -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((__be16 *)src); + *dst++ = be16_to_cpup((u16 *)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) { - *(__be16 *)dst = cpu_to_be16p(src++); + *(u16 *)dst = cpu_to_be16p(src++); dst += 2; } diff --git a/trunk/drivers/i2c/busses/i2c-pmcmsp.c b/trunk/drivers/i2c/busses/i2c-pmcmsp.c index 0bdb2d7f0570..dcf2045b5222 100644 --- a/trunk/drivers/i2c/busses/i2c-pmcmsp.c +++ b/trunk/drivers/i2c/busses/i2c-pmcmsp.c @@ -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) { - u64 tmp = be64_to_cpup((__be64 *)cmd->write_data); + __be64 tmp = cpu_to_be64p((u64 *)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, diff --git a/trunk/drivers/i2c/busses/i2c-s3c2410.c b/trunk/drivers/i2c/busses/i2c-s3c2410.c index b7434d24904e..1fac4e233133 100644 --- a/trunk/drivers/i2c/busses/i2c-s3c2410.c +++ b/trunk/drivers/i2c/busses/i2c-s3c2410.c @@ -56,7 +56,6 @@ 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; @@ -508,7 +507,7 @@ static int s3c24xx_i2c_doxfer(struct s3c24xx_i2c *i2c, struct i2c_msg *msgs, int unsigned long timeout; int ret; - if (i2c->suspended) + if (!(readl(i2c->regs + S3C2410_IICCON) & S3C2410_IICCON_IRQEN)) return -EIO; ret = s3c24xx_i2c_set_master(i2c); @@ -987,26 +986,17 @@ 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); - i2c->suspended = 0; - s3c24xx_i2c_init(i2c); + if (i2c != NULL) + s3c24xx_i2c_init(i2c); return 0; } #else -#define s3c24xx_i2c_suspend_late NULL #define s3c24xx_i2c_resume NULL #endif @@ -1015,7 +1005,6 @@ 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, @@ -1026,7 +1015,6 @@ 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, diff --git a/trunk/drivers/ide/cs5530.c b/trunk/drivers/ide/cs5530.c index d8ede85fe17f..53f079cc00af 100644 --- a/trunk/drivers/ide/cs5530.c +++ b/trunk/drivers/ide/cs5530.c @@ -81,12 +81,11 @@ 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; + u16 *mateid = mate->id; 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) && diff --git a/trunk/drivers/ide/ide-acpi.c b/trunk/drivers/ide/ide-acpi.c index 9e8d52a4f306..244a8a052ce8 100644 --- a/trunk/drivers/ide/ide-acpi.c +++ b/trunk/drivers/ide/ide-acpi.c @@ -18,6 +18,12 @@ #include #include +#include +#include +#include +#include +#include +#include #define REGS_PER_GTF 7 struct taskfile_array { diff --git a/trunk/drivers/ide/sc1200.c b/trunk/drivers/ide/sc1200.c index ec7f766ef5e4..f1a8758e3a99 100644 --- a/trunk/drivers/ide/sc1200.c +++ b/trunk/drivers/ide/sc1200.c @@ -104,12 +104,11 @@ 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; + u16 *mateid = mate->id; 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) && diff --git a/trunk/drivers/ide/sgiioc4.c b/trunk/drivers/ide/sgiioc4.c index a687a7dfea6f..7defa0ae2014 100644 --- a/trunk/drivers/ide/sgiioc4.c +++ b/trunk/drivers/ide/sgiioc4.c @@ -550,7 +550,7 @@ static const struct ide_dma_ops sgiioc4_dma_ops = { .dma_timeout = ide_dma_timeout, }; -static const struct ide_port_info sgiioc4_port_info __devinitconst = { +static const struct ide_port_info sgiioc4_port_info __devinitdata = { .name = DRV_NAME, .chipset = ide_pci, .init_dma = ide_dma_sgiioc4, @@ -633,7 +633,7 @@ pci_init_sgiioc4(struct pci_dev *dev) return ret; } -int __devinit +int ioc4_ide_attach_one(struct ioc4_driver_data *idd) { /* PCI-RT does not bring out IDE connection. @@ -645,7 +645,7 @@ ioc4_ide_attach_one(struct ioc4_driver_data *idd) return pci_init_sgiioc4(idd->idd_pdev); } -static struct ioc4_submodule __devinitdata ioc4_ide_submodule = { +static struct ioc4_submodule ioc4_ide_submodule = { .is_name = "IOC4_ide", .is_owner = THIS_MODULE, .is_probe = ioc4_ide_attach_one, diff --git a/trunk/drivers/ieee1394/nodemgr.c b/trunk/drivers/ieee1394/nodemgr.c index 79ef5fd928ae..9e39f73282ee 100644 --- a/trunk/drivers/ieee1394/nodemgr.c +++ b/trunk/drivers/ieee1394/nodemgr.c @@ -115,14 +115,8 @@ 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; } @@ -1691,7 +1685,6 @@ static int nodemgr_host_thread(void *data) g = get_hpsb_generation(host); for (i = 0; i < 4 ; i++) { msleep_interruptible(63); - try_to_freeze(); if (kthread_should_stop()) goto exit; @@ -1732,7 +1725,6 @@ static int nodemgr_host_thread(void *data) /* Sleep 3 seconds */ for (i = 3000/200; i; i--) { msleep_interruptible(200); - try_to_freeze(); if (kthread_should_stop()) goto exit; diff --git a/trunk/drivers/md/bitmap.c b/trunk/drivers/md/bitmap.c index ab7c8e4a61f9..ac89a5deaca2 100644 --- a/trunk/drivers/md/bitmap.c +++ b/trunk/drivers/md/bitmap.c @@ -208,18 +208,15 @@ 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, - struct page *page, - unsigned long index, int size) +static struct page *read_sb_page(mddev_t *mddev, long offset, unsigned long index) { /* 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); @@ -230,9 +227,7 @@ static struct page *read_sb_page(mddev_t *mddev, long offset, target = rdev->sb_start + offset + index * (PAGE_SIZE/512); - if (sync_page_io(rdev->bdev, target, - roundup(size, bdev_hardsect_size(rdev->bdev)), - page, READ)) { + if (sync_page_io(rdev->bdev, target, PAGE_SIZE, page, READ)) { page->index = index; attach_page_buffers(page, NULL); /* so that free_buffer will * quietly no-op */ @@ -549,9 +544,7 @@ 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, - NULL, - 0, sizeof(bitmap_super_t)); + bitmap->sb_page = read_sb_page(bitmap->mddev, bitmap->offset, 0); } if (IS_ERR(bitmap->sb_page)) { err = PTR_ERR(bitmap->sb_page); @@ -964,16 +957,11 @@ 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, - NULL, - index, count); + page = read_sb_page(bitmap->mddev, bitmap->offset, index); offset = 0; } if (IS_ERR(page)) { /* read error */ diff --git a/trunk/drivers/media/dvb/b2c2/Kconfig b/trunk/drivers/media/dvb/b2c2/Kconfig index b34301d56cd2..73dc2ee9b014 100644 --- a/trunk/drivers/media/dvb/b2c2/Kconfig +++ b/trunk/drivers/media/dvb/b2c2/Kconfig @@ -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. diff --git a/trunk/drivers/media/dvb/b2c2/flexcop-fe-tuner.c b/trunk/drivers/media/dvb/b2c2/flexcop-fe-tuner.c index 5cded3708541..a127a4175c40 100644 --- a/trunk/drivers/media/dvb/b2c2/flexcop-fe-tuner.c +++ b/trunk/drivers/media/dvb/b2c2/flexcop-fe-tuner.c @@ -628,14 +628,12 @@ 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, diff --git a/trunk/drivers/media/dvb/b2c2/flexcop-i2c.c b/trunk/drivers/media/dvb/b2c2/flexcop-i2c.c index f13783f08f0f..43a112ec6d44 100644 --- a/trunk/drivers/media/dvb/b2c2/flexcop-i2c.c +++ b/trunk/drivers/media/dvb/b2c2/flexcop-i2c.c @@ -47,12 +47,8 @@ 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; diff --git a/trunk/drivers/media/dvb/bt8xx/Kconfig b/trunk/drivers/media/dvb/bt8xx/Kconfig index 27edb0ece587..7e9c090fc04e 100644 --- a/trunk/drivers/media/dvb/bt8xx/Kconfig +++ b/trunk/drivers/media/dvb/bt8xx/Kconfig @@ -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 !MEDIA_TUNER_CUSTOMIZE + select MEDIA_TUNER_SIMPLE if !DVB_FE_CUSTOMISE help Support for PCI cards based on the Bt8xx PCI bridge. Examples are the Nebula cards, the Pinnacle PCTV cards, the Twinhan DST cards, diff --git a/trunk/drivers/media/dvb/dvb-usb/Kconfig b/trunk/drivers/media/dvb/dvb-usb/Kconfig index 49f7b20c25d6..62b68c291d99 100644 --- a/trunk/drivers/media/dvb/dvb-usb/Kconfig +++ b/trunk/drivers/media/dvb/dvb-usb/Kconfig @@ -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 !MEDIA_TUNER_CUSTOMIZE + select MEDIA_TUNER_MT2060 if !DVB_FE_CUSTOMISE help Support for USB 1.1 and 2.0 DVB-T receivers based on reference designs made by DiBcom () 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 !MEDIA_TUNER_CUSTOMIZE + select MEDIA_TUNER_MT2060 if !DVB_FE_CUSTOMISE help Support for USB2.0 DVB-T receivers based on reference designs made by DiBcom () 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 !MEDIA_TUNER_CUSTOMIZE + select MEDIA_TUNER_MT2060 if !DVB_FE_CUSTOMISE 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 !MEDIA_TUNER_CUSTOMIZE + select MEDIA_TUNER_QT1010 if !DVB_FE_CUSTOMISE 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 !MEDIA_TUNER_CUSTOMIZE + select MEDIA_TUNER_QT1010 if !DVB_FE_CUSTOMISE 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 !MEDIA_TUNER_CUSTOMIZE - select MEDIA_TUNER_QT1010 if !MEDIA_TUNER_CUSTOMIZE + select MEDIA_TUNER_MT2060 if !DVB_FE_CUSTOMISE + select MEDIA_TUNER_QT1010 if !DVB_FE_CUSTOMISE 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 !MEDIA_TUNER_CUSTOMIZE + select MEDIA_TUNER_QT1010 if !DVB_FE_CUSTOMISE 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 !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 + 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 help Say Y here to support the Afatech AF9015 based DVB-T USB2.0 receiver diff --git a/trunk/drivers/media/dvb/dvb-usb/dib0700_devices.c b/trunk/drivers/media/dvb/dvb-usb/dib0700_devices.c index 391732788911..f28d3ae59e04 100644 --- a/trunk/drivers/media/dvb/dvb-usb/dib0700_devices.c +++ b/trunk/drivers/media/dvb/dvb-usb/dib0700_devices.c @@ -446,13 +446,13 @@ static int stk7700ph_tuner_attach(struct dvb_usb_adapter *adap) == NULL ? -ENODEV : 0; } -#define DEFAULT_RC_INTERVAL 50 +#define DEFAULT_RC_INTERVAL 150 static u8 rc_request[] = { REQUEST_POLL_RC, 0 }; /* Number of keypresses to ignore before start repeating */ -#define RC_REPEAT_DELAY 6 -#define RC_REPEAT_DELAY_V1_20 10 +#define RC_REPEAT_DELAY 2 +#define RC_REPEAT_DELAY_V1_20 5 diff --git a/trunk/drivers/media/dvb/ttpci/Kconfig b/trunk/drivers/media/dvb/ttpci/Kconfig index 401a04effc06..867027ceab3e 100644 --- a/trunk/drivers/media/dvb/ttpci/Kconfig +++ b/trunk/drivers/media/dvb/ttpci/Kconfig @@ -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 !MEDIA_TUNER_CUSTOMIZE + select MEDIA_TUNER_TDA827X if !DVB_FE_CUSTOMISE select VIDEO_IR help Support for simple SAA7146 based DVB cards diff --git a/trunk/drivers/media/video/compat_ioctl32.c b/trunk/drivers/media/video/compat_ioctl32.c index 0ea85a05e5c0..e6ca4012b5f0 100644 --- a/trunk/drivers/media/video/compat_ioctl32.c +++ b/trunk/drivers/media/video/compat_ioctl32.c @@ -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 && !file->f_op->unlocked_ioctl) + if (!file->f_op->ioctl) return ret; switch (cmd) { diff --git a/trunk/drivers/media/video/cx18/Kconfig b/trunk/drivers/media/video/cx18/Kconfig index 8940b5387dec..ef48565de7f1 100644 --- a/trunk/drivers/media/video/cx18/Kconfig +++ b/trunk/drivers/media/video/cx18/Kconfig @@ -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 !MEDIA_TUNER_CUSTOMIZE + select MEDIA_TUNER_MXL5005S if !DVB_FE_CUSTOMISE ---help--- This is a video4linux driver for Conexant cx23418 based PCI combo video recorder devices. diff --git a/trunk/drivers/media/video/cx23885/Kconfig b/trunk/drivers/media/video/cx23885/Kconfig index 00f1e2e8889e..8c1b7fa47a41 100644 --- a/trunk/drivers/media/video/cx23885/Kconfig +++ b/trunk/drivers/media/video/cx23885/Kconfig @@ -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. diff --git a/trunk/drivers/media/video/cx88/Kconfig b/trunk/drivers/media/video/cx88/Kconfig index b0f837588e01..0b9e5fac6239 100644 --- a/trunk/drivers/media/video/cx88/Kconfig +++ b/trunk/drivers/media/video/cx88/Kconfig @@ -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. diff --git a/trunk/drivers/media/video/em28xx/em28xx-video.c b/trunk/drivers/media/video/em28xx/em28xx-video.c index 4ea1f1e04897..610f535a257c 100644 --- a/trunk/drivers/media/video/em28xx/em28xx-video.c +++ b/trunk/drivers/media/video/em28xx/em28xx-video.c @@ -549,11 +549,10 @@ 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, &zero); + em28xx_i2c_call_clients(dev, VIDIOC_INT_RESET, NULL); em28xx_i2c_call_clients(dev, VIDIOC_INT_S_VIDEO_ROUTING, &route); em28xx_i2c_call_clients(dev, VIDIOC_STREAMON, NULL); } diff --git a/trunk/drivers/media/video/gspca/gspca.c b/trunk/drivers/media/video/gspca/gspca.c index 02a6e9ef0337..748a87e82e44 100644 --- a/trunk/drivers/media/video/gspca/gspca.c +++ b/trunk/drivers/media/video/gspca/gspca.c @@ -1264,10 +1264,10 @@ static int vidioc_s_jpegcomp(struct file *file, void *priv, struct gspca_dev *gspca_dev = priv; int ret; - if (!gspca_dev->sd_desc->set_jcomp) - return -EINVAL; if (mutex_lock_interruptible(&gspca_dev->usb_lock)) return -ERESTARTSYS; + if (!gspca_dev->sd_desc->set_jcomp) + return -EINVAL; ret = gspca_dev->sd_desc->set_jcomp(gspca_dev, jpegcomp); mutex_unlock(&gspca_dev->usb_lock); return ret; diff --git a/trunk/drivers/media/video/pvrusb2/Kconfig b/trunk/drivers/media/video/pvrusb2/Kconfig index 854c2a885358..19eb274c9cd0 100644 --- a/trunk/drivers/media/video/pvrusb2/Kconfig +++ b/trunk/drivers/media/video/pvrusb2/Kconfig @@ -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 !MEDIA_TUNER_CUSTOMIZE + select MEDIA_TUNER_SIMPLE if !DVB_FE_CUSTOMISE select MEDIA_TUNER_TDA8290 if !DVB_FE_CUSTOMIZE ---help--- diff --git a/trunk/drivers/media/video/saa7134/Kconfig b/trunk/drivers/media/video/saa7134/Kconfig index fc2164e28e76..7021bbf5897b 100644 --- a/trunk/drivers/media/video/saa7134/Kconfig +++ b/trunk/drivers/media/video/saa7134/Kconfig @@ -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_TDA827X if !MEDIA_TUNER_CUSTOMIZE - select MEDIA_TUNER_SIMPLE if !MEDIA_TUNER_CUSTOMIZE + select MEDIA_TUNER_SIMPLE if !DVB_FE_CUSTOMISE ---help--- This adds support for DVB cards based on the Philips saa7134 chip. diff --git a/trunk/drivers/message/fusion/mptscsih.c b/trunk/drivers/message/fusion/mptscsih.c index ee090413e598..d62fd4f6b52e 100644 --- a/trunk/drivers/message/fusion/mptscsih.c +++ b/trunk/drivers/message/fusion/mptscsih.c @@ -2008,9 +2008,6 @@ 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); diff --git a/trunk/drivers/misc/panasonic-laptop.c b/trunk/drivers/misc/panasonic-laptop.c index f30db367c82e..4a1bc64485d5 100644 --- a/trunk/drivers/misc/panasonic-laptop.c +++ b/trunk/drivers/misc/panasonic-laptop.c @@ -241,6 +241,8 @@ 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, ¶ms, NULL); @@ -252,6 +254,8 @@ 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)) @@ -270,6 +274,8 @@ 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)) { @@ -495,6 +501,8 @@ 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)) { @@ -530,6 +538,8 @@ 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); @@ -544,6 +554,8 @@ 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, @@ -585,6 +597,8 @@ 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; @@ -602,6 +616,8 @@ 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; @@ -698,6 +714,8 @@ static int __init acpi_pcc_init(void) { int result = 0; + ACPI_FUNCTION_TRACE("acpi_pcc_init"); + if (acpi_disabled) return -ENODEV; @@ -715,6 +733,8 @@ 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; @@ -737,6 +757,8 @@ 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); } diff --git a/trunk/drivers/misc/sgi-gru/grufault.c b/trunk/drivers/misc/sgi-gru/grufault.c index 3ee698ad8599..8c389d606c30 100644 --- a/trunk/drivers/misc/sgi-gru/grufault.c +++ b/trunk/drivers/misc/sgi-gru/grufault.c @@ -254,11 +254,7 @@ static int atomic_pte_lookup(struct vm_area_struct *vma, unsigned long vaddr, return 1; *paddr = pte_pfn(pte) << PAGE_SHIFT; -#ifdef CONFIG_HUGETLB_PAGE *pageshift = is_vm_hugetlb_page(vma) ? HPAGE_SHIFT : PAGE_SHIFT; -#else - *pageshift = PAGE_SHIFT; -#endif return 0; err: diff --git a/trunk/drivers/misc/sony-laptop.c b/trunk/drivers/misc/sony-laptop.c index 537959d07148..571b211608d1 100644 --- a/trunk/drivers/misc/sony-laptop.c +++ b/trunk/drivers/misc/sony-laptop.c @@ -935,17 +935,14 @@ 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_device_info *info; - struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL}; + struct acpi_namespace_node *node; + union acpi_operand_object *operand; - if (ACPI_SUCCESS(acpi_get_object_info(handle, &buffer))) { - info = buffer.pointer; + node = (struct acpi_namespace_node *)handle; + operand = (union acpi_operand_object *)node->object; - printk(KERN_WARNING DRV_PFX "method: name: %4.4s, args %X\n", - (char *)&info->name, info->param_count); - - kfree(buffer.pointer); - } + printk(KERN_WARNING DRV_PFX "method: name: %4.4s, args %X\n", node->name.ascii, + (u32) operand->method.param_count); return AE_OK; } diff --git a/trunk/drivers/misc/tc1100-wmi.c b/trunk/drivers/misc/tc1100-wmi.c index b4a4aa9ee482..f25e4c974dcf 100644 --- a/trunk/drivers/misc/tc1100-wmi.c +++ b/trunk/drivers/misc/tc1100-wmi.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/misc/thinkpad_acpi.c b/trunk/drivers/misc/thinkpad_acpi.c index 3478453eba7a..899766e16fa8 100644 --- a/trunk/drivers/misc/thinkpad_acpi.c +++ b/trunk/drivers/misc/thinkpad_acpi.c @@ -76,6 +76,7 @@ #include #include +#include #include diff --git a/trunk/drivers/net/bnx2.c b/trunk/drivers/net/bnx2.c index 9e8222f9e90e..a1a3d0e5d2b4 100644 --- a/trunk/drivers/net/bnx2.c +++ b/trunk/drivers/net/bnx2.c @@ -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[j], - rxr->rx_pg_desc_mapping[j]); - rxr->rx_pg_desc_ring[j] = NULL; + rxr->rx_pg_desc_ring[i], + rxr->rx_pg_desc_mapping[i]); + rxr->rx_pg_desc_ring[i] = NULL; } if (rxr->rx_pg_ring) vfree(rxr->rx_pg_ring); diff --git a/trunk/drivers/net/e1000e/ich8lan.c b/trunk/drivers/net/e1000e/ich8lan.c index d115a6d30f29..523b9716a543 100644 --- a/trunk/drivers/net/e1000e/ich8lan.c +++ b/trunk/drivers/net/e1000e/ich8lan.c @@ -1893,17 +1893,12 @@ 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); - if (!ret_val) { - /* release the swflag because it is not reset by - * hardware reset - */ - e1000_release_swflag_ich8lan(hw); - } + /* 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) { diff --git a/trunk/drivers/net/enc28j60.c b/trunk/drivers/net/enc28j60.c index 36cb6e95b465..c414554ac321 100644 --- a/trunk/drivers/net/enc28j60.c +++ b/trunk/drivers/net/enc28j60.c @@ -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_ni(skb); + netif_rx(skb); } } /* diff --git a/trunk/drivers/net/jme.h b/trunk/drivers/net/jme.h index 3f5d91543246..f863aee6648b 100644 --- a/trunk/drivers/net/jme.h +++ b/trunk/drivers/net/jme.h @@ -22,7 +22,7 @@ */ #ifndef __JME_H_INCLUDED__ -#define __JME_H_INCLUDED__ +#define __JME_H_INCLUDEE__ #define DRV_NAME "jme" #define DRV_VERSION "1.0.3" diff --git a/trunk/drivers/net/phy/mdio_bus.c b/trunk/drivers/net/phy/mdio_bus.c index 289fc267edf3..536bda1f428b 100644 --- a/trunk/drivers/net/phy/mdio_bus.c +++ b/trunk/drivers/net/phy/mdio_bus.c @@ -105,6 +105,8 @@ int mdiobus_register(struct mii_bus *bus) return -EINVAL; } + bus->state = MDIOBUS_REGISTERED; + mutex_init(&bus->mdio_lock); if (bus->reset) @@ -121,9 +123,6 @@ int mdiobus_register(struct mii_bus *bus) } } - if (!err) - bus->state = MDIOBUS_REGISTERED; - pr_info("%s: probed\n", bus->name); return err; diff --git a/trunk/drivers/net/ppp_generic.c b/trunk/drivers/net/ppp_generic.c index 714a23035de1..7e857e938adb 100644 --- a/trunk/drivers/net/ppp_generic.c +++ b/trunk/drivers/net/ppp_generic.c @@ -116,7 +116,6 @@ 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 */ @@ -996,7 +995,7 @@ ppp_xmit_process(struct ppp *ppp) struct sk_buff *skb; ppp_xmit_lock(ppp); - if (!ppp->closing) { + if (ppp->dev) { ppp_push(ppp); while (!ppp->xmit_pending && (skb = skb_dequeue(&ppp->file.xq))) @@ -1464,7 +1463,8 @@ static inline void ppp_do_recv(struct ppp *ppp, struct sk_buff *skb, struct channel *pch) { ppp_recv_lock(ppp); - if (!ppp->closing) + /* ppp->dev == 0 means interface is closing down */ + if (ppp->dev) ppp_receive_frame(ppp, skb, pch); else kfree_skb(skb); @@ -2498,16 +2498,18 @@ 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); - /* This will call dev_close() for us. */ ppp_lock(ppp); - if (!ppp->closing) { - ppp->closing = 1; - ppp_unlock(ppp); - unregister_netdev(ppp->dev); - } else - ppp_unlock(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); + } cardmap_set(&all_ppp_units, ppp->file.index, NULL); ppp->file.dead = 1; ppp->owner = NULL; @@ -2552,7 +2554,7 @@ static void ppp_destroy_interface(struct ppp *ppp) if (ppp->xmit_pending) kfree_skb(ppp->xmit_pending); - free_netdev(ppp->dev); + kfree(ppp); } /* @@ -2614,7 +2616,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 (hdrlen > ppp->dev->hard_header_len) + if (ppp->dev && hdrlen > ppp->dev->hard_header_len) ppp->dev->hard_header_len = hdrlen; list_add_tail(&pch->clist, &ppp->channels); ++ppp->n_channels; diff --git a/trunk/drivers/net/starfire.c b/trunk/drivers/net/starfire.c index 5a40f2d78beb..1d2ef8f47780 100644 --- a/trunk/drivers/net/starfire.c +++ b/trunk/drivers/net/starfire.c @@ -1509,11 +1509,6 @@ 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: diff --git a/trunk/drivers/net/sungem.c b/trunk/drivers/net/sungem.c index fed7eba65ead..1349e419673c 100644 --- a/trunk/drivers/net/sungem.c +++ b/trunk/drivers/net/sungem.c @@ -1142,70 +1142,6 @@ 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. */ @@ -1232,9 +1168,6 @@ 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. */ @@ -1391,7 +1324,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) || gp->phy_type == phy_serdes) + if (pcs_lpa & PCS_MIIADV_FD) full_duplex = 1; speed = SPEED_1000; } @@ -1555,9 +1488,6 @@ 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); @@ -1778,8 +1708,61 @@ 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 { - gem_pcs_reset(gp); - gem_pcs_reinit_adv(gp); + 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); } /* Default aneg parameters */ @@ -2697,21 +2680,6 @@ 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; diff --git a/trunk/drivers/net/tlan.c b/trunk/drivers/net/tlan.c index e60498232b94..c41d68761364 100644 --- a/trunk/drivers/net/tlan.c +++ b/trunk/drivers/net/tlan.c @@ -1098,7 +1098,6 @@ 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", @@ -1109,7 +1108,6 @@ 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; @@ -1127,16 +1125,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, txlen); + skb_copy_from_linear_data(skb, tail_buffer, skb->len); } else { tail_list->buffer[0].address = pci_map_single(priv->pciDev, - skb->data, txlen, + skb->data, skb->len, PCI_DMA_TODEVICE); TLan_StoreSKB(tail_list, skb); } - tail_list->frameSize = (u16) txlen; - tail_list->buffer[0].count = TLAN_LAST_BUFFER | (u32) txlen; + tail_list->frameSize = (u16) skb->len; + tail_list->buffer[0].count = TLAN_LAST_BUFFER | (u32) skb->len; tail_list->buffer[1].count = 0; tail_list->buffer[1].address = 0; @@ -1433,9 +1431,7 @@ 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, - max(skb->len, - (unsigned int)TLAN_MIN_FRAME_SIZE), - PCI_DMA_TODEVICE); + skb->len, PCI_DMA_TODEVICE); dev_kfree_skb_any(skb); head_list->buffer[8].address = 0; head_list->buffer[9].address = 0; @@ -2059,12 +2055,9 @@ 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, - max(skb->len, - (unsigned int)TLAN_MIN_FRAME_SIZE), - PCI_DMA_TODEVICE); + pci_unmap_single(priv->pciDev, + list->buffer[0].address, skb->len, + PCI_DMA_TODEVICE); dev_kfree_skb_any( skb ); list->buffer[8].address = 0; list->buffer[9].address = 0; diff --git a/trunk/drivers/pci/hotplug/acpi_pcihp.c b/trunk/drivers/pci/hotplug/acpi_pcihp.c index 2c981cbb0719..e17ef54f0efc 100644 --- a/trunk/drivers/pci/hotplug/acpi_pcihp.c +++ b/trunk/drivers/pci/hotplug/acpi_pcihp.c @@ -33,6 +33,7 @@ #include #include #include +#include #define MY_NAME "acpi_pcihp" diff --git a/trunk/drivers/pci/hotplug/acpiphp.h b/trunk/drivers/pci/hotplug/acpiphp.h index 9bcb6cbd5aa9..f9e244da30ae 100644 --- a/trunk/drivers/pci/hotplug/acpiphp.h +++ b/trunk/drivers/pci/hotplug/acpiphp.h @@ -113,7 +113,7 @@ struct acpiphp_slot { u8 device; /* pci device# */ - unsigned long long sun; /* ACPI _SUN (slot unique number) */ + u32 sun; /* ACPI _SUN (slot unique number) */ u32 flags; /* see below */ }; diff --git a/trunk/drivers/pci/hotplug/acpiphp_core.c b/trunk/drivers/pci/hotplug/acpiphp_core.c index 43c10bd261b4..95b536a23d25 100644 --- a/trunk/drivers/pci/hotplug/acpiphp_core.c +++ b/trunk/drivers/pci/hotplug/acpiphp_core.c @@ -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, "%llu", slot->acpi_slot->sun); + snprintf(name, SLOT_NAME_SIZE, "%u", slot->acpi_slot->sun); retval = pci_hp_register(slot->hotplug_slot, acpiphp_slot->bridge->pci_bus, diff --git a/trunk/drivers/pci/hotplug/acpiphp_glue.c b/trunk/drivers/pci/hotplug/acpiphp_glue.c index 3affc6472e65..955aae4071f7 100644 --- a/trunk/drivers/pci/hotplug/acpiphp_glue.c +++ b/trunk/drivers/pci/hotplug/acpiphp_glue.c @@ -255,13 +255,13 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv) bridge->nr_slots++; - dbg("found ACPI PCI Hotplug slot %llu at PCI %04x:%02x:%02x\n", + dbg("found ACPI PCI Hotplug slot %d 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 %llu already registered by another " + warn("Slot %d already registered by another " "hotplug driver\n", slot->sun); else warn("acpiphp_register_hotplug_slot failed " diff --git a/trunk/drivers/pci/hotplug/ibmphp_core.c b/trunk/drivers/pci/hotplug/ibmphp_core.c index 633e743442ac..c892daae74d6 100644 --- a/trunk/drivers/pci/hotplug/ibmphp_core.c +++ b/trunk/drivers/pci/hotplug/ibmphp_core.c @@ -1402,6 +1402,10 @@ 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; @@ -1419,3 +1423,4 @@ static void __exit ibmphp_exit(void) } module_init(ibmphp_init); +module_exit(ibmphp_exit); diff --git a/trunk/drivers/pci/hotplug/pciehp.h b/trunk/drivers/pci/hotplug/pciehp.h index 7072952ea1d2..b2801a7ee37f 100644 --- a/trunk/drivers/pci/hotplug/pciehp.h +++ b/trunk/drivers/pci/hotplug/pciehp.h @@ -217,6 +217,7 @@ struct hpc_ops { #ifdef CONFIG_ACPI #include #include +#include #include static inline int pciehp_get_hp_hw_control_from_firmware(struct pci_dev *dev) diff --git a/trunk/drivers/pci/hotplug/pciehp_core.c b/trunk/drivers/pci/hotplug/pciehp_core.c index 39cf248d24e3..4b23bc39b11e 100644 --- a/trunk/drivers/pci/hotplug/pciehp_core.c +++ b/trunk/drivers/pci/hotplug/pciehp_core.c @@ -432,19 +432,18 @@ 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); - 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; - } + + 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; } return 0; diff --git a/trunk/drivers/pci/pci-acpi.c b/trunk/drivers/pci/pci-acpi.c index 9d976d51d406..ae5ec76dca77 100644 --- a/trunk/drivers/pci/pci-acpi.c +++ b/trunk/drivers/pci/pci-acpi.c @@ -13,6 +13,8 @@ #include #include #include +#include +#include #include #include diff --git a/trunk/drivers/pci/pcie/aer/aerdrv_core.c b/trunk/drivers/pci/pcie/aer/aerdrv_core.c index aac7006949f1..dfc63d01f20a 100644 --- a/trunk/drivers/pci/pcie/aer/aerdrv_core.c +++ b/trunk/drivers/pci/pcie/aer/aerdrv_core.c @@ -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->resume) + !dev->driver->err_handler->slot_reset) return; err_handler = dev->driver->err_handler; diff --git a/trunk/drivers/pci/pcie/aspm.c b/trunk/drivers/pci/pcie/aspm.c index 9aad608bcf3f..8f63f4c6b85f 100644 --- a/trunk/drivers/pci/pcie/aspm.c +++ b/trunk/drivers/pci/pcie/aspm.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include "../pci.h" @@ -162,12 +161,11 @@ static void pcie_check_clock_pm(struct pci_dev *pdev) */ static void pcie_aspm_configure_common_clock(struct pci_dev *pdev) { - int pos, child_pos, i = 0; + int pos, child_pos; u16 reg16 = 0; struct pci_dev *child_dev; int same_clock = 1; - unsigned long start_jiffies; - u16 child_regs[8], parent_reg; + /* * all functions of a slot should have the same Slot Clock * Configuration, so just check one function @@ -193,19 +191,16 @@ static void pcie_aspm_configure_common_clock(struct pci_dev *pdev) child_pos = pci_find_capability(child_dev, PCI_CAP_ID_EXP); pci_read_config_word(child_dev, child_pos + PCI_EXP_LNKCTL, ®16); - child_regs[i] = reg16; if (same_clock) reg16 |= PCI_EXP_LNKCTL_CCC; else reg16 &= ~PCI_EXP_LNKCTL_CCC; pci_write_config_word(child_dev, child_pos + PCI_EXP_LNKCTL, reg16); - i++; } /* Configure upstream component */ pci_read_config_word(pdev, pos + PCI_EXP_LNKCTL, ®16); - parent_reg = reg16; if (same_clock) reg16 |= PCI_EXP_LNKCTL_CCC; else @@ -217,30 +212,12 @@ static void pcie_aspm_configure_common_clock(struct pci_dev *pdev) pci_write_config_word(pdev, pos + PCI_EXP_LNKCTL, reg16); /* Wait for link training end */ - /* break out after waiting for 1 second */ - start_jiffies = jiffies; - while ((jiffies - start_jiffies) < HZ) { + while (1) { pci_read_config_word(pdev, pos + PCI_EXP_LNKSTA, ®16); if (!(reg16 & PCI_EXP_LNKSTA_LT)) break; cpu_relax(); } - /* training failed -> recover */ - if ((jiffies - start_jiffies) >= HZ) { - dev_printk (KERN_ERR, &pdev->dev, "ASPM: Could not configure" - " common clock\n"); - i = 0; - list_for_each_entry(child_dev, &pdev->subordinate->devices, - bus_list) { - child_pos = pci_find_capability(child_dev, - PCI_CAP_ID_EXP); - pci_write_config_word(child_dev, - child_pos + PCI_EXP_LNKCTL, - child_regs[i]); - i++; - } - pci_write_config_word(pdev, pos + PCI_EXP_LNKCTL, parent_reg); - } } /* diff --git a/trunk/drivers/pci/slot.c b/trunk/drivers/pci/slot.c index 5a8ccb4f604d..4dd1c3e157ae 100644 --- a/trunk/drivers/pci/slot.c +++ b/trunk/drivers/pci/slot.c @@ -253,7 +253,6 @@ struct pci_slot *pci_create_slot(struct pci_bus *parent, int slot_nr, __func__, pci_domain_nr(parent), parent->number, slot_nr); out: - kfree(slot_name); up_write(&pci_bus_sem); return slot; err: diff --git a/trunk/drivers/pcmcia/bfin_cf_pcmcia.c b/trunk/drivers/pcmcia/bfin_cf_pcmcia.c index b59d4115d20f..bb7338863fb9 100644 --- a/trunk/drivers/pcmcia/bfin_cf_pcmcia.c +++ b/trunk/drivers/pcmcia/bfin_cf_pcmcia.c @@ -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 "); +MODULE_AUTHOR("Michael Hennerich ") MODULE_DESCRIPTION("BFIN CF/PCMCIA Driver"); MODULE_LICENSE("GPL"); diff --git a/trunk/drivers/pnp/pnpacpi/core.c b/trunk/drivers/pnp/pnpacpi/core.c index 2834846a185d..383e47c392a4 100644 --- a/trunk/drivers/pnp/pnpacpi/core.c +++ b/trunk/drivers/pnp/pnpacpi/core.c @@ -23,6 +23,7 @@ #include #include #include +#include #include "../base.h" #include "pnpacpi.h" diff --git a/trunk/drivers/rtc/rtc-ds1672.c b/trunk/drivers/rtc/rtc-ds1672.c index 4e91419e8911..341d7a5b45a2 100644 --- a/trunk/drivers/rtc/rtc-ds1672.c +++ b/trunk/drivers/rtc/rtc-ds1672.c @@ -209,18 +209,12 @@ static int ds1672_probe(struct i2c_client *client, return err; } -static struct i2c_device_id ds1672_id[] = { - { "ds1672", 0 }, - { } -}; - static struct i2c_driver ds1672_driver = { .driver = { .name = "rtc-ds1672", }, .probe = &ds1672_probe, .remove = &ds1672_remove, - .id_table = ds1672_id, }; static int __init ds1672_init(void) diff --git a/trunk/drivers/rtc/rtc-isl1208.c b/trunk/drivers/rtc/rtc-isl1208.c index 054e05294af8..2cd77ab8fc66 100644 --- a/trunk/drivers/rtc/rtc-isl1208.c +++ b/trunk/drivers/rtc/rtc-isl1208.c @@ -328,13 +328,6 @@ 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; diff --git a/trunk/drivers/rtc/rtc-max6900.c b/trunk/drivers/rtc/rtc-max6900.c index a4f6665ab3c5..80782798763f 100644 --- a/trunk/drivers/rtc/rtc-max6900.c +++ b/trunk/drivers/rtc/rtc-max6900.c @@ -247,18 +247,12 @@ max6900_probe(struct i2c_client *client, const struct i2c_device_id *id) return 0; } -static struct i2c_device_id max6900_id[] = { - { "max6900", 0 }, - { } -}; - static struct i2c_driver max6900_driver = { .driver = { .name = "rtc-max6900", }, .probe = max6900_probe, .remove = max6900_remove, - .id_table = max6900_id, }; static int __init max6900_init(void) diff --git a/trunk/drivers/rtc/rtc-twl4030.c b/trunk/drivers/rtc/rtc-twl4030.c index 01d8da9afdc8..abe87a4d2665 100644 --- a/trunk/drivers/rtc/rtc-twl4030.c +++ b/trunk/drivers/rtc/rtc-twl4030.c @@ -337,7 +337,7 @@ static int twl4030_rtc_ioctl(struct device *dev, unsigned int cmd, } #else -#define twl4030_rtc_ioctl NULL +#define omap_rtc_ioctl NULL #endif static irqreturn_t twl4030_rtc_interrupt(int irq, void *rtc) diff --git a/trunk/drivers/scsi/aacraid/linit.c b/trunk/drivers/scsi/aacraid/linit.c index 94acbeed4e7c..162cd927d94b 100644 --- a/trunk/drivers/scsi/aacraid/linit.c +++ b/trunk/drivers/scsi/aacraid/linit.c @@ -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 }, /* 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 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 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) */ diff --git a/trunk/drivers/scsi/device_handler/scsi_dh_hp_sw.c b/trunk/drivers/scsi/device_handler/scsi_dh_hp_sw.c index f7da7530875e..9aec4ca64e56 100644 --- a/trunk/drivers/scsi/device_handler/scsi_dh_hp_sw.c +++ b/trunk/drivers/scsi/device_handler/scsi_dh_hp_sw.c @@ -107,7 +107,6 @@ 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; @@ -122,6 +121,7 @@ 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,10 +136,8 @@ static int hp_sw_tur(struct scsi_device *sdev, struct hp_sw_dh_data *h) h->path_state = HP_SW_PATH_ACTIVE; ret = SCSI_DH_OK; } - if (ret == SCSI_DH_IMM_RETRY) { - blk_put_request(req); + if (ret == SCSI_DH_IMM_RETRY) goto retry; - } if (ret == SCSI_DH_DEV_OFFLINED) { h->path_state = HP_SW_PATH_PASSIVE; ret = SCSI_DH_OK; @@ -202,7 +200,6 @@ 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; @@ -219,6 +216,7 @@ 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) { @@ -233,10 +231,8 @@ static int hp_sw_start_stop(struct scsi_device *sdev, struct hp_sw_dh_data *h) ret = SCSI_DH_OK; if (ret == SCSI_DH_RETRY) { - if (--retry) { - blk_put_request(req); + if (--retry) goto retry; - } ret = SCSI_DH_IO; } diff --git a/trunk/drivers/scsi/ibmvscsi/ibmvstgt.c b/trunk/drivers/scsi/ibmvscsi/ibmvstgt.c index e2dd6a45924a..2a5b29d12172 100644 --- a/trunk/drivers/scsi/ibmvscsi/ibmvstgt.c +++ b/trunk/drivers/scsi/ibmvscsi/ibmvstgt.c @@ -864,23 +864,21 @@ static int ibmvstgt_probe(struct vio_dev *dev, const struct vio_device_id *id) INIT_WORK(&vport->crq_work, handle_crq); - err = scsi_add_host(shost, target->dev); + err = crq_queue_create(&vport->crq_queue, target); if (err) goto free_srp_target; - err = scsi_tgt_alloc_queue(shost); + err = scsi_add_host(shost, target->dev); if (err) - goto remove_host; + goto destroy_queue; - err = crq_queue_create(&vport->crq_queue, target); + err = scsi_tgt_alloc_queue(shost); if (err) - goto free_queue; + goto destroy_queue; return 0; -free_queue: - scsi_tgt_free_queue(shost); -remove_host: - scsi_remove_host(shost); +destroy_queue: + crq_queue_destroy(target); free_srp_target: srp_target_free(target); put_host: diff --git a/trunk/drivers/scsi/libiscsi.c b/trunk/drivers/scsi/libiscsi.c index 3fdee7370ccc..801c7cf54d2e 100644 --- a/trunk/drivers/scsi/libiscsi.c +++ b/trunk/drivers/scsi/libiscsi.c @@ -489,6 +489,12 @@ __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 @@ -697,11 +703,6 @@ 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, diff --git a/trunk/drivers/scsi/scsi_lib.c b/trunk/drivers/scsi/scsi_lib.c index 148d3af92aef..fa45a1a66867 100644 --- a/trunk/drivers/scsi/scsi_lib.c +++ b/trunk/drivers/scsi/scsi_lib.c @@ -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; - spin_lock_irqsave(q->queue_lock, flags); scsi_unprep_request(req); + spin_lock_irqsave(q->queue_lock, flags); blk_requeue_request(q, req); spin_unlock_irqrestore(q->queue_lock, flags); diff --git a/trunk/drivers/serial/ioc3_serial.c b/trunk/drivers/serial/ioc3_serial.c index ae3699d77dd0..6dd98f9fb89c 100644 --- a/trunk/drivers/serial/ioc3_serial.c +++ b/trunk/drivers/serial/ioc3_serial.c @@ -2149,7 +2149,7 @@ ioc3uart_probe(struct ioc3_submodule *is, struct ioc3_driver_data *idd) return ret; } -static struct ioc3_submodule ioc3uart_ops = { +static struct ioc3_submodule ioc3uart_submodule = { .name = "IOC3uart", .probe = ioc3uart_probe, .remove = ioc3uart_remove, @@ -2173,7 +2173,7 @@ static int __devinit ioc3uart_init(void) __func__); return ret; } - ret = ioc3_register_submodule(&ioc3uart_ops); + ret = ioc3_register_submodule(&ioc3uart_submodule); if (ret) uart_unregister_driver(&ioc3_uart); return ret; @@ -2181,7 +2181,7 @@ static int __devinit ioc3uart_init(void) static void __devexit ioc3uart_exit(void) { - ioc3_unregister_submodule(&ioc3uart_ops); + ioc3_unregister_submodule(&ioc3uart_submodule); uart_unregister_driver(&ioc3_uart); } diff --git a/trunk/drivers/serial/s3c2440.c b/trunk/drivers/serial/s3c2440.c index 29cbb0afef8e..317d239ab740 100644 --- a/trunk/drivers/serial/s3c2440.c +++ b/trunk/drivers/serial/s3c2440.c @@ -177,5 +177,5 @@ module_exit(s3c2440_serial_exit); MODULE_DESCRIPTION("Samsung S3C2440,S3C2442 SoC Serial port driver"); MODULE_AUTHOR("Ben Dooks "); -MODULE_LICENSE("GPL v2"); +MODULE_LICENSE("GPLi v2"); MODULE_ALIAS("platform:s3c2440-uart"); diff --git a/trunk/drivers/sh/maple/maple.c b/trunk/drivers/sh/maple/maple.c index 63f0de29aa14..d1812d32f47d 100644 --- a/trunk/drivers/sh/maple/maple.c +++ b/trunk/drivers/sh/maple/maple.c @@ -827,7 +827,7 @@ static int __init maple_bus_init(void) maple_queue_cache = kmem_cache_create("maple_queue_cache", 0x400, 0, - SLAB_HWCACHE_ALIGN, NULL); + SLAB_POISON|SLAB_HWCACHE_ALIGN, NULL); if (!maple_queue_cache) goto cleanup_bothirqs; diff --git a/trunk/drivers/staging/Kconfig b/trunk/drivers/staging/Kconfig index 5d457c96bd7e..c95b286a1239 100644 --- a/trunk/drivers/staging/Kconfig +++ b/trunk/drivers/staging/Kconfig @@ -22,8 +22,6 @@ 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 @@ -64,4 +62,3 @@ source "drivers/staging/at76_usb/Kconfig" source "drivers/staging/poch/Kconfig" endif # !STAGING_EXCLUDE_BUILD -endif # STAGING diff --git a/trunk/drivers/usb/class/usbtmc.c b/trunk/drivers/usb/class/usbtmc.c index 43a863c5cc43..8e74657f106c 100644 --- a/trunk/drivers/usb/class/usbtmc.c +++ b/trunk/drivers/usb/class/usbtmc.c @@ -51,7 +51,6 @@ 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 diff --git a/trunk/drivers/usb/core/driver.c b/trunk/drivers/usb/core/driver.c index 8c081308b0e2..3d7793d93031 100644 --- a/trunk/drivers/usb/core/driver.c +++ b/trunk/drivers/usb/core/driver.c @@ -279,9 +279,7 @@ 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 (intf->cur_altsetting->desc.bAlternateSetting == 0) - ; /* Already in altsetting 0 so skip Set-Interface */ - else if (!error && intf->dev.power.status == DPM_ON) + if (!error && intf->dev.power.status == DPM_ON) usb_set_interface(udev, intf->altsetting[0]. desc.bInterfaceNumber, 0); else diff --git a/trunk/drivers/usb/gadget/f_rndis.c b/trunk/drivers/usb/gadget/f_rndis.c index 3a8bb53fc473..428b5993575a 100644 --- a/trunk/drivers/usb/gadget/f_rndis.c +++ b/trunk/drivers/usb/gadget/f_rndis.c @@ -651,8 +651,6 @@ 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); @@ -664,8 +662,6 @@ 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; diff --git a/trunk/drivers/usb/serial/ftdi_sio.c b/trunk/drivers/usb/serial/ftdi_sio.c index fb6f2933b01b..aad1359a3eb1 100644 --- a/trunk/drivers/usb/serial/ftdi_sio.c +++ b/trunk/drivers/usb/serial/ftdi_sio.c @@ -143,7 +143,6 @@ 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) }, @@ -167,7 +166,6 @@ 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) }, diff --git a/trunk/drivers/usb/serial/ftdi_sio.h b/trunk/drivers/usb/serial/ftdi_sio.h index 373ee09975bb..07a3992abad2 100644 --- a/trunk/drivers/usb/serial/ftdi_sio.h +++ b/trunk/drivers/usb/serial/ftdi_sio.h @@ -40,9 +40,6 @@ /* 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 */ @@ -78,9 +75,6 @@ /* 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 */ diff --git a/trunk/drivers/usb/serial/pl2303.c b/trunk/drivers/usb/serial/pl2303.c index 1aed584be5eb..491c8857b644 100644 --- a/trunk/drivers/usb/serial/pl2303.c +++ b/trunk/drivers/usb/serial/pl2303.c @@ -91,8 +91,6 @@ 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 */ }; diff --git a/trunk/drivers/usb/serial/pl2303.h b/trunk/drivers/usb/serial/pl2303.h index 54974f446a8c..a3bd039c78e9 100644 --- a/trunk/drivers/usb/serial/pl2303.h +++ b/trunk/drivers/usb/serial/pl2303.h @@ -110,11 +110,3 @@ /* 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 diff --git a/trunk/drivers/usb/serial/ti_usb_3410_5052.c b/trunk/drivers/usb/serial/ti_usb_3410_5052.c index 01d0c70d60e9..31c42d1cae13 100644 --- a/trunk/drivers/usb/serial/ti_usb_3410_5052.c +++ b/trunk/drivers/usb/serial/ti_usb_3410_5052.c @@ -16,6 +16,56 @@ * For questions or problems with this driver, contact Texas Instruments * technical support, or Al Borchers , or * Peter Berger . + * + * 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 @@ -407,10 +457,9 @@ static int ti_startup(struct usb_serial *serial) goto free_tdev; } - /* the second configuration must be set */ + /* the second configuration must be set (in sysfs by hotplug script) */ if (dev->actconfig->desc.bConfigurationValue == TI_BOOT_CONFIG) { - status = usb_driver_set_configuration(dev, TI_ACTIVE_CONFIG); - status = status ? status : -ENODEV; + status = -ENODEV; goto free_tdev; } diff --git a/trunk/drivers/usb/storage/unusual_devs.h b/trunk/drivers/usb/storage/unusual_devs.h index bfcc1fe82518..e61f2bfc64ad 100644 --- a/trunk/drivers/usb/storage/unusual_devs.h +++ b/trunk/drivers/usb/storage/unusual_devs.h @@ -167,22 +167,8 @@ UNUSUAL_DEV( 0x0421, 0x005d, 0x0001, 0x0600, US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_CAPACITY ), -/* Reported by Ozan Sener */ -UNUSUAL_DEV( 0x0421, 0x0060, 0x0551, 0x0551, - "Nokia", - "3500c", - US_SC_DEVICE, US_PR_DEVICE, NULL, - US_FL_FIX_CAPACITY ), - -/* Reported by CSECSY Laszlo */ -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, 0x0701, +UNUSUAL_DEV( 0x0421, 0x006a, 0x0000, 0x0591, "Nokia", "5310", US_SC_DEVICE, US_PR_DEVICE, NULL, diff --git a/trunk/drivers/video/aty/radeon_accel.c b/trunk/drivers/video/aty/radeon_accel.c index a469a3d6edcb..8da5e5ab8547 100644 --- a/trunk/drivers/video/aty/radeon_accel.c +++ b/trunk/drivers/video/aty/radeon_accel.c @@ -5,61 +5,61 @@ * --dte */ -static void radeon_fixup_offset(struct radeonfb_info *rinfo) +#define FLUSH_CACHE_WORKAROUND 1 + +void radeon_fifo_update_and_wait(struct radeonfb_info *rinfo, int entries) { - u32 local_base; - - /* *** Ugly workaround *** */ - /* - * On some platforms, the video memory is mapped at 0 in radeon chip space - * (like PPCs) by the firmware. X will always move it up so that it's seen - * by the chip to be at the same address as the PCI BAR. - * That means that when switching back from X, there is a mismatch between - * the offsets programmed into the engine. This means that potentially, - * accel operations done before radeonfb has a chance to re-init the engine - * will have incorrect offsets, and potentially trash system memory ! - * - * The correct fix is for fbcon to never call any accel op before the engine - * has properly been re-initialized (by a call to set_var), but this is a - * complex fix. This workaround in the meantime, called before every accel - * operation, makes sure the offsets are in sync. - */ + int i; - radeon_fifo_wait (1); - local_base = INREG(MC_FB_LOCATION) << 16; - if (local_base == rinfo->fb_local_base) - return; + for (i=0; i<2000000; i++) { + rinfo->fifo_free = INREG(RBBM_STATUS) & 0x7f; + if (rinfo->fifo_free >= entries) + return; + udelay(10); + } + printk(KERN_ERR "radeonfb: FIFO Timeout !\n"); + /* XXX Todo: attempt to reset the engine */ +} - rinfo->fb_local_base = local_base; +static inline void radeon_fifo_wait(struct radeonfb_info *rinfo, int entries) +{ + if (entries <= rinfo->fifo_free) + rinfo->fifo_free -= entries; + else + radeon_fifo_update_and_wait(rinfo, entries); +} - radeon_fifo_wait (3); - OUTREG(DEFAULT_PITCH_OFFSET, (rinfo->pitch << 0x16) | - (rinfo->fb_local_base >> 10)); - OUTREG(DST_PITCH_OFFSET, (rinfo->pitch << 0x16) | (rinfo->fb_local_base >> 10)); - OUTREG(SRC_PITCH_OFFSET, (rinfo->pitch << 0x16) | (rinfo->fb_local_base >> 10)); +static inline void radeonfb_set_creg(struct radeonfb_info *rinfo, u32 reg, + u32 *cache, u32 new_val) +{ + if (new_val == *cache) + return; + *cache = new_val; + radeon_fifo_wait(rinfo, 1); + OUTREG(reg, new_val); } static void radeonfb_prim_fillrect(struct radeonfb_info *rinfo, const struct fb_fillrect *region) { - radeon_fifo_wait(4); - - OUTREG(DP_GUI_MASTER_CNTL, - rinfo->dp_gui_master_cntl /* contains, like GMC_DST_32BPP */ - | GMC_BRUSH_SOLID_COLOR - | ROP3_P); - if (radeon_get_dstbpp(rinfo->depth) != DST_8BPP) - OUTREG(DP_BRUSH_FRGD_CLR, rinfo->pseudo_palette[region->color]); - else - OUTREG(DP_BRUSH_FRGD_CLR, region->color); - OUTREG(DP_WRITE_MSK, 0xffffffff); - OUTREG(DP_CNTL, (DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM)); - - radeon_fifo_wait(2); + radeonfb_set_creg(rinfo, DP_GUI_MASTER_CNTL, &rinfo->dp_gui_mc_cache, + rinfo->dp_gui_mc_base | GMC_BRUSH_SOLID_COLOR | ROP3_P); + radeonfb_set_creg(rinfo, DP_CNTL, &rinfo->dp_cntl_cache, + DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM); + radeonfb_set_creg(rinfo, DP_BRUSH_FRGD_CLR, &rinfo->dp_brush_fg_cache, + region->color); + + /* Ensure the dst cache is flushed and the engine idle before + * issuing the operation. + * + * This works around engine lockups on some cards + */ +#if FLUSH_CACHE_WORKAROUND + radeon_fifo_wait(rinfo, 2); OUTREG(DSTCACHE_CTLSTAT, RB2D_DC_FLUSH_ALL); OUTREG(WAIT_UNTIL, (WAIT_2D_IDLECLEAN | WAIT_DMA_GUI_IDLE)); - - radeon_fifo_wait(2); +#endif + radeon_fifo_wait(rinfo, 2); OUTREG(DST_Y_X, (region->dy << 16) | region->dx); OUTREG(DST_WIDTH_HEIGHT, (region->width << 16) | region->height); } @@ -70,15 +70,14 @@ void radeonfb_fillrect(struct fb_info *info, const struct fb_fillrect *region) struct fb_fillrect modded; int vxres, vyres; - if (info->state != FBINFO_STATE_RUNNING) + WARN_ON(rinfo->gfx_mode); + if (info->state != FBINFO_STATE_RUNNING || rinfo->gfx_mode) return; if (info->flags & FBINFO_HWACCEL_DISABLED) { cfb_fillrect(info, region); return; } - radeon_fixup_offset(rinfo); - vxres = info->var.xres_virtual; vyres = info->var.yres_virtual; @@ -91,6 +90,10 @@ void radeonfb_fillrect(struct fb_info *info, const struct fb_fillrect *region) if(modded.dx + modded.width > vxres) modded.width = vxres - modded.dx; if(modded.dy + modded.height > vyres) modded.height = vyres - modded.dy; + if (info->fix.visual == FB_VISUAL_TRUECOLOR || + info->fix.visual == FB_VISUAL_DIRECTCOLOR ) + modded.color = ((u32 *) (info->pseudo_palette))[region->color]; + radeonfb_prim_fillrect(rinfo, &modded); } @@ -109,22 +112,22 @@ static void radeonfb_prim_copyarea(struct radeonfb_info *rinfo, if ( xdir < 0 ) { sx += w-1; dx += w-1; } if ( ydir < 0 ) { sy += h-1; dy += h-1; } - radeon_fifo_wait(3); - OUTREG(DP_GUI_MASTER_CNTL, - rinfo->dp_gui_master_cntl /* i.e. GMC_DST_32BPP */ - | GMC_BRUSH_NONE - | GMC_SRC_DSTCOLOR - | ROP3_S - | DP_SRC_SOURCE_MEMORY ); - OUTREG(DP_WRITE_MSK, 0xffffffff); - OUTREG(DP_CNTL, (xdir>=0 ? DST_X_LEFT_TO_RIGHT : 0) - | (ydir>=0 ? DST_Y_TOP_TO_BOTTOM : 0)); - - radeon_fifo_wait(2); + radeonfb_set_creg(rinfo, DP_GUI_MASTER_CNTL, &rinfo->dp_gui_mc_cache, + rinfo->dp_gui_mc_base | + GMC_BRUSH_NONE | + GMC_SRC_DATATYPE_COLOR | + ROP3_S | + DP_SRC_SOURCE_MEMORY); + radeonfb_set_creg(rinfo, DP_CNTL, &rinfo->dp_cntl_cache, + (xdir>=0 ? DST_X_LEFT_TO_RIGHT : 0) | + (ydir>=0 ? DST_Y_TOP_TO_BOTTOM : 0)); + +#if FLUSH_CACHE_WORKAROUND + radeon_fifo_wait(rinfo, 2); OUTREG(DSTCACHE_CTLSTAT, RB2D_DC_FLUSH_ALL); OUTREG(WAIT_UNTIL, (WAIT_2D_IDLECLEAN | WAIT_DMA_GUI_IDLE)); - - radeon_fifo_wait(3); +#endif + radeon_fifo_wait(rinfo, 3); OUTREG(SRC_Y_X, (sy << 16) | sx); OUTREG(DST_Y_X, (dy << 16) | dx); OUTREG(DST_HEIGHT_WIDTH, (h << 16) | w); @@ -143,15 +146,14 @@ void radeonfb_copyarea(struct fb_info *info, const struct fb_copyarea *area) modded.width = area->width; modded.height = area->height; - if (info->state != FBINFO_STATE_RUNNING) + WARN_ON(rinfo->gfx_mode); + if (info->state != FBINFO_STATE_RUNNING || rinfo->gfx_mode) return; if (info->flags & FBINFO_HWACCEL_DISABLED) { cfb_copyarea(info, area); return; } - radeon_fixup_offset(rinfo); - vxres = info->var.xres_virtual; vyres = info->var.yres_virtual; @@ -168,13 +170,116 @@ void radeonfb_copyarea(struct fb_info *info, const struct fb_copyarea *area) radeonfb_prim_copyarea(rinfo, &modded); } +static void radeonfb_prim_imageblit(struct radeonfb_info *rinfo, + const struct fb_image *image, + u32 fg, u32 bg) +{ + unsigned int dwords; + u32 *bits; + + radeonfb_set_creg(rinfo, DP_GUI_MASTER_CNTL, &rinfo->dp_gui_mc_cache, + rinfo->dp_gui_mc_base | + GMC_BRUSH_NONE | GMC_DST_CLIP_LEAVE | + GMC_SRC_DATATYPE_MONO_FG_BG | + ROP3_S | + GMC_BYTE_ORDER_MSB_TO_LSB | + DP_SRC_SOURCE_HOST_DATA); + radeonfb_set_creg(rinfo, DP_CNTL, &rinfo->dp_cntl_cache, + DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM); + radeonfb_set_creg(rinfo, DP_SRC_FRGD_CLR, &rinfo->dp_src_fg_cache, fg); + radeonfb_set_creg(rinfo, DP_SRC_BKGD_CLR, &rinfo->dp_src_bg_cache, bg); + + /* Ensure the dst cache is flushed and the engine idle before + * issuing the operation. + * + * This works around engine lockups on some cards + */ +#if FLUSH_CACHE_WORKAROUND + radeon_fifo_wait(rinfo, 2); + OUTREG(DSTCACHE_CTLSTAT, RB2D_DC_FLUSH_ALL); + OUTREG(WAIT_UNTIL, (WAIT_2D_IDLECLEAN | WAIT_DMA_GUI_IDLE)); +#endif + + /* X here pads width to a multiple of 32 and uses the clipper to + * adjust the result. Is that really necessary ? Things seem to + * work ok for me without that and the doco doesn't seem to imply] + * there is such a restriction. + */ + radeon_fifo_wait(rinfo, 4); + OUTREG(SC_TOP_LEFT, (image->dy << 16) | image->dx); + OUTREG(SC_BOTTOM_RIGHT, ((image->dy + image->height) << 16) | + (image->dx + image->width)); + OUTREG(DST_Y_X, (image->dy << 16) | image->dx); + + OUTREG(DST_HEIGHT_WIDTH, (image->height << 16) | ((image->width + 31) & ~31)); + + dwords = (image->width + 31) >> 5; + dwords *= image->height; + bits = (u32*)(image->data); + + while(dwords >= 8) { + radeon_fifo_wait(rinfo, 8); +#if BITS_PER_LONG == 64 + __raw_writeq(*((u64 *)(bits)), rinfo->mmio_base + HOST_DATA0); + __raw_writeq(*((u64 *)(bits+2)), rinfo->mmio_base + HOST_DATA2); + __raw_writeq(*((u64 *)(bits+4)), rinfo->mmio_base + HOST_DATA4); + __raw_writeq(*((u64 *)(bits+6)), rinfo->mmio_base + HOST_DATA6); + bits += 8; +#else + __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA0); + __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA1); + __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA2); + __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA3); + __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA4); + __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA5); + __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA6); + __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA7); +#endif + dwords -= 8; + } + while(dwords--) { + radeon_fifo_wait(rinfo, 1); + __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA0); + } +} + void radeonfb_imageblit(struct fb_info *info, const struct fb_image *image) { struct radeonfb_info *rinfo = info->par; + u32 fg, bg; - if (info->state != FBINFO_STATE_RUNNING) + WARN_ON(rinfo->gfx_mode); + if (info->state != FBINFO_STATE_RUNNING || rinfo->gfx_mode) return; - radeon_engine_idle(); + + if (!image->width || !image->height) + return; + + /* We only do 1 bpp color expansion for now */ + if (!accel_cexp || + (info->flags & FBINFO_HWACCEL_DISABLED) || image->depth != 1) + goto fallback; + + /* Fallback if running out of the screen. We may do clipping + * in the future */ + if ((image->dx + image->width) > info->var.xres_virtual || + (image->dy + image->height) > info->var.yres_virtual) + goto fallback; + + if (info->fix.visual == FB_VISUAL_TRUECOLOR || + info->fix.visual == FB_VISUAL_DIRECTCOLOR) { + fg = ((u32*)(info->pseudo_palette))[image->fg_color]; + bg = ((u32*)(info->pseudo_palette))[image->bg_color]; + } else { + fg = image->fg_color; + bg = image->bg_color; + } + + radeonfb_prim_imageblit(rinfo, image, fg, bg); + return; + + fallback: + radeon_engine_idle(rinfo); cfb_imageblit(info, image); } @@ -185,7 +290,8 @@ int radeonfb_sync(struct fb_info *info) if (info->state != FBINFO_STATE_RUNNING) return 0; - radeon_engine_idle(); + + radeon_engine_idle(rinfo); return 0; } @@ -261,9 +367,10 @@ void radeonfb_engine_init (struct radeonfb_info *rinfo) /* disable 3D engine */ OUTREG(RB3D_CNTL, 0); + rinfo->fifo_free = 0; radeonfb_engine_reset(rinfo); - radeon_fifo_wait (1); + radeon_fifo_wait(rinfo, 1); if (IS_R300_VARIANT(rinfo)) { OUTREG(RB2D_DSTCACHE_MODE, INREG(RB2D_DSTCACHE_MODE) | RB2D_DC_AUTOFLUSH_ENABLE | @@ -277,7 +384,7 @@ void radeonfb_engine_init (struct radeonfb_info *rinfo) OUTREG(RB2D_DSTCACHE_MODE, 0); } - radeon_fifo_wait (3); + radeon_fifo_wait(rinfo, 3); /* We re-read MC_FB_LOCATION from card as it can have been * modified by XFree drivers (ouch !) */ @@ -288,41 +395,57 @@ void radeonfb_engine_init (struct radeonfb_info *rinfo) OUTREG(DST_PITCH_OFFSET, (rinfo->pitch << 0x16) | (rinfo->fb_local_base >> 10)); OUTREG(SRC_PITCH_OFFSET, (rinfo->pitch << 0x16) | (rinfo->fb_local_base >> 10)); - radeon_fifo_wait (1); -#if defined(__BIG_ENDIAN) + radeon_fifo_wait(rinfo, 1); +#ifdef __BIG_ENDIAN OUTREGP(DP_DATATYPE, HOST_BIG_ENDIAN_EN, ~HOST_BIG_ENDIAN_EN); #else OUTREGP(DP_DATATYPE, 0, ~HOST_BIG_ENDIAN_EN); #endif - radeon_fifo_wait (2); + radeon_fifo_wait(rinfo, 2); OUTREG(DEFAULT_SC_TOP_LEFT, 0); OUTREG(DEFAULT_SC_BOTTOM_RIGHT, (DEFAULT_SC_RIGHT_MAX | DEFAULT_SC_BOTTOM_MAX)); + /* set default DP_GUI_MASTER_CNTL */ temp = radeon_get_dstbpp(rinfo->depth); - rinfo->dp_gui_master_cntl = ((temp << 8) | GMC_CLR_CMP_CNTL_DIS); + rinfo->dp_gui_mc_base = ((temp << 8) | GMC_CLR_CMP_CNTL_DIS); - radeon_fifo_wait (1); - OUTREG(DP_GUI_MASTER_CNTL, (rinfo->dp_gui_master_cntl | - GMC_BRUSH_SOLID_COLOR | - GMC_SRC_DATATYPE_COLOR)); + rinfo->dp_gui_mc_cache = rinfo->dp_gui_mc_base | + GMC_BRUSH_SOLID_COLOR | + GMC_SRC_DATATYPE_COLOR; + radeon_fifo_wait(rinfo, 1); + OUTREG(DP_GUI_MASTER_CNTL, rinfo->dp_gui_mc_cache); - radeon_fifo_wait (7); /* clear line drawing regs */ + radeon_fifo_wait(rinfo, 2); OUTREG(DST_LINE_START, 0); OUTREG(DST_LINE_END, 0); - /* set brush color regs */ - OUTREG(DP_BRUSH_FRGD_CLR, 0xffffffff); - OUTREG(DP_BRUSH_BKGD_CLR, 0x00000000); - - /* set source color regs */ - OUTREG(DP_SRC_FRGD_CLR, 0xffffffff); - OUTREG(DP_SRC_BKGD_CLR, 0x00000000); + /* set brush and source color regs */ + rinfo->dp_brush_fg_cache = 0xffffffff; + rinfo->dp_brush_bg_cache = 0x00000000; + rinfo->dp_src_fg_cache = 0xffffffff; + rinfo->dp_src_bg_cache = 0x00000000; + radeon_fifo_wait(rinfo, 4); + OUTREG(DP_BRUSH_FRGD_CLR, rinfo->dp_brush_fg_cache); + OUTREG(DP_BRUSH_BKGD_CLR, rinfo->dp_brush_bg_cache); + OUTREG(DP_SRC_FRGD_CLR, rinfo->dp_src_fg_cache); + OUTREG(DP_SRC_BKGD_CLR, rinfo->dp_src_bg_cache); + + /* Default direction */ + rinfo->dp_cntl_cache = DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM; + radeon_fifo_wait(rinfo, 1); + OUTREG(DP_CNTL, rinfo->dp_cntl_cache); /* default write mask */ + radeon_fifo_wait(rinfo, 1); OUTREG(DP_WRITE_MSK, 0xffffffff); - radeon_engine_idle (); + /* Default to no swapping of host data */ + radeon_fifo_wait(rinfo, 1); + OUTREG(RBBM_GUICNTL, RBBM_GUICNTL_HOST_DATA_SWAP_NONE); + + /* Make sure it's settled */ + radeon_engine_idle(rinfo); } diff --git a/trunk/drivers/video/aty/radeon_backlight.c b/trunk/drivers/video/aty/radeon_backlight.c index 1a056adb61c8..f343ba83f0ae 100644 --- a/trunk/drivers/video/aty/radeon_backlight.c +++ b/trunk/drivers/video/aty/radeon_backlight.c @@ -66,7 +66,7 @@ static int radeon_bl_update_status(struct backlight_device *bd) level = bd->props.brightness; del_timer_sync(&rinfo->lvds_timer); - radeon_engine_idle(); + radeon_engine_idle(rinfo); lvds_gen_cntl = INREG(LVDS_GEN_CNTL); if (level > 0) { diff --git a/trunk/drivers/video/aty/radeon_base.c b/trunk/drivers/video/aty/radeon_base.c index d0f1a7fc2c9d..d5b27f9d374d 100644 --- a/trunk/drivers/video/aty/radeon_base.c +++ b/trunk/drivers/video/aty/radeon_base.c @@ -282,6 +282,8 @@ static int backlight = 1; static int backlight = 0; #endif +int accel_cexp = 0; + /* * prototypes */ @@ -852,7 +854,6 @@ static int radeonfb_pan_display (struct fb_var_screeninfo *var, if (rinfo->asleep) return 0; - radeon_fifo_wait(2); OUTREG(CRTC_OFFSET, ((var->yoffset * var->xres_virtual + var->xoffset) * var->bits_per_pixel / 8) & ~7); return 0; @@ -882,7 +883,6 @@ static int radeonfb_ioctl (struct fb_info *info, unsigned int cmd, if (rc) return rc; - radeon_fifo_wait(2); if (value & 0x01) { tmp = INREG(LVDS_GEN_CNTL); @@ -940,7 +940,7 @@ int radeon_screen_blank(struct radeonfb_info *rinfo, int blank, int mode_switch) if (rinfo->lock_blank) return 0; - radeon_engine_idle(); + radeon_engine_idle(rinfo); val = INREG(CRTC_EXT_CNTL); val &= ~(CRTC_DISPLAY_DIS | CRTC_HSYNC_DIS | @@ -1048,7 +1048,7 @@ static int radeonfb_blank (int blank, struct fb_info *info) if (rinfo->asleep) return 0; - + return radeon_screen_blank(rinfo, blank, 0); } @@ -1074,8 +1074,6 @@ static int radeon_setcolreg (unsigned regno, unsigned red, unsigned green, pindex = regno; if (!rinfo->asleep) { - radeon_fifo_wait(9); - if (rinfo->bpp == 16) { pindex = regno * 8; @@ -1244,8 +1242,6 @@ static void radeon_write_pll_regs(struct radeonfb_info *rinfo, struct radeon_reg { int i; - radeon_fifo_wait(20); - /* Workaround from XFree */ if (rinfo->is_mobility) { /* A temporal workaround for the occational blanking on certain laptop @@ -1341,7 +1337,7 @@ static void radeon_lvds_timer_func(unsigned long data) { struct radeonfb_info *rinfo = (struct radeonfb_info *)data; - radeon_engine_idle(); + radeon_engine_idle(rinfo); OUTREG(LVDS_GEN_CNTL, rinfo->pending_lvds_gen_cntl); } @@ -1359,10 +1355,11 @@ void radeon_write_mode (struct radeonfb_info *rinfo, struct radeon_regs *mode, if (nomodeset) return; + radeon_engine_idle(rinfo); + if (!regs_only) radeon_screen_blank(rinfo, FB_BLANK_NORMAL, 0); - radeon_fifo_wait(31); for (i=0; i<10; i++) OUTREG(common_regs[i].reg, common_regs[i].val); @@ -1390,7 +1387,6 @@ void radeon_write_mode (struct radeonfb_info *rinfo, struct radeon_regs *mode, radeon_write_pll_regs(rinfo, mode); if ((primary_mon == MT_DFP) || (primary_mon == MT_LCD)) { - radeon_fifo_wait(10); OUTREG(FP_CRTC_H_TOTAL_DISP, mode->fp_crtc_h_total_disp); OUTREG(FP_CRTC_V_TOTAL_DISP, mode->fp_crtc_v_total_disp); OUTREG(FP_H_SYNC_STRT_WID, mode->fp_h_sync_strt_wid); @@ -1405,7 +1401,6 @@ void radeon_write_mode (struct radeonfb_info *rinfo, struct radeon_regs *mode, if (!regs_only) radeon_screen_blank(rinfo, FB_BLANK_UNBLANK, 0); - radeon_fifo_wait(2); OUTPLL(VCLK_ECP_CNTL, mode->vclk_ecp_cntl); return; @@ -1556,7 +1551,7 @@ static int radeonfb_set_par(struct fb_info *info) /* We always want engine to be idle on a mode switch, even * if we won't actually change the mode */ - radeon_engine_idle(); + radeon_engine_idle(rinfo); hSyncStart = mode->xres + mode->right_margin; hSyncEnd = hSyncStart + mode->hsync_len; @@ -1851,7 +1846,6 @@ static int radeonfb_set_par(struct fb_info *info) return 0; } - static struct fb_ops radeonfb_ops = { .owner = THIS_MODULE, .fb_check_var = radeonfb_check_var, @@ -1875,6 +1869,7 @@ static int __devinit radeon_set_fbinfo (struct radeonfb_info *rinfo) info->par = rinfo; info->pseudo_palette = rinfo->pseudo_palette; info->flags = FBINFO_DEFAULT + | FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT | FBINFO_HWACCEL_XPAN @@ -1882,6 +1877,7 @@ static int __devinit radeon_set_fbinfo (struct radeonfb_info *rinfo) info->fbops = &radeonfb_ops; info->screen_base = rinfo->fb_base; info->screen_size = rinfo->mapped_vram; + /* Fill fix common fields */ strlcpy(info->fix.id, rinfo->name, sizeof(info->fix.id)); info->fix.smem_start = rinfo->fb_base_phys; @@ -1896,8 +1892,25 @@ static int __devinit radeon_set_fbinfo (struct radeonfb_info *rinfo) info->fix.mmio_len = RADEON_REGSIZE; info->fix.accel = FB_ACCEL_ATI_RADEON; + /* Allocate colormap */ fb_alloc_cmap(&info->cmap, 256, 0); + /* Setup pixmap used for acceleration */ +#define PIXMAP_SIZE (2048 * 4) + + info->pixmap.addr = kmalloc(PIXMAP_SIZE, GFP_KERNEL); + if (!info->pixmap.addr) { + printk(KERN_ERR "radeonfb: Failed to allocate pixmap !\n"); + noaccel = 1; + goto bail; + } + info->pixmap.size = PIXMAP_SIZE; + info->pixmap.flags = FB_PIXMAP_SYSTEM; + info->pixmap.scan_align = 4; + info->pixmap.buf_align = 4; + info->pixmap.access_align = 32; + +bail: if (noaccel) info->flags |= FBINFO_HWACCEL_DISABLED; @@ -2006,7 +2019,6 @@ static void radeon_identify_vram(struct radeonfb_info *rinfo) u32 tom = INREG(NB_TOM); tmp = ((((tom >> 16) - (tom & 0xffff) + 1) << 6) * 1024); - radeon_fifo_wait(6); OUTREG(MC_FB_LOCATION, tom); OUTREG(DISPLAY_BASE_ADDR, (tom & 0xffff) << 16); OUTREG(CRTC2_DISPLAY_BASE_ADDR, (tom & 0xffff) << 16); @@ -2510,6 +2522,8 @@ static int __init radeonfb_setup (char *options) } else if (!strncmp(this_opt, "ignore_devlist", 14)) { ignore_devlist = 1; #endif + } else if (!strncmp(this_opt, "accel_cexp", 12)) { + accel_cexp = 1; } else mode_option = this_opt; } @@ -2557,6 +2571,8 @@ module_param(monitor_layout, charp, 0); MODULE_PARM_DESC(monitor_layout, "Specify monitor mapping (like XFree86)"); module_param(force_measure_pll, bool, 0); MODULE_PARM_DESC(force_measure_pll, "Force measurement of PLL (debug)"); +module_param(accel_cexp, bool, 0); +MODULE_PARM_DESC(accel_cexp, "Use acceleration engine for color expansion"); #ifdef CONFIG_MTRR module_param(nomtrr, bool, 0); MODULE_PARM_DESC(nomtrr, "bool: disable use of MTRR registers"); diff --git a/trunk/drivers/video/aty/radeon_pm.c b/trunk/drivers/video/aty/radeon_pm.c index 675abdafc2d8..3df5015f1d13 100644 --- a/trunk/drivers/video/aty/radeon_pm.c +++ b/trunk/drivers/video/aty/radeon_pm.c @@ -2653,9 +2653,9 @@ int radeonfb_pci_suspend(struct pci_dev *pdev, pm_message_t mesg) if (!(info->flags & FBINFO_HWACCEL_DISABLED)) { /* Make sure engine is reset */ - radeon_engine_idle(); + radeon_engine_idle(rinfo); radeonfb_engine_reset(rinfo); - radeon_engine_idle(); + radeon_engine_idle(rinfo); } /* Blank display and LCD */ @@ -2767,7 +2767,7 @@ int radeonfb_pci_resume(struct pci_dev *pdev) rinfo->asleep = 0; } else - radeon_engine_idle(); + radeon_engine_idle(rinfo); /* Restore display & engine */ radeon_write_mode (rinfo, &rinfo->state, 1); diff --git a/trunk/drivers/video/aty/radeonfb.h b/trunk/drivers/video/aty/radeonfb.h index 3ea1b00fdd22..974ca6d86540 100644 --- a/trunk/drivers/video/aty/radeonfb.h +++ b/trunk/drivers/video/aty/radeonfb.h @@ -336,7 +336,15 @@ struct radeonfb_info { int mon2_type; u8 *mon2_EDID; - u32 dp_gui_master_cntl; + /* accel bits */ + u32 dp_gui_mc_base; + u32 dp_gui_mc_cache; + u32 dp_cntl_cache; + u32 dp_brush_fg_cache; + u32 dp_brush_bg_cache; + u32 dp_src_fg_cache; + u32 dp_src_bg_cache; + u32 fifo_free; struct pll_info pll; @@ -348,6 +356,7 @@ struct radeonfb_info { int lock_blank; int dynclk; int no_schedule; + int gfx_mode; enum radeon_pm_mode pm_mode; reinit_function_ptr reinit_func; @@ -392,8 +401,14 @@ static inline void _radeon_msleep(struct radeonfb_info *rinfo, unsigned long ms) #define OUTREG8(addr,val) writeb(val, (rinfo->mmio_base)+addr) #define INREG16(addr) readw((rinfo->mmio_base)+addr) #define OUTREG16(addr,val) writew(val, (rinfo->mmio_base)+addr) + +#ifdef CONFIG_PPC +#define INREG(addr) ({ eieio(); ld_le32(rinfo->mmio_base+(addr)); }) +#define OUTREG(addr,val) do { eieio(); st_le32(rinfo->mmio_base+(addr),(val)); } while(0) +#else #define INREG(addr) readl((rinfo->mmio_base)+addr) #define OUTREG(addr,val) writel(val, (rinfo->mmio_base)+addr) +#endif static inline void _OUTREGP(struct radeonfb_info *rinfo, u32 addr, u32 val, u32 mask) @@ -535,17 +550,7 @@ static inline u32 radeon_get_dstbpp(u16 depth) * 2D Engine helper routines */ -static inline void _radeon_fifo_wait(struct radeonfb_info *rinfo, int entries) -{ - int i; - - for (i=0; i<2000000; i++) { - if ((INREG(RBBM_STATUS) & 0x7f) >= entries) - return; - udelay(1); - } - printk(KERN_ERR "radeonfb: FIFO Timeout !\n"); -} +extern void radeon_fifo_update_and_wait(struct radeonfb_info *rinfo, int entries); static inline void radeon_engine_flush (struct radeonfb_info *rinfo) { @@ -558,7 +563,7 @@ static inline void radeon_engine_flush (struct radeonfb_info *rinfo) /* Ensure FIFO is empty, ie, make sure the flush commands * has reached the cache */ - _radeon_fifo_wait (rinfo, 64); + radeon_fifo_update_and_wait(rinfo, 64); /* Wait for the flush to complete */ for (i=0; i < 2000000; i++) { @@ -570,12 +575,12 @@ static inline void radeon_engine_flush (struct radeonfb_info *rinfo) } -static inline void _radeon_engine_idle(struct radeonfb_info *rinfo) +static inline void radeon_engine_idle(struct radeonfb_info *rinfo) { int i; /* ensure FIFO is empty before waiting for idle */ - _radeon_fifo_wait (rinfo, 64); + radeon_fifo_update_and_wait (rinfo, 64); for (i=0; i<2000000; i++) { if (((INREG(RBBM_STATUS) & GUI_ACTIVE)) == 0) { @@ -588,8 +593,6 @@ static inline void _radeon_engine_idle(struct radeonfb_info *rinfo) } -#define radeon_engine_idle() _radeon_engine_idle(rinfo) -#define radeon_fifo_wait(entries) _radeon_fifo_wait(rinfo,entries) #define radeon_msleep(ms) _radeon_msleep(rinfo,ms) @@ -619,6 +622,7 @@ extern void radeonfb_imageblit(struct fb_info *p, const struct fb_image *image); extern int radeonfb_sync(struct fb_info *info); extern void radeonfb_engine_init (struct radeonfb_info *rinfo); extern void radeonfb_engine_reset(struct radeonfb_info *rinfo); +extern void radeon_fixup_mem_offset(struct radeonfb_info *rinfo); /* Other functions */ extern int radeon_screen_blank(struct radeonfb_info *rinfo, int blank, int mode_switch); @@ -634,4 +638,6 @@ static inline void radeonfb_bl_init(struct radeonfb_info *rinfo) {} static inline void radeonfb_bl_exit(struct radeonfb_info *rinfo) {} #endif +extern int accel_cexp; + #endif /* __RADEONFB_H__ */ diff --git a/trunk/drivers/video/console/fbcon.c b/trunk/drivers/video/console/fbcon.c index 0b2adefe9e3d..67ff370d80af 100644 --- a/trunk/drivers/video/console/fbcon.c +++ b/trunk/drivers/video/console/fbcon.c @@ -3531,18 +3531,12 @@ static void fbcon_exit(void) softback_buf = 0UL; for (i = 0; i < FB_MAX; i++) { - int pending; - mapped = 0; info = registered_fb[i]; if (info == NULL) continue; - pending = cancel_work_sync(&info->queue); - DPRINTK("fbcon: %s pending work\n", (pending ? "canceled" : - "no")); - for (j = first_fb_vc; j <= last_fb_vc; j++) { if (con2fb_map[j] == i) mapped = 1; diff --git a/trunk/drivers/video/mb862xx/mb862xxfb.c b/trunk/drivers/video/mb862xx/mb862xxfb.c index fb64234a3825..38718d95fbb9 100644 --- a/trunk/drivers/video/mb862xx/mb862xxfb.c +++ b/trunk/drivers/video/mb862xx/mb862xxfb.c @@ -927,9 +927,9 @@ static int __devinit mb862xx_pci_probe(struct pci_dev *pdev, } dev_dbg(dev, "fb phys 0x%llx 0x%lx\n", - (unsigned long long)par->fb_base_phys, (ulong)par->mapped_vram); + (u64)par->fb_base_phys, (ulong)par->mapped_vram); dev_dbg(dev, "mmio phys 0x%llx 0x%lx\n", - (unsigned long long)par->mmio_base_phys, (ulong)par->mmio_len); + (u64)par->mmio_base_phys, (ulong)par->mmio_len); if (mb862xx_pci_gdc_init(par)) goto io_unmap; diff --git a/trunk/drivers/w1/w1_io.c b/trunk/drivers/w1/w1_io.c index 5139c25ca962..0d15b0eaf79a 100644 --- a/trunk/drivers/w1/w1_io.c +++ b/trunk/drivers/w1/w1_io.c @@ -356,9 +356,7 @@ int w1_reset_select_slave(struct w1_slave *sl) w1_write_8(sl->master, W1_SKIP_ROM); else { u8 match[9] = {W1_MATCH_ROM, }; - u64 rn = le64_to_cpu(*((u64*)&sl->reg_num)); - - memcpy(&match[1], &rn, 8); + memcpy(&match[1], (u8 *)&sl->reg_num, 8); w1_write_block(sl->master, match, 9); } return 0; diff --git a/trunk/fs/9p/fid.c b/trunk/fs/9p/fid.c index 2a983d49d19c..3031e3233dd6 100644 --- a/trunk/fs/9p/fid.c +++ b/trunk/fs/9p/fid.c @@ -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_name.name); + fid->fid, dentry->d_iname); 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_name.name, dentry, uid, any); + dentry->d_iname, dentry, uid, any); dent = (struct v9fs_dentry *) dentry->d_fsdata; ret = NULL; if (dent) { diff --git a/trunk/fs/9p/v9fs.c b/trunk/fs/9p/v9fs.c index 332b5ff02fec..24eb01087b6d 100644 --- a/trunk/fs/9p/v9fs.c +++ b/trunk/fs/9p/v9fs.c @@ -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_strtoul(s, &e, 10); + v9ses->uid = simple_strtol(s, &e, 10); if (*e != '\0') v9ses->uid = ~0; } diff --git a/trunk/fs/9p/vfs_dentry.c b/trunk/fs/9p/vfs_dentry.c index 06dcc7c4f234..f9534f18df0a 100644 --- a/trunk/fs/9p/vfs_dentry.c +++ b/trunk/fs/9p/vfs_dentry.c @@ -52,8 +52,7 @@ static int v9fs_dentry_delete(struct dentry *dentry) { - P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_name.name, - dentry); + P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry); return 1; } @@ -70,8 +69,7 @@ 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_name.name, - dentry); + P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry); if(!inode) return 1; @@ -90,8 +88,7 @@ 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_name.name, - dentry); + P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry); dent = dentry->d_fsdata; if (dent) { list_for_each_entry_safe(current_fid, temp, &dent->fidlist, diff --git a/trunk/fs/9p/vfs_inode.c b/trunk/fs/9p/vfs_inode.c index 2dfcf5487efe..8314d3f43b71 100644 --- a/trunk/fs/9p/vfs_inode.c +++ b/trunk/fs/9p/vfs_inode.c @@ -963,8 +963,7 @@ 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_name.name, - dentry); + P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry); retval = v9fs_readlink(dentry, link, buflen); @@ -1023,8 +1022,7 @@ 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, - IS_ERR(s) ? "" : s); + P9_DPRINTK(P9_DEBUG_VFS, " %s %s\n", dentry->d_name.name, s); if (!IS_ERR(s)) __putname(s); } diff --git a/trunk/fs/cifs/cifssmb.c b/trunk/fs/cifs/cifssmb.c index 6d51696dc762..2af8626ced43 100644 --- a/trunk/fs/cifs/cifssmb.c +++ b/trunk/fs/cifs/cifssmb.c @@ -3983,8 +3983,7 @@ 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 + 2, - GFP_KERNEL); + __le16 *tmp = kmalloc(strlen(searchName)*2, GFP_KERNEL); cifsConvertToUCS((__le16 *) tmp, searchName, PATH_MAX, nls_codepage, remap); node->path_consumed = hostlen_fromUCS(tmp, diff --git a/trunk/fs/exec.c b/trunk/fs/exec.c index ec5df9a38313..4e834f16d9da 100644 --- a/trunk/fs/exec.c +++ b/trunk/fs/exec.c @@ -1159,7 +1159,6 @@ EXPORT_SYMBOL(remove_arg_zero); */ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs) { - unsigned int depth = bprm->recursion_depth; int try,retval; struct linux_binfmt *fmt; #ifdef __alpha__ @@ -1220,15 +1219,8 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs) continue; read_unlock(&binfmt_lock); retval = fn(bprm, regs); - /* - * Restore the depth counter to its starting value - * in this call, so we don't have to rely on every - * load_binary function to restore it on return. - */ - bprm->recursion_depth = depth; if (retval >= 0) { - if (depth == 0) - tracehook_report_exec(fmt, bprm, regs); + tracehook_report_exec(fmt, bprm, regs); put_binfmt(fmt); allow_write_access(bprm->file); if (bprm->file) diff --git a/trunk/fs/ext4/balloc.c b/trunk/fs/ext4/balloc.c index db35cfdb3c8b..d2003cdc36aa 100644 --- a/trunk/fs/ext4/balloc.c +++ b/trunk/fs/ext4/balloc.c @@ -609,8 +609,8 @@ int ext4_has_free_blocks(struct ext4_sb_info *sbi, s64 nblocks) if (free_blocks - (nblocks + root_blocks + dirty_blocks) < EXT4_FREEBLOCKS_WATERMARK) { - free_blocks = percpu_counter_sum_positive(fbc); - dirty_blocks = percpu_counter_sum_positive(dbc); + free_blocks = percpu_counter_sum(fbc); + dirty_blocks = percpu_counter_sum(dbc); if (dirty_blocks < 0) { printk(KERN_CRIT "Dirty block accounting " "went wrong %lld\n", diff --git a/trunk/fs/inotify.c b/trunk/fs/inotify.c index dae3f28f30d4..7bbed1b89825 100644 --- a/trunk/fs/inotify.c +++ b/trunk/fs/inotify.c @@ -428,13 +428,11 @@ void inotify_unmount_inodes(struct list_head *list) watches = &inode->inotify_watches; list_for_each_entry_safe(watch, next_w, watches, i_list) { struct inotify_handle *ih= watch->ih; - get_inotify_watch(watch); mutex_lock(&ih->mutex); ih->in_ops->handle_event(watch, watch->wd, IN_UNMOUNT, 0, NULL, NULL); inotify_remove_watch_locked(ih, watch); mutex_unlock(&ih->mutex); - put_inotify_watch(watch); } mutex_unlock(&inode->inotify_mutex); iput(inode); diff --git a/trunk/fs/ocfs2/ocfs2_fs.h b/trunk/fs/ocfs2/ocfs2_fs.h index 5e0c0d0aef7d..5f180cf7abbd 100644 --- a/trunk/fs/ocfs2/ocfs2_fs.h +++ b/trunk/fs/ocfs2/ocfs2_fs.h @@ -86,8 +86,7 @@ #define OCFS2_CLEAR_INCOMPAT_FEATURE(sb,mask) \ OCFS2_SB(sb)->s_feature_incompat &= ~(mask) -#define OCFS2_FEATURE_COMPAT_SUPP (OCFS2_FEATURE_COMPAT_BACKUP_SB \ - | OCFS2_FEATURE_COMPAT_JBD2_SB) +#define OCFS2_FEATURE_COMPAT_SUPP OCFS2_FEATURE_COMPAT_BACKUP_SB #define OCFS2_FEATURE_INCOMPAT_SUPP (OCFS2_FEATURE_INCOMPAT_LOCAL_MOUNT \ | OCFS2_FEATURE_INCOMPAT_SPARSE_ALLOC \ | OCFS2_FEATURE_INCOMPAT_INLINE_DATA \ @@ -153,11 +152,6 @@ */ #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. */ diff --git a/trunk/fs/ocfs2/xattr.c b/trunk/fs/ocfs2/xattr.c index 74d7367ade13..054e2efb0b7e 100644 --- a/trunk/fs/ocfs2/xattr.c +++ b/trunk/fs/ocfs2/xattr.c @@ -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/trunk/fs/proc/base.c b/trunk/fs/proc/base.c index d4677603c889..486cf3fe7139 100644 --- a/trunk/fs/proc/base.c +++ b/trunk/fs/proc/base.c @@ -371,7 +371,7 @@ static int lstats_show_proc(struct seq_file *m, void *v) task->latency_record[i].time, task->latency_record[i].max); for (q = 0; q < LT_BACKTRACEDEPTH; q++) { - char sym[KSYM_SYMBOL_LEN]; + char sym[KSYM_NAME_LEN]; char *c; if (!task->latency_record[i].backtrace[q]) break; diff --git a/trunk/fs/proc/task_mmu.c b/trunk/fs/proc/task_mmu.c index 3a8bdd7f5756..b770c095e45c 100644 --- a/trunk/fs/proc/task_mmu.c +++ b/trunk/fs/proc/task_mmu.c @@ -557,9 +557,9 @@ static u64 swap_pte_to_pagemap_entry(pte_t pte) return swp_type(e) | (swp_offset(e) << MAX_SWAPFILES_SHIFT); } -static u64 pte_to_pagemap_entry(pte_t pte) +static unsigned long pte_to_pagemap_entry(pte_t pte) { - u64 pme = 0; + unsigned long pme = 0; if (is_swap_pte(pte)) pme = PM_PFRAME(swap_pte_to_pagemap_entry(pte)) | PM_PSHIFT(PAGE_SHIFT) | PM_SWAP; diff --git a/trunk/drivers/acpi/acpica/acconfig.h b/trunk/include/acpi/acconfig.h similarity index 98% rename from trunk/drivers/acpi/acpica/acconfig.h rename to trunk/include/acpi/acconfig.h index e6777fb883d2..29feee27f0ea 100644 --- a/trunk/drivers/acpi/acpica/acconfig.h +++ b/trunk/include/acpi/acconfig.h @@ -61,6 +61,10 @@ * */ +/* 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 @@ -115,10 +119,6 @@ #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) diff --git a/trunk/drivers/acpi/acpica/acdebug.h b/trunk/include/acpi/acdebug.h similarity index 100% rename from trunk/drivers/acpi/acpica/acdebug.h rename to trunk/include/acpi/acdebug.h diff --git a/trunk/include/acpi/acdisasm.h b/trunk/include/acpi/acdisasm.h new file mode 100644 index 000000000000..0c1ed387073c --- /dev/null +++ b/trunk/include/acpi/acdisasm.h @@ -0,0 +1,445 @@ +/****************************************************************************** + * + * 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__ */ diff --git a/trunk/drivers/acpi/acpica/acdispat.h b/trunk/include/acpi/acdispat.h similarity index 100% rename from trunk/drivers/acpi/acpica/acdispat.h rename to trunk/include/acpi/acdispat.h diff --git a/trunk/drivers/acpi/acpica/acevents.h b/trunk/include/acpi/acevents.h similarity index 97% rename from trunk/drivers/acpi/acpica/acevents.h rename to trunk/include/acpi/acevents.h index 07e20135f01b..d5d099bf349c 100644 --- a/trunk/drivers/acpi/acpica/acevents.h +++ b/trunk/include/acpi/acevents.h @@ -93,13 +93,11 @@ 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, void *context); +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, - void *context); + struct acpi_gpe_block_info *gpe_block); acpi_status acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device, diff --git a/trunk/include/acpi/acexcep.h b/trunk/include/acpi/acexcep.h index eda04546cdf6..84f5cb242863 100644 --- a/trunk/include/acpi/acexcep.h +++ b/trunk/include/acpi/acexcep.h @@ -153,9 +153,8 @@ #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 0x0021 +#define AE_CODE_AML_MAX 0x0020 /* * Internal exceptions used for control @@ -176,8 +175,6 @@ #define AE_CODE_CTRL_MAX 0x000D -/* Exception strings for acpi_format_exception */ - #ifdef DEFINE_ACPI_GLOBALS /* @@ -270,7 +267,6 @@ 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[] = { diff --git a/trunk/drivers/acpi/acpica/acglobal.h b/trunk/include/acpi/acglobal.h similarity index 97% rename from trunk/drivers/acpi/acpica/acglobal.h rename to trunk/include/acpi/acglobal.h index ddb40f5c68fc..15dda46b70d1 100644 --- a/trunk/drivers/acpi/acpica/acglobal.h +++ b/trunk/include/acpi/acglobal.h @@ -102,12 +102,6 @@ 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 @@ -146,7 +140,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; -ACPI_EXTERN struct acpi_table_facs *acpi_gbl_FACS; +extern u8 acpi_gbl_permanent_mmap; /* These addresses are calculated from FADT address values */ @@ -332,7 +326,6 @@ 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; /***************************************************************************** * diff --git a/trunk/drivers/acpi/acpica/achware.h b/trunk/include/acpi/achware.h similarity index 89% rename from trunk/drivers/acpi/acpica/achware.h rename to trunk/include/acpi/achware.h index 58c69dc49ab4..97a72b193276 100644 --- a/trunk/drivers/acpi/acpica/achware.h +++ b/trunk/include/acpi/achware.h @@ -44,7 +44,11 @@ #ifndef __ACHWARE_H__ #define __ACHWARE_H__ -/* Values for the _SST predefined method */ +/* PM Timer ticks per second (HZ) */ + +#define PM_TIMER_FREQUENCY 3579545 + +/* Values for the _SST reserved method */ #define ACPI_SST_INDICATOR_OFF 0 #define ACPI_SST_WORKING 1 @@ -52,6 +56,8 @@ #define ACPI_SST_SLEEPING 3 #define ACPI_SST_SLEEP_CONTEXT 4 +/* Prototypes */ + /* * hwacpi - high level functions */ @@ -69,6 +75,13 @@ 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); /* @@ -81,13 +94,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, void *context); + struct acpi_gpe_block_info *gpe_block); 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, void *context); + struct acpi_gpe_block_info *gpe_block); acpi_status acpi_hw_get_gpe_status(struct acpi_gpe_event_info *gpe_event_info, @@ -101,8 +114,7 @@ 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, - void *context); + struct acpi_gpe_block_info *gpe_block); #ifdef ACPI_FUTURE_USAGE /* diff --git a/trunk/drivers/acpi/acpica/acinterp.h b/trunk/include/acpi/acinterp.h similarity index 100% rename from trunk/drivers/acpi/acpica/acinterp.h rename to trunk/include/acpi/acinterp.h diff --git a/trunk/drivers/acpi/acpica/aclocal.h b/trunk/include/acpi/aclocal.h similarity index 95% rename from trunk/drivers/acpi/acpica/aclocal.h rename to trunk/include/acpi/aclocal.h index 492d02761bb7..ecab527cf78e 100644 --- a/trunk/drivers/acpi/acpica/aclocal.h +++ b/trunk/include/acpi/aclocal.h @@ -46,6 +46,8 @@ /* 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; @@ -118,6 +120,11 @@ 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 @@ -158,6 +165,11 @@ 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. @@ -204,6 +216,26 @@ 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 { @@ -234,6 +266,15 @@ 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 @@ -446,15 +487,10 @@ struct acpi_gpe_walk_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); +typedef acpi_status(*acpi_gpe_callback) (struct acpi_gpe_xrupt_info * + gpe_xrupt_info, + struct acpi_gpe_block_info * + gpe_block); /* Information about each particular fixed event */ @@ -530,7 +566,6 @@ 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 */ }; /* @@ -636,12 +671,6 @@ 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 */\ @@ -761,6 +790,9 @@ 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; @@ -987,4 +1019,26 @@ 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__ */ diff --git a/trunk/drivers/acpi/acpica/acmacros.h b/trunk/include/acpi/acmacros.h similarity index 83% rename from trunk/drivers/acpi/acpica/acmacros.h rename to trunk/include/acpi/acmacros.h index c57286a3aceb..a597207e2835 100644 --- a/trunk/drivers/acpi/acpica/acmacros.h +++ b/trunk/include/acpi/acmacros.h @@ -44,6 +44,23 @@ #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. @@ -58,6 +75,39 @@ #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 */ @@ -159,7 +209,7 @@ /* * 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 */ @@ -307,6 +357,12 @@ {(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)) @@ -332,16 +388,32 @@ #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); @@ -349,18 +421,50 @@ /* 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 /* ACPI_NO_ERROR_MESSAGES */ +#endif /* * 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) \ @@ -480,6 +584,15 @@ #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, @@ -490,6 +603,7 @@ #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) @@ -505,6 +619,8 @@ #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) @@ -513,7 +629,7 @@ #define return_UINT32(s) return(s) #define return_PTR(s) return(s) -#endif /* ACPI_DEBUG_OUTPUT */ +#endif /* * Some code only gets executed when the debugger is built in. diff --git a/trunk/drivers/acpi/acpica/acnamesp.h b/trunk/include/acpi/acnamesp.h similarity index 98% rename from trunk/drivers/acpi/acpica/acnamesp.h rename to trunk/include/acpi/acnamesp.h index 46cb5b46d280..db4e6f677855 100644 --- a/trunk/drivers/acpi/acpica/acnamesp.h +++ b/trunk/include/acpi/acnamesp.h @@ -182,9 +182,7 @@ acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info); */ acpi_status acpi_ns_check_predefined_names(struct acpi_namespace_node *node, - u32 user_param_count, - acpi_status return_status, - union acpi_operand_object **return_object); + union acpi_operand_object *return_object); const union acpi_predefined_info *acpi_ns_check_for_predefined_name(struct acpi_namespace_node @@ -193,7 +191,6 @@ 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); /* diff --git a/trunk/drivers/acpi/acpica/acobject.h b/trunk/include/acpi/acobject.h similarity index 100% rename from trunk/drivers/acpi/acpica/acobject.h rename to trunk/include/acpi/acobject.h diff --git a/trunk/drivers/acpi/acpica/acopcode.h b/trunk/include/acpi/acopcode.h similarity index 100% rename from trunk/drivers/acpi/acpica/acopcode.h rename to trunk/include/acpi/acopcode.h diff --git a/trunk/include/acpi/acoutput.h b/trunk/include/acpi/acoutput.h index 5c823d5ab783..09d33c7740f0 100644 --- a/trunk/include/acpi/acoutput.h +++ b/trunk/include/acpi/acoutput.h @@ -45,9 +45,9 @@ #define __ACOUTPUT_H__ /* - * 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. + * 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. */ /* Component IDs are used in the global "DebugLayer" */ @@ -69,10 +69,8 @@ #define ACPI_COMPILER 0x00001000 #define ACPI_TOOLS 0x00002000 -#define ACPI_EXAMPLE 0x00004000 -#define ACPI_DRIVER 0x00008000 -#define ACPI_ALL_COMPONENTS 0x0000FFFF +#define ACPI_ALL_COMPONENTS 0x00003FFF #define ACPI_COMPONENT_DEFAULT (ACPI_ALL_COMPONENTS) /* Component IDs reserved for ACPI drivers */ @@ -80,7 +78,7 @@ #define ACPI_ALL_DRIVERS 0xFFFF0000 /* - * Raw debug output levels, do not use these in the ACPI_DEBUG_PRINT macros + * Raw debug output levels, do not use these in the DEBUG_PRINT macros */ #define ACPI_LV_INIT 0x00000001 #define ACPI_LV_DEBUG_OBJECT 0x00000002 @@ -174,99 +172,8 @@ /* Defaults for debug_level, debug and normal */ -#define ACPI_DEBUG_DEFAULT (ACPI_LV_INFO) +#define ACPI_DEBUG_DEFAULT (ACPI_LV_INIT | ACPI_LV_DEBUG_OBJECT) #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__ */ diff --git a/trunk/drivers/acpi/acpica/acparser.h b/trunk/include/acpi/acparser.h similarity index 100% rename from trunk/drivers/acpi/acpica/acparser.h rename to trunk/include/acpi/acparser.h diff --git a/trunk/include/acpi/acpi.h b/trunk/include/acpi/acpi.h index 472b7bf0c5d4..c515ef6cc89e 100644 --- a/trunk/include/acpi/acpi.h +++ b/trunk/include/acpi/acpi.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Name: acpi.h - Master public include file used to interface to ACPICA + * Name: acpi.h - Master include file, Publics and external data. * *****************************************************************************/ @@ -45,22 +45,25 @@ #define __ACPI_H__ /* - * 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. + * 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. */ -#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 "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 "actbl.h" /* ACPI table definitions */ +#include "aclocal.h" /* Internal data types */ #include "acoutput.h" /* Error output and Debug macros */ -#include "acrestyp.h" /* Resource Descriptor structs */ -#include "acpiosxf.h" /* OSL interfaces (ACPICA-to-OS) */ +#include "acpiosxf.h" /* Interfaces to the ACPI-to-OS layer */ #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__ */ diff --git a/trunk/include/acpi/acpiosxf.h b/trunk/include/acpi/acpiosxf.h index a62720a7edc0..b91440ac0d16 100644 --- a/trunk/include/acpi/acpiosxf.h +++ b/trunk/include/acpi/acpiosxf.h @@ -121,11 +121,8 @@ acpi_os_wait_semaphore(acpi_semaphore handle, u32 units, u16 timeout); acpi_status acpi_os_signal_semaphore(acpi_semaphore handle, u32 units); /* - * Mutex primitives. May be configured to use semaphores instead via - * ACPI_MUTEX_TYPE (see platform/acenv.h) + * Mutex primitives */ -#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); @@ -133,7 +130,13 @@ 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); -#endif + +/* 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) /* * Memory allocation and mapping diff --git a/trunk/include/acpi/acpixf.h b/trunk/include/acpi/acpixf.h index 7c7074f20087..33bc0e3b1954 100644 --- a/trunk/include/acpi/acpixf.h +++ b/trunk/include/acpi/acpixf.h @@ -45,31 +45,9 @@ #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 */ @@ -101,6 +79,11 @@ 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 */ @@ -210,11 +193,8 @@ 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); /* - * Handler interfaces + * Event 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); @@ -247,10 +227,6 @@ 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 @@ -262,6 +238,10 @@ 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); @@ -270,9 +250,6 @@ 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); @@ -286,12 +263,6 @@ 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, @@ -342,8 +313,6 @@ 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); @@ -351,14 +320,12 @@ 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(u32 physical_address); +acpi_set_firmware_waking_vector(acpi_physical_address physical_address); +#ifdef ACPI_FUTURE_USAGE acpi_status -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_get_firmware_waking_vector(acpi_physical_address * physical_address); +#endif acpi_status acpi_get_sleep_type_data(u8 sleep_state, u8 * slp_typ_a, u8 * slp_typ_b); @@ -373,42 +340,4 @@ 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/trunk/drivers/acpi/acpica/acpredef.h b/trunk/include/acpi/acpredef.h similarity index 100% rename from trunk/drivers/acpi/acpica/acpredef.h rename to trunk/include/acpi/acpredef.h diff --git a/trunk/drivers/acpi/acpica/acresrc.h b/trunk/include/acpi/acresrc.h similarity index 100% rename from trunk/drivers/acpi/acpica/acresrc.h rename to trunk/include/acpi/acresrc.h diff --git a/trunk/include/acpi/acrestyp.h b/trunk/include/acpi/acrestyp.h deleted file mode 100644 index 9ffe00feada6..000000000000 --- a/trunk/include/acpi/acrestyp.h +++ /dev/null @@ -1,405 +0,0 @@ -/****************************************************************************** - * - * 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__ */ diff --git a/trunk/drivers/acpi/acpica/acstruct.h b/trunk/include/acpi/acstruct.h similarity index 100% rename from trunk/drivers/acpi/acpica/acstruct.h rename to trunk/include/acpi/acstruct.h diff --git a/trunk/drivers/acpi/acpica/actables.h b/trunk/include/acpi/actables.h similarity index 98% rename from trunk/drivers/acpi/acpica/actables.h rename to trunk/include/acpi/actables.h index 7ce6e33c7f78..0cbe1b9ab522 100644 --- a/trunk/drivers/acpi/acpica/actables.h +++ b/trunk/include/acpi/actables.h @@ -94,8 +94,6 @@ 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 diff --git a/trunk/include/acpi/actbl.h b/trunk/include/acpi/actbl.h index 813e4b6c2c0d..13a3d9ad92db 100644 --- a/trunk/include/acpi/actbl.h +++ b/trunk/include/acpi/actbl.h @@ -288,31 +288,6 @@ 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 */ diff --git a/trunk/include/acpi/actbl1.h b/trunk/include/acpi/actbl1.h index 18963b968114..63f5b4cf4de1 100644 --- a/trunk/include/acpi/actbl1.h +++ b/trunk/include/acpi/actbl1.h @@ -627,7 +627,7 @@ struct acpi_hest_aer_common { u32 uncorrectable_error_mask; u32 uncorrectable_error_severity; u32 correctable_error_mask; - u32 advanced_error_capabilities; + u32 advanced_error_cababilities; }; /* Hardware Error Notification */ diff --git a/trunk/include/acpi/actypes.h b/trunk/include/acpi/actypes.h index 03744d28dcf6..7220361790b3 100644 --- a/trunk/include/acpi/actypes.h +++ b/trunk/include/acpi/actypes.h @@ -204,10 +204,11 @@ typedef u32 acpi_physical_address; /******************************************************************************* * - * OS-dependent types + * OS-dependent and compiler-dependent types * * If the defaults below are not appropriate for the host system, they can - * be defined in the OS-specific header, and this will take precedence. + * be defined in the compiler-specific or OS-specific header, and this will + * take precedence. * ******************************************************************************/ @@ -217,6 +218,12 @@ 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 @@ -226,51 +233,9 @@ 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 @@ -303,43 +268,6 @@ 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 @@ -363,18 +291,13 @@ typedef u32 acpi_physical_address; #endif /* - * Miscellaneous types + * Mescellaneous 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; @@ -390,8 +313,13 @@ 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. @@ -410,75 +338,10 @@ 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 @@ -551,7 +414,7 @@ struct acpi_integer_overlay { #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. @@ -868,15 +731,6 @@ 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 */ @@ -933,7 +787,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); @@ -969,12 +823,6 @@ 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 { @@ -1052,28 +900,357 @@ struct acpi_mem_space_context { }; /* - * struct acpi_memory_list is used only if the ACPICA local cache is enabled + * 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 { - 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; +#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; +}; + +/* + * 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__ */ diff --git a/trunk/drivers/acpi/acpica/acutils.h b/trunk/include/acpi/acutils.h similarity index 93% rename from trunk/drivers/acpi/acpica/acutils.h rename to trunk/include/acpi/acutils.h index 80d8813484fe..d8307b2987e3 100644 --- a/trunk/drivers/acpi/acpica/acutils.h +++ b/trunk/include/acpi/acutils.h @@ -297,6 +297,42 @@ 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 */ diff --git a/trunk/drivers/acpi/acpica/amlcode.h b/trunk/include/acpi/amlcode.h similarity index 100% rename from trunk/drivers/acpi/acpica/amlcode.h rename to trunk/include/acpi/amlcode.h diff --git a/trunk/drivers/acpi/acpica/amlresrc.h b/trunk/include/acpi/amlresrc.h similarity index 100% rename from trunk/drivers/acpi/acpica/amlresrc.h rename to trunk/include/acpi/amlresrc.h diff --git a/trunk/include/acpi/platform/acenv.h b/trunk/include/acpi/platform/acenv.h index e62f10d9a7d8..fcd2572e428c 100644 --- a/trunk/include/acpi/platform/acenv.h +++ b/trunk/include/acpi/platform/acenv.h @@ -44,26 +44,14 @@ #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 minimal size. The debug version uses ACPI_FULL_DEBUG + * debug support, for minimimal size. The debug version uses ACPI_FULL_DEBUG */ #define ACPI_USE_LOCAL_CACHE #endif @@ -87,6 +75,17 @@ #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 @@ -180,19 +179,6 @@ /*! [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 @@ -201,6 +187,9 @@ * 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 diff --git a/trunk/include/acpi/platform/aclinux.h b/trunk/include/acpi/platform/aclinux.h index 3cabf888c8af..029c8c06c151 100644 --- a/trunk/include/acpi/platform/aclinux.h +++ b/trunk/include/acpi/platform/aclinux.h @@ -46,7 +46,6 @@ #define ACPI_USE_SYSTEM_CLIBRARY #define ACPI_USE_DO_WHILE_0 -#define ACPI_MUTEX_TYPE ACPI_BINARY_SEMAPHORE #ifdef __KERNEL__ @@ -142,10 +141,6 @@ 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() \ - do { \ - if (!irqs_disabled()) \ - cond_resched(); \ - } while (0) +#define ACPI_PREEMPTION_POINT() cond_resched() #endif /* __ACLINUX_H__ */ diff --git a/trunk/include/asm-generic/atomic.h b/trunk/include/asm-generic/atomic.h index 7abdaa91ccd3..4ec0a296bdec 100644 --- a/trunk/include/asm-generic/atomic.h +++ b/trunk/include/asm-generic/atomic.h @@ -251,7 +251,7 @@ static inline long atomic_long_add_unless(atomic_long_t *l, long a, long u) #define atomic_long_cmpxchg(l, old, new) \ (atomic_cmpxchg((atomic_t *)(l), (old), (new))) #define atomic_long_xchg(v, new) \ - (atomic_xchg((atomic_t *)(v), (new))) + (atomic_xchg((atomic_t *)(l), (new))) #endif /* BITS_PER_LONG == 64 */ diff --git a/trunk/include/asm-mn10300/uaccess.h b/trunk/include/asm-mn10300/uaccess.h index 8a3a4dd55763..46b9b647f3c3 100644 --- a/trunk/include/asm-mn10300/uaccess.h +++ b/trunk/include/asm-mn10300/uaccess.h @@ -266,7 +266,7 @@ extern int __get_user_unknown(void); " .section .fixup,\"ax\" \n" \ "4: \n" \ " mov %5,%0 \n" \ - " jmp 3b \n" \ + " jmp 2b \n" \ " .previous \n" \ " .section __ex_table,\"a\"\n" \ " .balign 4 \n" \ diff --git a/trunk/include/linux/ftrace.h b/trunk/include/linux/ftrace.h index 9c5bc6be2b09..703eb53cfa2b 100644 --- a/trunk/include/linux/ftrace.h +++ b/trunk/include/linux/ftrace.h @@ -6,7 +6,6 @@ #include #include #include -#include #include #ifdef CONFIG_FUNCTION_TRACER @@ -232,7 +231,7 @@ ftrace_init_module(unsigned long *start, unsigned long *end) { } struct boot_trace { pid_t caller; - char func[KSYM_SYMBOL_LEN]; + char func[KSYM_NAME_LEN]; int result; unsigned long long duration; /* usecs */ ktime_t calltime; diff --git a/trunk/include/linux/netdevice.h b/trunk/include/linux/netdevice.h index e26f54952892..9d77b1d7dca8 100644 --- a/trunk/include/linux/netdevice.h +++ b/trunk/include/linux/netdevice.h @@ -319,7 +319,6 @@ 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); @@ -1498,12 +1497,6 @@ 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); diff --git a/trunk/include/linux/netfilter/nfnetlink_conntrack.h b/trunk/include/linux/netfilter/nfnetlink_conntrack.h index 29fe9ea1d346..c19595c89304 100644 --- a/trunk/include/linux/netfilter/nfnetlink_conntrack.h +++ b/trunk/include/linux/netfilter/nfnetlink_conntrack.h @@ -141,7 +141,6 @@ 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, diff --git a/trunk/include/linux/pci_hotplug.h b/trunk/include/linux/pci_hotplug.h index c2d1a7d1886a..a00bd1a0f156 100644 --- a/trunk/include/linux/pci_hotplug.h +++ b/trunk/include/linux/pci_hotplug.h @@ -223,6 +223,7 @@ struct hotplug_params { #ifdef CONFIG_ACPI #include #include +#include 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); diff --git a/trunk/include/linux/smp.h b/trunk/include/linux/smp.h index 6e7ba16ff454..3f9a60043a97 100644 --- a/trunk/include/linux/smp.h +++ b/trunk/include/linux/smp.h @@ -146,8 +146,6 @@ 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) { } diff --git a/trunk/include/linux/usb/ch9.h b/trunk/include/linux/usb/ch9.h index 9b42baed3900..73a2f4eb1f7a 100644 --- a/trunk/include/linux/usb/ch9.h +++ b/trunk/include/linux/usb/ch9.h @@ -158,12 +158,8 @@ 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". 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. + * byte order "on the wire". But when exposed through Linux-USB APIs, + * they've been converted to cpu byte order. */ /* diff --git a/trunk/include/net/irda/irda_device.h b/trunk/include/net/irda/irda_device.h index 94c852d47d0f..3025ae17ddbe 100644 --- a/trunk/include/net/irda/irda_device.h +++ b/trunk/include/net/irda/irda_device.h @@ -135,11 +135,9 @@ struct dongle_reg { /* * Per-packet information we need to hide inside sk_buff - * (must not exceed 48 bytes, check with struct sk_buff) - * The default_qdisc_pad field is a temporary hack. + * (must not exceed 48 bytes, check with struct sk_buff) */ 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 */ diff --git a/trunk/include/video/radeon.h b/trunk/include/video/radeon.h index 1cd09cc5b169..d5dcaf154ba4 100644 --- a/trunk/include/video/radeon.h +++ b/trunk/include/video/radeon.h @@ -525,6 +525,9 @@ #define CRTC_DISPLAY_DIS (1 << 10) #define CRTC_CRT_ON (1 << 15) +/* DSTCACHE_MODE bits constants */ +#define RB2D_DC_AUTOFLUSH_ENABLE (1 << 8) +#define RB2D_DC_DC_DISABLE_IGNORE_PE (1 << 17) /* DSTCACHE_CTLSTAT bit constants */ #define RB2D_DC_FLUSH_2D (1 << 0) @@ -866,15 +869,10 @@ #define GMC_DST_16BPP_YVYU422 0x00000c00 #define GMC_DST_32BPP_AYUV444 0x00000e00 #define GMC_DST_16BPP_ARGB4444 0x00000f00 -#define GMC_SRC_MONO 0x00000000 -#define GMC_SRC_MONO_LBKGD 0x00001000 -#define GMC_SRC_DSTCOLOR 0x00003000 #define GMC_BYTE_ORDER_MSB_TO_LSB 0x00000000 #define GMC_BYTE_ORDER_LSB_TO_MSB 0x00004000 #define GMC_DP_CONVERSION_TEMP_9300 0x00008000 #define GMC_DP_CONVERSION_TEMP_6500 0x00000000 -#define GMC_DP_SRC_RECT 0x02000000 -#define GMC_DP_SRC_HOST 0x03000000 #define GMC_DP_SRC_HOST_BYTEALIGN 0x04000000 #define GMC_3D_FCN_EN_CLR 0x00000000 #define GMC_3D_FCN_EN_SET 0x08000000 @@ -885,6 +883,9 @@ #define GMC_WRITE_MASK_LEAVE 0x00000000 #define GMC_WRITE_MASK_SET 0x40000000 #define GMC_CLR_CMP_CNTL_DIS (1 << 28) +#define GMC_SRC_DATATYPE_MASK (3 << 12) +#define GMC_SRC_DATATYPE_MONO_FG_BG (0 << 12) +#define GMC_SRC_DATATYPE_MONO_FG_LA (1 << 12) #define GMC_SRC_DATATYPE_COLOR (3 << 12) #define ROP3_S 0x00cc0000 #define ROP3_SRCCOPY 0x00cc0000 @@ -893,6 +894,7 @@ #define DP_SRC_SOURCE_MASK (7 << 24) #define GMC_BRUSH_NONE (15 << 4) #define DP_SRC_SOURCE_MEMORY (2 << 24) +#define DP_SRC_SOURCE_HOST_DATA (3 << 24) #define GMC_BRUSH_SOLIDCOLOR 0x000000d0 /* DP_MIX bit constants */ @@ -978,6 +980,12 @@ #define DISP_PWR_MAN_TV_ENABLE_RST (1 << 25) #define DISP_PWR_MAN_AUTO_PWRUP_EN (1 << 26) +/* RBBM_GUICNTL constants */ +#define RBBM_GUICNTL_HOST_DATA_SWAP_NONE (0 << 0) +#define RBBM_GUICNTL_HOST_DATA_SWAP_16BIT (1 << 0) +#define RBBM_GUICNTL_HOST_DATA_SWAP_32BIT (2 << 0) +#define RBBM_GUICNTL_HOST_DATA_SWAP_HDW (3 << 0) + /* masks */ #define CONFIG_MEMSIZE_MASK 0x1f000000 diff --git a/trunk/kernel/cgroup.c b/trunk/kernel/cgroup.c index 2606d0fb4e54..fe00b3b983a8 100644 --- a/trunk/kernel/cgroup.c +++ b/trunk/kernel/cgroup.c @@ -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 (root->number_of_cgroups > 1) + if (!list_empty(&cgrp->children)) 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 free_cg_links; + goto drop_new_super; } /* EBUSY should be the only error here */ @@ -1073,11 +1073,10 @@ 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; } @@ -2935,6 +2934,9 @@ 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; } diff --git a/trunk/kernel/fork.c b/trunk/kernel/fork.c index 495da2e9a8b4..8d6a7dd9282b 100644 --- a/trunk/kernel/fork.c +++ b/trunk/kernel/fork.c @@ -315,20 +315,17 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm) file = tmp->vm_file; if (file) { struct inode *inode = file->f_path.dentry->d_inode; - struct address_space *mapping = file->f_mapping; - get_file(file); if (tmp->vm_flags & VM_DENYWRITE) atomic_dec(&inode->i_writecount); - spin_lock(&mapping->i_mmap_lock); - if (tmp->vm_flags & VM_SHARED) - mapping->i_mmap_writable++; - tmp->vm_truncate_count = mpnt->vm_truncate_count; - flush_dcache_mmap_lock(mapping); + /* insert tmp into the share list, just after mpnt */ + spin_lock(&file->f_mapping->i_mmap_lock); + tmp->vm_truncate_count = mpnt->vm_truncate_count; + flush_dcache_mmap_lock(file->f_mapping); vma_prio_tree_add(tmp, mpnt); - flush_dcache_mmap_unlock(mapping); - spin_unlock(&mapping->i_mmap_lock); + flush_dcache_mmap_unlock(file->f_mapping); + spin_unlock(&file->f_mapping->i_mmap_lock); } /* diff --git a/trunk/kernel/latencytop.c b/trunk/kernel/latencytop.c index 449db466bdbc..5e7b45c56923 100644 --- a/trunk/kernel/latencytop.c +++ b/trunk/kernel/latencytop.c @@ -191,7 +191,7 @@ static int lstats_show(struct seq_file *m, void *v) latency_record[i].time, latency_record[i].max); for (q = 0; q < LT_BACKTRACEDEPTH; q++) { - char sym[KSYM_SYMBOL_LEN]; + char sym[KSYM_NAME_LEN]; char *c; if (!latency_record[i].backtrace[q]) break; diff --git a/trunk/kernel/posix-timers.c b/trunk/kernel/posix-timers.c index a140e44eebba..5e79c662294b 100644 --- a/trunk/kernel/posix-timers.c +++ b/trunk/kernel/posix-timers.c @@ -197,11 +197,6 @@ 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. */ @@ -253,7 +248,6 @@ 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); diff --git a/trunk/kernel/relay.c b/trunk/kernel/relay.c index 09ac2008f77b..32b0befdcb6a 100644 --- a/trunk/kernel/relay.c +++ b/trunk/kernel/relay.c @@ -1317,9 +1317,12 @@ static ssize_t relay_file_splice_read(struct file *in, if (ret < 0) break; else if (!ret) { - if (flags & SPLICE_F_NONBLOCK) + if (spliced) + break; + if (flags & SPLICE_F_NONBLOCK) { ret = -EAGAIN; - break; + break; + } } *ppos += ret; diff --git a/trunk/kernel/sched.c b/trunk/kernel/sched.c index e4bb1dd7b308..b7480fb5c3dc 100644 --- a/trunk/kernel/sched.c +++ b/trunk/kernel/sched.c @@ -6587,9 +6587,7 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu) req = list_entry(rq->migration_queue.next, struct migration_req, list); list_del_init(&req->list); - spin_unlock_irq(&rq->lock); complete(&req->done); - spin_lock_irq(&rq->lock); } spin_unlock_irq(&rq->lock); break; diff --git a/trunk/kernel/sched_clock.c b/trunk/kernel/sched_clock.c index e8ab096ddfe3..81787248b60f 100644 --- a/trunk/kernel/sched_clock.c +++ b/trunk/kernel/sched_clock.c @@ -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), - * scd->tick_gtod + TICK_NSEC); + * max(scd->tick_gtod, scd->clock), + * max(scd->clock, scd->tick_gtod + TICK_NSEC)); */ clock = scd->tick_gtod + delta; min_clock = wrap_max(scd->tick_gtod, scd->clock); - max_clock = scd->tick_gtod + TICK_NSEC; + max_clock = wrap_max(scd->clock, scd->tick_gtod + TICK_NSEC); clock = wrap_max(clock, min_clock); clock = wrap_min(clock, max_clock); diff --git a/trunk/lib/dynamic_printk.c b/trunk/lib/dynamic_printk.c index 8e30295e8566..d83660fd6fdd 100644 --- a/trunk/lib/dynamic_printk.c +++ b/trunk/lib/dynamic_printk.c @@ -135,7 +135,7 @@ int unregister_dynamic_debug_module(char *mod_name) nr_entries--; out: up(&debug_list_mutex); - return ret; + return 0; } 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\n", + "debugging enabled for module %s", 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\n", elem->name); + "%s", elem->name); } } } diff --git a/trunk/lib/idr.c b/trunk/lib/idr.c index 1c4f9281f412..7a785a0c2ea0 100644 --- a/trunk/lib/idr.c +++ b/trunk/lib/idr.c @@ -220,14 +220,8 @@ static int idr_get_empty_slot(struct idr *idp, int starting_id, */ while ((layers < (MAX_LEVEL - 1)) && (id >= (1 << (layers*IDR_BITS)))) { layers++; - if (!p->count) { - /* special case: if the tree is currently empty, - * then we grow the tree by moving the top node - * upwards. - */ - p->layer++; + if (!p->count) continue; - } if (!(new = get_from_free_list(idp))) { /* * The allocation failed. If we built part of diff --git a/trunk/lib/percpu_counter.c b/trunk/lib/percpu_counter.c index b255b939bc1b..a8663890a88c 100644 --- a/trunk/lib/percpu_counter.c +++ b/trunk/lib/percpu_counter.c @@ -62,7 +62,10 @@ s64 __percpu_counter_sum(struct percpu_counter *fbc) for_each_online_cpu(cpu) { s32 *pcount = per_cpu_ptr(fbc->counters, cpu); ret += *pcount; + *pcount = 0; } + fbc->count = ret; + spin_unlock(&fbc->lock); return ret; } @@ -101,13 +104,13 @@ void percpu_counter_destroy(struct percpu_counter *fbc) if (!fbc->counters) return; + free_percpu(fbc->counters); + fbc->counters = NULL; #ifdef CONFIG_HOTPLUG_CPU mutex_lock(&percpu_counters_lock); list_del(&fbc->list); mutex_unlock(&percpu_counters_lock); #endif - free_percpu(fbc->counters); - fbc->counters = NULL; } EXPORT_SYMBOL(percpu_counter_destroy); diff --git a/trunk/mm/backing-dev.c b/trunk/mm/backing-dev.c index 801c08b046e6..2a56124dbc28 100644 --- a/trunk/mm/backing-dev.c +++ b/trunk/mm/backing-dev.c @@ -176,7 +176,7 @@ int bdi_register(struct backing_dev_info *bdi, struct device *parent, int ret = 0; struct device *dev; - if (bdi->dev) /* The driver needs to use separate queues per device */ + if (WARN_ON(bdi->dev)) goto exit; va_start(args, fmt); diff --git a/trunk/mm/migrate.c b/trunk/mm/migrate.c index 037b0967c1e3..1e0d6b237f44 100644 --- a/trunk/mm/migrate.c +++ b/trunk/mm/migrate.c @@ -987,18 +987,25 @@ static int do_pages_move(struct mm_struct *mm, struct task_struct *task, /* * Determine the nodes of an array of pages and store it in an array of status. */ -static void do_pages_stat_array(struct mm_struct *mm, unsigned long nr_pages, - const void __user **pages, int *status) +static int do_pages_stat(struct mm_struct *mm, unsigned long nr_pages, + const void __user * __user *pages, + int __user *status) { unsigned long i; + int err; down_read(&mm->mmap_sem); for (i = 0; i < nr_pages; i++) { - unsigned long addr = (unsigned long)(*pages); + const void __user *p; + unsigned long addr; struct vm_area_struct *vma; struct page *page; - int err = -EFAULT; + + err = -EFAULT; + if (get_user(p, pages+i)) + goto out; + addr = (unsigned long) p; vma = find_vma(mm, addr); if (!vma) @@ -1017,52 +1024,12 @@ static void do_pages_stat_array(struct mm_struct *mm, unsigned long nr_pages, err = page_to_nid(page); set_status: - *status = err; - - pages++; - status++; - } - - up_read(&mm->mmap_sem); -} - -/* - * Determine the nodes of a user array of pages and store it in - * a user array of status. - */ -static int do_pages_stat(struct mm_struct *mm, unsigned long nr_pages, - const void __user * __user *pages, - int __user *status) -{ -#define DO_PAGES_STAT_CHUNK_NR 16 - const void __user *chunk_pages[DO_PAGES_STAT_CHUNK_NR]; - int chunk_status[DO_PAGES_STAT_CHUNK_NR]; - unsigned long i, chunk_nr = DO_PAGES_STAT_CHUNK_NR; - int err; - - for (i = 0; i < nr_pages; i += chunk_nr) { - if (chunk_nr + i > nr_pages) - chunk_nr = nr_pages - i; - - err = copy_from_user(chunk_pages, &pages[i], - chunk_nr * sizeof(*chunk_pages)); - if (err) { - err = -EFAULT; - goto out; - } - - do_pages_stat_array(mm, chunk_nr, chunk_pages, chunk_status); - - err = copy_to_user(&status[i], chunk_status, - chunk_nr * sizeof(*chunk_status)); - if (err) { - err = -EFAULT; - goto out; - } + put_user(err, status+i); } err = 0; out: + up_read(&mm->mmap_sem); return err; } diff --git a/trunk/mm/page_cgroup.c b/trunk/mm/page_cgroup.c index ab27ff750519..0b3cbf090a67 100644 --- a/trunk/mm/page_cgroup.c +++ b/trunk/mm/page_cgroup.c @@ -49,9 +49,6 @@ static int __init alloc_node_page_cgroup(int nid) start_pfn = NODE_DATA(nid)->node_start_pfn; nr_pages = NODE_DATA(nid)->node_spanned_pages; - if (!nr_pages) - return 0; - table_size = sizeof(struct page_cgroup) * nr_pages; base = __alloc_bootmem_node_nopanic(NODE_DATA(nid), diff --git a/trunk/mm/slob.c b/trunk/mm/slob.c index bf7e8fc3aed8..cb675d126791 100644 --- a/trunk/mm/slob.c +++ b/trunk/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), - GFP_KERNEL, ARCH_KMALLOC_MINALIGN, -1); + flags, ARCH_KMALLOC_MINALIGN, -1); if (c) { c->name = name; diff --git a/trunk/mm/slub.c b/trunk/mm/slub.c index a2cd47d89e0a..749588a50a5a 100644 --- a/trunk/mm/slub.c +++ b/trunk/mm/slub.c @@ -3597,7 +3597,7 @@ static int list_locations(struct kmem_cache *s, char *buf, for (i = 0; i < t.count; i++) { struct location *l = &t.loc[i]; - if (len > PAGE_SIZE - KSYM_SYMBOL_LEN - 100) + if (len > PAGE_SIZE - 100) break; len += sprintf(buf + len, "%7ld ", l->count); diff --git a/trunk/mm/swap.c b/trunk/mm/swap.c index b135ec90cdeb..2881987603eb 100644 --- a/trunk/mm/swap.c +++ b/trunk/mm/swap.c @@ -299,6 +299,7 @@ void lru_add_drain(void) put_cpu(); } +#if defined(CONFIG_NUMA) || defined(CONFIG_UNEVICTABLE_LRU) static void lru_add_drain_per_cpu(struct work_struct *dummy) { lru_add_drain(); @@ -312,6 +313,18 @@ int lru_add_drain_all(void) return schedule_on_each_cpu(lru_add_drain_per_cpu); } +#else + +/* + * Returns 0 for success + */ +int lru_add_drain_all(void) +{ + lru_add_drain(); + return 0; +} +#endif + /* * Batched page_cache_release(). Decrement the reference count on all the * passed pages. If it fell to zero then remove the page from the LRU and diff --git a/trunk/mm/vmalloc.c b/trunk/mm/vmalloc.c index 1ddb77ba3995..f3f6e0758562 100644 --- a/trunk/mm/vmalloc.c +++ b/trunk/mm/vmalloc.c @@ -1717,7 +1717,7 @@ static int s_show(struct seq_file *m, void *p) v->addr, v->addr + v->size, v->size); if (v->caller) { - char buff[KSYM_SYMBOL_LEN]; + char buff[2 * KSYM_NAME_LEN]; seq_putc(m, ' '); sprint_symbol(buff, (unsigned long)v->caller); diff --git a/trunk/net/bluetooth/rfcomm/core.c b/trunk/net/bluetooth/rfcomm/core.c index ce68e046d963..ba537fae0a4c 100644 --- a/trunk/net/bluetooth/rfcomm/core.c +++ b/trunk/net/bluetooth/rfcomm/core.c @@ -1786,6 +1786,8 @@ 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; diff --git a/trunk/net/core/netpoll.c b/trunk/net/core/netpoll.c index dadac6281f20..6c7af390be0a 100644 --- a/trunk/net/core/netpoll.c +++ b/trunk/net/core/netpoll.c @@ -133,11 +133,9 @@ 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; diff --git a/trunk/net/ipv4/netfilter/nf_nat_rule.c b/trunk/net/ipv4/netfilter/nf_nat_rule.c index 8d489e746b21..bea54a685109 100644 --- a/trunk/net/ipv4/netfilter/nf_nat_rule.c +++ b/trunk/net/ipv4/netfilter/nf_nat_rule.c @@ -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, }; diff --git a/trunk/net/ipv4/tcp_vegas.c b/trunk/net/ipv4/tcp_vegas.c index a453aac91bd3..7cd22262de3a 100644 --- a/trunk/net/ipv4/tcp_vegas.c +++ b/trunk/net/ipv4/tcp_vegas.c @@ -40,14 +40,18 @@ #include "tcp_vegas.h" -static int alpha = 2; -static int beta = 4; -static int gamma = 1; +/* 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<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 @@ -212,14 +252,22 @@ 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 = tp->snd_cwnd * vegas->baseRTT / rtt; + target_cwnd = ((u64)old_wnd * vegas->baseRTT); + target_cwnd <<= V_PARAM_SHIFT; + do_div(target_cwnd, 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 = tp->snd_cwnd * (rtt-vegas->baseRTT) / vegas->baseRTT; + diff = (old_wnd << V_PARAM_SHIFT) - target_cwnd; if (diff > gamma && tp->snd_ssthresh > 2 ) { /* Going too fast. Time to slow down @@ -234,13 +282,16 @@ 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+1); + tp->snd_cwnd = min(tp->snd_cwnd, + ((u32)target_cwnd >> + V_PARAM_SHIFT)+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. @@ -249,17 +300,26 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 in_flight) /* The old window was too fast, so * we slow down. */ - tp->snd_cwnd--; + next_snd_cwnd = old_snd_cwnd - 1; } else if (diff < alpha) { /* We don't have enough extra packets * in the network, so speed up. */ - tp->snd_cwnd++; + next_snd_cwnd = old_snd_cwnd + 1; } 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) diff --git a/trunk/net/ipv6/ndisc.c b/trunk/net/ipv6/ndisc.c index d0f54d18e19b..172438320eec 100644 --- a/trunk/net/ipv6/ndisc.c +++ b/trunk/net/ipv6/ndisc.c @@ -912,13 +912,8 @@ 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. */ - if (skb->pkt_type != PACKET_LOOPBACK) - ND_PRINTK1(KERN_WARNING + ND_PRINTK1(KERN_WARNING "ICMPv6 NA: someone advertises our address on %s!\n", ifp->idev->dev->name); in6_ifa_put(ifp); diff --git a/trunk/net/netlabel/netlabel_unlabeled.c b/trunk/net/netlabel/netlabel_unlabeled.c index 8c0308032178..90c8506a0aac 100644 --- a/trunk/net/netlabel/netlabel_unlabeled.c +++ b/trunk/net/netlabel/netlabel_unlabeled.c @@ -562,6 +562,7 @@ 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; @@ -576,7 +577,7 @@ static int netlbl_unlhsh_remove_addr4(struct net *net, if (list_entry != NULL) entry = netlbl_unlhsh_addr4_entry(list_entry); else - entry = NULL; + ret_val = -ENOENT; audit_buf = netlbl_audit_start_common(AUDIT_MAC_UNLBL_STCDEL, audit_info); @@ -587,21 +588,19 @@ static int netlbl_unlhsh_remove_addr4(struct net *net, addr->s_addr, mask->s_addr); if (dev != NULL) dev_put(dev); - if (entry != NULL && - security_secid_to_secctx(entry->secid, - &secctx, &secctx_len) == 0) { + if (entry && 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", entry != NULL ? 1 : 0); + audit_log_format(audit_buf, " res=%u", ret_val == 0 ? 1 : 0); audit_log_end(audit_buf); } - if (entry == NULL) - return -ENOENT; - - call_rcu(&entry->rcu, netlbl_unlhsh_free_addr4); - return 0; + if (ret_val == 0) + call_rcu(&entry->rcu, netlbl_unlhsh_free_addr4); + return ret_val; } #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) @@ -625,6 +624,7 @@ 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 - entry = NULL; + ret_val = -ENOENT; audit_buf = netlbl_audit_start_common(AUDIT_MAC_UNLBL_STCDEL, audit_info); @@ -649,21 +649,19 @@ static int netlbl_unlhsh_remove_addr6(struct net *net, addr, mask); if (dev != NULL) dev_put(dev); - if (entry != NULL && - security_secid_to_secctx(entry->secid, - &secctx, &secctx_len) == 0) { + if (entry && 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", entry != NULL ? 1 : 0); + audit_log_format(audit_buf, " res=%u", ret_val == 0 ? 1 : 0); audit_log_end(audit_buf); } - if (entry == NULL) - return -ENOENT; - - call_rcu(&entry->rcu, netlbl_unlhsh_free_addr6); - return 0; + if (ret_val == 0) + call_rcu(&entry->rcu, netlbl_unlhsh_free_addr6); + return ret_val; } #endif /* IPv6 */ diff --git a/trunk/net/phonet/pep-gprs.c b/trunk/net/phonet/pep-gprs.c index 803eeef0aa85..9978afbd9f2a 100644 --- a/trunk/net/phonet/pep-gprs.c +++ b/trunk/net/phonet/pep-gprs.c @@ -155,13 +155,12 @@ 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_running(net)) - netif_wake_queue(net); + if (credits > skb_queue_len(&dev->tx_queue)) + netif_wake_queue(dev->net); spin_unlock_bh(&dev->tx_lock); } @@ -169,23 +168,6 @@ 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); @@ -272,8 +254,6 @@ 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; @@ -338,6 +318,7 @@ 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: @@ -360,5 +341,7 @@ 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); } diff --git a/trunk/net/sched/sch_netem.c b/trunk/net/sched/sch_netem.c index 98402f0efa47..a11959908d9a 100644 --- a/trunk/net/sched/sch_netem.c +++ b/trunk/net/sched/sch_netem.c @@ -46,6 +46,9 @@ 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 { diff --git a/trunk/net/socket.c b/trunk/net/socket.c index 76ba80aeac1a..92764d836891 100644 --- a/trunk/net/socket.c +++ b/trunk/net/socket.c @@ -2307,7 +2307,6 @@ int kernel_accept(struct socket *sock, struct socket **newsock, int flags) } (*newsock)->ops = sock->ops; - __module_get((*newsock)->ops->owner); done: return err; diff --git a/trunk/sound/pci/hda/patch_sigmatel.c b/trunk/sound/pci/hda/patch_sigmatel.c index b77f330d2650..5dd3e89f620a 100644 --- a/trunk/sound/pci/hda/patch_sigmatel.c +++ b/trunk/sound/pci/hda/patch_sigmatel.c @@ -69,7 +69,6 @@ enum { }; enum { - STAC_92HD73XX_NO_JD, /* no jack-detection */ STAC_92HD73XX_REF, STAC_DELL_M6_AMIC, STAC_DELL_M6_DMIC, @@ -128,7 +127,6 @@ enum { }; enum { - STAC_D965_REF_NO_JD, /* no jack-detection */ STAC_D965_REF, STAC_D965_3ST, STAC_D965_5ST, @@ -859,7 +857,6 @@ 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[] = { @@ -871,7 +868,6 @@ 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 @@ -1615,7 +1611,6 @@ 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", @@ -1645,8 +1640,6 @@ 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 */ }; @@ -1669,7 +1662,6 @@ 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] = { @@ -2035,7 +2027,6 @@ 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, @@ -2044,7 +2035,6 @@ 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", @@ -2906,7 +2896,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 == 1 && !spec->multiout.hp_nid) + cfg->hp_outs && !spec->multiout.hp_nid) spec->multiout.hp_nid = nid; if (cfg->hp_outs > 1 && cfg->line_out_type == AUTO_PIN_LINE_OUT) { @@ -4264,17 +4254,14 @@ static int patch_stac92hd73xx(struct hda_codec *codec) 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; }; @@ -4310,7 +4297,6 @@ static int patch_stac92hd73xx(struct hda_codec *codec) 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; @@ -4365,9 +4351,6 @@ static int patch_stac92hd73xx(struct hda_codec *codec) return err; } - if (spec->board_config == STAC_92HD73XX_NO_JD) - spec->hp_detect = 0; - codec->patch_ops = stac92xx_patch_ops; return 0; @@ -4916,10 +4899,6 @@ 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; } diff --git a/trunk/sound/soc/omap/omap-pcm.c b/trunk/sound/soc/omap/omap-pcm.c index acd68efb2b75..e9084fdd2082 100644 --- a/trunk/sound/soc/omap/omap-pcm.c +++ b/trunk/sound/soc/omap/omap-pcm.c @@ -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;