diff options
-rw-r--r-- | MAINTAINERS | 6 | ||||
-rw-r--r-- | arch/arm/boot/compressed/Makefile | 3 | ||||
-rw-r--r-- | arch/arm/include/asm/Kbuild (renamed from include/asm-arm/Kbuild) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/a.out-core.h (renamed from include/asm-arm/a.out-core.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/a.out.h (renamed from include/asm-arm/a.out.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/assembler.h (renamed from include/asm-arm/assembler.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/atomic.h (renamed from include/asm-arm/atomic.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/auxvec.h (renamed from include/asm-arm/auxvec.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/bitops.h (renamed from include/asm-arm/bitops.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/bug.h (renamed from include/asm-arm/bug.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/bugs.h (renamed from include/asm-arm/bugs.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/byteorder.h (renamed from include/asm-arm/byteorder.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/cache.h (renamed from include/asm-arm/cache.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/cacheflush.h (renamed from include/asm-arm/cacheflush.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/checksum.h (renamed from include/asm-arm/checksum.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/cnt32_to_63.h (renamed from include/asm-arm/cnt32_to_63.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/cpu-multi32.h (renamed from include/asm-arm/cpu-multi32.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/cpu-single.h (renamed from include/asm-arm/cpu-single.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/cpu.h (renamed from include/asm-arm/cpu.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/cputime.h (renamed from include/asm-arm/cputime.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/current.h (renamed from include/asm-arm/current.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/delay.h (renamed from include/asm-arm/delay.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/device.h (renamed from include/asm-arm/device.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/div64.h (renamed from include/asm-arm/div64.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/dma-mapping.h (renamed from include/asm-arm/dma-mapping.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/dma.h (renamed from include/asm-arm/dma.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/domain.h (renamed from include/asm-arm/domain.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/ecard.h (renamed from include/asm-arm/ecard.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/elf.h (renamed from include/asm-arm/elf.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/emergency-restart.h (renamed from include/asm-arm/emergency-restart.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/errno.h (renamed from include/asm-arm/errno.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/fb.h (renamed from include/asm-arm/fb.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/fcntl.h (renamed from include/asm-arm/fcntl.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/fiq.h (renamed from include/asm-arm/fiq.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/flat.h (renamed from include/asm-arm/flat.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/floppy.h (renamed from include/asm-arm/floppy.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/fpstate.h (renamed from include/asm-arm/fpstate.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/ftrace.h (renamed from include/asm-arm/ftrace.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/futex.h (renamed from include/asm-arm/futex.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/glue.h (renamed from include/asm-arm/glue.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/gpio.h (renamed from include/asm-arm/gpio.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/hardirq.h (renamed from include/asm-arm/hardirq.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware.h (renamed from include/asm-arm/hardware.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/arm_timer.h (renamed from include/asm-arm/hardware/arm_timer.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/arm_twd.h (renamed from include/asm-arm/hardware/arm_twd.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/cache-l2x0.h (renamed from include/asm-arm/hardware/cache-l2x0.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/clps7111.h (renamed from include/asm-arm/hardware/clps7111.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/cs89712.h (renamed from include/asm-arm/hardware/cs89712.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/debug-8250.S (renamed from include/asm-arm/hardware/debug-8250.S) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/debug-pl01x.S (renamed from include/asm-arm/hardware/debug-pl01x.S) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/dec21285.h (renamed from include/asm-arm/hardware/dec21285.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/entry-macro-iomd.S (renamed from include/asm-arm/hardware/entry-macro-iomd.S) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/ep7211.h (renamed from include/asm-arm/hardware/ep7211.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/ep7212.h (renamed from include/asm-arm/hardware/ep7212.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/gic.h (renamed from include/asm-arm/hardware/gic.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/icst307.h (renamed from include/asm-arm/hardware/icst307.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/icst525.h (renamed from include/asm-arm/hardware/icst525.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/ioc.h (renamed from include/asm-arm/hardware/ioc.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/iomd.h (renamed from include/asm-arm/hardware/iomd.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/iop3xx-adma.h (renamed from include/asm-arm/hardware/iop3xx-adma.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/iop3xx-gpio.h (renamed from include/asm-arm/hardware/iop3xx-gpio.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/iop3xx.h (renamed from include/asm-arm/hardware/iop3xx.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/iop_adma.h (renamed from include/asm-arm/hardware/iop_adma.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/it8152.h (renamed from include/asm-arm/hardware/it8152.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/linkup-l1110.h (renamed from include/asm-arm/hardware/linkup-l1110.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/locomo.h (renamed from include/asm-arm/hardware/locomo.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/memc.h (renamed from include/asm-arm/hardware/memc.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/pci_v3.h (renamed from include/asm-arm/hardware/pci_v3.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/sa1111.h (renamed from include/asm-arm/hardware/sa1111.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/scoop.h (renamed from include/asm-arm/hardware/scoop.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/sharpsl_pm.h (renamed from include/asm-arm/hardware/sharpsl_pm.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/ssp.h (renamed from include/asm-arm/hardware/ssp.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/uengine.h (renamed from include/asm-arm/hardware/uengine.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/vic.h (renamed from include/asm-arm/hardware/vic.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/hw_irq.h (renamed from include/asm-arm/hw_irq.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/hwcap.h (renamed from include/asm-arm/hwcap.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/ide.h (renamed from include/asm-arm/ide.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/io.h (renamed from include/asm-arm/io.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/ioctl.h (renamed from include/asm-arm/ioctl.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/ioctls.h (renamed from include/asm-arm/ioctls.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/ipcbuf.h (renamed from include/asm-arm/ipcbuf.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/irq.h (renamed from include/asm-arm/irq.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/irq_regs.h (renamed from include/asm-arm/irq_regs.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/irqflags.h (renamed from include/asm-arm/irqflags.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/kdebug.h (renamed from include/asm-arm/kdebug.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/kexec.h (renamed from include/asm-arm/kexec.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/kgdb.h (renamed from include/asm-arm/kgdb.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/kmap_types.h (renamed from include/asm-arm/kmap_types.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/kprobes.h (renamed from include/asm-arm/kprobes.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/leds.h (renamed from include/asm-arm/leds.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/limits.h (renamed from include/asm-arm/limits.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/linkage.h (renamed from include/asm-arm/linkage.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/local.h (renamed from include/asm-arm/local.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/locks.h (renamed from include/asm-arm/locks.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/mach/arch.h (renamed from include/asm-arm/mach/arch.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/mach/dma.h (renamed from include/asm-arm/mach/dma.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/mach/flash.h (renamed from include/asm-arm/mach/flash.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/mach/irda.h (renamed from include/asm-arm/mach/irda.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/mach/irq.h (renamed from include/asm-arm/mach/irq.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/mach/map.h (renamed from include/asm-arm/mach/map.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/mach/mmc.h (renamed from include/asm-arm/mach/mmc.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/mach/pci.h (renamed from include/asm-arm/mach/pci.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/mach/serial_at91.h (renamed from include/asm-arm/mach/serial_at91.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/mach/serial_sa1100.h (renamed from include/asm-arm/mach/serial_sa1100.h) | 4 | ||||
-rw-r--r-- | arch/arm/include/asm/mach/sharpsl_param.h (renamed from include/asm-arm/mach/sharpsl_param.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/mach/time.h (renamed from include/asm-arm/mach/time.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/mach/udc_pxa2xx.h (renamed from include/asm-arm/mach/udc_pxa2xx.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/mc146818rtc.h (renamed from include/asm-arm/mc146818rtc.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/memory.h (renamed from include/asm-arm/memory.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/mman.h (renamed from include/asm-arm/mman.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/mmu.h (renamed from include/asm-arm/mmu.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/mmu_context.h (renamed from include/asm-arm/mmu_context.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/mmzone.h (renamed from include/asm-arm/mmzone.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/module.h (renamed from include/asm-arm/module.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/msgbuf.h (renamed from include/asm-arm/msgbuf.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/mtd-xip.h (renamed from include/asm-arm/mtd-xip.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/mutex.h (renamed from include/asm-arm/mutex.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/nwflash.h (renamed from include/asm-arm/nwflash.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/page-nommu.h (renamed from include/asm-arm/page-nommu.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/page.h (renamed from include/asm-arm/page.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/param.h (renamed from include/asm-arm/param.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/parport.h (renamed from include/asm-arm/parport.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/pci.h (renamed from include/asm-arm/pci.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/percpu.h (renamed from include/asm-arm/percpu.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/pgalloc.h (renamed from include/asm-arm/pgalloc.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/pgtable-hwdef.h (renamed from include/asm-arm/pgtable-hwdef.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/pgtable-nommu.h (renamed from include/asm-arm/pgtable-nommu.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/pgtable.h (renamed from include/asm-arm/pgtable.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/poll.h (renamed from include/asm-arm/poll.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/posix_types.h (renamed from include/asm-arm/posix_types.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/proc-fns.h (renamed from include/asm-arm/proc-fns.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/processor.h (renamed from include/asm-arm/processor.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/procinfo.h (renamed from include/asm-arm/procinfo.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/ptrace.h (renamed from include/asm-arm/ptrace.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/resource.h (renamed from include/asm-arm/resource.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/scatterlist.h (renamed from include/asm-arm/scatterlist.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/sections.h (renamed from include/asm-arm/sections.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/segment.h (renamed from include/asm-arm/segment.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/sembuf.h (renamed from include/asm-arm/sembuf.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/serial.h (renamed from include/asm-arm/serial.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/setup.h (renamed from include/asm-arm/setup.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/shmbuf.h (renamed from include/asm-arm/shmbuf.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/shmparam.h (renamed from include/asm-arm/shmparam.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/sigcontext.h (renamed from include/asm-arm/sigcontext.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/siginfo.h (renamed from include/asm-arm/siginfo.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/signal.h (renamed from include/asm-arm/signal.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/sizes.h (renamed from include/asm-arm/sizes.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/smp.h (renamed from include/asm-arm/smp.h) | 4 | ||||
-rw-r--r-- | arch/arm/include/asm/socket.h (renamed from include/asm-arm/socket.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/sockios.h (renamed from include/asm-arm/sockios.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/sparsemem.h (renamed from include/asm-arm/sparsemem.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/spinlock.h (renamed from include/asm-arm/spinlock.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/spinlock_types.h (renamed from include/asm-arm/spinlock_types.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/stat.h (renamed from include/asm-arm/stat.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/statfs.h (renamed from include/asm-arm/statfs.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/string.h (renamed from include/asm-arm/string.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/suspend.h (renamed from include/asm-arm/suspend.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/system.h (renamed from include/asm-arm/system.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/termbits.h (renamed from include/asm-arm/termbits.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/termios.h (renamed from include/asm-arm/termios.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/therm.h (renamed from include/asm-arm/therm.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/thread_info.h (renamed from include/asm-arm/thread_info.h) | 4 | ||||
-rw-r--r-- | arch/arm/include/asm/thread_notify.h (renamed from include/asm-arm/thread_notify.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/timex.h (renamed from include/asm-arm/timex.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/tlb.h (renamed from include/asm-arm/tlb.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/tlbflush.h (renamed from include/asm-arm/tlbflush.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/topology.h (renamed from include/asm-arm/topology.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/traps.h (renamed from include/asm-arm/traps.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/types.h (renamed from include/asm-arm/types.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/uaccess.h (renamed from include/asm-arm/uaccess.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/ucontext.h (renamed from include/asm-arm/ucontext.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/unaligned.h (renamed from include/asm-arm/unaligned.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/unistd.h (renamed from include/asm-arm/unistd.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/user.h (renamed from include/asm-arm/user.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/vfp.h (renamed from include/asm-arm/vfp.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/vfpmacros.h (renamed from include/asm-arm/vfpmacros.h) | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/vga.h (renamed from include/asm-arm/vga.h) | 0 | ||||
-rw-r--r-- | arch/arm/include/asm/xor.h (renamed from include/asm-arm/xor.h) | 2 | ||||
-rw-r--r-- | arch/arm/kernel/head-common.S | 2 | ||||
-rw-r--r-- | arch/arm/lib/getuser.S | 2 | ||||
-rw-r--r-- | arch/arm/lib/putuser.S | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/clock.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-imx/generic.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-imx/mx1ads.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-ns9xxx/board-a9m9750dev.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-ns9xxx/gpio-ns9360.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-ns9xxx/gpio.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-ns9xxx/irq.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-ns9xxx/mach-cc9p9360dev.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-ns9xxx/mach-cc9p9360js.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-ns9xxx/plat-serial8250.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-ns9xxx/processor-ns9360.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-ns9xxx/time-ns9360.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pcm990-baseboard.c | 1 | ||||
-rw-r--r-- | arch/arm/mm/Kconfig | 10 | ||||
-rw-r--r-- | arch/arm/mm/cache-xsc3l2.c | 182 | ||||
-rw-r--r-- | arch/arm/mm/init.c | 32 | ||||
-rw-r--r-- | arch/arm/mm/ioremap.c | 2 | ||||
-rw-r--r-- | arch/arm/mm/proc-arm720.S | 2 | ||||
-rw-r--r-- | arch/arm/mm/proc-xsc3.S | 22 | ||||
-rw-r--r-- | arch/arm/nwfpe/fpa11.h | 2 | ||||
-rw-r--r-- | arch/s390/include/asm/Kbuild (renamed from include/asm-s390/Kbuild) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/airq.h (renamed from include/asm-s390/airq.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/appldata.h (renamed from include/asm-s390/appldata.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/atomic.h (renamed from include/asm-s390/atomic.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/auxvec.h (renamed from include/asm-s390/auxvec.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/bitops.h (renamed from include/asm-s390/bitops.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/bug.h (renamed from include/asm-s390/bug.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/bugs.h (renamed from include/asm-s390/bugs.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/byteorder.h (renamed from include/asm-s390/byteorder.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/cache.h (renamed from include/asm-s390/cache.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/cacheflush.h (renamed from include/asm-s390/cacheflush.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/ccwdev.h (renamed from include/asm-s390/ccwdev.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/ccwgroup.h (renamed from include/asm-s390/ccwgroup.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/checksum.h (renamed from include/asm-s390/checksum.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/chpid.h (renamed from include/asm-s390/chpid.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/chsc.h (renamed from include/asm-s390/chsc.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/cio.h (renamed from include/asm-s390/cio.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/cmb.h (renamed from include/asm-s390/cmb.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/compat.h (renamed from include/asm-s390/compat.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/cpcmd.h (renamed from include/asm-s390/cpcmd.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/cpu.h (renamed from include/asm-s390/cpu.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/cputime.h (renamed from include/asm-s390/cputime.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/current.h (renamed from include/asm-s390/current.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/dasd.h (renamed from include/asm-s390/dasd.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/debug.h (renamed from include/asm-s390/debug.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/delay.h (renamed from include/asm-s390/delay.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/device.h (renamed from include/asm-s390/device.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/diag.h (renamed from include/asm-s390/diag.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/div64.h (renamed from include/asm-s390/div64.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/dma.h (renamed from include/asm-s390/dma.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/ebcdic.h (renamed from include/asm-s390/ebcdic.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/elf.h (renamed from include/asm-s390/elf.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/emergency-restart.h (renamed from include/asm-s390/emergency-restart.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/errno.h (renamed from include/asm-s390/errno.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/etr.h (renamed from include/asm-s390/etr.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/extmem.h (renamed from include/asm-s390/extmem.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/fb.h (renamed from include/asm-s390/fb.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/fcntl.h (renamed from include/asm-s390/fcntl.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/fcx.h (renamed from include/asm-s390/fcx.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/futex.h (renamed from include/asm-s390/futex.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/hardirq.h (renamed from include/asm-s390/hardirq.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/hugetlb.h (renamed from include/asm-s390/hugetlb.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/idals.h (renamed from include/asm-s390/idals.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/io.h (renamed from include/asm-s390/io.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/ioctl.h (renamed from include/asm-s390/ioctl.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/ioctls.h (renamed from include/asm-s390/ioctls.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/ipcbuf.h (renamed from include/asm-s390/ipcbuf.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/ipl.h (renamed from include/asm-s390/ipl.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/irq.h (renamed from include/asm-s390/irq.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/irq_regs.h (renamed from include/asm-s390/irq_regs.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/irqflags.h (renamed from include/asm-s390/irqflags.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/isc.h (renamed from include/asm-s390/isc.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/itcw.h (renamed from include/asm-s390/itcw.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/kdebug.h (renamed from include/asm-s390/kdebug.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/kexec.h (renamed from include/asm-s390/kexec.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/kmap_types.h (renamed from include/asm-s390/kmap_types.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/kprobes.h (renamed from include/asm-s390/kprobes.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/kvm.h (renamed from include/asm-s390/kvm.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/kvm_host.h (renamed from include/asm-s390/kvm_host.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/kvm_para.h (renamed from include/asm-s390/kvm_para.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/kvm_virtio.h (renamed from include/asm-s390/kvm_virtio.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/linkage.h (renamed from include/asm-s390/linkage.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/local.h (renamed from include/asm-s390/local.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/lowcore.h (renamed from include/asm-s390/lowcore.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/mathemu.h (renamed from include/asm-s390/mathemu.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/mman.h (renamed from include/asm-s390/mman.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/mmu.h (renamed from include/asm-s390/mmu.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/mmu_context.h (renamed from include/asm-s390/mmu_context.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/module.h (renamed from include/asm-s390/module.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/monwriter.h (renamed from include/asm-s390/monwriter.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/msgbuf.h (renamed from include/asm-s390/msgbuf.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/mutex.h (renamed from include/asm-s390/mutex.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/page.h (renamed from include/asm-s390/page.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/param.h (renamed from include/asm-s390/param.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/pci.h (renamed from include/asm-s390/pci.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/percpu.h (renamed from include/asm-s390/percpu.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/pgalloc.h (renamed from include/asm-s390/pgalloc.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/pgtable.h (renamed from include/asm-s390/pgtable.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/poll.h (renamed from include/asm-s390/poll.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/posix_types.h (renamed from include/asm-s390/posix_types.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/processor.h (renamed from include/asm-s390/processor.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/ptrace.h (renamed from include/asm-s390/ptrace.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/qdio.h (renamed from include/asm-s390/qdio.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/qeth.h (renamed from include/asm-s390/qeth.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/reset.h (renamed from include/asm-s390/reset.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/resource.h (renamed from include/asm-s390/resource.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/rwsem.h (renamed from include/asm-s390/rwsem.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/s390_ext.h (renamed from include/asm-s390/s390_ext.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/s390_rdev.h (renamed from include/asm-s390/s390_rdev.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/scatterlist.h (renamed from include/asm-s390/scatterlist.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/schid.h (renamed from include/asm-s390/schid.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/sclp.h (renamed from include/asm-s390/sclp.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/sections.h (renamed from include/asm-s390/sections.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/segment.h (renamed from include/asm-s390/segment.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/sembuf.h (renamed from include/asm-s390/sembuf.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/setup.h (renamed from include/asm-s390/setup.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/sfp-machine.h (renamed from include/asm-s390/sfp-machine.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/sfp-util.h (renamed from include/asm-s390/sfp-util.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/shmbuf.h (renamed from include/asm-s390/shmbuf.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/shmparam.h (renamed from include/asm-s390/shmparam.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/sigcontext.h (renamed from include/asm-s390/sigcontext.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/siginfo.h (renamed from include/asm-s390/siginfo.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/signal.h (renamed from include/asm-s390/signal.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/sigp.h (renamed from include/asm-s390/sigp.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/smp.h (renamed from include/asm-s390/smp.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/socket.h (renamed from include/asm-s390/socket.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/sockios.h (renamed from include/asm-s390/sockios.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/sparsemem.h (renamed from include/asm-s390/sparsemem.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/spinlock.h (renamed from include/asm-s390/spinlock.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/spinlock_types.h (renamed from include/asm-s390/spinlock_types.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/stat.h (renamed from include/asm-s390/stat.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/statfs.h (renamed from include/asm-s390/statfs.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/string.h (renamed from include/asm-s390/string.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/suspend.h (renamed from include/asm-s390/suspend.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/sysinfo.h (renamed from include/asm-s390/sysinfo.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/system.h (renamed from include/asm-s390/system.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/tape390.h (renamed from include/asm-s390/tape390.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/termbits.h (renamed from include/asm-s390/termbits.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/termios.h (renamed from include/asm-s390/termios.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/thread_info.h (renamed from include/asm-s390/thread_info.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/timer.h (renamed from include/asm-s390/timer.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/timex.h (renamed from include/asm-s390/timex.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/tlb.h (renamed from include/asm-s390/tlb.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/tlbflush.h (renamed from include/asm-s390/tlbflush.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/todclk.h (renamed from include/asm-s390/todclk.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/topology.h (renamed from include/asm-s390/topology.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/types.h (renamed from include/asm-s390/types.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/uaccess.h (renamed from include/asm-s390/uaccess.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/ucontext.h (renamed from include/asm-s390/ucontext.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/unaligned.h (renamed from include/asm-s390/unaligned.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/unistd.h (renamed from include/asm-s390/unistd.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/user.h (renamed from include/asm-s390/user.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/vtoc.h (renamed from include/asm-s390/vtoc.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/xor.h (renamed from include/asm-s390/xor.h) | 0 | ||||
-rw-r--r-- | arch/s390/include/asm/zcrypt.h (renamed from include/asm-s390/zcrypt.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/asm/futex_64.h | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/irq_64.h | 3 | ||||
-rw-r--r-- | arch/sparc/include/asm/of_platform.h | 26 | ||||
-rw-r--r-- | arch/sparc/include/asm/of_platform_32.h | 24 | ||||
-rw-r--r-- | arch/sparc/include/asm/of_platform_64.h | 25 | ||||
-rw-r--r-- | arch/sparc/include/asm/ptrace_32.h | 20 | ||||
-rw-r--r-- | arch/sparc/include/asm/ptrace_64.h | 39 | ||||
-rw-r--r-- | arch/sparc64/kernel/of_device.c | 5 | ||||
-rw-r--r-- | arch/sparc64/kernel/process.c | 110 | ||||
-rw-r--r-- | arch/sparc64/kernel/signal.c | 6 | ||||
-rw-r--r-- | arch/sparc64/kernel/smp.c | 6 | ||||
-rw-r--r-- | arch/sparc64/kernel/sparc64_ksyms.c | 1 | ||||
-rw-r--r-- | arch/sparc64/kernel/traps.c | 10 | ||||
-rw-r--r-- | arch/sparc64/mm/ultra.S | 42 | ||||
-rw-r--r-- | block/scsi_ioctl.c | 2 | ||||
-rw-r--r-- | drivers/char/efirtc.c | 1 | ||||
-rw-r--r-- | drivers/char/vt.c | 2 | ||||
-rw-r--r-- | drivers/isdn/Makefile | 2 | ||||
-rw-r--r-- | drivers/isdn/hardware/mISDN/hfcmulti.c | 37 | ||||
-rw-r--r-- | drivers/isdn/hardware/mISDN/hfcpci.c | 2 | ||||
-rw-r--r-- | drivers/isdn/mISDN/l1oip_core.c | 6 | ||||
-rw-r--r-- | drivers/isdn/mISDN/socket.c | 4 | ||||
-rw-r--r-- | drivers/mtd/maps/ipaq-flash.c | 2 | ||||
-rw-r--r-- | drivers/mtd/mtdsuper.c | 17 | ||||
-rw-r--r-- | drivers/pcmcia/rsrc_nonstatic.c | 2 | ||||
-rw-r--r-- | drivers/scsi/hptiop.c | 7 | ||||
-rw-r--r-- | drivers/scsi/scsi_transport_spi.c | 8 | ||||
-rw-r--r-- | drivers/scsi/sd.c | 21 | ||||
-rw-r--r-- | drivers/scsi/sd.h | 6 | ||||
-rw-r--r-- | drivers/scsi/ses.c | 18 | ||||
-rw-r--r-- | drivers/serial/bfin_5xx.c | 2 | ||||
-rw-r--r-- | drivers/serial/crisv10.c | 79 | ||||
-rw-r--r-- | drivers/serial/crisv10.h | 3 | ||||
-rw-r--r-- | drivers/spi/atmel_spi.c | 17 | ||||
-rw-r--r-- | drivers/spi/spi_s3c24xx.c | 25 | ||||
-rw-r--r-- | drivers/video/console/.gitignore | 2 | ||||
-rw-r--r-- | drivers/watchdog/ar7_wdt.c | 29 | ||||
-rw-r--r-- | drivers/watchdog/it8712f_wdt.c | 77 | ||||
-rw-r--r-- | drivers/watchdog/s3c2410_wdt.c | 148 | ||||
-rw-r--r-- | drivers/watchdog/sc1200wdt.c | 205 | ||||
-rw-r--r-- | drivers/watchdog/wdt.c | 176 | ||||
-rw-r--r-- | drivers/watchdog/wdt_pci.c | 301 | ||||
-rw-r--r-- | firmware/ihex2fw.c | 6 | ||||
-rw-r--r-- | fs/ext4/acl.c | 188 | ||||
-rw-r--r-- | fs/ext4/balloc.c | 11 | ||||
-rw-r--r-- | fs/ext4/ext4.h | 1 | ||||
-rw-r--r-- | fs/ext4/extents.c | 55 | ||||
-rw-r--r-- | fs/ext4/ialloc.c | 58 | ||||
-rw-r--r-- | fs/ext4/inode.c | 164 | ||||
-rw-r--r-- | fs/ext4/mballoc.c | 254 | ||||
-rw-r--r-- | fs/ext4/mballoc.h | 10 | ||||
-rw-r--r-- | fs/ext4/resize.c | 79 | ||||
-rw-r--r-- | fs/ext4/super.c | 316 | ||||
-rw-r--r-- | fs/ext4/xattr.c | 2 | ||||
-rw-r--r-- | fs/fat/file.c | 6 | ||||
-rw-r--r-- | fs/jbd2/commit.c | 24 | ||||
-rw-r--r-- | fs/jbd2/journal.c | 1 | ||||
-rw-r--r-- | fs/nfs/nfsroot.c | 2 | ||||
-rw-r--r-- | fs/ufs/super.c | 2 | ||||
-rw-r--r-- | include/asm-arm/arch-ns9xxx/debug-macro.S | 2 | ||||
-rw-r--r-- | include/asm-arm/arch-ns9xxx/entry-macro.S | 2 | ||||
-rw-r--r-- | include/asm-arm/arch-ns9xxx/processor.h | 2 | ||||
-rw-r--r-- | include/asm-arm/arch-ns9xxx/system.h | 4 | ||||
-rw-r--r-- | include/asm-arm/arch-omap/board.h | 2 | ||||
-rw-r--r-- | include/asm-m68k/contregs.h | 51 | ||||
-rw-r--r-- | include/asm-m68k/fbio.h | 331 | ||||
-rw-r--r-- | include/asm-m68k/idprom.h | 21 | ||||
-rw-r--r-- | include/linux/ihex.h | 2 | ||||
-rw-r--r-- | include/linux/mISDNif.h | 32 | ||||
-rw-r--r-- | include/linux/parser.h | 2 | ||||
-rw-r--r-- | include/linux/vt_kern.h | 1 | ||||
-rw-r--r-- | include/scsi/scsi_device.h | 3 | ||||
-rw-r--r-- | kernel/sched.c | 22 | ||||
-rw-r--r-- | mm/memory.c | 16 | ||||
-rw-r--r-- | mm/mlock.c | 2 | ||||
-rw-r--r-- | mm/truncate.c | 2 | ||||
-rw-r--r-- | scripts/Makefile.fwinst | 4 | ||||
-rw-r--r-- | sound/core/seq/oss/seq_oss_synth.c | 3 |
414 files changed, 2297 insertions, 1408 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 5e6d6ab82433..8223a521d7c3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -502,6 +502,12 @@ L: openezx-devel@lists.openezx.org (subscribers-only) | |||
502 | W: http://www.openezx.org/ | 502 | W: http://www.openezx.org/ |
503 | S: Maintained | 503 | S: Maintained |
504 | 504 | ||
505 | ARM/FREESCALE IMX / MXC ARM ARCHITECTURE | ||
506 | P: Sascha Hauer | ||
507 | M: kernel@pengutronix.de | ||
508 | L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) | ||
509 | S: Maintained | ||
510 | |||
505 | ARM/GLOMATION GESBC9312SX MACHINE SUPPORT | 511 | ARM/GLOMATION GESBC9312SX MACHINE SUPPORT |
506 | P: Lennert Buytenhek | 512 | P: Lennert Buytenhek |
507 | M: kernel@wantstofly.org | 513 | M: kernel@wantstofly.org |
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 95baac4939e0..94462a097f86 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile | |||
@@ -112,6 +112,3 @@ $(obj)/font.c: $(FONTC) | |||
112 | 112 | ||
113 | $(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/arm/boot/Makefile .config | 113 | $(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/arm/boot/Makefile .config |
114 | @sed "$(SEDFLAGS)" < $< > $@ | 114 | @sed "$(SEDFLAGS)" < $< > $@ |
115 | |||
116 | $(obj)/misc.o: $(obj)/misc.c include/asm/arch/uncompress.h lib/inflate.c | ||
117 | |||
diff --git a/include/asm-arm/Kbuild b/arch/arm/include/asm/Kbuild index 73237bd130a2..73237bd130a2 100644 --- a/include/asm-arm/Kbuild +++ b/arch/arm/include/asm/Kbuild | |||
diff --git a/include/asm-arm/a.out-core.h b/arch/arm/include/asm/a.out-core.h index 93d04acaa31f..93d04acaa31f 100644 --- a/include/asm-arm/a.out-core.h +++ b/arch/arm/include/asm/a.out-core.h | |||
diff --git a/include/asm-arm/a.out.h b/arch/arm/include/asm/a.out.h index 79489fdcc8b8..79489fdcc8b8 100644 --- a/include/asm-arm/a.out.h +++ b/arch/arm/include/asm/a.out.h | |||
diff --git a/include/asm-arm/assembler.h b/arch/arm/include/asm/assembler.h index 911393b2c6f0..6116e4893c0a 100644 --- a/include/asm-arm/assembler.h +++ b/arch/arm/include/asm/assembler.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/assembler.h | 2 | * arch/arm/include/asm/assembler.h |
3 | * | 3 | * |
4 | * Copyright (C) 1996-2000 Russell King | 4 | * Copyright (C) 1996-2000 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/atomic.h b/arch/arm/include/asm/atomic.h index 3b59f94b5a3d..325f881ccb50 100644 --- a/include/asm-arm/atomic.h +++ b/arch/arm/include/asm/atomic.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/atomic.h | 2 | * arch/arm/include/asm/atomic.h |
3 | * | 3 | * |
4 | * Copyright (C) 1996 Russell King. | 4 | * Copyright (C) 1996 Russell King. |
5 | * Copyright (C) 2002 Deep Blue Solutions Ltd. | 5 | * Copyright (C) 2002 Deep Blue Solutions Ltd. |
diff --git a/include/asm-arm/auxvec.h b/arch/arm/include/asm/auxvec.h index c0536f6b29a7..c0536f6b29a7 100644 --- a/include/asm-arm/auxvec.h +++ b/arch/arm/include/asm/auxvec.h | |||
diff --git a/include/asm-arm/bitops.h b/arch/arm/include/asm/bitops.h index 9a1db20e032a..9a1db20e032a 100644 --- a/include/asm-arm/bitops.h +++ b/arch/arm/include/asm/bitops.h | |||
diff --git a/include/asm-arm/bug.h b/arch/arm/include/asm/bug.h index 7b62351f097d..7b62351f097d 100644 --- a/include/asm-arm/bug.h +++ b/arch/arm/include/asm/bug.h | |||
diff --git a/include/asm-arm/bugs.h b/arch/arm/include/asm/bugs.h index ca54eb0f12d7..a97f1ea708d1 100644 --- a/include/asm-arm/bugs.h +++ b/arch/arm/include/asm/bugs.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/bugs.h | 2 | * arch/arm/include/asm/bugs.h |
3 | * | 3 | * |
4 | * Copyright (C) 1995-2003 Russell King | 4 | * Copyright (C) 1995-2003 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/byteorder.h b/arch/arm/include/asm/byteorder.h index e6f7fcdc73b0..4fbfb22f65a0 100644 --- a/include/asm-arm/byteorder.h +++ b/arch/arm/include/asm/byteorder.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/byteorder.h | 2 | * arch/arm/include/asm/byteorder.h |
3 | * | 3 | * |
4 | * ARM Endian-ness. In little endian mode, the data bus is connected such | 4 | * ARM Endian-ness. In little endian mode, the data bus is connected such |
5 | * that byte accesses appear as: | 5 | * that byte accesses appear as: |
diff --git a/include/asm-arm/cache.h b/arch/arm/include/asm/cache.h index 31332c8ac04e..cb7a9e97fd7e 100644 --- a/include/asm-arm/cache.h +++ b/arch/arm/include/asm/cache.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/cache.h | 2 | * arch/arm/include/asm/cache.h |
3 | */ | 3 | */ |
4 | #ifndef __ASMARM_CACHE_H | 4 | #ifndef __ASMARM_CACHE_H |
5 | #define __ASMARM_CACHE_H | 5 | #define __ASMARM_CACHE_H |
diff --git a/include/asm-arm/cacheflush.h b/arch/arm/include/asm/cacheflush.h index e68a1cbcc852..9073d9c6567e 100644 --- a/include/asm-arm/cacheflush.h +++ b/arch/arm/include/asm/cacheflush.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/cacheflush.h | 2 | * arch/arm/include/asm/cacheflush.h |
3 | * | 3 | * |
4 | * Copyright (C) 1999-2002 Russell King | 4 | * Copyright (C) 1999-2002 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/checksum.h b/arch/arm/include/asm/checksum.h index eaa0efd8d0d4..6dcc16430868 100644 --- a/include/asm-arm/checksum.h +++ b/arch/arm/include/asm/checksum.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/checksum.h | 2 | * arch/arm/include/asm/checksum.h |
3 | * | 3 | * |
4 | * IP checksum routines | 4 | * IP checksum routines |
5 | * | 5 | * |
diff --git a/include/asm-arm/cnt32_to_63.h b/arch/arm/include/asm/cnt32_to_63.h index 480c873fa746..480c873fa746 100644 --- a/include/asm-arm/cnt32_to_63.h +++ b/arch/arm/include/asm/cnt32_to_63.h | |||
diff --git a/include/asm-arm/cpu-multi32.h b/arch/arm/include/asm/cpu-multi32.h index 3479de9266e5..e2b5b0b2116a 100644 --- a/include/asm-arm/cpu-multi32.h +++ b/arch/arm/include/asm/cpu-multi32.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/cpu-multi32.h | 2 | * arch/arm/include/asm/cpu-multi32.h |
3 | * | 3 | * |
4 | * Copyright (C) 2000 Russell King | 4 | * Copyright (C) 2000 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/cpu-single.h b/arch/arm/include/asm/cpu-single.h index 0b120ee36091..f073a6d2a406 100644 --- a/include/asm-arm/cpu-single.h +++ b/arch/arm/include/asm/cpu-single.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/cpu-single.h | 2 | * arch/arm/include/asm/cpu-single.h |
3 | * | 3 | * |
4 | * Copyright (C) 2000 Russell King | 4 | * Copyright (C) 2000 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/cpu.h b/arch/arm/include/asm/cpu.h index 715426b9b08e..634b2d7c612a 100644 --- a/include/asm-arm/cpu.h +++ b/arch/arm/include/asm/cpu.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/cpu.h | 2 | * arch/arm/include/asm/cpu.h |
3 | * | 3 | * |
4 | * Copyright (C) 2004-2005 ARM Ltd. | 4 | * Copyright (C) 2004-2005 ARM Ltd. |
5 | * | 5 | * |
diff --git a/include/asm-arm/cputime.h b/arch/arm/include/asm/cputime.h index 3a8002a5fec7..3a8002a5fec7 100644 --- a/include/asm-arm/cputime.h +++ b/arch/arm/include/asm/cputime.h | |||
diff --git a/include/asm-arm/current.h b/arch/arm/include/asm/current.h index 75d21e2a3ff7..75d21e2a3ff7 100644 --- a/include/asm-arm/current.h +++ b/arch/arm/include/asm/current.h | |||
diff --git a/include/asm-arm/delay.h b/arch/arm/include/asm/delay.h index b2deda181549..b2deda181549 100644 --- a/include/asm-arm/delay.h +++ b/arch/arm/include/asm/delay.h | |||
diff --git a/include/asm-arm/device.h b/arch/arm/include/asm/device.h index c61642b40603..c61642b40603 100644 --- a/include/asm-arm/device.h +++ b/arch/arm/include/asm/device.h | |||
diff --git a/include/asm-arm/div64.h b/arch/arm/include/asm/div64.h index 5001390be958..5001390be958 100644 --- a/include/asm-arm/div64.h +++ b/arch/arm/include/asm/div64.h | |||
diff --git a/include/asm-arm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index 45329fca1b64..45329fca1b64 100644 --- a/include/asm-arm/dma-mapping.h +++ b/arch/arm/include/asm/dma-mapping.h | |||
diff --git a/include/asm-arm/dma.h b/arch/arm/include/asm/dma.h index 9f2c5305c260..9f2c5305c260 100644 --- a/include/asm-arm/dma.h +++ b/arch/arm/include/asm/dma.h | |||
diff --git a/include/asm-arm/domain.h b/arch/arm/include/asm/domain.h index 3c12a7625304..cc7ef4080711 100644 --- a/include/asm-arm/domain.h +++ b/arch/arm/include/asm/domain.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/domain.h | 2 | * arch/arm/include/asm/domain.h |
3 | * | 3 | * |
4 | * Copyright (C) 1999 Russell King. | 4 | * Copyright (C) 1999 Russell King. |
5 | * | 5 | * |
diff --git a/include/asm-arm/ecard.h b/arch/arm/include/asm/ecard.h index 5e22881a630d..29f2610efc70 100644 --- a/include/asm-arm/ecard.h +++ b/arch/arm/include/asm/ecard.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/ecard.h | 2 | * arch/arm/include/asm/ecard.h |
3 | * | 3 | * |
4 | * definitions for expansion cards | 4 | * definitions for expansion cards |
5 | * | 5 | * |
diff --git a/include/asm-arm/elf.h b/arch/arm/include/asm/elf.h index 4ca751627489..4ca751627489 100644 --- a/include/asm-arm/elf.h +++ b/arch/arm/include/asm/elf.h | |||
diff --git a/include/asm-arm/emergency-restart.h b/arch/arm/include/asm/emergency-restart.h index 108d8c48e42e..108d8c48e42e 100644 --- a/include/asm-arm/emergency-restart.h +++ b/arch/arm/include/asm/emergency-restart.h | |||
diff --git a/include/asm-arm/errno.h b/arch/arm/include/asm/errno.h index 6e60f0612bb6..6e60f0612bb6 100644 --- a/include/asm-arm/errno.h +++ b/arch/arm/include/asm/errno.h | |||
diff --git a/include/asm-arm/fb.h b/arch/arm/include/asm/fb.h index d92e99cd8c8a..d92e99cd8c8a 100644 --- a/include/asm-arm/fb.h +++ b/arch/arm/include/asm/fb.h | |||
diff --git a/include/asm-arm/fcntl.h b/arch/arm/include/asm/fcntl.h index a80b6607b2ef..a80b6607b2ef 100644 --- a/include/asm-arm/fcntl.h +++ b/arch/arm/include/asm/fcntl.h | |||
diff --git a/include/asm-arm/fiq.h b/arch/arm/include/asm/fiq.h index a3bad09e825c..2242ce22ec6c 100644 --- a/include/asm-arm/fiq.h +++ b/arch/arm/include/asm/fiq.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/fiq.h | 2 | * arch/arm/include/asm/fiq.h |
3 | * | 3 | * |
4 | * Support for FIQ on ARM architectures. | 4 | * Support for FIQ on ARM architectures. |
5 | * Written by Philip Blundell <philb@gnu.org>, 1998 | 5 | * Written by Philip Blundell <philb@gnu.org>, 1998 |
diff --git a/include/asm-arm/flat.h b/arch/arm/include/asm/flat.h index 9918aa46d9e5..1d77e51907f6 100644 --- a/include/asm-arm/flat.h +++ b/arch/arm/include/asm/flat.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/flat.h -- uClinux flat-format executables | 2 | * arch/arm/include/asm/flat.h -- uClinux flat-format executables |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #ifndef __ARM_FLAT_H__ | 5 | #ifndef __ARM_FLAT_H__ |
diff --git a/include/asm-arm/floppy.h b/arch/arm/include/asm/floppy.h index 41a5e9d6bb69..dce20c25ab10 100644 --- a/include/asm-arm/floppy.h +++ b/arch/arm/include/asm/floppy.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/floppy.h | 2 | * arch/arm/include/asm/floppy.h |
3 | * | 3 | * |
4 | * Copyright (C) 1996-2000 Russell King | 4 | * Copyright (C) 1996-2000 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/fpstate.h b/arch/arm/include/asm/fpstate.h index 392eb5332323..ee5e03efc1bb 100644 --- a/include/asm-arm/fpstate.h +++ b/arch/arm/include/asm/fpstate.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/fpstate.h | 2 | * arch/arm/include/asm/fpstate.h |
3 | * | 3 | * |
4 | * Copyright (C) 1995 Russell King | 4 | * Copyright (C) 1995 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/ftrace.h b/arch/arm/include/asm/ftrace.h index 584ef9a8e5a5..584ef9a8e5a5 100644 --- a/include/asm-arm/ftrace.h +++ b/arch/arm/include/asm/ftrace.h | |||
diff --git a/include/asm-arm/futex.h b/arch/arm/include/asm/futex.h index 6a332a9f099c..6a332a9f099c 100644 --- a/include/asm-arm/futex.h +++ b/arch/arm/include/asm/futex.h | |||
diff --git a/include/asm-arm/glue.h b/arch/arm/include/asm/glue.h index a97a182ba287..a0e39d5d00c9 100644 --- a/include/asm-arm/glue.h +++ b/arch/arm/include/asm/glue.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/glue.h | 2 | * arch/arm/include/asm/glue.h |
3 | * | 3 | * |
4 | * Copyright (C) 1997-1999 Russell King | 4 | * Copyright (C) 1997-1999 Russell King |
5 | * Copyright (C) 2000-2002 Deep Blue Solutions Ltd. | 5 | * Copyright (C) 2000-2002 Deep Blue Solutions Ltd. |
diff --git a/include/asm-arm/gpio.h b/arch/arm/include/asm/gpio.h index fff4f800ee42..fff4f800ee42 100644 --- a/include/asm-arm/gpio.h +++ b/arch/arm/include/asm/gpio.h | |||
diff --git a/include/asm-arm/hardirq.h b/arch/arm/include/asm/hardirq.h index 182310b99195..182310b99195 100644 --- a/include/asm-arm/hardirq.h +++ b/arch/arm/include/asm/hardirq.h | |||
diff --git a/include/asm-arm/hardware.h b/arch/arm/include/asm/hardware.h index 1fd1a5b6504b..eb3b3abb7db7 100644 --- a/include/asm-arm/hardware.h +++ b/arch/arm/include/asm/hardware.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/hardware.h | 2 | * arch/arm/include/asm/hardware.h |
3 | * | 3 | * |
4 | * Copyright (C) 1996 Russell King | 4 | * Copyright (C) 1996 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/hardware/arm_timer.h b/arch/arm/include/asm/hardware/arm_timer.h index 04be3bdf46b8..04be3bdf46b8 100644 --- a/include/asm-arm/hardware/arm_timer.h +++ b/arch/arm/include/asm/hardware/arm_timer.h | |||
diff --git a/include/asm-arm/hardware/arm_twd.h b/arch/arm/include/asm/hardware/arm_twd.h index e521b70713c8..e521b70713c8 100644 --- a/include/asm-arm/hardware/arm_twd.h +++ b/arch/arm/include/asm/hardware/arm_twd.h | |||
diff --git a/include/asm-arm/hardware/cache-l2x0.h b/arch/arm/include/asm/hardware/cache-l2x0.h index 54029a740396..64f2252a25cd 100644 --- a/include/asm-arm/hardware/cache-l2x0.h +++ b/arch/arm/include/asm/hardware/cache-l2x0.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/hardware/cache-l2x0.h | 2 | * arch/arm/include/asm/hardware/cache-l2x0.h |
3 | * | 3 | * |
4 | * Copyright (C) 2007 ARM Limited | 4 | * Copyright (C) 2007 ARM Limited |
5 | * | 5 | * |
diff --git a/include/asm-arm/hardware/clps7111.h b/arch/arm/include/asm/hardware/clps7111.h index 8d3228dc1778..44477225aed6 100644 --- a/include/asm-arm/hardware/clps7111.h +++ b/arch/arm/include/asm/hardware/clps7111.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/hardware/clps7111.h | 2 | * arch/arm/include/asm/hardware/clps7111.h |
3 | * | 3 | * |
4 | * This file contains the hardware definitions of the CLPS7111 internal | 4 | * This file contains the hardware definitions of the CLPS7111 internal |
5 | * registers. | 5 | * registers. |
diff --git a/include/asm-arm/hardware/cs89712.h b/arch/arm/include/asm/hardware/cs89712.h index ad99a3e1b802..f75626933e94 100644 --- a/include/asm-arm/hardware/cs89712.h +++ b/arch/arm/include/asm/hardware/cs89712.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/hardware/cs89712.h | 2 | * arch/arm/include/asm/hardware/cs89712.h |
3 | * | 3 | * |
4 | * This file contains the hardware definitions of the CS89712 | 4 | * This file contains the hardware definitions of the CS89712 |
5 | * additional internal registers. | 5 | * additional internal registers. |
diff --git a/include/asm-arm/hardware/debug-8250.S b/arch/arm/include/asm/hardware/debug-8250.S index 07c97fb233fc..22c689255e6e 100644 --- a/include/asm-arm/hardware/debug-8250.S +++ b/arch/arm/include/asm/hardware/debug-8250.S | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/hardware/debug-8250.S | 2 | * arch/arm/include/asm/hardware/debug-8250.S |
3 | * | 3 | * |
4 | * Copyright (C) 1994-1999 Russell King | 4 | * Copyright (C) 1994-1999 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/hardware/debug-pl01x.S b/arch/arm/include/asm/hardware/debug-pl01x.S index 23c541a9e89a..f9fd083eff63 100644 --- a/include/asm-arm/hardware/debug-pl01x.S +++ b/arch/arm/include/asm/hardware/debug-pl01x.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* linux/include/asm-arm/hardware/debug-pl01x.S | 1 | /* arch/arm/include/asm/hardware/debug-pl01x.S |
2 | * | 2 | * |
3 | * Debugging macro include header | 3 | * Debugging macro include header |
4 | * | 4 | * |
diff --git a/include/asm-arm/hardware/dec21285.h b/arch/arm/include/asm/hardware/dec21285.h index 546f7077be9c..7068a1c1e4e4 100644 --- a/include/asm-arm/hardware/dec21285.h +++ b/arch/arm/include/asm/hardware/dec21285.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/hardware/dec21285.h | 2 | * arch/arm/include/asm/hardware/dec21285.h |
3 | * | 3 | * |
4 | * Copyright (C) 1998 Russell King | 4 | * Copyright (C) 1998 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/hardware/entry-macro-iomd.S b/arch/arm/include/asm/hardware/entry-macro-iomd.S index 9bb580a5b15e..e0af4983723f 100644 --- a/include/asm-arm/hardware/entry-macro-iomd.S +++ b/arch/arm/include/asm/hardware/entry-macro-iomd.S | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/hardware/entry-macro-iomd.S | 2 | * arch/arm/include/asm/hardware/entry-macro-iomd.S |
3 | * | 3 | * |
4 | * Low-level IRQ helper macros for IOC/IOMD based platforms | 4 | * Low-level IRQ helper macros for IOC/IOMD based platforms |
5 | * | 5 | * |
diff --git a/include/asm-arm/hardware/ep7211.h b/arch/arm/include/asm/hardware/ep7211.h index 017aa68f612d..654d5f625c49 100644 --- a/include/asm-arm/hardware/ep7211.h +++ b/arch/arm/include/asm/hardware/ep7211.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/hardware/ep7211.h | 2 | * arch/arm/include/asm/hardware/ep7211.h |
3 | * | 3 | * |
4 | * This file contains the hardware definitions of the EP7211 internal | 4 | * This file contains the hardware definitions of the EP7211 internal |
5 | * registers. | 5 | * registers. |
diff --git a/include/asm-arm/hardware/ep7212.h b/arch/arm/include/asm/hardware/ep7212.h index 0e952e747073..3b43bbeaf1db 100644 --- a/include/asm-arm/hardware/ep7212.h +++ b/arch/arm/include/asm/hardware/ep7212.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/hardware/ep7212.h | 2 | * arch/arm/include/asm/hardware/ep7212.h |
3 | * | 3 | * |
4 | * This file contains the hardware definitions of the EP7212 internal | 4 | * This file contains the hardware definitions of the EP7212 internal |
5 | * registers. | 5 | * registers. |
diff --git a/include/asm-arm/hardware/gic.h b/arch/arm/include/asm/hardware/gic.h index 966e428ad32c..4924914af188 100644 --- a/include/asm-arm/hardware/gic.h +++ b/arch/arm/include/asm/hardware/gic.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/hardware/gic.h | 2 | * arch/arm/include/asm/hardware/gic.h |
3 | * | 3 | * |
4 | * Copyright (C) 2002 ARM Limited, All Rights Reserved. | 4 | * Copyright (C) 2002 ARM Limited, All Rights Reserved. |
5 | * | 5 | * |
diff --git a/include/asm-arm/hardware/icst307.h b/arch/arm/include/asm/hardware/icst307.h index ff8618a441c0..554f128a1046 100644 --- a/include/asm-arm/hardware/icst307.h +++ b/arch/arm/include/asm/hardware/icst307.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/hardware/icst307.h | 2 | * arch/arm/include/asm/hardware/icst307.h |
3 | * | 3 | * |
4 | * Copyright (C) 2003 Deep Blue Solutions, Ltd, All Rights Reserved. | 4 | * Copyright (C) 2003 Deep Blue Solutions, Ltd, All Rights Reserved. |
5 | * | 5 | * |
diff --git a/include/asm-arm/hardware/icst525.h b/arch/arm/include/asm/hardware/icst525.h index edd5a5704406..58f0dc43e2ed 100644 --- a/include/asm-arm/hardware/icst525.h +++ b/arch/arm/include/asm/hardware/icst525.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/hardware/icst525.h | 2 | * arch/arm/include/asm/hardware/icst525.h |
3 | * | 3 | * |
4 | * Copyright (C) 2003 Deep Blue Solutions, Ltd, All Rights Reserved. | 4 | * Copyright (C) 2003 Deep Blue Solutions, Ltd, All Rights Reserved. |
5 | * | 5 | * |
diff --git a/include/asm-arm/hardware/ioc.h b/arch/arm/include/asm/hardware/ioc.h index b3b46ef65943..1f6b8013becb 100644 --- a/include/asm-arm/hardware/ioc.h +++ b/arch/arm/include/asm/hardware/ioc.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/hardware/ioc.h | 2 | * arch/arm/include/asm/hardware/ioc.h |
3 | * | 3 | * |
4 | * Copyright (C) Russell King | 4 | * Copyright (C) Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/hardware/iomd.h b/arch/arm/include/asm/hardware/iomd.h index 396e55ad06c6..9c5afbd71a69 100644 --- a/include/asm-arm/hardware/iomd.h +++ b/arch/arm/include/asm/hardware/iomd.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/hardware/iomd.h | 2 | * arch/arm/include/asm/hardware/iomd.h |
3 | * | 3 | * |
4 | * Copyright (C) 1999 Russell King | 4 | * Copyright (C) 1999 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/hardware/iop3xx-adma.h b/arch/arm/include/asm/hardware/iop3xx-adma.h index af64676650a2..af64676650a2 100644 --- a/include/asm-arm/hardware/iop3xx-adma.h +++ b/arch/arm/include/asm/hardware/iop3xx-adma.h | |||
diff --git a/include/asm-arm/hardware/iop3xx-gpio.h b/arch/arm/include/asm/hardware/iop3xx-gpio.h index 0c9331f9ac24..222e74b7c463 100644 --- a/include/asm-arm/hardware/iop3xx-gpio.h +++ b/arch/arm/include/asm/hardware/iop3xx-gpio.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/hardware/iop3xx-gpio.h | 2 | * arch/arm/include/asm/hardware/iop3xx-gpio.h |
3 | * | 3 | * |
4 | * IOP3xx GPIO wrappers | 4 | * IOP3xx GPIO wrappers |
5 | * | 5 | * |
diff --git a/include/asm-arm/hardware/iop3xx.h b/arch/arm/include/asm/hardware/iop3xx.h index 18f6937f5010..4b8e7f559929 100644 --- a/include/asm-arm/hardware/iop3xx.h +++ b/arch/arm/include/asm/hardware/iop3xx.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/hardware/iop3xx.h | 2 | * arch/arm/include/asm/hardware/iop3xx.h |
3 | * | 3 | * |
4 | * Intel IOP32X and IOP33X register definitions | 4 | * Intel IOP32X and IOP33X register definitions |
5 | * | 5 | * |
diff --git a/include/asm-arm/hardware/iop_adma.h b/arch/arm/include/asm/hardware/iop_adma.h index cb7e3611bcba..cb7e3611bcba 100644 --- a/include/asm-arm/hardware/iop_adma.h +++ b/arch/arm/include/asm/hardware/iop_adma.h | |||
diff --git a/include/asm-arm/hardware/it8152.h b/arch/arm/include/asm/hardware/it8152.h index 74b5fff7f575..74b5fff7f575 100644 --- a/include/asm-arm/hardware/it8152.h +++ b/arch/arm/include/asm/hardware/it8152.h | |||
diff --git a/include/asm-arm/hardware/linkup-l1110.h b/arch/arm/include/asm/hardware/linkup-l1110.h index 7ec91168a576..7ec91168a576 100644 --- a/include/asm-arm/hardware/linkup-l1110.h +++ b/arch/arm/include/asm/hardware/linkup-l1110.h | |||
diff --git a/include/asm-arm/hardware/locomo.h b/arch/arm/include/asm/hardware/locomo.h index fb0645de6f31..954b1be991b4 100644 --- a/include/asm-arm/hardware/locomo.h +++ b/arch/arm/include/asm/hardware/locomo.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/hardware/locomo.h | 2 | * arch/arm/include/asm/hardware/locomo.h |
3 | * | 3 | * |
4 | * This file contains the definitions for the LoCoMo G/A Chip | 4 | * This file contains the definitions for the LoCoMo G/A Chip |
5 | * | 5 | * |
diff --git a/include/asm-arm/hardware/memc.h b/arch/arm/include/asm/hardware/memc.h index 8aef5aa0e01b..42ba7c167d1f 100644 --- a/include/asm-arm/hardware/memc.h +++ b/arch/arm/include/asm/hardware/memc.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/hardware/memc.h | 2 | * arch/arm/include/asm/hardware/memc.h |
3 | * | 3 | * |
4 | * Copyright (C) Russell King. | 4 | * Copyright (C) Russell King. |
5 | * | 5 | * |
diff --git a/include/asm-arm/hardware/pci_v3.h b/arch/arm/include/asm/hardware/pci_v3.h index 4d497bdb9a97..2811c7e2cfdf 100644 --- a/include/asm-arm/hardware/pci_v3.h +++ b/arch/arm/include/asm/hardware/pci_v3.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/hardware/pci_v3.h | 2 | * arch/arm/include/asm/hardware/pci_v3.h |
3 | * | 3 | * |
4 | * Internal header file PCI V3 chip | 4 | * Internal header file PCI V3 chip |
5 | * | 5 | * |
diff --git a/include/asm-arm/hardware/sa1111.h b/arch/arm/include/asm/hardware/sa1111.h index 61b1d05c7df7..6cf98d4f7dc3 100644 --- a/include/asm-arm/hardware/sa1111.h +++ b/arch/arm/include/asm/hardware/sa1111.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/hardware/sa1111.h | 2 | * arch/arm/include/asm/hardware/sa1111.h |
3 | * | 3 | * |
4 | * Copyright (C) 2000 John G Dorsey <john+@cs.cmu.edu> | 4 | * Copyright (C) 2000 John G Dorsey <john+@cs.cmu.edu> |
5 | * | 5 | * |
diff --git a/include/asm-arm/hardware/scoop.h b/arch/arm/include/asm/hardware/scoop.h index dfb8330599f9..dfb8330599f9 100644 --- a/include/asm-arm/hardware/scoop.h +++ b/arch/arm/include/asm/hardware/scoop.h | |||
diff --git a/include/asm-arm/hardware/sharpsl_pm.h b/arch/arm/include/asm/hardware/sharpsl_pm.h index 2d00db22b981..2d00db22b981 100644 --- a/include/asm-arm/hardware/sharpsl_pm.h +++ b/arch/arm/include/asm/hardware/sharpsl_pm.h | |||
diff --git a/include/asm-arm/hardware/ssp.h b/arch/arm/include/asm/hardware/ssp.h index 3b42e181997c..3b42e181997c 100644 --- a/include/asm-arm/hardware/ssp.h +++ b/arch/arm/include/asm/hardware/ssp.h | |||
diff --git a/include/asm-arm/hardware/uengine.h b/arch/arm/include/asm/hardware/uengine.h index b442d65c6593..b442d65c6593 100644 --- a/include/asm-arm/hardware/uengine.h +++ b/arch/arm/include/asm/hardware/uengine.h | |||
diff --git a/include/asm-arm/hardware/vic.h b/arch/arm/include/asm/hardware/vic.h index ed9ca3736a0b..263f2c362a30 100644 --- a/include/asm-arm/hardware/vic.h +++ b/arch/arm/include/asm/hardware/vic.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/hardware/vic.h | 2 | * arch/arm/include/asm/hardware/vic.h |
3 | * | 3 | * |
4 | * Copyright (c) ARM Limited 2003. All rights reserved. | 4 | * Copyright (c) ARM Limited 2003. All rights reserved. |
5 | * | 5 | * |
diff --git a/include/asm-arm/hw_irq.h b/arch/arm/include/asm/hw_irq.h index f1a08a500604..f1a08a500604 100644 --- a/include/asm-arm/hw_irq.h +++ b/arch/arm/include/asm/hw_irq.h | |||
diff --git a/include/asm-arm/hwcap.h b/arch/arm/include/asm/hwcap.h index 81f4c899a555..81f4c899a555 100644 --- a/include/asm-arm/hwcap.h +++ b/arch/arm/include/asm/hwcap.h | |||
diff --git a/include/asm-arm/ide.h b/arch/arm/include/asm/ide.h index a48019f99d08..b507ce8e5019 100644 --- a/include/asm-arm/ide.h +++ b/arch/arm/include/asm/ide.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/ide.h | 2 | * arch/arm/include/asm/ide.h |
3 | * | 3 | * |
4 | * Copyright (C) 1994-1996 Linus Torvalds & authors | 4 | * Copyright (C) 1994-1996 Linus Torvalds & authors |
5 | */ | 5 | */ |
diff --git a/include/asm-arm/io.h b/arch/arm/include/asm/io.h index eebe56e74d6d..ffe07c0f46d8 100644 --- a/include/asm-arm/io.h +++ b/arch/arm/include/asm/io.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/io.h | 2 | * arch/arm/include/asm/io.h |
3 | * | 3 | * |
4 | * Copyright (C) 1996-2000 Russell King | 4 | * Copyright (C) 1996-2000 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/ioctl.h b/arch/arm/include/asm/ioctl.h index b279fe06dfe5..b279fe06dfe5 100644 --- a/include/asm-arm/ioctl.h +++ b/arch/arm/include/asm/ioctl.h | |||
diff --git a/include/asm-arm/ioctls.h b/arch/arm/include/asm/ioctls.h index a91d8a1523cf..a91d8a1523cf 100644 --- a/include/asm-arm/ioctls.h +++ b/arch/arm/include/asm/ioctls.h | |||
diff --git a/include/asm-arm/ipcbuf.h b/arch/arm/include/asm/ipcbuf.h index 97683975f7df..97683975f7df 100644 --- a/include/asm-arm/ipcbuf.h +++ b/arch/arm/include/asm/ipcbuf.h | |||
diff --git a/include/asm-arm/irq.h b/arch/arm/include/asm/irq.h index 9cb01907e43b..9cb01907e43b 100644 --- a/include/asm-arm/irq.h +++ b/arch/arm/include/asm/irq.h | |||
diff --git a/include/asm-arm/irq_regs.h b/arch/arm/include/asm/irq_regs.h index 3dd9c0b70270..3dd9c0b70270 100644 --- a/include/asm-arm/irq_regs.h +++ b/arch/arm/include/asm/irq_regs.h | |||
diff --git a/include/asm-arm/irqflags.h b/arch/arm/include/asm/irqflags.h index 6d09974e6646..6d09974e6646 100644 --- a/include/asm-arm/irqflags.h +++ b/arch/arm/include/asm/irqflags.h | |||
diff --git a/include/asm-arm/kdebug.h b/arch/arm/include/asm/kdebug.h index 6ece1b037665..6ece1b037665 100644 --- a/include/asm-arm/kdebug.h +++ b/arch/arm/include/asm/kdebug.h | |||
diff --git a/include/asm-arm/kexec.h b/arch/arm/include/asm/kexec.h index c8986bb99ed5..c8986bb99ed5 100644 --- a/include/asm-arm/kexec.h +++ b/arch/arm/include/asm/kexec.h | |||
diff --git a/include/asm-arm/kgdb.h b/arch/arm/include/asm/kgdb.h index 67af4b841984..67af4b841984 100644 --- a/include/asm-arm/kgdb.h +++ b/arch/arm/include/asm/kgdb.h | |||
diff --git a/include/asm-arm/kmap_types.h b/arch/arm/include/asm/kmap_types.h index 45def13ee17a..45def13ee17a 100644 --- a/include/asm-arm/kmap_types.h +++ b/arch/arm/include/asm/kmap_types.h | |||
diff --git a/include/asm-arm/kprobes.h b/arch/arm/include/asm/kprobes.h index b1a37876942d..a5d0d99ad387 100644 --- a/include/asm-arm/kprobes.h +++ b/arch/arm/include/asm/kprobes.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/kprobes.h | 2 | * arch/arm/include/asm/kprobes.h |
3 | * | 3 | * |
4 | * Copyright (C) 2006, 2007 Motorola Inc. | 4 | * Copyright (C) 2006, 2007 Motorola Inc. |
5 | * | 5 | * |
diff --git a/include/asm-arm/leds.h b/arch/arm/include/asm/leds.h index 12290ea55801..c545739f39b7 100644 --- a/include/asm-arm/leds.h +++ b/arch/arm/include/asm/leds.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/leds.h | 2 | * arch/arm/include/asm/leds.h |
3 | * | 3 | * |
4 | * Copyright (C) 1998 Russell King | 4 | * Copyright (C) 1998 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/limits.h b/arch/arm/include/asm/limits.h index 08d8c6600804..08d8c6600804 100644 --- a/include/asm-arm/limits.h +++ b/arch/arm/include/asm/limits.h | |||
diff --git a/include/asm-arm/linkage.h b/arch/arm/include/asm/linkage.h index 5a25632b1bc0..5a25632b1bc0 100644 --- a/include/asm-arm/linkage.h +++ b/arch/arm/include/asm/linkage.h | |||
diff --git a/include/asm-arm/local.h b/arch/arm/include/asm/local.h index c11c530f74d0..c11c530f74d0 100644 --- a/include/asm-arm/local.h +++ b/arch/arm/include/asm/local.h | |||
diff --git a/include/asm-arm/locks.h b/arch/arm/include/asm/locks.h index 852220eecdbc..ef4c897772d1 100644 --- a/include/asm-arm/locks.h +++ b/arch/arm/include/asm/locks.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/locks.h | 2 | * arch/arm/include/asm/locks.h |
3 | * | 3 | * |
4 | * Copyright (C) 2000 Russell King | 4 | * Copyright (C) 2000 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/mach/arch.h b/arch/arm/include/asm/mach/arch.h index bcc8aed7c9a9..c59842dc7cb8 100644 --- a/include/asm-arm/mach/arch.h +++ b/arch/arm/include/asm/mach/arch.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/mach/arch.h | 2 | * arch/arm/include/asm/mach/arch.h |
3 | * | 3 | * |
4 | * Copyright (C) 2000 Russell King | 4 | * Copyright (C) 2000 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/mach/dma.h b/arch/arm/include/asm/mach/dma.h index e7c4a20aad53..fc7278ea7146 100644 --- a/include/asm-arm/mach/dma.h +++ b/arch/arm/include/asm/mach/dma.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/mach/dma.h | 2 | * arch/arm/include/asm/mach/dma.h |
3 | * | 3 | * |
4 | * Copyright (C) 1998-2000 Russell King | 4 | * Copyright (C) 1998-2000 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/mach/flash.h b/arch/arm/include/asm/mach/flash.h index 05b029ef6371..4ca69fe2c850 100644 --- a/include/asm-arm/mach/flash.h +++ b/arch/arm/include/asm/mach/flash.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/mach/flash.h | 2 | * arch/arm/include/asm/mach/flash.h |
3 | * | 3 | * |
4 | * Copyright (C) 2003 Russell King, All Rights Reserved. | 4 | * Copyright (C) 2003 Russell King, All Rights Reserved. |
5 | * | 5 | * |
diff --git a/include/asm-arm/mach/irda.h b/arch/arm/include/asm/mach/irda.h index 58984d9c0b0b..38f77b5e56cf 100644 --- a/include/asm-arm/mach/irda.h +++ b/arch/arm/include/asm/mach/irda.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/mach/irda.h | 2 | * arch/arm/include/asm/mach/irda.h |
3 | * | 3 | * |
4 | * Copyright (C) 2004 Russell King. | 4 | * Copyright (C) 2004 Russell King. |
5 | * | 5 | * |
diff --git a/include/asm-arm/mach/irq.h b/arch/arm/include/asm/mach/irq.h index eb0bfba6570d..c57b52ce574a 100644 --- a/include/asm-arm/mach/irq.h +++ b/arch/arm/include/asm/mach/irq.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/mach/irq.h | 2 | * arch/arm/include/asm/mach/irq.h |
3 | * | 3 | * |
4 | * Copyright (C) 1995-2000 Russell King. | 4 | * Copyright (C) 1995-2000 Russell King. |
5 | * | 5 | * |
diff --git a/include/asm-arm/mach/map.h b/arch/arm/include/asm/mach/map.h index 7ef3c8390180..06f583b13999 100644 --- a/include/asm-arm/mach/map.h +++ b/arch/arm/include/asm/mach/map.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/map.h | 2 | * arch/arm/include/asm/map.h |
3 | * | 3 | * |
4 | * Copyright (C) 1999-2000 Russell King | 4 | * Copyright (C) 1999-2000 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/mach/mmc.h b/arch/arm/include/asm/mach/mmc.h index eb91145c00c4..4da332b03144 100644 --- a/include/asm-arm/mach/mmc.h +++ b/arch/arm/include/asm/mach/mmc.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/mach/mmc.h | 2 | * arch/arm/include/asm/mach/mmc.h |
3 | */ | 3 | */ |
4 | #ifndef ASMARM_MACH_MMC_H | 4 | #ifndef ASMARM_MACH_MMC_H |
5 | #define ASMARM_MACH_MMC_H | 5 | #define ASMARM_MACH_MMC_H |
diff --git a/include/asm-arm/mach/pci.h b/arch/arm/include/asm/mach/pci.h index 9d4f6b5ea419..32da1ae17e06 100644 --- a/include/asm-arm/mach/pci.h +++ b/arch/arm/include/asm/mach/pci.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/mach/pci.h | 2 | * arch/arm/include/asm/mach/pci.h |
3 | * | 3 | * |
4 | * Copyright (C) 2000 Russell King | 4 | * Copyright (C) 2000 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/mach/serial_at91.h b/arch/arm/include/asm/mach/serial_at91.h index 55b317a89061..ea6d063923b8 100644 --- a/include/asm-arm/mach/serial_at91.h +++ b/arch/arm/include/asm/mach/serial_at91.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/mach/serial_at91.h | 2 | * arch/arm/include/asm/mach/serial_at91.h |
3 | * | 3 | * |
4 | * Based on serial_sa1100.h by Nicolas Pitre | 4 | * Based on serial_sa1100.h by Nicolas Pitre |
5 | * | 5 | * |
diff --git a/include/asm-arm/mach/serial_sa1100.h b/arch/arm/include/asm/mach/serial_sa1100.h index 20c22bb218d9..d09064bf95a0 100644 --- a/include/asm-arm/mach/serial_sa1100.h +++ b/arch/arm/include/asm/mach/serial_sa1100.h | |||
@@ -1,9 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/mach/serial_sa1100.h | 2 | * arch/arm/include/asm/mach/serial_sa1100.h |
3 | * | 3 | * |
4 | * Author: Nicolas Pitre | 4 | * Author: Nicolas Pitre |
5 | * | 5 | * |
6 | * Moved to include/asm-arm/mach and changed lots, Russell King | 6 | * Moved and changed lots, Russell King |
7 | * | 7 | * |
8 | * Low level machine dependent UART functions. | 8 | * Low level machine dependent UART functions. |
9 | */ | 9 | */ |
diff --git a/include/asm-arm/mach/sharpsl_param.h b/arch/arm/include/asm/mach/sharpsl_param.h index 7a24ecf04220..7a24ecf04220 100644 --- a/include/asm-arm/mach/sharpsl_param.h +++ b/arch/arm/include/asm/mach/sharpsl_param.h | |||
diff --git a/include/asm-arm/mach/time.h b/arch/arm/include/asm/mach/time.h index 2fd36ea0130d..b2cc1fcd0400 100644 --- a/include/asm-arm/mach/time.h +++ b/arch/arm/include/asm/mach/time.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/mach/time.h | 2 | * arch/arm/include/asm/mach/time.h |
3 | * | 3 | * |
4 | * Copyright (C) 2004 MontaVista Software, Inc. | 4 | * Copyright (C) 2004 MontaVista Software, Inc. |
5 | * | 5 | * |
diff --git a/include/asm-arm/mach/udc_pxa2xx.h b/arch/arm/include/asm/mach/udc_pxa2xx.h index 9e5ed7c0f27f..270902c353fd 100644 --- a/include/asm-arm/mach/udc_pxa2xx.h +++ b/arch/arm/include/asm/mach/udc_pxa2xx.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/mach/udc_pxa2xx.h | 2 | * arch/arm/include/asm/mach/udc_pxa2xx.h |
3 | * | 3 | * |
4 | * This supports machine-specific differences in how the PXA2xx | 4 | * This supports machine-specific differences in how the PXA2xx |
5 | * USB Device Controller (UDC) is wired. | 5 | * USB Device Controller (UDC) is wired. |
diff --git a/include/asm-arm/mc146818rtc.h b/arch/arm/include/asm/mc146818rtc.h index 7b81e0c42543..7b81e0c42543 100644 --- a/include/asm-arm/mc146818rtc.h +++ b/arch/arm/include/asm/mc146818rtc.h | |||
diff --git a/include/asm-arm/memory.h b/arch/arm/include/asm/memory.h index 9ba4d7136e6b..92069221dca9 100644 --- a/include/asm-arm/memory.h +++ b/arch/arm/include/asm/memory.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/memory.h | 2 | * arch/arm/include/asm/memory.h |
3 | * | 3 | * |
4 | * Copyright (C) 2000-2002 Russell King | 4 | * Copyright (C) 2000-2002 Russell King |
5 | * modification for nommu, Hyok S. Choi, 2004 | 5 | * modification for nommu, Hyok S. Choi, 2004 |
diff --git a/include/asm-arm/mman.h b/arch/arm/include/asm/mman.h index 54570d2e95b7..54570d2e95b7 100644 --- a/include/asm-arm/mman.h +++ b/arch/arm/include/asm/mman.h | |||
diff --git a/include/asm-arm/mmu.h b/arch/arm/include/asm/mmu.h index 53099d4ee421..53099d4ee421 100644 --- a/include/asm-arm/mmu.h +++ b/arch/arm/include/asm/mmu.h | |||
diff --git a/include/asm-arm/mmu_context.h b/arch/arm/include/asm/mmu_context.h index 91b9dfdfed52..a301e446007f 100644 --- a/include/asm-arm/mmu_context.h +++ b/arch/arm/include/asm/mmu_context.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/mmu_context.h | 2 | * arch/arm/include/asm/mmu_context.h |
3 | * | 3 | * |
4 | * Copyright (C) 1996 Russell King. | 4 | * Copyright (C) 1996 Russell King. |
5 | * | 5 | * |
diff --git a/include/asm-arm/mmzone.h b/arch/arm/include/asm/mmzone.h index b87de151f0a4..f2fbb5084901 100644 --- a/include/asm-arm/mmzone.h +++ b/arch/arm/include/asm/mmzone.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/mmzone.h | 2 | * arch/arm/include/asm/mmzone.h |
3 | * | 3 | * |
4 | * 1999-12-29 Nicolas Pitre Created | 4 | * 1999-12-29 Nicolas Pitre Created |
5 | * | 5 | * |
diff --git a/include/asm-arm/module.h b/arch/arm/include/asm/module.h index 24b168dc31a3..24b168dc31a3 100644 --- a/include/asm-arm/module.h +++ b/arch/arm/include/asm/module.h | |||
diff --git a/include/asm-arm/msgbuf.h b/arch/arm/include/asm/msgbuf.h index 33b35b946eaa..33b35b946eaa 100644 --- a/include/asm-arm/msgbuf.h +++ b/arch/arm/include/asm/msgbuf.h | |||
diff --git a/include/asm-arm/mtd-xip.h b/arch/arm/include/asm/mtd-xip.h index 9eb127cc7db2..9eb127cc7db2 100644 --- a/include/asm-arm/mtd-xip.h +++ b/arch/arm/include/asm/mtd-xip.h | |||
diff --git a/include/asm-arm/mutex.h b/arch/arm/include/asm/mutex.h index 020bd98710a1..93226cf23ae0 100644 --- a/include/asm-arm/mutex.h +++ b/arch/arm/include/asm/mutex.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/mutex.h | 2 | * arch/arm/include/asm/mutex.h |
3 | * | 3 | * |
4 | * ARM optimized mutex locking primitives | 4 | * ARM optimized mutex locking primitives |
5 | * | 5 | * |
diff --git a/include/asm-arm/nwflash.h b/arch/arm/include/asm/nwflash.h index 04e5a557a884..04e5a557a884 100644 --- a/include/asm-arm/nwflash.h +++ b/arch/arm/include/asm/nwflash.h | |||
diff --git a/include/asm-arm/page-nommu.h b/arch/arm/include/asm/page-nommu.h index ea1cde84f500..3574c0deb37f 100644 --- a/include/asm-arm/page-nommu.h +++ b/arch/arm/include/asm/page-nommu.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/page-nommu.h | 2 | * arch/arm/include/asm/page-nommu.h |
3 | * | 3 | * |
4 | * Copyright (C) 2004 Hyok S. Choi | 4 | * Copyright (C) 2004 Hyok S. Choi |
5 | * | 5 | * |
diff --git a/include/asm-arm/page.h b/arch/arm/include/asm/page.h index 7c5fc5582e5d..cf2e2680daaa 100644 --- a/include/asm-arm/page.h +++ b/arch/arm/include/asm/page.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/page.h | 2 | * arch/arm/include/asm/page.h |
3 | * | 3 | * |
4 | * Copyright (C) 1995-2003 Russell King | 4 | * Copyright (C) 1995-2003 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/param.h b/arch/arm/include/asm/param.h index 15806468ba72..8b24bf94c06b 100644 --- a/include/asm-arm/param.h +++ b/arch/arm/include/asm/param.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/param.h | 2 | * arch/arm/include/asm/param.h |
3 | * | 3 | * |
4 | * Copyright (C) 1995-1999 Russell King | 4 | * Copyright (C) 1995-1999 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/parport.h b/arch/arm/include/asm/parport.h index f2f90c76ddd1..26e94b09035a 100644 --- a/include/asm-arm/parport.h +++ b/arch/arm/include/asm/parport.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/parport.h: ARM-specific parport initialisation | 2 | * arch/arm/include/asm/parport.h: ARM-specific parport initialisation |
3 | * | 3 | * |
4 | * Copyright (C) 1999, 2000 Tim Waugh <tim@cyberelk.demon.co.uk> | 4 | * Copyright (C) 1999, 2000 Tim Waugh <tim@cyberelk.demon.co.uk> |
5 | * | 5 | * |
diff --git a/include/asm-arm/pci.h b/arch/arm/include/asm/pci.h index 2d84792f2e12..2d84792f2e12 100644 --- a/include/asm-arm/pci.h +++ b/arch/arm/include/asm/pci.h | |||
diff --git a/include/asm-arm/percpu.h b/arch/arm/include/asm/percpu.h index b4e32d8ec072..b4e32d8ec072 100644 --- a/include/asm-arm/percpu.h +++ b/arch/arm/include/asm/percpu.h | |||
diff --git a/include/asm-arm/pgalloc.h b/arch/arm/include/asm/pgalloc.h index 163b0305dd76..3dcd64bf1824 100644 --- a/include/asm-arm/pgalloc.h +++ b/arch/arm/include/asm/pgalloc.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/pgalloc.h | 2 | * arch/arm/include/asm/pgalloc.h |
3 | * | 3 | * |
4 | * Copyright (C) 2000-2001 Russell King | 4 | * Copyright (C) 2000-2001 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/pgtable-hwdef.h b/arch/arm/include/asm/pgtable-hwdef.h index f3b5120c99fe..fd1521d5cb9d 100644 --- a/include/asm-arm/pgtable-hwdef.h +++ b/arch/arm/include/asm/pgtable-hwdef.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/pgtable-hwdef.h | 2 | * arch/arm/include/asm/pgtable-hwdef.h |
3 | * | 3 | * |
4 | * Copyright (C) 1995-2002 Russell King | 4 | * Copyright (C) 1995-2002 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/pgtable-nommu.h b/arch/arm/include/asm/pgtable-nommu.h index 386fcc10a973..b011f2e939aa 100644 --- a/include/asm-arm/pgtable-nommu.h +++ b/arch/arm/include/asm/pgtable-nommu.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/pgtable-nommu.h | 2 | * arch/arm/include/asm/pgtable-nommu.h |
3 | * | 3 | * |
4 | * Copyright (C) 1995-2002 Russell King | 4 | * Copyright (C) 1995-2002 Russell King |
5 | * Copyright (C) 2004 Hyok S. Choi | 5 | * Copyright (C) 2004 Hyok S. Choi |
diff --git a/include/asm-arm/pgtable.h b/arch/arm/include/asm/pgtable.h index 5571c13c3f3b..8ab060a53ab0 100644 --- a/include/asm-arm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/pgtable.h | 2 | * arch/arm/include/asm/pgtable.h |
3 | * | 3 | * |
4 | * Copyright (C) 1995-2002 Russell King | 4 | * Copyright (C) 1995-2002 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/poll.h b/arch/arm/include/asm/poll.h index c98509d3149e..c98509d3149e 100644 --- a/include/asm-arm/poll.h +++ b/arch/arm/include/asm/poll.h | |||
diff --git a/include/asm-arm/posix_types.h b/arch/arm/include/asm/posix_types.h index c37379dadcb2..2446d23bfdbf 100644 --- a/include/asm-arm/posix_types.h +++ b/arch/arm/include/asm/posix_types.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/posix_types.h | 2 | * arch/arm/include/asm/posix_types.h |
3 | * | 3 | * |
4 | * Copyright (C) 1996-1998 Russell King. | 4 | * Copyright (C) 1996-1998 Russell King. |
5 | * | 5 | * |
diff --git a/include/asm-arm/proc-fns.h b/arch/arm/include/asm/proc-fns.h index 75ec760f4c74..db80203b68e0 100644 --- a/include/asm-arm/proc-fns.h +++ b/arch/arm/include/asm/proc-fns.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/proc-fns.h | 2 | * arch/arm/include/asm/proc-fns.h |
3 | * | 3 | * |
4 | * Copyright (C) 1997-1999 Russell King | 4 | * Copyright (C) 1997-1999 Russell King |
5 | * Copyright (C) 2000 Deep Blue Solutions Ltd | 5 | * Copyright (C) 2000 Deep Blue Solutions Ltd |
diff --git a/include/asm-arm/processor.h b/arch/arm/include/asm/processor.h index bd8029e8dc67..b01d5e7e3d5a 100644 --- a/include/asm-arm/processor.h +++ b/arch/arm/include/asm/processor.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/processor.h | 2 | * arch/arm/include/asm/processor.h |
3 | * | 3 | * |
4 | * Copyright (C) 1995-1999 Russell King | 4 | * Copyright (C) 1995-1999 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/procinfo.h b/arch/arm/include/asm/procinfo.h index 4d3c685075e0..ca52e584ef74 100644 --- a/include/asm-arm/procinfo.h +++ b/arch/arm/include/asm/procinfo.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/procinfo.h | 2 | * arch/arm/include/asm/procinfo.h |
3 | * | 3 | * |
4 | * Copyright (C) 1996-1999 Russell King | 4 | * Copyright (C) 1996-1999 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/ptrace.h b/arch/arm/include/asm/ptrace.h index 8382b7510f94..b415c0e85458 100644 --- a/include/asm-arm/ptrace.h +++ b/arch/arm/include/asm/ptrace.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/ptrace.h | 2 | * arch/arm/include/asm/ptrace.h |
3 | * | 3 | * |
4 | * Copyright (C) 1996-2003 Russell King | 4 | * Copyright (C) 1996-2003 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/resource.h b/arch/arm/include/asm/resource.h index 734b581b5b6a..734b581b5b6a 100644 --- a/include/asm-arm/resource.h +++ b/arch/arm/include/asm/resource.h | |||
diff --git a/include/asm-arm/scatterlist.h b/arch/arm/include/asm/scatterlist.h index ca0a37d03400..ca0a37d03400 100644 --- a/include/asm-arm/scatterlist.h +++ b/arch/arm/include/asm/scatterlist.h | |||
diff --git a/include/asm-arm/sections.h b/arch/arm/include/asm/sections.h index 2b8c5160388f..2b8c5160388f 100644 --- a/include/asm-arm/sections.h +++ b/arch/arm/include/asm/sections.h | |||
diff --git a/include/asm-arm/segment.h b/arch/arm/include/asm/segment.h index 9e24c21f6304..9e24c21f6304 100644 --- a/include/asm-arm/segment.h +++ b/arch/arm/include/asm/segment.h | |||
diff --git a/include/asm-arm/sembuf.h b/arch/arm/include/asm/sembuf.h index 1c0283954289..1c0283954289 100644 --- a/include/asm-arm/sembuf.h +++ b/arch/arm/include/asm/sembuf.h | |||
diff --git a/include/asm-arm/serial.h b/arch/arm/include/asm/serial.h index 015b262dc145..ebb049091e26 100644 --- a/include/asm-arm/serial.h +++ b/arch/arm/include/asm/serial.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/serial.h | 2 | * arch/arm/include/asm/serial.h |
3 | * | 3 | * |
4 | * Copyright (C) 1996 Russell King. | 4 | * Copyright (C) 1996 Russell King. |
5 | * | 5 | * |
diff --git a/include/asm-arm/setup.h b/arch/arm/include/asm/setup.h index 7bbf105463f1..7bbf105463f1 100644 --- a/include/asm-arm/setup.h +++ b/arch/arm/include/asm/setup.h | |||
diff --git a/include/asm-arm/shmbuf.h b/arch/arm/include/asm/shmbuf.h index 2e5c67ba1c97..2e5c67ba1c97 100644 --- a/include/asm-arm/shmbuf.h +++ b/arch/arm/include/asm/shmbuf.h | |||
diff --git a/include/asm-arm/shmparam.h b/arch/arm/include/asm/shmparam.h index a5223b3a9bf9..a5223b3a9bf9 100644 --- a/include/asm-arm/shmparam.h +++ b/arch/arm/include/asm/shmparam.h | |||
diff --git a/include/asm-arm/sigcontext.h b/arch/arm/include/asm/sigcontext.h index fc0b80b6a6fc..fc0b80b6a6fc 100644 --- a/include/asm-arm/sigcontext.h +++ b/arch/arm/include/asm/sigcontext.h | |||
diff --git a/include/asm-arm/siginfo.h b/arch/arm/include/asm/siginfo.h index 5e21852e6039..5e21852e6039 100644 --- a/include/asm-arm/siginfo.h +++ b/arch/arm/include/asm/siginfo.h | |||
diff --git a/include/asm-arm/signal.h b/arch/arm/include/asm/signal.h index d0fb487aba4f..d0fb487aba4f 100644 --- a/include/asm-arm/signal.h +++ b/arch/arm/include/asm/signal.h | |||
diff --git a/include/asm-arm/sizes.h b/arch/arm/include/asm/sizes.h index 503843db1565..503843db1565 100644 --- a/include/asm-arm/sizes.h +++ b/arch/arm/include/asm/sizes.h | |||
diff --git a/include/asm-arm/smp.h b/arch/arm/include/asm/smp.h index 7fffa2404b8e..cc12a525a06a 100644 --- a/include/asm-arm/smp.h +++ b/arch/arm/include/asm/smp.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/smp.h | 2 | * arch/arm/include/asm/smp.h |
3 | * | 3 | * |
4 | * Copyright (C) 2004-2005 ARM Ltd. | 4 | * Copyright (C) 2004-2005 ARM Ltd. |
5 | * | 5 | * |
@@ -17,7 +17,7 @@ | |||
17 | #include <asm/arch/smp.h> | 17 | #include <asm/arch/smp.h> |
18 | 18 | ||
19 | #ifndef CONFIG_SMP | 19 | #ifndef CONFIG_SMP |
20 | # error "<asm-arm/smp.h> included in non-SMP build" | 20 | # error "<asm/smp.h> included in non-SMP build" |
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | #define raw_smp_processor_id() (current_thread_info()->cpu) | 23 | #define raw_smp_processor_id() (current_thread_info()->cpu) |
diff --git a/include/asm-arm/socket.h b/arch/arm/include/asm/socket.h index 6817be9573a6..6817be9573a6 100644 --- a/include/asm-arm/socket.h +++ b/arch/arm/include/asm/socket.h | |||
diff --git a/include/asm-arm/sockios.h b/arch/arm/include/asm/sockios.h index a2588a2512df..a2588a2512df 100644 --- a/include/asm-arm/sockios.h +++ b/arch/arm/include/asm/sockios.h | |||
diff --git a/include/asm-arm/sparsemem.h b/arch/arm/include/asm/sparsemem.h index 277158191a0d..277158191a0d 100644 --- a/include/asm-arm/sparsemem.h +++ b/arch/arm/include/asm/sparsemem.h | |||
diff --git a/include/asm-arm/spinlock.h b/arch/arm/include/asm/spinlock.h index 2b41ebbfa7ff..2b41ebbfa7ff 100644 --- a/include/asm-arm/spinlock.h +++ b/arch/arm/include/asm/spinlock.h | |||
diff --git a/include/asm-arm/spinlock_types.h b/arch/arm/include/asm/spinlock_types.h index 43e83f6d2ee5..43e83f6d2ee5 100644 --- a/include/asm-arm/spinlock_types.h +++ b/arch/arm/include/asm/spinlock_types.h | |||
diff --git a/include/asm-arm/stat.h b/arch/arm/include/asm/stat.h index 42c0c13999d5..42c0c13999d5 100644 --- a/include/asm-arm/stat.h +++ b/arch/arm/include/asm/stat.h | |||
diff --git a/include/asm-arm/statfs.h b/arch/arm/include/asm/statfs.h index a02e6a8c3d70..a02e6a8c3d70 100644 --- a/include/asm-arm/statfs.h +++ b/arch/arm/include/asm/statfs.h | |||
diff --git a/include/asm-arm/string.h b/arch/arm/include/asm/string.h index e50c4a39b699..e50c4a39b699 100644 --- a/include/asm-arm/string.h +++ b/arch/arm/include/asm/string.h | |||
diff --git a/include/asm-arm/suspend.h b/arch/arm/include/asm/suspend.h index cf0d0bdee74d..cf0d0bdee74d 100644 --- a/include/asm-arm/suspend.h +++ b/arch/arm/include/asm/suspend.h | |||
diff --git a/include/asm-arm/system.h b/arch/arm/include/asm/system.h index 514af792a598..514af792a598 100644 --- a/include/asm-arm/system.h +++ b/arch/arm/include/asm/system.h | |||
diff --git a/include/asm-arm/termbits.h b/arch/arm/include/asm/termbits.h index f784d11f40b5..f784d11f40b5 100644 --- a/include/asm-arm/termbits.h +++ b/arch/arm/include/asm/termbits.h | |||
diff --git a/include/asm-arm/termios.h b/arch/arm/include/asm/termios.h index 293e3f1bc3f2..293e3f1bc3f2 100644 --- a/include/asm-arm/termios.h +++ b/arch/arm/include/asm/termios.h | |||
diff --git a/include/asm-arm/therm.h b/arch/arm/include/asm/therm.h index e51c923ecdf3..f002f0197d78 100644 --- a/include/asm-arm/therm.h +++ b/arch/arm/include/asm/therm.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/therm.h: Definitions for Dallas Semiconductor | 2 | * arch/arm/include/asm/therm.h: Definitions for Dallas Semiconductor |
3 | * DS1620 thermometer driver (as used in the Rebel.com NetWinder) | 3 | * DS1620 thermometer driver (as used in the Rebel.com NetWinder) |
4 | */ | 4 | */ |
5 | #ifndef __ASM_THERM_H | 5 | #ifndef __ASM_THERM_H |
diff --git a/include/asm-arm/thread_info.h b/arch/arm/include/asm/thread_info.h index d4be2d646160..e56fa48e4ae7 100644 --- a/include/asm-arm/thread_info.h +++ b/arch/arm/include/asm/thread_info.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/thread_info.h | 2 | * arch/arm/include/asm/thread_info.h |
3 | * | 3 | * |
4 | * Copyright (C) 2002 Russell King. | 4 | * Copyright (C) 2002 Russell King. |
5 | * | 5 | * |
@@ -117,7 +117,7 @@ extern void iwmmxt_task_switch(struct thread_info *); | |||
117 | 117 | ||
118 | /* | 118 | /* |
119 | * We use bit 30 of the preempt_count to indicate that kernel | 119 | * We use bit 30 of the preempt_count to indicate that kernel |
120 | * preemption is occurring. See include/asm-arm/hardirq.h. | 120 | * preemption is occurring. See <asm/hardirq.h>. |
121 | */ | 121 | */ |
122 | #define PREEMPT_ACTIVE 0x40000000 | 122 | #define PREEMPT_ACTIVE 0x40000000 |
123 | 123 | ||
diff --git a/include/asm-arm/thread_notify.h b/arch/arm/include/asm/thread_notify.h index 8866e5216840..f27379d7f72a 100644 --- a/include/asm-arm/thread_notify.h +++ b/arch/arm/include/asm/thread_notify.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/thread_notify.h | 2 | * arch/arm/include/asm/thread_notify.h |
3 | * | 3 | * |
4 | * Copyright (C) 2006 Russell King. | 4 | * Copyright (C) 2006 Russell King. |
5 | * | 5 | * |
diff --git a/include/asm-arm/timex.h b/arch/arm/include/asm/timex.h index 7b8d4cb24be0..e50e2926cd6e 100644 --- a/include/asm-arm/timex.h +++ b/arch/arm/include/asm/timex.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/timex.h | 2 | * arch/arm/include/asm/timex.h |
3 | * | 3 | * |
4 | * Copyright (C) 1997,1998 Russell King | 4 | * Copyright (C) 1997,1998 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/tlb.h b/arch/arm/include/asm/tlb.h index 36bd402a21cb..857f1dfac794 100644 --- a/include/asm-arm/tlb.h +++ b/arch/arm/include/asm/tlb.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/tlb.h | 2 | * arch/arm/include/asm/tlb.h |
3 | * | 3 | * |
4 | * Copyright (C) 2002 Russell King | 4 | * Copyright (C) 2002 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/tlbflush.h b/arch/arm/include/asm/tlbflush.h index 909656c747ef..0d0d40f1b599 100644 --- a/include/asm-arm/tlbflush.h +++ b/arch/arm/include/asm/tlbflush.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/tlbflush.h | 2 | * arch/arm/include/asm/tlbflush.h |
3 | * | 3 | * |
4 | * Copyright (C) 1999-2003 Russell King | 4 | * Copyright (C) 1999-2003 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/topology.h b/arch/arm/include/asm/topology.h index accbd7cad9b5..accbd7cad9b5 100644 --- a/include/asm-arm/topology.h +++ b/arch/arm/include/asm/topology.h | |||
diff --git a/include/asm-arm/traps.h b/arch/arm/include/asm/traps.h index aa399aec568e..aa399aec568e 100644 --- a/include/asm-arm/traps.h +++ b/arch/arm/include/asm/traps.h | |||
diff --git a/include/asm-arm/types.h b/arch/arm/include/asm/types.h index 345df01534a4..345df01534a4 100644 --- a/include/asm-arm/types.h +++ b/arch/arm/include/asm/types.h | |||
diff --git a/include/asm-arm/uaccess.h b/arch/arm/include/asm/uaccess.h index 4c1a3fa9f259..d0f51ff900b5 100644 --- a/include/asm-arm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/uaccess.h | 2 | * arch/arm/include/asm/uaccess.h |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 as | 5 | * it under the terms of the GNU General Public License version 2 as |
diff --git a/include/asm-arm/ucontext.h b/arch/arm/include/asm/ucontext.h index bf65e9f4525d..bf65e9f4525d 100644 --- a/include/asm-arm/ucontext.h +++ b/arch/arm/include/asm/ucontext.h | |||
diff --git a/include/asm-arm/unaligned.h b/arch/arm/include/asm/unaligned.h index 44593a894903..44593a894903 100644 --- a/include/asm-arm/unaligned.h +++ b/arch/arm/include/asm/unaligned.h | |||
diff --git a/include/asm-arm/unistd.h b/arch/arm/include/asm/unistd.h index 7c570082b1e0..f95fbb2fcb5f 100644 --- a/include/asm-arm/unistd.h +++ b/arch/arm/include/asm/unistd.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/unistd.h | 2 | * arch/arm/include/asm/unistd.h |
3 | * | 3 | * |
4 | * Copyright (C) 2001-2005 Russell King | 4 | * Copyright (C) 2001-2005 Russell King |
5 | * | 5 | * |
diff --git a/include/asm-arm/user.h b/arch/arm/include/asm/user.h index 825c1e7c582d..825c1e7c582d 100644 --- a/include/asm-arm/user.h +++ b/arch/arm/include/asm/user.h | |||
diff --git a/include/asm-arm/vfp.h b/arch/arm/include/asm/vfp.h index 5f9a2cb3d452..f4ab34fd4f72 100644 --- a/include/asm-arm/vfp.h +++ b/arch/arm/include/asm/vfp.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/vfp.h | 2 | * arch/arm/include/asm/vfp.h |
3 | * | 3 | * |
4 | * VFP register definitions. | 4 | * VFP register definitions. |
5 | * First, the standard VFP set. | 5 | * First, the standard VFP set. |
diff --git a/include/asm-arm/vfpmacros.h b/arch/arm/include/asm/vfpmacros.h index cccb3892e73c..422f3cc204a2 100644 --- a/include/asm-arm/vfpmacros.h +++ b/arch/arm/include/asm/vfpmacros.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/vfpmacros.h | 2 | * arch/arm/include/asm/vfpmacros.h |
3 | * | 3 | * |
4 | * Assembler-only file containing VFP macros and register definitions. | 4 | * Assembler-only file containing VFP macros and register definitions. |
5 | */ | 5 | */ |
diff --git a/include/asm-arm/vga.h b/arch/arm/include/asm/vga.h index 1e0b913c3d71..1e0b913c3d71 100644 --- a/include/asm-arm/vga.h +++ b/arch/arm/include/asm/vga.h | |||
diff --git a/include/asm-arm/xor.h b/arch/arm/include/asm/xor.h index e7c4cf58bed1..7604673dc427 100644 --- a/include/asm-arm/xor.h +++ b/arch/arm/include/asm/xor.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/xor.h | 2 | * arch/arm/include/asm/xor.h |
3 | * | 3 | * |
4 | * Copyright (C) 2001 Russell King | 4 | * Copyright (C) 2001 Russell King |
5 | * | 5 | * |
diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S index 7e9c00a8a412..1c3c6ea5f9e7 100644 --- a/arch/arm/kernel/head-common.S +++ b/arch/arm/kernel/head-common.S | |||
@@ -181,7 +181,7 @@ ENTRY(lookup_processor_type) | |||
181 | ldmfd sp!, {r4 - r7, r9, pc} | 181 | ldmfd sp!, {r4 - r7, r9, pc} |
182 | 182 | ||
183 | /* | 183 | /* |
184 | * Look in include/asm-arm/procinfo.h and arch/arm/kernel/arch.[ch] for | 184 | * Look in <asm/procinfo.h> and arch/arm/kernel/arch.[ch] for |
185 | * more information about the __proc_info and __arch_info structures. | 185 | * more information about the __proc_info and __arch_info structures. |
186 | */ | 186 | */ |
187 | .long __proc_info_begin | 187 | .long __proc_info_begin |
diff --git a/arch/arm/lib/getuser.S b/arch/arm/lib/getuser.S index 1dd8ea4f9a9c..2034d4dbe6ad 100644 --- a/arch/arm/lib/getuser.S +++ b/arch/arm/lib/getuser.S | |||
@@ -20,7 +20,7 @@ | |||
20 | * r2, r3 contains the zero-extended value | 20 | * r2, r3 contains the zero-extended value |
21 | * lr corrupted | 21 | * lr corrupted |
22 | * | 22 | * |
23 | * No other registers must be altered. (see include/asm-arm/uaccess.h | 23 | * No other registers must be altered. (see <asm/uaccess.h> |
24 | * for specific ASM register usage). | 24 | * for specific ASM register usage). |
25 | * | 25 | * |
26 | * Note that ADDR_LIMIT is either 0 or 0xc0000000. | 26 | * Note that ADDR_LIMIT is either 0 or 0xc0000000. |
diff --git a/arch/arm/lib/putuser.S b/arch/arm/lib/putuser.S index 8620afe54f72..08ec7dffa52e 100644 --- a/arch/arm/lib/putuser.S +++ b/arch/arm/lib/putuser.S | |||
@@ -20,7 +20,7 @@ | |||
20 | * Outputs: r0 is the error code | 20 | * Outputs: r0 is the error code |
21 | * lr corrupted | 21 | * lr corrupted |
22 | * | 22 | * |
23 | * No other registers must be altered. (see include/asm-arm/uaccess.h | 23 | * No other registers must be altered. (see <asm/uaccess.h> |
24 | * for specific ASM register usage). | 24 | * for specific ASM register usage). |
25 | * | 25 | * |
26 | * Note that ADDR_LIMIT is either 0 or 0xc0000000 | 26 | * Note that ADDR_LIMIT is either 0 or 0xc0000000 |
diff --git a/arch/arm/mach-imx/clock.c b/arch/arm/mach-imx/clock.c index 6a90fe5578df..8915a5fc63cd 100644 --- a/arch/arm/mach-imx/clock.c +++ b/arch/arm/mach-imx/clock.c | |||
@@ -172,24 +172,29 @@ found: | |||
172 | 172 | ||
173 | return clk; | 173 | return clk; |
174 | } | 174 | } |
175 | EXPORT_SYMBOL(clk_get); | ||
175 | 176 | ||
176 | void clk_put(struct clk *clk) | 177 | void clk_put(struct clk *clk) |
177 | { | 178 | { |
178 | } | 179 | } |
180 | EXPORT_SYMBOL(clk_put); | ||
179 | 181 | ||
180 | int clk_enable(struct clk *clk) | 182 | int clk_enable(struct clk *clk) |
181 | { | 183 | { |
182 | return 0; | 184 | return 0; |
183 | } | 185 | } |
186 | EXPORT_SYMBOL(clk_enable); | ||
184 | 187 | ||
185 | void clk_disable(struct clk *clk) | 188 | void clk_disable(struct clk *clk) |
186 | { | 189 | { |
187 | } | 190 | } |
191 | EXPORT_SYMBOL(clk_disable); | ||
188 | 192 | ||
189 | unsigned long clk_get_rate(struct clk *clk) | 193 | unsigned long clk_get_rate(struct clk *clk) |
190 | { | 194 | { |
191 | return clk->get_rate(); | 195 | return clk->get_rate(); |
192 | } | 196 | } |
197 | EXPORT_SYMBOL(clk_get_rate); | ||
193 | 198 | ||
194 | int imx_clocks_init(void) | 199 | int imx_clocks_init(void) |
195 | { | 200 | { |
diff --git a/arch/arm/mach-imx/generic.c b/arch/arm/mach-imx/generic.c index 98ddd8a6d05f..c40650dcddf5 100644 --- a/arch/arm/mach-imx/generic.c +++ b/arch/arm/mach-imx/generic.c | |||
@@ -251,7 +251,6 @@ void __init set_imx_fb_info(struct imxfb_mach_info *hard_imx_fb_info) | |||
251 | { | 251 | { |
252 | memcpy(&imx_fb_info,hard_imx_fb_info,sizeof(struct imxfb_mach_info)); | 252 | memcpy(&imx_fb_info,hard_imx_fb_info,sizeof(struct imxfb_mach_info)); |
253 | } | 253 | } |
254 | EXPORT_SYMBOL(set_imx_fb_info); | ||
255 | 254 | ||
256 | static struct resource imxfb_resources[] = { | 255 | static struct resource imxfb_resources[] = { |
257 | [0] = { | 256 | [0] = { |
diff --git a/arch/arm/mach-imx/mx1ads.c b/arch/arm/mach-imx/mx1ads.c index 9635d5812bcd..baeff24ff02d 100644 --- a/arch/arm/mach-imx/mx1ads.c +++ b/arch/arm/mach-imx/mx1ads.c | |||
@@ -125,7 +125,7 @@ static struct platform_device *devices[] __initdata = { | |||
125 | &imx_uart2_device, | 125 | &imx_uart2_device, |
126 | }; | 126 | }; |
127 | 127 | ||
128 | #ifdef CONFIG_MMC_IMX | 128 | #if defined(CONFIG_MMC_IMX) || defined(CONFIG_MMC_IMX_MODULE) |
129 | static int mx1ads_mmc_card_present(struct device *dev) | 129 | static int mx1ads_mmc_card_present(struct device *dev) |
130 | { | 130 | { |
131 | /* MMC/SD Card Detect is PB 20 on MX1ADS V1.0.7 */ | 131 | /* MMC/SD Card Detect is PB 20 on MX1ADS V1.0.7 */ |
@@ -143,7 +143,7 @@ mx1ads_init(void) | |||
143 | #ifdef CONFIG_LEDS | 143 | #ifdef CONFIG_LEDS |
144 | imx_gpio_mode(GPIO_PORTA | GPIO_OUT | 2); | 144 | imx_gpio_mode(GPIO_PORTA | GPIO_OUT | 2); |
145 | #endif | 145 | #endif |
146 | #ifdef CONFIG_MMC_IMX | 146 | #if defined(CONFIG_MMC_IMX) || defined(CONFIG_MMC_IMX_MODULE) |
147 | /* SD/MMC card detect */ | 147 | /* SD/MMC card detect */ |
148 | imx_gpio_mode(GPIO_PORTB | GPIO_GIUS | GPIO_IN | 20); | 148 | imx_gpio_mode(GPIO_PORTB | GPIO_GIUS | GPIO_IN | 20); |
149 | imx_set_mmc_info(&mx1ads_mmc_info); | 149 | imx_set_mmc_info(&mx1ads_mmc_info); |
diff --git a/arch/arm/mach-ns9xxx/board-a9m9750dev.c b/arch/arm/mach-ns9xxx/board-a9m9750dev.c index a494b71c0195..46b4f5a2e7f4 100644 --- a/arch/arm/mach-ns9xxx/board-a9m9750dev.c +++ b/arch/arm/mach-ns9xxx/board-a9m9750dev.c | |||
@@ -13,12 +13,12 @@ | |||
13 | #include <asm/mach/map.h> | 13 | #include <asm/mach/map.h> |
14 | #include <asm/gpio.h> | 14 | #include <asm/gpio.h> |
15 | 15 | ||
16 | #include <asm/arch-ns9xxx/board.h> | 16 | #include <asm/arch/board.h> |
17 | #include <asm/arch-ns9xxx/processor-ns9360.h> | 17 | #include <asm/arch/processor-ns9360.h> |
18 | #include <asm/arch-ns9xxx/regs-sys-ns9360.h> | 18 | #include <asm/arch/regs-sys-ns9360.h> |
19 | #include <asm/arch-ns9xxx/regs-mem.h> | 19 | #include <asm/arch/regs-mem.h> |
20 | #include <asm/arch-ns9xxx/regs-bbu.h> | 20 | #include <asm/arch/regs-bbu.h> |
21 | #include <asm/arch-ns9xxx/regs-board-a9m9750dev.h> | 21 | #include <asm/arch/regs-board-a9m9750dev.h> |
22 | 22 | ||
23 | #include "board-a9m9750dev.h" | 23 | #include "board-a9m9750dev.h" |
24 | 24 | ||
diff --git a/arch/arm/mach-ns9xxx/gpio-ns9360.c b/arch/arm/mach-ns9xxx/gpio-ns9360.c index cabfb879dda9..7bc05a4b45b8 100644 --- a/arch/arm/mach-ns9xxx/gpio-ns9360.c +++ b/arch/arm/mach-ns9xxx/gpio-ns9360.c | |||
@@ -14,8 +14,8 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | 16 | ||
17 | #include <asm/arch-ns9xxx/regs-bbu.h> | 17 | #include <asm/arch/regs-bbu.h> |
18 | #include <asm/arch-ns9xxx/processor-ns9360.h> | 18 | #include <asm/arch/processor-ns9360.h> |
19 | 19 | ||
20 | #include "gpio-ns9360.h" | 20 | #include "gpio-ns9360.h" |
21 | 21 | ||
diff --git a/arch/arm/mach-ns9xxx/gpio.c b/arch/arm/mach-ns9xxx/gpio.c index b3c963b0c8f5..ed4c83389d4a 100644 --- a/arch/arm/mach-ns9xxx/gpio.c +++ b/arch/arm/mach-ns9xxx/gpio.c | |||
@@ -13,9 +13,9 @@ | |||
13 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | 15 | ||
16 | #include <asm/arch-ns9xxx/gpio.h> | 16 | #include <asm/arch/gpio.h> |
17 | #include <asm/arch-ns9xxx/processor.h> | 17 | #include <asm/arch/processor.h> |
18 | #include <asm/arch-ns9xxx/processor-ns9360.h> | 18 | #include <asm/arch/processor-ns9360.h> |
19 | #include <asm/bug.h> | 19 | #include <asm/bug.h> |
20 | #include <asm/types.h> | 20 | #include <asm/types.h> |
21 | #include <asm/bitops.h> | 21 | #include <asm/bitops.h> |
diff --git a/arch/arm/mach-ns9xxx/irq.c b/arch/arm/mach-ns9xxx/irq.c index ca85d24cf39f..d2964257797e 100644 --- a/arch/arm/mach-ns9xxx/irq.c +++ b/arch/arm/mach-ns9xxx/irq.c | |||
@@ -13,9 +13,9 @@ | |||
13 | #include <asm/io.h> | 13 | #include <asm/io.h> |
14 | #include <asm/mach/irq.h> | 14 | #include <asm/mach/irq.h> |
15 | #include <asm/mach-types.h> | 15 | #include <asm/mach-types.h> |
16 | #include <asm/arch-ns9xxx/regs-sys-common.h> | 16 | #include <asm/arch/regs-sys-common.h> |
17 | #include <asm/arch-ns9xxx/irqs.h> | 17 | #include <asm/arch/irqs.h> |
18 | #include <asm/arch-ns9xxx/board.h> | 18 | #include <asm/arch/board.h> |
19 | 19 | ||
20 | #include "generic.h" | 20 | #include "generic.h" |
21 | 21 | ||
diff --git a/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c b/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c index 9623fff6b3bc..7714233fb004 100644 --- a/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c +++ b/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <asm/mach/arch.h> | 11 | #include <asm/mach/arch.h> |
12 | #include <asm/mach-types.h> | 12 | #include <asm/mach-types.h> |
13 | 13 | ||
14 | #include <asm/arch-ns9xxx/processor-ns9360.h> | 14 | #include <asm/arch/processor-ns9360.h> |
15 | 15 | ||
16 | #include "board-a9m9750dev.h" | 16 | #include "board-a9m9750dev.h" |
17 | #include "generic.h" | 17 | #include "generic.h" |
diff --git a/arch/arm/mach-ns9xxx/mach-cc9p9360js.c b/arch/arm/mach-ns9xxx/mach-cc9p9360js.c index fcc815bdd291..bdbd0bb1a0b3 100644 --- a/arch/arm/mach-ns9xxx/mach-cc9p9360js.c +++ b/arch/arm/mach-ns9xxx/mach-cc9p9360js.c | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <asm/mach/arch.h> | 11 | #include <asm/mach/arch.h> |
12 | #include <asm/mach-types.h> | 12 | #include <asm/mach-types.h> |
13 | 13 | ||
14 | #include <asm/arch-ns9xxx/processor-ns9360.h> | 14 | #include <asm/arch/processor-ns9360.h> |
15 | 15 | ||
16 | #include "board-jscc9p9360.h" | 16 | #include "board-jscc9p9360.h" |
17 | #include "generic.h" | 17 | #include "generic.h" |
diff --git a/arch/arm/mach-ns9xxx/plat-serial8250.c b/arch/arm/mach-ns9xxx/plat-serial8250.c index 5aa5d9baf8c8..c9cce9b4e6c9 100644 --- a/arch/arm/mach-ns9xxx/plat-serial8250.c +++ b/arch/arm/mach-ns9xxx/plat-serial8250.c | |||
@@ -11,8 +11,8 @@ | |||
11 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
12 | #include <linux/serial_8250.h> | 12 | #include <linux/serial_8250.h> |
13 | 13 | ||
14 | #include <asm/arch-ns9xxx/regs-board-a9m9750dev.h> | 14 | #include <asm/arch/regs-board-a9m9750dev.h> |
15 | #include <asm/arch-ns9xxx/board.h> | 15 | #include <asm/arch/board.h> |
16 | 16 | ||
17 | #define DRIVER_NAME "serial8250" | 17 | #define DRIVER_NAME "serial8250" |
18 | 18 | ||
diff --git a/arch/arm/mach-ns9xxx/processor-ns9360.c b/arch/arm/mach-ns9xxx/processor-ns9360.c index 2bee0b7fccbb..8ee81b59b35d 100644 --- a/arch/arm/mach-ns9xxx/processor-ns9360.c +++ b/arch/arm/mach-ns9xxx/processor-ns9360.c | |||
@@ -14,8 +14,8 @@ | |||
14 | 14 | ||
15 | #include <asm/page.h> | 15 | #include <asm/page.h> |
16 | #include <asm/mach/map.h> | 16 | #include <asm/mach/map.h> |
17 | #include <asm/arch-ns9xxx/processor-ns9360.h> | 17 | #include <asm/arch/processor-ns9360.h> |
18 | #include <asm/arch-ns9xxx/regs-sys-ns9360.h> | 18 | #include <asm/arch/regs-sys-ns9360.h> |
19 | 19 | ||
20 | void ns9360_reset(char mode) | 20 | void ns9360_reset(char mode) |
21 | { | 21 | { |
diff --git a/arch/arm/mach-ns9xxx/time-ns9360.c b/arch/arm/mach-ns9xxx/time-ns9360.c index 4d573c9793ed..66bd58262974 100644 --- a/arch/arm/mach-ns9xxx/time-ns9360.c +++ b/arch/arm/mach-ns9xxx/time-ns9360.c | |||
@@ -15,9 +15,9 @@ | |||
15 | #include <linux/clocksource.h> | 15 | #include <linux/clocksource.h> |
16 | #include <linux/clockchips.h> | 16 | #include <linux/clockchips.h> |
17 | 17 | ||
18 | #include <asm/arch-ns9xxx/processor-ns9360.h> | 18 | #include <asm/arch/processor-ns9360.h> |
19 | #include <asm/arch-ns9xxx/regs-sys-ns9360.h> | 19 | #include <asm/arch/regs-sys-ns9360.h> |
20 | #include <asm/arch-ns9xxx/irqs.h> | 20 | #include <asm/arch/irqs.h> |
21 | #include <asm/arch/system.h> | 21 | #include <asm/arch/system.h> |
22 | #include "generic.h" | 22 | #include "generic.h" |
23 | 23 | ||
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c index 30023b00e476..90056d56b210 100644 --- a/arch/arm/mach-pxa/pcm990-baseboard.c +++ b/arch/arm/mach-pxa/pcm990-baseboard.c | |||
@@ -22,7 +22,6 @@ | |||
22 | 22 | ||
23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/ide.h> | ||
26 | #include <linux/i2c.h> | 25 | #include <linux/i2c.h> |
27 | #include <linux/pwm_backlight.h> | 26 | #include <linux/pwm_backlight.h> |
28 | 27 | ||
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 3a6c8ec34cd9..ed15f876c725 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -187,7 +187,7 @@ config CPU_ARM926T | |||
187 | ARCH_AT91SAM9260 || ARCH_AT91SAM9261 || \ | 187 | ARCH_AT91SAM9260 || ARCH_AT91SAM9261 || \ |
188 | ARCH_AT91SAM9263 || ARCH_AT91SAM9RL || \ | 188 | ARCH_AT91SAM9263 || ARCH_AT91SAM9RL || \ |
189 | ARCH_AT91SAM9G20 || ARCH_AT91CAP9 || \ | 189 | ARCH_AT91SAM9G20 || ARCH_AT91CAP9 || \ |
190 | ARCH_NS9XXX || ARCH_DAVINCI | 190 | ARCH_NS9XXX || ARCH_DAVINCI || ARCH_MX2 |
191 | default y if ARCH_VERSATILE_PB || MACH_VERSATILE_AB || \ | 191 | default y if ARCH_VERSATILE_PB || MACH_VERSATILE_AB || \ |
192 | ARCH_OMAP730 || ARCH_OMAP16XX || \ | 192 | ARCH_OMAP730 || ARCH_OMAP16XX || \ |
193 | ARCH_PNX4008 || ARCH_NETX || CPU_S3C2412 || \ | 193 | ARCH_PNX4008 || ARCH_NETX || CPU_S3C2412 || \ |
@@ -742,3 +742,11 @@ config CACHE_L2X0 | |||
742 | select OUTER_CACHE | 742 | select OUTER_CACHE |
743 | help | 743 | help |
744 | This option enables the L2x0 PrimeCell. | 744 | This option enables the L2x0 PrimeCell. |
745 | |||
746 | config CACHE_XSC3L2 | ||
747 | bool "Enable the L2 cache on XScale3" | ||
748 | depends on CPU_XSC3 | ||
749 | default y | ||
750 | select OUTER_CACHE | ||
751 | help | ||
752 | This option enables the L2 cache on XScale3. | ||
diff --git a/arch/arm/mm/cache-xsc3l2.c b/arch/arm/mm/cache-xsc3l2.c new file mode 100644 index 000000000000..158bd96763d3 --- /dev/null +++ b/arch/arm/mm/cache-xsc3l2.c | |||
@@ -0,0 +1,182 @@ | |||
1 | /* | ||
2 | * arch/arm/mm/cache-xsc3l2.c - XScale3 L2 cache controller support | ||
3 | * | ||
4 | * Copyright (C) 2007 ARM Limited | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/spinlock.h> | ||
21 | |||
22 | #include <asm/system.h> | ||
23 | #include <asm/cacheflush.h> | ||
24 | #include <asm/io.h> | ||
25 | |||
26 | #define CR_L2 (1 << 26) | ||
27 | |||
28 | #define CACHE_LINE_SIZE 32 | ||
29 | #define CACHE_LINE_SHIFT 5 | ||
30 | #define CACHE_WAY_PER_SET 8 | ||
31 | |||
32 | #define CACHE_WAY_SIZE(l2ctype) (8192 << (((l2ctype) >> 8) & 0xf)) | ||
33 | #define CACHE_SET_SIZE(l2ctype) (CACHE_WAY_SIZE(l2ctype) >> CACHE_LINE_SHIFT) | ||
34 | |||
35 | static inline int xsc3_l2_present(void) | ||
36 | { | ||
37 | unsigned long l2ctype; | ||
38 | |||
39 | __asm__("mrc p15, 1, %0, c0, c0, 1" : "=r" (l2ctype)); | ||
40 | |||
41 | return !!(l2ctype & 0xf8); | ||
42 | } | ||
43 | |||
44 | static inline void xsc3_l2_clean_mva(unsigned long addr) | ||
45 | { | ||
46 | __asm__("mcr p15, 1, %0, c7, c11, 1" : : "r" (addr)); | ||
47 | } | ||
48 | |||
49 | static inline void xsc3_l2_clean_pa(unsigned long addr) | ||
50 | { | ||
51 | xsc3_l2_clean_mva(__phys_to_virt(addr)); | ||
52 | } | ||
53 | |||
54 | static inline void xsc3_l2_inv_mva(unsigned long addr) | ||
55 | { | ||
56 | __asm__("mcr p15, 1, %0, c7, c7, 1" : : "r" (addr)); | ||
57 | } | ||
58 | |||
59 | static inline void xsc3_l2_inv_pa(unsigned long addr) | ||
60 | { | ||
61 | xsc3_l2_inv_mva(__phys_to_virt(addr)); | ||
62 | } | ||
63 | |||
64 | static inline void xsc3_l2_inv_all(void) | ||
65 | { | ||
66 | unsigned long l2ctype, set_way; | ||
67 | int set, way; | ||
68 | |||
69 | __asm__("mrc p15, 1, %0, c0, c0, 1" : "=r" (l2ctype)); | ||
70 | |||
71 | for (set = 0; set < CACHE_SET_SIZE(l2ctype); set++) { | ||
72 | for (way = 0; way < CACHE_WAY_PER_SET; way++) { | ||
73 | set_way = (way << 29) | (set << 5); | ||
74 | __asm__("mcr p15, 1, %0, c7, c11, 2" : : "r"(set_way)); | ||
75 | } | ||
76 | } | ||
77 | |||
78 | dsb(); | ||
79 | } | ||
80 | |||
81 | static void xsc3_l2_inv_range(unsigned long start, unsigned long end) | ||
82 | { | ||
83 | if (start == 0 && end == -1ul) { | ||
84 | xsc3_l2_inv_all(); | ||
85 | return; | ||
86 | } | ||
87 | |||
88 | /* | ||
89 | * Clean and invalidate partial first cache line. | ||
90 | */ | ||
91 | if (start & (CACHE_LINE_SIZE - 1)) { | ||
92 | xsc3_l2_clean_pa(start & ~(CACHE_LINE_SIZE - 1)); | ||
93 | xsc3_l2_inv_pa(start & ~(CACHE_LINE_SIZE - 1)); | ||
94 | start = (start | (CACHE_LINE_SIZE - 1)) + 1; | ||
95 | } | ||
96 | |||
97 | /* | ||
98 | * Clean and invalidate partial last cache line. | ||
99 | */ | ||
100 | if (end & (CACHE_LINE_SIZE - 1)) { | ||
101 | xsc3_l2_clean_pa(end & ~(CACHE_LINE_SIZE - 1)); | ||
102 | xsc3_l2_inv_pa(end & ~(CACHE_LINE_SIZE - 1)); | ||
103 | end &= ~(CACHE_LINE_SIZE - 1); | ||
104 | } | ||
105 | |||
106 | /* | ||
107 | * Invalidate all full cache lines between 'start' and 'end'. | ||
108 | */ | ||
109 | while (start != end) { | ||
110 | xsc3_l2_inv_pa(start); | ||
111 | start += CACHE_LINE_SIZE; | ||
112 | } | ||
113 | |||
114 | dsb(); | ||
115 | } | ||
116 | |||
117 | static void xsc3_l2_clean_range(unsigned long start, unsigned long end) | ||
118 | { | ||
119 | start &= ~(CACHE_LINE_SIZE - 1); | ||
120 | while (start < end) { | ||
121 | xsc3_l2_clean_pa(start); | ||
122 | start += CACHE_LINE_SIZE; | ||
123 | } | ||
124 | |||
125 | dsb(); | ||
126 | } | ||
127 | |||
128 | /* | ||
129 | * optimize L2 flush all operation by set/way format | ||
130 | */ | ||
131 | static inline void xsc3_l2_flush_all(void) | ||
132 | { | ||
133 | unsigned long l2ctype, set_way; | ||
134 | int set, way; | ||
135 | |||
136 | __asm__("mrc p15, 1, %0, c0, c0, 1" : "=r" (l2ctype)); | ||
137 | |||
138 | for (set = 0; set < CACHE_SET_SIZE(l2ctype); set++) { | ||
139 | for (way = 0; way < CACHE_WAY_PER_SET; way++) { | ||
140 | set_way = (way << 29) | (set << 5); | ||
141 | __asm__("mcr p15, 1, %0, c7, c15, 2" : : "r"(set_way)); | ||
142 | } | ||
143 | } | ||
144 | |||
145 | dsb(); | ||
146 | } | ||
147 | |||
148 | static void xsc3_l2_flush_range(unsigned long start, unsigned long end) | ||
149 | { | ||
150 | if (start == 0 && end == -1ul) { | ||
151 | xsc3_l2_flush_all(); | ||
152 | return; | ||
153 | } | ||
154 | |||
155 | start &= ~(CACHE_LINE_SIZE - 1); | ||
156 | while (start < end) { | ||
157 | xsc3_l2_clean_pa(start); | ||
158 | xsc3_l2_inv_pa(start); | ||
159 | start += CACHE_LINE_SIZE; | ||
160 | } | ||
161 | |||
162 | dsb(); | ||
163 | } | ||
164 | |||
165 | static int __init xsc3_l2_init(void) | ||
166 | { | ||
167 | if (!cpu_is_xsc3() || !xsc3_l2_present()) | ||
168 | return 0; | ||
169 | |||
170 | if (!(get_cr() & CR_L2)) { | ||
171 | pr_info("XScale3 L2 cache enabled.\n"); | ||
172 | adjust_cr(CR_L2, CR_L2); | ||
173 | xsc3_l2_inv_all(); | ||
174 | } | ||
175 | |||
176 | outer_cache.inv_range = xsc3_l2_inv_range; | ||
177 | outer_cache.clean_range = xsc3_l2_clean_range; | ||
178 | outer_cache.flush_range = xsc3_l2_flush_range; | ||
179 | |||
180 | return 0; | ||
181 | } | ||
182 | core_initcall(xsc3_l2_init); | ||
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index e6352946dde0..30a69d67d673 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -156,9 +156,9 @@ static int __init check_initrd(struct meminfo *mi) | |||
156 | } | 156 | } |
157 | 157 | ||
158 | if (initrd_node == -1) { | 158 | if (initrd_node == -1) { |
159 | printk(KERN_ERR "initrd (0x%08lx - 0x%08lx) extends beyond " | 159 | printk(KERN_ERR "INITRD: 0x%08lx+0x%08lx extends beyond " |
160 | "physical memory - disabling initrd\n", | 160 | "physical memory - disabling initrd\n", |
161 | phys_initrd_start, end); | 161 | phys_initrd_start, phys_initrd_size); |
162 | phys_initrd_start = phys_initrd_size = 0; | 162 | phys_initrd_start = phys_initrd_size = 0; |
163 | } | 163 | } |
164 | #endif | 164 | #endif |
@@ -239,25 +239,33 @@ bootmem_init_node(int node, int initrd_node, struct meminfo *mi) | |||
239 | reserve_bootmem_node(pgdat, boot_pfn << PAGE_SHIFT, | 239 | reserve_bootmem_node(pgdat, boot_pfn << PAGE_SHIFT, |
240 | boot_pages << PAGE_SHIFT, BOOTMEM_DEFAULT); | 240 | boot_pages << PAGE_SHIFT, BOOTMEM_DEFAULT); |
241 | 241 | ||
242 | /* | ||
243 | * Reserve any special node zero regions. | ||
244 | */ | ||
245 | if (node == 0) | ||
246 | reserve_node_zero(pgdat); | ||
247 | |||
242 | #ifdef CONFIG_BLK_DEV_INITRD | 248 | #ifdef CONFIG_BLK_DEV_INITRD |
243 | /* | 249 | /* |
244 | * If the initrd is in this node, reserve its memory. | 250 | * If the initrd is in this node, reserve its memory. |
245 | */ | 251 | */ |
246 | if (node == initrd_node) { | 252 | if (node == initrd_node) { |
247 | reserve_bootmem_node(pgdat, phys_initrd_start, | 253 | int res = reserve_bootmem_node(pgdat, phys_initrd_start, |
248 | phys_initrd_size, BOOTMEM_DEFAULT); | 254 | phys_initrd_size, BOOTMEM_EXCLUSIVE); |
249 | initrd_start = __phys_to_virt(phys_initrd_start); | 255 | |
250 | initrd_end = initrd_start + phys_initrd_size; | 256 | if (res == 0) { |
257 | initrd_start = __phys_to_virt(phys_initrd_start); | ||
258 | initrd_end = initrd_start + phys_initrd_size; | ||
259 | } else { | ||
260 | printk(KERN_ERR | ||
261 | "INITRD: 0x%08lx+0x%08lx overlaps in-use " | ||
262 | "memory region - disabling initrd\n", | ||
263 | phys_initrd_start, phys_initrd_size); | ||
264 | } | ||
251 | } | 265 | } |
252 | #endif | 266 | #endif |
253 | 267 | ||
254 | /* | 268 | /* |
255 | * Finally, reserve any node zero regions. | ||
256 | */ | ||
257 | if (node == 0) | ||
258 | reserve_node_zero(pgdat); | ||
259 | |||
260 | /* | ||
261 | * initialise the zones within this node. | 269 | * initialise the zones within this node. |
262 | */ | 270 | */ |
263 | memset(zone_size, 0, sizeof(zone_size)); | 271 | memset(zone_size, 0, sizeof(zone_size)); |
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index 303a7ff6bfd2..b81dbf9ffb77 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c | |||
@@ -259,7 +259,7 @@ remap_area_supersections(unsigned long virt, unsigned long pfn, | |||
259 | * caller shouldn't need to know that small detail. | 259 | * caller shouldn't need to know that small detail. |
260 | * | 260 | * |
261 | * 'flags' are the extra L_PTE_ flags that you want to specify for this | 261 | * 'flags' are the extra L_PTE_ flags that you want to specify for this |
262 | * mapping. See include/asm-arm/proc-armv/pgtable.h for more information. | 262 | * mapping. See <asm/pgtable.h> for more information. |
263 | */ | 263 | */ |
264 | void __iomem * | 264 | void __iomem * |
265 | __arm_ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size, | 265 | __arm_ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size, |
diff --git a/arch/arm/mm/proc-arm720.S b/arch/arm/mm/proc-arm720.S index d64f8e6f75ab..eda733d30455 100644 --- a/arch/arm/mm/proc-arm720.S +++ b/arch/arm/mm/proc-arm720.S | |||
@@ -231,7 +231,7 @@ cpu_arm720_name: | |||
231 | .align | 231 | .align |
232 | 232 | ||
233 | /* | 233 | /* |
234 | * See linux/include/asm-arm/procinfo.h for a definition of this structure. | 234 | * See <asm/procinfo.h> for a definition of this structure. |
235 | */ | 235 | */ |
236 | 236 | ||
237 | .section ".proc.info.init", #alloc, #execinstr | 237 | .section ".proc.info.init", #alloc, #execinstr |
diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S index 3533741a76f6..6ff53c24510f 100644 --- a/arch/arm/mm/proc-xsc3.S +++ b/arch/arm/mm/proc-xsc3.S | |||
@@ -52,11 +52,6 @@ | |||
52 | #define CACHESIZE 32768 | 52 | #define CACHESIZE 32768 |
53 | 53 | ||
54 | /* | 54 | /* |
55 | * Run with L2 enabled. | ||
56 | */ | ||
57 | #define L2_CACHE_ENABLE 1 | ||
58 | |||
59 | /* | ||
60 | * This macro is used to wait for a CP15 write and is needed when we | 55 | * This macro is used to wait for a CP15 write and is needed when we |
61 | * have to ensure that the last operation to the coprocessor was | 56 | * have to ensure that the last operation to the coprocessor was |
62 | * completed before continuing with operation. | 57 | * completed before continuing with operation. |
@@ -265,12 +260,9 @@ ENTRY(xsc3_dma_inv_range) | |||
265 | tst r0, #CACHELINESIZE - 1 | 260 | tst r0, #CACHELINESIZE - 1 |
266 | bic r0, r0, #CACHELINESIZE - 1 | 261 | bic r0, r0, #CACHELINESIZE - 1 |
267 | mcrne p15, 0, r0, c7, c10, 1 @ clean L1 D line | 262 | mcrne p15, 0, r0, c7, c10, 1 @ clean L1 D line |
268 | mcrne p15, 1, r0, c7, c11, 1 @ clean L2 line | ||
269 | tst r1, #CACHELINESIZE - 1 | 263 | tst r1, #CACHELINESIZE - 1 |
270 | mcrne p15, 0, r1, c7, c10, 1 @ clean L1 D line | 264 | mcrne p15, 0, r1, c7, c10, 1 @ clean L1 D line |
271 | mcrne p15, 1, r1, c7, c11, 1 @ clean L2 line | ||
272 | 1: mcr p15, 0, r0, c7, c6, 1 @ invalidate L1 D line | 265 | 1: mcr p15, 0, r0, c7, c6, 1 @ invalidate L1 D line |
273 | mcr p15, 1, r0, c7, c7, 1 @ invalidate L2 line | ||
274 | add r0, r0, #CACHELINESIZE | 266 | add r0, r0, #CACHELINESIZE |
275 | cmp r0, r1 | 267 | cmp r0, r1 |
276 | blo 1b | 268 | blo 1b |
@@ -288,7 +280,6 @@ ENTRY(xsc3_dma_inv_range) | |||
288 | ENTRY(xsc3_dma_clean_range) | 280 | ENTRY(xsc3_dma_clean_range) |
289 | bic r0, r0, #CACHELINESIZE - 1 | 281 | bic r0, r0, #CACHELINESIZE - 1 |
290 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean L1 D line | 282 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean L1 D line |
291 | mcr p15, 1, r0, c7, c11, 1 @ clean L2 line | ||
292 | add r0, r0, #CACHELINESIZE | 283 | add r0, r0, #CACHELINESIZE |
293 | cmp r0, r1 | 284 | cmp r0, r1 |
294 | blo 1b | 285 | blo 1b |
@@ -306,8 +297,6 @@ ENTRY(xsc3_dma_clean_range) | |||
306 | ENTRY(xsc3_dma_flush_range) | 297 | ENTRY(xsc3_dma_flush_range) |
307 | bic r0, r0, #CACHELINESIZE - 1 | 298 | bic r0, r0, #CACHELINESIZE - 1 |
308 | 1: mcr p15, 0, r0, c7, c14, 1 @ clean/invalidate L1 D line | 299 | 1: mcr p15, 0, r0, c7, c14, 1 @ clean/invalidate L1 D line |
309 | mcr p15, 1, r0, c7, c11, 1 @ clean L2 line | ||
310 | mcr p15, 1, r0, c7, c7, 1 @ invalidate L2 line | ||
311 | add r0, r0, #CACHELINESIZE | 300 | add r0, r0, #CACHELINESIZE |
312 | cmp r0, r1 | 301 | cmp r0, r1 |
313 | blo 1b | 302 | blo 1b |
@@ -347,9 +336,7 @@ ENTRY(cpu_xsc3_switch_mm) | |||
347 | mcr p15, 0, ip, c7, c5, 0 @ invalidate L1 I cache and BTB | 336 | mcr p15, 0, ip, c7, c5, 0 @ invalidate L1 I cache and BTB |
348 | mcr p15, 0, ip, c7, c10, 4 @ data write barrier | 337 | mcr p15, 0, ip, c7, c10, 4 @ data write barrier |
349 | mcr p15, 0, ip, c7, c5, 4 @ prefetch flush | 338 | mcr p15, 0, ip, c7, c5, 4 @ prefetch flush |
350 | #ifdef L2_CACHE_ENABLE | ||
351 | orr r0, r0, #0x18 @ cache the page table in L2 | 339 | orr r0, r0, #0x18 @ cache the page table in L2 |
352 | #endif | ||
353 | mcr p15, 0, r0, c2, c0, 0 @ load page table pointer | 340 | mcr p15, 0, r0, c2, c0, 0 @ load page table pointer |
354 | mcr p15, 0, ip, c8, c7, 0 @ invalidate I and D TLBs | 341 | mcr p15, 0, ip, c8, c7, 0 @ invalidate I and D TLBs |
355 | cpwait_ret lr, ip | 342 | cpwait_ret lr, ip |
@@ -378,12 +365,10 @@ ENTRY(cpu_xsc3_set_pte_ext) | |||
378 | orreq r2, r2, #PTE_EXT_AP_UNO_SRW @ yes -> user n/a, system r/w | 365 | orreq r2, r2, #PTE_EXT_AP_UNO_SRW @ yes -> user n/a, system r/w |
379 | @ combined with user -> user r/w | 366 | @ combined with user -> user r/w |
380 | 367 | ||
381 | #if L2_CACHE_ENABLE | ||
382 | @ If it's cacheable, it needs to be in L2 also. | 368 | @ If it's cacheable, it needs to be in L2 also. |
383 | eor ip, r1, #L_PTE_CACHEABLE | 369 | eor ip, r1, #L_PTE_CACHEABLE |
384 | tst ip, #L_PTE_CACHEABLE | 370 | tst ip, #L_PTE_CACHEABLE |
385 | orreq r2, r2, #PTE_EXT_TEX(0x5) | 371 | orreq r2, r2, #PTE_EXT_TEX(0x5) |
386 | #endif | ||
387 | 372 | ||
388 | tst r3, #L_PTE_PRESENT | L_PTE_YOUNG @ present and young? | 373 | tst r3, #L_PTE_PRESENT | L_PTE_YOUNG @ present and young? |
389 | movne r2, #0 @ no -> fault | 374 | movne r2, #0 @ no -> fault |
@@ -408,9 +393,7 @@ __xsc3_setup: | |||
408 | mcr p15, 0, ip, c7, c10, 4 @ data write barrier | 393 | mcr p15, 0, ip, c7, c10, 4 @ data write barrier |
409 | mcr p15, 0, ip, c7, c5, 4 @ prefetch flush | 394 | mcr p15, 0, ip, c7, c5, 4 @ prefetch flush |
410 | mcr p15, 0, ip, c8, c7, 0 @ invalidate I and D TLBs | 395 | mcr p15, 0, ip, c8, c7, 0 @ invalidate I and D TLBs |
411 | #if L2_CACHE_ENABLE | ||
412 | orr r4, r4, #0x18 @ cache the page table in L2 | 396 | orr r4, r4, #0x18 @ cache the page table in L2 |
413 | #endif | ||
414 | mcr p15, 0, r4, c2, c0, 0 @ load page table pointer | 397 | mcr p15, 0, r4, c2, c0, 0 @ load page table pointer |
415 | 398 | ||
416 | mov r0, #0 @ don't allow CP access | 399 | mov r0, #0 @ don't allow CP access |
@@ -418,9 +401,7 @@ __xsc3_setup: | |||
418 | 401 | ||
419 | mrc p15, 0, r0, c1, c0, 1 @ get auxiliary control reg | 402 | mrc p15, 0, r0, c1, c0, 1 @ get auxiliary control reg |
420 | and r0, r0, #2 @ preserve bit P bit setting | 403 | and r0, r0, #2 @ preserve bit P bit setting |
421 | #if L2_CACHE_ENABLE | ||
422 | orr r0, r0, #(1 << 10) @ enable L2 for LLR cache | 404 | orr r0, r0, #(1 << 10) @ enable L2 for LLR cache |
423 | #endif | ||
424 | mcr p15, 0, r0, c1, c0, 1 @ set auxiliary control reg | 405 | mcr p15, 0, r0, c1, c0, 1 @ set auxiliary control reg |
425 | 406 | ||
426 | adr r5, xsc3_crval | 407 | adr r5, xsc3_crval |
@@ -429,9 +410,6 @@ __xsc3_setup: | |||
429 | bic r0, r0, r5 @ ..V. ..R. .... ..A. | 410 | bic r0, r0, r5 @ ..V. ..R. .... ..A. |
430 | orr r0, r0, r6 @ ..VI Z..S .... .C.M (mmu) | 411 | orr r0, r0, r6 @ ..VI Z..S .... .C.M (mmu) |
431 | @ ...I Z..S .... .... (uc) | 412 | @ ...I Z..S .... .... (uc) |
432 | #if L2_CACHE_ENABLE | ||
433 | orr r0, r0, #0x04000000 @ L2 enable | ||
434 | #endif | ||
435 | mov pc, lr | 413 | mov pc, lr |
436 | 414 | ||
437 | .size __xsc3_setup, . - __xsc3_setup | 415 | .size __xsc3_setup, . - __xsc3_setup |
diff --git a/arch/arm/nwfpe/fpa11.h b/arch/arm/nwfpe/fpa11.h index 4a4d02c09112..386cbd13eaf4 100644 --- a/arch/arm/nwfpe/fpa11.h +++ b/arch/arm/nwfpe/fpa11.h | |||
@@ -69,7 +69,7 @@ typedef union tagFPREG { | |||
69 | * This structure is exported to user space. Do not re-order. | 69 | * This structure is exported to user space. Do not re-order. |
70 | * Only add new stuff to the end, and do not change the size of | 70 | * Only add new stuff to the end, and do not change the size of |
71 | * any element. Elements of this structure are used by user | 71 | * any element. Elements of this structure are used by user |
72 | * space, and must match struct user_fp in include/asm-arm/user.h. | 72 | * space, and must match struct user_fp in <asm/user.h>. |
73 | * We include the byte offsets below for documentation purposes. | 73 | * We include the byte offsets below for documentation purposes. |
74 | * | 74 | * |
75 | * The size of this structure and FPREG are checked by fpmodule.c | 75 | * The size of this structure and FPREG are checked by fpmodule.c |
diff --git a/include/asm-s390/Kbuild b/arch/s390/include/asm/Kbuild index 63a23415fba6..63a23415fba6 100644 --- a/include/asm-s390/Kbuild +++ b/arch/s390/include/asm/Kbuild | |||
diff --git a/include/asm-s390/airq.h b/arch/s390/include/asm/airq.h index 1ac80d6b0588..1ac80d6b0588 100644 --- a/include/asm-s390/airq.h +++ b/arch/s390/include/asm/airq.h | |||
diff --git a/include/asm-s390/appldata.h b/arch/s390/include/asm/appldata.h index 79283dac8281..79283dac8281 100644 --- a/include/asm-s390/appldata.h +++ b/arch/s390/include/asm/appldata.h | |||
diff --git a/include/asm-s390/atomic.h b/arch/s390/include/asm/atomic.h index 2d184655bc5d..2d184655bc5d 100644 --- a/include/asm-s390/atomic.h +++ b/arch/s390/include/asm/atomic.h | |||
diff --git a/include/asm-s390/auxvec.h b/arch/s390/include/asm/auxvec.h index 0d340720fd99..0d340720fd99 100644 --- a/include/asm-s390/auxvec.h +++ b/arch/s390/include/asm/auxvec.h | |||
diff --git a/include/asm-s390/bitops.h b/arch/s390/include/asm/bitops.h index b4eb24ab5af9..b4eb24ab5af9 100644 --- a/include/asm-s390/bitops.h +++ b/arch/s390/include/asm/bitops.h | |||
diff --git a/include/asm-s390/bug.h b/arch/s390/include/asm/bug.h index 384e3621e341..384e3621e341 100644 --- a/include/asm-s390/bug.h +++ b/arch/s390/include/asm/bug.h | |||
diff --git a/include/asm-s390/bugs.h b/arch/s390/include/asm/bugs.h index 011f1e6a2a6c..011f1e6a2a6c 100644 --- a/include/asm-s390/bugs.h +++ b/arch/s390/include/asm/bugs.h | |||
diff --git a/include/asm-s390/byteorder.h b/arch/s390/include/asm/byteorder.h index 1fe2492baa8d..1fe2492baa8d 100644 --- a/include/asm-s390/byteorder.h +++ b/arch/s390/include/asm/byteorder.h | |||
diff --git a/include/asm-s390/cache.h b/arch/s390/include/asm/cache.h index 9b866816863c..9b866816863c 100644 --- a/include/asm-s390/cache.h +++ b/arch/s390/include/asm/cache.h | |||
diff --git a/include/asm-s390/cacheflush.h b/arch/s390/include/asm/cacheflush.h index 49d5af916d01..49d5af916d01 100644 --- a/include/asm-s390/cacheflush.h +++ b/arch/s390/include/asm/cacheflush.h | |||
diff --git a/include/asm-s390/ccwdev.h b/arch/s390/include/asm/ccwdev.h index ba007d8df941..ba007d8df941 100644 --- a/include/asm-s390/ccwdev.h +++ b/arch/s390/include/asm/ccwdev.h | |||
diff --git a/include/asm-s390/ccwgroup.h b/arch/s390/include/asm/ccwgroup.h index a27f68985a79..a27f68985a79 100644 --- a/include/asm-s390/ccwgroup.h +++ b/arch/s390/include/asm/ccwgroup.h | |||
diff --git a/include/asm-s390/checksum.h b/arch/s390/include/asm/checksum.h index d5a8e7c1477c..d5a8e7c1477c 100644 --- a/include/asm-s390/checksum.h +++ b/arch/s390/include/asm/checksum.h | |||
diff --git a/include/asm-s390/chpid.h b/arch/s390/include/asm/chpid.h index dfe3c7f3439a..dfe3c7f3439a 100644 --- a/include/asm-s390/chpid.h +++ b/arch/s390/include/asm/chpid.h | |||
diff --git a/include/asm-s390/chsc.h b/arch/s390/include/asm/chsc.h index d38d0cf62d4b..d38d0cf62d4b 100644 --- a/include/asm-s390/chsc.h +++ b/arch/s390/include/asm/chsc.h | |||
diff --git a/include/asm-s390/cio.h b/arch/s390/include/asm/cio.h index 6dccb071aec3..6dccb071aec3 100644 --- a/include/asm-s390/cio.h +++ b/arch/s390/include/asm/cio.h | |||
diff --git a/include/asm-s390/cmb.h b/arch/s390/include/asm/cmb.h index 50196857d27a..50196857d27a 100644 --- a/include/asm-s390/cmb.h +++ b/arch/s390/include/asm/cmb.h | |||
diff --git a/include/asm-s390/compat.h b/arch/s390/include/asm/compat.h index de065b32381a..de065b32381a 100644 --- a/include/asm-s390/compat.h +++ b/arch/s390/include/asm/compat.h | |||
diff --git a/include/asm-s390/cpcmd.h b/arch/s390/include/asm/cpcmd.h index 48a9eab16429..48a9eab16429 100644 --- a/include/asm-s390/cpcmd.h +++ b/arch/s390/include/asm/cpcmd.h | |||
diff --git a/include/asm-s390/cpu.h b/arch/s390/include/asm/cpu.h index e5a6a9ba3adf..e5a6a9ba3adf 100644 --- a/include/asm-s390/cpu.h +++ b/arch/s390/include/asm/cpu.h | |||
diff --git a/include/asm-s390/cputime.h b/arch/s390/include/asm/cputime.h index 133ce054fc89..133ce054fc89 100644 --- a/include/asm-s390/cputime.h +++ b/arch/s390/include/asm/cputime.h | |||
diff --git a/include/asm-s390/current.h b/arch/s390/include/asm/current.h index 83cf36cde2da..83cf36cde2da 100644 --- a/include/asm-s390/current.h +++ b/arch/s390/include/asm/current.h | |||
diff --git a/include/asm-s390/dasd.h b/arch/s390/include/asm/dasd.h index 3f002e13d024..3f002e13d024 100644 --- a/include/asm-s390/dasd.h +++ b/arch/s390/include/asm/dasd.h | |||
diff --git a/include/asm-s390/debug.h b/arch/s390/include/asm/debug.h index 9450ce6e32de..9450ce6e32de 100644 --- a/include/asm-s390/debug.h +++ b/arch/s390/include/asm/debug.h | |||
diff --git a/include/asm-s390/delay.h b/arch/s390/include/asm/delay.h index 78357314c450..78357314c450 100644 --- a/include/asm-s390/delay.h +++ b/arch/s390/include/asm/delay.h | |||
diff --git a/include/asm-s390/device.h b/arch/s390/include/asm/device.h index d8f9872b0e2d..d8f9872b0e2d 100644 --- a/include/asm-s390/device.h +++ b/arch/s390/include/asm/device.h | |||
diff --git a/include/asm-s390/diag.h b/arch/s390/include/asm/diag.h index 72b2e2f2d32d..72b2e2f2d32d 100644 --- a/include/asm-s390/diag.h +++ b/arch/s390/include/asm/diag.h | |||
diff --git a/include/asm-s390/div64.h b/arch/s390/include/asm/div64.h index 6cd978cefb28..6cd978cefb28 100644 --- a/include/asm-s390/div64.h +++ b/arch/s390/include/asm/div64.h | |||
diff --git a/include/asm-s390/dma.h b/arch/s390/include/asm/dma.h index 7425c6af6cd4..7425c6af6cd4 100644 --- a/include/asm-s390/dma.h +++ b/arch/s390/include/asm/dma.h | |||
diff --git a/include/asm-s390/ebcdic.h b/arch/s390/include/asm/ebcdic.h index 7f6f641d32f4..7f6f641d32f4 100644 --- a/include/asm-s390/ebcdic.h +++ b/arch/s390/include/asm/ebcdic.h | |||
diff --git a/include/asm-s390/elf.h b/arch/s390/include/asm/elf.h index 3cad56923815..3cad56923815 100644 --- a/include/asm-s390/elf.h +++ b/arch/s390/include/asm/elf.h | |||
diff --git a/include/asm-s390/emergency-restart.h b/arch/s390/include/asm/emergency-restart.h index 108d8c48e42e..108d8c48e42e 100644 --- a/include/asm-s390/emergency-restart.h +++ b/arch/s390/include/asm/emergency-restart.h | |||
diff --git a/include/asm-s390/errno.h b/arch/s390/include/asm/errno.h index e41d5b37c4d6..e41d5b37c4d6 100644 --- a/include/asm-s390/errno.h +++ b/arch/s390/include/asm/errno.h | |||
diff --git a/include/asm-s390/etr.h b/arch/s390/include/asm/etr.h index 80ef58c61970..80ef58c61970 100644 --- a/include/asm-s390/etr.h +++ b/arch/s390/include/asm/etr.h | |||
diff --git a/include/asm-s390/extmem.h b/arch/s390/include/asm/extmem.h index 33837d756184..33837d756184 100644 --- a/include/asm-s390/extmem.h +++ b/arch/s390/include/asm/extmem.h | |||
diff --git a/include/asm-s390/fb.h b/arch/s390/include/asm/fb.h index c7df38030992..c7df38030992 100644 --- a/include/asm-s390/fb.h +++ b/arch/s390/include/asm/fb.h | |||
diff --git a/include/asm-s390/fcntl.h b/arch/s390/include/asm/fcntl.h index 46ab12db5739..46ab12db5739 100644 --- a/include/asm-s390/fcntl.h +++ b/arch/s390/include/asm/fcntl.h | |||
diff --git a/include/asm-s390/fcx.h b/arch/s390/include/asm/fcx.h index 8be1f3a58042..8be1f3a58042 100644 --- a/include/asm-s390/fcx.h +++ b/arch/s390/include/asm/fcx.h | |||
diff --git a/include/asm-s390/futex.h b/arch/s390/include/asm/futex.h index 5c5d02de49e9..5c5d02de49e9 100644 --- a/include/asm-s390/futex.h +++ b/arch/s390/include/asm/futex.h | |||
diff --git a/include/asm-s390/hardirq.h b/arch/s390/include/asm/hardirq.h index 89ec7056da28..89ec7056da28 100644 --- a/include/asm-s390/hardirq.h +++ b/arch/s390/include/asm/hardirq.h | |||
diff --git a/include/asm-s390/hugetlb.h b/arch/s390/include/asm/hugetlb.h index 670a1d1745d2..670a1d1745d2 100644 --- a/include/asm-s390/hugetlb.h +++ b/arch/s390/include/asm/hugetlb.h | |||
diff --git a/include/asm-s390/idals.h b/arch/s390/include/asm/idals.h index e82c10efe65a..e82c10efe65a 100644 --- a/include/asm-s390/idals.h +++ b/arch/s390/include/asm/idals.h | |||
diff --git a/include/asm-s390/io.h b/arch/s390/include/asm/io.h index b7ff6afc3caa..b7ff6afc3caa 100644 --- a/include/asm-s390/io.h +++ b/arch/s390/include/asm/io.h | |||
diff --git a/include/asm-s390/ioctl.h b/arch/s390/include/asm/ioctl.h index b279fe06dfe5..b279fe06dfe5 100644 --- a/include/asm-s390/ioctl.h +++ b/arch/s390/include/asm/ioctl.h | |||
diff --git a/include/asm-s390/ioctls.h b/arch/s390/include/asm/ioctls.h index 40e481b1b461..40e481b1b461 100644 --- a/include/asm-s390/ioctls.h +++ b/arch/s390/include/asm/ioctls.h | |||
diff --git a/include/asm-s390/ipcbuf.h b/arch/s390/include/asm/ipcbuf.h index 37f293d12c8f..37f293d12c8f 100644 --- a/include/asm-s390/ipcbuf.h +++ b/arch/s390/include/asm/ipcbuf.h | |||
diff --git a/include/asm-s390/ipl.h b/arch/s390/include/asm/ipl.h index 1171e6d144a3..1171e6d144a3 100644 --- a/include/asm-s390/ipl.h +++ b/arch/s390/include/asm/ipl.h | |||
diff --git a/include/asm-s390/irq.h b/arch/s390/include/asm/irq.h index 7da991a858f8..7da991a858f8 100644 --- a/include/asm-s390/irq.h +++ b/arch/s390/include/asm/irq.h | |||
diff --git a/include/asm-s390/irq_regs.h b/arch/s390/include/asm/irq_regs.h index 3dd9c0b70270..3dd9c0b70270 100644 --- a/include/asm-s390/irq_regs.h +++ b/arch/s390/include/asm/irq_regs.h | |||
diff --git a/include/asm-s390/irqflags.h b/arch/s390/include/asm/irqflags.h index 3f26131120b7..3f26131120b7 100644 --- a/include/asm-s390/irqflags.h +++ b/arch/s390/include/asm/irqflags.h | |||
diff --git a/include/asm-s390/isc.h b/arch/s390/include/asm/isc.h index 34bb8916db4f..34bb8916db4f 100644 --- a/include/asm-s390/isc.h +++ b/arch/s390/include/asm/isc.h | |||
diff --git a/include/asm-s390/itcw.h b/arch/s390/include/asm/itcw.h index a9bc5c36b32a..a9bc5c36b32a 100644 --- a/include/asm-s390/itcw.h +++ b/arch/s390/include/asm/itcw.h | |||
diff --git a/include/asm-s390/kdebug.h b/arch/s390/include/asm/kdebug.h index 40db27cd6e60..40db27cd6e60 100644 --- a/include/asm-s390/kdebug.h +++ b/arch/s390/include/asm/kdebug.h | |||
diff --git a/include/asm-s390/kexec.h b/arch/s390/include/asm/kexec.h index f219c6411e0b..f219c6411e0b 100644 --- a/include/asm-s390/kexec.h +++ b/arch/s390/include/asm/kexec.h | |||
diff --git a/include/asm-s390/kmap_types.h b/arch/s390/include/asm/kmap_types.h index fd1574648223..fd1574648223 100644 --- a/include/asm-s390/kmap_types.h +++ b/arch/s390/include/asm/kmap_types.h | |||
diff --git a/include/asm-s390/kprobes.h b/arch/s390/include/asm/kprobes.h index 330f68caffe4..330f68caffe4 100644 --- a/include/asm-s390/kprobes.h +++ b/arch/s390/include/asm/kprobes.h | |||
diff --git a/include/asm-s390/kvm.h b/arch/s390/include/asm/kvm.h index d74002f95794..d74002f95794 100644 --- a/include/asm-s390/kvm.h +++ b/arch/s390/include/asm/kvm.h | |||
diff --git a/include/asm-s390/kvm_host.h b/arch/s390/include/asm/kvm_host.h index 3c55e4107dcc..3c55e4107dcc 100644 --- a/include/asm-s390/kvm_host.h +++ b/arch/s390/include/asm/kvm_host.h | |||
diff --git a/include/asm-s390/kvm_para.h b/arch/s390/include/asm/kvm_para.h index 2c503796b619..2c503796b619 100644 --- a/include/asm-s390/kvm_para.h +++ b/arch/s390/include/asm/kvm_para.h | |||
diff --git a/include/asm-s390/kvm_virtio.h b/arch/s390/include/asm/kvm_virtio.h index 146100224def..146100224def 100644 --- a/include/asm-s390/kvm_virtio.h +++ b/arch/s390/include/asm/kvm_virtio.h | |||
diff --git a/include/asm-s390/linkage.h b/arch/s390/include/asm/linkage.h index 291c2d01c44f..291c2d01c44f 100644 --- a/include/asm-s390/linkage.h +++ b/arch/s390/include/asm/linkage.h | |||
diff --git a/include/asm-s390/local.h b/arch/s390/include/asm/local.h index c11c530f74d0..c11c530f74d0 100644 --- a/include/asm-s390/local.h +++ b/arch/s390/include/asm/local.h | |||
diff --git a/include/asm-s390/lowcore.h b/arch/s390/include/asm/lowcore.h index 0bc51d52a899..0bc51d52a899 100644 --- a/include/asm-s390/lowcore.h +++ b/arch/s390/include/asm/lowcore.h | |||
diff --git a/include/asm-s390/mathemu.h b/arch/s390/include/asm/mathemu.h index e8dd1ba8edb0..e8dd1ba8edb0 100644 --- a/include/asm-s390/mathemu.h +++ b/arch/s390/include/asm/mathemu.h | |||
diff --git a/include/asm-s390/mman.h b/arch/s390/include/asm/mman.h index 7839767d837e..7839767d837e 100644 --- a/include/asm-s390/mman.h +++ b/arch/s390/include/asm/mman.h | |||
diff --git a/include/asm-s390/mmu.h b/arch/s390/include/asm/mmu.h index 5dd5e7b3476f..5dd5e7b3476f 100644 --- a/include/asm-s390/mmu.h +++ b/arch/s390/include/asm/mmu.h | |||
diff --git a/include/asm-s390/mmu_context.h b/arch/s390/include/asm/mmu_context.h index 4c2fbf48c9c4..4c2fbf48c9c4 100644 --- a/include/asm-s390/mmu_context.h +++ b/arch/s390/include/asm/mmu_context.h | |||
diff --git a/include/asm-s390/module.h b/arch/s390/include/asm/module.h index 1cc1c5af705a..1cc1c5af705a 100644 --- a/include/asm-s390/module.h +++ b/arch/s390/include/asm/module.h | |||
diff --git a/include/asm-s390/monwriter.h b/arch/s390/include/asm/monwriter.h index f0cbf96c52e6..f0cbf96c52e6 100644 --- a/include/asm-s390/monwriter.h +++ b/arch/s390/include/asm/monwriter.h | |||
diff --git a/include/asm-s390/msgbuf.h b/arch/s390/include/asm/msgbuf.h index 1bbdee927924..1bbdee927924 100644 --- a/include/asm-s390/msgbuf.h +++ b/arch/s390/include/asm/msgbuf.h | |||
diff --git a/include/asm-s390/mutex.h b/arch/s390/include/asm/mutex.h index 458c1f7fbc18..458c1f7fbc18 100644 --- a/include/asm-s390/mutex.h +++ b/arch/s390/include/asm/mutex.h | |||
diff --git a/include/asm-s390/page.h b/arch/s390/include/asm/page.h index 991ba939408c..991ba939408c 100644 --- a/include/asm-s390/page.h +++ b/arch/s390/include/asm/page.h | |||
diff --git a/include/asm-s390/param.h b/arch/s390/include/asm/param.h index 34aaa4603347..34aaa4603347 100644 --- a/include/asm-s390/param.h +++ b/arch/s390/include/asm/param.h | |||
diff --git a/include/asm-s390/pci.h b/arch/s390/include/asm/pci.h index 42a145c9ddd6..42a145c9ddd6 100644 --- a/include/asm-s390/pci.h +++ b/arch/s390/include/asm/pci.h | |||
diff --git a/include/asm-s390/percpu.h b/arch/s390/include/asm/percpu.h index 408d60b4f75b..408d60b4f75b 100644 --- a/include/asm-s390/percpu.h +++ b/arch/s390/include/asm/percpu.h | |||
diff --git a/include/asm-s390/pgalloc.h b/arch/s390/include/asm/pgalloc.h index f5b2bf3d7c1d..f5b2bf3d7c1d 100644 --- a/include/asm-s390/pgalloc.h +++ b/arch/s390/include/asm/pgalloc.h | |||
diff --git a/include/asm-s390/pgtable.h b/arch/s390/include/asm/pgtable.h index 0bdb704ae051..0bdb704ae051 100644 --- a/include/asm-s390/pgtable.h +++ b/arch/s390/include/asm/pgtable.h | |||
diff --git a/include/asm-s390/poll.h b/arch/s390/include/asm/poll.h index c98509d3149e..c98509d3149e 100644 --- a/include/asm-s390/poll.h +++ b/arch/s390/include/asm/poll.h | |||
diff --git a/include/asm-s390/posix_types.h b/arch/s390/include/asm/posix_types.h index 397d93fba3a7..397d93fba3a7 100644 --- a/include/asm-s390/posix_types.h +++ b/arch/s390/include/asm/posix_types.h | |||
diff --git a/include/asm-s390/processor.h b/arch/s390/include/asm/processor.h index 4af80af2a88f..4af80af2a88f 100644 --- a/include/asm-s390/processor.h +++ b/arch/s390/include/asm/processor.h | |||
diff --git a/include/asm-s390/ptrace.h b/arch/s390/include/asm/ptrace.h index af2c9ac28a07..af2c9ac28a07 100644 --- a/include/asm-s390/ptrace.h +++ b/arch/s390/include/asm/ptrace.h | |||
diff --git a/include/asm-s390/qdio.h b/arch/s390/include/asm/qdio.h index 6813772171f2..6813772171f2 100644 --- a/include/asm-s390/qdio.h +++ b/arch/s390/include/asm/qdio.h | |||
diff --git a/include/asm-s390/qeth.h b/arch/s390/include/asm/qeth.h index 930d378ef75a..930d378ef75a 100644 --- a/include/asm-s390/qeth.h +++ b/arch/s390/include/asm/qeth.h | |||
diff --git a/include/asm-s390/reset.h b/arch/s390/include/asm/reset.h index f584f4a52581..f584f4a52581 100644 --- a/include/asm-s390/reset.h +++ b/arch/s390/include/asm/reset.h | |||
diff --git a/include/asm-s390/resource.h b/arch/s390/include/asm/resource.h index 366c01de04f2..366c01de04f2 100644 --- a/include/asm-s390/resource.h +++ b/arch/s390/include/asm/resource.h | |||
diff --git a/include/asm-s390/rwsem.h b/arch/s390/include/asm/rwsem.h index 9d2a17971805..9d2a17971805 100644 --- a/include/asm-s390/rwsem.h +++ b/arch/s390/include/asm/rwsem.h | |||
diff --git a/include/asm-s390/s390_ext.h b/arch/s390/include/asm/s390_ext.h index 2afc060266a2..2afc060266a2 100644 --- a/include/asm-s390/s390_ext.h +++ b/arch/s390/include/asm/s390_ext.h | |||
diff --git a/include/asm-s390/s390_rdev.h b/arch/s390/include/asm/s390_rdev.h index 6fa20442a48c..6fa20442a48c 100644 --- a/include/asm-s390/s390_rdev.h +++ b/arch/s390/include/asm/s390_rdev.h | |||
diff --git a/include/asm-s390/scatterlist.h b/arch/s390/include/asm/scatterlist.h index 29ec8e28c8df..29ec8e28c8df 100644 --- a/include/asm-s390/scatterlist.h +++ b/arch/s390/include/asm/scatterlist.h | |||
diff --git a/include/asm-s390/schid.h b/arch/s390/include/asm/schid.h index 825503cf3dc2..825503cf3dc2 100644 --- a/include/asm-s390/schid.h +++ b/arch/s390/include/asm/schid.h | |||
diff --git a/include/asm-s390/sclp.h b/arch/s390/include/asm/sclp.h index fed7bee650a0..fed7bee650a0 100644 --- a/include/asm-s390/sclp.h +++ b/arch/s390/include/asm/sclp.h | |||
diff --git a/include/asm-s390/sections.h b/arch/s390/include/asm/sections.h index fbd9116eb17b..fbd9116eb17b 100644 --- a/include/asm-s390/sections.h +++ b/arch/s390/include/asm/sections.h | |||
diff --git a/include/asm-s390/segment.h b/arch/s390/include/asm/segment.h index 8bfce3475b1c..8bfce3475b1c 100644 --- a/include/asm-s390/segment.h +++ b/arch/s390/include/asm/segment.h | |||
diff --git a/include/asm-s390/sembuf.h b/arch/s390/include/asm/sembuf.h index 32626b0cac4b..32626b0cac4b 100644 --- a/include/asm-s390/sembuf.h +++ b/arch/s390/include/asm/sembuf.h | |||
diff --git a/include/asm-s390/setup.h b/arch/s390/include/asm/setup.h index 2bd9faeb3919..2bd9faeb3919 100644 --- a/include/asm-s390/setup.h +++ b/arch/s390/include/asm/setup.h | |||
diff --git a/include/asm-s390/sfp-machine.h b/arch/s390/include/asm/sfp-machine.h index 4e16aede4b06..4e16aede4b06 100644 --- a/include/asm-s390/sfp-machine.h +++ b/arch/s390/include/asm/sfp-machine.h | |||
diff --git a/include/asm-s390/sfp-util.h b/arch/s390/include/asm/sfp-util.h index 0addc6466d95..0addc6466d95 100644 --- a/include/asm-s390/sfp-util.h +++ b/arch/s390/include/asm/sfp-util.h | |||
diff --git a/include/asm-s390/shmbuf.h b/arch/s390/include/asm/shmbuf.h index eed2e280ce37..eed2e280ce37 100644 --- a/include/asm-s390/shmbuf.h +++ b/arch/s390/include/asm/shmbuf.h | |||
diff --git a/include/asm-s390/shmparam.h b/arch/s390/include/asm/shmparam.h index c2e0c0508e73..c2e0c0508e73 100644 --- a/include/asm-s390/shmparam.h +++ b/arch/s390/include/asm/shmparam.h | |||
diff --git a/include/asm-s390/sigcontext.h b/arch/s390/include/asm/sigcontext.h index aeb6e0b13329..aeb6e0b13329 100644 --- a/include/asm-s390/sigcontext.h +++ b/arch/s390/include/asm/sigcontext.h | |||
diff --git a/include/asm-s390/siginfo.h b/arch/s390/include/asm/siginfo.h index e0ff1ab054be..e0ff1ab054be 100644 --- a/include/asm-s390/siginfo.h +++ b/arch/s390/include/asm/siginfo.h | |||
diff --git a/include/asm-s390/signal.h b/arch/s390/include/asm/signal.h index f6cfddb278cb..f6cfddb278cb 100644 --- a/include/asm-s390/signal.h +++ b/arch/s390/include/asm/signal.h | |||
diff --git a/include/asm-s390/sigp.h b/arch/s390/include/asm/sigp.h index e16d56f8dfe1..e16d56f8dfe1 100644 --- a/include/asm-s390/sigp.h +++ b/arch/s390/include/asm/sigp.h | |||
diff --git a/include/asm-s390/smp.h b/arch/s390/include/asm/smp.h index ae89cf2478fc..ae89cf2478fc 100644 --- a/include/asm-s390/smp.h +++ b/arch/s390/include/asm/smp.h | |||
diff --git a/include/asm-s390/socket.h b/arch/s390/include/asm/socket.h index c786ab623b2d..c786ab623b2d 100644 --- a/include/asm-s390/socket.h +++ b/arch/s390/include/asm/socket.h | |||
diff --git a/include/asm-s390/sockios.h b/arch/s390/include/asm/sockios.h index f4fc16c7da59..f4fc16c7da59 100644 --- a/include/asm-s390/sockios.h +++ b/arch/s390/include/asm/sockios.h | |||
diff --git a/include/asm-s390/sparsemem.h b/arch/s390/include/asm/sparsemem.h index 545d219e6a2d..545d219e6a2d 100644 --- a/include/asm-s390/sparsemem.h +++ b/arch/s390/include/asm/sparsemem.h | |||
diff --git a/include/asm-s390/spinlock.h b/arch/s390/include/asm/spinlock.h index df84ae96915f..df84ae96915f 100644 --- a/include/asm-s390/spinlock.h +++ b/arch/s390/include/asm/spinlock.h | |||
diff --git a/include/asm-s390/spinlock_types.h b/arch/s390/include/asm/spinlock_types.h index 654abc40de04..654abc40de04 100644 --- a/include/asm-s390/spinlock_types.h +++ b/arch/s390/include/asm/spinlock_types.h | |||
diff --git a/include/asm-s390/stat.h b/arch/s390/include/asm/stat.h index d92959eebb65..d92959eebb65 100644 --- a/include/asm-s390/stat.h +++ b/arch/s390/include/asm/stat.h | |||
diff --git a/include/asm-s390/statfs.h b/arch/s390/include/asm/statfs.h index 099a45579190..099a45579190 100644 --- a/include/asm-s390/statfs.h +++ b/arch/s390/include/asm/statfs.h | |||
diff --git a/include/asm-s390/string.h b/arch/s390/include/asm/string.h index d074673a6d9b..d074673a6d9b 100644 --- a/include/asm-s390/string.h +++ b/arch/s390/include/asm/string.h | |||
diff --git a/include/asm-s390/suspend.h b/arch/s390/include/asm/suspend.h index 1f34580e67a7..1f34580e67a7 100644 --- a/include/asm-s390/suspend.h +++ b/arch/s390/include/asm/suspend.h | |||
diff --git a/include/asm-s390/sysinfo.h b/arch/s390/include/asm/sysinfo.h index 79d01343f8b0..79d01343f8b0 100644 --- a/include/asm-s390/sysinfo.h +++ b/arch/s390/include/asm/sysinfo.h | |||
diff --git a/include/asm-s390/system.h b/arch/s390/include/asm/system.h index 819e7d99ca0c..819e7d99ca0c 100644 --- a/include/asm-s390/system.h +++ b/arch/s390/include/asm/system.h | |||
diff --git a/include/asm-s390/tape390.h b/arch/s390/include/asm/tape390.h index 884fba48f1ff..884fba48f1ff 100644 --- a/include/asm-s390/tape390.h +++ b/arch/s390/include/asm/tape390.h | |||
diff --git a/include/asm-s390/termbits.h b/arch/s390/include/asm/termbits.h index 58731853d529..58731853d529 100644 --- a/include/asm-s390/termbits.h +++ b/arch/s390/include/asm/termbits.h | |||
diff --git a/include/asm-s390/termios.h b/arch/s390/include/asm/termios.h index 67f66278f533..67f66278f533 100644 --- a/include/asm-s390/termios.h +++ b/arch/s390/include/asm/termios.h | |||
diff --git a/include/asm-s390/thread_info.h b/arch/s390/include/asm/thread_info.h index 91a8f93ad355..91a8f93ad355 100644 --- a/include/asm-s390/thread_info.h +++ b/arch/s390/include/asm/thread_info.h | |||
diff --git a/include/asm-s390/timer.h b/arch/s390/include/asm/timer.h index d98d79e35cd6..d98d79e35cd6 100644 --- a/include/asm-s390/timer.h +++ b/arch/s390/include/asm/timer.h | |||
diff --git a/include/asm-s390/timex.h b/arch/s390/include/asm/timex.h index d744c3d62de5..d744c3d62de5 100644 --- a/include/asm-s390/timex.h +++ b/arch/s390/include/asm/timex.h | |||
diff --git a/include/asm-s390/tlb.h b/arch/s390/include/asm/tlb.h index 3d8a96d39d9d..3d8a96d39d9d 100644 --- a/include/asm-s390/tlb.h +++ b/arch/s390/include/asm/tlb.h | |||
diff --git a/include/asm-s390/tlbflush.h b/arch/s390/include/asm/tlbflush.h index d60394b9745e..d60394b9745e 100644 --- a/include/asm-s390/tlbflush.h +++ b/arch/s390/include/asm/tlbflush.h | |||
diff --git a/include/asm-s390/todclk.h b/arch/s390/include/asm/todclk.h index c7f62055488a..c7f62055488a 100644 --- a/include/asm-s390/todclk.h +++ b/arch/s390/include/asm/todclk.h | |||
diff --git a/include/asm-s390/topology.h b/arch/s390/include/asm/topology.h index d96c91643458..d96c91643458 100644 --- a/include/asm-s390/topology.h +++ b/arch/s390/include/asm/topology.h | |||
diff --git a/include/asm-s390/types.h b/arch/s390/include/asm/types.h index 41c547656130..41c547656130 100644 --- a/include/asm-s390/types.h +++ b/arch/s390/include/asm/types.h | |||
diff --git a/include/asm-s390/uaccess.h b/arch/s390/include/asm/uaccess.h index 0235970278f0..0235970278f0 100644 --- a/include/asm-s390/uaccess.h +++ b/arch/s390/include/asm/uaccess.h | |||
diff --git a/include/asm-s390/ucontext.h b/arch/s390/include/asm/ucontext.h index d69bec0b03f5..d69bec0b03f5 100644 --- a/include/asm-s390/ucontext.h +++ b/arch/s390/include/asm/ucontext.h | |||
diff --git a/include/asm-s390/unaligned.h b/arch/s390/include/asm/unaligned.h index da9627afe5d8..da9627afe5d8 100644 --- a/include/asm-s390/unaligned.h +++ b/arch/s390/include/asm/unaligned.h | |||
diff --git a/include/asm-s390/unistd.h b/arch/s390/include/asm/unistd.h index c8ad350d1444..c8ad350d1444 100644 --- a/include/asm-s390/unistd.h +++ b/arch/s390/include/asm/unistd.h | |||
diff --git a/include/asm-s390/user.h b/arch/s390/include/asm/user.h index 1b050e35fdc6..1b050e35fdc6 100644 --- a/include/asm-s390/user.h +++ b/arch/s390/include/asm/user.h | |||
diff --git a/include/asm-s390/vtoc.h b/arch/s390/include/asm/vtoc.h index 3a5267d90d29..3a5267d90d29 100644 --- a/include/asm-s390/vtoc.h +++ b/arch/s390/include/asm/vtoc.h | |||
diff --git a/include/asm-s390/xor.h b/arch/s390/include/asm/xor.h index c82eb12a5b18..c82eb12a5b18 100644 --- a/include/asm-s390/xor.h +++ b/arch/s390/include/asm/xor.h | |||
diff --git a/include/asm-s390/zcrypt.h b/arch/s390/include/asm/zcrypt.h index 00d3bbd44117..00d3bbd44117 100644 --- a/include/asm-s390/zcrypt.h +++ b/arch/s390/include/asm/zcrypt.h | |||
diff --git a/arch/sparc/include/asm/futex_64.h b/arch/sparc/include/asm/futex_64.h index d8378935ae90..47f95839dc69 100644 --- a/arch/sparc/include/asm/futex_64.h +++ b/arch/sparc/include/asm/futex_64.h | |||
@@ -59,7 +59,7 @@ static inline int futex_atomic_op_inuser(int encoded_op, int __user *uaddr) | |||
59 | __futex_cas_op("or\t%2, %4, %1", ret, oldval, uaddr, oparg); | 59 | __futex_cas_op("or\t%2, %4, %1", ret, oldval, uaddr, oparg); |
60 | break; | 60 | break; |
61 | case FUTEX_OP_ANDN: | 61 | case FUTEX_OP_ANDN: |
62 | __futex_cas_op("and\t%2, %4, %1", ret, oldval, uaddr, oparg); | 62 | __futex_cas_op("andn\t%2, %4, %1", ret, oldval, uaddr, oparg); |
63 | break; | 63 | break; |
64 | case FUTEX_OP_XOR: | 64 | case FUTEX_OP_XOR: |
65 | __futex_cas_op("xor\t%2, %4, %1", ret, oldval, uaddr, oparg); | 65 | __futex_cas_op("xor\t%2, %4, %1", ret, oldval, uaddr, oparg); |
diff --git a/arch/sparc/include/asm/irq_64.h b/arch/sparc/include/asm/irq_64.h index 0bb9bf531745..3473e25231d9 100644 --- a/arch/sparc/include/asm/irq_64.h +++ b/arch/sparc/include/asm/irq_64.h | |||
@@ -90,4 +90,7 @@ static inline unsigned long get_softint(void) | |||
90 | return retval; | 90 | return retval; |
91 | } | 91 | } |
92 | 92 | ||
93 | void __trigger_all_cpu_backtrace(void); | ||
94 | #define trigger_all_cpu_backtrace() __trigger_all_cpu_backtrace() | ||
95 | |||
93 | #endif | 96 | #endif |
diff --git a/arch/sparc/include/asm/of_platform.h b/arch/sparc/include/asm/of_platform.h index aa699775ffba..93a262c44022 100644 --- a/arch/sparc/include/asm/of_platform.h +++ b/arch/sparc/include/asm/of_platform.h | |||
@@ -1,8 +1,24 @@ | |||
1 | #ifndef ___ASM_SPARC_OF_PLATFORM_H | 1 | #ifndef ___ASM_SPARC_OF_PLATFORM_H |
2 | #define ___ASM_SPARC_OF_PLATFORM_H | 2 | #define ___ASM_SPARC_OF_PLATFORM_H |
3 | #if defined(__sparc__) && defined(__arch64__) | 3 | /* |
4 | #include <asm/of_platform_64.h> | 4 | * Copyright (C) 2006 Benjamin Herrenschmidt, IBM Corp. |
5 | #else | 5 | * <benh@kernel.crashing.org> |
6 | #include <asm/of_platform_32.h> | 6 | * Modified for Sparc by merging parts of asm/of_device.h |
7 | #endif | 7 | * by Stephen Rothwell |
8 | * | ||
9 | * This program is free software; you can redistribute it and/or | ||
10 | * modify it under the terms of the GNU General Public License | ||
11 | * as published by the Free Software Foundation; either version | ||
12 | * 2 of the License, or (at your option) any later version. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | /* This is just here during the transition */ | ||
17 | #include <linux/of_platform.h> | ||
18 | |||
19 | extern struct bus_type ebus_bus_type; | ||
20 | extern struct bus_type sbus_bus_type; | ||
21 | |||
22 | #define of_bus_type of_platform_bus_type /* for compatibility */ | ||
23 | |||
8 | #endif | 24 | #endif |
diff --git a/arch/sparc/include/asm/of_platform_32.h b/arch/sparc/include/asm/of_platform_32.h deleted file mode 100644 index 723f7c9b7411..000000000000 --- a/arch/sparc/include/asm/of_platform_32.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | #ifndef _ASM_SPARC_OF_PLATFORM_H | ||
2 | #define _ASM_SPARC_OF_PLATFORM_H | ||
3 | /* | ||
4 | * Copyright (C) 2006 Benjamin Herrenschmidt, IBM Corp. | ||
5 | * <benh@kernel.crashing.org> | ||
6 | * Modified for Sparc by merging parts of asm/of_device.h | ||
7 | * by Stephen Rothwell | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or | ||
10 | * modify it under the terms of the GNU General Public License | ||
11 | * as published by the Free Software Foundation; either version | ||
12 | * 2 of the License, or (at your option) any later version. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | /* This is just here during the transition */ | ||
17 | #include <linux/of_platform.h> | ||
18 | |||
19 | extern struct bus_type ebus_bus_type; | ||
20 | extern struct bus_type sbus_bus_type; | ||
21 | |||
22 | #define of_bus_type of_platform_bus_type /* for compatibility */ | ||
23 | |||
24 | #endif /* _ASM_SPARC_OF_PLATFORM_H */ | ||
diff --git a/arch/sparc/include/asm/of_platform_64.h b/arch/sparc/include/asm/of_platform_64.h deleted file mode 100644 index 4f66a5f6342d..000000000000 --- a/arch/sparc/include/asm/of_platform_64.h +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | #ifndef _ASM_SPARC64_OF_PLATFORM_H | ||
2 | #define _ASM_SPARC64_OF_PLATFORM_H | ||
3 | /* | ||
4 | * Copyright (C) 2006 Benjamin Herrenschmidt, IBM Corp. | ||
5 | * <benh@kernel.crashing.org> | ||
6 | * Modified for Sparc by merging parts of asm/of_device.h | ||
7 | * by Stephen Rothwell | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or | ||
10 | * modify it under the terms of the GNU General Public License | ||
11 | * as published by the Free Software Foundation; either version | ||
12 | * 2 of the License, or (at your option) any later version. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | /* This is just here during the transition */ | ||
17 | #include <linux/of_platform.h> | ||
18 | |||
19 | extern struct bus_type isa_bus_type; | ||
20 | extern struct bus_type ebus_bus_type; | ||
21 | extern struct bus_type sbus_bus_type; | ||
22 | |||
23 | #define of_bus_type of_platform_bus_type /* for compatibility */ | ||
24 | |||
25 | #endif /* _ASM_SPARC64_OF_PLATFORM_H */ | ||
diff --git a/arch/sparc/include/asm/ptrace_32.h b/arch/sparc/include/asm/ptrace_32.h index d43c88b86834..d409c4f21a5c 100644 --- a/arch/sparc/include/asm/ptrace_32.h +++ b/arch/sparc/include/asm/ptrace_32.h | |||
@@ -40,16 +40,6 @@ struct pt_regs { | |||
40 | #define UREG_FP UREG_I6 | 40 | #define UREG_FP UREG_I6 |
41 | #define UREG_RETPC UREG_I7 | 41 | #define UREG_RETPC UREG_I7 |
42 | 42 | ||
43 | static inline bool pt_regs_is_syscall(struct pt_regs *regs) | ||
44 | { | ||
45 | return (regs->psr & PSR_SYSCALL); | ||
46 | } | ||
47 | |||
48 | static inline bool pt_regs_clear_syscall(struct pt_regs *regs) | ||
49 | { | ||
50 | return (regs->psr &= ~PSR_SYSCALL); | ||
51 | } | ||
52 | |||
53 | /* A register window */ | 43 | /* A register window */ |
54 | struct reg_window { | 44 | struct reg_window { |
55 | unsigned long locals[8]; | 45 | unsigned long locals[8]; |
@@ -72,6 +62,16 @@ struct sparc_stackf { | |||
72 | 62 | ||
73 | #ifdef __KERNEL__ | 63 | #ifdef __KERNEL__ |
74 | 64 | ||
65 | static inline bool pt_regs_is_syscall(struct pt_regs *regs) | ||
66 | { | ||
67 | return (regs->psr & PSR_SYSCALL); | ||
68 | } | ||
69 | |||
70 | static inline bool pt_regs_clear_syscall(struct pt_regs *regs) | ||
71 | { | ||
72 | return (regs->psr &= ~PSR_SYSCALL); | ||
73 | } | ||
74 | |||
75 | #define user_mode(regs) (!((regs)->psr & PSR_PS)) | 75 | #define user_mode(regs) (!((regs)->psr & PSR_PS)) |
76 | #define instruction_pointer(regs) ((regs)->pc) | 76 | #define instruction_pointer(regs) ((regs)->pc) |
77 | #define user_stack_pointer(regs) ((regs)->u_regs[UREG_FP]) | 77 | #define user_stack_pointer(regs) ((regs)->u_regs[UREG_FP]) |
diff --git a/arch/sparc/include/asm/ptrace_64.h b/arch/sparc/include/asm/ptrace_64.h index ec6d45c84cd0..06e4914c13f4 100644 --- a/arch/sparc/include/asm/ptrace_64.h +++ b/arch/sparc/include/asm/ptrace_64.h | |||
@@ -37,21 +37,6 @@ struct pt_regs { | |||
37 | unsigned int magic; | 37 | unsigned int magic; |
38 | }; | 38 | }; |
39 | 39 | ||
40 | static inline int pt_regs_trap_type(struct pt_regs *regs) | ||
41 | { | ||
42 | return regs->magic & 0x1ff; | ||
43 | } | ||
44 | |||
45 | static inline bool pt_regs_is_syscall(struct pt_regs *regs) | ||
46 | { | ||
47 | return (regs->tstate & TSTATE_SYSCALL); | ||
48 | } | ||
49 | |||
50 | static inline bool pt_regs_clear_syscall(struct pt_regs *regs) | ||
51 | { | ||
52 | return (regs->tstate &= ~TSTATE_SYSCALL); | ||
53 | } | ||
54 | |||
55 | struct pt_regs32 { | 40 | struct pt_regs32 { |
56 | unsigned int psr; | 41 | unsigned int psr; |
57 | unsigned int pc; | 42 | unsigned int pc; |
@@ -128,15 +113,30 @@ struct sparc_trapf { | |||
128 | 113 | ||
129 | #ifdef __KERNEL__ | 114 | #ifdef __KERNEL__ |
130 | 115 | ||
116 | static inline int pt_regs_trap_type(struct pt_regs *regs) | ||
117 | { | ||
118 | return regs->magic & 0x1ff; | ||
119 | } | ||
120 | |||
121 | static inline bool pt_regs_is_syscall(struct pt_regs *regs) | ||
122 | { | ||
123 | return (regs->tstate & TSTATE_SYSCALL); | ||
124 | } | ||
125 | |||
126 | static inline bool pt_regs_clear_syscall(struct pt_regs *regs) | ||
127 | { | ||
128 | return (regs->tstate &= ~TSTATE_SYSCALL); | ||
129 | } | ||
130 | |||
131 | struct global_reg_snapshot { | 131 | struct global_reg_snapshot { |
132 | unsigned long tstate; | 132 | unsigned long tstate; |
133 | unsigned long tpc; | 133 | unsigned long tpc; |
134 | unsigned long tnpc; | 134 | unsigned long tnpc; |
135 | unsigned long o7; | 135 | unsigned long o7; |
136 | unsigned long i7; | 136 | unsigned long i7; |
137 | unsigned long rpc; | ||
137 | struct thread_info *thread; | 138 | struct thread_info *thread; |
138 | unsigned long pad1; | 139 | unsigned long pad1; |
139 | unsigned long pad2; | ||
140 | }; | 140 | }; |
141 | 141 | ||
142 | #define __ARCH_WANT_COMPAT_SYS_PTRACE | 142 | #define __ARCH_WANT_COMPAT_SYS_PTRACE |
@@ -154,7 +154,6 @@ extern unsigned long profile_pc(struct pt_regs *); | |||
154 | #define profile_pc(regs) instruction_pointer(regs) | 154 | #define profile_pc(regs) instruction_pointer(regs) |
155 | #endif | 155 | #endif |
156 | extern void show_regs(struct pt_regs *); | 156 | extern void show_regs(struct pt_regs *); |
157 | extern void __show_regs(struct pt_regs *); | ||
158 | #endif | 157 | #endif |
159 | 158 | ||
160 | #else /* __ASSEMBLY__ */ | 159 | #else /* __ASSEMBLY__ */ |
@@ -315,9 +314,9 @@ extern void __show_regs(struct pt_regs *); | |||
315 | #define GR_SNAP_TNPC 0x10 | 314 | #define GR_SNAP_TNPC 0x10 |
316 | #define GR_SNAP_O7 0x18 | 315 | #define GR_SNAP_O7 0x18 |
317 | #define GR_SNAP_I7 0x20 | 316 | #define GR_SNAP_I7 0x20 |
318 | #define GR_SNAP_THREAD 0x28 | 317 | #define GR_SNAP_RPC 0x28 |
319 | #define GR_SNAP_PAD1 0x30 | 318 | #define GR_SNAP_THREAD 0x30 |
320 | #define GR_SNAP_PAD2 0x38 | 319 | #define GR_SNAP_PAD1 0x38 |
321 | 320 | ||
322 | #endif /* __KERNEL__ */ | 321 | #endif /* __KERNEL__ */ |
323 | 322 | ||
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c index 4fd48ab7dda4..f8b50cbf4bf7 100644 --- a/arch/sparc64/kernel/of_device.c +++ b/arch/sparc64/kernel/of_device.c | |||
@@ -56,9 +56,6 @@ struct of_device *of_find_device_by_node(struct device_node *dp) | |||
56 | EXPORT_SYMBOL(of_find_device_by_node); | 56 | EXPORT_SYMBOL(of_find_device_by_node); |
57 | 57 | ||
58 | #ifdef CONFIG_PCI | 58 | #ifdef CONFIG_PCI |
59 | struct bus_type isa_bus_type; | ||
60 | EXPORT_SYMBOL(isa_bus_type); | ||
61 | |||
62 | struct bus_type ebus_bus_type; | 59 | struct bus_type ebus_bus_type; |
63 | EXPORT_SYMBOL(ebus_bus_type); | 60 | EXPORT_SYMBOL(ebus_bus_type); |
64 | #endif | 61 | #endif |
@@ -842,8 +839,6 @@ static int __init of_bus_driver_init(void) | |||
842 | err = of_bus_type_init(&of_platform_bus_type, "of"); | 839 | err = of_bus_type_init(&of_platform_bus_type, "of"); |
843 | #ifdef CONFIG_PCI | 840 | #ifdef CONFIG_PCI |
844 | if (!err) | 841 | if (!err) |
845 | err = of_bus_type_init(&isa_bus_type, "isa"); | ||
846 | if (!err) | ||
847 | err = of_bus_type_init(&ebus_bus_type, "ebus"); | 842 | err = of_bus_type_init(&ebus_bus_type, "ebus"); |
848 | #endif | 843 | #endif |
849 | #ifdef CONFIG_SBUS | 844 | #ifdef CONFIG_SBUS |
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c index 8a9cd3e165b9..7f5debdc5fed 100644 --- a/arch/sparc64/kernel/process.c +++ b/arch/sparc64/kernel/process.c | |||
@@ -52,8 +52,6 @@ | |||
52 | #include <asm/irq_regs.h> | 52 | #include <asm/irq_regs.h> |
53 | #include <asm/smp.h> | 53 | #include <asm/smp.h> |
54 | 54 | ||
55 | /* #define VERBOSE_SHOWREGS */ | ||
56 | |||
57 | static void sparc64_yield(int cpu) | 55 | static void sparc64_yield(int cpu) |
58 | { | 56 | { |
59 | if (tlb_type != hypervisor) | 57 | if (tlb_type != hypervisor) |
@@ -213,22 +211,8 @@ static void show_regwindow(struct pt_regs *regs) | |||
213 | printk("I7: <%pS>\n", (void *) rwk->ins[7]); | 211 | printk("I7: <%pS>\n", (void *) rwk->ins[7]); |
214 | } | 212 | } |
215 | 213 | ||
216 | #ifdef CONFIG_SMP | 214 | void show_regs(struct pt_regs *regs) |
217 | static DEFINE_SPINLOCK(regdump_lock); | ||
218 | #endif | ||
219 | |||
220 | void __show_regs(struct pt_regs * regs) | ||
221 | { | 215 | { |
222 | #ifdef CONFIG_SMP | ||
223 | unsigned long flags; | ||
224 | |||
225 | /* Protect against xcall ipis which might lead to livelock on the lock */ | ||
226 | __asm__ __volatile__("rdpr %%pstate, %0\n\t" | ||
227 | "wrpr %0, %1, %%pstate" | ||
228 | : "=r" (flags) | ||
229 | : "i" (PSTATE_IE)); | ||
230 | spin_lock(®dump_lock); | ||
231 | #endif | ||
232 | printk("TSTATE: %016lx TPC: %016lx TNPC: %016lx Y: %08x %s\n", regs->tstate, | 216 | printk("TSTATE: %016lx TPC: %016lx TNPC: %016lx Y: %08x %s\n", regs->tstate, |
233 | regs->tpc, regs->tnpc, regs->y, print_tainted()); | 217 | regs->tpc, regs->tnpc, regs->y, print_tainted()); |
234 | printk("TPC: <%pS>\n", (void *) regs->tpc); | 218 | printk("TPC: <%pS>\n", (void *) regs->tpc); |
@@ -246,64 +230,24 @@ void __show_regs(struct pt_regs * regs) | |||
246 | regs->u_regs[15]); | 230 | regs->u_regs[15]); |
247 | printk("RPC: <%pS>\n", (void *) regs->u_regs[15]); | 231 | printk("RPC: <%pS>\n", (void *) regs->u_regs[15]); |
248 | show_regwindow(regs); | 232 | show_regwindow(regs); |
249 | #ifdef CONFIG_SMP | ||
250 | spin_unlock(®dump_lock); | ||
251 | __asm__ __volatile__("wrpr %0, 0, %%pstate" | ||
252 | : : "r" (flags)); | ||
253 | #endif | ||
254 | } | 233 | } |
255 | 234 | ||
256 | #ifdef VERBOSE_SHOWREGS | 235 | struct global_reg_snapshot global_reg_snapshot[NR_CPUS]; |
257 | static void idump_from_user (unsigned int *pc) | 236 | static DEFINE_SPINLOCK(global_reg_snapshot_lock); |
258 | { | ||
259 | int i; | ||
260 | int code; | ||
261 | |||
262 | if((((unsigned long) pc) & 3)) | ||
263 | return; | ||
264 | |||
265 | pc -= 3; | ||
266 | for(i = -3; i < 6; i++) { | ||
267 | get_user(code, pc); | ||
268 | printk("%c%08x%c",i?' ':'<',code,i?' ':'>'); | ||
269 | pc++; | ||
270 | } | ||
271 | printk("\n"); | ||
272 | } | ||
273 | #endif | ||
274 | 237 | ||
275 | void show_regs(struct pt_regs *regs) | 238 | static bool kstack_valid(struct thread_info *tp, struct reg_window *rw) |
276 | { | 239 | { |
277 | #ifdef VERBOSE_SHOWREGS | 240 | unsigned long thread_base, fp; |
278 | extern long etrap, etraptl1; | ||
279 | #endif | ||
280 | __show_regs(regs); | ||
281 | #if 0 | ||
282 | #ifdef CONFIG_SMP | ||
283 | { | ||
284 | extern void smp_report_regs(void); | ||
285 | 241 | ||
286 | smp_report_regs(); | 242 | thread_base = (unsigned long) tp; |
287 | } | 243 | fp = (unsigned long) rw; |
288 | #endif | ||
289 | #endif | ||
290 | 244 | ||
291 | #ifdef VERBOSE_SHOWREGS | 245 | if (fp < (thread_base + sizeof(struct thread_info)) || |
292 | if (regs->tpc >= &etrap && regs->tpc < &etraptl1 && | 246 | fp >= (thread_base + THREAD_SIZE)) |
293 | regs->u_regs[14] >= (long)current - PAGE_SIZE && | 247 | return false; |
294 | regs->u_regs[14] < (long)current + 6 * PAGE_SIZE) { | 248 | return true; |
295 | printk ("*********parent**********\n"); | ||
296 | __show_regs((struct pt_regs *)(regs->u_regs[14] + PTREGS_OFF)); | ||
297 | idump_from_user(((struct pt_regs *)(regs->u_regs[14] + PTREGS_OFF))->tpc); | ||
298 | printk ("*********endpar**********\n"); | ||
299 | } | ||
300 | #endif | ||
301 | } | 249 | } |
302 | 250 | ||
303 | #ifdef CONFIG_MAGIC_SYSRQ | ||
304 | struct global_reg_snapshot global_reg_snapshot[NR_CPUS]; | ||
305 | static DEFINE_SPINLOCK(global_reg_snapshot_lock); | ||
306 | |||
307 | static void __global_reg_self(struct thread_info *tp, struct pt_regs *regs, | 251 | static void __global_reg_self(struct thread_info *tp, struct pt_regs *regs, |
308 | int this_cpu) | 252 | int this_cpu) |
309 | { | 253 | { |
@@ -315,14 +259,22 @@ static void __global_reg_self(struct thread_info *tp, struct pt_regs *regs, | |||
315 | global_reg_snapshot[this_cpu].o7 = regs->u_regs[UREG_I7]; | 259 | global_reg_snapshot[this_cpu].o7 = regs->u_regs[UREG_I7]; |
316 | 260 | ||
317 | if (regs->tstate & TSTATE_PRIV) { | 261 | if (regs->tstate & TSTATE_PRIV) { |
262 | struct thread_info *tp = current_thread_info(); | ||
318 | struct reg_window *rw; | 263 | struct reg_window *rw; |
319 | 264 | ||
320 | rw = (struct reg_window *) | 265 | rw = (struct reg_window *) |
321 | (regs->u_regs[UREG_FP] + STACK_BIAS); | 266 | (regs->u_regs[UREG_FP] + STACK_BIAS); |
322 | global_reg_snapshot[this_cpu].i7 = rw->ins[6]; | 267 | if (kstack_valid(tp, rw)) { |
323 | } else | 268 | global_reg_snapshot[this_cpu].i7 = rw->ins[7]; |
269 | rw = (struct reg_window *) | ||
270 | (rw->ins[6] + STACK_BIAS); | ||
271 | if (kstack_valid(tp, rw)) | ||
272 | global_reg_snapshot[this_cpu].rpc = rw->ins[7]; | ||
273 | } | ||
274 | } else { | ||
324 | global_reg_snapshot[this_cpu].i7 = 0; | 275 | global_reg_snapshot[this_cpu].i7 = 0; |
325 | 276 | global_reg_snapshot[this_cpu].rpc = 0; | |
277 | } | ||
326 | global_reg_snapshot[this_cpu].thread = tp; | 278 | global_reg_snapshot[this_cpu].thread = tp; |
327 | } | 279 | } |
328 | 280 | ||
@@ -341,7 +293,7 @@ static void __global_reg_poll(struct global_reg_snapshot *gp) | |||
341 | } | 293 | } |
342 | } | 294 | } |
343 | 295 | ||
344 | static void sysrq_handle_globreg(int key, struct tty_struct *tty) | 296 | void __trigger_all_cpu_backtrace(void) |
345 | { | 297 | { |
346 | struct thread_info *tp = current_thread_info(); | 298 | struct thread_info *tp = current_thread_info(); |
347 | struct pt_regs *regs = get_irq_regs(); | 299 | struct pt_regs *regs = get_irq_regs(); |
@@ -375,13 +327,14 @@ static void sysrq_handle_globreg(int key, struct tty_struct *tty) | |||
375 | ((tp && tp->task) ? tp->task->pid : -1)); | 327 | ((tp && tp->task) ? tp->task->pid : -1)); |
376 | 328 | ||
377 | if (gp->tstate & TSTATE_PRIV) { | 329 | if (gp->tstate & TSTATE_PRIV) { |
378 | printk(" TPC[%pS] O7[%pS] I7[%pS]\n", | 330 | printk(" TPC[%pS] O7[%pS] I7[%pS] RPC[%pS]\n", |
379 | (void *) gp->tpc, | 331 | (void *) gp->tpc, |
380 | (void *) gp->o7, | 332 | (void *) gp->o7, |
381 | (void *) gp->i7); | 333 | (void *) gp->i7, |
334 | (void *) gp->rpc); | ||
382 | } else { | 335 | } else { |
383 | printk(" TPC[%lx] O7[%lx] I7[%lx]\n", | 336 | printk(" TPC[%lx] O7[%lx] I7[%lx] RPC[%lx]\n", |
384 | gp->tpc, gp->o7, gp->i7); | 337 | gp->tpc, gp->o7, gp->i7, gp->rpc); |
385 | } | 338 | } |
386 | } | 339 | } |
387 | 340 | ||
@@ -390,6 +343,13 @@ static void sysrq_handle_globreg(int key, struct tty_struct *tty) | |||
390 | spin_unlock_irqrestore(&global_reg_snapshot_lock, flags); | 343 | spin_unlock_irqrestore(&global_reg_snapshot_lock, flags); |
391 | } | 344 | } |
392 | 345 | ||
346 | #ifdef CONFIG_MAGIC_SYSRQ | ||
347 | |||
348 | static void sysrq_handle_globreg(int key, struct tty_struct *tty) | ||
349 | { | ||
350 | __trigger_all_cpu_backtrace(); | ||
351 | } | ||
352 | |||
393 | static struct sysrq_key_op sparc_globalreg_op = { | 353 | static struct sysrq_key_op sparc_globalreg_op = { |
394 | .handler = sysrq_handle_globreg, | 354 | .handler = sysrq_handle_globreg, |
395 | .help_msg = "Globalregs", | 355 | .help_msg = "Globalregs", |
diff --git a/arch/sparc64/kernel/signal.c b/arch/sparc64/kernel/signal.c index d1b84456a9ee..ca5a6ae3a6e2 100644 --- a/arch/sparc64/kernel/signal.c +++ b/arch/sparc64/kernel/signal.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * arch/sparc64/kernel/signal.c | 2 | * arch/sparc64/kernel/signal.c |
3 | * | 3 | * |
4 | * Copyright (C) 1991, 1992 Linus Torvalds | 4 | * Copyright (C) 1991, 1992 Linus Torvalds |
5 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 5 | * Copyright (C) 1995, 2008 David S. Miller (davem@davemloft.net) |
6 | * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx) | 6 | * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx) |
7 | * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) | 7 | * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) |
8 | * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) | 8 | * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) |
@@ -91,7 +91,9 @@ asmlinkage void sparc64_set_context(struct pt_regs *regs) | |||
91 | err |= __get_user(regs->u_regs[UREG_G4], (&(*grp)[MC_G4])); | 91 | err |= __get_user(regs->u_regs[UREG_G4], (&(*grp)[MC_G4])); |
92 | err |= __get_user(regs->u_regs[UREG_G5], (&(*grp)[MC_G5])); | 92 | err |= __get_user(regs->u_regs[UREG_G5], (&(*grp)[MC_G5])); |
93 | err |= __get_user(regs->u_regs[UREG_G6], (&(*grp)[MC_G6])); | 93 | err |= __get_user(regs->u_regs[UREG_G6], (&(*grp)[MC_G6])); |
94 | err |= __get_user(regs->u_regs[UREG_G7], (&(*grp)[MC_G7])); | 94 | |
95 | /* Skip %g7 as that's the thread register in userspace. */ | ||
96 | |||
95 | err |= __get_user(regs->u_regs[UREG_I0], (&(*grp)[MC_O0])); | 97 | err |= __get_user(regs->u_regs[UREG_I0], (&(*grp)[MC_O0])); |
96 | err |= __get_user(regs->u_regs[UREG_I1], (&(*grp)[MC_O1])); | 98 | err |= __get_user(regs->u_regs[UREG_I1], (&(*grp)[MC_O1])); |
97 | err |= __get_user(regs->u_regs[UREG_I2], (&(*grp)[MC_O2])); | 99 | err |= __get_user(regs->u_regs[UREG_I2], (&(*grp)[MC_O2])); |
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 7cf72b4bb108..340842e51ce1 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c | |||
@@ -843,7 +843,6 @@ void smp_tsb_sync(struct mm_struct *mm) | |||
843 | extern unsigned long xcall_flush_tlb_mm; | 843 | extern unsigned long xcall_flush_tlb_mm; |
844 | extern unsigned long xcall_flush_tlb_pending; | 844 | extern unsigned long xcall_flush_tlb_pending; |
845 | extern unsigned long xcall_flush_tlb_kernel_range; | 845 | extern unsigned long xcall_flush_tlb_kernel_range; |
846 | extern unsigned long xcall_report_regs; | ||
847 | #ifdef CONFIG_MAGIC_SYSRQ | 846 | #ifdef CONFIG_MAGIC_SYSRQ |
848 | extern unsigned long xcall_fetch_glob_regs; | 847 | extern unsigned long xcall_fetch_glob_regs; |
849 | #endif | 848 | #endif |
@@ -1022,11 +1021,6 @@ void kgdb_roundup_cpus(unsigned long flags) | |||
1022 | } | 1021 | } |
1023 | #endif | 1022 | #endif |
1024 | 1023 | ||
1025 | void smp_report_regs(void) | ||
1026 | { | ||
1027 | smp_cross_call(&xcall_report_regs, 0, 0, 0); | ||
1028 | } | ||
1029 | |||
1030 | #ifdef CONFIG_MAGIC_SYSRQ | 1024 | #ifdef CONFIG_MAGIC_SYSRQ |
1031 | void smp_fetch_global_regs(void) | 1025 | void smp_fetch_global_regs(void) |
1032 | { | 1026 | { |
diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c index 504e678ee128..0804f71df6cb 100644 --- a/arch/sparc64/kernel/sparc64_ksyms.c +++ b/arch/sparc64/kernel/sparc64_ksyms.c | |||
@@ -68,7 +68,6 @@ extern void *__memscan_zero(void *, size_t); | |||
68 | extern void *__memscan_generic(void *, int, size_t); | 68 | extern void *__memscan_generic(void *, int, size_t); |
69 | extern int __memcmp(const void *, const void *, __kernel_size_t); | 69 | extern int __memcmp(const void *, const void *, __kernel_size_t); |
70 | extern __kernel_size_t strlen(const char *); | 70 | extern __kernel_size_t strlen(const char *); |
71 | extern void show_regs(struct pt_regs *); | ||
72 | extern void syscall_trace(struct pt_regs *, int); | 71 | extern void syscall_trace(struct pt_regs *, int); |
73 | extern void sys_sigsuspend(void); | 72 | extern void sys_sigsuspend(void); |
74 | extern int compat_sys_ioctl(unsigned int fd, unsigned int cmd, u32 arg); | 73 | extern int compat_sys_ioctl(unsigned int fd, unsigned int cmd, u32 arg); |
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c index bd30ecba5630..404e8561e2d0 100644 --- a/arch/sparc64/kernel/traps.c +++ b/arch/sparc64/kernel/traps.c | |||
@@ -1777,7 +1777,7 @@ static void sun4v_log_error(struct pt_regs *regs, struct sun4v_error_entry *ent, | |||
1777 | pfx, | 1777 | pfx, |
1778 | ent->err_raddr, ent->err_size, ent->err_cpu); | 1778 | ent->err_raddr, ent->err_size, ent->err_cpu); |
1779 | 1779 | ||
1780 | __show_regs(regs); | 1780 | show_regs(regs); |
1781 | 1781 | ||
1782 | if ((cnt = atomic_read(ocnt)) != 0) { | 1782 | if ((cnt = atomic_read(ocnt)) != 0) { |
1783 | atomic_set(ocnt, 0); | 1783 | atomic_set(ocnt, 0); |
@@ -2177,7 +2177,6 @@ static inline struct reg_window *kernel_stack_up(struct reg_window *rw) | |||
2177 | void die_if_kernel(char *str, struct pt_regs *regs) | 2177 | void die_if_kernel(char *str, struct pt_regs *regs) |
2178 | { | 2178 | { |
2179 | static int die_counter; | 2179 | static int die_counter; |
2180 | extern void smp_report_regs(void); | ||
2181 | int count = 0; | 2180 | int count = 0; |
2182 | 2181 | ||
2183 | /* Amuse the user. */ | 2182 | /* Amuse the user. */ |
@@ -2190,7 +2189,7 @@ void die_if_kernel(char *str, struct pt_regs *regs) | |||
2190 | printk("%s(%d): %s [#%d]\n", current->comm, task_pid_nr(current), str, ++die_counter); | 2189 | printk("%s(%d): %s [#%d]\n", current->comm, task_pid_nr(current), str, ++die_counter); |
2191 | notify_die(DIE_OOPS, str, regs, 0, 255, SIGSEGV); | 2190 | notify_die(DIE_OOPS, str, regs, 0, 255, SIGSEGV); |
2192 | __asm__ __volatile__("flushw"); | 2191 | __asm__ __volatile__("flushw"); |
2193 | __show_regs(regs); | 2192 | show_regs(regs); |
2194 | add_taint(TAINT_DIE); | 2193 | add_taint(TAINT_DIE); |
2195 | if (regs->tstate & TSTATE_PRIV) { | 2194 | if (regs->tstate & TSTATE_PRIV) { |
2196 | struct reg_window *rw = (struct reg_window *) | 2195 | struct reg_window *rw = (struct reg_window *) |
@@ -2215,11 +2214,6 @@ void die_if_kernel(char *str, struct pt_regs *regs) | |||
2215 | } | 2214 | } |
2216 | user_instruction_dump ((unsigned int __user *) regs->tpc); | 2215 | user_instruction_dump ((unsigned int __user *) regs->tpc); |
2217 | } | 2216 | } |
2218 | #if 0 | ||
2219 | #ifdef CONFIG_SMP | ||
2220 | smp_report_regs(); | ||
2221 | #endif | ||
2222 | #endif | ||
2223 | if (regs->tstate & TSTATE_PRIV) | 2217 | if (regs->tstate & TSTATE_PRIV) |
2224 | do_exit(SIGKILL); | 2218 | do_exit(SIGKILL); |
2225 | do_exit(SIGSEGV); | 2219 | do_exit(SIGSEGV); |
diff --git a/arch/sparc64/mm/ultra.S b/arch/sparc64/mm/ultra.S index 4c8ca131ffaf..ff1dc44d363e 100644 --- a/arch/sparc64/mm/ultra.S +++ b/arch/sparc64/mm/ultra.S | |||
@@ -480,41 +480,6 @@ xcall_sync_tick: | |||
480 | b rtrap_xcall | 480 | b rtrap_xcall |
481 | ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1 | 481 | ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1 |
482 | 482 | ||
483 | /* NOTE: This is SPECIAL!! We do etrap/rtrap however | ||
484 | * we choose to deal with the "BH's run with | ||
485 | * %pil==15" problem (described in asm/pil.h) | ||
486 | * by just invoking rtrap directly past where | ||
487 | * BH's are checked for. | ||
488 | * | ||
489 | * We do it like this because we do not want %pil==15 | ||
490 | * lockups to prevent regs being reported. | ||
491 | */ | ||
492 | .globl xcall_report_regs | ||
493 | xcall_report_regs: | ||
494 | |||
495 | 661: rdpr %pstate, %g2 | ||
496 | wrpr %g2, PSTATE_IG | PSTATE_AG, %pstate | ||
497 | .section .sun4v_2insn_patch, "ax" | ||
498 | .word 661b | ||
499 | nop | ||
500 | nop | ||
501 | .previous | ||
502 | |||
503 | rdpr %pil, %g2 | ||
504 | wrpr %g0, 15, %pil | ||
505 | sethi %hi(109f), %g7 | ||
506 | b,pt %xcc, etrap_irq | ||
507 | 109: or %g7, %lo(109b), %g7 | ||
508 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
509 | call trace_hardirqs_off | ||
510 | nop | ||
511 | #endif | ||
512 | call __show_regs | ||
513 | add %sp, PTREGS_OFF, %o0 | ||
514 | /* Has to be a non-v9 branch due to the large distance. */ | ||
515 | b rtrap_xcall | ||
516 | ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1 | ||
517 | |||
518 | #ifdef CONFIG_MAGIC_SYSRQ | 483 | #ifdef CONFIG_MAGIC_SYSRQ |
519 | .globl xcall_fetch_glob_regs | 484 | .globl xcall_fetch_glob_regs |
520 | xcall_fetch_glob_regs: | 485 | xcall_fetch_glob_regs: |
@@ -531,6 +496,13 @@ xcall_fetch_glob_regs: | |||
531 | stx %g7, [%g1 + GR_SNAP_TNPC] | 496 | stx %g7, [%g1 + GR_SNAP_TNPC] |
532 | stx %o7, [%g1 + GR_SNAP_O7] | 497 | stx %o7, [%g1 + GR_SNAP_O7] |
533 | stx %i7, [%g1 + GR_SNAP_I7] | 498 | stx %i7, [%g1 + GR_SNAP_I7] |
499 | /* Don't try this at home kids... */ | ||
500 | rdpr %cwp, %g2 | ||
501 | sub %g2, 1, %g7 | ||
502 | wrpr %g7, %cwp | ||
503 | mov %i7, %g7 | ||
504 | wrpr %g2, %cwp | ||
505 | stx %g7, [%g1 + GR_SNAP_RPC] | ||
534 | sethi %hi(trap_block), %g7 | 506 | sethi %hi(trap_block), %g7 |
535 | or %g7, %lo(trap_block), %g7 | 507 | or %g7, %lo(trap_block), %g7 |
536 | sllx %g2, TRAP_BLOCK_SZ_SHIFT, %g2 | 508 | sllx %g2, TRAP_BLOCK_SZ_SHIFT, %g2 |
diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c index c5b9bcfc0a6d..12a5182173f6 100644 --- a/block/scsi_ioctl.c +++ b/block/scsi_ioctl.c | |||
@@ -518,7 +518,7 @@ int scsi_cmd_ioctl(struct file *file, struct request_queue *q, | |||
518 | hdr.sbp = cgc.sense; | 518 | hdr.sbp = cgc.sense; |
519 | if (hdr.sbp) | 519 | if (hdr.sbp) |
520 | hdr.mx_sb_len = sizeof(struct request_sense); | 520 | hdr.mx_sb_len = sizeof(struct request_sense); |
521 | hdr.timeout = cgc.timeout; | 521 | hdr.timeout = jiffies_to_msecs(cgc.timeout); |
522 | hdr.cmdp = ((struct cdrom_generic_command __user*) arg)->cmd; | 522 | hdr.cmdp = ((struct cdrom_generic_command __user*) arg)->cmd; |
523 | hdr.cmd_len = sizeof(cgc.cmd); | 523 | hdr.cmd_len = sizeof(cgc.cmd); |
524 | 524 | ||
diff --git a/drivers/char/efirtc.c b/drivers/char/efirtc.c index 67fbd7aab5db..34d15d548236 100644 --- a/drivers/char/efirtc.c +++ b/drivers/char/efirtc.c | |||
@@ -37,7 +37,6 @@ | |||
37 | #include <linux/rtc.h> | 37 | #include <linux/rtc.h> |
38 | #include <linux/proc_fs.h> | 38 | #include <linux/proc_fs.h> |
39 | #include <linux/efi.h> | 39 | #include <linux/efi.h> |
40 | #include <linux/smp_lock.h> | ||
41 | #include <linux/uaccess.h> | 40 | #include <linux/uaccess.h> |
42 | 41 | ||
43 | #include <asm/system.h> | 42 | #include <asm/system.h> |
diff --git a/drivers/char/vt.c b/drivers/char/vt.c index 82a51f38a546..1bc00c9d860d 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c | |||
@@ -916,7 +916,6 @@ int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int lines) | |||
916 | ws.ws_col = vc->vc_cols; | 916 | ws.ws_col = vc->vc_cols; |
917 | ws.ws_ypixel = vc->vc_scan_lines; | 917 | ws.ws_ypixel = vc->vc_scan_lines; |
918 | 918 | ||
919 | mutex_lock(&vc->vc_tty->termios_mutex); | ||
920 | spin_lock_irq(&vc->vc_tty->ctrl_lock); | 919 | spin_lock_irq(&vc->vc_tty->ctrl_lock); |
921 | if ((ws.ws_row != cws->ws_row || ws.ws_col != cws->ws_col)) | 920 | if ((ws.ws_row != cws->ws_row || ws.ws_col != cws->ws_col)) |
922 | pgrp = get_pid(vc->vc_tty->pgrp); | 921 | pgrp = get_pid(vc->vc_tty->pgrp); |
@@ -926,7 +925,6 @@ int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int lines) | |||
926 | put_pid(pgrp); | 925 | put_pid(pgrp); |
927 | } | 926 | } |
928 | *cws = ws; | 927 | *cws = ws; |
929 | mutex_unlock(&vc->vc_tty->termios_mutex); | ||
930 | } | 928 | } |
931 | 929 | ||
932 | if (CON_IS_VISIBLE(vc)) | 930 | if (CON_IS_VISIBLE(vc)) |
diff --git a/drivers/isdn/Makefile b/drivers/isdn/Makefile index 8380a4568d11..f1f777570e8e 100644 --- a/drivers/isdn/Makefile +++ b/drivers/isdn/Makefile | |||
@@ -5,7 +5,7 @@ | |||
5 | obj-$(CONFIG_ISDN_I4L) += i4l/ | 5 | obj-$(CONFIG_ISDN_I4L) += i4l/ |
6 | obj-$(CONFIG_ISDN_CAPI) += capi/ | 6 | obj-$(CONFIG_ISDN_CAPI) += capi/ |
7 | obj-$(CONFIG_MISDN) += mISDN/ | 7 | obj-$(CONFIG_MISDN) += mISDN/ |
8 | obj-$(CONFIG_ISDN_CAPI) += hardware/ | 8 | obj-$(CONFIG_ISDN) += hardware/ |
9 | obj-$(CONFIG_ISDN_DIVERSION) += divert/ | 9 | obj-$(CONFIG_ISDN_DIVERSION) += divert/ |
10 | obj-$(CONFIG_ISDN_DRV_HISAX) += hisax/ | 10 | obj-$(CONFIG_ISDN_DRV_HISAX) += hisax/ |
11 | obj-$(CONFIG_ISDN_DRV_ICN) += icn/ | 11 | obj-$(CONFIG_ISDN_DRV_ICN) += icn/ |
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c index 2649ea55a9e8..1eac03f39d00 100644 --- a/drivers/isdn/hardware/mISDN/hfcmulti.c +++ b/drivers/isdn/hardware/mISDN/hfcmulti.c | |||
@@ -140,7 +140,7 @@ | |||
140 | * #define HFC_REGISTER_DEBUG | 140 | * #define HFC_REGISTER_DEBUG |
141 | */ | 141 | */ |
142 | 142 | ||
143 | static const char *hfcmulti_revision = "2.00"; | 143 | static const char *hfcmulti_revision = "2.02"; |
144 | 144 | ||
145 | #include <linux/module.h> | 145 | #include <linux/module.h> |
146 | #include <linux/pci.h> | 146 | #include <linux/pci.h> |
@@ -427,12 +427,12 @@ write_fifo_regio(struct hfc_multi *hc, u_char *data, int len) | |||
427 | { | 427 | { |
428 | outb(A_FIFO_DATA0, (hc->pci_iobase)+4); | 428 | outb(A_FIFO_DATA0, (hc->pci_iobase)+4); |
429 | while (len>>2) { | 429 | while (len>>2) { |
430 | outl(*(u32 *)data, hc->pci_iobase); | 430 | outl(cpu_to_le32(*(u32 *)data), hc->pci_iobase); |
431 | data += 4; | 431 | data += 4; |
432 | len -= 4; | 432 | len -= 4; |
433 | } | 433 | } |
434 | while (len>>1) { | 434 | while (len>>1) { |
435 | outw(*(u16 *)data, hc->pci_iobase); | 435 | outw(cpu_to_le16(*(u16 *)data), hc->pci_iobase); |
436 | data += 2; | 436 | data += 2; |
437 | len -= 2; | 437 | len -= 2; |
438 | } | 438 | } |
@@ -447,17 +447,19 @@ void | |||
447 | write_fifo_pcimem(struct hfc_multi *hc, u_char *data, int len) | 447 | write_fifo_pcimem(struct hfc_multi *hc, u_char *data, int len) |
448 | { | 448 | { |
449 | while (len>>2) { | 449 | while (len>>2) { |
450 | writel(*(u32 *)data, (hc->pci_membase)+A_FIFO_DATA0); | 450 | writel(cpu_to_le32(*(u32 *)data), |
451 | hc->pci_membase + A_FIFO_DATA0); | ||
451 | data += 4; | 452 | data += 4; |
452 | len -= 4; | 453 | len -= 4; |
453 | } | 454 | } |
454 | while (len>>1) { | 455 | while (len>>1) { |
455 | writew(*(u16 *)data, (hc->pci_membase)+A_FIFO_DATA0); | 456 | writew(cpu_to_le16(*(u16 *)data), |
457 | hc->pci_membase + A_FIFO_DATA0); | ||
456 | data += 2; | 458 | data += 2; |
457 | len -= 2; | 459 | len -= 2; |
458 | } | 460 | } |
459 | while (len) { | 461 | while (len) { |
460 | writeb(*data, (hc->pci_membase)+A_FIFO_DATA0); | 462 | writeb(*data, hc->pci_membase + A_FIFO_DATA0); |
461 | data++; | 463 | data++; |
462 | len--; | 464 | len--; |
463 | } | 465 | } |
@@ -468,12 +470,12 @@ read_fifo_regio(struct hfc_multi *hc, u_char *data, int len) | |||
468 | { | 470 | { |
469 | outb(A_FIFO_DATA0, (hc->pci_iobase)+4); | 471 | outb(A_FIFO_DATA0, (hc->pci_iobase)+4); |
470 | while (len>>2) { | 472 | while (len>>2) { |
471 | *(u32 *)data = inl(hc->pci_iobase); | 473 | *(u32 *)data = le32_to_cpu(inl(hc->pci_iobase)); |
472 | data += 4; | 474 | data += 4; |
473 | len -= 4; | 475 | len -= 4; |
474 | } | 476 | } |
475 | while (len>>1) { | 477 | while (len>>1) { |
476 | *(u16 *)data = inw(hc->pci_iobase); | 478 | *(u16 *)data = le16_to_cpu(inw(hc->pci_iobase)); |
477 | data += 2; | 479 | data += 2; |
478 | len -= 2; | 480 | len -= 2; |
479 | } | 481 | } |
@@ -490,18 +492,18 @@ read_fifo_pcimem(struct hfc_multi *hc, u_char *data, int len) | |||
490 | { | 492 | { |
491 | while (len>>2) { | 493 | while (len>>2) { |
492 | *(u32 *)data = | 494 | *(u32 *)data = |
493 | readl((hc->pci_membase)+A_FIFO_DATA0); | 495 | le32_to_cpu(readl(hc->pci_membase + A_FIFO_DATA0)); |
494 | data += 4; | 496 | data += 4; |
495 | len -= 4; | 497 | len -= 4; |
496 | } | 498 | } |
497 | while (len>>1) { | 499 | while (len>>1) { |
498 | *(u16 *)data = | 500 | *(u16 *)data = |
499 | readw((hc->pci_membase)+A_FIFO_DATA0); | 501 | le16_to_cpu(readw(hc->pci_membase + A_FIFO_DATA0)); |
500 | data += 2; | 502 | data += 2; |
501 | len -= 2; | 503 | len -= 2; |
502 | } | 504 | } |
503 | while (len) { | 505 | while (len) { |
504 | *data = readb((hc->pci_membase)+A_FIFO_DATA0); | 506 | *data = readb(hc->pci_membase + A_FIFO_DATA0); |
505 | data++; | 507 | data++; |
506 | len--; | 508 | len--; |
507 | } | 509 | } |
@@ -3971,7 +3973,7 @@ open_bchannel(struct hfc_multi *hc, struct dchannel *dch, | |||
3971 | struct bchannel *bch; | 3973 | struct bchannel *bch; |
3972 | int ch; | 3974 | int ch; |
3973 | 3975 | ||
3974 | if (!test_bit(rq->adr.channel, &dch->dev.channelmap[0])) | 3976 | if (!test_channelmap(rq->adr.channel, dch->dev.channelmap)) |
3975 | return -EINVAL; | 3977 | return -EINVAL; |
3976 | if (rq->protocol == ISDN_P_NONE) | 3978 | if (rq->protocol == ISDN_P_NONE) |
3977 | return -EINVAL; | 3979 | return -EINVAL; |
@@ -4587,7 +4589,7 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m) | |||
4587 | list_add(&bch->ch.list, &dch->dev.bchannels); | 4589 | list_add(&bch->ch.list, &dch->dev.bchannels); |
4588 | hc->chan[ch].bch = bch; | 4590 | hc->chan[ch].bch = bch; |
4589 | hc->chan[ch].port = 0; | 4591 | hc->chan[ch].port = 0; |
4590 | test_and_set_bit(bch->nr, &dch->dev.channelmap[0]); | 4592 | set_channelmap(bch->nr, dch->dev.channelmap); |
4591 | } | 4593 | } |
4592 | /* set optical line type */ | 4594 | /* set optical line type */ |
4593 | if (port[Port_cnt] & 0x001) { | 4595 | if (port[Port_cnt] & 0x001) { |
@@ -4755,7 +4757,7 @@ init_multi_port(struct hfc_multi *hc, int pt) | |||
4755 | list_add(&bch->ch.list, &dch->dev.bchannels); | 4757 | list_add(&bch->ch.list, &dch->dev.bchannels); |
4756 | hc->chan[i + ch].bch = bch; | 4758 | hc->chan[i + ch].bch = bch; |
4757 | hc->chan[i + ch].port = pt; | 4759 | hc->chan[i + ch].port = pt; |
4758 | test_and_set_bit(bch->nr, &dch->dev.channelmap[0]); | 4760 | set_channelmap(bch->nr, dch->dev.channelmap); |
4759 | } | 4761 | } |
4760 | /* set master clock */ | 4762 | /* set master clock */ |
4761 | if (port[Port_cnt] & 0x001) { | 4763 | if (port[Port_cnt] & 0x001) { |
@@ -5050,12 +5052,12 @@ static void __devexit hfc_remove_pci(struct pci_dev *pdev) | |||
5050 | 5052 | ||
5051 | static const struct hm_map hfcm_map[] = { | 5053 | static const struct hm_map hfcm_map[] = { |
5052 | /*0*/ {VENDOR_BN, "HFC-1S Card (mini PCI)", 4, 1, 1, 3, 0, DIP_4S, 0}, | 5054 | /*0*/ {VENDOR_BN, "HFC-1S Card (mini PCI)", 4, 1, 1, 3, 0, DIP_4S, 0}, |
5053 | /*1*/ {VENDOR_BN, "HFC-2S Card", 4, 2, 1, 3, 0, DIP_4S}, | 5055 | /*1*/ {VENDOR_BN, "HFC-2S Card", 4, 2, 1, 3, 0, DIP_4S, 0}, |
5054 | /*2*/ {VENDOR_BN, "HFC-2S Card (mini PCI)", 4, 2, 1, 3, 0, DIP_4S, 0}, | 5056 | /*2*/ {VENDOR_BN, "HFC-2S Card (mini PCI)", 4, 2, 1, 3, 0, DIP_4S, 0}, |
5055 | /*3*/ {VENDOR_BN, "HFC-4S Card", 4, 4, 1, 2, 0, DIP_4S, 0}, | 5057 | /*3*/ {VENDOR_BN, "HFC-4S Card", 4, 4, 1, 2, 0, DIP_4S, 0}, |
5056 | /*4*/ {VENDOR_BN, "HFC-4S Card (mini PCI)", 4, 4, 1, 2, 0, 0, 0}, | 5058 | /*4*/ {VENDOR_BN, "HFC-4S Card (mini PCI)", 4, 4, 1, 2, 0, 0, 0}, |
5057 | /*5*/ {VENDOR_CCD, "HFC-4S Eval (old)", 4, 4, 0, 0, 0, 0, 0}, | 5059 | /*5*/ {VENDOR_CCD, "HFC-4S Eval (old)", 4, 4, 0, 0, 0, 0, 0}, |
5058 | /*6*/ {VENDOR_CCD, "HFC-4S IOB4ST", 4, 4, 1, 2, 0, 0, 0}, | 5060 | /*6*/ {VENDOR_CCD, "HFC-4S IOB4ST", 4, 4, 1, 2, 0, DIP_4S, 0}, |
5059 | /*7*/ {VENDOR_CCD, "HFC-4S", 4, 4, 1, 2, 0, 0, 0}, | 5061 | /*7*/ {VENDOR_CCD, "HFC-4S", 4, 4, 1, 2, 0, 0, 0}, |
5060 | /*8*/ {VENDOR_DIG, "HFC-4S Card", 4, 4, 0, 2, 0, 0, HFC_IO_MODE_REGIO}, | 5062 | /*8*/ {VENDOR_DIG, "HFC-4S Card", 4, 4, 0, 2, 0, 0, HFC_IO_MODE_REGIO}, |
5061 | /*9*/ {VENDOR_CCD, "HFC-4S Swyx 4xS0 SX2 QuadBri", 4, 4, 1, 2, 0, 0, 0}, | 5063 | /*9*/ {VENDOR_CCD, "HFC-4S Swyx 4xS0 SX2 QuadBri", 4, 4, 1, 2, 0, 0, 0}, |
@@ -5251,9 +5253,6 @@ HFCmulti_init(void) | |||
5251 | if (debug & DEBUG_HFCMULTI_INIT) | 5253 | if (debug & DEBUG_HFCMULTI_INIT) |
5252 | printk(KERN_DEBUG "%s: init entered\n", __func__); | 5254 | printk(KERN_DEBUG "%s: init entered\n", __func__); |
5253 | 5255 | ||
5254 | #ifdef __BIG_ENDIAN | ||
5255 | #error "not running on big endian machines now" | ||
5256 | #endif | ||
5257 | hfc_interrupt = symbol_get(ztdummy_extern_interrupt); | 5256 | hfc_interrupt = symbol_get(ztdummy_extern_interrupt); |
5258 | register_interrupt = symbol_get(ztdummy_register_interrupt); | 5257 | register_interrupt = symbol_get(ztdummy_register_interrupt); |
5259 | unregister_interrupt = symbol_get(ztdummy_unregister_interrupt); | 5258 | unregister_interrupt = symbol_get(ztdummy_unregister_interrupt); |
diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c index 3231814e7efa..9cf5edbb1a9b 100644 --- a/drivers/isdn/hardware/mISDN/hfcpci.c +++ b/drivers/isdn/hardware/mISDN/hfcpci.c | |||
@@ -2056,7 +2056,7 @@ setup_card(struct hfc_pci *card) | |||
2056 | card->dch.dev.nrbchan = 2; | 2056 | card->dch.dev.nrbchan = 2; |
2057 | for (i = 0; i < 2; i++) { | 2057 | for (i = 0; i < 2; i++) { |
2058 | card->bch[i].nr = i + 1; | 2058 | card->bch[i].nr = i + 1; |
2059 | test_and_set_bit(i + 1, &card->dch.dev.channelmap[0]); | 2059 | set_channelmap(i + 1, card->dch.dev.channelmap); |
2060 | card->bch[i].debug = debug; | 2060 | card->bch[i].debug = debug; |
2061 | mISDN_initbchannel(&card->bch[i], MAX_DATA_MEM); | 2061 | mISDN_initbchannel(&card->bch[i], MAX_DATA_MEM); |
2062 | card->bch[i].hw = card; | 2062 | card->bch[i].hw = card; |
diff --git a/drivers/isdn/mISDN/l1oip_core.c b/drivers/isdn/mISDN/l1oip_core.c index 155b99780c4f..e42150a57780 100644 --- a/drivers/isdn/mISDN/l1oip_core.c +++ b/drivers/isdn/mISDN/l1oip_core.c | |||
@@ -1006,8 +1006,7 @@ open_bchannel(struct l1oip *hc, struct dchannel *dch, struct channel_req *rq) | |||
1006 | struct bchannel *bch; | 1006 | struct bchannel *bch; |
1007 | int ch; | 1007 | int ch; |
1008 | 1008 | ||
1009 | if (!test_bit(rq->adr.channel & 0x1f, | 1009 | if (!test_channelmap(rq->adr.channel, dch->dev.channelmap)) |
1010 | &dch->dev.channelmap[rq->adr.channel >> 5])) | ||
1011 | return -EINVAL; | 1010 | return -EINVAL; |
1012 | if (rq->protocol == ISDN_P_NONE) | 1011 | if (rq->protocol == ISDN_P_NONE) |
1013 | return -EINVAL; | 1012 | return -EINVAL; |
@@ -1412,8 +1411,7 @@ init_card(struct l1oip *hc, int pri, int bundle) | |||
1412 | bch->ch.nr = i + ch; | 1411 | bch->ch.nr = i + ch; |
1413 | list_add(&bch->ch.list, &dch->dev.bchannels); | 1412 | list_add(&bch->ch.list, &dch->dev.bchannels); |
1414 | hc->chan[i + ch].bch = bch; | 1413 | hc->chan[i + ch].bch = bch; |
1415 | test_and_set_bit(bch->nr & 0x1f, | 1414 | set_channelmap(bch->nr, dch->dev.channelmap); |
1416 | &dch->dev.channelmap[bch->nr >> 5]); | ||
1417 | } | 1415 | } |
1418 | ret = mISDN_register_device(&dch->dev, hc->name); | 1416 | ret = mISDN_register_device(&dch->dev, hc->name); |
1419 | if (ret) | 1417 | if (ret) |
diff --git a/drivers/isdn/mISDN/socket.c b/drivers/isdn/mISDN/socket.c index 4ba4cc364c9e..e5a20f9542d1 100644 --- a/drivers/isdn/mISDN/socket.c +++ b/drivers/isdn/mISDN/socket.c | |||
@@ -379,7 +379,7 @@ data_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
379 | di.Bprotocols = dev->Bprotocols | get_all_Bprotocols(); | 379 | di.Bprotocols = dev->Bprotocols | get_all_Bprotocols(); |
380 | di.protocol = dev->D.protocol; | 380 | di.protocol = dev->D.protocol; |
381 | memcpy(di.channelmap, dev->channelmap, | 381 | memcpy(di.channelmap, dev->channelmap, |
382 | MISDN_CHMAP_SIZE * 4); | 382 | sizeof(di.channelmap)); |
383 | di.nrbchan = dev->nrbchan; | 383 | di.nrbchan = dev->nrbchan; |
384 | strcpy(di.name, dev->name); | 384 | strcpy(di.name, dev->name); |
385 | if (copy_to_user((void __user *)arg, &di, sizeof(di))) | 385 | if (copy_to_user((void __user *)arg, &di, sizeof(di))) |
@@ -637,7 +637,7 @@ base_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
637 | di.Bprotocols = dev->Bprotocols | get_all_Bprotocols(); | 637 | di.Bprotocols = dev->Bprotocols | get_all_Bprotocols(); |
638 | di.protocol = dev->D.protocol; | 638 | di.protocol = dev->D.protocol; |
639 | memcpy(di.channelmap, dev->channelmap, | 639 | memcpy(di.channelmap, dev->channelmap, |
640 | MISDN_CHMAP_SIZE * 4); | 640 | sizeof(di.channelmap)); |
641 | di.nrbchan = dev->nrbchan; | 641 | di.nrbchan = dev->nrbchan; |
642 | strcpy(di.name, dev->name); | 642 | strcpy(di.name, dev->name); |
643 | if (copy_to_user((void __user *)arg, &di, sizeof(di))) | 643 | if (copy_to_user((void __user *)arg, &di, sizeof(di))) |
diff --git a/drivers/mtd/maps/ipaq-flash.c b/drivers/mtd/maps/ipaq-flash.c index a806119797e0..113b1062020d 100644 --- a/drivers/mtd/maps/ipaq-flash.c +++ b/drivers/mtd/maps/ipaq-flash.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | #include <asm/hardware.h> | 27 | #include <asm/hardware.h> |
28 | #include <asm/arch-sa1100/h3600.h> | 28 | #include <asm/arch/h3600.h> |
29 | #include <asm/io.h> | 29 | #include <asm/io.h> |
30 | 30 | ||
31 | 31 | ||
diff --git a/drivers/mtd/mtdsuper.c b/drivers/mtd/mtdsuper.c index 9b6af7e74a65..00d46e137b2a 100644 --- a/drivers/mtd/mtdsuper.c +++ b/drivers/mtd/mtdsuper.c | |||
@@ -125,8 +125,11 @@ int get_sb_mtd(struct file_system_type *fs_type, int flags, | |||
125 | int (*fill_super)(struct super_block *, void *, int), | 125 | int (*fill_super)(struct super_block *, void *, int), |
126 | struct vfsmount *mnt) | 126 | struct vfsmount *mnt) |
127 | { | 127 | { |
128 | #ifdef CONFIG_BLOCK | ||
128 | struct block_device *bdev; | 129 | struct block_device *bdev; |
129 | int mtdnr, ret; | 130 | int ret, major; |
131 | #endif | ||
132 | int mtdnr; | ||
130 | 133 | ||
131 | if (!dev_name) | 134 | if (!dev_name) |
132 | return -EINVAL; | 135 | return -EINVAL; |
@@ -178,6 +181,7 @@ int get_sb_mtd(struct file_system_type *fs_type, int flags, | |||
178 | } | 181 | } |
179 | } | 182 | } |
180 | 183 | ||
184 | #ifdef CONFIG_BLOCK | ||
181 | /* try the old way - the hack where we allowed users to mount | 185 | /* try the old way - the hack where we allowed users to mount |
182 | * /dev/mtdblock$(n) but didn't actually _use_ the blockdev | 186 | * /dev/mtdblock$(n) but didn't actually _use_ the blockdev |
183 | */ | 187 | */ |
@@ -190,22 +194,25 @@ int get_sb_mtd(struct file_system_type *fs_type, int flags, | |||
190 | DEBUG(1, "MTDSB: lookup_bdev() returned 0\n"); | 194 | DEBUG(1, "MTDSB: lookup_bdev() returned 0\n"); |
191 | 195 | ||
192 | ret = -EINVAL; | 196 | ret = -EINVAL; |
193 | if (MAJOR(bdev->bd_dev) != MTD_BLOCK_MAJOR) | ||
194 | goto not_an_MTD_device; | ||
195 | 197 | ||
198 | major = MAJOR(bdev->bd_dev); | ||
196 | mtdnr = MINOR(bdev->bd_dev); | 199 | mtdnr = MINOR(bdev->bd_dev); |
197 | bdput(bdev); | 200 | bdput(bdev); |
198 | 201 | ||
202 | if (major != MTD_BLOCK_MAJOR) | ||
203 | goto not_an_MTD_device; | ||
204 | |||
199 | return get_sb_mtd_nr(fs_type, flags, dev_name, data, mtdnr, fill_super, | 205 | return get_sb_mtd_nr(fs_type, flags, dev_name, data, mtdnr, fill_super, |
200 | mnt); | 206 | mnt); |
201 | 207 | ||
202 | not_an_MTD_device: | 208 | not_an_MTD_device: |
209 | #endif /* CONFIG_BLOCK */ | ||
210 | |||
203 | if (!(flags & MS_SILENT)) | 211 | if (!(flags & MS_SILENT)) |
204 | printk(KERN_NOTICE | 212 | printk(KERN_NOTICE |
205 | "MTD: Attempt to mount non-MTD device \"%s\"\n", | 213 | "MTD: Attempt to mount non-MTD device \"%s\"\n", |
206 | dev_name); | 214 | dev_name); |
207 | bdput(bdev); | 215 | return -EINVAL; |
208 | return ret; | ||
209 | } | 216 | } |
210 | 217 | ||
211 | EXPORT_SYMBOL_GPL(get_sb_mtd); | 218 | EXPORT_SYMBOL_GPL(get_sb_mtd); |
diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c index d0c1d63d1891..203e579ebbd2 100644 --- a/drivers/pcmcia/rsrc_nonstatic.c +++ b/drivers/pcmcia/rsrc_nonstatic.c | |||
@@ -275,7 +275,7 @@ static int readable(struct pcmcia_socket *s, struct resource *res, | |||
275 | destroy_cis_cache(s); | 275 | destroy_cis_cache(s); |
276 | } | 276 | } |
277 | s->cis_mem.res = NULL; | 277 | s->cis_mem.res = NULL; |
278 | if ((ret != 0) || (count == 0)) | 278 | if ((ret != 0) || (*count == 0)) |
279 | return 0; | 279 | return 0; |
280 | return 1; | 280 | return 1; |
281 | } | 281 | } |
diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c index da876d3924be..74d12b58a263 100644 --- a/drivers/scsi/hptiop.c +++ b/drivers/scsi/hptiop.c | |||
@@ -1249,6 +1249,13 @@ static struct pci_device_id hptiop_id_table[] = { | |||
1249 | { PCI_VDEVICE(TTI, 0x3522), (kernel_ulong_t)&hptiop_itl_ops }, | 1249 | { PCI_VDEVICE(TTI, 0x3522), (kernel_ulong_t)&hptiop_itl_ops }, |
1250 | { PCI_VDEVICE(TTI, 0x3410), (kernel_ulong_t)&hptiop_itl_ops }, | 1250 | { PCI_VDEVICE(TTI, 0x3410), (kernel_ulong_t)&hptiop_itl_ops }, |
1251 | { PCI_VDEVICE(TTI, 0x3540), (kernel_ulong_t)&hptiop_itl_ops }, | 1251 | { PCI_VDEVICE(TTI, 0x3540), (kernel_ulong_t)&hptiop_itl_ops }, |
1252 | { PCI_VDEVICE(TTI, 0x3530), (kernel_ulong_t)&hptiop_itl_ops }, | ||
1253 | { PCI_VDEVICE(TTI, 0x3560), (kernel_ulong_t)&hptiop_itl_ops }, | ||
1254 | { PCI_VDEVICE(TTI, 0x4322), (kernel_ulong_t)&hptiop_itl_ops }, | ||
1255 | { PCI_VDEVICE(TTI, 0x4210), (kernel_ulong_t)&hptiop_itl_ops }, | ||
1256 | { PCI_VDEVICE(TTI, 0x4211), (kernel_ulong_t)&hptiop_itl_ops }, | ||
1257 | { PCI_VDEVICE(TTI, 0x4310), (kernel_ulong_t)&hptiop_itl_ops }, | ||
1258 | { PCI_VDEVICE(TTI, 0x4311), (kernel_ulong_t)&hptiop_itl_ops }, | ||
1252 | { PCI_VDEVICE(TTI, 0x3120), (kernel_ulong_t)&hptiop_mv_ops }, | 1259 | { PCI_VDEVICE(TTI, 0x3120), (kernel_ulong_t)&hptiop_mv_ops }, |
1253 | { PCI_VDEVICE(TTI, 0x3122), (kernel_ulong_t)&hptiop_mv_ops }, | 1260 | { PCI_VDEVICE(TTI, 0x3122), (kernel_ulong_t)&hptiop_mv_ops }, |
1254 | { PCI_VDEVICE(TTI, 0x3020), (kernel_ulong_t)&hptiop_mv_ops }, | 1261 | { PCI_VDEVICE(TTI, 0x3020), (kernel_ulong_t)&hptiop_mv_ops }, |
diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c index 75a64a6cae8c..b29360ed0bdc 100644 --- a/drivers/scsi/scsi_transport_spi.c +++ b/drivers/scsi/scsi_transport_spi.c | |||
@@ -366,12 +366,14 @@ spi_transport_rd_attr(rti, "%d\n"); | |||
366 | spi_transport_rd_attr(pcomp_en, "%d\n"); | 366 | spi_transport_rd_attr(pcomp_en, "%d\n"); |
367 | spi_transport_rd_attr(hold_mcs, "%d\n"); | 367 | spi_transport_rd_attr(hold_mcs, "%d\n"); |
368 | 368 | ||
369 | /* we only care about the first child device so we return 1 */ | 369 | /* we only care about the first child device that's a real SCSI device |
370 | * so we return 1 to terminate the iteration when we find it */ | ||
370 | static int child_iter(struct device *dev, void *data) | 371 | static int child_iter(struct device *dev, void *data) |
371 | { | 372 | { |
372 | struct scsi_device *sdev = to_scsi_device(dev); | 373 | if (!scsi_is_sdev_device(dev)) |
374 | return 0; | ||
373 | 375 | ||
374 | spi_dv_device(sdev); | 376 | spi_dv_device(to_scsi_device(dev)); |
375 | return 1; | 377 | return 1; |
376 | } | 378 | } |
377 | 379 | ||
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index e5e7d7856454..8e08d51a0f05 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -375,7 +375,6 @@ static int sd_prep_fn(struct request_queue *q, struct request *rq) | |||
375 | struct gendisk *disk = rq->rq_disk; | 375 | struct gendisk *disk = rq->rq_disk; |
376 | struct scsi_disk *sdkp; | 376 | struct scsi_disk *sdkp; |
377 | sector_t block = rq->sector; | 377 | sector_t block = rq->sector; |
378 | sector_t threshold; | ||
379 | unsigned int this_count = rq->nr_sectors; | 378 | unsigned int this_count = rq->nr_sectors; |
380 | unsigned int timeout = sdp->timeout; | 379 | unsigned int timeout = sdp->timeout; |
381 | int ret; | 380 | int ret; |
@@ -423,21 +422,13 @@ static int sd_prep_fn(struct request_queue *q, struct request *rq) | |||
423 | } | 422 | } |
424 | 423 | ||
425 | /* | 424 | /* |
426 | * Some SD card readers can't handle multi-sector accesses which touch | 425 | * Some devices (some sdcards for one) don't like it if the |
427 | * the last one or two hardware sectors. Split accesses as needed. | 426 | * last sector gets read in a larger then 1 sector read. |
428 | */ | 427 | */ |
429 | threshold = get_capacity(disk) - SD_LAST_BUGGY_SECTORS * | 428 | if (unlikely(sdp->last_sector_bug && |
430 | (sdp->sector_size / 512); | 429 | rq->nr_sectors > sdp->sector_size / 512 && |
431 | 430 | block + this_count == get_capacity(disk))) | |
432 | if (unlikely(sdp->last_sector_bug && block + this_count > threshold)) { | 431 | this_count -= sdp->sector_size / 512; |
433 | if (block < threshold) { | ||
434 | /* Access up to the threshold but not beyond */ | ||
435 | this_count = threshold - block; | ||
436 | } else { | ||
437 | /* Access only a single hardware sector */ | ||
438 | this_count = sdp->sector_size / 512; | ||
439 | } | ||
440 | } | ||
441 | 432 | ||
442 | SCSI_LOG_HLQUEUE(2, scmd_printk(KERN_INFO, SCpnt, "block=%llu\n", | 433 | SCSI_LOG_HLQUEUE(2, scmd_printk(KERN_INFO, SCpnt, "block=%llu\n", |
443 | (unsigned long long)block)); | 434 | (unsigned long long)block)); |
diff --git a/drivers/scsi/sd.h b/drivers/scsi/sd.h index 95b9f06534d5..550b2f70a1f8 100644 --- a/drivers/scsi/sd.h +++ b/drivers/scsi/sd.h | |||
@@ -31,12 +31,6 @@ | |||
31 | */ | 31 | */ |
32 | #define SD_BUF_SIZE 512 | 32 | #define SD_BUF_SIZE 512 |
33 | 33 | ||
34 | /* | ||
35 | * Number of sectors at the end of the device to avoid multi-sector | ||
36 | * accesses to in the case of last_sector_bug | ||
37 | */ | ||
38 | #define SD_LAST_BUGGY_SECTORS 8 | ||
39 | |||
40 | struct scsi_disk { | 34 | struct scsi_disk { |
41 | struct scsi_driver *driver; /* always &sd_template */ | 35 | struct scsi_driver *driver; /* always &sd_template */ |
42 | struct scsi_device *device; | 36 | struct scsi_device *device; |
diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c index 0fe031f003e7..1bcf3c33d7ff 100644 --- a/drivers/scsi/ses.c +++ b/drivers/scsi/ses.c | |||
@@ -345,14 +345,14 @@ static int ses_enclosure_find_by_addr(struct enclosure_device *edev, | |||
345 | return 0; | 345 | return 0; |
346 | } | 346 | } |
347 | 347 | ||
348 | #define VPD_INQUIRY_SIZE 512 | 348 | #define VPD_INQUIRY_SIZE 36 |
349 | 349 | ||
350 | static void ses_match_to_enclosure(struct enclosure_device *edev, | 350 | static void ses_match_to_enclosure(struct enclosure_device *edev, |
351 | struct scsi_device *sdev) | 351 | struct scsi_device *sdev) |
352 | { | 352 | { |
353 | unsigned char *buf = kmalloc(VPD_INQUIRY_SIZE, GFP_KERNEL); | 353 | unsigned char *buf = kmalloc(VPD_INQUIRY_SIZE, GFP_KERNEL); |
354 | unsigned char *desc; | 354 | unsigned char *desc; |
355 | int len; | 355 | u16 vpd_len; |
356 | struct efd efd = { | 356 | struct efd efd = { |
357 | .addr = 0, | 357 | .addr = 0, |
358 | }; | 358 | }; |
@@ -372,9 +372,19 @@ static void ses_match_to_enclosure(struct enclosure_device *edev, | |||
372 | VPD_INQUIRY_SIZE, NULL, SES_TIMEOUT, SES_RETRIES)) | 372 | VPD_INQUIRY_SIZE, NULL, SES_TIMEOUT, SES_RETRIES)) |
373 | goto free; | 373 | goto free; |
374 | 374 | ||
375 | len = (buf[2] << 8) + buf[3]; | 375 | vpd_len = (buf[2] << 8) + buf[3]; |
376 | kfree(buf); | ||
377 | buf = kmalloc(vpd_len, GFP_KERNEL); | ||
378 | if (!buf) | ||
379 | return; | ||
380 | cmd[3] = vpd_len >> 8; | ||
381 | cmd[4] = vpd_len & 0xff; | ||
382 | if (scsi_execute_req(sdev, cmd, DMA_FROM_DEVICE, buf, | ||
383 | vpd_len, NULL, SES_TIMEOUT, SES_RETRIES)) | ||
384 | goto free; | ||
385 | |||
376 | desc = buf + 4; | 386 | desc = buf + 4; |
377 | while (desc < buf + len) { | 387 | while (desc < buf + vpd_len) { |
378 | enum scsi_protocol proto = desc[0] >> 4; | 388 | enum scsi_protocol proto = desc[0] >> 4; |
379 | u8 code_set = desc[0] & 0x0f; | 389 | u8 code_set = desc[0] & 0x0f; |
380 | u8 piv = desc[1] & 0x80; | 390 | u8 piv = desc[1] & 0x80; |
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c index 9d8543762a30..efcd44344fb1 100644 --- a/drivers/serial/bfin_5xx.c +++ b/drivers/serial/bfin_5xx.c | |||
@@ -817,7 +817,7 @@ static void bfin_serial_set_ldisc(struct uart_port *port) | |||
817 | if (line >= port->info->port.tty->driver->num) | 817 | if (line >= port->info->port.tty->driver->num) |
818 | return; | 818 | return; |
819 | 819 | ||
820 | switch (port->info->port.tty->ldisc.num) { | 820 | switch (port->info->port.tty->termios->c_line) { |
821 | case N_IRDA: | 821 | case N_IRDA: |
822 | val = UART_GET_GCTL(&bfin_serial_ports[line]); | 822 | val = UART_GET_GCTL(&bfin_serial_ports[line]); |
823 | val |= (IREN | RPOLC); | 823 | val |= (IREN | RPOLC); |
diff --git a/drivers/serial/crisv10.c b/drivers/serial/crisv10.c index 8249ac490559..bf94a770bb44 100644 --- a/drivers/serial/crisv10.c +++ b/drivers/serial/crisv10.c | |||
@@ -234,7 +234,7 @@ unsigned long r_alt_ser_baudrate_shadow = 0; | |||
234 | 234 | ||
235 | static struct e100_serial rs_table[] = { | 235 | static struct e100_serial rs_table[] = { |
236 | { .baud = DEF_BAUD, | 236 | { .baud = DEF_BAUD, |
237 | .port = (unsigned char *)R_SERIAL0_CTRL, | 237 | .ioport = (unsigned char *)R_SERIAL0_CTRL, |
238 | .irq = 1U << 12, /* uses DMA 6 and 7 */ | 238 | .irq = 1U << 12, /* uses DMA 6 and 7 */ |
239 | .oclrintradr = R_DMA_CH6_CLR_INTR, | 239 | .oclrintradr = R_DMA_CH6_CLR_INTR, |
240 | .ofirstadr = R_DMA_CH6_FIRST, | 240 | .ofirstadr = R_DMA_CH6_FIRST, |
@@ -288,7 +288,7 @@ static struct e100_serial rs_table[] = { | |||
288 | }, /* ttyS0 */ | 288 | }, /* ttyS0 */ |
289 | #ifndef CONFIG_SVINTO_SIM | 289 | #ifndef CONFIG_SVINTO_SIM |
290 | { .baud = DEF_BAUD, | 290 | { .baud = DEF_BAUD, |
291 | .port = (unsigned char *)R_SERIAL1_CTRL, | 291 | .ioport = (unsigned char *)R_SERIAL1_CTRL, |
292 | .irq = 1U << 16, /* uses DMA 8 and 9 */ | 292 | .irq = 1U << 16, /* uses DMA 8 and 9 */ |
293 | .oclrintradr = R_DMA_CH8_CLR_INTR, | 293 | .oclrintradr = R_DMA_CH8_CLR_INTR, |
294 | .ofirstadr = R_DMA_CH8_FIRST, | 294 | .ofirstadr = R_DMA_CH8_FIRST, |
@@ -344,7 +344,7 @@ static struct e100_serial rs_table[] = { | |||
344 | }, /* ttyS1 */ | 344 | }, /* ttyS1 */ |
345 | 345 | ||
346 | { .baud = DEF_BAUD, | 346 | { .baud = DEF_BAUD, |
347 | .port = (unsigned char *)R_SERIAL2_CTRL, | 347 | .ioport = (unsigned char *)R_SERIAL2_CTRL, |
348 | .irq = 1U << 4, /* uses DMA 2 and 3 */ | 348 | .irq = 1U << 4, /* uses DMA 2 and 3 */ |
349 | .oclrintradr = R_DMA_CH2_CLR_INTR, | 349 | .oclrintradr = R_DMA_CH2_CLR_INTR, |
350 | .ofirstadr = R_DMA_CH2_FIRST, | 350 | .ofirstadr = R_DMA_CH2_FIRST, |
@@ -398,7 +398,7 @@ static struct e100_serial rs_table[] = { | |||
398 | }, /* ttyS2 */ | 398 | }, /* ttyS2 */ |
399 | 399 | ||
400 | { .baud = DEF_BAUD, | 400 | { .baud = DEF_BAUD, |
401 | .port = (unsigned char *)R_SERIAL3_CTRL, | 401 | .ioport = (unsigned char *)R_SERIAL3_CTRL, |
402 | .irq = 1U << 8, /* uses DMA 4 and 5 */ | 402 | .irq = 1U << 8, /* uses DMA 4 and 5 */ |
403 | .oclrintradr = R_DMA_CH4_CLR_INTR, | 403 | .oclrintradr = R_DMA_CH4_CLR_INTR, |
404 | .ofirstadr = R_DMA_CH4_FIRST, | 404 | .ofirstadr = R_DMA_CH4_FIRST, |
@@ -939,7 +939,7 @@ static const struct control_pins e100_modem_pins[NR_PORTS] = | |||
939 | /* Output */ | 939 | /* Output */ |
940 | #define E100_RTS_GET(info) ((info)->rx_ctrl & E100_RTS_MASK) | 940 | #define E100_RTS_GET(info) ((info)->rx_ctrl & E100_RTS_MASK) |
941 | /* Input */ | 941 | /* Input */ |
942 | #define E100_CTS_GET(info) ((info)->port[REG_STATUS] & E100_CTS_MASK) | 942 | #define E100_CTS_GET(info) ((info)->ioport[REG_STATUS] & E100_CTS_MASK) |
943 | 943 | ||
944 | /* These are typically PA or PB and 0 means 0V, 1 means 3.3V */ | 944 | /* These are typically PA or PB and 0 means 0V, 1 means 3.3V */ |
945 | /* Is an output */ | 945 | /* Is an output */ |
@@ -1092,7 +1092,7 @@ e100_rts(struct e100_serial *info, int set) | |||
1092 | local_irq_save(flags); | 1092 | local_irq_save(flags); |
1093 | info->rx_ctrl &= ~E100_RTS_MASK; | 1093 | info->rx_ctrl &= ~E100_RTS_MASK; |
1094 | info->rx_ctrl |= (set ? 0 : E100_RTS_MASK); /* RTS is active low */ | 1094 | info->rx_ctrl |= (set ? 0 : E100_RTS_MASK); /* RTS is active low */ |
1095 | info->port[REG_REC_CTRL] = info->rx_ctrl; | 1095 | info->ioport[REG_REC_CTRL] = info->rx_ctrl; |
1096 | local_irq_restore(flags); | 1096 | local_irq_restore(flags); |
1097 | #ifdef SERIAL_DEBUG_IO | 1097 | #ifdef SERIAL_DEBUG_IO |
1098 | printk("ser%i rts %i\n", info->line, set); | 1098 | printk("ser%i rts %i\n", info->line, set); |
@@ -1142,7 +1142,7 @@ e100_disable_rx(struct e100_serial *info) | |||
1142 | { | 1142 | { |
1143 | #ifndef CONFIG_SVINTO_SIM | 1143 | #ifndef CONFIG_SVINTO_SIM |
1144 | /* disable the receiver */ | 1144 | /* disable the receiver */ |
1145 | info->port[REG_REC_CTRL] = | 1145 | info->ioport[REG_REC_CTRL] = |
1146 | (info->rx_ctrl &= ~IO_MASK(R_SERIAL0_REC_CTRL, rec_enable)); | 1146 | (info->rx_ctrl &= ~IO_MASK(R_SERIAL0_REC_CTRL, rec_enable)); |
1147 | #endif | 1147 | #endif |
1148 | } | 1148 | } |
@@ -1152,7 +1152,7 @@ e100_enable_rx(struct e100_serial *info) | |||
1152 | { | 1152 | { |
1153 | #ifndef CONFIG_SVINTO_SIM | 1153 | #ifndef CONFIG_SVINTO_SIM |
1154 | /* enable the receiver */ | 1154 | /* enable the receiver */ |
1155 | info->port[REG_REC_CTRL] = | 1155 | info->ioport[REG_REC_CTRL] = |
1156 | (info->rx_ctrl |= IO_MASK(R_SERIAL0_REC_CTRL, rec_enable)); | 1156 | (info->rx_ctrl |= IO_MASK(R_SERIAL0_REC_CTRL, rec_enable)); |
1157 | #endif | 1157 | #endif |
1158 | } | 1158 | } |
@@ -1490,7 +1490,7 @@ rs_stop(struct tty_struct *tty) | |||
1490 | xoff |= IO_STATE(R_SERIAL0_XOFF, auto_xoff, enable); | 1490 | xoff |= IO_STATE(R_SERIAL0_XOFF, auto_xoff, enable); |
1491 | } | 1491 | } |
1492 | 1492 | ||
1493 | *((unsigned long *)&info->port[REG_XOFF]) = xoff; | 1493 | *((unsigned long *)&info->ioport[REG_XOFF]) = xoff; |
1494 | local_irq_restore(flags); | 1494 | local_irq_restore(flags); |
1495 | } | 1495 | } |
1496 | } | 1496 | } |
@@ -1513,7 +1513,7 @@ rs_start(struct tty_struct *tty) | |||
1513 | xoff |= IO_STATE(R_SERIAL0_XOFF, auto_xoff, enable); | 1513 | xoff |= IO_STATE(R_SERIAL0_XOFF, auto_xoff, enable); |
1514 | } | 1514 | } |
1515 | 1515 | ||
1516 | *((unsigned long *)&info->port[REG_XOFF]) = xoff; | 1516 | *((unsigned long *)&info->ioport[REG_XOFF]) = xoff; |
1517 | if (!info->uses_dma_out && | 1517 | if (!info->uses_dma_out && |
1518 | info->xmit.head != info->xmit.tail && info->xmit.buf) | 1518 | info->xmit.head != info->xmit.tail && info->xmit.buf) |
1519 | e100_enable_serial_tx_ready_irq(info); | 1519 | e100_enable_serial_tx_ready_irq(info); |
@@ -1888,7 +1888,7 @@ static void receive_chars_dma(struct e100_serial *info) | |||
1888 | handle_all_descr_data(info); | 1888 | handle_all_descr_data(info); |
1889 | 1889 | ||
1890 | /* Read the status register to detect errors */ | 1890 | /* Read the status register to detect errors */ |
1891 | rstat = info->port[REG_STATUS]; | 1891 | rstat = info->ioport[REG_STATUS]; |
1892 | if (rstat & IO_MASK(R_SERIAL0_STATUS, xoff_detect) ) { | 1892 | if (rstat & IO_MASK(R_SERIAL0_STATUS, xoff_detect) ) { |
1893 | DFLOW(DEBUG_LOG(info->line, "XOFF detect stat %x\n", rstat)); | 1893 | DFLOW(DEBUG_LOG(info->line, "XOFF detect stat %x\n", rstat)); |
1894 | } | 1894 | } |
@@ -1897,7 +1897,7 @@ static void receive_chars_dma(struct e100_serial *info) | |||
1897 | /* If we got an error, we must reset it by reading the | 1897 | /* If we got an error, we must reset it by reading the |
1898 | * data_in field | 1898 | * data_in field |
1899 | */ | 1899 | */ |
1900 | unsigned char data = info->port[REG_DATA]; | 1900 | unsigned char data = info->ioport[REG_DATA]; |
1901 | 1901 | ||
1902 | PROCSTAT(ser_stat[info->line].errors_cnt++); | 1902 | PROCSTAT(ser_stat[info->line].errors_cnt++); |
1903 | DEBUG_LOG(info->line, "#dERR: s d 0x%04X\n", | 1903 | DEBUG_LOG(info->line, "#dERR: s d 0x%04X\n", |
@@ -2077,7 +2077,7 @@ static int force_eop_if_needed(struct e100_serial *info) | |||
2077 | /* We check data_avail bit to determine if data has | 2077 | /* We check data_avail bit to determine if data has |
2078 | * arrived since last time | 2078 | * arrived since last time |
2079 | */ | 2079 | */ |
2080 | unsigned char rstat = info->port[REG_STATUS]; | 2080 | unsigned char rstat = info->ioport[REG_STATUS]; |
2081 | 2081 | ||
2082 | /* error or datavail? */ | 2082 | /* error or datavail? */ |
2083 | if (rstat & SER_ERROR_MASK) { | 2083 | if (rstat & SER_ERROR_MASK) { |
@@ -2096,7 +2096,7 @@ static int force_eop_if_needed(struct e100_serial *info) | |||
2096 | TIMERD(DEBUG_LOG(info->line, "timeout: rstat 0x%03X\n", | 2096 | TIMERD(DEBUG_LOG(info->line, "timeout: rstat 0x%03X\n", |
2097 | rstat | (info->line << 8))); | 2097 | rstat | (info->line << 8))); |
2098 | /* Read data to clear status flags */ | 2098 | /* Read data to clear status flags */ |
2099 | (void)info->port[REG_DATA]; | 2099 | (void)info->ioport[REG_DATA]; |
2100 | 2100 | ||
2101 | info->forced_eop = 0; | 2101 | info->forced_eop = 0; |
2102 | START_FLUSH_FAST_TIMER(info, "magic"); | 2102 | START_FLUSH_FAST_TIMER(info, "magic"); |
@@ -2296,7 +2296,7 @@ struct e100_serial * handle_ser_rx_interrupt_no_dma(struct e100_serial *info) | |||
2296 | } | 2296 | } |
2297 | 2297 | ||
2298 | /* Read data and status at the same time */ | 2298 | /* Read data and status at the same time */ |
2299 | data_read = *((unsigned long *)&info->port[REG_DATA_STATUS32]); | 2299 | data_read = *((unsigned long *)&info->ioport[REG_DATA_STATUS32]); |
2300 | more_data: | 2300 | more_data: |
2301 | if (data_read & IO_MASK(R_SERIAL0_READ, xoff_detect) ) { | 2301 | if (data_read & IO_MASK(R_SERIAL0_READ, xoff_detect) ) { |
2302 | DFLOW(DEBUG_LOG(info->line, "XOFF detect\n", 0)); | 2302 | DFLOW(DEBUG_LOG(info->line, "XOFF detect\n", 0)); |
@@ -2391,7 +2391,7 @@ more_data: | |||
2391 | 2391 | ||
2392 | 2392 | ||
2393 | info->icount.rx++; | 2393 | info->icount.rx++; |
2394 | data_read = *((unsigned long *)&info->port[REG_DATA_STATUS32]); | 2394 | data_read = *((unsigned long *)&info->ioport[REG_DATA_STATUS32]); |
2395 | if (data_read & IO_MASK(R_SERIAL0_READ, data_avail)) { | 2395 | if (data_read & IO_MASK(R_SERIAL0_READ, data_avail)) { |
2396 | DEBUG_LOG(info->line, "ser_rx %c in loop\n", IO_EXTRACT(R_SERIAL0_READ, data_in, data_read)); | 2396 | DEBUG_LOG(info->line, "ser_rx %c in loop\n", IO_EXTRACT(R_SERIAL0_READ, data_in, data_read)); |
2397 | goto more_data; | 2397 | goto more_data; |
@@ -2413,7 +2413,7 @@ static struct e100_serial* handle_ser_rx_interrupt(struct e100_serial *info) | |||
2413 | return handle_ser_rx_interrupt_no_dma(info); | 2413 | return handle_ser_rx_interrupt_no_dma(info); |
2414 | } | 2414 | } |
2415 | /* DMA is used */ | 2415 | /* DMA is used */ |
2416 | rstat = info->port[REG_STATUS]; | 2416 | rstat = info->ioport[REG_STATUS]; |
2417 | if (rstat & IO_MASK(R_SERIAL0_STATUS, xoff_detect) ) { | 2417 | if (rstat & IO_MASK(R_SERIAL0_STATUS, xoff_detect) ) { |
2418 | DFLOW(DEBUG_LOG(info->line, "XOFF detect\n", 0)); | 2418 | DFLOW(DEBUG_LOG(info->line, "XOFF detect\n", 0)); |
2419 | } | 2419 | } |
@@ -2426,7 +2426,7 @@ static struct e100_serial* handle_ser_rx_interrupt(struct e100_serial *info) | |||
2426 | /* If we got an error, we must reset it by reading the | 2426 | /* If we got an error, we must reset it by reading the |
2427 | * data_in field | 2427 | * data_in field |
2428 | */ | 2428 | */ |
2429 | data = info->port[REG_DATA]; | 2429 | data = info->ioport[REG_DATA]; |
2430 | DINTR1(DEBUG_LOG(info->line, "ser_rx! %c\n", data)); | 2430 | DINTR1(DEBUG_LOG(info->line, "ser_rx! %c\n", data)); |
2431 | DINTR1(DEBUG_LOG(info->line, "ser_rx err stat %02X\n", rstat)); | 2431 | DINTR1(DEBUG_LOG(info->line, "ser_rx err stat %02X\n", rstat)); |
2432 | if (!data && (rstat & SER_FRAMING_ERR_MASK)) { | 2432 | if (!data && (rstat & SER_FRAMING_ERR_MASK)) { |
@@ -2528,10 +2528,10 @@ static void handle_ser_tx_interrupt(struct e100_serial *info) | |||
2528 | unsigned char rstat; | 2528 | unsigned char rstat; |
2529 | DFLOW(DEBUG_LOG(info->line, "tx_int: xchar 0x%02X\n", info->x_char)); | 2529 | DFLOW(DEBUG_LOG(info->line, "tx_int: xchar 0x%02X\n", info->x_char)); |
2530 | local_irq_save(flags); | 2530 | local_irq_save(flags); |
2531 | rstat = info->port[REG_STATUS]; | 2531 | rstat = info->ioport[REG_STATUS]; |
2532 | DFLOW(DEBUG_LOG(info->line, "stat %x\n", rstat)); | 2532 | DFLOW(DEBUG_LOG(info->line, "stat %x\n", rstat)); |
2533 | 2533 | ||
2534 | info->port[REG_TR_DATA] = info->x_char; | 2534 | info->ioport[REG_TR_DATA] = info->x_char; |
2535 | info->icount.tx++; | 2535 | info->icount.tx++; |
2536 | info->x_char = 0; | 2536 | info->x_char = 0; |
2537 | /* We must enable since it is disabled in ser_interrupt */ | 2537 | /* We must enable since it is disabled in ser_interrupt */ |
@@ -2545,7 +2545,7 @@ static void handle_ser_tx_interrupt(struct e100_serial *info) | |||
2545 | /* We only use normal tx interrupt when sending x_char */ | 2545 | /* We only use normal tx interrupt when sending x_char */ |
2546 | DFLOW(DEBUG_LOG(info->line, "tx_int: xchar sent\n", 0)); | 2546 | DFLOW(DEBUG_LOG(info->line, "tx_int: xchar sent\n", 0)); |
2547 | local_irq_save(flags); | 2547 | local_irq_save(flags); |
2548 | rstat = info->port[REG_STATUS]; | 2548 | rstat = info->ioport[REG_STATUS]; |
2549 | DFLOW(DEBUG_LOG(info->line, "stat %x\n", rstat)); | 2549 | DFLOW(DEBUG_LOG(info->line, "stat %x\n", rstat)); |
2550 | e100_disable_serial_tx_ready_irq(info); | 2550 | e100_disable_serial_tx_ready_irq(info); |
2551 | if (info->port.tty->stopped) | 2551 | if (info->port.tty->stopped) |
@@ -2573,7 +2573,7 @@ static void handle_ser_tx_interrupt(struct e100_serial *info) | |||
2573 | DINTR2(DEBUG_LOG(info->line, "tx_int %c\n", info->xmit.buf[info->xmit.tail])); | 2573 | DINTR2(DEBUG_LOG(info->line, "tx_int %c\n", info->xmit.buf[info->xmit.tail])); |
2574 | /* Send a byte, rs485 timing is critical so turn of ints */ | 2574 | /* Send a byte, rs485 timing is critical so turn of ints */ |
2575 | local_irq_save(flags); | 2575 | local_irq_save(flags); |
2576 | info->port[REG_TR_DATA] = info->xmit.buf[info->xmit.tail]; | 2576 | info->ioport[REG_TR_DATA] = info->xmit.buf[info->xmit.tail]; |
2577 | info->xmit.tail = (info->xmit.tail + 1) & (SERIAL_XMIT_SIZE-1); | 2577 | info->xmit.tail = (info->xmit.tail + 1) & (SERIAL_XMIT_SIZE-1); |
2578 | info->icount.tx++; | 2578 | info->icount.tx++; |
2579 | if (info->xmit.head == info->xmit.tail) { | 2579 | if (info->xmit.head == info->xmit.tail) { |
@@ -2848,7 +2848,7 @@ startup(struct e100_serial * info) | |||
2848 | 2848 | ||
2849 | /* dummy read to reset any serial errors */ | 2849 | /* dummy read to reset any serial errors */ |
2850 | 2850 | ||
2851 | (void)info->port[REG_DATA]; | 2851 | (void)info->ioport[REG_DATA]; |
2852 | 2852 | ||
2853 | /* enable the interrupts */ | 2853 | /* enable the interrupts */ |
2854 | if (info->uses_dma_out) | 2854 | if (info->uses_dma_out) |
@@ -2897,7 +2897,7 @@ shutdown(struct e100_serial * info) | |||
2897 | /* shut down the transmitter and receiver */ | 2897 | /* shut down the transmitter and receiver */ |
2898 | DFLOW(DEBUG_LOG(info->line, "shutdown %i\n", info->line)); | 2898 | DFLOW(DEBUG_LOG(info->line, "shutdown %i\n", info->line)); |
2899 | e100_disable_rx(info); | 2899 | e100_disable_rx(info); |
2900 | info->port[REG_TR_CTRL] = (info->tx_ctrl &= ~0x40); | 2900 | info->ioport[REG_TR_CTRL] = (info->tx_ctrl &= ~0x40); |
2901 | 2901 | ||
2902 | /* disable interrupts, reset dma channels */ | 2902 | /* disable interrupts, reset dma channels */ |
2903 | if (info->uses_dma_in) { | 2903 | if (info->uses_dma_in) { |
@@ -2968,7 +2968,7 @@ change_speed(struct e100_serial *info) | |||
2968 | 2968 | ||
2969 | if (!info->port.tty || !info->port.tty->termios) | 2969 | if (!info->port.tty || !info->port.tty->termios) |
2970 | return; | 2970 | return; |
2971 | if (!info->port) | 2971 | if (!info->ioport) |
2972 | return; | 2972 | return; |
2973 | 2973 | ||
2974 | cflag = info->port.tty->termios->c_cflag; | 2974 | cflag = info->port.tty->termios->c_cflag; |
@@ -3037,7 +3037,7 @@ change_speed(struct e100_serial *info) | |||
3037 | 3037 | ||
3038 | info->baud = cflag_to_baud(cflag); | 3038 | info->baud = cflag_to_baud(cflag); |
3039 | #ifndef CONFIG_SVINTO_SIM | 3039 | #ifndef CONFIG_SVINTO_SIM |
3040 | info->port[REG_BAUD] = cflag_to_etrax_baud(cflag); | 3040 | info->ioport[REG_BAUD] = cflag_to_etrax_baud(cflag); |
3041 | #endif /* CONFIG_SVINTO_SIM */ | 3041 | #endif /* CONFIG_SVINTO_SIM */ |
3042 | } | 3042 | } |
3043 | 3043 | ||
@@ -3097,8 +3097,8 @@ change_speed(struct e100_serial *info) | |||
3097 | 3097 | ||
3098 | /* actually write the control regs to the hardware */ | 3098 | /* actually write the control regs to the hardware */ |
3099 | 3099 | ||
3100 | info->port[REG_TR_CTRL] = info->tx_ctrl; | 3100 | info->ioport[REG_TR_CTRL] = info->tx_ctrl; |
3101 | info->port[REG_REC_CTRL] = info->rx_ctrl; | 3101 | info->ioport[REG_REC_CTRL] = info->rx_ctrl; |
3102 | xoff = IO_FIELD(R_SERIAL0_XOFF, xoff_char, STOP_CHAR(info->port.tty)); | 3102 | xoff = IO_FIELD(R_SERIAL0_XOFF, xoff_char, STOP_CHAR(info->port.tty)); |
3103 | xoff |= IO_STATE(R_SERIAL0_XOFF, tx_stop, enable); | 3103 | xoff |= IO_STATE(R_SERIAL0_XOFF, tx_stop, enable); |
3104 | if (info->port.tty->termios->c_iflag & IXON ) { | 3104 | if (info->port.tty->termios->c_iflag & IXON ) { |
@@ -3107,7 +3107,7 @@ change_speed(struct e100_serial *info) | |||
3107 | xoff |= IO_STATE(R_SERIAL0_XOFF, auto_xoff, enable); | 3107 | xoff |= IO_STATE(R_SERIAL0_XOFF, auto_xoff, enable); |
3108 | } | 3108 | } |
3109 | 3109 | ||
3110 | *((unsigned long *)&info->port[REG_XOFF]) = xoff; | 3110 | *((unsigned long *)&info->ioport[REG_XOFF]) = xoff; |
3111 | local_irq_restore(flags); | 3111 | local_irq_restore(flags); |
3112 | #endif /* !CONFIG_SVINTO_SIM */ | 3112 | #endif /* !CONFIG_SVINTO_SIM */ |
3113 | 3113 | ||
@@ -3156,7 +3156,7 @@ static int rs_raw_write(struct tty_struct *tty, | |||
3156 | #ifdef SERIAL_DEBUG_DATA | 3156 | #ifdef SERIAL_DEBUG_DATA |
3157 | if (info->line == SERIAL_DEBUG_LINE) | 3157 | if (info->line == SERIAL_DEBUG_LINE) |
3158 | printk("rs_raw_write (%d), status %d\n", | 3158 | printk("rs_raw_write (%d), status %d\n", |
3159 | count, info->port[REG_STATUS]); | 3159 | count, info->ioport[REG_STATUS]); |
3160 | #endif | 3160 | #endif |
3161 | 3161 | ||
3162 | #ifdef CONFIG_SVINTO_SIM | 3162 | #ifdef CONFIG_SVINTO_SIM |
@@ -3427,7 +3427,7 @@ get_serial_info(struct e100_serial * info, | |||
3427 | memset(&tmp, 0, sizeof(tmp)); | 3427 | memset(&tmp, 0, sizeof(tmp)); |
3428 | tmp.type = info->type; | 3428 | tmp.type = info->type; |
3429 | tmp.line = info->line; | 3429 | tmp.line = info->line; |
3430 | tmp.port = (int)info->port; | 3430 | tmp.port = (int)info->ioport; |
3431 | tmp.irq = info->irq; | 3431 | tmp.irq = info->irq; |
3432 | tmp.flags = info->flags; | 3432 | tmp.flags = info->flags; |
3433 | tmp.baud_base = info->baud_base; | 3433 | tmp.baud_base = info->baud_base; |
@@ -3557,14 +3557,14 @@ char *get_control_state_str(int MLines, char *s) | |||
3557 | } | 3557 | } |
3558 | #endif | 3558 | #endif |
3559 | 3559 | ||
3560 | static void | 3560 | static int |
3561 | rs_break(struct tty_struct *tty, int break_state) | 3561 | rs_break(struct tty_struct *tty, int break_state) |
3562 | { | 3562 | { |
3563 | struct e100_serial *info = (struct e100_serial *)tty->driver_data; | 3563 | struct e100_serial *info = (struct e100_serial *)tty->driver_data; |
3564 | unsigned long flags; | 3564 | unsigned long flags; |
3565 | 3565 | ||
3566 | if (!info->port) | 3566 | if (!info->ioport) |
3567 | return; | 3567 | return -EIO; |
3568 | 3568 | ||
3569 | local_irq_save(flags); | 3569 | local_irq_save(flags); |
3570 | if (break_state == -1) { | 3570 | if (break_state == -1) { |
@@ -3575,8 +3575,9 @@ rs_break(struct tty_struct *tty, int break_state) | |||
3575 | /* Set bit 7 (txd) and 6 (tr_enable) */ | 3575 | /* Set bit 7 (txd) and 6 (tr_enable) */ |
3576 | info->tx_ctrl |= (0x80 | 0x40); | 3576 | info->tx_ctrl |= (0x80 | 0x40); |
3577 | } | 3577 | } |
3578 | info->port[REG_TR_CTRL] = info->tx_ctrl; | 3578 | info->ioport[REG_TR_CTRL] = info->tx_ctrl; |
3579 | local_irq_restore(flags); | 3579 | local_irq_restore(flags); |
3580 | return 0; | ||
3580 | } | 3581 | } |
3581 | 3582 | ||
3582 | static int | 3583 | static int |
@@ -4231,9 +4232,9 @@ static int line_info(char *buf, struct e100_serial *info) | |||
4231 | unsigned long tmp; | 4232 | unsigned long tmp; |
4232 | 4233 | ||
4233 | ret = sprintf(buf, "%d: uart:E100 port:%lX irq:%d", | 4234 | ret = sprintf(buf, "%d: uart:E100 port:%lX irq:%d", |
4234 | info->line, (unsigned long)info->port, info->irq); | 4235 | info->line, (unsigned long)info->ioport, info->irq); |
4235 | 4236 | ||
4236 | if (!info->port || (info->type == PORT_UNKNOWN)) { | 4237 | if (!info->ioport || (info->type == PORT_UNKNOWN)) { |
4237 | ret += sprintf(buf+ret, "\n"); | 4238 | ret += sprintf(buf+ret, "\n"); |
4238 | return ret; | 4239 | return ret; |
4239 | } | 4240 | } |
@@ -4281,7 +4282,7 @@ static int line_info(char *buf, struct e100_serial *info) | |||
4281 | } | 4282 | } |
4282 | 4283 | ||
4283 | { | 4284 | { |
4284 | unsigned char rstat = info->port[REG_STATUS]; | 4285 | unsigned char rstat = info->ioport[REG_STATUS]; |
4285 | if (rstat & IO_MASK(R_SERIAL0_STATUS, xoff_detect) ) | 4286 | if (rstat & IO_MASK(R_SERIAL0_STATUS, xoff_detect) ) |
4286 | ret += sprintf(buf+ret, " xoff_detect:1"); | 4287 | ret += sprintf(buf+ret, " xoff_detect:1"); |
4287 | } | 4288 | } |
@@ -4502,7 +4503,7 @@ rs_init(void) | |||
4502 | 4503 | ||
4503 | if (info->enabled) { | 4504 | if (info->enabled) { |
4504 | printk(KERN_INFO "%s%d at 0x%x is a builtin UART with DMA\n", | 4505 | printk(KERN_INFO "%s%d at 0x%x is a builtin UART with DMA\n", |
4505 | serial_driver->name, info->line, (unsigned int)info->port); | 4506 | serial_driver->name, info->line, (unsigned int)info->ioport); |
4506 | } | 4507 | } |
4507 | } | 4508 | } |
4508 | #ifdef CONFIG_ETRAX_FAST_TIMER | 4509 | #ifdef CONFIG_ETRAX_FAST_TIMER |
diff --git a/drivers/serial/crisv10.h b/drivers/serial/crisv10.h index ccd0f32b7372..e3c5c8c3c09b 100644 --- a/drivers/serial/crisv10.h +++ b/drivers/serial/crisv10.h | |||
@@ -36,8 +36,9 @@ struct etrax_recv_buffer { | |||
36 | }; | 36 | }; |
37 | 37 | ||
38 | struct e100_serial { | 38 | struct e100_serial { |
39 | struct tty_port port; | ||
39 | int baud; | 40 | int baud; |
40 | volatile u8 *port; /* R_SERIALx_CTRL */ | 41 | volatile u8 *ioport; /* R_SERIALx_CTRL */ |
41 | u32 irq; /* bitnr in R_IRQ_MASK2 for dmaX_descr */ | 42 | u32 irq; /* bitnr in R_IRQ_MASK2 for dmaX_descr */ |
42 | 43 | ||
43 | /* Output registers */ | 44 | /* Output registers */ |
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c index 0c7165660853..95190c619c10 100644 --- a/drivers/spi/atmel_spi.c +++ b/drivers/spi/atmel_spi.c | |||
@@ -184,7 +184,8 @@ static void atmel_spi_next_xfer(struct spi_master *master, | |||
184 | { | 184 | { |
185 | struct atmel_spi *as = spi_master_get_devdata(master); | 185 | struct atmel_spi *as = spi_master_get_devdata(master); |
186 | struct spi_transfer *xfer; | 186 | struct spi_transfer *xfer; |
187 | u32 len, remaining, total; | 187 | u32 len, remaining; |
188 | u32 ieval; | ||
188 | dma_addr_t tx_dma, rx_dma; | 189 | dma_addr_t tx_dma, rx_dma; |
189 | 190 | ||
190 | if (!as->current_transfer) | 191 | if (!as->current_transfer) |
@@ -197,6 +198,8 @@ static void atmel_spi_next_xfer(struct spi_master *master, | |||
197 | xfer = NULL; | 198 | xfer = NULL; |
198 | 199 | ||
199 | if (xfer) { | 200 | if (xfer) { |
201 | spi_writel(as, PTCR, SPI_BIT(RXTDIS) | SPI_BIT(TXTDIS)); | ||
202 | |||
200 | len = xfer->len; | 203 | len = xfer->len; |
201 | atmel_spi_next_xfer_data(master, xfer, &tx_dma, &rx_dma, &len); | 204 | atmel_spi_next_xfer_data(master, xfer, &tx_dma, &rx_dma, &len); |
202 | remaining = xfer->len - len; | 205 | remaining = xfer->len - len; |
@@ -234,6 +237,8 @@ static void atmel_spi_next_xfer(struct spi_master *master, | |||
234 | as->next_transfer = xfer; | 237 | as->next_transfer = xfer; |
235 | 238 | ||
236 | if (xfer) { | 239 | if (xfer) { |
240 | u32 total; | ||
241 | |||
237 | total = len; | 242 | total = len; |
238 | atmel_spi_next_xfer_data(master, xfer, &tx_dma, &rx_dma, &len); | 243 | atmel_spi_next_xfer_data(master, xfer, &tx_dma, &rx_dma, &len); |
239 | as->next_remaining_bytes = total - len; | 244 | as->next_remaining_bytes = total - len; |
@@ -250,9 +255,11 @@ static void atmel_spi_next_xfer(struct spi_master *master, | |||
250 | " next xfer %p: len %u tx %p/%08x rx %p/%08x\n", | 255 | " next xfer %p: len %u tx %p/%08x rx %p/%08x\n", |
251 | xfer, xfer->len, xfer->tx_buf, xfer->tx_dma, | 256 | xfer, xfer->len, xfer->tx_buf, xfer->tx_dma, |
252 | xfer->rx_buf, xfer->rx_dma); | 257 | xfer->rx_buf, xfer->rx_dma); |
258 | ieval = SPI_BIT(ENDRX) | SPI_BIT(OVRES); | ||
253 | } else { | 259 | } else { |
254 | spi_writel(as, RNCR, 0); | 260 | spi_writel(as, RNCR, 0); |
255 | spi_writel(as, TNCR, 0); | 261 | spi_writel(as, TNCR, 0); |
262 | ieval = SPI_BIT(RXBUFF) | SPI_BIT(ENDRX) | SPI_BIT(OVRES); | ||
256 | } | 263 | } |
257 | 264 | ||
258 | /* REVISIT: We're waiting for ENDRX before we start the next | 265 | /* REVISIT: We're waiting for ENDRX before we start the next |
@@ -265,7 +272,7 @@ static void atmel_spi_next_xfer(struct spi_master *master, | |||
265 | * | 272 | * |
266 | * It should be doable, though. Just not now... | 273 | * It should be doable, though. Just not now... |
267 | */ | 274 | */ |
268 | spi_writel(as, IER, SPI_BIT(ENDRX) | SPI_BIT(OVRES)); | 275 | spi_writel(as, IER, ieval); |
269 | spi_writel(as, PTCR, SPI_BIT(TXTEN) | SPI_BIT(RXTEN)); | 276 | spi_writel(as, PTCR, SPI_BIT(TXTEN) | SPI_BIT(RXTEN)); |
270 | } | 277 | } |
271 | 278 | ||
@@ -396,7 +403,7 @@ atmel_spi_interrupt(int irq, void *dev_id) | |||
396 | 403 | ||
397 | ret = IRQ_HANDLED; | 404 | ret = IRQ_HANDLED; |
398 | 405 | ||
399 | spi_writel(as, IDR, (SPI_BIT(ENDTX) | SPI_BIT(ENDRX) | 406 | spi_writel(as, IDR, (SPI_BIT(RXBUFF) | SPI_BIT(ENDRX) |
400 | | SPI_BIT(OVRES))); | 407 | | SPI_BIT(OVRES))); |
401 | 408 | ||
402 | /* | 409 | /* |
@@ -418,7 +425,7 @@ atmel_spi_interrupt(int irq, void *dev_id) | |||
418 | if (xfer->delay_usecs) | 425 | if (xfer->delay_usecs) |
419 | udelay(xfer->delay_usecs); | 426 | udelay(xfer->delay_usecs); |
420 | 427 | ||
421 | dev_warn(master->dev.parent, "fifo overrun (%u/%u remaining)\n", | 428 | dev_warn(master->dev.parent, "overrun (%u/%u remaining)\n", |
422 | spi_readl(as, TCR), spi_readl(as, RCR)); | 429 | spi_readl(as, TCR), spi_readl(as, RCR)); |
423 | 430 | ||
424 | /* | 431 | /* |
@@ -442,7 +449,7 @@ atmel_spi_interrupt(int irq, void *dev_id) | |||
442 | spi_readl(as, SR); | 449 | spi_readl(as, SR); |
443 | 450 | ||
444 | atmel_spi_msg_done(master, as, msg, -EIO, 0); | 451 | atmel_spi_msg_done(master, as, msg, -EIO, 0); |
445 | } else if (pending & SPI_BIT(ENDRX)) { | 452 | } else if (pending & (SPI_BIT(RXBUFF) | SPI_BIT(ENDRX))) { |
446 | ret = IRQ_HANDLED; | 453 | ret = IRQ_HANDLED; |
447 | 454 | ||
448 | spi_writel(as, IDR, pending); | 455 | spi_writel(as, IDR, pending); |
diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c index 1c643c9e1f15..21661c7959c8 100644 --- a/drivers/spi/spi_s3c24xx.c +++ b/drivers/spi/spi_s3c24xx.c | |||
@@ -236,6 +236,19 @@ static irqreturn_t s3c24xx_spi_irq(int irq, void *dev) | |||
236 | return IRQ_HANDLED; | 236 | return IRQ_HANDLED; |
237 | } | 237 | } |
238 | 238 | ||
239 | static void s3c24xx_spi_initialsetup(struct s3c24xx_spi *hw) | ||
240 | { | ||
241 | /* for the moment, permanently enable the clock */ | ||
242 | |||
243 | clk_enable(hw->clk); | ||
244 | |||
245 | /* program defaults into the registers */ | ||
246 | |||
247 | writeb(0xff, hw->regs + S3C2410_SPPRE); | ||
248 | writeb(SPPIN_DEFAULT, hw->regs + S3C2410_SPPIN); | ||
249 | writeb(SPCON_DEFAULT, hw->regs + S3C2410_SPCON); | ||
250 | } | ||
251 | |||
239 | static int __init s3c24xx_spi_probe(struct platform_device *pdev) | 252 | static int __init s3c24xx_spi_probe(struct platform_device *pdev) |
240 | { | 253 | { |
241 | struct s3c2410_spi_info *pdata; | 254 | struct s3c2410_spi_info *pdata; |
@@ -327,15 +340,7 @@ static int __init s3c24xx_spi_probe(struct platform_device *pdev) | |||
327 | goto err_no_clk; | 340 | goto err_no_clk; |
328 | } | 341 | } |
329 | 342 | ||
330 | /* for the moment, permanently enable the clock */ | 343 | s3c24xx_spi_initialsetup(hw); |
331 | |||
332 | clk_enable(hw->clk); | ||
333 | |||
334 | /* program defaults into the registers */ | ||
335 | |||
336 | writeb(0xff, hw->regs + S3C2410_SPPRE); | ||
337 | writeb(SPPIN_DEFAULT, hw->regs + S3C2410_SPPIN); | ||
338 | writeb(SPCON_DEFAULT, hw->regs + S3C2410_SPCON); | ||
339 | 344 | ||
340 | /* setup any gpio we can */ | 345 | /* setup any gpio we can */ |
341 | 346 | ||
@@ -415,7 +420,7 @@ static int s3c24xx_spi_resume(struct platform_device *pdev) | |||
415 | { | 420 | { |
416 | struct s3c24xx_spi *hw = platform_get_drvdata(pdev); | 421 | struct s3c24xx_spi *hw = platform_get_drvdata(pdev); |
417 | 422 | ||
418 | clk_enable(hw->clk); | 423 | s3c24xx_spi_initialsetup(hw); |
419 | return 0; | 424 | return 0; |
420 | } | 425 | } |
421 | 426 | ||
diff --git a/drivers/video/console/.gitignore b/drivers/video/console/.gitignore new file mode 100644 index 000000000000..0c258b45439c --- /dev/null +++ b/drivers/video/console/.gitignore | |||
@@ -0,0 +1,2 @@ | |||
1 | # conmakehash generated file | ||
2 | promcon_tbl.c | ||
diff --git a/drivers/watchdog/ar7_wdt.c b/drivers/watchdog/ar7_wdt.c index 2eb48c0df32c..ef7b0d67095e 100644 --- a/drivers/watchdog/ar7_wdt.c +++ b/drivers/watchdog/ar7_wdt.c | |||
@@ -69,7 +69,8 @@ struct ar7_wdt { | |||
69 | u32 prescale; | 69 | u32 prescale; |
70 | }; | 70 | }; |
71 | 71 | ||
72 | static struct semaphore open_semaphore; | 72 | static unsigned long wdt_is_open; |
73 | static spinlock_t wdt_lock; | ||
73 | static unsigned expect_close; | 74 | static unsigned expect_close; |
74 | 75 | ||
75 | /* XXX currently fixed, allows max margin ~68.72 secs */ | 76 | /* XXX currently fixed, allows max margin ~68.72 secs */ |
@@ -154,8 +155,10 @@ static void ar7_wdt_update_margin(int new_margin) | |||
154 | u32 change; | 155 | u32 change; |
155 | 156 | ||
156 | change = new_margin * (ar7_vbus_freq() / prescale_value); | 157 | change = new_margin * (ar7_vbus_freq() / prescale_value); |
157 | if (change < 1) change = 1; | 158 | if (change < 1) |
158 | if (change > 0xffff) change = 0xffff; | 159 | change = 1; |
160 | if (change > 0xffff) | ||
161 | change = 0xffff; | ||
159 | ar7_wdt_change(change); | 162 | ar7_wdt_change(change); |
160 | margin = change * prescale_value / ar7_vbus_freq(); | 163 | margin = change * prescale_value / ar7_vbus_freq(); |
161 | printk(KERN_INFO DRVNAME | 164 | printk(KERN_INFO DRVNAME |
@@ -179,7 +182,7 @@ static void ar7_wdt_disable_wdt(void) | |||
179 | static int ar7_wdt_open(struct inode *inode, struct file *file) | 182 | static int ar7_wdt_open(struct inode *inode, struct file *file) |
180 | { | 183 | { |
181 | /* only allow one at a time */ | 184 | /* only allow one at a time */ |
182 | if (down_trylock(&open_semaphore)) | 185 | if (test_and_set_bit(0, &wdt_is_open)) |
183 | return -EBUSY; | 186 | return -EBUSY; |
184 | ar7_wdt_enable_wdt(); | 187 | ar7_wdt_enable_wdt(); |
185 | expect_close = 0; | 188 | expect_close = 0; |
@@ -195,9 +198,7 @@ static int ar7_wdt_release(struct inode *inode, struct file *file) | |||
195 | "will not disable the watchdog timer\n"); | 198 | "will not disable the watchdog timer\n"); |
196 | else if (!nowayout) | 199 | else if (!nowayout) |
197 | ar7_wdt_disable_wdt(); | 200 | ar7_wdt_disable_wdt(); |
198 | 201 | clear_bit(0, &wdt_is_open); | |
199 | up(&open_semaphore); | ||
200 | |||
201 | return 0; | 202 | return 0; |
202 | } | 203 | } |
203 | 204 | ||
@@ -222,7 +223,9 @@ static ssize_t ar7_wdt_write(struct file *file, const char *data, | |||
222 | if (len) { | 223 | if (len) { |
223 | size_t i; | 224 | size_t i; |
224 | 225 | ||
226 | spin_lock(&wdt_lock); | ||
225 | ar7_wdt_kick(1); | 227 | ar7_wdt_kick(1); |
228 | spin_unlock(&wdt_lock); | ||
226 | 229 | ||
227 | expect_close = 0; | 230 | expect_close = 0; |
228 | for (i = 0; i < len; ++i) { | 231 | for (i = 0; i < len; ++i) { |
@@ -237,8 +240,8 @@ static ssize_t ar7_wdt_write(struct file *file, const char *data, | |||
237 | return len; | 240 | return len; |
238 | } | 241 | } |
239 | 242 | ||
240 | static int ar7_wdt_ioctl(struct inode *inode, struct file *file, | 243 | static long ar7_wdt_ioctl(struct file *file, |
241 | unsigned int cmd, unsigned long arg) | 244 | unsigned int cmd, unsigned long arg) |
242 | { | 245 | { |
243 | static struct watchdog_info ident = { | 246 | static struct watchdog_info ident = { |
244 | .identity = LONGNAME, | 247 | .identity = LONGNAME, |
@@ -269,8 +272,10 @@ static int ar7_wdt_ioctl(struct inode *inode, struct file *file, | |||
269 | if (new_margin < 1) | 272 | if (new_margin < 1) |
270 | return -EINVAL; | 273 | return -EINVAL; |
271 | 274 | ||
275 | spin_lock(&wdt_lock); | ||
272 | ar7_wdt_update_margin(new_margin); | 276 | ar7_wdt_update_margin(new_margin); |
273 | ar7_wdt_kick(1); | 277 | ar7_wdt_kick(1); |
278 | spin_unlock(&wdt_lock); | ||
274 | 279 | ||
275 | case WDIOC_GETTIMEOUT: | 280 | case WDIOC_GETTIMEOUT: |
276 | if (put_user(margin, (int *)arg)) | 281 | if (put_user(margin, (int *)arg)) |
@@ -282,7 +287,7 @@ static int ar7_wdt_ioctl(struct inode *inode, struct file *file, | |||
282 | static const struct file_operations ar7_wdt_fops = { | 287 | static const struct file_operations ar7_wdt_fops = { |
283 | .owner = THIS_MODULE, | 288 | .owner = THIS_MODULE, |
284 | .write = ar7_wdt_write, | 289 | .write = ar7_wdt_write, |
285 | .ioctl = ar7_wdt_ioctl, | 290 | .unlocked_ioctl = ar7_wdt_ioctl, |
286 | .open = ar7_wdt_open, | 291 | .open = ar7_wdt_open, |
287 | .release = ar7_wdt_release, | 292 | .release = ar7_wdt_release, |
288 | }; | 293 | }; |
@@ -297,6 +302,8 @@ static int __init ar7_wdt_init(void) | |||
297 | { | 302 | { |
298 | int rc; | 303 | int rc; |
299 | 304 | ||
305 | spin_lock_init(&wdt_lock); | ||
306 | |||
300 | ar7_wdt_get_regs(); | 307 | ar7_wdt_get_regs(); |
301 | 308 | ||
302 | if (!request_mem_region(ar7_regs_wdt, sizeof(struct ar7_wdt), | 309 | if (!request_mem_region(ar7_regs_wdt, sizeof(struct ar7_wdt), |
@@ -312,8 +319,6 @@ static int __init ar7_wdt_init(void) | |||
312 | ar7_wdt_prescale(prescale_value); | 319 | ar7_wdt_prescale(prescale_value); |
313 | ar7_wdt_update_margin(margin); | 320 | ar7_wdt_update_margin(margin); |
314 | 321 | ||
315 | sema_init(&open_semaphore, 1); | ||
316 | |||
317 | rc = register_reboot_notifier(&ar7_wdt_notifier); | 322 | rc = register_reboot_notifier(&ar7_wdt_notifier); |
318 | if (rc) { | 323 | if (rc) { |
319 | printk(KERN_ERR DRVNAME | 324 | printk(KERN_ERR DRVNAME |
diff --git a/drivers/watchdog/it8712f_wdt.c b/drivers/watchdog/it8712f_wdt.c index 445b7e812112..51bfd5721833 100644 --- a/drivers/watchdog/it8712f_wdt.c +++ b/drivers/watchdog/it8712f_wdt.c | |||
@@ -30,9 +30,8 @@ | |||
30 | #include <linux/fs.h> | 30 | #include <linux/fs.h> |
31 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
32 | #include <linux/spinlock.h> | 32 | #include <linux/spinlock.h> |
33 | 33 | #include <linux/uaccess.h> | |
34 | #include <asm/uaccess.h> | 34 | #include <linux/io.h> |
35 | #include <asm/io.h> | ||
36 | 35 | ||
37 | #define NAME "it8712f_wdt" | 36 | #define NAME "it8712f_wdt" |
38 | 37 | ||
@@ -50,7 +49,7 @@ static int nowayout = WATCHDOG_NOWAYOUT; | |||
50 | module_param(nowayout, int, 0); | 49 | module_param(nowayout, int, 0); |
51 | MODULE_PARM_DESC(nowayout, "Disable watchdog shutdown on close"); | 50 | MODULE_PARM_DESC(nowayout, "Disable watchdog shutdown on close"); |
52 | 51 | ||
53 | static struct semaphore it8712f_wdt_sem; | 52 | static unsigned long wdt_open; |
54 | static unsigned expect_close; | 53 | static unsigned expect_close; |
55 | static spinlock_t io_lock; | 54 | static spinlock_t io_lock; |
56 | static unsigned char revision; | 55 | static unsigned char revision; |
@@ -86,22 +85,19 @@ static unsigned short address; | |||
86 | #define WDT_OUT_PWROK 0x10 | 85 | #define WDT_OUT_PWROK 0x10 |
87 | #define WDT_OUT_KRST 0x40 | 86 | #define WDT_OUT_KRST 0x40 |
88 | 87 | ||
89 | static int | 88 | static int superio_inb(int reg) |
90 | superio_inb(int reg) | ||
91 | { | 89 | { |
92 | outb(reg, REG); | 90 | outb(reg, REG); |
93 | return inb(VAL); | 91 | return inb(VAL); |
94 | } | 92 | } |
95 | 93 | ||
96 | static void | 94 | static void superio_outb(int val, int reg) |
97 | superio_outb(int val, int reg) | ||
98 | { | 95 | { |
99 | outb(reg, REG); | 96 | outb(reg, REG); |
100 | outb(val, VAL); | 97 | outb(val, VAL); |
101 | } | 98 | } |
102 | 99 | ||
103 | static int | 100 | static int superio_inw(int reg) |
104 | superio_inw(int reg) | ||
105 | { | 101 | { |
106 | int val; | 102 | int val; |
107 | outb(reg++, REG); | 103 | outb(reg++, REG); |
@@ -111,15 +107,13 @@ superio_inw(int reg) | |||
111 | return val; | 107 | return val; |
112 | } | 108 | } |
113 | 109 | ||
114 | static inline void | 110 | static inline void superio_select(int ldn) |
115 | superio_select(int ldn) | ||
116 | { | 111 | { |
117 | outb(LDN, REG); | 112 | outb(LDN, REG); |
118 | outb(ldn, VAL); | 113 | outb(ldn, VAL); |
119 | } | 114 | } |
120 | 115 | ||
121 | static inline void | 116 | static inline void superio_enter(void) |
122 | superio_enter(void) | ||
123 | { | 117 | { |
124 | spin_lock(&io_lock); | 118 | spin_lock(&io_lock); |
125 | outb(0x87, REG); | 119 | outb(0x87, REG); |
@@ -128,22 +122,19 @@ superio_enter(void) | |||
128 | outb(0x55, REG); | 122 | outb(0x55, REG); |
129 | } | 123 | } |
130 | 124 | ||
131 | static inline void | 125 | static inline void superio_exit(void) |
132 | superio_exit(void) | ||
133 | { | 126 | { |
134 | outb(0x02, REG); | 127 | outb(0x02, REG); |
135 | outb(0x02, VAL); | 128 | outb(0x02, VAL); |
136 | spin_unlock(&io_lock); | 129 | spin_unlock(&io_lock); |
137 | } | 130 | } |
138 | 131 | ||
139 | static inline void | 132 | static inline void it8712f_wdt_ping(void) |
140 | it8712f_wdt_ping(void) | ||
141 | { | 133 | { |
142 | inb(address); | 134 | inb(address); |
143 | } | 135 | } |
144 | 136 | ||
145 | static void | 137 | static void it8712f_wdt_update_margin(void) |
146 | it8712f_wdt_update_margin(void) | ||
147 | { | 138 | { |
148 | int config = WDT_OUT_KRST | WDT_OUT_PWROK; | 139 | int config = WDT_OUT_KRST | WDT_OUT_PWROK; |
149 | int units = margin; | 140 | int units = margin; |
@@ -165,8 +156,7 @@ it8712f_wdt_update_margin(void) | |||
165 | superio_outb(units, WDT_TIMEOUT); | 156 | superio_outb(units, WDT_TIMEOUT); |
166 | } | 157 | } |
167 | 158 | ||
168 | static int | 159 | static int it8712f_wdt_get_status(void) |
169 | it8712f_wdt_get_status(void) | ||
170 | { | 160 | { |
171 | if (superio_inb(WDT_CONTROL) & 0x01) | 161 | if (superio_inb(WDT_CONTROL) & 0x01) |
172 | return WDIOF_CARDRESET; | 162 | return WDIOF_CARDRESET; |
@@ -174,8 +164,7 @@ it8712f_wdt_get_status(void) | |||
174 | return 0; | 164 | return 0; |
175 | } | 165 | } |
176 | 166 | ||
177 | static void | 167 | static void it8712f_wdt_enable(void) |
178 | it8712f_wdt_enable(void) | ||
179 | { | 168 | { |
180 | printk(KERN_DEBUG NAME ": enabling watchdog timer\n"); | 169 | printk(KERN_DEBUG NAME ": enabling watchdog timer\n"); |
181 | superio_enter(); | 170 | superio_enter(); |
@@ -190,8 +179,7 @@ it8712f_wdt_enable(void) | |||
190 | it8712f_wdt_ping(); | 179 | it8712f_wdt_ping(); |
191 | } | 180 | } |
192 | 181 | ||
193 | static void | 182 | static void it8712f_wdt_disable(void) |
194 | it8712f_wdt_disable(void) | ||
195 | { | 183 | { |
196 | printk(KERN_DEBUG NAME ": disabling watchdog timer\n"); | 184 | printk(KERN_DEBUG NAME ": disabling watchdog timer\n"); |
197 | 185 | ||
@@ -207,8 +195,7 @@ it8712f_wdt_disable(void) | |||
207 | superio_exit(); | 195 | superio_exit(); |
208 | } | 196 | } |
209 | 197 | ||
210 | static int | 198 | static int it8712f_wdt_notify(struct notifier_block *this, |
211 | it8712f_wdt_notify(struct notifier_block *this, | ||
212 | unsigned long code, void *unused) | 199 | unsigned long code, void *unused) |
213 | { | 200 | { |
214 | if (code == SYS_HALT || code == SYS_POWER_OFF) | 201 | if (code == SYS_HALT || code == SYS_POWER_OFF) |
@@ -222,9 +209,8 @@ static struct notifier_block it8712f_wdt_notifier = { | |||
222 | .notifier_call = it8712f_wdt_notify, | 209 | .notifier_call = it8712f_wdt_notify, |
223 | }; | 210 | }; |
224 | 211 | ||
225 | static ssize_t | 212 | static ssize_t it8712f_wdt_write(struct file *file, const char __user *data, |
226 | it8712f_wdt_write(struct file *file, const char __user *data, | 213 | size_t len, loff_t *ppos) |
227 | size_t len, loff_t *ppos) | ||
228 | { | 214 | { |
229 | /* check for a magic close character */ | 215 | /* check for a magic close character */ |
230 | if (len) { | 216 | if (len) { |
@@ -245,9 +231,8 @@ it8712f_wdt_write(struct file *file, const char __user *data, | |||
245 | return len; | 231 | return len; |
246 | } | 232 | } |
247 | 233 | ||
248 | static int | 234 | static long it8712f_wdt_ioctl(struct file *file, unsigned int cmd, |
249 | it8712f_wdt_ioctl(struct inode *inode, struct file *file, | 235 | unsigned long arg) |
250 | unsigned int cmd, unsigned long arg) | ||
251 | { | 236 | { |
252 | void __user *argp = (void __user *)arg; | 237 | void __user *argp = (void __user *)arg; |
253 | int __user *p = argp; | 238 | int __user *p = argp; |
@@ -302,19 +287,16 @@ it8712f_wdt_ioctl(struct inode *inode, struct file *file, | |||
302 | } | 287 | } |
303 | } | 288 | } |
304 | 289 | ||
305 | static int | 290 | static int it8712f_wdt_open(struct inode *inode, struct file *file) |
306 | it8712f_wdt_open(struct inode *inode, struct file *file) | ||
307 | { | 291 | { |
308 | /* only allow one at a time */ | 292 | /* only allow one at a time */ |
309 | if (down_trylock(&it8712f_wdt_sem)) | 293 | if (test_and_set_bit(0, &wdt_open)) |
310 | return -EBUSY; | 294 | return -EBUSY; |
311 | it8712f_wdt_enable(); | 295 | it8712f_wdt_enable(); |
312 | |||
313 | return nonseekable_open(inode, file); | 296 | return nonseekable_open(inode, file); |
314 | } | 297 | } |
315 | 298 | ||
316 | static int | 299 | static int it8712f_wdt_release(struct inode *inode, struct file *file) |
317 | it8712f_wdt_release(struct inode *inode, struct file *file) | ||
318 | { | 300 | { |
319 | if (expect_close != 42) { | 301 | if (expect_close != 42) { |
320 | printk(KERN_WARNING NAME | 302 | printk(KERN_WARNING NAME |
@@ -324,7 +306,7 @@ it8712f_wdt_release(struct inode *inode, struct file *file) | |||
324 | it8712f_wdt_disable(); | 306 | it8712f_wdt_disable(); |
325 | } | 307 | } |
326 | expect_close = 0; | 308 | expect_close = 0; |
327 | up(&it8712f_wdt_sem); | 309 | clear_bit(0, &wdt_open); |
328 | 310 | ||
329 | return 0; | 311 | return 0; |
330 | } | 312 | } |
@@ -333,7 +315,7 @@ static const struct file_operations it8712f_wdt_fops = { | |||
333 | .owner = THIS_MODULE, | 315 | .owner = THIS_MODULE, |
334 | .llseek = no_llseek, | 316 | .llseek = no_llseek, |
335 | .write = it8712f_wdt_write, | 317 | .write = it8712f_wdt_write, |
336 | .ioctl = it8712f_wdt_ioctl, | 318 | .unlocked_ioctl = it8712f_wdt_ioctl, |
337 | .open = it8712f_wdt_open, | 319 | .open = it8712f_wdt_open, |
338 | .release = it8712f_wdt_release, | 320 | .release = it8712f_wdt_release, |
339 | }; | 321 | }; |
@@ -344,8 +326,7 @@ static struct miscdevice it8712f_wdt_miscdev = { | |||
344 | .fops = &it8712f_wdt_fops, | 326 | .fops = &it8712f_wdt_fops, |
345 | }; | 327 | }; |
346 | 328 | ||
347 | static int __init | 329 | static int __init it8712f_wdt_find(unsigned short *address) |
348 | it8712f_wdt_find(unsigned short *address) | ||
349 | { | 330 | { |
350 | int err = -ENODEV; | 331 | int err = -ENODEV; |
351 | int chip_type; | 332 | int chip_type; |
@@ -387,8 +368,7 @@ exit: | |||
387 | return err; | 368 | return err; |
388 | } | 369 | } |
389 | 370 | ||
390 | static int __init | 371 | static int __init it8712f_wdt_init(void) |
391 | it8712f_wdt_init(void) | ||
392 | { | 372 | { |
393 | int err = 0; | 373 | int err = 0; |
394 | 374 | ||
@@ -404,8 +384,6 @@ it8712f_wdt_init(void) | |||
404 | 384 | ||
405 | it8712f_wdt_disable(); | 385 | it8712f_wdt_disable(); |
406 | 386 | ||
407 | sema_init(&it8712f_wdt_sem, 1); | ||
408 | |||
409 | err = register_reboot_notifier(&it8712f_wdt_notifier); | 387 | err = register_reboot_notifier(&it8712f_wdt_notifier); |
410 | if (err) { | 388 | if (err) { |
411 | printk(KERN_ERR NAME ": unable to register reboot notifier\n"); | 389 | printk(KERN_ERR NAME ": unable to register reboot notifier\n"); |
@@ -430,8 +408,7 @@ out: | |||
430 | return err; | 408 | return err; |
431 | } | 409 | } |
432 | 410 | ||
433 | static void __exit | 411 | static void __exit it8712f_wdt_exit(void) |
434 | it8712f_wdt_exit(void) | ||
435 | { | 412 | { |
436 | misc_deregister(&it8712f_wdt_miscdev); | 413 | misc_deregister(&it8712f_wdt_miscdev); |
437 | unregister_reboot_notifier(&it8712f_wdt_notifier); | 414 | unregister_reboot_notifier(&it8712f_wdt_notifier); |
diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c index 98532c0e0689..97b4a2e8eb09 100644 --- a/drivers/watchdog/s3c2410_wdt.c +++ b/drivers/watchdog/s3c2410_wdt.c | |||
@@ -46,9 +46,8 @@ | |||
46 | #include <linux/platform_device.h> | 46 | #include <linux/platform_device.h> |
47 | #include <linux/interrupt.h> | 47 | #include <linux/interrupt.h> |
48 | #include <linux/clk.h> | 48 | #include <linux/clk.h> |
49 | 49 | #include <linux/uaccess.h> | |
50 | #include <asm/uaccess.h> | 50 | #include <linux/io.h> |
51 | #include <asm/io.h> | ||
52 | 51 | ||
53 | #include <asm/arch/map.h> | 52 | #include <asm/arch/map.h> |
54 | 53 | ||
@@ -65,8 +64,8 @@ | |||
65 | static int nowayout = WATCHDOG_NOWAYOUT; | 64 | static int nowayout = WATCHDOG_NOWAYOUT; |
66 | static int tmr_margin = CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME; | 65 | static int tmr_margin = CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME; |
67 | static int tmr_atboot = CONFIG_S3C2410_WATCHDOG_ATBOOT; | 66 | static int tmr_atboot = CONFIG_S3C2410_WATCHDOG_ATBOOT; |
68 | static int soft_noboot = 0; | 67 | static int soft_noboot; |
69 | static int debug = 0; | 68 | static int debug; |
70 | 69 | ||
71 | module_param(tmr_margin, int, 0); | 70 | module_param(tmr_margin, int, 0); |
72 | module_param(tmr_atboot, int, 0); | 71 | module_param(tmr_atboot, int, 0); |
@@ -74,24 +73,23 @@ module_param(nowayout, int, 0); | |||
74 | module_param(soft_noboot, int, 0); | 73 | module_param(soft_noboot, int, 0); |
75 | module_param(debug, int, 0); | 74 | module_param(debug, int, 0); |
76 | 75 | ||
77 | MODULE_PARM_DESC(tmr_margin, "Watchdog tmr_margin in seconds. default=" __MODULE_STRING(CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME) ")"); | 76 | MODULE_PARM_DESC(tmr_margin, "Watchdog tmr_margin in seconds. default=" |
78 | 77 | __MODULE_STRING(CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME) ")"); | |
79 | MODULE_PARM_DESC(tmr_atboot, "Watchdog is started at boot time if set to 1, default=" __MODULE_STRING(CONFIG_S3C2410_WATCHDOG_ATBOOT)); | 78 | MODULE_PARM_DESC(tmr_atboot, |
80 | 79 | "Watchdog is started at boot time if set to 1, default=" | |
81 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); | 80 | __MODULE_STRING(CONFIG_S3C2410_WATCHDOG_ATBOOT)); |
82 | 81 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" | |
82 | __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); | ||
83 | MODULE_PARM_DESC(soft_noboot, "Watchdog action, set to 1 to ignore reboots, 0 to reboot (default depends on ONLY_TESTING)"); | 83 | MODULE_PARM_DESC(soft_noboot, "Watchdog action, set to 1 to ignore reboots, 0 to reboot (default depends on ONLY_TESTING)"); |
84 | |||
85 | MODULE_PARM_DESC(debug, "Watchdog debug, set to >1 for debug, (default 0)"); | 84 | MODULE_PARM_DESC(debug, "Watchdog debug, set to >1 for debug, (default 0)"); |
86 | 85 | ||
87 | 86 | ||
88 | typedef enum close_state { | 87 | typedef enum close_state { |
89 | CLOSE_STATE_NOT, | 88 | CLOSE_STATE_NOT, |
90 | CLOSE_STATE_ALLOW=0x4021 | 89 | CLOSE_STATE_ALLOW = 0x4021 |
91 | } close_state_t; | 90 | } close_state_t; |
92 | 91 | ||
93 | static DECLARE_MUTEX(open_lock); | 92 | static unsigned long open_lock; |
94 | |||
95 | static struct device *wdt_dev; /* platform device attached to */ | 93 | static struct device *wdt_dev; /* platform device attached to */ |
96 | static struct resource *wdt_mem; | 94 | static struct resource *wdt_mem; |
97 | static struct resource *wdt_irq; | 95 | static struct resource *wdt_irq; |
@@ -99,38 +97,58 @@ static struct clk *wdt_clock; | |||
99 | static void __iomem *wdt_base; | 97 | static void __iomem *wdt_base; |
100 | static unsigned int wdt_count; | 98 | static unsigned int wdt_count; |
101 | static close_state_t allow_close; | 99 | static close_state_t allow_close; |
100 | static DEFINE_SPINLOCK(wdt_lock); | ||
102 | 101 | ||
103 | /* watchdog control routines */ | 102 | /* watchdog control routines */ |
104 | 103 | ||
105 | #define DBG(msg...) do { \ | 104 | #define DBG(msg...) do { \ |
106 | if (debug) \ | 105 | if (debug) \ |
107 | printk(KERN_INFO msg); \ | 106 | printk(KERN_INFO msg); \ |
108 | } while(0) | 107 | } while (0) |
109 | 108 | ||
110 | /* functions */ | 109 | /* functions */ |
111 | 110 | ||
112 | static int s3c2410wdt_keepalive(void) | 111 | static void s3c2410wdt_keepalive(void) |
113 | { | 112 | { |
113 | spin_lock(&wdt_lock); | ||
114 | writel(wdt_count, wdt_base + S3C2410_WTCNT); | 114 | writel(wdt_count, wdt_base + S3C2410_WTCNT); |
115 | return 0; | 115 | spin_unlock(&wdt_lock); |
116 | } | 116 | } |
117 | 117 | ||
118 | static int s3c2410wdt_stop(void) | 118 | static void __s3c2410wdt_stop(void) |
119 | { | 119 | { |
120 | unsigned long wtcon; | 120 | unsigned long wtcon; |
121 | 121 | ||
122 | spin_lock(&wdt_lock); | ||
122 | wtcon = readl(wdt_base + S3C2410_WTCON); | 123 | wtcon = readl(wdt_base + S3C2410_WTCON); |
123 | wtcon &= ~(S3C2410_WTCON_ENABLE | S3C2410_WTCON_RSTEN); | 124 | wtcon &= ~(S3C2410_WTCON_ENABLE | S3C2410_WTCON_RSTEN); |
124 | writel(wtcon, wdt_base + S3C2410_WTCON); | 125 | writel(wtcon, wdt_base + S3C2410_WTCON); |
126 | spin_unlock(&wdt_lock); | ||
127 | } | ||
125 | 128 | ||
126 | return 0; | 129 | static void __s3c2410wdt_stop(void) |
130 | { | ||
131 | unsigned long wtcon; | ||
132 | |||
133 | wtcon = readl(wdt_base + S3C2410_WTCON); | ||
134 | wtcon &= ~(S3C2410_WTCON_ENABLE | S3C2410_WTCON_RSTEN); | ||
135 | writel(wtcon, wdt_base + S3C2410_WTCON); | ||
136 | } | ||
137 | |||
138 | static void s3c2410wdt_stop(void) | ||
139 | { | ||
140 | spin_lock(&wdt_lock); | ||
141 | __s3c2410wdt_stop(); | ||
142 | spin_unlock(&wdt_lock); | ||
127 | } | 143 | } |
128 | 144 | ||
129 | static int s3c2410wdt_start(void) | 145 | static void s3c2410wdt_start(void) |
130 | { | 146 | { |
131 | unsigned long wtcon; | 147 | unsigned long wtcon; |
132 | 148 | ||
133 | s3c2410wdt_stop(); | 149 | spin_lock(&wdt_lock); |
150 | |||
151 | __s3c2410wdt_stop(); | ||
134 | 152 | ||
135 | wtcon = readl(wdt_base + S3C2410_WTCON); | 153 | wtcon = readl(wdt_base + S3C2410_WTCON); |
136 | wtcon |= S3C2410_WTCON_ENABLE | S3C2410_WTCON_DIV128; | 154 | wtcon |= S3C2410_WTCON_ENABLE | S3C2410_WTCON_DIV128; |
@@ -149,6 +167,7 @@ static int s3c2410wdt_start(void) | |||
149 | writel(wdt_count, wdt_base + S3C2410_WTDAT); | 167 | writel(wdt_count, wdt_base + S3C2410_WTDAT); |
150 | writel(wdt_count, wdt_base + S3C2410_WTCNT); | 168 | writel(wdt_count, wdt_base + S3C2410_WTCNT); |
151 | writel(wtcon, wdt_base + S3C2410_WTCON); | 169 | writel(wtcon, wdt_base + S3C2410_WTCON); |
170 | spin_unlock(&wdt_lock); | ||
152 | 171 | ||
153 | return 0; | 172 | return 0; |
154 | } | 173 | } |
@@ -211,7 +230,7 @@ static int s3c2410wdt_set_heartbeat(int timeout) | |||
211 | 230 | ||
212 | static int s3c2410wdt_open(struct inode *inode, struct file *file) | 231 | static int s3c2410wdt_open(struct inode *inode, struct file *file) |
213 | { | 232 | { |
214 | if(down_trylock(&open_lock)) | 233 | if (test_and_set_bit(0, &open_lock)) |
215 | return -EBUSY; | 234 | return -EBUSY; |
216 | 235 | ||
217 | if (nowayout) | 236 | if (nowayout) |
@@ -231,15 +250,14 @@ static int s3c2410wdt_release(struct inode *inode, struct file *file) | |||
231 | * Lock it in if it's a module and we set nowayout | 250 | * Lock it in if it's a module and we set nowayout |
232 | */ | 251 | */ |
233 | 252 | ||
234 | if (allow_close == CLOSE_STATE_ALLOW) { | 253 | if (allow_close == CLOSE_STATE_ALLOW) |
235 | s3c2410wdt_stop(); | 254 | s3c2410wdt_stop(); |
236 | } else { | 255 | else { |
237 | dev_err(wdt_dev, "Unexpected close, not stopping watchdog\n"); | 256 | dev_err(wdt_dev, "Unexpected close, not stopping watchdog\n"); |
238 | s3c2410wdt_keepalive(); | 257 | s3c2410wdt_keepalive(); |
239 | } | 258 | } |
240 | |||
241 | allow_close = CLOSE_STATE_NOT; | 259 | allow_close = CLOSE_STATE_NOT; |
242 | up(&open_lock); | 260 | clear_bit(0, &open_lock); |
243 | return 0; | 261 | return 0; |
244 | } | 262 | } |
245 | 263 | ||
@@ -249,7 +267,7 @@ static ssize_t s3c2410wdt_write(struct file *file, const char __user *data, | |||
249 | /* | 267 | /* |
250 | * Refresh the timer. | 268 | * Refresh the timer. |
251 | */ | 269 | */ |
252 | if(len) { | 270 | if (len) { |
253 | if (!nowayout) { | 271 | if (!nowayout) { |
254 | size_t i; | 272 | size_t i; |
255 | 273 | ||
@@ -265,7 +283,6 @@ static ssize_t s3c2410wdt_write(struct file *file, const char __user *data, | |||
265 | allow_close = CLOSE_STATE_ALLOW; | 283 | allow_close = CLOSE_STATE_ALLOW; |
266 | } | 284 | } |
267 | } | 285 | } |
268 | |||
269 | s3c2410wdt_keepalive(); | 286 | s3c2410wdt_keepalive(); |
270 | } | 287 | } |
271 | return len; | 288 | return len; |
@@ -273,48 +290,41 @@ static ssize_t s3c2410wdt_write(struct file *file, const char __user *data, | |||
273 | 290 | ||
274 | #define OPTIONS WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE | 291 | #define OPTIONS WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE |
275 | 292 | ||
276 | static struct watchdog_info s3c2410_wdt_ident = { | 293 | static const struct watchdog_info s3c2410_wdt_ident = { |
277 | .options = OPTIONS, | 294 | .options = OPTIONS, |
278 | .firmware_version = 0, | 295 | .firmware_version = 0, |
279 | .identity = "S3C2410 Watchdog", | 296 | .identity = "S3C2410 Watchdog", |
280 | }; | 297 | }; |
281 | 298 | ||
282 | 299 | ||
283 | static int s3c2410wdt_ioctl(struct inode *inode, struct file *file, | 300 | static long s3c2410wdt_ioctl(struct file *file, unsigned int cmd, |
284 | unsigned int cmd, unsigned long arg) | 301 | unsigned long arg) |
285 | { | 302 | { |
286 | void __user *argp = (void __user *)arg; | 303 | void __user *argp = (void __user *)arg; |
287 | int __user *p = argp; | 304 | int __user *p = argp; |
288 | int new_margin; | 305 | int new_margin; |
289 | 306 | ||
290 | switch (cmd) { | 307 | switch (cmd) { |
291 | default: | 308 | default: |
292 | return -ENOTTY; | 309 | return -ENOTTY; |
293 | 310 | case WDIOC_GETSUPPORT: | |
294 | case WDIOC_GETSUPPORT: | 311 | return copy_to_user(argp, &s3c2410_wdt_ident, |
295 | return copy_to_user(argp, &s3c2410_wdt_ident, | 312 | sizeof(s3c2410_wdt_ident)) ? -EFAULT : 0; |
296 | sizeof(s3c2410_wdt_ident)) ? -EFAULT : 0; | 313 | case WDIOC_GETSTATUS: |
297 | 314 | case WDIOC_GETBOOTSTATUS: | |
298 | case WDIOC_GETSTATUS: | 315 | return put_user(0, p); |
299 | case WDIOC_GETBOOTSTATUS: | 316 | case WDIOC_KEEPALIVE: |
300 | return put_user(0, p); | 317 | s3c2410wdt_keepalive(); |
301 | 318 | return 0; | |
302 | case WDIOC_KEEPALIVE: | 319 | case WDIOC_SETTIMEOUT: |
303 | s3c2410wdt_keepalive(); | 320 | if (get_user(new_margin, p)) |
304 | return 0; | 321 | return -EFAULT; |
305 | 322 | if (s3c2410wdt_set_heartbeat(new_margin)) | |
306 | case WDIOC_SETTIMEOUT: | 323 | return -EINVAL; |
307 | if (get_user(new_margin, p)) | 324 | s3c2410wdt_keepalive(); |
308 | return -EFAULT; | 325 | return put_user(tmr_margin, p); |
309 | 326 | case WDIOC_GETTIMEOUT: | |
310 | if (s3c2410wdt_set_heartbeat(new_margin)) | 327 | return put_user(tmr_margin, p); |
311 | return -EINVAL; | ||
312 | |||
313 | s3c2410wdt_keepalive(); | ||
314 | return put_user(tmr_margin, p); | ||
315 | |||
316 | case WDIOC_GETTIMEOUT: | ||
317 | return put_user(tmr_margin, p); | ||
318 | } | 328 | } |
319 | } | 329 | } |
320 | 330 | ||
@@ -324,7 +334,7 @@ static const struct file_operations s3c2410wdt_fops = { | |||
324 | .owner = THIS_MODULE, | 334 | .owner = THIS_MODULE, |
325 | .llseek = no_llseek, | 335 | .llseek = no_llseek, |
326 | .write = s3c2410wdt_write, | 336 | .write = s3c2410wdt_write, |
327 | .ioctl = s3c2410wdt_ioctl, | 337 | .unlocked_ioctl = s3c2410wdt_ioctl, |
328 | .open = s3c2410wdt_open, | 338 | .open = s3c2410wdt_open, |
329 | .release = s3c2410wdt_release, | 339 | .release = s3c2410wdt_release, |
330 | }; | 340 | }; |
@@ -411,14 +421,15 @@ static int s3c2410wdt_probe(struct platform_device *pdev) | |||
411 | * not, try the default value */ | 421 | * not, try the default value */ |
412 | 422 | ||
413 | if (s3c2410wdt_set_heartbeat(tmr_margin)) { | 423 | if (s3c2410wdt_set_heartbeat(tmr_margin)) { |
414 | started = s3c2410wdt_set_heartbeat(CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME); | 424 | started = s3c2410wdt_set_heartbeat( |
425 | CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME); | ||
415 | 426 | ||
416 | if (started == 0) { | 427 | if (started == 0) |
417 | dev_info(dev,"tmr_margin value out of range, default %d used\n", | 428 | dev_info(dev, |
429 | "tmr_margin value out of range, default %d used\n", | ||
418 | CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME); | 430 | CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME); |
419 | } else { | 431 | else |
420 | dev_info(dev, "default timer value is out of range, cannot start\n"); | 432 | dev_info(dev, "default timer value is out of range, cannot start\n"); |
421 | } | ||
422 | } | 433 | } |
423 | 434 | ||
424 | ret = misc_register(&s3c2410wdt_miscdev); | 435 | ret = misc_register(&s3c2410wdt_miscdev); |
@@ -447,7 +458,7 @@ static int s3c2410wdt_probe(struct platform_device *pdev) | |||
447 | (wtcon & S3C2410_WTCON_ENABLE) ? "" : "in", | 458 | (wtcon & S3C2410_WTCON_ENABLE) ? "" : "in", |
448 | (wtcon & S3C2410_WTCON_RSTEN) ? "" : "dis", | 459 | (wtcon & S3C2410_WTCON_RSTEN) ? "" : "dis", |
449 | (wtcon & S3C2410_WTCON_INTEN) ? "" : "en"); | 460 | (wtcon & S3C2410_WTCON_INTEN) ? "" : "en"); |
450 | 461 | ||
451 | return 0; | 462 | return 0; |
452 | 463 | ||
453 | err_clk: | 464 | err_clk: |
@@ -487,7 +498,7 @@ static int s3c2410wdt_remove(struct platform_device *dev) | |||
487 | 498 | ||
488 | static void s3c2410wdt_shutdown(struct platform_device *dev) | 499 | static void s3c2410wdt_shutdown(struct platform_device *dev) |
489 | { | 500 | { |
490 | s3c2410wdt_stop(); | 501 | s3c2410wdt_stop(); |
491 | } | 502 | } |
492 | 503 | ||
493 | #ifdef CONFIG_PM | 504 | #ifdef CONFIG_PM |
@@ -540,7 +551,8 @@ static struct platform_driver s3c2410wdt_driver = { | |||
540 | }; | 551 | }; |
541 | 552 | ||
542 | 553 | ||
543 | static char banner[] __initdata = KERN_INFO "S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics\n"; | 554 | static char banner[] __initdata = |
555 | KERN_INFO "S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics\n"; | ||
544 | 556 | ||
545 | static int __init watchdog_init(void) | 557 | static int __init watchdog_init(void) |
546 | { | 558 | { |
diff --git a/drivers/watchdog/sc1200wdt.c b/drivers/watchdog/sc1200wdt.c index 35cddff7020f..621ebad56d86 100644 --- a/drivers/watchdog/sc1200wdt.c +++ b/drivers/watchdog/sc1200wdt.c | |||
@@ -15,14 +15,18 @@ | |||
15 | * | 15 | * |
16 | * Changelog: | 16 | * Changelog: |
17 | * 20020220 Zwane Mwaikambo Code based on datasheet, no hardware. | 17 | * 20020220 Zwane Mwaikambo Code based on datasheet, no hardware. |
18 | * 20020221 Zwane Mwaikambo Cleanups as suggested by Jeff Garzik and Alan Cox. | 18 | * 20020221 Zwane Mwaikambo Cleanups as suggested by Jeff Garzik |
19 | * and Alan Cox. | ||
19 | * 20020222 Zwane Mwaikambo Added probing. | 20 | * 20020222 Zwane Mwaikambo Added probing. |
20 | * 20020225 Zwane Mwaikambo Added ISAPNP support. | 21 | * 20020225 Zwane Mwaikambo Added ISAPNP support. |
21 | * 20020412 Rob Radez Broke out start/stop functions | 22 | * 20020412 Rob Radez Broke out start/stop functions |
22 | * <rob@osinvestor.com> Return proper status instead of temperature warning | 23 | * <rob@osinvestor.com> Return proper status instead of |
23 | * Add WDIOC_GETBOOTSTATUS and WDIOC_SETOPTIONS ioctls | 24 | * temperature warning |
25 | * Add WDIOC_GETBOOTSTATUS and | ||
26 | * WDIOC_SETOPTIONS ioctls | ||
24 | * Fix CONFIG_WATCHDOG_NOWAYOUT | 27 | * Fix CONFIG_WATCHDOG_NOWAYOUT |
25 | * 20020530 Joel Becker Add Matt Domsch's nowayout module option | 28 | * 20020530 Joel Becker Add Matt Domsch's nowayout module |
29 | * option | ||
26 | * 20030116 Adam Belay Updated to the latest pnp code | 30 | * 20030116 Adam Belay Updated to the latest pnp code |
27 | * | 31 | * |
28 | */ | 32 | */ |
@@ -39,9 +43,8 @@ | |||
39 | #include <linux/pnp.h> | 43 | #include <linux/pnp.h> |
40 | #include <linux/fs.h> | 44 | #include <linux/fs.h> |
41 | #include <linux/semaphore.h> | 45 | #include <linux/semaphore.h> |
42 | 46 | #include <linux/io.h> | |
43 | #include <asm/io.h> | 47 | #include <linux/uaccess.h> |
44 | #include <asm/uaccess.h> | ||
45 | 48 | ||
46 | #define SC1200_MODULE_VER "build 20020303" | 49 | #define SC1200_MODULE_VER "build 20020303" |
47 | #define SC1200_MODULE_NAME "sc1200wdt" | 50 | #define SC1200_MODULE_NAME "sc1200wdt" |
@@ -72,7 +75,7 @@ static char banner[] __initdata = KERN_INFO PFX SC1200_MODULE_VER; | |||
72 | static int timeout = 1; | 75 | static int timeout = 1; |
73 | static int io = -1; | 76 | static int io = -1; |
74 | static int io_len = 2; /* for non plug and play */ | 77 | static int io_len = 2; /* for non plug and play */ |
75 | static struct semaphore open_sem; | 78 | static unsigned long open_flag; |
76 | static char expect_close; | 79 | static char expect_close; |
77 | static DEFINE_SPINLOCK(sc1200wdt_lock); /* io port access serialisation */ | 80 | static DEFINE_SPINLOCK(sc1200wdt_lock); /* io port access serialisation */ |
78 | 81 | ||
@@ -81,7 +84,8 @@ static int isapnp = 1; | |||
81 | static struct pnp_dev *wdt_dev; | 84 | static struct pnp_dev *wdt_dev; |
82 | 85 | ||
83 | module_param(isapnp, int, 0); | 86 | module_param(isapnp, int, 0); |
84 | MODULE_PARM_DESC(isapnp, "When set to 0 driver ISA PnP support will be disabled"); | 87 | MODULE_PARM_DESC(isapnp, |
88 | "When set to 0 driver ISA PnP support will be disabled"); | ||
85 | #endif | 89 | #endif |
86 | 90 | ||
87 | module_param(io, int, 0); | 91 | module_param(io, int, 0); |
@@ -91,26 +95,40 @@ MODULE_PARM_DESC(timeout, "range is 0-255 minutes, default is 1"); | |||
91 | 95 | ||
92 | static int nowayout = WATCHDOG_NOWAYOUT; | 96 | static int nowayout = WATCHDOG_NOWAYOUT; |
93 | module_param(nowayout, int, 0); | 97 | module_param(nowayout, int, 0); |
94 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); | 98 | MODULE_PARM_DESC(nowayout, |
99 | "Watchdog cannot be stopped once started (default=" | ||
100 | __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); | ||
95 | 101 | ||
96 | 102 | ||
97 | 103 | ||
98 | /* Read from Data Register */ | 104 | /* Read from Data Register */ |
99 | static inline void sc1200wdt_read_data(unsigned char index, unsigned char *data) | 105 | static inline void __sc1200wdt_read_data(unsigned char index, |
106 | unsigned char *data) | ||
100 | { | 107 | { |
101 | spin_lock(&sc1200wdt_lock); | ||
102 | outb_p(index, PMIR); | 108 | outb_p(index, PMIR); |
103 | *data = inb(PMDR); | 109 | *data = inb(PMDR); |
104 | spin_unlock(&sc1200wdt_lock); | ||
105 | } | 110 | } |
106 | 111 | ||
112 | static void sc1200wdt_read_data(unsigned char index, unsigned char *data) | ||
113 | { | ||
114 | spin_lock(&sc1200wdt_lock); | ||
115 | __sc1200wdt_read_data(index, data); | ||
116 | spin_unlock(&sc1200wdt_lock); | ||
117 | } | ||
107 | 118 | ||
108 | /* Write to Data Register */ | 119 | /* Write to Data Register */ |
109 | static inline void sc1200wdt_write_data(unsigned char index, unsigned char data) | 120 | static inline void __sc1200wdt_write_data(unsigned char index, |
121 | unsigned char data) | ||
110 | { | 122 | { |
111 | spin_lock(&sc1200wdt_lock); | ||
112 | outb_p(index, PMIR); | 123 | outb_p(index, PMIR); |
113 | outb(data, PMDR); | 124 | outb(data, PMDR); |
125 | } | ||
126 | |||
127 | static inline void sc1200wdt_write_data(unsigned char index, | ||
128 | unsigned char data) | ||
129 | { | ||
130 | spin_lock(&sc1200wdt_lock); | ||
131 | __sc1200wdt_write_data(index, data); | ||
114 | spin_unlock(&sc1200wdt_lock); | 132 | spin_unlock(&sc1200wdt_lock); |
115 | } | 133 | } |
116 | 134 | ||
@@ -118,22 +136,23 @@ static inline void sc1200wdt_write_data(unsigned char index, unsigned char data) | |||
118 | static void sc1200wdt_start(void) | 136 | static void sc1200wdt_start(void) |
119 | { | 137 | { |
120 | unsigned char reg; | 138 | unsigned char reg; |
139 | spin_lock(&sc1200wdt_lock); | ||
121 | 140 | ||
122 | sc1200wdt_read_data(WDCF, ®); | 141 | __sc1200wdt_read_data(WDCF, ®); |
123 | /* assert WDO when any of the following interrupts are triggered too */ | 142 | /* assert WDO when any of the following interrupts are triggered too */ |
124 | reg |= (KBC_IRQ | MSE_IRQ | UART1_IRQ | UART2_IRQ); | 143 | reg |= (KBC_IRQ | MSE_IRQ | UART1_IRQ | UART2_IRQ); |
125 | sc1200wdt_write_data(WDCF, reg); | 144 | __sc1200wdt_write_data(WDCF, reg); |
126 | /* set the timeout and get the ball rolling */ | 145 | /* set the timeout and get the ball rolling */ |
127 | sc1200wdt_write_data(WDTO, timeout); | 146 | __sc1200wdt_write_data(WDTO, timeout); |
128 | } | ||
129 | 147 | ||
148 | spin_unlock(&sc1200wdt_lock); | ||
149 | } | ||
130 | 150 | ||
131 | static void sc1200wdt_stop(void) | 151 | static void sc1200wdt_stop(void) |
132 | { | 152 | { |
133 | sc1200wdt_write_data(WDTO, 0); | 153 | sc1200wdt_write_data(WDTO, 0); |
134 | } | 154 | } |
135 | 155 | ||
136 | |||
137 | /* This returns the status of the WDO signal, inactive high. */ | 156 | /* This returns the status of the WDO signal, inactive high. */ |
138 | static inline int sc1200wdt_status(void) | 157 | static inline int sc1200wdt_status(void) |
139 | { | 158 | { |
@@ -144,14 +163,13 @@ static inline int sc1200wdt_status(void) | |||
144 | * KEEPALIVEPING which is a bit of a kludge because there's nothing | 163 | * KEEPALIVEPING which is a bit of a kludge because there's nothing |
145 | * else for enabled/disabled status | 164 | * else for enabled/disabled status |
146 | */ | 165 | */ |
147 | return (ret & 0x01) ? 0 : WDIOF_KEEPALIVEPING; /* bits 1 - 7 are undefined */ | 166 | return (ret & 0x01) ? 0 : WDIOF_KEEPALIVEPING; |
148 | } | 167 | } |
149 | 168 | ||
150 | |||
151 | static int sc1200wdt_open(struct inode *inode, struct file *file) | 169 | static int sc1200wdt_open(struct inode *inode, struct file *file) |
152 | { | 170 | { |
153 | /* allow one at a time */ | 171 | /* allow one at a time */ |
154 | if (down_trylock(&open_sem)) | 172 | if (test_and_set_bit(0, &open_flag)) |
155 | return -EBUSY; | 173 | return -EBUSY; |
156 | 174 | ||
157 | if (timeout > MAX_TIMEOUT) | 175 | if (timeout > MAX_TIMEOUT) |
@@ -164,71 +182,71 @@ static int sc1200wdt_open(struct inode *inode, struct file *file) | |||
164 | } | 182 | } |
165 | 183 | ||
166 | 184 | ||
167 | static int sc1200wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) | 185 | static long sc1200wdt_ioctl(struct file *file, unsigned int cmd, |
186 | unsigned long arg) | ||
168 | { | 187 | { |
169 | int new_timeout; | 188 | int new_timeout; |
170 | void __user *argp = (void __user *)arg; | 189 | void __user *argp = (void __user *)arg; |
171 | int __user *p = argp; | 190 | int __user *p = argp; |
172 | static struct watchdog_info ident = { | 191 | static const struct watchdog_info ident = { |
173 | .options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE, | 192 | .options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | |
193 | WDIOF_MAGICCLOSE, | ||
174 | .firmware_version = 0, | 194 | .firmware_version = 0, |
175 | .identity = "PC87307/PC97307", | 195 | .identity = "PC87307/PC97307", |
176 | }; | 196 | }; |
177 | 197 | ||
178 | switch (cmd) { | 198 | switch (cmd) { |
179 | default: | ||
180 | return -ENOTTY; | ||
181 | |||
182 | case WDIOC_GETSUPPORT: | ||
183 | if (copy_to_user(argp, &ident, sizeof ident)) | ||
184 | return -EFAULT; | ||
185 | return 0; | ||
186 | |||
187 | case WDIOC_GETSTATUS: | ||
188 | return put_user(sc1200wdt_status(), p); | ||
189 | |||
190 | case WDIOC_GETBOOTSTATUS: | ||
191 | return put_user(0, p); | ||
192 | |||
193 | case WDIOC_KEEPALIVE: | ||
194 | sc1200wdt_write_data(WDTO, timeout); | ||
195 | return 0; | ||
196 | 199 | ||
197 | case WDIOC_SETTIMEOUT: | 200 | case WDIOC_GETSUPPORT: |
198 | if (get_user(new_timeout, p)) | 201 | if (copy_to_user(argp, &ident, sizeof ident)) |
199 | return -EFAULT; | 202 | return -EFAULT; |
203 | return 0; | ||
200 | 204 | ||
201 | /* the API states this is given in secs */ | 205 | case WDIOC_GETSTATUS: |
202 | new_timeout /= 60; | 206 | return put_user(sc1200wdt_status(), p); |
203 | if (new_timeout < 0 || new_timeout > MAX_TIMEOUT) | ||
204 | return -EINVAL; | ||
205 | 207 | ||
206 | timeout = new_timeout; | 208 | case WDIOC_GETBOOTSTATUS: |
207 | sc1200wdt_write_data(WDTO, timeout); | 209 | return put_user(0, p); |
208 | /* fall through and return the new timeout */ | ||
209 | 210 | ||
210 | case WDIOC_GETTIMEOUT: | 211 | case WDIOC_KEEPALIVE: |
211 | return put_user(timeout * 60, p); | 212 | sc1200wdt_write_data(WDTO, timeout); |
213 | return 0; | ||
214 | |||
215 | case WDIOC_SETTIMEOUT: | ||
216 | if (get_user(new_timeout, p)) | ||
217 | return -EFAULT; | ||
218 | /* the API states this is given in secs */ | ||
219 | new_timeout /= 60; | ||
220 | if (new_timeout < 0 || new_timeout > MAX_TIMEOUT) | ||
221 | return -EINVAL; | ||
222 | timeout = new_timeout; | ||
223 | sc1200wdt_write_data(WDTO, timeout); | ||
224 | /* fall through and return the new timeout */ | ||
212 | 225 | ||
213 | case WDIOC_SETOPTIONS: | 226 | case WDIOC_GETTIMEOUT: |
214 | { | 227 | return put_user(timeout * 60, p); |
215 | int options, retval = -EINVAL; | ||
216 | 228 | ||
217 | if (get_user(options, p)) | 229 | case WDIOC_SETOPTIONS: |
218 | return -EFAULT; | 230 | { |
231 | int options, retval = -EINVAL; | ||
219 | 232 | ||
220 | if (options & WDIOS_DISABLECARD) { | 233 | if (get_user(options, p)) |
221 | sc1200wdt_stop(); | 234 | return -EFAULT; |
222 | retval = 0; | ||
223 | } | ||
224 | 235 | ||
225 | if (options & WDIOS_ENABLECARD) { | 236 | if (options & WDIOS_DISABLECARD) { |
226 | sc1200wdt_start(); | 237 | sc1200wdt_stop(); |
227 | retval = 0; | 238 | retval = 0; |
228 | } | 239 | } |
229 | 240 | ||
230 | return retval; | 241 | if (options & WDIOS_ENABLECARD) { |
242 | sc1200wdt_start(); | ||
243 | retval = 0; | ||
231 | } | 244 | } |
245 | |||
246 | return retval; | ||
247 | } | ||
248 | default: | ||
249 | return -ENOTTY; | ||
232 | } | 250 | } |
233 | } | 251 | } |
234 | 252 | ||
@@ -240,16 +258,18 @@ static int sc1200wdt_release(struct inode *inode, struct file *file) | |||
240 | printk(KERN_INFO PFX "Watchdog disabled\n"); | 258 | printk(KERN_INFO PFX "Watchdog disabled\n"); |
241 | } else { | 259 | } else { |
242 | sc1200wdt_write_data(WDTO, timeout); | 260 | sc1200wdt_write_data(WDTO, timeout); |
243 | printk(KERN_CRIT PFX "Unexpected close!, timeout = %d min(s)\n", timeout); | 261 | printk(KERN_CRIT PFX |
262 | "Unexpected close!, timeout = %d min(s)\n", timeout); | ||
244 | } | 263 | } |
245 | up(&open_sem); | 264 | clear_bit(0, &open_flag); |
246 | expect_close = 0; | 265 | expect_close = 0; |
247 | 266 | ||
248 | return 0; | 267 | return 0; |
249 | } | 268 | } |
250 | 269 | ||
251 | 270 | ||
252 | static ssize_t sc1200wdt_write(struct file *file, const char __user *data, size_t len, loff_t *ppos) | 271 | static ssize_t sc1200wdt_write(struct file *file, const char __user *data, |
272 | size_t len, loff_t *ppos) | ||
253 | { | 273 | { |
254 | if (len) { | 274 | if (len) { |
255 | if (!nowayout) { | 275 | if (!nowayout) { |
@@ -275,7 +295,8 @@ static ssize_t sc1200wdt_write(struct file *file, const char __user *data, size_ | |||
275 | } | 295 | } |
276 | 296 | ||
277 | 297 | ||
278 | static int sc1200wdt_notify_sys(struct notifier_block *this, unsigned long code, void *unused) | 298 | static int sc1200wdt_notify_sys(struct notifier_block *this, |
299 | unsigned long code, void *unused) | ||
279 | { | 300 | { |
280 | if (code == SYS_DOWN || code == SYS_HALT) | 301 | if (code == SYS_DOWN || code == SYS_HALT) |
281 | sc1200wdt_stop(); | 302 | sc1200wdt_stop(); |
@@ -284,23 +305,20 @@ static int sc1200wdt_notify_sys(struct notifier_block *this, unsigned long code, | |||
284 | } | 305 | } |
285 | 306 | ||
286 | 307 | ||
287 | static struct notifier_block sc1200wdt_notifier = | 308 | static struct notifier_block sc1200wdt_notifier = { |
288 | { | ||
289 | .notifier_call = sc1200wdt_notify_sys, | 309 | .notifier_call = sc1200wdt_notify_sys, |
290 | }; | 310 | }; |
291 | 311 | ||
292 | static const struct file_operations sc1200wdt_fops = | 312 | static const struct file_operations sc1200wdt_fops = { |
293 | { | ||
294 | .owner = THIS_MODULE, | 313 | .owner = THIS_MODULE, |
295 | .llseek = no_llseek, | 314 | .llseek = no_llseek, |
296 | .write = sc1200wdt_write, | 315 | .write = sc1200wdt_write, |
297 | .ioctl = sc1200wdt_ioctl, | 316 | .unlocked_ioctl = sc1200wdt_ioctl, |
298 | .open = sc1200wdt_open, | 317 | .open = sc1200wdt_open, |
299 | .release = sc1200wdt_release, | 318 | .release = sc1200wdt_release, |
300 | }; | 319 | }; |
301 | 320 | ||
302 | static struct miscdevice sc1200wdt_miscdev = | 321 | static struct miscdevice sc1200wdt_miscdev = { |
303 | { | ||
304 | .minor = WATCHDOG_MINOR, | 322 | .minor = WATCHDOG_MINOR, |
305 | .name = "watchdog", | 323 | .name = "watchdog", |
306 | .fops = &sc1200wdt_fops, | 324 | .fops = &sc1200wdt_fops, |
@@ -312,14 +330,14 @@ static int __init sc1200wdt_probe(void) | |||
312 | /* The probe works by reading the PMC3 register's default value of 0x0e | 330 | /* The probe works by reading the PMC3 register's default value of 0x0e |
313 | * there is one caveat, if the device disables the parallel port or any | 331 | * there is one caveat, if the device disables the parallel port or any |
314 | * of the UARTs we won't be able to detect it. | 332 | * of the UARTs we won't be able to detect it. |
315 | * Nb. This could be done with accuracy by reading the SID registers, but | 333 | * NB. This could be done with accuracy by reading the SID registers, |
316 | * we don't have access to those io regions. | 334 | * but we don't have access to those io regions. |
317 | */ | 335 | */ |
318 | 336 | ||
319 | unsigned char reg; | 337 | unsigned char reg; |
320 | 338 | ||
321 | sc1200wdt_read_data(PMC3, ®); | 339 | sc1200wdt_read_data(PMC3, ®); |
322 | reg &= 0x0f; /* we don't want the UART busy bits */ | 340 | reg &= 0x0f; /* we don't want the UART busy bits */ |
323 | return (reg == 0x0e) ? 0 : -ENODEV; | 341 | return (reg == 0x0e) ? 0 : -ENODEV; |
324 | } | 342 | } |
325 | 343 | ||
@@ -332,7 +350,8 @@ static struct pnp_device_id scl200wdt_pnp_devices[] = { | |||
332 | {.id = ""}, | 350 | {.id = ""}, |
333 | }; | 351 | }; |
334 | 352 | ||
335 | static int scl200wdt_pnp_probe(struct pnp_dev * dev, const struct pnp_device_id *dev_id) | 353 | static int scl200wdt_pnp_probe(struct pnp_dev *dev, |
354 | const struct pnp_device_id *dev_id) | ||
336 | { | 355 | { |
337 | /* this driver only supports one card at a time */ | 356 | /* this driver only supports one card at a time */ |
338 | if (wdt_dev || !isapnp) | 357 | if (wdt_dev || !isapnp) |
@@ -347,13 +366,14 @@ static int scl200wdt_pnp_probe(struct pnp_dev * dev, const struct pnp_device_id | |||
347 | return -EBUSY; | 366 | return -EBUSY; |
348 | } | 367 | } |
349 | 368 | ||
350 | printk(KERN_INFO "scl200wdt: PnP device found at io port %#x/%d\n", io, io_len); | 369 | printk(KERN_INFO "scl200wdt: PnP device found at io port %#x/%d\n", |
370 | io, io_len); | ||
351 | return 0; | 371 | return 0; |
352 | } | 372 | } |
353 | 373 | ||
354 | static void scl200wdt_pnp_remove(struct pnp_dev * dev) | 374 | static void scl200wdt_pnp_remove(struct pnp_dev *dev) |
355 | { | 375 | { |
356 | if (wdt_dev){ | 376 | if (wdt_dev) { |
357 | release_region(io, io_len); | 377 | release_region(io, io_len); |
358 | wdt_dev = NULL; | 378 | wdt_dev = NULL; |
359 | } | 379 | } |
@@ -375,8 +395,6 @@ static int __init sc1200wdt_init(void) | |||
375 | 395 | ||
376 | printk("%s\n", banner); | 396 | printk("%s\n", banner); |
377 | 397 | ||
378 | sema_init(&open_sem, 1); | ||
379 | |||
380 | #if defined CONFIG_PNP | 398 | #if defined CONFIG_PNP |
381 | if (isapnp) { | 399 | if (isapnp) { |
382 | ret = pnp_register_driver(&scl200wdt_pnp_driver); | 400 | ret = pnp_register_driver(&scl200wdt_pnp_driver); |
@@ -410,13 +428,16 @@ static int __init sc1200wdt_init(void) | |||
410 | 428 | ||
411 | ret = register_reboot_notifier(&sc1200wdt_notifier); | 429 | ret = register_reboot_notifier(&sc1200wdt_notifier); |
412 | if (ret) { | 430 | if (ret) { |
413 | printk(KERN_ERR PFX "Unable to register reboot notifier err = %d\n", ret); | 431 | printk(KERN_ERR PFX |
432 | "Unable to register reboot notifier err = %d\n", ret); | ||
414 | goto out_io; | 433 | goto out_io; |
415 | } | 434 | } |
416 | 435 | ||
417 | ret = misc_register(&sc1200wdt_miscdev); | 436 | ret = misc_register(&sc1200wdt_miscdev); |
418 | if (ret) { | 437 | if (ret) { |
419 | printk(KERN_ERR PFX "Unable to register miscdev on minor %d\n", WATCHDOG_MINOR); | 438 | printk(KERN_ERR PFX |
439 | "Unable to register miscdev on minor %d\n", | ||
440 | WATCHDOG_MINOR); | ||
420 | goto out_rbt; | 441 | goto out_rbt; |
421 | } | 442 | } |
422 | 443 | ||
@@ -446,7 +467,7 @@ static void __exit sc1200wdt_exit(void) | |||
446 | unregister_reboot_notifier(&sc1200wdt_notifier); | 467 | unregister_reboot_notifier(&sc1200wdt_notifier); |
447 | 468 | ||
448 | #if defined CONFIG_PNP | 469 | #if defined CONFIG_PNP |
449 | if(isapnp) | 470 | if (isapnp) |
450 | pnp_unregister_driver(&scl200wdt_pnp_driver); | 471 | pnp_unregister_driver(&scl200wdt_pnp_driver); |
451 | else | 472 | else |
452 | #endif | 473 | #endif |
diff --git a/drivers/watchdog/wdt.c b/drivers/watchdog/wdt.c index 756fb15fdce7..53a6b18bcb9a 100644 --- a/drivers/watchdog/wdt.c +++ b/drivers/watchdog/wdt.c | |||
@@ -24,9 +24,10 @@ | |||
24 | * Matt Crocker). | 24 | * Matt Crocker). |
25 | * Alan Cox : Added wdt= boot option | 25 | * Alan Cox : Added wdt= boot option |
26 | * Alan Cox : Cleaned up copy/user stuff | 26 | * Alan Cox : Cleaned up copy/user stuff |
27 | * Tim Hockin : Added insmod parameters, comment cleanup | 27 | * Tim Hockin : Added insmod parameters, comment |
28 | * Parameterized timeout | 28 | * cleanup, parameterized timeout |
29 | * Tigran Aivazian : Restructured wdt_init() to handle failures | 29 | * Tigran Aivazian : Restructured wdt_init() to handle |
30 | * failures | ||
30 | * Joel Becker : Added WDIOC_GET/SETTIMEOUT | 31 | * Joel Becker : Added WDIOC_GET/SETTIMEOUT |
31 | * Matt Domsch : Added nowayout module option | 32 | * Matt Domsch : Added nowayout module option |
32 | */ | 33 | */ |
@@ -42,9 +43,9 @@ | |||
42 | #include <linux/notifier.h> | 43 | #include <linux/notifier.h> |
43 | #include <linux/reboot.h> | 44 | #include <linux/reboot.h> |
44 | #include <linux/init.h> | 45 | #include <linux/init.h> |
46 | #include <linux/io.h> | ||
47 | #include <linux/uaccess.h> | ||
45 | 48 | ||
46 | #include <asm/io.h> | ||
47 | #include <asm/uaccess.h> | ||
48 | #include <asm/system.h> | 49 | #include <asm/system.h> |
49 | #include "wd501p.h" | 50 | #include "wd501p.h" |
50 | 51 | ||
@@ -60,15 +61,19 @@ static char expect_close; | |||
60 | static int heartbeat = WD_TIMO; | 61 | static int heartbeat = WD_TIMO; |
61 | static int wd_heartbeat; | 62 | static int wd_heartbeat; |
62 | module_param(heartbeat, int, 0); | 63 | module_param(heartbeat, int, 0); |
63 | MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (0<heartbeat<65536, default=" __MODULE_STRING(WD_TIMO) ")"); | 64 | MODULE_PARM_DESC(heartbeat, |
65 | "Watchdog heartbeat in seconds. (0 < heartbeat < 65536, default=" | ||
66 | __MODULE_STRING(WD_TIMO) ")"); | ||
64 | 67 | ||
65 | static int nowayout = WATCHDOG_NOWAYOUT; | 68 | static int nowayout = WATCHDOG_NOWAYOUT; |
66 | module_param(nowayout, int, 0); | 69 | module_param(nowayout, int, 0); |
67 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); | 70 | MODULE_PARM_DESC(nowayout, |
71 | "Watchdog cannot be stopped once started (default=" | ||
72 | __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); | ||
68 | 73 | ||
69 | /* You must set these - there is no sane way to probe for this board. */ | 74 | /* You must set these - there is no sane way to probe for this board. */ |
70 | static int io=0x240; | 75 | static int io = 0x240; |
71 | static int irq=11; | 76 | static int irq = 11; |
72 | 77 | ||
73 | static DEFINE_SPINLOCK(wdt_lock); | 78 | static DEFINE_SPINLOCK(wdt_lock); |
74 | 79 | ||
@@ -82,7 +87,8 @@ MODULE_PARM_DESC(irq, "WDT irq (default=11)"); | |||
82 | static int tachometer; | 87 | static int tachometer; |
83 | 88 | ||
84 | module_param(tachometer, int, 0); | 89 | module_param(tachometer, int, 0); |
85 | MODULE_PARM_DESC(tachometer, "WDT501-P Fan Tachometer support (0=disable, default=0)"); | 90 | MODULE_PARM_DESC(tachometer, |
91 | "WDT501-P Fan Tachometer support (0=disable, default=0)"); | ||
86 | #endif /* CONFIG_WDT_501 */ | 92 | #endif /* CONFIG_WDT_501 */ |
87 | 93 | ||
88 | /* | 94 | /* |
@@ -91,9 +97,9 @@ MODULE_PARM_DESC(tachometer, "WDT501-P Fan Tachometer support (0=disable, defaul | |||
91 | 97 | ||
92 | static void wdt_ctr_mode(int ctr, int mode) | 98 | static void wdt_ctr_mode(int ctr, int mode) |
93 | { | 99 | { |
94 | ctr<<=6; | 100 | ctr <<= 6; |
95 | ctr|=0x30; | 101 | ctr |= 0x30; |
96 | ctr|=(mode<<1); | 102 | ctr |= (mode << 1); |
97 | outb_p(ctr, WDT_CR); | 103 | outb_p(ctr, WDT_CR); |
98 | } | 104 | } |
99 | 105 | ||
@@ -114,12 +120,15 @@ static int wdt_start(void) | |||
114 | unsigned long flags; | 120 | unsigned long flags; |
115 | spin_lock_irqsave(&wdt_lock, flags); | 121 | spin_lock_irqsave(&wdt_lock, flags); |
116 | inb_p(WDT_DC); /* Disable watchdog */ | 122 | inb_p(WDT_DC); /* Disable watchdog */ |
117 | wdt_ctr_mode(0,3); /* Program CTR0 for Mode 3: Square Wave Generator */ | 123 | wdt_ctr_mode(0, 3); /* Program CTR0 for Mode 3: |
118 | wdt_ctr_mode(1,2); /* Program CTR1 for Mode 2: Rate Generator */ | 124 | Square Wave Generator */ |
119 | wdt_ctr_mode(2,0); /* Program CTR2 for Mode 0: Pulse on Terminal Count */ | 125 | wdt_ctr_mode(1, 2); /* Program CTR1 for Mode 2: |
126 | Rate Generator */ | ||
127 | wdt_ctr_mode(2, 0); /* Program CTR2 for Mode 0: | ||
128 | Pulse on Terminal Count */ | ||
120 | wdt_ctr_load(0, 8948); /* Count at 100Hz */ | 129 | wdt_ctr_load(0, 8948); /* Count at 100Hz */ |
121 | wdt_ctr_load(1,wd_heartbeat); /* Heartbeat */ | 130 | wdt_ctr_load(1, wd_heartbeat); /* Heartbeat */ |
122 | wdt_ctr_load(2,65535); /* Length of reset pulse */ | 131 | wdt_ctr_load(2, 65535); /* Length of reset pulse */ |
123 | outb_p(0, WDT_DC); /* Enable watchdog */ | 132 | outb_p(0, WDT_DC); /* Enable watchdog */ |
124 | spin_unlock_irqrestore(&wdt_lock, flags); | 133 | spin_unlock_irqrestore(&wdt_lock, flags); |
125 | return 0; | 134 | return 0; |
@@ -131,13 +140,13 @@ static int wdt_start(void) | |||
131 | * Stop the watchdog driver. | 140 | * Stop the watchdog driver. |
132 | */ | 141 | */ |
133 | 142 | ||
134 | static int wdt_stop (void) | 143 | static int wdt_stop(void) |
135 | { | 144 | { |
136 | unsigned long flags; | 145 | unsigned long flags; |
137 | spin_lock_irqsave(&wdt_lock, flags); | 146 | spin_lock_irqsave(&wdt_lock, flags); |
138 | /* Turn the card off */ | 147 | /* Turn the card off */ |
139 | inb_p(WDT_DC); /* Disable watchdog */ | 148 | inb_p(WDT_DC); /* Disable watchdog */ |
140 | wdt_ctr_load(2,0); /* 0 length reset pulses now */ | 149 | wdt_ctr_load(2, 0); /* 0 length reset pulses now */ |
141 | spin_unlock_irqrestore(&wdt_lock, flags); | 150 | spin_unlock_irqrestore(&wdt_lock, flags); |
142 | return 0; | 151 | return 0; |
143 | } | 152 | } |
@@ -145,8 +154,8 @@ static int wdt_stop (void) | |||
145 | /** | 154 | /** |
146 | * wdt_ping: | 155 | * wdt_ping: |
147 | * | 156 | * |
148 | * Reload counter one with the watchdog heartbeat. We don't bother reloading | 157 | * Reload counter one with the watchdog heartbeat. We don't bother |
149 | * the cascade counter. | 158 | * reloading the cascade counter. |
150 | */ | 159 | */ |
151 | 160 | ||
152 | static int wdt_ping(void) | 161 | static int wdt_ping(void) |
@@ -155,8 +164,9 @@ static int wdt_ping(void) | |||
155 | spin_lock_irqsave(&wdt_lock, flags); | 164 | spin_lock_irqsave(&wdt_lock, flags); |
156 | /* Write a watchdog value */ | 165 | /* Write a watchdog value */ |
157 | inb_p(WDT_DC); /* Disable watchdog */ | 166 | inb_p(WDT_DC); /* Disable watchdog */ |
158 | wdt_ctr_mode(1,2); /* Re-Program CTR1 for Mode 2: Rate Generator */ | 167 | wdt_ctr_mode(1, 2); /* Re-Program CTR1 for Mode 2: |
159 | wdt_ctr_load(1,wd_heartbeat); /* Heartbeat */ | 168 | Rate Generator */ |
169 | wdt_ctr_load(1, wd_heartbeat); /* Heartbeat */ | ||
160 | outb_p(0, WDT_DC); /* Enable watchdog */ | 170 | outb_p(0, WDT_DC); /* Enable watchdog */ |
161 | spin_unlock_irqrestore(&wdt_lock, flags); | 171 | spin_unlock_irqrestore(&wdt_lock, flags); |
162 | return 0; | 172 | return 0; |
@@ -166,13 +176,14 @@ static int wdt_ping(void) | |||
166 | * wdt_set_heartbeat: | 176 | * wdt_set_heartbeat: |
167 | * @t: the new heartbeat value that needs to be set. | 177 | * @t: the new heartbeat value that needs to be set. |
168 | * | 178 | * |
169 | * Set a new heartbeat value for the watchdog device. If the heartbeat value is | 179 | * Set a new heartbeat value for the watchdog device. If the heartbeat |
170 | * incorrect we keep the old value and return -EINVAL. If successfull we | 180 | * value is incorrect we keep the old value and return -EINVAL. If |
171 | * return 0. | 181 | * successful we return 0. |
172 | */ | 182 | */ |
183 | |||
173 | static int wdt_set_heartbeat(int t) | 184 | static int wdt_set_heartbeat(int t) |
174 | { | 185 | { |
175 | if ((t < 1) || (t > 65535)) | 186 | if (t < 1 || t > 65535) |
176 | return -EINVAL; | 187 | return -EINVAL; |
177 | 188 | ||
178 | heartbeat = t; | 189 | heartbeat = t; |
@@ -200,7 +211,7 @@ static int wdt_get_status(int *status) | |||
200 | new_status = inb_p(WDT_SR); | 211 | new_status = inb_p(WDT_SR); |
201 | spin_unlock_irqrestore(&wdt_lock, flags); | 212 | spin_unlock_irqrestore(&wdt_lock, flags); |
202 | 213 | ||
203 | *status=0; | 214 | *status = 0; |
204 | if (new_status & WDC_SR_ISOI0) | 215 | if (new_status & WDC_SR_ISOI0) |
205 | *status |= WDIOF_EXTERN1; | 216 | *status |= WDIOF_EXTERN1; |
206 | if (new_status & WDC_SR_ISII1) | 217 | if (new_status & WDC_SR_ISII1) |
@@ -266,7 +277,7 @@ static irqreturn_t wdt_interrupt(int irq, void *dev_id) | |||
266 | 277 | ||
267 | #ifdef CONFIG_WDT_501 | 278 | #ifdef CONFIG_WDT_501 |
268 | if (!(status & WDC_SR_TGOOD)) | 279 | if (!(status & WDC_SR_TGOOD)) |
269 | printk(KERN_CRIT "Overheat alarm.(%d)\n",inb_p(WDT_RT)); | 280 | printk(KERN_CRIT "Overheat alarm.(%d)\n", inb_p(WDT_RT)); |
270 | if (!(status & WDC_SR_PSUOVER)) | 281 | if (!(status & WDC_SR_PSUOVER)) |
271 | printk(KERN_CRIT "PSU over voltage.\n"); | 282 | printk(KERN_CRIT "PSU over voltage.\n"); |
272 | if (!(status & WDC_SR_PSUUNDR)) | 283 | if (!(status & WDC_SR_PSUUNDR)) |
@@ -304,9 +315,10 @@ static irqreturn_t wdt_interrupt(int irq, void *dev_id) | |||
304 | * write of data will do, as we we don't define content meaning. | 315 | * write of data will do, as we we don't define content meaning. |
305 | */ | 316 | */ |
306 | 317 | ||
307 | static ssize_t wdt_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) | 318 | static ssize_t wdt_write(struct file *file, const char __user *buf, |
319 | size_t count, loff_t *ppos) | ||
308 | { | 320 | { |
309 | if(count) { | 321 | if (count) { |
310 | if (!nowayout) { | 322 | if (!nowayout) { |
311 | size_t i; | 323 | size_t i; |
312 | 324 | ||
@@ -328,7 +340,6 @@ static ssize_t wdt_write(struct file *file, const char __user *buf, size_t count | |||
328 | 340 | ||
329 | /** | 341 | /** |
330 | * wdt_ioctl: | 342 | * wdt_ioctl: |
331 | * @inode: inode of the device | ||
332 | * @file: file handle to the device | 343 | * @file: file handle to the device |
333 | * @cmd: watchdog command | 344 | * @cmd: watchdog command |
334 | * @arg: argument pointer | 345 | * @arg: argument pointer |
@@ -338,8 +349,7 @@ static ssize_t wdt_write(struct file *file, const char __user *buf, size_t count | |||
338 | * querying capabilities and current status. | 349 | * querying capabilities and current status. |
339 | */ | 350 | */ |
340 | 351 | ||
341 | static int wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | 352 | static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
342 | unsigned long arg) | ||
343 | { | 353 | { |
344 | void __user *argp = (void __user *)arg; | 354 | void __user *argp = (void __user *)arg; |
345 | int __user *p = argp; | 355 | int __user *p = argp; |
@@ -362,32 +372,28 @@ static int wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | |||
362 | ident.options |= WDIOF_FANFAULT; | 372 | ident.options |= WDIOF_FANFAULT; |
363 | #endif /* CONFIG_WDT_501 */ | 373 | #endif /* CONFIG_WDT_501 */ |
364 | 374 | ||
365 | switch(cmd) | 375 | switch (cmd) { |
366 | { | 376 | default: |
367 | default: | 377 | return -ENOTTY; |
368 | return -ENOTTY; | 378 | case WDIOC_GETSUPPORT: |
369 | case WDIOC_GETSUPPORT: | 379 | return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0; |
370 | return copy_to_user(argp, &ident, sizeof(ident))?-EFAULT:0; | 380 | case WDIOC_GETSTATUS: |
371 | 381 | wdt_get_status(&status); | |
372 | case WDIOC_GETSTATUS: | 382 | return put_user(status, p); |
373 | wdt_get_status(&status); | 383 | case WDIOC_GETBOOTSTATUS: |
374 | return put_user(status, p); | 384 | return put_user(0, p); |
375 | case WDIOC_GETBOOTSTATUS: | 385 | case WDIOC_KEEPALIVE: |
376 | return put_user(0, p); | 386 | wdt_ping(); |
377 | case WDIOC_KEEPALIVE: | 387 | return 0; |
378 | wdt_ping(); | 388 | case WDIOC_SETTIMEOUT: |
379 | return 0; | 389 | if (get_user(new_heartbeat, p)) |
380 | case WDIOC_SETTIMEOUT: | 390 | return -EFAULT; |
381 | if (get_user(new_heartbeat, p)) | 391 | if (wdt_set_heartbeat(new_heartbeat)) |
382 | return -EFAULT; | 392 | return -EINVAL; |
383 | 393 | wdt_ping(); | |
384 | if (wdt_set_heartbeat(new_heartbeat)) | 394 | /* Fall */ |
385 | return -EINVAL; | 395 | case WDIOC_GETTIMEOUT: |
386 | 396 | return put_user(heartbeat, p); | |
387 | wdt_ping(); | ||
388 | /* Fall */ | ||
389 | case WDIOC_GETTIMEOUT: | ||
390 | return put_user(heartbeat, p); | ||
391 | } | 397 | } |
392 | } | 398 | } |
393 | 399 | ||
@@ -405,7 +411,7 @@ static int wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | |||
405 | 411 | ||
406 | static int wdt_open(struct inode *inode, struct file *file) | 412 | static int wdt_open(struct inode *inode, struct file *file) |
407 | { | 413 | { |
408 | if(test_and_set_bit(0, &wdt_is_open)) | 414 | if (test_and_set_bit(0, &wdt_is_open)) |
409 | return -EBUSY; | 415 | return -EBUSY; |
410 | /* | 416 | /* |
411 | * Activate | 417 | * Activate |
@@ -432,7 +438,8 @@ static int wdt_release(struct inode *inode, struct file *file) | |||
432 | wdt_stop(); | 438 | wdt_stop(); |
433 | clear_bit(0, &wdt_is_open); | 439 | clear_bit(0, &wdt_is_open); |
434 | } else { | 440 | } else { |
435 | printk(KERN_CRIT "wdt: WDT device closed unexpectedly. WDT will not stop!\n"); | 441 | printk(KERN_CRIT |
442 | "wdt: WDT device closed unexpectedly. WDT will not stop!\n"); | ||
436 | wdt_ping(); | 443 | wdt_ping(); |
437 | } | 444 | } |
438 | expect_close = 0; | 445 | expect_close = 0; |
@@ -451,14 +458,15 @@ static int wdt_release(struct inode *inode, struct file *file) | |||
451 | * farenheit. It was designed by an imperial measurement luddite. | 458 | * farenheit. It was designed by an imperial measurement luddite. |
452 | */ | 459 | */ |
453 | 460 | ||
454 | static ssize_t wdt_temp_read(struct file *file, char __user *buf, size_t count, loff_t *ptr) | 461 | static ssize_t wdt_temp_read(struct file *file, char __user *buf, |
462 | size_t count, loff_t *ptr) | ||
455 | { | 463 | { |
456 | int temperature; | 464 | int temperature; |
457 | 465 | ||
458 | if (wdt_get_temperature(&temperature)) | 466 | if (wdt_get_temperature(&temperature)) |
459 | return -EFAULT; | 467 | return -EFAULT; |
460 | 468 | ||
461 | if (copy_to_user (buf, &temperature, 1)) | 469 | if (copy_to_user(buf, &temperature, 1)) |
462 | return -EFAULT; | 470 | return -EFAULT; |
463 | 471 | ||
464 | return 1; | 472 | return 1; |
@@ -506,10 +514,8 @@ static int wdt_temp_release(struct inode *inode, struct file *file) | |||
506 | static int wdt_notify_sys(struct notifier_block *this, unsigned long code, | 514 | static int wdt_notify_sys(struct notifier_block *this, unsigned long code, |
507 | void *unused) | 515 | void *unused) |
508 | { | 516 | { |
509 | if(code==SYS_DOWN || code==SYS_HALT) { | 517 | if (code == SYS_DOWN || code == SYS_HALT) |
510 | /* Turn the card off */ | ||
511 | wdt_stop(); | 518 | wdt_stop(); |
512 | } | ||
513 | return NOTIFY_DONE; | 519 | return NOTIFY_DONE; |
514 | } | 520 | } |
515 | 521 | ||
@@ -522,7 +528,7 @@ static const struct file_operations wdt_fops = { | |||
522 | .owner = THIS_MODULE, | 528 | .owner = THIS_MODULE, |
523 | .llseek = no_llseek, | 529 | .llseek = no_llseek, |
524 | .write = wdt_write, | 530 | .write = wdt_write, |
525 | .ioctl = wdt_ioctl, | 531 | .unlocked_ioctl = wdt_ioctl, |
526 | .open = wdt_open, | 532 | .open = wdt_open, |
527 | .release = wdt_release, | 533 | .release = wdt_release, |
528 | }; | 534 | }; |
@@ -576,7 +582,7 @@ static void __exit wdt_exit(void) | |||
576 | #endif /* CONFIG_WDT_501 */ | 582 | #endif /* CONFIG_WDT_501 */ |
577 | unregister_reboot_notifier(&wdt_notifier); | 583 | unregister_reboot_notifier(&wdt_notifier); |
578 | free_irq(irq, NULL); | 584 | free_irq(irq, NULL); |
579 | release_region(io,8); | 585 | release_region(io, 8); |
580 | } | 586 | } |
581 | 587 | ||
582 | /** | 588 | /** |
@@ -591,44 +597,49 @@ static int __init wdt_init(void) | |||
591 | { | 597 | { |
592 | int ret; | 598 | int ret; |
593 | 599 | ||
594 | /* Check that the heartbeat value is within it's range ; if not reset to the default */ | 600 | /* Check that the heartbeat value is within it's range; |
601 | if not reset to the default */ | ||
595 | if (wdt_set_heartbeat(heartbeat)) { | 602 | if (wdt_set_heartbeat(heartbeat)) { |
596 | wdt_set_heartbeat(WD_TIMO); | 603 | wdt_set_heartbeat(WD_TIMO); |
597 | printk(KERN_INFO "wdt: heartbeat value must be 0<heartbeat<65536, using %d\n", | 604 | printk(KERN_INFO "wdt: heartbeat value must be 0 < heartbeat < 65536, using %d\n", |
598 | WD_TIMO); | 605 | WD_TIMO); |
599 | } | 606 | } |
600 | 607 | ||
601 | if (!request_region(io, 8, "wdt501p")) { | 608 | if (!request_region(io, 8, "wdt501p")) { |
602 | printk(KERN_ERR "wdt: I/O address 0x%04x already in use\n", io); | 609 | printk(KERN_ERR |
610 | "wdt: I/O address 0x%04x already in use\n", io); | ||
603 | ret = -EBUSY; | 611 | ret = -EBUSY; |
604 | goto out; | 612 | goto out; |
605 | } | 613 | } |
606 | 614 | ||
607 | ret = request_irq(irq, wdt_interrupt, IRQF_DISABLED, "wdt501p", NULL); | 615 | ret = request_irq(irq, wdt_interrupt, IRQF_DISABLED, "wdt501p", NULL); |
608 | if(ret) { | 616 | if (ret) { |
609 | printk(KERN_ERR "wdt: IRQ %d is not free.\n", irq); | 617 | printk(KERN_ERR "wdt: IRQ %d is not free.\n", irq); |
610 | goto outreg; | 618 | goto outreg; |
611 | } | 619 | } |
612 | 620 | ||
613 | ret = register_reboot_notifier(&wdt_notifier); | 621 | ret = register_reboot_notifier(&wdt_notifier); |
614 | if(ret) { | 622 | if (ret) { |
615 | printk(KERN_ERR "wdt: cannot register reboot notifier (err=%d)\n", ret); | 623 | printk(KERN_ERR |
624 | "wdt: cannot register reboot notifier (err=%d)\n", ret); | ||
616 | goto outirq; | 625 | goto outirq; |
617 | } | 626 | } |
618 | 627 | ||
619 | #ifdef CONFIG_WDT_501 | 628 | #ifdef CONFIG_WDT_501 |
620 | ret = misc_register(&temp_miscdev); | 629 | ret = misc_register(&temp_miscdev); |
621 | if (ret) { | 630 | if (ret) { |
622 | printk(KERN_ERR "wdt: cannot register miscdev on minor=%d (err=%d)\n", | 631 | printk(KERN_ERR |
623 | TEMP_MINOR, ret); | 632 | "wdt: cannot register miscdev on minor=%d (err=%d)\n", |
633 | TEMP_MINOR, ret); | ||
624 | goto outrbt; | 634 | goto outrbt; |
625 | } | 635 | } |
626 | #endif /* CONFIG_WDT_501 */ | 636 | #endif /* CONFIG_WDT_501 */ |
627 | 637 | ||
628 | ret = misc_register(&wdt_miscdev); | 638 | ret = misc_register(&wdt_miscdev); |
629 | if (ret) { | 639 | if (ret) { |
630 | printk(KERN_ERR "wdt: cannot register miscdev on minor=%d (err=%d)\n", | 640 | printk(KERN_ERR |
631 | WATCHDOG_MINOR, ret); | 641 | "wdt: cannot register miscdev on minor=%d (err=%d)\n", |
642 | WATCHDOG_MINOR, ret); | ||
632 | goto outmisc; | 643 | goto outmisc; |
633 | } | 644 | } |
634 | 645 | ||
@@ -636,7 +647,8 @@ static int __init wdt_init(void) | |||
636 | printk(KERN_INFO "WDT500/501-P driver 0.10 at 0x%04x (Interrupt %d). heartbeat=%d sec (nowayout=%d)\n", | 647 | printk(KERN_INFO "WDT500/501-P driver 0.10 at 0x%04x (Interrupt %d). heartbeat=%d sec (nowayout=%d)\n", |
637 | io, irq, heartbeat, nowayout); | 648 | io, irq, heartbeat, nowayout); |
638 | #ifdef CONFIG_WDT_501 | 649 | #ifdef CONFIG_WDT_501 |
639 | printk(KERN_INFO "wdt: Fan Tachometer is %s\n", (tachometer ? "Enabled" : "Disabled")); | 650 | printk(KERN_INFO "wdt: Fan Tachometer is %s\n", |
651 | (tachometer ? "Enabled" : "Disabled")); | ||
640 | #endif /* CONFIG_WDT_501 */ | 652 | #endif /* CONFIG_WDT_501 */ |
641 | 653 | ||
642 | out: | 654 | out: |
@@ -651,7 +663,7 @@ outrbt: | |||
651 | outirq: | 663 | outirq: |
652 | free_irq(irq, NULL); | 664 | free_irq(irq, NULL); |
653 | outreg: | 665 | outreg: |
654 | release_region(io,8); | 666 | release_region(io, 8); |
655 | goto out; | 667 | goto out; |
656 | } | 668 | } |
657 | 669 | ||
diff --git a/drivers/watchdog/wdt_pci.c b/drivers/watchdog/wdt_pci.c index 1355608683e4..5d922fd6eafc 100644 --- a/drivers/watchdog/wdt_pci.c +++ b/drivers/watchdog/wdt_pci.c | |||
@@ -29,9 +29,11 @@ | |||
29 | * JP Nollmann : Added support for PCI wdt501p | 29 | * JP Nollmann : Added support for PCI wdt501p |
30 | * Alan Cox : Split ISA and PCI cards into two drivers | 30 | * Alan Cox : Split ISA and PCI cards into two drivers |
31 | * Jeff Garzik : PCI cleanups | 31 | * Jeff Garzik : PCI cleanups |
32 | * Tigran Aivazian : Restructured wdtpci_init_one() to handle failures | 32 | * Tigran Aivazian : Restructured wdtpci_init_one() to handle |
33 | * failures | ||
33 | * Joel Becker : Added WDIOC_GET/SETTIMEOUT | 34 | * Joel Becker : Added WDIOC_GET/SETTIMEOUT |
34 | * Zwane Mwaikambo : Magic char closing, locking changes, cleanups | 35 | * Zwane Mwaikambo : Magic char closing, locking changes, |
36 | * cleanups | ||
35 | * Matt Domsch : nowayout module option | 37 | * Matt Domsch : nowayout module option |
36 | */ | 38 | */ |
37 | 39 | ||
@@ -42,14 +44,15 @@ | |||
42 | #include <linux/miscdevice.h> | 44 | #include <linux/miscdevice.h> |
43 | #include <linux/watchdog.h> | 45 | #include <linux/watchdog.h> |
44 | #include <linux/ioport.h> | 46 | #include <linux/ioport.h> |
47 | #include <linux/delay.h> | ||
45 | #include <linux/notifier.h> | 48 | #include <linux/notifier.h> |
46 | #include <linux/reboot.h> | 49 | #include <linux/reboot.h> |
47 | #include <linux/init.h> | 50 | #include <linux/init.h> |
48 | #include <linux/fs.h> | 51 | #include <linux/fs.h> |
49 | #include <linux/pci.h> | 52 | #include <linux/pci.h> |
53 | #include <linux/io.h> | ||
54 | #include <linux/uaccess.h> | ||
50 | 55 | ||
51 | #include <asm/io.h> | ||
52 | #include <asm/uaccess.h> | ||
53 | #include <asm/system.h> | 56 | #include <asm/system.h> |
54 | 57 | ||
55 | #define WDT_IS_PCI | 58 | #define WDT_IS_PCI |
@@ -73,7 +76,7 @@ | |||
73 | /* We can only use 1 card due to the /dev/watchdog restriction */ | 76 | /* We can only use 1 card due to the /dev/watchdog restriction */ |
74 | static int dev_count; | 77 | static int dev_count; |
75 | 78 | ||
76 | static struct semaphore open_sem; | 79 | static unsigned long open_lock; |
77 | static DEFINE_SPINLOCK(wdtpci_lock); | 80 | static DEFINE_SPINLOCK(wdtpci_lock); |
78 | static char expect_close; | 81 | static char expect_close; |
79 | 82 | ||
@@ -86,18 +89,23 @@ static int irq; | |||
86 | static int heartbeat = WD_TIMO; | 89 | static int heartbeat = WD_TIMO; |
87 | static int wd_heartbeat; | 90 | static int wd_heartbeat; |
88 | module_param(heartbeat, int, 0); | 91 | module_param(heartbeat, int, 0); |
89 | MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (0<heartbeat<65536, default=" __MODULE_STRING(WD_TIMO) ")"); | 92 | MODULE_PARM_DESC(heartbeat, |
93 | "Watchdog heartbeat in seconds. (0<heartbeat<65536, default=" | ||
94 | __MODULE_STRING(WD_TIMO) ")"); | ||
90 | 95 | ||
91 | static int nowayout = WATCHDOG_NOWAYOUT; | 96 | static int nowayout = WATCHDOG_NOWAYOUT; |
92 | module_param(nowayout, int, 0); | 97 | module_param(nowayout, int, 0); |
93 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); | 98 | MODULE_PARM_DESC(nowayout, |
99 | "Watchdog cannot be stopped once started (default=" | ||
100 | __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); | ||
94 | 101 | ||
95 | #ifdef CONFIG_WDT_501_PCI | 102 | #ifdef CONFIG_WDT_501_PCI |
96 | /* Support for the Fan Tachometer on the PCI-WDT501 */ | 103 | /* Support for the Fan Tachometer on the PCI-WDT501 */ |
97 | static int tachometer; | 104 | static int tachometer; |
98 | 105 | ||
99 | module_param(tachometer, int, 0); | 106 | module_param(tachometer, int, 0); |
100 | MODULE_PARM_DESC(tachometer, "PCI-WDT501 Fan Tachometer support (0=disable, default=0)"); | 107 | MODULE_PARM_DESC(tachometer, |
108 | "PCI-WDT501 Fan Tachometer support (0=disable, default=0)"); | ||
101 | #endif /* CONFIG_WDT_501_PCI */ | 109 | #endif /* CONFIG_WDT_501_PCI */ |
102 | 110 | ||
103 | /* | 111 | /* |
@@ -106,16 +114,19 @@ MODULE_PARM_DESC(tachometer, "PCI-WDT501 Fan Tachometer support (0=disable, defa | |||
106 | 114 | ||
107 | static void wdtpci_ctr_mode(int ctr, int mode) | 115 | static void wdtpci_ctr_mode(int ctr, int mode) |
108 | { | 116 | { |
109 | ctr<<=6; | 117 | ctr <<= 6; |
110 | ctr|=0x30; | 118 | ctr |= 0x30; |
111 | ctr|=(mode<<1); | 119 | ctr |= (mode << 1); |
112 | outb_p(ctr, WDT_CR); | 120 | outb(ctr, WDT_CR); |
121 | udelay(8); | ||
113 | } | 122 | } |
114 | 123 | ||
115 | static void wdtpci_ctr_load(int ctr, int val) | 124 | static void wdtpci_ctr_load(int ctr, int val) |
116 | { | 125 | { |
117 | outb_p(val&0xFF, WDT_COUNT0+ctr); | 126 | outb(val & 0xFF, WDT_COUNT0 + ctr); |
118 | outb_p(val>>8, WDT_COUNT0+ctr); | 127 | udelay(8); |
128 | outb(val >> 8, WDT_COUNT0 + ctr); | ||
129 | udelay(8); | ||
119 | } | 130 | } |
120 | 131 | ||
121 | /** | 132 | /** |
@@ -134,23 +145,35 @@ static int wdtpci_start(void) | |||
134 | * "pet" the watchdog, as Access says. | 145 | * "pet" the watchdog, as Access says. |
135 | * This resets the clock outputs. | 146 | * This resets the clock outputs. |
136 | */ | 147 | */ |
137 | inb_p(WDT_DC); /* Disable watchdog */ | 148 | inb(WDT_DC); /* Disable watchdog */ |
138 | wdtpci_ctr_mode(2,0); /* Program CTR2 for Mode 0: Pulse on Terminal Count */ | 149 | udelay(8); |
139 | outb_p(0, WDT_DC); /* Enable watchdog */ | 150 | wdtpci_ctr_mode(2, 0); /* Program CTR2 for Mode 0: |
140 | 151 | Pulse on Terminal Count */ | |
141 | inb_p(WDT_DC); /* Disable watchdog */ | 152 | outb(0, WDT_DC); /* Enable watchdog */ |
142 | outb_p(0, WDT_CLOCK); /* 2.0833MHz clock */ | 153 | udelay(8); |
143 | inb_p(WDT_BUZZER); /* disable */ | 154 | inb(WDT_DC); /* Disable watchdog */ |
144 | inb_p(WDT_OPTONOTRST); /* disable */ | 155 | udelay(8); |
145 | inb_p(WDT_OPTORST); /* disable */ | 156 | outb(0, WDT_CLOCK); /* 2.0833MHz clock */ |
146 | inb_p(WDT_PROGOUT); /* disable */ | 157 | udelay(8); |
147 | wdtpci_ctr_mode(0,3); /* Program CTR0 for Mode 3: Square Wave Generator */ | 158 | inb(WDT_BUZZER); /* disable */ |
148 | wdtpci_ctr_mode(1,2); /* Program CTR1 for Mode 2: Rate Generator */ | 159 | udelay(8); |
149 | wdtpci_ctr_mode(2,1); /* Program CTR2 for Mode 1: Retriggerable One-Shot */ | 160 | inb(WDT_OPTONOTRST); /* disable */ |
150 | wdtpci_ctr_load(0,20833); /* count at 100Hz */ | 161 | udelay(8); |
151 | wdtpci_ctr_load(1,wd_heartbeat);/* Heartbeat */ | 162 | inb(WDT_OPTORST); /* disable */ |
163 | udelay(8); | ||
164 | inb(WDT_PROGOUT); /* disable */ | ||
165 | udelay(8); | ||
166 | wdtpci_ctr_mode(0, 3); /* Program CTR0 for Mode 3: | ||
167 | Square Wave Generator */ | ||
168 | wdtpci_ctr_mode(1, 2); /* Program CTR1 for Mode 2: | ||
169 | Rate Generator */ | ||
170 | wdtpci_ctr_mode(2, 1); /* Program CTR2 for Mode 1: | ||
171 | Retriggerable One-Shot */ | ||
172 | wdtpci_ctr_load(0, 20833); /* count at 100Hz */ | ||
173 | wdtpci_ctr_load(1, wd_heartbeat);/* Heartbeat */ | ||
152 | /* DO NOT LOAD CTR2 on PCI card! -- JPN */ | 174 | /* DO NOT LOAD CTR2 on PCI card! -- JPN */ |
153 | outb_p(0, WDT_DC); /* Enable watchdog */ | 175 | outb(0, WDT_DC); /* Enable watchdog */ |
176 | udelay(8); | ||
154 | 177 | ||
155 | spin_unlock_irqrestore(&wdtpci_lock, flags); | 178 | spin_unlock_irqrestore(&wdtpci_lock, flags); |
156 | return 0; | 179 | return 0; |
@@ -162,14 +185,15 @@ static int wdtpci_start(void) | |||
162 | * Stop the watchdog driver. | 185 | * Stop the watchdog driver. |
163 | */ | 186 | */ |
164 | 187 | ||
165 | static int wdtpci_stop (void) | 188 | static int wdtpci_stop(void) |
166 | { | 189 | { |
167 | unsigned long flags; | 190 | unsigned long flags; |
168 | 191 | ||
169 | /* Turn the card off */ | 192 | /* Turn the card off */ |
170 | spin_lock_irqsave(&wdtpci_lock, flags); | 193 | spin_lock_irqsave(&wdtpci_lock, flags); |
171 | inb_p(WDT_DC); /* Disable watchdog */ | 194 | inb(WDT_DC); /* Disable watchdog */ |
172 | wdtpci_ctr_load(2,0); /* 0 length reset pulses now */ | 195 | udelay(8); |
196 | wdtpci_ctr_load(2, 0); /* 0 length reset pulses now */ | ||
173 | spin_unlock_irqrestore(&wdtpci_lock, flags); | 197 | spin_unlock_irqrestore(&wdtpci_lock, flags); |
174 | return 0; | 198 | return 0; |
175 | } | 199 | } |
@@ -177,20 +201,23 @@ static int wdtpci_stop (void) | |||
177 | /** | 201 | /** |
178 | * wdtpci_ping: | 202 | * wdtpci_ping: |
179 | * | 203 | * |
180 | * Reload counter one with the watchdog heartbeat. We don't bother reloading | 204 | * Reload counter one with the watchdog heartbeat. We don't bother |
181 | * the cascade counter. | 205 | * reloading the cascade counter. |
182 | */ | 206 | */ |
183 | 207 | ||
184 | static int wdtpci_ping(void) | 208 | static int wdtpci_ping(void) |
185 | { | 209 | { |
186 | unsigned long flags; | 210 | unsigned long flags; |
187 | 211 | ||
188 | /* Write a watchdog value */ | ||
189 | spin_lock_irqsave(&wdtpci_lock, flags); | 212 | spin_lock_irqsave(&wdtpci_lock, flags); |
190 | inb_p(WDT_DC); /* Disable watchdog */ | 213 | /* Write a watchdog value */ |
191 | wdtpci_ctr_mode(1,2); /* Re-Program CTR1 for Mode 2: Rate Generator */ | 214 | inb(WDT_DC); /* Disable watchdog */ |
192 | wdtpci_ctr_load(1,wd_heartbeat);/* Heartbeat */ | 215 | udelay(8); |
193 | outb_p(0, WDT_DC); /* Enable watchdog */ | 216 | wdtpci_ctr_mode(1, 2); /* Re-Program CTR1 for Mode 2: |
217 | Rate Generator */ | ||
218 | wdtpci_ctr_load(1, wd_heartbeat);/* Heartbeat */ | ||
219 | outb(0, WDT_DC); /* Enable watchdog */ | ||
220 | udelay(8); | ||
194 | spin_unlock_irqrestore(&wdtpci_lock, flags); | 221 | spin_unlock_irqrestore(&wdtpci_lock, flags); |
195 | return 0; | 222 | return 0; |
196 | } | 223 | } |
@@ -199,14 +226,14 @@ static int wdtpci_ping(void) | |||
199 | * wdtpci_set_heartbeat: | 226 | * wdtpci_set_heartbeat: |
200 | * @t: the new heartbeat value that needs to be set. | 227 | * @t: the new heartbeat value that needs to be set. |
201 | * | 228 | * |
202 | * Set a new heartbeat value for the watchdog device. If the heartbeat value is | 229 | * Set a new heartbeat value for the watchdog device. If the heartbeat |
203 | * incorrect we keep the old value and return -EINVAL. If successfull we | 230 | * value is incorrect we keep the old value and return -EINVAL. |
204 | * return 0. | 231 | * If successful we return 0. |
205 | */ | 232 | */ |
206 | static int wdtpci_set_heartbeat(int t) | 233 | static int wdtpci_set_heartbeat(int t) |
207 | { | 234 | { |
208 | /* Arbitrary, can't find the card's limits */ | 235 | /* Arbitrary, can't find the card's limits */ |
209 | if ((t < 1) || (t > 65535)) | 236 | if (t < 1 || t > 65535) |
210 | return -EINVAL; | 237 | return -EINVAL; |
211 | 238 | ||
212 | heartbeat = t; | 239 | heartbeat = t; |
@@ -227,9 +254,14 @@ static int wdtpci_set_heartbeat(int t) | |||
227 | 254 | ||
228 | static int wdtpci_get_status(int *status) | 255 | static int wdtpci_get_status(int *status) |
229 | { | 256 | { |
230 | unsigned char new_status=inb_p(WDT_SR); | 257 | unsigned char new_status; |
258 | unsigned long flags; | ||
259 | |||
260 | spin_lock_irqsave(&wdtpci_lock, flags); | ||
261 | new_status = inb(WDT_SR); | ||
262 | spin_unlock_irqrestore(&wdtpci_lock, flags); | ||
231 | 263 | ||
232 | *status=0; | 264 | *status = 0; |
233 | if (new_status & WDC_SR_ISOI0) | 265 | if (new_status & WDC_SR_ISOI0) |
234 | *status |= WDIOF_EXTERN1; | 266 | *status |= WDIOF_EXTERN1; |
235 | if (new_status & WDC_SR_ISII1) | 267 | if (new_status & WDC_SR_ISII1) |
@@ -259,8 +291,12 @@ static int wdtpci_get_status(int *status) | |||
259 | 291 | ||
260 | static int wdtpci_get_temperature(int *temperature) | 292 | static int wdtpci_get_temperature(int *temperature) |
261 | { | 293 | { |
262 | unsigned short c=inb_p(WDT_RT); | 294 | unsigned short c; |
263 | 295 | unsigned long flags; | |
296 | spin_lock_irqsave(&wdtpci_lock, flags); | ||
297 | c = inb(WDT_RT); | ||
298 | udelay(8); | ||
299 | spin_unlock_irqrestore(&wdtpci_lock, flags); | ||
264 | *temperature = (c * 11 / 15) + 7; | 300 | *temperature = (c * 11 / 15) + 7; |
265 | return 0; | 301 | return 0; |
266 | } | 302 | } |
@@ -282,17 +318,25 @@ static irqreturn_t wdtpci_interrupt(int irq, void *dev_id) | |||
282 | * Read the status register see what is up and | 318 | * Read the status register see what is up and |
283 | * then printk it. | 319 | * then printk it. |
284 | */ | 320 | */ |
285 | unsigned char status=inb_p(WDT_SR); | 321 | unsigned char status; |
322 | |||
323 | spin_lock(&wdtpci_lock); | ||
324 | |||
325 | status = inb(WDT_SR); | ||
326 | udelay(8); | ||
286 | 327 | ||
287 | printk(KERN_CRIT PFX "status %d\n", status); | 328 | printk(KERN_CRIT PFX "status %d\n", status); |
288 | 329 | ||
289 | #ifdef CONFIG_WDT_501_PCI | 330 | #ifdef CONFIG_WDT_501_PCI |
290 | if (!(status & WDC_SR_TGOOD)) | 331 | if (!(status & WDC_SR_TGOOD)) { |
291 | printk(KERN_CRIT PFX "Overheat alarm.(%d)\n",inb_p(WDT_RT)); | 332 | u8 alarm = inb(WDT_RT); |
333 | printk(KERN_CRIT PFX "Overheat alarm.(%d)\n", alarm); | ||
334 | udelay(8); | ||
335 | } | ||
292 | if (!(status & WDC_SR_PSUOVER)) | 336 | if (!(status & WDC_SR_PSUOVER)) |
293 | printk(KERN_CRIT PFX "PSU over voltage.\n"); | 337 | printk(KERN_CRIT PFX "PSU over voltage.\n"); |
294 | if (!(status & WDC_SR_PSUUNDR)) | 338 | if (!(status & WDC_SR_PSUUNDR)) |
295 | printk(KERN_CRIT PFX "PSU under voltage.\n"); | 339 | printk(KERN_CRIT PFX "PSU under voltage.\n"); |
296 | if (tachometer) { | 340 | if (tachometer) { |
297 | if (!(status & WDC_SR_FANGOOD)) | 341 | if (!(status & WDC_SR_FANGOOD)) |
298 | printk(KERN_CRIT PFX "Possible fan fault.\n"); | 342 | printk(KERN_CRIT PFX "Possible fan fault.\n"); |
@@ -310,6 +354,7 @@ static irqreturn_t wdtpci_interrupt(int irq, void *dev_id) | |||
310 | printk(KERN_CRIT PFX "Reset in 5ms.\n"); | 354 | printk(KERN_CRIT PFX "Reset in 5ms.\n"); |
311 | #endif | 355 | #endif |
312 | } | 356 | } |
357 | spin_unlock(&wdtpci_lock); | ||
313 | return IRQ_HANDLED; | 358 | return IRQ_HANDLED; |
314 | } | 359 | } |
315 | 360 | ||
@@ -325,7 +370,8 @@ static irqreturn_t wdtpci_interrupt(int irq, void *dev_id) | |||
325 | * write of data will do, as we we don't define content meaning. | 370 | * write of data will do, as we we don't define content meaning. |
326 | */ | 371 | */ |
327 | 372 | ||
328 | static ssize_t wdtpci_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) | 373 | static ssize_t wdtpci_write(struct file *file, const char __user *buf, |
374 | size_t count, loff_t *ppos) | ||
329 | { | 375 | { |
330 | if (count) { | 376 | if (count) { |
331 | if (!nowayout) { | 377 | if (!nowayout) { |
@@ -335,7 +381,7 @@ static ssize_t wdtpci_write(struct file *file, const char __user *buf, size_t co | |||
335 | 381 | ||
336 | for (i = 0; i != count; i++) { | 382 | for (i = 0; i != count; i++) { |
337 | char c; | 383 | char c; |
338 | if(get_user(c, buf+i)) | 384 | if (get_user(c, buf+i)) |
339 | return -EFAULT; | 385 | return -EFAULT; |
340 | if (c == 'V') | 386 | if (c == 'V') |
341 | expect_close = 42; | 387 | expect_close = 42; |
@@ -343,13 +389,11 @@ static ssize_t wdtpci_write(struct file *file, const char __user *buf, size_t co | |||
343 | } | 389 | } |
344 | wdtpci_ping(); | 390 | wdtpci_ping(); |
345 | } | 391 | } |
346 | |||
347 | return count; | 392 | return count; |
348 | } | 393 | } |
349 | 394 | ||
350 | /** | 395 | /** |
351 | * wdtpci_ioctl: | 396 | * wdtpci_ioctl: |
352 | * @inode: inode of the device | ||
353 | * @file: file handle to the device | 397 | * @file: file handle to the device |
354 | * @cmd: watchdog command | 398 | * @cmd: watchdog command |
355 | * @arg: argument pointer | 399 | * @arg: argument pointer |
@@ -359,8 +403,8 @@ static ssize_t wdtpci_write(struct file *file, const char __user *buf, size_t co | |||
359 | * querying capabilities and current status. | 403 | * querying capabilities and current status. |
360 | */ | 404 | */ |
361 | 405 | ||
362 | static int wdtpci_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | 406 | static long wdtpci_ioctl(struct file *file, unsigned int cmd, |
363 | unsigned long arg) | 407 | unsigned long arg) |
364 | { | 408 | { |
365 | int new_heartbeat; | 409 | int new_heartbeat; |
366 | int status; | 410 | int status; |
@@ -383,33 +427,29 @@ static int wdtpci_ioctl(struct inode *inode, struct file *file, unsigned int cmd | |||
383 | ident.options |= WDIOF_FANFAULT; | 427 | ident.options |= WDIOF_FANFAULT; |
384 | #endif /* CONFIG_WDT_501_PCI */ | 428 | #endif /* CONFIG_WDT_501_PCI */ |
385 | 429 | ||
386 | switch(cmd) | 430 | switch (cmd) { |
387 | { | 431 | default: |
388 | default: | 432 | return -ENOTTY; |
389 | return -ENOTTY; | 433 | case WDIOC_GETSUPPORT: |
390 | case WDIOC_GETSUPPORT: | 434 | return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0; |
391 | return copy_to_user(argp, &ident, sizeof(ident))?-EFAULT:0; | 435 | case WDIOC_GETSTATUS: |
392 | 436 | wdtpci_get_status(&status); | |
393 | case WDIOC_GETSTATUS: | 437 | return put_user(status, p); |
394 | wdtpci_get_status(&status); | 438 | case WDIOC_GETBOOTSTATUS: |
395 | return put_user(status, p); | 439 | return put_user(0, p); |
396 | case WDIOC_GETBOOTSTATUS: | 440 | case WDIOC_KEEPALIVE: |
397 | return put_user(0, p); | 441 | wdtpci_ping(); |
398 | case WDIOC_KEEPALIVE: | 442 | return 0; |
399 | wdtpci_ping(); | 443 | case WDIOC_SETTIMEOUT: |
400 | return 0; | 444 | if (get_user(new_heartbeat, p)) |
401 | case WDIOC_SETTIMEOUT: | 445 | return -EFAULT; |
402 | if (get_user(new_heartbeat, p)) | 446 | if (wdtpci_set_heartbeat(new_heartbeat)) |
403 | return -EFAULT; | 447 | return -EINVAL; |
404 | 448 | wdtpci_ping(); | |
405 | if (wdtpci_set_heartbeat(new_heartbeat)) | 449 | /* Fall */ |
406 | return -EINVAL; | 450 | case WDIOC_GETTIMEOUT: |
407 | 451 | return put_user(heartbeat, p); | |
408 | wdtpci_ping(); | 452 | } |
409 | /* Fall */ | ||
410 | case WDIOC_GETTIMEOUT: | ||
411 | return put_user(heartbeat, p); | ||
412 | } | ||
413 | } | 453 | } |
414 | 454 | ||
415 | /** | 455 | /** |
@@ -426,12 +466,11 @@ static int wdtpci_ioctl(struct inode *inode, struct file *file, unsigned int cmd | |||
426 | 466 | ||
427 | static int wdtpci_open(struct inode *inode, struct file *file) | 467 | static int wdtpci_open(struct inode *inode, struct file *file) |
428 | { | 468 | { |
429 | if (down_trylock(&open_sem)) | 469 | if (test_and_set_bit(0, &open_lock)) |
430 | return -EBUSY; | 470 | return -EBUSY; |
431 | 471 | ||
432 | if (nowayout) { | 472 | if (nowayout) |
433 | __module_get(THIS_MODULE); | 473 | __module_get(THIS_MODULE); |
434 | } | ||
435 | /* | 474 | /* |
436 | * Activate | 475 | * Activate |
437 | */ | 476 | */ |
@@ -460,7 +499,7 @@ static int wdtpci_release(struct inode *inode, struct file *file) | |||
460 | wdtpci_ping(); | 499 | wdtpci_ping(); |
461 | } | 500 | } |
462 | expect_close = 0; | 501 | expect_close = 0; |
463 | up(&open_sem); | 502 | clear_bit(0, &open_lock); |
464 | return 0; | 503 | return 0; |
465 | } | 504 | } |
466 | 505 | ||
@@ -476,14 +515,15 @@ static int wdtpci_release(struct inode *inode, struct file *file) | |||
476 | * fahrenheit. It was designed by an imperial measurement luddite. | 515 | * fahrenheit. It was designed by an imperial measurement luddite. |
477 | */ | 516 | */ |
478 | 517 | ||
479 | static ssize_t wdtpci_temp_read(struct file *file, char __user *buf, size_t count, loff_t *ptr) | 518 | static ssize_t wdtpci_temp_read(struct file *file, char __user *buf, |
519 | size_t count, loff_t *ptr) | ||
480 | { | 520 | { |
481 | int temperature; | 521 | int temperature; |
482 | 522 | ||
483 | if (wdtpci_get_temperature(&temperature)) | 523 | if (wdtpci_get_temperature(&temperature)) |
484 | return -EFAULT; | 524 | return -EFAULT; |
485 | 525 | ||
486 | if (copy_to_user (buf, &temperature, 1)) | 526 | if (copy_to_user(buf, &temperature, 1)) |
487 | return -EFAULT; | 527 | return -EFAULT; |
488 | 528 | ||
489 | return 1; | 529 | return 1; |
@@ -529,12 +569,10 @@ static int wdtpci_temp_release(struct inode *inode, struct file *file) | |||
529 | */ | 569 | */ |
530 | 570 | ||
531 | static int wdtpci_notify_sys(struct notifier_block *this, unsigned long code, | 571 | static int wdtpci_notify_sys(struct notifier_block *this, unsigned long code, |
532 | void *unused) | 572 | void *unused) |
533 | { | 573 | { |
534 | if (code==SYS_DOWN || code==SYS_HALT) { | 574 | if (code == SYS_DOWN || code == SYS_HALT) |
535 | /* Turn the card off */ | ||
536 | wdtpci_stop(); | 575 | wdtpci_stop(); |
537 | } | ||
538 | return NOTIFY_DONE; | 576 | return NOTIFY_DONE; |
539 | } | 577 | } |
540 | 578 | ||
@@ -547,7 +585,7 @@ static const struct file_operations wdtpci_fops = { | |||
547 | .owner = THIS_MODULE, | 585 | .owner = THIS_MODULE, |
548 | .llseek = no_llseek, | 586 | .llseek = no_llseek, |
549 | .write = wdtpci_write, | 587 | .write = wdtpci_write, |
550 | .ioctl = wdtpci_ioctl, | 588 | .unlocked_ioctl = wdtpci_ioctl, |
551 | .open = wdtpci_open, | 589 | .open = wdtpci_open, |
552 | .release = wdtpci_release, | 590 | .release = wdtpci_release, |
553 | }; | 591 | }; |
@@ -584,80 +622,85 @@ static struct notifier_block wdtpci_notifier = { | |||
584 | }; | 622 | }; |
585 | 623 | ||
586 | 624 | ||
587 | static int __devinit wdtpci_init_one (struct pci_dev *dev, | 625 | static int __devinit wdtpci_init_one(struct pci_dev *dev, |
588 | const struct pci_device_id *ent) | 626 | const struct pci_device_id *ent) |
589 | { | 627 | { |
590 | int ret = -EIO; | 628 | int ret = -EIO; |
591 | 629 | ||
592 | dev_count++; | 630 | dev_count++; |
593 | if (dev_count > 1) { | 631 | if (dev_count > 1) { |
594 | printk (KERN_ERR PFX "this driver only supports 1 device\n"); | 632 | printk(KERN_ERR PFX "This driver only supports one device\n"); |
595 | return -ENODEV; | 633 | return -ENODEV; |
596 | } | 634 | } |
597 | 635 | ||
598 | if (pci_enable_device (dev)) { | 636 | if (pci_enable_device(dev)) { |
599 | printk (KERN_ERR PFX "Not possible to enable PCI Device\n"); | 637 | printk(KERN_ERR PFX "Not possible to enable PCI Device\n"); |
600 | return -ENODEV; | 638 | return -ENODEV; |
601 | } | 639 | } |
602 | 640 | ||
603 | if (pci_resource_start (dev, 2) == 0x0000) { | 641 | if (pci_resource_start(dev, 2) == 0x0000) { |
604 | printk (KERN_ERR PFX "No I/O-Address for card detected\n"); | 642 | printk(KERN_ERR PFX "No I/O-Address for card detected\n"); |
605 | ret = -ENODEV; | 643 | ret = -ENODEV; |
606 | goto out_pci; | 644 | goto out_pci; |
607 | } | 645 | } |
608 | 646 | ||
609 | sema_init(&open_sem, 1); | ||
610 | |||
611 | irq = dev->irq; | 647 | irq = dev->irq; |
612 | io = pci_resource_start (dev, 2); | 648 | io = pci_resource_start(dev, 2); |
613 | 649 | ||
614 | if (request_region (io, 16, "wdt_pci") == NULL) { | 650 | if (request_region(io, 16, "wdt_pci") == NULL) { |
615 | printk (KERN_ERR PFX "I/O address 0x%04x already in use\n", io); | 651 | printk(KERN_ERR PFX "I/O address 0x%04x already in use\n", io); |
616 | goto out_pci; | 652 | goto out_pci; |
617 | } | 653 | } |
618 | 654 | ||
619 | if (request_irq (irq, wdtpci_interrupt, IRQF_DISABLED | IRQF_SHARED, | 655 | if (request_irq(irq, wdtpci_interrupt, IRQF_DISABLED | IRQF_SHARED, |
620 | "wdt_pci", &wdtpci_miscdev)) { | 656 | "wdt_pci", &wdtpci_miscdev)) { |
621 | printk (KERN_ERR PFX "IRQ %d is not free\n", irq); | 657 | printk(KERN_ERR PFX "IRQ %d is not free\n", irq); |
622 | goto out_reg; | 658 | goto out_reg; |
623 | } | 659 | } |
624 | 660 | ||
625 | printk ("PCI-WDT500/501 (PCI-WDG-CSM) driver 0.10 at 0x%04x (Interrupt %d)\n", | 661 | printk(KERN_INFO |
626 | io, irq); | 662 | "PCI-WDT500/501 (PCI-WDG-CSM) driver 0.10 at 0x%04x (Interrupt %d)\n", |
663 | io, irq); | ||
627 | 664 | ||
628 | /* Check that the heartbeat value is within it's range ; if not reset to the default */ | 665 | /* Check that the heartbeat value is within its range; |
666 | if not reset to the default */ | ||
629 | if (wdtpci_set_heartbeat(heartbeat)) { | 667 | if (wdtpci_set_heartbeat(heartbeat)) { |
630 | wdtpci_set_heartbeat(WD_TIMO); | 668 | wdtpci_set_heartbeat(WD_TIMO); |
631 | printk(KERN_INFO PFX "heartbeat value must be 0<heartbeat<65536, using %d\n", | 669 | printk(KERN_INFO PFX |
632 | WD_TIMO); | 670 | "heartbeat value must be 0 < heartbeat < 65536, using %d\n", |
671 | WD_TIMO); | ||
633 | } | 672 | } |
634 | 673 | ||
635 | ret = register_reboot_notifier (&wdtpci_notifier); | 674 | ret = register_reboot_notifier(&wdtpci_notifier); |
636 | if (ret) { | 675 | if (ret) { |
637 | printk (KERN_ERR PFX "cannot register reboot notifier (err=%d)\n", ret); | 676 | printk(KERN_ERR PFX |
677 | "cannot register reboot notifier (err=%d)\n", ret); | ||
638 | goto out_irq; | 678 | goto out_irq; |
639 | } | 679 | } |
640 | 680 | ||
641 | #ifdef CONFIG_WDT_501_PCI | 681 | #ifdef CONFIG_WDT_501_PCI |
642 | ret = misc_register (&temp_miscdev); | 682 | ret = misc_register(&temp_miscdev); |
643 | if (ret) { | 683 | if (ret) { |
644 | printk (KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n", | 684 | printk(KERN_ERR PFX |
645 | TEMP_MINOR, ret); | 685 | "cannot register miscdev on minor=%d (err=%d)\n", |
686 | TEMP_MINOR, ret); | ||
646 | goto out_rbt; | 687 | goto out_rbt; |
647 | } | 688 | } |
648 | #endif /* CONFIG_WDT_501_PCI */ | 689 | #endif /* CONFIG_WDT_501_PCI */ |
649 | 690 | ||
650 | ret = misc_register (&wdtpci_miscdev); | 691 | ret = misc_register(&wdtpci_miscdev); |
651 | if (ret) { | 692 | if (ret) { |
652 | printk (KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n", | 693 | printk(KERN_ERR PFX |
653 | WATCHDOG_MINOR, ret); | 694 | "cannot register miscdev on minor=%d (err=%d)\n", |
695 | WATCHDOG_MINOR, ret); | ||
654 | goto out_misc; | 696 | goto out_misc; |
655 | } | 697 | } |
656 | 698 | ||
657 | printk(KERN_INFO PFX "initialized. heartbeat=%d sec (nowayout=%d)\n", | 699 | printk(KERN_INFO PFX "initialized. heartbeat=%d sec (nowayout=%d)\n", |
658 | heartbeat, nowayout); | 700 | heartbeat, nowayout); |
659 | #ifdef CONFIG_WDT_501_PCI | 701 | #ifdef CONFIG_WDT_501_PCI |
660 | printk(KERN_INFO "wdt: Fan Tachometer is %s\n", (tachometer ? "Enabled" : "Disabled")); | 702 | printk(KERN_INFO "wdt: Fan Tachometer is %s\n", |
703 | (tachometer ? "Enabled" : "Disabled")); | ||
661 | #endif /* CONFIG_WDT_501_PCI */ | 704 | #endif /* CONFIG_WDT_501_PCI */ |
662 | 705 | ||
663 | ret = 0; | 706 | ret = 0; |
@@ -673,14 +716,14 @@ out_rbt: | |||
673 | out_irq: | 716 | out_irq: |
674 | free_irq(irq, &wdtpci_miscdev); | 717 | free_irq(irq, &wdtpci_miscdev); |
675 | out_reg: | 718 | out_reg: |
676 | release_region (io, 16); | 719 | release_region(io, 16); |
677 | out_pci: | 720 | out_pci: |
678 | pci_disable_device(dev); | 721 | pci_disable_device(dev); |
679 | goto out; | 722 | goto out; |
680 | } | 723 | } |
681 | 724 | ||
682 | 725 | ||
683 | static void __devexit wdtpci_remove_one (struct pci_dev *pdev) | 726 | static void __devexit wdtpci_remove_one(struct pci_dev *pdev) |
684 | { | 727 | { |
685 | /* here we assume only one device will ever have | 728 | /* here we assume only one device will ever have |
686 | * been picked up and registered by probe function */ | 729 | * been picked up and registered by probe function */ |
@@ -728,7 +771,7 @@ static struct pci_driver wdtpci_driver = { | |||
728 | 771 | ||
729 | static void __exit wdtpci_cleanup(void) | 772 | static void __exit wdtpci_cleanup(void) |
730 | { | 773 | { |
731 | pci_unregister_driver (&wdtpci_driver); | 774 | pci_unregister_driver(&wdtpci_driver); |
732 | } | 775 | } |
733 | 776 | ||
734 | 777 | ||
@@ -742,7 +785,7 @@ static void __exit wdtpci_cleanup(void) | |||
742 | 785 | ||
743 | static int __init wdtpci_init(void) | 786 | static int __init wdtpci_init(void) |
744 | { | 787 | { |
745 | return pci_register_driver (&wdtpci_driver); | 788 | return pci_register_driver(&wdtpci_driver); |
746 | } | 789 | } |
747 | 790 | ||
748 | 791 | ||
diff --git a/firmware/ihex2fw.c b/firmware/ihex2fw.c index 660b191ed75e..8f7fdaa9e010 100644 --- a/firmware/ihex2fw.c +++ b/firmware/ihex2fw.c | |||
@@ -250,19 +250,19 @@ static void file_record(struct ihex_binrec *record) | |||
250 | 250 | ||
251 | static int output_records(int outfd) | 251 | static int output_records(int outfd) |
252 | { | 252 | { |
253 | unsigned char zeroes[5] = {0, 0, 0, 0, 0}; | 253 | unsigned char zeroes[6] = {0, 0, 0, 0, 0, 0}; |
254 | struct ihex_binrec *p = records; | 254 | struct ihex_binrec *p = records; |
255 | 255 | ||
256 | while (p) { | 256 | while (p) { |
257 | uint16_t writelen = (p->len + 9) & ~3; | 257 | uint16_t writelen = (p->len + 9) & ~3; |
258 | 258 | ||
259 | p->addr = htonl(p->addr); | 259 | p->addr = htonl(p->addr); |
260 | p->len = htonl(p->len); | 260 | p->len = htons(p->len); |
261 | write(outfd, &p->addr, writelen); | 261 | write(outfd, &p->addr, writelen); |
262 | p = p->next; | 262 | p = p->next; |
263 | } | 263 | } |
264 | /* EOF record is zero length, since we don't bother to represent | 264 | /* EOF record is zero length, since we don't bother to represent |
265 | the type field in the binary version */ | 265 | the type field in the binary version */ |
266 | write(outfd, zeroes, 5); | 266 | write(outfd, zeroes, 6); |
267 | return 0; | 267 | return 0; |
268 | } | 268 | } |
diff --git a/fs/ext4/acl.c b/fs/ext4/acl.c index c7d04e165446..694ed6fadcc8 100644 --- a/fs/ext4/acl.c +++ b/fs/ext4/acl.c | |||
@@ -40,34 +40,35 @@ ext4_acl_from_disk(const void *value, size_t size) | |||
40 | acl = posix_acl_alloc(count, GFP_NOFS); | 40 | acl = posix_acl_alloc(count, GFP_NOFS); |
41 | if (!acl) | 41 | if (!acl) |
42 | return ERR_PTR(-ENOMEM); | 42 | return ERR_PTR(-ENOMEM); |
43 | for (n=0; n < count; n++) { | 43 | for (n = 0; n < count; n++) { |
44 | ext4_acl_entry *entry = | 44 | ext4_acl_entry *entry = |
45 | (ext4_acl_entry *)value; | 45 | (ext4_acl_entry *)value; |
46 | if ((char *)value + sizeof(ext4_acl_entry_short) > end) | 46 | if ((char *)value + sizeof(ext4_acl_entry_short) > end) |
47 | goto fail; | 47 | goto fail; |
48 | acl->a_entries[n].e_tag = le16_to_cpu(entry->e_tag); | 48 | acl->a_entries[n].e_tag = le16_to_cpu(entry->e_tag); |
49 | acl->a_entries[n].e_perm = le16_to_cpu(entry->e_perm); | 49 | acl->a_entries[n].e_perm = le16_to_cpu(entry->e_perm); |
50 | switch(acl->a_entries[n].e_tag) { | 50 | |
51 | case ACL_USER_OBJ: | 51 | switch (acl->a_entries[n].e_tag) { |
52 | case ACL_GROUP_OBJ: | 52 | case ACL_USER_OBJ: |
53 | case ACL_MASK: | 53 | case ACL_GROUP_OBJ: |
54 | case ACL_OTHER: | 54 | case ACL_MASK: |
55 | value = (char *)value + | 55 | case ACL_OTHER: |
56 | sizeof(ext4_acl_entry_short); | 56 | value = (char *)value + |
57 | acl->a_entries[n].e_id = ACL_UNDEFINED_ID; | 57 | sizeof(ext4_acl_entry_short); |
58 | break; | 58 | acl->a_entries[n].e_id = ACL_UNDEFINED_ID; |
59 | 59 | break; | |
60 | case ACL_USER: | 60 | |
61 | case ACL_GROUP: | 61 | case ACL_USER: |
62 | value = (char *)value + sizeof(ext4_acl_entry); | 62 | case ACL_GROUP: |
63 | if ((char *)value > end) | 63 | value = (char *)value + sizeof(ext4_acl_entry); |
64 | goto fail; | 64 | if ((char *)value > end) |
65 | acl->a_entries[n].e_id = | ||
66 | le32_to_cpu(entry->e_id); | ||
67 | break; | ||
68 | |||
69 | default: | ||
70 | goto fail; | 65 | goto fail; |
66 | acl->a_entries[n].e_id = | ||
67 | le32_to_cpu(entry->e_id); | ||
68 | break; | ||
69 | |||
70 | default: | ||
71 | goto fail; | ||
71 | } | 72 | } |
72 | } | 73 | } |
73 | if (value != end) | 74 | if (value != end) |
@@ -96,27 +97,26 @@ ext4_acl_to_disk(const struct posix_acl *acl, size_t *size) | |||
96 | return ERR_PTR(-ENOMEM); | 97 | return ERR_PTR(-ENOMEM); |
97 | ext_acl->a_version = cpu_to_le32(EXT4_ACL_VERSION); | 98 | ext_acl->a_version = cpu_to_le32(EXT4_ACL_VERSION); |
98 | e = (char *)ext_acl + sizeof(ext4_acl_header); | 99 | e = (char *)ext_acl + sizeof(ext4_acl_header); |
99 | for (n=0; n < acl->a_count; n++) { | 100 | for (n = 0; n < acl->a_count; n++) { |
100 | ext4_acl_entry *entry = (ext4_acl_entry *)e; | 101 | ext4_acl_entry *entry = (ext4_acl_entry *)e; |
101 | entry->e_tag = cpu_to_le16(acl->a_entries[n].e_tag); | 102 | entry->e_tag = cpu_to_le16(acl->a_entries[n].e_tag); |
102 | entry->e_perm = cpu_to_le16(acl->a_entries[n].e_perm); | 103 | entry->e_perm = cpu_to_le16(acl->a_entries[n].e_perm); |
103 | switch(acl->a_entries[n].e_tag) { | 104 | switch (acl->a_entries[n].e_tag) { |
104 | case ACL_USER: | 105 | case ACL_USER: |
105 | case ACL_GROUP: | 106 | case ACL_GROUP: |
106 | entry->e_id = | 107 | entry->e_id = cpu_to_le32(acl->a_entries[n].e_id); |
107 | cpu_to_le32(acl->a_entries[n].e_id); | 108 | e += sizeof(ext4_acl_entry); |
108 | e += sizeof(ext4_acl_entry); | 109 | break; |
109 | break; | 110 | |
110 | 111 | case ACL_USER_OBJ: | |
111 | case ACL_USER_OBJ: | 112 | case ACL_GROUP_OBJ: |
112 | case ACL_GROUP_OBJ: | 113 | case ACL_MASK: |
113 | case ACL_MASK: | 114 | case ACL_OTHER: |
114 | case ACL_OTHER: | 115 | e += sizeof(ext4_acl_entry_short); |
115 | e += sizeof(ext4_acl_entry_short); | 116 | break; |
116 | break; | 117 | |
117 | 118 | default: | |
118 | default: | 119 | goto fail; |
119 | goto fail; | ||
120 | } | 120 | } |
121 | } | 121 | } |
122 | return (char *)ext_acl; | 122 | return (char *)ext_acl; |
@@ -167,23 +167,23 @@ ext4_get_acl(struct inode *inode, int type) | |||
167 | if (!test_opt(inode->i_sb, POSIX_ACL)) | 167 | if (!test_opt(inode->i_sb, POSIX_ACL)) |
168 | return NULL; | 168 | return NULL; |
169 | 169 | ||
170 | switch(type) { | 170 | switch (type) { |
171 | case ACL_TYPE_ACCESS: | 171 | case ACL_TYPE_ACCESS: |
172 | acl = ext4_iget_acl(inode, &ei->i_acl); | 172 | acl = ext4_iget_acl(inode, &ei->i_acl); |
173 | if (acl != EXT4_ACL_NOT_CACHED) | 173 | if (acl != EXT4_ACL_NOT_CACHED) |
174 | return acl; | 174 | return acl; |
175 | name_index = EXT4_XATTR_INDEX_POSIX_ACL_ACCESS; | 175 | name_index = EXT4_XATTR_INDEX_POSIX_ACL_ACCESS; |
176 | break; | 176 | break; |
177 | 177 | ||
178 | case ACL_TYPE_DEFAULT: | 178 | case ACL_TYPE_DEFAULT: |
179 | acl = ext4_iget_acl(inode, &ei->i_default_acl); | 179 | acl = ext4_iget_acl(inode, &ei->i_default_acl); |
180 | if (acl != EXT4_ACL_NOT_CACHED) | 180 | if (acl != EXT4_ACL_NOT_CACHED) |
181 | return acl; | 181 | return acl; |
182 | name_index = EXT4_XATTR_INDEX_POSIX_ACL_DEFAULT; | 182 | name_index = EXT4_XATTR_INDEX_POSIX_ACL_DEFAULT; |
183 | break; | 183 | break; |
184 | 184 | ||
185 | default: | 185 | default: |
186 | return ERR_PTR(-EINVAL); | 186 | return ERR_PTR(-EINVAL); |
187 | } | 187 | } |
188 | retval = ext4_xattr_get(inode, name_index, "", NULL, 0); | 188 | retval = ext4_xattr_get(inode, name_index, "", NULL, 0); |
189 | if (retval > 0) { | 189 | if (retval > 0) { |
@@ -201,14 +201,14 @@ ext4_get_acl(struct inode *inode, int type) | |||
201 | kfree(value); | 201 | kfree(value); |
202 | 202 | ||
203 | if (!IS_ERR(acl)) { | 203 | if (!IS_ERR(acl)) { |
204 | switch(type) { | 204 | switch (type) { |
205 | case ACL_TYPE_ACCESS: | 205 | case ACL_TYPE_ACCESS: |
206 | ext4_iset_acl(inode, &ei->i_acl, acl); | 206 | ext4_iset_acl(inode, &ei->i_acl, acl); |
207 | break; | 207 | break; |
208 | 208 | ||
209 | case ACL_TYPE_DEFAULT: | 209 | case ACL_TYPE_DEFAULT: |
210 | ext4_iset_acl(inode, &ei->i_default_acl, acl); | 210 | ext4_iset_acl(inode, &ei->i_default_acl, acl); |
211 | break; | 211 | break; |
212 | } | 212 | } |
213 | } | 213 | } |
214 | return acl; | 214 | return acl; |
@@ -232,31 +232,31 @@ ext4_set_acl(handle_t *handle, struct inode *inode, int type, | |||
232 | if (S_ISLNK(inode->i_mode)) | 232 | if (S_ISLNK(inode->i_mode)) |
233 | return -EOPNOTSUPP; | 233 | return -EOPNOTSUPP; |
234 | 234 | ||
235 | switch(type) { | 235 | switch (type) { |
236 | case ACL_TYPE_ACCESS: | 236 | case ACL_TYPE_ACCESS: |
237 | name_index = EXT4_XATTR_INDEX_POSIX_ACL_ACCESS; | 237 | name_index = EXT4_XATTR_INDEX_POSIX_ACL_ACCESS; |
238 | if (acl) { | 238 | if (acl) { |
239 | mode_t mode = inode->i_mode; | 239 | mode_t mode = inode->i_mode; |
240 | error = posix_acl_equiv_mode(acl, &mode); | 240 | error = posix_acl_equiv_mode(acl, &mode); |
241 | if (error < 0) | 241 | if (error < 0) |
242 | return error; | 242 | return error; |
243 | else { | 243 | else { |
244 | inode->i_mode = mode; | 244 | inode->i_mode = mode; |
245 | ext4_mark_inode_dirty(handle, inode); | 245 | ext4_mark_inode_dirty(handle, inode); |
246 | if (error == 0) | 246 | if (error == 0) |
247 | acl = NULL; | 247 | acl = NULL; |
248 | } | ||
249 | } | 248 | } |
250 | break; | 249 | } |
250 | break; | ||
251 | 251 | ||
252 | case ACL_TYPE_DEFAULT: | 252 | case ACL_TYPE_DEFAULT: |
253 | name_index = EXT4_XATTR_INDEX_POSIX_ACL_DEFAULT; | 253 | name_index = EXT4_XATTR_INDEX_POSIX_ACL_DEFAULT; |
254 | if (!S_ISDIR(inode->i_mode)) | 254 | if (!S_ISDIR(inode->i_mode)) |
255 | return acl ? -EACCES : 0; | 255 | return acl ? -EACCES : 0; |
256 | break; | 256 | break; |
257 | 257 | ||
258 | default: | 258 | default: |
259 | return -EINVAL; | 259 | return -EINVAL; |
260 | } | 260 | } |
261 | if (acl) { | 261 | if (acl) { |
262 | value = ext4_acl_to_disk(acl, &size); | 262 | value = ext4_acl_to_disk(acl, &size); |
@@ -269,14 +269,14 @@ ext4_set_acl(handle_t *handle, struct inode *inode, int type, | |||
269 | 269 | ||
270 | kfree(value); | 270 | kfree(value); |
271 | if (!error) { | 271 | if (!error) { |
272 | switch(type) { | 272 | switch (type) { |
273 | case ACL_TYPE_ACCESS: | 273 | case ACL_TYPE_ACCESS: |
274 | ext4_iset_acl(inode, &ei->i_acl, acl); | 274 | ext4_iset_acl(inode, &ei->i_acl, acl); |
275 | break; | 275 | break; |
276 | 276 | ||
277 | case ACL_TYPE_DEFAULT: | 277 | case ACL_TYPE_DEFAULT: |
278 | ext4_iset_acl(inode, &ei->i_default_acl, acl); | 278 | ext4_iset_acl(inode, &ei->i_default_acl, acl); |
279 | break; | 279 | break; |
280 | } | 280 | } |
281 | } | 281 | } |
282 | return error; | 282 | return error; |
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index 495ab21b9832..1ae5004e93fc 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c | |||
@@ -314,25 +314,28 @@ ext4_read_block_bitmap(struct super_block *sb, ext4_group_t block_group) | |||
314 | if (unlikely(!bh)) { | 314 | if (unlikely(!bh)) { |
315 | ext4_error(sb, __func__, | 315 | ext4_error(sb, __func__, |
316 | "Cannot read block bitmap - " | 316 | "Cannot read block bitmap - " |
317 | "block_group = %d, block_bitmap = %llu", | 317 | "block_group = %lu, block_bitmap = %llu", |
318 | (int)block_group, (unsigned long long)bitmap_blk); | 318 | block_group, bitmap_blk); |
319 | return NULL; | 319 | return NULL; |
320 | } | 320 | } |
321 | if (bh_uptodate_or_lock(bh)) | 321 | if (bh_uptodate_or_lock(bh)) |
322 | return bh; | 322 | return bh; |
323 | 323 | ||
324 | spin_lock(sb_bgl_lock(EXT4_SB(sb), block_group)); | ||
324 | if (desc->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) { | 325 | if (desc->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) { |
325 | ext4_init_block_bitmap(sb, bh, block_group, desc); | 326 | ext4_init_block_bitmap(sb, bh, block_group, desc); |
326 | set_buffer_uptodate(bh); | 327 | set_buffer_uptodate(bh); |
327 | unlock_buffer(bh); | 328 | unlock_buffer(bh); |
329 | spin_unlock(sb_bgl_lock(EXT4_SB(sb), block_group)); | ||
328 | return bh; | 330 | return bh; |
329 | } | 331 | } |
332 | spin_unlock(sb_bgl_lock(EXT4_SB(sb), block_group)); | ||
330 | if (bh_submit_read(bh) < 0) { | 333 | if (bh_submit_read(bh) < 0) { |
331 | put_bh(bh); | 334 | put_bh(bh); |
332 | ext4_error(sb, __func__, | 335 | ext4_error(sb, __func__, |
333 | "Cannot read block bitmap - " | 336 | "Cannot read block bitmap - " |
334 | "block_group = %d, block_bitmap = %llu", | 337 | "block_group = %lu, block_bitmap = %llu", |
335 | (int)block_group, (unsigned long long)bitmap_blk); | 338 | block_group, bitmap_blk); |
336 | return NULL; | 339 | return NULL; |
337 | } | 340 | } |
338 | ext4_valid_block_bitmap(sb, desc, block_group, bh); | 341 | ext4_valid_block_bitmap(sb, desc, block_group, bh); |
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 303e41cf7b14..6c7924d9e358 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h | |||
@@ -1044,7 +1044,6 @@ extern void ext4_mb_update_group_info(struct ext4_group_info *grp, | |||
1044 | 1044 | ||
1045 | 1045 | ||
1046 | /* inode.c */ | 1046 | /* inode.c */ |
1047 | void ext4_da_release_space(struct inode *inode, int used, int to_free); | ||
1048 | int ext4_forget(handle_t *handle, int is_metadata, struct inode *inode, | 1047 | int ext4_forget(handle_t *handle, int is_metadata, struct inode *inode, |
1049 | struct buffer_head *bh, ext4_fsblk_t blocknr); | 1048 | struct buffer_head *bh, ext4_fsblk_t blocknr); |
1050 | struct buffer_head *ext4_getblk(handle_t *, struct inode *, | 1049 | struct buffer_head *ext4_getblk(handle_t *, struct inode *, |
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 42c4c0c892ed..612c3d2c3824 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c | |||
@@ -99,7 +99,7 @@ static int ext4_ext_journal_restart(handle_t *handle, int needed) | |||
99 | if (handle->h_buffer_credits > needed) | 99 | if (handle->h_buffer_credits > needed) |
100 | return 0; | 100 | return 0; |
101 | err = ext4_journal_extend(handle, needed); | 101 | err = ext4_journal_extend(handle, needed); |
102 | if (err) | 102 | if (err <= 0) |
103 | return err; | 103 | return err; |
104 | return ext4_journal_restart(handle, needed); | 104 | return ext4_journal_restart(handle, needed); |
105 | } | 105 | } |
@@ -1441,7 +1441,7 @@ unsigned int ext4_ext_check_overlap(struct inode *inode, | |||
1441 | 1441 | ||
1442 | /* | 1442 | /* |
1443 | * get the next allocated block if the extent in the path | 1443 | * get the next allocated block if the extent in the path |
1444 | * is before the requested block(s) | 1444 | * is before the requested block(s) |
1445 | */ | 1445 | */ |
1446 | if (b2 < b1) { | 1446 | if (b2 < b1) { |
1447 | b2 = ext4_ext_next_allocated_block(path); | 1447 | b2 = ext4_ext_next_allocated_block(path); |
@@ -1910,9 +1910,13 @@ ext4_ext_rm_leaf(handle_t *handle, struct inode *inode, | |||
1910 | BUG_ON(b != ex_ee_block + ex_ee_len - 1); | 1910 | BUG_ON(b != ex_ee_block + ex_ee_len - 1); |
1911 | } | 1911 | } |
1912 | 1912 | ||
1913 | /* at present, extent can't cross block group: */ | 1913 | /* |
1914 | /* leaf + bitmap + group desc + sb + inode */ | 1914 | * 3 for leaf, sb, and inode plus 2 (bmap and group |
1915 | credits = 5; | 1915 | * descriptor) for each block group; assume two block |
1916 | * groups plus ex_ee_len/blocks_per_block_group for | ||
1917 | * the worst case | ||
1918 | */ | ||
1919 | credits = 7 + 2*(ex_ee_len/EXT4_BLOCKS_PER_GROUP(inode->i_sb)); | ||
1916 | if (ex == EXT_FIRST_EXTENT(eh)) { | 1920 | if (ex == EXT_FIRST_EXTENT(eh)) { |
1917 | correct_index = 1; | 1921 | correct_index = 1; |
1918 | credits += (ext_depth(inode)) + 1; | 1922 | credits += (ext_depth(inode)) + 1; |
@@ -2323,7 +2327,10 @@ static int ext4_ext_convert_to_initialized(handle_t *handle, | |||
2323 | unsigned int newdepth; | 2327 | unsigned int newdepth; |
2324 | /* If extent has less than EXT4_EXT_ZERO_LEN zerout directly */ | 2328 | /* If extent has less than EXT4_EXT_ZERO_LEN zerout directly */ |
2325 | if (allocated <= EXT4_EXT_ZERO_LEN) { | 2329 | if (allocated <= EXT4_EXT_ZERO_LEN) { |
2326 | /* Mark first half uninitialized. | 2330 | /* |
2331 | * iblock == ee_block is handled by the zerouout | ||
2332 | * at the beginning. | ||
2333 | * Mark first half uninitialized. | ||
2327 | * Mark second half initialized and zero out the | 2334 | * Mark second half initialized and zero out the |
2328 | * initialized extent | 2335 | * initialized extent |
2329 | */ | 2336 | */ |
@@ -2346,7 +2353,7 @@ static int ext4_ext_convert_to_initialized(handle_t *handle, | |||
2346 | ex->ee_len = orig_ex.ee_len; | 2353 | ex->ee_len = orig_ex.ee_len; |
2347 | ext4_ext_store_pblock(ex, ext_pblock(&orig_ex)); | 2354 | ext4_ext_store_pblock(ex, ext_pblock(&orig_ex)); |
2348 | ext4_ext_dirty(handle, inode, path + depth); | 2355 | ext4_ext_dirty(handle, inode, path + depth); |
2349 | /* zeroed the full extent */ | 2356 | /* blocks available from iblock */ |
2350 | return allocated; | 2357 | return allocated; |
2351 | 2358 | ||
2352 | } else if (err) | 2359 | } else if (err) |
@@ -2374,6 +2381,7 @@ static int ext4_ext_convert_to_initialized(handle_t *handle, | |||
2374 | err = PTR_ERR(path); | 2381 | err = PTR_ERR(path); |
2375 | return err; | 2382 | return err; |
2376 | } | 2383 | } |
2384 | /* get the second half extent details */ | ||
2377 | ex = path[depth].p_ext; | 2385 | ex = path[depth].p_ext; |
2378 | err = ext4_ext_get_access(handle, inode, | 2386 | err = ext4_ext_get_access(handle, inode, |
2379 | path + depth); | 2387 | path + depth); |
@@ -2403,6 +2411,7 @@ static int ext4_ext_convert_to_initialized(handle_t *handle, | |||
2403 | ext4_ext_store_pblock(ex, ext_pblock(&orig_ex)); | 2411 | ext4_ext_store_pblock(ex, ext_pblock(&orig_ex)); |
2404 | ext4_ext_dirty(handle, inode, path + depth); | 2412 | ext4_ext_dirty(handle, inode, path + depth); |
2405 | /* zeroed the full extent */ | 2413 | /* zeroed the full extent */ |
2414 | /* blocks available from iblock */ | ||
2406 | return allocated; | 2415 | return allocated; |
2407 | 2416 | ||
2408 | } else if (err) | 2417 | } else if (err) |
@@ -2418,23 +2427,22 @@ static int ext4_ext_convert_to_initialized(handle_t *handle, | |||
2418 | */ | 2427 | */ |
2419 | orig_ex.ee_len = cpu_to_le16(ee_len - | 2428 | orig_ex.ee_len = cpu_to_le16(ee_len - |
2420 | ext4_ext_get_actual_len(ex3)); | 2429 | ext4_ext_get_actual_len(ex3)); |
2421 | if (newdepth != depth) { | 2430 | depth = newdepth; |
2422 | depth = newdepth; | 2431 | ext4_ext_drop_refs(path); |
2423 | ext4_ext_drop_refs(path); | 2432 | path = ext4_ext_find_extent(inode, iblock, path); |
2424 | path = ext4_ext_find_extent(inode, iblock, path); | 2433 | if (IS_ERR(path)) { |
2425 | if (IS_ERR(path)) { | 2434 | err = PTR_ERR(path); |
2426 | err = PTR_ERR(path); | 2435 | goto out; |
2427 | goto out; | ||
2428 | } | ||
2429 | eh = path[depth].p_hdr; | ||
2430 | ex = path[depth].p_ext; | ||
2431 | if (ex2 != &newex) | ||
2432 | ex2 = ex; | ||
2433 | |||
2434 | err = ext4_ext_get_access(handle, inode, path + depth); | ||
2435 | if (err) | ||
2436 | goto out; | ||
2437 | } | 2436 | } |
2437 | eh = path[depth].p_hdr; | ||
2438 | ex = path[depth].p_ext; | ||
2439 | if (ex2 != &newex) | ||
2440 | ex2 = ex; | ||
2441 | |||
2442 | err = ext4_ext_get_access(handle, inode, path + depth); | ||
2443 | if (err) | ||
2444 | goto out; | ||
2445 | |||
2438 | allocated = max_blocks; | 2446 | allocated = max_blocks; |
2439 | 2447 | ||
2440 | /* If extent has less than EXT4_EXT_ZERO_LEN and we are trying | 2448 | /* If extent has less than EXT4_EXT_ZERO_LEN and we are trying |
@@ -2452,6 +2460,7 @@ static int ext4_ext_convert_to_initialized(handle_t *handle, | |||
2452 | ext4_ext_store_pblock(ex, ext_pblock(&orig_ex)); | 2460 | ext4_ext_store_pblock(ex, ext_pblock(&orig_ex)); |
2453 | ext4_ext_dirty(handle, inode, path + depth); | 2461 | ext4_ext_dirty(handle, inode, path + depth); |
2454 | /* zero out the first half */ | 2462 | /* zero out the first half */ |
2463 | /* blocks available from iblock */ | ||
2455 | return allocated; | 2464 | return allocated; |
2456 | } | 2465 | } |
2457 | } | 2466 | } |
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index a92eb305344f..655e760212b8 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c | |||
@@ -97,34 +97,44 @@ unsigned ext4_init_inode_bitmap(struct super_block *sb, struct buffer_head *bh, | |||
97 | * Return buffer_head of bitmap on success or NULL. | 97 | * Return buffer_head of bitmap on success or NULL. |
98 | */ | 98 | */ |
99 | static struct buffer_head * | 99 | static struct buffer_head * |
100 | read_inode_bitmap(struct super_block *sb, ext4_group_t block_group) | 100 | ext4_read_inode_bitmap(struct super_block *sb, ext4_group_t block_group) |
101 | { | 101 | { |
102 | struct ext4_group_desc *desc; | 102 | struct ext4_group_desc *desc; |
103 | struct buffer_head *bh = NULL; | 103 | struct buffer_head *bh = NULL; |
104 | ext4_fsblk_t bitmap_blk; | ||
104 | 105 | ||
105 | desc = ext4_get_group_desc(sb, block_group, NULL); | 106 | desc = ext4_get_group_desc(sb, block_group, NULL); |
106 | if (!desc) | 107 | if (!desc) |
107 | goto error_out; | 108 | return NULL; |
108 | if (desc->bg_flags & cpu_to_le16(EXT4_BG_INODE_UNINIT)) { | 109 | bitmap_blk = ext4_inode_bitmap(sb, desc); |
109 | bh = sb_getblk(sb, ext4_inode_bitmap(sb, desc)); | 110 | bh = sb_getblk(sb, bitmap_blk); |
110 | if (!buffer_uptodate(bh)) { | 111 | if (unlikely(!bh)) { |
111 | lock_buffer(bh); | 112 | ext4_error(sb, __func__, |
112 | if (!buffer_uptodate(bh)) { | 113 | "Cannot read inode bitmap - " |
113 | ext4_init_inode_bitmap(sb, bh, block_group, | 114 | "block_group = %lu, inode_bitmap = %llu", |
114 | desc); | 115 | block_group, bitmap_blk); |
115 | set_buffer_uptodate(bh); | 116 | return NULL; |
116 | } | ||
117 | unlock_buffer(bh); | ||
118 | } | ||
119 | } else { | ||
120 | bh = sb_bread(sb, ext4_inode_bitmap(sb, desc)); | ||
121 | } | 117 | } |
122 | if (!bh) | 118 | if (bh_uptodate_or_lock(bh)) |
123 | ext4_error(sb, "read_inode_bitmap", | 119 | return bh; |
120 | |||
121 | spin_lock(sb_bgl_lock(EXT4_SB(sb), block_group)); | ||
122 | if (desc->bg_flags & cpu_to_le16(EXT4_BG_INODE_UNINIT)) { | ||
123 | ext4_init_inode_bitmap(sb, bh, block_group, desc); | ||
124 | set_buffer_uptodate(bh); | ||
125 | unlock_buffer(bh); | ||
126 | spin_unlock(sb_bgl_lock(EXT4_SB(sb), block_group)); | ||
127 | return bh; | ||
128 | } | ||
129 | spin_unlock(sb_bgl_lock(EXT4_SB(sb), block_group)); | ||
130 | if (bh_submit_read(bh) < 0) { | ||
131 | put_bh(bh); | ||
132 | ext4_error(sb, __func__, | ||
124 | "Cannot read inode bitmap - " | 133 | "Cannot read inode bitmap - " |
125 | "block_group = %lu, inode_bitmap = %llu", | 134 | "block_group = %lu, inode_bitmap = %llu", |
126 | block_group, ext4_inode_bitmap(sb, desc)); | 135 | block_group, bitmap_blk); |
127 | error_out: | 136 | return NULL; |
137 | } | ||
128 | return bh; | 138 | return bh; |
129 | } | 139 | } |
130 | 140 | ||
@@ -200,7 +210,7 @@ void ext4_free_inode (handle_t *handle, struct inode * inode) | |||
200 | } | 210 | } |
201 | block_group = (ino - 1) / EXT4_INODES_PER_GROUP(sb); | 211 | block_group = (ino - 1) / EXT4_INODES_PER_GROUP(sb); |
202 | bit = (ino - 1) % EXT4_INODES_PER_GROUP(sb); | 212 | bit = (ino - 1) % EXT4_INODES_PER_GROUP(sb); |
203 | bitmap_bh = read_inode_bitmap(sb, block_group); | 213 | bitmap_bh = ext4_read_inode_bitmap(sb, block_group); |
204 | if (!bitmap_bh) | 214 | if (!bitmap_bh) |
205 | goto error_return; | 215 | goto error_return; |
206 | 216 | ||
@@ -623,7 +633,7 @@ got_group: | |||
623 | goto fail; | 633 | goto fail; |
624 | 634 | ||
625 | brelse(bitmap_bh); | 635 | brelse(bitmap_bh); |
626 | bitmap_bh = read_inode_bitmap(sb, group); | 636 | bitmap_bh = ext4_read_inode_bitmap(sb, group); |
627 | if (!bitmap_bh) | 637 | if (!bitmap_bh) |
628 | goto fail; | 638 | goto fail; |
629 | 639 | ||
@@ -728,7 +738,7 @@ got: | |||
728 | 738 | ||
729 | /* When marking the block group with | 739 | /* When marking the block group with |
730 | * ~EXT4_BG_INODE_UNINIT we don't want to depend | 740 | * ~EXT4_BG_INODE_UNINIT we don't want to depend |
731 | * on the value of bg_itable_unsed even though | 741 | * on the value of bg_itable_unused even though |
732 | * mke2fs could have initialized the same for us. | 742 | * mke2fs could have initialized the same for us. |
733 | * Instead we calculated the value below | 743 | * Instead we calculated the value below |
734 | */ | 744 | */ |
@@ -891,7 +901,7 @@ struct inode *ext4_orphan_get(struct super_block *sb, unsigned long ino) | |||
891 | 901 | ||
892 | block_group = (ino - 1) / EXT4_INODES_PER_GROUP(sb); | 902 | block_group = (ino - 1) / EXT4_INODES_PER_GROUP(sb); |
893 | bit = (ino - 1) % EXT4_INODES_PER_GROUP(sb); | 903 | bit = (ino - 1) % EXT4_INODES_PER_GROUP(sb); |
894 | bitmap_bh = read_inode_bitmap(sb, block_group); | 904 | bitmap_bh = ext4_read_inode_bitmap(sb, block_group); |
895 | if (!bitmap_bh) { | 905 | if (!bitmap_bh) { |
896 | ext4_warning(sb, __func__, | 906 | ext4_warning(sb, __func__, |
897 | "inode bitmap error for orphan %lu", ino); | 907 | "inode bitmap error for orphan %lu", ino); |
@@ -969,7 +979,7 @@ unsigned long ext4_count_free_inodes (struct super_block * sb) | |||
969 | continue; | 979 | continue; |
970 | desc_count += le16_to_cpu(gdp->bg_free_inodes_count); | 980 | desc_count += le16_to_cpu(gdp->bg_free_inodes_count); |
971 | brelse(bitmap_bh); | 981 | brelse(bitmap_bh); |
972 | bitmap_bh = read_inode_bitmap(sb, i); | 982 | bitmap_bh = ext4_read_inode_bitmap(sb, i); |
973 | if (!bitmap_bh) | 983 | if (!bitmap_bh) |
974 | continue; | 984 | continue; |
975 | 985 | ||
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 9843b046c235..59fbbe899acc 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -191,6 +191,7 @@ static int ext4_journal_test_restart(handle_t *handle, struct inode *inode) | |||
191 | void ext4_delete_inode (struct inode * inode) | 191 | void ext4_delete_inode (struct inode * inode) |
192 | { | 192 | { |
193 | handle_t *handle; | 193 | handle_t *handle; |
194 | int err; | ||
194 | 195 | ||
195 | if (ext4_should_order_data(inode)) | 196 | if (ext4_should_order_data(inode)) |
196 | ext4_begin_ordered_truncate(inode, 0); | 197 | ext4_begin_ordered_truncate(inode, 0); |
@@ -199,8 +200,9 @@ void ext4_delete_inode (struct inode * inode) | |||
199 | if (is_bad_inode(inode)) | 200 | if (is_bad_inode(inode)) |
200 | goto no_delete; | 201 | goto no_delete; |
201 | 202 | ||
202 | handle = start_transaction(inode); | 203 | handle = ext4_journal_start(inode, blocks_for_truncate(inode)+3); |
203 | if (IS_ERR(handle)) { | 204 | if (IS_ERR(handle)) { |
205 | ext4_std_error(inode->i_sb, PTR_ERR(handle)); | ||
204 | /* | 206 | /* |
205 | * If we're going to skip the normal cleanup, we still need to | 207 | * If we're going to skip the normal cleanup, we still need to |
206 | * make sure that the in-core orphan linked list is properly | 208 | * make sure that the in-core orphan linked list is properly |
@@ -213,8 +215,34 @@ void ext4_delete_inode (struct inode * inode) | |||
213 | if (IS_SYNC(inode)) | 215 | if (IS_SYNC(inode)) |
214 | handle->h_sync = 1; | 216 | handle->h_sync = 1; |
215 | inode->i_size = 0; | 217 | inode->i_size = 0; |
218 | err = ext4_mark_inode_dirty(handle, inode); | ||
219 | if (err) { | ||
220 | ext4_warning(inode->i_sb, __func__, | ||
221 | "couldn't mark inode dirty (err %d)", err); | ||
222 | goto stop_handle; | ||
223 | } | ||
216 | if (inode->i_blocks) | 224 | if (inode->i_blocks) |
217 | ext4_truncate(inode); | 225 | ext4_truncate(inode); |
226 | |||
227 | /* | ||
228 | * ext4_ext_truncate() doesn't reserve any slop when it | ||
229 | * restarts journal transactions; therefore there may not be | ||
230 | * enough credits left in the handle to remove the inode from | ||
231 | * the orphan list and set the dtime field. | ||
232 | */ | ||
233 | if (handle->h_buffer_credits < 3) { | ||
234 | err = ext4_journal_extend(handle, 3); | ||
235 | if (err > 0) | ||
236 | err = ext4_journal_restart(handle, 3); | ||
237 | if (err != 0) { | ||
238 | ext4_warning(inode->i_sb, __func__, | ||
239 | "couldn't extend journal (err %d)", err); | ||
240 | stop_handle: | ||
241 | ext4_journal_stop(handle); | ||
242 | goto no_delete; | ||
243 | } | ||
244 | } | ||
245 | |||
218 | /* | 246 | /* |
219 | * Kill off the orphan record which ext4_truncate created. | 247 | * Kill off the orphan record which ext4_truncate created. |
220 | * AKPM: I think this can be inside the above `if'. | 248 | * AKPM: I think this can be inside the above `if'. |
@@ -952,6 +980,67 @@ out: | |||
952 | return err; | 980 | return err; |
953 | } | 981 | } |
954 | 982 | ||
983 | /* | ||
984 | * Calculate the number of metadata blocks need to reserve | ||
985 | * to allocate @blocks for non extent file based file | ||
986 | */ | ||
987 | static int ext4_indirect_calc_metadata_amount(struct inode *inode, int blocks) | ||
988 | { | ||
989 | int icap = EXT4_ADDR_PER_BLOCK(inode->i_sb); | ||
990 | int ind_blks, dind_blks, tind_blks; | ||
991 | |||
992 | /* number of new indirect blocks needed */ | ||
993 | ind_blks = (blocks + icap - 1) / icap; | ||
994 | |||
995 | dind_blks = (ind_blks + icap - 1) / icap; | ||
996 | |||
997 | tind_blks = 1; | ||
998 | |||
999 | return ind_blks + dind_blks + tind_blks; | ||
1000 | } | ||
1001 | |||
1002 | /* | ||
1003 | * Calculate the number of metadata blocks need to reserve | ||
1004 | * to allocate given number of blocks | ||
1005 | */ | ||
1006 | static int ext4_calc_metadata_amount(struct inode *inode, int blocks) | ||
1007 | { | ||
1008 | if (EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL) | ||
1009 | return ext4_ext_calc_metadata_amount(inode, blocks); | ||
1010 | |||
1011 | return ext4_indirect_calc_metadata_amount(inode, blocks); | ||
1012 | } | ||
1013 | |||
1014 | static void ext4_da_update_reserve_space(struct inode *inode, int used) | ||
1015 | { | ||
1016 | struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); | ||
1017 | int total, mdb, mdb_free; | ||
1018 | |||
1019 | spin_lock(&EXT4_I(inode)->i_block_reservation_lock); | ||
1020 | /* recalculate the number of metablocks still need to be reserved */ | ||
1021 | total = EXT4_I(inode)->i_reserved_data_blocks - used; | ||
1022 | mdb = ext4_calc_metadata_amount(inode, total); | ||
1023 | |||
1024 | /* figure out how many metablocks to release */ | ||
1025 | BUG_ON(mdb > EXT4_I(inode)->i_reserved_meta_blocks); | ||
1026 | mdb_free = EXT4_I(inode)->i_reserved_meta_blocks - mdb; | ||
1027 | |||
1028 | /* Account for allocated meta_blocks */ | ||
1029 | mdb_free -= EXT4_I(inode)->i_allocated_meta_blocks; | ||
1030 | |||
1031 | /* update fs free blocks counter for truncate case */ | ||
1032 | percpu_counter_add(&sbi->s_freeblocks_counter, mdb_free); | ||
1033 | |||
1034 | /* update per-inode reservations */ | ||
1035 | BUG_ON(used > EXT4_I(inode)->i_reserved_data_blocks); | ||
1036 | EXT4_I(inode)->i_reserved_data_blocks -= used; | ||
1037 | |||
1038 | BUG_ON(mdb > EXT4_I(inode)->i_reserved_meta_blocks); | ||
1039 | EXT4_I(inode)->i_reserved_meta_blocks = mdb; | ||
1040 | EXT4_I(inode)->i_allocated_meta_blocks = 0; | ||
1041 | spin_unlock(&EXT4_I(inode)->i_block_reservation_lock); | ||
1042 | } | ||
1043 | |||
955 | /* Maximum number of blocks we map for direct IO at once. */ | 1044 | /* Maximum number of blocks we map for direct IO at once. */ |
956 | #define DIO_MAX_BLOCKS 4096 | 1045 | #define DIO_MAX_BLOCKS 4096 |
957 | /* | 1046 | /* |
@@ -965,10 +1054,9 @@ out: | |||
965 | 1054 | ||
966 | 1055 | ||
967 | /* | 1056 | /* |
1057 | * The ext4_get_blocks_wrap() function try to look up the requested blocks, | ||
1058 | * and returns if the blocks are already mapped. | ||
968 | * | 1059 | * |
969 | * | ||
970 | * ext4_ext4 get_block() wrapper function | ||
971 | * It will do a look up first, and returns if the blocks already mapped. | ||
972 | * Otherwise it takes the write lock of the i_data_sem and allocate blocks | 1060 | * Otherwise it takes the write lock of the i_data_sem and allocate blocks |
973 | * and store the allocated blocks in the result buffer head and mark it | 1061 | * and store the allocated blocks in the result buffer head and mark it |
974 | * mapped. | 1062 | * mapped. |
@@ -1069,7 +1157,7 @@ int ext4_get_blocks_wrap(handle_t *handle, struct inode *inode, sector_t block, | |||
1069 | * which were deferred till now | 1157 | * which were deferred till now |
1070 | */ | 1158 | */ |
1071 | if ((retval > 0) && buffer_delay(bh)) | 1159 | if ((retval > 0) && buffer_delay(bh)) |
1072 | ext4_da_release_space(inode, retval, 0); | 1160 | ext4_da_update_reserve_space(inode, retval); |
1073 | } | 1161 | } |
1074 | 1162 | ||
1075 | up_write((&EXT4_I(inode)->i_data_sem)); | 1163 | up_write((&EXT4_I(inode)->i_data_sem)); |
@@ -1336,12 +1424,8 @@ static int ext4_ordered_write_end(struct file *file, | |||
1336 | { | 1424 | { |
1337 | handle_t *handle = ext4_journal_current_handle(); | 1425 | handle_t *handle = ext4_journal_current_handle(); |
1338 | struct inode *inode = mapping->host; | 1426 | struct inode *inode = mapping->host; |
1339 | unsigned from, to; | ||
1340 | int ret = 0, ret2; | 1427 | int ret = 0, ret2; |
1341 | 1428 | ||
1342 | from = pos & (PAGE_CACHE_SIZE - 1); | ||
1343 | to = from + len; | ||
1344 | |||
1345 | ret = ext4_jbd2_file_inode(handle, inode); | 1429 | ret = ext4_jbd2_file_inode(handle, inode); |
1346 | 1430 | ||
1347 | if (ret == 0) { | 1431 | if (ret == 0) { |
@@ -1437,36 +1521,6 @@ static int ext4_journalled_write_end(struct file *file, | |||
1437 | 1521 | ||
1438 | return ret ? ret : copied; | 1522 | return ret ? ret : copied; |
1439 | } | 1523 | } |
1440 | /* | ||
1441 | * Calculate the number of metadata blocks need to reserve | ||
1442 | * to allocate @blocks for non extent file based file | ||
1443 | */ | ||
1444 | static int ext4_indirect_calc_metadata_amount(struct inode *inode, int blocks) | ||
1445 | { | ||
1446 | int icap = EXT4_ADDR_PER_BLOCK(inode->i_sb); | ||
1447 | int ind_blks, dind_blks, tind_blks; | ||
1448 | |||
1449 | /* number of new indirect blocks needed */ | ||
1450 | ind_blks = (blocks + icap - 1) / icap; | ||
1451 | |||
1452 | dind_blks = (ind_blks + icap - 1) / icap; | ||
1453 | |||
1454 | tind_blks = 1; | ||
1455 | |||
1456 | return ind_blks + dind_blks + tind_blks; | ||
1457 | } | ||
1458 | |||
1459 | /* | ||
1460 | * Calculate the number of metadata blocks need to reserve | ||
1461 | * to allocate given number of blocks | ||
1462 | */ | ||
1463 | static int ext4_calc_metadata_amount(struct inode *inode, int blocks) | ||
1464 | { | ||
1465 | if (EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL) | ||
1466 | return ext4_ext_calc_metadata_amount(inode, blocks); | ||
1467 | |||
1468 | return ext4_indirect_calc_metadata_amount(inode, blocks); | ||
1469 | } | ||
1470 | 1524 | ||
1471 | static int ext4_da_reserve_space(struct inode *inode, int nrblocks) | 1525 | static int ext4_da_reserve_space(struct inode *inode, int nrblocks) |
1472 | { | 1526 | { |
@@ -1490,7 +1544,6 @@ static int ext4_da_reserve_space(struct inode *inode, int nrblocks) | |||
1490 | spin_unlock(&EXT4_I(inode)->i_block_reservation_lock); | 1544 | spin_unlock(&EXT4_I(inode)->i_block_reservation_lock); |
1491 | return -ENOSPC; | 1545 | return -ENOSPC; |
1492 | } | 1546 | } |
1493 | |||
1494 | /* reduce fs free blocks counter */ | 1547 | /* reduce fs free blocks counter */ |
1495 | percpu_counter_sub(&sbi->s_freeblocks_counter, total); | 1548 | percpu_counter_sub(&sbi->s_freeblocks_counter, total); |
1496 | 1549 | ||
@@ -1501,35 +1554,31 @@ static int ext4_da_reserve_space(struct inode *inode, int nrblocks) | |||
1501 | return 0; /* success */ | 1554 | return 0; /* success */ |
1502 | } | 1555 | } |
1503 | 1556 | ||
1504 | void ext4_da_release_space(struct inode *inode, int used, int to_free) | 1557 | static void ext4_da_release_space(struct inode *inode, int to_free) |
1505 | { | 1558 | { |
1506 | struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); | 1559 | struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); |
1507 | int total, mdb, mdb_free, release; | 1560 | int total, mdb, mdb_free, release; |
1508 | 1561 | ||
1509 | spin_lock(&EXT4_I(inode)->i_block_reservation_lock); | 1562 | spin_lock(&EXT4_I(inode)->i_block_reservation_lock); |
1510 | /* recalculate the number of metablocks still need to be reserved */ | 1563 | /* recalculate the number of metablocks still need to be reserved */ |
1511 | total = EXT4_I(inode)->i_reserved_data_blocks - used - to_free; | 1564 | total = EXT4_I(inode)->i_reserved_data_blocks - to_free; |
1512 | mdb = ext4_calc_metadata_amount(inode, total); | 1565 | mdb = ext4_calc_metadata_amount(inode, total); |
1513 | 1566 | ||
1514 | /* figure out how many metablocks to release */ | 1567 | /* figure out how many metablocks to release */ |
1515 | BUG_ON(mdb > EXT4_I(inode)->i_reserved_meta_blocks); | 1568 | BUG_ON(mdb > EXT4_I(inode)->i_reserved_meta_blocks); |
1516 | mdb_free = EXT4_I(inode)->i_reserved_meta_blocks - mdb; | 1569 | mdb_free = EXT4_I(inode)->i_reserved_meta_blocks - mdb; |
1517 | 1570 | ||
1518 | /* Account for allocated meta_blocks */ | ||
1519 | mdb_free -= EXT4_I(inode)->i_allocated_meta_blocks; | ||
1520 | |||
1521 | release = to_free + mdb_free; | 1571 | release = to_free + mdb_free; |
1522 | 1572 | ||
1523 | /* update fs free blocks counter for truncate case */ | 1573 | /* update fs free blocks counter for truncate case */ |
1524 | percpu_counter_add(&sbi->s_freeblocks_counter, release); | 1574 | percpu_counter_add(&sbi->s_freeblocks_counter, release); |
1525 | 1575 | ||
1526 | /* update per-inode reservations */ | 1576 | /* update per-inode reservations */ |
1527 | BUG_ON(used + to_free > EXT4_I(inode)->i_reserved_data_blocks); | 1577 | BUG_ON(to_free > EXT4_I(inode)->i_reserved_data_blocks); |
1528 | EXT4_I(inode)->i_reserved_data_blocks -= (used + to_free); | 1578 | EXT4_I(inode)->i_reserved_data_blocks -= to_free; |
1529 | 1579 | ||
1530 | BUG_ON(mdb > EXT4_I(inode)->i_reserved_meta_blocks); | 1580 | BUG_ON(mdb > EXT4_I(inode)->i_reserved_meta_blocks); |
1531 | EXT4_I(inode)->i_reserved_meta_blocks = mdb; | 1581 | EXT4_I(inode)->i_reserved_meta_blocks = mdb; |
1532 | EXT4_I(inode)->i_allocated_meta_blocks = 0; | ||
1533 | spin_unlock(&EXT4_I(inode)->i_block_reservation_lock); | 1582 | spin_unlock(&EXT4_I(inode)->i_block_reservation_lock); |
1534 | } | 1583 | } |
1535 | 1584 | ||
@@ -1551,7 +1600,7 @@ static void ext4_da_page_release_reservation(struct page *page, | |||
1551 | } | 1600 | } |
1552 | curr_off = next_off; | 1601 | curr_off = next_off; |
1553 | } while ((bh = bh->b_this_page) != head); | 1602 | } while ((bh = bh->b_this_page) != head); |
1554 | ext4_da_release_space(page->mapping->host, 0, to_release); | 1603 | ext4_da_release_space(page->mapping->host, to_release); |
1555 | } | 1604 | } |
1556 | 1605 | ||
1557 | /* | 1606 | /* |
@@ -2280,8 +2329,11 @@ retry: | |||
2280 | } | 2329 | } |
2281 | 2330 | ||
2282 | page = __grab_cache_page(mapping, index); | 2331 | page = __grab_cache_page(mapping, index); |
2283 | if (!page) | 2332 | if (!page) { |
2284 | return -ENOMEM; | 2333 | ext4_journal_stop(handle); |
2334 | ret = -ENOMEM; | ||
2335 | goto out; | ||
2336 | } | ||
2285 | *pagep = page; | 2337 | *pagep = page; |
2286 | 2338 | ||
2287 | ret = block_write_begin(file, mapping, pos, len, flags, pagep, fsdata, | 2339 | ret = block_write_begin(file, mapping, pos, len, flags, pagep, fsdata, |
@@ -3590,6 +3642,16 @@ static int __ext4_get_inode_loc(struct inode *inode, | |||
3590 | } | 3642 | } |
3591 | if (!buffer_uptodate(bh)) { | 3643 | if (!buffer_uptodate(bh)) { |
3592 | lock_buffer(bh); | 3644 | lock_buffer(bh); |
3645 | |||
3646 | /* | ||
3647 | * If the buffer has the write error flag, we have failed | ||
3648 | * to write out another inode in the same block. In this | ||
3649 | * case, we don't have to read the block because we may | ||
3650 | * read the old inode data successfully. | ||
3651 | */ | ||
3652 | if (buffer_write_io_error(bh) && !buffer_uptodate(bh)) | ||
3653 | set_buffer_uptodate(bh); | ||
3654 | |||
3593 | if (buffer_uptodate(bh)) { | 3655 | if (buffer_uptodate(bh)) { |
3594 | /* someone brought it uptodate while we waited */ | 3656 | /* someone brought it uptodate while we waited */ |
3595 | unlock_buffer(bh); | 3657 | unlock_buffer(bh); |
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 8d141a25bbee..865e9ddb44d4 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c | |||
@@ -787,13 +787,16 @@ static int ext4_mb_init_cache(struct page *page, char *incore) | |||
787 | if (bh_uptodate_or_lock(bh[i])) | 787 | if (bh_uptodate_or_lock(bh[i])) |
788 | continue; | 788 | continue; |
789 | 789 | ||
790 | spin_lock(sb_bgl_lock(EXT4_SB(sb), first_group + i)); | ||
790 | if (desc->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) { | 791 | if (desc->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) { |
791 | ext4_init_block_bitmap(sb, bh[i], | 792 | ext4_init_block_bitmap(sb, bh[i], |
792 | first_group + i, desc); | 793 | first_group + i, desc); |
793 | set_buffer_uptodate(bh[i]); | 794 | set_buffer_uptodate(bh[i]); |
794 | unlock_buffer(bh[i]); | 795 | unlock_buffer(bh[i]); |
796 | spin_unlock(sb_bgl_lock(EXT4_SB(sb), first_group + i)); | ||
795 | continue; | 797 | continue; |
796 | } | 798 | } |
799 | spin_unlock(sb_bgl_lock(EXT4_SB(sb), first_group + i)); | ||
797 | get_bh(bh[i]); | 800 | get_bh(bh[i]); |
798 | bh[i]->b_end_io = end_buffer_read_sync; | 801 | bh[i]->b_end_io = end_buffer_read_sync; |
799 | submit_bh(READ, bh[i]); | 802 | submit_bh(READ, bh[i]); |
@@ -2477,7 +2480,7 @@ err_freesgi: | |||
2477 | int ext4_mb_init(struct super_block *sb, int needs_recovery) | 2480 | int ext4_mb_init(struct super_block *sb, int needs_recovery) |
2478 | { | 2481 | { |
2479 | struct ext4_sb_info *sbi = EXT4_SB(sb); | 2482 | struct ext4_sb_info *sbi = EXT4_SB(sb); |
2480 | unsigned i; | 2483 | unsigned i, j; |
2481 | unsigned offset; | 2484 | unsigned offset; |
2482 | unsigned max; | 2485 | unsigned max; |
2483 | int ret; | 2486 | int ret; |
@@ -2537,7 +2540,7 @@ int ext4_mb_init(struct super_block *sb, int needs_recovery) | |||
2537 | sbi->s_mb_history_filter = EXT4_MB_HISTORY_DEFAULT; | 2540 | sbi->s_mb_history_filter = EXT4_MB_HISTORY_DEFAULT; |
2538 | sbi->s_mb_group_prealloc = MB_DEFAULT_GROUP_PREALLOC; | 2541 | sbi->s_mb_group_prealloc = MB_DEFAULT_GROUP_PREALLOC; |
2539 | 2542 | ||
2540 | i = sizeof(struct ext4_locality_group) * NR_CPUS; | 2543 | i = sizeof(struct ext4_locality_group) * nr_cpu_ids; |
2541 | sbi->s_locality_groups = kmalloc(i, GFP_KERNEL); | 2544 | sbi->s_locality_groups = kmalloc(i, GFP_KERNEL); |
2542 | if (sbi->s_locality_groups == NULL) { | 2545 | if (sbi->s_locality_groups == NULL) { |
2543 | clear_opt(sbi->s_mount_opt, MBALLOC); | 2546 | clear_opt(sbi->s_mount_opt, MBALLOC); |
@@ -2545,11 +2548,12 @@ int ext4_mb_init(struct super_block *sb, int needs_recovery) | |||
2545 | kfree(sbi->s_mb_maxs); | 2548 | kfree(sbi->s_mb_maxs); |
2546 | return -ENOMEM; | 2549 | return -ENOMEM; |
2547 | } | 2550 | } |
2548 | for (i = 0; i < NR_CPUS; i++) { | 2551 | for (i = 0; i < nr_cpu_ids; i++) { |
2549 | struct ext4_locality_group *lg; | 2552 | struct ext4_locality_group *lg; |
2550 | lg = &sbi->s_locality_groups[i]; | 2553 | lg = &sbi->s_locality_groups[i]; |
2551 | mutex_init(&lg->lg_mutex); | 2554 | mutex_init(&lg->lg_mutex); |
2552 | INIT_LIST_HEAD(&lg->lg_prealloc_list); | 2555 | for (j = 0; j < PREALLOC_TB_SIZE; j++) |
2556 | INIT_LIST_HEAD(&lg->lg_prealloc_list[j]); | ||
2553 | spin_lock_init(&lg->lg_prealloc_lock); | 2557 | spin_lock_init(&lg->lg_prealloc_lock); |
2554 | } | 2558 | } |
2555 | 2559 | ||
@@ -3260,6 +3264,7 @@ static void ext4_mb_use_group_pa(struct ext4_allocation_context *ac, | |||
3260 | struct ext4_prealloc_space *pa) | 3264 | struct ext4_prealloc_space *pa) |
3261 | { | 3265 | { |
3262 | unsigned int len = ac->ac_o_ex.fe_len; | 3266 | unsigned int len = ac->ac_o_ex.fe_len; |
3267 | |||
3263 | ext4_get_group_no_and_offset(ac->ac_sb, pa->pa_pstart, | 3268 | ext4_get_group_no_and_offset(ac->ac_sb, pa->pa_pstart, |
3264 | &ac->ac_b_ex.fe_group, | 3269 | &ac->ac_b_ex.fe_group, |
3265 | &ac->ac_b_ex.fe_start); | 3270 | &ac->ac_b_ex.fe_start); |
@@ -3282,6 +3287,7 @@ static void ext4_mb_use_group_pa(struct ext4_allocation_context *ac, | |||
3282 | static noinline_for_stack int | 3287 | static noinline_for_stack int |
3283 | ext4_mb_use_preallocated(struct ext4_allocation_context *ac) | 3288 | ext4_mb_use_preallocated(struct ext4_allocation_context *ac) |
3284 | { | 3289 | { |
3290 | int order, i; | ||
3285 | struct ext4_inode_info *ei = EXT4_I(ac->ac_inode); | 3291 | struct ext4_inode_info *ei = EXT4_I(ac->ac_inode); |
3286 | struct ext4_locality_group *lg; | 3292 | struct ext4_locality_group *lg; |
3287 | struct ext4_prealloc_space *pa; | 3293 | struct ext4_prealloc_space *pa; |
@@ -3322,22 +3328,29 @@ ext4_mb_use_preallocated(struct ext4_allocation_context *ac) | |||
3322 | lg = ac->ac_lg; | 3328 | lg = ac->ac_lg; |
3323 | if (lg == NULL) | 3329 | if (lg == NULL) |
3324 | return 0; | 3330 | return 0; |
3325 | 3331 | order = fls(ac->ac_o_ex.fe_len) - 1; | |
3326 | rcu_read_lock(); | 3332 | if (order > PREALLOC_TB_SIZE - 1) |
3327 | list_for_each_entry_rcu(pa, &lg->lg_prealloc_list, pa_inode_list) { | 3333 | /* The max size of hash table is PREALLOC_TB_SIZE */ |
3328 | spin_lock(&pa->pa_lock); | 3334 | order = PREALLOC_TB_SIZE - 1; |
3329 | if (pa->pa_deleted == 0 && pa->pa_free >= ac->ac_o_ex.fe_len) { | 3335 | |
3330 | atomic_inc(&pa->pa_count); | 3336 | for (i = order; i < PREALLOC_TB_SIZE; i++) { |
3331 | ext4_mb_use_group_pa(ac, pa); | 3337 | rcu_read_lock(); |
3338 | list_for_each_entry_rcu(pa, &lg->lg_prealloc_list[i], | ||
3339 | pa_inode_list) { | ||
3340 | spin_lock(&pa->pa_lock); | ||
3341 | if (pa->pa_deleted == 0 && | ||
3342 | pa->pa_free >= ac->ac_o_ex.fe_len) { | ||
3343 | atomic_inc(&pa->pa_count); | ||
3344 | ext4_mb_use_group_pa(ac, pa); | ||
3345 | spin_unlock(&pa->pa_lock); | ||
3346 | ac->ac_criteria = 20; | ||
3347 | rcu_read_unlock(); | ||
3348 | return 1; | ||
3349 | } | ||
3332 | spin_unlock(&pa->pa_lock); | 3350 | spin_unlock(&pa->pa_lock); |
3333 | ac->ac_criteria = 20; | ||
3334 | rcu_read_unlock(); | ||
3335 | return 1; | ||
3336 | } | 3351 | } |
3337 | spin_unlock(&pa->pa_lock); | 3352 | rcu_read_unlock(); |
3338 | } | 3353 | } |
3339 | rcu_read_unlock(); | ||
3340 | |||
3341 | return 0; | 3354 | return 0; |
3342 | } | 3355 | } |
3343 | 3356 | ||
@@ -3560,6 +3573,7 @@ ext4_mb_new_group_pa(struct ext4_allocation_context *ac) | |||
3560 | pa->pa_free = pa->pa_len; | 3573 | pa->pa_free = pa->pa_len; |
3561 | atomic_set(&pa->pa_count, 1); | 3574 | atomic_set(&pa->pa_count, 1); |
3562 | spin_lock_init(&pa->pa_lock); | 3575 | spin_lock_init(&pa->pa_lock); |
3576 | INIT_LIST_HEAD(&pa->pa_inode_list); | ||
3563 | pa->pa_deleted = 0; | 3577 | pa->pa_deleted = 0; |
3564 | pa->pa_linear = 1; | 3578 | pa->pa_linear = 1; |
3565 | 3579 | ||
@@ -3580,10 +3594,10 @@ ext4_mb_new_group_pa(struct ext4_allocation_context *ac) | |||
3580 | list_add(&pa->pa_group_list, &grp->bb_prealloc_list); | 3594 | list_add(&pa->pa_group_list, &grp->bb_prealloc_list); |
3581 | ext4_unlock_group(sb, ac->ac_b_ex.fe_group); | 3595 | ext4_unlock_group(sb, ac->ac_b_ex.fe_group); |
3582 | 3596 | ||
3583 | spin_lock(pa->pa_obj_lock); | 3597 | /* |
3584 | list_add_tail_rcu(&pa->pa_inode_list, &lg->lg_prealloc_list); | 3598 | * We will later add the new pa to the right bucket |
3585 | spin_unlock(pa->pa_obj_lock); | 3599 | * after updating the pa_free in ext4_mb_release_context |
3586 | 3600 | */ | |
3587 | return 0; | 3601 | return 0; |
3588 | } | 3602 | } |
3589 | 3603 | ||
@@ -3733,20 +3747,23 @@ ext4_mb_discard_group_preallocations(struct super_block *sb, | |||
3733 | 3747 | ||
3734 | bitmap_bh = ext4_read_block_bitmap(sb, group); | 3748 | bitmap_bh = ext4_read_block_bitmap(sb, group); |
3735 | if (bitmap_bh == NULL) { | 3749 | if (bitmap_bh == NULL) { |
3736 | /* error handling here */ | 3750 | ext4_error(sb, __func__, "Error in reading block " |
3737 | ext4_mb_release_desc(&e4b); | 3751 | "bitmap for %lu\n", group); |
3738 | BUG_ON(bitmap_bh == NULL); | 3752 | return 0; |
3739 | } | 3753 | } |
3740 | 3754 | ||
3741 | err = ext4_mb_load_buddy(sb, group, &e4b); | 3755 | err = ext4_mb_load_buddy(sb, group, &e4b); |
3742 | BUG_ON(err != 0); /* error handling here */ | 3756 | if (err) { |
3757 | ext4_error(sb, __func__, "Error in loading buddy " | ||
3758 | "information for %lu\n", group); | ||
3759 | put_bh(bitmap_bh); | ||
3760 | return 0; | ||
3761 | } | ||
3743 | 3762 | ||
3744 | if (needed == 0) | 3763 | if (needed == 0) |
3745 | needed = EXT4_BLOCKS_PER_GROUP(sb) + 1; | 3764 | needed = EXT4_BLOCKS_PER_GROUP(sb) + 1; |
3746 | 3765 | ||
3747 | grp = ext4_get_group_info(sb, group); | ||
3748 | INIT_LIST_HEAD(&list); | 3766 | INIT_LIST_HEAD(&list); |
3749 | |||
3750 | ac = kmem_cache_alloc(ext4_ac_cachep, GFP_NOFS); | 3767 | ac = kmem_cache_alloc(ext4_ac_cachep, GFP_NOFS); |
3751 | repeat: | 3768 | repeat: |
3752 | ext4_lock_group(sb, group); | 3769 | ext4_lock_group(sb, group); |
@@ -3903,13 +3920,18 @@ repeat: | |||
3903 | ext4_get_group_no_and_offset(sb, pa->pa_pstart, &group, NULL); | 3920 | ext4_get_group_no_and_offset(sb, pa->pa_pstart, &group, NULL); |
3904 | 3921 | ||
3905 | err = ext4_mb_load_buddy(sb, group, &e4b); | 3922 | err = ext4_mb_load_buddy(sb, group, &e4b); |
3906 | BUG_ON(err != 0); /* error handling here */ | 3923 | if (err) { |
3924 | ext4_error(sb, __func__, "Error in loading buddy " | ||
3925 | "information for %lu\n", group); | ||
3926 | continue; | ||
3927 | } | ||
3907 | 3928 | ||
3908 | bitmap_bh = ext4_read_block_bitmap(sb, group); | 3929 | bitmap_bh = ext4_read_block_bitmap(sb, group); |
3909 | if (bitmap_bh == NULL) { | 3930 | if (bitmap_bh == NULL) { |
3910 | /* error handling here */ | 3931 | ext4_error(sb, __func__, "Error in reading block " |
3932 | "bitmap for %lu\n", group); | ||
3911 | ext4_mb_release_desc(&e4b); | 3933 | ext4_mb_release_desc(&e4b); |
3912 | BUG_ON(bitmap_bh == NULL); | 3934 | continue; |
3913 | } | 3935 | } |
3914 | 3936 | ||
3915 | ext4_lock_group(sb, group); | 3937 | ext4_lock_group(sb, group); |
@@ -4112,22 +4134,168 @@ ext4_mb_initialize_context(struct ext4_allocation_context *ac, | |||
4112 | 4134 | ||
4113 | } | 4135 | } |
4114 | 4136 | ||
4137 | static noinline_for_stack void | ||
4138 | ext4_mb_discard_lg_preallocations(struct super_block *sb, | ||
4139 | struct ext4_locality_group *lg, | ||
4140 | int order, int total_entries) | ||
4141 | { | ||
4142 | ext4_group_t group = 0; | ||
4143 | struct ext4_buddy e4b; | ||
4144 | struct list_head discard_list; | ||
4145 | struct ext4_prealloc_space *pa, *tmp; | ||
4146 | struct ext4_allocation_context *ac; | ||
4147 | |||
4148 | mb_debug("discard locality group preallocation\n"); | ||
4149 | |||
4150 | INIT_LIST_HEAD(&discard_list); | ||
4151 | ac = kmem_cache_alloc(ext4_ac_cachep, GFP_NOFS); | ||
4152 | |||
4153 | spin_lock(&lg->lg_prealloc_lock); | ||
4154 | list_for_each_entry_rcu(pa, &lg->lg_prealloc_list[order], | ||
4155 | pa_inode_list) { | ||
4156 | spin_lock(&pa->pa_lock); | ||
4157 | if (atomic_read(&pa->pa_count)) { | ||
4158 | /* | ||
4159 | * This is the pa that we just used | ||
4160 | * for block allocation. So don't | ||
4161 | * free that | ||
4162 | */ | ||
4163 | spin_unlock(&pa->pa_lock); | ||
4164 | continue; | ||
4165 | } | ||
4166 | if (pa->pa_deleted) { | ||
4167 | spin_unlock(&pa->pa_lock); | ||
4168 | continue; | ||
4169 | } | ||
4170 | /* only lg prealloc space */ | ||
4171 | BUG_ON(!pa->pa_linear); | ||
4172 | |||
4173 | /* seems this one can be freed ... */ | ||
4174 | pa->pa_deleted = 1; | ||
4175 | spin_unlock(&pa->pa_lock); | ||
4176 | |||
4177 | list_del_rcu(&pa->pa_inode_list); | ||
4178 | list_add(&pa->u.pa_tmp_list, &discard_list); | ||
4179 | |||
4180 | total_entries--; | ||
4181 | if (total_entries <= 5) { | ||
4182 | /* | ||
4183 | * we want to keep only 5 entries | ||
4184 | * allowing it to grow to 8. This | ||
4185 | * mak sure we don't call discard | ||
4186 | * soon for this list. | ||
4187 | */ | ||
4188 | break; | ||
4189 | } | ||
4190 | } | ||
4191 | spin_unlock(&lg->lg_prealloc_lock); | ||
4192 | |||
4193 | list_for_each_entry_safe(pa, tmp, &discard_list, u.pa_tmp_list) { | ||
4194 | |||
4195 | ext4_get_group_no_and_offset(sb, pa->pa_pstart, &group, NULL); | ||
4196 | if (ext4_mb_load_buddy(sb, group, &e4b)) { | ||
4197 | ext4_error(sb, __func__, "Error in loading buddy " | ||
4198 | "information for %lu\n", group); | ||
4199 | continue; | ||
4200 | } | ||
4201 | ext4_lock_group(sb, group); | ||
4202 | list_del(&pa->pa_group_list); | ||
4203 | ext4_mb_release_group_pa(&e4b, pa, ac); | ||
4204 | ext4_unlock_group(sb, group); | ||
4205 | |||
4206 | ext4_mb_release_desc(&e4b); | ||
4207 | list_del(&pa->u.pa_tmp_list); | ||
4208 | call_rcu(&(pa)->u.pa_rcu, ext4_mb_pa_callback); | ||
4209 | } | ||
4210 | if (ac) | ||
4211 | kmem_cache_free(ext4_ac_cachep, ac); | ||
4212 | } | ||
4213 | |||
4214 | /* | ||
4215 | * We have incremented pa_count. So it cannot be freed at this | ||
4216 | * point. Also we hold lg_mutex. So no parallel allocation is | ||
4217 | * possible from this lg. That means pa_free cannot be updated. | ||
4218 | * | ||
4219 | * A parallel ext4_mb_discard_group_preallocations is possible. | ||
4220 | * which can cause the lg_prealloc_list to be updated. | ||
4221 | */ | ||
4222 | |||
4223 | static void ext4_mb_add_n_trim(struct ext4_allocation_context *ac) | ||
4224 | { | ||
4225 | int order, added = 0, lg_prealloc_count = 1; | ||
4226 | struct super_block *sb = ac->ac_sb; | ||
4227 | struct ext4_locality_group *lg = ac->ac_lg; | ||
4228 | struct ext4_prealloc_space *tmp_pa, *pa = ac->ac_pa; | ||
4229 | |||
4230 | order = fls(pa->pa_free) - 1; | ||
4231 | if (order > PREALLOC_TB_SIZE - 1) | ||
4232 | /* The max size of hash table is PREALLOC_TB_SIZE */ | ||
4233 | order = PREALLOC_TB_SIZE - 1; | ||
4234 | /* Add the prealloc space to lg */ | ||
4235 | rcu_read_lock(); | ||
4236 | list_for_each_entry_rcu(tmp_pa, &lg->lg_prealloc_list[order], | ||
4237 | pa_inode_list) { | ||
4238 | spin_lock(&tmp_pa->pa_lock); | ||
4239 | if (tmp_pa->pa_deleted) { | ||
4240 | spin_unlock(&pa->pa_lock); | ||
4241 | continue; | ||
4242 | } | ||
4243 | if (!added && pa->pa_free < tmp_pa->pa_free) { | ||
4244 | /* Add to the tail of the previous entry */ | ||
4245 | list_add_tail_rcu(&pa->pa_inode_list, | ||
4246 | &tmp_pa->pa_inode_list); | ||
4247 | added = 1; | ||
4248 | /* | ||
4249 | * we want to count the total | ||
4250 | * number of entries in the list | ||
4251 | */ | ||
4252 | } | ||
4253 | spin_unlock(&tmp_pa->pa_lock); | ||
4254 | lg_prealloc_count++; | ||
4255 | } | ||
4256 | if (!added) | ||
4257 | list_add_tail_rcu(&pa->pa_inode_list, | ||
4258 | &lg->lg_prealloc_list[order]); | ||
4259 | rcu_read_unlock(); | ||
4260 | |||
4261 | /* Now trim the list to be not more than 8 elements */ | ||
4262 | if (lg_prealloc_count > 8) { | ||
4263 | ext4_mb_discard_lg_preallocations(sb, lg, | ||
4264 | order, lg_prealloc_count); | ||
4265 | return; | ||
4266 | } | ||
4267 | return ; | ||
4268 | } | ||
4269 | |||
4115 | /* | 4270 | /* |
4116 | * release all resource we used in allocation | 4271 | * release all resource we used in allocation |
4117 | */ | 4272 | */ |
4118 | static int ext4_mb_release_context(struct ext4_allocation_context *ac) | 4273 | static int ext4_mb_release_context(struct ext4_allocation_context *ac) |
4119 | { | 4274 | { |
4120 | if (ac->ac_pa) { | 4275 | struct ext4_prealloc_space *pa = ac->ac_pa; |
4121 | if (ac->ac_pa->pa_linear) { | 4276 | if (pa) { |
4277 | if (pa->pa_linear) { | ||
4122 | /* see comment in ext4_mb_use_group_pa() */ | 4278 | /* see comment in ext4_mb_use_group_pa() */ |
4123 | spin_lock(&ac->ac_pa->pa_lock); | 4279 | spin_lock(&pa->pa_lock); |
4124 | ac->ac_pa->pa_pstart += ac->ac_b_ex.fe_len; | 4280 | pa->pa_pstart += ac->ac_b_ex.fe_len; |
4125 | ac->ac_pa->pa_lstart += ac->ac_b_ex.fe_len; | 4281 | pa->pa_lstart += ac->ac_b_ex.fe_len; |
4126 | ac->ac_pa->pa_free -= ac->ac_b_ex.fe_len; | 4282 | pa->pa_free -= ac->ac_b_ex.fe_len; |
4127 | ac->ac_pa->pa_len -= ac->ac_b_ex.fe_len; | 4283 | pa->pa_len -= ac->ac_b_ex.fe_len; |
4128 | spin_unlock(&ac->ac_pa->pa_lock); | 4284 | spin_unlock(&pa->pa_lock); |
4285 | /* | ||
4286 | * We want to add the pa to the right bucket. | ||
4287 | * Remove it from the list and while adding | ||
4288 | * make sure the list to which we are adding | ||
4289 | * doesn't grow big. | ||
4290 | */ | ||
4291 | if (likely(pa->pa_free)) { | ||
4292 | spin_lock(pa->pa_obj_lock); | ||
4293 | list_del_rcu(&pa->pa_inode_list); | ||
4294 | spin_unlock(pa->pa_obj_lock); | ||
4295 | ext4_mb_add_n_trim(ac); | ||
4296 | } | ||
4129 | } | 4297 | } |
4130 | ext4_mb_put_pa(ac, ac->ac_sb, ac->ac_pa); | 4298 | ext4_mb_put_pa(ac, ac->ac_sb, pa); |
4131 | } | 4299 | } |
4132 | if (ac->ac_bitmap_page) | 4300 | if (ac->ac_bitmap_page) |
4133 | page_cache_release(ac->ac_bitmap_page); | 4301 | page_cache_release(ac->ac_bitmap_page); |
@@ -4420,11 +4588,15 @@ do_more: | |||
4420 | count -= overflow; | 4588 | count -= overflow; |
4421 | } | 4589 | } |
4422 | bitmap_bh = ext4_read_block_bitmap(sb, block_group); | 4590 | bitmap_bh = ext4_read_block_bitmap(sb, block_group); |
4423 | if (!bitmap_bh) | 4591 | if (!bitmap_bh) { |
4592 | err = -EIO; | ||
4424 | goto error_return; | 4593 | goto error_return; |
4594 | } | ||
4425 | gdp = ext4_get_group_desc(sb, block_group, &gd_bh); | 4595 | gdp = ext4_get_group_desc(sb, block_group, &gd_bh); |
4426 | if (!gdp) | 4596 | if (!gdp) { |
4597 | err = -EIO; | ||
4427 | goto error_return; | 4598 | goto error_return; |
4599 | } | ||
4428 | 4600 | ||
4429 | if (in_range(ext4_block_bitmap(sb, gdp), block, count) || | 4601 | if (in_range(ext4_block_bitmap(sb, gdp), block, count) || |
4430 | in_range(ext4_inode_bitmap(sb, gdp), block, count) || | 4602 | in_range(ext4_inode_bitmap(sb, gdp), block, count) || |
diff --git a/fs/ext4/mballoc.h b/fs/ext4/mballoc.h index bfe6add46bcf..c7c9906c2a75 100644 --- a/fs/ext4/mballoc.h +++ b/fs/ext4/mballoc.h | |||
@@ -164,11 +164,17 @@ struct ext4_free_extent { | |||
164 | * Locality group: | 164 | * Locality group: |
165 | * we try to group all related changes together | 165 | * we try to group all related changes together |
166 | * so that writeback can flush/allocate them together as well | 166 | * so that writeback can flush/allocate them together as well |
167 | * Size of lg_prealloc_list hash is determined by MB_DEFAULT_GROUP_PREALLOC | ||
168 | * (512). We store prealloc space into the hash based on the pa_free blocks | ||
169 | * order value.ie, fls(pa_free)-1; | ||
167 | */ | 170 | */ |
171 | #define PREALLOC_TB_SIZE 10 | ||
168 | struct ext4_locality_group { | 172 | struct ext4_locality_group { |
169 | /* for allocator */ | 173 | /* for allocator */ |
170 | struct mutex lg_mutex; /* to serialize allocates */ | 174 | /* to serialize allocates */ |
171 | struct list_head lg_prealloc_list;/* list of preallocations */ | 175 | struct mutex lg_mutex; |
176 | /* list of preallocations */ | ||
177 | struct list_head lg_prealloc_list[PREALLOC_TB_SIZE]; | ||
172 | spinlock_t lg_prealloc_lock; | 178 | spinlock_t lg_prealloc_lock; |
173 | }; | 179 | }; |
174 | 180 | ||
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index f000fbe2cd93..0a9265164265 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c | |||
@@ -73,7 +73,7 @@ static int verify_group_input(struct super_block *sb, | |||
73 | "Inode bitmap not in group (block %llu)", | 73 | "Inode bitmap not in group (block %llu)", |
74 | (unsigned long long)input->inode_bitmap); | 74 | (unsigned long long)input->inode_bitmap); |
75 | else if (outside(input->inode_table, start, end) || | 75 | else if (outside(input->inode_table, start, end) || |
76 | outside(itend - 1, start, end)) | 76 | outside(itend - 1, start, end)) |
77 | ext4_warning(sb, __func__, | 77 | ext4_warning(sb, __func__, |
78 | "Inode table not in group (blocks %llu-%llu)", | 78 | "Inode table not in group (blocks %llu-%llu)", |
79 | (unsigned long long)input->inode_table, itend - 1); | 79 | (unsigned long long)input->inode_table, itend - 1); |
@@ -104,7 +104,7 @@ static int verify_group_input(struct super_block *sb, | |||
104 | (unsigned long long)input->inode_bitmap, | 104 | (unsigned long long)input->inode_bitmap, |
105 | start, metaend - 1); | 105 | start, metaend - 1); |
106 | else if (inside(input->inode_table, start, metaend) || | 106 | else if (inside(input->inode_table, start, metaend) || |
107 | inside(itend - 1, start, metaend)) | 107 | inside(itend - 1, start, metaend)) |
108 | ext4_warning(sb, __func__, | 108 | ext4_warning(sb, __func__, |
109 | "Inode table (%llu-%llu) overlaps" | 109 | "Inode table (%llu-%llu) overlaps" |
110 | "GDT table (%llu-%llu)", | 110 | "GDT table (%llu-%llu)", |
@@ -158,9 +158,9 @@ static int extend_or_restart_transaction(handle_t *handle, int thresh, | |||
158 | if (err) { | 158 | if (err) { |
159 | if ((err = ext4_journal_restart(handle, EXT4_MAX_TRANS_DATA))) | 159 | if ((err = ext4_journal_restart(handle, EXT4_MAX_TRANS_DATA))) |
160 | return err; | 160 | return err; |
161 | if ((err = ext4_journal_get_write_access(handle, bh))) | 161 | if ((err = ext4_journal_get_write_access(handle, bh))) |
162 | return err; | 162 | return err; |
163 | } | 163 | } |
164 | 164 | ||
165 | return 0; | 165 | return 0; |
166 | } | 166 | } |
@@ -416,11 +416,11 @@ static int add_new_gdb(handle_t *handle, struct inode *inode, | |||
416 | "EXT4-fs: ext4_add_new_gdb: adding group block %lu\n", | 416 | "EXT4-fs: ext4_add_new_gdb: adding group block %lu\n", |
417 | gdb_num); | 417 | gdb_num); |
418 | 418 | ||
419 | /* | 419 | /* |
420 | * If we are not using the primary superblock/GDT copy don't resize, | 420 | * If we are not using the primary superblock/GDT copy don't resize, |
421 | * because the user tools have no way of handling this. Probably a | 421 | * because the user tools have no way of handling this. Probably a |
422 | * bad time to do it anyways. | 422 | * bad time to do it anyways. |
423 | */ | 423 | */ |
424 | if (EXT4_SB(sb)->s_sbh->b_blocknr != | 424 | if (EXT4_SB(sb)->s_sbh->b_blocknr != |
425 | le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block)) { | 425 | le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block)) { |
426 | ext4_warning(sb, __func__, | 426 | ext4_warning(sb, __func__, |
@@ -507,14 +507,14 @@ static int add_new_gdb(handle_t *handle, struct inode *inode, | |||
507 | return 0; | 507 | return 0; |
508 | 508 | ||
509 | exit_inode: | 509 | exit_inode: |
510 | //ext4_journal_release_buffer(handle, iloc.bh); | 510 | /* ext4_journal_release_buffer(handle, iloc.bh); */ |
511 | brelse(iloc.bh); | 511 | brelse(iloc.bh); |
512 | exit_dindj: | 512 | exit_dindj: |
513 | //ext4_journal_release_buffer(handle, dind); | 513 | /* ext4_journal_release_buffer(handle, dind); */ |
514 | exit_primary: | 514 | exit_primary: |
515 | //ext4_journal_release_buffer(handle, *primary); | 515 | /* ext4_journal_release_buffer(handle, *primary); */ |
516 | exit_sbh: | 516 | exit_sbh: |
517 | //ext4_journal_release_buffer(handle, *primary); | 517 | /* ext4_journal_release_buffer(handle, *primary); */ |
518 | exit_dind: | 518 | exit_dind: |
519 | brelse(dind); | 519 | brelse(dind); |
520 | exit_bh: | 520 | exit_bh: |
@@ -818,12 +818,12 @@ int ext4_group_add(struct super_block *sb, struct ext4_new_group_data *input) | |||
818 | if ((err = ext4_journal_get_write_access(handle, sbi->s_sbh))) | 818 | if ((err = ext4_journal_get_write_access(handle, sbi->s_sbh))) |
819 | goto exit_journal; | 819 | goto exit_journal; |
820 | 820 | ||
821 | /* | 821 | /* |
822 | * We will only either add reserved group blocks to a backup group | 822 | * We will only either add reserved group blocks to a backup group |
823 | * or remove reserved blocks for the first group in a new group block. | 823 | * or remove reserved blocks for the first group in a new group block. |
824 | * Doing both would be mean more complex code, and sane people don't | 824 | * Doing both would be mean more complex code, and sane people don't |
825 | * use non-sparse filesystems anymore. This is already checked above. | 825 | * use non-sparse filesystems anymore. This is already checked above. |
826 | */ | 826 | */ |
827 | if (gdb_off) { | 827 | if (gdb_off) { |
828 | primary = sbi->s_group_desc[gdb_num]; | 828 | primary = sbi->s_group_desc[gdb_num]; |
829 | if ((err = ext4_journal_get_write_access(handle, primary))) | 829 | if ((err = ext4_journal_get_write_access(handle, primary))) |
@@ -835,24 +835,24 @@ int ext4_group_add(struct super_block *sb, struct ext4_new_group_data *input) | |||
835 | } else if ((err = add_new_gdb(handle, inode, input, &primary))) | 835 | } else if ((err = add_new_gdb(handle, inode, input, &primary))) |
836 | goto exit_journal; | 836 | goto exit_journal; |
837 | 837 | ||
838 | /* | 838 | /* |
839 | * OK, now we've set up the new group. Time to make it active. | 839 | * OK, now we've set up the new group. Time to make it active. |
840 | * | 840 | * |
841 | * Current kernels don't lock all allocations via lock_super(), | 841 | * Current kernels don't lock all allocations via lock_super(), |
842 | * so we have to be safe wrt. concurrent accesses the group | 842 | * so we have to be safe wrt. concurrent accesses the group |
843 | * data. So we need to be careful to set all of the relevant | 843 | * data. So we need to be careful to set all of the relevant |
844 | * group descriptor data etc. *before* we enable the group. | 844 | * group descriptor data etc. *before* we enable the group. |
845 | * | 845 | * |
846 | * The key field here is sbi->s_groups_count: as long as | 846 | * The key field here is sbi->s_groups_count: as long as |
847 | * that retains its old value, nobody is going to access the new | 847 | * that retains its old value, nobody is going to access the new |
848 | * group. | 848 | * group. |
849 | * | 849 | * |
850 | * So first we update all the descriptor metadata for the new | 850 | * So first we update all the descriptor metadata for the new |
851 | * group; then we update the total disk blocks count; then we | 851 | * group; then we update the total disk blocks count; then we |
852 | * update the groups count to enable the group; then finally we | 852 | * update the groups count to enable the group; then finally we |
853 | * update the free space counts so that the system can start | 853 | * update the free space counts so that the system can start |
854 | * using the new disk blocks. | 854 | * using the new disk blocks. |
855 | */ | 855 | */ |
856 | 856 | ||
857 | /* Update group descriptor block for new group */ | 857 | /* Update group descriptor block for new group */ |
858 | gdp = (struct ext4_group_desc *)((char *)primary->b_data + | 858 | gdp = (struct ext4_group_desc *)((char *)primary->b_data + |
@@ -946,7 +946,8 @@ exit_put: | |||
946 | return err; | 946 | return err; |
947 | } /* ext4_group_add */ | 947 | } /* ext4_group_add */ |
948 | 948 | ||
949 | /* Extend the filesystem to the new number of blocks specified. This entry | 949 | /* |
950 | * Extend the filesystem to the new number of blocks specified. This entry | ||
950 | * point is only used to extend the current filesystem to the end of the last | 951 | * point is only used to extend the current filesystem to the end of the last |
951 | * existing group. It can be accessed via ioctl, or by "remount,resize=<size>" | 952 | * existing group. It can be accessed via ioctl, or by "remount,resize=<size>" |
952 | * for emergencies (because it has no dependencies on reserved blocks). | 953 | * for emergencies (because it has no dependencies on reserved blocks). |
@@ -1024,7 +1025,7 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es, | |||
1024 | o_blocks_count + add, add); | 1025 | o_blocks_count + add, add); |
1025 | 1026 | ||
1026 | /* See if the device is actually as big as what was requested */ | 1027 | /* See if the device is actually as big as what was requested */ |
1027 | bh = sb_bread(sb, o_blocks_count + add -1); | 1028 | bh = sb_bread(sb, o_blocks_count + add - 1); |
1028 | if (!bh) { | 1029 | if (!bh) { |
1029 | ext4_warning(sb, __func__, | 1030 | ext4_warning(sb, __func__, |
1030 | "can't read last block, resize aborted"); | 1031 | "can't read last block, resize aborted"); |
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 1e69f29a8c55..d5d77958b861 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -49,20 +49,19 @@ static int ext4_load_journal(struct super_block *, struct ext4_super_block *, | |||
49 | unsigned long journal_devnum); | 49 | unsigned long journal_devnum); |
50 | static int ext4_create_journal(struct super_block *, struct ext4_super_block *, | 50 | static int ext4_create_journal(struct super_block *, struct ext4_super_block *, |
51 | unsigned int); | 51 | unsigned int); |
52 | static void ext4_commit_super (struct super_block * sb, | 52 | static void ext4_commit_super(struct super_block *sb, |
53 | struct ext4_super_block * es, | 53 | struct ext4_super_block *es, int sync); |
54 | int sync); | 54 | static void ext4_mark_recovery_complete(struct super_block *sb, |
55 | static void ext4_mark_recovery_complete(struct super_block * sb, | 55 | struct ext4_super_block *es); |
56 | struct ext4_super_block * es); | 56 | static void ext4_clear_journal_err(struct super_block *sb, |
57 | static void ext4_clear_journal_err(struct super_block * sb, | 57 | struct ext4_super_block *es); |
58 | struct ext4_super_block * es); | ||
59 | static int ext4_sync_fs(struct super_block *sb, int wait); | 58 | static int ext4_sync_fs(struct super_block *sb, int wait); |
60 | static const char *ext4_decode_error(struct super_block * sb, int errno, | 59 | static const char *ext4_decode_error(struct super_block *sb, int errno, |
61 | char nbuf[16]); | 60 | char nbuf[16]); |
62 | static int ext4_remount (struct super_block * sb, int * flags, char * data); | 61 | static int ext4_remount(struct super_block *sb, int *flags, char *data); |
63 | static int ext4_statfs (struct dentry * dentry, struct kstatfs * buf); | 62 | static int ext4_statfs(struct dentry *dentry, struct kstatfs *buf); |
64 | static void ext4_unlockfs(struct super_block *sb); | 63 | static void ext4_unlockfs(struct super_block *sb); |
65 | static void ext4_write_super (struct super_block * sb); | 64 | static void ext4_write_super(struct super_block *sb); |
66 | static void ext4_write_super_lockfs(struct super_block *sb); | 65 | static void ext4_write_super_lockfs(struct super_block *sb); |
67 | 66 | ||
68 | 67 | ||
@@ -211,15 +210,15 @@ static void ext4_handle_error(struct super_block *sb) | |||
211 | if (sb->s_flags & MS_RDONLY) | 210 | if (sb->s_flags & MS_RDONLY) |
212 | return; | 211 | return; |
213 | 212 | ||
214 | if (!test_opt (sb, ERRORS_CONT)) { | 213 | if (!test_opt(sb, ERRORS_CONT)) { |
215 | journal_t *journal = EXT4_SB(sb)->s_journal; | 214 | journal_t *journal = EXT4_SB(sb)->s_journal; |
216 | 215 | ||
217 | EXT4_SB(sb)->s_mount_opt |= EXT4_MOUNT_ABORT; | 216 | EXT4_SB(sb)->s_mount_opt |= EXT4_MOUNT_ABORT; |
218 | if (journal) | 217 | if (journal) |
219 | jbd2_journal_abort(journal, -EIO); | 218 | jbd2_journal_abort(journal, -EIO); |
220 | } | 219 | } |
221 | if (test_opt (sb, ERRORS_RO)) { | 220 | if (test_opt(sb, ERRORS_RO)) { |
222 | printk (KERN_CRIT "Remounting filesystem read-only\n"); | 221 | printk(KERN_CRIT "Remounting filesystem read-only\n"); |
223 | sb->s_flags |= MS_RDONLY; | 222 | sb->s_flags |= MS_RDONLY; |
224 | } | 223 | } |
225 | ext4_commit_super(sb, es, 1); | 224 | ext4_commit_super(sb, es, 1); |
@@ -228,13 +227,13 @@ static void ext4_handle_error(struct super_block *sb) | |||
228 | sb->s_id); | 227 | sb->s_id); |
229 | } | 228 | } |
230 | 229 | ||
231 | void ext4_error (struct super_block * sb, const char * function, | 230 | void ext4_error(struct super_block *sb, const char *function, |
232 | const char * fmt, ...) | 231 | const char *fmt, ...) |
233 | { | 232 | { |
234 | va_list args; | 233 | va_list args; |
235 | 234 | ||
236 | va_start(args, fmt); | 235 | va_start(args, fmt); |
237 | printk(KERN_CRIT "EXT4-fs error (device %s): %s: ",sb->s_id, function); | 236 | printk(KERN_CRIT "EXT4-fs error (device %s): %s: ", sb->s_id, function); |
238 | vprintk(fmt, args); | 237 | vprintk(fmt, args); |
239 | printk("\n"); | 238 | printk("\n"); |
240 | va_end(args); | 239 | va_end(args); |
@@ -242,7 +241,7 @@ void ext4_error (struct super_block * sb, const char * function, | |||
242 | ext4_handle_error(sb); | 241 | ext4_handle_error(sb); |
243 | } | 242 | } |
244 | 243 | ||
245 | static const char *ext4_decode_error(struct super_block * sb, int errno, | 244 | static const char *ext4_decode_error(struct super_block *sb, int errno, |
246 | char nbuf[16]) | 245 | char nbuf[16]) |
247 | { | 246 | { |
248 | char *errstr = NULL; | 247 | char *errstr = NULL; |
@@ -278,8 +277,7 @@ static const char *ext4_decode_error(struct super_block * sb, int errno, | |||
278 | /* __ext4_std_error decodes expected errors from journaling functions | 277 | /* __ext4_std_error decodes expected errors from journaling functions |
279 | * automatically and invokes the appropriate error response. */ | 278 | * automatically and invokes the appropriate error response. */ |
280 | 279 | ||
281 | void __ext4_std_error (struct super_block * sb, const char * function, | 280 | void __ext4_std_error(struct super_block *sb, const char *function, int errno) |
282 | int errno) | ||
283 | { | 281 | { |
284 | char nbuf[16]; | 282 | char nbuf[16]; |
285 | const char *errstr; | 283 | const char *errstr; |
@@ -292,8 +290,8 @@ void __ext4_std_error (struct super_block * sb, const char * function, | |||
292 | return; | 290 | return; |
293 | 291 | ||
294 | errstr = ext4_decode_error(sb, errno, nbuf); | 292 | errstr = ext4_decode_error(sb, errno, nbuf); |
295 | printk (KERN_CRIT "EXT4-fs error (device %s) in %s: %s\n", | 293 | printk(KERN_CRIT "EXT4-fs error (device %s) in %s: %s\n", |
296 | sb->s_id, function, errstr); | 294 | sb->s_id, function, errstr); |
297 | 295 | ||
298 | ext4_handle_error(sb); | 296 | ext4_handle_error(sb); |
299 | } | 297 | } |
@@ -308,15 +306,15 @@ void __ext4_std_error (struct super_block * sb, const char * function, | |||
308 | * case we take the easy way out and panic immediately. | 306 | * case we take the easy way out and panic immediately. |
309 | */ | 307 | */ |
310 | 308 | ||
311 | void ext4_abort (struct super_block * sb, const char * function, | 309 | void ext4_abort(struct super_block *sb, const char *function, |
312 | const char * fmt, ...) | 310 | const char *fmt, ...) |
313 | { | 311 | { |
314 | va_list args; | 312 | va_list args; |
315 | 313 | ||
316 | printk (KERN_CRIT "ext4_abort called.\n"); | 314 | printk(KERN_CRIT "ext4_abort called.\n"); |
317 | 315 | ||
318 | va_start(args, fmt); | 316 | va_start(args, fmt); |
319 | printk(KERN_CRIT "EXT4-fs error (device %s): %s: ",sb->s_id, function); | 317 | printk(KERN_CRIT "EXT4-fs error (device %s): %s: ", sb->s_id, function); |
320 | vprintk(fmt, args); | 318 | vprintk(fmt, args); |
321 | printk("\n"); | 319 | printk("\n"); |
322 | va_end(args); | 320 | va_end(args); |
@@ -334,8 +332,8 @@ void ext4_abort (struct super_block * sb, const char * function, | |||
334 | jbd2_journal_abort(EXT4_SB(sb)->s_journal, -EIO); | 332 | jbd2_journal_abort(EXT4_SB(sb)->s_journal, -EIO); |
335 | } | 333 | } |
336 | 334 | ||
337 | void ext4_warning (struct super_block * sb, const char * function, | 335 | void ext4_warning(struct super_block *sb, const char *function, |
338 | const char * fmt, ...) | 336 | const char *fmt, ...) |
339 | { | 337 | { |
340 | va_list args; | 338 | va_list args; |
341 | 339 | ||
@@ -496,7 +494,7 @@ static void dump_orphan_list(struct super_block *sb, struct ext4_sb_info *sbi) | |||
496 | } | 494 | } |
497 | } | 495 | } |
498 | 496 | ||
499 | static void ext4_put_super (struct super_block * sb) | 497 | static void ext4_put_super(struct super_block *sb) |
500 | { | 498 | { |
501 | struct ext4_sb_info *sbi = EXT4_SB(sb); | 499 | struct ext4_sb_info *sbi = EXT4_SB(sb); |
502 | struct ext4_super_block *es = sbi->s_es; | 500 | struct ext4_super_block *es = sbi->s_es; |
@@ -647,7 +645,8 @@ static void ext4_clear_inode(struct inode *inode) | |||
647 | &EXT4_I(inode)->jinode); | 645 | &EXT4_I(inode)->jinode); |
648 | } | 646 | } |
649 | 647 | ||
650 | static inline void ext4_show_quota_options(struct seq_file *seq, struct super_block *sb) | 648 | static inline void ext4_show_quota_options(struct seq_file *seq, |
649 | struct super_block *sb) | ||
651 | { | 650 | { |
652 | #if defined(CONFIG_QUOTA) | 651 | #if defined(CONFIG_QUOTA) |
653 | struct ext4_sb_info *sbi = EXT4_SB(sb); | 652 | struct ext4_sb_info *sbi = EXT4_SB(sb); |
@@ -822,8 +821,8 @@ static struct dentry *ext4_fh_to_parent(struct super_block *sb, struct fid *fid, | |||
822 | } | 821 | } |
823 | 822 | ||
824 | #ifdef CONFIG_QUOTA | 823 | #ifdef CONFIG_QUOTA |
825 | #define QTYPE2NAME(t) ((t)==USRQUOTA?"user":"group") | 824 | #define QTYPE2NAME(t) ((t) == USRQUOTA?"user":"group") |
826 | #define QTYPE2MOPT(on, t) ((t)==USRQUOTA?((on)##USRJQUOTA):((on)##GRPJQUOTA)) | 825 | #define QTYPE2MOPT(on, t) ((t) == USRQUOTA?((on)##USRJQUOTA):((on)##GRPJQUOTA)) |
827 | 826 | ||
828 | static int ext4_dquot_initialize(struct inode *inode, int type); | 827 | static int ext4_dquot_initialize(struct inode *inode, int type); |
829 | static int ext4_dquot_drop(struct inode *inode); | 828 | static int ext4_dquot_drop(struct inode *inode); |
@@ -991,12 +990,12 @@ static ext4_fsblk_t get_sb_block(void **data) | |||
991 | return sb_block; | 990 | return sb_block; |
992 | } | 991 | } |
993 | 992 | ||
994 | static int parse_options (char *options, struct super_block *sb, | 993 | static int parse_options(char *options, struct super_block *sb, |
995 | unsigned int *inum, unsigned long *journal_devnum, | 994 | unsigned int *inum, unsigned long *journal_devnum, |
996 | ext4_fsblk_t *n_blocks_count, int is_remount) | 995 | ext4_fsblk_t *n_blocks_count, int is_remount) |
997 | { | 996 | { |
998 | struct ext4_sb_info *sbi = EXT4_SB(sb); | 997 | struct ext4_sb_info *sbi = EXT4_SB(sb); |
999 | char * p; | 998 | char *p; |
1000 | substring_t args[MAX_OPT_ARGS]; | 999 | substring_t args[MAX_OPT_ARGS]; |
1001 | int data_opt = 0; | 1000 | int data_opt = 0; |
1002 | int option; | 1001 | int option; |
@@ -1009,7 +1008,7 @@ static int parse_options (char *options, struct super_block *sb, | |||
1009 | if (!options) | 1008 | if (!options) |
1010 | return 1; | 1009 | return 1; |
1011 | 1010 | ||
1012 | while ((p = strsep (&options, ",")) != NULL) { | 1011 | while ((p = strsep(&options, ",")) != NULL) { |
1013 | int token; | 1012 | int token; |
1014 | if (!*p) | 1013 | if (!*p) |
1015 | continue; | 1014 | continue; |
@@ -1017,16 +1016,16 @@ static int parse_options (char *options, struct super_block *sb, | |||
1017 | token = match_token(p, tokens, args); | 1016 | token = match_token(p, tokens, args); |
1018 | switch (token) { | 1017 | switch (token) { |
1019 | case Opt_bsd_df: | 1018 | case Opt_bsd_df: |
1020 | clear_opt (sbi->s_mount_opt, MINIX_DF); | 1019 | clear_opt(sbi->s_mount_opt, MINIX_DF); |
1021 | break; | 1020 | break; |
1022 | case Opt_minix_df: | 1021 | case Opt_minix_df: |
1023 | set_opt (sbi->s_mount_opt, MINIX_DF); | 1022 | set_opt(sbi->s_mount_opt, MINIX_DF); |
1024 | break; | 1023 | break; |
1025 | case Opt_grpid: | 1024 | case Opt_grpid: |
1026 | set_opt (sbi->s_mount_opt, GRPID); | 1025 | set_opt(sbi->s_mount_opt, GRPID); |
1027 | break; | 1026 | break; |
1028 | case Opt_nogrpid: | 1027 | case Opt_nogrpid: |
1029 | clear_opt (sbi->s_mount_opt, GRPID); | 1028 | clear_opt(sbi->s_mount_opt, GRPID); |
1030 | break; | 1029 | break; |
1031 | case Opt_resuid: | 1030 | case Opt_resuid: |
1032 | if (match_int(&args[0], &option)) | 1031 | if (match_int(&args[0], &option)) |
@@ -1043,41 +1042,41 @@ static int parse_options (char *options, struct super_block *sb, | |||
1043 | /* *sb_block = match_int(&args[0]); */ | 1042 | /* *sb_block = match_int(&args[0]); */ |
1044 | break; | 1043 | break; |
1045 | case Opt_err_panic: | 1044 | case Opt_err_panic: |
1046 | clear_opt (sbi->s_mount_opt, ERRORS_CONT); | 1045 | clear_opt(sbi->s_mount_opt, ERRORS_CONT); |
1047 | clear_opt (sbi->s_mount_opt, ERRORS_RO); | 1046 | clear_opt(sbi->s_mount_opt, ERRORS_RO); |
1048 | set_opt (sbi->s_mount_opt, ERRORS_PANIC); | 1047 | set_opt(sbi->s_mount_opt, ERRORS_PANIC); |
1049 | break; | 1048 | break; |
1050 | case Opt_err_ro: | 1049 | case Opt_err_ro: |
1051 | clear_opt (sbi->s_mount_opt, ERRORS_CONT); | 1050 | clear_opt(sbi->s_mount_opt, ERRORS_CONT); |
1052 | clear_opt (sbi->s_mount_opt, ERRORS_PANIC); | 1051 | clear_opt(sbi->s_mount_opt, ERRORS_PANIC); |
1053 | set_opt (sbi->s_mount_opt, ERRORS_RO); | 1052 | set_opt(sbi->s_mount_opt, ERRORS_RO); |
1054 | break; | 1053 | break; |
1055 | case Opt_err_cont: | 1054 | case Opt_err_cont: |
1056 | clear_opt (sbi->s_mount_opt, ERRORS_RO); | 1055 | clear_opt(sbi->s_mount_opt, ERRORS_RO); |
1057 | clear_opt (sbi->s_mount_opt, ERRORS_PANIC); | 1056 | clear_opt(sbi->s_mount_opt, ERRORS_PANIC); |
1058 | set_opt (sbi->s_mount_opt, ERRORS_CONT); | 1057 | set_opt(sbi->s_mount_opt, ERRORS_CONT); |
1059 | break; | 1058 | break; |
1060 | case Opt_nouid32: | 1059 | case Opt_nouid32: |
1061 | set_opt (sbi->s_mount_opt, NO_UID32); | 1060 | set_opt(sbi->s_mount_opt, NO_UID32); |
1062 | break; | 1061 | break; |
1063 | case Opt_nocheck: | 1062 | case Opt_nocheck: |
1064 | clear_opt (sbi->s_mount_opt, CHECK); | 1063 | clear_opt(sbi->s_mount_opt, CHECK); |
1065 | break; | 1064 | break; |
1066 | case Opt_debug: | 1065 | case Opt_debug: |
1067 | set_opt (sbi->s_mount_opt, DEBUG); | 1066 | set_opt(sbi->s_mount_opt, DEBUG); |
1068 | break; | 1067 | break; |
1069 | case Opt_oldalloc: | 1068 | case Opt_oldalloc: |
1070 | set_opt (sbi->s_mount_opt, OLDALLOC); | 1069 | set_opt(sbi->s_mount_opt, OLDALLOC); |
1071 | break; | 1070 | break; |
1072 | case Opt_orlov: | 1071 | case Opt_orlov: |
1073 | clear_opt (sbi->s_mount_opt, OLDALLOC); | 1072 | clear_opt(sbi->s_mount_opt, OLDALLOC); |
1074 | break; | 1073 | break; |
1075 | #ifdef CONFIG_EXT4DEV_FS_XATTR | 1074 | #ifdef CONFIG_EXT4DEV_FS_XATTR |
1076 | case Opt_user_xattr: | 1075 | case Opt_user_xattr: |
1077 | set_opt (sbi->s_mount_opt, XATTR_USER); | 1076 | set_opt(sbi->s_mount_opt, XATTR_USER); |
1078 | break; | 1077 | break; |
1079 | case Opt_nouser_xattr: | 1078 | case Opt_nouser_xattr: |
1080 | clear_opt (sbi->s_mount_opt, XATTR_USER); | 1079 | clear_opt(sbi->s_mount_opt, XATTR_USER); |
1081 | break; | 1080 | break; |
1082 | #else | 1081 | #else |
1083 | case Opt_user_xattr: | 1082 | case Opt_user_xattr: |
@@ -1115,7 +1114,7 @@ static int parse_options (char *options, struct super_block *sb, | |||
1115 | "journal on remount\n"); | 1114 | "journal on remount\n"); |
1116 | return 0; | 1115 | return 0; |
1117 | } | 1116 | } |
1118 | set_opt (sbi->s_mount_opt, UPDATE_JOURNAL); | 1117 | set_opt(sbi->s_mount_opt, UPDATE_JOURNAL); |
1119 | break; | 1118 | break; |
1120 | case Opt_journal_inum: | 1119 | case Opt_journal_inum: |
1121 | if (is_remount) { | 1120 | if (is_remount) { |
@@ -1145,7 +1144,7 @@ static int parse_options (char *options, struct super_block *sb, | |||
1145 | set_opt(sbi->s_mount_opt, JOURNAL_CHECKSUM); | 1144 | set_opt(sbi->s_mount_opt, JOURNAL_CHECKSUM); |
1146 | break; | 1145 | break; |
1147 | case Opt_noload: | 1146 | case Opt_noload: |
1148 | set_opt (sbi->s_mount_opt, NOLOAD); | 1147 | set_opt(sbi->s_mount_opt, NOLOAD); |
1149 | break; | 1148 | break; |
1150 | case Opt_commit: | 1149 | case Opt_commit: |
1151 | if (match_int(&args[0], &option)) | 1150 | if (match_int(&args[0], &option)) |
@@ -1331,7 +1330,7 @@ set_qf_format: | |||
1331 | "on this filesystem, use tune2fs\n"); | 1330 | "on this filesystem, use tune2fs\n"); |
1332 | return 0; | 1331 | return 0; |
1333 | } | 1332 | } |
1334 | set_opt (sbi->s_mount_opt, EXTENTS); | 1333 | set_opt(sbi->s_mount_opt, EXTENTS); |
1335 | break; | 1334 | break; |
1336 | case Opt_noextents: | 1335 | case Opt_noextents: |
1337 | /* | 1336 | /* |
@@ -1348,7 +1347,7 @@ set_qf_format: | |||
1348 | "-o noextents options\n"); | 1347 | "-o noextents options\n"); |
1349 | return 0; | 1348 | return 0; |
1350 | } | 1349 | } |
1351 | clear_opt (sbi->s_mount_opt, EXTENTS); | 1350 | clear_opt(sbi->s_mount_opt, EXTENTS); |
1352 | break; | 1351 | break; |
1353 | case Opt_i_version: | 1352 | case Opt_i_version: |
1354 | set_opt(sbi->s_mount_opt, I_VERSION); | 1353 | set_opt(sbi->s_mount_opt, I_VERSION); |
@@ -1374,9 +1373,9 @@ set_qf_format: | |||
1374 | set_opt(sbi->s_mount_opt, DELALLOC); | 1373 | set_opt(sbi->s_mount_opt, DELALLOC); |
1375 | break; | 1374 | break; |
1376 | default: | 1375 | default: |
1377 | printk (KERN_ERR | 1376 | printk(KERN_ERR |
1378 | "EXT4-fs: Unrecognized mount option \"%s\" " | 1377 | "EXT4-fs: Unrecognized mount option \"%s\" " |
1379 | "or missing value\n", p); | 1378 | "or missing value\n", p); |
1380 | return 0; | 1379 | return 0; |
1381 | } | 1380 | } |
1382 | } | 1381 | } |
@@ -1423,31 +1422,31 @@ static int ext4_setup_super(struct super_block *sb, struct ext4_super_block *es, | |||
1423 | int res = 0; | 1422 | int res = 0; |
1424 | 1423 | ||
1425 | if (le32_to_cpu(es->s_rev_level) > EXT4_MAX_SUPP_REV) { | 1424 | if (le32_to_cpu(es->s_rev_level) > EXT4_MAX_SUPP_REV) { |
1426 | printk (KERN_ERR "EXT4-fs warning: revision level too high, " | 1425 | printk(KERN_ERR "EXT4-fs warning: revision level too high, " |
1427 | "forcing read-only mode\n"); | 1426 | "forcing read-only mode\n"); |
1428 | res = MS_RDONLY; | 1427 | res = MS_RDONLY; |
1429 | } | 1428 | } |
1430 | if (read_only) | 1429 | if (read_only) |
1431 | return res; | 1430 | return res; |
1432 | if (!(sbi->s_mount_state & EXT4_VALID_FS)) | 1431 | if (!(sbi->s_mount_state & EXT4_VALID_FS)) |
1433 | printk (KERN_WARNING "EXT4-fs warning: mounting unchecked fs, " | 1432 | printk(KERN_WARNING "EXT4-fs warning: mounting unchecked fs, " |
1434 | "running e2fsck is recommended\n"); | 1433 | "running e2fsck is recommended\n"); |
1435 | else if ((sbi->s_mount_state & EXT4_ERROR_FS)) | 1434 | else if ((sbi->s_mount_state & EXT4_ERROR_FS)) |
1436 | printk (KERN_WARNING | 1435 | printk(KERN_WARNING |
1437 | "EXT4-fs warning: mounting fs with errors, " | 1436 | "EXT4-fs warning: mounting fs with errors, " |
1438 | "running e2fsck is recommended\n"); | 1437 | "running e2fsck is recommended\n"); |
1439 | else if ((__s16) le16_to_cpu(es->s_max_mnt_count) >= 0 && | 1438 | else if ((__s16) le16_to_cpu(es->s_max_mnt_count) >= 0 && |
1440 | le16_to_cpu(es->s_mnt_count) >= | 1439 | le16_to_cpu(es->s_mnt_count) >= |
1441 | (unsigned short) (__s16) le16_to_cpu(es->s_max_mnt_count)) | 1440 | (unsigned short) (__s16) le16_to_cpu(es->s_max_mnt_count)) |
1442 | printk (KERN_WARNING | 1441 | printk(KERN_WARNING |
1443 | "EXT4-fs warning: maximal mount count reached, " | 1442 | "EXT4-fs warning: maximal mount count reached, " |
1444 | "running e2fsck is recommended\n"); | 1443 | "running e2fsck is recommended\n"); |
1445 | else if (le32_to_cpu(es->s_checkinterval) && | 1444 | else if (le32_to_cpu(es->s_checkinterval) && |
1446 | (le32_to_cpu(es->s_lastcheck) + | 1445 | (le32_to_cpu(es->s_lastcheck) + |
1447 | le32_to_cpu(es->s_checkinterval) <= get_seconds())) | 1446 | le32_to_cpu(es->s_checkinterval) <= get_seconds())) |
1448 | printk (KERN_WARNING | 1447 | printk(KERN_WARNING |
1449 | "EXT4-fs warning: checktime reached, " | 1448 | "EXT4-fs warning: checktime reached, " |
1450 | "running e2fsck is recommended\n"); | 1449 | "running e2fsck is recommended\n"); |
1451 | #if 0 | 1450 | #if 0 |
1452 | /* @@@ We _will_ want to clear the valid bit if we find | 1451 | /* @@@ We _will_ want to clear the valid bit if we find |
1453 | * inconsistencies, to force a fsck at reboot. But for | 1452 | * inconsistencies, to force a fsck at reboot. But for |
@@ -1506,14 +1505,13 @@ static int ext4_fill_flex_info(struct super_block *sb) | |||
1506 | 1505 | ||
1507 | flex_group_count = (sbi->s_groups_count + groups_per_flex - 1) / | 1506 | flex_group_count = (sbi->s_groups_count + groups_per_flex - 1) / |
1508 | groups_per_flex; | 1507 | groups_per_flex; |
1509 | sbi->s_flex_groups = kmalloc(flex_group_count * | 1508 | sbi->s_flex_groups = kzalloc(flex_group_count * |
1510 | sizeof(struct flex_groups), GFP_KERNEL); | 1509 | sizeof(struct flex_groups), GFP_KERNEL); |
1511 | if (sbi->s_flex_groups == NULL) { | 1510 | if (sbi->s_flex_groups == NULL) { |
1512 | printk(KERN_ERR "EXT4-fs: not enough memory\n"); | 1511 | printk(KERN_ERR "EXT4-fs: not enough memory for " |
1512 | "%lu flex groups\n", flex_group_count); | ||
1513 | goto failed; | 1513 | goto failed; |
1514 | } | 1514 | } |
1515 | memset(sbi->s_flex_groups, 0, flex_group_count * | ||
1516 | sizeof(struct flex_groups)); | ||
1517 | 1515 | ||
1518 | gdp = ext4_get_group_desc(sb, 1, &bh); | 1516 | gdp = ext4_get_group_desc(sb, 1, &bh); |
1519 | block_bitmap = ext4_block_bitmap(sb, gdp) - 1; | 1517 | block_bitmap = ext4_block_bitmap(sb, gdp) - 1; |
@@ -1597,16 +1595,14 @@ static int ext4_check_descriptors(struct super_block *sb) | |||
1597 | (EXT4_BLOCKS_PER_GROUP(sb) - 1); | 1595 | (EXT4_BLOCKS_PER_GROUP(sb) - 1); |
1598 | 1596 | ||
1599 | block_bitmap = ext4_block_bitmap(sb, gdp); | 1597 | block_bitmap = ext4_block_bitmap(sb, gdp); |
1600 | if (block_bitmap < first_block || block_bitmap > last_block) | 1598 | if (block_bitmap < first_block || block_bitmap > last_block) { |
1601 | { | ||
1602 | printk(KERN_ERR "EXT4-fs: ext4_check_descriptors: " | 1599 | printk(KERN_ERR "EXT4-fs: ext4_check_descriptors: " |
1603 | "Block bitmap for group %lu not in group " | 1600 | "Block bitmap for group %lu not in group " |
1604 | "(block %llu)!", i, block_bitmap); | 1601 | "(block %llu)!", i, block_bitmap); |
1605 | return 0; | 1602 | return 0; |
1606 | } | 1603 | } |
1607 | inode_bitmap = ext4_inode_bitmap(sb, gdp); | 1604 | inode_bitmap = ext4_inode_bitmap(sb, gdp); |
1608 | if (inode_bitmap < first_block || inode_bitmap > last_block) | 1605 | if (inode_bitmap < first_block || inode_bitmap > last_block) { |
1609 | { | ||
1610 | printk(KERN_ERR "EXT4-fs: ext4_check_descriptors: " | 1606 | printk(KERN_ERR "EXT4-fs: ext4_check_descriptors: " |
1611 | "Inode bitmap for group %lu not in group " | 1607 | "Inode bitmap for group %lu not in group " |
1612 | "(block %llu)!", i, inode_bitmap); | 1608 | "(block %llu)!", i, inode_bitmap); |
@@ -1614,26 +1610,28 @@ static int ext4_check_descriptors(struct super_block *sb) | |||
1614 | } | 1610 | } |
1615 | inode_table = ext4_inode_table(sb, gdp); | 1611 | inode_table = ext4_inode_table(sb, gdp); |
1616 | if (inode_table < first_block || | 1612 | if (inode_table < first_block || |
1617 | inode_table + sbi->s_itb_per_group - 1 > last_block) | 1613 | inode_table + sbi->s_itb_per_group - 1 > last_block) { |
1618 | { | ||
1619 | printk(KERN_ERR "EXT4-fs: ext4_check_descriptors: " | 1614 | printk(KERN_ERR "EXT4-fs: ext4_check_descriptors: " |
1620 | "Inode table for group %lu not in group " | 1615 | "Inode table for group %lu not in group " |
1621 | "(block %llu)!", i, inode_table); | 1616 | "(block %llu)!", i, inode_table); |
1622 | return 0; | 1617 | return 0; |
1623 | } | 1618 | } |
1619 | spin_lock(sb_bgl_lock(sbi, i)); | ||
1624 | if (!ext4_group_desc_csum_verify(sbi, i, gdp)) { | 1620 | if (!ext4_group_desc_csum_verify(sbi, i, gdp)) { |
1625 | printk(KERN_ERR "EXT4-fs: ext4_check_descriptors: " | 1621 | printk(KERN_ERR "EXT4-fs: ext4_check_descriptors: " |
1626 | "Checksum for group %lu failed (%u!=%u)\n", | 1622 | "Checksum for group %lu failed (%u!=%u)\n", |
1627 | i, le16_to_cpu(ext4_group_desc_csum(sbi, i, | 1623 | i, le16_to_cpu(ext4_group_desc_csum(sbi, i, |
1628 | gdp)), le16_to_cpu(gdp->bg_checksum)); | 1624 | gdp)), le16_to_cpu(gdp->bg_checksum)); |
1629 | return 0; | 1625 | if (!(sb->s_flags & MS_RDONLY)) |
1626 | return 0; | ||
1630 | } | 1627 | } |
1628 | spin_unlock(sb_bgl_lock(sbi, i)); | ||
1631 | if (!flexbg_flag) | 1629 | if (!flexbg_flag) |
1632 | first_block += EXT4_BLOCKS_PER_GROUP(sb); | 1630 | first_block += EXT4_BLOCKS_PER_GROUP(sb); |
1633 | } | 1631 | } |
1634 | 1632 | ||
1635 | ext4_free_blocks_count_set(sbi->s_es, ext4_count_free_blocks(sb)); | 1633 | ext4_free_blocks_count_set(sbi->s_es, ext4_count_free_blocks(sb)); |
1636 | sbi->s_es->s_free_inodes_count=cpu_to_le32(ext4_count_free_inodes(sb)); | 1634 | sbi->s_es->s_free_inodes_count = cpu_to_le32(ext4_count_free_inodes(sb)); |
1637 | return 1; | 1635 | return 1; |
1638 | } | 1636 | } |
1639 | 1637 | ||
@@ -1654,8 +1652,8 @@ static int ext4_check_descriptors(struct super_block *sb) | |||
1654 | * e2fsck was run on this filesystem, and it must have already done the orphan | 1652 | * e2fsck was run on this filesystem, and it must have already done the orphan |
1655 | * inode cleanup for us, so we can safely abort without any further action. | 1653 | * inode cleanup for us, so we can safely abort without any further action. |
1656 | */ | 1654 | */ |
1657 | static void ext4_orphan_cleanup (struct super_block * sb, | 1655 | static void ext4_orphan_cleanup(struct super_block *sb, |
1658 | struct ext4_super_block * es) | 1656 | struct ext4_super_block *es) |
1659 | { | 1657 | { |
1660 | unsigned int s_flags = sb->s_flags; | 1658 | unsigned int s_flags = sb->s_flags; |
1661 | int nr_orphans = 0, nr_truncates = 0; | 1659 | int nr_orphans = 0, nr_truncates = 0; |
@@ -1732,7 +1730,7 @@ static void ext4_orphan_cleanup (struct super_block * sb, | |||
1732 | iput(inode); /* The delete magic happens here! */ | 1730 | iput(inode); /* The delete magic happens here! */ |
1733 | } | 1731 | } |
1734 | 1732 | ||
1735 | #define PLURAL(x) (x), ((x)==1) ? "" : "s" | 1733 | #define PLURAL(x) (x), ((x) == 1) ? "" : "s" |
1736 | 1734 | ||
1737 | if (nr_orphans) | 1735 | if (nr_orphans) |
1738 | printk(KERN_INFO "EXT4-fs: %s: %d orphan inode%s deleted\n", | 1736 | printk(KERN_INFO "EXT4-fs: %s: %d orphan inode%s deleted\n", |
@@ -1899,12 +1897,12 @@ static unsigned long ext4_get_stripe_size(struct ext4_sb_info *sbi) | |||
1899 | return 0; | 1897 | return 0; |
1900 | } | 1898 | } |
1901 | 1899 | ||
1902 | static int ext4_fill_super (struct super_block *sb, void *data, int silent) | 1900 | static int ext4_fill_super(struct super_block *sb, void *data, int silent) |
1903 | __releases(kernel_lock) | 1901 | __releases(kernel_lock) |
1904 | __acquires(kernel_lock) | 1902 | __acquires(kernel_lock) |
1905 | 1903 | ||
1906 | { | 1904 | { |
1907 | struct buffer_head * bh; | 1905 | struct buffer_head *bh; |
1908 | struct ext4_super_block *es = NULL; | 1906 | struct ext4_super_block *es = NULL; |
1909 | struct ext4_sb_info *sbi; | 1907 | struct ext4_sb_info *sbi; |
1910 | ext4_fsblk_t block; | 1908 | ext4_fsblk_t block; |
@@ -1953,7 +1951,7 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent) | |||
1953 | } | 1951 | } |
1954 | 1952 | ||
1955 | if (!(bh = sb_bread(sb, logical_sb_block))) { | 1953 | if (!(bh = sb_bread(sb, logical_sb_block))) { |
1956 | printk (KERN_ERR "EXT4-fs: unable to read superblock\n"); | 1954 | printk(KERN_ERR "EXT4-fs: unable to read superblock\n"); |
1957 | goto out_fail; | 1955 | goto out_fail; |
1958 | } | 1956 | } |
1959 | /* | 1957 | /* |
@@ -2026,8 +2024,8 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent) | |||
2026 | set_opt(sbi->s_mount_opt, DELALLOC); | 2024 | set_opt(sbi->s_mount_opt, DELALLOC); |
2027 | 2025 | ||
2028 | 2026 | ||
2029 | if (!parse_options ((char *) data, sb, &journal_inum, &journal_devnum, | 2027 | if (!parse_options((char *) data, sb, &journal_inum, &journal_devnum, |
2030 | NULL, 0)) | 2028 | NULL, 0)) |
2031 | goto failed_mount; | 2029 | goto failed_mount; |
2032 | 2030 | ||
2033 | sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | | 2031 | sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | |
@@ -2102,7 +2100,7 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent) | |||
2102 | goto failed_mount; | 2100 | goto failed_mount; |
2103 | } | 2101 | } |
2104 | 2102 | ||
2105 | brelse (bh); | 2103 | brelse(bh); |
2106 | logical_sb_block = sb_block * EXT4_MIN_BLOCK_SIZE; | 2104 | logical_sb_block = sb_block * EXT4_MIN_BLOCK_SIZE; |
2107 | offset = do_div(logical_sb_block, blocksize); | 2105 | offset = do_div(logical_sb_block, blocksize); |
2108 | bh = sb_bread(sb, logical_sb_block); | 2106 | bh = sb_bread(sb, logical_sb_block); |
@@ -2114,8 +2112,8 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent) | |||
2114 | es = (struct ext4_super_block *)(((char *)bh->b_data) + offset); | 2112 | es = (struct ext4_super_block *)(((char *)bh->b_data) + offset); |
2115 | sbi->s_es = es; | 2113 | sbi->s_es = es; |
2116 | if (es->s_magic != cpu_to_le16(EXT4_SUPER_MAGIC)) { | 2114 | if (es->s_magic != cpu_to_le16(EXT4_SUPER_MAGIC)) { |
2117 | printk (KERN_ERR | 2115 | printk(KERN_ERR |
2118 | "EXT4-fs: Magic mismatch, very weird !\n"); | 2116 | "EXT4-fs: Magic mismatch, very weird !\n"); |
2119 | goto failed_mount; | 2117 | goto failed_mount; |
2120 | } | 2118 | } |
2121 | } | 2119 | } |
@@ -2132,9 +2130,9 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent) | |||
2132 | if ((sbi->s_inode_size < EXT4_GOOD_OLD_INODE_SIZE) || | 2130 | if ((sbi->s_inode_size < EXT4_GOOD_OLD_INODE_SIZE) || |
2133 | (!is_power_of_2(sbi->s_inode_size)) || | 2131 | (!is_power_of_2(sbi->s_inode_size)) || |
2134 | (sbi->s_inode_size > blocksize)) { | 2132 | (sbi->s_inode_size > blocksize)) { |
2135 | printk (KERN_ERR | 2133 | printk(KERN_ERR |
2136 | "EXT4-fs: unsupported inode size: %d\n", | 2134 | "EXT4-fs: unsupported inode size: %d\n", |
2137 | sbi->s_inode_size); | 2135 | sbi->s_inode_size); |
2138 | goto failed_mount; | 2136 | goto failed_mount; |
2139 | } | 2137 | } |
2140 | if (sbi->s_inode_size > EXT4_GOOD_OLD_INODE_SIZE) | 2138 | if (sbi->s_inode_size > EXT4_GOOD_OLD_INODE_SIZE) |
@@ -2166,20 +2164,20 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent) | |||
2166 | sbi->s_mount_state = le16_to_cpu(es->s_state); | 2164 | sbi->s_mount_state = le16_to_cpu(es->s_state); |
2167 | sbi->s_addr_per_block_bits = ilog2(EXT4_ADDR_PER_BLOCK(sb)); | 2165 | sbi->s_addr_per_block_bits = ilog2(EXT4_ADDR_PER_BLOCK(sb)); |
2168 | sbi->s_desc_per_block_bits = ilog2(EXT4_DESC_PER_BLOCK(sb)); | 2166 | sbi->s_desc_per_block_bits = ilog2(EXT4_DESC_PER_BLOCK(sb)); |
2169 | for (i=0; i < 4; i++) | 2167 | for (i = 0; i < 4; i++) |
2170 | sbi->s_hash_seed[i] = le32_to_cpu(es->s_hash_seed[i]); | 2168 | sbi->s_hash_seed[i] = le32_to_cpu(es->s_hash_seed[i]); |
2171 | sbi->s_def_hash_version = es->s_def_hash_version; | 2169 | sbi->s_def_hash_version = es->s_def_hash_version; |
2172 | 2170 | ||
2173 | if (sbi->s_blocks_per_group > blocksize * 8) { | 2171 | if (sbi->s_blocks_per_group > blocksize * 8) { |
2174 | printk (KERN_ERR | 2172 | printk(KERN_ERR |
2175 | "EXT4-fs: #blocks per group too big: %lu\n", | 2173 | "EXT4-fs: #blocks per group too big: %lu\n", |
2176 | sbi->s_blocks_per_group); | 2174 | sbi->s_blocks_per_group); |
2177 | goto failed_mount; | 2175 | goto failed_mount; |
2178 | } | 2176 | } |
2179 | if (sbi->s_inodes_per_group > blocksize * 8) { | 2177 | if (sbi->s_inodes_per_group > blocksize * 8) { |
2180 | printk (KERN_ERR | 2178 | printk(KERN_ERR |
2181 | "EXT4-fs: #inodes per group too big: %lu\n", | 2179 | "EXT4-fs: #inodes per group too big: %lu\n", |
2182 | sbi->s_inodes_per_group); | 2180 | sbi->s_inodes_per_group); |
2183 | goto failed_mount; | 2181 | goto failed_mount; |
2184 | } | 2182 | } |
2185 | 2183 | ||
@@ -2213,10 +2211,10 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent) | |||
2213 | sbi->s_groups_count = blocks_count; | 2211 | sbi->s_groups_count = blocks_count; |
2214 | db_count = (sbi->s_groups_count + EXT4_DESC_PER_BLOCK(sb) - 1) / | 2212 | db_count = (sbi->s_groups_count + EXT4_DESC_PER_BLOCK(sb) - 1) / |
2215 | EXT4_DESC_PER_BLOCK(sb); | 2213 | EXT4_DESC_PER_BLOCK(sb); |
2216 | sbi->s_group_desc = kmalloc(db_count * sizeof (struct buffer_head *), | 2214 | sbi->s_group_desc = kmalloc(db_count * sizeof(struct buffer_head *), |
2217 | GFP_KERNEL); | 2215 | GFP_KERNEL); |
2218 | if (sbi->s_group_desc == NULL) { | 2216 | if (sbi->s_group_desc == NULL) { |
2219 | printk (KERN_ERR "EXT4-fs: not enough memory\n"); | 2217 | printk(KERN_ERR "EXT4-fs: not enough memory\n"); |
2220 | goto failed_mount; | 2218 | goto failed_mount; |
2221 | } | 2219 | } |
2222 | 2220 | ||
@@ -2226,13 +2224,13 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent) | |||
2226 | block = descriptor_loc(sb, logical_sb_block, i); | 2224 | block = descriptor_loc(sb, logical_sb_block, i); |
2227 | sbi->s_group_desc[i] = sb_bread(sb, block); | 2225 | sbi->s_group_desc[i] = sb_bread(sb, block); |
2228 | if (!sbi->s_group_desc[i]) { | 2226 | if (!sbi->s_group_desc[i]) { |
2229 | printk (KERN_ERR "EXT4-fs: " | 2227 | printk(KERN_ERR "EXT4-fs: " |
2230 | "can't read group descriptor %d\n", i); | 2228 | "can't read group descriptor %d\n", i); |
2231 | db_count = i; | 2229 | db_count = i; |
2232 | goto failed_mount2; | 2230 | goto failed_mount2; |
2233 | } | 2231 | } |
2234 | } | 2232 | } |
2235 | if (!ext4_check_descriptors (sb)) { | 2233 | if (!ext4_check_descriptors(sb)) { |
2236 | printk(KERN_ERR "EXT4-fs: group descriptors corrupted!\n"); | 2234 | printk(KERN_ERR "EXT4-fs: group descriptors corrupted!\n"); |
2237 | goto failed_mount2; | 2235 | goto failed_mount2; |
2238 | } | 2236 | } |
@@ -2308,11 +2306,11 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent) | |||
2308 | EXT4_SB(sb)->s_journal->j_failed_commit) { | 2306 | EXT4_SB(sb)->s_journal->j_failed_commit) { |
2309 | printk(KERN_CRIT "EXT4-fs error (device %s): " | 2307 | printk(KERN_CRIT "EXT4-fs error (device %s): " |
2310 | "ext4_fill_super: Journal transaction " | 2308 | "ext4_fill_super: Journal transaction " |
2311 | "%u is corrupt\n", sb->s_id, | 2309 | "%u is corrupt\n", sb->s_id, |
2312 | EXT4_SB(sb)->s_journal->j_failed_commit); | 2310 | EXT4_SB(sb)->s_journal->j_failed_commit); |
2313 | if (test_opt (sb, ERRORS_RO)) { | 2311 | if (test_opt(sb, ERRORS_RO)) { |
2314 | printk (KERN_CRIT | 2312 | printk(KERN_CRIT |
2315 | "Mounting filesystem read-only\n"); | 2313 | "Mounting filesystem read-only\n"); |
2316 | sb->s_flags |= MS_RDONLY; | 2314 | sb->s_flags |= MS_RDONLY; |
2317 | EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS; | 2315 | EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS; |
2318 | es->s_state |= cpu_to_le16(EXT4_ERROR_FS); | 2316 | es->s_state |= cpu_to_le16(EXT4_ERROR_FS); |
@@ -2332,9 +2330,9 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent) | |||
2332 | goto failed_mount3; | 2330 | goto failed_mount3; |
2333 | } else { | 2331 | } else { |
2334 | if (!silent) | 2332 | if (!silent) |
2335 | printk (KERN_ERR | 2333 | printk(KERN_ERR |
2336 | "ext4: No journal on filesystem on %s\n", | 2334 | "ext4: No journal on filesystem on %s\n", |
2337 | sb->s_id); | 2335 | sb->s_id); |
2338 | goto failed_mount3; | 2336 | goto failed_mount3; |
2339 | } | 2337 | } |
2340 | 2338 | ||
@@ -2418,7 +2416,7 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent) | |||
2418 | goto failed_mount4; | 2416 | goto failed_mount4; |
2419 | } | 2417 | } |
2420 | 2418 | ||
2421 | ext4_setup_super (sb, es, sb->s_flags & MS_RDONLY); | 2419 | ext4_setup_super(sb, es, sb->s_flags & MS_RDONLY); |
2422 | 2420 | ||
2423 | /* determine the minimum size of new large inodes, if present */ | 2421 | /* determine the minimum size of new large inodes, if present */ |
2424 | if (sbi->s_inode_size > EXT4_GOOD_OLD_INODE_SIZE) { | 2422 | if (sbi->s_inode_size > EXT4_GOOD_OLD_INODE_SIZE) { |
@@ -2457,12 +2455,12 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent) | |||
2457 | ext4_orphan_cleanup(sb, es); | 2455 | ext4_orphan_cleanup(sb, es); |
2458 | EXT4_SB(sb)->s_mount_state &= ~EXT4_ORPHAN_FS; | 2456 | EXT4_SB(sb)->s_mount_state &= ~EXT4_ORPHAN_FS; |
2459 | if (needs_recovery) | 2457 | if (needs_recovery) |
2460 | printk (KERN_INFO "EXT4-fs: recovery complete.\n"); | 2458 | printk(KERN_INFO "EXT4-fs: recovery complete.\n"); |
2461 | ext4_mark_recovery_complete(sb, es); | 2459 | ext4_mark_recovery_complete(sb, es); |
2462 | printk (KERN_INFO "EXT4-fs: mounted filesystem with %s data mode.\n", | 2460 | printk(KERN_INFO "EXT4-fs: mounted filesystem with %s data mode.\n", |
2463 | test_opt(sb,DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA ? "journal": | 2461 | test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA ? "journal": |
2464 | test_opt(sb,DATA_FLAGS) == EXT4_MOUNT_ORDERED_DATA ? "ordered": | 2462 | test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_ORDERED_DATA ? "ordered": |
2465 | "writeback"); | 2463 | "writeback"); |
2466 | 2464 | ||
2467 | if (test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA) { | 2465 | if (test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA) { |
2468 | printk(KERN_WARNING "EXT4-fs: Ignoring delalloc option - " | 2466 | printk(KERN_WARNING "EXT4-fs: Ignoring delalloc option - " |
@@ -2575,14 +2573,14 @@ static journal_t *ext4_get_journal(struct super_block *sb, | |||
2575 | static journal_t *ext4_get_dev_journal(struct super_block *sb, | 2573 | static journal_t *ext4_get_dev_journal(struct super_block *sb, |
2576 | dev_t j_dev) | 2574 | dev_t j_dev) |
2577 | { | 2575 | { |
2578 | struct buffer_head * bh; | 2576 | struct buffer_head *bh; |
2579 | journal_t *journal; | 2577 | journal_t *journal; |
2580 | ext4_fsblk_t start; | 2578 | ext4_fsblk_t start; |
2581 | ext4_fsblk_t len; | 2579 | ext4_fsblk_t len; |
2582 | int hblock, blocksize; | 2580 | int hblock, blocksize; |
2583 | ext4_fsblk_t sb_block; | 2581 | ext4_fsblk_t sb_block; |
2584 | unsigned long offset; | 2582 | unsigned long offset; |
2585 | struct ext4_super_block * es; | 2583 | struct ext4_super_block *es; |
2586 | struct block_device *bdev; | 2584 | struct block_device *bdev; |
2587 | 2585 | ||
2588 | bdev = ext4_blkdev_get(j_dev); | 2586 | bdev = ext4_blkdev_get(j_dev); |
@@ -2697,8 +2695,8 @@ static int ext4_load_journal(struct super_block *sb, | |||
2697 | "unavailable, cannot proceed.\n"); | 2695 | "unavailable, cannot proceed.\n"); |
2698 | return -EROFS; | 2696 | return -EROFS; |
2699 | } | 2697 | } |
2700 | printk (KERN_INFO "EXT4-fs: write access will " | 2698 | printk(KERN_INFO "EXT4-fs: write access will " |
2701 | "be enabled during recovery.\n"); | 2699 | "be enabled during recovery.\n"); |
2702 | } | 2700 | } |
2703 | } | 2701 | } |
2704 | 2702 | ||
@@ -2751,8 +2749,8 @@ static int ext4_load_journal(struct super_block *sb, | |||
2751 | return 0; | 2749 | return 0; |
2752 | } | 2750 | } |
2753 | 2751 | ||
2754 | static int ext4_create_journal(struct super_block * sb, | 2752 | static int ext4_create_journal(struct super_block *sb, |
2755 | struct ext4_super_block * es, | 2753 | struct ext4_super_block *es, |
2756 | unsigned int journal_inum) | 2754 | unsigned int journal_inum) |
2757 | { | 2755 | { |
2758 | journal_t *journal; | 2756 | journal_t *journal; |
@@ -2793,9 +2791,8 @@ static int ext4_create_journal(struct super_block * sb, | |||
2793 | return 0; | 2791 | return 0; |
2794 | } | 2792 | } |
2795 | 2793 | ||
2796 | static void ext4_commit_super (struct super_block * sb, | 2794 | static void ext4_commit_super(struct super_block *sb, |
2797 | struct ext4_super_block * es, | 2795 | struct ext4_super_block *es, int sync) |
2798 | int sync) | ||
2799 | { | 2796 | { |
2800 | struct buffer_head *sbh = EXT4_SB(sb)->s_sbh; | 2797 | struct buffer_head *sbh = EXT4_SB(sb)->s_sbh; |
2801 | 2798 | ||
@@ -2816,8 +2813,8 @@ static void ext4_commit_super (struct super_block * sb, | |||
2816 | * remounting) the filesystem readonly, then we will end up with a | 2813 | * remounting) the filesystem readonly, then we will end up with a |
2817 | * consistent fs on disk. Record that fact. | 2814 | * consistent fs on disk. Record that fact. |
2818 | */ | 2815 | */ |
2819 | static void ext4_mark_recovery_complete(struct super_block * sb, | 2816 | static void ext4_mark_recovery_complete(struct super_block *sb, |
2820 | struct ext4_super_block * es) | 2817 | struct ext4_super_block *es) |
2821 | { | 2818 | { |
2822 | journal_t *journal = EXT4_SB(sb)->s_journal; | 2819 | journal_t *journal = EXT4_SB(sb)->s_journal; |
2823 | 2820 | ||
@@ -2839,8 +2836,8 @@ static void ext4_mark_recovery_complete(struct super_block * sb, | |||
2839 | * has recorded an error from a previous lifetime, move that error to the | 2836 | * has recorded an error from a previous lifetime, move that error to the |
2840 | * main filesystem now. | 2837 | * main filesystem now. |
2841 | */ | 2838 | */ |
2842 | static void ext4_clear_journal_err(struct super_block * sb, | 2839 | static void ext4_clear_journal_err(struct super_block *sb, |
2843 | struct ext4_super_block * es) | 2840 | struct ext4_super_block *es) |
2844 | { | 2841 | { |
2845 | journal_t *journal; | 2842 | journal_t *journal; |
2846 | int j_errno; | 2843 | int j_errno; |
@@ -2865,7 +2862,7 @@ static void ext4_clear_journal_err(struct super_block * sb, | |||
2865 | 2862 | ||
2866 | EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS; | 2863 | EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS; |
2867 | es->s_state |= cpu_to_le16(EXT4_ERROR_FS); | 2864 | es->s_state |= cpu_to_le16(EXT4_ERROR_FS); |
2868 | ext4_commit_super (sb, es, 1); | 2865 | ext4_commit_super(sb, es, 1); |
2869 | 2866 | ||
2870 | jbd2_journal_clear_err(journal); | 2867 | jbd2_journal_clear_err(journal); |
2871 | } | 2868 | } |
@@ -2898,7 +2895,7 @@ int ext4_force_commit(struct super_block *sb) | |||
2898 | * This implicitly triggers the writebehind on sync(). | 2895 | * This implicitly triggers the writebehind on sync(). |
2899 | */ | 2896 | */ |
2900 | 2897 | ||
2901 | static void ext4_write_super (struct super_block * sb) | 2898 | static void ext4_write_super(struct super_block *sb) |
2902 | { | 2899 | { |
2903 | if (mutex_trylock(&sb->s_lock) != 0) | 2900 | if (mutex_trylock(&sb->s_lock) != 0) |
2904 | BUG(); | 2901 | BUG(); |
@@ -2954,13 +2951,14 @@ static void ext4_unlockfs(struct super_block *sb) | |||
2954 | } | 2951 | } |
2955 | } | 2952 | } |
2956 | 2953 | ||
2957 | static int ext4_remount (struct super_block * sb, int * flags, char * data) | 2954 | static int ext4_remount(struct super_block *sb, int *flags, char *data) |
2958 | { | 2955 | { |
2959 | struct ext4_super_block * es; | 2956 | struct ext4_super_block *es; |
2960 | struct ext4_sb_info *sbi = EXT4_SB(sb); | 2957 | struct ext4_sb_info *sbi = EXT4_SB(sb); |
2961 | ext4_fsblk_t n_blocks_count = 0; | 2958 | ext4_fsblk_t n_blocks_count = 0; |
2962 | unsigned long old_sb_flags; | 2959 | unsigned long old_sb_flags; |
2963 | struct ext4_mount_options old_opts; | 2960 | struct ext4_mount_options old_opts; |
2961 | ext4_group_t g; | ||
2964 | int err; | 2962 | int err; |
2965 | #ifdef CONFIG_QUOTA | 2963 | #ifdef CONFIG_QUOTA |
2966 | int i; | 2964 | int i; |
@@ -3039,6 +3037,26 @@ static int ext4_remount (struct super_block * sb, int * flags, char * data) | |||
3039 | } | 3037 | } |
3040 | 3038 | ||
3041 | /* | 3039 | /* |
3040 | * Make sure the group descriptor checksums | ||
3041 | * are sane. If they aren't, refuse to | ||
3042 | * remount r/w. | ||
3043 | */ | ||
3044 | for (g = 0; g < sbi->s_groups_count; g++) { | ||
3045 | struct ext4_group_desc *gdp = | ||
3046 | ext4_get_group_desc(sb, g, NULL); | ||
3047 | |||
3048 | if (!ext4_group_desc_csum_verify(sbi, g, gdp)) { | ||
3049 | printk(KERN_ERR | ||
3050 | "EXT4-fs: ext4_remount: " | ||
3051 | "Checksum for group %lu failed (%u!=%u)\n", | ||
3052 | g, le16_to_cpu(ext4_group_desc_csum(sbi, g, gdp)), | ||
3053 | le16_to_cpu(gdp->bg_checksum)); | ||
3054 | err = -EINVAL; | ||
3055 | goto restore_opts; | ||
3056 | } | ||
3057 | } | ||
3058 | |||
3059 | /* | ||
3042 | * If we have an unprocessed orphan list hanging | 3060 | * If we have an unprocessed orphan list hanging |
3043 | * around from a previously readonly bdev mount, | 3061 | * around from a previously readonly bdev mount, |
3044 | * require a full umount/remount for now. | 3062 | * require a full umount/remount for now. |
@@ -3063,7 +3081,7 @@ static int ext4_remount (struct super_block * sb, int * flags, char * data) | |||
3063 | sbi->s_mount_state = le16_to_cpu(es->s_state); | 3081 | sbi->s_mount_state = le16_to_cpu(es->s_state); |
3064 | if ((err = ext4_group_extend(sb, es, n_blocks_count))) | 3082 | if ((err = ext4_group_extend(sb, es, n_blocks_count))) |
3065 | goto restore_opts; | 3083 | goto restore_opts; |
3066 | if (!ext4_setup_super (sb, es, 0)) | 3084 | if (!ext4_setup_super(sb, es, 0)) |
3067 | sb->s_flags &= ~MS_RDONLY; | 3085 | sb->s_flags &= ~MS_RDONLY; |
3068 | } | 3086 | } |
3069 | } | 3087 | } |
@@ -3093,7 +3111,7 @@ restore_opts: | |||
3093 | return err; | 3111 | return err; |
3094 | } | 3112 | } |
3095 | 3113 | ||
3096 | static int ext4_statfs (struct dentry * dentry, struct kstatfs * buf) | 3114 | static int ext4_statfs(struct dentry *dentry, struct kstatfs *buf) |
3097 | { | 3115 | { |
3098 | struct super_block *sb = dentry->d_sb; | 3116 | struct super_block *sb = dentry->d_sb; |
3099 | struct ext4_sb_info *sbi = EXT4_SB(sb); | 3117 | struct ext4_sb_info *sbi = EXT4_SB(sb); |
@@ -3331,12 +3349,12 @@ static int ext4_quota_on(struct super_block *sb, int type, int format_id, | |||
3331 | } | 3349 | } |
3332 | /* Journaling quota? */ | 3350 | /* Journaling quota? */ |
3333 | if (EXT4_SB(sb)->s_qf_names[type]) { | 3351 | if (EXT4_SB(sb)->s_qf_names[type]) { |
3334 | /* Quotafile not of fs root? */ | 3352 | /* Quotafile not in fs root? */ |
3335 | if (nd.path.dentry->d_parent->d_inode != sb->s_root->d_inode) | 3353 | if (nd.path.dentry->d_parent->d_inode != sb->s_root->d_inode) |
3336 | printk(KERN_WARNING | 3354 | printk(KERN_WARNING |
3337 | "EXT4-fs: Quota file not on filesystem root. " | 3355 | "EXT4-fs: Quota file not on filesystem root. " |
3338 | "Journaled quota will not work.\n"); | 3356 | "Journaled quota will not work.\n"); |
3339 | } | 3357 | } |
3340 | 3358 | ||
3341 | /* | 3359 | /* |
3342 | * When we journal data on quota file, we have to flush journal to see | 3360 | * When we journal data on quota file, we have to flush journal to see |
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index 93c5fdcdad2e..8954208b4893 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c | |||
@@ -1512,7 +1512,7 @@ static inline void ext4_xattr_hash_entry(struct ext4_xattr_header *header, | |||
1512 | char *name = entry->e_name; | 1512 | char *name = entry->e_name; |
1513 | int n; | 1513 | int n; |
1514 | 1514 | ||
1515 | for (n=0; n < entry->e_name_len; n++) { | 1515 | for (n = 0; n < entry->e_name_len; n++) { |
1516 | hash = (hash << NAME_HASH_SHIFT) ^ | 1516 | hash = (hash << NAME_HASH_SHIFT) ^ |
1517 | (hash >> (8*sizeof(hash) - NAME_HASH_SHIFT)) ^ | 1517 | (hash >> (8*sizeof(hash) - NAME_HASH_SHIFT)) ^ |
1518 | *name++; | 1518 | *name++; |
diff --git a/fs/fat/file.c b/fs/fat/file.c index 8707a8cfa02c..ddde37025ca6 100644 --- a/fs/fat/file.c +++ b/fs/fat/file.c | |||
@@ -313,6 +313,8 @@ static int fat_allow_set_time(struct msdos_sb_info *sbi, struct inode *inode) | |||
313 | return 0; | 313 | return 0; |
314 | } | 314 | } |
315 | 315 | ||
316 | #define TIMES_SET_FLAGS (ATTR_MTIME_SET | ATTR_ATIME_SET | ATTR_TIMES_SET) | ||
317 | |||
316 | int fat_setattr(struct dentry *dentry, struct iattr *attr) | 318 | int fat_setattr(struct dentry *dentry, struct iattr *attr) |
317 | { | 319 | { |
318 | struct msdos_sb_info *sbi = MSDOS_SB(dentry->d_sb); | 320 | struct msdos_sb_info *sbi = MSDOS_SB(dentry->d_sb); |
@@ -336,9 +338,9 @@ int fat_setattr(struct dentry *dentry, struct iattr *attr) | |||
336 | 338 | ||
337 | /* Check for setting the inode time. */ | 339 | /* Check for setting the inode time. */ |
338 | ia_valid = attr->ia_valid; | 340 | ia_valid = attr->ia_valid; |
339 | if (ia_valid & (ATTR_MTIME_SET | ATTR_ATIME_SET)) { | 341 | if (ia_valid & TIMES_SET_FLAGS) { |
340 | if (fat_allow_set_time(sbi, inode)) | 342 | if (fat_allow_set_time(sbi, inode)) |
341 | attr->ia_valid &= ~(ATTR_MTIME_SET | ATTR_ATIME_SET); | 343 | attr->ia_valid &= ~TIMES_SET_FLAGS; |
342 | } | 344 | } |
343 | 345 | ||
344 | error = inode_change_ok(inode, attr); | 346 | error = inode_change_ok(inode, attr); |
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c index f8b3be873226..adf0395f318e 100644 --- a/fs/jbd2/commit.c +++ b/fs/jbd2/commit.c | |||
@@ -262,8 +262,18 @@ static int journal_finish_inode_data_buffers(journal_t *journal, | |||
262 | jinode->i_flags |= JI_COMMIT_RUNNING; | 262 | jinode->i_flags |= JI_COMMIT_RUNNING; |
263 | spin_unlock(&journal->j_list_lock); | 263 | spin_unlock(&journal->j_list_lock); |
264 | err = filemap_fdatawait(jinode->i_vfs_inode->i_mapping); | 264 | err = filemap_fdatawait(jinode->i_vfs_inode->i_mapping); |
265 | if (!ret) | 265 | if (err) { |
266 | ret = err; | 266 | /* |
267 | * Because AS_EIO is cleared by | ||
268 | * wait_on_page_writeback_range(), set it again so | ||
269 | * that user process can get -EIO from fsync(). | ||
270 | */ | ||
271 | set_bit(AS_EIO, | ||
272 | &jinode->i_vfs_inode->i_mapping->flags); | ||
273 | |||
274 | if (!ret) | ||
275 | ret = err; | ||
276 | } | ||
267 | spin_lock(&journal->j_list_lock); | 277 | spin_lock(&journal->j_list_lock); |
268 | jinode->i_flags &= ~JI_COMMIT_RUNNING; | 278 | jinode->i_flags &= ~JI_COMMIT_RUNNING; |
269 | wake_up_bit(&jinode->i_flags, __JI_COMMIT_RUNNING); | 279 | wake_up_bit(&jinode->i_flags, __JI_COMMIT_RUNNING); |
@@ -670,8 +680,14 @@ start_journal_io: | |||
670 | * commit block, which happens below in such setting. | 680 | * commit block, which happens below in such setting. |
671 | */ | 681 | */ |
672 | err = journal_finish_inode_data_buffers(journal, commit_transaction); | 682 | err = journal_finish_inode_data_buffers(journal, commit_transaction); |
673 | if (err) | 683 | if (err) { |
674 | jbd2_journal_abort(journal, err); | 684 | char b[BDEVNAME_SIZE]; |
685 | |||
686 | printk(KERN_WARNING | ||
687 | "JBD2: Detected IO errors while flushing file data " | ||
688 | "on %s\n", bdevname(journal->j_fs_dev, b)); | ||
689 | err = 0; | ||
690 | } | ||
675 | 691 | ||
676 | /* Lo and behold: we have just managed to send a transaction to | 692 | /* Lo and behold: we have just managed to send a transaction to |
677 | the log. Before we can commit it, wait for the IO so far to | 693 | the log. Before we can commit it, wait for the IO so far to |
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index b26c6d9fe6ae..8207a01c4edb 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c | |||
@@ -68,7 +68,6 @@ EXPORT_SYMBOL(jbd2_journal_set_features); | |||
68 | EXPORT_SYMBOL(jbd2_journal_create); | 68 | EXPORT_SYMBOL(jbd2_journal_create); |
69 | EXPORT_SYMBOL(jbd2_journal_load); | 69 | EXPORT_SYMBOL(jbd2_journal_load); |
70 | EXPORT_SYMBOL(jbd2_journal_destroy); | 70 | EXPORT_SYMBOL(jbd2_journal_destroy); |
71 | EXPORT_SYMBOL(jbd2_journal_update_superblock); | ||
72 | EXPORT_SYMBOL(jbd2_journal_abort); | 71 | EXPORT_SYMBOL(jbd2_journal_abort); |
73 | EXPORT_SYMBOL(jbd2_journal_errno); | 72 | EXPORT_SYMBOL(jbd2_journal_errno); |
74 | EXPORT_SYMBOL(jbd2_journal_ack_err); | 73 | EXPORT_SYMBOL(jbd2_journal_ack_err); |
diff --git a/fs/nfs/nfsroot.c b/fs/nfs/nfsroot.c index 8478fc25daee..46763d1cd397 100644 --- a/fs/nfs/nfsroot.c +++ b/fs/nfs/nfsroot.c | |||
@@ -127,7 +127,7 @@ enum { | |||
127 | Opt_err | 127 | Opt_err |
128 | }; | 128 | }; |
129 | 129 | ||
130 | static match_table_t __initconst tokens = { | 130 | static match_table_t __initdata tokens = { |
131 | {Opt_port, "port=%u"}, | 131 | {Opt_port, "port=%u"}, |
132 | {Opt_rsize, "rsize=%u"}, | 132 | {Opt_rsize, "rsize=%u"}, |
133 | {Opt_wsize, "wsize=%u"}, | 133 | {Opt_wsize, "wsize=%u"}, |
diff --git a/fs/ufs/super.c b/fs/ufs/super.c index 3e30e40aa24d..3141969b456d 100644 --- a/fs/ufs/super.c +++ b/fs/ufs/super.c | |||
@@ -1233,7 +1233,7 @@ static int ufs_show_options(struct seq_file *seq, struct vfsmount *vfs) | |||
1233 | { | 1233 | { |
1234 | struct ufs_sb_info *sbi = UFS_SB(vfs->mnt_sb); | 1234 | struct ufs_sb_info *sbi = UFS_SB(vfs->mnt_sb); |
1235 | unsigned mval = sbi->s_mount_opt & UFS_MOUNT_UFSTYPE; | 1235 | unsigned mval = sbi->s_mount_opt & UFS_MOUNT_UFSTYPE; |
1236 | const struct match_token *tp = tokens; | 1236 | struct match_token *tp = tokens; |
1237 | 1237 | ||
1238 | while (tp->token != Opt_onerror_panic && tp->token != mval) | 1238 | while (tp->token != Opt_onerror_panic && tp->token != mval) |
1239 | ++tp; | 1239 | ++tp; |
diff --git a/include/asm-arm/arch-ns9xxx/debug-macro.S b/include/asm-arm/arch-ns9xxx/debug-macro.S index b21b93eb2dbc..94680950ee67 100644 --- a/include/asm-arm/arch-ns9xxx/debug-macro.S +++ b/include/asm-arm/arch-ns9xxx/debug-macro.S | |||
@@ -9,7 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | #include <asm/hardware.h> | 10 | #include <asm/hardware.h> |
11 | 11 | ||
12 | #include <asm/arch-ns9xxx/regs-board-a9m9750dev.h> | 12 | #include <asm/arch/regs-board-a9m9750dev.h> |
13 | 13 | ||
14 | .macro addruart,rx | 14 | .macro addruart,rx |
15 | mrc p15, 0, \rx, c1, c0 | 15 | mrc p15, 0, \rx, c1, c0 |
diff --git a/include/asm-arm/arch-ns9xxx/entry-macro.S b/include/asm-arm/arch-ns9xxx/entry-macro.S index 89a21c530468..2f6c89ddf958 100644 --- a/include/asm-arm/arch-ns9xxx/entry-macro.S +++ b/include/asm-arm/arch-ns9xxx/entry-macro.S | |||
@@ -9,7 +9,7 @@ | |||
9 | * the Free Software Foundation. | 9 | * the Free Software Foundation. |
10 | */ | 10 | */ |
11 | #include <asm/hardware.h> | 11 | #include <asm/hardware.h> |
12 | #include <asm/arch-ns9xxx/regs-sys-common.h> | 12 | #include <asm/arch/regs-sys-common.h> |
13 | 13 | ||
14 | .macro get_irqnr_preamble, base, tmp | 14 | .macro get_irqnr_preamble, base, tmp |
15 | ldr \base, =SYS_ISRADDR | 15 | ldr \base, =SYS_ISRADDR |
diff --git a/include/asm-arm/arch-ns9xxx/processor.h b/include/asm-arm/arch-ns9xxx/processor.h index f7b53b65de81..3137e5ba01a9 100644 --- a/include/asm-arm/arch-ns9xxx/processor.h +++ b/include/asm-arm/arch-ns9xxx/processor.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #ifndef __ASM_ARCH_PROCESSOR_H | 11 | #ifndef __ASM_ARCH_PROCESSOR_H |
12 | #define __ASM_ARCH_PROCESSOR_H | 12 | #define __ASM_ARCH_PROCESSOR_H |
13 | 13 | ||
14 | #include <asm/arch-ns9xxx/module.h> | 14 | #include <asm/arch/module.h> |
15 | 15 | ||
16 | #define processor_is_ns9210() (0 \ | 16 | #define processor_is_ns9210() (0 \ |
17 | || module_is_cc7ucamry() \ | 17 | || module_is_cc7ucamry() \ |
diff --git a/include/asm-arm/arch-ns9xxx/system.h b/include/asm-arm/arch-ns9xxx/system.h index 1348073afe48..c2941684d667 100644 --- a/include/asm-arm/arch-ns9xxx/system.h +++ b/include/asm-arm/arch-ns9xxx/system.h | |||
@@ -12,8 +12,8 @@ | |||
12 | #define __ASM_ARCH_SYSTEM_H | 12 | #define __ASM_ARCH_SYSTEM_H |
13 | 13 | ||
14 | #include <asm/proc-fns.h> | 14 | #include <asm/proc-fns.h> |
15 | #include <asm/arch-ns9xxx/processor.h> | 15 | #include <asm/arch/processor.h> |
16 | #include <asm/arch-ns9xxx/processor-ns9360.h> | 16 | #include <asm/arch/processor-ns9360.h> |
17 | 17 | ||
18 | static inline void arch_idle(void) | 18 | static inline void arch_idle(void) |
19 | { | 19 | { |
diff --git a/include/asm-arm/arch-omap/board.h b/include/asm-arm/arch-omap/board.h index db44c5d1f1a0..99564c70f128 100644 --- a/include/asm-arm/arch-omap/board.h +++ b/include/asm-arm/arch-omap/board.h | |||
@@ -154,7 +154,7 @@ struct omap_version_config { | |||
154 | }; | 154 | }; |
155 | 155 | ||
156 | 156 | ||
157 | #include <asm-arm/arch-omap/board-nokia.h> | 157 | #include <asm/arch/board-nokia.h> |
158 | 158 | ||
159 | struct omap_board_config_entry { | 159 | struct omap_board_config_entry { |
160 | u16 tag; | 160 | u16 tag; |
diff --git a/include/asm-m68k/contregs.h b/include/asm-m68k/contregs.h index 1e233e7d191e..d1ea750bddfe 100644 --- a/include/asm-m68k/contregs.h +++ b/include/asm-m68k/contregs.h | |||
@@ -1,4 +1,53 @@ | |||
1 | #ifndef _M68K_CONTREGS_H | 1 | #ifndef _M68K_CONTREGS_H |
2 | #define _M68K_CONTREGS_H | 2 | #define _M68K_CONTREGS_H |
3 | #include <asm-sparc/contregs.h> | 3 | |
4 | /* contregs.h: Addresses of registers in the ASI_CONTROL alternate address | ||
5 | * space. These are for the mmu's context register, etc. | ||
6 | * | ||
7 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | ||
8 | */ | ||
9 | |||
10 | /* 3=sun3 | ||
11 | 4=sun4 (as in sun4 sysmaint student book) | ||
12 | c=sun4c (according to davem) */ | ||
13 | |||
14 | #define AC_IDPROM 0x00000000 /* 34 ID PROM, R/O, byte, 32 bytes */ | ||
15 | #define AC_PAGEMAP 0x10000000 /* 3 Pagemap R/W, long */ | ||
16 | #define AC_SEGMAP 0x20000000 /* 3 Segment map, byte */ | ||
17 | #define AC_CONTEXT 0x30000000 /* 34c current mmu-context */ | ||
18 | #define AC_SENABLE 0x40000000 /* 34c system dvma/cache/reset enable reg*/ | ||
19 | #define AC_UDVMA_ENB 0x50000000 /* 34 Not used on Sun boards, byte */ | ||
20 | #define AC_BUS_ERROR 0x60000000 /* 34 Not cleared on read, byte. */ | ||
21 | #define AC_SYNC_ERR 0x60000000 /* c fault type */ | ||
22 | #define AC_SYNC_VA 0x60000004 /* c fault virtual address */ | ||
23 | #define AC_ASYNC_ERR 0x60000008 /* c asynchronous fault type */ | ||
24 | #define AC_ASYNC_VA 0x6000000c /* c async fault virtual address */ | ||
25 | #define AC_LEDS 0x70000000 /* 34 Zero turns on LEDs, byte */ | ||
26 | #define AC_CACHETAGS 0x80000000 /* 34c direct access to the VAC tags */ | ||
27 | #define AC_CACHEDDATA 0x90000000 /* 3 c direct access to the VAC data */ | ||
28 | #define AC_UDVMA_MAP 0xD0000000 /* 4 Not used on Sun boards, byte */ | ||
29 | #define AC_VME_VECTOR 0xE0000000 /* 4 For non-Autovector VME, byte */ | ||
30 | #define AC_BOOT_SCC 0xF0000000 /* 34 bypass to access Zilog 8530. byte.*/ | ||
31 | |||
32 | /* s=Swift, h=Ross_HyperSPARC, v=TI_Viking, t=Tsunami, r=Ross_Cypress */ | ||
33 | #define AC_M_PCR 0x0000 /* shv Processor Control Reg */ | ||
34 | #define AC_M_CTPR 0x0100 /* shv Context Table Pointer Reg */ | ||
35 | #define AC_M_CXR 0x0200 /* shv Context Register */ | ||
36 | #define AC_M_SFSR 0x0300 /* shv Synchronous Fault Status Reg */ | ||
37 | #define AC_M_SFAR 0x0400 /* shv Synchronous Fault Address Reg */ | ||
38 | #define AC_M_AFSR 0x0500 /* hv Asynchronous Fault Status Reg */ | ||
39 | #define AC_M_AFAR 0x0600 /* hv Asynchronous Fault Address Reg */ | ||
40 | #define AC_M_RESET 0x0700 /* hv Reset Reg */ | ||
41 | #define AC_M_RPR 0x1000 /* hv Root Pointer Reg */ | ||
42 | #define AC_M_TSUTRCR 0x1000 /* s TLB Replacement Ctrl Reg */ | ||
43 | #define AC_M_IAPTP 0x1100 /* hv Instruction Access PTP */ | ||
44 | #define AC_M_DAPTP 0x1200 /* hv Data Access PTP */ | ||
45 | #define AC_M_ITR 0x1300 /* hv Index Tag Register */ | ||
46 | #define AC_M_TRCR 0x1400 /* hv TLB Replacement Control Reg */ | ||
47 | #define AC_M_SFSRX 0x1300 /* s Synch Fault Status Reg prim */ | ||
48 | #define AC_M_SFARX 0x1400 /* s Synch Fault Address Reg prim */ | ||
49 | #define AC_M_RPR1 0x1500 /* h Root Pointer Reg (entry 2) */ | ||
50 | #define AC_M_IAPTP1 0x1600 /* h Instruction Access PTP (entry 2) */ | ||
51 | #define AC_M_DAPTP1 0x1700 /* h Data Access PTP (entry 2) */ | ||
52 | |||
4 | #endif /* _M68K_CONTREGS_H */ | 53 | #endif /* _M68K_CONTREGS_H */ |
diff --git a/include/asm-m68k/fbio.h b/include/asm-m68k/fbio.h index c17edf8c7bc4..b9215a0907d3 100644 --- a/include/asm-m68k/fbio.h +++ b/include/asm-m68k/fbio.h | |||
@@ -1 +1,330 @@ | |||
1 | #include <asm-sparc/fbio.h> | 1 | #ifndef __LINUX_FBIO_H |
2 | #define __LINUX_FBIO_H | ||
3 | |||
4 | #include <linux/compiler.h> | ||
5 | #include <linux/types.h> | ||
6 | |||
7 | /* Constants used for fbio SunOS compatibility */ | ||
8 | /* (C) 1996 Miguel de Icaza */ | ||
9 | |||
10 | /* Frame buffer types */ | ||
11 | #define FBTYPE_NOTYPE -1 | ||
12 | #define FBTYPE_SUN1BW 0 /* mono */ | ||
13 | #define FBTYPE_SUN1COLOR 1 | ||
14 | #define FBTYPE_SUN2BW 2 | ||
15 | #define FBTYPE_SUN2COLOR 3 | ||
16 | #define FBTYPE_SUN2GP 4 | ||
17 | #define FBTYPE_SUN5COLOR 5 | ||
18 | #define FBTYPE_SUN3COLOR 6 | ||
19 | #define FBTYPE_MEMCOLOR 7 | ||
20 | #define FBTYPE_SUN4COLOR 8 | ||
21 | |||
22 | #define FBTYPE_NOTSUN1 9 | ||
23 | #define FBTYPE_NOTSUN2 10 | ||
24 | #define FBTYPE_NOTSUN3 11 | ||
25 | |||
26 | #define FBTYPE_SUNFAST_COLOR 12 /* cg6 */ | ||
27 | #define FBTYPE_SUNROP_COLOR 13 | ||
28 | #define FBTYPE_SUNFB_VIDEO 14 | ||
29 | #define FBTYPE_SUNGIFB 15 | ||
30 | #define FBTYPE_SUNGPLAS 16 | ||
31 | #define FBTYPE_SUNGP3 17 | ||
32 | #define FBTYPE_SUNGT 18 | ||
33 | #define FBTYPE_SUNLEO 19 /* zx Leo card */ | ||
34 | #define FBTYPE_MDICOLOR 20 /* cg14 */ | ||
35 | #define FBTYPE_TCXCOLOR 21 /* SUNW,tcx card */ | ||
36 | |||
37 | #define FBTYPE_LASTPLUSONE 21 /* This is not last + 1 in fact... */ | ||
38 | |||
39 | /* Does not seem to be listed in the Sun file either */ | ||
40 | #define FBTYPE_CREATOR 22 | ||
41 | #define FBTYPE_PCI_IGA1682 23 | ||
42 | #define FBTYPE_P9100COLOR 24 | ||
43 | |||
44 | #define FBTYPE_PCI_GENERIC 1000 | ||
45 | #define FBTYPE_PCI_MACH64 1001 | ||
46 | |||
47 | /* fbio ioctls */ | ||
48 | /* Returned by FBIOGTYPE */ | ||
49 | struct fbtype { | ||
50 | int fb_type; /* fb type, see above */ | ||
51 | int fb_height; /* pixels */ | ||
52 | int fb_width; /* pixels */ | ||
53 | int fb_depth; | ||
54 | int fb_cmsize; /* color map entries */ | ||
55 | int fb_size; /* fb size in bytes */ | ||
56 | }; | ||
57 | #define FBIOGTYPE _IOR('F', 0, struct fbtype) | ||
58 | |||
59 | struct fbcmap { | ||
60 | int index; /* first element (0 origin) */ | ||
61 | int count; | ||
62 | unsigned char __user *red; | ||
63 | unsigned char __user *green; | ||
64 | unsigned char __user *blue; | ||
65 | }; | ||
66 | |||
67 | #ifdef __KERNEL__ | ||
68 | #define FBIOPUTCMAP_SPARC _IOW('F', 3, struct fbcmap) | ||
69 | #define FBIOGETCMAP_SPARC _IOW('F', 4, struct fbcmap) | ||
70 | #else | ||
71 | #define FBIOPUTCMAP _IOW('F', 3, struct fbcmap) | ||
72 | #define FBIOGETCMAP _IOW('F', 4, struct fbcmap) | ||
73 | #endif | ||
74 | |||
75 | /* # of device specific values */ | ||
76 | #define FB_ATTR_NDEVSPECIFIC 8 | ||
77 | /* # of possible emulations */ | ||
78 | #define FB_ATTR_NEMUTYPES 4 | ||
79 | |||
80 | struct fbsattr { | ||
81 | int flags; | ||
82 | int emu_type; /* -1 if none */ | ||
83 | int dev_specific[FB_ATTR_NDEVSPECIFIC]; | ||
84 | }; | ||
85 | |||
86 | struct fbgattr { | ||
87 | int real_type; /* real frame buffer type */ | ||
88 | int owner; /* unknown */ | ||
89 | struct fbtype fbtype; /* real frame buffer fbtype */ | ||
90 | struct fbsattr sattr; | ||
91 | int emu_types[FB_ATTR_NEMUTYPES]; /* supported emulations */ | ||
92 | }; | ||
93 | #define FBIOSATTR _IOW('F', 5, struct fbgattr) /* Unsupported: */ | ||
94 | #define FBIOGATTR _IOR('F', 6, struct fbgattr) /* supported */ | ||
95 | |||
96 | #define FBIOSVIDEO _IOW('F', 7, int) | ||
97 | #define FBIOGVIDEO _IOR('F', 8, int) | ||
98 | |||
99 | struct fbcursor { | ||
100 | short set; /* what to set, choose from the list above */ | ||
101 | short enable; /* cursor on/off */ | ||
102 | struct fbcurpos pos; /* cursor position */ | ||
103 | struct fbcurpos hot; /* cursor hot spot */ | ||
104 | struct fbcmap cmap; /* color map info */ | ||
105 | struct fbcurpos size; /* cursor bit map size */ | ||
106 | char __user *image; /* cursor image bits */ | ||
107 | char __user *mask; /* cursor mask bits */ | ||
108 | }; | ||
109 | |||
110 | /* set/get cursor attributes/shape */ | ||
111 | #define FBIOSCURSOR _IOW('F', 24, struct fbcursor) | ||
112 | #define FBIOGCURSOR _IOWR('F', 25, struct fbcursor) | ||
113 | |||
114 | /* set/get cursor position */ | ||
115 | #define FBIOSCURPOS _IOW('F', 26, struct fbcurpos) | ||
116 | #define FBIOGCURPOS _IOW('F', 27, struct fbcurpos) | ||
117 | |||
118 | /* get max cursor size */ | ||
119 | #define FBIOGCURMAX _IOR('F', 28, struct fbcurpos) | ||
120 | |||
121 | /* wid manipulation */ | ||
122 | struct fb_wid_alloc { | ||
123 | #define FB_WID_SHARED_8 0 | ||
124 | #define FB_WID_SHARED_24 1 | ||
125 | #define FB_WID_DBL_8 2 | ||
126 | #define FB_WID_DBL_24 3 | ||
127 | __u32 wa_type; | ||
128 | __s32 wa_index; /* Set on return */ | ||
129 | __u32 wa_count; | ||
130 | }; | ||
131 | struct fb_wid_item { | ||
132 | __u32 wi_type; | ||
133 | __s32 wi_index; | ||
134 | __u32 wi_attrs; | ||
135 | __u32 wi_values[32]; | ||
136 | }; | ||
137 | struct fb_wid_list { | ||
138 | __u32 wl_flags; | ||
139 | __u32 wl_count; | ||
140 | struct fb_wid_item *wl_list; | ||
141 | }; | ||
142 | |||
143 | #define FBIO_WID_ALLOC _IOWR('F', 30, struct fb_wid_alloc) | ||
144 | #define FBIO_WID_FREE _IOW('F', 31, struct fb_wid_alloc) | ||
145 | #define FBIO_WID_PUT _IOW('F', 32, struct fb_wid_list) | ||
146 | #define FBIO_WID_GET _IOWR('F', 33, struct fb_wid_list) | ||
147 | |||
148 | /* Creator ioctls */ | ||
149 | #define FFB_IOCTL ('F'<<8) | ||
150 | #define FFB_SYS_INFO (FFB_IOCTL|80) | ||
151 | #define FFB_CLUTREAD (FFB_IOCTL|81) | ||
152 | #define FFB_CLUTPOST (FFB_IOCTL|82) | ||
153 | #define FFB_SETDIAGMODE (FFB_IOCTL|83) | ||
154 | #define FFB_GETMONITORID (FFB_IOCTL|84) | ||
155 | #define FFB_GETVIDEOMODE (FFB_IOCTL|85) | ||
156 | #define FFB_SETVIDEOMODE (FFB_IOCTL|86) | ||
157 | #define FFB_SETSERVER (FFB_IOCTL|87) | ||
158 | #define FFB_SETOVCTL (FFB_IOCTL|88) | ||
159 | #define FFB_GETOVCTL (FFB_IOCTL|89) | ||
160 | #define FFB_GETSAXNUM (FFB_IOCTL|90) | ||
161 | #define FFB_FBDEBUG (FFB_IOCTL|91) | ||
162 | |||
163 | /* Cg14 ioctls */ | ||
164 | #define MDI_IOCTL ('M'<<8) | ||
165 | #define MDI_RESET (MDI_IOCTL|1) | ||
166 | #define MDI_GET_CFGINFO (MDI_IOCTL|2) | ||
167 | #define MDI_SET_PIXELMODE (MDI_IOCTL|3) | ||
168 | # define MDI_32_PIX 32 | ||
169 | # define MDI_16_PIX 16 | ||
170 | # define MDI_8_PIX 8 | ||
171 | |||
172 | struct mdi_cfginfo { | ||
173 | int mdi_ncluts; /* Number of implemented CLUTs in this MDI */ | ||
174 | int mdi_type; /* FBTYPE name */ | ||
175 | int mdi_height; /* height */ | ||
176 | int mdi_width; /* widht */ | ||
177 | int mdi_size; /* available ram */ | ||
178 | int mdi_mode; /* 8bpp, 16bpp or 32bpp */ | ||
179 | int mdi_pixfreq; /* pixel clock (from PROM) */ | ||
180 | }; | ||
181 | |||
182 | /* SparcLinux specific ioctl for the MDI, should be replaced for | ||
183 | * the SET_XLUT/SET_CLUTn ioctls instead | ||
184 | */ | ||
185 | #define MDI_CLEAR_XLUT (MDI_IOCTL|9) | ||
186 | |||
187 | /* leo & ffb ioctls */ | ||
188 | struct fb_clut_alloc { | ||
189 | __u32 clutid; /* Set on return */ | ||
190 | __u32 flag; | ||
191 | __u32 index; | ||
192 | }; | ||
193 | |||
194 | struct fb_clut { | ||
195 | #define FB_CLUT_WAIT 0x00000001 /* Not yet implemented */ | ||
196 | __u32 flag; | ||
197 | __u32 clutid; | ||
198 | __u32 offset; | ||
199 | __u32 count; | ||
200 | char * red; | ||
201 | char * green; | ||
202 | char * blue; | ||
203 | }; | ||
204 | |||
205 | struct fb_clut32 { | ||
206 | __u32 flag; | ||
207 | __u32 clutid; | ||
208 | __u32 offset; | ||
209 | __u32 count; | ||
210 | __u32 red; | ||
211 | __u32 green; | ||
212 | __u32 blue; | ||
213 | }; | ||
214 | |||
215 | #define LEO_CLUTALLOC _IOWR('L', 53, struct fb_clut_alloc) | ||
216 | #define LEO_CLUTFREE _IOW('L', 54, struct fb_clut_alloc) | ||
217 | #define LEO_CLUTREAD _IOW('L', 55, struct fb_clut) | ||
218 | #define LEO_CLUTPOST _IOW('L', 56, struct fb_clut) | ||
219 | #define LEO_SETGAMMA _IOW('L', 68, int) /* Not yet implemented */ | ||
220 | #define LEO_GETGAMMA _IOR('L', 69, int) /* Not yet implemented */ | ||
221 | |||
222 | #ifdef __KERNEL__ | ||
223 | /* Addresses on the fd of a cgsix that are mappable */ | ||
224 | #define CG6_FBC 0x70000000 | ||
225 | #define CG6_TEC 0x70001000 | ||
226 | #define CG6_BTREGS 0x70002000 | ||
227 | #define CG6_FHC 0x70004000 | ||
228 | #define CG6_THC 0x70005000 | ||
229 | #define CG6_ROM 0x70006000 | ||
230 | #define CG6_RAM 0x70016000 | ||
231 | #define CG6_DHC 0x80000000 | ||
232 | |||
233 | #define CG3_MMAP_OFFSET 0x4000000 | ||
234 | |||
235 | /* Addresses on the fd of a tcx that are mappable */ | ||
236 | #define TCX_RAM8BIT 0x00000000 | ||
237 | #define TCX_RAM24BIT 0x01000000 | ||
238 | #define TCX_UNK3 0x10000000 | ||
239 | #define TCX_UNK4 0x20000000 | ||
240 | #define TCX_CONTROLPLANE 0x28000000 | ||
241 | #define TCX_UNK6 0x30000000 | ||
242 | #define TCX_UNK7 0x38000000 | ||
243 | #define TCX_TEC 0x70000000 | ||
244 | #define TCX_BTREGS 0x70002000 | ||
245 | #define TCX_THC 0x70004000 | ||
246 | #define TCX_DHC 0x70008000 | ||
247 | #define TCX_ALT 0x7000a000 | ||
248 | #define TCX_SYNC 0x7000e000 | ||
249 | #define TCX_UNK2 0x70010000 | ||
250 | |||
251 | /* CG14 definitions */ | ||
252 | |||
253 | /* Offsets into the OBIO space: */ | ||
254 | #define CG14_REGS 0 /* registers */ | ||
255 | #define CG14_CURSORREGS 0x1000 /* cursor registers */ | ||
256 | #define CG14_DACREGS 0x2000 /* DAC registers */ | ||
257 | #define CG14_XLUT 0x3000 /* X Look Up Table -- ??? */ | ||
258 | #define CG14_CLUT1 0x4000 /* Color Look Up Table */ | ||
259 | #define CG14_CLUT2 0x5000 /* Color Look Up Table */ | ||
260 | #define CG14_CLUT3 0x6000 /* Color Look Up Table */ | ||
261 | #define CG14_AUTO 0xf000 | ||
262 | |||
263 | #endif /* KERNEL */ | ||
264 | |||
265 | /* These are exported to userland for applications to use */ | ||
266 | /* Mappable offsets for the cg14: control registers */ | ||
267 | #define MDI_DIRECT_MAP 0x10000000 | ||
268 | #define MDI_CTLREG_MAP 0x20000000 | ||
269 | #define MDI_CURSOR_MAP 0x30000000 | ||
270 | #define MDI_SHDW_VRT_MAP 0x40000000 | ||
271 | |||
272 | /* Mappable offsets for the cg14: frame buffer resolutions */ | ||
273 | /* 32 bits */ | ||
274 | #define MDI_CHUNKY_XBGR_MAP 0x50000000 | ||
275 | #define MDI_CHUNKY_BGR_MAP 0x60000000 | ||
276 | |||
277 | /* 16 bits */ | ||
278 | #define MDI_PLANAR_X16_MAP 0x70000000 | ||
279 | #define MDI_PLANAR_C16_MAP 0x80000000 | ||
280 | |||
281 | /* 8 bit is done as CG3 MMAP offset */ | ||
282 | /* 32 bits, planar */ | ||
283 | #define MDI_PLANAR_X32_MAP 0x90000000 | ||
284 | #define MDI_PLANAR_B32_MAP 0xa0000000 | ||
285 | #define MDI_PLANAR_G32_MAP 0xb0000000 | ||
286 | #define MDI_PLANAR_R32_MAP 0xc0000000 | ||
287 | |||
288 | /* Mappable offsets on leo */ | ||
289 | #define LEO_SS0_MAP 0x00000000 | ||
290 | #define LEO_LC_SS0_USR_MAP 0x00800000 | ||
291 | #define LEO_LD_SS0_MAP 0x00801000 | ||
292 | #define LEO_LX_CURSOR_MAP 0x00802000 | ||
293 | #define LEO_SS1_MAP 0x00803000 | ||
294 | #define LEO_LC_SS1_USR_MAP 0x01003000 | ||
295 | #define LEO_LD_SS1_MAP 0x01004000 | ||
296 | #define LEO_UNK_MAP 0x01005000 | ||
297 | #define LEO_LX_KRN_MAP 0x01006000 | ||
298 | #define LEO_LC_SS0_KRN_MAP 0x01007000 | ||
299 | #define LEO_LC_SS1_KRN_MAP 0x01008000 | ||
300 | #define LEO_LD_GBL_MAP 0x01009000 | ||
301 | #define LEO_UNK2_MAP 0x0100a000 | ||
302 | |||
303 | #ifdef __KERNEL__ | ||
304 | struct fbcmap32 { | ||
305 | int index; /* first element (0 origin) */ | ||
306 | int count; | ||
307 | u32 red; | ||
308 | u32 green; | ||
309 | u32 blue; | ||
310 | }; | ||
311 | |||
312 | #define FBIOPUTCMAP32 _IOW('F', 3, struct fbcmap32) | ||
313 | #define FBIOGETCMAP32 _IOW('F', 4, struct fbcmap32) | ||
314 | |||
315 | struct fbcursor32 { | ||
316 | short set; /* what to set, choose from the list above */ | ||
317 | short enable; /* cursor on/off */ | ||
318 | struct fbcurpos pos; /* cursor position */ | ||
319 | struct fbcurpos hot; /* cursor hot spot */ | ||
320 | struct fbcmap32 cmap; /* color map info */ | ||
321 | struct fbcurpos size; /* cursor bit map size */ | ||
322 | u32 image; /* cursor image bits */ | ||
323 | u32 mask; /* cursor mask bits */ | ||
324 | }; | ||
325 | |||
326 | #define FBIOSCURSOR32 _IOW('F', 24, struct fbcursor32) | ||
327 | #define FBIOGCURSOR32 _IOW('F', 25, struct fbcursor32) | ||
328 | #endif | ||
329 | |||
330 | #endif /* __LINUX_FBIO_H */ | ||
diff --git a/include/asm-m68k/idprom.h b/include/asm-m68k/idprom.h index 4349eaf3cfe4..160616a89e05 100644 --- a/include/asm-m68k/idprom.h +++ b/include/asm-m68k/idprom.h | |||
@@ -1,6 +1,25 @@ | |||
1 | #ifndef _M68K_IDPROM_H | 1 | #ifndef _M68K_IDPROM_H |
2 | #define _M68K_IDPROM_H | 2 | #define _M68K_IDPROM_H |
3 | #include <asm-sparc/idprom.h> | 3 | /* |
4 | * idprom.h: Macros and defines for idprom routines | ||
5 | * | ||
6 | * Copyright (C) 1995,1996 David S. Miller (davem@caip.rutgers.edu) | ||
7 | */ | ||
8 | |||
9 | #include <linux/types.h> | ||
10 | |||
11 | struct idprom { | ||
12 | u8 id_format; /* Format identifier (always 0x01) */ | ||
13 | u8 id_machtype; /* Machine type */ | ||
14 | u8 id_ethaddr[6]; /* Hardware ethernet address */ | ||
15 | s32 id_date; /* Date of manufacture */ | ||
16 | u32 id_sernum:24; /* Unique serial number */ | ||
17 | u8 id_cksum; /* Checksum - xor of the data bytes */ | ||
18 | u8 reserved[16]; | ||
19 | }; | ||
20 | |||
21 | extern struct idprom *idprom; | ||
22 | extern void idprom_init(void); | ||
4 | 23 | ||
5 | /* Sun3: in control space */ | 24 | /* Sun3: in control space */ |
6 | #define SUN3_IDPROM_BASE 0x00000000 | 25 | #define SUN3_IDPROM_BASE 0x00000000 |
diff --git a/include/linux/ihex.h b/include/linux/ihex.h index 2baace2788a7..31d8629e75a1 100644 --- a/include/linux/ihex.h +++ b/include/linux/ihex.h | |||
@@ -18,7 +18,7 @@ struct ihex_binrec { | |||
18 | __be32 addr; | 18 | __be32 addr; |
19 | __be16 len; | 19 | __be16 len; |
20 | uint8_t data[0]; | 20 | uint8_t data[0]; |
21 | } __attribute__((aligned(4))); | 21 | } __attribute__((packed)); |
22 | 22 | ||
23 | /* Find the next record, taking into account the 4-byte alignment */ | 23 | /* Find the next record, taking into account the 4-byte alignment */ |
24 | static inline const struct ihex_binrec * | 24 | static inline const struct ihex_binrec * |
diff --git a/include/linux/mISDNif.h b/include/linux/mISDNif.h index 5c948f337817..8f2d60da04e7 100644 --- a/include/linux/mISDNif.h +++ b/include/linux/mISDNif.h | |||
@@ -37,7 +37,7 @@ | |||
37 | */ | 37 | */ |
38 | #define MISDN_MAJOR_VERSION 1 | 38 | #define MISDN_MAJOR_VERSION 1 |
39 | #define MISDN_MINOR_VERSION 0 | 39 | #define MISDN_MINOR_VERSION 0 |
40 | #define MISDN_RELEASE 18 | 40 | #define MISDN_RELEASE 19 |
41 | 41 | ||
42 | /* primitives for information exchange | 42 | /* primitives for information exchange |
43 | * generell format | 43 | * generell format |
@@ -242,7 +242,8 @@ struct mISDNhead { | |||
242 | #define TEI_SAPI 63 | 242 | #define TEI_SAPI 63 |
243 | #define CTRL_SAPI 0 | 243 | #define CTRL_SAPI 0 |
244 | 244 | ||
245 | #define MISDN_CHMAP_SIZE 4 | 245 | #define MISDN_MAX_CHANNEL 127 |
246 | #define MISDN_CHMAP_SIZE ((MISDN_MAX_CHANNEL + 1) >> 3) | ||
246 | 247 | ||
247 | #define SOL_MISDN 0 | 248 | #define SOL_MISDN 0 |
248 | 249 | ||
@@ -275,11 +276,32 @@ struct mISDN_devinfo { | |||
275 | u_int Dprotocols; | 276 | u_int Dprotocols; |
276 | u_int Bprotocols; | 277 | u_int Bprotocols; |
277 | u_int protocol; | 278 | u_int protocol; |
278 | u_long channelmap[MISDN_CHMAP_SIZE]; | 279 | u_char channelmap[MISDN_CHMAP_SIZE]; |
279 | u_int nrbchan; | 280 | u_int nrbchan; |
280 | char name[MISDN_MAX_IDLEN]; | 281 | char name[MISDN_MAX_IDLEN]; |
281 | }; | 282 | }; |
282 | 283 | ||
284 | static inline int | ||
285 | test_channelmap(u_int nr, u_char *map) | ||
286 | { | ||
287 | if (nr <= MISDN_MAX_CHANNEL) | ||
288 | return map[nr >> 3] & (1 << (nr & 7)); | ||
289 | else | ||
290 | return 0; | ||
291 | } | ||
292 | |||
293 | static inline void | ||
294 | set_channelmap(u_int nr, u_char *map) | ||
295 | { | ||
296 | map[nr >> 3] |= (1 << (nr & 7)); | ||
297 | } | ||
298 | |||
299 | static inline void | ||
300 | clear_channelmap(u_int nr, u_char *map) | ||
301 | { | ||
302 | map[nr >> 3] &= ~(1 << (nr & 7)); | ||
303 | } | ||
304 | |||
283 | /* CONTROL_CHANNEL parameters */ | 305 | /* CONTROL_CHANNEL parameters */ |
284 | #define MISDN_CTRL_GETOP 0x0000 | 306 | #define MISDN_CTRL_GETOP 0x0000 |
285 | #define MISDN_CTRL_LOOP 0x0001 | 307 | #define MISDN_CTRL_LOOP 0x0001 |
@@ -405,7 +427,7 @@ struct mISDNdevice { | |||
405 | u_int Dprotocols; | 427 | u_int Dprotocols; |
406 | u_int Bprotocols; | 428 | u_int Bprotocols; |
407 | u_int nrbchan; | 429 | u_int nrbchan; |
408 | u_long channelmap[MISDN_CHMAP_SIZE]; | 430 | u_char channelmap[MISDN_CHMAP_SIZE]; |
409 | struct list_head bchannels; | 431 | struct list_head bchannels; |
410 | struct mISDNchannel *teimgr; | 432 | struct mISDNchannel *teimgr; |
411 | struct device dev; | 433 | struct device dev; |
@@ -430,7 +452,7 @@ struct mISDNstack { | |||
430 | #endif | 452 | #endif |
431 | }; | 453 | }; |
432 | 454 | ||
433 | /* global alloc/queue dunctions */ | 455 | /* global alloc/queue functions */ |
434 | 456 | ||
435 | static inline struct sk_buff * | 457 | static inline struct sk_buff * |
436 | mI_alloc_skb(unsigned int len, gfp_t gfp_mask) | 458 | mI_alloc_skb(unsigned int len, gfp_t gfp_mask) |
diff --git a/include/linux/parser.h b/include/linux/parser.h index cc554ca8bc78..7dcd05075756 100644 --- a/include/linux/parser.h +++ b/include/linux/parser.h | |||
@@ -14,7 +14,7 @@ struct match_token { | |||
14 | const char *pattern; | 14 | const char *pattern; |
15 | }; | 15 | }; |
16 | 16 | ||
17 | typedef const struct match_token match_table_t[]; | 17 | typedef struct match_token match_table_t[]; |
18 | 18 | ||
19 | /* Maximum number of arguments that match_token will find in a pattern */ | 19 | /* Maximum number of arguments that match_token will find in a pattern */ |
20 | enum {MAX_OPT_ARGS = 3}; | 20 | enum {MAX_OPT_ARGS = 3}; |
diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h index 8c8119ffee12..1c78d56c57e5 100644 --- a/include/linux/vt_kern.h +++ b/include/linux/vt_kern.h | |||
@@ -86,6 +86,7 @@ int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc); | |||
86 | #define con_copy_unimap(d, s) (0) | 86 | #define con_copy_unimap(d, s) (0) |
87 | #define con_get_unimap(vc, ct, uct, list) (-EINVAL) | 87 | #define con_get_unimap(vc, ct, uct, list) (-EINVAL) |
88 | #define con_free_unimap(vc) do { ; } while (0) | 88 | #define con_free_unimap(vc) do { ; } while (0) |
89 | #define con_protect_unimap(vc, rdonly) do { ; } while (0) | ||
89 | 90 | ||
90 | #define vc_translate(vc, c) (c) | 91 | #define vc_translate(vc, c) (c) |
91 | #endif | 92 | #endif |
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 291d56a19167..9cecc409f0f8 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -140,8 +140,7 @@ struct scsi_device { | |||
140 | unsigned fix_capacity:1; /* READ_CAPACITY is too high by 1 */ | 140 | unsigned fix_capacity:1; /* READ_CAPACITY is too high by 1 */ |
141 | unsigned guess_capacity:1; /* READ_CAPACITY might be too high by 1 */ | 141 | unsigned guess_capacity:1; /* READ_CAPACITY might be too high by 1 */ |
142 | unsigned retry_hwerror:1; /* Retry HARDWARE_ERROR */ | 142 | unsigned retry_hwerror:1; /* Retry HARDWARE_ERROR */ |
143 | unsigned last_sector_bug:1; /* do not use multisector accesses on | 143 | unsigned last_sector_bug:1; /* Always read last sector in a 1 sector read */ |
144 | SD_LAST_BUGGY_SECTORS */ | ||
145 | 144 | ||
146 | DECLARE_BITMAP(supported_events, SDEV_EVT_MAXBITS); /* supported events */ | 145 | DECLARE_BITMAP(supported_events, SDEV_EVT_MAXBITS); /* supported events */ |
147 | struct list_head event_list; /* asserted events */ | 146 | struct list_head event_list; /* asserted events */ |
diff --git a/kernel/sched.c b/kernel/sched.c index 21f7da94662e..04160d277e7a 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -5004,19 +5004,21 @@ recheck: | |||
5004 | return -EPERM; | 5004 | return -EPERM; |
5005 | } | 5005 | } |
5006 | 5006 | ||
5007 | if (user) { | ||
5007 | #ifdef CONFIG_RT_GROUP_SCHED | 5008 | #ifdef CONFIG_RT_GROUP_SCHED |
5008 | /* | 5009 | /* |
5009 | * Do not allow realtime tasks into groups that have no runtime | 5010 | * Do not allow realtime tasks into groups that have no runtime |
5010 | * assigned. | 5011 | * assigned. |
5011 | */ | 5012 | */ |
5012 | if (user | 5013 | if (rt_policy(policy) && task_group(p)->rt_bandwidth.rt_runtime == 0) |
5013 | && rt_policy(policy) && task_group(p)->rt_bandwidth.rt_runtime == 0) | 5014 | return -EPERM; |
5014 | return -EPERM; | ||
5015 | #endif | 5015 | #endif |
5016 | 5016 | ||
5017 | retval = security_task_setscheduler(p, policy, param); | 5017 | retval = security_task_setscheduler(p, policy, param); |
5018 | if (retval) | 5018 | if (retval) |
5019 | return retval; | 5019 | return retval; |
5020 | } | ||
5021 | |||
5020 | /* | 5022 | /* |
5021 | * make sure no PI-waiters arrive (or leave) while we are | 5023 | * make sure no PI-waiters arrive (or leave) while we are |
5022 | * changing the priority of the task: | 5024 | * changing the priority of the task: |
diff --git a/mm/memory.c b/mm/memory.c index 6793b9c68107..a472bcd4b061 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -2765,16 +2765,26 @@ int make_pages_present(unsigned long addr, unsigned long end) | |||
2765 | 2765 | ||
2766 | vma = find_vma(current->mm, addr); | 2766 | vma = find_vma(current->mm, addr); |
2767 | if (!vma) | 2767 | if (!vma) |
2768 | return -1; | 2768 | return -ENOMEM; |
2769 | write = (vma->vm_flags & VM_WRITE) != 0; | 2769 | write = (vma->vm_flags & VM_WRITE) != 0; |
2770 | BUG_ON(addr >= end); | 2770 | BUG_ON(addr >= end); |
2771 | BUG_ON(end > vma->vm_end); | 2771 | BUG_ON(end > vma->vm_end); |
2772 | len = DIV_ROUND_UP(end, PAGE_SIZE) - addr/PAGE_SIZE; | 2772 | len = DIV_ROUND_UP(end, PAGE_SIZE) - addr/PAGE_SIZE; |
2773 | ret = get_user_pages(current, current->mm, addr, | 2773 | ret = get_user_pages(current, current->mm, addr, |
2774 | len, write, 0, NULL, NULL); | 2774 | len, write, 0, NULL, NULL); |
2775 | if (ret < 0) | 2775 | if (ret < 0) { |
2776 | /* | ||
2777 | SUS require strange return value to mlock | ||
2778 | - invalid addr generate to ENOMEM. | ||
2779 | - out of memory should generate EAGAIN. | ||
2780 | */ | ||
2781 | if (ret == -EFAULT) | ||
2782 | ret = -ENOMEM; | ||
2783 | else if (ret == -ENOMEM) | ||
2784 | ret = -EAGAIN; | ||
2776 | return ret; | 2785 | return ret; |
2777 | return ret == len ? 0 : -1; | 2786 | } |
2787 | return ret == len ? 0 : -ENOMEM; | ||
2778 | } | 2788 | } |
2779 | 2789 | ||
2780 | #if !defined(__HAVE_ARCH_GATE_AREA) | 2790 | #if !defined(__HAVE_ARCH_GATE_AREA) |
diff --git a/mm/mlock.c b/mm/mlock.c index 7b2656055d6a..01fbe93eff5c 100644 --- a/mm/mlock.c +++ b/mm/mlock.c | |||
@@ -78,8 +78,6 @@ success: | |||
78 | 78 | ||
79 | mm->locked_vm -= pages; | 79 | mm->locked_vm -= pages; |
80 | out: | 80 | out: |
81 | if (ret == -ENOMEM) | ||
82 | ret = -EAGAIN; | ||
83 | return ret; | 81 | return ret; |
84 | } | 82 | } |
85 | 83 | ||
diff --git a/mm/truncate.c b/mm/truncate.c index e68443d74567..894e9a70699f 100644 --- a/mm/truncate.c +++ b/mm/truncate.c | |||
@@ -104,7 +104,6 @@ truncate_complete_page(struct address_space *mapping, struct page *page) | |||
104 | cancel_dirty_page(page, PAGE_CACHE_SIZE); | 104 | cancel_dirty_page(page, PAGE_CACHE_SIZE); |
105 | 105 | ||
106 | remove_from_page_cache(page); | 106 | remove_from_page_cache(page); |
107 | ClearPageUptodate(page); | ||
108 | ClearPageMappedToDisk(page); | 107 | ClearPageMappedToDisk(page); |
109 | page_cache_release(page); /* pagecache ref */ | 108 | page_cache_release(page); /* pagecache ref */ |
110 | } | 109 | } |
@@ -356,7 +355,6 @@ invalidate_complete_page2(struct address_space *mapping, struct page *page) | |||
356 | BUG_ON(PagePrivate(page)); | 355 | BUG_ON(PagePrivate(page)); |
357 | __remove_from_page_cache(page); | 356 | __remove_from_page_cache(page); |
358 | spin_unlock_irq(&mapping->tree_lock); | 357 | spin_unlock_irq(&mapping->tree_lock); |
359 | ClearPageUptodate(page); | ||
360 | page_cache_release(page); /* pagecache ref */ | 358 | page_cache_release(page); /* pagecache ref */ |
361 | return 1; | 359 | return 1; |
362 | failed: | 360 | failed: |
diff --git a/scripts/Makefile.fwinst b/scripts/Makefile.fwinst index f63a663de158..6bf8e87f1dcf 100644 --- a/scripts/Makefile.fwinst +++ b/scripts/Makefile.fwinst | |||
@@ -50,8 +50,12 @@ PHONY += __fw_install __fw_modinst FORCE | |||
50 | .PHONY: $(PHONY) | 50 | .PHONY: $(PHONY) |
51 | 51 | ||
52 | __fw_install: $(installed-fw) | 52 | __fw_install: $(installed-fw) |
53 | |||
53 | __fw_modinst: $(installed-mod-fw) | 54 | __fw_modinst: $(installed-mod-fw) |
55 | @: | ||
56 | |||
54 | __fw_modbuild: $(addprefix $(obj)/,$(mod-fw)) | 57 | __fw_modbuild: $(addprefix $(obj)/,$(mod-fw)) |
58 | @: | ||
55 | 59 | ||
56 | FORCE: | 60 | FORCE: |
57 | 61 | ||
diff --git a/sound/core/seq/oss/seq_oss_synth.c b/sound/core/seq/oss/seq_oss_synth.c index 558dadbf45f1..e024e4588b82 100644 --- a/sound/core/seq/oss/seq_oss_synth.c +++ b/sound/core/seq/oss/seq_oss_synth.c | |||
@@ -604,6 +604,9 @@ snd_seq_oss_synth_make_info(struct seq_oss_devinfo *dp, int dev, struct synth_in | |||
604 | { | 604 | { |
605 | struct seq_oss_synth *rec; | 605 | struct seq_oss_synth *rec; |
606 | 606 | ||
607 | if (dev < 0 || dev >= dp->max_synthdev) | ||
608 | return -ENXIO; | ||
609 | |||
607 | if (dp->synths[dev].is_midi) { | 610 | if (dp->synths[dev].is_midi) { |
608 | struct midi_info minf; | 611 | struct midi_info minf; |
609 | snd_seq_oss_midi_make_info(dp, dp->synths[dev].midi_mapped, &minf); | 612 | snd_seq_oss_midi_make_info(dp, dp->synths[dev].midi_mapped, &minf); |