aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boot/dts/at91sam9g20ek_common.dtsi4
-rw-r--r--arch/arm/kernel/entry-common.S4
-rw-r--r--arch/arm/mach-at91/Kconfig10
-rw-r--r--arch/arm/mach-at91/at91rm9200.c2
-rw-r--r--arch/arm/mach-at91/at91rm9200_devices.c4
-rw-r--r--arch/arm/mach-at91/at91sam9260.c4
-rw-r--r--arch/arm/mach-at91/at91sam9260_devices.c4
-rw-r--r--arch/arm/mach-at91/at91sam9261.c4
-rw-r--r--arch/arm/mach-at91/at91sam9261_devices.c4
-rw-r--r--arch/arm/mach-at91/at91sam9263.c2
-rw-r--r--arch/arm/mach-at91/at91sam9263_devices.c4
-rw-r--r--arch/arm/mach-at91/at91sam9rl_devices.c4
-rw-r--r--arch/arm/mach-at91/board-neocore926.c2
-rw-r--r--arch/arm/mach-at91/board-sam9261ek.c2
-rw-r--r--arch/arm/mach-at91/board-sam9263ek.c2
-rw-r--r--arch/arm/mach-at91/generic.h3
-rw-r--r--arch/arm/mach-at91/irq.c9
-rw-r--r--arch/arm/mach-at91/setup.c4
-rw-r--r--arch/arm/mach-omap1/board-ams-delta.c12
-rw-r--r--arch/arm/mach-prima2/include/mach/gpio.h13
-rw-r--r--arch/arm64/Kconfig1
-rw-r--r--arch/arm64/include/asm/Kbuild1
-rw-r--r--arch/arm64/include/asm/linkage.h7
-rw-r--r--arch/arm64/include/asm/processor.h10
-rw-r--r--arch/arm64/include/uapi/asm/ptrace.h3
-rw-r--r--arch/arm64/kernel/ptrace.c73
-rw-r--r--arch/arm64/kernel/setup.c12
-rw-r--r--arch/arm64/kernel/smp.c1
-rw-r--r--arch/arm64/kernel/vdso.c20
-rw-r--r--arch/frv/kernel/entry.S4
-rw-r--r--arch/frv/kernel/process.c2
-rw-r--r--arch/frv/kernel/setup.c2
-rw-r--r--arch/hexagon/include/asm/Kbuild3
-rw-r--r--arch/hexagon/include/asm/atomic.h2
-rw-r--r--arch/hexagon/include/asm/barrier.h2
-rw-r--r--arch/hexagon/include/asm/bitops.h2
-rw-r--r--arch/hexagon/include/asm/cache.h2
-rw-r--r--arch/hexagon/include/asm/cacheflush.h2
-rw-r--r--arch/hexagon/include/asm/checksum.h2
-rw-r--r--arch/hexagon/include/asm/cmpxchg.h2
-rw-r--r--arch/hexagon/include/asm/delay.h2
-rw-r--r--arch/hexagon/include/asm/dma-mapping.h2
-rw-r--r--arch/hexagon/include/asm/dma.h2
-rw-r--r--arch/hexagon/include/asm/elf.h2
-rw-r--r--arch/hexagon/include/asm/exec.h2
-rw-r--r--arch/hexagon/include/asm/fixmap.h2
-rw-r--r--arch/hexagon/include/asm/hexagon_vm.h2
-rw-r--r--arch/hexagon/include/asm/intrinsics.h2
-rw-r--r--arch/hexagon/include/asm/io.h2
-rw-r--r--arch/hexagon/include/asm/irq.h2
-rw-r--r--arch/hexagon/include/asm/irqflags.h2
-rw-r--r--arch/hexagon/include/asm/kgdb.h2
-rw-r--r--arch/hexagon/include/asm/linkage.h2
-rw-r--r--arch/hexagon/include/asm/mem-layout.h2
-rw-r--r--arch/hexagon/include/asm/mmu.h2
-rw-r--r--arch/hexagon/include/asm/mmu_context.h2
-rw-r--r--arch/hexagon/include/asm/module.h2
-rw-r--r--arch/hexagon/include/asm/page.h2
-rw-r--r--arch/hexagon/include/asm/perf_event.h2
-rw-r--r--arch/hexagon/include/asm/pgalloc.h2
-rw-r--r--arch/hexagon/include/asm/pgtable.h2
-rw-r--r--arch/hexagon/include/asm/processor.h2
-rw-r--r--arch/hexagon/include/asm/smp.h2
-rw-r--r--arch/hexagon/include/asm/spinlock.h2
-rw-r--r--arch/hexagon/include/asm/spinlock_types.h2
-rw-r--r--arch/hexagon/include/asm/string.h2
-rw-r--r--arch/hexagon/include/asm/suspend.h2
-rw-r--r--arch/hexagon/include/asm/switch_to.h2
-rw-r--r--arch/hexagon/include/asm/syscall.h2
-rw-r--r--arch/hexagon/include/asm/thread_info.h2
-rw-r--r--arch/hexagon/include/asm/time.h2
-rw-r--r--arch/hexagon/include/asm/timer-regs.h2
-rw-r--r--arch/hexagon/include/asm/timex.h2
-rw-r--r--arch/hexagon/include/asm/tlb.h2
-rw-r--r--arch/hexagon/include/asm/tlbflush.h2
-rw-r--r--arch/hexagon/include/asm/traps.h2
-rw-r--r--arch/hexagon/include/asm/uaccess.h2
-rw-r--r--arch/hexagon/include/asm/vdso.h2
-rw-r--r--arch/hexagon/include/asm/vm_fault.h2
-rw-r--r--arch/hexagon/include/asm/vm_mmu.h2
-rw-r--r--arch/hexagon/include/uapi/asm/Kbuild12
-rw-r--r--arch/hexagon/include/uapi/asm/bitsperlong.h (renamed from arch/hexagon/include/asm/bitsperlong.h)2
-rw-r--r--arch/hexagon/include/uapi/asm/byteorder.h (renamed from arch/hexagon/include/asm/byteorder.h)2
-rw-r--r--arch/hexagon/include/uapi/asm/kvm_para.h (renamed from arch/hexagon/include/asm/kvm_para.h)0
-rw-r--r--arch/hexagon/include/uapi/asm/param.h (renamed from arch/hexagon/include/asm/param.h)2
-rw-r--r--arch/hexagon/include/uapi/asm/ptrace.h (renamed from arch/hexagon/include/asm/ptrace.h)2
-rw-r--r--arch/hexagon/include/uapi/asm/registers.h (renamed from arch/hexagon/include/asm/registers.h)17
-rw-r--r--arch/hexagon/include/uapi/asm/setup.h (renamed from arch/hexagon/include/asm/setup.h)2
-rw-r--r--arch/hexagon/include/uapi/asm/sigcontext.h (renamed from arch/hexagon/include/asm/sigcontext.h)2
-rw-r--r--arch/hexagon/include/uapi/asm/signal.h (renamed from arch/hexagon/include/asm/signal.h)2
-rw-r--r--arch/hexagon/include/uapi/asm/swab.h (renamed from arch/hexagon/include/asm/swab.h)2
-rw-r--r--arch/hexagon/include/uapi/asm/unistd.h (renamed from arch/hexagon/include/asm/unistd.h)2
-rw-r--r--arch/hexagon/include/uapi/asm/user.h (renamed from arch/hexagon/include/asm/user.h)18
-rw-r--r--arch/hexagon/kernel/asm-offsets.c2
-rw-r--r--arch/hexagon/kernel/dma.c2
-rw-r--r--arch/hexagon/kernel/head.S2
-rw-r--r--arch/hexagon/kernel/hexagon_ksyms.c2
-rw-r--r--arch/hexagon/kernel/irq_cpu.c2
-rw-r--r--arch/hexagon/kernel/kgdb.c2
-rw-r--r--arch/hexagon/kernel/module.c2
-rw-r--r--arch/hexagon/kernel/process.c2
-rw-r--r--arch/hexagon/kernel/ptrace.c2
-rw-r--r--arch/hexagon/kernel/reset.c2
-rw-r--r--arch/hexagon/kernel/setup.c2
-rw-r--r--arch/hexagon/kernel/signal.c2
-rw-r--r--arch/hexagon/kernel/smp.c2
-rw-r--r--arch/hexagon/kernel/stacktrace.c2
-rw-r--r--arch/hexagon/kernel/syscall.c2
-rw-r--r--arch/hexagon/kernel/syscalltab.c2
-rw-r--r--arch/hexagon/kernel/time.c2
-rw-r--r--arch/hexagon/kernel/topology.c2
-rw-r--r--arch/hexagon/kernel/trampoline.S2
-rw-r--r--arch/hexagon/kernel/traps.c2
-rw-r--r--arch/hexagon/kernel/vdso.c2
-rw-r--r--arch/hexagon/kernel/vm_entry.S2
-rw-r--r--arch/hexagon/kernel/vm_events.c2
-rw-r--r--arch/hexagon/kernel/vm_init_segtable.S2
-rw-r--r--arch/hexagon/kernel/vm_ops.S2
-rw-r--r--arch/hexagon/kernel/vm_switch.S2
-rw-r--r--arch/hexagon/kernel/vm_vectors.S2
-rw-r--r--arch/hexagon/kernel/vmlinux.lds.S2
-rw-r--r--arch/hexagon/lib/checksum.c2
-rw-r--r--arch/hexagon/lib/io.c2
-rw-r--r--arch/hexagon/lib/memcpy.S2
-rw-r--r--arch/hexagon/lib/memset.S2
-rw-r--r--arch/hexagon/mm/cache.c2
-rw-r--r--arch/hexagon/mm/copy_from_user.S2
-rw-r--r--arch/hexagon/mm/copy_to_user.S2
-rw-r--r--arch/hexagon/mm/copy_user_template.S2
-rw-r--r--arch/hexagon/mm/init.c2
-rw-r--r--arch/hexagon/mm/ioremap.c2
-rw-r--r--arch/hexagon/mm/pgalloc.c2
-rw-r--r--arch/hexagon/mm/strnlen_user.S2
-rw-r--r--arch/hexagon/mm/uaccess.c2
-rw-r--r--arch/hexagon/mm/vm_fault.c2
-rw-r--r--arch/hexagon/mm/vm_tlb.c2
-rw-r--r--arch/ia64/include/uapi/asm/Kbuild2
-rw-r--r--arch/ia64/include/uapi/asm/kvm_para.h0
-rw-r--r--arch/mips/include/asm/Kbuild1
-rw-r--r--arch/mips/include/asm/delay.h6
-rw-r--r--arch/mips/include/asm/pgtable-64.h15
-rw-r--r--arch/mips/jz4740/serial.h3
-rw-r--r--arch/mips/kernel/smp-cmp.c2
-rw-r--r--arch/mips/lib/delay.c6
-rw-r--r--arch/mips/lib/dump_tlb.c4
-rw-r--r--arch/mips/mm/tlb-r4k.c1
-rw-r--r--arch/mips/mm/tlbex.c56
-rw-r--r--arch/mn10300/include/uapi/asm/setup.h4
-rw-r--r--arch/parisc/include/asm/Kbuild9
-rw-r--r--arch/parisc/include/asm/auxvec.h4
-rw-r--r--arch/parisc/include/asm/compat_signal.h2
-rw-r--r--arch/parisc/include/asm/cputime.h6
-rw-r--r--arch/parisc/include/asm/device.h7
-rw-r--r--arch/parisc/include/asm/div64.h1
-rw-r--r--arch/parisc/include/asm/emergency-restart.h6
-rw-r--r--arch/parisc/include/asm/hw_irq.h8
-rw-r--r--arch/parisc/include/asm/irq_regs.h1
-rw-r--r--arch/parisc/include/asm/kdebug.h1
-rw-r--r--arch/parisc/include/asm/kvm_para.h1
-rw-r--r--arch/parisc/include/asm/local.h1
-rw-r--r--arch/parisc/include/asm/local64.h1
-rw-r--r--arch/parisc/include/asm/mutex.h9
-rw-r--r--arch/parisc/include/asm/param.h1
-rw-r--r--arch/parisc/include/asm/pdc.h423
-rw-r--r--arch/parisc/include/asm/percpu.h7
-rw-r--r--arch/parisc/include/asm/poll.h1
-rw-r--r--arch/parisc/include/asm/ptrace.h46
-rw-r--r--arch/parisc/include/asm/real.h5
-rw-r--r--arch/parisc/include/asm/segment.h6
-rw-r--r--arch/parisc/include/asm/signal.h113
-rw-r--r--arch/parisc/include/asm/termios.h41
-rw-r--r--arch/parisc/include/asm/topology.h6
-rw-r--r--arch/parisc/include/asm/unistd.h835
-rw-r--r--arch/parisc/include/asm/user.h5
-rw-r--r--arch/parisc/include/asm/vga.h6
-rw-r--r--arch/parisc/include/asm/xor.h1
-rw-r--r--arch/parisc/include/uapi/asm/Kbuild28
-rw-r--r--arch/parisc/include/uapi/asm/bitsperlong.h (renamed from arch/parisc/include/asm/bitsperlong.h)0
-rw-r--r--arch/parisc/include/uapi/asm/byteorder.h (renamed from arch/parisc/include/asm/byteorder.h)0
-rw-r--r--arch/parisc/include/uapi/asm/errno.h (renamed from arch/parisc/include/asm/errno.h)0
-rw-r--r--arch/parisc/include/uapi/asm/fcntl.h (renamed from arch/parisc/include/asm/fcntl.h)0
-rw-r--r--arch/parisc/include/uapi/asm/ioctl.h (renamed from arch/parisc/include/asm/ioctl.h)0
-rw-r--r--arch/parisc/include/uapi/asm/ioctls.h (renamed from arch/parisc/include/asm/ioctls.h)0
-rw-r--r--arch/parisc/include/uapi/asm/ipcbuf.h (renamed from arch/parisc/include/asm/ipcbuf.h)0
-rw-r--r--arch/parisc/include/uapi/asm/mman.h (renamed from arch/parisc/include/asm/mman.h)0
-rw-r--r--arch/parisc/include/uapi/asm/msgbuf.h (renamed from arch/parisc/include/asm/msgbuf.h)0
-rw-r--r--arch/parisc/include/uapi/asm/pdc.h427
-rw-r--r--arch/parisc/include/uapi/asm/posix_types.h (renamed from arch/parisc/include/asm/posix_types.h)0
-rw-r--r--arch/parisc/include/uapi/asm/ptrace.h47
-rw-r--r--arch/parisc/include/uapi/asm/resource.h (renamed from arch/parisc/include/asm/resource.h)0
-rw-r--r--arch/parisc/include/uapi/asm/sembuf.h (renamed from arch/parisc/include/asm/sembuf.h)0
-rw-r--r--arch/parisc/include/uapi/asm/setup.h (renamed from arch/parisc/include/asm/setup.h)0
-rw-r--r--arch/parisc/include/uapi/asm/shmbuf.h (renamed from arch/parisc/include/asm/shmbuf.h)0
-rw-r--r--arch/parisc/include/uapi/asm/sigcontext.h (renamed from arch/parisc/include/asm/sigcontext.h)0
-rw-r--r--arch/parisc/include/uapi/asm/siginfo.h (renamed from arch/parisc/include/asm/siginfo.h)0
-rw-r--r--arch/parisc/include/uapi/asm/signal.h118
-rw-r--r--arch/parisc/include/uapi/asm/socket.h (renamed from arch/parisc/include/asm/socket.h)0
-rw-r--r--arch/parisc/include/uapi/asm/sockios.h (renamed from arch/parisc/include/asm/sockios.h)0
-rw-r--r--arch/parisc/include/uapi/asm/stat.h (renamed from arch/parisc/include/asm/stat.h)0
-rw-r--r--arch/parisc/include/uapi/asm/statfs.h (renamed from arch/parisc/include/asm/statfs.h)0
-rw-r--r--arch/parisc/include/uapi/asm/swab.h (renamed from arch/parisc/include/asm/swab.h)0
-rw-r--r--arch/parisc/include/uapi/asm/termbits.h (renamed from arch/parisc/include/asm/termbits.h)0
-rw-r--r--arch/parisc/include/uapi/asm/termios.h43
-rw-r--r--arch/parisc/include/uapi/asm/types.h (renamed from arch/parisc/include/asm/types.h)0
-rw-r--r--arch/parisc/include/uapi/asm/unistd.h837
-rw-r--r--arch/powerpc/include/asm/kvm_book3s_32.h1
-rw-r--r--arch/powerpc/include/asm/processor.h4
-rw-r--r--arch/powerpc/kernel/sysfs.c2
-rw-r--r--arch/powerpc/kvm/book3s_32_mmu_host.c4
-rw-r--r--arch/powerpc/perf/core-book3s.c2
-rw-r--r--arch/powerpc/platforms/pseries/processor_idle.c62
-rw-r--r--arch/s390/include/uapi/asm/Kbuild2
-rw-r--r--arch/s390/include/uapi/asm/kvm_para.h0
-rw-r--r--arch/sh/include/asm/Kbuild11
-rw-r--r--arch/sh/include/asm/hw_breakpoint.h4
-rw-r--r--arch/sh/include/asm/posix_types.h8
-rw-r--r--arch/sh/include/asm/ptrace.h34
-rw-r--r--arch/sh/include/asm/ptrace_32.h75
-rw-r--r--arch/sh/include/asm/ptrace_64.h12
-rw-r--r--arch/sh/include/asm/setup.h5
-rw-r--r--arch/sh/include/asm/types.h5
-rw-r--r--arch/sh/include/asm/unistd.h9
-rw-r--r--arch/sh/include/uapi/asm/Kbuild22
-rw-r--r--arch/sh/include/uapi/asm/auxvec.h (renamed from arch/sh/include/asm/auxvec.h)0
-rw-r--r--arch/sh/include/uapi/asm/byteorder.h (renamed from arch/sh/include/asm/byteorder.h)0
-rw-r--r--arch/sh/include/uapi/asm/cachectl.h (renamed from arch/sh/include/asm/cachectl.h)0
-rw-r--r--arch/sh/include/uapi/asm/cpu-features.h (renamed from arch/sh/include/asm/cpu-features.h)0
-rw-r--r--arch/sh/include/uapi/asm/hw_breakpoint.h4
-rw-r--r--arch/sh/include/uapi/asm/ioctls.h (renamed from arch/sh/include/asm/ioctls.h)0
-rw-r--r--arch/sh/include/uapi/asm/posix_types.h7
-rw-r--r--arch/sh/include/uapi/asm/posix_types_32.h (renamed from arch/sh/include/asm/posix_types_32.h)0
-rw-r--r--arch/sh/include/uapi/asm/posix_types_64.h (renamed from arch/sh/include/asm/posix_types_64.h)0
-rw-r--r--arch/sh/include/uapi/asm/ptrace.h34
-rw-r--r--arch/sh/include/uapi/asm/ptrace_32.h77
-rw-r--r--arch/sh/include/uapi/asm/ptrace_64.h14
-rw-r--r--arch/sh/include/uapi/asm/setup.h1
-rw-r--r--arch/sh/include/uapi/asm/sigcontext.h (renamed from arch/sh/include/asm/sigcontext.h)0
-rw-r--r--arch/sh/include/uapi/asm/signal.h (renamed from arch/sh/include/asm/signal.h)0
-rw-r--r--arch/sh/include/uapi/asm/sockios.h (renamed from arch/sh/include/asm/sockios.h)0
-rw-r--r--arch/sh/include/uapi/asm/stat.h (renamed from arch/sh/include/asm/stat.h)0
-rw-r--r--arch/sh/include/uapi/asm/swab.h (renamed from arch/sh/include/asm/swab.h)0
-rw-r--r--arch/sh/include/uapi/asm/types.h1
-rw-r--r--arch/sh/include/uapi/asm/unistd.h7
-rw-r--r--arch/sh/include/uapi/asm/unistd_32.h (renamed from arch/sh/include/asm/unistd_32.h)3
-rw-r--r--arch/sh/include/uapi/asm/unistd_64.h (renamed from arch/sh/include/asm/unistd_64.h)3
-rw-r--r--arch/sh/kernel/syscalls_32.S1
-rw-r--r--arch/sh/kernel/syscalls_64.S1
-rw-r--r--arch/sparc/include/asm/ptrace.h13
-rw-r--r--arch/sparc/include/asm/smp_64.h2
-rw-r--r--arch/sparc/include/uapi/asm/sigcontext.h4
-rw-r--r--arch/sparc/kernel/perf_event.c15
-rw-r--r--arch/sparc/kernel/process_64.c120
-rw-r--r--arch/sparc/kernel/smp_64.c11
-rw-r--r--arch/sparc/mm/ultra.S64
-rw-r--r--arch/tile/include/arch/Kbuild1
-rw-r--r--arch/tile/include/asm/Kbuild3
-rw-r--r--arch/tile/include/uapi/asm/Kbuild3
-rw-r--r--arch/x86/Makefile2
-rw-r--r--arch/x86/crypto/aesni-intel_glue.c9
-rw-r--r--arch/x86/kernel/cpu/intel_cacheinfo.c2
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce.c6
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce_amd.c10
-rw-r--r--arch/x86/kernel/cpu/perf_event.c6
-rw-r--r--arch/x86/kernel/reboot.c8
-rw-r--r--arch/x86/kernel/setup.c17
-rw-r--r--arch/x86/realmode/rm/wakeup_asm.S15
-rw-r--r--arch/xtensa/boot/boot-redboot/bootstrap.S8
-rw-r--r--arch/xtensa/include/asm/Kbuild28
-rw-r--r--arch/xtensa/include/asm/atomic.h12
-rw-r--r--arch/xtensa/include/asm/bitsperlong.h1
-rw-r--r--arch/xtensa/include/asm/bug.h18
-rw-r--r--arch/xtensa/include/asm/cacheflush.h2
-rw-r--r--arch/xtensa/include/asm/cmpxchg.h4
-rw-r--r--arch/xtensa/include/asm/coprocessor.h5
-rw-r--r--arch/xtensa/include/asm/cputime.h6
-rw-r--r--arch/xtensa/include/asm/delay.h2
-rw-r--r--arch/xtensa/include/asm/device.h7
-rw-r--r--arch/xtensa/include/asm/div64.h16
-rw-r--r--arch/xtensa/include/asm/emergency-restart.h6
-rw-r--r--arch/xtensa/include/asm/errno.h16
-rw-r--r--arch/xtensa/include/asm/fcntl.h1
-rw-r--r--arch/xtensa/include/asm/futex.h1
-rw-r--r--arch/xtensa/include/asm/hardirq.h16
-rw-r--r--arch/xtensa/include/asm/ioctl.h1
-rw-r--r--arch/xtensa/include/asm/irq_regs.h1
-rw-r--r--arch/xtensa/include/asm/irqflags.h4
-rw-r--r--arch/xtensa/include/asm/kdebug.h1
-rw-r--r--arch/xtensa/include/asm/kmap_types.h6
-rw-r--r--arch/xtensa/include/asm/kvm_para.h1
-rw-r--r--arch/xtensa/include/asm/local.h16
-rw-r--r--arch/xtensa/include/asm/local64.h1
-rw-r--r--arch/xtensa/include/asm/mmu_context.h4
-rw-r--r--arch/xtensa/include/asm/param.h20
-rw-r--r--arch/xtensa/include/asm/percpu.h16
-rw-r--r--arch/xtensa/include/asm/ptrace.h66
-rw-r--r--arch/xtensa/include/asm/regs.h55
-rw-r--r--arch/xtensa/include/asm/resource.h16
-rw-r--r--arch/xtensa/include/asm/scatterlist.h16
-rw-r--r--arch/xtensa/include/asm/sections.h16
-rw-r--r--arch/xtensa/include/asm/siginfo.h16
-rw-r--r--arch/xtensa/include/asm/signal.h134
-rw-r--r--arch/xtensa/include/asm/statfs.h17
-rw-r--r--arch/xtensa/include/asm/termios.h105
-rw-r--r--arch/xtensa/include/asm/timex.h8
-rw-r--r--arch/xtensa/include/asm/tlbflush.h8
-rw-r--r--arch/xtensa/include/asm/topology.h16
-rw-r--r--arch/xtensa/include/asm/types.h15
-rw-r--r--arch/xtensa/include/asm/unistd.h702
-rw-r--r--arch/xtensa/include/asm/xor.h16
-rw-r--r--arch/xtensa/include/uapi/asm/Kbuild22
-rw-r--r--arch/xtensa/include/uapi/asm/auxvec.h (renamed from arch/xtensa/include/asm/auxvec.h)0
-rw-r--r--arch/xtensa/include/uapi/asm/byteorder.h (renamed from arch/xtensa/include/asm/byteorder.h)0
-rw-r--r--arch/xtensa/include/uapi/asm/ioctls.h (renamed from arch/xtensa/include/asm/ioctls.h)0
-rw-r--r--arch/xtensa/include/uapi/asm/ipcbuf.h (renamed from arch/xtensa/include/asm/ipcbuf.h)0
-rw-r--r--arch/xtensa/include/uapi/asm/mman.h (renamed from arch/xtensa/include/asm/mman.h)0
-rw-r--r--arch/xtensa/include/uapi/asm/msgbuf.h (renamed from arch/xtensa/include/asm/msgbuf.h)0
-rw-r--r--arch/xtensa/include/uapi/asm/param.h30
-rw-r--r--arch/xtensa/include/uapi/asm/poll.h (renamed from arch/xtensa/include/asm/poll.h)0
-rw-r--r--arch/xtensa/include/uapi/asm/posix_types.h (renamed from arch/xtensa/include/asm/posix_types.h)0
-rw-r--r--arch/xtensa/include/uapi/asm/ptrace.h77
-rw-r--r--arch/xtensa/include/uapi/asm/sembuf.h (renamed from arch/xtensa/include/asm/sembuf.h)0
-rw-r--r--arch/xtensa/include/uapi/asm/setup.h (renamed from arch/xtensa/include/asm/setup.h)0
-rw-r--r--arch/xtensa/include/uapi/asm/shmbuf.h (renamed from arch/xtensa/include/asm/shmbuf.h)0
-rw-r--r--arch/xtensa/include/uapi/asm/sigcontext.h (renamed from arch/xtensa/include/asm/sigcontext.h)0
-rw-r--r--arch/xtensa/include/uapi/asm/signal.h148
-rw-r--r--arch/xtensa/include/uapi/asm/socket.h (renamed from arch/xtensa/include/asm/socket.h)0
-rw-r--r--arch/xtensa/include/uapi/asm/sockios.h (renamed from arch/xtensa/include/asm/sockios.h)0
-rw-r--r--arch/xtensa/include/uapi/asm/stat.h (renamed from arch/xtensa/include/asm/stat.h)0
-rw-r--r--arch/xtensa/include/uapi/asm/swab.h (renamed from arch/xtensa/include/asm/swab.h)0
-rw-r--r--arch/xtensa/include/uapi/asm/termbits.h (renamed from arch/xtensa/include/asm/termbits.h)0
-rw-r--r--arch/xtensa/include/uapi/asm/types.h28
-rw-r--r--arch/xtensa/include/uapi/asm/unistd.h762
-rw-r--r--arch/xtensa/kernel/align.S38
-rw-r--r--arch/xtensa/kernel/coprocessor.S20
-rw-r--r--arch/xtensa/kernel/entry.S254
-rw-r--r--arch/xtensa/kernel/head.S36
-rw-r--r--arch/xtensa/kernel/irq.c6
-rw-r--r--arch/xtensa/kernel/process.c29
-rw-r--r--arch/xtensa/kernel/setup.c4
-rw-r--r--arch/xtensa/kernel/syscall.c1
-rw-r--r--arch/xtensa/kernel/traps.c22
-rw-r--r--arch/xtensa/kernel/vectors.S44
-rw-r--r--arch/xtensa/lib/memcopy.S309
-rw-r--r--arch/xtensa/mm/fault.c3
-rw-r--r--arch/xtensa/platforms/iss/console.c9
-rw-r--r--arch/xtensa/platforms/iss/include/platform/simcall.h9
-rw-r--r--arch/xtensa/platforms/iss/setup.c10
-rw-r--r--arch/xtensa/platforms/xt2000/setup.c10
348 files changed, 3974 insertions, 3683 deletions
diff --git a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
index b06c0db273b1..e6391a4e6649 100644
--- a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
+++ b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
@@ -126,14 +126,14 @@
126 #size-cells = <0>; 126 #size-cells = <0>;
127 127
128 btn3 { 128 btn3 {
129 label = "Buttin 3"; 129 label = "Button 3";
130 gpios = <&pioA 30 1>; 130 gpios = <&pioA 30 1>;
131 linux,code = <0x103>; 131 linux,code = <0x103>;
132 gpio-key,wakeup; 132 gpio-key,wakeup;
133 }; 133 };
134 134
135 btn4 { 135 btn4 {
136 label = "Buttin 4"; 136 label = "Button 4";
137 gpios = <&pioA 31 1>; 137 gpios = <&pioA 31 1>;
138 linux,code = <0x104>; 138 linux,code = <0x104>;
139 gpio-key,wakeup; 139 gpio-key,wakeup;
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 417bac1846bd..34711757ba59 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -88,9 +88,9 @@ ENTRY(ret_from_fork)
88 bl schedule_tail 88 bl schedule_tail
89 cmp r5, #0 89 cmp r5, #0
90 movne r0, r4 90 movne r0, r4
91 movne lr, pc 91 adrne lr, BSYM(1f)
92 movne pc, r5 92 movne pc, r5
93 get_thread_info tsk 931: get_thread_info tsk
94 b ret_slow_syscall 94 b ret_slow_syscall
95ENDPROC(ret_from_fork) 95ENDPROC(ret_from_fork)
96 96
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index b14207101938..043624219b55 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -21,19 +21,13 @@ config SOC_AT91SAM9
21 bool 21 bool
22 select CPU_ARM926T 22 select CPU_ARM926T
23 select GENERIC_CLOCKEVENTS 23 select GENERIC_CLOCKEVENTS
24 select MULTI_IRQ_HANDLER
25 select SPARSE_IRQ
24 26
25menu "Atmel AT91 System-on-Chip" 27menu "Atmel AT91 System-on-Chip"
26 28
27comment "Atmel AT91 Processor" 29comment "Atmel AT91 Processor"
28 30
29config SOC_AT91SAM9
30 bool
31 select AT91_SAM9_SMC
32 select AT91_SAM9_TIME
33 select CPU_ARM926T
34 select MULTI_IRQ_HANDLER
35 select SPARSE_IRQ
36
37config SOC_AT91RM9200 31config SOC_AT91RM9200
38 bool "AT91RM9200" 32 bool "AT91RM9200"
39 select CPU_ARM920T 33 select CPU_ARM920T
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
index b4f0565aff63..5269825194a8 100644
--- a/arch/arm/mach-at91/at91rm9200.c
+++ b/arch/arm/mach-at91/at91rm9200.c
@@ -187,7 +187,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
187 CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk), 187 CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
188 CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), 188 CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
189 CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk), 189 CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk),
190 CLKDEV_CON_DEV_ID(NULL, "i2c-at91rm9200", &twi_clk), 190 CLKDEV_CON_DEV_ID(NULL, "i2c-at91rm9200.0", &twi_clk),
191 /* fake hclk clock */ 191 /* fake hclk clock */
192 CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk), 192 CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk),
193 CLKDEV_CON_ID("pioA", &pioA_clk), 193 CLKDEV_CON_ID("pioA", &pioA_clk),
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
index a563189cdfc3..1e122bcd7845 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -479,7 +479,7 @@ static struct i2c_gpio_platform_data pdata = {
479 479
480static struct platform_device at91rm9200_twi_device = { 480static struct platform_device at91rm9200_twi_device = {
481 .name = "i2c-gpio", 481 .name = "i2c-gpio",
482 .id = -1, 482 .id = 0,
483 .dev.platform_data = &pdata, 483 .dev.platform_data = &pdata,
484}; 484};
485 485
@@ -512,7 +512,7 @@ static struct resource twi_resources[] = {
512 512
513static struct platform_device at91rm9200_twi_device = { 513static struct platform_device at91rm9200_twi_device = {
514 .name = "i2c-at91rm9200", 514 .name = "i2c-at91rm9200",
515 .id = -1, 515 .id = 0,
516 .resource = twi_resources, 516 .resource = twi_resources,
517 .num_resources = ARRAY_SIZE(twi_resources), 517 .num_resources = ARRAY_SIZE(twi_resources),
518}; 518};
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
index ad29f93f20ca..f8202615f4a8 100644
--- a/arch/arm/mach-at91/at91sam9260.c
+++ b/arch/arm/mach-at91/at91sam9260.c
@@ -211,8 +211,8 @@ static struct clk_lookup periph_clocks_lookups[] = {
211 CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.1", &tc4_clk), 211 CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.1", &tc4_clk),
212 CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.1", &tc5_clk), 212 CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.1", &tc5_clk),
213 CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc_clk), 213 CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc_clk),
214 CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9260", &twi_clk), 214 CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9260.0", &twi_clk),
215 CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g20", &twi_clk), 215 CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g20.0", &twi_clk),
216 /* more usart lookup table for DT entries */ 216 /* more usart lookup table for DT entries */
217 CLKDEV_CON_DEV_ID("usart", "fffff200.serial", &mck), 217 CLKDEV_CON_DEV_ID("usart", "fffff200.serial", &mck),
218 CLKDEV_CON_DEV_ID("usart", "fffb0000.serial", &usart0_clk), 218 CLKDEV_CON_DEV_ID("usart", "fffb0000.serial", &usart0_clk),
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index a76b8684f52d..aa1e58729885 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -389,7 +389,7 @@ static struct i2c_gpio_platform_data pdata = {
389 389
390static struct platform_device at91sam9260_twi_device = { 390static struct platform_device at91sam9260_twi_device = {
391 .name = "i2c-gpio", 391 .name = "i2c-gpio",
392 .id = -1, 392 .id = 0,
393 .dev.platform_data = &pdata, 393 .dev.platform_data = &pdata,
394}; 394};
395 395
@@ -421,7 +421,7 @@ static struct resource twi_resources[] = {
421}; 421};
422 422
423static struct platform_device at91sam9260_twi_device = { 423static struct platform_device at91sam9260_twi_device = {
424 .id = -1, 424 .id = 0,
425 .resource = twi_resources, 425 .resource = twi_resources,
426 .num_resources = ARRAY_SIZE(twi_resources), 426 .num_resources = ARRAY_SIZE(twi_resources),
427}; 427};
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c
index 8d999eb1a137..04295c04b3e0 100644
--- a/arch/arm/mach-at91/at91sam9261.c
+++ b/arch/arm/mach-at91/at91sam9261.c
@@ -178,8 +178,8 @@ static struct clk_lookup periph_clocks_lookups[] = {
178 CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), 178 CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
179 CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk), 179 CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk),
180 CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &hck0), 180 CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &hck0),
181 CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9261", &twi_clk), 181 CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9261.0", &twi_clk),
182 CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g10", &twi_clk), 182 CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g10.0", &twi_clk),
183 CLKDEV_CON_ID("pioA", &pioA_clk), 183 CLKDEV_CON_ID("pioA", &pioA_clk),
184 CLKDEV_CON_ID("pioB", &pioB_clk), 184 CLKDEV_CON_ID("pioB", &pioB_clk),
185 CLKDEV_CON_ID("pioC", &pioC_clk), 185 CLKDEV_CON_ID("pioC", &pioC_clk),
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c
index 9752f17efba9..b9487696b7be 100644
--- a/arch/arm/mach-at91/at91sam9261_devices.c
+++ b/arch/arm/mach-at91/at91sam9261_devices.c
@@ -285,7 +285,7 @@ static struct i2c_gpio_platform_data pdata = {
285 285
286static struct platform_device at91sam9261_twi_device = { 286static struct platform_device at91sam9261_twi_device = {
287 .name = "i2c-gpio", 287 .name = "i2c-gpio",
288 .id = -1, 288 .id = 0,
289 .dev.platform_data = &pdata, 289 .dev.platform_data = &pdata,
290}; 290};
291 291
@@ -317,7 +317,7 @@ static struct resource twi_resources[] = {
317}; 317};
318 318
319static struct platform_device at91sam9261_twi_device = { 319static struct platform_device at91sam9261_twi_device = {
320 .id = -1, 320 .id = 0,
321 .resource = twi_resources, 321 .resource = twi_resources,
322 .num_resources = ARRAY_SIZE(twi_resources), 322 .num_resources = ARRAY_SIZE(twi_resources),
323}; 323};
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c
index 6a01d0360dfb..d6f9c23927c4 100644
--- a/arch/arm/mach-at91/at91sam9263.c
+++ b/arch/arm/mach-at91/at91sam9263.c
@@ -193,7 +193,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
193 CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk), 193 CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk),
194 CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk), 194 CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk),
195 CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb_clk), 195 CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb_clk),
196 CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9260", &twi_clk), 196 CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9260.0", &twi_clk),
197 /* fake hclk clock */ 197 /* fake hclk clock */
198 CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk), 198 CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk),
199 CLKDEV_CON_ID("pioA", &pioA_clk), 199 CLKDEV_CON_ID("pioA", &pioA_clk),
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index 8dde220b42b6..cb85da2eccea 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -567,7 +567,7 @@ static struct i2c_gpio_platform_data pdata = {
567 567
568static struct platform_device at91sam9263_twi_device = { 568static struct platform_device at91sam9263_twi_device = {
569 .name = "i2c-gpio", 569 .name = "i2c-gpio",
570 .id = -1, 570 .id = 0,
571 .dev.platform_data = &pdata, 571 .dev.platform_data = &pdata,
572}; 572};
573 573
@@ -600,7 +600,7 @@ static struct resource twi_resources[] = {
600 600
601static struct platform_device at91sam9263_twi_device = { 601static struct platform_device at91sam9263_twi_device = {
602 .name = "i2c-at91sam9260", 602 .name = "i2c-at91sam9260",
603 .id = -1, 603 .id = 0,
604 .resource = twi_resources, 604 .resource = twi_resources,
605 .num_resources = ARRAY_SIZE(twi_resources), 605 .num_resources = ARRAY_SIZE(twi_resources),
606}; 606};
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c
index d6ca0543ce8d..5047bdc92adf 100644
--- a/arch/arm/mach-at91/at91sam9rl_devices.c
+++ b/arch/arm/mach-at91/at91sam9rl_devices.c
@@ -314,7 +314,7 @@ static struct i2c_gpio_platform_data pdata = {
314 314
315static struct platform_device at91sam9rl_twi_device = { 315static struct platform_device at91sam9rl_twi_device = {
316 .name = "i2c-gpio", 316 .name = "i2c-gpio",
317 .id = -1, 317 .id = 0,
318 .dev.platform_data = &pdata, 318 .dev.platform_data = &pdata,
319}; 319};
320 320
@@ -347,7 +347,7 @@ static struct resource twi_resources[] = {
347 347
348static struct platform_device at91sam9rl_twi_device = { 348static struct platform_device at91sam9rl_twi_device = {
349 .name = "i2c-at91sam9g20", 349 .name = "i2c-at91sam9g20",
350 .id = -1, 350 .id = 0,
351 .resource = twi_resources, 351 .resource = twi_resources,
352 .num_resources = ARRAY_SIZE(twi_resources), 352 .num_resources = ARRAY_SIZE(twi_resources),
353}; 353};
diff --git a/arch/arm/mach-at91/board-neocore926.c b/arch/arm/mach-at91/board-neocore926.c
index 9cda3fd346ae..6960778af4c2 100644
--- a/arch/arm/mach-at91/board-neocore926.c
+++ b/arch/arm/mach-at91/board-neocore926.c
@@ -129,7 +129,7 @@ static struct spi_board_info neocore926_spi_devices[] = {
129 .max_speed_hz = 125000 * 16, 129 .max_speed_hz = 125000 * 16,
130 .bus_num = 0, 130 .bus_num = 0,
131 .platform_data = &ads_info, 131 .platform_data = &ads_info,
132 .irq = AT91SAM9263_ID_IRQ1, 132 .irq = NR_IRQS_LEGACY + AT91SAM9263_ID_IRQ1,
133 }, 133 },
134#endif 134#endif
135}; 135};
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
index 27b3af1a3047..a9167dd45f96 100644
--- a/arch/arm/mach-at91/board-sam9261ek.c
+++ b/arch/arm/mach-at91/board-sam9261ek.c
@@ -309,7 +309,7 @@ static struct spi_board_info ek_spi_devices[] = {
309 .max_speed_hz = 125000 * 26, /* (max sample rate @ 3V) * (cmd + data + overhead) */ 309 .max_speed_hz = 125000 * 26, /* (max sample rate @ 3V) * (cmd + data + overhead) */
310 .bus_num = 0, 310 .bus_num = 0,
311 .platform_data = &ads_info, 311 .platform_data = &ads_info,
312 .irq = AT91SAM9261_ID_IRQ0, 312 .irq = NR_IRQS_LEGACY + AT91SAM9261_ID_IRQ0,
313 .controller_data = (void *) AT91_PIN_PA28, /* CS pin */ 313 .controller_data = (void *) AT91_PIN_PA28, /* CS pin */
314 }, 314 },
315#endif 315#endif
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
index 073e17403d98..b87dbe2be0d6 100644
--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -132,7 +132,7 @@ static struct spi_board_info ek_spi_devices[] = {
132 .max_speed_hz = 125000 * 26, /* (max sample rate @ 3V) * (cmd + data + overhead) */ 132 .max_speed_hz = 125000 * 26, /* (max sample rate @ 3V) * (cmd + data + overhead) */
133 .bus_num = 0, 133 .bus_num = 0,
134 .platform_data = &ads_info, 134 .platform_data = &ads_info,
135 .irq = AT91SAM9263_ID_IRQ1, 135 .irq = NR_IRQS_LEGACY + AT91SAM9263_ID_IRQ1,
136 }, 136 },
137#endif 137#endif
138}; 138};
diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h
index f49650677653..b62f560e6c75 100644
--- a/arch/arm/mach-at91/generic.h
+++ b/arch/arm/mach-at91/generic.h
@@ -26,7 +26,8 @@ extern void __init at91_dt_initialize(void);
26extern void __init at91_init_irq_default(void); 26extern void __init at91_init_irq_default(void);
27extern void __init at91_init_interrupts(unsigned int priority[]); 27extern void __init at91_init_interrupts(unsigned int priority[]);
28extern void __init at91x40_init_interrupts(unsigned int priority[]); 28extern void __init at91x40_init_interrupts(unsigned int priority[]);
29extern void __init at91_aic_init(unsigned int priority[]); 29extern void __init at91_aic_init(unsigned int priority[],
30 unsigned int ext_irq_mask);
30extern int __init at91_aic_of_init(struct device_node *node, 31extern int __init at91_aic_of_init(struct device_node *node,
31 struct device_node *parent); 32 struct device_node *parent);
32extern int __init at91_aic5_of_init(struct device_node *node, 33extern int __init at91_aic5_of_init(struct device_node *node,
diff --git a/arch/arm/mach-at91/irq.c b/arch/arm/mach-at91/irq.c
index 1e02c0e49dcc..febc2ee901a5 100644
--- a/arch/arm/mach-at91/irq.c
+++ b/arch/arm/mach-at91/irq.c
@@ -502,14 +502,19 @@ int __init at91_aic5_of_init(struct device_node *node,
502/* 502/*
503 * Initialize the AIC interrupt controller. 503 * Initialize the AIC interrupt controller.
504 */ 504 */
505void __init at91_aic_init(unsigned int *priority) 505void __init at91_aic_init(unsigned int *priority, unsigned int ext_irq_mask)
506{ 506{
507 unsigned int i; 507 unsigned int i;
508 int irq_base; 508 int irq_base;
509 509
510 if (at91_aic_pm_init()) 510 at91_extern_irq = kzalloc(BITS_TO_LONGS(n_irqs)
511 * sizeof(*at91_extern_irq), GFP_KERNEL);
512
513 if (at91_aic_pm_init() || at91_extern_irq == NULL)
511 panic("Unable to allocate bit maps\n"); 514 panic("Unable to allocate bit maps\n");
512 515
516 *at91_extern_irq = ext_irq_mask;
517
513 at91_aic_base = ioremap(AT91_AIC, 512); 518 at91_aic_base = ioremap(AT91_AIC, 512);
514 if (!at91_aic_base) 519 if (!at91_aic_base)
515 panic("Unable to ioremap AIC registers\n"); 520 panic("Unable to ioremap AIC registers\n");
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c
index da9881b161e1..0b32c81730a5 100644
--- a/arch/arm/mach-at91/setup.c
+++ b/arch/arm/mach-at91/setup.c
@@ -47,7 +47,7 @@ void __init at91_init_irq_default(void)
47void __init at91_init_interrupts(unsigned int *priority) 47void __init at91_init_interrupts(unsigned int *priority)
48{ 48{
49 /* Initialize the AIC interrupt controller */ 49 /* Initialize the AIC interrupt controller */
50 at91_aic_init(priority); 50 at91_aic_init(priority, at91_extern_irq);
51 51
52 /* Enable GPIO interrupts */ 52 /* Enable GPIO interrupts */
53 at91_gpio_irq_setup(); 53 at91_gpio_irq_setup();
@@ -151,7 +151,7 @@ static void __init soc_detect(u32 dbgu_base)
151 } 151 }
152 152
153 /* at91sam9g10 */ 153 /* at91sam9g10 */
154 if ((cidr & ~AT91_CIDR_EXT) == ARCH_ID_AT91SAM9G10) { 154 if ((socid & ~AT91_CIDR_EXT) == ARCH_ID_AT91SAM9G10) {
155 at91_soc_initdata.type = AT91_SOC_SAM9G10; 155 at91_soc_initdata.type = AT91_SOC_SAM9G10;
156 at91_boot_soc = at91sam9261_soc; 156 at91_boot_soc = at91sam9261_soc;
157 } 157 }
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index 9518bf5996dc..e255164ff087 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -444,16 +444,28 @@ static struct omap1_cam_platform_data ams_delta_camera_platform_data = {
444 .lclk_khz_max = 1334, /* results in 5fps CIF, 10fps QCIF */ 444 .lclk_khz_max = 1334, /* results in 5fps CIF, 10fps QCIF */
445}; 445};
446 446
447static struct platform_device ams_delta_audio_device = {
448 .name = "ams-delta-audio",
449 .id = -1,
450};
451
452static struct platform_device cx20442_codec_device = {
453 .name = "cx20442-codec",
454 .id = -1,
455};
456
447static struct platform_device *ams_delta_devices[] __initdata = { 457static struct platform_device *ams_delta_devices[] __initdata = {
448 &latch1_gpio_device, 458 &latch1_gpio_device,
449 &latch2_gpio_device, 459 &latch2_gpio_device,
450 &ams_delta_kp_device, 460 &ams_delta_kp_device,
451 &ams_delta_camera_device, 461 &ams_delta_camera_device,
462 &ams_delta_audio_device,
452}; 463};
453 464
454static struct platform_device *late_devices[] __initdata = { 465static struct platform_device *late_devices[] __initdata = {
455 &ams_delta_nand_device, 466 &ams_delta_nand_device,
456 &ams_delta_lcd_device, 467 &ams_delta_lcd_device,
468 &cx20442_codec_device,
457}; 469};
458 470
459static void __init ams_delta_init(void) 471static void __init ams_delta_init(void)
diff --git a/arch/arm/mach-prima2/include/mach/gpio.h b/arch/arm/mach-prima2/include/mach/gpio.h
deleted file mode 100644
index 1904bb03876e..000000000000
--- a/arch/arm/mach-prima2/include/mach/gpio.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef __MACH_GPIO_H
2#define __MACH_GPIO_H
3
4/* Pull up/down values */
5enum sirfsoc_gpio_pull {
6 SIRFSOC_GPIO_PULL_NONE,
7 SIRFSOC_GPIO_PULL_UP,
8 SIRFSOC_GPIO_PULL_DOWN,
9};
10
11void sirfsoc_gpio_set_pull(unsigned gpio, unsigned mode);
12
13#endif
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 7ff68c946073..ef54a59a9e89 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -22,6 +22,7 @@ config ARM64
22 select HAVE_PERF_EVENTS 22 select HAVE_PERF_EVENTS
23 select HAVE_SPARSE_IRQ 23 select HAVE_SPARSE_IRQ
24 select IRQ_DOMAIN 24 select IRQ_DOMAIN
25 select MODULES_USE_ELF_RELA
25 select NO_BOOTMEM 26 select NO_BOOTMEM
26 select OF 27 select OF
27 select OF_EARLY_FLATTREE 28 select OF_EARLY_FLATTREE
diff --git a/arch/arm64/include/asm/Kbuild b/arch/arm64/include/asm/Kbuild
index fe77e51a7847..a581a2205938 100644
--- a/arch/arm64/include/asm/Kbuild
+++ b/arch/arm64/include/asm/Kbuild
@@ -18,7 +18,6 @@ generic-y += ipcbuf.h
18generic-y += irq_regs.h 18generic-y += irq_regs.h
19generic-y += kdebug.h 19generic-y += kdebug.h
20generic-y += kmap_types.h 20generic-y += kmap_types.h
21generic-y += linkage.h
22generic-y += local.h 21generic-y += local.h
23generic-y += local64.h 22generic-y += local64.h
24generic-y += mman.h 23generic-y += mman.h
diff --git a/arch/arm64/include/asm/linkage.h b/arch/arm64/include/asm/linkage.h
new file mode 100644
index 000000000000..636c1bced7d4
--- /dev/null
+++ b/arch/arm64/include/asm/linkage.h
@@ -0,0 +1,7 @@
1#ifndef __ASM_LINKAGE_H
2#define __ASM_LINKAGE_H
3
4#define __ALIGN .align 4
5#define __ALIGN_STR ".align 4"
6
7#endif
diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h
index 39a208a392f7..5d810044feda 100644
--- a/arch/arm64/include/asm/processor.h
+++ b/arch/arm64/include/asm/processor.h
@@ -92,30 +92,20 @@ static inline void start_thread_common(struct pt_regs *regs, unsigned long pc)
92static inline void start_thread(struct pt_regs *regs, unsigned long pc, 92static inline void start_thread(struct pt_regs *regs, unsigned long pc,
93 unsigned long sp) 93 unsigned long sp)
94{ 94{
95 unsigned long *stack = (unsigned long *)sp;
96
97 start_thread_common(regs, pc); 95 start_thread_common(regs, pc);
98 regs->pstate = PSR_MODE_EL0t; 96 regs->pstate = PSR_MODE_EL0t;
99 regs->sp = sp; 97 regs->sp = sp;
100 regs->regs[2] = stack[2]; /* x2 (envp) */
101 regs->regs[1] = stack[1]; /* x1 (argv) */
102 regs->regs[0] = stack[0]; /* x0 (argc) */
103} 98}
104 99
105#ifdef CONFIG_COMPAT 100#ifdef CONFIG_COMPAT
106static inline void compat_start_thread(struct pt_regs *regs, unsigned long pc, 101static inline void compat_start_thread(struct pt_regs *regs, unsigned long pc,
107 unsigned long sp) 102 unsigned long sp)
108{ 103{
109 unsigned int *stack = (unsigned int *)sp;
110
111 start_thread_common(regs, pc); 104 start_thread_common(regs, pc);
112 regs->pstate = COMPAT_PSR_MODE_USR; 105 regs->pstate = COMPAT_PSR_MODE_USR;
113 if (pc & 1) 106 if (pc & 1)
114 regs->pstate |= COMPAT_PSR_T_BIT; 107 regs->pstate |= COMPAT_PSR_T_BIT;
115 regs->compat_sp = sp; 108 regs->compat_sp = sp;
116 regs->regs[2] = stack[2]; /* x2 (envp) */
117 regs->regs[1] = stack[1]; /* x1 (argv) */
118 regs->regs[0] = stack[0]; /* x0 (argc) */
119} 109}
120#endif 110#endif
121 111
diff --git a/arch/arm64/include/uapi/asm/ptrace.h b/arch/arm64/include/uapi/asm/ptrace.h
index 9b131b4efa0b..6913643bbe54 100644
--- a/arch/arm64/include/uapi/asm/ptrace.h
+++ b/arch/arm64/include/uapi/asm/ptrace.h
@@ -79,13 +79,14 @@ struct user_fpsimd_state {
79 79
80struct user_hwdebug_state { 80struct user_hwdebug_state {
81 __u32 dbg_info; 81 __u32 dbg_info;
82 __u32 pad;
82 struct { 83 struct {
83 __u64 addr; 84 __u64 addr;
84 __u32 ctrl; 85 __u32 ctrl;
86 __u32 pad;
85 } dbg_regs[16]; 87 } dbg_regs[16];
86}; 88};
87 89
88
89#endif /* __ASSEMBLY__ */ 90#endif /* __ASSEMBLY__ */
90 91
91#endif /* _UAPI__ASM_PTRACE_H */ 92#endif /* _UAPI__ASM_PTRACE_H */
diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c
index 2ea3968367c2..6e1e77f1831c 100644
--- a/arch/arm64/kernel/ptrace.c
+++ b/arch/arm64/kernel/ptrace.c
@@ -234,28 +234,33 @@ static int ptrace_hbp_fill_attr_ctrl(unsigned int note_type,
234 struct arch_hw_breakpoint_ctrl ctrl, 234 struct arch_hw_breakpoint_ctrl ctrl,
235 struct perf_event_attr *attr) 235 struct perf_event_attr *attr)
236{ 236{
237 int err, len, type; 237 int err, len, type, disabled = !ctrl.enabled;
238 238
239 err = arch_bp_generic_fields(ctrl, &len, &type); 239 if (disabled) {
240 if (err) 240 len = 0;
241 return err; 241 type = HW_BREAKPOINT_EMPTY;
242 242 } else {
243 switch (note_type) { 243 err = arch_bp_generic_fields(ctrl, &len, &type);
244 case NT_ARM_HW_BREAK: 244 if (err)
245 if ((type & HW_BREAKPOINT_X) != type) 245 return err;
246 return -EINVAL; 246
247 break; 247 switch (note_type) {
248 case NT_ARM_HW_WATCH: 248 case NT_ARM_HW_BREAK:
249 if ((type & HW_BREAKPOINT_RW) != type) 249 if ((type & HW_BREAKPOINT_X) != type)
250 return -EINVAL;
251 break;
252 case NT_ARM_HW_WATCH:
253 if ((type & HW_BREAKPOINT_RW) != type)
254 return -EINVAL;
255 break;
256 default:
250 return -EINVAL; 257 return -EINVAL;
251 break; 258 }
252 default:
253 return -EINVAL;
254 } 259 }
255 260
256 attr->bp_len = len; 261 attr->bp_len = len;
257 attr->bp_type = type; 262 attr->bp_type = type;
258 attr->disabled = !ctrl.enabled; 263 attr->disabled = disabled;
259 264
260 return 0; 265 return 0;
261} 266}
@@ -372,7 +377,7 @@ static int ptrace_hbp_set_addr(unsigned int note_type,
372 377
373#define PTRACE_HBP_ADDR_SZ sizeof(u64) 378#define PTRACE_HBP_ADDR_SZ sizeof(u64)
374#define PTRACE_HBP_CTRL_SZ sizeof(u32) 379#define PTRACE_HBP_CTRL_SZ sizeof(u32)
375#define PTRACE_HBP_REG_OFF sizeof(u32) 380#define PTRACE_HBP_PAD_SZ sizeof(u32)
376 381
377static int hw_break_get(struct task_struct *target, 382static int hw_break_get(struct task_struct *target,
378 const struct user_regset *regset, 383 const struct user_regset *regset,
@@ -380,7 +385,7 @@ static int hw_break_get(struct task_struct *target,
380 void *kbuf, void __user *ubuf) 385 void *kbuf, void __user *ubuf)
381{ 386{
382 unsigned int note_type = regset->core_note_type; 387 unsigned int note_type = regset->core_note_type;
383 int ret, idx = 0, offset = PTRACE_HBP_REG_OFF, limit; 388 int ret, idx = 0, offset, limit;
384 u32 info, ctrl; 389 u32 info, ctrl;
385 u64 addr; 390 u64 addr;
386 391
@@ -389,11 +394,20 @@ static int hw_break_get(struct task_struct *target,
389 if (ret) 394 if (ret)
390 return ret; 395 return ret;
391 396
392 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, &info, 0, 4); 397 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, &info, 0,
398 sizeof(info));
399 if (ret)
400 return ret;
401
402 /* Pad */
403 offset = offsetof(struct user_hwdebug_state, pad);
404 ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf, offset,
405 offset + PTRACE_HBP_PAD_SZ);
393 if (ret) 406 if (ret)
394 return ret; 407 return ret;
395 408
396 /* (address, ctrl) registers */ 409 /* (address, ctrl) registers */
410 offset = offsetof(struct user_hwdebug_state, dbg_regs);
397 limit = regset->n * regset->size; 411 limit = regset->n * regset->size;
398 while (count && offset < limit) { 412 while (count && offset < limit) {
399 ret = ptrace_hbp_get_addr(note_type, target, idx, &addr); 413 ret = ptrace_hbp_get_addr(note_type, target, idx, &addr);
@@ -413,6 +427,13 @@ static int hw_break_get(struct task_struct *target,
413 if (ret) 427 if (ret)
414 return ret; 428 return ret;
415 offset += PTRACE_HBP_CTRL_SZ; 429 offset += PTRACE_HBP_CTRL_SZ;
430
431 ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf,
432 offset,
433 offset + PTRACE_HBP_PAD_SZ);
434 if (ret)
435 return ret;
436 offset += PTRACE_HBP_PAD_SZ;
416 idx++; 437 idx++;
417 } 438 }
418 439
@@ -425,12 +446,13 @@ static int hw_break_set(struct task_struct *target,
425 const void *kbuf, const void __user *ubuf) 446 const void *kbuf, const void __user *ubuf)
426{ 447{
427 unsigned int note_type = regset->core_note_type; 448 unsigned int note_type = regset->core_note_type;
428 int ret, idx = 0, offset = PTRACE_HBP_REG_OFF, limit; 449 int ret, idx = 0, offset, limit;
429 u32 ctrl; 450 u32 ctrl;
430 u64 addr; 451 u64 addr;
431 452
432 /* Resource info */ 453 /* Resource info and pad */
433 ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, 0, 4); 454 offset = offsetof(struct user_hwdebug_state, dbg_regs);
455 ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, 0, offset);
434 if (ret) 456 if (ret)
435 return ret; 457 return ret;
436 458
@@ -454,6 +476,13 @@ static int hw_break_set(struct task_struct *target,
454 if (ret) 476 if (ret)
455 return ret; 477 return ret;
456 offset += PTRACE_HBP_CTRL_SZ; 478 offset += PTRACE_HBP_CTRL_SZ;
479
480 ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
481 offset,
482 offset + PTRACE_HBP_PAD_SZ);
483 if (ret)
484 return ret;
485 offset += PTRACE_HBP_PAD_SZ;
457 idx++; 486 idx++;
458 } 487 }
459 488
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
index 48ffb9fb3fe3..7665a9bfdb1e 100644
--- a/arch/arm64/kernel/setup.c
+++ b/arch/arm64/kernel/setup.c
@@ -170,7 +170,19 @@ static void __init setup_machine_fdt(phys_addr_t dt_phys)
170 170
171void __init early_init_dt_add_memory_arch(u64 base, u64 size) 171void __init early_init_dt_add_memory_arch(u64 base, u64 size)
172{ 172{
173 base &= PAGE_MASK;
173 size &= PAGE_MASK; 174 size &= PAGE_MASK;
175 if (base + size < PHYS_OFFSET) {
176 pr_warning("Ignoring memory block 0x%llx - 0x%llx\n",
177 base, base + size);
178 return;
179 }
180 if (base < PHYS_OFFSET) {
181 pr_warning("Ignoring memory range 0x%llx - 0x%llx\n",
182 base, PHYS_OFFSET);
183 size -= PHYS_OFFSET - base;
184 base = PHYS_OFFSET;
185 }
174 memblock_add(base, size); 186 memblock_add(base, size);
175} 187}
176 188
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
index b711525be21f..226b6bf6e9c2 100644
--- a/arch/arm64/kernel/smp.c
+++ b/arch/arm64/kernel/smp.c
@@ -46,7 +46,6 @@
46#include <asm/sections.h> 46#include <asm/sections.h>
47#include <asm/tlbflush.h> 47#include <asm/tlbflush.h>
48#include <asm/ptrace.h> 48#include <asm/ptrace.h>
49#include <asm/mmu_context.h>
50 49
51/* 50/*
52 * as from 2.5, kernels no longer have an init_tasks structure 51 * as from 2.5, kernels no longer have an init_tasks structure
diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c
index 17948fc7d663..ba457943a16b 100644
--- a/arch/arm64/kernel/vdso.c
+++ b/arch/arm64/kernel/vdso.c
@@ -28,6 +28,7 @@
28#include <linux/sched.h> 28#include <linux/sched.h>
29#include <linux/signal.h> 29#include <linux/signal.h>
30#include <linux/slab.h> 30#include <linux/slab.h>
31#include <linux/timekeeper_internal.h>
31#include <linux/vmalloc.h> 32#include <linux/vmalloc.h>
32 33
33#include <asm/cacheflush.h> 34#include <asm/cacheflush.h>
@@ -222,11 +223,10 @@ struct vm_area_struct *get_gate_vma(struct mm_struct *mm)
222/* 223/*
223 * Update the vDSO data page to keep in sync with kernel timekeeping. 224 * Update the vDSO data page to keep in sync with kernel timekeeping.
224 */ 225 */
225void update_vsyscall(struct timespec *ts, struct timespec *wtm, 226void update_vsyscall(struct timekeeper *tk)
226 struct clocksource *clock, u32 mult)
227{ 227{
228 struct timespec xtime_coarse; 228 struct timespec xtime_coarse;
229 u32 use_syscall = strcmp(clock->name, "arch_sys_counter"); 229 u32 use_syscall = strcmp(tk->clock->name, "arch_sys_counter");
230 230
231 ++vdso_data->tb_seq_count; 231 ++vdso_data->tb_seq_count;
232 smp_wmb(); 232 smp_wmb();
@@ -237,13 +237,13 @@ void update_vsyscall(struct timespec *ts, struct timespec *wtm,
237 vdso_data->xtime_coarse_nsec = xtime_coarse.tv_nsec; 237 vdso_data->xtime_coarse_nsec = xtime_coarse.tv_nsec;
238 238
239 if (!use_syscall) { 239 if (!use_syscall) {
240 vdso_data->cs_cycle_last = clock->cycle_last; 240 vdso_data->cs_cycle_last = tk->clock->cycle_last;
241 vdso_data->xtime_clock_sec = ts->tv_sec; 241 vdso_data->xtime_clock_sec = tk->xtime_sec;
242 vdso_data->xtime_clock_nsec = ts->tv_nsec; 242 vdso_data->xtime_clock_nsec = tk->xtime_nsec >> tk->shift;
243 vdso_data->cs_mult = mult; 243 vdso_data->cs_mult = tk->mult;
244 vdso_data->cs_shift = clock->shift; 244 vdso_data->cs_shift = tk->shift;
245 vdso_data->wtm_clock_sec = wtm->tv_sec; 245 vdso_data->wtm_clock_sec = tk->wall_to_monotonic.tv_sec;
246 vdso_data->wtm_clock_nsec = wtm->tv_nsec; 246 vdso_data->wtm_clock_nsec = tk->wall_to_monotonic.tv_nsec;
247 } 247 }
248 248
249 smp_wmb(); 249 smp_wmb();
diff --git a/arch/frv/kernel/entry.S b/arch/frv/kernel/entry.S
index 002732960315..ee0beb354e4d 100644
--- a/arch/frv/kernel/entry.S
+++ b/arch/frv/kernel/entry.S
@@ -867,8 +867,8 @@ ret_from_fork:
867ret_from_kernel_thread: 867ret_from_kernel_thread:
868 lddi.p @(gr28,#REG_GR(8)),gr20 868 lddi.p @(gr28,#REG_GR(8)),gr20
869 call schedule_tail 869 call schedule_tail
870 or.p gr20,gr20,gr8 870 calll.p @(gr21,gr0)
871 calll @(gr21,gr0) 871 or gr20,gr20,gr8
872 bra sys_exit 872 bra sys_exit
873 873
874 .globl ret_from_kernel_execve 874 .globl ret_from_kernel_execve
diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c
index 655d90d20bb0..e1e3aa196aa4 100644
--- a/arch/frv/kernel/process.c
+++ b/arch/frv/kernel/process.c
@@ -194,7 +194,7 @@ int copy_thread(unsigned long clone_flags,
194 memset(childregs, 0, sizeof(struct pt_regs)); 194 memset(childregs, 0, sizeof(struct pt_regs));
195 childregs->gr9 = usp; /* function */ 195 childregs->gr9 = usp; /* function */
196 childregs->gr8 = arg; 196 childregs->gr8 = arg;
197 chilregs->psr = PSR_S; 197 childregs->psr = PSR_S;
198 p->thread.pc = (unsigned long) ret_from_kernel_thread; 198 p->thread.pc = (unsigned long) ret_from_kernel_thread;
199 save_user_regs(p->thread.user); 199 save_user_regs(p->thread.user);
200 return 0; 200 return 0;
diff --git a/arch/frv/kernel/setup.c b/arch/frv/kernel/setup.c
index 1f1e5efb3385..b8993c87d3de 100644
--- a/arch/frv/kernel/setup.c
+++ b/arch/frv/kernel/setup.c
@@ -112,9 +112,11 @@ char __initdata redboot_command_line[COMMAND_LINE_SIZE];
112#ifdef CONFIG_PM 112#ifdef CONFIG_PM
113#define __pminit 113#define __pminit
114#define __pminitdata 114#define __pminitdata
115#define __pminitconst
115#else 116#else
116#define __pminit __init 117#define __pminit __init
117#define __pminitdata __initdata 118#define __pminitdata __initdata
119#define __pminitconst __initconst
118#endif 120#endif
119 121
120struct clock_cmode { 122struct clock_cmode {
diff --git a/arch/hexagon/include/asm/Kbuild b/arch/hexagon/include/asm/Kbuild
index 3364b6966d26..3bfa9b30f448 100644
--- a/arch/hexagon/include/asm/Kbuild
+++ b/arch/hexagon/include/asm/Kbuild
@@ -1,8 +1,5 @@
1include include/asm-generic/Kbuild.asm
2 1
3header-y += registers.h
4header-y += ucontext.h 2header-y += ucontext.h
5header-y += user.h
6 3
7generic-y += auxvec.h 4generic-y += auxvec.h
8generic-y += bug.h 5generic-y += bug.h
diff --git a/arch/hexagon/include/asm/atomic.h b/arch/hexagon/include/asm/atomic.h
index 3e258043337b..468fbb0781cd 100644
--- a/arch/hexagon/include/asm/atomic.h
+++ b/arch/hexagon/include/asm/atomic.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Atomic operations for the Hexagon architecture 2 * Atomic operations for the Hexagon architecture
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
diff --git a/arch/hexagon/include/asm/barrier.h b/arch/hexagon/include/asm/barrier.h
index a4ed6e26cb1d..1041a8e70ce8 100644
--- a/arch/hexagon/include/asm/barrier.h
+++ b/arch/hexagon/include/asm/barrier.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Memory barrier definitions for the Hexagon architecture 2 * Memory barrier definitions for the Hexagon architecture
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/bitops.h b/arch/hexagon/include/asm/bitops.h
index 4caa649ad78b..9b1e4afbab3c 100644
--- a/arch/hexagon/include/asm/bitops.h
+++ b/arch/hexagon/include/asm/bitops.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Bit operations for the Hexagon architecture 2 * Bit operations for the Hexagon architecture
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
diff --git a/arch/hexagon/include/asm/cache.h b/arch/hexagon/include/asm/cache.h
index 0f01de2eb4ab..f4ca594fdf8c 100644
--- a/arch/hexagon/include/asm/cache.h
+++ b/arch/hexagon/include/asm/cache.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Cache definitions for the Hexagon architecture 2 * Cache definitions for the Hexagon architecture
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/cacheflush.h b/arch/hexagon/include/asm/cacheflush.h
index 6865c1be927a..49e0896ec240 100644
--- a/arch/hexagon/include/asm/cacheflush.h
+++ b/arch/hexagon/include/asm/cacheflush.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Cache flush operations for the Hexagon architecture 2 * Cache flush operations for the Hexagon architecture
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/checksum.h b/arch/hexagon/include/asm/checksum.h
index 3ce4ecd44f82..46ec8a7fd65f 100644
--- a/arch/hexagon/include/asm/checksum.h
+++ b/arch/hexagon/include/asm/checksum.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/cmpxchg.h b/arch/hexagon/include/asm/cmpxchg.h
index c5f9527e1df6..9e7802911a57 100644
--- a/arch/hexagon/include/asm/cmpxchg.h
+++ b/arch/hexagon/include/asm/cmpxchg.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * xchg/cmpxchg operations for the Hexagon architecture 2 * xchg/cmpxchg operations for the Hexagon architecture
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
diff --git a/arch/hexagon/include/asm/delay.h b/arch/hexagon/include/asm/delay.h
index 9ab12e9a872b..53079719d667 100644
--- a/arch/hexagon/include/asm/delay.h
+++ b/arch/hexagon/include/asm/delay.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/dma-mapping.h b/arch/hexagon/include/asm/dma-mapping.h
index 233ed3d2d25e..85e9935660cb 100644
--- a/arch/hexagon/include/asm/dma-mapping.h
+++ b/arch/hexagon/include/asm/dma-mapping.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * DMA operations for the Hexagon architecture 2 * DMA operations for the Hexagon architecture
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/dma.h b/arch/hexagon/include/asm/dma.h
index da6d2f61a93a..9e34ff49f3b7 100644
--- a/arch/hexagon/include/asm/dma.h
+++ b/arch/hexagon/include/asm/dma.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/elf.h b/arch/hexagon/include/asm/elf.h
index 82b499621e05..1ba4b3bff5ed 100644
--- a/arch/hexagon/include/asm/elf.h
+++ b/arch/hexagon/include/asm/elf.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * ELF definitions for the Hexagon architecture 2 * ELF definitions for the Hexagon architecture
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/exec.h b/arch/hexagon/include/asm/exec.h
index 350e6d497d44..c32b2132614b 100644
--- a/arch/hexagon/include/asm/exec.h
+++ b/arch/hexagon/include/asm/exec.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Process execution related definitions for the Hexagon architecture 2 * Process execution related definitions for the Hexagon architecture
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/fixmap.h b/arch/hexagon/include/asm/fixmap.h
index b27f4941645b..b75b6bf4269c 100644
--- a/arch/hexagon/include/asm/fixmap.h
+++ b/arch/hexagon/include/asm/fixmap.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Fixmap support for Hexagon - enough to support highmem features 2 * Fixmap support for Hexagon - enough to support highmem features
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/hexagon_vm.h b/arch/hexagon/include/asm/hexagon_vm.h
index 182cb9d54769..c144bee6cabe 100644
--- a/arch/hexagon/include/asm/hexagon_vm.h
+++ b/arch/hexagon/include/asm/hexagon_vm.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Declarations for to Hexagon Virtal Machine. 2 * Declarations for to Hexagon Virtal Machine.
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/intrinsics.h b/arch/hexagon/include/asm/intrinsics.h
index 1c02186d2e9a..ca587737fb2a 100644
--- a/arch/hexagon/include/asm/intrinsics.h
+++ b/arch/hexagon/include/asm/intrinsics.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/io.h b/arch/hexagon/include/asm/io.h
index b3acc2cc71bf..e527cfeff5ba 100644
--- a/arch/hexagon/include/asm/io.h
+++ b/arch/hexagon/include/asm/io.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * IO definitions for the Hexagon architecture 2 * IO definitions for the Hexagon architecture
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/irq.h b/arch/hexagon/include/asm/irq.h
index ded8c15cf3e5..51661db389d6 100644
--- a/arch/hexagon/include/asm/irq.h
+++ b/arch/hexagon/include/asm/irq.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/irqflags.h b/arch/hexagon/include/asm/irqflags.h
index ec1523655416..e5fd9492d60f 100644
--- a/arch/hexagon/include/asm/irqflags.h
+++ b/arch/hexagon/include/asm/irqflags.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * IRQ support for the Hexagon architecture 2 * IRQ support for the Hexagon architecture
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/kgdb.h b/arch/hexagon/include/asm/kgdb.h
index 9e8779702f10..32a6fb66944a 100644
--- a/arch/hexagon/include/asm/kgdb.h
+++ b/arch/hexagon/include/asm/kgdb.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * arch/hexagon/include/asm/kgdb.h - Hexagon KGDB Support 2 * arch/hexagon/include/asm/kgdb.h - Hexagon KGDB Support
3 * 3 *
4 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/linkage.h b/arch/hexagon/include/asm/linkage.h
index a00b85f680b8..31b4cbe7e583 100644
--- a/arch/hexagon/include/asm/linkage.h
+++ b/arch/hexagon/include/asm/linkage.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/mem-layout.h b/arch/hexagon/include/asm/mem-layout.h
index 72e5dcda79f5..af16e977c55e 100644
--- a/arch/hexagon/include/asm/mem-layout.h
+++ b/arch/hexagon/include/asm/mem-layout.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Memory layout definitions for the Hexagon architecture 2 * Memory layout definitions for the Hexagon architecture
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/mmu.h b/arch/hexagon/include/asm/mmu.h
index 30a5d8d2659d..2288b19fd0f2 100644
--- a/arch/hexagon/include/asm/mmu.h
+++ b/arch/hexagon/include/asm/mmu.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/mmu_context.h b/arch/hexagon/include/asm/mmu_context.h
index b4fe5a5411b6..d423d2e73c30 100644
--- a/arch/hexagon/include/asm/mmu_context.h
+++ b/arch/hexagon/include/asm/mmu_context.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * MM context support for the Hexagon architecture 2 * MM context support for the Hexagon architecture
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/module.h b/arch/hexagon/include/asm/module.h
index 72ba494e6d7d..6b4323acef44 100644
--- a/arch/hexagon/include/asm/module.h
+++ b/arch/hexagon/include/asm/module.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/page.h b/arch/hexagon/include/asm/page.h
index edd97626c482..692adc213429 100644
--- a/arch/hexagon/include/asm/page.h
+++ b/arch/hexagon/include/asm/page.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Page management definitions for the Hexagon architecture 2 * Page management definitions for the Hexagon architecture
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/perf_event.h b/arch/hexagon/include/asm/perf_event.h
index 8b8526b491c7..430978b1de38 100644
--- a/arch/hexagon/include/asm/perf_event.h
+++ b/arch/hexagon/include/asm/perf_event.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/pgalloc.h b/arch/hexagon/include/asm/pgalloc.h
index 13443c775131..679bf6d66487 100644
--- a/arch/hexagon/include/asm/pgalloc.h
+++ b/arch/hexagon/include/asm/pgalloc.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Page table support for the Hexagon architecture 2 * Page table support for the Hexagon architecture
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/pgtable.h b/arch/hexagon/include/asm/pgtable.h
index ca619bf225ef..20d55f69fe55 100644
--- a/arch/hexagon/include/asm/pgtable.h
+++ b/arch/hexagon/include/asm/pgtable.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Page table support for the Hexagon architecture 2 * Page table support for the Hexagon architecture
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/processor.h b/arch/hexagon/include/asm/processor.h
index e8ea459002a4..a03323ab9d44 100644
--- a/arch/hexagon/include/asm/processor.h
+++ b/arch/hexagon/include/asm/processor.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Process/processor support for the Hexagon architecture 2 * Process/processor support for the Hexagon architecture
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/smp.h b/arch/hexagon/include/asm/smp.h
index 87c869a6a897..2b9b974e0952 100644
--- a/arch/hexagon/include/asm/smp.h
+++ b/arch/hexagon/include/asm/smp.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * SMP definitions for the Hexagon architecture 2 * SMP definitions for the Hexagon architecture
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/spinlock.h b/arch/hexagon/include/asm/spinlock.h
index 168a920485a8..12ca4ebc0338 100644
--- a/arch/hexagon/include/asm/spinlock.h
+++ b/arch/hexagon/include/asm/spinlock.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Spinlock support for the Hexagon architecture 2 * Spinlock support for the Hexagon architecture
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
diff --git a/arch/hexagon/include/asm/spinlock_types.h b/arch/hexagon/include/asm/spinlock_types.h
index 99b5a7575c21..7a906b5214a4 100644
--- a/arch/hexagon/include/asm/spinlock_types.h
+++ b/arch/hexagon/include/asm/spinlock_types.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Spinlock support for the Hexagon architecture 2 * Spinlock support for the Hexagon architecture
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/string.h b/arch/hexagon/include/asm/string.h
index f4489c15942c..7d37f47a1d07 100644
--- a/arch/hexagon/include/asm/string.h
+++ b/arch/hexagon/include/asm/string.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/suspend.h b/arch/hexagon/include/asm/suspend.h
index 089dd8268791..18b44b557fbc 100644
--- a/arch/hexagon/include/asm/suspend.h
+++ b/arch/hexagon/include/asm/suspend.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/switch_to.h b/arch/hexagon/include/asm/switch_to.h
index 28ca0dfb6064..96745e7b3e3c 100644
--- a/arch/hexagon/include/asm/switch_to.h
+++ b/arch/hexagon/include/asm/switch_to.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Task switching definitions for the Hexagon architecture 2 * Task switching definitions for the Hexagon architecture
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/syscall.h b/arch/hexagon/include/asm/syscall.h
index 3e7d61d38d97..fb0e9d48faa6 100644
--- a/arch/hexagon/include/asm/syscall.h
+++ b/arch/hexagon/include/asm/syscall.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Syscall support for the Hexagon architecture 2 * Syscall support for the Hexagon architecture
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/thread_info.h b/arch/hexagon/include/asm/thread_info.h
index e4a0aad69cbb..f7c32406a711 100644
--- a/arch/hexagon/include/asm/thread_info.h
+++ b/arch/hexagon/include/asm/thread_info.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Thread support for the Hexagon architecture 2 * Thread support for the Hexagon architecture
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/time.h b/arch/hexagon/include/asm/time.h
index 081b82cac9a9..deda170c03b8 100644
--- a/arch/hexagon/include/asm/time.h
+++ b/arch/hexagon/include/asm/time.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/timer-regs.h b/arch/hexagon/include/asm/timer-regs.h
index d80db239a7b6..79912b8c1e5b 100644
--- a/arch/hexagon/include/asm/timer-regs.h
+++ b/arch/hexagon/include/asm/timer-regs.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Timer support for Hexagon 2 * Timer support for Hexagon
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/timex.h b/arch/hexagon/include/asm/timex.h
index b11c62b23f31..f63fe132f072 100644
--- a/arch/hexagon/include/asm/timex.h
+++ b/arch/hexagon/include/asm/timex.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/tlb.h b/arch/hexagon/include/asm/tlb.h
index 473abde01d62..2f00772cc08a 100644
--- a/arch/hexagon/include/asm/tlb.h
+++ b/arch/hexagon/include/asm/tlb.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/tlbflush.h b/arch/hexagon/include/asm/tlbflush.h
index b89a90251225..62d95a9705c4 100644
--- a/arch/hexagon/include/asm/tlbflush.h
+++ b/arch/hexagon/include/asm/tlbflush.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * TLB flush support for Hexagon 2 * TLB flush support for Hexagon
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/traps.h b/arch/hexagon/include/asm/traps.h
index 6a407f6e5e24..ec11285012cf 100644
--- a/arch/hexagon/include/asm/traps.h
+++ b/arch/hexagon/include/asm/traps.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Trap support for Hexagon 2 * Trap support for Hexagon
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/uaccess.h b/arch/hexagon/include/asm/uaccess.h
index 7e706eadbf0a..e4127e4d6a5b 100644
--- a/arch/hexagon/include/asm/uaccess.h
+++ b/arch/hexagon/include/asm/uaccess.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * User memory access support for Hexagon 2 * User memory access support for Hexagon
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/vdso.h b/arch/hexagon/include/asm/vdso.h
index 2d95cbba3572..ed08e6c6886d 100644
--- a/arch/hexagon/include/asm/vdso.h
+++ b/arch/hexagon/include/asm/vdso.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * vDSO implementation for Hexagon 2 * vDSO implementation for Hexagon
3 * 3 *
4 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/vm_fault.h b/arch/hexagon/include/asm/vm_fault.h
index cacda36ef5d5..9b0e9c50ceda 100644
--- a/arch/hexagon/include/asm/vm_fault.h
+++ b/arch/hexagon/include/asm/vm_fault.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/vm_mmu.h b/arch/hexagon/include/asm/vm_mmu.h
index 580462de5cca..9a94de7969bb 100644
--- a/arch/hexagon/include/asm/vm_mmu.h
+++ b/arch/hexagon/include/asm/vm_mmu.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Hexagon VM page table entry definitions 2 * Hexagon VM page table entry definitions
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/uapi/asm/Kbuild b/arch/hexagon/include/uapi/asm/Kbuild
index baebb3da1d44..c31706c38631 100644
--- a/arch/hexagon/include/uapi/asm/Kbuild
+++ b/arch/hexagon/include/uapi/asm/Kbuild
@@ -1,3 +1,15 @@
1# UAPI Header export list 1# UAPI Header export list
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3 3
4header-y += bitsperlong.h
5header-y += byteorder.h
6header-y += kvm_para.h
7header-y += param.h
8header-y += ptrace.h
9header-y += registers.h
10header-y += setup.h
11header-y += sigcontext.h
12header-y += signal.h
13header-y += swab.h
14header-y += unistd.h
15header-y += user.h
diff --git a/arch/hexagon/include/asm/bitsperlong.h b/arch/hexagon/include/uapi/asm/bitsperlong.h
index 2701cae3426e..4a658151383d 100644
--- a/arch/hexagon/include/asm/bitsperlong.h
+++ b/arch/hexagon/include/uapi/asm/bitsperlong.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/byteorder.h b/arch/hexagon/include/uapi/asm/byteorder.h
index 0e19b9fe4ca6..e31f3f7d9a45 100644
--- a/arch/hexagon/include/asm/byteorder.h
+++ b/arch/hexagon/include/uapi/asm/byteorder.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/kvm_para.h b/arch/hexagon/include/uapi/asm/kvm_para.h
index 14fab8f0b957..14fab8f0b957 100644
--- a/arch/hexagon/include/asm/kvm_para.h
+++ b/arch/hexagon/include/uapi/asm/kvm_para.h
diff --git a/arch/hexagon/include/asm/param.h b/arch/hexagon/include/uapi/asm/param.h
index 285344bbd036..5cec8c0417fb 100644
--- a/arch/hexagon/include/asm/param.h
+++ b/arch/hexagon/include/uapi/asm/param.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/ptrace.h b/arch/hexagon/include/uapi/asm/ptrace.h
index 3d2f607cd63c..8ef784047a74 100644
--- a/arch/hexagon/include/asm/ptrace.h
+++ b/arch/hexagon/include/uapi/asm/ptrace.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Ptrace definitions for the Hexagon architecture 2 * Ptrace definitions for the Hexagon architecture
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/registers.h b/arch/hexagon/include/uapi/asm/registers.h
index 4dd741be855d..c20406f63b5c 100644
--- a/arch/hexagon/include/asm/registers.h
+++ b/arch/hexagon/include/uapi/asm/registers.h
@@ -1,23 +1,8 @@
1/* 1/*
2 * Register definitions for the Hexagon architecture 2 * Register definitions for the Hexagon architecture
3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and
8 * only version 2 as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 * 02110-1301, USA.
19 */ 3 */
20 4
5
21#ifndef _ASM_REGISTERS_H 6#ifndef _ASM_REGISTERS_H
22#define _ASM_REGISTERS_H 7#define _ASM_REGISTERS_H
23 8
diff --git a/arch/hexagon/include/asm/setup.h b/arch/hexagon/include/uapi/asm/setup.h
index 3b754c50bc0a..e48285e4af96 100644
--- a/arch/hexagon/include/asm/setup.h
+++ b/arch/hexagon/include/uapi/asm/setup.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/sigcontext.h b/arch/hexagon/include/uapi/asm/sigcontext.h
index ce6dcd995220..b6ba5369ccc6 100644
--- a/arch/hexagon/include/asm/sigcontext.h
+++ b/arch/hexagon/include/uapi/asm/sigcontext.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/signal.h b/arch/hexagon/include/uapi/asm/signal.h
index 471c0562e17b..939556817d34 100644
--- a/arch/hexagon/include/asm/signal.h
+++ b/arch/hexagon/include/uapi/asm/signal.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/swab.h b/arch/hexagon/include/uapi/asm/swab.h
index 99cf0be3fb83..9069e9247a2e 100644
--- a/arch/hexagon/include/asm/swab.h
+++ b/arch/hexagon/include/uapi/asm/swab.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/unistd.h b/arch/hexagon/include/uapi/asm/unistd.h
index c0d5565030ae..81312d6a52e6 100644
--- a/arch/hexagon/include/asm/unistd.h
+++ b/arch/hexagon/include/uapi/asm/unistd.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Syscall support for Hexagon 2 * Syscall support for Hexagon
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/include/asm/user.h b/arch/hexagon/include/uapi/asm/user.h
index 3a55078543d1..cef13ee1413f 100644
--- a/arch/hexagon/include/asm/user.h
+++ b/arch/hexagon/include/uapi/asm/user.h
@@ -1,21 +1,3 @@
1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and
6 * only version 2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16 * 02110-1301, USA.
17 */
18
19#ifndef HEXAGON_ASM_USER_H 1#ifndef HEXAGON_ASM_USER_H
20#define HEXAGON_ASM_USER_H 2#define HEXAGON_ASM_USER_H
21 3
diff --git a/arch/hexagon/kernel/asm-offsets.c b/arch/hexagon/kernel/asm-offsets.c
index 89ffa514611f..2d5e84d3b00d 100644
--- a/arch/hexagon/kernel/asm-offsets.c
+++ b/arch/hexagon/kernel/asm-offsets.c
@@ -5,7 +5,7 @@
5 * Kevin Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com 5 * Kevin Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com
6 * Copyright (C) 2000 MIPS Technologies, Inc. 6 * Copyright (C) 2000 MIPS Technologies, Inc.
7 * 7 *
8 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 8 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
9 * 9 *
10 * This program is free software; you can redistribute it and/or modify 10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 and 11 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/kernel/dma.c b/arch/hexagon/kernel/dma.c
index 2b48751aa5f7..65c7bdcf565e 100644
--- a/arch/hexagon/kernel/dma.c
+++ b/arch/hexagon/kernel/dma.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * DMA implementation for Hexagon 2 * DMA implementation for Hexagon
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/kernel/head.S b/arch/hexagon/kernel/head.S
index 8e6b819125a3..d859402c73ba 100644
--- a/arch/hexagon/kernel/head.S
+++ b/arch/hexagon/kernel/head.S
@@ -1,7 +1,7 @@
1/* 1/*
2 * Early kernel startup code for Hexagon 2 * Early kernel startup code for Hexagon
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
diff --git a/arch/hexagon/kernel/hexagon_ksyms.c b/arch/hexagon/kernel/hexagon_ksyms.c
index 7f1892471805..32b1379d6877 100644
--- a/arch/hexagon/kernel/hexagon_ksyms.c
+++ b/arch/hexagon/kernel/hexagon_ksyms.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Export of symbols defined in assembly files and/or libgcc. 2 * Export of symbols defined in assembly files and/or libgcc.
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/kernel/irq_cpu.c b/arch/hexagon/kernel/irq_cpu.c
index d4416a1a431e..85883e1fdc12 100644
--- a/arch/hexagon/kernel/irq_cpu.c
+++ b/arch/hexagon/kernel/irq_cpu.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * First-level interrupt controller model for Hexagon. 2 * First-level interrupt controller model for Hexagon.
3 * 3 *
4 * Copyright (c) 2010-2011 Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/kernel/kgdb.c b/arch/hexagon/kernel/kgdb.c
index fe4aa1bcca50..344645370646 100644
--- a/arch/hexagon/kernel/kgdb.c
+++ b/arch/hexagon/kernel/kgdb.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * arch/hexagon/kernel/kgdb.c - Hexagon KGDB Support 2 * arch/hexagon/kernel/kgdb.c - Hexagon KGDB Support
3 * 3 *
4 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/kernel/module.c b/arch/hexagon/kernel/module.c
index 61a76bae3668..477d07a5646c 100644
--- a/arch/hexagon/kernel/module.c
+++ b/arch/hexagon/kernel/module.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Kernel module loader for Hexagon 2 * Kernel module loader for Hexagon
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/kernel/process.c b/arch/hexagon/kernel/process.c
index af51de63b835..9f6d7411b574 100644
--- a/arch/hexagon/kernel/process.c
+++ b/arch/hexagon/kernel/process.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Process creation support for Hexagon 2 * Process creation support for Hexagon
3 * 3 *
4 * Copyright (c) 2010-2012, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2012, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/kernel/ptrace.c b/arch/hexagon/kernel/ptrace.c
index 96c3b2c4dbad..670b1b0bee63 100644
--- a/arch/hexagon/kernel/ptrace.c
+++ b/arch/hexagon/kernel/ptrace.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Ptrace support for Hexagon 2 * Ptrace support for Hexagon
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/kernel/reset.c b/arch/hexagon/kernel/reset.c
index 4d72fc58e9b1..6aeabc962b3b 100644
--- a/arch/hexagon/kernel/reset.c
+++ b/arch/hexagon/kernel/reset.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/kernel/setup.c b/arch/hexagon/kernel/setup.c
index 1202f78d25cb..94a387835008 100644
--- a/arch/hexagon/kernel/setup.c
+++ b/arch/hexagon/kernel/setup.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Arch related setup for Hexagon 2 * Arch related setup for Hexagon
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/kernel/signal.c b/arch/hexagon/kernel/signal.c
index 1ea16bec7b91..5047b8b879c0 100644
--- a/arch/hexagon/kernel/signal.c
+++ b/arch/hexagon/kernel/signal.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Signal support for Hexagon processor 2 * Signal support for Hexagon processor
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/kernel/smp.c b/arch/hexagon/kernel/smp.c
index 149fbefc1a4d..8e095dffd070 100644
--- a/arch/hexagon/kernel/smp.c
+++ b/arch/hexagon/kernel/smp.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * SMP support for Hexagon 2 * SMP support for Hexagon
3 * 3 *
4 * Copyright (c) 2010-2012, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2012, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/kernel/stacktrace.c b/arch/hexagon/kernel/stacktrace.c
index 11c597b2ac59..f94918b449a8 100644
--- a/arch/hexagon/kernel/stacktrace.c
+++ b/arch/hexagon/kernel/stacktrace.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Stacktrace support for Hexagon 2 * Stacktrace support for Hexagon
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/kernel/syscall.c b/arch/hexagon/kernel/syscall.c
index 25a9bfe3445d..319fa6494f58 100644
--- a/arch/hexagon/kernel/syscall.c
+++ b/arch/hexagon/kernel/syscall.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Hexagon system calls 2 * Hexagon system calls
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/kernel/syscalltab.c b/arch/hexagon/kernel/syscalltab.c
index c550f4177ab8..7024b1ddc08a 100644
--- a/arch/hexagon/kernel/syscalltab.c
+++ b/arch/hexagon/kernel/syscalltab.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * System call table for Hexagon 2 * System call table for Hexagon
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/kernel/time.c b/arch/hexagon/kernel/time.c
index 36ba64185711..9903fad997f3 100644
--- a/arch/hexagon/kernel/time.c
+++ b/arch/hexagon/kernel/time.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Time related functions for Hexagon architecture 2 * Time related functions for Hexagon architecture
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/kernel/topology.c b/arch/hexagon/kernel/topology.c
index ba4475184432..352f27e809fd 100644
--- a/arch/hexagon/kernel/topology.c
+++ b/arch/hexagon/kernel/topology.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * CPU topology for Hexagon 2 * CPU topology for Hexagon
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/kernel/trampoline.S b/arch/hexagon/kernel/trampoline.S
index 06c36c036b98..18110a9056b0 100644
--- a/arch/hexagon/kernel/trampoline.S
+++ b/arch/hexagon/kernel/trampoline.S
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/kernel/traps.c b/arch/hexagon/kernel/traps.c
index f08857d0715b..a41eeb8eeaa1 100644
--- a/arch/hexagon/kernel/traps.c
+++ b/arch/hexagon/kernel/traps.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Kernel traps/events for Hexagon processor 2 * Kernel traps/events for Hexagon processor
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/kernel/vdso.c b/arch/hexagon/kernel/vdso.c
index 5d39f42f7085..0bf5a87e4d0a 100644
--- a/arch/hexagon/kernel/vdso.c
+++ b/arch/hexagon/kernel/vdso.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * vDSO implementation for Hexagon 2 * vDSO implementation for Hexagon
3 * 3 *
4 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/kernel/vm_entry.S b/arch/hexagon/kernel/vm_entry.S
index 5b99066cbc8d..cd71673ac259 100644
--- a/arch/hexagon/kernel/vm_entry.S
+++ b/arch/hexagon/kernel/vm_entry.S
@@ -1,7 +1,7 @@
1/* 1/*
2 * Event entry/exit for Hexagon 2 * Event entry/exit for Hexagon
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/kernel/vm_events.c b/arch/hexagon/kernel/vm_events.c
index 591fc1b68635..9b5a4a295a68 100644
--- a/arch/hexagon/kernel/vm_events.c
+++ b/arch/hexagon/kernel/vm_events.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Mostly IRQ support for Hexagon 2 * Mostly IRQ support for Hexagon
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/kernel/vm_init_segtable.S b/arch/hexagon/kernel/vm_init_segtable.S
index aebb35b6465e..80967f2192b3 100644
--- a/arch/hexagon/kernel/vm_init_segtable.S
+++ b/arch/hexagon/kernel/vm_init_segtable.S
@@ -1,7 +1,7 @@
1/* 1/*
2 * Initial page table for Linux kernel under Hexagon VM, 2 * Initial page table for Linux kernel under Hexagon VM,
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/kernel/vm_ops.S b/arch/hexagon/kernel/vm_ops.S
index 24d7fcac4ff2..9fb77b3f6cf2 100644
--- a/arch/hexagon/kernel/vm_ops.S
+++ b/arch/hexagon/kernel/vm_ops.S
@@ -1,7 +1,7 @@
1/* 1/*
2 * Hexagon VM instruction support 2 * Hexagon VM instruction support
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/kernel/vm_switch.S b/arch/hexagon/kernel/vm_switch.S
index 0decf2f58e32..62c6df91b3bb 100644
--- a/arch/hexagon/kernel/vm_switch.S
+++ b/arch/hexagon/kernel/vm_switch.S
@@ -1,7 +1,7 @@
1/* 1/*
2 * Context switch support for Hexagon 2 * Context switch support for Hexagon
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/kernel/vm_vectors.S b/arch/hexagon/kernel/vm_vectors.S
index 97a4b50b00df..620f42cc582a 100644
--- a/arch/hexagon/kernel/vm_vectors.S
+++ b/arch/hexagon/kernel/vm_vectors.S
@@ -1,7 +1,7 @@
1/* 1/*
2 * Event jump tables 2 * Event jump tables
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/kernel/vmlinux.lds.S b/arch/hexagon/kernel/vmlinux.lds.S
index 071d3c30edfb..14e793f6abbf 100644
--- a/arch/hexagon/kernel/vmlinux.lds.S
+++ b/arch/hexagon/kernel/vmlinux.lds.S
@@ -1,7 +1,7 @@
1/* 1/*
2 * Linker script for Hexagon kernel 2 * Linker script for Hexagon kernel
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/lib/checksum.c b/arch/hexagon/lib/checksum.c
index 93005522d52b..8169f78a46a7 100644
--- a/arch/hexagon/lib/checksum.c
+++ b/arch/hexagon/lib/checksum.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Checksum functions for Hexagon 2 * Checksum functions for Hexagon
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/lib/io.c b/arch/hexagon/lib/io.c
index 8ae47ba0e705..885c9626d5e0 100644
--- a/arch/hexagon/lib/io.c
+++ b/arch/hexagon/lib/io.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * I/O access functions for Hexagon 2 * I/O access functions for Hexagon
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/lib/memcpy.S b/arch/hexagon/lib/memcpy.S
index 2101c3395665..81c561c4b4d6 100644
--- a/arch/hexagon/lib/memcpy.S
+++ b/arch/hexagon/lib/memcpy.S
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3 * 3 *
4 * 4 *
5 * This program is free software; you can redistribute it and/or modify 5 * This program is free software; you can redistribute it and/or modify
diff --git a/arch/hexagon/lib/memset.S b/arch/hexagon/lib/memset.S
index 26d961439ab0..9341889ea3f6 100644
--- a/arch/hexagon/lib/memset.S
+++ b/arch/hexagon/lib/memset.S
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2011 Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2011, The Linux Foundation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/mm/cache.c b/arch/hexagon/mm/cache.c
index c5cf6ee27587..fe14ccf28561 100644
--- a/arch/hexagon/mm/cache.c
+++ b/arch/hexagon/mm/cache.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Cache management functions for Hexagon 2 * Cache management functions for Hexagon
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/mm/copy_from_user.S b/arch/hexagon/mm/copy_from_user.S
index 8eb1d4d61a3d..7fc94f3e6642 100644
--- a/arch/hexagon/mm/copy_from_user.S
+++ b/arch/hexagon/mm/copy_from_user.S
@@ -1,7 +1,7 @@
1/* 1/*
2 * User memory copy functions for kernel 2 * User memory copy functions for kernel
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/mm/copy_to_user.S b/arch/hexagon/mm/copy_to_user.S
index cb9740ed9e7d..0cfbcc09d1d9 100644
--- a/arch/hexagon/mm/copy_to_user.S
+++ b/arch/hexagon/mm/copy_to_user.S
@@ -1,7 +1,7 @@
1/* 1/*
2 * User memory copying routines for the Hexagon Kernel 2 * User memory copying routines for the Hexagon Kernel
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/mm/copy_user_template.S b/arch/hexagon/mm/copy_user_template.S
index 08d7d7b23daa..254d8cc766bb 100644
--- a/arch/hexagon/mm/copy_user_template.S
+++ b/arch/hexagon/mm/copy_user_template.S
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/mm/init.c b/arch/hexagon/mm/init.c
index b57d741750b2..69ffcfd28794 100644
--- a/arch/hexagon/mm/init.c
+++ b/arch/hexagon/mm/init.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Memory subsystem initialization for Hexagon 2 * Memory subsystem initialization for Hexagon
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/mm/ioremap.c b/arch/hexagon/mm/ioremap.c
index 3a37bc3b0116..5905fd5f97f6 100644
--- a/arch/hexagon/mm/ioremap.c
+++ b/arch/hexagon/mm/ioremap.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * I/O remap functions for Hexagon 2 * I/O remap functions for Hexagon
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/mm/pgalloc.c b/arch/hexagon/mm/pgalloc.c
index b175e2d42b89..19760a4611d9 100644
--- a/arch/hexagon/mm/pgalloc.c
+++ b/arch/hexagon/mm/pgalloc.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/mm/strnlen_user.S b/arch/hexagon/mm/strnlen_user.S
index 5c6a16c7c72a..0eecb7a768fe 100644
--- a/arch/hexagon/mm/strnlen_user.S
+++ b/arch/hexagon/mm/strnlen_user.S
@@ -1,7 +1,7 @@
1/* 1/*
2 * User string length functions for kernel 2 * User string length functions for kernel
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/mm/uaccess.c b/arch/hexagon/mm/uaccess.c
index e748108b47a7..34127261c2b7 100644
--- a/arch/hexagon/mm/uaccess.c
+++ b/arch/hexagon/mm/uaccess.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/mm/vm_fault.c b/arch/hexagon/mm/vm_fault.c
index 513b74cb397e..308ef0ce648b 100644
--- a/arch/hexagon/mm/vm_fault.c
+++ b/arch/hexagon/mm/vm_fault.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Memory fault handling for Hexagon 2 * Memory fault handling for Hexagon
3 * 3 *
4 * Copyright (c) 2010-2011 Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/hexagon/mm/vm_tlb.c b/arch/hexagon/mm/vm_tlb.c
index c6ff41575461..9647d00cb761 100644
--- a/arch/hexagon/mm/vm_tlb.c
+++ b/arch/hexagon/mm/vm_tlb.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Hexagon Virtual Machine TLB functions 2 * Hexagon Virtual Machine TLB functions
3 * 3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
diff --git a/arch/ia64/include/uapi/asm/Kbuild b/arch/ia64/include/uapi/asm/Kbuild
index 30cafac93703..1b3f5eb5fcdb 100644
--- a/arch/ia64/include/uapi/asm/Kbuild
+++ b/arch/ia64/include/uapi/asm/Kbuild
@@ -1,6 +1,8 @@
1# UAPI Header export list 1# UAPI Header export list
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3 3
4generic-y += kvm_para.h
5
4header-y += auxvec.h 6header-y += auxvec.h
5header-y += bitsperlong.h 7header-y += bitsperlong.h
6header-y += break.h 8header-y += break.h
diff --git a/arch/ia64/include/uapi/asm/kvm_para.h b/arch/ia64/include/uapi/asm/kvm_para.h
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/arch/ia64/include/uapi/asm/kvm_para.h
+++ /dev/null
diff --git a/arch/mips/include/asm/Kbuild b/arch/mips/include/asm/Kbuild
index e69de29bb2d1..533053d12ced 100644
--- a/arch/mips/include/asm/Kbuild
+++ b/arch/mips/include/asm/Kbuild
@@ -0,0 +1 @@
# MIPS headers
diff --git a/arch/mips/include/asm/delay.h b/arch/mips/include/asm/delay.h
index e7cd78277c23..dc0a5f77a35c 100644
--- a/arch/mips/include/asm/delay.h
+++ b/arch/mips/include/asm/delay.h
@@ -13,9 +13,9 @@
13 13
14#include <linux/param.h> 14#include <linux/param.h>
15 15
16extern void __delay(unsigned int loops); 16extern void __delay(unsigned long loops);
17extern void __ndelay(unsigned int ns); 17extern void __ndelay(unsigned long ns);
18extern void __udelay(unsigned int us); 18extern void __udelay(unsigned long us);
19 19
20#define ndelay(ns) __ndelay(ns) 20#define ndelay(ns) __ndelay(ns)
21#define udelay(us) __udelay(us) 21#define udelay(us) __udelay(us)
diff --git a/arch/mips/include/asm/pgtable-64.h b/arch/mips/include/asm/pgtable-64.h
index c26e18250079..f5b521d5a67d 100644
--- a/arch/mips/include/asm/pgtable-64.h
+++ b/arch/mips/include/asm/pgtable-64.h
@@ -9,6 +9,7 @@
9#ifndef _ASM_PGTABLE_64_H 9#ifndef _ASM_PGTABLE_64_H
10#define _ASM_PGTABLE_64_H 10#define _ASM_PGTABLE_64_H
11 11
12#include <linux/compiler.h>
12#include <linux/linkage.h> 13#include <linux/linkage.h>
13 14
14#include <asm/addrspace.h> 15#include <asm/addrspace.h>
@@ -172,7 +173,19 @@ static inline int pmd_none(pmd_t pmd)
172 return pmd_val(pmd) == (unsigned long) invalid_pte_table; 173 return pmd_val(pmd) == (unsigned long) invalid_pte_table;
173} 174}
174 175
175#define pmd_bad(pmd) (pmd_val(pmd) & ~PAGE_MASK) 176static inline int pmd_bad(pmd_t pmd)
177{
178#ifdef CONFIG_HUGETLB_PAGE
179 /* pmd_huge(pmd) but inline */
180 if (unlikely(pmd_val(pmd) & _PAGE_HUGE))
181 return 0;
182#endif
183
184 if (unlikely(pmd_val(pmd) & ~PAGE_MASK))
185 return 1;
186
187 return 0;
188}
176 189
177static inline int pmd_present(pmd_t pmd) 190static inline int pmd_present(pmd_t pmd)
178{ 191{
diff --git a/arch/mips/jz4740/serial.h b/arch/mips/jz4740/serial.h
index b9fe3ade0289..8eb715bb1ea8 100644
--- a/arch/mips/jz4740/serial.h
+++ b/arch/mips/jz4740/serial.h
@@ -14,6 +14,9 @@
14 */ 14 */
15 15
16#ifndef __MIPS_JZ4740_SERIAL_H__ 16#ifndef __MIPS_JZ4740_SERIAL_H__
17#define __MIPS_JZ4740_SERIAL_H__
18
19struct uart_port;
17 20
18void jz4740_serial_out(struct uart_port *p, int offset, int value); 21void jz4740_serial_out(struct uart_port *p, int offset, int value);
19 22
diff --git a/arch/mips/kernel/smp-cmp.c b/arch/mips/kernel/smp-cmp.c
index afc379ca3753..06cd0c610f44 100644
--- a/arch/mips/kernel/smp-cmp.c
+++ b/arch/mips/kernel/smp-cmp.c
@@ -97,7 +97,7 @@ static void cmp_init_secondary(void)
97 97
98 /* Enable per-cpu interrupts: platform specific */ 98 /* Enable per-cpu interrupts: platform specific */
99 99
100 c->core = (read_c0_ebase() >> 1) & 0xff; 100 c->core = (read_c0_ebase() >> 1) & 0x1ff;
101#if defined(CONFIG_MIPS_MT_SMP) || defined(CONFIG_MIPS_MT_SMTC) 101#if defined(CONFIG_MIPS_MT_SMP) || defined(CONFIG_MIPS_MT_SMTC)
102 c->vpe_id = (read_c0_tcbind() >> TCBIND_CURVPE_SHIFT) & TCBIND_CURVPE; 102 c->vpe_id = (read_c0_tcbind() >> TCBIND_CURVPE_SHIFT) & TCBIND_CURVPE;
103#endif 103#endif
diff --git a/arch/mips/lib/delay.c b/arch/mips/lib/delay.c
index 5995969e8c42..dc81ca8dc0dd 100644
--- a/arch/mips/lib/delay.c
+++ b/arch/mips/lib/delay.c
@@ -15,13 +15,17 @@
15#include <asm/compiler.h> 15#include <asm/compiler.h>
16#include <asm/war.h> 16#include <asm/war.h>
17 17
18inline void __delay(unsigned int loops) 18void __delay(unsigned long loops)
19{ 19{
20 __asm__ __volatile__ ( 20 __asm__ __volatile__ (
21 " .set noreorder \n" 21 " .set noreorder \n"
22 " .align 3 \n" 22 " .align 3 \n"
23 "1: bnez %0, 1b \n" 23 "1: bnez %0, 1b \n"
24#if __SIZEOF_LONG__ == 4
24 " subu %0, 1 \n" 25 " subu %0, 1 \n"
26#else
27 " dsubu %0, 1 \n"
28#endif
25 " .set reorder \n" 29 " .set reorder \n"
26 : "=r" (loops) 30 : "=r" (loops)
27 : "0" (loops)); 31 : "0" (loops));
diff --git a/arch/mips/lib/dump_tlb.c b/arch/mips/lib/dump_tlb.c
index 3f69725556af..a99c1d3fc567 100644
--- a/arch/mips/lib/dump_tlb.c
+++ b/arch/mips/lib/dump_tlb.c
@@ -50,8 +50,9 @@ static void dump_tlb(int first, int last)
50{ 50{
51 unsigned long s_entryhi, entryhi, asid; 51 unsigned long s_entryhi, entryhi, asid;
52 unsigned long long entrylo0, entrylo1; 52 unsigned long long entrylo0, entrylo1;
53 unsigned int s_index, pagemask, c0, c1, i; 53 unsigned int s_index, s_pagemask, pagemask, c0, c1, i;
54 54
55 s_pagemask = read_c0_pagemask();
55 s_entryhi = read_c0_entryhi(); 56 s_entryhi = read_c0_entryhi();
56 s_index = read_c0_index(); 57 s_index = read_c0_index();
57 asid = s_entryhi & 0xff; 58 asid = s_entryhi & 0xff;
@@ -103,6 +104,7 @@ static void dump_tlb(int first, int last)
103 104
104 write_c0_entryhi(s_entryhi); 105 write_c0_entryhi(s_entryhi);
105 write_c0_index(s_index); 106 write_c0_index(s_index);
107 write_c0_pagemask(s_pagemask);
106} 108}
107 109
108void dump_tlb_all(void) 110void dump_tlb_all(void)
diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c
index 87b9cfcc30ff..4b9b935a070e 100644
--- a/arch/mips/mm/tlb-r4k.c
+++ b/arch/mips/mm/tlb-r4k.c
@@ -320,6 +320,7 @@ void __update_tlb(struct vm_area_struct * vma, unsigned long address, pte_t pte)
320 tlb_write_random(); 320 tlb_write_random();
321 else 321 else
322 tlb_write_indexed(); 322 tlb_write_indexed();
323 tlbw_use_hazard();
323 write_c0_pagemask(PM_DEFAULT_MASK); 324 write_c0_pagemask(PM_DEFAULT_MASK);
324 } else 325 } else
325#endif 326#endif
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index 658a520364ce..2833dcb67b5a 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -148,8 +148,8 @@ enum label_id {
148 label_leave, 148 label_leave,
149 label_vmalloc, 149 label_vmalloc,
150 label_vmalloc_done, 150 label_vmalloc_done,
151 label_tlbw_hazard, 151 label_tlbw_hazard_0,
152 label_split, 152 label_split = label_tlbw_hazard_0 + 8,
153 label_tlbl_goaround1, 153 label_tlbl_goaround1,
154 label_tlbl_goaround2, 154 label_tlbl_goaround2,
155 label_nopage_tlbl, 155 label_nopage_tlbl,
@@ -167,7 +167,7 @@ UASM_L_LA(_second_part)
167UASM_L_LA(_leave) 167UASM_L_LA(_leave)
168UASM_L_LA(_vmalloc) 168UASM_L_LA(_vmalloc)
169UASM_L_LA(_vmalloc_done) 169UASM_L_LA(_vmalloc_done)
170UASM_L_LA(_tlbw_hazard) 170/* _tlbw_hazard_x is handled differently. */
171UASM_L_LA(_split) 171UASM_L_LA(_split)
172UASM_L_LA(_tlbl_goaround1) 172UASM_L_LA(_tlbl_goaround1)
173UASM_L_LA(_tlbl_goaround2) 173UASM_L_LA(_tlbl_goaround2)
@@ -181,6 +181,30 @@ UASM_L_LA(_large_segbits_fault)
181UASM_L_LA(_tlb_huge_update) 181UASM_L_LA(_tlb_huge_update)
182#endif 182#endif
183 183
184static int __cpuinitdata hazard_instance;
185
186static void uasm_bgezl_hazard(u32 **p, struct uasm_reloc **r, int instance)
187{
188 switch (instance) {
189 case 0 ... 7:
190 uasm_il_bgezl(p, r, 0, label_tlbw_hazard_0 + instance);
191 return;
192 default:
193 BUG();
194 }
195}
196
197static void uasm_bgezl_label(struct uasm_label **l, u32 **p, int instance)
198{
199 switch (instance) {
200 case 0 ... 7:
201 uasm_build_label(l, *p, label_tlbw_hazard_0 + instance);
202 break;
203 default:
204 BUG();
205 }
206}
207
184/* 208/*
185 * For debug purposes. 209 * For debug purposes.
186 */ 210 */
@@ -478,21 +502,28 @@ static void __cpuinit build_tlb_write_entry(u32 **p, struct uasm_label **l,
478 * This branch uses up a mtc0 hazard nop slot and saves 502 * This branch uses up a mtc0 hazard nop slot and saves
479 * two nops after the tlbw instruction. 503 * two nops after the tlbw instruction.
480 */ 504 */
481 uasm_il_bgezl(p, r, 0, label_tlbw_hazard); 505 uasm_bgezl_hazard(p, r, hazard_instance);
482 tlbw(p); 506 tlbw(p);
483 uasm_l_tlbw_hazard(l, *p); 507 uasm_bgezl_label(l, p, hazard_instance);
508 hazard_instance++;
484 uasm_i_nop(p); 509 uasm_i_nop(p);
485 break; 510 break;
486 511
487 case CPU_R4600: 512 case CPU_R4600:
488 case CPU_R4700: 513 case CPU_R4700:
489 case CPU_R5000:
490 case CPU_R5000A:
491 uasm_i_nop(p); 514 uasm_i_nop(p);
492 tlbw(p); 515 tlbw(p);
493 uasm_i_nop(p); 516 uasm_i_nop(p);
494 break; 517 break;
495 518
519 case CPU_R5000:
520 case CPU_R5000A:
521 case CPU_NEVADA:
522 uasm_i_nop(p); /* QED specifies 2 nops hazard */
523 uasm_i_nop(p); /* QED specifies 2 nops hazard */
524 tlbw(p);
525 break;
526
496 case CPU_R4300: 527 case CPU_R4300:
497 case CPU_5KC: 528 case CPU_5KC:
498 case CPU_TX49XX: 529 case CPU_TX49XX:
@@ -526,17 +557,6 @@ static void __cpuinit build_tlb_write_entry(u32 **p, struct uasm_label **l,
526 tlbw(p); 557 tlbw(p);
527 break; 558 break;
528 559
529 case CPU_NEVADA:
530 uasm_i_nop(p); /* QED specifies 2 nops hazard */
531 /*
532 * This branch uses up a mtc0 hazard nop slot and saves
533 * a nop after the tlbw instruction.
534 */
535 uasm_il_bgezl(p, r, 0, label_tlbw_hazard);
536 tlbw(p);
537 uasm_l_tlbw_hazard(l, *p);
538 break;
539
540 case CPU_RM7000: 560 case CPU_RM7000:
541 uasm_i_nop(p); 561 uasm_i_nop(p);
542 uasm_i_nop(p); 562 uasm_i_nop(p);
diff --git a/arch/mn10300/include/uapi/asm/setup.h b/arch/mn10300/include/uapi/asm/setup.h
index e69de29bb2d1..ae5704fa77ad 100644
--- a/arch/mn10300/include/uapi/asm/setup.h
+++ b/arch/mn10300/include/uapi/asm/setup.h
@@ -0,0 +1,4 @@
1/*
2 * There isn't anything here anymore, but the file must not be empty or patch
3 * will delete it.
4 */
diff --git a/arch/parisc/include/asm/Kbuild b/arch/parisc/include/asm/Kbuild
index 458371a1565a..bac8debecffb 100644
--- a/arch/parisc/include/asm/Kbuild
+++ b/arch/parisc/include/asm/Kbuild
@@ -1,6 +1,5 @@
1include include/asm-generic/Kbuild.asm
2 1
3header-y += pdc.h 2generic-y += word-at-a-time.h auxvec.h user.h cputime.h emergency-restart.h \
4generic-y += clkdev.h 3 segment.h topology.h vga.h device.h percpu.h hw_irq.h mutex.h \
5generic-y += word-at-a-time.h 4 div64.h irq_regs.h kdebug.h kvm_para.h local64.h local.h param.h \
6generic-y += exec.h 5 poll.h xor.h clkdev.h exec.h
diff --git a/arch/parisc/include/asm/auxvec.h b/arch/parisc/include/asm/auxvec.h
deleted file mode 100644
index 9c3ac4b89dc9..000000000000
--- a/arch/parisc/include/asm/auxvec.h
+++ /dev/null
@@ -1,4 +0,0 @@
1#ifndef __ASMPARISC_AUXVEC_H
2#define __ASMPARISC_AUXVEC_H
3
4#endif
diff --git a/arch/parisc/include/asm/compat_signal.h b/arch/parisc/include/asm/compat_signal.h
deleted file mode 100644
index 6ad02c360b21..000000000000
--- a/arch/parisc/include/asm/compat_signal.h
+++ /dev/null
@@ -1,2 +0,0 @@
1/* Use generic */
2#include <asm-generic/compat_signal.h>
diff --git a/arch/parisc/include/asm/cputime.h b/arch/parisc/include/asm/cputime.h
deleted file mode 100644
index dcdf2fbd7e72..000000000000
--- a/arch/parisc/include/asm/cputime.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __PARISC_CPUTIME_H
2#define __PARISC_CPUTIME_H
3
4#include <asm-generic/cputime.h>
5
6#endif /* __PARISC_CPUTIME_H */
diff --git a/arch/parisc/include/asm/device.h b/arch/parisc/include/asm/device.h
deleted file mode 100644
index d8f9872b0e2d..000000000000
--- a/arch/parisc/include/asm/device.h
+++ /dev/null
@@ -1,7 +0,0 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/arch/parisc/include/asm/div64.h b/arch/parisc/include/asm/div64.h
deleted file mode 100644
index 6cd978cefb28..000000000000
--- a/arch/parisc/include/asm/div64.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/div64.h>
diff --git a/arch/parisc/include/asm/emergency-restart.h b/arch/parisc/include/asm/emergency-restart.h
deleted file mode 100644
index 108d8c48e42e..000000000000
--- a/arch/parisc/include/asm/emergency-restart.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/arch/parisc/include/asm/hw_irq.h b/arch/parisc/include/asm/hw_irq.h
deleted file mode 100644
index 6707f7df3921..000000000000
--- a/arch/parisc/include/asm/hw_irq.h
+++ /dev/null
@@ -1,8 +0,0 @@
1#ifndef _ASM_HW_IRQ_H
2#define _ASM_HW_IRQ_H
3
4/*
5 * linux/include/asm/hw_irq.h
6 */
7
8#endif
diff --git a/arch/parisc/include/asm/irq_regs.h b/arch/parisc/include/asm/irq_regs.h
deleted file mode 100644
index 3dd9c0b70270..000000000000
--- a/arch/parisc/include/asm/irq_regs.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/irq_regs.h>
diff --git a/arch/parisc/include/asm/kdebug.h b/arch/parisc/include/asm/kdebug.h
deleted file mode 100644
index 6ece1b037665..000000000000
--- a/arch/parisc/include/asm/kdebug.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/kdebug.h>
diff --git a/arch/parisc/include/asm/kvm_para.h b/arch/parisc/include/asm/kvm_para.h
deleted file mode 100644
index 14fab8f0b957..000000000000
--- a/arch/parisc/include/asm/kvm_para.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/kvm_para.h>
diff --git a/arch/parisc/include/asm/local.h b/arch/parisc/include/asm/local.h
deleted file mode 100644
index c11c530f74d0..000000000000
--- a/arch/parisc/include/asm/local.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/local.h>
diff --git a/arch/parisc/include/asm/local64.h b/arch/parisc/include/asm/local64.h
deleted file mode 100644
index 36c93b5cc239..000000000000
--- a/arch/parisc/include/asm/local64.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/local64.h>
diff --git a/arch/parisc/include/asm/mutex.h b/arch/parisc/include/asm/mutex.h
deleted file mode 100644
index 458c1f7fbc18..000000000000
--- a/arch/parisc/include/asm/mutex.h
+++ /dev/null
@@ -1,9 +0,0 @@
1/*
2 * Pull in the generic implementation for the mutex fastpath.
3 *
4 * TODO: implement optimized primitives instead, or leave the generic
5 * implementation in place, or pick the atomic_xchg() based generic
6 * implementation. (see asm-generic/mutex-xchg.h for details)
7 */
8
9#include <asm-generic/mutex-dec.h>
diff --git a/arch/parisc/include/asm/param.h b/arch/parisc/include/asm/param.h
deleted file mode 100644
index 965d45427975..000000000000
--- a/arch/parisc/include/asm/param.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/param.h>
diff --git a/arch/parisc/include/asm/pdc.h b/arch/parisc/include/asm/pdc.h
index 7f0f2d23059d..7eb616e4bf8a 100644
--- a/arch/parisc/include/asm/pdc.h
+++ b/arch/parisc/include/asm/pdc.h
@@ -1,348 +1,10 @@
1#ifndef _PARISC_PDC_H 1#ifndef _PARISC_PDC_H
2#define _PARISC_PDC_H 2#define _PARISC_PDC_H
3 3
4/* 4#include <uapi/asm/pdc.h>
5 * PDC return values ...
6 * All PDC calls return a subset of these errors.
7 */
8
9#define PDC_WARN 3 /* Call completed with a warning */
10#define PDC_REQ_ERR_1 2 /* See above */
11#define PDC_REQ_ERR_0 1 /* Call would generate a requestor error */
12#define PDC_OK 0 /* Call completed successfully */
13#define PDC_BAD_PROC -1 /* Called non-existent procedure*/
14#define PDC_BAD_OPTION -2 /* Called with non-existent option */
15#define PDC_ERROR -3 /* Call could not complete without an error */
16#define PDC_NE_MOD -5 /* Module not found */
17#define PDC_NE_CELL_MOD -7 /* Cell module not found */
18#define PDC_INVALID_ARG -10 /* Called with an invalid argument */
19#define PDC_BUS_POW_WARN -12 /* Call could not complete in allowed power budget */
20#define PDC_NOT_NARROW -17 /* Narrow mode not supported */
21
22/*
23 * PDC entry points...
24 */
25
26#define PDC_POW_FAIL 1 /* perform a power-fail */
27#define PDC_POW_FAIL_PREPARE 0 /* prepare for powerfail */
28
29#define PDC_CHASSIS 2 /* PDC-chassis functions */
30#define PDC_CHASSIS_DISP 0 /* update chassis display */
31#define PDC_CHASSIS_WARN 1 /* return chassis warnings */
32#define PDC_CHASSIS_DISPWARN 2 /* update&return chassis status */
33#define PDC_RETURN_CHASSIS_INFO 128 /* HVERSION dependent: return chassis LED/LCD info */
34
35#define PDC_PIM 3 /* Get PIM data */
36#define PDC_PIM_HPMC 0 /* Transfer HPMC data */
37#define PDC_PIM_RETURN_SIZE 1 /* Get Max buffer needed for PIM*/
38#define PDC_PIM_LPMC 2 /* Transfer HPMC data */
39#define PDC_PIM_SOFT_BOOT 3 /* Transfer Soft Boot data */
40#define PDC_PIM_TOC 4 /* Transfer TOC data */
41
42#define PDC_MODEL 4 /* PDC model information call */
43#define PDC_MODEL_INFO 0 /* returns information */
44#define PDC_MODEL_BOOTID 1 /* set the BOOT_ID */
45#define PDC_MODEL_VERSIONS 2 /* returns cpu-internal versions*/
46#define PDC_MODEL_SYSMODEL 3 /* return system model info */
47#define PDC_MODEL_ENSPEC 4 /* enable specific option */
48#define PDC_MODEL_DISPEC 5 /* disable specific option */
49#define PDC_MODEL_CPU_ID 6 /* returns cpu-id (only newer machines!) */
50#define PDC_MODEL_CAPABILITIES 7 /* returns OS32/OS64-flags */
51/* Values for PDC_MODEL_CAPABILITIES non-equivalent virtual aliasing support */
52#define PDC_MODEL_OS64 (1 << 0)
53#define PDC_MODEL_OS32 (1 << 1)
54#define PDC_MODEL_IOPDIR_FDC (1 << 2)
55#define PDC_MODEL_NVA_MASK (3 << 4)
56#define PDC_MODEL_NVA_SUPPORTED (0 << 4)
57#define PDC_MODEL_NVA_SLOW (1 << 4)
58#define PDC_MODEL_NVA_UNSUPPORTED (3 << 4)
59#define PDC_MODEL_GET_BOOT__OP 8 /* returns boot test options */
60#define PDC_MODEL_SET_BOOT__OP 9 /* set boot test options */
61
62#define PA89_INSTRUCTION_SET 0x4 /* capatibilies returned */
63#define PA90_INSTRUCTION_SET 0x8
64
65#define PDC_CACHE 5 /* return/set cache (& TLB) info*/
66#define PDC_CACHE_INFO 0 /* returns information */
67#define PDC_CACHE_SET_COH 1 /* set coherence state */
68#define PDC_CACHE_RET_SPID 2 /* returns space-ID bits */
69
70#define PDC_HPA 6 /* return HPA of processor */
71#define PDC_HPA_PROCESSOR 0
72#define PDC_HPA_MODULES 1
73
74#define PDC_COPROC 7 /* Co-Processor (usually FP unit(s)) */
75#define PDC_COPROC_CFG 0 /* Co-Processor Cfg (FP unit(s) enabled?) */
76
77#define PDC_IODC 8 /* talk to IODC */
78#define PDC_IODC_READ 0 /* read IODC entry point */
79/* PDC_IODC_RI_ * INDEX parameter of PDC_IODC_READ */
80#define PDC_IODC_RI_DATA_BYTES 0 /* IODC Data Bytes */
81/* 1, 2 obsolete - HVERSION dependent*/
82#define PDC_IODC_RI_INIT 3 /* Initialize module */
83#define PDC_IODC_RI_IO 4 /* Module input/output */
84#define PDC_IODC_RI_SPA 5 /* Module input/output */
85#define PDC_IODC_RI_CONFIG 6 /* Module input/output */
86/* 7 obsolete - HVERSION dependent */
87#define PDC_IODC_RI_TEST 8 /* Module input/output */
88#define PDC_IODC_RI_TLB 9 /* Module input/output */
89#define PDC_IODC_NINIT 2 /* non-destructive init */
90#define PDC_IODC_DINIT 3 /* destructive init */
91#define PDC_IODC_MEMERR 4 /* check for memory errors */
92#define PDC_IODC_INDEX_DATA 0 /* get first 16 bytes from mod IODC */
93#define PDC_IODC_BUS_ERROR -4 /* bus error return value */
94#define PDC_IODC_INVALID_INDEX -5 /* invalid index return value */
95#define PDC_IODC_COUNT -6 /* count is too small */
96
97#define PDC_TOD 9 /* time-of-day clock (TOD) */
98#define PDC_TOD_READ 0 /* read TOD */
99#define PDC_TOD_WRITE 1 /* write TOD */
100
101
102#define PDC_STABLE 10 /* stable storage (sprockets) */
103#define PDC_STABLE_READ 0
104#define PDC_STABLE_WRITE 1
105#define PDC_STABLE_RETURN_SIZE 2
106#define PDC_STABLE_VERIFY_CONTENTS 3
107#define PDC_STABLE_INITIALIZE 4
108
109#define PDC_NVOLATILE 11 /* often not implemented */
110
111#define PDC_ADD_VALID 12 /* Memory validation PDC call */
112#define PDC_ADD_VALID_VERIFY 0 /* Make PDC_ADD_VALID verify region */
113
114#define PDC_INSTR 15 /* get instr to invoke PDCE_CHECK() */
115
116#define PDC_PROC 16 /* (sprockets) */
117
118#define PDC_CONFIG 16 /* (sprockets) */
119#define PDC_CONFIG_DECONFIG 0
120#define PDC_CONFIG_DRECONFIG 1
121#define PDC_CONFIG_DRETURN_CONFIG 2
122
123#define PDC_BLOCK_TLB 18 /* manage hardware block-TLB */
124#define PDC_BTLB_INFO 0 /* returns parameter */
125#define PDC_BTLB_INSERT 1 /* insert BTLB entry */
126#define PDC_BTLB_PURGE 2 /* purge BTLB entries */
127#define PDC_BTLB_PURGE_ALL 3 /* purge all BTLB entries */
128
129#define PDC_TLB 19 /* manage hardware TLB miss handling */
130#define PDC_TLB_INFO 0 /* returns parameter */
131#define PDC_TLB_SETUP 1 /* set up miss handling */
132
133#define PDC_MEM 20 /* Manage memory */
134#define PDC_MEM_MEMINFO 0
135#define PDC_MEM_ADD_PAGE 1
136#define PDC_MEM_CLEAR_PDT 2
137#define PDC_MEM_READ_PDT 3
138#define PDC_MEM_RESET_CLEAR 4
139#define PDC_MEM_GOODMEM 5
140#define PDC_MEM_TABLE 128 /* Non contig mem map (sprockets) */
141#define PDC_MEM_RETURN_ADDRESS_TABLE PDC_MEM_TABLE
142#define PDC_MEM_GET_MEMORY_SYSTEM_TABLES_SIZE 131
143#define PDC_MEM_GET_MEMORY_SYSTEM_TABLES 132
144#define PDC_MEM_GET_PHYSICAL_LOCATION_FROM_MEMORY_ADDRESS 133
145
146#define PDC_MEM_RET_SBE_REPLACED 5 /* PDC_MEM return values */
147#define PDC_MEM_RET_DUPLICATE_ENTRY 4
148#define PDC_MEM_RET_BUF_SIZE_SMALL 1
149#define PDC_MEM_RET_PDT_FULL -11
150#define PDC_MEM_RET_INVALID_PHYSICAL_LOCATION ~0ULL
151
152#define PDC_PSW 21 /* Get/Set default System Mask */
153#define PDC_PSW_MASK 0 /* Return mask */
154#define PDC_PSW_GET_DEFAULTS 1 /* Return defaults */
155#define PDC_PSW_SET_DEFAULTS 2 /* Set default */
156#define PDC_PSW_ENDIAN_BIT 1 /* set for big endian */
157#define PDC_PSW_WIDE_BIT 2 /* set for wide mode */
158
159#define PDC_SYSTEM_MAP 22 /* find system modules */
160#define PDC_FIND_MODULE 0
161#define PDC_FIND_ADDRESS 1
162#define PDC_TRANSLATE_PATH 2
163
164#define PDC_SOFT_POWER 23 /* soft power switch */
165#define PDC_SOFT_POWER_INFO 0 /* return info about the soft power switch */
166#define PDC_SOFT_POWER_ENABLE 1 /* enable/disable soft power switch */
167
168
169/* HVERSION dependent */
170
171/* The PDC_MEM_MAP calls */
172#define PDC_MEM_MAP 128 /* on s700: return page info */
173#define PDC_MEM_MAP_HPA 0 /* returns hpa of a module */
174
175#define PDC_EEPROM 129 /* EEPROM access */
176#define PDC_EEPROM_READ_WORD 0
177#define PDC_EEPROM_WRITE_WORD 1
178#define PDC_EEPROM_READ_BYTE 2
179#define PDC_EEPROM_WRITE_BYTE 3
180#define PDC_EEPROM_EEPROM_PASSWORD -1000
181
182#define PDC_NVM 130 /* NVM (non-volatile memory) access */
183#define PDC_NVM_READ_WORD 0
184#define PDC_NVM_WRITE_WORD 1
185#define PDC_NVM_READ_BYTE 2
186#define PDC_NVM_WRITE_BYTE 3
187
188#define PDC_SEED_ERROR 132 /* (sprockets) */
189
190#define PDC_IO 135 /* log error info, reset IO system */
191#define PDC_IO_READ_AND_CLEAR_ERRORS 0
192#define PDC_IO_RESET 1
193#define PDC_IO_RESET_DEVICES 2
194/* sets bits 6&7 (little endian) of the HcControl Register */
195#define PDC_IO_USB_SUSPEND 0xC000000000000000
196#define PDC_IO_EEPROM_IO_ERR_TABLE_FULL -5 /* return value */
197#define PDC_IO_NO_SUSPEND -6 /* return value */
198
199#define PDC_BROADCAST_RESET 136 /* reset all processors */
200#define PDC_DO_RESET 0 /* option: perform a broadcast reset */
201#define PDC_DO_FIRM_TEST_RESET 1 /* Do broadcast reset with bitmap */
202#define PDC_BR_RECONFIGURATION 2 /* reset w/reconfiguration */
203#define PDC_FIRM_TEST_MAGIC 0xab9ec36fUL /* for this reboot only */
204
205#define PDC_LAN_STATION_ID 138 /* Hversion dependent mechanism for */
206#define PDC_LAN_STATION_ID_READ 0 /* getting the lan station address */
207
208#define PDC_LAN_STATION_ID_SIZE 6
209
210#define PDC_CHECK_RANGES 139 /* (sprockets) */
211
212#define PDC_NV_SECTIONS 141 /* (sprockets) */
213
214#define PDC_PERFORMANCE 142 /* performance monitoring */
215
216#define PDC_SYSTEM_INFO 143 /* system information */
217#define PDC_SYSINFO_RETURN_INFO_SIZE 0
218#define PDC_SYSINFO_RRETURN_SYS_INFO 1
219#define PDC_SYSINFO_RRETURN_ERRORS 2
220#define PDC_SYSINFO_RRETURN_WARNINGS 3
221#define PDC_SYSINFO_RETURN_REVISIONS 4
222#define PDC_SYSINFO_RRETURN_DIAGNOSE 5
223#define PDC_SYSINFO_RRETURN_HV_DIAGNOSE 1005
224
225#define PDC_RDR 144 /* (sprockets) */
226#define PDC_RDR_READ_BUFFER 0
227#define PDC_RDR_READ_SINGLE 1
228#define PDC_RDR_WRITE_SINGLE 2
229
230#define PDC_INTRIGUE 145 /* (sprockets) */
231#define PDC_INTRIGUE_WRITE_BUFFER 0
232#define PDC_INTRIGUE_GET_SCRATCH_BUFSIZE 1
233#define PDC_INTRIGUE_START_CPU_COUNTERS 2
234#define PDC_INTRIGUE_STOP_CPU_COUNTERS 3
235
236#define PDC_STI 146 /* STI access */
237/* same as PDC_PCI_XXX values (see below) */
238
239/* Legacy PDC definitions for same stuff */
240#define PDC_PCI_INDEX 147
241#define PDC_PCI_INTERFACE_INFO 0
242#define PDC_PCI_SLOT_INFO 1
243#define PDC_PCI_INFLIGHT_BYTES 2
244#define PDC_PCI_READ_CONFIG 3
245#define PDC_PCI_WRITE_CONFIG 4
246#define PDC_PCI_READ_PCI_IO 5
247#define PDC_PCI_WRITE_PCI_IO 6
248#define PDC_PCI_READ_CONFIG_DELAY 7
249#define PDC_PCI_UPDATE_CONFIG_DELAY 8
250#define PDC_PCI_PCI_PATH_TO_PCI_HPA 9
251#define PDC_PCI_PCI_HPA_TO_PCI_PATH 10
252#define PDC_PCI_PCI_PATH_TO_PCI_BUS 11
253#define PDC_PCI_PCI_RESERVED 12
254#define PDC_PCI_PCI_INT_ROUTE_SIZE 13
255#define PDC_PCI_GET_INT_TBL_SIZE PDC_PCI_PCI_INT_ROUTE_SIZE
256#define PDC_PCI_PCI_INT_ROUTE 14
257#define PDC_PCI_GET_INT_TBL PDC_PCI_PCI_INT_ROUTE
258#define PDC_PCI_READ_MON_TYPE 15
259#define PDC_PCI_WRITE_MON_TYPE 16
260
261
262/* Get SCSI Interface Card info: SDTR, SCSI ID, mode (SE vs LVD) */
263#define PDC_INITIATOR 163
264#define PDC_GET_INITIATOR 0
265#define PDC_SET_INITIATOR 1
266#define PDC_DELETE_INITIATOR 2
267#define PDC_RETURN_TABLE_SIZE 3
268#define PDC_RETURN_TABLE 4
269
270#define PDC_LINK 165 /* (sprockets) */
271#define PDC_LINK_PCI_ENTRY_POINTS 0 /* list (Arg1) = 0 */
272#define PDC_LINK_USB_ENTRY_POINTS 1 /* list (Arg1) = 1 */
273
274/* cl_class
275 * page 3-33 of IO-Firmware ARS
276 * IODC ENTRY_INIT(Search first) RET[1]
277 */
278#define CL_NULL 0 /* invalid */
279#define CL_RANDOM 1 /* random access (as disk) */
280#define CL_SEQU 2 /* sequential access (as tape) */
281#define CL_DUPLEX 7 /* full-duplex point-to-point (RS-232, Net) */
282#define CL_KEYBD 8 /* half-duplex console (HIL Keyboard) */
283#define CL_DISPL 9 /* half-duplex console (display) */
284#define CL_FC 10 /* FiberChannel access media */
285
286/* IODC ENTRY_INIT() */
287#define ENTRY_INIT_SRCH_FRST 2
288#define ENTRY_INIT_SRCH_NEXT 3
289#define ENTRY_INIT_MOD_DEV 4
290#define ENTRY_INIT_DEV 5
291#define ENTRY_INIT_MOD 6
292#define ENTRY_INIT_MSG 9
293
294/* IODC ENTRY_IO() */
295#define ENTRY_IO_BOOTIN 0
296#define ENTRY_IO_BOOTOUT 1
297#define ENTRY_IO_CIN 2
298#define ENTRY_IO_COUT 3
299#define ENTRY_IO_CLOSE 4
300#define ENTRY_IO_GETMSG 9
301#define ENTRY_IO_BBLOCK_IN 16
302#define ENTRY_IO_BBLOCK_OUT 17
303
304/* IODC ENTRY_SPA() */
305
306/* IODC ENTRY_CONFIG() */
307
308/* IODC ENTRY_TEST() */
309
310/* IODC ENTRY_TLB() */
311
312/* constants for OS (NVM...) */
313#define OS_ID_NONE 0 /* Undefined OS ID */
314#define OS_ID_HPUX 1 /* HP-UX OS */
315#define OS_ID_MPEXL 2 /* MPE XL OS */
316#define OS_ID_OSF 3 /* OSF OS */
317#define OS_ID_HPRT 4 /* HP-RT OS */
318#define OS_ID_NOVEL 5 /* NOVELL OS */
319#define OS_ID_LINUX 6 /* Linux */
320
321
322/* constants for PDC_CHASSIS */
323#define OSTAT_OFF 0
324#define OSTAT_FLT 1
325#define OSTAT_TEST 2
326#define OSTAT_INIT 3
327#define OSTAT_SHUT 4
328#define OSTAT_WARN 5
329#define OSTAT_RUN 6
330#define OSTAT_ON 7
331
332/* Page Zero constant offsets used by the HPMC handler */
333#define BOOT_CONSOLE_HPA_OFFSET 0x3c0
334#define BOOT_CONSOLE_SPA_OFFSET 0x3c4
335#define BOOT_CONSOLE_PATH_OFFSET 0x3a8
336
337/* size of the pdc_result buffer for firmware.c */
338#define NUM_PDC_RESULT 32
339 5
340#if !defined(__ASSEMBLY__) 6#if !defined(__ASSEMBLY__)
341 7
342#include <linux/types.h>
343
344#ifdef __KERNEL__
345
346extern int pdc_type; 8extern int pdc_type;
347 9
348/* Values for pdc_type */ 10/* Values for pdc_type */
@@ -673,88 +335,5 @@ static inline char * os_id_to_string(u16 os_id) {
673 } 335 }
674} 336}
675 337
676#endif /* __KERNEL__ */
677
678/* flags of the device_path */
679#define PF_AUTOBOOT 0x80
680#define PF_AUTOSEARCH 0x40
681#define PF_TIMER 0x0F
682
683struct device_path { /* page 1-69 */
684 unsigned char flags; /* flags see above! */
685 unsigned char bc[6]; /* bus converter routing info */
686 unsigned char mod;
687 unsigned int layers[6];/* device-specific layer-info */
688} __attribute__((aligned(8))) ;
689
690struct pz_device {
691 struct device_path dp; /* see above */
692 /* struct iomod *hpa; */
693 unsigned int hpa; /* HPA base address */
694 /* char *spa; */
695 unsigned int spa; /* SPA base address */
696 /* int (*iodc_io)(struct iomod*, ...); */
697 unsigned int iodc_io; /* device entry point */
698 short pad; /* reserved */
699 unsigned short cl_class;/* see below */
700} __attribute__((aligned(8))) ;
701
702struct zeropage {
703 /* [0x000] initialize vectors (VEC) */
704 unsigned int vec_special; /* must be zero */
705 /* int (*vec_pow_fail)(void);*/
706 unsigned int vec_pow_fail; /* power failure handler */
707 /* int (*vec_toc)(void); */
708 unsigned int vec_toc;
709 unsigned int vec_toclen;
710 /* int (*vec_rendz)(void); */
711 unsigned int vec_rendz;
712 int vec_pow_fail_flen;
713 int vec_pad[10];
714
715 /* [0x040] reserved processor dependent */
716 int pad0[112];
717
718 /* [0x200] reserved */
719 int pad1[84];
720
721 /* [0x350] memory configuration (MC) */
722 int memc_cont; /* contiguous mem size (bytes) */
723 int memc_phsize; /* physical memory size */
724 int memc_adsize; /* additional mem size, bytes of SPA space used by PDC */
725 unsigned int mem_pdc_hi; /* used for 64-bit */
726
727 /* [0x360] various parameters for the boot-CPU */
728 /* unsigned int *mem_booterr[8]; */
729 unsigned int mem_booterr[8]; /* ptr to boot errors */
730 unsigned int mem_free; /* first location, where OS can be loaded */
731 /* struct iomod *mem_hpa; */
732 unsigned int mem_hpa; /* HPA of the boot-CPU */
733 /* int (*mem_pdc)(int, ...); */
734 unsigned int mem_pdc; /* PDC entry point */
735 unsigned int mem_10msec; /* number of clock ticks in 10msec */
736
737 /* [0x390] initial memory module (IMM) */
738 /* struct iomod *imm_hpa; */
739 unsigned int imm_hpa; /* HPA of the IMM */
740 int imm_soft_boot; /* 0 = was hard boot, 1 = was soft boot */
741 unsigned int imm_spa_size; /* SPA size of the IMM in bytes */
742 unsigned int imm_max_mem; /* bytes of mem in IMM */
743
744 /* [0x3A0] boot console, display device and keyboard */
745 struct pz_device mem_cons; /* description of console device */
746 struct pz_device mem_boot; /* description of boot device */
747 struct pz_device mem_kbd; /* description of keyboard device */
748
749 /* [0x430] reserved */
750 int pad430[116];
751
752 /* [0x600] processor dependent */
753 __u32 pad600[1];
754 __u32 proc_sti; /* pointer to STI ROM */
755 __u32 pad608[126];
756};
757
758#endif /* !defined(__ASSEMBLY__) */ 338#endif /* !defined(__ASSEMBLY__) */
759
760#endif /* _PARISC_PDC_H */ 339#endif /* _PARISC_PDC_H */
diff --git a/arch/parisc/include/asm/percpu.h b/arch/parisc/include/asm/percpu.h
deleted file mode 100644
index a0dcd1970128..000000000000
--- a/arch/parisc/include/asm/percpu.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef _PARISC_PERCPU_H
2#define _PARISC_PERCPU_H
3
4#include <asm-generic/percpu.h>
5
6#endif
7
diff --git a/arch/parisc/include/asm/poll.h b/arch/parisc/include/asm/poll.h
deleted file mode 100644
index c98509d3149e..000000000000
--- a/arch/parisc/include/asm/poll.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/poll.h>
diff --git a/arch/parisc/include/asm/ptrace.h b/arch/parisc/include/asm/ptrace.h
index 250ae35aa062..a2db278a5def 100644
--- a/arch/parisc/include/asm/ptrace.h
+++ b/arch/parisc/include/asm/ptrace.h
@@ -1,49 +1,11 @@
1#ifndef _PARISC_PTRACE_H
2#define _PARISC_PTRACE_H
3
4/* written by Philipp Rumpf, Copyright (C) 1999 SuSE GmbH Nuernberg 1/* written by Philipp Rumpf, Copyright (C) 1999 SuSE GmbH Nuernberg
5** Copyright (C) 2000 Grant Grundler, Hewlett-Packard 2** Copyright (C) 2000 Grant Grundler, Hewlett-Packard
6*/ 3*/
4#ifndef _PARISC_PTRACE_H
5#define _PARISC_PTRACE_H
7 6
8#include <linux/types.h> 7#include <uapi/asm/ptrace.h>
9
10/* This struct defines the way the registers are stored on the
11 * stack during a system call.
12 *
13 * N.B. gdb/strace care about the size and offsets within this
14 * structure. If you change things, you may break object compatibility
15 * for those applications.
16 */
17
18struct pt_regs {
19 unsigned long gr[32]; /* PSW is in gr[0] */
20 __u64 fr[32];
21 unsigned long sr[ 8];
22 unsigned long iasq[2];
23 unsigned long iaoq[2];
24 unsigned long cr27;
25 unsigned long pad0; /* available for other uses */
26 unsigned long orig_r28;
27 unsigned long ksp;
28 unsigned long kpc;
29 unsigned long sar; /* CR11 */
30 unsigned long iir; /* CR19 */
31 unsigned long isr; /* CR20 */
32 unsigned long ior; /* CR21 */
33 unsigned long ipsw; /* CR22 */
34};
35
36/*
37 * The numbers chosen here are somewhat arbitrary but absolutely MUST
38 * not overlap with any of the number assigned in <linux/ptrace.h>.
39 *
40 * These ones are taken from IA-64 on the assumption that theirs are
41 * the most correct (and we also want to support PTRACE_SINGLEBLOCK
42 * since we have taken branch traps too)
43 */
44#define PTRACE_SINGLEBLOCK 12 /* resume execution until next branch */
45 8
46#ifdef __KERNEL__
47 9
48#define task_regs(task) ((struct pt_regs *) ((char *)(task) + TASK_REGS)) 10#define task_regs(task) ((struct pt_regs *) ((char *)(task) + TASK_REGS))
49 11
@@ -58,6 +20,4 @@ struct pt_regs {
58unsigned long profile_pc(struct pt_regs *); 20unsigned long profile_pc(struct pt_regs *);
59 21
60 22
61#endif /* __KERNEL__ */
62
63#endif 23#endif
diff --git a/arch/parisc/include/asm/real.h b/arch/parisc/include/asm/real.h
deleted file mode 100644
index 82acb25db395..000000000000
--- a/arch/parisc/include/asm/real.h
+++ /dev/null
@@ -1,5 +0,0 @@
1#ifndef _PARISC_REAL_H
2#define _PARISC_REAL_H
3
4
5#endif
diff --git a/arch/parisc/include/asm/segment.h b/arch/parisc/include/asm/segment.h
deleted file mode 100644
index 26794ddb6524..000000000000
--- a/arch/parisc/include/asm/segment.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __PARISC_SEGMENT_H
2#define __PARISC_SEGMENT_H
3
4/* Only here because we have some old header files that expect it.. */
5
6#endif
diff --git a/arch/parisc/include/asm/signal.h b/arch/parisc/include/asm/signal.h
index c20356375d1d..21abf4fc169a 100644
--- a/arch/parisc/include/asm/signal.h
+++ b/arch/parisc/include/asm/signal.h
@@ -1,129 +1,19 @@
1#ifndef _ASM_PARISC_SIGNAL_H 1#ifndef _ASM_PARISC_SIGNAL_H
2#define _ASM_PARISC_SIGNAL_H 2#define _ASM_PARISC_SIGNAL_H
3 3
4#define SIGHUP 1 4#include <uapi/asm/signal.h>
5#define SIGINT 2
6#define SIGQUIT 3
7#define SIGILL 4
8#define SIGTRAP 5
9#define SIGABRT 6
10#define SIGIOT 6
11#define SIGEMT 7
12#define SIGFPE 8
13#define SIGKILL 9
14#define SIGBUS 10
15#define SIGSEGV 11
16#define SIGSYS 12 /* Linux doesn't use this */
17#define SIGPIPE 13
18#define SIGALRM 14
19#define SIGTERM 15
20#define SIGUSR1 16
21#define SIGUSR2 17
22#define SIGCHLD 18
23#define SIGPWR 19
24#define SIGVTALRM 20
25#define SIGPROF 21
26#define SIGIO 22
27#define SIGPOLL SIGIO
28#define SIGWINCH 23
29#define SIGSTOP 24
30#define SIGTSTP 25
31#define SIGCONT 26
32#define SIGTTIN 27
33#define SIGTTOU 28
34#define SIGURG 29
35#define SIGLOST 30 /* Linux doesn't use this either */
36#define SIGUNUSED 31
37#define SIGRESERVE SIGUNUSED
38 5
39#define SIGXCPU 33
40#define SIGXFSZ 34
41#define SIGSTKFLT 36
42
43/* These should not be considered constants from userland. */
44#define SIGRTMIN 37
45#define SIGRTMAX _NSIG /* it's 44 under HP/UX */
46
47/*
48 * SA_FLAGS values:
49 *
50 * SA_ONSTACK indicates that a registered stack_t will be used.
51 * SA_RESTART flag to get restarting signals (which were the default long ago)
52 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
53 * SA_RESETHAND clears the handler when the signal is delivered.
54 * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
55 * SA_NODEFER prevents the current signal from being masked in the handler.
56 *
57 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
58 * Unix names RESETHAND and NODEFER respectively.
59 */
60#define SA_ONSTACK 0x00000001
61#define SA_RESETHAND 0x00000004
62#define SA_NOCLDSTOP 0x00000008
63#define SA_SIGINFO 0x00000010
64#define SA_NODEFER 0x00000020
65#define SA_RESTART 0x00000040
66#define SA_NOCLDWAIT 0x00000080
67#define _SA_SIGGFAULT 0x00000100 /* HPUX */
68
69#define SA_NOMASK SA_NODEFER
70#define SA_ONESHOT SA_RESETHAND
71
72#define SA_RESTORER 0x04000000 /* obsolete -- ignored */
73
74/*
75 * sigaltstack controls
76 */
77#define SS_ONSTACK 1
78#define SS_DISABLE 2
79
80#define MINSIGSTKSZ 2048
81#define SIGSTKSZ 8192
82
83#ifdef __KERNEL__
84 6
85#define _NSIG 64 7#define _NSIG 64
86/* bits-per-word, where word apparently means 'long' not 'int' */ 8/* bits-per-word, where word apparently means 'long' not 'int' */
87#define _NSIG_BPW BITS_PER_LONG 9#define _NSIG_BPW BITS_PER_LONG
88#define _NSIG_WORDS (_NSIG / _NSIG_BPW) 10#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
89 11
90#endif /* __KERNEL__ */
91
92#define SIG_BLOCK 0 /* for blocking signals */
93#define SIG_UNBLOCK 1 /* for unblocking signals */
94#define SIG_SETMASK 2 /* for setting the signal mask */
95
96#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
97#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
98#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
99
100# ifndef __ASSEMBLY__ 12# ifndef __ASSEMBLY__
101
102# include <linux/types.h>
103
104/* Avoid too many header ordering problems. */
105struct siginfo;
106
107/* Type of a signal handler. */
108#ifdef CONFIG_64BIT 13#ifdef CONFIG_64BIT
109/* function pointers on 64-bit parisc are pointers to little structs and the
110 * compiler doesn't support code which changes or tests the address of
111 * the function in the little struct. This is really ugly -PB
112 */
113typedef char __user *__sighandler_t;
114#else 14#else
115typedef void __signalfn_t(int);
116typedef __signalfn_t __user *__sighandler_t;
117#endif 15#endif
118 16
119typedef struct sigaltstack {
120 void __user *ss_sp;
121 int ss_flags;
122 size_t ss_size;
123} stack_t;
124
125#ifdef __KERNEL__
126
127/* Most things should be clean enough to redefine this at will, if care 17/* Most things should be clean enough to redefine this at will, if care
128 is taken to make libc match. */ 18 is taken to make libc match. */
129 19
@@ -148,6 +38,5 @@ struct k_sigaction {
148 38
149#include <asm/sigcontext.h> 39#include <asm/sigcontext.h>
150 40
151#endif /* __KERNEL__ */
152#endif /* !__ASSEMBLY */ 41#endif /* !__ASSEMBLY */
153#endif /* _ASM_PARISC_SIGNAL_H */ 42#endif /* _ASM_PARISC_SIGNAL_H */
diff --git a/arch/parisc/include/asm/termios.h b/arch/parisc/include/asm/termios.h
index a2a57a4548af..9bbc0c8974ea 100644
--- a/arch/parisc/include/asm/termios.h
+++ b/arch/parisc/include/asm/termios.h
@@ -1,45 +1,8 @@
1#ifndef _PARISC_TERMIOS_H 1#ifndef _PARISC_TERMIOS_H
2#define _PARISC_TERMIOS_H 2#define _PARISC_TERMIOS_H
3 3
4#include <asm/termbits.h> 4#include <uapi/asm/termios.h>
5#include <asm/ioctls.h>
6 5
7struct winsize {
8 unsigned short ws_row;
9 unsigned short ws_col;
10 unsigned short ws_xpixel;
11 unsigned short ws_ypixel;
12};
13
14#define NCC 8
15struct termio {
16 unsigned short c_iflag; /* input mode flags */
17 unsigned short c_oflag; /* output mode flags */
18 unsigned short c_cflag; /* control mode flags */
19 unsigned short c_lflag; /* local mode flags */
20 unsigned char c_line; /* line discipline */
21 unsigned char c_cc[NCC]; /* control characters */
22};
23
24/* modem lines */
25#define TIOCM_LE 0x001
26#define TIOCM_DTR 0x002
27#define TIOCM_RTS 0x004
28#define TIOCM_ST 0x008
29#define TIOCM_SR 0x010
30#define TIOCM_CTS 0x020
31#define TIOCM_CAR 0x040
32#define TIOCM_RNG 0x080
33#define TIOCM_DSR 0x100
34#define TIOCM_CD TIOCM_CAR
35#define TIOCM_RI TIOCM_RNG
36#define TIOCM_OUT1 0x2000
37#define TIOCM_OUT2 0x4000
38#define TIOCM_LOOP 0x8000
39
40/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
41
42#ifdef __KERNEL__
43 6
44/* intr=^C quit=^\ erase=del kill=^U 7/* intr=^C quit=^\ erase=del kill=^U
45 eof=^D vtime=\0 vmin=\1 sxtc=\0 8 eof=^D vtime=\0 vmin=\1 sxtc=\0
@@ -85,6 +48,4 @@ struct termio {
85#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) 48#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios))
86#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) 49#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios))
87 50
88#endif /* __KERNEL__ */
89
90#endif /* _PARISC_TERMIOS_H */ 51#endif /* _PARISC_TERMIOS_H */
diff --git a/arch/parisc/include/asm/topology.h b/arch/parisc/include/asm/topology.h
deleted file mode 100644
index d8133eb0b1e7..000000000000
--- a/arch/parisc/include/asm/topology.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_PARISC_TOPOLOGY_H
2#define _ASM_PARISC_TOPOLOGY_H
3
4#include <asm-generic/topology.h>
5
6#endif /* _ASM_PARISC_TOPOLOGY_H */
diff --git a/arch/parisc/include/asm/unistd.h b/arch/parisc/include/asm/unistd.h
index d61de64f990a..541639c3f607 100644
--- a/arch/parisc/include/asm/unistd.h
+++ b/arch/parisc/include/asm/unistd.h
@@ -1,840 +1,8 @@
1#ifndef _ASM_PARISC_UNISTD_H_ 1#ifndef _ASM_PARISC_UNISTD_H_
2#define _ASM_PARISC_UNISTD_H_ 2#define _ASM_PARISC_UNISTD_H_
3 3
4/* 4#include <uapi/asm/unistd.h>
5 * This file contains the system call numbers.
6 */
7
8/*
9 * HP-UX system calls get their native numbers for binary compatibility.
10 */
11
12#define __NR_HPUX_exit 1
13#define __NR_HPUX_fork 2
14#define __NR_HPUX_read 3
15#define __NR_HPUX_write 4
16#define __NR_HPUX_open 5
17#define __NR_HPUX_close 6
18#define __NR_HPUX_wait 7
19#define __NR_HPUX_creat 8
20#define __NR_HPUX_link 9
21#define __NR_HPUX_unlink 10
22#define __NR_HPUX_execv 11
23#define __NR_HPUX_chdir 12
24#define __NR_HPUX_time 13
25#define __NR_HPUX_mknod 14
26#define __NR_HPUX_chmod 15
27#define __NR_HPUX_chown 16
28#define __NR_HPUX_break 17
29#define __NR_HPUX_lchmod 18
30#define __NR_HPUX_lseek 19
31#define __NR_HPUX_getpid 20
32#define __NR_HPUX_mount 21
33#define __NR_HPUX_umount 22
34#define __NR_HPUX_setuid 23
35#define __NR_HPUX_getuid 24
36#define __NR_HPUX_stime 25
37#define __NR_HPUX_ptrace 26
38#define __NR_HPUX_alarm 27
39#define __NR_HPUX_oldfstat 28
40#define __NR_HPUX_pause 29
41#define __NR_HPUX_utime 30
42#define __NR_HPUX_stty 31
43#define __NR_HPUX_gtty 32
44#define __NR_HPUX_access 33
45#define __NR_HPUX_nice 34
46#define __NR_HPUX_ftime 35
47#define __NR_HPUX_sync 36
48#define __NR_HPUX_kill 37
49#define __NR_HPUX_stat 38
50#define __NR_HPUX_setpgrp3 39
51#define __NR_HPUX_lstat 40
52#define __NR_HPUX_dup 41
53#define __NR_HPUX_pipe 42
54#define __NR_HPUX_times 43
55#define __NR_HPUX_profil 44
56#define __NR_HPUX_ki_call 45
57#define __NR_HPUX_setgid 46
58#define __NR_HPUX_getgid 47
59#define __NR_HPUX_sigsys 48
60#define __NR_HPUX_reserved1 49
61#define __NR_HPUX_reserved2 50
62#define __NR_HPUX_acct 51
63#define __NR_HPUX_set_userthreadid 52
64#define __NR_HPUX_oldlock 53
65#define __NR_HPUX_ioctl 54
66#define __NR_HPUX_reboot 55
67#define __NR_HPUX_symlink 56
68#define __NR_HPUX_utssys 57
69#define __NR_HPUX_readlink 58
70#define __NR_HPUX_execve 59
71#define __NR_HPUX_umask 60
72#define __NR_HPUX_chroot 61
73#define __NR_HPUX_fcntl 62
74#define __NR_HPUX_ulimit 63
75#define __NR_HPUX_getpagesize 64
76#define __NR_HPUX_mremap 65
77#define __NR_HPUX_vfork 66
78#define __NR_HPUX_vread 67
79#define __NR_HPUX_vwrite 68
80#define __NR_HPUX_sbrk 69
81#define __NR_HPUX_sstk 70
82#define __NR_HPUX_mmap 71
83#define __NR_HPUX_vadvise 72
84#define __NR_HPUX_munmap 73
85#define __NR_HPUX_mprotect 74
86#define __NR_HPUX_madvise 75
87#define __NR_HPUX_vhangup 76
88#define __NR_HPUX_swapoff 77
89#define __NR_HPUX_mincore 78
90#define __NR_HPUX_getgroups 79
91#define __NR_HPUX_setgroups 80
92#define __NR_HPUX_getpgrp2 81
93#define __NR_HPUX_setpgrp2 82
94#define __NR_HPUX_setitimer 83
95#define __NR_HPUX_wait3 84
96#define __NR_HPUX_swapon 85
97#define __NR_HPUX_getitimer 86
98#define __NR_HPUX_gethostname42 87
99#define __NR_HPUX_sethostname42 88
100#define __NR_HPUX_getdtablesize 89
101#define __NR_HPUX_dup2 90
102#define __NR_HPUX_getdopt 91
103#define __NR_HPUX_fstat 92
104#define __NR_HPUX_select 93
105#define __NR_HPUX_setdopt 94
106#define __NR_HPUX_fsync 95
107#define __NR_HPUX_setpriority 96
108#define __NR_HPUX_socket_old 97
109#define __NR_HPUX_connect_old 98
110#define __NR_HPUX_accept_old 99
111#define __NR_HPUX_getpriority 100
112#define __NR_HPUX_send_old 101
113#define __NR_HPUX_recv_old 102
114#define __NR_HPUX_socketaddr_old 103
115#define __NR_HPUX_bind_old 104
116#define __NR_HPUX_setsockopt_old 105
117#define __NR_HPUX_listen_old 106
118#define __NR_HPUX_vtimes_old 107
119#define __NR_HPUX_sigvector 108
120#define __NR_HPUX_sigblock 109
121#define __NR_HPUX_siggetmask 110
122#define __NR_HPUX_sigpause 111
123#define __NR_HPUX_sigstack 112
124#define __NR_HPUX_recvmsg_old 113
125#define __NR_HPUX_sendmsg_old 114
126#define __NR_HPUX_vtrace_old 115
127#define __NR_HPUX_gettimeofday 116
128#define __NR_HPUX_getrusage 117
129#define __NR_HPUX_getsockopt_old 118
130#define __NR_HPUX_resuba_old 119
131#define __NR_HPUX_readv 120
132#define __NR_HPUX_writev 121
133#define __NR_HPUX_settimeofday 122
134#define __NR_HPUX_fchown 123
135#define __NR_HPUX_fchmod 124
136#define __NR_HPUX_recvfrom_old 125
137#define __NR_HPUX_setresuid 126
138#define __NR_HPUX_setresgid 127
139#define __NR_HPUX_rename 128
140#define __NR_HPUX_truncate 129
141#define __NR_HPUX_ftruncate 130
142#define __NR_HPUX_flock_old 131
143#define __NR_HPUX_sysconf 132
144#define __NR_HPUX_sendto_old 133
145#define __NR_HPUX_shutdown_old 134
146#define __NR_HPUX_socketpair_old 135
147#define __NR_HPUX_mkdir 136
148#define __NR_HPUX_rmdir 137
149#define __NR_HPUX_utimes_old 138
150#define __NR_HPUX_sigcleanup_old 139
151#define __NR_HPUX_setcore 140
152#define __NR_HPUX_getpeername_old 141
153#define __NR_HPUX_gethostid 142
154#define __NR_HPUX_sethostid 143
155#define __NR_HPUX_getrlimit 144
156#define __NR_HPUX_setrlimit 145
157#define __NR_HPUX_killpg_old 146
158#define __NR_HPUX_cachectl 147
159#define __NR_HPUX_quotactl 148
160#define __NR_HPUX_get_sysinfo 149
161#define __NR_HPUX_getsockname_old 150
162#define __NR_HPUX_privgrp 151
163#define __NR_HPUX_rtprio 152
164#define __NR_HPUX_plock 153
165#define __NR_HPUX_reserved3 154
166#define __NR_HPUX_lockf 155
167#define __NR_HPUX_semget 156
168#define __NR_HPUX_osemctl 157
169#define __NR_HPUX_semop 158
170#define __NR_HPUX_msgget 159
171#define __NR_HPUX_omsgctl 160
172#define __NR_HPUX_msgsnd 161
173#define __NR_HPUX_msgrecv 162
174#define __NR_HPUX_shmget 163
175#define __NR_HPUX_oshmctl 164
176#define __NR_HPUX_shmat 165
177#define __NR_HPUX_shmdt 166
178#define __NR_HPUX_m68020_advise 167
179/* [168,189] are for Discless/DUX */
180#define __NR_HPUX_csp 168
181#define __NR_HPUX_cluster 169
182#define __NR_HPUX_mkrnod 170
183#define __NR_HPUX_test 171
184#define __NR_HPUX_unsp_open 172
185#define __NR_HPUX_reserved4 173
186#define __NR_HPUX_getcontext_old 174
187#define __NR_HPUX_osetcontext 175
188#define __NR_HPUX_bigio 176
189#define __NR_HPUX_pipenode 177
190#define __NR_HPUX_lsync 178
191#define __NR_HPUX_getmachineid 179
192#define __NR_HPUX_cnodeid 180
193#define __NR_HPUX_cnodes 181
194#define __NR_HPUX_swapclients 182
195#define __NR_HPUX_rmt_process 183
196#define __NR_HPUX_dskless_stats 184
197#define __NR_HPUX_sigprocmask 185
198#define __NR_HPUX_sigpending 186
199#define __NR_HPUX_sigsuspend 187
200#define __NR_HPUX_sigaction 188
201#define __NR_HPUX_reserved5 189
202#define __NR_HPUX_nfssvc 190
203#define __NR_HPUX_getfh 191
204#define __NR_HPUX_getdomainname 192
205#define __NR_HPUX_setdomainname 193
206#define __NR_HPUX_async_daemon 194
207#define __NR_HPUX_getdirentries 195
208#define __NR_HPUX_statfs 196
209#define __NR_HPUX_fstatfs 197
210#define __NR_HPUX_vfsmount 198
211#define __NR_HPUX_reserved6 199
212#define __NR_HPUX_waitpid 200
213/* 201 - 223 missing */
214#define __NR_HPUX_sigsetreturn 224
215#define __NR_HPUX_sigsetstatemask 225
216/* 226 missing */
217#define __NR_HPUX_cs 227
218#define __NR_HPUX_cds 228
219#define __NR_HPUX_set_no_trunc 229
220#define __NR_HPUX_pathconf 230
221#define __NR_HPUX_fpathconf 231
222/* 232, 233 missing */
223#define __NR_HPUX_nfs_fcntl 234
224#define __NR_HPUX_ogetacl 235
225#define __NR_HPUX_ofgetacl 236
226#define __NR_HPUX_osetacl 237
227#define __NR_HPUX_ofsetacl 238
228#define __NR_HPUX_pstat 239
229#define __NR_HPUX_getaudid 240
230#define __NR_HPUX_setaudid 241
231#define __NR_HPUX_getaudproc 242
232#define __NR_HPUX_setaudproc 243
233#define __NR_HPUX_getevent 244
234#define __NR_HPUX_setevent 245
235#define __NR_HPUX_audwrite 246
236#define __NR_HPUX_audswitch 247
237#define __NR_HPUX_audctl 248
238#define __NR_HPUX_ogetaccess 249
239#define __NR_HPUX_fsctl 250
240/* 251 - 258 missing */
241#define __NR_HPUX_swapfs 259
242#define __NR_HPUX_fss 260
243/* 261 - 266 missing */
244#define __NR_HPUX_tsync 267
245#define __NR_HPUX_getnumfds 268
246#define __NR_HPUX_poll 269
247#define __NR_HPUX_getmsg 270
248#define __NR_HPUX_putmsg 271
249#define __NR_HPUX_fchdir 272
250#define __NR_HPUX_getmount_cnt 273
251#define __NR_HPUX_getmount_entry 274
252#define __NR_HPUX_accept 275
253#define __NR_HPUX_bind 276
254#define __NR_HPUX_connect 277
255#define __NR_HPUX_getpeername 278
256#define __NR_HPUX_getsockname 279
257#define __NR_HPUX_getsockopt 280
258#define __NR_HPUX_listen 281
259#define __NR_HPUX_recv 282
260#define __NR_HPUX_recvfrom 283
261#define __NR_HPUX_recvmsg 284
262#define __NR_HPUX_send 285
263#define __NR_HPUX_sendmsg 286
264#define __NR_HPUX_sendto 287
265#define __NR_HPUX_setsockopt 288
266#define __NR_HPUX_shutdown 289
267#define __NR_HPUX_socket 290
268#define __NR_HPUX_socketpair 291
269#define __NR_HPUX_proc_open 292
270#define __NR_HPUX_proc_close 293
271#define __NR_HPUX_proc_send 294
272#define __NR_HPUX_proc_recv 295
273#define __NR_HPUX_proc_sendrecv 296
274#define __NR_HPUX_proc_syscall 297
275/* 298 - 311 missing */
276#define __NR_HPUX_semctl 312
277#define __NR_HPUX_msgctl 313
278#define __NR_HPUX_shmctl 314
279#define __NR_HPUX_mpctl 315
280#define __NR_HPUX_exportfs 316
281#define __NR_HPUX_getpmsg 317
282#define __NR_HPUX_putpmsg 318
283/* 319 missing */
284#define __NR_HPUX_msync 320
285#define __NR_HPUX_msleep 321
286#define __NR_HPUX_mwakeup 322
287#define __NR_HPUX_msem_init 323
288#define __NR_HPUX_msem_remove 324
289#define __NR_HPUX_adjtime 325
290#define __NR_HPUX_kload 326
291#define __NR_HPUX_fattach 327
292#define __NR_HPUX_fdetach 328
293#define __NR_HPUX_serialize 329
294#define __NR_HPUX_statvfs 330
295#define __NR_HPUX_fstatvfs 331
296#define __NR_HPUX_lchown 332
297#define __NR_HPUX_getsid 333
298#define __NR_HPUX_sysfs 334
299/* 335, 336 missing */
300#define __NR_HPUX_sched_setparam 337
301#define __NR_HPUX_sched_getparam 338
302#define __NR_HPUX_sched_setscheduler 339
303#define __NR_HPUX_sched_getscheduler 340
304#define __NR_HPUX_sched_yield 341
305#define __NR_HPUX_sched_get_priority_max 342
306#define __NR_HPUX_sched_get_priority_min 343
307#define __NR_HPUX_sched_rr_get_interval 344
308#define __NR_HPUX_clock_settime 345
309#define __NR_HPUX_clock_gettime 346
310#define __NR_HPUX_clock_getres 347
311#define __NR_HPUX_timer_create 348
312#define __NR_HPUX_timer_delete 349
313#define __NR_HPUX_timer_settime 350
314#define __NR_HPUX_timer_gettime 351
315#define __NR_HPUX_timer_getoverrun 352
316#define __NR_HPUX_nanosleep 353
317#define __NR_HPUX_toolbox 354
318/* 355 missing */
319#define __NR_HPUX_getdents 356
320#define __NR_HPUX_getcontext 357
321#define __NR_HPUX_sysinfo 358
322#define __NR_HPUX_fcntl64 359
323#define __NR_HPUX_ftruncate64 360
324#define __NR_HPUX_fstat64 361
325#define __NR_HPUX_getdirentries64 362
326#define __NR_HPUX_getrlimit64 363
327#define __NR_HPUX_lockf64 364
328#define __NR_HPUX_lseek64 365
329#define __NR_HPUX_lstat64 366
330#define __NR_HPUX_mmap64 367
331#define __NR_HPUX_setrlimit64 368
332#define __NR_HPUX_stat64 369
333#define __NR_HPUX_truncate64 370
334#define __NR_HPUX_ulimit64 371
335#define __NR_HPUX_pread 372
336#define __NR_HPUX_preadv 373
337#define __NR_HPUX_pwrite 374
338#define __NR_HPUX_pwritev 375
339#define __NR_HPUX_pread64 376
340#define __NR_HPUX_preadv64 377
341#define __NR_HPUX_pwrite64 378
342#define __NR_HPUX_pwritev64 379
343#define __NR_HPUX_setcontext 380
344#define __NR_HPUX_sigaltstack 381
345#define __NR_HPUX_waitid 382
346#define __NR_HPUX_setpgrp 383
347#define __NR_HPUX_recvmsg2 384
348#define __NR_HPUX_sendmsg2 385
349#define __NR_HPUX_socket2 386
350#define __NR_HPUX_socketpair2 387
351#define __NR_HPUX_setregid 388
352#define __NR_HPUX_lwp_create 389
353#define __NR_HPUX_lwp_terminate 390
354#define __NR_HPUX_lwp_wait 391
355#define __NR_HPUX_lwp_suspend 392
356#define __NR_HPUX_lwp_resume 393
357/* 394 missing */
358#define __NR_HPUX_lwp_abort_syscall 395
359#define __NR_HPUX_lwp_info 396
360#define __NR_HPUX_lwp_kill 397
361#define __NR_HPUX_ksleep 398
362#define __NR_HPUX_kwakeup 399
363/* 400 missing */
364#define __NR_HPUX_pstat_getlwp 401
365#define __NR_HPUX_lwp_exit 402
366#define __NR_HPUX_lwp_continue 403
367#define __NR_HPUX_getacl 404
368#define __NR_HPUX_fgetacl 405
369#define __NR_HPUX_setacl 406
370#define __NR_HPUX_fsetacl 407
371#define __NR_HPUX_getaccess 408
372#define __NR_HPUX_lwp_mutex_init 409
373#define __NR_HPUX_lwp_mutex_lock_sys 410
374#define __NR_HPUX_lwp_mutex_unlock 411
375#define __NR_HPUX_lwp_cond_init 412
376#define __NR_HPUX_lwp_cond_signal 413
377#define __NR_HPUX_lwp_cond_broadcast 414
378#define __NR_HPUX_lwp_cond_wait_sys 415
379#define __NR_HPUX_lwp_getscheduler 416
380#define __NR_HPUX_lwp_setscheduler 417
381#define __NR_HPUX_lwp_getstate 418
382#define __NR_HPUX_lwp_setstate 419
383#define __NR_HPUX_lwp_detach 420
384#define __NR_HPUX_mlock 421
385#define __NR_HPUX_munlock 422
386#define __NR_HPUX_mlockall 423
387#define __NR_HPUX_munlockall 424
388#define __NR_HPUX_shm_open 425
389#define __NR_HPUX_shm_unlink 426
390#define __NR_HPUX_sigqueue 427
391#define __NR_HPUX_sigwaitinfo 428
392#define __NR_HPUX_sigtimedwait 429
393#define __NR_HPUX_sigwait 430
394#define __NR_HPUX_aio_read 431
395#define __NR_HPUX_aio_write 432
396#define __NR_HPUX_lio_listio 433
397#define __NR_HPUX_aio_error 434
398#define __NR_HPUX_aio_return 435
399#define __NR_HPUX_aio_cancel 436
400#define __NR_HPUX_aio_suspend 437
401#define __NR_HPUX_aio_fsync 438
402#define __NR_HPUX_mq_open 439
403#define __NR_HPUX_mq_close 440
404#define __NR_HPUX_mq_unlink 441
405#define __NR_HPUX_mq_send 442
406#define __NR_HPUX_mq_receive 443
407#define __NR_HPUX_mq_notify 444
408#define __NR_HPUX_mq_setattr 445
409#define __NR_HPUX_mq_getattr 446
410#define __NR_HPUX_ksem_open 447
411#define __NR_HPUX_ksem_unlink 448
412#define __NR_HPUX_ksem_close 449
413#define __NR_HPUX_ksem_post 450
414#define __NR_HPUX_ksem_wait 451
415#define __NR_HPUX_ksem_read 452
416#define __NR_HPUX_ksem_trywait 453
417#define __NR_HPUX_lwp_rwlock_init 454
418#define __NR_HPUX_lwp_rwlock_destroy 455
419#define __NR_HPUX_lwp_rwlock_rdlock_sys 456
420#define __NR_HPUX_lwp_rwlock_wrlock_sys 457
421#define __NR_HPUX_lwp_rwlock_tryrdlock 458
422#define __NR_HPUX_lwp_rwlock_trywrlock 459
423#define __NR_HPUX_lwp_rwlock_unlock 460
424#define __NR_HPUX_ttrace 461
425#define __NR_HPUX_ttrace_wait 462
426#define __NR_HPUX_lf_wire_mem 463
427#define __NR_HPUX_lf_unwire_mem 464
428#define __NR_HPUX_lf_send_pin_map 465
429#define __NR_HPUX_lf_free_buf 466
430#define __NR_HPUX_lf_wait_nq 467
431#define __NR_HPUX_lf_wakeup_conn_q 468
432#define __NR_HPUX_lf_unused 469
433#define __NR_HPUX_lwp_sema_init 470
434#define __NR_HPUX_lwp_sema_post 471
435#define __NR_HPUX_lwp_sema_wait 472
436#define __NR_HPUX_lwp_sema_trywait 473
437#define __NR_HPUX_lwp_sema_destroy 474
438#define __NR_HPUX_statvfs64 475
439#define __NR_HPUX_fstatvfs64 476
440#define __NR_HPUX_msh_register 477
441#define __NR_HPUX_ptrace64 478
442#define __NR_HPUX_sendfile 479
443#define __NR_HPUX_sendpath 480
444#define __NR_HPUX_sendfile64 481
445#define __NR_HPUX_sendpath64 482
446#define __NR_HPUX_modload 483
447#define __NR_HPUX_moduload 484
448#define __NR_HPUX_modpath 485
449#define __NR_HPUX_getksym 486
450#define __NR_HPUX_modadm 487
451#define __NR_HPUX_modstat 488
452#define __NR_HPUX_lwp_detached_exit 489
453#define __NR_HPUX_crashconf 490
454#define __NR_HPUX_siginhibit 491
455#define __NR_HPUX_sigenable 492
456#define __NR_HPUX_spuctl 493
457#define __NR_HPUX_zerokernelsum 494
458#define __NR_HPUX_nfs_kstat 495
459#define __NR_HPUX_aio_read64 496
460#define __NR_HPUX_aio_write64 497
461#define __NR_HPUX_aio_error64 498
462#define __NR_HPUX_aio_return64 499
463#define __NR_HPUX_aio_cancel64 500
464#define __NR_HPUX_aio_suspend64 501
465#define __NR_HPUX_aio_fsync64 502
466#define __NR_HPUX_lio_listio64 503
467#define __NR_HPUX_recv2 504
468#define __NR_HPUX_recvfrom2 505
469#define __NR_HPUX_send2 506
470#define __NR_HPUX_sendto2 507
471#define __NR_HPUX_acl 508
472#define __NR_HPUX___cnx_p2p_ctl 509
473#define __NR_HPUX___cnx_gsched_ctl 510
474#define __NR_HPUX___cnx_pmon_ctl 511
475
476#define __NR_HPUX_syscalls 512
477
478/*
479 * Linux system call numbers.
480 *
481 * Cary Coutant says that we should just use another syscall gateway
482 * page to avoid clashing with the HPUX space, and I think he's right:
483 * it will would keep a branch out of our syscall entry path, at the
484 * very least. If we decide to change it later, we can ``just'' tweak
485 * the LINUX_GATEWAY_ADDR define at the bottom and make __NR_Linux be
486 * 1024 or something. Oh, and recompile libc. =)
487 *
488 * 64-bit HPUX binaries get the syscall gateway address passed in a register
489 * from the kernel at startup, which seems a sane strategy.
490 */
491
492#define __NR_Linux 0
493#define __NR_restart_syscall (__NR_Linux + 0)
494#define __NR_exit (__NR_Linux + 1)
495#define __NR_fork (__NR_Linux + 2)
496#define __NR_read (__NR_Linux + 3)
497#define __NR_write (__NR_Linux + 4)
498#define __NR_open (__NR_Linux + 5)
499#define __NR_close (__NR_Linux + 6)
500#define __NR_waitpid (__NR_Linux + 7)
501#define __NR_creat (__NR_Linux + 8)
502#define __NR_link (__NR_Linux + 9)
503#define __NR_unlink (__NR_Linux + 10)
504#define __NR_execve (__NR_Linux + 11)
505#define __NR_chdir (__NR_Linux + 12)
506#define __NR_time (__NR_Linux + 13)
507#define __NR_mknod (__NR_Linux + 14)
508#define __NR_chmod (__NR_Linux + 15)
509#define __NR_lchown (__NR_Linux + 16)
510#define __NR_socket (__NR_Linux + 17)
511#define __NR_stat (__NR_Linux + 18)
512#define __NR_lseek (__NR_Linux + 19)
513#define __NR_getpid (__NR_Linux + 20)
514#define __NR_mount (__NR_Linux + 21)
515#define __NR_bind (__NR_Linux + 22)
516#define __NR_setuid (__NR_Linux + 23)
517#define __NR_getuid (__NR_Linux + 24)
518#define __NR_stime (__NR_Linux + 25)
519#define __NR_ptrace (__NR_Linux + 26)
520#define __NR_alarm (__NR_Linux + 27)
521#define __NR_fstat (__NR_Linux + 28)
522#define __NR_pause (__NR_Linux + 29)
523#define __NR_utime (__NR_Linux + 30)
524#define __NR_connect (__NR_Linux + 31)
525#define __NR_listen (__NR_Linux + 32)
526#define __NR_access (__NR_Linux + 33)
527#define __NR_nice (__NR_Linux + 34)
528#define __NR_accept (__NR_Linux + 35)
529#define __NR_sync (__NR_Linux + 36)
530#define __NR_kill (__NR_Linux + 37)
531#define __NR_rename (__NR_Linux + 38)
532#define __NR_mkdir (__NR_Linux + 39)
533#define __NR_rmdir (__NR_Linux + 40)
534#define __NR_dup (__NR_Linux + 41)
535#define __NR_pipe (__NR_Linux + 42)
536#define __NR_times (__NR_Linux + 43)
537#define __NR_getsockname (__NR_Linux + 44)
538#define __NR_brk (__NR_Linux + 45)
539#define __NR_setgid (__NR_Linux + 46)
540#define __NR_getgid (__NR_Linux + 47)
541#define __NR_signal (__NR_Linux + 48)
542#define __NR_geteuid (__NR_Linux + 49)
543#define __NR_getegid (__NR_Linux + 50)
544#define __NR_acct (__NR_Linux + 51)
545#define __NR_umount2 (__NR_Linux + 52)
546#define __NR_getpeername (__NR_Linux + 53)
547#define __NR_ioctl (__NR_Linux + 54)
548#define __NR_fcntl (__NR_Linux + 55)
549#define __NR_socketpair (__NR_Linux + 56)
550#define __NR_setpgid (__NR_Linux + 57)
551#define __NR_send (__NR_Linux + 58)
552#define __NR_uname (__NR_Linux + 59)
553#define __NR_umask (__NR_Linux + 60)
554#define __NR_chroot (__NR_Linux + 61)
555#define __NR_ustat (__NR_Linux + 62)
556#define __NR_dup2 (__NR_Linux + 63)
557#define __NR_getppid (__NR_Linux + 64)
558#define __NR_getpgrp (__NR_Linux + 65)
559#define __NR_setsid (__NR_Linux + 66)
560#define __NR_pivot_root (__NR_Linux + 67)
561#define __NR_sgetmask (__NR_Linux + 68)
562#define __NR_ssetmask (__NR_Linux + 69)
563#define __NR_setreuid (__NR_Linux + 70)
564#define __NR_setregid (__NR_Linux + 71)
565#define __NR_mincore (__NR_Linux + 72)
566#define __NR_sigpending (__NR_Linux + 73)
567#define __NR_sethostname (__NR_Linux + 74)
568#define __NR_setrlimit (__NR_Linux + 75)
569#define __NR_getrlimit (__NR_Linux + 76)
570#define __NR_getrusage (__NR_Linux + 77)
571#define __NR_gettimeofday (__NR_Linux + 78)
572#define __NR_settimeofday (__NR_Linux + 79)
573#define __NR_getgroups (__NR_Linux + 80)
574#define __NR_setgroups (__NR_Linux + 81)
575#define __NR_sendto (__NR_Linux + 82)
576#define __NR_symlink (__NR_Linux + 83)
577#define __NR_lstat (__NR_Linux + 84)
578#define __NR_readlink (__NR_Linux + 85)
579#define __NR_uselib (__NR_Linux + 86)
580#define __NR_swapon (__NR_Linux + 87)
581#define __NR_reboot (__NR_Linux + 88)
582#define __NR_mmap2 (__NR_Linux + 89)
583#define __NR_mmap (__NR_Linux + 90)
584#define __NR_munmap (__NR_Linux + 91)
585#define __NR_truncate (__NR_Linux + 92)
586#define __NR_ftruncate (__NR_Linux + 93)
587#define __NR_fchmod (__NR_Linux + 94)
588#define __NR_fchown (__NR_Linux + 95)
589#define __NR_getpriority (__NR_Linux + 96)
590#define __NR_setpriority (__NR_Linux + 97)
591#define __NR_recv (__NR_Linux + 98)
592#define __NR_statfs (__NR_Linux + 99)
593#define __NR_fstatfs (__NR_Linux + 100)
594#define __NR_stat64 (__NR_Linux + 101)
595/* #define __NR_socketcall (__NR_Linux + 102) */
596#define __NR_syslog (__NR_Linux + 103)
597#define __NR_setitimer (__NR_Linux + 104)
598#define __NR_getitimer (__NR_Linux + 105)
599#define __NR_capget (__NR_Linux + 106)
600#define __NR_capset (__NR_Linux + 107)
601#define __NR_pread64 (__NR_Linux + 108)
602#define __NR_pwrite64 (__NR_Linux + 109)
603#define __NR_getcwd (__NR_Linux + 110)
604#define __NR_vhangup (__NR_Linux + 111)
605#define __NR_fstat64 (__NR_Linux + 112)
606#define __NR_vfork (__NR_Linux + 113)
607#define __NR_wait4 (__NR_Linux + 114)
608#define __NR_swapoff (__NR_Linux + 115)
609#define __NR_sysinfo (__NR_Linux + 116)
610#define __NR_shutdown (__NR_Linux + 117)
611#define __NR_fsync (__NR_Linux + 118)
612#define __NR_madvise (__NR_Linux + 119)
613#define __NR_clone (__NR_Linux + 120)
614#define __NR_setdomainname (__NR_Linux + 121)
615#define __NR_sendfile (__NR_Linux + 122)
616#define __NR_recvfrom (__NR_Linux + 123)
617#define __NR_adjtimex (__NR_Linux + 124)
618#define __NR_mprotect (__NR_Linux + 125)
619#define __NR_sigprocmask (__NR_Linux + 126)
620#define __NR_create_module (__NR_Linux + 127)
621#define __NR_init_module (__NR_Linux + 128)
622#define __NR_delete_module (__NR_Linux + 129)
623#define __NR_get_kernel_syms (__NR_Linux + 130)
624#define __NR_quotactl (__NR_Linux + 131)
625#define __NR_getpgid (__NR_Linux + 132)
626#define __NR_fchdir (__NR_Linux + 133)
627#define __NR_bdflush (__NR_Linux + 134)
628#define __NR_sysfs (__NR_Linux + 135)
629#define __NR_personality (__NR_Linux + 136)
630#define __NR_afs_syscall (__NR_Linux + 137) /* Syscall for Andrew File System */
631#define __NR_setfsuid (__NR_Linux + 138)
632#define __NR_setfsgid (__NR_Linux + 139)
633#define __NR__llseek (__NR_Linux + 140)
634#define __NR_getdents (__NR_Linux + 141)
635#define __NR__newselect (__NR_Linux + 142)
636#define __NR_flock (__NR_Linux + 143)
637#define __NR_msync (__NR_Linux + 144)
638#define __NR_readv (__NR_Linux + 145)
639#define __NR_writev (__NR_Linux + 146)
640#define __NR_getsid (__NR_Linux + 147)
641#define __NR_fdatasync (__NR_Linux + 148)
642#define __NR__sysctl (__NR_Linux + 149)
643#define __NR_mlock (__NR_Linux + 150)
644#define __NR_munlock (__NR_Linux + 151)
645#define __NR_mlockall (__NR_Linux + 152)
646#define __NR_munlockall (__NR_Linux + 153)
647#define __NR_sched_setparam (__NR_Linux + 154)
648#define __NR_sched_getparam (__NR_Linux + 155)
649#define __NR_sched_setscheduler (__NR_Linux + 156)
650#define __NR_sched_getscheduler (__NR_Linux + 157)
651#define __NR_sched_yield (__NR_Linux + 158)
652#define __NR_sched_get_priority_max (__NR_Linux + 159)
653#define __NR_sched_get_priority_min (__NR_Linux + 160)
654#define __NR_sched_rr_get_interval (__NR_Linux + 161)
655#define __NR_nanosleep (__NR_Linux + 162)
656#define __NR_mremap (__NR_Linux + 163)
657#define __NR_setresuid (__NR_Linux + 164)
658#define __NR_getresuid (__NR_Linux + 165)
659#define __NR_sigaltstack (__NR_Linux + 166)
660#define __NR_query_module (__NR_Linux + 167)
661#define __NR_poll (__NR_Linux + 168)
662#define __NR_nfsservctl (__NR_Linux + 169)
663#define __NR_setresgid (__NR_Linux + 170)
664#define __NR_getresgid (__NR_Linux + 171)
665#define __NR_prctl (__NR_Linux + 172)
666#define __NR_rt_sigreturn (__NR_Linux + 173)
667#define __NR_rt_sigaction (__NR_Linux + 174)
668#define __NR_rt_sigprocmask (__NR_Linux + 175)
669#define __NR_rt_sigpending (__NR_Linux + 176)
670#define __NR_rt_sigtimedwait (__NR_Linux + 177)
671#define __NR_rt_sigqueueinfo (__NR_Linux + 178)
672#define __NR_rt_sigsuspend (__NR_Linux + 179)
673#define __NR_chown (__NR_Linux + 180)
674#define __NR_setsockopt (__NR_Linux + 181)
675#define __NR_getsockopt (__NR_Linux + 182)
676#define __NR_sendmsg (__NR_Linux + 183)
677#define __NR_recvmsg (__NR_Linux + 184)
678#define __NR_semop (__NR_Linux + 185)
679#define __NR_semget (__NR_Linux + 186)
680#define __NR_semctl (__NR_Linux + 187)
681#define __NR_msgsnd (__NR_Linux + 188)
682#define __NR_msgrcv (__NR_Linux + 189)
683#define __NR_msgget (__NR_Linux + 190)
684#define __NR_msgctl (__NR_Linux + 191)
685#define __NR_shmat (__NR_Linux + 192)
686#define __NR_shmdt (__NR_Linux + 193)
687#define __NR_shmget (__NR_Linux + 194)
688#define __NR_shmctl (__NR_Linux + 195)
689
690#define __NR_getpmsg (__NR_Linux + 196) /* Somebody *wants* streams? */
691#define __NR_putpmsg (__NR_Linux + 197)
692
693#define __NR_lstat64 (__NR_Linux + 198)
694#define __NR_truncate64 (__NR_Linux + 199)
695#define __NR_ftruncate64 (__NR_Linux + 200)
696#define __NR_getdents64 (__NR_Linux + 201)
697#define __NR_fcntl64 (__NR_Linux + 202)
698#define __NR_attrctl (__NR_Linux + 203)
699#define __NR_acl_get (__NR_Linux + 204)
700#define __NR_acl_set (__NR_Linux + 205)
701#define __NR_gettid (__NR_Linux + 206)
702#define __NR_readahead (__NR_Linux + 207)
703#define __NR_tkill (__NR_Linux + 208)
704#define __NR_sendfile64 (__NR_Linux + 209)
705#define __NR_futex (__NR_Linux + 210)
706#define __NR_sched_setaffinity (__NR_Linux + 211)
707#define __NR_sched_getaffinity (__NR_Linux + 212)
708#define __NR_set_thread_area (__NR_Linux + 213)
709#define __NR_get_thread_area (__NR_Linux + 214)
710#define __NR_io_setup (__NR_Linux + 215)
711#define __NR_io_destroy (__NR_Linux + 216)
712#define __NR_io_getevents (__NR_Linux + 217)
713#define __NR_io_submit (__NR_Linux + 218)
714#define __NR_io_cancel (__NR_Linux + 219)
715#define __NR_alloc_hugepages (__NR_Linux + 220)
716#define __NR_free_hugepages (__NR_Linux + 221)
717#define __NR_exit_group (__NR_Linux + 222)
718#define __NR_lookup_dcookie (__NR_Linux + 223)
719#define __NR_epoll_create (__NR_Linux + 224)
720#define __NR_epoll_ctl (__NR_Linux + 225)
721#define __NR_epoll_wait (__NR_Linux + 226)
722#define __NR_remap_file_pages (__NR_Linux + 227)
723#define __NR_semtimedop (__NR_Linux + 228)
724#define __NR_mq_open (__NR_Linux + 229)
725#define __NR_mq_unlink (__NR_Linux + 230)
726#define __NR_mq_timedsend (__NR_Linux + 231)
727#define __NR_mq_timedreceive (__NR_Linux + 232)
728#define __NR_mq_notify (__NR_Linux + 233)
729#define __NR_mq_getsetattr (__NR_Linux + 234)
730#define __NR_waitid (__NR_Linux + 235)
731#define __NR_fadvise64_64 (__NR_Linux + 236)
732#define __NR_set_tid_address (__NR_Linux + 237)
733#define __NR_setxattr (__NR_Linux + 238)
734#define __NR_lsetxattr (__NR_Linux + 239)
735#define __NR_fsetxattr (__NR_Linux + 240)
736#define __NR_getxattr (__NR_Linux + 241)
737#define __NR_lgetxattr (__NR_Linux + 242)
738#define __NR_fgetxattr (__NR_Linux + 243)
739#define __NR_listxattr (__NR_Linux + 244)
740#define __NR_llistxattr (__NR_Linux + 245)
741#define __NR_flistxattr (__NR_Linux + 246)
742#define __NR_removexattr (__NR_Linux + 247)
743#define __NR_lremovexattr (__NR_Linux + 248)
744#define __NR_fremovexattr (__NR_Linux + 249)
745#define __NR_timer_create (__NR_Linux + 250)
746#define __NR_timer_settime (__NR_Linux + 251)
747#define __NR_timer_gettime (__NR_Linux + 252)
748#define __NR_timer_getoverrun (__NR_Linux + 253)
749#define __NR_timer_delete (__NR_Linux + 254)
750#define __NR_clock_settime (__NR_Linux + 255)
751#define __NR_clock_gettime (__NR_Linux + 256)
752#define __NR_clock_getres (__NR_Linux + 257)
753#define __NR_clock_nanosleep (__NR_Linux + 258)
754#define __NR_tgkill (__NR_Linux + 259)
755#define __NR_mbind (__NR_Linux + 260)
756#define __NR_get_mempolicy (__NR_Linux + 261)
757#define __NR_set_mempolicy (__NR_Linux + 262)
758#define __NR_vserver (__NR_Linux + 263)
759#define __NR_add_key (__NR_Linux + 264)
760#define __NR_request_key (__NR_Linux + 265)
761#define __NR_keyctl (__NR_Linux + 266)
762#define __NR_ioprio_set (__NR_Linux + 267)
763#define __NR_ioprio_get (__NR_Linux + 268)
764#define __NR_inotify_init (__NR_Linux + 269)
765#define __NR_inotify_add_watch (__NR_Linux + 270)
766#define __NR_inotify_rm_watch (__NR_Linux + 271)
767#define __NR_migrate_pages (__NR_Linux + 272)
768#define __NR_pselect6 (__NR_Linux + 273)
769#define __NR_ppoll (__NR_Linux + 274)
770#define __NR_openat (__NR_Linux + 275)
771#define __NR_mkdirat (__NR_Linux + 276)
772#define __NR_mknodat (__NR_Linux + 277)
773#define __NR_fchownat (__NR_Linux + 278)
774#define __NR_futimesat (__NR_Linux + 279)
775#define __NR_fstatat64 (__NR_Linux + 280)
776#define __NR_unlinkat (__NR_Linux + 281)
777#define __NR_renameat (__NR_Linux + 282)
778#define __NR_linkat (__NR_Linux + 283)
779#define __NR_symlinkat (__NR_Linux + 284)
780#define __NR_readlinkat (__NR_Linux + 285)
781#define __NR_fchmodat (__NR_Linux + 286)
782#define __NR_faccessat (__NR_Linux + 287)
783#define __NR_unshare (__NR_Linux + 288)
784#define __NR_set_robust_list (__NR_Linux + 289)
785#define __NR_get_robust_list (__NR_Linux + 290)
786#define __NR_splice (__NR_Linux + 291)
787#define __NR_sync_file_range (__NR_Linux + 292)
788#define __NR_tee (__NR_Linux + 293)
789#define __NR_vmsplice (__NR_Linux + 294)
790#define __NR_move_pages (__NR_Linux + 295)
791#define __NR_getcpu (__NR_Linux + 296)
792#define __NR_epoll_pwait (__NR_Linux + 297)
793#define __NR_statfs64 (__NR_Linux + 298)
794#define __NR_fstatfs64 (__NR_Linux + 299)
795#define __NR_kexec_load (__NR_Linux + 300)
796#define __NR_utimensat (__NR_Linux + 301)
797#define __NR_signalfd (__NR_Linux + 302)
798#define __NR_timerfd (__NR_Linux + 303)
799#define __NR_eventfd (__NR_Linux + 304)
800#define __NR_fallocate (__NR_Linux + 305)
801#define __NR_timerfd_create (__NR_Linux + 306)
802#define __NR_timerfd_settime (__NR_Linux + 307)
803#define __NR_timerfd_gettime (__NR_Linux + 308)
804#define __NR_signalfd4 (__NR_Linux + 309)
805#define __NR_eventfd2 (__NR_Linux + 310)
806#define __NR_epoll_create1 (__NR_Linux + 311)
807#define __NR_dup3 (__NR_Linux + 312)
808#define __NR_pipe2 (__NR_Linux + 313)
809#define __NR_inotify_init1 (__NR_Linux + 314)
810#define __NR_preadv (__NR_Linux + 315)
811#define __NR_pwritev (__NR_Linux + 316)
812#define __NR_rt_tgsigqueueinfo (__NR_Linux + 317)
813#define __NR_perf_event_open (__NR_Linux + 318)
814#define __NR_recvmmsg (__NR_Linux + 319)
815#define __NR_accept4 (__NR_Linux + 320)
816#define __NR_prlimit64 (__NR_Linux + 321)
817#define __NR_fanotify_init (__NR_Linux + 322)
818#define __NR_fanotify_mark (__NR_Linux + 323)
819#define __NR_clock_adjtime (__NR_Linux + 324)
820#define __NR_name_to_handle_at (__NR_Linux + 325)
821#define __NR_open_by_handle_at (__NR_Linux + 326)
822#define __NR_syncfs (__NR_Linux + 327)
823#define __NR_setns (__NR_Linux + 328)
824#define __NR_sendmmsg (__NR_Linux + 329)
825
826#define __NR_Linux_syscalls (__NR_sendmmsg + 1)
827
828
829#define __IGNORE_select /* newselect */
830#define __IGNORE_fadvise64 /* fadvise64_64 */
831#define __IGNORE_utimes /* utime */
832
833
834#define HPUX_GATEWAY_ADDR 0xC0000004
835#define LINUX_GATEWAY_ADDR 0x100
836 5
837#ifdef __KERNEL__
838#ifndef __ASSEMBLY__ 6#ifndef __ASSEMBLY__
839 7
840#define SYS_ify(syscall_name) __NR_##syscall_name 8#define SYS_ify(syscall_name) __NR_##syscall_name
@@ -1008,5 +176,4 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \
1008 */ 176 */
1009#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 177#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
1010 178
1011#endif /* __KERNEL__ */
1012#endif /* _ASM_PARISC_UNISTD_H_ */ 179#endif /* _ASM_PARISC_UNISTD_H_ */
diff --git a/arch/parisc/include/asm/user.h b/arch/parisc/include/asm/user.h
deleted file mode 100644
index 80224753e508..000000000000
--- a/arch/parisc/include/asm/user.h
+++ /dev/null
@@ -1,5 +0,0 @@
1/* This file should not exist, but lots of generic code still includes
2 it. It's a hangover from old a.out days and the traditional core
3 dump format. We are ELF-only, and so are our core dumps. If we
4 need to support HP/UX core format then we'll do it here
5 eventually. */
diff --git a/arch/parisc/include/asm/vga.h b/arch/parisc/include/asm/vga.h
deleted file mode 100644
index 171399a88ca6..000000000000
--- a/arch/parisc/include/asm/vga.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __ASM_PARISC_VGA_H__
2#define __ASM_PARISC_VGA_H__
3
4/* nothing */
5
6#endif /* __ASM_PARISC_VGA_H__ */
diff --git a/arch/parisc/include/asm/xor.h b/arch/parisc/include/asm/xor.h
deleted file mode 100644
index c82eb12a5b18..000000000000
--- a/arch/parisc/include/asm/xor.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/xor.h>
diff --git a/arch/parisc/include/uapi/asm/Kbuild b/arch/parisc/include/uapi/asm/Kbuild
index baebb3da1d44..a580642555b6 100644
--- a/arch/parisc/include/uapi/asm/Kbuild
+++ b/arch/parisc/include/uapi/asm/Kbuild
@@ -1,3 +1,31 @@
1# UAPI Header export list 1# UAPI Header export list
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3 3
4header-y += bitsperlong.h
5header-y += byteorder.h
6header-y += errno.h
7header-y += fcntl.h
8header-y += ioctl.h
9header-y += ioctls.h
10header-y += ipcbuf.h
11header-y += mman.h
12header-y += msgbuf.h
13header-y += pdc.h
14header-y += posix_types.h
15header-y += ptrace.h
16header-y += resource.h
17header-y += sembuf.h
18header-y += setup.h
19header-y += shmbuf.h
20header-y += sigcontext.h
21header-y += siginfo.h
22header-y += signal.h
23header-y += socket.h
24header-y += sockios.h
25header-y += stat.h
26header-y += statfs.h
27header-y += swab.h
28header-y += termbits.h
29header-y += termios.h
30header-y += types.h
31header-y += unistd.h
diff --git a/arch/parisc/include/asm/bitsperlong.h b/arch/parisc/include/uapi/asm/bitsperlong.h
index 75196b415d3f..75196b415d3f 100644
--- a/arch/parisc/include/asm/bitsperlong.h
+++ b/arch/parisc/include/uapi/asm/bitsperlong.h
diff --git a/arch/parisc/include/asm/byteorder.h b/arch/parisc/include/uapi/asm/byteorder.h
index 58af2c5f5d61..58af2c5f5d61 100644
--- a/arch/parisc/include/asm/byteorder.h
+++ b/arch/parisc/include/uapi/asm/byteorder.h
diff --git a/arch/parisc/include/asm/errno.h b/arch/parisc/include/uapi/asm/errno.h
index 135ad6047e51..135ad6047e51 100644
--- a/arch/parisc/include/asm/errno.h
+++ b/arch/parisc/include/uapi/asm/errno.h
diff --git a/arch/parisc/include/asm/fcntl.h b/arch/parisc/include/uapi/asm/fcntl.h
index 0304b92ccfea..0304b92ccfea 100644
--- a/arch/parisc/include/asm/fcntl.h
+++ b/arch/parisc/include/uapi/asm/fcntl.h
diff --git a/arch/parisc/include/asm/ioctl.h b/arch/parisc/include/uapi/asm/ioctl.h
index ec8efa02beda..ec8efa02beda 100644
--- a/arch/parisc/include/asm/ioctl.h
+++ b/arch/parisc/include/uapi/asm/ioctl.h
diff --git a/arch/parisc/include/asm/ioctls.h b/arch/parisc/include/uapi/asm/ioctls.h
index 054ec06f9e23..054ec06f9e23 100644
--- a/arch/parisc/include/asm/ioctls.h
+++ b/arch/parisc/include/uapi/asm/ioctls.h
diff --git a/arch/parisc/include/asm/ipcbuf.h b/arch/parisc/include/uapi/asm/ipcbuf.h
index bd956c425785..bd956c425785 100644
--- a/arch/parisc/include/asm/ipcbuf.h
+++ b/arch/parisc/include/uapi/asm/ipcbuf.h
diff --git a/arch/parisc/include/asm/mman.h b/arch/parisc/include/uapi/asm/mman.h
index 12219ebce869..12219ebce869 100644
--- a/arch/parisc/include/asm/mman.h
+++ b/arch/parisc/include/uapi/asm/mman.h
diff --git a/arch/parisc/include/asm/msgbuf.h b/arch/parisc/include/uapi/asm/msgbuf.h
index fe88f2649418..fe88f2649418 100644
--- a/arch/parisc/include/asm/msgbuf.h
+++ b/arch/parisc/include/uapi/asm/msgbuf.h
diff --git a/arch/parisc/include/uapi/asm/pdc.h b/arch/parisc/include/uapi/asm/pdc.h
new file mode 100644
index 000000000000..702498f7705b
--- /dev/null
+++ b/arch/parisc/include/uapi/asm/pdc.h
@@ -0,0 +1,427 @@
1#ifndef _UAPI_PARISC_PDC_H
2#define _UAPI_PARISC_PDC_H
3
4/*
5 * PDC return values ...
6 * All PDC calls return a subset of these errors.
7 */
8
9#define PDC_WARN 3 /* Call completed with a warning */
10#define PDC_REQ_ERR_1 2 /* See above */
11#define PDC_REQ_ERR_0 1 /* Call would generate a requestor error */
12#define PDC_OK 0 /* Call completed successfully */
13#define PDC_BAD_PROC -1 /* Called non-existent procedure*/
14#define PDC_BAD_OPTION -2 /* Called with non-existent option */
15#define PDC_ERROR -3 /* Call could not complete without an error */
16#define PDC_NE_MOD -5 /* Module not found */
17#define PDC_NE_CELL_MOD -7 /* Cell module not found */
18#define PDC_INVALID_ARG -10 /* Called with an invalid argument */
19#define PDC_BUS_POW_WARN -12 /* Call could not complete in allowed power budget */
20#define PDC_NOT_NARROW -17 /* Narrow mode not supported */
21
22/*
23 * PDC entry points...
24 */
25
26#define PDC_POW_FAIL 1 /* perform a power-fail */
27#define PDC_POW_FAIL_PREPARE 0 /* prepare for powerfail */
28
29#define PDC_CHASSIS 2 /* PDC-chassis functions */
30#define PDC_CHASSIS_DISP 0 /* update chassis display */
31#define PDC_CHASSIS_WARN 1 /* return chassis warnings */
32#define PDC_CHASSIS_DISPWARN 2 /* update&return chassis status */
33#define PDC_RETURN_CHASSIS_INFO 128 /* HVERSION dependent: return chassis LED/LCD info */
34
35#define PDC_PIM 3 /* Get PIM data */
36#define PDC_PIM_HPMC 0 /* Transfer HPMC data */
37#define PDC_PIM_RETURN_SIZE 1 /* Get Max buffer needed for PIM*/
38#define PDC_PIM_LPMC 2 /* Transfer HPMC data */
39#define PDC_PIM_SOFT_BOOT 3 /* Transfer Soft Boot data */
40#define PDC_PIM_TOC 4 /* Transfer TOC data */
41
42#define PDC_MODEL 4 /* PDC model information call */
43#define PDC_MODEL_INFO 0 /* returns information */
44#define PDC_MODEL_BOOTID 1 /* set the BOOT_ID */
45#define PDC_MODEL_VERSIONS 2 /* returns cpu-internal versions*/
46#define PDC_MODEL_SYSMODEL 3 /* return system model info */
47#define PDC_MODEL_ENSPEC 4 /* enable specific option */
48#define PDC_MODEL_DISPEC 5 /* disable specific option */
49#define PDC_MODEL_CPU_ID 6 /* returns cpu-id (only newer machines!) */
50#define PDC_MODEL_CAPABILITIES 7 /* returns OS32/OS64-flags */
51/* Values for PDC_MODEL_CAPABILITIES non-equivalent virtual aliasing support */
52#define PDC_MODEL_OS64 (1 << 0)
53#define PDC_MODEL_OS32 (1 << 1)
54#define PDC_MODEL_IOPDIR_FDC (1 << 2)
55#define PDC_MODEL_NVA_MASK (3 << 4)
56#define PDC_MODEL_NVA_SUPPORTED (0 << 4)
57#define PDC_MODEL_NVA_SLOW (1 << 4)
58#define PDC_MODEL_NVA_UNSUPPORTED (3 << 4)
59#define PDC_MODEL_GET_BOOT__OP 8 /* returns boot test options */
60#define PDC_MODEL_SET_BOOT__OP 9 /* set boot test options */
61
62#define PA89_INSTRUCTION_SET 0x4 /* capatibilies returned */
63#define PA90_INSTRUCTION_SET 0x8
64
65#define PDC_CACHE 5 /* return/set cache (& TLB) info*/
66#define PDC_CACHE_INFO 0 /* returns information */
67#define PDC_CACHE_SET_COH 1 /* set coherence state */
68#define PDC_CACHE_RET_SPID 2 /* returns space-ID bits */
69
70#define PDC_HPA 6 /* return HPA of processor */
71#define PDC_HPA_PROCESSOR 0
72#define PDC_HPA_MODULES 1
73
74#define PDC_COPROC 7 /* Co-Processor (usually FP unit(s)) */
75#define PDC_COPROC_CFG 0 /* Co-Processor Cfg (FP unit(s) enabled?) */
76
77#define PDC_IODC 8 /* talk to IODC */
78#define PDC_IODC_READ 0 /* read IODC entry point */
79/* PDC_IODC_RI_ * INDEX parameter of PDC_IODC_READ */
80#define PDC_IODC_RI_DATA_BYTES 0 /* IODC Data Bytes */
81/* 1, 2 obsolete - HVERSION dependent*/
82#define PDC_IODC_RI_INIT 3 /* Initialize module */
83#define PDC_IODC_RI_IO 4 /* Module input/output */
84#define PDC_IODC_RI_SPA 5 /* Module input/output */
85#define PDC_IODC_RI_CONFIG 6 /* Module input/output */
86/* 7 obsolete - HVERSION dependent */
87#define PDC_IODC_RI_TEST 8 /* Module input/output */
88#define PDC_IODC_RI_TLB 9 /* Module input/output */
89#define PDC_IODC_NINIT 2 /* non-destructive init */
90#define PDC_IODC_DINIT 3 /* destructive init */
91#define PDC_IODC_MEMERR 4 /* check for memory errors */
92#define PDC_IODC_INDEX_DATA 0 /* get first 16 bytes from mod IODC */
93#define PDC_IODC_BUS_ERROR -4 /* bus error return value */
94#define PDC_IODC_INVALID_INDEX -5 /* invalid index return value */
95#define PDC_IODC_COUNT -6 /* count is too small */
96
97#define PDC_TOD 9 /* time-of-day clock (TOD) */
98#define PDC_TOD_READ 0 /* read TOD */
99#define PDC_TOD_WRITE 1 /* write TOD */
100
101
102#define PDC_STABLE 10 /* stable storage (sprockets) */
103#define PDC_STABLE_READ 0
104#define PDC_STABLE_WRITE 1
105#define PDC_STABLE_RETURN_SIZE 2
106#define PDC_STABLE_VERIFY_CONTENTS 3
107#define PDC_STABLE_INITIALIZE 4
108
109#define PDC_NVOLATILE 11 /* often not implemented */
110
111#define PDC_ADD_VALID 12 /* Memory validation PDC call */
112#define PDC_ADD_VALID_VERIFY 0 /* Make PDC_ADD_VALID verify region */
113
114#define PDC_INSTR 15 /* get instr to invoke PDCE_CHECK() */
115
116#define PDC_PROC 16 /* (sprockets) */
117
118#define PDC_CONFIG 16 /* (sprockets) */
119#define PDC_CONFIG_DECONFIG 0
120#define PDC_CONFIG_DRECONFIG 1
121#define PDC_CONFIG_DRETURN_CONFIG 2
122
123#define PDC_BLOCK_TLB 18 /* manage hardware block-TLB */
124#define PDC_BTLB_INFO 0 /* returns parameter */
125#define PDC_BTLB_INSERT 1 /* insert BTLB entry */
126#define PDC_BTLB_PURGE 2 /* purge BTLB entries */
127#define PDC_BTLB_PURGE_ALL 3 /* purge all BTLB entries */
128
129#define PDC_TLB 19 /* manage hardware TLB miss handling */
130#define PDC_TLB_INFO 0 /* returns parameter */
131#define PDC_TLB_SETUP 1 /* set up miss handling */
132
133#define PDC_MEM 20 /* Manage memory */
134#define PDC_MEM_MEMINFO 0
135#define PDC_MEM_ADD_PAGE 1
136#define PDC_MEM_CLEAR_PDT 2
137#define PDC_MEM_READ_PDT 3
138#define PDC_MEM_RESET_CLEAR 4
139#define PDC_MEM_GOODMEM 5
140#define PDC_MEM_TABLE 128 /* Non contig mem map (sprockets) */
141#define PDC_MEM_RETURN_ADDRESS_TABLE PDC_MEM_TABLE
142#define PDC_MEM_GET_MEMORY_SYSTEM_TABLES_SIZE 131
143#define PDC_MEM_GET_MEMORY_SYSTEM_TABLES 132
144#define PDC_MEM_GET_PHYSICAL_LOCATION_FROM_MEMORY_ADDRESS 133
145
146#define PDC_MEM_RET_SBE_REPLACED 5 /* PDC_MEM return values */
147#define PDC_MEM_RET_DUPLICATE_ENTRY 4
148#define PDC_MEM_RET_BUF_SIZE_SMALL 1
149#define PDC_MEM_RET_PDT_FULL -11
150#define PDC_MEM_RET_INVALID_PHYSICAL_LOCATION ~0ULL
151
152#define PDC_PSW 21 /* Get/Set default System Mask */
153#define PDC_PSW_MASK 0 /* Return mask */
154#define PDC_PSW_GET_DEFAULTS 1 /* Return defaults */
155#define PDC_PSW_SET_DEFAULTS 2 /* Set default */
156#define PDC_PSW_ENDIAN_BIT 1 /* set for big endian */
157#define PDC_PSW_WIDE_BIT 2 /* set for wide mode */
158
159#define PDC_SYSTEM_MAP 22 /* find system modules */
160#define PDC_FIND_MODULE 0
161#define PDC_FIND_ADDRESS 1
162#define PDC_TRANSLATE_PATH 2
163
164#define PDC_SOFT_POWER 23 /* soft power switch */
165#define PDC_SOFT_POWER_INFO 0 /* return info about the soft power switch */
166#define PDC_SOFT_POWER_ENABLE 1 /* enable/disable soft power switch */
167
168
169/* HVERSION dependent */
170
171/* The PDC_MEM_MAP calls */
172#define PDC_MEM_MAP 128 /* on s700: return page info */
173#define PDC_MEM_MAP_HPA 0 /* returns hpa of a module */
174
175#define PDC_EEPROM 129 /* EEPROM access */
176#define PDC_EEPROM_READ_WORD 0
177#define PDC_EEPROM_WRITE_WORD 1
178#define PDC_EEPROM_READ_BYTE 2
179#define PDC_EEPROM_WRITE_BYTE 3
180#define PDC_EEPROM_EEPROM_PASSWORD -1000
181
182#define PDC_NVM 130 /* NVM (non-volatile memory) access */
183#define PDC_NVM_READ_WORD 0
184#define PDC_NVM_WRITE_WORD 1
185#define PDC_NVM_READ_BYTE 2
186#define PDC_NVM_WRITE_BYTE 3
187
188#define PDC_SEED_ERROR 132 /* (sprockets) */
189
190#define PDC_IO 135 /* log error info, reset IO system */
191#define PDC_IO_READ_AND_CLEAR_ERRORS 0
192#define PDC_IO_RESET 1
193#define PDC_IO_RESET_DEVICES 2
194/* sets bits 6&7 (little endian) of the HcControl Register */
195#define PDC_IO_USB_SUSPEND 0xC000000000000000
196#define PDC_IO_EEPROM_IO_ERR_TABLE_FULL -5 /* return value */
197#define PDC_IO_NO_SUSPEND -6 /* return value */
198
199#define PDC_BROADCAST_RESET 136 /* reset all processors */
200#define PDC_DO_RESET 0 /* option: perform a broadcast reset */
201#define PDC_DO_FIRM_TEST_RESET 1 /* Do broadcast reset with bitmap */
202#define PDC_BR_RECONFIGURATION 2 /* reset w/reconfiguration */
203#define PDC_FIRM_TEST_MAGIC 0xab9ec36fUL /* for this reboot only */
204
205#define PDC_LAN_STATION_ID 138 /* Hversion dependent mechanism for */
206#define PDC_LAN_STATION_ID_READ 0 /* getting the lan station address */
207
208#define PDC_LAN_STATION_ID_SIZE 6
209
210#define PDC_CHECK_RANGES 139 /* (sprockets) */
211
212#define PDC_NV_SECTIONS 141 /* (sprockets) */
213
214#define PDC_PERFORMANCE 142 /* performance monitoring */
215
216#define PDC_SYSTEM_INFO 143 /* system information */
217#define PDC_SYSINFO_RETURN_INFO_SIZE 0
218#define PDC_SYSINFO_RRETURN_SYS_INFO 1
219#define PDC_SYSINFO_RRETURN_ERRORS 2
220#define PDC_SYSINFO_RRETURN_WARNINGS 3
221#define PDC_SYSINFO_RETURN_REVISIONS 4
222#define PDC_SYSINFO_RRETURN_DIAGNOSE 5
223#define PDC_SYSINFO_RRETURN_HV_DIAGNOSE 1005
224
225#define PDC_RDR 144 /* (sprockets) */
226#define PDC_RDR_READ_BUFFER 0
227#define PDC_RDR_READ_SINGLE 1
228#define PDC_RDR_WRITE_SINGLE 2
229
230#define PDC_INTRIGUE 145 /* (sprockets) */
231#define PDC_INTRIGUE_WRITE_BUFFER 0
232#define PDC_INTRIGUE_GET_SCRATCH_BUFSIZE 1
233#define PDC_INTRIGUE_START_CPU_COUNTERS 2
234#define PDC_INTRIGUE_STOP_CPU_COUNTERS 3
235
236#define PDC_STI 146 /* STI access */
237/* same as PDC_PCI_XXX values (see below) */
238
239/* Legacy PDC definitions for same stuff */
240#define PDC_PCI_INDEX 147
241#define PDC_PCI_INTERFACE_INFO 0
242#define PDC_PCI_SLOT_INFO 1
243#define PDC_PCI_INFLIGHT_BYTES 2
244#define PDC_PCI_READ_CONFIG 3
245#define PDC_PCI_WRITE_CONFIG 4
246#define PDC_PCI_READ_PCI_IO 5
247#define PDC_PCI_WRITE_PCI_IO 6
248#define PDC_PCI_READ_CONFIG_DELAY 7
249#define PDC_PCI_UPDATE_CONFIG_DELAY 8
250#define PDC_PCI_PCI_PATH_TO_PCI_HPA 9
251#define PDC_PCI_PCI_HPA_TO_PCI_PATH 10
252#define PDC_PCI_PCI_PATH_TO_PCI_BUS 11
253#define PDC_PCI_PCI_RESERVED 12
254#define PDC_PCI_PCI_INT_ROUTE_SIZE 13
255#define PDC_PCI_GET_INT_TBL_SIZE PDC_PCI_PCI_INT_ROUTE_SIZE
256#define PDC_PCI_PCI_INT_ROUTE 14
257#define PDC_PCI_GET_INT_TBL PDC_PCI_PCI_INT_ROUTE
258#define PDC_PCI_READ_MON_TYPE 15
259#define PDC_PCI_WRITE_MON_TYPE 16
260
261
262/* Get SCSI Interface Card info: SDTR, SCSI ID, mode (SE vs LVD) */
263#define PDC_INITIATOR 163
264#define PDC_GET_INITIATOR 0
265#define PDC_SET_INITIATOR 1
266#define PDC_DELETE_INITIATOR 2
267#define PDC_RETURN_TABLE_SIZE 3
268#define PDC_RETURN_TABLE 4
269
270#define PDC_LINK 165 /* (sprockets) */
271#define PDC_LINK_PCI_ENTRY_POINTS 0 /* list (Arg1) = 0 */
272#define PDC_LINK_USB_ENTRY_POINTS 1 /* list (Arg1) = 1 */
273
274/* cl_class
275 * page 3-33 of IO-Firmware ARS
276 * IODC ENTRY_INIT(Search first) RET[1]
277 */
278#define CL_NULL 0 /* invalid */
279#define CL_RANDOM 1 /* random access (as disk) */
280#define CL_SEQU 2 /* sequential access (as tape) */
281#define CL_DUPLEX 7 /* full-duplex point-to-point (RS-232, Net) */
282#define CL_KEYBD 8 /* half-duplex console (HIL Keyboard) */
283#define CL_DISPL 9 /* half-duplex console (display) */
284#define CL_FC 10 /* FiberChannel access media */
285
286/* IODC ENTRY_INIT() */
287#define ENTRY_INIT_SRCH_FRST 2
288#define ENTRY_INIT_SRCH_NEXT 3
289#define ENTRY_INIT_MOD_DEV 4
290#define ENTRY_INIT_DEV 5
291#define ENTRY_INIT_MOD 6
292#define ENTRY_INIT_MSG 9
293
294/* IODC ENTRY_IO() */
295#define ENTRY_IO_BOOTIN 0
296#define ENTRY_IO_BOOTOUT 1
297#define ENTRY_IO_CIN 2
298#define ENTRY_IO_COUT 3
299#define ENTRY_IO_CLOSE 4
300#define ENTRY_IO_GETMSG 9
301#define ENTRY_IO_BBLOCK_IN 16
302#define ENTRY_IO_BBLOCK_OUT 17
303
304/* IODC ENTRY_SPA() */
305
306/* IODC ENTRY_CONFIG() */
307
308/* IODC ENTRY_TEST() */
309
310/* IODC ENTRY_TLB() */
311
312/* constants for OS (NVM...) */
313#define OS_ID_NONE 0 /* Undefined OS ID */
314#define OS_ID_HPUX 1 /* HP-UX OS */
315#define OS_ID_MPEXL 2 /* MPE XL OS */
316#define OS_ID_OSF 3 /* OSF OS */
317#define OS_ID_HPRT 4 /* HP-RT OS */
318#define OS_ID_NOVEL 5 /* NOVELL OS */
319#define OS_ID_LINUX 6 /* Linux */
320
321
322/* constants for PDC_CHASSIS */
323#define OSTAT_OFF 0
324#define OSTAT_FLT 1
325#define OSTAT_TEST 2
326#define OSTAT_INIT 3
327#define OSTAT_SHUT 4
328#define OSTAT_WARN 5
329#define OSTAT_RUN 6
330#define OSTAT_ON 7
331
332/* Page Zero constant offsets used by the HPMC handler */
333#define BOOT_CONSOLE_HPA_OFFSET 0x3c0
334#define BOOT_CONSOLE_SPA_OFFSET 0x3c4
335#define BOOT_CONSOLE_PATH_OFFSET 0x3a8
336
337/* size of the pdc_result buffer for firmware.c */
338#define NUM_PDC_RESULT 32
339
340#if !defined(__ASSEMBLY__)
341
342#include <linux/types.h>
343
344
345/* flags of the device_path */
346#define PF_AUTOBOOT 0x80
347#define PF_AUTOSEARCH 0x40
348#define PF_TIMER 0x0F
349
350struct device_path { /* page 1-69 */
351 unsigned char flags; /* flags see above! */
352 unsigned char bc[6]; /* bus converter routing info */
353 unsigned char mod;
354 unsigned int layers[6];/* device-specific layer-info */
355} __attribute__((aligned(8))) ;
356
357struct pz_device {
358 struct device_path dp; /* see above */
359 /* struct iomod *hpa; */
360 unsigned int hpa; /* HPA base address */
361 /* char *spa; */
362 unsigned int spa; /* SPA base address */
363 /* int (*iodc_io)(struct iomod*, ...); */
364 unsigned int iodc_io; /* device entry point */
365 short pad; /* reserved */
366 unsigned short cl_class;/* see below */
367} __attribute__((aligned(8))) ;
368
369struct zeropage {
370 /* [0x000] initialize vectors (VEC) */
371 unsigned int vec_special; /* must be zero */
372 /* int (*vec_pow_fail)(void);*/
373 unsigned int vec_pow_fail; /* power failure handler */
374 /* int (*vec_toc)(void); */
375 unsigned int vec_toc;
376 unsigned int vec_toclen;
377 /* int (*vec_rendz)(void); */
378 unsigned int vec_rendz;
379 int vec_pow_fail_flen;
380 int vec_pad[10];
381
382 /* [0x040] reserved processor dependent */
383 int pad0[112];
384
385 /* [0x200] reserved */
386 int pad1[84];
387
388 /* [0x350] memory configuration (MC) */
389 int memc_cont; /* contiguous mem size (bytes) */
390 int memc_phsize; /* physical memory size */
391 int memc_adsize; /* additional mem size, bytes of SPA space used by PDC */
392 unsigned int mem_pdc_hi; /* used for 64-bit */
393
394 /* [0x360] various parameters for the boot-CPU */
395 /* unsigned int *mem_booterr[8]; */
396 unsigned int mem_booterr[8]; /* ptr to boot errors */
397 unsigned int mem_free; /* first location, where OS can be loaded */
398 /* struct iomod *mem_hpa; */
399 unsigned int mem_hpa; /* HPA of the boot-CPU */
400 /* int (*mem_pdc)(int, ...); */
401 unsigned int mem_pdc; /* PDC entry point */
402 unsigned int mem_10msec; /* number of clock ticks in 10msec */
403
404 /* [0x390] initial memory module (IMM) */
405 /* struct iomod *imm_hpa; */
406 unsigned int imm_hpa; /* HPA of the IMM */
407 int imm_soft_boot; /* 0 = was hard boot, 1 = was soft boot */
408 unsigned int imm_spa_size; /* SPA size of the IMM in bytes */
409 unsigned int imm_max_mem; /* bytes of mem in IMM */
410
411 /* [0x3A0] boot console, display device and keyboard */
412 struct pz_device mem_cons; /* description of console device */
413 struct pz_device mem_boot; /* description of boot device */
414 struct pz_device mem_kbd; /* description of keyboard device */
415
416 /* [0x430] reserved */
417 int pad430[116];
418
419 /* [0x600] processor dependent */
420 __u32 pad600[1];
421 __u32 proc_sti; /* pointer to STI ROM */
422 __u32 pad608[126];
423};
424
425#endif /* !defined(__ASSEMBLY__) */
426
427#endif /* _UAPI_PARISC_PDC_H */
diff --git a/arch/parisc/include/asm/posix_types.h b/arch/parisc/include/uapi/asm/posix_types.h
index b9344256f76b..b9344256f76b 100644
--- a/arch/parisc/include/asm/posix_types.h
+++ b/arch/parisc/include/uapi/asm/posix_types.h
diff --git a/arch/parisc/include/uapi/asm/ptrace.h b/arch/parisc/include/uapi/asm/ptrace.h
new file mode 100644
index 000000000000..c4fa6c8b9ad9
--- /dev/null
+++ b/arch/parisc/include/uapi/asm/ptrace.h
@@ -0,0 +1,47 @@
1/* written by Philipp Rumpf, Copyright (C) 1999 SuSE GmbH Nuernberg
2** Copyright (C) 2000 Grant Grundler, Hewlett-Packard
3*/
4#ifndef _UAPI_PARISC_PTRACE_H
5#define _UAPI_PARISC_PTRACE_H
6
7
8#include <linux/types.h>
9
10/* This struct defines the way the registers are stored on the
11 * stack during a system call.
12 *
13 * N.B. gdb/strace care about the size and offsets within this
14 * structure. If you change things, you may break object compatibility
15 * for those applications.
16 */
17
18struct pt_regs {
19 unsigned long gr[32]; /* PSW is in gr[0] */
20 __u64 fr[32];
21 unsigned long sr[ 8];
22 unsigned long iasq[2];
23 unsigned long iaoq[2];
24 unsigned long cr27;
25 unsigned long pad0; /* available for other uses */
26 unsigned long orig_r28;
27 unsigned long ksp;
28 unsigned long kpc;
29 unsigned long sar; /* CR11 */
30 unsigned long iir; /* CR19 */
31 unsigned long isr; /* CR20 */
32 unsigned long ior; /* CR21 */
33 unsigned long ipsw; /* CR22 */
34};
35
36/*
37 * The numbers chosen here are somewhat arbitrary but absolutely MUST
38 * not overlap with any of the number assigned in <linux/ptrace.h>.
39 *
40 * These ones are taken from IA-64 on the assumption that theirs are
41 * the most correct (and we also want to support PTRACE_SINGLEBLOCK
42 * since we have taken branch traps too)
43 */
44#define PTRACE_SINGLEBLOCK 12 /* resume execution until next branch */
45
46
47#endif /* _UAPI_PARISC_PTRACE_H */
diff --git a/arch/parisc/include/asm/resource.h b/arch/parisc/include/uapi/asm/resource.h
index 8b06343b62ed..8b06343b62ed 100644
--- a/arch/parisc/include/asm/resource.h
+++ b/arch/parisc/include/uapi/asm/resource.h
diff --git a/arch/parisc/include/asm/sembuf.h b/arch/parisc/include/uapi/asm/sembuf.h
index 1e59ffd3bd1e..1e59ffd3bd1e 100644
--- a/arch/parisc/include/asm/sembuf.h
+++ b/arch/parisc/include/uapi/asm/sembuf.h
diff --git a/arch/parisc/include/asm/setup.h b/arch/parisc/include/uapi/asm/setup.h
index 7da2e5b8747e..7da2e5b8747e 100644
--- a/arch/parisc/include/asm/setup.h
+++ b/arch/parisc/include/uapi/asm/setup.h
diff --git a/arch/parisc/include/asm/shmbuf.h b/arch/parisc/include/uapi/asm/shmbuf.h
index 0a3eada1863b..0a3eada1863b 100644
--- a/arch/parisc/include/asm/shmbuf.h
+++ b/arch/parisc/include/uapi/asm/shmbuf.h
diff --git a/arch/parisc/include/asm/sigcontext.h b/arch/parisc/include/uapi/asm/sigcontext.h
index 27ef31bb3b6e..27ef31bb3b6e 100644
--- a/arch/parisc/include/asm/sigcontext.h
+++ b/arch/parisc/include/uapi/asm/sigcontext.h
diff --git a/arch/parisc/include/asm/siginfo.h b/arch/parisc/include/uapi/asm/siginfo.h
index d7034728f377..d7034728f377 100644
--- a/arch/parisc/include/asm/siginfo.h
+++ b/arch/parisc/include/uapi/asm/siginfo.h
diff --git a/arch/parisc/include/uapi/asm/signal.h b/arch/parisc/include/uapi/asm/signal.h
new file mode 100644
index 000000000000..b1ddaa243376
--- /dev/null
+++ b/arch/parisc/include/uapi/asm/signal.h
@@ -0,0 +1,118 @@
1#ifndef _UAPI_ASM_PARISC_SIGNAL_H
2#define _UAPI_ASM_PARISC_SIGNAL_H
3
4#define SIGHUP 1
5#define SIGINT 2
6#define SIGQUIT 3
7#define SIGILL 4
8#define SIGTRAP 5
9#define SIGABRT 6
10#define SIGIOT 6
11#define SIGEMT 7
12#define SIGFPE 8
13#define SIGKILL 9
14#define SIGBUS 10
15#define SIGSEGV 11
16#define SIGSYS 12 /* Linux doesn't use this */
17#define SIGPIPE 13
18#define SIGALRM 14
19#define SIGTERM 15
20#define SIGUSR1 16
21#define SIGUSR2 17
22#define SIGCHLD 18
23#define SIGPWR 19
24#define SIGVTALRM 20
25#define SIGPROF 21
26#define SIGIO 22
27#define SIGPOLL SIGIO
28#define SIGWINCH 23
29#define SIGSTOP 24
30#define SIGTSTP 25
31#define SIGCONT 26
32#define SIGTTIN 27
33#define SIGTTOU 28
34#define SIGURG 29
35#define SIGLOST 30 /* Linux doesn't use this either */
36#define SIGUNUSED 31
37#define SIGRESERVE SIGUNUSED
38
39#define SIGXCPU 33
40#define SIGXFSZ 34
41#define SIGSTKFLT 36
42
43/* These should not be considered constants from userland. */
44#define SIGRTMIN 37
45#define SIGRTMAX _NSIG /* it's 44 under HP/UX */
46
47/*
48 * SA_FLAGS values:
49 *
50 * SA_ONSTACK indicates that a registered stack_t will be used.
51 * SA_RESTART flag to get restarting signals (which were the default long ago)
52 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
53 * SA_RESETHAND clears the handler when the signal is delivered.
54 * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
55 * SA_NODEFER prevents the current signal from being masked in the handler.
56 *
57 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
58 * Unix names RESETHAND and NODEFER respectively.
59 */
60#define SA_ONSTACK 0x00000001
61#define SA_RESETHAND 0x00000004
62#define SA_NOCLDSTOP 0x00000008
63#define SA_SIGINFO 0x00000010
64#define SA_NODEFER 0x00000020
65#define SA_RESTART 0x00000040
66#define SA_NOCLDWAIT 0x00000080
67#define _SA_SIGGFAULT 0x00000100 /* HPUX */
68
69#define SA_NOMASK SA_NODEFER
70#define SA_ONESHOT SA_RESETHAND
71
72#define SA_RESTORER 0x04000000 /* obsolete -- ignored */
73
74/*
75 * sigaltstack controls
76 */
77#define SS_ONSTACK 1
78#define SS_DISABLE 2
79
80#define MINSIGSTKSZ 2048
81#define SIGSTKSZ 8192
82
83
84#define SIG_BLOCK 0 /* for blocking signals */
85#define SIG_UNBLOCK 1 /* for unblocking signals */
86#define SIG_SETMASK 2 /* for setting the signal mask */
87
88#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
89#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
90#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
91
92# ifndef __ASSEMBLY__
93
94# include <linux/types.h>
95
96/* Avoid too many header ordering problems. */
97struct siginfo;
98
99/* Type of a signal handler. */
100#ifdef CONFIG_64BIT
101/* function pointers on 64-bit parisc are pointers to little structs and the
102 * compiler doesn't support code which changes or tests the address of
103 * the function in the little struct. This is really ugly -PB
104 */
105typedef char __user *__sighandler_t;
106#else
107typedef void __signalfn_t(int);
108typedef __signalfn_t __user *__sighandler_t;
109#endif
110
111typedef struct sigaltstack {
112 void __user *ss_sp;
113 int ss_flags;
114 size_t ss_size;
115} stack_t;
116
117#endif /* !__ASSEMBLY */
118#endif /* _UAPI_ASM_PARISC_SIGNAL_H */
diff --git a/arch/parisc/include/asm/socket.h b/arch/parisc/include/uapi/asm/socket.h
index 1b52c2c31a7a..1b52c2c31a7a 100644
--- a/arch/parisc/include/asm/socket.h
+++ b/arch/parisc/include/uapi/asm/socket.h
diff --git a/arch/parisc/include/asm/sockios.h b/arch/parisc/include/uapi/asm/sockios.h
index dabfbc7483f6..dabfbc7483f6 100644
--- a/arch/parisc/include/asm/sockios.h
+++ b/arch/parisc/include/uapi/asm/sockios.h
diff --git a/arch/parisc/include/asm/stat.h b/arch/parisc/include/uapi/asm/stat.h
index d76fbda5d62c..d76fbda5d62c 100644
--- a/arch/parisc/include/asm/stat.h
+++ b/arch/parisc/include/uapi/asm/stat.h
diff --git a/arch/parisc/include/asm/statfs.h b/arch/parisc/include/uapi/asm/statfs.h
index 324bea905dc6..324bea905dc6 100644
--- a/arch/parisc/include/asm/statfs.h
+++ b/arch/parisc/include/uapi/asm/statfs.h
diff --git a/arch/parisc/include/asm/swab.h b/arch/parisc/include/uapi/asm/swab.h
index e78403b129ef..e78403b129ef 100644
--- a/arch/parisc/include/asm/swab.h
+++ b/arch/parisc/include/uapi/asm/swab.h
diff --git a/arch/parisc/include/asm/termbits.h b/arch/parisc/include/uapi/asm/termbits.h
index d1ab92177a5c..d1ab92177a5c 100644
--- a/arch/parisc/include/asm/termbits.h
+++ b/arch/parisc/include/uapi/asm/termbits.h
diff --git a/arch/parisc/include/uapi/asm/termios.h b/arch/parisc/include/uapi/asm/termios.h
new file mode 100644
index 000000000000..f3377395070d
--- /dev/null
+++ b/arch/parisc/include/uapi/asm/termios.h
@@ -0,0 +1,43 @@
1#ifndef _UAPI_PARISC_TERMIOS_H
2#define _UAPI_PARISC_TERMIOS_H
3
4#include <asm/termbits.h>
5#include <asm/ioctls.h>
6
7struct winsize {
8 unsigned short ws_row;
9 unsigned short ws_col;
10 unsigned short ws_xpixel;
11 unsigned short ws_ypixel;
12};
13
14#define NCC 8
15struct termio {
16 unsigned short c_iflag; /* input mode flags */
17 unsigned short c_oflag; /* output mode flags */
18 unsigned short c_cflag; /* control mode flags */
19 unsigned short c_lflag; /* local mode flags */
20 unsigned char c_line; /* line discipline */
21 unsigned char c_cc[NCC]; /* control characters */
22};
23
24/* modem lines */
25#define TIOCM_LE 0x001
26#define TIOCM_DTR 0x002
27#define TIOCM_RTS 0x004
28#define TIOCM_ST 0x008
29#define TIOCM_SR 0x010
30#define TIOCM_CTS 0x020
31#define TIOCM_CAR 0x040
32#define TIOCM_RNG 0x080
33#define TIOCM_DSR 0x100
34#define TIOCM_CD TIOCM_CAR
35#define TIOCM_RI TIOCM_RNG
36#define TIOCM_OUT1 0x2000
37#define TIOCM_OUT2 0x4000
38#define TIOCM_LOOP 0x8000
39
40/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
41
42
43#endif /* _UAPI_PARISC_TERMIOS_H */
diff --git a/arch/parisc/include/asm/types.h b/arch/parisc/include/uapi/asm/types.h
index 8866f9bbdeaf..8866f9bbdeaf 100644
--- a/arch/parisc/include/asm/types.h
+++ b/arch/parisc/include/uapi/asm/types.h
diff --git a/arch/parisc/include/uapi/asm/unistd.h b/arch/parisc/include/uapi/asm/unistd.h
new file mode 100644
index 000000000000..e178f30f2ccc
--- /dev/null
+++ b/arch/parisc/include/uapi/asm/unistd.h
@@ -0,0 +1,837 @@
1#ifndef _UAPI_ASM_PARISC_UNISTD_H_
2#define _UAPI_ASM_PARISC_UNISTD_H_
3
4/*
5 * This file contains the system call numbers.
6 */
7
8/*
9 * HP-UX system calls get their native numbers for binary compatibility.
10 */
11
12#define __NR_HPUX_exit 1
13#define __NR_HPUX_fork 2
14#define __NR_HPUX_read 3
15#define __NR_HPUX_write 4
16#define __NR_HPUX_open 5
17#define __NR_HPUX_close 6
18#define __NR_HPUX_wait 7
19#define __NR_HPUX_creat 8
20#define __NR_HPUX_link 9
21#define __NR_HPUX_unlink 10
22#define __NR_HPUX_execv 11
23#define __NR_HPUX_chdir 12
24#define __NR_HPUX_time 13
25#define __NR_HPUX_mknod 14
26#define __NR_HPUX_chmod 15
27#define __NR_HPUX_chown 16
28#define __NR_HPUX_break 17
29#define __NR_HPUX_lchmod 18
30#define __NR_HPUX_lseek 19
31#define __NR_HPUX_getpid 20
32#define __NR_HPUX_mount 21
33#define __NR_HPUX_umount 22
34#define __NR_HPUX_setuid 23
35#define __NR_HPUX_getuid 24
36#define __NR_HPUX_stime 25
37#define __NR_HPUX_ptrace 26
38#define __NR_HPUX_alarm 27
39#define __NR_HPUX_oldfstat 28
40#define __NR_HPUX_pause 29
41#define __NR_HPUX_utime 30
42#define __NR_HPUX_stty 31
43#define __NR_HPUX_gtty 32
44#define __NR_HPUX_access 33
45#define __NR_HPUX_nice 34
46#define __NR_HPUX_ftime 35
47#define __NR_HPUX_sync 36
48#define __NR_HPUX_kill 37
49#define __NR_HPUX_stat 38
50#define __NR_HPUX_setpgrp3 39
51#define __NR_HPUX_lstat 40
52#define __NR_HPUX_dup 41
53#define __NR_HPUX_pipe 42
54#define __NR_HPUX_times 43
55#define __NR_HPUX_profil 44
56#define __NR_HPUX_ki_call 45
57#define __NR_HPUX_setgid 46
58#define __NR_HPUX_getgid 47
59#define __NR_HPUX_sigsys 48
60#define __NR_HPUX_reserved1 49
61#define __NR_HPUX_reserved2 50
62#define __NR_HPUX_acct 51
63#define __NR_HPUX_set_userthreadid 52
64#define __NR_HPUX_oldlock 53
65#define __NR_HPUX_ioctl 54
66#define __NR_HPUX_reboot 55
67#define __NR_HPUX_symlink 56
68#define __NR_HPUX_utssys 57
69#define __NR_HPUX_readlink 58
70#define __NR_HPUX_execve 59
71#define __NR_HPUX_umask 60
72#define __NR_HPUX_chroot 61
73#define __NR_HPUX_fcntl 62
74#define __NR_HPUX_ulimit 63
75#define __NR_HPUX_getpagesize 64
76#define __NR_HPUX_mremap 65
77#define __NR_HPUX_vfork 66
78#define __NR_HPUX_vread 67
79#define __NR_HPUX_vwrite 68
80#define __NR_HPUX_sbrk 69
81#define __NR_HPUX_sstk 70
82#define __NR_HPUX_mmap 71
83#define __NR_HPUX_vadvise 72
84#define __NR_HPUX_munmap 73
85#define __NR_HPUX_mprotect 74
86#define __NR_HPUX_madvise 75
87#define __NR_HPUX_vhangup 76
88#define __NR_HPUX_swapoff 77
89#define __NR_HPUX_mincore 78
90#define __NR_HPUX_getgroups 79
91#define __NR_HPUX_setgroups 80
92#define __NR_HPUX_getpgrp2 81
93#define __NR_HPUX_setpgrp2 82
94#define __NR_HPUX_setitimer 83
95#define __NR_HPUX_wait3 84
96#define __NR_HPUX_swapon 85
97#define __NR_HPUX_getitimer 86
98#define __NR_HPUX_gethostname42 87
99#define __NR_HPUX_sethostname42 88
100#define __NR_HPUX_getdtablesize 89
101#define __NR_HPUX_dup2 90
102#define __NR_HPUX_getdopt 91
103#define __NR_HPUX_fstat 92
104#define __NR_HPUX_select 93
105#define __NR_HPUX_setdopt 94
106#define __NR_HPUX_fsync 95
107#define __NR_HPUX_setpriority 96
108#define __NR_HPUX_socket_old 97
109#define __NR_HPUX_connect_old 98
110#define __NR_HPUX_accept_old 99
111#define __NR_HPUX_getpriority 100
112#define __NR_HPUX_send_old 101
113#define __NR_HPUX_recv_old 102
114#define __NR_HPUX_socketaddr_old 103
115#define __NR_HPUX_bind_old 104
116#define __NR_HPUX_setsockopt_old 105
117#define __NR_HPUX_listen_old 106
118#define __NR_HPUX_vtimes_old 107
119#define __NR_HPUX_sigvector 108
120#define __NR_HPUX_sigblock 109
121#define __NR_HPUX_siggetmask 110
122#define __NR_HPUX_sigpause 111
123#define __NR_HPUX_sigstack 112
124#define __NR_HPUX_recvmsg_old 113
125#define __NR_HPUX_sendmsg_old 114
126#define __NR_HPUX_vtrace_old 115
127#define __NR_HPUX_gettimeofday 116
128#define __NR_HPUX_getrusage 117
129#define __NR_HPUX_getsockopt_old 118
130#define __NR_HPUX_resuba_old 119
131#define __NR_HPUX_readv 120
132#define __NR_HPUX_writev 121
133#define __NR_HPUX_settimeofday 122
134#define __NR_HPUX_fchown 123
135#define __NR_HPUX_fchmod 124
136#define __NR_HPUX_recvfrom_old 125
137#define __NR_HPUX_setresuid 126
138#define __NR_HPUX_setresgid 127
139#define __NR_HPUX_rename 128
140#define __NR_HPUX_truncate 129
141#define __NR_HPUX_ftruncate 130
142#define __NR_HPUX_flock_old 131
143#define __NR_HPUX_sysconf 132
144#define __NR_HPUX_sendto_old 133
145#define __NR_HPUX_shutdown_old 134
146#define __NR_HPUX_socketpair_old 135
147#define __NR_HPUX_mkdir 136
148#define __NR_HPUX_rmdir 137
149#define __NR_HPUX_utimes_old 138
150#define __NR_HPUX_sigcleanup_old 139
151#define __NR_HPUX_setcore 140
152#define __NR_HPUX_getpeername_old 141
153#define __NR_HPUX_gethostid 142
154#define __NR_HPUX_sethostid 143
155#define __NR_HPUX_getrlimit 144
156#define __NR_HPUX_setrlimit 145
157#define __NR_HPUX_killpg_old 146
158#define __NR_HPUX_cachectl 147
159#define __NR_HPUX_quotactl 148
160#define __NR_HPUX_get_sysinfo 149
161#define __NR_HPUX_getsockname_old 150
162#define __NR_HPUX_privgrp 151
163#define __NR_HPUX_rtprio 152
164#define __NR_HPUX_plock 153
165#define __NR_HPUX_reserved3 154
166#define __NR_HPUX_lockf 155
167#define __NR_HPUX_semget 156
168#define __NR_HPUX_osemctl 157
169#define __NR_HPUX_semop 158
170#define __NR_HPUX_msgget 159
171#define __NR_HPUX_omsgctl 160
172#define __NR_HPUX_msgsnd 161
173#define __NR_HPUX_msgrecv 162
174#define __NR_HPUX_shmget 163
175#define __NR_HPUX_oshmctl 164
176#define __NR_HPUX_shmat 165
177#define __NR_HPUX_shmdt 166
178#define __NR_HPUX_m68020_advise 167
179/* [168,189] are for Discless/DUX */
180#define __NR_HPUX_csp 168
181#define __NR_HPUX_cluster 169
182#define __NR_HPUX_mkrnod 170
183#define __NR_HPUX_test 171
184#define __NR_HPUX_unsp_open 172
185#define __NR_HPUX_reserved4 173
186#define __NR_HPUX_getcontext_old 174
187#define __NR_HPUX_osetcontext 175
188#define __NR_HPUX_bigio 176
189#define __NR_HPUX_pipenode 177
190#define __NR_HPUX_lsync 178
191#define __NR_HPUX_getmachineid 179
192#define __NR_HPUX_cnodeid 180
193#define __NR_HPUX_cnodes 181
194#define __NR_HPUX_swapclients 182
195#define __NR_HPUX_rmt_process 183
196#define __NR_HPUX_dskless_stats 184
197#define __NR_HPUX_sigprocmask 185
198#define __NR_HPUX_sigpending 186
199#define __NR_HPUX_sigsuspend 187
200#define __NR_HPUX_sigaction 188
201#define __NR_HPUX_reserved5 189
202#define __NR_HPUX_nfssvc 190
203#define __NR_HPUX_getfh 191
204#define __NR_HPUX_getdomainname 192
205#define __NR_HPUX_setdomainname 193
206#define __NR_HPUX_async_daemon 194
207#define __NR_HPUX_getdirentries 195
208#define __NR_HPUX_statfs 196
209#define __NR_HPUX_fstatfs 197
210#define __NR_HPUX_vfsmount 198
211#define __NR_HPUX_reserved6 199
212#define __NR_HPUX_waitpid 200
213/* 201 - 223 missing */
214#define __NR_HPUX_sigsetreturn 224
215#define __NR_HPUX_sigsetstatemask 225
216/* 226 missing */
217#define __NR_HPUX_cs 227
218#define __NR_HPUX_cds 228
219#define __NR_HPUX_set_no_trunc 229
220#define __NR_HPUX_pathconf 230
221#define __NR_HPUX_fpathconf 231
222/* 232, 233 missing */
223#define __NR_HPUX_nfs_fcntl 234
224#define __NR_HPUX_ogetacl 235
225#define __NR_HPUX_ofgetacl 236
226#define __NR_HPUX_osetacl 237
227#define __NR_HPUX_ofsetacl 238
228#define __NR_HPUX_pstat 239
229#define __NR_HPUX_getaudid 240
230#define __NR_HPUX_setaudid 241
231#define __NR_HPUX_getaudproc 242
232#define __NR_HPUX_setaudproc 243
233#define __NR_HPUX_getevent 244
234#define __NR_HPUX_setevent 245
235#define __NR_HPUX_audwrite 246
236#define __NR_HPUX_audswitch 247
237#define __NR_HPUX_audctl 248
238#define __NR_HPUX_ogetaccess 249
239#define __NR_HPUX_fsctl 250
240/* 251 - 258 missing */
241#define __NR_HPUX_swapfs 259
242#define __NR_HPUX_fss 260
243/* 261 - 266 missing */
244#define __NR_HPUX_tsync 267
245#define __NR_HPUX_getnumfds 268
246#define __NR_HPUX_poll 269
247#define __NR_HPUX_getmsg 270
248#define __NR_HPUX_putmsg 271
249#define __NR_HPUX_fchdir 272
250#define __NR_HPUX_getmount_cnt 273
251#define __NR_HPUX_getmount_entry 274
252#define __NR_HPUX_accept 275
253#define __NR_HPUX_bind 276
254#define __NR_HPUX_connect 277
255#define __NR_HPUX_getpeername 278
256#define __NR_HPUX_getsockname 279
257#define __NR_HPUX_getsockopt 280
258#define __NR_HPUX_listen 281
259#define __NR_HPUX_recv 282
260#define __NR_HPUX_recvfrom 283
261#define __NR_HPUX_recvmsg 284
262#define __NR_HPUX_send 285
263#define __NR_HPUX_sendmsg 286
264#define __NR_HPUX_sendto 287
265#define __NR_HPUX_setsockopt 288
266#define __NR_HPUX_shutdown 289
267#define __NR_HPUX_socket 290
268#define __NR_HPUX_socketpair 291
269#define __NR_HPUX_proc_open 292
270#define __NR_HPUX_proc_close 293
271#define __NR_HPUX_proc_send 294
272#define __NR_HPUX_proc_recv 295
273#define __NR_HPUX_proc_sendrecv 296
274#define __NR_HPUX_proc_syscall 297
275/* 298 - 311 missing */
276#define __NR_HPUX_semctl 312
277#define __NR_HPUX_msgctl 313
278#define __NR_HPUX_shmctl 314
279#define __NR_HPUX_mpctl 315
280#define __NR_HPUX_exportfs 316
281#define __NR_HPUX_getpmsg 317
282#define __NR_HPUX_putpmsg 318
283/* 319 missing */
284#define __NR_HPUX_msync 320
285#define __NR_HPUX_msleep 321
286#define __NR_HPUX_mwakeup 322
287#define __NR_HPUX_msem_init 323
288#define __NR_HPUX_msem_remove 324
289#define __NR_HPUX_adjtime 325
290#define __NR_HPUX_kload 326
291#define __NR_HPUX_fattach 327
292#define __NR_HPUX_fdetach 328
293#define __NR_HPUX_serialize 329
294#define __NR_HPUX_statvfs 330
295#define __NR_HPUX_fstatvfs 331
296#define __NR_HPUX_lchown 332
297#define __NR_HPUX_getsid 333
298#define __NR_HPUX_sysfs 334
299/* 335, 336 missing */
300#define __NR_HPUX_sched_setparam 337
301#define __NR_HPUX_sched_getparam 338
302#define __NR_HPUX_sched_setscheduler 339
303#define __NR_HPUX_sched_getscheduler 340
304#define __NR_HPUX_sched_yield 341
305#define __NR_HPUX_sched_get_priority_max 342
306#define __NR_HPUX_sched_get_priority_min 343
307#define __NR_HPUX_sched_rr_get_interval 344
308#define __NR_HPUX_clock_settime 345
309#define __NR_HPUX_clock_gettime 346
310#define __NR_HPUX_clock_getres 347
311#define __NR_HPUX_timer_create 348
312#define __NR_HPUX_timer_delete 349
313#define __NR_HPUX_timer_settime 350
314#define __NR_HPUX_timer_gettime 351
315#define __NR_HPUX_timer_getoverrun 352
316#define __NR_HPUX_nanosleep 353
317#define __NR_HPUX_toolbox 354
318/* 355 missing */
319#define __NR_HPUX_getdents 356
320#define __NR_HPUX_getcontext 357
321#define __NR_HPUX_sysinfo 358
322#define __NR_HPUX_fcntl64 359
323#define __NR_HPUX_ftruncate64 360
324#define __NR_HPUX_fstat64 361
325#define __NR_HPUX_getdirentries64 362
326#define __NR_HPUX_getrlimit64 363
327#define __NR_HPUX_lockf64 364
328#define __NR_HPUX_lseek64 365
329#define __NR_HPUX_lstat64 366
330#define __NR_HPUX_mmap64 367
331#define __NR_HPUX_setrlimit64 368
332#define __NR_HPUX_stat64 369
333#define __NR_HPUX_truncate64 370
334#define __NR_HPUX_ulimit64 371
335#define __NR_HPUX_pread 372
336#define __NR_HPUX_preadv 373
337#define __NR_HPUX_pwrite 374
338#define __NR_HPUX_pwritev 375
339#define __NR_HPUX_pread64 376
340#define __NR_HPUX_preadv64 377
341#define __NR_HPUX_pwrite64 378
342#define __NR_HPUX_pwritev64 379
343#define __NR_HPUX_setcontext 380
344#define __NR_HPUX_sigaltstack 381
345#define __NR_HPUX_waitid 382
346#define __NR_HPUX_setpgrp 383
347#define __NR_HPUX_recvmsg2 384
348#define __NR_HPUX_sendmsg2 385
349#define __NR_HPUX_socket2 386
350#define __NR_HPUX_socketpair2 387
351#define __NR_HPUX_setregid 388
352#define __NR_HPUX_lwp_create 389
353#define __NR_HPUX_lwp_terminate 390
354#define __NR_HPUX_lwp_wait 391
355#define __NR_HPUX_lwp_suspend 392
356#define __NR_HPUX_lwp_resume 393
357/* 394 missing */
358#define __NR_HPUX_lwp_abort_syscall 395
359#define __NR_HPUX_lwp_info 396
360#define __NR_HPUX_lwp_kill 397
361#define __NR_HPUX_ksleep 398
362#define __NR_HPUX_kwakeup 399
363/* 400 missing */
364#define __NR_HPUX_pstat_getlwp 401
365#define __NR_HPUX_lwp_exit 402
366#define __NR_HPUX_lwp_continue 403
367#define __NR_HPUX_getacl 404
368#define __NR_HPUX_fgetacl 405
369#define __NR_HPUX_setacl 406
370#define __NR_HPUX_fsetacl 407
371#define __NR_HPUX_getaccess 408
372#define __NR_HPUX_lwp_mutex_init 409
373#define __NR_HPUX_lwp_mutex_lock_sys 410
374#define __NR_HPUX_lwp_mutex_unlock 411
375#define __NR_HPUX_lwp_cond_init 412
376#define __NR_HPUX_lwp_cond_signal 413
377#define __NR_HPUX_lwp_cond_broadcast 414
378#define __NR_HPUX_lwp_cond_wait_sys 415
379#define __NR_HPUX_lwp_getscheduler 416
380#define __NR_HPUX_lwp_setscheduler 417
381#define __NR_HPUX_lwp_getstate 418
382#define __NR_HPUX_lwp_setstate 419
383#define __NR_HPUX_lwp_detach 420
384#define __NR_HPUX_mlock 421
385#define __NR_HPUX_munlock 422
386#define __NR_HPUX_mlockall 423
387#define __NR_HPUX_munlockall 424
388#define __NR_HPUX_shm_open 425
389#define __NR_HPUX_shm_unlink 426
390#define __NR_HPUX_sigqueue 427
391#define __NR_HPUX_sigwaitinfo 428
392#define __NR_HPUX_sigtimedwait 429
393#define __NR_HPUX_sigwait 430
394#define __NR_HPUX_aio_read 431
395#define __NR_HPUX_aio_write 432
396#define __NR_HPUX_lio_listio 433
397#define __NR_HPUX_aio_error 434
398#define __NR_HPUX_aio_return 435
399#define __NR_HPUX_aio_cancel 436
400#define __NR_HPUX_aio_suspend 437
401#define __NR_HPUX_aio_fsync 438
402#define __NR_HPUX_mq_open 439
403#define __NR_HPUX_mq_close 440
404#define __NR_HPUX_mq_unlink 441
405#define __NR_HPUX_mq_send 442
406#define __NR_HPUX_mq_receive 443
407#define __NR_HPUX_mq_notify 444
408#define __NR_HPUX_mq_setattr 445
409#define __NR_HPUX_mq_getattr 446
410#define __NR_HPUX_ksem_open 447
411#define __NR_HPUX_ksem_unlink 448
412#define __NR_HPUX_ksem_close 449
413#define __NR_HPUX_ksem_post 450
414#define __NR_HPUX_ksem_wait 451
415#define __NR_HPUX_ksem_read 452
416#define __NR_HPUX_ksem_trywait 453
417#define __NR_HPUX_lwp_rwlock_init 454
418#define __NR_HPUX_lwp_rwlock_destroy 455
419#define __NR_HPUX_lwp_rwlock_rdlock_sys 456
420#define __NR_HPUX_lwp_rwlock_wrlock_sys 457
421#define __NR_HPUX_lwp_rwlock_tryrdlock 458
422#define __NR_HPUX_lwp_rwlock_trywrlock 459
423#define __NR_HPUX_lwp_rwlock_unlock 460
424#define __NR_HPUX_ttrace 461
425#define __NR_HPUX_ttrace_wait 462
426#define __NR_HPUX_lf_wire_mem 463
427#define __NR_HPUX_lf_unwire_mem 464
428#define __NR_HPUX_lf_send_pin_map 465
429#define __NR_HPUX_lf_free_buf 466
430#define __NR_HPUX_lf_wait_nq 467
431#define __NR_HPUX_lf_wakeup_conn_q 468
432#define __NR_HPUX_lf_unused 469
433#define __NR_HPUX_lwp_sema_init 470
434#define __NR_HPUX_lwp_sema_post 471
435#define __NR_HPUX_lwp_sema_wait 472
436#define __NR_HPUX_lwp_sema_trywait 473
437#define __NR_HPUX_lwp_sema_destroy 474
438#define __NR_HPUX_statvfs64 475
439#define __NR_HPUX_fstatvfs64 476
440#define __NR_HPUX_msh_register 477
441#define __NR_HPUX_ptrace64 478
442#define __NR_HPUX_sendfile 479
443#define __NR_HPUX_sendpath 480
444#define __NR_HPUX_sendfile64 481
445#define __NR_HPUX_sendpath64 482
446#define __NR_HPUX_modload 483
447#define __NR_HPUX_moduload 484
448#define __NR_HPUX_modpath 485
449#define __NR_HPUX_getksym 486
450#define __NR_HPUX_modadm 487
451#define __NR_HPUX_modstat 488
452#define __NR_HPUX_lwp_detached_exit 489
453#define __NR_HPUX_crashconf 490
454#define __NR_HPUX_siginhibit 491
455#define __NR_HPUX_sigenable 492
456#define __NR_HPUX_spuctl 493
457#define __NR_HPUX_zerokernelsum 494
458#define __NR_HPUX_nfs_kstat 495
459#define __NR_HPUX_aio_read64 496
460#define __NR_HPUX_aio_write64 497
461#define __NR_HPUX_aio_error64 498
462#define __NR_HPUX_aio_return64 499
463#define __NR_HPUX_aio_cancel64 500
464#define __NR_HPUX_aio_suspend64 501
465#define __NR_HPUX_aio_fsync64 502
466#define __NR_HPUX_lio_listio64 503
467#define __NR_HPUX_recv2 504
468#define __NR_HPUX_recvfrom2 505
469#define __NR_HPUX_send2 506
470#define __NR_HPUX_sendto2 507
471#define __NR_HPUX_acl 508
472#define __NR_HPUX___cnx_p2p_ctl 509
473#define __NR_HPUX___cnx_gsched_ctl 510
474#define __NR_HPUX___cnx_pmon_ctl 511
475
476#define __NR_HPUX_syscalls 512
477
478/*
479 * Linux system call numbers.
480 *
481 * Cary Coutant says that we should just use another syscall gateway
482 * page to avoid clashing with the HPUX space, and I think he's right:
483 * it will would keep a branch out of our syscall entry path, at the
484 * very least. If we decide to change it later, we can ``just'' tweak
485 * the LINUX_GATEWAY_ADDR define at the bottom and make __NR_Linux be
486 * 1024 or something. Oh, and recompile libc. =)
487 *
488 * 64-bit HPUX binaries get the syscall gateway address passed in a register
489 * from the kernel at startup, which seems a sane strategy.
490 */
491
492#define __NR_Linux 0
493#define __NR_restart_syscall (__NR_Linux + 0)
494#define __NR_exit (__NR_Linux + 1)
495#define __NR_fork (__NR_Linux + 2)
496#define __NR_read (__NR_Linux + 3)
497#define __NR_write (__NR_Linux + 4)
498#define __NR_open (__NR_Linux + 5)
499#define __NR_close (__NR_Linux + 6)
500#define __NR_waitpid (__NR_Linux + 7)
501#define __NR_creat (__NR_Linux + 8)
502#define __NR_link (__NR_Linux + 9)
503#define __NR_unlink (__NR_Linux + 10)
504#define __NR_execve (__NR_Linux + 11)
505#define __NR_chdir (__NR_Linux + 12)
506#define __NR_time (__NR_Linux + 13)
507#define __NR_mknod (__NR_Linux + 14)
508#define __NR_chmod (__NR_Linux + 15)
509#define __NR_lchown (__NR_Linux + 16)
510#define __NR_socket (__NR_Linux + 17)
511#define __NR_stat (__NR_Linux + 18)
512#define __NR_lseek (__NR_Linux + 19)
513#define __NR_getpid (__NR_Linux + 20)
514#define __NR_mount (__NR_Linux + 21)
515#define __NR_bind (__NR_Linux + 22)
516#define __NR_setuid (__NR_Linux + 23)
517#define __NR_getuid (__NR_Linux + 24)
518#define __NR_stime (__NR_Linux + 25)
519#define __NR_ptrace (__NR_Linux + 26)
520#define __NR_alarm (__NR_Linux + 27)
521#define __NR_fstat (__NR_Linux + 28)
522#define __NR_pause (__NR_Linux + 29)
523#define __NR_utime (__NR_Linux + 30)
524#define __NR_connect (__NR_Linux + 31)
525#define __NR_listen (__NR_Linux + 32)
526#define __NR_access (__NR_Linux + 33)
527#define __NR_nice (__NR_Linux + 34)
528#define __NR_accept (__NR_Linux + 35)
529#define __NR_sync (__NR_Linux + 36)
530#define __NR_kill (__NR_Linux + 37)
531#define __NR_rename (__NR_Linux + 38)
532#define __NR_mkdir (__NR_Linux + 39)
533#define __NR_rmdir (__NR_Linux + 40)
534#define __NR_dup (__NR_Linux + 41)
535#define __NR_pipe (__NR_Linux + 42)
536#define __NR_times (__NR_Linux + 43)
537#define __NR_getsockname (__NR_Linux + 44)
538#define __NR_brk (__NR_Linux + 45)
539#define __NR_setgid (__NR_Linux + 46)
540#define __NR_getgid (__NR_Linux + 47)
541#define __NR_signal (__NR_Linux + 48)
542#define __NR_geteuid (__NR_Linux + 49)
543#define __NR_getegid (__NR_Linux + 50)
544#define __NR_acct (__NR_Linux + 51)
545#define __NR_umount2 (__NR_Linux + 52)
546#define __NR_getpeername (__NR_Linux + 53)
547#define __NR_ioctl (__NR_Linux + 54)
548#define __NR_fcntl (__NR_Linux + 55)
549#define __NR_socketpair (__NR_Linux + 56)
550#define __NR_setpgid (__NR_Linux + 57)
551#define __NR_send (__NR_Linux + 58)
552#define __NR_uname (__NR_Linux + 59)
553#define __NR_umask (__NR_Linux + 60)
554#define __NR_chroot (__NR_Linux + 61)
555#define __NR_ustat (__NR_Linux + 62)
556#define __NR_dup2 (__NR_Linux + 63)
557#define __NR_getppid (__NR_Linux + 64)
558#define __NR_getpgrp (__NR_Linux + 65)
559#define __NR_setsid (__NR_Linux + 66)
560#define __NR_pivot_root (__NR_Linux + 67)
561#define __NR_sgetmask (__NR_Linux + 68)
562#define __NR_ssetmask (__NR_Linux + 69)
563#define __NR_setreuid (__NR_Linux + 70)
564#define __NR_setregid (__NR_Linux + 71)
565#define __NR_mincore (__NR_Linux + 72)
566#define __NR_sigpending (__NR_Linux + 73)
567#define __NR_sethostname (__NR_Linux + 74)
568#define __NR_setrlimit (__NR_Linux + 75)
569#define __NR_getrlimit (__NR_Linux + 76)
570#define __NR_getrusage (__NR_Linux + 77)
571#define __NR_gettimeofday (__NR_Linux + 78)
572#define __NR_settimeofday (__NR_Linux + 79)
573#define __NR_getgroups (__NR_Linux + 80)
574#define __NR_setgroups (__NR_Linux + 81)
575#define __NR_sendto (__NR_Linux + 82)
576#define __NR_symlink (__NR_Linux + 83)
577#define __NR_lstat (__NR_Linux + 84)
578#define __NR_readlink (__NR_Linux + 85)
579#define __NR_uselib (__NR_Linux + 86)
580#define __NR_swapon (__NR_Linux + 87)
581#define __NR_reboot (__NR_Linux + 88)
582#define __NR_mmap2 (__NR_Linux + 89)
583#define __NR_mmap (__NR_Linux + 90)
584#define __NR_munmap (__NR_Linux + 91)
585#define __NR_truncate (__NR_Linux + 92)
586#define __NR_ftruncate (__NR_Linux + 93)
587#define __NR_fchmod (__NR_Linux + 94)
588#define __NR_fchown (__NR_Linux + 95)
589#define __NR_getpriority (__NR_Linux + 96)
590#define __NR_setpriority (__NR_Linux + 97)
591#define __NR_recv (__NR_Linux + 98)
592#define __NR_statfs (__NR_Linux + 99)
593#define __NR_fstatfs (__NR_Linux + 100)
594#define __NR_stat64 (__NR_Linux + 101)
595/* #define __NR_socketcall (__NR_Linux + 102) */
596#define __NR_syslog (__NR_Linux + 103)
597#define __NR_setitimer (__NR_Linux + 104)
598#define __NR_getitimer (__NR_Linux + 105)
599#define __NR_capget (__NR_Linux + 106)
600#define __NR_capset (__NR_Linux + 107)
601#define __NR_pread64 (__NR_Linux + 108)
602#define __NR_pwrite64 (__NR_Linux + 109)
603#define __NR_getcwd (__NR_Linux + 110)
604#define __NR_vhangup (__NR_Linux + 111)
605#define __NR_fstat64 (__NR_Linux + 112)
606#define __NR_vfork (__NR_Linux + 113)
607#define __NR_wait4 (__NR_Linux + 114)
608#define __NR_swapoff (__NR_Linux + 115)
609#define __NR_sysinfo (__NR_Linux + 116)
610#define __NR_shutdown (__NR_Linux + 117)
611#define __NR_fsync (__NR_Linux + 118)
612#define __NR_madvise (__NR_Linux + 119)
613#define __NR_clone (__NR_Linux + 120)
614#define __NR_setdomainname (__NR_Linux + 121)
615#define __NR_sendfile (__NR_Linux + 122)
616#define __NR_recvfrom (__NR_Linux + 123)
617#define __NR_adjtimex (__NR_Linux + 124)
618#define __NR_mprotect (__NR_Linux + 125)
619#define __NR_sigprocmask (__NR_Linux + 126)
620#define __NR_create_module (__NR_Linux + 127)
621#define __NR_init_module (__NR_Linux + 128)
622#define __NR_delete_module (__NR_Linux + 129)
623#define __NR_get_kernel_syms (__NR_Linux + 130)
624#define __NR_quotactl (__NR_Linux + 131)
625#define __NR_getpgid (__NR_Linux + 132)
626#define __NR_fchdir (__NR_Linux + 133)
627#define __NR_bdflush (__NR_Linux + 134)
628#define __NR_sysfs (__NR_Linux + 135)
629#define __NR_personality (__NR_Linux + 136)
630#define __NR_afs_syscall (__NR_Linux + 137) /* Syscall for Andrew File System */
631#define __NR_setfsuid (__NR_Linux + 138)
632#define __NR_setfsgid (__NR_Linux + 139)
633#define __NR__llseek (__NR_Linux + 140)
634#define __NR_getdents (__NR_Linux + 141)
635#define __NR__newselect (__NR_Linux + 142)
636#define __NR_flock (__NR_Linux + 143)
637#define __NR_msync (__NR_Linux + 144)
638#define __NR_readv (__NR_Linux + 145)
639#define __NR_writev (__NR_Linux + 146)
640#define __NR_getsid (__NR_Linux + 147)
641#define __NR_fdatasync (__NR_Linux + 148)
642#define __NR__sysctl (__NR_Linux + 149)
643#define __NR_mlock (__NR_Linux + 150)
644#define __NR_munlock (__NR_Linux + 151)
645#define __NR_mlockall (__NR_Linux + 152)
646#define __NR_munlockall (__NR_Linux + 153)
647#define __NR_sched_setparam (__NR_Linux + 154)
648#define __NR_sched_getparam (__NR_Linux + 155)
649#define __NR_sched_setscheduler (__NR_Linux + 156)
650#define __NR_sched_getscheduler (__NR_Linux + 157)
651#define __NR_sched_yield (__NR_Linux + 158)
652#define __NR_sched_get_priority_max (__NR_Linux + 159)
653#define __NR_sched_get_priority_min (__NR_Linux + 160)
654#define __NR_sched_rr_get_interval (__NR_Linux + 161)
655#define __NR_nanosleep (__NR_Linux + 162)
656#define __NR_mremap (__NR_Linux + 163)
657#define __NR_setresuid (__NR_Linux + 164)
658#define __NR_getresuid (__NR_Linux + 165)
659#define __NR_sigaltstack (__NR_Linux + 166)
660#define __NR_query_module (__NR_Linux + 167)
661#define __NR_poll (__NR_Linux + 168)
662#define __NR_nfsservctl (__NR_Linux + 169)
663#define __NR_setresgid (__NR_Linux + 170)
664#define __NR_getresgid (__NR_Linux + 171)
665#define __NR_prctl (__NR_Linux + 172)
666#define __NR_rt_sigreturn (__NR_Linux + 173)
667#define __NR_rt_sigaction (__NR_Linux + 174)
668#define __NR_rt_sigprocmask (__NR_Linux + 175)
669#define __NR_rt_sigpending (__NR_Linux + 176)
670#define __NR_rt_sigtimedwait (__NR_Linux + 177)
671#define __NR_rt_sigqueueinfo (__NR_Linux + 178)
672#define __NR_rt_sigsuspend (__NR_Linux + 179)
673#define __NR_chown (__NR_Linux + 180)
674#define __NR_setsockopt (__NR_Linux + 181)
675#define __NR_getsockopt (__NR_Linux + 182)
676#define __NR_sendmsg (__NR_Linux + 183)
677#define __NR_recvmsg (__NR_Linux + 184)
678#define __NR_semop (__NR_Linux + 185)
679#define __NR_semget (__NR_Linux + 186)
680#define __NR_semctl (__NR_Linux + 187)
681#define __NR_msgsnd (__NR_Linux + 188)
682#define __NR_msgrcv (__NR_Linux + 189)
683#define __NR_msgget (__NR_Linux + 190)
684#define __NR_msgctl (__NR_Linux + 191)
685#define __NR_shmat (__NR_Linux + 192)
686#define __NR_shmdt (__NR_Linux + 193)
687#define __NR_shmget (__NR_Linux + 194)
688#define __NR_shmctl (__NR_Linux + 195)
689
690#define __NR_getpmsg (__NR_Linux + 196) /* Somebody *wants* streams? */
691#define __NR_putpmsg (__NR_Linux + 197)
692
693#define __NR_lstat64 (__NR_Linux + 198)
694#define __NR_truncate64 (__NR_Linux + 199)
695#define __NR_ftruncate64 (__NR_Linux + 200)
696#define __NR_getdents64 (__NR_Linux + 201)
697#define __NR_fcntl64 (__NR_Linux + 202)
698#define __NR_attrctl (__NR_Linux + 203)
699#define __NR_acl_get (__NR_Linux + 204)
700#define __NR_acl_set (__NR_Linux + 205)
701#define __NR_gettid (__NR_Linux + 206)
702#define __NR_readahead (__NR_Linux + 207)
703#define __NR_tkill (__NR_Linux + 208)
704#define __NR_sendfile64 (__NR_Linux + 209)
705#define __NR_futex (__NR_Linux + 210)
706#define __NR_sched_setaffinity (__NR_Linux + 211)
707#define __NR_sched_getaffinity (__NR_Linux + 212)
708#define __NR_set_thread_area (__NR_Linux + 213)
709#define __NR_get_thread_area (__NR_Linux + 214)
710#define __NR_io_setup (__NR_Linux + 215)
711#define __NR_io_destroy (__NR_Linux + 216)
712#define __NR_io_getevents (__NR_Linux + 217)
713#define __NR_io_submit (__NR_Linux + 218)
714#define __NR_io_cancel (__NR_Linux + 219)
715#define __NR_alloc_hugepages (__NR_Linux + 220)
716#define __NR_free_hugepages (__NR_Linux + 221)
717#define __NR_exit_group (__NR_Linux + 222)
718#define __NR_lookup_dcookie (__NR_Linux + 223)
719#define __NR_epoll_create (__NR_Linux + 224)
720#define __NR_epoll_ctl (__NR_Linux + 225)
721#define __NR_epoll_wait (__NR_Linux + 226)
722#define __NR_remap_file_pages (__NR_Linux + 227)
723#define __NR_semtimedop (__NR_Linux + 228)
724#define __NR_mq_open (__NR_Linux + 229)
725#define __NR_mq_unlink (__NR_Linux + 230)
726#define __NR_mq_timedsend (__NR_Linux + 231)
727#define __NR_mq_timedreceive (__NR_Linux + 232)
728#define __NR_mq_notify (__NR_Linux + 233)
729#define __NR_mq_getsetattr (__NR_Linux + 234)
730#define __NR_waitid (__NR_Linux + 235)
731#define __NR_fadvise64_64 (__NR_Linux + 236)
732#define __NR_set_tid_address (__NR_Linux + 237)
733#define __NR_setxattr (__NR_Linux + 238)
734#define __NR_lsetxattr (__NR_Linux + 239)
735#define __NR_fsetxattr (__NR_Linux + 240)
736#define __NR_getxattr (__NR_Linux + 241)
737#define __NR_lgetxattr (__NR_Linux + 242)
738#define __NR_fgetxattr (__NR_Linux + 243)
739#define __NR_listxattr (__NR_Linux + 244)
740#define __NR_llistxattr (__NR_Linux + 245)
741#define __NR_flistxattr (__NR_Linux + 246)
742#define __NR_removexattr (__NR_Linux + 247)
743#define __NR_lremovexattr (__NR_Linux + 248)
744#define __NR_fremovexattr (__NR_Linux + 249)
745#define __NR_timer_create (__NR_Linux + 250)
746#define __NR_timer_settime (__NR_Linux + 251)
747#define __NR_timer_gettime (__NR_Linux + 252)
748#define __NR_timer_getoverrun (__NR_Linux + 253)
749#define __NR_timer_delete (__NR_Linux + 254)
750#define __NR_clock_settime (__NR_Linux + 255)
751#define __NR_clock_gettime (__NR_Linux + 256)
752#define __NR_clock_getres (__NR_Linux + 257)
753#define __NR_clock_nanosleep (__NR_Linux + 258)
754#define __NR_tgkill (__NR_Linux + 259)
755#define __NR_mbind (__NR_Linux + 260)
756#define __NR_get_mempolicy (__NR_Linux + 261)
757#define __NR_set_mempolicy (__NR_Linux + 262)
758#define __NR_vserver (__NR_Linux + 263)
759#define __NR_add_key (__NR_Linux + 264)
760#define __NR_request_key (__NR_Linux + 265)
761#define __NR_keyctl (__NR_Linux + 266)
762#define __NR_ioprio_set (__NR_Linux + 267)
763#define __NR_ioprio_get (__NR_Linux + 268)
764#define __NR_inotify_init (__NR_Linux + 269)
765#define __NR_inotify_add_watch (__NR_Linux + 270)
766#define __NR_inotify_rm_watch (__NR_Linux + 271)
767#define __NR_migrate_pages (__NR_Linux + 272)
768#define __NR_pselect6 (__NR_Linux + 273)
769#define __NR_ppoll (__NR_Linux + 274)
770#define __NR_openat (__NR_Linux + 275)
771#define __NR_mkdirat (__NR_Linux + 276)
772#define __NR_mknodat (__NR_Linux + 277)
773#define __NR_fchownat (__NR_Linux + 278)
774#define __NR_futimesat (__NR_Linux + 279)
775#define __NR_fstatat64 (__NR_Linux + 280)
776#define __NR_unlinkat (__NR_Linux + 281)
777#define __NR_renameat (__NR_Linux + 282)
778#define __NR_linkat (__NR_Linux + 283)
779#define __NR_symlinkat (__NR_Linux + 284)
780#define __NR_readlinkat (__NR_Linux + 285)
781#define __NR_fchmodat (__NR_Linux + 286)
782#define __NR_faccessat (__NR_Linux + 287)
783#define __NR_unshare (__NR_Linux + 288)
784#define __NR_set_robust_list (__NR_Linux + 289)
785#define __NR_get_robust_list (__NR_Linux + 290)
786#define __NR_splice (__NR_Linux + 291)
787#define __NR_sync_file_range (__NR_Linux + 292)
788#define __NR_tee (__NR_Linux + 293)
789#define __NR_vmsplice (__NR_Linux + 294)
790#define __NR_move_pages (__NR_Linux + 295)
791#define __NR_getcpu (__NR_Linux + 296)
792#define __NR_epoll_pwait (__NR_Linux + 297)
793#define __NR_statfs64 (__NR_Linux + 298)
794#define __NR_fstatfs64 (__NR_Linux + 299)
795#define __NR_kexec_load (__NR_Linux + 300)
796#define __NR_utimensat (__NR_Linux + 301)
797#define __NR_signalfd (__NR_Linux + 302)
798#define __NR_timerfd (__NR_Linux + 303)
799#define __NR_eventfd (__NR_Linux + 304)
800#define __NR_fallocate (__NR_Linux + 305)
801#define __NR_timerfd_create (__NR_Linux + 306)
802#define __NR_timerfd_settime (__NR_Linux + 307)
803#define __NR_timerfd_gettime (__NR_Linux + 308)
804#define __NR_signalfd4 (__NR_Linux + 309)
805#define __NR_eventfd2 (__NR_Linux + 310)
806#define __NR_epoll_create1 (__NR_Linux + 311)
807#define __NR_dup3 (__NR_Linux + 312)
808#define __NR_pipe2 (__NR_Linux + 313)
809#define __NR_inotify_init1 (__NR_Linux + 314)
810#define __NR_preadv (__NR_Linux + 315)
811#define __NR_pwritev (__NR_Linux + 316)
812#define __NR_rt_tgsigqueueinfo (__NR_Linux + 317)
813#define __NR_perf_event_open (__NR_Linux + 318)
814#define __NR_recvmmsg (__NR_Linux + 319)
815#define __NR_accept4 (__NR_Linux + 320)
816#define __NR_prlimit64 (__NR_Linux + 321)
817#define __NR_fanotify_init (__NR_Linux + 322)
818#define __NR_fanotify_mark (__NR_Linux + 323)
819#define __NR_clock_adjtime (__NR_Linux + 324)
820#define __NR_name_to_handle_at (__NR_Linux + 325)
821#define __NR_open_by_handle_at (__NR_Linux + 326)
822#define __NR_syncfs (__NR_Linux + 327)
823#define __NR_setns (__NR_Linux + 328)
824#define __NR_sendmmsg (__NR_Linux + 329)
825
826#define __NR_Linux_syscalls (__NR_sendmmsg + 1)
827
828
829#define __IGNORE_select /* newselect */
830#define __IGNORE_fadvise64 /* fadvise64_64 */
831#define __IGNORE_utimes /* utime */
832
833
834#define HPUX_GATEWAY_ADDR 0xC0000004
835#define LINUX_GATEWAY_ADDR 0x100
836
837#endif /* _UAPI_ASM_PARISC_UNISTD_H_ */
diff --git a/arch/powerpc/include/asm/kvm_book3s_32.h b/arch/powerpc/include/asm/kvm_book3s_32.h
index 38040ff82063..ce0ef6ce8f86 100644
--- a/arch/powerpc/include/asm/kvm_book3s_32.h
+++ b/arch/powerpc/include/asm/kvm_book3s_32.h
@@ -42,5 +42,6 @@ static inline void svcpu_put(struct kvmppc_book3s_shadow_vcpu *svcpu)
42#define SID_SHIFT 28 42#define SID_SHIFT 28
43#define ESID_MASK 0xf0000000 43#define ESID_MASK 0xf0000000
44#define VSID_MASK 0x00fffffff0000000ULL 44#define VSID_MASK 0x00fffffff0000000ULL
45#define VPN_SHIFT 12
45 46
46#endif /* __ASM_KVM_BOOK3S_32_H__ */ 47#endif /* __ASM_KVM_BOOK3S_32_H__ */
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h
index 8734b3855272..87502046c0dc 100644
--- a/arch/powerpc/include/asm/processor.h
+++ b/arch/powerpc/include/asm/processor.h
@@ -388,9 +388,9 @@ extern int powersave_nap; /* set if nap mode can be used in idle loop */
388extern void power7_nap(void); 388extern void power7_nap(void);
389 389
390#ifdef CONFIG_PSERIES_IDLE 390#ifdef CONFIG_PSERIES_IDLE
391extern void update_smt_snooze_delay(int snooze); 391extern void update_smt_snooze_delay(int cpu, int residency);
392#else 392#else
393static inline void update_smt_snooze_delay(int snooze) {} 393static inline void update_smt_snooze_delay(int cpu, int residency) {}
394#endif 394#endif
395 395
396extern void flush_instruction_cache(void); 396extern void flush_instruction_cache(void);
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
index 8302af649219..cf357a059ddb 100644
--- a/arch/powerpc/kernel/sysfs.c
+++ b/arch/powerpc/kernel/sysfs.c
@@ -50,7 +50,7 @@ static ssize_t store_smt_snooze_delay(struct device *dev,
50 return -EINVAL; 50 return -EINVAL;
51 51
52 per_cpu(smt_snooze_delay, cpu->dev.id) = snooze; 52 per_cpu(smt_snooze_delay, cpu->dev.id) = snooze;
53 update_smt_snooze_delay(snooze); 53 update_smt_snooze_delay(cpu->dev.id, snooze);
54 54
55 return count; 55 return count;
56} 56}
diff --git a/arch/powerpc/kvm/book3s_32_mmu_host.c b/arch/powerpc/kvm/book3s_32_mmu_host.c
index 00aa61268e0d..b0f625a33345 100644
--- a/arch/powerpc/kvm/book3s_32_mmu_host.c
+++ b/arch/powerpc/kvm/book3s_32_mmu_host.c
@@ -173,8 +173,8 @@ int kvmppc_mmu_map_page(struct kvm_vcpu *vcpu, struct kvmppc_pte *orig_pte)
173 BUG_ON(!map); 173 BUG_ON(!map);
174 174
175 vsid = map->host_vsid; 175 vsid = map->host_vsid;
176 vpn = (vsid << (SID_SHIFT - VPN_SHIFT)) | ((eaddr & ~ESID_MASK) >> VPN_SHIFT) 176 vpn = (vsid << (SID_SHIFT - VPN_SHIFT)) |
177 177 ((eaddr & ~ESID_MASK) >> VPN_SHIFT);
178next_pteg: 178next_pteg:
179 if (rr == 16) { 179 if (rr == 16) {
180 primary = !primary; 180 primary = !primary;
diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c
index 0db88f501f91..aa2465e21f1a 100644
--- a/arch/powerpc/perf/core-book3s.c
+++ b/arch/powerpc/perf/core-book3s.c
@@ -1463,7 +1463,7 @@ static void perf_event_interrupt(struct pt_regs *regs)
1463 if (!event->hw.idx || is_limited_pmc(event->hw.idx)) 1463 if (!event->hw.idx || is_limited_pmc(event->hw.idx))
1464 continue; 1464 continue;
1465 val = read_pmc(event->hw.idx); 1465 val = read_pmc(event->hw.idx);
1466 if (pmc_overflow(val)) { 1466 if ((int)val < 0) {
1467 /* event has overflowed */ 1467 /* event has overflowed */
1468 found = 1; 1468 found = 1;
1469 record_and_restart(event, val, regs); 1469 record_and_restart(event, val, regs);
diff --git a/arch/powerpc/platforms/pseries/processor_idle.c b/arch/powerpc/platforms/pseries/processor_idle.c
index 455760b1fe6e..45d00e5fe14d 100644
--- a/arch/powerpc/platforms/pseries/processor_idle.c
+++ b/arch/powerpc/platforms/pseries/processor_idle.c
@@ -33,13 +33,6 @@ static int max_idle_state = MAX_IDLE_STATE_COUNT - 1;
33static struct cpuidle_device __percpu *pseries_cpuidle_devices; 33static struct cpuidle_device __percpu *pseries_cpuidle_devices;
34static struct cpuidle_state *cpuidle_state_table; 34static struct cpuidle_state *cpuidle_state_table;
35 35
36void update_smt_snooze_delay(int snooze)
37{
38 struct cpuidle_driver *drv = cpuidle_get_driver();
39 if (drv)
40 drv->states[0].target_residency = snooze;
41}
42
43static inline void idle_loop_prolog(unsigned long *in_purr, ktime_t *kt_before) 36static inline void idle_loop_prolog(unsigned long *in_purr, ktime_t *kt_before)
44{ 37{
45 38
@@ -66,32 +59,22 @@ static int snooze_loop(struct cpuidle_device *dev,
66{ 59{
67 unsigned long in_purr; 60 unsigned long in_purr;
68 ktime_t kt_before; 61 ktime_t kt_before;
69 unsigned long start_snooze; 62 int cpu = dev->cpu;
70 long snooze = drv->states[0].target_residency;
71 63
72 idle_loop_prolog(&in_purr, &kt_before); 64 idle_loop_prolog(&in_purr, &kt_before);
65 local_irq_enable();
66 set_thread_flag(TIF_POLLING_NRFLAG);
73 67
74 if (snooze) { 68 while ((!need_resched()) && cpu_online(cpu)) {
75 start_snooze = get_tb() + snooze * tb_ticks_per_usec; 69 ppc64_runlatch_off();
76 local_irq_enable(); 70 HMT_low();
77 set_thread_flag(TIF_POLLING_NRFLAG); 71 HMT_very_low();
78
79 while ((snooze < 0) || (get_tb() < start_snooze)) {
80 if (need_resched() || cpu_is_offline(dev->cpu))
81 goto out;
82 ppc64_runlatch_off();
83 HMT_low();
84 HMT_very_low();
85 }
86
87 HMT_medium();
88 clear_thread_flag(TIF_POLLING_NRFLAG);
89 smp_mb();
90 local_irq_disable();
91 } 72 }
92 73
93out:
94 HMT_medium(); 74 HMT_medium();
75 clear_thread_flag(TIF_POLLING_NRFLAG);
76 smp_mb();
77
95 dev->last_residency = 78 dev->last_residency =
96 (int)idle_loop_epilog(in_purr, kt_before); 79 (int)idle_loop_epilog(in_purr, kt_before);
97 return index; 80 return index;
@@ -172,8 +155,8 @@ static struct cpuidle_state dedicated_states[MAX_IDLE_STATE_COUNT] = {
172 .name = "CEDE", 155 .name = "CEDE",
173 .desc = "CEDE", 156 .desc = "CEDE",
174 .flags = CPUIDLE_FLAG_TIME_VALID, 157 .flags = CPUIDLE_FLAG_TIME_VALID,
175 .exit_latency = 1, 158 .exit_latency = 10,
176 .target_residency = 10, 159 .target_residency = 100,
177 .enter = &dedicated_cede_loop }, 160 .enter = &dedicated_cede_loop },
178}; 161};
179 162
@@ -190,6 +173,23 @@ static struct cpuidle_state shared_states[MAX_IDLE_STATE_COUNT] = {
190 .enter = &shared_cede_loop }, 173 .enter = &shared_cede_loop },
191}; 174};
192 175
176void update_smt_snooze_delay(int cpu, int residency)
177{
178 struct cpuidle_driver *drv = cpuidle_get_driver();
179 struct cpuidle_device *dev = per_cpu(cpuidle_devices, cpu);
180
181 if (cpuidle_state_table != dedicated_states)
182 return;
183
184 if (residency < 0) {
185 /* Disable the Nap state on that cpu */
186 if (dev)
187 dev->states_usage[1].disable = 1;
188 } else
189 if (drv)
190 drv->states[1].target_residency = residency;
191}
192
193static int pseries_cpuidle_add_cpu_notifier(struct notifier_block *n, 193static int pseries_cpuidle_add_cpu_notifier(struct notifier_block *n,
194 unsigned long action, void *hcpu) 194 unsigned long action, void *hcpu)
195{ 195{
@@ -246,10 +246,6 @@ static int pseries_cpuidle_driver_init(void)
246 drv->states[drv->state_count] = /* structure copy */ 246 drv->states[drv->state_count] = /* structure copy */
247 cpuidle_state_table[idle_state]; 247 cpuidle_state_table[idle_state];
248 248
249 if (cpuidle_state_table == dedicated_states)
250 drv->states[drv->state_count].target_residency =
251 __get_cpu_var(smt_snooze_delay);
252
253 drv->state_count += 1; 249 drv->state_count += 1;
254 } 250 }
255 251
diff --git a/arch/s390/include/uapi/asm/Kbuild b/arch/s390/include/uapi/asm/Kbuild
index 7bf68fff7c5d..59b67ed423b4 100644
--- a/arch/s390/include/uapi/asm/Kbuild
+++ b/arch/s390/include/uapi/asm/Kbuild
@@ -1,6 +1,8 @@
1# UAPI Header export list 1# UAPI Header export list
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3 3
4generic-y += kvm_para.h
5
4header-y += auxvec.h 6header-y += auxvec.h
5header-y += bitsperlong.h 7header-y += bitsperlong.h
6header-y += byteorder.h 8header-y += byteorder.h
diff --git a/arch/s390/include/uapi/asm/kvm_para.h b/arch/s390/include/uapi/asm/kvm_para.h
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/arch/s390/include/uapi/asm/kvm_para.h
+++ /dev/null
diff --git a/arch/sh/include/asm/Kbuild b/arch/sh/include/asm/Kbuild
index 86eadceff097..29f83beeef7a 100644
--- a/arch/sh/include/asm/Kbuild
+++ b/arch/sh/include/asm/Kbuild
@@ -1,4 +1,3 @@
1include include/asm-generic/Kbuild.asm
2 1
3generic-y += bitsperlong.h 2generic-y += bitsperlong.h
4generic-y += cputime.h 3generic-y += cputime.h
@@ -34,13 +33,3 @@ generic-y += termbits.h
34generic-y += termios.h 33generic-y += termios.h
35generic-y += ucontext.h 34generic-y += ucontext.h
36generic-y += xor.h 35generic-y += xor.h
37
38header-y += cachectl.h
39header-y += cpu-features.h
40header-y += hw_breakpoint.h
41header-y += posix_types_32.h
42header-y += posix_types_64.h
43header-y += ptrace_32.h
44header-y += ptrace_64.h
45header-y += unistd_32.h
46header-y += unistd_64.h
diff --git a/arch/sh/include/asm/hw_breakpoint.h b/arch/sh/include/asm/hw_breakpoint.h
index 89890f61a7b9..ec9ad593c3da 100644
--- a/arch/sh/include/asm/hw_breakpoint.h
+++ b/arch/sh/include/asm/hw_breakpoint.h
@@ -1,7 +1,8 @@
1#ifndef __ASM_SH_HW_BREAKPOINT_H 1#ifndef __ASM_SH_HW_BREAKPOINT_H
2#define __ASM_SH_HW_BREAKPOINT_H 2#define __ASM_SH_HW_BREAKPOINT_H
3 3
4#ifdef __KERNEL__ 4#include <uapi/asm/hw_breakpoint.h>
5
5#define __ARCH_HW_BREAKPOINT_H 6#define __ARCH_HW_BREAKPOINT_H
6 7
7#include <linux/kdebug.h> 8#include <linux/kdebug.h>
@@ -66,5 +67,4 @@ extern int register_sh_ubc(struct sh_ubc *);
66 67
67extern struct pmu perf_ops_bp; 68extern struct pmu perf_ops_bp;
68 69
69#endif /* __KERNEL__ */
70#endif /* __ASM_SH_HW_BREAKPOINT_H */ 70#endif /* __ASM_SH_HW_BREAKPOINT_H */
diff --git a/arch/sh/include/asm/posix_types.h b/arch/sh/include/asm/posix_types.h
index f08449bcbde7..1aa781079b1e 100644
--- a/arch/sh/include/asm/posix_types.h
+++ b/arch/sh/include/asm/posix_types.h
@@ -1,13 +1,5 @@
1#ifdef __KERNEL__
2# ifdef CONFIG_SUPERH32 1# ifdef CONFIG_SUPERH32
3# include <asm/posix_types_32.h> 2# include <asm/posix_types_32.h>
4# else 3# else
5# include <asm/posix_types_64.h> 4# include <asm/posix_types_64.h>
6# endif 5# endif
7#else
8# ifdef __SH5__
9# include <asm/posix_types_64.h>
10# else
11# include <asm/posix_types_32.h>
12# endif
13#endif /* __KERNEL__ */
diff --git a/arch/sh/include/asm/ptrace.h b/arch/sh/include/asm/ptrace.h
index a4a38dff997a..2506c7db76b7 100644
--- a/arch/sh/include/asm/ptrace.h
+++ b/arch/sh/include/asm/ptrace.h
@@ -1,42 +1,16 @@
1#ifndef __ASM_SH_PTRACE_H
2#define __ASM_SH_PTRACE_H
3
4/* 1/*
5 * Copyright (C) 1999, 2000 Niibe Yutaka 2 * Copyright (C) 1999, 2000 Niibe Yutaka
6 */ 3 */
4#ifndef __ASM_SH_PTRACE_H
5#define __ASM_SH_PTRACE_H
7 6
8#define PTRACE_GETREGS 12 /* General registers */
9#define PTRACE_SETREGS 13
10
11#define PTRACE_GETFPREGS 14 /* FPU registers */
12#define PTRACE_SETFPREGS 15
13
14#define PTRACE_GETFDPIC 31 /* get the ELF fdpic loadmap address */
15
16#define PTRACE_GETFDPIC_EXEC 0 /* [addr] request the executable loadmap */
17#define PTRACE_GETFDPIC_INTERP 1 /* [addr] request the interpreter loadmap */
18
19#define PTRACE_GETDSPREGS 55 /* DSP registers */
20#define PTRACE_SETDSPREGS 56
21
22#define PT_TEXT_END_ADDR 240
23#define PT_TEXT_ADDR 244 /* &(struct user)->start_code */
24#define PT_DATA_ADDR 248 /* &(struct user)->start_data */
25#define PT_TEXT_LEN 252
26
27#if defined(__SH5__) || defined(CONFIG_CPU_SH5)
28#include <asm/ptrace_64.h>
29#else
30#include <asm/ptrace_32.h>
31#endif
32
33#ifdef __KERNEL__
34 7
35#include <linux/stringify.h> 8#include <linux/stringify.h>
36#include <linux/stddef.h> 9#include <linux/stddef.h>
37#include <linux/thread_info.h> 10#include <linux/thread_info.h>
38#include <asm/addrspace.h> 11#include <asm/addrspace.h>
39#include <asm/page.h> 12#include <asm/page.h>
13#include <uapi/asm/ptrace.h>
40 14
41#define user_mode(regs) (((regs)->sr & 0x40000000)==0) 15#define user_mode(regs) (((regs)->sr & 0x40000000)==0)
42#define kernel_stack_pointer(_regs) ((unsigned long)(_regs)->regs[15]) 16#define kernel_stack_pointer(_regs) ((unsigned long)(_regs)->regs[15])
@@ -140,6 +114,4 @@ static inline unsigned long profile_pc(struct pt_regs *regs)
140#define profile_pc profile_pc 114#define profile_pc profile_pc
141 115
142#include <asm-generic/ptrace.h> 116#include <asm-generic/ptrace.h>
143#endif /* __KERNEL__ */
144
145#endif /* __ASM_SH_PTRACE_H */ 117#endif /* __ASM_SH_PTRACE_H */
diff --git a/arch/sh/include/asm/ptrace_32.h b/arch/sh/include/asm/ptrace_32.h
index 2d3e906aa722..1dd4480c5363 100644
--- a/arch/sh/include/asm/ptrace_32.h
+++ b/arch/sh/include/asm/ptrace_32.h
@@ -1,79 +1,8 @@
1#ifndef __ASM_SH_PTRACE_32_H 1#ifndef __ASM_SH_PTRACE_32_H
2#define __ASM_SH_PTRACE_32_H 2#define __ASM_SH_PTRACE_32_H
3 3
4/* 4#include <uapi/asm/ptrace_32.h>
5 * GCC defines register number like this:
6 * -----------------------------
7 * 0 - 15 are integer registers
8 * 17 - 22 are control/special registers
9 * 24 - 39 fp registers
10 * 40 - 47 xd registers
11 * 48 - fpscr register
12 * -----------------------------
13 *
14 * We follows above, except:
15 * 16 --- program counter (PC)
16 * 22 --- syscall #
17 * 23 --- floating point communication register
18 */
19#define REG_REG0 0
20#define REG_REG15 15
21 5
22#define REG_PC 16
23
24#define REG_PR 17
25#define REG_SR 18
26#define REG_GBR 19
27#define REG_MACH 20
28#define REG_MACL 21
29
30#define REG_SYSCALL 22
31
32#define REG_FPREG0 23
33#define REG_FPREG15 38
34#define REG_XFREG0 39
35#define REG_XFREG15 54
36
37#define REG_FPSCR 55
38#define REG_FPUL 56
39
40/*
41 * This struct defines the way the registers are stored on the
42 * kernel stack during a system call or other kernel entry.
43 */
44struct pt_regs {
45 unsigned long regs[16];
46 unsigned long pc;
47 unsigned long pr;
48 unsigned long sr;
49 unsigned long gbr;
50 unsigned long mach;
51 unsigned long macl;
52 long tra;
53};
54
55/*
56 * This struct defines the way the DSP registers are stored on the
57 * kernel stack during a system call or other kernel entry.
58 */
59struct pt_dspregs {
60 unsigned long a1;
61 unsigned long a0g;
62 unsigned long a1g;
63 unsigned long m0;
64 unsigned long m1;
65 unsigned long a0;
66 unsigned long x0;
67 unsigned long x1;
68 unsigned long y0;
69 unsigned long y1;
70 unsigned long dsr;
71 unsigned long rs;
72 unsigned long re;
73 unsigned long mod;
74};
75
76#ifdef __KERNEL__
77 6
78#define MAX_REG_OFFSET offsetof(struct pt_regs, tra) 7#define MAX_REG_OFFSET offsetof(struct pt_regs, tra)
79static inline long regs_return_value(struct pt_regs *regs) 8static inline long regs_return_value(struct pt_regs *regs)
@@ -81,6 +10,4 @@ static inline long regs_return_value(struct pt_regs *regs)
81 return regs->regs[0]; 10 return regs->regs[0];
82} 11}
83 12
84#endif /* __KERNEL__ */
85
86#endif /* __ASM_SH_PTRACE_32_H */ 13#endif /* __ASM_SH_PTRACE_32_H */
diff --git a/arch/sh/include/asm/ptrace_64.h b/arch/sh/include/asm/ptrace_64.h
index eb3fcceaf64b..97f4b5660f2c 100644
--- a/arch/sh/include/asm/ptrace_64.h
+++ b/arch/sh/include/asm/ptrace_64.h
@@ -1,16 +1,8 @@
1#ifndef __ASM_SH_PTRACE_64_H 1#ifndef __ASM_SH_PTRACE_64_H
2#define __ASM_SH_PTRACE_64_H 2#define __ASM_SH_PTRACE_64_H
3 3
4struct pt_regs { 4#include <uapi/asm/ptrace_64.h>
5 unsigned long long pc;
6 unsigned long long sr;
7 long long syscall_nr;
8 unsigned long long regs[63];
9 unsigned long long tregs[8];
10 unsigned long long pad[2];
11};
12 5
13#ifdef __KERNEL__
14 6
15#define MAX_REG_OFFSET offsetof(struct pt_regs, tregs[7]) 7#define MAX_REG_OFFSET offsetof(struct pt_regs, tregs[7])
16static inline long regs_return_value(struct pt_regs *regs) 8static inline long regs_return_value(struct pt_regs *regs)
@@ -18,6 +10,4 @@ static inline long regs_return_value(struct pt_regs *regs)
18 return regs->regs[3]; 10 return regs->regs[3];
19} 11}
20 12
21#endif /* __KERNEL__ */
22
23#endif /* __ASM_SH_PTRACE_64_H */ 13#endif /* __ASM_SH_PTRACE_64_H */
diff --git a/arch/sh/include/asm/setup.h b/arch/sh/include/asm/setup.h
index 465a22df8fd0..99238108e7a5 100644
--- a/arch/sh/include/asm/setup.h
+++ b/arch/sh/include/asm/setup.h
@@ -1,9 +1,8 @@
1#ifndef _SH_SETUP_H 1#ifndef _SH_SETUP_H
2#define _SH_SETUP_H 2#define _SH_SETUP_H
3 3
4#include <asm-generic/setup.h> 4#include <uapi/asm/setup.h>
5 5
6#ifdef __KERNEL__
7/* 6/*
8 * This is set up by the setup-routine at boot-time 7 * This is set up by the setup-routine at boot-time
9 */ 8 */
@@ -22,6 +21,4 @@ void sh_mv_setup(void);
22void check_for_initrd(void); 21void check_for_initrd(void);
23void per_cpu_trap_init(void); 22void per_cpu_trap_init(void);
24 23
25#endif /* __KERNEL__ */
26
27#endif /* _SH_SETUP_H */ 24#endif /* _SH_SETUP_H */
diff --git a/arch/sh/include/asm/types.h b/arch/sh/include/asm/types.h
index f8421f7ad63a..6a31053fa5e3 100644
--- a/arch/sh/include/asm/types.h
+++ b/arch/sh/include/asm/types.h
@@ -1,12 +1,11 @@
1#ifndef __ASM_SH_TYPES_H 1#ifndef __ASM_SH_TYPES_H
2#define __ASM_SH_TYPES_H 2#define __ASM_SH_TYPES_H
3 3
4#include <asm-generic/types.h> 4#include <uapi/asm/types.h>
5 5
6/* 6/*
7 * These aren't exported outside the kernel to avoid name space clashes 7 * These aren't exported outside the kernel to avoid name space clashes
8 */ 8 */
9#ifdef __KERNEL__
10#ifndef __ASSEMBLY__ 9#ifndef __ASSEMBLY__
11 10
12#ifdef CONFIG_SUPERH32 11#ifdef CONFIG_SUPERH32
@@ -18,6 +17,4 @@ typedef u64 reg_size_t;
18#endif 17#endif
19 18
20#endif /* __ASSEMBLY__ */ 19#endif /* __ASSEMBLY__ */
21#endif /* __KERNEL__ */
22
23#endif /* __ASM_SH_TYPES_H */ 20#endif /* __ASM_SH_TYPES_H */
diff --git a/arch/sh/include/asm/unistd.h b/arch/sh/include/asm/unistd.h
index 307201a854f3..38956dfa76f7 100644
--- a/arch/sh/include/asm/unistd.h
+++ b/arch/sh/include/asm/unistd.h
@@ -1,4 +1,3 @@
1#ifdef __KERNEL__
2# ifdef CONFIG_SUPERH32 1# ifdef CONFIG_SUPERH32
3# include <asm/unistd_32.h> 2# include <asm/unistd_32.h>
4# else 3# else
@@ -38,10 +37,4 @@
38 */ 37 */
39# define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 38# define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
40 39
41#else 40#include <uapi/asm/unistd.h>
42# ifdef __SH5__
43# include <asm/unistd_64.h>
44# else
45# include <asm/unistd_32.h>
46# endif
47#endif
diff --git a/arch/sh/include/uapi/asm/Kbuild b/arch/sh/include/uapi/asm/Kbuild
index baebb3da1d44..60613ae78513 100644
--- a/arch/sh/include/uapi/asm/Kbuild
+++ b/arch/sh/include/uapi/asm/Kbuild
@@ -1,3 +1,25 @@
1# UAPI Header export list 1# UAPI Header export list
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3 3
4header-y += auxvec.h
5header-y += byteorder.h
6header-y += cachectl.h
7header-y += cpu-features.h
8header-y += hw_breakpoint.h
9header-y += ioctls.h
10header-y += posix_types.h
11header-y += posix_types_32.h
12header-y += posix_types_64.h
13header-y += ptrace.h
14header-y += ptrace_32.h
15header-y += ptrace_64.h
16header-y += setup.h
17header-y += sigcontext.h
18header-y += signal.h
19header-y += sockios.h
20header-y += stat.h
21header-y += swab.h
22header-y += types.h
23header-y += unistd.h
24header-y += unistd_32.h
25header-y += unistd_64.h
diff --git a/arch/sh/include/asm/auxvec.h b/arch/sh/include/uapi/asm/auxvec.h
index 8bcc51af9367..8bcc51af9367 100644
--- a/arch/sh/include/asm/auxvec.h
+++ b/arch/sh/include/uapi/asm/auxvec.h
diff --git a/arch/sh/include/asm/byteorder.h b/arch/sh/include/uapi/asm/byteorder.h
index db2f5d7cb17d..db2f5d7cb17d 100644
--- a/arch/sh/include/asm/byteorder.h
+++ b/arch/sh/include/uapi/asm/byteorder.h
diff --git a/arch/sh/include/asm/cachectl.h b/arch/sh/include/uapi/asm/cachectl.h
index 6ffb4b7a212e..6ffb4b7a212e 100644
--- a/arch/sh/include/asm/cachectl.h
+++ b/arch/sh/include/uapi/asm/cachectl.h
diff --git a/arch/sh/include/asm/cpu-features.h b/arch/sh/include/uapi/asm/cpu-features.h
index 694abe490edb..694abe490edb 100644
--- a/arch/sh/include/asm/cpu-features.h
+++ b/arch/sh/include/uapi/asm/cpu-features.h
diff --git a/arch/sh/include/uapi/asm/hw_breakpoint.h b/arch/sh/include/uapi/asm/hw_breakpoint.h
new file mode 100644
index 000000000000..ae5704fa77ad
--- /dev/null
+++ b/arch/sh/include/uapi/asm/hw_breakpoint.h
@@ -0,0 +1,4 @@
1/*
2 * There isn't anything here anymore, but the file must not be empty or patch
3 * will delete it.
4 */
diff --git a/arch/sh/include/asm/ioctls.h b/arch/sh/include/uapi/asm/ioctls.h
index a6769f352bf6..a6769f352bf6 100644
--- a/arch/sh/include/asm/ioctls.h
+++ b/arch/sh/include/uapi/asm/ioctls.h
diff --git a/arch/sh/include/uapi/asm/posix_types.h b/arch/sh/include/uapi/asm/posix_types.h
new file mode 100644
index 000000000000..dc55e5adfe1e
--- /dev/null
+++ b/arch/sh/include/uapi/asm/posix_types.h
@@ -0,0 +1,7 @@
1#ifndef __KERNEL__
2# ifdef __SH5__
3# include <asm/posix_types_64.h>
4# else
5# include <asm/posix_types_32.h>
6# endif
7#endif /* __KERNEL__ */
diff --git a/arch/sh/include/asm/posix_types_32.h b/arch/sh/include/uapi/asm/posix_types_32.h
index ba0bdc423b07..ba0bdc423b07 100644
--- a/arch/sh/include/asm/posix_types_32.h
+++ b/arch/sh/include/uapi/asm/posix_types_32.h
diff --git a/arch/sh/include/asm/posix_types_64.h b/arch/sh/include/uapi/asm/posix_types_64.h
index 244f7e950e17..244f7e950e17 100644
--- a/arch/sh/include/asm/posix_types_64.h
+++ b/arch/sh/include/uapi/asm/posix_types_64.h
diff --git a/arch/sh/include/uapi/asm/ptrace.h b/arch/sh/include/uapi/asm/ptrace.h
new file mode 100644
index 000000000000..8b8c5aca9c28
--- /dev/null
+++ b/arch/sh/include/uapi/asm/ptrace.h
@@ -0,0 +1,34 @@
1/*
2 * Copyright (C) 1999, 2000 Niibe Yutaka
3 */
4#ifndef _UAPI__ASM_SH_PTRACE_H
5#define _UAPI__ASM_SH_PTRACE_H
6
7
8#define PTRACE_GETREGS 12 /* General registers */
9#define PTRACE_SETREGS 13
10
11#define PTRACE_GETFPREGS 14 /* FPU registers */
12#define PTRACE_SETFPREGS 15
13
14#define PTRACE_GETFDPIC 31 /* get the ELF fdpic loadmap address */
15
16#define PTRACE_GETFDPIC_EXEC 0 /* [addr] request the executable loadmap */
17#define PTRACE_GETFDPIC_INTERP 1 /* [addr] request the interpreter loadmap */
18
19#define PTRACE_GETDSPREGS 55 /* DSP registers */
20#define PTRACE_SETDSPREGS 56
21
22#define PT_TEXT_END_ADDR 240
23#define PT_TEXT_ADDR 244 /* &(struct user)->start_code */
24#define PT_DATA_ADDR 248 /* &(struct user)->start_data */
25#define PT_TEXT_LEN 252
26
27#if defined(__SH5__) || defined(CONFIG_CPU_SH5)
28#include <asm/ptrace_64.h>
29#else
30#include <asm/ptrace_32.h>
31#endif
32
33
34#endif /* _UAPI__ASM_SH_PTRACE_H */
diff --git a/arch/sh/include/uapi/asm/ptrace_32.h b/arch/sh/include/uapi/asm/ptrace_32.h
new file mode 100644
index 000000000000..926e0cefc2bb
--- /dev/null
+++ b/arch/sh/include/uapi/asm/ptrace_32.h
@@ -0,0 +1,77 @@
1#ifndef _UAPI__ASM_SH_PTRACE_32_H
2#define _UAPI__ASM_SH_PTRACE_32_H
3
4/*
5 * GCC defines register number like this:
6 * -----------------------------
7 * 0 - 15 are integer registers
8 * 17 - 22 are control/special registers
9 * 24 - 39 fp registers
10 * 40 - 47 xd registers
11 * 48 - fpscr register
12 * -----------------------------
13 *
14 * We follows above, except:
15 * 16 --- program counter (PC)
16 * 22 --- syscall #
17 * 23 --- floating point communication register
18 */
19#define REG_REG0 0
20#define REG_REG15 15
21
22#define REG_PC 16
23
24#define REG_PR 17
25#define REG_SR 18
26#define REG_GBR 19
27#define REG_MACH 20
28#define REG_MACL 21
29
30#define REG_SYSCALL 22
31
32#define REG_FPREG0 23
33#define REG_FPREG15 38
34#define REG_XFREG0 39
35#define REG_XFREG15 54
36
37#define REG_FPSCR 55
38#define REG_FPUL 56
39
40/*
41 * This struct defines the way the registers are stored on the
42 * kernel stack during a system call or other kernel entry.
43 */
44struct pt_regs {
45 unsigned long regs[16];
46 unsigned long pc;
47 unsigned long pr;
48 unsigned long sr;
49 unsigned long gbr;
50 unsigned long mach;
51 unsigned long macl;
52 long tra;
53};
54
55/*
56 * This struct defines the way the DSP registers are stored on the
57 * kernel stack during a system call or other kernel entry.
58 */
59struct pt_dspregs {
60 unsigned long a1;
61 unsigned long a0g;
62 unsigned long a1g;
63 unsigned long m0;
64 unsigned long m1;
65 unsigned long a0;
66 unsigned long x0;
67 unsigned long x1;
68 unsigned long y0;
69 unsigned long y1;
70 unsigned long dsr;
71 unsigned long rs;
72 unsigned long re;
73 unsigned long mod;
74};
75
76
77#endif /* _UAPI__ASM_SH_PTRACE_32_H */
diff --git a/arch/sh/include/uapi/asm/ptrace_64.h b/arch/sh/include/uapi/asm/ptrace_64.h
new file mode 100644
index 000000000000..0e52ee83e946
--- /dev/null
+++ b/arch/sh/include/uapi/asm/ptrace_64.h
@@ -0,0 +1,14 @@
1#ifndef _UAPI__ASM_SH_PTRACE_64_H
2#define _UAPI__ASM_SH_PTRACE_64_H
3
4struct pt_regs {
5 unsigned long long pc;
6 unsigned long long sr;
7 long long syscall_nr;
8 unsigned long long regs[63];
9 unsigned long long tregs[8];
10 unsigned long long pad[2];
11};
12
13
14#endif /* _UAPI__ASM_SH_PTRACE_64_H */
diff --git a/arch/sh/include/uapi/asm/setup.h b/arch/sh/include/uapi/asm/setup.h
new file mode 100644
index 000000000000..552df83f1a49
--- /dev/null
+++ b/arch/sh/include/uapi/asm/setup.h
@@ -0,0 +1 @@
#include <asm-generic/setup.h>
diff --git a/arch/sh/include/asm/sigcontext.h b/arch/sh/include/uapi/asm/sigcontext.h
index 8ce1435bc0bf..8ce1435bc0bf 100644
--- a/arch/sh/include/asm/sigcontext.h
+++ b/arch/sh/include/uapi/asm/sigcontext.h
diff --git a/arch/sh/include/asm/signal.h b/arch/sh/include/uapi/asm/signal.h
index 9ac530a90bce..9ac530a90bce 100644
--- a/arch/sh/include/asm/signal.h
+++ b/arch/sh/include/uapi/asm/signal.h
diff --git a/arch/sh/include/asm/sockios.h b/arch/sh/include/uapi/asm/sockios.h
index cf8b96b1f9ab..cf8b96b1f9ab 100644
--- a/arch/sh/include/asm/sockios.h
+++ b/arch/sh/include/uapi/asm/sockios.h
diff --git a/arch/sh/include/asm/stat.h b/arch/sh/include/uapi/asm/stat.h
index e1810cc6e3da..e1810cc6e3da 100644
--- a/arch/sh/include/asm/stat.h
+++ b/arch/sh/include/uapi/asm/stat.h
diff --git a/arch/sh/include/asm/swab.h b/arch/sh/include/uapi/asm/swab.h
index 1cd09767a7a3..1cd09767a7a3 100644
--- a/arch/sh/include/asm/swab.h
+++ b/arch/sh/include/uapi/asm/swab.h
diff --git a/arch/sh/include/uapi/asm/types.h b/arch/sh/include/uapi/asm/types.h
new file mode 100644
index 000000000000..b9e79bc580dd
--- /dev/null
+++ b/arch/sh/include/uapi/asm/types.h
@@ -0,0 +1 @@
#include <asm-generic/types.h>
diff --git a/arch/sh/include/uapi/asm/unistd.h b/arch/sh/include/uapi/asm/unistd.h
new file mode 100644
index 000000000000..eeef88dd53ce
--- /dev/null
+++ b/arch/sh/include/uapi/asm/unistd.h
@@ -0,0 +1,7 @@
1#ifndef __KERNEL__
2# ifdef __SH5__
3# include <asm/unistd_64.h>
4# else
5# include <asm/unistd_32.h>
6# endif
7#endif
diff --git a/arch/sh/include/asm/unistd_32.h b/arch/sh/include/uapi/asm/unistd_32.h
index 72fd1e061006..9e465f246dc1 100644
--- a/arch/sh/include/asm/unistd_32.h
+++ b/arch/sh/include/uapi/asm/unistd_32.h
@@ -378,7 +378,8 @@
378#define __NR_setns 364 378#define __NR_setns 364
379#define __NR_process_vm_readv 365 379#define __NR_process_vm_readv 365
380#define __NR_process_vm_writev 366 380#define __NR_process_vm_writev 366
381#define __NR_kcmp 367
381 382
382#define NR_syscalls 367 383#define NR_syscalls 368
383 384
384#endif /* __ASM_SH_UNISTD_32_H */ 385#endif /* __ASM_SH_UNISTD_32_H */
diff --git a/arch/sh/include/asm/unistd_64.h b/arch/sh/include/uapi/asm/unistd_64.h
index a28edc329692..8e3a2edd284e 100644
--- a/arch/sh/include/asm/unistd_64.h
+++ b/arch/sh/include/uapi/asm/unistd_64.h
@@ -398,7 +398,8 @@
398#define __NR_setns 375 398#define __NR_setns 375
399#define __NR_process_vm_readv 376 399#define __NR_process_vm_readv 376
400#define __NR_process_vm_writev 377 400#define __NR_process_vm_writev 377
401#define __NR_kcmp 378
401 402
402#define NR_syscalls 378 403#define NR_syscalls 379
403 404
404#endif /* __ASM_SH_UNISTD_64_H */ 405#endif /* __ASM_SH_UNISTD_64_H */
diff --git a/arch/sh/kernel/syscalls_32.S b/arch/sh/kernel/syscalls_32.S
index 4b68f0f79761..fe97ae5e56f1 100644
--- a/arch/sh/kernel/syscalls_32.S
+++ b/arch/sh/kernel/syscalls_32.S
@@ -384,3 +384,4 @@ ENTRY(sys_call_table)
384 .long sys_setns 384 .long sys_setns
385 .long sys_process_vm_readv /* 365 */ 385 .long sys_process_vm_readv /* 365 */
386 .long sys_process_vm_writev 386 .long sys_process_vm_writev
387 .long sys_kcmp
diff --git a/arch/sh/kernel/syscalls_64.S b/arch/sh/kernel/syscalls_64.S
index 0956345b36ef..5c7b1c67bdc1 100644
--- a/arch/sh/kernel/syscalls_64.S
+++ b/arch/sh/kernel/syscalls_64.S
@@ -404,3 +404,4 @@ sys_call_table:
404 .long sys_setns /* 375 */ 404 .long sys_setns /* 375 */
405 .long sys_process_vm_readv 405 .long sys_process_vm_readv
406 .long sys_process_vm_writev 406 .long sys_process_vm_writev
407 .long sys_kcmp
diff --git a/arch/sparc/include/asm/ptrace.h b/arch/sparc/include/asm/ptrace.h
index 0c6f6b068289..da43bdc62294 100644
--- a/arch/sparc/include/asm/ptrace.h
+++ b/arch/sparc/include/asm/ptrace.h
@@ -42,7 +42,18 @@ struct global_reg_snapshot {
42 struct thread_info *thread; 42 struct thread_info *thread;
43 unsigned long pad1; 43 unsigned long pad1;
44}; 44};
45extern struct global_reg_snapshot global_reg_snapshot[NR_CPUS]; 45
46struct global_pmu_snapshot {
47 unsigned long pcr[4];
48 unsigned long pic[4];
49};
50
51union global_cpu_snapshot {
52 struct global_reg_snapshot reg;
53 struct global_pmu_snapshot pmu;
54};
55
56extern union global_cpu_snapshot global_cpu_snapshot[NR_CPUS];
46 57
47#define force_successful_syscall_return() \ 58#define force_successful_syscall_return() \
48do { current_thread_info()->syscall_noerror = 1; \ 59do { current_thread_info()->syscall_noerror = 1; \
diff --git a/arch/sparc/include/asm/smp_64.h b/arch/sparc/include/asm/smp_64.h
index 29862a9e9065..dd3bef4b9896 100644
--- a/arch/sparc/include/asm/smp_64.h
+++ b/arch/sparc/include/asm/smp_64.h
@@ -48,6 +48,7 @@ extern void smp_fill_in_sib_core_maps(void);
48extern void cpu_play_dead(void); 48extern void cpu_play_dead(void);
49 49
50extern void smp_fetch_global_regs(void); 50extern void smp_fetch_global_regs(void);
51extern void smp_fetch_global_pmu(void);
51 52
52struct seq_file; 53struct seq_file;
53void smp_bogo(struct seq_file *); 54void smp_bogo(struct seq_file *);
@@ -65,6 +66,7 @@ extern void __cpu_die(unsigned int cpu);
65#define hard_smp_processor_id() 0 66#define hard_smp_processor_id() 0
66#define smp_fill_in_sib_core_maps() do { } while (0) 67#define smp_fill_in_sib_core_maps() do { } while (0)
67#define smp_fetch_global_regs() do { } while (0) 68#define smp_fetch_global_regs() do { } while (0)
69#define smp_fetch_global_pmu() do { } while (0)
68 70
69#endif /* !(CONFIG_SMP) */ 71#endif /* !(CONFIG_SMP) */
70 72
diff --git a/arch/sparc/include/uapi/asm/sigcontext.h b/arch/sparc/include/uapi/asm/sigcontext.h
index e69de29bb2d1..ae5704fa77ad 100644
--- a/arch/sparc/include/uapi/asm/sigcontext.h
+++ b/arch/sparc/include/uapi/asm/sigcontext.h
@@ -0,0 +1,4 @@
1/*
2 * There isn't anything here anymore, but the file must not be empty or patch
3 * will delete it.
4 */
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c
index e48651dace1b..885a8af74064 100644
--- a/arch/sparc/kernel/perf_event.c
+++ b/arch/sparc/kernel/perf_event.c
@@ -817,15 +817,17 @@ static u64 nop_for_index(int idx)
817 817
818static inline void sparc_pmu_enable_event(struct cpu_hw_events *cpuc, struct hw_perf_event *hwc, int idx) 818static inline void sparc_pmu_enable_event(struct cpu_hw_events *cpuc, struct hw_perf_event *hwc, int idx)
819{ 819{
820 u64 val, mask = mask_for_index(idx); 820 u64 enc, val, mask = mask_for_index(idx);
821 int pcr_index = 0; 821 int pcr_index = 0;
822 822
823 if (sparc_pmu->num_pcrs > 1) 823 if (sparc_pmu->num_pcrs > 1)
824 pcr_index = idx; 824 pcr_index = idx;
825 825
826 enc = perf_event_get_enc(cpuc->events[idx]);
827
826 val = cpuc->pcr[pcr_index]; 828 val = cpuc->pcr[pcr_index];
827 val &= ~mask; 829 val &= ~mask;
828 val |= hwc->config; 830 val |= event_encoding(enc, idx);
829 cpuc->pcr[pcr_index] = val; 831 cpuc->pcr[pcr_index] = val;
830 832
831 pcr_ops->write_pcr(pcr_index, cpuc->pcr[pcr_index]); 833 pcr_ops->write_pcr(pcr_index, cpuc->pcr[pcr_index]);
@@ -1738,8 +1740,6 @@ static void perf_callchain_user_64(struct perf_callchain_entry *entry,
1738{ 1740{
1739 unsigned long ufp; 1741 unsigned long ufp;
1740 1742
1741 perf_callchain_store(entry, regs->tpc);
1742
1743 ufp = regs->u_regs[UREG_I6] + STACK_BIAS; 1743 ufp = regs->u_regs[UREG_I6] + STACK_BIAS;
1744 do { 1744 do {
1745 struct sparc_stackf *usf, sf; 1745 struct sparc_stackf *usf, sf;
@@ -1760,8 +1760,6 @@ static void perf_callchain_user_32(struct perf_callchain_entry *entry,
1760{ 1760{
1761 unsigned long ufp; 1761 unsigned long ufp;
1762 1762
1763 perf_callchain_store(entry, regs->tpc);
1764
1765 ufp = regs->u_regs[UREG_I6] & 0xffffffffUL; 1763 ufp = regs->u_regs[UREG_I6] & 0xffffffffUL;
1766 do { 1764 do {
1767 struct sparc_stackf32 *usf, sf; 1765 struct sparc_stackf32 *usf, sf;
@@ -1780,6 +1778,11 @@ static void perf_callchain_user_32(struct perf_callchain_entry *entry,
1780void 1778void
1781perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs) 1779perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs)
1782{ 1780{
1781 perf_callchain_store(entry, regs->tpc);
1782
1783 if (!current->mm)
1784 return;
1785
1783 flushw_user(); 1786 flushw_user();
1784 if (test_thread_flag(TIF_32BIT)) 1787 if (test_thread_flag(TIF_32BIT))
1785 perf_callchain_user_32(entry, regs); 1788 perf_callchain_user_32(entry, regs);
diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c
index fcaa59421126..d778248ef3f8 100644
--- a/arch/sparc/kernel/process_64.c
+++ b/arch/sparc/kernel/process_64.c
@@ -27,6 +27,7 @@
27#include <linux/tick.h> 27#include <linux/tick.h>
28#include <linux/init.h> 28#include <linux/init.h>
29#include <linux/cpu.h> 29#include <linux/cpu.h>
30#include <linux/perf_event.h>
30#include <linux/elfcore.h> 31#include <linux/elfcore.h>
31#include <linux/sysrq.h> 32#include <linux/sysrq.h>
32#include <linux/nmi.h> 33#include <linux/nmi.h>
@@ -47,6 +48,7 @@
47#include <asm/syscalls.h> 48#include <asm/syscalls.h>
48#include <asm/irq_regs.h> 49#include <asm/irq_regs.h>
49#include <asm/smp.h> 50#include <asm/smp.h>
51#include <asm/pcr.h>
50 52
51#include "kstack.h" 53#include "kstack.h"
52 54
@@ -204,18 +206,22 @@ void show_regs(struct pt_regs *regs)
204 show_stack(current, (unsigned long *) regs->u_regs[UREG_FP]); 206 show_stack(current, (unsigned long *) regs->u_regs[UREG_FP]);
205} 207}
206 208
207struct global_reg_snapshot global_reg_snapshot[NR_CPUS]; 209union global_cpu_snapshot global_cpu_snapshot[NR_CPUS];
208static DEFINE_SPINLOCK(global_reg_snapshot_lock); 210static DEFINE_SPINLOCK(global_cpu_snapshot_lock);
209 211
210static void __global_reg_self(struct thread_info *tp, struct pt_regs *regs, 212static void __global_reg_self(struct thread_info *tp, struct pt_regs *regs,
211 int this_cpu) 213 int this_cpu)
212{ 214{
215 struct global_reg_snapshot *rp;
216
213 flushw_all(); 217 flushw_all();
214 218
215 global_reg_snapshot[this_cpu].tstate = regs->tstate; 219 rp = &global_cpu_snapshot[this_cpu].reg;
216 global_reg_snapshot[this_cpu].tpc = regs->tpc; 220
217 global_reg_snapshot[this_cpu].tnpc = regs->tnpc; 221 rp->tstate = regs->tstate;
218 global_reg_snapshot[this_cpu].o7 = regs->u_regs[UREG_I7]; 222 rp->tpc = regs->tpc;
223 rp->tnpc = regs->tnpc;
224 rp->o7 = regs->u_regs[UREG_I7];
219 225
220 if (regs->tstate & TSTATE_PRIV) { 226 if (regs->tstate & TSTATE_PRIV) {
221 struct reg_window *rw; 227 struct reg_window *rw;
@@ -223,17 +229,17 @@ static void __global_reg_self(struct thread_info *tp, struct pt_regs *regs,
223 rw = (struct reg_window *) 229 rw = (struct reg_window *)
224 (regs->u_regs[UREG_FP] + STACK_BIAS); 230 (regs->u_regs[UREG_FP] + STACK_BIAS);
225 if (kstack_valid(tp, (unsigned long) rw)) { 231 if (kstack_valid(tp, (unsigned long) rw)) {
226 global_reg_snapshot[this_cpu].i7 = rw->ins[7]; 232 rp->i7 = rw->ins[7];
227 rw = (struct reg_window *) 233 rw = (struct reg_window *)
228 (rw->ins[6] + STACK_BIAS); 234 (rw->ins[6] + STACK_BIAS);
229 if (kstack_valid(tp, (unsigned long) rw)) 235 if (kstack_valid(tp, (unsigned long) rw))
230 global_reg_snapshot[this_cpu].rpc = rw->ins[7]; 236 rp->rpc = rw->ins[7];
231 } 237 }
232 } else { 238 } else {
233 global_reg_snapshot[this_cpu].i7 = 0; 239 rp->i7 = 0;
234 global_reg_snapshot[this_cpu].rpc = 0; 240 rp->rpc = 0;
235 } 241 }
236 global_reg_snapshot[this_cpu].thread = tp; 242 rp->thread = tp;
237} 243}
238 244
239/* In order to avoid hangs we do not try to synchronize with the 245/* In order to avoid hangs we do not try to synchronize with the
@@ -261,9 +267,9 @@ void arch_trigger_all_cpu_backtrace(void)
261 if (!regs) 267 if (!regs)
262 regs = tp->kregs; 268 regs = tp->kregs;
263 269
264 spin_lock_irqsave(&global_reg_snapshot_lock, flags); 270 spin_lock_irqsave(&global_cpu_snapshot_lock, flags);
265 271
266 memset(global_reg_snapshot, 0, sizeof(global_reg_snapshot)); 272 memset(global_cpu_snapshot, 0, sizeof(global_cpu_snapshot));
267 273
268 this_cpu = raw_smp_processor_id(); 274 this_cpu = raw_smp_processor_id();
269 275
@@ -272,7 +278,7 @@ void arch_trigger_all_cpu_backtrace(void)
272 smp_fetch_global_regs(); 278 smp_fetch_global_regs();
273 279
274 for_each_online_cpu(cpu) { 280 for_each_online_cpu(cpu) {
275 struct global_reg_snapshot *gp = &global_reg_snapshot[cpu]; 281 struct global_reg_snapshot *gp = &global_cpu_snapshot[cpu].reg;
276 282
277 __global_reg_poll(gp); 283 __global_reg_poll(gp);
278 284
@@ -295,9 +301,9 @@ void arch_trigger_all_cpu_backtrace(void)
295 } 301 }
296 } 302 }
297 303
298 memset(global_reg_snapshot, 0, sizeof(global_reg_snapshot)); 304 memset(global_cpu_snapshot, 0, sizeof(global_cpu_snapshot));
299 305
300 spin_unlock_irqrestore(&global_reg_snapshot_lock, flags); 306 spin_unlock_irqrestore(&global_cpu_snapshot_lock, flags);
301} 307}
302 308
303#ifdef CONFIG_MAGIC_SYSRQ 309#ifdef CONFIG_MAGIC_SYSRQ
@@ -309,16 +315,90 @@ static void sysrq_handle_globreg(int key)
309 315
310static struct sysrq_key_op sparc_globalreg_op = { 316static struct sysrq_key_op sparc_globalreg_op = {
311 .handler = sysrq_handle_globreg, 317 .handler = sysrq_handle_globreg,
312 .help_msg = "Globalregs", 318 .help_msg = "global-regs(Y)",
313 .action_msg = "Show Global CPU Regs", 319 .action_msg = "Show Global CPU Regs",
314}; 320};
315 321
316static int __init sparc_globreg_init(void) 322static void __global_pmu_self(int this_cpu)
323{
324 struct global_pmu_snapshot *pp;
325 int i, num;
326
327 pp = &global_cpu_snapshot[this_cpu].pmu;
328
329 num = 1;
330 if (tlb_type == hypervisor &&
331 sun4v_chip_type >= SUN4V_CHIP_NIAGARA4)
332 num = 4;
333
334 for (i = 0; i < num; i++) {
335 pp->pcr[i] = pcr_ops->read_pcr(i);
336 pp->pic[i] = pcr_ops->read_pic(i);
337 }
338}
339
340static void __global_pmu_poll(struct global_pmu_snapshot *pp)
341{
342 int limit = 0;
343
344 while (!pp->pcr[0] && ++limit < 100) {
345 barrier();
346 udelay(1);
347 }
348}
349
350static void pmu_snapshot_all_cpus(void)
317{ 351{
318 return register_sysrq_key('y', &sparc_globalreg_op); 352 unsigned long flags;
353 int this_cpu, cpu;
354
355 spin_lock_irqsave(&global_cpu_snapshot_lock, flags);
356
357 memset(global_cpu_snapshot, 0, sizeof(global_cpu_snapshot));
358
359 this_cpu = raw_smp_processor_id();
360
361 __global_pmu_self(this_cpu);
362
363 smp_fetch_global_pmu();
364
365 for_each_online_cpu(cpu) {
366 struct global_pmu_snapshot *pp = &global_cpu_snapshot[cpu].pmu;
367
368 __global_pmu_poll(pp);
369
370 printk("%c CPU[%3d]: PCR[%08lx:%08lx:%08lx:%08lx] PIC[%08lx:%08lx:%08lx:%08lx]\n",
371 (cpu == this_cpu ? '*' : ' '), cpu,
372 pp->pcr[0], pp->pcr[1], pp->pcr[2], pp->pcr[3],
373 pp->pic[0], pp->pic[1], pp->pic[2], pp->pic[3]);
374 }
375
376 memset(global_cpu_snapshot, 0, sizeof(global_cpu_snapshot));
377
378 spin_unlock_irqrestore(&global_cpu_snapshot_lock, flags);
379}
380
381static void sysrq_handle_globpmu(int key)
382{
383 pmu_snapshot_all_cpus();
384}
385
386static struct sysrq_key_op sparc_globalpmu_op = {
387 .handler = sysrq_handle_globpmu,
388 .help_msg = "global-pmu(X)",
389 .action_msg = "Show Global PMU Regs",
390};
391
392static int __init sparc_sysrq_init(void)
393{
394 int ret = register_sysrq_key('y', &sparc_globalreg_op);
395
396 if (!ret)
397 ret = register_sysrq_key('x', &sparc_globalpmu_op);
398 return ret;
319} 399}
320 400
321core_initcall(sparc_globreg_init); 401core_initcall(sparc_sysrq_init);
322 402
323#endif 403#endif
324 404
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c
index 781bcb10b8bd..d94b878577b7 100644
--- a/arch/sparc/kernel/smp_64.c
+++ b/arch/sparc/kernel/smp_64.c
@@ -852,6 +852,8 @@ extern unsigned long xcall_flush_tlb_mm;
852extern unsigned long xcall_flush_tlb_pending; 852extern unsigned long xcall_flush_tlb_pending;
853extern unsigned long xcall_flush_tlb_kernel_range; 853extern unsigned long xcall_flush_tlb_kernel_range;
854extern unsigned long xcall_fetch_glob_regs; 854extern unsigned long xcall_fetch_glob_regs;
855extern unsigned long xcall_fetch_glob_pmu;
856extern unsigned long xcall_fetch_glob_pmu_n4;
855extern unsigned long xcall_receive_signal; 857extern unsigned long xcall_receive_signal;
856extern unsigned long xcall_new_mmu_context_version; 858extern unsigned long xcall_new_mmu_context_version;
857#ifdef CONFIG_KGDB 859#ifdef CONFIG_KGDB
@@ -1000,6 +1002,15 @@ void smp_fetch_global_regs(void)
1000 smp_cross_call(&xcall_fetch_glob_regs, 0, 0, 0); 1002 smp_cross_call(&xcall_fetch_glob_regs, 0, 0, 0);
1001} 1003}
1002 1004
1005void smp_fetch_global_pmu(void)
1006{
1007 if (tlb_type == hypervisor &&
1008 sun4v_chip_type >= SUN4V_CHIP_NIAGARA4)
1009 smp_cross_call(&xcall_fetch_glob_pmu_n4, 0, 0, 0);
1010 else
1011 smp_cross_call(&xcall_fetch_glob_pmu, 0, 0, 0);
1012}
1013
1003/* We know that the window frames of the user have been flushed 1014/* We know that the window frames of the user have been flushed
1004 * to the stack before we get here because all callers of us 1015 * to the stack before we get here because all callers of us
1005 * are flush_tlb_*() routines, and these run after flush_cache_*() 1016 * are flush_tlb_*() routines, and these run after flush_cache_*()
diff --git a/arch/sparc/mm/ultra.S b/arch/sparc/mm/ultra.S
index 874162a11ceb..f8e13d421fcb 100644
--- a/arch/sparc/mm/ultra.S
+++ b/arch/sparc/mm/ultra.S
@@ -481,8 +481,8 @@ xcall_sync_tick:
481 481
482 .globl xcall_fetch_glob_regs 482 .globl xcall_fetch_glob_regs
483xcall_fetch_glob_regs: 483xcall_fetch_glob_regs:
484 sethi %hi(global_reg_snapshot), %g1 484 sethi %hi(global_cpu_snapshot), %g1
485 or %g1, %lo(global_reg_snapshot), %g1 485 or %g1, %lo(global_cpu_snapshot), %g1
486 __GET_CPUID(%g2) 486 __GET_CPUID(%g2)
487 sllx %g2, 6, %g3 487 sllx %g2, 6, %g3
488 add %g1, %g3, %g1 488 add %g1, %g3, %g1
@@ -509,6 +509,66 @@ xcall_fetch_glob_regs:
509 stx %g3, [%g1 + GR_SNAP_THREAD] 509 stx %g3, [%g1 + GR_SNAP_THREAD]
510 retry 510 retry
511 511
512 .globl xcall_fetch_glob_pmu
513xcall_fetch_glob_pmu:
514 sethi %hi(global_cpu_snapshot), %g1
515 or %g1, %lo(global_cpu_snapshot), %g1
516 __GET_CPUID(%g2)
517 sllx %g2, 6, %g3
518 add %g1, %g3, %g1
519 rd %pic, %g7
520 stx %g7, [%g1 + (4 * 8)]
521 rd %pcr, %g7
522 stx %g7, [%g1 + (0 * 8)]
523 retry
524
525 .globl xcall_fetch_glob_pmu_n4
526xcall_fetch_glob_pmu_n4:
527 sethi %hi(global_cpu_snapshot), %g1
528 or %g1, %lo(global_cpu_snapshot), %g1
529 __GET_CPUID(%g2)
530 sllx %g2, 6, %g3
531 add %g1, %g3, %g1
532
533 ldxa [%g0] ASI_PIC, %g7
534 stx %g7, [%g1 + (4 * 8)]
535 mov 0x08, %g3
536 ldxa [%g3] ASI_PIC, %g7
537 stx %g7, [%g1 + (5 * 8)]
538 mov 0x10, %g3
539 ldxa [%g3] ASI_PIC, %g7
540 stx %g7, [%g1 + (6 * 8)]
541 mov 0x18, %g3
542 ldxa [%g3] ASI_PIC, %g7
543 stx %g7, [%g1 + (7 * 8)]
544
545 mov %o0, %g2
546 mov %o1, %g3
547 mov %o5, %g7
548
549 mov HV_FAST_VT_GET_PERFREG, %o5
550 mov 3, %o0
551 ta HV_FAST_TRAP
552 stx %o1, [%g1 + (3 * 8)]
553 mov HV_FAST_VT_GET_PERFREG, %o5
554 mov 2, %o0
555 ta HV_FAST_TRAP
556 stx %o1, [%g1 + (2 * 8)]
557 mov HV_FAST_VT_GET_PERFREG, %o5
558 mov 1, %o0
559 ta HV_FAST_TRAP
560 stx %o1, [%g1 + (1 * 8)]
561 mov HV_FAST_VT_GET_PERFREG, %o5
562 mov 0, %o0
563 ta HV_FAST_TRAP
564 stx %o1, [%g1 + (0 * 8)]
565
566 mov %g2, %o0
567 mov %g3, %o1
568 mov %g7, %o5
569
570 retry
571
512#ifdef DCACHE_ALIASING_POSSIBLE 572#ifdef DCACHE_ALIASING_POSSIBLE
513 .align 32 573 .align 32
514 .globl xcall_flush_dcache_page_cheetah 574 .globl xcall_flush_dcache_page_cheetah
diff --git a/arch/tile/include/arch/Kbuild b/arch/tile/include/arch/Kbuild
index e69de29bb2d1..3751c9fabcf2 100644
--- a/arch/tile/include/arch/Kbuild
+++ b/arch/tile/include/arch/Kbuild
@@ -0,0 +1 @@
# Tile arch headers
diff --git a/arch/tile/include/asm/Kbuild b/arch/tile/include/asm/Kbuild
index c68808a09da7..6948015e08a2 100644
--- a/arch/tile/include/asm/Kbuild
+++ b/arch/tile/include/asm/Kbuild
@@ -1,8 +1,6 @@
1 1
2header-y += ../arch/ 2header-y += ../arch/
3 3
4header-y += ucontext.h
5
6generic-y += bug.h 4generic-y += bug.h
7generic-y += bugs.h 5generic-y += bugs.h
8generic-y += clkdev.h 6generic-y += clkdev.h
@@ -37,5 +35,4 @@ generic-y += statfs.h
37generic-y += termbits.h 35generic-y += termbits.h
38generic-y += termios.h 36generic-y += termios.h
39generic-y += types.h 37generic-y += types.h
40generic-y += ucontext.h
41generic-y += xor.h 38generic-y += xor.h
diff --git a/arch/tile/include/uapi/asm/Kbuild b/arch/tile/include/uapi/asm/Kbuild
index 5c6915fd30b5..c20db8e428bf 100644
--- a/arch/tile/include/uapi/asm/Kbuild
+++ b/arch/tile/include/uapi/asm/Kbuild
@@ -15,4 +15,7 @@ header-y += siginfo.h
15header-y += signal.h 15header-y += signal.h
16header-y += stat.h 16header-y += stat.h
17header-y += swab.h 17header-y += swab.h
18header-y += ucontext.h
18header-y += unistd.h 19header-y += unistd.h
20
21generic-y += ucontext.h
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 58790bd85c1d..05afcca66de6 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -142,7 +142,7 @@ KBUILD_CFLAGS += $(call cc-option,-mno-avx,)
142KBUILD_CFLAGS += $(mflags-y) 142KBUILD_CFLAGS += $(mflags-y)
143KBUILD_AFLAGS += $(mflags-y) 143KBUILD_AFLAGS += $(mflags-y)
144 144
145archscripts: 145archscripts: scripts_basic
146 $(Q)$(MAKE) $(build)=arch/x86/tools relocs 146 $(Q)$(MAKE) $(build)=arch/x86/tools relocs
147 147
148### 148###
diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c
index 7c04d0da709b..1b9c22bea8a7 100644
--- a/arch/x86/crypto/aesni-intel_glue.c
+++ b/arch/x86/crypto/aesni-intel_glue.c
@@ -515,6 +515,11 @@ static int xts_aesni_setkey(struct crypto_tfm *tfm, const u8 *key,
515} 515}
516 516
517 517
518static void aesni_xts_tweak(void *ctx, u8 *out, const u8 *in)
519{
520 aesni_enc(ctx, out, in);
521}
522
518static int xts_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, 523static int xts_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst,
519 struct scatterlist *src, unsigned int nbytes) 524 struct scatterlist *src, unsigned int nbytes)
520{ 525{
@@ -525,7 +530,7 @@ static int xts_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst,
525 .tbuflen = sizeof(buf), 530 .tbuflen = sizeof(buf),
526 531
527 .tweak_ctx = aes_ctx(ctx->raw_tweak_ctx), 532 .tweak_ctx = aes_ctx(ctx->raw_tweak_ctx),
528 .tweak_fn = XTS_TWEAK_CAST(aesni_enc), 533 .tweak_fn = aesni_xts_tweak,
529 .crypt_ctx = aes_ctx(ctx->raw_crypt_ctx), 534 .crypt_ctx = aes_ctx(ctx->raw_crypt_ctx),
530 .crypt_fn = lrw_xts_encrypt_callback, 535 .crypt_fn = lrw_xts_encrypt_callback,
531 }; 536 };
@@ -550,7 +555,7 @@ static int xts_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst,
550 .tbuflen = sizeof(buf), 555 .tbuflen = sizeof(buf),
551 556
552 .tweak_ctx = aes_ctx(ctx->raw_tweak_ctx), 557 .tweak_ctx = aes_ctx(ctx->raw_tweak_ctx),
553 .tweak_fn = XTS_TWEAK_CAST(aesni_enc), 558 .tweak_fn = aesni_xts_tweak,
554 .crypt_ctx = aes_ctx(ctx->raw_crypt_ctx), 559 .crypt_ctx = aes_ctx(ctx->raw_crypt_ctx),
555 .crypt_fn = lrw_xts_decrypt_callback, 560 .crypt_fn = lrw_xts_decrypt_callback,
556 }; 561 };
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
index 9a7c90d80bc4..93c5451bdd52 100644
--- a/arch/x86/kernel/cpu/intel_cacheinfo.c
+++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
@@ -991,7 +991,7 @@ static struct attribute ** __cpuinit amd_l3_attrs(void)
991 if (attrs) 991 if (attrs)
992 return attrs; 992 return attrs;
993 993
994 n = sizeof (default_attrs) / sizeof (struct attribute *); 994 n = ARRAY_SIZE(default_attrs);
995 995
996 if (amd_nb_has_feature(AMD_NB_L3_INDEX_DISABLE)) 996 if (amd_nb_has_feature(AMD_NB_L3_INDEX_DISABLE))
997 n += 2; 997 n += 2;
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 29e87d3b2843..46cbf8689692 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -2209,11 +2209,6 @@ static struct dev_ext_attribute dev_attr_cmci_disabled = {
2209 &mce_cmci_disabled 2209 &mce_cmci_disabled
2210}; 2210};
2211 2211
2212static struct dev_ext_attribute dev_attr_bios_cmci_threshold = {
2213 __ATTR(bios_cmci_threshold, 0444, device_show_int, NULL),
2214 &mce_bios_cmci_threshold
2215};
2216
2217static struct device_attribute *mce_device_attrs[] = { 2212static struct device_attribute *mce_device_attrs[] = {
2218 &dev_attr_tolerant.attr, 2213 &dev_attr_tolerant.attr,
2219 &dev_attr_check_interval.attr, 2214 &dev_attr_check_interval.attr,
@@ -2222,7 +2217,6 @@ static struct device_attribute *mce_device_attrs[] = {
2222 &dev_attr_dont_log_ce.attr, 2217 &dev_attr_dont_log_ce.attr,
2223 &dev_attr_ignore_ce.attr, 2218 &dev_attr_ignore_ce.attr,
2224 &dev_attr_cmci_disabled.attr, 2219 &dev_attr_cmci_disabled.attr,
2225 &dev_attr_bios_cmci_threshold.attr,
2226 NULL 2220 NULL
2227}; 2221};
2228 2222
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c
index c4e916d77378..698b6ec12e0f 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_amd.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c
@@ -576,12 +576,10 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank)
576 int err = 0; 576 int err = 0;
577 577
578 if (shared_bank[bank]) { 578 if (shared_bank[bank]) {
579
580 nb = node_to_amd_nb(amd_get_nb_id(cpu)); 579 nb = node_to_amd_nb(amd_get_nb_id(cpu));
581 WARN_ON(!nb);
582 580
583 /* threshold descriptor already initialized on this node? */ 581 /* threshold descriptor already initialized on this node? */
584 if (nb->bank4) { 582 if (nb && nb->bank4) {
585 /* yes, use it */ 583 /* yes, use it */
586 b = nb->bank4; 584 b = nb->bank4;
587 err = kobject_add(b->kobj, &dev->kobj, name); 585 err = kobject_add(b->kobj, &dev->kobj, name);
@@ -615,8 +613,10 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank)
615 atomic_set(&b->cpus, 1); 613 atomic_set(&b->cpus, 1);
616 614
617 /* nb is already initialized, see above */ 615 /* nb is already initialized, see above */
618 WARN_ON(nb->bank4); 616 if (nb) {
619 nb->bank4 = b; 617 WARN_ON(nb->bank4);
618 nb->bank4 = b;
619 }
620 } 620 }
621 621
622 err = allocate_threshold_blocks(cpu, bank, 0, 622 err = allocate_threshold_blocks(cpu, bank, 0,
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index 915b876edd1e..3373f84d1397 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -338,6 +338,9 @@ int x86_setup_perfctr(struct perf_event *event)
338 /* BTS is currently only allowed for user-mode. */ 338 /* BTS is currently only allowed for user-mode. */
339 if (!attr->exclude_kernel) 339 if (!attr->exclude_kernel)
340 return -EOPNOTSUPP; 340 return -EOPNOTSUPP;
341
342 if (!attr->exclude_guest)
343 return -EOPNOTSUPP;
341 } 344 }
342 345
343 hwc->config |= config; 346 hwc->config |= config;
@@ -380,6 +383,9 @@ int x86_pmu_hw_config(struct perf_event *event)
380 if (event->attr.precise_ip) { 383 if (event->attr.precise_ip) {
381 int precise = 0; 384 int precise = 0;
382 385
386 if (!event->attr.exclude_guest)
387 return -EOPNOTSUPP;
388
383 /* Support for constant skid */ 389 /* Support for constant skid */
384 if (x86_pmu.pebs_active && !x86_pmu.pebs_broken) { 390 if (x86_pmu.pebs_active && !x86_pmu.pebs_broken) {
385 precise++; 391 precise++;
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 52190a938b4a..4e8ba39eaf0f 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -358,14 +358,6 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
358 DMI_MATCH(DMI_PRODUCT_NAME, "VGN-Z540N"), 358 DMI_MATCH(DMI_PRODUCT_NAME, "VGN-Z540N"),
359 }, 359 },
360 }, 360 },
361 { /* Handle problems with rebooting on CompuLab SBC-FITPC2 */
362 .callback = set_bios_reboot,
363 .ident = "CompuLab SBC-FITPC2",
364 .matches = {
365 DMI_MATCH(DMI_SYS_VENDOR, "CompuLab"),
366 DMI_MATCH(DMI_PRODUCT_NAME, "SBC-FITPC2"),
367 },
368 },
369 { /* Handle problems with rebooting on ASUS P4S800 */ 361 { /* Handle problems with rebooting on ASUS P4S800 */
370 .callback = set_bios_reboot, 362 .callback = set_bios_reboot,
371 .ident = "ASUS P4S800", 363 .ident = "ASUS P4S800",
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index a2bb18e02839..468e98dfd44e 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -920,8 +920,21 @@ void __init setup_arch(char **cmdline_p)
920 920
921#ifdef CONFIG_X86_64 921#ifdef CONFIG_X86_64
922 if (max_pfn > max_low_pfn) { 922 if (max_pfn > max_low_pfn) {
923 max_pfn_mapped = init_memory_mapping(1UL<<32, 923 int i;
924 max_pfn<<PAGE_SHIFT); 924 for (i = 0; i < e820.nr_map; i++) {
925 struct e820entry *ei = &e820.map[i];
926
927 if (ei->addr + ei->size <= 1UL << 32)
928 continue;
929
930 if (ei->type == E820_RESERVED)
931 continue;
932
933 max_pfn_mapped = init_memory_mapping(
934 ei->addr < 1UL << 32 ? 1UL << 32 : ei->addr,
935 ei->addr + ei->size);
936 }
937
925 /* can we preseve max_low_pfn ?*/ 938 /* can we preseve max_low_pfn ?*/
926 max_low_pfn = max_pfn; 939 max_low_pfn = max_pfn;
927 } 940 }
diff --git a/arch/x86/realmode/rm/wakeup_asm.S b/arch/x86/realmode/rm/wakeup_asm.S
index e56479e58053..9e7e14797a72 100644
--- a/arch/x86/realmode/rm/wakeup_asm.S
+++ b/arch/x86/realmode/rm/wakeup_asm.S
@@ -74,18 +74,9 @@ ENTRY(wakeup_start)
74 74
75 lidtl wakeup_idt 75 lidtl wakeup_idt
76 76
77 /* Clear the EFLAGS but remember if we have EFLAGS.ID */ 77 /* Clear the EFLAGS */
78 movl $X86_EFLAGS_ID, %ecx
79 pushl %ecx
80 popfl
81 pushfl
82 popl %edi
83 pushl $0 78 pushl $0
84 popfl 79 popfl
85 pushfl
86 popl %edx
87 xorl %edx, %edi
88 andl %ecx, %edi /* %edi is zero iff CPUID & %cr4 are missing */
89 80
90 /* Check header signature... */ 81 /* Check header signature... */
91 movl signature, %eax 82 movl signature, %eax
@@ -120,12 +111,12 @@ ENTRY(wakeup_start)
120 movl %eax, %cr3 111 movl %eax, %cr3
121 112
122 btl $WAKEUP_BEHAVIOR_RESTORE_CR4, %edi 113 btl $WAKEUP_BEHAVIOR_RESTORE_CR4, %edi
123 jz 1f 114 jnc 1f
124 movl pmode_cr4, %eax 115 movl pmode_cr4, %eax
125 movl %eax, %cr4 116 movl %eax, %cr4
1261: 1171:
127 btl $WAKEUP_BEHAVIOR_RESTORE_EFER, %edi 118 btl $WAKEUP_BEHAVIOR_RESTORE_EFER, %edi
128 jz 1f 119 jnc 1f
129 movl pmode_efer, %eax 120 movl pmode_efer, %eax
130 movl pmode_efer + 4, %edx 121 movl pmode_efer + 4, %edx
131 movl $MSR_EFER, %ecx 122 movl $MSR_EFER, %ecx
diff --git a/arch/xtensa/boot/boot-redboot/bootstrap.S b/arch/xtensa/boot/boot-redboot/bootstrap.S
index 4c316cd28a54..86c34dbc9cd0 100644
--- a/arch/xtensa/boot/boot-redboot/bootstrap.S
+++ b/arch/xtensa/boot/boot-redboot/bootstrap.S
@@ -51,17 +51,17 @@ _start:
51 /* 'reset' window registers */ 51 /* 'reset' window registers */
52 52
53 movi a4, 1 53 movi a4, 1
54 wsr a4, PS 54 wsr a4, ps
55 rsync 55 rsync
56 56
57 rsr a5, WINDOWBASE 57 rsr a5, windowbase
58 ssl a5 58 ssl a5
59 sll a4, a4 59 sll a4, a4
60 wsr a4, WINDOWSTART 60 wsr a4, windowstart
61 rsync 61 rsync
62 62
63 movi a4, 0x00040000 63 movi a4, 0x00040000
64 wsr a4, PS 64 wsr a4, ps
65 rsync 65 rsync
66 66
67 /* copy the loader to its address 67 /* copy the loader to its address
diff --git a/arch/xtensa/include/asm/Kbuild b/arch/xtensa/include/asm/Kbuild
index fccd81eddff1..6d1302789995 100644
--- a/arch/xtensa/include/asm/Kbuild
+++ b/arch/xtensa/include/asm/Kbuild
@@ -1,4 +1,28 @@
1include include/asm-generic/Kbuild.asm 1generic-y += bitsperlong.h
2 2generic-y += bug.h
3generic-y += clkdev.h 3generic-y += clkdev.h
4generic-y += cputime.h
5generic-y += device.h
6generic-y += div64.h
7generic-y += emergency-restart.h
8generic-y += errno.h
4generic-y += exec.h 9generic-y += exec.h
10generic-y += fcntl.h
11generic-y += futex.h
12generic-y += hardirq.h
13generic-y += ioctl.h
14generic-y += irq_regs.h
15generic-y += kdebug.h
16generic-y += kmap_types.h
17generic-y += kvm_para.h
18generic-y += local.h
19generic-y += local64.h
20generic-y += percpu.h
21generic-y += resource.h
22generic-y += scatterlist.h
23generic-y += sections.h
24generic-y += siginfo.h
25generic-y += statfs.h
26generic-y += termios.h
27generic-y += topology.h
28generic-y += xor.h
diff --git a/arch/xtensa/include/asm/atomic.h b/arch/xtensa/include/asm/atomic.h
index b40989308775..24f50cada70c 100644
--- a/arch/xtensa/include/asm/atomic.h
+++ b/arch/xtensa/include/asm/atomic.h
@@ -73,7 +73,7 @@ static inline void atomic_add(int i, atomic_t * v)
73 "l32i %0, %2, 0 \n\t" 73 "l32i %0, %2, 0 \n\t"
74 "add %0, %0, %1 \n\t" 74 "add %0, %0, %1 \n\t"
75 "s32i %0, %2, 0 \n\t" 75 "s32i %0, %2, 0 \n\t"
76 "wsr a15, "__stringify(PS)" \n\t" 76 "wsr a15, ps \n\t"
77 "rsync \n" 77 "rsync \n"
78 : "=&a" (vval) 78 : "=&a" (vval)
79 : "a" (i), "a" (v) 79 : "a" (i), "a" (v)
@@ -97,7 +97,7 @@ static inline void atomic_sub(int i, atomic_t *v)
97 "l32i %0, %2, 0 \n\t" 97 "l32i %0, %2, 0 \n\t"
98 "sub %0, %0, %1 \n\t" 98 "sub %0, %0, %1 \n\t"
99 "s32i %0, %2, 0 \n\t" 99 "s32i %0, %2, 0 \n\t"
100 "wsr a15, "__stringify(PS)" \n\t" 100 "wsr a15, ps \n\t"
101 "rsync \n" 101 "rsync \n"
102 : "=&a" (vval) 102 : "=&a" (vval)
103 : "a" (i), "a" (v) 103 : "a" (i), "a" (v)
@@ -118,7 +118,7 @@ static inline int atomic_add_return(int i, atomic_t * v)
118 "l32i %0, %2, 0 \n\t" 118 "l32i %0, %2, 0 \n\t"
119 "add %0, %0, %1 \n\t" 119 "add %0, %0, %1 \n\t"
120 "s32i %0, %2, 0 \n\t" 120 "s32i %0, %2, 0 \n\t"
121 "wsr a15, "__stringify(PS)" \n\t" 121 "wsr a15, ps \n\t"
122 "rsync \n" 122 "rsync \n"
123 : "=&a" (vval) 123 : "=&a" (vval)
124 : "a" (i), "a" (v) 124 : "a" (i), "a" (v)
@@ -137,7 +137,7 @@ static inline int atomic_sub_return(int i, atomic_t * v)
137 "l32i %0, %2, 0 \n\t" 137 "l32i %0, %2, 0 \n\t"
138 "sub %0, %0, %1 \n\t" 138 "sub %0, %0, %1 \n\t"
139 "s32i %0, %2, 0 \n\t" 139 "s32i %0, %2, 0 \n\t"
140 "wsr a15, "__stringify(PS)" \n\t" 140 "wsr a15, ps \n\t"
141 "rsync \n" 141 "rsync \n"
142 : "=&a" (vval) 142 : "=&a" (vval)
143 : "a" (i), "a" (v) 143 : "a" (i), "a" (v)
@@ -260,7 +260,7 @@ static inline void atomic_clear_mask(unsigned int mask, atomic_t *v)
260 "xor %1, %4, %3 \n\t" 260 "xor %1, %4, %3 \n\t"
261 "and %0, %0, %4 \n\t" 261 "and %0, %0, %4 \n\t"
262 "s32i %0, %2, 0 \n\t" 262 "s32i %0, %2, 0 \n\t"
263 "wsr a15, "__stringify(PS)" \n\t" 263 "wsr a15, ps \n\t"
264 "rsync \n" 264 "rsync \n"
265 : "=&a" (vval), "=a" (mask) 265 : "=&a" (vval), "=a" (mask)
266 : "a" (v), "a" (all_f), "1" (mask) 266 : "a" (v), "a" (all_f), "1" (mask)
@@ -277,7 +277,7 @@ static inline void atomic_set_mask(unsigned int mask, atomic_t *v)
277 "l32i %0, %2, 0 \n\t" 277 "l32i %0, %2, 0 \n\t"
278 "or %0, %0, %1 \n\t" 278 "or %0, %0, %1 \n\t"
279 "s32i %0, %2, 0 \n\t" 279 "s32i %0, %2, 0 \n\t"
280 "wsr a15, "__stringify(PS)" \n\t" 280 "wsr a15, ps \n\t"
281 "rsync \n" 281 "rsync \n"
282 : "=&a" (vval) 282 : "=&a" (vval)
283 : "a" (mask), "a" (v) 283 : "a" (mask), "a" (v)
diff --git a/arch/xtensa/include/asm/bitsperlong.h b/arch/xtensa/include/asm/bitsperlong.h
deleted file mode 100644
index 6dc0bb0c13b2..000000000000
--- a/arch/xtensa/include/asm/bitsperlong.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/bitsperlong.h>
diff --git a/arch/xtensa/include/asm/bug.h b/arch/xtensa/include/asm/bug.h
deleted file mode 100644
index 3e52d72712f1..000000000000
--- a/arch/xtensa/include/asm/bug.h
+++ /dev/null
@@ -1,18 +0,0 @@
1/*
2 * include/asm-xtensa/bug.h
3 *
4 * Macros to cause a 'bug' message.
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 *
10 * Copyright (C) 2001 - 2005 Tensilica Inc.
11 */
12
13#ifndef _XTENSA_BUG_H
14#define _XTENSA_BUG_H
15
16#include <asm-generic/bug.h>
17
18#endif /* _XTENSA_BUG_H */
diff --git a/arch/xtensa/include/asm/cacheflush.h b/arch/xtensa/include/asm/cacheflush.h
index 376cd9d5f455..569fec4f9a20 100644
--- a/arch/xtensa/include/asm/cacheflush.h
+++ b/arch/xtensa/include/asm/cacheflush.h
@@ -165,7 +165,7 @@ extern void copy_from_user_page(struct vm_area_struct*, struct page*,
165static inline u32 xtensa_get_cacheattr(void) 165static inline u32 xtensa_get_cacheattr(void)
166{ 166{
167 u32 r; 167 u32 r;
168 asm volatile(" rsr %0, CACHEATTR" : "=a"(r)); 168 asm volatile(" rsr %0, cacheattr" : "=a"(r));
169 return r; 169 return r;
170} 170}
171 171
diff --git a/arch/xtensa/include/asm/cmpxchg.h b/arch/xtensa/include/asm/cmpxchg.h
index e32149063d83..64dad04a9d27 100644
--- a/arch/xtensa/include/asm/cmpxchg.h
+++ b/arch/xtensa/include/asm/cmpxchg.h
@@ -27,7 +27,7 @@ __cmpxchg_u32(volatile int *p, int old, int new)
27 "bne %0, %2, 1f \n\t" 27 "bne %0, %2, 1f \n\t"
28 "s32i %3, %1, 0 \n\t" 28 "s32i %3, %1, 0 \n\t"
29 "1: \n\t" 29 "1: \n\t"
30 "wsr a15, "__stringify(PS)" \n\t" 30 "wsr a15, ps \n\t"
31 "rsync \n\t" 31 "rsync \n\t"
32 : "=&a" (old) 32 : "=&a" (old)
33 : "a" (p), "a" (old), "r" (new) 33 : "a" (p), "a" (old), "r" (new)
@@ -97,7 +97,7 @@ static inline unsigned long xchg_u32(volatile int * m, unsigned long val)
97 __asm__ __volatile__("rsil a15, "__stringify(LOCKLEVEL)"\n\t" 97 __asm__ __volatile__("rsil a15, "__stringify(LOCKLEVEL)"\n\t"
98 "l32i %0, %1, 0 \n\t" 98 "l32i %0, %1, 0 \n\t"
99 "s32i %2, %1, 0 \n\t" 99 "s32i %2, %1, 0 \n\t"
100 "wsr a15, "__stringify(PS)" \n\t" 100 "wsr a15, ps \n\t"
101 "rsync \n\t" 101 "rsync \n\t"
102 : "=&a" (tmp) 102 : "=&a" (tmp)
103 : "a" (m), "a" (val) 103 : "a" (m), "a" (val)
diff --git a/arch/xtensa/include/asm/coprocessor.h b/arch/xtensa/include/asm/coprocessor.h
index 75c94a1658b0..677501b32dfc 100644
--- a/arch/xtensa/include/asm/coprocessor.h
+++ b/arch/xtensa/include/asm/coprocessor.h
@@ -94,11 +94,10 @@
94#if XCHAL_HAVE_CP 94#if XCHAL_HAVE_CP
95 95
96#define RSR_CPENABLE(x) do { \ 96#define RSR_CPENABLE(x) do { \
97 __asm__ __volatile__("rsr %0," __stringify(CPENABLE) : "=a" (x)); \ 97 __asm__ __volatile__("rsr %0, cpenable" : "=a" (x)); \
98 } while(0); 98 } while(0);
99#define WSR_CPENABLE(x) do { \ 99#define WSR_CPENABLE(x) do { \
100 __asm__ __volatile__("wsr %0," __stringify(CPENABLE) "; rsync" \ 100 __asm__ __volatile__("wsr %0, cpenable; rsync" :: "a" (x)); \
101 :: "a" (x)); \
102 } while(0); 101 } while(0);
103 102
104#endif /* XCHAL_HAVE_CP */ 103#endif /* XCHAL_HAVE_CP */
diff --git a/arch/xtensa/include/asm/cputime.h b/arch/xtensa/include/asm/cputime.h
deleted file mode 100644
index a7fb864a50ae..000000000000
--- a/arch/xtensa/include/asm/cputime.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _XTENSA_CPUTIME_H
2#define _XTENSA_CPUTIME_H
3
4#include <asm-generic/cputime.h>
5
6#endif /* _XTENSA_CPUTIME_H */
diff --git a/arch/xtensa/include/asm/delay.h b/arch/xtensa/include/asm/delay.h
index e1d8c9e010c1..58c0a4fd4003 100644
--- a/arch/xtensa/include/asm/delay.h
+++ b/arch/xtensa/include/asm/delay.h
@@ -27,7 +27,7 @@ static inline void __delay(unsigned long loops)
27static __inline__ u32 xtensa_get_ccount(void) 27static __inline__ u32 xtensa_get_ccount(void)
28{ 28{
29 u32 ccount; 29 u32 ccount;
30 asm volatile ("rsr %0, 234; # CCOUNT\n" : "=r" (ccount)); 30 asm volatile ("rsr %0, ccount\n" : "=r" (ccount));
31 return ccount; 31 return ccount;
32} 32}
33 33
diff --git a/arch/xtensa/include/asm/device.h b/arch/xtensa/include/asm/device.h
deleted file mode 100644
index d8f9872b0e2d..000000000000
--- a/arch/xtensa/include/asm/device.h
+++ /dev/null
@@ -1,7 +0,0 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/arch/xtensa/include/asm/div64.h b/arch/xtensa/include/asm/div64.h
deleted file mode 100644
index f35678cb0a9b..000000000000
--- a/arch/xtensa/include/asm/div64.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * include/asm-xtensa/div64.h
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 2001 - 2007 Tensilica Inc.
9 */
10
11#ifndef _XTENSA_DIV64_H
12#define _XTENSA_DIV64_H
13
14#include <asm-generic/div64.h>
15
16#endif /* _XTENSA_DIV64_H */
diff --git a/arch/xtensa/include/asm/emergency-restart.h b/arch/xtensa/include/asm/emergency-restart.h
deleted file mode 100644
index 108d8c48e42e..000000000000
--- a/arch/xtensa/include/asm/emergency-restart.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/arch/xtensa/include/asm/errno.h b/arch/xtensa/include/asm/errno.h
deleted file mode 100644
index a0f3b96b79b4..000000000000
--- a/arch/xtensa/include/asm/errno.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * include/asm-xtensa/errno.h
3 *
4 * This file is subject to the terms and conditions of the GNU General
5 * Public License. See the file "COPYING" in the main directory of
6 * this archive for more details.
7 *
8 * Copyright (C) 2002 - 2005 Tensilica Inc.
9 */
10
11#ifndef _XTENSA_ERRNO_H
12#define _XTENSA_ERRNO_H
13
14#include <asm-generic/errno.h>
15
16#endif /* _XTENSA_ERRNO_H */
diff --git a/arch/xtensa/include/asm/fcntl.h b/arch/xtensa/include/asm/fcntl.h
deleted file mode 100644
index 46ab12db5739..000000000000
--- a/arch/xtensa/include/asm/fcntl.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/fcntl.h>
diff --git a/arch/xtensa/include/asm/futex.h b/arch/xtensa/include/asm/futex.h
deleted file mode 100644
index 0b745828f42b..000000000000
--- a/arch/xtensa/include/asm/futex.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/futex.h>
diff --git a/arch/xtensa/include/asm/hardirq.h b/arch/xtensa/include/asm/hardirq.h
deleted file mode 100644
index 91695a135498..000000000000
--- a/arch/xtensa/include/asm/hardirq.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * include/asm-xtensa/hardirq.h
3 *
4 * This file is subject to the terms and conditions of the GNU General
5 * Public License. See the file "COPYING" in the main directory of
6 * this archive for more details.
7 *
8 * Copyright (C) 2002 - 2005 Tensilica Inc.
9 */
10
11#ifndef _XTENSA_HARDIRQ_H
12#define _XTENSA_HARDIRQ_H
13
14#include <asm-generic/hardirq.h>
15
16#endif /* _XTENSA_HARDIRQ_H */
diff --git a/arch/xtensa/include/asm/ioctl.h b/arch/xtensa/include/asm/ioctl.h
deleted file mode 100644
index b279fe06dfe5..000000000000
--- a/arch/xtensa/include/asm/ioctl.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/ioctl.h>
diff --git a/arch/xtensa/include/asm/irq_regs.h b/arch/xtensa/include/asm/irq_regs.h
deleted file mode 100644
index 3dd9c0b70270..000000000000
--- a/arch/xtensa/include/asm/irq_regs.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/irq_regs.h>
diff --git a/arch/xtensa/include/asm/irqflags.h b/arch/xtensa/include/asm/irqflags.h
index dae9a8bdcb17..f865b1c1eae4 100644
--- a/arch/xtensa/include/asm/irqflags.h
+++ b/arch/xtensa/include/asm/irqflags.h
@@ -16,7 +16,7 @@
16static inline unsigned long arch_local_save_flags(void) 16static inline unsigned long arch_local_save_flags(void)
17{ 17{
18 unsigned long flags; 18 unsigned long flags;
19 asm volatile("rsr %0,"__stringify(PS) : "=a" (flags)); 19 asm volatile("rsr %0, ps" : "=a" (flags));
20 return flags; 20 return flags;
21} 21}
22 22
@@ -41,7 +41,7 @@ static inline void arch_local_irq_enable(void)
41 41
42static inline void arch_local_irq_restore(unsigned long flags) 42static inline void arch_local_irq_restore(unsigned long flags)
43{ 43{
44 asm volatile("wsr %0, "__stringify(PS)" ; rsync" 44 asm volatile("wsr %0, ps; rsync"
45 :: "a" (flags) : "memory"); 45 :: "a" (flags) : "memory");
46} 46}
47 47
diff --git a/arch/xtensa/include/asm/kdebug.h b/arch/xtensa/include/asm/kdebug.h
deleted file mode 100644
index 6ece1b037665..000000000000
--- a/arch/xtensa/include/asm/kdebug.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/kdebug.h>
diff --git a/arch/xtensa/include/asm/kmap_types.h b/arch/xtensa/include/asm/kmap_types.h
deleted file mode 100644
index 11c687e527f1..000000000000
--- a/arch/xtensa/include/asm/kmap_types.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _XTENSA_KMAP_TYPES_H
2#define _XTENSA_KMAP_TYPES_H
3
4#include <asm-generic/kmap_types.h>
5
6#endif /* _XTENSA_KMAP_TYPES_H */
diff --git a/arch/xtensa/include/asm/kvm_para.h b/arch/xtensa/include/asm/kvm_para.h
deleted file mode 100644
index 14fab8f0b957..000000000000
--- a/arch/xtensa/include/asm/kvm_para.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/kvm_para.h>
diff --git a/arch/xtensa/include/asm/local.h b/arch/xtensa/include/asm/local.h
deleted file mode 100644
index 48723e550d14..000000000000
--- a/arch/xtensa/include/asm/local.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * include/asm-xtensa/local.h
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 2001 - 2005 Tensilica Inc.
9 */
10
11#ifndef _XTENSA_LOCAL_H
12#define _XTENSA_LOCAL_H
13
14#include <asm-generic/local.h>
15
16#endif /* _XTENSA_LOCAL_H */
diff --git a/arch/xtensa/include/asm/local64.h b/arch/xtensa/include/asm/local64.h
deleted file mode 100644
index 36c93b5cc239..000000000000
--- a/arch/xtensa/include/asm/local64.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/local64.h>
diff --git a/arch/xtensa/include/asm/mmu_context.h b/arch/xtensa/include/asm/mmu_context.h
index dbd8731a876a..feb10af96519 100644
--- a/arch/xtensa/include/asm/mmu_context.h
+++ b/arch/xtensa/include/asm/mmu_context.h
@@ -51,14 +51,14 @@ extern unsigned long asid_cache;
51 51
52static inline void set_rasid_register (unsigned long val) 52static inline void set_rasid_register (unsigned long val)
53{ 53{
54 __asm__ __volatile__ (" wsr %0, "__stringify(RASID)"\n\t" 54 __asm__ __volatile__ (" wsr %0, rasid\n\t"
55 " isync\n" : : "a" (val)); 55 " isync\n" : : "a" (val));
56} 56}
57 57
58static inline unsigned long get_rasid_register (void) 58static inline unsigned long get_rasid_register (void)
59{ 59{
60 unsigned long tmp; 60 unsigned long tmp;
61 __asm__ __volatile__ (" rsr %0,"__stringify(RASID)"\n\t" : "=a" (tmp)); 61 __asm__ __volatile__ (" rsr %0, rasid\n\t" : "=a" (tmp));
62 return tmp; 62 return tmp;
63} 63}
64 64
diff --git a/arch/xtensa/include/asm/param.h b/arch/xtensa/include/asm/param.h
index ba03d5aeab6b..0a70e780ef2a 100644
--- a/arch/xtensa/include/asm/param.h
+++ b/arch/xtensa/include/asm/param.h
@@ -7,28 +7,12 @@
7 * 7 *
8 * Copyright (C) 2001 - 2005 Tensilica Inc. 8 * Copyright (C) 2001 - 2005 Tensilica Inc.
9 */ 9 */
10
11#ifndef _XTENSA_PARAM_H 10#ifndef _XTENSA_PARAM_H
12#define _XTENSA_PARAM_H 11#define _XTENSA_PARAM_H
13 12
14#ifdef __KERNEL__ 13#include <uapi/asm/param.h>
14
15# define HZ CONFIG_HZ /* internal timer frequency */ 15# define HZ CONFIG_HZ /* internal timer frequency */
16# define USER_HZ 100 /* for user interfaces in "ticks" */ 16# define USER_HZ 100 /* for user interfaces in "ticks" */
17# define CLOCKS_PER_SEC (USER_HZ) /* frequnzy at which times() counts */ 17# define CLOCKS_PER_SEC (USER_HZ) /* frequnzy at which times() counts */
18#else
19# define HZ 100
20#endif
21
22#define EXEC_PAGESIZE 4096
23
24#ifndef NGROUPS
25#define NGROUPS 32
26#endif
27
28#ifndef NOGROUP
29#define NOGROUP (-1)
30#endif
31
32#define MAXHOSTNAMELEN 64 /* max length of hostname */
33
34#endif /* _XTENSA_PARAM_H */ 18#endif /* _XTENSA_PARAM_H */
diff --git a/arch/xtensa/include/asm/percpu.h b/arch/xtensa/include/asm/percpu.h
deleted file mode 100644
index 6d2bc2ada9d1..000000000000
--- a/arch/xtensa/include/asm/percpu.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * linux/include/asm-xtensa/percpu.h
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 2001 - 2005 Tensilica Inc.
9 */
10
11#ifndef _XTENSA_PERCPU__
12#define _XTENSA_PERCPU__
13
14#include <asm-generic/percpu.h>
15
16#endif /* _XTENSA_PERCPU__ */
diff --git a/arch/xtensa/include/asm/ptrace.h b/arch/xtensa/include/asm/ptrace.h
index d85d38da8eec..da21c17f23aa 100644
--- a/arch/xtensa/include/asm/ptrace.h
+++ b/arch/xtensa/include/asm/ptrace.h
@@ -7,73 +7,11 @@
7 * 7 *
8 * Copyright (C) 2001 - 2005 Tensilica Inc. 8 * Copyright (C) 2001 - 2005 Tensilica Inc.
9 */ 9 */
10
11#ifndef _XTENSA_PTRACE_H 10#ifndef _XTENSA_PTRACE_H
12#define _XTENSA_PTRACE_H 11#define _XTENSA_PTRACE_H
13 12
14/* 13#include <uapi/asm/ptrace.h>
15 * Kernel stack
16 *
17 * +-----------------------+ -------- STACK_SIZE
18 * | register file | |
19 * +-----------------------+ |
20 * | struct pt_regs | |
21 * +-----------------------+ | ------ PT_REGS_OFFSET
22 * double : 16 bytes spill area : | ^
23 * excetion :- - - - - - - - - - - -: | |
24 * frame : struct pt_regs : | |
25 * :- - - - - - - - - - - -: | |
26 * | | | |
27 * | memory stack | | |
28 * | | | |
29 * ~ ~ ~ ~
30 * ~ ~ ~ ~
31 * | | | |
32 * | | | |
33 * +-----------------------+ | | --- STACK_BIAS
34 * | struct task_struct | | | ^
35 * current --> +-----------------------+ | | |
36 * | struct thread_info | | | |
37 * +-----------------------+ --------
38 */
39
40#define KERNEL_STACK_SIZE (2 * PAGE_SIZE)
41
42/* Offsets for exception_handlers[] (3 x 64-entries x 4-byte tables). */
43
44#define EXC_TABLE_KSTK 0x004 /* Kernel Stack */
45#define EXC_TABLE_DOUBLE_SAVE 0x008 /* Double exception save area for a0 */
46#define EXC_TABLE_FIXUP 0x00c /* Fixup handler */
47#define EXC_TABLE_PARAM 0x010 /* For passing a parameter to fixup */
48#define EXC_TABLE_SYSCALL_SAVE 0x014 /* For fast syscall handler */
49#define EXC_TABLE_FAST_USER 0x100 /* Fast user exception handler */
50#define EXC_TABLE_FAST_KERNEL 0x200 /* Fast kernel exception handler */
51#define EXC_TABLE_DEFAULT 0x300 /* Default C-Handler */
52#define EXC_TABLE_SIZE 0x400
53 14
54/* Registers used by strace */
55
56#define REG_A_BASE 0x0000
57#define REG_AR_BASE 0x0100
58#define REG_PC 0x0020
59#define REG_PS 0x02e6
60#define REG_WB 0x0248
61#define REG_WS 0x0249
62#define REG_LBEG 0x0200
63#define REG_LEND 0x0201
64#define REG_LCOUNT 0x0202
65#define REG_SAR 0x0203
66
67#define SYSCALL_NR 0x00ff
68
69/* Other PTRACE_ values defined in <linux/ptrace.h> using values 0-9,16,17,24 */
70
71#define PTRACE_GETREGS 12
72#define PTRACE_SETREGS 13
73#define PTRACE_GETXTREGS 18
74#define PTRACE_SETXTREGS 19
75
76#ifdef __KERNEL__
77 15
78#ifndef __ASSEMBLY__ 16#ifndef __ASSEMBLY__
79 17
@@ -132,6 +70,4 @@ struct pt_regs {
132 70
133#endif /* !__ASSEMBLY__ */ 71#endif /* !__ASSEMBLY__ */
134 72
135#endif /* __KERNEL__ */
136
137#endif /* _XTENSA_PTRACE_H */ 73#endif /* _XTENSA_PTRACE_H */
diff --git a/arch/xtensa/include/asm/regs.h b/arch/xtensa/include/asm/regs.h
index a3075b12aff1..8a8aa61ccc8d 100644
--- a/arch/xtensa/include/asm/regs.h
+++ b/arch/xtensa/include/asm/regs.h
@@ -27,52 +27,15 @@
27 27
28/* Special registers. */ 28/* Special registers. */
29 29
30#define LBEG 0 30#define SREG_MR 32
31#define LEND 1 31#define SREG_IBREAKA 128
32#define LCOUNT 2 32#define SREG_DBREAKA 144
33#define SAR 3 33#define SREG_DBREAKC 160
34#define BR 4 34#define SREG_EPC 176
35#define SCOMPARE1 12 35#define SREG_EPS 192
36#define ACCHI 16 36#define SREG_EXCSAVE 208
37#define ACCLO 17 37#define SREG_CCOMPARE 240
38#define MR 32 38#define SREG_MISC 244
39#define WINDOWBASE 72
40#define WINDOWSTART 73
41#define PTEVADDR 83
42#define RASID 90
43#define ITLBCFG 91
44#define DTLBCFG 92
45#define IBREAKENABLE 96
46#define DDR 104
47#define IBREAKA 128
48#define DBREAKA 144
49#define DBREAKC 160
50#define EPC 176
51#define EPC_1 177
52#define DEPC 192
53#define EPS 192
54#define EPS_1 193
55#define EXCSAVE 208
56#define EXCSAVE_1 209
57#define INTERRUPT 226
58#define INTENABLE 228
59#define PS 230
60#define THREADPTR 231
61#define EXCCAUSE 232
62#define DEBUGCAUSE 233
63#define CCOUNT 234
64#define PRID 235
65#define ICOUNT 236
66#define ICOUNTLEVEL 237
67#define EXCVADDR 238
68#define CCOMPARE 240
69#define MISC_SR 244
70
71/* Special names for read-only and write-only interrupt registers. */
72
73#define INTREAD 226
74#define INTSET 226
75#define INTCLEAR 227
76 39
77/* EXCCAUSE register fields */ 40/* EXCCAUSE register fields */
78 41
diff --git a/arch/xtensa/include/asm/resource.h b/arch/xtensa/include/asm/resource.h
deleted file mode 100644
index 17b5ab311771..000000000000
--- a/arch/xtensa/include/asm/resource.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * include/asm-xtensa/resource.h
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 2005 Tensilica Inc.
9 */
10
11#ifndef _XTENSA_RESOURCE_H
12#define _XTENSA_RESOURCE_H
13
14#include <asm-generic/resource.h>
15
16#endif /* _XTENSA_RESOURCE_H */
diff --git a/arch/xtensa/include/asm/scatterlist.h b/arch/xtensa/include/asm/scatterlist.h
deleted file mode 100644
index a0421a61d9e1..000000000000
--- a/arch/xtensa/include/asm/scatterlist.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * include/asm-xtensa/scatterlist.h
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 2001 - 2005 Tensilica Inc.
9 */
10
11#ifndef _XTENSA_SCATTERLIST_H
12#define _XTENSA_SCATTERLIST_H
13
14#include <asm-generic/scatterlist.h>
15
16#endif /* _XTENSA_SCATTERLIST_H */
diff --git a/arch/xtensa/include/asm/sections.h b/arch/xtensa/include/asm/sections.h
deleted file mode 100644
index 40b5191b55a2..000000000000
--- a/arch/xtensa/include/asm/sections.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * include/asm-xtensa/sections.h
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 2001 - 2005 Tensilica Inc.
9 */
10
11#ifndef _XTENSA_SECTIONS_H
12#define _XTENSA_SECTIONS_H
13
14#include <asm-generic/sections.h>
15
16#endif /* _XTENSA_SECTIONS_H */
diff --git a/arch/xtensa/include/asm/siginfo.h b/arch/xtensa/include/asm/siginfo.h
deleted file mode 100644
index 6916248295df..000000000000
--- a/arch/xtensa/include/asm/siginfo.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * include/asm-xtensa/siginfo.h
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 2001 - 2005 Tensilica Inc.
9 */
10
11#ifndef _XTENSA_SIGINFO_H
12#define _XTENSA_SIGINFO_H
13
14#include <asm-generic/siginfo.h>
15
16#endif /* _XTENSA_SIGINFO_H */
diff --git a/arch/xtensa/include/asm/signal.h b/arch/xtensa/include/asm/signal.h
index 7f201b9d4195..72fd44c85b70 100644
--- a/arch/xtensa/include/asm/signal.h
+++ b/arch/xtensa/include/asm/signal.h
@@ -9,117 +9,12 @@
9 * 9 *
10 * Copyright (C) 2001 - 2005 Tensilica Inc. 10 * Copyright (C) 2001 - 2005 Tensilica Inc.
11 */ 11 */
12
13#ifndef _XTENSA_SIGNAL_H 12#ifndef _XTENSA_SIGNAL_H
14#define _XTENSA_SIGNAL_H 13#define _XTENSA_SIGNAL_H
15 14
16 15#include <uapi/asm/signal.h>
17#define _NSIG 64
18#define _NSIG_BPW 32
19#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
20
21#ifndef __ASSEMBLY__
22
23#include <linux/types.h>
24
25/* Avoid too many header ordering problems. */
26struct siginfo;
27typedef unsigned long old_sigset_t; /* at least 32 bits */
28typedef struct {
29 unsigned long sig[_NSIG_WORDS];
30} sigset_t;
31
32#endif
33
34#define SIGHUP 1
35#define SIGINT 2
36#define SIGQUIT 3
37#define SIGILL 4
38#define SIGTRAP 5
39#define SIGABRT 6
40#define SIGIOT 6
41#define SIGBUS 7
42#define SIGFPE 8
43#define SIGKILL 9
44#define SIGUSR1 10
45#define SIGSEGV 11
46#define SIGUSR2 12
47#define SIGPIPE 13
48#define SIGALRM 14
49#define SIGTERM 15
50#define SIGSTKFLT 16
51#define SIGCHLD 17
52#define SIGCONT 18
53#define SIGSTOP 19
54#define SIGTSTP 20
55#define SIGTTIN 21
56#define SIGTTOU 22
57#define SIGURG 23
58#define SIGXCPU 24
59#define SIGXFSZ 25
60#define SIGVTALRM 26
61#define SIGPROF 27
62#define SIGWINCH 28
63#define SIGIO 29
64#define SIGPOLL SIGIO
65/* #define SIGLOST 29 */
66#define SIGPWR 30
67#define SIGSYS 31
68#define SIGUNUSED 31
69
70/* These should not be considered constants from userland. */
71#define SIGRTMIN 32
72#define SIGRTMAX (_NSIG-1)
73
74/*
75 * SA_FLAGS values:
76 *
77 * SA_ONSTACK indicates that a registered stack_t will be used.
78 * SA_RESTART flag to get restarting signals (which were the default long ago)
79 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
80 * SA_RESETHAND clears the handler when the signal is delivered.
81 * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
82 * SA_NODEFER prevents the current signal from being masked in the handler.
83 *
84 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
85 * Unix names RESETHAND and NODEFER respectively.
86 */
87#define SA_NOCLDSTOP 0x00000001
88#define SA_NOCLDWAIT 0x00000002 /* not supported yet */
89#define SA_SIGINFO 0x00000004
90#define SA_ONSTACK 0x08000000
91#define SA_RESTART 0x10000000
92#define SA_NODEFER 0x40000000
93#define SA_RESETHAND 0x80000000
94
95#define SA_NOMASK SA_NODEFER
96#define SA_ONESHOT SA_RESETHAND
97
98#define SA_RESTORER 0x04000000
99
100/*
101 * sigaltstack controls
102 */
103#define SS_ONSTACK 1
104#define SS_DISABLE 2
105
106#define MINSIGSTKSZ 2048
107#define SIGSTKSZ 8192
108 16
109#ifndef __ASSEMBLY__ 17#ifndef __ASSEMBLY__
110
111#define SIG_BLOCK 0 /* for blocking signals */
112#define SIG_UNBLOCK 1 /* for unblocking signals */
113#define SIG_SETMASK 2 /* for setting the signal mask */
114
115/* Type of a signal handler. */
116typedef void (*__sighandler_t)(int);
117
118#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
119#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
120#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
121
122#ifdef __KERNEL__
123struct sigaction { 18struct sigaction {
124 __sighandler_t sa_handler; 19 __sighandler_t sa_handler;
125 unsigned long sa_flags; 20 unsigned long sa_flags;
@@ -131,35 +26,8 @@ struct k_sigaction {
131 struct sigaction sa; 26 struct sigaction sa;
132}; 27};
133 28
134#else
135
136/* Here we must cater to libcs that poke about in kernel headers. */
137
138struct sigaction {
139 union {
140 __sighandler_t _sa_handler;
141 void (*_sa_sigaction)(int, struct siginfo *, void *);
142 } _u;
143 sigset_t sa_mask;
144 unsigned long sa_flags;
145 void (*sa_restorer)(void);
146};
147
148#define sa_handler _u._sa_handler
149#define sa_sigaction _u._sa_sigaction
150
151#endif /* __KERNEL__ */
152
153typedef struct sigaltstack {
154 void *ss_sp;
155 int ss_flags;
156 size_t ss_size;
157} stack_t;
158
159#ifdef __KERNEL__
160#include <asm/sigcontext.h> 29#include <asm/sigcontext.h>
161#define ptrace_signal_deliver(regs, cookie) do { } while (0) 30#define ptrace_signal_deliver(regs, cookie) do { } while (0)
162 31
163#endif /* __KERNEL__ */
164#endif /* __ASSEMBLY__ */ 32#endif /* __ASSEMBLY__ */
165#endif /* _XTENSA_SIGNAL_H */ 33#endif /* _XTENSA_SIGNAL_H */
diff --git a/arch/xtensa/include/asm/statfs.h b/arch/xtensa/include/asm/statfs.h
deleted file mode 100644
index 9c3d1a213136..000000000000
--- a/arch/xtensa/include/asm/statfs.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/*
2 * include/asm-xtensa/statfs.h
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 2005 Tensilica Inc.
9 */
10
11#ifndef _XTENSA_STATFS_H
12#define _XTENSA_STATFS_H
13
14#include <asm-generic/statfs.h>
15
16#endif /* _XTENSA_STATFS_H */
17
diff --git a/arch/xtensa/include/asm/termios.h b/arch/xtensa/include/asm/termios.h
deleted file mode 100644
index 4673f42f88a7..000000000000
--- a/arch/xtensa/include/asm/termios.h
+++ /dev/null
@@ -1,105 +0,0 @@
1/*
2 * include/asm-xtensa/termios.h
3 *
4 * Copied from SH.
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 *
10 * Copyright (C) 2001 - 2005 Tensilica Inc.
11 */
12
13#ifndef _XTENSA_TERMIOS_H
14#define _XTENSA_TERMIOS_H
15
16#include <asm/termbits.h>
17#include <asm/ioctls.h>
18
19struct winsize {
20 unsigned short ws_row;
21 unsigned short ws_col;
22 unsigned short ws_xpixel;
23 unsigned short ws_ypixel;
24};
25
26#define NCC 8
27struct termio {
28 unsigned short c_iflag; /* input mode flags */
29 unsigned short c_oflag; /* output mode flags */
30 unsigned short c_cflag; /* control mode flags */
31 unsigned short c_lflag; /* local mode flags */
32 unsigned char c_line; /* line discipline */
33 unsigned char c_cc[NCC]; /* control characters */
34};
35
36/* Modem lines */
37
38#define TIOCM_LE 0x001
39#define TIOCM_DTR 0x002
40#define TIOCM_RTS 0x004
41#define TIOCM_ST 0x008
42#define TIOCM_SR 0x010
43#define TIOCM_CTS 0x020
44#define TIOCM_CAR 0x040
45#define TIOCM_RNG 0x080
46#define TIOCM_DSR 0x100
47#define TIOCM_CD TIOCM_CAR
48#define TIOCM_RI TIOCM_RNG
49#define TIOCM_OUT1 0x2000
50#define TIOCM_OUT2 0x4000
51#define TIOCM_LOOP 0x8000
52
53/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
54
55#ifdef __KERNEL__
56
57/* intr=^C quit=^\ erase=del kill=^U
58 eof=^D vtime=\0 vmin=\1 sxtc=\0
59 start=^Q stop=^S susp=^Z eol=\0
60 reprint=^R discard=^U werase=^W lnext=^V
61 eol2=\0
62*/
63#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0"
64
65/*
66 * Translate a "termio" structure into a "termios". Ugh.
67 */
68
69#define SET_LOW_TERMIOS_BITS(termios, termio, x) { \
70 unsigned short __tmp; \
71 get_user(__tmp,&(termio)->x); \
72 *(unsigned short *) &(termios)->x = __tmp; \
73}
74
75#define user_termio_to_kernel_termios(termios, termio) \
76({ \
77 SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \
78 SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \
79 SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \
80 SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \
81 copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
82})
83
84/*
85 * Translate a "termios" structure into a "termio". Ugh.
86 */
87
88#define kernel_termios_to_user_termio(termio, termios) \
89({ \
90 put_user((termios)->c_iflag, &(termio)->c_iflag); \
91 put_user((termios)->c_oflag, &(termio)->c_oflag); \
92 put_user((termios)->c_cflag, &(termio)->c_cflag); \
93 put_user((termios)->c_lflag, &(termio)->c_lflag); \
94 put_user((termios)->c_line, &(termio)->c_line); \
95 copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
96})
97
98#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2))
99#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2))
100#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios))
101#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios))
102
103#endif /* __KERNEL__ */
104
105#endif /* _XTENSA_TERMIOS_H */
diff --git a/arch/xtensa/include/asm/timex.h b/arch/xtensa/include/asm/timex.h
index 053bc4272106..175b3d5e1b01 100644
--- a/arch/xtensa/include/asm/timex.h
+++ b/arch/xtensa/include/asm/timex.h
@@ -63,10 +63,10 @@ extern cycles_t cacheflush_time;
63 * Register access. 63 * Register access.
64 */ 64 */
65 65
66#define WSR_CCOUNT(r) asm volatile ("wsr %0,"__stringify(CCOUNT) :: "a" (r)) 66#define WSR_CCOUNT(r) asm volatile ("wsr %0, ccount" :: "a" (r))
67#define RSR_CCOUNT(r) asm volatile ("rsr %0,"__stringify(CCOUNT) : "=a" (r)) 67#define RSR_CCOUNT(r) asm volatile ("rsr %0, ccount" : "=a" (r))
68#define WSR_CCOMPARE(x,r) asm volatile ("wsr %0,"__stringify(CCOMPARE)"+"__stringify(x) :: "a"(r)) 68#define WSR_CCOMPARE(x,r) asm volatile ("wsr %0,"__stringify(SREG_CCOMPARE)"+"__stringify(x) :: "a"(r))
69#define RSR_CCOMPARE(x,r) asm volatile ("rsr %0,"__stringify(CCOMPARE)"+"__stringify(x) : "=a"(r)) 69#define RSR_CCOMPARE(x,r) asm volatile ("rsr %0,"__stringify(SREG_CCOMPARE)"+"__stringify(x) : "=a"(r))
70 70
71static inline unsigned long get_ccount (void) 71static inline unsigned long get_ccount (void)
72{ 72{
diff --git a/arch/xtensa/include/asm/tlbflush.h b/arch/xtensa/include/asm/tlbflush.h
index 46d240074f74..43dd348a5a47 100644
--- a/arch/xtensa/include/asm/tlbflush.h
+++ b/arch/xtensa/include/asm/tlbflush.h
@@ -86,26 +86,26 @@ static inline void invalidate_dtlb_entry_no_isync (unsigned entry)
86 86
87static inline void set_itlbcfg_register (unsigned long val) 87static inline void set_itlbcfg_register (unsigned long val)
88{ 88{
89 __asm__ __volatile__("wsr %0, "__stringify(ITLBCFG)"\n\t" "isync\n\t" 89 __asm__ __volatile__("wsr %0, itlbcfg\n\t" "isync\n\t"
90 : : "a" (val)); 90 : : "a" (val));
91} 91}
92 92
93static inline void set_dtlbcfg_register (unsigned long val) 93static inline void set_dtlbcfg_register (unsigned long val)
94{ 94{
95 __asm__ __volatile__("wsr %0, "__stringify(DTLBCFG)"; dsync\n\t" 95 __asm__ __volatile__("wsr %0, dtlbcfg; dsync\n\t"
96 : : "a" (val)); 96 : : "a" (val));
97} 97}
98 98
99static inline void set_ptevaddr_register (unsigned long val) 99static inline void set_ptevaddr_register (unsigned long val)
100{ 100{
101 __asm__ __volatile__(" wsr %0, "__stringify(PTEVADDR)"; isync\n" 101 __asm__ __volatile__(" wsr %0, ptevaddr; isync\n"
102 : : "a" (val)); 102 : : "a" (val));
103} 103}
104 104
105static inline unsigned long read_ptevaddr_register (void) 105static inline unsigned long read_ptevaddr_register (void)
106{ 106{
107 unsigned long tmp; 107 unsigned long tmp;
108 __asm__ __volatile__("rsr %0, "__stringify(PTEVADDR)"\n\t" : "=a" (tmp)); 108 __asm__ __volatile__("rsr %0, ptevaddr\n\t" : "=a" (tmp));
109 return tmp; 109 return tmp;
110} 110}
111 111
diff --git a/arch/xtensa/include/asm/topology.h b/arch/xtensa/include/asm/topology.h
deleted file mode 100644
index 7309e38a0ccb..000000000000
--- a/arch/xtensa/include/asm/topology.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * include/asm-xtensa/topology.h
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 2001 - 2005 Tensilica Inc.
9 */
10
11#ifndef _XTENSA_TOPOLOGY_H
12#define _XTENSA_TOPOLOGY_H
13
14#include <asm-generic/topology.h>
15
16#endif /* _XTENSA_TOPOLOGY_H */
diff --git a/arch/xtensa/include/asm/types.h b/arch/xtensa/include/asm/types.h
index 6d4db7e8ffac..2b410b8c7f79 100644
--- a/arch/xtensa/include/asm/types.h
+++ b/arch/xtensa/include/asm/types.h
@@ -7,30 +7,17 @@
7 * 7 *
8 * Copyright (C) 2001 - 2005 Tensilica Inc. 8 * Copyright (C) 2001 - 2005 Tensilica Inc.
9 */ 9 */
10
11#ifndef _XTENSA_TYPES_H 10#ifndef _XTENSA_TYPES_H
12#define _XTENSA_TYPES_H 11#define _XTENSA_TYPES_H
13 12
14#include <asm-generic/int-ll64.h> 13#include <uapi/asm/types.h>
15
16#ifdef __ASSEMBLY__
17# define __XTENSA_UL(x) (x)
18# define __XTENSA_UL_CONST(x) x
19#else
20# define __XTENSA_UL(x) ((unsigned long)(x))
21# define __XTENSA_UL_CONST(x) x##UL
22#endif
23 14
24#ifndef __ASSEMBLY__ 15#ifndef __ASSEMBLY__
25
26/* 16/*
27 * These aren't exported outside the kernel to avoid name space clashes 17 * These aren't exported outside the kernel to avoid name space clashes
28 */ 18 */
29#ifdef __KERNEL__
30 19
31#define BITS_PER_LONG 32 20#define BITS_PER_LONG 32
32 21
33#endif /* __KERNEL__ */
34#endif 22#endif
35
36#endif /* _XTENSA_TYPES_H */ 23#endif /* _XTENSA_TYPES_H */
diff --git a/arch/xtensa/include/asm/unistd.h b/arch/xtensa/include/asm/unistd.h
index bc7e005faa60..9ef1c31d2c83 100644
--- a/arch/xtensa/include/asm/unistd.h
+++ b/arch/xtensa/include/asm/unistd.h
@@ -8,705 +8,8 @@
8 * Copyright (C) 2001 - 2005 Tensilica Inc. 8 * Copyright (C) 2001 - 2005 Tensilica Inc.
9 */ 9 */
10 10
11#ifndef _XTENSA_UNISTD_H 11#include <uapi/asm/unistd.h>
12#define _XTENSA_UNISTD_H
13 12
14#ifndef __SYSCALL
15# define __SYSCALL(nr,func,nargs)
16#endif
17
18#define __NR_spill 0
19__SYSCALL( 0, sys_ni_syscall, 0)
20#define __NR_xtensa 1
21__SYSCALL( 1, sys_ni_syscall, 0)
22#define __NR_available4 2
23__SYSCALL( 2, sys_ni_syscall, 0)
24#define __NR_available5 3
25__SYSCALL( 3, sys_ni_syscall, 0)
26#define __NR_available6 4
27__SYSCALL( 4, sys_ni_syscall, 0)
28#define __NR_available7 5
29__SYSCALL( 5, sys_ni_syscall, 0)
30#define __NR_available8 6
31__SYSCALL( 6, sys_ni_syscall, 0)
32#define __NR_available9 7
33__SYSCALL( 7, sys_ni_syscall, 0)
34
35/* File Operations */
36
37#define __NR_open 8
38__SYSCALL( 8, sys_open, 3)
39#define __NR_close 9
40__SYSCALL( 9, sys_close, 1)
41#define __NR_dup 10
42__SYSCALL( 10, sys_dup, 1)
43#define __NR_dup2 11
44__SYSCALL( 11, sys_dup2, 2)
45#define __NR_read 12
46__SYSCALL( 12, sys_read, 3)
47#define __NR_write 13
48__SYSCALL( 13, sys_write, 3)
49#define __NR_select 14
50__SYSCALL( 14, sys_select, 5)
51#define __NR_lseek 15
52__SYSCALL( 15, sys_lseek, 3)
53#define __NR_poll 16
54__SYSCALL( 16, sys_poll, 3)
55#define __NR__llseek 17
56__SYSCALL( 17, sys_llseek, 5)
57#define __NR_epoll_wait 18
58__SYSCALL( 18, sys_epoll_wait, 4)
59#define __NR_epoll_ctl 19
60__SYSCALL( 19, sys_epoll_ctl, 4)
61#define __NR_epoll_create 20
62__SYSCALL( 20, sys_epoll_create, 1)
63#define __NR_creat 21
64__SYSCALL( 21, sys_creat, 2)
65#define __NR_truncate 22
66__SYSCALL( 22, sys_truncate, 2)
67#define __NR_ftruncate 23
68__SYSCALL( 23, sys_ftruncate, 2)
69#define __NR_readv 24
70__SYSCALL( 24, sys_readv, 3)
71#define __NR_writev 25
72__SYSCALL( 25, sys_writev, 3)
73#define __NR_fsync 26
74__SYSCALL( 26, sys_fsync, 1)
75#define __NR_fdatasync 27
76__SYSCALL( 27, sys_fdatasync, 1)
77#define __NR_truncate64 28
78__SYSCALL( 28, sys_truncate64, 2)
79#define __NR_ftruncate64 29
80__SYSCALL( 29, sys_ftruncate64, 2)
81#define __NR_pread64 30
82__SYSCALL( 30, sys_pread64, 6)
83#define __NR_pwrite64 31
84__SYSCALL( 31, sys_pwrite64, 6)
85
86#define __NR_link 32
87__SYSCALL( 32, sys_link, 2)
88#define __NR_rename 33
89__SYSCALL( 33, sys_rename, 2)
90#define __NR_symlink 34
91__SYSCALL( 34, sys_symlink, 2)
92#define __NR_readlink 35
93__SYSCALL( 35, sys_readlink, 3)
94#define __NR_mknod 36
95__SYSCALL( 36, sys_mknod, 3)
96#define __NR_pipe 37
97__SYSCALL( 37, sys_pipe, 1)
98#define __NR_unlink 38
99__SYSCALL( 38, sys_unlink, 1)
100#define __NR_rmdir 39
101__SYSCALL( 39, sys_rmdir, 1)
102
103#define __NR_mkdir 40
104__SYSCALL( 40, sys_mkdir, 2)
105#define __NR_chdir 41
106__SYSCALL( 41, sys_chdir, 1)
107#define __NR_fchdir 42
108__SYSCALL( 42, sys_fchdir, 1)
109#define __NR_getcwd 43
110__SYSCALL( 43, sys_getcwd, 2)
111
112#define __NR_chmod 44
113__SYSCALL( 44, sys_chmod, 2)
114#define __NR_chown 45
115__SYSCALL( 45, sys_chown, 3)
116#define __NR_stat 46
117__SYSCALL( 46, sys_newstat, 2)
118#define __NR_stat64 47
119__SYSCALL( 47, sys_stat64, 2)
120
121#define __NR_lchown 48
122__SYSCALL( 48, sys_lchown, 3)
123#define __NR_lstat 49
124__SYSCALL( 49, sys_newlstat, 2)
125#define __NR_lstat64 50
126__SYSCALL( 50, sys_lstat64, 2)
127#define __NR_available51 51
128__SYSCALL( 51, sys_ni_syscall, 0)
129
130#define __NR_fchmod 52
131__SYSCALL( 52, sys_fchmod, 2)
132#define __NR_fchown 53
133__SYSCALL( 53, sys_fchown, 3)
134#define __NR_fstat 54
135__SYSCALL( 54, sys_newfstat, 2)
136#define __NR_fstat64 55
137__SYSCALL( 55, sys_fstat64, 2)
138
139#define __NR_flock 56
140__SYSCALL( 56, sys_flock, 2)
141#define __NR_access 57
142__SYSCALL( 57, sys_access, 2)
143#define __NR_umask 58
144__SYSCALL( 58, sys_umask, 1)
145#define __NR_getdents 59
146__SYSCALL( 59, sys_getdents, 3)
147#define __NR_getdents64 60
148__SYSCALL( 60, sys_getdents64, 3)
149#define __NR_fcntl64 61
150__SYSCALL( 61, sys_fcntl64, 3)
151#define __NR_available62 62
152__SYSCALL( 62, sys_ni_syscall, 0)
153#define __NR_fadvise64_64 63
154__SYSCALL( 63, xtensa_fadvise64_64, 6)
155#define __NR_utime 64 /* glibc 2.3.3 ?? */
156__SYSCALL( 64, sys_utime, 2)
157#define __NR_utimes 65
158__SYSCALL( 65, sys_utimes, 2)
159#define __NR_ioctl 66
160__SYSCALL( 66, sys_ioctl, 3)
161#define __NR_fcntl 67
162__SYSCALL( 67, sys_fcntl, 3)
163
164#define __NR_setxattr 68
165__SYSCALL( 68, sys_setxattr, 5)
166#define __NR_getxattr 69
167__SYSCALL( 69, sys_getxattr, 4)
168#define __NR_listxattr 70
169__SYSCALL( 70, sys_listxattr, 3)
170#define __NR_removexattr 71
171__SYSCALL( 71, sys_removexattr, 2)
172#define __NR_lsetxattr 72
173__SYSCALL( 72, sys_lsetxattr, 5)
174#define __NR_lgetxattr 73
175__SYSCALL( 73, sys_lgetxattr, 4)
176#define __NR_llistxattr 74
177__SYSCALL( 74, sys_llistxattr, 3)
178#define __NR_lremovexattr 75
179__SYSCALL( 75, sys_lremovexattr, 2)
180#define __NR_fsetxattr 76
181__SYSCALL( 76, sys_fsetxattr, 5)
182#define __NR_fgetxattr 77
183__SYSCALL( 77, sys_fgetxattr, 4)
184#define __NR_flistxattr 78
185__SYSCALL( 78, sys_flistxattr, 3)
186#define __NR_fremovexattr 79
187__SYSCALL( 79, sys_fremovexattr, 2)
188
189/* File Map / Shared Memory Operations */
190
191#define __NR_mmap2 80
192__SYSCALL( 80, sys_mmap_pgoff, 6)
193#define __NR_munmap 81
194__SYSCALL( 81, sys_munmap, 2)
195#define __NR_mprotect 82
196__SYSCALL( 82, sys_mprotect, 3)
197#define __NR_brk 83
198__SYSCALL( 83, sys_brk, 1)
199#define __NR_mlock 84
200__SYSCALL( 84, sys_mlock, 2)
201#define __NR_munlock 85
202__SYSCALL( 85, sys_munlock, 2)
203#define __NR_mlockall 86
204__SYSCALL( 86, sys_mlockall, 1)
205#define __NR_munlockall 87
206__SYSCALL( 87, sys_munlockall, 0)
207#define __NR_mremap 88
208__SYSCALL( 88, sys_mremap, 4)
209#define __NR_msync 89
210__SYSCALL( 89, sys_msync, 3)
211#define __NR_mincore 90
212__SYSCALL( 90, sys_mincore, 3)
213#define __NR_madvise 91
214__SYSCALL( 91, sys_madvise, 3)
215#define __NR_shmget 92
216__SYSCALL( 92, sys_shmget, 4)
217#define __NR_shmat 93
218__SYSCALL( 93, xtensa_shmat, 4)
219#define __NR_shmctl 94
220__SYSCALL( 94, sys_shmctl, 4)
221#define __NR_shmdt 95
222__SYSCALL( 95, sys_shmdt, 4)
223
224/* Socket Operations */
225
226#define __NR_socket 96
227__SYSCALL( 96, sys_socket, 3)
228#define __NR_setsockopt 97
229__SYSCALL( 97, sys_setsockopt, 5)
230#define __NR_getsockopt 98
231__SYSCALL( 98, sys_getsockopt, 5)
232#define __NR_shutdown 99
233__SYSCALL( 99, sys_shutdown, 2)
234
235#define __NR_bind 100
236__SYSCALL(100, sys_bind, 3)
237#define __NR_connect 101
238__SYSCALL(101, sys_connect, 3)
239#define __NR_listen 102
240__SYSCALL(102, sys_listen, 2)
241#define __NR_accept 103
242__SYSCALL(103, sys_accept, 3)
243
244#define __NR_getsockname 104
245__SYSCALL(104, sys_getsockname, 3)
246#define __NR_getpeername 105
247__SYSCALL(105, sys_getpeername, 3)
248#define __NR_sendmsg 106
249__SYSCALL(106, sys_sendmsg, 3)
250#define __NR_recvmsg 107
251__SYSCALL(107, sys_recvmsg, 3)
252#define __NR_send 108
253__SYSCALL(108, sys_send, 4)
254#define __NR_recv 109
255__SYSCALL(109, sys_recv, 4)
256#define __NR_sendto 110
257__SYSCALL(110, sys_sendto, 6)
258#define __NR_recvfrom 111
259__SYSCALL(111, sys_recvfrom, 6)
260
261#define __NR_socketpair 112
262__SYSCALL(112, sys_socketpair, 4)
263#define __NR_sendfile 113
264__SYSCALL(113, sys_sendfile, 4)
265#define __NR_sendfile64 114
266__SYSCALL(114, sys_sendfile64, 4)
267#define __NR_available115 115
268__SYSCALL(115, sys_ni_syscall, 0)
269
270/* Process Operations */
271
272#define __NR_clone 116
273__SYSCALL(116, xtensa_clone, 5)
274#define __NR_execve 117
275__SYSCALL(117, xtensa_execve, 3)
276#define __NR_exit 118
277__SYSCALL(118, sys_exit, 1)
278#define __NR_exit_group 119
279__SYSCALL(119, sys_exit_group, 1)
280#define __NR_getpid 120
281__SYSCALL(120, sys_getpid, 0)
282#define __NR_wait4 121
283__SYSCALL(121, sys_wait4, 4)
284#define __NR_waitid 122
285__SYSCALL(122, sys_waitid, 5)
286#define __NR_kill 123
287__SYSCALL(123, sys_kill, 2)
288#define __NR_tkill 124
289__SYSCALL(124, sys_tkill, 2)
290#define __NR_tgkill 125
291__SYSCALL(125, sys_tgkill, 3)
292#define __NR_set_tid_address 126
293__SYSCALL(126, sys_set_tid_address, 1)
294#define __NR_gettid 127
295__SYSCALL(127, sys_gettid, 0)
296#define __NR_setsid 128
297__SYSCALL(128, sys_setsid, 0)
298#define __NR_getsid 129
299__SYSCALL(129, sys_getsid, 1)
300#define __NR_prctl 130
301__SYSCALL(130, sys_prctl, 5)
302#define __NR_personality 131
303__SYSCALL(131, sys_personality, 1)
304#define __NR_getpriority 132
305__SYSCALL(132, sys_getpriority, 2)
306#define __NR_setpriority 133
307__SYSCALL(133, sys_setpriority, 3)
308#define __NR_setitimer 134
309__SYSCALL(134, sys_setitimer, 3)
310#define __NR_getitimer 135
311__SYSCALL(135, sys_getitimer, 2)
312#define __NR_setuid 136
313__SYSCALL(136, sys_setuid, 1)
314#define __NR_getuid 137
315__SYSCALL(137, sys_getuid, 0)
316#define __NR_setgid 138
317__SYSCALL(138, sys_setgid, 1)
318#define __NR_getgid 139
319__SYSCALL(139, sys_getgid, 0)
320#define __NR_geteuid 140
321__SYSCALL(140, sys_geteuid, 0)
322#define __NR_getegid 141
323__SYSCALL(141, sys_getegid, 0)
324#define __NR_setreuid 142
325__SYSCALL(142, sys_setreuid, 2)
326#define __NR_setregid 143
327__SYSCALL(143, sys_setregid, 2)
328#define __NR_setresuid 144
329__SYSCALL(144, sys_setresuid, 3)
330#define __NR_getresuid 145
331__SYSCALL(145, sys_getresuid, 3)
332#define __NR_setresgid 146
333__SYSCALL(146, sys_setresgid, 3)
334#define __NR_getresgid 147
335__SYSCALL(147, sys_getresgid, 3)
336#define __NR_setpgid 148
337__SYSCALL(148, sys_setpgid, 2)
338#define __NR_getpgid 149
339__SYSCALL(149, sys_getpgid, 1)
340#define __NR_getppid 150
341__SYSCALL(150, sys_getppid, 0)
342#define __NR_getpgrp 151
343__SYSCALL(151, sys_getpgrp, 0)
344
345#define __NR_reserved152 152 /* set_thread_area */
346__SYSCALL(152, sys_ni_syscall, 0)
347#define __NR_reserved153 153 /* get_thread_area */
348__SYSCALL(153, sys_ni_syscall, 0)
349#define __NR_times 154
350__SYSCALL(154, sys_times, 1)
351#define __NR_acct 155
352__SYSCALL(155, sys_acct, 1)
353#define __NR_sched_setaffinity 156
354__SYSCALL(156, sys_sched_setaffinity, 3)
355#define __NR_sched_getaffinity 157
356__SYSCALL(157, sys_sched_getaffinity, 3)
357#define __NR_capget 158
358__SYSCALL(158, sys_capget, 2)
359#define __NR_capset 159
360__SYSCALL(159, sys_capset, 2)
361#define __NR_ptrace 160
362__SYSCALL(160, sys_ptrace, 4)
363#define __NR_semtimedop 161
364__SYSCALL(161, sys_semtimedop, 5)
365#define __NR_semget 162
366__SYSCALL(162, sys_semget, 4)
367#define __NR_semop 163
368__SYSCALL(163, sys_semop, 4)
369#define __NR_semctl 164
370__SYSCALL(164, sys_semctl, 4)
371#define __NR_available165 165
372__SYSCALL(165, sys_ni_syscall, 0)
373#define __NR_msgget 166
374__SYSCALL(166, sys_msgget, 4)
375#define __NR_msgsnd 167
376__SYSCALL(167, sys_msgsnd, 4)
377#define __NR_msgrcv 168
378__SYSCALL(168, sys_msgrcv, 4)
379#define __NR_msgctl 169
380__SYSCALL(169, sys_msgctl, 4)
381#define __NR_available170 170
382__SYSCALL(170, sys_ni_syscall, 0)
383#define __NR_available171 171
384__SYSCALL(171, sys_ni_syscall, 0)
385
386/* File System */
387
388#define __NR_mount 172
389__SYSCALL(172, sys_mount, 5)
390#define __NR_swapon 173
391__SYSCALL(173, sys_swapon, 2)
392#define __NR_chroot 174
393__SYSCALL(174, sys_chroot, 1)
394#define __NR_pivot_root 175
395__SYSCALL(175, sys_pivot_root, 2)
396#define __NR_umount 176
397__SYSCALL(176, sys_umount, 2)
398#define __NR_swapoff 177
399__SYSCALL(177, sys_swapoff, 1)
400#define __NR_sync 178
401__SYSCALL(178, sys_sync, 0)
402#define __NR_available179 179
403__SYSCALL(179, sys_ni_syscall, 0)
404#define __NR_setfsuid 180
405__SYSCALL(180, sys_setfsuid, 1)
406#define __NR_setfsgid 181
407__SYSCALL(181, sys_setfsgid, 1)
408#define __NR_sysfs 182
409__SYSCALL(182, sys_sysfs, 3)
410#define __NR_ustat 183
411__SYSCALL(183, sys_ustat, 2)
412#define __NR_statfs 184
413__SYSCALL(184, sys_statfs, 2)
414#define __NR_fstatfs 185
415__SYSCALL(185, sys_fstatfs, 2)
416#define __NR_statfs64 186
417__SYSCALL(186, sys_statfs64, 3)
418#define __NR_fstatfs64 187
419__SYSCALL(187, sys_fstatfs64, 3)
420
421/* System */
422
423#define __NR_setrlimit 188
424__SYSCALL(188, sys_setrlimit, 2)
425#define __NR_getrlimit 189
426__SYSCALL(189, sys_getrlimit, 2)
427#define __NR_getrusage 190
428__SYSCALL(190, sys_getrusage, 2)
429#define __NR_futex 191
430__SYSCALL(191, sys_futex, 5)
431#define __NR_gettimeofday 192
432__SYSCALL(192, sys_gettimeofday, 2)
433#define __NR_settimeofday 193
434__SYSCALL(193, sys_settimeofday, 2)
435#define __NR_adjtimex 194
436__SYSCALL(194, sys_adjtimex, 1)
437#define __NR_nanosleep 195
438__SYSCALL(195, sys_nanosleep, 2)
439#define __NR_getgroups 196
440__SYSCALL(196, sys_getgroups, 2)
441#define __NR_setgroups 197
442__SYSCALL(197, sys_setgroups, 2)
443#define __NR_sethostname 198
444__SYSCALL(198, sys_sethostname, 2)
445#define __NR_setdomainname 199
446__SYSCALL(199, sys_setdomainname, 2)
447#define __NR_syslog 200
448__SYSCALL(200, sys_syslog, 3)
449#define __NR_vhangup 201
450__SYSCALL(201, sys_vhangup, 0)
451#define __NR_uselib 202
452__SYSCALL(202, sys_uselib, 1)
453#define __NR_reboot 203
454__SYSCALL(203, sys_reboot, 3)
455#define __NR_quotactl 204
456__SYSCALL(204, sys_quotactl, 4)
457#define __NR_nfsservctl 205
458__SYSCALL(205, sys_ni_syscall, 0)
459#define __NR__sysctl 206
460__SYSCALL(206, sys_sysctl, 1)
461#define __NR_bdflush 207
462__SYSCALL(207, sys_bdflush, 2)
463#define __NR_uname 208
464__SYSCALL(208, sys_newuname, 1)
465#define __NR_sysinfo 209
466__SYSCALL(209, sys_sysinfo, 1)
467#define __NR_init_module 210
468__SYSCALL(210, sys_init_module, 2)
469#define __NR_delete_module 211
470__SYSCALL(211, sys_delete_module, 1)
471
472#define __NR_sched_setparam 212
473__SYSCALL(212, sys_sched_setparam, 2)
474#define __NR_sched_getparam 213
475__SYSCALL(213, sys_sched_getparam, 2)
476#define __NR_sched_setscheduler 214
477__SYSCALL(214, sys_sched_setscheduler, 3)
478#define __NR_sched_getscheduler 215
479__SYSCALL(215, sys_sched_getscheduler, 1)
480#define __NR_sched_get_priority_max 216
481__SYSCALL(216, sys_sched_get_priority_max, 1)
482#define __NR_sched_get_priority_min 217
483__SYSCALL(217, sys_sched_get_priority_min, 1)
484#define __NR_sched_rr_get_interval 218
485__SYSCALL(218, sys_sched_rr_get_interval, 2)
486#define __NR_sched_yield 219
487__SYSCALL(219, sys_sched_yield, 0)
488#define __NR_available222 222
489__SYSCALL(222, sys_ni_syscall, 0)
490
491/* Signal Handling */
492
493#define __NR_restart_syscall 223
494__SYSCALL(223, sys_restart_syscall, 0)
495#define __NR_sigaltstack 224
496__SYSCALL(224, xtensa_sigaltstack, 2)
497#define __NR_rt_sigreturn 225
498__SYSCALL(225, xtensa_rt_sigreturn, 1)
499#define __NR_rt_sigaction 226
500__SYSCALL(226, sys_rt_sigaction, 4)
501#define __NR_rt_sigprocmask 227
502__SYSCALL(227, sys_rt_sigprocmask, 4)
503#define __NR_rt_sigpending 228
504__SYSCALL(228, sys_rt_sigpending, 2)
505#define __NR_rt_sigtimedwait 229
506__SYSCALL(229, sys_rt_sigtimedwait, 4)
507#define __NR_rt_sigqueueinfo 230
508__SYSCALL(230, sys_rt_sigqueueinfo, 3)
509#define __NR_rt_sigsuspend 231
510__SYSCALL(231, sys_rt_sigsuspend, 2)
511
512/* Message */
513
514#define __NR_mq_open 232
515__SYSCALL(232, sys_mq_open, 4)
516#define __NR_mq_unlink 233
517__SYSCALL(233, sys_mq_unlink, 1)
518#define __NR_mq_timedsend 234
519__SYSCALL(234, sys_mq_timedsend, 5)
520#define __NR_mq_timedreceive 235
521__SYSCALL(235, sys_mq_timedreceive, 5)
522#define __NR_mq_notify 236
523__SYSCALL(236, sys_mq_notify, 2)
524#define __NR_mq_getsetattr 237
525__SYSCALL(237, sys_mq_getsetattr, 3)
526#define __NR_available238 238
527__SYSCALL(238, sys_ni_syscall, 0)
528
529/* IO */
530
531#define __NR_io_setup 239
532__SYSCALL(239, sys_io_setup, 2)
533#define __NR_io_destroy 240
534__SYSCALL(240, sys_io_destroy, 1)
535#define __NR_io_submit 241
536__SYSCALL(241, sys_io_submit, 3)
537#define __NR_io_getevents 242
538__SYSCALL(242, sys_io_getevents, 5)
539#define __NR_io_cancel 243
540__SYSCALL(243, sys_io_cancel, 3)
541#define __NR_clock_settime 244
542__SYSCALL(244, sys_clock_settime, 2)
543#define __NR_clock_gettime 245
544__SYSCALL(245, sys_clock_gettime, 2)
545#define __NR_clock_getres 246
546__SYSCALL(246, sys_clock_getres, 2)
547#define __NR_clock_nanosleep 247
548__SYSCALL(247, sys_clock_nanosleep, 4)
549
550/* Timer */
551
552#define __NR_timer_create 248
553__SYSCALL(248, sys_timer_create, 3)
554#define __NR_timer_delete 249
555__SYSCALL(249, sys_timer_delete, 1)
556#define __NR_timer_settime 250
557__SYSCALL(250, sys_timer_settime, 4)
558#define __NR_timer_gettime 251
559__SYSCALL(251, sys_timer_gettime, 2)
560#define __NR_timer_getoverrun 252
561__SYSCALL(252, sys_timer_getoverrun, 1)
562
563/* System */
564
565#define __NR_reserved244 253
566__SYSCALL(253, sys_ni_syscall, 0)
567#define __NR_lookup_dcookie 254
568__SYSCALL(254, sys_lookup_dcookie, 4)
569#define __NR_available255 255
570__SYSCALL(255, sys_ni_syscall, 0)
571#define __NR_add_key 256
572__SYSCALL(256, sys_add_key, 5)
573#define __NR_request_key 257
574__SYSCALL(257, sys_request_key, 5)
575#define __NR_keyctl 258
576__SYSCALL(258, sys_keyctl, 5)
577#define __NR_available259 259
578__SYSCALL(259, sys_ni_syscall, 0)
579
580
581#define __NR_readahead 260
582__SYSCALL(260, sys_readahead, 5)
583#define __NR_remap_file_pages 261
584__SYSCALL(261, sys_remap_file_pages, 5)
585#define __NR_migrate_pages 262
586__SYSCALL(262, sys_migrate_pages, 0)
587#define __NR_mbind 263
588__SYSCALL(263, sys_mbind, 6)
589#define __NR_get_mempolicy 264
590__SYSCALL(264, sys_get_mempolicy, 5)
591#define __NR_set_mempolicy 265
592__SYSCALL(265, sys_set_mempolicy, 3)
593#define __NR_unshare 266
594__SYSCALL(266, sys_unshare, 1)
595#define __NR_move_pages 267
596__SYSCALL(267, sys_move_pages, 0)
597#define __NR_splice 268
598__SYSCALL(268, sys_splice, 0)
599#define __NR_tee 269
600__SYSCALL(269, sys_tee, 0)
601#define __NR_vmsplice 270
602__SYSCALL(270, sys_vmsplice, 0)
603#define __NR_available271 271
604__SYSCALL(271, sys_ni_syscall, 0)
605
606#define __NR_pselect6 272
607__SYSCALL(272, sys_pselect6, 0)
608#define __NR_ppoll 273
609__SYSCALL(273, sys_ppoll, 0)
610#define __NR_epoll_pwait 274
611__SYSCALL(274, sys_epoll_pwait, 0)
612#define __NR_available275 275
613__SYSCALL(275, sys_ni_syscall, 0)
614
615#define __NR_inotify_init 276
616__SYSCALL(276, sys_inotify_init, 0)
617#define __NR_inotify_add_watch 277
618__SYSCALL(277, sys_inotify_add_watch, 3)
619#define __NR_inotify_rm_watch 278
620__SYSCALL(278, sys_inotify_rm_watch, 2)
621#define __NR_available279 279
622__SYSCALL(279, sys_ni_syscall, 0)
623
624#define __NR_getcpu 280
625__SYSCALL(280, sys_getcpu, 0)
626#define __NR_kexec_load 281
627__SYSCALL(281, sys_ni_syscall, 0)
628
629#define __NR_ioprio_set 282
630__SYSCALL(282, sys_ioprio_set, 2)
631#define __NR_ioprio_get 283
632__SYSCALL(283, sys_ioprio_get, 3)
633
634#define __NR_set_robust_list 284
635__SYSCALL(284, sys_set_robust_list, 3)
636#define __NR_get_robust_list 285
637__SYSCALL(285, sys_get_robust_list, 3)
638#define __NR_reserved286 286 /* sync_file_rangeX */
639__SYSCALL(286, sys_ni_syscall, 3)
640#define __NR_available287 287
641__SYSCALL(287, sys_faccessat, 0)
642
643/* Relative File Operations */
644
645#define __NR_openat 288
646__SYSCALL(288, sys_openat, 4)
647#define __NR_mkdirat 289
648__SYSCALL(289, sys_mkdirat, 3)
649#define __NR_mknodat 290
650__SYSCALL(290, sys_mknodat, 4)
651#define __NR_unlinkat 291
652__SYSCALL(291, sys_unlinkat, 3)
653#define __NR_renameat 292
654__SYSCALL(292, sys_renameat, 4)
655#define __NR_linkat 293
656__SYSCALL(293, sys_linkat, 5)
657#define __NR_symlinkat 294
658__SYSCALL(294, sys_symlinkat, 3)
659#define __NR_readlinkat 295
660__SYSCALL(295, sys_readlinkat, 4)
661#define __NR_utimensat 296
662__SYSCALL(296, sys_utimensat, 0)
663#define __NR_fchownat 297
664__SYSCALL(297, sys_fchownat, 5)
665#define __NR_futimesat 298
666__SYSCALL(298, sys_futimesat, 4)
667#define __NR_fstatat64 299
668__SYSCALL(299, sys_fstatat64, 0)
669#define __NR_fchmodat 300
670__SYSCALL(300, sys_fchmodat, 4)
671#define __NR_faccessat 301
672__SYSCALL(301, sys_faccessat, 4)
673#define __NR_available302 302
674__SYSCALL(302, sys_ni_syscall, 0)
675#define __NR_available303 303
676__SYSCALL(303, sys_ni_syscall, 0)
677
678#define __NR_signalfd 304
679__SYSCALL(304, sys_signalfd, 3)
680/* 305 was __NR_timerfd */
681__SYSCALL(305, sys_ni_syscall, 0)
682#define __NR_eventfd 306
683__SYSCALL(306, sys_eventfd, 1)
684#define __NR_recvmmsg 307
685__SYSCALL(307, sys_recvmmsg, 5)
686#define __NR_setns 308
687__SYSCALL(308, sys_setns, 2)
688
689#define __NR_syscall_count 309
690
691/*
692 * sysxtensa syscall handler
693 *
694 * int sysxtensa (SYS_XTENSA_ATOMIC_SET, ptr, val, unused);
695 * int sysxtensa (SYS_XTENSA_ATOMIC_ADD, ptr, val, unused);
696 * int sysxtensa (SYS_XTENSA_ATOMIC_EXG_ADD, ptr, val, unused);
697 * int sysxtensa (SYS_XTENSA_ATOMIC_CMP_SWP, ptr, oldval, newval);
698 * a2 a6 a3 a4 a5
699 */
700
701#define SYS_XTENSA_RESERVED 0 /* don't use this */
702#define SYS_XTENSA_ATOMIC_SET 1 /* set variable */
703#define SYS_XTENSA_ATOMIC_EXG_ADD 2 /* exchange memory and add */
704#define SYS_XTENSA_ATOMIC_ADD 3 /* add to memory */
705#define SYS_XTENSA_ATOMIC_CMP_SWP 4 /* compare and swap */
706
707#define SYS_XTENSA_COUNT 5 /* count */
708
709#ifdef __KERNEL__
710 13
711/* 14/*
712 * "Conditional" syscalls 15 * "Conditional" syscalls
@@ -734,6 +37,3 @@ __SYSCALL(308, sys_setns, 2)
734#define __IGNORE_mmap /* use mmap2 */ 37#define __IGNORE_mmap /* use mmap2 */
735#define __IGNORE_vfork /* use clone */ 38#define __IGNORE_vfork /* use clone */
736#define __IGNORE_fadvise64 /* use fadvise64_64 */ 39#define __IGNORE_fadvise64 /* use fadvise64_64 */
737
738#endif /* __KERNEL__ */
739#endif /* _XTENSA_UNISTD_H */
diff --git a/arch/xtensa/include/asm/xor.h b/arch/xtensa/include/asm/xor.h
deleted file mode 100644
index e7b1f083991d..000000000000
--- a/arch/xtensa/include/asm/xor.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * include/asm-xtensa/xor.h
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 2001 - 2005 Tensilica Inc.
9 */
10
11#ifndef _XTENSA_XOR_H
12#define _XTENSA_XOR_H
13
14#include <asm-generic/xor.h>
15
16#endif
diff --git a/arch/xtensa/include/uapi/asm/Kbuild b/arch/xtensa/include/uapi/asm/Kbuild
index baebb3da1d44..56aad54e7fb7 100644
--- a/arch/xtensa/include/uapi/asm/Kbuild
+++ b/arch/xtensa/include/uapi/asm/Kbuild
@@ -1,3 +1,25 @@
1# UAPI Header export list 1# UAPI Header export list
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3 3
4header-y += auxvec.h
5header-y += byteorder.h
6header-y += ioctls.h
7header-y += ipcbuf.h
8header-y += mman.h
9header-y += msgbuf.h
10header-y += param.h
11header-y += poll.h
12header-y += posix_types.h
13header-y += ptrace.h
14header-y += sembuf.h
15header-y += setup.h
16header-y += shmbuf.h
17header-y += sigcontext.h
18header-y += signal.h
19header-y += socket.h
20header-y += sockios.h
21header-y += stat.h
22header-y += swab.h
23header-y += termbits.h
24header-y += types.h
25header-y += unistd.h
diff --git a/arch/xtensa/include/asm/auxvec.h b/arch/xtensa/include/uapi/asm/auxvec.h
index 257dec75c5af..257dec75c5af 100644
--- a/arch/xtensa/include/asm/auxvec.h
+++ b/arch/xtensa/include/uapi/asm/auxvec.h
diff --git a/arch/xtensa/include/asm/byteorder.h b/arch/xtensa/include/uapi/asm/byteorder.h
index 54eb6315349c..54eb6315349c 100644
--- a/arch/xtensa/include/asm/byteorder.h
+++ b/arch/xtensa/include/uapi/asm/byteorder.h
diff --git a/arch/xtensa/include/asm/ioctls.h b/arch/xtensa/include/uapi/asm/ioctls.h
index 2aa4cd9f0cec..2aa4cd9f0cec 100644
--- a/arch/xtensa/include/asm/ioctls.h
+++ b/arch/xtensa/include/uapi/asm/ioctls.h
diff --git a/arch/xtensa/include/asm/ipcbuf.h b/arch/xtensa/include/uapi/asm/ipcbuf.h
index c33aa6a42145..c33aa6a42145 100644
--- a/arch/xtensa/include/asm/ipcbuf.h
+++ b/arch/xtensa/include/uapi/asm/ipcbuf.h
diff --git a/arch/xtensa/include/asm/mman.h b/arch/xtensa/include/uapi/asm/mman.h
index 25bc6c1309c3..25bc6c1309c3 100644
--- a/arch/xtensa/include/asm/mman.h
+++ b/arch/xtensa/include/uapi/asm/mman.h
diff --git a/arch/xtensa/include/asm/msgbuf.h b/arch/xtensa/include/uapi/asm/msgbuf.h
index 693c96755280..693c96755280 100644
--- a/arch/xtensa/include/asm/msgbuf.h
+++ b/arch/xtensa/include/uapi/asm/msgbuf.h
diff --git a/arch/xtensa/include/uapi/asm/param.h b/arch/xtensa/include/uapi/asm/param.h
new file mode 100644
index 000000000000..87bc2eae630e
--- /dev/null
+++ b/arch/xtensa/include/uapi/asm/param.h
@@ -0,0 +1,30 @@
1/*
2 * include/asm-xtensa/param.h
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 2001 - 2005 Tensilica Inc.
9 */
10
11#ifndef _UAPI_XTENSA_PARAM_H
12#define _UAPI_XTENSA_PARAM_H
13
14#ifndef __KERNEL__
15# define HZ 100
16#endif
17
18#define EXEC_PAGESIZE 4096
19
20#ifndef NGROUPS
21#define NGROUPS 32
22#endif
23
24#ifndef NOGROUP
25#define NOGROUP (-1)
26#endif
27
28#define MAXHOSTNAMELEN 64 /* max length of hostname */
29
30#endif /* _UAPI_XTENSA_PARAM_H */
diff --git a/arch/xtensa/include/asm/poll.h b/arch/xtensa/include/uapi/asm/poll.h
index 9d2d5993f068..9d2d5993f068 100644
--- a/arch/xtensa/include/asm/poll.h
+++ b/arch/xtensa/include/uapi/asm/poll.h
diff --git a/arch/xtensa/include/asm/posix_types.h b/arch/xtensa/include/uapi/asm/posix_types.h
index 6e96be0d02d3..6e96be0d02d3 100644
--- a/arch/xtensa/include/asm/posix_types.h
+++ b/arch/xtensa/include/uapi/asm/posix_types.h
diff --git a/arch/xtensa/include/uapi/asm/ptrace.h b/arch/xtensa/include/uapi/asm/ptrace.h
new file mode 100644
index 000000000000..ee17aa842fdf
--- /dev/null
+++ b/arch/xtensa/include/uapi/asm/ptrace.h
@@ -0,0 +1,77 @@
1/*
2 * include/asm-xtensa/ptrace.h
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 2001 - 2005 Tensilica Inc.
9 */
10
11#ifndef _UAPI_XTENSA_PTRACE_H
12#define _UAPI_XTENSA_PTRACE_H
13
14/*
15 * Kernel stack
16 *
17 * +-----------------------+ -------- STACK_SIZE
18 * | register file | |
19 * +-----------------------+ |
20 * | struct pt_regs | |
21 * +-----------------------+ | ------ PT_REGS_OFFSET
22 * double : 16 bytes spill area : | ^
23 * excetion :- - - - - - - - - - - -: | |
24 * frame : struct pt_regs : | |
25 * :- - - - - - - - - - - -: | |
26 * | | | |
27 * | memory stack | | |
28 * | | | |
29 * ~ ~ ~ ~
30 * ~ ~ ~ ~
31 * | | | |
32 * | | | |
33 * +-----------------------+ | | --- STACK_BIAS
34 * | struct task_struct | | | ^
35 * current --> +-----------------------+ | | |
36 * | struct thread_info | | | |
37 * +-----------------------+ --------
38 */
39
40#define KERNEL_STACK_SIZE (2 * PAGE_SIZE)
41
42/* Offsets for exception_handlers[] (3 x 64-entries x 4-byte tables). */
43
44#define EXC_TABLE_KSTK 0x004 /* Kernel Stack */
45#define EXC_TABLE_DOUBLE_SAVE 0x008 /* Double exception save area for a0 */
46#define EXC_TABLE_FIXUP 0x00c /* Fixup handler */
47#define EXC_TABLE_PARAM 0x010 /* For passing a parameter to fixup */
48#define EXC_TABLE_SYSCALL_SAVE 0x014 /* For fast syscall handler */
49#define EXC_TABLE_FAST_USER 0x100 /* Fast user exception handler */
50#define EXC_TABLE_FAST_KERNEL 0x200 /* Fast kernel exception handler */
51#define EXC_TABLE_DEFAULT 0x300 /* Default C-Handler */
52#define EXC_TABLE_SIZE 0x400
53
54/* Registers used by strace */
55
56#define REG_A_BASE 0x0000
57#define REG_AR_BASE 0x0100
58#define REG_PC 0x0020
59#define REG_PS 0x02e6
60#define REG_WB 0x0248
61#define REG_WS 0x0249
62#define REG_LBEG 0x0200
63#define REG_LEND 0x0201
64#define REG_LCOUNT 0x0202
65#define REG_SAR 0x0203
66
67#define SYSCALL_NR 0x00ff
68
69/* Other PTRACE_ values defined in <linux/ptrace.h> using values 0-9,16,17,24 */
70
71#define PTRACE_GETREGS 12
72#define PTRACE_SETREGS 13
73#define PTRACE_GETXTREGS 18
74#define PTRACE_SETXTREGS 19
75
76
77#endif /* _UAPI_XTENSA_PTRACE_H */
diff --git a/arch/xtensa/include/asm/sembuf.h b/arch/xtensa/include/uapi/asm/sembuf.h
index c15870493b33..c15870493b33 100644
--- a/arch/xtensa/include/asm/sembuf.h
+++ b/arch/xtensa/include/uapi/asm/sembuf.h
diff --git a/arch/xtensa/include/asm/setup.h b/arch/xtensa/include/uapi/asm/setup.h
index 9fa8ad979361..9fa8ad979361 100644
--- a/arch/xtensa/include/asm/setup.h
+++ b/arch/xtensa/include/uapi/asm/setup.h
diff --git a/arch/xtensa/include/asm/shmbuf.h b/arch/xtensa/include/uapi/asm/shmbuf.h
index ad4b0121782c..ad4b0121782c 100644
--- a/arch/xtensa/include/asm/shmbuf.h
+++ b/arch/xtensa/include/uapi/asm/shmbuf.h
diff --git a/arch/xtensa/include/asm/sigcontext.h b/arch/xtensa/include/uapi/asm/sigcontext.h
index 03383af8c3b7..03383af8c3b7 100644
--- a/arch/xtensa/include/asm/sigcontext.h
+++ b/arch/xtensa/include/uapi/asm/sigcontext.h
diff --git a/arch/xtensa/include/uapi/asm/signal.h b/arch/xtensa/include/uapi/asm/signal.h
new file mode 100644
index 000000000000..b88ce96f2af9
--- /dev/null
+++ b/arch/xtensa/include/uapi/asm/signal.h
@@ -0,0 +1,148 @@
1/*
2 * include/asm-xtensa/signal.h
3 *
4 * Swiped from SH.
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 *
10 * Copyright (C) 2001 - 2005 Tensilica Inc.
11 */
12
13#ifndef _UAPI_XTENSA_SIGNAL_H
14#define _UAPI_XTENSA_SIGNAL_H
15
16
17#define _NSIG 64
18#define _NSIG_BPW 32
19#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
20
21#ifndef __ASSEMBLY__
22
23#include <linux/types.h>
24
25/* Avoid too many header ordering problems. */
26struct siginfo;
27typedef unsigned long old_sigset_t; /* at least 32 bits */
28typedef struct {
29 unsigned long sig[_NSIG_WORDS];
30} sigset_t;
31
32#endif
33
34#define SIGHUP 1
35#define SIGINT 2
36#define SIGQUIT 3
37#define SIGILL 4
38#define SIGTRAP 5
39#define SIGABRT 6
40#define SIGIOT 6
41#define SIGBUS 7
42#define SIGFPE 8
43#define SIGKILL 9
44#define SIGUSR1 10
45#define SIGSEGV 11
46#define SIGUSR2 12
47#define SIGPIPE 13
48#define SIGALRM 14
49#define SIGTERM 15
50#define SIGSTKFLT 16
51#define SIGCHLD 17
52#define SIGCONT 18
53#define SIGSTOP 19
54#define SIGTSTP 20
55#define SIGTTIN 21
56#define SIGTTOU 22
57#define SIGURG 23
58#define SIGXCPU 24
59#define SIGXFSZ 25
60#define SIGVTALRM 26
61#define SIGPROF 27
62#define SIGWINCH 28
63#define SIGIO 29
64#define SIGPOLL SIGIO
65/* #define SIGLOST 29 */
66#define SIGPWR 30
67#define SIGSYS 31
68#define SIGUNUSED 31
69
70/* These should not be considered constants from userland. */
71#define SIGRTMIN 32
72#define SIGRTMAX (_NSIG-1)
73
74/*
75 * SA_FLAGS values:
76 *
77 * SA_ONSTACK indicates that a registered stack_t will be used.
78 * SA_RESTART flag to get restarting signals (which were the default long ago)
79 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
80 * SA_RESETHAND clears the handler when the signal is delivered.
81 * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
82 * SA_NODEFER prevents the current signal from being masked in the handler.
83 *
84 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
85 * Unix names RESETHAND and NODEFER respectively.
86 */
87#define SA_NOCLDSTOP 0x00000001
88#define SA_NOCLDWAIT 0x00000002 /* not supported yet */
89#define SA_SIGINFO 0x00000004
90#define SA_ONSTACK 0x08000000
91#define SA_RESTART 0x10000000
92#define SA_NODEFER 0x40000000
93#define SA_RESETHAND 0x80000000
94
95#define SA_NOMASK SA_NODEFER
96#define SA_ONESHOT SA_RESETHAND
97
98#define SA_RESTORER 0x04000000
99
100/*
101 * sigaltstack controls
102 */
103#define SS_ONSTACK 1
104#define SS_DISABLE 2
105
106#define MINSIGSTKSZ 2048
107#define SIGSTKSZ 8192
108
109#ifndef __ASSEMBLY__
110
111#define SIG_BLOCK 0 /* for blocking signals */
112#define SIG_UNBLOCK 1 /* for unblocking signals */
113#define SIG_SETMASK 2 /* for setting the signal mask */
114
115/* Type of a signal handler. */
116typedef void (*__sighandler_t)(int);
117
118#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
119#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
120#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
121
122#ifndef __KERNEL__
123
124/* Here we must cater to libcs that poke about in kernel headers. */
125
126struct sigaction {
127 union {
128 __sighandler_t _sa_handler;
129 void (*_sa_sigaction)(int, struct siginfo *, void *);
130 } _u;
131 sigset_t sa_mask;
132 unsigned long sa_flags;
133 void (*sa_restorer)(void);
134};
135
136#define sa_handler _u._sa_handler
137#define sa_sigaction _u._sa_sigaction
138
139#endif /* __KERNEL__ */
140
141typedef struct sigaltstack {
142 void *ss_sp;
143 int ss_flags;
144 size_t ss_size;
145} stack_t;
146
147#endif /* __ASSEMBLY__ */
148#endif /* _UAPI_XTENSA_SIGNAL_H */
diff --git a/arch/xtensa/include/asm/socket.h b/arch/xtensa/include/uapi/asm/socket.h
index e36c68184920..e36c68184920 100644
--- a/arch/xtensa/include/asm/socket.h
+++ b/arch/xtensa/include/uapi/asm/socket.h
diff --git a/arch/xtensa/include/asm/sockios.h b/arch/xtensa/include/uapi/asm/sockios.h
index efe0af379f01..efe0af379f01 100644
--- a/arch/xtensa/include/asm/sockios.h
+++ b/arch/xtensa/include/uapi/asm/sockios.h
diff --git a/arch/xtensa/include/asm/stat.h b/arch/xtensa/include/uapi/asm/stat.h
index c4992038cee0..c4992038cee0 100644
--- a/arch/xtensa/include/asm/stat.h
+++ b/arch/xtensa/include/uapi/asm/stat.h
diff --git a/arch/xtensa/include/asm/swab.h b/arch/xtensa/include/uapi/asm/swab.h
index 226a39162310..226a39162310 100644
--- a/arch/xtensa/include/asm/swab.h
+++ b/arch/xtensa/include/uapi/asm/swab.h
diff --git a/arch/xtensa/include/asm/termbits.h b/arch/xtensa/include/uapi/asm/termbits.h
index 0d6c8715b24f..0d6c8715b24f 100644
--- a/arch/xtensa/include/asm/termbits.h
+++ b/arch/xtensa/include/uapi/asm/termbits.h
diff --git a/arch/xtensa/include/uapi/asm/types.h b/arch/xtensa/include/uapi/asm/types.h
new file mode 100644
index 000000000000..87ec7ae73cb1
--- /dev/null
+++ b/arch/xtensa/include/uapi/asm/types.h
@@ -0,0 +1,28 @@
1/*
2 * include/asm-xtensa/types.h
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 2001 - 2005 Tensilica Inc.
9 */
10
11#ifndef _UAPI_XTENSA_TYPES_H
12#define _UAPI_XTENSA_TYPES_H
13
14#include <asm-generic/int-ll64.h>
15
16#ifdef __ASSEMBLY__
17# define __XTENSA_UL(x) (x)
18# define __XTENSA_UL_CONST(x) x
19#else
20# define __XTENSA_UL(x) ((unsigned long)(x))
21# define __XTENSA_UL_CONST(x) x##UL
22#endif
23
24#ifndef __ASSEMBLY__
25
26#endif
27
28#endif /* _UAPI_XTENSA_TYPES_H */
diff --git a/arch/xtensa/include/uapi/asm/unistd.h b/arch/xtensa/include/uapi/asm/unistd.h
new file mode 100644
index 000000000000..479abaea5aae
--- /dev/null
+++ b/arch/xtensa/include/uapi/asm/unistd.h
@@ -0,0 +1,762 @@
1/*
2 * include/asm-xtensa/unistd.h
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 2001 - 2012 Tensilica Inc.
9 */
10
11#ifndef _UAPI_XTENSA_UNISTD_H
12#define _UAPI_XTENSA_UNISTD_H
13
14#ifndef __SYSCALL
15# define __SYSCALL(nr,func,nargs)
16#endif
17
18#define __NR_spill 0
19__SYSCALL( 0, sys_ni_syscall, 0)
20#define __NR_xtensa 1
21__SYSCALL( 1, sys_ni_syscall, 0)
22#define __NR_available4 2
23__SYSCALL( 2, sys_ni_syscall, 0)
24#define __NR_available5 3
25__SYSCALL( 3, sys_ni_syscall, 0)
26#define __NR_available6 4
27__SYSCALL( 4, sys_ni_syscall, 0)
28#define __NR_available7 5
29__SYSCALL( 5, sys_ni_syscall, 0)
30#define __NR_available8 6
31__SYSCALL( 6, sys_ni_syscall, 0)
32#define __NR_available9 7
33__SYSCALL( 7, sys_ni_syscall, 0)
34
35/* File Operations */
36
37#define __NR_open 8
38__SYSCALL( 8, sys_open, 3)
39#define __NR_close 9
40__SYSCALL( 9, sys_close, 1)
41#define __NR_dup 10
42__SYSCALL( 10, sys_dup, 1)
43#define __NR_dup2 11
44__SYSCALL( 11, sys_dup2, 2)
45#define __NR_read 12
46__SYSCALL( 12, sys_read, 3)
47#define __NR_write 13
48__SYSCALL( 13, sys_write, 3)
49#define __NR_select 14
50__SYSCALL( 14, sys_select, 5)
51#define __NR_lseek 15
52__SYSCALL( 15, sys_lseek, 3)
53#define __NR_poll 16
54__SYSCALL( 16, sys_poll, 3)
55#define __NR__llseek 17
56__SYSCALL( 17, sys_llseek, 5)
57#define __NR_epoll_wait 18
58__SYSCALL( 18, sys_epoll_wait, 4)
59#define __NR_epoll_ctl 19
60__SYSCALL( 19, sys_epoll_ctl, 4)
61#define __NR_epoll_create 20
62__SYSCALL( 20, sys_epoll_create, 1)
63#define __NR_creat 21
64__SYSCALL( 21, sys_creat, 2)
65#define __NR_truncate 22
66__SYSCALL( 22, sys_truncate, 2)
67#define __NR_ftruncate 23
68__SYSCALL( 23, sys_ftruncate, 2)
69#define __NR_readv 24
70__SYSCALL( 24, sys_readv, 3)
71#define __NR_writev 25
72__SYSCALL( 25, sys_writev, 3)
73#define __NR_fsync 26
74__SYSCALL( 26, sys_fsync, 1)
75#define __NR_fdatasync 27
76__SYSCALL( 27, sys_fdatasync, 1)
77#define __NR_truncate64 28
78__SYSCALL( 28, sys_truncate64, 2)
79#define __NR_ftruncate64 29
80__SYSCALL( 29, sys_ftruncate64, 2)
81#define __NR_pread64 30
82__SYSCALL( 30, sys_pread64, 6)
83#define __NR_pwrite64 31
84__SYSCALL( 31, sys_pwrite64, 6)
85
86#define __NR_link 32
87__SYSCALL( 32, sys_link, 2)
88#define __NR_rename 33
89__SYSCALL( 33, sys_rename, 2)
90#define __NR_symlink 34
91__SYSCALL( 34, sys_symlink, 2)
92#define __NR_readlink 35
93__SYSCALL( 35, sys_readlink, 3)
94#define __NR_mknod 36
95__SYSCALL( 36, sys_mknod, 3)
96#define __NR_pipe 37
97__SYSCALL( 37, sys_pipe, 1)
98#define __NR_unlink 38
99__SYSCALL( 38, sys_unlink, 1)
100#define __NR_rmdir 39
101__SYSCALL( 39, sys_rmdir, 1)
102
103#define __NR_mkdir 40
104__SYSCALL( 40, sys_mkdir, 2)
105#define __NR_chdir 41
106__SYSCALL( 41, sys_chdir, 1)
107#define __NR_fchdir 42
108__SYSCALL( 42, sys_fchdir, 1)
109#define __NR_getcwd 43
110__SYSCALL( 43, sys_getcwd, 2)
111
112#define __NR_chmod 44
113__SYSCALL( 44, sys_chmod, 2)
114#define __NR_chown 45
115__SYSCALL( 45, sys_chown, 3)
116#define __NR_stat 46
117__SYSCALL( 46, sys_newstat, 2)
118#define __NR_stat64 47
119__SYSCALL( 47, sys_stat64, 2)
120
121#define __NR_lchown 48
122__SYSCALL( 48, sys_lchown, 3)
123#define __NR_lstat 49
124__SYSCALL( 49, sys_newlstat, 2)
125#define __NR_lstat64 50
126__SYSCALL( 50, sys_lstat64, 2)
127#define __NR_available51 51
128__SYSCALL( 51, sys_ni_syscall, 0)
129
130#define __NR_fchmod 52
131__SYSCALL( 52, sys_fchmod, 2)
132#define __NR_fchown 53
133__SYSCALL( 53, sys_fchown, 3)
134#define __NR_fstat 54
135__SYSCALL( 54, sys_newfstat, 2)
136#define __NR_fstat64 55
137__SYSCALL( 55, sys_fstat64, 2)
138
139#define __NR_flock 56
140__SYSCALL( 56, sys_flock, 2)
141#define __NR_access 57
142__SYSCALL( 57, sys_access, 2)
143#define __NR_umask 58
144__SYSCALL( 58, sys_umask, 1)
145#define __NR_getdents 59
146__SYSCALL( 59, sys_getdents, 3)
147#define __NR_getdents64 60
148__SYSCALL( 60, sys_getdents64, 3)
149#define __NR_fcntl64 61
150__SYSCALL( 61, sys_fcntl64, 3)
151#define __NR_fallocate 62
152__SYSCALL( 62, sys_fallocate, 6)
153#define __NR_fadvise64_64 63
154__SYSCALL( 63, xtensa_fadvise64_64, 6)
155#define __NR_utime 64 /* glibc 2.3.3 ?? */
156__SYSCALL( 64, sys_utime, 2)
157#define __NR_utimes 65
158__SYSCALL( 65, sys_utimes, 2)
159#define __NR_ioctl 66
160__SYSCALL( 66, sys_ioctl, 3)
161#define __NR_fcntl 67
162__SYSCALL( 67, sys_fcntl, 3)
163
164#define __NR_setxattr 68
165__SYSCALL( 68, sys_setxattr, 5)
166#define __NR_getxattr 69
167__SYSCALL( 69, sys_getxattr, 4)
168#define __NR_listxattr 70
169__SYSCALL( 70, sys_listxattr, 3)
170#define __NR_removexattr 71
171__SYSCALL( 71, sys_removexattr, 2)
172#define __NR_lsetxattr 72
173__SYSCALL( 72, sys_lsetxattr, 5)
174#define __NR_lgetxattr 73
175__SYSCALL( 73, sys_lgetxattr, 4)
176#define __NR_llistxattr 74
177__SYSCALL( 74, sys_llistxattr, 3)
178#define __NR_lremovexattr 75
179__SYSCALL( 75, sys_lremovexattr, 2)
180#define __NR_fsetxattr 76
181__SYSCALL( 76, sys_fsetxattr, 5)
182#define __NR_fgetxattr 77
183__SYSCALL( 77, sys_fgetxattr, 4)
184#define __NR_flistxattr 78
185__SYSCALL( 78, sys_flistxattr, 3)
186#define __NR_fremovexattr 79
187__SYSCALL( 79, sys_fremovexattr, 2)
188
189/* File Map / Shared Memory Operations */
190
191#define __NR_mmap2 80
192__SYSCALL( 80, sys_mmap_pgoff, 6)
193#define __NR_munmap 81
194__SYSCALL( 81, sys_munmap, 2)
195#define __NR_mprotect 82
196__SYSCALL( 82, sys_mprotect, 3)
197#define __NR_brk 83
198__SYSCALL( 83, sys_brk, 1)
199#define __NR_mlock 84
200__SYSCALL( 84, sys_mlock, 2)
201#define __NR_munlock 85
202__SYSCALL( 85, sys_munlock, 2)
203#define __NR_mlockall 86
204__SYSCALL( 86, sys_mlockall, 1)
205#define __NR_munlockall 87
206__SYSCALL( 87, sys_munlockall, 0)
207#define __NR_mremap 88
208__SYSCALL( 88, sys_mremap, 4)
209#define __NR_msync 89
210__SYSCALL( 89, sys_msync, 3)
211#define __NR_mincore 90
212__SYSCALL( 90, sys_mincore, 3)
213#define __NR_madvise 91
214__SYSCALL( 91, sys_madvise, 3)
215#define __NR_shmget 92
216__SYSCALL( 92, sys_shmget, 4)
217#define __NR_shmat 93
218__SYSCALL( 93, xtensa_shmat, 4)
219#define __NR_shmctl 94
220__SYSCALL( 94, sys_shmctl, 4)
221#define __NR_shmdt 95
222__SYSCALL( 95, sys_shmdt, 4)
223
224/* Socket Operations */
225
226#define __NR_socket 96
227__SYSCALL( 96, sys_socket, 3)
228#define __NR_setsockopt 97
229__SYSCALL( 97, sys_setsockopt, 5)
230#define __NR_getsockopt 98
231__SYSCALL( 98, sys_getsockopt, 5)
232#define __NR_shutdown 99
233__SYSCALL( 99, sys_shutdown, 2)
234
235#define __NR_bind 100
236__SYSCALL(100, sys_bind, 3)
237#define __NR_connect 101
238__SYSCALL(101, sys_connect, 3)
239#define __NR_listen 102
240__SYSCALL(102, sys_listen, 2)
241#define __NR_accept 103
242__SYSCALL(103, sys_accept, 3)
243
244#define __NR_getsockname 104
245__SYSCALL(104, sys_getsockname, 3)
246#define __NR_getpeername 105
247__SYSCALL(105, sys_getpeername, 3)
248#define __NR_sendmsg 106
249__SYSCALL(106, sys_sendmsg, 3)
250#define __NR_recvmsg 107
251__SYSCALL(107, sys_recvmsg, 3)
252#define __NR_send 108
253__SYSCALL(108, sys_send, 4)
254#define __NR_recv 109
255__SYSCALL(109, sys_recv, 4)
256#define __NR_sendto 110
257__SYSCALL(110, sys_sendto, 6)
258#define __NR_recvfrom 111
259__SYSCALL(111, sys_recvfrom, 6)
260
261#define __NR_socketpair 112
262__SYSCALL(112, sys_socketpair, 4)
263#define __NR_sendfile 113
264__SYSCALL(113, sys_sendfile, 4)
265#define __NR_sendfile64 114
266__SYSCALL(114, sys_sendfile64, 4)
267#define __NR_sendmmsg 115
268__SYSCALL(115, sys_sendmmsg, 4)
269
270/* Process Operations */
271
272#define __NR_clone 116
273__SYSCALL(116, xtensa_clone, 5)
274#define __NR_execve 117
275__SYSCALL(117, xtensa_execve, 3)
276#define __NR_exit 118
277__SYSCALL(118, sys_exit, 1)
278#define __NR_exit_group 119
279__SYSCALL(119, sys_exit_group, 1)
280#define __NR_getpid 120
281__SYSCALL(120, sys_getpid, 0)
282#define __NR_wait4 121
283__SYSCALL(121, sys_wait4, 4)
284#define __NR_waitid 122
285__SYSCALL(122, sys_waitid, 5)
286#define __NR_kill 123
287__SYSCALL(123, sys_kill, 2)
288#define __NR_tkill 124
289__SYSCALL(124, sys_tkill, 2)
290#define __NR_tgkill 125
291__SYSCALL(125, sys_tgkill, 3)
292#define __NR_set_tid_address 126
293__SYSCALL(126, sys_set_tid_address, 1)
294#define __NR_gettid 127
295__SYSCALL(127, sys_gettid, 0)
296#define __NR_setsid 128
297__SYSCALL(128, sys_setsid, 0)
298#define __NR_getsid 129
299__SYSCALL(129, sys_getsid, 1)
300#define __NR_prctl 130
301__SYSCALL(130, sys_prctl, 5)
302#define __NR_personality 131
303__SYSCALL(131, sys_personality, 1)
304#define __NR_getpriority 132
305__SYSCALL(132, sys_getpriority, 2)
306#define __NR_setpriority 133
307__SYSCALL(133, sys_setpriority, 3)
308#define __NR_setitimer 134
309__SYSCALL(134, sys_setitimer, 3)
310#define __NR_getitimer 135
311__SYSCALL(135, sys_getitimer, 2)
312#define __NR_setuid 136
313__SYSCALL(136, sys_setuid, 1)
314#define __NR_getuid 137
315__SYSCALL(137, sys_getuid, 0)
316#define __NR_setgid 138
317__SYSCALL(138, sys_setgid, 1)
318#define __NR_getgid 139
319__SYSCALL(139, sys_getgid, 0)
320#define __NR_geteuid 140
321__SYSCALL(140, sys_geteuid, 0)
322#define __NR_getegid 141
323__SYSCALL(141, sys_getegid, 0)
324#define __NR_setreuid 142
325__SYSCALL(142, sys_setreuid, 2)
326#define __NR_setregid 143
327__SYSCALL(143, sys_setregid, 2)
328#define __NR_setresuid 144
329__SYSCALL(144, sys_setresuid, 3)
330#define __NR_getresuid 145
331__SYSCALL(145, sys_getresuid, 3)
332#define __NR_setresgid 146
333__SYSCALL(146, sys_setresgid, 3)
334#define __NR_getresgid 147
335__SYSCALL(147, sys_getresgid, 3)
336#define __NR_setpgid 148
337__SYSCALL(148, sys_setpgid, 2)
338#define __NR_getpgid 149
339__SYSCALL(149, sys_getpgid, 1)
340#define __NR_getppid 150
341__SYSCALL(150, sys_getppid, 0)
342#define __NR_getpgrp 151
343__SYSCALL(151, sys_getpgrp, 0)
344
345#define __NR_reserved152 152 /* set_thread_area */
346__SYSCALL(152, sys_ni_syscall, 0)
347#define __NR_reserved153 153 /* get_thread_area */
348__SYSCALL(153, sys_ni_syscall, 0)
349#define __NR_times 154
350__SYSCALL(154, sys_times, 1)
351#define __NR_acct 155
352__SYSCALL(155, sys_acct, 1)
353#define __NR_sched_setaffinity 156
354__SYSCALL(156, sys_sched_setaffinity, 3)
355#define __NR_sched_getaffinity 157
356__SYSCALL(157, sys_sched_getaffinity, 3)
357#define __NR_capget 158
358__SYSCALL(158, sys_capget, 2)
359#define __NR_capset 159
360__SYSCALL(159, sys_capset, 2)
361#define __NR_ptrace 160
362__SYSCALL(160, sys_ptrace, 4)
363#define __NR_semtimedop 161
364__SYSCALL(161, sys_semtimedop, 5)
365#define __NR_semget 162
366__SYSCALL(162, sys_semget, 4)
367#define __NR_semop 163
368__SYSCALL(163, sys_semop, 4)
369#define __NR_semctl 164
370__SYSCALL(164, sys_semctl, 4)
371#define __NR_available165 165
372__SYSCALL(165, sys_ni_syscall, 0)
373#define __NR_msgget 166
374__SYSCALL(166, sys_msgget, 4)
375#define __NR_msgsnd 167
376__SYSCALL(167, sys_msgsnd, 4)
377#define __NR_msgrcv 168
378__SYSCALL(168, sys_msgrcv, 4)
379#define __NR_msgctl 169
380__SYSCALL(169, sys_msgctl, 4)
381#define __NR_available170 170
382__SYSCALL(170, sys_ni_syscall, 0)
383
384/* File System */
385
386#define __NR_umount2 171
387__SYSCALL(171, sys_umount, 2)
388#define __NR_mount 172
389__SYSCALL(172, sys_mount, 5)
390#define __NR_swapon 173
391__SYSCALL(173, sys_swapon, 2)
392#define __NR_chroot 174
393__SYSCALL(174, sys_chroot, 1)
394#define __NR_pivot_root 175
395__SYSCALL(175, sys_pivot_root, 2)
396#define __NR_umount 176
397__SYSCALL(176, sys_umount, 2)
398#define __NR_swapoff 177
399__SYSCALL(177, sys_swapoff, 1)
400#define __NR_sync 178
401__SYSCALL(178, sys_sync, 0)
402#define __NR_syncfs 179
403__SYSCALL(179, sys_syncfs, 1)
404#define __NR_setfsuid 180
405__SYSCALL(180, sys_setfsuid, 1)
406#define __NR_setfsgid 181
407__SYSCALL(181, sys_setfsgid, 1)
408#define __NR_sysfs 182
409__SYSCALL(182, sys_sysfs, 3)
410#define __NR_ustat 183
411__SYSCALL(183, sys_ustat, 2)
412#define __NR_statfs 184
413__SYSCALL(184, sys_statfs, 2)
414#define __NR_fstatfs 185
415__SYSCALL(185, sys_fstatfs, 2)
416#define __NR_statfs64 186
417__SYSCALL(186, sys_statfs64, 3)
418#define __NR_fstatfs64 187
419__SYSCALL(187, sys_fstatfs64, 3)
420
421/* System */
422
423#define __NR_setrlimit 188
424__SYSCALL(188, sys_setrlimit, 2)
425#define __NR_getrlimit 189
426__SYSCALL(189, sys_getrlimit, 2)
427#define __NR_getrusage 190
428__SYSCALL(190, sys_getrusage, 2)
429#define __NR_futex 191
430__SYSCALL(191, sys_futex, 5)
431#define __NR_gettimeofday 192
432__SYSCALL(192, sys_gettimeofday, 2)
433#define __NR_settimeofday 193
434__SYSCALL(193, sys_settimeofday, 2)
435#define __NR_adjtimex 194
436__SYSCALL(194, sys_adjtimex, 1)
437#define __NR_nanosleep 195
438__SYSCALL(195, sys_nanosleep, 2)
439#define __NR_getgroups 196
440__SYSCALL(196, sys_getgroups, 2)
441#define __NR_setgroups 197
442__SYSCALL(197, sys_setgroups, 2)
443#define __NR_sethostname 198
444__SYSCALL(198, sys_sethostname, 2)
445#define __NR_setdomainname 199
446__SYSCALL(199, sys_setdomainname, 2)
447#define __NR_syslog 200
448__SYSCALL(200, sys_syslog, 3)
449#define __NR_vhangup 201
450__SYSCALL(201, sys_vhangup, 0)
451#define __NR_uselib 202
452__SYSCALL(202, sys_uselib, 1)
453#define __NR_reboot 203
454__SYSCALL(203, sys_reboot, 3)
455#define __NR_quotactl 204
456__SYSCALL(204, sys_quotactl, 4)
457#define __NR_nfsservctl 205
458__SYSCALL(205, sys_ni_syscall, 0) /* old nfsservctl */
459#define __NR__sysctl 206
460__SYSCALL(206, sys_sysctl, 1)
461#define __NR_bdflush 207
462__SYSCALL(207, sys_bdflush, 2)
463#define __NR_uname 208
464__SYSCALL(208, sys_newuname, 1)
465#define __NR_sysinfo 209
466__SYSCALL(209, sys_sysinfo, 1)
467#define __NR_init_module 210
468__SYSCALL(210, sys_init_module, 2)
469#define __NR_delete_module 211
470__SYSCALL(211, sys_delete_module, 1)
471
472#define __NR_sched_setparam 212
473__SYSCALL(212, sys_sched_setparam, 2)
474#define __NR_sched_getparam 213
475__SYSCALL(213, sys_sched_getparam, 2)
476#define __NR_sched_setscheduler 214
477__SYSCALL(214, sys_sched_setscheduler, 3)
478#define __NR_sched_getscheduler 215
479__SYSCALL(215, sys_sched_getscheduler, 1)
480#define __NR_sched_get_priority_max 216
481__SYSCALL(216, sys_sched_get_priority_max, 1)
482#define __NR_sched_get_priority_min 217
483__SYSCALL(217, sys_sched_get_priority_min, 1)
484#define __NR_sched_rr_get_interval 218
485__SYSCALL(218, sys_sched_rr_get_interval, 2)
486#define __NR_sched_yield 219
487__SYSCALL(219, sys_sched_yield, 0)
488#define __NR_available222 222
489__SYSCALL(222, sys_ni_syscall, 0)
490
491/* Signal Handling */
492
493#define __NR_restart_syscall 223
494__SYSCALL(223, sys_restart_syscall, 0)
495#define __NR_sigaltstack 224
496__SYSCALL(224, xtensa_sigaltstack, 2)
497#define __NR_rt_sigreturn 225
498__SYSCALL(225, xtensa_rt_sigreturn, 1)
499#define __NR_rt_sigaction 226
500__SYSCALL(226, sys_rt_sigaction, 4)
501#define __NR_rt_sigprocmask 227
502__SYSCALL(227, sys_rt_sigprocmask, 4)
503#define __NR_rt_sigpending 228
504__SYSCALL(228, sys_rt_sigpending, 2)
505#define __NR_rt_sigtimedwait 229
506__SYSCALL(229, sys_rt_sigtimedwait, 4)
507#define __NR_rt_sigqueueinfo 230
508__SYSCALL(230, sys_rt_sigqueueinfo, 3)
509#define __NR_rt_sigsuspend 231
510__SYSCALL(231, sys_rt_sigsuspend, 2)
511
512/* Message */
513
514#define __NR_mq_open 232
515__SYSCALL(232, sys_mq_open, 4)
516#define __NR_mq_unlink 233
517__SYSCALL(233, sys_mq_unlink, 1)
518#define __NR_mq_timedsend 234
519__SYSCALL(234, sys_mq_timedsend, 5)
520#define __NR_mq_timedreceive 235
521__SYSCALL(235, sys_mq_timedreceive, 5)
522#define __NR_mq_notify 236
523__SYSCALL(236, sys_mq_notify, 2)
524#define __NR_mq_getsetattr 237
525__SYSCALL(237, sys_mq_getsetattr, 3)
526#define __NR_available238 238
527__SYSCALL(238, sys_ni_syscall, 0)
528
529/* IO */
530
531#define __NR_io_setup 239
532__SYSCALL(239, sys_io_setup, 2)
533#define __NR_io_destroy 240
534__SYSCALL(240, sys_io_destroy, 1)
535#define __NR_io_submit 241
536__SYSCALL(241, sys_io_submit, 3)
537#define __NR_io_getevents 242
538__SYSCALL(242, sys_io_getevents, 5)
539#define __NR_io_cancel 243
540__SYSCALL(243, sys_io_cancel, 3)
541#define __NR_clock_settime 244
542__SYSCALL(244, sys_clock_settime, 2)
543#define __NR_clock_gettime 245
544__SYSCALL(245, sys_clock_gettime, 2)
545#define __NR_clock_getres 246
546__SYSCALL(246, sys_clock_getres, 2)
547#define __NR_clock_nanosleep 247
548__SYSCALL(247, sys_clock_nanosleep, 4)
549
550/* Timer */
551
552#define __NR_timer_create 248
553__SYSCALL(248, sys_timer_create, 3)
554#define __NR_timer_delete 249
555__SYSCALL(249, sys_timer_delete, 1)
556#define __NR_timer_settime 250
557__SYSCALL(250, sys_timer_settime, 4)
558#define __NR_timer_gettime 251
559__SYSCALL(251, sys_timer_gettime, 2)
560#define __NR_timer_getoverrun 252
561__SYSCALL(252, sys_timer_getoverrun, 1)
562
563/* System */
564
565#define __NR_reserved253 253
566__SYSCALL(253, sys_ni_syscall, 0)
567#define __NR_lookup_dcookie 254
568__SYSCALL(254, sys_lookup_dcookie, 4)
569#define __NR_available255 255
570__SYSCALL(255, sys_ni_syscall, 0)
571#define __NR_add_key 256
572__SYSCALL(256, sys_add_key, 5)
573#define __NR_request_key 257
574__SYSCALL(257, sys_request_key, 5)
575#define __NR_keyctl 258
576__SYSCALL(258, sys_keyctl, 5)
577#define __NR_available259 259
578__SYSCALL(259, sys_ni_syscall, 0)
579
580
581#define __NR_readahead 260
582__SYSCALL(260, sys_readahead, 5)
583#define __NR_remap_file_pages 261
584__SYSCALL(261, sys_remap_file_pages, 5)
585#define __NR_migrate_pages 262
586__SYSCALL(262, sys_migrate_pages, 0)
587#define __NR_mbind 263
588__SYSCALL(263, sys_mbind, 6)
589#define __NR_get_mempolicy 264
590__SYSCALL(264, sys_get_mempolicy, 5)
591#define __NR_set_mempolicy 265
592__SYSCALL(265, sys_set_mempolicy, 3)
593#define __NR_unshare 266
594__SYSCALL(266, sys_unshare, 1)
595#define __NR_move_pages 267
596__SYSCALL(267, sys_move_pages, 0)
597#define __NR_splice 268
598__SYSCALL(268, sys_splice, 0)
599#define __NR_tee 269
600__SYSCALL(269, sys_tee, 0)
601#define __NR_vmsplice 270
602__SYSCALL(270, sys_vmsplice, 0)
603#define __NR_available271 271
604__SYSCALL(271, sys_ni_syscall, 0)
605
606#define __NR_pselect6 272
607__SYSCALL(272, sys_pselect6, 0)
608#define __NR_ppoll 273
609__SYSCALL(273, sys_ppoll, 0)
610#define __NR_epoll_pwait 274
611__SYSCALL(274, sys_epoll_pwait, 0)
612#define __NR_epoll_create1 275
613__SYSCALL(275, sys_epoll_create1, 1)
614
615#define __NR_inotify_init 276
616__SYSCALL(276, sys_inotify_init, 0)
617#define __NR_inotify_add_watch 277
618__SYSCALL(277, sys_inotify_add_watch, 3)
619#define __NR_inotify_rm_watch 278
620__SYSCALL(278, sys_inotify_rm_watch, 2)
621#define __NR_inotify_init1 279
622__SYSCALL(279, sys_inotify_init1, 1)
623
624#define __NR_getcpu 280
625__SYSCALL(280, sys_getcpu, 0)
626#define __NR_kexec_load 281
627__SYSCALL(281, sys_ni_syscall, 0)
628
629#define __NR_ioprio_set 282
630__SYSCALL(282, sys_ioprio_set, 2)
631#define __NR_ioprio_get 283
632__SYSCALL(283, sys_ioprio_get, 3)
633
634#define __NR_set_robust_list 284
635__SYSCALL(284, sys_set_robust_list, 3)
636#define __NR_get_robust_list 285
637__SYSCALL(285, sys_get_robust_list, 3)
638#define __NR_available286 286
639__SYSCALL(286, sys_ni_syscall, 0)
640#define __NR_available287 287
641__SYSCALL(287, sys_ni_syscall, 0)
642
643/* Relative File Operations */
644
645#define __NR_openat 288
646__SYSCALL(288, sys_openat, 4)
647#define __NR_mkdirat 289
648__SYSCALL(289, sys_mkdirat, 3)
649#define __NR_mknodat 290
650__SYSCALL(290, sys_mknodat, 4)
651#define __NR_unlinkat 291
652__SYSCALL(291, sys_unlinkat, 3)
653#define __NR_renameat 292
654__SYSCALL(292, sys_renameat, 4)
655#define __NR_linkat 293
656__SYSCALL(293, sys_linkat, 5)
657#define __NR_symlinkat 294
658__SYSCALL(294, sys_symlinkat, 3)
659#define __NR_readlinkat 295
660__SYSCALL(295, sys_readlinkat, 4)
661#define __NR_utimensat 296
662__SYSCALL(296, sys_utimensat, 0)
663#define __NR_fchownat 297
664__SYSCALL(297, sys_fchownat, 5)
665#define __NR_futimesat 298
666__SYSCALL(298, sys_futimesat, 4)
667#define __NR_fstatat64 299
668__SYSCALL(299, sys_fstatat64, 0)
669#define __NR_fchmodat 300
670__SYSCALL(300, sys_fchmodat, 4)
671#define __NR_faccessat 301
672__SYSCALL(301, sys_faccessat, 4)
673#define __NR_available302 302
674__SYSCALL(302, sys_ni_syscall, 0)
675#define __NR_available303 303
676__SYSCALL(303, sys_ni_syscall, 0)
677
678#define __NR_signalfd 304
679__SYSCALL(304, sys_signalfd, 3)
680/* 305 was __NR_timerfd */
681__SYSCALL(305, sys_ni_syscall, 0)
682#define __NR_eventfd 306
683__SYSCALL(306, sys_eventfd, 1)
684#define __NR_recvmmsg 307
685__SYSCALL(307, sys_recvmmsg, 5)
686
687#define __NR_setns 308
688__SYSCALL(308, sys_setns, 2)
689#define __NR_signalfd4 309
690__SYSCALL(309, sys_signalfd4, 4)
691#define __NR_dup3 310
692__SYSCALL(310, sys_dup3, 3)
693#define __NR_pipe2 311
694__SYSCALL(311, sys_pipe2, 2)
695
696#define __NR_timerfd_create 312
697__SYSCALL(312, sys_timerfd_create, 2)
698#define __NR_timerfd_settime 313
699__SYSCALL(313, sys_timerfd_settime, 4)
700#define __NR_timerfd_gettime 314
701__SYSCALL(314, sys_timerfd_gettime, 2)
702#define __NR_available315 315
703__SYSCALL(315, sys_ni_syscall, 0)
704
705#define __NR_eventfd2 316
706__SYSCALL(316, sys_eventfd2, 2)
707#define __NR_preadv 317
708__SYSCALL(317, sys_preadv, 5)
709#define __NR_pwritev 318
710__SYSCALL(318, sys_pwritev, 5)
711#define __NR_available319 319
712__SYSCALL(319, sys_ni_syscall, 0)
713
714#define __NR_fanotify_init 320
715__SYSCALL(320, sys_fanotify_init, 2)
716#define __NR_fanotify_mark 321
717__SYSCALL(321, sys_fanotify_mark, 6)
718#define __NR_process_vm_readv 322
719__SYSCALL(322, sys_process_vm_readv, 6)
720#define __NR_process_vm_writev 323
721__SYSCALL(323, sys_process_vm_writev, 6)
722
723#define __NR_name_to_handle_at 324
724__SYSCALL(324, sys_name_to_handle_at, 5)
725#define __NR_open_by_handle_at 325
726__SYSCALL(325, sys_open_by_handle_at, 3)
727#define __NR_sync_file_range 326
728__SYSCALL(326, sys_sync_file_range2, 6)
729#define __NR_perf_event_open 327
730__SYSCALL(327, sys_perf_event_open, 5)
731
732#define __NR_rt_tgsigqueueinfo 328
733__SYSCALL(328, sys_rt_tgsigqueueinfo, 4)
734#define __NR_clock_adjtime 329
735__SYSCALL(329, sys_clock_adjtime, 2)
736#define __NR_prlimit64 330
737__SYSCALL(330, sys_prlimit64, 4)
738#define __NR_kcmp 331
739__SYSCALL(331, sys_kcmp, 5)
740
741
742#define __NR_syscall_count 332
743
744/*
745 * sysxtensa syscall handler
746 *
747 * int sysxtensa (SYS_XTENSA_ATOMIC_SET, ptr, val, unused);
748 * int sysxtensa (SYS_XTENSA_ATOMIC_ADD, ptr, val, unused);
749 * int sysxtensa (SYS_XTENSA_ATOMIC_EXG_ADD, ptr, val, unused);
750 * int sysxtensa (SYS_XTENSA_ATOMIC_CMP_SWP, ptr, oldval, newval);
751 * a2 a6 a3 a4 a5
752 */
753
754#define SYS_XTENSA_RESERVED 0 /* don't use this */
755#define SYS_XTENSA_ATOMIC_SET 1 /* set variable */
756#define SYS_XTENSA_ATOMIC_EXG_ADD 2 /* exchange memory and add */
757#define SYS_XTENSA_ATOMIC_ADD 3 /* add to memory */
758#define SYS_XTENSA_ATOMIC_CMP_SWP 4 /* compare and swap */
759
760#define SYS_XTENSA_COUNT 5 /* count */
761
762#endif /* _UAPI_XTENSA_UNISTD_H */
diff --git a/arch/xtensa/kernel/align.S b/arch/xtensa/kernel/align.S
index 33d6e9d2e83c..934ae58e2c79 100644
--- a/arch/xtensa/kernel/align.S
+++ b/arch/xtensa/kernel/align.S
@@ -170,15 +170,15 @@ ENTRY(fast_unaligned)
170 s32i a7, a2, PT_AREG7 170 s32i a7, a2, PT_AREG7
171 s32i a8, a2, PT_AREG8 171 s32i a8, a2, PT_AREG8
172 172
173 rsr a0, DEPC 173 rsr a0, depc
174 xsr a3, EXCSAVE_1 174 xsr a3, excsave1
175 s32i a0, a2, PT_AREG2 175 s32i a0, a2, PT_AREG2
176 s32i a3, a2, PT_AREG3 176 s32i a3, a2, PT_AREG3
177 177
178 /* Keep value of SAR in a0 */ 178 /* Keep value of SAR in a0 */
179 179
180 rsr a0, SAR 180 rsr a0, sar
181 rsr a8, EXCVADDR # load unaligned memory address 181 rsr a8, excvaddr # load unaligned memory address
182 182
183 /* Now, identify one of the following load/store instructions. 183 /* Now, identify one of the following load/store instructions.
184 * 184 *
@@ -197,7 +197,7 @@ ENTRY(fast_unaligned)
197 197
198 /* Extract the instruction that caused the unaligned access. */ 198 /* Extract the instruction that caused the unaligned access. */
199 199
200 rsr a7, EPC_1 # load exception address 200 rsr a7, epc1 # load exception address
201 movi a3, ~3 201 movi a3, ~3
202 and a3, a3, a7 # mask lower bits 202 and a3, a3, a7 # mask lower bits
203 203
@@ -275,16 +275,16 @@ ENTRY(fast_unaligned)
2751: 2751:
276 276
277#if XCHAL_HAVE_LOOPS 277#if XCHAL_HAVE_LOOPS
278 rsr a5, LEND # check if we reached LEND 278 rsr a5, lend # check if we reached LEND
279 bne a7, a5, 1f 279 bne a7, a5, 1f
280 rsr a5, LCOUNT # and LCOUNT != 0 280 rsr a5, lcount # and LCOUNT != 0
281 beqz a5, 1f 281 beqz a5, 1f
282 addi a5, a5, -1 # decrement LCOUNT and set 282 addi a5, a5, -1 # decrement LCOUNT and set
283 rsr a7, LBEG # set PC to LBEGIN 283 rsr a7, lbeg # set PC to LBEGIN
284 wsr a5, LCOUNT 284 wsr a5, lcount
285#endif 285#endif
286 286
2871: wsr a7, EPC_1 # skip load instruction 2871: wsr a7, epc1 # skip load instruction
288 extui a4, a4, INSN_T, 4 # extract target register 288 extui a4, a4, INSN_T, 4 # extract target register
289 movi a5, .Lload_table 289 movi a5, .Lload_table
290 addx8 a4, a4, a5 290 addx8 a4, a4, a5
@@ -355,16 +355,16 @@ ENTRY(fast_unaligned)
355 355
3561: 3561:
357#if XCHAL_HAVE_LOOPS 357#if XCHAL_HAVE_LOOPS
358 rsr a4, LEND # check if we reached LEND 358 rsr a4, lend # check if we reached LEND
359 bne a7, a4, 1f 359 bne a7, a4, 1f
360 rsr a4, LCOUNT # and LCOUNT != 0 360 rsr a4, lcount # and LCOUNT != 0
361 beqz a4, 1f 361 beqz a4, 1f
362 addi a4, a4, -1 # decrement LCOUNT and set 362 addi a4, a4, -1 # decrement LCOUNT and set
363 rsr a7, LBEG # set PC to LBEGIN 363 rsr a7, lbeg # set PC to LBEGIN
364 wsr a4, LCOUNT 364 wsr a4, lcount
365#endif 365#endif
366 366
3671: wsr a7, EPC_1 # skip store instruction 3671: wsr a7, epc1 # skip store instruction
368 movi a4, ~3 368 movi a4, ~3
369 and a4, a4, a8 # align memory address 369 and a4, a4, a8 # align memory address
370 370
@@ -406,7 +406,7 @@ ENTRY(fast_unaligned)
406 406
407.Lexit: 407.Lexit:
408 movi a4, 0 408 movi a4, 0
409 rsr a3, EXCSAVE_1 409 rsr a3, excsave1
410 s32i a4, a3, EXC_TABLE_FIXUP 410 s32i a4, a3, EXC_TABLE_FIXUP
411 411
412 /* Restore working register */ 412 /* Restore working register */
@@ -420,7 +420,7 @@ ENTRY(fast_unaligned)
420 420
421 /* restore SAR and return */ 421 /* restore SAR and return */
422 422
423 wsr a0, SAR 423 wsr a0, sar
424 l32i a0, a2, PT_AREG0 424 l32i a0, a2, PT_AREG0
425 l32i a2, a2, PT_AREG2 425 l32i a2, a2, PT_AREG2
426 rfe 426 rfe
@@ -438,10 +438,10 @@ ENTRY(fast_unaligned)
438 l32i a6, a2, PT_AREG6 438 l32i a6, a2, PT_AREG6
439 l32i a5, a2, PT_AREG5 439 l32i a5, a2, PT_AREG5
440 l32i a4, a2, PT_AREG4 440 l32i a4, a2, PT_AREG4
441 wsr a0, SAR 441 wsr a0, sar
442 mov a1, a2 442 mov a1, a2
443 443
444 rsr a0, PS 444 rsr a0, ps
445 bbsi.l a2, PS_UM_BIT, 1f # jump if user mode 445 bbsi.l a2, PS_UM_BIT, 1f # jump if user mode
446 446
447 movi a0, _kernel_exception 447 movi a0, _kernel_exception
diff --git a/arch/xtensa/kernel/coprocessor.S b/arch/xtensa/kernel/coprocessor.S
index 2bc1e145c0a4..54c3be313bfa 100644
--- a/arch/xtensa/kernel/coprocessor.S
+++ b/arch/xtensa/kernel/coprocessor.S
@@ -43,7 +43,7 @@
43/* IO protection is currently unsupported. */ 43/* IO protection is currently unsupported. */
44 44
45ENTRY(fast_io_protect) 45ENTRY(fast_io_protect)
46 wsr a0, EXCSAVE_1 46 wsr a0, excsave1
47 movi a0, unrecoverable_exception 47 movi a0, unrecoverable_exception
48 callx0 a0 48 callx0 a0
49 49
@@ -220,7 +220,7 @@ ENTRY(coprocessor_restore)
220 */ 220 */
221 221
222ENTRY(fast_coprocessor_double) 222ENTRY(fast_coprocessor_double)
223 wsr a0, EXCSAVE_1 223 wsr a0, excsave1
224 movi a0, unrecoverable_exception 224 movi a0, unrecoverable_exception
225 callx0 a0 225 callx0 a0
226 226
@@ -229,13 +229,13 @@ ENTRY(fast_coprocessor)
229 229
230 /* Save remaining registers a1-a3 and SAR */ 230 /* Save remaining registers a1-a3 and SAR */
231 231
232 xsr a3, EXCSAVE_1 232 xsr a3, excsave1
233 s32i a3, a2, PT_AREG3 233 s32i a3, a2, PT_AREG3
234 rsr a3, SAR 234 rsr a3, sar
235 s32i a1, a2, PT_AREG1 235 s32i a1, a2, PT_AREG1
236 s32i a3, a2, PT_SAR 236 s32i a3, a2, PT_SAR
237 mov a1, a2 237 mov a1, a2
238 rsr a2, DEPC 238 rsr a2, depc
239 s32i a2, a1, PT_AREG2 239 s32i a2, a1, PT_AREG2
240 240
241 /* 241 /*
@@ -248,17 +248,17 @@ ENTRY(fast_coprocessor)
248 248
249 /* Find coprocessor number. Subtract first CP EXCCAUSE from EXCCAUSE */ 249 /* Find coprocessor number. Subtract first CP EXCCAUSE from EXCCAUSE */
250 250
251 rsr a3, EXCCAUSE 251 rsr a3, exccause
252 addi a3, a3, -EXCCAUSE_COPROCESSOR0_DISABLED 252 addi a3, a3, -EXCCAUSE_COPROCESSOR0_DISABLED
253 253
254 /* Set corresponding CPENABLE bit -> (sar:cp-index, a3: 1<<cp-index)*/ 254 /* Set corresponding CPENABLE bit -> (sar:cp-index, a3: 1<<cp-index)*/
255 255
256 ssl a3 # SAR: 32 - coprocessor_number 256 ssl a3 # SAR: 32 - coprocessor_number
257 movi a2, 1 257 movi a2, 1
258 rsr a0, CPENABLE 258 rsr a0, cpenable
259 sll a2, a2 259 sll a2, a2
260 or a0, a0, a2 260 or a0, a0, a2
261 wsr a0, CPENABLE 261 wsr a0, cpenable
262 rsync 262 rsync
263 263
264 /* Retrieve previous owner. (a3 still holds CP number) */ 264 /* Retrieve previous owner. (a3 still holds CP number) */
@@ -291,7 +291,7 @@ ENTRY(fast_coprocessor)
291 291
292 /* Note that only a0 and a1 were preserved. */ 292 /* Note that only a0 and a1 were preserved. */
293 293
2942: rsr a3, EXCCAUSE 2942: rsr a3, exccause
295 addi a3, a3, -EXCCAUSE_COPROCESSOR0_DISABLED 295 addi a3, a3, -EXCCAUSE_COPROCESSOR0_DISABLED
296 movi a0, coprocessor_owner 296 movi a0, coprocessor_owner
297 addx4 a0, a3, a0 297 addx4 a0, a3, a0
@@ -321,7 +321,7 @@ ENTRY(fast_coprocessor)
321 l32i a0, a1, PT_SAR 321 l32i a0, a1, PT_SAR
322 l32i a3, a1, PT_AREG3 322 l32i a3, a1, PT_AREG3
323 l32i a2, a1, PT_AREG2 323 l32i a2, a1, PT_AREG2
324 wsr a0, SAR 324 wsr a0, sar
325 l32i a0, a1, PT_AREG0 325 l32i a0, a1, PT_AREG0
326 l32i a1, a1, PT_AREG1 326 l32i a1, a1, PT_AREG1
327 327
diff --git a/arch/xtensa/kernel/entry.S b/arch/xtensa/kernel/entry.S
index 7e6236073397..18453067c258 100644
--- a/arch/xtensa/kernel/entry.S
+++ b/arch/xtensa/kernel/entry.S
@@ -112,8 +112,8 @@ ENTRY(user_exception)
112 112
113 /* Save a2, a3, and depc, restore excsave_1 and set SP. */ 113 /* Save a2, a3, and depc, restore excsave_1 and set SP. */
114 114
115 xsr a3, EXCSAVE_1 115 xsr a3, excsave1
116 rsr a0, DEPC 116 rsr a0, depc
117 s32i a1, a2, PT_AREG1 117 s32i a1, a2, PT_AREG1
118 s32i a0, a2, PT_AREG2 118 s32i a0, a2, PT_AREG2
119 s32i a3, a2, PT_AREG3 119 s32i a3, a2, PT_AREG3
@@ -125,16 +125,16 @@ _user_exception:
125 /* Save SAR and turn off single stepping */ 125 /* Save SAR and turn off single stepping */
126 126
127 movi a2, 0 127 movi a2, 0
128 rsr a3, SAR 128 rsr a3, sar
129 xsr a2, ICOUNTLEVEL 129 xsr a2, icountlevel
130 s32i a3, a1, PT_SAR 130 s32i a3, a1, PT_SAR
131 s32i a2, a1, PT_ICOUNTLEVEL 131 s32i a2, a1, PT_ICOUNTLEVEL
132 132
133 /* Rotate ws so that the current windowbase is at bit0. */ 133 /* Rotate ws so that the current windowbase is at bit0. */
134 /* Assume ws = xxwww1yyyy. Rotate ws right, so that a2 = yyyyxxwww1 */ 134 /* Assume ws = xxwww1yyyy. Rotate ws right, so that a2 = yyyyxxwww1 */
135 135
136 rsr a2, WINDOWBASE 136 rsr a2, windowbase
137 rsr a3, WINDOWSTART 137 rsr a3, windowstart
138 ssr a2 138 ssr a2
139 s32i a2, a1, PT_WINDOWBASE 139 s32i a2, a1, PT_WINDOWBASE
140 s32i a3, a1, PT_WINDOWSTART 140 s32i a3, a1, PT_WINDOWSTART
@@ -205,12 +205,12 @@ _user_exception:
205 205
206 /* WINDOWBASE still in SAR! */ 206 /* WINDOWBASE still in SAR! */
207 207
208 rsr a2, SAR # original WINDOWBASE 208 rsr a2, sar # original WINDOWBASE
209 movi a3, 1 209 movi a3, 1
210 ssl a2 210 ssl a2
211 sll a3, a3 211 sll a3, a3
212 wsr a3, WINDOWSTART # set corresponding WINDOWSTART bit 212 wsr a3, windowstart # set corresponding WINDOWSTART bit
213 wsr a2, WINDOWBASE # and WINDOWSTART 213 wsr a2, windowbase # and WINDOWSTART
214 rsync 214 rsync
215 215
216 /* We are back to the original stack pointer (a1) */ 216 /* We are back to the original stack pointer (a1) */
@@ -252,8 +252,8 @@ ENTRY(kernel_exception)
252 252
253 /* Save a0, a2, a3, DEPC and set SP. */ 253 /* Save a0, a2, a3, DEPC and set SP. */
254 254
255 xsr a3, EXCSAVE_1 # restore a3, excsave_1 255 xsr a3, excsave1 # restore a3, excsave_1
256 rsr a0, DEPC # get a2 256 rsr a0, depc # get a2
257 s32i a1, a2, PT_AREG1 257 s32i a1, a2, PT_AREG1
258 s32i a0, a2, PT_AREG2 258 s32i a0, a2, PT_AREG2
259 s32i a3, a2, PT_AREG3 259 s32i a3, a2, PT_AREG3
@@ -265,16 +265,16 @@ _kernel_exception:
265 /* Save SAR and turn off single stepping */ 265 /* Save SAR and turn off single stepping */
266 266
267 movi a2, 0 267 movi a2, 0
268 rsr a3, SAR 268 rsr a3, sar
269 xsr a2, ICOUNTLEVEL 269 xsr a2, icountlevel
270 s32i a3, a1, PT_SAR 270 s32i a3, a1, PT_SAR
271 s32i a2, a1, PT_ICOUNTLEVEL 271 s32i a2, a1, PT_ICOUNTLEVEL
272 272
273 /* Rotate ws so that the current windowbase is at bit0. */ 273 /* Rotate ws so that the current windowbase is at bit0. */
274 /* Assume ws = xxwww1yyyy. Rotate ws right, so that a2 = yyyyxxwww1 */ 274 /* Assume ws = xxwww1yyyy. Rotate ws right, so that a2 = yyyyxxwww1 */
275 275
276 rsr a2, WINDOWBASE # don't need to save these, we only 276 rsr a2, windowbase # don't need to save these, we only
277 rsr a3, WINDOWSTART # need shifted windowstart: windowmask 277 rsr a3, windowstart # need shifted windowstart: windowmask
278 ssr a2 278 ssr a2
279 slli a2, a3, 32-WSBITS 279 slli a2, a3, 32-WSBITS
280 src a2, a3, a2 280 src a2, a3, a2
@@ -323,24 +323,24 @@ common_exception:
323 323
324 /* Save some registers, disable loops and clear the syscall flag. */ 324 /* Save some registers, disable loops and clear the syscall flag. */
325 325
326 rsr a2, DEBUGCAUSE 326 rsr a2, debugcause
327 rsr a3, EPC_1 327 rsr a3, epc1
328 s32i a2, a1, PT_DEBUGCAUSE 328 s32i a2, a1, PT_DEBUGCAUSE
329 s32i a3, a1, PT_PC 329 s32i a3, a1, PT_PC
330 330
331 movi a2, -1 331 movi a2, -1
332 rsr a3, EXCVADDR 332 rsr a3, excvaddr
333 s32i a2, a1, PT_SYSCALL 333 s32i a2, a1, PT_SYSCALL
334 movi a2, 0 334 movi a2, 0
335 s32i a3, a1, PT_EXCVADDR 335 s32i a3, a1, PT_EXCVADDR
336 xsr a2, LCOUNT 336 xsr a2, lcount
337 s32i a2, a1, PT_LCOUNT 337 s32i a2, a1, PT_LCOUNT
338 338
339 /* It is now save to restore the EXC_TABLE_FIXUP variable. */ 339 /* It is now save to restore the EXC_TABLE_FIXUP variable. */
340 340
341 rsr a0, EXCCAUSE 341 rsr a0, exccause
342 movi a3, 0 342 movi a3, 0
343 rsr a2, EXCSAVE_1 343 rsr a2, excsave1
344 s32i a0, a1, PT_EXCCAUSE 344 s32i a0, a1, PT_EXCCAUSE
345 s32i a3, a2, EXC_TABLE_FIXUP 345 s32i a3, a2, EXC_TABLE_FIXUP
346 346
@@ -352,22 +352,22 @@ common_exception:
352 * (interrupts disabled) and if this exception is not an interrupt. 352 * (interrupts disabled) and if this exception is not an interrupt.
353 */ 353 */
354 354
355 rsr a3, PS 355 rsr a3, ps
356 addi a0, a0, -4 356 addi a0, a0, -4
357 movi a2, 1 357 movi a2, 1
358 extui a3, a3, 0, 1 # a3 = PS.INTLEVEL[0] 358 extui a3, a3, 0, 1 # a3 = PS.INTLEVEL[0]
359 moveqz a3, a2, a0 # a3 = 1 iff interrupt exception 359 moveqz a3, a2, a0 # a3 = 1 iff interrupt exception
360 movi a2, 1 << PS_WOE_BIT 360 movi a2, 1 << PS_WOE_BIT
361 or a3, a3, a2 361 or a3, a3, a2
362 rsr a0, EXCCAUSE 362 rsr a0, exccause
363 xsr a3, PS 363 xsr a3, ps
364 364
365 s32i a3, a1, PT_PS # save ps 365 s32i a3, a1, PT_PS # save ps
366 366
367 /* Save LBEG, LEND */ 367 /* Save lbeg, lend */
368 368
369 rsr a2, LBEG 369 rsr a2, lbeg
370 rsr a3, LEND 370 rsr a3, lend
371 s32i a2, a1, PT_LBEG 371 s32i a2, a1, PT_LBEG
372 s32i a3, a1, PT_LEND 372 s32i a3, a1, PT_LEND
373 373
@@ -432,7 +432,7 @@ common_exception_return:
432 432
433 load_xtregs_opt a1 a2 a4 a5 a6 a7 PT_XTREGS_OPT 433 load_xtregs_opt a1 a2 a4 a5 a6 a7 PT_XTREGS_OPT
434 434
435 wsr a3, PS /* disable interrupts */ 435 wsr a3, ps /* disable interrupts */
436 436
437 _bbci.l a3, PS_UM_BIT, kernel_exception_exit 437 _bbci.l a3, PS_UM_BIT, kernel_exception_exit
438 438
@@ -444,12 +444,12 @@ user_exception_exit:
444 444
445 l32i a2, a1, PT_WINDOWBASE 445 l32i a2, a1, PT_WINDOWBASE
446 l32i a3, a1, PT_WINDOWSTART 446 l32i a3, a1, PT_WINDOWSTART
447 wsr a1, DEPC # use DEPC as temp storage 447 wsr a1, depc # use DEPC as temp storage
448 wsr a3, WINDOWSTART # restore WINDOWSTART 448 wsr a3, windowstart # restore WINDOWSTART
449 ssr a2 # preserve user's WB in the SAR 449 ssr a2 # preserve user's WB in the SAR
450 wsr a2, WINDOWBASE # switch to user's saved WB 450 wsr a2, windowbase # switch to user's saved WB
451 rsync 451 rsync
452 rsr a1, DEPC # restore stack pointer 452 rsr a1, depc # restore stack pointer
453 l32i a2, a1, PT_WMASK # register frames saved (in bits 4...9) 453 l32i a2, a1, PT_WMASK # register frames saved (in bits 4...9)
454 rotw -1 # we restore a4..a7 454 rotw -1 # we restore a4..a7
455 _bltui a6, 16, 1f # only have to restore current window? 455 _bltui a6, 16, 1f # only have to restore current window?
@@ -475,8 +475,8 @@ user_exception_exit:
475 475
476 /* Clear unrestored registers (don't leak anything to user-land */ 476 /* Clear unrestored registers (don't leak anything to user-land */
477 477
4781: rsr a0, WINDOWBASE 4781: rsr a0, windowbase
479 rsr a3, SAR 479 rsr a3, sar
480 sub a3, a0, a3 480 sub a3, a0, a3
481 beqz a3, 2f 481 beqz a3, 2f
482 extui a3, a3, 0, WBBITS 482 extui a3, a3, 0, WBBITS
@@ -556,7 +556,7 @@ kernel_exception_exit:
556 556
557 /* Test WINDOWSTART now. If spilled, do the movsp */ 557 /* Test WINDOWSTART now. If spilled, do the movsp */
558 558
559 rsr a3, WINDOWSTART 559 rsr a3, windowstart
560 addi a0, a3, -1 560 addi a0, a3, -1
561 and a3, a3, a0 561 and a3, a3, a0
562 _bnez a3, common_exception_exit 562 _bnez a3, common_exception_exit
@@ -604,24 +604,24 @@ common_exception_exit:
604 604
6051: l32i a2, a1, PT_PC 6051: l32i a2, a1, PT_PC
606 l32i a3, a1, PT_SAR 606 l32i a3, a1, PT_SAR
607 wsr a2, EPC_1 607 wsr a2, epc1
608 wsr a3, SAR 608 wsr a3, sar
609 609
610 /* Restore LBEG, LEND, LCOUNT */ 610 /* Restore LBEG, LEND, LCOUNT */
611 611
612 l32i a2, a1, PT_LBEG 612 l32i a2, a1, PT_LBEG
613 l32i a3, a1, PT_LEND 613 l32i a3, a1, PT_LEND
614 wsr a2, LBEG 614 wsr a2, lbeg
615 l32i a2, a1, PT_LCOUNT 615 l32i a2, a1, PT_LCOUNT
616 wsr a3, LEND 616 wsr a3, lend
617 wsr a2, LCOUNT 617 wsr a2, lcount
618 618
619 /* We control single stepping through the ICOUNTLEVEL register. */ 619 /* We control single stepping through the ICOUNTLEVEL register. */
620 620
621 l32i a2, a1, PT_ICOUNTLEVEL 621 l32i a2, a1, PT_ICOUNTLEVEL
622 movi a3, -2 622 movi a3, -2
623 wsr a2, ICOUNTLEVEL 623 wsr a2, icountlevel
624 wsr a3, ICOUNT 624 wsr a3, icount
625 625
626 /* Check if it was double exception. */ 626 /* Check if it was double exception. */
627 627
@@ -636,7 +636,7 @@ common_exception_exit:
636 l32i a1, a1, PT_AREG1 636 l32i a1, a1, PT_AREG1
637 rfe 637 rfe
638 638
6391: wsr a0, DEPC 6391: wsr a0, depc
640 l32i a0, a1, PT_AREG0 640 l32i a0, a1, PT_AREG0
641 l32i a1, a1, PT_AREG1 641 l32i a1, a1, PT_AREG1
642 rfde 642 rfde
@@ -651,25 +651,25 @@ common_exception_exit:
651 651
652ENTRY(debug_exception) 652ENTRY(debug_exception)
653 653
654 rsr a0, EPS + XCHAL_DEBUGLEVEL 654 rsr a0, SREG_EPS + XCHAL_DEBUGLEVEL
655 bbsi.l a0, PS_EXCM_BIT, 1f # exception mode 655 bbsi.l a0, PS_EXCM_BIT, 1f # exception mode
656 656
657 /* Set EPC_1 and EXCCAUSE */ 657 /* Set EPC1 and EXCCAUSE */
658 658
659 wsr a2, DEPC # save a2 temporarily 659 wsr a2, depc # save a2 temporarily
660 rsr a2, EPC + XCHAL_DEBUGLEVEL 660 rsr a2, SREG_EPC + XCHAL_DEBUGLEVEL
661 wsr a2, EPC_1 661 wsr a2, epc1
662 662
663 movi a2, EXCCAUSE_MAPPED_DEBUG 663 movi a2, EXCCAUSE_MAPPED_DEBUG
664 wsr a2, EXCCAUSE 664 wsr a2, exccause
665 665
666 /* Restore PS to the value before the debug exc but with PS.EXCM set.*/ 666 /* Restore PS to the value before the debug exc but with PS.EXCM set.*/
667 667
668 movi a2, 1 << PS_EXCM_BIT 668 movi a2, 1 << PS_EXCM_BIT
669 or a2, a0, a2 669 or a2, a0, a2
670 movi a0, debug_exception # restore a3, debug jump vector 670 movi a0, debug_exception # restore a3, debug jump vector
671 wsr a2, PS 671 wsr a2, ps
672 xsr a0, EXCSAVE + XCHAL_DEBUGLEVEL 672 xsr a0, SREG_EXCSAVE + XCHAL_DEBUGLEVEL
673 673
674 /* Switch to kernel/user stack, restore jump vector, and save a0 */ 674 /* Switch to kernel/user stack, restore jump vector, and save a0 */
675 675
@@ -680,19 +680,19 @@ ENTRY(debug_exception)
680 movi a0, 0 680 movi a0, 0
681 s32i a1, a2, PT_AREG1 681 s32i a1, a2, PT_AREG1
682 s32i a0, a2, PT_DEPC # mark it as a regular exception 682 s32i a0, a2, PT_DEPC # mark it as a regular exception
683 xsr a0, DEPC 683 xsr a0, depc
684 s32i a3, a2, PT_AREG3 684 s32i a3, a2, PT_AREG3
685 s32i a0, a2, PT_AREG2 685 s32i a0, a2, PT_AREG2
686 mov a1, a2 686 mov a1, a2
687 j _kernel_exception 687 j _kernel_exception
688 688
6892: rsr a2, EXCSAVE_1 6892: rsr a2, excsave1
690 l32i a2, a2, EXC_TABLE_KSTK # load kernel stack pointer 690 l32i a2, a2, EXC_TABLE_KSTK # load kernel stack pointer
691 s32i a0, a2, PT_AREG0 691 s32i a0, a2, PT_AREG0
692 movi a0, 0 692 movi a0, 0
693 s32i a1, a2, PT_AREG1 693 s32i a1, a2, PT_AREG1
694 s32i a0, a2, PT_DEPC 694 s32i a0, a2, PT_DEPC
695 xsr a0, DEPC 695 xsr a0, depc
696 s32i a3, a2, PT_AREG3 696 s32i a3, a2, PT_AREG3
697 s32i a0, a2, PT_AREG2 697 s32i a0, a2, PT_AREG2
698 mov a1, a2 698 mov a1, a2
@@ -732,12 +732,12 @@ ENTRY(unrecoverable_exception)
732 movi a0, 1 732 movi a0, 1
733 movi a1, 0 733 movi a1, 0
734 734
735 wsr a0, WINDOWSTART 735 wsr a0, windowstart
736 wsr a1, WINDOWBASE 736 wsr a1, windowbase
737 rsync 737 rsync
738 738
739 movi a1, (1 << PS_WOE_BIT) | 1 739 movi a1, (1 << PS_WOE_BIT) | 1
740 wsr a1, PS 740 wsr a1, ps
741 rsync 741 rsync
742 742
743 movi a1, init_task 743 movi a1, init_task
@@ -793,7 +793,7 @@ ENTRY(fast_alloca)
793 l32i a0, a2, PT_DEPC 793 l32i a0, a2, PT_DEPC
794 _bgeui a0, VALID_DOUBLE_EXCEPTION_ADDRESS, .Lunhandled_double 794 _bgeui a0, VALID_DOUBLE_EXCEPTION_ADDRESS, .Lunhandled_double
795 795
796 rsr a0, DEPC # get a2 796 rsr a0, depc # get a2
797 s32i a4, a2, PT_AREG4 # save a4 and 797 s32i a4, a2, PT_AREG4 # save a4 and
798 s32i a0, a2, PT_AREG2 # a2 to stack 798 s32i a0, a2, PT_AREG2 # a2 to stack
799 799
@@ -804,8 +804,8 @@ ENTRY(fast_alloca)
804 804
805 /* Restore a3, excsave_1 */ 805 /* Restore a3, excsave_1 */
806 806
807 xsr a3, EXCSAVE_1 # make sure excsave_1 is valid for dbl. 807 xsr a3, excsave1 # make sure excsave_1 is valid for dbl.
808 rsr a4, EPC_1 # get exception address 808 rsr a4, epc1 # get exception address
809 s32i a3, a2, PT_AREG3 # save a3 to stack 809 s32i a3, a2, PT_AREG3 # save a3 to stack
810 810
811#ifdef ALLOCA_EXCEPTION_IN_IRAM 811#ifdef ALLOCA_EXCEPTION_IN_IRAM
@@ -820,7 +820,7 @@ ENTRY(fast_alloca)
820 jx a3 820 jx a3
821 821
822.Lunhandled_double: 822.Lunhandled_double:
823 wsr a0, EXCSAVE_1 823 wsr a0, excsave1
824 movi a0, unrecoverable_exception 824 movi a0, unrecoverable_exception
825 callx0 a0 825 callx0 a0
826 826
@@ -852,7 +852,7 @@ ENTRY(fast_alloca)
852#endif 852#endif
853 addi a4, a4, 3 # step over movsp 853 addi a4, a4, 3 # step over movsp
854 _EXTUI_MOVSP_DST(a0) # extract destination register 854 _EXTUI_MOVSP_DST(a0) # extract destination register
855 wsr a4, EPC_1 # save new epc_1 855 wsr a4, epc1 # save new epc_1
856 856
857 _bnei a0, 1, 1f # no 'movsp a1, ax': jump 857 _bnei a0, 1, 1f # no 'movsp a1, ax': jump
858 858
@@ -953,14 +953,14 @@ ENTRY(fast_syscall_kernel)
953 953
954 /* Skip syscall. */ 954 /* Skip syscall. */
955 955
956 rsr a0, EPC_1 956 rsr a0, epc1
957 addi a0, a0, 3 957 addi a0, a0, 3
958 wsr a0, EPC_1 958 wsr a0, epc1
959 959
960 l32i a0, a2, PT_DEPC 960 l32i a0, a2, PT_DEPC
961 bgeui a0, VALID_DOUBLE_EXCEPTION_ADDRESS, fast_syscall_unrecoverable 961 bgeui a0, VALID_DOUBLE_EXCEPTION_ADDRESS, fast_syscall_unrecoverable
962 962
963 rsr a0, DEPC # get syscall-nr 963 rsr a0, depc # get syscall-nr
964 _beqz a0, fast_syscall_spill_registers 964 _beqz a0, fast_syscall_spill_registers
965 _beqi a0, __NR_xtensa, fast_syscall_xtensa 965 _beqi a0, __NR_xtensa, fast_syscall_xtensa
966 966
@@ -970,14 +970,14 @@ ENTRY(fast_syscall_user)
970 970
971 /* Skip syscall. */ 971 /* Skip syscall. */
972 972
973 rsr a0, EPC_1 973 rsr a0, epc1
974 addi a0, a0, 3 974 addi a0, a0, 3
975 wsr a0, EPC_1 975 wsr a0, epc1
976 976
977 l32i a0, a2, PT_DEPC 977 l32i a0, a2, PT_DEPC
978 bgeui a0, VALID_DOUBLE_EXCEPTION_ADDRESS, fast_syscall_unrecoverable 978 bgeui a0, VALID_DOUBLE_EXCEPTION_ADDRESS, fast_syscall_unrecoverable
979 979
980 rsr a0, DEPC # get syscall-nr 980 rsr a0, depc # get syscall-nr
981 _beqz a0, fast_syscall_spill_registers 981 _beqz a0, fast_syscall_spill_registers
982 _beqi a0, __NR_xtensa, fast_syscall_xtensa 982 _beqi a0, __NR_xtensa, fast_syscall_xtensa
983 983
@@ -988,10 +988,10 @@ ENTRY(fast_syscall_unrecoverable)
988 /* Restore all states. */ 988 /* Restore all states. */
989 989
990 l32i a0, a2, PT_AREG0 # restore a0 990 l32i a0, a2, PT_AREG0 # restore a0
991 xsr a2, DEPC # restore a2, depc 991 xsr a2, depc # restore a2, depc
992 rsr a3, EXCSAVE_1 992 rsr a3, excsave1
993 993
994 wsr a0, EXCSAVE_1 994 wsr a0, excsave1
995 movi a0, unrecoverable_exception 995 movi a0, unrecoverable_exception
996 callx0 a0 996 callx0 a0
997 997
@@ -1047,7 +1047,7 @@ ENTRY(fast_syscall_unrecoverable)
1047 1047
1048ENTRY(fast_syscall_xtensa) 1048ENTRY(fast_syscall_xtensa)
1049 1049
1050 xsr a3, EXCSAVE_1 # restore a3, excsave1 1050 xsr a3, excsave1 # restore a3, excsave1
1051 1051
1052 s32i a7, a2, PT_AREG7 # we need an additional register 1052 s32i a7, a2, PT_AREG7 # we need an additional register
1053 movi a7, 4 # sizeof(unsigned int) 1053 movi a7, 4 # sizeof(unsigned int)
@@ -1124,13 +1124,13 @@ ENTRY(fast_syscall_spill_registers)
1124 1124
1125 movi a0, fast_syscall_spill_registers_fixup 1125 movi a0, fast_syscall_spill_registers_fixup
1126 s32i a0, a3, EXC_TABLE_FIXUP 1126 s32i a0, a3, EXC_TABLE_FIXUP
1127 rsr a0, WINDOWBASE 1127 rsr a0, windowbase
1128 s32i a0, a3, EXC_TABLE_PARAM 1128 s32i a0, a3, EXC_TABLE_PARAM
1129 1129
1130 /* Save a3 and SAR on stack. */ 1130 /* Save a3 and SAR on stack. */
1131 1131
1132 rsr a0, SAR 1132 rsr a0, sar
1133 xsr a3, EXCSAVE_1 # restore a3 and excsave_1 1133 xsr a3, excsave1 # restore a3 and excsave_1
1134 s32i a3, a2, PT_AREG3 1134 s32i a3, a2, PT_AREG3
1135 s32i a4, a2, PT_AREG4 1135 s32i a4, a2, PT_AREG4
1136 s32i a0, a2, PT_AREG5 # store SAR to PT_AREG5 1136 s32i a0, a2, PT_AREG5 # store SAR to PT_AREG5
@@ -1148,7 +1148,7 @@ ENTRY(fast_syscall_spill_registers)
1148 l32i a3, a2, PT_AREG5 1148 l32i a3, a2, PT_AREG5
1149 l32i a4, a2, PT_AREG4 1149 l32i a4, a2, PT_AREG4
1150 l32i a0, a2, PT_AREG0 1150 l32i a0, a2, PT_AREG0
1151 wsr a3, SAR 1151 wsr a3, sar
1152 l32i a3, a2, PT_AREG3 1152 l32i a3, a2, PT_AREG3
1153 1153
1154 /* Restore clobbered registers. */ 1154 /* Restore clobbered registers. */
@@ -1173,8 +1173,8 @@ ENTRY(fast_syscall_spill_registers)
1173 1173
1174fast_syscall_spill_registers_fixup: 1174fast_syscall_spill_registers_fixup:
1175 1175
1176 rsr a2, WINDOWBASE # get current windowbase (a2 is saved) 1176 rsr a2, windowbase # get current windowbase (a2 is saved)
1177 xsr a0, DEPC # restore depc and a0 1177 xsr a0, depc # restore depc and a0
1178 ssl a2 # set shift (32 - WB) 1178 ssl a2 # set shift (32 - WB)
1179 1179
1180 /* We need to make sure the current registers (a0-a3) are preserved. 1180 /* We need to make sure the current registers (a0-a3) are preserved.
@@ -1182,12 +1182,12 @@ fast_syscall_spill_registers_fixup:
1182 * in WS, so that the exception handlers save them to the task stack. 1182 * in WS, so that the exception handlers save them to the task stack.
1183 */ 1183 */
1184 1184
1185 rsr a3, EXCSAVE_1 # get spill-mask 1185 rsr a3, excsave1 # get spill-mask
1186 slli a2, a3, 1 # shift left by one 1186 slli a2, a3, 1 # shift left by one
1187 1187
1188 slli a3, a2, 32-WSBITS 1188 slli a3, a2, 32-WSBITS
1189 src a2, a2, a3 # a1 = xxwww1yyxxxwww1yy...... 1189 src a2, a2, a3 # a1 = xxwww1yyxxxwww1yy......
1190 wsr a2, WINDOWSTART # set corrected windowstart 1190 wsr a2, windowstart # set corrected windowstart
1191 1191
1192 movi a3, exc_table 1192 movi a3, exc_table
1193 l32i a2, a3, EXC_TABLE_DOUBLE_SAVE # restore a2 1193 l32i a2, a3, EXC_TABLE_DOUBLE_SAVE # restore a2
@@ -1201,7 +1201,7 @@ fast_syscall_spill_registers_fixup:
1201 * excsave_1: a3 1201 * excsave_1: a3
1202 */ 1202 */
1203 1203
1204 wsr a3, WINDOWBASE 1204 wsr a3, windowbase
1205 rsync 1205 rsync
1206 1206
1207 /* We are now in the original frame when we entered _spill_registers: 1207 /* We are now in the original frame when we entered _spill_registers:
@@ -1227,7 +1227,7 @@ fast_syscall_spill_registers_fixup:
1227 /* Jump to the exception handler. */ 1227 /* Jump to the exception handler. */
1228 1228
1229 movi a3, exc_table 1229 movi a3, exc_table
1230 rsr a0, EXCCAUSE 1230 rsr a0, exccause
1231 addx4 a0, a0, a3 # find entry in table 1231 addx4 a0, a0, a3 # find entry in table
1232 l32i a0, a0, EXC_TABLE_FAST_USER # load handler 1232 l32i a0, a0, EXC_TABLE_FAST_USER # load handler
1233 jx a0 1233 jx a0
@@ -1236,28 +1236,28 @@ fast_syscall_spill_registers_fixup_return:
1236 1236
1237 /* When we return here, all registers have been restored (a2: DEPC) */ 1237 /* When we return here, all registers have been restored (a2: DEPC) */
1238 1238
1239 wsr a2, DEPC # exception address 1239 wsr a2, depc # exception address
1240 1240
1241 /* Restore fixup handler. */ 1241 /* Restore fixup handler. */
1242 1242
1243 xsr a3, EXCSAVE_1 1243 xsr a3, excsave1
1244 movi a2, fast_syscall_spill_registers_fixup 1244 movi a2, fast_syscall_spill_registers_fixup
1245 s32i a2, a3, EXC_TABLE_FIXUP 1245 s32i a2, a3, EXC_TABLE_FIXUP
1246 rsr a2, WINDOWBASE 1246 rsr a2, windowbase
1247 s32i a2, a3, EXC_TABLE_PARAM 1247 s32i a2, a3, EXC_TABLE_PARAM
1248 l32i a2, a3, EXC_TABLE_KSTK 1248 l32i a2, a3, EXC_TABLE_KSTK
1249 1249
1250 /* Load WB at the time the exception occurred. */ 1250 /* Load WB at the time the exception occurred. */
1251 1251
1252 rsr a3, SAR # WB is still in SAR 1252 rsr a3, sar # WB is still in SAR
1253 neg a3, a3 1253 neg a3, a3
1254 wsr a3, WINDOWBASE 1254 wsr a3, windowbase
1255 rsync 1255 rsync
1256 1256
1257 /* Restore a3 and return. */ 1257 /* Restore a3 and return. */
1258 1258
1259 movi a3, exc_table 1259 movi a3, exc_table
1260 xsr a3, EXCSAVE_1 1260 xsr a3, excsave1
1261 1261
1262 rfde 1262 rfde
1263 1263
@@ -1283,8 +1283,8 @@ ENTRY(_spill_registers)
1283 * Rotate ws right so that a4 = yyxxxwww1. 1283 * Rotate ws right so that a4 = yyxxxwww1.
1284 */ 1284 */
1285 1285
1286 rsr a4, WINDOWBASE 1286 rsr a4, windowbase
1287 rsr a3, WINDOWSTART # a3 = xxxwww1yy 1287 rsr a3, windowstart # a3 = xxxwww1yy
1288 ssr a4 # holds WB 1288 ssr a4 # holds WB
1289 slli a4, a3, WSBITS 1289 slli a4, a3, WSBITS
1290 or a3, a3, a4 # a3 = xxxwww1yyxxxwww1yy 1290 or a3, a3, a4 # a3 = xxxwww1yyxxxwww1yy
@@ -1302,7 +1302,7 @@ ENTRY(_spill_registers)
1302 1302
1303 /* Skip empty frames - get 'oldest' WINDOWSTART-bit. */ 1303 /* Skip empty frames - get 'oldest' WINDOWSTART-bit. */
1304 1304
1305 wsr a3, WINDOWSTART # save shifted windowstart 1305 wsr a3, windowstart # save shifted windowstart
1306 neg a4, a3 1306 neg a4, a3
1307 and a3, a4, a3 # first bit set from right: 000010000 1307 and a3, a4, a3 # first bit set from right: 000010000
1308 1308
@@ -1311,12 +1311,12 @@ ENTRY(_spill_registers)
1311 sub a4, a3, a4 # WSBITS-a4:number of 0-bits from right 1311 sub a4, a3, a4 # WSBITS-a4:number of 0-bits from right
1312 ssr a4 # save in SAR for later. 1312 ssr a4 # save in SAR for later.
1313 1313
1314 rsr a3, WINDOWBASE 1314 rsr a3, windowbase
1315 add a3, a3, a4 1315 add a3, a3, a4
1316 wsr a3, WINDOWBASE 1316 wsr a3, windowbase
1317 rsync 1317 rsync
1318 1318
1319 rsr a3, WINDOWSTART 1319 rsr a3, windowstart
1320 srl a3, a3 # shift windowstart 1320 srl a3, a3 # shift windowstart
1321 1321
1322 /* WB is now just one frame below the oldest frame in the register 1322 /* WB is now just one frame below the oldest frame in the register
@@ -1364,11 +1364,11 @@ ENTRY(_spill_registers)
1364.Lexit: /* Done. Do the final rotation, set WS, and return. */ 1364.Lexit: /* Done. Do the final rotation, set WS, and return. */
1365 1365
1366 rotw 1 1366 rotw 1
1367 rsr a3, WINDOWBASE 1367 rsr a3, windowbase
1368 ssl a3 1368 ssl a3
1369 movi a3, 1 1369 movi a3, 1
1370 sll a3, a3 1370 sll a3, a3
1371 wsr a3, WINDOWSTART 1371 wsr a3, windowstart
1372 ret 1372 ret
1373 1373
1374.Lc4: s32e a4, a9, -16 1374.Lc4: s32e a4, a9, -16
@@ -1429,7 +1429,7 @@ ENTRY(_spill_registers)
1429 * however, this condition is unrecoverable in kernel space. 1429 * however, this condition is unrecoverable in kernel space.
1430 */ 1430 */
1431 1431
1432 rsr a0, PS 1432 rsr a0, ps
1433 _bbci.l a0, PS_UM_BIT, 1f 1433 _bbci.l a0, PS_UM_BIT, 1f
1434 1434
1435 /* User space: Setup a dummy frame and kill application. 1435 /* User space: Setup a dummy frame and kill application.
@@ -1439,18 +1439,18 @@ ENTRY(_spill_registers)
1439 movi a0, 1 1439 movi a0, 1
1440 movi a1, 0 1440 movi a1, 0
1441 1441
1442 wsr a0, WINDOWSTART 1442 wsr a0, windowstart
1443 wsr a1, WINDOWBASE 1443 wsr a1, windowbase
1444 rsync 1444 rsync
1445 1445
1446 movi a0, 0 1446 movi a0, 0
1447 1447
1448 movi a3, exc_table 1448 movi a3, exc_table
1449 l32i a1, a3, EXC_TABLE_KSTK 1449 l32i a1, a3, EXC_TABLE_KSTK
1450 wsr a3, EXCSAVE_1 1450 wsr a3, excsave1
1451 1451
1452 movi a4, (1 << PS_WOE_BIT) | 1 1452 movi a4, (1 << PS_WOE_BIT) | 1
1453 wsr a4, PS 1453 wsr a4, ps
1454 rsync 1454 rsync
1455 1455
1456 movi a6, SIGSEGV 1456 movi a6, SIGSEGV
@@ -1459,7 +1459,7 @@ ENTRY(_spill_registers)
1459 1459
14601: /* Kernel space: PANIC! */ 14601: /* Kernel space: PANIC! */
1461 1461
1462 wsr a0, EXCSAVE_1 1462 wsr a0, excsave1
1463 movi a0, unrecoverable_exception 1463 movi a0, unrecoverable_exception
1464 callx0 a0 # should not return 1464 callx0 a0 # should not return
14651: j 1b 14651: j 1b
@@ -1524,7 +1524,7 @@ ENTRY(fast_second_level_miss)
1524 1524
1525 /* We deliberately destroy a3 that holds the exception table. */ 1525 /* We deliberately destroy a3 that holds the exception table. */
1526 1526
15278: rsr a3, EXCVADDR # fault address 15278: rsr a3, excvaddr # fault address
1528 _PGD_OFFSET(a0, a3, a1) 1528 _PGD_OFFSET(a0, a3, a1)
1529 l32i a0, a0, 0 # read pmdval 1529 l32i a0, a0, 0 # read pmdval
1530 beqz a0, 2f 1530 beqz a0, 2f
@@ -1542,7 +1542,7 @@ ENTRY(fast_second_level_miss)
1542 * pteval = ((pmdval - PAGE_OFFSET) & PAGE_MASK) | PAGE_DIRECTORY 1542 * pteval = ((pmdval - PAGE_OFFSET) & PAGE_MASK) | PAGE_DIRECTORY
1543 */ 1543 */
1544 1544
1545 movi a1, -PAGE_OFFSET 1545 movi a1, (-PAGE_OFFSET) & 0xffffffff
1546 add a0, a0, a1 # pmdval - PAGE_OFFSET 1546 add a0, a0, a1 # pmdval - PAGE_OFFSET
1547 extui a1, a0, 0, PAGE_SHIFT # ... & PAGE_MASK 1547 extui a1, a0, 0, PAGE_SHIFT # ... & PAGE_MASK
1548 xor a0, a0, a1 1548 xor a0, a0, a1
@@ -1561,7 +1561,7 @@ ENTRY(fast_second_level_miss)
1561 */ 1561 */
1562 1562
1563 extui a3, a3, 28, 2 # addr. bit 28 and 29 0,1,2,3 1563 extui a3, a3, 28, 2 # addr. bit 28 and 29 0,1,2,3
1564 rsr a1, PTEVADDR 1564 rsr a1, ptevaddr
1565 addx2 a3, a3, a3 # -> 0,3,6,9 1565 addx2 a3, a3, a3 # -> 0,3,6,9
1566 srli a1, a1, PAGE_SHIFT 1566 srli a1, a1, PAGE_SHIFT
1567 extui a3, a3, 2, 2 # -> 0,0,1,2 1567 extui a3, a3, 2, 2 # -> 0,0,1,2
@@ -1583,18 +1583,18 @@ ENTRY(fast_second_level_miss)
1583 l32i a0, a2, PT_AREG0 1583 l32i a0, a2, PT_AREG0
1584 l32i a1, a2, PT_AREG1 1584 l32i a1, a2, PT_AREG1
1585 l32i a2, a2, PT_DEPC 1585 l32i a2, a2, PT_DEPC
1586 xsr a3, EXCSAVE_1 1586 xsr a3, excsave1
1587 1587
1588 bgeui a2, VALID_DOUBLE_EXCEPTION_ADDRESS, 1f 1588 bgeui a2, VALID_DOUBLE_EXCEPTION_ADDRESS, 1f
1589 1589
1590 /* Restore excsave1 and return. */ 1590 /* Restore excsave1 and return. */
1591 1591
1592 rsr a2, DEPC 1592 rsr a2, depc
1593 rfe 1593 rfe
1594 1594
1595 /* Return from double exception. */ 1595 /* Return from double exception. */
1596 1596
15971: xsr a2, DEPC 15971: xsr a2, depc
1598 esync 1598 esync
1599 rfde 1599 rfde
1600 1600
@@ -1618,7 +1618,7 @@ ENTRY(fast_second_level_miss)
1618 /* Make sure the exception originated in the special functions */ 1618 /* Make sure the exception originated in the special functions */
1619 1619
1620 movi a0, __tlbtemp_mapping_start 1620 movi a0, __tlbtemp_mapping_start
1621 rsr a3, EPC_1 1621 rsr a3, epc1
1622 bltu a3, a0, 2f 1622 bltu a3, a0, 2f
1623 movi a0, __tlbtemp_mapping_end 1623 movi a0, __tlbtemp_mapping_end
1624 bgeu a3, a0, 2f 1624 bgeu a3, a0, 2f
@@ -1626,7 +1626,7 @@ ENTRY(fast_second_level_miss)
1626 /* Check if excvaddr was in one of the TLBTEMP_BASE areas. */ 1626 /* Check if excvaddr was in one of the TLBTEMP_BASE areas. */
1627 1627
1628 movi a3, TLBTEMP_BASE_1 1628 movi a3, TLBTEMP_BASE_1
1629 rsr a0, EXCVADDR 1629 rsr a0, excvaddr
1630 bltu a0, a3, 2f 1630 bltu a0, a3, 2f
1631 1631
1632 addi a1, a0, -(2 << (DCACHE_ALIAS_ORDER + PAGE_SHIFT)) 1632 addi a1, a0, -(2 << (DCACHE_ALIAS_ORDER + PAGE_SHIFT))
@@ -1635,7 +1635,7 @@ ENTRY(fast_second_level_miss)
1635 /* Check if we have to restore an ITLB mapping. */ 1635 /* Check if we have to restore an ITLB mapping. */
1636 1636
1637 movi a1, __tlbtemp_mapping_itlb 1637 movi a1, __tlbtemp_mapping_itlb
1638 rsr a3, EPC_1 1638 rsr a3, epc1
1639 sub a3, a3, a1 1639 sub a3, a3, a1
1640 1640
1641 /* Calculate VPN */ 1641 /* Calculate VPN */
@@ -1671,13 +1671,13 @@ ENTRY(fast_second_level_miss)
16712: /* Invalid PGD, default exception handling */ 16712: /* Invalid PGD, default exception handling */
1672 1672
1673 movi a3, exc_table 1673 movi a3, exc_table
1674 rsr a1, DEPC 1674 rsr a1, depc
1675 xsr a3, EXCSAVE_1 1675 xsr a3, excsave1
1676 s32i a1, a2, PT_AREG2 1676 s32i a1, a2, PT_AREG2
1677 s32i a3, a2, PT_AREG3 1677 s32i a3, a2, PT_AREG3
1678 mov a1, a2 1678 mov a1, a2
1679 1679
1680 rsr a2, PS 1680 rsr a2, ps
1681 bbsi.l a2, PS_UM_BIT, 1f 1681 bbsi.l a2, PS_UM_BIT, 1f
1682 j _kernel_exception 1682 j _kernel_exception
16831: j _user_exception 16831: j _user_exception
@@ -1712,7 +1712,7 @@ ENTRY(fast_store_prohibited)
1712 l32i a0, a1, TASK_MM # tsk->mm 1712 l32i a0, a1, TASK_MM # tsk->mm
1713 beqz a0, 9f 1713 beqz a0, 9f
1714 1714
17158: rsr a1, EXCVADDR # fault address 17158: rsr a1, excvaddr # fault address
1716 _PGD_OFFSET(a0, a1, a4) 1716 _PGD_OFFSET(a0, a1, a4)
1717 l32i a0, a0, 0 1717 l32i a0, a0, 0
1718 beqz a0, 2f 1718 beqz a0, 2f
@@ -1725,7 +1725,7 @@ ENTRY(fast_store_prohibited)
1725 1725
1726 movi a1, _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_HW_WRITE 1726 movi a1, _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_HW_WRITE
1727 or a4, a4, a1 1727 or a4, a4, a1
1728 rsr a1, EXCVADDR 1728 rsr a1, excvaddr
1729 s32i a4, a0, 0 1729 s32i a4, a0, 0
1730 1730
1731 /* We need to flush the cache if we have page coloring. */ 1731 /* We need to flush the cache if we have page coloring. */
@@ -1749,15 +1749,15 @@ ENTRY(fast_store_prohibited)
1749 1749
1750 /* Restore excsave1 and a3. */ 1750 /* Restore excsave1 and a3. */
1751 1751
1752 xsr a3, EXCSAVE_1 1752 xsr a3, excsave1
1753 bgeui a2, VALID_DOUBLE_EXCEPTION_ADDRESS, 1f 1753 bgeui a2, VALID_DOUBLE_EXCEPTION_ADDRESS, 1f
1754 1754
1755 rsr a2, DEPC 1755 rsr a2, depc
1756 rfe 1756 rfe
1757 1757
1758 /* Double exception. Restore FIXUP handler and return. */ 1758 /* Double exception. Restore FIXUP handler and return. */
1759 1759
17601: xsr a2, DEPC 17601: xsr a2, depc
1761 esync 1761 esync
1762 rfde 1762 rfde
1763 1763
@@ -1766,14 +1766,14 @@ ENTRY(fast_store_prohibited)
1766 1766
17672: /* If there was a problem, handle fault in C */ 17672: /* If there was a problem, handle fault in C */
1768 1768
1769 rsr a4, DEPC # still holds a2 1769 rsr a4, depc # still holds a2
1770 xsr a3, EXCSAVE_1 1770 xsr a3, excsave1
1771 s32i a4, a2, PT_AREG2 1771 s32i a4, a2, PT_AREG2
1772 s32i a3, a2, PT_AREG3 1772 s32i a3, a2, PT_AREG3
1773 l32i a4, a2, PT_AREG4 1773 l32i a4, a2, PT_AREG4
1774 mov a1, a2 1774 mov a1, a2
1775 1775
1776 rsr a2, PS 1776 rsr a2, ps
1777 bbsi.l a2, PS_UM_BIT, 1f 1777 bbsi.l a2, PS_UM_BIT, 1f
1778 j _kernel_exception 1778 j _kernel_exception
17791: j _user_exception 17791: j _user_exception
@@ -1901,8 +1901,8 @@ ENTRY(_switch_to)
1901 /* Disable ints while we manipulate the stack pointer. */ 1901 /* Disable ints while we manipulate the stack pointer. */
1902 1902
1903 movi a14, (1 << PS_EXCM_BIT) | LOCKLEVEL 1903 movi a14, (1 << PS_EXCM_BIT) | LOCKLEVEL
1904 xsr a14, PS 1904 xsr a14, ps
1905 rsr a3, EXCSAVE_1 1905 rsr a3, excsave1
1906 rsync 1906 rsync
1907 s32i a3, a3, EXC_TABLE_FIXUP /* enter critical section */ 1907 s32i a3, a3, EXC_TABLE_FIXUP /* enter critical section */
1908 1908
@@ -1910,7 +1910,7 @@ ENTRY(_switch_to)
1910 1910
1911#if (XTENSA_HAVE_COPROCESSORS || XTENSA_HAVE_IO_PORTS) 1911#if (XTENSA_HAVE_COPROCESSORS || XTENSA_HAVE_IO_PORTS)
1912 l32i a3, a5, THREAD_CPENABLE 1912 l32i a3, a5, THREAD_CPENABLE
1913 xsr a3, CPENABLE 1913 xsr a3, cpenable
1914 s32i a3, a4, THREAD_CPENABLE 1914 s32i a3, a4, THREAD_CPENABLE
1915#endif 1915#endif
1916 1916
@@ -1924,7 +1924,7 @@ ENTRY(_switch_to)
1924 * we return from kernel space. 1924 * we return from kernel space.
1925 */ 1925 */
1926 1926
1927 rsr a3, EXCSAVE_1 # exc_table 1927 rsr a3, excsave1 # exc_table
1928 movi a6, 0 1928 movi a6, 0
1929 addi a7, a5, PT_REGS_OFFSET 1929 addi a7, a5, PT_REGS_OFFSET
1930 s32i a6, a3, EXC_TABLE_FIXUP 1930 s32i a6, a3, EXC_TABLE_FIXUP
@@ -1937,7 +1937,7 @@ ENTRY(_switch_to)
1937 1937
1938 load_xtregs_user a5 a6 a8 a9 a10 a11 THREAD_XTREGS_USER 1938 load_xtregs_user a5 a6 a8 a9 a10 a11 THREAD_XTREGS_USER
1939 1939
1940 wsr a14, PS 1940 wsr a14, ps
1941 mov a2, a12 # return 'prev' 1941 mov a2, a12 # return 'prev'
1942 rsync 1942 rsync
1943 1943
diff --git a/arch/xtensa/kernel/head.S b/arch/xtensa/kernel/head.S
index 3ef91a73652d..bdc50788f35e 100644
--- a/arch/xtensa/kernel/head.S
+++ b/arch/xtensa/kernel/head.S
@@ -61,18 +61,18 @@ _startup:
61 /* Disable interrupts and exceptions. */ 61 /* Disable interrupts and exceptions. */
62 62
63 movi a0, LOCKLEVEL 63 movi a0, LOCKLEVEL
64 wsr a0, PS 64 wsr a0, ps
65 65
66 /* Preserve the pointer to the boot parameter list in EXCSAVE_1 */ 66 /* Preserve the pointer to the boot parameter list in EXCSAVE_1 */
67 67
68 wsr a2, EXCSAVE_1 68 wsr a2, excsave1
69 69
70 /* Start with a fresh windowbase and windowstart. */ 70 /* Start with a fresh windowbase and windowstart. */
71 71
72 movi a1, 1 72 movi a1, 1
73 movi a0, 0 73 movi a0, 0
74 wsr a1, WINDOWSTART 74 wsr a1, windowstart
75 wsr a0, WINDOWBASE 75 wsr a0, windowbase
76 rsync 76 rsync
77 77
78 /* Set a0 to 0 for the remaining initialization. */ 78 /* Set a0 to 0 for the remaining initialization. */
@@ -82,46 +82,46 @@ _startup:
82 /* Clear debugging registers. */ 82 /* Clear debugging registers. */
83 83
84#if XCHAL_HAVE_DEBUG 84#if XCHAL_HAVE_DEBUG
85 wsr a0, IBREAKENABLE 85 wsr a0, ibreakenable
86 wsr a0, ICOUNT 86 wsr a0, icount
87 movi a1, 15 87 movi a1, 15
88 wsr a0, ICOUNTLEVEL 88 wsr a0, icountlevel
89 89
90 .set _index, 0 90 .set _index, 0
91 .rept XCHAL_NUM_DBREAK - 1 91 .rept XCHAL_NUM_DBREAK - 1
92 wsr a0, DBREAKC + _index 92 wsr a0, SREG_DBREAKC + _index
93 .set _index, _index + 1 93 .set _index, _index + 1
94 .endr 94 .endr
95#endif 95#endif
96 96
97 /* Clear CCOUNT (not really necessary, but nice) */ 97 /* Clear CCOUNT (not really necessary, but nice) */
98 98
99 wsr a0, CCOUNT # not really necessary, but nice 99 wsr a0, ccount # not really necessary, but nice
100 100
101 /* Disable zero-loops. */ 101 /* Disable zero-loops. */
102 102
103#if XCHAL_HAVE_LOOPS 103#if XCHAL_HAVE_LOOPS
104 wsr a0, LCOUNT 104 wsr a0, lcount
105#endif 105#endif
106 106
107 /* Disable all timers. */ 107 /* Disable all timers. */
108 108
109 .set _index, 0 109 .set _index, 0
110 .rept XCHAL_NUM_TIMERS - 1 110 .rept XCHAL_NUM_TIMERS - 1
111 wsr a0, CCOMPARE + _index 111 wsr a0, SREG_CCOMPARE + _index
112 .set _index, _index + 1 112 .set _index, _index + 1
113 .endr 113 .endr
114 114
115 /* Interrupt initialization. */ 115 /* Interrupt initialization. */
116 116
117 movi a2, XCHAL_INTTYPE_MASK_SOFTWARE | XCHAL_INTTYPE_MASK_EXTERN_EDGE 117 movi a2, XCHAL_INTTYPE_MASK_SOFTWARE | XCHAL_INTTYPE_MASK_EXTERN_EDGE
118 wsr a0, INTENABLE 118 wsr a0, intenable
119 wsr a2, INTCLEAR 119 wsr a2, intclear
120 120
121 /* Disable coprocessors. */ 121 /* Disable coprocessors. */
122 122
123#if XCHAL_CP_NUM > 0 123#if XCHAL_CP_NUM > 0
124 wsr a0, CPENABLE 124 wsr a0, cpenable
125#endif 125#endif
126 126
127 /* Set PS.INTLEVEL=1, PS.WOE=0, kernel stack, PS.EXCM=0 127 /* Set PS.INTLEVEL=1, PS.WOE=0, kernel stack, PS.EXCM=0
@@ -132,7 +132,7 @@ _startup:
132 */ 132 */
133 133
134 movi a1, 1 134 movi a1, 1
135 wsr a1, PS 135 wsr a1, ps
136 rsync 136 rsync
137 137
138 /* Initialize the caches. 138 /* Initialize the caches.
@@ -206,18 +206,18 @@ _startup:
206 addi a1, a1, KERNEL_STACK_SIZE 206 addi a1, a1, KERNEL_STACK_SIZE
207 207
208 movi a2, 0x00040001 # WOE=1, INTLEVEL=1, UM=0 208 movi a2, 0x00040001 # WOE=1, INTLEVEL=1, UM=0
209 wsr a2, PS # (enable reg-windows; progmode stack) 209 wsr a2, ps # (enable reg-windows; progmode stack)
210 rsync 210 rsync
211 211
212 /* Set up EXCSAVE[DEBUGLEVEL] to point to the Debug Exception Handler.*/ 212 /* Set up EXCSAVE[DEBUGLEVEL] to point to the Debug Exception Handler.*/
213 213
214 movi a2, debug_exception 214 movi a2, debug_exception
215 wsr a2, EXCSAVE + XCHAL_DEBUGLEVEL 215 wsr a2, SREG_EXCSAVE + XCHAL_DEBUGLEVEL
216 216
217 /* Set up EXCSAVE[1] to point to the exc_table. */ 217 /* Set up EXCSAVE[1] to point to the exc_table. */
218 218
219 movi a6, exc_table 219 movi a6, exc_table
220 xsr a6, EXCSAVE_1 220 xsr a6, excsave1
221 221
222 /* init_arch kick-starts the linux kernel */ 222 /* init_arch kick-starts the linux kernel */
223 223
diff --git a/arch/xtensa/kernel/irq.c b/arch/xtensa/kernel/irq.c
index 98e77c3ef1c3..a6ce3e563739 100644
--- a/arch/xtensa/kernel/irq.c
+++ b/arch/xtensa/kernel/irq.c
@@ -72,13 +72,13 @@ int arch_show_interrupts(struct seq_file *p, int prec)
72static void xtensa_irq_mask(struct irq_data *d) 72static void xtensa_irq_mask(struct irq_data *d)
73{ 73{
74 cached_irq_mask &= ~(1 << d->irq); 74 cached_irq_mask &= ~(1 << d->irq);
75 set_sr (cached_irq_mask, INTENABLE); 75 set_sr (cached_irq_mask, intenable);
76} 76}
77 77
78static void xtensa_irq_unmask(struct irq_data *d) 78static void xtensa_irq_unmask(struct irq_data *d)
79{ 79{
80 cached_irq_mask |= 1 << d->irq; 80 cached_irq_mask |= 1 << d->irq;
81 set_sr (cached_irq_mask, INTENABLE); 81 set_sr (cached_irq_mask, intenable);
82} 82}
83 83
84static void xtensa_irq_enable(struct irq_data *d) 84static void xtensa_irq_enable(struct irq_data *d)
@@ -95,7 +95,7 @@ static void xtensa_irq_disable(struct irq_data *d)
95 95
96static void xtensa_irq_ack(struct irq_data *d) 96static void xtensa_irq_ack(struct irq_data *d)
97{ 97{
98 set_sr(1 << d->irq, INTCLEAR); 98 set_sr(1 << d->irq, intclear);
99} 99}
100 100
101static int xtensa_irq_retrigger(struct irq_data *d) 101static int xtensa_irq_retrigger(struct irq_data *d)
diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c
index bc020825cce5..1908f6642d31 100644
--- a/arch/xtensa/kernel/process.c
+++ b/arch/xtensa/kernel/process.c
@@ -173,6 +173,16 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
173 * 173 *
174 * Note: This is a pristine frame, so we don't need any spill region on top of 174 * Note: This is a pristine frame, so we don't need any spill region on top of
175 * childregs. 175 * childregs.
176 *
177 * The fun part: if we're keeping the same VM (i.e. cloning a thread,
178 * not an entire process), we're normally given a new usp, and we CANNOT share
179 * any live address register windows. If we just copy those live frames over,
180 * the two threads (parent and child) will overflow the same frames onto the
181 * parent stack at different times, likely corrupting the parent stack (esp.
182 * if the parent returns from functions that called clone() and calls new
183 * ones, before the child overflows its now old copies of its parent windows).
184 * One solution is to spill windows to the parent stack, but that's fairly
185 * involved. Much simpler to just not copy those live frames across.
176 */ 186 */
177 187
178int copy_thread(unsigned long clone_flags, unsigned long usp, 188int copy_thread(unsigned long clone_flags, unsigned long usp,
@@ -180,10 +190,13 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
180 struct task_struct * p, struct pt_regs * regs) 190 struct task_struct * p, struct pt_regs * regs)
181{ 191{
182 struct pt_regs *childregs; 192 struct pt_regs *childregs;
183 struct thread_info *ti;
184 unsigned long tos; 193 unsigned long tos;
185 int user_mode = user_mode(regs); 194 int user_mode = user_mode(regs);
186 195
196#if (XTENSA_HAVE_COPROCESSORS || XTENSA_HAVE_IO_PORTS)
197 struct thread_info *ti;
198#endif
199
187 /* Set up new TSS. */ 200 /* Set up new TSS. */
188 tos = (unsigned long)task_stack_page(p) + THREAD_SIZE; 201 tos = (unsigned long)task_stack_page(p) + THREAD_SIZE;
189 if (user_mode) 202 if (user_mode)
@@ -191,13 +204,14 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
191 else 204 else
192 childregs = (struct pt_regs*)tos - 1; 205 childregs = (struct pt_regs*)tos - 1;
193 206
207 /* This does not copy all the regs. In a bout of brilliance or madness,
208 ARs beyond a0-a15 exist past the end of the struct. */
194 *childregs = *regs; 209 *childregs = *regs;
195 210
196 /* Create a call4 dummy-frame: a0 = 0, a1 = childregs. */ 211 /* Create a call4 dummy-frame: a0 = 0, a1 = childregs. */
197 *((int*)childregs - 3) = (unsigned long)childregs; 212 *((int*)childregs - 3) = (unsigned long)childregs;
198 *((int*)childregs - 4) = 0; 213 *((int*)childregs - 4) = 0;
199 214
200 childregs->areg[1] = tos;
201 childregs->areg[2] = 0; 215 childregs->areg[2] = 0;
202 p->set_child_tid = p->clear_child_tid = NULL; 216 p->set_child_tid = p->clear_child_tid = NULL;
203 p->thread.ra = MAKE_RA_FOR_CALL((unsigned long)ret_from_fork, 0x1); 217 p->thread.ra = MAKE_RA_FOR_CALL((unsigned long)ret_from_fork, 0x1);
@@ -205,10 +219,14 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
205 219
206 if (user_mode(regs)) { 220 if (user_mode(regs)) {
207 221
208 int len = childregs->wmask & ~0xf;
209 childregs->areg[1] = usp; 222 childregs->areg[1] = usp;
210 memcpy(&childregs->areg[XCHAL_NUM_AREGS - len/4], 223 if (clone_flags & CLONE_VM) {
211 &regs->areg[XCHAL_NUM_AREGS - len/4], len); 224 childregs->wmask = 1; /* can't share live windows */
225 } else {
226 int len = childregs->wmask & ~0xf;
227 memcpy(&childregs->areg[XCHAL_NUM_AREGS - len/4],
228 &regs->areg[XCHAL_NUM_AREGS - len/4], len);
229 }
212// FIXME: we need to set THREADPTR in thread_info... 230// FIXME: we need to set THREADPTR in thread_info...
213 if (clone_flags & CLONE_SETTLS) 231 if (clone_flags & CLONE_SETTLS)
214 childregs->areg[2] = childregs->areg[6]; 232 childregs->areg[2] = childregs->areg[6];
@@ -216,6 +234,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
216 } else { 234 } else {
217 /* In kernel space, we start a new thread with a new stack. */ 235 /* In kernel space, we start a new thread with a new stack. */
218 childregs->wmask = 1; 236 childregs->wmask = 1;
237 childregs->areg[1] = tos;
219 } 238 }
220 239
221#if (XTENSA_HAVE_COPROCESSORS || XTENSA_HAVE_IO_PORTS) 240#if (XTENSA_HAVE_COPROCESSORS || XTENSA_HAVE_IO_PORTS)
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c
index 270360d9806c..b237988ba6d7 100644
--- a/arch/xtensa/kernel/setup.c
+++ b/arch/xtensa/kernel/setup.c
@@ -100,7 +100,7 @@ typedef struct tagtable {
100} tagtable_t; 100} tagtable_t;
101 101
102#define __tagtable(tag, fn) static tagtable_t __tagtable_##fn \ 102#define __tagtable(tag, fn) static tagtable_t __tagtable_##fn \
103 __attribute__((unused, __section__(".taglist"))) = { tag, fn } 103 __attribute__((used, section(".taglist"))) = { tag, fn }
104 104
105/* parse current tag */ 105/* parse current tag */
106 106
@@ -120,7 +120,7 @@ static int __init parse_tag_mem(const bp_tag_t *tag)
120 } 120 }
121 sysmem.bank[sysmem.nr_banks].type = mi->type; 121 sysmem.bank[sysmem.nr_banks].type = mi->type;
122 sysmem.bank[sysmem.nr_banks].start = PAGE_ALIGN(mi->start); 122 sysmem.bank[sysmem.nr_banks].start = PAGE_ALIGN(mi->start);
123 sysmem.bank[sysmem.nr_banks].end = mi->end & PAGE_SIZE; 123 sysmem.bank[sysmem.nr_banks].end = mi->end & PAGE_MASK;
124 sysmem.nr_banks++; 124 sysmem.nr_banks++;
125 125
126 return 0; 126 return 0;
diff --git a/arch/xtensa/kernel/syscall.c b/arch/xtensa/kernel/syscall.c
index 05b3f093d5d7..a5c01e74d5d5 100644
--- a/arch/xtensa/kernel/syscall.c
+++ b/arch/xtensa/kernel/syscall.c
@@ -34,7 +34,6 @@ syscall_t sys_call_table[__NR_syscall_count] /* FIXME __cacheline_aligned */= {
34 34
35#undef __SYSCALL 35#undef __SYSCALL
36#define __SYSCALL(nr,symbol,nargs) [ nr ] = (syscall_t)symbol, 36#define __SYSCALL(nr,symbol,nargs) [ nr ] = (syscall_t)symbol,
37#undef _XTENSA_UNISTD_H
38#undef __KERNEL_SYSCALLS__ 37#undef __KERNEL_SYSCALLS__
39#include <asm/unistd.h> 38#include <asm/unistd.h>
40}; 39};
diff --git a/arch/xtensa/kernel/traps.c b/arch/xtensa/kernel/traps.c
index bc1e14cf9369..5caf2b64d43a 100644
--- a/arch/xtensa/kernel/traps.c
+++ b/arch/xtensa/kernel/traps.c
@@ -97,7 +97,7 @@ static dispatch_init_table_t __initdata dispatch_init_table[] = {
97/* EXCCAUSE_INTEGER_DIVIDE_BY_ZERO unhandled */ 97/* EXCCAUSE_INTEGER_DIVIDE_BY_ZERO unhandled */
98/* EXCCAUSE_PRIVILEGED unhandled */ 98/* EXCCAUSE_PRIVILEGED unhandled */
99#if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION 99#if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION
100#ifdef CONFIG_UNALIGNED_USER 100#ifdef CONFIG_XTENSA_UNALIGNED_USER
101{ EXCCAUSE_UNALIGNED, USER, fast_unaligned }, 101{ EXCCAUSE_UNALIGNED, USER, fast_unaligned },
102#else 102#else
103{ EXCCAUSE_UNALIGNED, 0, do_unaligned_user }, 103{ EXCCAUSE_UNALIGNED, 0, do_unaligned_user },
@@ -202,8 +202,8 @@ extern void do_IRQ(int, struct pt_regs *);
202 202
203void do_interrupt (struct pt_regs *regs) 203void do_interrupt (struct pt_regs *regs)
204{ 204{
205 unsigned long intread = get_sr (INTREAD); 205 unsigned long intread = get_sr (interrupt);
206 unsigned long intenable = get_sr (INTENABLE); 206 unsigned long intenable = get_sr (intenable);
207 int i, mask; 207 int i, mask;
208 208
209 /* Handle all interrupts (no priorities). 209 /* Handle all interrupts (no priorities).
@@ -213,7 +213,7 @@ void do_interrupt (struct pt_regs *regs)
213 213
214 for (i=0, mask = 1; i < XCHAL_NUM_INTERRUPTS; i++, mask <<= 1) { 214 for (i=0, mask = 1; i < XCHAL_NUM_INTERRUPTS; i++, mask <<= 1) {
215 if (mask & (intread & intenable)) { 215 if (mask & (intread & intenable)) {
216 set_sr (mask, INTCLEAR); 216 set_sr (mask, intclear);
217 do_IRQ (i,regs); 217 do_IRQ (i,regs);
218 } 218 }
219 } 219 }
@@ -244,7 +244,7 @@ do_illegal_instruction(struct pt_regs *regs)
244 */ 244 */
245 245
246#if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION 246#if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION
247#ifndef CONFIG_UNALIGNED_USER 247#ifndef CONFIG_XTENSA_UNALIGNED_USER
248void 248void
249do_unaligned_user (struct pt_regs *regs) 249do_unaligned_user (struct pt_regs *regs)
250{ 250{
@@ -339,7 +339,7 @@ void __init trap_init(void)
339 /* Initialize EXCSAVE_1 to hold the address of the exception table. */ 339 /* Initialize EXCSAVE_1 to hold the address of the exception table. */
340 340
341 i = (unsigned long)exc_table; 341 i = (unsigned long)exc_table;
342 __asm__ __volatile__("wsr %0, "__stringify(EXCSAVE_1)"\n" : : "a" (i)); 342 __asm__ __volatile__("wsr %0, excsave1\n" : : "a" (i));
343} 343}
344 344
345/* 345/*
@@ -386,16 +386,16 @@ static inline void spill_registers(void)
386 unsigned int a0, ps; 386 unsigned int a0, ps;
387 387
388 __asm__ __volatile__ ( 388 __asm__ __volatile__ (
389 "movi a14," __stringify (PS_EXCM_BIT) " | 1\n\t" 389 "movi a14, " __stringify(PS_EXCM_BIT | 1) "\n\t"
390 "mov a12, a0\n\t" 390 "mov a12, a0\n\t"
391 "rsr a13," __stringify(SAR) "\n\t" 391 "rsr a13, sar\n\t"
392 "xsr a14," __stringify(PS) "\n\t" 392 "xsr a14, ps\n\t"
393 "movi a0, _spill_registers\n\t" 393 "movi a0, _spill_registers\n\t"
394 "rsync\n\t" 394 "rsync\n\t"
395 "callx0 a0\n\t" 395 "callx0 a0\n\t"
396 "mov a0, a12\n\t" 396 "mov a0, a12\n\t"
397 "wsr a13," __stringify(SAR) "\n\t" 397 "wsr a13, sar\n\t"
398 "wsr a14," __stringify(PS) "\n\t" 398 "wsr a14, ps\n\t"
399 :: "a" (&a0), "a" (&ps) 399 :: "a" (&a0), "a" (&ps)
400 : "a2", "a3", "a4", "a7", "a11", "a12", "a13", "a14", "a15", "memory"); 400 : "a2", "a3", "a4", "a7", "a11", "a12", "a13", "a14", "a15", "memory");
401} 401}
diff --git a/arch/xtensa/kernel/vectors.S b/arch/xtensa/kernel/vectors.S
index 70066e3582d0..4462c1e595c2 100644
--- a/arch/xtensa/kernel/vectors.S
+++ b/arch/xtensa/kernel/vectors.S
@@ -69,11 +69,11 @@
69 69
70ENTRY(_UserExceptionVector) 70ENTRY(_UserExceptionVector)
71 71
72 xsr a3, EXCSAVE_1 # save a3 and get dispatch table 72 xsr a3, excsave1 # save a3 and get dispatch table
73 wsr a2, DEPC # save a2 73 wsr a2, depc # save a2
74 l32i a2, a3, EXC_TABLE_KSTK # load kernel stack to a2 74 l32i a2, a3, EXC_TABLE_KSTK # load kernel stack to a2
75 s32i a0, a2, PT_AREG0 # save a0 to ESF 75 s32i a0, a2, PT_AREG0 # save a0 to ESF
76 rsr a0, EXCCAUSE # retrieve exception cause 76 rsr a0, exccause # retrieve exception cause
77 s32i a0, a2, PT_DEPC # mark it as a regular exception 77 s32i a0, a2, PT_DEPC # mark it as a regular exception
78 addx4 a0, a0, a3 # find entry in table 78 addx4 a0, a0, a3 # find entry in table
79 l32i a0, a0, EXC_TABLE_FAST_USER # load handler 79 l32i a0, a0, EXC_TABLE_FAST_USER # load handler
@@ -93,11 +93,11 @@ ENTRY(_UserExceptionVector)
93 93
94ENTRY(_KernelExceptionVector) 94ENTRY(_KernelExceptionVector)
95 95
96 xsr a3, EXCSAVE_1 # save a3, and get dispatch table 96 xsr a3, excsave1 # save a3, and get dispatch table
97 wsr a2, DEPC # save a2 97 wsr a2, depc # save a2
98 addi a2, a1, -16-PT_SIZE # adjust stack pointer 98 addi a2, a1, -16-PT_SIZE # adjust stack pointer
99 s32i a0, a2, PT_AREG0 # save a0 to ESF 99 s32i a0, a2, PT_AREG0 # save a0 to ESF
100 rsr a0, EXCCAUSE # retrieve exception cause 100 rsr a0, exccause # retrieve exception cause
101 s32i a0, a2, PT_DEPC # mark it as a regular exception 101 s32i a0, a2, PT_DEPC # mark it as a regular exception
102 addx4 a0, a0, a3 # find entry in table 102 addx4 a0, a0, a3 # find entry in table
103 l32i a0, a0, EXC_TABLE_FAST_KERNEL # load handler address 103 l32i a0, a0, EXC_TABLE_FAST_KERNEL # load handler address
@@ -205,17 +205,17 @@ ENTRY(_DoubleExceptionVector)
205 205
206 /* Deliberately destroy excsave (don't assume it's value was valid). */ 206 /* Deliberately destroy excsave (don't assume it's value was valid). */
207 207
208 wsr a3, EXCSAVE_1 # save a3 208 wsr a3, excsave1 # save a3
209 209
210 /* Check for kernel double exception (usually fatal). */ 210 /* Check for kernel double exception (usually fatal). */
211 211
212 rsr a3, PS 212 rsr a3, ps
213 _bbci.l a3, PS_UM_BIT, .Lksp 213 _bbci.l a3, PS_UM_BIT, .Lksp
214 214
215 /* Check if we are currently handling a window exception. */ 215 /* Check if we are currently handling a window exception. */
216 /* Note: We don't need to indicate that we enter a critical section. */ 216 /* Note: We don't need to indicate that we enter a critical section. */
217 217
218 xsr a0, DEPC # get DEPC, save a0 218 xsr a0, depc # get DEPC, save a0
219 219
220 movi a3, XCHAL_WINDOW_VECTORS_VADDR 220 movi a3, XCHAL_WINDOW_VECTORS_VADDR
221 _bltu a0, a3, .Lfixup 221 _bltu a0, a3, .Lfixup
@@ -243,21 +243,21 @@ ENTRY(_DoubleExceptionVector)
243 * Note: We can trash the current window frame (a0...a3) and depc! 243 * Note: We can trash the current window frame (a0...a3) and depc!
244 */ 244 */
245 245
246 wsr a2, DEPC # save stack pointer temporarily 246 wsr a2, depc # save stack pointer temporarily
247 rsr a0, PS 247 rsr a0, ps
248 extui a0, a0, PS_OWB_SHIFT, 4 248 extui a0, a0, PS_OWB_SHIFT, 4
249 wsr a0, WINDOWBASE 249 wsr a0, windowbase
250 rsync 250 rsync
251 251
252 /* We are now in the previous window frame. Save registers again. */ 252 /* We are now in the previous window frame. Save registers again. */
253 253
254 xsr a2, DEPC # save a2 and get stack pointer 254 xsr a2, depc # save a2 and get stack pointer
255 s32i a0, a2, PT_AREG0 255 s32i a0, a2, PT_AREG0
256 256
257 wsr a3, EXCSAVE_1 # save a3 257 wsr a3, excsave1 # save a3
258 movi a3, exc_table 258 movi a3, exc_table
259 259
260 rsr a0, EXCCAUSE 260 rsr a0, exccause
261 s32i a0, a2, PT_DEPC # mark it as a regular exception 261 s32i a0, a2, PT_DEPC # mark it as a regular exception
262 addx4 a0, a0, a3 262 addx4 a0, a0, a3
263 l32i a0, a0, EXC_TABLE_FAST_USER 263 l32i a0, a0, EXC_TABLE_FAST_USER
@@ -290,14 +290,14 @@ ENTRY(_DoubleExceptionVector)
290 290
291 /* a0: depc, a1: a1, a2: kstk, a3: a2, depc: a0, excsave: a3 */ 291 /* a0: depc, a1: a1, a2: kstk, a3: a2, depc: a0, excsave: a3 */
292 292
293 xsr a3, DEPC 293 xsr a3, depc
294 s32i a0, a2, PT_DEPC 294 s32i a0, a2, PT_DEPC
295 s32i a3, a2, PT_AREG0 295 s32i a3, a2, PT_AREG0
296 296
297 /* a0: avail, a1: a1, a2: kstk, a3: avail, depc: a2, excsave: a3 */ 297 /* a0: avail, a1: a1, a2: kstk, a3: avail, depc: a2, excsave: a3 */
298 298
299 movi a3, exc_table 299 movi a3, exc_table
300 rsr a0, EXCCAUSE 300 rsr a0, exccause
301 addx4 a0, a0, a3 301 addx4 a0, a0, a3
302 l32i a0, a0, EXC_TABLE_FAST_USER 302 l32i a0, a0, EXC_TABLE_FAST_USER
303 jx a0 303 jx a0
@@ -312,7 +312,7 @@ ENTRY(_DoubleExceptionVector)
312 312
313.Lksp: /* a0: a0, a1: a1, a2: a2, a3: trashed, depc: depc, excsave: a3 */ 313.Lksp: /* a0: a0, a1: a1, a2: a2, a3: trashed, depc: depc, excsave: a3 */
314 314
315 rsr a3, EXCCAUSE 315 rsr a3, exccause
316 beqi a3, EXCCAUSE_ITLB_MISS, 1f 316 beqi a3, EXCCAUSE_ITLB_MISS, 1f
317 addi a3, a3, -EXCCAUSE_DTLB_MISS 317 addi a3, a3, -EXCCAUSE_DTLB_MISS
318 bnez a3, .Lunrecoverable 318 bnez a3, .Lunrecoverable
@@ -328,11 +328,11 @@ ENTRY(_DoubleExceptionVector)
328 328
329.Lunrecoverable_fixup: 329.Lunrecoverable_fixup:
330 l32i a2, a3, EXC_TABLE_DOUBLE_SAVE 330 l32i a2, a3, EXC_TABLE_DOUBLE_SAVE
331 xsr a0, DEPC 331 xsr a0, depc
332 332
333.Lunrecoverable: 333.Lunrecoverable:
334 rsr a3, EXCSAVE_1 334 rsr a3, excsave1
335 wsr a0, EXCSAVE_1 335 wsr a0, excsave1
336 movi a0, unrecoverable_exception 336 movi a0, unrecoverable_exception
337 callx0 a0 337 callx0 a0
338 338
@@ -349,7 +349,7 @@ ENTRY(_DoubleExceptionVector)
349 .section .DebugInterruptVector.text, "ax" 349 .section .DebugInterruptVector.text, "ax"
350 350
351ENTRY(_DebugInterruptVector) 351ENTRY(_DebugInterruptVector)
352 xsr a0, EXCSAVE + XCHAL_DEBUGLEVEL 352 xsr a0, SREG_EXCSAVE + XCHAL_DEBUGLEVEL
353 jx a0 353 jx a0
354 354
355 355
diff --git a/arch/xtensa/lib/memcopy.S b/arch/xtensa/lib/memcopy.S
index ea59dcd03866..c48b80acb5f0 100644
--- a/arch/xtensa/lib/memcopy.S
+++ b/arch/xtensa/lib/memcopy.S
@@ -6,7 +6,7 @@
6 * License. See the file "COPYING" in the main directory of this archive 6 * License. See the file "COPYING" in the main directory of this archive
7 * for more details. 7 * for more details.
8 * 8 *
9 * Copyright (C) 2002 - 2005 Tensilica Inc. 9 * Copyright (C) 2002 - 2012 Tensilica Inc.
10 */ 10 */
11 11
12#include <variant/core.h> 12#include <variant/core.h>
@@ -27,14 +27,11 @@
27#endif 27#endif
28 .endm 28 .endm
29 29
30
31/* 30/*
32 * void *memcpy(void *dst, const void *src, size_t len); 31 * void *memcpy(void *dst, const void *src, size_t len);
33 * void *memmove(void *dst, const void *src, size_t len);
34 * void *bcopy(const void *src, void *dst, size_t len);
35 * 32 *
36 * This function is intended to do the same thing as the standard 33 * This function is intended to do the same thing as the standard
37 * library function memcpy() (or bcopy()) for most cases. 34 * library function memcpy() for most cases.
38 * However, where the source and/or destination references 35 * However, where the source and/or destination references
39 * an instruction RAM or ROM or a data RAM or ROM, that 36 * an instruction RAM or ROM or a data RAM or ROM, that
40 * source and/or destination will always be accessed with 37 * source and/or destination will always be accessed with
@@ -45,9 +42,6 @@
45 * !!!!!!! Handling of IRAM/IROM has not yet 42 * !!!!!!! Handling of IRAM/IROM has not yet
46 * !!!!!!! been implemented. 43 * !!!!!!! been implemented.
47 * 44 *
48 * The bcopy version is provided here to avoid the overhead
49 * of an extra call, for callers that require this convention.
50 *
51 * The (general case) algorithm is as follows: 45 * The (general case) algorithm is as follows:
52 * If destination is unaligned, align it by conditionally 46 * If destination is unaligned, align it by conditionally
53 * copying 1 and 2 bytes. 47 * copying 1 and 2 bytes.
@@ -76,17 +70,6 @@
76 */ 70 */
77 71
78 .text 72 .text
79 .align 4
80 .global bcopy
81 .type bcopy,@function
82bcopy:
83 entry sp, 16 # minimal stack frame
84 # a2=src, a3=dst, a4=len
85 mov a5, a3 # copy dst so that a2 is return value
86 mov a3, a2
87 mov a2, a5
88 j .Lcommon # go to common code for memcpy+bcopy
89
90 73
91/* 74/*
92 * Byte by byte copy 75 * Byte by byte copy
@@ -107,7 +90,7 @@ bcopy:
107 s8i a6, a5, 0 90 s8i a6, a5, 0
108 addi a5, a5, 1 91 addi a5, a5, 1
109#if !XCHAL_HAVE_LOOPS 92#if !XCHAL_HAVE_LOOPS
110 blt a3, a7, .Lnextbyte 93 bne a3, a7, .Lnextbyte # continue loop if $a3:src != $a7:src_end
111#endif /* !XCHAL_HAVE_LOOPS */ 94#endif /* !XCHAL_HAVE_LOOPS */
112.Lbytecopydone: 95.Lbytecopydone:
113 retw 96 retw
@@ -144,9 +127,6 @@ bcopy:
144 .global memcpy 127 .global memcpy
145 .type memcpy,@function 128 .type memcpy,@function
146memcpy: 129memcpy:
147 .global memmove
148 .type memmove,@function
149memmove:
150 130
151 entry sp, 16 # minimal stack frame 131 entry sp, 16 # minimal stack frame
152 # a2/ dst, a3/ src, a4/ len 132 # a2/ dst, a3/ src, a4/ len
@@ -182,7 +162,7 @@ memmove:
182 s32i a7, a5, 12 162 s32i a7, a5, 12
183 addi a5, a5, 16 163 addi a5, a5, 16
184#if !XCHAL_HAVE_LOOPS 164#if !XCHAL_HAVE_LOOPS
185 blt a3, a8, .Loop1 165 bne a3, a8, .Loop1 # continue loop if a3:src != a8:src_end
186#endif /* !XCHAL_HAVE_LOOPS */ 166#endif /* !XCHAL_HAVE_LOOPS */
187.Loop1done: 167.Loop1done:
188 bbci.l a4, 3, .L2 168 bbci.l a4, 3, .L2
@@ -260,7 +240,7 @@ memmove:
260 s32i a9, a5, 12 240 s32i a9, a5, 12
261 addi a5, a5, 16 241 addi a5, a5, 16
262#if !XCHAL_HAVE_LOOPS 242#if !XCHAL_HAVE_LOOPS
263 blt a3, a10, .Loop2 243 bne a3, a10, .Loop2 # continue loop if a3:src != a10:src_end
264#endif /* !XCHAL_HAVE_LOOPS */ 244#endif /* !XCHAL_HAVE_LOOPS */
265.Loop2done: 245.Loop2done:
266 bbci.l a4, 3, .L12 246 bbci.l a4, 3, .L12
@@ -305,6 +285,285 @@ memmove:
305 l8ui a6, a3, 0 285 l8ui a6, a3, 0
306 s8i a6, a5, 0 286 s8i a6, a5, 0
307 retw 287 retw
288
289
290/*
291 * void bcopy(const void *src, void *dest, size_t n);
292 */
293 .align 4
294 .global bcopy
295 .type bcopy,@function
296bcopy:
297 entry sp, 16 # minimal stack frame
298 # a2=src, a3=dst, a4=len
299 mov a5, a3
300 mov a3, a2
301 mov a2, a5
302 j .Lmovecommon # go to common code for memmove+bcopy
303
304/*
305 * void *memmove(void *dst, const void *src, size_t len);
306 *
307 * This function is intended to do the same thing as the standard
308 * library function memmove() for most cases.
309 * However, where the source and/or destination references
310 * an instruction RAM or ROM or a data RAM or ROM, that
311 * source and/or destination will always be accessed with
312 * 32-bit load and store instructions (as required for these
313 * types of devices).
314 *
315 * !!!!!!! XTFIXME:
316 * !!!!!!! Handling of IRAM/IROM has not yet
317 * !!!!!!! been implemented.
318 *
319 * The (general case) algorithm is as follows:
320 * If end of source doesn't overlap destination then use memcpy.
321 * Otherwise do memcpy backwards.
322 *
323 * Register use:
324 * a0/ return address
325 * a1/ stack pointer
326 * a2/ return value
327 * a3/ src
328 * a4/ length
329 * a5/ dst
330 * a6/ tmp
331 * a7/ tmp
332 * a8/ tmp
333 * a9/ tmp
334 * a10/ tmp
335 * a11/ tmp
336 */
337
338/*
339 * Byte by byte copy
340 */
341 .align 4
342 .byte 0 # 1 mod 4 alignment for LOOPNEZ
343 # (0 mod 4 alignment for LBEG)
344.Lbackbytecopy:
345#if XCHAL_HAVE_LOOPS
346 loopnez a4, .Lbackbytecopydone
347#else /* !XCHAL_HAVE_LOOPS */
348 beqz a4, .Lbackbytecopydone
349 sub a7, a3, a4 # a7 = start address for source
350#endif /* !XCHAL_HAVE_LOOPS */
351.Lbacknextbyte:
352 addi a3, a3, -1
353 l8ui a6, a3, 0
354 addi a5, a5, -1
355 s8i a6, a5, 0
356#if !XCHAL_HAVE_LOOPS
357 bne a3, a7, .Lbacknextbyte # continue loop if
358 # $a3:src != $a7:src_start
359#endif /* !XCHAL_HAVE_LOOPS */
360.Lbackbytecopydone:
361 retw
362
363/*
364 * Destination is unaligned
365 */
366
367 .align 4
368.Lbackdst1mod2: # dst is only byte aligned
369 _bltui a4, 7, .Lbackbytecopy # do short copies byte by byte
370
371 # copy 1 byte
372 addi a3, a3, -1
373 l8ui a6, a3, 0
374 addi a5, a5, -1
375 s8i a6, a5, 0
376 addi a4, a4, -1
377 _bbci.l a5, 1, .Lbackdstaligned # if dst is now aligned, then
378 # return to main algorithm
379.Lbackdst2mod4: # dst 16-bit aligned
380 # copy 2 bytes
381 _bltui a4, 6, .Lbackbytecopy # do short copies byte by byte
382 addi a3, a3, -2
383 l8ui a6, a3, 0
384 l8ui a7, a3, 1
385 addi a5, a5, -2
386 s8i a6, a5, 0
387 s8i a7, a5, 1
388 addi a4, a4, -2
389 j .Lbackdstaligned # dst is now aligned,
390 # return to main algorithm
391
392 .align 4
393 .global memmove
394 .type memmove,@function
395memmove:
396
397 entry sp, 16 # minimal stack frame
398 # a2/ dst, a3/ src, a4/ len
399 mov a5, a2 # copy dst so that a2 is return value
400.Lmovecommon:
401 sub a6, a5, a3
402 bgeu a6, a4, .Lcommon
403
404 add a5, a5, a4
405 add a3, a3, a4
406
407 _bbsi.l a5, 0, .Lbackdst1mod2 # if dst is 1 mod 2
408 _bbsi.l a5, 1, .Lbackdst2mod4 # if dst is 2 mod 4
409.Lbackdstaligned: # return here from .Lbackdst?mod? once dst is aligned
410 srli a7, a4, 4 # number of loop iterations with 16B
411 # per iteration
412 movi a8, 3 # if source is not aligned,
413 _bany a3, a8, .Lbacksrcunaligned # then use shifting copy
414 /*
415 * Destination and source are word-aligned, use word copy.
416 */
417 # copy 16 bytes per iteration for word-aligned dst and word-aligned src
418#if XCHAL_HAVE_LOOPS
419 loopnez a7, .backLoop1done
420#else /* !XCHAL_HAVE_LOOPS */
421 beqz a7, .backLoop1done
422 slli a8, a7, 4
423 sub a8, a3, a8 # a8 = start of first 16B source chunk
424#endif /* !XCHAL_HAVE_LOOPS */
425.backLoop1:
426 addi a3, a3, -16
427 l32i a7, a3, 12
428 l32i a6, a3, 8
429 addi a5, a5, -16
430 s32i a7, a5, 12
431 l32i a7, a3, 4
432 s32i a6, a5, 8
433 l32i a6, a3, 0
434 s32i a7, a5, 4
435 s32i a6, a5, 0
436#if !XCHAL_HAVE_LOOPS
437 bne a3, a8, .backLoop1 # continue loop if a3:src != a8:src_start
438#endif /* !XCHAL_HAVE_LOOPS */
439.backLoop1done:
440 bbci.l a4, 3, .Lback2
441 # copy 8 bytes
442 addi a3, a3, -8
443 l32i a6, a3, 0
444 l32i a7, a3, 4
445 addi a5, a5, -8
446 s32i a6, a5, 0
447 s32i a7, a5, 4
448.Lback2:
449 bbsi.l a4, 2, .Lback3
450 bbsi.l a4, 1, .Lback4
451 bbsi.l a4, 0, .Lback5
452 retw
453.Lback3:
454 # copy 4 bytes
455 addi a3, a3, -4
456 l32i a6, a3, 0
457 addi a5, a5, -4
458 s32i a6, a5, 0
459 bbsi.l a4, 1, .Lback4
460 bbsi.l a4, 0, .Lback5
461 retw
462.Lback4:
463 # copy 2 bytes
464 addi a3, a3, -2
465 l16ui a6, a3, 0
466 addi a5, a5, -2
467 s16i a6, a5, 0
468 bbsi.l a4, 0, .Lback5
469 retw
470.Lback5:
471 # copy 1 byte
472 addi a3, a3, -1
473 l8ui a6, a3, 0
474 addi a5, a5, -1
475 s8i a6, a5, 0
476 retw
477
478/*
479 * Destination is aligned, Source is unaligned
480 */
481
482 .align 4
483.Lbacksrcunaligned:
484 _beqz a4, .Lbackdone # avoid loading anything for zero-length copies
485 # copy 16 bytes per iteration for word-aligned dst and unaligned src
486 ssa8 a3 # set shift amount from byte offset
487#define SIM_CHECKS_ALIGNMENT 1 /* set to 1 when running on ISS with
488 * the lint or ferret client, or 0
489 * to save a few cycles */
490#if XCHAL_UNALIGNED_LOAD_EXCEPTION || SIM_CHECKS_ALIGNMENT
491 and a11, a3, a8 # save unalignment offset for below
492 sub a3, a3, a11 # align a3
493#endif
494 l32i a6, a3, 0 # load first word
495#if XCHAL_HAVE_LOOPS
496 loopnez a7, .backLoop2done
497#else /* !XCHAL_HAVE_LOOPS */
498 beqz a7, .backLoop2done
499 slli a10, a7, 4
500 sub a10, a3, a10 # a10 = start of first 16B source chunk
501#endif /* !XCHAL_HAVE_LOOPS */
502.backLoop2:
503 addi a3, a3, -16
504 l32i a7, a3, 12
505 l32i a8, a3, 8
506 addi a5, a5, -16
507 src_b a6, a7, a6
508 s32i a6, a5, 12
509 l32i a9, a3, 4
510 src_b a7, a8, a7
511 s32i a7, a5, 8
512 l32i a6, a3, 0
513 src_b a8, a9, a8
514 s32i a8, a5, 4
515 src_b a9, a6, a9
516 s32i a9, a5, 0
517#if !XCHAL_HAVE_LOOPS
518 bne a3, a10, .backLoop2 # continue loop if a3:src != a10:src_start
519#endif /* !XCHAL_HAVE_LOOPS */
520.backLoop2done:
521 bbci.l a4, 3, .Lback12
522 # copy 8 bytes
523 addi a3, a3, -8
524 l32i a7, a3, 4
525 l32i a8, a3, 0
526 addi a5, a5, -8
527 src_b a6, a7, a6
528 s32i a6, a5, 4
529 src_b a7, a8, a7
530 s32i a7, a5, 0
531 mov a6, a8
532.Lback12:
533 bbci.l a4, 2, .Lback13
534 # copy 4 bytes
535 addi a3, a3, -4
536 l32i a7, a3, 0
537 addi a5, a5, -4
538 src_b a6, a7, a6
539 s32i a6, a5, 0
540 mov a6, a7
541.Lback13:
542#if XCHAL_UNALIGNED_LOAD_EXCEPTION || SIM_CHECKS_ALIGNMENT
543 add a3, a3, a11 # readjust a3 with correct misalignment
544#endif
545 bbsi.l a4, 1, .Lback14
546 bbsi.l a4, 0, .Lback15
547.Lbackdone:
548 retw
549.Lback14:
550 # copy 2 bytes
551 addi a3, a3, -2
552 l8ui a6, a3, 0
553 l8ui a7, a3, 1
554 addi a5, a5, -2
555 s8i a6, a5, 0
556 s8i a7, a5, 1
557 bbsi.l a4, 0, .Lback15
558 retw
559.Lback15:
560 # copy 1 byte
561 addi a3, a3, -1
562 addi a5, a5, -1
563 l8ui a6, a3, 0
564 s8i a6, a5, 0
565 retw
566
308 567
309/* 568/*
310 * Local Variables: 569 * Local Variables:
diff --git a/arch/xtensa/mm/fault.c b/arch/xtensa/mm/fault.c
index 2c2f710ed1dc..245b08f7eaf4 100644
--- a/arch/xtensa/mm/fault.c
+++ b/arch/xtensa/mm/fault.c
@@ -6,7 +6,7 @@
6 * License. See the file "COPYING" in the main directory of this archive 6 * License. See the file "COPYING" in the main directory of this archive
7 * for more details. 7 * for more details.
8 * 8 *
9 * Copyright (C) 2001 - 2005 Tensilica Inc. 9 * Copyright (C) 2001 - 2010 Tensilica Inc.
10 * 10 *
11 * Chris Zankel <chris@zankel.net> 11 * Chris Zankel <chris@zankel.net>
12 * Joe Taylor <joe@tensilica.com, joetylr@yahoo.com> 12 * Joe Taylor <joe@tensilica.com, joetylr@yahoo.com>
@@ -186,6 +186,7 @@ do_sigbus:
186 /* Kernel mode? Handle exceptions or die */ 186 /* Kernel mode? Handle exceptions or die */
187 if (!user_mode(regs)) 187 if (!user_mode(regs))
188 bad_page_fault(regs, address, SIGBUS); 188 bad_page_fault(regs, address, SIGBUS);
189 return;
189 190
190vmalloc_fault: 191vmalloc_fault:
191 { 192 {
diff --git a/arch/xtensa/platforms/iss/console.c b/arch/xtensa/platforms/iss/console.c
index 8ab47edd7c82..7e74895eee04 100644
--- a/arch/xtensa/platforms/iss/console.c
+++ b/arch/xtensa/platforms/iss/console.c
@@ -91,7 +91,7 @@ static int rs_write(struct tty_struct * tty,
91{ 91{
92 /* see drivers/char/serialX.c to reference original version */ 92 /* see drivers/char/serialX.c to reference original version */
93 93
94 __simc (SYS_write, 1, (unsigned long)buf, count, 0, 0); 94 simc_write(1, buf, count);
95 return count; 95 return count;
96} 96}
97 97
@@ -122,12 +122,7 @@ static void rs_poll(unsigned long priv)
122 122
123static int rs_put_char(struct tty_struct *tty, unsigned char ch) 123static int rs_put_char(struct tty_struct *tty, unsigned char ch)
124{ 124{
125 char buf[2]; 125 return rs_write(tty, &ch, 1);
126
127 buf[0] = ch;
128 buf[1] = '\0'; /* Is this NULL necessary? */
129 __simc (SYS_write, 1, (unsigned long) buf, 1, 0, 0);
130 return 1;
131} 126}
132 127
133static void rs_flush_chars(struct tty_struct *tty) 128static void rs_flush_chars(struct tty_struct *tty)
diff --git a/arch/xtensa/platforms/iss/include/platform/simcall.h b/arch/xtensa/platforms/iss/include/platform/simcall.h
index 8c43bfea05e1..bd78192e2fc9 100644
--- a/arch/xtensa/platforms/iss/include/platform/simcall.h
+++ b/arch/xtensa/platforms/iss/include/platform/simcall.h
@@ -78,8 +78,9 @@ static inline int __simc(int a, int b, int c, int d, int e, int f)
78 return ret; 78 return ret;
79} 79}
80 80
81static inline int simc_open(char *file, int flags, int mode) 81static inline int simc_open(const char *file, int flags, int mode)
82{ 82{
83 wmb();
83 return __simc(SYS_open, (int) file, flags, mode, 0, 0); 84 return __simc(SYS_open, (int) file, flags, mode, 0, 0);
84} 85}
85 86
@@ -90,16 +91,19 @@ static inline int simc_close(int fd)
90 91
91static inline int simc_ioctl(int fd, int request, void *arg) 92static inline int simc_ioctl(int fd, int request, void *arg)
92{ 93{
94 wmb();
93 return __simc(SYS_ioctl, fd, request, (int) arg, 0, 0); 95 return __simc(SYS_ioctl, fd, request, (int) arg, 0, 0);
94} 96}
95 97
96static inline int simc_read(int fd, void *buf, size_t count) 98static inline int simc_read(int fd, void *buf, size_t count)
97{ 99{
100 rmb();
98 return __simc(SYS_read, fd, (int) buf, count, 0, 0); 101 return __simc(SYS_read, fd, (int) buf, count, 0, 0);
99} 102}
100 103
101static inline int simc_write(int fd, void *buf, size_t count) 104static inline int simc_write(int fd, const void *buf, size_t count)
102{ 105{
106 wmb();
103 return __simc(SYS_write, fd, (int) buf, count, 0, 0); 107 return __simc(SYS_write, fd, (int) buf, count, 0, 0);
104} 108}
105 109
@@ -107,6 +111,7 @@ static inline int simc_poll(int fd)
107{ 111{
108 struct timeval tv = { .tv_sec = 0, .tv_usec = 0 }; 112 struct timeval tv = { .tv_sec = 0, .tv_usec = 0 };
109 113
114 wmb();
110 return __simc(SYS_select_one, fd, XTISS_SELECT_ONE_READ, (int)&tv, 115 return __simc(SYS_select_one, fd, XTISS_SELECT_ONE_READ, (int)&tv,
111 0, 0); 116 0, 0);
112} 117}
diff --git a/arch/xtensa/platforms/iss/setup.c b/arch/xtensa/platforms/iss/setup.c
index 927acf378ea3..e1700102f35e 100644
--- a/arch/xtensa/platforms/iss/setup.c
+++ b/arch/xtensa/platforms/iss/setup.c
@@ -61,13 +61,13 @@ void platform_restart(void)
61 * jump to the reset vector. */ 61 * jump to the reset vector. */
62 62
63 __asm__ __volatile__("movi a2, 15\n\t" 63 __asm__ __volatile__("movi a2, 15\n\t"
64 "wsr a2, " __stringify(ICOUNTLEVEL) "\n\t" 64 "wsr a2, icountlevel\n\t"
65 "movi a2, 0\n\t" 65 "movi a2, 0\n\t"
66 "wsr a2, " __stringify(ICOUNT) "\n\t" 66 "wsr a2, icount\n\t"
67 "wsr a2, " __stringify(IBREAKENABLE) "\n\t" 67 "wsr a2, ibreakenable\n\t"
68 "wsr a2, " __stringify(LCOUNT) "\n\t" 68 "wsr a2, lcount\n\t"
69 "movi a2, 0x1f\n\t" 69 "movi a2, 0x1f\n\t"
70 "wsr a2, " __stringify(PS) "\n\t" 70 "wsr a2, ps\n\t"
71 "isync\n\t" 71 "isync\n\t"
72 "jx %0\n\t" 72 "jx %0\n\t"
73 : 73 :
diff --git a/arch/xtensa/platforms/xt2000/setup.c b/arch/xtensa/platforms/xt2000/setup.c
index 9e83940ac265..c7d90f17886e 100644
--- a/arch/xtensa/platforms/xt2000/setup.c
+++ b/arch/xtensa/platforms/xt2000/setup.c
@@ -66,13 +66,13 @@ void platform_restart(void)
66 * jump to the reset vector. */ 66 * jump to the reset vector. */
67 67
68 __asm__ __volatile__ ("movi a2, 15\n\t" 68 __asm__ __volatile__ ("movi a2, 15\n\t"
69 "wsr a2, " __stringify(ICOUNTLEVEL) "\n\t" 69 "wsr a2, icountlevel\n\t"
70 "movi a2, 0\n\t" 70 "movi a2, 0\n\t"
71 "wsr a2, " __stringify(ICOUNT) "\n\t" 71 "wsr a2, icount\n\t"
72 "wsr a2, " __stringify(IBREAKENABLE) "\n\t" 72 "wsr a2, ibreakenable\n\t"
73 "wsr a2, " __stringify(LCOUNT) "\n\t" 73 "wsr a2, lcount\n\t"
74 "movi a2, 0x1f\n\t" 74 "movi a2, 0x1f\n\t"
75 "wsr a2, " __stringify(PS) "\n\t" 75 "wsr a2, ps\n\t"
76 "isync\n\t" 76 "isync\n\t"
77 "jx %0\n\t" 77 "jx %0\n\t"
78 : 78 :