From b9b268abf2559cb97a6303601c2cc4e6451764f1 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Wed, 14 Aug 2013 12:19:22 -0400 Subject: [PATCH] Update to 3.10 headers --- usr/include/arch/interrupts_32.h | 392 ++++---- usr/include/arch/interrupts_64.h | 344 +++---- usr/include/arch/spr_def.h | 5 + usr/include/arch/spr_def_32.h | 62 +- usr/include/arch/spr_def_64.h | 49 +- usr/include/asm-arc/auxvec.h | 1 + usr/include/asm-arc/bitsperlong.h | 1 + usr/include/asm-arc/byteorder.h | 18 + usr/include/asm-arc/cachectl.h | 28 + usr/include/asm-arc/elf.h | 26 + usr/include/asm-arc/errno.h | 1 + usr/include/asm-arc/fcntl.h | 1 + usr/include/asm-arc/ioctl.h | 1 + usr/include/asm-arc/ioctls.h | 1 + usr/include/asm-arc/ipcbuf.h | 1 + usr/include/asm-arc/mman.h | 1 + usr/include/asm-arc/msgbuf.h | 1 + usr/include/asm-arc/page.h | 39 + usr/include/asm-arc/param.h | 1 + usr/include/asm-arc/poll.h | 1 + usr/include/asm-arc/posix_types.h | 1 + usr/include/asm-arc/ptrace.h | 48 + usr/include/asm-arc/resource.h | 1 + usr/include/asm-arc/sembuf.h | 1 + usr/include/asm-arc/setup.h | 6 + usr/include/asm-arc/shmbuf.h | 1 + usr/include/asm-arc/sigcontext.h | 22 + usr/include/asm-arc/siginfo.h | 1 + usr/include/asm-arc/signal.h | 27 + usr/include/asm-arc/socket.h | 1 + usr/include/asm-arc/sockios.h | 1 + usr/include/asm-arc/stat.h | 1 + usr/include/asm-arc/statfs.h | 1 + usr/include/asm-arc/swab.h | 98 ++ usr/include/asm-arc/termbits.h | 1 + usr/include/asm-arc/termios.h | 1 + usr/include/asm-arc/types.h | 1 + usr/include/asm-arc/unistd.h | 34 + usr/include/asm-arm/hwcap.h | 5 +- usr/include/asm-arm/kvm.h | 180 ++++ usr/include/asm-arm/kvm_para.h | 1 + usr/include/asm-arm/msgbuf.h | 32 +- usr/include/asm-arm/param.h | 26 +- usr/include/asm-arm/posix_types.h | 3 - usr/include/asm-arm/ptrace.h | 4 +- usr/include/asm-arm/sembuf.h | 26 +- usr/include/asm-arm/setup.h | 2 +- usr/include/asm-arm/shmbuf.h | 43 +- usr/include/asm-arm/signal.h | 9 +- usr/include/asm-arm/socket.h | 73 +- usr/include/asm-arm/sockios.h | 14 +- usr/include/asm-arm/swab.h | 4 +- usr/include/asm-arm/termbits.h | 199 +--- usr/include/asm-arm/termios.h | 45 +- usr/include/asm-arm/types.h | 12 +- usr/include/asm-arm/unistd.h | 7 + usr/include/asm-arm64/auxvec.h | 22 + usr/include/asm-arm64/bitsperlong.h | 23 + usr/include/asm-arm64/byteorder.h | 21 + usr/include/asm-arm64/errno.h | 1 + usr/include/asm-arm64/fcntl.h | 29 + usr/include/asm-arm64/hwcap.h | 26 + usr/include/asm-arm64/ioctl.h | 1 + usr/include/asm-arm64/ioctls.h | 1 + usr/include/asm-arm64/ipcbuf.h | 1 + usr/include/asm-arm64/kvm_para.h | 1 + usr/include/asm-arm64/mman.h | 1 + usr/include/asm-arm64/msgbuf.h | 1 + usr/include/asm-arm64/param.h | 23 + usr/include/asm-arm64/poll.h | 1 + usr/include/asm-arm64/posix_types.h | 1 + usr/include/asm-arm64/ptrace.h | 92 ++ usr/include/asm-arm64/resource.h | 1 + usr/include/asm-arm64/sembuf.h | 1 + usr/include/asm-arm64/setup.h | 26 + usr/include/asm-arm64/shmbuf.h | 1 + usr/include/asm-arm64/sigcontext.h | 57 ++ usr/include/asm-arm64/siginfo.h | 23 + usr/include/asm-arm64/signal.h | 24 + usr/include/asm-arm64/socket.h | 1 + usr/include/asm-arm64/sockios.h | 1 + usr/include/asm-arm64/stat.h | 16 + usr/include/asm-arm64/statfs.h | 23 + usr/include/asm-arm64/swab.h | 1 + usr/include/asm-arm64/termbits.h | 1 + usr/include/asm-arm64/termios.h | 1 + usr/include/asm-arm64/types.h | 1 + usr/include/asm-arm64/unistd.h | 16 + usr/include/asm-c6x/kvm_para.h | 1 + usr/include/asm-c6x/ptrace.h | 5 + usr/include/asm-c6x/setup.h | 27 - usr/include/asm-c6x/signal.h | 16 - usr/include/asm-c6x/swab.h | 10 +- usr/include/asm-c6x/unistd.h | 6 +- usr/include/asm-generic/fcntl.h | 4 + usr/include/asm-generic/ioctls.h | 3 + usr/include/asm-generic/kvm_para.h | 4 + usr/include/asm-generic/mman-common.h | 11 + usr/include/asm-generic/mman.h | 2 + usr/include/asm-generic/posix_types.h | 4 - usr/include/asm-generic/resource.h | 2 +- usr/include/asm-generic/siginfo.h | 23 +- usr/include/asm-generic/signal.h | 16 +- usr/include/asm-generic/socket.h | 8 +- usr/include/asm-generic/statfs.h | 2 +- usr/include/asm-generic/unistd.h | 15 +- usr/include/asm-hexagon/bitsperlong.h | 2 +- usr/include/asm-hexagon/byteorder.h | 2 +- usr/include/asm-hexagon/kvm_para.h | 1 + usr/include/asm-hexagon/param.h | 2 +- usr/include/asm-hexagon/ptrace.h | 11 +- usr/include/asm-hexagon/registers.h | 34 +- usr/include/asm-hexagon/setup.h | 2 +- usr/include/asm-hexagon/sigcontext.h | 2 +- usr/include/asm-hexagon/signal.h | 6 +- usr/include/asm-hexagon/swab.h | 2 +- usr/include/asm-hexagon/unistd.h | 11 +- usr/include/asm-hexagon/user.h | 24 +- usr/include/asm-ia64/cmpxchg.h | 147 +++ usr/include/asm-ia64/gcc_intrin.h | 222 ++--- usr/include/asm-ia64/intrinsics.h | 6 +- usr/include/asm-ia64/kvm.h | 2 +- usr/include/asm-ia64/kvm_para.h | 24 +- usr/include/asm-ia64/mman.h | 6 +- usr/include/asm-ia64/param.h | 6 +- usr/include/asm-ia64/posix_types.h | 3 - usr/include/asm-ia64/ptrace.h | 6 +- usr/include/asm-ia64/siginfo.h | 6 +- usr/include/asm-ia64/signal.h | 12 +- usr/include/asm-ia64/socket.h | 7 +- usr/include/asm-ia64/swab.h | 6 +- usr/include/asm-ia64/termios.h | 6 +- usr/include/asm-ia64/types.h | 9 +- usr/include/asm-ia64/unistd.h | 9 +- usr/include/asm-metag/auxvec.h | 1 + usr/include/asm-metag/bitsperlong.h | 1 + usr/include/asm-metag/byteorder.h | 1 + usr/include/asm-metag/ech.h | 15 + usr/include/asm-metag/errno.h | 1 + usr/include/asm-metag/fcntl.h | 1 + usr/include/asm-metag/ioctl.h | 1 + usr/include/asm-metag/ioctls.h | 1 + usr/include/asm-metag/ipcbuf.h | 1 + usr/include/asm-metag/mman.h | 1 + usr/include/asm-metag/msgbuf.h | 1 + usr/include/asm-metag/param.h | 1 + usr/include/asm-metag/poll.h | 1 + usr/include/asm-metag/posix_types.h | 1 + usr/include/asm-metag/ptrace.h | 113 +++ usr/include/asm-metag/resource.h | 7 + usr/include/asm-metag/sembuf.h | 1 + usr/include/asm-metag/setup.h | 1 + usr/include/asm-metag/shmbuf.h | 1 + usr/include/asm-metag/sigcontext.h | 31 + usr/include/asm-metag/siginfo.h | 8 + usr/include/asm-metag/signal.h | 1 + usr/include/asm-metag/socket.h | 1 + usr/include/asm-metag/sockios.h | 1 + usr/include/asm-metag/stat.h | 1 + usr/include/asm-metag/statfs.h | 1 + usr/include/asm-metag/swab.h | 26 + usr/include/asm-metag/termbits.h | 1 + usr/include/asm-metag/termios.h | 1 + usr/include/asm-metag/types.h | 1 + usr/include/asm-metag/unistd.h | 21 + usr/include/asm-microblaze/elf.h | 2 +- usr/include/asm-microblaze/kvm_para.h | 1 + usr/include/asm-microblaze/unistd.h | 4 +- usr/include/asm-openrisc/elf.h | 69 ++ usr/include/asm-openrisc/kvm_para.h | 1 + usr/include/asm-openrisc/ptrace.h | 4 - usr/include/asm-openrisc/spr_defs.h | 604 ------------ usr/include/asm-openrisc/ucontext.h | 1 + usr/include/asm-openrisc/unistd.h | 8 +- usr/include/asm-parisc/auxvec.h | 5 +- usr/include/asm-parisc/ioctls.h | 3 + usr/include/asm-parisc/mman.h | 11 + usr/include/asm-parisc/posix_types.h | 3 - usr/include/asm-parisc/ptrace.h | 8 +- usr/include/asm-parisc/signal.h | 6 - usr/include/asm-parisc/socket.h | 6 +- usr/include/asm-parisc/stat.h | 4 +- usr/include/asm-parisc/swab.h | 8 +- usr/include/asm-parisc/termios.h | 2 +- usr/include/asm-parisc/unistd.h | 6 +- usr/include/asm-powerpc/bootx.h | 2 +- usr/include/asm-powerpc/cputable.h | 9 + usr/include/asm-powerpc/elf.h | 16 +- usr/include/asm-powerpc/epapr_hcalls.h | 98 ++ usr/include/asm-powerpc/ioctls.h | 3 + usr/include/asm-powerpc/kvm.h | 187 +++- usr/include/asm-powerpc/kvm_para.h | 7 +- usr/include/asm-powerpc/linkage.h | 9 +- usr/include/asm-powerpc/mman.h | 12 +- usr/include/asm-powerpc/posix_types.h | 3 - usr/include/asm-powerpc/ptrace.h | 42 +- usr/include/asm-powerpc/setup.h | 31 - usr/include/asm-powerpc/siginfo.h | 1 - usr/include/asm-powerpc/signal.h | 10 - usr/include/asm-powerpc/socket.h | 7 +- usr/include/asm-powerpc/spu_info.h | 2 +- usr/include/asm-powerpc/stat.h | 4 +- usr/include/asm-powerpc/swab.h | 6 +- usr/include/asm-powerpc/termios.h | 8 +- usr/include/asm-powerpc/tm.h | 18 + usr/include/asm-powerpc/types.h | 24 +- usr/include/asm-powerpc/unistd.h | 8 +- usr/include/asm-s390/chpid.h | 12 +- usr/include/asm-s390/chsc.h | 10 +- usr/include/asm-s390/dasd.h | 3 +- usr/include/asm-s390/debug.h | 6 +- usr/include/asm-s390/errno.h | 2 - usr/include/asm-s390/kvm.h | 7 +- usr/include/asm-s390/kvm_para.h | 8 +- usr/include/asm-s390/kvm_virtio.h | 2 +- usr/include/asm-s390/mman.h | 9 - usr/include/asm-s390/monwriter.h | 4 +- usr/include/asm-s390/posix_types.h | 8 +- usr/include/asm-s390/ptrace.h | 32 +- usr/include/asm-s390/qeth.h | 4 +- usr/include/asm-s390/resource.h | 2 - usr/include/asm-s390/setup.h | 4 +- usr/include/asm-s390/sigcontext.h | 4 +- usr/include/asm-s390/siginfo.h | 2 - usr/include/asm-s390/signal.h | 10 +- usr/include/asm-s390/socket.h | 9 +- usr/include/asm-s390/stat.h | 2 - usr/include/asm-s390/statfs.h | 65 +- usr/include/asm-s390/swab.h | 14 +- usr/include/asm-s390/tape390.h | 3 +- usr/include/asm-s390/termios.h | 4 +- usr/include/asm-s390/types.h | 5 - usr/include/asm-s390/ucontext.h | 2 - usr/include/asm-s390/unistd.h | 7 +- usr/include/asm-s390/virtio-ccw.h | 21 + usr/include/asm-s390/vtoc.h | 4 +- usr/include/asm-s390/zcrypt.h | 2 +- usr/include/asm-score/kvm_para.h | 1 + usr/include/asm-score/unistd.h | 8 +- usr/include/asm-sparc/asi.h | 41 +- usr/include/asm-sparc/ioctls.h | 5 +- usr/include/asm-sparc/kvm_para.h | 1 + usr/include/asm-sparc/perfctr.h | 5 - usr/include/asm-sparc/posix_types.h | 5 - usr/include/asm-sparc/psr.h | 10 +- usr/include/asm-sparc/pstate.h | 14 + usr/include/asm-sparc/ptrace.h | 2 +- usr/include/asm-sparc/sigcontext.h | 9 +- usr/include/asm-sparc/siginfo.h | 3 +- usr/include/asm-sparc/signal.h | 8 +- usr/include/asm-sparc/socket.h | 6 +- usr/include/asm-sparc/termbits.h | 2 +- usr/include/asm-sparc/traps.h | 2 +- usr/include/asm-sparc/types.h | 18 +- usr/include/asm-sparc/unistd.h | 14 +- usr/include/asm-tile/byteorder.h | 20 + usr/include/asm-tile/cachectl.h | 42 + usr/include/asm-tile/hardwall.h | 13 +- usr/include/asm-tile/kvm_para.h | 1 + usr/include/asm-tile/ptrace.h | 9 +- usr/include/asm-tile/unistd.h | 12 +- usr/include/asm-x86/bootparam.h | 64 +- usr/include/asm-x86/e820.h | 1 + usr/include/asm-x86/hw_breakpoint.h | 6 +- usr/include/asm-x86/ist.h | 6 +- usr/include/asm-x86/kvm.h | 19 +- usr/include/asm-x86/kvm_para.h | 7 + usr/include/asm-x86/mce.h | 88 -- usr/include/asm-x86/mman.h | 3 + usr/include/asm-x86/msr-index.h | 70 ++ usr/include/asm-x86/perf_regs.h | 33 + usr/include/asm-x86/posix_types.h | 6 +- usr/include/asm-x86/posix_types_32.h | 3 - usr/include/asm-x86/processor-flags.h | 3 + usr/include/asm-x86/setup.h | 6 +- usr/include/asm-x86/signal.h | 13 +- usr/include/asm-x86/stat.h | 21 + usr/include/asm-x86/svm.h | 132 +++ usr/include/asm-x86/swab.h | 33 +- usr/include/asm-x86/unistd.h | 2 +- usr/include/asm-x86/unistd_32.h | 2 + usr/include/asm-x86/unistd_64.h | 2 + usr/include/asm-x86/unistd_x32.h | 6 +- usr/include/asm-x86/vmx.h | 117 +++ usr/include/linux/acct.h | 8 +- usr/include/linux/adfs_fs.h | 2 +- usr/include/linux/agpgart.h | 4 +- usr/include/linux/aio_abi.h | 4 +- usr/include/linux/apm_bios.h | 8 +- usr/include/linux/atm.h | 2 +- usr/include/linux/atm_tcp.h | 2 +- usr/include/linux/atmdev.h | 2 +- usr/include/linux/atmlec.h | 7 - usr/include/linux/audit.h | 10 +- usr/include/linux/auto_fs.h | 26 +- usr/include/linux/auxvec.h | 1 + usr/include/linux/blk_types.h | 195 ---- usr/include/linux/blkpg.h | 1 + usr/include/linux/blktrace_api.h | 2 +- usr/include/linux/bsg.h | 2 +- usr/include/linux/btrfs.h | 542 ++++++++++ usr/include/linux/caif/caif_socket.h | 2 +- usr/include/linux/caif/if_caif.h | 2 +- usr/include/linux/can.h | 71 +- usr/include/linux/can/error.h | 4 +- usr/include/linux/can/gw.h | 2 + usr/include/linux/can/raw.h | 3 +- usr/include/linux/capability.h | 7 +- usr/include/linux/cciss_ioctl.h | 2 +- usr/include/linux/cdk.h | 486 --------- usr/include/linux/cdrom.h | 40 +- usr/include/linux/cm4000_cs.h | 6 +- usr/include/linux/cn_proc.h | 12 +- usr/include/linux/coda.h | 3 +- usr/include/linux/coda_psdev.h | 2 +- usr/include/linux/comstats.h | 119 --- usr/include/linux/connector.h | 7 +- usr/include/linux/cramfs_fs.h | 2 +- usr/include/linux/dcbnl.h | 12 + usr/include/linux/dlm.h | 4 +- usr/include/linux/dlm_plock.h | 3 +- usr/include/linux/dm-ioctl.h | 11 +- usr/include/linux/dvb/dmx.h | 4 +- usr/include/linux/dvb/frontend.h | 187 +++- usr/include/linux/dvb/version.h | 2 +- usr/include/linux/dvb/video.h | 2 +- usr/include/linux/edd.h | 2 +- usr/include/linux/elf-fdpic.h | 28 - usr/include/linux/elf.h | 25 +- usr/include/linux/errno.h | 6 - usr/include/linux/errqueue.h | 4 +- usr/include/linux/ethtool.h | 137 ++- usr/include/linux/eventpoll.h | 15 +- usr/include/linux/falloc.h | 1 + usr/include/linux/fcntl.h | 2 +- usr/include/linux/fd.h | 2 +- usr/include/linux/filter.h | 9 +- usr/include/linux/fs.h | 184 +--- usr/include/linux/fsl_hypervisor.h | 2 +- usr/include/linux/fuse.h | 504 ++++++---- usr/include/linux/futex.h | 2 +- usr/include/linux/gameport.h | 8 +- usr/include/linux/generic_serial.h | 36 - usr/include/linux/genetlink.h | 2 +- usr/include/linux/gfs2_ondisk.h | 14 +- usr/include/linux/hdlc/ioctl.h | 7 +- usr/include/linux/hid.h | 11 +- usr/include/linux/hiddev.h | 10 +- usr/include/linux/hidraw.h | 10 +- usr/include/linux/hpet.h | 6 +- usr/include/linux/hw_breakpoint.h | 30 + usr/include/linux/i2c.h | 6 +- usr/include/linux/i2o-dev.h | 2 +- usr/include/linux/icmp.h | 4 +- usr/include/linux/icmpv6.h | 2 +- usr/include/linux/if.h | 2 + usr/include/linux/if_arp.h | 4 +- usr/include/linux/if_bridge.h | 97 +- usr/include/linux/if_cablemodem.h | 12 +- usr/include/linux/if_ec.h | 34 - usr/include/linux/if_eql.h | 2 +- usr/include/linux/if_ether.h | 10 +- usr/include/linux/if_fddi.h | 2 +- usr/include/linux/if_frad.h | 2 +- usr/include/linux/if_link.h | 73 ++ usr/include/linux/if_ltalk.h | 2 +- usr/include/linux/if_packet.h | 30 +- usr/include/linux/if_phonet.h | 2 +- usr/include/linux/if_pppol2tp.h | 29 +- usr/include/linux/if_pppox.h | 14 +- usr/include/linux/if_strip.h | 27 - usr/include/linux/if_team.h | 2 + usr/include/linux/if_tr.h | 95 -- usr/include/linux/if_tun.h | 7 + usr/include/linux/if_tunnel.h | 37 + usr/include/linux/if_vlan.h | 3 +- usr/include/linux/igmp.h | 2 +- usr/include/linux/in.h | 2 +- usr/include/linux/in6.h | 25 +- usr/include/linux/inet_diag.h | 5 +- usr/include/linux/inotify.h | 2 +- usr/include/linux/input.h | 22 +- usr/include/linux/ip.h | 2 +- usr/include/linux/ip6_tunnel.h | 17 + usr/include/linux/ip_vs.h | 21 +- usr/include/linux/ipmi.h | 10 +- usr/include/linux/ipv6.h | 3 + usr/include/linux/ipv6_route.h | 5 +- usr/include/linux/irqnr.h | 8 +- usr/include/linux/isdn.h | 1 + usr/include/linux/joystick.h | 8 +- usr/include/linux/kdev_t.h | 2 +- usr/include/linux/kernel-page-flags.h | 36 + usr/include/linux/kernel.h | 2 +- usr/include/linux/kernelcapi.h | 2 +- usr/include/linux/kexec.h | 52 + usr/include/linux/keyboard.h | 2 +- usr/include/linux/keyctl.h | 1 + usr/include/linux/kvm.h | 181 +++- usr/include/linux/l2tp.h | 20 +- usr/include/linux/llc.h | 4 +- usr/include/linux/loop.h | 8 +- usr/include/linux/lp.h | 8 +- usr/include/linux/magic.h | 4 + usr/include/linux/mdio.h | 28 +- usr/include/linux/media.h | 2 + usr/include/linux/mei.h | 110 +++ usr/include/linux/mempolicy.h | 27 +- usr/include/linux/meye.h | 8 +- usr/include/linux/mii.h | 9 + usr/include/linux/mroute.h | 5 +- usr/include/linux/mroute6.h | 5 +- usr/include/linux/msdos_fs.h | 43 +- usr/include/linux/msg.h | 1 + usr/include/linux/n_r3964.h | 2 +- usr/include/linux/nbd.h | 14 +- usr/include/linux/neighbour.h | 7 + usr/include/linux/net.h | 2 +- usr/include/linux/netconf.h | 24 + usr/include/linux/netdevice.h | 2 +- usr/include/linux/netfilter.h | 3 +- usr/include/linux/netfilter/ipset/ip_set.h | 54 +- usr/include/linux/netfilter/nf_conntrack_common.h | 5 + usr/include/linux/netfilter/nf_nat.h | 8 + usr/include/linux/netfilter/nfnetlink.h | 5 +- usr/include/linux/netfilter/nfnetlink_acct.h | 2 +- usr/include/linux/netfilter/nfnetlink_conntrack.h | 51 +- usr/include/linux/netfilter/nfnetlink_cthelper.h | 55 ++ usr/include/linux/netfilter/nfnetlink_queue.h | 18 + usr/include/linux/netfilter/xt_CT.h | 6 +- usr/include/linux/netfilter/xt_NFQUEUE.h | 9 + usr/include/linux/netfilter/xt_bpf.h | 17 + usr/include/linux/netfilter/xt_connlabel.h | 12 + usr/include/linux/netfilter/xt_connlimit.h | 9 +- usr/include/linux/netfilter/xt_conntrack.h | 1 + usr/include/linux/netfilter/xt_hashlimit.h | 9 +- usr/include/linux/netfilter/xt_physdev.h | 2 +- usr/include/linux/netfilter/xt_recent.h | 10 + usr/include/linux/netfilter/xt_set.h | 9 + usr/include/linux/netfilter/xt_time.h | 5 + usr/include/linux/netfilter_bridge.h | 2 +- usr/include/linux/netfilter_bridge/ebt_802_3.h | 2 +- usr/include/linux/netfilter_bridge/ebtables.h | 2 +- usr/include/linux/netfilter_ipv4.h | 9 +- usr/include/linux/netfilter_ipv4/ip_queue.h | 64 -- usr/include/linux/netfilter_ipv4/ipt_addrtype.h | 27 - usr/include/linux/netfilter_ipv6.h | 9 +- usr/include/linux/netfilter_ipv6/ip6_tables.h | 3 + usr/include/linux/netfilter_ipv6/ip6t_NPT.h | 16 + usr/include/linux/netfilter_ipv6/ip6t_frag.h | 4 +- usr/include/linux/netlink.h | 38 +- usr/include/linux/netlink_diag.h | 52 + usr/include/linux/nfc.h | 242 +++++ usr/include/linux/nfs4.h | 6 +- usr/include/linux/nfs_fs.h | 3 +- usr/include/linux/nfsacl.h | 2 +- usr/include/linux/nfsd/export.h | 1 - usr/include/linux/nl80211.h | 1042 ++++++++++++++++++-- usr/include/linux/nvram.h | 2 +- usr/include/linux/omap3isp.h | 6 +- usr/include/linux/omapfb.h | 2 +- usr/include/linux/oom.h | 22 +- usr/include/linux/openvswitch.h | 456 +++++++++ usr/include/linux/packet_diag.h | 79 ++ usr/include/linux/pci_regs.h | 183 +++- usr/include/linux/perf_event.h | 119 ++- usr/include/linux/phonet.h | 2 +- usr/include/linux/pkt_cls.h | 6 +- usr/include/linux/pkt_sched.h | 82 ++ usr/include/linux/poll.h | 6 - usr/include/linux/posix_types.h | 18 +- usr/include/linux/ppp-comp.h | 87 -- usr/include/linux/prctl.h | 29 +- usr/include/linux/ptp_clock.h | 14 + usr/include/linux/ptrace.h | 22 +- usr/include/linux/quota.h | 2 +- usr/include/linux/raid/md_p.h | 21 +- usr/include/linux/raid/md_u.h | 3 +- usr/include/linux/resource.h | 2 +- usr/include/linux/rfkill.h | 10 +- usr/include/linux/rtc.h | 3 + usr/include/linux/rtnetlink.h | 29 +- usr/include/linux/scc.h | 6 +- usr/include/linux/sched.h | 2 +- usr/include/linux/screen_info.h | 2 + usr/include/linux/sctp.h | 840 ++++++++++++++++ usr/include/linux/sdla.h | 2 +- usr/include/linux/seccomp.h | 47 + usr/include/linux/securebits.h | 4 +- usr/include/linux/serial.h | 82 +- usr/include/linux/serial_core.h | 18 +- usr/include/linux/serial_reg.h | 22 + usr/include/linux/serio.h | 8 +- usr/include/linux/signal.h | 2 + usr/include/linux/snmp.h | 34 +- usr/include/linux/sock_diag.h | 3 +- usr/include/linux/sonet.h | 2 +- usr/include/linux/sonypi.h | 2 +- usr/include/linux/soundcard.h | 6 +- usr/include/linux/stat.h | 2 +- usr/include/linux/stddef.h | 6 - usr/include/linux/swab.h | 22 +- usr/include/linux/tcp.h | 67 +- usr/include/linux/tcp_metrics.h | 54 + usr/include/linux/time.h | 16 +- usr/include/linux/timex.h | 2 +- usr/include/linux/tipc_config.h | 12 +- usr/include/linux/toshiba.h | 2 +- usr/include/linux/tty.h | 2 +- usr/include/linux/tty_flags.h | 78 ++ usr/include/linux/udp.h | 2 +- usr/include/linux/uhid.h | 104 ++ usr/include/linux/uinput.h | 28 +- usr/include/linux/uio.h | 14 +- usr/include/linux/unix_diag.h | 5 +- usr/include/linux/usb/audio.h | 6 +- usr/include/linux/usb/cdc.h | 23 + usr/include/linux/usb/ch11.h | 6 +- usr/include/linux/usb/ch9.h | 68 +- usr/include/linux/usb/functionfs.h | 4 +- usr/include/linux/usbdevice_fs.h | 22 + usr/include/linux/uuid.h | 58 ++ usr/include/linux/uvcvideo.h | 3 +- usr/include/linux/v4l2-common.h | 71 ++ usr/include/linux/v4l2-controls.h | 856 ++++++++++++++++ usr/include/linux/v4l2-dv-timings.h | 834 ++++++++++++++++ usr/include/linux/v4l2-mediabus.h | 22 +- usr/include/linux/v4l2-subdev.h | 39 + usr/include/linux/version.h | 2 +- usr/include/linux/vfio.h | 378 +++++++ usr/include/linux/vhost.h | 28 + usr/include/linux/videodev2.h | 1087 ++++++--------------- usr/include/linux/virtio_balloon.h | 4 +- usr/include/linux/virtio_blk.h | 8 +- usr/include/linux/virtio_console.h | 12 +- usr/include/linux/virtio_ids.h | 4 +- usr/include/linux/virtio_net.h | 49 +- usr/include/linux/wait.h | 2 +- usr/include/linux/wanrouter.h | 445 +-------- usr/include/linux/watchdog.h | 4 +- usr/include/linux/wireless.h | 2 +- usr/include/linux/xattr.h | 18 +- usr/include/linux/xfrm.h | 5 + usr/include/mtd/ubi-user.h | 50 +- usr/include/rdma/ib_user_verbs.h | 16 + usr/include/rdma/rdma_user_cm.h | 1 + usr/include/scsi/scsi_bsg_fc.h | 2 - usr/include/scsi/scsi_netlink.h | 2 - usr/include/sound/asound.h | 75 +- usr/include/sound/compress_offload.h | 31 +- usr/include/sound/compress_params.h | 1 + usr/include/sound/emu10k1.h | 12 +- usr/include/sound/sb16_csp.h | 8 +- usr/include/video/sisfb.h | 2 +- usr/include/xen/privcmd.h | 27 +- 555 files changed, 12706 insertions(+), 5961 deletions(-) create mode 100644 usr/include/asm-arc/auxvec.h create mode 100644 usr/include/asm-arc/bitsperlong.h create mode 100644 usr/include/asm-arc/byteorder.h create mode 100644 usr/include/asm-arc/cachectl.h create mode 100644 usr/include/asm-arc/elf.h create mode 100644 usr/include/asm-arc/errno.h create mode 100644 usr/include/asm-arc/fcntl.h create mode 100644 usr/include/asm-arc/ioctl.h create mode 100644 usr/include/asm-arc/ioctls.h create mode 100644 usr/include/asm-arc/ipcbuf.h create mode 100644 usr/include/asm-arc/mman.h create mode 100644 usr/include/asm-arc/msgbuf.h create mode 100644 usr/include/asm-arc/page.h create mode 100644 usr/include/asm-arc/param.h create mode 100644 usr/include/asm-arc/poll.h create mode 100644 usr/include/asm-arc/posix_types.h create mode 100644 usr/include/asm-arc/ptrace.h create mode 100644 usr/include/asm-arc/resource.h create mode 100644 usr/include/asm-arc/sembuf.h create mode 100644 usr/include/asm-arc/setup.h create mode 100644 usr/include/asm-arc/shmbuf.h create mode 100644 usr/include/asm-arc/sigcontext.h create mode 100644 usr/include/asm-arc/siginfo.h create mode 100644 usr/include/asm-arc/signal.h create mode 100644 usr/include/asm-arc/socket.h create mode 100644 usr/include/asm-arc/sockios.h create mode 100644 usr/include/asm-arc/stat.h create mode 100644 usr/include/asm-arc/statfs.h create mode 100644 usr/include/asm-arc/swab.h create mode 100644 usr/include/asm-arc/termbits.h create mode 100644 usr/include/asm-arc/termios.h create mode 100644 usr/include/asm-arc/types.h create mode 100644 usr/include/asm-arc/unistd.h create mode 100644 usr/include/asm-arm/kvm.h create mode 100644 usr/include/asm-arm/kvm_para.h create mode 100644 usr/include/asm-arm64/auxvec.h create mode 100644 usr/include/asm-arm64/bitsperlong.h create mode 100644 usr/include/asm-arm64/byteorder.h create mode 100644 usr/include/asm-arm64/errno.h create mode 100644 usr/include/asm-arm64/fcntl.h create mode 100644 usr/include/asm-arm64/hwcap.h create mode 100644 usr/include/asm-arm64/ioctl.h create mode 100644 usr/include/asm-arm64/ioctls.h create mode 100644 usr/include/asm-arm64/ipcbuf.h create mode 100644 usr/include/asm-arm64/kvm_para.h create mode 100644 usr/include/asm-arm64/mman.h create mode 100644 usr/include/asm-arm64/msgbuf.h create mode 100644 usr/include/asm-arm64/param.h create mode 100644 usr/include/asm-arm64/poll.h create mode 100644 usr/include/asm-arm64/posix_types.h create mode 100644 usr/include/asm-arm64/ptrace.h create mode 100644 usr/include/asm-arm64/resource.h create mode 100644 usr/include/asm-arm64/sembuf.h create mode 100644 usr/include/asm-arm64/setup.h create mode 100644 usr/include/asm-arm64/shmbuf.h create mode 100644 usr/include/asm-arm64/sigcontext.h create mode 100644 usr/include/asm-arm64/siginfo.h create mode 100644 usr/include/asm-arm64/signal.h create mode 100644 usr/include/asm-arm64/socket.h create mode 100644 usr/include/asm-arm64/sockios.h create mode 100644 usr/include/asm-arm64/stat.h create mode 100644 usr/include/asm-arm64/statfs.h create mode 100644 usr/include/asm-arm64/swab.h create mode 100644 usr/include/asm-arm64/termbits.h create mode 100644 usr/include/asm-arm64/termios.h create mode 100644 usr/include/asm-arm64/types.h create mode 100644 usr/include/asm-arm64/unistd.h create mode 100644 usr/include/asm-c6x/kvm_para.h create mode 100644 usr/include/asm-generic/kvm_para.h create mode 100644 usr/include/asm-hexagon/kvm_para.h create mode 100644 usr/include/asm-ia64/cmpxchg.h create mode 100644 usr/include/asm-metag/auxvec.h create mode 100644 usr/include/asm-metag/bitsperlong.h create mode 100644 usr/include/asm-metag/byteorder.h create mode 100644 usr/include/asm-metag/ech.h create mode 100644 usr/include/asm-metag/errno.h create mode 100644 usr/include/asm-metag/fcntl.h create mode 100644 usr/include/asm-metag/ioctl.h create mode 100644 usr/include/asm-metag/ioctls.h create mode 100644 usr/include/asm-metag/ipcbuf.h create mode 100644 usr/include/asm-metag/mman.h create mode 100644 usr/include/asm-metag/msgbuf.h create mode 100644 usr/include/asm-metag/param.h create mode 100644 usr/include/asm-metag/poll.h create mode 100644 usr/include/asm-metag/posix_types.h create mode 100644 usr/include/asm-metag/ptrace.h create mode 100644 usr/include/asm-metag/resource.h create mode 100644 usr/include/asm-metag/sembuf.h create mode 100644 usr/include/asm-metag/setup.h create mode 100644 usr/include/asm-metag/shmbuf.h create mode 100644 usr/include/asm-metag/sigcontext.h create mode 100644 usr/include/asm-metag/siginfo.h create mode 100644 usr/include/asm-metag/signal.h create mode 100644 usr/include/asm-metag/socket.h create mode 100644 usr/include/asm-metag/sockios.h create mode 100644 usr/include/asm-metag/stat.h create mode 100644 usr/include/asm-metag/statfs.h create mode 100644 usr/include/asm-metag/swab.h create mode 100644 usr/include/asm-metag/termbits.h create mode 100644 usr/include/asm-metag/termios.h create mode 100644 usr/include/asm-metag/types.h create mode 100644 usr/include/asm-metag/unistd.h create mode 100644 usr/include/asm-microblaze/kvm_para.h create mode 100644 usr/include/asm-openrisc/elf.h create mode 100644 usr/include/asm-openrisc/kvm_para.h delete mode 100644 usr/include/asm-openrisc/spr_defs.h create mode 100644 usr/include/asm-openrisc/ucontext.h create mode 100644 usr/include/asm-powerpc/epapr_hcalls.h create mode 100644 usr/include/asm-powerpc/tm.h create mode 100644 usr/include/asm-s390/virtio-ccw.h create mode 100644 usr/include/asm-score/kvm_para.h create mode 100644 usr/include/asm-sparc/kvm_para.h create mode 100644 usr/include/asm-tile/cachectl.h create mode 100644 usr/include/asm-tile/kvm_para.h create mode 100644 usr/include/asm-x86/perf_regs.h create mode 100644 usr/include/asm-x86/svm.h create mode 100644 usr/include/asm-x86/vmx.h delete mode 100644 usr/include/linux/blk_types.h create mode 100644 usr/include/linux/btrfs.h delete mode 100644 usr/include/linux/cdk.h delete mode 100644 usr/include/linux/comstats.h delete mode 100644 usr/include/linux/generic_serial.h create mode 100644 usr/include/linux/hw_breakpoint.h delete mode 100644 usr/include/linux/if_ec.h delete mode 100644 usr/include/linux/if_strip.h delete mode 100644 usr/include/linux/if_tr.h create mode 100644 usr/include/linux/kernel-page-flags.h create mode 100644 usr/include/linux/kexec.h create mode 100644 usr/include/linux/mei.h create mode 100644 usr/include/linux/netconf.h create mode 100644 usr/include/linux/netfilter/nfnetlink_cthelper.h create mode 100644 usr/include/linux/netfilter/xt_bpf.h create mode 100644 usr/include/linux/netfilter/xt_connlabel.h delete mode 100644 usr/include/linux/netfilter_ipv4/ip_queue.h delete mode 100644 usr/include/linux/netfilter_ipv4/ipt_addrtype.h create mode 100644 usr/include/linux/netfilter_ipv6/ip6t_NPT.h create mode 100644 usr/include/linux/netlink_diag.h create mode 100644 usr/include/linux/nfc.h create mode 100644 usr/include/linux/openvswitch.h create mode 100644 usr/include/linux/packet_diag.h create mode 100644 usr/include/linux/sctp.h create mode 100644 usr/include/linux/seccomp.h create mode 100644 usr/include/linux/tcp_metrics.h create mode 100644 usr/include/linux/tty_flags.h create mode 100644 usr/include/linux/uhid.h create mode 100644 usr/include/linux/uuid.h create mode 100644 usr/include/linux/v4l2-common.h create mode 100644 usr/include/linux/v4l2-controls.h create mode 100644 usr/include/linux/v4l2-dv-timings.h create mode 100644 usr/include/linux/vfio.h diff --git a/usr/include/arch/interrupts_32.h b/usr/include/arch/interrupts_32.h index 96b5710..fdae7f0 100644 --- a/usr/include/arch/interrupts_32.h +++ b/usr/include/arch/interrupts_32.h @@ -92,216 +92,216 @@ #ifndef __ASSEMBLER__ #define QUEUED_INTERRUPTS ( \ - INT_MASK(INT_MEM_ERROR) | \ - INT_MASK(INT_DMATLB_MISS) | \ - INT_MASK(INT_DMATLB_ACCESS) | \ - INT_MASK(INT_SNITLB_MISS) | \ - INT_MASK(INT_SN_NOTIFY) | \ - INT_MASK(INT_SN_FIREWALL) | \ - INT_MASK(INT_IDN_FIREWALL) | \ - INT_MASK(INT_UDN_FIREWALL) | \ - INT_MASK(INT_TILE_TIMER) | \ - INT_MASK(INT_IDN_TIMER) | \ - INT_MASK(INT_UDN_TIMER) | \ - INT_MASK(INT_DMA_NOTIFY) | \ - INT_MASK(INT_IDN_CA) | \ - INT_MASK(INT_UDN_CA) | \ - INT_MASK(INT_IDN_AVAIL) | \ - INT_MASK(INT_UDN_AVAIL) | \ - INT_MASK(INT_PERF_COUNT) | \ - INT_MASK(INT_INTCTRL_3) | \ - INT_MASK(INT_INTCTRL_2) | \ - INT_MASK(INT_INTCTRL_1) | \ - INT_MASK(INT_INTCTRL_0) | \ - INT_MASK(INT_BOOT_ACCESS) | \ - INT_MASK(INT_WORLD_ACCESS) | \ - INT_MASK(INT_I_ASID) | \ - INT_MASK(INT_D_ASID) | \ - INT_MASK(INT_DMA_ASID) | \ - INT_MASK(INT_SNI_ASID) | \ - INT_MASK(INT_DMA_CPL) | \ - INT_MASK(INT_SN_CPL) | \ - INT_MASK(INT_DOUBLE_FAULT) | \ - INT_MASK(INT_AUX_PERF_COUNT) | \ + (1ULL << INT_MEM_ERROR) | \ + (1ULL << INT_DMATLB_MISS) | \ + (1ULL << INT_DMATLB_ACCESS) | \ + (1ULL << INT_SNITLB_MISS) | \ + (1ULL << INT_SN_NOTIFY) | \ + (1ULL << INT_SN_FIREWALL) | \ + (1ULL << INT_IDN_FIREWALL) | \ + (1ULL << INT_UDN_FIREWALL) | \ + (1ULL << INT_TILE_TIMER) | \ + (1ULL << INT_IDN_TIMER) | \ + (1ULL << INT_UDN_TIMER) | \ + (1ULL << INT_DMA_NOTIFY) | \ + (1ULL << INT_IDN_CA) | \ + (1ULL << INT_UDN_CA) | \ + (1ULL << INT_IDN_AVAIL) | \ + (1ULL << INT_UDN_AVAIL) | \ + (1ULL << INT_PERF_COUNT) | \ + (1ULL << INT_INTCTRL_3) | \ + (1ULL << INT_INTCTRL_2) | \ + (1ULL << INT_INTCTRL_1) | \ + (1ULL << INT_INTCTRL_0) | \ + (1ULL << INT_BOOT_ACCESS) | \ + (1ULL << INT_WORLD_ACCESS) | \ + (1ULL << INT_I_ASID) | \ + (1ULL << INT_D_ASID) | \ + (1ULL << INT_DMA_ASID) | \ + (1ULL << INT_SNI_ASID) | \ + (1ULL << INT_DMA_CPL) | \ + (1ULL << INT_SN_CPL) | \ + (1ULL << INT_DOUBLE_FAULT) | \ + (1ULL << INT_AUX_PERF_COUNT) | \ 0) #define NONQUEUED_INTERRUPTS ( \ - INT_MASK(INT_ITLB_MISS) | \ - INT_MASK(INT_ILL) | \ - INT_MASK(INT_GPV) | \ - INT_MASK(INT_SN_ACCESS) | \ - INT_MASK(INT_IDN_ACCESS) | \ - INT_MASK(INT_UDN_ACCESS) | \ - INT_MASK(INT_IDN_REFILL) | \ - INT_MASK(INT_UDN_REFILL) | \ - INT_MASK(INT_IDN_COMPLETE) | \ - INT_MASK(INT_UDN_COMPLETE) | \ - INT_MASK(INT_SWINT_3) | \ - INT_MASK(INT_SWINT_2) | \ - INT_MASK(INT_SWINT_1) | \ - INT_MASK(INT_SWINT_0) | \ - INT_MASK(INT_UNALIGN_DATA) | \ - INT_MASK(INT_DTLB_MISS) | \ - INT_MASK(INT_DTLB_ACCESS) | \ - INT_MASK(INT_SN_STATIC_ACCESS) | \ + (1ULL << INT_ITLB_MISS) | \ + (1ULL << INT_ILL) | \ + (1ULL << INT_GPV) | \ + (1ULL << INT_SN_ACCESS) | \ + (1ULL << INT_IDN_ACCESS) | \ + (1ULL << INT_UDN_ACCESS) | \ + (1ULL << INT_IDN_REFILL) | \ + (1ULL << INT_UDN_REFILL) | \ + (1ULL << INT_IDN_COMPLETE) | \ + (1ULL << INT_UDN_COMPLETE) | \ + (1ULL << INT_SWINT_3) | \ + (1ULL << INT_SWINT_2) | \ + (1ULL << INT_SWINT_1) | \ + (1ULL << INT_SWINT_0) | \ + (1ULL << INT_UNALIGN_DATA) | \ + (1ULL << INT_DTLB_MISS) | \ + (1ULL << INT_DTLB_ACCESS) | \ + (1ULL << INT_SN_STATIC_ACCESS) | \ 0) #define CRITICAL_MASKED_INTERRUPTS ( \ - INT_MASK(INT_MEM_ERROR) | \ - INT_MASK(INT_DMATLB_MISS) | \ - INT_MASK(INT_DMATLB_ACCESS) | \ - INT_MASK(INT_SNITLB_MISS) | \ - INT_MASK(INT_SN_NOTIFY) | \ - INT_MASK(INT_SN_FIREWALL) | \ - INT_MASK(INT_IDN_FIREWALL) | \ - INT_MASK(INT_UDN_FIREWALL) | \ - INT_MASK(INT_TILE_TIMER) | \ - INT_MASK(INT_IDN_TIMER) | \ - INT_MASK(INT_UDN_TIMER) | \ - INT_MASK(INT_DMA_NOTIFY) | \ - INT_MASK(INT_IDN_CA) | \ - INT_MASK(INT_UDN_CA) | \ - INT_MASK(INT_IDN_AVAIL) | \ - INT_MASK(INT_UDN_AVAIL) | \ - INT_MASK(INT_PERF_COUNT) | \ - INT_MASK(INT_INTCTRL_3) | \ - INT_MASK(INT_INTCTRL_2) | \ - INT_MASK(INT_INTCTRL_1) | \ - INT_MASK(INT_INTCTRL_0) | \ - INT_MASK(INT_AUX_PERF_COUNT) | \ + (1ULL << INT_MEM_ERROR) | \ + (1ULL << INT_DMATLB_MISS) | \ + (1ULL << INT_DMATLB_ACCESS) | \ + (1ULL << INT_SNITLB_MISS) | \ + (1ULL << INT_SN_NOTIFY) | \ + (1ULL << INT_SN_FIREWALL) | \ + (1ULL << INT_IDN_FIREWALL) | \ + (1ULL << INT_UDN_FIREWALL) | \ + (1ULL << INT_TILE_TIMER) | \ + (1ULL << INT_IDN_TIMER) | \ + (1ULL << INT_UDN_TIMER) | \ + (1ULL << INT_DMA_NOTIFY) | \ + (1ULL << INT_IDN_CA) | \ + (1ULL << INT_UDN_CA) | \ + (1ULL << INT_IDN_AVAIL) | \ + (1ULL << INT_UDN_AVAIL) | \ + (1ULL << INT_PERF_COUNT) | \ + (1ULL << INT_INTCTRL_3) | \ + (1ULL << INT_INTCTRL_2) | \ + (1ULL << INT_INTCTRL_1) | \ + (1ULL << INT_INTCTRL_0) | \ + (1ULL << INT_AUX_PERF_COUNT) | \ 0) #define CRITICAL_UNMASKED_INTERRUPTS ( \ - INT_MASK(INT_ITLB_MISS) | \ - INT_MASK(INT_ILL) | \ - INT_MASK(INT_GPV) | \ - INT_MASK(INT_SN_ACCESS) | \ - INT_MASK(INT_IDN_ACCESS) | \ - INT_MASK(INT_UDN_ACCESS) | \ - INT_MASK(INT_IDN_REFILL) | \ - INT_MASK(INT_UDN_REFILL) | \ - INT_MASK(INT_IDN_COMPLETE) | \ - INT_MASK(INT_UDN_COMPLETE) | \ - INT_MASK(INT_SWINT_3) | \ - INT_MASK(INT_SWINT_2) | \ - INT_MASK(INT_SWINT_1) | \ - INT_MASK(INT_SWINT_0) | \ - INT_MASK(INT_UNALIGN_DATA) | \ - INT_MASK(INT_DTLB_MISS) | \ - INT_MASK(INT_DTLB_ACCESS) | \ - INT_MASK(INT_BOOT_ACCESS) | \ - INT_MASK(INT_WORLD_ACCESS) | \ - INT_MASK(INT_I_ASID) | \ - INT_MASK(INT_D_ASID) | \ - INT_MASK(INT_DMA_ASID) | \ - INT_MASK(INT_SNI_ASID) | \ - INT_MASK(INT_DMA_CPL) | \ - INT_MASK(INT_SN_CPL) | \ - INT_MASK(INT_DOUBLE_FAULT) | \ - INT_MASK(INT_SN_STATIC_ACCESS) | \ + (1ULL << INT_ITLB_MISS) | \ + (1ULL << INT_ILL) | \ + (1ULL << INT_GPV) | \ + (1ULL << INT_SN_ACCESS) | \ + (1ULL << INT_IDN_ACCESS) | \ + (1ULL << INT_UDN_ACCESS) | \ + (1ULL << INT_IDN_REFILL) | \ + (1ULL << INT_UDN_REFILL) | \ + (1ULL << INT_IDN_COMPLETE) | \ + (1ULL << INT_UDN_COMPLETE) | \ + (1ULL << INT_SWINT_3) | \ + (1ULL << INT_SWINT_2) | \ + (1ULL << INT_SWINT_1) | \ + (1ULL << INT_SWINT_0) | \ + (1ULL << INT_UNALIGN_DATA) | \ + (1ULL << INT_DTLB_MISS) | \ + (1ULL << INT_DTLB_ACCESS) | \ + (1ULL << INT_BOOT_ACCESS) | \ + (1ULL << INT_WORLD_ACCESS) | \ + (1ULL << INT_I_ASID) | \ + (1ULL << INT_D_ASID) | \ + (1ULL << INT_DMA_ASID) | \ + (1ULL << INT_SNI_ASID) | \ + (1ULL << INT_DMA_CPL) | \ + (1ULL << INT_SN_CPL) | \ + (1ULL << INT_DOUBLE_FAULT) | \ + (1ULL << INT_SN_STATIC_ACCESS) | \ 0) #define MASKABLE_INTERRUPTS ( \ - INT_MASK(INT_MEM_ERROR) | \ - INT_MASK(INT_IDN_REFILL) | \ - INT_MASK(INT_UDN_REFILL) | \ - INT_MASK(INT_IDN_COMPLETE) | \ - INT_MASK(INT_UDN_COMPLETE) | \ - INT_MASK(INT_DMATLB_MISS) | \ - INT_MASK(INT_DMATLB_ACCESS) | \ - INT_MASK(INT_SNITLB_MISS) | \ - INT_MASK(INT_SN_NOTIFY) | \ - INT_MASK(INT_SN_FIREWALL) | \ - INT_MASK(INT_IDN_FIREWALL) | \ - INT_MASK(INT_UDN_FIREWALL) | \ - INT_MASK(INT_TILE_TIMER) | \ - INT_MASK(INT_IDN_TIMER) | \ - INT_MASK(INT_UDN_TIMER) | \ - INT_MASK(INT_DMA_NOTIFY) | \ - INT_MASK(INT_IDN_CA) | \ - INT_MASK(INT_UDN_CA) | \ - INT_MASK(INT_IDN_AVAIL) | \ - INT_MASK(INT_UDN_AVAIL) | \ - INT_MASK(INT_PERF_COUNT) | \ - INT_MASK(INT_INTCTRL_3) | \ - INT_MASK(INT_INTCTRL_2) | \ - INT_MASK(INT_INTCTRL_1) | \ - INT_MASK(INT_INTCTRL_0) | \ - INT_MASK(INT_AUX_PERF_COUNT) | \ + (1ULL << INT_MEM_ERROR) | \ + (1ULL << INT_IDN_REFILL) | \ + (1ULL << INT_UDN_REFILL) | \ + (1ULL << INT_IDN_COMPLETE) | \ + (1ULL << INT_UDN_COMPLETE) | \ + (1ULL << INT_DMATLB_MISS) | \ + (1ULL << INT_DMATLB_ACCESS) | \ + (1ULL << INT_SNITLB_MISS) | \ + (1ULL << INT_SN_NOTIFY) | \ + (1ULL << INT_SN_FIREWALL) | \ + (1ULL << INT_IDN_FIREWALL) | \ + (1ULL << INT_UDN_FIREWALL) | \ + (1ULL << INT_TILE_TIMER) | \ + (1ULL << INT_IDN_TIMER) | \ + (1ULL << INT_UDN_TIMER) | \ + (1ULL << INT_DMA_NOTIFY) | \ + (1ULL << INT_IDN_CA) | \ + (1ULL << INT_UDN_CA) | \ + (1ULL << INT_IDN_AVAIL) | \ + (1ULL << INT_UDN_AVAIL) | \ + (1ULL << INT_PERF_COUNT) | \ + (1ULL << INT_INTCTRL_3) | \ + (1ULL << INT_INTCTRL_2) | \ + (1ULL << INT_INTCTRL_1) | \ + (1ULL << INT_INTCTRL_0) | \ + (1ULL << INT_AUX_PERF_COUNT) | \ 0) #define UNMASKABLE_INTERRUPTS ( \ - INT_MASK(INT_ITLB_MISS) | \ - INT_MASK(INT_ILL) | \ - INT_MASK(INT_GPV) | \ - INT_MASK(INT_SN_ACCESS) | \ - INT_MASK(INT_IDN_ACCESS) | \ - INT_MASK(INT_UDN_ACCESS) | \ - INT_MASK(INT_SWINT_3) | \ - INT_MASK(INT_SWINT_2) | \ - INT_MASK(INT_SWINT_1) | \ - INT_MASK(INT_SWINT_0) | \ - INT_MASK(INT_UNALIGN_DATA) | \ - INT_MASK(INT_DTLB_MISS) | \ - INT_MASK(INT_DTLB_ACCESS) | \ - INT_MASK(INT_BOOT_ACCESS) | \ - INT_MASK(INT_WORLD_ACCESS) | \ - INT_MASK(INT_I_ASID) | \ - INT_MASK(INT_D_ASID) | \ - INT_MASK(INT_DMA_ASID) | \ - INT_MASK(INT_SNI_ASID) | \ - INT_MASK(INT_DMA_CPL) | \ - INT_MASK(INT_SN_CPL) | \ - INT_MASK(INT_DOUBLE_FAULT) | \ - INT_MASK(INT_SN_STATIC_ACCESS) | \ + (1ULL << INT_ITLB_MISS) | \ + (1ULL << INT_ILL) | \ + (1ULL << INT_GPV) | \ + (1ULL << INT_SN_ACCESS) | \ + (1ULL << INT_IDN_ACCESS) | \ + (1ULL << INT_UDN_ACCESS) | \ + (1ULL << INT_SWINT_3) | \ + (1ULL << INT_SWINT_2) | \ + (1ULL << INT_SWINT_1) | \ + (1ULL << INT_SWINT_0) | \ + (1ULL << INT_UNALIGN_DATA) | \ + (1ULL << INT_DTLB_MISS) | \ + (1ULL << INT_DTLB_ACCESS) | \ + (1ULL << INT_BOOT_ACCESS) | \ + (1ULL << INT_WORLD_ACCESS) | \ + (1ULL << INT_I_ASID) | \ + (1ULL << INT_D_ASID) | \ + (1ULL << INT_DMA_ASID) | \ + (1ULL << INT_SNI_ASID) | \ + (1ULL << INT_DMA_CPL) | \ + (1ULL << INT_SN_CPL) | \ + (1ULL << INT_DOUBLE_FAULT) | \ + (1ULL << INT_SN_STATIC_ACCESS) | \ 0) #define SYNC_INTERRUPTS ( \ - INT_MASK(INT_ITLB_MISS) | \ - INT_MASK(INT_ILL) | \ - INT_MASK(INT_GPV) | \ - INT_MASK(INT_SN_ACCESS) | \ - INT_MASK(INT_IDN_ACCESS) | \ - INT_MASK(INT_UDN_ACCESS) | \ - INT_MASK(INT_IDN_REFILL) | \ - INT_MASK(INT_UDN_REFILL) | \ - INT_MASK(INT_IDN_COMPLETE) | \ - INT_MASK(INT_UDN_COMPLETE) | \ - INT_MASK(INT_SWINT_3) | \ - INT_MASK(INT_SWINT_2) | \ - INT_MASK(INT_SWINT_1) | \ - INT_MASK(INT_SWINT_0) | \ - INT_MASK(INT_UNALIGN_DATA) | \ - INT_MASK(INT_DTLB_MISS) | \ - INT_MASK(INT_DTLB_ACCESS) | \ - INT_MASK(INT_SN_STATIC_ACCESS) | \ + (1ULL << INT_ITLB_MISS) | \ + (1ULL << INT_ILL) | \ + (1ULL << INT_GPV) | \ + (1ULL << INT_SN_ACCESS) | \ + (1ULL << INT_IDN_ACCESS) | \ + (1ULL << INT_UDN_ACCESS) | \ + (1ULL << INT_IDN_REFILL) | \ + (1ULL << INT_UDN_REFILL) | \ + (1ULL << INT_IDN_COMPLETE) | \ + (1ULL << INT_UDN_COMPLETE) | \ + (1ULL << INT_SWINT_3) | \ + (1ULL << INT_SWINT_2) | \ + (1ULL << INT_SWINT_1) | \ + (1ULL << INT_SWINT_0) | \ + (1ULL << INT_UNALIGN_DATA) | \ + (1ULL << INT_DTLB_MISS) | \ + (1ULL << INT_DTLB_ACCESS) | \ + (1ULL << INT_SN_STATIC_ACCESS) | \ 0) #define NON_SYNC_INTERRUPTS ( \ - INT_MASK(INT_MEM_ERROR) | \ - INT_MASK(INT_DMATLB_MISS) | \ - INT_MASK(INT_DMATLB_ACCESS) | \ - INT_MASK(INT_SNITLB_MISS) | \ - INT_MASK(INT_SN_NOTIFY) | \ - INT_MASK(INT_SN_FIREWALL) | \ - INT_MASK(INT_IDN_FIREWALL) | \ - INT_MASK(INT_UDN_FIREWALL) | \ - INT_MASK(INT_TILE_TIMER) | \ - INT_MASK(INT_IDN_TIMER) | \ - INT_MASK(INT_UDN_TIMER) | \ - INT_MASK(INT_DMA_NOTIFY) | \ - INT_MASK(INT_IDN_CA) | \ - INT_MASK(INT_UDN_CA) | \ - INT_MASK(INT_IDN_AVAIL) | \ - INT_MASK(INT_UDN_AVAIL) | \ - INT_MASK(INT_PERF_COUNT) | \ - INT_MASK(INT_INTCTRL_3) | \ - INT_MASK(INT_INTCTRL_2) | \ - INT_MASK(INT_INTCTRL_1) | \ - INT_MASK(INT_INTCTRL_0) | \ - INT_MASK(INT_BOOT_ACCESS) | \ - INT_MASK(INT_WORLD_ACCESS) | \ - INT_MASK(INT_I_ASID) | \ - INT_MASK(INT_D_ASID) | \ - INT_MASK(INT_DMA_ASID) | \ - INT_MASK(INT_SNI_ASID) | \ - INT_MASK(INT_DMA_CPL) | \ - INT_MASK(INT_SN_CPL) | \ - INT_MASK(INT_DOUBLE_FAULT) | \ - INT_MASK(INT_AUX_PERF_COUNT) | \ + (1ULL << INT_MEM_ERROR) | \ + (1ULL << INT_DMATLB_MISS) | \ + (1ULL << INT_DMATLB_ACCESS) | \ + (1ULL << INT_SNITLB_MISS) | \ + (1ULL << INT_SN_NOTIFY) | \ + (1ULL << INT_SN_FIREWALL) | \ + (1ULL << INT_IDN_FIREWALL) | \ + (1ULL << INT_UDN_FIREWALL) | \ + (1ULL << INT_TILE_TIMER) | \ + (1ULL << INT_IDN_TIMER) | \ + (1ULL << INT_UDN_TIMER) | \ + (1ULL << INT_DMA_NOTIFY) | \ + (1ULL << INT_IDN_CA) | \ + (1ULL << INT_UDN_CA) | \ + (1ULL << INT_IDN_AVAIL) | \ + (1ULL << INT_UDN_AVAIL) | \ + (1ULL << INT_PERF_COUNT) | \ + (1ULL << INT_INTCTRL_3) | \ + (1ULL << INT_INTCTRL_2) | \ + (1ULL << INT_INTCTRL_1) | \ + (1ULL << INT_INTCTRL_0) | \ + (1ULL << INT_BOOT_ACCESS) | \ + (1ULL << INT_WORLD_ACCESS) | \ + (1ULL << INT_I_ASID) | \ + (1ULL << INT_D_ASID) | \ + (1ULL << INT_DMA_ASID) | \ + (1ULL << INT_SNI_ASID) | \ + (1ULL << INT_DMA_CPL) | \ + (1ULL << INT_SN_CPL) | \ + (1ULL << INT_DOUBLE_FAULT) | \ + (1ULL << INT_AUX_PERF_COUNT) | \ 0) #endif /* !__ASSEMBLER__ */ #endif /* !__ARCH_INTERRUPTS_H__ */ diff --git a/usr/include/arch/interrupts_64.h b/usr/include/arch/interrupts_64.h index 5bb58b2..fb3aa21 100644 --- a/usr/include/arch/interrupts_64.h +++ b/usr/include/arch/interrupts_64.h @@ -85,192 +85,192 @@ #ifndef __ASSEMBLER__ #define QUEUED_INTERRUPTS ( \ - INT_MASK(INT_MEM_ERROR) | \ - INT_MASK(INT_IDN_COMPLETE) | \ - INT_MASK(INT_UDN_COMPLETE) | \ - INT_MASK(INT_IDN_FIREWALL) | \ - INT_MASK(INT_UDN_FIREWALL) | \ - INT_MASK(INT_TILE_TIMER) | \ - INT_MASK(INT_AUX_TILE_TIMER) | \ - INT_MASK(INT_IDN_TIMER) | \ - INT_MASK(INT_UDN_TIMER) | \ - INT_MASK(INT_IDN_AVAIL) | \ - INT_MASK(INT_UDN_AVAIL) | \ - INT_MASK(INT_IPI_3) | \ - INT_MASK(INT_IPI_2) | \ - INT_MASK(INT_IPI_1) | \ - INT_MASK(INT_IPI_0) | \ - INT_MASK(INT_PERF_COUNT) | \ - INT_MASK(INT_AUX_PERF_COUNT) | \ - INT_MASK(INT_INTCTRL_3) | \ - INT_MASK(INT_INTCTRL_2) | \ - INT_MASK(INT_INTCTRL_1) | \ - INT_MASK(INT_INTCTRL_0) | \ - INT_MASK(INT_BOOT_ACCESS) | \ - INT_MASK(INT_WORLD_ACCESS) | \ - INT_MASK(INT_I_ASID) | \ - INT_MASK(INT_D_ASID) | \ - INT_MASK(INT_DOUBLE_FAULT) | \ + (1ULL << INT_MEM_ERROR) | \ + (1ULL << INT_IDN_COMPLETE) | \ + (1ULL << INT_UDN_COMPLETE) | \ + (1ULL << INT_IDN_FIREWALL) | \ + (1ULL << INT_UDN_FIREWALL) | \ + (1ULL << INT_TILE_TIMER) | \ + (1ULL << INT_AUX_TILE_TIMER) | \ + (1ULL << INT_IDN_TIMER) | \ + (1ULL << INT_UDN_TIMER) | \ + (1ULL << INT_IDN_AVAIL) | \ + (1ULL << INT_UDN_AVAIL) | \ + (1ULL << INT_IPI_3) | \ + (1ULL << INT_IPI_2) | \ + (1ULL << INT_IPI_1) | \ + (1ULL << INT_IPI_0) | \ + (1ULL << INT_PERF_COUNT) | \ + (1ULL << INT_AUX_PERF_COUNT) | \ + (1ULL << INT_INTCTRL_3) | \ + (1ULL << INT_INTCTRL_2) | \ + (1ULL << INT_INTCTRL_1) | \ + (1ULL << INT_INTCTRL_0) | \ + (1ULL << INT_BOOT_ACCESS) | \ + (1ULL << INT_WORLD_ACCESS) | \ + (1ULL << INT_I_ASID) | \ + (1ULL << INT_D_ASID) | \ + (1ULL << INT_DOUBLE_FAULT) | \ 0) #define NONQUEUED_INTERRUPTS ( \ - INT_MASK(INT_SINGLE_STEP_3) | \ - INT_MASK(INT_SINGLE_STEP_2) | \ - INT_MASK(INT_SINGLE_STEP_1) | \ - INT_MASK(INT_SINGLE_STEP_0) | \ - INT_MASK(INT_ITLB_MISS) | \ - INT_MASK(INT_ILL) | \ - INT_MASK(INT_GPV) | \ - INT_MASK(INT_IDN_ACCESS) | \ - INT_MASK(INT_UDN_ACCESS) | \ - INT_MASK(INT_SWINT_3) | \ - INT_MASK(INT_SWINT_2) | \ - INT_MASK(INT_SWINT_1) | \ - INT_MASK(INT_SWINT_0) | \ - INT_MASK(INT_ILL_TRANS) | \ - INT_MASK(INT_UNALIGN_DATA) | \ - INT_MASK(INT_DTLB_MISS) | \ - INT_MASK(INT_DTLB_ACCESS) | \ + (1ULL << INT_SINGLE_STEP_3) | \ + (1ULL << INT_SINGLE_STEP_2) | \ + (1ULL << INT_SINGLE_STEP_1) | \ + (1ULL << INT_SINGLE_STEP_0) | \ + (1ULL << INT_ITLB_MISS) | \ + (1ULL << INT_ILL) | \ + (1ULL << INT_GPV) | \ + (1ULL << INT_IDN_ACCESS) | \ + (1ULL << INT_UDN_ACCESS) | \ + (1ULL << INT_SWINT_3) | \ + (1ULL << INT_SWINT_2) | \ + (1ULL << INT_SWINT_1) | \ + (1ULL << INT_SWINT_0) | \ + (1ULL << INT_ILL_TRANS) | \ + (1ULL << INT_UNALIGN_DATA) | \ + (1ULL << INT_DTLB_MISS) | \ + (1ULL << INT_DTLB_ACCESS) | \ 0) #define CRITICAL_MASKED_INTERRUPTS ( \ - INT_MASK(INT_MEM_ERROR) | \ - INT_MASK(INT_SINGLE_STEP_3) | \ - INT_MASK(INT_SINGLE_STEP_2) | \ - INT_MASK(INT_SINGLE_STEP_1) | \ - INT_MASK(INT_SINGLE_STEP_0) | \ - INT_MASK(INT_IDN_COMPLETE) | \ - INT_MASK(INT_UDN_COMPLETE) | \ - INT_MASK(INT_IDN_FIREWALL) | \ - INT_MASK(INT_UDN_FIREWALL) | \ - INT_MASK(INT_TILE_TIMER) | \ - INT_MASK(INT_AUX_TILE_TIMER) | \ - INT_MASK(INT_IDN_TIMER) | \ - INT_MASK(INT_UDN_TIMER) | \ - INT_MASK(INT_IDN_AVAIL) | \ - INT_MASK(INT_UDN_AVAIL) | \ - INT_MASK(INT_IPI_3) | \ - INT_MASK(INT_IPI_2) | \ - INT_MASK(INT_IPI_1) | \ - INT_MASK(INT_IPI_0) | \ - INT_MASK(INT_PERF_COUNT) | \ - INT_MASK(INT_AUX_PERF_COUNT) | \ - INT_MASK(INT_INTCTRL_3) | \ - INT_MASK(INT_INTCTRL_2) | \ - INT_MASK(INT_INTCTRL_1) | \ - INT_MASK(INT_INTCTRL_0) | \ + (1ULL << INT_MEM_ERROR) | \ + (1ULL << INT_SINGLE_STEP_3) | \ + (1ULL << INT_SINGLE_STEP_2) | \ + (1ULL << INT_SINGLE_STEP_1) | \ + (1ULL << INT_SINGLE_STEP_0) | \ + (1ULL << INT_IDN_COMPLETE) | \ + (1ULL << INT_UDN_COMPLETE) | \ + (1ULL << INT_IDN_FIREWALL) | \ + (1ULL << INT_UDN_FIREWALL) | \ + (1ULL << INT_TILE_TIMER) | \ + (1ULL << INT_AUX_TILE_TIMER) | \ + (1ULL << INT_IDN_TIMER) | \ + (1ULL << INT_UDN_TIMER) | \ + (1ULL << INT_IDN_AVAIL) | \ + (1ULL << INT_UDN_AVAIL) | \ + (1ULL << INT_IPI_3) | \ + (1ULL << INT_IPI_2) | \ + (1ULL << INT_IPI_1) | \ + (1ULL << INT_IPI_0) | \ + (1ULL << INT_PERF_COUNT) | \ + (1ULL << INT_AUX_PERF_COUNT) | \ + (1ULL << INT_INTCTRL_3) | \ + (1ULL << INT_INTCTRL_2) | \ + (1ULL << INT_INTCTRL_1) | \ + (1ULL << INT_INTCTRL_0) | \ 0) #define CRITICAL_UNMASKED_INTERRUPTS ( \ - INT_MASK(INT_ITLB_MISS) | \ - INT_MASK(INT_ILL) | \ - INT_MASK(INT_GPV) | \ - INT_MASK(INT_IDN_ACCESS) | \ - INT_MASK(INT_UDN_ACCESS) | \ - INT_MASK(INT_SWINT_3) | \ - INT_MASK(INT_SWINT_2) | \ - INT_MASK(INT_SWINT_1) | \ - INT_MASK(INT_SWINT_0) | \ - INT_MASK(INT_ILL_TRANS) | \ - INT_MASK(INT_UNALIGN_DATA) | \ - INT_MASK(INT_DTLB_MISS) | \ - INT_MASK(INT_DTLB_ACCESS) | \ - INT_MASK(INT_BOOT_ACCESS) | \ - INT_MASK(INT_WORLD_ACCESS) | \ - INT_MASK(INT_I_ASID) | \ - INT_MASK(INT_D_ASID) | \ - INT_MASK(INT_DOUBLE_FAULT) | \ + (1ULL << INT_ITLB_MISS) | \ + (1ULL << INT_ILL) | \ + (1ULL << INT_GPV) | \ + (1ULL << INT_IDN_ACCESS) | \ + (1ULL << INT_UDN_ACCESS) | \ + (1ULL << INT_SWINT_3) | \ + (1ULL << INT_SWINT_2) | \ + (1ULL << INT_SWINT_1) | \ + (1ULL << INT_SWINT_0) | \ + (1ULL << INT_ILL_TRANS) | \ + (1ULL << INT_UNALIGN_DATA) | \ + (1ULL << INT_DTLB_MISS) | \ + (1ULL << INT_DTLB_ACCESS) | \ + (1ULL << INT_BOOT_ACCESS) | \ + (1ULL << INT_WORLD_ACCESS) | \ + (1ULL << INT_I_ASID) | \ + (1ULL << INT_D_ASID) | \ + (1ULL << INT_DOUBLE_FAULT) | \ 0) #define MASKABLE_INTERRUPTS ( \ - INT_MASK(INT_MEM_ERROR) | \ - INT_MASK(INT_SINGLE_STEP_3) | \ - INT_MASK(INT_SINGLE_STEP_2) | \ - INT_MASK(INT_SINGLE_STEP_1) | \ - INT_MASK(INT_SINGLE_STEP_0) | \ - INT_MASK(INT_IDN_COMPLETE) | \ - INT_MASK(INT_UDN_COMPLETE) | \ - INT_MASK(INT_IDN_FIREWALL) | \ - INT_MASK(INT_UDN_FIREWALL) | \ - INT_MASK(INT_TILE_TIMER) | \ - INT_MASK(INT_AUX_TILE_TIMER) | \ - INT_MASK(INT_IDN_TIMER) | \ - INT_MASK(INT_UDN_TIMER) | \ - INT_MASK(INT_IDN_AVAIL) | \ - INT_MASK(INT_UDN_AVAIL) | \ - INT_MASK(INT_IPI_3) | \ - INT_MASK(INT_IPI_2) | \ - INT_MASK(INT_IPI_1) | \ - INT_MASK(INT_IPI_0) | \ - INT_MASK(INT_PERF_COUNT) | \ - INT_MASK(INT_AUX_PERF_COUNT) | \ - INT_MASK(INT_INTCTRL_3) | \ - INT_MASK(INT_INTCTRL_2) | \ - INT_MASK(INT_INTCTRL_1) | \ - INT_MASK(INT_INTCTRL_0) | \ + (1ULL << INT_MEM_ERROR) | \ + (1ULL << INT_SINGLE_STEP_3) | \ + (1ULL << INT_SINGLE_STEP_2) | \ + (1ULL << INT_SINGLE_STEP_1) | \ + (1ULL << INT_SINGLE_STEP_0) | \ + (1ULL << INT_IDN_COMPLETE) | \ + (1ULL << INT_UDN_COMPLETE) | \ + (1ULL << INT_IDN_FIREWALL) | \ + (1ULL << INT_UDN_FIREWALL) | \ + (1ULL << INT_TILE_TIMER) | \ + (1ULL << INT_AUX_TILE_TIMER) | \ + (1ULL << INT_IDN_TIMER) | \ + (1ULL << INT_UDN_TIMER) | \ + (1ULL << INT_IDN_AVAIL) | \ + (1ULL << INT_UDN_AVAIL) | \ + (1ULL << INT_IPI_3) | \ + (1ULL << INT_IPI_2) | \ + (1ULL << INT_IPI_1) | \ + (1ULL << INT_IPI_0) | \ + (1ULL << INT_PERF_COUNT) | \ + (1ULL << INT_AUX_PERF_COUNT) | \ + (1ULL << INT_INTCTRL_3) | \ + (1ULL << INT_INTCTRL_2) | \ + (1ULL << INT_INTCTRL_1) | \ + (1ULL << INT_INTCTRL_0) | \ 0) #define UNMASKABLE_INTERRUPTS ( \ - INT_MASK(INT_ITLB_MISS) | \ - INT_MASK(INT_ILL) | \ - INT_MASK(INT_GPV) | \ - INT_MASK(INT_IDN_ACCESS) | \ - INT_MASK(INT_UDN_ACCESS) | \ - INT_MASK(INT_SWINT_3) | \ - INT_MASK(INT_SWINT_2) | \ - INT_MASK(INT_SWINT_1) | \ - INT_MASK(INT_SWINT_0) | \ - INT_MASK(INT_ILL_TRANS) | \ - INT_MASK(INT_UNALIGN_DATA) | \ - INT_MASK(INT_DTLB_MISS) | \ - INT_MASK(INT_DTLB_ACCESS) | \ - INT_MASK(INT_BOOT_ACCESS) | \ - INT_MASK(INT_WORLD_ACCESS) | \ - INT_MASK(INT_I_ASID) | \ - INT_MASK(INT_D_ASID) | \ - INT_MASK(INT_DOUBLE_FAULT) | \ + (1ULL << INT_ITLB_MISS) | \ + (1ULL << INT_ILL) | \ + (1ULL << INT_GPV) | \ + (1ULL << INT_IDN_ACCESS) | \ + (1ULL << INT_UDN_ACCESS) | \ + (1ULL << INT_SWINT_3) | \ + (1ULL << INT_SWINT_2) | \ + (1ULL << INT_SWINT_1) | \ + (1ULL << INT_SWINT_0) | \ + (1ULL << INT_ILL_TRANS) | \ + (1ULL << INT_UNALIGN_DATA) | \ + (1ULL << INT_DTLB_MISS) | \ + (1ULL << INT_DTLB_ACCESS) | \ + (1ULL << INT_BOOT_ACCESS) | \ + (1ULL << INT_WORLD_ACCESS) | \ + (1ULL << INT_I_ASID) | \ + (1ULL << INT_D_ASID) | \ + (1ULL << INT_DOUBLE_FAULT) | \ 0) #define SYNC_INTERRUPTS ( \ - INT_MASK(INT_SINGLE_STEP_3) | \ - INT_MASK(INT_SINGLE_STEP_2) | \ - INT_MASK(INT_SINGLE_STEP_1) | \ - INT_MASK(INT_SINGLE_STEP_0) | \ - INT_MASK(INT_IDN_COMPLETE) | \ - INT_MASK(INT_UDN_COMPLETE) | \ - INT_MASK(INT_ITLB_MISS) | \ - INT_MASK(INT_ILL) | \ - INT_MASK(INT_GPV) | \ - INT_MASK(INT_IDN_ACCESS) | \ - INT_MASK(INT_UDN_ACCESS) | \ - INT_MASK(INT_SWINT_3) | \ - INT_MASK(INT_SWINT_2) | \ - INT_MASK(INT_SWINT_1) | \ - INT_MASK(INT_SWINT_0) | \ - INT_MASK(INT_ILL_TRANS) | \ - INT_MASK(INT_UNALIGN_DATA) | \ - INT_MASK(INT_DTLB_MISS) | \ - INT_MASK(INT_DTLB_ACCESS) | \ + (1ULL << INT_SINGLE_STEP_3) | \ + (1ULL << INT_SINGLE_STEP_2) | \ + (1ULL << INT_SINGLE_STEP_1) | \ + (1ULL << INT_SINGLE_STEP_0) | \ + (1ULL << INT_IDN_COMPLETE) | \ + (1ULL << INT_UDN_COMPLETE) | \ + (1ULL << INT_ITLB_MISS) | \ + (1ULL << INT_ILL) | \ + (1ULL << INT_GPV) | \ + (1ULL << INT_IDN_ACCESS) | \ + (1ULL << INT_UDN_ACCESS) | \ + (1ULL << INT_SWINT_3) | \ + (1ULL << INT_SWINT_2) | \ + (1ULL << INT_SWINT_1) | \ + (1ULL << INT_SWINT_0) | \ + (1ULL << INT_ILL_TRANS) | \ + (1ULL << INT_UNALIGN_DATA) | \ + (1ULL << INT_DTLB_MISS) | \ + (1ULL << INT_DTLB_ACCESS) | \ 0) #define NON_SYNC_INTERRUPTS ( \ - INT_MASK(INT_MEM_ERROR) | \ - INT_MASK(INT_IDN_FIREWALL) | \ - INT_MASK(INT_UDN_FIREWALL) | \ - INT_MASK(INT_TILE_TIMER) | \ - INT_MASK(INT_AUX_TILE_TIMER) | \ - INT_MASK(INT_IDN_TIMER) | \ - INT_MASK(INT_UDN_TIMER) | \ - INT_MASK(INT_IDN_AVAIL) | \ - INT_MASK(INT_UDN_AVAIL) | \ - INT_MASK(INT_IPI_3) | \ - INT_MASK(INT_IPI_2) | \ - INT_MASK(INT_IPI_1) | \ - INT_MASK(INT_IPI_0) | \ - INT_MASK(INT_PERF_COUNT) | \ - INT_MASK(INT_AUX_PERF_COUNT) | \ - INT_MASK(INT_INTCTRL_3) | \ - INT_MASK(INT_INTCTRL_2) | \ - INT_MASK(INT_INTCTRL_1) | \ - INT_MASK(INT_INTCTRL_0) | \ - INT_MASK(INT_BOOT_ACCESS) | \ - INT_MASK(INT_WORLD_ACCESS) | \ - INT_MASK(INT_I_ASID) | \ - INT_MASK(INT_D_ASID) | \ - INT_MASK(INT_DOUBLE_FAULT) | \ + (1ULL << INT_MEM_ERROR) | \ + (1ULL << INT_IDN_FIREWALL) | \ + (1ULL << INT_UDN_FIREWALL) | \ + (1ULL << INT_TILE_TIMER) | \ + (1ULL << INT_AUX_TILE_TIMER) | \ + (1ULL << INT_IDN_TIMER) | \ + (1ULL << INT_UDN_TIMER) | \ + (1ULL << INT_IDN_AVAIL) | \ + (1ULL << INT_UDN_AVAIL) | \ + (1ULL << INT_IPI_3) | \ + (1ULL << INT_IPI_2) | \ + (1ULL << INT_IPI_1) | \ + (1ULL << INT_IPI_0) | \ + (1ULL << INT_PERF_COUNT) | \ + (1ULL << INT_AUX_PERF_COUNT) | \ + (1ULL << INT_INTCTRL_3) | \ + (1ULL << INT_INTCTRL_2) | \ + (1ULL << INT_INTCTRL_1) | \ + (1ULL << INT_INTCTRL_0) | \ + (1ULL << INT_BOOT_ACCESS) | \ + (1ULL << INT_WORLD_ACCESS) | \ + (1ULL << INT_I_ASID) | \ + (1ULL << INT_D_ASID) | \ + (1ULL << INT_DOUBLE_FAULT) | \ 0) #endif /* !__ASSEMBLER__ */ #endif /* !__ARCH_INTERRUPTS_H__ */ diff --git a/usr/include/arch/spr_def.h b/usr/include/arch/spr_def.h index f79046f..8a2f84b 100644 --- a/usr/include/arch/spr_def.h +++ b/usr/include/arch/spr_def.h @@ -12,6 +12,9 @@ * more details. */ +#ifndef __ARCH_SPR_DEF_H__ +#define __ARCH_SPR_DEF_H__ + /* Include the proper base SPR definition file. */ #ifdef __tilegx__ #include @@ -19,3 +22,5 @@ #include #endif + +#endif /* __ARCH_SPR_DEF_H__ */ diff --git a/usr/include/arch/spr_def_32.h b/usr/include/arch/spr_def_32.h index bbc1f4c..c689446 100644 --- a/usr/include/arch/spr_def_32.h +++ b/usr/include/arch/spr_def_32.h @@ -14,8 +14,8 @@ #ifndef __DOXYGEN__ -#ifndef __ARCH_SPR_DEF_H__ -#define __ARCH_SPR_DEF_H__ +#ifndef __ARCH_SPR_DEF_32_H__ +#define __ARCH_SPR_DEF_32_H__ #define SPR_AUX_PERF_COUNT_0 0x6005 #define SPR_AUX_PERF_COUNT_1 0x6006 @@ -65,6 +65,31 @@ #define SPR_EX_CONTEXT_2_1__ICS_RMASK 0x1 #define SPR_EX_CONTEXT_2_1__ICS_MASK 0x4 #define SPR_FAIL 0x4e09 +#define SPR_IDN_AVAIL_EN 0x3e05 +#define SPR_IDN_CA_DATA 0x0b00 +#define SPR_IDN_DATA_AVAIL 0x0b03 +#define SPR_IDN_DEADLOCK_TIMEOUT 0x3406 +#define SPR_IDN_DEMUX_CA_COUNT 0x0a05 +#define SPR_IDN_DEMUX_COUNT_0 0x0a06 +#define SPR_IDN_DEMUX_COUNT_1 0x0a07 +#define SPR_IDN_DEMUX_CTL 0x0a08 +#define SPR_IDN_DEMUX_QUEUE_SEL 0x0a0a +#define SPR_IDN_DEMUX_STATUS 0x0a0b +#define SPR_IDN_DEMUX_WRITE_FIFO 0x0a0c +#define SPR_IDN_DIRECTION_PROTECT 0x2e05 +#define SPR_IDN_PENDING 0x0a0e +#define SPR_IDN_REFILL_EN 0x0e05 +#define SPR_IDN_SP_FIFO_DATA 0x0a0f +#define SPR_IDN_SP_FIFO_SEL 0x0a10 +#define SPR_IDN_SP_FREEZE 0x0a11 +#define SPR_IDN_SP_FREEZE__SP_FRZ_MASK 0x1 +#define SPR_IDN_SP_FREEZE__DEMUX_FRZ_MASK 0x2 +#define SPR_IDN_SP_FREEZE__NON_DEST_EXT_MASK 0x4 +#define SPR_IDN_SP_STATE 0x0a12 +#define SPR_IDN_TAG_0 0x0a13 +#define SPR_IDN_TAG_1 0x0a14 +#define SPR_IDN_TAG_VALID 0x0a15 +#define SPR_IDN_TILE_COORD 0x0a16 #define SPR_INTCTRL_0_STATUS 0x4a07 #define SPR_INTCTRL_1_STATUS 0x4807 #define SPR_INTCTRL_2_STATUS 0x4607 @@ -87,12 +112,36 @@ #define SPR_INTERRUPT_MASK_SET_1_1 0x480e #define SPR_INTERRUPT_MASK_SET_2_0 0x460c #define SPR_INTERRUPT_MASK_SET_2_1 0x460d +#define SPR_MPL_AUX_PERF_COUNT_SET_0 0x6000 +#define SPR_MPL_AUX_PERF_COUNT_SET_1 0x6001 +#define SPR_MPL_AUX_PERF_COUNT_SET_2 0x6002 #define SPR_MPL_DMA_CPL_SET_0 0x5800 #define SPR_MPL_DMA_CPL_SET_1 0x5801 #define SPR_MPL_DMA_CPL_SET_2 0x5802 #define SPR_MPL_DMA_NOTIFY_SET_0 0x3800 #define SPR_MPL_DMA_NOTIFY_SET_1 0x3801 #define SPR_MPL_DMA_NOTIFY_SET_2 0x3802 +#define SPR_MPL_IDN_ACCESS_SET_0 0x0a00 +#define SPR_MPL_IDN_ACCESS_SET_1 0x0a01 +#define SPR_MPL_IDN_ACCESS_SET_2 0x0a02 +#define SPR_MPL_IDN_AVAIL_SET_0 0x3e00 +#define SPR_MPL_IDN_AVAIL_SET_1 0x3e01 +#define SPR_MPL_IDN_AVAIL_SET_2 0x3e02 +#define SPR_MPL_IDN_CA_SET_0 0x3a00 +#define SPR_MPL_IDN_CA_SET_1 0x3a01 +#define SPR_MPL_IDN_CA_SET_2 0x3a02 +#define SPR_MPL_IDN_COMPLETE_SET_0 0x1200 +#define SPR_MPL_IDN_COMPLETE_SET_1 0x1201 +#define SPR_MPL_IDN_COMPLETE_SET_2 0x1202 +#define SPR_MPL_IDN_FIREWALL_SET_0 0x2e00 +#define SPR_MPL_IDN_FIREWALL_SET_1 0x2e01 +#define SPR_MPL_IDN_FIREWALL_SET_2 0x2e02 +#define SPR_MPL_IDN_REFILL_SET_0 0x0e00 +#define SPR_MPL_IDN_REFILL_SET_1 0x0e01 +#define SPR_MPL_IDN_REFILL_SET_2 0x0e02 +#define SPR_MPL_IDN_TIMER_SET_0 0x3400 +#define SPR_MPL_IDN_TIMER_SET_1 0x3401 +#define SPR_MPL_IDN_TIMER_SET_2 0x3402 #define SPR_MPL_INTCTRL_0_SET_0 0x4a00 #define SPR_MPL_INTCTRL_0_SET_1 0x4a01 #define SPR_MPL_INTCTRL_0_SET_2 0x4a02 @@ -102,6 +151,9 @@ #define SPR_MPL_INTCTRL_2_SET_0 0x4600 #define SPR_MPL_INTCTRL_2_SET_1 0x4601 #define SPR_MPL_INTCTRL_2_SET_2 0x4602 +#define SPR_MPL_PERF_COUNT_SET_0 0x4200 +#define SPR_MPL_PERF_COUNT_SET_1 0x4201 +#define SPR_MPL_PERF_COUNT_SET_2 0x4202 #define SPR_MPL_SN_ACCESS_SET_0 0x0800 #define SPR_MPL_SN_ACCESS_SET_1 0x0801 #define SPR_MPL_SN_ACCESS_SET_2 0x0802 @@ -181,6 +233,7 @@ #define SPR_UDN_DEMUX_STATUS 0x0c0d #define SPR_UDN_DEMUX_WRITE_FIFO 0x0c0e #define SPR_UDN_DIRECTION_PROTECT 0x3005 +#define SPR_UDN_PENDING 0x0c10 #define SPR_UDN_REFILL_EN 0x1005 #define SPR_UDN_SP_FIFO_DATA 0x0c11 #define SPR_UDN_SP_FIFO_SEL 0x0c12 @@ -195,7 +248,10 @@ #define SPR_UDN_TAG_3 0x0c18 #define SPR_UDN_TAG_VALID 0x0c19 #define SPR_UDN_TILE_COORD 0x0c1a +#define SPR_WATCH_CTL 0x4209 +#define SPR_WATCH_MASK 0x420a +#define SPR_WATCH_VAL 0x420b -#endif /* !defined(__ARCH_SPR_DEF_H__) */ +#endif /* !defined(__ARCH_SPR_DEF_32_H__) */ #endif /* !defined(__DOXYGEN__) */ diff --git a/usr/include/arch/spr_def_64.h b/usr/include/arch/spr_def_64.h index cd3e5f9..67a6c17 100644 --- a/usr/include/arch/spr_def_64.h +++ b/usr/include/arch/spr_def_64.h @@ -14,8 +14,8 @@ #ifndef __DOXYGEN__ -#ifndef __ARCH_SPR_DEF_H__ -#define __ARCH_SPR_DEF_H__ +#ifndef __ARCH_SPR_DEF_64_H__ +#define __ARCH_SPR_DEF_64_H__ #define SPR_AUX_PERF_COUNT_0 0x2105 #define SPR_AUX_PERF_COUNT_1 0x2106 @@ -52,6 +52,13 @@ #define SPR_EX_CONTEXT_2_1__ICS_RMASK 0x1 #define SPR_EX_CONTEXT_2_1__ICS_MASK 0x4 #define SPR_FAIL 0x2707 +#define SPR_IDN_AVAIL_EN 0x1a05 +#define SPR_IDN_DATA_AVAIL 0x0a80 +#define SPR_IDN_DEADLOCK_TIMEOUT 0x1806 +#define SPR_IDN_DEMUX_COUNT_0 0x0a05 +#define SPR_IDN_DEMUX_COUNT_1 0x0a06 +#define SPR_IDN_DIRECTION_PROTECT 0x1405 +#define SPR_IDN_PENDING 0x0a08 #define SPR_ILL_TRANS_REASON__I_STREAM_VA_RMASK 0x1 #define SPR_INTCTRL_0_STATUS 0x2505 #define SPR_INTCTRL_1_STATUS 0x2405 @@ -88,9 +95,27 @@ #define SPR_IPI_MASK_SET_0 0x1f0a #define SPR_IPI_MASK_SET_1 0x1e0a #define SPR_IPI_MASK_SET_2 0x1d0a +#define SPR_MPL_AUX_PERF_COUNT_SET_0 0x2100 +#define SPR_MPL_AUX_PERF_COUNT_SET_1 0x2101 +#define SPR_MPL_AUX_PERF_COUNT_SET_2 0x2102 #define SPR_MPL_AUX_TILE_TIMER_SET_0 0x1700 #define SPR_MPL_AUX_TILE_TIMER_SET_1 0x1701 #define SPR_MPL_AUX_TILE_TIMER_SET_2 0x1702 +#define SPR_MPL_IDN_ACCESS_SET_0 0x0a00 +#define SPR_MPL_IDN_ACCESS_SET_1 0x0a01 +#define SPR_MPL_IDN_ACCESS_SET_2 0x0a02 +#define SPR_MPL_IDN_AVAIL_SET_0 0x1a00 +#define SPR_MPL_IDN_AVAIL_SET_1 0x1a01 +#define SPR_MPL_IDN_AVAIL_SET_2 0x1a02 +#define SPR_MPL_IDN_COMPLETE_SET_0 0x0500 +#define SPR_MPL_IDN_COMPLETE_SET_1 0x0501 +#define SPR_MPL_IDN_COMPLETE_SET_2 0x0502 +#define SPR_MPL_IDN_FIREWALL_SET_0 0x1400 +#define SPR_MPL_IDN_FIREWALL_SET_1 0x1401 +#define SPR_MPL_IDN_FIREWALL_SET_2 0x1402 +#define SPR_MPL_IDN_TIMER_SET_0 0x1800 +#define SPR_MPL_IDN_TIMER_SET_1 0x1801 +#define SPR_MPL_IDN_TIMER_SET_2 0x1802 #define SPR_MPL_INTCTRL_0_SET_0 0x2500 #define SPR_MPL_INTCTRL_0_SET_1 0x2501 #define SPR_MPL_INTCTRL_0_SET_2 0x2502 @@ -100,6 +125,21 @@ #define SPR_MPL_INTCTRL_2_SET_0 0x2300 #define SPR_MPL_INTCTRL_2_SET_1 0x2301 #define SPR_MPL_INTCTRL_2_SET_2 0x2302 +#define SPR_MPL_IPI_0 0x1f04 +#define SPR_MPL_IPI_0_SET_0 0x1f00 +#define SPR_MPL_IPI_0_SET_1 0x1f01 +#define SPR_MPL_IPI_0_SET_2 0x1f02 +#define SPR_MPL_IPI_1 0x1e04 +#define SPR_MPL_IPI_1_SET_0 0x1e00 +#define SPR_MPL_IPI_1_SET_1 0x1e01 +#define SPR_MPL_IPI_1_SET_2 0x1e02 +#define SPR_MPL_IPI_2 0x1d04 +#define SPR_MPL_IPI_2_SET_0 0x1d00 +#define SPR_MPL_IPI_2_SET_1 0x1d01 +#define SPR_MPL_IPI_2_SET_2 0x1d02 +#define SPR_MPL_PERF_COUNT_SET_0 0x2000 +#define SPR_MPL_PERF_COUNT_SET_1 0x2001 +#define SPR_MPL_PERF_COUNT_SET_2 0x2002 #define SPR_MPL_UDN_ACCESS_SET_0 0x0b00 #define SPR_MPL_UDN_ACCESS_SET_1 0x0b01 #define SPR_MPL_UDN_ACCESS_SET_2 0x0b02 @@ -167,7 +207,10 @@ #define SPR_UDN_DEMUX_COUNT_2 0x0b07 #define SPR_UDN_DEMUX_COUNT_3 0x0b08 #define SPR_UDN_DIRECTION_PROTECT 0x1505 +#define SPR_UDN_PENDING 0x0b0a +#define SPR_WATCH_MASK 0x200a +#define SPR_WATCH_VAL 0x200b -#endif /* !defined(__ARCH_SPR_DEF_H__) */ +#endif /* !defined(__ARCH_SPR_DEF_64_H__) */ #endif /* !defined(__DOXYGEN__) */ diff --git a/usr/include/asm-arc/auxvec.h b/usr/include/asm-arc/auxvec.h new file mode 100644 index 0000000..41fa68b --- /dev/null +++ b/usr/include/asm-arc/auxvec.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arc/bitsperlong.h b/usr/include/asm-arc/bitsperlong.h new file mode 100644 index 0000000..6dc0bb0 --- /dev/null +++ b/usr/include/asm-arc/bitsperlong.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arc/byteorder.h b/usr/include/asm-arc/byteorder.h new file mode 100644 index 0000000..9da71d4 --- /dev/null +++ b/usr/include/asm-arc/byteorder.h @@ -0,0 +1,18 @@ +/* + * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __ASM_ARC_BYTEORDER_H +#define __ASM_ARC_BYTEORDER_H + +#ifdef CONFIG_CPU_BIG_ENDIAN +#include +#else +#include +#endif + +#endif /* ASM_ARC_BYTEORDER_H */ diff --git a/usr/include/asm-arc/cachectl.h b/usr/include/asm-arc/cachectl.h new file mode 100644 index 0000000..51c73f0 --- /dev/null +++ b/usr/include/asm-arc/cachectl.h @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __ARC_ASM_CACHECTL_H +#define __ARC_ASM_CACHECTL_H + +/* + * ARC ABI flags defined for Android's finegrained cacheflush requirements + */ +#define CF_I_INV 0x0002 +#define CF_D_FLUSH 0x0010 +#define CF_D_FLUSH_INV 0x0020 + +#define CF_DEFAULT (CF_I_INV | CF_D_FLUSH) + +/* + * Standard flags expected by cacheflush system call users + */ +#define ICACHE CF_I_INV +#define DCACHE CF_D_FLUSH +#define BCACHE (CF_I_INV | CF_D_FLUSH) + +#endif diff --git a/usr/include/asm-arc/elf.h b/usr/include/asm-arc/elf.h new file mode 100644 index 0000000..a071815 --- /dev/null +++ b/usr/include/asm-arc/elf.h @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __ASM_ARC_ELF_H +#define __ASM_ARC_ELF_H + +#include /* for user_regs_struct */ + +/* Machine specific ELF Hdr flags */ +#define EF_ARC_OSABI_MSK 0x00000f00 +#define EF_ARC_OSABI_ORIG 0x00000000 /* MUST be zero for back-compat */ +#define EF_ARC_OSABI_CURRENT 0x00000300 /* v3 (no legacy syscalls) */ + +typedef unsigned long elf_greg_t; +typedef unsigned long elf_fpregset_t; + +#define ELF_NGREG (sizeof(struct user_regs_struct) / sizeof(elf_greg_t)) + +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; + +#endif diff --git a/usr/include/asm-arc/errno.h b/usr/include/asm-arc/errno.h new file mode 100644 index 0000000..4c82b50 --- /dev/null +++ b/usr/include/asm-arc/errno.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arc/fcntl.h b/usr/include/asm-arc/fcntl.h new file mode 100644 index 0000000..46ab12d --- /dev/null +++ b/usr/include/asm-arc/fcntl.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arc/ioctl.h b/usr/include/asm-arc/ioctl.h new file mode 100644 index 0000000..b279fe0 --- /dev/null +++ b/usr/include/asm-arc/ioctl.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arc/ioctls.h b/usr/include/asm-arc/ioctls.h new file mode 100644 index 0000000..ec34c76 --- /dev/null +++ b/usr/include/asm-arc/ioctls.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arc/ipcbuf.h b/usr/include/asm-arc/ipcbuf.h new file mode 100644 index 0000000..84c7e51 --- /dev/null +++ b/usr/include/asm-arc/ipcbuf.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arc/mman.h b/usr/include/asm-arc/mman.h new file mode 100644 index 0000000..8eebf89 --- /dev/null +++ b/usr/include/asm-arc/mman.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arc/msgbuf.h b/usr/include/asm-arc/msgbuf.h new file mode 100644 index 0000000..809134c --- /dev/null +++ b/usr/include/asm-arc/msgbuf.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arc/page.h b/usr/include/asm-arc/page.h new file mode 100644 index 0000000..2432963 --- /dev/null +++ b/usr/include/asm-arc/page.h @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __ASM_ARC_PAGE_H +#define __ASM_ARC_PAGE_H + +/* PAGE_SHIFT determines the page size */ +#if defined(CONFIG_ARC_PAGE_SIZE_16K) +#define PAGE_SHIFT 14 +#elif defined(CONFIG_ARC_PAGE_SIZE_4K) +#define PAGE_SHIFT 12 +#else +/* + * Default 8k + * done this way (instead of under CONFIG_ARC_PAGE_SIZE_8K) because adhoc + * user code (busybox appletlib.h) expects PAGE_SHIFT to be defined w/o + * using the correct uClibc header and in their build our autoconf.h is + * not available + */ +#define PAGE_SHIFT 13 +#endif + +#ifdef __ASSEMBLY__ +#define PAGE_SIZE (1 << PAGE_SHIFT) +#define PAGE_OFFSET (0x80000000) +#else +#define PAGE_SIZE (1UL << PAGE_SHIFT) /* Default 8K */ +#define PAGE_OFFSET (0x80000000UL) /* Kernel starts at 2G onwards */ +#endif + +#define PAGE_MASK (~(PAGE_SIZE-1)) + + +#endif /* __ASM_ARC_PAGE_H */ diff --git a/usr/include/asm-arc/param.h b/usr/include/asm-arc/param.h new file mode 100644 index 0000000..965d454 --- /dev/null +++ b/usr/include/asm-arc/param.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arc/poll.h b/usr/include/asm-arc/poll.h new file mode 100644 index 0000000..c98509d --- /dev/null +++ b/usr/include/asm-arc/poll.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arc/posix_types.h b/usr/include/asm-arc/posix_types.h new file mode 100644 index 0000000..22cae62 --- /dev/null +++ b/usr/include/asm-arc/posix_types.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arc/ptrace.h b/usr/include/asm-arc/ptrace.h new file mode 100644 index 0000000..9f257d7 --- /dev/null +++ b/usr/include/asm-arc/ptrace.h @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Amit Bhor, Sameer Dhavale: Codito Technologies 2004 + */ + +#ifndef __ASM_ARC_PTRACE_H +#define __ASM_ARC_PTRACE_H + + +#ifndef __ASSEMBLY__ +/* + * Userspace ABI: Register state needed by + * -ptrace (gdbserver) + * -sigcontext (SA_SIGNINFO signal frame) + * + * This is to decouple pt_regs from user-space ABI, to be able to change it + * w/o affecting the ABI. + * Although the layout (initial padding) is similar to pt_regs to have some + * optimizations when copying pt_regs to/from user_regs_struct. + * + * Also, sigcontext only care about the scratch regs as that is what we really + * save/restore for signal handling. +*/ +struct user_regs_struct { + + struct { + long pad; + long bta, lp_start, lp_end, lp_count; + long status32, ret, blink, fp, gp; + long r12, r11, r10, r9, r8, r7, r6, r5, r4, r3, r2, r1, r0; + long sp; + } scratch; + struct { + long pad; + long r25, r24, r23, r22, r21, r20; + long r19, r18, r17, r16, r15, r14, r13; + } callee; + long efa; /* break pt addr, for break points in delay slots */ + long stop_pc; /* give dbg stop_pc directly after checking orig_r8 */ +}; +#endif /* !__ASSEMBLY__ */ + +#endif /* __ASM_ARC_PTRACE_H */ diff --git a/usr/include/asm-arc/resource.h b/usr/include/asm-arc/resource.h new file mode 100644 index 0000000..04bc4db --- /dev/null +++ b/usr/include/asm-arc/resource.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arc/sembuf.h b/usr/include/asm-arc/sembuf.h new file mode 100644 index 0000000..7673b83 --- /dev/null +++ b/usr/include/asm-arc/sembuf.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arc/setup.h b/usr/include/asm-arc/setup.h new file mode 100644 index 0000000..a6d4e44 --- /dev/null +++ b/usr/include/asm-arc/setup.h @@ -0,0 +1,6 @@ +/* + * setup.h is part of userspace header ABI so UAPI scripts have to generate it + * even if there's nothing to export - causing empty + * However to prevent "patch" from discarding it we add this placeholder + * comment + */ diff --git a/usr/include/asm-arc/shmbuf.h b/usr/include/asm-arc/shmbuf.h new file mode 100644 index 0000000..83c05fc --- /dev/null +++ b/usr/include/asm-arc/shmbuf.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arc/sigcontext.h b/usr/include/asm-arc/sigcontext.h new file mode 100644 index 0000000..9678a11 --- /dev/null +++ b/usr/include/asm-arc/sigcontext.h @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef _ASM_ARC_SIGCONTEXT_H +#define _ASM_ARC_SIGCONTEXT_H + +#include + +/* + * Signal context structure - contains all info to do with the state + * before the signal handler was invoked. + */ +struct sigcontext { + struct user_regs_struct regs; +}; + +#endif /* _ASM_ARC_SIGCONTEXT_H */ diff --git a/usr/include/asm-arc/siginfo.h b/usr/include/asm-arc/siginfo.h new file mode 100644 index 0000000..0815d29 --- /dev/null +++ b/usr/include/asm-arc/siginfo.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arc/signal.h b/usr/include/asm-arc/signal.h new file mode 100644 index 0000000..fad62f7 --- /dev/null +++ b/usr/include/asm-arc/signal.h @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Amit Bhor, Sameer Dhavale: Codito Technologies 2004 + */ + +#ifndef _ASM_ARC_SIGNAL_H +#define _ASM_ARC_SIGNAL_H + +/* + * This is much needed for ARC sigreturn optimization. + * This allows uClibc to piggback the addr of a sigreturn stub in sigaction, + * which allows sigreturn based re-entry into kernel after handling signal. + * W/o this kernel needs to "synthesize" the sigreturn trampoline on user + * mode stack which in turn forces the following: + * -TLB Flush (after making the stack page executable) + * -Cache line Flush (to make I/D Cache lines coherent) + */ +#define SA_RESTORER 0x04000000 + +#include + +#endif /* _ASM_ARC_SIGNAL_H */ diff --git a/usr/include/asm-arc/socket.h b/usr/include/asm-arc/socket.h new file mode 100644 index 0000000..6b71384 --- /dev/null +++ b/usr/include/asm-arc/socket.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arc/sockios.h b/usr/include/asm-arc/sockios.h new file mode 100644 index 0000000..def6d47 --- /dev/null +++ b/usr/include/asm-arc/sockios.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arc/stat.h b/usr/include/asm-arc/stat.h new file mode 100644 index 0000000..3dc90fa --- /dev/null +++ b/usr/include/asm-arc/stat.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arc/statfs.h b/usr/include/asm-arc/statfs.h new file mode 100644 index 0000000..0b91fe1 --- /dev/null +++ b/usr/include/asm-arc/statfs.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arc/swab.h b/usr/include/asm-arc/swab.h new file mode 100644 index 0000000..095599a --- /dev/null +++ b/usr/include/asm-arc/swab.h @@ -0,0 +1,98 @@ +/* + * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * vineetg: May 2011 + * -Support single cycle endian-swap insn in ARC700 4.10 + * + * vineetg: June 2009 + * -Better htonl implementation (5 instead of 9 ALU instructions) + * -Hardware assisted single cycle bswap (Use Case of ARC custom instrn) + */ + +#ifndef __ASM_ARC_SWAB_H +#define __ASM_ARC_SWAB_H + +#include + +/* Native single cycle endian swap insn */ +#ifdef CONFIG_ARC_HAS_SWAPE + +#define __arch_swab32(x) \ +({ \ + unsigned int tmp = x; \ + __asm__( \ + " swape %0, %1 \n" \ + : "=r" (tmp) \ + : "r" (tmp)); \ + tmp; \ +}) + +#else + +/* Several ways of Endian-Swap Emulation for ARC + * 0: kernel generic + * 1: ARC optimised "C" + * 2: ARC Custom instruction + */ +#define ARC_BSWAP_TYPE 1 + +#if (ARC_BSWAP_TYPE == 1) /******* Software only ********/ + +/* The kernel default implementation of htonl is + * return x<<24 | x>>24 | + * (x & (__u32)0x0000ff00UL)<<8 | (x & (__u32)0x00ff0000UL)>>8; + * + * This generates 9 instructions on ARC (excluding the ld/st) + * + * 8051fd8c: ld r3,[r7,20] ; Mem op : Get the value to be swapped + * 8051fd98: asl r5,r3,24 ; get 3rd Byte + * 8051fd9c: lsr r2,r3,24 ; get 0th Byte + * 8051fda0: and r4,r3,0xff00 + * 8051fda8: asl r4,r4,8 ; get 1st Byte + * 8051fdac: and r3,r3,0x00ff0000 + * 8051fdb4: or r2,r2,r5 ; combine 0th and 3rd Bytes + * 8051fdb8: lsr r3,r3,8 ; 2nd Byte at correct place in Dst Reg + * 8051fdbc: or r2,r2,r4 ; combine 0,3 Bytes with 1st Byte + * 8051fdc0: or r2,r2,r3 ; combine 0,3,1 Bytes with 2nd Byte + * 8051fdc4: st r2,[r1,20] ; Mem op : save result back to mem + * + * Joern suggested a better "C" algorithm which is great since + * (1) It is portable to any architecure + * (2) At the same time it takes advantage of ARC ISA (rotate intrns) + */ + +#define __arch_swab32(x) \ +({ unsigned long __in = (x), __tmp; \ + __tmp = __in << 8 | __in >> 24; /* ror tmp,in,24 */ \ + __in = __in << 24 | __in >> 8; /* ror in,in,8 */ \ + __tmp ^= __in; \ + __tmp &= 0xff00ff; \ + __tmp ^ __in; \ +}) + +#elif (ARC_BSWAP_TYPE == 2) /* Custom single cycle bwap instruction */ + +#define __arch_swab32(x) \ +({ \ + unsigned int tmp = x; \ + __asm__( \ + " .extInstruction bswap, 7, 0x00, SUFFIX_NONE, SYNTAX_2OP \n"\ + " bswap %0, %1 \n"\ + : "=r" (tmp) \ + : "r" (tmp)); \ + tmp; \ +}) + +#endif /* ARC_BSWAP_TYPE=zzz */ + +#endif /* CONFIG_ARC_HAS_SWAPE */ + +#if !defined(__STRICT_ANSI__) || defined(__KERNEL__) +#define __SWAB_64_THRU_32__ +#endif + +#endif diff --git a/usr/include/asm-arc/termbits.h b/usr/include/asm-arc/termbits.h new file mode 100644 index 0000000..3935b10 --- /dev/null +++ b/usr/include/asm-arc/termbits.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arc/termios.h b/usr/include/asm-arc/termios.h new file mode 100644 index 0000000..280d78a --- /dev/null +++ b/usr/include/asm-arc/termios.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arc/types.h b/usr/include/asm-arc/types.h new file mode 100644 index 0000000..b9e79bc --- /dev/null +++ b/usr/include/asm-arc/types.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arc/unistd.h b/usr/include/asm-arc/unistd.h new file mode 100644 index 0000000..6f30484 --- /dev/null +++ b/usr/include/asm-arc/unistd.h @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +/******** no-legacy-syscalls-ABI *******/ + +#define __ARCH_WANT_SYS_EXECVE +#define __ARCH_WANT_SYS_CLONE +#define __ARCH_WANT_SYS_VFORK +#define __ARCH_WANT_SYS_FORK + +#define sys_mmap2 sys_mmap_pgoff + +#include + +#define NR_syscalls __NR_syscalls + +/* ARC specific syscall */ +#define __NR_cacheflush (__NR_arch_specific_syscall + 0) +#define __NR_arc_settls (__NR_arch_specific_syscall + 1) +#define __NR_arc_gettls (__NR_arch_specific_syscall + 2) + +__SYSCALL(__NR_cacheflush, sys_cacheflush) +__SYSCALL(__NR_arc_settls, sys_arc_settls) +__SYSCALL(__NR_arc_gettls, sys_arc_gettls) + + +/* Generic syscall (fs/filesystems.c - lost in asm-generic/unistd.h */ +#define __NR_sysfs (__NR_arch_specific_syscall + 3) +__SYSCALL(__NR_sysfs, sys_sysfs) diff --git a/usr/include/asm-arm/hwcap.h b/usr/include/asm-arm/hwcap.h index 94cce52..da85060 100644 --- a/usr/include/asm-arm/hwcap.h +++ b/usr/include/asm-arm/hwcap.h @@ -18,12 +18,13 @@ #define HWCAP_THUMBEE (1 << 11) #define HWCAP_NEON (1 << 12) #define HWCAP_VFPv3 (1 << 13) -#define HWCAP_VFPv3D16 (1 << 14) +#define HWCAP_VFPv3D16 (1 << 14) /* also set for VFPv4-D16 */ #define HWCAP_TLS (1 << 15) #define HWCAP_VFPv4 (1 << 16) #define HWCAP_IDIVA (1 << 17) #define HWCAP_IDIVT (1 << 18) +#define HWCAP_VFPD32 (1 << 19) /* set if VFP has 32 regs (not 16) */ #define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT) -#endif +#endif /* __ASMARM_HWCAP_H */ diff --git a/usr/include/asm-arm/kvm.h b/usr/include/asm-arm/kvm.h new file mode 100644 index 0000000..c1ee007 --- /dev/null +++ b/usr/include/asm-arm/kvm.h @@ -0,0 +1,180 @@ +/* + * Copyright (C) 2012 - Virtual Open Systems and Columbia University + * Author: Christoffer Dall + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License, version 2, as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __ARM_KVM_H__ +#define __ARM_KVM_H__ + +#include +#include + +#define __KVM_HAVE_GUEST_DEBUG +#define __KVM_HAVE_IRQ_LINE + +#define KVM_REG_SIZE(id) \ + (1U << (((id) & KVM_REG_SIZE_MASK) >> KVM_REG_SIZE_SHIFT)) + +/* Valid for svc_regs, abt_regs, und_regs, irq_regs in struct kvm_regs */ +#define KVM_ARM_SVC_sp svc_regs[0] +#define KVM_ARM_SVC_lr svc_regs[1] +#define KVM_ARM_SVC_spsr svc_regs[2] +#define KVM_ARM_ABT_sp abt_regs[0] +#define KVM_ARM_ABT_lr abt_regs[1] +#define KVM_ARM_ABT_spsr abt_regs[2] +#define KVM_ARM_UND_sp und_regs[0] +#define KVM_ARM_UND_lr und_regs[1] +#define KVM_ARM_UND_spsr und_regs[2] +#define KVM_ARM_IRQ_sp irq_regs[0] +#define KVM_ARM_IRQ_lr irq_regs[1] +#define KVM_ARM_IRQ_spsr irq_regs[2] + +/* Valid only for fiq_regs in struct kvm_regs */ +#define KVM_ARM_FIQ_r8 fiq_regs[0] +#define KVM_ARM_FIQ_r9 fiq_regs[1] +#define KVM_ARM_FIQ_r10 fiq_regs[2] +#define KVM_ARM_FIQ_fp fiq_regs[3] +#define KVM_ARM_FIQ_ip fiq_regs[4] +#define KVM_ARM_FIQ_sp fiq_regs[5] +#define KVM_ARM_FIQ_lr fiq_regs[6] +#define KVM_ARM_FIQ_spsr fiq_regs[7] + +struct kvm_regs { + struct pt_regs usr_regs; /* R0_usr - R14_usr, PC, CPSR */ + unsigned long svc_regs[3]; /* SP_svc, LR_svc, SPSR_svc */ + unsigned long abt_regs[3]; /* SP_abt, LR_abt, SPSR_abt */ + unsigned long und_regs[3]; /* SP_und, LR_und, SPSR_und */ + unsigned long irq_regs[3]; /* SP_irq, LR_irq, SPSR_irq */ + unsigned long fiq_regs[8]; /* R8_fiq - R14_fiq, SPSR_fiq */ +}; + +/* Supported Processor Types */ +#define KVM_ARM_TARGET_CORTEX_A15 0 +#define KVM_ARM_NUM_TARGETS 1 + +/* KVM_ARM_SET_DEVICE_ADDR ioctl id encoding */ +#define KVM_ARM_DEVICE_TYPE_SHIFT 0 +#define KVM_ARM_DEVICE_TYPE_MASK (0xffff << KVM_ARM_DEVICE_TYPE_SHIFT) +#define KVM_ARM_DEVICE_ID_SHIFT 16 +#define KVM_ARM_DEVICE_ID_MASK (0xffff << KVM_ARM_DEVICE_ID_SHIFT) + +/* Supported device IDs */ +#define KVM_ARM_DEVICE_VGIC_V2 0 + +/* Supported VGIC address types */ +#define KVM_VGIC_V2_ADDR_TYPE_DIST 0 +#define KVM_VGIC_V2_ADDR_TYPE_CPU 1 + +#define KVM_VGIC_V2_DIST_SIZE 0x1000 +#define KVM_VGIC_V2_CPU_SIZE 0x2000 + +#define KVM_ARM_VCPU_POWER_OFF 0 /* CPU is started in OFF state */ + +struct kvm_vcpu_init { + __u32 target; + __u32 features[7]; +}; + +struct kvm_sregs { +}; + +struct kvm_fpu { +}; + +struct kvm_guest_debug_arch { +}; + +struct kvm_debug_exit_arch { +}; + +struct kvm_sync_regs { +}; + +struct kvm_arch_memory_slot { +}; + +/* If you need to interpret the index values, here is the key: */ +#define KVM_REG_ARM_COPROC_MASK 0x000000000FFF0000 +#define KVM_REG_ARM_COPROC_SHIFT 16 +#define KVM_REG_ARM_32_OPC2_MASK 0x0000000000000007 +#define KVM_REG_ARM_32_OPC2_SHIFT 0 +#define KVM_REG_ARM_OPC1_MASK 0x0000000000000078 +#define KVM_REG_ARM_OPC1_SHIFT 3 +#define KVM_REG_ARM_CRM_MASK 0x0000000000000780 +#define KVM_REG_ARM_CRM_SHIFT 7 +#define KVM_REG_ARM_32_CRN_MASK 0x0000000000007800 +#define KVM_REG_ARM_32_CRN_SHIFT 11 + +/* Normal registers are mapped as coprocessor 16. */ +#define KVM_REG_ARM_CORE (0x0010 << KVM_REG_ARM_COPROC_SHIFT) +#define KVM_REG_ARM_CORE_REG(name) (offsetof(struct kvm_regs, name) / 4) + +/* Some registers need more space to represent values. */ +#define KVM_REG_ARM_DEMUX (0x0011 << KVM_REG_ARM_COPROC_SHIFT) +#define KVM_REG_ARM_DEMUX_ID_MASK 0x000000000000FF00 +#define KVM_REG_ARM_DEMUX_ID_SHIFT 8 +#define KVM_REG_ARM_DEMUX_ID_CCSIDR (0x00 << KVM_REG_ARM_DEMUX_ID_SHIFT) +#define KVM_REG_ARM_DEMUX_VAL_MASK 0x00000000000000FF +#define KVM_REG_ARM_DEMUX_VAL_SHIFT 0 + +/* VFP registers: we could overload CP10 like ARM does, but that's ugly. */ +#define KVM_REG_ARM_VFP (0x0012 << KVM_REG_ARM_COPROC_SHIFT) +#define KVM_REG_ARM_VFP_MASK 0x000000000000FFFF +#define KVM_REG_ARM_VFP_BASE_REG 0x0 +#define KVM_REG_ARM_VFP_FPSID 0x1000 +#define KVM_REG_ARM_VFP_FPSCR 0x1001 +#define KVM_REG_ARM_VFP_MVFR1 0x1006 +#define KVM_REG_ARM_VFP_MVFR0 0x1007 +#define KVM_REG_ARM_VFP_FPEXC 0x1008 +#define KVM_REG_ARM_VFP_FPINST 0x1009 +#define KVM_REG_ARM_VFP_FPINST2 0x100A + + +/* KVM_IRQ_LINE irq field index values */ +#define KVM_ARM_IRQ_TYPE_SHIFT 24 +#define KVM_ARM_IRQ_TYPE_MASK 0xff +#define KVM_ARM_IRQ_VCPU_SHIFT 16 +#define KVM_ARM_IRQ_VCPU_MASK 0xff +#define KVM_ARM_IRQ_NUM_SHIFT 0 +#define KVM_ARM_IRQ_NUM_MASK 0xffff + +/* irq_type field */ +#define KVM_ARM_IRQ_TYPE_CPU 0 +#define KVM_ARM_IRQ_TYPE_SPI 1 +#define KVM_ARM_IRQ_TYPE_PPI 2 + +/* out-of-kernel GIC cpu interrupt injection irq_number field */ +#define KVM_ARM_IRQ_CPU_IRQ 0 +#define KVM_ARM_IRQ_CPU_FIQ 1 + +/* Highest supported SPI, from VGIC_NR_IRQS */ +#define KVM_ARM_IRQ_GIC_MAX 127 + +/* PSCI interface */ +#define KVM_PSCI_FN_BASE 0x95c1ba5e +#define KVM_PSCI_FN(n) (KVM_PSCI_FN_BASE + (n)) + +#define KVM_PSCI_FN_CPU_SUSPEND KVM_PSCI_FN(0) +#define KVM_PSCI_FN_CPU_OFF KVM_PSCI_FN(1) +#define KVM_PSCI_FN_CPU_ON KVM_PSCI_FN(2) +#define KVM_PSCI_FN_MIGRATE KVM_PSCI_FN(3) + +#define KVM_PSCI_RET_SUCCESS 0 +#define KVM_PSCI_RET_NI ((unsigned long)-1) +#define KVM_PSCI_RET_INVAL ((unsigned long)-2) +#define KVM_PSCI_RET_DENIED ((unsigned long)-3) + +#endif /* __ARM_KVM_H__ */ diff --git a/usr/include/asm-arm/kvm_para.h b/usr/include/asm-arm/kvm_para.h new file mode 100644 index 0000000..14fab8f --- /dev/null +++ b/usr/include/asm-arm/kvm_para.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arm/msgbuf.h b/usr/include/asm-arm/msgbuf.h index 33b35b9..809134c 100644 --- a/usr/include/asm-arm/msgbuf.h +++ b/usr/include/asm-arm/msgbuf.h @@ -1,31 +1 @@ -#ifndef _ASMARM_MSGBUF_H -#define _ASMARM_MSGBUF_H - -/* - * The msqid64_ds structure for arm architecture. - * Note extra padding because this structure is passed back and forth - * between kernel and user space. - * - * Pad space is left for: - * - 64-bit time_t to solve y2038 problem - * - 2 miscellaneous 32-bit values - */ - -struct msqid64_ds { - struct ipc64_perm msg_perm; - __kernel_time_t msg_stime; /* last msgsnd time */ - unsigned long __unused1; - __kernel_time_t msg_rtime; /* last msgrcv time */ - unsigned long __unused2; - __kernel_time_t msg_ctime; /* last change time */ - unsigned long __unused3; - unsigned long msg_cbytes; /* current number of bytes on queue */ - unsigned long msg_qnum; /* number of messages in queue */ - unsigned long msg_qbytes; /* max number of bytes on queue */ - __kernel_pid_t msg_lspid; /* pid of last msgsnd */ - __kernel_pid_t msg_lrpid; /* last receive pid */ - unsigned long __unused4; - unsigned long __unused5; -}; - -#endif /* _ASMARM_MSGBUF_H */ +#include diff --git a/usr/include/asm-arm/param.h b/usr/include/asm-arm/param.h index f6e43dd..965d454 100644 --- a/usr/include/asm-arm/param.h +++ b/usr/include/asm-arm/param.h @@ -1,25 +1 @@ -/* - * arch/arm/include/asm/param.h - * - * Copyright (C) 1995-1999 Russell King - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ -#ifndef __ASM_PARAM_H -#define __ASM_PARAM_H - -# define HZ 100 - -#define EXEC_PAGESIZE 4096 - -#ifndef NOGROUP -#define NOGROUP (-1) -#endif - -/* max length of hostname */ -#define MAXHOSTNAMELEN 64 - -#endif - +#include diff --git a/usr/include/asm-arm/posix_types.h b/usr/include/asm-arm/posix_types.h index efdf990..d2de9cb 100644 --- a/usr/include/asm-arm/posix_types.h +++ b/usr/include/asm-arm/posix_types.h @@ -22,9 +22,6 @@ typedef unsigned short __kernel_mode_t; #define __kernel_mode_t __kernel_mode_t -typedef unsigned short __kernel_nlink_t; -#define __kernel_nlink_t __kernel_nlink_t - typedef unsigned short __kernel_ipc_pid_t; #define __kernel_ipc_pid_t __kernel_ipc_pid_t diff --git a/usr/include/asm-arm/ptrace.h b/usr/include/asm-arm/ptrace.h index 02b1524..32b6e66 100644 --- a/usr/include/asm-arm/ptrace.h +++ b/usr/include/asm-arm/ptrace.h @@ -44,6 +44,7 @@ #define IRQ_MODE 0x00000012 #define SVC_MODE 0x00000013 #define ABT_MODE 0x00000017 +#define HYP_MODE 0x0000001a #define UND_MODE 0x0000001b #define SYSTEM_MODE 0x0000001f #define MODE32_BIT 0x00000010 @@ -132,5 +133,4 @@ struct pt_regs { #endif /* __ASSEMBLY__ */ -#endif - +#endif /* __ASM_ARM_PTRACE_H */ diff --git a/usr/include/asm-arm/sembuf.h b/usr/include/asm-arm/sembuf.h index 1c02839..7673b83 100644 --- a/usr/include/asm-arm/sembuf.h +++ b/usr/include/asm-arm/sembuf.h @@ -1,25 +1 @@ -#ifndef _ASMARM_SEMBUF_H -#define _ASMARM_SEMBUF_H - -/* - * The semid64_ds structure for arm architecture. - * Note extra padding because this structure is passed back and forth - * between kernel and user space. - * - * Pad space is left for: - * - 64-bit time_t to solve y2038 problem - * - 2 miscellaneous 32-bit values - */ - -struct semid64_ds { - struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ - __kernel_time_t sem_otime; /* last semop time */ - unsigned long __unused1; - __kernel_time_t sem_ctime; /* last change time */ - unsigned long __unused2; - unsigned long sem_nsems; /* no. of semaphores in array */ - unsigned long __unused3; - unsigned long __unused4; -}; - -#endif /* _ASMARM_SEMBUF_H */ +#include diff --git a/usr/include/asm-arm/setup.h b/usr/include/asm-arm/setup.h index 199d58d..734ff39 100644 --- a/usr/include/asm-arm/setup.h +++ b/usr/include/asm-arm/setup.h @@ -184,4 +184,4 @@ struct tagtable { for (t = base; t->hdr.size; t = tag_next(t)) -#endif +#endif /* __ASMARM_SETUP_H */ diff --git a/usr/include/asm-arm/shmbuf.h b/usr/include/asm-arm/shmbuf.h index 2e5c67b..83c05fc 100644 --- a/usr/include/asm-arm/shmbuf.h +++ b/usr/include/asm-arm/shmbuf.h @@ -1,42 +1 @@ -#ifndef _ASMARM_SHMBUF_H -#define _ASMARM_SHMBUF_H - -/* - * The shmid64_ds structure for arm architecture. - * Note extra padding because this structure is passed back and forth - * between kernel and user space. - * - * Pad space is left for: - * - 64-bit time_t to solve y2038 problem - * - 2 miscellaneous 32-bit values - */ - -struct shmid64_ds { - struct ipc64_perm shm_perm; /* operation perms */ - size_t shm_segsz; /* size of segment (bytes) */ - __kernel_time_t shm_atime; /* last attach time */ - unsigned long __unused1; - __kernel_time_t shm_dtime; /* last detach time */ - unsigned long __unused2; - __kernel_time_t shm_ctime; /* last change time */ - unsigned long __unused3; - __kernel_pid_t shm_cpid; /* pid of creator */ - __kernel_pid_t shm_lpid; /* pid of last operator */ - unsigned long shm_nattch; /* no. of current attaches */ - unsigned long __unused4; - unsigned long __unused5; -}; - -struct shminfo64 { - unsigned long shmmax; - unsigned long shmmin; - unsigned long shmmni; - unsigned long shmseg; - unsigned long shmall; - unsigned long __unused1; - unsigned long __unused2; - unsigned long __unused3; - unsigned long __unused4; -}; - -#endif /* _ASMARM_SHMBUF_H */ +#include diff --git a/usr/include/asm-arm/signal.h b/usr/include/asm-arm/signal.h index 7ce662d..93a5c18 100644 --- a/usr/include/asm-arm/signal.h +++ b/usr/include/asm-arm/signal.h @@ -85,13 +85,6 @@ typedef unsigned long sigset_t; #define SA_NOMASK SA_NODEFER #define SA_ONESHOT SA_RESETHAND - -/* - * sigaltstack controls - */ -#define SS_ONSTACK 1 -#define SS_DISABLE 2 - #define MINSIGSTKSZ 2048 #define SIGSTKSZ 8192 @@ -120,4 +113,4 @@ typedef struct sigaltstack { } stack_t; -#endif +#endif /* _ASMARM_SIGNAL_H */ diff --git a/usr/include/asm-arm/socket.h b/usr/include/asm-arm/socket.h index 6433cad..6b71384 100644 --- a/usr/include/asm-arm/socket.h +++ b/usr/include/asm-arm/socket.h @@ -1,72 +1 @@ -#ifndef _ASMARM_SOCKET_H -#define _ASMARM_SOCKET_H - -#include - -/* For setsockopt(2) */ -#define SOL_SOCKET 1 - -#define SO_DEBUG 1 -#define SO_REUSEADDR 2 -#define SO_TYPE 3 -#define SO_ERROR 4 -#define SO_DONTROUTE 5 -#define SO_BROADCAST 6 -#define SO_SNDBUF 7 -#define SO_RCVBUF 8 -#define SO_SNDBUFFORCE 32 -#define SO_RCVBUFFORCE 33 -#define SO_KEEPALIVE 9 -#define SO_OOBINLINE 10 -#define SO_NO_CHECK 11 -#define SO_PRIORITY 12 -#define SO_LINGER 13 -#define SO_BSDCOMPAT 14 -/* To add :#define SO_REUSEPORT 15 */ -#define SO_PASSCRED 16 -#define SO_PEERCRED 17 -#define SO_RCVLOWAT 18 -#define SO_SNDLOWAT 19 -#define SO_RCVTIMEO 20 -#define SO_SNDTIMEO 21 - -/* Security levels - as per NRL IPv6 - don't actually do anything */ -#define SO_SECURITY_AUTHENTICATION 22 -#define SO_SECURITY_ENCRYPTION_TRANSPORT 23 -#define SO_SECURITY_ENCRYPTION_NETWORK 24 - -#define SO_BINDTODEVICE 25 - -/* Socket filtering */ -#define SO_ATTACH_FILTER 26 -#define SO_DETACH_FILTER 27 - -#define SO_PEERNAME 28 -#define SO_TIMESTAMP 29 -#define SCM_TIMESTAMP SO_TIMESTAMP - -#define SO_ACCEPTCONN 30 - -#define SO_PEERSEC 31 -#define SO_PASSSEC 34 -#define SO_TIMESTAMPNS 35 -#define SCM_TIMESTAMPNS SO_TIMESTAMPNS - -#define SO_MARK 36 - -#define SO_TIMESTAMPING 37 -#define SCM_TIMESTAMPING SO_TIMESTAMPING - -#define SO_PROTOCOL 38 -#define SO_DOMAIN 39 - -#define SO_RXQ_OVFL 40 - -#define SO_WIFI_STATUS 41 -#define SCM_WIFI_STATUS SO_WIFI_STATUS -#define SO_PEEK_OFF 42 - -/* Instruct lower device to use last 4-bytes of skb data as FCS */ -#define SO_NOFCS 43 - -#endif /* _ASM_SOCKET_H */ +#include diff --git a/usr/include/asm-arm/sockios.h b/usr/include/asm-arm/sockios.h index a2588a2..def6d47 100644 --- a/usr/include/asm-arm/sockios.h +++ b/usr/include/asm-arm/sockios.h @@ -1,13 +1 @@ -#ifndef __ARCH_ARM_SOCKIOS_H -#define __ARCH_ARM_SOCKIOS_H - -/* Socket-level I/O control calls. */ -#define FIOSETOWN 0x8901 -#define SIOCSPGRP 0x8902 -#define FIOGETOWN 0x8903 -#define SIOCGPGRP 0x8904 -#define SIOCATMARK 0x8905 -#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ -#define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */ - -#endif +#include diff --git a/usr/include/asm-arm/swab.h b/usr/include/asm-arm/swab.h index fe52b3c..5f621bf 100644 --- a/usr/include/asm-arm/swab.h +++ b/usr/include/asm-arm/swab.h @@ -23,7 +23,7 @@ #endif -static __inline__ __u32 __arch_swab32(__u32 x) +static __inline__ __u32 __arch_swab32(__u32 x) { __u32 t; @@ -48,4 +48,4 @@ static __inline__ __u32 __arch_swab32(__u32 x) #define __arch_swab32 __arch_swab32 -#endif +#endif /* __ASM_ARM_SWAB_H */ diff --git a/usr/include/asm-arm/termbits.h b/usr/include/asm-arm/termbits.h index 704135d..3935b10 100644 --- a/usr/include/asm-arm/termbits.h +++ b/usr/include/asm-arm/termbits.h @@ -1,198 +1 @@ -#ifndef __ASM_ARM_TERMBITS_H -#define __ASM_ARM_TERMBITS_H - -typedef unsigned char cc_t; -typedef unsigned int speed_t; -typedef unsigned int tcflag_t; - -#define NCCS 19 -struct termios { - tcflag_t c_iflag; /* input mode flags */ - tcflag_t c_oflag; /* output mode flags */ - tcflag_t c_cflag; /* control mode flags */ - tcflag_t c_lflag; /* local mode flags */ - cc_t c_line; /* line discipline */ - cc_t c_cc[NCCS]; /* control characters */ -}; - -struct termios2 { - tcflag_t c_iflag; /* input mode flags */ - tcflag_t c_oflag; /* output mode flags */ - tcflag_t c_cflag; /* control mode flags */ - tcflag_t c_lflag; /* local mode flags */ - cc_t c_line; /* line discipline */ - cc_t c_cc[NCCS]; /* control characters */ - speed_t c_ispeed; /* input speed */ - speed_t c_ospeed; /* output speed */ -}; - -struct ktermios { - tcflag_t c_iflag; /* input mode flags */ - tcflag_t c_oflag; /* output mode flags */ - tcflag_t c_cflag; /* control mode flags */ - tcflag_t c_lflag; /* local mode flags */ - cc_t c_line; /* line discipline */ - cc_t c_cc[NCCS]; /* control characters */ - speed_t c_ispeed; /* input speed */ - speed_t c_ospeed; /* output speed */ -}; - - -/* c_cc characters */ -#define VINTR 0 -#define VQUIT 1 -#define VERASE 2 -#define VKILL 3 -#define VEOF 4 -#define VTIME 5 -#define VMIN 6 -#define VSWTC 7 -#define VSTART 8 -#define VSTOP 9 -#define VSUSP 10 -#define VEOL 11 -#define VREPRINT 12 -#define VDISCARD 13 -#define VWERASE 14 -#define VLNEXT 15 -#define VEOL2 16 - -/* c_iflag bits */ -#define IGNBRK 0000001 -#define BRKINT 0000002 -#define IGNPAR 0000004 -#define PARMRK 0000010 -#define INPCK 0000020 -#define ISTRIP 0000040 -#define INLCR 0000100 -#define IGNCR 0000200 -#define ICRNL 0000400 -#define IUCLC 0001000 -#define IXON 0002000 -#define IXANY 0004000 -#define IXOFF 0010000 -#define IMAXBEL 0020000 -#define IUTF8 0040000 - -/* c_oflag bits */ -#define OPOST 0000001 -#define OLCUC 0000002 -#define ONLCR 0000004 -#define OCRNL 0000010 -#define ONOCR 0000020 -#define ONLRET 0000040 -#define OFILL 0000100 -#define OFDEL 0000200 -#define NLDLY 0000400 -#define NL0 0000000 -#define NL1 0000400 -#define CRDLY 0003000 -#define CR0 0000000 -#define CR1 0001000 -#define CR2 0002000 -#define CR3 0003000 -#define TABDLY 0014000 -#define TAB0 0000000 -#define TAB1 0004000 -#define TAB2 0010000 -#define TAB3 0014000 -#define XTABS 0014000 -#define BSDLY 0020000 -#define BS0 0000000 -#define BS1 0020000 -#define VTDLY 0040000 -#define VT0 0000000 -#define VT1 0040000 -#define FFDLY 0100000 -#define FF0 0000000 -#define FF1 0100000 - -/* c_cflag bit meaning */ -#define CBAUD 0010017 -#define B0 0000000 /* hang up */ -#define B50 0000001 -#define B75 0000002 -#define B110 0000003 -#define B134 0000004 -#define B150 0000005 -#define B200 0000006 -#define B300 0000007 -#define B600 0000010 -#define B1200 0000011 -#define B1800 0000012 -#define B2400 0000013 -#define B4800 0000014 -#define B9600 0000015 -#define B19200 0000016 -#define B38400 0000017 -#define EXTA B19200 -#define EXTB B38400 -#define CSIZE 0000060 -#define CS5 0000000 -#define CS6 0000020 -#define CS7 0000040 -#define CS8 0000060 -#define CSTOPB 0000100 -#define CREAD 0000200 -#define PARENB 0000400 -#define PARODD 0001000 -#define HUPCL 0002000 -#define CLOCAL 0004000 -#define CBAUDEX 0010000 -#define BOTHER 0010000 -#define B57600 0010001 -#define B115200 0010002 -#define B230400 0010003 -#define B460800 0010004 -#define B500000 0010005 -#define B576000 0010006 -#define B921600 0010007 -#define B1000000 0010010 -#define B1152000 0010011 -#define B1500000 0010012 -#define B2000000 0010013 -#define B2500000 0010014 -#define B3000000 0010015 -#define B3500000 0010016 -#define B4000000 0010017 -#define CIBAUD 002003600000 /* input baud rate */ -#define CMSPAR 010000000000 /* mark or space (stick) parity */ -#define CRTSCTS 020000000000 /* flow control */ - -#define IBSHIFT 16 - -/* c_lflag bits */ -#define ISIG 0000001 -#define ICANON 0000002 -#define XCASE 0000004 -#define ECHO 0000010 -#define ECHOE 0000020 -#define ECHOK 0000040 -#define ECHONL 0000100 -#define NOFLSH 0000200 -#define TOSTOP 0000400 -#define ECHOCTL 0001000 -#define ECHOPRT 0002000 -#define ECHOKE 0004000 -#define FLUSHO 0010000 -#define PENDIN 0040000 -#define IEXTEN 0100000 -#define EXTPROC 0200000 - -/* tcflow() and TCXONC use these */ -#define TCOOFF 0 -#define TCOON 1 -#define TCIOFF 2 -#define TCION 3 - -/* tcflush() and TCFLSH use these */ -#define TCIFLUSH 0 -#define TCOFLUSH 1 -#define TCIOFLUSH 2 - -/* tcsetattr uses these */ -#define TCSANOW 0 -#define TCSADRAIN 1 -#define TCSAFLUSH 2 - -#endif /* __ASM_ARM_TERMBITS_H */ +#include diff --git a/usr/include/asm-arm/termios.h b/usr/include/asm-arm/termios.h index f3be5ac..280d78a 100644 --- a/usr/include/asm-arm/termios.h +++ b/usr/include/asm-arm/termios.h @@ -1,44 +1 @@ -#ifndef __ASM_ARM_TERMIOS_H -#define __ASM_ARM_TERMIOS_H - -#include -#include - -struct winsize { - unsigned short ws_row; - unsigned short ws_col; - unsigned short ws_xpixel; - unsigned short ws_ypixel; -}; - -#define NCC 8 -struct termio { - unsigned short c_iflag; /* input mode flags */ - unsigned short c_oflag; /* output mode flags */ - unsigned short c_cflag; /* control mode flags */ - unsigned short c_lflag; /* local mode flags */ - unsigned char c_line; /* line discipline */ - unsigned char c_cc[NCC]; /* control characters */ -}; - - -/* modem lines */ -#define TIOCM_LE 0x001 -#define TIOCM_DTR 0x002 -#define TIOCM_RTS 0x004 -#define TIOCM_ST 0x008 -#define TIOCM_SR 0x010 -#define TIOCM_CTS 0x020 -#define TIOCM_CAR 0x040 -#define TIOCM_RNG 0x080 -#define TIOCM_DSR 0x100 -#define TIOCM_CD TIOCM_CAR -#define TIOCM_RI TIOCM_RNG -#define TIOCM_OUT1 0x2000 -#define TIOCM_OUT2 0x4000 -#define TIOCM_LOOP 0x8000 - -/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ - - -#endif /* __ASM_ARM_TERMIOS_H */ +#include diff --git a/usr/include/asm-arm/types.h b/usr/include/asm-arm/types.h index f849b77..b9e79bc 100644 --- a/usr/include/asm-arm/types.h +++ b/usr/include/asm-arm/types.h @@ -1,11 +1 @@ -#ifndef __ASM_ARM_TYPES_H -#define __ASM_ARM_TYPES_H - -#include - -/* - * These aren't exported outside the kernel to avoid name space clashes - */ - -#endif - +#include diff --git a/usr/include/asm-arm/unistd.h b/usr/include/asm-arm/unistd.h index 28640a6..896d514 100644 --- a/usr/include/asm-arm/unistd.h +++ b/usr/include/asm-arm/unistd.h @@ -404,6 +404,13 @@ #define __NR_setns (__NR_SYSCALL_BASE+375) #define __NR_process_vm_readv (__NR_SYSCALL_BASE+376) #define __NR_process_vm_writev (__NR_SYSCALL_BASE+377) +#define __NR_kcmp (__NR_SYSCALL_BASE+378) +#define __NR_finit_module (__NR_SYSCALL_BASE+379) + +/* + * This may need to be greater than __NR_last_syscall+1 in order to + * account for the padding in the syscall table + */ /* * The following SWIs are ARM private. diff --git a/usr/include/asm-arm64/auxvec.h b/usr/include/asm-arm64/auxvec.h new file mode 100644 index 0000000..22d6d88 --- /dev/null +++ b/usr/include/asm-arm64/auxvec.h @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2012 ARM Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef __ASM_AUXVEC_H +#define __ASM_AUXVEC_H + +/* vDSO location */ +#define AT_SYSINFO_EHDR 33 + +#endif diff --git a/usr/include/asm-arm64/bitsperlong.h b/usr/include/asm-arm64/bitsperlong.h new file mode 100644 index 0000000..fce9c29 --- /dev/null +++ b/usr/include/asm-arm64/bitsperlong.h @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2012 ARM Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef __ASM_BITSPERLONG_H +#define __ASM_BITSPERLONG_H + +#define __BITS_PER_LONG 64 + +#include + +#endif /* __ASM_BITSPERLONG_H */ diff --git a/usr/include/asm-arm64/byteorder.h b/usr/include/asm-arm64/byteorder.h new file mode 100644 index 0000000..2b92046 --- /dev/null +++ b/usr/include/asm-arm64/byteorder.h @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2012 ARM Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef __ASM_BYTEORDER_H +#define __ASM_BYTEORDER_H + +#include + +#endif /* __ASM_BYTEORDER_H */ diff --git a/usr/include/asm-arm64/errno.h b/usr/include/asm-arm64/errno.h new file mode 100644 index 0000000..4c82b50 --- /dev/null +++ b/usr/include/asm-arm64/errno.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arm64/fcntl.h b/usr/include/asm-arm64/fcntl.h new file mode 100644 index 0000000..cd2e630 --- /dev/null +++ b/usr/include/asm-arm64/fcntl.h @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2012 ARM Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef __ASM_FCNTL_H +#define __ASM_FCNTL_H + +/* + * Using our own definitions for AArch32 (compat) support. + */ +#define O_DIRECTORY 040000 /* must be a directory */ +#define O_NOFOLLOW 0100000 /* don't follow links */ +#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */ +#define O_LARGEFILE 0400000 + +#include + +#endif diff --git a/usr/include/asm-arm64/hwcap.h b/usr/include/asm-arm64/hwcap.h new file mode 100644 index 0000000..f2890d0 --- /dev/null +++ b/usr/include/asm-arm64/hwcap.h @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2012 ARM Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef __ASM_HWCAP_H +#define __ASM_HWCAP_H + +/* + * HWCAP flags - for elf_hwcap (in kernel) and AT_HWCAP + */ +#define HWCAP_FP (1 << 0) +#define HWCAP_ASIMD (1 << 1) + + +#endif /* __ASM_HWCAP_H */ diff --git a/usr/include/asm-arm64/ioctl.h b/usr/include/asm-arm64/ioctl.h new file mode 100644 index 0000000..b279fe0 --- /dev/null +++ b/usr/include/asm-arm64/ioctl.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arm64/ioctls.h b/usr/include/asm-arm64/ioctls.h new file mode 100644 index 0000000..ec34c76 --- /dev/null +++ b/usr/include/asm-arm64/ioctls.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arm64/ipcbuf.h b/usr/include/asm-arm64/ipcbuf.h new file mode 100644 index 0000000..84c7e51 --- /dev/null +++ b/usr/include/asm-arm64/ipcbuf.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arm64/kvm_para.h b/usr/include/asm-arm64/kvm_para.h new file mode 100644 index 0000000..14fab8f --- /dev/null +++ b/usr/include/asm-arm64/kvm_para.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arm64/mman.h b/usr/include/asm-arm64/mman.h new file mode 100644 index 0000000..8eebf89 --- /dev/null +++ b/usr/include/asm-arm64/mman.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arm64/msgbuf.h b/usr/include/asm-arm64/msgbuf.h new file mode 100644 index 0000000..809134c --- /dev/null +++ b/usr/include/asm-arm64/msgbuf.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arm64/param.h b/usr/include/asm-arm64/param.h new file mode 100644 index 0000000..8e3a281 --- /dev/null +++ b/usr/include/asm-arm64/param.h @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2012 ARM Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef __ASM_PARAM_H +#define __ASM_PARAM_H + +#define EXEC_PAGESIZE 65536 + +#include + +#endif diff --git a/usr/include/asm-arm64/poll.h b/usr/include/asm-arm64/poll.h new file mode 100644 index 0000000..c98509d --- /dev/null +++ b/usr/include/asm-arm64/poll.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arm64/posix_types.h b/usr/include/asm-arm64/posix_types.h new file mode 100644 index 0000000..22cae62 --- /dev/null +++ b/usr/include/asm-arm64/posix_types.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arm64/ptrace.h b/usr/include/asm-arm64/ptrace.h new file mode 100644 index 0000000..d2fcc96 --- /dev/null +++ b/usr/include/asm-arm64/ptrace.h @@ -0,0 +1,92 @@ +/* + * Based on arch/arm/include/asm/ptrace.h + * + * Copyright (C) 1996-2003 Russell King + * Copyright (C) 2012 ARM Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef __ASM_PTRACE_H +#define __ASM_PTRACE_H + +#include + +#include + + +/* + * PSR bits + */ +#define PSR_MODE_EL0t 0x00000000 +#define PSR_MODE_EL1t 0x00000004 +#define PSR_MODE_EL1h 0x00000005 +#define PSR_MODE_EL2t 0x00000008 +#define PSR_MODE_EL2h 0x00000009 +#define PSR_MODE_EL3t 0x0000000c +#define PSR_MODE_EL3h 0x0000000d +#define PSR_MODE_MASK 0x0000000f + +/* AArch32 CPSR bits */ +#define PSR_MODE32_BIT 0x00000010 + +/* AArch64 SPSR bits */ +#define PSR_F_BIT 0x00000040 +#define PSR_I_BIT 0x00000080 +#define PSR_A_BIT 0x00000100 +#define PSR_D_BIT 0x00000200 +#define PSR_Q_BIT 0x08000000 +#define PSR_V_BIT 0x10000000 +#define PSR_C_BIT 0x20000000 +#define PSR_Z_BIT 0x40000000 +#define PSR_N_BIT 0x80000000 + +/* + * Groups of PSR bits + */ +#define PSR_f 0xff000000 /* Flags */ +#define PSR_s 0x00ff0000 /* Status */ +#define PSR_x 0x0000ff00 /* Extension */ +#define PSR_c 0x000000ff /* Control */ + + +#ifndef __ASSEMBLY__ + +/* + * User structures for general purpose, floating point and debug registers. + */ +struct user_pt_regs { + __u64 regs[31]; + __u64 sp; + __u64 pc; + __u64 pstate; +}; + +struct user_fpsimd_state { + __uint128_t vregs[32]; + __u32 fpsr; + __u32 fpcr; +}; + +struct user_hwdebug_state { + __u32 dbg_info; + __u32 pad; + struct { + __u64 addr; + __u32 ctrl; + __u32 pad; + } dbg_regs[16]; +}; + +#endif /* __ASSEMBLY__ */ + +#endif /* __ASM_PTRACE_H */ diff --git a/usr/include/asm-arm64/resource.h b/usr/include/asm-arm64/resource.h new file mode 100644 index 0000000..04bc4db --- /dev/null +++ b/usr/include/asm-arm64/resource.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arm64/sembuf.h b/usr/include/asm-arm64/sembuf.h new file mode 100644 index 0000000..7673b83 --- /dev/null +++ b/usr/include/asm-arm64/sembuf.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arm64/setup.h b/usr/include/asm-arm64/setup.h new file mode 100644 index 0000000..9cf2e46 --- /dev/null +++ b/usr/include/asm-arm64/setup.h @@ -0,0 +1,26 @@ +/* + * Based on arch/arm/include/asm/setup.h + * + * Copyright (C) 1997-1999 Russell King + * Copyright (C) 2012 ARM Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef __ASM_SETUP_H +#define __ASM_SETUP_H + +#include + +#define COMMAND_LINE_SIZE 2048 + +#endif diff --git a/usr/include/asm-arm64/shmbuf.h b/usr/include/asm-arm64/shmbuf.h new file mode 100644 index 0000000..83c05fc --- /dev/null +++ b/usr/include/asm-arm64/shmbuf.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arm64/sigcontext.h b/usr/include/asm-arm64/sigcontext.h new file mode 100644 index 0000000..fd5b447 --- /dev/null +++ b/usr/include/asm-arm64/sigcontext.h @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2012 ARM Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef __ASM_SIGCONTEXT_H +#define __ASM_SIGCONTEXT_H + +#include + +/* + * Signal context structure - contains all info to do with the state + * before the signal handler was invoked. + */ +struct sigcontext { + __u64 fault_address; + /* AArch64 registers */ + __u64 regs[31]; + __u64 sp; + __u64 pc; + __u64 pstate; + /* 4K reserved for FP/SIMD state and future expansion */ + __u8 __reserved[4096] __attribute__((__aligned__(16))); +}; + +/* + * Header to be used at the beginning of structures extending the user + * context. Such structures must be placed after the rt_sigframe on the stack + * and be 16-byte aligned. The last structure must be a dummy one with the + * magic and size set to 0. + */ +struct _aarch64_ctx { + __u32 magic; + __u32 size; +}; + +#define FPSIMD_MAGIC 0x46508001 + +struct fpsimd_context { + struct _aarch64_ctx head; + __u32 fpsr; + __u32 fpcr; + __uint128_t vregs[32]; +}; + + +#endif /* __ASM_SIGCONTEXT_H */ diff --git a/usr/include/asm-arm64/siginfo.h b/usr/include/asm-arm64/siginfo.h new file mode 100644 index 0000000..5a74a08 --- /dev/null +++ b/usr/include/asm-arm64/siginfo.h @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2012 ARM Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef __ASM_SIGINFO_H +#define __ASM_SIGINFO_H + +#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) + +#include + +#endif diff --git a/usr/include/asm-arm64/signal.h b/usr/include/asm-arm64/signal.h new file mode 100644 index 0000000..8d1e723 --- /dev/null +++ b/usr/include/asm-arm64/signal.h @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2012 ARM Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef __ASM_SIGNAL_H +#define __ASM_SIGNAL_H + +/* Required for AArch32 compatibility. */ +#define SA_RESTORER 0x04000000 + +#include + +#endif diff --git a/usr/include/asm-arm64/socket.h b/usr/include/asm-arm64/socket.h new file mode 100644 index 0000000..6b71384 --- /dev/null +++ b/usr/include/asm-arm64/socket.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arm64/sockios.h b/usr/include/asm-arm64/sockios.h new file mode 100644 index 0000000..def6d47 --- /dev/null +++ b/usr/include/asm-arm64/sockios.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arm64/stat.h b/usr/include/asm-arm64/stat.h new file mode 100644 index 0000000..eeb702e --- /dev/null +++ b/usr/include/asm-arm64/stat.h @@ -0,0 +1,16 @@ +/* + * Copyright (C) 2012 ARM Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include diff --git a/usr/include/asm-arm64/statfs.h b/usr/include/asm-arm64/statfs.h new file mode 100644 index 0000000..6f62190 --- /dev/null +++ b/usr/include/asm-arm64/statfs.h @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2012 ARM Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef __ASM_STATFS_H +#define __ASM_STATFS_H + +#define ARCH_PACK_COMPAT_STATFS64 __attribute__((packed,aligned(4))) + +#include + +#endif diff --git a/usr/include/asm-arm64/swab.h b/usr/include/asm-arm64/swab.h new file mode 100644 index 0000000..7847e56 --- /dev/null +++ b/usr/include/asm-arm64/swab.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arm64/termbits.h b/usr/include/asm-arm64/termbits.h new file mode 100644 index 0000000..3935b10 --- /dev/null +++ b/usr/include/asm-arm64/termbits.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arm64/termios.h b/usr/include/asm-arm64/termios.h new file mode 100644 index 0000000..280d78a --- /dev/null +++ b/usr/include/asm-arm64/termios.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arm64/types.h b/usr/include/asm-arm64/types.h new file mode 100644 index 0000000..b9e79bc --- /dev/null +++ b/usr/include/asm-arm64/types.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-arm64/unistd.h b/usr/include/asm-arm64/unistd.h new file mode 100644 index 0000000..1caadc2 --- /dev/null +++ b/usr/include/asm-arm64/unistd.h @@ -0,0 +1,16 @@ +/* + * Copyright (C) 2012 ARM Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include diff --git a/usr/include/asm-c6x/kvm_para.h b/usr/include/asm-c6x/kvm_para.h new file mode 100644 index 0000000..14fab8f --- /dev/null +++ b/usr/include/asm-c6x/kvm_para.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-c6x/ptrace.h b/usr/include/asm-c6x/ptrace.h index 2a65808..8dbae70 100644 --- a/usr/include/asm-c6x/ptrace.h +++ b/usr/include/asm-c6x/ptrace.h @@ -97,6 +97,11 @@ #define PT_DP PT_B14 /* Data Segment Pointer (B14) */ #define PT_SP PT_B15 /* Stack Pointer (B15) */ +#define PTRACE_GETFDPIC 31 /* get the ELF fdpic loadmap address */ + +#define PTRACE_GETFDPIC_EXEC 0 /* [addr] request the executable loadmap */ +#define PTRACE_GETFDPIC_INTERP 1 /* [addr] request the interpreter loadmap */ + #ifndef __ASSEMBLY__ #ifdef _BIG_ENDIAN diff --git a/usr/include/asm-c6x/setup.h b/usr/include/asm-c6x/setup.h index a01e318..d798b91 100644 --- a/usr/include/asm-c6x/setup.h +++ b/usr/include/asm-c6x/setup.h @@ -1,33 +1,6 @@ -/* - * Port on Texas Instruments TMS320C6x architecture - * - * Copyright (C) 2004, 2009, 2010 2011 Texas Instruments Incorporated - * Author: Aurelien Jacquiot (aurelien.jacquiot@jaluna.com) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ #ifndef _ASM_C6X_SETUP_H #define _ASM_C6X_SETUP_H #define COMMAND_LINE_SIZE 1024 -#ifndef __ASSEMBLY__ -extern char c6x_command_line[COMMAND_LINE_SIZE]; - -extern int c6x_add_memory(phys_addr_t start, unsigned long size); - -extern unsigned long ram_start; -extern unsigned long ram_end; - -extern int c6x_num_cores; -extern unsigned int c6x_silicon_rev; -extern unsigned int c6x_devstat; -extern unsigned char c6x_fuse_mac[6]; - -extern void machine_init(unsigned long dt_ptr); -extern void time_init(void); - -#endif /* !__ASSEMBLY__ */ #endif /* _ASM_C6X_SETUP_H */ diff --git a/usr/include/asm-c6x/signal.h b/usr/include/asm-c6x/signal.h index f1cd870..7b1573c 100644 --- a/usr/include/asm-c6x/signal.h +++ b/usr/include/asm-c6x/signal.h @@ -1,17 +1 @@ -#ifndef _ASM_C6X_SIGNAL_H -#define _ASM_C6X_SIGNAL_H - #include - -#ifndef __ASSEMBLY__ -#include - -struct pt_regs; - -extern asmlinkage int do_rt_sigreturn(struct pt_regs *regs); -extern asmlinkage void do_notify_resume(struct pt_regs *regs, - u32 thread_info_flags, - int syscall); -#endif - -#endif /* _ASM_C6X_SIGNAL_H */ diff --git a/usr/include/asm-c6x/swab.h b/usr/include/asm-c6x/swab.h index 8ee2796..5ee2fb5 100644 --- a/usr/include/asm-c6x/swab.h +++ b/usr/include/asm-c6x/swab.h @@ -9,13 +9,13 @@ #ifndef _ASM_C6X_SWAB_H #define _ASM_C6X_SWAB_H -static __inline__ __u16 __c6x_swab16(__u16 val) +static __inline__ __u16 __c6x_swab16(__u16 val) { __asm__("swap4 .l1 %0,%0\n" : "+a"(val)); return val; } -static __inline__ __u32 __c6x_swab32(__u32 val) +static __inline__ __u32 __c6x_swab32(__u32 val) { __asm__("swap4 .l1 %0,%0\n" "swap2 .l1 %0,%0\n" @@ -23,7 +23,7 @@ static __inline__ __u32 __c6x_swab32(__u32 val) return val; } -static __inline__ __u64 __c6x_swab64(__u64 val) +static __inline__ __u64 __c6x_swab64(__u64 val) { __asm__(" swap2 .s1 %p0,%P0\n" "|| swap2 .l1 %P0,%p0\n" @@ -33,13 +33,13 @@ static __inline__ __u64 __c6x_swab64(__u64 val) return val; } -static __inline__ __u32 __c6x_swahw32(__u32 val) +static __inline__ __u32 __c6x_swahw32(__u32 val) { __asm__("swap2 .l1 %0,%0\n" : "+a"(val)); return val; } -static __inline__ __u32 __c6x_swahb32(__u32 val) +static __inline__ __u32 __c6x_swahb32(__u32 val) { __asm__("swap4 .l1 %0,%0\n" : "+a"(val)); return val; diff --git a/usr/include/asm-c6x/unistd.h b/usr/include/asm-c6x/unistd.h index 6d54ea4..e7d09a6 100644 --- a/usr/include/asm-c6x/unistd.h +++ b/usr/include/asm-c6x/unistd.h @@ -13,8 +13,8 @@ * NON INFRINGEMENT. See the GNU General Public License for * more details. */ -#if !defined(_ASM_C6X_UNISTD_H) || defined(__SYSCALL) -#define _ASM_C6X_UNISTD_H + +#define __ARCH_WANT_SYS_CLONE /* Use the standard ABI for syscalls. */ #include @@ -22,5 +22,3 @@ /* C6X-specific syscalls. */ #define __NR_cache_sync (__NR_arch_specific_syscall + 0) __SYSCALL(__NR_cache_sync, sys_cache_sync) - -#endif /* _ASM_C6X_UNISTD_H */ diff --git a/usr/include/asm-generic/fcntl.h b/usr/include/asm-generic/fcntl.h index 9e5b035..a48937d 100644 --- a/usr/include/asm-generic/fcntl.h +++ b/usr/include/asm-generic/fcntl.h @@ -120,6 +120,10 @@ #define F_GETOWN_EX 16 #endif +#ifndef F_GETOWNER_UIDS +#define F_GETOWNER_UIDS 17 +#endif + #define F_OWNER_TID 0 #define F_OWNER_PID 1 #define F_OWNER_PGRP 2 diff --git a/usr/include/asm-generic/ioctls.h b/usr/include/asm-generic/ioctls.h index 8f439cc..467cdba 100644 --- a/usr/include/asm-generic/ioctls.h +++ b/usr/include/asm-generic/ioctls.h @@ -74,6 +74,9 @@ #define TCSETXW 0x5435 #define TIOCSIG _IOW('T', 0x36, int) /* pty: generate signal */ #define TIOCVHANGUP 0x5437 +#define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */ +#define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ +#define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */ #define FIONCLEX 0x5450 #define FIOCLEX 0x5451 diff --git a/usr/include/asm-generic/kvm_para.h b/usr/include/asm-generic/kvm_para.h new file mode 100644 index 0000000..486f0af --- /dev/null +++ b/usr/include/asm-generic/kvm_para.h @@ -0,0 +1,4 @@ +/* + * There isn't anything here, but the file must not be empty or patch + * will delete it. + */ diff --git a/usr/include/asm-generic/mman-common.h b/usr/include/asm-generic/mman-common.h index d030d2c..4164529 100644 --- a/usr/include/asm-generic/mman-common.h +++ b/usr/include/asm-generic/mman-common.h @@ -55,4 +55,15 @@ /* compatibility flags */ #define MAP_FILE 0 +/* + * When MAP_HUGETLB is set bits [26:31] encode the log2 of the huge page size. + * This gives us 6 bits, which is enough until someone invents 128 bit address + * spaces. + * + * Assume these are all power of twos. + * When 0 use the default page size. + */ +#define MAP_HUGE_SHIFT 26 +#define MAP_HUGE_MASK 0x3f + #endif /* __ASM_GENERIC_MMAN_COMMON_H */ diff --git a/usr/include/asm-generic/mman.h b/usr/include/asm-generic/mman.h index 32c8bd6..e9fe6fd 100644 --- a/usr/include/asm-generic/mman.h +++ b/usr/include/asm-generic/mman.h @@ -13,6 +13,8 @@ #define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */ #define MAP_HUGETLB 0x40000 /* create a huge page mapping */ +/* Bits [26:31] are reserved, see mman-common.h for MAP_HUGETLB usage */ + #define MCL_CURRENT 1 /* lock all current mappings */ #define MCL_FUTURE 2 /* lock all future mappings */ diff --git a/usr/include/asm-generic/posix_types.h b/usr/include/asm-generic/posix_types.h index 91d44bd..fe74fcc 100644 --- a/usr/include/asm-generic/posix_types.h +++ b/usr/include/asm-generic/posix_types.h @@ -23,10 +23,6 @@ typedef __kernel_ulong_t __kernel_ino_t; typedef unsigned int __kernel_mode_t; #endif -#ifndef __kernel_nlink_t -typedef __kernel_ulong_t __kernel_nlink_t; -#endif - #ifndef __kernel_pid_t typedef int __kernel_pid_t; #endif diff --git a/usr/include/asm-generic/resource.h b/usr/include/asm-generic/resource.h index a36da84..1bd7dd4 100644 --- a/usr/include/asm-generic/resource.h +++ b/usr/include/asm-generic/resource.h @@ -65,4 +65,4 @@ #endif -#endif +#endif /* _ASM_GENERIC_RESOURCE_H */ diff --git a/usr/include/asm-generic/siginfo.h b/usr/include/asm-generic/siginfo.h index 3ca658b..62819ef 100644 --- a/usr/include/asm-generic/siginfo.h +++ b/usr/include/asm-generic/siginfo.h @@ -98,9 +98,18 @@ typedef struct siginfo { __ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */ int _fd; } _sigpoll; + + /* SIGSYS */ + struct { + void *_call_addr; /* calling user insn */ + int _syscall; /* triggering system call number */ + unsigned int _arch; /* AUDIT_ARCH_* of syscall */ + } _sigsys; } _sifields; } __ARCH_SI_ATTRIBUTES siginfo_t; +/* If the arch shares siginfo, then it has SIGSYS. */ +#define __ARCH_SIGSYS #endif /* @@ -124,6 +133,11 @@ typedef struct siginfo { #define si_addr_lsb _sifields._sigfault._addr_lsb #define si_band _sifields._sigpoll._band #define si_fd _sifields._sigpoll._fd +#ifdef __ARCH_SIGSYS +#define si_call_addr _sifields._sigsys._call_addr +#define si_syscall _sifields._sigsys._syscall +#define si_arch _sifields._sigsys._arch +#endif #define __SI_KILL 0 #define __SI_TIMER 0 @@ -132,6 +146,7 @@ typedef struct siginfo { #define __SI_CHLD 0 #define __SI_RT 0 #define __SI_MESGQ 0 +#define __SI_SYS 0 #define __SI_CODE(T,N) (N) /* @@ -228,6 +243,12 @@ typedef struct siginfo { #define NSIGPOLL 6 /* + * SIGSYS si_codes + */ +#define SYS_SECCOMP (__SI_SYS|1) /* seccomp triggered */ +#define NSIGSYS 1 + +/* * sigevent definitions * * It seems likely that SIGEV_THREAD will have to be handled from @@ -272,4 +293,4 @@ typedef struct sigevent { #define sigev_notify_thread_id _sigev_un._tid -#endif +#endif /* _ASM_GENERIC_SIGINFO_H */ diff --git a/usr/include/asm-generic/signal.h b/usr/include/asm-generic/signal.h index 1eb6167..34d2c5f 100644 --- a/usr/include/asm-generic/signal.h +++ b/usr/include/asm-generic/signal.h @@ -80,12 +80,6 @@ * SA_RESTORER 0x04000000 */ -/* - * sigaltstack controls - */ -#define SS_ONSTACK 1 -#define SS_DISABLE 2 - #define MINSIGSTKSZ 2048 #define SIGSTKSZ 8192 @@ -99,6 +93,10 @@ typedef unsigned long old_sigset_t; #include +#ifdef SA_RESTORER +#define __ARCH_HAS_SA_RESTORER +#endif + struct sigaction { __sighandler_t sa_handler; unsigned long sa_flags; @@ -108,10 +106,6 @@ struct sigaction { sigset_t sa_mask; /* mask last for extensibility */ }; -struct k_sigaction { - struct sigaction sa; -}; - typedef struct sigaltstack { void *ss_sp; int ss_flags; @@ -120,4 +114,4 @@ typedef struct sigaltstack { #endif /* __ASSEMBLY__ */ -#endif /* _ASM_GENERIC_SIGNAL_H */ +#endif /* __ASM_GENERIC_SIGNAL_H */ diff --git a/usr/include/asm-generic/socket.h b/usr/include/asm-generic/socket.h index b1bea03..c5d2e3a 100644 --- a/usr/include/asm-generic/socket.h +++ b/usr/include/asm-generic/socket.h @@ -22,8 +22,7 @@ #define SO_PRIORITY 12 #define SO_LINGER 13 #define SO_BSDCOMPAT 14 -/* To add :#define SO_REUSEPORT 15 */ - +#define SO_REUSEPORT 15 #ifndef SO_PASSCRED /* powerpc only differs in these */ #define SO_PASSCRED 16 #define SO_PEERCRED 17 @@ -43,6 +42,7 @@ /* Socket filtering */ #define SO_ATTACH_FILTER 26 #define SO_DETACH_FILTER 27 +#define SO_GET_FILTER SO_ATTACH_FILTER #define SO_PEERNAME 28 #define SO_TIMESTAMP 29 @@ -72,4 +72,8 @@ /* Instruct lower device to use last 4-bytes of skb data as FCS */ #define SO_NOFCS 43 +#define SO_LOCK_FILTER 44 + +#define SO_SELECT_ERR_QUEUE 45 + #endif /* __ASM_GENERIC_SOCKET_H */ diff --git a/usr/include/asm-generic/statfs.h b/usr/include/asm-generic/statfs.h index 30be87e..5241f16 100644 --- a/usr/include/asm-generic/statfs.h +++ b/usr/include/asm-generic/statfs.h @@ -80,4 +80,4 @@ struct compat_statfs64 { __u32 f_spare[4]; } ARCH_PACK_COMPAT_STATFS64; -#endif +#endif /* _GENERIC_STATFS_H */ diff --git a/usr/include/asm-generic/unistd.h b/usr/include/asm-generic/unistd.h index 742ccd4..0cc74c4 100644 --- a/usr/include/asm-generic/unistd.h +++ b/usr/include/asm-generic/unistd.h @@ -1,6 +1,3 @@ -#if !defined(_ASM_GENERIC_UNISTD_H) || defined(__SYSCALL) -#define _ASM_GENERIC_UNISTD_H - #include /* @@ -405,9 +402,9 @@ __SC_COMP(__NR_rt_sigsuspend, sys_rt_sigsuspend, compat_sys_rt_sigsuspend) #define __NR_rt_sigaction 134 __SC_COMP(__NR_rt_sigaction, sys_rt_sigaction, compat_sys_rt_sigaction) #define __NR_rt_sigprocmask 135 -__SYSCALL(__NR_rt_sigprocmask, sys_rt_sigprocmask) +__SC_COMP(__NR_rt_sigprocmask, sys_rt_sigprocmask, compat_sys_rt_sigprocmask) #define __NR_rt_sigpending 136 -__SYSCALL(__NR_rt_sigpending, sys_rt_sigpending) +__SC_COMP(__NR_rt_sigpending, sys_rt_sigpending, compat_sys_rt_sigpending) #define __NR_rt_sigtimedwait 137 __SC_COMP(__NR_rt_sigtimedwait, sys_rt_sigtimedwait, \ compat_sys_rt_sigtimedwait) @@ -691,9 +688,13 @@ __SC_COMP(__NR_process_vm_readv, sys_process_vm_readv, \ #define __NR_process_vm_writev 271 __SC_COMP(__NR_process_vm_writev, sys_process_vm_writev, \ compat_sys_process_vm_writev) +#define __NR_kcmp 272 +__SYSCALL(__NR_kcmp, sys_kcmp) +#define __NR_finit_module 273 +__SYSCALL(__NR_finit_module, sys_finit_module) #undef __NR_syscalls -#define __NR_syscalls 272 +#define __NR_syscalls 274 /* * All syscalls below here should go away really, @@ -901,5 +902,3 @@ __SYSCALL(__NR_fork, sys_ni_syscall) #define __NR_lstat64 __NR3264_lstat #endif #endif - -#endif /* _ASM_GENERIC_UNISTD_H */ diff --git a/usr/include/asm-hexagon/bitsperlong.h b/usr/include/asm-hexagon/bitsperlong.h index 2701cae..4a65815 100644 --- a/usr/include/asm-hexagon/bitsperlong.h +++ b/usr/include/asm-hexagon/bitsperlong.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. + * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and diff --git a/usr/include/asm-hexagon/byteorder.h b/usr/include/asm-hexagon/byteorder.h index 0e19b9f..e31f3f7 100644 --- a/usr/include/asm-hexagon/byteorder.h +++ b/usr/include/asm-hexagon/byteorder.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. + * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and diff --git a/usr/include/asm-hexagon/kvm_para.h b/usr/include/asm-hexagon/kvm_para.h new file mode 100644 index 0000000..14fab8f --- /dev/null +++ b/usr/include/asm-hexagon/kvm_para.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-hexagon/param.h b/usr/include/asm-hexagon/param.h index 285344b..5cec8c0 100644 --- a/usr/include/asm-hexagon/param.h +++ b/usr/include/asm-hexagon/param.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. + * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and diff --git a/usr/include/asm-hexagon/ptrace.h b/usr/include/asm-hexagon/ptrace.h index 3d2f607..065e5b3 100644 --- a/usr/include/asm-hexagon/ptrace.h +++ b/usr/include/asm-hexagon/ptrace.h @@ -1,7 +1,7 @@ /* * Ptrace definitions for the Hexagon architecture * - * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. + * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -32,4 +32,13 @@ extern int regs_query_register_offset(const char *name); extern const char *regs_query_register_name(unsigned int offset); +#define current_pt_regs() \ + ((struct pt_regs *) \ + ((unsigned long)current_thread_info() + THREAD_SIZE) - 1) + +#if CONFIG_HEXAGON_ARCH_VERSION >= 4 +#define arch_has_single_step() (1) +#endif + + #endif diff --git a/usr/include/asm-hexagon/registers.h b/usr/include/asm-hexagon/registers.h index 4dd741b..487d6ce 100644 --- a/usr/include/asm-hexagon/registers.h +++ b/usr/include/asm-hexagon/registers.h @@ -1,23 +1,8 @@ /* * Register definitions for the Hexagon architecture - * - * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. */ + #ifndef _ASM_REGISTERS_H #define _ASM_REGISTERS_H @@ -72,10 +57,17 @@ struct pt_regs { }; union { struct { - unsigned long gp; unsigned long ugp; + unsigned long gp; + }; + long long int gpugp; + }; + union { + struct { + unsigned long cs0; + unsigned long cs1; }; - long long int ugpgp; + long long int cs1cs0; }; /* * Be extremely careful with rearranging these, if at all. Some code @@ -219,9 +211,11 @@ struct pt_regs { #define pt_psp(regs) ((regs)->hvmer.vmpsp) #define pt_badva(regs) ((regs)->hvmer.vmbadva) +#define pt_set_singlestep(regs) ((regs)->hvmer.vmest |= (1<hvmer.vmest &= ~(1<SP = (unsigned long) &((regs)->hvmer);\ + pt_psp(regs) = (regs)->SP = (sp);\ } while (0) #define pt_set_kmode(regs) \ diff --git a/usr/include/asm-hexagon/setup.h b/usr/include/asm-hexagon/setup.h index 3b754c5..e48285e 100644 --- a/usr/include/asm-hexagon/setup.h +++ b/usr/include/asm-hexagon/setup.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. + * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and diff --git a/usr/include/asm-hexagon/sigcontext.h b/usr/include/asm-hexagon/sigcontext.h index ce6dcd9..b6ba536 100644 --- a/usr/include/asm-hexagon/sigcontext.h +++ b/usr/include/asm-hexagon/sigcontext.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. + * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and diff --git a/usr/include/asm-hexagon/signal.h b/usr/include/asm-hexagon/signal.h index 471c056..98106e5 100644 --- a/usr/include/asm-hexagon/signal.h +++ b/usr/include/asm-hexagon/signal.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. + * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -19,8 +19,12 @@ #ifndef _ASM_SIGNAL_H #define _ASM_SIGNAL_H +#include + extern unsigned long __rt_sigtramp_template[2]; +void do_signal(struct pt_regs *regs); + #include #endif diff --git a/usr/include/asm-hexagon/swab.h b/usr/include/asm-hexagon/swab.h index 99cf0be..9069e92 100644 --- a/usr/include/asm-hexagon/swab.h +++ b/usr/include/asm-hexagon/swab.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. + * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and diff --git a/usr/include/asm-hexagon/unistd.h b/usr/include/asm-hexagon/unistd.h index 4d0ecde..ffee405 100644 --- a/usr/include/asm-hexagon/unistd.h +++ b/usr/include/asm-hexagon/unistd.h @@ -1,7 +1,7 @@ /* * Syscall support for Hexagon * - * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. + * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -18,9 +18,6 @@ * 02110-1301, USA. */ -#if !defined(_ASM_HEXAGON_UNISTD_H) || defined(__SYSCALL) -#define _ASM_HEXAGON_UNISTD_H - /* * The kernel pulls this unistd.h in three different ways: * 1. the "normal" way which gets all the __NR defines @@ -30,7 +27,9 @@ */ #define sys_mmap2 sys_mmap_pgoff +#define __ARCH_WANT_SYS_EXECVE +#define __ARCH_WANT_SYS_CLONE +#define __ARCH_WANT_SYS_VFORK +#define __ARCH_WANT_SYS_FORK #include - -#endif diff --git a/usr/include/asm-hexagon/user.h b/usr/include/asm-hexagon/user.h index 3a55078..3dae94d 100644 --- a/usr/include/asm-hexagon/user.h +++ b/usr/include/asm-hexagon/user.h @@ -1,21 +1,3 @@ -/* - * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - #ifndef HEXAGON_ASM_USER_H #define HEXAGON_ASM_USER_H @@ -73,9 +55,15 @@ struct user_regs_struct { unsigned long pc; unsigned long cause; unsigned long badva; +#if CONFIG_HEXAGON_ARCH_VERSION < 4 unsigned long pad1; /* pad out to 48 words total */ unsigned long pad2; /* pad out to 48 words total */ unsigned long pad3; /* pad out to 48 words total */ +#else + unsigned long cs0; + unsigned long cs1; + unsigned long pad1; /* pad out to 48 words total */ +#endif }; #endif diff --git a/usr/include/asm-ia64/cmpxchg.h b/usr/include/asm-ia64/cmpxchg.h new file mode 100644 index 0000000..4f37dbb --- /dev/null +++ b/usr/include/asm-ia64/cmpxchg.h @@ -0,0 +1,147 @@ +#ifndef _ASM_IA64_CMPXCHG_H +#define _ASM_IA64_CMPXCHG_H + +/* + * Compare/Exchange, forked from asm/intrinsics.h + * which was: + * + * Copyright (C) 2002-2003 Hewlett-Packard Co + * David Mosberger-Tang + */ + +#ifndef __ASSEMBLY__ + +#include +/* include compiler specific intrinsics */ +#include +#ifdef __INTEL_COMPILER +# include +#else +# include +#endif + +/* + * This function doesn't exist, so you'll get a linker error if + * something tries to do an invalid xchg(). + */ +extern void ia64_xchg_called_with_bad_pointer(void); + +#define __xchg(x, ptr, size) \ +({ \ + unsigned long __xchg_result; \ + \ + switch (size) { \ + case 1: \ + __xchg_result = ia64_xchg1((__u8 *)ptr, x); \ + break; \ + \ + case 2: \ + __xchg_result = ia64_xchg2((__u16 *)ptr, x); \ + break; \ + \ + case 4: \ + __xchg_result = ia64_xchg4((__u32 *)ptr, x); \ + break; \ + \ + case 8: \ + __xchg_result = ia64_xchg8((__u64 *)ptr, x); \ + break; \ + default: \ + ia64_xchg_called_with_bad_pointer(); \ + } \ + __xchg_result; \ +}) + +#define xchg(ptr, x) \ +((__typeof__(*(ptr))) __xchg((unsigned long) (x), (ptr), sizeof(*(ptr)))) + +/* + * Atomic compare and exchange. Compare OLD with MEM, if identical, + * store NEW in MEM. Return the initial value in MEM. Success is + * indicated by comparing RETURN with OLD. + */ + +#define __HAVE_ARCH_CMPXCHG 1 + +/* + * This function doesn't exist, so you'll get a linker error + * if something tries to do an invalid cmpxchg(). + */ +extern long ia64_cmpxchg_called_with_bad_pointer(void); + +#define ia64_cmpxchg(sem, ptr, old, new, size) \ +({ \ + __u64 _o_, _r_; \ + \ + switch (size) { \ + case 1: \ + _o_ = (__u8) (long) (old); \ + break; \ + case 2: \ + _o_ = (__u16) (long) (old); \ + break; \ + case 4: \ + _o_ = (__u32) (long) (old); \ + break; \ + case 8: \ + _o_ = (__u64) (long) (old); \ + break; \ + default: \ + break; \ + } \ + switch (size) { \ + case 1: \ + _r_ = ia64_cmpxchg1_##sem((__u8 *) ptr, new, _o_); \ + break; \ + \ + case 2: \ + _r_ = ia64_cmpxchg2_##sem((__u16 *) ptr, new, _o_); \ + break; \ + \ + case 4: \ + _r_ = ia64_cmpxchg4_##sem((__u32 *) ptr, new, _o_); \ + break; \ + \ + case 8: \ + _r_ = ia64_cmpxchg8_##sem((__u64 *) ptr, new, _o_); \ + break; \ + \ + default: \ + _r_ = ia64_cmpxchg_called_with_bad_pointer(); \ + break; \ + } \ + (__typeof__(old)) _r_; \ +}) + +#define cmpxchg_acq(ptr, o, n) \ + ia64_cmpxchg(acq, (ptr), (o), (n), sizeof(*(ptr))) +#define cmpxchg_rel(ptr, o, n) \ + ia64_cmpxchg(rel, (ptr), (o), (n), sizeof(*(ptr))) + +/* for compatibility with other platforms: */ +#define cmpxchg(ptr, o, n) cmpxchg_acq((ptr), (o), (n)) +#define cmpxchg64(ptr, o, n) cmpxchg_acq((ptr), (o), (n)) + +#define cmpxchg_local cmpxchg +#define cmpxchg64_local cmpxchg64 + +#ifdef CONFIG_IA64_DEBUG_CMPXCHG +# define CMPXCHG_BUGCHECK_DECL int _cmpxchg_bugcheck_count = 128; +# define CMPXCHG_BUGCHECK(v) \ +do { \ + if (_cmpxchg_bugcheck_count-- <= 0) { \ + void *ip; \ + extern int printk(const char *fmt, ...); \ + ip = (void *) ia64_getreg(_IA64_REG_IP); \ + printk("CMPXCHG_BUGCHECK: stuck at %p on word %p\n", ip, (v));\ + break; \ + } \ +} while (0) +#else /* !CONFIG_IA64_DEBUG_CMPXCHG */ +# define CMPXCHG_BUGCHECK_DECL +# define CMPXCHG_BUGCHECK(v) +#endif /* !CONFIG_IA64_DEBUG_CMPXCHG */ + +#endif /* !__ASSEMBLY__ */ + +#endif /* _ASM_IA64_CMPXCHG_H */ diff --git a/usr/include/asm-ia64/gcc_intrin.h b/usr/include/asm-ia64/gcc_intrin.h index 1296e22..1801c4e 100644 --- a/usr/include/asm-ia64/gcc_intrin.h +++ b/usr/include/asm-ia64/gcc_intrin.h @@ -1,10 +1,10 @@ -#ifndef _ASM_IA64_GCC_INTRIN_H -#define _ASM_IA64_GCC_INTRIN_H /* * * Copyright (C) 2002,2003 Jun Nakajima * Copyright (C) 2002,2003 Suresh Siddha */ +#ifndef _ASM_IA64_GCC_INTRIN_H +#define _ASM_IA64_GCC_INTRIN_H #include @@ -14,17 +14,17 @@ /* Optimization barrier */ /* The "volatile" is due to gcc bugs */ -#define ia64_barrier() __asm__ __volatile__ ("":::"memory") +#define ia64_barrier() __asm__ volatile ("":::"memory") -#define ia64_stop() __asm__ __volatile__ (";;"::) +#define ia64_stop() __asm__ volatile (";;"::) -#define ia64_invala_gr(regnum) __asm__ __volatile__ ("invala.e r%0" :: "i"(regnum)) +#define ia64_invala_gr(regnum) __asm__ volatile ("invala.e r%0" :: "i"(regnum)) -#define ia64_invala_fr(regnum) __asm__ __volatile__ ("invala.e f%0" :: "i"(regnum)) +#define ia64_invala_fr(regnum) __asm__ volatile ("invala.e f%0" :: "i"(regnum)) -#define ia64_flushrs() __asm__ __volatile__ ("flushrs;;":::"memory") +#define ia64_flushrs() __asm__ volatile ("flushrs;;":::"memory") -#define ia64_loadrs() __asm__ __volatile__ ("loadrs;;":::"memory") +#define ia64_loadrs() __asm__ volatile ("loadrs;;":::"memory") extern void ia64_bad_param_for_setreg (void); extern void ia64_bad_param_for_getreg (void); @@ -34,24 +34,24 @@ extern void ia64_bad_param_for_getreg (void); ({ \ switch (regnum) { \ case _IA64_REG_PSR_L: \ - __asm__ __volatile__ ("mov psr.l=%0" :: "r"(val) : "memory"); \ + __asm__ volatile ("mov psr.l=%0" :: "r"(val) : "memory"); \ break; \ case _IA64_REG_AR_KR0 ... _IA64_REG_AR_EC: \ - __asm__ __volatile__ ("mov ar%0=%1" :: \ + __asm__ volatile ("mov ar%0=%1" :: \ "i" (regnum - _IA64_REG_AR_KR0), \ "r"(val): "memory"); \ break; \ case _IA64_REG_CR_DCR ... _IA64_REG_CR_LRR1: \ - __asm__ __volatile__ ("mov cr%0=%1" :: \ + __asm__ volatile ("mov cr%0=%1" :: \ "i" (regnum - _IA64_REG_CR_DCR), \ "r"(val): "memory" ); \ break; \ case _IA64_REG_SP: \ - __asm__ __volatile__ ("mov r12=%0" :: \ + __asm__ volatile ("mov r12=%0" :: \ "r"(val): "memory"); \ break; \ case _IA64_REG_GP: \ - __asm__ __volatile__ ("mov gp=%0" :: "r"(val) : "memory"); \ + __asm__ volatile ("mov gp=%0" :: "r"(val) : "memory"); \ break; \ default: \ ia64_bad_param_for_setreg(); \ @@ -65,27 +65,27 @@ extern void ia64_bad_param_for_getreg (void); \ switch (regnum) { \ case _IA64_REG_GP: \ - __asm__ __volatile__ ("mov %0=gp" : "=r"(ia64_intri_res)); \ + __asm__ volatile ("mov %0=gp" : "=r"(ia64_intri_res)); \ break; \ case _IA64_REG_IP: \ - __asm__ __volatile__ ("mov %0=ip" : "=r"(ia64_intri_res)); \ + __asm__ volatile ("mov %0=ip" : "=r"(ia64_intri_res)); \ break; \ case _IA64_REG_PSR: \ - __asm__ __volatile__ ("mov %0=psr" : "=r"(ia64_intri_res)); \ + __asm__ volatile ("mov %0=psr" : "=r"(ia64_intri_res)); \ break; \ case _IA64_REG_TP: /* for current() */ \ ia64_intri_res = ia64_r13; \ break; \ case _IA64_REG_AR_KR0 ... _IA64_REG_AR_EC: \ - __asm__ __volatile__ ("mov %0=ar%1" : "=r" (ia64_intri_res) \ + __asm__ volatile ("mov %0=ar%1" : "=r" (ia64_intri_res) \ : "i"(regnum - _IA64_REG_AR_KR0)); \ break; \ case _IA64_REG_CR_DCR ... _IA64_REG_CR_LRR1: \ - __asm__ __volatile__ ("mov %0=cr%1" : "=r" (ia64_intri_res) \ + __asm__ volatile ("mov %0=cr%1" : "=r" (ia64_intri_res) \ : "i" (regnum - _IA64_REG_CR_DCR)); \ break; \ case _IA64_REG_SP: \ - __asm__ __volatile__ ("mov %0=sp" : "=r" (ia64_intri_res)); \ + __asm__ volatile ("mov %0=sp" : "=r" (ia64_intri_res)); \ break; \ default: \ ia64_bad_param_for_getreg(); \ @@ -100,7 +100,7 @@ extern void ia64_bad_param_for_getreg (void); ({ \ switch (mode) { \ case ia64_hint_pause: \ - __asm__ __volatile__ ("hint @pause" ::: "memory"); \ + __asm__ volatile ("hint @pause" ::: "memory"); \ break; \ } \ }) @@ -168,73 +168,73 @@ extern void ia64_bad_param_for_getreg (void); #define ia64_ldfs(regnum, x) \ ({ \ register double __f__ __asm__ ("f"#regnum); \ - __asm__ __volatile__ ("ldfs %0=[%1]" :"=f"(__f__): "r"(x)); \ + __asm__ volatile ("ldfs %0=[%1]" :"=f"(__f__): "r"(x)); \ }) #define ia64_ldfd(regnum, x) \ ({ \ register double __f__ __asm__ ("f"#regnum); \ - __asm__ __volatile__ ("ldfd %0=[%1]" :"=f"(__f__): "r"(x)); \ + __asm__ volatile ("ldfd %0=[%1]" :"=f"(__f__): "r"(x)); \ }) #define ia64_ldfe(regnum, x) \ ({ \ register double __f__ __asm__ ("f"#regnum); \ - __asm__ __volatile__ ("ldfe %0=[%1]" :"=f"(__f__): "r"(x)); \ + __asm__ volatile ("ldfe %0=[%1]" :"=f"(__f__): "r"(x)); \ }) #define ia64_ldf8(regnum, x) \ ({ \ register double __f__ __asm__ ("f"#regnum); \ - __asm__ __volatile__ ("ldf8 %0=[%1]" :"=f"(__f__): "r"(x)); \ + __asm__ volatile ("ldf8 %0=[%1]" :"=f"(__f__): "r"(x)); \ }) #define ia64_ldf_fill(regnum, x) \ ({ \ register double __f__ __asm__ ("f"#regnum); \ - __asm__ __volatile__ ("ldf.fill %0=[%1]" :"=f"(__f__): "r"(x)); \ + __asm__ volatile ("ldf.fill %0=[%1]" :"=f"(__f__): "r"(x)); \ }) #define ia64_st4_rel_nta(m, val) \ ({ \ - __asm__ __volatile__ ("st4.rel.nta [%0] = %1\n\t" :: "r"(m), "r"(val)); \ + __asm__ volatile ("st4.rel.nta [%0] = %1\n\t" :: "r"(m), "r"(val)); \ }) #define ia64_stfs(x, regnum) \ ({ \ register double __f__ __asm__ ("f"#regnum); \ - __asm__ __volatile__ ("stfs [%0]=%1" :: "r"(x), "f"(__f__) : "memory"); \ + __asm__ volatile ("stfs [%0]=%1" :: "r"(x), "f"(__f__) : "memory"); \ }) #define ia64_stfd(x, regnum) \ ({ \ register double __f__ __asm__ ("f"#regnum); \ - __asm__ __volatile__ ("stfd [%0]=%1" :: "r"(x), "f"(__f__) : "memory"); \ + __asm__ volatile ("stfd [%0]=%1" :: "r"(x), "f"(__f__) : "memory"); \ }) #define ia64_stfe(x, regnum) \ ({ \ register double __f__ __asm__ ("f"#regnum); \ - __asm__ __volatile__ ("stfe [%0]=%1" :: "r"(x), "f"(__f__) : "memory"); \ + __asm__ volatile ("stfe [%0]=%1" :: "r"(x), "f"(__f__) : "memory"); \ }) #define ia64_stf8(x, regnum) \ ({ \ register double __f__ __asm__ ("f"#regnum); \ - __asm__ __volatile__ ("stf8 [%0]=%1" :: "r"(x), "f"(__f__) : "memory"); \ + __asm__ volatile ("stf8 [%0]=%1" :: "r"(x), "f"(__f__) : "memory"); \ }) #define ia64_stf_spill(x, regnum) \ ({ \ register double __f__ __asm__ ("f"#regnum); \ - __asm__ __volatile__ ("stf.spill [%0]=%1" :: "r"(x), "f"(__f__) : "memory"); \ + __asm__ volatile ("stf.spill [%0]=%1" :: "r"(x), "f"(__f__) : "memory"); \ }) #define ia64_fetchadd4_acq(p, inc) \ ({ \ \ __u64 ia64_intri_res; \ - __asm__ __volatile__ ("fetchadd4.acq %0=[%1],%2" \ + __asm__ volatile ("fetchadd4.acq %0=[%1],%2" \ : "=r"(ia64_intri_res) : "r"(p), "i" (inc) \ : "memory"); \ \ @@ -244,7 +244,7 @@ extern void ia64_bad_param_for_getreg (void); #define ia64_fetchadd4_rel(p, inc) \ ({ \ __u64 ia64_intri_res; \ - __asm__ __volatile__ ("fetchadd4.rel %0=[%1],%2" \ + __asm__ volatile ("fetchadd4.rel %0=[%1],%2" \ : "=r"(ia64_intri_res) : "r"(p), "i" (inc) \ : "memory"); \ \ @@ -255,7 +255,7 @@ extern void ia64_bad_param_for_getreg (void); ({ \ \ __u64 ia64_intri_res; \ - __asm__ __volatile__ ("fetchadd8.acq %0=[%1],%2" \ + __asm__ volatile ("fetchadd8.acq %0=[%1],%2" \ : "=r"(ia64_intri_res) : "r"(p), "i" (inc) \ : "memory"); \ \ @@ -265,7 +265,7 @@ extern void ia64_bad_param_for_getreg (void); #define ia64_fetchadd8_rel(p, inc) \ ({ \ __u64 ia64_intri_res; \ - __asm__ __volatile__ ("fetchadd8.rel %0=[%1],%2" \ + __asm__ volatile ("fetchadd8.rel %0=[%1],%2" \ : "=r"(ia64_intri_res) : "r"(p), "i" (inc) \ : "memory"); \ \ @@ -275,7 +275,7 @@ extern void ia64_bad_param_for_getreg (void); #define ia64_xchg1(ptr,x) \ ({ \ __u64 ia64_intri_res; \ - __asm__ __volatile__ ("xchg1 %0=[%1],%2" \ + __asm__ volatile ("xchg1 %0=[%1],%2" \ : "=r" (ia64_intri_res) : "r" (ptr), "r" (x) : "memory"); \ ia64_intri_res; \ }) @@ -283,7 +283,7 @@ extern void ia64_bad_param_for_getreg (void); #define ia64_xchg2(ptr,x) \ ({ \ __u64 ia64_intri_res; \ - __asm__ __volatile__ ("xchg2 %0=[%1],%2" : "=r" (ia64_intri_res) \ + __asm__ volatile ("xchg2 %0=[%1],%2" : "=r" (ia64_intri_res) \ : "r" (ptr), "r" (x) : "memory"); \ ia64_intri_res; \ }) @@ -291,7 +291,7 @@ extern void ia64_bad_param_for_getreg (void); #define ia64_xchg4(ptr,x) \ ({ \ __u64 ia64_intri_res; \ - __asm__ __volatile__ ("xchg4 %0=[%1],%2" : "=r" (ia64_intri_res) \ + __asm__ volatile ("xchg4 %0=[%1],%2" : "=r" (ia64_intri_res) \ : "r" (ptr), "r" (x) : "memory"); \ ia64_intri_res; \ }) @@ -299,7 +299,7 @@ extern void ia64_bad_param_for_getreg (void); #define ia64_xchg8(ptr,x) \ ({ \ __u64 ia64_intri_res; \ - __asm__ __volatile__ ("xchg8 %0=[%1],%2" : "=r" (ia64_intri_res) \ + __asm__ volatile ("xchg8 %0=[%1],%2" : "=r" (ia64_intri_res) \ : "r" (ptr), "r" (x) : "memory"); \ ia64_intri_res; \ }) @@ -307,8 +307,8 @@ extern void ia64_bad_param_for_getreg (void); #define ia64_cmpxchg1_acq(ptr, new, old) \ ({ \ __u64 ia64_intri_res; \ - __asm__ __volatile__ ("mov ar.ccv=%0;;" :: "rO"(old)); \ - __asm__ __volatile__ ("cmpxchg1.acq %0=[%1],%2,ar.ccv": \ + __asm__ volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \ + __asm__ volatile ("cmpxchg1.acq %0=[%1],%2,ar.ccv": \ "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory"); \ ia64_intri_res; \ }) @@ -316,8 +316,8 @@ extern void ia64_bad_param_for_getreg (void); #define ia64_cmpxchg1_rel(ptr, new, old) \ ({ \ __u64 ia64_intri_res; \ - __asm__ __volatile__ ("mov ar.ccv=%0;;" :: "rO"(old)); \ - __asm__ __volatile__ ("cmpxchg1.rel %0=[%1],%2,ar.ccv": \ + __asm__ volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \ + __asm__ volatile ("cmpxchg1.rel %0=[%1],%2,ar.ccv": \ "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory"); \ ia64_intri_res; \ }) @@ -325,8 +325,8 @@ extern void ia64_bad_param_for_getreg (void); #define ia64_cmpxchg2_acq(ptr, new, old) \ ({ \ __u64 ia64_intri_res; \ - __asm__ __volatile__ ("mov ar.ccv=%0;;" :: "rO"(old)); \ - __asm__ __volatile__ ("cmpxchg2.acq %0=[%1],%2,ar.ccv": \ + __asm__ volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \ + __asm__ volatile ("cmpxchg2.acq %0=[%1],%2,ar.ccv": \ "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory"); \ ia64_intri_res; \ }) @@ -334,9 +334,9 @@ extern void ia64_bad_param_for_getreg (void); #define ia64_cmpxchg2_rel(ptr, new, old) \ ({ \ __u64 ia64_intri_res; \ - __asm__ __volatile__ ("mov ar.ccv=%0;;" :: "rO"(old)); \ + __asm__ volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \ \ - __asm__ __volatile__ ("cmpxchg2.rel %0=[%1],%2,ar.ccv": \ + __asm__ volatile ("cmpxchg2.rel %0=[%1],%2,ar.ccv": \ "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory"); \ ia64_intri_res; \ }) @@ -344,8 +344,8 @@ extern void ia64_bad_param_for_getreg (void); #define ia64_cmpxchg4_acq(ptr, new, old) \ ({ \ __u64 ia64_intri_res; \ - __asm__ __volatile__ ("mov ar.ccv=%0;;" :: "rO"(old)); \ - __asm__ __volatile__ ("cmpxchg4.acq %0=[%1],%2,ar.ccv": \ + __asm__ volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \ + __asm__ volatile ("cmpxchg4.acq %0=[%1],%2,ar.ccv": \ "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory"); \ ia64_intri_res; \ }) @@ -353,8 +353,8 @@ extern void ia64_bad_param_for_getreg (void); #define ia64_cmpxchg4_rel(ptr, new, old) \ ({ \ __u64 ia64_intri_res; \ - __asm__ __volatile__ ("mov ar.ccv=%0;;" :: "rO"(old)); \ - __asm__ __volatile__ ("cmpxchg4.rel %0=[%1],%2,ar.ccv": \ + __asm__ volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \ + __asm__ volatile ("cmpxchg4.rel %0=[%1],%2,ar.ccv": \ "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory"); \ ia64_intri_res; \ }) @@ -362,8 +362,8 @@ extern void ia64_bad_param_for_getreg (void); #define ia64_cmpxchg8_acq(ptr, new, old) \ ({ \ __u64 ia64_intri_res; \ - __asm__ __volatile__ ("mov ar.ccv=%0;;" :: "rO"(old)); \ - __asm__ __volatile__ ("cmpxchg8.acq %0=[%1],%2,ar.ccv": \ + __asm__ volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \ + __asm__ volatile ("cmpxchg8.acq %0=[%1],%2,ar.ccv": \ "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory"); \ ia64_intri_res; \ }) @@ -371,106 +371,106 @@ extern void ia64_bad_param_for_getreg (void); #define ia64_cmpxchg8_rel(ptr, new, old) \ ({ \ __u64 ia64_intri_res; \ - __asm__ __volatile__ ("mov ar.ccv=%0;;" :: "rO"(old)); \ + __asm__ volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \ \ - __asm__ __volatile__ ("cmpxchg8.rel %0=[%1],%2,ar.ccv": \ + __asm__ volatile ("cmpxchg8.rel %0=[%1],%2,ar.ccv": \ "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory"); \ ia64_intri_res; \ }) -#define ia64_mf() __asm__ __volatile__ ("mf" ::: "memory") -#define ia64_mfa() __asm__ __volatile__ ("mf.a" ::: "memory") +#define ia64_mf() __asm__ volatile ("mf" ::: "memory") +#define ia64_mfa() __asm__ volatile ("mf.a" ::: "memory") -#define ia64_invala() __asm__ __volatile__ ("invala" ::: "memory") +#define ia64_invala() __asm__ volatile ("invala" ::: "memory") #define ia64_native_thash(addr) \ ({ \ unsigned long ia64_intri_res; \ - __asm__ __volatile__ ("thash %0=%1" : "=r"(ia64_intri_res) : "r" (addr)); \ + __asm__ volatile ("thash %0=%1" : "=r"(ia64_intri_res) : "r" (addr)); \ ia64_intri_res; \ }) -#define ia64_srlz_i() __asm__ __volatile__ (";; srlz.i ;;" ::: "memory") -#define ia64_srlz_d() __asm__ __volatile__ (";; srlz.d" ::: "memory"); +#define ia64_srlz_i() __asm__ volatile (";; srlz.i ;;" ::: "memory") +#define ia64_srlz_d() __asm__ volatile (";; srlz.d" ::: "memory"); #ifdef HAVE_SERIALIZE_DIRECTIVE -# define ia64_dv_serialize_data() __asm__ __volatile__ (".serialize.data"); -# define ia64_dv_serialize_instruction() __asm__ __volatile__ (".serialize.instruction"); +# define ia64_dv_serialize_data() __asm__ volatile (".serialize.data"); +# define ia64_dv_serialize_instruction() __asm__ volatile (".serialize.instruction"); #else # define ia64_dv_serialize_data() # define ia64_dv_serialize_instruction() #endif -#define ia64_nop(x) __asm__ __volatile__ ("nop %0"::"i"(x)); +#define ia64_nop(x) __asm__ volatile ("nop %0"::"i"(x)); -#define ia64_itci(addr) __asm__ __volatile__ ("itc.i %0;;" :: "r"(addr) : "memory") +#define ia64_itci(addr) __asm__ volatile ("itc.i %0;;" :: "r"(addr) : "memory") -#define ia64_itcd(addr) __asm__ __volatile__ ("itc.d %0;;" :: "r"(addr) : "memory") +#define ia64_itcd(addr) __asm__ volatile ("itc.d %0;;" :: "r"(addr) : "memory") -#define ia64_itri(trnum, addr) __asm__ __volatile__ ("itr.i itr[%0]=%1" \ +#define ia64_itri(trnum, addr) __asm__ volatile ("itr.i itr[%0]=%1" \ :: "r"(trnum), "r"(addr) : "memory") -#define ia64_itrd(trnum, addr) __asm__ __volatile__ ("itr.d dtr[%0]=%1" \ +#define ia64_itrd(trnum, addr) __asm__ volatile ("itr.d dtr[%0]=%1" \ :: "r"(trnum), "r"(addr) : "memory") #define ia64_tpa(addr) \ ({ \ unsigned long ia64_pa; \ - __asm__ __volatile__ ("tpa %0 = %1" : "=r"(ia64_pa) : "r"(addr) : "memory"); \ + __asm__ volatile ("tpa %0 = %1" : "=r"(ia64_pa) : "r"(addr) : "memory"); \ ia64_pa; \ }) #define __ia64_set_dbr(index, val) \ - __asm__ __volatile__ ("mov dbr[%0]=%1" :: "r"(index), "r"(val) : "memory") + __asm__ volatile ("mov dbr[%0]=%1" :: "r"(index), "r"(val) : "memory") #define ia64_set_ibr(index, val) \ - __asm__ __volatile__ ("mov ibr[%0]=%1" :: "r"(index), "r"(val) : "memory") + __asm__ volatile ("mov ibr[%0]=%1" :: "r"(index), "r"(val) : "memory") #define ia64_set_pkr(index, val) \ - __asm__ __volatile__ ("mov pkr[%0]=%1" :: "r"(index), "r"(val) : "memory") + __asm__ volatile ("mov pkr[%0]=%1" :: "r"(index), "r"(val) : "memory") #define ia64_set_pmc(index, val) \ - __asm__ __volatile__ ("mov pmc[%0]=%1" :: "r"(index), "r"(val) : "memory") + __asm__ volatile ("mov pmc[%0]=%1" :: "r"(index), "r"(val) : "memory") #define ia64_set_pmd(index, val) \ - __asm__ __volatile__ ("mov pmd[%0]=%1" :: "r"(index), "r"(val) : "memory") + __asm__ volatile ("mov pmd[%0]=%1" :: "r"(index), "r"(val) : "memory") #define ia64_native_set_rr(index, val) \ - __asm__ __volatile__ ("mov rr[%0]=%1" :: "r"(index), "r"(val) : "memory"); + __asm__ volatile ("mov rr[%0]=%1" :: "r"(index), "r"(val) : "memory"); #define ia64_native_get_cpuid(index) \ ({ \ unsigned long ia64_intri_res; \ - __asm__ __volatile__ ("mov %0=cpuid[%r1]" : "=r"(ia64_intri_res) : "rO"(index)); \ + __asm__ volatile ("mov %0=cpuid[%r1]" : "=r"(ia64_intri_res) : "rO"(index)); \ ia64_intri_res; \ }) #define __ia64_get_dbr(index) \ ({ \ unsigned long ia64_intri_res; \ - __asm__ __volatile__ ("mov %0=dbr[%1]" : "=r"(ia64_intri_res) : "r"(index)); \ + __asm__ volatile ("mov %0=dbr[%1]" : "=r"(ia64_intri_res) : "r"(index)); \ ia64_intri_res; \ }) #define ia64_get_ibr(index) \ ({ \ unsigned long ia64_intri_res; \ - __asm__ __volatile__ ("mov %0=ibr[%1]" : "=r"(ia64_intri_res) : "r"(index)); \ + __asm__ volatile ("mov %0=ibr[%1]" : "=r"(ia64_intri_res) : "r"(index)); \ ia64_intri_res; \ }) #define ia64_get_pkr(index) \ ({ \ unsigned long ia64_intri_res; \ - __asm__ __volatile__ ("mov %0=pkr[%1]" : "=r"(ia64_intri_res) : "r"(index)); \ + __asm__ volatile ("mov %0=pkr[%1]" : "=r"(ia64_intri_res) : "r"(index)); \ ia64_intri_res; \ }) #define ia64_get_pmc(index) \ ({ \ unsigned long ia64_intri_res; \ - __asm__ __volatile__ ("mov %0=pmc[%1]" : "=r"(ia64_intri_res) : "r"(index)); \ + __asm__ volatile ("mov %0=pmc[%1]" : "=r"(ia64_intri_res) : "r"(index)); \ ia64_intri_res; \ }) @@ -478,51 +478,51 @@ extern void ia64_bad_param_for_getreg (void); #define ia64_native_get_pmd(index) \ ({ \ unsigned long ia64_intri_res; \ - __asm__ __volatile__ ("mov %0=pmd[%1]" : "=r"(ia64_intri_res) : "r"(index)); \ + __asm__ volatile ("mov %0=pmd[%1]" : "=r"(ia64_intri_res) : "r"(index)); \ ia64_intri_res; \ }) #define ia64_native_get_rr(index) \ ({ \ unsigned long ia64_intri_res; \ - __asm__ __volatile__ ("mov %0=rr[%1]" : "=r"(ia64_intri_res) : "r" (index)); \ + __asm__ volatile ("mov %0=rr[%1]" : "=r"(ia64_intri_res) : "r" (index)); \ ia64_intri_res; \ }) -#define ia64_native_fc(addr) __asm__ __volatile__ ("fc %0" :: "r"(addr) : "memory") +#define ia64_native_fc(addr) __asm__ volatile ("fc %0" :: "r"(addr) : "memory") -#define ia64_sync_i() __asm__ __volatile__ (";; sync.i" ::: "memory") +#define ia64_sync_i() __asm__ volatile (";; sync.i" ::: "memory") -#define ia64_native_ssm(mask) __asm__ __volatile__ ("ssm %0":: "i"((mask)) : "memory") -#define ia64_native_rsm(mask) __asm__ __volatile__ ("rsm %0":: "i"((mask)) : "memory") -#define ia64_sum(mask) __asm__ __volatile__ ("sum %0":: "i"((mask)) : "memory") -#define ia64_rum(mask) __asm__ __volatile__ ("rum %0":: "i"((mask)) : "memory") +#define ia64_native_ssm(mask) __asm__ volatile ("ssm %0":: "i"((mask)) : "memory") +#define ia64_native_rsm(mask) __asm__ volatile ("rsm %0":: "i"((mask)) : "memory") +#define ia64_sum(mask) __asm__ volatile ("sum %0":: "i"((mask)) : "memory") +#define ia64_rum(mask) __asm__ volatile ("rum %0":: "i"((mask)) : "memory") -#define ia64_ptce(addr) __asm__ __volatile__ ("ptc.e %0" :: "r"(addr)) +#define ia64_ptce(addr) __asm__ volatile ("ptc.e %0" :: "r"(addr)) #define ia64_native_ptcga(addr, size) \ do { \ - __asm__ __volatile__ ("ptc.ga %0,%1" :: "r"(addr), "r"(size) : "memory"); \ + __asm__ volatile ("ptc.ga %0,%1" :: "r"(addr), "r"(size) : "memory"); \ ia64_dv_serialize_data(); \ } while (0) #define ia64_ptcl(addr, size) \ do { \ - __asm__ __volatile__ ("ptc.l %0,%1" :: "r"(addr), "r"(size) : "memory"); \ + __asm__ volatile ("ptc.l %0,%1" :: "r"(addr), "r"(size) : "memory"); \ ia64_dv_serialize_data(); \ } while (0) #define ia64_ptri(addr, size) \ - __asm__ __volatile__ ("ptr.i %0,%1" :: "r"(addr), "r"(size) : "memory") + __asm__ volatile ("ptr.i %0,%1" :: "r"(addr), "r"(size) : "memory") #define ia64_ptrd(addr, size) \ - __asm__ __volatile__ ("ptr.d %0,%1" :: "r"(addr), "r"(size) : "memory") + __asm__ volatile ("ptr.d %0,%1" :: "r"(addr), "r"(size) : "memory") #define ia64_ttag(addr) \ ({ \ __u64 ia64_intri_res; \ - __asm__ __volatile__ ("ttag %0=%1" : "=r"(ia64_intri_res) : "r" (addr)); \ + __asm__ volatile ("ttag %0=%1" : "=r"(ia64_intri_res) : "r" (addr)); \ ia64_intri_res; \ }) @@ -538,16 +538,16 @@ do { \ ({ \ switch (lfhint) { \ case ia64_lfhint_none: \ - __asm__ __volatile__ ("lfetch [%0]" : : "r"(y)); \ + __asm__ volatile ("lfetch [%0]" : : "r"(y)); \ break; \ case ia64_lfhint_nt1: \ - __asm__ __volatile__ ("lfetch.nt1 [%0]" : : "r"(y)); \ + __asm__ volatile ("lfetch.nt1 [%0]" : : "r"(y)); \ break; \ case ia64_lfhint_nt2: \ - __asm__ __volatile__ ("lfetch.nt2 [%0]" : : "r"(y)); \ + __asm__ volatile ("lfetch.nt2 [%0]" : : "r"(y)); \ break; \ case ia64_lfhint_nta: \ - __asm__ __volatile__ ("lfetch.nta [%0]" : : "r"(y)); \ + __asm__ volatile ("lfetch.nta [%0]" : : "r"(y)); \ break; \ } \ }) @@ -556,16 +556,16 @@ do { \ ({ \ switch (lfhint) { \ case ia64_lfhint_none: \ - __asm__ __volatile__ ("lfetch.excl [%0]" :: "r"(y)); \ + __asm__ volatile ("lfetch.excl [%0]" :: "r"(y)); \ break; \ case ia64_lfhint_nt1: \ - __asm__ __volatile__ ("lfetch.excl.nt1 [%0]" :: "r"(y)); \ + __asm__ volatile ("lfetch.excl.nt1 [%0]" :: "r"(y)); \ break; \ case ia64_lfhint_nt2: \ - __asm__ __volatile__ ("lfetch.excl.nt2 [%0]" :: "r"(y)); \ + __asm__ volatile ("lfetch.excl.nt2 [%0]" :: "r"(y)); \ break; \ case ia64_lfhint_nta: \ - __asm__ __volatile__ ("lfetch.excl.nta [%0]" :: "r"(y)); \ + __asm__ volatile ("lfetch.excl.nta [%0]" :: "r"(y)); \ break; \ } \ }) @@ -574,16 +574,16 @@ do { \ ({ \ switch (lfhint) { \ case ia64_lfhint_none: \ - __asm__ __volatile__ ("lfetch.fault [%0]" : : "r"(y)); \ + __asm__ volatile ("lfetch.fault [%0]" : : "r"(y)); \ break; \ case ia64_lfhint_nt1: \ - __asm__ __volatile__ ("lfetch.fault.nt1 [%0]" : : "r"(y)); \ + __asm__ volatile ("lfetch.fault.nt1 [%0]" : : "r"(y)); \ break; \ case ia64_lfhint_nt2: \ - __asm__ __volatile__ ("lfetch.fault.nt2 [%0]" : : "r"(y)); \ + __asm__ volatile ("lfetch.fault.nt2 [%0]" : : "r"(y)); \ break; \ case ia64_lfhint_nta: \ - __asm__ __volatile__ ("lfetch.fault.nta [%0]" : : "r"(y)); \ + __asm__ volatile ("lfetch.fault.nta [%0]" : : "r"(y)); \ break; \ } \ }) @@ -592,23 +592,23 @@ do { \ ({ \ switch (lfhint) { \ case ia64_lfhint_none: \ - __asm__ __volatile__ ("lfetch.fault.excl [%0]" :: "r"(y)); \ + __asm__ volatile ("lfetch.fault.excl [%0]" :: "r"(y)); \ break; \ case ia64_lfhint_nt1: \ - __asm__ __volatile__ ("lfetch.fault.excl.nt1 [%0]" :: "r"(y)); \ + __asm__ volatile ("lfetch.fault.excl.nt1 [%0]" :: "r"(y)); \ break; \ case ia64_lfhint_nt2: \ - __asm__ __volatile__ ("lfetch.fault.excl.nt2 [%0]" :: "r"(y)); \ + __asm__ volatile ("lfetch.fault.excl.nt2 [%0]" :: "r"(y)); \ break; \ case ia64_lfhint_nta: \ - __asm__ __volatile__ ("lfetch.fault.excl.nta [%0]" :: "r"(y)); \ + __asm__ volatile ("lfetch.fault.excl.nta [%0]" :: "r"(y)); \ break; \ } \ }) #define ia64_native_intrin_local_irq_restore(x) \ do { \ - __asm__ __volatile__ (";; cmp.ne p6,p7=%0,r0;;" \ + __asm__ volatile (";; cmp.ne p6,p7=%0,r0;;" \ "(p6) ssm psr.i;" \ "(p7) rsm psr.i;;" \ "(p6) srlz.d" \ diff --git a/usr/include/asm-ia64/intrinsics.h b/usr/include/asm-ia64/intrinsics.h index 50091a1..71c4096 100644 --- a/usr/include/asm-ia64/intrinsics.h +++ b/usr/include/asm-ia64/intrinsics.h @@ -1,12 +1,12 @@ -#ifndef _ASM_IA64_INTRINSICS_H -#define _ASM_IA64_INTRINSICS_H - /* * Compiler-dependent intrinsics. * * Copyright (C) 2002-2003 Hewlett-Packard Co * David Mosberger-Tang */ +#ifndef _ASM_IA64_INTRINSICS_H +#define _ASM_IA64_INTRINSICS_H + #ifndef __ASSEMBLY__ diff --git a/usr/include/asm-ia64/kvm.h b/usr/include/asm-ia64/kvm.h index b9f82c8..99503c2 100644 --- a/usr/include/asm-ia64/kvm.h +++ b/usr/include/asm-ia64/kvm.h @@ -26,7 +26,7 @@ /* Select x86 specific features in */ #define __KVM_HAVE_IOAPIC -#define __KVM_HAVE_DEVICE_ASSIGNMENT +#define __KVM_HAVE_IRQ_LINE /* Architectural interrupt line count. */ #define KVM_NR_INTERRUPTS 256 diff --git a/usr/include/asm-ia64/kvm_para.h b/usr/include/asm-ia64/kvm_para.h index 0310eb4..14fab8f 100644 --- a/usr/include/asm-ia64/kvm_para.h +++ b/usr/include/asm-ia64/kvm_para.h @@ -1,23 +1 @@ -#ifndef __IA64_KVM_PARA_H -#define __IA64_KVM_PARA_H - -/* - * Copyright (C) 2007 Xiantao Zhang - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place - Suite 330, Boston, MA 02111-1307 USA. - * - */ - - -#endif +#include diff --git a/usr/include/asm-ia64/mman.h b/usr/include/asm-ia64/mman.h index 54df771..a7a5aee 100644 --- a/usr/include/asm-ia64/mman.h +++ b/usr/include/asm-ia64/mman.h @@ -1,12 +1,12 @@ -#ifndef _ASM_IA64_MMAN_H -#define _ASM_IA64_MMAN_H - /* * Based on . * * Modified 1998-2000, 2002 * David Mosberger-Tang , Hewlett-Packard Co */ +#ifndef _ASM_IA64_MMAN_H +#define _ASM_IA64_MMAN_H + #include diff --git a/usr/include/asm-ia64/param.h b/usr/include/asm-ia64/param.h index 608fda4..a5260ee 100644 --- a/usr/include/asm-ia64/param.h +++ b/usr/include/asm-ia64/param.h @@ -1,6 +1,3 @@ -#ifndef _ASM_IA64_PARAM_H -#define _ASM_IA64_PARAM_H - /* * Fundamental kernel parameters. * @@ -9,6 +6,9 @@ * Modified 1998, 1999, 2002-2003 * David Mosberger-Tang , Hewlett-Packard Co */ +#ifndef _ASM_IA64_PARAM_H +#define _ASM_IA64_PARAM_H + #define EXEC_PAGESIZE 65536 diff --git a/usr/include/asm-ia64/posix_types.h b/usr/include/asm-ia64/posix_types.h index 7323ab9..99ee1d6 100644 --- a/usr/include/asm-ia64/posix_types.h +++ b/usr/include/asm-ia64/posix_types.h @@ -1,9 +1,6 @@ #ifndef _ASM_IA64_POSIX_TYPES_H #define _ASM_IA64_POSIX_TYPES_H -typedef unsigned int __kernel_nlink_t; -#define __kernel_nlink_t __kernel_nlink_t - typedef unsigned long __kernel_sigset_t; /* at least 32 bits */ #include diff --git a/usr/include/asm-ia64/ptrace.h b/usr/include/asm-ia64/ptrace.h index 3238e81..ac3b3a3 100644 --- a/usr/include/asm-ia64/ptrace.h +++ b/usr/include/asm-ia64/ptrace.h @@ -1,6 +1,3 @@ -#ifndef _ASM_IA64_PTRACE_H -#define _ASM_IA64_PTRACE_H - /* * Copyright (C) 1998-2004 Hewlett-Packard Co * David Mosberger-Tang @@ -15,6 +12,9 @@ * 6/17/99 D. Mosberger added second unat member to "struct switch_stack" * */ +#ifndef _ASM_IA64_PTRACE_H +#define _ASM_IA64_PTRACE_H + /* * When a user process is blocked, its state looks as follows: * diff --git a/usr/include/asm-ia64/siginfo.h b/usr/include/asm-ia64/siginfo.h index b4b4000..aa5e43d 100644 --- a/usr/include/asm-ia64/siginfo.h +++ b/usr/include/asm-ia64/siginfo.h @@ -1,12 +1,12 @@ -#ifndef _ASM_IA64_SIGINFO_H -#define _ASM_IA64_SIGINFO_H - /* * Based on . * * Modified 1998-2002 * David Mosberger-Tang , Hewlett-Packard Co */ +#ifndef _ASM_IA64_SIGINFO_H +#define _ASM_IA64_SIGINFO_H + #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) diff --git a/usr/include/asm-ia64/signal.h b/usr/include/asm-ia64/signal.h index 68e4c2b..5fe309e 100644 --- a/usr/include/asm-ia64/signal.h +++ b/usr/include/asm-ia64/signal.h @@ -1,6 +1,3 @@ -#ifndef _ASM_IA64_SIGNAL_H -#define _ASM_IA64_SIGNAL_H - /* * Modified 1998-2001, 2003 * David Mosberger-Tang , Hewlett-Packard Co @@ -8,6 +5,9 @@ * Unfortunately, this file is being included by bits/signal.h in * glibc-2.x. Hence the #ifdef __KERNEL__ ugliness. */ +#ifndef _ASM_IA64_SIGNAL_H +#define _ASM_IA64_SIGNAL_H + #define SIGHUP 1 #define SIGINT 2 @@ -79,12 +79,6 @@ #define SA_RESTORER 0x04000000 /* - * sigaltstack controls - */ -#define SS_ONSTACK 1 -#define SS_DISABLE 2 - -/* * The minimum stack size needs to be fairly large because we want to * be sure that an app compiled for today's CPUs will continue to run * on all future CPU models. The CPU model matters because the signal diff --git a/usr/include/asm-ia64/socket.h b/usr/include/asm-ia64/socket.h index 41fc28a..6b4329f 100644 --- a/usr/include/asm-ia64/socket.h +++ b/usr/include/asm-ia64/socket.h @@ -31,7 +31,7 @@ #define SO_PRIORITY 12 #define SO_LINGER 13 #define SO_BSDCOMPAT 14 -/* To add :#define SO_REUSEPORT 15 */ +#define SO_REUSEPORT 15 #define SO_PASSCRED 16 #define SO_PEERCRED 17 #define SO_RCVLOWAT 18 @@ -49,6 +49,7 @@ /* Socket filtering */ #define SO_ATTACH_FILTER 26 #define SO_DETACH_FILTER 27 +#define SO_GET_FILTER SO_ATTACH_FILTER #define SO_PEERNAME 28 #define SO_TIMESTAMP 29 @@ -78,4 +79,8 @@ /* Instruct lower device to use last 4-bytes of skb data as FCS */ #define SO_NOFCS 43 +#define SO_LOCK_FILTER 44 + +#define SO_SELECT_ERR_QUEUE 45 + #endif /* _ASM_IA64_SOCKET_H */ diff --git a/usr/include/asm-ia64/swab.h b/usr/include/asm-ia64/swab.h index f684fff..5699929 100644 --- a/usr/include/asm-ia64/swab.h +++ b/usr/include/asm-ia64/swab.h @@ -10,7 +10,7 @@ #include -static __inline__ __u64 __arch_swab64(__u64 x) +static __inline__ __u64 __arch_swab64(__u64 x) { __u64 result; @@ -19,13 +19,13 @@ static __inline__ __u64 __arch_swab64(__u64 x) } #define __arch_swab64 __arch_swab64 -static __inline__ __u32 __arch_swab32(__u32 x) +static __inline__ __u32 __arch_swab32(__u32 x) { return __arch_swab64(x) >> 32; } #define __arch_swab32 __arch_swab32 -static __inline__ __u16 __arch_swab16(__u16 x) +static __inline__ __u16 __arch_swab16(__u16 x) { return __arch_swab64(x) >> 48; } diff --git a/usr/include/asm-ia64/termios.h b/usr/include/asm-ia64/termios.h index 668634f..2c0d41a 100644 --- a/usr/include/asm-ia64/termios.h +++ b/usr/include/asm-ia64/termios.h @@ -1,12 +1,12 @@ -#ifndef _ASM_IA64_TERMIOS_H -#define _ASM_IA64_TERMIOS_H - /* * Modified 1999 * David Mosberger-Tang , Hewlett-Packard Co * * 99/01/28 Added N_IRDA and N_SMSBLOCK */ +#ifndef _ASM_IA64_TERMIOS_H +#define _ASM_IA64_TERMIOS_H + #include #include diff --git a/usr/include/asm-ia64/types.h b/usr/include/asm-ia64/types.h index 88dd618..e7127e6 100644 --- a/usr/include/asm-ia64/types.h +++ b/usr/include/asm-ia64/types.h @@ -1,6 +1,3 @@ -#ifndef _ASM_IA64_TYPES_H -#define _ASM_IA64_TYPES_H - /* * This file is never included by application software unless explicitly * requested (e.g., via linux/types.h) in which case the application is @@ -13,6 +10,9 @@ * Modified 1998-2000, 2002 * David Mosberger-Tang , Hewlett-Packard Co */ +#ifndef _ASM_IA64_TYPES_H +#define _ASM_IA64_TYPES_H + #include @@ -24,9 +24,6 @@ # define __IA64_UL(x) ((unsigned long)(x)) # define __IA64_UL_CONST(x) x##UL -/* - * These aren't exported outside the kernel to avoid name space clashes - */ #endif /* !__ASSEMBLY__ */ #endif /* _ASM_IA64_TYPES_H */ diff --git a/usr/include/asm-ia64/unistd.h b/usr/include/asm-ia64/unistd.h index ef5e01b..9bda1a6 100644 --- a/usr/include/asm-ia64/unistd.h +++ b/usr/include/asm-ia64/unistd.h @@ -1,12 +1,12 @@ -#ifndef _ASM_IA64_UNISTD_H -#define _ASM_IA64_UNISTD_H - /* - * IA-64 Linux syscall numbers and __inline__-functions. + * IA-64 Linux syscall numbers and inline-functions. * * Copyright (C) 1998-2005 Hewlett-Packard Co * David Mosberger-Tang */ +#ifndef _ASM_IA64_UNISTD_H +#define _ASM_IA64_UNISTD_H + #include @@ -324,5 +324,6 @@ #define __NR_process_vm_readv 1332 #define __NR_process_vm_writev 1333 #define __NR_accept4 1334 +#define __NR_finit_module 1335 #endif /* _ASM_IA64_UNISTD_H */ diff --git a/usr/include/asm-metag/auxvec.h b/usr/include/asm-metag/auxvec.h new file mode 100644 index 0000000..41fa68b --- /dev/null +++ b/usr/include/asm-metag/auxvec.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-metag/bitsperlong.h b/usr/include/asm-metag/bitsperlong.h new file mode 100644 index 0000000..6dc0bb0 --- /dev/null +++ b/usr/include/asm-metag/bitsperlong.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-metag/byteorder.h b/usr/include/asm-metag/byteorder.h new file mode 100644 index 0000000..9558416 --- /dev/null +++ b/usr/include/asm-metag/byteorder.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-metag/ech.h b/usr/include/asm-metag/ech.h new file mode 100644 index 0000000..de481ca --- /dev/null +++ b/usr/include/asm-metag/ech.h @@ -0,0 +1,15 @@ +#ifndef _METAG_ECH_H +#define _METAG_ECH_H + +/* + * These bits can be set in the top half of the D0.8 register when DSP context + * switching is enabled, in order to support partial DSP context save/restore. + */ + +#define TBICTX_XEXT_BIT 0x1000 /* Enable extended context save */ +#define TBICTX_XTDP_BIT 0x0800 /* DSP accumulators/RAM/templates */ +#define TBICTX_XHL2_BIT 0x0400 /* Hardware loops */ +#define TBICTX_XAXX_BIT 0x0200 /* Extended AX registers (A*.4-7) */ +#define TBICTX_XDX8_BIT 0x0100 /* Extended DX registers (D*.8-15) */ + +#endif /* _METAG_ECH_H */ diff --git a/usr/include/asm-metag/errno.h b/usr/include/asm-metag/errno.h new file mode 100644 index 0000000..4c82b50 --- /dev/null +++ b/usr/include/asm-metag/errno.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-metag/fcntl.h b/usr/include/asm-metag/fcntl.h new file mode 100644 index 0000000..46ab12d --- /dev/null +++ b/usr/include/asm-metag/fcntl.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-metag/ioctl.h b/usr/include/asm-metag/ioctl.h new file mode 100644 index 0000000..b279fe0 --- /dev/null +++ b/usr/include/asm-metag/ioctl.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-metag/ioctls.h b/usr/include/asm-metag/ioctls.h new file mode 100644 index 0000000..ec34c76 --- /dev/null +++ b/usr/include/asm-metag/ioctls.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-metag/ipcbuf.h b/usr/include/asm-metag/ipcbuf.h new file mode 100644 index 0000000..84c7e51 --- /dev/null +++ b/usr/include/asm-metag/ipcbuf.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-metag/mman.h b/usr/include/asm-metag/mman.h new file mode 100644 index 0000000..8eebf89 --- /dev/null +++ b/usr/include/asm-metag/mman.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-metag/msgbuf.h b/usr/include/asm-metag/msgbuf.h new file mode 100644 index 0000000..809134c --- /dev/null +++ b/usr/include/asm-metag/msgbuf.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-metag/param.h b/usr/include/asm-metag/param.h new file mode 100644 index 0000000..965d454 --- /dev/null +++ b/usr/include/asm-metag/param.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-metag/poll.h b/usr/include/asm-metag/poll.h new file mode 100644 index 0000000..c98509d --- /dev/null +++ b/usr/include/asm-metag/poll.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-metag/posix_types.h b/usr/include/asm-metag/posix_types.h new file mode 100644 index 0000000..22cae62 --- /dev/null +++ b/usr/include/asm-metag/posix_types.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-metag/ptrace.h b/usr/include/asm-metag/ptrace.h new file mode 100644 index 0000000..cae3332 --- /dev/null +++ b/usr/include/asm-metag/ptrace.h @@ -0,0 +1,113 @@ +#ifndef _METAG_PTRACE_H +#define _METAG_PTRACE_H + +#ifndef __ASSEMBLY__ + +/* + * These are the layouts of the regsets returned by the GETREGSET ptrace call + */ + +/* user_gp_regs::status */ + +/* CBMarker bit (indicates catch state / catch replay) */ +#define USER_GP_REGS_STATUS_CATCH_BIT (1 << 22) +#define USER_GP_REGS_STATUS_CATCH_S 22 +/* LSM_STEP field (load/store multiple step) */ +#define USER_GP_REGS_STATUS_LSM_STEP_BITS (0x7 << 8) +#define USER_GP_REGS_STATUS_LSM_STEP_S 8 +/* SCC bit (indicates split 16x16 condition flags) */ +#define USER_GP_REGS_STATUS_SCC_BIT (1 << 4) +#define USER_GP_REGS_STATUS_SCC_S 4 + +/* normal condition flags */ +/* CF_Z bit (Zero flag) */ +#define USER_GP_REGS_STATUS_CF_Z_BIT (1 << 3) +#define USER_GP_REGS_STATUS_CF_Z_S 3 +/* CF_N bit (Negative flag) */ +#define USER_GP_REGS_STATUS_CF_N_BIT (1 << 2) +#define USER_GP_REGS_STATUS_CF_N_S 2 +/* CF_V bit (oVerflow flag) */ +#define USER_GP_REGS_STATUS_CF_V_BIT (1 << 1) +#define USER_GP_REGS_STATUS_CF_V_S 1 +/* CF_C bit (Carry flag) */ +#define USER_GP_REGS_STATUS_CF_C_BIT (1 << 0) +#define USER_GP_REGS_STATUS_CF_C_S 0 + +/* split 16x16 condition flags */ +/* SCF_LZ bit (Low Zero flag) */ +#define USER_GP_REGS_STATUS_SCF_LZ_BIT (1 << 3) +#define USER_GP_REGS_STATUS_SCF_LZ_S 3 +/* SCF_HZ bit (High Zero flag) */ +#define USER_GP_REGS_STATUS_SCF_HZ_BIT (1 << 2) +#define USER_GP_REGS_STATUS_SCF_HZ_S 2 +/* SCF_HC bit (High Carry flag) */ +#define USER_GP_REGS_STATUS_SCF_HC_BIT (1 << 1) +#define USER_GP_REGS_STATUS_SCF_HC_S 1 +/* SCF_LC bit (Low Carry flag) */ +#define USER_GP_REGS_STATUS_SCF_LC_BIT (1 << 0) +#define USER_GP_REGS_STATUS_SCF_LC_S 0 + +/** + * struct user_gp_regs - User general purpose registers + * @dx: GP data unit regs (dx[reg][unit] = D{unit:0-1}.{reg:0-7}) + * @ax: GP address unit regs (ax[reg][unit] = A{unit:0-1}.{reg:0-3}) + * @pc: PC register + * @status: TXSTATUS register (condition flags, LSM_STEP etc) + * @rpt: TXRPT registers (branch repeat counter) + * @bpobits: TXBPOBITS register ("branch prediction other" bits) + * @mode: TXMODE register + * @_pad1: Reserved padding to make sizeof obviously 64bit aligned + * + * This is the user-visible general purpose register state structure. + * + * It can be accessed through PTRACE_GETREGSET with NT_PRSTATUS. + * + * It is also used in the signal context. + */ +struct user_gp_regs { + unsigned long dx[8][2]; + unsigned long ax[4][2]; + unsigned long pc; + unsigned long status; + unsigned long rpt; + unsigned long bpobits; + unsigned long mode; + unsigned long _pad1; +}; + +/** + * struct user_cb_regs - User catch buffer registers + * @flags: TXCATCH0 register (fault flags) + * @addr: TXCATCH1 register (fault address) + * @data: TXCATCH2 and TXCATCH3 registers (low and high data word) + * + * This is the user-visible catch buffer register state structure containing + * information about a failed memory access, and allowing the access to be + * modified and replayed. + * + * It can be accessed through PTRACE_GETREGSET with NT_METAG_CBUF. + */ +struct user_cb_regs { + unsigned long flags; + unsigned long addr; + unsigned long long data; +}; + +/** + * struct user_rp_state - User read pipeline state + * @entries: Read pipeline entries + * @mask: Mask of valid pipeline entries (RPMask from TXDIVTIME register) + * + * This is the user-visible read pipeline state structure containing the entries + * currently in the read pipeline and the mask of valid entries. + * + * It can be accessed through PTRACE_GETREGSET with NT_METAG_RPIPE. + */ +struct user_rp_state { + unsigned long long entries[6]; + unsigned long mask; +}; + +#endif /* __ASSEMBLY__ */ + +#endif /* _METAG_PTRACE_H */ diff --git a/usr/include/asm-metag/resource.h b/usr/include/asm-metag/resource.h new file mode 100644 index 0000000..218a36c --- /dev/null +++ b/usr/include/asm-metag/resource.h @@ -0,0 +1,7 @@ +#ifndef _METAG_RESOURCE_H +#define _METAG_RESOURCE_H + +#define _STK_LIM_MAX (1 << 28) +#include + +#endif /* _METAG_RESOURCE_H */ diff --git a/usr/include/asm-metag/sembuf.h b/usr/include/asm-metag/sembuf.h new file mode 100644 index 0000000..7673b83 --- /dev/null +++ b/usr/include/asm-metag/sembuf.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-metag/setup.h b/usr/include/asm-metag/setup.h new file mode 100644 index 0000000..552df83 --- /dev/null +++ b/usr/include/asm-metag/setup.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-metag/shmbuf.h b/usr/include/asm-metag/shmbuf.h new file mode 100644 index 0000000..83c05fc --- /dev/null +++ b/usr/include/asm-metag/shmbuf.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-metag/sigcontext.h b/usr/include/asm-metag/sigcontext.h new file mode 100644 index 0000000..ef79a91 --- /dev/null +++ b/usr/include/asm-metag/sigcontext.h @@ -0,0 +1,31 @@ +#ifndef _ASM_METAG_SIGCONTEXT_H +#define _ASM_METAG_SIGCONTEXT_H + +#include + +/* + * In a sigcontext structure we need to store the active state of the + * user process so that it does not get trashed when we call the signal + * handler. That not really the same as a user context that we are + * going to store on syscall etc. + */ +struct sigcontext { + struct user_gp_regs regs; /* needs to be first */ + + /* + * Catch registers describing a memory fault. + * If USER_GP_REGS_STATUS_CATCH_BIT is set in regs.status then catch + * buffers have been saved and will be replayed on sigreturn. + * Clear that bit to discard the catch state instead of replaying it. + */ + struct user_cb_regs cb; + + /* + * Read pipeline state. This will get restored on sigreturn. + */ + struct user_rp_state rp; + + unsigned long oldmask; +}; + +#endif diff --git a/usr/include/asm-metag/siginfo.h b/usr/include/asm-metag/siginfo.h new file mode 100644 index 0000000..b2e0c8b --- /dev/null +++ b/usr/include/asm-metag/siginfo.h @@ -0,0 +1,8 @@ +#ifndef _METAG_SIGINFO_H +#define _METAG_SIGINFO_H + +#define __ARCH_SI_TRAPNO + +#include + +#endif diff --git a/usr/include/asm-metag/signal.h b/usr/include/asm-metag/signal.h new file mode 100644 index 0000000..7b1573c --- /dev/null +++ b/usr/include/asm-metag/signal.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-metag/socket.h b/usr/include/asm-metag/socket.h new file mode 100644 index 0000000..6b71384 --- /dev/null +++ b/usr/include/asm-metag/socket.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-metag/sockios.h b/usr/include/asm-metag/sockios.h new file mode 100644 index 0000000..def6d47 --- /dev/null +++ b/usr/include/asm-metag/sockios.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-metag/stat.h b/usr/include/asm-metag/stat.h new file mode 100644 index 0000000..3dc90fa --- /dev/null +++ b/usr/include/asm-metag/stat.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-metag/statfs.h b/usr/include/asm-metag/statfs.h new file mode 100644 index 0000000..0b91fe1 --- /dev/null +++ b/usr/include/asm-metag/statfs.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-metag/swab.h b/usr/include/asm-metag/swab.h new file mode 100644 index 0000000..ee70111 --- /dev/null +++ b/usr/include/asm-metag/swab.h @@ -0,0 +1,26 @@ +#ifndef __ASM_METAG_SWAB_H +#define __ASM_METAG_SWAB_H + + +#include +#include + +static __inline__ __u16 __arch_swab16(__u16 x) +{ + return __builtin_metag_bswaps(x); +} +#define __arch_swab16 __arch_swab16 + +static __inline__ __u32 __arch_swab32(__u32 x) +{ + return __builtin_metag_bswap(x); +} +#define __arch_swab32 __arch_swab32 + +static __inline__ __u64 __arch_swab64(__u64 x) +{ + return __builtin_metag_bswapll(x); +} +#define __arch_swab64 __arch_swab64 + +#endif /* __ASM_METAG_SWAB_H */ diff --git a/usr/include/asm-metag/termbits.h b/usr/include/asm-metag/termbits.h new file mode 100644 index 0000000..3935b10 --- /dev/null +++ b/usr/include/asm-metag/termbits.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-metag/termios.h b/usr/include/asm-metag/termios.h new file mode 100644 index 0000000..280d78a --- /dev/null +++ b/usr/include/asm-metag/termios.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-metag/types.h b/usr/include/asm-metag/types.h new file mode 100644 index 0000000..b9e79bc --- /dev/null +++ b/usr/include/asm-metag/types.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-metag/unistd.h b/usr/include/asm-metag/unistd.h new file mode 100644 index 0000000..b80b8e8 --- /dev/null +++ b/usr/include/asm-metag/unistd.h @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2012 Imagination Technologies Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +/* Use the standard ABI for syscalls. */ +#include + +/* metag-specific syscalls. */ +#define __NR_metag_setglobalbit (__NR_arch_specific_syscall + 1) +__SYSCALL(__NR_metag_setglobalbit, sys_metag_setglobalbit) +#define __NR_metag_set_fpu_flags (__NR_arch_specific_syscall + 2) +__SYSCALL(__NR_metag_set_fpu_flags, sys_metag_set_fpu_flags) +#define __NR_metag_set_tls (__NR_arch_specific_syscall + 3) +__SYSCALL(__NR_metag_set_tls, sys_metag_set_tls) +#define __NR_metag_get_tls (__NR_arch_specific_syscall + 4) +__SYSCALL(__NR_metag_get_tls, sys_metag_get_tls) diff --git a/usr/include/asm-microblaze/elf.h b/usr/include/asm-microblaze/elf.h index 49c2589..f96828f 100644 --- a/usr/include/asm-microblaze/elf.h +++ b/usr/include/asm-microblaze/elf.h @@ -104,7 +104,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; /* Added _f parameter. Is this definition correct: TBD */ #define ELF_PLAT_INIT(_r, _f) \ do { \ - _r->r1 = _r->r1 = _r->r2 = _r->r3 = \ + _r->r0 = _r->r1 = _r->r2 = _r->r3 = \ _r->r4 = _r->r5 = _r->r6 = _r->r7 = \ _r->r8 = _r->r9 = _r->r10 = _r->r11 = \ _r->r12 = _r->r13 = _r->r14 = _r->r15 = \ diff --git a/usr/include/asm-microblaze/kvm_para.h b/usr/include/asm-microblaze/kvm_para.h new file mode 100644 index 0000000..14fab8f --- /dev/null +++ b/usr/include/asm-microblaze/kvm_para.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-microblaze/unistd.h b/usr/include/asm-microblaze/unistd.h index ad17760..52661d8 100644 --- a/usr/include/asm-microblaze/unistd.h +++ b/usr/include/asm-microblaze/unistd.h @@ -394,7 +394,9 @@ #define __NR_sendmmsg 376 #define __NR_process_vm_readv 377 #define __NR_process_vm_writev 378 +#define __NR_kcmp 379 +#define __NR_finit_module 380 -#define __NR_syscalls 379 +#define __NR_syscalls 381 #endif /* _ASM_MICROBLAZE_UNISTD_H */ diff --git a/usr/include/asm-openrisc/elf.h b/usr/include/asm-openrisc/elf.h new file mode 100644 index 0000000..a853153 --- /dev/null +++ b/usr/include/asm-openrisc/elf.h @@ -0,0 +1,69 @@ +/* + * OpenRISC Linux + * + * Linux architectural port borrowing liberally from similar works of + * others. All original copyrights apply as per the original source + * declaration. + * + * OpenRISC implementation: + * Copyright (C) 2003 Matjaz Breskvar + * Copyright (C) 2010-2011 Jonas Bonn + * et al. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#ifndef __ASM_OPENRISC_ELF_H +#define __ASM_OPENRISC_ELF_H + +/* + * This files is partially exported to userspace. This allows us to keep + * the ELF bits in one place which should assist in keeping the kernel and + * userspace in sync. + */ + +/* + * ELF register definitions.. + */ + +/* for struct user_regs_struct definition */ +#include + +/* The OR1K relocation types... not all relevant for module loader */ +#define R_OR32_NONE 0 +#define R_OR32_32 1 +#define R_OR32_16 2 +#define R_OR32_8 3 +#define R_OR32_CONST 4 +#define R_OR32_CONSTH 5 +#define R_OR32_JUMPTARG 6 +#define R_OR32_VTINHERIT 7 +#define R_OR32_VTENTRY 8 + +typedef unsigned long elf_greg_t; + +/* + * Note that NGREG is defined to ELF_NGREG in include/linux/elfcore.h, and is + * thus exposed to user-space. + */ +#define ELF_NGREG (sizeof(struct user_regs_struct) / sizeof(elf_greg_t)) +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; + +/* A placeholder; OR32 does not have fp support yes, so no fp regs for now. */ +typedef unsigned long elf_fpregset_t; + +/* This should be moved to include/linux/elf.h */ +#define EM_OR32 0x8472 +#define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */ + +/* + * These are used to set parameters in the core dumps. + */ +#define ELF_ARCH EM_OR32 +#define ELF_CLASS ELFCLASS32 +#define ELF_DATA ELFDATA2MSB + +#endif /* __ASM_OPENRISC_ELF_H */ diff --git a/usr/include/asm-openrisc/kvm_para.h b/usr/include/asm-openrisc/kvm_para.h new file mode 100644 index 0000000..14fab8f --- /dev/null +++ b/usr/include/asm-openrisc/kvm_para.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-openrisc/ptrace.h b/usr/include/asm-openrisc/ptrace.h index 419090d..799497c 100644 --- a/usr/include/asm-openrisc/ptrace.h +++ b/usr/include/asm-openrisc/ptrace.h @@ -19,8 +19,6 @@ #ifndef __ASM_OPENRISC_PTRACE_H #define __ASM_OPENRISC_PTRACE_H -#include - #ifndef __ASSEMBLY__ /* * This is the layout of the regset returned by the GETREGSET ptrace call @@ -30,8 +28,6 @@ struct user_regs_struct { unsigned long gpr[32]; unsigned long pc; unsigned long sr; - unsigned long pad1; - unsigned long pad2; }; #endif diff --git a/usr/include/asm-openrisc/spr_defs.h b/usr/include/asm-openrisc/spr_defs.h deleted file mode 100644 index 5dbc668..0000000 --- a/usr/include/asm-openrisc/spr_defs.h +++ /dev/null @@ -1,604 +0,0 @@ -/* - * OpenRISC Linux - * - * SPR Definitions - * - * Copyright (C) 2000 Damjan Lampret - * Copyright (C) 2003 Matjaz Breskvar - * Copyright (C) 2008, 2010 Embecosm Limited - * Copyright (C) 2010-2011 Jonas Bonn - * et al. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This file is part of OpenRISC 1000 Architectural Simulator. - */ - -#ifndef SPR_DEFS__H -#define SPR_DEFS__H - -/* Definition of special-purpose registers (SPRs). */ - -#define MAX_GRPS (32) -#define MAX_SPRS_PER_GRP_BITS (11) -#define MAX_SPRS_PER_GRP (1 << MAX_SPRS_PER_GRP_BITS) -#define MAX_SPRS (0x10000) - -/* Base addresses for the groups */ -#define SPRGROUP_SYS (0 << MAX_SPRS_PER_GRP_BITS) -#define SPRGROUP_DMMU (1 << MAX_SPRS_PER_GRP_BITS) -#define SPRGROUP_IMMU (2 << MAX_SPRS_PER_GRP_BITS) -#define SPRGROUP_DC (3 << MAX_SPRS_PER_GRP_BITS) -#define SPRGROUP_IC (4 << MAX_SPRS_PER_GRP_BITS) -#define SPRGROUP_MAC (5 << MAX_SPRS_PER_GRP_BITS) -#define SPRGROUP_D (6 << MAX_SPRS_PER_GRP_BITS) -#define SPRGROUP_PC (7 << MAX_SPRS_PER_GRP_BITS) -#define SPRGROUP_PM (8 << MAX_SPRS_PER_GRP_BITS) -#define SPRGROUP_PIC (9 << MAX_SPRS_PER_GRP_BITS) -#define SPRGROUP_TT (10 << MAX_SPRS_PER_GRP_BITS) -#define SPRGROUP_FP (11 << MAX_SPRS_PER_GRP_BITS) - -/* System control and status group */ -#define SPR_VR (SPRGROUP_SYS + 0) -#define SPR_UPR (SPRGROUP_SYS + 1) -#define SPR_CPUCFGR (SPRGROUP_SYS + 2) -#define SPR_DMMUCFGR (SPRGROUP_SYS + 3) -#define SPR_IMMUCFGR (SPRGROUP_SYS + 4) -#define SPR_DCCFGR (SPRGROUP_SYS + 5) -#define SPR_ICCFGR (SPRGROUP_SYS + 6) -#define SPR_DCFGR (SPRGROUP_SYS + 7) -#define SPR_PCCFGR (SPRGROUP_SYS + 8) -#define SPR_NPC (SPRGROUP_SYS + 16) /* CZ 21/06/01 */ -#define SPR_SR (SPRGROUP_SYS + 17) /* CZ 21/06/01 */ -#define SPR_PPC (SPRGROUP_SYS + 18) /* CZ 21/06/01 */ -#define SPR_FPCSR (SPRGROUP_SYS + 20) /* CZ 21/06/01 */ -#define SPR_EPCR_BASE (SPRGROUP_SYS + 32) /* CZ 21/06/01 */ -#define SPR_EPCR_LAST (SPRGROUP_SYS + 47) /* CZ 21/06/01 */ -#define SPR_EEAR_BASE (SPRGROUP_SYS + 48) -#define SPR_EEAR_LAST (SPRGROUP_SYS + 63) -#define SPR_ESR_BASE (SPRGROUP_SYS + 64) -#define SPR_ESR_LAST (SPRGROUP_SYS + 79) -#define SPR_GPR_BASE (SPRGROUP_SYS + 1024) - -/* Data MMU group */ -#define SPR_DMMUCR (SPRGROUP_DMMU + 0) -#define SPR_DTLBEIR (SPRGROUP_DMMU + 2) -#define SPR_DTLBMR_BASE(WAY) (SPRGROUP_DMMU + 0x200 + (WAY) * 0x100) -#define SPR_DTLBMR_LAST(WAY) (SPRGROUP_DMMU + 0x27f + (WAY) * 0x100) -#define SPR_DTLBTR_BASE(WAY) (SPRGROUP_DMMU + 0x280 + (WAY) * 0x100) -#define SPR_DTLBTR_LAST(WAY) (SPRGROUP_DMMU + 0x2ff + (WAY) * 0x100) - -/* Instruction MMU group */ -#define SPR_IMMUCR (SPRGROUP_IMMU + 0) -#define SPR_ITLBEIR (SPRGROUP_IMMU + 2) -#define SPR_ITLBMR_BASE(WAY) (SPRGROUP_IMMU + 0x200 + (WAY) * 0x100) -#define SPR_ITLBMR_LAST(WAY) (SPRGROUP_IMMU + 0x27f + (WAY) * 0x100) -#define SPR_ITLBTR_BASE(WAY) (SPRGROUP_IMMU + 0x280 + (WAY) * 0x100) -#define SPR_ITLBTR_LAST(WAY) (SPRGROUP_IMMU + 0x2ff + (WAY) * 0x100) - -/* Data cache group */ -#define SPR_DCCR (SPRGROUP_DC + 0) -#define SPR_DCBPR (SPRGROUP_DC + 1) -#define SPR_DCBFR (SPRGROUP_DC + 2) -#define SPR_DCBIR (SPRGROUP_DC + 3) -#define SPR_DCBWR (SPRGROUP_DC + 4) -#define SPR_DCBLR (SPRGROUP_DC + 5) -#define SPR_DCR_BASE(WAY) (SPRGROUP_DC + 0x200 + (WAY) * 0x200) -#define SPR_DCR_LAST(WAY) (SPRGROUP_DC + 0x3ff + (WAY) * 0x200) - -/* Instruction cache group */ -#define SPR_ICCR (SPRGROUP_IC + 0) -#define SPR_ICBPR (SPRGROUP_IC + 1) -#define SPR_ICBIR (SPRGROUP_IC + 2) -#define SPR_ICBLR (SPRGROUP_IC + 3) -#define SPR_ICR_BASE(WAY) (SPRGROUP_IC + 0x200 + (WAY) * 0x200) -#define SPR_ICR_LAST(WAY) (SPRGROUP_IC + 0x3ff + (WAY) * 0x200) - -/* MAC group */ -#define SPR_MACLO (SPRGROUP_MAC + 1) -#define SPR_MACHI (SPRGROUP_MAC + 2) - -/* Debug group */ -#define SPR_DVR(N) (SPRGROUP_D + (N)) -#define SPR_DCR(N) (SPRGROUP_D + 8 + (N)) -#define SPR_DMR1 (SPRGROUP_D + 16) -#define SPR_DMR2 (SPRGROUP_D + 17) -#define SPR_DWCR0 (SPRGROUP_D + 18) -#define SPR_DWCR1 (SPRGROUP_D + 19) -#define SPR_DSR (SPRGROUP_D + 20) -#define SPR_DRR (SPRGROUP_D + 21) - -/* Performance counters group */ -#define SPR_PCCR(N) (SPRGROUP_PC + (N)) -#define SPR_PCMR(N) (SPRGROUP_PC + 8 + (N)) - -/* Power management group */ -#define SPR_PMR (SPRGROUP_PM + 0) - -/* PIC group */ -#define SPR_PICMR (SPRGROUP_PIC + 0) -#define SPR_PICPR (SPRGROUP_PIC + 1) -#define SPR_PICSR (SPRGROUP_PIC + 2) - -/* Tick Timer group */ -#define SPR_TTMR (SPRGROUP_TT + 0) -#define SPR_TTCR (SPRGROUP_TT + 1) - -/* - * Bit definitions for the Version Register - * - */ -#define SPR_VR_VER 0xff000000 /* Processor version */ -#define SPR_VR_CFG 0x00ff0000 /* Processor configuration */ -#define SPR_VR_RES 0x0000ffc0 /* Reserved */ -#define SPR_VR_REV 0x0000003f /* Processor revision */ - -#define SPR_VR_VER_OFF 24 -#define SPR_VR_CFG_OFF 16 -#define SPR_VR_REV_OFF 0 - -/* - * Bit definitions for the Unit Present Register - * - */ -#define SPR_UPR_UP 0x00000001 /* UPR present */ -#define SPR_UPR_DCP 0x00000002 /* Data cache present */ -#define SPR_UPR_ICP 0x00000004 /* Instruction cache present */ -#define SPR_UPR_DMP 0x00000008 /* Data MMU present */ -#define SPR_UPR_IMP 0x00000010 /* Instruction MMU present */ -#define SPR_UPR_MP 0x00000020 /* MAC present */ -#define SPR_UPR_DUP 0x00000040 /* Debug unit present */ -#define SPR_UPR_PCUP 0x00000080 /* Performance counters unit present */ -#define SPR_UPR_PMP 0x00000100 /* Power management present */ -#define SPR_UPR_PICP 0x00000200 /* PIC present */ -#define SPR_UPR_TTP 0x00000400 /* Tick timer present */ -#define SPR_UPR_RES 0x00fe0000 /* Reserved */ -#define SPR_UPR_CUP 0xff000000 /* Context units present */ - -/* - * JPB: Bit definitions for the CPU configuration register - * - */ -#define SPR_CPUCFGR_NSGF 0x0000000f /* Number of shadow GPR files */ -#define SPR_CPUCFGR_CGF 0x00000010 /* Custom GPR file */ -#define SPR_CPUCFGR_OB32S 0x00000020 /* ORBIS32 supported */ -#define SPR_CPUCFGR_OB64S 0x00000040 /* ORBIS64 supported */ -#define SPR_CPUCFGR_OF32S 0x00000080 /* ORFPX32 supported */ -#define SPR_CPUCFGR_OF64S 0x00000100 /* ORFPX64 supported */ -#define SPR_CPUCFGR_OV64S 0x00000200 /* ORVDX64 supported */ -#define SPR_CPUCFGR_RES 0xfffffc00 /* Reserved */ - -/* - * JPB: Bit definitions for the Debug configuration register and other - * constants. - * - */ - -#define SPR_DCFGR_NDP 0x00000007 /* Number of matchpoints mask */ -#define SPR_DCFGR_NDP1 0x00000000 /* One matchpoint supported */ -#define SPR_DCFGR_NDP2 0x00000001 /* Two matchpoints supported */ -#define SPR_DCFGR_NDP3 0x00000002 /* Three matchpoints supported */ -#define SPR_DCFGR_NDP4 0x00000003 /* Four matchpoints supported */ -#define SPR_DCFGR_NDP5 0x00000004 /* Five matchpoints supported */ -#define SPR_DCFGR_NDP6 0x00000005 /* Six matchpoints supported */ -#define SPR_DCFGR_NDP7 0x00000006 /* Seven matchpoints supported */ -#define SPR_DCFGR_NDP8 0x00000007 /* Eight matchpoints supported */ -#define SPR_DCFGR_WPCI 0x00000008 /* Watchpoint counters implemented */ - -#define MATCHPOINTS_TO_NDP(n) (1 == n ? SPR_DCFGR_NDP1 : \ - 2 == n ? SPR_DCFGR_NDP2 : \ - 3 == n ? SPR_DCFGR_NDP3 : \ - 4 == n ? SPR_DCFGR_NDP4 : \ - 5 == n ? SPR_DCFGR_NDP5 : \ - 6 == n ? SPR_DCFGR_NDP6 : \ - 7 == n ? SPR_DCFGR_NDP7 : SPR_DCFGR_NDP8) -#define MAX_MATCHPOINTS 8 -#define MAX_WATCHPOINTS (MAX_MATCHPOINTS + 2) - -/* - * Bit definitions for the Supervision Register - * - */ -#define SPR_SR_SM 0x00000001 /* Supervisor Mode */ -#define SPR_SR_TEE 0x00000002 /* Tick timer Exception Enable */ -#define SPR_SR_IEE 0x00000004 /* Interrupt Exception Enable */ -#define SPR_SR_DCE 0x00000008 /* Data Cache Enable */ -#define SPR_SR_ICE 0x00000010 /* Instruction Cache Enable */ -#define SPR_SR_DME 0x00000020 /* Data MMU Enable */ -#define SPR_SR_IME 0x00000040 /* Instruction MMU Enable */ -#define SPR_SR_LEE 0x00000080 /* Little Endian Enable */ -#define SPR_SR_CE 0x00000100 /* CID Enable */ -#define SPR_SR_F 0x00000200 /* Condition Flag */ -#define SPR_SR_CY 0x00000400 /* Carry flag */ -#define SPR_SR_OV 0x00000800 /* Overflow flag */ -#define SPR_SR_OVE 0x00001000 /* Overflow flag Exception */ -#define SPR_SR_DSX 0x00002000 /* Delay Slot Exception */ -#define SPR_SR_EPH 0x00004000 /* Exception Prefix High */ -#define SPR_SR_FO 0x00008000 /* Fixed one */ -#define SPR_SR_SUMRA 0x00010000 /* Supervisor SPR read access */ -#define SPR_SR_RES 0x0ffe0000 /* Reserved */ -#define SPR_SR_CID 0xf0000000 /* Context ID */ - -/* - * Bit definitions for the Data MMU Control Register - * - */ -#define SPR_DMMUCR_P2S 0x0000003e /* Level 2 Page Size */ -#define SPR_DMMUCR_P1S 0x000007c0 /* Level 1 Page Size */ -#define SPR_DMMUCR_VADDR_WIDTH 0x0000f800 /* Virtual ADDR Width */ -#define SPR_DMMUCR_PADDR_WIDTH 0x000f0000 /* Physical ADDR Width */ - -/* - * Bit definitions for the Instruction MMU Control Register - * - */ -#define SPR_IMMUCR_P2S 0x0000003e /* Level 2 Page Size */ -#define SPR_IMMUCR_P1S 0x000007c0 /* Level 1 Page Size */ -#define SPR_IMMUCR_VADDR_WIDTH 0x0000f800 /* Virtual ADDR Width */ -#define SPR_IMMUCR_PADDR_WIDTH 0x000f0000 /* Physical ADDR Width */ - -/* - * Bit definitions for the Data TLB Match Register - * - */ -#define SPR_DTLBMR_V 0x00000001 /* Valid */ -#define SPR_DTLBMR_PL1 0x00000002 /* Page Level 1 (if 0 then PL2) */ -#define SPR_DTLBMR_CID 0x0000003c /* Context ID */ -#define SPR_DTLBMR_LRU 0x000000c0 /* Least Recently Used */ -#define SPR_DTLBMR_VPN 0xfffff000 /* Virtual Page Number */ - -/* - * Bit definitions for the Data TLB Translate Register - * - */ -#define SPR_DTLBTR_CC 0x00000001 /* Cache Coherency */ -#define SPR_DTLBTR_CI 0x00000002 /* Cache Inhibit */ -#define SPR_DTLBTR_WBC 0x00000004 /* Write-Back Cache */ -#define SPR_DTLBTR_WOM 0x00000008 /* Weakly-Ordered Memory */ -#define SPR_DTLBTR_A 0x00000010 /* Accessed */ -#define SPR_DTLBTR_D 0x00000020 /* Dirty */ -#define SPR_DTLBTR_URE 0x00000040 /* User Read Enable */ -#define SPR_DTLBTR_UWE 0x00000080 /* User Write Enable */ -#define SPR_DTLBTR_SRE 0x00000100 /* Supervisor Read Enable */ -#define SPR_DTLBTR_SWE 0x00000200 /* Supervisor Write Enable */ -#define SPR_DTLBTR_PPN 0xfffff000 /* Physical Page Number */ - -/* - * Bit definitions for the Instruction TLB Match Register - * - */ -#define SPR_ITLBMR_V 0x00000001 /* Valid */ -#define SPR_ITLBMR_PL1 0x00000002 /* Page Level 1 (if 0 then PL2) */ -#define SPR_ITLBMR_CID 0x0000003c /* Context ID */ -#define SPR_ITLBMR_LRU 0x000000c0 /* Least Recently Used */ -#define SPR_ITLBMR_VPN 0xfffff000 /* Virtual Page Number */ - -/* - * Bit definitions for the Instruction TLB Translate Register - * - */ -#define SPR_ITLBTR_CC 0x00000001 /* Cache Coherency */ -#define SPR_ITLBTR_CI 0x00000002 /* Cache Inhibit */ -#define SPR_ITLBTR_WBC 0x00000004 /* Write-Back Cache */ -#define SPR_ITLBTR_WOM 0x00000008 /* Weakly-Ordered Memory */ -#define SPR_ITLBTR_A 0x00000010 /* Accessed */ -#define SPR_ITLBTR_D 0x00000020 /* Dirty */ -#define SPR_ITLBTR_SXE 0x00000040 /* User Read Enable */ -#define SPR_ITLBTR_UXE 0x00000080 /* User Write Enable */ -#define SPR_ITLBTR_PPN 0xfffff000 /* Physical Page Number */ - -/* - * Bit definitions for Data Cache Control register - * - */ -#define SPR_DCCR_EW 0x000000ff /* Enable ways */ - -/* - * Bit definitions for Insn Cache Control register - * - */ -#define SPR_ICCR_EW 0x000000ff /* Enable ways */ - -/* - * Bit definitions for Data Cache Configuration Register - * - */ - -#define SPR_DCCFGR_NCW 0x00000007 -#define SPR_DCCFGR_NCS 0x00000078 -#define SPR_DCCFGR_CBS 0x00000080 -#define SPR_DCCFGR_CWS 0x00000100 -#define SPR_DCCFGR_CCRI 0x00000200 -#define SPR_DCCFGR_CBIRI 0x00000400 -#define SPR_DCCFGR_CBPRI 0x00000800 -#define SPR_DCCFGR_CBLRI 0x00001000 -#define SPR_DCCFGR_CBFRI 0x00002000 -#define SPR_DCCFGR_CBWBRI 0x00004000 - -#define SPR_DCCFGR_NCW_OFF 0 -#define SPR_DCCFGR_NCS_OFF 3 -#define SPR_DCCFGR_CBS_OFF 7 - -/* - * Bit definitions for Instruction Cache Configuration Register - * - */ -#define SPR_ICCFGR_NCW 0x00000007 -#define SPR_ICCFGR_NCS 0x00000078 -#define SPR_ICCFGR_CBS 0x00000080 -#define SPR_ICCFGR_CCRI 0x00000200 -#define SPR_ICCFGR_CBIRI 0x00000400 -#define SPR_ICCFGR_CBPRI 0x00000800 -#define SPR_ICCFGR_CBLRI 0x00001000 - -#define SPR_ICCFGR_NCW_OFF 0 -#define SPR_ICCFGR_NCS_OFF 3 -#define SPR_ICCFGR_CBS_OFF 7 - -/* - * Bit definitions for Data MMU Configuration Register - * - */ - -#define SPR_DMMUCFGR_NTW 0x00000003 -#define SPR_DMMUCFGR_NTS 0x0000001C -#define SPR_DMMUCFGR_NAE 0x000000E0 -#define SPR_DMMUCFGR_CRI 0x00000100 -#define SPR_DMMUCFGR_PRI 0x00000200 -#define SPR_DMMUCFGR_TEIRI 0x00000400 -#define SPR_DMMUCFGR_HTR 0x00000800 - -#define SPR_DMMUCFGR_NTW_OFF 0 -#define SPR_DMMUCFGR_NTS_OFF 2 - -/* - * Bit definitions for Instruction MMU Configuration Register - * - */ - -#define SPR_IMMUCFGR_NTW 0x00000003 -#define SPR_IMMUCFGR_NTS 0x0000001C -#define SPR_IMMUCFGR_NAE 0x000000E0 -#define SPR_IMMUCFGR_CRI 0x00000100 -#define SPR_IMMUCFGR_PRI 0x00000200 -#define SPR_IMMUCFGR_TEIRI 0x00000400 -#define SPR_IMMUCFGR_HTR 0x00000800 - -#define SPR_IMMUCFGR_NTW_OFF 0 -#define SPR_IMMUCFGR_NTS_OFF 2 - -/* - * Bit definitions for Debug Control registers - * - */ -#define SPR_DCR_DP 0x00000001 /* DVR/DCR present */ -#define SPR_DCR_CC 0x0000000e /* Compare condition */ -#define SPR_DCR_SC 0x00000010 /* Signed compare */ -#define SPR_DCR_CT 0x000000e0 /* Compare to */ - -/* Bit results with SPR_DCR_CC mask */ -#define SPR_DCR_CC_MASKED 0x00000000 -#define SPR_DCR_CC_EQUAL 0x00000002 -#define SPR_DCR_CC_LESS 0x00000004 -#define SPR_DCR_CC_LESSE 0x00000006 -#define SPR_DCR_CC_GREAT 0x00000008 -#define SPR_DCR_CC_GREATE 0x0000000a -#define SPR_DCR_CC_NEQUAL 0x0000000c - -/* Bit results with SPR_DCR_CT mask */ -#define SPR_DCR_CT_DISABLED 0x00000000 -#define SPR_DCR_CT_IFEA 0x00000020 -#define SPR_DCR_CT_LEA 0x00000040 -#define SPR_DCR_CT_SEA 0x00000060 -#define SPR_DCR_CT_LD 0x00000080 -#define SPR_DCR_CT_SD 0x000000a0 -#define SPR_DCR_CT_LSEA 0x000000c0 -#define SPR_DCR_CT_LSD 0x000000e0 -/* SPR_DCR_CT_LSD doesn't seem to be implemented anywhere in or1ksim. 2004-1-30 HP */ - -/* - * Bit definitions for Debug Mode 1 register - * - */ -#define SPR_DMR1_CW 0x000fffff /* Chain register pair data */ -#define SPR_DMR1_CW0_AND 0x00000001 -#define SPR_DMR1_CW0_OR 0x00000002 -#define SPR_DMR1_CW0 (SPR_DMR1_CW0_AND | SPR_DMR1_CW0_OR) -#define SPR_DMR1_CW1_AND 0x00000004 -#define SPR_DMR1_CW1_OR 0x00000008 -#define SPR_DMR1_CW1 (SPR_DMR1_CW1_AND | SPR_DMR1_CW1_OR) -#define SPR_DMR1_CW2_AND 0x00000010 -#define SPR_DMR1_CW2_OR 0x00000020 -#define SPR_DMR1_CW2 (SPR_DMR1_CW2_AND | SPR_DMR1_CW2_OR) -#define SPR_DMR1_CW3_AND 0x00000040 -#define SPR_DMR1_CW3_OR 0x00000080 -#define SPR_DMR1_CW3 (SPR_DMR1_CW3_AND | SPR_DMR1_CW3_OR) -#define SPR_DMR1_CW4_AND 0x00000100 -#define SPR_DMR1_CW4_OR 0x00000200 -#define SPR_DMR1_CW4 (SPR_DMR1_CW4_AND | SPR_DMR1_CW4_OR) -#define SPR_DMR1_CW5_AND 0x00000400 -#define SPR_DMR1_CW5_OR 0x00000800 -#define SPR_DMR1_CW5 (SPR_DMR1_CW5_AND | SPR_DMR1_CW5_OR) -#define SPR_DMR1_CW6_AND 0x00001000 -#define SPR_DMR1_CW6_OR 0x00002000 -#define SPR_DMR1_CW6 (SPR_DMR1_CW6_AND | SPR_DMR1_CW6_OR) -#define SPR_DMR1_CW7_AND 0x00004000 -#define SPR_DMR1_CW7_OR 0x00008000 -#define SPR_DMR1_CW7 (SPR_DMR1_CW7_AND | SPR_DMR1_CW7_OR) -#define SPR_DMR1_CW8_AND 0x00010000 -#define SPR_DMR1_CW8_OR 0x00020000 -#define SPR_DMR1_CW8 (SPR_DMR1_CW8_AND | SPR_DMR1_CW8_OR) -#define SPR_DMR1_CW9_AND 0x00040000 -#define SPR_DMR1_CW9_OR 0x00080000 -#define SPR_DMR1_CW9 (SPR_DMR1_CW9_AND | SPR_DMR1_CW9_OR) -#define SPR_DMR1_RES1 0x00300000 /* Reserved */ -#define SPR_DMR1_ST 0x00400000 /* Single-step trace*/ -#define SPR_DMR1_BT 0x00800000 /* Branch trace */ -#define SPR_DMR1_RES2 0xff000000 /* Reserved */ - -/* - * Bit definitions for Debug Mode 2 register. AWTC and WGB corrected by JPB - * - */ -#define SPR_DMR2_WCE0 0x00000001 /* Watchpoint counter 0 enable */ -#define SPR_DMR2_WCE1 0x00000002 /* Watchpoint counter 0 enable */ -#define SPR_DMR2_AWTC 0x00000ffc /* Assign watchpoints to counters */ -#define SPR_DMR2_AWTC_OFF 2 /* Bit offset to AWTC field */ -#define SPR_DMR2_WGB 0x003ff000 /* Watchpoints generating breakpoint */ -#define SPR_DMR2_WGB_OFF 12 /* Bit offset to WGB field */ -#define SPR_DMR2_WBS 0xffc00000 /* JPB: Watchpoint status */ -#define SPR_DMR2_WBS_OFF 22 /* Bit offset to WBS field */ - -/* - * Bit definitions for Debug watchpoint counter registers - * - */ -#define SPR_DWCR_COUNT 0x0000ffff /* Count */ -#define SPR_DWCR_MATCH 0xffff0000 /* Match */ -#define SPR_DWCR_MATCH_OFF 16 /* Match bit offset */ - -/* - * Bit definitions for Debug stop register - * - */ -#define SPR_DSR_RSTE 0x00000001 /* Reset exception */ -#define SPR_DSR_BUSEE 0x00000002 /* Bus error exception */ -#define SPR_DSR_DPFE 0x00000004 /* Data Page Fault exception */ -#define SPR_DSR_IPFE 0x00000008 /* Insn Page Fault exception */ -#define SPR_DSR_TTE 0x00000010 /* Tick Timer exception */ -#define SPR_DSR_AE 0x00000020 /* Alignment exception */ -#define SPR_DSR_IIE 0x00000040 /* Illegal Instruction exception */ -#define SPR_DSR_IE 0x00000080 /* Interrupt exception */ -#define SPR_DSR_DME 0x00000100 /* DTLB miss exception */ -#define SPR_DSR_IME 0x00000200 /* ITLB miss exception */ -#define SPR_DSR_RE 0x00000400 /* Range exception */ -#define SPR_DSR_SCE 0x00000800 /* System call exception */ -#define SPR_DSR_FPE 0x00001000 /* Floating Point Exception */ -#define SPR_DSR_TE 0x00002000 /* Trap exception */ - -/* - * Bit definitions for Debug reason register - * - */ -#define SPR_DRR_RSTE 0x00000001 /* Reset exception */ -#define SPR_DRR_BUSEE 0x00000002 /* Bus error exception */ -#define SPR_DRR_DPFE 0x00000004 /* Data Page Fault exception */ -#define SPR_DRR_IPFE 0x00000008 /* Insn Page Fault exception */ -#define SPR_DRR_TTE 0x00000010 /* Tick Timer exception */ -#define SPR_DRR_AE 0x00000020 /* Alignment exception */ -#define SPR_DRR_IIE 0x00000040 /* Illegal Instruction exception */ -#define SPR_DRR_IE 0x00000080 /* Interrupt exception */ -#define SPR_DRR_DME 0x00000100 /* DTLB miss exception */ -#define SPR_DRR_IME 0x00000200 /* ITLB miss exception */ -#define SPR_DRR_RE 0x00000400 /* Range exception */ -#define SPR_DRR_SCE 0x00000800 /* System call exception */ -#define SPR_DRR_FPE 0x00001000 /* Floating Point Exception */ -#define SPR_DRR_TE 0x00002000 /* Trap exception */ - -/* - * Bit definitions for Performance counters mode registers - * - */ -#define SPR_PCMR_CP 0x00000001 /* Counter present */ -#define SPR_PCMR_UMRA 0x00000002 /* User mode read access */ -#define SPR_PCMR_CISM 0x00000004 /* Count in supervisor mode */ -#define SPR_PCMR_CIUM 0x00000008 /* Count in user mode */ -#define SPR_PCMR_LA 0x00000010 /* Load access event */ -#define SPR_PCMR_SA 0x00000020 /* Store access event */ -#define SPR_PCMR_IF 0x00000040 /* Instruction fetch event*/ -#define SPR_PCMR_DCM 0x00000080 /* Data cache miss event */ -#define SPR_PCMR_ICM 0x00000100 /* Insn cache miss event */ -#define SPR_PCMR_IFS 0x00000200 /* Insn fetch stall event */ -#define SPR_PCMR_LSUS 0x00000400 /* LSU stall event */ -#define SPR_PCMR_BS 0x00000800 /* Branch stall event */ -#define SPR_PCMR_DTLBM 0x00001000 /* DTLB miss event */ -#define SPR_PCMR_ITLBM 0x00002000 /* ITLB miss event */ -#define SPR_PCMR_DDS 0x00004000 /* Data dependency stall event */ -#define SPR_PCMR_WPE 0x03ff8000 /* Watchpoint events */ - -/* - * Bit definitions for the Power management register - * - */ -#define SPR_PMR_SDF 0x0000000f /* Slow down factor */ -#define SPR_PMR_DME 0x00000010 /* Doze mode enable */ -#define SPR_PMR_SME 0x00000020 /* Sleep mode enable */ -#define SPR_PMR_DCGE 0x00000040 /* Dynamic clock gating enable */ -#define SPR_PMR_SUME 0x00000080 /* Suspend mode enable */ - -/* - * Bit definitions for PICMR - * - */ -#define SPR_PICMR_IUM 0xfffffffc /* Interrupt unmask */ - -/* - * Bit definitions for PICPR - * - */ -#define SPR_PICPR_IPRIO 0xfffffffc /* Interrupt priority */ - -/* - * Bit definitions for PICSR - * - */ -#define SPR_PICSR_IS 0xffffffff /* Interrupt status */ - -/* - * Bit definitions for Tick Timer Control Register - * - */ - -#define SPR_TTCR_CNT 0xffffffff /* Count, time period */ -#define SPR_TTMR_TP 0x0fffffff /* Time period */ -#define SPR_TTMR_IP 0x10000000 /* Interrupt Pending */ -#define SPR_TTMR_IE 0x20000000 /* Interrupt Enable */ -#define SPR_TTMR_DI 0x00000000 /* Disabled */ -#define SPR_TTMR_RT 0x40000000 /* Restart tick */ -#define SPR_TTMR_SR 0x80000000 /* Single run */ -#define SPR_TTMR_CR 0xc0000000 /* Continuous run */ -#define SPR_TTMR_M 0xc0000000 /* Tick mode */ - -/* - * Bit definitions for the FP Control Status Register - * - */ -#define SPR_FPCSR_FPEE 0x00000001 /* Floating Point Exception Enable */ -#define SPR_FPCSR_RM 0x00000006 /* Rounding Mode */ -#define SPR_FPCSR_OVF 0x00000008 /* Overflow Flag */ -#define SPR_FPCSR_UNF 0x00000010 /* Underflow Flag */ -#define SPR_FPCSR_SNF 0x00000020 /* SNAN Flag */ -#define SPR_FPCSR_QNF 0x00000040 /* QNAN Flag */ -#define SPR_FPCSR_ZF 0x00000080 /* Zero Flag */ -#define SPR_FPCSR_IXF 0x00000100 /* Inexact Flag */ -#define SPR_FPCSR_IVF 0x00000200 /* Invalid Flag */ -#define SPR_FPCSR_INF 0x00000400 /* Infinity Flag */ -#define SPR_FPCSR_DZF 0x00000800 /* Divide By Zero Flag */ -#define SPR_FPCSR_ALLF (SPR_FPCSR_OVF | SPR_FPCSR_UNF | SPR_FPCSR_SNF | \ - SPR_FPCSR_QNF | SPR_FPCSR_ZF | SPR_FPCSR_IXF | \ - SPR_FPCSR_IVF | SPR_FPCSR_INF | SPR_FPCSR_DZF) - -#define FPCSR_RM_RN (0<<1) -#define FPCSR_RM_RZ (1<<1) -#define FPCSR_RM_RIP (2<<1) -#define FPCSR_RM_RIN (3<<1) - -/* - * l.nop constants - * - */ -#define NOP_NOP 0x0000 /* Normal nop instruction */ -#define NOP_EXIT 0x0001 /* End of simulation */ -#define NOP_REPORT 0x0002 /* Simple report */ -/*#define NOP_PRINTF 0x0003 Simprintf instruction (obsolete)*/ -#define NOP_PUTC 0x0004 /* JPB: Simputc instruction */ -#define NOP_CNT_RESET 0x0005 /* Reset statistics counters */ -#define NOP_GET_TICKS 0x0006 /* JPB: Get # ticks running */ -#define NOP_GET_PS 0x0007 /* JPB: Get picosecs/cycle */ -#define NOP_REPORT_FIRST 0x0400 /* Report with number */ -#define NOP_REPORT_LAST 0x03ff /* Report with number */ - -#endif /* SPR_DEFS__H */ diff --git a/usr/include/asm-openrisc/ucontext.h b/usr/include/asm-openrisc/ucontext.h new file mode 100644 index 0000000..9bc07b9 --- /dev/null +++ b/usr/include/asm-openrisc/ucontext.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-openrisc/unistd.h b/usr/include/asm-openrisc/unistd.h index 89af3ab..ce40b71 100644 --- a/usr/include/asm-openrisc/unistd.h +++ b/usr/include/asm-openrisc/unistd.h @@ -16,16 +16,14 @@ * (at your option) any later version. */ -#if !defined(__ASM_OPENRISC_UNISTD_H) || defined(__SYSCALL) -#define __ASM_OPENRISC_UNISTD_H - #define __ARCH_HAVE_MMU #define sys_mmap2 sys_mmap_pgoff +#define __ARCH_WANT_SYS_FORK +#define __ARCH_WANT_SYS_CLONE + #include #define __NR_or1k_atomic __NR_arch_specific_syscall __SYSCALL(__NR_or1k_atomic, sys_or1k_atomic) - -#endif /* __ASM_OPENRISC_UNISTD_H */ diff --git a/usr/include/asm-parisc/auxvec.h b/usr/include/asm-parisc/auxvec.h index 9c3ac4b..41fa68b 100644 --- a/usr/include/asm-parisc/auxvec.h +++ b/usr/include/asm-parisc/auxvec.h @@ -1,4 +1 @@ -#ifndef __ASMPARISC_AUXVEC_H -#define __ASMPARISC_AUXVEC_H - -#endif +#include diff --git a/usr/include/asm-parisc/ioctls.h b/usr/include/asm-parisc/ioctls.h index aa621ca..b560f76 100644 --- a/usr/include/asm-parisc/ioctls.h +++ b/usr/include/asm-parisc/ioctls.h @@ -55,6 +55,9 @@ #define TIOCGDEV _IOR('T',0x32, int) /* Get primary device node of /dev/console */ #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ #define TIOCVHANGUP 0x5437 +#define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */ +#define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ +#define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */ #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ #define FIOCLEX 0x5451 diff --git a/usr/include/asm-parisc/mman.h b/usr/include/asm-parisc/mman.h index 12219eb..294d251 100644 --- a/usr/include/asm-parisc/mman.h +++ b/usr/include/asm-parisc/mman.h @@ -70,4 +70,15 @@ #define MAP_FILE 0 #define MAP_VARIABLE 0 +/* + * When MAP_HUGETLB is set bits [26:31] encode the log2 of the huge page size. + * This gives us 6 bits, which is enough until someone invents 128 bit address + * spaces. + * + * Assume these are all power of twos. + * When 0 use the default page size. + */ +#define MAP_HUGE_SHIFT 26 +#define MAP_HUGE_MASK 0x3f + #endif /* __PARISC_MMAN_H__ */ diff --git a/usr/include/asm-parisc/posix_types.h b/usr/include/asm-parisc/posix_types.h index 5212b03..b934425 100644 --- a/usr/include/asm-parisc/posix_types.h +++ b/usr/include/asm-parisc/posix_types.h @@ -10,9 +10,6 @@ typedef unsigned short __kernel_mode_t; #define __kernel_mode_t __kernel_mode_t -typedef unsigned short __kernel_nlink_t; -#define __kernel_nlink_t __kernel_nlink_t - typedef unsigned short __kernel_ipc_pid_t; #define __kernel_ipc_pid_t __kernel_ipc_pid_t diff --git a/usr/include/asm-parisc/ptrace.h b/usr/include/asm-parisc/ptrace.h index 7010d5c..312e133 100644 --- a/usr/include/asm-parisc/ptrace.h +++ b/usr/include/asm-parisc/ptrace.h @@ -1,9 +1,9 @@ -#ifndef _PARISC_PTRACE_H -#define _PARISC_PTRACE_H - /* written by Philipp Rumpf, Copyright (C) 1999 SuSE GmbH Nuernberg ** Copyright (C) 2000 Grant Grundler, Hewlett-Packard */ +#ifndef _PARISC_PTRACE_H +#define _PARISC_PTRACE_H + #include @@ -44,4 +44,4 @@ struct pt_regs { #define PTRACE_SINGLEBLOCK 12 /* resume execution until next branch */ -#endif +#endif /* _PARISC_PTRACE_H */ diff --git a/usr/include/asm-parisc/signal.h b/usr/include/asm-parisc/signal.h index 29b8191..73d8d9f 100644 --- a/usr/include/asm-parisc/signal.h +++ b/usr/include/asm-parisc/signal.h @@ -71,12 +71,6 @@ #define SA_RESTORER 0x04000000 /* obsolete -- ignored */ -/* - * sigaltstack controls - */ -#define SS_ONSTACK 1 -#define SS_DISABLE 2 - #define MINSIGSTKSZ 2048 #define SIGSTKSZ 8192 diff --git a/usr/include/asm-parisc/socket.h b/usr/include/asm-parisc/socket.h index 1b52c2c..70c512a 100644 --- a/usr/include/asm-parisc/socket.h +++ b/usr/include/asm-parisc/socket.h @@ -13,7 +13,7 @@ #define SO_BROADCAST 0x0020 #define SO_LINGER 0x0080 #define SO_OOBINLINE 0x0100 -/* To add :#define SO_REUSEPORT 0x0200 */ +#define SO_REUSEPORT 0x0200 #define SO_SNDBUF 0x1001 #define SO_RCVBUF 0x1002 #define SO_SNDBUFFORCE 0x100a @@ -48,6 +48,7 @@ /* Socket filtering */ #define SO_ATTACH_FILTER 0x401a #define SO_DETACH_FILTER 0x401b +#define SO_GET_FILTER SO_ATTACH_FILTER #define SO_ACCEPTCONN 0x401c @@ -68,6 +69,9 @@ /* Instruct lower device to use last 4-bytes of skb data as FCS */ #define SO_NOFCS 0x4024 +#define SO_LOCK_FILTER 0x4025 + +#define SO_SELECT_ERR_QUEUE 0x4026 /* O_NONBLOCK clashes with the bits used for socket types. Therefore we * have to define SOCK_NONBLOCK to a different value here. diff --git a/usr/include/asm-parisc/stat.h b/usr/include/asm-parisc/stat.h index 9d5fbbc..d76fbda 100644 --- a/usr/include/asm-parisc/stat.h +++ b/usr/include/asm-parisc/stat.h @@ -7,7 +7,7 @@ struct stat { unsigned int st_dev; /* dev_t is 32 bits on parisc */ ino_t st_ino; /* 32 bits */ mode_t st_mode; /* 16 bits */ - nlink_t st_nlink; /* 16 bits */ + unsigned short st_nlink; /* 16 bits */ unsigned short st_reserved1; /* old st_uid */ unsigned short st_reserved2; /* old st_gid */ unsigned int st_rdev; @@ -42,7 +42,7 @@ struct hpux_stat64 { unsigned int st_dev; /* dev_t is 32 bits on parisc */ ino_t st_ino; /* 32 bits */ mode_t st_mode; /* 16 bits */ - nlink_t st_nlink; /* 16 bits */ + unsigned short st_nlink; /* 16 bits */ unsigned short st_reserved1; /* old st_uid */ unsigned short st_reserved2; /* old st_gid */ unsigned int st_rdev; diff --git a/usr/include/asm-parisc/swab.h b/usr/include/asm-parisc/swab.h index 373a79d..e7a8dc5 100644 --- a/usr/include/asm-parisc/swab.h +++ b/usr/include/asm-parisc/swab.h @@ -6,7 +6,7 @@ #define __SWAB_64_THRU_32__ -static __inline__ __u16 __arch_swab16(__u16 x) +static __inline__ __u16 __arch_swab16(__u16 x) { __asm__("dep %0, 15, 8, %0\n\t" /* deposit 00ab -> 0bab */ "shd %%r0, %0, 8, %0" /* shift 000000ab -> 00ba */ @@ -16,7 +16,7 @@ static __inline__ __u16 __arch_swab16(__u16 x) } #define __arch_swab16 __arch_swab16 -static __inline__ __u32 __arch_swab24(__u32 x) +static __inline__ __u32 __arch_swab24(__u32 x) { __asm__("shd %0, %0, 8, %0\n\t" /* shift xabcxabc -> cxab */ "dep %0, 15, 8, %0\n\t" /* deposit cxab -> cbab */ @@ -26,7 +26,7 @@ static __inline__ __u32 __arch_swab24(__u32 x) return x; } -static __inline__ __u32 __arch_swab32(__u32 x) +static __inline__ __u32 __arch_swab32(__u32 x) { unsigned int temp; __asm__("shd %0, %0, 16, %1\n\t" /* shift abcdabcd -> cdab */ @@ -49,7 +49,7 @@ static __inline__ __u32 __arch_swab32(__u32 x) ** HSHR 67452301 -> *6*4*2*0 into %0 ** OR %0 | %1 -> 76543210 into %0 (all done!) */ -static __inline__ __u64 __arch_swab64(__u64 x) +static __inline__ __u64 __arch_swab64(__u64 x) { __u64 temp; __asm__("permh,3210 %0, %0\n\t" diff --git a/usr/include/asm-parisc/termios.h b/usr/include/asm-parisc/termios.h index 73b2555..b7bcbd9 100644 --- a/usr/include/asm-parisc/termios.h +++ b/usr/include/asm-parisc/termios.h @@ -40,4 +40,4 @@ struct termio { /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -#endif /* _PARISC_TERMIOS_H */ +#endif /* _PARISC_TERMIOS_H */ diff --git a/usr/include/asm-parisc/unistd.h b/usr/include/asm-parisc/unistd.h index cf2b391..180a818 100644 --- a/usr/include/asm-parisc/unistd.h +++ b/usr/include/asm-parisc/unistd.h @@ -822,8 +822,12 @@ #define __NR_syncfs (__NR_Linux + 327) #define __NR_setns (__NR_Linux + 328) #define __NR_sendmmsg (__NR_Linux + 329) +#define __NR_process_vm_readv (__NR_Linux + 330) +#define __NR_process_vm_writev (__NR_Linux + 331) +#define __NR_kcmp (__NR_Linux + 332) +#define __NR_finit_module (__NR_Linux + 333) -#define __NR_Linux_syscalls (__NR_sendmmsg + 1) +#define __NR_Linux_syscalls (__NR_finit_module + 1) #define __IGNORE_select /* newselect */ diff --git a/usr/include/asm-powerpc/bootx.h b/usr/include/asm-powerpc/bootx.h index 9a0816a..7f82d64 100644 --- a/usr/include/asm-powerpc/bootx.h +++ b/usr/include/asm-powerpc/bootx.h @@ -129,4 +129,4 @@ typedef struct boot_infos #pragma options align=reset #endif -#endif +#endif /* __ASM_BOOTX_H__ */ diff --git a/usr/include/asm-powerpc/cputable.h b/usr/include/asm-powerpc/cputable.h index 1be7c6d..8144a22 100644 --- a/usr/include/asm-powerpc/cputable.h +++ b/usr/include/asm-powerpc/cputable.h @@ -1,6 +1,7 @@ #ifndef __ASM_POWERPC_CPUTABLE_H #define __ASM_POWERPC_CPUTABLE_H +/* in AT_HWCAP */ #define PPC_FEATURE_32 0x80000000 #define PPC_FEATURE_64 0x40000000 #define PPC_FEATURE_601_INSTR 0x20000000 @@ -33,4 +34,12 @@ #define PPC_FEATURE_TRUE_LE 0x00000002 #define PPC_FEATURE_PPC_LE 0x00000001 +/* in AT_HWCAP2 */ +#define PPC_FEATURE2_ARCH_2_07 0x80000000 +#define PPC_FEATURE2_HTM 0x40000000 +#define PPC_FEATURE2_DSCR 0x20000000 +#define PPC_FEATURE2_EBB 0x10000000 +#define PPC_FEATURE2_ISEL 0x08000000 +#define PPC_FEATURE2_TAR 0x04000000 + #endif /* __ASM_POWERPC_CPUTABLE_H */ diff --git a/usr/include/asm-powerpc/elf.h b/usr/include/asm-powerpc/elf.h index 792f753..cc7ec26 100644 --- a/usr/include/asm-powerpc/elf.h +++ b/usr/include/asm-powerpc/elf.h @@ -1,3 +1,11 @@ +/* + * ELF register definitions.. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ #ifndef _ASM_POWERPC_ELF_H #define _ASM_POWERPC_ELF_H @@ -80,14 +88,6 @@ /* keep this the last entry. */ #define R_PPC_NUM 95 -/* - * ELF register definitions.. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ #define ELF_NGREG 48 /* includes nip, msr, lr, etc. */ #define ELF_NFPREG 33 /* includes fpscr */ diff --git a/usr/include/asm-powerpc/epapr_hcalls.h b/usr/include/asm-powerpc/epapr_hcalls.h new file mode 100644 index 0000000..06f7247 --- /dev/null +++ b/usr/include/asm-powerpc/epapr_hcalls.h @@ -0,0 +1,98 @@ +/* + * ePAPR hcall interface + * + * Copyright 2008-2011 Freescale Semiconductor, Inc. + * + * Author: Timur Tabi + * + * This file is provided under a dual BSD/GPL license. When using or + * redistributing this file, you may do so under either license. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Freescale Semiconductor nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * + * ALTERNATIVELY, this software may be distributed under the terms of the + * GNU General Public License ("GPL") as published by the Free Software + * Foundation, either version 2 of that License or (at your option) any + * later version. + * + * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _ASM_POWERPC_EPAPR_HCALLS_H +#define _ASM_POWERPC_EPAPR_HCALLS_H + +#define EV_BYTE_CHANNEL_SEND 1 +#define EV_BYTE_CHANNEL_RECEIVE 2 +#define EV_BYTE_CHANNEL_POLL 3 +#define EV_INT_SET_CONFIG 4 +#define EV_INT_GET_CONFIG 5 +#define EV_INT_SET_MASK 6 +#define EV_INT_GET_MASK 7 +#define EV_INT_IACK 9 +#define EV_INT_EOI 10 +#define EV_INT_SEND_IPI 11 +#define EV_INT_SET_TASK_PRIORITY 12 +#define EV_INT_GET_TASK_PRIORITY 13 +#define EV_DOORBELL_SEND 14 +#define EV_MSGSND 15 +#define EV_IDLE 16 + +/* vendor ID: epapr */ +#define EV_LOCAL_VENDOR_ID 0 /* for private use */ +#define EV_EPAPR_VENDOR_ID 1 +#define EV_FSL_VENDOR_ID 2 /* Freescale Semiconductor */ +#define EV_IBM_VENDOR_ID 3 /* IBM */ +#define EV_GHS_VENDOR_ID 4 /* Green Hills Software */ +#define EV_ENEA_VENDOR_ID 5 /* Enea */ +#define EV_WR_VENDOR_ID 6 /* Wind River Systems */ +#define EV_AMCC_VENDOR_ID 7 /* Applied Micro Circuits */ +#define EV_KVM_VENDOR_ID 42 /* KVM */ + +/* The max number of bytes that a byte channel can send or receive per call */ +#define EV_BYTE_CHANNEL_MAX_BYTES 16 + + +#define _EV_HCALL_TOKEN(id, num) (((id) << 16) | (num)) +#define EV_HCALL_TOKEN(hcall_num) _EV_HCALL_TOKEN(EV_EPAPR_VENDOR_ID, hcall_num) + +/* epapr return codes */ +#define EV_SUCCESS 0 +#define EV_EPERM 1 /* Operation not permitted */ +#define EV_ENOENT 2 /* Entry Not Found */ +#define EV_EIO 3 /* I/O error occured */ +#define EV_EAGAIN 4 /* The operation had insufficient + * resources to complete and should be + * retried + */ +#define EV_ENOMEM 5 /* There was insufficient memory to + * complete the operation */ +#define EV_EFAULT 6 /* Bad guest address */ +#define EV_ENODEV 7 /* No such device */ +#define EV_EINVAL 8 /* An argument supplied to the hcall + was out of range or invalid */ +#define EV_INTERNAL 9 /* An internal error occured */ +#define EV_CONFIG 10 /* A configuration error was detected */ +#define EV_INVALID_STATE 11 /* The object is in an invalid state */ +#define EV_UNIMPLEMENTED 12 /* Unimplemented hypercall */ +#define EV_BUFFER_OVERFLOW 13 /* Caller-supplied buffer too small */ + +#endif /* _ASM_POWERPC_EPAPR_HCALLS_H */ diff --git a/usr/include/asm-powerpc/ioctls.h b/usr/include/asm-powerpc/ioctls.h index 9ede1b6..d5b258c 100644 --- a/usr/include/asm-powerpc/ioctls.h +++ b/usr/include/asm-powerpc/ioctls.h @@ -97,6 +97,9 @@ #define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get primary device node of /dev/console */ #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ #define TIOCVHANGUP 0x5437 +#define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */ +#define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ +#define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */ #define TIOCSERCONFIG 0x5453 #define TIOCSERGWILD 0x5454 diff --git a/usr/include/asm-powerpc/kvm.h b/usr/include/asm-powerpc/kvm.h index b921c3f..0fb1a6e 100644 --- a/usr/include/asm-powerpc/kvm.h +++ b/usr/include/asm-powerpc/kvm.h @@ -25,6 +25,8 @@ /* Select powerpc specific features in */ #define __KVM_HAVE_SPAPR_TCE #define __KVM_HAVE_PPC_SMT +#define __KVM_HAVE_IRQCHIP +#define __KVM_HAVE_IRQ_LINE struct kvm_regs { __u64 pc; @@ -114,7 +116,10 @@ struct kvm_regs { /* Embedded Floating Point (SPE) -- IVOR32-34 if KVM_SREGS_E_IVOR */ #define KVM_SREGS_E_SPE (1 << 9) -/* External Proxy (EXP) -- EPR */ +/* + * DEPRECATED! USE ONE_REG FOR THIS ONE! + * External Proxy (EXP) -- EPR + */ #define KVM_SREGS_EXP (1 << 10) /* External PID (E.PD) -- EPSC/EPLC */ @@ -221,6 +226,12 @@ struct kvm_sregs { __u32 dbsr; /* KVM_SREGS_E_UPDATE_DBSR */ __u32 dbcr[3]; + /* + * iac/dac registers are 64bit wide, while this API + * interface provides only lower 32 bits on 64 bit + * processors. ONE_REG interface is added for 64bit + * iac/dac registers. + */ __u32 iac[4]; __u32 dac[2]; __u32 dvc[2]; @@ -263,8 +274,31 @@ struct kvm_debug_exit_arch { /* for KVM_SET_GUEST_DEBUG */ struct kvm_guest_debug_arch { + struct { + /* H/W breakpoint/watchpoint address */ + __u64 addr; + /* + * Type denotes h/w breakpoint, read watchpoint, write + * watchpoint or watchpoint (both read and write). + */ +#define KVMPPC_DEBUG_NONE 0x0 +#define KVMPPC_DEBUG_BREAKPOINT (1UL << 1) +#define KVMPPC_DEBUG_WATCH_WRITE (1UL << 2) +#define KVMPPC_DEBUG_WATCH_READ (1UL << 3) + __u32 type; + __u32 reserved; + } bp[16]; }; +/* Debug related defines */ +/* + * kvm_guest_debug->control is a 32 bit field. The lower 16 bits are generic + * and upper 16 bits are architecture specific. Architecture specific defines + * that ioctl is for setting hardware breakpoint or software breakpoint. + */ +#define KVM_GUESTDBG_USE_SW_BP 0x00010000 +#define KVM_GUESTDBG_USE_HW_BP 0x00020000 + /* definition of registers in kvm_run */ struct kvm_sync_regs { }; @@ -277,6 +311,7 @@ struct kvm_sync_regs { #define KVM_CPU_E500V2 2 #define KVM_CPU_3S_32 3 #define KVM_CPU_3S_64 4 +#define KVM_CPU_E500MC 5 /* for KVM_CAP_SPAPR_TCE */ struct kvm_create_spapr_tce { @@ -289,6 +324,12 @@ struct kvm_allocate_rma { __u64 rma_size; }; +/* for KVM_CAP_PPC_RTAS */ +struct kvm_rtas_token_args { + char name[120]; + __u64 token; /* Use a token of 0 to undefine a mapping */ +}; + struct kvm_book3e_206_tlb_entry { __u32 mas8; __u32 mas1; @@ -324,6 +365,150 @@ struct kvm_book3e_206_tlb_params { __u32 reserved[8]; }; +/* For KVM_PPC_GET_HTAB_FD */ +struct kvm_get_htab_fd { + __u64 flags; + __u64 start_index; + __u64 reserved[2]; +}; + +/* Values for kvm_get_htab_fd.flags */ +#define KVM_GET_HTAB_BOLTED_ONLY ((__u64)0x1) +#define KVM_GET_HTAB_WRITE ((__u64)0x2) + +/* + * Data read on the file descriptor is formatted as a series of + * records, each consisting of a header followed by a series of + * `n_valid' HPTEs (16 bytes each), which are all valid. Following + * those valid HPTEs there are `n_invalid' invalid HPTEs, which + * are not represented explicitly in the stream. The same format + * is used for writing. + */ +struct kvm_get_htab_header { + __u32 index; + __u16 n_valid; + __u16 n_invalid; +}; + +/* Per-vcpu XICS interrupt controller state */ +#define KVM_REG_PPC_ICP_STATE (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x8c) + +#define KVM_REG_PPC_ICP_CPPR_SHIFT 56 /* current proc priority */ +#define KVM_REG_PPC_ICP_CPPR_MASK 0xff +#define KVM_REG_PPC_ICP_XISR_SHIFT 32 /* interrupt status field */ +#define KVM_REG_PPC_ICP_XISR_MASK 0xffffff +#define KVM_REG_PPC_ICP_MFRR_SHIFT 24 /* pending IPI priority */ +#define KVM_REG_PPC_ICP_MFRR_MASK 0xff +#define KVM_REG_PPC_ICP_PPRI_SHIFT 16 /* pending irq priority */ +#define KVM_REG_PPC_ICP_PPRI_MASK 0xff + +/* Device control API: PPC-specific devices */ +#define KVM_DEV_MPIC_GRP_MISC 1 +#define KVM_DEV_MPIC_BASE_ADDR 0 /* 64-bit */ + +#define KVM_DEV_MPIC_GRP_REGISTER 2 /* 32-bit */ +#define KVM_DEV_MPIC_GRP_IRQ_ACTIVE 3 /* 32-bit */ + +/* One-Reg API: PPC-specific registers */ #define KVM_REG_PPC_HIOR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x1) +#define KVM_REG_PPC_IAC1 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x2) +#define KVM_REG_PPC_IAC2 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x3) +#define KVM_REG_PPC_IAC3 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x4) +#define KVM_REG_PPC_IAC4 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x5) +#define KVM_REG_PPC_DAC1 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x6) +#define KVM_REG_PPC_DAC2 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x7) +#define KVM_REG_PPC_DABR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x8) +#define KVM_REG_PPC_DSCR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x9) +#define KVM_REG_PPC_PURR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xa) +#define KVM_REG_PPC_SPURR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xb) +#define KVM_REG_PPC_DAR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xc) +#define KVM_REG_PPC_DSISR (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0xd) +#define KVM_REG_PPC_AMR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xe) +#define KVM_REG_PPC_UAMOR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xf) + +#define KVM_REG_PPC_MMCR0 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x10) +#define KVM_REG_PPC_MMCR1 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x11) +#define KVM_REG_PPC_MMCRA (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x12) + +#define KVM_REG_PPC_PMC1 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x18) +#define KVM_REG_PPC_PMC2 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x19) +#define KVM_REG_PPC_PMC3 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x1a) +#define KVM_REG_PPC_PMC4 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x1b) +#define KVM_REG_PPC_PMC5 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x1c) +#define KVM_REG_PPC_PMC6 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x1d) +#define KVM_REG_PPC_PMC7 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x1e) +#define KVM_REG_PPC_PMC8 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x1f) + +/* 32 floating-point registers */ +#define KVM_REG_PPC_FPR0 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x20) +#define KVM_REG_PPC_FPR(n) (KVM_REG_PPC_FPR0 + (n)) +#define KVM_REG_PPC_FPR31 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x3f) + +/* 32 VMX/Altivec vector registers */ +#define KVM_REG_PPC_VR0 (KVM_REG_PPC | KVM_REG_SIZE_U128 | 0x40) +#define KVM_REG_PPC_VR(n) (KVM_REG_PPC_VR0 + (n)) +#define KVM_REG_PPC_VR31 (KVM_REG_PPC | KVM_REG_SIZE_U128 | 0x5f) + +/* 32 double-width FP registers for VSX */ +/* High-order halves overlap with FP regs */ +#define KVM_REG_PPC_VSR0 (KVM_REG_PPC | KVM_REG_SIZE_U128 | 0x60) +#define KVM_REG_PPC_VSR(n) (KVM_REG_PPC_VSR0 + (n)) +#define KVM_REG_PPC_VSR31 (KVM_REG_PPC | KVM_REG_SIZE_U128 | 0x7f) + +/* FP and vector status/control registers */ +#define KVM_REG_PPC_FPSCR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x80) +#define KVM_REG_PPC_VSCR (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x81) + +/* Virtual processor areas */ +/* For SLB & DTL, address in high (first) half, length in low half */ +#define KVM_REG_PPC_VPA_ADDR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x82) +#define KVM_REG_PPC_VPA_SLB (KVM_REG_PPC | KVM_REG_SIZE_U128 | 0x83) +#define KVM_REG_PPC_VPA_DTL (KVM_REG_PPC | KVM_REG_SIZE_U128 | 0x84) + +#define KVM_REG_PPC_EPCR (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x85) +#define KVM_REG_PPC_EPR (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x86) + +/* Timer Status Register OR/CLEAR interface */ +#define KVM_REG_PPC_OR_TSR (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x87) +#define KVM_REG_PPC_CLEAR_TSR (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x88) +#define KVM_REG_PPC_TCR (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x89) +#define KVM_REG_PPC_TSR (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x8a) + +/* Debugging: Special instruction for software breakpoint */ +#define KVM_REG_PPC_DEBUG_INST (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x8b) + +/* MMU registers */ +#define KVM_REG_PPC_MAS0 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x8c) +#define KVM_REG_PPC_MAS1 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x8d) +#define KVM_REG_PPC_MAS2 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x8e) +#define KVM_REG_PPC_MAS7_3 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x8f) +#define KVM_REG_PPC_MAS4 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x90) +#define KVM_REG_PPC_MAS6 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x91) +#define KVM_REG_PPC_MMUCFG (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x92) +/* + * TLBnCFG fields TLBnCFG_N_ENTRY and TLBnCFG_ASSOC can be changed only using + * KVM_CAP_SW_TLB ioctl + */ +#define KVM_REG_PPC_TLB0CFG (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x93) +#define KVM_REG_PPC_TLB1CFG (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x94) +#define KVM_REG_PPC_TLB2CFG (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x95) +#define KVM_REG_PPC_TLB3CFG (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x96) +#define KVM_REG_PPC_TLB0PS (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x97) +#define KVM_REG_PPC_TLB1PS (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x98) +#define KVM_REG_PPC_TLB2PS (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x99) +#define KVM_REG_PPC_TLB3PS (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x9a) +#define KVM_REG_PPC_EPTCFG (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x9b) + +/* PPC64 eXternal Interrupt Controller Specification */ +#define KVM_DEV_XICS_GRP_SOURCES 1 /* 64-bit source attributes */ + +/* Layout of 64-bit source attribute values */ +#define KVM_XICS_DESTINATION_SHIFT 0 +#define KVM_XICS_DESTINATION_MASK 0xffffffffULL +#define KVM_XICS_PRIORITY_SHIFT 32 +#define KVM_XICS_PRIORITY_MASK 0xff +#define KVM_XICS_LEVEL_SENSITIVE (1ULL << 40) +#define KVM_XICS_MASKED (1ULL << 41) +#define KVM_XICS_PENDING (1ULL << 42) #endif /* __LINUX_KVM_POWERPC_H */ diff --git a/usr/include/asm-powerpc/kvm_para.h b/usr/include/asm-powerpc/kvm_para.h index c047a84..7e64f57 100644 --- a/usr/include/asm-powerpc/kvm_para.h +++ b/usr/include/asm-powerpc/kvm_para.h @@ -75,9 +75,10 @@ struct kvm_vcpu_arch_shared { }; #define KVM_SC_MAGIC_R0 0x4b564d21 /* "KVM!" */ -#define HC_VENDOR_KVM (42 << 16) -#define HC_EV_SUCCESS 0 -#define HC_EV_UNIMPLEMENTED 12 + +#define KVM_HCALL_TOKEN(num) _EV_HCALL_TOKEN(EV_KVM_VENDOR_ID, num) + +#include #define KVM_FEATURE_MAGIC_PAGE 1 diff --git a/usr/include/asm-powerpc/linkage.h b/usr/include/asm-powerpc/linkage.h index e1c4ac1..167ceca 100644 --- a/usr/include/asm-powerpc/linkage.h +++ b/usr/include/asm-powerpc/linkage.h @@ -1,6 +1,13 @@ #ifndef _ASM_POWERPC_LINKAGE_H #define _ASM_POWERPC_LINKAGE_H -/* Nothing to see here... */ +#ifdef CONFIG_PPC64 +#define cond_syscall(x) \ + __asm__ ("\t.weak " #x "\n\t.set " #x ", sys_ni_syscall\n" \ + "\t.weak ." #x "\n\t.set ." #x ", .sys_ni_syscall\n") +#define SYSCALL_ALIAS(alias, name) \ + __asm__ ("\t.globl " #alias "\n\t.set " #alias ", " #name "\n" \ + "\t.globl ." #alias "\n\t.set ." #alias ", ." #name) +#endif #endif /* _ASM_POWERPC_LINKAGE_H */ diff --git a/usr/include/asm-powerpc/mman.h b/usr/include/asm-powerpc/mman.h index d14df55..6fa6b60 100644 --- a/usr/include/asm-powerpc/mman.h +++ b/usr/include/asm-powerpc/mman.h @@ -1,14 +1,14 @@ -#ifndef _ASM_POWERPC_MMAN_H -#define _ASM_POWERPC_MMAN_H - -#include - /* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#ifndef _ASM_POWERPC_MMAN_H +#define _ASM_POWERPC_MMAN_H + +#include + #define PROT_SAO 0x10 /* Strong Access Ordering */ @@ -28,4 +28,4 @@ #define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */ #define MAP_HUGETLB 0x40000 /* create a huge page mapping */ -#endif /* _ASM_POWERPC_MMAN_H */ +#endif /* _ASM_POWERPC_MMAN_H */ diff --git a/usr/include/asm-powerpc/posix_types.h b/usr/include/asm-powerpc/posix_types.h index f139325..2958c5b 100644 --- a/usr/include/asm-powerpc/posix_types.h +++ b/usr/include/asm-powerpc/posix_types.h @@ -16,9 +16,6 @@ typedef int __kernel_ssize_t; typedef long __kernel_ptrdiff_t; #define __kernel_size_t __kernel_size_t -typedef unsigned short __kernel_nlink_t; -#define __kernel_nlink_t __kernel_nlink_t - typedef short __kernel_ipc_pid_t; #define __kernel_ipc_pid_t __kernel_ipc_pid_t #endif diff --git a/usr/include/asm-powerpc/ptrace.h b/usr/include/asm-powerpc/ptrace.h index b34a818..d216fe1 100644 --- a/usr/include/asm-powerpc/ptrace.h +++ b/usr/include/asm-powerpc/ptrace.h @@ -1,6 +1,3 @@ -#ifndef _ASM_POWERPC_PTRACE_H -#define _ASM_POWERPC_PTRACE_H - /* * Copyright (C) 2001 PPC64 Team, IBM Corp * @@ -23,6 +20,9 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#ifndef _ASM_POWERPC_PTRACE_H +#define _ASM_POWERPC_PTRACE_H + #include @@ -108,6 +108,7 @@ struct pt_regs { #define PT_DAR 41 #define PT_DSISR 42 #define PT_RESULT 43 +#define PT_DSCR 44 #define PT_REGS_COUNT 44 #define PT_FPR0 48 /* each FP reg occupies 2 slots in this space */ @@ -146,40 +147,34 @@ struct pt_regs { * structures. This also simplifies the implementation of a bi-arch * (combined (32- and 64-bit) gdb. */ -#define PTRACE_GETVRREGS 18 -#define PTRACE_SETVRREGS 19 +#define PTRACE_GETVRREGS 0x12 +#define PTRACE_SETVRREGS 0x13 /* Get/set all the upper 32-bits of the SPE registers, accumulator, and * spefscr, in one go */ -#define PTRACE_GETEVRREGS 20 -#define PTRACE_SETEVRREGS 21 +#define PTRACE_GETEVRREGS 0x14 +#define PTRACE_SETEVRREGS 0x15 /* Get the first 32 128bit VSX registers */ -#define PTRACE_GETVSRREGS 27 -#define PTRACE_SETVSRREGS 28 +#define PTRACE_GETVSRREGS 0x1b +#define PTRACE_SETVSRREGS 0x1c /* * Get or set a debug register. The first 16 are DABR registers and the * second 16 are IABR registers. */ -#define PTRACE_GET_DEBUGREG 25 -#define PTRACE_SET_DEBUGREG 26 +#define PTRACE_GET_DEBUGREG 0x19 +#define PTRACE_SET_DEBUGREG 0x1a /* (new) PTRACE requests using the same numbers as x86 and the same * argument ordering. Additionally, they support more registers too */ -#define PTRACE_GETREGS 12 -#define PTRACE_SETREGS 13 -#define PTRACE_GETFPREGS 14 -#define PTRACE_SETFPREGS 15 -#define PTRACE_GETREGS64 22 -#define PTRACE_SETREGS64 23 - -/* (old) PTRACE requests with inverted arguments */ -#define PPC_PTRACE_GETREGS 0x99 /* Get GPRs 0 - 31 */ -#define PPC_PTRACE_SETREGS 0x98 /* Set GPRs 0 - 31 */ -#define PPC_PTRACE_GETFPREGS 0x97 /* Get FPRs 0 - 31 */ -#define PPC_PTRACE_SETFPREGS 0x96 /* Set FPRs 0 - 31 */ +#define PTRACE_GETREGS 0xc +#define PTRACE_SETREGS 0xd +#define PTRACE_GETFPREGS 0xe +#define PTRACE_SETFPREGS 0xf +#define PTRACE_GETREGS64 0x16 +#define PTRACE_SETREGS64 0x17 /* Calls to trace a 64bit program from a 32bit program */ #define PPC_PTRACE_PEEKTEXT_3264 0x95 @@ -216,6 +211,7 @@ struct ppc_debug_info { #define PPC_DEBUG_FEATURE_INSN_BP_MASK 0x0000000000000002 #define PPC_DEBUG_FEATURE_DATA_BP_RANGE 0x0000000000000004 #define PPC_DEBUG_FEATURE_DATA_BP_MASK 0x0000000000000008 +#define PPC_DEBUG_FEATURE_DATA_BP_DAWR 0x0000000000000010 #ifndef __ASSEMBLY__ diff --git a/usr/include/asm-powerpc/setup.h b/usr/include/asm-powerpc/setup.h index d084ce1..552df83 100644 --- a/usr/include/asm-powerpc/setup.h +++ b/usr/include/asm-powerpc/setup.h @@ -1,32 +1 @@ -#ifndef _ASM_POWERPC_SETUP_H -#define _ASM_POWERPC_SETUP_H - #include - -#ifndef __ASSEMBLY__ -extern void ppc_printk_progress(char *s, unsigned short hex); - -extern unsigned int rtas_data; -extern int mem_init_done; /* set on boot once kmalloc can be called */ -extern int init_bootmem_done; /* set once bootmem is available */ -extern phys_addr_t memory_limit; -extern unsigned long klimit; -extern void *zalloc_maybe_bootmem(size_t size, gfp_t mask); - -extern void via_cuda_init(void); -extern void read_rtc_time(void); -extern void pmac_find_display(void); - -struct device_node; -extern void note_scsi_host(struct device_node *, void *); - -/* Used in very early kernel initialization. */ -extern unsigned long reloc_offset(void); -extern unsigned long add_reloc_offset(unsigned long); -extern void reloc_got2(unsigned long); - -#define PTRRELOC(x) ((typeof(x)) add_reloc_offset((unsigned long)(x))) - -#endif /* !__ASSEMBLY__ */ - -#endif /* _ASM_POWERPC_SETUP_H */ diff --git a/usr/include/asm-powerpc/siginfo.h b/usr/include/asm-powerpc/siginfo.h index 49495b0..ccce3ef 100644 --- a/usr/include/asm-powerpc/siginfo.h +++ b/usr/include/asm-powerpc/siginfo.h @@ -10,7 +10,6 @@ #ifdef __powerpc64__ # define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) -# define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3) #endif #include diff --git a/usr/include/asm-powerpc/signal.h b/usr/include/asm-powerpc/signal.h index 6bcf03e..4cdbe24 100644 --- a/usr/include/asm-powerpc/signal.h +++ b/usr/include/asm-powerpc/signal.h @@ -85,12 +85,6 @@ typedef struct { #define SA_RESTORER 0x04000000U -/* - * sigaltstack controls - */ -#define SS_ONSTACK 1 -#define SS_DISABLE 2 - #define MINSIGSTKSZ 2048 #define SIGSTKSZ 8192 @@ -110,10 +104,6 @@ struct sigaction { sigset_t sa_mask; /* mask last for extensibility */ }; -struct k_sigaction { - struct sigaction sa; -}; - typedef struct sigaltstack { void *ss_sp; int ss_flags; diff --git a/usr/include/asm-powerpc/socket.h b/usr/include/asm-powerpc/socket.h index 3d5179b..a36daf3 100644 --- a/usr/include/asm-powerpc/socket.h +++ b/usr/include/asm-powerpc/socket.h @@ -29,7 +29,7 @@ #define SO_PRIORITY 12 #define SO_LINGER 13 #define SO_BSDCOMPAT 14 -/* To add :#define SO_REUSEPORT 15 */ +#define SO_REUSEPORT 15 #define SO_RCVLOWAT 16 #define SO_SNDLOWAT 17 #define SO_RCVTIMEO 18 @@ -47,6 +47,7 @@ /* Socket filtering */ #define SO_ATTACH_FILTER 26 #define SO_DETACH_FILTER 27 +#define SO_GET_FILTER SO_ATTACH_FILTER #define SO_PEERNAME 28 #define SO_TIMESTAMP 29 @@ -76,4 +77,8 @@ /* Instruct lower device to use last 4-bytes of skb data as FCS */ #define SO_NOFCS 43 +#define SO_LOCK_FILTER 44 + +#define SO_SELECT_ERR_QUEUE 45 + #endif /* _ASM_POWERPC_SOCKET_H */ diff --git a/usr/include/asm-powerpc/spu_info.h b/usr/include/asm-powerpc/spu_info.h index fdedd96..de8afe3 100644 --- a/usr/include/asm-powerpc/spu_info.h +++ b/usr/include/asm-powerpc/spu_info.h @@ -48,4 +48,4 @@ struct spu_proxydma_info { struct mfc_cq_sr proxydma_info_command_data[8]; }; -#endif +#endif /* _SPU_INFO_H */ diff --git a/usr/include/asm-powerpc/stat.h b/usr/include/asm-powerpc/stat.h index e4edc51..84880b8 100644 --- a/usr/include/asm-powerpc/stat.h +++ b/usr/include/asm-powerpc/stat.h @@ -30,11 +30,11 @@ struct stat { unsigned long st_dev; ino_t st_ino; #ifdef __powerpc64__ - nlink_t st_nlink; + unsigned long st_nlink; mode_t st_mode; #else mode_t st_mode; - nlink_t st_nlink; + unsigned short st_nlink; #endif uid_t st_uid; gid_t st_gid; diff --git a/usr/include/asm-powerpc/swab.h b/usr/include/asm-powerpc/swab.h index 551f9b9..3958720 100644 --- a/usr/include/asm-powerpc/swab.h +++ b/usr/include/asm-powerpc/swab.h @@ -1,12 +1,12 @@ -#ifndef _ASM_POWERPC_SWAB_H -#define _ASM_POWERPC_SWAB_H - /* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#ifndef _ASM_POWERPC_SWAB_H +#define _ASM_POWERPC_SWAB_H + #include diff --git a/usr/include/asm-powerpc/termios.h b/usr/include/asm-powerpc/termios.h index f027022..64fad85 100644 --- a/usr/include/asm-powerpc/termios.h +++ b/usr/include/asm-powerpc/termios.h @@ -1,6 +1,3 @@ -#ifndef _ASM_POWERPC_TERMIOS_H -#define _ASM_POWERPC_TERMIOS_H - /* * Liberally adapted from alpha/termios.h. In particular, the c_cc[] * fields have been reordered so that termio & termios share the @@ -12,6 +9,9 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#ifndef _ASM_POWERPC_TERMIOS_H +#define _ASM_POWERPC_TERMIOS_H + #include #include @@ -73,4 +73,4 @@ struct termio { -#endif /* _ASM_POWERPC_TERMIOS_H */ +#endif /* _ASM_POWERPC_TERMIOS_H */ diff --git a/usr/include/asm-powerpc/tm.h b/usr/include/asm-powerpc/tm.h new file mode 100644 index 0000000..85059a0 --- /dev/null +++ b/usr/include/asm-powerpc/tm.h @@ -0,0 +1,18 @@ +#ifndef _ASM_POWERPC_TM_H +#define _ASM_POWERPC_TM_H + +/* Reason codes describing kernel causes for transaction aborts. By + * convention, bit0 is copied to TEXASR[56] (IBM bit 7) which is set if + * the failure is persistent. PAPR saves 0xff-0xe0 for the hypervisor. + */ +#define TM_CAUSE_PERSISTENT 0x01 +#define TM_CAUSE_RESCHED 0xde +#define TM_CAUSE_TLBI 0xdc +#define TM_CAUSE_FAC_UNAV 0xda +#define TM_CAUSE_SYSCALL 0xd8 /* future use */ +#define TM_CAUSE_MISC 0xd6 /* future use */ +#define TM_CAUSE_SIGNAL 0xd4 +#define TM_CAUSE_ALIGNMENT 0xd2 +#define TM_CAUSE_EMULATE 0xd0 + +#endif diff --git a/usr/include/asm-powerpc/types.h b/usr/include/asm-powerpc/types.h index a592c85..3ca9bbb 100644 --- a/usr/include/asm-powerpc/types.h +++ b/usr/include/asm-powerpc/types.h @@ -1,3 +1,15 @@ +/* + * This file is never included by application software unless + * explicitly requested (e.g., via linux/types.h) in which case the + * application is Linux specific so (user-) name space pollution is + * not a major issue. However, for interoperability, libraries still + * need to be careful to avoid a name clashes. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ #ifndef _ASM_POWERPC_TYPES_H #define _ASM_POWERPC_TYPES_H @@ -17,18 +29,6 @@ #ifndef __ASSEMBLY__ -/* - * This file is never included by application software unless - * explicitly requested (e.g., via linux/types.h) in which case the - * application is Linux specific so (user-) name space pollution is - * not a major issue. However, for interoperability, libraries still - * need to be careful to avoid a name clashes. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ typedef struct { __u32 u[4]; diff --git a/usr/include/asm-powerpc/unistd.h b/usr/include/asm-powerpc/unistd.h index 230f50b..46a9783 100644 --- a/usr/include/asm-powerpc/unistd.h +++ b/usr/include/asm-powerpc/unistd.h @@ -1,6 +1,3 @@ -#ifndef _ASM_POWERPC_UNISTD_H_ -#define _ASM_POWERPC_UNISTD_H_ - /* * This file contains the system call numbers. * @@ -9,6 +6,9 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#ifndef _ASM_POWERPC_UNISTD_H_ +#define _ASM_POWERPC_UNISTD_H_ + #define __NR_restart_syscall 0 #define __NR_exit 1 @@ -375,6 +375,8 @@ #define __NR_setns 350 #define __NR_process_vm_readv 351 #define __NR_process_vm_writev 352 +#define __NR_finit_module 353 +#define __NR_kcmp 354 #endif /* _ASM_POWERPC_UNISTD_H_ */ diff --git a/usr/include/asm-s390/chpid.h b/usr/include/asm-s390/chpid.h index 04d1f00..e9bdbc5 100644 --- a/usr/include/asm-s390/chpid.h +++ b/usr/include/asm-s390/chpid.h @@ -1,7 +1,5 @@ /* - * drivers/s390/cio/chpid.h - * - * Copyright IBM Corp. 2007 + * Copyright IBM Corp. 2007, 2012 * Author(s): Peter Oberparleiter */ @@ -14,10 +12,10 @@ #define __MAX_CHPID 255 struct chp_id { - u8 reserved1; - u8 cssid; - u8 reserved2; - u8 id; + __u8 reserved1; + __u8 cssid; + __u8 reserved2; + __u8 id; } __attribute__((packed)); diff --git a/usr/include/asm-s390/chsc.h b/usr/include/asm-s390/chsc.h index 807997f..1c6a7f8 100644 --- a/usr/include/asm-s390/chsc.h +++ b/usr/include/asm-s390/chsc.h @@ -1,7 +1,7 @@ /* * ioctl interface for /dev/chsc * - * Copyright 2008 IBM Corp. + * Copyright IBM Corp. 2008, 2012 * Author(s): Cornelia Huck */ @@ -9,9 +9,12 @@ #define _ASM_CHSC_H #include +#include #include #include +#define CHSC_SIZE 0x1000 + struct chsc_async_header { __u16 length; __u16 code; @@ -23,15 +26,14 @@ struct chsc_async_header { struct chsc_async_area { struct chsc_async_header header; - __u8 data[PAGE_SIZE - 16 /* size of chsc_async_header */]; + __u8 data[CHSC_SIZE - sizeof(struct chsc_async_header)]; } __attribute__ ((packed)); - struct chsc_response_struct { __u16 length; __u16 code; __u32 parms; - __u8 data[PAGE_SIZE - 8]; + __u8 data[CHSC_SIZE - 2 * sizeof(__u16) - sizeof(__u32)]; } __attribute__ ((packed)); struct chsc_chp_cd { diff --git a/usr/include/asm-s390/dasd.h b/usr/include/asm-s390/dasd.h index 0be28ef..38eca3b 100644 --- a/usr/include/asm-s390/dasd.h +++ b/usr/include/asm-s390/dasd.h @@ -1,8 +1,7 @@ /* - * File...........: linux/drivers/s390/block/dasd.c * Author(s)......: Holger Smolinski * Bugreports.to..: - * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 + * Copyright IBM Corp. 1999, 2000 * EMC Symmetrix ioctl Copyright EMC Corporation, 2008 * Author.........: Nigel Hislop * diff --git a/usr/include/asm-s390/debug.h b/usr/include/asm-s390/debug.h index c3a3cee..0782143 100644 --- a/usr/include/asm-s390/debug.h +++ b/usr/include/asm-s390/debug.h @@ -1,9 +1,7 @@ /* - * include/asm-s390/debug.h * S/390 debug facility * - * Copyright (C) 1999, 2000 IBM Deutschland Entwicklung GmbH, - * IBM Corporation + * Copyright IBM Corp. 1999, 2000 */ #ifndef DEBUG_H @@ -33,4 +31,4 @@ struct __debug_entry{ #define __DEBUG_FEATURE_VERSION 2 /* version of debug feature */ -#endif /* DEBUG_H */ +#endif /* DEBUG_H */ diff --git a/usr/include/asm-s390/errno.h b/usr/include/asm-s390/errno.h index e41d5b3..395e97d 100644 --- a/usr/include/asm-s390/errno.h +++ b/usr/include/asm-s390/errno.h @@ -1,6 +1,4 @@ /* - * include/asm-s390/errno.h - * * S390 version * */ diff --git a/usr/include/asm-s390/kvm.h b/usr/include/asm-s390/kvm.h index 9607667..d25da59 100644 --- a/usr/include/asm-s390/kvm.h +++ b/usr/include/asm-s390/kvm.h @@ -1,7 +1,7 @@ #ifndef __LINUX_KVM_S390_H #define __LINUX_KVM_S390_H /* - * asm-s390/kvm.h - KVM s390 specific structures and definitions + * KVM s390 specific structures and definitions * * Copyright IBM Corp. 2008 * @@ -52,4 +52,9 @@ struct kvm_sync_regs { __u32 acrs[16]; /* access registers */ __u64 crs[16]; /* control registers */ }; + +#define KVM_REG_S390_TODPR (KVM_REG_S390 | KVM_REG_SIZE_U32 | 0x1) +#define KVM_REG_S390_EPOCHDIFF (KVM_REG_S390 | KVM_REG_SIZE_U64 | 0x2) +#define KVM_REG_S390_CPU_TIMER (KVM_REG_S390 | KVM_REG_SIZE_U64 | 0x3) +#define KVM_REG_S390_CLOCK_COMP (KVM_REG_S390 | KVM_REG_SIZE_U64 | 0x4) #endif diff --git a/usr/include/asm-s390/kvm_para.h b/usr/include/asm-s390/kvm_para.h index 8e2dd67..ff1f4e7 100644 --- a/usr/include/asm-s390/kvm_para.h +++ b/usr/include/asm-s390/kvm_para.h @@ -1,5 +1,5 @@ /* - * asm-s390/kvm_para.h - definition for paravirtual devices on s390 + * User API definitions for paravirtual devices on s390 * * Copyright IBM Corp. 2008 * @@ -9,9 +9,3 @@ * * Author(s): Christian Borntraeger */ - -#ifndef __S390_KVM_PARA_H -#define __S390_KVM_PARA_H - - -#endif /* __S390_KVM_PARA_H */ diff --git a/usr/include/asm-s390/kvm_virtio.h b/usr/include/asm-s390/kvm_virtio.h index 72f6141..44a438c 100644 --- a/usr/include/asm-s390/kvm_virtio.h +++ b/usr/include/asm-s390/kvm_virtio.h @@ -1,5 +1,5 @@ /* - * kvm_virtio.h - definition for virtio for kvm on s390 + * definition for virtio for kvm on s390 * * Copyright IBM Corp. 2008 * diff --git a/usr/include/asm-s390/mman.h b/usr/include/asm-s390/mman.h index 00cca8d..de23da1 100644 --- a/usr/include/asm-s390/mman.h +++ b/usr/include/asm-s390/mman.h @@ -1,15 +1,6 @@ /* - * include/asm-s390/mman.h - * * S390 version * * Derived from "include/asm-i386/mman.h" */ - -#ifndef __S390_MMAN_H__ -#define __S390_MMAN_H__ - #include - - -#endif /* __S390_MMAN_H__ */ diff --git a/usr/include/asm-s390/monwriter.h b/usr/include/asm-s390/monwriter.h index f0cbf96..f845c8e 100644 --- a/usr/include/asm-s390/monwriter.h +++ b/usr/include/asm-s390/monwriter.h @@ -1,7 +1,5 @@ /* - * include/asm-s390/monwriter.h - * - * Copyright (C) IBM Corp. 2006 + * Copyright IBM Corp. 2006 * Character device driver for writing z/VM APPLDATA monitor records * Version 1.0 * Author(s): Melissa Howland diff --git a/usr/include/asm-s390/posix_types.h b/usr/include/asm-s390/posix_types.h index edf8527..bf2a2ad 100644 --- a/usr/include/asm-s390/posix_types.h +++ b/usr/include/asm-s390/posix_types.h @@ -1,6 +1,4 @@ /* - * include/asm-s390/posix_types.h - * * S390 version * */ @@ -15,6 +13,7 @@ */ typedef unsigned long __kernel_size_t; +typedef long __kernel_ssize_t; #define __kernel_size_t __kernel_size_t typedef unsigned short __kernel_old_dev_t; @@ -24,22 +23,18 @@ typedef unsigned short __kernel_old_dev_t; typedef unsigned long __kernel_ino_t; typedef unsigned short __kernel_mode_t; -typedef unsigned short __kernel_nlink_t; typedef unsigned short __kernel_ipc_pid_t; typedef unsigned short __kernel_uid_t; typedef unsigned short __kernel_gid_t; -typedef int __kernel_ssize_t; typedef int __kernel_ptrdiff_t; #else /* __s390x__ */ typedef unsigned int __kernel_ino_t; typedef unsigned int __kernel_mode_t; -typedef unsigned int __kernel_nlink_t; typedef int __kernel_ipc_pid_t; typedef unsigned int __kernel_uid_t; typedef unsigned int __kernel_gid_t; -typedef long __kernel_ssize_t; typedef long __kernel_ptrdiff_t; typedef unsigned long __kernel_sigset_t; /* at least 32 bits */ @@ -47,7 +42,6 @@ typedef unsigned long __kernel_sigset_t; /* at least 32 bits */ #define __kernel_ino_t __kernel_ino_t #define __kernel_mode_t __kernel_mode_t -#define __kernel_nlink_t __kernel_nlink_t #define __kernel_ipc_pid_t __kernel_ipc_pid_t #define __kernel_uid_t __kernel_uid_t #define __kernel_gid_t __kernel_gid_t diff --git a/usr/include/asm-s390/ptrace.h b/usr/include/asm-s390/ptrace.h index 3e37bfe..b6c49f5 100644 --- a/usr/include/asm-s390/ptrace.h +++ b/usr/include/asm-s390/ptrace.h @@ -1,8 +1,6 @@ /* - * include/asm-s390/ptrace.h - * * S390 version - * Copyright (C) 1999,2000 IBM Deutschland Entwicklung GmbH, IBM Corporation + * Copyright IBM Corp. 1999, 2000 * Author(s): Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com) */ @@ -217,12 +215,6 @@ typedef struct unsigned long addr; } __attribute__ ((aligned(8))) psw_t; -typedef struct -{ - __u32 mask; - __u32 addr; -} __attribute__ ((aligned(8))) psw_compat_t; - #ifndef __s390x__ #define PSW_MASK_PER 0x40000000UL @@ -237,10 +229,11 @@ typedef struct #define PSW_MASK_ASC 0x0000C000UL #define PSW_MASK_CC 0x00003000UL #define PSW_MASK_PM 0x00000F00UL +#define PSW_MASK_RI 0x00000000UL #define PSW_MASK_EA 0x00000000UL #define PSW_MASK_BA 0x00000000UL -#define PSW_MASK_USER 0x00003F00UL +#define PSW_MASK_USER 0x0000FF00UL #define PSW_ADDR_AMODE 0x80000000UL #define PSW_ADDR_INSN 0x7FFFFFFFUL @@ -266,10 +259,11 @@ typedef struct #define PSW_MASK_ASC 0x0000C00000000000UL #define PSW_MASK_CC 0x0000300000000000UL #define PSW_MASK_PM 0x00000F0000000000UL +#define PSW_MASK_RI 0x0000008000000000UL #define PSW_MASK_EA 0x0000000100000000UL #define PSW_MASK_BA 0x0000000080000000UL -#define PSW_MASK_USER 0x00003F0180000000UL +#define PSW_MASK_USER 0x0000FF8180000000UL #define PSW_ADDR_AMODE 0x0000000000000000UL #define PSW_ADDR_INSN 0xFFFFFFFFFFFFFFFFUL @@ -295,20 +289,6 @@ typedef struct unsigned long orig_gpr2; } s390_regs; -typedef struct -{ - psw_compat_t psw; - __u32 gprs[NUM_GPRS]; - __u32 acrs[NUM_ACRS]; - __u32 orig_gpr2; -} s390_compat_regs; - -typedef struct -{ - __u32 gprs_high[NUM_GPRS]; -} s390_compat_regs_high; - - /* * Now for the user space program event recording (trace) definitions. * The following structures are used only for the ptrace interface, don't @@ -418,6 +398,8 @@ typedef struct #define PTRACE_GET_LAST_BREAK 0x5006 #define PTRACE_PEEK_SYSTEM_CALL 0x5007 #define PTRACE_POKE_SYSTEM_CALL 0x5008 +#define PTRACE_ENABLE_TE 0x5009 +#define PTRACE_DISABLE_TE 0x5010 /* * PT_PROT definition is loosely based on hppa bsd definition in diff --git a/usr/include/asm-s390/qeth.h b/usr/include/asm-s390/qeth.h index 2c7c898..3a896cf 100644 --- a/usr/include/asm-s390/qeth.h +++ b/usr/include/asm-s390/qeth.h @@ -1,9 +1,7 @@ /* - * include/asm-s390/qeth.h - * * ioctl definitions for qeth driver * - * Copyright (C) 2004 IBM Corporation + * Copyright IBM Corp. 2004 * * Author(s): Thomas Spatzier * diff --git a/usr/include/asm-s390/resource.h b/usr/include/asm-s390/resource.h index 366c01d..ec23d1c 100644 --- a/usr/include/asm-s390/resource.h +++ b/usr/include/asm-s390/resource.h @@ -1,6 +1,4 @@ /* - * include/asm-s390/resource.h - * * S390 version * * Derived from "include/asm-i386/resources.h" diff --git a/usr/include/asm-s390/setup.h b/usr/include/asm-s390/setup.h index 5a4c1ef..4140815 100644 --- a/usr/include/asm-s390/setup.h +++ b/usr/include/asm-s390/setup.h @@ -1,8 +1,6 @@ /* - * include/asm-s390/setup.h - * * S390 version - * Copyright IBM Corp. 1999,2010 + * Copyright IBM Corp. 1999, 2010 */ #ifndef _ASM_S390_SETUP_H diff --git a/usr/include/asm-s390/sigcontext.h b/usr/include/asm-s390/sigcontext.h index 47510e5..1746a5d 100644 --- a/usr/include/asm-s390/sigcontext.h +++ b/usr/include/asm-s390/sigcontext.h @@ -1,8 +1,6 @@ /* - * include/asm-s390/sigcontext.h - * * S390 version - * Copyright (C) 1999,2000 IBM Deutschland Entwicklung GmbH, IBM Corporation + * Copyright IBM Corp. 1999, 2000 */ #ifndef _ASM_S390_SIGCONTEXT_H diff --git a/usr/include/asm-s390/siginfo.h b/usr/include/asm-s390/siginfo.h index e0ff1ab..91fd3e4 100644 --- a/usr/include/asm-s390/siginfo.h +++ b/usr/include/asm-s390/siginfo.h @@ -1,6 +1,4 @@ /* - * include/asm-s390/siginfo.h - * * S390 version * * Derived from "include/asm-i386/siginfo.h" diff --git a/usr/include/asm-s390/signal.h b/usr/include/asm-s390/signal.h index 7d036bf..37a94f9 100644 --- a/usr/include/asm-s390/signal.h +++ b/usr/include/asm-s390/signal.h @@ -1,6 +1,4 @@ /* - * include/asm-s390/signal.h - * * S390 version * * Derived from "include/asm-i386/signal.h" @@ -90,12 +88,6 @@ typedef unsigned long sigset_t; #define SA_RESTORER 0x04000000 -/* - * sigaltstack controls - */ -#define SS_ONSTACK 1 -#define SS_DISABLE 2 - #define MINSIGSTKSZ 2048 #define SIGSTKSZ 8192 @@ -130,4 +122,4 @@ typedef struct sigaltstack { } stack_t; -#endif +#endif /* _ASMS390_SIGNAL_H */ diff --git a/usr/include/asm-s390/socket.h b/usr/include/asm-s390/socket.h index c91b720..2dacb30 100644 --- a/usr/include/asm-s390/socket.h +++ b/usr/include/asm-s390/socket.h @@ -1,6 +1,4 @@ /* - * include/asm-s390/socket.h - * * S390 version * * Derived from "include/asm-i386/socket.h" @@ -30,7 +28,7 @@ #define SO_PRIORITY 12 #define SO_LINGER 13 #define SO_BSDCOMPAT 14 -/* To add :#define SO_REUSEPORT 15 */ +#define SO_REUSEPORT 15 #define SO_PASSCRED 16 #define SO_PEERCRED 17 #define SO_RCVLOWAT 18 @@ -48,6 +46,7 @@ /* Socket filtering */ #define SO_ATTACH_FILTER 26 #define SO_DETACH_FILTER 27 +#define SO_GET_FILTER SO_ATTACH_FILTER #define SO_PEERNAME 28 #define SO_TIMESTAMP 29 @@ -77,4 +76,8 @@ /* Instruct lower device to use last 4-bytes of skb data as FCS */ #define SO_NOFCS 43 +#define SO_LOCK_FILTER 44 + +#define SO_SELECT_ERR_QUEUE 45 + #endif /* _ASM_SOCKET_H */ diff --git a/usr/include/asm-s390/stat.h b/usr/include/asm-s390/stat.h index d92959e..b4ca97d 100644 --- a/usr/include/asm-s390/stat.h +++ b/usr/include/asm-s390/stat.h @@ -1,6 +1,4 @@ /* - * include/asm-s390/stat.h - * * S390 version * * Derived from "include/asm-i386/stat.h" diff --git a/usr/include/asm-s390/statfs.h b/usr/include/asm-s390/statfs.h index 3be7fbd..a61d538 100644 --- a/usr/include/asm-s390/statfs.h +++ b/usr/include/asm-s390/statfs.h @@ -1,6 +1,4 @@ /* - * include/asm-s390/statfs.h - * * S390 version * * Derived from "include/asm-i386/statfs.h" @@ -9,9 +7,6 @@ #ifndef _S390_STATFS_H #define _S390_STATFS_H -#ifndef __s390x__ -#include -#else /* * We can't use because in 64-bit mode * we mix ints of different sizes in our struct statfs. @@ -23,49 +18,33 @@ typedef __kernel_fsid_t fsid_t; #endif struct statfs { - int f_type; - int f_bsize; - long f_blocks; - long f_bfree; - long f_bavail; - long f_files; - long f_ffree; + unsigned int f_type; + unsigned int f_bsize; + unsigned long f_blocks; + unsigned long f_bfree; + unsigned long f_bavail; + unsigned long f_files; + unsigned long f_ffree; __kernel_fsid_t f_fsid; - int f_namelen; - int f_frsize; - int f_flags; - int f_spare[4]; + unsigned int f_namelen; + unsigned int f_frsize; + unsigned int f_flags; + unsigned int f_spare[4]; }; struct statfs64 { - int f_type; - int f_bsize; - long f_blocks; - long f_bfree; - long f_bavail; - long f_files; - long f_ffree; - __kernel_fsid_t f_fsid; - int f_namelen; - int f_frsize; - int f_flags; - int f_spare[4]; -}; - -struct compat_statfs64 { - __u32 f_type; - __u32 f_bsize; - __u64 f_blocks; - __u64 f_bfree; - __u64 f_bavail; - __u64 f_files; - __u64 f_ffree; + unsigned int f_type; + unsigned int f_bsize; + unsigned long f_blocks; + unsigned long f_bfree; + unsigned long f_bavail; + unsigned long f_files; + unsigned long f_ffree; __kernel_fsid_t f_fsid; - __u32 f_namelen; - __u32 f_frsize; - __u32 f_flags; - __u32 f_spare[4]; + unsigned int f_namelen; + unsigned int f_frsize; + unsigned int f_flags; + unsigned int f_spare[4]; }; -#endif /* __s390x__ */ #endif diff --git a/usr/include/asm-s390/swab.h b/usr/include/asm-s390/swab.h index ebaa1e0..bdea8fc 100644 --- a/usr/include/asm-s390/swab.h +++ b/usr/include/asm-s390/swab.h @@ -2,10 +2,8 @@ #define _S390_SWAB_H /* - * include/asm-s390/swab.h - * * S390 version - * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation + * Copyright IBM Corp. 1999 * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com) */ @@ -20,7 +18,7 @@ static __inline__ __u64 __arch_swab64p(const __u64 *x) { __u64 result; - __asm__ __volatile__("lrvg %0,%1" : "=d" (result) : "m" (*x)); + __asm__ volatile("lrvg %0,%1" : "=d" (result) : "m" (*x)); return result; } #define __arch_swab64p __arch_swab64p @@ -29,7 +27,7 @@ static __inline__ __u64 __arch_swab64(__u64 x) { __u64 result; - __asm__ __volatile__("lrvgr %0,%1" : "=d" (result) : "d" (x)); + __asm__ volatile("lrvgr %0,%1" : "=d" (result) : "d" (x)); return result; } #define __arch_swab64 __arch_swab64 @@ -45,7 +43,7 @@ static __inline__ __u32 __arch_swab32p(const __u32 *x) { __u32 result; - __asm__ __volatile__( + __asm__ volatile( #ifndef __s390x__ " icm %0,8,%O1+3(%R1)\n" " icm %0,4,%O1+2(%R1)\n" @@ -65,7 +63,7 @@ static __inline__ __u32 __arch_swab32(__u32 x) { __u32 result; - __asm__ __volatile__("lrvr %0,%1" : "=d" (result) : "d" (x)); + __asm__ volatile("lrvr %0,%1" : "=d" (result) : "d" (x)); return result; } #define __arch_swab32 __arch_swab32 @@ -75,7 +73,7 @@ static __inline__ __u16 __arch_swab16p(const __u16 *x) { __u16 result; - __asm__ __volatile__( + __asm__ volatile( #ifndef __s390x__ " icm %0,2,%O1+1(%R1)\n" " ic %0,%1\n" diff --git a/usr/include/asm-s390/tape390.h b/usr/include/asm-s390/tape390.h index 884fba4..b2bc4ba 100644 --- a/usr/include/asm-s390/tape390.h +++ b/usr/include/asm-s390/tape390.h @@ -1,10 +1,9 @@ /************************************************************************* * - * tape390.h * enables user programs to display messages and control encryption * on s390 tape devices * - * Copyright IBM Corp. 2001,2006 + * Copyright IBM Corp. 2001, 2006 * Author(s): Michael Holzheu * *************************************************************************/ diff --git a/usr/include/asm-s390/termios.h b/usr/include/asm-s390/termios.h index 31c338d..37f01a7 100644 --- a/usr/include/asm-s390/termios.h +++ b/usr/include/asm-s390/termios.h @@ -1,6 +1,4 @@ /* - * include/asm-s390/termios.h - * * S390 version * * Derived from "include/asm-i386/termios.h" @@ -48,4 +46,4 @@ struct termio { /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -#endif /* _S390_TERMIOS_H */ +#endif /* _S390_TERMIOS_H */ diff --git a/usr/include/asm-s390/types.h b/usr/include/asm-s390/types.h index ed1e267..a2a39f0 100644 --- a/usr/include/asm-s390/types.h +++ b/usr/include/asm-s390/types.h @@ -1,6 +1,4 @@ /* - * include/asm-s390/types.h - * * S390 version * * Derived from "include/asm-i386/types.h" @@ -21,7 +19,4 @@ typedef __signed__ long saddr_t; #endif /* __ASSEMBLY__ */ -/* - * These aren't exported outside the kernel to avoid name space clashes - */ #endif /* _S390_TYPES_H */ diff --git a/usr/include/asm-s390/ucontext.h b/usr/include/asm-s390/ucontext.h index cfb874e..200e063 100644 --- a/usr/include/asm-s390/ucontext.h +++ b/usr/include/asm-s390/ucontext.h @@ -1,6 +1,4 @@ /* - * include/asm-s390/ucontext.h - * * S390 version * * Derived from "include/asm-i386/ucontext.h" diff --git a/usr/include/asm-s390/unistd.h b/usr/include/asm-s390/unistd.h index 70a5087..3d55356 100644 --- a/usr/include/asm-s390/unistd.h +++ b/usr/include/asm-s390/unistd.h @@ -1,6 +1,4 @@ /* - * include/asm-s390/unistd.h - * * S390 version * * Derived from "include/asm-i386/unistd.h" @@ -279,7 +277,10 @@ #define __NR_setns 339 #define __NR_process_vm_readv 340 #define __NR_process_vm_writev 341 -#define NR_syscalls 342 +#define __NR_s390_runtime_instr 342 +#define __NR_kcmp 343 +#define __NR_finit_module 344 +#define NR_syscalls 345 /* * There are some system calls that are not present on 64 bit, some diff --git a/usr/include/asm-s390/virtio-ccw.h b/usr/include/asm-s390/virtio-ccw.h new file mode 100644 index 0000000..a9a4ebf --- /dev/null +++ b/usr/include/asm-s390/virtio-ccw.h @@ -0,0 +1,21 @@ +/* + * Definitions for virtio-ccw devices. + * + * Copyright IBM Corp. 2013 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License (version 2 only) + * as published by the Free Software Foundation. + * + * Author(s): Cornelia Huck + */ +#ifndef __KVM_VIRTIO_CCW_H +#define __KVM_VIRTIO_CCW_H + +/* Alignment of vring buffers. */ +#define KVM_VIRTIO_CCW_RING_ALIGN 4096 + +/* Subcode for diagnose 500 (virtio hypercall). */ +#define KVM_S390_VIRTIO_CCW_NOTIFY 3 + +#endif diff --git a/usr/include/asm-s390/vtoc.h b/usr/include/asm-s390/vtoc.h index 8406a2b..221419d 100644 --- a/usr/include/asm-s390/vtoc.h +++ b/usr/include/asm-s390/vtoc.h @@ -1,9 +1,7 @@ /* - * include/asm-s390/vtoc.h - * * This file contains volume label definitions for DASD devices. * - * (C) Copyright IBM Corp. 2005 + * Copyright IBM Corp. 2005 * * Author(s): Volker Sameske * diff --git a/usr/include/asm-s390/zcrypt.h b/usr/include/asm-s390/zcrypt.h index 03fdd55..bdfbde1 100644 --- a/usr/include/asm-s390/zcrypt.h +++ b/usr/include/asm-s390/zcrypt.h @@ -3,7 +3,7 @@ * * zcrypt 2.1.0 (user-visible header) * - * Copyright (C) 2001, 2006 IBM Corporation + * Copyright IBM Corp. 2001, 2006 * Author(s): Robert Burroughs * Eric Rossman (edrossma@us.ibm.com) * diff --git a/usr/include/asm-score/kvm_para.h b/usr/include/asm-score/kvm_para.h new file mode 100644 index 0000000..14fab8f --- /dev/null +++ b/usr/include/asm-score/kvm_para.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-score/unistd.h b/usr/include/asm-score/unistd.h index 4aa9573..9cb4260 100644 --- a/usr/include/asm-score/unistd.h +++ b/usr/include/asm-score/unistd.h @@ -1,13 +1,11 @@ -#if !defined(_ASM_SCORE_UNISTD_H) || defined(__SYSCALL) -#define _ASM_SCORE_UNISTD_H - #define __ARCH_HAVE_MMU #define __ARCH_WANT_SYSCALL_NO_AT #define __ARCH_WANT_SYSCALL_NO_FLAGS #define __ARCH_WANT_SYSCALL_OFF_T #define __ARCH_WANT_SYSCALL_DEPRECATED +#define __ARCH_WANT_SYS_CLONE +#define __ARCH_WANT_SYS_FORK +#define __ARCH_WANT_SYS_VFORK #include - -#endif /* _ASM_SCORE_UNISTD_H */ diff --git a/usr/include/asm-sparc/asi.h b/usr/include/asm-sparc/asi.h index b2e3db6..aace6f3 100644 --- a/usr/include/asm-sparc/asi.h +++ b/usr/include/asm-sparc/asi.h @@ -40,11 +40,7 @@ #define ASI_M_UNA01 0x01 /* Same here... */ #define ASI_M_MXCC 0x02 /* Access to TI VIKING MXCC registers */ #define ASI_M_FLUSH_PROBE 0x03 /* Reference MMU Flush/Probe; rw, ss */ -#ifndef CONFIG_SPARC_LEON #define ASI_M_MMUREGS 0x04 /* MMU Registers; rw, ss */ -#else -#define ASI_M_MMUREGS 0x19 -#endif /* CONFIG_SPARC_LEON */ #define ASI_M_TLBDIAG 0x05 /* MMU TLB only Diagnostics */ #define ASI_M_DIAGS 0x06 /* Reference MMU Diagnostics */ #define ASI_M_IODIAG 0x07 /* MMU I/O TLB only Diagnostics */ @@ -112,6 +108,20 @@ #define ASI_M_ACTION 0x4c /* Breakpoint Action Register (GNU/Viking) */ +/* LEON ASI */ +#define ASI_LEON_NOCACHE 0x01 + +#define ASI_LEON_DCACHE_MISS 0x01 + +#define ASI_LEON_CACHEREGS 0x02 +#define ASI_LEON_IFLUSH 0x10 +#define ASI_LEON_DFLUSH 0x11 + +#define ASI_LEON_MMUFLUSH 0x18 +#define ASI_LEON_MMUREGS 0x19 +#define ASI_LEON_BYPASS 0x1c +#define ASI_LEON_FLUSH_PAGE 0x10 + /* V9 Architecture mandary ASIs. */ #define ASI_N 0x04 /* Nucleus */ #define ASI_NL 0x0c /* Nucleus, little endian */ @@ -131,7 +141,8 @@ /* SpitFire and later extended ASIs. The "(III)" marker designates * UltraSparc-III and later specific ASIs. The "(CMT)" marker designates * Chip Multi Threading specific ASIs. "(NG)" designates Niagara specific - * ASIs, "(4V)" designates SUN4V specific ASIs. + * ASIs, "(4V)" designates SUN4V specific ASIs. "(NG4)" designates SPARC-T4 + * and later ASIs. */ #define ASI_PHYS_USE_EC 0x14 /* PADDR, E-cachable */ #define ASI_PHYS_BYPASS_EC_E 0x15 /* PADDR, E-bit */ @@ -233,6 +244,7 @@ #define ASI_UDBL_CONTROL_R 0x7f /* External UDB control regs rd low*/ #define ASI_INTR_R 0x7f /* IRQ vector dispatch read */ #define ASI_INTR_DATAN_R 0x7f /* (III) In irq vector data reg N */ +#define ASI_PIC 0xb0 /* (NG4) PIC registers */ #define ASI_PST8_P 0xc0 /* Primary, 8 8-bit, partial */ #define ASI_PST8_S 0xc1 /* Secondary, 8 8-bit, partial */ #define ASI_PST16_P 0xc2 /* Primary, 4 16-bit, partial */ @@ -258,9 +270,28 @@ #define ASI_BLK_INIT_QUAD_LDD_P 0xe2 /* (NG) init-store, twin load, * primary, implicit */ +#define ASI_BLK_INIT_QUAD_LDD_S 0xe3 /* (NG) init-store, twin load, + * secondary, implicit + */ #define ASI_BLK_P 0xf0 /* Primary, blk ld/st */ #define ASI_BLK_S 0xf1 /* Secondary, blk ld/st */ +#define ASI_ST_BLKINIT_MRU_P 0xf2 /* (NG4) init-store, twin load, + * Most-Recently-Used, primary, + * implicit + */ +#define ASI_ST_BLKINIT_MRU_S 0xf2 /* (NG4) init-store, twin load, + * Most-Recently-Used, secondary, + * implicit + */ #define ASI_BLK_PL 0xf8 /* Primary, blk ld/st, little */ #define ASI_BLK_SL 0xf9 /* Secondary, blk ld/st, little */ +#define ASI_ST_BLKINIT_MRU_PL 0xfa /* (NG4) init-store, twin load, + * Most-Recently-Used, primary, + * implicit, little-endian + */ +#define ASI_ST_BLKINIT_MRU_SL 0xfb /* (NG4) init-store, twin load, + * Most-Recently-Used, secondary, + * implicit, little-endian + */ #endif /* _SPARC_ASI_H */ diff --git a/usr/include/asm-sparc/ioctls.h b/usr/include/asm-sparc/ioctls.h index 891068f..251464c 100644 --- a/usr/include/asm-sparc/ioctls.h +++ b/usr/include/asm-sparc/ioctls.h @@ -21,6 +21,9 @@ #define TCSETSF2 _IOW('T', 15, struct termios2) #define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get primary device node of /dev/console */ #define TIOCVHANGUP _IO('T', 0x37) +#define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */ +#define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ +#define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */ /* Note that all the ioctls that are not available in Linux have a * double underscore on the front to: a) avoid some programs to @@ -128,4 +131,4 @@ #define TIOCPKT_DOSTOP 32 #define TIOCPKT_IOCTL 64 -#endif /* !(_ASM_SPARC_IOCTLS_H) */ +#endif /* _ASM_SPARC_IOCTLS_H */ diff --git a/usr/include/asm-sparc/kvm_para.h b/usr/include/asm-sparc/kvm_para.h new file mode 100644 index 0000000..14fab8f --- /dev/null +++ b/usr/include/asm-sparc/kvm_para.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-sparc/perfctr.h b/usr/include/asm-sparc/perfctr.h index 1722e29..214feef 100644 --- a/usr/include/asm-sparc/perfctr.h +++ b/usr/include/asm-sparc/perfctr.h @@ -54,10 +54,6 @@ enum perfctr_opcode { PERFCTR_GETPCR }; -/* I don't want the kernel's namespace to be polluted with this - * stuff when this file is included. --DaveM - */ - #define PRIV 0x00000001 #define SYS 0x00000002 #define USR 0x00000004 @@ -167,5 +163,4 @@ struct vcounter_struct { unsigned long long vcnt1; }; - #endif /* !(PERF_COUNTER_API) */ diff --git a/usr/include/asm-sparc/posix_types.h b/usr/include/asm-sparc/posix_types.h index 3070f25..156220e 100644 --- a/usr/include/asm-sparc/posix_types.h +++ b/usr/include/asm-sparc/posix_types.h @@ -9,8 +9,6 @@ #if defined(__sparc__) && defined(__arch64__) /* sparc 64 bit */ -typedef unsigned int __kernel_nlink_t; -#define __kernel_nlink_t __kernel_nlink_t typedef unsigned short __kernel_old_uid_t; typedef unsigned short __kernel_old_gid_t; @@ -38,9 +36,6 @@ typedef unsigned short __kernel_gid_t; typedef unsigned short __kernel_mode_t; #define __kernel_mode_t __kernel_mode_t -typedef short __kernel_nlink_t; -#define __kernel_nlink_t __kernel_nlink_t - typedef long __kernel_daddr_t; #define __kernel_daddr_t __kernel_daddr_t diff --git a/usr/include/asm-sparc/psr.h b/usr/include/asm-sparc/psr.h index 84d7951..d4050f1 100644 --- a/usr/include/asm-sparc/psr.h +++ b/usr/include/asm-sparc/psr.h @@ -35,5 +35,13 @@ #define PSR_VERS 0x0f000000 /* cpu-version field */ #define PSR_IMPL 0xf0000000 /* cpu-implementation field */ +#define PSR_VERS_SHIFT 24 +#define PSR_IMPL_SHIFT 28 +#define PSR_VERS_SHIFTED_MASK 0xf +#define PSR_IMPL_SHIFTED_MASK 0xf -#endif /* !(__LINUX_SPARC_PSR_H) */ +#define PSR_IMPL_TI 0x4 +#define PSR_IMPL_LEON 0xf + + +#endif /* __LINUX_SPARC_PSR_H */ diff --git a/usr/include/asm-sparc/pstate.h b/usr/include/asm-sparc/pstate.h index a26a537..4b6b998 100644 --- a/usr/include/asm-sparc/pstate.h +++ b/usr/include/asm-sparc/pstate.h @@ -88,4 +88,18 @@ #define VERS_MAXTL _AC(0x000000000000ff00,UL) /* Max Trap Level. */ #define VERS_MAXWIN _AC(0x000000000000001f,UL) /* Max RegWindow Idx.*/ +/* Compatability Feature Register (%asr26), SPARC-T4 and later */ +#define CFR_AES _AC(0x0000000000000001,UL) /* Supports AES opcodes */ +#define CFR_DES _AC(0x0000000000000002,UL) /* Supports DES opcodes */ +#define CFR_KASUMI _AC(0x0000000000000004,UL) /* Supports KASUMI opcodes */ +#define CFR_CAMELLIA _AC(0x0000000000000008,UL) /* Supports CAMELLIA opcodes*/ +#define CFR_MD5 _AC(0x0000000000000010,UL) /* Supports MD5 opcodes */ +#define CFR_SHA1 _AC(0x0000000000000020,UL) /* Supports SHA1 opcodes */ +#define CFR_SHA256 _AC(0x0000000000000040,UL) /* Supports SHA256 opcodes */ +#define CFR_SHA512 _AC(0x0000000000000080,UL) /* Supports SHA512 opcodes */ +#define CFR_MPMUL _AC(0x0000000000000100,UL) /* Supports MPMUL opcodes */ +#define CFR_MONTMUL _AC(0x0000000000000200,UL) /* Supports MONTMUL opcodes */ +#define CFR_MONTSQR _AC(0x0000000000000400,UL) /* Supports MONTSQR opcodes */ +#define CFR_CRC32C _AC(0x0000000000000800,UL) /* Supports CRC32C opcodes */ + #endif /* !(_SPARC64_PSTATE_H) */ diff --git a/usr/include/asm-sparc/ptrace.h b/usr/include/asm-sparc/ptrace.h index 6d5c15b..7dc3e41 100644 --- a/usr/include/asm-sparc/ptrace.h +++ b/usr/include/asm-sparc/ptrace.h @@ -349,4 +349,4 @@ struct sparc_stackf { #define PTRACE_GETFPREGS64 25 #define PTRACE_SETFPREGS64 26 -#endif /* !(__SPARC_PTRACE_H) */ +#endif /* __SPARC_PTRACE_H */ diff --git a/usr/include/asm-sparc/sigcontext.h b/usr/include/asm-sparc/sigcontext.h index 2287f70..ae5704f 100644 --- a/usr/include/asm-sparc/sigcontext.h +++ b/usr/include/asm-sparc/sigcontext.h @@ -1,5 +1,4 @@ -#ifndef __SPARC_SIGCONTEXT_H -#define __SPARC_SIGCONTEXT_H - - -#endif /* !(__SPARC_SIGCONTEXT_H) */ +/* + * There isn't anything here anymore, but the file must not be empty or patch + * will delete it. + */ diff --git a/usr/include/asm-sparc/siginfo.h b/usr/include/asm-sparc/siginfo.h index 1c5900b..bdb3fea 100644 --- a/usr/include/asm-sparc/siginfo.h +++ b/usr/include/asm-sparc/siginfo.h @@ -3,7 +3,6 @@ #if defined(__sparc__) && defined(__arch64__) -#define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3) #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) #define __ARCH_SI_BAND_T int @@ -23,4 +22,4 @@ #define EMT_TAGOVF (__SI_FAULT|1) /* tag overflow */ #define NSIGEMT 1 -#endif /* !(__SPARC_SIGINFO_H) */ +#endif /* __SPARC_SIGINFO_H */ diff --git a/usr/include/asm-sparc/signal.h b/usr/include/asm-sparc/signal.h index 8f781a3..bbab98b 100644 --- a/usr/include/asm-sparc/signal.h +++ b/usr/include/asm-sparc/signal.h @@ -147,12 +147,6 @@ struct sigstack { #define SIG_UNBLOCK 0x02 /* for unblocking signals */ #define SIG_SETMASK 0x04 /* for setting the signal mask */ -/* - * sigaltstack controls - */ -#define SS_ONSTACK 1 -#define SS_DISABLE 2 - #define MINSIGSTKSZ 4096 #define SIGSTKSZ 16384 @@ -182,4 +176,4 @@ typedef struct sigaltstack { #endif /* !(__ASSEMBLY__) */ -#endif /* !(__SPARC_SIGNAL_H) */ +#endif /* __SPARC_SIGNAL_H */ diff --git a/usr/include/asm-sparc/socket.h b/usr/include/asm-sparc/socket.h index bea1568..89f49b6 100644 --- a/usr/include/asm-sparc/socket.h +++ b/usr/include/asm-sparc/socket.h @@ -15,7 +15,7 @@ #define SO_PEERCRED 0x0040 #define SO_LINGER 0x0080 #define SO_OOBINLINE 0x0100 -/* To add :#define SO_REUSEPORT 0x0200 */ +#define SO_REUSEPORT 0x0200 #define SO_BSDCOMPAT 0x0400 #define SO_RCVLOWAT 0x0800 #define SO_SNDLOWAT 0x1000 @@ -41,6 +41,7 @@ #define SO_ATTACH_FILTER 0x001a #define SO_DETACH_FILTER 0x001b +#define SO_GET_FILTER SO_ATTACH_FILTER #define SO_PEERNAME 0x001c #define SO_TIMESTAMP 0x001d @@ -65,6 +66,9 @@ /* Instruct lower device to use last 4-bytes of skb data as FCS */ #define SO_NOFCS 0x0027 +#define SO_LOCK_FILTER 0x0028 + +#define SO_SELECT_ERR_QUEUE 0x0029 /* Security levels - as per NRL IPv6 - don't actually do anything */ #define SO_SECURITY_AUTHENTICATION 0x5001 diff --git a/usr/include/asm-sparc/termbits.h b/usr/include/asm-sparc/termbits.h index 9c9d785..ab26e92 100644 --- a/usr/include/asm-sparc/termbits.h +++ b/usr/include/asm-sparc/termbits.h @@ -253,4 +253,4 @@ struct ktermios { #define TCSADRAIN 1 #define TCSAFLUSH 2 -#endif /* !(_SPARC_TERMBITS_H) */ +#endif /* _SPARC_TERMBITS_H */ diff --git a/usr/include/asm-sparc/traps.h b/usr/include/asm-sparc/traps.h index fb256fb..37d8ef8 100644 --- a/usr/include/asm-sparc/traps.h +++ b/usr/include/asm-sparc/traps.h @@ -117,4 +117,4 @@ (level == SP_TRAP_NETBSD) || \ (level == SP_TRAP_LINUX)) -#endif /* !(_SPARC_TRAPS_H) */ +#endif /* _SPARC_TRAPS_H */ diff --git a/usr/include/asm-sparc/types.h b/usr/include/asm-sparc/types.h index 383d156..b9e79bc 100644 --- a/usr/include/asm-sparc/types.h +++ b/usr/include/asm-sparc/types.h @@ -1,17 +1 @@ -#ifndef _SPARC_TYPES_H -#define _SPARC_TYPES_H -/* - * This file is never included by application software unless - * explicitly requested (e.g., via linux/types.h) in which case the - * application is Linux specific so (user-) name space pollution is - * not a major issue. However, for interoperability, libraries still - * need to be careful to avoid a name clashes. - */ - -#if defined(__sparc__) - -#include - -#endif /* defined(__sparc__) */ - -#endif /* defined(_SPARC_TYPES_H) */ +#include diff --git a/usr/include/asm-sparc/unistd.h b/usr/include/asm-sparc/unistd.h index d457fd0..20dc2fc 100644 --- a/usr/include/asm-sparc/unistd.h +++ b/usr/include/asm-sparc/unistd.h @@ -1,6 +1,3 @@ -#ifndef _SPARC_UNISTD_H -#define _SPARC_UNISTD_H - /* * System calls under the Sparc. * @@ -14,6 +11,9 @@ * * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu) */ +#ifndef _SPARC_UNISTD_H +#define _SPARC_UNISTD_H + #ifndef __32bit_syscall_numbers__ #ifndef __arch64__ #define __32bit_syscall_numbers__ @@ -405,8 +405,14 @@ #define __NR_setns 337 #define __NR_process_vm_readv 338 #define __NR_process_vm_writev 339 +#define __NR_kern_features 340 +#define __NR_kcmp 341 +#define __NR_finit_module 342 + +#define NR_syscalls 343 -#define NR_syscalls 340 +/* Bitmask values returned from kern_features system call. */ +#define KERN_FEATURE_MIXED_MODE_STACK 0x00000001 #ifdef __32bit_syscall_numbers__ /* Sparc 32-bit only has the "setresuid32", "getresuid32" variants, diff --git a/usr/include/asm-tile/byteorder.h b/usr/include/asm-tile/byteorder.h index 9558416..fb72ecf 100644 --- a/usr/include/asm-tile/byteorder.h +++ b/usr/include/asm-tile/byteorder.h @@ -1 +1,21 @@ +/* + * Copyright 2011 Tilera Corporation. All Rights Reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, version 2. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or + * NON INFRINGEMENT. See the GNU General Public License for + * more details. + */ + +#if defined (__BIG_ENDIAN__) +#include +#elif defined (__LITTLE_ENDIAN__) #include +#else +#error "__BIG_ENDIAN__ or __LITTLE_ENDIAN__ must be defined." +#endif diff --git a/usr/include/asm-tile/cachectl.h b/usr/include/asm-tile/cachectl.h new file mode 100644 index 0000000..af4c9f9 --- /dev/null +++ b/usr/include/asm-tile/cachectl.h @@ -0,0 +1,42 @@ +/* + * Copyright 2011 Tilera Corporation. All Rights Reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, version 2. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or + * NON INFRINGEMENT. See the GNU General Public License for + * more details. + */ + +#ifndef _ASM_TILE_CACHECTL_H +#define _ASM_TILE_CACHECTL_H + +/* + * Options for cacheflush system call. + * + * The ICACHE flush is performed on all cores currently running the + * current process's address space. The intent is for user + * applications to be able to modify code, invoke the system call, + * then allow arbitrary other threads in the same address space to see + * the newly-modified code. Passing a length of CHIP_L1I_CACHE_SIZE() + * or more invalidates the entire icache on all cores in the address + * spaces. (Note: currently this option invalidates the entire icache + * regardless of the requested address and length, but we may choose + * to honor the arguments at some point.) + * + * Flush and invalidation of memory can normally be performed with the + * __insn_flush(), __insn_inv(), and __insn_finv() instructions from + * userspace. The DCACHE option to the system call allows userspace + * to flush the entire L1+L2 data cache from the core. In this case, + * the address and length arguments are not used. The DCACHE flush is + * restricted to the current core, not all cores in the address space. + */ +#define ICACHE (1<<0) /* invalidate L1 instruction cache */ +#define DCACHE (1<<1) /* flush and invalidate data cache */ +#define BCACHE (ICACHE|DCACHE) /* flush both caches */ + +#endif /* _ASM_TILE_CACHECTL_H */ diff --git a/usr/include/asm-tile/hardwall.h b/usr/include/asm-tile/hardwall.h index 4b781ad..c97b421 100644 --- a/usr/include/asm-tile/hardwall.h +++ b/usr/include/asm-tile/hardwall.h @@ -11,12 +11,14 @@ * NON INFRINGEMENT. See the GNU General Public License for * more details. * - * Provide methods for the HARDWALL_FILE for accessing the UDN. + * Provide methods for access control of per-cpu resources like + * UDN, IDN, or IPI. */ #ifndef _ASM_TILE_HARDWALL_H #define _ASM_TILE_HARDWALL_H +#include #include #define HARDWALL_IOCTL_BASE 0xa2 @@ -24,8 +26,9 @@ /* * The HARDWALL_CREATE() ioctl is a macro with a "size" argument. * The resulting ioctl value is passed to the kernel in conjunction - * with a pointer to a little-endian bitmask of cpus, which must be - * physically in a rectangular configuration on the chip. + * with a pointer to a standard kernel bitmask of cpus. + * For network resources (UDN or IDN) the bitmask must physically + * represent a rectangular configuration on the chip. * The "size" is the number of bytes of cpu mask data. */ #define _HARDWALL_CREATE 1 @@ -45,8 +48,4 @@ _IO(HARDWALL_IOCTL_BASE, _HARDWALL_GET_ID) -/* This is the canonical name expected by userspace. */ -#define HARDWALL_FILE "/dev/hardwall" - - #endif /* _ASM_TILE_HARDWALL_H */ diff --git a/usr/include/asm-tile/kvm_para.h b/usr/include/asm-tile/kvm_para.h new file mode 100644 index 0000000..14fab8f --- /dev/null +++ b/usr/include/asm-tile/kvm_para.h @@ -0,0 +1 @@ +#include diff --git a/usr/include/asm-tile/ptrace.h b/usr/include/asm-tile/ptrace.h index da9ecd8..f8a42c3 100644 --- a/usr/include/asm-tile/ptrace.h +++ b/usr/include/asm-tile/ptrace.h @@ -39,6 +39,7 @@ #endif #define PTREGS_SIZE PTREGS_OFFSET_REG(64) + #ifndef __ASSEMBLY__ /* Provide appropriate length type to userspace regardless of -m32/-m64. */ @@ -78,8 +79,14 @@ struct pt_regs { #define PTRACE_SETFPREGS 15 /* Support TILE-specific ptrace options, with events starting at 16. */ -#define PTRACE_O_TRACEMIGRATE 0x00010000 #define PTRACE_EVENT_MIGRATE 16 +#define PTRACE_O_TRACEMIGRATE (1 << PTRACE_EVENT_MIGRATE) +/* + * Flag bits in pt_regs.flags that are part of the ptrace API. + * We start our numbering higher up to avoid confusion with the + * non-ABI kernel-internal values that use the low 16 bits. + */ +#define PT_FLAGS_COMPAT 0x10000 /* process is an -m32 compat process */ #endif /* _ASM_TILE_PTRACE_H */ diff --git a/usr/include/asm-tile/unistd.h b/usr/include/asm-tile/unistd.h index 42667df..3866397 100644 --- a/usr/include/asm-tile/unistd.h +++ b/usr/include/asm-tile/unistd.h @@ -12,9 +12,6 @@ * more details. */ -#if !defined(_ASM_TILE_UNISTD_H) || defined(__SYSCALL) -#define _ASM_TILE_UNISTD_H - #if !defined(__LP64__) || defined(__SYSCALL_COMPAT) /* Use the flavor of this syscall that matches the 32-bit API better. */ #define __ARCH_WANT_SYNC_FILE_RANGE2 @@ -23,9 +20,11 @@ /* Use the standard ABI for syscalls. */ #include +#define NR_syscalls __NR_syscalls + /* Additional Tilera-specific syscalls. */ -#define __NR_flush_cache (__NR_arch_specific_syscall + 1) -__SYSCALL(__NR_flush_cache, sys_flush_cache) +#define __NR_cacheflush (__NR_arch_specific_syscall + 1) +__SYSCALL(__NR_cacheflush, sys_cacheflush) #ifndef __tilegx__ /* "Fast" syscalls provide atomic support for 32-bit chips. */ @@ -35,6 +34,3 @@ __SYSCALL(__NR_flush_cache, sys_flush_cache) #define __NR_cmpxchg_badaddr (__NR_arch_specific_syscall + 0) __SYSCALL(__NR_cmpxchg_badaddr, sys_cmpxchg_badaddr) #endif - - -#endif /* _ASM_TILE_UNISTD_H */ diff --git a/usr/include/asm-x86/bootparam.h b/usr/include/asm-x86/bootparam.h index 2f90c51..c15ddaf 100644 --- a/usr/include/asm-x86/bootparam.h +++ b/usr/include/asm-x86/bootparam.h @@ -1,6 +1,31 @@ #ifndef _ASM_X86_BOOTPARAM_H #define _ASM_X86_BOOTPARAM_H +/* setup_data types */ +#define SETUP_NONE 0 +#define SETUP_E820_EXT 1 +#define SETUP_DTB 2 +#define SETUP_PCI 3 + +/* ram_size flags */ +#define RAMDISK_IMAGE_START_MASK 0x07FF +#define RAMDISK_PROMPT_FLAG 0x8000 +#define RAMDISK_LOAD_FLAG 0x4000 + +/* loadflags */ +#define LOADED_HIGH (1<<0) +#define QUIET_FLAG (1<<5) +#define KEEP_SEGMENTS (1<<6) +#define CAN_USE_HEAP (1<<7) + +/* xloadflags */ +#define XLF_KERNEL_64 (1<<0) +#define XLF_CAN_BE_LOADED_ABOVE_4G (1<<1) +#define XLF_EFI_HANDOVER_32 (1<<2) +#define XLF_EFI_HANDOVER_64 (1<<3) + +#ifndef __ASSEMBLY__ + #include #include #include @@ -9,11 +34,6 @@ #include #include