diff options
-rw-r--r-- | Documentation/hwmon/ibmaem | 33 | ||||
-rw-r--r-- | Documentation/vm/page_migration | 9 | ||||
-rw-r--r-- | MAINTAINERS | 18 | ||||
-rw-r--r-- | arch/alpha/include/asm/8253pit.h (renamed from include/asm-alpha/8253pit.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/Kbuild (renamed from include/asm-alpha/Kbuild) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/a.out-core.h (renamed from include/asm-alpha/a.out-core.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/a.out.h (renamed from include/asm-alpha/a.out.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/agp.h (renamed from include/asm-alpha/agp.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/agp_backend.h (renamed from include/asm-alpha/agp_backend.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/atomic.h (renamed from include/asm-alpha/atomic.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/auxvec.h (renamed from include/asm-alpha/auxvec.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/barrier.h (renamed from include/asm-alpha/barrier.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/bitops.h (renamed from include/asm-alpha/bitops.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/bug.h (renamed from include/asm-alpha/bug.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/bugs.h (renamed from include/asm-alpha/bugs.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/byteorder.h (renamed from include/asm-alpha/byteorder.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/cache.h (renamed from include/asm-alpha/cache.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/cacheflush.h (renamed from include/asm-alpha/cacheflush.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/checksum.h (renamed from include/asm-alpha/checksum.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/compiler.h (renamed from include/asm-alpha/compiler.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/console.h (renamed from include/asm-alpha/console.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/core_apecs.h (renamed from include/asm-alpha/core_apecs.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/core_cia.h (renamed from include/asm-alpha/core_cia.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/core_irongate.h (renamed from include/asm-alpha/core_irongate.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/core_lca.h (renamed from include/asm-alpha/core_lca.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/core_marvel.h (renamed from include/asm-alpha/core_marvel.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/core_mcpcia.h (renamed from include/asm-alpha/core_mcpcia.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/core_polaris.h (renamed from include/asm-alpha/core_polaris.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/core_t2.h (renamed from include/asm-alpha/core_t2.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/core_titan.h (renamed from include/asm-alpha/core_titan.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/core_tsunami.h (renamed from include/asm-alpha/core_tsunami.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/core_wildfire.h (renamed from include/asm-alpha/core_wildfire.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/cputime.h (renamed from include/asm-alpha/cputime.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/current.h (renamed from include/asm-alpha/current.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/delay.h (renamed from include/asm-alpha/delay.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/device.h (renamed from include/asm-alpha/device.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/div64.h (renamed from include/asm-alpha/div64.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/dma-mapping.h (renamed from include/asm-alpha/dma-mapping.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/dma.h (renamed from include/asm-alpha/dma.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/elf.h (renamed from include/asm-alpha/elf.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/emergency-restart.h (renamed from include/asm-alpha/emergency-restart.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/err_common.h (renamed from include/asm-alpha/err_common.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/err_ev6.h (renamed from include/asm-alpha/err_ev6.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/err_ev7.h (renamed from include/asm-alpha/err_ev7.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/errno.h (renamed from include/asm-alpha/errno.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/fb.h (renamed from include/asm-alpha/fb.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/fcntl.h (renamed from include/asm-alpha/fcntl.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/floppy.h (renamed from include/asm-alpha/floppy.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/fpu.h (renamed from include/asm-alpha/fpu.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/futex.h (renamed from include/asm-alpha/futex.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/gct.h (renamed from include/asm-alpha/gct.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/gentrap.h (renamed from include/asm-alpha/gentrap.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/hardirq.h (renamed from include/asm-alpha/hardirq.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/hw_irq.h (renamed from include/asm-alpha/hw_irq.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/hwrpb.h (renamed from include/asm-alpha/hwrpb.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/io.h (renamed from include/asm-alpha/io.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/io_trivial.h (renamed from include/asm-alpha/io_trivial.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/ioctl.h (renamed from include/asm-alpha/ioctl.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/ioctls.h (renamed from include/asm-alpha/ioctls.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/ipcbuf.h (renamed from include/asm-alpha/ipcbuf.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/irq.h (renamed from include/asm-alpha/irq.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/irq_regs.h (renamed from include/asm-alpha/irq_regs.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/jensen.h (renamed from include/asm-alpha/jensen.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/kdebug.h (renamed from include/asm-alpha/kdebug.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/kmap_types.h (renamed from include/asm-alpha/kmap_types.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/linkage.h (renamed from include/asm-alpha/linkage.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/local.h (renamed from include/asm-alpha/local.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/machvec.h (renamed from include/asm-alpha/machvec.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/mc146818rtc.h (renamed from include/asm-alpha/mc146818rtc.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/md.h (renamed from include/asm-alpha/md.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/mman.h (renamed from include/asm-alpha/mman.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/mmu.h (renamed from include/asm-alpha/mmu.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/mmu_context.h (renamed from include/asm-alpha/mmu_context.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/mmzone.h (renamed from include/asm-alpha/mmzone.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/module.h (renamed from include/asm-alpha/module.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/msgbuf.h (renamed from include/asm-alpha/msgbuf.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/mutex.h (renamed from include/asm-alpha/mutex.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/page.h (renamed from include/asm-alpha/page.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/pal.h (renamed from include/asm-alpha/pal.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/param.h (renamed from include/asm-alpha/param.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/parport.h (renamed from include/asm-alpha/parport.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/pci.h (renamed from include/asm-alpha/pci.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/percpu.h (renamed from include/asm-alpha/percpu.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/pgalloc.h (renamed from include/asm-alpha/pgalloc.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/pgtable.h (renamed from include/asm-alpha/pgtable.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/poll.h (renamed from include/asm-alpha/poll.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/posix_types.h (renamed from include/asm-alpha/posix_types.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/processor.h (renamed from include/asm-alpha/processor.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/ptrace.h (renamed from include/asm-alpha/ptrace.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/reg.h (renamed from include/asm-alpha/reg.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/regdef.h (renamed from include/asm-alpha/regdef.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/resource.h (renamed from include/asm-alpha/resource.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/rtc.h (renamed from include/asm-alpha/rtc.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/rwsem.h (renamed from include/asm-alpha/rwsem.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/scatterlist.h (renamed from include/asm-alpha/scatterlist.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/sections.h (renamed from include/asm-alpha/sections.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/segment.h (renamed from include/asm-alpha/segment.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/sembuf.h (renamed from include/asm-alpha/sembuf.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/serial.h (renamed from include/asm-alpha/serial.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/setup.h (renamed from include/asm-alpha/setup.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/sfp-machine.h (renamed from include/asm-alpha/sfp-machine.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/shmbuf.h (renamed from include/asm-alpha/shmbuf.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/shmparam.h (renamed from include/asm-alpha/shmparam.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/sigcontext.h (renamed from include/asm-alpha/sigcontext.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/siginfo.h (renamed from include/asm-alpha/siginfo.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/signal.h (renamed from include/asm-alpha/signal.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/smp.h (renamed from include/asm-alpha/smp.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/socket.h (renamed from include/asm-alpha/socket.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/sockios.h (renamed from include/asm-alpha/sockios.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/spinlock.h (renamed from include/asm-alpha/spinlock.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/spinlock_types.h (renamed from include/asm-alpha/spinlock_types.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/stat.h (renamed from include/asm-alpha/stat.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/statfs.h (renamed from include/asm-alpha/statfs.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/string.h (renamed from include/asm-alpha/string.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/suspend.h (renamed from include/asm-alpha/suspend.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/sysinfo.h (renamed from include/asm-alpha/sysinfo.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/system.h (renamed from include/asm-alpha/system.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/termbits.h (renamed from include/asm-alpha/termbits.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/termios.h (renamed from include/asm-alpha/termios.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/thread_info.h (renamed from include/asm-alpha/thread_info.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/timex.h (renamed from include/asm-alpha/timex.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/tlb.h (renamed from include/asm-alpha/tlb.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/tlbflush.h (renamed from include/asm-alpha/tlbflush.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/topology.h (renamed from include/asm-alpha/topology.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/types.h (renamed from include/asm-alpha/types.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/uaccess.h (renamed from include/asm-alpha/uaccess.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/ucontext.h (renamed from include/asm-alpha/ucontext.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/unaligned.h (renamed from include/asm-alpha/unaligned.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/unistd.h (renamed from include/asm-alpha/unistd.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/user.h (renamed from include/asm-alpha/user.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/vga.h (renamed from include/asm-alpha/vga.h) | 0 | ||||
-rw-r--r-- | arch/alpha/include/asm/xor.h (renamed from include/asm-alpha/xor.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/kexec.h | 2 | ||||
-rw-r--r-- | arch/arm/kernel/machine_kexec.c | 2 | ||||
-rw-r--r-- | arch/ia64/include/asm/kexec.h | 2 | ||||
-rw-r--r-- | arch/powerpc/include/asm/kexec.h | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/machine_kexec_32.c | 2 | ||||
-rw-r--r-- | arch/s390/include/asm/kexec.h | 2 | ||||
-rw-r--r-- | arch/sh/include/asm/kexec.h | 2 | ||||
-rw-r--r-- | arch/x86/kernel/machine_kexec_32.c | 20 | ||||
-rw-r--r-- | arch/x86/kernel/relocate_kernel_32.S | 10 | ||||
-rw-r--r-- | arch/x86/kernel/vmlinux_32.lds.S | 8 | ||||
-rw-r--r-- | drivers/hwmon/Kconfig | 16 | ||||
-rw-r--r-- | drivers/hwmon/Makefile | 1 | ||||
-rw-r--r-- | drivers/hwmon/abituguru3.c | 134 | ||||
-rw-r--r-- | drivers/hwmon/adcxx.c | 329 | ||||
-rw-r--r-- | drivers/hwmon/applesmc.c | 20 | ||||
-rw-r--r-- | drivers/hwmon/coretemp.c | 5 | ||||
-rw-r--r-- | drivers/hwmon/i5k_amb.c | 28 | ||||
-rw-r--r-- | drivers/hwmon/ibmaem.c | 27 | ||||
-rw-r--r-- | drivers/hwmon/w83791d.c | 3 | ||||
-rw-r--r-- | drivers/spi/spi.c | 40 | ||||
-rw-r--r-- | drivers/video/fsl-diu-fb.c | 32 | ||||
-rw-r--r-- | fs/inode.c | 1 | ||||
-rw-r--r-- | fs/omfs/bitmap.c | 5 | ||||
-rw-r--r-- | fs/omfs/file.c | 33 | ||||
-rw-r--r-- | fs/omfs/inode.c | 3 | ||||
-rw-r--r-- | include/asm-mips/kexec.h | 2 | ||||
-rw-r--r-- | include/asm-x86/kexec.h | 8 | ||||
-rw-r--r-- | include/linux/completion.h | 46 | ||||
-rw-r--r-- | include/linux/ftrace.h | 21 | ||||
-rw-r--r-- | include/linux/kexec.h | 4 | ||||
-rw-r--r-- | include/linux/reboot.h | 1 | ||||
-rw-r--r-- | include/linux/suspend.h | 4 | ||||
-rw-r--r-- | kernel/kexec.c | 66 | ||||
-rw-r--r-- | kernel/sched.c | 46 | ||||
-rw-r--r-- | kernel/sys.c | 2 | ||||
-rw-r--r-- | mm/bootmem.c | 2 |
168 files changed, 781 insertions, 210 deletions
diff --git a/Documentation/hwmon/ibmaem b/Documentation/hwmon/ibmaem index 2fefaf582a43..e98bdfea3467 100644 --- a/Documentation/hwmon/ibmaem +++ b/Documentation/hwmon/ibmaem @@ -1,8 +1,11 @@ Kernel driver ibmaem ====================== +This driver talks to the IBM Systems Director Active Energy Manager, known +henceforth as AEM. + Supported systems: - * Any recent IBM System X server with Active Energy Manager support. + * Any recent IBM System X server with AEM support. This includes the x3350, x3550, x3650, x3655, x3755, x3850 M2, x3950 M2, and certain HS2x/LS2x/QS2x blades. The IPMI host interface driver ("ipmi-si") needs to be loaded for this driver to do anything. @@ -14,24 +17,22 @@ Author: Darrick J. Wong Description ----------- -This driver implements sensor reading support for the energy and power -meters available on various IBM System X hardware through the BMC. All -sensor banks will be exported as platform devices; this driver can talk -to both v1 and v2 interfaces. This driver is completely separate from the -older ibmpex driver. +This driver implements sensor reading support for the energy and power meters +available on various IBM System X hardware through the BMC. All sensor banks +will be exported as platform devices; this driver can talk to both v1 and v2 +interfaces. This driver is completely separate from the older ibmpex driver. -The v1 AEM interface has a simple set of features to monitor energy use. -There is a register that displays an estimate of raw energy consumption -since the last BMC reset, and a power sensor that returns average power -use over a configurable interval. +The v1 AEM interface has a simple set of features to monitor energy use. There +is a register that displays an estimate of raw energy consumption since the +last BMC reset, and a power sensor that returns average power use over a +configurable interval. -The v2 AEM interface is a bit more sophisticated, being able to present -a wider range of energy and power use registers, the power cap as -set by the AEM software, and temperature sensors. +The v2 AEM interface is a bit more sophisticated, being able to present a wider +range of energy and power use registers, the power cap as set by the AEM +software, and temperature sensors. Special Features ---------------- -The "power_cap" value displays the current system power cap, as set by -the Active Energy Manager software. Setting the power cap from the host -is not currently supported. +The "power_cap" value displays the current system power cap, as set by the AEM +software. Setting the power cap from the host is not currently supported. diff --git a/Documentation/vm/page_migration b/Documentation/vm/page_migration index 99f89aa10169..d5fdfd34bbaf 100644 --- a/Documentation/vm/page_migration +++ b/Documentation/vm/page_migration @@ -18,10 +18,11 @@ migrate_pages function call takes two sets of nodes and moves pages of a process that are located on the from nodes to the destination nodes. Page migration functions are provided by the numactl package by Andi Kleen (a version later than 0.9.3 is required. Get it from -ftp://ftp.suse.com/pub/people/ak). numactl provided libnuma which -provides an interface similar to other numa functionality for page migration. -cat /proc/<pid>/numa_maps allows an easy review of where the pages of -a process are located. See also the numa_maps manpage in the numactl package. +ftp://oss.sgi.com/www/projects/libnuma/download/). numactl provides libnuma +which provides an interface similar to other numa functionality for page +migration. cat /proc/<pid>/numa_maps allows an easy review of where the +pages of a process are located. See also the numa_maps documentation in the +proc(5) man page. Manual migration is useful if for example the scheduler has relocated a process to a processor on a distant node. A batch scheduler or an diff --git a/MAINTAINERS b/MAINTAINERS index 4c5e9fe0f7db..663485b004fb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -175,12 +175,18 @@ M: bcrl@kvack.org L: linux-aio@kvack.org S: Supported -ABIT UGURU HARDWARE MONITOR DRIVER +ABIT UGURU 1,2 HARDWARE MONITOR DRIVER P: Hans de Goede M: j.w.r.degoede@hhs.nl L: lm-sensors@lm-sensors.org S: Maintained +ABIT UGURU 3 HARDWARE MONITOR DRIVER +P: Alistair John Strachan +M: alistair@devzero.co.uk +L: lm-sensors@lm-sensors.org +S: Maintained + ACENIC DRIVER P: Jes Sorensen M: jes@trained-monkey.org @@ -3748,6 +3754,16 @@ L: linux-visws-devel@lists.sf.net W: http://linux-visws.sf.net S: Maintained for 2.6. +SGI GRU DRIVER +P: Jack Steiner +M: steiner@sgi.com +S: Maintained + +SGI XP/XPC/XPNET DRIVER +P: Dean Nelson +M: dcn@sgi.com +S: Maintained + SIMTEC EB110ATX (Chalice CATS) P: Ben Dooks P: Vincent Sanders diff --git a/include/asm-alpha/8253pit.h b/arch/alpha/include/asm/8253pit.h index fef5c1450e47..fef5c1450e47 100644 --- a/include/asm-alpha/8253pit.h +++ b/arch/alpha/include/asm/8253pit.h diff --git a/include/asm-alpha/Kbuild b/arch/alpha/include/asm/Kbuild index b7c8f188b313..b7c8f188b313 100644 --- a/include/asm-alpha/Kbuild +++ b/arch/alpha/include/asm/Kbuild diff --git a/include/asm-alpha/a.out-core.h b/arch/alpha/include/asm/a.out-core.h index 9e33e92e524c..9e33e92e524c 100644 --- a/include/asm-alpha/a.out-core.h +++ b/arch/alpha/include/asm/a.out-core.h diff --git a/include/asm-alpha/a.out.h b/arch/alpha/include/asm/a.out.h index 02ce8473870a..02ce8473870a 100644 --- a/include/asm-alpha/a.out.h +++ b/arch/alpha/include/asm/a.out.h diff --git a/include/asm-alpha/agp.h b/arch/alpha/include/asm/agp.h index 26c179135293..26c179135293 100644 --- a/include/asm-alpha/agp.h +++ b/arch/alpha/include/asm/agp.h diff --git a/include/asm-alpha/agp_backend.h b/arch/alpha/include/asm/agp_backend.h index 55dd44a2cea7..55dd44a2cea7 100644 --- a/include/asm-alpha/agp_backend.h +++ b/arch/alpha/include/asm/agp_backend.h diff --git a/include/asm-alpha/atomic.h b/arch/alpha/include/asm/atomic.h index ca88e54dec93..ca88e54dec93 100644 --- a/include/asm-alpha/atomic.h +++ b/arch/alpha/include/asm/atomic.h diff --git a/include/asm-alpha/auxvec.h b/arch/alpha/include/asm/auxvec.h index e96fe880e310..e96fe880e310 100644 --- a/include/asm-alpha/auxvec.h +++ b/arch/alpha/include/asm/auxvec.h diff --git a/include/asm-alpha/barrier.h b/arch/alpha/include/asm/barrier.h index ac78eba909bc..ac78eba909bc 100644 --- a/include/asm-alpha/barrier.h +++ b/arch/alpha/include/asm/barrier.h diff --git a/include/asm-alpha/bitops.h b/arch/alpha/include/asm/bitops.h index 15f3ae25c511..15f3ae25c511 100644 --- a/include/asm-alpha/bitops.h +++ b/arch/alpha/include/asm/bitops.h diff --git a/include/asm-alpha/bug.h b/arch/alpha/include/asm/bug.h index 695a5ee4b5d3..695a5ee4b5d3 100644 --- a/include/asm-alpha/bug.h +++ b/arch/alpha/include/asm/bug.h diff --git a/include/asm-alpha/bugs.h b/arch/alpha/include/asm/bugs.h index 78030d1c7e7e..78030d1c7e7e 100644 --- a/include/asm-alpha/bugs.h +++ b/arch/alpha/include/asm/bugs.h diff --git a/include/asm-alpha/byteorder.h b/arch/alpha/include/asm/byteorder.h index 58e958fc7f1b..58e958fc7f1b 100644 --- a/include/asm-alpha/byteorder.h +++ b/arch/alpha/include/asm/byteorder.h diff --git a/include/asm-alpha/cache.h b/arch/alpha/include/asm/cache.h index f199e69a5d0b..f199e69a5d0b 100644 --- a/include/asm-alpha/cache.h +++ b/arch/alpha/include/asm/cache.h diff --git a/include/asm-alpha/cacheflush.h b/arch/alpha/include/asm/cacheflush.h index b686cc7fc44e..b686cc7fc44e 100644 --- a/include/asm-alpha/cacheflush.h +++ b/arch/alpha/include/asm/cacheflush.h diff --git a/include/asm-alpha/checksum.h b/arch/alpha/include/asm/checksum.h index d3854bbf0a9e..d3854bbf0a9e 100644 --- a/include/asm-alpha/checksum.h +++ b/arch/alpha/include/asm/checksum.h diff --git a/include/asm-alpha/compiler.h b/arch/alpha/include/asm/compiler.h index da6bb199839c..da6bb199839c 100644 --- a/include/asm-alpha/compiler.h +++ b/arch/alpha/include/asm/compiler.h diff --git a/include/asm-alpha/console.h b/arch/alpha/include/asm/console.h index a3ce4e62249b..a3ce4e62249b 100644 --- a/include/asm-alpha/console.h +++ b/arch/alpha/include/asm/console.h diff --git a/include/asm-alpha/core_apecs.h b/arch/alpha/include/asm/core_apecs.h index 6785ff7e02bc..6785ff7e02bc 100644 --- a/include/asm-alpha/core_apecs.h +++ b/arch/alpha/include/asm/core_apecs.h diff --git a/include/asm-alpha/core_cia.h b/arch/alpha/include/asm/core_cia.h index 9e0516c0ca27..9e0516c0ca27 100644 --- a/include/asm-alpha/core_cia.h +++ b/arch/alpha/include/asm/core_cia.h diff --git a/include/asm-alpha/core_irongate.h b/arch/alpha/include/asm/core_irongate.h index 24b2db541501..24b2db541501 100644 --- a/include/asm-alpha/core_irongate.h +++ b/arch/alpha/include/asm/core_irongate.h diff --git a/include/asm-alpha/core_lca.h b/arch/alpha/include/asm/core_lca.h index f7cb4b460954..f7cb4b460954 100644 --- a/include/asm-alpha/core_lca.h +++ b/arch/alpha/include/asm/core_lca.h diff --git a/include/asm-alpha/core_marvel.h b/arch/alpha/include/asm/core_marvel.h index 30d55fe7aaf6..30d55fe7aaf6 100644 --- a/include/asm-alpha/core_marvel.h +++ b/arch/alpha/include/asm/core_marvel.h diff --git a/include/asm-alpha/core_mcpcia.h b/arch/alpha/include/asm/core_mcpcia.h index acf55b483472..acf55b483472 100644 --- a/include/asm-alpha/core_mcpcia.h +++ b/arch/alpha/include/asm/core_mcpcia.h diff --git a/include/asm-alpha/core_polaris.h b/arch/alpha/include/asm/core_polaris.h index 2f966b64659d..2f966b64659d 100644 --- a/include/asm-alpha/core_polaris.h +++ b/arch/alpha/include/asm/core_polaris.h diff --git a/include/asm-alpha/core_t2.h b/arch/alpha/include/asm/core_t2.h index 46bfff58f670..46bfff58f670 100644 --- a/include/asm-alpha/core_t2.h +++ b/arch/alpha/include/asm/core_t2.h diff --git a/include/asm-alpha/core_titan.h b/arch/alpha/include/asm/core_titan.h index a17f6f33b68e..a17f6f33b68e 100644 --- a/include/asm-alpha/core_titan.h +++ b/arch/alpha/include/asm/core_titan.h diff --git a/include/asm-alpha/core_tsunami.h b/arch/alpha/include/asm/core_tsunami.h index 58d4fe48742c..58d4fe48742c 100644 --- a/include/asm-alpha/core_tsunami.h +++ b/arch/alpha/include/asm/core_tsunami.h diff --git a/include/asm-alpha/core_wildfire.h b/arch/alpha/include/asm/core_wildfire.h index cd562f544ba2..cd562f544ba2 100644 --- a/include/asm-alpha/core_wildfire.h +++ b/arch/alpha/include/asm/core_wildfire.h diff --git a/include/asm-alpha/cputime.h b/arch/alpha/include/asm/cputime.h index 19577fd93230..19577fd93230 100644 --- a/include/asm-alpha/cputime.h +++ b/arch/alpha/include/asm/cputime.h diff --git a/include/asm-alpha/current.h b/arch/alpha/include/asm/current.h index 094d285a1b34..094d285a1b34 100644 --- a/include/asm-alpha/current.h +++ b/arch/alpha/include/asm/current.h diff --git a/include/asm-alpha/delay.h b/arch/alpha/include/asm/delay.h index 2aa3f410f7e6..2aa3f410f7e6 100644 --- a/include/asm-alpha/delay.h +++ b/arch/alpha/include/asm/delay.h diff --git a/include/asm-alpha/device.h b/arch/alpha/include/asm/device.h index d8f9872b0e2d..d8f9872b0e2d 100644 --- a/include/asm-alpha/device.h +++ b/arch/alpha/include/asm/device.h diff --git a/include/asm-alpha/div64.h b/arch/alpha/include/asm/div64.h index 6cd978cefb28..6cd978cefb28 100644 --- a/include/asm-alpha/div64.h +++ b/arch/alpha/include/asm/div64.h diff --git a/include/asm-alpha/dma-mapping.h b/arch/alpha/include/asm/dma-mapping.h index a5801ae02e4b..a5801ae02e4b 100644 --- a/include/asm-alpha/dma-mapping.h +++ b/arch/alpha/include/asm/dma-mapping.h diff --git a/include/asm-alpha/dma.h b/arch/alpha/include/asm/dma.h index 87cfdbdf08fc..87cfdbdf08fc 100644 --- a/include/asm-alpha/dma.h +++ b/arch/alpha/include/asm/dma.h diff --git a/include/asm-alpha/elf.h b/arch/alpha/include/asm/elf.h index fc1002ea1e0c..fc1002ea1e0c 100644 --- a/include/asm-alpha/elf.h +++ b/arch/alpha/include/asm/elf.h diff --git a/include/asm-alpha/emergency-restart.h b/arch/alpha/include/asm/emergency-restart.h index 108d8c48e42e..108d8c48e42e 100644 --- a/include/asm-alpha/emergency-restart.h +++ b/arch/alpha/include/asm/emergency-restart.h diff --git a/include/asm-alpha/err_common.h b/arch/alpha/include/asm/err_common.h index c25095942107..c25095942107 100644 --- a/include/asm-alpha/err_common.h +++ b/arch/alpha/include/asm/err_common.h diff --git a/include/asm-alpha/err_ev6.h b/arch/alpha/include/asm/err_ev6.h index ea637791e4a9..ea637791e4a9 100644 --- a/include/asm-alpha/err_ev6.h +++ b/arch/alpha/include/asm/err_ev6.h diff --git a/include/asm-alpha/err_ev7.h b/arch/alpha/include/asm/err_ev7.h index 87f99777c2e4..87f99777c2e4 100644 --- a/include/asm-alpha/err_ev7.h +++ b/arch/alpha/include/asm/err_ev7.h diff --git a/include/asm-alpha/errno.h b/arch/alpha/include/asm/errno.h index 69e2655249d2..69e2655249d2 100644 --- a/include/asm-alpha/errno.h +++ b/arch/alpha/include/asm/errno.h diff --git a/include/asm-alpha/fb.h b/arch/alpha/include/asm/fb.h index fa9bbb96b2b3..fa9bbb96b2b3 100644 --- a/include/asm-alpha/fb.h +++ b/arch/alpha/include/asm/fb.h diff --git a/include/asm-alpha/fcntl.h b/arch/alpha/include/asm/fcntl.h index 25da0017ec87..25da0017ec87 100644 --- a/include/asm-alpha/fcntl.h +++ b/arch/alpha/include/asm/fcntl.h diff --git a/include/asm-alpha/floppy.h b/arch/alpha/include/asm/floppy.h index 0be50413b2b5..0be50413b2b5 100644 --- a/include/asm-alpha/floppy.h +++ b/arch/alpha/include/asm/floppy.h diff --git a/include/asm-alpha/fpu.h b/arch/alpha/include/asm/fpu.h index ecb17a72acc3..ecb17a72acc3 100644 --- a/include/asm-alpha/fpu.h +++ b/arch/alpha/include/asm/fpu.h diff --git a/include/asm-alpha/futex.h b/arch/alpha/include/asm/futex.h index 6a332a9f099c..6a332a9f099c 100644 --- a/include/asm-alpha/futex.h +++ b/arch/alpha/include/asm/futex.h diff --git a/include/asm-alpha/gct.h b/arch/alpha/include/asm/gct.h index 3504c704927c..3504c704927c 100644 --- a/include/asm-alpha/gct.h +++ b/arch/alpha/include/asm/gct.h diff --git a/include/asm-alpha/gentrap.h b/arch/alpha/include/asm/gentrap.h index ae50cc3192c7..ae50cc3192c7 100644 --- a/include/asm-alpha/gentrap.h +++ b/arch/alpha/include/asm/gentrap.h diff --git a/include/asm-alpha/hardirq.h b/arch/alpha/include/asm/hardirq.h index d953e234daa8..d953e234daa8 100644 --- a/include/asm-alpha/hardirq.h +++ b/arch/alpha/include/asm/hardirq.h diff --git a/include/asm-alpha/hw_irq.h b/arch/alpha/include/asm/hw_irq.h index a37db0f95092..a37db0f95092 100644 --- a/include/asm-alpha/hw_irq.h +++ b/arch/alpha/include/asm/hw_irq.h diff --git a/include/asm-alpha/hwrpb.h b/arch/alpha/include/asm/hwrpb.h index 8e8f871af7cf..8e8f871af7cf 100644 --- a/include/asm-alpha/hwrpb.h +++ b/arch/alpha/include/asm/hwrpb.h diff --git a/include/asm-alpha/io.h b/arch/alpha/include/asm/io.h index e971ab000f95..e971ab000f95 100644 --- a/include/asm-alpha/io.h +++ b/arch/alpha/include/asm/io.h diff --git a/include/asm-alpha/io_trivial.h b/arch/alpha/include/asm/io_trivial.h index 1c77f10b4b36..1c77f10b4b36 100644 --- a/include/asm-alpha/io_trivial.h +++ b/arch/alpha/include/asm/io_trivial.h diff --git a/include/asm-alpha/ioctl.h b/arch/alpha/include/asm/ioctl.h index fc63727f4178..fc63727f4178 100644 --- a/include/asm-alpha/ioctl.h +++ b/arch/alpha/include/asm/ioctl.h diff --git a/include/asm-alpha/ioctls.h b/arch/alpha/include/asm/ioctls.h index 67bb9f6fdbe4..67bb9f6fdbe4 100644 --- a/include/asm-alpha/ioctls.h +++ b/arch/alpha/include/asm/ioctls.h diff --git a/include/asm-alpha/ipcbuf.h b/arch/alpha/include/asm/ipcbuf.h index d9c0e1a50702..d9c0e1a50702 100644 --- a/include/asm-alpha/ipcbuf.h +++ b/arch/alpha/include/asm/ipcbuf.h diff --git a/include/asm-alpha/irq.h b/arch/alpha/include/asm/irq.h index 06377400dc09..06377400dc09 100644 --- a/include/asm-alpha/irq.h +++ b/arch/alpha/include/asm/irq.h diff --git a/include/asm-alpha/irq_regs.h b/arch/alpha/include/asm/irq_regs.h index 3dd9c0b70270..3dd9c0b70270 100644 --- a/include/asm-alpha/irq_regs.h +++ b/arch/alpha/include/asm/irq_regs.h diff --git a/include/asm-alpha/jensen.h b/arch/alpha/include/asm/jensen.h index 964b06ead43b..964b06ead43b 100644 --- a/include/asm-alpha/jensen.h +++ b/arch/alpha/include/asm/jensen.h diff --git a/include/asm-alpha/kdebug.h b/arch/alpha/include/asm/kdebug.h index 6ece1b037665..6ece1b037665 100644 --- a/include/asm-alpha/kdebug.h +++ b/arch/alpha/include/asm/kdebug.h diff --git a/include/asm-alpha/kmap_types.h b/arch/alpha/include/asm/kmap_types.h index 3e6735a34c57..3e6735a34c57 100644 --- a/include/asm-alpha/kmap_types.h +++ b/arch/alpha/include/asm/kmap_types.h diff --git a/include/asm-alpha/linkage.h b/arch/alpha/include/asm/linkage.h index 291c2d01c44f..291c2d01c44f 100644 --- a/include/asm-alpha/linkage.h +++ b/arch/alpha/include/asm/linkage.h diff --git a/include/asm-alpha/local.h b/arch/alpha/include/asm/local.h index 6ad3ea696421..6ad3ea696421 100644 --- a/include/asm-alpha/local.h +++ b/arch/alpha/include/asm/local.h diff --git a/include/asm-alpha/machvec.h b/arch/alpha/include/asm/machvec.h index a86c083cdf7f..a86c083cdf7f 100644 --- a/include/asm-alpha/machvec.h +++ b/arch/alpha/include/asm/machvec.h diff --git a/include/asm-alpha/mc146818rtc.h b/arch/alpha/include/asm/mc146818rtc.h index 097703f1c8cb..097703f1c8cb 100644 --- a/include/asm-alpha/mc146818rtc.h +++ b/arch/alpha/include/asm/mc146818rtc.h diff --git a/include/asm-alpha/md.h b/arch/alpha/include/asm/md.h index 6c9b8222a4f2..6c9b8222a4f2 100644 --- a/include/asm-alpha/md.h +++ b/arch/alpha/include/asm/md.h diff --git a/include/asm-alpha/mman.h b/arch/alpha/include/asm/mman.h index 90d7c35d2867..90d7c35d2867 100644 --- a/include/asm-alpha/mman.h +++ b/arch/alpha/include/asm/mman.h diff --git a/include/asm-alpha/mmu.h b/arch/alpha/include/asm/mmu.h index 3dc127779329..3dc127779329 100644 --- a/include/asm-alpha/mmu.h +++ b/arch/alpha/include/asm/mmu.h diff --git a/include/asm-alpha/mmu_context.h b/arch/alpha/include/asm/mmu_context.h index 86c08a02d239..86c08a02d239 100644 --- a/include/asm-alpha/mmu_context.h +++ b/arch/alpha/include/asm/mmu_context.h diff --git a/include/asm-alpha/mmzone.h b/arch/alpha/include/asm/mmzone.h index 8af56ce346ad..8af56ce346ad 100644 --- a/include/asm-alpha/mmzone.h +++ b/arch/alpha/include/asm/mmzone.h diff --git a/include/asm-alpha/module.h b/arch/alpha/include/asm/module.h index 7b63743c534a..7b63743c534a 100644 --- a/include/asm-alpha/module.h +++ b/arch/alpha/include/asm/module.h diff --git a/include/asm-alpha/msgbuf.h b/arch/alpha/include/asm/msgbuf.h index 98496501a2bb..98496501a2bb 100644 --- a/include/asm-alpha/msgbuf.h +++ b/arch/alpha/include/asm/msgbuf.h diff --git a/include/asm-alpha/mutex.h b/arch/alpha/include/asm/mutex.h index 458c1f7fbc18..458c1f7fbc18 100644 --- a/include/asm-alpha/mutex.h +++ b/arch/alpha/include/asm/mutex.h diff --git a/include/asm-alpha/page.h b/arch/alpha/include/asm/page.h index 0995f9d13417..0995f9d13417 100644 --- a/include/asm-alpha/page.h +++ b/arch/alpha/include/asm/page.h diff --git a/include/asm-alpha/pal.h b/arch/alpha/include/asm/pal.h index 9b4ba0d6f00b..9b4ba0d6f00b 100644 --- a/include/asm-alpha/pal.h +++ b/arch/alpha/include/asm/pal.h diff --git a/include/asm-alpha/param.h b/arch/alpha/include/asm/param.h index e691ecfedb2c..e691ecfedb2c 100644 --- a/include/asm-alpha/param.h +++ b/arch/alpha/include/asm/param.h diff --git a/include/asm-alpha/parport.h b/arch/alpha/include/asm/parport.h index c5ee7cbb2fcd..c5ee7cbb2fcd 100644 --- a/include/asm-alpha/parport.h +++ b/arch/alpha/include/asm/parport.h diff --git a/include/asm-alpha/pci.h b/arch/alpha/include/asm/pci.h index 2a14302c17a3..2a14302c17a3 100644 --- a/include/asm-alpha/pci.h +++ b/arch/alpha/include/asm/pci.h diff --git a/include/asm-alpha/percpu.h b/arch/alpha/include/asm/percpu.h index 3495e8e00d70..3495e8e00d70 100644 --- a/include/asm-alpha/percpu.h +++ b/arch/alpha/include/asm/percpu.h diff --git a/include/asm-alpha/pgalloc.h b/arch/alpha/include/asm/pgalloc.h index fd090155dccd..fd090155dccd 100644 --- a/include/asm-alpha/pgalloc.h +++ b/arch/alpha/include/asm/pgalloc.h diff --git a/include/asm-alpha/pgtable.h b/arch/alpha/include/asm/pgtable.h index 3f0c59f6d8aa..3f0c59f6d8aa 100644 --- a/include/asm-alpha/pgtable.h +++ b/arch/alpha/include/asm/pgtable.h diff --git a/include/asm-alpha/poll.h b/arch/alpha/include/asm/poll.h index c98509d3149e..c98509d3149e 100644 --- a/include/asm-alpha/poll.h +++ b/arch/alpha/include/asm/poll.h diff --git a/include/asm-alpha/posix_types.h b/arch/alpha/include/asm/posix_types.h index db167413300b..db167413300b 100644 --- a/include/asm-alpha/posix_types.h +++ b/arch/alpha/include/asm/posix_types.h diff --git a/include/asm-alpha/processor.h b/arch/alpha/include/asm/processor.h index 94afe5859301..94afe5859301 100644 --- a/include/asm-alpha/processor.h +++ b/arch/alpha/include/asm/processor.h diff --git a/include/asm-alpha/ptrace.h b/arch/alpha/include/asm/ptrace.h index 32c7a5cddd59..32c7a5cddd59 100644 --- a/include/asm-alpha/ptrace.h +++ b/arch/alpha/include/asm/ptrace.h diff --git a/include/asm-alpha/reg.h b/arch/alpha/include/asm/reg.h index 86ff916fb069..86ff916fb069 100644 --- a/include/asm-alpha/reg.h +++ b/arch/alpha/include/asm/reg.h diff --git a/include/asm-alpha/regdef.h b/arch/alpha/include/asm/regdef.h index 142df9c4f8b8..142df9c4f8b8 100644 --- a/include/asm-alpha/regdef.h +++ b/arch/alpha/include/asm/regdef.h diff --git a/include/asm-alpha/resource.h b/arch/alpha/include/asm/resource.h index c10874ff5973..c10874ff5973 100644 --- a/include/asm-alpha/resource.h +++ b/arch/alpha/include/asm/resource.h diff --git a/include/asm-alpha/rtc.h b/arch/alpha/include/asm/rtc.h index 4e854b1333eb..4e854b1333eb 100644 --- a/include/asm-alpha/rtc.h +++ b/arch/alpha/include/asm/rtc.h diff --git a/include/asm-alpha/rwsem.h b/arch/alpha/include/asm/rwsem.h index 1570c0b54336..1570c0b54336 100644 --- a/include/asm-alpha/rwsem.h +++ b/arch/alpha/include/asm/rwsem.h diff --git a/include/asm-alpha/scatterlist.h b/arch/alpha/include/asm/scatterlist.h index 440747ca6349..440747ca6349 100644 --- a/include/asm-alpha/scatterlist.h +++ b/arch/alpha/include/asm/scatterlist.h diff --git a/include/asm-alpha/sections.h b/arch/alpha/include/asm/sections.h index 43b40edd6e44..43b40edd6e44 100644 --- a/include/asm-alpha/sections.h +++ b/arch/alpha/include/asm/sections.h diff --git a/include/asm-alpha/segment.h b/arch/alpha/include/asm/segment.h index 0453d97daae7..0453d97daae7 100644 --- a/include/asm-alpha/segment.h +++ b/arch/alpha/include/asm/segment.h diff --git a/include/asm-alpha/sembuf.h b/arch/alpha/include/asm/sembuf.h index 7b38b1534784..7b38b1534784 100644 --- a/include/asm-alpha/sembuf.h +++ b/arch/alpha/include/asm/sembuf.h diff --git a/include/asm-alpha/serial.h b/arch/alpha/include/asm/serial.h index 9d263e8d8ccc..9d263e8d8ccc 100644 --- a/include/asm-alpha/serial.h +++ b/arch/alpha/include/asm/serial.h diff --git a/include/asm-alpha/setup.h b/arch/alpha/include/asm/setup.h index 2e023a4aa317..2e023a4aa317 100644 --- a/include/asm-alpha/setup.h +++ b/arch/alpha/include/asm/setup.h diff --git a/include/asm-alpha/sfp-machine.h b/arch/alpha/include/asm/sfp-machine.h index 5fe63afbd474..5fe63afbd474 100644 --- a/include/asm-alpha/sfp-machine.h +++ b/arch/alpha/include/asm/sfp-machine.h diff --git a/include/asm-alpha/shmbuf.h b/arch/alpha/include/asm/shmbuf.h index 37ee84f05085..37ee84f05085 100644 --- a/include/asm-alpha/shmbuf.h +++ b/arch/alpha/include/asm/shmbuf.h diff --git a/include/asm-alpha/shmparam.h b/arch/alpha/include/asm/shmparam.h index cc901d58aebb..cc901d58aebb 100644 --- a/include/asm-alpha/shmparam.h +++ b/arch/alpha/include/asm/shmparam.h diff --git a/include/asm-alpha/sigcontext.h b/arch/alpha/include/asm/sigcontext.h index 323cdb026198..323cdb026198 100644 --- a/include/asm-alpha/sigcontext.h +++ b/arch/alpha/include/asm/sigcontext.h diff --git a/include/asm-alpha/siginfo.h b/arch/alpha/include/asm/siginfo.h index 9822362a8424..9822362a8424 100644 --- a/include/asm-alpha/siginfo.h +++ b/arch/alpha/include/asm/siginfo.h diff --git a/include/asm-alpha/signal.h b/arch/alpha/include/asm/signal.h index 13c2305d35ef..13c2305d35ef 100644 --- a/include/asm-alpha/signal.h +++ b/arch/alpha/include/asm/signal.h diff --git a/include/asm-alpha/smp.h b/arch/alpha/include/asm/smp.h index 544c69af8168..544c69af8168 100644 --- a/include/asm-alpha/smp.h +++ b/arch/alpha/include/asm/smp.h diff --git a/include/asm-alpha/socket.h b/arch/alpha/include/asm/socket.h index a1057c2d95e7..a1057c2d95e7 100644 --- a/include/asm-alpha/socket.h +++ b/arch/alpha/include/asm/socket.h diff --git a/include/asm-alpha/sockios.h b/arch/alpha/include/asm/sockios.h index 7932c7ab4a4d..7932c7ab4a4d 100644 --- a/include/asm-alpha/sockios.h +++ b/arch/alpha/include/asm/sockios.h diff --git a/include/asm-alpha/spinlock.h b/arch/alpha/include/asm/spinlock.h index aeeb125f6851..aeeb125f6851 100644 --- a/include/asm-alpha/spinlock.h +++ b/arch/alpha/include/asm/spinlock.h diff --git a/include/asm-alpha/spinlock_types.h b/arch/alpha/include/asm/spinlock_types.h index 8141eb5ebf0d..8141eb5ebf0d 100644 --- a/include/asm-alpha/spinlock_types.h +++ b/arch/alpha/include/asm/spinlock_types.h diff --git a/include/asm-alpha/stat.h b/arch/alpha/include/asm/stat.h index 07ad3e6b3f3e..07ad3e6b3f3e 100644 --- a/include/asm-alpha/stat.h +++ b/arch/alpha/include/asm/stat.h diff --git a/include/asm-alpha/statfs.h b/arch/alpha/include/asm/statfs.h index ad15830baefe..ad15830baefe 100644 --- a/include/asm-alpha/statfs.h +++ b/arch/alpha/include/asm/statfs.h diff --git a/include/asm-alpha/string.h b/arch/alpha/include/asm/string.h index b02b8a282940..b02b8a282940 100644 --- a/include/asm-alpha/string.h +++ b/arch/alpha/include/asm/string.h diff --git a/include/asm-alpha/suspend.h b/arch/alpha/include/asm/suspend.h index c7042d575851..c7042d575851 100644 --- a/include/asm-alpha/suspend.h +++ b/arch/alpha/include/asm/suspend.h diff --git a/include/asm-alpha/sysinfo.h b/arch/alpha/include/asm/sysinfo.h index 086aba284df2..086aba284df2 100644 --- a/include/asm-alpha/sysinfo.h +++ b/arch/alpha/include/asm/sysinfo.h diff --git a/include/asm-alpha/system.h b/arch/alpha/include/asm/system.h index afe20fa58c99..afe20fa58c99 100644 --- a/include/asm-alpha/system.h +++ b/arch/alpha/include/asm/system.h diff --git a/include/asm-alpha/termbits.h b/arch/alpha/include/asm/termbits.h index ad854a4a3af6..ad854a4a3af6 100644 --- a/include/asm-alpha/termbits.h +++ b/arch/alpha/include/asm/termbits.h diff --git a/include/asm-alpha/termios.h b/arch/alpha/include/asm/termios.h index fa13716a11c3..fa13716a11c3 100644 --- a/include/asm-alpha/termios.h +++ b/arch/alpha/include/asm/termios.h diff --git a/include/asm-alpha/thread_info.h b/arch/alpha/include/asm/thread_info.h index 15fda4344424..15fda4344424 100644 --- a/include/asm-alpha/thread_info.h +++ b/arch/alpha/include/asm/thread_info.h diff --git a/include/asm-alpha/timex.h b/arch/alpha/include/asm/timex.h index afa0c45e3e98..afa0c45e3e98 100644 --- a/include/asm-alpha/timex.h +++ b/arch/alpha/include/asm/timex.h diff --git a/include/asm-alpha/tlb.h b/arch/alpha/include/asm/tlb.h index c13636575fba..c13636575fba 100644 --- a/include/asm-alpha/tlb.h +++ b/arch/alpha/include/asm/tlb.h diff --git a/include/asm-alpha/tlbflush.h b/arch/alpha/include/asm/tlbflush.h index 9d87aaa08c0d..9d87aaa08c0d 100644 --- a/include/asm-alpha/tlbflush.h +++ b/arch/alpha/include/asm/tlbflush.h diff --git a/include/asm-alpha/topology.h b/arch/alpha/include/asm/topology.h index 149532e162c4..149532e162c4 100644 --- a/include/asm-alpha/topology.h +++ b/arch/alpha/include/asm/topology.h diff --git a/include/asm-alpha/types.h b/arch/alpha/include/asm/types.h index c1541353ccef..c1541353ccef 100644 --- a/include/asm-alpha/types.h +++ b/arch/alpha/include/asm/types.h diff --git a/include/asm-alpha/uaccess.h b/arch/alpha/include/asm/uaccess.h index 22de3b434a22..22de3b434a22 100644 --- a/include/asm-alpha/uaccess.h +++ b/arch/alpha/include/asm/uaccess.h diff --git a/include/asm-alpha/ucontext.h b/arch/alpha/include/asm/ucontext.h index 47578ab42152..47578ab42152 100644 --- a/include/asm-alpha/ucontext.h +++ b/arch/alpha/include/asm/ucontext.h diff --git a/include/asm-alpha/unaligned.h b/arch/alpha/include/asm/unaligned.h index 3787c60aed3f..3787c60aed3f 100644 --- a/include/asm-alpha/unaligned.h +++ b/arch/alpha/include/asm/unaligned.h diff --git a/include/asm-alpha/unistd.h b/arch/alpha/include/asm/unistd.h index 5b5c17485942..5b5c17485942 100644 --- a/include/asm-alpha/unistd.h +++ b/arch/alpha/include/asm/unistd.h diff --git a/include/asm-alpha/user.h b/arch/alpha/include/asm/user.h index a4eb6a4ca8d1..a4eb6a4ca8d1 100644 --- a/include/asm-alpha/user.h +++ b/arch/alpha/include/asm/user.h diff --git a/include/asm-alpha/vga.h b/arch/alpha/include/asm/vga.h index c00106bac521..c00106bac521 100644 --- a/include/asm-alpha/vga.h +++ b/arch/alpha/include/asm/vga.h diff --git a/include/asm-alpha/xor.h b/arch/alpha/include/asm/xor.h index 5ee1c2bc0499..5ee1c2bc0499 100644 --- a/include/asm-alpha/xor.h +++ b/arch/alpha/include/asm/xor.h diff --git a/arch/arm/include/asm/kexec.h b/arch/arm/include/asm/kexec.h index c8986bb99ed5..df15a0dc228e 100644 --- a/arch/arm/include/asm/kexec.h +++ b/arch/arm/include/asm/kexec.h @@ -10,7 +10,7 @@ /* Maximum address we can use for the control code buffer */ #define KEXEC_CONTROL_MEMORY_LIMIT (-1UL) -#define KEXEC_CONTROL_CODE_SIZE 4096 +#define KEXEC_CONTROL_PAGE_SIZE 4096 #define KEXEC_ARCH KEXEC_ARCH_ARM diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c index db8f54a3451f..fae5beb3c3d6 100644 --- a/arch/arm/kernel/machine_kexec.c +++ b/arch/arm/kernel/machine_kexec.c @@ -71,7 +71,7 @@ void machine_kexec(struct kimage *image) flush_icache_range((unsigned long) reboot_code_buffer, - (unsigned long) reboot_code_buffer + KEXEC_CONTROL_CODE_SIZE); + (unsigned long) reboot_code_buffer + KEXEC_CONTROL_PAGE_SIZE); printk(KERN_INFO "Bye!\n"); cpu_proc_fin(); diff --git a/arch/ia64/include/asm/kexec.h b/arch/ia64/include/asm/kexec.h index 541be835fc5a..e1d58f819d78 100644 --- a/arch/ia64/include/asm/kexec.h +++ b/arch/ia64/include/asm/kexec.h @@ -9,7 +9,7 @@ /* Maximum address we can use for the control code buffer */ #define KEXEC_CONTROL_MEMORY_LIMIT TASK_SIZE -#define KEXEC_CONTROL_CODE_SIZE (8192 + 8192 + 4096) +#define KEXEC_CONTROL_PAGE_SIZE (8192 + 8192 + 4096) /* The native architecture */ #define KEXEC_ARCH KEXEC_ARCH_IA_64 diff --git a/arch/powerpc/include/asm/kexec.h b/arch/powerpc/include/asm/kexec.h index acdcdc66f1b6..3736d9b33289 100644 --- a/arch/powerpc/include/asm/kexec.h +++ b/arch/powerpc/include/asm/kexec.h @@ -22,7 +22,7 @@ #define KEXEC_CONTROL_MEMORY_LIMIT TASK_SIZE #endif -#define KEXEC_CONTROL_CODE_SIZE 4096 +#define KEXEC_CONTROL_PAGE_SIZE 4096 /* The native architecture */ #ifdef __powerpc64__ diff --git a/arch/powerpc/kernel/machine_kexec_32.c b/arch/powerpc/kernel/machine_kexec_32.c index cbaa34196797..ae63a964b858 100644 --- a/arch/powerpc/kernel/machine_kexec_32.c +++ b/arch/powerpc/kernel/machine_kexec_32.c @@ -51,7 +51,7 @@ void default_machine_kexec(struct kimage *image) relocate_new_kernel_size); flush_icache_range(reboot_code_buffer, - reboot_code_buffer + KEXEC_CONTROL_CODE_SIZE); + reboot_code_buffer + KEXEC_CONTROL_PAGE_SIZE); printk(KERN_INFO "Bye!\n"); /* now call it */ diff --git a/arch/s390/include/asm/kexec.h b/arch/s390/include/asm/kexec.h index f219c6411e0b..bb729b84a21e 100644 --- a/arch/s390/include/asm/kexec.h +++ b/arch/s390/include/asm/kexec.h @@ -31,7 +31,7 @@ #define KEXEC_CONTROL_MEMORY_LIMIT (1UL<<31) /* Allocate one page for the pdp and the second for the code */ -#define KEXEC_CONTROL_CODE_SIZE 4096 +#define KEXEC_CONTROL_PAGE_SIZE 4096 /* The native architecture */ #define KEXEC_ARCH KEXEC_ARCH_S390 diff --git a/arch/sh/include/asm/kexec.h b/arch/sh/include/asm/kexec.h index 00f4260ef09b..765a5e1660fc 100644 --- a/arch/sh/include/asm/kexec.h +++ b/arch/sh/include/asm/kexec.h @@ -21,7 +21,7 @@ /* Maximum address we can use for the control code buffer */ #define KEXEC_CONTROL_MEMORY_LIMIT TASK_SIZE -#define KEXEC_CONTROL_CODE_SIZE 4096 +#define KEXEC_CONTROL_PAGE_SIZE 4096 /* The native architecture */ #define KEXEC_ARCH KEXEC_ARCH_SH diff --git a/arch/x86/kernel/machine_kexec_32.c b/arch/x86/kernel/machine_kexec_32.c index 9fe478d98406..0732adba05ca 100644 --- a/arch/x86/kernel/machine_kexec_32.c +++ b/arch/x86/kernel/machine_kexec_32.c @@ -12,6 +12,7 @@ #include <linux/init.h> #include <linux/numa.h> #include <linux/ftrace.h> +#include <linux/suspend.h> #include <asm/pgtable.h> #include <asm/pgalloc.h> @@ -78,7 +79,7 @@ static void load_segments(void) /* * A architecture hook called to validate the * proposed image and prepare the control pages - * as needed. The pages for KEXEC_CONTROL_CODE_SIZE + * as needed. The pages for KEXEC_CONTROL_PAGE_SIZE * have been allocated, but the segments have yet * been copied into the kernel. * @@ -113,6 +114,7 @@ void machine_kexec(struct kimage *image) { unsigned long page_list[PAGES_NR]; void *control_page; + int save_ftrace_enabled; asmlinkage unsigned long (*relocate_kernel_ptr)(unsigned long indirection_page, unsigned long control_page, @@ -120,7 +122,12 @@ void machine_kexec(struct kimage *image) unsigned int has_pae, unsigned int preserve_context); - tracer_disable(); +#ifdef CONFIG_KEXEC_JUMP + if (kexec_image->preserve_context) + save_processor_state(); +#endif + + save_ftrace_enabled = __ftrace_enabled_save(); /* Interrupts aren't acceptable while we reboot */ local_irq_disable(); @@ -138,7 +145,7 @@ void machine_kexec(struct kimage *image) } control_page = page_address(image->control_code_page); - memcpy(control_page, relocate_kernel, PAGE_SIZE/2); + memcpy(control_page, relocate_kernel, KEXEC_CONTROL_CODE_MAX_SIZE); relocate_kernel_ptr = control_page; page_list[PA_CONTROL_PAGE] = __pa(control_page); @@ -178,6 +185,13 @@ void machine_kexec(struct kimage *image) (unsigned long)page_list, image->start, cpu_has_pae, image->preserve_context); + +#ifdef CONFIG_KEXEC_JUMP + if (kexec_image->preserve_context) + restore_processor_state(); +#endif + + __ftrace_enabled_restore(save_ftrace_enabled); } void arch_crash_save_vmcoreinfo(void) diff --git a/arch/x86/kernel/relocate_kernel_32.S b/arch/x86/kernel/relocate_kernel_32.S index 703310a99023..6f50664b2ba5 100644 --- a/arch/x86/kernel/relocate_kernel_32.S +++ b/arch/x86/kernel/relocate_kernel_32.S @@ -20,10 +20,11 @@ #define PAGE_ATTR (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | _PAGE_DIRTY) #define PAE_PGD_ATTR (_PAGE_PRESENT) -/* control_page + PAGE_SIZE/2 ~ control_page + PAGE_SIZE * 3/4 are - * used to save some data for jumping back +/* control_page + KEXEC_CONTROL_CODE_MAX_SIZE + * ~ control_page + PAGE_SIZE are used as data storage and stack for + * jumping back */ -#define DATA(offset) (PAGE_SIZE/2+(offset)) +#define DATA(offset) (KEXEC_CONTROL_CODE_MAX_SIZE+(offset)) /* Minimal CPU state */ #define ESP DATA(0x0) @@ -376,3 +377,6 @@ swap_pages: popl %ebx popl %ebp ret + + .globl kexec_control_code_size +.set kexec_control_code_size, . - relocate_kernel diff --git a/arch/x86/kernel/vmlinux_32.lds.S b/arch/x86/kernel/vmlinux_32.lds.S index cdb2363697d2..af5bdad84604 100644 --- a/arch/x86/kernel/vmlinux_32.lds.S +++ b/arch/x86/kernel/vmlinux_32.lds.S @@ -209,3 +209,11 @@ SECTIONS DWARF_DEBUG } + +#ifdef CONFIG_KEXEC +/* Link time checks */ +#include <asm/kexec.h> + +ASSERT(kexec_control_code_size <= KEXEC_CONTROL_CODE_MAX_SIZE, + "kexec control code size is too big") +#endif diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig index bf4ebfb86fa5..d402e8d813ce 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig @@ -77,6 +77,22 @@ config SENSORS_AD7418 This driver can also be built as a module. If so, the module will be called ad7418. +config SENSORS_ADCXX + tristate "National Semiconductor ADCxxxSxxx" + depends on SPI_MASTER && EXPERIMENTAL + help + If you say yes here you get support for the National Semiconductor + ADC<bb><c>S<sss> chip family, where + * bb is the resolution in number of bits (8, 10, 12) + * c is the number of channels (1, 2, 4, 8) + * sss is the maximum conversion speed (021 for 200 kSPS, 051 for 500 + kSPS and 101 for 1 MSPS) + + Examples : ADC081S101, ADC124S501, ... + + This driver can also be built as a module. If so, the module + will be called adcxx. + config SENSORS_ADM1021 tristate "Analog Devices ADM1021 and compatibles" depends on I2C diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile index 7943e5cefb06..950134ab8426 100644 --- a/drivers/hwmon/Makefile +++ b/drivers/hwmon/Makefile @@ -17,6 +17,7 @@ obj-$(CONFIG_SENSORS_ABITUGURU) += abituguru.o obj-$(CONFIG_SENSORS_ABITUGURU3)+= abituguru3.o obj-$(CONFIG_SENSORS_AD7414) += ad7414.o obj-$(CONFIG_SENSORS_AD7418) += ad7418.o +obj-$(CONFIG_SENSORS_ADCXX) += adcxx.o obj-$(CONFIG_SENSORS_ADM1021) += adm1021.o obj-$(CONFIG_SENSORS_ADM1025) += adm1025.o obj-$(CONFIG_SENSORS_ADM1026) += adm1026.o diff --git a/drivers/hwmon/abituguru3.c b/drivers/hwmon/abituguru3.c index f00f497b9ca9..d568c65c1370 100644 --- a/drivers/hwmon/abituguru3.c +++ b/drivers/hwmon/abituguru3.c @@ -1,5 +1,8 @@ /* - abituguru3.c Copyright (c) 2006 Hans de Goede <j.w.r.degoede@hhs.nl> + abituguru3.c + + Copyright (c) 2006-2008 Hans de Goede <j.w.r.degoede@hhs.nl> + Copyright (c) 2008 Alistair John Strachan <alistair@devzero.co.uk> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -116,7 +119,7 @@ struct abituguru3_sensor_info { struct abituguru3_motherboard_info { u16 id; - const char *name; + const char *dmi_name; /* + 1 -> end of sensors indicated by a sensor with name == NULL */ struct abituguru3_sensor_info sensors[ABIT_UGURU3_MAX_NO_SENSORS + 1]; }; @@ -161,7 +164,7 @@ struct abituguru3_data { /* Constants */ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { - { 0x000C, "unknown", { + { 0x000C, NULL /* Unknown, need DMI string */, { { "CPU Core", 0, 0, 10, 1, 0 }, { "DDR", 1, 0, 10, 1, 0 }, { "DDR VTT", 2, 0, 10, 1, 0 }, @@ -183,7 +186,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { { "AUX1 Fan", 35, 2, 60, 1, 0 }, { NULL, 0, 0, 0, 0, 0 } } }, - { 0x000D, "Abit AW8", { + { 0x000D, NULL /* Abit AW8, need DMI string */, { { "CPU Core", 0, 0, 10, 1, 0 }, { "DDR", 1, 0, 10, 1, 0 }, { "DDR VTT", 2, 0, 10, 1, 0 }, @@ -212,7 +215,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { { "AUX5 Fan", 39, 2, 60, 1, 0 }, { NULL, 0, 0, 0, 0, 0 } } }, - { 0x000E, "AL-8", { + { 0x000E, NULL /* AL-8, need DMI string */, { { "CPU Core", 0, 0, 10, 1, 0 }, { "DDR", 1, 0, 10, 1, 0 }, { "DDR VTT", 2, 0, 10, 1, 0 }, @@ -233,7 +236,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { { "SYS Fan", 34, 2, 60, 1, 0 }, { NULL, 0, 0, 0, 0, 0 } } }, - { 0x000F, "unknown", { + { 0x000F, NULL /* Unknown, need DMI string */, { { "CPU Core", 0, 0, 10, 1, 0 }, { "DDR", 1, 0, 10, 1, 0 }, { "DDR VTT", 2, 0, 10, 1, 0 }, @@ -254,7 +257,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { { "SYS Fan", 34, 2, 60, 1, 0 }, { NULL, 0, 0, 0, 0, 0 } } }, - { 0x0010, "Abit NI8 SLI GR", { + { 0x0010, NULL /* Abit NI8 SLI GR, need DMI string */, { { "CPU Core", 0, 0, 10, 1, 0 }, { "DDR", 1, 0, 10, 1, 0 }, { "DDR VTT", 2, 0, 10, 1, 0 }, @@ -276,7 +279,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { { "OTES1 Fan", 36, 2, 60, 1, 0 }, { NULL, 0, 0, 0, 0, 0 } } }, - { 0x0011, "Abit AT8 32X", { + { 0x0011, NULL /* Abit AT8 32X, need DMI string */, { { "CPU Core", 0, 0, 10, 1, 0 }, { "DDR", 1, 0, 20, 1, 0 }, { "DDR VTT", 2, 0, 10, 1, 0 }, @@ -302,7 +305,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { { "AUX2 Fan", 36, 2, 60, 1, 0 }, { NULL, 0, 0, 0, 0, 0 } } }, - { 0x0012, "Abit AN8 32X", { + { 0x0012, NULL /* Abit AN8 32X, need DMI string */, { { "CPU Core", 0, 0, 10, 1, 0 }, { "DDR", 1, 0, 20, 1, 0 }, { "DDR VTT", 2, 0, 10, 1, 0 }, @@ -324,7 +327,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { { "AUX1 Fan", 36, 2, 60, 1, 0 }, { NULL, 0, 0, 0, 0, 0 } } }, - { 0x0013, "Abit AW8D", { + { 0x0013, NULL /* Abit AW8D, need DMI string */, { { "CPU Core", 0, 0, 10, 1, 0 }, { "DDR", 1, 0, 10, 1, 0 }, { "DDR VTT", 2, 0, 10, 1, 0 }, @@ -353,7 +356,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { { "AUX5 Fan", 39, 2, 60, 1, 0 }, { NULL, 0, 0, 0, 0, 0 } } }, - { 0x0014, "Abit AB9 Pro", { + { 0x0014, NULL /* Abit AB9 Pro, need DMI string */, { { "CPU Core", 0, 0, 10, 1, 0 }, { "DDR", 1, 0, 10, 1, 0 }, { "DDR VTT", 2, 0, 10, 1, 0 }, @@ -374,7 +377,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { { "SYS Fan", 34, 2, 60, 1, 0 }, { NULL, 0, 0, 0, 0, 0 } } }, - { 0x0015, "unknown", { + { 0x0015, NULL /* Unknown, need DMI string */, { { "CPU Core", 0, 0, 10, 1, 0 }, { "DDR", 1, 0, 20, 1, 0 }, { "DDR VTT", 2, 0, 10, 1, 0 }, @@ -398,7 +401,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { { "AUX3 Fan", 36, 2, 60, 1, 0 }, { NULL, 0, 0, 0, 0, 0 } } }, - { 0x0016, "AW9D-MAX", { + { 0x0016, NULL /* AW9D-MAX, need DMI string */, { { "CPU Core", 0, 0, 10, 1, 0 }, { "DDR2", 1, 0, 20, 1, 0 }, { "DDR2 VTT", 2, 0, 10, 1, 0 }, @@ -426,7 +429,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { { "OTES1 Fan", 38, 2, 60, 1, 0 }, { NULL, 0, 0, 0, 0, 0 } } }, - { 0x0017, "unknown", { + { 0x0017, NULL /* Unknown, need DMI string */, { { "CPU Core", 0, 0, 10, 1, 0 }, { "DDR2", 1, 0, 20, 1, 0 }, { "DDR2 VTT", 2, 0, 10, 1, 0 }, @@ -451,7 +454,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { { "AUX3 FAN", 37, 2, 60, 1, 0 }, { NULL, 0, 0, 0, 0, 0 } } }, - { 0x0018, "unknown", { + { 0x0018, NULL /* Unknown, need DMI string */, { { "CPU Core", 0, 0, 10, 1, 0 }, { "DDR2", 1, 0, 20, 1, 0 }, { "DDR2 VTT", 2, 0, 10, 1, 0 }, @@ -478,7 +481,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { { "AUX3 Fan", 36, 2, 60, 1, 0 }, { NULL, 0, 0, 0, 0, 0 } } }, - { 0x0019, "unknown", { + { 0x0019, NULL /* Unknown, need DMI string */, { { "CPU Core", 7, 0, 10, 1, 0 }, { "DDR2", 13, 0, 20, 1, 0 }, { "DDR2 VTT", 14, 0, 10, 1, 0 }, @@ -505,7 +508,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { { "AUX3 FAN", 36, 2, 60, 1, 0 }, { NULL, 0, 0, 0, 0, 0 } } }, - { 0x001A, "Abit IP35 Pro", { + { 0x001A, "IP35 Pro(Intel P35-ICH9R)", { { "CPU Core", 0, 0, 10, 1, 0 }, { "DDR2", 1, 0, 20, 1, 0 }, { "DDR2 VTT", 2, 0, 10, 1, 0 }, @@ -533,7 +536,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { { "AUX4 Fan", 37, 2, 60, 1, 0 }, { NULL, 0, 0, 0, 0, 0 } } }, - { 0x001B, "unknown", { + { 0x001B, NULL /* Unknown, need DMI string */, { { "CPU Core", 0, 0, 10, 1, 0 }, { "DDR3", 1, 0, 20, 1, 0 }, { "DDR3 VTT", 2, 0, 10, 1, 0 }, @@ -560,7 +563,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { { "AUX3 Fan", 36, 2, 60, 1, 0 }, { NULL, 0, 0, 0, 0, 0 } } }, - { 0x001C, "unknown", { + { 0x001C, NULL /* Unknown, need DMI string */, { { "CPU Core", 0, 0, 10, 1, 0 }, { "DDR2", 1, 0, 20, 1, 0 }, { "DDR2 VTT", 2, 0, 10, 1, 0 }, @@ -935,9 +938,18 @@ static int __devinit abituguru3_probe(struct platform_device *pdev) goto abituguru3_probe_error; } data->sensors = abituguru3_motherboards[i].sensors; + printk(KERN_INFO ABIT_UGURU3_NAME ": found Abit uGuru3, motherboard " - "ID: %04X (%s)\n", (unsigned int)id, - abituguru3_motherboards[i].name); + "ID: %04X\n", (unsigned int)id); + +#ifdef CONFIG_DMI + if (!abituguru3_motherboards[i].dmi_name) { + printk(KERN_WARNING ABIT_UGURU3_NAME ": this motherboard was " + "not detected using DMI. Please send the output of " + "\"dmidecode\" to the abituguru3 maintainer" + "(see MAINTAINERS)\n"); + } +#endif /* Fill the sysfs attr array */ sysfs_attr_i = 0; @@ -1109,6 +1121,46 @@ static struct platform_driver abituguru3_driver = { .resume = abituguru3_resume }; +#ifdef CONFIG_DMI + +static int __init abituguru3_dmi_detect(void) +{ + const char *board_vendor, *board_name; + int i, err = (force) ? 1 : -ENODEV; + + board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR); + if (!board_vendor || strcmp(board_vendor, "http://www.abit.com.tw/")) + return err; + + board_name = dmi_get_system_info(DMI_BOARD_NAME); + if (!board_name) + return err; + + for (i = 0; abituguru3_motherboards[i].id; i++) { + const char *dmi_name = abituguru3_motherboards[i].dmi_name; + if (dmi_name && !strcmp(dmi_name, board_name)) + break; + } + + if (!abituguru3_motherboards[i].id) + return 1; + + return 0; +} + +#else /* !CONFIG_DMI */ + +static inline int abituguru3_dmi_detect(void) +{ + return -ENODEV; +} + +#endif /* CONFIG_DMI */ + +/* FIXME: Manual detection should die eventually; we need to collect stable + * DMI model names first before we can rely entirely on CONFIG_DMI. + */ + static int __init abituguru3_detect(void) { /* See if there is an uguru3 there. An idle uGuru3 will hold 0x00 or @@ -1119,7 +1171,7 @@ static int __init abituguru3_detect(void) if (((data_val == 0x00) || (data_val == 0x08)) && ((cmd_val == 0xAC) || (cmd_val == 0x05) || (cmd_val == 0x55))) - return ABIT_UGURU3_BASE; + return 0; ABIT_UGURU3_DEBUG("no Abit uGuru3 found, data = 0x%02X, cmd = " "0x%02X\n", (unsigned int)data_val, (unsigned int)cmd_val); @@ -1127,7 +1179,7 @@ static int __init abituguru3_detect(void) if (force) { printk(KERN_INFO ABIT_UGURU3_NAME ": Assuming Abit uGuru3 is " "present because of \"force\" parameter\n"); - return ABIT_UGURU3_BASE; + return 0; } /* No uGuru3 found */ @@ -1138,27 +1190,29 @@ static struct platform_device *abituguru3_pdev; static int __init abituguru3_init(void) { - int address, err; struct resource res = { .flags = IORESOURCE_IO }; - -#ifdef CONFIG_DMI - const char *board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR); - - /* safety check, refuse to load on non Abit motherboards */ - if (!force && (!board_vendor || - strcmp(board_vendor, "http://www.abit.com.tw/"))) - return -ENODEV; -#endif - - address = abituguru3_detect(); - if (address < 0) - return address; + int err; + + /* Attempt DMI detection first */ + err = abituguru3_dmi_detect(); + if (err < 0) + return err; + + /* Fall back to manual detection if there was no exact + * board name match, or force was specified. + */ + if (err > 0) { + err = abituguru3_detect(); + if (err) + return err; + } err = platform_driver_register(&abituguru3_driver); if (err) goto exit; - abituguru3_pdev = platform_device_alloc(ABIT_UGURU3_NAME, address); + abituguru3_pdev = platform_device_alloc(ABIT_UGURU3_NAME, + ABIT_UGURU3_BASE); if (!abituguru3_pdev) { printk(KERN_ERR ABIT_UGURU3_NAME ": Device allocation failed\n"); @@ -1166,8 +1220,8 @@ static int __init abituguru3_init(void) goto exit_driver_unregister; } - res.start = address; - res.end = address + ABIT_UGURU3_REGION_LENGTH - 1; + res.start = ABIT_UGURU3_BASE; + res.end = ABIT_UGURU3_BASE + ABIT_UGURU3_REGION_LENGTH - 1; res.name = ABIT_UGURU3_NAME; err = platform_device_add_resources(abituguru3_pdev, &res, 1); diff --git a/drivers/hwmon/adcxx.c b/drivers/hwmon/adcxx.c new file mode 100644 index 000000000000..242294db3db6 --- /dev/null +++ b/drivers/hwmon/adcxx.c @@ -0,0 +1,329 @@ +/* + * adcxx.c + * + * The adcxx4s is an AD converter family from National Semiconductor (NS). + * + * Copyright (c) 2008 Marc Pignat <marc.pignat@hevs.ch> + * + * The adcxx4s communicates with a host processor via an SPI/Microwire Bus + * interface. This driver supports the whole family of devices with name + * ADC<bb><c>S<sss>, where + * * bb is the resolution in number of bits (8, 10, 12) + * * c is the number of channels (1, 2, 4, 8) + * * sss is the maximum conversion speed (021 for 200 kSPS, 051 for 500 kSPS + * and 101 for 1 MSPS) + * + * Complete datasheets are available at National's website here: + * http://www.national.com/ds/DC/ADC<bb><c>S<sss>.pdf + * + * Handling of 8, 10 and 12 bits converters are the same, the + * unavailable bits are 0 :) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include <linux/init.h> +#include <linux/module.h> +#include <linux/kernel.h> +#include <linux/device.h> +#include <linux/err.h> +#include <linux/sysfs.h> +#include <linux/hwmon.h> +#include <linux/hwmon-sysfs.h> +#include <linux/mutex.h> +#include <linux/spi/spi.h> + +#define DRVNAME "adcxx" + +struct adcxx { + struct device *hwmon_dev; + struct mutex lock; + u32 channels; + u32 reference; /* in millivolts */ +}; + +/* sysfs hook function */ +static ssize_t adcxx_read(struct device *dev, + struct device_attribute *devattr, char *buf) +{ + struct spi_device *spi = to_spi_device(dev); + struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); + struct adcxx *adc = dev_get_drvdata(&spi->dev); + u8 tx_buf[2] = { attr->index << 3 }; /* other bits are don't care */ + u8 rx_buf[2]; + int status; + int value; + + if (mutex_lock_interruptible(&adc->lock)) + return -ERESTARTSYS; + + status = spi_write_then_read(spi, tx_buf, sizeof(tx_buf), + rx_buf, sizeof(rx_buf)); + if (status < 0) { + dev_warn(dev, "spi_write_then_read failed with status %d\n", + status); + goto out; + } + + value = (rx_buf[0] << 8) + rx_buf[1]; + dev_dbg(dev, "raw value = 0x%x\n", value); + + value = value * adc->reference >> 12; + status = sprintf(buf, "%d\n", value); +out: + mutex_unlock(&adc->lock); + return status; +} + +static ssize_t adcxx_show_min(struct device *dev, + struct device_attribute *devattr, char *buf) +{ + /* The minimum reference is 0 for this chip family */ + return sprintf(buf, "0\n"); +} + +static ssize_t adcxx_show_max(struct device *dev, + struct device_attribute *devattr, char *buf) +{ + struct spi_device *spi = to_spi_device(dev); + struct adcxx *adc = dev_get_drvdata(&spi->dev); + u32 reference; + + if (mutex_lock_interruptible(&adc->lock)) + return -ERESTARTSYS; + + reference = adc->reference; + + mutex_unlock(&adc->lock); + + return sprintf(buf, "%d\n", reference); +} + +static ssize_t adcxx_set_max(struct device *dev, + struct device_attribute *devattr, const char *buf, size_t count) +{ + struct spi_device *spi = to_spi_device(dev); + struct adcxx *adc = dev_get_drvdata(&spi->dev); + unsigned long value; + + if (strict_strtoul(buf, 10, &value)) + return -EINVAL; + + if (mutex_lock_interruptible(&adc->lock)) + return -ERESTARTSYS; + + adc->reference = value; + + mutex_unlock(&adc->lock); + + return count; +} + +static ssize_t adcxx_show_name(struct device *dev, struct device_attribute + *devattr, char *buf) +{ + struct spi_device *spi = to_spi_device(dev); + struct adcxx *adc = dev_get_drvdata(&spi->dev); + + return sprintf(buf, "adcxx%ds\n", adc->channels); +} + +static struct sensor_device_attribute ad_input[] = { + SENSOR_ATTR(name, S_IRUGO, adcxx_show_name, NULL, 0), + SENSOR_ATTR(in_min, S_IRUGO, adcxx_show_min, NULL, 0), + SENSOR_ATTR(in_max, S_IWUSR | S_IRUGO, adcxx_show_max, + adcxx_set_max, 0), + SENSOR_ATTR(in0_input, S_IRUGO, adcxx_read, NULL, 0), + SENSOR_ATTR(in1_input, S_IRUGO, adcxx_read, NULL, 1), + SENSOR_ATTR(in2_input, S_IRUGO, adcxx_read, NULL, 2), + SENSOR_ATTR(in3_input, S_IRUGO, adcxx_read, NULL, 3), + SENSOR_ATTR(in4_input, S_IRUGO, adcxx_read, NULL, 4), + SENSOR_ATTR(in5_input, S_IRUGO, adcxx_read, NULL, 5), + SENSOR_ATTR(in6_input, S_IRUGO, adcxx_read, NULL, 6), + SENSOR_ATTR(in7_input, S_IRUGO, adcxx_read, NULL, 7), +}; + +/*----------------------------------------------------------------------*/ + +static int __devinit adcxx_probe(struct spi_device *spi, int channels) +{ + struct adcxx *adc; + int status; + int i; + + adc = kzalloc(sizeof *adc, GFP_KERNEL); + if (!adc) + return -ENOMEM; + + /* set a default value for the reference */ + adc->reference = 3300; + adc->channels = channels; + mutex_init(&adc->lock); + + mutex_lock(&adc->lock); + + dev_set_drvdata(&spi->dev, adc); + + for (i = 0; i < 3 + adc->channels; i++) { + status = device_create_file(&spi->dev, &ad_input[i].dev_attr); + if (status) { + dev_err(&spi->dev, "device_create_file failed.\n"); + goto out_err; + } + } + + adc->hwmon_dev = hwmon_device_register(&spi->dev); + if (IS_ERR(adc->hwmon_dev)) { + dev_err(&spi->dev, "hwmon_device_register failed.\n"); + status = PTR_ERR(adc->hwmon_dev); + goto out_err; + } + + mutex_unlock(&adc->lock); + return 0; + +out_err: + for (i--; i >= 0; i--) + device_remove_file(&spi->dev, &ad_input[i].dev_attr); + + dev_set_drvdata(&spi->dev, NULL); + mutex_unlock(&adc->lock); + kfree(adc); + return status; +} + +static int __devinit adcxx1s_probe(struct spi_device *spi) +{ + return adcxx_probe(spi, 1); +} + +static int __devinit adcxx2s_probe(struct spi_device *spi) +{ + return adcxx_probe(spi, 2); +} + +static int __devinit adcxx4s_probe(struct spi_device *spi) +{ + return adcxx_probe(spi, 4); +} + +static int __devinit adcxx8s_probe(struct spi_device *spi) +{ + return adcxx_probe(spi, 8); +} + +static int __devexit adcxx_remove(struct spi_device *spi) +{ + struct adcxx *adc = dev_get_drvdata(&spi->dev); + int i; + + mutex_lock(&adc->lock); + hwmon_device_unregister(adc->hwmon_dev); + for (i = 0; i < 3 + adc->channels; i++) + device_remove_file(&spi->dev, &ad_input[i].dev_attr); + + dev_set_drvdata(&spi->dev, NULL); + mutex_unlock(&adc->lock); + kfree(adc); + + return 0; +} + +static struct spi_driver adcxx1s_driver = { + .driver = { + .name = "adcxx1s", + .owner = THIS_MODULE, + }, + .probe = adcxx1s_probe, + .remove = __devexit_p(adcxx_remove), +}; + +static struct spi_driver adcxx2s_driver = { + .driver = { + .name = "adcxx2s", + .owner = THIS_MODULE, + }, + .probe = adcxx2s_probe, + .remove = __devexit_p(adcxx_remove), +}; + +static struct spi_driver adcxx4s_driver = { + .driver = { + .name = "adcxx4s", + .owner = THIS_MODULE, + }, + .probe = adcxx4s_probe, + .remove = __devexit_p(adcxx_remove), +}; + +static struct spi_driver adcxx8s_driver = { + .driver = { + .name = "adcxx8s", + .owner = THIS_MODULE, + }, + .probe = adcxx8s_probe, + .remove = __devexit_p(adcxx_remove), +}; + +static int __init init_adcxx(void) +{ + int status; + status = spi_register_driver(&adcxx1s_driver); + if (status) + goto reg_1_failed; + + status = spi_register_driver(&adcxx2s_driver); + if (status) + goto reg_2_failed; + + status = spi_register_driver(&adcxx4s_driver); + if (status) + goto reg_4_failed; + + status = spi_register_driver(&adcxx8s_driver); + if (status) + goto reg_8_failed; + + return status; + +reg_8_failed: + spi_unregister_driver(&adcxx4s_driver); +reg_4_failed: + spi_unregister_driver(&adcxx2s_driver); +reg_2_failed: + spi_unregister_driver(&adcxx1s_driver); +reg_1_failed: + return status; +} + +static void __exit exit_adcxx(void) +{ + spi_unregister_driver(&adcxx1s_driver); + spi_unregister_driver(&adcxx2s_driver); + spi_unregister_driver(&adcxx4s_driver); + spi_unregister_driver(&adcxx8s_driver); +} + +module_init(init_adcxx); +module_exit(exit_adcxx); + +MODULE_AUTHOR("Marc Pignat"); +MODULE_DESCRIPTION("National Semiconductor adcxx8sxxx Linux driver"); +MODULE_LICENSE("GPL"); + +MODULE_ALIAS("adcxx1s"); +MODULE_ALIAS("adcxx2s"); +MODULE_ALIAS("adcxx4s"); +MODULE_ALIAS("adcxx8s"); diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c index aacc0c4b809c..b06b8e090a27 100644 --- a/drivers/hwmon/applesmc.c +++ b/drivers/hwmon/applesmc.c @@ -98,6 +98,12 @@ static const char* temperature_sensors_sets[][36] = { "TH1P", "TH2P", "TH3P", "TMAP", "TMAS", "TMBS", "TM0P", "TM0S", "TM1P", "TM1S", "TM2P", "TM2S", "TM3S", "TM8P", "TM8S", "TM9P", "TM9S", "TN0H", "TS0C", NULL }, +/* Set 5: iMac */ + { "TC0D", "TA0P", "TG0P", "TG0D", "TG0H", "TH0P", "Tm0P", "TO0P", + "Tp0C", NULL }, +/* Set 6: Macbook3 set */ + { "TB0T", "TC0D", "TC0P", "TM0P", "TN0P", "TTF0", "TW0P", "Th0H", + "Th0S", "Th1H", NULL }, }; /* List of keys used to read/write fan speeds */ @@ -1223,6 +1229,10 @@ static __initdata struct dmi_match_data applesmc_dmi_data[] = { { .accelerometer = 0, .light = 0, .temperature_set = 3 }, /* MacPro: temperature set 4 */ { .accelerometer = 0, .light = 0, .temperature_set = 4 }, +/* iMac: temperature set 5 */ + { .accelerometer = 0, .light = 0, .temperature_set = 5 }, +/* MacBook3: accelerometer and temperature set 6 */ + { .accelerometer = 1, .light = 0, .temperature_set = 6 }, }; /* Note that DMI_MATCH(...,"MacBook") will match "MacBookPro1,1". @@ -1232,10 +1242,14 @@ static __initdata struct dmi_system_id applesmc_whitelist[] = { DMI_MATCH(DMI_BOARD_VENDOR,"Apple"), DMI_MATCH(DMI_PRODUCT_NAME,"MacBookPro") }, (void*)&applesmc_dmi_data[0]}, - { applesmc_dmi_match, "Apple MacBook", { + { applesmc_dmi_match, "Apple MacBook (v2)", { DMI_MATCH(DMI_BOARD_VENDOR,"Apple"), DMI_MATCH(DMI_PRODUCT_NAME,"MacBook2") }, (void*)&applesmc_dmi_data[1]}, + { applesmc_dmi_match, "Apple MacBook (v3)", { + DMI_MATCH(DMI_BOARD_VENDOR,"Apple"), + DMI_MATCH(DMI_PRODUCT_NAME,"MacBook3") }, + (void*)&applesmc_dmi_data[6]}, { applesmc_dmi_match, "Apple MacBook", { DMI_MATCH(DMI_BOARD_VENDOR,"Apple"), DMI_MATCH(DMI_PRODUCT_NAME,"MacBook") }, @@ -1248,6 +1262,10 @@ static __initdata struct dmi_system_id applesmc_whitelist[] = { DMI_MATCH(DMI_BOARD_VENDOR,"Apple"), DMI_MATCH(DMI_PRODUCT_NAME,"MacPro2") }, (void*)&applesmc_dmi_data[4]}, + { applesmc_dmi_match, "Apple iMac", { + DMI_MATCH(DMI_BOARD_VENDOR,"Apple"), + DMI_MATCH(DMI_PRODUCT_NAME,"iMac") }, + (void*)&applesmc_dmi_data[5]}, { .ident = NULL } }; diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index 70239acecc8e..93c17223b527 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c @@ -413,10 +413,11 @@ static int __init coretemp_init(void) for_each_online_cpu(i) { struct cpuinfo_x86 *c = &cpu_data(i); - /* check if family 6, models 0xe, 0xf, 0x16, 0x17 */ + /* check if family 6, models 0xe, 0xf, 0x16, 0x17, 0x1A */ if ((c->cpuid_level < 0) || (c->x86 != 0x6) || !((c->x86_model == 0xe) || (c->x86_model == 0xf) || - (c->x86_model == 0x16) || (c->x86_model == 0x17))) { + (c->x86_model == 0x16) || (c->x86_model == 0x17) || + (c->x86_model == 0x1A))) { /* supported CPU not found, but report the unknown family 6 CPU */ diff --git a/drivers/hwmon/i5k_amb.c b/drivers/hwmon/i5k_amb.c index f9e2ed621f7b..2ede9388096b 100644 --- a/drivers/hwmon/i5k_amb.c +++ b/drivers/hwmon/i5k_amb.c @@ -81,6 +81,8 @@ static unsigned long amb_reg_temp(unsigned int amb) #define MAX_AMBS_PER_CHANNEL 16 #define MAX_AMBS (MAX_MEM_CHANNELS * \ MAX_AMBS_PER_CHANNEL) +#define CHANNEL_SHIFT 4 +#define DIMM_MASK 0xF /* * Ugly hack: For some reason the highest bit is set if there * are _any_ DIMMs in the channel. Attempting to read from @@ -89,7 +91,7 @@ static unsigned long amb_reg_temp(unsigned int amb) * might prevent us from seeing the 16th DIMM in the channel. */ #define REAL_MAX_AMBS_PER_CHANNEL 15 -#define KNOBS_PER_AMB 5 +#define KNOBS_PER_AMB 6 static unsigned long amb_num_from_reg(unsigned int byte_num, unsigned int bit) { @@ -238,6 +240,16 @@ static ssize_t show_amb_temp(struct device *dev, 500 * amb_read_byte(data, amb_reg_temp(attr->index))); } +static ssize_t show_label(struct device *dev, + struct device_attribute *devattr, + char *buf) +{ + struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); + + return sprintf(buf, "Ch. %d DIMM %d\n", attr->index >> CHANNEL_SHIFT, + attr->index & DIMM_MASK); +} + static int __devinit i5k_amb_hwmon_init(struct platform_device *pdev) { int i, j, k, d = 0; @@ -268,6 +280,20 @@ static int __devinit i5k_amb_hwmon_init(struct platform_device *pdev) continue; d++; + /* sysfs label */ + iattr = data->attrs + data->num_attrs; + snprintf(iattr->name, AMB_SYSFS_NAME_LEN, + "temp%d_label", d); + iattr->s_attr.dev_attr.attr.name = iattr->name; + iattr->s_attr.dev_attr.attr.mode = S_IRUGO; + iattr->s_attr.dev_attr.show = show_label; + iattr->s_attr.index = k; + res = device_create_file(&pdev->dev, + &iattr->s_attr.dev_attr); + if (res) + goto exit_remove; + data->num_attrs++; + /* Temperature sysfs knob */ iattr = data->attrs + data->num_attrs; snprintf(iattr->name, AMB_SYSFS_NAME_LEN, diff --git a/drivers/hwmon/ibmaem.c b/drivers/hwmon/ibmaem.c index c9416e657487..0f70dc204105 100644 --- a/drivers/hwmon/ibmaem.c +++ b/drivers/hwmon/ibmaem.c @@ -1,6 +1,6 @@ /* - * A hwmon driver for the IBM Active Energy Manager temperature/power sensors - * and capping functionality. + * A hwmon driver for the IBM System Director Active Energy Manager (AEM) + * temperature/power/energy sensors and capping functionality. * Copyright (C) 2008 IBM * * Author: Darrick J. Wong <djwong@us.ibm.com> @@ -463,12 +463,18 @@ static int aem_read_sensor(struct aem_data *data, u8 elt, u8 reg, } /* Update AEM energy registers */ +static void update_aem_energy_one(struct aem_data *data, int which) +{ + aem_read_sensor(data, AEM_ENERGY_ELEMENT, which, + &data->energy[which], 8); +} + static void update_aem_energy(struct aem_data *data) { - aem_read_sensor(data, AEM_ENERGY_ELEMENT, 0, &data->energy[0], 8); + update_aem_energy_one(data, 0); if (data->ver_major < 2) return; - aem_read_sensor(data, AEM_ENERGY_ELEMENT, 1, &data->energy[1], 8); + update_aem_energy_one(data, 1); } /* Update all AEM1 sensors */ @@ -676,7 +682,8 @@ static int aem_find_aem2(struct aem_ipmi_data *data, return -ETIMEDOUT; if (data->rx_result || data->rx_msg_len != sizeof(*fi_resp) || - memcmp(&fi_resp->id, &system_x_id, sizeof(system_x_id))) + memcmp(&fi_resp->id, &system_x_id, sizeof(system_x_id)) || + fi_resp->num_instances <= instance_num) return -ENOENT; return 0; @@ -849,7 +856,7 @@ static ssize_t aem_show_power(struct device *dev, struct timespec b, a; mutex_lock(&data->lock); - update_aem_energy(data); + update_aem_energy_one(data, attr->index); getnstimeofday(&b); before = data->energy[attr->index]; @@ -861,7 +868,7 @@ static ssize_t aem_show_power(struct device *dev, return 0; } - update_aem_energy(data); + update_aem_energy_one(data, attr->index); getnstimeofday(&a); after = data->energy[attr->index]; mutex_unlock(&data->lock); @@ -880,7 +887,9 @@ static ssize_t aem_show_energy(struct device *dev, { struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); struct aem_data *a = dev_get_drvdata(dev); - a->update(a); + mutex_lock(&a->lock); + update_aem_energy_one(a, attr->index); + mutex_unlock(&a->lock); return sprintf(buf, "%llu\n", (unsigned long long)a->energy[attr->index] * 1000); @@ -1104,7 +1113,7 @@ static void __exit aem_exit(void) } MODULE_AUTHOR("Darrick J. Wong <djwong@us.ibm.com>"); -MODULE_DESCRIPTION("IBM Active Energy Manager power/temp sensor driver"); +MODULE_DESCRIPTION("IBM AEM power/temp/energy sensor driver"); MODULE_LICENSE("GPL"); module_init(aem_init); diff --git a/drivers/hwmon/w83791d.c b/drivers/hwmon/w83791d.c index daa7d121483b..de21142d106c 100644 --- a/drivers/hwmon/w83791d.c +++ b/drivers/hwmon/w83791d.c @@ -1055,9 +1055,10 @@ static int w83791d_probe(struct i2c_client *client, { struct w83791d_data *data; struct device *dev = &client->dev; - int i, val1, err; + int i, err; #ifdef DEBUG + int val1; val1 = w83791d_read(client, W83791D_REG_DID_VID4); dev_dbg(dev, "Device ID version: %d.%d (0x%02x)\n", (val1 >> 5) & 0x07, (val1 >> 1) & 0x0f, val1); diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 964124b60db2..75e86865234c 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -226,10 +226,11 @@ EXPORT_SYMBOL_GPL(spi_alloc_device); * Companion function to spi_alloc_device. Devices allocated with * spi_alloc_device can be added onto the spi bus with this function. * - * Returns 0 on success; non-zero on failure + * Returns 0 on success; negative errno on failure */ int spi_add_device(struct spi_device *spi) { + static DEFINE_MUTEX(spi_add_lock); struct device *dev = spi->master->dev.parent; int status; @@ -246,26 +247,43 @@ int spi_add_device(struct spi_device *spi) "%s.%u", spi->master->dev.bus_id, spi->chip_select); - /* drivers may modify this initial i/o setup */ + + /* We need to make sure there's no other device with this + * chipselect **BEFORE** we call setup(), else we'll trash + * its configuration. Lock against concurrent add() calls. + */ + mutex_lock(&spi_add_lock); + + if (bus_find_device_by_name(&spi_bus_type, NULL, spi->dev.bus_id) + != NULL) { + dev_err(dev, "chipselect %d already in use\n", + spi->chip_select); + status = -EBUSY; + goto done; + } + + /* Drivers may modify this initial i/o setup, but will + * normally rely on the device being setup. Devices + * using SPI_CS_HIGH can't coexist well otherwise... + */ status = spi->master->setup(spi); if (status < 0) { dev_err(dev, "can't %s %s, status %d\n", "setup", spi->dev.bus_id, status); - return status; + goto done; } - /* driver core catches callers that misbehave by defining - * devices that already exist. - */ + /* Device may be bound to an active driver when this returns */ status = device_add(&spi->dev); - if (status < 0) { + if (status < 0) dev_err(dev, "can't %s %s, status %d\n", "add", spi->dev.bus_id, status); - return status; - } + else + dev_dbg(dev, "registered child %s\n", spi->dev.bus_id); - dev_dbg(dev, "registered child %s\n", spi->dev.bus_id); - return 0; +done: + mutex_unlock(&spi_add_lock); + return status; } EXPORT_SYMBOL_GPL(spi_add_device); diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index bd320a2bfb7c..fb51197d1c98 100644 --- a/drivers/video/fsl-diu-fb.c +++ b/drivers/video/fsl-diu-fb.c @@ -479,6 +479,10 @@ static void adjust_aoi_size_position(struct fb_var_screeninfo *var, base_plane_width = machine_data->fsl_diu_info[0]->var.xres; base_plane_height = machine_data->fsl_diu_info[0]->var.yres; + if (mfbi->x_aoi_d < 0) + mfbi->x_aoi_d = 0; + if (mfbi->y_aoi_d < 0) + mfbi->y_aoi_d = 0; switch (index) { case 0: if (mfbi->x_aoi_d != 0) @@ -778,6 +782,22 @@ static void unmap_video_memory(struct fb_info *info) } /* + * Using the fb_var_screeninfo in fb_info we set the aoi of this + * particular framebuffer. It is a light version of fsl_diu_set_par. + */ +static int fsl_diu_set_aoi(struct fb_info *info) +{ + struct fb_var_screeninfo *var = &info->var; + struct mfb_info *mfbi = info->par; + struct diu_ad *ad = mfbi->ad; + + /* AOI should not be greater than display size */ + ad->offset_xyi = cpu_to_le32((var->yoffset << 16) | var->xoffset); + ad->offset_xyd = cpu_to_le32((mfbi->y_aoi_d << 16) | mfbi->x_aoi_d); + return 0; +} + +/* * Using the fb_var_screeninfo in fb_info we set the resolution of this * particular framebuffer. This function alters the fb_fix_screeninfo stored * in fb_info. It does not alter var in fb_info since we are using that @@ -817,11 +837,11 @@ static int fsl_diu_set_par(struct fb_info *info) diu_ops.get_pixel_format(var->bits_per_pixel, machine_data->monitor_port); ad->addr = cpu_to_le32(info->fix.smem_start); - ad->src_size_g_alpha = cpu_to_le32((var->yres << 12) | - var->xres) | mfbi->g_alpha; - /* fix me. AOI should not be greater than display size */ + ad->src_size_g_alpha = cpu_to_le32((var->yres_virtual << 12) | + var->xres_virtual) | mfbi->g_alpha; + /* AOI should not be greater than display size */ ad->aoi_size = cpu_to_le32((var->yres << 16) | var->xres); - ad->offset_xyi = 0; + ad->offset_xyi = cpu_to_le32((var->yoffset << 16) | var->xoffset); ad->offset_xyd = cpu_to_le32((mfbi->y_aoi_d << 16) | mfbi->x_aoi_d); /* Disable chroma keying function */ @@ -921,6 +941,8 @@ static int fsl_diu_pan_display(struct fb_var_screeninfo *var, else info->var.vmode &= ~FB_VMODE_YWRAP; + fsl_diu_set_aoi(info); + return 0; } @@ -989,7 +1011,7 @@ static int fsl_diu_ioctl(struct fb_info *info, unsigned int cmd, pr_debug("set AOI display offset of index %d to (%d,%d)\n", mfbi->index, aoi_d.x_aoi_d, aoi_d.y_aoi_d); fsl_diu_check_var(&info->var, info); - fsl_diu_set_par(info); + fsl_diu_set_aoi(info); break; case MFB_GET_AOID: aoi_d.x_aoi_d = mfbi->x_aoi_d; diff --git a/fs/inode.c b/fs/inode.c index b6726f644530..0487ddba1397 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -166,6 +166,7 @@ static struct inode *alloc_inode(struct super_block *sb) mapping_set_gfp_mask(mapping, GFP_HIGHUSER_PAGECACHE); mapping->assoc_mapping = NULL; mapping->backing_dev_info = &default_backing_dev_info; + mapping->writeback_index = 0; /* * If the block_device provides a backing_dev_info for client diff --git a/fs/omfs/bitmap.c b/fs/omfs/bitmap.c index 697663b01bae..e1c0ec0ae989 100644 --- a/fs/omfs/bitmap.c +++ b/fs/omfs/bitmap.c @@ -92,7 +92,7 @@ int omfs_allocate_block(struct super_block *sb, u64 block) struct buffer_head *bh; struct omfs_sb_info *sbi = OMFS_SB(sb); int bits_per_entry = 8 * sb->s_blocksize; - int map, bit; + unsigned int map, bit; int ret = 0; u64 tmp; @@ -176,7 +176,8 @@ int omfs_clear_range(struct super_block *sb, u64 block, int count) struct omfs_sb_info *sbi = OMFS_SB(sb); int bits_per_entry = 8 * sb->s_blocksize; u64 tmp; - int map, bit, ret; + unsigned int map, bit; + int ret; tmp = block; bit = do_div(tmp, bits_per_entry); diff --git a/fs/omfs/file.c b/fs/omfs/file.c index 7e2499053e4d..834b2331f6b3 100644 --- a/fs/omfs/file.c +++ b/fs/omfs/file.c @@ -26,6 +26,13 @@ static int omfs_sync_file(struct file *file, struct dentry *dentry, return err ? -EIO : 0; } +static u32 omfs_max_extents(struct omfs_sb_info *sbi, int offset) +{ + return (sbi->s_sys_blocksize - offset - + sizeof(struct omfs_extent)) / + sizeof(struct omfs_extent_entry) + 1; +} + void omfs_make_empty_table(struct buffer_head *bh, int offset) { struct omfs_extent *oe = (struct omfs_extent *) &bh->b_data[offset]; @@ -45,6 +52,7 @@ int omfs_shrink_inode(struct inode *inode) struct buffer_head *bh; u64 next, last; u32 extent_count; + u32 max_extents; int ret; /* traverse extent table, freeing each entry that is greater @@ -62,15 +70,18 @@ int omfs_shrink_inode(struct inode *inode) goto out; oe = (struct omfs_extent *)(&bh->b_data[OMFS_EXTENT_START]); + max_extents = omfs_max_extents(sbi, OMFS_EXTENT_START); for (;;) { - if (omfs_is_bad(sbi, (struct omfs_header *) bh->b_data, next)) { - brelse(bh); - goto out; - } + if (omfs_is_bad(sbi, (struct omfs_header *) bh->b_data, next)) + goto out_brelse; extent_count = be32_to_cpu(oe->e_extent_count); + + if (extent_count > max_extents) + goto out_brelse; + last = next; next = be64_to_cpu(oe->e_next); entry = &oe->e_entry; @@ -98,10 +109,14 @@ int omfs_shrink_inode(struct inode *inode) if (!bh) goto out; oe = (struct omfs_extent *) (&bh->b_data[OMFS_EXTENT_CONT]); + max_extents = omfs_max_extents(sbi, OMFS_EXTENT_CONT); } ret = 0; out: return ret; +out_brelse: + brelse(bh); + return ret; } static void omfs_truncate(struct inode *inode) @@ -154,9 +169,7 @@ static int omfs_grow_extent(struct inode *inode, struct omfs_extent *oe, goto out; } } - max_count = (sbi->s_sys_blocksize - OMFS_EXTENT_START - - sizeof(struct omfs_extent)) / - sizeof(struct omfs_extent_entry) + 1; + max_count = omfs_max_extents(sbi, OMFS_EXTENT_START); /* TODO: add a continuation block here */ if (be32_to_cpu(oe->e_extent_count) > max_count-1) @@ -225,6 +238,7 @@ static int omfs_get_block(struct inode *inode, sector_t block, sector_t next, offset; int ret; u64 new_block; + u32 max_extents; int extent_count; struct omfs_extent *oe; struct omfs_extent_entry *entry; @@ -238,6 +252,7 @@ static int omfs_get_block(struct inode *inode, sector_t block, goto out; oe = (struct omfs_extent *)(&bh->b_data[OMFS_EXTENT_START]); + max_extents = omfs_max_extents(sbi, OMFS_EXTENT_START); next = inode->i_ino; for (;;) { @@ -249,6 +264,9 @@ static int omfs_get_block(struct inode *inode, sector_t block, next = be64_to_cpu(oe->e_next); entry = &oe->e_entry; + if (extent_count > max_extents) + goto out_brelse; + offset = find_block(inode, entry, block, extent_count, &remain); if (offset > 0) { ret = 0; @@ -266,6 +284,7 @@ static int omfs_get_block(struct inode *inode, sector_t block, if (!bh) goto out; oe = (struct omfs_extent *) (&bh->b_data[OMFS_EXTENT_CONT]); + max_extents = omfs_max_extents(sbi, OMFS_EXTENT_CONT); } if (create) { ret = omfs_grow_extent(inode, oe, &new_block); diff --git a/fs/omfs/inode.c b/fs/omfs/inode.c index a95fe5984f4b..d29047b1b9b0 100644 --- a/fs/omfs/inode.c +++ b/fs/omfs/inode.c @@ -232,8 +232,7 @@ struct inode *omfs_iget(struct super_block *sb, ino_t ino) inode->i_mode = S_IFDIR | (S_IRWXUGO & ~sbi->s_dmask); inode->i_op = &omfs_dir_inops; inode->i_fop = &omfs_dir_operations; - inode->i_size = be32_to_cpu(oi->i_head.h_body_size) + - sizeof(struct omfs_header); + inode->i_size = sbi->s_sys_blocksize; inc_nlink(inode); break; case OMFS_FILE: diff --git a/include/asm-mips/kexec.h b/include/asm-mips/kexec.h index cdbab43b7d3a..4314892aaebb 100644 --- a/include/asm-mips/kexec.h +++ b/include/asm-mips/kexec.h @@ -16,7 +16,7 @@ /* Maximum address we can use for the control code buffer */ #define KEXEC_CONTROL_MEMORY_LIMIT (0x20000000) -#define KEXEC_CONTROL_CODE_SIZE 4096 +#define KEXEC_CONTROL_PAGE_SIZE 4096 /* The native architecture */ #define KEXEC_ARCH KEXEC_ARCH_MIPS diff --git a/include/asm-x86/kexec.h b/include/asm-x86/kexec.h index c0e52a14fd4d..4246ab7dc988 100644 --- a/include/asm-x86/kexec.h +++ b/include/asm-x86/kexec.h @@ -41,6 +41,10 @@ # define PAGES_NR 17 #endif +#ifdef CONFIG_X86_32 +# define KEXEC_CONTROL_CODE_MAX_SIZE 2048 +#endif + #ifndef __ASSEMBLY__ #include <linux/string.h> @@ -63,7 +67,7 @@ /* Maximum address we can use for the control code buffer */ # define KEXEC_CONTROL_MEMORY_LIMIT TASK_SIZE -# define KEXEC_CONTROL_CODE_SIZE 4096 +# define KEXEC_CONTROL_PAGE_SIZE 4096 /* The native architecture */ # define KEXEC_ARCH KEXEC_ARCH_386 @@ -79,7 +83,7 @@ # define KEXEC_CONTROL_MEMORY_LIMIT (0xFFFFFFFFFFUL) /* Allocate one page for the pdp and the second for the code */ -# define KEXEC_CONTROL_CODE_SIZE (4096UL + 4096UL) +# define KEXEC_CONTROL_PAGE_SIZE (4096UL + 4096UL) /* The native architecture */ # define KEXEC_ARCH KEXEC_ARCH_X86_64 diff --git a/include/linux/completion.h b/include/linux/completion.h index 57faa60de9bd..02ef8835999c 100644 --- a/include/linux/completion.h +++ b/include/linux/completion.h @@ -49,6 +49,8 @@ extern unsigned long wait_for_completion_timeout(struct completion *x, unsigned long timeout); extern unsigned long wait_for_completion_interruptible_timeout( struct completion *x, unsigned long timeout); +extern bool try_wait_for_completion(struct completion *x); +extern bool completion_done(struct completion *x); extern void complete(struct completion *); extern void complete_all(struct completion *); @@ -56,48 +58,4 @@ extern void complete_all(struct completion *); #define INIT_COMPLETION(x) ((x).done = 0) -/** - * try_wait_for_completion - try to decrement a completion without blocking - * @x: completion structure - * - * Returns: 0 if a decrement cannot be done without blocking - * 1 if a decrement succeeded. - * - * If a completion is being used as a counting completion, - * attempt to decrement the counter without blocking. This - * enables us to avoid waiting if the resource the completion - * is protecting is not available. - */ -static inline bool try_wait_for_completion(struct completion *x) -{ - int ret = 1; - - spin_lock_irq(&x->wait.lock); - if (!x->done) - ret = 0; - else - x->done--; - spin_unlock_irq(&x->wait.lock); - return ret; -} - -/** - * completion_done - Test to see if a completion has any waiters - * @x: completion structure - * - * Returns: 0 if there are waiters (wait_for_completion() in progress) - * 1 if there are no waiters. - * - */ -static inline bool completion_done(struct completion *x) -{ - int ret = 1; - - spin_lock_irq(&x->wait.lock); - if (!x->done) - ret = 0; - spin_unlock_irq(&x->wait.lock); - return ret; -} - #endif diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index f368d041e02d..bb384068272e 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h @@ -98,6 +98,27 @@ static inline void tracer_disable(void) #endif } +/* Ftrace disable/restore without lock. Some synchronization mechanism + * must be used to prevent ftrace_enabled to be changed between + * disable/restore. */ +static inline int __ftrace_enabled_save(void) +{ +#ifdef CONFIG_FTRACE + int saved_ftrace_enabled = ftrace_enabled; + ftrace_enabled = 0; + return saved_ftrace_enabled; +#else + return 0; +#endif +} + +static inline void __ftrace_enabled_restore(int enabled) +{ +#ifdef CONFIG_FTRACE + ftrace_enabled = enabled; +#endif +} + #ifdef CONFIG_FRAME_POINTER /* TODO: need to fix this for ARM */ # define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0)) diff --git a/include/linux/kexec.h b/include/linux/kexec.h index 32110cede64f..17f76fc05173 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h @@ -25,8 +25,8 @@ #error KEXEC_CONTROL_MEMORY_LIMIT not defined #endif -#ifndef KEXEC_CONTROL_CODE_SIZE -#error KEXEC_CONTROL_CODE_SIZE not defined +#ifndef KEXEC_CONTROL_PAGE_SIZE +#error KEXEC_CONTROL_PAGE_SIZE not defined #endif #ifndef KEXEC_ARCH diff --git a/include/linux/reboot.h b/include/linux/reboot.h index b93b541cf111..988e55fe649b 100644 --- a/include/linux/reboot.h +++ b/include/linux/reboot.h @@ -59,6 +59,7 @@ extern void machine_crash_shutdown(struct pt_regs *); * Architecture independent implemenations of sys_reboot commands. */ +extern void kernel_restart_prepare(char *cmd); extern void kernel_restart(char *cmd); extern void kernel_halt(void); extern void kernel_power_off(void); diff --git a/include/linux/suspend.h b/include/linux/suspend.h index c63435095970..2ce8207686e2 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -217,11 +217,11 @@ struct platform_hibernation_ops { #ifdef CONFIG_HIBERNATION /* kernel/power/snapshot.c */ extern void __register_nosave_region(unsigned long b, unsigned long e, int km); -static inline void register_nosave_region(unsigned long b, unsigned long e) +static inline void __init register_nosave_region(unsigned long b, unsigned long e) { __register_nosave_region(b, e, 0); } -static inline void register_nosave_region_late(unsigned long b, unsigned long e) +static inline void __init register_nosave_region_late(unsigned long b, unsigned long e) { __register_nosave_region(b, e, 1); } diff --git a/kernel/kexec.c b/kernel/kexec.c index c8a4370e2a34..59f3f0df35d4 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c @@ -12,7 +12,7 @@ #include <linux/slab.h> #include <linux/fs.h> #include <linux/kexec.h> -#include <linux/spinlock.h> +#include <linux/mutex.h> #include <linux/list.h> #include <linux/highmem.h> #include <linux/syscalls.h> @@ -77,7 +77,7 @@ int kexec_should_crash(struct task_struct *p) * * The code for the transition from the current kernel to the * the new kernel is placed in the control_code_buffer, whose size - * is given by KEXEC_CONTROL_CODE_SIZE. In the best case only a single + * is given by KEXEC_CONTROL_PAGE_SIZE. In the best case only a single * page of memory is necessary, but some architectures require more. * Because this memory must be identity mapped in the transition from * virtual to physical addresses it must live in the range @@ -242,7 +242,7 @@ static int kimage_normal_alloc(struct kimage **rimage, unsigned long entry, */ result = -ENOMEM; image->control_code_page = kimage_alloc_control_pages(image, - get_order(KEXEC_CONTROL_CODE_SIZE)); + get_order(KEXEC_CONTROL_PAGE_SIZE)); if (!image->control_code_page) { printk(KERN_ERR "Could not allocate control_code_buffer\n"); goto out; @@ -317,7 +317,7 @@ static int kimage_crash_alloc(struct kimage **rimage, unsigned long entry, */ result = -ENOMEM; image->control_code_page = kimage_alloc_control_pages(image, - get_order(KEXEC_CONTROL_CODE_SIZE)); + get_order(KEXEC_CONTROL_PAGE_SIZE)); if (!image->control_code_page) { printk(KERN_ERR "Could not allocate control_code_buffer\n"); goto out; @@ -924,19 +924,14 @@ static int kimage_load_segment(struct kimage *image, */ struct kimage *kexec_image; struct kimage *kexec_crash_image; -/* - * A home grown binary mutex. - * Nothing can wait so this mutex is safe to use - * in interrupt context :) - */ -static int kexec_lock; + +static DEFINE_MUTEX(kexec_mutex); asmlinkage long sys_kexec_load(unsigned long entry, unsigned long nr_segments, struct kexec_segment __user *segments, unsigned long flags) { struct kimage **dest_image, *image; - int locked; int result; /* We only trust the superuser with rebooting the system. */ @@ -972,8 +967,7 @@ asmlinkage long sys_kexec_load(unsigned long entry, unsigned long nr_segments, * * KISS: always take the mutex. */ - locked = xchg(&kexec_lock, 1); - if (locked) + if (!mutex_trylock(&kexec_mutex)) return -EBUSY; dest_image = &kexec_image; @@ -1015,8 +1009,7 @@ asmlinkage long sys_kexec_load(unsigned long entry, unsigned long nr_segments, image = xchg(dest_image, image); out: - locked = xchg(&kexec_lock, 0); /* Release the mutex */ - BUG_ON(!locked); + mutex_unlock(&kexec_mutex); kimage_free(image); return result; @@ -1063,10 +1056,7 @@ asmlinkage long compat_sys_kexec_load(unsigned long entry, void crash_kexec(struct pt_regs *regs) { - int locked; - - - /* Take the kexec_lock here to prevent sys_kexec_load + /* Take the kexec_mutex here to prevent sys_kexec_load * running on one cpu from replacing the crash kernel * we are using after a panic on a different cpu. * @@ -1074,8 +1064,7 @@ void crash_kexec(struct pt_regs *regs) * of memory the xchg(&kexec_crash_image) would be * sufficient. But since I reuse the memory... */ - locked = xchg(&kexec_lock, 1); - if (!locked) { + if (mutex_trylock(&kexec_mutex)) { if (kexec_crash_image) { struct pt_regs fixed_regs; crash_setup_regs(&fixed_regs, regs); @@ -1083,8 +1072,7 @@ void crash_kexec(struct pt_regs *regs) machine_crash_shutdown(&fixed_regs); machine_kexec(kexec_crash_image); } - locked = xchg(&kexec_lock, 0); - BUG_ON(!locked); + mutex_unlock(&kexec_mutex); } } @@ -1426,25 +1414,23 @@ static int __init crash_save_vmcoreinfo_init(void) module_init(crash_save_vmcoreinfo_init) -/** - * kernel_kexec - reboot the system - * - * Move into place and start executing a preloaded standalone - * executable. If nothing was preloaded return an error. +/* + * Move into place and start executing a preloaded standalone + * executable. If nothing was preloaded return an error. */ int kernel_kexec(void) { int error = 0; - if (xchg(&kexec_lock, 1)) + if (!mutex_trylock(&kexec_mutex)) return -EBUSY; if (!kexec_image) { error = -EINVAL; goto Unlock; } - if (kexec_image->preserve_context) { #ifdef CONFIG_KEXEC_JUMP + if (kexec_image->preserve_context) { mutex_lock(&pm_mutex); pm_prepare_console(); error = freeze_processes(); @@ -1459,6 +1445,7 @@ int kernel_kexec(void) error = disable_nonboot_cpus(); if (error) goto Resume_devices; + device_pm_lock(); local_irq_disable(); /* At this point, device_suspend() has been called, * but *not* device_power_down(). We *must* @@ -1470,26 +1457,22 @@ int kernel_kexec(void) error = device_power_down(PMSG_FREEZE); if (error) goto Enable_irqs; - save_processor_state(); + } else #endif - } else { - blocking_notifier_call_chain(&reboot_notifier_list, - SYS_RESTART, NULL); - system_state = SYSTEM_RESTART; - device_shutdown(); - sysdev_shutdown(); + { + kernel_restart_prepare(NULL); printk(KERN_EMERG "Starting new kernel\n"); machine_shutdown(); } machine_kexec(kexec_image); - if (kexec_image->preserve_context) { #ifdef CONFIG_KEXEC_JUMP - restore_processor_state(); + if (kexec_image->preserve_context) { device_power_up(PMSG_RESTORE); Enable_irqs: local_irq_enable(); + device_pm_unlock(); enable_nonboot_cpus(); Resume_devices: device_resume(PMSG_RESTORE); @@ -1499,11 +1482,10 @@ int kernel_kexec(void) Restore_console: pm_restore_console(); mutex_unlock(&pm_mutex); -#endif } +#endif Unlock: - xchg(&kexec_lock, 0); - + mutex_unlock(&kexec_mutex); return error; } diff --git a/kernel/sched.c b/kernel/sched.c index d601fb0406ca..95e6ad3c231d 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -4669,6 +4669,52 @@ int __sched wait_for_completion_killable(struct completion *x) } EXPORT_SYMBOL(wait_for_completion_killable); +/** + * try_wait_for_completion - try to decrement a completion without blocking + * @x: completion structure + * + * Returns: 0 if a decrement cannot be done without blocking + * 1 if a decrement succeeded. + * + * If a completion is being used as a counting completion, + * attempt to decrement the counter without blocking. This + * enables us to avoid waiting if the resource the completion + * is protecting is not available. + */ +bool try_wait_for_completion(struct completion *x) +{ + int ret = 1; + + spin_lock_irq(&x->wait.lock); + if (!x->done) + ret = 0; + else + x->done--; + spin_unlock_irq(&x->wait.lock); + return ret; +} +EXPORT_SYMBOL(try_wait_for_completion); + +/** + * completion_done - Test to see if a completion has any waiters + * @x: completion structure + * + * Returns: 0 if there are waiters (wait_for_completion() in progress) + * 1 if there are no waiters. + * + */ +bool completion_done(struct completion *x) +{ + int ret = 1; + + spin_lock_irq(&x->wait.lock); + if (!x->done) + ret = 0; + spin_unlock_irq(&x->wait.lock); + return ret; +} +EXPORT_SYMBOL(completion_done); + static long __sched sleep_on_common(wait_queue_head_t *q, int state, long timeout) { diff --git a/kernel/sys.c b/kernel/sys.c index c01858090a98..3dacb00a7f76 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -274,7 +274,7 @@ void emergency_restart(void) } EXPORT_SYMBOL_GPL(emergency_restart); -static void kernel_restart_prepare(char *cmd) +void kernel_restart_prepare(char *cmd) { blocking_notifier_call_chain(&reboot_notifier_list, SYS_RESTART, cmd); system_state = SYSTEM_RESTART; diff --git a/mm/bootmem.c b/mm/bootmem.c index 4af15d0340ad..e023c68b0255 100644 --- a/mm/bootmem.c +++ b/mm/bootmem.c @@ -473,7 +473,7 @@ find_block: goto find_block; } - if (bdata->last_end_off && + if (bdata->last_end_off & (PAGE_SIZE - 1) && PFN_DOWN(bdata->last_end_off) + 1 == sidx) start_off = ALIGN(bdata->last_end_off, align); else |