aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/SubmittingPatches26
-rw-r--r--Documentation/i2c/upgrading-clients281
-rw-r--r--Makefile6
-rw-r--r--arch/sparc/Kconfig1
-rw-r--r--arch/sparc/include/asm/Kbuild45
-rw-r--r--arch/sparc/include/asm/agp.h (renamed from include/asm-sparc/agp.h)0
-rw-r--r--arch/sparc/include/asm/apb.h (renamed from include/asm-sparc/apb.h)0
-rw-r--r--arch/sparc/include/asm/apc.h (renamed from include/asm-sparc/apc.h)0
-rw-r--r--arch/sparc/include/asm/asi.h (renamed from include/asm-sparc/asi.h)0
-rw-r--r--arch/sparc/include/asm/asmmacro.h (renamed from include/asm-sparc/asmmacro.h)0
-rw-r--r--arch/sparc/include/asm/atomic.h (renamed from include/asm-sparc/atomic.h)4
-rw-r--r--arch/sparc/include/asm/atomic_32.h (renamed from include/asm-sparc/atomic_32.h)0
-rw-r--r--arch/sparc/include/asm/atomic_64.h (renamed from include/asm-sparc/atomic_64.h)0
-rw-r--r--arch/sparc/include/asm/auxio.h (renamed from include/asm-sparc/auxio.h)4
-rw-r--r--arch/sparc/include/asm/auxio_32.h (renamed from include/asm-sparc/auxio_32.h)2
-rw-r--r--arch/sparc/include/asm/auxio_64.h (renamed from include/asm-sparc/auxio_64.h)0
-rw-r--r--arch/sparc/include/asm/auxvec.h (renamed from include/asm-sparc/auxvec.h)0
-rw-r--r--arch/sparc/include/asm/backoff.h (renamed from include/asm-sparc/backoff.h)0
-rw-r--r--arch/sparc/include/asm/bbc.h (renamed from include/asm-sparc/bbc.h)0
-rw-r--r--arch/sparc/include/asm/bitext.h (renamed from include/asm-sparc/bitext.h)0
-rw-r--r--arch/sparc/include/asm/bitops.h (renamed from include/asm-sparc/bitops.h)4
-rw-r--r--arch/sparc/include/asm/bitops_32.h (renamed from include/asm-sparc/bitops_32.h)0
-rw-r--r--arch/sparc/include/asm/bitops_64.h (renamed from include/asm-sparc/bitops_64.h)0
-rw-r--r--arch/sparc/include/asm/bpp.h (renamed from include/asm-sparc/bpp.h)0
-rw-r--r--arch/sparc/include/asm/btfixup.h (renamed from include/asm-sparc/btfixup.h)2
-rw-r--r--arch/sparc/include/asm/bug.h (renamed from include/asm-sparc/bug.h)0
-rw-r--r--arch/sparc/include/asm/bugs.h (renamed from include/asm-sparc/bugs.h)2
-rw-r--r--arch/sparc/include/asm/byteorder.h (renamed from include/asm-sparc/byteorder.h)0
-rw-r--r--arch/sparc/include/asm/cache.h (renamed from include/asm-sparc/cache.h)0
-rw-r--r--arch/sparc/include/asm/cacheflush.h (renamed from include/asm-sparc/cacheflush.h)4
-rw-r--r--arch/sparc/include/asm/cacheflush_32.h (renamed from include/asm-sparc/cacheflush_32.h)0
-rw-r--r--arch/sparc/include/asm/cacheflush_64.h (renamed from include/asm-sparc/cacheflush_64.h)0
-rw-r--r--arch/sparc/include/asm/chafsr.h (renamed from include/asm-sparc/chafsr.h)0
-rw-r--r--arch/sparc/include/asm/checksum.h (renamed from include/asm-sparc/checksum.h)4
-rw-r--r--arch/sparc/include/asm/checksum_32.h (renamed from include/asm-sparc/checksum_32.h)0
-rw-r--r--arch/sparc/include/asm/checksum_64.h (renamed from include/asm-sparc/checksum_64.h)0
-rw-r--r--arch/sparc/include/asm/chmctrl.h (renamed from include/asm-sparc/chmctrl.h)0
-rw-r--r--arch/sparc/include/asm/clock.h (renamed from include/asm-sparc/clock.h)0
-rw-r--r--arch/sparc/include/asm/cmt.h (renamed from include/asm-sparc/cmt.h)0
-rw-r--r--arch/sparc/include/asm/compat.h (renamed from include/asm-sparc/compat.h)0
-rw-r--r--arch/sparc/include/asm/compat_signal.h (renamed from include/asm-sparc/compat_signal.h)0
-rw-r--r--arch/sparc/include/asm/contregs.h (renamed from include/asm-sparc/contregs.h)0
-rw-r--r--arch/sparc/include/asm/cpudata.h (renamed from include/asm-sparc/cpudata.h)4
-rw-r--r--arch/sparc/include/asm/cpudata_32.h (renamed from include/asm-sparc/cpudata_32.h)2
-rw-r--r--arch/sparc/include/asm/cpudata_64.h (renamed from include/asm-sparc/cpudata_64.h)0
-rw-r--r--arch/sparc/include/asm/cputime.h (renamed from include/asm-sparc/cputime.h)0
-rw-r--r--arch/sparc/include/asm/current.h (renamed from include/asm-sparc/current.h)2
-rw-r--r--arch/sparc/include/asm/cypress.h (renamed from include/asm-sparc/cypress.h)0
-rw-r--r--arch/sparc/include/asm/dcr.h (renamed from include/asm-sparc/dcr.h)0
-rw-r--r--arch/sparc/include/asm/dcu.h (renamed from include/asm-sparc/dcu.h)0
-rw-r--r--arch/sparc/include/asm/delay.h (renamed from include/asm-sparc/delay.h)4
-rw-r--r--arch/sparc/include/asm/delay_32.h (renamed from include/asm-sparc/delay_32.h)0
-rw-r--r--arch/sparc/include/asm/delay_64.h (renamed from include/asm-sparc/delay_64.h)0
-rw-r--r--arch/sparc/include/asm/device.h (renamed from include/asm-sparc/device.h)0
-rw-r--r--arch/sparc/include/asm/display7seg.h (renamed from include/asm-sparc/display7seg.h)0
-rw-r--r--arch/sparc/include/asm/div64.h (renamed from include/asm-sparc/div64.h)0
-rw-r--r--arch/sparc/include/asm/dma-mapping.h (renamed from include/asm-sparc/dma-mapping.h)4
-rw-r--r--arch/sparc/include/asm/dma-mapping_32.h (renamed from include/asm-sparc/dma-mapping_32.h)0
-rw-r--r--arch/sparc/include/asm/dma-mapping_64.h (renamed from include/asm-sparc/dma-mapping_64.h)0
-rw-r--r--arch/sparc/include/asm/dma.h (renamed from include/asm-sparc/dma.h)4
-rw-r--r--arch/sparc/include/asm/dma_32.h (renamed from include/asm-sparc/dma_32.h)2
-rw-r--r--arch/sparc/include/asm/dma_64.h (renamed from include/asm-sparc/dma_64.h)2
-rw-r--r--arch/sparc/include/asm/ebus.h (renamed from include/asm-sparc/ebus.h)4
-rw-r--r--arch/sparc/include/asm/ebus_32.h (renamed from include/asm-sparc/ebus_32.h)0
-rw-r--r--arch/sparc/include/asm/ebus_64.h (renamed from include/asm-sparc/ebus_64.h)0
-rw-r--r--arch/sparc/include/asm/ecc.h (renamed from include/asm-sparc/ecc.h)0
-rw-r--r--arch/sparc/include/asm/eeprom.h (renamed from include/asm-sparc/eeprom.h)0
-rw-r--r--arch/sparc/include/asm/elf.h (renamed from include/asm-sparc/elf.h)4
-rw-r--r--arch/sparc/include/asm/elf_32.h (renamed from include/asm-sparc/elf_32.h)0
-rw-r--r--arch/sparc/include/asm/elf_64.h (renamed from include/asm-sparc/elf_64.h)0
-rw-r--r--arch/sparc/include/asm/emergency-restart.h (renamed from include/asm-sparc/emergency-restart.h)0
-rw-r--r--arch/sparc/include/asm/envctrl.h (renamed from include/asm-sparc/envctrl.h)0
-rw-r--r--arch/sparc/include/asm/errno.h (renamed from include/asm-sparc/errno.h)0
-rw-r--r--arch/sparc/include/asm/estate.h (renamed from include/asm-sparc/estate.h)0
-rw-r--r--arch/sparc/include/asm/fb.h (renamed from include/asm-sparc/fb.h)0
-rw-r--r--arch/sparc/include/asm/fbio.h (renamed from include/asm-sparc/fbio.h)0
-rw-r--r--arch/sparc/include/asm/fcntl.h (renamed from include/asm-sparc/fcntl.h)0
-rw-r--r--arch/sparc/include/asm/fhc.h (renamed from include/asm-sparc/fhc.h)0
-rw-r--r--arch/sparc/include/asm/fixmap.h (renamed from include/asm-sparc/fixmap.h)0
-rw-r--r--arch/sparc/include/asm/floppy.h (renamed from include/asm-sparc/floppy.h)4
-rw-r--r--arch/sparc/include/asm/floppy_32.h (renamed from include/asm-sparc/floppy_32.h)2
-rw-r--r--arch/sparc/include/asm/floppy_64.h (renamed from include/asm-sparc/floppy_64.h)0
-rw-r--r--arch/sparc/include/asm/fpumacro.h (renamed from include/asm-sparc/fpumacro.h)0
-rw-r--r--arch/sparc/include/asm/ftrace.h (renamed from include/asm-sparc64/ftrace.h)0
-rw-r--r--arch/sparc/include/asm/futex.h (renamed from include/asm-sparc/futex.h)4
-rw-r--r--arch/sparc/include/asm/futex_32.h (renamed from include/asm-sparc/futex_32.h)0
-rw-r--r--arch/sparc/include/asm/futex_64.h (renamed from include/asm-sparc/futex_64.h)0
-rw-r--r--arch/sparc/include/asm/hardirq.h (renamed from include/asm-sparc/hardirq.h)4
-rw-r--r--arch/sparc/include/asm/hardirq_32.h (renamed from include/asm-sparc/hardirq_32.h)0
-rw-r--r--arch/sparc/include/asm/hardirq_64.h (renamed from include/asm-sparc/hardirq_64.h)0
-rw-r--r--arch/sparc/include/asm/head.h (renamed from include/asm-sparc/head.h)4
-rw-r--r--arch/sparc/include/asm/head_32.h (renamed from include/asm-sparc/head_32.h)0
-rw-r--r--arch/sparc/include/asm/head_64.h (renamed from include/asm-sparc/head_64.h)0
-rw-r--r--arch/sparc/include/asm/highmem.h (renamed from include/asm-sparc/highmem.h)0
-rw-r--r--arch/sparc/include/asm/hugetlb.h (renamed from include/asm-sparc/hugetlb.h)0
-rw-r--r--arch/sparc/include/asm/hvtramp.h (renamed from include/asm-sparc/hvtramp.h)0
-rw-r--r--arch/sparc/include/asm/hw_irq.h (renamed from include/asm-sparc/hw_irq.h)0
-rw-r--r--arch/sparc/include/asm/hypervisor.h (renamed from include/asm-sparc/hypervisor.h)0
-rw-r--r--arch/sparc/include/asm/ide.h (renamed from include/asm-sparc/ide.h)0
-rw-r--r--arch/sparc/include/asm/idprom.h (renamed from include/asm-sparc/idprom.h)0
-rw-r--r--arch/sparc/include/asm/intr_queue.h (renamed from include/asm-sparc/intr_queue.h)0
-rw-r--r--arch/sparc/include/asm/io-unit.h (renamed from include/asm-sparc/io-unit.h)0
-rw-r--r--arch/sparc/include/asm/io.h (renamed from include/asm-sparc/io.h)4
-rw-r--r--arch/sparc/include/asm/io_32.h (renamed from include/asm-sparc/io_32.h)0
-rw-r--r--arch/sparc/include/asm/io_64.h (renamed from include/asm-sparc/io_64.h)0
-rw-r--r--arch/sparc/include/asm/ioctl.h (renamed from include/asm-sparc/ioctl.h)0
-rw-r--r--arch/sparc/include/asm/ioctls.h (renamed from include/asm-sparc/ioctls.h)0
-rw-r--r--arch/sparc/include/asm/iommu.h (renamed from include/asm-sparc/iommu.h)4
-rw-r--r--arch/sparc/include/asm/iommu_32.h (renamed from include/asm-sparc/iommu_32.h)0
-rw-r--r--arch/sparc/include/asm/iommu_64.h (renamed from include/asm-sparc/iommu_64.h)0
-rw-r--r--arch/sparc/include/asm/ipcbuf.h (renamed from include/asm-sparc/ipcbuf.h)4
-rw-r--r--arch/sparc/include/asm/ipcbuf_32.h (renamed from include/asm-sparc/ipcbuf_32.h)0
-rw-r--r--arch/sparc/include/asm/ipcbuf_64.h (renamed from include/asm-sparc/ipcbuf_64.h)0
-rw-r--r--arch/sparc/include/asm/irq.h (renamed from include/asm-sparc/irq.h)4
-rw-r--r--arch/sparc/include/asm/irq_32.h (renamed from include/asm-sparc/irq_32.h)0
-rw-r--r--arch/sparc/include/asm/irq_64.h (renamed from include/asm-sparc/irq_64.h)0
-rw-r--r--arch/sparc/include/asm/irq_regs.h (renamed from include/asm-sparc/irq_regs.h)0
-rw-r--r--arch/sparc/include/asm/irqflags.h (renamed from include/asm-sparc/irqflags.h)4
-rw-r--r--arch/sparc/include/asm/irqflags_32.h (renamed from include/asm-sparc/irqflags_32.h)2
-rw-r--r--arch/sparc/include/asm/irqflags_64.h (renamed from include/asm-sparc/irqflags_64.h)2
-rw-r--r--arch/sparc/include/asm/jsflash.h (renamed from include/asm-sparc/jsflash.h)0
-rw-r--r--arch/sparc/include/asm/kdebug.h (renamed from include/asm-sparc/kdebug.h)4
-rw-r--r--arch/sparc/include/asm/kdebug_32.h (renamed from include/asm-sparc/kdebug_32.h)0
-rw-r--r--arch/sparc/include/asm/kdebug_64.h (renamed from include/asm-sparc/kdebug_64.h)0
-rw-r--r--arch/sparc/include/asm/kgdb.h (renamed from include/asm-sparc/kgdb.h)0
-rw-r--r--arch/sparc/include/asm/kmap_types.h (renamed from include/asm-sparc/kmap_types.h)0
-rw-r--r--arch/sparc/include/asm/kprobes.h (renamed from include/asm-sparc/kprobes.h)0
-rw-r--r--arch/sparc/include/asm/ldc.h (renamed from include/asm-sparc/ldc.h)0
-rw-r--r--arch/sparc/include/asm/linkage.h (renamed from include/asm-sparc/linkage.h)0
-rw-r--r--arch/sparc/include/asm/lmb.h (renamed from include/asm-sparc/lmb.h)0
-rw-r--r--arch/sparc/include/asm/local.h (renamed from include/asm-sparc/local.h)0
-rw-r--r--arch/sparc/include/asm/lsu.h (renamed from include/asm-sparc/lsu.h)0
-rw-r--r--arch/sparc/include/asm/machines.h (renamed from include/asm-sparc/machines.h)0
-rw-r--r--arch/sparc/include/asm/mbus.h (renamed from include/asm-sparc/mbus.h)0
-rw-r--r--arch/sparc/include/asm/mc146818rtc.h (renamed from include/asm-sparc/mc146818rtc.h)4
-rw-r--r--arch/sparc/include/asm/mc146818rtc_32.h (renamed from include/asm-sparc/mc146818rtc_32.h)0
-rw-r--r--arch/sparc/include/asm/mc146818rtc_64.h (renamed from include/asm-sparc/mc146818rtc_64.h)0
-rw-r--r--arch/sparc/include/asm/mdesc.h (renamed from include/asm-sparc/mdesc.h)0
-rw-r--r--arch/sparc/include/asm/memreg.h (renamed from include/asm-sparc/memreg.h)0
-rw-r--r--arch/sparc/include/asm/mman.h (renamed from include/asm-sparc/mman.h)0
-rw-r--r--arch/sparc/include/asm/mmu.h (renamed from include/asm-sparc/mmu.h)4
-rw-r--r--arch/sparc/include/asm/mmu_32.h (renamed from include/asm-sparc/mmu_32.h)0
-rw-r--r--arch/sparc/include/asm/mmu_64.h (renamed from include/asm-sparc/mmu_64.h)0
-rw-r--r--arch/sparc/include/asm/mmu_context.h (renamed from include/asm-sparc/mmu_context.h)4
-rw-r--r--arch/sparc/include/asm/mmu_context_32.h (renamed from include/asm-sparc/mmu_context_32.h)0
-rw-r--r--arch/sparc/include/asm/mmu_context_64.h (renamed from include/asm-sparc/mmu_context_64.h)0
-rw-r--r--arch/sparc/include/asm/mmzone.h (renamed from include/asm-sparc/mmzone.h)0
-rw-r--r--arch/sparc/include/asm/module.h (renamed from include/asm-sparc/module.h)4
-rw-r--r--arch/sparc/include/asm/module_32.h (renamed from include/asm-sparc/module_32.h)0
-rw-r--r--arch/sparc/include/asm/module_64.h (renamed from include/asm-sparc/module_64.h)0
-rw-r--r--arch/sparc/include/asm/mostek.h (renamed from include/asm-sparc/mostek.h)4
-rw-r--r--arch/sparc/include/asm/mostek_32.h (renamed from include/asm-sparc/mostek_32.h)0
-rw-r--r--arch/sparc/include/asm/mostek_64.h (renamed from include/asm-sparc/mostek_64.h)0
-rw-r--r--arch/sparc/include/asm/mpmbox.h (renamed from include/asm-sparc/mpmbox.h)0
-rw-r--r--arch/sparc/include/asm/msgbuf.h (renamed from include/asm-sparc/msgbuf.h)0
-rw-r--r--arch/sparc/include/asm/msi.h (renamed from include/asm-sparc/msi.h)0
-rw-r--r--arch/sparc/include/asm/mutex.h (renamed from include/asm-sparc/mutex.h)0
-rw-r--r--arch/sparc/include/asm/mxcc.h (renamed from include/asm-sparc/mxcc.h)0
-rw-r--r--arch/sparc/include/asm/ns87303.h (renamed from include/asm-sparc/ns87303.h)0
-rw-r--r--arch/sparc/include/asm/obio.h (renamed from include/asm-sparc/obio.h)0
-rw-r--r--arch/sparc/include/asm/of_device.h (renamed from include/asm-sparc/of_device.h)0
-rw-r--r--arch/sparc/include/asm/of_platform.h (renamed from include/asm-sparc/of_platform.h)4
-rw-r--r--arch/sparc/include/asm/of_platform_32.h (renamed from include/asm-sparc/of_platform_32.h)2
-rw-r--r--arch/sparc/include/asm/of_platform_64.h (renamed from include/asm-sparc/of_platform_64.h)2
-rw-r--r--arch/sparc/include/asm/openprom.h (renamed from include/asm-sparc/openprom.h)4
-rw-r--r--arch/sparc/include/asm/openprom_32.h (renamed from include/asm-sparc/openprom_32.h)0
-rw-r--r--arch/sparc/include/asm/openprom_64.h (renamed from include/asm-sparc/openprom_64.h)0
-rw-r--r--arch/sparc/include/asm/openpromio.h (renamed from include/asm-sparc/openpromio.h)0
-rw-r--r--arch/sparc/include/asm/oplib.h (renamed from include/asm-sparc/oplib.h)4
-rw-r--r--arch/sparc/include/asm/oplib_32.h (renamed from include/asm-sparc/oplib_32.h)0
-rw-r--r--arch/sparc/include/asm/oplib_64.h (renamed from include/asm-sparc/oplib_64.h)0
-rw-r--r--arch/sparc/include/asm/page.h (renamed from include/asm-sparc/page.h)4
-rw-r--r--arch/sparc/include/asm/page_32.h (renamed from include/asm-sparc/page_32.h)0
-rw-r--r--arch/sparc/include/asm/page_64.h (renamed from include/asm-sparc/page_64.h)0
-rw-r--r--arch/sparc/include/asm/param.h (renamed from include/asm-sparc/param.h)0
-rw-r--r--arch/sparc/include/asm/parport.h (renamed from include/asm-sparc/parport.h)0
-rw-r--r--arch/sparc/include/asm/pbm.h (renamed from include/asm-sparc/pbm.h)0
-rw-r--r--arch/sparc/include/asm/pci.h (renamed from include/asm-sparc/pci.h)4
-rw-r--r--arch/sparc/include/asm/pci_32.h (renamed from include/asm-sparc/pci_32.h)0
-rw-r--r--arch/sparc/include/asm/pci_64.h (renamed from include/asm-sparc/pci_64.h)0
-rw-r--r--arch/sparc/include/asm/pcic.h (renamed from include/asm-sparc/pcic.h)0
-rw-r--r--arch/sparc/include/asm/percpu.h (renamed from include/asm-sparc/percpu.h)4
-rw-r--r--arch/sparc/include/asm/percpu_32.h (renamed from include/asm-sparc/percpu_32.h)0
-rw-r--r--arch/sparc/include/asm/percpu_64.h (renamed from include/asm-sparc/percpu_64.h)0
-rw-r--r--arch/sparc/include/asm/perfctr.h (renamed from include/asm-sparc/perfctr.h)0
-rw-r--r--arch/sparc/include/asm/pgalloc.h (renamed from include/asm-sparc/pgalloc.h)4
-rw-r--r--arch/sparc/include/asm/pgalloc_32.h (renamed from include/asm-sparc/pgalloc_32.h)0
-rw-r--r--arch/sparc/include/asm/pgalloc_64.h (renamed from include/asm-sparc/pgalloc_64.h)0
-rw-r--r--arch/sparc/include/asm/pgtable.h (renamed from include/asm-sparc/pgtable.h)4
-rw-r--r--arch/sparc/include/asm/pgtable_32.h (renamed from include/asm-sparc/pgtable_32.h)2
-rw-r--r--arch/sparc/include/asm/pgtable_64.h (renamed from include/asm-sparc/pgtable_64.h)0
-rw-r--r--arch/sparc/include/asm/pgtsrmmu.h (renamed from include/asm-sparc/pgtsrmmu.h)0
-rw-r--r--arch/sparc/include/asm/pgtsun4.h (renamed from include/asm-sparc/pgtsun4.h)0
-rw-r--r--arch/sparc/include/asm/pgtsun4c.h (renamed from include/asm-sparc/pgtsun4c.h)0
-rw-r--r--arch/sparc/include/asm/pil.h (renamed from include/asm-sparc/pil.h)0
-rw-r--r--arch/sparc/include/asm/poll.h (renamed from include/asm-sparc/poll.h)0
-rw-r--r--arch/sparc/include/asm/posix_types.h (renamed from include/asm-sparc/posix_types.h)4
-rw-r--r--arch/sparc/include/asm/posix_types_32.h (renamed from include/asm-sparc/posix_types_32.h)0
-rw-r--r--arch/sparc/include/asm/posix_types_64.h (renamed from include/asm-sparc/posix_types_64.h)0
-rw-r--r--arch/sparc/include/asm/processor.h (renamed from include/asm-sparc/processor.h)4
-rw-r--r--arch/sparc/include/asm/processor_32.h (renamed from include/asm-sparc/processor_32.h)3
-rw-r--r--arch/sparc/include/asm/processor_64.h (renamed from include/asm-sparc/processor_64.h)2
-rw-r--r--arch/sparc/include/asm/prom.h (renamed from include/asm-sparc/prom.h)0
-rw-r--r--arch/sparc/include/asm/psr.h (renamed from include/asm-sparc/psr.h)0
-rw-r--r--arch/sparc/include/asm/psrcompat.h (renamed from include/asm-sparc/psrcompat.h)0
-rw-r--r--arch/sparc/include/asm/pstate.h (renamed from include/asm-sparc/pstate.h)0
-rw-r--r--arch/sparc/include/asm/ptrace.h (renamed from include/asm-sparc/ptrace.h)4
-rw-r--r--arch/sparc/include/asm/ptrace_32.h (renamed from include/asm-sparc/ptrace_32.h)1
-rw-r--r--arch/sparc/include/asm/ptrace_64.h (renamed from include/asm-sparc/ptrace_64.h)1
-rw-r--r--arch/sparc/include/asm/reboot.h (renamed from include/asm-sparc/reboot.h)0
-rw-r--r--arch/sparc/include/asm/reg.h (renamed from include/asm-sparc/reg.h)4
-rw-r--r--arch/sparc/include/asm/reg_32.h (renamed from include/asm-sparc/reg_32.h)2
-rw-r--r--arch/sparc/include/asm/reg_64.h (renamed from include/asm-sparc/reg_64.h)2
-rw-r--r--arch/sparc/include/asm/resource.h (renamed from include/asm-sparc/resource.h)0
-rw-r--r--arch/sparc/include/asm/ross.h (renamed from include/asm-sparc/ross.h)0
-rw-r--r--arch/sparc/include/asm/rtc.h (renamed from include/asm-sparc/rtc.h)0
-rw-r--r--arch/sparc/include/asm/rwsem-const.h (renamed from include/asm-sparc/rwsem-const.h)0
-rw-r--r--arch/sparc/include/asm/rwsem.h (renamed from include/asm-sparc/rwsem.h)0
-rw-r--r--arch/sparc/include/asm/sbi.h (renamed from include/asm-sparc/sbi.h)0
-rw-r--r--arch/sparc/include/asm/sbus.h (renamed from include/asm-sparc/sbus.h)4
-rw-r--r--arch/sparc/include/asm/sbus_32.h (renamed from include/asm-sparc/sbus_32.h)0
-rw-r--r--arch/sparc/include/asm/sbus_64.h (renamed from include/asm-sparc/sbus_64.h)0
-rw-r--r--arch/sparc/include/asm/scatterlist.h (renamed from include/asm-sparc/scatterlist.h)4
-rw-r--r--arch/sparc/include/asm/scatterlist_32.h (renamed from include/asm-sparc/scatterlist_32.h)0
-rw-r--r--arch/sparc/include/asm/scatterlist_64.h (renamed from include/asm-sparc/scatterlist_64.h)0
-rw-r--r--arch/sparc/include/asm/scratchpad.h (renamed from include/asm-sparc/scratchpad.h)0
-rw-r--r--arch/sparc/include/asm/seccomp.h (renamed from include/asm-sparc/seccomp.h)0
-rw-r--r--arch/sparc/include/asm/sections.h (renamed from include/asm-sparc/sections.h)4
-rw-r--r--arch/sparc/include/asm/sections_32.h (renamed from include/asm-sparc/sections_32.h)0
-rw-r--r--arch/sparc/include/asm/sections_64.h (renamed from include/asm-sparc/sections_64.h)0
-rw-r--r--arch/sparc/include/asm/sembuf.h (renamed from include/asm-sparc/sembuf.h)0
-rw-r--r--arch/sparc/include/asm/setup.h (renamed from include/asm-sparc/setup.h)0
-rw-r--r--arch/sparc/include/asm/sfafsr.h (renamed from include/asm-sparc/sfafsr.h)0
-rw-r--r--arch/sparc/include/asm/sfp-machine.h (renamed from include/asm-sparc/sfp-machine.h)4
-rw-r--r--arch/sparc/include/asm/sfp-machine_32.h (renamed from include/asm-sparc/sfp-machine_32.h)0
-rw-r--r--arch/sparc/include/asm/sfp-machine_64.h (renamed from include/asm-sparc/sfp-machine_64.h)0
-rw-r--r--arch/sparc/include/asm/shmbuf.h (renamed from include/asm-sparc/shmbuf.h)0
-rw-r--r--arch/sparc/include/asm/shmparam.h (renamed from include/asm-sparc/shmparam.h)4
-rw-r--r--arch/sparc/include/asm/shmparam_32.h (renamed from include/asm-sparc/shmparam_32.h)0
-rw-r--r--arch/sparc/include/asm/shmparam_64.h (renamed from include/asm-sparc/shmparam_64.h)0
-rw-r--r--arch/sparc/include/asm/sigcontext.h (renamed from include/asm-sparc/sigcontext.h)4
-rw-r--r--arch/sparc/include/asm/sigcontext_32.h (renamed from include/asm-sparc/sigcontext_32.h)0
-rw-r--r--arch/sparc/include/asm/sigcontext_64.h (renamed from include/asm-sparc/sigcontext_64.h)0
-rw-r--r--arch/sparc/include/asm/siginfo.h (renamed from include/asm-sparc/siginfo.h)4
-rw-r--r--arch/sparc/include/asm/siginfo_32.h (renamed from include/asm-sparc/siginfo_32.h)0
-rw-r--r--arch/sparc/include/asm/siginfo_64.h (renamed from include/asm-sparc/siginfo_64.h)0
-rw-r--r--arch/sparc/include/asm/signal.h (renamed from include/asm-sparc/signal.h)4
-rw-r--r--arch/sparc/include/asm/signal_32.h (renamed from include/asm-sparc/signal_32.h)0
-rw-r--r--arch/sparc/include/asm/signal_64.h (renamed from include/asm-sparc/signal_64.h)0
-rw-r--r--arch/sparc/include/asm/smp.h (renamed from include/asm-sparc/smp.h)4
-rw-r--r--arch/sparc/include/asm/smp_32.h (renamed from include/asm-sparc/smp_32.h)0
-rw-r--r--arch/sparc/include/asm/smp_64.h (renamed from include/asm-sparc/smp_64.h)0
-rw-r--r--arch/sparc/include/asm/smpprim.h (renamed from include/asm-sparc/smpprim.h)0
-rw-r--r--arch/sparc/include/asm/socket.h (renamed from include/asm-sparc/socket.h)0
-rw-r--r--arch/sparc/include/asm/sockios.h (renamed from include/asm-sparc/sockios.h)0
-rw-r--r--arch/sparc/include/asm/sparsemem.h (renamed from include/asm-sparc/sparsemem.h)0
-rw-r--r--arch/sparc/include/asm/spinlock.h (renamed from include/asm-sparc/spinlock.h)4
-rw-r--r--arch/sparc/include/asm/spinlock_32.h (renamed from include/asm-sparc/spinlock_32.h)0
-rw-r--r--arch/sparc/include/asm/spinlock_64.h (renamed from include/asm-sparc/spinlock_64.h)0
-rw-r--r--arch/sparc/include/asm/spinlock_types.h (renamed from include/asm-sparc/spinlock_types.h)0
-rw-r--r--arch/sparc/include/asm/spitfire.h (renamed from include/asm-sparc/spitfire.h)0
-rw-r--r--arch/sparc/include/asm/sstate.h (renamed from include/asm-sparc/sstate.h)0
-rw-r--r--arch/sparc/include/asm/stacktrace.h (renamed from include/asm-sparc/stacktrace.h)0
-rw-r--r--arch/sparc/include/asm/starfire.h (renamed from include/asm-sparc/starfire.h)0
-rw-r--r--arch/sparc/include/asm/stat.h (renamed from include/asm-sparc/stat.h)4
-rw-r--r--arch/sparc/include/asm/stat_32.h (renamed from include/asm-sparc/stat_32.h)0
-rw-r--r--arch/sparc/include/asm/stat_64.h (renamed from include/asm-sparc/stat_64.h)0
-rw-r--r--arch/sparc/include/asm/statfs.h (renamed from include/asm-sparc/statfs.h)4
-rw-r--r--arch/sparc/include/asm/statfs_32.h (renamed from include/asm-sparc/statfs_32.h)0
-rw-r--r--arch/sparc/include/asm/statfs_64.h (renamed from include/asm-sparc/statfs_64.h)0
-rw-r--r--arch/sparc/include/asm/string.h (renamed from include/asm-sparc/string.h)4
-rw-r--r--arch/sparc/include/asm/string_32.h (renamed from include/asm-sparc/string_32.h)0
-rw-r--r--arch/sparc/include/asm/string_64.h (renamed from include/asm-sparc/string_64.h)0
-rw-r--r--arch/sparc/include/asm/sun4paddr.h (renamed from include/asm-sparc/sun4paddr.h)0
-rw-r--r--arch/sparc/include/asm/sun4prom.h (renamed from include/asm-sparc/sun4prom.h)0
-rw-r--r--arch/sparc/include/asm/sunbpp.h (renamed from include/asm-sparc/sunbpp.h)2
-rw-r--r--arch/sparc/include/asm/swift.h (renamed from include/asm-sparc/swift.h)0
-rw-r--r--arch/sparc/include/asm/syscall.h120
-rw-r--r--arch/sparc/include/asm/syscalls.h (renamed from include/asm-sparc/syscalls.h)0
-rw-r--r--arch/sparc/include/asm/sysen.h (renamed from include/asm-sparc/sysen.h)0
-rw-r--r--arch/sparc/include/asm/system.h (renamed from include/asm-sparc/system.h)4
-rw-r--r--arch/sparc/include/asm/system_32.h (renamed from include/asm-sparc/system_32.h)0
-rw-r--r--arch/sparc/include/asm/system_64.h (renamed from include/asm-sparc/system_64.h)0
-rw-r--r--arch/sparc/include/asm/termbits.h (renamed from include/asm-sparc/termbits.h)0
-rw-r--r--arch/sparc/include/asm/termios.h (renamed from include/asm-sparc/termios.h)0
-rw-r--r--arch/sparc/include/asm/thread_info.h (renamed from include/asm-sparc/thread_info.h)4
-rw-r--r--arch/sparc/include/asm/thread_info_32.h (renamed from include/asm-sparc/thread_info_32.h)7
-rw-r--r--arch/sparc/include/asm/thread_info_64.h (renamed from include/asm-sparc/thread_info_64.h)8
-rw-r--r--arch/sparc/include/asm/timer.h (renamed from include/asm-sparc/timer.h)4
-rw-r--r--arch/sparc/include/asm/timer_32.h (renamed from include/asm-sparc/timer_32.h)0
-rw-r--r--arch/sparc/include/asm/timer_64.h (renamed from include/asm-sparc/timer_64.h)0
-rw-r--r--arch/sparc/include/asm/timex.h (renamed from include/asm-sparc/timex.h)4
-rw-r--r--arch/sparc/include/asm/timex_32.h (renamed from include/asm-sparc/timex_32.h)2
-rw-r--r--arch/sparc/include/asm/timex_64.h (renamed from include/asm-sparc/timex_64.h)2
-rw-r--r--arch/sparc/include/asm/tlb.h (renamed from include/asm-sparc/tlb.h)4
-rw-r--r--arch/sparc/include/asm/tlb_32.h (renamed from include/asm-sparc/tlb_32.h)0
-rw-r--r--arch/sparc/include/asm/tlb_64.h (renamed from include/asm-sparc/tlb_64.h)0
-rw-r--r--arch/sparc/include/asm/tlbflush.h (renamed from include/asm-sparc/tlbflush.h)4
-rw-r--r--arch/sparc/include/asm/tlbflush_32.h (renamed from include/asm-sparc/tlbflush_32.h)0
-rw-r--r--arch/sparc/include/asm/tlbflush_64.h (renamed from include/asm-sparc/tlbflush_64.h)0
-rw-r--r--arch/sparc/include/asm/topology.h (renamed from include/asm-sparc/topology.h)4
-rw-r--r--arch/sparc/include/asm/topology_32.h (renamed from include/asm-sparc/topology_32.h)0
-rw-r--r--arch/sparc/include/asm/topology_64.h (renamed from include/asm-sparc/topology_64.h)0
-rw-r--r--arch/sparc/include/asm/traps.h (renamed from include/asm-sparc/traps.h)0
-rw-r--r--arch/sparc/include/asm/tsb.h (renamed from include/asm-sparc/tsb.h)0
-rw-r--r--arch/sparc/include/asm/tsunami.h (renamed from include/asm-sparc/tsunami.h)0
-rw-r--r--arch/sparc/include/asm/ttable.h (renamed from include/asm-sparc/ttable.h)0
-rw-r--r--arch/sparc/include/asm/turbosparc.h (renamed from include/asm-sparc/turbosparc.h)0
-rw-r--r--arch/sparc/include/asm/types.h (renamed from include/asm-sparc/types.h)0
-rw-r--r--arch/sparc/include/asm/uaccess.h (renamed from include/asm-sparc/uaccess.h)4
-rw-r--r--arch/sparc/include/asm/uaccess_32.h (renamed from include/asm-sparc/uaccess_32.h)0
-rw-r--r--arch/sparc/include/asm/uaccess_64.h (renamed from include/asm-sparc/uaccess_64.h)0
-rw-r--r--arch/sparc/include/asm/uctx.h (renamed from include/asm-sparc/uctx.h)0
-rw-r--r--arch/sparc/include/asm/unaligned.h (renamed from include/asm-sparc/unaligned.h)0
-rw-r--r--arch/sparc/include/asm/unistd.h (renamed from include/asm-sparc/unistd.h)4
-rw-r--r--arch/sparc/include/asm/unistd_32.h (renamed from include/asm-sparc/unistd_32.h)0
-rw-r--r--arch/sparc/include/asm/unistd_64.h (renamed from include/asm-sparc/unistd_64.h)0
-rw-r--r--arch/sparc/include/asm/upa.h (renamed from include/asm-sparc/upa.h)0
-rw-r--r--arch/sparc/include/asm/user.h (renamed from include/asm-sparc/user.h)0
-rw-r--r--arch/sparc/include/asm/utrap.h (renamed from include/asm-sparc/utrap.h)2
-rw-r--r--arch/sparc/include/asm/vac-ops.h (renamed from include/asm-sparc/vac-ops.h)0
-rw-r--r--arch/sparc/include/asm/vaddrs.h (renamed from include/asm-sparc/vaddrs.h)2
-rw-r--r--arch/sparc/include/asm/vfc_ioctls.h (renamed from include/asm-sparc/vfc_ioctls.h)0
-rw-r--r--arch/sparc/include/asm/vga.h (renamed from include/asm-sparc/vga.h)0
-rw-r--r--arch/sparc/include/asm/viking.h (renamed from include/asm-sparc/viking.h)0
-rw-r--r--arch/sparc/include/asm/vio.h (renamed from include/asm-sparc/vio.h)0
-rw-r--r--arch/sparc/include/asm/visasm.h (renamed from include/asm-sparc/visasm.h)0
-rw-r--r--arch/sparc/include/asm/watchdog.h (renamed from include/asm-sparc/watchdog.h)0
-rw-r--r--arch/sparc/include/asm/winmacro.h (renamed from include/asm-sparc/winmacro.h)0
-rw-r--r--arch/sparc/include/asm/xor.h (renamed from include/asm-sparc/xor.h)4
-rw-r--r--arch/sparc/include/asm/xor_32.h (renamed from include/asm-sparc/xor_32.h)2
-rw-r--r--arch/sparc/include/asm/xor_64.h (renamed from include/asm-sparc/xor_64.h)2
-rw-r--r--arch/sparc/kernel/entry.S12
-rw-r--r--arch/sparc/kernel/ptrace.c26
-rw-r--r--arch/sparc/kernel/rtrap.S5
-rw-r--r--arch/sparc/kernel/signal.c16
-rw-r--r--arch/sparc64/Kconfig1
-rw-r--r--arch/sparc64/kernel/compat_audit.c2
-rw-r--r--arch/sparc64/kernel/entry.h3
-rw-r--r--arch/sparc64/kernel/ptrace.c32
-rw-r--r--arch/sparc64/kernel/rtrap.S6
-rw-r--r--arch/sparc64/kernel/signal.c8
-rw-r--r--arch/sparc64/kernel/signal32.c3
-rw-r--r--arch/sparc64/kernel/syscalls.S4
-rw-r--r--drivers/acpi/processor_idle.c15
-rw-r--r--drivers/base/memory.c3
-rw-r--r--drivers/char/pcmcia/ipwireless/hardware.c275
-rw-r--r--drivers/char/pcmcia/ipwireless/hardware.h4
-rw-r--r--drivers/char/pcmcia/ipwireless/main.c86
-rw-r--r--drivers/char/pcmcia/ipwireless/main.h5
-rw-r--r--drivers/char/pcmcia/ipwireless/network.c58
-rw-r--r--drivers/char/pcmcia/ipwireless/network.h1
-rw-r--r--drivers/char/pcmcia/ipwireless/tty.c2
-rw-r--r--drivers/cpuidle/cpuidle.c2
-rw-r--r--drivers/i2c/busses/i2c-bfin-twi.c35
-rw-r--r--drivers/i2c/busses/i2c-gpio.c9
-rw-r--r--drivers/i2c/busses/i2c-s3c2410.c129
-rw-r--r--include/asm-arm/plat-s3c/iic.h1
-rw-r--r--include/asm-sparc/Kbuild1
-rw-r--r--include/asm-sparc64/Kbuild1
-rw-r--r--include/asm-sparc64/agp.h1
-rw-r--r--include/asm-sparc64/apb.h1
-rw-r--r--include/asm-sparc64/asi.h1
-rw-r--r--include/asm-sparc64/atomic.h1
-rw-r--r--include/asm-sparc64/auxio.h1
-rw-r--r--include/asm-sparc64/auxvec.h1
-rw-r--r--include/asm-sparc64/backoff.h1
-rw-r--r--include/asm-sparc64/bbc.h1
-rw-r--r--include/asm-sparc64/bitops.h1
-rw-r--r--include/asm-sparc64/bpp.h1
-rw-r--r--include/asm-sparc64/bug.h1
-rw-r--r--include/asm-sparc64/bugs.h1
-rw-r--r--include/asm-sparc64/byteorder.h1
-rw-r--r--include/asm-sparc64/cache.h1
-rw-r--r--include/asm-sparc64/cacheflush.h1
-rw-r--r--include/asm-sparc64/chafsr.h1
-rw-r--r--include/asm-sparc64/checksum.h1
-rw-r--r--include/asm-sparc64/chmctrl.h1
-rw-r--r--include/asm-sparc64/cmt.h1
-rw-r--r--include/asm-sparc64/compat.h1
-rw-r--r--include/asm-sparc64/compat_signal.h1
-rw-r--r--include/asm-sparc64/cpudata.h1
-rw-r--r--include/asm-sparc64/cputime.h1
-rw-r--r--include/asm-sparc64/current.h1
-rw-r--r--include/asm-sparc64/dcr.h1
-rw-r--r--include/asm-sparc64/dcu.h1
-rw-r--r--include/asm-sparc64/delay.h1
-rw-r--r--include/asm-sparc64/device.h1
-rw-r--r--include/asm-sparc64/display7seg.h1
-rw-r--r--include/asm-sparc64/div64.h1
-rw-r--r--include/asm-sparc64/dma-mapping.h1
-rw-r--r--include/asm-sparc64/dma.h1
-rw-r--r--include/asm-sparc64/ebus.h1
-rw-r--r--include/asm-sparc64/elf.h1
-rw-r--r--include/asm-sparc64/emergency-restart.h1
-rw-r--r--include/asm-sparc64/envctrl.h1
-rw-r--r--include/asm-sparc64/errno.h1
-rw-r--r--include/asm-sparc64/estate.h1
-rw-r--r--include/asm-sparc64/fb.h1
-rw-r--r--include/asm-sparc64/fbio.h1
-rw-r--r--include/asm-sparc64/fcntl.h1
-rw-r--r--include/asm-sparc64/fhc.h1
-rw-r--r--include/asm-sparc64/floppy.h1
-rw-r--r--include/asm-sparc64/fpumacro.h1
-rw-r--r--include/asm-sparc64/futex.h1
-rw-r--r--include/asm-sparc64/hardirq.h1
-rw-r--r--include/asm-sparc64/head.h1
-rw-r--r--include/asm-sparc64/hugetlb.h1
-rw-r--r--include/asm-sparc64/hvtramp.h1
-rw-r--r--include/asm-sparc64/hw_irq.h1
-rw-r--r--include/asm-sparc64/hypervisor.h1
-rw-r--r--include/asm-sparc64/ide.h1
-rw-r--r--include/asm-sparc64/idprom.h1
-rw-r--r--include/asm-sparc64/intr_queue.h1
-rw-r--r--include/asm-sparc64/io.h1
-rw-r--r--include/asm-sparc64/ioctl.h1
-rw-r--r--include/asm-sparc64/ioctls.h1
-rw-r--r--include/asm-sparc64/iommu.h1
-rw-r--r--include/asm-sparc64/ipcbuf.h1
-rw-r--r--include/asm-sparc64/irq.h1
-rw-r--r--include/asm-sparc64/irq_regs.h1
-rw-r--r--include/asm-sparc64/irqflags.h1
-rw-r--r--include/asm-sparc64/kdebug.h1
-rw-r--r--include/asm-sparc64/kgdb.h1
-rw-r--r--include/asm-sparc64/kmap_types.h1
-rw-r--r--include/asm-sparc64/kprobes.h1
-rw-r--r--include/asm-sparc64/ldc.h1
-rw-r--r--include/asm-sparc64/linkage.h1
-rw-r--r--include/asm-sparc64/lmb.h1
-rw-r--r--include/asm-sparc64/local.h1
-rw-r--r--include/asm-sparc64/lsu.h1
-rw-r--r--include/asm-sparc64/mc146818rtc.h1
-rw-r--r--include/asm-sparc64/mdesc.h1
-rw-r--r--include/asm-sparc64/mman.h1
-rw-r--r--include/asm-sparc64/mmu.h1
-rw-r--r--include/asm-sparc64/mmu_context.h1
-rw-r--r--include/asm-sparc64/mmzone.h1
-rw-r--r--include/asm-sparc64/module.h1
-rw-r--r--include/asm-sparc64/mostek.h1
-rw-r--r--include/asm-sparc64/msgbuf.h1
-rw-r--r--include/asm-sparc64/mutex.h1
-rw-r--r--include/asm-sparc64/ns87303.h1
-rw-r--r--include/asm-sparc64/of_device.h1
-rw-r--r--include/asm-sparc64/of_platform.h1
-rw-r--r--include/asm-sparc64/openprom.h1
-rw-r--r--include/asm-sparc64/openpromio.h1
-rw-r--r--include/asm-sparc64/oplib.h1
-rw-r--r--include/asm-sparc64/page.h1
-rw-r--r--include/asm-sparc64/param.h1
-rw-r--r--include/asm-sparc64/parport.h1
-rw-r--r--include/asm-sparc64/pci.h1
-rw-r--r--include/asm-sparc64/percpu.h1
-rw-r--r--include/asm-sparc64/perfctr.h1
-rw-r--r--include/asm-sparc64/pgalloc.h1
-rw-r--r--include/asm-sparc64/pgtable.h1
-rw-r--r--include/asm-sparc64/pil.h1
-rw-r--r--include/asm-sparc64/poll.h1
-rw-r--r--include/asm-sparc64/posix_types.h1
-rw-r--r--include/asm-sparc64/processor.h1
-rw-r--r--include/asm-sparc64/prom.h1
-rw-r--r--include/asm-sparc64/psrcompat.h1
-rw-r--r--include/asm-sparc64/pstate.h1
-rw-r--r--include/asm-sparc64/ptrace.h1
-rw-r--r--include/asm-sparc64/reboot.h1
-rw-r--r--include/asm-sparc64/reg.h1
-rw-r--r--include/asm-sparc64/resource.h1
-rw-r--r--include/asm-sparc64/rtc.h1
-rw-r--r--include/asm-sparc64/rwsem-const.h1
-rw-r--r--include/asm-sparc64/rwsem.h1
-rw-r--r--include/asm-sparc64/sbus.h1
-rw-r--r--include/asm-sparc64/scatterlist.h1
-rw-r--r--include/asm-sparc64/scratchpad.h1
-rw-r--r--include/asm-sparc64/seccomp.h1
-rw-r--r--include/asm-sparc64/sections.h1
-rw-r--r--include/asm-sparc64/sembuf.h1
-rw-r--r--include/asm-sparc64/setup.h1
-rw-r--r--include/asm-sparc64/sfafsr.h1
-rw-r--r--include/asm-sparc64/sfp-machine.h1
-rw-r--r--include/asm-sparc64/shmbuf.h1
-rw-r--r--include/asm-sparc64/shmparam.h1
-rw-r--r--include/asm-sparc64/sigcontext.h1
-rw-r--r--include/asm-sparc64/siginfo.h1
-rw-r--r--include/asm-sparc64/signal.h1
-rw-r--r--include/asm-sparc64/smp.h1
-rw-r--r--include/asm-sparc64/socket.h1
-rw-r--r--include/asm-sparc64/sockios.h1
-rw-r--r--include/asm-sparc64/sparsemem.h1
-rw-r--r--include/asm-sparc64/spinlock.h1
-rw-r--r--include/asm-sparc64/spinlock_types.h1
-rw-r--r--include/asm-sparc64/spitfire.h1
-rw-r--r--include/asm-sparc64/sstate.h1
-rw-r--r--include/asm-sparc64/stacktrace.h1
-rw-r--r--include/asm-sparc64/starfire.h1
-rw-r--r--include/asm-sparc64/stat.h1
-rw-r--r--include/asm-sparc64/statfs.h1
-rw-r--r--include/asm-sparc64/string.h1
-rw-r--r--include/asm-sparc64/sunbpp.h1
-rw-r--r--include/asm-sparc64/syscalls.h1
-rw-r--r--include/asm-sparc64/system.h1
-rw-r--r--include/asm-sparc64/termbits.h1
-rw-r--r--include/asm-sparc64/termios.h1
-rw-r--r--include/asm-sparc64/thread_info.h1
-rw-r--r--include/asm-sparc64/timer.h1
-rw-r--r--include/asm-sparc64/timex.h1
-rw-r--r--include/asm-sparc64/tlb.h1
-rw-r--r--include/asm-sparc64/tlbflush.h1
-rw-r--r--include/asm-sparc64/topology.h1
-rw-r--r--include/asm-sparc64/tsb.h1
-rw-r--r--include/asm-sparc64/ttable.h1
-rw-r--r--include/asm-sparc64/types.h1
-rw-r--r--include/asm-sparc64/uaccess.h1
-rw-r--r--include/asm-sparc64/uctx.h1
-rw-r--r--include/asm-sparc64/unaligned.h1
-rw-r--r--include/asm-sparc64/unistd.h1
-rw-r--r--include/asm-sparc64/upa.h1
-rw-r--r--include/asm-sparc64/user.h1
-rw-r--r--include/asm-sparc64/utrap.h1
-rw-r--r--include/asm-sparc64/vga.h1
-rw-r--r--include/asm-sparc64/vio.h1
-rw-r--r--include/asm-sparc64/visasm.h1
-rw-r--r--include/asm-sparc64/watchdog.h1
-rw-r--r--include/asm-sparc64/xor.h1
-rw-r--r--net/dccp/dccp.h2
-rw-r--r--net/dccp/ipv4.c9
-rw-r--r--net/dccp/ipv6.c16
-rw-r--r--net/dccp/output.c53
-rw-r--r--net/dccp/timer.c20
-rw-r--r--net/ipv4/ipcomp.c4
-rw-r--r--net/ipv6/ipcomp6.c4
529 files changed, 1152 insertions, 652 deletions
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index 118ca6e9404f..f79ad9ff6031 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -528,7 +528,33 @@ See more details on the proper patch format in the following
528references. 528references.
529 529
530 530
53116) Sending "git pull" requests (from Linus emails)
531 532
533Please write the git repo address and branch name alone on the same line
534so that I can't even by mistake pull from the wrong branch, and so
535that a triple-click just selects the whole thing.
536
537So the proper format is something along the lines of:
538
539 "Please pull from
540
541 git://jdelvare.pck.nerim.net/jdelvare-2.6 i2c-for-linus
542
543 to get these changes:"
544
545so that I don't have to hunt-and-peck for the address and inevitably
546get it wrong (actually, I've only gotten it wrong a few times, and
547checking against the diffstat tells me when I get it wrong, but I'm
548just a lot more comfortable when I don't have to "look for" the right
549thing to pull, and double-check that I have the right branch-name).
550
551
552Please use "git diff -M --stat --summary" to generate the diffstat:
553the -M enables rename detection, and the summary enables a summary of
554new/deleted or renamed files.
555
556With rename detection, the statistics are rather different [...]
557because git will notice that a fair number of the changes are renames.
532 558
533----------------------------------- 559-----------------------------------
534SECTION 2 - HINTS, TIPS, AND TRICKS 560SECTION 2 - HINTS, TIPS, AND TRICKS
diff --git a/Documentation/i2c/upgrading-clients b/Documentation/i2c/upgrading-clients
new file mode 100644
index 000000000000..9a45f9bb6a25
--- /dev/null
+++ b/Documentation/i2c/upgrading-clients
@@ -0,0 +1,281 @@
1Upgrading I2C Drivers to the new 2.6 Driver Model
2=================================================
3
4Ben Dooks <ben-linux@fluff.org>
5
6Introduction
7------------
8
9This guide outlines how to alter existing Linux 2.6 client drivers from
10the old to the new new binding methods.
11
12
13Example old-style driver
14------------------------
15
16
17struct example_state {
18 struct i2c_client client;
19 ....
20};
21
22static struct i2c_driver example_driver;
23
24static unsigned short ignore[] = { I2C_CLIENT_END };
25static unsigned short normal_addr[] = { OUR_ADDR, I2C_CLIENT_END };
26
27I2C_CLIENT_INSMOD;
28
29static int example_attach(struct i2c_adapter *adap, int addr, int kind)
30{
31 struct example_state *state;
32 struct device *dev = &adap->dev; /* to use for dev_ reports */
33 int ret;
34
35 state = kzalloc(sizeof(struct example_state), GFP_KERNEL);
36 if (state == NULL) {
37 dev_err(dev, "failed to create our state\n");
38 return -ENOMEM;
39 }
40
41 example->client.addr = addr;
42 example->client.flags = 0;
43 example->client.adapter = adap;
44
45 i2c_set_clientdata(&state->i2c_client, state);
46 strlcpy(client->i2c_client.name, "example", I2C_NAME_SIZE);
47
48 ret = i2c_attach_client(&state->i2c_client);
49 if (ret < 0) {
50 dev_err(dev, "failed to attach client\n");
51 kfree(state);
52 return ret;
53 }
54
55 dev = &state->i2c_client.dev;
56
57 /* rest of the initialisation goes here. */
58
59 dev_info(dev, "example client created\n");
60
61 return 0;
62}
63
64static int __devexit example_detach(struct i2c_client *client)
65{
66 struct example_state *state = i2c_get_clientdata(client);
67
68 i2c_detach_client(client);
69 kfree(state);
70 return 0;
71}
72
73static int example_attach_adapter(struct i2c_adapter *adap)
74{
75 return i2c_probe(adap, &addr_data, example_attach);
76}
77
78static struct i2c_driver example_driver = {
79 .driver = {
80 .owner = THIS_MODULE,
81 .name = "example",
82 },
83 .attach_adapter = example_attach_adapter,
84 .detach_client = __devexit_p(example_detach),
85 .suspend = example_suspend,
86 .resume = example_resume,
87};
88
89
90Updating the client
91-------------------
92
93The new style binding model will check against a list of supported
94devices and their associated address supplied by the code registering
95the busses. This means that the driver .attach_adapter and
96.detach_adapter methods can be removed, along with the addr_data,
97as follows:
98
99- static struct i2c_driver example_driver;
100
101- static unsigned short ignore[] = { I2C_CLIENT_END };
102- static unsigned short normal_addr[] = { OUR_ADDR, I2C_CLIENT_END };
103
104- I2C_CLIENT_INSMOD;
105
106- static int example_attach_adapter(struct i2c_adapter *adap)
107- {
108- return i2c_probe(adap, &addr_data, example_attach);
109- }
110
111 static struct i2c_driver example_driver = {
112- .attach_adapter = example_attach_adapter,
113- .detach_client = __devexit_p(example_detach),
114 }
115
116Add the probe and remove methods to the i2c_driver, as so:
117
118 static struct i2c_driver example_driver = {
119+ .probe = example_probe,
120+ .remove = __devexit_p(example_remove),
121 }
122
123Change the example_attach method to accept the new parameters
124which include the i2c_client that it will be working with:
125
126- static int example_attach(struct i2c_adapter *adap, int addr, int kind)
127+ static int example_probe(struct i2c_client *client,
128+ const struct i2c_device_id *id)
129
130Change the name of example_attach to example_probe to align it with the
131i2c_driver entry names. The rest of the probe routine will now need to be
132changed as the i2c_client has already been setup for use.
133
134The necessary client fields have already been setup before
135the probe function is called, so the following client setup
136can be removed:
137
138- example->client.addr = addr;
139- example->client.flags = 0;
140- example->client.adapter = adap;
141-
142- strlcpy(client->i2c_client.name, "example", I2C_NAME_SIZE);
143
144The i2c_set_clientdata is now:
145
146- i2c_set_clientdata(&state->client, state);
147+ i2c_set_clientdata(client, state);
148
149The call to i2c_attach_client is no longer needed, if the probe
150routine exits successfully, then the driver will be automatically
151attached by the core. Change the probe routine as so:
152
153- ret = i2c_attach_client(&state->i2c_client);
154- if (ret < 0) {
155- dev_err(dev, "failed to attach client\n");
156- kfree(state);
157- return ret;
158- }
159
160
161Remove the storage of 'struct i2c_client' from the 'struct example_state'
162as we are provided with the i2c_client in our example_probe. Instead we
163store a pointer to it for when it is needed.
164
165struct example_state {
166- struct i2c_client client;
167+ struct i2c_client *client;
168
169the new i2c client as so:
170
171- struct device *dev = &adap->dev; /* to use for dev_ reports */
172+ struct device *dev = &i2c_client->dev; /* to use for dev_ reports */
173
174And remove the change after our client is attached, as the driver no
175longer needs to register a new client structure with the core:
176
177- dev = &state->i2c_client.dev;
178
179In the probe routine, ensure that the new state has the client stored
180in it:
181
182static int example_probe(struct i2c_client *i2c_client,
183 const struct i2c_device_id *id)
184{
185 struct example_state *state;
186 struct device *dev = &i2c_client->dev;
187 int ret;
188
189 state = kzalloc(sizeof(struct example_state), GFP_KERNEL);
190 if (state == NULL) {
191 dev_err(dev, "failed to create our state\n");
192 return -ENOMEM;
193 }
194
195+ state->client = i2c_client;
196
197Update the detach method, by changing the name to _remove and
198to delete the i2c_detach_client call. It is possible that you
199can also remove the ret variable as it is not not needed for
200any of the core functions.
201
202- static int __devexit example_detach(struct i2c_client *client)
203+ static int __devexit example_remove(struct i2c_client *client)
204{
205 struct example_state *state = i2c_get_clientdata(client);
206
207- i2c_detach_client(client);
208
209And finally ensure that we have the correct ID table for the i2c-core
210and other utilities:
211
212+ struct i2c_device_id example_idtable[] = {
213+ { "example", 0 },
214+ { }
215+};
216+
217+MODULE_DEVICE_TABLE(i2c, example_idtable);
218
219static struct i2c_driver example_driver = {
220 .driver = {
221 .owner = THIS_MODULE,
222 .name = "example",
223 },
224+ .id_table = example_ids,
225
226
227Our driver should now look like this:
228
229struct example_state {
230 struct i2c_client *client;
231 ....
232};
233
234static int example_probe(struct i2c_client *client,
235 const struct i2c_device_id *id)
236{
237 struct example_state *state;
238 struct device *dev = &client->dev;
239
240 state = kzalloc(sizeof(struct example_state), GFP_KERNEL);
241 if (state == NULL) {
242 dev_err(dev, "failed to create our state\n");
243 return -ENOMEM;
244 }
245
246 state->client = client;
247 i2c_set_clientdata(client, state);
248
249 /* rest of the initialisation goes here. */
250
251 dev_info(dev, "example client created\n");
252
253 return 0;
254}
255
256static int __devexit example_remove(struct i2c_client *client)
257{
258 struct example_state *state = i2c_get_clientdata(client);
259
260 kfree(state);
261 return 0;
262}
263
264static struct i2c_device_id example_idtable[] = {
265 { "example", 0 },
266 { }
267};
268
269MODULE_DEVICE_TABLE(i2c, example_idtable);
270
271static struct i2c_driver example_driver = {
272 .driver = {
273 .owner = THIS_MODULE,
274 .name = "example",
275 },
276 .id_table = example_idtable,
277 .probe = example_probe,
278 .remove = __devexit_p(example_remove),
279 .suspend = example_suspend,
280 .resume = example_resume,
281};
diff --git a/Makefile b/Makefile
index 40f24810116c..baee3d414754 100644
--- a/Makefile
+++ b/Makefile
@@ -206,7 +206,11 @@ ifeq ($(ARCH),x86_64)
206endif 206endif
207 207
208# Where to locate arch specific headers 208# Where to locate arch specific headers
209hdr-arch := $(SRCARCH) 209ifeq ($(ARCH),sparc64)
210 hdr-arch := sparc
211else
212 hdr-arch := $(SRCARCH)
213endif
210 214
211KCONFIG_CONFIG ?= .config 215KCONFIG_CONFIG ?= .config
212 216
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index 375de7c6d082..a214002114ed 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -68,6 +68,7 @@ config SPARC
68 select HAVE_IDE 68 select HAVE_IDE
69 select HAVE_OPROFILE 69 select HAVE_OPROFILE
70 select HAVE_ARCH_KGDB if !SMP 70 select HAVE_ARCH_KGDB if !SMP
71 select HAVE_ARCH_TRACEHOOK
71 72
72# Identify this as a Sparc32 build 73# Identify this as a Sparc32 build
73config SPARC32 74config SPARC32
diff --git a/arch/sparc/include/asm/Kbuild b/arch/sparc/include/asm/Kbuild
new file mode 100644
index 000000000000..a5f0ce734ff7
--- /dev/null
+++ b/arch/sparc/include/asm/Kbuild
@@ -0,0 +1,45 @@
1# User exported sparc header files
2include include/asm-generic/Kbuild.asm
3
4header-y += ipcbuf_32.h
5header-y += ipcbuf_64.h
6header-y += posix_types_32.h
7header-y += posix_types_64.h
8header-y += ptrace_32.h
9header-y += ptrace_64.h
10header-y += sigcontext_32.h
11header-y += sigcontext_64.h
12header-y += siginfo_32.h
13header-y += siginfo_64.h
14header-y += signal_32.h
15header-y += signal_64.h
16header-y += stat_32.h
17header-y += stat_64.h
18header-y += statfs_32.h
19header-y += statfs_64.h
20header-y += unistd_32.h
21header-y += unistd_64.h
22
23header-y += apc.h
24header-y += asi.h
25header-y += bpp.h
26header-y += display7seg.h
27header-y += envctrl.h
28header-y += fbio.h
29header-y += jsflash.h
30header-y += openprom.h
31header-y += openprom_32.h
32header-y += openprom_64.h
33header-y += openpromio.h
34header-y += perfctr.h
35header-y += psrcompat.h
36header-y += psr.h
37header-y += pstate.h
38header-y += reg.h
39header-y += reg_32.h
40header-y += reg_64.h
41header-y += traps.h
42header-y += uctx.h
43header-y += utrap.h
44header-y += vfc_ioctls.h
45header-y += watchdog.h
diff --git a/include/asm-sparc/agp.h b/arch/sparc/include/asm/agp.h
index c2456870b05c..c2456870b05c 100644
--- a/include/asm-sparc/agp.h
+++ b/arch/sparc/include/asm/agp.h
diff --git a/include/asm-sparc/apb.h b/arch/sparc/include/asm/apb.h
index 8f3b57db810f..8f3b57db810f 100644
--- a/include/asm-sparc/apb.h
+++ b/arch/sparc/include/asm/apb.h
diff --git a/include/asm-sparc/apc.h b/arch/sparc/include/asm/apc.h
index 24e9a7d4d97e..24e9a7d4d97e 100644
--- a/include/asm-sparc/apc.h
+++ b/arch/sparc/include/asm/apc.h
diff --git a/include/asm-sparc/asi.h b/arch/sparc/include/asm/asi.h
index 74703c5ef985..74703c5ef985 100644
--- a/include/asm-sparc/asi.h
+++ b/arch/sparc/include/asm/asi.h
diff --git a/include/asm-sparc/asmmacro.h b/arch/sparc/include/asm/asmmacro.h
index a619a4d97aae..a619a4d97aae 100644
--- a/include/asm-sparc/asmmacro.h
+++ b/arch/sparc/include/asm/asmmacro.h
diff --git a/include/asm-sparc/atomic.h b/arch/sparc/include/asm/atomic.h
index 66d8166ec1d7..8ff83d8cc33f 100644
--- a/include/asm-sparc/atomic.h
+++ b/arch/sparc/include/asm/atomic.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_ATOMIC_H 1#ifndef ___ASM_SPARC_ATOMIC_H
2#define ___ASM_SPARC_ATOMIC_H 2#define ___ASM_SPARC_ATOMIC_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/atomic_64.h> 4#include <asm/atomic_64.h>
5#else 5#else
6#include <asm-sparc/atomic_32.h> 6#include <asm/atomic_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/atomic_32.h b/arch/sparc/include/asm/atomic_32.h
index 5c944b5a8040..5c944b5a8040 100644
--- a/include/asm-sparc/atomic_32.h
+++ b/arch/sparc/include/asm/atomic_32.h
diff --git a/include/asm-sparc/atomic_64.h b/arch/sparc/include/asm/atomic_64.h
index 2c71ec4a3b18..2c71ec4a3b18 100644
--- a/include/asm-sparc/atomic_64.h
+++ b/arch/sparc/include/asm/atomic_64.h
diff --git a/include/asm-sparc/auxio.h b/arch/sparc/include/asm/auxio.h
index 24c6f3c0f577..13dc67f03011 100644
--- a/include/asm-sparc/auxio.h
+++ b/arch/sparc/include/asm/auxio.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_AUXIO_H 1#ifndef ___ASM_SPARC_AUXIO_H
2#define ___ASM_SPARC_AUXIO_H 2#define ___ASM_SPARC_AUXIO_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/auxio_64.h> 4#include <asm/auxio_64.h>
5#else 5#else
6#include <asm-sparc/auxio_32.h> 6#include <asm/auxio_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/auxio_32.h b/arch/sparc/include/asm/auxio_32.h
index 4db8f23db20f..e03e088be95f 100644
--- a/include/asm-sparc/auxio_32.h
+++ b/arch/sparc/include/asm/auxio_32.h
@@ -36,7 +36,7 @@
36 * understand the hardware you are querying! 36 * understand the hardware you are querying!
37 */ 37 */
38extern void set_auxio(unsigned char bits_on, unsigned char bits_off); 38extern void set_auxio(unsigned char bits_on, unsigned char bits_off);
39extern unsigned char get_auxio(void); /* .../asm-sparc/floppy.h */ 39extern unsigned char get_auxio(void); /* .../asm/floppy.h */
40 40
41/* 41/*
42 * The following routines are provided for driver-compatibility 42 * The following routines are provided for driver-compatibility
diff --git a/include/asm-sparc/auxio_64.h b/arch/sparc/include/asm/auxio_64.h
index f61cd1e3e395..f61cd1e3e395 100644
--- a/include/asm-sparc/auxio_64.h
+++ b/arch/sparc/include/asm/auxio_64.h
diff --git a/include/asm-sparc/auxvec.h b/arch/sparc/include/asm/auxvec.h
index ad6f360261f6..ad6f360261f6 100644
--- a/include/asm-sparc/auxvec.h
+++ b/arch/sparc/include/asm/auxvec.h
diff --git a/include/asm-sparc/backoff.h b/arch/sparc/include/asm/backoff.h
index fa1fdf67e350..fa1fdf67e350 100644
--- a/include/asm-sparc/backoff.h
+++ b/arch/sparc/include/asm/backoff.h
diff --git a/include/asm-sparc/bbc.h b/arch/sparc/include/asm/bbc.h
index 423a85800aae..423a85800aae 100644
--- a/include/asm-sparc/bbc.h
+++ b/arch/sparc/include/asm/bbc.h
diff --git a/include/asm-sparc/bitext.h b/arch/sparc/include/asm/bitext.h
index 297b2f2fcb49..297b2f2fcb49 100644
--- a/include/asm-sparc/bitext.h
+++ b/arch/sparc/include/asm/bitext.h
diff --git a/include/asm-sparc/bitops.h b/arch/sparc/include/asm/bitops.h
index 1a2949d0193f..b1edd94bd64f 100644
--- a/include/asm-sparc/bitops.h
+++ b/arch/sparc/include/asm/bitops.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_BITOPS_H 1#ifndef ___ASM_SPARC_BITOPS_H
2#define ___ASM_SPARC_BITOPS_H 2#define ___ASM_SPARC_BITOPS_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/bitops_64.h> 4#include <asm/bitops_64.h>
5#else 5#else
6#include <asm-sparc/bitops_32.h> 6#include <asm/bitops_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/bitops_32.h b/arch/sparc/include/asm/bitops_32.h
index 68b98a7e6454..68b98a7e6454 100644
--- a/include/asm-sparc/bitops_32.h
+++ b/arch/sparc/include/asm/bitops_32.h
diff --git a/include/asm-sparc/bitops_64.h b/arch/sparc/include/asm/bitops_64.h
index bb87b8080220..bb87b8080220 100644
--- a/include/asm-sparc/bitops_64.h
+++ b/arch/sparc/include/asm/bitops_64.h
diff --git a/include/asm-sparc/bpp.h b/arch/sparc/include/asm/bpp.h
index 31f515e499a7..31f515e499a7 100644
--- a/include/asm-sparc/bpp.h
+++ b/arch/sparc/include/asm/bpp.h
diff --git a/include/asm-sparc/btfixup.h b/arch/sparc/include/asm/btfixup.h
index 08277e6fb4cd..797722cf69f2 100644
--- a/include/asm-sparc/btfixup.h
+++ b/arch/sparc/include/asm/btfixup.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * asm-sparc/btfixup.h: Macros for boot time linking. 2 * asm/btfixup.h: Macros for boot time linking.
3 * 3 *
4 * Copyright (C) 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 4 * Copyright (C) 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
5 */ 5 */
diff --git a/include/asm-sparc/bug.h b/arch/sparc/include/asm/bug.h
index 8a59e5a8c217..8a59e5a8c217 100644
--- a/include/asm-sparc/bug.h
+++ b/arch/sparc/include/asm/bug.h
diff --git a/include/asm-sparc/bugs.h b/arch/sparc/include/asm/bugs.h
index 2dfc07bc8e54..e179bc12f64a 100644
--- a/include/asm-sparc/bugs.h
+++ b/arch/sparc/include/asm/bugs.h
@@ -1,4 +1,4 @@
1/* include/asm-sparc/bugs.h: Sparc probes for various bugs. 1/* include/asm/bugs.h: Sparc probes for various bugs.
2 * 2 *
3 * Copyright (C) 1996, 2007 David S. Miller (davem@davemloft.net) 3 * Copyright (C) 1996, 2007 David S. Miller (davem@davemloft.net)
4 */ 4 */
diff --git a/include/asm-sparc/byteorder.h b/arch/sparc/include/asm/byteorder.h
index bcd83aa351c5..bcd83aa351c5 100644
--- a/include/asm-sparc/byteorder.h
+++ b/arch/sparc/include/asm/byteorder.h
diff --git a/include/asm-sparc/cache.h b/arch/sparc/include/asm/cache.h
index 41f85ae4bd4a..41f85ae4bd4a 100644
--- a/include/asm-sparc/cache.h
+++ b/arch/sparc/include/asm/cache.h
diff --git a/include/asm-sparc/cacheflush.h b/arch/sparc/include/asm/cacheflush.h
index 2b6a37957c2d..049168087b19 100644
--- a/include/asm-sparc/cacheflush.h
+++ b/arch/sparc/include/asm/cacheflush.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_CACHEFLUSH_H 1#ifndef ___ASM_SPARC_CACHEFLUSH_H
2#define ___ASM_SPARC_CACHEFLUSH_H 2#define ___ASM_SPARC_CACHEFLUSH_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/cacheflush_64.h> 4#include <asm/cacheflush_64.h>
5#else 5#else
6#include <asm-sparc/cacheflush_32.h> 6#include <asm/cacheflush_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/cacheflush_32.h b/arch/sparc/include/asm/cacheflush_32.h
index 68ac10910271..68ac10910271 100644
--- a/include/asm-sparc/cacheflush_32.h
+++ b/arch/sparc/include/asm/cacheflush_32.h
diff --git a/include/asm-sparc/cacheflush_64.h b/arch/sparc/include/asm/cacheflush_64.h
index c43321729b3b..c43321729b3b 100644
--- a/include/asm-sparc/cacheflush_64.h
+++ b/arch/sparc/include/asm/cacheflush_64.h
diff --git a/include/asm-sparc/chafsr.h b/arch/sparc/include/asm/chafsr.h
index 85c69b38220b..85c69b38220b 100644
--- a/include/asm-sparc/chafsr.h
+++ b/arch/sparc/include/asm/chafsr.h
diff --git a/include/asm-sparc/checksum.h b/arch/sparc/include/asm/checksum.h
index 4e3553d4f6e1..7ac0d7497bc5 100644
--- a/include/asm-sparc/checksum.h
+++ b/arch/sparc/include/asm/checksum.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_CHECKSUM_H 1#ifndef ___ASM_SPARC_CHECKSUM_H
2#define ___ASM_SPARC_CHECKSUM_H 2#define ___ASM_SPARC_CHECKSUM_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/checksum_64.h> 4#include <asm/checksum_64.h>
5#else 5#else
6#include <asm-sparc/checksum_32.h> 6#include <asm/checksum_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/checksum_32.h b/arch/sparc/include/asm/checksum_32.h
index bdbda1453aa9..bdbda1453aa9 100644
--- a/include/asm-sparc/checksum_32.h
+++ b/arch/sparc/include/asm/checksum_32.h
diff --git a/include/asm-sparc/checksum_64.h b/arch/sparc/include/asm/checksum_64.h
index 019b9615e43c..019b9615e43c 100644
--- a/include/asm-sparc/checksum_64.h
+++ b/arch/sparc/include/asm/checksum_64.h
diff --git a/include/asm-sparc/chmctrl.h b/arch/sparc/include/asm/chmctrl.h
index 859b4a4b0d30..859b4a4b0d30 100644
--- a/include/asm-sparc/chmctrl.h
+++ b/arch/sparc/include/asm/chmctrl.h
diff --git a/include/asm-sparc/clock.h b/arch/sparc/include/asm/clock.h
index 2cf99dadec56..2cf99dadec56 100644
--- a/include/asm-sparc/clock.h
+++ b/arch/sparc/include/asm/clock.h
diff --git a/include/asm-sparc/cmt.h b/arch/sparc/include/asm/cmt.h
index 870db5928577..870db5928577 100644
--- a/include/asm-sparc/cmt.h
+++ b/arch/sparc/include/asm/cmt.h
diff --git a/include/asm-sparc/compat.h b/arch/sparc/include/asm/compat.h
index f260b58f5ce9..f260b58f5ce9 100644
--- a/include/asm-sparc/compat.h
+++ b/arch/sparc/include/asm/compat.h
diff --git a/include/asm-sparc/compat_signal.h b/arch/sparc/include/asm/compat_signal.h
index b759eab9b51c..b759eab9b51c 100644
--- a/include/asm-sparc/compat_signal.h
+++ b/arch/sparc/include/asm/compat_signal.h
diff --git a/include/asm-sparc/contregs.h b/arch/sparc/include/asm/contregs.h
index 48fa8a4ef357..48fa8a4ef357 100644
--- a/include/asm-sparc/contregs.h
+++ b/arch/sparc/include/asm/contregs.h
diff --git a/include/asm-sparc/cpudata.h b/arch/sparc/include/asm/cpudata.h
index b76fac0c8d8f..b5976de7cacd 100644
--- a/include/asm-sparc/cpudata.h
+++ b/arch/sparc/include/asm/cpudata.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_CPUDATA_H 1#ifndef ___ASM_SPARC_CPUDATA_H
2#define ___ASM_SPARC_CPUDATA_H 2#define ___ASM_SPARC_CPUDATA_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/cpudata_64.h> 4#include <asm/cpudata_64.h>
5#else 5#else
6#include <asm-sparc/cpudata_32.h> 6#include <asm/cpudata_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/cpudata_32.h b/arch/sparc/include/asm/cpudata_32.h
index a2c4d51d36c4..31d48a0e32c7 100644
--- a/include/asm-sparc/cpudata_32.h
+++ b/arch/sparc/include/asm/cpudata_32.h
@@ -2,7 +2,7 @@
2 * 2 *
3 * Copyright (C) 2004 Keith M Wesolowski (wesolows@foobazco.org) 3 * Copyright (C) 2004 Keith M Wesolowski (wesolows@foobazco.org)
4 * 4 *
5 * Based on include/asm-sparc64/cpudata.h and Linux 2.4 smp.h 5 * Based on include/asm/cpudata.h and Linux 2.4 smp.h
6 * both (C) David S. Miller. 6 * both (C) David S. Miller.
7 */ 7 */
8 8
diff --git a/include/asm-sparc/cpudata_64.h b/arch/sparc/include/asm/cpudata_64.h
index 532975ecfe10..532975ecfe10 100644
--- a/include/asm-sparc/cpudata_64.h
+++ b/arch/sparc/include/asm/cpudata_64.h
diff --git a/include/asm-sparc/cputime.h b/arch/sparc/include/asm/cputime.h
index 1a642b81e019..1a642b81e019 100644
--- a/include/asm-sparc/cputime.h
+++ b/arch/sparc/include/asm/cputime.h
diff --git a/include/asm-sparc/current.h b/arch/sparc/include/asm/current.h
index 8a1d9d6643b0..10a0df55a574 100644
--- a/include/asm-sparc/current.h
+++ b/arch/sparc/include/asm/current.h
@@ -1,4 +1,4 @@
1/* include/asm-sparc/current.h 1/* include/asm/current.h
2 * 2 *
3 * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation 3 * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
4 * Copyright (C) 2002 Pete Zaitcev (zaitcev@yahoo.com) 4 * Copyright (C) 2002 Pete Zaitcev (zaitcev@yahoo.com)
diff --git a/include/asm-sparc/cypress.h b/arch/sparc/include/asm/cypress.h
index 95e9772ea394..95e9772ea394 100644
--- a/include/asm-sparc/cypress.h
+++ b/arch/sparc/include/asm/cypress.h
diff --git a/include/asm-sparc/dcr.h b/arch/sparc/include/asm/dcr.h
index 620c9ba642e9..620c9ba642e9 100644
--- a/include/asm-sparc/dcr.h
+++ b/arch/sparc/include/asm/dcr.h
diff --git a/include/asm-sparc/dcu.h b/arch/sparc/include/asm/dcu.h
index 0f704e106a1b..0f704e106a1b 100644
--- a/include/asm-sparc/dcu.h
+++ b/arch/sparc/include/asm/dcu.h
diff --git a/include/asm-sparc/delay.h b/arch/sparc/include/asm/delay.h
index 6210a3ce9751..467caa2a97a0 100644
--- a/include/asm-sparc/delay.h
+++ b/arch/sparc/include/asm/delay.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_DELAY_H 1#ifndef ___ASM_SPARC_DELAY_H
2#define ___ASM_SPARC_DELAY_H 2#define ___ASM_SPARC_DELAY_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/delay_64.h> 4#include <asm/delay_64.h>
5#else 5#else
6#include <asm-sparc/delay_32.h> 6#include <asm/delay_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/delay_32.h b/arch/sparc/include/asm/delay_32.h
index bc9aba2bead6..bc9aba2bead6 100644
--- a/include/asm-sparc/delay_32.h
+++ b/arch/sparc/include/asm/delay_32.h
diff --git a/include/asm-sparc/delay_64.h b/arch/sparc/include/asm/delay_64.h
index a77aa622d762..a77aa622d762 100644
--- a/include/asm-sparc/delay_64.h
+++ b/arch/sparc/include/asm/delay_64.h
diff --git a/include/asm-sparc/device.h b/arch/sparc/include/asm/device.h
index 19790eb99cc6..19790eb99cc6 100644
--- a/include/asm-sparc/device.h
+++ b/arch/sparc/include/asm/device.h
diff --git a/include/asm-sparc/display7seg.h b/arch/sparc/include/asm/display7seg.h
index 86d4a901df24..86d4a901df24 100644
--- a/include/asm-sparc/display7seg.h
+++ b/arch/sparc/include/asm/display7seg.h
diff --git a/include/asm-sparc/div64.h b/arch/sparc/include/asm/div64.h
index 6cd978cefb28..6cd978cefb28 100644
--- a/include/asm-sparc/div64.h
+++ b/arch/sparc/include/asm/div64.h
diff --git a/include/asm-sparc/dma-mapping.h b/arch/sparc/include/asm/dma-mapping.h
index 7483504259ce..0f4150e26619 100644
--- a/include/asm-sparc/dma-mapping.h
+++ b/arch/sparc/include/asm/dma-mapping.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_DMA_MAPPING_H 1#ifndef ___ASM_SPARC_DMA_MAPPING_H
2#define ___ASM_SPARC_DMA_MAPPING_H 2#define ___ASM_SPARC_DMA_MAPPING_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/dma-mapping_64.h> 4#include <asm/dma-mapping_64.h>
5#else 5#else
6#include <asm-sparc/dma-mapping_32.h> 6#include <asm/dma-mapping_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/dma-mapping_32.h b/arch/sparc/include/asm/dma-mapping_32.h
index f3a641e6b2c8..f3a641e6b2c8 100644
--- a/include/asm-sparc/dma-mapping_32.h
+++ b/arch/sparc/include/asm/dma-mapping_32.h
diff --git a/include/asm-sparc/dma-mapping_64.h b/arch/sparc/include/asm/dma-mapping_64.h
index bfa64f9702d5..bfa64f9702d5 100644
--- a/include/asm-sparc/dma-mapping_64.h
+++ b/arch/sparc/include/asm/dma-mapping_64.h
diff --git a/include/asm-sparc/dma.h b/arch/sparc/include/asm/dma.h
index 8cc69bfaae2a..aa1d90ac04c5 100644
--- a/include/asm-sparc/dma.h
+++ b/arch/sparc/include/asm/dma.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_DMA_H 1#ifndef ___ASM_SPARC_DMA_H
2#define ___ASM_SPARC_DMA_H 2#define ___ASM_SPARC_DMA_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/dma_64.h> 4#include <asm/dma_64.h>
5#else 5#else
6#include <asm-sparc/dma_32.h> 6#include <asm/dma_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/dma_32.h b/arch/sparc/include/asm/dma_32.h
index 959d6c8a71ae..cf7189c0079b 100644
--- a/include/asm-sparc/dma_32.h
+++ b/arch/sparc/include/asm/dma_32.h
@@ -1,4 +1,4 @@
1/* include/asm-sparc/dma.h 1/* include/asm/dma.h
2 * 2 *
3 * Copyright 1995 (C) David S. Miller (davem@davemloft.net) 3 * Copyright 1995 (C) David S. Miller (davem@davemloft.net)
4 */ 4 */
diff --git a/include/asm-sparc/dma_64.h b/arch/sparc/include/asm/dma_64.h
index 9d4c024bd3b3..46a8aecffc02 100644
--- a/include/asm-sparc/dma_64.h
+++ b/arch/sparc/include/asm/dma_64.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * include/asm-sparc64/dma.h 2 * include/asm/dma.h
3 * 3 *
4 * Copyright 1996 (C) David S. Miller (davem@caip.rutgers.edu) 4 * Copyright 1996 (C) David S. Miller (davem@caip.rutgers.edu)
5 */ 5 */
diff --git a/include/asm-sparc/ebus.h b/arch/sparc/include/asm/ebus.h
index a5da2d00cd18..83a6d16c22e6 100644
--- a/include/asm-sparc/ebus.h
+++ b/arch/sparc/include/asm/ebus.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_EBUS_H 1#ifndef ___ASM_SPARC_EBUS_H
2#define ___ASM_SPARC_EBUS_H 2#define ___ASM_SPARC_EBUS_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/ebus_64.h> 4#include <asm/ebus_64.h>
5#else 5#else
6#include <asm-sparc/ebus_32.h> 6#include <asm/ebus_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/ebus_32.h b/arch/sparc/include/asm/ebus_32.h
index 29cb7dfc6b79..29cb7dfc6b79 100644
--- a/include/asm-sparc/ebus_32.h
+++ b/arch/sparc/include/asm/ebus_32.h
diff --git a/include/asm-sparc/ebus_64.h b/arch/sparc/include/asm/ebus_64.h
index fcc62b97ced5..fcc62b97ced5 100644
--- a/include/asm-sparc/ebus_64.h
+++ b/arch/sparc/include/asm/ebus_64.h
diff --git a/include/asm-sparc/ecc.h b/arch/sparc/include/asm/ecc.h
index ccb84b66fef1..ccb84b66fef1 100644
--- a/include/asm-sparc/ecc.h
+++ b/arch/sparc/include/asm/ecc.h
diff --git a/include/asm-sparc/eeprom.h b/arch/sparc/include/asm/eeprom.h
index e17beeceb405..e17beeceb405 100644
--- a/include/asm-sparc/eeprom.h
+++ b/arch/sparc/include/asm/eeprom.h
diff --git a/include/asm-sparc/elf.h b/arch/sparc/include/asm/elf.h
index f035c45d7b5e..0a2816c50b07 100644
--- a/include/asm-sparc/elf.h
+++ b/arch/sparc/include/asm/elf.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_ELF_H 1#ifndef ___ASM_SPARC_ELF_H
2#define ___ASM_SPARC_ELF_H 2#define ___ASM_SPARC_ELF_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/elf_64.h> 4#include <asm/elf_64.h>
5#else 5#else
6#include <asm-sparc/elf_32.h> 6#include <asm/elf_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/elf_32.h b/arch/sparc/include/asm/elf_32.h
index d043f80bc2fd..d043f80bc2fd 100644
--- a/include/asm-sparc/elf_32.h
+++ b/arch/sparc/include/asm/elf_32.h
diff --git a/include/asm-sparc/elf_64.h b/arch/sparc/include/asm/elf_64.h
index 0818a1308f4e..0818a1308f4e 100644
--- a/include/asm-sparc/elf_64.h
+++ b/arch/sparc/include/asm/elf_64.h
diff --git a/include/asm-sparc/emergency-restart.h b/arch/sparc/include/asm/emergency-restart.h
index 108d8c48e42e..108d8c48e42e 100644
--- a/include/asm-sparc/emergency-restart.h
+++ b/arch/sparc/include/asm/emergency-restart.h
diff --git a/include/asm-sparc/envctrl.h b/arch/sparc/include/asm/envctrl.h
index 624fa7e2da8e..624fa7e2da8e 100644
--- a/include/asm-sparc/envctrl.h
+++ b/arch/sparc/include/asm/envctrl.h
diff --git a/include/asm-sparc/errno.h b/arch/sparc/include/asm/errno.h
index a9ef172977de..a9ef172977de 100644
--- a/include/asm-sparc/errno.h
+++ b/arch/sparc/include/asm/errno.h
diff --git a/include/asm-sparc/estate.h b/arch/sparc/include/asm/estate.h
index 520c08560d1b..520c08560d1b 100644
--- a/include/asm-sparc/estate.h
+++ b/arch/sparc/include/asm/estate.h
diff --git a/include/asm-sparc/fb.h b/arch/sparc/include/asm/fb.h
index b83e44729655..b83e44729655 100644
--- a/include/asm-sparc/fb.h
+++ b/arch/sparc/include/asm/fb.h
diff --git a/include/asm-sparc/fbio.h b/arch/sparc/include/asm/fbio.h
index b9215a0907d3..b9215a0907d3 100644
--- a/include/asm-sparc/fbio.h
+++ b/arch/sparc/include/asm/fbio.h
diff --git a/include/asm-sparc/fcntl.h b/arch/sparc/include/asm/fcntl.h
index d4d9c9d852c3..d4d9c9d852c3 100644
--- a/include/asm-sparc/fcntl.h
+++ b/arch/sparc/include/asm/fcntl.h
diff --git a/include/asm-sparc/fhc.h b/arch/sparc/include/asm/fhc.h
index 788cbc46a116..788cbc46a116 100644
--- a/include/asm-sparc/fhc.h
+++ b/arch/sparc/include/asm/fhc.h
diff --git a/include/asm-sparc/fixmap.h b/arch/sparc/include/asm/fixmap.h
index f18fc0755adf..f18fc0755adf 100644
--- a/include/asm-sparc/fixmap.h
+++ b/arch/sparc/include/asm/fixmap.h
diff --git a/include/asm-sparc/floppy.h b/arch/sparc/include/asm/floppy.h
index 6c628ba15a8d..faebd335b600 100644
--- a/include/asm-sparc/floppy.h
+++ b/arch/sparc/include/asm/floppy.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_FLOPPY_H 1#ifndef ___ASM_SPARC_FLOPPY_H
2#define ___ASM_SPARC_FLOPPY_H 2#define ___ASM_SPARC_FLOPPY_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/floppy_64.h> 4#include <asm/floppy_64.h>
5#else 5#else
6#include <asm-sparc/floppy_32.h> 6#include <asm/floppy_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/floppy_32.h b/arch/sparc/include/asm/floppy_32.h
index acdd06eafe59..ae3f00bf22ff 100644
--- a/include/asm-sparc/floppy_32.h
+++ b/arch/sparc/include/asm/floppy_32.h
@@ -1,4 +1,4 @@
1/* asm-sparc/floppy.h: Sparc specific parts of the Floppy driver. 1/* asm/floppy.h: Sparc specific parts of the Floppy driver.
2 * 2 *
3 * Copyright (C) 1995 David S. Miller (davem@davemloft.net) 3 * Copyright (C) 1995 David S. Miller (davem@davemloft.net)
4 */ 4 */
diff --git a/include/asm-sparc/floppy_64.h b/arch/sparc/include/asm/floppy_64.h
index c39db1060bc7..c39db1060bc7 100644
--- a/include/asm-sparc/floppy_64.h
+++ b/arch/sparc/include/asm/floppy_64.h
diff --git a/include/asm-sparc/fpumacro.h b/arch/sparc/include/asm/fpumacro.h
index cc463fec806f..cc463fec806f 100644
--- a/include/asm-sparc/fpumacro.h
+++ b/arch/sparc/include/asm/fpumacro.h
diff --git a/include/asm-sparc64/ftrace.h b/arch/sparc/include/asm/ftrace.h
index d27716cd38c1..d27716cd38c1 100644
--- a/include/asm-sparc64/ftrace.h
+++ b/arch/sparc/include/asm/ftrace.h
diff --git a/include/asm-sparc/futex.h b/arch/sparc/include/asm/futex.h
index c6a9f038c531..736335f36713 100644
--- a/include/asm-sparc/futex.h
+++ b/arch/sparc/include/asm/futex.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_FUTEX_H 1#ifndef ___ASM_SPARC_FUTEX_H
2#define ___ASM_SPARC_FUTEX_H 2#define ___ASM_SPARC_FUTEX_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/futex_64.h> 4#include <asm/futex_64.h>
5#else 5#else
6#include <asm-sparc/futex_32.h> 6#include <asm/futex_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/futex_32.h b/arch/sparc/include/asm/futex_32.h
index 6a332a9f099c..6a332a9f099c 100644
--- a/include/asm-sparc/futex_32.h
+++ b/arch/sparc/include/asm/futex_32.h
diff --git a/include/asm-sparc/futex_64.h b/arch/sparc/include/asm/futex_64.h
index d8378935ae90..d8378935ae90 100644
--- a/include/asm-sparc/futex_64.h
+++ b/arch/sparc/include/asm/futex_64.h
diff --git a/include/asm-sparc/hardirq.h b/arch/sparc/include/asm/hardirq.h
index 156478773100..44d4e2345148 100644
--- a/include/asm-sparc/hardirq.h
+++ b/arch/sparc/include/asm/hardirq.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_HARDIRQ_H 1#ifndef ___ASM_SPARC_HARDIRQ_H
2#define ___ASM_SPARC_HARDIRQ_H 2#define ___ASM_SPARC_HARDIRQ_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/hardirq_64.h> 4#include <asm/hardirq_64.h>
5#else 5#else
6#include <asm-sparc/hardirq_32.h> 6#include <asm/hardirq_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/hardirq_32.h b/arch/sparc/include/asm/hardirq_32.h
index 4f63ed8df551..4f63ed8df551 100644
--- a/include/asm-sparc/hardirq_32.h
+++ b/arch/sparc/include/asm/hardirq_32.h
diff --git a/include/asm-sparc/hardirq_64.h b/arch/sparc/include/asm/hardirq_64.h
index 7c29fd1a87aa..7c29fd1a87aa 100644
--- a/include/asm-sparc/hardirq_64.h
+++ b/arch/sparc/include/asm/hardirq_64.h
diff --git a/include/asm-sparc/head.h b/arch/sparc/include/asm/head.h
index 14652abdea31..be8f03f3e731 100644
--- a/include/asm-sparc/head.h
+++ b/arch/sparc/include/asm/head.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_HEAD_H 1#ifndef ___ASM_SPARC_HEAD_H
2#define ___ASM_SPARC_HEAD_H 2#define ___ASM_SPARC_HEAD_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/head_64.h> 4#include <asm/head_64.h>
5#else 5#else
6#include <asm-sparc/head_32.h> 6#include <asm/head_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/head_32.h b/arch/sparc/include/asm/head_32.h
index 7c35491a8b53..7c35491a8b53 100644
--- a/include/asm-sparc/head_32.h
+++ b/arch/sparc/include/asm/head_32.h
diff --git a/include/asm-sparc/head_64.h b/arch/sparc/include/asm/head_64.h
index 10e9dabc4c41..10e9dabc4c41 100644
--- a/include/asm-sparc/head_64.h
+++ b/arch/sparc/include/asm/head_64.h
diff --git a/include/asm-sparc/highmem.h b/arch/sparc/include/asm/highmem.h
index 3de42e776274..3de42e776274 100644
--- a/include/asm-sparc/highmem.h
+++ b/arch/sparc/include/asm/highmem.h
diff --git a/include/asm-sparc/hugetlb.h b/arch/sparc/include/asm/hugetlb.h
index 177061064ee6..177061064ee6 100644
--- a/include/asm-sparc/hugetlb.h
+++ b/arch/sparc/include/asm/hugetlb.h
diff --git a/include/asm-sparc/hvtramp.h b/arch/sparc/include/asm/hvtramp.h
index b2b9b947b3a4..b2b9b947b3a4 100644
--- a/include/asm-sparc/hvtramp.h
+++ b/arch/sparc/include/asm/hvtramp.h
diff --git a/include/asm-sparc/hw_irq.h b/arch/sparc/include/asm/hw_irq.h
index 8d30a7694be2..8d30a7694be2 100644
--- a/include/asm-sparc/hw_irq.h
+++ b/arch/sparc/include/asm/hw_irq.h
diff --git a/include/asm-sparc/hypervisor.h b/arch/sparc/include/asm/hypervisor.h
index 109ae24ba242..109ae24ba242 100644
--- a/include/asm-sparc/hypervisor.h
+++ b/arch/sparc/include/asm/hypervisor.h
diff --git a/include/asm-sparc/ide.h b/arch/sparc/include/asm/ide.h
index b7af3d658239..b7af3d658239 100644
--- a/include/asm-sparc/ide.h
+++ b/arch/sparc/include/asm/ide.h
diff --git a/include/asm-sparc/idprom.h b/arch/sparc/include/asm/idprom.h
index 6976aa2439c6..6976aa2439c6 100644
--- a/include/asm-sparc/idprom.h
+++ b/arch/sparc/include/asm/idprom.h
diff --git a/include/asm-sparc/intr_queue.h b/arch/sparc/include/asm/intr_queue.h
index 206077dedc2a..206077dedc2a 100644
--- a/include/asm-sparc/intr_queue.h
+++ b/arch/sparc/include/asm/intr_queue.h
diff --git a/include/asm-sparc/io-unit.h b/arch/sparc/include/asm/io-unit.h
index 96823b47fd45..96823b47fd45 100644
--- a/include/asm-sparc/io-unit.h
+++ b/arch/sparc/include/asm/io-unit.h
diff --git a/include/asm-sparc/io.h b/arch/sparc/include/asm/io.h
index fc9024d3dfc3..a34b2994937a 100644
--- a/include/asm-sparc/io.h
+++ b/arch/sparc/include/asm/io.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_IO_H 1#ifndef ___ASM_SPARC_IO_H
2#define ___ASM_SPARC_IO_H 2#define ___ASM_SPARC_IO_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/io_64.h> 4#include <asm/io_64.h>
5#else 5#else
6#include <asm-sparc/io_32.h> 6#include <asm/io_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/io_32.h b/arch/sparc/include/asm/io_32.h
index 10d7da450070..10d7da450070 100644
--- a/include/asm-sparc/io_32.h
+++ b/arch/sparc/include/asm/io_32.h
diff --git a/include/asm-sparc/io_64.h b/arch/sparc/include/asm/io_64.h
index 0bff078ffdd0..0bff078ffdd0 100644
--- a/include/asm-sparc/io_64.h
+++ b/arch/sparc/include/asm/io_64.h
diff --git a/include/asm-sparc/ioctl.h b/arch/sparc/include/asm/ioctl.h
index 7d6bd51321b9..7d6bd51321b9 100644
--- a/include/asm-sparc/ioctl.h
+++ b/arch/sparc/include/asm/ioctl.h
diff --git a/include/asm-sparc/ioctls.h b/arch/sparc/include/asm/ioctls.h
index 1fe6855c5c18..1fe6855c5c18 100644
--- a/include/asm-sparc/ioctls.h
+++ b/arch/sparc/include/asm/ioctls.h
diff --git a/include/asm-sparc/iommu.h b/arch/sparc/include/asm/iommu.h
index 91b072b0d7a0..e650965b4a8d 100644
--- a/include/asm-sparc/iommu.h
+++ b/arch/sparc/include/asm/iommu.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_IOMMU_H 1#ifndef ___ASM_SPARC_IOMMU_H
2#define ___ASM_SPARC_IOMMU_H 2#define ___ASM_SPARC_IOMMU_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/iommu_64.h> 4#include <asm/iommu_64.h>
5#else 5#else
6#include <asm-sparc/iommu_32.h> 6#include <asm/iommu_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/iommu_32.h b/arch/sparc/include/asm/iommu_32.h
index 70c589c05a10..70c589c05a10 100644
--- a/include/asm-sparc/iommu_32.h
+++ b/arch/sparc/include/asm/iommu_32.h
diff --git a/include/asm-sparc/iommu_64.h b/arch/sparc/include/asm/iommu_64.h
index d7b9afcba08b..d7b9afcba08b 100644
--- a/include/asm-sparc/iommu_64.h
+++ b/arch/sparc/include/asm/iommu_64.h
diff --git a/include/asm-sparc/ipcbuf.h b/arch/sparc/include/asm/ipcbuf.h
index 037605d986e2..17d6ef7b23a4 100644
--- a/include/asm-sparc/ipcbuf.h
+++ b/arch/sparc/include/asm/ipcbuf.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_IPCBUF_H 1#ifndef ___ASM_SPARC_IPCBUF_H
2#define ___ASM_SPARC_IPCBUF_H 2#define ___ASM_SPARC_IPCBUF_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/ipcbuf_64.h> 4#include <asm/ipcbuf_64.h>
5#else 5#else
6#include <asm-sparc/ipcbuf_32.h> 6#include <asm/ipcbuf_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/ipcbuf_32.h b/arch/sparc/include/asm/ipcbuf_32.h
index 6387209518f2..6387209518f2 100644
--- a/include/asm-sparc/ipcbuf_32.h
+++ b/arch/sparc/include/asm/ipcbuf_32.h
diff --git a/include/asm-sparc/ipcbuf_64.h b/arch/sparc/include/asm/ipcbuf_64.h
index a44b855b98db..a44b855b98db 100644
--- a/include/asm-sparc/ipcbuf_64.h
+++ b/arch/sparc/include/asm/ipcbuf_64.h
diff --git a/include/asm-sparc/irq.h b/arch/sparc/include/asm/irq.h
index 7af6bb4aa09c..3b44a6a14074 100644
--- a/include/asm-sparc/irq.h
+++ b/arch/sparc/include/asm/irq.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_IRQ_H 1#ifndef ___ASM_SPARC_IRQ_H
2#define ___ASM_SPARC_IRQ_H 2#define ___ASM_SPARC_IRQ_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/irq_64.h> 4#include <asm/irq_64.h>
5#else 5#else
6#include <asm-sparc/irq_32.h> 6#include <asm/irq_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/irq_32.h b/arch/sparc/include/asm/irq_32.h
index fe205cc444b8..fe205cc444b8 100644
--- a/include/asm-sparc/irq_32.h
+++ b/arch/sparc/include/asm/irq_32.h
diff --git a/include/asm-sparc/irq_64.h b/arch/sparc/include/asm/irq_64.h
index 0bb9bf531745..0bb9bf531745 100644
--- a/include/asm-sparc/irq_64.h
+++ b/arch/sparc/include/asm/irq_64.h
diff --git a/include/asm-sparc/irq_regs.h b/arch/sparc/include/asm/irq_regs.h
index 3dd9c0b70270..3dd9c0b70270 100644
--- a/include/asm-sparc/irq_regs.h
+++ b/arch/sparc/include/asm/irq_regs.h
diff --git a/include/asm-sparc/irqflags.h b/arch/sparc/include/asm/irqflags.h
index c6402b187e23..1e138632bd3f 100644
--- a/include/asm-sparc/irqflags.h
+++ b/arch/sparc/include/asm/irqflags.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_IRQFLAGS_H 1#ifndef ___ASM_SPARC_IRQFLAGS_H
2#define ___ASM_SPARC_IRQFLAGS_H 2#define ___ASM_SPARC_IRQFLAGS_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/irqflags_64.h> 4#include <asm/irqflags_64.h>
5#else 5#else
6#include <asm-sparc/irqflags_32.h> 6#include <asm/irqflags_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/irqflags_32.h b/arch/sparc/include/asm/irqflags_32.h
index db398fb32826..0fca9d97d44f 100644
--- a/include/asm-sparc/irqflags_32.h
+++ b/arch/sparc/include/asm/irqflags_32.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * include/asm-sparc/irqflags.h 2 * include/asm/irqflags.h
3 * 3 *
4 * IRQ flags handling 4 * IRQ flags handling
5 * 5 *
diff --git a/include/asm-sparc/irqflags_64.h b/arch/sparc/include/asm/irqflags_64.h
index 024fc54d0682..bb42e59162aa 100644
--- a/include/asm-sparc/irqflags_64.h
+++ b/arch/sparc/include/asm/irqflags_64.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * include/asm-sparc64/irqflags.h 2 * include/asm/irqflags.h
3 * 3 *
4 * IRQ flags handling 4 * IRQ flags handling
5 * 5 *
diff --git a/include/asm-sparc/jsflash.h b/arch/sparc/include/asm/jsflash.h
index 3457f29bd73b..3457f29bd73b 100644
--- a/include/asm-sparc/jsflash.h
+++ b/arch/sparc/include/asm/jsflash.h
diff --git a/include/asm-sparc/kdebug.h b/arch/sparc/include/asm/kdebug.h
index fe07d00d0534..8d12581ca386 100644
--- a/include/asm-sparc/kdebug.h
+++ b/arch/sparc/include/asm/kdebug.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_KDEBUG_H 1#ifndef ___ASM_SPARC_KDEBUG_H
2#define ___ASM_SPARC_KDEBUG_H 2#define ___ASM_SPARC_KDEBUG_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/kdebug_64.h> 4#include <asm/kdebug_64.h>
5#else 5#else
6#include <asm-sparc/kdebug_32.h> 6#include <asm/kdebug_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/kdebug_32.h b/arch/sparc/include/asm/kdebug_32.h
index f69fe7d84b3c..f69fe7d84b3c 100644
--- a/include/asm-sparc/kdebug_32.h
+++ b/arch/sparc/include/asm/kdebug_32.h
diff --git a/include/asm-sparc/kdebug_64.h b/arch/sparc/include/asm/kdebug_64.h
index f905b773235a..f905b773235a 100644
--- a/include/asm-sparc/kdebug_64.h
+++ b/arch/sparc/include/asm/kdebug_64.h
diff --git a/include/asm-sparc/kgdb.h b/arch/sparc/include/asm/kgdb.h
index b6ef301d05bf..b6ef301d05bf 100644
--- a/include/asm-sparc/kgdb.h
+++ b/arch/sparc/include/asm/kgdb.h
diff --git a/include/asm-sparc/kmap_types.h b/arch/sparc/include/asm/kmap_types.h
index 602f5e034f7a..602f5e034f7a 100644
--- a/include/asm-sparc/kmap_types.h
+++ b/arch/sparc/include/asm/kmap_types.h
diff --git a/include/asm-sparc/kprobes.h b/arch/sparc/include/asm/kprobes.h
index 5879d71afdaa..5879d71afdaa 100644
--- a/include/asm-sparc/kprobes.h
+++ b/arch/sparc/include/asm/kprobes.h
diff --git a/include/asm-sparc/ldc.h b/arch/sparc/include/asm/ldc.h
index bdb524a7b814..bdb524a7b814 100644
--- a/include/asm-sparc/ldc.h
+++ b/arch/sparc/include/asm/ldc.h
diff --git a/include/asm-sparc/linkage.h b/arch/sparc/include/asm/linkage.h
index 291c2d01c44f..291c2d01c44f 100644
--- a/include/asm-sparc/linkage.h
+++ b/arch/sparc/include/asm/linkage.h
diff --git a/include/asm-sparc/lmb.h b/arch/sparc/include/asm/lmb.h
index 6a352cbcf520..6a352cbcf520 100644
--- a/include/asm-sparc/lmb.h
+++ b/arch/sparc/include/asm/lmb.h
diff --git a/include/asm-sparc/local.h b/arch/sparc/include/asm/local.h
index bc80815a435c..bc80815a435c 100644
--- a/include/asm-sparc/local.h
+++ b/arch/sparc/include/asm/local.h
diff --git a/include/asm-sparc/lsu.h b/arch/sparc/include/asm/lsu.h
index 7190f8de90a0..7190f8de90a0 100644
--- a/include/asm-sparc/lsu.h
+++ b/arch/sparc/include/asm/lsu.h
diff --git a/include/asm-sparc/machines.h b/arch/sparc/include/asm/machines.h
index c28c2f248794..c28c2f248794 100644
--- a/include/asm-sparc/machines.h
+++ b/arch/sparc/include/asm/machines.h
diff --git a/include/asm-sparc/mbus.h b/arch/sparc/include/asm/mbus.h
index 69f07a022ee6..69f07a022ee6 100644
--- a/include/asm-sparc/mbus.h
+++ b/arch/sparc/include/asm/mbus.h
diff --git a/include/asm-sparc/mc146818rtc.h b/arch/sparc/include/asm/mc146818rtc.h
index 9ab65c21e9e4..67ed9e3a0235 100644
--- a/include/asm-sparc/mc146818rtc.h
+++ b/arch/sparc/include/asm/mc146818rtc.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_MC146818RTC_H 1#ifndef ___ASM_SPARC_MC146818RTC_H
2#define ___ASM_SPARC_MC146818RTC_H 2#define ___ASM_SPARC_MC146818RTC_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/mc146818rtc_64.h> 4#include <asm/mc146818rtc_64.h>
5#else 5#else
6#include <asm-sparc/mc146818rtc_32.h> 6#include <asm/mc146818rtc_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/mc146818rtc_32.h b/arch/sparc/include/asm/mc146818rtc_32.h
index fa7eac926582..fa7eac926582 100644
--- a/include/asm-sparc/mc146818rtc_32.h
+++ b/arch/sparc/include/asm/mc146818rtc_32.h
diff --git a/include/asm-sparc/mc146818rtc_64.h b/arch/sparc/include/asm/mc146818rtc_64.h
index e9c0fcc25c6f..e9c0fcc25c6f 100644
--- a/include/asm-sparc/mc146818rtc_64.h
+++ b/arch/sparc/include/asm/mc146818rtc_64.h
diff --git a/include/asm-sparc/mdesc.h b/arch/sparc/include/asm/mdesc.h
index 1acc7272e537..1acc7272e537 100644
--- a/include/asm-sparc/mdesc.h
+++ b/arch/sparc/include/asm/mdesc.h
diff --git a/include/asm-sparc/memreg.h b/arch/sparc/include/asm/memreg.h
index 845ad2b39183..845ad2b39183 100644
--- a/include/asm-sparc/memreg.h
+++ b/arch/sparc/include/asm/memreg.h
diff --git a/include/asm-sparc/mman.h b/arch/sparc/include/asm/mman.h
index fdfbbf0a4736..fdfbbf0a4736 100644
--- a/include/asm-sparc/mman.h
+++ b/arch/sparc/include/asm/mman.h
diff --git a/include/asm-sparc/mmu.h b/arch/sparc/include/asm/mmu.h
index ee66bf6dcbd6..88fa313887db 100644
--- a/include/asm-sparc/mmu.h
+++ b/arch/sparc/include/asm/mmu.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_MMU_H 1#ifndef ___ASM_SPARC_MMU_H
2#define ___ASM_SPARC_MMU_H 2#define ___ASM_SPARC_MMU_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/mmu_64.h> 4#include <asm/mmu_64.h>
5#else 5#else
6#include <asm-sparc/mmu_32.h> 6#include <asm/mmu_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/mmu_32.h b/arch/sparc/include/asm/mmu_32.h
index ccd36d26615a..ccd36d26615a 100644
--- a/include/asm-sparc/mmu_32.h
+++ b/arch/sparc/include/asm/mmu_32.h
diff --git a/include/asm-sparc/mmu_64.h b/arch/sparc/include/asm/mmu_64.h
index 9067dc500535..9067dc500535 100644
--- a/include/asm-sparc/mmu_64.h
+++ b/arch/sparc/include/asm/mmu_64.h
diff --git a/include/asm-sparc/mmu_context.h b/arch/sparc/include/asm/mmu_context.h
index e14efb9532ff..5531346c64f9 100644
--- a/include/asm-sparc/mmu_context.h
+++ b/arch/sparc/include/asm/mmu_context.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_MMU_CONTEXT_H 1#ifndef ___ASM_SPARC_MMU_CONTEXT_H
2#define ___ASM_SPARC_MMU_CONTEXT_H 2#define ___ASM_SPARC_MMU_CONTEXT_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/mmu_context_64.h> 4#include <asm/mmu_context_64.h>
5#else 5#else
6#include <asm-sparc/mmu_context_32.h> 6#include <asm/mmu_context_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/mmu_context_32.h b/arch/sparc/include/asm/mmu_context_32.h
index 671a997b9e69..671a997b9e69 100644
--- a/include/asm-sparc/mmu_context_32.h
+++ b/arch/sparc/include/asm/mmu_context_32.h
diff --git a/include/asm-sparc/mmu_context_64.h b/arch/sparc/include/asm/mmu_context_64.h
index 5693ab482606..5693ab482606 100644
--- a/include/asm-sparc/mmu_context_64.h
+++ b/arch/sparc/include/asm/mmu_context_64.h
diff --git a/include/asm-sparc/mmzone.h b/arch/sparc/include/asm/mmzone.h
index ebf5986c12ed..ebf5986c12ed 100644
--- a/include/asm-sparc/mmzone.h
+++ b/arch/sparc/include/asm/mmzone.h
diff --git a/include/asm-sparc/module.h b/arch/sparc/include/asm/module.h
index 516138fe681a..e82cf9a3e60e 100644
--- a/include/asm-sparc/module.h
+++ b/arch/sparc/include/asm/module.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_MODULE_H 1#ifndef ___ASM_SPARC_MODULE_H
2#define ___ASM_SPARC_MODULE_H 2#define ___ASM_SPARC_MODULE_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/module_64.h> 4#include <asm/module_64.h>
5#else 5#else
6#include <asm-sparc/module_32.h> 6#include <asm/module_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/module_32.h b/arch/sparc/include/asm/module_32.h
index cbd9e67b0c0b..cbd9e67b0c0b 100644
--- a/include/asm-sparc/module_32.h
+++ b/arch/sparc/include/asm/module_32.h
diff --git a/include/asm-sparc/module_64.h b/arch/sparc/include/asm/module_64.h
index 3d77ba465783..3d77ba465783 100644
--- a/include/asm-sparc/module_64.h
+++ b/arch/sparc/include/asm/module_64.h
diff --git a/include/asm-sparc/mostek.h b/arch/sparc/include/asm/mostek.h
index 5b9f7fec7ee7..433be3e0a69b 100644
--- a/include/asm-sparc/mostek.h
+++ b/arch/sparc/include/asm/mostek.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_MOSTEK_H 1#ifndef ___ASM_SPARC_MOSTEK_H
2#define ___ASM_SPARC_MOSTEK_H 2#define ___ASM_SPARC_MOSTEK_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/mostek_64.h> 4#include <asm/mostek_64.h>
5#else 5#else
6#include <asm-sparc/mostek_32.h> 6#include <asm/mostek_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/mostek_32.h b/arch/sparc/include/asm/mostek_32.h
index a99590c4c507..a99590c4c507 100644
--- a/include/asm-sparc/mostek_32.h
+++ b/arch/sparc/include/asm/mostek_32.h
diff --git a/include/asm-sparc/mostek_64.h b/arch/sparc/include/asm/mostek_64.h
index c5652de2ace2..c5652de2ace2 100644
--- a/include/asm-sparc/mostek_64.h
+++ b/arch/sparc/include/asm/mostek_64.h
diff --git a/include/asm-sparc/mpmbox.h b/arch/sparc/include/asm/mpmbox.h
index f8423039b242..f8423039b242 100644
--- a/include/asm-sparc/mpmbox.h
+++ b/arch/sparc/include/asm/mpmbox.h
diff --git a/include/asm-sparc/msgbuf.h b/arch/sparc/include/asm/msgbuf.h
index efc7cbe9788f..efc7cbe9788f 100644
--- a/include/asm-sparc/msgbuf.h
+++ b/arch/sparc/include/asm/msgbuf.h
diff --git a/include/asm-sparc/msi.h b/arch/sparc/include/asm/msi.h
index 724ca5667052..724ca5667052 100644
--- a/include/asm-sparc/msi.h
+++ b/arch/sparc/include/asm/msi.h
diff --git a/include/asm-sparc/mutex.h b/arch/sparc/include/asm/mutex.h
index 458c1f7fbc18..458c1f7fbc18 100644
--- a/include/asm-sparc/mutex.h
+++ b/arch/sparc/include/asm/mutex.h
diff --git a/include/asm-sparc/mxcc.h b/arch/sparc/include/asm/mxcc.h
index c0517bd05bde..c0517bd05bde 100644
--- a/include/asm-sparc/mxcc.h
+++ b/arch/sparc/include/asm/mxcc.h
diff --git a/include/asm-sparc/ns87303.h b/arch/sparc/include/asm/ns87303.h
index 686defe6aaa0..686defe6aaa0 100644
--- a/include/asm-sparc/ns87303.h
+++ b/arch/sparc/include/asm/ns87303.h
diff --git a/include/asm-sparc/obio.h b/arch/sparc/include/asm/obio.h
index 1a7544ceb574..1a7544ceb574 100644
--- a/include/asm-sparc/obio.h
+++ b/arch/sparc/include/asm/obio.h
diff --git a/include/asm-sparc/of_device.h b/arch/sparc/include/asm/of_device.h
index e5f5aedc2293..e5f5aedc2293 100644
--- a/include/asm-sparc/of_device.h
+++ b/arch/sparc/include/asm/of_device.h
diff --git a/include/asm-sparc/of_platform.h b/arch/sparc/include/asm/of_platform.h
index 851eb84d737e..aa699775ffba 100644
--- a/include/asm-sparc/of_platform.h
+++ b/arch/sparc/include/asm/of_platform.h
@@ -1,8 +1,8 @@
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#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/of_platform_64.h> 4#include <asm/of_platform_64.h>
5#else 5#else
6#include <asm-sparc/of_platform_32.h> 6#include <asm/of_platform_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/of_platform_32.h b/arch/sparc/include/asm/of_platform_32.h
index 38334351c36b..723f7c9b7411 100644
--- a/include/asm-sparc/of_platform_32.h
+++ b/arch/sparc/include/asm/of_platform_32.h
@@ -3,7 +3,7 @@
3/* 3/*
4 * Copyright (C) 2006 Benjamin Herrenschmidt, IBM Corp. 4 * Copyright (C) 2006 Benjamin Herrenschmidt, IBM Corp.
5 * <benh@kernel.crashing.org> 5 * <benh@kernel.crashing.org>
6 * Modified for Sparc by merging parts of asm-sparc/of_device.h 6 * Modified for Sparc by merging parts of asm/of_device.h
7 * by Stephen Rothwell 7 * by Stephen Rothwell
8 * 8 *
9 * This program is free software; you can redistribute it and/or 9 * This program is free software; you can redistribute it and/or
diff --git a/include/asm-sparc/of_platform_64.h b/arch/sparc/include/asm/of_platform_64.h
index 78aa032b674c..4f66a5f6342d 100644
--- a/include/asm-sparc/of_platform_64.h
+++ b/arch/sparc/include/asm/of_platform_64.h
@@ -3,7 +3,7 @@
3/* 3/*
4 * Copyright (C) 2006 Benjamin Herrenschmidt, IBM Corp. 4 * Copyright (C) 2006 Benjamin Herrenschmidt, IBM Corp.
5 * <benh@kernel.crashing.org> 5 * <benh@kernel.crashing.org>
6 * Modified for Sparc by merging parts of asm-sparc/of_device.h 6 * Modified for Sparc by merging parts of asm/of_device.h
7 * by Stephen Rothwell 7 * by Stephen Rothwell
8 * 8 *
9 * This program is free software; you can redistribute it and/or 9 * This program is free software; you can redistribute it and/or
diff --git a/include/asm-sparc/openprom.h b/arch/sparc/include/asm/openprom.h
index 8c349f061994..aaeae905ed3f 100644
--- a/include/asm-sparc/openprom.h
+++ b/arch/sparc/include/asm/openprom.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_OPENPROM_H 1#ifndef ___ASM_SPARC_OPENPROM_H
2#define ___ASM_SPARC_OPENPROM_H 2#define ___ASM_SPARC_OPENPROM_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/openprom_64.h> 4#include <asm/openprom_64.h>
5#else 5#else
6#include <asm-sparc/openprom_32.h> 6#include <asm/openprom_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/openprom_32.h b/arch/sparc/include/asm/openprom_32.h
index 8b1649f29ed9..8b1649f29ed9 100644
--- a/include/asm-sparc/openprom_32.h
+++ b/arch/sparc/include/asm/openprom_32.h
diff --git a/include/asm-sparc/openprom_64.h b/arch/sparc/include/asm/openprom_64.h
index b69e4a8c9170..b69e4a8c9170 100644
--- a/include/asm-sparc/openprom_64.h
+++ b/arch/sparc/include/asm/openprom_64.h
diff --git a/include/asm-sparc/openpromio.h b/arch/sparc/include/asm/openpromio.h
index 917fb8e9c633..917fb8e9c633 100644
--- a/include/asm-sparc/openpromio.h
+++ b/arch/sparc/include/asm/openpromio.h
diff --git a/include/asm-sparc/oplib.h b/arch/sparc/include/asm/oplib.h
index e88d7c04a292..72e04e13a6b4 100644
--- a/include/asm-sparc/oplib.h
+++ b/arch/sparc/include/asm/oplib.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_OPLIB_H 1#ifndef ___ASM_SPARC_OPLIB_H
2#define ___ASM_SPARC_OPLIB_H 2#define ___ASM_SPARC_OPLIB_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/oplib_64.h> 4#include <asm/oplib_64.h>
5#else 5#else
6#include <asm-sparc/oplib_32.h> 6#include <asm/oplib_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/oplib_32.h b/arch/sparc/include/asm/oplib_32.h
index b2631da259e0..b2631da259e0 100644
--- a/include/asm-sparc/oplib_32.h
+++ b/arch/sparc/include/asm/oplib_32.h
diff --git a/include/asm-sparc/oplib_64.h b/arch/sparc/include/asm/oplib_64.h
index 6d2c2ca98039..6d2c2ca98039 100644
--- a/include/asm-sparc/oplib_64.h
+++ b/arch/sparc/include/asm/oplib_64.h
diff --git a/include/asm-sparc/page.h b/arch/sparc/include/asm/page.h
index f32f49fcf75c..f21de0349025 100644
--- a/include/asm-sparc/page.h
+++ b/arch/sparc/include/asm/page.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_PAGE_H 1#ifndef ___ASM_SPARC_PAGE_H
2#define ___ASM_SPARC_PAGE_H 2#define ___ASM_SPARC_PAGE_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/page_64.h> 4#include <asm/page_64.h>
5#else 5#else
6#include <asm-sparc/page_32.h> 6#include <asm/page_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/page_32.h b/arch/sparc/include/asm/page_32.h
index cf5fb70ca1c1..cf5fb70ca1c1 100644
--- a/include/asm-sparc/page_32.h
+++ b/arch/sparc/include/asm/page_32.h
diff --git a/include/asm-sparc/page_64.h b/arch/sparc/include/asm/page_64.h
index b579b910ef51..b579b910ef51 100644
--- a/include/asm-sparc/page_64.h
+++ b/arch/sparc/include/asm/page_64.h
diff --git a/include/asm-sparc/param.h b/arch/sparc/include/asm/param.h
index 9836d9a3cb9a..9836d9a3cb9a 100644
--- a/include/asm-sparc/param.h
+++ b/arch/sparc/include/asm/param.h
diff --git a/include/asm-sparc/parport.h b/arch/sparc/include/asm/parport.h
index 7818b2523b8d..7818b2523b8d 100644
--- a/include/asm-sparc/parport.h
+++ b/arch/sparc/include/asm/parport.h
diff --git a/include/asm-sparc/pbm.h b/arch/sparc/include/asm/pbm.h
index 458a4916d14d..458a4916d14d 100644
--- a/include/asm-sparc/pbm.h
+++ b/arch/sparc/include/asm/pbm.h
diff --git a/include/asm-sparc/pci.h b/arch/sparc/include/asm/pci.h
index b807d52a4809..6e14fd179335 100644
--- a/include/asm-sparc/pci.h
+++ b/arch/sparc/include/asm/pci.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_PCI_H 1#ifndef ___ASM_SPARC_PCI_H
2#define ___ASM_SPARC_PCI_H 2#define ___ASM_SPARC_PCI_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/pci_64.h> 4#include <asm/pci_64.h>
5#else 5#else
6#include <asm-sparc/pci_32.h> 6#include <asm/pci_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/pci_32.h b/arch/sparc/include/asm/pci_32.h
index 0ee949d220c0..0ee949d220c0 100644
--- a/include/asm-sparc/pci_32.h
+++ b/arch/sparc/include/asm/pci_32.h
diff --git a/include/asm-sparc/pci_64.h b/arch/sparc/include/asm/pci_64.h
index 4f79a54948f6..4f79a54948f6 100644
--- a/include/asm-sparc/pci_64.h
+++ b/arch/sparc/include/asm/pci_64.h
diff --git a/include/asm-sparc/pcic.h b/arch/sparc/include/asm/pcic.h
index f20ef562b265..f20ef562b265 100644
--- a/include/asm-sparc/pcic.h
+++ b/arch/sparc/include/asm/pcic.h
diff --git a/include/asm-sparc/percpu.h b/arch/sparc/include/asm/percpu.h
index d98ed6cf2e36..bfb1d19ff1bf 100644
--- a/include/asm-sparc/percpu.h
+++ b/arch/sparc/include/asm/percpu.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_PERCPU_H 1#ifndef ___ASM_SPARC_PERCPU_H
2#define ___ASM_SPARC_PERCPU_H 2#define ___ASM_SPARC_PERCPU_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/percpu_64.h> 4#include <asm/percpu_64.h>
5#else 5#else
6#include <asm-sparc/percpu_32.h> 6#include <asm/percpu_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/percpu_32.h b/arch/sparc/include/asm/percpu_32.h
index 06066a7aaec3..06066a7aaec3 100644
--- a/include/asm-sparc/percpu_32.h
+++ b/arch/sparc/include/asm/percpu_32.h
diff --git a/include/asm-sparc/percpu_64.h b/arch/sparc/include/asm/percpu_64.h
index bee64593023e..bee64593023e 100644
--- a/include/asm-sparc/percpu_64.h
+++ b/arch/sparc/include/asm/percpu_64.h
diff --git a/include/asm-sparc/perfctr.h b/arch/sparc/include/asm/perfctr.h
index 836873002b75..836873002b75 100644
--- a/include/asm-sparc/perfctr.h
+++ b/arch/sparc/include/asm/perfctr.h
diff --git a/include/asm-sparc/pgalloc.h b/arch/sparc/include/asm/pgalloc.h
index 7fa02b53d392..b6db1f7cdcab 100644
--- a/include/asm-sparc/pgalloc.h
+++ b/arch/sparc/include/asm/pgalloc.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_PGALLOC_H 1#ifndef ___ASM_SPARC_PGALLOC_H
2#define ___ASM_SPARC_PGALLOC_H 2#define ___ASM_SPARC_PGALLOC_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/pgalloc_64.h> 4#include <asm/pgalloc_64.h>
5#else 5#else
6#include <asm-sparc/pgalloc_32.h> 6#include <asm/pgalloc_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/pgalloc_32.h b/arch/sparc/include/asm/pgalloc_32.h
index 681582d26969..681582d26969 100644
--- a/include/asm-sparc/pgalloc_32.h
+++ b/arch/sparc/include/asm/pgalloc_32.h
diff --git a/include/asm-sparc/pgalloc_64.h b/arch/sparc/include/asm/pgalloc_64.h
index 5bdfa2c6e400..5bdfa2c6e400 100644
--- a/include/asm-sparc/pgalloc_64.h
+++ b/arch/sparc/include/asm/pgalloc_64.h
diff --git a/include/asm-sparc/pgtable.h b/arch/sparc/include/asm/pgtable.h
index 63cdef53bc52..59ba6f620732 100644
--- a/include/asm-sparc/pgtable.h
+++ b/arch/sparc/include/asm/pgtable.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_PGTABLE_H 1#ifndef ___ASM_SPARC_PGTABLE_H
2#define ___ASM_SPARC_PGTABLE_H 2#define ___ASM_SPARC_PGTABLE_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/pgtable_64.h> 4#include <asm/pgtable_64.h>
5#else 5#else
6#include <asm-sparc/pgtable_32.h> 6#include <asm/pgtable_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/pgtable_32.h b/arch/sparc/include/asm/pgtable_32.h
index 781bd4694a1c..08237fda8874 100644
--- a/include/asm-sparc/pgtable_32.h
+++ b/arch/sparc/include/asm/pgtable_32.h
@@ -1,7 +1,7 @@
1#ifndef _SPARC_PGTABLE_H 1#ifndef _SPARC_PGTABLE_H
2#define _SPARC_PGTABLE_H 2#define _SPARC_PGTABLE_H
3 3
4/* asm-sparc/pgtable.h: Defines and functions used to work 4/* asm/pgtable.h: Defines and functions used to work
5 * with Sparc page tables. 5 * with Sparc page tables.
6 * 6 *
7 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 7 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h
index bb9ec2cce355..bb9ec2cce355 100644
--- a/include/asm-sparc/pgtable_64.h
+++ b/arch/sparc/include/asm/pgtable_64.h
diff --git a/include/asm-sparc/pgtsrmmu.h b/arch/sparc/include/asm/pgtsrmmu.h
index 808555fc1d58..808555fc1d58 100644
--- a/include/asm-sparc/pgtsrmmu.h
+++ b/arch/sparc/include/asm/pgtsrmmu.h
diff --git a/include/asm-sparc/pgtsun4.h b/arch/sparc/include/asm/pgtsun4.h
index 5a0d661fb82e..5a0d661fb82e 100644
--- a/include/asm-sparc/pgtsun4.h
+++ b/arch/sparc/include/asm/pgtsun4.h
diff --git a/include/asm-sparc/pgtsun4c.h b/arch/sparc/include/asm/pgtsun4c.h
index aeb25e912179..aeb25e912179 100644
--- a/include/asm-sparc/pgtsun4c.h
+++ b/arch/sparc/include/asm/pgtsun4c.h
diff --git a/include/asm-sparc/pil.h b/arch/sparc/include/asm/pil.h
index 71819bb943fc..71819bb943fc 100644
--- a/include/asm-sparc/pil.h
+++ b/arch/sparc/include/asm/pil.h
diff --git a/include/asm-sparc/poll.h b/arch/sparc/include/asm/poll.h
index 091d3ad2e830..091d3ad2e830 100644
--- a/include/asm-sparc/poll.h
+++ b/arch/sparc/include/asm/poll.h
diff --git a/include/asm-sparc/posix_types.h b/arch/sparc/include/asm/posix_types.h
index 58c820d75e83..03a0e091a884 100644
--- a/include/asm-sparc/posix_types.h
+++ b/arch/sparc/include/asm/posix_types.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_POSIX_TYPES_H 1#ifndef ___ASM_SPARC_POSIX_TYPES_H
2#define ___ASM_SPARC_POSIX_TYPES_H 2#define ___ASM_SPARC_POSIX_TYPES_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/posix_types_64.h> 4#include <asm/posix_types_64.h>
5#else 5#else
6#include <asm-sparc/posix_types_32.h> 6#include <asm/posix_types_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/posix_types_32.h b/arch/sparc/include/asm/posix_types_32.h
index 6bb6eb1ca0f2..6bb6eb1ca0f2 100644
--- a/include/asm-sparc/posix_types_32.h
+++ b/arch/sparc/include/asm/posix_types_32.h
diff --git a/include/asm-sparc/posix_types_64.h b/arch/sparc/include/asm/posix_types_64.h
index ba8f93295763..ba8f93295763 100644
--- a/include/asm-sparc/posix_types_64.h
+++ b/arch/sparc/include/asm/posix_types_64.h
diff --git a/include/asm-sparc/processor.h b/arch/sparc/include/asm/processor.h
index 11a66bb02eaa..9da9646bf6c6 100644
--- a/include/asm-sparc/processor.h
+++ b/arch/sparc/include/asm/processor.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_PROCESSOR_H 1#ifndef ___ASM_SPARC_PROCESSOR_H
2#define ___ASM_SPARC_PROCESSOR_H 2#define ___ASM_SPARC_PROCESSOR_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/processor_64.h> 4#include <asm/processor_64.h>
5#else 5#else
6#include <asm-sparc/processor_32.h> 6#include <asm/processor_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/processor_32.h b/arch/sparc/include/asm/processor_32.h
index 562c0d69c537..2ae67a2e7f3a 100644
--- a/include/asm-sparc/processor_32.h
+++ b/arch/sparc/include/asm/processor_32.h
@@ -1,4 +1,4 @@
1/* include/asm-sparc/processor.h 1/* include/asm/processor.h
2 * 2 *
3 * Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu) 3 * Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu)
4 */ 4 */
@@ -114,6 +114,7 @@ extern pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
114 114
115extern unsigned long get_wchan(struct task_struct *); 115extern unsigned long get_wchan(struct task_struct *);
116 116
117#define task_pt_regs(tsk) ((tsk)->thread.kregs)
117#define KSTK_EIP(tsk) ((tsk)->thread.kregs->pc) 118#define KSTK_EIP(tsk) ((tsk)->thread.kregs->pc)
118#define KSTK_ESP(tsk) ((tsk)->thread.kregs->u_regs[UREG_FP]) 119#define KSTK_ESP(tsk) ((tsk)->thread.kregs->u_regs[UREG_FP])
119 120
diff --git a/include/asm-sparc/processor_64.h b/arch/sparc/include/asm/processor_64.h
index 70d42801a0d2..137a6bd72fc8 100644
--- a/include/asm-sparc/processor_64.h
+++ b/arch/sparc/include/asm/processor_64.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * include/asm-sparc64/processor.h 2 * include/asm/processor.h
3 * 3 *
4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
5 */ 5 */
diff --git a/include/asm-sparc/prom.h b/arch/sparc/include/asm/prom.h
index fd55522481cd..fd55522481cd 100644
--- a/include/asm-sparc/prom.h
+++ b/arch/sparc/include/asm/prom.h
diff --git a/include/asm-sparc/psr.h b/arch/sparc/include/asm/psr.h
index b8c0e5f0a66b..b8c0e5f0a66b 100644
--- a/include/asm-sparc/psr.h
+++ b/arch/sparc/include/asm/psr.h
diff --git a/include/asm-sparc/psrcompat.h b/arch/sparc/include/asm/psrcompat.h
index 44b6327dbbf5..44b6327dbbf5 100644
--- a/include/asm-sparc/psrcompat.h
+++ b/arch/sparc/include/asm/psrcompat.h
diff --git a/include/asm-sparc/pstate.h b/arch/sparc/include/asm/pstate.h
index a26a53777bb0..a26a53777bb0 100644
--- a/include/asm-sparc/pstate.h
+++ b/arch/sparc/include/asm/pstate.h
diff --git a/include/asm-sparc/ptrace.h b/arch/sparc/include/asm/ptrace.h
index f36ab6c30ff3..6dcbe2eed2e2 100644
--- a/include/asm-sparc/ptrace.h
+++ b/arch/sparc/include/asm/ptrace.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_PTRACE_H 1#ifndef ___ASM_SPARC_PTRACE_H
2#define ___ASM_SPARC_PTRACE_H 2#define ___ASM_SPARC_PTRACE_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/ptrace_64.h> 4#include <asm/ptrace_64.h>
5#else 5#else
6#include <asm-sparc/ptrace_32.h> 6#include <asm/ptrace_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/ptrace_32.h b/arch/sparc/include/asm/ptrace_32.h
index 0401cc7ec38e..d43c88b86834 100644
--- a/include/asm-sparc/ptrace_32.h
+++ b/arch/sparc/include/asm/ptrace_32.h
@@ -74,6 +74,7 @@ struct sparc_stackf {
74 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])
77unsigned long profile_pc(struct pt_regs *); 78unsigned long profile_pc(struct pt_regs *);
78extern void show_regs(struct pt_regs *); 79extern void show_regs(struct pt_regs *);
79#endif 80#endif
diff --git a/include/asm-sparc/ptrace_64.h b/arch/sparc/include/asm/ptrace_64.h
index a682e66d5c4a..ec6d45c84cd0 100644
--- a/include/asm-sparc/ptrace_64.h
+++ b/arch/sparc/include/asm/ptrace_64.h
@@ -146,6 +146,7 @@ do { current_thread_info()->syscall_noerror = 1; \
146} while (0) 146} while (0)
147#define user_mode(regs) (!((regs)->tstate & TSTATE_PRIV)) 147#define user_mode(regs) (!((regs)->tstate & TSTATE_PRIV))
148#define instruction_pointer(regs) ((regs)->tpc) 148#define instruction_pointer(regs) ((regs)->tpc)
149#define user_stack_pointer(regs) ((regs)->u_regs[UREG_FP])
149#define regs_return_value(regs) ((regs)->u_regs[UREG_I0]) 150#define regs_return_value(regs) ((regs)->u_regs[UREG_I0])
150#ifdef CONFIG_SMP 151#ifdef CONFIG_SMP
151extern unsigned long profile_pc(struct pt_regs *); 152extern unsigned long profile_pc(struct pt_regs *);
diff --git a/include/asm-sparc/reboot.h b/arch/sparc/include/asm/reboot.h
index 3f3f43f5be5e..3f3f43f5be5e 100644
--- a/include/asm-sparc/reboot.h
+++ b/arch/sparc/include/asm/reboot.h
diff --git a/include/asm-sparc/reg.h b/arch/sparc/include/asm/reg.h
index cb34b0a49aad..0c16e19cae4d 100644
--- a/include/asm-sparc/reg.h
+++ b/arch/sparc/include/asm/reg.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_REG_H 1#ifndef ___ASM_SPARC_REG_H
2#define ___ASM_SPARC_REG_H 2#define ___ASM_SPARC_REG_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/reg_64.h> 4#include <asm/reg_64.h>
5#else 5#else
6#include <asm-sparc/reg_32.h> 6#include <asm/reg_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/reg_32.h b/arch/sparc/include/asm/reg_32.h
index 42fecfcd97e7..1efb056fb3d1 100644
--- a/include/asm-sparc/reg_32.h
+++ b/arch/sparc/include/asm/reg_32.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/include/asm-sparc/reg.h 2 * linux/include/asm/reg.h
3 * Layout of the registers as expected by gdb on the Sparc 3 * Layout of the registers as expected by gdb on the Sparc
4 * we should replace the user.h definitions with those in 4 * we should replace the user.h definitions with those in
5 * this file, we don't even use the other 5 * this file, we don't even use the other
diff --git a/include/asm-sparc/reg_64.h b/arch/sparc/include/asm/reg_64.h
index eb24a07ff4d5..6f277d7c7d88 100644
--- a/include/asm-sparc/reg_64.h
+++ b/arch/sparc/include/asm/reg_64.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/asm-sparc64/reg.h 2 * linux/asm/reg.h
3 * Layout of the registers as expected by gdb on the Sparc 3 * Layout of the registers as expected by gdb on the Sparc
4 * we should replace the user.h definitions with those in 4 * we should replace the user.h definitions with those in
5 * this file, we don't even use the other 5 * this file, we don't even use the other
diff --git a/include/asm-sparc/resource.h b/arch/sparc/include/asm/resource.h
index fe163cafb4c7..fe163cafb4c7 100644
--- a/include/asm-sparc/resource.h
+++ b/arch/sparc/include/asm/resource.h
diff --git a/include/asm-sparc/ross.h b/arch/sparc/include/asm/ross.h
index ecb6e81786a6..ecb6e81786a6 100644
--- a/include/asm-sparc/ross.h
+++ b/arch/sparc/include/asm/ross.h
diff --git a/include/asm-sparc/rtc.h b/arch/sparc/include/asm/rtc.h
index f9ecb1fe2ecd..f9ecb1fe2ecd 100644
--- a/include/asm-sparc/rtc.h
+++ b/arch/sparc/include/asm/rtc.h
diff --git a/include/asm-sparc/rwsem-const.h b/arch/sparc/include/asm/rwsem-const.h
index a303c9d64d84..a303c9d64d84 100644
--- a/include/asm-sparc/rwsem-const.h
+++ b/arch/sparc/include/asm/rwsem-const.h
diff --git a/include/asm-sparc/rwsem.h b/arch/sparc/include/asm/rwsem.h
index 1dc129ac2feb..1dc129ac2feb 100644
--- a/include/asm-sparc/rwsem.h
+++ b/arch/sparc/include/asm/rwsem.h
diff --git a/include/asm-sparc/sbi.h b/arch/sparc/include/asm/sbi.h
index 5eb7f1965d33..5eb7f1965d33 100644
--- a/include/asm-sparc/sbi.h
+++ b/arch/sparc/include/asm/sbi.h
diff --git a/include/asm-sparc/sbus.h b/arch/sparc/include/asm/sbus.h
index 8f29a1979665..f82481ab44db 100644
--- a/include/asm-sparc/sbus.h
+++ b/arch/sparc/include/asm/sbus.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_SBUS_H 1#ifndef ___ASM_SPARC_SBUS_H
2#define ___ASM_SPARC_SBUS_H 2#define ___ASM_SPARC_SBUS_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/sbus_64.h> 4#include <asm/sbus_64.h>
5#else 5#else
6#include <asm-sparc/sbus_32.h> 6#include <asm/sbus_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/sbus_32.h b/arch/sparc/include/asm/sbus_32.h
index 77b5d3aadc99..77b5d3aadc99 100644
--- a/include/asm-sparc/sbus_32.h
+++ b/arch/sparc/include/asm/sbus_32.h
diff --git a/include/asm-sparc/sbus_64.h b/arch/sparc/include/asm/sbus_64.h
index 0e16b6dd7e96..0e16b6dd7e96 100644
--- a/include/asm-sparc/sbus_64.h
+++ b/arch/sparc/include/asm/sbus_64.h
diff --git a/include/asm-sparc/scatterlist.h b/arch/sparc/include/asm/scatterlist.h
index b1a0e316c2b6..ec21a4517641 100644
--- a/include/asm-sparc/scatterlist.h
+++ b/arch/sparc/include/asm/scatterlist.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_SCATTERLIST_H 1#ifndef ___ASM_SPARC_SCATTERLIST_H
2#define ___ASM_SPARC_SCATTERLIST_H 2#define ___ASM_SPARC_SCATTERLIST_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/scatterlist_64.h> 4#include <asm/scatterlist_64.h>
5#else 5#else
6#include <asm-sparc/scatterlist_32.h> 6#include <asm/scatterlist_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/scatterlist_32.h b/arch/sparc/include/asm/scatterlist_32.h
index c82609ca1d0f..c82609ca1d0f 100644
--- a/include/asm-sparc/scatterlist_32.h
+++ b/arch/sparc/include/asm/scatterlist_32.h
diff --git a/include/asm-sparc/scatterlist_64.h b/arch/sparc/include/asm/scatterlist_64.h
index 81bd058f9382..81bd058f9382 100644
--- a/include/asm-sparc/scatterlist_64.h
+++ b/arch/sparc/include/asm/scatterlist_64.h
diff --git a/include/asm-sparc/scratchpad.h b/arch/sparc/include/asm/scratchpad.h
index 5e8b01fb3343..5e8b01fb3343 100644
--- a/include/asm-sparc/scratchpad.h
+++ b/arch/sparc/include/asm/scratchpad.h
diff --git a/include/asm-sparc/seccomp.h b/arch/sparc/include/asm/seccomp.h
index 7fcd9968192b..7fcd9968192b 100644
--- a/include/asm-sparc/seccomp.h
+++ b/arch/sparc/include/asm/seccomp.h
diff --git a/include/asm-sparc/sections.h b/arch/sparc/include/asm/sections.h
index cbd019162425..c7c69b00967f 100644
--- a/include/asm-sparc/sections.h
+++ b/arch/sparc/include/asm/sections.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_SECTIONS_H 1#ifndef ___ASM_SPARC_SECTIONS_H
2#define ___ASM_SPARC_SECTIONS_H 2#define ___ASM_SPARC_SECTIONS_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/sections_64.h> 4#include <asm/sections_64.h>
5#else 5#else
6#include <asm-sparc/sections_32.h> 6#include <asm/sections_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/sections_32.h b/arch/sparc/include/asm/sections_32.h
index 6832841df051..6832841df051 100644
--- a/include/asm-sparc/sections_32.h
+++ b/arch/sparc/include/asm/sections_32.h
diff --git a/include/asm-sparc/sections_64.h b/arch/sparc/include/asm/sections_64.h
index 3f4b9fdc28d0..3f4b9fdc28d0 100644
--- a/include/asm-sparc/sections_64.h
+++ b/arch/sparc/include/asm/sections_64.h
diff --git a/include/asm-sparc/sembuf.h b/arch/sparc/include/asm/sembuf.h
index faee1be08d67..faee1be08d67 100644
--- a/include/asm-sparc/sembuf.h
+++ b/arch/sparc/include/asm/sembuf.h
diff --git a/include/asm-sparc/setup.h b/arch/sparc/include/asm/setup.h
index 2643c62f4ac0..2643c62f4ac0 100644
--- a/include/asm-sparc/setup.h
+++ b/arch/sparc/include/asm/setup.h
diff --git a/include/asm-sparc/sfafsr.h b/arch/sparc/include/asm/sfafsr.h
index e96137b04a4f..e96137b04a4f 100644
--- a/include/asm-sparc/sfafsr.h
+++ b/arch/sparc/include/asm/sfafsr.h
diff --git a/include/asm-sparc/sfp-machine.h b/arch/sparc/include/asm/sfp-machine.h
index c676fcc2dd27..4ebc3823ed4f 100644
--- a/include/asm-sparc/sfp-machine.h
+++ b/arch/sparc/include/asm/sfp-machine.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_SFP_MACHINE_H 1#ifndef ___ASM_SPARC_SFP_MACHINE_H
2#define ___ASM_SPARC_SFP_MACHINE_H 2#define ___ASM_SPARC_SFP_MACHINE_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/sfp-machine_64.h> 4#include <asm/sfp-machine_64.h>
5#else 5#else
6#include <asm-sparc/sfp-machine_32.h> 6#include <asm/sfp-machine_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/sfp-machine_32.h b/arch/sparc/include/asm/sfp-machine_32.h
index 01d9c3b5a73b..01d9c3b5a73b 100644
--- a/include/asm-sparc/sfp-machine_32.h
+++ b/arch/sparc/include/asm/sfp-machine_32.h
diff --git a/include/asm-sparc/sfp-machine_64.h b/arch/sparc/include/asm/sfp-machine_64.h
index ca913ef40bd5..ca913ef40bd5 100644
--- a/include/asm-sparc/sfp-machine_64.h
+++ b/arch/sparc/include/asm/sfp-machine_64.h
diff --git a/include/asm-sparc/shmbuf.h b/arch/sparc/include/asm/shmbuf.h
index 83a16055363f..83a16055363f 100644
--- a/include/asm-sparc/shmbuf.h
+++ b/arch/sparc/include/asm/shmbuf.h
diff --git a/include/asm-sparc/shmparam.h b/arch/sparc/include/asm/shmparam.h
index 16fda7e9acc8..8bf0cfe0694f 100644
--- a/include/asm-sparc/shmparam.h
+++ b/arch/sparc/include/asm/shmparam.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_SHMPARAM_H 1#ifndef ___ASM_SPARC_SHMPARAM_H
2#define ___ASM_SPARC_SHMPARAM_H 2#define ___ASM_SPARC_SHMPARAM_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/shmparam_64.h> 4#include <asm/shmparam_64.h>
5#else 5#else
6#include <asm-sparc/shmparam_32.h> 6#include <asm/shmparam_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/shmparam_32.h b/arch/sparc/include/asm/shmparam_32.h
index 59a1243c12f3..59a1243c12f3 100644
--- a/include/asm-sparc/shmparam_32.h
+++ b/arch/sparc/include/asm/shmparam_32.h
diff --git a/include/asm-sparc/shmparam_64.h b/arch/sparc/include/asm/shmparam_64.h
index 1ed0d6701a9b..1ed0d6701a9b 100644
--- a/include/asm-sparc/shmparam_64.h
+++ b/arch/sparc/include/asm/shmparam_64.h
diff --git a/include/asm-sparc/sigcontext.h b/arch/sparc/include/asm/sigcontext.h
index 82fc7d54a4fa..e92de7e286b5 100644
--- a/include/asm-sparc/sigcontext.h
+++ b/arch/sparc/include/asm/sigcontext.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_SIGCONTEXT_H 1#ifndef ___ASM_SPARC_SIGCONTEXT_H
2#define ___ASM_SPARC_SIGCONTEXT_H 2#define ___ASM_SPARC_SIGCONTEXT_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/sigcontext_64.h> 4#include <asm/sigcontext_64.h>
5#else 5#else
6#include <asm-sparc/sigcontext_32.h> 6#include <asm/sigcontext_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/sigcontext_32.h b/arch/sparc/include/asm/sigcontext_32.h
index c5fb60dcbd75..c5fb60dcbd75 100644
--- a/include/asm-sparc/sigcontext_32.h
+++ b/arch/sparc/include/asm/sigcontext_32.h
diff --git a/include/asm-sparc/sigcontext_64.h b/arch/sparc/include/asm/sigcontext_64.h
index 1c868d680cfc..1c868d680cfc 100644
--- a/include/asm-sparc/sigcontext_64.h
+++ b/arch/sparc/include/asm/sigcontext_64.h
diff --git a/include/asm-sparc/siginfo.h b/arch/sparc/include/asm/siginfo.h
index 2c9fccf4ce18..bd81f8d7f5ce 100644
--- a/include/asm-sparc/siginfo.h
+++ b/arch/sparc/include/asm/siginfo.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_SIGINFO_H 1#ifndef ___ASM_SPARC_SIGINFO_H
2#define ___ASM_SPARC_SIGINFO_H 2#define ___ASM_SPARC_SIGINFO_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/siginfo_64.h> 4#include <asm/siginfo_64.h>
5#else 5#else
6#include <asm-sparc/siginfo_32.h> 6#include <asm/siginfo_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/siginfo_32.h b/arch/sparc/include/asm/siginfo_32.h
index 3c71af135c52..3c71af135c52 100644
--- a/include/asm-sparc/siginfo_32.h
+++ b/arch/sparc/include/asm/siginfo_32.h
diff --git a/include/asm-sparc/siginfo_64.h b/arch/sparc/include/asm/siginfo_64.h
index c96e6c30f8b0..c96e6c30f8b0 100644
--- a/include/asm-sparc/siginfo_64.h
+++ b/arch/sparc/include/asm/siginfo_64.h
diff --git a/include/asm-sparc/signal.h b/arch/sparc/include/asm/signal.h
index 36f5f9e482f7..27ab05dc203e 100644
--- a/include/asm-sparc/signal.h
+++ b/arch/sparc/include/asm/signal.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_SIGNAL_H 1#ifndef ___ASM_SPARC_SIGNAL_H
2#define ___ASM_SPARC_SIGNAL_H 2#define ___ASM_SPARC_SIGNAL_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/signal_64.h> 4#include <asm/signal_64.h>
5#else 5#else
6#include <asm-sparc/signal_32.h> 6#include <asm/signal_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/signal_32.h b/arch/sparc/include/asm/signal_32.h
index 96a60ab03ca1..96a60ab03ca1 100644
--- a/include/asm-sparc/signal_32.h
+++ b/arch/sparc/include/asm/signal_32.h
diff --git a/include/asm-sparc/signal_64.h b/arch/sparc/include/asm/signal_64.h
index ab1509a101c5..ab1509a101c5 100644
--- a/include/asm-sparc/signal_64.h
+++ b/arch/sparc/include/asm/signal_64.h
diff --git a/include/asm-sparc/smp.h b/arch/sparc/include/asm/smp.h
index 1f9dedfbabd8..b59672d0e19b 100644
--- a/include/asm-sparc/smp.h
+++ b/arch/sparc/include/asm/smp.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_SMP_H 1#ifndef ___ASM_SPARC_SMP_H
2#define ___ASM_SPARC_SMP_H 2#define ___ASM_SPARC_SMP_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/smp_64.h> 4#include <asm/smp_64.h>
5#else 5#else
6#include <asm-sparc/smp_32.h> 6#include <asm/smp_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/smp_32.h b/arch/sparc/include/asm/smp_32.h
index 7201752cf934..7201752cf934 100644
--- a/include/asm-sparc/smp_32.h
+++ b/arch/sparc/include/asm/smp_32.h
diff --git a/include/asm-sparc/smp_64.h b/arch/sparc/include/asm/smp_64.h
index 57224dd37b3a..57224dd37b3a 100644
--- a/include/asm-sparc/smp_64.h
+++ b/arch/sparc/include/asm/smp_64.h
diff --git a/include/asm-sparc/smpprim.h b/arch/sparc/include/asm/smpprim.h
index eb849d862c64..eb849d862c64 100644
--- a/include/asm-sparc/smpprim.h
+++ b/arch/sparc/include/asm/smpprim.h
diff --git a/include/asm-sparc/socket.h b/arch/sparc/include/asm/socket.h
index bf50d0c2d583..bf50d0c2d583 100644
--- a/include/asm-sparc/socket.h
+++ b/arch/sparc/include/asm/socket.h
diff --git a/include/asm-sparc/sockios.h b/arch/sparc/include/asm/sockios.h
index 990ea746486b..990ea746486b 100644
--- a/include/asm-sparc/sockios.h
+++ b/arch/sparc/include/asm/sockios.h
diff --git a/include/asm-sparc/sparsemem.h b/arch/sparc/include/asm/sparsemem.h
index b99d4e4b6d28..b99d4e4b6d28 100644
--- a/include/asm-sparc/sparsemem.h
+++ b/arch/sparc/include/asm/sparsemem.h
diff --git a/include/asm-sparc/spinlock.h b/arch/sparc/include/asm/spinlock.h
index 3b71c50b72eb..f276b0036b2c 100644
--- a/include/asm-sparc/spinlock.h
+++ b/arch/sparc/include/asm/spinlock.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_SPINLOCK_H 1#ifndef ___ASM_SPARC_SPINLOCK_H
2#define ___ASM_SPARC_SPINLOCK_H 2#define ___ASM_SPARC_SPINLOCK_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/spinlock_64.h> 4#include <asm/spinlock_64.h>
5#else 5#else
6#include <asm-sparc/spinlock_32.h> 6#include <asm/spinlock_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/spinlock_32.h b/arch/sparc/include/asm/spinlock_32.h
index de2249b267c6..de2249b267c6 100644
--- a/include/asm-sparc/spinlock_32.h
+++ b/arch/sparc/include/asm/spinlock_32.h
diff --git a/include/asm-sparc/spinlock_64.h b/arch/sparc/include/asm/spinlock_64.h
index 0006fe9f8c7a..0006fe9f8c7a 100644
--- a/include/asm-sparc/spinlock_64.h
+++ b/arch/sparc/include/asm/spinlock_64.h
diff --git a/include/asm-sparc/spinlock_types.h b/arch/sparc/include/asm/spinlock_types.h
index 37cbe01c585b..37cbe01c585b 100644
--- a/include/asm-sparc/spinlock_types.h
+++ b/arch/sparc/include/asm/spinlock_types.h
diff --git a/include/asm-sparc/spitfire.h b/arch/sparc/include/asm/spitfire.h
index 985ea7e31992..985ea7e31992 100644
--- a/include/asm-sparc/spitfire.h
+++ b/arch/sparc/include/asm/spitfire.h
diff --git a/include/asm-sparc/sstate.h b/arch/sparc/include/asm/sstate.h
index a7c35dbcb281..a7c35dbcb281 100644
--- a/include/asm-sparc/sstate.h
+++ b/arch/sparc/include/asm/sstate.h
diff --git a/include/asm-sparc/stacktrace.h b/arch/sparc/include/asm/stacktrace.h
index 6cee39adf6d6..6cee39adf6d6 100644
--- a/include/asm-sparc/stacktrace.h
+++ b/arch/sparc/include/asm/stacktrace.h
diff --git a/include/asm-sparc/starfire.h b/arch/sparc/include/asm/starfire.h
index 07bafd31e33c..07bafd31e33c 100644
--- a/include/asm-sparc/starfire.h
+++ b/arch/sparc/include/asm/starfire.h
diff --git a/include/asm-sparc/stat.h b/arch/sparc/include/asm/stat.h
index 9fdcaf8c9cd3..d8153013df72 100644
--- a/include/asm-sparc/stat.h
+++ b/arch/sparc/include/asm/stat.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_STAT_H 1#ifndef ___ASM_SPARC_STAT_H
2#define ___ASM_SPARC_STAT_H 2#define ___ASM_SPARC_STAT_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/stat_64.h> 4#include <asm/stat_64.h>
5#else 5#else
6#include <asm-sparc/stat_32.h> 6#include <asm/stat_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/stat_32.h b/arch/sparc/include/asm/stat_32.h
index 2299e1d5d94c..2299e1d5d94c 100644
--- a/include/asm-sparc/stat_32.h
+++ b/arch/sparc/include/asm/stat_32.h
diff --git a/include/asm-sparc/stat_64.h b/arch/sparc/include/asm/stat_64.h
index 9650fdea847f..9650fdea847f 100644
--- a/include/asm-sparc/stat_64.h
+++ b/arch/sparc/include/asm/stat_64.h
diff --git a/include/asm-sparc/statfs.h b/arch/sparc/include/asm/statfs.h
index a70cc52e7018..5e937a73743d 100644
--- a/include/asm-sparc/statfs.h
+++ b/arch/sparc/include/asm/statfs.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_STATFS_H 1#ifndef ___ASM_SPARC_STATFS_H
2#define ___ASM_SPARC_STATFS_H 2#define ___ASM_SPARC_STATFS_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/statfs_64.h> 4#include <asm/statfs_64.h>
5#else 5#else
6#include <asm-sparc/statfs_32.h> 6#include <asm/statfs_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/statfs_32.h b/arch/sparc/include/asm/statfs_32.h
index 304520fa8863..304520fa8863 100644
--- a/include/asm-sparc/statfs_32.h
+++ b/arch/sparc/include/asm/statfs_32.h
diff --git a/include/asm-sparc/statfs_64.h b/arch/sparc/include/asm/statfs_64.h
index 79b3c890a5fa..79b3c890a5fa 100644
--- a/include/asm-sparc/statfs_64.h
+++ b/arch/sparc/include/asm/statfs_64.h
diff --git a/include/asm-sparc/string.h b/arch/sparc/include/asm/string.h
index 14c04c7697a5..98b72a0c8e6e 100644
--- a/include/asm-sparc/string.h
+++ b/arch/sparc/include/asm/string.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_STRING_H 1#ifndef ___ASM_SPARC_STRING_H
2#define ___ASM_SPARC_STRING_H 2#define ___ASM_SPARC_STRING_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/string_64.h> 4#include <asm/string_64.h>
5#else 5#else
6#include <asm-sparc/string_32.h> 6#include <asm/string_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/string_32.h b/arch/sparc/include/asm/string_32.h
index 6c5fddb7e6b5..6c5fddb7e6b5 100644
--- a/include/asm-sparc/string_32.h
+++ b/arch/sparc/include/asm/string_32.h
diff --git a/include/asm-sparc/string_64.h b/arch/sparc/include/asm/string_64.h
index 43161f2d17eb..43161f2d17eb 100644
--- a/include/asm-sparc/string_64.h
+++ b/arch/sparc/include/asm/string_64.h
diff --git a/include/asm-sparc/sun4paddr.h b/arch/sparc/include/asm/sun4paddr.h
index d52985f19f42..d52985f19f42 100644
--- a/include/asm-sparc/sun4paddr.h
+++ b/arch/sparc/include/asm/sun4paddr.h
diff --git a/include/asm-sparc/sun4prom.h b/arch/sparc/include/asm/sun4prom.h
index 9c8b4cbf629a..9c8b4cbf629a 100644
--- a/include/asm-sparc/sun4prom.h
+++ b/arch/sparc/include/asm/sun4prom.h
diff --git a/include/asm-sparc/sunbpp.h b/arch/sparc/include/asm/sunbpp.h
index 92ee1a8ff3a2..d81a02eaf78b 100644
--- a/include/asm-sparc/sunbpp.h
+++ b/arch/sparc/include/asm/sunbpp.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * include/asm-sparc/sunbpp.h 2 * include/asm/sunbpp.h
3 */ 3 */
4 4
5#ifndef _ASM_SPARC_SUNBPP_H 5#ifndef _ASM_SPARC_SUNBPP_H
diff --git a/include/asm-sparc/swift.h b/arch/sparc/include/asm/swift.h
index e535061bf755..e535061bf755 100644
--- a/include/asm-sparc/swift.h
+++ b/arch/sparc/include/asm/swift.h
diff --git a/arch/sparc/include/asm/syscall.h b/arch/sparc/include/asm/syscall.h
new file mode 100644
index 000000000000..7486c605e23c
--- /dev/null
+++ b/arch/sparc/include/asm/syscall.h
@@ -0,0 +1,120 @@
1#ifndef __ASM_SPARC_SYSCALL_H
2#define __ASM_SPARC_SYSCALL_H
3
4#include <linux/kernel.h>
5#include <linux/sched.h>
6#include <asm/ptrace.h>
7
8/* The system call number is given by the user in %g1 */
9static inline long syscall_get_nr(struct task_struct *task,
10 struct pt_regs *regs)
11{
12 int syscall_p = pt_regs_is_syscall(regs);
13
14 return (syscall_p ? regs->u_regs[UREG_G1] : -1L);
15}
16
17static inline void syscall_rollback(struct task_struct *task,
18 struct pt_regs *regs)
19{
20 /* XXX This needs some thought. On Sparc we don't
21 * XXX save away the original %o0 value somewhere.
22 * XXX Instead we hold it in register %l5 at the top
23 * XXX level trap frame and pass this down to the signal
24 * XXX dispatch code which is the only place that value
25 * XXX ever was needed.
26 */
27}
28
29#ifdef CONFIG_SPARC32
30static inline bool syscall_has_error(struct pt_regs *regs)
31{
32 return (regs->psr & PSR_C) ? true : false;
33}
34static inline void syscall_set_error(struct pt_regs *regs)
35{
36 regs->psr |= PSR_C;
37}
38static inline void syscall_clear_error(struct pt_regs *regs)
39{
40 regs->psr &= ~PSR_C;
41}
42#else
43static inline bool syscall_has_error(struct pt_regs *regs)
44{
45 return (regs->tstate & (TSTATE_XCARRY | TSTATE_ICARRY)) ? true : false;
46}
47static inline void syscall_set_error(struct pt_regs *regs)
48{
49 regs->tstate |= (TSTATE_XCARRY | TSTATE_ICARRY);
50}
51static inline void syscall_clear_error(struct pt_regs *regs)
52{
53 regs->tstate &= ~(TSTATE_XCARRY | TSTATE_ICARRY);
54}
55#endif
56
57static inline long syscall_get_error(struct task_struct *task,
58 struct pt_regs *regs)
59{
60 long val = regs->u_regs[UREG_I0];
61
62 return (syscall_has_error(regs) ? -val : 0);
63}
64
65static inline long syscall_get_return_value(struct task_struct *task,
66 struct pt_regs *regs)
67{
68 long val = regs->u_regs[UREG_I0];
69
70 return val;
71}
72
73static inline void syscall_set_return_value(struct task_struct *task,
74 struct pt_regs *regs,
75 int error, long val)
76{
77 if (error) {
78 syscall_set_error(regs);
79 regs->u_regs[UREG_I0] = -error;
80 } else {
81 syscall_clear_error(regs);
82 regs->u_regs[UREG_I0] = val;
83 }
84}
85
86static inline void syscall_get_arguments(struct task_struct *task,
87 struct pt_regs *regs,
88 unsigned int i, unsigned int n,
89 unsigned long *args)
90{
91 int zero_extend = 0;
92 unsigned int j;
93
94#ifdef CONFIG_SPARC64
95 if (test_tsk_thread_flag(task, TIF_32BIT))
96 zero_extend = 1;
97#endif
98
99 for (j = 0; j < n; j++) {
100 unsigned long val = regs->u_regs[UREG_I0 + i + j];
101
102 if (zero_extend)
103 args[j] = (u32) val;
104 else
105 args[j] = val;
106 }
107}
108
109static inline void syscall_set_arguments(struct task_struct *task,
110 struct pt_regs *regs,
111 unsigned int i, unsigned int n,
112 const unsigned long *args)
113{
114 unsigned int j;
115
116 for (j = 0; j < n; j++)
117 regs->u_regs[UREG_I0 + i + j] = args[j];
118}
119
120#endif /* __ASM_SPARC_SYSCALL_H */
diff --git a/include/asm-sparc/syscalls.h b/arch/sparc/include/asm/syscalls.h
index 45a43f637a14..45a43f637a14 100644
--- a/include/asm-sparc/syscalls.h
+++ b/arch/sparc/include/asm/syscalls.h
diff --git a/include/asm-sparc/sysen.h b/arch/sparc/include/asm/sysen.h
index 6af34abde6e7..6af34abde6e7 100644
--- a/include/asm-sparc/sysen.h
+++ b/arch/sparc/include/asm/sysen.h
diff --git a/include/asm-sparc/system.h b/arch/sparc/include/asm/system.h
index 15e2a3bc4f61..7944a7cfc996 100644
--- a/include/asm-sparc/system.h
+++ b/arch/sparc/include/asm/system.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_SYSTEM_H 1#ifndef ___ASM_SPARC_SYSTEM_H
2#define ___ASM_SPARC_SYSTEM_H 2#define ___ASM_SPARC_SYSTEM_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/system_64.h> 4#include <asm/system_64.h>
5#else 5#else
6#include <asm-sparc/system_32.h> 6#include <asm/system_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/system_32.h b/arch/sparc/include/asm/system_32.h
index b4b024445fc9..b4b024445fc9 100644
--- a/include/asm-sparc/system_32.h
+++ b/arch/sparc/include/asm/system_32.h
diff --git a/include/asm-sparc/system_64.h b/arch/sparc/include/asm/system_64.h
index db9e742a406a..db9e742a406a 100644
--- a/include/asm-sparc/system_64.h
+++ b/arch/sparc/include/asm/system_64.h
diff --git a/include/asm-sparc/termbits.h b/arch/sparc/include/asm/termbits.h
index d6ca3e2754f5..d6ca3e2754f5 100644
--- a/include/asm-sparc/termbits.h
+++ b/arch/sparc/include/asm/termbits.h
diff --git a/include/asm-sparc/termios.h b/arch/sparc/include/asm/termios.h
index e8ba95399643..e8ba95399643 100644
--- a/include/asm-sparc/termios.h
+++ b/arch/sparc/include/asm/termios.h
diff --git a/include/asm-sparc/thread_info.h b/arch/sparc/include/asm/thread_info.h
index 64155cf89f37..122d7acc07e6 100644
--- a/include/asm-sparc/thread_info.h
+++ b/arch/sparc/include/asm/thread_info.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_THREAD_INFO_H 1#ifndef ___ASM_SPARC_THREAD_INFO_H
2#define ___ASM_SPARC_THREAD_INFO_H 2#define ___ASM_SPARC_THREAD_INFO_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/thread_info_64.h> 4#include <asm/thread_info_64.h>
5#else 5#else
6#include <asm-sparc/thread_info_32.h> 6#include <asm/thread_info_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/thread_info_32.h b/arch/sparc/include/asm/thread_info_32.h
index 2cf9db044055..cbb892d0dff0 100644
--- a/include/asm-sparc/thread_info_32.h
+++ b/arch/sparc/include/asm/thread_info_32.h
@@ -130,7 +130,7 @@ BTFIXUPDEF_CALL(void, free_thread_info, struct thread_info *)
130 * thread information flag bit numbers 130 * thread information flag bit numbers
131 */ 131 */
132#define TIF_SYSCALL_TRACE 0 /* syscall trace active */ 132#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
133/* flag bit 1 is available */ 133#define TIF_NOTIFY_RESUME 1 /* callback before returning to user */
134#define TIF_SIGPENDING 2 /* signal pending */ 134#define TIF_SIGPENDING 2 /* signal pending */
135#define TIF_NEED_RESCHED 3 /* rescheduling necessary */ 135#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
136#define TIF_RESTORE_SIGMASK 4 /* restore signal mask in do_signal() */ 136#define TIF_RESTORE_SIGMASK 4 /* restore signal mask in do_signal() */
@@ -142,12 +142,17 @@ BTFIXUPDEF_CALL(void, free_thread_info, struct thread_info *)
142 142
143/* as above, but as bit values */ 143/* as above, but as bit values */
144#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) 144#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
145#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
145#define _TIF_SIGPENDING (1<<TIF_SIGPENDING) 146#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
146#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) 147#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
147#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) 148#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
148#define _TIF_USEDFPU (1<<TIF_USEDFPU) 149#define _TIF_USEDFPU (1<<TIF_USEDFPU)
149#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) 150#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
150 151
152#define _TIF_DO_NOTIFY_RESUME_MASK (_TIF_NOTIFY_RESUME | \
153 _TIF_SIGPENDING | \
154 _TIF_RESTORE_SIGMASK)
155
151#endif /* __KERNEL__ */ 156#endif /* __KERNEL__ */
152 157
153#endif /* _ASM_THREAD_INFO_H */ 158#endif /* _ASM_THREAD_INFO_H */
diff --git a/include/asm-sparc/thread_info_64.h b/arch/sparc/include/asm/thread_info_64.h
index 960969d5ad06..c0a737d7292c 100644
--- a/include/asm-sparc/thread_info_64.h
+++ b/arch/sparc/include/asm/thread_info_64.h
@@ -219,7 +219,7 @@ register struct thread_info *current_thread_info_reg asm("g6");
219 * nop 219 * nop
220 */ 220 */
221#define TIF_SYSCALL_TRACE 0 /* syscall trace active */ 221#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
222/* flags bit 1 is available */ 222#define TIF_NOTIFY_RESUME 1 /* callback before returning to user */
223#define TIF_SIGPENDING 2 /* signal pending */ 223#define TIF_SIGPENDING 2 /* signal pending */
224#define TIF_NEED_RESCHED 3 /* rescheduling necessary */ 224#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
225#define TIF_PERFCTR 4 /* performance counters active */ 225#define TIF_PERFCTR 4 /* performance counters active */
@@ -239,6 +239,7 @@ register struct thread_info *current_thread_info_reg asm("g6");
239#define TIF_POLLING_NRFLAG 14 239#define TIF_POLLING_NRFLAG 14
240 240
241#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) 241#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
242#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
242#define _TIF_SIGPENDING (1<<TIF_SIGPENDING) 243#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
243#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) 244#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
244#define _TIF_PERFCTR (1<<TIF_PERFCTR) 245#define _TIF_PERFCTR (1<<TIF_PERFCTR)
@@ -250,8 +251,9 @@ register struct thread_info *current_thread_info_reg asm("g6");
250#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) 251#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
251 252
252#define _TIF_USER_WORK_MASK ((0xff << TI_FLAG_WSAVED_SHIFT) | \ 253#define _TIF_USER_WORK_MASK ((0xff << TI_FLAG_WSAVED_SHIFT) | \
253 (_TIF_SIGPENDING | \ 254 _TIF_DO_NOTIFY_RESUME_MASK | \
254 _TIF_NEED_RESCHED | _TIF_PERFCTR)) 255 _TIF_NEED_RESCHED | _TIF_PERFCTR)
256#define _TIF_DO_NOTIFY_RESUME_MASK (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING)
255 257
256/* 258/*
257 * Thread-synchronous status. 259 * Thread-synchronous status.
diff --git a/include/asm-sparc/timer.h b/arch/sparc/include/asm/timer.h
index 475baa05a96e..612fd2779d9e 100644
--- a/include/asm-sparc/timer.h
+++ b/arch/sparc/include/asm/timer.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_TIMER_H 1#ifndef ___ASM_SPARC_TIMER_H
2#define ___ASM_SPARC_TIMER_H 2#define ___ASM_SPARC_TIMER_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/timer_64.h> 4#include <asm/timer_64.h>
5#else 5#else
6#include <asm-sparc/timer_32.h> 6#include <asm/timer_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/timer_32.h b/arch/sparc/include/asm/timer_32.h
index 361e53898dd7..361e53898dd7 100644
--- a/include/asm-sparc/timer_32.h
+++ b/arch/sparc/include/asm/timer_32.h
diff --git a/include/asm-sparc/timer_64.h b/arch/sparc/include/asm/timer_64.h
index 5b779fd1f788..5b779fd1f788 100644
--- a/include/asm-sparc/timer_64.h
+++ b/arch/sparc/include/asm/timer_64.h
diff --git a/include/asm-sparc/timex.h b/arch/sparc/include/asm/timex.h
index 01d9f199d452..70cc37b73827 100644
--- a/include/asm-sparc/timex.h
+++ b/arch/sparc/include/asm/timex.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_TIMEX_H 1#ifndef ___ASM_SPARC_TIMEX_H
2#define ___ASM_SPARC_TIMEX_H 2#define ___ASM_SPARC_TIMEX_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/timex_64.h> 4#include <asm/timex_64.h>
5#else 5#else
6#include <asm-sparc/timex_32.h> 6#include <asm/timex_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/timex_32.h b/arch/sparc/include/asm/timex_32.h
index 71b45c90ccae..b6ccdb0d6f7d 100644
--- a/include/asm-sparc/timex_32.h
+++ b/arch/sparc/include/asm/timex_32.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/include/asm-sparc/timex.h 2 * linux/include/asm/timex.h
3 * 3 *
4 * sparc architecture timex specifications 4 * sparc architecture timex specifications
5 */ 5 */
diff --git a/include/asm-sparc/timex_64.h b/arch/sparc/include/asm/timex_64.h
index c622535c4560..18b30bc9823b 100644
--- a/include/asm-sparc/timex_64.h
+++ b/arch/sparc/include/asm/timex_64.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/include/asm-sparc64/timex.h 2 * linux/include/asm/timex.h
3 * 3 *
4 * sparc64 architecture timex specifications 4 * sparc64 architecture timex specifications
5 */ 5 */
diff --git a/include/asm-sparc/tlb.h b/arch/sparc/include/asm/tlb.h
index a821057327c4..92d0393bbcdc 100644
--- a/include/asm-sparc/tlb.h
+++ b/arch/sparc/include/asm/tlb.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_TLB_H 1#ifndef ___ASM_SPARC_TLB_H
2#define ___ASM_SPARC_TLB_H 2#define ___ASM_SPARC_TLB_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/tlb_64.h> 4#include <asm/tlb_64.h>
5#else 5#else
6#include <asm-sparc/tlb_32.h> 6#include <asm/tlb_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/tlb_32.h b/arch/sparc/include/asm/tlb_32.h
index 6d02d1ce53f3..6d02d1ce53f3 100644
--- a/include/asm-sparc/tlb_32.h
+++ b/arch/sparc/include/asm/tlb_32.h
diff --git a/include/asm-sparc/tlb_64.h b/arch/sparc/include/asm/tlb_64.h
index ec81cdedef2c..ec81cdedef2c 100644
--- a/include/asm-sparc/tlb_64.h
+++ b/arch/sparc/include/asm/tlb_64.h
diff --git a/include/asm-sparc/tlbflush.h b/arch/sparc/include/asm/tlbflush.h
index 6e6bc12227b8..2c9629fad1e2 100644
--- a/include/asm-sparc/tlbflush.h
+++ b/arch/sparc/include/asm/tlbflush.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_TLBFLUSH_H 1#ifndef ___ASM_SPARC_TLBFLUSH_H
2#define ___ASM_SPARC_TLBFLUSH_H 2#define ___ASM_SPARC_TLBFLUSH_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/tlbflush_64.h> 4#include <asm/tlbflush_64.h>
5#else 5#else
6#include <asm-sparc/tlbflush_32.h> 6#include <asm/tlbflush_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/tlbflush_32.h b/arch/sparc/include/asm/tlbflush_32.h
index fe0a71abc9bb..fe0a71abc9bb 100644
--- a/include/asm-sparc/tlbflush_32.h
+++ b/arch/sparc/include/asm/tlbflush_32.h
diff --git a/include/asm-sparc/tlbflush_64.h b/arch/sparc/include/asm/tlbflush_64.h
index fbb675dbe0c9..fbb675dbe0c9 100644
--- a/include/asm-sparc/tlbflush_64.h
+++ b/arch/sparc/include/asm/tlbflush_64.h
diff --git a/include/asm-sparc/topology.h b/arch/sparc/include/asm/topology.h
index ed13630f32e2..ee4f191d394a 100644
--- a/include/asm-sparc/topology.h
+++ b/arch/sparc/include/asm/topology.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_TOPOLOGY_H 1#ifndef ___ASM_SPARC_TOPOLOGY_H
2#define ___ASM_SPARC_TOPOLOGY_H 2#define ___ASM_SPARC_TOPOLOGY_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/topology_64.h> 4#include <asm/topology_64.h>
5#else 5#else
6#include <asm-sparc/topology_32.h> 6#include <asm/topology_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/topology_32.h b/arch/sparc/include/asm/topology_32.h
index ee5ac9c9da28..ee5ac9c9da28 100644
--- a/include/asm-sparc/topology_32.h
+++ b/arch/sparc/include/asm/topology_32.h
diff --git a/include/asm-sparc/topology_64.h b/arch/sparc/include/asm/topology_64.h
index 001c04027c82..001c04027c82 100644
--- a/include/asm-sparc/topology_64.h
+++ b/arch/sparc/include/asm/topology_64.h
diff --git a/include/asm-sparc/traps.h b/arch/sparc/include/asm/traps.h
index bebdbf8f43a8..bebdbf8f43a8 100644
--- a/include/asm-sparc/traps.h
+++ b/arch/sparc/include/asm/traps.h
diff --git a/include/asm-sparc/tsb.h b/arch/sparc/include/asm/tsb.h
index 76e4299dd9bc..76e4299dd9bc 100644
--- a/include/asm-sparc/tsb.h
+++ b/arch/sparc/include/asm/tsb.h
diff --git a/include/asm-sparc/tsunami.h b/arch/sparc/include/asm/tsunami.h
index 5bbd1d523baa..5bbd1d523baa 100644
--- a/include/asm-sparc/tsunami.h
+++ b/arch/sparc/include/asm/tsunami.h
diff --git a/include/asm-sparc/ttable.h b/arch/sparc/include/asm/ttable.h
index 5708ba2719fb..5708ba2719fb 100644
--- a/include/asm-sparc/ttable.h
+++ b/arch/sparc/include/asm/ttable.h
diff --git a/include/asm-sparc/turbosparc.h b/arch/sparc/include/asm/turbosparc.h
index 17c73282db0a..17c73282db0a 100644
--- a/include/asm-sparc/turbosparc.h
+++ b/arch/sparc/include/asm/turbosparc.h
diff --git a/include/asm-sparc/types.h b/arch/sparc/include/asm/types.h
index 8c28fde5eaa2..8c28fde5eaa2 100644
--- a/include/asm-sparc/types.h
+++ b/arch/sparc/include/asm/types.h
diff --git a/include/asm-sparc/uaccess.h b/arch/sparc/include/asm/uaccess.h
index 424facce5238..e88fbe5c0457 100644
--- a/include/asm-sparc/uaccess.h
+++ b/arch/sparc/include/asm/uaccess.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_UACCESS_H 1#ifndef ___ASM_SPARC_UACCESS_H
2#define ___ASM_SPARC_UACCESS_H 2#define ___ASM_SPARC_UACCESS_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/uaccess_64.h> 4#include <asm/uaccess_64.h>
5#else 5#else
6#include <asm-sparc/uaccess_32.h> 6#include <asm/uaccess_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/uaccess_32.h b/arch/sparc/include/asm/uaccess_32.h
index 47d5619d43fa..47d5619d43fa 100644
--- a/include/asm-sparc/uaccess_32.h
+++ b/arch/sparc/include/asm/uaccess_32.h
diff --git a/include/asm-sparc/uaccess_64.h b/arch/sparc/include/asm/uaccess_64.h
index 296ef30e05c8..296ef30e05c8 100644
--- a/include/asm-sparc/uaccess_64.h
+++ b/arch/sparc/include/asm/uaccess_64.h
diff --git a/include/asm-sparc/uctx.h b/arch/sparc/include/asm/uctx.h
index dc937c75ffdd..dc937c75ffdd 100644
--- a/include/asm-sparc/uctx.h
+++ b/arch/sparc/include/asm/uctx.h
diff --git a/include/asm-sparc/unaligned.h b/arch/sparc/include/asm/unaligned.h
index 11d2d5fb5902..11d2d5fb5902 100644
--- a/include/asm-sparc/unaligned.h
+++ b/arch/sparc/include/asm/unaligned.h
diff --git a/include/asm-sparc/unistd.h b/arch/sparc/include/asm/unistd.h
index 3c2609618a09..4207fb362da0 100644
--- a/include/asm-sparc/unistd.h
+++ b/arch/sparc/include/asm/unistd.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_UNISTD_H 1#ifndef ___ASM_SPARC_UNISTD_H
2#define ___ASM_SPARC_UNISTD_H 2#define ___ASM_SPARC_UNISTD_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/unistd_64.h> 4#include <asm/unistd_64.h>
5#else 5#else
6#include <asm-sparc/unistd_32.h> 6#include <asm/unistd_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/unistd_32.h b/arch/sparc/include/asm/unistd_32.h
index 648643a9f139..648643a9f139 100644
--- a/include/asm-sparc/unistd_32.h
+++ b/arch/sparc/include/asm/unistd_32.h
diff --git a/include/asm-sparc/unistd_64.h b/arch/sparc/include/asm/unistd_64.h
index c5cc0e052321..c5cc0e052321 100644
--- a/include/asm-sparc/unistd_64.h
+++ b/arch/sparc/include/asm/unistd_64.h
diff --git a/include/asm-sparc/upa.h b/arch/sparc/include/asm/upa.h
index 5b1633223f92..5b1633223f92 100644
--- a/include/asm-sparc/upa.h
+++ b/arch/sparc/include/asm/upa.h
diff --git a/include/asm-sparc/user.h b/arch/sparc/include/asm/user.h
index 3400ea87f148..3400ea87f148 100644
--- a/include/asm-sparc/user.h
+++ b/arch/sparc/include/asm/user.h
diff --git a/include/asm-sparc/utrap.h b/arch/sparc/include/asm/utrap.h
index 9da37babbe5b..b10e527c22d9 100644
--- a/include/asm-sparc/utrap.h
+++ b/arch/sparc/include/asm/utrap.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * include/asm-sparc64/utrap.h 2 * include/asm/utrap.h
3 * 3 *
4 * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 4 * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
5 */ 5 */
diff --git a/include/asm-sparc/vac-ops.h b/arch/sparc/include/asm/vac-ops.h
index d10527611f11..d10527611f11 100644
--- a/include/asm-sparc/vac-ops.h
+++ b/arch/sparc/include/asm/vac-ops.h
diff --git a/include/asm-sparc/vaddrs.h b/arch/sparc/include/asm/vaddrs.h
index a22fed5a3c6b..541e13755cec 100644
--- a/include/asm-sparc/vaddrs.h
+++ b/arch/sparc/include/asm/vaddrs.h
@@ -4,7 +4,7 @@
4#include <asm/head.h> 4#include <asm/head.h>
5 5
6/* 6/*
7 * asm-sparc/vaddrs.h: Here we define the virtual addresses at 7 * asm/vaddrs.h: Here we define the virtual addresses at
8 * which important things will be mapped. 8 * which important things will be mapped.
9 * 9 *
10 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 10 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc/vfc_ioctls.h b/arch/sparc/include/asm/vfc_ioctls.h
index af8b69007b22..af8b69007b22 100644
--- a/include/asm-sparc/vfc_ioctls.h
+++ b/arch/sparc/include/asm/vfc_ioctls.h
diff --git a/include/asm-sparc/vga.h b/arch/sparc/include/asm/vga.h
index c69d5b2ba19a..c69d5b2ba19a 100644
--- a/include/asm-sparc/vga.h
+++ b/arch/sparc/include/asm/vga.h
diff --git a/include/asm-sparc/viking.h b/arch/sparc/include/asm/viking.h
index 989930aeb093..989930aeb093 100644
--- a/include/asm-sparc/viking.h
+++ b/arch/sparc/include/asm/viking.h
diff --git a/include/asm-sparc/vio.h b/arch/sparc/include/asm/vio.h
index d4de32f0f8af..d4de32f0f8af 100644
--- a/include/asm-sparc/vio.h
+++ b/arch/sparc/include/asm/vio.h
diff --git a/include/asm-sparc/visasm.h b/arch/sparc/include/asm/visasm.h
index de797b9bf552..de797b9bf552 100644
--- a/include/asm-sparc/visasm.h
+++ b/arch/sparc/include/asm/visasm.h
diff --git a/include/asm-sparc/watchdog.h b/arch/sparc/include/asm/watchdog.h
index 5baf2d3919cf..5baf2d3919cf 100644
--- a/include/asm-sparc/watchdog.h
+++ b/arch/sparc/include/asm/watchdog.h
diff --git a/include/asm-sparc/winmacro.h b/arch/sparc/include/asm/winmacro.h
index 5b0a06dc3bcb..5b0a06dc3bcb 100644
--- a/include/asm-sparc/winmacro.h
+++ b/arch/sparc/include/asm/winmacro.h
diff --git a/include/asm-sparc/xor.h b/arch/sparc/include/asm/xor.h
index 35089a838c3f..8ed591c7db2d 100644
--- a/include/asm-sparc/xor.h
+++ b/arch/sparc/include/asm/xor.h
@@ -1,8 +1,8 @@
1#ifndef ___ASM_SPARC_XOR_H 1#ifndef ___ASM_SPARC_XOR_H
2#define ___ASM_SPARC_XOR_H 2#define ___ASM_SPARC_XOR_H
3#if defined(__sparc__) && defined(__arch64__) 3#if defined(__sparc__) && defined(__arch64__)
4#include <asm-sparc/xor_64.h> 4#include <asm/xor_64.h>
5#else 5#else
6#include <asm-sparc/xor_32.h> 6#include <asm/xor_32.h>
7#endif 7#endif
8#endif 8#endif
diff --git a/include/asm-sparc/xor_32.h b/arch/sparc/include/asm/xor_32.h
index f34b2cfa8206..44bfa0787f3f 100644
--- a/include/asm-sparc/xor_32.h
+++ b/arch/sparc/include/asm/xor_32.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * include/asm-sparc/xor.h 2 * include/asm/xor.h
3 * 3 *
4 * Optimized RAID-5 checksumming functions for 32-bit Sparc. 4 * Optimized RAID-5 checksumming functions for 32-bit Sparc.
5 * 5 *
diff --git a/include/asm-sparc/xor_64.h b/arch/sparc/include/asm/xor_64.h
index a0233884fc94..bee4bf4be3af 100644
--- a/include/asm-sparc/xor_64.h
+++ b/arch/sparc/include/asm/xor_64.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * include/asm-sparc64/xor.h 2 * include/asm/xor.h
3 * 3 *
4 * High speed xor_block operation for RAID4/5 utilizing the 4 * High speed xor_block operation for RAID4/5 utilizing the
5 * UltraSparc Visual Instruction Set and Niagara block-init 5 * UltraSparc Visual Instruction Set and Niagara block-init
diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S
index 2f96256dc515..e8cdf715a546 100644
--- a/arch/sparc/kernel/entry.S
+++ b/arch/sparc/kernel/entry.S
@@ -1196,8 +1196,9 @@ sys_rt_sigreturn:
1196 be 1f 1196 be 1f
1197 nop 1197 nop
1198 1198
1199 add %sp, STACKFRAME_SZ, %o0
1199 call syscall_trace 1200 call syscall_trace
1200 nop 1201 mov 1, %o1
1201 1202
12021: 12031:
1203 /* We are returning to a signal handler. */ 1204 /* We are returning to a signal handler. */
@@ -1287,8 +1288,12 @@ linux_fast_syscall:
1287 mov %i3, %o3 1288 mov %i3, %o3
1288 1289
1289linux_syscall_trace: 1290linux_syscall_trace:
1291 add %sp, STACKFRAME_SZ, %o0
1290 call syscall_trace 1292 call syscall_trace
1291 nop 1293 mov 0, %o1
1294 cmp %o0, 0
1295 bne 3f
1296 mov -ENOSYS, %o0
1292 mov %i0, %o0 1297 mov %i0, %o0
1293 mov %i1, %o1 1298 mov %i1, %o1
1294 mov %i2, %o2 1299 mov %i2, %o2
@@ -1337,6 +1342,7 @@ syscall_is_too_hard:
1337 call %l7 1342 call %l7
1338 mov %i5, %o5 1343 mov %i5, %o5
1339 1344
13453:
1340 st %o0, [%sp + STACKFRAME_SZ + PT_I0] 1346 st %o0, [%sp + STACKFRAME_SZ + PT_I0]
1341 1347
1342ret_sys_call: 1348ret_sys_call:
@@ -1374,6 +1380,8 @@ ret_sys_call:
1374 st %l2, [%sp + STACKFRAME_SZ + PT_NPC] 1380 st %l2, [%sp + STACKFRAME_SZ + PT_NPC]
1375 1381
1376linux_syscall_trace2: 1382linux_syscall_trace2:
1383 add %sp, STACKFRAME_SZ, %o0
1384 mov 1, %o1
1377 call syscall_trace 1385 call syscall_trace
1378 add %l1, 0x4, %l2 /* npc = npc+4 */ 1386 add %l1, 0x4, %l2 /* npc = npc+4 */
1379 st %l1, [%sp + STACKFRAME_SZ + PT_PC] 1387 st %l1, [%sp + STACKFRAME_SZ + PT_PC]
diff --git a/arch/sparc/kernel/ptrace.c b/arch/sparc/kernel/ptrace.c
index 81f3b929743f..20699c701412 100644
--- a/arch/sparc/kernel/ptrace.c
+++ b/arch/sparc/kernel/ptrace.c
@@ -21,6 +21,7 @@
21#include <linux/signal.h> 21#include <linux/signal.h>
22#include <linux/regset.h> 22#include <linux/regset.h>
23#include <linux/elf.h> 23#include <linux/elf.h>
24#include <linux/tracehook.h>
24 25
25#include <asm/pgtable.h> 26#include <asm/pgtable.h>
26#include <asm/system.h> 27#include <asm/system.h>
@@ -450,21 +451,16 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
450 return ret; 451 return ret;
451} 452}
452 453
453asmlinkage void syscall_trace(void) 454asmlinkage int syscall_trace(struct pt_regs *regs, int syscall_exit_p)
454{ 455{
455 if (!test_thread_flag(TIF_SYSCALL_TRACE)) 456 int ret = 0;
456 return; 457
457 if (!(current->ptrace & PT_PTRACED)) 458 if (test_thread_flag(TIF_SYSCALL_TRACE)) {
458 return; 459 if (syscall_exit_p)
459 ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) 460 tracehook_report_syscall_exit(regs, 0);
460 ? 0x80 : 0)); 461 else
461 /* 462 ret = tracehook_report_syscall_entry(regs);
462 * this isn't the same as continuing with a signal, but it will do
463 * for normal use. strace only continues with a signal if the
464 * stopping signal is not SIGTRAP. -brl
465 */
466 if (current->exit_code) {
467 send_sig (current->exit_code, current, 1);
468 current->exit_code = 0;
469 } 463 }
464
465 return ret;
470} 466}
diff --git a/arch/sparc/kernel/rtrap.S b/arch/sparc/kernel/rtrap.S
index 891f460b7b96..4da2e1f66290 100644
--- a/arch/sparc/kernel/rtrap.S
+++ b/arch/sparc/kernel/rtrap.S
@@ -69,12 +69,13 @@ ret_trap_lockless_ipi:
69 69
70 ld [%curptr + TI_FLAGS], %g2 70 ld [%curptr + TI_FLAGS], %g2
71signal_p: 71signal_p:
72 andcc %g2, (_TIF_SIGPENDING|_TIF_RESTORE_SIGMASK), %g0 72 andcc %g2, _TIF_DO_NOTIFY_RESUME_MASK, %g0
73 bz,a ret_trap_continue 73 bz,a ret_trap_continue
74 ld [%sp + STACKFRAME_SZ + PT_PSR], %t_psr 74 ld [%sp + STACKFRAME_SZ + PT_PSR], %t_psr
75 75
76 mov %g2, %o2
76 mov %l5, %o1 77 mov %l5, %o1
77 call do_signal 78 call do_notify_resume
78 add %sp, STACKFRAME_SZ, %o0 ! pt_regs ptr 79 add %sp, STACKFRAME_SZ, %o0 ! pt_regs ptr
79 80
80 /* Fall through. */ 81 /* Fall through. */
diff --git a/arch/sparc/kernel/signal.c b/arch/sparc/kernel/signal.c
index 3fd1df9f9ba7..c94f91c8b6e0 100644
--- a/arch/sparc/kernel/signal.c
+++ b/arch/sparc/kernel/signal.c
@@ -18,6 +18,7 @@
18#include <linux/smp.h> 18#include <linux/smp.h>
19#include <linux/binfmts.h> /* do_coredum */ 19#include <linux/binfmts.h> /* do_coredum */
20#include <linux/bitops.h> 20#include <linux/bitops.h>
21#include <linux/tracehook.h>
21 22
22#include <asm/uaccess.h> 23#include <asm/uaccess.h>
23#include <asm/ptrace.h> 24#include <asm/ptrace.h>
@@ -513,7 +514,7 @@ static inline void syscall_restart(unsigned long orig_i0, struct pt_regs *regs,
513 * want to handle. Thus you cannot kill init even with a SIGKILL even by 514 * want to handle. Thus you cannot kill init even with a SIGKILL even by
514 * mistake. 515 * mistake.
515 */ 516 */
516asmlinkage void do_signal(struct pt_regs * regs, unsigned long orig_i0) 517static void do_signal(struct pt_regs *regs, unsigned long orig_i0)
517{ 518{
518 struct k_sigaction ka; 519 struct k_sigaction ka;
519 int restart_syscall; 520 int restart_syscall;
@@ -552,6 +553,8 @@ asmlinkage void do_signal(struct pt_regs * regs, unsigned long orig_i0)
552 */ 553 */
553 if (test_thread_flag(TIF_RESTORE_SIGMASK)) 554 if (test_thread_flag(TIF_RESTORE_SIGMASK))
554 clear_thread_flag(TIF_RESTORE_SIGMASK); 555 clear_thread_flag(TIF_RESTORE_SIGMASK);
556
557 tracehook_signal_handler(signr, &info, &ka, regs, 0);
555 return; 558 return;
556 } 559 }
557 if (restart_syscall && 560 if (restart_syscall &&
@@ -579,6 +582,17 @@ asmlinkage void do_signal(struct pt_regs * regs, unsigned long orig_i0)
579 } 582 }
580} 583}
581 584
585void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0,
586 unsigned long thread_info_flags)
587{
588 if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK))
589 do_signal(regs, orig_i0);
590 if (thread_info_flags & _TIF_NOTIFY_RESUME) {
591 clear_thread_flag(TIF_NOTIFY_RESUME);
592 tracehook_notify_resume(regs);
593 }
594}
595
582asmlinkage int 596asmlinkage int
583do_sys_sigstack(struct sigstack __user *ssptr, struct sigstack __user *ossptr, 597do_sys_sigstack(struct sigstack __user *ssptr, struct sigstack __user *ossptr,
584 unsigned long sp) 598 unsigned long sp)
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig
index 7c88263256af..923a98959fa7 100644
--- a/arch/sparc64/Kconfig
+++ b/arch/sparc64/Kconfig
@@ -17,6 +17,7 @@ config SPARC64
17 select HAVE_LMB 17 select HAVE_LMB
18 select HAVE_ARCH_KGDB 18 select HAVE_ARCH_KGDB
19 select USE_GENERIC_SMP_HELPERS if SMP 19 select USE_GENERIC_SMP_HELPERS if SMP
20 select HAVE_ARCH_TRACEHOOK
20 21
21config GENERIC_TIME 22config GENERIC_TIME
22 bool 23 bool
diff --git a/arch/sparc64/kernel/compat_audit.c b/arch/sparc64/kernel/compat_audit.c
index c1979482aa92..c831b0a4e660 100644
--- a/arch/sparc64/kernel/compat_audit.c
+++ b/arch/sparc64/kernel/compat_audit.c
@@ -1,4 +1,4 @@
1#include <asm-sparc/unistd.h> 1#include <asm/unistd_32.h>
2 2
3unsigned sparc32_dir_class[] = { 3unsigned sparc32_dir_class[] = {
4#include <asm-generic/audit_dir_write.h> 4#include <asm-generic/audit_dir_write.h>
diff --git a/arch/sparc64/kernel/entry.h b/arch/sparc64/kernel/entry.h
index 32fbab620852..fc294a292899 100644
--- a/arch/sparc64/kernel/entry.h
+++ b/arch/sparc64/kernel/entry.h
@@ -22,8 +22,7 @@ extern void do_notify_resume(struct pt_regs *regs,
22 unsigned long orig_i0, 22 unsigned long orig_i0,
23 unsigned long thread_info_flags); 23 unsigned long thread_info_flags);
24 24
25extern asmlinkage void syscall_trace(struct pt_regs *regs, 25extern asmlinkage int syscall_trace(struct pt_regs *regs, int syscall_exit_p);
26 int syscall_exit_p);
27 26
28extern void bad_trap_tl1(struct pt_regs *regs, long lvl); 27extern void bad_trap_tl1(struct pt_regs *regs, long lvl);
29 28
diff --git a/arch/sparc64/kernel/ptrace.c b/arch/sparc64/kernel/ptrace.c
index f6c9fc92921d..bd578cc4856d 100644
--- a/arch/sparc64/kernel/ptrace.c
+++ b/arch/sparc64/kernel/ptrace.c
@@ -23,6 +23,7 @@
23#include <linux/audit.h> 23#include <linux/audit.h>
24#include <linux/signal.h> 24#include <linux/signal.h>
25#include <linux/regset.h> 25#include <linux/regset.h>
26#include <linux/tracehook.h>
26#include <linux/compat.h> 27#include <linux/compat.h>
27#include <linux/elf.h> 28#include <linux/elf.h>
28 29
@@ -1049,8 +1050,10 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
1049 return ret; 1050 return ret;
1050} 1051}
1051 1052
1052asmlinkage void syscall_trace(struct pt_regs *regs, int syscall_exit_p) 1053asmlinkage int syscall_trace(struct pt_regs *regs, int syscall_exit_p)
1053{ 1054{
1055 int ret = 0;
1056
1054 /* do the secure computing check first */ 1057 /* do the secure computing check first */
1055 secure_computing(regs->u_regs[UREG_G1]); 1058 secure_computing(regs->u_regs[UREG_G1]);
1056 1059
@@ -1064,27 +1067,14 @@ asmlinkage void syscall_trace(struct pt_regs *regs, int syscall_exit_p)
1064 audit_syscall_exit(result, regs->u_regs[UREG_I0]); 1067 audit_syscall_exit(result, regs->u_regs[UREG_I0]);
1065 } 1068 }
1066 1069
1067 if (!(current->ptrace & PT_PTRACED)) 1070 if (test_thread_flag(TIF_SYSCALL_TRACE)) {
1068 goto out; 1071 if (syscall_exit_p)
1069 1072 tracehook_report_syscall_exit(regs, 0);
1070 if (!test_thread_flag(TIF_SYSCALL_TRACE)) 1073 else
1071 goto out; 1074 ret = tracehook_report_syscall_entry(regs);
1072
1073 ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
1074 ? 0x80 : 0));
1075
1076 /*
1077 * this isn't the same as continuing with a signal, but it will do
1078 * for normal use. strace only continues with a signal if the
1079 * stopping signal is not SIGTRAP. -brl
1080 */
1081 if (current->exit_code) {
1082 send_sig(current->exit_code, current, 1);
1083 current->exit_code = 0;
1084 } 1075 }
1085 1076
1086out: 1077 if (unlikely(current->audit_context) && !syscall_exit_p && !ret)
1087 if (unlikely(current->audit_context) && !syscall_exit_p)
1088 audit_syscall_entry((test_thread_flag(TIF_32BIT) ? 1078 audit_syscall_entry((test_thread_flag(TIF_32BIT) ?
1089 AUDIT_ARCH_SPARC : 1079 AUDIT_ARCH_SPARC :
1090 AUDIT_ARCH_SPARC64), 1080 AUDIT_ARCH_SPARC64),
@@ -1093,4 +1083,6 @@ out:
1093 regs->u_regs[UREG_I1], 1083 regs->u_regs[UREG_I1],
1094 regs->u_regs[UREG_I2], 1084 regs->u_regs[UREG_I2],
1095 regs->u_regs[UREG_I3]); 1085 regs->u_regs[UREG_I3]);
1086
1087 return ret;
1096} 1088}
diff --git a/arch/sparc64/kernel/rtrap.S b/arch/sparc64/kernel/rtrap.S
index c6fc695fe1fe..97a993c1f7f3 100644
--- a/arch/sparc64/kernel/rtrap.S
+++ b/arch/sparc64/kernel/rtrap.S
@@ -46,7 +46,7 @@ __handle_user_windows:
46 wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate 46 wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate
47 ldx [%g6 + TI_FLAGS], %l0 47 ldx [%g6 + TI_FLAGS], %l0
48 48
491: andcc %l0, _TIF_SIGPENDING, %g0 491: andcc %l0, _TIF_DO_NOTIFY_RESUME_MASK, %g0
50 be,pt %xcc, __handle_user_windows_continue 50 be,pt %xcc, __handle_user_windows_continue
51 nop 51 nop
52 mov %l5, %o1 52 mov %l5, %o1
@@ -86,7 +86,7 @@ __handle_perfctrs:
86 wrpr %g0, RTRAP_PSTATE, %pstate 86 wrpr %g0, RTRAP_PSTATE, %pstate
87 wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate 87 wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate
88 ldx [%g6 + TI_FLAGS], %l0 88 ldx [%g6 + TI_FLAGS], %l0
891: andcc %l0, _TIF_SIGPENDING, %g0 891: andcc %l0, _TIF_DO_NOTIFY_RESUME_MASK, %g0
90 90
91 be,pt %xcc, __handle_perfctrs_continue 91 be,pt %xcc, __handle_perfctrs_continue
92 sethi %hi(TSTATE_PEF), %o0 92 sethi %hi(TSTATE_PEF), %o0
@@ -195,7 +195,7 @@ __handle_preemption_continue:
195 andcc %l1, %o0, %g0 195 andcc %l1, %o0, %g0
196 andcc %l0, _TIF_NEED_RESCHED, %g0 196 andcc %l0, _TIF_NEED_RESCHED, %g0
197 bne,pn %xcc, __handle_preemption 197 bne,pn %xcc, __handle_preemption
198 andcc %l0, _TIF_SIGPENDING, %g0 198 andcc %l0, _TIF_DO_NOTIFY_RESUME_MASK, %g0
199 bne,pn %xcc, __handle_signal 199 bne,pn %xcc, __handle_signal
200__handle_signal_continue: 200__handle_signal_continue:
201 ldub [%g6 + TI_WSAVED], %o2 201 ldub [%g6 + TI_WSAVED], %o2
diff --git a/arch/sparc64/kernel/signal.c b/arch/sparc64/kernel/signal.c
index 9667e96fd513..d1b84456a9ee 100644
--- a/arch/sparc64/kernel/signal.c
+++ b/arch/sparc64/kernel/signal.c
@@ -17,11 +17,13 @@
17#include <linux/errno.h> 17#include <linux/errno.h>
18#include <linux/wait.h> 18#include <linux/wait.h>
19#include <linux/ptrace.h> 19#include <linux/ptrace.h>
20#include <linux/tracehook.h>
20#include <linux/unistd.h> 21#include <linux/unistd.h>
21#include <linux/mm.h> 22#include <linux/mm.h>
22#include <linux/tty.h> 23#include <linux/tty.h>
23#include <linux/binfmts.h> 24#include <linux/binfmts.h>
24#include <linux/bitops.h> 25#include <linux/bitops.h>
26#include <linux/tracehook.h>
25 27
26#include <asm/uaccess.h> 28#include <asm/uaccess.h>
27#include <asm/ptrace.h> 29#include <asm/ptrace.h>
@@ -574,6 +576,8 @@ static void do_signal(struct pt_regs *regs, unsigned long orig_i0)
574 * clear the TS_RESTORE_SIGMASK flag. 576 * clear the TS_RESTORE_SIGMASK flag.
575 */ 577 */
576 current_thread_info()->status &= ~TS_RESTORE_SIGMASK; 578 current_thread_info()->status &= ~TS_RESTORE_SIGMASK;
579
580 tracehook_signal_handler(signr, &info, &ka, regs, 0);
577 return; 581 return;
578 } 582 }
579 if (restart_syscall && 583 if (restart_syscall &&
@@ -605,4 +609,8 @@ void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0, unsigned long
605{ 609{
606 if (thread_info_flags & _TIF_SIGPENDING) 610 if (thread_info_flags & _TIF_SIGPENDING)
607 do_signal(regs, orig_i0); 611 do_signal(regs, orig_i0);
612 if (thread_info_flags & _TIF_NOTIFY_RESUME) {
613 clear_thread_flag(TIF_NOTIFY_RESUME);
614 tracehook_notify_resume(regs);
615 }
608} 616}
diff --git a/arch/sparc64/kernel/signal32.c b/arch/sparc64/kernel/signal32.c
index 97cdd1bf4a10..ba5b09ad6666 100644
--- a/arch/sparc64/kernel/signal32.c
+++ b/arch/sparc64/kernel/signal32.c
@@ -19,6 +19,7 @@
19#include <linux/binfmts.h> 19#include <linux/binfmts.h>
20#include <linux/compat.h> 20#include <linux/compat.h>
21#include <linux/bitops.h> 21#include <linux/bitops.h>
22#include <linux/tracehook.h>
22 23
23#include <asm/uaccess.h> 24#include <asm/uaccess.h>
24#include <asm/ptrace.h> 25#include <asm/ptrace.h>
@@ -794,6 +795,8 @@ void do_signal32(sigset_t *oldset, struct pt_regs * regs,
794 * clear the TS_RESTORE_SIGMASK flag. 795 * clear the TS_RESTORE_SIGMASK flag.
795 */ 796 */
796 current_thread_info()->status &= ~TS_RESTORE_SIGMASK; 797 current_thread_info()->status &= ~TS_RESTORE_SIGMASK;
798
799 tracehook_signal_handler(signr, &info, &ka, regs, 0);
797 return; 800 return;
798 } 801 }
799 if (restart_syscall && 802 if (restart_syscall &&
diff --git a/arch/sparc64/kernel/syscalls.S b/arch/sparc64/kernel/syscalls.S
index db19ed67acf6..a2f24270ed8a 100644
--- a/arch/sparc64/kernel/syscalls.S
+++ b/arch/sparc64/kernel/syscalls.S
@@ -162,6 +162,8 @@ linux_syscall_trace32:
162 add %sp, PTREGS_OFF, %o0 162 add %sp, PTREGS_OFF, %o0
163 call syscall_trace 163 call syscall_trace
164 clr %o1 164 clr %o1
165 brnz,pn %o0, 3f
166 mov -ENOSYS, %o0
165 srl %i0, 0, %o0 167 srl %i0, 0, %o0
166 srl %i4, 0, %o4 168 srl %i4, 0, %o4
167 srl %i1, 0, %o1 169 srl %i1, 0, %o1
@@ -173,6 +175,8 @@ linux_syscall_trace:
173 add %sp, PTREGS_OFF, %o0 175 add %sp, PTREGS_OFF, %o0
174 call syscall_trace 176 call syscall_trace
175 clr %o1 177 clr %o1
178 brnz,pn %o0, 3f
179 mov -ENOSYS, %o0
176 mov %i0, %o0 180 mov %i0, %o0
177 mov %i1, %o1 181 mov %i1, %o1
178 mov %i2, %o2 182 mov %i2, %o2
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index b7f2963693a7..283c08f5f4d4 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -1332,9 +1332,15 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr)
1332 if (!pr->flags.power_setup_done) 1332 if (!pr->flags.power_setup_done)
1333 return -ENODEV; 1333 return -ENODEV;
1334 1334
1335 /* Fall back to the default idle loop */ 1335 /*
1336 pm_idle = pm_idle_save; 1336 * Fall back to the default idle loop, when pm_idle_save had
1337 synchronize_sched(); /* Relies on interrupts forcing exit from idle. */ 1337 * been initialized.
1338 */
1339 if (pm_idle_save) {
1340 pm_idle = pm_idle_save;
1341 /* Relies on interrupts forcing exit from idle. */
1342 synchronize_sched();
1343 }
1338 1344
1339 pr->flags.power = 0; 1345 pr->flags.power = 0;
1340 result = acpi_processor_get_power_info(pr); 1346 result = acpi_processor_get_power_info(pr);
@@ -1896,7 +1902,8 @@ int acpi_processor_power_exit(struct acpi_processor *pr,
1896 1902
1897 /* Unregister the idle handler when processor #0 is removed. */ 1903 /* Unregister the idle handler when processor #0 is removed. */
1898 if (pr->id == 0) { 1904 if (pr->id == 0) {
1899 pm_idle = pm_idle_save; 1905 if (pm_idle_save)
1906 pm_idle = pm_idle_save;
1900 1907
1901 /* 1908 /*
1902 * We are about to unload the current idle thread pm callback 1909 * We are about to unload the current idle thread pm callback
diff --git a/drivers/base/memory.c b/drivers/base/memory.c
index 3ad49a00029f..af0d175c025d 100644
--- a/drivers/base/memory.c
+++ b/drivers/base/memory.c
@@ -103,7 +103,8 @@ static ssize_t show_mem_phys_index(struct sys_device *dev,
103/* 103/*
104 * Show whether the section of memory is likely to be hot-removable 104 * Show whether the section of memory is likely to be hot-removable
105 */ 105 */
106static ssize_t show_mem_removable(struct sys_device *dev, char *buf) 106static ssize_t show_mem_removable(struct sys_device *dev,
107 struct sysdev_attribute *attr, char *buf)
107{ 108{
108 unsigned long start_pfn; 109 unsigned long start_pfn;
109 int ret; 110 int ret;
diff --git a/drivers/char/pcmcia/ipwireless/hardware.c b/drivers/char/pcmcia/ipwireless/hardware.c
index 929101ecbae2..7d500f82195a 100644
--- a/drivers/char/pcmcia/ipwireless/hardware.c
+++ b/drivers/char/pcmcia/ipwireless/hardware.c
@@ -30,11 +30,11 @@
30static void ipw_send_setup_packet(struct ipw_hardware *hw); 30static void ipw_send_setup_packet(struct ipw_hardware *hw);
31static void handle_received_SETUP_packet(struct ipw_hardware *ipw, 31static void handle_received_SETUP_packet(struct ipw_hardware *ipw,
32 unsigned int address, 32 unsigned int address,
33 unsigned char *data, int len, 33 const unsigned char *data, int len,
34 int is_last); 34 int is_last);
35static void ipwireless_setup_timer(unsigned long data); 35static void ipwireless_setup_timer(unsigned long data);
36static void handle_received_CTRL_packet(struct ipw_hardware *hw, 36static void handle_received_CTRL_packet(struct ipw_hardware *hw,
37 unsigned int channel_idx, unsigned char *data, int len); 37 unsigned int channel_idx, const unsigned char *data, int len);
38 38
39/*#define TIMING_DIAGNOSTICS*/ 39/*#define TIMING_DIAGNOSTICS*/
40 40
@@ -79,8 +79,7 @@ static void report_timing(void)
79 timing_stats.last_report_time = jiffies; 79 timing_stats.last_report_time = jiffies;
80 if (!first) 80 if (!first)
81 printk(KERN_INFO IPWIRELESS_PCCARD_NAME 81 printk(KERN_INFO IPWIRELESS_PCCARD_NAME
82 ": %u us elapsed - read %lu bytes in %u us, " 82 ": %u us elapsed - read %lu bytes in %u us, wrote %lu bytes in %u us\n",
83 "wrote %lu bytes in %u us\n",
84 jiffies_to_usecs(since), 83 jiffies_to_usecs(since),
85 timing_stats.read_bytes, 84 timing_stats.read_bytes,
86 jiffies_to_usecs(timing_stats.read_time), 85 jiffies_to_usecs(timing_stats.read_time),
@@ -133,29 +132,17 @@ enum {
133#define NL_FOLLOWING_PACKET_HEADER_SIZE 1 132#define NL_FOLLOWING_PACKET_HEADER_SIZE 1
134 133
135struct nl_first_packet_header { 134struct nl_first_packet_header {
136#if defined(__BIG_ENDIAN_BITFIELD)
137 unsigned char packet_rank:2;
138 unsigned char address:3;
139 unsigned char protocol:3;
140#else
141 unsigned char protocol:3; 135 unsigned char protocol:3;
142 unsigned char address:3; 136 unsigned char address:3;
143 unsigned char packet_rank:2; 137 unsigned char packet_rank:2;
144#endif
145 unsigned char length_lsb; 138 unsigned char length_lsb;
146 unsigned char length_msb; 139 unsigned char length_msb;
147}; 140};
148 141
149struct nl_packet_header { 142struct nl_packet_header {
150#if defined(__BIG_ENDIAN_BITFIELD)
151 unsigned char packet_rank:2;
152 unsigned char address:3;
153 unsigned char protocol:3;
154#else
155 unsigned char protocol:3; 143 unsigned char protocol:3;
156 unsigned char address:3; 144 unsigned char address:3;
157 unsigned char packet_rank:2; 145 unsigned char packet_rank:2;
158#endif
159}; 146};
160 147
161/* Value of 'packet_rank' above */ 148/* Value of 'packet_rank' above */
@@ -227,15 +214,12 @@ struct MEMINFREG {
227 unsigned short memreg_tx_new; /* TX2 (new) Register (R/W) */ 214 unsigned short memreg_tx_new; /* TX2 (new) Register (R/W) */
228}; 215};
229 216
230#define IODMADPR 0x00 /* DMA Data Port Register (R/W) */
231
232#define CARD_PRESENT_VALUE (0xBEEFCAFEUL) 217#define CARD_PRESENT_VALUE (0xBEEFCAFEUL)
233 218
234#define MEMTX_TX 0x0001 219#define MEMTX_TX 0x0001
235#define MEMRX_RX 0x0001 220#define MEMRX_RX 0x0001
236#define MEMRX_RX_DONE 0x0001 221#define MEMRX_RX_DONE 0x0001
237#define MEMRX_PCINTACKK 0x0001 222#define MEMRX_PCINTACKK 0x0001
238#define MEMRX_MEMSPURIOUSINT 0x0001
239 223
240#define NL_NUM_OF_PRIORITIES 3 224#define NL_NUM_OF_PRIORITIES 3
241#define NL_NUM_OF_PROTOCOLS 3 225#define NL_NUM_OF_PROTOCOLS 3
@@ -245,7 +229,7 @@ struct ipw_hardware {
245 unsigned int base_port; 229 unsigned int base_port;
246 short hw_version; 230 short hw_version;
247 unsigned short ll_mtu; 231 unsigned short ll_mtu;
248 spinlock_t spinlock; 232 spinlock_t lock;
249 233
250 int initializing; 234 int initializing;
251 int init_loops; 235 int init_loops;
@@ -386,26 +370,52 @@ static void dump_data_bytes(const char *type, const unsigned char *data,
386 length < DUMP_MAX_BYTES ? length : DUMP_MAX_BYTES); 370 length < DUMP_MAX_BYTES ? length : DUMP_MAX_BYTES);
387} 371}
388 372
389static int do_send_fragment(struct ipw_hardware *hw, const unsigned char *data, 373static void swap_packet_bitfield_to_le(unsigned char *data)
374{
375#ifdef __BIG_ENDIAN_BITFIELD
376 unsigned char tmp = *data, ret = 0;
377
378 /*
379 * transform bits from aa.bbb.ccc to ccc.bbb.aa
380 */
381 ret |= tmp & 0xc0 >> 6;
382 ret |= tmp & 0x38 >> 1;
383 ret |= tmp & 0x07 << 5;
384 *data = ret & 0xff;
385#endif
386}
387
388static void swap_packet_bitfield_from_le(unsigned char *data)
389{
390#ifdef __BIG_ENDIAN_BITFIELD
391 unsigned char tmp = *data, ret = 0;
392
393 /*
394 * transform bits from ccc.bbb.aa to aa.bbb.ccc
395 */
396 ret |= tmp & 0xe0 >> 5;
397 ret |= tmp & 0x1c << 1;
398 ret |= tmp & 0x03 << 6;
399 *data = ret & 0xff;
400#endif
401}
402
403static void do_send_fragment(struct ipw_hardware *hw, unsigned char *data,
390 unsigned length) 404 unsigned length)
391{ 405{
392 int i; 406 unsigned i;
393 unsigned long flags; 407 unsigned long flags;
394 408
395 start_timing(); 409 start_timing();
396 410 BUG_ON(length > hw->ll_mtu);
397 if (length == 0)
398 return 0;
399
400 if (length > hw->ll_mtu)
401 return -1;
402 411
403 if (ipwireless_debug) 412 if (ipwireless_debug)
404 dump_data_bytes("send", data, length); 413 dump_data_bytes("send", data, length);
405 414
406 spin_lock_irqsave(&hw->spinlock, flags); 415 spin_lock_irqsave(&hw->lock, flags);
407 416
408 hw->tx_ready = 0; 417 hw->tx_ready = 0;
418 swap_packet_bitfield_to_le(data);
409 419
410 if (hw->hw_version == HW_VERSION_1) { 420 if (hw->hw_version == HW_VERSION_1) {
411 outw((unsigned short) length, hw->base_port + IODWR); 421 outw((unsigned short) length, hw->base_port + IODWR);
@@ -414,7 +424,7 @@ static int do_send_fragment(struct ipw_hardware *hw, const unsigned char *data,
414 unsigned short d = data[i]; 424 unsigned short d = data[i];
415 __le16 raw_data; 425 __le16 raw_data;
416 426
417 if (likely(i + 1 < length)) 427 if (i + 1 < length)
418 d |= data[i + 1] << 8; 428 d |= data[i + 1] << 8;
419 raw_data = cpu_to_le16(d); 429 raw_data = cpu_to_le16(d);
420 outw(raw_data, hw->base_port + IODWR); 430 outw(raw_data, hw->base_port + IODWR);
@@ -422,32 +432,30 @@ static int do_send_fragment(struct ipw_hardware *hw, const unsigned char *data,
422 432
423 outw(DCR_TXDONE, hw->base_port + IODCR); 433 outw(DCR_TXDONE, hw->base_port + IODCR);
424 } else if (hw->hw_version == HW_VERSION_2) { 434 } else if (hw->hw_version == HW_VERSION_2) {
425 outw((unsigned short) length, hw->base_port + IODMADPR); 435 outw((unsigned short) length, hw->base_port);
426 436
427 for (i = 0; i < length; i += 2) { 437 for (i = 0; i < length; i += 2) {
428 unsigned short d = data[i]; 438 unsigned short d = data[i];
429 __le16 raw_data; 439 __le16 raw_data;
430 440
431 if ((i + 1 < length)) 441 if (i + 1 < length)
432 d |= data[i + 1] << 8; 442 d |= data[i + 1] << 8;
433 raw_data = cpu_to_le16(d); 443 raw_data = cpu_to_le16(d);
434 outw(raw_data, hw->base_port + IODMADPR); 444 outw(raw_data, hw->base_port);
435 } 445 }
436 while ((i & 3) != 2) { 446 while ((i & 3) != 2) {
437 outw((unsigned short) 0xDEAD, hw->base_port + IODMADPR); 447 outw((unsigned short) 0xDEAD, hw->base_port);
438 i += 2; 448 i += 2;
439 } 449 }
440 writew(MEMRX_RX, &hw->memory_info_regs->memreg_rx); 450 writew(MEMRX_RX, &hw->memory_info_regs->memreg_rx);
441 } 451 }
442 452
443 spin_unlock_irqrestore(&hw->spinlock, flags); 453 spin_unlock_irqrestore(&hw->lock, flags);
444 454
445 end_write_timing(length); 455 end_write_timing(length);
446
447 return 0;
448} 456}
449 457
450static int do_send_packet(struct ipw_hardware *hw, struct ipw_tx_packet *packet) 458static void do_send_packet(struct ipw_hardware *hw, struct ipw_tx_packet *packet)
451{ 459{
452 unsigned short fragment_data_len; 460 unsigned short fragment_data_len;
453 unsigned short data_left = packet->length - packet->offset; 461 unsigned short data_left = packet->length - packet->offset;
@@ -462,6 +470,10 @@ static int do_send_packet(struct ipw_hardware *hw, struct ipw_tx_packet *packet)
462 if (data_left < fragment_data_len) 470 if (data_left < fragment_data_len)
463 fragment_data_len = data_left; 471 fragment_data_len = data_left;
464 472
473 /*
474 * hdr_first is now in machine bitfield order, which will be swapped
475 * to le just before it goes to hw
476 */
465 pkt.hdr_first.protocol = packet->protocol; 477 pkt.hdr_first.protocol = packet->protocol;
466 pkt.hdr_first.address = packet->dest_addr; 478 pkt.hdr_first.address = packet->dest_addr;
467 pkt.hdr_first.packet_rank = 0; 479 pkt.hdr_first.packet_rank = 0;
@@ -493,25 +505,23 @@ static int do_send_packet(struct ipw_hardware *hw, struct ipw_tx_packet *packet)
493 */ 505 */
494 unsigned long flags; 506 unsigned long flags;
495 507
496 spin_lock_irqsave(&hw->spinlock, flags); 508 spin_lock_irqsave(&hw->lock, flags);
497 list_add(&packet->queue, &hw->tx_queue[0]); 509 list_add(&packet->queue, &hw->tx_queue[0]);
498 hw->tx_queued++; 510 hw->tx_queued++;
499 spin_unlock_irqrestore(&hw->spinlock, flags); 511 spin_unlock_irqrestore(&hw->lock, flags);
500 } else { 512 } else {
501 if (packet->packet_callback) 513 if (packet->packet_callback)
502 packet->packet_callback(packet->callback_data, 514 packet->packet_callback(packet->callback_data,
503 packet->length); 515 packet->length);
504 kfree(packet); 516 kfree(packet);
505 } 517 }
506
507 return 0;
508} 518}
509 519
510static void ipw_setup_hardware(struct ipw_hardware *hw) 520static void ipw_setup_hardware(struct ipw_hardware *hw)
511{ 521{
512 unsigned long flags; 522 unsigned long flags;
513 523
514 spin_lock_irqsave(&hw->spinlock, flags); 524 spin_lock_irqsave(&hw->lock, flags);
515 if (hw->hw_version == HW_VERSION_1) { 525 if (hw->hw_version == HW_VERSION_1) {
516 /* Reset RX FIFO */ 526 /* Reset RX FIFO */
517 outw(DCR_RXRESET, hw->base_port + IODCR); 527 outw(DCR_RXRESET, hw->base_port + IODCR);
@@ -530,7 +540,7 @@ static void ipw_setup_hardware(struct ipw_hardware *hw)
530 csr |= 1; 540 csr |= 1;
531 writew(csr, &hw->memregs_CCR->reg_config_and_status); 541 writew(csr, &hw->memregs_CCR->reg_config_and_status);
532 } 542 }
533 spin_unlock_irqrestore(&hw->spinlock, flags); 543 spin_unlock_irqrestore(&hw->lock, flags);
534} 544}
535 545
536/* 546/*
@@ -549,28 +559,23 @@ static struct ipw_rx_packet *pool_allocate(struct ipw_hardware *hw,
549 if (!packet) { 559 if (!packet) {
550 unsigned long flags; 560 unsigned long flags;
551 561
552 /* 562 spin_lock_irqsave(&hw->lock, flags);
553 * If this is the first fragment, then we will need to fetch a
554 * packet to put it in.
555 */
556 spin_lock_irqsave(&hw->spinlock, flags);
557 /* If we have one in our pool, then pull it out. */
558 if (!list_empty(&hw->rx_pool)) { 563 if (!list_empty(&hw->rx_pool)) {
559 packet = list_first_entry(&hw->rx_pool, 564 packet = list_first_entry(&hw->rx_pool,
560 struct ipw_rx_packet, queue); 565 struct ipw_rx_packet, queue);
561 list_del(&packet->queue);
562 hw->rx_pool_size--; 566 hw->rx_pool_size--;
563 spin_unlock_irqrestore(&hw->spinlock, flags); 567 spin_unlock_irqrestore(&hw->lock, flags);
568 list_del(&packet->queue);
564 } else { 569 } else {
565 /* Otherwise allocate a new one. */ 570 const int min_capacity =
566 static int min_capacity = 256; 571 ipwireless_ppp_mru(hw->network + 2);
567 int new_capacity; 572 int new_capacity;
568 573
569 spin_unlock_irqrestore(&hw->spinlock, flags); 574 spin_unlock_irqrestore(&hw->lock, flags);
570 new_capacity = 575 new_capacity =
571 minimum_free_space > min_capacity 576 (minimum_free_space > min_capacity
572 ? minimum_free_space 577 ? minimum_free_space
573 : min_capacity; 578 : min_capacity);
574 packet = kmalloc(sizeof(struct ipw_rx_packet) 579 packet = kmalloc(sizeof(struct ipw_rx_packet)
575 + new_capacity, GFP_ATOMIC); 580 + new_capacity, GFP_ATOMIC);
576 if (!packet) 581 if (!packet)
@@ -580,10 +585,6 @@ static struct ipw_rx_packet *pool_allocate(struct ipw_hardware *hw,
580 packet->length = 0; 585 packet->length = 0;
581 } 586 }
582 587
583 /*
584 * If this packet does not have sufficient capacity for the data we
585 * want to add, then make it bigger.
586 */
587 if (packet->length + minimum_free_space > packet->capacity) { 588 if (packet->length + minimum_free_space > packet->capacity) {
588 struct ipw_rx_packet *old_packet = packet; 589 struct ipw_rx_packet *old_packet = packet;
589 590
@@ -610,13 +611,15 @@ static void pool_free(struct ipw_hardware *hw, struct ipw_rx_packet *packet)
610 kfree(packet); 611 kfree(packet);
611 else { 612 else {
612 hw->rx_pool_size++; 613 hw->rx_pool_size++;
613 list_add_tail(&packet->queue, &hw->rx_pool); 614 list_add(&packet->queue, &hw->rx_pool);
614 } 615 }
615} 616}
616 617
617static void queue_received_packet(struct ipw_hardware *hw, 618static void queue_received_packet(struct ipw_hardware *hw,
618 unsigned int protocol, unsigned int address, 619 unsigned int protocol,
619 unsigned char *data, int length, int is_last) 620 unsigned int address,
621 const unsigned char *data, int length,
622 int is_last)
620{ 623{
621 unsigned int channel_idx = address - 1; 624 unsigned int channel_idx = address - 1;
622 struct ipw_rx_packet *packet = NULL; 625 struct ipw_rx_packet *packet = NULL;
@@ -658,9 +661,9 @@ static void queue_received_packet(struct ipw_hardware *hw,
658 packet = *assem; 661 packet = *assem;
659 *assem = NULL; 662 *assem = NULL;
660 /* Count queued DATA bytes only */ 663 /* Count queued DATA bytes only */
661 spin_lock_irqsave(&hw->spinlock, flags); 664 spin_lock_irqsave(&hw->lock, flags);
662 hw->rx_bytes_queued += packet->length; 665 hw->rx_bytes_queued += packet->length;
663 spin_unlock_irqrestore(&hw->spinlock, flags); 666 spin_unlock_irqrestore(&hw->lock, flags);
664 } 667 }
665 } else { 668 } else {
666 /* If it's a CTRL packet, don't assemble, just queue it. */ 669 /* If it's a CTRL packet, don't assemble, just queue it. */
@@ -682,13 +685,13 @@ static void queue_received_packet(struct ipw_hardware *hw,
682 * network layer. 685 * network layer.
683 */ 686 */
684 if (packet) { 687 if (packet) {
685 spin_lock_irqsave(&hw->spinlock, flags); 688 spin_lock_irqsave(&hw->lock, flags);
686 list_add_tail(&packet->queue, &hw->rx_queue); 689 list_add_tail(&packet->queue, &hw->rx_queue);
687 /* Block reception of incoming packets if queue is full. */ 690 /* Block reception of incoming packets if queue is full. */
688 hw->blocking_rx = 691 hw->blocking_rx =
689 hw->rx_bytes_queued >= IPWIRELESS_RX_QUEUE_SIZE; 692 (hw->rx_bytes_queued >= IPWIRELESS_RX_QUEUE_SIZE);
690 693
691 spin_unlock_irqrestore(&hw->spinlock, flags); 694 spin_unlock_irqrestore(&hw->lock, flags);
692 schedule_work(&hw->work_rx); 695 schedule_work(&hw->work_rx);
693 } 696 }
694} 697}
@@ -702,7 +705,7 @@ static void ipw_receive_data_work(struct work_struct *work_rx)
702 container_of(work_rx, struct ipw_hardware, work_rx); 705 container_of(work_rx, struct ipw_hardware, work_rx);
703 unsigned long flags; 706 unsigned long flags;
704 707
705 spin_lock_irqsave(&hw->spinlock, flags); 708 spin_lock_irqsave(&hw->lock, flags);
706 while (!list_empty(&hw->rx_queue)) { 709 while (!list_empty(&hw->rx_queue)) {
707 struct ipw_rx_packet *packet = 710 struct ipw_rx_packet *packet =
708 list_first_entry(&hw->rx_queue, 711 list_first_entry(&hw->rx_queue,
@@ -720,7 +723,7 @@ static void ipw_receive_data_work(struct work_struct *work_rx)
720 if (packet->protocol == TL_PROTOCOLID_COM_DATA) { 723 if (packet->protocol == TL_PROTOCOLID_COM_DATA) {
721 if (hw->network != NULL) { 724 if (hw->network != NULL) {
722 /* If the network hasn't been disconnected. */ 725 /* If the network hasn't been disconnected. */
723 spin_unlock_irqrestore(&hw->spinlock, flags); 726 spin_unlock_irqrestore(&hw->lock, flags);
724 /* 727 /*
725 * This must run unlocked due to tty processing 728 * This must run unlocked due to tty processing
726 * and mutex locking 729 * and mutex locking
@@ -731,7 +734,7 @@ static void ipw_receive_data_work(struct work_struct *work_rx)
731 (unsigned char *)packet 734 (unsigned char *)packet
732 + sizeof(struct ipw_rx_packet), 735 + sizeof(struct ipw_rx_packet),
733 packet->length); 736 packet->length);
734 spin_lock_irqsave(&hw->spinlock, flags); 737 spin_lock_irqsave(&hw->lock, flags);
735 } 738 }
736 /* Count queued DATA bytes only */ 739 /* Count queued DATA bytes only */
737 hw->rx_bytes_queued -= packet->length; 740 hw->rx_bytes_queued -= packet->length;
@@ -755,15 +758,15 @@ static void ipw_receive_data_work(struct work_struct *work_rx)
755 if (hw->shutting_down) 758 if (hw->shutting_down)
756 break; 759 break;
757 } 760 }
758 spin_unlock_irqrestore(&hw->spinlock, flags); 761 spin_unlock_irqrestore(&hw->lock, flags);
759} 762}
760 763
761static void handle_received_CTRL_packet(struct ipw_hardware *hw, 764static void handle_received_CTRL_packet(struct ipw_hardware *hw,
762 unsigned int channel_idx, 765 unsigned int channel_idx,
763 unsigned char *data, int len) 766 const unsigned char *data, int len)
764{ 767{
765 struct ipw_control_packet_body *body = 768 const struct ipw_control_packet_body *body =
766 (struct ipw_control_packet_body *) data; 769 (const struct ipw_control_packet_body *) data;
767 unsigned int changed_mask; 770 unsigned int changed_mask;
768 771
769 if (len != sizeof(struct ipw_control_packet_body)) { 772 if (len != sizeof(struct ipw_control_packet_body)) {
@@ -805,13 +808,13 @@ static void handle_received_CTRL_packet(struct ipw_hardware *hw,
805} 808}
806 809
807static void handle_received_packet(struct ipw_hardware *hw, 810static void handle_received_packet(struct ipw_hardware *hw,
808 union nl_packet *packet, 811 const union nl_packet *packet,
809 unsigned short len) 812 unsigned short len)
810{ 813{
811 unsigned int protocol = packet->hdr.protocol; 814 unsigned int protocol = packet->hdr.protocol;
812 unsigned int address = packet->hdr.address; 815 unsigned int address = packet->hdr.address;
813 unsigned int header_length; 816 unsigned int header_length;
814 unsigned char *data; 817 const unsigned char *data;
815 unsigned int data_len; 818 unsigned int data_len;
816 int is_last = packet->hdr.packet_rank & NL_LAST_PACKET; 819 int is_last = packet->hdr.packet_rank & NL_LAST_PACKET;
817 820
@@ -850,7 +853,7 @@ static void acknowledge_data_read(struct ipw_hardware *hw)
850static void do_receive_packet(struct ipw_hardware *hw) 853static void do_receive_packet(struct ipw_hardware *hw)
851{ 854{
852 unsigned len; 855 unsigned len;
853 unsigned int i; 856 unsigned i;
854 unsigned char pkt[LL_MTU_MAX]; 857 unsigned char pkt[LL_MTU_MAX];
855 858
856 start_timing(); 859 start_timing();
@@ -859,8 +862,7 @@ static void do_receive_packet(struct ipw_hardware *hw)
859 len = inw(hw->base_port + IODRR); 862 len = inw(hw->base_port + IODRR);
860 if (len > hw->ll_mtu) { 863 if (len > hw->ll_mtu) {
861 printk(KERN_INFO IPWIRELESS_PCCARD_NAME 864 printk(KERN_INFO IPWIRELESS_PCCARD_NAME
862 ": received a packet of %u bytes - " 865 ": received a packet of %u bytes - longer than the MTU!\n", len);
863 "longer than the MTU!\n", len);
864 outw(DCR_RXDONE | DCR_RXRESET, hw->base_port + IODCR); 866 outw(DCR_RXDONE | DCR_RXRESET, hw->base_port + IODCR);
865 return; 867 return;
866 } 868 }
@@ -873,18 +875,17 @@ static void do_receive_packet(struct ipw_hardware *hw)
873 pkt[i + 1] = (unsigned char) (data >> 8); 875 pkt[i + 1] = (unsigned char) (data >> 8);
874 } 876 }
875 } else { 877 } else {
876 len = inw(hw->base_port + IODMADPR); 878 len = inw(hw->base_port);
877 if (len > hw->ll_mtu) { 879 if (len > hw->ll_mtu) {
878 printk(KERN_INFO IPWIRELESS_PCCARD_NAME 880 printk(KERN_INFO IPWIRELESS_PCCARD_NAME
879 ": received a packet of %u bytes - " 881 ": received a packet of %u bytes - longer than the MTU!\n", len);
880 "longer than the MTU!\n", len);
881 writew(MEMRX_PCINTACKK, 882 writew(MEMRX_PCINTACKK,
882 &hw->memory_info_regs->memreg_pc_interrupt_ack); 883 &hw->memory_info_regs->memreg_pc_interrupt_ack);
883 return; 884 return;
884 } 885 }
885 886
886 for (i = 0; i < len; i += 2) { 887 for (i = 0; i < len; i += 2) {
887 __le16 raw_data = inw(hw->base_port + IODMADPR); 888 __le16 raw_data = inw(hw->base_port);
888 unsigned short data = le16_to_cpu(raw_data); 889 unsigned short data = le16_to_cpu(raw_data);
889 890
890 pkt[i] = (unsigned char) data; 891 pkt[i] = (unsigned char) data;
@@ -892,13 +893,15 @@ static void do_receive_packet(struct ipw_hardware *hw)
892 } 893 }
893 894
894 while ((i & 3) != 2) { 895 while ((i & 3) != 2) {
895 inw(hw->base_port + IODMADPR); 896 inw(hw->base_port);
896 i += 2; 897 i += 2;
897 } 898 }
898 } 899 }
899 900
900 acknowledge_data_read(hw); 901 acknowledge_data_read(hw);
901 902
903 swap_packet_bitfield_from_le(pkt);
904
902 if (ipwireless_debug) 905 if (ipwireless_debug)
903 dump_data_bytes("recv", pkt, len); 906 dump_data_bytes("recv", pkt, len);
904 907
@@ -916,8 +919,7 @@ static int get_current_packet_priority(struct ipw_hardware *hw)
916 * until setup is complete. 919 * until setup is complete.
917 */ 920 */
918 return (hw->to_setup || hw->initializing 921 return (hw->to_setup || hw->initializing
919 ? PRIO_SETUP + 1 : 922 ? PRIO_SETUP + 1 : NL_NUM_OF_PRIORITIES);
920 NL_NUM_OF_PRIORITIES);
921} 923}
922 924
923/* 925/*
@@ -928,17 +930,17 @@ static int get_packets_from_hw(struct ipw_hardware *hw)
928 int received = 0; 930 int received = 0;
929 unsigned long flags; 931 unsigned long flags;
930 932
931 spin_lock_irqsave(&hw->spinlock, flags); 933 spin_lock_irqsave(&hw->lock, flags);
932 while (hw->rx_ready && !hw->blocking_rx) { 934 while (hw->rx_ready && !hw->blocking_rx) {
933 received = 1; 935 received = 1;
934 hw->rx_ready--; 936 hw->rx_ready--;
935 spin_unlock_irqrestore(&hw->spinlock, flags); 937 spin_unlock_irqrestore(&hw->lock, flags);
936 938
937 do_receive_packet(hw); 939 do_receive_packet(hw);
938 940
939 spin_lock_irqsave(&hw->spinlock, flags); 941 spin_lock_irqsave(&hw->lock, flags);
940 } 942 }
941 spin_unlock_irqrestore(&hw->spinlock, flags); 943 spin_unlock_irqrestore(&hw->lock, flags);
942 944
943 return received; 945 return received;
944} 946}
@@ -954,7 +956,7 @@ static int send_pending_packet(struct ipw_hardware *hw, int priority_limit)
954 int more_to_send = 0; 956 int more_to_send = 0;
955 unsigned long flags; 957 unsigned long flags;
956 958
957 spin_lock_irqsave(&hw->spinlock, flags); 959 spin_lock_irqsave(&hw->lock, flags);
958 if (hw->tx_queued && hw->tx_ready) { 960 if (hw->tx_queued && hw->tx_ready) {
959 int priority; 961 int priority;
960 struct ipw_tx_packet *packet = NULL; 962 struct ipw_tx_packet *packet = NULL;
@@ -975,17 +977,17 @@ static int send_pending_packet(struct ipw_hardware *hw, int priority_limit)
975 } 977 }
976 if (!packet) { 978 if (!packet) {
977 hw->tx_queued = 0; 979 hw->tx_queued = 0;
978 spin_unlock_irqrestore(&hw->spinlock, flags); 980 spin_unlock_irqrestore(&hw->lock, flags);
979 return 0; 981 return 0;
980 } 982 }
981 983
982 spin_unlock_irqrestore(&hw->spinlock, flags); 984 spin_unlock_irqrestore(&hw->lock, flags);
983 985
984 /* Send */ 986 /* Send */
985 do_send_packet(hw, packet); 987 do_send_packet(hw, packet);
986 988
987 /* Check if more to send */ 989 /* Check if more to send */
988 spin_lock_irqsave(&hw->spinlock, flags); 990 spin_lock_irqsave(&hw->lock, flags);
989 for (priority = 0; priority < priority_limit; priority++) 991 for (priority = 0; priority < priority_limit; priority++)
990 if (!list_empty(&hw->tx_queue[priority])) { 992 if (!list_empty(&hw->tx_queue[priority])) {
991 more_to_send = 1; 993 more_to_send = 1;
@@ -995,7 +997,7 @@ static int send_pending_packet(struct ipw_hardware *hw, int priority_limit)
995 if (!more_to_send) 997 if (!more_to_send)
996 hw->tx_queued = 0; 998 hw->tx_queued = 0;
997 } 999 }
998 spin_unlock_irqrestore(&hw->spinlock, flags); 1000 spin_unlock_irqrestore(&hw->lock, flags);
999 1001
1000 return more_to_send; 1002 return more_to_send;
1001} 1003}
@@ -1008,9 +1010,9 @@ static void ipwireless_do_tasklet(unsigned long hw_)
1008 struct ipw_hardware *hw = (struct ipw_hardware *) hw_; 1010 struct ipw_hardware *hw = (struct ipw_hardware *) hw_;
1009 unsigned long flags; 1011 unsigned long flags;
1010 1012
1011 spin_lock_irqsave(&hw->spinlock, flags); 1013 spin_lock_irqsave(&hw->lock, flags);
1012 if (hw->shutting_down) { 1014 if (hw->shutting_down) {
1013 spin_unlock_irqrestore(&hw->spinlock, flags); 1015 spin_unlock_irqrestore(&hw->lock, flags);
1014 return; 1016 return;
1015 } 1017 }
1016 1018
@@ -1019,7 +1021,7 @@ static void ipwireless_do_tasklet(unsigned long hw_)
1019 * Initial setup data sent to hardware 1021 * Initial setup data sent to hardware
1020 */ 1022 */
1021 hw->to_setup = 2; 1023 hw->to_setup = 2;
1022 spin_unlock_irqrestore(&hw->spinlock, flags); 1024 spin_unlock_irqrestore(&hw->lock, flags);
1023 1025
1024 ipw_setup_hardware(hw); 1026 ipw_setup_hardware(hw);
1025 ipw_send_setup_packet(hw); 1027 ipw_send_setup_packet(hw);
@@ -1030,7 +1032,7 @@ static void ipwireless_do_tasklet(unsigned long hw_)
1030 int priority_limit = get_current_packet_priority(hw); 1032 int priority_limit = get_current_packet_priority(hw);
1031 int again; 1033 int again;
1032 1034
1033 spin_unlock_irqrestore(&hw->spinlock, flags); 1035 spin_unlock_irqrestore(&hw->lock, flags);
1034 1036
1035 do { 1037 do {
1036 again = send_pending_packet(hw, priority_limit); 1038 again = send_pending_packet(hw, priority_limit);
@@ -1068,16 +1070,16 @@ static irqreturn_t ipwireless_handle_v1_interrupt(int irq,
1068 /* Transmit complete. */ 1070 /* Transmit complete. */
1069 if (irqn & IR_TXINTR) { 1071 if (irqn & IR_TXINTR) {
1070 ack |= IR_TXINTR; 1072 ack |= IR_TXINTR;
1071 spin_lock_irqsave(&hw->spinlock, flags); 1073 spin_lock_irqsave(&hw->lock, flags);
1072 hw->tx_ready = 1; 1074 hw->tx_ready = 1;
1073 spin_unlock_irqrestore(&hw->spinlock, flags); 1075 spin_unlock_irqrestore(&hw->lock, flags);
1074 } 1076 }
1075 /* Received data */ 1077 /* Received data */
1076 if (irqn & IR_RXINTR) { 1078 if (irqn & IR_RXINTR) {
1077 ack |= IR_RXINTR; 1079 ack |= IR_RXINTR;
1078 spin_lock_irqsave(&hw->spinlock, flags); 1080 spin_lock_irqsave(&hw->lock, flags);
1079 hw->rx_ready++; 1081 hw->rx_ready++;
1080 spin_unlock_irqrestore(&hw->spinlock, flags); 1082 spin_unlock_irqrestore(&hw->lock, flags);
1081 } 1083 }
1082 if (ack != 0) { 1084 if (ack != 0) {
1083 outw(ack, hw->base_port + IOIR); 1085 outw(ack, hw->base_port + IOIR);
@@ -1128,9 +1130,8 @@ static irqreturn_t ipwireless_handle_v2_v3_interrupt(int irq,
1128 } else { 1130 } else {
1129 return IRQ_NONE; 1131 return IRQ_NONE;
1130 } 1132 }
1131 } else { 1133 } else
1132 return IRQ_NONE; 1134 return IRQ_NONE;
1133 }
1134 } 1135 }
1135 1136
1136 /* 1137 /*
@@ -1149,9 +1150,9 @@ static irqreturn_t ipwireless_handle_v2_v3_interrupt(int irq,
1149 if (hw->serial_number_detected) { 1150 if (hw->serial_number_detected) {
1150 if (memtx_serial != hw->last_memtx_serial) { 1151 if (memtx_serial != hw->last_memtx_serial) {
1151 hw->last_memtx_serial = memtx_serial; 1152 hw->last_memtx_serial = memtx_serial;
1152 spin_lock_irqsave(&hw->spinlock, flags); 1153 spin_lock_irqsave(&hw->lock, flags);
1153 hw->rx_ready++; 1154 hw->rx_ready++;
1154 spin_unlock_irqrestore(&hw->spinlock, flags); 1155 spin_unlock_irqrestore(&hw->lock, flags);
1155 rx = 1; 1156 rx = 1;
1156 } else 1157 } else
1157 /* Ignore 'Timer Recovery' duplicates. */ 1158 /* Ignore 'Timer Recovery' duplicates. */
@@ -1166,18 +1167,18 @@ static irqreturn_t ipwireless_handle_v2_v3_interrupt(int irq,
1166 printk(KERN_DEBUG IPWIRELESS_PCCARD_NAME 1167 printk(KERN_DEBUG IPWIRELESS_PCCARD_NAME
1167 ": memreg_tx serial num detected\n"); 1168 ": memreg_tx serial num detected\n");
1168 1169
1169 spin_lock_irqsave(&hw->spinlock, flags); 1170 spin_lock_irqsave(&hw->lock, flags);
1170 hw->rx_ready++; 1171 hw->rx_ready++;
1171 spin_unlock_irqrestore(&hw->spinlock, flags); 1172 spin_unlock_irqrestore(&hw->lock, flags);
1172 } 1173 }
1173 rx = 1; 1174 rx = 1;
1174 } 1175 }
1175 } 1176 }
1176 if (memrxdone & MEMRX_RX_DONE) { 1177 if (memrxdone & MEMRX_RX_DONE) {
1177 writew(0, &hw->memory_info_regs->memreg_rx_done); 1178 writew(0, &hw->memory_info_regs->memreg_rx_done);
1178 spin_lock_irqsave(&hw->spinlock, flags); 1179 spin_lock_irqsave(&hw->lock, flags);
1179 hw->tx_ready = 1; 1180 hw->tx_ready = 1;
1180 spin_unlock_irqrestore(&hw->spinlock, flags); 1181 spin_unlock_irqrestore(&hw->lock, flags);
1181 tx = 1; 1182 tx = 1;
1182 } 1183 }
1183 if (tx) 1184 if (tx)
@@ -1195,8 +1196,7 @@ static irqreturn_t ipwireless_handle_v2_v3_interrupt(int irq,
1195 ": spurious interrupt - new_tx mode\n"); 1196 ": spurious interrupt - new_tx mode\n");
1196 else { 1197 else {
1197 printk(KERN_WARNING IPWIRELESS_PCCARD_NAME 1198 printk(KERN_WARNING IPWIRELESS_PCCARD_NAME
1198 ": no valid memreg_tx value - " 1199 ": no valid memreg_tx value - switching to the old memreg_tx\n");
1199 "switching to the old memreg_tx\n");
1200 hw->memreg_tx = 1200 hw->memreg_tx =
1201 &hw->memory_info_regs->memreg_tx_old; 1201 &hw->memory_info_regs->memreg_tx_old;
1202 try_mem_tx_old = 1; 1202 try_mem_tx_old = 1;
@@ -1211,7 +1211,7 @@ static irqreturn_t ipwireless_handle_v2_v3_interrupt(int irq,
1211 return IRQ_HANDLED; 1211 return IRQ_HANDLED;
1212} 1212}
1213 1213
1214irqreturn_t ipwireless_interrupt(int irq, void *dev_id, struct pt_regs *regs) 1214irqreturn_t ipwireless_interrupt(int irq, void *dev_id)
1215{ 1215{
1216 struct ipw_hardware *hw = dev_id; 1216 struct ipw_hardware *hw = dev_id;
1217 1217
@@ -1226,9 +1226,9 @@ static void flush_packets_to_hw(struct ipw_hardware *hw)
1226 int priority_limit; 1226 int priority_limit;
1227 unsigned long flags; 1227 unsigned long flags;
1228 1228
1229 spin_lock_irqsave(&hw->spinlock, flags); 1229 spin_lock_irqsave(&hw->lock, flags);
1230 priority_limit = get_current_packet_priority(hw); 1230 priority_limit = get_current_packet_priority(hw);
1231 spin_unlock_irqrestore(&hw->spinlock, flags); 1231 spin_unlock_irqrestore(&hw->lock, flags);
1232 1232
1233 while (send_pending_packet(hw, priority_limit)); 1233 while (send_pending_packet(hw, priority_limit));
1234} 1234}
@@ -1238,10 +1238,10 @@ static void send_packet(struct ipw_hardware *hw, int priority,
1238{ 1238{
1239 unsigned long flags; 1239 unsigned long flags;
1240 1240
1241 spin_lock_irqsave(&hw->spinlock, flags); 1241 spin_lock_irqsave(&hw->lock, flags);
1242 list_add_tail(&packet->queue, &hw->tx_queue[priority]); 1242 list_add_tail(&packet->queue, &hw->tx_queue[priority]);
1243 hw->tx_queued++; 1243 hw->tx_queued++;
1244 spin_unlock_irqrestore(&hw->spinlock, flags); 1244 spin_unlock_irqrestore(&hw->lock, flags);
1245 1245
1246 flush_packets_to_hw(hw); 1246 flush_packets_to_hw(hw);
1247} 1247}
@@ -1291,21 +1291,20 @@ static void *alloc_ctrl_packet(int header_size,
1291} 1291}
1292 1292
1293int ipwireless_send_packet(struct ipw_hardware *hw, unsigned int channel_idx, 1293int ipwireless_send_packet(struct ipw_hardware *hw, unsigned int channel_idx,
1294 unsigned char *data, unsigned int length, 1294 const unsigned char *data, unsigned int length,
1295 void (*callback) (void *cb, unsigned int length), 1295 void (*callback) (void *cb, unsigned int length),
1296 void *callback_data) 1296 void *callback_data)
1297{ 1297{
1298 struct ipw_tx_packet *packet; 1298 struct ipw_tx_packet *packet;
1299 1299
1300 packet = alloc_data_packet(length, 1300 packet = alloc_data_packet(length, (channel_idx + 1),
1301 (unsigned char) (channel_idx + 1), 1301 TL_PROTOCOLID_COM_DATA);
1302 TL_PROTOCOLID_COM_DATA);
1303 if (!packet) 1302 if (!packet)
1304 return -ENOMEM; 1303 return -ENOMEM;
1305 packet->packet_callback = callback; 1304 packet->packet_callback = callback;
1306 packet->callback_data = callback_data; 1305 packet->callback_data = callback_data;
1307 memcpy((unsigned char *) packet + 1306 memcpy((unsigned char *) packet + sizeof(struct ipw_tx_packet), data,
1308 sizeof(struct ipw_tx_packet), data, length); 1307 length);
1309 1308
1310 send_packet(hw, PRIO_DATA, packet); 1309 send_packet(hw, PRIO_DATA, packet);
1311 return 0; 1310 return 0;
@@ -1321,12 +1320,11 @@ static int set_control_line(struct ipw_hardware *hw, int prio,
1321 protocolid = TL_PROTOCOLID_SETUP; 1320 protocolid = TL_PROTOCOLID_SETUP;
1322 1321
1323 packet = alloc_ctrl_packet(sizeof(struct ipw_control_packet), 1322 packet = alloc_ctrl_packet(sizeof(struct ipw_control_packet),
1324 (unsigned char) (channel_idx + 1), 1323 (channel_idx + 1), protocolid, line);
1325 protocolid, line);
1326 if (!packet) 1324 if (!packet)
1327 return -ENOMEM; 1325 return -ENOMEM;
1328 packet->header.length = sizeof(struct ipw_control_packet_body); 1326 packet->header.length = sizeof(struct ipw_control_packet_body);
1329 packet->body.value = (unsigned char) (state == 0 ? 0 : 1); 1327 packet->body.value = (state == 0 ? 0 : 1);
1330 send_packet(hw, prio, &packet->header); 1328 send_packet(hw, prio, &packet->header);
1331 return 0; 1329 return 0;
1332} 1330}
@@ -1504,8 +1502,7 @@ static void handle_setup_get_version_rsp(struct ipw_hardware *hw,
1504 if (vers_no == TL_SETUP_VERSION) 1502 if (vers_no == TL_SETUP_VERSION)
1505 __handle_setup_get_version_rsp(hw); 1503 __handle_setup_get_version_rsp(hw);
1506 else 1504 else
1507 printk(KERN_ERR 1505 printk(KERN_ERR IPWIRELESS_PCCARD_NAME
1508 IPWIRELESS_PCCARD_NAME
1509 ": invalid hardware version no %u\n", 1506 ": invalid hardware version no %u\n",
1510 (unsigned int) vers_no); 1507 (unsigned int) vers_no);
1511} 1508}
@@ -1528,10 +1525,10 @@ static void ipw_send_setup_packet(struct ipw_hardware *hw)
1528 1525
1529static void handle_received_SETUP_packet(struct ipw_hardware *hw, 1526static void handle_received_SETUP_packet(struct ipw_hardware *hw,
1530 unsigned int address, 1527 unsigned int address,
1531 unsigned char *data, int len, 1528 const unsigned char *data, int len,
1532 int is_last) 1529 int is_last)
1533{ 1530{
1534 union ipw_setup_rx_msg *rx_msg = (union ipw_setup_rx_msg *) data; 1531 const union ipw_setup_rx_msg *rx_msg = (const union ipw_setup_rx_msg *) data;
1535 1532
1536 if (address != ADDR_SETUP_PROT) { 1533 if (address != ADDR_SETUP_PROT) {
1537 printk(KERN_INFO IPWIRELESS_PCCARD_NAME 1534 printk(KERN_INFO IPWIRELESS_PCCARD_NAME
@@ -1629,7 +1626,7 @@ struct ipw_hardware *ipwireless_hardware_create(void)
1629 1626
1630 INIT_LIST_HEAD(&hw->rx_queue); 1627 INIT_LIST_HEAD(&hw->rx_queue);
1631 INIT_LIST_HEAD(&hw->rx_pool); 1628 INIT_LIST_HEAD(&hw->rx_pool);
1632 spin_lock_init(&hw->spinlock); 1629 spin_lock_init(&hw->lock);
1633 tasklet_init(&hw->tasklet, ipwireless_do_tasklet, (unsigned long) hw); 1630 tasklet_init(&hw->tasklet, ipwireless_do_tasklet, (unsigned long) hw);
1634 INIT_WORK(&hw->work_rx, ipw_receive_data_work); 1631 INIT_WORK(&hw->work_rx, ipw_receive_data_work);
1635 setup_timer(&hw->setup_timer, ipwireless_setup_timer, 1632 setup_timer(&hw->setup_timer, ipwireless_setup_timer,
@@ -1651,8 +1648,8 @@ void ipwireless_init_hardware_v1(struct ipw_hardware *hw,
1651 enable_irq(hw->irq); 1648 enable_irq(hw->irq);
1652 } 1649 }
1653 hw->base_port = base_port; 1650 hw->base_port = base_port;
1654 hw->hw_version = is_v2_card ? HW_VERSION_2 : HW_VERSION_1; 1651 hw->hw_version = (is_v2_card ? HW_VERSION_2 : HW_VERSION_1);
1655 hw->ll_mtu = hw->hw_version == HW_VERSION_1 ? LL_MTU_V1 : LL_MTU_V2; 1652 hw->ll_mtu = (hw->hw_version == HW_VERSION_1 ? LL_MTU_V1 : LL_MTU_V2);
1656 hw->memregs_CCR = (struct MEMCCR __iomem *) 1653 hw->memregs_CCR = (struct MEMCCR __iomem *)
1657 ((unsigned short __iomem *) attr_memory + 0x200); 1654 ((unsigned short __iomem *) attr_memory + 0x200);
1658 hw->memory_info_regs = (struct MEMINFREG __iomem *) common_memory; 1655 hw->memory_info_regs = (struct MEMINFREG __iomem *) common_memory;
@@ -1695,10 +1692,10 @@ static void ipwireless_setup_timer(unsigned long data)
1695 if (is_card_present(hw)) { 1692 if (is_card_present(hw)) {
1696 unsigned long flags; 1693 unsigned long flags;
1697 1694
1698 spin_lock_irqsave(&hw->spinlock, flags); 1695 spin_lock_irqsave(&hw->lock, flags);
1699 hw->to_setup = 1; 1696 hw->to_setup = 1;
1700 hw->tx_ready = 1; 1697 hw->tx_ready = 1;
1701 spin_unlock_irqrestore(&hw->spinlock, flags); 1698 spin_unlock_irqrestore(&hw->lock, flags);
1702 tasklet_schedule(&hw->tasklet); 1699 tasklet_schedule(&hw->tasklet);
1703 } 1700 }
1704 1701
diff --git a/drivers/char/pcmcia/ipwireless/hardware.h b/drivers/char/pcmcia/ipwireless/hardware.h
index 19ce5eb266b1..90a8590e43b0 100644
--- a/drivers/char/pcmcia/ipwireless/hardware.h
+++ b/drivers/char/pcmcia/ipwireless/hardware.h
@@ -34,14 +34,14 @@ struct ipw_network;
34 34
35struct ipw_hardware *ipwireless_hardware_create(void); 35struct ipw_hardware *ipwireless_hardware_create(void);
36void ipwireless_hardware_free(struct ipw_hardware *hw); 36void ipwireless_hardware_free(struct ipw_hardware *hw);
37irqreturn_t ipwireless_interrupt(int irq, void *dev_id, struct pt_regs *regs); 37irqreturn_t ipwireless_interrupt(int irq, void *dev_id);
38int ipwireless_set_DTR(struct ipw_hardware *hw, unsigned int channel_idx, 38int ipwireless_set_DTR(struct ipw_hardware *hw, unsigned int channel_idx,
39 int state); 39 int state);
40int ipwireless_set_RTS(struct ipw_hardware *hw, unsigned int channel_idx, 40int ipwireless_set_RTS(struct ipw_hardware *hw, unsigned int channel_idx,
41 int state); 41 int state);
42int ipwireless_send_packet(struct ipw_hardware *hw, 42int ipwireless_send_packet(struct ipw_hardware *hw,
43 unsigned int channel_idx, 43 unsigned int channel_idx,
44 unsigned char *data, 44 const unsigned char *data,
45 unsigned int length, 45 unsigned int length,
46 void (*packet_sent_callback) (void *cb, 46 void (*packet_sent_callback) (void *cb,
47 unsigned int length), 47 unsigned int length),
diff --git a/drivers/char/pcmcia/ipwireless/main.c b/drivers/char/pcmcia/ipwireless/main.c
index cc7dcea2d283..5eca7a99afe6 100644
--- a/drivers/char/pcmcia/ipwireless/main.c
+++ b/drivers/char/pcmcia/ipwireless/main.c
@@ -49,7 +49,7 @@ static void ipwireless_detach(struct pcmcia_device *link);
49/* Debug mode: more verbose, print sent/recv bytes */ 49/* Debug mode: more verbose, print sent/recv bytes */
50int ipwireless_debug; 50int ipwireless_debug;
51int ipwireless_loopback; 51int ipwireless_loopback;
52int ipwireless_out_queue = 1; 52int ipwireless_out_queue = 10;
53 53
54module_param_named(debug, ipwireless_debug, int, 0); 54module_param_named(debug, ipwireless_debug, int, 0);
55module_param_named(loopback, ipwireless_loopback, int, 0); 55module_param_named(loopback, ipwireless_loopback, int, 0);
@@ -57,7 +57,7 @@ module_param_named(out_queue, ipwireless_out_queue, int, 0);
57MODULE_PARM_DESC(debug, "switch on debug messages [0]"); 57MODULE_PARM_DESC(debug, "switch on debug messages [0]");
58MODULE_PARM_DESC(loopback, 58MODULE_PARM_DESC(loopback,
59 "debug: enable ras_raw channel [0]"); 59 "debug: enable ras_raw channel [0]");
60MODULE_PARM_DESC(out_queue, "debug: set size of outgoing queue [1]"); 60MODULE_PARM_DESC(out_queue, "debug: set size of outgoing PPP queue [10]");
61 61
62/* Executes in process context. */ 62/* Executes in process context. */
63static void signalled_reboot_work(struct work_struct *work_reboot) 63static void signalled_reboot_work(struct work_struct *work_reboot)
@@ -88,8 +88,6 @@ static int config_ipwireless(struct ipw_dev *ipw)
88 unsigned short buf[64]; 88 unsigned short buf[64];
89 cisparse_t parse; 89 cisparse_t parse;
90 unsigned short cor_value; 90 unsigned short cor_value;
91 win_req_t request_attr_memory;
92 win_req_t request_common_memory;
93 memreq_t memreq_attr_memory; 91 memreq_t memreq_attr_memory;
94 memreq_t memreq_common_memory; 92 memreq_t memreq_common_memory;
95 93
@@ -188,6 +186,9 @@ static int config_ipwireless(struct ipw_dev *ipw)
188 goto exit0; 186 goto exit0;
189 } 187 }
190 188
189 request_region(link->io.BasePort1, link->io.NumPorts1,
190 IPWIRELESS_PCCARD_NAME);
191
191 /* memory settings */ 192 /* memory settings */
192 193
193 tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; 194 tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
@@ -214,16 +215,16 @@ static int config_ipwireless(struct ipw_dev *ipw)
214 } 215 }
215 216
216 if (parse.cftable_entry.mem.nwin > 0) { 217 if (parse.cftable_entry.mem.nwin > 0) {
217 request_common_memory.Attributes = 218 ipw->request_common_memory.Attributes =
218 WIN_DATA_WIDTH_16 | WIN_MEMORY_TYPE_CM | WIN_ENABLE; 219 WIN_DATA_WIDTH_16 | WIN_MEMORY_TYPE_CM | WIN_ENABLE;
219 request_common_memory.Base = 220 ipw->request_common_memory.Base =
220 parse.cftable_entry.mem.win[0].host_addr; 221 parse.cftable_entry.mem.win[0].host_addr;
221 request_common_memory.Size = parse.cftable_entry.mem.win[0].len; 222 ipw->request_common_memory.Size = parse.cftable_entry.mem.win[0].len;
222 if (request_common_memory.Size < 0x1000) 223 if (ipw->request_common_memory.Size < 0x1000)
223 request_common_memory.Size = 0x1000; 224 ipw->request_common_memory.Size = 0x1000;
224 request_common_memory.AccessSpeed = 0; 225 ipw->request_common_memory.AccessSpeed = 0;
225 226
226 ret = pcmcia_request_window(&link, &request_common_memory, 227 ret = pcmcia_request_window(&link, &ipw->request_common_memory,
227 &ipw->handle_common_memory); 228 &ipw->handle_common_memory);
228 229
229 if (ret != CS_SUCCESS) { 230 if (ret != CS_SUCCESS) {
@@ -246,16 +247,18 @@ static int config_ipwireless(struct ipw_dev *ipw)
246 ipw->is_v2_card = 247 ipw->is_v2_card =
247 parse.cftable_entry.mem.win[0].len == 0x100; 248 parse.cftable_entry.mem.win[0].len == 0x100;
248 249
249 ipw->common_memory = ioremap(request_common_memory.Base, 250 ipw->common_memory = ioremap(ipw->request_common_memory.Base,
250 request_common_memory.Size); 251 ipw->request_common_memory.Size);
252 request_mem_region(ipw->request_common_memory.Base,
253 ipw->request_common_memory.Size, IPWIRELESS_PCCARD_NAME);
251 254
252 request_attr_memory.Attributes = 255 ipw->request_attr_memory.Attributes =
253 WIN_DATA_WIDTH_16 | WIN_MEMORY_TYPE_AM | WIN_ENABLE; 256 WIN_DATA_WIDTH_16 | WIN_MEMORY_TYPE_AM | WIN_ENABLE;
254 request_attr_memory.Base = 0; 257 ipw->request_attr_memory.Base = 0;
255 request_attr_memory.Size = 0; /* this used to be 0x1000 */ 258 ipw->request_attr_memory.Size = 0; /* this used to be 0x1000 */
256 request_attr_memory.AccessSpeed = 0; 259 ipw->request_attr_memory.AccessSpeed = 0;
257 260
258 ret = pcmcia_request_window(&link, &request_attr_memory, 261 ret = pcmcia_request_window(&link, &ipw->request_attr_memory,
259 &ipw->handle_attr_memory); 262 &ipw->handle_attr_memory);
260 263
261 if (ret != CS_SUCCESS) { 264 if (ret != CS_SUCCESS) {
@@ -274,8 +277,10 @@ static int config_ipwireless(struct ipw_dev *ipw)
274 goto exit2; 277 goto exit2;
275 } 278 }
276 279
277 ipw->attr_memory = ioremap(request_attr_memory.Base, 280 ipw->attr_memory = ioremap(ipw->request_attr_memory.Base,
278 request_attr_memory.Size); 281 ipw->request_attr_memory.Size);
282 request_mem_region(ipw->request_attr_memory.Base, ipw->request_attr_memory.Size,
283 IPWIRELESS_PCCARD_NAME);
279 } 284 }
280 285
281 INIT_WORK(&ipw->work_reboot, signalled_reboot_work); 286 INIT_WORK(&ipw->work_reboot, signalled_reboot_work);
@@ -311,14 +316,13 @@ static int config_ipwireless(struct ipw_dev *ipw)
311 (unsigned int) link->irq.AssignedIRQ); 316 (unsigned int) link->irq.AssignedIRQ);
312 if (ipw->attr_memory && ipw->common_memory) 317 if (ipw->attr_memory && ipw->common_memory)
313 printk(KERN_INFO IPWIRELESS_PCCARD_NAME 318 printk(KERN_INFO IPWIRELESS_PCCARD_NAME
314 ": attr memory 0x%08lx-0x%08lx, " 319 ": attr memory 0x%08lx-0x%08lx, common memory 0x%08lx-0x%08lx\n",
315 "common memory 0x%08lx-0x%08lx\n", 320 ipw->request_attr_memory.Base,
316 request_attr_memory.Base, 321 ipw->request_attr_memory.Base
317 request_attr_memory.Base 322 + ipw->request_attr_memory.Size - 1,
318 + request_attr_memory.Size - 1, 323 ipw->request_common_memory.Base,
319 request_common_memory.Base, 324 ipw->request_common_memory.Base
320 request_common_memory.Base 325 + ipw->request_common_memory.Size - 1);
321 + request_common_memory.Size - 1);
322 326
323 ipw->network = ipwireless_network_create(ipw->hardware); 327 ipw->network = ipwireless_network_create(ipw->hardware);
324 if (!ipw->network) 328 if (!ipw->network)
@@ -350,12 +354,16 @@ exit4:
350 pcmcia_disable_device(link); 354 pcmcia_disable_device(link);
351exit3: 355exit3:
352 if (ipw->attr_memory) { 356 if (ipw->attr_memory) {
357 release_mem_region(ipw->request_attr_memory.Base,
358 ipw->request_attr_memory.Size);
353 iounmap(ipw->attr_memory); 359 iounmap(ipw->attr_memory);
354 pcmcia_release_window(ipw->handle_attr_memory); 360 pcmcia_release_window(ipw->handle_attr_memory);
355 pcmcia_disable_device(link); 361 pcmcia_disable_device(link);
356 } 362 }
357exit2: 363exit2:
358 if (ipw->common_memory) { 364 if (ipw->common_memory) {
365 release_mem_region(ipw->request_common_memory.Base,
366 ipw->request_common_memory.Size);
359 iounmap(ipw->common_memory); 367 iounmap(ipw->common_memory);
360 pcmcia_release_window(ipw->handle_common_memory); 368 pcmcia_release_window(ipw->handle_common_memory);
361 } 369 }
@@ -367,19 +375,25 @@ exit0:
367 375
368static void release_ipwireless(struct ipw_dev *ipw) 376static void release_ipwireless(struct ipw_dev *ipw)
369{ 377{
370 struct pcmcia_device *link = ipw->link; 378 pcmcia_disable_device(ipw->link);
371
372 pcmcia_disable_device(link);
373 379
374 if (ipw->common_memory) 380 if (ipw->common_memory) {
381 release_mem_region(ipw->request_common_memory.Base,
382 ipw->request_common_memory.Size);
375 iounmap(ipw->common_memory); 383 iounmap(ipw->common_memory);
376 if (ipw->attr_memory) 384 }
385 if (ipw->attr_memory) {
386 release_mem_region(ipw->request_attr_memory.Base,
387 ipw->request_attr_memory.Size);
377 iounmap(ipw->attr_memory); 388 iounmap(ipw->attr_memory);
389 }
378 if (ipw->common_memory) 390 if (ipw->common_memory)
379 pcmcia_release_window(ipw->handle_common_memory); 391 pcmcia_release_window(ipw->handle_common_memory);
380 if (ipw->attr_memory) 392 if (ipw->attr_memory)
381 pcmcia_release_window(ipw->handle_attr_memory); 393 pcmcia_release_window(ipw->handle_attr_memory);
382 pcmcia_disable_device(link); 394
395 /* Break the link with Card Services */
396 pcmcia_disable_device(ipw->link);
383} 397}
384 398
385/* 399/*
@@ -437,10 +451,6 @@ static void ipwireless_detach(struct pcmcia_device *link)
437 451
438 release_ipwireless(ipw); 452 release_ipwireless(ipw);
439 453
440 /* Break the link with Card Services */
441 if (link)
442 pcmcia_disable_device(link);
443
444 if (ipw->tty != NULL) 454 if (ipw->tty != NULL)
445 ipwireless_tty_free(ipw->tty); 455 ipwireless_tty_free(ipw->tty);
446 if (ipw->network != NULL) 456 if (ipw->network != NULL)
diff --git a/drivers/char/pcmcia/ipwireless/main.h b/drivers/char/pcmcia/ipwireless/main.h
index 1bfdcc8d47d6..0e0363af9ab2 100644
--- a/drivers/char/pcmcia/ipwireless/main.h
+++ b/drivers/char/pcmcia/ipwireless/main.h
@@ -45,10 +45,15 @@ struct ipw_tty;
45struct ipw_dev { 45struct ipw_dev {
46 struct pcmcia_device *link; 46 struct pcmcia_device *link;
47 int is_v2_card; 47 int is_v2_card;
48
48 window_handle_t handle_attr_memory; 49 window_handle_t handle_attr_memory;
49 void __iomem *attr_memory; 50 void __iomem *attr_memory;
51 win_req_t request_attr_memory;
52
50 window_handle_t handle_common_memory; 53 window_handle_t handle_common_memory;
51 void __iomem *common_memory; 54 void __iomem *common_memory;
55 win_req_t request_common_memory;
56
52 dev_node_t nodes[2]; 57 dev_node_t nodes[2];
53 /* Reference to attribute memory, containing CIS data */ 58 /* Reference to attribute memory, containing CIS data */
54 void *attribute_memory; 59 void *attribute_memory;
diff --git a/drivers/char/pcmcia/ipwireless/network.c b/drivers/char/pcmcia/ipwireless/network.c
index fe914d34f7f6..590762a7f217 100644
--- a/drivers/char/pcmcia/ipwireless/network.c
+++ b/drivers/char/pcmcia/ipwireless/network.c
@@ -29,7 +29,6 @@
29#include "main.h" 29#include "main.h"
30#include "tty.h" 30#include "tty.h"
31 31
32#define MAX_OUTGOING_PACKETS_QUEUED ipwireless_out_queue
33#define MAX_ASSOCIATED_TTYS 2 32#define MAX_ASSOCIATED_TTYS 2
34 33
35#define SC_RCV_BITS (SC_RCV_B7_1|SC_RCV_B7_0|SC_RCV_ODDP|SC_RCV_EVNP) 34#define SC_RCV_BITS (SC_RCV_B7_1|SC_RCV_B7_0|SC_RCV_ODDP|SC_RCV_EVNP)
@@ -46,7 +45,7 @@ struct ipw_network {
46 /* Number of packets queued up in hardware module. */ 45 /* Number of packets queued up in hardware module. */
47 int outgoing_packets_queued; 46 int outgoing_packets_queued;
48 /* Spinlock to avoid interrupts during shutdown */ 47 /* Spinlock to avoid interrupts during shutdown */
49 spinlock_t spinlock; 48 spinlock_t lock;
50 struct mutex close_lock; 49 struct mutex close_lock;
51 50
52 /* PPP ioctl data, not actually used anywere */ 51 /* PPP ioctl data, not actually used anywere */
@@ -68,20 +67,20 @@ static void notify_packet_sent(void *callback_data, unsigned int packet_length)
68 struct ipw_network *network = callback_data; 67 struct ipw_network *network = callback_data;
69 unsigned long flags; 68 unsigned long flags;
70 69
71 spin_lock_irqsave(&network->spinlock, flags); 70 spin_lock_irqsave(&network->lock, flags);
72 network->outgoing_packets_queued--; 71 network->outgoing_packets_queued--;
73 if (network->ppp_channel != NULL) { 72 if (network->ppp_channel != NULL) {
74 if (network->ppp_blocked) { 73 if (network->ppp_blocked) {
75 network->ppp_blocked = 0; 74 network->ppp_blocked = 0;
76 spin_unlock_irqrestore(&network->spinlock, flags); 75 spin_unlock_irqrestore(&network->lock, flags);
77 ppp_output_wakeup(network->ppp_channel); 76 ppp_output_wakeup(network->ppp_channel);
78 if (ipwireless_debug) 77 if (ipwireless_debug)
79 printk(KERN_INFO IPWIRELESS_PCCARD_NAME 78 printk(KERN_DEBUG IPWIRELESS_PCCARD_NAME
80 ": ppp unblocked\n"); 79 ": ppp unblocked\n");
81 } else 80 } else
82 spin_unlock_irqrestore(&network->spinlock, flags); 81 spin_unlock_irqrestore(&network->lock, flags);
83 } else 82 } else
84 spin_unlock_irqrestore(&network->spinlock, flags); 83 spin_unlock_irqrestore(&network->lock, flags);
85} 84}
86 85
87/* 86/*
@@ -93,8 +92,8 @@ static int ipwireless_ppp_start_xmit(struct ppp_channel *ppp_channel,
93 struct ipw_network *network = ppp_channel->private; 92 struct ipw_network *network = ppp_channel->private;
94 unsigned long flags; 93 unsigned long flags;
95 94
96 spin_lock_irqsave(&network->spinlock, flags); 95 spin_lock_irqsave(&network->lock, flags);
97 if (network->outgoing_packets_queued < MAX_OUTGOING_PACKETS_QUEUED) { 96 if (network->outgoing_packets_queued < ipwireless_out_queue) {
98 unsigned char *buf; 97 unsigned char *buf;
99 static unsigned char header[] = { 98 static unsigned char header[] = {
100 PPP_ALLSTATIONS, /* 0xff */ 99 PPP_ALLSTATIONS, /* 0xff */
@@ -103,7 +102,7 @@ static int ipwireless_ppp_start_xmit(struct ppp_channel *ppp_channel,
103 int ret; 102 int ret;
104 103
105 network->outgoing_packets_queued++; 104 network->outgoing_packets_queued++;
106 spin_unlock_irqrestore(&network->spinlock, flags); 105 spin_unlock_irqrestore(&network->lock, flags);
107 106
108 /* 107 /*
109 * If we have the requested amount of headroom in the skb we 108 * If we have the requested amount of headroom in the skb we
@@ -144,7 +143,9 @@ static int ipwireless_ppp_start_xmit(struct ppp_channel *ppp_channel,
144 * needs to be unblocked once we are ready to send. 143 * needs to be unblocked once we are ready to send.
145 */ 144 */
146 network->ppp_blocked = 1; 145 network->ppp_blocked = 1;
147 spin_unlock_irqrestore(&network->spinlock, flags); 146 spin_unlock_irqrestore(&network->lock, flags);
147 if (ipwireless_debug)
148 printk(KERN_DEBUG IPWIRELESS_PCCARD_NAME ": ppp blocked\n");
148 return 0; 149 return 0;
149 } 150 }
150} 151}
@@ -249,11 +250,11 @@ static void do_go_online(struct work_struct *work_go_online)
249 work_go_online); 250 work_go_online);
250 unsigned long flags; 251 unsigned long flags;
251 252
252 spin_lock_irqsave(&network->spinlock, flags); 253 spin_lock_irqsave(&network->lock, flags);
253 if (!network->ppp_channel) { 254 if (!network->ppp_channel) {
254 struct ppp_channel *channel; 255 struct ppp_channel *channel;
255 256
256 spin_unlock_irqrestore(&network->spinlock, flags); 257 spin_unlock_irqrestore(&network->lock, flags);
257 channel = kzalloc(sizeof(struct ppp_channel), GFP_KERNEL); 258 channel = kzalloc(sizeof(struct ppp_channel), GFP_KERNEL);
258 if (!channel) { 259 if (!channel) {
259 printk(KERN_ERR IPWIRELESS_PCCARD_NAME 260 printk(KERN_ERR IPWIRELESS_PCCARD_NAME
@@ -273,10 +274,10 @@ static void do_go_online(struct work_struct *work_go_online)
273 network->xaccm[3] = 0x60000000U; 274 network->xaccm[3] = 0x60000000U;
274 network->raccm = ~0U; 275 network->raccm = ~0U;
275 ppp_register_channel(channel); 276 ppp_register_channel(channel);
276 spin_lock_irqsave(&network->spinlock, flags); 277 spin_lock_irqsave(&network->lock, flags);
277 network->ppp_channel = channel; 278 network->ppp_channel = channel;
278 } 279 }
279 spin_unlock_irqrestore(&network->spinlock, flags); 280 spin_unlock_irqrestore(&network->lock, flags);
280} 281}
281 282
282static void do_go_offline(struct work_struct *work_go_offline) 283static void do_go_offline(struct work_struct *work_go_offline)
@@ -287,16 +288,16 @@ static void do_go_offline(struct work_struct *work_go_offline)
287 unsigned long flags; 288 unsigned long flags;
288 289
289 mutex_lock(&network->close_lock); 290 mutex_lock(&network->close_lock);
290 spin_lock_irqsave(&network->spinlock, flags); 291 spin_lock_irqsave(&network->lock, flags);
291 if (network->ppp_channel != NULL) { 292 if (network->ppp_channel != NULL) {
292 struct ppp_channel *channel = network->ppp_channel; 293 struct ppp_channel *channel = network->ppp_channel;
293 294
294 network->ppp_channel = NULL; 295 network->ppp_channel = NULL;
295 spin_unlock_irqrestore(&network->spinlock, flags); 296 spin_unlock_irqrestore(&network->lock, flags);
296 mutex_unlock(&network->close_lock); 297 mutex_unlock(&network->close_lock);
297 ppp_unregister_channel(channel); 298 ppp_unregister_channel(channel);
298 } else { 299 } else {
299 spin_unlock_irqrestore(&network->spinlock, flags); 300 spin_unlock_irqrestore(&network->lock, flags);
300 mutex_unlock(&network->close_lock); 301 mutex_unlock(&network->close_lock);
301 } 302 }
302} 303}
@@ -381,18 +382,18 @@ void ipwireless_network_packet_received(struct ipw_network *network,
381 * the PPP layer. 382 * the PPP layer.
382 */ 383 */
383 mutex_lock(&network->close_lock); 384 mutex_lock(&network->close_lock);
384 spin_lock_irqsave(&network->spinlock, flags); 385 spin_lock_irqsave(&network->lock, flags);
385 if (network->ppp_channel != NULL) { 386 if (network->ppp_channel != NULL) {
386 struct sk_buff *skb; 387 struct sk_buff *skb;
387 388
388 spin_unlock_irqrestore(&network->spinlock, 389 spin_unlock_irqrestore(&network->lock,
389 flags); 390 flags);
390 391
391 /* Send the data to the ppp_generic module. */ 392 /* Send the data to the ppp_generic module. */
392 skb = ipw_packet_received_skb(data, length); 393 skb = ipw_packet_received_skb(data, length);
393 ppp_input(network->ppp_channel, skb); 394 ppp_input(network->ppp_channel, skb);
394 } else 395 } else
395 spin_unlock_irqrestore(&network->spinlock, 396 spin_unlock_irqrestore(&network->lock,
396 flags); 397 flags);
397 mutex_unlock(&network->close_lock); 398 mutex_unlock(&network->close_lock);
398 } 399 }
@@ -410,7 +411,7 @@ struct ipw_network *ipwireless_network_create(struct ipw_hardware *hw)
410 if (!network) 411 if (!network)
411 return NULL; 412 return NULL;
412 413
413 spin_lock_init(&network->spinlock); 414 spin_lock_init(&network->lock);
414 mutex_init(&network->close_lock); 415 mutex_init(&network->close_lock);
415 416
416 network->hardware = hw; 417 network->hardware = hw;
@@ -478,10 +479,10 @@ int ipwireless_ppp_channel_index(struct ipw_network *network)
478 int ret = -1; 479 int ret = -1;
479 unsigned long flags; 480 unsigned long flags;
480 481
481 spin_lock_irqsave(&network->spinlock, flags); 482 spin_lock_irqsave(&network->lock, flags);
482 if (network->ppp_channel != NULL) 483 if (network->ppp_channel != NULL)
483 ret = ppp_channel_index(network->ppp_channel); 484 ret = ppp_channel_index(network->ppp_channel);
484 spin_unlock_irqrestore(&network->spinlock, flags); 485 spin_unlock_irqrestore(&network->lock, flags);
485 486
486 return ret; 487 return ret;
487} 488}
@@ -491,10 +492,15 @@ int ipwireless_ppp_unit_number(struct ipw_network *network)
491 int ret = -1; 492 int ret = -1;
492 unsigned long flags; 493 unsigned long flags;
493 494
494 spin_lock_irqsave(&network->spinlock, flags); 495 spin_lock_irqsave(&network->lock, flags);
495 if (network->ppp_channel != NULL) 496 if (network->ppp_channel != NULL)
496 ret = ppp_unit_number(network->ppp_channel); 497 ret = ppp_unit_number(network->ppp_channel);
497 spin_unlock_irqrestore(&network->spinlock, flags); 498 spin_unlock_irqrestore(&network->lock, flags);
498 499
499 return ret; 500 return ret;
500} 501}
502
503int ipwireless_ppp_mru(const struct ipw_network *network)
504{
505 return network->mru;
506}
diff --git a/drivers/char/pcmcia/ipwireless/network.h b/drivers/char/pcmcia/ipwireless/network.h
index ccacd26fc7ef..561f765b3334 100644
--- a/drivers/char/pcmcia/ipwireless/network.h
+++ b/drivers/char/pcmcia/ipwireless/network.h
@@ -48,5 +48,6 @@ void ipwireless_ppp_open(struct ipw_network *net);
48void ipwireless_ppp_close(struct ipw_network *net); 48void ipwireless_ppp_close(struct ipw_network *net);
49int ipwireless_ppp_channel_index(struct ipw_network *net); 49int ipwireless_ppp_channel_index(struct ipw_network *net);
50int ipwireless_ppp_unit_number(struct ipw_network *net); 50int ipwireless_ppp_unit_number(struct ipw_network *net);
51int ipwireless_ppp_mru(const struct ipw_network *net);
51 52
52#endif 53#endif
diff --git a/drivers/char/pcmcia/ipwireless/tty.c b/drivers/char/pcmcia/ipwireless/tty.c
index 42f3815c5ce3..b1414507997c 100644
--- a/drivers/char/pcmcia/ipwireless/tty.c
+++ b/drivers/char/pcmcia/ipwireless/tty.c
@@ -259,7 +259,7 @@ static int ipw_write(struct tty_struct *linux_tty,
259 } 259 }
260 260
261 ret = ipwireless_send_packet(tty->hardware, IPW_CHANNEL_RAS, 261 ret = ipwireless_send_packet(tty->hardware, IPW_CHANNEL_RAS,
262 (unsigned char *) buf, count, 262 buf, count,
263 ipw_write_packet_sent_callback, tty); 263 ipw_write_packet_sent_callback, tty);
264 if (ret == -1) { 264 if (ret == -1) {
265 mutex_unlock(&tty->ipw_tty_mutex); 265 mutex_unlock(&tty->ipw_tty_mutex);
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index 5405769020a1..5ce07b517c58 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -94,7 +94,7 @@ void cpuidle_install_idle_handler(void)
94 */ 94 */
95void cpuidle_uninstall_idle_handler(void) 95void cpuidle_uninstall_idle_handler(void)
96{ 96{
97 if (enabled_devices && (pm_idle != pm_idle_old)) { 97 if (enabled_devices && pm_idle_old && (pm_idle != pm_idle_old)) {
98 pm_idle = pm_idle_old; 98 pm_idle = pm_idle_old;
99 cpuidle_kick_cpus(); 99 cpuidle_kick_cpus();
100 } 100 }
diff --git a/drivers/i2c/busses/i2c-bfin-twi.c b/drivers/i2c/busses/i2c-bfin-twi.c
index 48d084bdf7c8..3c855ff2992f 100644
--- a/drivers/i2c/busses/i2c-bfin-twi.c
+++ b/drivers/i2c/busses/i2c-bfin-twi.c
@@ -49,6 +49,8 @@ struct bfin_twi_iface {
49 struct i2c_msg *pmsg; 49 struct i2c_msg *pmsg;
50 int msg_num; 50 int msg_num;
51 int cur_msg; 51 int cur_msg;
52 u16 saved_clkdiv;
53 u16 saved_control;
52 void __iomem *regs_base; 54 void __iomem *regs_base;
53}; 55};
54 56
@@ -565,32 +567,43 @@ static u32 bfin_twi_functionality(struct i2c_adapter *adap)
565 I2C_FUNC_I2C; 567 I2C_FUNC_I2C;
566} 568}
567 569
568
569static struct i2c_algorithm bfin_twi_algorithm = { 570static struct i2c_algorithm bfin_twi_algorithm = {
570 .master_xfer = bfin_twi_master_xfer, 571 .master_xfer = bfin_twi_master_xfer,
571 .smbus_xfer = bfin_twi_smbus_xfer, 572 .smbus_xfer = bfin_twi_smbus_xfer,
572 .functionality = bfin_twi_functionality, 573 .functionality = bfin_twi_functionality,
573}; 574};
574 575
575 576static int i2c_bfin_twi_suspend(struct platform_device *pdev, pm_message_t state)
576static int i2c_bfin_twi_suspend(struct platform_device *dev, pm_message_t state)
577{ 577{
578 struct bfin_twi_iface *iface = platform_get_drvdata(dev); 578 struct bfin_twi_iface *iface = platform_get_drvdata(pdev);
579
580 iface->saved_clkdiv = read_CLKDIV(iface);
581 iface->saved_control = read_CONTROL(iface);
582
583 free_irq(iface->irq, iface);
579 584
580 /* Disable TWI */ 585 /* Disable TWI */
581 write_CONTROL(iface, read_CONTROL(iface) & ~TWI_ENA); 586 write_CONTROL(iface, iface->saved_control & ~TWI_ENA);
582 SSYNC();
583 587
584 return 0; 588 return 0;
585} 589}
586 590
587static int i2c_bfin_twi_resume(struct platform_device *dev) 591static int i2c_bfin_twi_resume(struct platform_device *pdev)
588{ 592{
589 struct bfin_twi_iface *iface = platform_get_drvdata(dev); 593 struct bfin_twi_iface *iface = platform_get_drvdata(pdev);
590 594
591 /* Enable TWI */ 595 int rc = request_irq(iface->irq, bfin_twi_interrupt_entry,
592 write_CONTROL(iface, read_CONTROL(iface) | TWI_ENA); 596 IRQF_DISABLED, pdev->name, iface);
593 SSYNC(); 597 if (rc) {
598 dev_err(&pdev->dev, "Can't get IRQ %d !\n", iface->irq);
599 return -ENODEV;
600 }
601
602 /* Resume TWI interface clock as specified */
603 write_CLKDIV(iface, iface->saved_clkdiv);
604
605 /* Resume TWI */
606 write_CONTROL(iface, iface->saved_control);
594 607
595 return 0; 608 return 0;
596} 609}
diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
index 79b455a1f090..32104eac8d3d 100644
--- a/drivers/i2c/busses/i2c-gpio.c
+++ b/drivers/i2c/busses/i2c-gpio.c
@@ -77,7 +77,7 @@ static int i2c_gpio_getscl(void *data)
77 return gpio_get_value(pdata->scl_pin); 77 return gpio_get_value(pdata->scl_pin);
78} 78}
79 79
80static int __init i2c_gpio_probe(struct platform_device *pdev) 80static int __devinit i2c_gpio_probe(struct platform_device *pdev)
81{ 81{
82 struct i2c_gpio_platform_data *pdata; 82 struct i2c_gpio_platform_data *pdata;
83 struct i2c_algo_bit_data *bit_data; 83 struct i2c_algo_bit_data *bit_data;
@@ -174,7 +174,7 @@ err_alloc_adap:
174 return ret; 174 return ret;
175} 175}
176 176
177static int __exit i2c_gpio_remove(struct platform_device *pdev) 177static int __devexit i2c_gpio_remove(struct platform_device *pdev)
178{ 178{
179 struct i2c_gpio_platform_data *pdata; 179 struct i2c_gpio_platform_data *pdata;
180 struct i2c_adapter *adap; 180 struct i2c_adapter *adap;
@@ -196,14 +196,15 @@ static struct platform_driver i2c_gpio_driver = {
196 .name = "i2c-gpio", 196 .name = "i2c-gpio",
197 .owner = THIS_MODULE, 197 .owner = THIS_MODULE,
198 }, 198 },
199 .remove = __exit_p(i2c_gpio_remove), 199 .probe = i2c_gpio_probe,
200 .remove = __devexit_p(i2c_gpio_remove),
200}; 201};
201 202
202static int __init i2c_gpio_init(void) 203static int __init i2c_gpio_init(void)
203{ 204{
204 int ret; 205 int ret;
205 206
206 ret = platform_driver_probe(&i2c_gpio_driver, i2c_gpio_probe); 207 ret = platform_driver_register(&i2c_gpio_driver);
207 if (ret) 208 if (ret)
208 printk(KERN_ERR "i2c-gpio: probe failed: %d\n", ret); 209 printk(KERN_ERR "i2c-gpio: probe failed: %d\n", ret);
209 210
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index 007390ad9810..4864723c7425 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -33,6 +33,7 @@
33#include <linux/err.h> 33#include <linux/err.h>
34#include <linux/platform_device.h> 34#include <linux/platform_device.h>
35#include <linux/clk.h> 35#include <linux/clk.h>
36#include <linux/cpufreq.h>
36 37
37#include <asm/hardware.h> 38#include <asm/hardware.h>
38#include <asm/irq.h> 39#include <asm/irq.h>
@@ -64,6 +65,7 @@ struct s3c24xx_i2c {
64 unsigned int tx_setup; 65 unsigned int tx_setup;
65 66
66 enum s3c24xx_i2c_state state; 67 enum s3c24xx_i2c_state state;
68 unsigned long clkrate;
67 69
68 void __iomem *regs; 70 void __iomem *regs;
69 struct clk *clk; 71 struct clk *clk;
@@ -71,6 +73,10 @@ struct s3c24xx_i2c {
71 struct resource *irq; 73 struct resource *irq;
72 struct resource *ioarea; 74 struct resource *ioarea;
73 struct i2c_adapter adap; 75 struct i2c_adapter adap;
76
77#ifdef CONFIG_CPU_FREQ
78 struct notifier_block freq_transition;
79#endif
74}; 80};
75 81
76/* default platform data to use if not supplied in the platform_device 82/* default platform data to use if not supplied in the platform_device
@@ -501,6 +507,9 @@ static int s3c24xx_i2c_doxfer(struct s3c24xx_i2c *i2c, struct i2c_msg *msgs, int
501 unsigned long timeout; 507 unsigned long timeout;
502 int ret; 508 int ret;
503 509
510 if (!readl(i2c->regs + S3C2410_IICCON) & S3C2410_IICCON_IRQEN)
511 return -EIO;
512
504 ret = s3c24xx_i2c_set_master(i2c); 513 ret = s3c24xx_i2c_set_master(i2c);
505 if (ret != 0) { 514 if (ret != 0) {
506 dev_err(i2c->dev, "cannot get bus (error %d)\n", ret); 515 dev_err(i2c->dev, "cannot get bus (error %d)\n", ret);
@@ -636,27 +645,28 @@ static inline int freq_acceptable(unsigned int freq, unsigned int wanted)
636 return (diff >= -2 && diff <= 2); 645 return (diff >= -2 && diff <= 2);
637} 646}
638 647
639/* s3c24xx_i2c_getdivisor 648/* s3c24xx_i2c_clockrate
640 * 649 *
641 * work out a divisor for the user requested frequency setting, 650 * work out a divisor for the user requested frequency setting,
642 * either by the requested frequency, or scanning the acceptable 651 * either by the requested frequency, or scanning the acceptable
643 * range of frequencies until something is found 652 * range of frequencies until something is found
644*/ 653*/
645 654
646static int s3c24xx_i2c_getdivisor(struct s3c24xx_i2c *i2c, 655static int s3c24xx_i2c_clockrate(struct s3c24xx_i2c *i2c, unsigned int *got)
647 struct s3c2410_platform_i2c *pdata,
648 unsigned long *iicon,
649 unsigned int *got)
650{ 656{
657 struct s3c2410_platform_i2c *pdata;
651 unsigned long clkin = clk_get_rate(i2c->clk); 658 unsigned long clkin = clk_get_rate(i2c->clk);
652
653 unsigned int divs, div1; 659 unsigned int divs, div1;
660 u32 iiccon;
654 int freq; 661 int freq;
655 int start, end; 662 int start, end;
656 663
664 i2c->clkrate = clkin;
665
666 pdata = s3c24xx_i2c_get_platformdata(i2c->adap.dev.parent);
657 clkin /= 1000; /* clkin now in KHz */ 667 clkin /= 1000; /* clkin now in KHz */
658 668
659 dev_dbg(i2c->dev, "pdata %p, freq %lu %lu..%lu\n", 669 dev_dbg(i2c->dev, "pdata %p, freq %lu %lu..%lu\n",
660 pdata, pdata->bus_freq, pdata->min_freq, pdata->max_freq); 670 pdata, pdata->bus_freq, pdata->min_freq, pdata->max_freq);
661 671
662 if (pdata->bus_freq != 0) { 672 if (pdata->bus_freq != 0) {
@@ -688,11 +698,79 @@ static int s3c24xx_i2c_getdivisor(struct s3c24xx_i2c *i2c,
688 698
689 found: 699 found:
690 *got = freq; 700 *got = freq;
691 *iicon |= (divs-1); 701
692 *iicon |= (div1 == 512) ? S3C2410_IICCON_TXDIV_512 : 0; 702 iiccon = readl(i2c->regs + S3C2410_IICCON);
703 iiccon &= ~(S3C2410_IICCON_SCALEMASK | S3C2410_IICCON_TXDIV_512);
704 iiccon |= (divs-1);
705
706 if (div1 == 512)
707 iiccon |= S3C2410_IICCON_TXDIV_512;
708
709 writel(iiccon, i2c->regs + S3C2410_IICCON);
710
711 return 0;
712}
713
714#ifdef CONFIG_CPU_FREQ
715
716#define freq_to_i2c(_n) container_of(_n, struct s3c24xx_i2c, freq_transition)
717
718static int s3c24xx_i2c_cpufreq_transition(struct notifier_block *nb,
719 unsigned long val, void *data)
720{
721 struct s3c24xx_i2c *i2c = freq_to_i2c(nb);
722 unsigned long flags;
723 unsigned int got;
724 int delta_f;
725 int ret;
726
727 delta_f = clk_get_rate(i2c->clk) - i2c->clkrate;
728
729 /* if we're post-change and the input clock has slowed down
730 * or at pre-change and the clock is about to speed up, then
731 * adjust our clock rate. <0 is slow, >0 speedup.
732 */
733
734 if ((val == CPUFREQ_POSTCHANGE && delta_f < 0) ||
735 (val == CPUFREQ_PRECHANGE && delta_f > 0)) {
736 spin_lock_irqsave(&i2c->lock, flags);
737 ret = s3c24xx_i2c_clockrate(i2c, &got);
738 spin_unlock_irqrestore(&i2c->lock, flags);
739
740 if (ret < 0)
741 dev_err(i2c->dev, "cannot find frequency\n");
742 else
743 dev_info(i2c->dev, "setting freq %d\n", got);
744 }
745
746 return 0;
747}
748
749static inline int s3c24xx_i2c_register_cpufreq(struct s3c24xx_i2c *i2c)
750{
751 i2c->freq_transition.notifier_call = s3c24xx_i2c_cpufreq_transition;
752
753 return cpufreq_register_notifier(&i2c->freq_transition,
754 CPUFREQ_TRANSITION_NOTIFIER);
755}
756
757static inline void s3c24xx_i2c_deregister_cpufreq(struct s3c24xx_i2c *i2c)
758{
759 cpufreq_unregister_notifier(&i2c->freq_transition,
760 CPUFREQ_TRANSITION_NOTIFIER);
761}
762
763#else
764static inline int s3c24xx_i2c_register_cpufreq(struct s3c24xx_i2c *i2c)
765{
693 return 0; 766 return 0;
694} 767}
695 768
769static inline void s3c24xx_i2c_deregister_cpufreq(struct s3c24xx_i2c *i2c)
770{
771}
772#endif
773
696/* s3c24xx_i2c_init 774/* s3c24xx_i2c_init
697 * 775 *
698 * initialise the controller, set the IO lines and frequency 776 * initialise the controller, set the IO lines and frequency
@@ -719,9 +797,12 @@ static int s3c24xx_i2c_init(struct s3c24xx_i2c *i2c)
719 797
720 dev_info(i2c->dev, "slave address 0x%02x\n", pdata->slave_addr); 798 dev_info(i2c->dev, "slave address 0x%02x\n", pdata->slave_addr);
721 799
800 writel(iicon, i2c->regs + S3C2410_IICCON);
801
722 /* we need to work out the divisors for the clock... */ 802 /* we need to work out the divisors for the clock... */
723 803
724 if (s3c24xx_i2c_getdivisor(i2c, pdata, &iicon, &freq) != 0) { 804 if (s3c24xx_i2c_clockrate(i2c, &freq) != 0) {
805 writel(0, i2c->regs + S3C2410_IICCON);
725 dev_err(i2c->dev, "cannot meet bus frequency required\n"); 806 dev_err(i2c->dev, "cannot meet bus frequency required\n");
726 return -EINVAL; 807 return -EINVAL;
727 } 808 }
@@ -730,8 +811,6 @@ static int s3c24xx_i2c_init(struct s3c24xx_i2c *i2c)
730 811
731 dev_info(i2c->dev, "bus frequency set to %d KHz\n", freq); 812 dev_info(i2c->dev, "bus frequency set to %d KHz\n", freq);
732 dev_dbg(i2c->dev, "S3C2410_IICCON=0x%02lx\n", iicon); 813 dev_dbg(i2c->dev, "S3C2410_IICCON=0x%02lx\n", iicon);
733
734 writel(iicon, i2c->regs + S3C2410_IICCON);
735 814
736 /* check for s3c2440 i2c controller */ 815 /* check for s3c2440 i2c controller */
737 816
@@ -752,9 +831,12 @@ static int s3c24xx_i2c_init(struct s3c24xx_i2c *i2c)
752static int s3c24xx_i2c_probe(struct platform_device *pdev) 831static int s3c24xx_i2c_probe(struct platform_device *pdev)
753{ 832{
754 struct s3c24xx_i2c *i2c = &s3c24xx_i2c; 833 struct s3c24xx_i2c *i2c = &s3c24xx_i2c;
834 struct s3c2410_platform_i2c *pdata;
755 struct resource *res; 835 struct resource *res;
756 int ret; 836 int ret;
757 837
838 pdata = s3c24xx_i2c_get_platformdata(&pdev->dev);
839
758 /* find the clock and enable it */ 840 /* find the clock and enable it */
759 841
760 i2c->dev = &pdev->dev; 842 i2c->dev = &pdev->dev;
@@ -832,17 +914,34 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
832 dev_dbg(&pdev->dev, "irq resource %p (%lu)\n", res, 914 dev_dbg(&pdev->dev, "irq resource %p (%lu)\n", res,
833 (unsigned long)res->start); 915 (unsigned long)res->start);
834 916
835 ret = i2c_add_adapter(&i2c->adap); 917 ret = s3c24xx_i2c_register_cpufreq(i2c);
836 if (ret < 0) { 918 if (ret < 0) {
837 dev_err(&pdev->dev, "failed to add bus to i2c core\n"); 919 dev_err(&pdev->dev, "failed to register cpufreq notifier\n");
838 goto err_irq; 920 goto err_irq;
839 } 921 }
840 922
923 /* Note, previous versions of the driver used i2c_add_adapter()
924 * to add the bus at any number. We now pass the bus number via
925 * the platform data, so if unset it will now default to always
926 * being bus 0.
927 */
928
929 i2c->adap.nr = pdata->bus_num;
930
931 ret = i2c_add_numbered_adapter(&i2c->adap);
932 if (ret < 0) {
933 dev_err(&pdev->dev, "failed to add bus to i2c core\n");
934 goto err_cpufreq;
935 }
936
841 platform_set_drvdata(pdev, i2c); 937 platform_set_drvdata(pdev, i2c);
842 938
843 dev_info(&pdev->dev, "%s: S3C I2C adapter\n", i2c->adap.dev.bus_id); 939 dev_info(&pdev->dev, "%s: S3C I2C adapter\n", i2c->adap.dev.bus_id);
844 return 0; 940 return 0;
845 941
942 err_cpufreq:
943 s3c24xx_i2c_deregister_cpufreq(i2c);
944
846 err_irq: 945 err_irq:
847 free_irq(i2c->irq->start, i2c); 946 free_irq(i2c->irq->start, i2c);
848 947
@@ -870,6 +969,8 @@ static int s3c24xx_i2c_remove(struct platform_device *pdev)
870{ 969{
871 struct s3c24xx_i2c *i2c = platform_get_drvdata(pdev); 970 struct s3c24xx_i2c *i2c = platform_get_drvdata(pdev);
872 971
972 s3c24xx_i2c_deregister_cpufreq(i2c);
973
873 i2c_del_adapter(&i2c->adap); 974 i2c_del_adapter(&i2c->adap);
874 free_irq(i2c->irq->start, i2c); 975 free_irq(i2c->irq->start, i2c);
875 976
diff --git a/include/asm-arm/plat-s3c/iic.h b/include/asm-arm/plat-s3c/iic.h
index 71211c8b5384..d08a1f2863e4 100644
--- a/include/asm-arm/plat-s3c/iic.h
+++ b/include/asm-arm/plat-s3c/iic.h
@@ -21,6 +21,7 @@
21*/ 21*/
22 22
23struct s3c2410_platform_i2c { 23struct s3c2410_platform_i2c {
24 int bus_num; /* bus number to use */
24 unsigned int flags; 25 unsigned int flags;
25 unsigned int slave_addr; /* slave address for controller */ 26 unsigned int slave_addr; /* slave address for controller */
26 unsigned long bus_freq; /* standard bus frequency */ 27 unsigned long bus_freq; /* standard bus frequency */
diff --git a/include/asm-sparc/Kbuild b/include/asm-sparc/Kbuild
deleted file mode 100644
index 6cdaf9d33b38..000000000000
--- a/include/asm-sparc/Kbuild
+++ /dev/null
@@ -1 +0,0 @@
1# dummy file to avoid breaking make headers_install
diff --git a/include/asm-sparc64/Kbuild b/include/asm-sparc64/Kbuild
deleted file mode 100644
index 6cdaf9d33b38..000000000000
--- a/include/asm-sparc64/Kbuild
+++ /dev/null
@@ -1 +0,0 @@
1# dummy file to avoid breaking make headers_install
diff --git a/include/asm-sparc64/agp.h b/include/asm-sparc64/agp.h
deleted file mode 100644
index eb8d4b3f5163..000000000000
--- a/include/asm-sparc64/agp.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/agp.h>
diff --git a/include/asm-sparc64/apb.h b/include/asm-sparc64/apb.h
deleted file mode 100644
index 5e236ca6e492..000000000000
--- a/include/asm-sparc64/apb.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/apb.h>
diff --git a/include/asm-sparc64/asi.h b/include/asm-sparc64/asi.h
deleted file mode 100644
index 9b7110c516e8..000000000000
--- a/include/asm-sparc64/asi.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/asi.h>
diff --git a/include/asm-sparc64/atomic.h b/include/asm-sparc64/atomic.h
deleted file mode 100644
index f5126826ba34..000000000000
--- a/include/asm-sparc64/atomic.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/atomic.h>
diff --git a/include/asm-sparc64/auxio.h b/include/asm-sparc64/auxio.h
deleted file mode 100644
index 46c9042f30b4..000000000000
--- a/include/asm-sparc64/auxio.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/auxio.h>
diff --git a/include/asm-sparc64/auxvec.h b/include/asm-sparc64/auxvec.h
deleted file mode 100644
index 1f45c67d7316..000000000000
--- a/include/asm-sparc64/auxvec.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/auxvec.h>
diff --git a/include/asm-sparc64/backoff.h b/include/asm-sparc64/backoff.h
deleted file mode 100644
index 8ee26d947e0e..000000000000
--- a/include/asm-sparc64/backoff.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/backoff.h>
diff --git a/include/asm-sparc64/bbc.h b/include/asm-sparc64/bbc.h
deleted file mode 100644
index 06e8b6306514..000000000000
--- a/include/asm-sparc64/bbc.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/bbc.h>
diff --git a/include/asm-sparc64/bitops.h b/include/asm-sparc64/bitops.h
deleted file mode 100644
index 204404355bdd..000000000000
--- a/include/asm-sparc64/bitops.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/bitops.h>
diff --git a/include/asm-sparc64/bpp.h b/include/asm-sparc64/bpp.h
deleted file mode 100644
index 514eee20272e..000000000000
--- a/include/asm-sparc64/bpp.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/bpp.h>
diff --git a/include/asm-sparc64/bug.h b/include/asm-sparc64/bug.h
deleted file mode 100644
index 3433737c7a67..000000000000
--- a/include/asm-sparc64/bug.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/bug.h>
diff --git a/include/asm-sparc64/bugs.h b/include/asm-sparc64/bugs.h
deleted file mode 100644
index 04ae9e2818cf..000000000000
--- a/include/asm-sparc64/bugs.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/bugs.h>
diff --git a/include/asm-sparc64/byteorder.h b/include/asm-sparc64/byteorder.h
deleted file mode 100644
index f672855bee17..000000000000
--- a/include/asm-sparc64/byteorder.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/byteorder.h>
diff --git a/include/asm-sparc64/cache.h b/include/asm-sparc64/cache.h
deleted file mode 100644
index fa9de5cadbf1..000000000000
--- a/include/asm-sparc64/cache.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/cache.h>
diff --git a/include/asm-sparc64/cacheflush.h b/include/asm-sparc64/cacheflush.h
deleted file mode 100644
index cf5b6b3e8a55..000000000000
--- a/include/asm-sparc64/cacheflush.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/cacheflush.h>
diff --git a/include/asm-sparc64/chafsr.h b/include/asm-sparc64/chafsr.h
deleted file mode 100644
index aaab97562a39..000000000000
--- a/include/asm-sparc64/chafsr.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/chafsr.h>
diff --git a/include/asm-sparc64/checksum.h b/include/asm-sparc64/checksum.h
deleted file mode 100644
index c3966c5e29d8..000000000000
--- a/include/asm-sparc64/checksum.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/checksum.h>
diff --git a/include/asm-sparc64/chmctrl.h b/include/asm-sparc64/chmctrl.h
deleted file mode 100644
index eb757b483b30..000000000000
--- a/include/asm-sparc64/chmctrl.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/chmctrl.h>
diff --git a/include/asm-sparc64/cmt.h b/include/asm-sparc64/cmt.h
deleted file mode 100644
index b19b445cb810..000000000000
--- a/include/asm-sparc64/cmt.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/cmt.h>
diff --git a/include/asm-sparc64/compat.h b/include/asm-sparc64/compat.h
deleted file mode 100644
index 8c155d221952..000000000000
--- a/include/asm-sparc64/compat.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/compat.h>
diff --git a/include/asm-sparc64/compat_signal.h b/include/asm-sparc64/compat_signal.h
deleted file mode 100644
index 7187dcc8cac7..000000000000
--- a/include/asm-sparc64/compat_signal.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/compat_signal.h>
diff --git a/include/asm-sparc64/cpudata.h b/include/asm-sparc64/cpudata.h
deleted file mode 100644
index 3220e134a579..000000000000
--- a/include/asm-sparc64/cpudata.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/cpudata.h>
diff --git a/include/asm-sparc64/cputime.h b/include/asm-sparc64/cputime.h
deleted file mode 100644
index 435f37a92f7c..000000000000
--- a/include/asm-sparc64/cputime.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/cputime.h>
diff --git a/include/asm-sparc64/current.h b/include/asm-sparc64/current.h
deleted file mode 100644
index a7904a7f53a8..000000000000
--- a/include/asm-sparc64/current.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/current.h>
diff --git a/include/asm-sparc64/dcr.h b/include/asm-sparc64/dcr.h
deleted file mode 100644
index d67613b1f5fe..000000000000
--- a/include/asm-sparc64/dcr.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/dcr.h>
diff --git a/include/asm-sparc64/dcu.h b/include/asm-sparc64/dcu.h
deleted file mode 100644
index 28853f4968d1..000000000000
--- a/include/asm-sparc64/dcu.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/dcu.h>
diff --git a/include/asm-sparc64/delay.h b/include/asm-sparc64/delay.h
deleted file mode 100644
index 33dc5589d841..000000000000
--- a/include/asm-sparc64/delay.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/delay.h>
diff --git a/include/asm-sparc64/device.h b/include/asm-sparc64/device.h
deleted file mode 100644
index 4145c47097e2..000000000000
--- a/include/asm-sparc64/device.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/device.h>
diff --git a/include/asm-sparc64/display7seg.h b/include/asm-sparc64/display7seg.h
deleted file mode 100644
index e74f046b41de..000000000000
--- a/include/asm-sparc64/display7seg.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/display7seg.h>
diff --git a/include/asm-sparc64/div64.h b/include/asm-sparc64/div64.h
deleted file mode 100644
index 928c94f99ecf..000000000000
--- a/include/asm-sparc64/div64.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/div64.h>
diff --git a/include/asm-sparc64/dma-mapping.h b/include/asm-sparc64/dma-mapping.h
deleted file mode 100644
index 380b7b63147f..000000000000
--- a/include/asm-sparc64/dma-mapping.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/dma-mapping.h>
diff --git a/include/asm-sparc64/dma.h b/include/asm-sparc64/dma.h
deleted file mode 100644
index 2e36248e6b59..000000000000
--- a/include/asm-sparc64/dma.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/dma.h>
diff --git a/include/asm-sparc64/ebus.h b/include/asm-sparc64/ebus.h
deleted file mode 100644
index d7d476158bd5..000000000000
--- a/include/asm-sparc64/ebus.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/ebus.h>
diff --git a/include/asm-sparc64/elf.h b/include/asm-sparc64/elf.h
deleted file mode 100644
index f256d9472c82..000000000000
--- a/include/asm-sparc64/elf.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/elf.h>
diff --git a/include/asm-sparc64/emergency-restart.h b/include/asm-sparc64/emergency-restart.h
deleted file mode 100644
index 2cac7b644da8..000000000000
--- a/include/asm-sparc64/emergency-restart.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/emergency-restart.h>
diff --git a/include/asm-sparc64/envctrl.h b/include/asm-sparc64/envctrl.h
deleted file mode 100644
index a2cc0ca334ba..000000000000
--- a/include/asm-sparc64/envctrl.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/envctrl.h>
diff --git a/include/asm-sparc64/errno.h b/include/asm-sparc64/errno.h
deleted file mode 100644
index 9701fe01cc53..000000000000
--- a/include/asm-sparc64/errno.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/errno.h>
diff --git a/include/asm-sparc64/estate.h b/include/asm-sparc64/estate.h
deleted file mode 100644
index bedd0ef5f19c..000000000000
--- a/include/asm-sparc64/estate.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/estate.h>
diff --git a/include/asm-sparc64/fb.h b/include/asm-sparc64/fb.h
deleted file mode 100644
index 1c2ac5832f39..000000000000
--- a/include/asm-sparc64/fb.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/fb.h>
diff --git a/include/asm-sparc64/fbio.h b/include/asm-sparc64/fbio.h
deleted file mode 100644
index c17edf8c7bc4..000000000000
--- a/include/asm-sparc64/fbio.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/fbio.h>
diff --git a/include/asm-sparc64/fcntl.h b/include/asm-sparc64/fcntl.h
deleted file mode 100644
index 8b1beae48cd1..000000000000
--- a/include/asm-sparc64/fcntl.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/fcntl.h>
diff --git a/include/asm-sparc64/fhc.h b/include/asm-sparc64/fhc.h
deleted file mode 100644
index 73eb04c19c47..000000000000
--- a/include/asm-sparc64/fhc.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/fhc.h>
diff --git a/include/asm-sparc64/floppy.h b/include/asm-sparc64/floppy.h
deleted file mode 100644
index 214878114436..000000000000
--- a/include/asm-sparc64/floppy.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/floppy.h>
diff --git a/include/asm-sparc64/fpumacro.h b/include/asm-sparc64/fpumacro.h
deleted file mode 100644
index 30d6d0f68bc3..000000000000
--- a/include/asm-sparc64/fpumacro.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/fpumacro.h>
diff --git a/include/asm-sparc64/futex.h b/include/asm-sparc64/futex.h
deleted file mode 100644
index 1ceb0bb2fe53..000000000000
--- a/include/asm-sparc64/futex.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/futex.h>
diff --git a/include/asm-sparc64/hardirq.h b/include/asm-sparc64/hardirq.h
deleted file mode 100644
index 63dca3db11f3..000000000000
--- a/include/asm-sparc64/hardirq.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/hardirq.h>
diff --git a/include/asm-sparc64/head.h b/include/asm-sparc64/head.h
deleted file mode 100644
index 2254c09e53f9..000000000000
--- a/include/asm-sparc64/head.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/head.h>
diff --git a/include/asm-sparc64/hugetlb.h b/include/asm-sparc64/hugetlb.h
deleted file mode 100644
index 21d8f0a9c243..000000000000
--- a/include/asm-sparc64/hugetlb.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/hugetlb.h>
diff --git a/include/asm-sparc64/hvtramp.h b/include/asm-sparc64/hvtramp.h
deleted file mode 100644
index fb46bfe934a7..000000000000
--- a/include/asm-sparc64/hvtramp.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/hvtramp.h>
diff --git a/include/asm-sparc64/hw_irq.h b/include/asm-sparc64/hw_irq.h
deleted file mode 100644
index 16920a291f51..000000000000
--- a/include/asm-sparc64/hw_irq.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/hw_irq.h>
diff --git a/include/asm-sparc64/hypervisor.h b/include/asm-sparc64/hypervisor.h
deleted file mode 100644
index fe7e51a9e429..000000000000
--- a/include/asm-sparc64/hypervisor.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/hypervisor.h>
diff --git a/include/asm-sparc64/ide.h b/include/asm-sparc64/ide.h
deleted file mode 100644
index 7125317a428d..000000000000
--- a/include/asm-sparc64/ide.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/ide.h>
diff --git a/include/asm-sparc64/idprom.h b/include/asm-sparc64/idprom.h
deleted file mode 100644
index c22f9c30bc78..000000000000
--- a/include/asm-sparc64/idprom.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/idprom.h>
diff --git a/include/asm-sparc64/intr_queue.h b/include/asm-sparc64/intr_queue.h
deleted file mode 100644
index f7225015b3db..000000000000
--- a/include/asm-sparc64/intr_queue.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/intr_queue.h>
diff --git a/include/asm-sparc64/io.h b/include/asm-sparc64/io.h
deleted file mode 100644
index 25ff258dfd33..000000000000
--- a/include/asm-sparc64/io.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/io.h>
diff --git a/include/asm-sparc64/ioctl.h b/include/asm-sparc64/ioctl.h
deleted file mode 100644
index 18fc5623ff51..000000000000
--- a/include/asm-sparc64/ioctl.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/ioctl.h>
diff --git a/include/asm-sparc64/ioctls.h b/include/asm-sparc64/ioctls.h
deleted file mode 100644
index dcd5540ec103..000000000000
--- a/include/asm-sparc64/ioctls.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/ioctls.h>
diff --git a/include/asm-sparc64/iommu.h b/include/asm-sparc64/iommu.h
deleted file mode 100644
index 76252bb85e97..000000000000
--- a/include/asm-sparc64/iommu.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/iommu.h>
diff --git a/include/asm-sparc64/ipcbuf.h b/include/asm-sparc64/ipcbuf.h
deleted file mode 100644
index 41dfaf1149b5..000000000000
--- a/include/asm-sparc64/ipcbuf.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/ipcbuf.h>
diff --git a/include/asm-sparc64/irq.h b/include/asm-sparc64/irq.h
deleted file mode 100644
index b2102e65947c..000000000000
--- a/include/asm-sparc64/irq.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/irq.h>
diff --git a/include/asm-sparc64/irq_regs.h b/include/asm-sparc64/irq_regs.h
deleted file mode 100644
index 1e2b8a1e745a..000000000000
--- a/include/asm-sparc64/irq_regs.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/irq_regs.h>
diff --git a/include/asm-sparc64/irqflags.h b/include/asm-sparc64/irqflags.h
deleted file mode 100644
index 27b091fc3fa0..000000000000
--- a/include/asm-sparc64/irqflags.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/irqflags.h>
diff --git a/include/asm-sparc64/kdebug.h b/include/asm-sparc64/kdebug.h
deleted file mode 100644
index 78cfd5d2749b..000000000000
--- a/include/asm-sparc64/kdebug.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/kdebug.h>
diff --git a/include/asm-sparc64/kgdb.h b/include/asm-sparc64/kgdb.h
deleted file mode 100644
index aa6532fd3a13..000000000000
--- a/include/asm-sparc64/kgdb.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/kgdb.h>
diff --git a/include/asm-sparc64/kmap_types.h b/include/asm-sparc64/kmap_types.h
deleted file mode 100644
index 276530cf5395..000000000000
--- a/include/asm-sparc64/kmap_types.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/kmap_types.h>
diff --git a/include/asm-sparc64/kprobes.h b/include/asm-sparc64/kprobes.h
deleted file mode 100644
index c55e43e4d2a4..000000000000
--- a/include/asm-sparc64/kprobes.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/kprobes.h>
diff --git a/include/asm-sparc64/ldc.h b/include/asm-sparc64/ldc.h
deleted file mode 100644
index 40f3f231c457..000000000000
--- a/include/asm-sparc64/ldc.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/ldc.h>
diff --git a/include/asm-sparc64/linkage.h b/include/asm-sparc64/linkage.h
deleted file mode 100644
index 3ea4fd13f193..000000000000
--- a/include/asm-sparc64/linkage.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/linkage.h>
diff --git a/include/asm-sparc64/lmb.h b/include/asm-sparc64/lmb.h
deleted file mode 100644
index 3d04981701e2..000000000000
--- a/include/asm-sparc64/lmb.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/lmb.h>
diff --git a/include/asm-sparc64/local.h b/include/asm-sparc64/local.h
deleted file mode 100644
index c11c530f74d0..000000000000
--- a/include/asm-sparc64/local.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/local.h>
diff --git a/include/asm-sparc64/lsu.h b/include/asm-sparc64/lsu.h
deleted file mode 100644
index 4e3d8b128a58..000000000000
--- a/include/asm-sparc64/lsu.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/lsu.h>
diff --git a/include/asm-sparc64/mc146818rtc.h b/include/asm-sparc64/mc146818rtc.h
deleted file mode 100644
index 97842e6ed1c2..000000000000
--- a/include/asm-sparc64/mc146818rtc.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/mc146818rtc.h>
diff --git a/include/asm-sparc64/mdesc.h b/include/asm-sparc64/mdesc.h
deleted file mode 100644
index 165a19347286..000000000000
--- a/include/asm-sparc64/mdesc.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/mdesc.h>
diff --git a/include/asm-sparc64/mman.h b/include/asm-sparc64/mman.h
deleted file mode 100644
index 17ddb1724f51..000000000000
--- a/include/asm-sparc64/mman.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/mman.h>
diff --git a/include/asm-sparc64/mmu.h b/include/asm-sparc64/mmu.h
deleted file mode 100644
index e677a64d8db1..000000000000
--- a/include/asm-sparc64/mmu.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/mmu.h>
diff --git a/include/asm-sparc64/mmu_context.h b/include/asm-sparc64/mmu_context.h
deleted file mode 100644
index 877fee94bd4e..000000000000
--- a/include/asm-sparc64/mmu_context.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/mmu_context.h>
diff --git a/include/asm-sparc64/mmzone.h b/include/asm-sparc64/mmzone.h
deleted file mode 100644
index 43a710f7892a..000000000000
--- a/include/asm-sparc64/mmzone.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/mmzone.h>
diff --git a/include/asm-sparc64/module.h b/include/asm-sparc64/module.h
deleted file mode 100644
index a9606db55e4a..000000000000
--- a/include/asm-sparc64/module.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/module.h>
diff --git a/include/asm-sparc64/mostek.h b/include/asm-sparc64/mostek.h
deleted file mode 100644
index 95a752f7e875..000000000000
--- a/include/asm-sparc64/mostek.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/mostek.h>
diff --git a/include/asm-sparc64/msgbuf.h b/include/asm-sparc64/msgbuf.h
deleted file mode 100644
index 5b33cc9d9bfb..000000000000
--- a/include/asm-sparc64/msgbuf.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/msgbuf.h>
diff --git a/include/asm-sparc64/mutex.h b/include/asm-sparc64/mutex.h
deleted file mode 100644
index c0c0f8f260d6..000000000000
--- a/include/asm-sparc64/mutex.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/mutex.h>
diff --git a/include/asm-sparc64/ns87303.h b/include/asm-sparc64/ns87303.h
deleted file mode 100644
index 5f369d4df3db..000000000000
--- a/include/asm-sparc64/ns87303.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/ns87303.h>
diff --git a/include/asm-sparc64/of_device.h b/include/asm-sparc64/of_device.h
deleted file mode 100644
index a769fdbe164a..000000000000
--- a/include/asm-sparc64/of_device.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/of_device.h>
diff --git a/include/asm-sparc64/of_platform.h b/include/asm-sparc64/of_platform.h
deleted file mode 100644
index f7c427b8bc61..000000000000
--- a/include/asm-sparc64/of_platform.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/of_platform.h>
diff --git a/include/asm-sparc64/openprom.h b/include/asm-sparc64/openprom.h
deleted file mode 100644
index acf4b234fae3..000000000000
--- a/include/asm-sparc64/openprom.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/openprom.h>
diff --git a/include/asm-sparc64/openpromio.h b/include/asm-sparc64/openpromio.h
deleted file mode 100644
index 122fabda21f1..000000000000
--- a/include/asm-sparc64/openpromio.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/openpromio.h>
diff --git a/include/asm-sparc64/oplib.h b/include/asm-sparc64/oplib.h
deleted file mode 100644
index d93e44e63510..000000000000
--- a/include/asm-sparc64/oplib.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/oplib.h>
diff --git a/include/asm-sparc64/page.h b/include/asm-sparc64/page.h
deleted file mode 100644
index f46c1fb53028..000000000000
--- a/include/asm-sparc64/page.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/page.h>
diff --git a/include/asm-sparc64/param.h b/include/asm-sparc64/param.h
deleted file mode 100644
index 40c6dc110822..000000000000
--- a/include/asm-sparc64/param.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/param.h>
diff --git a/include/asm-sparc64/parport.h b/include/asm-sparc64/parport.h
deleted file mode 100644
index b4e4ca812eb6..000000000000
--- a/include/asm-sparc64/parport.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/parport.h>
diff --git a/include/asm-sparc64/pci.h b/include/asm-sparc64/pci.h
deleted file mode 100644
index da54c4d1f39c..000000000000
--- a/include/asm-sparc64/pci.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/pci.h>
diff --git a/include/asm-sparc64/percpu.h b/include/asm-sparc64/percpu.h
deleted file mode 100644
index 292729bb350f..000000000000
--- a/include/asm-sparc64/percpu.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/percpu.h>
diff --git a/include/asm-sparc64/perfctr.h b/include/asm-sparc64/perfctr.h
deleted file mode 100644
index 52073a9f8e30..000000000000
--- a/include/asm-sparc64/perfctr.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/perfctr.h>
diff --git a/include/asm-sparc64/pgalloc.h b/include/asm-sparc64/pgalloc.h
deleted file mode 100644
index bec31641011c..000000000000
--- a/include/asm-sparc64/pgalloc.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/pgalloc.h>
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h
deleted file mode 100644
index 9decbd99aeff..000000000000
--- a/include/asm-sparc64/pgtable.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/pgtable.h>
diff --git a/include/asm-sparc64/pil.h b/include/asm-sparc64/pil.h
deleted file mode 100644
index d805f33f1e0f..000000000000
--- a/include/asm-sparc64/pil.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/pil.h>
diff --git a/include/asm-sparc64/poll.h b/include/asm-sparc64/poll.h
deleted file mode 100644
index 8e2f31b4641a..000000000000
--- a/include/asm-sparc64/poll.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/poll.h>
diff --git a/include/asm-sparc64/posix_types.h b/include/asm-sparc64/posix_types.h
deleted file mode 100644
index 8cee99200232..000000000000
--- a/include/asm-sparc64/posix_types.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/posix_types.h>
diff --git a/include/asm-sparc64/processor.h b/include/asm-sparc64/processor.h
deleted file mode 100644
index 21de6cc182eb..000000000000
--- a/include/asm-sparc64/processor.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/processor.h>
diff --git a/include/asm-sparc64/prom.h b/include/asm-sparc64/prom.h
deleted file mode 100644
index 5fa166ee3ffa..000000000000
--- a/include/asm-sparc64/prom.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/prom.h>
diff --git a/include/asm-sparc64/psrcompat.h b/include/asm-sparc64/psrcompat.h
deleted file mode 100644
index 587846f48358..000000000000
--- a/include/asm-sparc64/psrcompat.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/psrcompat.h>
diff --git a/include/asm-sparc64/pstate.h b/include/asm-sparc64/pstate.h
deleted file mode 100644
index 3ccf0be25360..000000000000
--- a/include/asm-sparc64/pstate.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/pstate.h>
diff --git a/include/asm-sparc64/ptrace.h b/include/asm-sparc64/ptrace.h
deleted file mode 100644
index 1a55b9fb3b0c..000000000000
--- a/include/asm-sparc64/ptrace.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/ptrace.h>
diff --git a/include/asm-sparc64/reboot.h b/include/asm-sparc64/reboot.h
deleted file mode 100644
index 0d72eb811cc8..000000000000
--- a/include/asm-sparc64/reboot.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/reboot.h>
diff --git a/include/asm-sparc64/reg.h b/include/asm-sparc64/reg.h
deleted file mode 100644
index 495bab27da07..000000000000
--- a/include/asm-sparc64/reg.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/reg.h>
diff --git a/include/asm-sparc64/resource.h b/include/asm-sparc64/resource.h
deleted file mode 100644
index 46e3bc0de476..000000000000
--- a/include/asm-sparc64/resource.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/resource.h>
diff --git a/include/asm-sparc64/rtc.h b/include/asm-sparc64/rtc.h
deleted file mode 100644
index e49a9685aead..000000000000
--- a/include/asm-sparc64/rtc.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/rtc.h>
diff --git a/include/asm-sparc64/rwsem-const.h b/include/asm-sparc64/rwsem-const.h
deleted file mode 100644
index 2a1de315c86a..000000000000
--- a/include/asm-sparc64/rwsem-const.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/rwsem-const.h>
diff --git a/include/asm-sparc64/rwsem.h b/include/asm-sparc64/rwsem.h
deleted file mode 100644
index 6943c56ed087..000000000000
--- a/include/asm-sparc64/rwsem.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/rwsem.h>
diff --git a/include/asm-sparc64/sbus.h b/include/asm-sparc64/sbus.h
deleted file mode 100644
index 0cab0e89b874..000000000000
--- a/include/asm-sparc64/sbus.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/sbus.h>
diff --git a/include/asm-sparc64/scatterlist.h b/include/asm-sparc64/scatterlist.h
deleted file mode 100644
index b7fef95953ca..000000000000
--- a/include/asm-sparc64/scatterlist.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/scatterlist.h>
diff --git a/include/asm-sparc64/scratchpad.h b/include/asm-sparc64/scratchpad.h
deleted file mode 100644
index 23675f6a915a..000000000000
--- a/include/asm-sparc64/scratchpad.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/scratchpad.h>
diff --git a/include/asm-sparc64/seccomp.h b/include/asm-sparc64/seccomp.h
deleted file mode 100644
index f22f02a08a61..000000000000
--- a/include/asm-sparc64/seccomp.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/seccomp.h>
diff --git a/include/asm-sparc64/sections.h b/include/asm-sparc64/sections.h
deleted file mode 100644
index 721496f8b2be..000000000000
--- a/include/asm-sparc64/sections.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/sections.h>
diff --git a/include/asm-sparc64/sembuf.h b/include/asm-sparc64/sembuf.h
deleted file mode 100644
index c55b95214136..000000000000
--- a/include/asm-sparc64/sembuf.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/sembuf.h>
diff --git a/include/asm-sparc64/setup.h b/include/asm-sparc64/setup.h
deleted file mode 100644
index 7143d06b2c55..000000000000
--- a/include/asm-sparc64/setup.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/setup.h>
diff --git a/include/asm-sparc64/sfafsr.h b/include/asm-sparc64/sfafsr.h
deleted file mode 100644
index 8036fc377a4d..000000000000
--- a/include/asm-sparc64/sfafsr.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/sfafsr.h>
diff --git a/include/asm-sparc64/sfp-machine.h b/include/asm-sparc64/sfp-machine.h
deleted file mode 100644
index 7bbc4fecdc7d..000000000000
--- a/include/asm-sparc64/sfp-machine.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/sfp-machine.h>
diff --git a/include/asm-sparc64/shmbuf.h b/include/asm-sparc64/shmbuf.h
deleted file mode 100644
index 0c54a2d68681..000000000000
--- a/include/asm-sparc64/shmbuf.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/shmbuf.h>
diff --git a/include/asm-sparc64/shmparam.h b/include/asm-sparc64/shmparam.h
deleted file mode 100644
index 5fa3a9b05e7f..000000000000
--- a/include/asm-sparc64/shmparam.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/shmparam.h>
diff --git a/include/asm-sparc64/sigcontext.h b/include/asm-sparc64/sigcontext.h
deleted file mode 100644
index 5b16dcce44f2..000000000000
--- a/include/asm-sparc64/sigcontext.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/sigcontext.h>
diff --git a/include/asm-sparc64/siginfo.h b/include/asm-sparc64/siginfo.h
deleted file mode 100644
index 8ffd6ebabc7a..000000000000
--- a/include/asm-sparc64/siginfo.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/siginfo.h>
diff --git a/include/asm-sparc64/signal.h b/include/asm-sparc64/signal.h
deleted file mode 100644
index 79705e5d49c3..000000000000
--- a/include/asm-sparc64/signal.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/signal.h>
diff --git a/include/asm-sparc64/smp.h b/include/asm-sparc64/smp.h
deleted file mode 100644
index 5095a2cbea52..000000000000
--- a/include/asm-sparc64/smp.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/smp.h>
diff --git a/include/asm-sparc64/socket.h b/include/asm-sparc64/socket.h
deleted file mode 100644
index 13e0d5d94bb3..000000000000
--- a/include/asm-sparc64/socket.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/socket.h>
diff --git a/include/asm-sparc64/sockios.h b/include/asm-sparc64/sockios.h
deleted file mode 100644
index 2cb4b641482c..000000000000
--- a/include/asm-sparc64/sockios.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/sockios.h>
diff --git a/include/asm-sparc64/sparsemem.h b/include/asm-sparc64/sparsemem.h
deleted file mode 100644
index e681f22a97ae..000000000000
--- a/include/asm-sparc64/sparsemem.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/sparsemem.h>
diff --git a/include/asm-sparc64/spinlock.h b/include/asm-sparc64/spinlock.h
deleted file mode 100644
index 0115b8156eb8..000000000000
--- a/include/asm-sparc64/spinlock.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/spinlock.h>
diff --git a/include/asm-sparc64/spinlock_types.h b/include/asm-sparc64/spinlock_types.h
deleted file mode 100644
index 48d81c8734b5..000000000000
--- a/include/asm-sparc64/spinlock_types.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/spinlock_types.h>
diff --git a/include/asm-sparc64/spitfire.h b/include/asm-sparc64/spitfire.h
deleted file mode 100644
index 4430d2fbb0dc..000000000000
--- a/include/asm-sparc64/spitfire.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/spitfire.h>
diff --git a/include/asm-sparc64/sstate.h b/include/asm-sparc64/sstate.h
deleted file mode 100644
index 97720ce2fd43..000000000000
--- a/include/asm-sparc64/sstate.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/sstate.h>
diff --git a/include/asm-sparc64/stacktrace.h b/include/asm-sparc64/stacktrace.h
deleted file mode 100644
index adc9b92c0ef1..000000000000
--- a/include/asm-sparc64/stacktrace.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/stacktrace.h>
diff --git a/include/asm-sparc64/starfire.h b/include/asm-sparc64/starfire.h
deleted file mode 100644
index db97daa3bed4..000000000000
--- a/include/asm-sparc64/starfire.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/starfire.h>
diff --git a/include/asm-sparc64/stat.h b/include/asm-sparc64/stat.h
deleted file mode 100644
index b108a866256b..000000000000
--- a/include/asm-sparc64/stat.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/stat.h>
diff --git a/include/asm-sparc64/statfs.h b/include/asm-sparc64/statfs.h
deleted file mode 100644
index 5503d6a4c67e..000000000000
--- a/include/asm-sparc64/statfs.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/statfs.h>
diff --git a/include/asm-sparc64/string.h b/include/asm-sparc64/string.h
deleted file mode 100644
index 5018cd8b6ad0..000000000000
--- a/include/asm-sparc64/string.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/string.h>
diff --git a/include/asm-sparc64/sunbpp.h b/include/asm-sparc64/sunbpp.h
deleted file mode 100644
index 9632be290eb5..000000000000
--- a/include/asm-sparc64/sunbpp.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/sunbpp.h>
diff --git a/include/asm-sparc64/syscalls.h b/include/asm-sparc64/syscalls.h
deleted file mode 100644
index 3477b16e30ca..000000000000
--- a/include/asm-sparc64/syscalls.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/syscalls.h>
diff --git a/include/asm-sparc64/system.h b/include/asm-sparc64/system.h
deleted file mode 100644
index be2603c2e527..000000000000
--- a/include/asm-sparc64/system.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/system.h>
diff --git a/include/asm-sparc64/termbits.h b/include/asm-sparc64/termbits.h
deleted file mode 100644
index e03f97592c70..000000000000
--- a/include/asm-sparc64/termbits.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/termbits.h>
diff --git a/include/asm-sparc64/termios.h b/include/asm-sparc64/termios.h
deleted file mode 100644
index 940495eb05cc..000000000000
--- a/include/asm-sparc64/termios.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/termios.h>
diff --git a/include/asm-sparc64/thread_info.h b/include/asm-sparc64/thread_info.h
deleted file mode 100644
index 92bed7913395..000000000000
--- a/include/asm-sparc64/thread_info.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/thread_info.h>
diff --git a/include/asm-sparc64/timer.h b/include/asm-sparc64/timer.h
deleted file mode 100644
index 88026d83cc93..000000000000
--- a/include/asm-sparc64/timer.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/timer.h>
diff --git a/include/asm-sparc64/timex.h b/include/asm-sparc64/timex.h
deleted file mode 100644
index 8dd59ee24b48..000000000000
--- a/include/asm-sparc64/timex.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/timex.h>
diff --git a/include/asm-sparc64/tlb.h b/include/asm-sparc64/tlb.h
deleted file mode 100644
index ae92fce10936..000000000000
--- a/include/asm-sparc64/tlb.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/tlb.h>
diff --git a/include/asm-sparc64/tlbflush.h b/include/asm-sparc64/tlbflush.h
deleted file mode 100644
index a43979a06cd9..000000000000
--- a/include/asm-sparc64/tlbflush.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/tlbflush.h>
diff --git a/include/asm-sparc64/topology.h b/include/asm-sparc64/topology.h
deleted file mode 100644
index 46999b60fbba..000000000000
--- a/include/asm-sparc64/topology.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/topology.h>
diff --git a/include/asm-sparc64/tsb.h b/include/asm-sparc64/tsb.h
deleted file mode 100644
index 3677a302ea3e..000000000000
--- a/include/asm-sparc64/tsb.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/tsb.h>
diff --git a/include/asm-sparc64/ttable.h b/include/asm-sparc64/ttable.h
deleted file mode 100644
index a550f1bf6f9b..000000000000
--- a/include/asm-sparc64/ttable.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/ttable.h>
diff --git a/include/asm-sparc64/types.h b/include/asm-sparc64/types.h
deleted file mode 100644
index cfbfad5043eb..000000000000
--- a/include/asm-sparc64/types.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/types.h>
diff --git a/include/asm-sparc64/uaccess.h b/include/asm-sparc64/uaccess.h
deleted file mode 100644
index 2872d22844f3..000000000000
--- a/include/asm-sparc64/uaccess.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/uaccess.h>
diff --git a/include/asm-sparc64/uctx.h b/include/asm-sparc64/uctx.h
deleted file mode 100644
index 9e1b5794b07f..000000000000
--- a/include/asm-sparc64/uctx.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/uctx.h>
diff --git a/include/asm-sparc64/unaligned.h b/include/asm-sparc64/unaligned.h
deleted file mode 100644
index 19fbf9508acf..000000000000
--- a/include/asm-sparc64/unaligned.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/unaligned.h>
diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h
deleted file mode 100644
index ad86e0b7a455..000000000000
--- a/include/asm-sparc64/unistd.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/unistd.h>
diff --git a/include/asm-sparc64/upa.h b/include/asm-sparc64/upa.h
deleted file mode 100644
index aab72930815a..000000000000
--- a/include/asm-sparc64/upa.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/upa.h>
diff --git a/include/asm-sparc64/user.h b/include/asm-sparc64/user.h
deleted file mode 100644
index 29fc6e906c29..000000000000
--- a/include/asm-sparc64/user.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/user.h>
diff --git a/include/asm-sparc64/utrap.h b/include/asm-sparc64/utrap.h
deleted file mode 100644
index b030a41f1895..000000000000
--- a/include/asm-sparc64/utrap.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/utrap.h>
diff --git a/include/asm-sparc64/vga.h b/include/asm-sparc64/vga.h
deleted file mode 100644
index fbf4d58a56f0..000000000000
--- a/include/asm-sparc64/vga.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/vga.h>
diff --git a/include/asm-sparc64/vio.h b/include/asm-sparc64/vio.h
deleted file mode 100644
index 299b26ab81a7..000000000000
--- a/include/asm-sparc64/vio.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/vio.h>
diff --git a/include/asm-sparc64/visasm.h b/include/asm-sparc64/visasm.h
deleted file mode 100644
index 837a12278f4a..000000000000
--- a/include/asm-sparc64/visasm.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/visasm.h>
diff --git a/include/asm-sparc64/watchdog.h b/include/asm-sparc64/watchdog.h
deleted file mode 100644
index b0f2857145f7..000000000000
--- a/include/asm-sparc64/watchdog.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/watchdog.h>
diff --git a/include/asm-sparc64/xor.h b/include/asm-sparc64/xor.h
deleted file mode 100644
index ef187cc07ed5..000000000000
--- a/include/asm-sparc64/xor.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-sparc/xor.h>
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
index 743d85fcd651..1c2e3ec2eb57 100644
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -226,7 +226,7 @@ static inline void dccp_csum_outgoing(struct sk_buff *skb)
226 226
227extern void dccp_v4_send_check(struct sock *sk, int len, struct sk_buff *skb); 227extern void dccp_v4_send_check(struct sock *sk, int len, struct sk_buff *skb);
228 228
229extern int dccp_retransmit_skb(struct sock *sk, struct sk_buff *skb); 229extern int dccp_retransmit_skb(struct sock *sk);
230 230
231extern void dccp_send_ack(struct sock *sk); 231extern void dccp_send_ack(struct sock *sk);
232extern void dccp_reqsk_send_ack(struct sk_buff *sk, struct request_sock *rsk); 232extern void dccp_reqsk_send_ack(struct sk_buff *sk, struct request_sock *rsk);
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index a835b88237cb..882c5c4de69e 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -196,8 +196,8 @@ static inline void dccp_do_pmtu_discovery(struct sock *sk,
196static void dccp_v4_err(struct sk_buff *skb, u32 info) 196static void dccp_v4_err(struct sk_buff *skb, u32 info)
197{ 197{
198 const struct iphdr *iph = (struct iphdr *)skb->data; 198 const struct iphdr *iph = (struct iphdr *)skb->data;
199 const struct dccp_hdr *dh = (struct dccp_hdr *)(skb->data + 199 const u8 offset = iph->ihl << 2;
200 (iph->ihl << 2)); 200 const struct dccp_hdr *dh = (struct dccp_hdr *)(skb->data + offset);
201 struct dccp_sock *dp; 201 struct dccp_sock *dp;
202 struct inet_sock *inet; 202 struct inet_sock *inet;
203 const int type = icmp_hdr(skb)->type; 203 const int type = icmp_hdr(skb)->type;
@@ -207,7 +207,8 @@ static void dccp_v4_err(struct sk_buff *skb, u32 info)
207 int err; 207 int err;
208 struct net *net = dev_net(skb->dev); 208 struct net *net = dev_net(skb->dev);
209 209
210 if (skb->len < (iph->ihl << 2) + 8) { 210 if (skb->len < offset + sizeof(*dh) ||
211 skb->len < offset + __dccp_basic_hdr_len(dh)) {
211 ICMP_INC_STATS_BH(net, ICMP_MIB_INERRORS); 212 ICMP_INC_STATS_BH(net, ICMP_MIB_INERRORS);
212 return; 213 return;
213 } 214 }
@@ -238,7 +239,7 @@ static void dccp_v4_err(struct sk_buff *skb, u32 info)
238 dp = dccp_sk(sk); 239 dp = dccp_sk(sk);
239 seq = dccp_hdr_seq(dh); 240 seq = dccp_hdr_seq(dh);
240 if ((1 << sk->sk_state) & ~(DCCPF_REQUESTING | DCCPF_LISTEN) && 241 if ((1 << sk->sk_state) & ~(DCCPF_REQUESTING | DCCPF_LISTEN) &&
241 !between48(seq, dp->dccps_swl, dp->dccps_swh)) { 242 !between48(seq, dp->dccps_awl, dp->dccps_awh)) {
242 NET_INC_STATS_BH(net, LINUX_MIB_OUTOFWINDOWICMPS); 243 NET_INC_STATS_BH(net, LINUX_MIB_OUTOFWINDOWICMPS);
243 goto out; 244 goto out;
244 } 245 }
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index da509127e00c..5e1ee0da2c40 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -89,12 +89,19 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
89{ 89{
90 struct ipv6hdr *hdr = (struct ipv6hdr *)skb->data; 90 struct ipv6hdr *hdr = (struct ipv6hdr *)skb->data;
91 const struct dccp_hdr *dh = (struct dccp_hdr *)(skb->data + offset); 91 const struct dccp_hdr *dh = (struct dccp_hdr *)(skb->data + offset);
92 struct dccp_sock *dp;
92 struct ipv6_pinfo *np; 93 struct ipv6_pinfo *np;
93 struct sock *sk; 94 struct sock *sk;
94 int err; 95 int err;
95 __u64 seq; 96 __u64 seq;
96 struct net *net = dev_net(skb->dev); 97 struct net *net = dev_net(skb->dev);
97 98
99 if (skb->len < offset + sizeof(*dh) ||
100 skb->len < offset + __dccp_basic_hdr_len(dh)) {
101 ICMP6_INC_STATS_BH(__in6_dev_get(skb->dev), ICMP6_MIB_INERRORS);
102 return;
103 }
104
98 sk = inet6_lookup(net, &dccp_hashinfo, 105 sk = inet6_lookup(net, &dccp_hashinfo,
99 &hdr->daddr, dh->dccph_dport, 106 &hdr->daddr, dh->dccph_dport,
100 &hdr->saddr, dh->dccph_sport, inet6_iif(skb)); 107 &hdr->saddr, dh->dccph_sport, inet6_iif(skb));
@@ -116,6 +123,14 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
116 if (sk->sk_state == DCCP_CLOSED) 123 if (sk->sk_state == DCCP_CLOSED)
117 goto out; 124 goto out;
118 125
126 dp = dccp_sk(sk);
127 seq = dccp_hdr_seq(dh);
128 if ((1 << sk->sk_state) & ~(DCCPF_REQUESTING | DCCPF_LISTEN) &&
129 !between48(seq, dp->dccps_awl, dp->dccps_awh)) {
130 NET_INC_STATS_BH(net, LINUX_MIB_OUTOFWINDOWICMPS);
131 goto out;
132 }
133
119 np = inet6_sk(sk); 134 np = inet6_sk(sk);
120 135
121 if (type == ICMPV6_PKT_TOOBIG) { 136 if (type == ICMPV6_PKT_TOOBIG) {
@@ -168,7 +183,6 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
168 183
169 icmpv6_err_convert(type, code, &err); 184 icmpv6_err_convert(type, code, &err);
170 185
171 seq = dccp_hdr_seq(dh);
172 /* Might be for an request_sock */ 186 /* Might be for an request_sock */
173 switch (sk->sk_state) { 187 switch (sk->sk_state) {
174 struct request_sock *req, **prev; 188 struct request_sock *req, **prev;
diff --git a/net/dccp/output.c b/net/dccp/output.c
index fe20068c5d8e..d06945c7d3df 100644
--- a/net/dccp/output.c
+++ b/net/dccp/output.c
@@ -53,8 +53,11 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)
53 dccp_packet_hdr_len(dcb->dccpd_type); 53 dccp_packet_hdr_len(dcb->dccpd_type);
54 int err, set_ack = 1; 54 int err, set_ack = 1;
55 u64 ackno = dp->dccps_gsr; 55 u64 ackno = dp->dccps_gsr;
56 56 /*
57 dccp_inc_seqno(&dp->dccps_gss); 57 * Increment GSS here already in case the option code needs it.
58 * Update GSS for real only if option processing below succeeds.
59 */
60 dcb->dccpd_seq = ADD48(dp->dccps_gss, 1);
58 61
59 switch (dcb->dccpd_type) { 62 switch (dcb->dccpd_type) {
60 case DCCP_PKT_DATA: 63 case DCCP_PKT_DATA:
@@ -66,6 +69,9 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)
66 69
67 case DCCP_PKT_REQUEST: 70 case DCCP_PKT_REQUEST:
68 set_ack = 0; 71 set_ack = 0;
72 /* Use ISS on the first (non-retransmitted) Request. */
73 if (icsk->icsk_retransmits == 0)
74 dcb->dccpd_seq = dp->dccps_iss;
69 /* fall through */ 75 /* fall through */
70 76
71 case DCCP_PKT_SYNC: 77 case DCCP_PKT_SYNC:
@@ -84,8 +90,6 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)
84 break; 90 break;
85 } 91 }
86 92
87 dcb->dccpd_seq = dp->dccps_gss;
88
89 if (dccp_insert_options(sk, skb)) { 93 if (dccp_insert_options(sk, skb)) {
90 kfree_skb(skb); 94 kfree_skb(skb);
91 return -EPROTO; 95 return -EPROTO;
@@ -103,7 +107,7 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)
103 /* XXX For now we're using only 48 bits sequence numbers */ 107 /* XXX For now we're using only 48 bits sequence numbers */
104 dh->dccph_x = 1; 108 dh->dccph_x = 1;
105 109
106 dp->dccps_awh = dp->dccps_gss; 110 dccp_update_gss(sk, dcb->dccpd_seq);
107 dccp_hdr_set_seq(dh, dp->dccps_gss); 111 dccp_hdr_set_seq(dh, dp->dccps_gss);
108 if (set_ack) 112 if (set_ack)
109 dccp_hdr_set_ack(dccp_hdr_ack_bits(skb), ackno); 113 dccp_hdr_set_ack(dccp_hdr_ack_bits(skb), ackno);
@@ -112,6 +116,11 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)
112 case DCCP_PKT_REQUEST: 116 case DCCP_PKT_REQUEST:
113 dccp_hdr_request(skb)->dccph_req_service = 117 dccp_hdr_request(skb)->dccph_req_service =
114 dp->dccps_service; 118 dp->dccps_service;
119 /*
120 * Limit Ack window to ISS <= P.ackno <= GSS, so that
121 * only Responses to Requests we sent are considered.
122 */
123 dp->dccps_awl = dp->dccps_iss;
115 break; 124 break;
116 case DCCP_PKT_RESET: 125 case DCCP_PKT_RESET:
117 dccp_hdr_reset(skb)->dccph_reset_code = 126 dccp_hdr_reset(skb)->dccph_reset_code =
@@ -284,14 +293,26 @@ void dccp_write_xmit(struct sock *sk, int block)
284 } 293 }
285} 294}
286 295
287int dccp_retransmit_skb(struct sock *sk, struct sk_buff *skb) 296/**
297 * dccp_retransmit_skb - Retransmit Request, Close, or CloseReq packets
298 * There are only four retransmittable packet types in DCCP:
299 * - Request in client-REQUEST state (sec. 8.1.1),
300 * - CloseReq in server-CLOSEREQ state (sec. 8.3),
301 * - Close in node-CLOSING state (sec. 8.3),
302 * - Acks in client-PARTOPEN state (sec. 8.1.5, handled by dccp_delack_timer()).
303 * This function expects sk->sk_send_head to contain the original skb.
304 */
305int dccp_retransmit_skb(struct sock *sk)
288{ 306{
307 WARN_ON(sk->sk_send_head == NULL);
308
289 if (inet_csk(sk)->icsk_af_ops->rebuild_header(sk) != 0) 309 if (inet_csk(sk)->icsk_af_ops->rebuild_header(sk) != 0)
290 return -EHOSTUNREACH; /* Routing failure or similar. */ 310 return -EHOSTUNREACH; /* Routing failure or similar. */
291 311
292 return dccp_transmit_skb(sk, (skb_cloned(skb) ? 312 /* this count is used to distinguish original and retransmitted skb */
293 pskb_copy(skb, GFP_ATOMIC): 313 inet_csk(sk)->icsk_retransmits++;
294 skb_clone(skb, GFP_ATOMIC))); 314
315 return dccp_transmit_skb(sk, skb_clone(sk->sk_send_head, GFP_ATOMIC));
295} 316}
296 317
297struct sk_buff *dccp_make_response(struct sock *sk, struct dst_entry *dst, 318struct sk_buff *dccp_make_response(struct sock *sk, struct dst_entry *dst,
@@ -437,19 +458,7 @@ static inline void dccp_connect_init(struct sock *sk)
437 458
438 dccp_sync_mss(sk, dst_mtu(dst)); 459 dccp_sync_mss(sk, dst_mtu(dst));
439 460
440 /* 461 /* Initialise GAR as per 8.5; AWL/AWH are set in dccp_transmit_skb() */
441 * SWL and AWL are initially adjusted so that they are not less than
442 * the initial Sequence Numbers received and sent, respectively:
443 * SWL := max(GSR + 1 - floor(W/4), ISR),
444 * AWL := max(GSS - W' + 1, ISS).
445 * These adjustments MUST be applied only at the beginning of the
446 * connection.
447 */
448 dccp_update_gss(sk, dp->dccps_iss);
449 dccp_set_seqno(&dp->dccps_awl, max48(dp->dccps_awl, dp->dccps_iss));
450
451 /* S.GAR - greatest valid acknowledgement number received on a non-Sync;
452 * initialized to S.ISS (sec. 8.5) */
453 dp->dccps_gar = dp->dccps_iss; 462 dp->dccps_gar = dp->dccps_iss;
454 463
455 icsk->icsk_retransmits = 0; 464 icsk->icsk_retransmits = 0;
diff --git a/net/dccp/timer.c b/net/dccp/timer.c
index 6a5b961b6f5c..54b3c7e9e016 100644
--- a/net/dccp/timer.c
+++ b/net/dccp/timer.c
@@ -99,21 +99,11 @@ static void dccp_retransmit_timer(struct sock *sk)
99 } 99 }
100 100
101 /* 101 /*
102 * sk->sk_send_head has to have one skb with
103 * DCCP_SKB_CB(skb)->dccpd_type set to one of the retransmittable DCCP
104 * packet types. The only packets eligible for retransmission are:
105 * -- Requests in client-REQUEST state (sec. 8.1.1)
106 * -- Acks in client-PARTOPEN state (sec. 8.1.5)
107 * -- CloseReq in server-CLOSEREQ state (sec. 8.3)
108 * -- Close in node-CLOSING state (sec. 8.3) */
109 WARN_ON(sk->sk_send_head == NULL);
110
111 /*
112 * More than than 4MSL (8 minutes) has passed, a RESET(aborted) was 102 * More than than 4MSL (8 minutes) has passed, a RESET(aborted) was
113 * sent, no need to retransmit, this sock is dead. 103 * sent, no need to retransmit, this sock is dead.
114 */ 104 */
115 if (dccp_write_timeout(sk)) 105 if (dccp_write_timeout(sk))
116 goto out; 106 return;
117 107
118 /* 108 /*
119 * We want to know the number of packets retransmitted, not the 109 * We want to know the number of packets retransmitted, not the
@@ -122,30 +112,28 @@ static void dccp_retransmit_timer(struct sock *sk)
122 if (icsk->icsk_retransmits == 0) 112 if (icsk->icsk_retransmits == 0)
123 DCCP_INC_STATS_BH(DCCP_MIB_TIMEOUTS); 113 DCCP_INC_STATS_BH(DCCP_MIB_TIMEOUTS);
124 114
125 if (dccp_retransmit_skb(sk, sk->sk_send_head) < 0) { 115 if (dccp_retransmit_skb(sk) != 0) {
126 /* 116 /*
127 * Retransmission failed because of local congestion, 117 * Retransmission failed because of local congestion,
128 * do not backoff. 118 * do not backoff.
129 */ 119 */
130 if (icsk->icsk_retransmits == 0) 120 if (--icsk->icsk_retransmits == 0)
131 icsk->icsk_retransmits = 1; 121 icsk->icsk_retransmits = 1;
132 inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, 122 inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS,
133 min(icsk->icsk_rto, 123 min(icsk->icsk_rto,
134 TCP_RESOURCE_PROBE_INTERVAL), 124 TCP_RESOURCE_PROBE_INTERVAL),
135 DCCP_RTO_MAX); 125 DCCP_RTO_MAX);
136 goto out; 126 return;
137 } 127 }
138 128
139backoff: 129backoff:
140 icsk->icsk_backoff++; 130 icsk->icsk_backoff++;
141 icsk->icsk_retransmits++;
142 131
143 icsk->icsk_rto = min(icsk->icsk_rto << 1, DCCP_RTO_MAX); 132 icsk->icsk_rto = min(icsk->icsk_rto << 1, DCCP_RTO_MAX);
144 inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, icsk->icsk_rto, 133 inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, icsk->icsk_rto,
145 DCCP_RTO_MAX); 134 DCCP_RTO_MAX);
146 if (icsk->icsk_retransmits > sysctl_dccp_retries1) 135 if (icsk->icsk_retransmits > sysctl_dccp_retries1)
147 __sk_dst_reset(sk); 136 __sk_dst_reset(sk);
148out:;
149} 137}
150 138
151static void dccp_write_timer(unsigned long data) 139static void dccp_write_timer(unsigned long data)
diff --git a/net/ipv4/ipcomp.c b/net/ipv4/ipcomp.c
index a42b64d040c4..38ccb6dfb02e 100644
--- a/net/ipv4/ipcomp.c
+++ b/net/ipv4/ipcomp.c
@@ -104,9 +104,7 @@ out:
104 104
105static int ipcomp4_init_state(struct xfrm_state *x) 105static int ipcomp4_init_state(struct xfrm_state *x)
106{ 106{
107 int err; 107 int err = -EINVAL;
108 struct ipcomp_data *ipcd;
109 struct xfrm_algo_desc *calg_desc;
110 108
111 x->props.header_len = 0; 109 x->props.header_len = 0;
112 switch (x->props.mode) { 110 switch (x->props.mode) {
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c
index 0cfcea42153a..4545e4306862 100644
--- a/net/ipv6/ipcomp6.c
+++ b/net/ipv6/ipcomp6.c
@@ -134,9 +134,7 @@ out:
134 134
135static int ipcomp6_init_state(struct xfrm_state *x) 135static int ipcomp6_init_state(struct xfrm_state *x)
136{ 136{
137 int err; 137 int err = -EINVAL;
138 struct ipcomp_data *ipcd;
139 struct xfrm_algo_desc *calg_desc;
140 138
141 x->props.header_len = 0; 139 x->props.header_len = 0;
142 switch (x->props.mode) { 140 switch (x->props.mode) {