Update to 3.10 headers upstream/3.10
authorAnas Nashif <anas.nashif@intel.com>
Wed, 14 Aug 2013 16:19:22 +0000 (12:19 -0400)
committerAnas Nashif <anas.nashif@intel.com>
Wed, 14 Aug 2013 16:19:22 +0000 (12:19 -0400)
555 files changed:
usr/include/arch/interrupts_32.h
usr/include/arch/interrupts_64.h
usr/include/arch/spr_def.h
usr/include/arch/spr_def_32.h
usr/include/arch/spr_def_64.h
usr/include/asm-arc/auxvec.h [new file with mode: 0644]
usr/include/asm-arc/bitsperlong.h [new file with mode: 0644]
usr/include/asm-arc/byteorder.h [new file with mode: 0644]
usr/include/asm-arc/cachectl.h [new file with mode: 0644]
usr/include/asm-arc/elf.h [new file with mode: 0644]
usr/include/asm-arc/errno.h [new file with mode: 0644]
usr/include/asm-arc/fcntl.h [new file with mode: 0644]
usr/include/asm-arc/ioctl.h [new file with mode: 0644]
usr/include/asm-arc/ioctls.h [new file with mode: 0644]
usr/include/asm-arc/ipcbuf.h [new file with mode: 0644]
usr/include/asm-arc/mman.h [new file with mode: 0644]
usr/include/asm-arc/msgbuf.h [new file with mode: 0644]
usr/include/asm-arc/page.h [new file with mode: 0644]
usr/include/asm-arc/param.h [new file with mode: 0644]
usr/include/asm-arc/poll.h [new file with mode: 0644]
usr/include/asm-arc/posix_types.h [new file with mode: 0644]
usr/include/asm-arc/ptrace.h [new file with mode: 0644]
usr/include/asm-arc/resource.h [new file with mode: 0644]
usr/include/asm-arc/sembuf.h [new file with mode: 0644]
usr/include/asm-arc/setup.h [new file with mode: 0644]
usr/include/asm-arc/shmbuf.h [new file with mode: 0644]
usr/include/asm-arc/sigcontext.h [new file with mode: 0644]
usr/include/asm-arc/siginfo.h [new file with mode: 0644]
usr/include/asm-arc/signal.h [new file with mode: 0644]
usr/include/asm-arc/socket.h [new file with mode: 0644]
usr/include/asm-arc/sockios.h [new file with mode: 0644]
usr/include/asm-arc/stat.h [new file with mode: 0644]
usr/include/asm-arc/statfs.h [new file with mode: 0644]
usr/include/asm-arc/swab.h [new file with mode: 0644]
usr/include/asm-arc/termbits.h [new file with mode: 0644]
usr/include/asm-arc/termios.h [new file with mode: 0644]
usr/include/asm-arc/types.h [new file with mode: 0644]
usr/include/asm-arc/unistd.h [new file with mode: 0644]
usr/include/asm-arm/hwcap.h
usr/include/asm-arm/kvm.h [new file with mode: 0644]
usr/include/asm-arm/kvm_para.h [new file with mode: 0644]
usr/include/asm-arm/msgbuf.h
usr/include/asm-arm/param.h
usr/include/asm-arm/posix_types.h
usr/include/asm-arm/ptrace.h
usr/include/asm-arm/sembuf.h
usr/include/asm-arm/setup.h
usr/include/asm-arm/shmbuf.h
usr/include/asm-arm/signal.h
usr/include/asm-arm/socket.h
usr/include/asm-arm/sockios.h
usr/include/asm-arm/swab.h
usr/include/asm-arm/termbits.h
usr/include/asm-arm/termios.h
usr/include/asm-arm/types.h
usr/include/asm-arm/unistd.h
usr/include/asm-arm64/auxvec.h [new file with mode: 0644]
usr/include/asm-arm64/bitsperlong.h [new file with mode: 0644]
usr/include/asm-arm64/byteorder.h [new file with mode: 0644]
usr/include/asm-arm64/errno.h [new file with mode: 0644]
usr/include/asm-arm64/fcntl.h [new file with mode: 0644]
usr/include/asm-arm64/hwcap.h [new file with mode: 0644]
usr/include/asm-arm64/ioctl.h [new file with mode: 0644]
usr/include/asm-arm64/ioctls.h [new file with mode: 0644]
usr/include/asm-arm64/ipcbuf.h [new file with mode: 0644]
usr/include/asm-arm64/kvm_para.h [new file with mode: 0644]
usr/include/asm-arm64/mman.h [new file with mode: 0644]
usr/include/asm-arm64/msgbuf.h [new file with mode: 0644]
usr/include/asm-arm64/param.h [new file with mode: 0644]
usr/include/asm-arm64/poll.h [new file with mode: 0644]
usr/include/asm-arm64/posix_types.h [new file with mode: 0644]
usr/include/asm-arm64/ptrace.h [new file with mode: 0644]
usr/include/asm-arm64/resource.h [new file with mode: 0644]
usr/include/asm-arm64/sembuf.h [new file with mode: 0644]
usr/include/asm-arm64/setup.h [new file with mode: 0644]
usr/include/asm-arm64/shmbuf.h [new file with mode: 0644]
usr/include/asm-arm64/sigcontext.h [new file with mode: 0644]
usr/include/asm-arm64/siginfo.h [new file with mode: 0644]
usr/include/asm-arm64/signal.h [new file with mode: 0644]
usr/include/asm-arm64/socket.h [new file with mode: 0644]
usr/include/asm-arm64/sockios.h [new file with mode: 0644]
usr/include/asm-arm64/stat.h [new file with mode: 0644]
usr/include/asm-arm64/statfs.h [new file with mode: 0644]
usr/include/asm-arm64/swab.h [new file with mode: 0644]
usr/include/asm-arm64/termbits.h [new file with mode: 0644]
usr/include/asm-arm64/termios.h [new file with mode: 0644]
usr/include/asm-arm64/types.h [new file with mode: 0644]
usr/include/asm-arm64/unistd.h [new file with mode: 0644]
usr/include/asm-c6x/kvm_para.h [new file with mode: 0644]
usr/include/asm-c6x/ptrace.h
usr/include/asm-c6x/setup.h
usr/include/asm-c6x/signal.h
usr/include/asm-c6x/swab.h
usr/include/asm-c6x/unistd.h
usr/include/asm-generic/fcntl.h
usr/include/asm-generic/ioctls.h
usr/include/asm-generic/kvm_para.h [new file with mode: 0644]
usr/include/asm-generic/mman-common.h
usr/include/asm-generic/mman.h
usr/include/asm-generic/posix_types.h
usr/include/asm-generic/resource.h
usr/include/asm-generic/siginfo.h
usr/include/asm-generic/signal.h
usr/include/asm-generic/socket.h
usr/include/asm-generic/statfs.h
usr/include/asm-generic/unistd.h
usr/include/asm-hexagon/bitsperlong.h
usr/include/asm-hexagon/byteorder.h
usr/include/asm-hexagon/kvm_para.h [new file with mode: 0644]
usr/include/asm-hexagon/param.h
usr/include/asm-hexagon/ptrace.h
usr/include/asm-hexagon/registers.h
usr/include/asm-hexagon/setup.h
usr/include/asm-hexagon/sigcontext.h
usr/include/asm-hexagon/signal.h
usr/include/asm-hexagon/swab.h
usr/include/asm-hexagon/unistd.h
usr/include/asm-hexagon/user.h
usr/include/asm-ia64/cmpxchg.h [new file with mode: 0644]
usr/include/asm-ia64/gcc_intrin.h
usr/include/asm-ia64/intrinsics.h
usr/include/asm-ia64/kvm.h
usr/include/asm-ia64/kvm_para.h
usr/include/asm-ia64/mman.h
usr/include/asm-ia64/param.h
usr/include/asm-ia64/posix_types.h
usr/include/asm-ia64/ptrace.h
usr/include/asm-ia64/siginfo.h
usr/include/asm-ia64/signal.h
usr/include/asm-ia64/socket.h
usr/include/asm-ia64/swab.h
usr/include/asm-ia64/termios.h
usr/include/asm-ia64/types.h
usr/include/asm-ia64/unistd.h
usr/include/asm-metag/auxvec.h [new file with mode: 0644]
usr/include/asm-metag/bitsperlong.h [new file with mode: 0644]
usr/include/asm-metag/byteorder.h [new file with mode: 0644]
usr/include/asm-metag/ech.h [new file with mode: 0644]
usr/include/asm-metag/errno.h [new file with mode: 0644]
usr/include/asm-metag/fcntl.h [new file with mode: 0644]
usr/include/asm-metag/ioctl.h [new file with mode: 0644]
usr/include/asm-metag/ioctls.h [new file with mode: 0644]
usr/include/asm-metag/ipcbuf.h [new file with mode: 0644]
usr/include/asm-metag/mman.h [new file with mode: 0644]
usr/include/asm-metag/msgbuf.h [new file with mode: 0644]
usr/include/asm-metag/param.h [new file with mode: 0644]
usr/include/asm-metag/poll.h [new file with mode: 0644]
usr/include/asm-metag/posix_types.h [new file with mode: 0644]
usr/include/asm-metag/ptrace.h [new file with mode: 0644]
usr/include/asm-metag/resource.h [new file with mode: 0644]
usr/include/asm-metag/sembuf.h [new file with mode: 0644]
usr/include/asm-metag/setup.h [new file with mode: 0644]
usr/include/asm-metag/shmbuf.h [new file with mode: 0644]
usr/include/asm-metag/sigcontext.h [new file with mode: 0644]
usr/include/asm-metag/siginfo.h [new file with mode: 0644]
usr/include/asm-metag/signal.h [new file with mode: 0644]
usr/include/asm-metag/socket.h [new file with mode: 0644]
usr/include/asm-metag/sockios.h [new file with mode: 0644]
usr/include/asm-metag/stat.h [new file with mode: 0644]
usr/include/asm-metag/statfs.h [new file with mode: 0644]
usr/include/asm-metag/swab.h [new file with mode: 0644]
usr/include/asm-metag/termbits.h [new file with mode: 0644]
usr/include/asm-metag/termios.h [new file with mode: 0644]
usr/include/asm-metag/types.h [new file with mode: 0644]
usr/include/asm-metag/unistd.h [new file with mode: 0644]
usr/include/asm-microblaze/elf.h
usr/include/asm-microblaze/kvm_para.h [new file with mode: 0644]
usr/include/asm-microblaze/unistd.h
usr/include/asm-openrisc/elf.h [new file with mode: 0644]
usr/include/asm-openrisc/kvm_para.h [new file with mode: 0644]
usr/include/asm-openrisc/ptrace.h
usr/include/asm-openrisc/spr_defs.h [deleted file]
usr/include/asm-openrisc/ucontext.h [new file with mode: 0644]
usr/include/asm-openrisc/unistd.h
usr/include/asm-parisc/auxvec.h
usr/include/asm-parisc/ioctls.h
usr/include/asm-parisc/mman.h
usr/include/asm-parisc/posix_types.h
usr/include/asm-parisc/ptrace.h
usr/include/asm-parisc/signal.h
usr/include/asm-parisc/socket.h
usr/include/asm-parisc/stat.h
usr/include/asm-parisc/swab.h
usr/include/asm-parisc/termios.h
usr/include/asm-parisc/unistd.h
usr/include/asm-powerpc/bootx.h
usr/include/asm-powerpc/cputable.h
usr/include/asm-powerpc/elf.h
usr/include/asm-powerpc/epapr_hcalls.h [new file with mode: 0644]
usr/include/asm-powerpc/ioctls.h
usr/include/asm-powerpc/kvm.h
usr/include/asm-powerpc/kvm_para.h
usr/include/asm-powerpc/linkage.h
usr/include/asm-powerpc/mman.h
usr/include/asm-powerpc/posix_types.h
usr/include/asm-powerpc/ptrace.h
usr/include/asm-powerpc/setup.h
usr/include/asm-powerpc/siginfo.h
usr/include/asm-powerpc/signal.h
usr/include/asm-powerpc/socket.h
usr/include/asm-powerpc/spu_info.h
usr/include/asm-powerpc/stat.h
usr/include/asm-powerpc/swab.h
usr/include/asm-powerpc/termios.h
usr/include/asm-powerpc/tm.h [new file with mode: 0644]
usr/include/asm-powerpc/types.h
usr/include/asm-powerpc/unistd.h
usr/include/asm-s390/chpid.h
usr/include/asm-s390/chsc.h
usr/include/asm-s390/dasd.h
usr/include/asm-s390/debug.h
usr/include/asm-s390/errno.h
usr/include/asm-s390/kvm.h
usr/include/asm-s390/kvm_para.h
usr/include/asm-s390/kvm_virtio.h
usr/include/asm-s390/mman.h
usr/include/asm-s390/monwriter.h
usr/include/asm-s390/posix_types.h
usr/include/asm-s390/ptrace.h
usr/include/asm-s390/qeth.h
usr/include/asm-s390/resource.h
usr/include/asm-s390/setup.h
usr/include/asm-s390/sigcontext.h
usr/include/asm-s390/siginfo.h
usr/include/asm-s390/signal.h
usr/include/asm-s390/socket.h
usr/include/asm-s390/stat.h
usr/include/asm-s390/statfs.h
usr/include/asm-s390/swab.h
usr/include/asm-s390/tape390.h
usr/include/asm-s390/termios.h
usr/include/asm-s390/types.h
usr/include/asm-s390/ucontext.h
usr/include/asm-s390/unistd.h
usr/include/asm-s390/virtio-ccw.h [new file with mode: 0644]
usr/include/asm-s390/vtoc.h
usr/include/asm-s390/zcrypt.h
usr/include/asm-score/kvm_para.h [new file with mode: 0644]
usr/include/asm-score/unistd.h
usr/include/asm-sparc/asi.h
usr/include/asm-sparc/ioctls.h
usr/include/asm-sparc/kvm_para.h [new file with mode: 0644]
usr/include/asm-sparc/perfctr.h
usr/include/asm-sparc/posix_types.h
usr/include/asm-sparc/psr.h
usr/include/asm-sparc/pstate.h
usr/include/asm-sparc/ptrace.h
usr/include/asm-sparc/sigcontext.h
usr/include/asm-sparc/siginfo.h
usr/include/asm-sparc/signal.h
usr/include/asm-sparc/socket.h
usr/include/asm-sparc/termbits.h
usr/include/asm-sparc/traps.h
usr/include/asm-sparc/types.h
usr/include/asm-sparc/unistd.h
usr/include/asm-tile/byteorder.h
usr/include/asm-tile/cachectl.h [new file with mode: 0644]
usr/include/asm-tile/hardwall.h
usr/include/asm-tile/kvm_para.h [new file with mode: 0644]
usr/include/asm-tile/ptrace.h
usr/include/asm-tile/unistd.h
usr/include/asm-x86/bootparam.h
usr/include/asm-x86/e820.h
usr/include/asm-x86/hw_breakpoint.h
usr/include/asm-x86/ist.h
usr/include/asm-x86/kvm.h
usr/include/asm-x86/kvm_para.h
usr/include/asm-x86/mce.h
usr/include/asm-x86/mman.h
usr/include/asm-x86/msr-index.h
usr/include/asm-x86/perf_regs.h [new file with mode: 0644]
usr/include/asm-x86/posix_types.h
usr/include/asm-x86/posix_types_32.h
usr/include/asm-x86/processor-flags.h
usr/include/asm-x86/setup.h
usr/include/asm-x86/signal.h
usr/include/asm-x86/stat.h
usr/include/asm-x86/svm.h [new file with mode: 0644]
usr/include/asm-x86/swab.h
usr/include/asm-x86/unistd.h
usr/include/asm-x86/unistd_32.h
usr/include/asm-x86/unistd_64.h
usr/include/asm-x86/unistd_x32.h
usr/include/asm-x86/vmx.h [new file with mode: 0644]
usr/include/linux/acct.h
usr/include/linux/adfs_fs.h
usr/include/linux/agpgart.h
usr/include/linux/aio_abi.h
usr/include/linux/apm_bios.h
usr/include/linux/atm.h
usr/include/linux/atm_tcp.h
usr/include/linux/atmdev.h
usr/include/linux/atmlec.h
usr/include/linux/audit.h
usr/include/linux/auto_fs.h
usr/include/linux/auxvec.h
usr/include/linux/blk_types.h [deleted file]
usr/include/linux/blkpg.h
usr/include/linux/blktrace_api.h
usr/include/linux/bsg.h
usr/include/linux/btrfs.h [new file with mode: 0644]
usr/include/linux/caif/caif_socket.h
usr/include/linux/caif/if_caif.h
usr/include/linux/can.h
usr/include/linux/can/error.h
usr/include/linux/can/gw.h
usr/include/linux/can/raw.h
usr/include/linux/capability.h
usr/include/linux/cciss_ioctl.h
usr/include/linux/cdk.h [deleted file]
usr/include/linux/cdrom.h
usr/include/linux/cm4000_cs.h
usr/include/linux/cn_proc.h
usr/include/linux/coda.h
usr/include/linux/coda_psdev.h
usr/include/linux/comstats.h [deleted file]
usr/include/linux/connector.h
usr/include/linux/cramfs_fs.h
usr/include/linux/dcbnl.h
usr/include/linux/dlm.h
usr/include/linux/dlm_plock.h
usr/include/linux/dm-ioctl.h
usr/include/linux/dvb/dmx.h
usr/include/linux/dvb/frontend.h
usr/include/linux/dvb/version.h
usr/include/linux/dvb/video.h
usr/include/linux/edd.h
usr/include/linux/elf-fdpic.h
usr/include/linux/elf.h
usr/include/linux/errno.h
usr/include/linux/errqueue.h
usr/include/linux/ethtool.h
usr/include/linux/eventpoll.h
usr/include/linux/falloc.h
usr/include/linux/fcntl.h
usr/include/linux/fd.h
usr/include/linux/filter.h
usr/include/linux/fs.h
usr/include/linux/fsl_hypervisor.h
usr/include/linux/fuse.h
usr/include/linux/futex.h
usr/include/linux/gameport.h
usr/include/linux/generic_serial.h [deleted file]
usr/include/linux/genetlink.h
usr/include/linux/gfs2_ondisk.h
usr/include/linux/hdlc/ioctl.h
usr/include/linux/hid.h
usr/include/linux/hiddev.h
usr/include/linux/hidraw.h
usr/include/linux/hpet.h
usr/include/linux/hw_breakpoint.h [new file with mode: 0644]
usr/include/linux/i2c.h
usr/include/linux/i2o-dev.h
usr/include/linux/icmp.h
usr/include/linux/icmpv6.h
usr/include/linux/if.h
usr/include/linux/if_arp.h
usr/include/linux/if_bridge.h
usr/include/linux/if_cablemodem.h
usr/include/linux/if_ec.h [deleted file]
usr/include/linux/if_eql.h
usr/include/linux/if_ether.h
usr/include/linux/if_fddi.h
usr/include/linux/if_frad.h
usr/include/linux/if_link.h
usr/include/linux/if_ltalk.h
usr/include/linux/if_packet.h
usr/include/linux/if_phonet.h
usr/include/linux/if_pppol2tp.h
usr/include/linux/if_pppox.h
usr/include/linux/if_strip.h [deleted file]
usr/include/linux/if_team.h
usr/include/linux/if_tr.h [deleted file]
usr/include/linux/if_tun.h
usr/include/linux/if_tunnel.h
usr/include/linux/if_vlan.h
usr/include/linux/igmp.h
usr/include/linux/in.h
usr/include/linux/in6.h
usr/include/linux/inet_diag.h
usr/include/linux/inotify.h
usr/include/linux/input.h
usr/include/linux/ip.h
usr/include/linux/ip6_tunnel.h
usr/include/linux/ip_vs.h
usr/include/linux/ipmi.h
usr/include/linux/ipv6.h
usr/include/linux/ipv6_route.h
usr/include/linux/irqnr.h
usr/include/linux/isdn.h
usr/include/linux/joystick.h
usr/include/linux/kdev_t.h
usr/include/linux/kernel-page-flags.h [new file with mode: 0644]
usr/include/linux/kernel.h
usr/include/linux/kernelcapi.h
usr/include/linux/kexec.h [new file with mode: 0644]
usr/include/linux/keyboard.h
usr/include/linux/keyctl.h
usr/include/linux/kvm.h
usr/include/linux/l2tp.h
usr/include/linux/llc.h
usr/include/linux/loop.h
usr/include/linux/lp.h
usr/include/linux/magic.h
usr/include/linux/mdio.h
usr/include/linux/media.h
usr/include/linux/mei.h [new file with mode: 0644]
usr/include/linux/mempolicy.h
usr/include/linux/meye.h
usr/include/linux/mii.h
usr/include/linux/mroute.h
usr/include/linux/mroute6.h
usr/include/linux/msdos_fs.h
usr/include/linux/msg.h
usr/include/linux/n_r3964.h
usr/include/linux/nbd.h
usr/include/linux/neighbour.h
usr/include/linux/net.h
usr/include/linux/netconf.h [new file with mode: 0644]
usr/include/linux/netdevice.h
usr/include/linux/netfilter.h
usr/include/linux/netfilter/ipset/ip_set.h
usr/include/linux/netfilter/nf_conntrack_common.h
usr/include/linux/netfilter/nf_nat.h
usr/include/linux/netfilter/nfnetlink.h
usr/include/linux/netfilter/nfnetlink_acct.h
usr/include/linux/netfilter/nfnetlink_conntrack.h
usr/include/linux/netfilter/nfnetlink_cthelper.h [new file with mode: 0644]
usr/include/linux/netfilter/nfnetlink_queue.h
usr/include/linux/netfilter/xt_CT.h
usr/include/linux/netfilter/xt_NFQUEUE.h
usr/include/linux/netfilter/xt_bpf.h [new file with mode: 0644]
usr/include/linux/netfilter/xt_connlabel.h [new file with mode: 0644]
usr/include/linux/netfilter/xt_connlimit.h
usr/include/linux/netfilter/xt_conntrack.h
usr/include/linux/netfilter/xt_hashlimit.h
usr/include/linux/netfilter/xt_physdev.h
usr/include/linux/netfilter/xt_recent.h
usr/include/linux/netfilter/xt_set.h
usr/include/linux/netfilter/xt_time.h
usr/include/linux/netfilter_bridge.h
usr/include/linux/netfilter_bridge/ebt_802_3.h
usr/include/linux/netfilter_bridge/ebtables.h
usr/include/linux/netfilter_ipv4.h
usr/include/linux/netfilter_ipv4/ip_queue.h [deleted file]
usr/include/linux/netfilter_ipv4/ipt_addrtype.h [deleted file]
usr/include/linux/netfilter_ipv6.h
usr/include/linux/netfilter_ipv6/ip6_tables.h
usr/include/linux/netfilter_ipv6/ip6t_NPT.h [new file with mode: 0644]
usr/include/linux/netfilter_ipv6/ip6t_frag.h
usr/include/linux/netlink.h
usr/include/linux/netlink_diag.h [new file with mode: 0644]
usr/include/linux/nfc.h [new file with mode: 0644]
usr/include/linux/nfs4.h
usr/include/linux/nfs_fs.h
usr/include/linux/nfsacl.h
usr/include/linux/nfsd/export.h
usr/include/linux/nl80211.h
usr/include/linux/nvram.h
usr/include/linux/omap3isp.h
usr/include/linux/omapfb.h
usr/include/linux/oom.h
usr/include/linux/openvswitch.h [new file with mode: 0644]
usr/include/linux/packet_diag.h [new file with mode: 0644]
usr/include/linux/pci_regs.h
usr/include/linux/perf_event.h
usr/include/linux/phonet.h
usr/include/linux/pkt_cls.h
usr/include/linux/pkt_sched.h
usr/include/linux/poll.h
usr/include/linux/posix_types.h
usr/include/linux/ppp-comp.h
usr/include/linux/prctl.h
usr/include/linux/ptp_clock.h
usr/include/linux/ptrace.h
usr/include/linux/quota.h
usr/include/linux/raid/md_p.h
usr/include/linux/raid/md_u.h
usr/include/linux/resource.h
usr/include/linux/rfkill.h
usr/include/linux/rtc.h
usr/include/linux/rtnetlink.h
usr/include/linux/scc.h
usr/include/linux/sched.h
usr/include/linux/screen_info.h
usr/include/linux/sctp.h [new file with mode: 0644]
usr/include/linux/sdla.h
usr/include/linux/seccomp.h [new file with mode: 0644]
usr/include/linux/securebits.h
usr/include/linux/serial.h
usr/include/linux/serial_core.h
usr/include/linux/serial_reg.h
usr/include/linux/serio.h
usr/include/linux/signal.h
usr/include/linux/snmp.h
usr/include/linux/sock_diag.h
usr/include/linux/sonet.h
usr/include/linux/sonypi.h
usr/include/linux/soundcard.h
usr/include/linux/stat.h
usr/include/linux/stddef.h
usr/include/linux/swab.h
usr/include/linux/tcp.h
usr/include/linux/tcp_metrics.h [new file with mode: 0644]
usr/include/linux/time.h
usr/include/linux/timex.h
usr/include/linux/tipc_config.h
usr/include/linux/toshiba.h
usr/include/linux/tty.h
usr/include/linux/tty_flags.h [new file with mode: 0644]
usr/include/linux/udp.h
usr/include/linux/uhid.h [new file with mode: 0644]
usr/include/linux/uinput.h
usr/include/linux/uio.h
usr/include/linux/unix_diag.h
usr/include/linux/usb/audio.h
usr/include/linux/usb/cdc.h
usr/include/linux/usb/ch11.h
usr/include/linux/usb/ch9.h
usr/include/linux/usb/functionfs.h
usr/include/linux/usbdevice_fs.h
usr/include/linux/uuid.h [new file with mode: 0644]
usr/include/linux/uvcvideo.h
usr/include/linux/v4l2-common.h [new file with mode: 0644]
usr/include/linux/v4l2-controls.h [new file with mode: 0644]
usr/include/linux/v4l2-dv-timings.h [new file with mode: 0644]
usr/include/linux/v4l2-mediabus.h
usr/include/linux/v4l2-subdev.h
usr/include/linux/version.h
usr/include/linux/vfio.h [new file with mode: 0644]
usr/include/linux/vhost.h
usr/include/linux/videodev2.h
usr/include/linux/virtio_balloon.h
usr/include/linux/virtio_blk.h
usr/include/linux/virtio_console.h
usr/include/linux/virtio_ids.h
usr/include/linux/virtio_net.h
usr/include/linux/wait.h
usr/include/linux/wanrouter.h
usr/include/linux/watchdog.h
usr/include/linux/wireless.h
usr/include/linux/xattr.h
usr/include/linux/xfrm.h
usr/include/mtd/ubi-user.h
usr/include/rdma/ib_user_verbs.h
usr/include/rdma/rdma_user_cm.h
usr/include/scsi/scsi_bsg_fc.h
usr/include/scsi/scsi_netlink.h
usr/include/sound/asound.h
usr/include/sound/compress_offload.h
usr/include/sound/compress_params.h
usr/include/sound/emu10k1.h
usr/include/sound/sb16_csp.h
usr/include/video/sisfb.h
usr/include/xen/privcmd.h

index 96b5710..fdae7f0 100644 (file)
 
 #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__ */
index 5bb58b2..fb3aa21 100644 (file)
 
 #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__ */
index f79046f..8a2f84b 100644 (file)
@@ -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 <arch/spr_def_64.h>
@@ -19,3 +22,5 @@
 #include <arch/spr_def_32.h>
 #endif
 
+
+#endif /* __ARCH_SPR_DEF_H__ */
index bbc1f4c..c689446 100644 (file)
@@ -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
 #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
 #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
 #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
 #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
 #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__) */
index cd3e5f9..67a6c17 100644 (file)
@@ -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
 #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
 #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
 #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
 #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 (file)
index 0000000..41fa68b
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/auxvec.h>
diff --git a/usr/include/asm-arc/bitsperlong.h b/usr/include/asm-arc/bitsperlong.h
new file mode 100644 (file)
index 0000000..6dc0bb0
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/bitsperlong.h>
diff --git a/usr/include/asm-arc/byteorder.h b/usr/include/asm-arc/byteorder.h
new file mode 100644 (file)
index 0000000..9da71d4
--- /dev/null
@@ -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 <linux/byteorder/big_endian.h>
+#else
+#include <linux/byteorder/little_endian.h>
+#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 (file)
index 0000000..51c73f0
--- /dev/null
@@ -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 (file)
index 0000000..a071815
--- /dev/null
@@ -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 <asm/ptrace.h>                /* 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 (file)
index 0000000..4c82b50
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/errno.h>
diff --git a/usr/include/asm-arc/fcntl.h b/usr/include/asm-arc/fcntl.h
new file mode 100644 (file)
index 0000000..46ab12d
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/fcntl.h>
diff --git a/usr/include/asm-arc/ioctl.h b/usr/include/asm-arc/ioctl.h
new file mode 100644 (file)
index 0000000..b279fe0
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/ioctl.h>
diff --git a/usr/include/asm-arc/ioctls.h b/usr/include/asm-arc/ioctls.h
new file mode 100644 (file)
index 0000000..ec34c76
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/ioctls.h>
diff --git a/usr/include/asm-arc/ipcbuf.h b/usr/include/asm-arc/ipcbuf.h
new file mode 100644 (file)
index 0000000..84c7e51
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/ipcbuf.h>
diff --git a/usr/include/asm-arc/mman.h b/usr/include/asm-arc/mman.h
new file mode 100644 (file)
index 0000000..8eebf89
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/mman.h>
diff --git a/usr/include/asm-arc/msgbuf.h b/usr/include/asm-arc/msgbuf.h
new file mode 100644 (file)
index 0000000..809134c
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/msgbuf.h>
diff --git a/usr/include/asm-arc/page.h b/usr/include/asm-arc/page.h
new file mode 100644 (file)
index 0000000..2432963
--- /dev/null
@@ -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 (file)
index 0000000..965d454
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/param.h>
diff --git a/usr/include/asm-arc/poll.h b/usr/include/asm-arc/poll.h
new file mode 100644 (file)
index 0000000..c98509d
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/poll.h>
diff --git a/usr/include/asm-arc/posix_types.h b/usr/include/asm-arc/posix_types.h
new file mode 100644 (file)
index 0000000..22cae62
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/posix_types.h>
diff --git a/usr/include/asm-arc/ptrace.h b/usr/include/asm-arc/ptrace.h
new file mode 100644 (file)
index 0000000..9f257d7
--- /dev/null
@@ -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 (file)
index 0000000..04bc4db
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/resource.h>
diff --git a/usr/include/asm-arc/sembuf.h b/usr/include/asm-arc/sembuf.h
new file mode 100644 (file)
index 0000000..7673b83
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/sembuf.h>
diff --git a/usr/include/asm-arc/setup.h b/usr/include/asm-arc/setup.h
new file mode 100644 (file)
index 0000000..a6d4e44
--- /dev/null
@@ -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 <uapi/asm/setup.h>
+ * 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 (file)
index 0000000..83c05fc
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/shmbuf.h>
diff --git a/usr/include/asm-arc/sigcontext.h b/usr/include/asm-arc/sigcontext.h
new file mode 100644 (file)
index 0000000..9678a11
--- /dev/null
@@ -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 <asm/ptrace.h>
+
+/*
+ * 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 (file)
index 0000000..0815d29
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/siginfo.h>
diff --git a/usr/include/asm-arc/signal.h b/usr/include/asm-arc/signal.h
new file mode 100644 (file)
index 0000000..fad62f7
--- /dev/null
@@ -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 <asm-generic/signal.h>
+
+#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 (file)
index 0000000..6b71384
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/socket.h>
diff --git a/usr/include/asm-arc/sockios.h b/usr/include/asm-arc/sockios.h
new file mode 100644 (file)
index 0000000..def6d47
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/sockios.h>
diff --git a/usr/include/asm-arc/stat.h b/usr/include/asm-arc/stat.h
new file mode 100644 (file)
index 0000000..3dc90fa
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/stat.h>
diff --git a/usr/include/asm-arc/statfs.h b/usr/include/asm-arc/statfs.h
new file mode 100644 (file)
index 0000000..0b91fe1
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/statfs.h>
diff --git a/usr/include/asm-arc/swab.h b/usr/include/asm-arc/swab.h
new file mode 100644 (file)
index 0000000..095599a
--- /dev/null
@@ -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 <linux/types.h>
+
+/* 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 (file)
index 0000000..3935b10
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/termbits.h>
diff --git a/usr/include/asm-arc/termios.h b/usr/include/asm-arc/termios.h
new file mode 100644 (file)
index 0000000..280d78a
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/termios.h>
diff --git a/usr/include/asm-arc/types.h b/usr/include/asm-arc/types.h
new file mode 100644 (file)
index 0000000..b9e79bc
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/types.h>
diff --git a/usr/include/asm-arc/unistd.h b/usr/include/asm-arc/unistd.h
new file mode 100644 (file)
index 0000000..6f30484
--- /dev/null
@@ -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 <asm-generic/unistd.h>
+
+#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)
index 94cce52..da85060 100644 (file)
 #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 (file)
index 0000000..c1ee007
--- /dev/null
@@ -0,0 +1,180 @@
+/*
+ * Copyright (C) 2012 - Virtual Open Systems and Columbia University
+ * Author: Christoffer Dall <c.dall@virtualopensystems.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.
+ *
+ * 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 <linux/types.h>
+#include <asm/ptrace.h>
+
+#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 (file)
index 0000000..14fab8f
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/kvm_para.h>
index 33b35b9..809134c 100644 (file)
@@ -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 <asm-generic/msgbuf.h>
index f6e43dd..965d454 100644 (file)
@@ -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 <asm-generic/param.h>
index efdf990..d2de9cb 100644 (file)
@@ -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
 
index 02b1524..32b6e66 100644 (file)
@@ -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 */
index 1c02839..7673b83 100644 (file)
@@ -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 <asm-generic/sembuf.h>
index 199d58d..734ff39 100644 (file)
@@ -184,4 +184,4 @@ struct tagtable {
        for (t = base; t->hdr.size; t = tag_next(t))
 
 
-#endif
+#endif /* __ASMARM_SETUP_H */
index 2e5c67b..83c05fc 100644 (file)
@@ -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 <asm-generic/shmbuf.h>
index 7ce662d..93a5c18 100644 (file)
@@ -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 */
index 6433cad..6b71384 100644 (file)
@@ -1,72 +1 @@
-#ifndef _ASMARM_SOCKET_H
-#define _ASMARM_SOCKET_H
-
-#include <asm/sockios.h>
-
-/* 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 <asm-generic/socket.h>
index a2588a2..def6d47 100644 (file)
@@ -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 <asm-generic/sockios.h>
index fe52b3c..5f621bf 100644 (file)
@@ -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 */
index 704135d..3935b10 100644 (file)
@@ -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 <asm-generic/termbits.h>
index f3be5ac..280d78a 100644 (file)
@@ -1,44 +1 @@
-#ifndef __ASM_ARM_TERMIOS_H
-#define __ASM_ARM_TERMIOS_H
-
-#include <asm/termbits.h>
-#include <asm/ioctls.h>
-
-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 <asm-generic/termios.h>
index f849b77..b9e79bc 100644 (file)
@@ -1,11 +1 @@
-#ifndef __ASM_ARM_TYPES_H
-#define __ASM_ARM_TYPES_H
-
-#include <asm-generic/int-ll64.h>
-
-/*
- * These aren't exported outside the kernel to avoid name space clashes
- */
-
-#endif
-
+#include <asm-generic/types.h>
index 28640a6..896d514 100644 (file)
 #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 (file)
index 0000000..22d6d88
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+ */
+#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 (file)
index 0000000..fce9c29
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+ */
+#ifndef __ASM_BITSPERLONG_H
+#define __ASM_BITSPERLONG_H
+
+#define __BITS_PER_LONG 64
+
+#include <asm-generic/bitsperlong.h>
+
+#endif /* __ASM_BITSPERLONG_H */
diff --git a/usr/include/asm-arm64/byteorder.h b/usr/include/asm-arm64/byteorder.h
new file mode 100644 (file)
index 0000000..2b92046
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+ */
+#ifndef __ASM_BYTEORDER_H
+#define __ASM_BYTEORDER_H
+
+#include <linux/byteorder/little_endian.h>
+
+#endif /* __ASM_BYTEORDER_H */
diff --git a/usr/include/asm-arm64/errno.h b/usr/include/asm-arm64/errno.h
new file mode 100644 (file)
index 0000000..4c82b50
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/errno.h>
diff --git a/usr/include/asm-arm64/fcntl.h b/usr/include/asm-arm64/fcntl.h
new file mode 100644 (file)
index 0000000..cd2e630
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+ */
+#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 <asm-generic/fcntl.h>
+
+#endif
diff --git a/usr/include/asm-arm64/hwcap.h b/usr/include/asm-arm64/hwcap.h
new file mode 100644 (file)
index 0000000..f2890d0
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+ */
+#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 (file)
index 0000000..b279fe0
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/ioctl.h>
diff --git a/usr/include/asm-arm64/ioctls.h b/usr/include/asm-arm64/ioctls.h
new file mode 100644 (file)
index 0000000..ec34c76
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/ioctls.h>
diff --git a/usr/include/asm-arm64/ipcbuf.h b/usr/include/asm-arm64/ipcbuf.h
new file mode 100644 (file)
index 0000000..84c7e51
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/ipcbuf.h>
diff --git a/usr/include/asm-arm64/kvm_para.h b/usr/include/asm-arm64/kvm_para.h
new file mode 100644 (file)
index 0000000..14fab8f
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/kvm_para.h>
diff --git a/usr/include/asm-arm64/mman.h b/usr/include/asm-arm64/mman.h
new file mode 100644 (file)
index 0000000..8eebf89
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/mman.h>
diff --git a/usr/include/asm-arm64/msgbuf.h b/usr/include/asm-arm64/msgbuf.h
new file mode 100644 (file)
index 0000000..809134c
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/msgbuf.h>
diff --git a/usr/include/asm-arm64/param.h b/usr/include/asm-arm64/param.h
new file mode 100644 (file)
index 0000000..8e3a281
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+ */
+#ifndef __ASM_PARAM_H
+#define __ASM_PARAM_H
+
+#define EXEC_PAGESIZE  65536
+
+#include <asm-generic/param.h>
+
+#endif
diff --git a/usr/include/asm-arm64/poll.h b/usr/include/asm-arm64/poll.h
new file mode 100644 (file)
index 0000000..c98509d
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/poll.h>
diff --git a/usr/include/asm-arm64/posix_types.h b/usr/include/asm-arm64/posix_types.h
new file mode 100644 (file)
index 0000000..22cae62
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/posix_types.h>
diff --git a/usr/include/asm-arm64/ptrace.h b/usr/include/asm-arm64/ptrace.h
new file mode 100644 (file)
index 0000000..d2fcc96
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+ */
+#ifndef __ASM_PTRACE_H
+#define __ASM_PTRACE_H
+
+#include <linux/types.h>
+
+#include <asm/hwcap.h>
+
+
+/*
+ * 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 (file)
index 0000000..04bc4db
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/resource.h>
diff --git a/usr/include/asm-arm64/sembuf.h b/usr/include/asm-arm64/sembuf.h
new file mode 100644 (file)
index 0000000..7673b83
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/sembuf.h>
diff --git a/usr/include/asm-arm64/setup.h b/usr/include/asm-arm64/setup.h
new file mode 100644 (file)
index 0000000..9cf2e46
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+ */
+#ifndef __ASM_SETUP_H
+#define __ASM_SETUP_H
+
+#include <linux/types.h>
+
+#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 (file)
index 0000000..83c05fc
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/shmbuf.h>
diff --git a/usr/include/asm-arm64/sigcontext.h b/usr/include/asm-arm64/sigcontext.h
new file mode 100644 (file)
index 0000000..fd5b447
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+ */
+#ifndef __ASM_SIGCONTEXT_H
+#define __ASM_SIGCONTEXT_H
+
+#include <linux/types.h>
+
+/*
+ * 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 (file)
index 0000000..5a74a08
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+ */
+#ifndef __ASM_SIGINFO_H
+#define __ASM_SIGINFO_H
+
+#define __ARCH_SI_PREAMBLE_SIZE        (4 * sizeof(int))
+
+#include <asm-generic/siginfo.h>
+
+#endif
diff --git a/usr/include/asm-arm64/signal.h b/usr/include/asm-arm64/signal.h
new file mode 100644 (file)
index 0000000..8d1e723
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+ */
+#ifndef __ASM_SIGNAL_H
+#define __ASM_SIGNAL_H
+
+/* Required for AArch32 compatibility. */
+#define SA_RESTORER    0x04000000
+
+#include <asm-generic/signal.h>
+
+#endif
diff --git a/usr/include/asm-arm64/socket.h b/usr/include/asm-arm64/socket.h
new file mode 100644 (file)
index 0000000..6b71384
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/socket.h>
diff --git a/usr/include/asm-arm64/sockios.h b/usr/include/asm-arm64/sockios.h
new file mode 100644 (file)
index 0000000..def6d47
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/sockios.h>
diff --git a/usr/include/asm-arm64/stat.h b/usr/include/asm-arm64/stat.h
new file mode 100644 (file)
index 0000000..eeb702e
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+ */
+#include <asm-generic/stat.h>
diff --git a/usr/include/asm-arm64/statfs.h b/usr/include/asm-arm64/statfs.h
new file mode 100644 (file)
index 0000000..6f62190
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+ */
+#ifndef __ASM_STATFS_H
+#define __ASM_STATFS_H
+
+#define ARCH_PACK_COMPAT_STATFS64 __attribute__((packed,aligned(4)))
+
+#include <asm-generic/statfs.h>
+
+#endif
diff --git a/usr/include/asm-arm64/swab.h b/usr/include/asm-arm64/swab.h
new file mode 100644 (file)
index 0000000..7847e56
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/swab.h>
diff --git a/usr/include/asm-arm64/termbits.h b/usr/include/asm-arm64/termbits.h
new file mode 100644 (file)
index 0000000..3935b10
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/termbits.h>
diff --git a/usr/include/asm-arm64/termios.h b/usr/include/asm-arm64/termios.h
new file mode 100644 (file)
index 0000000..280d78a
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/termios.h>
diff --git a/usr/include/asm-arm64/types.h b/usr/include/asm-arm64/types.h
new file mode 100644 (file)
index 0000000..b9e79bc
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/types.h>
diff --git a/usr/include/asm-arm64/unistd.h b/usr/include/asm-arm64/unistd.h
new file mode 100644 (file)
index 0000000..1caadc2
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+ */
+#include <asm-generic/unistd.h>
diff --git a/usr/include/asm-c6x/kvm_para.h b/usr/include/asm-c6x/kvm_para.h
new file mode 100644 (file)
index 0000000..14fab8f
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/kvm_para.h>
index 2a65808..8dbae70 100644 (file)
 #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
index a01e318..d798b91 100644 (file)
@@ -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 */
index f1cd870..7b1573c 100644 (file)
@@ -1,17 +1 @@
-#ifndef _ASM_C6X_SIGNAL_H
-#define _ASM_C6X_SIGNAL_H
-
 #include <asm-generic/signal.h>
-
-#ifndef __ASSEMBLY__
-#include <linux/linkage.h>
-
-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 */
index 8ee2796..5ee2fb5 100644 (file)
@@ -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;
index 6d54ea4..e7d09a6 100644 (file)
@@ -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 <asm-generic/unistd.h>
@@ -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 */
index 9e5b035..a48937d 100644 (file)
 #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
index 8f439cc..467cdba 100644 (file)
@@ -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 (file)
index 0000000..486f0af
--- /dev/null
@@ -0,0 +1,4 @@
+/*
+ * There isn't anything here, but the file must not be empty or patch
+ * will delete it.
+ */
index d030d2c..4164529 100644 (file)
 /* 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 */
index 32c8bd6..e9fe6fd 100644 (file)
@@ -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 */
 
index 91d44bd..fe74fcc 100644 (file)
@@ -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
index a36da84..1bd7dd4 100644 (file)
@@ -65,4 +65,4 @@
 #endif
 
 
-#endif
+#endif /* _ASM_GENERIC_RESOURCE_H */
index 3ca658b..62819ef 100644 (file)
@@ -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 */
index 1eb6167..34d2c5f 100644 (file)
  *     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 <asm-generic/signal-defs.h>
 
+#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 */
index b1bea03..c5d2e3a 100644 (file)
@@ -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 */
index 30be87e..5241f16 100644 (file)
@@ -80,4 +80,4 @@ struct compat_statfs64 {
        __u32 f_spare[4];
 } ARCH_PACK_COMPAT_STATFS64;
 
-#endif
+#endif /* _GENERIC_STATFS_H */
index 742ccd4..0cc74c4 100644 (file)
@@ -1,6 +1,3 @@
-#if !defined(_ASM_GENERIC_UNISTD_H) || defined(__SYSCALL)
-#define _ASM_GENERIC_UNISTD_H
-
 #include <asm/bitsperlong.h>
 
 /*
@@ -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 */
index 2701cae..4a65815 100644 (file)
@@ -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
index 0e19b9f..e31f3f7 100644 (file)
@@ -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 (file)
index 0000000..14fab8f
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/kvm_para.h>
index 285344b..5cec8c0 100644 (file)
@@ -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
index 3d2f607..065e5b3 100644 (file)
@@ -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
 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
index 4dd741b..487d6ce 100644 (file)
@@ -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<<HVM_VMEST_SS_SFT))
+#define pt_clr_singlestep(regs) ((regs)->hvmer.vmest &= ~(1<<HVM_VMEST_SS_SFT))
+
 #define pt_set_rte_sp(regs, sp) do {\
-       pt_psp(regs) = (sp);\
-       (regs)->SP = (unsigned long) &((regs)->hvmer);\
+       pt_psp(regs) = (regs)->SP = (sp);\
        } while (0)
 
 #define pt_set_kmode(regs) \
index 3b754c5..e48285e 100644 (file)
@@ -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
index ce6dcd9..b6ba536 100644 (file)
@@ -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
index 471c056..98106e5 100644 (file)
@@ -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
 #ifndef _ASM_SIGNAL_H
 #define _ASM_SIGNAL_H
 
+#include <uapi/asm/registers.h>
+
 extern unsigned long __rt_sigtramp_template[2];
 
+void do_signal(struct pt_regs *regs);
+
 #include <asm-generic/signal.h>
 
 #endif
index 99cf0be..9069e92 100644 (file)
@@ -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
index 4d0ecde..ffee405 100644 (file)
@@ -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 <asm-generic/unistd.h>
-
-#endif
index 3a55078..3dae94d 100644 (file)
@@ -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 (file)
index 0000000..4f37dbb
--- /dev/null
@@ -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 <davidm@hpl.hp.com>
+ */
+
+#ifndef __ASSEMBLY__
+
+#include <linux/types.h>
+/* include compiler specific intrinsics */
+#include <asm/ia64regs.h>
+#ifdef __INTEL_COMPILER
+# include <asm/intel_intrin.h>
+#else
+# include <asm/gcc_intrin.h>
+#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 */
index 1296e22..1801c4e 100644 (file)
@@ -1,10 +1,10 @@
-#ifndef _ASM_IA64_GCC_INTRIN_H
-#define _ASM_IA64_GCC_INTRIN_H
 /*
  *
  * Copyright (C) 2002,2003 Jun Nakajima <jun.nakajima@intel.com>
  * Copyright (C) 2002,2003 Suresh Siddha <suresh.b.siddha@intel.com>
  */
+#ifndef _ASM_IA64_GCC_INTRIN_H
+#define _ASM_IA64_GCC_INTRIN_H
 
 #include <linux/types.h>
 
 
 /* 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"                             \
index 50091a1..71c4096 100644 (file)
@@ -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 <davidm@hpl.hp.com>
  */
+#ifndef _ASM_IA64_INTRINSICS_H
+#define _ASM_IA64_INTRINSICS_H
+
 
 #ifndef __ASSEMBLY__
 
index b9f82c8..99503c2 100644 (file)
@@ -26,7 +26,7 @@
 
 /* Select x86 specific features in <linux/kvm.h> */
 #define __KVM_HAVE_IOAPIC
-#define __KVM_HAVE_DEVICE_ASSIGNMENT
+#define __KVM_HAVE_IRQ_LINE
 
 /* Architectural interrupt line count. */
 #define KVM_NR_INTERRUPTS 256
index 0310eb4..14fab8f 100644 (file)
@@ -1,23 +1 @@
-#ifndef __IA64_KVM_PARA_H
-#define __IA64_KVM_PARA_H
-
-/*
- * Copyright (C) 2007 Xiantao Zhang <xiantao.zhang@intel.com>
- *
- * 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 <asm-generic/kvm_para.h>
index 54df771..a7a5aee 100644 (file)
@@ -1,12 +1,12 @@
-#ifndef _ASM_IA64_MMAN_H
-#define _ASM_IA64_MMAN_H
-
 /*
  * Based on <asm-i386/mman.h>.
  *
  * Modified 1998-2000, 2002
  *     David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co
  */
+#ifndef _ASM_IA64_MMAN_H
+#define _ASM_IA64_MMAN_H
+
 
 #include <asm-generic/mman.h>
 
index 608fda4..a5260ee 100644 (file)
@@ -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 <davidm@hpl.hp.com>, Hewlett-Packard Co
  */
+#ifndef _ASM_IA64_PARAM_H
+#define _ASM_IA64_PARAM_H
+
 
 #define EXEC_PAGESIZE  65536
 
index 7323ab9..99ee1d6 100644 (file)
@@ -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 <asm-generic/posix_types.h>
index 3238e81..ac3b3a3 100644 (file)
@@ -1,6 +1,3 @@
-#ifndef _ASM_IA64_PTRACE_H
-#define _ASM_IA64_PTRACE_H
-
 /*
  * Copyright (C) 1998-2004 Hewlett-Packard Co
  *     David Mosberger-Tang <davidm@hpl.hp.com>
@@ -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:
  *
index b4b4000..aa5e43d 100644 (file)
@@ -1,12 +1,12 @@
-#ifndef _ASM_IA64_SIGINFO_H
-#define _ASM_IA64_SIGINFO_H
-
 /*
  * Based on <asm-i386/siginfo.h>.
  *
  * Modified 1998-2002
  *     David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co
  */
+#ifndef _ASM_IA64_SIGINFO_H
+#define _ASM_IA64_SIGINFO_H
+
 
 #define __ARCH_SI_PREAMBLE_SIZE        (4 * sizeof(int))
 
index 68e4c2b..5fe309e 100644 (file)
@@ -1,6 +1,3 @@
-#ifndef _ASM_IA64_SIGNAL_H
-#define _ASM_IA64_SIGNAL_H
-
 /*
  * Modified 1998-2001, 2003
  *     David Mosberger-Tang <davidm@hpl.hp.com>, 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
 #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
index 41fc28a..6b4329f 100644 (file)
@@ -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 */
index f684fff..5699929 100644 (file)
@@ -10,7 +10,7 @@
 #include <asm/intrinsics.h>
 
 
-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;
 }
index 668634f..2c0d41a 100644 (file)
@@ -1,12 +1,12 @@
-#ifndef _ASM_IA64_TERMIOS_H
-#define _ASM_IA64_TERMIOS_H
-
 /*
  * Modified 1999
  *     David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co
  *
  * 99/01/28    Added N_IRDA and N_SMSBLOCK
  */
+#ifndef _ASM_IA64_TERMIOS_H
+#define _ASM_IA64_TERMIOS_H
+
 
 #include <asm/termbits.h>
 #include <asm/ioctls.h>
index 88dd618..e7127e6 100644 (file)
@@ -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 <davidm@hpl.hp.com>, Hewlett-Packard Co
  */
+#ifndef _ASM_IA64_TYPES_H
+#define _ASM_IA64_TYPES_H
+
 
 #include <asm-generic/int-l64.h>
 
@@ -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 */
index ef5e01b..9bda1a6 100644 (file)
@@ -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 <davidm@hpl.hp.com>
  */
+#ifndef _ASM_IA64_UNISTD_H
+#define _ASM_IA64_UNISTD_H
+
 
 #include <asm/break.h>
 
 #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 (file)
index 0000000..41fa68b
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/auxvec.h>
diff --git a/usr/include/asm-metag/bitsperlong.h b/usr/include/asm-metag/bitsperlong.h
new file mode 100644 (file)
index 0000000..6dc0bb0
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/bitsperlong.h>
diff --git a/usr/include/asm-metag/byteorder.h b/usr/include/asm-metag/byteorder.h
new file mode 100644 (file)
index 0000000..9558416
--- /dev/null
@@ -0,0 +1 @@
+#include <linux/byteorder/little_endian.h>
diff --git a/usr/include/asm-metag/ech.h b/usr/include/asm-metag/ech.h
new file mode 100644 (file)
index 0000000..de481ca
--- /dev/null
@@ -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 (file)
index 0000000..4c82b50
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/errno.h>
diff --git a/usr/include/asm-metag/fcntl.h b/usr/include/asm-metag/fcntl.h
new file mode 100644 (file)
index 0000000..46ab12d
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/fcntl.h>
diff --git a/usr/include/asm-metag/ioctl.h b/usr/include/asm-metag/ioctl.h
new file mode 100644 (file)
index 0000000..b279fe0
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/ioctl.h>
diff --git a/usr/include/asm-metag/ioctls.h b/usr/include/asm-metag/ioctls.h
new file mode 100644 (file)
index 0000000..ec34c76
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/ioctls.h>
diff --git a/usr/include/asm-metag/ipcbuf.h b/usr/include/asm-metag/ipcbuf.h
new file mode 100644 (file)
index 0000000..84c7e51
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/ipcbuf.h>
diff --git a/usr/include/asm-metag/mman.h b/usr/include/asm-metag/mman.h
new file mode 100644 (file)
index 0000000..8eebf89
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/mman.h>
diff --git a/usr/include/asm-metag/msgbuf.h b/usr/include/asm-metag/msgbuf.h
new file mode 100644 (file)
index 0000000..809134c
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/msgbuf.h>
diff --git a/usr/include/asm-metag/param.h b/usr/include/asm-metag/param.h
new file mode 100644 (file)
index 0000000..965d454
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/param.h>
diff --git a/usr/include/asm-metag/poll.h b/usr/include/asm-metag/poll.h
new file mode 100644 (file)
index 0000000..c98509d
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/poll.h>
diff --git a/usr/include/asm-metag/posix_types.h b/usr/include/asm-metag/posix_types.h
new file mode 100644 (file)
index 0000000..22cae62
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/posix_types.h>
diff --git a/usr/include/asm-metag/ptrace.h b/usr/include/asm-metag/ptrace.h
new file mode 100644 (file)
index 0000000..cae3332
--- /dev/null
@@ -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 (file)
index 0000000..218a36c
--- /dev/null
@@ -0,0 +1,7 @@
+#ifndef _METAG_RESOURCE_H
+#define _METAG_RESOURCE_H
+
+#define _STK_LIM_MAX    (1 << 28)
+#include <asm-generic/resource.h>
+
+#endif /* _METAG_RESOURCE_H */
diff --git a/usr/include/asm-metag/sembuf.h b/usr/include/asm-metag/sembuf.h
new file mode 100644 (file)
index 0000000..7673b83
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/sembuf.h>
diff --git a/usr/include/asm-metag/setup.h b/usr/include/asm-metag/setup.h
new file mode 100644 (file)
index 0000000..552df83
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/setup.h>
diff --git a/usr/include/asm-metag/shmbuf.h b/usr/include/asm-metag/shmbuf.h
new file mode 100644 (file)
index 0000000..83c05fc
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/shmbuf.h>
diff --git a/usr/include/asm-metag/sigcontext.h b/usr/include/asm-metag/sigcontext.h
new file mode 100644 (file)
index 0000000..ef79a91
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef _ASM_METAG_SIGCONTEXT_H
+#define _ASM_METAG_SIGCONTEXT_H
+
+#include <asm/ptrace.h>
+
+/*
+ * 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 (file)
index 0000000..b2e0c8b
--- /dev/null
@@ -0,0 +1,8 @@
+#ifndef _METAG_SIGINFO_H
+#define _METAG_SIGINFO_H
+
+#define __ARCH_SI_TRAPNO
+
+#include <asm-generic/siginfo.h>
+
+#endif
diff --git a/usr/include/asm-metag/signal.h b/usr/include/asm-metag/signal.h
new file mode 100644 (file)
index 0000000..7b1573c
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/signal.h>
diff --git a/usr/include/asm-metag/socket.h b/usr/include/asm-metag/socket.h
new file mode 100644 (file)
index 0000000..6b71384
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/socket.h>
diff --git a/usr/include/asm-metag/sockios.h b/usr/include/asm-metag/sockios.h
new file mode 100644 (file)
index 0000000..def6d47
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/sockios.h>
diff --git a/usr/include/asm-metag/stat.h b/usr/include/asm-metag/stat.h
new file mode 100644 (file)
index 0000000..3dc90fa
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/stat.h>
diff --git a/usr/include/asm-metag/statfs.h b/usr/include/asm-metag/statfs.h
new file mode 100644 (file)
index 0000000..0b91fe1
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/statfs.h>
diff --git a/usr/include/asm-metag/swab.h b/usr/include/asm-metag/swab.h
new file mode 100644 (file)
index 0000000..ee70111
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef __ASM_METAG_SWAB_H
+#define __ASM_METAG_SWAB_H
+
+
+#include <linux/types.h>
+#include <asm-generic/swab.h>
+
+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 (file)
index 0000000..3935b10
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/termbits.h>
diff --git a/usr/include/asm-metag/termios.h b/usr/include/asm-metag/termios.h
new file mode 100644 (file)
index 0000000..280d78a
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/termios.h>
diff --git a/usr/include/asm-metag/types.h b/usr/include/asm-metag/types.h
new file mode 100644 (file)
index 0000000..b9e79bc
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/types.h>
diff --git a/usr/include/asm-metag/unistd.h b/usr/include/asm-metag/unistd.h
new file mode 100644 (file)
index 0000000..b80b8e8
--- /dev/null
@@ -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 <asm-generic/unistd.h>
+
+/* 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)
index 49c2589..f96828f 100644 (file)
@@ -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 (file)
index 0000000..14fab8f
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/kvm_para.h>
index ad17760..52661d8 100644 (file)
 #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 (file)
index 0000000..a853153
--- /dev/null
@@ -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 <phoenix@bsemi.com>
+ * Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se>
+ * 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 <asm/ptrace.h>
+
+/* 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 (file)
index 0000000..14fab8f
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/kvm_para.h>
index 419090d..799497c 100644 (file)
@@ -19,8 +19,6 @@
 #ifndef __ASM_OPENRISC_PTRACE_H
 #define __ASM_OPENRISC_PTRACE_H
 
-#include <asm/spr_defs.h>
-
 #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 (file)
index 5dbc668..0000000
+++ /dev/null
@@ -1,604 +0,0 @@
-/*
- * OpenRISC Linux
- *
- * SPR Definitions
- *
- * Copyright (C) 2000 Damjan Lampret
- * Copyright (C) 2003 Matjaz Breskvar <phoenix@bsemi.com>
- * Copyright (C) 2008, 2010 Embecosm Limited
- * Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se>
- * 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 (file)
index 0000000..9bc07b9
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/ucontext.h>
index 89af3ab..ce40b71 100644 (file)
  * (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 <asm-generic/unistd.h>
 
 #define __NR_or1k_atomic __NR_arch_specific_syscall
 __SYSCALL(__NR_or1k_atomic, sys_or1k_atomic)
-
-#endif /* __ASM_OPENRISC_UNISTD_H */
index 9c3ac4b..41fa68b 100644 (file)
@@ -1,4 +1 @@
-#ifndef __ASMPARISC_AUXVEC_H
-#define __ASMPARISC_AUXVEC_H
-
-#endif
+#include <asm-generic/auxvec.h>
index aa621ca..b560f76 100644 (file)
@@ -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
index 12219eb..294d251 100644 (file)
 #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__ */
index 5212b03..b934425 100644 (file)
@@ -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
 
index 7010d5c..312e133 100644 (file)
@@ -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 <linux/types.h>
 
@@ -44,4 +44,4 @@ struct pt_regs {
 #define PTRACE_SINGLEBLOCK     12      /* resume execution until next branch */
 
 
-#endif
+#endif /* _PARISC_PTRACE_H */
index 29b8191..73d8d9f 100644 (file)
 
 #define SA_RESTORER    0x04000000 /* obsolete -- ignored */
 
-/* 
- * sigaltstack controls
- */
-#define SS_ONSTACK     1
-#define SS_DISABLE     2
-
 #define MINSIGSTKSZ    2048
 #define SIGSTKSZ       8192
 
index 1b52c2c..70c512a 100644 (file)
@@ -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.
index 9d5fbbc..d76fbda 100644 (file)
@@ -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;
index 373a79d..e7a8dc5 100644 (file)
@@ -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"
index 73b2555..b7bcbd9 100644 (file)
@@ -40,4 +40,4 @@ struct termio {
 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
 
 
-#endif /* _PARISC_TERMIOS_H */
+#endif /* _PARISC_TERMIOS_H */
index cf2b391..180a818 100644 (file)
 #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 */
index 9a0816a..7f82d64 100644 (file)
@@ -129,4 +129,4 @@ typedef struct boot_infos
 #pragma options align=reset
 #endif
 
-#endif
+#endif /* __ASM_BOOTX_H__ */
index 1be7c6d..8144a22 100644 (file)
@@ -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
 #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 */
index 792f753..cc7ec26 100644 (file)
@@ -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
 
 /* 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 (file)
index 0000000..06f7247
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+ * ePAPR hcall interface
+ *
+ * Copyright 2008-2011 Freescale Semiconductor, Inc.
+ *
+ * Author: Timur Tabi <timur@freescale.com>
+ *
+ * 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 */
index 9ede1b6..d5b258c 100644 (file)
@@ -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
index b921c3f..0fb1a6e 100644 (file)
@@ -25,6 +25,8 @@
 /* Select powerpc specific features in <linux/kvm.h> */
 #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 */
index c047a84..7e64f57 100644 (file)
@@ -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 <asm/epapr_hcalls.h>
 
 #define KVM_FEATURE_MAGIC_PAGE 1
 
index e1c4ac1..167ceca 100644 (file)
@@ -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 */
index d14df55..6fa6b60 100644 (file)
@@ -1,14 +1,14 @@
-#ifndef _ASM_POWERPC_MMAN_H
-#define _ASM_POWERPC_MMAN_H
-
-#include <asm-generic/mman-common.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_MMAN_H
+#define _ASM_POWERPC_MMAN_H
+
+#include <asm-generic/mman-common.h>
+
 
 #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 */
index f139325..2958c5b 100644 (file)
@@ -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
index b34a818..d216fe1 100644 (file)
@@ -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 <linux/types.h>
 
@@ -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__
 
index d084ce1..552df83 100644 (file)
@@ -1,32 +1 @@
-#ifndef _ASM_POWERPC_SETUP_H
-#define _ASM_POWERPC_SETUP_H
-
 #include <asm-generic/setup.h>
-
-#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 */
index 49495b0..ccce3ef 100644 (file)
@@ -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 <asm-generic/siginfo.h>
index 6bcf03e..4cdbe24 100644 (file)
@@ -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;
index 3d5179b..a36daf3 100644 (file)
@@ -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 */
index fdedd96..de8afe3 100644 (file)
@@ -48,4 +48,4 @@ struct spu_proxydma_info {
        struct mfc_cq_sr proxydma_info_command_data[8];
 };
 
-#endif
+#endif /* _SPU_INFO_H */
index e4edc51..84880b8 100644 (file)
@@ -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;
index 551f9b9..3958720 100644 (file)
@@ -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 <linux/types.h>
 
index f027022..64fad85 100644 (file)
@@ -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 <asm/ioctls.h>
 #include <asm/termbits.h>
@@ -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 (file)
index 0000000..85059a0
--- /dev/null
@@ -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
index a592c85..3ca9bbb 100644 (file)
@@ -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
 
 
 #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];
index 230f50b..46a9783 100644 (file)
@@ -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
 #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_ */
index 04d1f00..e9bdbc5 100644 (file)
@@ -1,7 +1,5 @@
 /*
- *  drivers/s390/cio/chpid.h
- *
- *    Copyright IBM Corp. 2007
+ *    Copyright IBM Corp. 2007, 2012
  *    Author(s): Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
  */
 
 #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));
 
 
index 807997f..1c6a7f8 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * ioctl interface for /dev/chsc
  *
- * Copyright 2008 IBM Corp.
+ * Copyright IBM Corp. 2008, 2012
  * Author(s): Cornelia Huck <cornelia.huck@de.ibm.com>
  */
 
@@ -9,9 +9,12 @@
 #define _ASM_CHSC_H
 
 #include <linux/types.h>
+#include <linux/ioctl.h>
 #include <asm/chpid.h>
 #include <asm/schid.h>
 
+#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 {
index 0be28ef..38eca3b 100644 (file)
@@ -1,8 +1,7 @@
 /* 
- * File...........: linux/drivers/s390/block/dasd.c
  * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
  * Bugreports.to..: <Linux390@de.ibm.com>
- * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000
+ * Copyright IBM Corp. 1999, 2000
  * EMC Symmetrix ioctl Copyright EMC Corporation, 2008
  * Author.........: Nigel Hislop <hislop_nigel@emc.com>
  *
index c3a3cee..0782143 100644 (file)
@@ -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 */
index e41d5b3..395e97d 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  include/asm-s390/errno.h
- *
  *  S390 version
  *
  */
index 9607667..d25da59 100644 (file)
@@ -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
index 8e2dd67..ff1f4e7 100644 (file)
@@ -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 <borntraeger@de.ibm.com>
  */
-
-#ifndef __S390_KVM_PARA_H
-#define __S390_KVM_PARA_H
-
-
-#endif /* __S390_KVM_PARA_H */
index 72f6141..44a438c 100644 (file)
@@ -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
  *
index 00cca8d..de23da1 100644 (file)
@@ -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 <asm-generic/mman.h>
-
-
-#endif /* __S390_MMAN_H__ */
index f0cbf96..f845c8e 100644 (file)
@@ -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 <melissah@us.ibm.com>
index edf8527..bf2a2ad 100644 (file)
@@ -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
index 3e37bfe..b6c49f5 100644 (file)
@@ -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
index 2c7c898..3a896cf 100644 (file)
@@ -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 <tspat@de.ibm.com>
  *
index 366c01d..ec23d1c 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  include/asm-s390/resource.h
- *
  *  S390 version
  *
  *  Derived from "include/asm-i386/resources.h"
index 5a4c1ef..4140815 100644 (file)
@@ -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
index 47510e5..1746a5d 100644 (file)
@@ -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
index e0ff1ab..91fd3e4 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  include/asm-s390/siginfo.h
- *
  *  S390 version
  *
  *  Derived from "include/asm-i386/siginfo.h"
index 7d036bf..37a94f9 100644 (file)
@@ -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 */
index c91b720..2dacb30 100644 (file)
@@ -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 */
index d92959e..b4ca97d 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  include/asm-s390/stat.h
- *
  *  S390 version
  *
  *  Derived from "include/asm-i386/stat.h"
index 3be7fbd..a61d538 100644 (file)
@@ -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 <asm-generic/statfs.h>
-#else
 /*
  * We can't use <asm-generic/statfs.h> 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
index ebaa1e0..bdea8fc 100644 (file)
@@ -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"
index 884fba4..b2bc4ba 100644 (file)
@@ -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 <holzheu@de.ibm.com>
  *
  *************************************************************************/
index 31c338d..37f01a7 100644 (file)
@@ -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 */
index ed1e267..a2a39f0 100644 (file)
@@ -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 */
index cfb874e..200e063 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  include/asm-s390/ucontext.h
- *
  *  S390 version
  *
  *  Derived from "include/asm-i386/ucontext.h"
index 70a5087..3d55356 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  include/asm-s390/unistd.h
- *
  *  S390 version
  *
  *  Derived from "include/asm-i386/unistd.h"
 #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 (file)
index 0000000..a9a4ebf
--- /dev/null
@@ -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 <cornelia.huck@de.ibm.com>
+ */
+#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
index 8406a2b..221419d 100644 (file)
@@ -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 <sameske@de.ibm.com>
  *
index 03fdd55..bdfbde1 100644 (file)
@@ -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 (file)
index 0000000..14fab8f
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/kvm_para.h>
index 4aa9573..9cb4260 100644 (file)
@@ -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 <asm-generic/unistd.h>
-
-#endif /* _ASM_SCORE_UNISTD_H */
index b2e3db6..aace6f3 100644 (file)
 #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 */
 
 #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          */
 /* 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                    */
 #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      */
 #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 */
index 891068f..251464c 100644 (file)
@@ -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
 #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 (file)
index 0000000..14fab8f
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/kvm_para.h>
index 1722e29..214feef 100644 (file)
@@ -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) */
index 3070f25..156220e 100644 (file)
@@ -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
 
index 84d7951..d4050f1 100644 (file)
 #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 */
index a26a537..4b6b998 100644 (file)
 #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) */
index 6d5c15b..7dc3e41 100644 (file)
@@ -349,4 +349,4 @@ struct sparc_stackf {
 #define PTRACE_GETFPREGS64       25
 #define PTRACE_SETFPREGS64       26
 
-#endif /* !(__SPARC_PTRACE_H) */
+#endif /* __SPARC_PTRACE_H */
index 2287f70..ae5704f 100644 (file)
@@ -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.
+ */
index 1c5900b..bdb3fea 100644 (file)
@@ -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 */
index 8f781a3..bbab98b 100644 (file)
@@ -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 */
index bea1568..89f49b6 100644 (file)
@@ -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
index 9c9d785..ab26e92 100644 (file)
@@ -253,4 +253,4 @@ struct ktermios {
 #define        TCSADRAIN       1
 #define        TCSAFLUSH       2
 
-#endif /* !(_SPARC_TERMBITS_H) */
+#endif /* _SPARC_TERMBITS_H */
index fb256fb..37d8ef8 100644 (file)
                             (level == SP_TRAP_NETBSD) || \
                             (level == SP_TRAP_LINUX))
 
-#endif /* !(_SPARC_TRAPS_H) */
+#endif /* _SPARC_TRAPS_H */
index 383d156..b9e79bc 100644 (file)
@@ -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 <asm-generic/int-ll64.h>
-
-#endif /* defined(__sparc__) */
-
-#endif /* defined(_SPARC_TYPES_H) */
+#include <asm-generic/types.h>
index d457fd0..20dc2fc 100644 (file)
@@ -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__
 #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,
index 9558416..fb72ecf 100644 (file)
@@ -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 <linux/byteorder/big_endian.h>
+#elif defined (__LITTLE_ENDIAN__)
 #include <linux/byteorder/little_endian.h>
+#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 (file)
index 0000000..af4c9f9
--- /dev/null
@@ -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 */
index 4b781ad..c97b421 100644 (file)
  *   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 <arch/chip.h>
 #include <linux/ioctl.h>
 
 #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 (file)
index 0000000..14fab8f
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/kvm_para.h>
index da9ecd8..f8a42c3 100644 (file)
@@ -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 */
index 42667df..3866397 100644 (file)
@@ -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
 /* Use the standard ABI for syscalls. */
 #include <asm-generic/unistd.h>
 
+#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 */
index 2f90c51..c15ddaf 100644 (file)
@@ -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 <linux/types.h>
 #include <linux/screen_info.h>
 #include <linux/apm_bios.h>
@@ -9,11 +34,6 @@
 #include <asm/ist.h>
 #include <video/edid.h>
 
-/* setup data types */
-#define SETUP_NONE                     0
-#define SETUP_E820_EXT                 1
-#define SETUP_DTB                      2
-
 /* extensible setup data list node */
 struct setup_data {
        __u64 next;
@@ -27,9 +47,6 @@ struct setup_header {
        __u16   root_flags;
        __u32   syssize;
        __u16   ram_size;
-#define RAMDISK_IMAGE_START_MASK       0x07FF
-#define RAMDISK_PROMPT_FLAG            0x8000
-#define RAMDISK_LOAD_FLAG              0x4000
        __u16   vid_mode;
        __u16   root_dev;
        __u16   boot_flag;
@@ -41,10 +58,6 @@ struct setup_header {
        __u16   kernel_version;
        __u8    type_of_loader;
        __u8    loadflags;
-#define LOADED_HIGH    (1<<0)
-#define QUIET_FLAG     (1<<5)
-#define KEEP_SEGMENTS  (1<<6)
-#define CAN_USE_HEAP   (1<<7)
        __u16   setup_move_size;
        __u32   code32_start;
        __u32   ramdisk_image;
@@ -57,7 +70,8 @@ struct setup_header {
        __u32   initrd_addr_max;
        __u32   kernel_alignment;
        __u8    relocatable_kernel;
-       __u8    _pad2[3];
+       __u8    min_alignment;
+       __u16   xloadflags;
        __u32   cmdline_size;
        __u32   hardware_subarch;
        __u64   hardware_subarch_data;
@@ -66,6 +80,7 @@ struct setup_header {
        __u64   setup_data;
        __u64   pref_address;
        __u32   init_size;
+       __u32   handover_offset;
 } __attribute__((packed));
 
 struct sys_desc_table {
@@ -104,7 +119,10 @@ struct boot_params {
        __u8  hd1_info[16];     /* obsolete! */         /* 0x090 */
        struct sys_desc_table sys_desc_table;           /* 0x0a0 */
        struct olpc_ofw_header olpc_ofw_header;         /* 0x0b0 */
-       __u8  _pad4[128];                               /* 0x0c0 */
+       __u32 ext_ramdisk_image;                        /* 0x0c0 */
+       __u32 ext_ramdisk_size;                         /* 0x0c4 */
+       __u32 ext_cmd_line_ptr;                         /* 0x0c8 */
+       __u8  _pad4[116];                               /* 0x0cc */
        struct edid_info edid_info;                     /* 0x140 */
        struct efi_info efi_info;                       /* 0x1c0 */
        __u32 alt_mem_k;                                /* 0x1e0 */
@@ -112,7 +130,21 @@ struct boot_params {
        __u8  e820_entries;                             /* 0x1e8 */
        __u8  eddbuf_entries;                           /* 0x1e9 */
        __u8  edd_mbr_sig_buf_entries;                  /* 0x1ea */
-       __u8  _pad6[6];                                 /* 0x1eb */
+       __u8  kbd_status;                               /* 0x1eb */
+       __u8  _pad5[3];                                 /* 0x1ec */
+       /*
+        * The sentinel is set to a nonzero value (0xff) in header.S.
+        *
+        * A bootloader is supposed to only take setup_header and put
+        * it into a clean boot_params buffer. If it turns out that
+        * it is clumsy or too generous with the buffer, it most
+        * probably will pick up the sentinel variable too. The fact
+        * that this variable then is still 0xff will let kernel
+        * know that some variables in boot_params are invalid and
+        * kernel should zero out certain portions of boot_params.
+        */
+       __u8  sentinel;                                 /* 0x1ef */
+       __u8  _pad6[1];                                 /* 0x1f0 */
        struct setup_header hdr;    /* setup header */  /* 0x1f1 */
        __u8  _pad7[0x290-0x1f1-sizeof(struct setup_header)];
        __u32 edd_mbr_sig_buffer[EDD_MBR_SIG_MAX];      /* 0x290 */
@@ -131,6 +163,6 @@ enum {
        X86_NR_SUBARCHS,
 };
 
-
+#endif /* __ASSEMBLY__ */
 
 #endif /* _ASM_X86_BOOTPARAM_H */
index 32ee558..cd8706e 100644 (file)
@@ -36,6 +36,7 @@
 #define E820_NVS       4
 #define E820_UNUSABLE  5
 
+
 /*
  * reserved RAM used by kernel itself
  * if CONFIG_INTEL_TXT is enabled, memory of this type will be
index 8c64e9c..79a9626 100644 (file)
@@ -1,5 +1 @@
-#ifndef        _I386_HW_BREAKPOINT_H
-#define        _I386_HW_BREAKPOINT_H
-
-#endif /* _I386_HW_BREAKPOINT_H */
-
+/* */
index b51564b..192dec3 100644 (file)
@@ -1,6 +1,3 @@
-#ifndef _ASM_X86_IST_H
-#define _ASM_X86_IST_H
-
 /*
  * Include file for the interface to IST BIOS
  * Copyright 2002 Andy Grover <andrew.grover@intel.com>
@@ -15,6 +12,9 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  */
+#ifndef _ASM_X86_IST_H
+#define _ASM_X86_IST_H
+
 
 
 #include <linux/types.h>
index e7d1c19..5d9a303 100644 (file)
@@ -9,10 +9,26 @@
 #include <linux/types.h>
 #include <linux/ioctl.h>
 
+#define DE_VECTOR 0
+#define DB_VECTOR 1
+#define BP_VECTOR 3
+#define OF_VECTOR 4
+#define BR_VECTOR 5
+#define UD_VECTOR 6
+#define NM_VECTOR 7
+#define DF_VECTOR 8
+#define TS_VECTOR 10
+#define NP_VECTOR 11
+#define SS_VECTOR 12
+#define GP_VECTOR 13
+#define PF_VECTOR 14
+#define MF_VECTOR 16
+#define MC_VECTOR 18
+
 /* Select x86 specific features in <linux/kvm.h> */
 #define __KVM_HAVE_PIT
 #define __KVM_HAVE_IOAPIC
-#define __KVM_HAVE_DEVICE_ASSIGNMENT
+#define __KVM_HAVE_IRQ_LINE
 #define __KVM_HAVE_MSI
 #define __KVM_HAVE_USER_NMI
 #define __KVM_HAVE_GUEST_DEBUG
@@ -24,6 +40,7 @@
 #define __KVM_HAVE_DEBUGREGS
 #define __KVM_HAVE_XSAVE
 #define __KVM_HAVE_XCRS
+#define __KVM_HAVE_READONLY_MEM
 
 /* Architectural interrupt line count. */
 #define KVM_NR_INTERRUPTS 256
index f2ac46a..a1c3d72 100644 (file)
@@ -22,6 +22,7 @@
 #define KVM_FEATURE_CLOCKSOURCE2        3
 #define KVM_FEATURE_ASYNC_PF           4
 #define KVM_FEATURE_STEAL_TIME         5
+#define KVM_FEATURE_PV_EOI             6
 
 /* The last 8 bits are used to indicate how to interpret the flags field
  * in pvclock structure. If no bits are set, all flags are ignored.
@@ -37,6 +38,7 @@
 #define MSR_KVM_SYSTEM_TIME_NEW 0x4b564d01
 #define MSR_KVM_ASYNC_PF_EN 0x4b564d02
 #define MSR_KVM_STEAL_TIME  0x4b564d03
+#define MSR_KVM_PV_EOI_EN      0x4b564d04
 
 struct kvm_steal_time {
        __u64 steal;
@@ -89,5 +91,10 @@ struct kvm_vcpu_pv_apf_data {
        __u32 enabled;
 };
 
+#define KVM_PV_EOI_BIT 0
+#define KVM_PV_EOI_MASK (0x1 << KVM_PV_EOI_BIT)
+#define KVM_PV_EOI_ENABLED KVM_PV_EOI_MASK
+#define KVM_PV_EOI_DISABLED 0x0
+
 
 #endif /* _ASM_X86_KVM_PARA_H */
index 05839dd..46e0674 100644 (file)
@@ -4,58 +4,6 @@
 #include <linux/types.h>
 #include <asm/ioctls.h>
 
-/*
- * Machine Check support for x86
- */
-
-/* MCG_CAP register defines */
-#define MCG_BANKCNT_MASK       0xff         /* Number of Banks */
-#define MCG_CTL_P              (1ULL<<8)    /* MCG_CTL register available */
-#define MCG_EXT_P              (1ULL<<9)    /* Extended registers available */
-#define MCG_CMCI_P             (1ULL<<10)   /* CMCI supported */
-#define MCG_EXT_CNT_MASK       0xff0000     /* Number of Extended registers */
-#define MCG_EXT_CNT_SHIFT      16
-#define MCG_EXT_CNT(c)         (((c) & MCG_EXT_CNT_MASK) >> MCG_EXT_CNT_SHIFT)
-#define MCG_SER_P              (1ULL<<24)   /* MCA recovery/new status bits */
-
-/* MCG_STATUS register defines */
-#define MCG_STATUS_RIPV  (1ULL<<0)   /* restart ip valid */
-#define MCG_STATUS_EIPV  (1ULL<<1)   /* ip points to correct instruction */
-#define MCG_STATUS_MCIP  (1ULL<<2)   /* machine check in progress */
-
-/* MCi_STATUS register defines */
-#define MCI_STATUS_VAL   (1ULL<<63)  /* valid error */
-#define MCI_STATUS_OVER  (1ULL<<62)  /* previous errors lost */
-#define MCI_STATUS_UC    (1ULL<<61)  /* uncorrected error */
-#define MCI_STATUS_EN    (1ULL<<60)  /* error enabled */
-#define MCI_STATUS_MISCV (1ULL<<59)  /* misc error reg. valid */
-#define MCI_STATUS_ADDRV (1ULL<<58)  /* addr reg. valid */
-#define MCI_STATUS_PCC   (1ULL<<57)  /* processor context corrupt */
-#define MCI_STATUS_S    (1ULL<<56)  /* Signaled machine check */
-#define MCI_STATUS_AR   (1ULL<<55)  /* Action required */
-
-/* MCi_MISC register defines */
-#define MCI_MISC_ADDR_LSB(m)   ((m) & 0x3f)
-#define MCI_MISC_ADDR_MODE(m)  (((m) >> 6) & 7)
-#define  MCI_MISC_ADDR_SEGOFF  0       /* segment offset */
-#define  MCI_MISC_ADDR_LINEAR  1       /* linear address */
-#define  MCI_MISC_ADDR_PHYS    2       /* physical address */
-#define  MCI_MISC_ADDR_MEM     3       /* memory address */
-#define  MCI_MISC_ADDR_GENERIC 7       /* generic */
-
-/* CTL2 register defines */
-#define MCI_CTL2_CMCI_EN               (1ULL << 30)
-#define MCI_CTL2_CMCI_THRESHOLD_MASK   0x7fffULL
-
-#define MCJ_CTX_MASK           3
-#define MCJ_CTX(flags)         ((flags) & MCJ_CTX_MASK)
-#define MCJ_CTX_RANDOM         0    /* inject context: random */
-#define MCJ_CTX_PROCESS                0x1  /* inject context: process */
-#define MCJ_CTX_IRQ            0x2  /* inject context: IRQ */
-#define MCJ_NMI_BROADCAST      0x4  /* do NMI broadcasting */
-#define MCJ_EXCEPTION          0x8  /* raise as exception */
-#define MCJ_IRQ_BRAODCAST      0x10 /* do IRQ broadcasting */
-
 /* Fields are zero when not available */
 struct mce {
        __u64 status;
@@ -79,44 +27,8 @@ struct mce {
        __u64 mcgcap;   /* MCGCAP MSR: machine check capabilities of CPU */
 };
 
-/*
- * This structure contains all data related to the MCE log.  Also
- * carries a signature to make it easier to find from external
- * debugging tools.  Each entry is only valid when its finished flag
- * is set.
- */
-
-#define MCE_LOG_LEN 32
-
-struct mce_log {
-       char signature[12]; /* "MACHINECHECK" */
-       unsigned len;       /* = MCE_LOG_LEN */
-       unsigned next;
-       unsigned flags;
-       unsigned recordlen;     /* length of struct mce */
-       struct mce entry[MCE_LOG_LEN];
-};
-
-#define MCE_OVERFLOW 0         /* bit 0 in flags means overflow */
-
-#define MCE_LOG_SIGNATURE      "MACHINECHECK"
-
 #define MCE_GET_RECORD_LEN   _IOR('M', 1, int)
 #define MCE_GET_LOG_LEN      _IOR('M', 2, int)
 #define MCE_GETCLEAR_FLAGS   _IOR('M', 3, int)
 
-/* Software defined banks */
-#define MCE_EXTENDED_BANK      128
-#define MCE_THERMAL_BANK       MCE_EXTENDED_BANK + 0
-
-#define K8_MCE_THRESHOLD_BASE      (MCE_EXTENDED_BANK + 1)      /* MCE_AMD */
-#define K8_MCE_THRESHOLD_BANK_0    (MCE_THRESHOLD_BASE + 0 * 9)
-#define K8_MCE_THRESHOLD_BANK_1    (MCE_THRESHOLD_BASE + 1 * 9)
-#define K8_MCE_THRESHOLD_BANK_2    (MCE_THRESHOLD_BASE + 2 * 9)
-#define K8_MCE_THRESHOLD_BANK_3    (MCE_THRESHOLD_BASE + 3 * 9)
-#define K8_MCE_THRESHOLD_BANK_4    (MCE_THRESHOLD_BASE + 4 * 9)
-#define K8_MCE_THRESHOLD_BANK_5    (MCE_THRESHOLD_BASE + 5 * 9)
-#define K8_MCE_THRESHOLD_DRAM_ECC  (MCE_THRESHOLD_BANK_4 + 0)
-
-
 #endif /* _ASM_X86_MCE_H */
index 593e51d..513b05f 100644 (file)
@@ -3,6 +3,9 @@
 
 #define MAP_32BIT      0x40            /* only give out 32bit addresses */
 
+#define MAP_HUGE_2MB    (21 << MAP_HUGE_SHIFT)
+#define MAP_HUGE_1GB    (30 << MAP_HUGE_SHIFT)
+
 #include <asm-generic/mman.h>
 
 #endif /* _ASM_X86_MMAN_H */
index ccb8059..2af848d 100644 (file)
 #define MSR_IA32_PERFCTR0              0x000000c1
 #define MSR_IA32_PERFCTR1              0x000000c2
 #define MSR_FSB_FREQ                   0x000000cd
+#define MSR_NHM_PLATFORM_INFO          0x000000ce
 
 #define MSR_NHM_SNB_PKG_CST_CFG_CTL    0x000000e2
 #define NHM_C3_AUTO_DEMOTE             (1UL << 25)
 #define NHM_C1_AUTO_DEMOTE             (1UL << 26)
 #define ATM_LNC_C6_AUTO_DEMOTE         (1UL << 25)
+#define SNB_C1_AUTO_UNDEMOTE           (1UL << 27)
+#define SNB_C3_AUTO_UNDEMOTE           (1UL << 28)
 
+#define MSR_PLATFORM_INFO              0x000000ce
 #define MSR_MTRRcap                    0x000000fe
 #define MSR_IA32_BBL_CR_CTL            0x00000119
 #define MSR_IA32_BBL_CR_CTL3           0x0000011e
@@ -55,6 +59,8 @@
 
 #define MSR_OFFCORE_RSP_0              0x000001a6
 #define MSR_OFFCORE_RSP_1              0x000001a7
+#define MSR_NHM_TURBO_RATIO_LIMIT      0x000001ad
+#define MSR_IVT_TURBO_RATIO_LIMIT      0x000001ae
 
 #define MSR_LBR_SELECT                 0x000001c8
 #define MSR_LBR_TOS                    0x000001c9
@@ -66,6 +72,7 @@
 #define MSR_IA32_PEBS_ENABLE           0x000003f1
 #define MSR_IA32_DS_AREA               0x00000600
 #define MSR_IA32_PERF_CAPABILITIES     0x00000345
+#define MSR_PEBS_LD_LAT_THRESHOLD      0x000003f6
 
 #define MSR_MTRRfix64K_00000           0x00000250
 #define MSR_MTRRfix16K_80000           0x00000258
 #define DEBUGCTLMSR_BTS_OFF_USR                (1UL << 10)
 #define DEBUGCTLMSR_FREEZE_LBRS_ON_PMI (1UL << 11)
 
+#define MSR_IA32_POWER_CTL             0x000001fc
+
 #define MSR_IA32_MC0_CTL               0x00000400
 #define MSR_IA32_MC0_STATUS            0x00000401
 #define MSR_IA32_MC0_ADDR              0x00000402
 #define MSR_IA32_MC0_MISC              0x00000403
 
+/* C-state Residency Counters */
+#define MSR_PKG_C3_RESIDENCY           0x000003f8
+#define MSR_PKG_C6_RESIDENCY           0x000003f9
+#define MSR_PKG_C7_RESIDENCY           0x000003fa
+#define MSR_CORE_C3_RESIDENCY          0x000003fc
+#define MSR_CORE_C6_RESIDENCY          0x000003fd
+#define MSR_CORE_C7_RESIDENCY          0x000003fe
+#define MSR_PKG_C2_RESIDENCY           0x0000060d
+#define MSR_PKG_C8_RESIDENCY           0x00000630
+#define MSR_PKG_C9_RESIDENCY           0x00000631
+#define MSR_PKG_C10_RESIDENCY          0x00000632
+
+/* Run Time Average Power Limiting (RAPL) Interface */
+
+#define MSR_RAPL_POWER_UNIT            0x00000606
+
+#define MSR_PKG_POWER_LIMIT            0x00000610
+#define MSR_PKG_ENERGY_STATUS          0x00000611
+#define MSR_PKG_PERF_STATUS            0x00000613
+#define MSR_PKG_POWER_INFO             0x00000614
+
+#define MSR_DRAM_POWER_LIMIT           0x00000618
+#define MSR_DRAM_ENERGY_STATUS         0x00000619
+#define MSR_DRAM_PERF_STATUS           0x0000061b
+#define MSR_DRAM_POWER_INFO            0x0000061c
+
+#define MSR_PP0_POWER_LIMIT            0x00000638
+#define MSR_PP0_ENERGY_STATUS          0x00000639
+#define MSR_PP0_POLICY                 0x0000063a
+#define MSR_PP0_PERF_STATUS            0x0000063b
+
+#define MSR_PP1_POWER_LIMIT            0x00000640
+#define MSR_PP1_ENERGY_STATUS          0x00000641
+#define MSR_PP1_POLICY                 0x00000642
+
 #define MSR_AMD64_MC0_MASK             0xc0010044
 
 #define MSR_IA32_MCx_CTL(x)            (MSR_IA32_MC0_CTL + 4*(x))
 #define MSR_P6_EVNTSEL0                        0x00000186
 #define MSR_P6_EVNTSEL1                        0x00000187
 
+#define MSR_KNC_PERFCTR0               0x00000020
+#define MSR_KNC_PERFCTR1               0x00000021
+#define MSR_KNC_EVNTSEL0               0x00000028
+#define MSR_KNC_EVNTSEL1               0x00000029
+
 /* AMD64 MSRs. Not complete. See the architecture manual for a more
    complete list. */
 
 #define MSR_AMD64_OSVW_ID_LENGTH       0xc0010140
 #define MSR_AMD64_OSVW_STATUS          0xc0010141
 #define MSR_AMD64_DC_CFG               0xc0011022
+#define MSR_AMD64_BU_CFG2              0xc001102a
 #define MSR_AMD64_IBSFETCHCTL          0xc0011030
 #define MSR_AMD64_IBSFETCHLINAD                0xc0011031
 #define MSR_AMD64_IBSFETCHPHYSAD       0xc0011032
+#define MSR_AMD64_IBSFETCH_REG_COUNT   3
+#define MSR_AMD64_IBSFETCH_REG_MASK    ((1UL<<MSR_AMD64_IBSFETCH_REG_COUNT)-1)
 #define MSR_AMD64_IBSOPCTL             0xc0011033
 #define MSR_AMD64_IBSOPRIP             0xc0011034
 #define MSR_AMD64_IBSOPDATA            0xc0011035
 #define MSR_AMD64_IBSOPDATA3           0xc0011037
 #define MSR_AMD64_IBSDCLINAD           0xc0011038
 #define MSR_AMD64_IBSDCPHYSAD          0xc0011039
+#define MSR_AMD64_IBSOP_REG_COUNT      7
+#define MSR_AMD64_IBSOP_REG_MASK       ((1UL<<MSR_AMD64_IBSOP_REG_COUNT)-1)
 #define MSR_AMD64_IBSCTL               0xc001103a
 #define MSR_AMD64_IBSBRTARGET          0xc001103b
+#define MSR_AMD64_IBS_REG_COUNT_MAX    8 /* includes MSR_AMD64_IBSBRTARGET */
+
+/* Fam 16h MSRs */
+#define MSR_F16H_L2I_PERF_CTL          0xc0010230
+#define MSR_F16H_L2I_PERF_CTR          0xc0010231
 
 /* Fam 15h MSRs */
 #define MSR_F15H_PERF_CTL              0xc0010200
 #define MSR_F15H_PERF_CTR              0xc0010201
+#define MSR_F15H_NB_PERF_CTL           0xc0010240
+#define MSR_F15H_NB_PERF_CTR           0xc0010241
 
 /* Fam 10h MSRs */
 #define MSR_FAM10H_MMIO_CONF_BASE      0xc0010058
 #define MSR_IA32_PLATFORM_ID           0x00000017
 #define MSR_IA32_EBL_CR_POWERON                0x0000002a
 #define MSR_EBC_FREQUENCY_ID           0x0000002c
+#define MSR_SMI_COUNT                  0x00000034
 #define MSR_IA32_FEATURE_CONTROL        0x0000003a
+#define MSR_IA32_TSC_ADJUST             0x0000003b
 
 #define FEATURE_CONTROL_LOCKED                         (1<<0)
 #define FEATURE_CONTROL_VMXON_ENABLED_INSIDE_SMX       (1<<1)
 
 #define MSR_IA32_PERF_STATUS           0x00000198
 #define MSR_IA32_PERF_CTL              0x00000199
+#define MSR_AMD_PSTATE_DEF_BASE                0xc0010064
+#define MSR_AMD_PERF_STATUS            0xc0010063
+#define MSR_AMD_PERF_CTL               0xc0010062
 
 #define MSR_IA32_MPERF                 0x000000e7
 #define MSR_IA32_APERF                 0x000000e8
 #define MSR_IA32_MISC_ENABLE_TURBO_DISABLE     (1ULL << 38)
 #define MSR_IA32_MISC_ENABLE_IP_PREF_DISABLE   (1ULL << 39)
 
+#define MSR_IA32_TSC_DEADLINE          0x000006E0
+
 /* P4/Xeon+ specific */
 #define MSR_IA32_MCG_EAX               0x00000180
 #define MSR_IA32_MCG_EBX               0x00000181
 #define VMX_BASIC_MEM_TYPE_WB  6LLU
 #define VMX_BASIC_INOUT                0x0040000000000000LLU
 
+/* MSR_IA32_VMX_MISC bits */
+#define MSR_IA32_VMX_MISC_VMWRITE_SHADOW_RO_FIELDS (1ULL << 29)
 /* AMD-V MSRs */
 
 #define MSR_VM_CR                       0xc0010114
diff --git a/usr/include/asm-x86/perf_regs.h b/usr/include/asm-x86/perf_regs.h
new file mode 100644 (file)
index 0000000..3f2207b
--- /dev/null
@@ -0,0 +1,33 @@
+#ifndef _ASM_X86_PERF_REGS_H
+#define _ASM_X86_PERF_REGS_H
+
+enum perf_event_x86_regs {
+       PERF_REG_X86_AX,
+       PERF_REG_X86_BX,
+       PERF_REG_X86_CX,
+       PERF_REG_X86_DX,
+       PERF_REG_X86_SI,
+       PERF_REG_X86_DI,
+       PERF_REG_X86_BP,
+       PERF_REG_X86_SP,
+       PERF_REG_X86_IP,
+       PERF_REG_X86_FLAGS,
+       PERF_REG_X86_CS,
+       PERF_REG_X86_SS,
+       PERF_REG_X86_DS,
+       PERF_REG_X86_ES,
+       PERF_REG_X86_FS,
+       PERF_REG_X86_GS,
+       PERF_REG_X86_R8,
+       PERF_REG_X86_R9,
+       PERF_REG_X86_R10,
+       PERF_REG_X86_R11,
+       PERF_REG_X86_R12,
+       PERF_REG_X86_R13,
+       PERF_REG_X86_R14,
+       PERF_REG_X86_R15,
+
+       PERF_REG_X86_32_MAX = PERF_REG_X86_GS + 1,
+       PERF_REG_X86_64_MAX = PERF_REG_X86_R15 + 1,
+};
+#endif /* _ASM_X86_PERF_REGS_H */
index c312679..9b4a886 100644 (file)
@@ -1,7 +1,7 @@
 # ifdef __i386__
-#  include "posix_types_32.h"
+#  include <asm/posix_types_32.h>
 # elif defined(__ILP32__)
-#  include "posix_types_x32.h"
+#  include <asm/posix_types_x32.h>
 # else
-#  include "posix_types_64.h"
+#  include <asm/posix_types_64.h>
 # endif
index 99f262e..8e52505 100644 (file)
@@ -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
 
index 7742812..a6af496 100644 (file)
@@ -44,6 +44,7 @@
  */
 #define X86_CR3_PWT    0x00000008 /* Page Write Through */
 #define X86_CR3_PCD    0x00000010 /* Page Cache Disable */
+#define X86_CR3_PCID_MASK 0x00000fff /* PCID Mask */
 
 /*
  * Intel CPU features in CR4
 #define X86_CR4_OSXMMEXCPT 0x00000400 /* enable unmasked SSE exceptions */
 #define X86_CR4_VMXE   0x00002000 /* enable VMX virtualization */
 #define X86_CR4_RDWRGSFS 0x00010000 /* enable RDWRGSFS support */
+#define X86_CR4_PCIDE  0x00020000 /* enable PCID support */
 #define X86_CR4_OSXSAVE 0x00040000 /* enable xsave and xrestore */
 #define X86_CR4_SMEP   0x00100000 /* enable SMEP support */
+#define X86_CR4_SMAP   0x00200000 /* enable SMAP support */
 
 /*
  * x86-64 Task Priority Register, CR8
index 54aef62..79a9626 100644 (file)
@@ -1,5 +1 @@
-#ifndef _ASM_X86_SETUP_H
-#define _ASM_X86_SETUP_H
-
-
-#endif /* _ASM_X86_SETUP_H */
+/* */
index 4c3a1e6..facdb43 100644 (file)
@@ -16,6 +16,7 @@ typedef unsigned long sigset_t;
 
 #endif /* __ASSEMBLY__ */
 
+
 #define SIGHUP          1
 #define SIGINT          2
 #define SIGQUIT                 3
@@ -84,12 +85,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
 
@@ -98,8 +93,8 @@ typedef unsigned long sigset_t;
 #ifndef __ASSEMBLY__
 
 
-#ifdef __i386__
 /* Here we must cater to libcs that poke about in kernel headers.  */
+#ifdef __i386__
 
 struct sigaction {
        union {
@@ -123,10 +118,6 @@ struct sigaction {
        sigset_t sa_mask;               /* mask last for extensibility */
 };
 
-struct k_sigaction {
-       struct sigaction sa;
-};
-
 #endif /* !__i386__ */
 
 typedef struct sigaltstack {
index e0b1d9b..7b3ddc3 100644 (file)
@@ -25,6 +25,12 @@ struct stat {
        unsigned long  __unused5;
 };
 
+/* We don't need to memset the whole thing just to initialize the padding */
+#define INIT_STRUCT_STAT_PADDING(st) do {      \
+       st.__unused4 = 0;                       \
+       st.__unused5 = 0;                       \
+} while (0)
+
 #define STAT64_HAS_BROKEN_ST_INO       1
 
 /* This matches struct stat64 in glibc2.1, hence the absolutely
@@ -63,6 +69,12 @@ struct stat64 {
        unsigned long long      st_ino;
 };
 
+/* We don't need to memset the whole thing just to initialize the padding */
+#define INIT_STRUCT_STAT64_PADDING(st) do {            \
+       memset(&st.__pad0, 0, sizeof(st.__pad0));       \
+       memset(&st.__pad3, 0, sizeof(st.__pad3));       \
+} while (0)
+
 #else /* __i386__ */
 
 struct stat {
@@ -87,6 +99,15 @@ struct stat {
        unsigned long   st_ctime_nsec;
        long            __unused[3];
 };
+
+/* We don't need to memset the whole thing just to initialize the padding */
+#define INIT_STRUCT_STAT_PADDING(st) do {      \
+       st.__pad0 = 0;                          \
+       st.__unused[0] = 0;                     \
+       st.__unused[1] = 0;                     \
+       st.__unused[2] = 0;                     \
+} while (0)
+
 #endif
 
 /* for 32bit emulation and 32 bit kernels */
diff --git a/usr/include/asm-x86/svm.h b/usr/include/asm-x86/svm.h
new file mode 100644 (file)
index 0000000..ff6edd6
--- /dev/null
@@ -0,0 +1,132 @@
+#ifndef __SVM_H
+#define __SVM_H
+
+#define SVM_EXIT_READ_CR0      0x000
+#define SVM_EXIT_READ_CR3      0x003
+#define SVM_EXIT_READ_CR4      0x004
+#define SVM_EXIT_READ_CR8      0x008
+#define SVM_EXIT_WRITE_CR0     0x010
+#define SVM_EXIT_WRITE_CR3     0x013
+#define SVM_EXIT_WRITE_CR4     0x014
+#define SVM_EXIT_WRITE_CR8     0x018
+#define SVM_EXIT_READ_DR0      0x020
+#define SVM_EXIT_READ_DR1      0x021
+#define SVM_EXIT_READ_DR2      0x022
+#define SVM_EXIT_READ_DR3      0x023
+#define SVM_EXIT_READ_DR4      0x024
+#define SVM_EXIT_READ_DR5      0x025
+#define SVM_EXIT_READ_DR6      0x026
+#define SVM_EXIT_READ_DR7      0x027
+#define SVM_EXIT_WRITE_DR0     0x030
+#define SVM_EXIT_WRITE_DR1     0x031
+#define SVM_EXIT_WRITE_DR2     0x032
+#define SVM_EXIT_WRITE_DR3     0x033
+#define SVM_EXIT_WRITE_DR4     0x034
+#define SVM_EXIT_WRITE_DR5     0x035
+#define SVM_EXIT_WRITE_DR6     0x036
+#define SVM_EXIT_WRITE_DR7     0x037
+#define SVM_EXIT_EXCP_BASE     0x040
+#define SVM_EXIT_INTR          0x060
+#define SVM_EXIT_NMI           0x061
+#define SVM_EXIT_SMI           0x062
+#define SVM_EXIT_INIT          0x063
+#define SVM_EXIT_VINTR         0x064
+#define SVM_EXIT_CR0_SEL_WRITE 0x065
+#define SVM_EXIT_IDTR_READ     0x066
+#define SVM_EXIT_GDTR_READ     0x067
+#define SVM_EXIT_LDTR_READ     0x068
+#define SVM_EXIT_TR_READ       0x069
+#define SVM_EXIT_IDTR_WRITE    0x06a
+#define SVM_EXIT_GDTR_WRITE    0x06b
+#define SVM_EXIT_LDTR_WRITE    0x06c
+#define SVM_EXIT_TR_WRITE      0x06d
+#define SVM_EXIT_RDTSC         0x06e
+#define SVM_EXIT_RDPMC         0x06f
+#define SVM_EXIT_PUSHF         0x070
+#define SVM_EXIT_POPF          0x071
+#define SVM_EXIT_CPUID         0x072
+#define SVM_EXIT_RSM           0x073
+#define SVM_EXIT_IRET          0x074
+#define SVM_EXIT_SWINT         0x075
+#define SVM_EXIT_INVD          0x076
+#define SVM_EXIT_PAUSE         0x077
+#define SVM_EXIT_HLT           0x078
+#define SVM_EXIT_INVLPG        0x079
+#define SVM_EXIT_INVLPGA       0x07a
+#define SVM_EXIT_IOIO          0x07b
+#define SVM_EXIT_MSR           0x07c
+#define SVM_EXIT_TASK_SWITCH   0x07d
+#define SVM_EXIT_FERR_FREEZE   0x07e
+#define SVM_EXIT_SHUTDOWN      0x07f
+#define SVM_EXIT_VMRUN         0x080
+#define SVM_EXIT_VMMCALL       0x081
+#define SVM_EXIT_VMLOAD        0x082
+#define SVM_EXIT_VMSAVE        0x083
+#define SVM_EXIT_STGI          0x084
+#define SVM_EXIT_CLGI          0x085
+#define SVM_EXIT_SKINIT        0x086
+#define SVM_EXIT_RDTSCP        0x087
+#define SVM_EXIT_ICEBP         0x088
+#define SVM_EXIT_WBINVD        0x089
+#define SVM_EXIT_MONITOR       0x08a
+#define SVM_EXIT_MWAIT         0x08b
+#define SVM_EXIT_MWAIT_COND    0x08c
+#define SVM_EXIT_XSETBV        0x08d
+#define SVM_EXIT_NPF           0x400
+
+#define SVM_EXIT_ERR           -1
+
+#define SVM_EXIT_REASONS \
+       { SVM_EXIT_READ_CR0,    "read_cr0" }, \
+       { SVM_EXIT_READ_CR3,    "read_cr3" }, \
+       { SVM_EXIT_READ_CR4,    "read_cr4" }, \
+       { SVM_EXIT_READ_CR8,    "read_cr8" }, \
+       { SVM_EXIT_WRITE_CR0,   "write_cr0" }, \
+       { SVM_EXIT_WRITE_CR3,   "write_cr3" }, \
+       { SVM_EXIT_WRITE_CR4,   "write_cr4" }, \
+       { SVM_EXIT_WRITE_CR8,   "write_cr8" }, \
+       { SVM_EXIT_READ_DR0,    "read_dr0" }, \
+       { SVM_EXIT_READ_DR1,    "read_dr1" }, \
+       { SVM_EXIT_READ_DR2,    "read_dr2" }, \
+       { SVM_EXIT_READ_DR3,    "read_dr3" }, \
+       { SVM_EXIT_WRITE_DR0,   "write_dr0" }, \
+       { SVM_EXIT_WRITE_DR1,   "write_dr1" }, \
+       { SVM_EXIT_WRITE_DR2,   "write_dr2" }, \
+       { SVM_EXIT_WRITE_DR3,   "write_dr3" }, \
+       { SVM_EXIT_WRITE_DR5,   "write_dr5" }, \
+       { SVM_EXIT_WRITE_DR7,   "write_dr7" }, \
+       { SVM_EXIT_EXCP_BASE + DB_VECTOR,       "DB excp" }, \
+       { SVM_EXIT_EXCP_BASE + BP_VECTOR,       "BP excp" }, \
+       { SVM_EXIT_EXCP_BASE + UD_VECTOR,       "UD excp" }, \
+       { SVM_EXIT_EXCP_BASE + PF_VECTOR,       "PF excp" }, \
+       { SVM_EXIT_EXCP_BASE + NM_VECTOR,       "NM excp" }, \
+       { SVM_EXIT_EXCP_BASE + MC_VECTOR,       "MC excp" }, \
+       { SVM_EXIT_INTR,        "interrupt" }, \
+       { SVM_EXIT_NMI,         "nmi" }, \
+       { SVM_EXIT_SMI,         "smi" }, \
+       { SVM_EXIT_INIT,        "init" }, \
+       { SVM_EXIT_VINTR,       "vintr" }, \
+       { SVM_EXIT_CPUID,       "cpuid" }, \
+       { SVM_EXIT_INVD,        "invd" }, \
+       { SVM_EXIT_HLT,         "hlt" }, \
+       { SVM_EXIT_INVLPG,      "invlpg" }, \
+       { SVM_EXIT_INVLPGA,     "invlpga" }, \
+       { SVM_EXIT_IOIO,        "io" }, \
+       { SVM_EXIT_MSR,         "msr" }, \
+       { SVM_EXIT_TASK_SWITCH, "task_switch" }, \
+       { SVM_EXIT_SHUTDOWN,    "shutdown" }, \
+       { SVM_EXIT_VMRUN,       "vmrun" }, \
+       { SVM_EXIT_VMMCALL,     "hypercall" }, \
+       { SVM_EXIT_VMLOAD,      "vmload" }, \
+       { SVM_EXIT_VMSAVE,      "vmsave" }, \
+       { SVM_EXIT_STGI,        "stgi" }, \
+       { SVM_EXIT_CLGI,        "clgi" }, \
+       { SVM_EXIT_SKINIT,      "skinit" }, \
+       { SVM_EXIT_WBINVD,      "wbinvd" }, \
+       { SVM_EXIT_MONITOR,     "monitor" }, \
+       { SVM_EXIT_MWAIT,       "mwait" }, \
+       { SVM_EXIT_XSETBV,      "xsetbv" }, \
+       { SVM_EXIT_NPF,         "npf" }
+
+
+#endif /* __SVM_H */
index 37365df..d1b09bf 100644 (file)
@@ -4,29 +4,14 @@
 #include <linux/types.h>
 
 
-static __inline__ __u32 __arch_swab32(__u32 val)
+static __inline__  __u32 __arch_swab32(__u32 val)
 {
-#ifdef __i386__
-# ifdef CONFIG_X86_BSWAP
-       __asm__("bswap %0" : "=r" (val) : "0" (val));
-# else
-       __asm__("xchgb %b0,%h0\n\t"     /* swap lower bytes     */
-           "rorl $16,%0\n\t"   /* swap words           */
-           "xchgb %b0,%h0"     /* swap higher bytes    */
-           : "=q" (val)
-           : "0" (val));
-# endif
-
-#else /* __i386__ */
-       __asm__("bswapl %0"
-           : "=r" (val)
-           : "0" (val));
-#endif
+       __asm__("bswapl %0" : "=r" (val) : "0" (val));
        return val;
 }
 #define __arch_swab32 __arch_swab32
 
-static __inline__ __u64 __arch_swab64(__u64 val)
+static __inline__  __u64 __arch_swab64(__u64 val)
 {
 #ifdef __i386__
        union {
@@ -37,22 +22,12 @@ static __inline__ __u64 __arch_swab64(__u64 val)
                __u64 u;
        } v;
        v.u = val;
-# ifdef CONFIG_X86_BSWAP
        __asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
            : "=r" (v.s.a), "=r" (v.s.b)
            : "0" (v.s.a), "1" (v.s.b));
-# else
-       v.s.a = __arch_swab32(v.s.a);
-       v.s.b = __arch_swab32(v.s.b);
-       __asm__("xchgl %0,%1"
-           : "=r" (v.s.a), "=r" (v.s.b)
-           : "0" (v.s.a), "1" (v.s.b));
-# endif
        return v.u;
 #else /* __i386__ */
-       __asm__("bswapq %0"
-           : "=r" (val)
-           : "0" (val));
+       __asm__("bswapq %0" : "=r" (val) : "0" (val));
        return val;
 #endif
 }
index 6636c6a..1f99b12 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef _ASM_X86_UNISTD_H
-#define _ASM_X86_UNISTD_H 1
+#define _ASM_X86_UNISTD_H
 
 /* x32 syscall flag bit */
 #define __X32_SYSCALL_BIT      0x40000000
index 660f341..45e32d0 100644 (file)
 #define __NR_setns 346
 #define __NR_process_vm_readv 347
 #define __NR_process_vm_writev 348
+#define __NR_kcmp 349
+#define __NR_finit_module 350
 
 #endif /* _ASM_X86_UNISTD_32_H */
index d7bbea0..82e1308 100644 (file)
 #define __NR_getcpu 309
 #define __NR_process_vm_readv 310
 #define __NR_process_vm_writev 311
+#define __NR_kcmp 312
+#define __NR_finit_module 313
 
 #endif /* _ASM_X86_UNISTD_64_H */
index 33c8b42..0b87c48 100644 (file)
@@ -47,8 +47,6 @@
 #define __NR_getsockname (__X32_SYSCALL_BIT + 51)
 #define __NR_getpeername (__X32_SYSCALL_BIT + 52)
 #define __NR_socketpair (__X32_SYSCALL_BIT + 53)
-#define __NR_setsockopt (__X32_SYSCALL_BIT + 54)
-#define __NR_getsockopt (__X32_SYSCALL_BIT + 55)
 #define __NR_clone (__X32_SYSCALL_BIT + 56)
 #define __NR_fork (__X32_SYSCALL_BIT + 57)
 #define __NR_vfork (__X32_SYSCALL_BIT + 58)
 #define __NR_syncfs (__X32_SYSCALL_BIT + 306)
 #define __NR_setns (__X32_SYSCALL_BIT + 308)
 #define __NR_getcpu (__X32_SYSCALL_BIT + 309)
+#define __NR_kcmp (__X32_SYSCALL_BIT + 312)
+#define __NR_finit_module (__X32_SYSCALL_BIT + 313)
 #define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512)
 #define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513)
 #define __NR_ioctl (__X32_SYSCALL_BIT + 514)
 #define __NR_sendmmsg (__X32_SYSCALL_BIT + 538)
 #define __NR_process_vm_readv (__X32_SYSCALL_BIT + 539)
 #define __NR_process_vm_writev (__X32_SYSCALL_BIT + 540)
+#define __NR_setsockopt (__X32_SYSCALL_BIT + 541)
+#define __NR_getsockopt (__X32_SYSCALL_BIT + 542)
 
 #endif /* _ASM_X86_UNISTD_X32_H */
diff --git a/usr/include/asm-x86/vmx.h b/usr/include/asm-x86/vmx.h
new file mode 100644 (file)
index 0000000..a08ae91
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ * vmx.h: VMX Architecture related definitions
+ * Copyright (c) 2004, Intel Corporation.
+ *
+ * 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.
+ *
+ * A few random additions are:
+ * Copyright (C) 2006 Qumranet
+ *    Avi Kivity <avi@qumranet.com>
+ *    Yaniv Kamay <yaniv@qumranet.com>
+ *
+ */
+#ifndef VMX_H
+#define VMX_H
+
+
+#define VMX_EXIT_REASONS_FAILED_VMENTRY         0x80000000
+
+#define EXIT_REASON_EXCEPTION_NMI       0
+#define EXIT_REASON_EXTERNAL_INTERRUPT  1
+#define EXIT_REASON_TRIPLE_FAULT        2
+
+#define EXIT_REASON_PENDING_INTERRUPT   7
+#define EXIT_REASON_NMI_WINDOW          8
+#define EXIT_REASON_TASK_SWITCH         9
+#define EXIT_REASON_CPUID               10
+#define EXIT_REASON_HLT                 12
+#define EXIT_REASON_INVD                13
+#define EXIT_REASON_INVLPG              14
+#define EXIT_REASON_RDPMC               15
+#define EXIT_REASON_RDTSC               16
+#define EXIT_REASON_VMCALL              18
+#define EXIT_REASON_VMCLEAR             19
+#define EXIT_REASON_VMLAUNCH            20
+#define EXIT_REASON_VMPTRLD             21
+#define EXIT_REASON_VMPTRST             22
+#define EXIT_REASON_VMREAD              23
+#define EXIT_REASON_VMRESUME            24
+#define EXIT_REASON_VMWRITE             25
+#define EXIT_REASON_VMOFF               26
+#define EXIT_REASON_VMON                27
+#define EXIT_REASON_CR_ACCESS           28
+#define EXIT_REASON_DR_ACCESS           29
+#define EXIT_REASON_IO_INSTRUCTION      30
+#define EXIT_REASON_MSR_READ            31
+#define EXIT_REASON_MSR_WRITE           32
+#define EXIT_REASON_INVALID_STATE       33
+#define EXIT_REASON_MWAIT_INSTRUCTION   36
+#define EXIT_REASON_MONITOR_INSTRUCTION 39
+#define EXIT_REASON_PAUSE_INSTRUCTION   40
+#define EXIT_REASON_MCE_DURING_VMENTRY  41
+#define EXIT_REASON_TPR_BELOW_THRESHOLD 43
+#define EXIT_REASON_APIC_ACCESS         44
+#define EXIT_REASON_EOI_INDUCED         45
+#define EXIT_REASON_EPT_VIOLATION       48
+#define EXIT_REASON_EPT_MISCONFIG       49
+#define EXIT_REASON_PREEMPTION_TIMER    52
+#define EXIT_REASON_WBINVD              54
+#define EXIT_REASON_XSETBV              55
+#define EXIT_REASON_APIC_WRITE          56
+#define EXIT_REASON_INVPCID             58
+
+#define VMX_EXIT_REASONS \
+       { EXIT_REASON_EXCEPTION_NMI,         "EXCEPTION_NMI" }, \
+       { EXIT_REASON_EXTERNAL_INTERRUPT,    "EXTERNAL_INTERRUPT" }, \
+       { EXIT_REASON_TRIPLE_FAULT,          "TRIPLE_FAULT" }, \
+       { EXIT_REASON_PENDING_INTERRUPT,     "PENDING_INTERRUPT" }, \
+       { EXIT_REASON_NMI_WINDOW,            "NMI_WINDOW" }, \
+       { EXIT_REASON_TASK_SWITCH,           "TASK_SWITCH" }, \
+       { EXIT_REASON_CPUID,                 "CPUID" }, \
+       { EXIT_REASON_HLT,                   "HLT" }, \
+       { EXIT_REASON_INVLPG,                "INVLPG" }, \
+       { EXIT_REASON_RDPMC,                 "RDPMC" }, \
+       { EXIT_REASON_RDTSC,                 "RDTSC" }, \
+       { EXIT_REASON_VMCALL,                "VMCALL" }, \
+       { EXIT_REASON_VMCLEAR,               "VMCLEAR" }, \
+       { EXIT_REASON_VMLAUNCH,              "VMLAUNCH" }, \
+       { EXIT_REASON_VMPTRLD,               "VMPTRLD" }, \
+       { EXIT_REASON_VMPTRST,               "VMPTRST" }, \
+       { EXIT_REASON_VMREAD,                "VMREAD" }, \
+       { EXIT_REASON_VMRESUME,              "VMRESUME" }, \
+       { EXIT_REASON_VMWRITE,               "VMWRITE" }, \
+       { EXIT_REASON_VMOFF,                 "VMOFF" }, \
+       { EXIT_REASON_VMON,                  "VMON" }, \
+       { EXIT_REASON_CR_ACCESS,             "CR_ACCESS" }, \
+       { EXIT_REASON_DR_ACCESS,             "DR_ACCESS" }, \
+       { EXIT_REASON_IO_INSTRUCTION,        "IO_INSTRUCTION" }, \
+       { EXIT_REASON_MSR_READ,              "MSR_READ" }, \
+       { EXIT_REASON_MSR_WRITE,             "MSR_WRITE" }, \
+       { EXIT_REASON_MWAIT_INSTRUCTION,     "MWAIT_INSTRUCTION" }, \
+       { EXIT_REASON_MONITOR_INSTRUCTION,   "MONITOR_INSTRUCTION" }, \
+       { EXIT_REASON_PAUSE_INSTRUCTION,     "PAUSE_INSTRUCTION" }, \
+       { EXIT_REASON_MCE_DURING_VMENTRY,    "MCE_DURING_VMENTRY" }, \
+       { EXIT_REASON_TPR_BELOW_THRESHOLD,   "TPR_BELOW_THRESHOLD" }, \
+       { EXIT_REASON_APIC_ACCESS,           "APIC_ACCESS" }, \
+       { EXIT_REASON_EPT_VIOLATION,         "EPT_VIOLATION" }, \
+       { EXIT_REASON_EPT_MISCONFIG,         "EPT_MISCONFIG" }, \
+       { EXIT_REASON_WBINVD,                "WBINVD" }, \
+       { EXIT_REASON_APIC_WRITE,            "APIC_WRITE" }, \
+       { EXIT_REASON_EOI_INDUCED,           "EOI_INDUCED" }, \
+       { EXIT_REASON_INVALID_STATE,         "INVALID_STATE" }, \
+       { EXIT_REASON_INVD,                  "INVD" }, \
+       { EXIT_REASON_INVPCID,               "INVPCID" }, \
+       { EXIT_REASON_PREEMPTION_TIMER,      "PREEMPTION_TIMER" }
+
+#endif /* VMX_H */
index b2c2da9..19baf8a 100644 (file)
@@ -101,14 +101,16 @@ struct acct_v3
 #define ACORE          0x08    /* ... dumped core */
 #define AXSIG          0x10    /* ... was killed by a signal */
 
-#ifdef __BIG_ENDIAN
+#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN)
 #define ACCT_BYTEORDER 0x80    /* accounting file is big endian */
-#else
+#elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN)
 #define ACCT_BYTEORDER 0x00    /* accounting file is little endian */
+#else
+#error unspecified endianness
 #endif
 
 #define ACCT_VERSION   2
 #define AHZ            (HZ)
 
 
-#endif /* _LINUX_ACCT_H */
+#endif /* _LINUX_ACCT_H */
index fc9a5a1..4f506dc 100644 (file)
@@ -41,4 +41,4 @@ struct adfs_discrecord {
 #define ADFS_DR_SIZE_BITS      (ADFS_DR_SIZE << 3)
 
 
-#endif
+#endif /* _ADFS_FS_H */
index c3f95de..126eb8a 100644 (file)
@@ -25,7 +25,7 @@
  */
 
 #ifndef _AGP_H
-#define _AGP_H 1
+#define _AGP_H
 
 #define AGPIOC_BASE       'A'
 #define AGPIOC_INFO       _IOR (AGPIOC_BASE, 0, struct agp_info*)
@@ -108,4 +108,4 @@ typedef struct _agp_unbind {
 } agp_unbind;
 
 
-#endif                         /* _AGP_H */
+#endif /* _AGP_H */
index 86fa7a7..bb2554f 100644 (file)
@@ -62,9 +62,9 @@ struct io_event {
        __s64           res2;           /* secondary result */
 };
 
-#if defined(__LITTLE_ENDIAN)
+#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN)
 #define PADDED(x,y)    x, y
-#elif defined(__BIG_ENDIAN)
+#elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN)
 #define PADDED(x,y)    y, x
 #else
 #error edit for your odd byteorder.
index dee19a2..e6e4319 100644 (file)
@@ -1,6 +1,3 @@
-#ifndef _LINUX_APM_H
-#define _LINUX_APM_H
-
 /*
  * Include file for the interface to an APM BIOS
  * Copyright 1994-2001 Stephen Rothwell (sfr@canb.auug.org.au)
@@ -15,6 +12,9 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  */
+#ifndef _LINUX_APM_H
+#define _LINUX_APM_H
+
 
 #include <linux/types.h>
 
@@ -132,4 +132,4 @@ struct apm_bios_info {
 #define APM_IOC_STANDBY                _IO('A', 1)
 #define APM_IOC_SUSPEND                _IO('A', 2)
 
-#endif /* LINUX_APM_H */
+#endif /* _LINUX_APM_H */
index 5e1c36d..08e27be 100644 (file)
@@ -238,4 +238,4 @@ struct atmif_sioc {
 
 
 typedef unsigned short atm_backend_t;
-#endif
+#endif /* _LINUX_ATM_H */
index 952e6ab..f3aa76a 100644 (file)
@@ -58,4 +58,4 @@ struct atmtcp_control {
 
 
 
-#endif
+#endif /* LINUX_ATM_TCP_H */
index 3351a4b..8faa8b9 100644 (file)
@@ -212,4 +212,4 @@ struct atm_cirange {
 
 
 
-#endif
+#endif /* LINUX_ATMDEV_H */
index 39c917f..302791e 100644 (file)
 /* Maximum number of LEC interfaces (tweakable) */
 #define MAX_LEC_ITF 48
 
-/*
- * From the total of MAX_LEC_ITF, last NUM_TR_DEVS are reserved for Token Ring.
- * E.g. if MAX_LEC_ITF = 48 and NUM_TR_DEVS = 8, then lec0-lec39 are for
- * Ethernet ELANs and lec40-lec47 are for Token Ring ELANS.
- */
-#define NUM_TR_DEVS 8
-
 typedef enum {
        l_set_mac_addr,
        l_del_mac_addr,
index f79a1ca..12c9b2f 100644 (file)
@@ -26,7 +26,6 @@
 
 #include <linux/types.h>
 #include <linux/elf-em.h>
-#include <linux/ptrace.h>
 
 /* The netlink messages for the audit system is divided into blocks:
  * 1000 - 1099 are for commanding the audit system
 #define AUDIT_MMAP             1323    /* Record showing descriptor and flags in mmap */
 #define AUDIT_NETFILTER_PKT    1324    /* Packets traversing netfilter chains */
 #define AUDIT_NETFILTER_CFG    1325    /* Netfilter chain modifications */
+#define AUDIT_SECCOMP          1326    /* Secure Computing event */
 
 #define AUDIT_AVC              1400    /* SE Linux avc denial or grant */
 #define AUDIT_SELINUX_ERR      1401    /* Internal SE Linux Errors */
 #define AUDIT_LAST_KERN_ANOM_MSG    1799
 #define AUDIT_ANOM_PROMISCUOUS      1700 /* Device changed promiscuous mode */
 #define AUDIT_ANOM_ABEND            1701 /* Process ended abnormally */
+#define AUDIT_ANOM_LINK                    1702 /* Suspicious use of file links */
 #define AUDIT_INTEGRITY_DATA       1800 /* Data integrity verification */
 #define AUDIT_INTEGRITY_METADATA    1801 /* Metadata integrity verification */
 #define AUDIT_INTEGRITY_STATUS     1802 /* Integrity enable status */
 #define AUDIT_OBJ_TYPE 21
 #define AUDIT_OBJ_LEV_LOW      22
 #define AUDIT_OBJ_LEV_HIGH     23
+#define AUDIT_LOGINUID_SET     24
 
                                /* These are ONLY useful when checking
                                 * at syscall exit time (AUDIT_AT_EXIT). */
@@ -336,6 +338,7 @@ enum {
 #define AUDIT_ARCH_MIPSEL      (EM_MIPS|__AUDIT_ARCH_LE)
 #define AUDIT_ARCH_MIPS64      (EM_MIPS|__AUDIT_ARCH_64BIT)
 #define AUDIT_ARCH_MIPSEL64    (EM_MIPS|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
+#define AUDIT_ARCH_OPENRISC    (EM_OPENRISC)
 #define AUDIT_ARCH_PARISC      (EM_PARISC)
 #define AUDIT_ARCH_PARISC64    (EM_PARISC|__AUDIT_ARCH_64BIT)
 #define AUDIT_ARCH_PPC         (EM_PPC)
@@ -367,7 +370,8 @@ struct audit_status {
 };
 
 struct audit_tty_status {
-       __u32           enabled; /* 1 = enabled, 0 = disabled */
+       __u32           enabled;        /* 1 = enabled, 0 = disabled */
+       __u32           log_passwd;     /* 1 = enabled, 0 = disabled */
 };
 
 /* audit_rule_data supports filter rules with both integer and string
@@ -399,4 +403,4 @@ struct audit_rule {         /* for AUDIT_LIST, AUDIT_ADD, and AUDIT_DEL */
        __u32           values[AUDIT_MAX_FIELDS];
 };
 
-#endif
+#endif /* _LINUX_AUDIT_H_ */
index 0df86e5..556e409 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/types.h>
 #include <sys/ioctl.h>
 
+
 /* This file describes autofs v3 */
 #define AUTOFS_PROTO_VERSION   3
 
 #define AUTOFS_MIN_PROTO_VERSION       AUTOFS_PROTO_VERSION
 
 /*
- * Architectures where both 32- and 64-bit binaries can be executed
- * on 64-bit kernels need this.  This keeps the structure format
- * uniform, and makes sure the wait_queue_token isn't too big to be
- * passed back down to the kernel.
- *
- * This assumes that on these architectures:
- * mode     32 bit    64 bit
- * -------------------------
- * int      32 bit    32 bit
- * long     32 bit    64 bit
- *
- * If so, 32-bit user-space code should be backwards compatible.
+ * The wait_queue_token (autofs_wqt_t) is part of a structure which is passed
+ * back to the kernel via ioctl from userspace. On architectures where 32- and
+ * 64-bit userspace binaries can be executed it's important that the size of
+ * autofs_wqt_t stays constant between 32- and 64-bit Linux kernels so that we
+ * do not break the binary ABI interface by changing the structure size.
  */
-
-#if defined(__sparc__) || defined(__mips__) || defined(__x86_64__) \
- || defined(__powerpc__) || defined(__s390__)
-typedef unsigned int autofs_wqt_t;
-#else
+#if defined(__ia64__) || defined(__alpha__) /* pure 64bit architectures */
 typedef unsigned long autofs_wqt_t;
+#else
+typedef unsigned int autofs_wqt_t;
 #endif
 
 /* Packet types */
index b6d13cf..4bad588 100644 (file)
@@ -28,6 +28,7 @@
 #define AT_BASE_PLATFORM 24    /* string identifying real platform, may
                                 * differ from AT_PLATFORM. */
 #define AT_RANDOM 25   /* address of 16 random bytes */
+#define AT_HWCAP2 26   /* extension of AT_HWCAP */
 
 #define AT_EXECFN  31  /* filename of program */
 
diff --git a/usr/include/linux/blk_types.h b/usr/include/linux/blk_types.h
deleted file mode 100644 (file)
index 367d1ba..0000000
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Block data types and constants.  Directly include this file only to
- * break include dependency loop.
- */
-#ifndef __LINUX_BLK_TYPES_H
-#define __LINUX_BLK_TYPES_H
-
-#ifdef CONFIG_BLOCK
-
-#include <linux/types.h>
-
-struct bio_set;
-struct bio;
-struct bio_integrity_payload;
-struct page;
-struct block_device;
-typedef void (bio_end_io_t) (struct bio *, int);
-typedef void (bio_destructor_t) (struct bio *);
-
-/*
- * was unsigned short, but we might as well be ready for > 64kB I/O pages
- */
-struct bio_vec {
-       struct page     *bv_page;
-       unsigned int    bv_len;
-       unsigned int    bv_offset;
-};
-
-/*
- * main unit of I/O for the block layer and lower layers (ie drivers and
- * stacking drivers)
- */
-struct bio {
-       sector_t                bi_sector;      /* device address in 512 byte
-                                                  sectors */
-       struct bio              *bi_next;       /* request queue link */
-       struct block_device     *bi_bdev;
-       unsigned long           bi_flags;       /* status, command, etc */
-       unsigned long           bi_rw;          /* bottom bits READ/WRITE,
-                                                * top bits priority
-                                                */
-
-       unsigned short          bi_vcnt;        /* how many bio_vec's */
-       unsigned short          bi_idx;         /* current index into bvl_vec */
-
-       /* Number of segments in this BIO after
-        * physical address coalescing is performed.
-        */
-       unsigned int            bi_phys_segments;
-
-       unsigned int            bi_size;        /* residual I/O count */
-
-       /*
-        * To keep track of the max segment size, we account for the
-        * sizes of the first and last mergeable segments in this bio.
-        */
-       unsigned int            bi_seg_front_size;
-       unsigned int            bi_seg_back_size;
-
-       unsigned int            bi_max_vecs;    /* max bvl_vecs we can hold */
-
-       atomic_t                bi_cnt;         /* pin count */
-
-       struct bio_vec          *bi_io_vec;     /* the actual vec list */
-
-       bio_end_io_t            *bi_end_io;
-
-       void                    *bi_private;
-#if defined(CONFIG_BLK_DEV_INTEGRITY)
-       struct bio_integrity_payload *bi_integrity;  /* data integrity */
-#endif
-
-       bio_destructor_t        *bi_destructor; /* destructor */
-
-       /*
-        * We can __inline__ a number of vecs at the end of the bio, to avoid
-        * double allocations for a small number of bio_vecs. This member
-        * MUST obviously be kept at the very end of the bio.
-        */
-       struct bio_vec          bi_inline_vecs[0];
-};
-
-/*
- * bio flags
- */
-#define BIO_UPTODATE   0       /* ok after I/O completion */
-#define BIO_RW_BLOCK   1       /* RW_AHEAD set, and read/write would block */
-#define BIO_EOF                2       /* out-out-bounds error */
-#define BIO_SEG_VALID  3       /* bi_phys_segments valid */
-#define BIO_CLONED     4       /* doesn't own data */
-#define BIO_BOUNCED    5       /* bio is a bounce bio */
-#define BIO_USER_MAPPED 6      /* contains user pages */
-#define BIO_EOPNOTSUPP 7       /* not supported */
-#define BIO_NULL_MAPPED 8      /* contains invalid user pages */
-#define BIO_FS_INTEGRITY 9     /* fs owns integrity data, not block layer */
-#define BIO_QUIET      10      /* Make BIO Quiet */
-#define BIO_MAPPED_INTEGRITY 11/* integrity metadata has been remapped */
-#define bio_flagged(bio, flag) ((bio)->bi_flags & (1 << (flag)))
-
-/*
- * top 4 bits of bio flags indicate the pool this bio came from
- */
-#define BIO_POOL_BITS          (4)
-#define BIO_POOL_NONE          ((1UL << BIO_POOL_BITS) - 1)
-#define BIO_POOL_OFFSET                (BITS_PER_LONG - BIO_POOL_BITS)
-#define BIO_POOL_MASK          (1UL << BIO_POOL_OFFSET)
-#define BIO_POOL_IDX(bio)      ((bio)->bi_flags >> BIO_POOL_OFFSET)
-
-#endif /* CONFIG_BLOCK */
-
-/*
- * Request flags.  For use in the cmd_flags field of struct request, and in
- * bi_rw of struct bio.  Note that some flags are only valid in either one.
- */
-enum rq_flag_bits {
-       /* common flags */
-       __REQ_WRITE,            /* not set, read. set, write */
-       __REQ_FAILFAST_DEV,     /* no driver retries of device errors */
-       __REQ_FAILFAST_TRANSPORT, /* no driver retries of transport errors */
-       __REQ_FAILFAST_DRIVER,  /* no driver retries of driver errors */
-
-       __REQ_SYNC,             /* request is sync (sync write or read) */
-       __REQ_META,             /* metadata io request */
-       __REQ_PRIO,             /* boost priority in cfq */
-       __REQ_DISCARD,          /* request to discard sectors */
-       __REQ_SECURE,           /* secure discard (used with __REQ_DISCARD) */
-
-       __REQ_NOIDLE,           /* don't anticipate more IO after this one */
-       __REQ_FUA,              /* forced unit access */
-       __REQ_FLUSH,            /* request for cache flush */
-
-       /* bio only flags */
-       __REQ_RAHEAD,           /* read ahead, can fail anytime */
-       __REQ_THROTTLED,        /* This bio has already been subjected to
-                                * throttling rules. Don't do it again. */
-
-       /* request only flags */
-       __REQ_SORTED,           /* elevator knows about this request */
-       __REQ_SOFTBARRIER,      /* may not be passed by ioscheduler */
-       __REQ_NOMERGE,          /* don't touch this for merging */
-       __REQ_STARTED,          /* drive already may have started this one */
-       __REQ_DONTPREP,         /* don't call prep for this one */
-       __REQ_QUEUED,           /* uses queueing */
-       __REQ_ELVPRIV,          /* elevator private data attached */
-       __REQ_FAILED,           /* set if the request failed */
-       __REQ_QUIET,            /* don't worry about errors */
-       __REQ_PREEMPT,          /* set for "ide_preempt" requests */
-       __REQ_ALLOCED,          /* request came from our alloc pool */
-       __REQ_COPY_USER,        /* contains copies of user pages */
-       __REQ_FLUSH_SEQ,        /* request for flush sequence */
-       __REQ_IO_STAT,          /* account I/O stat */
-       __REQ_MIXED_MERGE,      /* merge of different types, fail separately */
-       __REQ_NR_BITS,          /* stops here */
-};
-
-#define REQ_WRITE              (1 << __REQ_WRITE)
-#define REQ_FAILFAST_DEV       (1 << __REQ_FAILFAST_DEV)
-#define REQ_FAILFAST_TRANSPORT (1 << __REQ_FAILFAST_TRANSPORT)
-#define REQ_FAILFAST_DRIVER    (1 << __REQ_FAILFAST_DRIVER)
-#define REQ_SYNC               (1 << __REQ_SYNC)
-#define REQ_META               (1 << __REQ_META)
-#define REQ_PRIO               (1 << __REQ_PRIO)
-#define REQ_DISCARD            (1 << __REQ_DISCARD)
-#define REQ_NOIDLE             (1 << __REQ_NOIDLE)
-
-#define REQ_FAILFAST_MASK \
-       (REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | REQ_FAILFAST_DRIVER)
-#define REQ_COMMON_MASK \
-       (REQ_WRITE | REQ_FAILFAST_MASK | REQ_SYNC | REQ_META | REQ_PRIO | \
-        REQ_DISCARD | REQ_NOIDLE | REQ_FLUSH | REQ_FUA | REQ_SECURE)
-#define REQ_CLONE_MASK         REQ_COMMON_MASK
-
-#define REQ_RAHEAD             (1 << __REQ_RAHEAD)
-#define REQ_THROTTLED          (1 << __REQ_THROTTLED)
-
-#define REQ_SORTED             (1 << __REQ_SORTED)
-#define REQ_SOFTBARRIER                (1 << __REQ_SOFTBARRIER)
-#define REQ_FUA                        (1 << __REQ_FUA)
-#define REQ_NOMERGE            (1 << __REQ_NOMERGE)
-#define REQ_STARTED            (1 << __REQ_STARTED)
-#define REQ_DONTPREP           (1 << __REQ_DONTPREP)
-#define REQ_QUEUED             (1 << __REQ_QUEUED)
-#define REQ_ELVPRIV            (1 << __REQ_ELVPRIV)
-#define REQ_FAILED             (1 << __REQ_FAILED)
-#define REQ_QUIET              (1 << __REQ_QUIET)
-#define REQ_PREEMPT            (1 << __REQ_PREEMPT)
-#define REQ_ALLOCED            (1 << __REQ_ALLOCED)
-#define REQ_COPY_USER          (1 << __REQ_COPY_USER)
-#define REQ_FLUSH              (1 << __REQ_FLUSH)
-#define REQ_FLUSH_SEQ          (1 << __REQ_FLUSH_SEQ)
-#define REQ_IO_STAT            (1 << __REQ_IO_STAT)
-#define REQ_MIXED_MERGE                (1 << __REQ_MIXED_MERGE)
-#define REQ_SECURE             (1 << __REQ_SECURE)
-
-#endif /* __LINUX_BLK_TYPES_H */
index c52dd4b..1b6074e 100644 (file)
@@ -40,6 +40,7 @@ struct blkpg_ioctl_arg {
 /* The subfunctions (for the op field) */
 #define BLKPG_ADD_PARTITION    1
 #define BLKPG_DEL_PARTITION    2
+#define BLKPG_RESIZE_PARTITION 3
 
 /* Sizes of name fields. Unused at present. */
 #define BLKPG_DEVNAMELTH       64
index 9bd20eb..8d00071 100644 (file)
@@ -139,4 +139,4 @@ struct blk_user_trace_setup {
        __u32 pid;
 };
 
-#endif
+#endif /* BLKTRACE_H */
index 7612d5c..3eff40e 100644 (file)
@@ -62,4 +62,4 @@ struct sg_io_v4 {
 };
 
 
-#endif
+#endif /* BSG_H */
diff --git a/usr/include/linux/btrfs.h b/usr/include/linux/btrfs.h
new file mode 100644 (file)
index 0000000..e93eccb
--- /dev/null
@@ -0,0 +1,542 @@
+/*
+ * Copyright (C) 2007 Oracle.  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 v2 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., 59 Temple Place - Suite 330,
+ * Boston, MA 021110-1307, USA.
+ */
+
+#ifndef _LINUX_BTRFS_H
+#define _LINUX_BTRFS_H
+#include <linux/types.h>
+#include <linux/ioctl.h>
+
+#define BTRFS_IOCTL_MAGIC 0x94
+#define BTRFS_VOL_NAME_MAX 255
+
+/* this should be 4k */
+#define BTRFS_PATH_NAME_MAX 4087
+struct btrfs_ioctl_vol_args {
+       __s64 fd;
+       char name[BTRFS_PATH_NAME_MAX + 1];
+};
+
+#define BTRFS_DEVICE_PATH_NAME_MAX 1024
+
+#define BTRFS_SUBVOL_CREATE_ASYNC      (1ULL << 0)
+#define BTRFS_SUBVOL_RDONLY            (1ULL << 1)
+#define BTRFS_SUBVOL_QGROUP_INHERIT    (1ULL << 2)
+#define BTRFS_FSID_SIZE 16
+#define BTRFS_UUID_SIZE 16
+
+#define BTRFS_QGROUP_INHERIT_SET_LIMITS        (1ULL << 0)
+
+struct btrfs_qgroup_limit {
+       __u64   flags;
+       __u64   max_rfer;
+       __u64   max_excl;
+       __u64   rsv_rfer;
+       __u64   rsv_excl;
+};
+
+struct btrfs_qgroup_inherit {
+       __u64   flags;
+       __u64   num_qgroups;
+       __u64   num_ref_copies;
+       __u64   num_excl_copies;
+       struct btrfs_qgroup_limit lim;
+       __u64   qgroups[0];
+};
+
+struct btrfs_ioctl_qgroup_limit_args {
+       __u64   qgroupid;
+       struct btrfs_qgroup_limit lim;
+};
+
+#define BTRFS_SUBVOL_NAME_MAX 4039
+struct btrfs_ioctl_vol_args_v2 {
+       __s64 fd;
+       __u64 transid;
+       __u64 flags;
+       union {
+               struct {
+                       __u64 size;
+                       struct btrfs_qgroup_inherit *qgroup_inherit;
+               };
+               __u64 unused[4];
+       };
+       char name[BTRFS_SUBVOL_NAME_MAX + 1];
+};
+
+/*
+ * structure to report errors and progress to userspace, either as a
+ * result of a finished scrub, a canceled scrub or a progress inquiry
+ */
+struct btrfs_scrub_progress {
+       __u64 data_extents_scrubbed;    /* # of data extents scrubbed */
+       __u64 tree_extents_scrubbed;    /* # of tree extents scrubbed */
+       __u64 data_bytes_scrubbed;      /* # of data bytes scrubbed */
+       __u64 tree_bytes_scrubbed;      /* # of tree bytes scrubbed */
+       __u64 read_errors;              /* # of read errors encountered (EIO) */
+       __u64 csum_errors;              /* # of failed csum checks */
+       __u64 verify_errors;            /* # of occurences, where the metadata
+                                        * of a tree block did not match the
+                                        * expected values, like generation or
+                                        * logical */
+       __u64 no_csum;                  /* # of 4k data block for which no csum
+                                        * is present, probably the result of
+                                        * data written with nodatasum */
+       __u64 csum_discards;            /* # of csum for which no data was found
+                                        * in the extent tree. */
+       __u64 super_errors;             /* # of bad super blocks encountered */
+       __u64 malloc_errors;            /* # of internal kmalloc errors. These
+                                        * will likely cause an incomplete
+                                        * scrub */
+       __u64 uncorrectable_errors;     /* # of errors where either no intact
+                                        * copy was found or the writeback
+                                        * failed */
+       __u64 corrected_errors;         /* # of errors corrected */
+       __u64 last_physical;            /* last physical address scrubbed. In
+                                        * case a scrub was aborted, this can
+                                        * be used to restart the scrub */
+       __u64 unverified_errors;        /* # of occurences where a read for a
+                                        * full (64k) bio failed, but the re-
+                                        * check succeeded for each 4k piece.
+                                        * Intermittent error. */
+};
+
+#define BTRFS_SCRUB_READONLY   1
+struct btrfs_ioctl_scrub_args {
+       __u64 devid;                            /* in */
+       __u64 start;                            /* in */
+       __u64 end;                              /* in */
+       __u64 flags;                            /* in */
+       struct btrfs_scrub_progress progress;   /* out */
+       /* pad to 1k */
+       __u64 unused[(1024-32-sizeof(struct btrfs_scrub_progress))/8];
+};
+
+#define BTRFS_IOCTL_DEV_REPLACE_CONT_READING_FROM_SRCDEV_MODE_ALWAYS   0
+#define BTRFS_IOCTL_DEV_REPLACE_CONT_READING_FROM_SRCDEV_MODE_AVOID    1
+struct btrfs_ioctl_dev_replace_start_params {
+       __u64 srcdevid; /* in, if 0, use srcdev_name instead */
+       __u64 cont_reading_from_srcdev_mode;    /* in, see #define
+                                                * above */
+       __u8 srcdev_name[BTRFS_DEVICE_PATH_NAME_MAX + 1];       /* in */
+       __u8 tgtdev_name[BTRFS_DEVICE_PATH_NAME_MAX + 1];       /* in */
+};
+
+#define BTRFS_IOCTL_DEV_REPLACE_STATE_NEVER_STARTED    0
+#define BTRFS_IOCTL_DEV_REPLACE_STATE_STARTED          1
+#define BTRFS_IOCTL_DEV_REPLACE_STATE_FINISHED         2
+#define BTRFS_IOCTL_DEV_REPLACE_STATE_CANCELED         3
+#define BTRFS_IOCTL_DEV_REPLACE_STATE_SUSPENDED                4
+struct btrfs_ioctl_dev_replace_status_params {
+       __u64 replace_state;    /* out, see #define above */
+       __u64 progress_1000;    /* out, 0 <= x <= 1000 */
+       __u64 time_started;     /* out, seconds since 1-Jan-1970 */
+       __u64 time_stopped;     /* out, seconds since 1-Jan-1970 */
+       __u64 num_write_errors; /* out */
+       __u64 num_uncorrectable_read_errors;    /* out */
+};
+
+#define BTRFS_IOCTL_DEV_REPLACE_CMD_START                      0
+#define BTRFS_IOCTL_DEV_REPLACE_CMD_STATUS                     1
+#define BTRFS_IOCTL_DEV_REPLACE_CMD_CANCEL                     2
+#define BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_ERROR                        0
+#define BTRFS_IOCTL_DEV_REPLACE_RESULT_NOT_STARTED             1
+#define BTRFS_IOCTL_DEV_REPLACE_RESULT_ALREADY_STARTED         2
+struct btrfs_ioctl_dev_replace_args {
+       __u64 cmd;      /* in */
+       __u64 result;   /* out */
+
+       union {
+               struct btrfs_ioctl_dev_replace_start_params start;
+               struct btrfs_ioctl_dev_replace_status_params status;
+       };      /* in/out */
+
+       __u64 spare[64];
+};
+
+struct btrfs_ioctl_dev_info_args {
+       __u64 devid;                            /* in/out */
+       __u8 uuid[BTRFS_UUID_SIZE];             /* in/out */
+       __u64 bytes_used;                       /* out */
+       __u64 total_bytes;                      /* out */
+       __u64 unused[379];                      /* pad to 4k */
+       __u8 path[BTRFS_DEVICE_PATH_NAME_MAX];  /* out */
+};
+
+struct btrfs_ioctl_fs_info_args {
+       __u64 max_id;                           /* out */
+       __u64 num_devices;                      /* out */
+       __u8 fsid[BTRFS_FSID_SIZE];             /* out */
+       __u64 reserved[124];                    /* pad to 1k */
+};
+
+/* balance control ioctl modes */
+#define BTRFS_BALANCE_CTL_PAUSE                1
+#define BTRFS_BALANCE_CTL_CANCEL       2
+
+/*
+ * this is packed, because it should be exactly the same as its disk
+ * byte order counterpart (struct btrfs_disk_balance_args)
+ */
+struct btrfs_balance_args {
+       __u64 profiles;
+       __u64 usage;
+       __u64 devid;
+       __u64 pstart;
+       __u64 pend;
+       __u64 vstart;
+       __u64 vend;
+
+       __u64 target;
+
+       __u64 flags;
+
+       __u64 unused[8];
+} __attribute__ ((__packed__));
+
+/* report balance progress to userspace */
+struct btrfs_balance_progress {
+       __u64 expected;         /* estimated # of chunks that will be
+                                * relocated to fulfill the request */
+       __u64 considered;       /* # of chunks we have considered so far */
+       __u64 completed;        /* # of chunks relocated so far */
+};
+
+#define BTRFS_BALANCE_STATE_RUNNING    (1ULL << 0)
+#define BTRFS_BALANCE_STATE_PAUSE_REQ  (1ULL << 1)
+#define BTRFS_BALANCE_STATE_CANCEL_REQ (1ULL << 2)
+
+struct btrfs_ioctl_balance_args {
+       __u64 flags;                            /* in/out */
+       __u64 state;                            /* out */
+
+       struct btrfs_balance_args data;         /* in/out */
+       struct btrfs_balance_args meta;         /* in/out */
+       struct btrfs_balance_args sys;          /* in/out */
+
+       struct btrfs_balance_progress stat;     /* out */
+
+       __u64 unused[72];                       /* pad to 1k */
+};
+
+#define BTRFS_INO_LOOKUP_PATH_MAX 4080
+struct btrfs_ioctl_ino_lookup_args {
+       __u64 treeid;
+       __u64 objectid;
+       char name[BTRFS_INO_LOOKUP_PATH_MAX];
+};
+
+struct btrfs_ioctl_search_key {
+       /* which root are we searching.  0 is the tree of tree roots */
+       __u64 tree_id;
+
+       /* keys returned will be >= min and <= max */
+       __u64 min_objectid;
+       __u64 max_objectid;
+
+       /* keys returned will be >= min and <= max */
+       __u64 min_offset;
+       __u64 max_offset;
+
+       /* max and min transids to search for */
+       __u64 min_transid;
+       __u64 max_transid;
+
+       /* keys returned will be >= min and <= max */
+       __u32 min_type;
+       __u32 max_type;
+
+       /*
+        * how many items did userland ask for, and how many are we
+        * returning
+        */
+       __u32 nr_items;
+
+       /* align to 64 bits */
+       __u32 unused;
+
+       /* some extra for later */
+       __u64 unused1;
+       __u64 unused2;
+       __u64 unused3;
+       __u64 unused4;
+};
+
+struct btrfs_ioctl_search_header {
+       __u64 transid;
+       __u64 objectid;
+       __u64 offset;
+       __u32 type;
+       __u32 len;
+};
+
+#define BTRFS_SEARCH_ARGS_BUFSIZE (4096 - sizeof(struct btrfs_ioctl_search_key))
+/*
+ * the buf is an array of search headers where
+ * each header is followed by the actual item
+ * the type field is expanded to 32 bits for alignment
+ */
+struct btrfs_ioctl_search_args {
+       struct btrfs_ioctl_search_key key;
+       char buf[BTRFS_SEARCH_ARGS_BUFSIZE];
+};
+
+struct btrfs_ioctl_clone_range_args {
+  __s64 src_fd;
+  __u64 src_offset, src_length;
+  __u64 dest_offset;
+};
+
+/* flags for the defrag range ioctl */
+#define BTRFS_DEFRAG_RANGE_COMPRESS 1
+#define BTRFS_DEFRAG_RANGE_START_IO 2
+
+struct btrfs_ioctl_space_info {
+       __u64 flags;
+       __u64 total_bytes;
+       __u64 used_bytes;
+};
+
+struct btrfs_ioctl_space_args {
+       __u64 space_slots;
+       __u64 total_spaces;
+       struct btrfs_ioctl_space_info spaces[0];
+};
+
+struct btrfs_data_container {
+       __u32   bytes_left;     /* out -- bytes not needed to deliver output */
+       __u32   bytes_missing;  /* out -- additional bytes needed for result */
+       __u32   elem_cnt;       /* out */
+       __u32   elem_missed;    /* out */
+       __u64   val[0];         /* out */
+};
+
+struct btrfs_ioctl_ino_path_args {
+       __u64                           inum;           /* in */
+       __u64                           size;           /* in */
+       __u64                           reserved[4];
+       /* struct btrfs_data_container  *fspath;           out */
+       __u64                           fspath;         /* out */
+};
+
+struct btrfs_ioctl_logical_ino_args {
+       __u64                           logical;        /* in */
+       __u64                           size;           /* in */
+       __u64                           reserved[4];
+       /* struct btrfs_data_container  *inodes;        out   */
+       __u64                           inodes;
+};
+
+enum btrfs_dev_stat_values {
+       /* disk I/O failure stats */
+       BTRFS_DEV_STAT_WRITE_ERRS, /* EIO or EREMOTEIO from lower layers */
+       BTRFS_DEV_STAT_READ_ERRS, /* EIO or EREMOTEIO from lower layers */
+       BTRFS_DEV_STAT_FLUSH_ERRS, /* EIO or EREMOTEIO from lower layers */
+
+       /* stats for indirect indications for I/O failures */
+       BTRFS_DEV_STAT_CORRUPTION_ERRS, /* checksum error, bytenr error or
+                                        * contents is illegal: this is an
+                                        * indication that the block was damaged
+                                        * during read or write, or written to
+                                        * wrong location or read from wrong
+                                        * location */
+       BTRFS_DEV_STAT_GENERATION_ERRS, /* an indication that blocks have not
+                                        * been written */
+
+       BTRFS_DEV_STAT_VALUES_MAX
+};
+
+/* Reset statistics after reading; needs SYS_ADMIN capability */
+#define        BTRFS_DEV_STATS_RESET           (1ULL << 0)
+
+struct btrfs_ioctl_get_dev_stats {
+       __u64 devid;                            /* in */
+       __u64 nr_items;                         /* in/out */
+       __u64 flags;                            /* in/out */
+
+       /* out values: */
+       __u64 values[BTRFS_DEV_STAT_VALUES_MAX];
+
+       __u64 unused[128 - 2 - BTRFS_DEV_STAT_VALUES_MAX]; /* pad to 1k */
+};
+
+#define BTRFS_QUOTA_CTL_ENABLE 1
+#define BTRFS_QUOTA_CTL_DISABLE        2
+#define BTRFS_QUOTA_CTL_RESCAN__NOTUSED        3
+struct btrfs_ioctl_quota_ctl_args {
+       __u64 cmd;
+       __u64 status;
+};
+
+struct btrfs_ioctl_quota_rescan_args {
+       __u64   flags;
+       __u64   progress;
+       __u64   reserved[6];
+};
+
+struct btrfs_ioctl_qgroup_assign_args {
+       __u64 assign;
+       __u64 src;
+       __u64 dst;
+};
+
+struct btrfs_ioctl_qgroup_create_args {
+       __u64 create;
+       __u64 qgroupid;
+};
+struct btrfs_ioctl_timespec {
+       __u64 sec;
+       __u32 nsec;
+};
+
+struct btrfs_ioctl_received_subvol_args {
+       char    uuid[BTRFS_UUID_SIZE];  /* in */
+       __u64   stransid;               /* in */
+       __u64   rtransid;               /* out */
+       struct btrfs_ioctl_timespec stime; /* in */
+       struct btrfs_ioctl_timespec rtime; /* out */
+       __u64   flags;                  /* in */
+       __u64   reserved[16];           /* in */
+};
+
+/*
+ * Caller doesn't want file data in the send stream, even if the
+ * search of clone sources doesn't find an extent. UPDATE_EXTENT
+ * commands will be sent instead of WRITE commands.
+ */
+#define BTRFS_SEND_FLAG_NO_FILE_DATA           0x1
+
+/*
+ * Do not add the leading stream header. Used when multiple snapshots
+ * are sent back to back.
+ */
+#define BTRFS_SEND_FLAG_OMIT_STREAM_HEADER     0x2
+
+/*
+ * Omit the command at the end of the stream that indicated the end
+ * of the stream. This option is used when multiple snapshots are
+ * sent back to back.
+ */
+#define BTRFS_SEND_FLAG_OMIT_END_CMD           0x4
+
+#define BTRFS_SEND_FLAG_MASK \
+       (BTRFS_SEND_FLAG_NO_FILE_DATA | \
+        BTRFS_SEND_FLAG_OMIT_STREAM_HEADER | \
+        BTRFS_SEND_FLAG_OMIT_END_CMD)
+
+struct btrfs_ioctl_send_args {
+       __s64 send_fd;                  /* in */
+       __u64 clone_sources_count;      /* in */
+       __u64 *clone_sources;   /* in */
+       __u64 parent_root;              /* in */
+       __u64 flags;                    /* in */
+       __u64 reserved[4];              /* in */
+};
+
+#define BTRFS_IOC_SNAP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 1, \
+                                  struct btrfs_ioctl_vol_args)
+#define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, \
+                                  struct btrfs_ioctl_vol_args)
+#define BTRFS_IOC_RESIZE _IOW(BTRFS_IOCTL_MAGIC, 3, \
+                                  struct btrfs_ioctl_vol_args)
+#define BTRFS_IOC_SCAN_DEV _IOW(BTRFS_IOCTL_MAGIC, 4, \
+                                  struct btrfs_ioctl_vol_args)
+/* trans start and trans end are dangerous, and only for
+ * use by applications that know how to avoid the
+ * resulting deadlocks
+ */
+#define BTRFS_IOC_TRANS_START  _IO(BTRFS_IOCTL_MAGIC, 6)
+#define BTRFS_IOC_TRANS_END    _IO(BTRFS_IOCTL_MAGIC, 7)
+#define BTRFS_IOC_SYNC         _IO(BTRFS_IOCTL_MAGIC, 8)
+
+#define BTRFS_IOC_CLONE        _IOW(BTRFS_IOCTL_MAGIC, 9, int)
+#define BTRFS_IOC_ADD_DEV _IOW(BTRFS_IOCTL_MAGIC, 10, \
+                                  struct btrfs_ioctl_vol_args)
+#define BTRFS_IOC_RM_DEV _IOW(BTRFS_IOCTL_MAGIC, 11, \
+                                  struct btrfs_ioctl_vol_args)
+#define BTRFS_IOC_BALANCE _IOW(BTRFS_IOCTL_MAGIC, 12, \
+                                  struct btrfs_ioctl_vol_args)
+
+#define BTRFS_IOC_CLONE_RANGE _IOW(BTRFS_IOCTL_MAGIC, 13, \
+                                 struct btrfs_ioctl_clone_range_args)
+
+#define BTRFS_IOC_SUBVOL_CREATE _IOW(BTRFS_IOCTL_MAGIC, 14, \
+                                  struct btrfs_ioctl_vol_args)
+#define BTRFS_IOC_SNAP_DESTROY _IOW(BTRFS_IOCTL_MAGIC, 15, \
+                               struct btrfs_ioctl_vol_args)
+#define BTRFS_IOC_DEFRAG_RANGE _IOW(BTRFS_IOCTL_MAGIC, 16, \
+                               struct btrfs_ioctl_defrag_range_args)
+#define BTRFS_IOC_TREE_SEARCH _IOWR(BTRFS_IOCTL_MAGIC, 17, \
+                                  struct btrfs_ioctl_search_args)
+#define BTRFS_IOC_INO_LOOKUP _IOWR(BTRFS_IOCTL_MAGIC, 18, \
+                                  struct btrfs_ioctl_ino_lookup_args)
+#define BTRFS_IOC_DEFAULT_SUBVOL _IOW(BTRFS_IOCTL_MAGIC, 19, u64)
+#define BTRFS_IOC_SPACE_INFO _IOWR(BTRFS_IOCTL_MAGIC, 20, \
+                                   struct btrfs_ioctl_space_args)
+#define BTRFS_IOC_START_SYNC _IOR(BTRFS_IOCTL_MAGIC, 24, __u64)
+#define BTRFS_IOC_WAIT_SYNC  _IOW(BTRFS_IOCTL_MAGIC, 22, __u64)
+#define BTRFS_IOC_SNAP_CREATE_V2 _IOW(BTRFS_IOCTL_MAGIC, 23, \
+                                  struct btrfs_ioctl_vol_args_v2)
+#define BTRFS_IOC_SUBVOL_CREATE_V2 _IOW(BTRFS_IOCTL_MAGIC, 24, \
+                                  struct btrfs_ioctl_vol_args_v2)
+#define BTRFS_IOC_SUBVOL_GETFLAGS _IOR(BTRFS_IOCTL_MAGIC, 25, __u64)
+#define BTRFS_IOC_SUBVOL_SETFLAGS _IOW(BTRFS_IOCTL_MAGIC, 26, __u64)
+#define BTRFS_IOC_SCRUB _IOWR(BTRFS_IOCTL_MAGIC, 27, \
+                             struct btrfs_ioctl_scrub_args)
+#define BTRFS_IOC_SCRUB_CANCEL _IO(BTRFS_IOCTL_MAGIC, 28)
+#define BTRFS_IOC_SCRUB_PROGRESS _IOWR(BTRFS_IOCTL_MAGIC, 29, \
+                                      struct btrfs_ioctl_scrub_args)
+#define BTRFS_IOC_DEV_INFO _IOWR(BTRFS_IOCTL_MAGIC, 30, \
+                                struct btrfs_ioctl_dev_info_args)
+#define BTRFS_IOC_FS_INFO _IOR(BTRFS_IOCTL_MAGIC, 31, \
+                              struct btrfs_ioctl_fs_info_args)
+#define BTRFS_IOC_BALANCE_V2 _IOWR(BTRFS_IOCTL_MAGIC, 32, \
+                                  struct btrfs_ioctl_balance_args)
+#define BTRFS_IOC_BALANCE_CTL _IOW(BTRFS_IOCTL_MAGIC, 33, int)
+#define BTRFS_IOC_BALANCE_PROGRESS _IOR(BTRFS_IOCTL_MAGIC, 34, \
+                                       struct btrfs_ioctl_balance_args)
+#define BTRFS_IOC_INO_PATHS _IOWR(BTRFS_IOCTL_MAGIC, 35, \
+                                       struct btrfs_ioctl_ino_path_args)
+#define BTRFS_IOC_LOGICAL_INO _IOWR(BTRFS_IOCTL_MAGIC, 36, \
+                                       struct btrfs_ioctl_ino_path_args)
+#define BTRFS_IOC_SET_RECEIVED_SUBVOL _IOWR(BTRFS_IOCTL_MAGIC, 37, \
+                               struct btrfs_ioctl_received_subvol_args)
+#define BTRFS_IOC_SEND _IOW(BTRFS_IOCTL_MAGIC, 38, struct btrfs_ioctl_send_args)
+#define BTRFS_IOC_DEVICES_READY _IOR(BTRFS_IOCTL_MAGIC, 39, \
+                                    struct btrfs_ioctl_vol_args)
+#define BTRFS_IOC_QUOTA_CTL _IOWR(BTRFS_IOCTL_MAGIC, 40, \
+                              struct btrfs_ioctl_quota_ctl_args)
+#define BTRFS_IOC_QGROUP_ASSIGN _IOW(BTRFS_IOCTL_MAGIC, 41, \
+                              struct btrfs_ioctl_qgroup_assign_args)
+#define BTRFS_IOC_QGROUP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 42, \
+                              struct btrfs_ioctl_qgroup_create_args)
+#define BTRFS_IOC_QGROUP_LIMIT _IOR(BTRFS_IOCTL_MAGIC, 43, \
+                              struct btrfs_ioctl_qgroup_limit_args)
+#define BTRFS_IOC_QUOTA_RESCAN _IOW(BTRFS_IOCTL_MAGIC, 44, \
+                              struct btrfs_ioctl_quota_rescan_args)
+#define BTRFS_IOC_QUOTA_RESCAN_STATUS _IOR(BTRFS_IOCTL_MAGIC, 45, \
+                              struct btrfs_ioctl_quota_rescan_args)
+#define BTRFS_IOC_GET_FSLABEL _IOR(BTRFS_IOCTL_MAGIC, 49, \
+                                  char[BTRFS_LABEL_SIZE])
+#define BTRFS_IOC_SET_FSLABEL _IOW(BTRFS_IOCTL_MAGIC, 50, \
+                                  char[BTRFS_LABEL_SIZE])
+#define BTRFS_IOC_GET_DEV_STATS _IOWR(BTRFS_IOCTL_MAGIC, 52, \
+                                     struct btrfs_ioctl_get_dev_stats)
+#define BTRFS_IOC_DEV_REPLACE _IOWR(BTRFS_IOCTL_MAGIC, 53, \
+                                   struct btrfs_ioctl_dev_replace_args)
+
+#endif /* _LINUX_BTRFS_H */
index 3f3bac6..586e9f9 100644 (file)
@@ -1,7 +1,7 @@
 /* linux/caif_socket.h
  * CAIF Definitions for CAIF socket and network layer
  * Copyright (C) ST-Ericsson AB 2010
- * Author:      Sjur Brendeland/ sjur.brandeland@stericsson.com
+ * Author:      Sjur Brendeland
  * License terms: GNU General Public License (GPL) version 2
  */
 
index 5e7eed4..7618aab 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) ST-Ericsson AB 2010
- * Author:     Sjur Brendeland/ sjur.brandeland@stericsson.com
+ * Author:     Sjur Brendeland
  * License terms: GNU General Public License (GPL) version 2
  */
 
index 9a19bcb..e52958d 100644 (file)
@@ -21,7 +21,7 @@
 /* special address description flags for the CAN_ID */
 #define CAN_EFF_FLAG 0x80000000U /* EFF/SFF is set in the MSB */
 #define CAN_RTR_FLAG 0x40000000U /* remote transmission request */
-#define CAN_ERR_FLAG 0x20000000U /* error frame */
+#define CAN_ERR_FLAG 0x20000000U /* error message frame */
 
 /* valid bits in CAN ID for frame formats */
 #define CAN_SFF_MASK 0x000007FFU /* standard frame format (SFF) */
  * Controller Area Network Identifier structure
  *
  * bit 0-28    : CAN identifier (11/29 bit)
- * bit 29      : error frame flag (0 = data frame, 1 = error frame)
+ * bit 29      : error message frame flag (0 = data frame, 1 = error message)
  * bit 30      : remote transmission request flag (1 = rtr frame)
  * bit 31      : frame format flag (0 = standard 11 bit, 1 = extended 29 bit)
  */
 typedef __u32 canid_t;
 
+#define CAN_SFF_ID_BITS                11
+#define CAN_EFF_ID_BITS                29
+
 /*
- * Controller Area Network Error Frame Mask structure
+ * Controller Area Network Error Message Frame Mask structure
  *
  * bit 0-28    : error class mask (see include/linux/can/error.h)
  * bit 29-31   : set to zero
  */
 typedef __u32 can_err_mask_t;
 
+/* CAN payload length and DLC definitions according to ISO 11898-1 */
+#define CAN_MAX_DLC 8
+#define CAN_MAX_DLEN 8
+
+/* CAN FD payload length and DLC definitions according to ISO 11898-7 */
+#define CANFD_MAX_DLC 15
+#define CANFD_MAX_DLEN 64
+
 /**
  * struct can_frame - basic CAN frame structure
- * @can_id:  the CAN ID of the frame and CAN_*_FLAG flags, see above.
- * @can_dlc: the data length field of the CAN frame
- * @data:    the CAN frame payload.
+ * @can_id:  CAN ID of the frame and CAN_*_FLAG flags, see canid_t definition
+ * @can_dlc: frame payload length in byte (0 .. 8) aka data length code
+ *           N.B. the DLC field from ISO 11898-1 Chapter 8.4.2.3 has a 1:1
+ *           mapping of the 'data length code' to the real payload length
+ * @data:    CAN frame payload (up to 8 byte)
  */
 struct can_frame {
        canid_t can_id;  /* 32 bit CAN_ID + EFF/RTR/ERR flags */
-       __u8    can_dlc; /* data length code: 0 .. 8 */
-       __u8    data[8] __attribute__((aligned(8)));
+       __u8    can_dlc; /* frame payload length in byte (0 .. CAN_MAX_DLEN) */
+       __u8    data[CAN_MAX_DLEN] __attribute__((aligned(8)));
 };
 
+/*
+ * defined bits for canfd_frame.flags
+ *
+ * The use of struct canfd_frame implies the Extended Data Length (EDL) bit to
+ * be set in the CAN frame bitstream on the wire. The EDL bit switch turns
+ * the CAN controllers bitstream processor into the CAN FD mode which creates
+ * two new options within the CAN FD frame specification:
+ *
+ * Bit Rate Switch - to indicate a second bitrate is/was used for the payload
+ * Error State Indicator - represents the error state of the transmitting node
+ *
+ * As the CANFD_ESI bit is internally generated by the transmitting CAN
+ * controller only the CANFD_BRS bit is relevant for real CAN controllers when
+ * building a CAN FD frame for transmission. Setting the CANFD_ESI bit can make
+ * sense for virtual CAN interfaces to test applications with echoed frames.
+ */
+#define CANFD_BRS 0x01 /* bit rate switch (second bitrate for payload data) */
+#define CANFD_ESI 0x02 /* error state indicator of the transmitting node */
+
+/**
+ * struct canfd_frame - CAN flexible data rate frame structure
+ * @can_id: CAN ID of the frame and CAN_*_FLAG flags, see canid_t definition
+ * @len:    frame payload length in byte (0 .. CANFD_MAX_DLEN)
+ * @flags:  additional flags for CAN FD
+ * @__res0: reserved / padding
+ * @__res1: reserved / padding
+ * @data:   CAN FD frame payload (up to CANFD_MAX_DLEN byte)
+ */
+struct canfd_frame {
+       canid_t can_id;  /* 32 bit CAN_ID + EFF/RTR/ERR flags */
+       __u8    len;     /* frame payload length in byte */
+       __u8    flags;   /* additional flags for CAN FD */
+       __u8    __res0;  /* reserved / padding */
+       __u8    __res1;  /* reserved / padding */
+       __u8    data[CANFD_MAX_DLEN] __attribute__((aligned(8)));
+};
+
+#define CAN_MTU                (sizeof(struct can_frame))
+#define CANFD_MTU      (sizeof(struct canfd_frame))
+
 /* particular protocols of the protocol family PF_CAN */
 #define CAN_RAW                1 /* RAW sockets */
 #define CAN_BCM                2 /* Broadcast Manager */
@@ -97,7 +150,7 @@ struct sockaddr_can {
  *          <received_can_id> & mask == can_id & mask
  *
  * The filter can be inverted (CAN_INV_FILTER bit set in can_id) or it can
- * filter for error frames (CAN_ERR_FLAG bit set in mask).
+ * filter for error message frames (CAN_ERR_FLAG bit set in mask).
  */
 struct can_filter {
        canid_t can_id;
index 63e855e..7b7148b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * linux/can/error.h
  *
- * Definitions of the CAN error frame to be filtered and passed to the user.
+ * Definitions of the CAN error messages to be filtered and passed to the user.
  *
  * Author: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>
  * Copyright (c) 2002-2007 Volkswagen Group Electronic Research
@@ -12,7 +12,7 @@
 #ifndef CAN_ERROR_H
 #define CAN_ERROR_H
 
-#define CAN_ERR_DLC 8 /* dlc for error frames */
+#define CAN_ERR_DLC 8 /* dlc for error message frames */
 
 /* error class (mask) in can_id */
 #define CAN_ERR_TX_TIMEOUT   0x00000001U /* TX timeout (by netdevice driver) */
index 8e1db18..ae07bec 100644 (file)
@@ -44,6 +44,7 @@ enum {
        CGW_SRC_IF,     /* ifindex of source network interface */
        CGW_DST_IF,     /* ifindex of destination network interface */
        CGW_FILTER,     /* specify struct can_filter on source CAN device */
+       CGW_DELETED,    /* number of deleted CAN frames (see max_hops param) */
        __CGW_MAX
 };
 
@@ -51,6 +52,7 @@ enum {
 
 #define CGW_FLAGS_CAN_ECHO 0x01
 #define CGW_FLAGS_CAN_SRC_TSTAMP 0x02
+#define CGW_FLAGS_CAN_IIF_TX_OK 0x04
 
 #define CGW_MOD_FUNCS 4 /* AND OR XOR SET */
 
index 781f3a3..a814062 100644 (file)
@@ -23,7 +23,8 @@ enum {
        CAN_RAW_FILTER = 1,     /* set 0 .. n can_filter(s)          */
        CAN_RAW_ERR_FILTER,     /* set filter for error frames       */
        CAN_RAW_LOOPBACK,       /* local loopback (default:on)       */
-       CAN_RAW_RECV_OWN_MSGS   /* receive my own msgs (default:off) */
+       CAN_RAW_RECV_OWN_MSGS,  /* receive my own msgs (default:off) */
+       CAN_RAW_FD_FRAMES,      /* allow CAN FD frames (default:off) */
 };
 
 #endif
index 2d2ff39..251ce74 100644 (file)
@@ -337,8 +337,11 @@ struct vfs_cap_data {
 
 #define CAP_WAKE_ALARM            35
 
+/* Allow preventing system suspends */
 
-#define CAP_LAST_CAP         CAP_WAKE_ALARM
+#define CAP_BLOCK_SUSPEND    36
+
+#define CAP_LAST_CAP         CAP_BLOCK_SUSPEND
 
 #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP)
 
@@ -350,4 +353,4 @@ struct vfs_cap_data {
 #define CAP_TO_MASK(x)      (1 << ((x) & 31)) /* mask for indexed __u32 */
 
 
-#endif /* !_LINUX_CAPABILITY_H */
+#endif /* _LINUX_CAPABILITY_H */
index dc5c2b1..d85fd2b 100644 (file)
@@ -85,4 +85,4 @@ typedef struct _LogvolInfo_struct{
 #define CCISS_GETLUNINFO   _IOR(CCISS_IOC_MAGIC, 17, LogvolInfo_struct)
 #define CCISS_BIG_PASSTHRU _IOWR(CCISS_IOC_MAGIC, 18, BIG_IOCTL_Command_struct)
 
-#endif  
+#endif /* CCISS_IOCTLH */
diff --git a/usr/include/linux/cdk.h b/usr/include/linux/cdk.h
deleted file mode 100644 (file)
index 80093a8..0000000
+++ /dev/null
@@ -1,486 +0,0 @@
-/*****************************************************************************/
-
-/*
- *     cdk.h  -- CDK interface definitions.
- *
- *     Copyright (C) 1996-1998  Stallion Technologies
- *     Copyright (C) 1994-1996  Greg Ungerer.
- *
- *     This program is free software; you can redistribute it and/or modify
- *     it under the terms of the GNU General Public License as published by
- *     the Free Software Foundation; either version 2 of the License, or
- *     (at your option) any later version.
- *
- *     This program is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- *
- *     You should have received a copy of the GNU General Public License
- *     along with this program; if not, write to the Free Software
- *     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-/*****************************************************************************/
-#ifndef        _CDK_H
-#define        _CDK_H
-/*****************************************************************************/
-
-#pragma        pack(2)
-
-/*
- *     The following set of definitions is used to communicate with the
- *     shared memory interface of the Stallion intelligent multiport serial
- *     boards. The definitions in this file are taken directly from the
- *     document titled "Generic Stackable Interface, Downloader and
- *     Communications Development Kit".
- */
-
-/*
- *     Define the set of important shared memory addresses. These are
- *     required to initialize the board and get things started. All of these
- *     addresses are relative to the start of the shared memory.
- */
-#define        CDK_SIGADDR     0x200
-#define        CDK_FEATADDR    0x280
-#define        CDK_CDKADDR     0x300
-#define        CDK_RDYADDR     0x262
-
-#define        CDK_ALIVEMARKER 13
-
-/*
- *     On hardware power up the ROMs located on the EasyConnection 8/64 will
- *     fill out the following signature information into shared memory. This
- *     way the host system can quickly determine that the board is present
- *     and is operational.
- */
-typedef struct cdkecpsig {
-       unsigned long   magic;
-       unsigned short  romver;
-       unsigned short  cputype;
-       unsigned char   panelid[8];
-} cdkecpsig_t;
-
-#define        ECP_MAGIC       0x21504345
-
-/*
- *     On hardware power up the ROMs located on the ONboard, Stallion and
- *     Brumbys will fill out the following signature information into shared
- *     memory. This way the host system can quickly determine that the board
- *     is present and is operational.
- */
-typedef struct cdkonbsig {
-       unsigned short  magic0;
-       unsigned short  magic1;
-       unsigned short  magic2;
-       unsigned short  magic3;
-       unsigned short  romver;
-       unsigned short  memoff;
-       unsigned short  memseg;
-       unsigned short  amask0;
-       unsigned short  pic;
-       unsigned short  status;
-       unsigned short  btype;
-       unsigned short  clkticks;
-       unsigned short  clkspeed;
-       unsigned short  amask1;
-       unsigned short  amask2;
-} cdkonbsig_t;
-
-#define        ONB_MAGIC0      0xf2a7
-#define        ONB_MAGIC1      0xa149
-#define        ONB_MAGIC2      0x6352
-#define        ONB_MAGIC3      0xf121
-
-/*
- *     Define the feature area structure. The feature area is the set of
- *     startup parameters used by the slave image when it starts executing.
- *     They allow for the specification of buffer sizes, debug trace, etc.
- */
-typedef struct cdkfeature {
-       unsigned long   debug;
-       unsigned long   banner;
-       unsigned long   etype;
-       unsigned long   nrdevs;
-       unsigned long   brdspec;
-       unsigned long   txrqsize;
-       unsigned long   rxrqsize;
-       unsigned long   flags;
-} cdkfeature_t;
-
-#define        ETYP_DDK        0
-#define        ETYP_CDK        1
-
-/*
- *     Define the CDK header structure. This is the info that the slave
- *     environment sets up after it has been downloaded and started. It
- *     essentially provides a memory map for the shared memory interface.
- */
-typedef struct cdkhdr {
-       unsigned short  command;
-       unsigned short  status;
-       unsigned short  port;
-       unsigned short  mode;
-       unsigned long   cmd_buf[14];
-       unsigned short  alive_cnt;
-       unsigned short  intrpt_mode;
-       unsigned char   intrpt_id[8];
-       unsigned char   ver_release;
-       unsigned char   ver_modification;
-       unsigned char   ver_fix;
-       unsigned char   deadman_restart;
-       unsigned short  deadman;
-       unsigned short  nrdevs;
-       unsigned long   memp;
-       unsigned long   hostp;
-       unsigned long   slavep;
-       unsigned char   hostreq;
-       unsigned char   slavereq;
-       unsigned char   cmd_reserved[30];
-} cdkhdr_t;
-
-#define        MODE_DDK        0
-#define        MODE_CDK        1
-
-#define        IMD_INTR        0x0
-#define        IMD_PPINTR      0x1
-#define        IMD_POLL        0xff
-
-/*
- *     Define the memory mapping structure. This structure is pointed to by
- *     the memp field in the stlcdkhdr struct. As many as these structures
- *     as required are laid out in shared memory to define how the rest of
- *     shared memory is divided up. There will be one for each port.
- */
-typedef struct cdkmem {
-       unsigned short  dtype;
-       unsigned long   offset;
-} cdkmem_t;
-
-#define        TYP_UNDEFINED   0x0
-#define        TYP_ASYNCTRL    0x1
-#define        TYP_ASYNC       0x20
-#define        TYP_PARALLEL    0x40
-#define        TYP_SYNCX21     0x60
-
-/*****************************************************************************/
-
-/*
- *     Following is a set of defines and structures used to actually deal
- *     with the serial ports on the board. Firstly is the set of commands
- *     that can be applied to ports.
- */
-#define        ASYCMD          (((unsigned long) 'a') << 8)
-
-#define        A_NULL          (ASYCMD | 0)
-#define        A_FLUSH         (ASYCMD | 1)
-#define        A_BREAK         (ASYCMD | 2)
-#define        A_GETPORT       (ASYCMD | 3)
-#define        A_SETPORT       (ASYCMD | 4)
-#define        A_SETPORTF      (ASYCMD | 5)
-#define        A_SETPORTFTX    (ASYCMD | 6)
-#define        A_SETPORTFRX    (ASYCMD | 7)
-#define        A_GETSIGNALS    (ASYCMD | 8)
-#define        A_SETSIGNALS    (ASYCMD | 9)
-#define        A_SETSIGNALSF   (ASYCMD | 10)
-#define        A_SETSIGNALSFTX (ASYCMD | 11)
-#define        A_SETSIGNALSFRX (ASYCMD | 12)
-#define        A_GETNOTIFY     (ASYCMD | 13)
-#define        A_SETNOTIFY     (ASYCMD | 14)
-#define        A_NOTIFY        (ASYCMD | 15)
-#define        A_PORTCTRL      (ASYCMD | 16)
-#define        A_GETSTATS      (ASYCMD | 17)
-#define        A_RQSTATE       (ASYCMD | 18)
-#define        A_FLOWSTATE     (ASYCMD | 19)
-#define        A_CLEARSTATS    (ASYCMD | 20)
-
-/*
- *     Define those arguments used for simple commands.
- */
-#define        FLUSHRX         0x1
-#define        FLUSHTX         0x2
-
-#define        BREAKON         -1
-#define        BREAKOFF        -2
-
-/*
- *     Define the port setting structure, and all those defines that go along
- *     with it. Basically this structure defines the characteristics of this
- *     port: baud rate, chars, parity, input/output char cooking etc.
- */
-typedef struct asyport {
-       unsigned long   baudout;
-       unsigned long   baudin;
-       unsigned long   iflag;
-       unsigned long   oflag;
-       unsigned long   lflag;
-       unsigned long   pflag;
-       unsigned long   flow;
-       unsigned long   spare1;
-       unsigned short  vtime;
-       unsigned short  vmin;
-       unsigned short  txlo;
-       unsigned short  txhi;
-       unsigned short  rxlo;
-       unsigned short  rxhi;
-       unsigned short  rxhog;
-       unsigned short  spare2;
-       unsigned char   csize;
-       unsigned char   stopbs;
-       unsigned char   parity;
-       unsigned char   stopin;
-       unsigned char   startin;
-       unsigned char   stopout;
-       unsigned char   startout;
-       unsigned char   parmark;
-       unsigned char   brkmark;
-       unsigned char   cc[11];
-} asyport_t;
-
-#define        PT_STOP1        0x0
-#define        PT_STOP15       0x1
-#define        PT_STOP2        0x2
-
-#define        PT_NOPARITY     0x0
-#define        PT_ODDPARITY    0x1
-#define        PT_EVENPARITY   0x2
-#define        PT_MARKPARITY   0x3
-#define        PT_SPACEPARITY  0x4
-
-#define        F_NONE          0x0
-#define        F_IXON          0x1
-#define        F_IXOFF         0x2
-#define        F_IXANY         0x4
-#define        F_IOXANY        0x8
-#define        F_RTSFLOW       0x10
-#define        F_CTSFLOW       0x20
-#define        F_DTRFLOW       0x40
-#define        F_DCDFLOW       0x80
-#define        F_DSROFLOW      0x100
-#define        F_DSRIFLOW      0x200
-
-#define        FI_NORX         0x1
-#define        FI_RAW          0x2
-#define        FI_ISTRIP       0x4
-#define        FI_UCLC         0x8
-#define        FI_INLCR        0x10
-#define        FI_ICRNL        0x20
-#define        FI_IGNCR        0x40
-#define        FI_IGNBREAK     0x80
-#define        FI_DSCRDBREAK   0x100
-#define        FI_1MARKBREAK   0x200
-#define        FI_2MARKBREAK   0x400
-#define        FI_XCHNGBREAK   0x800
-#define        FI_IGNRXERRS    0x1000
-#define        FI_DSCDRXERRS   0x2000
-#define        FI_1MARKRXERRS  0x4000
-#define        FI_2MARKRXERRS  0x8000
-#define        FI_XCHNGRXERRS  0x10000
-#define        FI_DSCRDNULL    0x20000
-
-#define        FO_OLCUC        0x1
-#define        FO_ONLCR        0x2
-#define        FO_OOCRNL       0x4
-#define        FO_ONOCR        0x8
-#define        FO_ONLRET       0x10
-#define        FO_ONL          0x20
-#define        FO_OBS          0x40
-#define        FO_OVT          0x80
-#define        FO_OFF          0x100
-#define        FO_OTAB1        0x200
-#define        FO_OTAB2        0x400
-#define        FO_OTAB3        0x800
-#define        FO_OCR1         0x1000
-#define        FO_OCR2         0x2000
-#define        FO_OCR3         0x4000
-#define        FO_OFILL        0x8000
-#define        FO_ODELL        0x10000
-
-#define        P_RTSLOCK       0x1
-#define        P_CTSLOCK       0x2
-#define        P_MAPRTS        0x4
-#define        P_MAPCTS        0x8
-#define        P_LOOPBACK      0x10
-#define        P_DTRFOLLOW     0x20
-#define        P_FAKEDCD       0x40
-
-#define        P_RXIMIN        0x10000
-#define        P_RXITIME       0x20000
-#define        P_RXTHOLD       0x40000
-
-/*
- *     Define a structure to communicate serial port signal and data state
- *     information.
- */
-typedef struct asysigs {
-       unsigned long   data;
-       unsigned long   signal;
-       unsigned long   sigvalue;
-} asysigs_t;
-
-#define        DT_TXBUSY       0x1
-#define        DT_TXEMPTY      0x2
-#define        DT_TXLOW        0x4
-#define        DT_TXHIGH       0x8
-#define        DT_TXFULL       0x10
-#define        DT_TXHOG        0x20
-#define        DT_TXFLOWED     0x40
-#define        DT_TXBREAK      0x80
-
-#define        DT_RXBUSY       0x100
-#define        DT_RXEMPTY      0x200
-#define        DT_RXLOW        0x400
-#define        DT_RXHIGH       0x800
-#define        DT_RXFULL       0x1000
-#define        DT_RXHOG        0x2000
-#define        DT_RXFLOWED     0x4000
-#define        DT_RXBREAK      0x8000
-
-#define        SG_DTR          0x1
-#define        SG_DCD          0x2
-#define        SG_RTS          0x4
-#define        SG_CTS          0x8
-#define        SG_DSR          0x10
-#define        SG_RI           0x20
-
-/*
- *     Define the notification setting structure. This is used to tell the
- *     port what events we want to be informed about. Fields here use the
- *     same defines as for the asysigs structure above.
- */
-typedef struct asynotify {
-       unsigned long   ctrl;
-       unsigned long   data;
-       unsigned long   signal;
-       unsigned long   sigvalue;
-} asynotify_t;
-
-/*
- *     Define the port control structure. It is used to do fine grain
- *     control operations on the port.
- */
-typedef struct {
-       unsigned long   rxctrl;
-       unsigned long   txctrl;
-       char            rximdch;
-       char            tximdch;
-       char            spare1;
-       char            spare2;
-} asyctrl_t;
-
-#define        CT_ENABLE       0x1
-#define        CT_DISABLE      0x2
-#define        CT_STOP         0x4
-#define        CT_START        0x8
-#define        CT_STARTFLOW    0x10
-#define        CT_STOPFLOW     0x20
-#define        CT_SENDCHR      0x40
-
-/*
- *     Define the stats structure kept for each port. This is a useful set
- *     of data collected for each port on the slave. The A_GETSTATS command
- *     is used to retrieve this data from the slave.
- */
-typedef struct asystats {
-       unsigned long   opens;
-       unsigned long   txchars;
-       unsigned long   rxchars;
-       unsigned long   txringq;
-       unsigned long   rxringq;
-       unsigned long   txmsgs;
-       unsigned long   rxmsgs;
-       unsigned long   txflushes;
-       unsigned long   rxflushes;
-       unsigned long   overruns;
-       unsigned long   framing;
-       unsigned long   parity;
-       unsigned long   ringover;
-       unsigned long   lost;
-       unsigned long   rxstart;
-       unsigned long   rxstop;
-       unsigned long   txstart;
-       unsigned long   txstop;
-       unsigned long   dcdcnt;
-       unsigned long   dtrcnt;
-       unsigned long   ctscnt;
-       unsigned long   rtscnt;
-       unsigned long   dsrcnt;
-       unsigned long   ricnt;
-       unsigned long   txbreaks;
-       unsigned long   rxbreaks;
-       unsigned long   signals;
-       unsigned long   state;
-       unsigned long   hwid;
-} asystats_t;
-
-/*****************************************************************************/
-
-/*
- *     All command and control communication with a device on the slave is
- *     via a control block in shared memory. Each device has its own control
- *     block, defined by the following structure. The control block allows
- *     the host to open, close and control the device on the slave.
- */
-typedef struct cdkctrl {
-       unsigned char   open;
-       unsigned char   close;
-       unsigned long   openarg;
-       unsigned long   closearg;
-       unsigned long   cmd;
-       unsigned long   status;
-       unsigned long   args[32];
-} cdkctrl_t;
-
-/*
- *     Each device on the slave passes data to and from the host via a ring
- *     queue in shared memory. Define a ring queue structure to hold the
- *     vital information about each ring queue. Two ring queues will be
- *     allocated for each port, one for receive data and one for transmit
- *     data.
- */
-typedef struct cdkasyrq {
-       unsigned long   offset;
-       unsigned short  size;
-       unsigned short  head;
-       unsigned short  tail;
-} cdkasyrq_t;
-
-/*
- *     Each asynchronous port is defined in shared memory by the following
- *     structure. It contains a control block to command a device, and also
- *     the necessary data channel information as well.
- */
-typedef struct cdkasy {
-       cdkctrl_t       ctrl;
-       unsigned short  notify;
-       asynotify_t     changed;
-       unsigned short  receive;
-       cdkasyrq_t      rxq;
-       unsigned short  transmit;
-       cdkasyrq_t      txq;
-} cdkasy_t;
-
-#pragma        pack()
-
-/*****************************************************************************/
-
-/*
- *     Define the set of ioctls used by the driver to do special things
- *     to the board. These include interrupting it, and initializing
- *     the driver after board startup and shutdown.
- */
-#include <linux/ioctl.h>
-
-#define        STL_BINTR       _IO('s',20)
-#define        STL_BSTART      _IO('s',21)
-#define        STL_BSTOP       _IO('s',22)
-#define        STL_BRESET      _IO('s',23)
-
-/*
- *     Define a set of ioctl extensions, used to get at special stuff.
- */
-#define        STL_GETPFLAG    _IO('s',80)
-#define        STL_SETPFLAG    _IO('s',81)
-
-/*****************************************************************************/
-#endif
index 8adcaf1..db59b9b 100644 (file)
@@ -8,8 +8,8 @@
  *               1998-2002    Jens Axboe, axboe@suse.de
  */
  
-#ifndef        _LINUX_CDROM_H
-#define        _LINUX_CDROM_H
+#ifndef _LINUX_CDROM_H
+#define _LINUX_CDROM_H
 
 #include <linux/types.h>
 #include <asm/byteorder.h>
@@ -908,5 +908,39 @@ struct mode_page_header {
        __be16 desc_length;
 };
 
+/* removable medium feature descriptor */
+struct rm_feature_desc {
+       __be16 feature_code;
+#if defined(__BIG_ENDIAN_BITFIELD)
+       __u8 reserved1:2;
+       __u8 feature_version:4;
+       __u8 persistent:1;
+       __u8 curr:1;
+#elif defined(__LITTLE_ENDIAN_BITFIELD)
+       __u8 curr:1;
+       __u8 persistent:1;
+       __u8 feature_version:4;
+       __u8 reserved1:2;
+#endif
+       __u8 add_len;
+#if defined(__BIG_ENDIAN_BITFIELD)
+       __u8 mech_type:3;
+       __u8 load:1;
+       __u8 eject:1;
+       __u8 pvnt_jmpr:1;
+       __u8 dbml:1;
+       __u8 lock:1;
+#elif defined(__LITTLE_ENDIAN_BITFIELD)
+       __u8 lock:1;
+       __u8 dbml:1;
+       __u8 pvnt_jmpr:1;
+       __u8 eject:1;
+       __u8 load:1;
+       __u8 mech_type:3;
+#endif
+       __u8 reserved2;
+       __u8 reserved3;
+       __u8 reserved4;
+};
 
-#endif  /* _LINUX_CDROM_H */
+#endif /* _LINUX_CDROM_H */
index 4930f06..6e2c555 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef        _CM4000_H_
-#define        _CM4000_H_
+#ifndef _CM4000_H_
+#define _CM4000_H_
 
 #include <linux/types.h>
 
@@ -59,4 +59,4 @@ typedef struct ptsreq {
 #define        CM_BAD_CARD                     0x20
 
 
-#endif /* _CM4000_H_ */
+#endif /* _CM4000_H_ */
index 0323cb9..bf22f5c 100644 (file)
@@ -56,7 +56,9 @@ struct proc_event {
                PROC_EVENT_PTRACE = 0x00000100,
                PROC_EVENT_COMM = 0x00000200,
                /* "next" should be 0x00000400 */
-               /* "last" is the last process event: exit */
+               /* "last" is the last process event: exit,
+                * while "next to last" is coredumping event */
+               PROC_EVENT_COREDUMP = 0x40000000,
                PROC_EVENT_EXIT = 0x80000000
        } what;
        __u32 cpu;
@@ -110,12 +112,18 @@ struct proc_event {
                        char           comm[16];
                } comm;
 
+               struct coredump_proc_event {
+                       __kernel_pid_t process_pid;
+                       __kernel_pid_t process_tgid;
+               } coredump;
+
                struct exit_proc_event {
                        __kernel_pid_t process_pid;
                        __kernel_pid_t process_tgid;
                        __u32 exit_code, exit_signal;
                } exit;
+
        } event_data;
 };
 
-#endif /* CN_PROC_H */
+#endif /* CN_PROC_H */
index 420c7ea..a5e4b99 100644 (file)
@@ -733,5 +733,4 @@ struct coda_mount_data {
        int             fd;       /* Opened device */
 };
 
-#endif 
-
+#endif /* _CODA_HEADER_ */
index 92ac327..46e12d8 100644 (file)
@@ -24,4 +24,4 @@ struct upc_req {
 #define CODA_REQ_WRITE  0x4
 #define CODA_REQ_ABORT  0x8
 
-#endif
+#endif /* __CODA_PSDEV_H */
diff --git a/usr/include/linux/comstats.h b/usr/include/linux/comstats.h
deleted file mode 100644 (file)
index 3f5ea8e..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-/*****************************************************************************/
-
-/*
- *     comstats.h  -- Serial Port Stats.
- *
- *     Copyright (C) 1996-1998  Stallion Technologies
- *     Copyright (C) 1994-1996  Greg Ungerer.
- *
- *     This program is free software; you can redistribute it and/or modify
- *     it under the terms of the GNU General Public License as published by
- *     the Free Software Foundation; either version 2 of the License, or
- *     (at your option) any later version.
- *
- *     This program is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- *
- *     You should have received a copy of the GNU General Public License
- *     along with this program; if not, write to the Free Software
- *     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-/*****************************************************************************/
-#ifndef        _COMSTATS_H
-#define        _COMSTATS_H
-/*****************************************************************************/
-
-/*
- *     Serial port stats structure. The structure itself is UART
- *     independent, but some fields may be UART/driver specific (for
- *     example state).
- */
-
-typedef struct {
-       unsigned long   brd;
-       unsigned long   panel;
-       unsigned long   port;
-       unsigned long   hwid;
-       unsigned long   type;
-       unsigned long   txtotal;
-       unsigned long   rxtotal;
-       unsigned long   txbuffered;
-       unsigned long   rxbuffered;
-       unsigned long   rxoverrun;
-       unsigned long   rxparity;
-       unsigned long   rxframing;
-       unsigned long   rxlost;
-       unsigned long   txbreaks;
-       unsigned long   rxbreaks;
-       unsigned long   txxon;
-       unsigned long   txxoff;
-       unsigned long   rxxon;
-       unsigned long   rxxoff;
-       unsigned long   txctson;
-       unsigned long   txctsoff;
-       unsigned long   rxrtson;
-       unsigned long   rxrtsoff;
-       unsigned long   modem;
-       unsigned long   state;
-       unsigned long   flags;
-       unsigned long   ttystate;
-       unsigned long   cflags;
-       unsigned long   iflags;
-       unsigned long   oflags;
-       unsigned long   lflags;
-       unsigned long   signals;
-} comstats_t;
-
-
-/*
- *     Board stats structure. Returns useful info about the board.
- */
-
-#define        COM_MAXPANELS   8
-
-typedef struct {
-       unsigned long   panel;
-       unsigned long   type;
-       unsigned long   hwid;
-       unsigned long   nrports;
-} companel_t;
-
-typedef struct {
-       unsigned long   brd;
-       unsigned long   type;
-       unsigned long   hwid;
-       unsigned long   state;
-       unsigned long   ioaddr;
-       unsigned long   ioaddr2;
-       unsigned long   memaddr;
-       unsigned long   irq;
-       unsigned long   nrpanels;
-       unsigned long   nrports;
-       companel_t      panels[COM_MAXPANELS];
-} combrd_t;
-
-
-/*
- *     Define the ioctl operations for stats stuff.
- */
-#include <linux/ioctl.h>
-
-#define        COM_GETPORTSTATS        _IO('c',30)
-#define        COM_CLRPORTSTATS        _IO('c',31)
-#define        COM_GETBRDSTATS         _IO('c',32)
-
-
-/*
- *     Define the set of ioctls that give user level access to the
- *     private port, panel and board structures. The argument required
- *     will be driver dependent!  
- */
-#define        COM_READPORT            _IO('c',40)
-#define        COM_READBOARD           _IO('c',41)
-#define        COM_READPANEL           _IO('c',42)
-
-/*****************************************************************************/
-#endif
index fc4d744..caf9468 100644 (file)
 #define CN_VAL_DRBD                    0x1
 #define CN_KVP_IDX                     0x9     /* HyperV KVP */
 #define CN_KVP_VAL                     0x1     /* queries from the kernel */
+#define CN_VSS_IDX                     0xA     /* HyperV VSS */
+#define CN_VSS_VAL                     0x1     /* queries from the kernel */
 
-#define CN_NETLINK_USERS               10      /* Highest index + 1 */
+
+#define CN_NETLINK_USERS               11      /* Highest index + 1 */
 
 /*
  * Maximum connector's message size.
@@ -74,4 +77,4 @@ struct cn_msg {
        __u8 data[0];
 };
 
-#endif                         /* __CONNECTOR_H */
+#endif /* __CONNECTOR_H */
index 8acaf2d..9cada1a 100644 (file)
@@ -85,4 +85,4 @@ struct cramfs_super {
                                | CRAMFS_FLAG_SHIFTED_ROOT_OFFSET )
 
 
-#endif
+#endif /* __CRAMFS_H */
index 65a2562..6bb4338 100644 (file)
@@ -67,6 +67,17 @@ struct ieee_ets {
        __u8    reco_prio_tc[IEEE_8021QAZ_MAX_TCS];
 };
 
+/* This structure contains rate limit extension to the IEEE 802.1Qaz ETS
+ * managed object.
+ * Values are 64 bits long and specified in Kbps to enable usage over both
+ * slow and very fast networks.
+ *
+ * @tc_maxrate: maximal tc tx bandwidth indexed by traffic class
+ */
+struct ieee_maxrate {
+       __u64   tc_maxrate[IEEE_8021QAZ_MAX_TCS];
+};
+
 /* This structure contains the IEEE 802.1Qaz PFC managed object
  *
  * @pfc_cap: Indicates the number of traffic classes on the local device
@@ -321,6 +332,7 @@ enum ieee_attrs {
        DCB_ATTR_IEEE_PEER_ETS,
        DCB_ATTR_IEEE_PEER_PFC,
        DCB_ATTR_IEEE_PEER_APP,
+       DCB_ATTR_IEEE_MAXRATE,
        __DCB_ATTR_IEEE_MAX
 };
 #define DCB_ATTR_IEEE_MAX (__DCB_ATTR_IEEE_MAX - 1)
index 9d5c08f..6120d50 100644 (file)
@@ -67,11 +67,9 @@ struct dlm_lksb {
 
 /* dlm_new_lockspace() flags */
 
-#define DLM_LSFL_NODIR         0x00000001
 #define DLM_LSFL_TIMEWARN      0x00000002
 #define DLM_LSFL_FS            0x00000004
 #define DLM_LSFL_NEWEXCL       0x00000008
 
 
-#endif                         /* __DLM_DOT_H__ */
-
+#endif /* __DLM_DOT_H__ */
index 135b453..6403ea2 100644 (file)
@@ -42,5 +42,4 @@ struct dlm_plock_info {
 };
 
 
-#endif
-
+#endif /* __DLM_PLOCK_DOT_H__ */
index 75fd557..7e75b6f 100644 (file)
@@ -267,9 +267,9 @@ enum {
 #define DM_DEV_SET_GEOMETRY    _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
 
 #define DM_VERSION_MAJOR       4
-#define DM_VERSION_MINOR       22
+#define DM_VERSION_MINOR       24
 #define DM_VERSION_PATCHLEVEL  0
-#define DM_VERSION_EXTRA       "-ioctl (2011-10-19)"
+#define DM_VERSION_EXTRA       "-ioctl (2013-01-15)"
 
 /* Status bits */
 #define DM_READONLY_FLAG       (1 << 0) /* In/Out */
@@ -307,6 +307,8 @@ enum {
 
 /*
  * Set this to suspend without flushing queued ios.
+ * Also disables flushing uncommitted changes in the thin target before
+ * generating statistics for DM_TABLE_STATUS and DM_DEV_WAIT.
  */
 #define DM_NOFLUSH_FLAG                (1 << 11) /* In */
 
@@ -334,4 +336,9 @@ enum {
  */
 #define DM_SECURE_DATA_FLAG            (1 << 15) /* In */
 
+/*
+ * If set, a message generated output data.
+ */
+#define DM_DATA_OUT_FLAG               (1 << 16) /* Out */
+
 #endif                         /* _LINUX_DM_IOCTL_H */
index 681e8ad..4ed210a 100644 (file)
@@ -49,7 +49,7 @@ typedef enum
 } dmx_input_t;
 
 
-typedef enum
+typedef enum dmx_ts_pes
 {
        DMX_PES_AUDIO0,
        DMX_PES_VIDEO0,
@@ -150,4 +150,4 @@ struct dmx_stc {
 #define DMX_ADD_PID              _IOW('o', 51, __u16)
 #define DMX_REMOVE_PID           _IOW('o', 52, __u16)
 
-#endif /*_DVBDMX_H_*/
+#endif /* _DVBDMX_H_ */
index 6b4b7cb..5cb498d 100644 (file)
@@ -62,6 +62,7 @@ typedef enum fe_caps {
        FE_CAN_8VSB                     = 0x200000,
        FE_CAN_16VSB                    = 0x400000,
        FE_HAS_EXTENDED_CAPS            = 0x800000,   /* We need more bitspace for newer APIs, indicate this. */
+       FE_CAN_MULTISTREAM              = 0x4000000,  /* frontend supports multistream filtering */
        FE_CAN_TURBO_FEC                = 0x8000000,  /* frontend supports "turbo fec modulation" */
        FE_CAN_2G_MODULATION            = 0x10000000, /* frontend supports "2nd generation modulation" (DVB-S2) */
        FE_NEEDS_BENDING                = 0x20000000, /* not supported anymore, don't use (frontend requires frequency bending) */
@@ -121,16 +122,27 @@ typedef enum fe_sec_mini_cmd {
 } fe_sec_mini_cmd_t;
 
 
+/**
+ * enum fe_status - enumerates the possible frontend status
+ * @FE_HAS_SIGNAL:     found something above the noise level
+ * @FE_HAS_CARRIER:    found a DVB signal
+ * @FE_HAS_VITERBI:    FEC is stable
+ * @FE_HAS_SYNC:       found sync bytes
+ * @FE_HAS_LOCK:       everything's working
+ * @FE_TIMEDOUT:       no lock within the last ~2 seconds
+ * @FE_REINIT:         frontend was reinitialized, application is recommended
+ *                     to reset DiSEqC, tone and parameters
+ */
+
 typedef enum fe_status {
-       FE_HAS_SIGNAL   = 0x01,   /* found something above the noise level */
-       FE_HAS_CARRIER  = 0x02,   /* found a DVB signal  */
-       FE_HAS_VITERBI  = 0x04,   /* FEC is stable  */
-       FE_HAS_SYNC     = 0x08,   /* found sync bytes  */
-       FE_HAS_LOCK     = 0x10,   /* everything's working... */
-       FE_TIMEDOUT     = 0x20,   /* no lock within the last ~2 seconds */
-       FE_REINIT       = 0x40    /* frontend was reinitialized,  */
-} fe_status_t;                   /* application is recommended to reset */
-                                 /* DiSEqC, tone and parameters */
+       FE_HAS_SIGNAL           = 0x01,
+       FE_HAS_CARRIER          = 0x02,
+       FE_HAS_VITERBI          = 0x04,
+       FE_HAS_SYNC             = 0x08,
+       FE_HAS_LOCK             = 0x10,
+       FE_TIMEDOUT             = 0x20,
+       FE_REINIT               = 0x40,
+} fe_status_t;
 
 typedef enum fe_spectral_inversion {
        INVERSION_OFF,
@@ -152,6 +164,7 @@ typedef enum fe_code_rate {
        FEC_AUTO,
        FEC_3_5,
        FEC_9_10,
+       FEC_2_5,
 } fe_code_rate_t;
 
 
@@ -169,6 +182,7 @@ typedef enum fe_modulation {
        APSK_16,
        APSK_32,
        DQPSK,
+       QAM_4_NR,
 } fe_modulation_t;
 
 typedef enum fe_transmit_mode {
@@ -179,6 +193,8 @@ typedef enum fe_transmit_mode {
        TRANSMISSION_MODE_1K,
        TRANSMISSION_MODE_16K,
        TRANSMISSION_MODE_32K,
+       TRANSMISSION_MODE_C1,
+       TRANSMISSION_MODE_C3780,
 } fe_transmit_mode_t;
 
 typedef enum fe_bandwidth {
@@ -200,6 +216,9 @@ typedef enum fe_guard_interval {
        GUARD_INTERVAL_1_128,
        GUARD_INTERVAL_19_128,
        GUARD_INTERVAL_19_256,
+       GUARD_INTERVAL_PN420,
+       GUARD_INTERVAL_PN595,
+       GUARD_INTERVAL_PN945,
 } fe_guard_interval_t;
 
 
@@ -211,6 +230,12 @@ typedef enum fe_hierarchy {
        HIERARCHY_AUTO
 } fe_hierarchy_t;
 
+enum fe_interleaving {
+       INTERLEAVING_NONE,
+       INTERLEAVING_AUTO,
+       INTERLEAVING_240,
+       INTERLEAVING_720,
+};
 
 struct dvb_qpsk_parameters {
        __u32           symbol_rate;  /* symbol rate in Symbols per second */
@@ -310,13 +335,43 @@ struct dvb_frontend_event {
 
 #define DTV_ISDBT_LAYER_ENABLED        41
 
-#define DTV_ISDBS_TS_ID                42
-
-#define DTV_DVBT2_PLP_ID       43
+#define DTV_STREAM_ID          42
+#define DTV_ISDBS_TS_ID_LEGACY DTV_STREAM_ID
+#define DTV_DVBT2_PLP_ID_LEGACY        43
 
 #define DTV_ENUM_DELSYS                44
 
-#define DTV_MAX_COMMAND                                DTV_ENUM_DELSYS
+/* ATSC-MH */
+#define DTV_ATSCMH_FIC_VER             45
+#define DTV_ATSCMH_PARADE_ID           46
+#define DTV_ATSCMH_NOG                 47
+#define DTV_ATSCMH_TNOG                        48
+#define DTV_ATSCMH_SGN                 49
+#define DTV_ATSCMH_PRC                 50
+#define DTV_ATSCMH_RS_FRAME_MODE       51
+#define DTV_ATSCMH_RS_FRAME_ENSEMBLE   52
+#define DTV_ATSCMH_RS_CODE_MODE_PRI    53
+#define DTV_ATSCMH_RS_CODE_MODE_SEC    54
+#define DTV_ATSCMH_SCCC_BLOCK_MODE     55
+#define DTV_ATSCMH_SCCC_CODE_MODE_A    56
+#define DTV_ATSCMH_SCCC_CODE_MODE_B    57
+#define DTV_ATSCMH_SCCC_CODE_MODE_C    58
+#define DTV_ATSCMH_SCCC_CODE_MODE_D    59
+
+#define DTV_INTERLEAVING                       60
+#define DTV_LNA                                        61
+
+/* Quality parameters */
+#define DTV_STAT_SIGNAL_STRENGTH       62
+#define DTV_STAT_CNR                   63
+#define DTV_STAT_PRE_ERROR_BIT_COUNT   64
+#define DTV_STAT_PRE_TOTAL_BIT_COUNT   65
+#define DTV_STAT_POST_ERROR_BIT_COUNT  66
+#define DTV_STAT_POST_TOTAL_BIT_COUNT  67
+#define DTV_STAT_ERROR_BLOCK_COUNT     68
+#define DTV_STAT_TOTAL_BLOCK_COUNT     69
+
+#define DTV_MAX_COMMAND                DTV_STAT_TOTAL_BLOCK_COUNT
 
 typedef enum fe_pilot {
        PILOT_ON,
@@ -345,7 +400,7 @@ typedef enum fe_delivery_system {
        SYS_ISDBC,
        SYS_ATSC,
        SYS_ATSCMH,
-       SYS_DMBTH,
+       SYS_DTMB,
        SYS_CMMB,
        SYS_DAB,
        SYS_DVBT2,
@@ -353,9 +408,44 @@ typedef enum fe_delivery_system {
        SYS_DVBC_ANNEX_C,
 } fe_delivery_system_t;
 
-
+/* backward compatibility */
 #define SYS_DVBC_ANNEX_AC      SYS_DVBC_ANNEX_A
+#define SYS_DMBTH SYS_DTMB /* DMB-TH is legacy name, use DTMB instead */
+
+/* ATSC-MH */
+
+enum atscmh_sccc_block_mode {
+       ATSCMH_SCCC_BLK_SEP      = 0,
+       ATSCMH_SCCC_BLK_COMB     = 1,
+       ATSCMH_SCCC_BLK_RES      = 2,
+};
+
+enum atscmh_sccc_code_mode {
+       ATSCMH_SCCC_CODE_HLF     = 0,
+       ATSCMH_SCCC_CODE_QTR     = 1,
+       ATSCMH_SCCC_CODE_RES     = 2,
+};
+
+enum atscmh_rs_frame_ensemble {
+       ATSCMH_RSFRAME_ENS_PRI   = 0,
+       ATSCMH_RSFRAME_ENS_SEC   = 1,
+};
+
+enum atscmh_rs_frame_mode {
+       ATSCMH_RSFRAME_PRI_ONLY  = 0,
+       ATSCMH_RSFRAME_PRI_SEC   = 1,
+       ATSCMH_RSFRAME_RES       = 2,
+};
+
+enum atscmh_rs_code_mode {
+       ATSCMH_RSCODE_211_187    = 0,
+       ATSCMH_RSCODE_223_187    = 1,
+       ATSCMH_RSCODE_235_187    = 2,
+       ATSCMH_RSCODE_RES        = 3,
+};
 
+#define NO_STREAM_ID_FILTER    (~0U)
+#define LNA_AUTO                (~0U)
 
 struct dtv_cmds_h {
        char    *name;          /* A display name for debugging purposes */
@@ -368,11 +458,78 @@ struct dtv_cmds_h {
        __u32   reserved:30;    /* Align */
 };
 
+/**
+ * Scale types for the quality parameters.
+ * @FE_SCALE_NOT_AVAILABLE: That QoS measure is not available. That
+ *                         could indicate a temporary or a permanent
+ *                         condition.
+ * @FE_SCALE_DECIBEL: The scale is measured in 0.0001 dB steps, typically
+ *               used on signal measures.
+ * @FE_SCALE_RELATIVE: The scale is a relative percentual measure,
+ *                     ranging from 0 (0%) to 0xffff (100%).
+ * @FE_SCALE_COUNTER: The scale counts the occurrence of an event, like
+ *                     bit error, block error, lapsed time.
+ */
+enum fecap_scale_params {
+       FE_SCALE_NOT_AVAILABLE = 0,
+       FE_SCALE_DECIBEL,
+       FE_SCALE_RELATIVE,
+       FE_SCALE_COUNTER
+};
+
+/**
+ * struct dtv_stats - Used for reading a DTV status property
+ *
+ * @value:     value of the measure. Should range from 0 to 0xffff;
+ * @scale:     Filled with enum fecap_scale_params - the scale
+ *             in usage for that parameter
+ *
+ * For most delivery systems, this will return a single value for each
+ * parameter.
+ * It should be noticed, however, that new OFDM delivery systems like
+ * ISDB can use different modulation types for each group of carriers.
+ * On such standards, up to 8 groups of statistics can be provided, one
+ * for each carrier group (called "layer" on ISDB).
+ * In order to be consistent with other delivery systems, the first
+ * value refers to the entire set of carriers ("global").
+ * dtv_status:scale should use the value FE_SCALE_NOT_AVAILABLE when
+ * the value for the entire group of carriers or from one specific layer
+ * is not provided by the hardware.
+ * st.len should be filled with the latest filled status + 1.
+ *
+ * In other words, for ISDB, those values should be filled like:
+ *     u.st.stat.svalue[0] = global statistics;
+ *     u.st.stat.scale[0] = FE_SCALE_DECIBELS;
+ *     u.st.stat.value[1] = layer A statistics;
+ *     u.st.stat.scale[1] = FE_SCALE_NOT_AVAILABLE (if not available);
+ *     u.st.stat.svalue[2] = layer B statistics;
+ *     u.st.stat.scale[2] = FE_SCALE_DECIBELS;
+ *     u.st.stat.svalue[3] = layer C statistics;
+ *     u.st.stat.scale[3] = FE_SCALE_DECIBELS;
+ *     u.st.len = 4;
+ */
+struct dtv_stats {
+       __u8 scale;     /* enum fecap_scale_params type */
+       union {
+               __u64 uvalue;   /* for counters and relative scales */
+               __s64 svalue;   /* for 0.0001 dB measures */
+       };
+} __attribute__ ((packed));
+
+
+#define MAX_DTV_STATS   4
+
+struct dtv_fe_stats {
+       __u8 len;
+       struct dtv_stats stat[MAX_DTV_STATS];
+} __attribute__ ((packed));
+
 struct dtv_property {
        __u32 cmd;
        __u32 reserved[3];
        union {
                __u32 data;
+               struct dtv_fe_stats st;
                struct {
                        __u8 data[32];
                        __u32 len;
index 0559e2b..e53e2ad 100644 (file)
@@ -24,6 +24,6 @@
 #define _DVBVERSION_H_
 
 #define DVB_API_VERSION 5
-#define DVB_API_VERSION_MINOR 5
+#define DVB_API_VERSION_MINOR 10
 
 #endif /*_DVBVERSION_H_*/
index fec79a7..4bb276c 100644 (file)
@@ -269,4 +269,4 @@ typedef __u16 video_attributes_t;
 #define VIDEO_COMMAND             _IOWR('o', 59, struct video_command)
 #define VIDEO_TRY_COMMAND         _IOWR('o', 60, struct video_command)
 
-#endif /*_DVBVIDEO_H_*/
+#endif /* _DVBVIDEO_H_ */
index 31c2b12..190815d 100644 (file)
@@ -188,4 +188,4 @@ struct edd {
 
 #endif                         /*!__ASSEMBLY__ */
 
-#endif                         /* _LINUX_EDD_H */
+#endif /* _LINUX_EDD_H */
index f52f635..5748a46 100644 (file)
@@ -31,32 +31,4 @@ struct elf32_fdpic_loadmap {
 
 #define ELF32_FDPIC_LOADMAP_VERSION    0x0000
 
-/*
- * binfmt binary parameters structure
- */
-struct elf_fdpic_params {
-       struct elfhdr                   hdr;            /* ref copy of ELF header */
-       struct elf_phdr                 *phdrs;         /* ref copy of PT_PHDR table */
-       struct elf32_fdpic_loadmap      *loadmap;       /* loadmap to be passed to userspace */
-       unsigned long                   elfhdr_addr;    /* mapped ELF header user address */
-       unsigned long                   ph_addr;        /* mapped PT_PHDR user address */
-       unsigned long                   map_addr;       /* mapped loadmap user address */
-       unsigned long                   entry_addr;     /* mapped entry user address */
-       unsigned long                   stack_size;     /* stack size requested (PT_GNU_STACK) */
-       unsigned long                   dynamic_addr;   /* mapped PT_DYNAMIC user address */
-       unsigned long                   load_addr;      /* user address at which to map binary */
-       unsigned long                   flags;
-#define ELF_FDPIC_FLAG_ARRANGEMENT     0x0000000f      /* PT_LOAD arrangement flags */
-#define ELF_FDPIC_FLAG_INDEPENDENT     0x00000000      /* PT_LOADs can be put anywhere */
-#define ELF_FDPIC_FLAG_HONOURVADDR     0x00000001      /* PT_LOAD.vaddr must be honoured */
-#define ELF_FDPIC_FLAG_CONSTDISP       0x00000002      /* PT_LOADs require constant
-                                                        * displacement */
-#define ELF_FDPIC_FLAG_CONTIGUOUS      0x00000003      /* PT_LOADs should be contiguous */
-#define ELF_FDPIC_FLAG_EXEC_STACK      0x00000010      /* T if stack to be executable */
-#define ELF_FDPIC_FLAG_NOEXEC_STACK    0x00000020      /* T if stack not to be executable */
-#define ELF_FDPIC_FLAG_EXECUTABLE      0x00000040      /* T if this object is the executable */
-#define ELF_FDPIC_FLAG_PRESENT         0x80000000      /* T if this object is present */
-};
-
-
 #endif /* _LINUX_ELF_FDPIC_H */
index d739b23..1a95967 100644 (file)
@@ -49,14 +49,14 @@ typedef __s64       Elf64_Sxword;
  *
  * Specifications are available in:
  *
- * - Sun microsystems: Linker and Libraries.
- *   Part No: 817-1984-17, September 2008.
- *   URL: http://docs.sun.com/app/docs/doc/817-1984
+ * - Oracle: Linker and Libraries.
+ *   Part No: 817–1984–19, August 2011.
+ *   http://docs.oracle.com/cd/E18752_01/pdf/817-1984.pdf
  *
  * - System V ABI AMD64 Architecture Processor Supplement
- *   Draft Version 0.99.,
- *   May 11, 2009.
- *   URL: http://www.x86-64.org/
+ *   Draft Version 0.99.4,
+ *   January 13, 2010.
+ *   http://www.cs.washington.edu/education/courses/cse351/12wi/supp-docs/abi.pdf
  */
 #define PN_XNUM 0xffff
 
@@ -369,6 +369,12 @@ typedef struct elf64_shdr {
 #define NT_PRPSINFO    3
 #define NT_TASKSTRUCT  4
 #define NT_AUXV                6
+/*
+ * Note to userspace developers: size of NT_SIGINFO note may increase
+ * in the future to accomodate more fields, don't assume it is fixed!
+ */
+#define NT_SIGINFO      0x53494749
+#define NT_FILE         0x46494c45
 #define NT_PRXFPREG     0x46e62b7f      /* copied from gdb5.1/include/elf/common.h */
 #define NT_PPC_VMX     0x100           /* PowerPC Altivec/VMX registers */
 #define NT_PPC_SPE     0x101           /* PowerPC SPE/EVR registers */
@@ -384,7 +390,14 @@ typedef struct elf64_shdr {
 #define NT_S390_PREFIX 0x305           /* s390 prefix register */
 #define NT_S390_LAST_BREAK     0x306   /* s390 breaking event address */
 #define NT_S390_SYSTEM_CALL    0x307   /* s390 system call restart data */
+#define NT_S390_TDB    0x308           /* s390 transaction diagnostic block */
 #define NT_ARM_VFP     0x400           /* ARM VFP/NEON registers */
+#define NT_ARM_TLS     0x401           /* ARM TLS register */
+#define NT_ARM_HW_BREAK        0x402           /* ARM hardware breakpoint registers */
+#define NT_ARM_HW_WATCH        0x403           /* ARM hardware watchpoint registers */
+#define NT_METAG_CBUF  0x500           /* Metag catch buffer registers */
+#define NT_METAG_RPIPE 0x501           /* Metag read pipeline state */
+#define NT_METAG_TLS   0x502           /* Metag TLS pointer */
 
 
 /* Note header in a PT_NOTE section */
index 6385fa3..70f2bd3 100644 (file)
@@ -1,7 +1 @@
-#ifndef _LINUX_ERRNO_H
-#define _LINUX_ERRNO_H
-
 #include <asm/errno.h>
-
-
-#endif
index bccd3a1..12e2eae 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef _LINUX_ERRQUEUE_H
-#define _LINUX_ERRQUEUE_H 1
+#define _LINUX_ERRQUEUE_H
 
 #include <linux/types.h>
 
@@ -23,4 +23,4 @@ struct sock_extended_err {
 #define SO_EE_OFFENDER(ee)     ((struct sockaddr*)((ee)+1))
 
 
-#endif
+#endif /* _LINUX_ERRQUEUE_H */
index 8a7ec9d..b5515c2 100644 (file)
@@ -42,8 +42,10 @@ struct ethtool_cmd {
                                 * bits) in Mbps. Please use
                                 * ethtool_cmd_speed()/_set() to
                                 * access it */
-       __u8    eth_tp_mdix;
-       __u8    reserved2;
+       __u8    eth_tp_mdix;    /* twisted pair MDI-X status */
+       __u8    eth_tp_mdix_ctrl; /* twisted pair MDI-X control, when set,
+                                  * link should be renegotiated if necessary
+                                  */
        __u32   lp_advertising; /* Features the link partner advertises */
        __u32   reserved[2];
 };
@@ -134,6 +136,52 @@ struct ethtool_eeprom {
 };
 
 /**
+ * struct ethtool_eee - Energy Efficient Ethernet information
+ * @cmd: ETHTOOL_{G,S}EEE
+ * @supported: Mask of %SUPPORTED_* flags for the speed/duplex combinations
+ *     for which there is EEE support.
+ * @advertised: Mask of %ADVERTISED_* flags for the speed/duplex combinations
+ *     advertised as eee capable.
+ * @lp_advertised: Mask of %ADVERTISED_* flags for the speed/duplex
+ *     combinations advertised by the link partner as eee capable.
+ * @eee_active: Result of the eee auto negotiation.
+ * @eee_enabled: EEE configured mode (enabled/disabled).
+ * @tx_lpi_enabled: Whether the interface should assert its tx lpi, given
+ *     that eee was negotiated.
+ * @tx_lpi_timer: Time in microseconds the interface delays prior to asserting
+ *     its tx lpi (after reaching 'idle' state). Effective only when eee
+ *     was negotiated and tx_lpi_enabled was set.
+ */
+struct ethtool_eee {
+       __u32   cmd;
+       __u32   supported;
+       __u32   advertised;
+       __u32   lp_advertised;
+       __u32   eee_active;
+       __u32   eee_enabled;
+       __u32   tx_lpi_enabled;
+       __u32   tx_lpi_timer;
+       __u32   reserved[2];
+};
+
+/**
+ * struct ethtool_modinfo - plugin module eeprom information
+ * @cmd: %ETHTOOL_GMODULEINFO
+ * @type: Standard the module information conforms to %ETH_MODULE_SFF_xxxx
+ * @eeprom_len: Length of the eeprom
+ *
+ * This structure is used to return the information to
+ * properly size memory for a subsequent call to %ETHTOOL_GMODULEEEPROM.
+ * The type code indicates the eeprom data format
+ */
+struct ethtool_modinfo {
+       __u32   cmd;
+       __u32   type;
+       __u32   eeprom_len;
+       __u32   reserved[8];
+};
+
+/**
  * struct ethtool_coalesce - coalescing parameters for IRQs and stats updates
  * @cmd: ETHTOOL_{G,S}COALESCE
  * @rx_coalesce_usecs: How many usecs to delay an RX interrupt after
@@ -452,13 +500,26 @@ union ethtool_flow_union {
        struct ethtool_ah_espip4_spec           esp_ip4_spec;
        struct ethtool_usrip4_spec              usr_ip4_spec;
        struct ethhdr                           ether_spec;
-       __u8                                    hdata[60];
+       __u8                                    hdata[52];
 };
 
+/**
+ * struct ethtool_flow_ext - additional RX flow fields
+ * @h_dest: destination MAC address
+ * @vlan_etype: VLAN EtherType
+ * @vlan_tci: VLAN tag control information
+ * @data: user defined data
+ *
+ * Note, @vlan_etype, @vlan_tci, and @data are only valid if %FLOW_EXT
+ * is set in &struct ethtool_rx_flow_spec @flow_type.
+ * @h_dest is valid if %FLOW_MAC_EXT is set.
+ */
 struct ethtool_flow_ext {
-       __be16  vlan_etype;
-       __be16  vlan_tci;
-       __be32  data[2];
+       __u8            padding[2];
+       unsigned char   h_dest[ETH_ALEN];
+       __be16          vlan_etype;
+       __be16          vlan_tci;
+       __be32          data[2];
 };
 
 /**
@@ -469,7 +530,8 @@ struct ethtool_flow_ext {
  * @m_u: Masks for flow field bits to be matched
  * @m_ext: Masks for additional field bits to be matched
  *     Note, all additional fields must be ignored unless @flow_type
- *     includes the %FLOW_EXT flag.
+ *     includes the %FLOW_EXT or %FLOW_MAC_EXT flag
+ *     (see &struct ethtool_flow_ext description).
  * @ring_cookie: RX ring/queue index to deliver to, or %RX_CLS_FLOW_DISC
  *     if packets should be discarded
  * @location: Location of rule in the table.  Locations must be
@@ -634,12 +696,17 @@ struct ethtool_flash {
  *     %ETHTOOL_SET_DUMP
  * @version: FW version of the dump, filled in by driver
  * @flag: driver dependent flag for dump setting, filled in by driver during
- *       get and filled in by ethtool for set operation
+ *        get and filled in by ethtool for set operation.
+ *        flag must be initialized by macro ETH_FW_DUMP_DISABLE value when
+ *        firmware dump is disabled.
  * @len: length of dump data, used as the length of the user buffer on entry to
  *      %ETHTOOL_GET_DUMP_DATA and this is returned as dump length by driver
  *      for %ETHTOOL_GET_DUMP_FLAG command
  * @data: data collected for get dump data operation
  */
+
+#define ETH_FW_DUMP_DISABLE 0
+
 struct ethtool_dump {
        __u32   cmd;
        __u32   version;
@@ -699,6 +766,29 @@ struct ethtool_sfeatures {
        struct ethtool_set_features_block features[0];
 };
 
+/**
+ * struct ethtool_ts_info - holds a device's timestamping and PHC association
+ * @cmd: command number = %ETHTOOL_GET_TS_INFO
+ * @so_timestamping: bit mask of the sum of the supported SO_TIMESTAMPING flags
+ * @phc_index: device index of the associated PHC, or -1 if there is none
+ * @tx_types: bit mask of the supported hwtstamp_tx_types enumeration values
+ * @rx_filters: bit mask of the supported hwtstamp_rx_filters enumeration values
+ *
+ * The bits in the 'tx_types' and 'rx_filters' fields correspond to
+ * the 'hwtstamp_tx_types' and 'hwtstamp_rx_filters' enumeration values,
+ * respectively.  For example, if the device supports HWTSTAMP_TX_ON,
+ * then (1 << HWTSTAMP_TX_ON) in 'tx_types' will be set.
+ */
+struct ethtool_ts_info {
+       __u32   cmd;
+       __u32   so_timestamping;
+       __s32   phc_index;
+       __u32   tx_types;
+       __u32   tx_reserved[3];
+       __u32   rx_filters;
+       __u32   rx_reserved[3];
+};
+
 /*
  * %ETHTOOL_SFEATURES changes features present in features[].valid to the
  * values of corresponding bits in features[].requested. Bits in .requested
@@ -805,6 +895,11 @@ enum ethtool_sfeatures_retval_bits {
 #define ETHTOOL_SET_DUMP       0x0000003e /* Set dump settings */
 #define ETHTOOL_GET_DUMP_FLAG  0x0000003f /* Get dump settings */
 #define ETHTOOL_GET_DUMP_DATA  0x00000040 /* Get dump data */
+#define ETHTOOL_GET_TS_INFO    0x00000041 /* Get time stamping and PHC info */
+#define ETHTOOL_GMODULEINFO    0x00000042 /* Get plug-in module information */
+#define ETHTOOL_GMODULEEEPROM  0x00000043 /* Get plug-in module eeprom */
+#define ETHTOOL_GEEE           0x00000044 /* Get EEE settings */
+#define ETHTOOL_SEEE           0x00000045 /* Set EEE settings */
 
 /* compatibility with older code */
 #define SPARC_ETH_GSET         ETHTOOL_GSET
@@ -834,6 +929,10 @@ enum ethtool_sfeatures_retval_bits {
 #define SUPPORTED_10000baseR_FEC       (1 << 20)
 #define SUPPORTED_20000baseMLD2_Full   (1 << 21)
 #define SUPPORTED_20000baseKR2_Full    (1 << 22)
+#define SUPPORTED_40000baseKR4_Full    (1 << 23)
+#define SUPPORTED_40000baseCR4_Full    (1 << 24)
+#define SUPPORTED_40000baseSR4_Full    (1 << 25)
+#define SUPPORTED_40000baseLR4_Full    (1 << 26)
 
 /* Indicates what features are advertised by the interface. */
 #define ADVERTISED_10baseT_Half                (1 << 0)
@@ -859,6 +958,10 @@ enum ethtool_sfeatures_retval_bits {
 #define ADVERTISED_10000baseR_FEC      (1 << 20)
 #define ADVERTISED_20000baseMLD2_Full  (1 << 21)
 #define ADVERTISED_20000baseKR2_Full   (1 << 22)
+#define ADVERTISED_40000baseKR4_Full   (1 << 23)
+#define ADVERTISED_40000baseCR4_Full   (1 << 24)
+#define ADVERTISED_40000baseSR4_Full   (1 << 25)
+#define ADVERTISED_40000baseLR4_Full   (1 << 26)
 
 /* The following are all involved in forcing a particular link
  * mode for the device for setting things.  When getting the
@@ -902,10 +1005,13 @@ enum ethtool_sfeatures_retval_bits {
 #define AUTONEG_DISABLE                0x00
 #define AUTONEG_ENABLE         0x01
 
-/* Mode MDI or MDI-X */
-#define ETH_TP_MDI_INVALID     0x00
-#define ETH_TP_MDI             0x01
-#define ETH_TP_MDI_X           0x02
+/* MDI or MDI-X status/control - if MDI/MDI_X/AUTO is set then
+ * the driver is required to renegotiate link
+ */
+#define ETH_TP_MDI_INVALID     0x00 /* status: unknown; control: unsupported */
+#define ETH_TP_MDI             0x01 /* status: MDI;     control: force MDI */
+#define ETH_TP_MDI_X           0x02 /* status: MDI-X;   control: force MDI-X */
+#define ETH_TP_MDI_AUTO                0x03 /*                  control: auto-select */
 
 /* Wake-On-Lan options. */
 #define WAKE_PHY               (1 << 0)
@@ -935,6 +1041,7 @@ enum ethtool_sfeatures_retval_bits {
 #define        ETHER_FLOW      0x12    /* spec only (ether_spec) */
 /* Flag to enable additional fields in struct ethtool_rx_flow_spec */
 #define        FLOW_EXT        0x80000000
+#define        FLOW_MAC_EXT    0x40000000
 
 /* L3-L4 network traffic flow hash options */
 #define        RXH_L2DA        (1 << 1)
@@ -954,6 +1061,12 @@ enum ethtool_sfeatures_retval_bits {
 #define RX_CLS_LOC_FIRST       0xfffffffe
 #define RX_CLS_LOC_LAST                0xfffffffd
 
+/* EEPROM Standards for plug in modules */
+#define ETH_MODULE_SFF_8079            0x1
+#define ETH_MODULE_SFF_8079_LEN                256
+#define ETH_MODULE_SFF_8472            0x2
+#define ETH_MODULE_SFF_8472_LEN                512
+
 /* Reset flags */
 /* The reset() operation must clear the flags for the components which
  * were actually reset.  On successful return, the flags indicate the
index c38a02f..998e3b2 100644 (file)
 #define EPOLL_CTL_DEL 2
 #define EPOLL_CTL_MOD 3
 
+/*
+ * Request the handling of system wakeup events so as to prevent system suspends
+ * from happening while those events are being processed.
+ *
+ * Assuming neither EPOLLET nor EPOLLONESHOT is set, system suspends will not be
+ * re-allowed until epoll_wait is called again after consuming the wakeup
+ * event(s).
+ *
+ * Requires CAP_BLOCK_SUSPEND
+ */
+#define EPOLLWAKEUP (1 << 29)
+
 /* Set the One Shot behaviour for the target file descriptor */
 #define EPOLLONESHOT (1 << 30)
 
@@ -50,5 +62,4 @@ struct epoll_event {
 } EPOLL_PACKED;
 
 
-#endif /* #ifndef _LINUX_EVENTPOLL_H */
-
+#endif /* _LINUX_EVENTPOLL_H */
index e9bb4b7..49c4602 100644 (file)
@@ -3,6 +3,7 @@
 
 #define FALLOC_FL_KEEP_SIZE    0x01 /* default is extend size */
 #define FALLOC_FL_PUNCH_HOLE   0x02 /* de-allocates range */
+#define FALLOC_FL_NO_HIDE_STALE        0x04 /* reserved codepoint */
 
 
 #endif /* _FALLOC_H_ */
index df54484..08683ab 100644 (file)
@@ -49,4 +49,4 @@
 #define AT_EMPTY_PATH          0x1000  /* Allow empty relative pathname */
 
 
-#endif
+#endif /* _LINUX_FCNTL_H */
index 60a1a59..c43c4c8 100644 (file)
@@ -379,4 +379,4 @@ struct floppy_raw_cmd {
 
 
 
-#endif
+#endif /* _LINUX_FD_H */
index 839e026..9a46cb6 100644 (file)
@@ -70,6 +70,9 @@ struct sock_fprog {   /* Required for SO_ATTACH_FILTER. */
 #define         BPF_LSH         0x60
 #define         BPF_RSH         0x70
 #define         BPF_NEG         0x80
+#define                BPF_MOD         0x90
+#define                BPF_XOR         0xa0
+
 #define         BPF_JA          0x00
 #define         BPF_JEQ         0x10
 #define         BPF_JGT         0x20
@@ -123,7 +126,11 @@ struct sock_fprog {        /* Required for SO_ATTACH_FILTER. */
 #define SKF_AD_HATYPE  28
 #define SKF_AD_RXHASH  32
 #define SKF_AD_CPU     36
-#define SKF_AD_MAX     40
+#define SKF_AD_ALU_XOR_X       40
+#define SKF_AD_VLAN_TAG        44
+#define SKF_AD_VLAN_TAG_PRESENT 48
+#define SKF_AD_PAY_OFFSET      52
+#define SKF_AD_MAX     56
 #define SKF_NET_OFF   (-0x100000)
 #define SKF_LL_OFF    (-0x200000)
 
index c325cc5..abe7d5c 100644 (file)
@@ -8,7 +8,6 @@
 
 #include <linux/limits.h>
 #include <linux/ioctl.h>
-#include <linux/blk_types.h>
 #include <linux/types.h>
 
 /*
@@ -58,133 +57,6 @@ struct inodes_stat_t {
 
 #define NR_FILE  8192  /* this can well be larger on a larger system */
 
-#define MAY_EXEC               0x00000001
-#define MAY_WRITE              0x00000002
-#define MAY_READ               0x00000004
-#define MAY_APPEND             0x00000008
-#define MAY_ACCESS             0x00000010
-#define MAY_OPEN               0x00000020
-#define MAY_CHDIR              0x00000040
-/* called from RCU mode, don't block */
-#define MAY_NOT_BLOCK          0x00000080
-
-/*
- * flags in file.f_mode.  Note that FMODE_READ and FMODE_WRITE must correspond
- * to O_WRONLY and O_RDWR via the strange trick in __dentry_open()
- */
-
-/* file is open for reading */
-#define FMODE_READ             ((fmode_t)0x1)
-/* file is open for writing */
-#define FMODE_WRITE            ((fmode_t)0x2)
-/* file is seekable */
-#define FMODE_LSEEK            ((fmode_t)0x4)
-/* file can be accessed using pread */
-#define FMODE_PREAD            ((fmode_t)0x8)
-/* file can be accessed using pwrite */
-#define FMODE_PWRITE           ((fmode_t)0x10)
-/* File is opened for execution with sys_execve / sys_uselib */
-#define FMODE_EXEC             ((fmode_t)0x20)
-/* File is opened with O_NDELAY (only set for block devices) */
-#define FMODE_NDELAY           ((fmode_t)0x40)
-/* File is opened with O_EXCL (only set for block devices) */
-#define FMODE_EXCL             ((fmode_t)0x80)
-/* File is opened using open(.., 3, ..) and is writeable only for ioctls
-   (specialy hack for floppy.c) */
-#define FMODE_WRITE_IOCTL      ((fmode_t)0x100)
-/* 32bit hashes as llseek() offset (for directories) */
-#define FMODE_32BITHASH         ((fmode_t)0x200)
-/* 64bit hashes as llseek() offset (for directories) */
-#define FMODE_64BITHASH         ((fmode_t)0x400)
-
-/*
- * Don't update ctime and mtime.
- *
- * Currently a special hack for the XFS open_by_handle ioctl, but we'll
- * hopefully graduate it to a proper O_CMTIME flag supported by open(2) soon.
- */
-#define FMODE_NOCMTIME         ((fmode_t)0x800)
-
-/* Expect random access pattern */
-#define FMODE_RANDOM           ((fmode_t)0x1000)
-
-/* File is huge (eg. /dev/kmem): treat loff_t as unsigned */
-#define FMODE_UNSIGNED_OFFSET  ((fmode_t)0x2000)
-
-/* File is opened with O_PATH; almost nothing can be done with it */
-#define FMODE_PATH             ((fmode_t)0x4000)
-
-/* File was opened by fanotify and shouldn't generate fanotify events */
-#define FMODE_NONOTIFY         ((fmode_t)0x1000000)
-
-/*
- * The below are the various read and write types that we support. Some of
- * them include behavioral modifiers that send information down to the
- * block layer and IO scheduler. Terminology:
- *
- *     The block layer uses device plugging to defer IO a little bit, in
- *     the hope that we will see more IO very shortly. This increases
- *     coalescing of adjacent IO and thus reduces the number of IOs we
- *     have to send to the device. It also allows for better queuing,
- *     if the IO isn't mergeable. If the caller is going to be waiting
- *     for the IO, then he must ensure that the device is unplugged so
- *     that the IO is dispatched to the driver.
- *
- *     All IO is handled async in Linux. This is fine for background
- *     writes, but for reads or writes that someone waits for completion
- *     on, we want to notify the block layer and IO scheduler so that they
- *     know about it. That allows them to make better scheduling
- *     decisions. So when the below references 'sync' and 'async', it
- *     is referencing this priority hint.
- *
- * With that in mind, the available types are:
- *
- * READ                        A normal read operation. Device will be plugged.
- * READ_SYNC           A synchronous read. Device is not plugged, caller can
- *                     immediately wait on this read without caring about
- *                     unplugging.
- * READA               Used for read-ahead operations. Lower priority, and the
- *                     block layer could (in theory) choose to ignore this
- *                     request if it runs into resource problems.
- * WRITE               A normal async write. Device will be plugged.
- * WRITE_SYNC          Synchronous write. Identical to WRITE, but passes down
- *                     the hint that someone will be waiting on this IO
- *                     shortly. The write equivalent of READ_SYNC.
- * WRITE_ODIRECT       Special case write for O_DIRECT only.
- * WRITE_FLUSH         Like WRITE_SYNC but with preceding cache flush.
- * WRITE_FUA           Like WRITE_SYNC but data is guaranteed to be on
- *                     non-volatile media on completion.
- * WRITE_FLUSH_FUA     Combination of WRITE_FLUSH and FUA. The IO is preceded
- *                     by a cache flush and data is guaranteed to be on
- *                     non-volatile media on completion.
- *
- */
-#define RW_MASK                        REQ_WRITE
-#define RWA_MASK               REQ_RAHEAD
-
-#define READ                   0
-#define WRITE                  RW_MASK
-#define READA                  RWA_MASK
-
-#define READ_SYNC              (READ | REQ_SYNC)
-#define WRITE_SYNC             (WRITE | REQ_SYNC | REQ_NOIDLE)
-#define WRITE_ODIRECT          (WRITE | REQ_SYNC)
-#define WRITE_FLUSH            (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FLUSH)
-#define WRITE_FUA              (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FUA)
-#define WRITE_FLUSH_FUA                (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FLUSH | REQ_FUA)
-
-#define SEL_IN         1
-#define SEL_OUT                2
-#define SEL_EX         4
-
-/* public flags for file_system_type */
-#define FS_REQUIRES_DEV 1 
-#define FS_BINARY_MOUNTDATA 2
-#define FS_HAS_SUBTYPE 4
-#define FS_REVAL_DOT   16384   /* Check the paths ".", ".." for staleness */
-#define FS_RENAME_DOES_D_MOVE  32768   /* FS will handle d_move()
-                                        * during rename() internally.
-                                        */
 
 /*
  * These are the fs-independent mount-flags: up to 32 flags are supported
@@ -214,6 +86,8 @@ struct inodes_stat_t {
 #define MS_KERNMOUNT   (1<<22) /* this is a kern_mount call */
 #define MS_I_VERSION   (1<<23) /* Update inode I_version field */
 #define MS_STRICTATIME (1<<24) /* Always perform atime updates */
+
+/* These sb flags are internal to the kernel */
 #define MS_NOSEC       (1<<28)
 #define MS_BORN                (1<<29)
 #define MS_ACTIVE      (1<<30)
@@ -230,59 +104,6 @@ struct inodes_stat_t {
 #define MS_MGC_VAL 0xC0ED0000
 #define MS_MGC_MSK 0xffff0000
 
-/* Inode flags - they have nothing to superblock flags now */
-
-#define S_SYNC         1       /* Writes are synced at once */
-#define S_NOATIME      2       /* Do not update access times */
-#define S_APPEND       4       /* Append-only file */
-#define S_IMMUTABLE    8       /* Immutable file */
-#define S_DEAD         16      /* removed, but still open directory */
-#define S_NOQUOTA      32      /* Inode is not counted to quota */
-#define S_DIRSYNC      64      /* Directory modifications are synchronous */
-#define S_NOCMTIME     128     /* Do not update file c/mtime */
-#define S_SWAPFILE     256     /* Do not truncate: swapon got its bmaps */
-#define S_PRIVATE      512     /* Inode is fs-internal */
-#define S_IMA          1024    /* Inode has an associated IMA struct */
-#define S_AUTOMOUNT    2048    /* Automount/referral quasi-directory */
-#define S_NOSEC                4096    /* no suid or xattr security attributes */
-
-/*
- * Note that nosuid etc flags are inode-specific: setting some file-system
- * flags just means all the inodes inherit those flags by default. It might be
- * possible to override it selectively if you really wanted to with some
- * ioctl() that is not currently implemented.
- *
- * Exception: MS_RDONLY is always applied to the entire file system.
- *
- * Unfortunately, it is possible to change a filesystems flags with it mounted
- * with files in use.  This means that all of the inodes will not have their
- * i_flags updated.  Hence, i_flags no longer inherit the superblock mount
- * flags, so these have to be checked separately. -- rmk@arm.uk.linux.org
- */
-#define __IS_FLG(inode,flg) ((inode)->i_sb->s_flags & (flg))
-
-#define IS_RDONLY(inode) ((inode)->i_sb->s_flags & MS_RDONLY)
-#define IS_SYNC(inode)         (__IS_FLG(inode, MS_SYNCHRONOUS) || \
-                                       ((inode)->i_flags & S_SYNC))
-#define IS_DIRSYNC(inode)      (__IS_FLG(inode, MS_SYNCHRONOUS|MS_DIRSYNC) || \
-                                       ((inode)->i_flags & (S_SYNC|S_DIRSYNC)))
-#define IS_MANDLOCK(inode)     __IS_FLG(inode, MS_MANDLOCK)
-#define IS_NOATIME(inode)   __IS_FLG(inode, MS_RDONLY|MS_NOATIME)
-#define IS_I_VERSION(inode)   __IS_FLG(inode, MS_I_VERSION)
-
-#define IS_NOQUOTA(inode)      ((inode)->i_flags & S_NOQUOTA)
-#define IS_APPEND(inode)       ((inode)->i_flags & S_APPEND)
-#define IS_IMMUTABLE(inode)    ((inode)->i_flags & S_IMMUTABLE)
-#define IS_POSIXACL(inode)     __IS_FLG(inode, MS_POSIXACL)
-
-#define IS_DEADDIR(inode)      ((inode)->i_flags & S_DEAD)
-#define IS_NOCMTIME(inode)     ((inode)->i_flags & S_NOCMTIME)
-#define IS_SWAPFILE(inode)     ((inode)->i_flags & S_SWAPFILE)
-#define IS_PRIVATE(inode)      ((inode)->i_flags & S_PRIVATE)
-#define IS_IMA(inode)          ((inode)->i_flags & S_IMA)
-#define IS_AUTOMOUNT(inode)    ((inode)->i_flags & S_AUTOMOUNT)
-#define IS_NOSEC(inode)                ((inode)->i_flags & S_NOSEC)
-
 /* the read-only stuff doesn't really belong here, but any other place is
    probably as bad and I don't want to create yet another include file. */
 
@@ -324,6 +145,7 @@ struct inodes_stat_t {
 #define BLKDISCARDZEROES _IO(0x12,124)
 #define BLKSECDISCARD _IO(0x12,125)
 #define BLKROTATIONAL _IO(0x12,126)
+#define BLKZEROOUT _IO(0x12,127)
 
 #define BMAP_IOCTL 1           /* obsolete - kept for compatibility */
 #define FIBMAP    _IO(0x00,1)  /* bmap access */
index 0c82155..2f908de 100644 (file)
@@ -217,4 +217,4 @@ struct fsl_hv_ioctl_prop {
        _IOWR(FSL_HV_IOCTL_TYPE, 8, struct fsl_hv_ioctl_prop)
 
 
-#endif
+#endif /* FSL_HYPERVISOR_H */
index 8f2ab8f..d7bd86d 100644 (file)
@@ -1,9 +1,35 @@
 /*
-    FUSE: Filesystem in Userspace
+    This file defines the kernel interface of FUSE
     Copyright (C) 2001-2008  Miklos Szeredi <miklos@szeredi.hu>
 
     This program can be distributed under the terms of the GNU GPL.
     See the file COPYING.
+
+    This -- and only this -- header file may also be distributed under
+    the terms of the BSD Licence as follows:
+
+    Copyright (C) 2001-2007 Miklos Szeredi. All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions
+    are met:
+    1. Redistributions of source code must retain the above copyright
+       notice, this list of conditions and the following disclaimer.
+    2. 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.
+
+    THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``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 AUTHOR OR CONTRIBUTORS 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.
 */
 
 /*
  * 7.18
  *  - add FUSE_IOCTL_DIR flag
  *  - add FUSE_NOTIFY_DELETE
+ *
+ * 7.19
+ *  - add FUSE_FALLOCATE
+ *
+ * 7.20
+ *  - add FUSE_AUTO_INVAL_DATA
+ *
+ * 7.21
+ *  - add FUSE_READDIRPLUS
+ *  - send the requested events in POLL request
+ *
+ * 7.22
+ *  - add FUSE_ASYNC_DIO
  */
 
 #ifndef _LINUX_FUSE_H
 #define _LINUX_FUSE_H
 
-#include <linux/types.h>
+#include <stdint.h>
 
 /*
  * Version negotiation:
 #define FUSE_KERNEL_VERSION 7
 
 /** Minor version number of this interface */
-#define FUSE_KERNEL_MINOR_VERSION 18
+#define FUSE_KERNEL_MINOR_VERSION 22
 
 /** The node ID of the root inode */
 #define FUSE_ROOT_ID 1
    userspace works under 64bit kernels */
 
 struct fuse_attr {
-       __u64   ino;
-       __u64   size;
-       __u64   blocks;
-       __u64   atime;
-       __u64   mtime;
-       __u64   ctime;
-       __u32   atimensec;
-       __u32   mtimensec;
-       __u32   ctimensec;
-       __u32   mode;
-       __u32   nlink;
-       __u32   uid;
-       __u32   gid;
-       __u32   rdev;
-       __u32   blksize;
-       __u32   padding;
+       uint64_t        ino;
+       uint64_t        size;
+       uint64_t        blocks;
+       uint64_t        atime;
+       uint64_t        mtime;
+       uint64_t        ctime;
+       uint32_t        atimensec;
+       uint32_t        mtimensec;
+       uint32_t        ctimensec;
+       uint32_t        mode;
+       uint32_t        nlink;
+       uint32_t        uid;
+       uint32_t        gid;
+       uint32_t        rdev;
+       uint32_t        blksize;
+       uint32_t        padding;
 };
 
 struct fuse_kstatfs {
-       __u64   blocks;
-       __u64   bfree;
-       __u64   bavail;
-       __u64   files;
-       __u64   ffree;
-       __u32   bsize;
-       __u32   namelen;
-       __u32   frsize;
-       __u32   padding;
-       __u32   spare[6];
+       uint64_t        blocks;
+       uint64_t        bfree;
+       uint64_t        bavail;
+       uint64_t        files;
+       uint64_t        ffree;
+       uint32_t        bsize;
+       uint32_t        namelen;
+       uint32_t        frsize;
+       uint32_t        padding;
+       uint32_t        spare[6];
 };
 
 struct fuse_file_lock {
-       __u64   start;
-       __u64   end;
-       __u32   type;
-       __u32   pid; /* tgid */
+       uint64_t        start;
+       uint64_t        end;
+       uint32_t        type;
+       uint32_t        pid; /* tgid */
 };
 
 /**
@@ -160,10 +199,22 @@ struct fuse_file_lock {
 /**
  * INIT request/reply flags
  *
+ * FUSE_ASYNC_READ: asynchronous read requests
  * FUSE_POSIX_LOCKS: remote locking for POSIX file locks
+ * FUSE_FILE_OPS: kernel sends file handle for fstat, etc... (not yet supported)
+ * FUSE_ATOMIC_O_TRUNC: handles the O_TRUNC open flag in the filesystem
  * FUSE_EXPORT_SUPPORT: filesystem handles lookups of "." and ".."
+ * FUSE_BIG_WRITES: filesystem can handle write size larger than 4kB
  * FUSE_DONT_MASK: don't apply umask to file mode on create operations
+ * FUSE_SPLICE_WRITE: kernel supports splice write on the device
+ * FUSE_SPLICE_MOVE: kernel supports splice move on the device
+ * FUSE_SPLICE_READ: kernel supports splice read on the device
  * FUSE_FLOCK_LOCKS: remote locking for BSD style file locks
+ * FUSE_HAS_IOCTL_DIR: kernel supports ioctl on directories
+ * FUSE_AUTO_INVAL_DATA: automatically invalidate cached pages
+ * FUSE_DO_READDIRPLUS: do READDIRPLUS (READDIR+LOOKUP in one)
+ * FUSE_READDIRPLUS_AUTO: adaptive readdirplus
+ * FUSE_ASYNC_DIO: asynchronous direct I/O submission
  */
 #define FUSE_ASYNC_READ                (1 << 0)
 #define FUSE_POSIX_LOCKS       (1 << 1)
@@ -172,7 +223,15 @@ struct fuse_file_lock {
 #define FUSE_EXPORT_SUPPORT    (1 << 4)
 #define FUSE_BIG_WRITES                (1 << 5)
 #define FUSE_DONT_MASK         (1 << 6)
+#define FUSE_SPLICE_WRITE      (1 << 7)
+#define FUSE_SPLICE_MOVE       (1 << 8)
+#define FUSE_SPLICE_READ       (1 << 9)
 #define FUSE_FLOCK_LOCKS       (1 << 10)
+#define FUSE_HAS_IOCTL_DIR     (1 << 11)
+#define FUSE_AUTO_INVAL_DATA   (1 << 12)
+#define FUSE_DO_READDIRPLUS    (1 << 13)
+#define FUSE_READDIRPLUS_AUTO  (1 << 14)
+#define FUSE_ASYNC_DIO         (1 << 15)
 
 /**
  * CUSE INIT request/reply flags
@@ -278,6 +337,8 @@ enum fuse_opcode {
        FUSE_POLL          = 40,
        FUSE_NOTIFY_REPLY  = 41,
        FUSE_BATCH_FORGET  = 42,
+       FUSE_FALLOCATE     = 43,
+       FUSE_READDIRPLUS   = 44,
 
        /* CUSE specific operations */
        CUSE_INIT          = 4096,
@@ -299,143 +360,143 @@ enum fuse_notify_code {
 #define FUSE_COMPAT_ENTRY_OUT_SIZE 120
 
 struct fuse_entry_out {
-       __u64   nodeid;         /* Inode ID */
-       __u64   generation;     /* Inode generation: nodeid:gen must
-                                  be unique for the fs's lifetime */
-       __u64   entry_valid;    /* Cache timeout for the name */
-       __u64   attr_valid;     /* Cache timeout for the attributes */
-       __u32   entry_valid_nsec;
-       __u32   attr_valid_nsec;
+       uint64_t        nodeid;         /* Inode ID */
+       uint64_t        generation;     /* Inode generation: nodeid:gen must
+                                          be unique for the fs's lifetime */
+       uint64_t        entry_valid;    /* Cache timeout for the name */
+       uint64_t        attr_valid;     /* Cache timeout for the attributes */
+       uint32_t        entry_valid_nsec;
+       uint32_t        attr_valid_nsec;
        struct fuse_attr attr;
 };
 
 struct fuse_forget_in {
-       __u64   nlookup;
+       uint64_t        nlookup;
 };
 
 struct fuse_forget_one {
-       __u64   nodeid;
-       __u64   nlookup;
+       uint64_t        nodeid;
+       uint64_t        nlookup;
 };
 
 struct fuse_batch_forget_in {
-       __u32   count;
-       __u32   dummy;
+       uint32_t        count;
+       uint32_t        dummy;
 };
 
 struct fuse_getattr_in {
-       __u32   getattr_flags;
-       __u32   dummy;
-       __u64   fh;
+       uint32_t        getattr_flags;
+       uint32_t        dummy;
+       uint64_t        fh;
 };
 
 #define FUSE_COMPAT_ATTR_OUT_SIZE 96
 
 struct fuse_attr_out {
-       __u64   attr_valid;     /* Cache timeout for the attributes */
-       __u32   attr_valid_nsec;
-       __u32   dummy;
+       uint64_t        attr_valid;     /* Cache timeout for the attributes */
+       uint32_t        attr_valid_nsec;
+       uint32_t        dummy;
        struct fuse_attr attr;
 };
 
 #define FUSE_COMPAT_MKNOD_IN_SIZE 8
 
 struct fuse_mknod_in {
-       __u32   mode;
-       __u32   rdev;
-       __u32   umask;
-       __u32   padding;
+       uint32_t        mode;
+       uint32_t        rdev;
+       uint32_t        umask;
+       uint32_t        padding;
 };
 
 struct fuse_mkdir_in {
-       __u32   mode;
-       __u32   umask;
+       uint32_t        mode;
+       uint32_t        umask;
 };
 
 struct fuse_rename_in {
-       __u64   newdir;
+       uint64_t        newdir;
 };
 
 struct fuse_link_in {
-       __u64   oldnodeid;
+       uint64_t        oldnodeid;
 };
 
 struct fuse_setattr_in {
-       __u32   valid;
-       __u32   padding;
-       __u64   fh;
-       __u64   size;
-       __u64   lock_owner;
-       __u64   atime;
-       __u64   mtime;
-       __u64   unused2;
-       __u32   atimensec;
-       __u32   mtimensec;
-       __u32   unused3;
-       __u32   mode;
-       __u32   unused4;
-       __u32   uid;
-       __u32   gid;
-       __u32   unused5;
+       uint32_t        valid;
+       uint32_t        padding;
+       uint64_t        fh;
+       uint64_t        size;
+       uint64_t        lock_owner;
+       uint64_t        atime;
+       uint64_t        mtime;
+       uint64_t        unused2;
+       uint32_t        atimensec;
+       uint32_t        mtimensec;
+       uint32_t        unused3;
+       uint32_t        mode;
+       uint32_t        unused4;
+       uint32_t        uid;
+       uint32_t        gid;
+       uint32_t        unused5;
 };
 
 struct fuse_open_in {
-       __u32   flags;
-       __u32   unused;
+       uint32_t        flags;
+       uint32_t        unused;
 };
 
 struct fuse_create_in {
-       __u32   flags;
-       __u32   mode;
-       __u32   umask;
-       __u32   padding;
+       uint32_t        flags;
+       uint32_t        mode;
+       uint32_t        umask;
+       uint32_t        padding;
 };
 
 struct fuse_open_out {
-       __u64   fh;
-       __u32   open_flags;
-       __u32   padding;
+       uint64_t        fh;
+       uint32_t        open_flags;
+       uint32_t        padding;
 };
 
 struct fuse_release_in {
-       __u64   fh;
-       __u32   flags;
-       __u32   release_flags;
-       __u64   lock_owner;
+       uint64_t        fh;
+       uint32_t        flags;
+       uint32_t        release_flags;
+       uint64_t        lock_owner;
 };
 
 struct fuse_flush_in {
-       __u64   fh;
-       __u32   unused;
-       __u32   padding;
-       __u64   lock_owner;
+       uint64_t        fh;
+       uint32_t        unused;
+       uint32_t        padding;
+       uint64_t        lock_owner;
 };
 
 struct fuse_read_in {
-       __u64   fh;
-       __u64   offset;
-       __u32   size;
-       __u32   read_flags;
-       __u64   lock_owner;
-       __u32   flags;
-       __u32   padding;
+       uint64_t        fh;
+       uint64_t        offset;
+       uint32_t        size;
+       uint32_t        read_flags;
+       uint64_t        lock_owner;
+       uint32_t        flags;
+       uint32_t        padding;
 };
 
 #define FUSE_COMPAT_WRITE_IN_SIZE 24
 
 struct fuse_write_in {
-       __u64   fh;
-       __u64   offset;
-       __u32   size;
-       __u32   write_flags;
-       __u64   lock_owner;
-       __u32   flags;
-       __u32   padding;
+       uint64_t        fh;
+       uint64_t        offset;
+       uint32_t        size;
+       uint32_t        write_flags;
+       uint64_t        lock_owner;
+       uint32_t        flags;
+       uint32_t        padding;
 };
 
 struct fuse_write_out {
-       __u32   size;
-       __u32   padding;
+       uint32_t        size;
+       uint32_t        padding;
 };
 
 #define FUSE_COMPAT_STATFS_SIZE 48
@@ -445,32 +506,32 @@ struct fuse_statfs_out {
 };
 
 struct fuse_fsync_in {
-       __u64   fh;
-       __u32   fsync_flags;
-       __u32   padding;
+       uint64_t        fh;
+       uint32_t        fsync_flags;
+       uint32_t        padding;
 };
 
 struct fuse_setxattr_in {
-       __u32   size;
-       __u32   flags;
+       uint32_t        size;
+       uint32_t        flags;
 };
 
 struct fuse_getxattr_in {
-       __u32   size;
-       __u32   padding;
+       uint32_t        size;
+       uint32_t        padding;
 };
 
 struct fuse_getxattr_out {
-       __u32   size;
-       __u32   padding;
+       uint32_t        size;
+       uint32_t        padding;
 };
 
 struct fuse_lk_in {
-       __u64   fh;
-       __u64   owner;
+       uint64_t        fh;
+       uint64_t        owner;
        struct fuse_file_lock lk;
-       __u32   lk_flags;
-       __u32   padding;
+       uint32_t        lk_flags;
+       uint32_t        padding;
 };
 
 struct fuse_lk_out {
@@ -478,171 +539,190 @@ struct fuse_lk_out {
 };
 
 struct fuse_access_in {
-       __u32   mask;
-       __u32   padding;
+       uint32_t        mask;
+       uint32_t        padding;
 };
 
 struct fuse_init_in {
-       __u32   major;
-       __u32   minor;
-       __u32   max_readahead;
-       __u32   flags;
+       uint32_t        major;
+       uint32_t        minor;
+       uint32_t        max_readahead;
+       uint32_t        flags;
 };
 
 struct fuse_init_out {
-       __u32   major;
-       __u32   minor;
-       __u32   max_readahead;
-       __u32   flags;
-       __u16   max_background;
-       __u16   congestion_threshold;
-       __u32   max_write;
+       uint32_t        major;
+       uint32_t        minor;
+       uint32_t        max_readahead;
+       uint32_t        flags;
+       uint16_t        max_background;
+       uint16_t        congestion_threshold;
+       uint32_t        max_write;
 };
 
 #define CUSE_INIT_INFO_MAX 4096
 
 struct cuse_init_in {
-       __u32   major;
-       __u32   minor;
-       __u32   unused;
-       __u32   flags;
+       uint32_t        major;
+       uint32_t        minor;
+       uint32_t        unused;
+       uint32_t        flags;
 };
 
 struct cuse_init_out {
-       __u32   major;
-       __u32   minor;
-       __u32   unused;
-       __u32   flags;
-       __u32   max_read;
-       __u32   max_write;
-       __u32   dev_major;              /* chardev major */
-       __u32   dev_minor;              /* chardev minor */
-       __u32   spare[10];
+       uint32_t        major;
+       uint32_t        minor;
+       uint32_t        unused;
+       uint32_t        flags;
+       uint32_t        max_read;
+       uint32_t        max_write;
+       uint32_t        dev_major;              /* chardev major */
+       uint32_t        dev_minor;              /* chardev minor */
+       uint32_t        spare[10];
 };
 
 struct fuse_interrupt_in {
-       __u64   unique;
+       uint64_t        unique;
 };
 
 struct fuse_bmap_in {
-       __u64   block;
-       __u32   blocksize;
-       __u32   padding;
+       uint64_t        block;
+       uint32_t        blocksize;
+       uint32_t        padding;
 };
 
 struct fuse_bmap_out {
-       __u64   block;
+       uint64_t        block;
 };
 
 struct fuse_ioctl_in {
-       __u64   fh;
-       __u32   flags;
-       __u32   cmd;
-       __u64   arg;
-       __u32   in_size;
-       __u32   out_size;
+       uint64_t        fh;
+       uint32_t        flags;
+       uint32_t        cmd;
+       uint64_t        arg;
+       uint32_t        in_size;
+       uint32_t        out_size;
 };
 
 struct fuse_ioctl_iovec {
-       __u64   base;
-       __u64   len;
+       uint64_t        base;
+       uint64_t        len;
 };
 
 struct fuse_ioctl_out {
-       __s32   result;
-       __u32   flags;
-       __u32   in_iovs;
-       __u32   out_iovs;
+       int32_t         result;
+       uint32_t        flags;
+       uint32_t        in_iovs;
+       uint32_t        out_iovs;
 };
 
 struct fuse_poll_in {
-       __u64   fh;
-       __u64   kh;
-       __u32   flags;
-       __u32   padding;
+       uint64_t        fh;
+       uint64_t        kh;
+       uint32_t        flags;
+       uint32_t        events;
 };
 
 struct fuse_poll_out {
-       __u32   revents;
-       __u32   padding;
+       uint32_t        revents;
+       uint32_t        padding;
 };
 
 struct fuse_notify_poll_wakeup_out {
-       __u64   kh;
+       uint64_t        kh;
+};
+
+struct fuse_fallocate_in {
+       uint64_t        fh;
+       uint64_t        offset;
+       uint64_t        length;
+       uint32_t        mode;
+       uint32_t        padding;
 };
 
 struct fuse_in_header {
-       __u32   len;
-       __u32   opcode;
-       __u64   unique;
-       __u64   nodeid;
-       __u32   uid;
-       __u32   gid;
-       __u32   pid;
-       __u32   padding;
+       uint32_t        len;
+       uint32_t        opcode;
+       uint64_t        unique;
+       uint64_t        nodeid;
+       uint32_t        uid;
+       uint32_t        gid;
+       uint32_t        pid;
+       uint32_t        padding;
 };
 
 struct fuse_out_header {
-       __u32   len;
-       __s32   error;
-       __u64   unique;
+       uint32_t        len;
+       int32_t         error;
+       uint64_t        unique;
 };
 
 struct fuse_dirent {
-       __u64   ino;
-       __u64   off;
-       __u32   namelen;
-       __u32   type;
+       uint64_t        ino;
+       uint64_t        off;
+       uint32_t        namelen;
+       uint32_t        type;
        char name[];
 };
 
 #define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name)
-#define FUSE_DIRENT_ALIGN(x) (((x) + sizeof(__u64) - 1) & ~(sizeof(__u64) - 1))
+#define FUSE_DIRENT_ALIGN(x) \
+       (((x) + sizeof(uint64_t) - 1) & ~(sizeof(uint64_t) - 1))
 #define FUSE_DIRENT_SIZE(d) \
        FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen)
 
+struct fuse_direntplus {
+       struct fuse_entry_out entry_out;
+       struct fuse_dirent dirent;
+};
+
+#define FUSE_NAME_OFFSET_DIRENTPLUS \
+       offsetof(struct fuse_direntplus, dirent.name)
+#define FUSE_DIRENTPLUS_SIZE(d) \
+       FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET_DIRENTPLUS + (d)->dirent.namelen)
+
 struct fuse_notify_inval_inode_out {
-       __u64   ino;
-       __s64   off;
-       __s64   len;
+       uint64_t        ino;
+       int64_t         off;
+       int64_t         len;
 };
 
 struct fuse_notify_inval_entry_out {
-       __u64   parent;
-       __u32   namelen;
-       __u32   padding;
+       uint64_t        parent;
+       uint32_t        namelen;
+       uint32_t        padding;
 };
 
 struct fuse_notify_delete_out {
-       __u64   parent;
-       __u64   child;
-       __u32   namelen;
-       __u32   padding;
+       uint64_t        parent;
+       uint64_t        child;
+       uint32_t        namelen;
+       uint32_t        padding;
 };
 
 struct fuse_notify_store_out {
-       __u64   nodeid;
-       __u64   offset;
-       __u32   size;
-       __u32   padding;
+       uint64_t        nodeid;
+       uint64_t        offset;
+       uint32_t        size;
+       uint32_t        padding;
 };
 
 struct fuse_notify_retrieve_out {
-       __u64   notify_unique;
-       __u64   nodeid;
-       __u64   offset;
-       __u32   size;
-       __u32   padding;
+       uint64_t        notify_unique;
+       uint64_t        nodeid;
+       uint64_t        offset;
+       uint32_t        size;
+       uint32_t        padding;
 };
 
 /* Matches the size of fuse_write_in */
 struct fuse_notify_retrieve_in {
-       __u64   dummy1;
-       __u64   offset;
-       __u32   size;
-       __u32   dummy2;
-       __u64   dummy3;
-       __u64   dummy4;
+       uint64_t        dummy1;
+       uint64_t        offset;
+       uint32_t        size;
+       uint32_t        dummy2;
+       uint64_t        dummy3;
+       uint64_t        dummy4;
 };
 
 #endif /* _LINUX_FUSE_H */
index c311e9d..7a46ab9 100644 (file)
@@ -149,4 +149,4 @@ struct robust_list_head {
   (((op & 0xf) << 28) | ((cmp & 0xf) << 24)            \
    | ((oparg & 0xfff) << 12) | (cmparg & 0xfff))
 
-#endif
+#endif /* _LINUX_FUTEX_H */
index 1c33c4a..34246b7 100644 (file)
@@ -1,6 +1,3 @@
-#ifndef _GAMEPORT_H
-#define _GAMEPORT_H
-
 /*
  *  Copyright (c) 1999-2002 Vojtech Pavlik
  *
@@ -8,6 +5,9 @@
  * under the terms of the GNU General Public License version 2 as published by
  * the Free Software Foundation.
  */
+#ifndef _GAMEPORT_H
+#define _GAMEPORT_H
+
 
 
 #define GAMEPORT_MODE_DISABLED         0
@@ -25,4 +25,4 @@
 #define GAMEPORT_ID_VENDOR_GRAVIS      0x0009
 #define GAMEPORT_ID_VENDOR_GUILLEMOT   0x000a
 
-#endif
+#endif /* _GAMEPORT_H */
diff --git a/usr/include/linux/generic_serial.h b/usr/include/linux/generic_serial.h
deleted file mode 100644 (file)
index 9f596b4..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- *  generic_serial.h
- *
- *  Copyright (C) 1998 R.E.Wolff@BitWizard.nl
- *
- *  written for the SX serial driver.
- *     Contains the code that should be shared over all the serial drivers.
- *
- *  Version 0.1 -- December, 1998.
- */
-
-#ifndef GENERIC_SERIAL_H
-#define GENERIC_SERIAL_H
-
-
-/* Flags */
-/* Warning: serial.h defines some ASYNC_ flags, they say they are "only"
-   used in serial.c, but they are also used in all other serial drivers. 
-   Make sure they don't clash with these here... */
-#define GS_TX_INTEN      0x00800000
-#define GS_RX_INTEN      0x00400000
-#define GS_ACTIVE        0x00200000
-
-
-
-#define GS_TYPE_NORMAL   1
-
-#define GS_DEBUG_FLUSH   0x00000001
-#define GS_DEBUG_BTR     0x00000002
-#define GS_DEBUG_TERMIOS 0x00000004
-#define GS_DEBUG_STUFF   0x00000008
-#define GS_DEBUG_CLOSE   0x00000010
-#define GS_DEBUG_FLOW    0x00000020
-#define GS_DEBUG_WRITE   0x00000040
-
-#endif
index 55ce7bb..1f85a27 100644 (file)
@@ -81,4 +81,4 @@ enum {
 #define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1)
 
 
-#endif /* __LINUX_GENERIC_NETLINK_H */
+#endif /* __LINUX_GENERIC_NETLINK_H */
index 997a4f5..9e7ca3b 100644 (file)
@@ -170,6 +170,16 @@ struct gfs2_rindex {
 #define GFS2_RGF_NOALLOC       0x00000008
 #define GFS2_RGF_TRIMMED       0x00000010
 
+struct gfs2_rgrp_lvb {
+       __be32 rl_magic;
+       __be32 rl_flags;
+       __be32 rl_free;
+       __be32 rl_dinodes;
+       __be64 rl_igeneration;
+       __be32 rl_unlinked;
+       __be32 __pad;
+};
+
 struct gfs2_rgrp {
        struct gfs2_meta_header rg_header;
 
@@ -214,6 +224,7 @@ enum {
        gfs2fl_NoAtime          = 7,
        gfs2fl_Sync             = 8,
        gfs2fl_System           = 9,
+       gfs2fl_TopLevel         = 10,
        gfs2fl_TruncInProg      = 29,
        gfs2fl_InheritDirectio  = 30,
        gfs2fl_InheritJdata     = 31,
@@ -230,8 +241,9 @@ enum {
 #define GFS2_DIF_NOATIME               0x00000080
 #define GFS2_DIF_SYNC                  0x00000100
 #define GFS2_DIF_SYSTEM                        0x00000200 /* New in gfs2 */
+#define GFS2_DIF_TOPDIR                        0x00000400 /* New in gfs2 */
 #define GFS2_DIF_TRUNC_IN_PROG         0x20000000 /* New in gfs2 */
-#define GFS2_DIF_INHERIT_DIRECTIO      0x40000000
+#define GFS2_DIF_INHERIT_DIRECTIO      0x40000000 /* only in gfs1 */
 #define GFS2_DIF_INHERIT_JDATA         0x80000000
 
 struct gfs2_dinode {
index 5839723..04bc027 100644 (file)
 #define LMI_CCITT              3 /* ITU-T Annex A */
 #define LMI_CISCO              4 /* The "original" LMI, aka Gang of Four */
 
-typedef struct { 
+#ifndef __ASSEMBLY__
+
+typedef struct {
        unsigned int clock_rate; /* bits per second */
        unsigned int clock_type; /* internal, external, TX-internal etc. */
        unsigned short loopback;
 } sync_serial_settings;          /* V.35, V.24, X.21 */
 
-typedef struct { 
+typedef struct {
        unsigned int clock_rate; /* bits per second */
        unsigned int clock_type; /* internal, external, TX-internal etc. */
        unsigned short loopback;
@@ -78,4 +80,5 @@ typedef struct {
 
 /* PPP doesn't need any info now - supply length = 0 to ioctl */
 
+#endif /* __ASSEMBLY__ */
 #endif /* __HDLC_IOCTL_H__ */
index ca2cefd..2c23ba6 100644 (file)
@@ -1,12 +1,8 @@
-#ifndef __HID_H
-#define __HID_H
-
 /*
  *  Copyright (c) 1999 Andreas Gal
  *  Copyright (c) 2000-2001 Vojtech Pavlik
  *  Copyright (c) 2006-2007 Jiri Kosina
  */
-
 /*
  * 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
  * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
  * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
  */
+#ifndef __HID_H
+#define __HID_H
+
+
 
 /*
  * USB HID (Human Interface Device) interface class code
@@ -63,5 +63,4 @@
 #define HID_MAX_DESCRIPTOR_SIZE                4096
 
 
-#endif
-
+#endif /* __HID_H */
index 94b36c3..e24ca19 100644 (file)
@@ -1,12 +1,8 @@
-#ifndef _HIDDEV_H
-#define _HIDDEV_H
-
 /*
  *  Copyright (c) 1999-2000 Vojtech Pavlik
  *
  *  Sponsored by SuSE
  */
-
 /*
  * 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
  * e-mail - mail your message to <vojtech@suse.cz>, or by paper mail:
  * Vojtech Pavlik, Ucitelska 1576, Prague 8, 182 00 Czech Republic
  */
+#ifndef _HIDDEV_H
+#define _HIDDEV_H
+
+
 
 #include <linux/types.h>
 
@@ -209,4 +209,4 @@ struct hiddev_usage_ref_multi {
  */
 
 
-#endif
+#endif /* _HIDDEV_H */
index b216b12..e781b0e 100644 (file)
@@ -1,10 +1,6 @@
-#ifndef _HIDRAW_H
-#define _HIDRAW_H
-
 /*
  *  Copyright (c) 2007 Jiri Kosina
  */
-
 /*
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
  * this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
  */
+#ifndef _HIDRAW_H
+#define _HIDRAW_H
+
+
 
 #include <linux/hid.h>
 #include <linux/types.h>
@@ -47,4 +47,4 @@ struct hidraw_devinfo {
 
 /* kernel-only API declarations */
 
-#endif
+#endif /* _HIDRAW_H */
index 8c2b8fd..031f16f 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef        __HPET__
-#define        __HPET__ 1
+#ifndef __HPET__
+#define __HPET__
 
 
 
@@ -22,4 +22,4 @@ struct hpet_info {
 
 #define MAX_HPET_TBS   8               /* maximum hpet timer blocks */
 
-#endif                         /* !__HPET__ */
+#endif /* __HPET__ */
diff --git a/usr/include/linux/hw_breakpoint.h b/usr/include/linux/hw_breakpoint.h
new file mode 100644 (file)
index 0000000..32486ee
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef _LINUX_HW_BREAKPOINT_H
+#define _LINUX_HW_BREAKPOINT_H
+
+enum {
+       HW_BREAKPOINT_LEN_1 = 1,
+       HW_BREAKPOINT_LEN_2 = 2,
+       HW_BREAKPOINT_LEN_4 = 4,
+       HW_BREAKPOINT_LEN_8 = 8,
+};
+
+enum {
+       HW_BREAKPOINT_EMPTY     = 0,
+       HW_BREAKPOINT_R         = 1,
+       HW_BREAKPOINT_W         = 2,
+       HW_BREAKPOINT_RW        = HW_BREAKPOINT_R | HW_BREAKPOINT_W,
+       HW_BREAKPOINT_X         = 4,
+       HW_BREAKPOINT_INVALID   = HW_BREAKPOINT_RW | HW_BREAKPOINT_X,
+};
+
+enum bp_type_idx {
+       TYPE_INST       = 0,
+#ifdef CONFIG_HAVE_MIXED_BREAKPOINTS_REGS
+       TYPE_DATA       = 0,
+#else
+       TYPE_DATA       = 1,
+#endif
+       TYPE_MAX
+};
+
+#endif /* _LINUX_HW_BREAKPOINT_H */
index 7051a29..0f2f95b 100644 (file)
@@ -70,7 +70,8 @@ struct i2c_msg {
        __u16 flags;
 #define I2C_M_TEN              0x0010  /* this is a ten bit chip address */
 #define I2C_M_RD               0x0001  /* read data, from slave to master */
-#define I2C_M_NOSTART          0x4000  /* if I2C_FUNC_PROTOCOL_MANGLING */
+#define I2C_M_STOP             0x8000  /* if I2C_FUNC_PROTOCOL_MANGLING */
+#define I2C_M_NOSTART          0x4000  /* if I2C_FUNC_NOSTART */
 #define I2C_M_REV_DIR_ADDR     0x2000  /* if I2C_FUNC_PROTOCOL_MANGLING */
 #define I2C_M_IGNORE_NAK       0x1000  /* if I2C_FUNC_PROTOCOL_MANGLING */
 #define I2C_M_NO_RD_ACK                0x0800  /* if I2C_FUNC_PROTOCOL_MANGLING */
@@ -83,8 +84,9 @@ struct i2c_msg {
 
 #define I2C_FUNC_I2C                   0x00000001
 #define I2C_FUNC_10BIT_ADDR            0x00000002
-#define I2C_FUNC_PROTOCOL_MANGLING     0x00000004 /* I2C_M_NOSTART etc. */
+#define I2C_FUNC_PROTOCOL_MANGLING     0x00000004 /* I2C_M_IGNORE_NAK etc. */
 #define I2C_FUNC_SMBUS_PEC             0x00000008
+#define I2C_FUNC_NOSTART               0x00000010 /* I2C_M_NOSTART */
 #define I2C_FUNC_SMBUS_BLOCK_PROC_CALL 0x00008000 /* SMBus 2.0 */
 #define I2C_FUNC_SMBUS_QUICK           0x00010000
 #define I2C_FUNC_SMBUS_READ_BYTE       0x00020000
index bc580b6..4fb30a4 100644 (file)
@@ -124,7 +124,7 @@ typedef struct i2o_sg_io_hdr {
 #define I2O_BUS_LOCAL  0
 #define I2O_BUS_ISA    1
 #define I2O_BUS_EISA   2
-#define I2O_BUS_MCA    3
+/* was  I2O_BUS_MCA    3 */
 #define I2O_BUS_PCI    4
 #define I2O_BUS_PCMCIA 5
 #define I2O_BUS_NUBUS  6
index 9eedab5..ab58cee 100644 (file)
@@ -15,7 +15,7 @@
  *             2 of the License, or (at your option) any later version.
  */
 #ifndef _LINUX_ICMP_H
-#define        _LINUX_ICMP_H
+#define _LINUX_ICMP_H
 
 #include <linux/types.h>
 
@@ -94,4 +94,4 @@ struct icmp_filter {
 };
 
 
-#endif /* _LINUX_ICMP_H */
+#endif /* _LINUX_ICMP_H */
index 5093dfc..9d28dbb 100644 (file)
@@ -161,4 +161,4 @@ struct icmp6_filter {
 #define MLD2_ALL_MCR_INIT { { { 0xff,0x02,0,0,0,0,0,0,0,0,0,0,0,0,0,0x16 } } }
 
 
-#endif
+#endif /* _LINUX_ICMPV6_H */
index b3383a9..7f261c0 100644 (file)
@@ -81,6 +81,8 @@
 #define IFF_UNICAST_FLT        0x20000         /* Supports unicast filtering   */
 #define IFF_TEAM_PORT  0x40000         /* device used as team port */
 #define IFF_SUPP_NOFCS 0x80000         /* device supports sending custom FCS */
+#define IFF_LIVE_ADDR_CHANGE 0x100000  /* device supports hardware address
+                                        * change when it's running */
 
 
 #define IF_GET_IFACE   0x0001          /* for querying only */
index 1f9fc5d..6a48d55 100644 (file)
 #define ARPHRD_IEEE80211_PRISM 802     /* IEEE 802.11 + Prism2 header  */
 #define ARPHRD_IEEE80211_RADIOTAP 803  /* IEEE 802.11 + radiotap header */
 #define ARPHRD_IEEE802154        804
+#define ARPHRD_IEEE802154_MONITOR 805  /* IEEE 802.15.4 network monitor */
 
 #define ARPHRD_PHONET  820             /* PhoNet media type            */
 #define ARPHRD_PHONET_PIPE 821         /* PhoNet pipe header           */
 #define ARPHRD_CAIF    822             /* CAIF media type              */
+#define ARPHRD_IP6GRE  823             /* GRE over IPv6                */
 
 #define ARPHRD_VOID      0xFFFF        /* Void type, nothing is known */
 #define ARPHRD_NONE      0xFFFE        /* zero header length */
@@ -154,4 +156,4 @@ struct arphdr {
 };
 
 
-#endif /* _LINUX_IF_ARP_H */
+#endif /* _LINUX_IF_ARP_H */
index 91911b7..d37e53c 100644 (file)
@@ -97,5 +97,100 @@ struct __fdb_entry {
        __u16 unused;
 };
 
+/* Bridge Flags */
+#define BRIDGE_FLAGS_MASTER    1       /* Bridge command to/from master */
+#define BRIDGE_FLAGS_SELF      2       /* Bridge command to/from lowerdev */
 
-#endif
+#define BRIDGE_MODE_VEB                0       /* Default loopback mode */
+#define BRIDGE_MODE_VEPA       1       /* 802.1Qbg defined VEPA mode */
+
+/* Bridge management nested attributes
+ * [IFLA_AF_SPEC] = {
+ *     [IFLA_BRIDGE_FLAGS]
+ *     [IFLA_BRIDGE_MODE]
+ *     [IFLA_BRIDGE_VLAN_INFO]
+ * }
+ */
+enum {
+       IFLA_BRIDGE_FLAGS,
+       IFLA_BRIDGE_MODE,
+       IFLA_BRIDGE_VLAN_INFO,
+       __IFLA_BRIDGE_MAX,
+};
+#define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1)
+
+#define BRIDGE_VLAN_INFO_MASTER        (1<<0)  /* Operate on Bridge device as well */
+#define BRIDGE_VLAN_INFO_PVID  (1<<1)  /* VLAN is PVID, ingress untagged */
+#define BRIDGE_VLAN_INFO_UNTAGGED      (1<<2)  /* VLAN egresses untagged */
+
+struct bridge_vlan_info {
+       __u16 flags;
+       __u16 vid;
+};
+
+/* Bridge multicast database attributes
+ * [MDBA_MDB] = {
+ *     [MDBA_MDB_ENTRY] = {
+ *         [MDBA_MDB_ENTRY_INFO]
+ *     }
+ * }
+ * [MDBA_ROUTER] = {
+ *    [MDBA_ROUTER_PORT]
+ * }
+ */
+enum {
+       MDBA_UNSPEC,
+       MDBA_MDB,
+       MDBA_ROUTER,
+       __MDBA_MAX,
+};
+#define MDBA_MAX (__MDBA_MAX - 1)
+
+enum {
+       MDBA_MDB_UNSPEC,
+       MDBA_MDB_ENTRY,
+       __MDBA_MDB_MAX,
+};
+#define MDBA_MDB_MAX (__MDBA_MDB_MAX - 1)
+
+enum {
+       MDBA_MDB_ENTRY_UNSPEC,
+       MDBA_MDB_ENTRY_INFO,
+       __MDBA_MDB_ENTRY_MAX,
+};
+#define MDBA_MDB_ENTRY_MAX (__MDBA_MDB_ENTRY_MAX - 1)
+
+enum {
+       MDBA_ROUTER_UNSPEC,
+       MDBA_ROUTER_PORT,
+       __MDBA_ROUTER_MAX,
+};
+#define MDBA_ROUTER_MAX (__MDBA_ROUTER_MAX - 1)
+
+struct br_port_msg {
+       __u8  family;
+       __u32 ifindex;
+};
+
+struct br_mdb_entry {
+       __u32 ifindex;
+#define MDB_TEMPORARY 0
+#define MDB_PERMANENT 1
+       __u8 state;
+       struct {
+               union {
+                       __be32  ip4;
+                       struct in6_addr ip6;
+               } u;
+               __be16          proto;
+       } addr;
+};
+
+enum {
+       MDBA_SET_ENTRY_UNSPEC,
+       MDBA_SET_ENTRY,
+       __MDBA_SET_ENTRY_MAX,
+};
+#define MDBA_SET_ENTRY_MAX (__MDBA_SET_ENTRY_MAX - 1)
+
+#endif /* _LINUX_IF_BRIDGE_H */
index 9ca1007..ee6b3c4 100644 (file)
  */
 
 /* some useful defines for sb1000.c e cmconfig.c - fv */
-#define SIOCGCMSTATS           SIOCDEVPRIVATE+0        /* get cable modem stats */
-#define SIOCGCMFIRMWARE                SIOCDEVPRIVATE+1        /* get cm firmware version */
-#define SIOCGCMFREQUENCY       SIOCDEVPRIVATE+2        /* get cable modem frequency */
-#define SIOCSCMFREQUENCY       SIOCDEVPRIVATE+3        /* set cable modem frequency */
-#define SIOCGCMPIDS                    SIOCDEVPRIVATE+4        /* get cable modem PIDs */
-#define SIOCSCMPIDS                    SIOCDEVPRIVATE+5        /* set cable modem PIDs */
+#define SIOCGCMSTATS           (SIOCDEVPRIVATE+0)      /* get cable modem stats */
+#define SIOCGCMFIRMWARE                (SIOCDEVPRIVATE+1)      /* get cm firmware version */
+#define SIOCGCMFREQUENCY       (SIOCDEVPRIVATE+2)      /* get cable modem frequency */
+#define SIOCSCMFREQUENCY       (SIOCDEVPRIVATE+3)      /* set cable modem frequency */
+#define SIOCGCMPIDS                    (SIOCDEVPRIVATE+4)      /* get cable modem PIDs */
+#define SIOCSCMPIDS                    (SIOCDEVPRIVATE+5)      /* set cable modem PIDs */
 
 #endif
diff --git a/usr/include/linux/if_ec.h b/usr/include/linux/if_ec.h
deleted file mode 100644 (file)
index b07ede1..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Definitions for Econet sockets. */
-
-#ifndef __LINUX_IF_EC
-#define __LINUX_IF_EC
-
-/* User visible stuff. Glibc provides its own but libc5 folk will use these */
-
-struct ec_addr {
-  unsigned char station;               /* Station number.  */
-  unsigned char net;                   /* Network number.  */
-};
-
-struct sockaddr_ec {
-  unsigned short sec_family;
-  unsigned char port;                  /* Port number.  */
-  unsigned char cb;                    /* Control/flag byte.  */
-  unsigned char type;                  /* Type of message.  */
-  struct ec_addr addr;
-  unsigned long cookie;
-};
-
-#define ECTYPE_PACKET_RECEIVED         0       /* Packet received */
-#define ECTYPE_TRANSMIT_STATUS         0x10    /* Transmit completed, 
-                                                  low nibble holds status */
-
-#define ECTYPE_TRANSMIT_OK             1
-#define ECTYPE_TRANSMIT_NOT_LISTENING  2
-#define ECTYPE_TRANSMIT_NET_ERROR      3
-#define ECTYPE_TRANSMIT_NO_CLOCK       4
-#define ECTYPE_TRANSMIT_LINE_JAMMED    5
-#define ECTYPE_TRANSMIT_NOT_PRESENT    6
-
-
-#endif
index 6db78d7..3b489be 100644 (file)
@@ -51,4 +51,4 @@ typedef struct slaving_request {
 } slaving_request_t;
 
 
-#endif /* _LINUX_EQL_H */
+#endif /* _LINUX_IF_EQL_H */
index 8b35afe..2fc760a 100644 (file)
@@ -48,6 +48,7 @@
 #define        ETH_P_BPQ       0x08FF          /* G8BPQ AX.25 Ethernet Packet  [ NOT AN OFFICIALLY REGISTERED ID ] */
 #define ETH_P_IEEEPUP  0x0a00          /* Xerox IEEE802.3 PUP packet */
 #define ETH_P_IEEEPUPAT        0x0a01          /* Xerox IEEE802.3 PUP Addr Trans packet */
+#define ETH_P_BATMAN   0x4305          /* B.A.T.M.A.N.-Advanced packet [ NOT AN OFFICIALLY REGISTERED ID ] */
 #define ETH_P_DEC       0x6000          /* DEC Assigned proto           */
 #define ETH_P_DNA_DL    0x6001          /* DEC DNA Dump/Load            */
 #define ETH_P_DNA_RC    0x6002          /* DEC DNA Remote Console       */
@@ -82,6 +83,7 @@
 #define ETH_P_802_EX1  0x88B5          /* 802.1 Local Experimental 1.  */
 #define ETH_P_TIPC     0x88CA          /* TIPC                         */
 #define ETH_P_8021AH   0x88E7          /* 802.1ah Backbone Service Tag */
+#define ETH_P_MVRP     0x88F5          /* 802.1Q MVRP                  */
 #define ETH_P_1588     0x88F7          /* IEEE 1588 Timesync */
 #define ETH_P_FCOE     0x8906          /* Fibre Channel over Ethernet  */
 #define ETH_P_TDLS     0x890D          /* TDLS */
@@ -92,6 +94,9 @@
 #define ETH_P_EDSA     0xDADA          /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */
 #define ETH_P_AF_IUCV   0xFBFB         /* IBM af_iucv [ NOT AN OFFICIALLY REGISTERED ID ] */
 
+#define ETH_P_802_3_MIN        0x0600          /* If the value in the ethernet type is less than this value
+                                        * then the frame is Ethernet II. Else it is 802.3 */
+
 /*
  *     Non DIX types. Won't clash for 1500 types.
  */
 #define ETH_P_WAN_PPP   0x0007          /* Dummy type for WAN PPP frames*/
 #define ETH_P_PPP_MP    0x0008          /* Dummy type for PPP MP frames */
 #define ETH_P_LOCALTALK 0x0009         /* Localtalk pseudo type        */
-#define ETH_P_CAN      0x000C          /* Controller Area Network      */
+#define ETH_P_CAN      0x000C          /* CAN: Controller Area Network */
+#define ETH_P_CANFD    0x000D          /* CANFD: CAN flexible data rate*/
 #define ETH_P_PPPTALK  0x0010          /* Dummy type for Atalk over PPP*/
 #define ETH_P_TR_802_2 0x0011          /* 802.2 frames                 */
 #define ETH_P_MOBITEX  0x0015          /* Mobitex (kaz@cafe.net)       */
@@ -131,4 +137,4 @@ struct ethhdr {
 } __attribute__((packed));
 
 
-#endif /* _LINUX_IF_ETHER_H */
+#endif /* _LINUX_IF_ETHER_H */
index 3c28442..e32cf70 100644 (file)
@@ -101,4 +101,4 @@ struct fddihdr {
 } __attribute__((packed));
 
 
-#endif /* _LINUX_IF_FDDI_H */
+#endif /* _LINUX_IF_FDDI_H */
index 23099dc..30361db 100644 (file)
@@ -119,4 +119,4 @@ struct frad_conf
 #define FRAD_CLOCK_EXT         0x0000
 
 
-#endif
+#endif /* _FRAD_H_ */
index 06a3a47..965dc9f 100644 (file)
@@ -138,6 +138,11 @@ enum {
        IFLA_GROUP,             /* Group the device belongs to */
        IFLA_NET_NS_FD,
        IFLA_EXT_MASK,          /* Extended info mask, VFs, etc */
+       IFLA_PROMISCUITY,       /* Promiscuity count: > 0 means acts PROMISC */
+#define IFLA_PROMISCUITY IFLA_PROMISCUITY
+       IFLA_NUM_TX_QUEUES,
+       IFLA_NUM_RX_QUEUES,
+       IFLA_CARRIER,
        __IFLA_MAX
 };
 
@@ -194,11 +199,30 @@ enum {
        IFLA_INET6_MCAST,       /* MC things. What of them?     */
        IFLA_INET6_CACHEINFO,   /* time values and max reasm size */
        IFLA_INET6_ICMP6STATS,  /* statistics (icmpv6)          */
+       IFLA_INET6_TOKEN,       /* device token                 */
        __IFLA_INET6_MAX
 };
 
 #define IFLA_INET6_MAX (__IFLA_INET6_MAX - 1)
 
+enum {
+       BRIDGE_MODE_UNSPEC,
+       BRIDGE_MODE_HAIRPIN,
+};
+
+enum {
+       IFLA_BRPORT_UNSPEC,
+       IFLA_BRPORT_STATE,      /* Spanning tree state     */
+       IFLA_BRPORT_PRIORITY,   /* "             priority  */
+       IFLA_BRPORT_COST,       /* "             cost      */
+       IFLA_BRPORT_MODE,       /* mode (hairpin)          */
+       IFLA_BRPORT_GUARD,      /* bpdu guard              */
+       IFLA_BRPORT_PROTECT,    /* root port protection    */
+       IFLA_BRPORT_FAST_LEAVE, /* multicast fast leave    */
+       __IFLA_BRPORT_MAX
+};
+#define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
+
 struct ifla_cacheinfo {
        __u32   max_reasm_len;
        __u32   tstamp;         /* ipv6InterfaceTable updated timestamp */
@@ -224,6 +248,7 @@ enum {
        IFLA_VLAN_FLAGS,
        IFLA_VLAN_EGRESS_QOS,
        IFLA_VLAN_INGRESS_QOS,
+       IFLA_VLAN_PROTOCOL,
        __IFLA_VLAN_MAX,
 };
 
@@ -251,6 +276,7 @@ struct ifla_vlan_qos_mapping {
 enum {
        IFLA_MACVLAN_UNSPEC,
        IFLA_MACVLAN_MODE,
+       IFLA_MACVLAN_FLAGS,
        __IFLA_MACVLAN_MAX,
 };
 
@@ -263,6 +289,35 @@ enum macvlan_mode {
        MACVLAN_MODE_PASSTHRU = 8,/* take over the underlying device */
 };
 
+#define MACVLAN_FLAG_NOPROMISC 1
+
+/* VXLAN section */
+enum {
+       IFLA_VXLAN_UNSPEC,
+       IFLA_VXLAN_ID,
+       IFLA_VXLAN_GROUP,       /* group or remote address */
+       IFLA_VXLAN_LINK,
+       IFLA_VXLAN_LOCAL,
+       IFLA_VXLAN_TTL,
+       IFLA_VXLAN_TOS,
+       IFLA_VXLAN_LEARNING,
+       IFLA_VXLAN_AGEING,
+       IFLA_VXLAN_LIMIT,
+       IFLA_VXLAN_PORT_RANGE,  /* source port */
+       IFLA_VXLAN_PROXY,
+       IFLA_VXLAN_RSC,
+       IFLA_VXLAN_L2MISS,
+       IFLA_VXLAN_L3MISS,
+       IFLA_VXLAN_PORT,        /* destination port */
+       __IFLA_VXLAN_MAX
+};
+#define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1)
+
+struct ifla_vxlan_port_range {
+       __be16  low;
+       __be16  high;
+};
+
 /* SR-IOV virtual function management section */
 
 enum {
@@ -377,4 +432,22 @@ struct ifla_port_vsi {
        __u8 pad[3];
 };
 
+
+/* IPoIB section */
+
+enum {
+       IFLA_IPOIB_UNSPEC,
+       IFLA_IPOIB_PKEY,
+       IFLA_IPOIB_MODE,
+       IFLA_IPOIB_UMCAST,
+       __IFLA_IPOIB_MAX
+};
+
+enum {
+       IPOIB_MODE_DATAGRAM  = 0, /* using unreliable datagram QPs */
+       IPOIB_MODE_CONNECTED = 1, /* using connected QPs */
+};
+
+#define IFLA_IPOIB_MAX (__IFLA_IPOIB_MAX - 1)
+
 #endif /* _LINUX_IF_LINK_H */
index 92c3e30..1f83ba0 100644 (file)
@@ -6,4 +6,4 @@
 #define LTALK_ALEN             1
 
 
-#endif
+#endif /* __LINUX_LTALK_H */
index f379929..b950c02 100644 (file)
@@ -50,10 +50,13 @@ struct sockaddr_ll {
 #define PACKET_TX_TIMESTAMP            16
 #define PACKET_TIMESTAMP               17
 #define PACKET_FANOUT                  18
+#define PACKET_TX_HAS_OFF              19
 
 #define PACKET_FANOUT_HASH             0
 #define PACKET_FANOUT_LB               1
 #define PACKET_FANOUT_CPU              2
+#define PACKET_FANOUT_ROLLOVER         3
+#define PACKET_FANOUT_FLAG_ROLLOVER    0x1000
 #define PACKET_FANOUT_FLAG_DEFRAG      0x8000
 
 struct tpacket_stats {
@@ -83,19 +86,24 @@ struct tpacket_auxdata {
 };
 
 /* Rx ring - header status */
-#define TP_STATUS_KERNEL       0x0
-#define TP_STATUS_USER         0x1
-#define TP_STATUS_COPY         0x2
-#define TP_STATUS_LOSING       0x4
-#define TP_STATUS_CSUMNOTREADY 0x8
-#define TP_STATUS_VLAN_VALID   0x10 /* auxdata has valid tp_vlan_tci */
-#define TP_STATUS_BLK_TMO      0x20
+#define TP_STATUS_KERNEL             0
+#define TP_STATUS_USER         (1 << 0)
+#define TP_STATUS_COPY         (1 << 1)
+#define TP_STATUS_LOSING       (1 << 2)
+#define TP_STATUS_CSUMNOTREADY (1 << 3)
+#define TP_STATUS_VLAN_VALID   (1 << 4) /* auxdata has valid tp_vlan_tci */
+#define TP_STATUS_BLK_TMO      (1 << 5)
 
 /* Tx ring - header status */
-#define TP_STATUS_AVAILABLE    0x0
-#define TP_STATUS_SEND_REQUEST 0x1
-#define TP_STATUS_SENDING      0x2
-#define TP_STATUS_WRONG_FORMAT 0x4
+#define TP_STATUS_AVAILABLE          0
+#define TP_STATUS_SEND_REQUEST (1 << 0)
+#define TP_STATUS_SENDING      (1 << 1)
+#define TP_STATUS_WRONG_FORMAT (1 << 2)
+
+/* Rx and Tx ring - header status */
+#define TP_STATUS_TS_SOFTWARE          (1 << 29)
+#define TP_STATUS_TS_SYS_HARDWARE      (1 << 30)
+#define TP_STATUS_TS_RAW_HARDWARE      (1 << 31)
 
 /* Rx ring - feature request bits */
 #define TP_FT_REQ_FILL_RXHASH  0x1
index dfb0d4a..63371bc 100644 (file)
@@ -13,4 +13,4 @@
 #define PHONET_DEV_MTU         PHONET_MAX_MTU
 
 
-#endif
+#endif /* LINUX_IF_PHONET_H */
index 45fb9f3..8e1221c 100644 (file)
@@ -19,7 +19,7 @@
 
 
 /* Structure used to connect() the socket to a particular tunnel UDP
- * socket.
+ * socket over IPv4.
  */
 struct pppol2tp_addr {
        __kernel_pid_t  pid;            /* pid that owns the fd.
@@ -32,6 +32,20 @@ struct pppol2tp_addr {
        __u16 d_tunnel, d_session;      /* For sending outgoing packets */
 };
 
+/* Structure used to connect() the socket to a particular tunnel UDP
+ * socket over IPv6.
+ */
+struct pppol2tpin6_addr {
+       __kernel_pid_t  pid;            /* pid that owns the fd.
+                                        * 0 => current */
+       int     fd;                     /* FD of UDP socket to use */
+
+       __u16 s_tunnel, s_session;      /* For matching incoming packets */
+       __u16 d_tunnel, d_session;      /* For sending outgoing packets */
+
+       struct sockaddr_in6 addr;       /* IP address and port to send to */
+};
+
 /* The L2TPv3 protocol changes tunnel and session ids from 16 to 32
  * bits. So we need a different sockaddr structure.
  */
@@ -46,6 +60,17 @@ struct pppol2tpv3_addr {
        __u32 d_tunnel, d_session;      /* For sending outgoing packets */
 };
 
+struct pppol2tpv3in6_addr {
+       __kernel_pid_t  pid;            /* pid that owns the fd.
+                                        * 0 => current */
+       int     fd;                     /* FD of UDP or IP socket to use */
+
+       __u32 s_tunnel, s_session;      /* For matching incoming packets */
+       __u32 d_tunnel, d_session;      /* For sending outgoing packets */
+
+       struct sockaddr_in6 addr;       /* IP address and port to send to */
+};
+
 /* Socket options:
  * DEBUG       - bitmask of debug message categories
  * SENDSEQ     - 0 => don't send packets with sequence numbers
@@ -76,4 +101,4 @@ enum {
 
 
 
-#endif
+#endif /* __LINUX_IF_PPPOL2TP_H */
index b0cc29b..195e4d6 100644 (file)
@@ -78,6 +78,12 @@ struct sockaddr_pppol2tp {
        struct pppol2tp_addr pppol2tp;
 } __attribute__((packed));
 
+struct sockaddr_pppol2tpin6 {
+       __kernel_sa_family_t sa_family; /* address family, AF_PPPOX */
+       unsigned int    sa_protocol;    /* protocol identifier */
+       struct pppol2tpin6_addr pppol2tp;
+} __attribute__((packed));
+
 /* The L2TPv3 protocol changes tunnel and session ids from 16 to 32
  * bits. So we need a different sockaddr structure.
  */
@@ -87,6 +93,12 @@ struct sockaddr_pppol2tpv3 {
        struct pppol2tpv3_addr pppol2tp;
 } __attribute__((packed));
 
+struct sockaddr_pppol2tpv3in6 {
+       __kernel_sa_family_t sa_family; /* address family, AF_PPPOX */
+       unsigned int    sa_protocol;    /* protocol identifier */
+       struct pppol2tpv3in6_addr pppol2tp;
+} __attribute__((packed));
+
 /*********************************************************************
  *
  * ioctl interface for defining forwarding of connections
@@ -141,4 +153,4 @@ struct pppoe_hdr {
 #define PPPOE_SES_HLEN 8
 
 
-#endif /* !(__LINUX_IF_PPPOX_H) */
+#endif /* __LINUX_IF_PPPOX_H */
diff --git a/usr/include/linux/if_strip.h b/usr/include/linux/if_strip.h
deleted file mode 100644 (file)
index 6526a62..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * if_strip.h --
- *
- *      Definitions for the STRIP interface
- *
- * Copyright 1996 The Board of Trustees of The Leland Stanford
- * Junior University. All Rights Reserved.
- *
- * Permission to use, copy, modify, and distribute this
- * software and its documentation for any purpose and without
- * fee is hereby granted, provided that the above copyright
- * notice appear in all copies.  Stanford University
- * makes no representations about the suitability of this
- * software for any purpose.  It is provided "as is" without
- * express or implied warranty.
- */
-
-#ifndef __LINUX_STRIP_H
-#define __LINUX_STRIP_H
-
-#include <linux/types.h>
-
-typedef struct {
-    __u8 c[6];
-} MetricomAddress;
-
-#endif
index c1f4d9b..cb92efa 100644 (file)
@@ -69,6 +69,8 @@ enum {
        TEAM_ATTR_OPTION_TYPE,          /* u8 */
        TEAM_ATTR_OPTION_DATA,          /* dynamic */
        TEAM_ATTR_OPTION_REMOVED,       /* flag */
+       TEAM_ATTR_OPTION_PORT_IFINDEX,  /* u32 */ /* for per-port options */
+       TEAM_ATTR_OPTION_ARRAY_INDEX,   /* u32 */ /* for array options */
 
        __TEAM_ATTR_OPTION_MAX,
        TEAM_ATTR_OPTION_MAX = __TEAM_ATTR_OPTION_MAX - 1,
diff --git a/usr/include/linux/if_tr.h b/usr/include/linux/if_tr.h
deleted file mode 100644 (file)
index 414bc95..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * INET                An implementation of the TCP/IP protocol suite for the LINUX
- *             operating system.  INET is implemented using the  BSD Socket
- *             interface as the means of communication with the user level.
- *
- *             Global definitions for the Token-Ring IEEE 802.5 interface.
- *
- * Version:    @(#)if_tr.h     0.0     07/11/94
- *
- * Author:     Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
- *             Donald Becker, <becker@super.org>
- *             Peter De Schrijver, <stud11@cc4.kuleuven.ac.be>
- *
- *             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 _LINUX_IF_TR_H
-#define _LINUX_IF_TR_H
-
-#include <linux/types.h>
-#include <asm/byteorder.h>     /* For __be16 */
-
-/* IEEE 802.5 Token-Ring magic constants.  The frame sizes omit the preamble
-   and FCS/CRC (frame check sequence). */
-#define TR_ALEN                6               /* Octets in one token-ring addr */
-#define TR_HLEN        (sizeof(struct trh_hdr)+sizeof(struct trllc))
-#define AC             0x10
-#define LLC_FRAME      0x40
-
-/* LLC and SNAP constants */
-#define EXTENDED_SAP   0xAA
-#define UI_CMD         0x03
-
-/* This is an Token-Ring frame header. */
-struct trh_hdr {
-       __u8  ac;                       /* access control field */
-       __u8  fc;                       /* frame control field */
-       __u8  daddr[TR_ALEN];           /* destination address */
-       __u8  saddr[TR_ALEN];           /* source address */
-       __be16 rcf;                     /* route control field */
-       __be16 rseg[8];                 /* routing registers */
-};
-
-
-/* This is an Token-Ring LLC structure */
-struct trllc {
-       __u8  dsap;                     /* destination SAP */
-       __u8  ssap;                     /* source SAP */
-       __u8  llc;                      /* LLC control field */
-       __u8  protid[3];                /* protocol id */
-       __be16 ethertype;               /* ether type field */
-};
-
-/* Token-Ring statistics collection data. */
-struct tr_statistics {
-       unsigned long rx_packets;       /* total packets received       */
-       unsigned long tx_packets;       /* total packets transmitted    */
-       unsigned long rx_bytes;         /* total bytes received         */
-       unsigned long tx_bytes;         /* total bytes transmitted      */
-       unsigned long rx_errors;        /* bad packets received         */
-       unsigned long tx_errors;        /* packet transmit problems     */
-       unsigned long rx_dropped;       /* no space in linux buffers    */
-       unsigned long tx_dropped;       /* no space available in linux  */
-       unsigned long multicast;        /* multicast packets received   */
-       unsigned long transmit_collision;
-
-       /* detailed Token-Ring errors. See IBM Token-Ring Network
-          Architecture for more info */
-
-       unsigned long line_errors;
-       unsigned long internal_errors;
-       unsigned long burst_errors;
-       unsigned long A_C_errors;
-       unsigned long abort_delimiters;
-       unsigned long lost_frames;
-       unsigned long recv_congest_count;
-       unsigned long frame_copied_errors;
-       unsigned long frequency_errors;
-       unsigned long token_errors;
-       unsigned long dummy1;
-};
-
-/* source routing stuff */
-#define TR_RII                         0x80
-#define TR_RCF_DIR_BIT                 0x80
-#define TR_RCF_LEN_MASK        0x1f00
-#define TR_RCF_BROADCAST       0x8000  /* all-routes broadcast */
-#define TR_RCF_LIMITED_BROADCAST 0xC000        /* single-route broadcast */
-#define TR_RCF_FRAME2K                 0x20
-#define TR_RCF_BROADCAST_MASK  0xC000
-#define TR_MAXRIFLEN           18
-
-#endif /* _LINUX_IF_TR_H */
index 4054c1a..dffb192 100644 (file)
 #define TUN_FASYNC     0x0010
 #define TUN_NOCHECKSUM 0x0020
 #define TUN_NO_PI      0x0040
+/* This flag has no real effect */
 #define TUN_ONE_QUEUE  0x0080
 #define TUN_PERSIST    0x0100  
 #define TUN_VNET_HDR   0x0200
+#define TUN_TAP_MQ      0x0400
 
 /* Ioctl defines */
 #define TUNSETNOCSUM  _IOW('T', 200, int) 
 #define TUNDETACHFILTER _IOW('T', 214, struct sock_fprog)
 #define TUNGETVNETHDRSZ _IOR('T', 215, int)
 #define TUNSETVNETHDRSZ _IOW('T', 216, int)
+#define TUNSETQUEUE  _IOW('T', 217, int)
 
 /* TUNSETIFF ifr flags */
 #define IFF_TUN                0x0001
 #define IFF_TAP                0x0002
 #define IFF_NO_PI      0x1000
+/* This flag has no real effect */
 #define IFF_ONE_QUEUE  0x2000
 #define IFF_VNET_HDR   0x4000
 #define IFF_TUN_EXCL   0x8000
+#define IFF_MULTI_QUEUE 0x0100
+#define IFF_ATTACH_QUEUE 0x0200
+#define IFF_DETACH_QUEUE 0x0400
 
 /* Features for GSO (TUNSETOFFLOAD). */
 #define TUN_F_CSUM     0x01    /* You can hand me unchecksummed packets. */
index 8c819b8..9f471ca 100644 (file)
@@ -37,6 +37,26 @@ struct ip_tunnel_parm {
        struct iphdr            iph;
 };
 
+enum {
+       IFLA_IPTUN_UNSPEC,
+       IFLA_IPTUN_LINK,
+       IFLA_IPTUN_LOCAL,
+       IFLA_IPTUN_REMOTE,
+       IFLA_IPTUN_TTL,
+       IFLA_IPTUN_TOS,
+       IFLA_IPTUN_ENCAP_LIMIT,
+       IFLA_IPTUN_FLOWINFO,
+       IFLA_IPTUN_FLAGS,
+       IFLA_IPTUN_PROTO,
+       IFLA_IPTUN_PMTUDISC,
+       IFLA_IPTUN_6RD_PREFIX,
+       IFLA_IPTUN_6RD_RELAY_PREFIX,
+       IFLA_IPTUN_6RD_PREFIXLEN,
+       IFLA_IPTUN_6RD_RELAY_PREFIXLEN,
+       __IFLA_IPTUN_MAX,
+};
+#define IFLA_IPTUN_MAX (__IFLA_IPTUN_MAX - 1)
+
 /* SIT-mode i_flags */
 #define        SIT_ISATAP      0x0001
 
@@ -71,9 +91,26 @@ enum {
        IFLA_GRE_TTL,
        IFLA_GRE_TOS,
        IFLA_GRE_PMTUDISC,
+       IFLA_GRE_ENCAP_LIMIT,
+       IFLA_GRE_FLOWINFO,
+       IFLA_GRE_FLAGS,
        __IFLA_GRE_MAX,
 };
 
 #define IFLA_GRE_MAX   (__IFLA_GRE_MAX - 1)
 
+/* VTI-mode i_flags */
+#define VTI_ISVTI 0x0001
+
+enum {
+       IFLA_VTI_UNSPEC,
+       IFLA_VTI_LINK,
+       IFLA_VTI_IKEY,
+       IFLA_VTI_OKEY,
+       IFLA_VTI_LOCAL,
+       IFLA_VTI_REMOTE,
+       __IFLA_VTI_MAX,
+};
+
+#define IFLA_VTI_MAX   (__IFLA_VTI_MAX - 1)
 #endif /* _IF_TUNNEL_H_ */
index 5b808eb..24ae007 100644 (file)
@@ -34,6 +34,7 @@ enum vlan_flags {
        VLAN_FLAG_REORDER_HDR   = 0x1,
        VLAN_FLAG_GVRP          = 0x2,
        VLAN_FLAG_LOOSE_BINDING = 0x4,
+       VLAN_FLAG_MVRP          = 0x8,
 };
 
 enum vlan_name_types {
@@ -60,4 +61,4 @@ struct vlan_ioctl_args {
        short vlan_qos;   
 };
 
-#endif /* !(_LINUX_IF_VLAN_H_) */
+#endif /* _LINUX_IF_VLAN_H_ */
index 392ba86..2ead5c5 100644 (file)
@@ -125,4 +125,4 @@ struct igmpv3_query {
  * struct for keeping the multicast list in
  */
 
-#endif
+#endif /* _LINUX_IGMP_H */
index 95acf01..02ab3c2 100644 (file)
@@ -250,4 +250,4 @@ struct sockaddr_in {
 #include <asm/byteorder.h> 
 
 
-#endif /* _LINUX_IN_H */
+#endif /* _LINUX_IN_H */
index a69a00f..bf66590 100644 (file)
@@ -38,11 +38,6 @@ struct in6_addr {
 #define s6_addr32              in6_u.u6_addr32
 };
 
-/* IPv6 Wildcard Address (::) and Loopback Address (::1) defined in RFC2553
- * NOTE: Be aware the IN6ADDR_* constants and in6addr_* externals are defined
- * in network byte order, not in host byte order as are the IPv4 equivalents
- */
-
 struct sockaddr_in6 {
        unsigned short int      sin6_family;    /* AF_INET6 */
        __be16                  sin6_port;      /* Transport layer port # */
@@ -130,7 +125,7 @@ struct in6_flowlabel_req {
 /*
  *     IPv6 TLV options.
  */
-#define IPV6_TLV_PAD0          0
+#define IPV6_TLV_PAD1          0
 #define IPV6_TLV_PADN          1
 #define IPV6_TLV_ROUTERALERT   5
 #define IPV6_TLV_JUMBO         194
@@ -240,6 +235,7 @@ struct in6_flowlabel_req {
  *
  * IP6T_SO_GET_REVISION_MATCH  68
  * IP6T_SO_GET_REVISION_TARGET 69
+ * IP6T_SO_ORIGINAL_DST                80
  */
 
 /* RFC5014: Source address selection */
@@ -263,17 +259,10 @@ struct in6_flowlabel_req {
 
 /*
  * Multicast Routing:
- * see include/linux/mroute6.h.
+ * see include/uapi/linux/mroute6.h.
  *
- * MRT6_INIT                   200
- * MRT6_DONE                   201
- * MRT6_ADD_MIF                        202
- * MRT6_DEL_MIF                        203
- * MRT6_ADD_MFC                        204
- * MRT6_DEL_MFC                        205
- * MRT6_VERSION                        206
- * MRT6_ASSERT                 207
- * MRT6_PIM                    208
- * (reserved)                  209
+ * MRT6_BASE                   200
+ * ...
+ * MRT6_MAX
  */
-#endif
+#endif /* _LINUX_IN6_H */
index 7e31238..e34f247 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef _INET_DIAG_H_
-#define _INET_DIAG_H_ 1
+#define _INET_DIAG_H_
 
 #include <linux/types.h>
 
@@ -109,9 +109,10 @@ enum {
        INET_DIAG_TOS,
        INET_DIAG_TCLASS,
        INET_DIAG_SKMEMINFO,
+       INET_DIAG_SHUTDOWN,
 };
 
-#define INET_DIAG_MAX INET_DIAG_SKMEMINFO
+#define INET_DIAG_MAX INET_DIAG_SHUTDOWN
 
 
 /* INET_DIAG_MEM */
index a03bfa2..44a1a27 100644 (file)
@@ -71,4 +71,4 @@ struct inotify_event {
 #define IN_NONBLOCK O_NONBLOCK
 
 
-#endif /* _LINUX_INOTIFY_H */
+#endif /* _LINUX_INOTIFY_H */
index e97c216..1522b48 100644 (file)
@@ -1,6 +1,3 @@
-#ifndef _INPUT_H
-#define _INPUT_H
-
 /*
  * Copyright (c) 1999-2002 Vojtech Pavlik
  *
@@ -8,12 +5,16 @@
  * under the terms of the GNU General Public License version 2 as published by
  * the Free Software Foundation.
  */
+#ifndef _INPUT_H
+#define _INPUT_H
+
 
 #include <sys/time.h>
 #include <sys/ioctl.h>
 #include <sys/types.h>
 #include <linux/types.h>
 
+
 /*
  * The event structure itself
  */
@@ -111,6 +112,7 @@ struct input_keymap_entry {
 
 /**
  * EVIOCGMTSLOTS(len) - get MT slot values
+ * @len: size of the data buffer in bytes
  *
  * The ioctl buffer argument should be binary equivalent to
  *
@@ -698,6 +700,11 @@ struct input_keymap_entry {
 #define KEY_CAMERA_LEFT                0x219
 #define KEY_CAMERA_RIGHT       0x21a
 
+#define KEY_ATTENDANT_ON       0x21b
+#define KEY_ATTENDANT_OFF      0x21c
+#define KEY_ATTENDANT_TOGGLE   0x21d   /* Attendant call on or off */
+#define KEY_LIGHTS_TOGGLE      0x21e   /* Reading light on or off */
+
 #define BTN_TRIGGER_HAPPY              0x2c0
 #define BTN_TRIGGER_HAPPY1             0x2c0
 #define BTN_TRIGGER_HAPPY2             0x2c1
@@ -801,13 +808,15 @@ struct input_keymap_entry {
 #define ABS_MT_WIDTH_MAJOR     0x32    /* Major axis of approaching ellipse */
 #define ABS_MT_WIDTH_MINOR     0x33    /* Minor axis (omit if circular) */
 #define ABS_MT_ORIENTATION     0x34    /* Ellipse orientation */
-#define ABS_MT_POSITION_X      0x35    /* Center X ellipse position */
-#define ABS_MT_POSITION_Y      0x36    /* Center Y ellipse position */
+#define ABS_MT_POSITION_X      0x35    /* Center X touch position */
+#define ABS_MT_POSITION_Y      0x36    /* Center Y touch position */
 #define ABS_MT_TOOL_TYPE       0x37    /* Type of touching device */
 #define ABS_MT_BLOB_ID         0x38    /* Group a set of packets as a blob */
 #define ABS_MT_TRACKING_ID     0x39    /* Unique ID of initiated contact */
 #define ABS_MT_PRESSURE                0x3a    /* Pressure on contact area */
 #define ABS_MT_DISTANCE                0x3b    /* Contact hover distance */
+#define ABS_MT_TOOL_X          0x3c    /* Center X tool position */
+#define ABS_MT_TOOL_Y          0x3d    /* Center Y tool position */
 
 
 #define ABS_MAX                        0x3f
@@ -845,6 +854,7 @@ struct input_keymap_entry {
 #define MSC_GESTURE            0x02
 #define MSC_RAW                        0x03
 #define MSC_SCAN               0x04
+#define MSC_TIMESTAMP          0x05
 #define MSC_MAX                        0x07
 #define MSC_CNT                        (MSC_MAX+1)
 
@@ -1144,4 +1154,4 @@ struct ff_effect {
 #define FF_MAX         0x7f
 #define FF_CNT         (FF_MAX+1)
 
-#endif
+#endif /* _INPUT_H */
index 56f472a..c16d29b 100644 (file)
@@ -133,4 +133,4 @@ struct ip_beet_phdr {
        __u8 reserved;
 };
 
-#endif /* _LINUX_IP_H */
+#endif /* _LINUX_IP_H */
index bf22b03..48af63c 100644 (file)
@@ -31,4 +31,21 @@ struct ip6_tnl_parm {
        struct in6_addr raddr;  /* remote tunnel end-point address */
 };
 
+struct ip6_tnl_parm2 {
+       char name[IFNAMSIZ];    /* name of tunnel device */
+       int link;               /* ifindex of underlying L2 interface */
+       __u8 proto;             /* tunnel protocol */
+       __u8 encap_limit;       /* encapsulation limit for tunnel */
+       __u8 hop_limit;         /* hop limit for tunnel */
+       __be32 flowinfo;        /* traffic class and flowlabel for tunnel */
+       __u32 flags;            /* tunnel flags */
+       struct in6_addr laddr;  /* local tunnel end-point address */
+       struct in6_addr raddr;  /* remote tunnel end-point address */
+
+       __be16                  i_flags;
+       __be16                  o_flags;
+       __be32                  i_key;
+       __be32                  o_key;
+};
+
 #endif
index 4deb383..a245377 100644 (file)
@@ -89,6 +89,7 @@
 #define IP_VS_CONN_F_TEMPLATE  0x1000          /* template, not connection */
 #define IP_VS_CONN_F_ONE_PACKET        0x2000          /* forward only one packet */
 
+/* Initial bits allowed in backup server */
 #define IP_VS_CONN_F_BACKUP_MASK (IP_VS_CONN_F_FWD_MASK | \
                                  IP_VS_CONN_F_NOOUTPUT | \
                                  IP_VS_CONN_F_INACTIVE | \
                                  IP_VS_CONN_F_TEMPLATE \
                                 )
 
+/* Bits allowed to update in backup server */
+#define IP_VS_CONN_F_BACKUP_UPD_MASK (IP_VS_CONN_F_INACTIVE | \
+                                     IP_VS_CONN_F_SEQ_MASK)
+
 /* Flags that are not sent to backup server start from bit 16 */
 #define IP_VS_CONN_F_NFCT      (1 << 16)       /* use netfilter conntrack */
 
@@ -125,8 +130,8 @@ struct ip_vs_service_user {
 
        /* virtual service options */
        char                    sched_name[IP_VS_SCHEDNAME_MAXLEN];
-       unsigned                flags;          /* virtual service flags */
-       unsigned                timeout;        /* persistent timeout in sec */
+       unsigned int            flags;          /* virtual service flags */
+       unsigned int            timeout;        /* persistent timeout in sec */
        __be32                  netmask;        /* persistent netmask */
 };
 
@@ -137,7 +142,7 @@ struct ip_vs_dest_user {
        __be16                  port;
 
        /* real server options */
-       unsigned                conn_flags;     /* connection flags */
+       unsigned int            conn_flags;     /* connection flags */
        int                     weight;         /* destination weight */
 
        /* thresholds for active connections */
@@ -187,8 +192,8 @@ struct ip_vs_service_entry {
 
        /* service options */
        char                    sched_name[IP_VS_SCHEDNAME_MAXLEN];
-       unsigned                flags;          /* virtual service flags */
-       unsigned                timeout;        /* persistent timeout */
+       unsigned int            flags;          /* virtual service flags */
+       unsigned int            timeout;        /* persistent timeout */
        __be32                  netmask;        /* persistent netmask */
 
        /* number of real servers */
@@ -202,7 +207,7 @@ struct ip_vs_service_entry {
 struct ip_vs_dest_entry {
        __be32                  addr;           /* destination address */
        __be16                  port;
-       unsigned                conn_flags;     /* connection flags */
+       unsigned int            conn_flags;     /* connection flags */
        int                     weight;         /* destination weight */
 
        __u32           u_threshold;    /* upper threshold */
@@ -275,8 +280,8 @@ struct ip_vs_daemon_user {
 #define IPVS_GENL_VERSION      0x1
 
 struct ip_vs_flags {
-       __be32 flags;
-       __be32 mask;
+       __u32 flags;
+       __u32 mask;
 };
 
 /* Generic Netlink command attributes */
index 15fe5e5..9077549 100644 (file)
  * if it becomes full and it is queried once a second to see if
  * anything is in it.  Incoming commands to the driver will get
  * delivered as commands.
- *
- * This driver provides two main interfaces: one for in-kernel
- * applications and another for userland applications.  The
- * capabilities are basically the same for both interface, although
- * the interfaces are somewhat different.  The stuff in the
- * #ifdef __KERNEL__ below is the in-kernel interface.  The userland
- * interface is defined later in the file.  */
-
-
+ */
 
 /*
  * This is an overlay for all the address types, so it's easy to
index 1d842cd..41aaa26 100644 (file)
@@ -63,6 +63,8 @@ struct ipv6_opt_hdr {
 #define ipv6_destopt_hdr ipv6_opt_hdr
 #define ipv6_hopopt_hdr  ipv6_opt_hdr
 
+/* Router Alert option values (RFC2711) */
+#define IPV6_OPT_ROUTERALERT_MLD       0x0000  /* MLD(RFC2710) */
 
 /*
  *     routing header type 0 (used in cmsghdr struct)
@@ -157,6 +159,7 @@ enum {
        DEVCONF_DISABLE_IPV6,
        DEVCONF_ACCEPT_DAD,
        DEVCONF_FORCE_TLLAO,
+       DEVCONF_NDISC_NOTIFY,
        DEVCONF_MAX
 };
 
index 45a6d1c..40490f3 100644 (file)
@@ -55,4 +55,7 @@ struct in6_rtmsg {
 #define RTMSG_NEWROUTE         0x21
 #define RTMSG_DELROUTE         0x22
 
-#endif
+#define IP6_RT_PRIO_USER       1024
+#define IP6_RT_PRIO_ADDRCONF   256
+
+#endif /* _LINUX_IPV6_ROUTE_H */
index e0fb63c..ae5704f 100644 (file)
@@ -1,8 +1,4 @@
-#ifndef _LINUX_IRQNR_H
-#define _LINUX_IRQNR_H
-
 /*
- * Generic irq_desc iterators:
+ * There isn't anything here anymore, but the file must not be empty or patch
+ * will delete it.
  */
-
-#endif
index 3d72b0c..55c0a1e 100644 (file)
@@ -15,6 +15,7 @@
 #define __ISDN_H__
 
 #include <linux/ioctl.h>
+#include <linux/tty.h>
 
 #define ISDN_MAX_DRIVERS    32
 #define ISDN_MAX_CHANNELS   64
index 353661d..141a6d5 100644 (file)
@@ -1,12 +1,8 @@
-#ifndef _LINUX_JOYSTICK_H
-#define _LINUX_JOYSTICK_H
-
 /*
  *  Copyright (C) 1996-2000 Vojtech Pavlik
  *
  *  Sponsored by SuSE
  */
-
 /*
  * 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
  * e-mail - mail your message to <vojtech@suse.cz>, or by paper mail:
  * Vojtech Pavlik, Ucitelska 1576, Prague 8, 182 00 Czech Republic
  */
+#ifndef _LINUX_JOYSTICK_H
+#define _LINUX_JOYSTICK_H
+
+
 
 #include <linux/types.h>
 #include <linux/input.h>
index af5551d..3f10017 100644 (file)
@@ -8,4 +8,4 @@ from the kernel sources. These must be the externally visible ones.
 #define MAJOR(dev)     ((dev)>>8)
 #define MINOR(dev)     ((dev) & 0xff)
 #define MKDEV(ma,mi)   ((ma)<<8 | (mi))
-#endif
+#endif /* _LINUX_KDEV_T_H */
diff --git a/usr/include/linux/kernel-page-flags.h b/usr/include/linux/kernel-page-flags.h
new file mode 100644 (file)
index 0000000..9adddde
--- /dev/null
@@ -0,0 +1,36 @@
+#ifndef LINUX_KERNEL_PAGE_FLAGS_H
+#define LINUX_KERNEL_PAGE_FLAGS_H
+
+/*
+ * Stable page flag bits exported to user space
+ */
+
+#define KPF_LOCKED             0
+#define KPF_ERROR              1
+#define KPF_REFERENCED         2
+#define KPF_UPTODATE           3
+#define KPF_DIRTY              4
+#define KPF_LRU                        5
+#define KPF_ACTIVE             6
+#define KPF_SLAB               7
+#define KPF_WRITEBACK          8
+#define KPF_RECLAIM            9
+#define KPF_BUDDY              10
+
+/* 11-20: new additions in 2.6.31 */
+#define KPF_MMAP               11
+#define KPF_ANON               12
+#define KPF_SWAPCACHE          13
+#define KPF_SWAPBACKED         14
+#define KPF_COMPOUND_HEAD      15
+#define KPF_COMPOUND_TAIL      16
+#define KPF_HUGE               17
+#define KPF_UNEVICTABLE                18
+#define KPF_HWPOISON           19
+#define KPF_NOPAGE             20
+
+#define KPF_KSM                        21
+#define KPF_THP                        22
+
+
+#endif /* LINUX_KERNEL_PAGE_FLAGS_H */
index d2b5b33..642d1e9 100644 (file)
@@ -10,4 +10,4 @@
 #define __ALIGN_KERNEL_MASK(x, mask)   (((x) + (mask)) & ~(mask))
 
 
-#endif
+#endif /* _LINUX_KERNEL_H */
index 92f6b42..7b6e7b1 100644 (file)
@@ -44,4 +44,4 @@ typedef struct kcapi_carddef {
 
 
 
-#endif                         /* __KERNELCAPI_H__ */
+#endif /* __KERNELCAPI_H__ */
diff --git a/usr/include/linux/kexec.h b/usr/include/linux/kexec.h
new file mode 100644 (file)
index 0000000..5ebc302
--- /dev/null
@@ -0,0 +1,52 @@
+#ifndef LINUX_KEXEC_H
+#define LINUX_KEXEC_H
+
+/* kexec system call -  It loads the new kernel to boot into.
+ * kexec does not sync, or unmount filesystems so if you need
+ * that to happen you need to do that yourself.
+ */
+
+#include <linux/types.h>
+
+/* kexec flags for different usage scenarios */
+#define KEXEC_ON_CRASH         0x00000001
+#define KEXEC_PRESERVE_CONTEXT 0x00000002
+#define KEXEC_ARCH_MASK                0xffff0000
+
+/* These values match the ELF architecture values.
+ * Unless there is a good reason that should continue to be the case.
+ */
+#define KEXEC_ARCH_DEFAULT ( 0 << 16)
+#define KEXEC_ARCH_386     ( 3 << 16)
+#define KEXEC_ARCH_X86_64  (62 << 16)
+#define KEXEC_ARCH_PPC     (20 << 16)
+#define KEXEC_ARCH_PPC64   (21 << 16)
+#define KEXEC_ARCH_IA_64   (50 << 16)
+#define KEXEC_ARCH_ARM     (40 << 16)
+#define KEXEC_ARCH_S390    (22 << 16)
+#define KEXEC_ARCH_SH      (42 << 16)
+#define KEXEC_ARCH_MIPS_LE (10 << 16)
+#define KEXEC_ARCH_MIPS    ( 8 << 16)
+
+/* The artificial cap on the number of segments passed to kexec_load. */
+#define KEXEC_SEGMENT_MAX 16
+
+/*
+ * This structure is used to hold the arguments that are used when
+ * loading  kernel binaries.
+ */
+struct kexec_segment {
+       const void *buf;
+       size_t bufsz;
+       const void *mem;
+       size_t memsz;
+};
+
+/* Load a new kernel image as described by the kexec_segment array
+ * consisting of passed number of segments at the entry-point address.
+ * The flags allow different useage types.
+ */
+extern int kexec_load(void *, size_t, struct kexec_segment *,
+               unsigned long int);
+
+#endif /* LINUX_KEXEC_H */
index 87f316a..b4be860 100644 (file)
 #define NR_BRL         11
 
 #define MAX_DIACR      256
-#endif
+#endif /* __LINUX_KEYBOARD_H */
index 9b0b865..c9b7f4f 100644 (file)
@@ -55,5 +55,6 @@
 #define KEYCTL_SESSION_TO_PARENT       18      /* apply session keyring to parent process */
 #define KEYCTL_REJECT                  19      /* reject a partially constructed key */
 #define KEYCTL_INSTANTIATE_IOV         20      /* instantiate a partially constructed key */
+#define KEYCTL_INVALIDATE              21      /* invalidate a key */
 
 #endif /*  _LINUX_KEYCTL_H */
index cf7b098..01bf15b 100644 (file)
@@ -101,9 +101,13 @@ struct kvm_userspace_memory_region {
        __u64 userspace_addr; /* start of the userspace allocated memory */
 };
 
-/* for kvm_memory_region::flags */
-#define KVM_MEM_LOG_DIRTY_PAGES  1UL
-#define KVM_MEMSLOT_INVALID      (1UL << 1)
+/*
+ * The bit 0 ~ bit 15 of kvm_memory_region::flags are visible for userspace,
+ * other bits are reserved for kvm internal use which are defined in
+ * include/linux/kvm_host.h.
+ */
+#define KVM_MEM_LOG_DIRTY_PAGES        (1UL << 0)
+#define KVM_MEM_READONLY       (1UL << 1)
 
 /* for KVM_IRQ_LINE */
 struct kvm_irq_level {
@@ -111,6 +115,7 @@ struct kvm_irq_level {
         * ACPI gsi notion of irq.
         * For IA-64 (APIC model) IOAPIC0: irq 0-23; IOAPIC1: irq 24-47..
         * For X86 (standard AT mode) PIC0/1: irq 0-15. IOAPIC0: 0-23..
+        * For ARM: See Documentation/virtual/kvm/api.txt
         */
        union {
                __u32 irq;
@@ -163,10 +168,17 @@ struct kvm_pit_config {
 #define KVM_EXIT_OSI              18
 #define KVM_EXIT_PAPR_HCALL      19
 #define KVM_EXIT_S390_UCONTROL   20
+#define KVM_EXIT_WATCHDOG         21
+#define KVM_EXIT_S390_TSCH        22
+#define KVM_EXIT_EPR              23
 
 /* For KVM_EXIT_INTERNAL_ERROR */
-#define KVM_INTERNAL_ERROR_EMULATION 1
-#define KVM_INTERNAL_ERROR_SIMUL_EX 2
+/* Emulate instruction failed. */
+#define KVM_INTERNAL_ERROR_EMULATION   1
+/* Encounter unexpected simultaneous exceptions. */
+#define KVM_INTERNAL_ERROR_SIMUL_EX    2
+/* Encounter unexpected vm-exit due to delivery event. */
+#define KVM_INTERNAL_ERROR_DELIVERY_EV 3
 
 /* for KVM_RUN, returned by mmap(vcpu_fd, offset=0) */
 struct kvm_run {
@@ -276,6 +288,19 @@ struct kvm_run {
                        __u64 ret;
                        __u64 args[9];
                } papr_hcall;
+               /* KVM_EXIT_S390_TSCH */
+               struct {
+                       __u16 subchannel_id;
+                       __u16 subchannel_nr;
+                       __u32 io_int_parm;
+                       __u32 io_int_word;
+                       __u32 ipb;
+                       __u8 dequeued;
+               } s390_tsch;
+               /* KVM_EXIT_EPR */
+               struct {
+                       __u32 epr;
+               } epr;
                /* Fix the size of the union. */
                char padding[256];
        };
@@ -388,10 +413,20 @@ struct kvm_s390_psw {
 #define KVM_S390_PROGRAM_INT           0xfffe0001u
 #define KVM_S390_SIGP_SET_PREFIX       0xfffe0002u
 #define KVM_S390_RESTART               0xfffe0003u
+#define KVM_S390_MCHK                  0xfffe1000u
 #define KVM_S390_INT_VIRTIO            0xffff2603u
 #define KVM_S390_INT_SERVICE           0xffff2401u
 #define KVM_S390_INT_EMERGENCY         0xffff1201u
 #define KVM_S390_INT_EXTERNAL_CALL     0xffff1202u
+/* Anything below 0xfffe0000u is taken by INT_IO */
+#define KVM_S390_INT_IO(ai,cssid,ssid,schid)   \
+       (((schid)) |                           \
+        ((ssid) << 16) |                      \
+        ((cssid) << 18) |                     \
+        ((ai) << 26))
+#define KVM_S390_INT_IO_MIN            0x00000000u
+#define KVM_S390_INT_IO_MAX            0xfffdffffu
+
 
 struct kvm_s390_interrupt {
        __u32 type;
@@ -414,12 +449,15 @@ enum {
        kvm_ioeventfd_flag_nr_datamatch,
        kvm_ioeventfd_flag_nr_pio,
        kvm_ioeventfd_flag_nr_deassign,
+       kvm_ioeventfd_flag_nr_virtio_ccw_notify,
        kvm_ioeventfd_flag_nr_max,
 };
 
 #define KVM_IOEVENTFD_FLAG_DATAMATCH (1 << kvm_ioeventfd_flag_nr_datamatch)
 #define KVM_IOEVENTFD_FLAG_PIO       (1 << kvm_ioeventfd_flag_nr_pio)
 #define KVM_IOEVENTFD_FLAG_DEASSIGN  (1 << kvm_ioeventfd_flag_nr_deassign)
+#define KVM_IOEVENTFD_FLAG_VIRTIO_CCW_NOTIFY \
+       (1 << kvm_ioeventfd_flag_nr_virtio_ccw_notify)
 
 #define KVM_IOEVENTFD_VALID_FLAG_MASK  ((1 << kvm_ioeventfd_flag_nr_max) - 1)
 
@@ -449,6 +487,32 @@ struct kvm_ppc_pvinfo {
        __u8  pad[108];
 };
 
+/* for KVM_PPC_GET_SMMU_INFO */
+#define KVM_PPC_PAGE_SIZES_MAX_SZ      8
+
+struct kvm_ppc_one_page_size {
+       __u32 page_shift;       /* Page shift (or 0) */
+       __u32 pte_enc;          /* Encoding in the HPTE (>>12) */
+};
+
+struct kvm_ppc_one_seg_page_size {
+       __u32 page_shift;       /* Base page shift of segment (or 0) */
+       __u32 slb_enc;          /* SLB encoding for BookS */
+       struct kvm_ppc_one_page_size enc[KVM_PPC_PAGE_SIZES_MAX_SZ];
+};
+
+#define KVM_PPC_PAGE_SIZES_REAL                0x00000001
+#define KVM_PPC_1T_SEGMENTS            0x00000002
+
+struct kvm_ppc_smmu_info {
+       __u64 flags;
+       __u32 slb_size;
+       __u32 pad;
+       struct kvm_ppc_one_seg_page_size sps[KVM_PPC_PAGE_SIZES_MAX_SZ];
+};
+
+#define KVM_PPC_PVINFO_FLAGS_EV_IDLE   (1<<0)
+
 #define KVMIO 0xAE
 
 /* machine type bits, to be used as argument to KVM_CREATE_VM */
@@ -497,9 +561,7 @@ struct kvm_ppc_pvinfo {
 #define KVM_CAP_MP_STATE 14
 #define KVM_CAP_COALESCED_MMIO 15
 #define KVM_CAP_SYNC_MMU 16  /* Changes to host mmap are reflected in guest */
-#ifdef __KVM_HAVE_DEVICE_ASSIGNMENT
 #define KVM_CAP_DEVICE_ASSIGNMENT 17
-#endif
 #define KVM_CAP_IOMMU 18
 #ifdef __KVM_HAVE_MSI
 #define KVM_CAP_DEVICE_MSI 20
@@ -515,13 +577,9 @@ struct kvm_ppc_pvinfo {
 #ifdef __KVM_HAVE_PIT
 #define KVM_CAP_REINJECT_CONTROL 24
 #endif
-#ifdef __KVM_HAVE_IOAPIC
 #define KVM_CAP_IRQ_ROUTING 25
-#endif
 #define KVM_CAP_IRQ_INJECT_STATUS 26
-#ifdef __KVM_HAVE_DEVICE_ASSIGNMENT
 #define KVM_CAP_DEVICE_DEASSIGNMENT 27
-#endif
 #ifdef __KVM_HAVE_MSIX
 #define KVM_CAP_DEVICE_MSIX 28
 #endif
@@ -589,6 +647,25 @@ struct kvm_ppc_pvinfo {
 #define KVM_CAP_S390_UCONTROL 73
 #define KVM_CAP_SYNC_REGS 74
 #define KVM_CAP_PCI_2_3 75
+#define KVM_CAP_KVMCLOCK_CTRL 76
+#define KVM_CAP_SIGNAL_MSI 77
+#define KVM_CAP_PPC_GET_SMMU_INFO 78
+#define KVM_CAP_S390_COW 79
+#define KVM_CAP_PPC_ALLOC_HTAB 80
+#ifdef __KVM_HAVE_READONLY_MEM
+#define KVM_CAP_READONLY_MEM 81
+#endif
+#define KVM_CAP_IRQFD_RESAMPLE 82
+#define KVM_CAP_PPC_BOOKE_WATCHDOG 83
+#define KVM_CAP_PPC_HTAB_FD 84
+#define KVM_CAP_S390_CSS_SUPPORT 85
+#define KVM_CAP_PPC_EPR 86
+#define KVM_CAP_ARM_PSCI 87
+#define KVM_CAP_ARM_SET_DEVICE_ADDR 88
+#define KVM_CAP_DEVICE_CTRL 89
+#define KVM_CAP_IRQ_MPIC 90
+#define KVM_CAP_PPC_RTAS 91
+#define KVM_CAP_IRQ_XICS 92
 
 #ifdef KVM_CAP_IRQ_ROUTING
 
@@ -654,12 +731,21 @@ struct kvm_xen_hvm_config {
 #endif
 
 #define KVM_IRQFD_FLAG_DEASSIGN (1 << 0)
+/*
+ * Available with KVM_CAP_IRQFD_RESAMPLE
+ *
+ * KVM_IRQFD_FLAG_RESAMPLE indicates resamplefd is valid and specifies
+ * the irqfd to operate in resampling mode for level triggered interrupt
+ * emlation.  See Documentation/virtual/kvm/api.txt.
+ */
+#define KVM_IRQFD_FLAG_RESAMPLE (1 << 1)
 
 struct kvm_irqfd {
        __u32 fd;
        __u32 gsi;
        __u32 flags;
-       __u8  pad[20];
+       __u32 resamplefd;
+       __u8  pad[16];
 };
 
 struct kvm_clock_data {
@@ -697,6 +783,7 @@ struct kvm_dirty_tlb {
 #define KVM_REG_IA64           0x3000000000000000ULL
 #define KVM_REG_ARM            0x4000000000000000ULL
 #define KVM_REG_S390           0x5000000000000000ULL
+#define KVM_REG_MIPS           0x7000000000000000ULL
 
 #define KVM_REG_SIZE_SHIFT     52
 #define KVM_REG_SIZE_MASK      0x00f0000000000000ULL
@@ -709,11 +796,51 @@ struct kvm_dirty_tlb {
 #define KVM_REG_SIZE_U512      0x0060000000000000ULL
 #define KVM_REG_SIZE_U1024     0x0070000000000000ULL
 
+struct kvm_reg_list {
+       __u64 n; /* number of regs */
+       __u64 reg[0];
+};
+
 struct kvm_one_reg {
        __u64 id;
        __u64 addr;
 };
 
+struct kvm_msi {
+       __u32 address_lo;
+       __u32 address_hi;
+       __u32 data;
+       __u32 flags;
+       __u8  pad[16];
+};
+
+struct kvm_arm_device_addr {
+       __u64 id;
+       __u64 addr;
+};
+
+/*
+ * Device control API, available with KVM_CAP_DEVICE_CTRL
+ */
+#define KVM_CREATE_DEVICE_TEST         1
+
+struct kvm_create_device {
+       __u32   type;   /* in: KVM_DEV_TYPE_xxx */
+       __u32   fd;     /* out: device handle */
+       __u32   flags;  /* in: KVM_CREATE_DEVICE_xxx */
+};
+
+struct kvm_device_attr {
+       __u32   flags;          /* no flags currently defined */
+       __u32   group;          /* device-defined */
+       __u64   attr;           /* group-defined */
+       __u64   addr;           /* userspace address of attr data */
+};
+
+#define KVM_DEV_TYPE_FSL_MPIC_20       1
+#define KVM_DEV_TYPE_FSL_MPIC_42       2
+#define KVM_DEV_TYPE_XICS              3
+
 /*
  * ioctls for VM fds
  */
@@ -788,6 +915,29 @@ struct kvm_s390_ucas_mapping {
 /* Available with KVM_CAP_PCI_2_3 */
 #define KVM_ASSIGN_SET_INTX_MASK  _IOW(KVMIO,  0xa4, \
                                       struct kvm_assigned_pci_dev)
+/* Available with KVM_CAP_SIGNAL_MSI */
+#define KVM_SIGNAL_MSI            _IOW(KVMIO,  0xa5, struct kvm_msi)
+/* Available with KVM_CAP_PPC_GET_SMMU_INFO */
+#define KVM_PPC_GET_SMMU_INFO    _IOR(KVMIO,  0xa6, struct kvm_ppc_smmu_info)
+/* Available with KVM_CAP_PPC_ALLOC_HTAB */
+#define KVM_PPC_ALLOCATE_HTAB    _IOWR(KVMIO, 0xa7, __u32)
+#define KVM_CREATE_SPAPR_TCE     _IOW(KVMIO,  0xa8, struct kvm_create_spapr_tce)
+/* Available with KVM_CAP_RMA */
+#define KVM_ALLOCATE_RMA         _IOR(KVMIO,  0xa9, struct kvm_allocate_rma)
+/* Available with KVM_CAP_PPC_HTAB_FD */
+#define KVM_PPC_GET_HTAB_FD      _IOW(KVMIO,  0xaa, struct kvm_get_htab_fd)
+/* Available with KVM_CAP_ARM_SET_DEVICE_ADDR */
+#define KVM_ARM_SET_DEVICE_ADDR          _IOW(KVMIO,  0xab, struct kvm_arm_device_addr)
+/* Available with KVM_CAP_PPC_RTAS */
+#define KVM_PPC_RTAS_DEFINE_TOKEN _IOW(KVMIO,  0xac, struct kvm_rtas_token_args)
+
+/* ioctl for vm fd */
+#define KVM_CREATE_DEVICE        _IOWR(KVMIO,  0xe0, struct kvm_create_device)
+
+/* ioctls for fds returned by KVM_CREATE_DEVICE */
+#define KVM_SET_DEVICE_ATTR      _IOW(KVMIO,  0xe1, struct kvm_device_attr)
+#define KVM_GET_DEVICE_ATTR      _IOW(KVMIO,  0xe2, struct kvm_device_attr)
+#define KVM_HAS_DEVICE_ATTR      _IOW(KVMIO,  0xe3, struct kvm_device_attr)
 
 /*
  * ioctls for vcpu fds
@@ -851,14 +1001,15 @@ struct kvm_s390_ucas_mapping {
 /* Available with KVM_CAP_XCRS */
 #define KVM_GET_XCRS             _IOR(KVMIO,  0xa6, struct kvm_xcrs)
 #define KVM_SET_XCRS             _IOW(KVMIO,  0xa7, struct kvm_xcrs)
-#define KVM_CREATE_SPAPR_TCE     _IOW(KVMIO,  0xa8, struct kvm_create_spapr_tce)
-/* Available with KVM_CAP_RMA */
-#define KVM_ALLOCATE_RMA         _IOR(KVMIO,  0xa9, struct kvm_allocate_rma)
 /* Available with KVM_CAP_SW_TLB */
 #define KVM_DIRTY_TLB            _IOW(KVMIO,  0xaa, struct kvm_dirty_tlb)
 /* Available with KVM_CAP_ONE_REG */
 #define KVM_GET_ONE_REG                  _IOW(KVMIO,  0xab, struct kvm_one_reg)
 #define KVM_SET_ONE_REG                  _IOW(KVMIO,  0xac, struct kvm_one_reg)
+/* VM is being stopped by host */
+#define KVM_KVMCLOCK_CTRL        _IO(KVMIO,   0xad)
+#define KVM_ARM_VCPU_INIT        _IOW(KVMIO,  0xae, struct kvm_vcpu_init)
+#define KVM_GET_REG_LIST         _IOWR(KVMIO, 0xb0, struct kvm_reg_list)
 
 #define KVM_DEV_ASSIGN_ENABLE_IOMMU    (1 << 0)
 #define KVM_DEV_ASSIGN_PCI_2_3         (1 << 1)
index 5ca74dd..c4bec82 100644 (file)
@@ -35,6 +35,22 @@ struct sockaddr_l2tpip {
                              sizeof(__u32)];
 };
 
+/**
+ * struct sockaddr_l2tpip6 - the sockaddr structure for L2TP-over-IPv6 sockets
+ * @l2tp_family:  address family number AF_L2TPIP.
+ * @l2tp_addr:    protocol specific address information
+ * @l2tp_conn_id: connection id of tunnel
+ */
+struct sockaddr_l2tpip6 {
+       /* The first fields must match struct sockaddr_in6 */
+       __kernel_sa_family_t l2tp_family; /* AF_INET6 */
+       __be16          l2tp_unused;    /* INET port number (unused) */
+       __be32          l2tp_flowinfo;  /* IPv6 flow information */
+       struct in6_addr l2tp_addr;      /* IPv6 address */
+       __u32           l2tp_scope_id;  /* scope id (new in RFC2553) */
+       __u32           l2tp_conn_id;   /* Connection ID of tunnel */
+};
+
 /*****************************************************************************
  *  NETLINK_GENERIC netlink family.
  *****************************************************************************/
@@ -104,6 +120,8 @@ enum {
        L2TP_ATTR_MTU,                  /* u16 */
        L2TP_ATTR_MRU,                  /* u16 */
        L2TP_ATTR_STATS,                /* nested */
+       L2TP_ATTR_IP6_SADDR,            /* struct in6_addr */
+       L2TP_ATTR_IP6_DADDR,            /* struct in6_addr */
        __L2TP_ATTR_MAX,
 };
 
@@ -157,4 +175,4 @@ enum l2tp_seqmode {
 #define L2TP_GENL_NAME         "l2tp"
 #define L2TP_GENL_VERSION      0x1
 
-#endif
+#endif /* _LINUX_L2TP_H_ */
index e9a63fe..ff895d1 100644 (file)
@@ -1,5 +1,3 @@
-#ifndef __LINUX_LLC_H
-#define __LINUX_LLC_H
 /*
  * IEEE 802.2 User Interface SAPs for Linux, data structures and indicators.
  *
@@ -12,6 +10,8 @@
  *
  * See the GNU General Public License for more details.
  */
+#ifndef __LINUX_LLC_H
+#define __LINUX_LLC_H
 
 #include <linux/socket.h>
 
index 0c87e91..adbd3c8 100644 (file)
@@ -1,6 +1,3 @@
-#ifndef _LINUX_LOOP_H
-#define _LINUX_LOOP_H
-
 /*
  * include/linux/loop.h
  *
@@ -9,6 +6,9 @@
  * Copyright 1993 by Theodore Ts'o.  Redistribution of this file is
  * permitted under the GNU General Public License.
  */
+#ifndef _LINUX_LOOP_H
+#define _LINUX_LOOP_H
+
 
 #define LO_NAME_SIZE   64
 #define LO_KEY_SIZE    32
@@ -91,4 +91,4 @@ struct loop_info64 {
 #define LOOP_CTL_ADD           0x4C80
 #define LOOP_CTL_REMOVE                0x4C81
 #define LOOP_CTL_GET_FREE      0x4C82
-#endif
+#endif /* _LINUX_LOOP_H */
index 59b1a6f..3226e65 100644 (file)
@@ -1,12 +1,12 @@
-#ifndef _LINUX_LP_H
-#define _LINUX_LP_H
-
 /*
  * usr/include/linux/lp.h c.1991-1992 James Wiegand
  * many modifications copyright (C) 1992 Michael K. Johnson
  * Interrupt support added 1993 Nigel Gamble
  * Removed 8255 status defines from inside __KERNEL__ Marcelo Tosatti 
  */
+#ifndef _LINUX_LP_H
+#define _LINUX_LP_H
+
 
 /*
  * Per POSIX guidelines, this module reserves the LP and lp prefixes
@@ -97,4 +97,4 @@
 #define LP_TIMEOUT_POLLED      (10 * HZ)
 
 
-#endif
+#endif /* _LINUX_LP_H */
index e15192c..2944278 100644 (file)
@@ -11,6 +11,7 @@
 #define DEBUGFS_MAGIC          0x64626720
 #define SECURITYFS_MAGIC       0x73636673
 #define SELINUX_MAGIC          0xf97cff8c
+#define SMACK_MAGIC            0x43415d53      /* "SMAC" */
 #define RAMFS_MAGIC            0x858458f6      /* some random number */
 #define TMPFS_MAGIC            0x01021994
 #define HUGETLBFS_MAGIC        0x958458f6      /* some random number */
 #define EXT4_SUPER_MAGIC       0xEF53
 #define BTRFS_SUPER_MAGIC      0x9123683E
 #define NILFS_SUPER_MAGIC      0x3434
+#define F2FS_SUPER_MAGIC       0xF2F52010
 #define HPFS_SUPER_MAGIC       0xf995e849
 #define ISOFS_SUPER_MAGIC      0x9660
 #define JFFS2_SUPER_MAGIC      0x72b6
 #define PSTOREFS_MAGIC         0x6165676C
+#define EFIVARFS_MAGIC         0xde5e81e4
+#define HOSTFS_SUPER_MAGIC     0x00c0ffee
 
 #define MINIX_SUPER_MAGIC      0x137F          /* minix v1 fs, 14 char names */
 #define MINIX_SUPER_MAGIC2     0x138F          /* minix v1 fs, 30 char names */
index 182fa0f..57672dd 100644 (file)
 #define MDIO_PKGID2            15
 #define MDIO_AN_ADVERTISE      16      /* AN advertising (base page) */
 #define MDIO_AN_LPA            19      /* AN LP abilities (base page) */
+#define MDIO_PCS_EEE_ABLE      20      /* EEE Capability register */
+#define MDIO_PCS_EEE_WK_ERR    22      /* EEE wake error counter */
 #define MDIO_PHYXS_LNSTAT      24      /* PHY XGXS lane state */
+#define MDIO_AN_EEE_ADV                60      /* EEE advertisement */
+#define MDIO_AN_EEE_LPABLE     61      /* EEE link partner ability */
 
 /* Media-dependent registers. */
 #define MDIO_PMA_10GBT_SWAPPOL 130     /* 10GBASE-T pair swap & polarity */
@@ -56,7 +60,6 @@
 #define MDIO_PCS_10GBRT_STAT2  33      /* 10GBASE-R/-T PCS status 2 */
 #define MDIO_AN_10GBT_CTRL     32      /* 10GBASE-T auto-negotiation control */
 #define MDIO_AN_10GBT_STAT     33      /* 10GBASE-T auto-negotiation status */
-#define MDIO_AN_EEE_ADV                60      /* EEE advertisement */
 
 /* LASI (Link Alarm Status Interrupt) registers, defined by XENPAK MSA. */
 #define MDIO_PMA_LASI_RXCTRL   0x9000  /* RX_ALARM control */
@@ -82,6 +85,7 @@
 #define MDIO_AN_CTRL1_RESTART          BMCR_ANRESTART
 #define MDIO_AN_CTRL1_ENABLE           BMCR_ANENABLE
 #define MDIO_AN_CTRL1_XNP              0x2000  /* Enable extended next page */
+#define MDIO_PCS_CTRL1_CLKSTOP_EN      0x400   /* Stop the clock during LPI */
 
 /* 10 Gb/s */
 #define MDIO_CTRL1_SPEED10G            (MDIO_CTRL1_SPEEDSELEXT | 0x00)
 #define MDIO_AN_10GBT_STAT_MS          0x4000  /* Master/slave config */
 #define MDIO_AN_10GBT_STAT_MSFLT       0x8000  /* Master/slave config fault */
 
-/* AN EEE Advertisement register. */
-#define MDIO_AN_EEE_ADV_100TX          0x0002  /* Advertise 100TX EEE cap */
-#define MDIO_AN_EEE_ADV_1000T          0x0004  /* Advertise 1000T EEE cap */
+/* EEE Supported/Advertisement/LP Advertisement registers.
+ *
+ * EEE capability Register (3.20), Advertisement (7.60) and
+ * Link partner ability (7.61) registers have and can use the same identical
+ * bit masks.
+ */
+#define MDIO_AN_EEE_ADV_100TX  0x0002  /* Advertise 100TX EEE cap */
+#define MDIO_AN_EEE_ADV_1000T  0x0004  /* Advertise 1000T EEE cap */
+/* Note: the two defines above can be potentially used by the user-land
+ * and cannot remove them now.
+ * So, we define the new generic MDIO_EEE_100TX and MDIO_EEE_1000T macros
+ * using the previous ones (that can be considered obsolete).
+ */
+#define MDIO_EEE_100TX         MDIO_AN_EEE_ADV_100TX   /* 100TX EEE cap */
+#define MDIO_EEE_1000T         MDIO_AN_EEE_ADV_1000T   /* 1000T EEE cap */
+#define MDIO_EEE_10GT          0x0008  /* 10GT EEE cap */
+#define MDIO_EEE_1000KX                0x0010  /* 1000KX EEE cap */
+#define MDIO_EEE_10GKX4                0x0020  /* 10G KX4 EEE cap */
+#define MDIO_EEE_10GKR         0x0040  /* 10G KR EEE cap */
 
 /* LASI RX_ALARM control/status registers. */
 #define MDIO_PMA_LASI_RX_PHYXSLFLT     0x0001  /* PHY XS RX local fault */
index 410e7cc..e303639 100644 (file)
@@ -56,6 +56,8 @@ struct media_device_info {
 #define MEDIA_ENT_T_V4L2_SUBDEV_SENSOR (MEDIA_ENT_T_V4L2_SUBDEV + 1)
 #define MEDIA_ENT_T_V4L2_SUBDEV_FLASH  (MEDIA_ENT_T_V4L2_SUBDEV + 2)
 #define MEDIA_ENT_T_V4L2_SUBDEV_LENS   (MEDIA_ENT_T_V4L2_SUBDEV + 3)
+/* A converter of analogue video to its digital representation. */
+#define MEDIA_ENT_T_V4L2_SUBDEV_DECODER        (MEDIA_ENT_T_V4L2_SUBDEV + 4)
 
 #define MEDIA_ENT_FL_DEFAULT           (1 << 0)
 
diff --git a/usr/include/linux/mei.h b/usr/include/linux/mei.h
new file mode 100644 (file)
index 0000000..bc0d8b6
--- /dev/null
@@ -0,0 +1,110 @@
+/******************************************************************************
+ * Intel Management Engine Interface (Intel MEI) Linux driver
+ * Intel MEI Interface Header
+ *
+ * This file is provided under a dual BSD/GPLv2 license.  When using or
+ * redistributing this file, you may do so under either license.
+ *
+ * GPL LICENSE SUMMARY
+ *
+ * Copyright(c) 2003 - 2012 Intel Corporation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of version 2 of the GNU General Public License 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,
+ * USA
+ *
+ * The full GNU General Public License is included in this distribution
+ * in the file called LICENSE.GPL.
+ *
+ * Contact Information:
+ *     Intel Corporation.
+ *     linux-mei@linux.intel.com
+ *     http://www.intel.com
+ *
+ * BSD LICENSE
+ *
+ * Copyright(c) 2003 - 2012 Intel Corporation. All rights reserved.
+ * All rights reserved.
+ *
+ * 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 Intel Corporation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "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 THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS 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 _LINUX_MEI_H
+#define _LINUX_MEI_H
+
+#include <linux/uuid.h>
+
+/*
+ * This IOCTL is used to associate the current file descriptor with a
+ * FW Client (given by UUID). This opens a communication channel
+ * between a host client and a FW client. From this point every read and write
+ * will communicate with the associated FW client.
+ * Only in close() (file_operation release()) the communication between
+ * the clients is disconnected
+ *
+ * The IOCTL argument is a struct with a union that contains
+ * the input parameter and the output parameter for this IOCTL.
+ *
+ * The input parameter is UUID of the FW Client.
+ * The output parameter is the properties of the FW client
+ * (FW protocol version and max message size).
+ *
+ */
+#define IOCTL_MEI_CONNECT_CLIENT \
+       _IOWR('H' , 0x01, struct mei_connect_client_data)
+
+/*
+ * Intel MEI client information struct
+ */
+struct mei_client {
+       __u32 max_msg_length;
+       __u8 protocol_version;
+       __u8 reserved[3];
+};
+
+/*
+ * IOCTL Connect Client Data structure
+ */
+struct mei_connect_client_data {
+       union {
+               uuid_le in_client_uuid;
+               struct mei_client out_client_properties;
+       };
+};
+
+#endif /* _LINUX_MEI_H  */
index 1c3757a..3bcdcc9 100644 (file)
@@ -1,12 +1,12 @@
-#ifndef _LINUX_MEMPOLICY_H
-#define _LINUX_MEMPOLICY_H 1
-
-#include <linux/errno.h>
-
 /*
  * NUMA memory policies for Linux.
  * Copyright 2003,2004 Andi Kleen SuSE Labs
  */
+#ifndef _LINUX_MEMPOLICY_H
+#define _LINUX_MEMPOLICY_H
+
+#include <linux/errno.h>
+
 
 /*
  * Both the MPOL_* mempolicy mode and the MPOL_F_* optional mode flags are
@@ -20,6 +20,7 @@ enum {
        MPOL_PREFERRED,
        MPOL_BIND,
        MPOL_INTERLEAVE,
+       MPOL_LOCAL,
        MPOL_MAX,       /* always last member of enum */
 };
 
@@ -47,9 +48,15 @@ enum mpol_rebind_step {
 
 /* Flags for mbind */
 #define MPOL_MF_STRICT (1<<0)  /* Verify existing pages in the mapping */
-#define MPOL_MF_MOVE   (1<<1)  /* Move pages owned by this process to conform to mapping */
-#define MPOL_MF_MOVE_ALL (1<<2)        /* Move every page to conform to mapping */
-#define MPOL_MF_INTERNAL (1<<3)        /* Internal flags start here */
+#define MPOL_MF_MOVE    (1<<1) /* Move pages owned by this process to conform
+                                  to policy */
+#define MPOL_MF_MOVE_ALL (1<<2)        /* Move every page to conform to policy */
+#define MPOL_MF_LAZY    (1<<3) /* Modifies '_MOVE:  lazy migrate on fault */
+#define MPOL_MF_INTERNAL (1<<4)        /* Internal flags start here */
+
+#define MPOL_MF_VALID  (MPOL_MF_STRICT   |     \
+                        MPOL_MF_MOVE     |     \
+                        MPOL_MF_MOVE_ALL)
 
 /*
  * Internal flags that share the struct mempolicy flags word with
@@ -59,6 +66,8 @@ enum mpol_rebind_step {
 #define MPOL_F_SHARED  (1 << 0)        /* identify shared policies */
 #define MPOL_F_LOCAL   (1 << 1)        /* preferred local allocation */
 #define MPOL_F_REBINDING (1 << 2)      /* identify policies in rebinding */
+#define MPOL_F_MOF     (1 << 3) /* this policy wants migrate on fault */
+#define MPOL_F_MORON   (1 << 4) /* Migrate On pte_numa Reference On Node */
 
 
-#endif
+#endif /* _LINUX_MEMPOLICY_H */
index 0dd4995..8ff50fe 100644 (file)
@@ -57,10 +57,8 @@ struct meye_params {
 #define MEYEIOC_STILLJCAPT     _IOR ('v', BASE_VIDIOC_PRIVATE+5, int)
 
 /* V4L2 private controls */
-#define V4L2_CID_AGC           V4L2_CID_PRIVATE_BASE
-#define V4L2_CID_MEYE_SHARPNESS        (V4L2_CID_PRIVATE_BASE + 1)
-#define V4L2_CID_PICTURE       (V4L2_CID_PRIVATE_BASE + 2)
-#define V4L2_CID_JPEGQUAL      (V4L2_CID_PRIVATE_BASE + 3)
-#define V4L2_CID_FRAMERATE     (V4L2_CID_PRIVATE_BASE + 4)
+#define V4L2_CID_MEYE_AGC              (V4L2_CID_USER_MEYE_BASE + 0)
+#define V4L2_CID_MEYE_PICTURE          (V4L2_CID_USER_MEYE_BASE + 1)
+#define V4L2_CID_MEYE_FRAMERATE                (V4L2_CID_USER_MEYE_BASE + 2)
 
 #endif
index dc3d17f..c75eea1 100644 (file)
@@ -21,6 +21,8 @@
 #define MII_EXPANSION          0x06    /* Expansion register          */
 #define MII_CTRL1000           0x09    /* 1000BASE-T control          */
 #define MII_STAT1000           0x0a    /* 1000BASE-T status           */
+#define        MII_MMD_CTRL            0x0d    /* MMD Access Control Register */
+#define        MII_MMD_DATA            0x0e    /* MMD Access Data Register */
 #define MII_ESTATUS            0x0f    /* Extended Status             */
 #define MII_DCOUNTER           0x12    /* Disconnect counter          */
 #define MII_FCSCOUNTER         0x13    /* False carrier counter       */
 #define FLOW_CTRL_TX           0x01
 #define FLOW_CTRL_RX           0x02
 
+/* MMD Access Control register fields */
+#define MII_MMD_CTRL_DEVAD_MASK        0x1f    /* Mask MMD DEVAD*/
+#define MII_MMD_CTRL_ADDR      0x0000  /* Address */
+#define MII_MMD_CTRL_NOINCR    0x4000  /* no post increment */
+#define MII_MMD_CTRL_INCR_RDWT 0x8000  /* post increment on reads & writes */
+#define MII_MMD_CTRL_INCR_ON_WT        0xC000  /* post increment on writes only */
+
 /* This structure is used in all SIOCxMIIxxx ioctl calls */
 struct mii_ioctl_data {
        __u16           phy_id;
index 76b4127..ef12aa4 100644 (file)
@@ -26,6 +26,9 @@
 #define MRT_ASSERT     (MRT_BASE+7)    /* Activate PIM assert mode             */
 #define MRT_PIM                (MRT_BASE+8)    /* enable PIM code                      */
 #define MRT_TABLE      (MRT_BASE+9)    /* Specify mroute table ID              */
+#define MRT_ADD_MFC_PROXY      (MRT_BASE+10)   /* Add a (*,*|G) mfc entry      */
+#define MRT_DEL_MFC_PROXY      (MRT_BASE+11)   /* Del a (*,*|G) mfc entry      */
+#define MRT_MAX                (MRT_BASE+11)
 
 #define SIOCGETVIFCNT  SIOCPROTOPRIVATE        /* IP protocol privates */
 #define SIOCGETSGCNT   (SIOCPROTOPRIVATE+1)
@@ -140,4 +143,4 @@ struct igmpmsg {
 #define IGMPMSG_WHOLEPKT       3               /* For PIM Register processing */
 
 
-#endif
+#endif /* __LINUX_MROUTE_H */
index 77d2bc3..72bcfa9 100644 (file)
@@ -26,6 +26,9 @@
 #define MRT6_ASSERT    (MRT6_BASE+7)   /* Activate PIM assert mode             */
 #define MRT6_PIM       (MRT6_BASE+8)   /* enable PIM code                      */
 #define MRT6_TABLE     (MRT6_BASE+9)   /* Specify mroute table ID              */
+#define MRT6_ADD_MFC_PROXY     (MRT6_BASE+10)  /* Add a (*,*|G) mfc entry      */
+#define MRT6_DEL_MFC_PROXY     (MRT6_BASE+11)  /* Del a (*,*|G) mfc entry      */
+#define MRT6_MAX       (MRT6_BASE+11)
 
 #define SIOCGETMIFCNT_IN6      SIOCPROTOPRIVATE        /* IP protocol privates */
 #define SIOCGETSGCNT_IN6       (SIOCPROTOPRIVATE+1)
@@ -132,4 +135,4 @@ struct mrt6msg {
        struct in6_addr im6_src, im6_dst;
 };
 
-#endif
+#endif /* __LINUX_MROUTE6_H */
index 5465841..3ff5796 100644 (file)
@@ -21,8 +21,9 @@
 #define CT_LE_W(v)     cpu_to_le16(v)
 #define CT_LE_L(v)     cpu_to_le32(v)
 
+#define MSDOS_ROOT_INO  1      /* The root inode number */
+#define MSDOS_FSINFO_INO 2     /* Used for managing the FSINFO block */
 
-#define MSDOS_ROOT_INO 1       /* == MINIX_ROOT_INO */
 #define MSDOS_DIR_BITS 5       /* log2(sizeof(struct msdos_dir_entry)) */
 
 /* directory limit */
@@ -86,6 +87,8 @@
 #define IS_FSINFO(x)   (le32_to_cpu((x)->signature1) == FAT_FSINFO_SIG1 \
                         && le32_to_cpu((x)->signature2) == FAT_FSINFO_SIG2)
 
+#define FAT_STATE_DIRTY 0x01
+
 struct __fat_dirent {
        long            d_ino;
        __kernel_off_t  d_off;
@@ -119,14 +122,34 @@ struct fat_boot_sector {
        __le32  hidden;         /* hidden sectors (unused) */
        __le32  total_sect;     /* number of sectors (if sectors == 0) */
 
-       /* The following fields are only used by FAT32 */
-       __le32  fat32_length;   /* sectors/FAT */
-       __le16  flags;          /* bit 8: fat mirroring, low 4: active fat */
-       __u8    version[2];     /* major, minor filesystem version */
-       __le32  root_cluster;   /* first cluster in root directory */
-       __le16  info_sector;    /* filesystem info sector */
-       __le16  backup_boot;    /* backup boot sector */
-       __le16  reserved2[6];   /* Unused */
+       union {
+               struct {
+                       /*  Extended BPB Fields for FAT16 */
+                       __u8    drive_number;   /* Physical drive number */
+                       __u8    state;          /* undocumented, but used
+                                                  for mount state. */
+                       /* other fiealds are not added here */
+               } fat16;
+
+               struct {
+                       /* only used by FAT32 */
+                       __le32  length;         /* sectors/FAT */
+                       __le16  flags;          /* bit 8: fat mirroring,
+                                                  low 4: active fat */
+                       __u8    version[2];     /* major, minor filesystem
+                                                  version */
+                       __le32  root_cluster;   /* first cluster in
+                                                  root directory */
+                       __le16  info_sector;    /* filesystem info sector */
+                       __le16  backup_boot;    /* backup boot sector */
+                       __le16  reserved2[6];   /* Unused */
+                       /* Extended BPB Fields for FAT32 */
+                       __u8    drive_number;   /* Physical drive number */
+                       __u8    state;          /* undocumented, but used
+                                                  for mount state. */
+                       /* other fiealds are not added here */
+               } fat32;
+       };
 };
 
 struct fat_boot_fsinfo {
@@ -163,4 +186,4 @@ struct msdos_dir_slot {
        __u8    name11_12[4];   /* last 2 characters in name */
 };
 
-#endif /* !_LINUX_MSDOS_FS_H */
+#endif /* _LINUX_MSDOS_FS_H */
index cef8e30..0a5029c 100644 (file)
@@ -10,6 +10,7 @@
 /* msgrcv options */
 #define MSG_NOERROR     010000  /* no error if message is too big */
 #define MSG_EXCEPT      020000  /* recv any msg except of specified type.*/
+#define MSG_COPY        040000  /* copy (not remove) all queue messages */
 
 /* Obsolete, used only for backwards compatibility and libc5 compiles */
 struct msqid_ds {
index 61b5452..168a0f9 100644 (file)
@@ -95,4 +95,4 @@ struct r3964_client_message {
 
 
 
-#endif
+#endif /* __LINUX_N_R3964_H__ */
index fdd2989..e2c8025 100644 (file)
 #define NBD_SET_SIZE_BLOCKS    _IO( 0xab, 7 )
 #define NBD_DISCONNECT  _IO( 0xab, 8 )
 #define NBD_SET_TIMEOUT _IO( 0xab, 9 )
+#define NBD_SET_FLAGS   _IO( 0xab, 10)
 
 enum {
        NBD_CMD_READ = 0,
        NBD_CMD_WRITE = 1,
-       NBD_CMD_DISC = 2
+       NBD_CMD_DISC = 2,
+       NBD_CMD_FLUSH = 3,
+       NBD_CMD_TRIM = 4
 };
 
+/* values for flags field */
+#define NBD_FLAG_HAS_FLAGS    (1 << 0) /* nbd-server supports flags */
+#define NBD_FLAG_READ_ONLY    (1 << 1) /* device is read-only */
+#define NBD_FLAG_SEND_FLUSH   (1 << 2) /* can flush writeback cache */
+/* there is a gap here to match userspace */
+#define NBD_FLAG_SEND_TRIM    (1 << 5) /* send trim/discard */
+
 #define nbd_cmd(req) ((req)->cmd[0])
 
 /* userspace doesn't need the nbd_device structure */
@@ -65,4 +75,4 @@ struct nbd_reply {
        __be32 error;           /* 0 = ok, else error   */
        char handle[8];         /* handle you got from request  */
 };
-#endif
+#endif /* LINUX_NBD_H */
index b188f68..f175212 100644 (file)
@@ -20,6 +20,10 @@ enum {
        NDA_LLADDR,
        NDA_CACHEINFO,
        NDA_PROBES,
+       NDA_VLAN,
+       NDA_PORT,
+       NDA_VNI,
+       NDA_IFINDEX,
        __NDA_MAX
 };
 
@@ -33,6 +37,9 @@ enum {
 #define NTF_PROXY      0x08    /* == ATF_PUBL */
 #define NTF_ROUTER     0x80
 
+#define NTF_SELF       0x02
+#define NTF_MASTER     0x04
+
 /*
  *     Neighbor Cache Entry States.
  */
index c577561..24eaec3 100644 (file)
@@ -54,4 +54,4 @@ typedef enum {
 
 #define __SO_ACCEPTCON (1 << 16)       /* performed a listen           */
 
-#endif /* _LINUX_NET_H */
+#endif /* _LINUX_NET_H */
diff --git a/usr/include/linux/netconf.h b/usr/include/linux/netconf.h
new file mode 100644 (file)
index 0000000..52c4424
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef _LINUX_NETCONF_H_
+#define _LINUX_NETCONF_H_
+
+#include <linux/types.h>
+#include <linux/netlink.h>
+
+struct netconfmsg {
+       __u8    ncm_family;
+};
+
+enum {
+       NETCONFA_UNSPEC,
+       NETCONFA_IFINDEX,
+       NETCONFA_FORWARDING,
+       NETCONFA_RP_FILTER,
+       NETCONFA_MC_FORWARDING,
+       __NETCONFA_MAX
+};
+#define NETCONFA_MAX   (__NETCONFA_MAX - 1)
+
+#define NETCONFA_IFINDEX_ALL           -1
+#define NETCONFA_IFINDEX_DEFAULT       -2
+
+#endif /* _LINUX_NETCONF_H_ */
index 6c10e02..adc7260 100644 (file)
@@ -50,4 +50,4 @@ enum {
 };
 
 
-#endif /* _LINUX_NETDEVICE_H */
+#endif /* _LINUX_NETDEVICE_H */
index 5477131..f05c3d9 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <linux/sysctl.h>
 
+
 /* Responses from hook functions. */
 #define NF_DROP 0
 #define NF_ACCEPT 1
@@ -66,4 +67,4 @@ union nf_inet_addr {
        struct in6_addr in6;
 };
 
-#endif /*__LINUX_NETFILTER_H*/
+#endif /* __LINUX_NETFILTER_H */
index caa95bf..412c645 100644 (file)
@@ -1,6 +1,3 @@
-#ifndef _IP_SET_H
-#define _IP_SET_H
-
 /* Copyright (C) 2000-2002 Joakim Axelsson <gozem@linux.nu>
  *                         Patrick Schaaf <bof@bof.de>
  *                         Martin Josefsson <gandalf@wlug.westbo.se>
@@ -10,6 +7,9 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+#ifndef _IP_SET_H
+#define _IP_SET_H
+
 
 #include <linux/types.h>
 
@@ -108,6 +108,8 @@ enum {
        IPSET_ATTR_CIDR2,
        IPSET_ATTR_IP2_TO,
        IPSET_ATTR_IFACE,
+       IPSET_ATTR_BYTES,
+       IPSET_ATTR_PACKETS,
        __IPSET_ATTR_ADT_MAX,
 };
 #define IPSET_ATTR_ADT_MAX     (__IPSET_ATTR_ADT_MAX - 1)
@@ -137,12 +139,13 @@ enum ipset_errno {
        IPSET_ERR_REFERENCED,
        IPSET_ERR_IPADDR_IPV4,
        IPSET_ERR_IPADDR_IPV6,
+       IPSET_ERR_COUNTER,
 
        /* Type specific error codes */
        IPSET_ERR_TYPE_SPECIFIC = 4352,
 };
 
-/* Flags at command level */
+/* Flags at command level or match/target flags, lower half of cmdattrs*/
 enum ipset_cmd_flags {
        IPSET_FLAG_BIT_EXIST    = 0,
        IPSET_FLAG_EXIST        = (1 << IPSET_FLAG_BIT_EXIST),
@@ -150,10 +153,20 @@ enum ipset_cmd_flags {
        IPSET_FLAG_LIST_SETNAME = (1 << IPSET_FLAG_BIT_LIST_SETNAME),
        IPSET_FLAG_BIT_LIST_HEADER = 2,
        IPSET_FLAG_LIST_HEADER  = (1 << IPSET_FLAG_BIT_LIST_HEADER),
-       IPSET_FLAG_CMD_MAX = 15,        /* Lower half */
+       IPSET_FLAG_BIT_SKIP_COUNTER_UPDATE = 3,
+       IPSET_FLAG_SKIP_COUNTER_UPDATE =
+               (1 << IPSET_FLAG_BIT_SKIP_COUNTER_UPDATE),
+       IPSET_FLAG_BIT_SKIP_SUBCOUNTER_UPDATE = 4,
+       IPSET_FLAG_SKIP_SUBCOUNTER_UPDATE =
+               (1 << IPSET_FLAG_BIT_SKIP_SUBCOUNTER_UPDATE),
+       IPSET_FLAG_BIT_MATCH_COUNTERS = 5,
+       IPSET_FLAG_MATCH_COUNTERS = (1 << IPSET_FLAG_BIT_MATCH_COUNTERS),
+       IPSET_FLAG_BIT_RETURN_NOMATCH = 7,
+       IPSET_FLAG_RETURN_NOMATCH = (1 << IPSET_FLAG_BIT_RETURN_NOMATCH),
+       IPSET_FLAG_CMD_MAX = 15,
 };
 
-/* Flags at CADT attribute level */
+/* Flags at CADT attribute level, upper half of cmdattrs */
 enum ipset_cadt_flags {
        IPSET_FLAG_BIT_BEFORE   = 0,
        IPSET_FLAG_BEFORE       = (1 << IPSET_FLAG_BIT_BEFORE),
@@ -161,7 +174,9 @@ enum ipset_cadt_flags {
        IPSET_FLAG_PHYSDEV      = (1 << IPSET_FLAG_BIT_PHYSDEV),
        IPSET_FLAG_BIT_NOMATCH  = 2,
        IPSET_FLAG_NOMATCH      = (1 << IPSET_FLAG_BIT_NOMATCH),
-       IPSET_FLAG_CADT_MAX     = 15,   /* Upper half */
+       IPSET_FLAG_BIT_WITH_COUNTERS = 3,
+       IPSET_FLAG_WITH_COUNTERS = (1 << IPSET_FLAG_BIT_WITH_COUNTERS),
+       IPSET_FLAG_CADT_MAX     = 15,
 };
 
 /* Commands with settype-specific attributes */
@@ -190,6 +205,8 @@ enum ip_set_dim {
         * If changed, new revision of iptables match/target is required.
         */
        IPSET_DIM_MAX = 6,
+       /* Backward compatibility: set match revision 2 */
+       IPSET_BIT_RETURN_NOMATCH = 7,
 };
 
 /* Option flags for kernel operations */
@@ -198,8 +215,21 @@ enum ip_set_kopt {
        IPSET_DIM_ONE_SRC = (1 << IPSET_DIM_ONE),
        IPSET_DIM_TWO_SRC = (1 << IPSET_DIM_TWO),
        IPSET_DIM_THREE_SRC = (1 << IPSET_DIM_THREE),
+       IPSET_RETURN_NOMATCH = (1 << IPSET_BIT_RETURN_NOMATCH),
 };
 
+enum {
+       IPSET_COUNTER_NONE = 0,
+       IPSET_COUNTER_EQ,
+       IPSET_COUNTER_NE,
+       IPSET_COUNTER_LT,
+       IPSET_COUNTER_GT,
+};
+
+struct ip_set_counter_match {
+       __u8 op;
+       __u64 value;
+};
 
 /* Interface to iptables/ip6tables */
 
@@ -212,8 +242,8 @@ union ip_set_name_index {
 
 #define IP_SET_OP_GET_BYNAME   0x00000006      /* Get set index by name */
 struct ip_set_req_get_set {
-       unsigned op;
-       unsigned version;
+       unsigned int op;
+       unsigned int version;
        union ip_set_name_index set;
 };
 
@@ -222,8 +252,8 @@ struct ip_set_req_get_set {
 
 #define IP_SET_OP_VERSION      0x00000100      /* Ask kernel version */
 struct ip_set_req_version {
-       unsigned op;
-       unsigned version;
+       unsigned int op;
+       unsigned int version;
 };
 
-#endif /*_IP_SET_H */
+#endif /* _IP_SET_H */
index 38aa52d..7f038b5 100644 (file)
@@ -83,6 +83,10 @@ enum ip_conntrack_status {
        /* Conntrack is a fake untracked entry */
        IPS_UNTRACKED_BIT = 12,
        IPS_UNTRACKED = (1 << IPS_UNTRACKED_BIT),
+
+       /* Conntrack got a helper explicitly attached via CT target. */
+       IPS_HELPER_BIT = 13,
+       IPS_HELPER = (1 << IPS_HELPER_BIT),
 };
 
 /* Connection tracking event types */
@@ -97,6 +101,7 @@ enum ip_conntrack_events {
        IPCT_MARK,              /* new mark has been set */
        IPCT_NATSEQADJ,         /* NAT is doing sequence adjustment */
        IPCT_SECMARK,           /* new security mark has been set */
+       IPCT_LABEL,             /* new connlabel has been set */
 };
 
 enum ip_conntrack_expect_events {
index 8df2d13..bf0cc37 100644 (file)
@@ -22,4 +22,12 @@ struct nf_nat_ipv4_multi_range_compat {
        struct nf_nat_ipv4_range        range[1];
 };
 
+struct nf_nat_range {
+       unsigned int                    flags;
+       union nf_inet_addr              min_addr;
+       union nf_inet_addr              max_addr;
+       union nf_conntrack_man_proto    min_proto;
+       union nf_conntrack_man_proto    max_proto;
+};
+
 #endif /* _NETFILTER_NF_NAT_H */
index 93f23a9..9cd235b 100644 (file)
@@ -50,6 +50,7 @@ struct nfgenmsg {
 #define NFNL_SUBSYS_IPSET              6
 #define NFNL_SUBSYS_ACCT               7
 #define NFNL_SUBSYS_CTNETLINK_TIMEOUT  8
-#define NFNL_SUBSYS_COUNT              9
+#define NFNL_SUBSYS_CTHELPER           9
+#define NFNL_SUBSYS_COUNT              10
 
-#endif /* _NFNETLINK_H */
+#endif /* _NFNETLINK_H */
index 3995101..e09d8be 100644 (file)
@@ -24,4 +24,4 @@ enum nfnl_acct_type {
 #define NFACCT_MAX (__NFACCT_MAX - 1)
 
 
-#endif /* _NFNL_ACCT_H */
+#endif /* _NFNL_ACCT_H_ */
index e58e4b9..08fabc6 100644 (file)
@@ -7,6 +7,10 @@ enum cntl_msg_types {
        IPCTNL_MSG_CT_GET,
        IPCTNL_MSG_CT_DELETE,
        IPCTNL_MSG_CT_GET_CTRZERO,
+       IPCTNL_MSG_CT_GET_STATS_CPU,
+       IPCTNL_MSG_CT_GET_STATS,
+       IPCTNL_MSG_CT_GET_DYING,
+       IPCTNL_MSG_CT_GET_UNCONFIRMED,
 
        IPCTNL_MSG_MAX
 };
@@ -15,6 +19,7 @@ enum ctnl_exp_msg_types {
        IPCTNL_MSG_EXP_NEW,
        IPCTNL_MSG_EXP_GET,
        IPCTNL_MSG_EXP_DELETE,
+       IPCTNL_MSG_EXP_GET_STATS_CPU,
 
        IPCTNL_MSG_EXP_MAX
 };
@@ -44,6 +49,8 @@ enum ctattr_type {
        CTA_SECCTX,
        CTA_TIMESTAMP,
        CTA_MARK_MASK,
+       CTA_LABELS,
+       CTA_LABELS_MASK,
        __CTA_MAX
 };
 #define CTA_MAX (__CTA_MAX - 1)
@@ -139,9 +146,13 @@ enum ctattr_tstamp {
 
 enum ctattr_nat {
        CTA_NAT_UNSPEC,
-       CTA_NAT_MINIP,
-       CTA_NAT_MAXIP,
+       CTA_NAT_V4_MINIP,
+#define CTA_NAT_MINIP CTA_NAT_V4_MINIP
+       CTA_NAT_V4_MAXIP,
+#define CTA_NAT_MAXIP CTA_NAT_V4_MAXIP
        CTA_NAT_PROTO,
+       CTA_NAT_V6_MINIP,
+       CTA_NAT_V6_MAXIP,
        __CTA_NAT_MAX
 };
 #define CTA_NAT_MAX (__CTA_NAT_MAX - 1)
@@ -191,6 +202,7 @@ enum ctattr_expect_nat {
 enum ctattr_help {
        CTA_HELP_UNSPEC,
        CTA_HELP_NAME,
+       CTA_HELP_INFO,
        __CTA_HELP_MAX
 };
 #define CTA_HELP_MAX (__CTA_HELP_MAX - 1)
@@ -202,4 +214,39 @@ enum ctattr_secctx {
 };
 #define CTA_SECCTX_MAX (__CTA_SECCTX_MAX - 1)
 
+enum ctattr_stats_cpu {
+       CTA_STATS_UNSPEC,
+       CTA_STATS_SEARCHED,
+       CTA_STATS_FOUND,
+       CTA_STATS_NEW,
+       CTA_STATS_INVALID,
+       CTA_STATS_IGNORE,
+       CTA_STATS_DELETE,
+       CTA_STATS_DELETE_LIST,
+       CTA_STATS_INSERT,
+       CTA_STATS_INSERT_FAILED,
+       CTA_STATS_DROP,
+       CTA_STATS_EARLY_DROP,
+       CTA_STATS_ERROR,
+       CTA_STATS_SEARCH_RESTART,
+       __CTA_STATS_MAX,
+};
+#define CTA_STATS_MAX (__CTA_STATS_MAX - 1)
+
+enum ctattr_stats_global {
+       CTA_STATS_GLOBAL_UNSPEC,
+       CTA_STATS_GLOBAL_ENTRIES,
+       __CTA_STATS_GLOBAL_MAX,
+};
+#define CTA_STATS_GLOBAL_MAX (__CTA_STATS_GLOBAL_MAX - 1)
+
+enum ctattr_expect_stats {
+       CTA_STATS_EXP_UNSPEC,
+       CTA_STATS_EXP_NEW,
+       CTA_STATS_EXP_CREATE,
+       CTA_STATS_EXP_DELETE,
+       __CTA_STATS_EXP_MAX,
+};
+#define CTA_STATS_EXP_MAX (__CTA_STATS_EXP_MAX - 1)
+
 #endif /* _IPCONNTRACK_NETLINK_H */
diff --git a/usr/include/linux/netfilter/nfnetlink_cthelper.h b/usr/include/linux/netfilter/nfnetlink_cthelper.h
new file mode 100644 (file)
index 0000000..33659f6
--- /dev/null
@@ -0,0 +1,55 @@
+#ifndef _NFNL_CTHELPER_H_
+#define _NFNL_CTHELPER_H_
+
+#define NFCT_HELPER_STATUS_DISABLED    0
+#define NFCT_HELPER_STATUS_ENABLED     1
+
+enum nfnl_acct_msg_types {
+       NFNL_MSG_CTHELPER_NEW,
+       NFNL_MSG_CTHELPER_GET,
+       NFNL_MSG_CTHELPER_DEL,
+       NFNL_MSG_CTHELPER_MAX
+};
+
+enum nfnl_cthelper_type {
+       NFCTH_UNSPEC,
+       NFCTH_NAME,
+       NFCTH_TUPLE,
+       NFCTH_QUEUE_NUM,
+       NFCTH_POLICY,
+       NFCTH_PRIV_DATA_LEN,
+       NFCTH_STATUS,
+       __NFCTH_MAX
+};
+#define NFCTH_MAX (__NFCTH_MAX - 1)
+
+enum nfnl_cthelper_policy_type {
+       NFCTH_POLICY_SET_UNSPEC,
+       NFCTH_POLICY_SET_NUM,
+       NFCTH_POLICY_SET,
+       NFCTH_POLICY_SET1       = NFCTH_POLICY_SET,
+       NFCTH_POLICY_SET2,
+       NFCTH_POLICY_SET3,
+       NFCTH_POLICY_SET4,
+       __NFCTH_POLICY_SET_MAX
+};
+#define NFCTH_POLICY_SET_MAX (__NFCTH_POLICY_SET_MAX - 1)
+
+enum nfnl_cthelper_pol_type {
+       NFCTH_POLICY_UNSPEC,
+       NFCTH_POLICY_NAME,
+       NFCTH_POLICY_EXPECT_MAX,
+       NFCTH_POLICY_EXPECT_TIMEOUT,
+       __NFCTH_POLICY_MAX
+};
+#define NFCTH_POLICY_MAX (__NFCTH_POLICY_MAX - 1)
+
+enum nfnl_cthelper_tuple_type {
+       NFCTH_TUPLE_UNSPEC,
+       NFCTH_TUPLE_L3PROTONUM,
+       NFCTH_TUPLE_L4PROTONUM,
+       __NFCTH_TUPLE_MAX,
+};
+#define NFCTH_TUPLE_MAX (__NFCTH_TUPLE_MAX - 1)
+
+#endif /* _NFNL_CTHELPER_H */
index 24b32e6..a2308ae 100644 (file)
@@ -42,6 +42,10 @@ enum nfqnl_attr_type {
        NFQA_IFINDEX_PHYSOUTDEV,        /* __u32 ifindex */
        NFQA_HWADDR,                    /* nfqnl_msg_packet_hw */
        NFQA_PAYLOAD,                   /* opaque data payload */
+       NFQA_CT,                        /* nf_conntrack_netlink.h */
+       NFQA_CT_INFO,                   /* enum ip_conntrack_info */
+       NFQA_CAP_LEN,                   /* __u32 length of captured packet */
+       NFQA_SKB_INFO,                  /* __u32 skb meta information */
 
        __NFQA_MAX
 };
@@ -84,8 +88,22 @@ enum nfqnl_attr_config {
        NFQA_CFG_CMD,                   /* nfqnl_msg_config_cmd */
        NFQA_CFG_PARAMS,                /* nfqnl_msg_config_params */
        NFQA_CFG_QUEUE_MAXLEN,          /* __u32 */
+       NFQA_CFG_MASK,                  /* identify which flags to change */
+       NFQA_CFG_FLAGS,                 /* value of these flags (__u32) */
        __NFQA_CFG_MAX
 };
 #define NFQA_CFG_MAX (__NFQA_CFG_MAX-1)
 
+/* Flags for NFQA_CFG_FLAGS */
+#define NFQA_CFG_F_FAIL_OPEN                   (1 << 0)
+#define NFQA_CFG_F_CONNTRACK                   (1 << 1)
+#define NFQA_CFG_F_GSO                         (1 << 2)
+#define NFQA_CFG_F_MAX                         (1 << 3)
+
+/* flags for NFQA_SKB_INFO */
+/* packet appears to have wrong checksums, but they are ok */
+#define NFQA_SKB_CSUMNOTREADY (1 << 0)
+/* packet is GSO (i.e., exceeds device mtu) */
+#define NFQA_SKB_GSO (1 << 1)
+
 #endif /* _NFNETLINK_QUEUE_H */
index a064b8a..5a688c1 100644 (file)
@@ -3,7 +3,11 @@
 
 #include <linux/types.h>
 
-#define XT_CT_NOTRACK  0x1
+enum {
+       XT_CT_NOTRACK           = 1 << 0,
+       XT_CT_NOTRACK_ALIAS     = 1 << 1,
+       XT_CT_MASK              = XT_CT_NOTRACK | XT_CT_NOTRACK_ALIAS,
+};
 
 struct xt_ct_target_info {
        __u16 flags;
index 9eafdbb..8bb5fe6 100644 (file)
@@ -26,4 +26,13 @@ struct xt_NFQ_info_v2 {
        __u16 bypass;
 };
 
+struct xt_NFQ_info_v3 {
+       __u16 queuenum;
+       __u16 queues_total;
+       __u16 flags;
+#define NFQ_FLAG_BYPASS                0x01 /* for compatibility with v2 */
+#define NFQ_FLAG_CPU_FANOUT    0x02 /* use current CPU (no hashing) */
+#define NFQ_FLAG_MASK          0x03
+};
+
 #endif /* _XT_NFQ_TARGET_H */
diff --git a/usr/include/linux/netfilter/xt_bpf.h b/usr/include/linux/netfilter/xt_bpf.h
new file mode 100644 (file)
index 0000000..5dda450
--- /dev/null
@@ -0,0 +1,17 @@
+#ifndef _XT_BPF_H
+#define _XT_BPF_H
+
+#include <linux/filter.h>
+#include <linux/types.h>
+
+#define XT_BPF_MAX_NUM_INSTR   64
+
+struct xt_bpf_info {
+       __u16 bpf_program_num_elem;
+       struct sock_filter bpf_program[XT_BPF_MAX_NUM_INSTR];
+
+       /* only used in the kernel */
+       struct sk_filter *filter __attribute__((aligned(8)));
+};
+
+#endif /*_XT_BPF_H */
diff --git a/usr/include/linux/netfilter/xt_connlabel.h b/usr/include/linux/netfilter/xt_connlabel.h
new file mode 100644 (file)
index 0000000..c4bc9ee
--- /dev/null
@@ -0,0 +1,12 @@
+#include <linux/types.h>
+
+#define XT_CONNLABEL_MAXBIT 127
+enum xt_connlabel_mtopts {
+       XT_CONNLABEL_OP_INVERT = 1 << 0,
+       XT_CONNLABEL_OP_SET    = 1 << 1,
+};
+
+struct xt_connlabel_mtinfo {
+       __u16 bit;
+       __u16 options;
+};
index c0c1824..cdcc117 100644 (file)
@@ -20,13 +20,8 @@ struct xt_connlimit_info {
                };
        };
        unsigned int limit;
-       union {
-               /* revision 0 */
-               unsigned int inverse;
-
-               /* revision 1 */
-               __u32 flags;
-       };
+       /* revision 1 */
+       __u32 flags;
 
        /* Used internally by the kernel */
        struct xt_connlimit_data *data __attribute__((aligned(8)));
index e3c041d..e5bd308 100644 (file)
@@ -31,6 +31,7 @@ enum {
        XT_CONNTRACK_REPLSRC_PORT = 1 << 10,
        XT_CONNTRACK_REPLDST_PORT = 1 << 11,
        XT_CONNTRACK_DIRECTION    = 1 << 12,
+       XT_CONNTRACK_STATE_ALIAS  = 1 << 13,
 };
 
 struct xt_conntrack_mtinfo1 {
index b1925b5..33511b7 100644 (file)
@@ -6,7 +6,11 @@
 /* timings are in milliseconds. */
 #define XT_HASHLIMIT_SCALE 10000
 /* 1/10,000 sec period => max of 10,000/sec.  Min rate is then 429490
-   seconds, or one every 59 hours. */
+ * seconds, or one packet every 59 hours.
+ */
+
+/* packet length accounting is done in 16-byte steps */
+#define XT_HASHLIMIT_BYTE_SHIFT 4
 
 /* details of this structure hidden by the implementation */
 struct xt_hashlimit_htable;
@@ -17,6 +21,7 @@ enum {
        XT_HASHLIMIT_HASH_SIP = 1 << 2,
        XT_HASHLIMIT_HASH_SPT = 1 << 3,
        XT_HASHLIMIT_INVERT   = 1 << 4,
+       XT_HASHLIMIT_BYTES    = 1 << 5,
 };
 
 struct hashlimit_cfg {
@@ -65,4 +70,4 @@ struct xt_hashlimit_mtinfo1 {
        struct xt_hashlimit_htable *hinfo __attribute__((aligned(8)));
 };
 
-#endif /*_XT_HASHLIMIT_H*/
+#endif /* _XT_HASHLIMIT_H */
index 7d53660..8ab7eb7 100644 (file)
@@ -20,4 +20,4 @@ struct xt_physdev_info {
        __u8 bitmask;
 };
 
-#endif /*_XT_PHYSDEV_H*/
+#endif /* _XT_PHYSDEV_H */
index 83318e0..6ef36c1 100644 (file)
@@ -32,4 +32,14 @@ struct xt_recent_mtinfo {
        __u8 side;
 };
 
+struct xt_recent_mtinfo_v1 {
+       __u32 seconds;
+       __u32 hit_count;
+       __u8 check_set;
+       __u8 invert;
+       char name[XT_RECENT_NAME_LEN];
+       __u8 side;
+       union nf_inet_addr mask;
+};
+
 #endif /* _LINUX_NETFILTER_XT_RECENT_H */
index e3a9978..964d3d4 100644 (file)
@@ -62,4 +62,13 @@ struct xt_set_info_target_v2 {
        __u32 timeout;
 };
 
+/* Revision 3 match */
+
+struct xt_set_info_match_v3 {
+       struct xt_set_info match_set;
+       struct ip_set_counter_match packets;
+       struct ip_set_counter_match bytes;
+       __u32 flags;
+};
+
 #endif /*_XT_SET_H*/
index 7c37fac..0958860 100644 (file)
@@ -17,6 +17,9 @@ enum {
        /* Match against local time (instead of UTC) */
        XT_TIME_LOCAL_TZ = 1 << 0,
 
+       /* treat timestart > timestop (e.g. 23:00-01:00) as single period */
+       XT_TIME_CONTIGUOUS = 1 << 1,
+
        /* Shortcuts */
        XT_TIME_ALL_MONTHDAYS = 0xFFFFFFFE,
        XT_TIME_ALL_WEEKDAYS  = 0xFE,
@@ -24,4 +27,6 @@ enum {
        XT_TIME_MAX_DAYTIME   = 24 * 60 * 60 - 1,
 };
 
+#define XT_TIME_ALL_FLAGS (XT_TIME_LOCAL_TZ|XT_TIME_CONTIGUOUS)
+
 #endif /* _XT_TIME_H */
index 5094ecc..c4dbfd9 100644 (file)
@@ -24,4 +24,4 @@
 #define NF_BR_BROUTING         5
 #define NF_BR_NUMHOOKS         6
 
-#endif
+#endif /* __LINUX_BRIDGE_NETFILTER_H */
index 76687d5..a947464 100644 (file)
@@ -59,4 +59,4 @@ struct ebt_802_3_info {
        __u8  invflags;
 };
 
-#endif
+#endif /* __LINUX_BRIDGE_EBT_802_3_H */
index 19a6444..fb627f9 100644 (file)
@@ -265,4 +265,4 @@ struct ebt_entry {
        __ret;                                              \
 })
 
-#endif
+#endif /* __LINUX_BRIDGE_EFF_H */
index 5490309..a5f4dc7 100644 (file)
@@ -1,9 +1,9 @@
-#ifndef __LINUX_IP_NETFILTER_H
-#define __LINUX_IP_NETFILTER_H
-
 /* IPv4-specific defines for netfilter. 
  * (C)1998 Rusty Russell -- This code is GPL.
  */
+#ifndef __LINUX_IP_NETFILTER_H
+#define __LINUX_IP_NETFILTER_H
+
 
 #include <linux/netfilter.h>
 
@@ -64,6 +64,7 @@ enum nf_ip_hook_priorities {
        NF_IP_PRI_SECURITY = 50,
        NF_IP_PRI_NAT_SRC = 100,
        NF_IP_PRI_SELINUX_LAST = 225,
+       NF_IP_PRI_CONNTRACK_HELPER = 300,
        NF_IP_PRI_CONNTRACK_CONFIRM = INT_MAX,
        NF_IP_PRI_LAST = INT_MAX,
 };
@@ -75,4 +76,4 @@ enum nf_ip_hook_priorities {
 #define SO_ORIGINAL_DST 80
 
 
-#endif /*__LINUX_IP_NETFILTER_H*/
+#endif /* __LINUX_IP_NETFILTER_H */
diff --git a/usr/include/linux/netfilter_ipv4/ip_queue.h b/usr/include/linux/netfilter_ipv4/ip_queue.h
deleted file mode 100644 (file)
index f5229b1..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * This is a module which is used for queueing IPv4 packets and
- * communicating with userspace via netlink.
- *
- * (C) 2000 James Morris, this code is GPL.
- */
-#ifndef _IP_QUEUE_H
-#define _IP_QUEUE_H
-
-#include <net/if.h>
-
-/* Messages sent from kernel */
-typedef struct ipq_packet_msg {
-       unsigned long packet_id;        /* ID of queued packet */
-       unsigned long mark;             /* Netfilter mark value */
-       long timestamp_sec;             /* Packet arrival time (seconds) */
-       long timestamp_usec;            /* Packet arrvial time (+useconds) */
-       unsigned int hook;              /* Netfilter hook we rode in on */
-       char indev_name[IFNAMSIZ];      /* Name of incoming interface */
-       char outdev_name[IFNAMSIZ];     /* Name of outgoing interface */
-       __be16 hw_protocol;             /* Hardware protocol (network order) */
-       unsigned short hw_type;         /* Hardware type */
-       unsigned char hw_addrlen;       /* Hardware address length */
-       unsigned char hw_addr[8];       /* Hardware address */
-       size_t data_len;                /* Length of packet data */
-       unsigned char payload[0];       /* Optional packet data */
-} ipq_packet_msg_t;
-
-/* Messages sent from userspace */
-typedef struct ipq_mode_msg {
-       unsigned char value;            /* Requested mode */
-       size_t range;                   /* Optional range of packet requested */
-} ipq_mode_msg_t;
-
-typedef struct ipq_verdict_msg {
-       unsigned int value;             /* Verdict to hand to netfilter */
-       unsigned long id;               /* Packet ID for this verdict */
-       size_t data_len;                /* Length of replacement data */
-       unsigned char payload[0];       /* Optional replacement packet */
-} ipq_verdict_msg_t;
-
-typedef struct ipq_peer_msg {
-       union {
-               ipq_verdict_msg_t verdict;
-               ipq_mode_msg_t mode;
-       } msg;
-} ipq_peer_msg_t;
-
-/* Packet delivery modes */
-enum {
-       IPQ_COPY_NONE,          /* Initial mode, packets are dropped */
-       IPQ_COPY_META,          /* Copy metadata */
-       IPQ_COPY_PACKET         /* Copy metadata + packet (range) */
-};
-#define IPQ_COPY_MAX IPQ_COPY_PACKET
-
-/* Types of messages */
-#define IPQM_BASE      0x10    /* standard netlink messages below this */
-#define IPQM_MODE      (IPQM_BASE + 1)         /* Mode request from peer */
-#define IPQM_VERDICT   (IPQM_BASE + 2)         /* Verdict from peer */ 
-#define IPQM_PACKET    (IPQM_BASE + 3)         /* Packet from kernel */
-#define IPQM_MAX       (IPQM_BASE + 4)
-
-#endif /*_IP_QUEUE_H*/
diff --git a/usr/include/linux/netfilter_ipv4/ipt_addrtype.h b/usr/include/linux/netfilter_ipv4/ipt_addrtype.h
deleted file mode 100644 (file)
index 0da4223..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef _IPT_ADDRTYPE_H
-#define _IPT_ADDRTYPE_H
-
-#include <linux/types.h>
-
-enum {
-       IPT_ADDRTYPE_INVERT_SOURCE      = 0x0001,
-       IPT_ADDRTYPE_INVERT_DEST        = 0x0002,
-       IPT_ADDRTYPE_LIMIT_IFACE_IN     = 0x0004,
-       IPT_ADDRTYPE_LIMIT_IFACE_OUT    = 0x0008,
-};
-
-struct ipt_addrtype_info_v1 {
-       __u16   source;         /* source-type mask */
-       __u16   dest;           /* dest-type mask */
-       __u32   flags;
-};
-
-/* revision 0 */
-struct ipt_addrtype_info {
-       __u16   source;         /* source-type mask */
-       __u16   dest;           /* dest-type mask */
-       __u32   invert_source;
-       __u32   invert_dest;
-};
-
-#endif
index f8ebda2..8483d1d 100644 (file)
@@ -1,12 +1,12 @@
-#ifndef __LINUX_IP6_NETFILTER_H
-#define __LINUX_IP6_NETFILTER_H
-
 /* IPv6-specific defines for netfilter. 
  * (C)1998 Rusty Russell -- This code is GPL.
  * (C)1999 David Jeffery
  *   this header was blatantly ripped from netfilter_ipv4.h 
  *   it's amazing what adding a bunch of 6s can do =8^)
  */
+#ifndef __LINUX_IP6_NETFILTER_H
+#define __LINUX_IP6_NETFILTER_H
+
 
 #include <linux/netfilter.h>
 
@@ -69,8 +69,9 @@ enum nf_ip6_hook_priorities {
        NF_IP6_PRI_SECURITY = 50,
        NF_IP6_PRI_NAT_SRC = 100,
        NF_IP6_PRI_SELINUX_LAST = 225,
+       NF_IP6_PRI_CONNTRACK_HELPER = 300,
        NF_IP6_PRI_LAST = INT_MAX,
 };
 
 
-#endif /*__LINUX_IP6_NETFILTER_H*/
+#endif /* __LINUX_IP6_NETFILTER_H */
index 4432dd1..640a1d0 100644 (file)
@@ -176,6 +176,9 @@ struct ip6t_error {
 #define IP6T_SO_GET_REVISION_TARGET    (IP6T_BASE_CTL + 5)
 #define IP6T_SO_GET_MAX                        IP6T_SO_GET_REVISION_TARGET
 
+/* obtain original address if REDIRECT'd connection */
+#define IP6T_SO_ORIGINAL_DST            80
+
 /* ICMP matching stuff */
 struct ip6t_icmp {
        __u8 type;                              /* type to match */
diff --git a/usr/include/linux/netfilter_ipv6/ip6t_NPT.h b/usr/include/linux/netfilter_ipv6/ip6t_NPT.h
new file mode 100644 (file)
index 0000000..f763355
--- /dev/null
@@ -0,0 +1,16 @@
+#ifndef __NETFILTER_IP6T_NPT
+#define __NETFILTER_IP6T_NPT
+
+#include <linux/types.h>
+#include <linux/netfilter.h>
+
+struct ip6t_npt_tginfo {
+       union nf_inet_addr      src_pfx;
+       union nf_inet_addr      dst_pfx;
+       __u8                    src_pfx_len;
+       __u8                    dst_pfx_len;
+       /* Used internally by the kernel */
+       __sum16                 adjustment;
+};
+
+#endif /* __NETFILTER_IP6T_NPT */
index b47f61b..dfd8bc2 100644 (file)
@@ -4,9 +4,9 @@
 #include <linux/types.h>
 
 struct ip6t_frag {
-       __u32 ids[2];                   /* Security Parameter Index */
+       __u32 ids[2];                   /* Identification range */
        __u32 hdrlen;                   /* Header Length */
-       __u8  flags;                    /*  */
+       __u8  flags;                    /* Flags */
        __u8  invflags;                 /* Inverse flags */
 };
 
index 5c4f087..e0a09df 100644 (file)
@@ -1,13 +1,14 @@
 #ifndef __LINUX_NETLINK_H
 #define __LINUX_NETLINK_H
 
+#include <linux/kernel.h>
 #include <linux/socket.h> /* for __kernel_sa_family_t */
 #include <linux/types.h>
 
 #define NETLINK_ROUTE          0       /* Routing/device hook                          */
 #define NETLINK_UNUSED         1       /* Unused number                                */
 #define NETLINK_USERSOCK       2       /* Reserved for user mode socket protocols      */
-#define NETLINK_FIREWALL       3       /* Firewalling hook                             */
+#define NETLINK_FIREWALL       3       /* Unused number, formerly ip_queue             */
 #define NETLINK_SOCK_DIAG      4       /* socket monitoring                            */
 #define NETLINK_NFLOG          5       /* netfilter/iptables ULOG */
 #define NETLINK_XFRM           6       /* ipsec */
@@ -78,7 +79,7 @@ struct nlmsghdr {
 #define NLMSG_ALIGNTO  4U
 #define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) )
 #define NLMSG_HDRLEN    ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr)))
-#define NLMSG_LENGTH(len) ((len)+NLMSG_ALIGN(NLMSG_HDRLEN))
+#define NLMSG_LENGTH(len) ((len) + NLMSG_HDRLEN)
 #define NLMSG_SPACE(len) NLMSG_ALIGN(NLMSG_LENGTH(len))
 #define NLMSG_DATA(nlh)  ((void*)(((char*)nlh) + NLMSG_LENGTH(0)))
 #define NLMSG_NEXT(nlh,len)     ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
@@ -105,11 +106,42 @@ struct nlmsgerr {
 #define NETLINK_PKTINFO                3
 #define NETLINK_BROADCAST_ERROR        4
 #define NETLINK_NO_ENOBUFS     5
+#define NETLINK_RX_RING                6
+#define NETLINK_TX_RING                7
 
 struct nl_pktinfo {
        __u32   group;
 };
 
+struct nl_mmap_req {
+       unsigned int    nm_block_size;
+       unsigned int    nm_block_nr;
+       unsigned int    nm_frame_size;
+       unsigned int    nm_frame_nr;
+};
+
+struct nl_mmap_hdr {
+       unsigned int    nm_status;
+       unsigned int    nm_len;
+       __u32           nm_group;
+       /* credentials */
+       __u32           nm_pid;
+       __u32           nm_uid;
+       __u32           nm_gid;
+};
+
+enum nl_mmap_status {
+       NL_MMAP_STATUS_UNUSED,
+       NL_MMAP_STATUS_RESERVED,
+       NL_MMAP_STATUS_VALID,
+       NL_MMAP_STATUS_COPY,
+       NL_MMAP_STATUS_SKIP,
+};
+
+#define NL_MMAP_MSG_ALIGNMENT          NLMSG_ALIGNTO
+#define NL_MMAP_MSG_ALIGN(sz)          __ALIGN_KERNEL(sz, NL_MMAP_MSG_ALIGNMENT)
+#define NL_MMAP_HDRLEN                 NL_MMAP_MSG_ALIGN(sizeof(struct nl_mmap_hdr))
+
 #define NET_MAJOR 36           /* Major 36 is reserved for networking                                          */
 
 enum {
@@ -150,4 +182,4 @@ struct nlattr {
 #define NLA_HDRLEN             ((int) NLA_ALIGN(sizeof(struct nlattr)))
 
 
-#endif /* __LINUX_NETLINK_H */
+#endif /* __LINUX_NETLINK_H */
diff --git a/usr/include/linux/netlink_diag.h b/usr/include/linux/netlink_diag.h
new file mode 100644 (file)
index 0000000..4e31db4
--- /dev/null
@@ -0,0 +1,52 @@
+#ifndef __NETLINK_DIAG_H__
+#define __NETLINK_DIAG_H__
+
+#include <linux/types.h>
+
+struct netlink_diag_req {
+       __u8    sdiag_family;
+       __u8    sdiag_protocol;
+       __u16   pad;
+       __u32   ndiag_ino;
+       __u32   ndiag_show;
+       __u32   ndiag_cookie[2];
+};
+
+struct netlink_diag_msg {
+       __u8    ndiag_family;
+       __u8    ndiag_type;
+       __u8    ndiag_protocol;
+       __u8    ndiag_state;
+
+       __u32   ndiag_portid;
+       __u32   ndiag_dst_portid;
+       __u32   ndiag_dst_group;
+       __u32   ndiag_ino;
+       __u32   ndiag_cookie[2];
+};
+
+struct netlink_diag_ring {
+       __u32   ndr_block_size;
+       __u32   ndr_block_nr;
+       __u32   ndr_frame_size;
+       __u32   ndr_frame_nr;
+};
+
+enum {
+       NETLINK_DIAG_MEMINFO,
+       NETLINK_DIAG_GROUPS,
+       NETLINK_DIAG_RX_RING,
+       NETLINK_DIAG_TX_RING,
+
+       __NETLINK_DIAG_MAX,
+};
+
+#define NETLINK_DIAG_MAX (__NETLINK_DIAG_MAX - 1)
+
+#define NDIAG_PROTO_ALL                ((__u8) ~0)
+
+#define NDIAG_SHOW_MEMINFO     0x00000001 /* show memory info of a socket */
+#define NDIAG_SHOW_GROUPS      0x00000002 /* show groups of a netlink socket */
+#define NDIAG_SHOW_RING_CFG    0x00000004 /* show ring configuration */
+
+#endif
diff --git a/usr/include/linux/nfc.h b/usr/include/linux/nfc.h
new file mode 100644 (file)
index 0000000..7c6f627
--- /dev/null
@@ -0,0 +1,242 @@
+/*
+ * Copyright (C) 2011 Instituto Nokia de Tecnologia
+ *
+ * Authors:
+ *    Lauro Ramos Venancio <lauro.venancio@openbossa.org>
+ *    Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef __LINUX_NFC_H
+#define __LINUX_NFC_H
+
+#include <linux/types.h>
+#include <linux/socket.h>
+
+#define NFC_GENL_NAME "nfc"
+#define NFC_GENL_VERSION 1
+
+#define NFC_GENL_MCAST_EVENT_NAME "events"
+
+/**
+ * enum nfc_commands - supported nfc commands
+ *
+ * @NFC_CMD_UNSPEC: unspecified command
+ *
+ * @NFC_CMD_GET_DEVICE: request information about a device (requires
+ *     %NFC_ATTR_DEVICE_INDEX) or dump request to get a list of all nfc devices
+ * @NFC_CMD_DEV_UP: turn on the nfc device
+ *     (requires %NFC_ATTR_DEVICE_INDEX)
+ * @NFC_CMD_DEV_DOWN: turn off the nfc device
+ *     (requires %NFC_ATTR_DEVICE_INDEX)
+ * @NFC_CMD_START_POLL: start polling for targets using the given protocols
+ *     (requires %NFC_ATTR_DEVICE_INDEX and %NFC_ATTR_PROTOCOLS)
+ * @NFC_CMD_STOP_POLL: stop polling for targets (requires
+ *     %NFC_ATTR_DEVICE_INDEX)
+ * @NFC_CMD_GET_TARGET: dump all targets found by the previous poll (requires
+ *     %NFC_ATTR_DEVICE_INDEX)
+ * @NFC_EVENT_TARGETS_FOUND: event emitted when a new target is found
+ *     (it sends %NFC_ATTR_DEVICE_INDEX)
+ * @NFC_EVENT_DEVICE_ADDED: event emitted when a new device is registred
+ *     (it sends %NFC_ATTR_DEVICE_NAME, %NFC_ATTR_DEVICE_INDEX and
+ *     %NFC_ATTR_PROTOCOLS)
+ * @NFC_EVENT_DEVICE_REMOVED: event emitted when a device is removed
+ *     (it sends %NFC_ATTR_DEVICE_INDEX)
+ * @NFC_EVENT_TM_ACTIVATED: event emitted when the adapter is activated in
+ *      target mode.
+ * @NFC_EVENT_DEVICE_DEACTIVATED: event emitted when the adapter is deactivated
+ *      from target mode.
+ * @NFC_CMD_LLC_GET_PARAMS: request LTO, RW, and MIUX parameters for a device
+ * @NFC_CMD_LLC_SET_PARAMS: set one or more of LTO, RW, and MIUX parameters for
+ *     a device. LTO must be set before the link is up otherwise -EINPROGRESS
+ *     is returned. RW and MIUX can be set at anytime and will be passed in
+ *     subsequent CONNECT and CC messages.
+ *     If one of the passed parameters is wrong none is set and -EINVAL is
+ *     returned.
+ * @NFC_CMD_ENABLE_SE: Enable the physical link to a specific secure element.
+ *     Once enabled a secure element will handle card emulation mode, i.e.
+ *     starting a poll from a device which has a secure element enabled means
+ *     we want to do SE based card emulation.
+ * @NFC_CMD_DISABLE_SE: Disable the physical link to a specific secure element.
+ */
+enum nfc_commands {
+       NFC_CMD_UNSPEC,
+       NFC_CMD_GET_DEVICE,
+       NFC_CMD_DEV_UP,
+       NFC_CMD_DEV_DOWN,
+       NFC_CMD_DEP_LINK_UP,
+       NFC_CMD_DEP_LINK_DOWN,
+       NFC_CMD_START_POLL,
+       NFC_CMD_STOP_POLL,
+       NFC_CMD_GET_TARGET,
+       NFC_EVENT_TARGETS_FOUND,
+       NFC_EVENT_DEVICE_ADDED,
+       NFC_EVENT_DEVICE_REMOVED,
+       NFC_EVENT_TARGET_LOST,
+       NFC_EVENT_TM_ACTIVATED,
+       NFC_EVENT_TM_DEACTIVATED,
+       NFC_CMD_LLC_GET_PARAMS,
+       NFC_CMD_LLC_SET_PARAMS,
+       NFC_CMD_ENABLE_SE,
+       NFC_CMD_DISABLE_SE,
+       NFC_CMD_LLC_SDREQ,
+       NFC_EVENT_LLC_SDRES,
+/* private: internal use only */
+       __NFC_CMD_AFTER_LAST
+};
+#define NFC_CMD_MAX (__NFC_CMD_AFTER_LAST - 1)
+
+/**
+ * enum nfc_attrs - supported nfc attributes
+ *
+ * @NFC_ATTR_UNSPEC: unspecified attribute
+ *
+ * @NFC_ATTR_DEVICE_INDEX: index of nfc device
+ * @NFC_ATTR_DEVICE_NAME: device name, max 8 chars
+ * @NFC_ATTR_PROTOCOLS: nfc protocols - bitwise or-ed combination from
+ *     NFC_PROTO_*_MASK constants
+ * @NFC_ATTR_TARGET_INDEX: index of the nfc target
+ * @NFC_ATTR_TARGET_SENS_RES: NFC-A targets extra information such as NFCID
+ * @NFC_ATTR_TARGET_SEL_RES: NFC-A targets extra information (useful if the
+ *     target is not NFC-Forum compliant)
+ * @NFC_ATTR_TARGET_NFCID1: NFC-A targets identifier, max 10 bytes
+ * @NFC_ATTR_TARGET_SENSB_RES: NFC-B targets extra information, max 12 bytes
+ * @NFC_ATTR_TARGET_SENSF_RES: NFC-F targets extra information, max 18 bytes
+ * @NFC_ATTR_COMM_MODE: Passive or active mode
+ * @NFC_ATTR_RF_MODE: Initiator or target
+ * @NFC_ATTR_IM_PROTOCOLS: Initiator mode protocols to poll for
+ * @NFC_ATTR_TM_PROTOCOLS: Target mode protocols to listen for
+ * @NFC_ATTR_LLC_PARAM_LTO: Link TimeOut parameter
+ * @NFC_ATTR_LLC_PARAM_RW: Receive Window size parameter
+ * @NFC_ATTR_LLC_PARAM_MIUX: MIU eXtension parameter
+ * @NFC_ATTR_SE: Available Secure Elements
+ */
+enum nfc_attrs {
+       NFC_ATTR_UNSPEC,
+       NFC_ATTR_DEVICE_INDEX,
+       NFC_ATTR_DEVICE_NAME,
+       NFC_ATTR_PROTOCOLS,
+       NFC_ATTR_TARGET_INDEX,
+       NFC_ATTR_TARGET_SENS_RES,
+       NFC_ATTR_TARGET_SEL_RES,
+       NFC_ATTR_TARGET_NFCID1,
+       NFC_ATTR_TARGET_SENSB_RES,
+       NFC_ATTR_TARGET_SENSF_RES,
+       NFC_ATTR_COMM_MODE,
+       NFC_ATTR_RF_MODE,
+       NFC_ATTR_DEVICE_POWERED,
+       NFC_ATTR_IM_PROTOCOLS,
+       NFC_ATTR_TM_PROTOCOLS,
+       NFC_ATTR_LLC_PARAM_LTO,
+       NFC_ATTR_LLC_PARAM_RW,
+       NFC_ATTR_LLC_PARAM_MIUX,
+       NFC_ATTR_SE,
+       NFC_ATTR_LLC_SDP,
+/* private: internal use only */
+       __NFC_ATTR_AFTER_LAST
+};
+#define NFC_ATTR_MAX (__NFC_ATTR_AFTER_LAST - 1)
+
+enum nfc_sdp_attr {
+       NFC_SDP_ATTR_UNSPEC,
+       NFC_SDP_ATTR_URI,
+       NFC_SDP_ATTR_SAP,
+/* private: internal use only */
+       __NFC_SDP_ATTR_AFTER_LAST
+};
+#define NFC_SDP_ATTR_MAX (__NFC_SDP_ATTR_AFTER_LAST - 1)
+
+#define NFC_DEVICE_NAME_MAXSIZE 8
+#define NFC_NFCID1_MAXSIZE 10
+#define NFC_SENSB_RES_MAXSIZE 12
+#define NFC_SENSF_RES_MAXSIZE 18
+#define NFC_GB_MAXSIZE        48
+
+/* NFC protocols */
+#define NFC_PROTO_JEWEL                1
+#define NFC_PROTO_MIFARE       2
+#define NFC_PROTO_FELICA       3
+#define NFC_PROTO_ISO14443     4
+#define NFC_PROTO_NFC_DEP      5
+#define NFC_PROTO_ISO14443_B   6
+
+#define NFC_PROTO_MAX          7
+
+/* NFC communication modes */
+#define NFC_COMM_ACTIVE  0
+#define NFC_COMM_PASSIVE 1
+
+/* NFC RF modes */
+#define NFC_RF_INITIATOR 0
+#define NFC_RF_TARGET    1
+#define NFC_RF_NONE      2
+
+/* NFC protocols masks used in bitsets */
+#define NFC_PROTO_JEWEL_MASK      (1 << NFC_PROTO_JEWEL)
+#define NFC_PROTO_MIFARE_MASK     (1 << NFC_PROTO_MIFARE)
+#define NFC_PROTO_FELICA_MASK    (1 << NFC_PROTO_FELICA)
+#define NFC_PROTO_ISO14443_MASK          (1 << NFC_PROTO_ISO14443)
+#define NFC_PROTO_NFC_DEP_MASK   (1 << NFC_PROTO_NFC_DEP)
+#define NFC_PROTO_ISO14443_B_MASK (1 << NFC_PROTO_ISO14443_B)
+
+/* NFC Secure Elements */
+#define NFC_SE_NONE     0x0
+#define NFC_SE_UICC     0x1
+#define NFC_SE_EMBEDDED 0x2
+
+struct sockaddr_nfc {
+       sa_family_t sa_family;
+       __u32 dev_idx;
+       __u32 target_idx;
+       __u32 nfc_protocol;
+};
+
+#define NFC_LLCP_MAX_SERVICE_NAME 63
+struct sockaddr_nfc_llcp {
+       sa_family_t sa_family;
+       __u32 dev_idx;
+       __u32 target_idx;
+       __u32 nfc_protocol;
+       __u8 dsap; /* Destination SAP, if known */
+       __u8 ssap; /* Source SAP to be bound to */
+       char service_name[NFC_LLCP_MAX_SERVICE_NAME]; /* Service name URI */;
+       size_t service_name_len;
+};
+
+/* NFC socket protocols */
+#define NFC_SOCKPROTO_RAW      0
+#define NFC_SOCKPROTO_LLCP     1
+#define NFC_SOCKPROTO_MAX      2
+
+#define NFC_HEADER_SIZE 1
+
+/**
+ * Pseudo-header info for raw socket packets
+ * First byte is the adapter index
+ * Second byte contains flags
+ *  - 0x01 - Direction (0=RX, 1=TX)
+ *  - 0x02-0x80 - Reserved
+ **/
+#define NFC_LLCP_RAW_HEADER_SIZE       2
+#define NFC_LLCP_DIRECTION_RX          0x00
+#define NFC_LLCP_DIRECTION_TX          0x01
+
+/* socket option names */
+#define NFC_LLCP_RW            0
+#define NFC_LLCP_MIUX          1
+#define NFC_LLCP_REMOTE_MIU    2
+#define NFC_LLCP_REMOTE_LTO    3
+#define NFC_LLCP_REMOTE_RW     4
+
+#endif /*__LINUX_NFC_H */
index acd8db6..454cfe1 100644 (file)
 #define NFS4_CDFC4_FORE_OR_BOTH 0x3
 #define NFS4_CDFC4_BACK_OR_BOTH 0x7
 
+#define NFS4_CDFS4_FORE 0x1
+#define NFS4_CDFS4_BACK 0x2
+#define NFS4_CDFS4_BOTH 0x3
+
 #define NFS4_SET_TO_SERVER_TIME        0
 #define NFS4_SET_TO_CLIENT_TIME        1
 
@@ -165,7 +169,7 @@ enum nfs4_acl_whotype {
        NFS4_ACL_WHO_EVERYONE,
 };
 
-#endif
+#endif /* _LINUX_NFS4_H */
 
 /*
  * Local variables:
index a2bf564..99e509a 100644 (file)
@@ -54,7 +54,8 @@
 #define NFSDBG_FSCACHE         0x0800
 #define NFSDBG_PNFS            0x1000
 #define NFSDBG_PNFS_LD         0x2000
+#define NFSDBG_STATE           0x4000
 #define NFSDBG_ALL             0xFFFF
 
 
-#endif
+#endif /* _LINUX_NFS_FS_H */
index df5e19f..1b16be3 100644 (file)
@@ -26,4 +26,4 @@
 /* Flag for Default ACL entries */
 #define NFS_ACL_DEFAULT                0x1000
 
-#endif  /* __LINUX_NFSACL_H */
+#endif /* __LINUX_NFSACL_H */
index e474f6e..d1e48b5 100644 (file)
  * The station is still assumed to belong to the AP interface it was added
  * to.
  *
- * TODO: need more info?
+ * Station handling varies per interface type and depending on the driver's
+ * capabilities.
+ *
+ * For drivers supporting TDLS with external setup (WIPHY_FLAG_SUPPORTS_TDLS
+ * and WIPHY_FLAG_TDLS_EXTERNAL_SETUP), the station lifetime is as follows:
+ *  - a setup station entry is added, not yet authorized, without any rate
+ *    or capability information, this just exists to avoid race conditions
+ *  - when the TDLS setup is done, a single NL80211_CMD_SET_STATION is valid
+ *    to add rate and capability information to the station and at the same
+ *    time mark it authorized.
+ *  - %NL80211_TDLS_ENABLE_LINK is then used
+ *  - after this, the only valid operation is to remove it by tearing down
+ *    the TDLS link (%NL80211_TDLS_DISABLE_LINK)
+ *
+ * TODO: need more info for other interface types
  */
 
 /**
  *     to get a list of all present wiphys.
  * @NL80211_CMD_SET_WIPHY: set wiphy parameters, needs %NL80211_ATTR_WIPHY or
  *     %NL80211_ATTR_IFINDEX; can be used to set %NL80211_ATTR_WIPHY_NAME,
- *     %NL80211_ATTR_WIPHY_TXQ_PARAMS, %NL80211_ATTR_WIPHY_FREQ,
- *     %NL80211_ATTR_WIPHY_CHANNEL_TYPE, %NL80211_ATTR_WIPHY_RETRY_SHORT,
+ *     %NL80211_ATTR_WIPHY_TXQ_PARAMS, %NL80211_ATTR_WIPHY_FREQ (and the
+ *     attributes determining the channel width; this is used for setting
+ *     monitor mode channel),  %NL80211_ATTR_WIPHY_RETRY_SHORT,
  *     %NL80211_ATTR_WIPHY_RETRY_LONG, %NL80211_ATTR_WIPHY_FRAG_THRESHOLD,
  *     and/or %NL80211_ATTR_WIPHY_RTS_THRESHOLD.
  *     However, for setting the channel, see %NL80211_CMD_SET_CHANNEL
  *     %NL80211_ATTR_HIDDEN_SSID, %NL80211_ATTR_CIPHERS_PAIRWISE,
  *     %NL80211_ATTR_CIPHER_GROUP, %NL80211_ATTR_WPA_VERSIONS,
  *     %NL80211_ATTR_AKM_SUITES, %NL80211_ATTR_PRIVACY,
- *     %NL80211_ATTR_AUTH_TYPE and %NL80211_ATTR_INACTIVITY_TIMEOUT.
+ *     %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_INACTIVITY_TIMEOUT,
+ *     %NL80211_ATTR_ACL_POLICY and %NL80211_ATTR_MAC_ADDRS.
+ *     The channel to use can be set on the interface or be given using the
+ *     %NL80211_ATTR_WIPHY_FREQ and the attributes determining channel width.
  * @NL80211_CMD_NEW_BEACON: old alias for %NL80211_CMD_START_AP
  * @NL80211_CMD_STOP_AP: Stop AP operation on the given interface
  * @NL80211_CMD_DEL_BEACON: old alias for %NL80211_CMD_STOP_AP
  * @NL80211_CMD_NEW_SURVEY_RESULTS: survey data notification (as a reply to
  *     NL80211_CMD_GET_SURVEY and on the "scan" multicast group)
  *
+ * @NL80211_CMD_SET_PMKSA: Add a PMKSA cache entry, using %NL80211_ATTR_MAC
+ *     (for the BSSID) and %NL80211_ATTR_PMKID.
+ * @NL80211_CMD_DEL_PMKSA: Delete a PMKSA cache entry, using %NL80211_ATTR_MAC
+ *     (for the BSSID) and %NL80211_ATTR_PMKID.
+ * @NL80211_CMD_FLUSH_PMKSA: Flush all PMKSA cache entries.
+ *
  * @NL80211_CMD_REG_CHANGE: indicates to userspace the regulatory domain
  *     has been changed and provides details of the request information
  *     that caused the change such as who initiated the regulatory request
  *     requests to connect to a specified network but without separating
  *     auth and assoc steps. For this, you need to specify the SSID in a
  *     %NL80211_ATTR_SSID attribute, and can optionally specify the association
- *     IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_MAC,
- *     %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT,
+ *     IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_USE_MFP,
+ *     %NL80211_ATTR_MAC, %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT,
  *     %NL80211_ATTR_CONTROL_PORT_ETHERTYPE and
  *     %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT.
  *     Background scan period can optionally be
  *     a response while being associated to an AP on another channel.
  *     %NL80211_ATTR_IFINDEX is used to specify which interface (and thus
  *     radio) is used. %NL80211_ATTR_WIPHY_FREQ is used to specify the
- *     frequency for the operation and %NL80211_ATTR_WIPHY_CHANNEL_TYPE may be
- *     optionally used to specify additional channel parameters.
+ *     frequency for the operation.
  *     %NL80211_ATTR_DURATION is used to specify the duration in milliseconds
  *     to remain on the channel. This command is also used as an event to
  *     notify when the requested duration starts (it may take a while for the
  *     as an event indicating reception of a frame that was not processed in
  *     kernel code, but is for us (i.e., which may need to be processed in a
  *     user space application). %NL80211_ATTR_FRAME is used to specify the
- *     frame contents (including header). %NL80211_ATTR_WIPHY_FREQ (and
- *     optionally %NL80211_ATTR_WIPHY_CHANNEL_TYPE) is used to indicate on
- *     which channel the frame is to be transmitted or was received. If this
- *     channel is not the current channel (remain-on-channel or the
- *     operational channel) the device will switch to the given channel and
- *     transmit the frame, optionally waiting for a response for the time
+ *     frame contents (including header). %NL80211_ATTR_WIPHY_FREQ is used
+ *     to indicate on which channel the frame is to be transmitted or was
+ *     received. If this channel is not the current channel (remain-on-channel
+ *     or the operational channel) the device will switch to the given channel
+ *     and transmit the frame, optionally waiting for a response for the time
  *     specified using %NL80211_ATTR_DURATION. When called, this operation
  *     returns a cookie (%NL80211_ATTR_COOKIE) that will be included with the
  *     TX status event pertaining to the TX request.
  *     the frame.
  * @NL80211_CMD_ACTION_TX_STATUS: Alias for @NL80211_CMD_FRAME_TX_STATUS for
  *     backward compatibility.
+ *
+ * @NL80211_CMD_SET_POWER_SAVE: Set powersave, using %NL80211_ATTR_PS_STATE
+ * @NL80211_CMD_GET_POWER_SAVE: Get powersave status in %NL80211_ATTR_PS_STATE
+ *
  * @NL80211_CMD_SET_CQM: Connection quality monitor configuration. This command
  *     is used to configure connection quality monitoring notification trigger
  *     levels.
  *     command is used as an event to indicate the that a trigger level was
  *     reached.
  * @NL80211_CMD_SET_CHANNEL: Set the channel (using %NL80211_ATTR_WIPHY_FREQ
- *     and %NL80211_ATTR_WIPHY_CHANNEL_TYPE) the given interface (identifed
- *     by %NL80211_ATTR_IFINDEX) shall operate on.
+ *     and the attributes determining channel width) the given interface
+ *     (identifed by %NL80211_ATTR_IFINDEX) shall operate on.
  *     In case multiple channels are supported by the device, the mechanism
  *     with which it switches channels is implementation-defined.
  *     When a monitor interface is given, it can only switch channel while
  * @NL80211_CMD_NEW_PEER_CANDIDATE: Notification on the reception of a
  *      beacon or probe response from a compatible mesh peer.  This is only
  *      sent while no station information (sta_info) exists for the new peer
- *      candidate and when @NL80211_MESH_SETUP_USERSPACE_AUTH is set.  On
- *      reception of this notification, userspace may decide to create a new
- *      station (@NL80211_CMD_NEW_STATION).  To stop this notification from
+ *      candidate and when @NL80211_MESH_SETUP_USERSPACE_AUTH,
+ *      @NL80211_MESH_SETUP_USERSPACE_AMPE, or
+ *      @NL80211_MESH_SETUP_USERSPACE_MPM is set.  On reception of this
+ *      notification, userspace may decide to create a new station
+ *      (@NL80211_CMD_NEW_STATION).  To stop this notification from
  *      reoccurring, the userspace authentication daemon may want to create the
  *      new station with the AUTHENTICATED flag unset and maybe change it later
  *      depending on the authentication result.
  *     command with the %NL80211_ATTR_WOWLAN_TRIGGERS attribute. For
  *     more background information, see
  *     http://wireless.kernel.org/en/users/Documentation/WoWLAN.
+ *     The @NL80211_CMD_SET_WOWLAN command can also be used as a notification
+ *     from the driver reporting the wakeup reason. In this case, the
+ *     @NL80211_ATTR_WOWLAN_TRIGGERS attribute will contain the reason
+ *     for the wakeup, if it was caused by wireless. If it is not present
+ *     in the wakeup notification, the wireless device didn't cause the
+ *     wakeup but reports that it was woken up.
  *
  * @NL80211_CMD_SET_REKEY_OFFLOAD: This command is used give the driver
  *     the necessary information for supporting GTK rekey offload. This
  *     of PMKSA caching dandidates.
  *
  * @NL80211_CMD_TDLS_OPER: Perform a high-level TDLS command (e.g. link setup).
+ *     In addition, this can be used as an event to request userspace to take
+ *     actions on TDLS links (set up a new link or tear down an existing one).
+ *     In such events, %NL80211_ATTR_TDLS_OPERATION indicates the requested
+ *     operation, %NL80211_ATTR_MAC contains the peer MAC address, and
+ *     %NL80211_ATTR_REASON_CODE the reason code to be used (only with
+ *     %NL80211_TDLS_TEARDOWN).
  * @NL80211_CMD_TDLS_MGMT: Send a TDLS management frame.
  *
  * @NL80211_CMD_UNEXPECTED_FRAME: Used by an application controlling an AP
  * @NL80211_CMD_SET_NOACK_MAP: sets a bitmap for the individual TIDs whether
  *      No Acknowledgement Policy should be applied.
  *
+ * @NL80211_CMD_CH_SWITCH_NOTIFY: An AP or GO may decide to switch channels
+ *     independently of the userspace SME, send this event indicating
+ *     %NL80211_ATTR_IFINDEX is now on %NL80211_ATTR_WIPHY_FREQ and the
+ *     attributes determining channel width.
+ *
+ * @NL80211_CMD_START_P2P_DEVICE: Start the given P2P Device, identified by
+ *     its %NL80211_ATTR_WDEV identifier. It must have been created with
+ *     %NL80211_CMD_NEW_INTERFACE previously. After it has been started, the
+ *     P2P Device can be used for P2P operations, e.g. remain-on-channel and
+ *     public action frame TX.
+ * @NL80211_CMD_STOP_P2P_DEVICE: Stop the given P2P Device, identified by
+ *     its %NL80211_ATTR_WDEV identifier.
+ *
+ * @NL80211_CMD_CONN_FAILED: connection request to an AP failed; used to
+ *     notify userspace that AP has rejected the connection request from a
+ *     station, due to particular reason. %NL80211_ATTR_CONN_FAILED_REASON
+ *     is used for this.
+ *
+ * @NL80211_CMD_SET_MCAST_RATE: Change the rate used to send multicast frames
+ *     for IBSS or MESH vif.
+ *
+ * @NL80211_CMD_SET_MAC_ACL: sets ACL for MAC address based access control.
+ *     This is to be used with the drivers advertising the support of MAC
+ *     address based access control. List of MAC addresses is passed in
+ *     %NL80211_ATTR_MAC_ADDRS and ACL policy is passed in
+ *     %NL80211_ATTR_ACL_POLICY. Driver will enable ACL with this list, if it
+ *     is not already done. The new list will replace any existing list. Driver
+ *     will clear its ACL when the list of MAC addresses passed is empty. This
+ *     command is used in AP/P2P GO mode. Driver has to make sure to clear its
+ *     ACL list during %NL80211_CMD_STOP_AP.
+ *
+ * @NL80211_CMD_RADAR_DETECT: Start a Channel availability check (CAC). Once
+ *     a radar is detected or the channel availability scan (CAC) has finished
+ *     or was aborted, or a radar was detected, usermode will be notified with
+ *     this event. This command is also used to notify userspace about radars
+ *     while operating on this channel.
+ *     %NL80211_ATTR_RADAR_EVENT is used to inform about the type of the
+ *     event.
+ *
+ * @NL80211_CMD_GET_PROTOCOL_FEATURES: Get global nl80211 protocol features,
+ *     i.e. features for the nl80211 protocol rather than device features.
+ *     Returns the features in the %NL80211_ATTR_PROTOCOL_FEATURES bitmap.
+ *
+ * @NL80211_CMD_UPDATE_FT_IES: Pass down the most up-to-date Fast Transition
+ *     Information Element to the WLAN driver
+ *
+ * @NL80211_CMD_FT_EVENT: Send a Fast transition event from the WLAN driver
+ *     to the supplicant. This will carry the target AP's MAC address along
+ *     with the relevant Information Elements. This event is used to report
+ *     received FT IEs (MDIE, FTIE, RSN IE, TIE, RICIE).
+ *
+ * @NL80211_CMD_CRIT_PROTOCOL_START: Indicates user-space will start running
+ *     a critical protocol that needs more reliability in the connection to
+ *     complete.
+ *
+ * @NL80211_CMD_CRIT_PROTOCOL_STOP: Indicates the connection reliability can
+ *     return back to normal.
+ *
  * @NL80211_CMD_MAX: highest used command number
  * @__NL80211_CMD_AFTER_LAST: internal use
  */
@@ -689,6 +787,27 @@ enum nl80211_commands {
 
        NL80211_CMD_SET_NOACK_MAP,
 
+       NL80211_CMD_CH_SWITCH_NOTIFY,
+
+       NL80211_CMD_START_P2P_DEVICE,
+       NL80211_CMD_STOP_P2P_DEVICE,
+
+       NL80211_CMD_CONN_FAILED,
+
+       NL80211_CMD_SET_MCAST_RATE,
+
+       NL80211_CMD_SET_MAC_ACL,
+
+       NL80211_CMD_RADAR_DETECT,
+
+       NL80211_CMD_GET_PROTOCOL_FEATURES,
+
+       NL80211_CMD_UPDATE_FT_IES,
+       NL80211_CMD_FT_EVENT,
+
+       NL80211_CMD_CRIT_PROTOCOL_START,
+       NL80211_CMD_CRIT_PROTOCOL_STOP,
+
        /* add new commands above here */
 
        /* used to define NL80211_CMD_MAX below */
@@ -725,14 +844,26 @@ enum nl80211_commands {
  *     /sys/class/ieee80211/<phyname>/index
  * @NL80211_ATTR_WIPHY_NAME: wiphy name (used for renaming)
  * @NL80211_ATTR_WIPHY_TXQ_PARAMS: a nested array of TX queue parameters
- * @NL80211_ATTR_WIPHY_FREQ: frequency of the selected channel in MHz
+ * @NL80211_ATTR_WIPHY_FREQ: frequency of the selected channel in MHz,
+ *     defines the channel together with the (deprecated)
+ *     %NL80211_ATTR_WIPHY_CHANNEL_TYPE attribute or the attributes
+ *     %NL80211_ATTR_CHANNEL_WIDTH and if needed %NL80211_ATTR_CENTER_FREQ1
+ *     and %NL80211_ATTR_CENTER_FREQ2
+ * @NL80211_ATTR_CHANNEL_WIDTH: u32 attribute containing one of the values
+ *     of &enum nl80211_chan_width, describing the channel width. See the
+ *     documentation of the enum for more information.
+ * @NL80211_ATTR_CENTER_FREQ1: Center frequency of the first part of the
+ *     channel, used for anything but 20 MHz bandwidth
+ * @NL80211_ATTR_CENTER_FREQ2: Center frequency of the second part of the
+ *     channel, used only for 80+80 MHz bandwidth
  * @NL80211_ATTR_WIPHY_CHANNEL_TYPE: included with NL80211_ATTR_WIPHY_FREQ
- *     if HT20 or HT40 are allowed (i.e., 802.11n disabled if not included):
+ *     if HT20 or HT40 are to be used (i.e., HT disabled if not included):
  *     NL80211_CHAN_NO_HT = HT not allowed (i.e., same as not including
  *             this attribute)
  *     NL80211_CHAN_HT20 = HT20 only
  *     NL80211_CHAN_HT40MINUS = secondary channel is below the primary channel
  *     NL80211_CHAN_HT40PLUS = secondary channel is above the primary channel
+ *     This attribute is now deprecated.
  * @NL80211_ATTR_WIPHY_RETRY_SHORT: TX retry limit for frames whose length is
  *     less than or equal to the RTS threshold; allowed range: 1..255;
  *     dot11ShortRetryLimit; u8
@@ -752,6 +883,9 @@ enum nl80211_commands {
  * @NL80211_ATTR_IFNAME: network interface name
  * @NL80211_ATTR_IFTYPE: type of virtual interface, see &enum nl80211_iftype
  *
+ * @NL80211_ATTR_WDEV: wireless device identifier, used for pseudo-devices
+ *     that don't have a netdev (u64)
+ *
  * @NL80211_ATTR_MAC: MAC address (various uses)
  *
  * @NL80211_ATTR_KEY_DATA: (temporal) key data; for TKIP this consists of
@@ -762,6 +896,13 @@ enum nl80211_commands {
  *     section 7.3.2.25.1, e.g. 0x000FAC04)
  * @NL80211_ATTR_KEY_SEQ: transmit key sequence number (IV/PN) for TKIP and
  *     CCMP keys, each six bytes in little endian
+ * @NL80211_ATTR_KEY_DEFAULT: Flag attribute indicating the key is default key
+ * @NL80211_ATTR_KEY_DEFAULT_MGMT: Flag attribute indicating the key is the
+ *     default management key
+ * @NL80211_ATTR_CIPHER_SUITES_PAIRWISE: For crypto settings for connect or
+ *     other commands, indicates which pairwise cipher suites are used
+ * @NL80211_ATTR_CIPHER_SUITE_GROUP: For crypto settings for connect or
+ *     other commands, indicates which group cipher suite is used
  *
  * @NL80211_ATTR_BEACON_INTERVAL: beacon interval in TU
  * @NL80211_ATTR_DTIM_PERIOD: DTIM period for beaconing
@@ -786,7 +927,8 @@ enum nl80211_commands {
  *     consisting of a nested array.
  *
  * @NL80211_ATTR_MESH_ID: mesh id (1-32 bytes).
- * @NL80211_ATTR_STA_PLINK_ACTION: action to perform on the mesh peer link.
+ * @NL80211_ATTR_STA_PLINK_ACTION: action to perform on the mesh peer link
+ *     (see &enum nl80211_plink_action).
  * @NL80211_ATTR_MPATH_NEXT_HOP: MAC address of the next hop for a mesh path.
  * @NL80211_ATTR_MPATH_INFO: information about a mesh_path, part of mesh path
  *     info given for %NL80211_CMD_GET_MPATH, nested attribute described at
@@ -889,7 +1031,7 @@ enum nl80211_commands {
  * @NL80211_ATTR_USE_MFP: Whether management frame protection (IEEE 802.11w) is
  *     used for the association (&enum nl80211_mfp, represented as a u32);
  *     this attribute can be used
- *     with %NL80211_CMD_ASSOCIATE request
+ *     with %NL80211_CMD_ASSOCIATE and %NL80211_CMD_CONNECT requests
  *
  * @NL80211_ATTR_STA_FLAGS2: Attribute containing a
  *     &struct nl80211_sta_flag_update.
@@ -997,6 +1139,8 @@ enum nl80211_commands {
  * @NL80211_ATTR_ACK: Flag attribute indicating that the frame was
  *     acknowledged by the recipient.
  *
+ * @NL80211_ATTR_PS_STATE: powersave state, using &enum nl80211_ps_state values.
+ *
  * @NL80211_ATTR_CQM: connection quality monitor configuration in a
  *     nested attribute with %NL80211_ATTR_CQM_* sub-attributes.
  *
@@ -1054,7 +1198,7 @@ enum nl80211_commands {
  *     flag isn't set, the frame will be rejected. This is also used as an
  *     nl80211 capability flag.
  *
- * @NL80211_ATTR_BSS_HTOPMODE: HT operation mode (u16)
+ * @NL80211_ATTR_BSS_HT_OPMODE: HT operation mode (u16)
  *
  * @NL80211_ATTR_KEY_DEFAULT_TYPES: A nested attribute containing flags
  *     attributes, specifying what a key should be set as default as.
@@ -1067,10 +1211,10 @@ enum nl80211_commands {
  * @NL80211_ATTR_SUPPORT_MESH_AUTH: Currently, this means the underlying driver
  *     allows auth frames in a mesh to be passed to userspace for processing via
  *     the @NL80211_MESH_SETUP_USERSPACE_AUTH flag.
- * @NL80211_ATTR_STA_PLINK_STATE: The state of a mesh peer link as
- *     defined in &enum nl80211_plink_state. Used when userspace is
- *     driving the peer link management state machine.
- *     @NL80211_MESH_SETUP_USERSPACE_AMPE must be enabled.
+ * @NL80211_ATTR_STA_PLINK_STATE: The state of a mesh peer link as defined in
+ *     &enum nl80211_plink_state. Used when userspace is driving the peer link
+ *     management state machine.  @NL80211_MESH_SETUP_USERSPACE_AMPE or
+ *     @NL80211_MESH_SETUP_USERSPACE_MPM must be enabled.
  *
  * @NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED: indicates, as part of the wiphy
  *     capabilities, the supported WoWLAN triggers
@@ -1078,10 +1222,10 @@ enum nl80211_commands {
  *     indicate which WoW triggers should be enabled. This is also
  *     used by %NL80211_CMD_GET_WOWLAN to get the currently enabled WoWLAN
  *     triggers.
-
+ *
  * @NL80211_ATTR_SCHED_SCAN_INTERVAL: Interval between scheduled scan
  *     cycles, in msecs.
-
+ *
  * @NL80211_ATTR_SCHED_SCAN_MATCH: Nested attribute with one or more
  *     sets of attributes to match during scheduled scans.  Only BSSs
  *     that match any of the sets will be reported.  These are
@@ -1108,7 +1252,7 @@ enum nl80211_commands {
  *     are managed in software: interfaces of these types aren't subject to
  *     any restrictions in their number or combinations.
  *
- * @%NL80211_ATTR_REKEY_DATA: nested attribute containing the information
+ * @NL80211_ATTR_REKEY_DATA: nested attribute containing the information
  *     necessary for GTK rekeying in the device, see &enum nl80211_rekey_data.
  *
  * @NL80211_ATTR_SCAN_SUPP_RATES: rates per to be advertised as supported in scan,
@@ -1175,7 +1319,6 @@ enum nl80211_commands {
  * @NL80211_ATTR_FEATURE_FLAGS: This u32 attribute contains flags from
  *     &enum nl80211_feature_flags and is advertised in wiphy information.
  * @NL80211_ATTR_PROBE_RESP_OFFLOAD: Indicates that the HW responds to probe
- *
  *     requests while operating in AP-mode.
  *     This attribute holds a bitmap of the supported protocols for
  *     offloading (see &enum nl80211_probe_resp_offload_support_attr).
@@ -1215,6 +1358,77 @@ enum nl80211_commands {
  * @NL80211_ATTR_BG_SCAN_PERIOD: Background scan period in seconds
  *      or 0 to disable background scan.
  *
+ * @NL80211_ATTR_USER_REG_HINT_TYPE: type of regulatory hint passed from
+ *     userspace. If unset it is assumed the hint comes directly from
+ *     a user. If set code could specify exactly what type of source
+ *     was used to provide the hint. For the different types of
+ *     allowed user regulatory hints see nl80211_user_reg_hint_type.
+ *
+ * @NL80211_ATTR_CONN_FAILED_REASON: The reason for which AP has rejected
+ *     the connection request from a station. nl80211_connect_failed_reason
+ *     enum has different reasons of connection failure.
+ *
+ * @NL80211_ATTR_SAE_DATA: SAE elements in Authentication frames. This starts
+ *     with the Authentication transaction sequence number field.
+ *
+ * @NL80211_ATTR_VHT_CAPABILITY: VHT Capability information element (from
+ *     association request when used with NL80211_CMD_NEW_STATION)
+ *
+ * @NL80211_ATTR_SCAN_FLAGS: scan request control flags (u32)
+ *
+ * @NL80211_ATTR_P2P_CTWINDOW: P2P GO Client Traffic Window (u8), used with
+ *     the START_AP and SET_BSS commands
+ * @NL80211_ATTR_P2P_OPPPS: P2P GO opportunistic PS (u8), used with the
+ *     START_AP and SET_BSS commands. This can have the values 0 or 1;
+ *     if not given in START_AP 0 is assumed, if not given in SET_BSS
+ *     no change is made.
+ *
+ * @NL80211_ATTR_LOCAL_MESH_POWER_MODE: local mesh STA link-specific power mode
+ *     defined in &enum nl80211_mesh_power_mode.
+ *
+ * @NL80211_ATTR_ACL_POLICY: ACL policy, see &enum nl80211_acl_policy,
+ *     carried in a u32 attribute
+ *
+ * @NL80211_ATTR_MAC_ADDRS: Array of nested MAC addresses, used for
+ *     MAC ACL.
+ *
+ * @NL80211_ATTR_MAC_ACL_MAX: u32 attribute to advertise the maximum
+ *     number of MAC addresses that a device can support for MAC
+ *     ACL.
+ *
+ * @NL80211_ATTR_RADAR_EVENT: Type of radar event for notification to userspace,
+ *     contains a value of enum nl80211_radar_event (u32).
+ *
+ * @NL80211_ATTR_EXT_CAPA: 802.11 extended capabilities that the kernel driver
+ *     has and handles. The format is the same as the IE contents. See
+ *     802.11-2012 8.4.2.29 for more information.
+ * @NL80211_ATTR_EXT_CAPA_MASK: Extended capabilities that the kernel driver
+ *     has set in the %NL80211_ATTR_EXT_CAPA value, for multibit fields.
+ *
+ * @NL80211_ATTR_STA_CAPABILITY: Station capabilities (u16) are advertised to
+ *     the driver, e.g., to enable TDLS power save (PU-APSD).
+ *
+ * @NL80211_ATTR_STA_EXT_CAPABILITY: Station extended capabilities are
+ *     advertised to the driver, e.g., to enable TDLS off channel operations
+ *     and PU-APSD.
+ *
+ * @NL80211_ATTR_PROTOCOL_FEATURES: global nl80211 feature flags, see
+ *     &enum nl80211_protocol_features, the attribute is a u32.
+ *
+ * @NL80211_ATTR_SPLIT_WIPHY_DUMP: flag attribute, userspace supports
+ *     receiving the data for a single wiphy split across multiple
+ *     messages, given with wiphy dump message
+ *
+ * @NL80211_ATTR_MDID: Mobility Domain Identifier
+ *
+ * @NL80211_ATTR_IE_RIC: Resource Information Container Information
+ *     Element
+ *
+ * @NL80211_ATTR_CRIT_PROT_ID: critical protocol identifier requiring increased
+ *     reliability, see &enum nl80211_crit_proto_id (u16).
+ * @NL80211_ATTR_MAX_CRIT_PROT_DURATION: duration in milliseconds in which
+ *      the connection should have increased reliability (u16).
+ *
  * @NL80211_ATTR_MAX: highest attribute number currently defined
  * @__NL80211_ATTR_AFTER_LAST: internal use
  */
@@ -1466,6 +1680,53 @@ enum nl80211_attrs {
 
        NL80211_ATTR_BG_SCAN_PERIOD,
 
+       NL80211_ATTR_WDEV,
+
+       NL80211_ATTR_USER_REG_HINT_TYPE,
+
+       NL80211_ATTR_CONN_FAILED_REASON,
+
+       NL80211_ATTR_SAE_DATA,
+
+       NL80211_ATTR_VHT_CAPABILITY,
+
+       NL80211_ATTR_SCAN_FLAGS,
+
+       NL80211_ATTR_CHANNEL_WIDTH,
+       NL80211_ATTR_CENTER_FREQ1,
+       NL80211_ATTR_CENTER_FREQ2,
+
+       NL80211_ATTR_P2P_CTWINDOW,
+       NL80211_ATTR_P2P_OPPPS,
+
+       NL80211_ATTR_LOCAL_MESH_POWER_MODE,
+
+       NL80211_ATTR_ACL_POLICY,
+
+       NL80211_ATTR_MAC_ADDRS,
+
+       NL80211_ATTR_MAC_ACL_MAX,
+
+       NL80211_ATTR_RADAR_EVENT,
+
+       NL80211_ATTR_EXT_CAPA,
+       NL80211_ATTR_EXT_CAPA_MASK,
+
+       NL80211_ATTR_STA_CAPABILITY,
+       NL80211_ATTR_STA_EXT_CAPABILITY,
+
+       NL80211_ATTR_PROTOCOL_FEATURES,
+       NL80211_ATTR_SPLIT_WIPHY_DUMP,
+
+       NL80211_ATTR_DISABLE_VHT,
+       NL80211_ATTR_VHT_CAPABILITY_MASK,
+
+       NL80211_ATTR_MDID,
+       NL80211_ATTR_IE_RIC,
+
+       NL80211_ATTR_CRIT_PROT_ID,
+       NL80211_ATTR_MAX_CRIT_PROT_DURATION,
+
        /* add attributes here, update the policy in nl80211.c */
 
        __NL80211_ATTR_AFTER_LAST,
@@ -1509,10 +1770,18 @@ enum nl80211_attrs {
 #define NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY    16
 #define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY    24
 #define NL80211_HT_CAPABILITY_LEN              26
+#define NL80211_VHT_CAPABILITY_LEN             12
 
 #define NL80211_MAX_NR_CIPHER_SUITES           5
 #define NL80211_MAX_NR_AKM_SUITES              2
 
+#define NL80211_MIN_REMAIN_ON_CHANNEL_TIME     10
+
+/* default RSSI threshold for scan results if none specified. */
+#define NL80211_SCAN_RSSI_THOLD_OFF            -300
+
+#define NL80211_CQM_TXE_MAX_INTVL              1800
+
 /**
  * enum nl80211_iftype - (virtual) interface types
  *
@@ -1528,6 +1797,10 @@ enum nl80211_attrs {
  * @NL80211_IFTYPE_MESH_POINT: mesh point
  * @NL80211_IFTYPE_P2P_CLIENT: P2P client
  * @NL80211_IFTYPE_P2P_GO: P2P group owner
+ * @NL80211_IFTYPE_P2P_DEVICE: P2P device interface type, this is not a netdev
+ *     and therefore can't be created in the normal ways, use the
+ *     %NL80211_CMD_START_P2P_DEVICE and %NL80211_CMD_STOP_P2P_DEVICE
+ *     commands to create and destroy one
  * @NL80211_IFTYPE_MAX: highest interface type number currently defined
  * @NUM_NL80211_IFTYPES: number of defined interface types
  *
@@ -1546,6 +1819,7 @@ enum nl80211_iftype {
        NL80211_IFTYPE_MESH_POINT,
        NL80211_IFTYPE_P2P_CLIENT,
        NL80211_IFTYPE_P2P_GO,
+       NL80211_IFTYPE_P2P_DEVICE,
 
        /* keep last */
        NUM_NL80211_IFTYPES,
@@ -1570,6 +1844,9 @@ enum nl80211_iftype {
  *     flag can't be changed, it is only valid while adding a station, and
  *     attempts to change it will silently be ignored (rather than rejected
  *     as errors.)
+ * @NL80211_STA_FLAG_ASSOCIATED: station is associated; used with drivers
+ *     that support %NL80211_FEATURE_FULL_AP_CLIENT_STATE to transition a
+ *     previously added station into associated state
  * @NL80211_STA_FLAG_MAX: highest station flag number currently defined
  * @__NL80211_STA_FLAG_AFTER_LAST: internal use
  */
@@ -1581,12 +1858,15 @@ enum nl80211_sta_flags {
        NL80211_STA_FLAG_MFP,
        NL80211_STA_FLAG_AUTHENTICATED,
        NL80211_STA_FLAG_TDLS_PEER,
+       NL80211_STA_FLAG_ASSOCIATED,
 
        /* keep last */
        __NL80211_STA_FLAG_AFTER_LAST,
        NL80211_STA_FLAG_MAX = __NL80211_STA_FLAG_AFTER_LAST - 1
 };
 
+#define NL80211_STA_FLAG_MAX_OLD_API   NL80211_STA_FLAG_TDLS_PEER
+
 /**
  * struct nl80211_sta_flag_update - station flags mask/set
  * @mask: mask of station flags to set
@@ -1604,13 +1884,26 @@ struct nl80211_sta_flag_update {
  *
  * These attribute types are used with %NL80211_STA_INFO_TXRATE
  * when getting information about the bitrate of a station.
+ * There are 2 attributes for bitrate, a legacy one that represents
+ * a 16-bit value, and new one that represents a 32-bit value.
+ * If the rate value fits into 16 bit, both attributes are reported
+ * with the same value. If the rate is too high to fit into 16 bits
+ * (>6.5535Gbps) only 32-bit attribute is included.
+ * User space tools encouraged to use the 32-bit attribute and fall
+ * back to the 16-bit one for compatibility with older kernels.
  *
  * @__NL80211_RATE_INFO_INVALID: attribute number 0 is reserved
  * @NL80211_RATE_INFO_BITRATE: total bitrate (u16, 100kbit/s)
  * @NL80211_RATE_INFO_MCS: mcs index for 802.11n (u8)
- * @NL80211_RATE_INFO_40_MHZ_WIDTH: 40 Mhz dualchannel bitrate
+ * @NL80211_RATE_INFO_40_MHZ_WIDTH: 40 MHz dualchannel bitrate
  * @NL80211_RATE_INFO_SHORT_GI: 400ns guard interval
+ * @NL80211_RATE_INFO_BITRATE32: total bitrate (u32, 100kbit/s)
  * @NL80211_RATE_INFO_MAX: highest rate_info number currently defined
+ * @NL80211_RATE_INFO_VHT_MCS: MCS index for VHT (u8)
+ * @NL80211_RATE_INFO_VHT_NSS: number of streams in VHT (u8)
+ * @NL80211_RATE_INFO_80_MHZ_WIDTH: 80 MHz VHT rate
+ * @NL80211_RATE_INFO_80P80_MHZ_WIDTH: 80+80 MHz VHT rate
+ * @NL80211_RATE_INFO_160_MHZ_WIDTH: 160 MHz VHT rate
  * @__NL80211_RATE_INFO_AFTER_LAST: internal use
  */
 enum nl80211_rate_info {
@@ -1619,6 +1912,12 @@ enum nl80211_rate_info {
        NL80211_RATE_INFO_MCS,
        NL80211_RATE_INFO_40_MHZ_WIDTH,
        NL80211_RATE_INFO_SHORT_GI,
+       NL80211_RATE_INFO_BITRATE32,
+       NL80211_RATE_INFO_VHT_MCS,
+       NL80211_RATE_INFO_VHT_NSS,
+       NL80211_RATE_INFO_80_MHZ_WIDTH,
+       NL80211_RATE_INFO_80P80_MHZ_WIDTH,
+       NL80211_RATE_INFO_160_MHZ_WIDTH,
 
        /* keep last */
        __NL80211_RATE_INFO_AFTER_LAST,
@@ -1665,6 +1964,8 @@ enum nl80211_sta_bss_param {
  * @NL80211_STA_INFO_INACTIVE_TIME: time since last activity (u32, msecs)
  * @NL80211_STA_INFO_RX_BYTES: total received bytes (u32, from this station)
  * @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station)
+ * @NL80211_STA_INFO_RX_BYTES64: total received bytes (u64, from this station)
+ * @NL80211_STA_INFO_TX_BYTES64: total transmitted bytes (u64, to this station)
  * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm)
  * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute
  *     containing info as possible, see &enum nl80211_rate_info
@@ -1685,6 +1986,11 @@ enum nl80211_sta_bss_param {
  * @NL80211_STA_INFO_CONNECTED_TIME: time since the station is last connected
  * @NL80211_STA_INFO_STA_FLAGS: Contains a struct nl80211_sta_flag_update.
  * @NL80211_STA_INFO_BEACON_LOSS: count of times beacon loss was detected (u32)
+ * @NL80211_STA_INFO_T_OFFSET: timing offset with respect to this STA (s64)
+ * @NL80211_STA_INFO_LOCAL_PM: local mesh STA link-specific power mode
+ * @NL80211_STA_INFO_PEER_PM: peer mesh STA link-specific power mode
+ * @NL80211_STA_INFO_NONPEER_PM: neighbor mesh STA power save mode towards
+ *     non-peer STA
  * @__NL80211_STA_INFO_AFTER_LAST: internal
  * @NL80211_STA_INFO_MAX: highest possible station info attribute
  */
@@ -1708,6 +2014,12 @@ enum nl80211_sta_info {
        NL80211_STA_INFO_CONNECTED_TIME,
        NL80211_STA_INFO_STA_FLAGS,
        NL80211_STA_INFO_BEACON_LOSS,
+       NL80211_STA_INFO_T_OFFSET,
+       NL80211_STA_INFO_LOCAL_PM,
+       NL80211_STA_INFO_PEER_PM,
+       NL80211_STA_INFO_NONPEER_PM,
+       NL80211_STA_INFO_RX_BYTES64,
+       NL80211_STA_INFO_TX_BYTES64,
 
        /* keep last */
        __NL80211_STA_INFO_AFTER_LAST,
@@ -1777,6 +2089,9 @@ enum nl80211_mpath_info {
  * @NL80211_BAND_ATTR_HT_CAPA: HT capabilities, as in the HT information IE
  * @NL80211_BAND_ATTR_HT_AMPDU_FACTOR: A-MPDU factor, as in 11n
  * @NL80211_BAND_ATTR_HT_AMPDU_DENSITY: A-MPDU density, as in 11n
+ * @NL80211_BAND_ATTR_VHT_MCS_SET: 32-byte attribute containing the MCS set as
+ *     defined in 802.11ac
+ * @NL80211_BAND_ATTR_VHT_CAPA: VHT capabilities, as in the HT information IE
  * @NL80211_BAND_ATTR_MAX: highest band attribute currently defined
  * @__NL80211_BAND_ATTR_AFTER_LAST: internal use
  */
@@ -1790,6 +2105,9 @@ enum nl80211_band_attr {
        NL80211_BAND_ATTR_HT_AMPDU_FACTOR,
        NL80211_BAND_ATTR_HT_AMPDU_DENSITY,
 
+       NL80211_BAND_ATTR_VHT_MCS_SET,
+       NL80211_BAND_ATTR_VHT_CAPA,
+
        /* keep last */
        __NL80211_BAND_ATTR_AFTER_LAST,
        NL80211_BAND_ATTR_MAX = __NL80211_BAND_ATTR_AFTER_LAST - 1
@@ -1811,6 +2129,20 @@ enum nl80211_band_attr {
  *     on this channel in current regulatory domain.
  * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm
  *     (100 * dBm).
+ * @NL80211_FREQUENCY_ATTR_DFS_STATE: current state for DFS
+ *     (enum nl80211_dfs_state)
+ * @NL80211_FREQUENCY_ATTR_DFS_TIME: time in miliseconds for how long
+ *     this channel is in this DFS state.
+ * @NL80211_FREQUENCY_ATTR_NO_HT40_MINUS: HT40- isn't possible with this
+ *     channel as the control channel
+ * @NL80211_FREQUENCY_ATTR_NO_HT40_PLUS: HT40+ isn't possible with this
+ *     channel as the control channel
+ * @NL80211_FREQUENCY_ATTR_NO_80MHZ: any 80 MHz channel using this channel
+ *     as the primary or any of the secondary channels isn't possible,
+ *     this includes 80+80 channels
+ * @NL80211_FREQUENCY_ATTR_NO_160MHZ: any 160 MHz (but not 80+80) channel
+ *     using this channel as the primary or any of the secondary channels
+ *     isn't possible
  * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
  *     currently defined
  * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
@@ -1823,6 +2155,12 @@ enum nl80211_frequency_attr {
        NL80211_FREQUENCY_ATTR_NO_IBSS,
        NL80211_FREQUENCY_ATTR_RADAR,
        NL80211_FREQUENCY_ATTR_MAX_TX_POWER,
+       NL80211_FREQUENCY_ATTR_DFS_STATE,
+       NL80211_FREQUENCY_ATTR_DFS_TIME,
+       NL80211_FREQUENCY_ATTR_NO_HT40_MINUS,
+       NL80211_FREQUENCY_ATTR_NO_HT40_PLUS,
+       NL80211_FREQUENCY_ATTR_NO_80MHZ,
+       NL80211_FREQUENCY_ATTR_NO_160MHZ,
 
        /* keep last */
        __NL80211_FREQUENCY_ATTR_AFTER_LAST,
@@ -1941,6 +2279,8 @@ enum nl80211_reg_rule_attr {
  * @__NL80211_SCHED_SCAN_MATCH_ATTR_INVALID: attribute number 0 is reserved
  * @NL80211_SCHED_SCAN_MATCH_ATTR_SSID: SSID to be used for matching,
  * only report BSS with matching SSID.
+ * @NL80211_SCHED_SCAN_MATCH_ATTR_RSSI: RSSI threshold (in dBm) for reporting a
+ *     BSS in scan results. Filtering is turned off if not specified.
  * @NL80211_SCHED_SCAN_MATCH_ATTR_MAX: highest scheduled scan filter
  *     attribute number currently defined
  * @__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST: internal use
@@ -1948,7 +2288,8 @@ enum nl80211_reg_rule_attr {
 enum nl80211_sched_scan_match_attr {
        __NL80211_SCHED_SCAN_MATCH_ATTR_INVALID,
 
-       NL80211_ATTR_SCHED_SCAN_MATCH_SSID,
+       NL80211_SCHED_SCAN_MATCH_ATTR_SSID,
+       NL80211_SCHED_SCAN_MATCH_ATTR_RSSI,
 
        /* keep last */
        __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST,
@@ -1956,6 +2297,9 @@ enum nl80211_sched_scan_match_attr {
                __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST - 1
 };
 
+/* only for backward compatibility */
+#define NL80211_ATTR_SCHED_SCAN_MATCH_SSID NL80211_SCHED_SCAN_MATCH_ATTR_SSID
+
 /**
  * enum nl80211_reg_rule_flags - regulatory rule flags
  *
@@ -1985,9 +2329,9 @@ enum nl80211_reg_rule_flags {
  * enum nl80211_dfs_regions - regulatory DFS regions
  *
  * @NL80211_DFS_UNSET: Country has no DFS master region specified
- * @NL80211_DFS_FCC_: Country follows DFS master rules from FCC
- * @NL80211_DFS_FCC_: Country follows DFS master rules from ETSI
- * @NL80211_DFS_JP_: Country follows DFS master rules from JP/MKK/Telec
+ * @NL80211_DFS_FCC: Country follows DFS master rules from FCC
+ * @NL80211_DFS_ETSI: Country follows DFS master rules from ETSI
+ * @NL80211_DFS_JP: Country follows DFS master rules from JP/MKK/Telec
  */
 enum nl80211_dfs_regions {
        NL80211_DFS_UNSET       = 0,
@@ -1997,6 +2341,26 @@ enum nl80211_dfs_regions {
 };
 
 /**
+ * enum nl80211_user_reg_hint_type - type of user regulatory hint
+ *
+ * @NL80211_USER_REG_HINT_USER: a user sent the hint. This is always
+ *     assumed if the attribute is not set.
+ * @NL80211_USER_REG_HINT_CELL_BASE: the hint comes from a cellular
+ *     base station. Device drivers that have been tested to work
+ *     properly to support this type of hint can enable these hints
+ *     by setting the NL80211_FEATURE_CELL_BASE_REG_HINTS feature
+ *     capability on the struct wiphy. The wireless core will
+ *     ignore all cell base station hints until at least one device
+ *     present has been registered with the wireless core that
+ *     has listed NL80211_FEATURE_CELL_BASE_REG_HINTS as a
+ *     supported feature.
+ */
+enum nl80211_user_reg_hint_type {
+       NL80211_USER_REG_HINT_USER      = 0,
+       NL80211_USER_REG_HINT_CELL_BASE = 1,
+};
+
+/**
  * enum nl80211_survey_info - survey information
  *
  * These attribute types are used with %NL80211_ATTR_SURVEY_INFO
@@ -2067,6 +2431,34 @@ enum nl80211_mntr_flags {
 };
 
 /**
+ * enum nl80211_mesh_power_mode - mesh power save modes
+ *
+ * @NL80211_MESH_POWER_UNKNOWN: The mesh power mode of the mesh STA is
+ *     not known or has not been set yet.
+ * @NL80211_MESH_POWER_ACTIVE: Active mesh power mode. The mesh STA is
+ *     in Awake state all the time.
+ * @NL80211_MESH_POWER_LIGHT_SLEEP: Light sleep mode. The mesh STA will
+ *     alternate between Active and Doze states, but will wake up for
+ *     neighbor's beacons.
+ * @NL80211_MESH_POWER_DEEP_SLEEP: Deep sleep mode. The mesh STA will
+ *     alternate between Active and Doze states, but may not wake up
+ *     for neighbor's beacons.
+ *
+ * @__NL80211_MESH_POWER_AFTER_LAST - internal use
+ * @NL80211_MESH_POWER_MAX - highest possible power save level
+ */
+
+enum nl80211_mesh_power_mode {
+       NL80211_MESH_POWER_UNKNOWN,
+       NL80211_MESH_POWER_ACTIVE,
+       NL80211_MESH_POWER_LIGHT_SLEEP,
+       NL80211_MESH_POWER_DEEP_SLEEP,
+
+       __NL80211_MESH_POWER_AFTER_LAST,
+       NL80211_MESH_POWER_MAX = __NL80211_MESH_POWER_AFTER_LAST - 1
+};
+
+/**
  * enum nl80211_meshconf_params - mesh configuration parameters
  *
  * Mesh configuration parameters. These can be changed while the mesh is
@@ -2075,73 +2467,98 @@ enum nl80211_mntr_flags {
  * @__NL80211_MESHCONF_INVALID: internal use
  *
  * @NL80211_MESHCONF_RETRY_TIMEOUT: specifies the initial retry timeout in
- * millisecond units, used by the Peer Link Open message
+ *     millisecond units, used by the Peer Link Open message
  *
  * @NL80211_MESHCONF_CONFIRM_TIMEOUT: specifies the initial confirm timeout, in
- * millisecond units, used by the peer link management to close a peer link
+ *     millisecond units, used by the peer link management to close a peer link
  *
  * @NL80211_MESHCONF_HOLDING_TIMEOUT: specifies the holding timeout, in
- * millisecond units
+ *     millisecond units
  *
  * @NL80211_MESHCONF_MAX_PEER_LINKS: maximum number of peer links allowed
- * on this mesh interface
+ *     on this mesh interface
  *
  * @NL80211_MESHCONF_MAX_RETRIES: specifies the maximum number of peer link
- * open retries that can be sent to establish a new peer link instance in a
- * mesh
+ *     open retries that can be sent to establish a new peer link instance in a
+ *     mesh
  *
  * @NL80211_MESHCONF_TTL: specifies the value of TTL field set at a source mesh
- * point.
+ *     point.
  *
- * @NL80211_MESHCONF_AUTO_OPEN_PLINKS: whether we should automatically
- * open peer links when we detect compatible mesh peers.
+ * @NL80211_MESHCONF_AUTO_OPEN_PLINKS: whether we should automatically open
+ *     peer links when we detect compatible mesh peers. Disabled if
+ *     @NL80211_MESH_SETUP_USERSPACE_MPM or @NL80211_MESH_SETUP_USERSPACE_AMPE are
+ *     set.
  *
  * @NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES: the number of action frames
- * containing a PREQ that an MP can send to a particular destination (path
- * target)
+ *     containing a PREQ that an MP can send to a particular destination (path
+ *     target)
  *
  * @NL80211_MESHCONF_PATH_REFRESH_TIME: how frequently to refresh mesh paths
- * (in milliseconds)
+ *     (in milliseconds)
  *
  * @NL80211_MESHCONF_MIN_DISCOVERY_TIMEOUT: minimum length of time to wait
- * until giving up on a path discovery (in milliseconds)
+ *     until giving up on a path discovery (in milliseconds)
  *
  * @NL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT: The time (in TUs) for which mesh
- * points receiving a PREQ shall consider the forwarding information from the
- * root to be valid. (TU = time unit)
+ *     points receiving a PREQ shall consider the forwarding information from
+ *     the root to be valid. (TU = time unit)
  *
  * @NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL: The minimum interval of time (in
- * TUs) during which an MP can send only one action frame containing a PREQ
- * reference element
+ *     TUs) during which an MP can send only one action frame containing a PREQ
+ *     reference element
  *
  * @NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME: The interval of time (in TUs)
- * that it takes for an HWMP information element to propagate across the mesh
+ *     that it takes for an HWMP information element to propagate across the
+ *     mesh
  *
  * @NL80211_MESHCONF_HWMP_ROOTMODE: whether root mode is enabled or not
  *
  * @NL80211_MESHCONF_ELEMENT_TTL: specifies the value of TTL field set at a
- * source mesh point for path selection elements.
+ *     source mesh point for path selection elements.
  *
  * @NL80211_MESHCONF_HWMP_RANN_INTERVAL:  The interval of time (in TUs) between
- * root announcements are transmitted.
+ *     root announcements are transmitted.
  *
  * @NL80211_MESHCONF_GATE_ANNOUNCEMENTS: Advertise that this mesh station has
- * access to a broader network beyond the MBSS.  This is done via Root
- * Announcement frames.
+ *     access to a broader network beyond the MBSS.  This is done via Root
+ *     Announcement frames.
  *
  * @NL80211_MESHCONF_HWMP_PERR_MIN_INTERVAL: The minimum interval of time (in
- * TUs) during which a mesh STA can send only one Action frame containing a
- * PERR element.
+ *     TUs) during which a mesh STA can send only one Action frame containing a
+ *     PERR element.
  *
  * @NL80211_MESHCONF_FORWARDING: set Mesh STA as forwarding or non-forwarding
- * or forwarding entity (default is TRUE - forwarding entity)
+ *     or forwarding entity (default is TRUE - forwarding entity)
  *
  * @NL80211_MESHCONF_RSSI_THRESHOLD: RSSI threshold in dBm. This specifies the
- * threshold for average signal strength of candidate station to establish
- * a peer link.
+ *     threshold for average signal strength of candidate station to establish
+ *     a peer link.
+ *
+ * @NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR: maximum number of neighbors
+ *     to synchronize to for 11s default synchronization method
+ *     (see 11C.12.2.2)
+ *
+ * @NL80211_MESHCONF_HT_OPMODE: set mesh HT protection mode.
  *
  * @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute
  *
+ * @NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT: The time (in TUs) for
+ *     which mesh STAs receiving a proactive PREQ shall consider the forwarding
+ *     information to the root mesh STA to be valid.
+ *
+ * @NL80211_MESHCONF_HWMP_ROOT_INTERVAL: The interval of time (in TUs) between
+ *     proactive PREQs are transmitted.
+ *
+ * @NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL: The minimum interval of time
+ *     (in TUs) during which a mesh STA can send only one Action frame
+ *     containing a PREQ element for root path confirmation.
+ *
+ * @NL80211_MESHCONF_POWER_MODE: Default mesh power mode for new peer links.
+ *     type &enum nl80211_mesh_power_mode (u32)
+ *
+ * @NL80211_MESHCONF_AWAKE_WINDOW: awake window duration (in TUs)
+ *
  * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use
  */
 enum nl80211_meshconf_params {
@@ -2166,6 +2583,13 @@ enum nl80211_meshconf_params {
        NL80211_MESHCONF_HWMP_PERR_MIN_INTERVAL,
        NL80211_MESHCONF_FORWARDING,
        NL80211_MESHCONF_RSSI_THRESHOLD,
+       NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR,
+       NL80211_MESHCONF_HT_OPMODE,
+       NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT,
+       NL80211_MESHCONF_HWMP_ROOT_INTERVAL,
+       NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL,
+       NL80211_MESHCONF_POWER_MODE,
+       NL80211_MESHCONF_AWAKE_WINDOW,
 
        /* keep last */
        __NL80211_MESHCONF_ATTR_AFTER_LAST,
@@ -2181,30 +2605,40 @@ enum nl80211_meshconf_params {
  * @__NL80211_MESH_SETUP_INVALID: Internal use
  *
  * @NL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL: Enable this option to use a
- * vendor specific path selection algorithm or disable it to use the default
- * HWMP.
+ *     vendor specific path selection algorithm or disable it to use the
+ *     default HWMP.
  *
  * @NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC: Enable this option to use a
- * vendor specific path metric or disable it to use the default Airtime
- * metric.
+ *     vendor specific path metric or disable it to use the default Airtime
+ *     metric.
  *
  * @NL80211_MESH_SETUP_IE: Information elements for this mesh, for instance, a
- * robust security network ie, or a vendor specific information element that
- * vendors will use to identify the path selection methods and metrics in use.
+ *     robust security network ie, or a vendor specific information element
+ *     that vendors will use to identify the path selection methods and
+ *     metrics in use.
  *
  * @NL80211_MESH_SETUP_USERSPACE_AUTH: Enable this option if an authentication
- * daemon will be authenticating mesh candidates.
+ *     daemon will be authenticating mesh candidates.
  *
  * @NL80211_MESH_SETUP_USERSPACE_AMPE: Enable this option if an authentication
- * daemon will be securing peer link frames.  AMPE is a secured version of Mesh
- * Peering Management (MPM) and is implemented with the assistance of a
- * userspace daemon.  When this flag is set, the kernel will send peer
- * management frames to a userspace daemon that will implement AMPE
- * functionality (security capabilities selection, key confirmation, and key
- * management).  When the flag is unset (default), the kernel can autonomously
- * complete (unsecured) mesh peering without the need of a userspace daemon.
+ *     daemon will be securing peer link frames.  AMPE is a secured version of
+ *     Mesh Peering Management (MPM) and is implemented with the assistance of
+ *     a userspace daemon.  When this flag is set, the kernel will send peer
+ *     management frames to a userspace daemon that will implement AMPE
+ *     functionality (security capabilities selection, key confirmation, and
+ *     key management).  When the flag is unset (default), the kernel can
+ *     autonomously complete (unsecured) mesh peering without the need of a
+ *     userspace daemon.
+ *
+ * @NL80211_MESH_SETUP_ENABLE_VENDOR_SYNC: Enable this option to use a
+ *     vendor specific synchronization method or disable it to use the default
+ *     neighbor offset synchronization
+ *
+ * @NL80211_MESH_SETUP_USERSPACE_MPM: Enable this option if userspace will
+ *     implement an MPM which handles peer allocation and state.
  *
  * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number
+ *
  * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use
  */
 enum nl80211_mesh_setup_params {
@@ -2214,6 +2648,8 @@ enum nl80211_mesh_setup_params {
        NL80211_MESH_SETUP_IE,
        NL80211_MESH_SETUP_USERSPACE_AUTH,
        NL80211_MESH_SETUP_USERSPACE_AMPE,
+       NL80211_MESH_SETUP_ENABLE_VENDOR_SYNC,
+       NL80211_MESH_SETUP_USERSPACE_MPM,
 
        /* keep last */
        __NL80211_MESH_SETUP_ATTR_AFTER_LAST,
@@ -2223,7 +2659,7 @@ enum nl80211_mesh_setup_params {
 /**
  * enum nl80211_txq_attr - TX queue parameter attributes
  * @__NL80211_TXQ_ATTR_INVALID: Attribute number 0 is reserved
- * @NL80211_TXQ_ATTR_QUEUE: TX queue identifier (NL80211_TXQ_Q_*)
+ * @NL80211_TXQ_ATTR_AC: AC identifier (NL80211_AC_*)
  * @NL80211_TXQ_ATTR_TXOP: Maximum burst time in units of 32 usecs, 0 meaning
  *     disabled
  * @NL80211_TXQ_ATTR_CWMIN: Minimum contention window [a value of the form
@@ -2236,7 +2672,7 @@ enum nl80211_mesh_setup_params {
  */
 enum nl80211_txq_attr {
        __NL80211_TXQ_ATTR_INVALID,
-       NL80211_TXQ_ATTR_QUEUE,
+       NL80211_TXQ_ATTR_AC,
        NL80211_TXQ_ATTR_TXOP,
        NL80211_TXQ_ATTR_CWMIN,
        NL80211_TXQ_ATTR_CWMAX,
@@ -2247,13 +2683,30 @@ enum nl80211_txq_attr {
        NL80211_TXQ_ATTR_MAX = __NL80211_TXQ_ATTR_AFTER_LAST - 1
 };
 
-enum nl80211_txq_q {
-       NL80211_TXQ_Q_VO,
-       NL80211_TXQ_Q_VI,
-       NL80211_TXQ_Q_BE,
-       NL80211_TXQ_Q_BK
+enum nl80211_ac {
+       NL80211_AC_VO,
+       NL80211_AC_VI,
+       NL80211_AC_BE,
+       NL80211_AC_BK,
+       NL80211_NUM_ACS
 };
 
+/* backward compat */
+#define NL80211_TXQ_ATTR_QUEUE NL80211_TXQ_ATTR_AC
+#define NL80211_TXQ_Q_VO       NL80211_AC_VO
+#define NL80211_TXQ_Q_VI       NL80211_AC_VI
+#define NL80211_TXQ_Q_BE       NL80211_AC_BE
+#define NL80211_TXQ_Q_BK       NL80211_AC_BK
+
+/**
+ * enum nl80211_channel_type - channel type
+ * @NL80211_CHAN_NO_HT: 20 MHz, non-HT channel
+ * @NL80211_CHAN_HT20: 20 MHz HT channel
+ * @NL80211_CHAN_HT40MINUS: HT40 channel, secondary channel
+ *     below the control channel
+ * @NL80211_CHAN_HT40PLUS: HT40 channel, secondary channel
+ *     above the control channel
+ */
 enum nl80211_channel_type {
        NL80211_CHAN_NO_HT,
        NL80211_CHAN_HT20,
@@ -2262,6 +2715,32 @@ enum nl80211_channel_type {
 };
 
 /**
+ * enum nl80211_chan_width - channel width definitions
+ *
+ * These values are used with the %NL80211_ATTR_CHANNEL_WIDTH
+ * attribute.
+ *
+ * @NL80211_CHAN_WIDTH_20_NOHT: 20 MHz, non-HT channel
+ * @NL80211_CHAN_WIDTH_20: 20 MHz HT channel
+ * @NL80211_CHAN_WIDTH_40: 40 MHz channel, the %NL80211_ATTR_CENTER_FREQ1
+ *     attribute must be provided as well
+ * @NL80211_CHAN_WIDTH_80: 80 MHz channel, the %NL80211_ATTR_CENTER_FREQ1
+ *     attribute must be provided as well
+ * @NL80211_CHAN_WIDTH_80P80: 80+80 MHz channel, the %NL80211_ATTR_CENTER_FREQ1
+ *     and %NL80211_ATTR_CENTER_FREQ2 attributes must be provided as well
+ * @NL80211_CHAN_WIDTH_160: 160 MHz channel, the %NL80211_ATTR_CENTER_FREQ1
+ *     attribute must be provided as well
+ */
+enum nl80211_chan_width {
+       NL80211_CHAN_WIDTH_20_NOHT,
+       NL80211_CHAN_WIDTH_20,
+       NL80211_CHAN_WIDTH_40,
+       NL80211_CHAN_WIDTH_80,
+       NL80211_CHAN_WIDTH_80P80,
+       NL80211_CHAN_WIDTH_160,
+};
+
+/**
  * enum nl80211_bss - netlink attributes for a BSS
  *
  * @__NL80211_BSS_INVALID: invalid
@@ -2329,6 +2808,7 @@ enum nl80211_bss_status {
  * @NL80211_AUTHTYPE_SHARED_KEY: Shared Key authentication (WEP only)
  * @NL80211_AUTHTYPE_FT: Fast BSS Transition (IEEE 802.11r)
  * @NL80211_AUTHTYPE_NETWORK_EAP: Network EAP (some Cisco APs and mainly LEAP)
+ * @NL80211_AUTHTYPE_SAE: Simultaneous authentication of equals
  * @__NL80211_AUTHTYPE_NUM: internal
  * @NL80211_AUTHTYPE_MAX: maximum valid auth algorithm
  * @NL80211_AUTHTYPE_AUTOMATIC: determine automatically (if necessary by
@@ -2340,6 +2820,7 @@ enum nl80211_auth_type {
        NL80211_AUTHTYPE_SHARED_KEY,
        NL80211_AUTHTYPE_FT,
        NL80211_AUTHTYPE_NETWORK_EAP,
+       NL80211_AUTHTYPE_SAE,
 
        /* keep last */
        __NL80211_AUTHTYPE_NUM,
@@ -2458,12 +2939,19 @@ enum nl80211_tx_rate_attributes {
  * enum nl80211_band - Frequency band
  * @NL80211_BAND_2GHZ: 2.4 GHz ISM band
  * @NL80211_BAND_5GHZ: around 5 GHz band (4.9 - 5.7 GHz)
+ * @NL80211_BAND_60GHZ: around 60 GHz band (58.32 - 64.80 GHz)
  */
 enum nl80211_band {
        NL80211_BAND_2GHZ,
        NL80211_BAND_5GHZ,
+       NL80211_BAND_60GHZ,
 };
 
+/**
+ * enum nl80211_ps_state - powersave state
+ * @NL80211_PS_DISABLED: powersave is disabled
+ * @NL80211_PS_ENABLED: powersave is enabled
+ */
 enum nl80211_ps_state {
        NL80211_PS_DISABLED,
        NL80211_PS_ENABLED,
@@ -2481,6 +2969,17 @@ enum nl80211_ps_state {
  * @NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT: RSSI threshold event
  * @NL80211_ATTR_CQM_PKT_LOSS_EVENT: a u32 value indicating that this many
  *     consecutive packets were not acknowledged by the peer
+ * @NL80211_ATTR_CQM_TXE_RATE: TX error rate in %. Minimum % of TX failures
+ *     during the given %NL80211_ATTR_CQM_TXE_INTVL before an
+ *     %NL80211_CMD_NOTIFY_CQM with reported %NL80211_ATTR_CQM_TXE_RATE and
+ *     %NL80211_ATTR_CQM_TXE_PKTS is generated.
+ * @NL80211_ATTR_CQM_TXE_PKTS: number of attempted packets in a given
+ *     %NL80211_ATTR_CQM_TXE_INTVL before %NL80211_ATTR_CQM_TXE_RATE is
+ *     checked.
+ * @NL80211_ATTR_CQM_TXE_INTVL: interval in seconds. Specifies the periodic
+ *     interval in which %NL80211_ATTR_CQM_TXE_PKTS and
+ *     %NL80211_ATTR_CQM_TXE_RATE must be satisfied before generating an
+ *     %NL80211_CMD_NOTIFY_CQM. Set to 0 to turn off TX error reporting.
  * @__NL80211_ATTR_CQM_AFTER_LAST: internal
  * @NL80211_ATTR_CQM_MAX: highest key attribute
  */
@@ -2490,6 +2989,9 @@ enum nl80211_attr_cqm {
        NL80211_ATTR_CQM_RSSI_HYST,
        NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT,
        NL80211_ATTR_CQM_PKT_LOSS_EVENT,
+       NL80211_ATTR_CQM_TXE_RATE,
+       NL80211_ATTR_CQM_TXE_PKTS,
+       NL80211_ATTR_CQM_TXE_INTVL,
 
        /* keep last */
        __NL80211_ATTR_CQM_AFTER_LAST,
@@ -2502,10 +3004,14 @@ enum nl80211_attr_cqm {
  *      configured threshold
  * @NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH: The RSSI is higher than the
  *      configured threshold
+ * @NL80211_CQM_RSSI_BEACON_LOSS_EVENT: The device experienced beacon loss.
+ *     (Note that deauth/disassoc will still follow if the AP is not
+ *     available. This event might get used as roaming event, etc.)
  */
 enum nl80211_cqm_rssi_threshold_event {
        NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW,
        NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH,
+       NL80211_CQM_RSSI_BEACON_LOSS_EVENT,
 };
 
 
@@ -2533,10 +3039,12 @@ enum nl80211_tx_power_setting {
  *     corresponds to the lowest-order bit in the second byte of the mask.
  *     For example: The match 00:xx:00:00:xx:00:00:00:00:xx:xx:xx (where
  *     xx indicates "don't care") would be represented by a pattern of
- *     twelve zero bytes, and a mask of "0xed,0x07".
+ *     twelve zero bytes, and a mask of "0xed,0x01".
  *     Note that the pattern matching is done as though frames were not
  *     802.11 frames but 802.3 frames, i.e. the frame is fully unpacked
  *     first (including SNAP header unpacking) and then matched.
+ * @NL80211_WOWLAN_PKTPAT_OFFSET: packet offset, pattern is matched after
+ *     these fixed number of bytes of received packet
  * @NUM_NL80211_WOWLAN_PKTPAT: number of attributes
  * @MAX_NL80211_WOWLAN_PKTPAT: max attribute number
  */
@@ -2544,6 +3052,7 @@ enum nl80211_wowlan_packet_pattern_attr {
        __NL80211_WOWLAN_PKTPAT_INVALID,
        NL80211_WOWLAN_PKTPAT_MASK,
        NL80211_WOWLAN_PKTPAT_PATTERN,
+       NL80211_WOWLAN_PKTPAT_OFFSET,
 
        NUM_NL80211_WOWLAN_PKTPAT,
        MAX_NL80211_WOWLAN_PKTPAT = NUM_NL80211_WOWLAN_PKTPAT - 1,
@@ -2554,6 +3063,7 @@ enum nl80211_wowlan_packet_pattern_attr {
  * @max_patterns: maximum number of patterns supported
  * @min_pattern_len: minimum length of each pattern
  * @max_pattern_len: maximum length of each pattern
+ * @max_pkt_offset: maximum Rx packet offset
  *
  * This struct is carried in %NL80211_WOWLAN_TRIG_PKT_PATTERN when
  * that is part of %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED in the
@@ -2563,6 +3073,7 @@ struct nl80211_wowlan_pattern_support {
        __u32 max_patterns;
        __u32 min_pattern_len;
        __u32 max_pattern_len;
+       __u32 max_pkt_offset;
 } __attribute__((packed));
 
 /**
@@ -2578,12 +3089,17 @@ struct nl80211_wowlan_pattern_support {
  * @NL80211_WOWLAN_TRIG_PKT_PATTERN: wake up on the specified packet patterns
  *     which are passed in an array of nested attributes, each nested attribute
  *     defining a with attributes from &struct nl80211_wowlan_trig_pkt_pattern.
- *     Each pattern defines a wakeup packet. The matching is done on the MSDU,
- *     i.e. as though the packet was an 802.3 packet, so the pattern matching
- *     is done after the packet is converted to the MSDU.
+ *     Each pattern defines a wakeup packet. Packet offset is associated with
+ *     each pattern which is used while matching the pattern. The matching is
+ *     done on the MSDU, i.e. as though the packet was an 802.3 packet, so the
+ *     pattern matching is done after the packet is converted to the MSDU.
  *
  *     In %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED, it is a binary attribute
  *     carrying a &struct nl80211_wowlan_pattern_support.
+ *
+ *     When reporting wakeup. it is a u32 attribute containing the 0-based
+ *     index of the pattern that caused the wakeup, in the patterns passed
+ *     to the kernel when configuring.
  * @NL80211_WOWLAN_TRIG_GTK_REKEY_SUPPORTED: Not a real trigger, and cannot be
  *     used when setting, used only to indicate that GTK rekeying is supported
  *     by the device (flag)
@@ -2594,8 +3110,36 @@ struct nl80211_wowlan_pattern_support {
  * @NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE: wake up on 4-way handshake (flag)
  * @NL80211_WOWLAN_TRIG_RFKILL_RELEASE: wake up when rfkill is released
  *     (on devices that have rfkill in the device) (flag)
+ * @NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211: For wakeup reporting only, contains
+ *     the 802.11 packet that caused the wakeup, e.g. a deauth frame. The frame
+ *     may be truncated, the @NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN
+ *     attribute contains the original length.
+ * @NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN: Original length of the 802.11
+ *     packet, may be bigger than the @NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211
+ *     attribute if the packet was truncated somewhere.
+ * @NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023: For wakeup reporting only, contains the
+ *     802.11 packet that caused the wakeup, e.g. a magic packet. The frame may
+ *     be truncated, the @NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023_LEN attribute
+ *     contains the original length.
+ * @NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023_LEN: Original length of the 802.3
+ *     packet, may be bigger than the @NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023
+ *     attribute if the packet was truncated somewhere.
+ * @NL80211_WOWLAN_TRIG_TCP_CONNECTION: TCP connection wake, see DOC section
+ *     "TCP connection wakeup" for more details. This is a nested attribute
+ *     containing the exact information for establishing and keeping alive
+ *     the TCP connection.
+ * @NL80211_WOWLAN_TRIG_TCP_WAKEUP_MATCH: For wakeup reporting only, the
+ *     wakeup packet was received on the TCP connection
+ * @NL80211_WOWLAN_TRIG_WAKEUP_TCP_CONNLOST: For wakeup reporting only, the
+ *     TCP connection was lost or failed to be established
+ * @NL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS: For wakeup reporting only,
+ *     the TCP connection ran out of tokens to use for data to send to the
+ *     service
  * @NUM_NL80211_WOWLAN_TRIG: number of wake on wireless triggers
  * @MAX_NL80211_WOWLAN_TRIG: highest wowlan trigger attribute number
+ *
+ * These nested attributes are used to configure the wakeup triggers and
+ * to report the wakeup reason(s).
  */
 enum nl80211_wowlan_triggers {
        __NL80211_WOWLAN_TRIG_INVALID,
@@ -2608,6 +3152,14 @@ enum nl80211_wowlan_triggers {
        NL80211_WOWLAN_TRIG_EAP_IDENT_REQUEST,
        NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE,
        NL80211_WOWLAN_TRIG_RFKILL_RELEASE,
+       NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211,
+       NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN,
+       NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023,
+       NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023_LEN,
+       NL80211_WOWLAN_TRIG_TCP_CONNECTION,
+       NL80211_WOWLAN_TRIG_WAKEUP_TCP_MATCH,
+       NL80211_WOWLAN_TRIG_WAKEUP_TCP_CONNLOST,
+       NL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS,
 
        /* keep last */
        NUM_NL80211_WOWLAN_TRIG,
@@ -2615,6 +3167,116 @@ enum nl80211_wowlan_triggers {
 };
 
 /**
+ * DOC: TCP connection wakeup
+ *
+ * Some devices can establish a TCP connection in order to be woken up by a
+ * packet coming in from outside their network segment, or behind NAT. If
+ * configured, the device will establish a TCP connection to the given
+ * service, and periodically send data to that service. The first data
+ * packet is usually transmitted after SYN/ACK, also ACKing the SYN/ACK.
+ * The data packets can optionally include a (little endian) sequence
+ * number (in the TCP payload!) that is generated by the device, and, also
+ * optionally, a token from a list of tokens. This serves as a keep-alive
+ * with the service, and for NATed connections, etc.
+ *
+ * During this keep-alive period, the server doesn't send any data to the
+ * client. When receiving data, it is compared against the wakeup pattern
+ * (and mask) and if it matches, the host is woken up. Similarly, if the
+ * connection breaks or cannot be established to start with, the host is
+ * also woken up.
+ *
+ * Developer's note: ARP offload is required for this, otherwise TCP
+ * response packets might not go through correctly.
+ */
+
+/**
+ * struct nl80211_wowlan_tcp_data_seq - WoWLAN TCP data sequence
+ * @start: starting value
+ * @offset: offset of sequence number in packet
+ * @len: length of the sequence value to write, 1 through 4
+ *
+ * Note: don't confuse with the TCP sequence number(s), this is for the
+ * keepalive packet payload. The actual value is written into the packet
+ * in little endian.
+ */
+struct nl80211_wowlan_tcp_data_seq {
+       __u32 start, offset, len;
+};
+
+/**
+ * struct nl80211_wowlan_tcp_data_token - WoWLAN TCP data token config
+ * @offset: offset of token in packet
+ * @len: length of each token
+ * @token_stream: stream of data to be used for the tokens, the length must
+ *     be a multiple of @len for this to make sense
+ */
+struct nl80211_wowlan_tcp_data_token {
+       __u32 offset, len;
+       __u8 token_stream[];
+};
+
+/**
+ * struct nl80211_wowlan_tcp_data_token_feature - data token features
+ * @min_len: minimum token length
+ * @max_len: maximum token length
+ * @bufsize: total available token buffer size (max size of @token_stream)
+ */
+struct nl80211_wowlan_tcp_data_token_feature {
+       __u32 min_len, max_len, bufsize;
+};
+
+/**
+ * enum nl80211_wowlan_tcp_attrs - WoWLAN TCP connection parameters
+ * @__NL80211_WOWLAN_TCP_INVALID: invalid number for nested attributes
+ * @NL80211_WOWLAN_TCP_SRC_IPV4: source IPv4 address (in network byte order)
+ * @NL80211_WOWLAN_TCP_DST_IPV4: destination IPv4 address
+ *     (in network byte order)
+ * @NL80211_WOWLAN_TCP_DST_MAC: destination MAC address, this is given because
+ *     route lookup when configured might be invalid by the time we suspend,
+ *     and doing a route lookup when suspending is no longer possible as it
+ *     might require ARP querying.
+ * @NL80211_WOWLAN_TCP_SRC_PORT: source port (u16); optional, if not given a
+ *     socket and port will be allocated
+ * @NL80211_WOWLAN_TCP_DST_PORT: destination port (u16)
+ * @NL80211_WOWLAN_TCP_DATA_PAYLOAD: data packet payload, at least one byte.
+ *     For feature advertising, a u32 attribute holding the maximum length
+ *     of the data payload.
+ * @NL80211_WOWLAN_TCP_DATA_PAYLOAD_SEQ: data packet sequence configuration
+ *     (if desired), a &struct nl80211_wowlan_tcp_data_seq. For feature
+ *     advertising it is just a flag
+ * @NL80211_WOWLAN_TCP_DATA_PAYLOAD_TOKEN: data packet token configuration,
+ *     see &struct nl80211_wowlan_tcp_data_token and for advertising see
+ *     &struct nl80211_wowlan_tcp_data_token_feature.
+ * @NL80211_WOWLAN_TCP_DATA_INTERVAL: data interval in seconds, maximum
+ *     interval in feature advertising (u32)
+ * @NL80211_WOWLAN_TCP_WAKE_PAYLOAD: wake packet payload, for advertising a
+ *     u32 attribute holding the maximum length
+ * @NL80211_WOWLAN_TCP_WAKE_MASK: Wake packet payload mask, not used for
+ *     feature advertising. The mask works like @NL80211_WOWLAN_PKTPAT_MASK
+ *     but on the TCP payload only.
+ * @NUM_NL80211_WOWLAN_TCP: number of TCP attributes
+ * @MAX_NL80211_WOWLAN_TCP: highest attribute number
+ */
+enum nl80211_wowlan_tcp_attrs {
+       __NL80211_WOWLAN_TCP_INVALID,
+       NL80211_WOWLAN_TCP_SRC_IPV4,
+       NL80211_WOWLAN_TCP_DST_IPV4,
+       NL80211_WOWLAN_TCP_DST_MAC,
+       NL80211_WOWLAN_TCP_SRC_PORT,
+       NL80211_WOWLAN_TCP_DST_PORT,
+       NL80211_WOWLAN_TCP_DATA_PAYLOAD,
+       NL80211_WOWLAN_TCP_DATA_PAYLOAD_SEQ,
+       NL80211_WOWLAN_TCP_DATA_PAYLOAD_TOKEN,
+       NL80211_WOWLAN_TCP_DATA_INTERVAL,
+       NL80211_WOWLAN_TCP_WAKE_PAYLOAD,
+       NL80211_WOWLAN_TCP_WAKE_MASK,
+
+       /* keep last */
+       NUM_NL80211_WOWLAN_TCP,
+       MAX_NL80211_WOWLAN_TCP = NUM_NL80211_WOWLAN_TCP - 1
+};
+
+/**
  * enum nl80211_iface_limit_attrs - limit attributes
  * @NL80211_IFACE_LIMIT_UNSPEC: (reserved)
  * @NL80211_IFACE_LIMIT_MAX: maximum number of interfaces that
@@ -2650,6 +3312,8 @@ enum nl80211_iface_limit_attrs {
  *     the infrastructure network's beacon interval.
  * @NL80211_IFACE_COMB_NUM_CHANNELS: u32 attribute specifying how many
  *     different channels may be used within this group.
+ * @NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS: u32 attribute containing the bitmap
+ *     of supported channel widths for radar detection.
  * @NUM_NL80211_IFACE_COMB: number of attributes
  * @MAX_NL80211_IFACE_COMB: highest attribute number
  *
@@ -2682,6 +3346,7 @@ enum nl80211_if_combination_attrs {
        NL80211_IFACE_COMB_MAXNUM,
        NL80211_IFACE_COMB_STA_AP_BI_MATCH,
        NL80211_IFACE_COMB_NUM_CHANNELS,
+       NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS,
 
        /* keep last */
        NUM_NL80211_IFACE_COMB,
@@ -2721,6 +3386,23 @@ enum nl80211_plink_state {
        MAX_NL80211_PLINK_STATES = NUM_NL80211_PLINK_STATES - 1
 };
 
+/**
+ * enum nl80211_plink_action - actions to perform in mesh peers
+ *
+ * @NL80211_PLINK_ACTION_NO_ACTION: perform no action
+ * @NL80211_PLINK_ACTION_OPEN: start mesh peer link establishment
+ * @NL80211_PLINK_ACTION_BLOCK: block traffic from this mesh peer
+ * @NUM_NL80211_PLINK_ACTIONS: number of possible actions
+ */
+enum plink_actions {
+       NL80211_PLINK_ACTION_NO_ACTION,
+       NL80211_PLINK_ACTION_OPEN,
+       NL80211_PLINK_ACTION_BLOCK,
+
+       NUM_NL80211_PLINK_ACTIONS,
+};
+
+
 #define NL80211_KCK_LEN                        16
 #define NL80211_KEK_LEN                        16
 #define NL80211_REPLAY_CTR_LEN         8
@@ -2835,11 +3517,64 @@ enum nl80211_ap_sme_features {
  * @NL80211_FEATURE_HT_IBSS: This driver supports IBSS with HT datarates.
  * @NL80211_FEATURE_INACTIVITY_TIMER: This driver takes care of freeing up
  *     the connected inactive stations in AP mode.
+ * @NL80211_FEATURE_CELL_BASE_REG_HINTS: This driver has been tested
+ *     to work properly to suppport receiving regulatory hints from
+ *     cellular base stations.
+ * @NL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL: If this is set, an active
+ *     P2P Device (%NL80211_IFTYPE_P2P_DEVICE) requires its own channel
+ *     in the interface combinations, even when it's only used for scan
+ *     and remain-on-channel. This could be due to, for example, the
+ *     remain-on-channel implementation requiring a channel context.
+ * @NL80211_FEATURE_SAE: This driver supports simultaneous authentication of
+ *     equals (SAE) with user space SME (NL80211_CMD_AUTHENTICATE) in station
+ *     mode
+ * @NL80211_FEATURE_LOW_PRIORITY_SCAN: This driver supports low priority scan
+ * @NL80211_FEATURE_SCAN_FLUSH: Scan flush is supported
+ * @NL80211_FEATURE_AP_SCAN: Support scanning using an AP vif
+ * @NL80211_FEATURE_VIF_TXPOWER: The driver supports per-vif TX power setting
+ * @NL80211_FEATURE_NEED_OBSS_SCAN: The driver expects userspace to perform
+ *     OBSS scans and generate 20/40 BSS coex reports. This flag is used only
+ *     for drivers implementing the CONNECT API, for AUTH/ASSOC it is implied.
+ * @NL80211_FEATURE_P2P_GO_CTWIN: P2P GO implementation supports CT Window
+ *     setting
+ * @NL80211_FEATURE_P2P_GO_OPPPS: P2P GO implementation supports opportunistic
+ *     powersave
+ * @NL80211_FEATURE_FULL_AP_CLIENT_STATE: The driver supports full state
+ *     transitions for AP clients. Without this flag (and if the driver
+ *     doesn't have the AP SME in the device) the driver supports adding
+ *     stations only when they're associated and adds them in associated
+ *     state (to later be transitioned into authorized), with this flag
+ *     they should be added before even sending the authentication reply
+ *     and then transitioned into authenticated, associated and authorized
+ *     states using station flags.
+ *     Note that even for drivers that support this, the default is to add
+ *     stations in authenticated/associated state, so to add unauthenticated
+ *     stations the authenticated/associated bits have to be set in the mask.
+ * @NL80211_FEATURE_ADVERTISE_CHAN_LIMITS: cfg80211 advertises channel limits
+ *     (HT40, VHT 80/160 MHz) if this flag is set
+ * @NL80211_FEATURE_USERSPACE_MPM: This driver supports a userspace Mesh
+ *     Peering Management entity which may be implemented by registering for
+ *     beacons or NL80211_CMD_NEW_PEER_CANDIDATE events. The mesh beacon is
+ *     still generated by the driver.
  */
 enum nl80211_feature_flags {
-       NL80211_FEATURE_SK_TX_STATUS    = 1 << 0,
-       NL80211_FEATURE_HT_IBSS         = 1 << 1,
-       NL80211_FEATURE_INACTIVITY_TIMER = 1 << 2,
+       NL80211_FEATURE_SK_TX_STATUS                    = 1 << 0,
+       NL80211_FEATURE_HT_IBSS                         = 1 << 1,
+       NL80211_FEATURE_INACTIVITY_TIMER                = 1 << 2,
+       NL80211_FEATURE_CELL_BASE_REG_HINTS             = 1 << 3,
+       NL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL        = 1 << 4,
+       NL80211_FEATURE_SAE                             = 1 << 5,
+       NL80211_FEATURE_LOW_PRIORITY_SCAN               = 1 << 6,
+       NL80211_FEATURE_SCAN_FLUSH                      = 1 << 7,
+       NL80211_FEATURE_AP_SCAN                         = 1 << 8,
+       NL80211_FEATURE_VIF_TXPOWER                     = 1 << 9,
+       NL80211_FEATURE_NEED_OBSS_SCAN                  = 1 << 10,
+       NL80211_FEATURE_P2P_GO_CTWIN                    = 1 << 11,
+       NL80211_FEATURE_P2P_GO_OPPPS                    = 1 << 12,
+       /* bit 13 is reserved */
+       NL80211_FEATURE_ADVERTISE_CHAN_LIMITS           = 1 << 14,
+       NL80211_FEATURE_FULL_AP_CLIENT_STATE            = 1 << 15,
+       NL80211_FEATURE_USERSPACE_MPM                   = 1 << 16,
 };
 
 /**
@@ -2863,4 +3598,127 @@ enum nl80211_probe_resp_offload_support_attr {
        NL80211_PROBE_RESP_OFFLOAD_SUPPORT_80211U =     1<<3,
 };
 
+/**
+ * enum nl80211_connect_failed_reason - connection request failed reasons
+ * @NL80211_CONN_FAIL_MAX_CLIENTS: Maximum number of clients that can be
+ *     handled by the AP is reached.
+ * @NL80211_CONN_FAIL_BLOCKED_CLIENT: Connection request is rejected due to ACL.
+ */
+enum nl80211_connect_failed_reason {
+       NL80211_CONN_FAIL_MAX_CLIENTS,
+       NL80211_CONN_FAIL_BLOCKED_CLIENT,
+};
+
+/**
+ * enum nl80211_scan_flags -  scan request control flags
+ *
+ * Scan request control flags are used to control the handling
+ * of NL80211_CMD_TRIGGER_SCAN and NL80211_CMD_START_SCHED_SCAN
+ * requests.
+ *
+ * @NL80211_SCAN_FLAG_LOW_PRIORITY: scan request has low priority
+ * @NL80211_SCAN_FLAG_FLUSH: flush cache before scanning
+ * @NL80211_SCAN_FLAG_AP: force a scan even if the interface is configured
+ *     as AP and the beaconing has already been configured. This attribute is
+ *     dangerous because will destroy stations performance as a lot of frames
+ *     will be lost while scanning off-channel, therefore it must be used only
+ *     when really needed
+ */
+enum nl80211_scan_flags {
+       NL80211_SCAN_FLAG_LOW_PRIORITY                  = 1<<0,
+       NL80211_SCAN_FLAG_FLUSH                         = 1<<1,
+       NL80211_SCAN_FLAG_AP                            = 1<<2,
+};
+
+/**
+ * enum nl80211_acl_policy - access control policy
+ *
+ * Access control policy is applied on a MAC list set by
+ * %NL80211_CMD_START_AP and %NL80211_CMD_SET_MAC_ACL, to
+ * be used with %NL80211_ATTR_ACL_POLICY.
+ *
+ * @NL80211_ACL_POLICY_ACCEPT_UNLESS_LISTED: Deny stations which are
+ *     listed in ACL, i.e. allow all the stations which are not listed
+ *     in ACL to authenticate.
+ * @NL80211_ACL_POLICY_DENY_UNLESS_LISTED: Allow the stations which are listed
+ *     in ACL, i.e. deny all the stations which are not listed in ACL.
+ */
+enum nl80211_acl_policy {
+       NL80211_ACL_POLICY_ACCEPT_UNLESS_LISTED,
+       NL80211_ACL_POLICY_DENY_UNLESS_LISTED,
+};
+
+/**
+ * enum nl80211_radar_event - type of radar event for DFS operation
+ *
+ * Type of event to be used with NL80211_ATTR_RADAR_EVENT to inform userspace
+ * about detected radars or success of the channel available check (CAC)
+ *
+ * @NL80211_RADAR_DETECTED: A radar pattern has been detected. The channel is
+ *     now unusable.
+ * @NL80211_RADAR_CAC_FINISHED: Channel Availability Check has been finished,
+ *     the channel is now available.
+ * @NL80211_RADAR_CAC_ABORTED: Channel Availability Check has been aborted, no
+ *     change to the channel status.
+ * @NL80211_RADAR_NOP_FINISHED: The Non-Occupancy Period for this channel is
+ *     over, channel becomes usable.
+ */
+enum nl80211_radar_event {
+       NL80211_RADAR_DETECTED,
+       NL80211_RADAR_CAC_FINISHED,
+       NL80211_RADAR_CAC_ABORTED,
+       NL80211_RADAR_NOP_FINISHED,
+};
+
+/**
+ * enum nl80211_dfs_state - DFS states for channels
+ *
+ * Channel states used by the DFS code.
+ *
+ * @IEEE80211_DFS_USABLE: The channel can be used, but channel availability
+ *     check (CAC) must be performed before using it for AP or IBSS.
+ * @IEEE80211_DFS_UNAVAILABLE: A radar has been detected on this channel, it
+ *     is therefore marked as not available.
+ * @IEEE80211_DFS_AVAILABLE: The channel has been CAC checked and is available.
+ */
+
+enum nl80211_dfs_state {
+       NL80211_DFS_USABLE,
+       NL80211_DFS_UNAVAILABLE,
+       NL80211_DFS_AVAILABLE,
+};
+
+/**
+ * enum enum nl80211_protocol_features - nl80211 protocol features
+ * @NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP: nl80211 supports splitting
+ *     wiphy dumps (if requested by the application with the attribute
+ *     %NL80211_ATTR_SPLIT_WIPHY_DUMP. Also supported is filtering the
+ *     wiphy dump by %NL80211_ATTR_WIPHY, %NL80211_ATTR_IFINDEX or
+ *     %NL80211_ATTR_WDEV.
+ */
+enum nl80211_protocol_features {
+       NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP =     1 << 0,
+};
+
+/**
+ * enum nl80211_crit_proto_id - nl80211 critical protocol identifiers
+ *
+ * @NL80211_CRIT_PROTO_UNSPEC: protocol unspecified.
+ * @NL80211_CRIT_PROTO_DHCP: BOOTP or DHCPv6 protocol.
+ * @NL80211_CRIT_PROTO_EAPOL: EAPOL protocol.
+ * @NL80211_CRIT_PROTO_APIPA: APIPA protocol.
+ * @NUM_NL80211_CRIT_PROTO: must be kept last.
+ */
+enum nl80211_crit_proto_id {
+       NL80211_CRIT_PROTO_UNSPEC,
+       NL80211_CRIT_PROTO_DHCP,
+       NL80211_CRIT_PROTO_EAPOL,
+       NL80211_CRIT_PROTO_APIPA,
+       /* add other protocols before this one */
+       NUM_NL80211_CRIT_PROTO
+};
+
+/* maximum duration for critical protocol measures */
+#define NL80211_CRIT_PROTO_MAX_DURATION                5000 /* msec */
+
 #endif /* __LINUX_NL80211_H */
index fbaa10e..a05d28a 100644 (file)
@@ -13,4 +13,4 @@
 #define NVRAM_OFFSET(x)   ((x)-NVRAM_FIRST_BYTE)
 
 
-#endif  /* _LINUX_NVRAM_H */
+#endif /* _LINUX_NVRAM_H */
index 5be9135..cb3e8a5 100644 (file)
@@ -28,6 +28,7 @@
 #define OMAP3_ISP_USER_H
 
 #include <linux/types.h>
+#include <linux/videodev2.h>
 
 /*
  * Private IOCTLs
@@ -427,7 +428,7 @@ struct omap3isp_ccdc_update_config {
 #define OMAP3ISP_PREV_COLOR_CONV       (1 << 8)
 #define OMAP3ISP_PREV_YC_LIMIT         (1 << 9)
 #define OMAP3ISP_PREV_DEFECT_COR       (1 << 10)
-#define OMAP3ISP_PREV_GAMMABYPASS      (1 << 11)
+/* Bit 11 was OMAP3ISP_PREV_GAMMABYPASS, now merged with OMAP3ISP_PREV_GAMMA */
 #define OMAP3ISP_PREV_DRK_FRM_CAPTURE  (1 << 12)
 #define OMAP3ISP_PREV_DRK_FRM_SUBTRACT (1 << 13)
 #define OMAP3ISP_PREV_LENS_SHADING     (1 << 14)
@@ -436,6 +437,7 @@ struct omap3isp_ccdc_update_config {
 
 #define OMAP3ISP_PREV_NF_TBL_SIZE      64
 #define OMAP3ISP_PREV_CFA_TBL_SIZE     576
+#define OMAP3ISP_PREV_CFA_BLK_SIZE     (OMAP3ISP_PREV_CFA_TBL_SIZE / 4)
 #define OMAP3ISP_PREV_GAMMA_TBL_SIZE   1024
 #define OMAP3ISP_PREV_YENH_TBL_SIZE    128
 
@@ -477,7 +479,7 @@ struct omap3isp_prev_cfa {
        enum omap3isp_cfa_fmt format;
        __u8 gradthrs_vert;
        __u8 gradthrs_horz;
-       __u32 table[OMAP3ISP_PREV_CFA_TBL_SIZE];
+       __u32 table[4][OMAP3ISP_PREV_CFA_BLK_SIZE];
 };
 
 /**
index 133d589..9563f61 100644 (file)
@@ -219,4 +219,4 @@ struct omapfb_display_info {
 };
 
 
-#endif /* __OMAPFB_H */
+#endif /* __LINUX_OMAPFB_H__ */
index 816ddd3..ca6c46e 100644 (file)
@@ -2,21 +2,19 @@
 #define __INCLUDE_LINUX_OOM_H
 
 /*
- * /proc/<pid>/oom_adj is deprecated, see
- * Documentation/feature-removal-schedule.txt.
- *
- * /proc/<pid>/oom_adj set to -17 protects from the oom-killer
- */
-#define OOM_DISABLE (-17)
-/* inclusive */
-#define OOM_ADJUST_MIN (-16)
-#define OOM_ADJUST_MAX 15
-
-/*
  * /proc/<pid>/oom_score_adj set to OOM_SCORE_ADJ_MIN disables oom killing for
  * pid.
  */
 #define OOM_SCORE_ADJ_MIN      (-1000)
 #define OOM_SCORE_ADJ_MAX      1000
 
-#endif /* _INCLUDE_LINUX_OOM_H */
+/*
+ * /proc/<pid>/oom_adj set to -17 protects from the oom killer for legacy
+ * purposes.
+ */
+#define OOM_DISABLE (-17)
+/* inclusive */
+#define OOM_ADJUST_MIN (-16)
+#define OOM_ADJUST_MAX 15
+
+#endif /* __INCLUDE_LINUX_OOM_H */
diff --git a/usr/include/linux/openvswitch.h b/usr/include/linux/openvswitch.h
new file mode 100644 (file)
index 0000000..156e812
--- /dev/null
@@ -0,0 +1,456 @@
+
+/*
+ * Copyright (c) 2007-2011 Nicira Networks.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License 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 __LINUX_OPENVSWITCH_H
+#define __LINUX_OPENVSWITCH_H 1
+
+#include <linux/types.h>
+#include <linux/if_ether.h>
+
+/**
+ * struct ovs_header - header for OVS Generic Netlink messages.
+ * @dp_ifindex: ifindex of local port for datapath (0 to make a request not
+ * specific to a datapath).
+ *
+ * Attributes following the header are specific to a particular OVS Generic
+ * Netlink family, but all of the OVS families use this header.
+ */
+
+struct ovs_header {
+       int dp_ifindex;
+};
+
+/* Datapaths. */
+
+#define OVS_DATAPATH_FAMILY  "ovs_datapath"
+#define OVS_DATAPATH_MCGROUP "ovs_datapath"
+#define OVS_DATAPATH_VERSION 0x1
+
+enum ovs_datapath_cmd {
+       OVS_DP_CMD_UNSPEC,
+       OVS_DP_CMD_NEW,
+       OVS_DP_CMD_DEL,
+       OVS_DP_CMD_GET,
+       OVS_DP_CMD_SET
+};
+
+/**
+ * enum ovs_datapath_attr - attributes for %OVS_DP_* commands.
+ * @OVS_DP_ATTR_NAME: Name of the network device that serves as the "local
+ * port".  This is the name of the network device whose dp_ifindex is given in
+ * the &struct ovs_header.  Always present in notifications.  Required in
+ * %OVS_DP_NEW requests.  May be used as an alternative to specifying
+ * dp_ifindex in other requests (with a dp_ifindex of 0).
+ * @OVS_DP_ATTR_UPCALL_PID: The Netlink socket in userspace that is initially
+ * set on the datapath port (for OVS_ACTION_ATTR_MISS).  Only valid on
+ * %OVS_DP_CMD_NEW requests. A value of zero indicates that upcalls should
+ * not be sent.
+ * @OVS_DP_ATTR_STATS: Statistics about packets that have passed through the
+ * datapath.  Always present in notifications.
+ *
+ * These attributes follow the &struct ovs_header within the Generic Netlink
+ * payload for %OVS_DP_* commands.
+ */
+enum ovs_datapath_attr {
+       OVS_DP_ATTR_UNSPEC,
+       OVS_DP_ATTR_NAME,       /* name of dp_ifindex netdev */
+       OVS_DP_ATTR_UPCALL_PID, /* Netlink PID to receive upcalls */
+       OVS_DP_ATTR_STATS,      /* struct ovs_dp_stats */
+       __OVS_DP_ATTR_MAX
+};
+
+#define OVS_DP_ATTR_MAX (__OVS_DP_ATTR_MAX - 1)
+
+struct ovs_dp_stats {
+       __u64 n_hit;             /* Number of flow table matches. */
+       __u64 n_missed;          /* Number of flow table misses. */
+       __u64 n_lost;            /* Number of misses not sent to userspace. */
+       __u64 n_flows;           /* Number of flows present */
+};
+
+struct ovs_vport_stats {
+       __u64   rx_packets;             /* total packets received       */
+       __u64   tx_packets;             /* total packets transmitted    */
+       __u64   rx_bytes;               /* total bytes received         */
+       __u64   tx_bytes;               /* total bytes transmitted      */
+       __u64   rx_errors;              /* bad packets received         */
+       __u64   tx_errors;              /* packet transmit problems     */
+       __u64   rx_dropped;             /* no space in linux buffers    */
+       __u64   tx_dropped;             /* no space available in linux  */
+};
+
+/* Fixed logical ports. */
+#define OVSP_LOCAL      ((__u32)0)
+
+/* Packet transfer. */
+
+#define OVS_PACKET_FAMILY "ovs_packet"
+#define OVS_PACKET_VERSION 0x1
+
+enum ovs_packet_cmd {
+       OVS_PACKET_CMD_UNSPEC,
+
+       /* Kernel-to-user notifications. */
+       OVS_PACKET_CMD_MISS,    /* Flow table miss. */
+       OVS_PACKET_CMD_ACTION,  /* OVS_ACTION_ATTR_USERSPACE action. */
+
+       /* Userspace commands. */
+       OVS_PACKET_CMD_EXECUTE  /* Apply actions to a packet. */
+};
+
+/**
+ * enum ovs_packet_attr - attributes for %OVS_PACKET_* commands.
+ * @OVS_PACKET_ATTR_PACKET: Present for all notifications.  Contains the entire
+ * packet as received, from the start of the Ethernet header onward.  For
+ * %OVS_PACKET_CMD_ACTION, %OVS_PACKET_ATTR_PACKET reflects changes made by
+ * actions preceding %OVS_ACTION_ATTR_USERSPACE, but %OVS_PACKET_ATTR_KEY is
+ * the flow key extracted from the packet as originally received.
+ * @OVS_PACKET_ATTR_KEY: Present for all notifications.  Contains the flow key
+ * extracted from the packet as nested %OVS_KEY_ATTR_* attributes.  This allows
+ * userspace to adapt its flow setup strategy by comparing its notion of the
+ * flow key against the kernel's.
+ * @OVS_PACKET_ATTR_ACTIONS: Contains actions for the packet.  Used
+ * for %OVS_PACKET_CMD_EXECUTE.  It has nested %OVS_ACTION_ATTR_* attributes.
+ * @OVS_PACKET_ATTR_USERDATA: Present for an %OVS_PACKET_CMD_ACTION
+ * notification if the %OVS_ACTION_ATTR_USERSPACE action specified an
+ * %OVS_USERSPACE_ATTR_USERDATA attribute, with the same length and content
+ * specified there.
+ *
+ * These attributes follow the &struct ovs_header within the Generic Netlink
+ * payload for %OVS_PACKET_* commands.
+ */
+enum ovs_packet_attr {
+       OVS_PACKET_ATTR_UNSPEC,
+       OVS_PACKET_ATTR_PACKET,      /* Packet data. */
+       OVS_PACKET_ATTR_KEY,         /* Nested OVS_KEY_ATTR_* attributes. */
+       OVS_PACKET_ATTR_ACTIONS,     /* Nested OVS_ACTION_ATTR_* attributes. */
+       OVS_PACKET_ATTR_USERDATA,    /* OVS_ACTION_ATTR_USERSPACE arg. */
+       __OVS_PACKET_ATTR_MAX
+};
+
+#define OVS_PACKET_ATTR_MAX (__OVS_PACKET_ATTR_MAX - 1)
+
+/* Virtual ports. */
+
+#define OVS_VPORT_FAMILY  "ovs_vport"
+#define OVS_VPORT_MCGROUP "ovs_vport"
+#define OVS_VPORT_VERSION 0x1
+
+enum ovs_vport_cmd {
+       OVS_VPORT_CMD_UNSPEC,
+       OVS_VPORT_CMD_NEW,
+       OVS_VPORT_CMD_DEL,
+       OVS_VPORT_CMD_GET,
+       OVS_VPORT_CMD_SET
+};
+
+enum ovs_vport_type {
+       OVS_VPORT_TYPE_UNSPEC,
+       OVS_VPORT_TYPE_NETDEV,   /* network device */
+       OVS_VPORT_TYPE_INTERNAL, /* network device implemented by datapath */
+       __OVS_VPORT_TYPE_MAX
+};
+
+#define OVS_VPORT_TYPE_MAX (__OVS_VPORT_TYPE_MAX - 1)
+
+/**
+ * enum ovs_vport_attr - attributes for %OVS_VPORT_* commands.
+ * @OVS_VPORT_ATTR_PORT_NO: 32-bit port number within datapath.
+ * @OVS_VPORT_ATTR_TYPE: 32-bit %OVS_VPORT_TYPE_* constant describing the type
+ * of vport.
+ * @OVS_VPORT_ATTR_NAME: Name of vport.  For a vport based on a network device
+ * this is the name of the network device.  Maximum length %IFNAMSIZ-1 bytes
+ * plus a null terminator.
+ * @OVS_VPORT_ATTR_OPTIONS: Vport-specific configuration information.
+ * @OVS_VPORT_ATTR_UPCALL_PID: The Netlink socket in userspace that
+ * OVS_PACKET_CMD_MISS upcalls will be directed to for packets received on
+ * this port.  A value of zero indicates that upcalls should not be sent.
+ * @OVS_VPORT_ATTR_STATS: A &struct ovs_vport_stats giving statistics for
+ * packets sent or received through the vport.
+ *
+ * These attributes follow the &struct ovs_header within the Generic Netlink
+ * payload for %OVS_VPORT_* commands.
+ *
+ * For %OVS_VPORT_CMD_NEW requests, the %OVS_VPORT_ATTR_TYPE and
+ * %OVS_VPORT_ATTR_NAME attributes are required.  %OVS_VPORT_ATTR_PORT_NO is
+ * optional; if not specified a free port number is automatically selected.
+ * Whether %OVS_VPORT_ATTR_OPTIONS is required or optional depends on the type
+ * of vport.
+ * and other attributes are ignored.
+ *
+ * For other requests, if %OVS_VPORT_ATTR_NAME is specified then it is used to
+ * look up the vport to operate on; otherwise dp_idx from the &struct
+ * ovs_header plus %OVS_VPORT_ATTR_PORT_NO determine the vport.
+ */
+enum ovs_vport_attr {
+       OVS_VPORT_ATTR_UNSPEC,
+       OVS_VPORT_ATTR_PORT_NO, /* u32 port number within datapath */
+       OVS_VPORT_ATTR_TYPE,    /* u32 OVS_VPORT_TYPE_* constant. */
+       OVS_VPORT_ATTR_NAME,    /* string name, up to IFNAMSIZ bytes long */
+       OVS_VPORT_ATTR_OPTIONS, /* nested attributes, varies by vport type */
+       OVS_VPORT_ATTR_UPCALL_PID, /* u32 Netlink PID to receive upcalls */
+       OVS_VPORT_ATTR_STATS,   /* struct ovs_vport_stats */
+       __OVS_VPORT_ATTR_MAX
+};
+
+#define OVS_VPORT_ATTR_MAX (__OVS_VPORT_ATTR_MAX - 1)
+
+/* Flows. */
+
+#define OVS_FLOW_FAMILY  "ovs_flow"
+#define OVS_FLOW_MCGROUP "ovs_flow"
+#define OVS_FLOW_VERSION 0x1
+
+enum ovs_flow_cmd {
+       OVS_FLOW_CMD_UNSPEC,
+       OVS_FLOW_CMD_NEW,
+       OVS_FLOW_CMD_DEL,
+       OVS_FLOW_CMD_GET,
+       OVS_FLOW_CMD_SET
+};
+
+struct ovs_flow_stats {
+       __u64 n_packets;         /* Number of matched packets. */
+       __u64 n_bytes;           /* Number of matched bytes. */
+};
+
+enum ovs_key_attr {
+       OVS_KEY_ATTR_UNSPEC,
+       OVS_KEY_ATTR_ENCAP,     /* Nested set of encapsulated attributes. */
+       OVS_KEY_ATTR_PRIORITY,  /* u32 skb->priority */
+       OVS_KEY_ATTR_IN_PORT,   /* u32 OVS dp port number */
+       OVS_KEY_ATTR_ETHERNET,  /* struct ovs_key_ethernet */
+       OVS_KEY_ATTR_VLAN,      /* be16 VLAN TCI */
+       OVS_KEY_ATTR_ETHERTYPE, /* be16 Ethernet type */
+       OVS_KEY_ATTR_IPV4,      /* struct ovs_key_ipv4 */
+       OVS_KEY_ATTR_IPV6,      /* struct ovs_key_ipv6 */
+       OVS_KEY_ATTR_TCP,       /* struct ovs_key_tcp */
+       OVS_KEY_ATTR_UDP,       /* struct ovs_key_udp */
+       OVS_KEY_ATTR_ICMP,      /* struct ovs_key_icmp */
+       OVS_KEY_ATTR_ICMPV6,    /* struct ovs_key_icmpv6 */
+       OVS_KEY_ATTR_ARP,       /* struct ovs_key_arp */
+       OVS_KEY_ATTR_ND,        /* struct ovs_key_nd */
+       OVS_KEY_ATTR_SKB_MARK,  /* u32 skb mark */
+       __OVS_KEY_ATTR_MAX
+};
+
+#define OVS_KEY_ATTR_MAX (__OVS_KEY_ATTR_MAX - 1)
+
+/**
+ * enum ovs_frag_type - IPv4 and IPv6 fragment type
+ * @OVS_FRAG_TYPE_NONE: Packet is not a fragment.
+ * @OVS_FRAG_TYPE_FIRST: Packet is a fragment with offset 0.
+ * @OVS_FRAG_TYPE_LATER: Packet is a fragment with nonzero offset.
+ *
+ * Used as the @ipv4_frag in &struct ovs_key_ipv4 and as @ipv6_frag &struct
+ * ovs_key_ipv6.
+ */
+enum ovs_frag_type {
+       OVS_FRAG_TYPE_NONE,
+       OVS_FRAG_TYPE_FIRST,
+       OVS_FRAG_TYPE_LATER,
+       __OVS_FRAG_TYPE_MAX
+};
+
+#define OVS_FRAG_TYPE_MAX (__OVS_FRAG_TYPE_MAX - 1)
+
+struct ovs_key_ethernet {
+       __u8     eth_src[ETH_ALEN];
+       __u8     eth_dst[ETH_ALEN];
+};
+
+struct ovs_key_ipv4 {
+       __be32 ipv4_src;
+       __be32 ipv4_dst;
+       __u8   ipv4_proto;
+       __u8   ipv4_tos;
+       __u8   ipv4_ttl;
+       __u8   ipv4_frag;       /* One of OVS_FRAG_TYPE_*. */
+};
+
+struct ovs_key_ipv6 {
+       __be32 ipv6_src[4];
+       __be32 ipv6_dst[4];
+       __be32 ipv6_label;      /* 20-bits in least-significant bits. */
+       __u8   ipv6_proto;
+       __u8   ipv6_tclass;
+       __u8   ipv6_hlimit;
+       __u8   ipv6_frag;       /* One of OVS_FRAG_TYPE_*. */
+};
+
+struct ovs_key_tcp {
+       __be16 tcp_src;
+       __be16 tcp_dst;
+};
+
+struct ovs_key_udp {
+       __be16 udp_src;
+       __be16 udp_dst;
+};
+
+struct ovs_key_icmp {
+       __u8 icmp_type;
+       __u8 icmp_code;
+};
+
+struct ovs_key_icmpv6 {
+       __u8 icmpv6_type;
+       __u8 icmpv6_code;
+};
+
+struct ovs_key_arp {
+       __be32 arp_sip;
+       __be32 arp_tip;
+       __be16 arp_op;
+       __u8   arp_sha[ETH_ALEN];
+       __u8   arp_tha[ETH_ALEN];
+};
+
+struct ovs_key_nd {
+       __u32 nd_target[4];
+       __u8  nd_sll[ETH_ALEN];
+       __u8  nd_tll[ETH_ALEN];
+};
+
+/**
+ * enum ovs_flow_attr - attributes for %OVS_FLOW_* commands.
+ * @OVS_FLOW_ATTR_KEY: Nested %OVS_KEY_ATTR_* attributes specifying the flow
+ * key.  Always present in notifications.  Required for all requests (except
+ * dumps).
+ * @OVS_FLOW_ATTR_ACTIONS: Nested %OVS_ACTION_ATTR_* attributes specifying
+ * the actions to take for packets that match the key.  Always present in
+ * notifications.  Required for %OVS_FLOW_CMD_NEW requests, optional for
+ * %OVS_FLOW_CMD_SET requests.
+ * @OVS_FLOW_ATTR_STATS: &struct ovs_flow_stats giving statistics for this
+ * flow.  Present in notifications if the stats would be nonzero.  Ignored in
+ * requests.
+ * @OVS_FLOW_ATTR_TCP_FLAGS: An 8-bit value giving the OR'd value of all of the
+ * TCP flags seen on packets in this flow.  Only present in notifications for
+ * TCP flows, and only if it would be nonzero.  Ignored in requests.
+ * @OVS_FLOW_ATTR_USED: A 64-bit integer giving the time, in milliseconds on
+ * the system monotonic clock, at which a packet was last processed for this
+ * flow.  Only present in notifications if a packet has been processed for this
+ * flow.  Ignored in requests.
+ * @OVS_FLOW_ATTR_CLEAR: If present in a %OVS_FLOW_CMD_SET request, clears the
+ * last-used time, accumulated TCP flags, and statistics for this flow.
+ * Otherwise ignored in requests.  Never present in notifications.
+ *
+ * These attributes follow the &struct ovs_header within the Generic Netlink
+ * payload for %OVS_FLOW_* commands.
+ */
+enum ovs_flow_attr {
+       OVS_FLOW_ATTR_UNSPEC,
+       OVS_FLOW_ATTR_KEY,       /* Sequence of OVS_KEY_ATTR_* attributes. */
+       OVS_FLOW_ATTR_ACTIONS,   /* Nested OVS_ACTION_ATTR_* attributes. */
+       OVS_FLOW_ATTR_STATS,     /* struct ovs_flow_stats. */
+       OVS_FLOW_ATTR_TCP_FLAGS, /* 8-bit OR'd TCP flags. */
+       OVS_FLOW_ATTR_USED,      /* u64 msecs last used in monotonic time. */
+       OVS_FLOW_ATTR_CLEAR,     /* Flag to clear stats, tcp_flags, used. */
+       __OVS_FLOW_ATTR_MAX
+};
+
+#define OVS_FLOW_ATTR_MAX (__OVS_FLOW_ATTR_MAX - 1)
+
+/**
+ * enum ovs_sample_attr - Attributes for %OVS_ACTION_ATTR_SAMPLE action.
+ * @OVS_SAMPLE_ATTR_PROBABILITY: 32-bit fraction of packets to sample with
+ * @OVS_ACTION_ATTR_SAMPLE.  A value of 0 samples no packets, a value of
+ * %UINT32_MAX samples all packets and intermediate values sample intermediate
+ * fractions of packets.
+ * @OVS_SAMPLE_ATTR_ACTIONS: Set of actions to execute in sampling event.
+ * Actions are passed as nested attributes.
+ *
+ * Executes the specified actions with the given probability on a per-packet
+ * basis.
+ */
+enum ovs_sample_attr {
+       OVS_SAMPLE_ATTR_UNSPEC,
+       OVS_SAMPLE_ATTR_PROBABILITY, /* u32 number */
+       OVS_SAMPLE_ATTR_ACTIONS,     /* Nested OVS_ACTION_ATTR_* attributes. */
+       __OVS_SAMPLE_ATTR_MAX,
+};
+
+#define OVS_SAMPLE_ATTR_MAX (__OVS_SAMPLE_ATTR_MAX - 1)
+
+/**
+ * enum ovs_userspace_attr - Attributes for %OVS_ACTION_ATTR_USERSPACE action.
+ * @OVS_USERSPACE_ATTR_PID: u32 Netlink PID to which the %OVS_PACKET_CMD_ACTION
+ * message should be sent.  Required.
+ * @OVS_USERSPACE_ATTR_USERDATA: If present, its variable-length argument is
+ * copied to the %OVS_PACKET_CMD_ACTION message as %OVS_PACKET_ATTR_USERDATA.
+ */
+enum ovs_userspace_attr {
+       OVS_USERSPACE_ATTR_UNSPEC,
+       OVS_USERSPACE_ATTR_PID,       /* u32 Netlink PID to receive upcalls. */
+       OVS_USERSPACE_ATTR_USERDATA,  /* Optional user-specified cookie. */
+       __OVS_USERSPACE_ATTR_MAX
+};
+
+#define OVS_USERSPACE_ATTR_MAX (__OVS_USERSPACE_ATTR_MAX - 1)
+
+/**
+ * struct ovs_action_push_vlan - %OVS_ACTION_ATTR_PUSH_VLAN action argument.
+ * @vlan_tpid: Tag protocol identifier (TPID) to push.
+ * @vlan_tci: Tag control identifier (TCI) to push.  The CFI bit must be set
+ * (but it will not be set in the 802.1Q header that is pushed).
+ *
+ * The @vlan_tpid value is typically %ETH_P_8021Q.  The only acceptable TPID
+ * values are those that the kernel module also parses as 802.1Q headers, to
+ * prevent %OVS_ACTION_ATTR_PUSH_VLAN followed by %OVS_ACTION_ATTR_POP_VLAN
+ * from having surprising results.
+ */
+struct ovs_action_push_vlan {
+       __be16 vlan_tpid;       /* 802.1Q TPID. */
+       __be16 vlan_tci;        /* 802.1Q TCI (VLAN ID and priority). */
+};
+
+/**
+ * enum ovs_action_attr - Action types.
+ *
+ * @OVS_ACTION_ATTR_OUTPUT: Output packet to port.
+ * @OVS_ACTION_ATTR_USERSPACE: Send packet to userspace according to nested
+ * %OVS_USERSPACE_ATTR_* attributes.
+ * @OVS_ACTION_ATTR_SET: Replaces the contents of an existing header.  The
+ * single nested %OVS_KEY_ATTR_* attribute specifies a header to modify and its
+ * value.
+ * @OVS_ACTION_ATTR_PUSH_VLAN: Push a new outermost 802.1Q header onto the
+ * packet.
+ * @OVS_ACTION_ATTR_POP_VLAN: Pop the outermost 802.1Q header off the packet.
+ * @OVS_ACTION_ATTR_SAMPLE: Probabilitically executes actions, as specified in
+ * the nested %OVS_SAMPLE_ATTR_* attributes.
+ *
+ * Only a single header can be set with a single %OVS_ACTION_ATTR_SET.  Not all
+ * fields within a header are modifiable, e.g. the IPv4 protocol and fragment
+ * type may not be changed.
+ */
+
+enum ovs_action_attr {
+       OVS_ACTION_ATTR_UNSPEC,
+       OVS_ACTION_ATTR_OUTPUT,       /* u32 port number. */
+       OVS_ACTION_ATTR_USERSPACE,    /* Nested OVS_USERSPACE_ATTR_*. */
+       OVS_ACTION_ATTR_SET,          /* One nested OVS_KEY_ATTR_*. */
+       OVS_ACTION_ATTR_PUSH_VLAN,    /* struct ovs_action_push_vlan. */
+       OVS_ACTION_ATTR_POP_VLAN,     /* No argument. */
+       OVS_ACTION_ATTR_SAMPLE,       /* Nested OVS_SAMPLE_ATTR_*. */
+       __OVS_ACTION_ATTR_MAX
+};
+
+#define OVS_ACTION_ATTR_MAX (__OVS_ACTION_ATTR_MAX - 1)
+
+#endif /* _LINUX_OPENVSWITCH_H */
diff --git a/usr/include/linux/packet_diag.h b/usr/include/linux/packet_diag.h
new file mode 100644 (file)
index 0000000..b2cc0cd
--- /dev/null
@@ -0,0 +1,79 @@
+#ifndef __PACKET_DIAG_H__
+#define __PACKET_DIAG_H__
+
+#include <linux/types.h>
+
+struct packet_diag_req {
+       __u8    sdiag_family;
+       __u8    sdiag_protocol;
+       __u16   pad;
+       __u32   pdiag_ino;
+       __u32   pdiag_show;
+       __u32   pdiag_cookie[2];
+};
+
+#define PACKET_SHOW_INFO       0x00000001 /* Basic packet_sk information */
+#define PACKET_SHOW_MCLIST     0x00000002 /* A set of packet_diag_mclist-s */
+#define PACKET_SHOW_RING_CFG   0x00000004 /* Rings configuration parameters */
+#define PACKET_SHOW_FANOUT     0x00000008
+#define PACKET_SHOW_MEMINFO    0x00000010
+#define PACKET_SHOW_FILTER     0x00000020
+
+struct packet_diag_msg {
+       __u8    pdiag_family;
+       __u8    pdiag_type;
+       __u16   pdiag_num;
+
+       __u32   pdiag_ino;
+       __u32   pdiag_cookie[2];
+};
+
+enum {
+       PACKET_DIAG_INFO,
+       PACKET_DIAG_MCLIST,
+       PACKET_DIAG_RX_RING,
+       PACKET_DIAG_TX_RING,
+       PACKET_DIAG_FANOUT,
+       PACKET_DIAG_UID,
+       PACKET_DIAG_MEMINFO,
+       PACKET_DIAG_FILTER,
+
+       __PACKET_DIAG_MAX,
+};
+
+#define PACKET_DIAG_MAX (__PACKET_DIAG_MAX - 1)
+
+struct packet_diag_info {
+       __u32   pdi_index;
+       __u32   pdi_version;
+       __u32   pdi_reserve;
+       __u32   pdi_copy_thresh;
+       __u32   pdi_tstamp;
+       __u32   pdi_flags;
+
+#define PDI_RUNNING    0x1
+#define PDI_AUXDATA    0x2
+#define PDI_ORIGDEV    0x4
+#define PDI_VNETHDR    0x8
+#define PDI_LOSS       0x10
+};
+
+struct packet_diag_mclist {
+       __u32   pdmc_index;
+       __u32   pdmc_count;
+       __u16   pdmc_type;
+       __u16   pdmc_alen;
+       __u8    pdmc_addr[MAX_ADDR_LEN];
+};
+
+struct packet_diag_ring {
+       __u32   pdr_block_size;
+       __u32   pdr_block_nr;
+       __u32   pdr_frame_size;
+       __u32   pdr_frame_nr;
+       __u32   pdr_retire_tmo;
+       __u32   pdr_sizeof_priv;
+       __u32   pdr_features;
+};
+
+#endif
index 4b608f5..864e324 100644 (file)
@@ -26,6 +26,7 @@
  * Under PCI, each device has 256 bytes of configuration address space,
  * of which the first 64 bytes are standardized as follows:
  */
+#define PCI_STD_HEADER_SIZEOF  64
 #define PCI_VENDOR_ID          0x00    /* 16 bits */
 #define PCI_DEVICE_ID          0x02    /* 16 bits */
 #define PCI_COMMAND            0x04    /* 16 bits */
 #define  PCI_IO_RANGE_TYPE_MASK        0x0fUL  /* I/O bridging type */
 #define  PCI_IO_RANGE_TYPE_16  0x00
 #define  PCI_IO_RANGE_TYPE_32  0x01
-#define  PCI_IO_RANGE_MASK     (~0x0fUL)
+#define  PCI_IO_RANGE_MASK     (~0x0fUL) /* Standard 4K I/O windows */
+#define  PCI_IO_1K_RANGE_MASK  (~0x03UL) /* Intel 1K I/O windows */
 #define PCI_SEC_STATUS         0x1e    /* Secondary status register, only bit 14 used */
 #define PCI_MEMORY_BASE                0x20    /* Memory range behind */
 #define PCI_MEMORY_LIMIT       0x22
 #define  PCI_CAP_ID_SHPC       0x0C    /* PCI Standard Hot-Plug Controller */
 #define  PCI_CAP_ID_SSVID      0x0D    /* Bridge subsystem vendor/device ID */
 #define  PCI_CAP_ID_AGP3       0x0E    /* AGP Target PCI-PCI bridge */
+#define  PCI_CAP_ID_SECDEV     0x0F    /* Secure Device */
 #define  PCI_CAP_ID_EXP        0x10    /* PCI Express */
 #define  PCI_CAP_ID_MSIX       0x11    /* MSI-X */
+#define  PCI_CAP_ID_SATA       0x12    /* SATA Data/Index Conf. */
 #define  PCI_CAP_ID_AF         0x13    /* PCI Advanced Features */
+#define  PCI_CAP_ID_MAX                PCI_CAP_ID_AF
 #define PCI_CAP_LIST_NEXT      1       /* Next capability in the list */
 #define PCI_CAP_FLAGS          2       /* Capability defined flags (16 bits) */
 #define PCI_CAP_SIZEOF         4
 #define  PCI_VPD_ADDR_MASK     0x7fff  /* Address mask */
 #define  PCI_VPD_ADDR_F                0x8000  /* Write 0, 1 indicates completion */
 #define PCI_VPD_DATA           4       /* 32-bits of data returned here */
+#define PCI_CAP_VPD_SIZEOF     8
 
 /* Slot Identification */
 
 
 /* Message Signalled Interrupts registers */
 
-#define PCI_MSI_FLAGS          2       /* Various flags */
-#define  PCI_MSI_FLAGS_64BIT   0x80    /* 64-bit addresses allowed */
-#define  PCI_MSI_FLAGS_QSIZE   0x70    /* Message queue size configured */
-#define  PCI_MSI_FLAGS_QMASK   0x0e    /* Maximum queue size available */
-#define  PCI_MSI_FLAGS_ENABLE  0x01    /* MSI feature enabled */
-#define  PCI_MSI_FLAGS_MASKBIT 0x100   /* 64-bit mask bits allowed */
+#define PCI_MSI_FLAGS          2       /* Message Control */
+#define  PCI_MSI_FLAGS_ENABLE  0x0001  /* MSI feature enabled */
+#define  PCI_MSI_FLAGS_QMASK   0x000e  /* Maximum queue size available */
+#define  PCI_MSI_FLAGS_QSIZE   0x0070  /* Message queue size configured */
+#define  PCI_MSI_FLAGS_64BIT   0x0080  /* 64-bit addresses allowed */
+#define  PCI_MSI_FLAGS_MASKBIT 0x0100  /* Per-vector masking capable */
 #define PCI_MSI_RFU            3       /* Rest of capability flags */
 #define PCI_MSI_ADDRESS_LO     4       /* Lower 32 bits */
 #define PCI_MSI_ADDRESS_HI     8       /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */
 #define PCI_MSI_DATA_32                8       /* 16 bits of data for 32-bit devices */
 #define PCI_MSI_MASK_32                12      /* Mask bits register for 32-bit devices */
+#define PCI_MSI_PENDING_32     16      /* Pending intrs for 32-bit devices */
 #define PCI_MSI_DATA_64                12      /* 16 bits of data for 64-bit devices */
 #define PCI_MSI_MASK_64                16      /* Mask bits register for 64-bit devices */
+#define PCI_MSI_PENDING_64     20      /* Pending intrs for 64-bit devices */
 
 /* MSI-X registers */
-#define PCI_MSIX_FLAGS         2
-#define  PCI_MSIX_FLAGS_QSIZE  0x7FF
-#define  PCI_MSIX_FLAGS_ENABLE (1 << 15)
-#define  PCI_MSIX_FLAGS_MASKALL        (1 << 14)
-#define PCI_MSIX_TABLE         4
-#define PCI_MSIX_PBA           8
-#define  PCI_MSIX_FLAGS_BIRMASK        (7 << 0)
+#define PCI_MSIX_FLAGS         2       /* Message Control */
+#define  PCI_MSIX_FLAGS_QSIZE  0x07FF  /* Table size */
+#define  PCI_MSIX_FLAGS_MASKALL        0x4000  /* Mask all vectors for this function */
+#define  PCI_MSIX_FLAGS_ENABLE 0x8000  /* MSI-X enable */
+#define PCI_MSIX_TABLE         4       /* Table offset */
+#define  PCI_MSIX_TABLE_BIR    0x00000007 /* BAR index */
+#define  PCI_MSIX_TABLE_OFFSET 0xfffffff8 /* Offset into specified BAR */
+#define PCI_MSIX_PBA           8       /* Pending Bit Array offset */
+#define  PCI_MSIX_PBA_BIR      0x00000007 /* BAR index */
+#define  PCI_MSIX_PBA_OFFSET   0xfffffff8 /* Offset into specified BAR */
+#define  PCI_MSIX_FLAGS_BIRMASK        (7 << 0)   /* deprecated */
+#define PCI_CAP_MSIX_SIZEOF    12      /* size of MSIX registers */
 
 /* MSI-X entry's format */
 #define PCI_MSIX_ENTRY_SIZE            16
 #define  PCI_AF_CTRL_FLR       0x01
 #define PCI_AF_STATUS          5
 #define  PCI_AF_STATUS_TP      0x01
+#define PCI_CAP_AF_SIZEOF      6       /* size of AF registers */
 
-/* PCI-X registers */
+/* PCI-X registers (Type 0 (non-bridge) devices) */
 
 #define PCI_X_CMD              2       /* Modes & Features */
 #define  PCI_X_CMD_DPERR_E     0x0001  /* Data Parity Error Recovery Enable */
 #define  PCI_X_STATUS_SPL_ERR  0x20000000      /* Rcvd Split Completion Error Msg */
 #define  PCI_X_STATUS_266MHZ   0x40000000      /* 266 MHz capable */
 #define  PCI_X_STATUS_533MHZ   0x80000000      /* 533 MHz capable */
+#define PCI_X_ECC_CSR          8       /* ECC control and status */
+#define PCI_CAP_PCIX_SIZEOF_V0 8       /* size of registers for Version 0 */
+#define PCI_CAP_PCIX_SIZEOF_V1 24      /* size for Version 1 */
+#define PCI_CAP_PCIX_SIZEOF_V2 PCI_CAP_PCIX_SIZEOF_V1  /* Same for v2 */
+
+/* PCI-X registers (Type 1 (bridge) devices) */
+
+#define PCI_X_BRIDGE_SSTATUS   2       /* Secondary Status */
+#define  PCI_X_SSTATUS_64BIT   0x0001  /* Secondary AD interface is 64 bits */
+#define  PCI_X_SSTATUS_133MHZ  0x0002  /* 133 MHz capable */
+#define  PCI_X_SSTATUS_FREQ    0x03c0  /* Secondary Bus Mode and Frequency */
+#define  PCI_X_SSTATUS_VERS    0x3000  /* PCI-X Capability Version */
+#define  PCI_X_SSTATUS_V1      0x1000  /* Mode 2, not Mode 1 */
+#define  PCI_X_SSTATUS_V2      0x2000  /* Mode 1 or Modes 1 and 2 */
+#define  PCI_X_SSTATUS_266MHZ  0x4000  /* 266 MHz capable */
+#define  PCI_X_SSTATUS_533MHZ  0x8000  /* 533 MHz capable */
+#define PCI_X_BRIDGE_STATUS    4       /* Bridge Status */
 
 /* PCI Bridge Subsystem ID registers */
 
 #define  PCI_EXP_DEVSTA_TRPND  0x20    /* Transactions Pending */
 #define PCI_EXP_LNKCAP         12      /* Link Capabilities */
 #define  PCI_EXP_LNKCAP_SLS    0x0000000f /* Supported Link Speeds */
+#define  PCI_EXP_LNKCAP_SLS_2_5GB 0x1  /* LNKCAP2 SLS Vector bit 0 (2.5GT/s) */
+#define  PCI_EXP_LNKCAP_SLS_5_0GB 0x2  /* LNKCAP2 SLS Vector bit 1 (5.0GT/s) */
 #define  PCI_EXP_LNKCAP_MLW    0x000003f0 /* Maximum Link Width */
 #define  PCI_EXP_LNKCAP_ASPMS  0x00000c00 /* ASPM Support */
 #define  PCI_EXP_LNKCAP_L0SEL  0x00007000 /* L0s Exit Latency */
 #define  PCI_EXP_LNKCAP_PN     0xff000000 /* Port Number */
 #define PCI_EXP_LNKCTL         16      /* Link Control */
 #define  PCI_EXP_LNKCTL_ASPMC  0x0003  /* ASPM Control */
+#define  PCI_EXP_LNKCTL_ASPM_L0S  0x01 /* L0s Enable */
+#define  PCI_EXP_LNKCTL_ASPM_L1   0x02 /* L1 Enable */
 #define  PCI_EXP_LNKCTL_RCB    0x0008  /* Read Completion Boundary */
 #define  PCI_EXP_LNKCTL_LD     0x0010  /* Link Disable */
 #define  PCI_EXP_LNKCTL_RL     0x0020  /* Retrain Link */
 #define  PCI_EXP_LNKSTA_DLLLA  0x2000  /* Data Link Layer Link Active */
 #define  PCI_EXP_LNKSTA_LBMS   0x4000  /* Link Bandwidth Management Status */
 #define  PCI_EXP_LNKSTA_LABS   0x8000  /* Link Autonomous Bandwidth Status */
+#define PCI_CAP_EXP_ENDPOINT_SIZEOF_V1 20      /* v1 endpoints end here */
 #define PCI_EXP_SLTCAP         20      /* Slot Capabilities */
 #define  PCI_EXP_SLTCAP_ABP    0x00000001 /* Attention Button Present */
 #define  PCI_EXP_SLTCAP_PCP    0x00000002 /* Power Controller Present */
 #define PCI_EXP_RTSTA          32      /* Root Status */
 #define PCI_EXP_RTSTA_PME      0x10000 /* PME status */
 #define PCI_EXP_RTSTA_PENDING  0x20000 /* PME pending */
+/*
+ * Note that the following PCI Express 'Capability Structure' registers
+ * were introduced with 'Capability Version' 0x2 (v2).  These registers
+ * do not exist on devices with Capability Version 1.  Use pci_pcie_cap2()
+ * to use these fields safely.
+ */
 #define PCI_EXP_DEVCAP2                36      /* Device Capabilities 2 */
 #define  PCI_EXP_DEVCAP2_ARI   0x20    /* Alternative Routing-ID */
 #define  PCI_EXP_DEVCAP2_LTR   0x800   /* Latency tolerance reporting */
 #define  PCI_EXP_OBFF_MSGA_EN  0x2000  /* OBFF enable with Message type A */
 #define  PCI_EXP_OBFF_MSGB_EN  0x4000  /* OBFF enable with Message type B */
 #define  PCI_EXP_OBFF_WAKE_EN  0x6000  /* OBFF using WAKE# signaling */
+#define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 44      /* v2 endpoints end here */
+#define PCI_EXP_LNKCAP2                44      /* Link Capability 2 */
+#define  PCI_EXP_LNKCAP2_SLS_2_5GB 0x02        /* Supported Link Speed 2.5GT/s */
+#define  PCI_EXP_LNKCAP2_SLS_5_0GB 0x04        /* Supported Link Speed 5.0GT/s */
+#define  PCI_EXP_LNKCAP2_SLS_8_0GB 0x08        /* Supported Link Speed 8.0GT/s */
+#define  PCI_EXP_LNKCAP2_CROSSLINK 0x100 /* Crosslink supported */
 #define PCI_EXP_LNKCTL2                48      /* Link Control 2 */
+#define PCI_EXP_LNKSTA2                50      /* Link Status 2 */
 #define PCI_EXP_SLTCTL2                56      /* Slot Control 2 */
 
 /* Extended Capabilities (PCI-X 2.0 and Express) */
 #define PCI_EXT_CAP_VER(header)                ((header >> 16) & 0xf)
 #define PCI_EXT_CAP_NEXT(header)       ((header >> 20) & 0xffc)
 
-#define PCI_EXT_CAP_ID_ERR     1
-#define PCI_EXT_CAP_ID_VC      2
-#define PCI_EXT_CAP_ID_DSN     3
-#define PCI_EXT_CAP_ID_PWR     4
-#define PCI_EXT_CAP_ID_VNDR    11
-#define PCI_EXT_CAP_ID_ACS     13
-#define PCI_EXT_CAP_ID_ARI     14
-#define PCI_EXT_CAP_ID_ATS     15
-#define PCI_EXT_CAP_ID_SRIOV   16
-#define PCI_EXT_CAP_ID_PRI     19
-#define PCI_EXT_CAP_ID_LTR     24
-#define PCI_EXT_CAP_ID_PASID   27
+#define PCI_EXT_CAP_ID_ERR     0x01    /* Advanced Error Reporting */
+#define PCI_EXT_CAP_ID_VC      0x02    /* Virtual Channel Capability */
+#define PCI_EXT_CAP_ID_DSN     0x03    /* Device Serial Number */
+#define PCI_EXT_CAP_ID_PWR     0x04    /* Power Budgeting */
+#define PCI_EXT_CAP_ID_RCLD    0x05    /* Root Complex Link Declaration */
+#define PCI_EXT_CAP_ID_RCILC   0x06    /* Root Complex Internal Link Control */
+#define PCI_EXT_CAP_ID_RCEC    0x07    /* Root Complex Event Collector */
+#define PCI_EXT_CAP_ID_MFVC    0x08    /* Multi-Function VC Capability */
+#define PCI_EXT_CAP_ID_VC9     0x09    /* same as _VC */
+#define PCI_EXT_CAP_ID_RCRB    0x0A    /* Root Complex RB? */
+#define PCI_EXT_CAP_ID_VNDR    0x0B    /* Vendor Specific */
+#define PCI_EXT_CAP_ID_CAC     0x0C    /* Config Access - obsolete */
+#define PCI_EXT_CAP_ID_ACS     0x0D    /* Access Control Services */
+#define PCI_EXT_CAP_ID_ARI     0x0E    /* Alternate Routing ID */
+#define PCI_EXT_CAP_ID_ATS     0x0F    /* Address Translation Services */
+#define PCI_EXT_CAP_ID_SRIOV   0x10    /* Single Root I/O Virtualization */
+#define PCI_EXT_CAP_ID_MRIOV   0x11    /* Multi Root I/O Virtualization */
+#define PCI_EXT_CAP_ID_MCAST   0x12    /* Multicast */
+#define PCI_EXT_CAP_ID_PRI     0x13    /* Page Request Interface */
+#define PCI_EXT_CAP_ID_AMD_XXX 0x14    /* reserved for AMD */
+#define PCI_EXT_CAP_ID_REBAR   0x15    /* resizable BAR */
+#define PCI_EXT_CAP_ID_DPA     0x16    /* dynamic power alloc */
+#define PCI_EXT_CAP_ID_TPH     0x17    /* TPH request */
+#define PCI_EXT_CAP_ID_LTR     0x18    /* latency tolerance reporting */
+#define PCI_EXT_CAP_ID_SECPCI  0x19    /* Secondary PCIe */
+#define PCI_EXT_CAP_ID_PMUX    0x1A    /* Protocol Multiplexing */
+#define PCI_EXT_CAP_ID_PASID   0x1B    /* Process Address Space ID */
+#define PCI_EXT_CAP_ID_MAX     PCI_EXT_CAP_ID_PASID
+
+#define PCI_EXT_CAP_DSN_SIZEOF 12
+#define PCI_EXT_CAP_MCAST_ENDPOINT_SIZEOF 40
 
 /* Advanced Error Reporting */
 #define PCI_ERR_UNCOR_STATUS   4       /* Uncorrectable Error Status */
 #define  PCI_ERR_UNC_TRAIN     0x00000001      /* Training */
 #define  PCI_ERR_UNC_DLP       0x00000010      /* Data Link Protocol */
+#define  PCI_ERR_UNC_SURPDN    0x00000020      /* Surprise Down */
 #define  PCI_ERR_UNC_POISON_TLP        0x00001000      /* Poisoned TLP */
 #define  PCI_ERR_UNC_FCP       0x00002000      /* Flow Control Protocol */
 #define  PCI_ERR_UNC_COMP_TIME 0x00004000      /* Completion Timeout */
 #define  PCI_ERR_UNC_MALF_TLP  0x00040000      /* Malformed TLP */
 #define  PCI_ERR_UNC_ECRC      0x00080000      /* ECRC Error Status */
 #define  PCI_ERR_UNC_UNSUP     0x00100000      /* Unsupported Request */
+#define  PCI_ERR_UNC_ACSV      0x00200000      /* ACS Violation */
+#define  PCI_ERR_UNC_INTN      0x00400000      /* internal error */
+#define  PCI_ERR_UNC_MCBTLP    0x00800000      /* MC blocked TLP */
+#define  PCI_ERR_UNC_ATOMEG    0x01000000      /* Atomic egress blocked */
+#define  PCI_ERR_UNC_TLPPRE    0x02000000      /* TLP prefix blocked */
 #define PCI_ERR_UNCOR_MASK     8       /* Uncorrectable Error Mask */
        /* Same bits as above */
 #define PCI_ERR_UNCOR_SEVER    12      /* Uncorrectable Error Severity */
 #define  PCI_ERR_COR_BAD_DLLP  0x00000080      /* Bad DLLP Status */
 #define  PCI_ERR_COR_REP_ROLL  0x00000100      /* REPLAY_NUM Rollover */
 #define  PCI_ERR_COR_REP_TIMER 0x00001000      /* Replay Timer Timeout */
+#define  PCI_ERR_COR_ADV_NFAT  0x00002000      /* Advisory Non-Fatal */
+#define  PCI_ERR_COR_INTERNAL  0x00004000      /* Corrected Internal */
+#define  PCI_ERR_COR_LOG_OVER  0x00008000      /* Header Log Overflow */
 #define PCI_ERR_COR_MASK       20      /* Correctable Error Mask */
        /* Same bits as above */
 #define PCI_ERR_CAP            24      /* Advanced Error Capabilities */
 
 /* Virtual Channel */
 #define PCI_VC_PORT_REG1       4
+#define  PCI_VC_REG1_EVCC      0x7     /* extended vc count */
 #define PCI_VC_PORT_REG2       8
+#define  PCI_VC_REG2_32_PHASE  0x2
+#define  PCI_VC_REG2_64_PHASE  0x4
+#define  PCI_VC_REG2_128_PHASE 0x8
 #define PCI_VC_PORT_CTRL       12
 #define PCI_VC_PORT_STATUS     14
 #define PCI_VC_RES_CAP         16
 #define PCI_VC_RES_CTRL                20
 #define PCI_VC_RES_STATUS      26
+#define PCI_CAP_VC_BASE_SIZEOF         0x10
+#define PCI_CAP_VC_PER_VC_SIZEOF       0x0C
 
 /* Power Budgeting */
 #define PCI_PWR_DSR            4       /* Data Select Register */
 #define  PCI_PWR_DATA_RAIL(x)  (((x) >> 18) & 7)   /* Power Rail */
 #define PCI_PWR_CAP            12      /* Capability */
 #define  PCI_PWR_CAP_BUDGET(x) ((x) & 1)       /* Included in system budget */
+#define PCI_EXT_CAP_PWR_SIZEOF 16
+
+/* Vendor-Specific (VSEC, PCI_EXT_CAP_ID_VNDR) */
+#define PCI_VNDR_HEADER                4       /* Vendor-Specific Header */
+#define  PCI_VNDR_HEADER_ID(x) ((x) & 0xffff)
+#define  PCI_VNDR_HEADER_REV(x)        (((x) >> 16) & 0xf)
+#define  PCI_VNDR_HEADER_LEN(x)        (((x) >> 20) & 0xfff)
 
 /*
  * Hypertransport sub capability types
 #define HT_CAPTYPE_ERROR_RETRY 0xC0    /* Retry on error configuration */
 #define HT_CAPTYPE_GEN3                0xD0    /* Generation 3 hypertransport configuration */
 #define HT_CAPTYPE_PM          0xE0    /* Hypertransport powermanagement configuration */
+#define HT_CAP_SIZEOF_LONG     28      /* slave & primary */
+#define HT_CAP_SIZEOF_SHORT    24      /* host & secondary */
 
 /* Alternative Routing-ID Interpretation */
 #define PCI_ARI_CAP            0x04    /* ARI Capability Register */
 #define  PCI_ARI_CTRL_MFVC     0x0001  /* MFVC Function Groups Enable */
 #define  PCI_ARI_CTRL_ACS      0x0002  /* ACS Function Groups Enable */
 #define  PCI_ARI_CTRL_FG(x)    (((x) >> 4) & 7) /* Function Group */
+#define PCI_EXT_CAP_ARI_SIZEOF 8
 
 /* Address Translation Service */
 #define PCI_ATS_CAP            0x04    /* ATS Capability Register */
 #define  PCI_ATS_CTRL_ENABLE   0x8000  /* ATS Enable */
 #define  PCI_ATS_CTRL_STU(x)   ((x) & 0x1f)    /* Smallest Translation Unit */
 #define  PCI_ATS_MIN_STU       12      /* shift of minimum STU block */
+#define PCI_EXT_CAP_ATS_SIZEOF 8
 
 /* Page Request Interface */
 #define PCI_PRI_CTRL           0x04    /* PRI control register */
 #define  PCI_PRI_STATUS_STOPPED        0x100   /* PRI Stopped */
 #define PCI_PRI_MAX_REQ                0x08    /* PRI max reqs supported */
 #define PCI_PRI_ALLOC_REQ      0x0c    /* PRI max reqs allowed */
+#define PCI_EXT_CAP_PRI_SIZEOF 16
 
 /* PASID capability */
 #define PCI_PASID_CAP          0x04    /* PASID feature register */
 #define  PCI_PASID_CTRL_ENABLE 0x01    /* Enable bit */
 #define  PCI_PASID_CTRL_EXEC   0x02    /* Exec permissions Enable */
 #define  PCI_PASID_CTRL_PRIV   0x04    /* Priviledge Mode Enable */
+#define PCI_EXT_CAP_PASID_SIZEOF       8
 
 /* Single Root I/O Virtualization */
 #define PCI_SRIOV_CAP          0x04    /* SR-IOV Capabilities */
 #define  PCI_SRIOV_VFM_MI      0x1     /* Dormant.MigrateIn */
 #define  PCI_SRIOV_VFM_MO      0x2     /* Active.MigrateOut */
 #define  PCI_SRIOV_VFM_AV      0x3     /* Active.Available */
+#define PCI_EXT_CAP_SRIOV_SIZEOF 64
 
 #define PCI_LTR_MAX_SNOOP_LAT  0x4
 #define PCI_LTR_MAX_NOSNOOP_LAT        0x6
 #define  PCI_LTR_VALUE_MASK    0x000003ff
 #define  PCI_LTR_SCALE_MASK    0x00001c00
 #define  PCI_LTR_SCALE_SHIFT   10
+#define PCI_EXT_CAP_LTR_SIZEOF 8
 
 /* Access Control Service */
 #define PCI_ACS_CAP            0x04    /* ACS Capability Register */
 #define  PCI_ACS_UF            0x10    /* Upstream Forwarding */
 #define  PCI_ACS_EC            0x20    /* P2P Egress Control */
 #define  PCI_ACS_DT            0x40    /* Direct Translated P2P */
+#define PCI_ACS_EGRESS_BITS    0x05    /* ACS Egress Control Vector Size */
 #define PCI_ACS_CTRL           0x06    /* ACS Control Register */
 #define PCI_ACS_EGRESS_CTL_V   0x08    /* ACS Egress Control Vector */
 
+#define PCI_VSEC_HDR           4       /* extended cap - vendor specific */
+#define  PCI_VSEC_HDR_LEN_SHIFT        20      /* shift for length field */
+
+/* sata capability */
+#define PCI_SATA_REGS          4       /* SATA REGs specifier */
+#define  PCI_SATA_REGS_MASK    0xF     /* location - BAR#/inline */
+#define  PCI_SATA_REGS_INLINE  0xF     /* REGS in config space */
+#define PCI_SATA_SIZEOF_SHORT  8
+#define PCI_SATA_SIZEOF_LONG   16
+
+/* resizable BARs */
+#define PCI_REBAR_CTRL         8       /* control register */
+#define  PCI_REBAR_CTRL_NBAR_MASK      (7 << 5)        /* mask for # bars */
+#define  PCI_REBAR_CTRL_NBAR_SHIFT     5       /* shift for # bars */
+
+/* dynamic power allocation */
+#define PCI_DPA_CAP            4       /* capability register */
+#define  PCI_DPA_CAP_SUBSTATE_MASK     0x1F    /* # substates - 1 */
+#define PCI_DPA_BASE_SIZEOF    16      /* size with 0 substates */
+
+/* TPH Requester */
+#define PCI_TPH_CAP            4       /* capability register */
+#define  PCI_TPH_CAP_LOC_MASK  0x600   /* location mask */
+#define   PCI_TPH_LOC_NONE     0x000   /* no location */
+#define   PCI_TPH_LOC_CAP      0x200   /* in capability */
+#define   PCI_TPH_LOC_MSIX     0x400   /* in MSI-X */
+#define PCI_TPH_CAP_ST_MASK    0x07FF0000      /* st table mask */
+#define PCI_TPH_CAP_ST_SHIFT   16      /* st table shift */
+#define PCI_TPH_BASE_SIZEOF    12      /* size with no st table */
+
 #endif /* LINUX_PCI_REGS_H */
index d2560a9..0e2f206 100644 (file)
@@ -130,8 +130,12 @@ enum perf_event_sample_format {
        PERF_SAMPLE_STREAM_ID                   = 1U << 9,
        PERF_SAMPLE_RAW                         = 1U << 10,
        PERF_SAMPLE_BRANCH_STACK                = 1U << 11,
+       PERF_SAMPLE_REGS_USER                   = 1U << 12,
+       PERF_SAMPLE_STACK_USER                  = 1U << 13,
+       PERF_SAMPLE_WEIGHT                      = 1U << 14,
+       PERF_SAMPLE_DATA_SRC                    = 1U << 15,
 
-       PERF_SAMPLE_MAX = 1U << 12,             /* non-ABI */
+       PERF_SAMPLE_MAX = 1U << 16,             /* non-ABI */
 };
 
 /*
@@ -163,6 +167,15 @@ enum perf_branch_sample_type {
         PERF_SAMPLE_BRANCH_HV)
 
 /*
+ * Values to determine ABI of the registers dump.
+ */
+enum perf_sample_regs_abi {
+       PERF_SAMPLE_REGS_ABI_NONE       = 0,
+       PERF_SAMPLE_REGS_ABI_32         = 1,
+       PERF_SAMPLE_REGS_ABI_64         = 2,
+};
+
+/*
  * The format of the data returned by read() on a perf event fd,
  * as specified by attr.read_format:
  *
@@ -194,6 +207,8 @@ enum perf_event_read_format {
 #define PERF_ATTR_SIZE_VER0    64      /* sizeof first published struct */
 #define PERF_ATTR_SIZE_VER1    72      /* add: config2 */
 #define PERF_ATTR_SIZE_VER2    80      /* add: branch_sample_type */
+#define PERF_ATTR_SIZE_VER3    96      /* add: sample_regs_user */
+                                       /* add: sample_stack_user */
 
 /*
  * Hardware event_id to monitor via a performance monitoring event:
@@ -255,7 +270,10 @@ struct perf_event_attr {
                                exclude_host   :  1, /* don't count in host   */
                                exclude_guest  :  1, /* don't count in guest  */
 
-                               __reserved_1   : 43;
+                               exclude_callchain_kernel : 1, /* exclude kernel callchains */
+                               exclude_callchain_user   : 1, /* exclude user callchains */
+
+                               __reserved_1   : 41;
 
        union {
                __u32           wakeup_events;    /* wakeup every n events */
@@ -271,9 +289,25 @@ struct perf_event_attr {
                __u64           bp_len;
                __u64           config2; /* extension of config1 */
        };
-       __u64   branch_sample_type; /* enum branch_sample_type */
+       __u64   branch_sample_type; /* enum perf_branch_sample_type */
+
+       /*
+        * Defines set of user regs to dump on samples.
+        * See asm/perf_regs.h for details.
+        */
+       __u64   sample_regs_user;
+
+       /*
+        * Defines size of the user stack to dump on samples.
+        */
+       __u32   sample_stack_user;
+
+       /* Align to u64. */
+       __u32   __reserved_2;
 };
 
+#define perf_flags(attr)       (*(&(attr)->read_format + 1))
+
 /*
  * Ioctls that can be done on a perf event fd:
  */
@@ -411,6 +445,7 @@ struct perf_event_mmap_page {
 #define PERF_RECORD_MISC_GUEST_KERNEL          (4 << 0)
 #define PERF_RECORD_MISC_GUEST_USER            (5 << 0)
 
+#define PERF_RECORD_MISC_MMAP_DATA             (1 << 13)
 /*
  * Indicates that the content of PERF_SAMPLE_IP points to
  * the actual instruction that triggered the event. See also
@@ -547,7 +582,18 @@ enum perf_event_type {
         *      { u32                   size;
         *        char                  data[size];}&& PERF_SAMPLE_RAW
         *
-        *      { u64 from, to, flags } lbr[nr];} && PERF_SAMPLE_BRANCH_STACK
+        *      { u64                   nr;
+        *        { u64 from, to, flags } lbr[nr];} && PERF_SAMPLE_BRANCH_STACK
+        *
+        *      { u64                   abi; # enum perf_sample_regs_abi
+        *        u64                   regs[weight(mask)]; } && PERF_SAMPLE_REGS_USER
+        *
+        *      { u64                   size;
+        *        char                  data[size];
+        *        u64                   dyn_size; } && PERF_SAMPLE_STACK_USER
+        *
+        *      { u64                   weight;   } && PERF_SAMPLE_WEIGHT
+        *      { u64                   data_src;     } && PERF_SAMPLE_DATA_SRC
         * };
         */
        PERF_RECORD_SAMPLE                      = 9,
@@ -555,6 +601,8 @@ enum perf_event_type {
        PERF_RECORD_MAX,                        /* non-ABI */
 };
 
+#define PERF_MAX_STACK_DEPTH           127
+
 enum perf_callchain_context {
        PERF_CONTEXT_HV                 = (__u64)-32,
        PERF_CONTEXT_KERNEL             = (__u64)-128,
@@ -571,4 +619,67 @@ enum perf_callchain_context {
 #define PERF_FLAG_FD_OUTPUT            (1U << 1)
 #define PERF_FLAG_PID_CGROUP           (1U << 2) /* pid=cgroup id, per-cpu mode only */
 
+union perf_mem_data_src {
+       __u64 val;
+       struct {
+               __u64   mem_op:5,       /* type of opcode */
+                       mem_lvl:14,     /* memory hierarchy level */
+                       mem_snoop:5,    /* snoop mode */
+                       mem_lock:2,     /* lock instr */
+                       mem_dtlb:7,     /* tlb access */
+                       mem_rsvd:31;
+       };
+};
+
+/* type of opcode (load/store/prefetch,code) */
+#define PERF_MEM_OP_NA         0x01 /* not available */
+#define PERF_MEM_OP_LOAD       0x02 /* load instruction */
+#define PERF_MEM_OP_STORE      0x04 /* store instruction */
+#define PERF_MEM_OP_PFETCH     0x08 /* prefetch */
+#define PERF_MEM_OP_EXEC       0x10 /* code (execution) */
+#define PERF_MEM_OP_SHIFT      0
+
+/* memory hierarchy (memory level, hit or miss) */
+#define PERF_MEM_LVL_NA                0x01  /* not available */
+#define PERF_MEM_LVL_HIT       0x02  /* hit level */
+#define PERF_MEM_LVL_MISS      0x04  /* miss level  */
+#define PERF_MEM_LVL_L1                0x08  /* L1 */
+#define PERF_MEM_LVL_LFB       0x10  /* Line Fill Buffer */
+#define PERF_MEM_LVL_L2                0x20  /* L2 */
+#define PERF_MEM_LVL_L3                0x40  /* L3 */
+#define PERF_MEM_LVL_LOC_RAM   0x80  /* Local DRAM */
+#define PERF_MEM_LVL_REM_RAM1  0x100 /* Remote DRAM (1 hop) */
+#define PERF_MEM_LVL_REM_RAM2  0x200 /* Remote DRAM (2 hops) */
+#define PERF_MEM_LVL_REM_CCE1  0x400 /* Remote Cache (1 hop) */
+#define PERF_MEM_LVL_REM_CCE2  0x800 /* Remote Cache (2 hops) */
+#define PERF_MEM_LVL_IO                0x1000 /* I/O memory */
+#define PERF_MEM_LVL_UNC       0x2000 /* Uncached memory */
+#define PERF_MEM_LVL_SHIFT     5
+
+/* snoop mode */
+#define PERF_MEM_SNOOP_NA      0x01 /* not available */
+#define PERF_MEM_SNOOP_NONE    0x02 /* no snoop */
+#define PERF_MEM_SNOOP_HIT     0x04 /* snoop hit */
+#define PERF_MEM_SNOOP_MISS    0x08 /* snoop miss */
+#define PERF_MEM_SNOOP_HITM    0x10 /* snoop hit modified */
+#define PERF_MEM_SNOOP_SHIFT   19
+
+/* locked instruction */
+#define PERF_MEM_LOCK_NA       0x01 /* not available */
+#define PERF_MEM_LOCK_LOCKED   0x02 /* locked transaction */
+#define PERF_MEM_LOCK_SHIFT    24
+
+/* TLB access */
+#define PERF_MEM_TLB_NA                0x01 /* not available */
+#define PERF_MEM_TLB_HIT       0x02 /* hit level */
+#define PERF_MEM_TLB_MISS      0x04 /* miss level */
+#define PERF_MEM_TLB_L1                0x08 /* L1 */
+#define PERF_MEM_TLB_L2                0x10 /* L2 */
+#define PERF_MEM_TLB_WK                0x20 /* Hardware Walker*/
+#define PERF_MEM_TLB_OS                0x40 /* OS fault handler */
+#define PERF_MEM_TLB_SHIFT     26
+
+#define PERF_MEM_S(a, s) \
+       (((u64)PERF_MEM_##a##_##s) << PERF_MEM_##a##_SHIFT)
+
 #endif /* _LINUX_PERF_EVENT_H */
index 349d859..7d663d5 100644 (file)
@@ -182,4 +182,4 @@ static __inline__ __u8 pn_sockaddr_get_resource(const struct sockaddr_pn *spn)
 
 /* Phonet device ioctl requests */
 
-#endif
+#endif /* LINUX_PHONET_H */
index defbde2..082eafa 100644 (file)
@@ -451,8 +451,10 @@ enum {
 #define        TCF_EM_U32              3
 #define        TCF_EM_META             4
 #define        TCF_EM_TEXT             5
-#define        TCF_EM_VLAN             6
-#define        TCF_EM_MAX              6
+#define        TCF_EM_VLAN             6
+#define        TCF_EM_CANID            7
+#define        TCF_EM_IPSET            8
+#define        TCF_EM_MAX              8
 
 enum {
        TCF_EM_PROG_TC
index 410b33d..dbd71b0 100644 (file)
@@ -348,6 +348,7 @@ enum {
        TCA_HTB_INIT,
        TCA_HTB_CTAB,
        TCA_HTB_RTAB,
+       TCA_HTB_DIRECT_QLEN,
        __TCA_HTB_MAX,
 };
 
@@ -509,6 +510,7 @@ enum {
        TCA_NETEM_CORRUPT,
        TCA_NETEM_LOSS,
        TCA_NETEM_RATE,
+       TCA_NETEM_ECN,
        __TCA_NETEM_MAX,
 };
 
@@ -654,4 +656,84 @@ struct tc_qfq_stats {
        __u32 lmax;
 };
 
+/* CODEL */
+
+enum {
+       TCA_CODEL_UNSPEC,
+       TCA_CODEL_TARGET,
+       TCA_CODEL_LIMIT,
+       TCA_CODEL_INTERVAL,
+       TCA_CODEL_ECN,
+       __TCA_CODEL_MAX
+};
+
+#define TCA_CODEL_MAX  (__TCA_CODEL_MAX - 1)
+
+struct tc_codel_xstats {
+       __u32   maxpacket; /* largest packet we've seen so far */
+       __u32   count;     /* how many drops we've done since the last time we
+                           * entered dropping state
+                           */
+       __u32   lastcount; /* count at entry to dropping state */
+       __u32   ldelay;    /* in-queue delay seen by most recently dequeued packet */
+       __s32   drop_next; /* time to drop next packet */
+       __u32   drop_overlimit; /* number of time max qdisc packet limit was hit */
+       __u32   ecn_mark;  /* number of packets we ECN marked instead of dropped */
+       __u32   dropping;  /* are we in dropping state ? */
+};
+
+/* FQ_CODEL */
+
+enum {
+       TCA_FQ_CODEL_UNSPEC,
+       TCA_FQ_CODEL_TARGET,
+       TCA_FQ_CODEL_LIMIT,
+       TCA_FQ_CODEL_INTERVAL,
+       TCA_FQ_CODEL_ECN,
+       TCA_FQ_CODEL_FLOWS,
+       TCA_FQ_CODEL_QUANTUM,
+       __TCA_FQ_CODEL_MAX
+};
+
+#define TCA_FQ_CODEL_MAX       (__TCA_FQ_CODEL_MAX - 1)
+
+enum {
+       TCA_FQ_CODEL_XSTATS_QDISC,
+       TCA_FQ_CODEL_XSTATS_CLASS,
+};
+
+struct tc_fq_codel_qd_stats {
+       __u32   maxpacket;      /* largest packet we've seen so far */
+       __u32   drop_overlimit; /* number of time max qdisc
+                                * packet limit was hit
+                                */
+       __u32   ecn_mark;       /* number of packets we ECN marked
+                                * instead of being dropped
+                                */
+       __u32   new_flow_count; /* number of time packets
+                                * created a 'new flow'
+                                */
+       __u32   new_flows_len;  /* count of flows in new list */
+       __u32   old_flows_len;  /* count of flows in old list */
+};
+
+struct tc_fq_codel_cl_stats {
+       __s32   deficit;
+       __u32   ldelay;         /* in-queue delay seen by most recently
+                                * dequeued packet
+                                */
+       __u32   count;
+       __u32   lastcount;
+       __u32   dropping;
+       __s32   drop_next;
+};
+
+struct tc_fq_codel_xstats {
+       __u32   type;
+       union {
+               struct tc_fq_codel_qd_stats qdisc_stats;
+               struct tc_fq_codel_cl_stats class_stats;
+       };
+};
+
 #endif
index 421b305..2001fed 100644 (file)
@@ -1,7 +1 @@
-#ifndef _LINUX_POLL_H
-#define _LINUX_POLL_H
-
 #include <asm/poll.h>
-
-
-#endif /* _LINUX_POLL_H */
index f04c98c..988f76e 100644 (file)
  */
 
 /*
- * Those macros may have been defined in <gnu/types.h>. But we always
- * use the ones here. 
+ * This macro may have been defined in <gnu/types.h>. But we always
+ * use the one here.
  */
-#undef __NFDBITS
-#define __NFDBITS      (8 * sizeof(unsigned long))
-
 #undef __FD_SETSIZE
 #define __FD_SETSIZE   1024
 
-#undef __FDSET_LONGS
-#define __FDSET_LONGS  (__FD_SETSIZE/__NFDBITS)
-
-#undef __FDELT
-#define        __FDELT(d)      ((d) / __NFDBITS)
-
-#undef __FDMASK
-#define        __FDMASK(d)     (1UL << ((d) % __NFDBITS))
-
 typedef struct {
-       unsigned long fds_bits [__FDSET_LONGS];
+       unsigned long fds_bits[__FD_SETSIZE / (8 * sizeof(long))];
 } __kernel_fd_set;
 
 /* Type of a signal handler.  */
index 38d31e1..e16dead 100644 (file)
 #ifndef _NET_PPP_COMP_H
 #define _NET_PPP_COMP_H
 
-struct module;
-
-/*
- * The following symbols control whether we include code for
- * various compression methods.
- */
-
-#ifndef DO_BSD_COMPRESS
-#define DO_BSD_COMPRESS        1       /* by default, include BSD-Compress */
-#endif
-#ifndef DO_DEFLATE
-#define DO_DEFLATE     1       /* by default, include Deflate */
-#endif
-#define DO_PREDICTOR_1 0
-#define DO_PREDICTOR_2 0
-
-/*
- * Structure giving methods for compression/decompression.
- */
-
-struct compressor {
-       int     compress_proto; /* CCP compression protocol number */
-
-       /* Allocate space for a compressor (transmit side) */
-       void    *(*comp_alloc) (unsigned char *options, int opt_len);
-
-       /* Free space used by a compressor */
-       void    (*comp_free) (void *state);
-
-       /* Initialize a compressor */
-       int     (*comp_init) (void *state, unsigned char *options,
-                             int opt_len, int unit, int opthdr, int debug);
-
-       /* Reset a compressor */
-       void    (*comp_reset) (void *state);
-
-       /* Compress a packet */
-       int     (*compress) (void *state, unsigned char *rptr,
-                             unsigned char *obuf, int isize, int osize);
-
-       /* Return compression statistics */
-       void    (*comp_stat) (void *state, struct compstat *stats);
-
-       /* Allocate space for a decompressor (receive side) */
-       void    *(*decomp_alloc) (unsigned char *options, int opt_len);
-
-       /* Free space used by a decompressor */
-       void    (*decomp_free) (void *state);
-
-       /* Initialize a decompressor */
-       int     (*decomp_init) (void *state, unsigned char *options,
-                               int opt_len, int unit, int opthdr, int mru,
-                               int debug);
-
-       /* Reset a decompressor */
-       void    (*decomp_reset) (void *state);
-
-       /* Decompress a packet. */
-       int     (*decompress) (void *state, unsigned char *ibuf, int isize,
-                               unsigned char *obuf, int osize);
-
-       /* Update state for an incompressible packet received */
-       void    (*incomp) (void *state, unsigned char *ibuf, int icnt);
-
-       /* Return decompression statistics */
-       void    (*decomp_stat) (void *state, struct compstat *stats);
-
-       /* Used in locking compressor modules */
-       struct module *owner;
-       /* Extra skb space needed by the compressor algorithm */
-       unsigned int comp_extra;
-};
-
-/*
- * The return value from decompress routine is the length of the
- * decompressed packet if successful, otherwise DECOMP_ERROR
- * or DECOMP_FATALERROR if an error occurred.
- * 
- * We need to make this distinction so that we can disable certain
- * useful functionality, namely sending a CCP reset-request as a result
- * of an error detected after decompression.  This is to avoid infringing
- * a patent held by Motorola.
- * Don't you just lurve software patents.
- */
-
-#define DECOMP_ERROR           -1      /* error detected before decomp. */
-#define DECOMP_FATALERROR      -2      /* error detected after decomp. */
 
 /*
  * CCP codes.
index e0cfec2..289760f 100644 (file)
 # define PR_SET_MM_START_STACK         5
 # define PR_SET_MM_START_BRK           6
 # define PR_SET_MM_BRK                 7
+# define PR_SET_MM_ARG_START           8
+# define PR_SET_MM_ARG_END             9
+# define PR_SET_MM_ENV_START           10
+# define PR_SET_MM_ENV_END             11
+# define PR_SET_MM_AUXV                        12
+# define PR_SET_MM_EXE_FILE            13
 
 /*
  * Set specific pid that is allowed to ptrace the current task.
 #define PR_SET_PTRACER 0x59616d61
 # define PR_SET_PTRACER_ANY ((unsigned long)-1)
 
-#define PR_SET_CHILD_SUBREAPER 36
-#define PR_GET_CHILD_SUBREAPER 37
+#define PR_SET_CHILD_SUBREAPER 36
+#define PR_GET_CHILD_SUBREAPER 37
+
+/*
+ * If no_new_privs is set, then operations that grant new privileges (i.e.
+ * execve) will either fail or not grant them.  This affects suid/sgid,
+ * file capabilities, and LSMs.
+ *
+ * Operations that merely manipulate or drop existing privileges (setresuid,
+ * capset, etc.) will still work.  Drop those privileges if you want them gone.
+ *
+ * Changing LSM security domain is considered a new privilege.  So, for example,
+ * asking selinux for a specific new context (e.g. with runcon) will result
+ * in execve returning -EPERM.
+ *
+ * See Documentation/prctl/no_new_privs.txt for more details.
+ */
+#define PR_SET_NO_NEW_PRIVS    38
+#define PR_GET_NO_NEW_PRIVS    39
+
+#define PR_GET_TID_ADDRESS     40
 
 #endif /* _LINUX_PRCTL_H */
index 94e981f..b65c834 100644 (file)
@@ -67,12 +67,26 @@ struct ptp_perout_request {
        unsigned int rsv[4];          /* Reserved for future use. */
 };
 
+#define PTP_MAX_SAMPLES 25 /* Maximum allowed offset measurement samples. */
+
+struct ptp_sys_offset {
+       unsigned int n_samples; /* Desired number of measurements. */
+       unsigned int rsv[3];    /* Reserved for future use. */
+       /*
+        * Array of interleaved system/phc time stamps. The kernel
+        * will provide 2*n_samples + 1 time stamps, with the last
+        * one as a system time stamp.
+        */
+       struct ptp_clock_time ts[2 * PTP_MAX_SAMPLES + 1];
+};
+
 #define PTP_CLK_MAGIC '='
 
 #define PTP_CLOCK_GETCAPS  _IOR(PTP_CLK_MAGIC, 1, struct ptp_clock_caps)
 #define PTP_EXTTS_REQUEST  _IOW(PTP_CLK_MAGIC, 2, struct ptp_extts_request)
 #define PTP_PEROUT_REQUEST _IOW(PTP_CLK_MAGIC, 3, struct ptp_perout_request)
 #define PTP_ENABLE_PPS     _IOW(PTP_CLK_MAGIC, 4, int)
+#define PTP_SYS_OFFSET     _IOW(PTP_CLK_MAGIC, 5, struct ptp_sys_offset)
 
 struct ptp_extts_event {
        struct ptp_clock_time t; /* Time event occured. */
index e692e39..a8856b6 100644 (file)
@@ -5,6 +5,8 @@
 
 /* has the defines to get at the registers. */
 
+#include <linux/types.h>
+
 #define PTRACE_TRACEME            0
 #define PTRACE_PEEKTEXT                   1
 #define PTRACE_PEEKDATA                   2
 #define PTRACE_INTERRUPT       0x4207
 #define PTRACE_LISTEN          0x4208
 
+#define PTRACE_PEEKSIGINFO     0x4209
+
+struct ptrace_peeksiginfo_args {
+       __u64 off;      /* from which siginfo to start */
+       __u32 flags;
+       __s32 nr;       /* how may siginfos to take */
+};
+
+/* Read signals from a shared (process wide) queue */
+#define PTRACE_PEEKSIGINFO_SHARED      (1 << 0)
+
 /* Wait extended result codes for the above trace options.  */
 #define PTRACE_EVENT_FORK      1
 #define PTRACE_EVENT_VFORK     2
@@ -58,6 +71,7 @@
 #define PTRACE_EVENT_EXEC      4
 #define PTRACE_EVENT_VFORK_DONE        5
 #define PTRACE_EVENT_EXIT      6
+#define PTRACE_EVENT_SECCOMP   7
 /* Extended result codes which enabled by means other than options.  */
 #define PTRACE_EVENT_STOP      128
 
 #define PTRACE_O_TRACEEXEC     (1 << PTRACE_EVENT_EXEC)
 #define PTRACE_O_TRACEVFORKDONE        (1 << PTRACE_EVENT_VFORK_DONE)
 #define PTRACE_O_TRACEEXIT     (1 << PTRACE_EVENT_EXIT)
+#define PTRACE_O_TRACESECCOMP  (1 << PTRACE_EVENT_SECCOMP)
+
+/* eventless options */
+#define PTRACE_O_EXITKILL      (1 << 20)
 
-#define PTRACE_O_MASK          0x0000007f
+#define PTRACE_O_MASK          (0x000000ff | PTRACE_O_EXITKILL)
 
 #include <asm/ptrace.h>
 
 
-#endif
+#endif /* _LINUX_PTRACE_H */
index 16fd614..1cb88d5 100644 (file)
@@ -168,4 +168,4 @@ enum {
 #define QUOTA_NL_A_MAX (__QUOTA_NL_A_MAX - 1)
 
 
-#endif /* _QUOTA_ */
+#endif /* _LINUX_QUOTA_ */
index d5167ab..843769a 100644 (file)
@@ -145,16 +145,18 @@ typedef struct mdp_superblock_s {
        __u32 failed_disks;     /*  4 Number of failed disks                  */
        __u32 spare_disks;      /*  5 Number of spare disks                   */
        __u32 sb_csum;          /*  6 checksum of the whole superblock        */
-#ifdef __BIG_ENDIAN
+#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN)
        __u32 events_hi;        /*  7 high-order of superblock update count   */
        __u32 events_lo;        /*  8 low-order of superblock update count    */
        __u32 cp_events_hi;     /*  9 high-order of checkpoint update count   */
        __u32 cp_events_lo;     /* 10 low-order of checkpoint update count    */
-#else
+#elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN)
        __u32 events_lo;        /*  7 low-order of superblock update count    */
        __u32 events_hi;        /*  8 high-order of superblock update count   */
        __u32 cp_events_lo;     /*  9 low-order of checkpoint update count    */
        __u32 cp_events_hi;     /* 10 high-order of checkpoint update count   */
+#else
+#error unspecified endianness
 #endif
        __u32 recovery_cp;      /* 11 recovery checkpoint sector count        */
        /* There are only valid for minor_version > 90 */
@@ -233,7 +235,10 @@ struct mdp_superblock_1 {
        __le32  delta_disks;    /* change in number of raid_disks               */
        __le32  new_layout;     /* new layout                                   */
        __le32  new_chunk;      /* new chunk size (512byte sectors)             */
-       __u8    pad1[128-124];  /* set to 0 when written */
+       __le32  new_offset;     /* signed number to add to data_offset in new
+                                * layout.  0 == no-change.  This can be
+                                * different on each device in the array.
+                                */
 
        /* constant this-device information - 64 bytes */
        __le64  data_offset;    /* sector start of data, often 0 */
@@ -281,10 +286,18 @@ struct mdp_superblock_1 {
                                            * active device with same 'role'.
                                            * 'recovery_offset' is also set.
                                            */
+#define        MD_FEATURE_RESHAPE_BACKWARDS    32 /* Reshape doesn't change number
+                                           * of devices, but is going
+                                           * backwards anyway.
+                                           */
+#define        MD_FEATURE_NEW_OFFSET           64 /* new_offset must be honoured */
 #define        MD_FEATURE_ALL                  (MD_FEATURE_BITMAP_OFFSET       \
                                        |MD_FEATURE_RECOVERY_OFFSET     \
                                        |MD_FEATURE_RESHAPE_ACTIVE      \
                                        |MD_FEATURE_BAD_BLOCKS          \
-                                       |MD_FEATURE_REPLACEMENT)
+                                       |MD_FEATURE_REPLACEMENT         \
+                                       |MD_FEATURE_RESHAPE_BACKWARDS   \
+                                       |MD_FEATURE_NEW_OFFSET          \
+                                       )
 
 #endif 
index 1185a7d..0e1fe94 100644 (file)
@@ -152,5 +152,4 @@ typedef struct mdu_param_s
        int                     max_fault;      /* unused for now */
 } mdu_param_t;
 
-#endif 
-
+#endif /* _MD_U_H */
index d56ef23..bde52af 100644 (file)
@@ -77,4 +77,4 @@ struct rlimit64 {
 #include <asm/resource.h>
 
 
-#endif
+#endif /* _LINUX_RESOURCE_H */
index abb2c66..557cde2 100644 (file)
@@ -1,6 +1,3 @@
-#ifndef __RFKILL_H
-#define __RFKILL_H
-
 /*
  * Copyright (C) 2006 - 2007 Ivo van Doorn
  * Copyright (C) 2007 Dmitry Torokhov
@@ -18,6 +15,9 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
+#ifndef __RFKILL_H
+#define __RFKILL_H
+
 
 #include <linux/types.h>
 
@@ -37,6 +37,7 @@
  * @RFKILL_TYPE_WWAN: switch is on a wireless WAN device.
  * @RFKILL_TYPE_GPS: switch is on a GPS device.
  * @RFKILL_TYPE_FM: switch is on a FM radio device.
+ * @RFKILL_TYPE_NFC: switch is on an NFC device.
  * @NUM_RFKILL_TYPES: number of defined rfkill types
  */
 enum rfkill_type {
@@ -48,6 +49,7 @@ enum rfkill_type {
        RFKILL_TYPE_WWAN,
        RFKILL_TYPE_GPS,
        RFKILL_TYPE_FM,
+       RFKILL_TYPE_NFC,
        NUM_RFKILL_TYPES,
 };
 
@@ -104,4 +106,4 @@ struct rfkill_event {
 
 /* and that's all userspace gets */
 
-#endif /* RFKILL_H */
+#endif /* __RFKILL_H */
index c06837e..cebd172 100644 (file)
@@ -91,6 +91,9 @@ struct rtc_pll_info {
 #define RTC_PLL_GET    _IOR('p', 0x11, struct rtc_pll_info)  /* Get PLL correction */
 #define RTC_PLL_SET    _IOW('p', 0x12, struct rtc_pll_info)  /* Set PLL correction */
 
+#define RTC_VL_READ    _IOR('p', 0x13, int)    /* Voltage low detector */
+#define RTC_VL_CLR     _IO('p', 0x14)          /* Clear voltage low information */
+
 /* interrupt flags */
 #define RTC_IRQF 0x80  /* Any of the following is active */
 #define RTC_PF 0x40    /* Periodic interrupt */
index d5b7fdd..93370bd 100644 (file)
@@ -120,6 +120,18 @@ enum {
        RTM_SETDCB,
 #define RTM_SETDCB RTM_SETDCB
 
+       RTM_NEWNETCONF = 80,
+#define RTM_NEWNETCONF RTM_NEWNETCONF
+       RTM_GETNETCONF = 82,
+#define RTM_GETNETCONF RTM_GETNETCONF
+
+       RTM_NEWMDB = 84,
+#define RTM_NEWMDB RTM_NEWMDB
+       RTM_DELMDB = 85,
+#define RTM_DELMDB RTM_DELMDB
+       RTM_GETMDB = 86,
+#define RTM_GETMDB RTM_GETMDB
+
        __RTM_MAX,
 #define RTM_MAX                (((__RTM_MAX + 3) & ~3) - 1)
 };
@@ -222,6 +234,7 @@ enum {
 #define RTPROT_XORP    14      /* XORP */
 #define RTPROT_NTK     15      /* Netsukuku */
 #define RTPROT_DHCP    16      /* DHCP client */
+#define RTPROT_MROUTED 17      /* Multicast daemon */
 
 /* rtm_scope
 
@@ -283,6 +296,7 @@ enum rtattr_type_t {
        RTA_MP_ALGO, /* no longer used */
        RTA_TABLE,
        RTA_MARK,
+       RTA_MFC_STATS,
        __RTA_MAX
 };
 
@@ -403,6 +417,12 @@ struct rta_session {
        } u;
 };
 
+struct rta_mfc_stats {
+       __u64   mfcs_packets;
+       __u64   mfcs_bytes;
+       __u64   mfcs_wrong_if;
+};
+
 /****
  *             General form of address family dependent message.
  ****/
@@ -585,6 +605,12 @@ enum rtnetlink_groups {
 #define RTNLGRP_PHONET_ROUTE   RTNLGRP_PHONET_ROUTE
        RTNLGRP_DCB,
 #define RTNLGRP_DCB            RTNLGRP_DCB
+       RTNLGRP_IPV4_NETCONF,
+#define RTNLGRP_IPV4_NETCONF   RTNLGRP_IPV4_NETCONF
+       RTNLGRP_IPV6_NETCONF,
+#define RTNLGRP_IPV6_NETCONF   RTNLGRP_IPV6_NETCONF
+       RTNLGRP_MDB,
+#define RTNLGRP_MDB            RTNLGRP_MDB
        __RTNLGRP_MAX
 };
 #define RTNLGRP_MAX    (__RTNLGRP_MAX - 1)
@@ -602,9 +628,10 @@ struct tcamsg {
 
 /* New extended info filters for IFLA_EXT_MASK */
 #define RTEXT_FILTER_VF                (1 << 0)
+#define RTEXT_FILTER_BRVLAN    (1 << 1)
 
 /* End of information exported to user level */
 
 
 
-#endif /* __LINUX_RTNETLINK_H */
+#endif /* __LINUX_RTNETLINK_H */
index 167cc03..73c0cb2 100644 (file)
@@ -1,7 +1,7 @@
 /* $Id: scc.h,v 1.29 1997/04/02 14:56:45 jreuter Exp jreuter $ */
 
-#ifndef        _SCC_H
-#define        _SCC_H
+#ifndef _SCC_H
+#define _SCC_H
 
 
 /* selection of hardware types */
@@ -169,4 +169,4 @@ struct scc_calibrate {
        unsigned char pattern;
 };
 
-#endif /* defined(_SCC_H) */
+#endif /* _SCC_H */
index dd968cf..605dc53 100644 (file)
@@ -43,4 +43,4 @@
 #define SCHED_RESET_ON_FORK     0x40000000
 
 
-#endif
+#endif /* _LINUX_SCHED_H */
index 956b4f8..c5c4d20 100644 (file)
@@ -68,5 +68,7 @@ struct screen_info {
 
 #define VIDEO_FLAGS_NOCURSOR   (1 << 0) /* The video mode has no cursor set */
 
+#define VIDEO_CAPABILITY_SKIP_QUIRKS   (1 << 0)
+
 
 #endif /* _SCREEN_INFO_H */
diff --git a/usr/include/linux/sctp.h b/usr/include/linux/sctp.h
new file mode 100644 (file)
index 0000000..b3a3614
--- /dev/null
@@ -0,0 +1,840 @@
+/* SCTP kernel implementation
+ * (C) Copyright IBM Corp. 2001, 2004
+ * Copyright (c) 1999-2000 Cisco, Inc.
+ * Copyright (c) 1999-2001 Motorola, Inc.
+ * Copyright (c) 2002 Intel Corp.
+ *
+ * This file is part of the SCTP kernel implementation
+ *
+ * This header represents the structures and constants needed to support
+ * the SCTP Extension to the Sockets API.
+ *
+ * This SCTP implementation 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, or (at your option)
+ * any later version.
+ *
+ * This SCTP implementation 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 GNU CC; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Please send any bug reports or fixes you make to the
+ * email address(es):
+ *    lksctp developers <lksctp-developers@lists.sourceforge.net>
+ *
+ * Or submit a bug report through the following website:
+ *    http://www.sf.net/projects/lksctp
+ *
+ * Written or modified by:
+ *    La Monte H.P. Yarroll    <piggy@acm.org>
+ *    R. Stewart               <randall@sctp.chicago.il.us>
+ *    K. Morneau               <kmorneau@cisco.com>
+ *    Q. Xie                   <qxie1@email.mot.com>
+ *    Karl Knutson             <karl@athena.chicago.il.us>
+ *    Jon Grimm                <jgrimm@us.ibm.com>
+ *    Daisy Chang              <daisyc@us.ibm.com>
+ *    Ryan Layer               <rmlayer@us.ibm.com>
+ *    Ardelle Fan              <ardelle.fan@intel.com>
+ *    Sridhar Samudrala        <sri@us.ibm.com>
+ *    Inaky Perez-Gonzalez     <inaky.gonzalez@intel.com>
+ *    Vlad Yasevich            <vladislav.yasevich@hp.com>
+ *
+ * Any bugs reported given to us we will try to fix... any fixes shared will
+ * be incorporated into the next SCTP release.
+ */
+
+#ifndef _SCTP_H
+#define _SCTP_H
+
+#include <linux/types.h>
+#include <linux/socket.h>
+
+typedef __s32 sctp_assoc_t;
+
+/* The following symbols come from the Sockets API Extensions for
+ * SCTP <draft-ietf-tsvwg-sctpsocket-07.txt>.
+ */
+#define SCTP_RTOINFO   0
+#define SCTP_ASSOCINFO  1
+#define SCTP_INITMSG   2
+#define SCTP_NODELAY   3               /* Get/set nodelay option. */
+#define SCTP_AUTOCLOSE 4
+#define SCTP_SET_PEER_PRIMARY_ADDR 5
+#define SCTP_PRIMARY_ADDR      6
+#define SCTP_ADAPTATION_LAYER  7
+#define SCTP_DISABLE_FRAGMENTS 8
+#define SCTP_PEER_ADDR_PARAMS  9
+#define SCTP_DEFAULT_SEND_PARAM        10
+#define SCTP_EVENTS    11
+#define SCTP_I_WANT_MAPPED_V4_ADDR 12  /* Turn on/off mapped v4 addresses  */
+#define SCTP_MAXSEG    13              /* Get/set maximum fragment. */
+#define SCTP_STATUS    14
+#define SCTP_GET_PEER_ADDR_INFO        15
+#define SCTP_DELAYED_ACK_TIME  16
+#define SCTP_DELAYED_ACK SCTP_DELAYED_ACK_TIME
+#define SCTP_DELAYED_SACK SCTP_DELAYED_ACK_TIME
+#define SCTP_CONTEXT   17
+#define SCTP_FRAGMENT_INTERLEAVE       18
+#define SCTP_PARTIAL_DELIVERY_POINT    19 /* Set/Get partial delivery point */
+#define SCTP_MAX_BURST 20              /* Set/Get max burst */
+#define SCTP_AUTH_CHUNK        21      /* Set only: add a chunk type to authenticate */
+#define SCTP_HMAC_IDENT        22
+#define SCTP_AUTH_KEY  23
+#define SCTP_AUTH_ACTIVE_KEY   24
+#define SCTP_AUTH_DELETE_KEY   25
+#define SCTP_PEER_AUTH_CHUNKS  26      /* Read only */
+#define SCTP_LOCAL_AUTH_CHUNKS 27      /* Read only */
+#define SCTP_GET_ASSOC_NUMBER  28      /* Read only */
+#define SCTP_GET_ASSOC_ID_LIST 29      /* Read only */
+#define SCTP_AUTO_ASCONF       30
+#define SCTP_PEER_ADDR_THLDS   31
+
+/* Internal Socket Options. Some of the sctp library functions are
+ * implemented using these socket options.
+ */
+#define SCTP_SOCKOPT_BINDX_ADD 100     /* BINDX requests for adding addrs */
+#define SCTP_SOCKOPT_BINDX_REM 101     /* BINDX requests for removing addrs. */
+#define SCTP_SOCKOPT_PEELOFF   102     /* peel off association. */
+/* Options 104-106 are deprecated and removed. Do not use this space */
+#define SCTP_SOCKOPT_CONNECTX_OLD      107     /* CONNECTX old requests. */
+#define SCTP_GET_PEER_ADDRS    108             /* Get all peer address. */
+#define SCTP_GET_LOCAL_ADDRS   109             /* Get all local address. */
+#define SCTP_SOCKOPT_CONNECTX  110             /* CONNECTX requests. */
+#define SCTP_SOCKOPT_CONNECTX3 111     /* CONNECTX requests (updated) */
+#define SCTP_GET_ASSOC_STATS   112     /* Read only */
+
+/*
+ * 5.2.1 SCTP Initiation Structure (SCTP_INIT)
+ *
+ *   This cmsghdr structure provides information for initializing new
+ *   SCTP associations with sendmsg().  The SCTP_INITMSG socket option
+ *   uses this same data structure.  This structure is not used for
+ *   recvmsg().
+ *
+ *   cmsg_level    cmsg_type      cmsg_data[]
+ *   ------------  ------------   ----------------------
+ *   IPPROTO_SCTP  SCTP_INIT      struct sctp_initmsg
+ *
+ */
+struct sctp_initmsg {
+       __u16 sinit_num_ostreams;
+       __u16 sinit_max_instreams;
+       __u16 sinit_max_attempts;
+       __u16 sinit_max_init_timeo;
+};
+
+/*
+ * 5.2.2 SCTP Header Information Structure (SCTP_SNDRCV)
+ *
+ *   This cmsghdr structure specifies SCTP options for sendmsg() and
+ *   describes SCTP header information about a received message through
+ *   recvmsg().
+ *
+ *   cmsg_level    cmsg_type      cmsg_data[]
+ *   ------------  ------------   ----------------------
+ *   IPPROTO_SCTP  SCTP_SNDRCV    struct sctp_sndrcvinfo
+ *
+ */
+struct sctp_sndrcvinfo {
+       __u16 sinfo_stream;
+       __u16 sinfo_ssn;
+       __u16 sinfo_flags;
+       __u32 sinfo_ppid;
+       __u32 sinfo_context;
+       __u32 sinfo_timetolive;
+       __u32 sinfo_tsn;
+       __u32 sinfo_cumtsn;
+       sctp_assoc_t sinfo_assoc_id;
+};
+
+/*
+ *  sinfo_flags: 16 bits (unsigned integer)
+ *
+ *   This field may contain any of the following flags and is composed of
+ *   a bitwise OR of these values.
+ */
+
+enum sctp_sinfo_flags {
+       SCTP_UNORDERED = 1,  /* Send/receive message unordered. */
+       SCTP_ADDR_OVER = 2,  /* Override the primary destination. */
+       SCTP_ABORT=4,        /* Send an ABORT message to the peer. */
+       SCTP_SACK_IMMEDIATELY = 8,      /* SACK should be sent without delay */
+       SCTP_EOF=MSG_FIN,    /* Initiate graceful shutdown process. */
+};
+
+typedef union {
+       __u8                    raw;
+       struct sctp_initmsg     init;
+       struct sctp_sndrcvinfo  sndrcv;
+} sctp_cmsg_data_t;
+
+/* These are cmsg_types.  */
+typedef enum sctp_cmsg_type {
+       SCTP_INIT,              /* 5.2.1 SCTP Initiation Structure */
+#define SCTP_INIT      SCTP_INIT
+       SCTP_SNDRCV,            /* 5.2.2 SCTP Header Information Structure */
+#define SCTP_SNDRCV    SCTP_SNDRCV
+} sctp_cmsg_t;
+
+/*
+ * 5.3.1.1 SCTP_ASSOC_CHANGE
+ *
+ *   Communication notifications inform the ULP that an SCTP association
+ *   has either begun or ended. The identifier for a new association is
+ *   provided by this notificaion. The notification information has the
+ *   following format:
+ *
+ */
+struct sctp_assoc_change {
+       __u16 sac_type;
+       __u16 sac_flags;
+       __u32 sac_length;
+       __u16 sac_state;
+       __u16 sac_error;
+       __u16 sac_outbound_streams;
+       __u16 sac_inbound_streams;
+       sctp_assoc_t sac_assoc_id;
+       __u8 sac_info[0];
+};
+
+/*
+ *   sac_state: 32 bits (signed integer)
+ *
+ *   This field holds one of a number of values that communicate the
+ *   event that happened to the association.  They include:
+ *
+ *   Note:  The following state names deviate from the API draft as
+ *   the names clash too easily with other kernel symbols.
+ */
+enum sctp_sac_state {
+       SCTP_COMM_UP,
+       SCTP_COMM_LOST,
+       SCTP_RESTART,
+       SCTP_SHUTDOWN_COMP,
+       SCTP_CANT_STR_ASSOC,
+};
+
+/*
+ * 5.3.1.2 SCTP_PEER_ADDR_CHANGE
+ *
+ *   When a destination address on a multi-homed peer encounters a change
+ *   an interface details event is sent.  The information has the
+ *   following structure:
+ */
+struct sctp_paddr_change {
+       __u16 spc_type;
+       __u16 spc_flags;
+       __u32 spc_length;
+       struct sockaddr_storage spc_aaddr;
+       int spc_state;
+       int spc_error;
+       sctp_assoc_t spc_assoc_id;
+} __attribute__((packed, aligned(4)));
+
+/*
+ *    spc_state:  32 bits (signed integer)
+ *
+ *   This field holds one of a number of values that communicate the
+ *   event that happened to the address.  They include:
+ */
+enum sctp_spc_state {
+       SCTP_ADDR_AVAILABLE,
+       SCTP_ADDR_UNREACHABLE,
+       SCTP_ADDR_REMOVED,
+       SCTP_ADDR_ADDED,
+       SCTP_ADDR_MADE_PRIM,
+       SCTP_ADDR_CONFIRMED,
+};
+
+
+/*
+ * 5.3.1.3 SCTP_REMOTE_ERROR
+ *
+ *   A remote peer may send an Operational Error message to its peer.
+ *   This message indicates a variety of error conditions on an
+ *   association. The entire error TLV as it appears on the wire is
+ *   included in a SCTP_REMOTE_ERROR event.  Please refer to the SCTP
+ *   specification [SCTP] and any extensions for a list of possible
+ *   error formats. SCTP error TLVs have the format:
+ */
+struct sctp_remote_error {
+       __u16 sre_type;
+       __u16 sre_flags;
+       __u32 sre_length;
+       __u16 sre_error;
+       sctp_assoc_t sre_assoc_id;
+       __u8 sre_data[0];
+};
+
+
+/*
+ * 5.3.1.4 SCTP_SEND_FAILED
+ *
+ *   If SCTP cannot deliver a message it may return the message as a
+ *   notification.
+ */
+struct sctp_send_failed {
+       __u16 ssf_type;
+       __u16 ssf_flags;
+       __u32 ssf_length;
+       __u32 ssf_error;
+       struct sctp_sndrcvinfo ssf_info;
+       sctp_assoc_t ssf_assoc_id;
+       __u8 ssf_data[0];
+};
+
+/*
+ *   ssf_flags: 16 bits (unsigned integer)
+ *
+ *   The flag value will take one of the following values
+ *
+ *   SCTP_DATA_UNSENT  - Indicates that the data was never put on
+ *                       the wire.
+ *
+ *   SCTP_DATA_SENT    - Indicates that the data was put on the wire.
+ *                       Note that this does not necessarily mean that the
+ *                       data was (or was not) successfully delivered.
+ */
+enum sctp_ssf_flags {
+       SCTP_DATA_UNSENT,
+       SCTP_DATA_SENT,
+};
+
+/*
+ * 5.3.1.5 SCTP_SHUTDOWN_EVENT
+ *
+ *   When a peer sends a SHUTDOWN, SCTP delivers this notification to
+ *   inform the application that it should cease sending data.
+ */
+struct sctp_shutdown_event {
+       __u16 sse_type;
+       __u16 sse_flags;
+       __u32 sse_length;
+       sctp_assoc_t sse_assoc_id;
+};
+
+/*
+ * 5.3.1.6 SCTP_ADAPTATION_INDICATION
+ *
+ *   When a peer sends a Adaptation Layer Indication parameter , SCTP
+ *   delivers this notification to inform the application
+ *   that of the peers requested adaptation layer.
+ */
+struct sctp_adaptation_event {
+       __u16 sai_type;
+       __u16 sai_flags;
+       __u32 sai_length;
+       __u32 sai_adaptation_ind;
+       sctp_assoc_t sai_assoc_id;
+};
+
+/*
+ * 5.3.1.7 SCTP_PARTIAL_DELIVERY_EVENT
+ *
+ *   When a receiver is engaged in a partial delivery of a
+ *   message this notification will be used to indicate
+ *   various events.
+ */
+struct sctp_pdapi_event {
+       __u16 pdapi_type;
+       __u16 pdapi_flags;
+       __u32 pdapi_length;
+       __u32 pdapi_indication;
+       sctp_assoc_t pdapi_assoc_id;
+};
+
+enum { SCTP_PARTIAL_DELIVERY_ABORTED=0, };
+
+/*
+ * 5.3.1.8.  SCTP_AUTHENTICATION_EVENT
+ *
+ *  When a receiver is using authentication this message will provide
+ *  notifications regarding new keys being made active as well as errors.
+ */
+struct sctp_authkey_event {
+       __u16 auth_type;
+       __u16 auth_flags;
+       __u32 auth_length;
+       __u16 auth_keynumber;
+       __u16 auth_altkeynumber;
+       __u32 auth_indication;
+       sctp_assoc_t auth_assoc_id;
+};
+
+enum { SCTP_AUTH_NEWKEY = 0, };
+
+/*
+ * 6.1.9. SCTP_SENDER_DRY_EVENT
+ *
+ * When the SCTP stack has no more user data to send or retransmit, this
+ * notification is given to the user. Also, at the time when a user app
+ * subscribes to this event, if there is no data to be sent or
+ * retransmit, the stack will immediately send up this notification.
+ */
+struct sctp_sender_dry_event {
+       __u16 sender_dry_type;
+       __u16 sender_dry_flags;
+       __u32 sender_dry_length;
+       sctp_assoc_t sender_dry_assoc_id;
+};
+
+/*
+ * Described in Section 7.3
+ *   Ancillary Data and Notification Interest Options
+ */
+struct sctp_event_subscribe {
+       __u8 sctp_data_io_event;
+       __u8 sctp_association_event;
+       __u8 sctp_address_event;
+       __u8 sctp_send_failure_event;
+       __u8 sctp_peer_error_event;
+       __u8 sctp_shutdown_event;
+       __u8 sctp_partial_delivery_event;
+       __u8 sctp_adaptation_layer_event;
+       __u8 sctp_authentication_event;
+       __u8 sctp_sender_dry_event;
+};
+
+/*
+ * 5.3.1 SCTP Notification Structure
+ *
+ *   The notification structure is defined as the union of all
+ *   notification types.
+ *
+ */
+union sctp_notification {
+       struct {
+               __u16 sn_type;             /* Notification type. */
+               __u16 sn_flags;
+               __u32 sn_length;
+       } sn_header;
+       struct sctp_assoc_change sn_assoc_change;
+       struct sctp_paddr_change sn_paddr_change;
+       struct sctp_remote_error sn_remote_error;
+       struct sctp_send_failed sn_send_failed;
+       struct sctp_shutdown_event sn_shutdown_event;
+       struct sctp_adaptation_event sn_adaptation_event;
+       struct sctp_pdapi_event sn_pdapi_event;
+       struct sctp_authkey_event sn_authkey_event;
+       struct sctp_sender_dry_event sn_sender_dry_event;
+};
+
+/* Section 5.3.1
+ * All standard values for sn_type flags are greater than 2^15.
+ * Values from 2^15 and down are reserved.
+ */
+
+enum sctp_sn_type {
+       SCTP_SN_TYPE_BASE     = (1<<15),
+       SCTP_ASSOC_CHANGE,
+#define SCTP_ASSOC_CHANGE              SCTP_ASSOC_CHANGE
+       SCTP_PEER_ADDR_CHANGE,
+#define SCTP_PEER_ADDR_CHANGE          SCTP_PEER_ADDR_CHANGE
+       SCTP_SEND_FAILED,
+#define SCTP_SEND_FAILED               SCTP_SEND_FAILED
+       SCTP_REMOTE_ERROR,
+#define SCTP_REMOTE_ERROR              SCTP_REMOTE_ERROR
+       SCTP_SHUTDOWN_EVENT,
+#define SCTP_SHUTDOWN_EVENT            SCTP_SHUTDOWN_EVENT
+       SCTP_PARTIAL_DELIVERY_EVENT,
+#define SCTP_PARTIAL_DELIVERY_EVENT    SCTP_PARTIAL_DELIVERY_EVENT
+       SCTP_ADAPTATION_INDICATION,
+#define SCTP_ADAPTATION_INDICATION     SCTP_ADAPTATION_INDICATION
+       SCTP_AUTHENTICATION_EVENT,
+#define SCTP_AUTHENTICATION_INDICATION SCTP_AUTHENTICATION_EVENT
+       SCTP_SENDER_DRY_EVENT,
+#define SCTP_SENDER_DRY_EVENT          SCTP_SENDER_DRY_EVENT
+};
+
+/* Notification error codes used to fill up the error fields in some
+ * notifications.
+ * SCTP_PEER_ADDRESS_CHAGE     : spc_error
+ * SCTP_ASSOC_CHANGE           : sac_error
+ * These names should be potentially included in the draft 04 of the SCTP
+ * sockets API specification.
+ */
+typedef enum sctp_sn_error {
+       SCTP_FAILED_THRESHOLD,
+       SCTP_RECEIVED_SACK,
+       SCTP_HEARTBEAT_SUCCESS,
+       SCTP_RESPONSE_TO_USER_REQ,
+       SCTP_INTERNAL_ERROR,
+       SCTP_SHUTDOWN_GUARD_EXPIRES,
+       SCTP_PEER_FAULTY,
+} sctp_sn_error_t;
+
+/*
+ * 7.1.1 Retransmission Timeout Parameters (SCTP_RTOINFO)
+ *
+ *   The protocol parameters used to initialize and bound retransmission
+ *   timeout (RTO) are tunable.  See [SCTP] for more information on how
+ *   these parameters are used in RTO calculation.
+ */
+struct sctp_rtoinfo {
+       sctp_assoc_t    srto_assoc_id;
+       __u32           srto_initial;
+       __u32           srto_max;
+       __u32           srto_min;
+};
+
+/*
+ * 7.1.2 Association Parameters (SCTP_ASSOCINFO)
+ *
+ *   This option is used to both examine and set various association and
+ *   endpoint parameters.
+ */
+struct sctp_assocparams {
+       sctp_assoc_t    sasoc_assoc_id;
+       __u16           sasoc_asocmaxrxt;
+       __u16           sasoc_number_peer_destinations;
+       __u32           sasoc_peer_rwnd;
+       __u32           sasoc_local_rwnd;
+       __u32           sasoc_cookie_life;
+};
+
+/*
+ * 7.1.9 Set Peer Primary Address (SCTP_SET_PEER_PRIMARY_ADDR)
+ *
+ *  Requests that the peer mark the enclosed address as the association
+ *  primary. The enclosed address must be one of the association's
+ *  locally bound addresses. The following structure is used to make a
+ *   set primary request:
+ */
+struct sctp_setpeerprim {
+       sctp_assoc_t            sspp_assoc_id;
+       struct sockaddr_storage sspp_addr;
+} __attribute__((packed, aligned(4)));
+
+/*
+ * 7.1.10 Set Primary Address (SCTP_PRIMARY_ADDR)
+ *
+ *  Requests that the local SCTP stack use the enclosed peer address as
+ *  the association primary. The enclosed address must be one of the
+ *  association peer's addresses. The following structure is used to
+ *  make a set peer primary request:
+ */
+struct sctp_prim {
+       sctp_assoc_t            ssp_assoc_id;
+       struct sockaddr_storage ssp_addr;
+} __attribute__((packed, aligned(4)));
+
+/* For backward compatibility use, define the old name too */
+#define sctp_setprim   sctp_prim
+
+/*
+ * 7.1.11 Set Adaptation Layer Indicator (SCTP_ADAPTATION_LAYER)
+ *
+ * Requests that the local endpoint set the specified Adaptation Layer
+ * Indication parameter for all future INIT and INIT-ACK exchanges.
+ */
+struct sctp_setadaptation {
+       __u32   ssb_adaptation_ind;
+};
+
+/*
+ * 7.1.13 Peer Address Parameters  (SCTP_PEER_ADDR_PARAMS)
+ *
+ *   Applications can enable or disable heartbeats for any peer address
+ *   of an association, modify an address's heartbeat interval, force a
+ *   heartbeat to be sent immediately, and adjust the address's maximum
+ *   number of retransmissions sent before an address is considered
+ *   unreachable. The following structure is used to access and modify an
+ *   address's parameters:
+ */
+enum  sctp_spp_flags {
+       SPP_HB_ENABLE = 1<<0,           /*Enable heartbeats*/
+       SPP_HB_DISABLE = 1<<1,          /*Disable heartbeats*/
+       SPP_HB = SPP_HB_ENABLE | SPP_HB_DISABLE,
+       SPP_HB_DEMAND = 1<<2,           /*Send heartbeat immediately*/
+       SPP_PMTUD_ENABLE = 1<<3,        /*Enable PMTU discovery*/
+       SPP_PMTUD_DISABLE = 1<<4,       /*Disable PMTU discovery*/
+       SPP_PMTUD = SPP_PMTUD_ENABLE | SPP_PMTUD_DISABLE,
+       SPP_SACKDELAY_ENABLE = 1<<5,    /*Enable SACK*/
+       SPP_SACKDELAY_DISABLE = 1<<6,   /*Disable SACK*/
+       SPP_SACKDELAY = SPP_SACKDELAY_ENABLE | SPP_SACKDELAY_DISABLE,
+       SPP_HB_TIME_IS_ZERO = 1<<7,     /* Set HB delay to 0 */
+};
+
+struct sctp_paddrparams {
+       sctp_assoc_t            spp_assoc_id;
+       struct sockaddr_storage spp_address;
+       __u32                   spp_hbinterval;
+       __u16                   spp_pathmaxrxt;
+       __u32                   spp_pathmtu;
+       __u32                   spp_sackdelay;
+       __u32                   spp_flags;
+} __attribute__((packed, aligned(4)));
+
+/*
+ * 7.1.18.  Add a chunk that must be authenticated (SCTP_AUTH_CHUNK)
+ *
+ * This set option adds a chunk type that the user is requesting to be
+ * received only in an authenticated way.  Changes to the list of chunks
+ * will only effect future associations on the socket.
+ */
+struct sctp_authchunk {
+       __u8            sauth_chunk;
+};
+
+/*
+ * 7.1.19.  Get or set the list of supported HMAC Identifiers (SCTP_HMAC_IDENT)
+ *
+ * This option gets or sets the list of HMAC algorithms that the local
+ * endpoint requires the peer to use.
+ */
+/* This here is only used by user space as is. It might not be a good idea
+ * to export/reveal the whole structure with reserved fields etc.
+ */
+enum {
+       SCTP_AUTH_HMAC_ID_SHA1 = 1,
+       SCTP_AUTH_HMAC_ID_SHA256 = 3,
+};
+
+struct sctp_hmacalgo {
+       __u32           shmac_num_idents;
+       __u16           shmac_idents[];
+};
+
+/* Sadly, user and kernel space have different names for
+ * this structure member, so this is to not break anything.
+ */
+#define shmac_number_of_idents shmac_num_idents
+
+/*
+ * 7.1.20.  Set a shared key (SCTP_AUTH_KEY)
+ *
+ * This option will set a shared secret key which is used to build an
+ * association shared key.
+ */
+struct sctp_authkey {
+       sctp_assoc_t    sca_assoc_id;
+       __u16           sca_keynumber;
+       __u16           sca_keylength;
+       __u8            sca_key[];
+};
+
+/*
+ * 7.1.21.  Get or set the active shared key (SCTP_AUTH_ACTIVE_KEY)
+ *
+ * This option will get or set the active shared key to be used to build
+ * the association shared key.
+ */
+
+struct sctp_authkeyid {
+       sctp_assoc_t    scact_assoc_id;
+       __u16           scact_keynumber;
+};
+
+
+/*
+ * 7.1.23.  Get or set delayed ack timer (SCTP_DELAYED_SACK)
+ *
+ * This option will effect the way delayed acks are performed.  This
+ * option allows you to get or set the delayed ack time, in
+ * milliseconds.  It also allows changing the delayed ack frequency.
+ * Changing the frequency to 1 disables the delayed sack algorithm.  If
+ * the assoc_id is 0, then this sets or gets the endpoints default
+ * values.  If the assoc_id field is non-zero, then the set or get
+ * effects the specified association for the one to many model (the
+ * assoc_id field is ignored by the one to one model).  Note that if
+ * sack_delay or sack_freq are 0 when setting this option, then the
+ * current values will remain unchanged.
+ */
+struct sctp_sack_info {
+       sctp_assoc_t    sack_assoc_id;
+       uint32_t        sack_delay;
+       uint32_t        sack_freq;
+};
+
+struct sctp_assoc_value {
+    sctp_assoc_t            assoc_id;
+    uint32_t                assoc_value;
+};
+
+/*
+ * 7.2.2 Peer Address Information
+ *
+ *   Applications can retrieve information about a specific peer address
+ *   of an association, including its reachability state, congestion
+ *   window, and retransmission timer values.  This information is
+ *   read-only. The following structure is used to access this
+ *   information:
+ */
+struct sctp_paddrinfo {
+       sctp_assoc_t            spinfo_assoc_id;
+       struct sockaddr_storage spinfo_address;
+       __s32                   spinfo_state;
+       __u32                   spinfo_cwnd;
+       __u32                   spinfo_srtt;
+       __u32                   spinfo_rto;
+       __u32                   spinfo_mtu;
+} __attribute__((packed, aligned(4)));
+
+/* Peer addresses's state. */
+/* UNKNOWN: Peer address passed by the upper layer in sendmsg or connect[x]
+ * calls.
+ * UNCONFIRMED: Peer address received in INIT/INIT-ACK address parameters.
+ *              Not yet confirmed by a heartbeat and not available for data
+ *             transfers.
+ * ACTIVE : Peer address confirmed, active and available for data transfers.
+ * INACTIVE: Peer address inactive and not available for data transfers.
+ */
+enum sctp_spinfo_state {
+       SCTP_INACTIVE,
+       SCTP_PF,
+       SCTP_ACTIVE,
+       SCTP_UNCONFIRMED,
+       SCTP_UNKNOWN = 0xffff  /* Value used for transport state unknown */
+};
+
+/*
+ * 7.2.1 Association Status (SCTP_STATUS)
+ *
+ *   Applications can retrieve current status information about an
+ *   association, including association state, peer receiver window size,
+ *   number of unacked data chunks, and number of data chunks pending
+ *   receipt.  This information is read-only.  The following structure is
+ *   used to access this information:
+ */
+struct sctp_status {
+       sctp_assoc_t            sstat_assoc_id;
+       __s32                   sstat_state;
+       __u32                   sstat_rwnd;
+       __u16                   sstat_unackdata;
+       __u16                   sstat_penddata;
+       __u16                   sstat_instrms;
+       __u16                   sstat_outstrms;
+       __u32                   sstat_fragmentation_point;
+       struct sctp_paddrinfo   sstat_primary;
+};
+
+/*
+ * 7.2.3.  Get the list of chunks the peer requires to be authenticated
+ *         (SCTP_PEER_AUTH_CHUNKS)
+ *
+ * This option gets a list of chunks for a specified association that
+ * the peer requires to be received authenticated only.
+ */
+struct sctp_authchunks {
+       sctp_assoc_t    gauth_assoc_id;
+       __u32           gauth_number_of_chunks;
+       uint8_t         gauth_chunks[];
+};
+
+/* The broken spelling has been released already in lksctp-tools header,
+ * so don't break anyone, now that it's fixed.
+ */
+#define guth_number_of_chunks  gauth_number_of_chunks
+
+/* Association states.  */
+enum sctp_sstat_state {
+       SCTP_EMPTY                = 0,
+       SCTP_CLOSED               = 1,
+       SCTP_COOKIE_WAIT          = 2,
+       SCTP_COOKIE_ECHOED        = 3,
+       SCTP_ESTABLISHED          = 4,
+       SCTP_SHUTDOWN_PENDING     = 5,
+       SCTP_SHUTDOWN_SENT        = 6,
+       SCTP_SHUTDOWN_RECEIVED    = 7,
+       SCTP_SHUTDOWN_ACK_SENT    = 8,
+};
+
+/*
+ * 8.2.6. Get the Current Identifiers of Associations
+ *        (SCTP_GET_ASSOC_ID_LIST)
+ *
+ * This option gets the current list of SCTP association identifiers of
+ * the SCTP associations handled by a one-to-many style socket.
+ */
+struct sctp_assoc_ids {
+       __u32           gaids_number_of_ids;
+       sctp_assoc_t    gaids_assoc_id[];
+};
+
+/*
+ * 8.3, 8.5 get all peer/local addresses in an association.
+ * This parameter struct is used by SCTP_GET_PEER_ADDRS and
+ * SCTP_GET_LOCAL_ADDRS socket options used internally to implement
+ * sctp_getpaddrs() and sctp_getladdrs() API.
+ */
+struct sctp_getaddrs_old {
+       sctp_assoc_t            assoc_id;
+       int                     addr_num;
+       struct sockaddr         *addrs;
+};
+
+struct sctp_getaddrs {
+       sctp_assoc_t            assoc_id; /*input*/
+       __u32                   addr_num; /*output*/
+       __u8                    addrs[0]; /*output, variable size*/
+};
+
+/* A socket user request obtained via SCTP_GET_ASSOC_STATS that retrieves
+ * association stats. All stats are counts except sas_maxrto and
+ * sas_obs_rto_ipaddr. maxrto is the max observed rto + transport since
+ * the last call. Will return 0 when RTO was not update since last call
+ */
+struct sctp_assoc_stats {
+       sctp_assoc_t    sas_assoc_id;    /* Input */
+                                        /* Transport of observed max RTO */
+       struct sockaddr_storage sas_obs_rto_ipaddr;
+       __u64           sas_maxrto;      /* Maximum Observed RTO for period */
+       __u64           sas_isacks;      /* SACKs received */
+       __u64           sas_osacks;      /* SACKs sent */
+       __u64           sas_opackets;    /* Packets sent */
+       __u64           sas_ipackets;    /* Packets received */
+       __u64           sas_rtxchunks;   /* Retransmitted Chunks */
+       __u64           sas_outofseqtsns;/* TSN received > next expected */
+       __u64           sas_idupchunks;  /* Dups received (ordered+unordered) */
+       __u64           sas_gapcnt;      /* Gap Acknowledgements Received */
+       __u64           sas_ouodchunks;  /* Unordered data chunks sent */
+       __u64           sas_iuodchunks;  /* Unordered data chunks received */
+       __u64           sas_oodchunks;   /* Ordered data chunks sent */
+       __u64           sas_iodchunks;   /* Ordered data chunks received */
+       __u64           sas_octrlchunks; /* Control chunks sent */
+       __u64           sas_ictrlchunks; /* Control chunks received */
+};
+
+/* These are bit fields for msghdr->msg_flags.  See section 5.1.  */
+/* On user space Linux, these live in <bits/socket.h> as an enum.  */
+enum sctp_msg_flags {
+       MSG_NOTIFICATION = 0x8000,
+#define MSG_NOTIFICATION MSG_NOTIFICATION
+};
+
+/*
+ * 8.1 sctp_bindx()
+ *
+ * The flags parameter is formed from the bitwise OR of zero or more of the
+ * following currently defined flags:
+ */
+#define SCTP_BINDX_ADD_ADDR 0x01
+#define SCTP_BINDX_REM_ADDR 0x02
+
+/* This is the structure that is passed as an argument(optval) to
+ * getsockopt(SCTP_SOCKOPT_PEELOFF).
+ */
+typedef struct {
+       sctp_assoc_t associd;
+       int sd;
+} sctp_peeloff_arg_t;
+
+/*
+ *  Peer Address Thresholds socket option
+ */
+struct sctp_paddrthlds {
+       sctp_assoc_t spt_assoc_id;
+       struct sockaddr_storage spt_address;
+       __u16 spt_pathmaxrxt;
+       __u16 spt_pathpfthld;
+};
+
+#endif /* _SCTP_H */
index 414f7ec..0760ba4 100644 (file)
@@ -113,4 +113,4 @@ struct sdla_dlci_conf {
 };
 
 
-#endif
+#endif /* SDLA_H */
diff --git a/usr/include/linux/seccomp.h b/usr/include/linux/seccomp.h
new file mode 100644 (file)
index 0000000..9c03683
--- /dev/null
@@ -0,0 +1,47 @@
+#ifndef _LINUX_SECCOMP_H
+#define _LINUX_SECCOMP_H
+
+
+#include <linux/types.h>
+
+
+/* Valid values for seccomp.mode and prctl(PR_SET_SECCOMP, <mode>) */
+#define SECCOMP_MODE_DISABLED  0 /* seccomp is not in use. */
+#define SECCOMP_MODE_STRICT    1 /* uses hard-coded filter. */
+#define SECCOMP_MODE_FILTER    2 /* uses user-supplied filter. */
+
+/*
+ * All BPF programs must return a 32-bit value.
+ * The bottom 16-bits are for optional return data.
+ * The upper 16-bits are ordered from least permissive values to most.
+ *
+ * The ordering ensures that a min_t() over composed return values always
+ * selects the least permissive choice.
+ */
+#define SECCOMP_RET_KILL       0x00000000U /* kill the task immediately */
+#define SECCOMP_RET_TRAP       0x00030000U /* disallow and force a SIGSYS */
+#define SECCOMP_RET_ERRNO      0x00050000U /* returns an errno */
+#define SECCOMP_RET_TRACE      0x7ff00000U /* pass to a tracer or disallow */
+#define SECCOMP_RET_ALLOW      0x7fff0000U /* allow */
+
+/* Masks for the return value sections. */
+#define SECCOMP_RET_ACTION     0x7fff0000U
+#define SECCOMP_RET_DATA       0x0000ffffU
+
+/**
+ * struct seccomp_data - the format the BPF program executes over.
+ * @nr: the system call number
+ * @arch: indicates system call convention as an AUDIT_ARCH_* value
+ *        as defined in <linux/audit.h>.
+ * @instruction_pointer: at the time of the system call.
+ * @args: up to 6 system call arguments always stored as 64-bit values
+ *        regardless of the architecture.
+ */
+struct seccomp_data {
+       int nr;
+       __u32 arch;
+       __u64 instruction_pointer;
+       __u64 args[6];
+};
+
+#endif /* _LINUX_SECCOMP_H */
index 2035c62..fa1a9f5 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef _LINUX_SECUREBITS_H
-#define _LINUX_SECUREBITS_H 1
+#define _LINUX_SECUREBITS_H
 
 /* Each securesetting is implemented using two bits. One bit specifies
    whether the setting is on or off. The other bit specify whether the
@@ -48,4 +48,4 @@
                                 issecure_mask(SECURE_KEEP_CAPS))
 #define SECURE_ALL_LOCKS       (SECURE_ALL_BITS << 1)
 
-#endif /* !_LINUX_SECUREBITS_H */
+#endif /* _LINUX_SECUREBITS_H */
index 2c3ab61..4d04115 100644 (file)
@@ -12,6 +12,8 @@
 
 #include <linux/types.h>
 
+#include <linux/tty_flags.h>
+
 
 struct serial_struct {
        int     type;
@@ -64,91 +66,11 @@ struct serial_struct {
 #define SERIAL_IO_HUB6 1
 #define SERIAL_IO_MEM  2
 
-struct serial_uart_config {
-       char    *name;
-       int     dfl_xmit_fifo_size;
-       int     flags;
-};
-
 #define UART_CLEAR_FIFO                0x01
 #define UART_USE_FIFO          0x02
 #define UART_STARTECH          0x04
 #define UART_NATSEMI           0x08
 
-/*
- * Definitions for async_struct (and serial_struct) flags field
- *
- * Define ASYNCB_* for convenient use with {test,set,clear}_bit.
- */
-#define ASYNCB_HUP_NOTIFY       0 /* Notify getty on hangups and closes
-                                   * on the callout port */
-#define ASYNCB_FOURPORT                 1 /* Set OU1, OUT2 per AST Fourport settings */
-#define ASYNCB_SAK              2 /* Secure Attention Key (Orange book) */
-#define ASYNCB_SPLIT_TERMIOS    3 /* Separate termios for dialin/callout */
-#define ASYNCB_SPD_HI           4 /* Use 56000 instead of 38400 bps */
-#define ASYNCB_SPD_VHI          5 /* Use 115200 instead of 38400 bps */
-#define ASYNCB_SKIP_TEST        6 /* Skip UART test during autoconfiguration */
-#define ASYNCB_AUTO_IRQ                 7 /* Do automatic IRQ during
-                                   * autoconfiguration */
-#define ASYNCB_SESSION_LOCKOUT  8 /* Lock out cua opens based on session */
-#define ASYNCB_PGRP_LOCKOUT     9 /* Lock out cua opens based on pgrp */
-#define ASYNCB_CALLOUT_NOHUP   10 /* Don't do hangups for cua device */
-#define ASYNCB_HARDPPS_CD      11 /* Call hardpps when CD goes high  */
-#define ASYNCB_SPD_SHI         12 /* Use 230400 instead of 38400 bps */
-#define ASYNCB_LOW_LATENCY     13 /* Request low latency behaviour */
-#define ASYNCB_BUGGY_UART      14 /* This is a buggy UART, skip some safety
-                                   * checks.  Note: can be dangerous! */
-#define ASYNCB_AUTOPROBE       15 /* Port was autoprobed by PCI or PNP code */
-#define ASYNCB_LAST_USER       15
-
-/* Internal flags used only by kernel */
-#define ASYNCB_INITIALIZED     31 /* Serial port was initialized */
-#define ASYNCB_SUSPENDED       30 /* Serial port is suspended */
-#define ASYNCB_NORMAL_ACTIVE   29 /* Normal device is active */
-#define ASYNCB_BOOT_AUTOCONF   28 /* Autoconfigure port on bootup */
-#define ASYNCB_CLOSING         27 /* Serial port is closing */
-#define ASYNCB_CTS_FLOW                26 /* Do CTS flow control */
-#define ASYNCB_CHECK_CD                25 /* i.e., CLOCAL */
-#define ASYNCB_SHARE_IRQ       24 /* for multifunction cards, no longer used */
-#define ASYNCB_CONS_FLOW       23 /* flow control for console  */
-#define ASYNCB_BOOT_ONLYMCA    22 /* Probe only if MCA bus */
-#define ASYNCB_FIRST_KERNEL    22
-
-#define ASYNC_HUP_NOTIFY       (1U << ASYNCB_HUP_NOTIFY)
-#define ASYNC_SUSPENDED                (1U << ASYNCB_SUSPENDED)
-#define ASYNC_FOURPORT         (1U << ASYNCB_FOURPORT)
-#define ASYNC_SAK              (1U << ASYNCB_SAK)
-#define ASYNC_SPLIT_TERMIOS    (1U << ASYNCB_SPLIT_TERMIOS)
-#define ASYNC_SPD_HI           (1U << ASYNCB_SPD_HI)
-#define ASYNC_SPD_VHI          (1U << ASYNCB_SPD_VHI)
-#define ASYNC_SKIP_TEST                (1U << ASYNCB_SKIP_TEST)
-#define ASYNC_AUTO_IRQ         (1U << ASYNCB_AUTO_IRQ)
-#define ASYNC_SESSION_LOCKOUT  (1U << ASYNCB_SESSION_LOCKOUT)
-#define ASYNC_PGRP_LOCKOUT     (1U << ASYNCB_PGRP_LOCKOUT)
-#define ASYNC_CALLOUT_NOHUP    (1U << ASYNCB_CALLOUT_NOHUP)
-#define ASYNC_HARDPPS_CD       (1U << ASYNCB_HARDPPS_CD)
-#define ASYNC_SPD_SHI          (1U << ASYNCB_SPD_SHI)
-#define ASYNC_LOW_LATENCY      (1U << ASYNCB_LOW_LATENCY)
-#define ASYNC_BUGGY_UART       (1U << ASYNCB_BUGGY_UART)
-#define ASYNC_AUTOPROBE                (1U << ASYNCB_AUTOPROBE)
-
-#define ASYNC_FLAGS            ((1U << (ASYNCB_LAST_USER + 1)) - 1)
-#define ASYNC_USR_MASK         (ASYNC_SPD_MASK|ASYNC_CALLOUT_NOHUP| \
-               ASYNC_LOW_LATENCY)
-#define ASYNC_SPD_CUST         (ASYNC_SPD_HI|ASYNC_SPD_VHI)
-#define ASYNC_SPD_WARP         (ASYNC_SPD_HI|ASYNC_SPD_SHI)
-#define ASYNC_SPD_MASK         (ASYNC_SPD_HI|ASYNC_SPD_VHI|ASYNC_SPD_SHI)
-
-#define ASYNC_INITIALIZED      (1U << ASYNCB_INITIALIZED)
-#define ASYNC_NORMAL_ACTIVE    (1U << ASYNCB_NORMAL_ACTIVE)
-#define ASYNC_BOOT_AUTOCONF    (1U << ASYNCB_BOOT_AUTOCONF)
-#define ASYNC_CLOSING          (1U << ASYNCB_CLOSING)
-#define ASYNC_CTS_FLOW         (1U << ASYNCB_CTS_FLOW)
-#define ASYNC_CHECK_CD         (1U << ASYNCB_CHECK_CD)
-#define ASYNC_SHARE_IRQ                (1U << ASYNCB_SHARE_IRQ)
-#define ASYNC_CONS_FLOW                (1U << ASYNCB_CONS_FLOW)
-#define ASYNC_BOOT_ONLYMCA     (1U << ASYNCB_BOOT_ONLYMCA)
-#define ASYNC_INTERNAL_FLAGS   (~((1U << ASYNCB_FIRST_KERNEL) - 1))
 
 /*
  * Multiport serial configuration structure --- external structure
index 463bb0d..bb8aa75 100644 (file)
 #define PORT_U6_16550A 19      /* ST-Ericsson U6xxx internal UART */
 #define PORT_TEGRA     20      /* NVIDIA Tegra internal UART */
 #define PORT_XR17D15X  21      /* Exar XR17D15x UART */
-#define PORT_MAX_8250  21      /* max port ID */
+#define PORT_LPC3220   22      /* NXP LPC32xx SoC "Standard" UART */
+#define PORT_8250_CIR  23      /* CIR infrared port, has its own driver */
+#define PORT_XR17V35X  24      /* Exar XR17V35x UARTs */
+#define PORT_BRCM_TRUMANAGE    25
+#define PORT_ALTR_16550_F32 26 /* Altera 16550 UART with 32 FIFOs */
+#define PORT_ALTR_16550_F64 27 /* Altera 16550 UART with 64 FIFOs */
+#define PORT_ALTR_16550_F128 28 /* Altera 16550 UART with 128 FIFOs */
+#define PORT_MAX_8250  28      /* max port ID */
 
 /*
  * ARM specific type numbers.  These are not currently guaranteed
 /* SH-SCI */
 #define PORT_SCIFB     93
 
-/* MAX3107 */
-#define PORT_MAX3107   94
+/* MAX310X */
+#define PORT_MAX310X   94
 
 /* High Speed UART for Medfield */
 #define PORT_MFD       95
 /* Energy Micro efm32 SoC */
 #define PORT_EFMUART   100
 
+/* ARC (Synopsys) on-chip UART */
+#define PORT_ARC       101
+
+/* Rocketport EXPRESS/INFINITY */
+#define PORT_RP2       102
 
 #endif /* LINUX_SERIAL_CORE_H */
index 8ce70d7..e632260 100644 (file)
 
 #define UART_IIR_BUSY          0x07 /* DesignWare APB Busy Detect */
 
+#define UART_IIR_RX_TIMEOUT    0x0c /* OMAP RX Timeout interrupt */
+#define UART_IIR_XOFF          0x10 /* OMAP XOFF/Special Character */
+#define UART_IIR_CTS_RTS_DSR   0x20 /* OMAP CTS/RTS/DSR Change */
+
 #define UART_FCR       2       /* Out: FIFO Control Register */
 #define UART_FCR_ENABLE_FIFO   0x01 /* Enable the FIFO */
 #define UART_FCR_CLEAR_RCVR    0x02 /* Clear the RCVR FIFO */
 #define UART_OMAP_MDR1_CIR_MODE                0x06    /* CIR mode */
 #define UART_OMAP_MDR1_DISABLE         0x07    /* Disable (default state) */
 
+/*
+ * These are definitions for the Exar XR17V35X and XR17(C|D)15X
+ */
+#define UART_EXAR_8XMODE       0x88    /* 8X sampling rate select */
+#define UART_EXAR_SLEEP                0x8b    /* Sleep mode */
+#define UART_EXAR_DVID         0x8d    /* Device identification */
+
+#define UART_EXAR_FCTR         0x08    /* Feature Control Register */
+#define UART_FCTR_EXAR_IRDA    0x08    /* IrDa data encode select */
+#define UART_FCTR_EXAR_485     0x10    /* Auto 485 half duplex dir ctl */
+#define UART_FCTR_EXAR_TRGA    0x00    /* FIFO trigger table A */
+#define UART_FCTR_EXAR_TRGB    0x60    /* FIFO trigger table B */
+#define UART_FCTR_EXAR_TRGC    0x80    /* FIFO trigger table C */
+#define UART_FCTR_EXAR_TRGD    0xc0    /* FIFO trigger table D programmable */
+
+#define UART_EXAR_TXTRG                0x0a    /* Tx FIFO trigger level write-only */
+#define UART_EXAR_RXTRG                0x0b    /* Rx FIFO trigger level write-only */
+
 #endif /* _LINUX_SERIAL_REG_H */
 
index 8f127e2..e73ba8d 100644 (file)
@@ -1,6 +1,3 @@
-#ifndef _SERIO_H
-#define _SERIO_H
-
 /*
  * Copyright (C) 1999-2002 Vojtech Pavlik
 *
@@ -8,6 +5,9 @@
  * under the terms of the GNU General Public License version 2 as published by
  * the Free Software Foundation.
  */
+#ifndef _SERIO_H
+#define _SERIO_H
+
 
 #include <linux/ioctl.h>
 
@@ -77,4 +77,4 @@
 #define SERIO_PS2MULT  0x3c
 #define SERIO_TSC40    0x3d
 
-#endif
+#endif /* _SERIO_H */
index 0bb69d8..94dc2e6 100644 (file)
@@ -4,5 +4,7 @@
 #include <asm/signal.h>
 #include <asm/siginfo.h>
 
+#define SS_ONSTACK     1
+#define SS_DISABLE     2
 
 #endif /* _LINUX_SIGNAL_H */
index 2e68f5b..df2e8b4 100644 (file)
 enum
 {
        IPSTATS_MIB_NUM = 0,
+/* frequently written fields in fast path, kept in same cache line */
        IPSTATS_MIB_INPKTS,                     /* InReceives */
+       IPSTATS_MIB_INOCTETS,                   /* InOctets */
+       IPSTATS_MIB_INDELIVERS,                 /* InDelivers */
+       IPSTATS_MIB_OUTFORWDATAGRAMS,           /* OutForwDatagrams */
+       IPSTATS_MIB_OUTPKTS,                    /* OutRequests */
+       IPSTATS_MIB_OUTOCTETS,                  /* OutOctets */
+/* other fields */
        IPSTATS_MIB_INHDRERRORS,                /* InHdrErrors */
        IPSTATS_MIB_INTOOBIGERRORS,             /* InTooBigErrors */
        IPSTATS_MIB_INNOROUTES,                 /* InNoRoutes */
@@ -26,9 +33,6 @@ enum
        IPSTATS_MIB_INUNKNOWNPROTOS,            /* InUnknownProtos */
        IPSTATS_MIB_INTRUNCATEDPKTS,            /* InTruncatedPkts */
        IPSTATS_MIB_INDISCARDS,                 /* InDiscards */
-       IPSTATS_MIB_INDELIVERS,                 /* InDelivers */
-       IPSTATS_MIB_OUTFORWDATAGRAMS,           /* OutForwDatagrams */
-       IPSTATS_MIB_OUTPKTS,                    /* OutRequests */
        IPSTATS_MIB_OUTDISCARDS,                /* OutDiscards */
        IPSTATS_MIB_OUTNOROUTES,                /* OutNoRoutes */
        IPSTATS_MIB_REASMTIMEOUT,               /* ReasmTimeout */
@@ -42,12 +46,11 @@ enum
        IPSTATS_MIB_OUTMCASTPKTS,               /* OutMcastPkts */
        IPSTATS_MIB_INBCASTPKTS,                /* InBcastPkts */
        IPSTATS_MIB_OUTBCASTPKTS,               /* OutBcastPkts */
-       IPSTATS_MIB_INOCTETS,                   /* InOctets */
-       IPSTATS_MIB_OUTOCTETS,                  /* OutOctets */
        IPSTATS_MIB_INMCASTOCTETS,              /* InMcastOctets */
        IPSTATS_MIB_OUTMCASTOCTETS,             /* OutMcastOctets */
        IPSTATS_MIB_INBCASTOCTETS,              /* InBcastOctets */
        IPSTATS_MIB_OUTBCASTOCTETS,             /* OutBcastOctets */
+       IPSTATS_MIB_CSUMERRORS,                 /* InCsumErrors */
        __IPSTATS_MIB_MAX
 };
 
@@ -85,6 +88,7 @@ enum
        ICMP_MIB_OUTTIMESTAMPREPS,              /* OutTimestampReps */
        ICMP_MIB_OUTADDRMASKS,                  /* OutAddrMasks */
        ICMP_MIB_OUTADDRMASKREPS,               /* OutAddrMaskReps */
+       ICMP_MIB_CSUMERRORS,                    /* InCsumErrors */
        __ICMP_MIB_MAX
 };
 
@@ -101,6 +105,7 @@ enum
        ICMP6_MIB_INERRORS,                     /* InErrors */
        ICMP6_MIB_OUTMSGS,                      /* OutMsgs */
        ICMP6_MIB_OUTERRORS,                    /* OutErrors */
+       ICMP6_MIB_CSUMERRORS,                   /* InCsumErrors */
        __ICMP6_MIB_MAX
 };
 
@@ -128,6 +133,7 @@ enum
        TCP_MIB_RETRANSSEGS,                    /* RetransSegs */
        TCP_MIB_INERRS,                         /* InErrs */
        TCP_MIB_OUTRSTS,                        /* OutRsts */
+       TCP_MIB_CSUMERRORS,                     /* InCsumErrors */
        __TCP_MIB_MAX
 };
 
@@ -145,6 +151,7 @@ enum
        UDP_MIB_OUTDATAGRAMS,                   /* OutDatagrams */
        UDP_MIB_RCVBUFERRORS,                   /* RcvbufErrors */
        UDP_MIB_SNDBUFERRORS,                   /* SndbufErrors */
+       UDP_MIB_CSUMERRORS,                     /* InCsumErrors */
        __UDP_MIB_MAX
 };
 
@@ -200,6 +207,8 @@ enum
        LINUX_MIB_TCPFORWARDRETRANS,            /* TCPForwardRetrans */
        LINUX_MIB_TCPSLOWSTARTRETRANS,          /* TCPSlowStartRetrans */
        LINUX_MIB_TCPTIMEOUTS,                  /* TCPTimeouts */
+       LINUX_MIB_TCPLOSSPROBES,                /* TCPLossProbes */
+       LINUX_MIB_TCPLOSSPROBERECOVERY,         /* TCPLossProbeRecovery */
        LINUX_MIB_TCPRENORECOVERYFAIL,          /* TCPRenoRecoveryFail */
        LINUX_MIB_TCPSACKRECOVERYFAIL,          /* TCPSackRecoveryFail */
        LINUX_MIB_TCPSCHEDULERFAILED,           /* TCPSchedulerFailed */
@@ -208,7 +217,6 @@ enum
        LINUX_MIB_TCPDSACKOFOSENT,              /* TCPDSACKOfoSent */
        LINUX_MIB_TCPDSACKRECV,                 /* TCPDSACKRecv */
        LINUX_MIB_TCPDSACKOFORECV,              /* TCPDSACKOfoRecv */
-       LINUX_MIB_TCPABORTONSYN,                /* TCPAbortOnSyn */
        LINUX_MIB_TCPABORTONDATA,               /* TCPAbortOnData */
        LINUX_MIB_TCPABORTONCLOSE,              /* TCPAbortOnClose */
        LINUX_MIB_TCPABORTONMEMORY,             /* TCPAbortOnMemory */
@@ -233,7 +241,18 @@ enum
        LINUX_MIB_TCPREQQFULLDOCOOKIES,         /* TCPReqQFullDoCookies */
        LINUX_MIB_TCPREQQFULLDROP,              /* TCPReqQFullDrop */
        LINUX_MIB_TCPRETRANSFAIL,               /* TCPRetransFail */
-       LINUX_MIB_TCPRCVCOALESCE,                       /* TCPRcvCoalesce */
+       LINUX_MIB_TCPRCVCOALESCE,               /* TCPRcvCoalesce */
+       LINUX_MIB_TCPOFOQUEUE,                  /* TCPOFOQueue */
+       LINUX_MIB_TCPOFODROP,                   /* TCPOFODrop */
+       LINUX_MIB_TCPOFOMERGE,                  /* TCPOFOMerge */
+       LINUX_MIB_TCPCHALLENGEACK,              /* TCPChallengeACK */
+       LINUX_MIB_TCPSYNCHALLENGE,              /* TCPSYNChallenge */
+       LINUX_MIB_TCPFASTOPENACTIVE,            /* TCPFastOpenActive */
+       LINUX_MIB_TCPFASTOPENPASSIVE,           /* TCPFastOpenPassive*/
+       LINUX_MIB_TCPFASTOPENPASSIVEFAIL,       /* TCPFastOpenPassiveFail */
+       LINUX_MIB_TCPFASTOPENLISTENOVERFLOW,    /* TCPFastOpenListenOverflow */
+       LINUX_MIB_TCPFASTOPENCOOKIEREQD,        /* TCPFastOpenCookieReqd */
+       LINUX_MIB_TCPSPURIOUS_RTX_HOSTQUEUES, /* TCPSpuriousRtxHostQueues */
        __LINUX_MIB_MAX
 };
 
@@ -267,6 +286,7 @@ enum
        LINUX_MIB_XFRMOUTPOLDEAD,               /* XfrmOutPolDead */
        LINUX_MIB_XFRMOUTPOLERROR,              /* XfrmOutPolError */
        LINUX_MIB_XFRMFWDHDRERROR,              /* XfrmFwdHdrError*/
+       LINUX_MIB_XFRMOUTSTATEINVALID,          /* XfrmOutStateInvalid */
        __LINUX_MIB_XFRMMAX
 };
 
index 39e4b1c..78996e2 100644 (file)
@@ -18,8 +18,9 @@ enum {
        SK_MEMINFO_FWD_ALLOC,
        SK_MEMINFO_WMEM_QUEUED,
        SK_MEMINFO_OPTMEM,
+       SK_MEMINFO_BACKLOG,
 
        SK_MEMINFO_VARS,
 };
 
-#endif
+#endif /* __SOCK_DIAG_H__ */
index cd68293..77c834a 100644 (file)
@@ -57,4 +57,4 @@ struct sonet_stats {
 
 
 
-#endif
+#endif /* LINUX_SONET_H */
index 285da0f..1c0a25f 100644 (file)
 #define SONYPI_IOCGTEMP                _IOR('v', 12, __u8)
 
 
-#endif                         /* _SONYPI_H_ */
+#endif /* _SONYPI_H_ */
index 70ef496..c5abf86 100644 (file)
@@ -1,5 +1,3 @@
-#ifndef SOUNDCARD_H
-#define SOUNDCARD_H
 /*
  * Copyright by Hannu Savolainen 1993-1997
  *
@@ -23,6 +21,8 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  */
+#ifndef SOUNDCARD_H
+#define SOUNDCARD_H
 
 
 /*
@@ -1273,4 +1273,4 @@ void seqbuf_dump(void);   /* This function must be provided by programs */
 #define SEQ_WRPATCH2(patchx, len) \
                (SEQ_DUMPBUF(), write(seqfd, (char*)(patchx), len))
 
-#endif
+#endif /* SOUNDCARD_H */
index 0a9f037..b014ce4 100644 (file)
@@ -42,4 +42,4 @@
 #endif
 
 
-#endif
+#endif /* _LINUX_STAT_H */
index 6b0e8fb..8b13789 100644 (file)
@@ -1,7 +1 @@
-#ifndef _LINUX_STDDEF_H
-#define _LINUX_STDDEF_H
 
-
-
-
-#endif
index aa4afdd..13a943c 100644 (file)
  * ___swab16, ___swab32, ___swab64, ___swahw32, ___swahb32
  */
 
-static __inline__ __u16 __fswab16(__u16 val)
+static __inline__  __u16 __fswab16(__u16 val)
 {
-#ifdef __arch_swab16
+#ifdef __HAVE_BUILTIN_BSWAP16__
+       return __builtin_bswap16(val);
+#elif defined (__arch_swab16)
        return __arch_swab16(val);
 #else
        return ___constant_swab16(val);
 #endif
 }
 
-static __inline__ __u32 __fswab32(__u32 val)
+static __inline__  __u32 __fswab32(__u32 val)
 {
-#ifdef __arch_swab32
+#ifdef __HAVE_BUILTIN_BSWAP32__
+       return __builtin_bswap32(val);
+#elif defined(__arch_swab32)
        return __arch_swab32(val);
 #else
        return ___constant_swab32(val);
 #endif
 }
 
-static __inline__ __u64 __fswab64(__u64 val)
+static __inline__  __u64 __fswab64(__u64 val)
 {
-#ifdef __arch_swab64
+#ifdef __HAVE_BUILTIN_BSWAP64__
+       return __builtin_bswap64(val);
+#elif defined (__arch_swab64)
        return __arch_swab64(val);
 #elif defined(__SWAB_64_THRU_32__)
        __u32 h = val >> 32;
@@ -74,7 +80,7 @@ static __inline__ __u64 __fswab64(__u64 val)
 #endif
 }
 
-static __inline__ __u32 __fswahw32(__u32 val)
+static __inline__  __u32 __fswahw32(__u32 val)
 {
 #ifdef __arch_swahw32
        return __arch_swahw32(val);
@@ -83,7 +89,7 @@ static __inline__ __u32 __fswahw32(__u32 val)
 #endif
 }
 
-static __inline__ __u32 __fswahb32(__u32 val)
+static __inline__  __u32 __fswahb32(__u32 val)
 {
 #ifdef __arch_swahb32
        return __arch_swahb32(val);
index 442f177..1eb04d3 100644 (file)
@@ -69,16 +69,16 @@ union tcp_word_hdr {
 #define tcp_flag_word(tp) ( ((union tcp_word_hdr *)(tp))->words [3]) 
 
 enum { 
-       TCP_FLAG_CWR = __cpu_to_be32(0x00800000),
-       TCP_FLAG_ECE = __cpu_to_be32(0x00400000),
-       TCP_FLAG_URG = __cpu_to_be32(0x00200000),
-       TCP_FLAG_ACK = __cpu_to_be32(0x00100000),
-       TCP_FLAG_PSH = __cpu_to_be32(0x00080000),
-       TCP_FLAG_RST = __cpu_to_be32(0x00040000),
-       TCP_FLAG_SYN = __cpu_to_be32(0x00020000),
-       TCP_FLAG_FIN = __cpu_to_be32(0x00010000),
-       TCP_RESERVED_BITS = __cpu_to_be32(0x0F000000),
-       TCP_DATA_OFFSET = __cpu_to_be32(0xF0000000)
+       TCP_FLAG_CWR = __constant_cpu_to_be32(0x00800000),
+       TCP_FLAG_ECE = __constant_cpu_to_be32(0x00400000),
+       TCP_FLAG_URG = __constant_cpu_to_be32(0x00200000),
+       TCP_FLAG_ACK = __constant_cpu_to_be32(0x00100000),
+       TCP_FLAG_PSH = __constant_cpu_to_be32(0x00080000),
+       TCP_FLAG_RST = __constant_cpu_to_be32(0x00040000),
+       TCP_FLAG_SYN = __constant_cpu_to_be32(0x00020000),
+       TCP_FLAG_FIN = __constant_cpu_to_be32(0x00010000),
+       TCP_RESERVED_BITS = __constant_cpu_to_be32(0x0F000000),
+       TCP_DATA_OFFSET = __constant_cpu_to_be32(0xF0000000)
 }; 
 
 /*
@@ -102,10 +102,27 @@ enum {
 #define TCP_QUICKACK           12      /* Block/reenable quick acks */
 #define TCP_CONGESTION         13      /* Congestion control algorithm */
 #define TCP_MD5SIG             14      /* TCP MD5 Signature (RFC2385) */
-#define TCP_COOKIE_TRANSACTIONS        15      /* TCP Cookie Transactions */
 #define TCP_THIN_LINEAR_TIMEOUTS 16      /* Use linear timeouts for thin streams*/
 #define TCP_THIN_DUPACK         17      /* Fast retrans. after 1 dupack */
 #define TCP_USER_TIMEOUT       18      /* How long for loss retry before timeout */
+#define TCP_REPAIR             19      /* TCP sock is under repair right now */
+#define TCP_REPAIR_QUEUE       20
+#define TCP_QUEUE_SEQ          21
+#define TCP_REPAIR_OPTIONS     22
+#define TCP_FASTOPEN           23      /* Enable FastOpen on listeners */
+#define TCP_TIMESTAMP          24
+
+struct tcp_repair_opt {
+       __u32   opt_code;
+       __u32   opt_val;
+};
+
+enum {
+       TCP_NO_QUEUE,
+       TCP_RECV_QUEUE,
+       TCP_SEND_QUEUE,
+       TCP_QUEUES_NR,
+};
 
 /* for TCP_INFO socket option */
 #define TCPI_OPT_TIMESTAMPS    1
@@ -113,6 +130,7 @@ enum {
 #define TCPI_OPT_WSCALE                4
 #define TCPI_OPT_ECN           8 /* ECN was negociated at TCP session init */
 #define TCPI_OPT_ECN_SEEN      16 /* we received at least one packet with ECT */
+#define TCPI_OPT_SYN_DATA      32 /* SYN-ACK acked data in SYN sent or rcvd */
 
 enum tcp_ca_state {
        TCP_CA_Open = 0,
@@ -180,29 +198,4 @@ struct tcp_md5sig {
        __u8    tcpm_key[TCP_MD5SIG_MAXKEYLEN];         /* key (binary) */
 };
 
-/* for TCP_COOKIE_TRANSACTIONS (TCPCT) socket option */
-#define TCP_COOKIE_MIN          8              /*  64-bits */
-#define TCP_COOKIE_MAX         16              /* 128-bits */
-#define TCP_COOKIE_PAIR_SIZE   (2*TCP_COOKIE_MAX)
-
-/* Flags for both getsockopt and setsockopt */
-#define TCP_COOKIE_IN_ALWAYS   (1 << 0)        /* Discard SYN without cookie */
-#define TCP_COOKIE_OUT_NEVER   (1 << 1)        /* Prohibit outgoing cookies,
-                                                * supercedes everything. */
-
-/* Flags for getsockopt */
-#define TCP_S_DATA_IN          (1 << 2)        /* Was data received? */
-#define TCP_S_DATA_OUT         (1 << 3)        /* Was data sent? */
-
-/* TCP_COOKIE_TRANSACTIONS data */
-struct tcp_cookie_transactions {
-       __u16   tcpct_flags;                    /* see above */
-       __u8    __tcpct_pad1;                   /* zero */
-       __u8    tcpct_cookie_desired;           /* bytes */
-       __u16   tcpct_s_data_desired;           /* bytes of variable data */
-       __u16   tcpct_used;                     /* bytes in value */
-       __u8    tcpct_value[TCP_MSS_DEFAULT];
-};
-
-
-#endif /* _LINUX_TCP_H */
+#endif /* _LINUX_TCP_H */
diff --git a/usr/include/linux/tcp_metrics.h b/usr/include/linux/tcp_metrics.h
new file mode 100644 (file)
index 0000000..cb5157b
--- /dev/null
@@ -0,0 +1,54 @@
+/* tcp_metrics.h - TCP Metrics Interface */
+
+#ifndef _LINUX_TCP_METRICS_H
+#define _LINUX_TCP_METRICS_H
+
+#include <linux/types.h>
+
+/* NETLINK_GENERIC related info
+ */
+#define TCP_METRICS_GENL_NAME          "tcp_metrics"
+#define TCP_METRICS_GENL_VERSION       0x1
+
+enum tcp_metric_index {
+       TCP_METRIC_RTT,
+       TCP_METRIC_RTTVAR,
+       TCP_METRIC_SSTHRESH,
+       TCP_METRIC_CWND,
+       TCP_METRIC_REORDERING,
+
+       /* Always last.  */
+       __TCP_METRIC_MAX,
+};
+
+#define TCP_METRIC_MAX (__TCP_METRIC_MAX - 1)
+
+enum {
+       TCP_METRICS_ATTR_UNSPEC,
+       TCP_METRICS_ATTR_ADDR_IPV4,             /* u32 */
+       TCP_METRICS_ATTR_ADDR_IPV6,             /* binary */
+       TCP_METRICS_ATTR_AGE,                   /* msecs */
+       TCP_METRICS_ATTR_TW_TSVAL,              /* u32, raw, rcv tsval */
+       TCP_METRICS_ATTR_TW_TS_STAMP,           /* s32, sec age */
+       TCP_METRICS_ATTR_VALS,                  /* nested +1, u32 */
+       TCP_METRICS_ATTR_FOPEN_MSS,             /* u16 */
+       TCP_METRICS_ATTR_FOPEN_SYN_DROPS,       /* u16, count of drops */
+       TCP_METRICS_ATTR_FOPEN_SYN_DROP_TS,     /* msecs age */
+       TCP_METRICS_ATTR_FOPEN_COOKIE,          /* binary */
+
+       __TCP_METRICS_ATTR_MAX,
+};
+
+#define TCP_METRICS_ATTR_MAX   (__TCP_METRICS_ATTR_MAX - 1)
+
+enum {
+       TCP_METRICS_CMD_UNSPEC,
+       TCP_METRICS_CMD_GET,
+       TCP_METRICS_CMD_DEL,
+
+       __TCP_METRICS_CMD_MAX,
+};
+
+#define TCP_METRICS_CMD_MAX    (__TCP_METRICS_CMD_MAX - 1)
+
+#endif /* _LINUX_TCP_METRICS_H */
index 43f5fe5..3d7a29d 100644 (file)
@@ -23,14 +23,6 @@ struct timezone {
 };
 
 
-#define NFDBITS                        __NFDBITS
-
-#define FD_SETSIZE             __FD_SETSIZE
-#define FD_SET(fd,fdsetp)      __FD_SET(fd,fdsetp)
-#define FD_CLR(fd,fdsetp)      __FD_CLR(fd,fdsetp)
-#define FD_ISSET(fd,fdsetp)    __FD_ISSET(fd,fdsetp)
-#define FD_ZERO(fdsetp)                __FD_ZERO(fdsetp)
-
 /*
  * Names of the interval timers, and structure
  * defining a timer setting:
@@ -62,11 +54,9 @@ struct itimerval {
 #define CLOCK_BOOTTIME                 7
 #define CLOCK_REALTIME_ALARM           8
 #define CLOCK_BOOTTIME_ALARM           9
+#define CLOCK_SGI_CYCLE                        10      /* Hardware specific */
+#define CLOCK_TAI                      11
 
-/*
- * The IDs of various hardware clocks:
- */
-#define CLOCK_SGI_CYCLE                        10
 #define MAX_CLOCKS                     16
 #define CLOCKS_MASK                    (CLOCK_REALTIME | CLOCK_MONOTONIC)
 #define CLOCKS_MONO                    CLOCK_MONOTONIC
@@ -76,4 +66,4 @@ struct itimerval {
  */
 #define TIMER_ABSTIME                  0x01
 
-#endif
+#endif /* _LINUX_TIME_H */
index d9f943c..07dc26e 100644 (file)
@@ -161,4 +161,4 @@ struct timex {
 #define TIME_BAD       TIME_ERROR /* bw compat */
 
 
-#endif /* LINUX_TIMEX_H */
+#endif /* _LINUX_TIMEX_H */
index fc259ff..2aac7ac 100644 (file)
@@ -87,8 +87,8 @@
 
 #define  TIPC_CMD_GET_REMOTE_MNG    0x4003    /* tx none, rx unsigned */
 #define  TIPC_CMD_GET_MAX_PORTS     0x4004    /* tx none, rx unsigned */
-#define  TIPC_CMD_GET_MAX_PUBL      0x4005    /* tx none, rx unsigned */
-#define  TIPC_CMD_GET_MAX_SUBSCR    0x4006    /* tx none, rx unsigned */
+#define  TIPC_CMD_GET_MAX_PUBL      0x4005    /* obsoleted */
+#define  TIPC_CMD_GET_MAX_SUBSCR    0x4006    /* obsoleted */
 #define  TIPC_CMD_GET_MAX_ZONES     0x4007    /* obsoleted */
 #define  TIPC_CMD_GET_MAX_CLUSTERS  0x4008    /* obsoleted */
 #define  TIPC_CMD_GET_MAX_NODES     0x4009    /* obsoleted */
 #define  TIPC_CMD_SET_LINK_TOL      0x4107    /* tx link_config, rx none */
 #define  TIPC_CMD_SET_LINK_PRI      0x4108    /* tx link_config, rx none */
 #define  TIPC_CMD_SET_LINK_WINDOW   0x4109    /* tx link_config, rx none */
-#define  TIPC_CMD_SET_LOG_SIZE      0x410A    /* tx unsigned, rx none */
-#define  TIPC_CMD_DUMP_LOG          0x410B    /* tx none, rx ultra_string */
+#define  TIPC_CMD_SET_LOG_SIZE      0x410A    /* obsoleted */
+#define  TIPC_CMD_DUMP_LOG          0x410B    /* obsoleted */
 #define  TIPC_CMD_RESET_LINK_STATS  0x410C    /* tx link_name, rx none */
 
 /*
 #define  TIPC_CMD_SET_NODE_ADDR     0x8001    /* tx net_addr, rx none */
 #define  TIPC_CMD_SET_REMOTE_MNG    0x8003    /* tx unsigned, rx none */
 #define  TIPC_CMD_SET_MAX_PORTS     0x8004    /* tx unsigned, rx none */
-#define  TIPC_CMD_SET_MAX_PUBL      0x8005    /* tx unsigned, rx none */
-#define  TIPC_CMD_SET_MAX_SUBSCR    0x8006    /* tx unsigned, rx none */
+#define  TIPC_CMD_SET_MAX_PUBL      0x8005    /* obsoleted */
+#define  TIPC_CMD_SET_MAX_SUBSCR    0x8006    /* obsoleted */
 #define  TIPC_CMD_SET_MAX_ZONES     0x8007    /* obsoleted */
 #define  TIPC_CMD_SET_MAX_CLUSTERS  0x8008    /* obsoleted */
 #define  TIPC_CMD_SET_MAX_NODES     0x8009    /* obsoleted */
index c26527f..46522bf 100644 (file)
@@ -34,4 +34,4 @@ typedef struct {
 } SMMRegisters;
 
 
-#endif
+#endif /* _LINUX_TOSHIBA_H */
index cfdbedc..f531621 100644 (file)
@@ -35,4 +35,4 @@
 #define N_TRACESINK    23      /* Trace data routing for MIPI P1149.7 */
 #define N_TRACEROUTER  24      /* Trace data routing for MIPI P1149.7 */
 
-#endif
+#endif /* _LINUX_TTY_H */
diff --git a/usr/include/linux/tty_flags.h b/usr/include/linux/tty_flags.h
new file mode 100644 (file)
index 0000000..eefcb48
--- /dev/null
@@ -0,0 +1,78 @@
+#ifndef _LINUX_TTY_FLAGS_H
+#define _LINUX_TTY_FLAGS_H
+
+/*
+ * Definitions for async_struct (and serial_struct) flags field also
+ * shared by the tty_port flags structures.
+ *
+ * Define ASYNCB_* for convenient use with {test,set,clear}_bit.
+ */
+#define ASYNCB_HUP_NOTIFY       0 /* Notify getty on hangups and closes
+                                   * on the callout port */
+#define ASYNCB_FOURPORT                 1 /* Set OU1, OUT2 per AST Fourport settings */
+#define ASYNCB_SAK              2 /* Secure Attention Key (Orange book) */
+#define ASYNCB_SPLIT_TERMIOS    3 /* Separate termios for dialin/callout */
+#define ASYNCB_SPD_HI           4 /* Use 56000 instead of 38400 bps */
+#define ASYNCB_SPD_VHI          5 /* Use 115200 instead of 38400 bps */
+#define ASYNCB_SKIP_TEST        6 /* Skip UART test during autoconfiguration */
+#define ASYNCB_AUTO_IRQ                 7 /* Do automatic IRQ during
+                                   * autoconfiguration */
+#define ASYNCB_SESSION_LOCKOUT  8 /* Lock out cua opens based on session */
+#define ASYNCB_PGRP_LOCKOUT     9 /* Lock out cua opens based on pgrp */
+#define ASYNCB_CALLOUT_NOHUP   10 /* Don't do hangups for cua device */
+#define ASYNCB_HARDPPS_CD      11 /* Call hardpps when CD goes high  */
+#define ASYNCB_SPD_SHI         12 /* Use 230400 instead of 38400 bps */
+#define ASYNCB_LOW_LATENCY     13 /* Request low latency behaviour */
+#define ASYNCB_BUGGY_UART      14 /* This is a buggy UART, skip some safety
+                                   * checks.  Note: can be dangerous! */
+#define ASYNCB_AUTOPROBE       15 /* Port was autoprobed by PCI or PNP code */
+#define ASYNCB_LAST_USER       15
+
+/* Internal flags used only by kernel */
+#define ASYNCB_INITIALIZED     31 /* Serial port was initialized */
+#define ASYNCB_SUSPENDED       30 /* Serial port is suspended */
+#define ASYNCB_NORMAL_ACTIVE   29 /* Normal device is active */
+#define ASYNCB_BOOT_AUTOCONF   28 /* Autoconfigure port on bootup */
+#define ASYNCB_CLOSING         27 /* Serial port is closing */
+#define ASYNCB_CTS_FLOW                26 /* Do CTS flow control */
+#define ASYNCB_CHECK_CD                25 /* i.e., CLOCAL */
+#define ASYNCB_SHARE_IRQ       24 /* for multifunction cards, no longer used */
+#define ASYNCB_CONS_FLOW       23 /* flow control for console  */
+#define ASYNCB_FIRST_KERNEL    22
+
+#define ASYNC_HUP_NOTIFY       (1U << ASYNCB_HUP_NOTIFY)
+#define ASYNC_SUSPENDED                (1U << ASYNCB_SUSPENDED)
+#define ASYNC_FOURPORT         (1U << ASYNCB_FOURPORT)
+#define ASYNC_SAK              (1U << ASYNCB_SAK)
+#define ASYNC_SPLIT_TERMIOS    (1U << ASYNCB_SPLIT_TERMIOS)
+#define ASYNC_SPD_HI           (1U << ASYNCB_SPD_HI)
+#define ASYNC_SPD_VHI          (1U << ASYNCB_SPD_VHI)
+#define ASYNC_SKIP_TEST                (1U << ASYNCB_SKIP_TEST)
+#define ASYNC_AUTO_IRQ         (1U << ASYNCB_AUTO_IRQ)
+#define ASYNC_SESSION_LOCKOUT  (1U << ASYNCB_SESSION_LOCKOUT)
+#define ASYNC_PGRP_LOCKOUT     (1U << ASYNCB_PGRP_LOCKOUT)
+#define ASYNC_CALLOUT_NOHUP    (1U << ASYNCB_CALLOUT_NOHUP)
+#define ASYNC_HARDPPS_CD       (1U << ASYNCB_HARDPPS_CD)
+#define ASYNC_SPD_SHI          (1U << ASYNCB_SPD_SHI)
+#define ASYNC_LOW_LATENCY      (1U << ASYNCB_LOW_LATENCY)
+#define ASYNC_BUGGY_UART       (1U << ASYNCB_BUGGY_UART)
+#define ASYNC_AUTOPROBE                (1U << ASYNCB_AUTOPROBE)
+
+#define ASYNC_FLAGS            ((1U << (ASYNCB_LAST_USER + 1)) - 1)
+#define ASYNC_USR_MASK         (ASYNC_SPD_MASK|ASYNC_CALLOUT_NOHUP| \
+               ASYNC_LOW_LATENCY)
+#define ASYNC_SPD_CUST         (ASYNC_SPD_HI|ASYNC_SPD_VHI)
+#define ASYNC_SPD_WARP         (ASYNC_SPD_HI|ASYNC_SPD_SHI)
+#define ASYNC_SPD_MASK         (ASYNC_SPD_HI|ASYNC_SPD_VHI|ASYNC_SPD_SHI)
+
+#define ASYNC_INITIALIZED      (1U << ASYNCB_INITIALIZED)
+#define ASYNC_NORMAL_ACTIVE    (1U << ASYNCB_NORMAL_ACTIVE)
+#define ASYNC_BOOT_AUTOCONF    (1U << ASYNCB_BOOT_AUTOCONF)
+#define ASYNC_CLOSING          (1U << ASYNCB_CLOSING)
+#define ASYNC_CTS_FLOW         (1U << ASYNCB_CTS_FLOW)
+#define ASYNC_CHECK_CD         (1U << ASYNCB_CHECK_CD)
+#define ASYNC_SHARE_IRQ                (1U << ASYNCB_SHARE_IRQ)
+#define ASYNC_CONS_FLOW                (1U << ASYNCB_CONS_FLOW)
+#define ASYNC_INTERNAL_FLAGS   (~((1U << ASYNCB_FIRST_KERNEL) - 1))
+
+#endif
index 13cf21a..041cb22 100644 (file)
@@ -36,4 +36,4 @@ struct udphdr {
 #define UDP_ENCAP_L2TPINUDP    3 /* rfc2661 */
 
 
-#endif /* _LINUX_UDP_H */
+#endif /* _LINUX_UDP_H */
diff --git a/usr/include/linux/uhid.h b/usr/include/linux/uhid.h
new file mode 100644 (file)
index 0000000..8dcc6e3
--- /dev/null
@@ -0,0 +1,104 @@
+#ifndef __UHID_H_
+#define __UHID_H_
+
+/*
+ * User-space I/O driver support for HID subsystem
+ * Copyright (c) 2012 David Herrmann
+ */
+
+/*
+ * 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.
+ */
+
+/*
+ * Public header for user-space communication. We try to keep every structure
+ * aligned but to be safe we also use __attribute__((__packed__)). Therefore,
+ * the communication should be ABI compatible even between architectures.
+ */
+
+#include <linux/input.h>
+#include <linux/types.h>
+
+enum uhid_event_type {
+       UHID_CREATE,
+       UHID_DESTROY,
+       UHID_START,
+       UHID_STOP,
+       UHID_OPEN,
+       UHID_CLOSE,
+       UHID_OUTPUT,
+       UHID_OUTPUT_EV,
+       UHID_INPUT,
+       UHID_FEATURE,
+       UHID_FEATURE_ANSWER,
+};
+
+struct uhid_create_req {
+       __u8 name[128];
+       __u8 phys[64];
+       __u8 uniq[64];
+       __u8 *rd_data;
+       __u16 rd_size;
+
+       __u16 bus;
+       __u32 vendor;
+       __u32 product;
+       __u32 version;
+       __u32 country;
+} __attribute__((__packed__));
+
+#define UHID_DATA_MAX 4096
+
+enum uhid_report_type {
+       UHID_FEATURE_REPORT,
+       UHID_OUTPUT_REPORT,
+       UHID_INPUT_REPORT,
+};
+
+struct uhid_input_req {
+       __u8 data[UHID_DATA_MAX];
+       __u16 size;
+} __attribute__((__packed__));
+
+struct uhid_output_req {
+       __u8 data[UHID_DATA_MAX];
+       __u16 size;
+       __u8 rtype;
+} __attribute__((__packed__));
+
+struct uhid_output_ev_req {
+       __u16 type;
+       __u16 code;
+       __s32 value;
+} __attribute__((__packed__));
+
+struct uhid_feature_req {
+       __u32 id;
+       __u8 rnum;
+       __u8 rtype;
+} __attribute__((__packed__));
+
+struct uhid_feature_answer_req {
+       __u32 id;
+       __u16 err;
+       __u16 size;
+       __u8 data[UHID_DATA_MAX];
+} __attribute__((__packed__));
+
+struct uhid_event {
+       __u32 type;
+
+       union {
+               struct uhid_create_req create;
+               struct uhid_input_req input;
+               struct uhid_output_req output;
+               struct uhid_output_ev_req output_ev;
+               struct uhid_feature_req feature;
+               struct uhid_feature_answer_req feature_answer;
+       } u;
+} __attribute__((__packed__));
+
+#endif /* __UHID_H_ */
index 4466595..9048f04 100644 (file)
@@ -1,5 +1,3 @@
-#ifndef __UINPUT_H_
-#define __UINPUT_H_
 /*
  *  User level driver support for input subsystem
  *
  *     0.1     20/06/2002
  *             - first public version
  */
+#ifndef __UINPUT_H_
+#define __UINPUT_H_
 
+#include <linux/types.h>
 #include <linux/input.h>
 
 #define UINPUT_VERSION         3
 
 
 struct uinput_ff_upload {
-       int                     request_id;
-       int                     retval;
+       __u32                   request_id;
+       __s32                   retval;
        struct ff_effect        effect;
        struct ff_effect        old;
 };
 
 struct uinput_ff_erase {
-       int                     request_id;
-       int                     retval;
-       int                     effect_id;
+       __u32                   request_id;
+       __s32                   retval;
+       __u32                   effect_id;
 };
 
 /* ioctl */
@@ -127,11 +128,10 @@ struct uinput_ff_erase {
 struct uinput_user_dev {
        char name[UINPUT_MAX_NAME_SIZE];
        struct input_id id;
-       int ff_effects_max;
-       int absmax[ABS_CNT];
-       int absmin[ABS_CNT];
-       int absfuzz[ABS_CNT];
-       int absflat[ABS_CNT];
+       __u32 ff_effects_max;
+       __s32 absmax[ABS_CNT];
+       __s32 absmin[ABS_CNT];
+       __s32 absfuzz[ABS_CNT];
+       __s32 absflat[ABS_CNT];
 };
-#endif /* __UINPUT_H_ */
-
+#endif /* __UINPUT_H_ */
index e6f4a86..d0978de 100644 (file)
@@ -1,9 +1,3 @@
-#ifndef __LINUX_UIO_H
-#define __LINUX_UIO_H
-
-
-#include <linux/types.h>
-
 /*
  *     Berkeley style UIO structures   -       Alan Cox 1994.
  *
@@ -12,6 +6,12 @@
  *             as published by the Free Software Foundation; either version
  *             2 of the License, or (at your option) any later version.
  */
+#ifndef __LINUX_UIO_H
+#define __LINUX_UIO_H
+
+
+#include <linux/types.h>
+
 
 struct iovec
 {
@@ -27,4 +27,4 @@ struct iovec
 #define UIO_MAXIOV     1024
 
 
-#endif
+#endif /* __LINUX_UIO_H */
index b1d2bf1..b9e2a6a 100644 (file)
@@ -37,10 +37,13 @@ enum {
        UNIX_DIAG_ICONS,
        UNIX_DIAG_RQLEN,
        UNIX_DIAG_MEMINFO,
+       UNIX_DIAG_SHUTDOWN,
 
-       UNIX_DIAG_MAX,
+       __UNIX_DIAG_MAX,
 };
 
+#define UNIX_DIAG_MAX (__UNIX_DIAG_MAX - 1)
+
 struct unix_diag_vfs {
        __u32   udiag_vfs_ino;
        __u32   udiag_vfs_dev;
index d754dba..210f2f5 100644 (file)
@@ -384,14 +384,16 @@ static __inline__ __u8 uac_processing_unit_iProcessing(struct uac_processing_uni
                                                   int protocol)
 {
        __u8 control_size = uac_processing_unit_bControlSize(desc, protocol);
-       return desc->baSourceID[desc->bNrInPins + control_size];
+       return *(uac_processing_unit_bmControls(desc, protocol)
+                       + control_size);
 }
 
 static __inline__ __u8 *uac_processing_unit_specific(struct uac_processing_unit_descriptor *desc,
                                                 int protocol)
 {
        __u8 control_size = uac_processing_unit_bControlSize(desc, protocol);
-       return &desc->baSourceID[desc->bNrInPins + control_size + 1];
+       return uac_processing_unit_bmControls(desc, protocol)
+                       + control_size + 1;
 }
 
 /* 4.5.2 Class-Specific AS Interface Descriptor */
index 81a9279..f35aa0a 100644 (file)
@@ -19,6 +19,7 @@
 #define USB_CDC_SUBCLASS_OBEX                  0x0b
 #define USB_CDC_SUBCLASS_EEM                   0x0c
 #define USB_CDC_SUBCLASS_NCM                   0x0d
+#define USB_CDC_SUBCLASS_MBIM                  0x0e
 
 #define USB_CDC_PROTO_NONE                     0
 
@@ -33,6 +34,7 @@
 #define USB_CDC_PROTO_EEM                      7
 
 #define USB_CDC_NCM_PROTO_NTB                  1
+#define USB_CDC_MBIM_PROTO_NTB                 2
 
 /*-------------------------------------------------------------------------*/
 
@@ -53,6 +55,7 @@
 #define USB_CDC_DMM_TYPE               0x14
 #define USB_CDC_OBEX_TYPE              0x15
 #define USB_CDC_NCM_TYPE               0x1a
+#define USB_CDC_MBIM_TYPE              0x1b
 
 /* "Header Functional Descriptor" from CDC spec  5.2.3.1 */
 struct usb_cdc_header_desc {
@@ -187,6 +190,21 @@ struct usb_cdc_ncm_desc {
        __le16  bcdNcmVersion;
        __u8    bmNetworkCapabilities;
 } __attribute__ ((packed));
+
+/* "MBIM Control Model Functional Descriptor" */
+struct usb_cdc_mbim_desc {
+       __u8    bLength;
+       __u8    bDescriptorType;
+       __u8    bDescriptorSubType;
+
+       __le16  bcdMBIMVersion;
+       __le16  wMaxControlMessage;
+       __u8    bNumberFilters;
+       __u8    bMaxFilterSize;
+       __le16  wMaxSegmentSize;
+       __u8    bmNetworkCapabilities;
+} __attribute__ ((packed));
+
 /*-------------------------------------------------------------------------*/
 
 /*
@@ -332,6 +350,11 @@ struct usb_cdc_ncm_nth32 {
 #define USB_CDC_NCM_NDP32_CRC_SIGN     0x316D636E /* ncm1 */
 #define USB_CDC_NCM_NDP32_NOCRC_SIGN   0x306D636E /* ncm0 */
 
+#define USB_CDC_MBIM_NDP16_IPS_SIGN     0x00535049 /* IPS<sessionID> : IPS0 for now */
+#define USB_CDC_MBIM_NDP32_IPS_SIGN     0x00737069 /* ips<sessionID> : ips0 for now */
+#define USB_CDC_MBIM_NDP16_DSS_SIGN     0x00535344 /* DSS<sessionID> */
+#define USB_CDC_MBIM_NDP32_DSS_SIGN     0x00737364 /* dss<sessionID> */
+
 /* 16-bit NCM Datagram Pointer Entry */
 struct usb_cdc_ncm_dpe16 {
        __le16  wDatagramIndex;
index f1d26b6..7692dc6 100644 (file)
@@ -76,6 +76,8 @@
 #define USB_PORT_FEAT_C_BH_PORT_RESET          29
 #define USB_PORT_FEAT_FORCE_LINKPM_ACCEPT      30
 
+#define USB_PORT_LPM_TIMEOUT(p)                        (((p) & 0xff) << 8)
+
 /* USB 3.0 hub remote wake mask bits, see table 10-14 */
 #define USB_PORT_FEAT_REMOTE_WAKE_CONNECT      (1 << 8)
 #define USB_PORT_FEAT_REMOTE_WAKE_DISCONNECT   (1 << 9)
@@ -234,8 +236,8 @@ struct usb_hub_descriptor {
 
                struct {
                        __u8 bHubHdrDecLat;
-                       __u16 wHubDelay;
-                       __u16 DeviceRemovable;
+                       __le16 wHubDelay;
+                       __le16 DeviceRemovable;
                }  __attribute__ ((packed)) ss;
        } u;
 } __attribute__ ((packed));
index 0e785ed..ebe53ea 100644 (file)
@@ -88,6 +88,8 @@
 #define USB_REQ_GET_INTERFACE          0x0A
 #define USB_REQ_SET_INTERFACE          0x0B
 #define USB_REQ_SYNCH_FRAME            0x0C
+#define USB_REQ_SET_SEL                        0x30
+#define USB_REQ_SET_ISOCH_DELAY                0x31
 
 #define USB_REQ_SET_ENCRYPTION         0x0D    /* Wireless USB */
 #define USB_REQ_GET_ENCRYPTION         0x0E
 
 /*
  * New Feature Selectors as added by USB 3.0
- * See USB 3.0 spec Table 9-6
+ * See USB 3.0 spec Table 9-7
  */
 #define USB_DEVICE_U1_ENABLE   48      /* dev may initiate U1 transition */
 #define USB_DEVICE_U2_ENABLE   49      /* dev may initiate U2 transition */
 
 #define USB_INTR_FUNC_SUSPEND_OPT_MASK 0xFF00
 /*
- * Suspend Options, Table 9-7 USB 3.0 spec
+ * Suspend Options, Table 9-8 USB 3.0 spec
  */
 #define USB_INTRF_FUNC_SUSPEND_LP      (1 << (8 + 0))
 #define USB_INTRF_FUNC_SUSPEND_RW      (1 << (8 + 1))
 
+/*
+ * Interface status, Figure 9-5 USB 3.0 spec
+ */
+#define USB_INTRF_STAT_FUNC_RW_CAP     1
+#define USB_INTRF_STAT_FUNC_RW         2
+
 #define USB_ENDPOINT_HALT              0       /* IN/OUT will STALL */
 
 /* Bit array elements as returned by the USB_REQ_GET_STATUS request. */
@@ -390,6 +398,11 @@ struct usb_endpoint_descriptor {
 #define USB_ENDPOINT_XFER_INT          3
 #define USB_ENDPOINT_MAX_ADJUSTABLE    0x80
 
+/* The USB 3.0 spec redefines bits 5:4 of bmAttributes as interrupt ep type. */
+#define USB_ENDPOINT_INTRTYPE          0x30
+#define USB_ENDPOINT_INTR_PERIODIC     (0 << 4)
+#define USB_ENDPOINT_INTR_NOTIFICATION (1 << 4)
+
 #define USB_ENDPOINT_SYNCTYPE          0x0c
 #define USB_ENDPOINT_SYNC_NONE         (0 << 2)
 #define USB_ENDPOINT_SYNC_ASYNC                (1 << 2)
@@ -592,6 +605,12 @@ static __inline__ int usb_endpoint_maxp(const struct usb_endpoint_descriptor *ep
        return __le16_to_cpu(epd->wMaxPacketSize);
 }
 
+static __inline__ int usb_endpoint_interrupt_type(
+               const struct usb_endpoint_descriptor *epd)
+{
+       return epd->bmAttributes & USB_ENDPOINT_INTRTYPE;
+}
+
 /*-------------------------------------------------------------------------*/
 
 /* USB_DT_SS_ENDPOINT_COMP: SuperSpeed Endpoint Companion descriptor */
@@ -922,6 +941,51 @@ enum usb_device_state {
         */
 };
 
+enum usb3_link_state {
+       USB3_LPM_U0 = 0,
+       USB3_LPM_U1,
+       USB3_LPM_U2,
+       USB3_LPM_U3
+};
+
+/*
+ * A U1 timeout of 0x0 means the parent hub will reject any transitions to U1.
+ * 0xff means the parent hub will accept transitions to U1, but will not
+ * initiate a transition.
+ *
+ * A U1 timeout of 0x1 to 0x7F also causes the hub to initiate a transition to
+ * U1 after that many microseconds.  Timeouts of 0x80 to 0xFE are reserved
+ * values.
+ *
+ * A U2 timeout of 0x0 means the parent hub will reject any transitions to U2.
+ * 0xff means the parent hub will accept transitions to U2, but will not
+ * initiate a transition.
+ *
+ * A U2 timeout of 0x1 to 0xFE also causes the hub to initiate a transition to
+ * U2 after N*256 microseconds.  Therefore a U2 timeout value of 0x1 means a U2
+ * idle timer of 256 microseconds, 0x2 means 512 microseconds, 0xFE means
+ * 65.024ms.
+ */
+#define USB3_LPM_DISABLED              0x0
+#define USB3_LPM_U1_MAX_TIMEOUT                0x7F
+#define USB3_LPM_U2_MAX_TIMEOUT                0xFE
+#define USB3_LPM_DEVICE_INITIATED      0xFF
+
+struct usb_set_sel_req {
+       __u8    u1_sel;
+       __u8    u1_pel;
+       __le16  u2_sel;
+       __le16  u2_pel;
+} __attribute__ ((packed));
+
+/*
+ * The Set System Exit Latency control transfer provides one byte each for
+ * U1 SEL and U1 PEL, so the max exit latency is 0xFF.  U2 SEL and U2 PEL each
+ * are two bytes long.
+ */
+#define USB3_LPM_MAX_U1_SEL_PEL                0xFF
+#define USB3_LPM_MAX_U2_SEL_PEL                0xFFFF
+
 /*-------------------------------------------------------------------------*/
 
 /*
index 53a3f30..532d484 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef __LINUX_FUNCTIONFS_H__
-#define __LINUX_FUNCTIONFS_H__ 1
+#define __LINUX_FUNCTIONFS_H__
 
 
 #include <linux/types.h>
@@ -164,4 +164,4 @@ struct usb_functionfs_event {
 
 
 
-#endif
+#endif /* __LINUX_FUNCTIONFS_H__ */
index 3c5ec05..a637424 100644 (file)
@@ -125,6 +125,25 @@ struct usbdevfs_hub_portinfo {
        char port [127];        /* e.g. port 3 connects to device 27 */
 };
 
+/* Device capability flags */
+#define USBDEVFS_CAP_ZERO_PACKET               0x01
+#define USBDEVFS_CAP_BULK_CONTINUATION         0x02
+#define USBDEVFS_CAP_NO_PACKET_SIZE_LIM                0x04
+#define USBDEVFS_CAP_BULK_SCATTER_GATHER       0x08
+
+/* USBDEVFS_DISCONNECT_CLAIM flags & struct */
+
+/* disconnect-and-claim if the driver matches the driver field */
+#define USBDEVFS_DISCONNECT_CLAIM_IF_DRIVER    0x01
+/* disconnect-and-claim except when the driver matches the driver field */
+#define USBDEVFS_DISCONNECT_CLAIM_EXCEPT_DRIVER        0x02
+
+struct usbdevfs_disconnect_claim {
+       unsigned int interface;
+       unsigned int flags;
+       char driver[USBDEVFS_MAXDRIVERNAME + 1];
+};
+
 
 #define USBDEVFS_CONTROL           _IOWR('U', 0, struct usbdevfs_ctrltransfer)
 #define USBDEVFS_CONTROL32           _IOWR('U', 0, struct usbdevfs_ctrltransfer32)
@@ -155,4 +174,7 @@ struct usbdevfs_hub_portinfo {
 #define USBDEVFS_CONNECT           _IO('U', 23)
 #define USBDEVFS_CLAIM_PORT        _IOR('U', 24, unsigned int)
 #define USBDEVFS_RELEASE_PORT      _IOR('U', 25, unsigned int)
+#define USBDEVFS_GET_CAPABILITIES  _IOR('U', 26, __u32)
+#define USBDEVFS_DISCONNECT_CLAIM  _IOR('U', 27, struct usbdevfs_disconnect_claim)
+
 #endif /* _LINUX_USBDEVICE_FS_H */
diff --git a/usr/include/linux/uuid.h b/usr/include/linux/uuid.h
new file mode 100644 (file)
index 0000000..af891a3
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * UUID/GUID definition
+ *
+ * Copyright (C) 2010, Intel Corp.
+ *     Huang Ying <ying.huang@intel.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;
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef _LINUX_UUID_H_
+#define _LINUX_UUID_H_
+
+#include <linux/types.h>
+#include <linux/string.h>
+
+typedef struct {
+       __u8 b[16];
+} uuid_le;
+
+typedef struct {
+       __u8 b[16];
+} uuid_be;
+
+#define UUID_LE(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7)               \
+((uuid_le)                                                             \
+{{ (a) & 0xff, ((a) >> 8) & 0xff, ((a) >> 16) & 0xff, ((a) >> 24) & 0xff, \
+   (b) & 0xff, ((b) >> 8) & 0xff,                                      \
+   (c) & 0xff, ((c) >> 8) & 0xff,                                      \
+   (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }})
+
+#define UUID_BE(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7)               \
+((uuid_be)                                                             \
+{{ ((a) >> 24) & 0xff, ((a) >> 16) & 0xff, ((a) >> 8) & 0xff, (a) & 0xff, \
+   ((b) >> 8) & 0xff, (b) & 0xff,                                      \
+   ((c) >> 8) & 0xff, (c) & 0xff,                                      \
+   (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }})
+
+#define NULL_UUID_LE                                                   \
+       UUID_LE(0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00,     \
+               0x00, 0x00, 0x00, 0x00)
+
+#define NULL_UUID_BE                                                   \
+       UUID_BE(0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00,     \
+               0x00, 0x00, 0x00, 0x00)
+
+
+#endif /* _LINUX_UUID_H_ */
index c6aacfc..faff40e 100644 (file)
@@ -58,7 +58,8 @@ struct uvc_xu_control_mapping {
 struct uvc_xu_control_query {
        __u8 unit;
        __u8 selector;
-       __u8 query;
+       __u8 query;             /* Video Class-Specific Request Code, */
+                               /* defined in linux/usb/video.h A.8.  */
        __u16 size;
        __u8 *data;
 };
diff --git a/usr/include/linux/v4l2-common.h b/usr/include/linux/v4l2-common.h
new file mode 100644 (file)
index 0000000..4f0667e
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * include/linux/v4l2-common.h
+ *
+ * Common V4L2 and V4L2 subdev definitions.
+ *
+ * Users are advised to #include this file either through videodev2.h
+ * (V4L2) or through v4l2-subdev.h (V4L2 subdev) rather than to refer
+ * to this file directly.
+ *
+ * Copyright (C) 2012 Nokia Corporation
+ * Contact: Sakari Ailus <sakari.ailus@iki.fi>
+ *
+ * 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, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __V4L2_COMMON__
+#define __V4L2_COMMON__
+
+/*
+ *
+ * Selection interface definitions
+ *
+ */
+
+/* Current cropping area */
+#define V4L2_SEL_TGT_CROP              0x0000
+/* Default cropping area */
+#define V4L2_SEL_TGT_CROP_DEFAULT      0x0001
+/* Cropping bounds */
+#define V4L2_SEL_TGT_CROP_BOUNDS       0x0002
+/* Current composing area */
+#define V4L2_SEL_TGT_COMPOSE           0x0100
+/* Default composing area */
+#define V4L2_SEL_TGT_COMPOSE_DEFAULT   0x0101
+/* Composing bounds */
+#define V4L2_SEL_TGT_COMPOSE_BOUNDS    0x0102
+/* Current composing area plus all padding pixels */
+#define V4L2_SEL_TGT_COMPOSE_PADDED    0x0103
+
+/* Backward compatibility target definitions --- to be removed. */
+#define V4L2_SEL_TGT_CROP_ACTIVE       V4L2_SEL_TGT_CROP
+#define V4L2_SEL_TGT_COMPOSE_ACTIVE    V4L2_SEL_TGT_COMPOSE
+#define V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL        V4L2_SEL_TGT_CROP
+#define V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL V4L2_SEL_TGT_COMPOSE
+#define V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS        V4L2_SEL_TGT_CROP_BOUNDS
+#define V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS V4L2_SEL_TGT_COMPOSE_BOUNDS
+
+/* Selection flags */
+#define V4L2_SEL_FLAG_GE               (1 << 0)
+#define V4L2_SEL_FLAG_LE               (1 << 1)
+#define V4L2_SEL_FLAG_KEEP_CONFIG      (1 << 2)
+
+/* Backward compatibility flag definitions --- to be removed. */
+#define V4L2_SUBDEV_SEL_FLAG_SIZE_GE   V4L2_SEL_FLAG_GE
+#define V4L2_SUBDEV_SEL_FLAG_SIZE_LE   V4L2_SEL_FLAG_LE
+#define V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG V4L2_SEL_FLAG_KEEP_CONFIG
+
+#endif /* __V4L2_COMMON__ */
diff --git a/usr/include/linux/v4l2-controls.h b/usr/include/linux/v4l2-controls.h
new file mode 100644 (file)
index 0000000..69bd5bb
--- /dev/null
@@ -0,0 +1,856 @@
+/*
+ *  Video for Linux Two controls header file
+ *
+ *  Copyright (C) 1999-2012 the contributors
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  Alternatively you can redistribute this file under the terms of the
+ *  BSD license as stated below:
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *  1. Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *  2. 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.
+ *  3. The names of its contributors may not be used to endorse or promote
+ *     products derived from this software without specific prior written
+ *     permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *  "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 THE COPYRIGHT
+ *  OWNER OR CONTRIBUTORS 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.
+ *
+ *  The contents of this header was split off from videodev2.h. All control
+ *  definitions should be added to this header, which is included by
+ *  videodev2.h.
+ */
+
+#ifndef __LINUX_V4L2_CONTROLS_H
+#define __LINUX_V4L2_CONTROLS_H
+
+/* Control classes */
+#define V4L2_CTRL_CLASS_USER           0x00980000      /* Old-style 'user' controls */
+#define V4L2_CTRL_CLASS_MPEG           0x00990000      /* MPEG-compression controls */
+#define V4L2_CTRL_CLASS_CAMERA         0x009a0000      /* Camera class controls */
+#define V4L2_CTRL_CLASS_FM_TX          0x009b0000      /* FM Modulator control class */
+#define V4L2_CTRL_CLASS_FLASH          0x009c0000      /* Camera flash controls */
+#define V4L2_CTRL_CLASS_JPEG           0x009d0000      /* JPEG-compression controls */
+#define V4L2_CTRL_CLASS_IMAGE_SOURCE   0x009e0000      /* Image source controls */
+#define V4L2_CTRL_CLASS_IMAGE_PROC     0x009f0000      /* Image processing controls */
+#define V4L2_CTRL_CLASS_DV             0x00a00000      /* Digital Video controls */
+#define V4L2_CTRL_CLASS_FM_RX          0x00a10000      /* Digital Video controls */
+
+/* User-class control IDs */
+
+#define V4L2_CID_BASE                  (V4L2_CTRL_CLASS_USER | 0x900)
+#define V4L2_CID_USER_BASE             V4L2_CID_BASE
+#define V4L2_CID_USER_CLASS            (V4L2_CTRL_CLASS_USER | 1)
+#define V4L2_CID_BRIGHTNESS            (V4L2_CID_BASE+0)
+#define V4L2_CID_CONTRAST              (V4L2_CID_BASE+1)
+#define V4L2_CID_SATURATION            (V4L2_CID_BASE+2)
+#define V4L2_CID_HUE                   (V4L2_CID_BASE+3)
+#define V4L2_CID_AUDIO_VOLUME          (V4L2_CID_BASE+5)
+#define V4L2_CID_AUDIO_BALANCE         (V4L2_CID_BASE+6)
+#define V4L2_CID_AUDIO_BASS            (V4L2_CID_BASE+7)
+#define V4L2_CID_AUDIO_TREBLE          (V4L2_CID_BASE+8)
+#define V4L2_CID_AUDIO_MUTE            (V4L2_CID_BASE+9)
+#define V4L2_CID_AUDIO_LOUDNESS                (V4L2_CID_BASE+10)
+#define V4L2_CID_BLACK_LEVEL           (V4L2_CID_BASE+11) /* Deprecated */
+#define V4L2_CID_AUTO_WHITE_BALANCE    (V4L2_CID_BASE+12)
+#define V4L2_CID_DO_WHITE_BALANCE      (V4L2_CID_BASE+13)
+#define V4L2_CID_RED_BALANCE           (V4L2_CID_BASE+14)
+#define V4L2_CID_BLUE_BALANCE          (V4L2_CID_BASE+15)
+#define V4L2_CID_GAMMA                 (V4L2_CID_BASE+16)
+#define V4L2_CID_WHITENESS             (V4L2_CID_GAMMA) /* Deprecated */
+#define V4L2_CID_EXPOSURE              (V4L2_CID_BASE+17)
+#define V4L2_CID_AUTOGAIN              (V4L2_CID_BASE+18)
+#define V4L2_CID_GAIN                  (V4L2_CID_BASE+19)
+#define V4L2_CID_HFLIP                 (V4L2_CID_BASE+20)
+#define V4L2_CID_VFLIP                 (V4L2_CID_BASE+21)
+
+#define V4L2_CID_POWER_LINE_FREQUENCY  (V4L2_CID_BASE+24)
+enum v4l2_power_line_frequency {
+       V4L2_CID_POWER_LINE_FREQUENCY_DISABLED  = 0,
+       V4L2_CID_POWER_LINE_FREQUENCY_50HZ      = 1,
+       V4L2_CID_POWER_LINE_FREQUENCY_60HZ      = 2,
+       V4L2_CID_POWER_LINE_FREQUENCY_AUTO      = 3,
+};
+#define V4L2_CID_HUE_AUTO                      (V4L2_CID_BASE+25)
+#define V4L2_CID_WHITE_BALANCE_TEMPERATURE     (V4L2_CID_BASE+26)
+#define V4L2_CID_SHARPNESS                     (V4L2_CID_BASE+27)
+#define V4L2_CID_BACKLIGHT_COMPENSATION        (V4L2_CID_BASE+28)
+#define V4L2_CID_CHROMA_AGC                     (V4L2_CID_BASE+29)
+#define V4L2_CID_COLOR_KILLER                   (V4L2_CID_BASE+30)
+#define V4L2_CID_COLORFX                       (V4L2_CID_BASE+31)
+enum v4l2_colorfx {
+       V4L2_COLORFX_NONE                       = 0,
+       V4L2_COLORFX_BW                         = 1,
+       V4L2_COLORFX_SEPIA                      = 2,
+       V4L2_COLORFX_NEGATIVE                   = 3,
+       V4L2_COLORFX_EMBOSS                     = 4,
+       V4L2_COLORFX_SKETCH                     = 5,
+       V4L2_COLORFX_SKY_BLUE                   = 6,
+       V4L2_COLORFX_GRASS_GREEN                = 7,
+       V4L2_COLORFX_SKIN_WHITEN                = 8,
+       V4L2_COLORFX_VIVID                      = 9,
+       V4L2_COLORFX_AQUA                       = 10,
+       V4L2_COLORFX_ART_FREEZE                 = 11,
+       V4L2_COLORFX_SILHOUETTE                 = 12,
+       V4L2_COLORFX_SOLARIZATION               = 13,
+       V4L2_COLORFX_ANTIQUE                    = 14,
+       V4L2_COLORFX_SET_CBCR                   = 15,
+};
+#define V4L2_CID_AUTOBRIGHTNESS                        (V4L2_CID_BASE+32)
+#define V4L2_CID_BAND_STOP_FILTER              (V4L2_CID_BASE+33)
+
+#define V4L2_CID_ROTATE                                (V4L2_CID_BASE+34)
+#define V4L2_CID_BG_COLOR                      (V4L2_CID_BASE+35)
+
+#define V4L2_CID_CHROMA_GAIN                    (V4L2_CID_BASE+36)
+
+#define V4L2_CID_ILLUMINATORS_1                        (V4L2_CID_BASE+37)
+#define V4L2_CID_ILLUMINATORS_2                        (V4L2_CID_BASE+38)
+
+#define V4L2_CID_MIN_BUFFERS_FOR_CAPTURE       (V4L2_CID_BASE+39)
+#define V4L2_CID_MIN_BUFFERS_FOR_OUTPUT                (V4L2_CID_BASE+40)
+
+#define V4L2_CID_ALPHA_COMPONENT               (V4L2_CID_BASE+41)
+#define V4L2_CID_COLORFX_CBCR                  (V4L2_CID_BASE+42)
+
+/* last CID + 1 */
+#define V4L2_CID_LASTP1                         (V4L2_CID_BASE+43)
+
+/* USER-class private control IDs */
+
+/* The base for the meye driver controls. See linux/meye.h for the list
+ * of controls. We reserve 16 controls for this driver. */
+#define V4L2_CID_USER_MEYE_BASE                        (V4L2_CID_USER_BASE + 0x1000)
+
+/* The base for the bttv driver controls.
+ * We reserve 32 controls for this driver. */
+#define V4L2_CID_USER_BTTV_BASE                        (V4L2_CID_USER_BASE + 0x1010)
+
+
+/* The base for the s2255 driver controls.
+ * We reserve 16 controls for this driver. */
+#define V4L2_CID_USER_S2255_BASE               (V4L2_CID_USER_BASE + 0x1030)
+
+/* The base for the si476x driver controls. See include/media/si476x.h for the list
+ * of controls. Total of 16 controls is reserved for this driver */
+#define V4L2_CID_USER_SI476X_BASE              (V4L2_CID_USER_BASE + 0x1040)
+
+/* MPEG-class control IDs */
+
+#define V4L2_CID_MPEG_BASE                     (V4L2_CTRL_CLASS_MPEG | 0x900)
+#define V4L2_CID_MPEG_CLASS                    (V4L2_CTRL_CLASS_MPEG | 1)
+
+/*  MPEG streams, specific to multiplexed streams */
+#define V4L2_CID_MPEG_STREAM_TYPE              (V4L2_CID_MPEG_BASE+0)
+enum v4l2_mpeg_stream_type {
+       V4L2_MPEG_STREAM_TYPE_MPEG2_PS   = 0, /* MPEG-2 program stream */
+       V4L2_MPEG_STREAM_TYPE_MPEG2_TS   = 1, /* MPEG-2 transport stream */
+       V4L2_MPEG_STREAM_TYPE_MPEG1_SS   = 2, /* MPEG-1 system stream */
+       V4L2_MPEG_STREAM_TYPE_MPEG2_DVD  = 3, /* MPEG-2 DVD-compatible stream */
+       V4L2_MPEG_STREAM_TYPE_MPEG1_VCD  = 4, /* MPEG-1 VCD-compatible stream */
+       V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD = 5, /* MPEG-2 SVCD-compatible stream */
+};
+#define V4L2_CID_MPEG_STREAM_PID_PMT           (V4L2_CID_MPEG_BASE+1)
+#define V4L2_CID_MPEG_STREAM_PID_AUDIO                 (V4L2_CID_MPEG_BASE+2)
+#define V4L2_CID_MPEG_STREAM_PID_VIDEO                 (V4L2_CID_MPEG_BASE+3)
+#define V4L2_CID_MPEG_STREAM_PID_PCR           (V4L2_CID_MPEG_BASE+4)
+#define V4L2_CID_MPEG_STREAM_PES_ID_AUDIO      (V4L2_CID_MPEG_BASE+5)
+#define V4L2_CID_MPEG_STREAM_PES_ID_VIDEO      (V4L2_CID_MPEG_BASE+6)
+#define V4L2_CID_MPEG_STREAM_VBI_FMT           (V4L2_CID_MPEG_BASE+7)
+enum v4l2_mpeg_stream_vbi_fmt {
+       V4L2_MPEG_STREAM_VBI_FMT_NONE = 0,  /* No VBI in the MPEG stream */
+       V4L2_MPEG_STREAM_VBI_FMT_IVTV = 1,  /* VBI in private packets, IVTV format */
+};
+
+/*  MPEG audio controls specific to multiplexed streams  */
+#define V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ      (V4L2_CID_MPEG_BASE+100)
+enum v4l2_mpeg_audio_sampling_freq {
+       V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100 = 0,
+       V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000 = 1,
+       V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000 = 2,
+};
+#define V4L2_CID_MPEG_AUDIO_ENCODING           (V4L2_CID_MPEG_BASE+101)
+enum v4l2_mpeg_audio_encoding {
+       V4L2_MPEG_AUDIO_ENCODING_LAYER_1 = 0,
+       V4L2_MPEG_AUDIO_ENCODING_LAYER_2 = 1,
+       V4L2_MPEG_AUDIO_ENCODING_LAYER_3 = 2,
+       V4L2_MPEG_AUDIO_ENCODING_AAC     = 3,
+       V4L2_MPEG_AUDIO_ENCODING_AC3     = 4,
+};
+#define V4L2_CID_MPEG_AUDIO_L1_BITRATE                 (V4L2_CID_MPEG_BASE+102)
+enum v4l2_mpeg_audio_l1_bitrate {
+       V4L2_MPEG_AUDIO_L1_BITRATE_32K  = 0,
+       V4L2_MPEG_AUDIO_L1_BITRATE_64K  = 1,
+       V4L2_MPEG_AUDIO_L1_BITRATE_96K  = 2,
+       V4L2_MPEG_AUDIO_L1_BITRATE_128K = 3,
+       V4L2_MPEG_AUDIO_L1_BITRATE_160K = 4,
+       V4L2_MPEG_AUDIO_L1_BITRATE_192K = 5,
+       V4L2_MPEG_AUDIO_L1_BITRATE_224K = 6,
+       V4L2_MPEG_AUDIO_L1_BITRATE_256K = 7,
+       V4L2_MPEG_AUDIO_L1_BITRATE_288K = 8,
+       V4L2_MPEG_AUDIO_L1_BITRATE_320K = 9,
+       V4L2_MPEG_AUDIO_L1_BITRATE_352K = 10,
+       V4L2_MPEG_AUDIO_L1_BITRATE_384K = 11,
+       V4L2_MPEG_AUDIO_L1_BITRATE_416K = 12,
+       V4L2_MPEG_AUDIO_L1_BITRATE_448K = 13,
+};
+#define V4L2_CID_MPEG_AUDIO_L2_BITRATE                 (V4L2_CID_MPEG_BASE+103)
+enum v4l2_mpeg_audio_l2_bitrate {
+       V4L2_MPEG_AUDIO_L2_BITRATE_32K  = 0,
+       V4L2_MPEG_AUDIO_L2_BITRATE_48K  = 1,
+       V4L2_MPEG_AUDIO_L2_BITRATE_56K  = 2,
+       V4L2_MPEG_AUDIO_L2_BITRATE_64K  = 3,
+       V4L2_MPEG_AUDIO_L2_BITRATE_80K  = 4,
+       V4L2_MPEG_AUDIO_L2_BITRATE_96K  = 5,
+       V4L2_MPEG_AUDIO_L2_BITRATE_112K = 6,
+       V4L2_MPEG_AUDIO_L2_BITRATE_128K = 7,
+       V4L2_MPEG_AUDIO_L2_BITRATE_160K = 8,
+       V4L2_MPEG_AUDIO_L2_BITRATE_192K = 9,
+       V4L2_MPEG_AUDIO_L2_BITRATE_224K = 10,
+       V4L2_MPEG_AUDIO_L2_BITRATE_256K = 11,
+       V4L2_MPEG_AUDIO_L2_BITRATE_320K = 12,
+       V4L2_MPEG_AUDIO_L2_BITRATE_384K = 13,
+};
+#define V4L2_CID_MPEG_AUDIO_L3_BITRATE                 (V4L2_CID_MPEG_BASE+104)
+enum v4l2_mpeg_audio_l3_bitrate {
+       V4L2_MPEG_AUDIO_L3_BITRATE_32K  = 0,
+       V4L2_MPEG_AUDIO_L3_BITRATE_40K  = 1,
+       V4L2_MPEG_AUDIO_L3_BITRATE_48K  = 2,
+       V4L2_MPEG_AUDIO_L3_BITRATE_56K  = 3,
+       V4L2_MPEG_AUDIO_L3_BITRATE_64K  = 4,
+       V4L2_MPEG_AUDIO_L3_BITRATE_80K  = 5,
+       V4L2_MPEG_AUDIO_L3_BITRATE_96K  = 6,
+       V4L2_MPEG_AUDIO_L3_BITRATE_112K = 7,
+       V4L2_MPEG_AUDIO_L3_BITRATE_128K = 8,
+       V4L2_MPEG_AUDIO_L3_BITRATE_160K = 9,
+       V4L2_MPEG_AUDIO_L3_BITRATE_192K = 10,
+       V4L2_MPEG_AUDIO_L3_BITRATE_224K = 11,
+       V4L2_MPEG_AUDIO_L3_BITRATE_256K = 12,
+       V4L2_MPEG_AUDIO_L3_BITRATE_320K = 13,
+};
+#define V4L2_CID_MPEG_AUDIO_MODE               (V4L2_CID_MPEG_BASE+105)
+enum v4l2_mpeg_audio_mode {
+       V4L2_MPEG_AUDIO_MODE_STEREO       = 0,
+       V4L2_MPEG_AUDIO_MODE_JOINT_STEREO = 1,
+       V4L2_MPEG_AUDIO_MODE_DUAL         = 2,
+       V4L2_MPEG_AUDIO_MODE_MONO         = 3,
+};
+#define V4L2_CID_MPEG_AUDIO_MODE_EXTENSION     (V4L2_CID_MPEG_BASE+106)
+enum v4l2_mpeg_audio_mode_extension {
+       V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4  = 0,
+       V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8  = 1,
+       V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12 = 2,
+       V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16 = 3,
+};
+#define V4L2_CID_MPEG_AUDIO_EMPHASIS           (V4L2_CID_MPEG_BASE+107)
+enum v4l2_mpeg_audio_emphasis {
+       V4L2_MPEG_AUDIO_EMPHASIS_NONE         = 0,
+       V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS = 1,
+       V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17    = 2,
+};
+#define V4L2_CID_MPEG_AUDIO_CRC                (V4L2_CID_MPEG_BASE+108)
+enum v4l2_mpeg_audio_crc {
+       V4L2_MPEG_AUDIO_CRC_NONE  = 0,
+       V4L2_MPEG_AUDIO_CRC_CRC16 = 1,
+};
+#define V4L2_CID_MPEG_AUDIO_MUTE               (V4L2_CID_MPEG_BASE+109)
+#define V4L2_CID_MPEG_AUDIO_AAC_BITRATE                (V4L2_CID_MPEG_BASE+110)
+#define V4L2_CID_MPEG_AUDIO_AC3_BITRATE                (V4L2_CID_MPEG_BASE+111)
+enum v4l2_mpeg_audio_ac3_bitrate {
+       V4L2_MPEG_AUDIO_AC3_BITRATE_32K  = 0,
+       V4L2_MPEG_AUDIO_AC3_BITRATE_40K  = 1,
+       V4L2_MPEG_AUDIO_AC3_BITRATE_48K  = 2,
+       V4L2_MPEG_AUDIO_AC3_BITRATE_56K  = 3,
+       V4L2_MPEG_AUDIO_AC3_BITRATE_64K  = 4,
+       V4L2_MPEG_AUDIO_AC3_BITRATE_80K  = 5,
+       V4L2_MPEG_AUDIO_AC3_BITRATE_96K  = 6,
+       V4L2_MPEG_AUDIO_AC3_BITRATE_112K = 7,
+       V4L2_MPEG_AUDIO_AC3_BITRATE_128K = 8,
+       V4L2_MPEG_AUDIO_AC3_BITRATE_160K = 9,
+       V4L2_MPEG_AUDIO_AC3_BITRATE_192K = 10,
+       V4L2_MPEG_AUDIO_AC3_BITRATE_224K = 11,
+       V4L2_MPEG_AUDIO_AC3_BITRATE_256K = 12,
+       V4L2_MPEG_AUDIO_AC3_BITRATE_320K = 13,
+       V4L2_MPEG_AUDIO_AC3_BITRATE_384K = 14,
+       V4L2_MPEG_AUDIO_AC3_BITRATE_448K = 15,
+       V4L2_MPEG_AUDIO_AC3_BITRATE_512K = 16,
+       V4L2_MPEG_AUDIO_AC3_BITRATE_576K = 17,
+       V4L2_MPEG_AUDIO_AC3_BITRATE_640K = 18,
+};
+#define V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK       (V4L2_CID_MPEG_BASE+112)
+enum v4l2_mpeg_audio_dec_playback {
+       V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO           = 0,
+       V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO         = 1,
+       V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT           = 2,
+       V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT          = 3,
+       V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO           = 4,
+       V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO = 5,
+};
+#define V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK (V4L2_CID_MPEG_BASE+113)
+
+/*  MPEG video controls specific to multiplexed streams */
+#define V4L2_CID_MPEG_VIDEO_ENCODING           (V4L2_CID_MPEG_BASE+200)
+enum v4l2_mpeg_video_encoding {
+       V4L2_MPEG_VIDEO_ENCODING_MPEG_1     = 0,
+       V4L2_MPEG_VIDEO_ENCODING_MPEG_2     = 1,
+       V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC = 2,
+};
+#define V4L2_CID_MPEG_VIDEO_ASPECT             (V4L2_CID_MPEG_BASE+201)
+enum v4l2_mpeg_video_aspect {
+       V4L2_MPEG_VIDEO_ASPECT_1x1     = 0,
+       V4L2_MPEG_VIDEO_ASPECT_4x3     = 1,
+       V4L2_MPEG_VIDEO_ASPECT_16x9    = 2,
+       V4L2_MPEG_VIDEO_ASPECT_221x100 = 3,
+};
+#define V4L2_CID_MPEG_VIDEO_B_FRAMES           (V4L2_CID_MPEG_BASE+202)
+#define V4L2_CID_MPEG_VIDEO_GOP_SIZE           (V4L2_CID_MPEG_BASE+203)
+#define V4L2_CID_MPEG_VIDEO_GOP_CLOSURE        (V4L2_CID_MPEG_BASE+204)
+#define V4L2_CID_MPEG_VIDEO_PULLDOWN           (V4L2_CID_MPEG_BASE+205)
+#define V4L2_CID_MPEG_VIDEO_BITRATE_MODE       (V4L2_CID_MPEG_BASE+206)
+enum v4l2_mpeg_video_bitrate_mode {
+       V4L2_MPEG_VIDEO_BITRATE_MODE_VBR = 0,
+       V4L2_MPEG_VIDEO_BITRATE_MODE_CBR = 1,
+};
+#define V4L2_CID_MPEG_VIDEO_BITRATE            (V4L2_CID_MPEG_BASE+207)
+#define V4L2_CID_MPEG_VIDEO_BITRATE_PEAK       (V4L2_CID_MPEG_BASE+208)
+#define V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (V4L2_CID_MPEG_BASE+209)
+#define V4L2_CID_MPEG_VIDEO_MUTE               (V4L2_CID_MPEG_BASE+210)
+#define V4L2_CID_MPEG_VIDEO_MUTE_YUV           (V4L2_CID_MPEG_BASE+211)
+#define V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE            (V4L2_CID_MPEG_BASE+212)
+#define V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER       (V4L2_CID_MPEG_BASE+213)
+#define V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB            (V4L2_CID_MPEG_BASE+214)
+#define V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE                    (V4L2_CID_MPEG_BASE+215)
+#define V4L2_CID_MPEG_VIDEO_HEADER_MODE                                (V4L2_CID_MPEG_BASE+216)
+enum v4l2_mpeg_video_header_mode {
+       V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE                    = 0,
+       V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME       = 1,
+
+};
+#define V4L2_CID_MPEG_VIDEO_MAX_REF_PIC                        (V4L2_CID_MPEG_BASE+217)
+#define V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE               (V4L2_CID_MPEG_BASE+218)
+#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES      (V4L2_CID_MPEG_BASE+219)
+#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB         (V4L2_CID_MPEG_BASE+220)
+#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE           (V4L2_CID_MPEG_BASE+221)
+enum v4l2_mpeg_video_multi_slice_mode {
+       V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE         = 0,
+       V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_MB          = 1,
+       V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_BYTES       = 2,
+};
+#define V4L2_CID_MPEG_VIDEO_VBV_SIZE                   (V4L2_CID_MPEG_BASE+222)
+#define V4L2_CID_MPEG_VIDEO_DEC_PTS                    (V4L2_CID_MPEG_BASE+223)
+#define V4L2_CID_MPEG_VIDEO_DEC_FRAME                  (V4L2_CID_MPEG_BASE+224)
+#define V4L2_CID_MPEG_VIDEO_VBV_DELAY                  (V4L2_CID_MPEG_BASE+225)
+#define V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER          (V4L2_CID_MPEG_BASE+226)
+
+#define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP            (V4L2_CID_MPEG_BASE+300)
+#define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP            (V4L2_CID_MPEG_BASE+301)
+#define V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP            (V4L2_CID_MPEG_BASE+302)
+#define V4L2_CID_MPEG_VIDEO_H263_MIN_QP                        (V4L2_CID_MPEG_BASE+303)
+#define V4L2_CID_MPEG_VIDEO_H263_MAX_QP                        (V4L2_CID_MPEG_BASE+304)
+#define V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP            (V4L2_CID_MPEG_BASE+350)
+#define V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP            (V4L2_CID_MPEG_BASE+351)
+#define V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP            (V4L2_CID_MPEG_BASE+352)
+#define V4L2_CID_MPEG_VIDEO_H264_MIN_QP                        (V4L2_CID_MPEG_BASE+353)
+#define V4L2_CID_MPEG_VIDEO_H264_MAX_QP                        (V4L2_CID_MPEG_BASE+354)
+#define V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM         (V4L2_CID_MPEG_BASE+355)
+#define V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE              (V4L2_CID_MPEG_BASE+356)
+#define V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE          (V4L2_CID_MPEG_BASE+357)
+enum v4l2_mpeg_video_h264_entropy_mode {
+       V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC = 0,
+       V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC = 1,
+};
+#define V4L2_CID_MPEG_VIDEO_H264_I_PERIOD              (V4L2_CID_MPEG_BASE+358)
+#define V4L2_CID_MPEG_VIDEO_H264_LEVEL                 (V4L2_CID_MPEG_BASE+359)
+enum v4l2_mpeg_video_h264_level {
+       V4L2_MPEG_VIDEO_H264_LEVEL_1_0  = 0,
+       V4L2_MPEG_VIDEO_H264_LEVEL_1B   = 1,
+       V4L2_MPEG_VIDEO_H264_LEVEL_1_1  = 2,
+       V4L2_MPEG_VIDEO_H264_LEVEL_1_2  = 3,
+       V4L2_MPEG_VIDEO_H264_LEVEL_1_3  = 4,
+       V4L2_MPEG_VIDEO_H264_LEVEL_2_0  = 5,
+       V4L2_MPEG_VIDEO_H264_LEVEL_2_1  = 6,
+       V4L2_MPEG_VIDEO_H264_LEVEL_2_2  = 7,
+       V4L2_MPEG_VIDEO_H264_LEVEL_3_0  = 8,
+       V4L2_MPEG_VIDEO_H264_LEVEL_3_1  = 9,
+       V4L2_MPEG_VIDEO_H264_LEVEL_3_2  = 10,
+       V4L2_MPEG_VIDEO_H264_LEVEL_4_0  = 11,
+       V4L2_MPEG_VIDEO_H264_LEVEL_4_1  = 12,
+       V4L2_MPEG_VIDEO_H264_LEVEL_4_2  = 13,
+       V4L2_MPEG_VIDEO_H264_LEVEL_5_0  = 14,
+       V4L2_MPEG_VIDEO_H264_LEVEL_5_1  = 15,
+};
+#define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA     (V4L2_CID_MPEG_BASE+360)
+#define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA      (V4L2_CID_MPEG_BASE+361)
+#define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE      (V4L2_CID_MPEG_BASE+362)
+enum v4l2_mpeg_video_h264_loop_filter_mode {
+       V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED                           = 0,
+       V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED                          = 1,
+       V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY        = 2,
+};
+#define V4L2_CID_MPEG_VIDEO_H264_PROFILE               (V4L2_CID_MPEG_BASE+363)
+enum v4l2_mpeg_video_h264_profile {
+       V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE                   = 0,
+       V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE       = 1,
+       V4L2_MPEG_VIDEO_H264_PROFILE_MAIN                       = 2,
+       V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED                   = 3,
+       V4L2_MPEG_VIDEO_H264_PROFILE_HIGH                       = 4,
+       V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10                    = 5,
+       V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422                   = 6,
+       V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE        = 7,
+       V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA              = 8,
+       V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA             = 9,
+       V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA             = 10,
+       V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA            = 11,
+       V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE          = 12,
+       V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH              = 13,
+       V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA        = 14,
+       V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH                = 15,
+       V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH             = 16,
+};
+#define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT    (V4L2_CID_MPEG_BASE+364)
+#define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH     (V4L2_CID_MPEG_BASE+365)
+#define V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE                (V4L2_CID_MPEG_BASE+366)
+#define V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC           (V4L2_CID_MPEG_BASE+367)
+enum v4l2_mpeg_video_h264_vui_sar_idc {
+       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED    = 0,
+       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_1x1            = 1,
+       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_12x11          = 2,
+       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_10x11          = 3,
+       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_16x11          = 4,
+       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_40x33          = 5,
+       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_24x11          = 6,
+       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_20x11          = 7,
+       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_32x11          = 8,
+       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_80x33          = 9,
+       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_18x11          = 10,
+       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_15x11          = 11,
+       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_64x33          = 12,
+       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_160x99         = 13,
+       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_4x3            = 14,
+       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_3x2            = 15,
+       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1            = 16,
+       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED       = 17,
+};
+#define V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING             (V4L2_CID_MPEG_BASE+368)
+#define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0                (V4L2_CID_MPEG_BASE+369)
+#define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE       (V4L2_CID_MPEG_BASE+370)
+enum v4l2_mpeg_video_h264_sei_fp_arrangement_type {
+       V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_CHECKERBOARD       = 0,
+       V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_COLUMN             = 1,
+       V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_ROW                = 2,
+       V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE       = 3,
+       V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TOP_BOTTOM         = 4,
+       V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TEMPORAL           = 5,
+};
+#define V4L2_CID_MPEG_VIDEO_H264_FMO                   (V4L2_CID_MPEG_BASE+371)
+#define V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE          (V4L2_CID_MPEG_BASE+372)
+enum v4l2_mpeg_video_h264_fmo_map_type {
+       V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES            = 0,
+       V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES              = 1,
+       V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER     = 2,
+       V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT                       = 3,
+       V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN                   = 4,
+       V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN                     = 5,
+       V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT                      = 6,
+};
+#define V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP       (V4L2_CID_MPEG_BASE+373)
+#define V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION  (V4L2_CID_MPEG_BASE+374)
+enum v4l2_mpeg_video_h264_fmo_change_dir {
+       V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT       = 0,
+       V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT        = 1,
+};
+#define V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE       (V4L2_CID_MPEG_BASE+375)
+#define V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH                (V4L2_CID_MPEG_BASE+376)
+#define V4L2_CID_MPEG_VIDEO_H264_ASO                   (V4L2_CID_MPEG_BASE+377)
+#define V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER       (V4L2_CID_MPEG_BASE+378)
+#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING           (V4L2_CID_MPEG_BASE+379)
+#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE      (V4L2_CID_MPEG_BASE+380)
+enum v4l2_mpeg_video_h264_hierarchical_coding_type {
+       V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B      = 0,
+       V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P      = 1,
+};
+#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER     (V4L2_CID_MPEG_BASE+381)
+#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP  (V4L2_CID_MPEG_BASE+382)
+#define V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP   (V4L2_CID_MPEG_BASE+400)
+#define V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP   (V4L2_CID_MPEG_BASE+401)
+#define V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP   (V4L2_CID_MPEG_BASE+402)
+#define V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP       (V4L2_CID_MPEG_BASE+403)
+#define V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP       (V4L2_CID_MPEG_BASE+404)
+#define V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL                (V4L2_CID_MPEG_BASE+405)
+enum v4l2_mpeg_video_mpeg4_level {
+       V4L2_MPEG_VIDEO_MPEG4_LEVEL_0   = 0,
+       V4L2_MPEG_VIDEO_MPEG4_LEVEL_0B  = 1,
+       V4L2_MPEG_VIDEO_MPEG4_LEVEL_1   = 2,
+       V4L2_MPEG_VIDEO_MPEG4_LEVEL_2   = 3,
+       V4L2_MPEG_VIDEO_MPEG4_LEVEL_3   = 4,
+       V4L2_MPEG_VIDEO_MPEG4_LEVEL_3B  = 5,
+       V4L2_MPEG_VIDEO_MPEG4_LEVEL_4   = 6,
+       V4L2_MPEG_VIDEO_MPEG4_LEVEL_5   = 7,
+};
+#define V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE      (V4L2_CID_MPEG_BASE+406)
+enum v4l2_mpeg_video_mpeg4_profile {
+       V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE                            = 0,
+       V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE                   = 1,
+       V4L2_MPEG_VIDEO_MPEG4_PROFILE_CORE                              = 2,
+       V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE_SCALABLE                   = 3,
+       V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY        = 4,
+};
+#define V4L2_CID_MPEG_VIDEO_MPEG4_QPEL         (V4L2_CID_MPEG_BASE+407)
+
+/*  MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */
+#define V4L2_CID_MPEG_CX2341X_BASE                             (V4L2_CTRL_CLASS_MPEG | 0x1000)
+#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE        (V4L2_CID_MPEG_CX2341X_BASE+0)
+enum v4l2_mpeg_cx2341x_video_spatial_filter_mode {
+       V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL = 0,
+       V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO   = 1,
+};
+#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER             (V4L2_CID_MPEG_CX2341X_BASE+1)
+#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE   (V4L2_CID_MPEG_CX2341X_BASE+2)
+enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type {
+       V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF                  = 0,
+       V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR               = 1,
+       V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT              = 2,
+       V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE      = 3,
+       V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE = 4,
+};
+#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE         (V4L2_CID_MPEG_CX2341X_BASE+3)
+enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type {
+       V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF    = 0,
+       V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR = 1,
+};
+#define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE       (V4L2_CID_MPEG_CX2341X_BASE+4)
+enum v4l2_mpeg_cx2341x_video_temporal_filter_mode {
+       V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL = 0,
+       V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO   = 1,
+};
+#define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER            (V4L2_CID_MPEG_CX2341X_BASE+5)
+#define V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE                 (V4L2_CID_MPEG_CX2341X_BASE+6)
+enum v4l2_mpeg_cx2341x_video_median_filter_type {
+       V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF      = 0,
+       V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR      = 1,
+       V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT     = 2,
+       V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT = 3,
+       V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG     = 4,
+};
+#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM  (V4L2_CID_MPEG_CX2341X_BASE+7)
+#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP     (V4L2_CID_MPEG_CX2341X_BASE+8)
+#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM        (V4L2_CID_MPEG_CX2341X_BASE+9)
+#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP   (V4L2_CID_MPEG_CX2341X_BASE+10)
+#define V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS        (V4L2_CID_MPEG_CX2341X_BASE+11)
+
+/*  MPEG-class control IDs specific to the Samsung MFC 5.1 driver as defined by V4L2 */
+#define V4L2_CID_MPEG_MFC51_BASE                               (V4L2_CTRL_CLASS_MPEG | 0x1100)
+
+#define V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY           (V4L2_CID_MPEG_MFC51_BASE+0)
+#define V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE    (V4L2_CID_MPEG_MFC51_BASE+1)
+#define V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE                      (V4L2_CID_MPEG_MFC51_BASE+2)
+enum v4l2_mpeg_mfc51_video_frame_skip_mode {
+       V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_DISABLED          = 0,
+       V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT       = 1,
+       V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT         = 2,
+};
+#define V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE                     (V4L2_CID_MPEG_MFC51_BASE+3)
+enum v4l2_mpeg_mfc51_video_force_frame_type {
+       V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_DISABLED         = 0,
+       V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_I_FRAME          = 1,
+       V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_NOT_CODED        = 2,
+};
+#define V4L2_CID_MPEG_MFC51_VIDEO_PADDING                              (V4L2_CID_MPEG_MFC51_BASE+4)
+#define V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV                          (V4L2_CID_MPEG_MFC51_BASE+5)
+#define V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT                  (V4L2_CID_MPEG_MFC51_BASE+6)
+#define V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF                    (V4L2_CID_MPEG_MFC51_BASE+7)
+#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY            (V4L2_CID_MPEG_MFC51_BASE+50)
+#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK                        (V4L2_CID_MPEG_MFC51_BASE+51)
+#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH              (V4L2_CID_MPEG_MFC51_BASE+52)
+#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC              (V4L2_CID_MPEG_MFC51_BASE+53)
+#define V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P               (V4L2_CID_MPEG_MFC51_BASE+54)
+
+
+/*  Camera class control IDs */
+
+#define V4L2_CID_CAMERA_CLASS_BASE     (V4L2_CTRL_CLASS_CAMERA | 0x900)
+#define V4L2_CID_CAMERA_CLASS          (V4L2_CTRL_CLASS_CAMERA | 1)
+
+#define V4L2_CID_EXPOSURE_AUTO                 (V4L2_CID_CAMERA_CLASS_BASE+1)
+enum  v4l2_exposure_auto_type {
+       V4L2_EXPOSURE_AUTO = 0,
+       V4L2_EXPOSURE_MANUAL = 1,
+       V4L2_EXPOSURE_SHUTTER_PRIORITY = 2,
+       V4L2_EXPOSURE_APERTURE_PRIORITY = 3
+};
+#define V4L2_CID_EXPOSURE_ABSOLUTE             (V4L2_CID_CAMERA_CLASS_BASE+2)
+#define V4L2_CID_EXPOSURE_AUTO_PRIORITY                (V4L2_CID_CAMERA_CLASS_BASE+3)
+
+#define V4L2_CID_PAN_RELATIVE                  (V4L2_CID_CAMERA_CLASS_BASE+4)
+#define V4L2_CID_TILT_RELATIVE                 (V4L2_CID_CAMERA_CLASS_BASE+5)
+#define V4L2_CID_PAN_RESET                     (V4L2_CID_CAMERA_CLASS_BASE+6)
+#define V4L2_CID_TILT_RESET                    (V4L2_CID_CAMERA_CLASS_BASE+7)
+
+#define V4L2_CID_PAN_ABSOLUTE                  (V4L2_CID_CAMERA_CLASS_BASE+8)
+#define V4L2_CID_TILT_ABSOLUTE                 (V4L2_CID_CAMERA_CLASS_BASE+9)
+
+#define V4L2_CID_FOCUS_ABSOLUTE                        (V4L2_CID_CAMERA_CLASS_BASE+10)
+#define V4L2_CID_FOCUS_RELATIVE                        (V4L2_CID_CAMERA_CLASS_BASE+11)
+#define V4L2_CID_FOCUS_AUTO                    (V4L2_CID_CAMERA_CLASS_BASE+12)
+
+#define V4L2_CID_ZOOM_ABSOLUTE                 (V4L2_CID_CAMERA_CLASS_BASE+13)
+#define V4L2_CID_ZOOM_RELATIVE                 (V4L2_CID_CAMERA_CLASS_BASE+14)
+#define V4L2_CID_ZOOM_CONTINUOUS               (V4L2_CID_CAMERA_CLASS_BASE+15)
+
+#define V4L2_CID_PRIVACY                       (V4L2_CID_CAMERA_CLASS_BASE+16)
+
+#define V4L2_CID_IRIS_ABSOLUTE                 (V4L2_CID_CAMERA_CLASS_BASE+17)
+#define V4L2_CID_IRIS_RELATIVE                 (V4L2_CID_CAMERA_CLASS_BASE+18)
+
+#define V4L2_CID_AUTO_EXPOSURE_BIAS            (V4L2_CID_CAMERA_CLASS_BASE+19)
+
+#define V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE   (V4L2_CID_CAMERA_CLASS_BASE+20)
+enum v4l2_auto_n_preset_white_balance {
+       V4L2_WHITE_BALANCE_MANUAL               = 0,
+       V4L2_WHITE_BALANCE_AUTO                 = 1,
+       V4L2_WHITE_BALANCE_INCANDESCENT         = 2,
+       V4L2_WHITE_BALANCE_FLUORESCENT          = 3,
+       V4L2_WHITE_BALANCE_FLUORESCENT_H        = 4,
+       V4L2_WHITE_BALANCE_HORIZON              = 5,
+       V4L2_WHITE_BALANCE_DAYLIGHT             = 6,
+       V4L2_WHITE_BALANCE_FLASH                = 7,
+       V4L2_WHITE_BALANCE_CLOUDY               = 8,
+       V4L2_WHITE_BALANCE_SHADE                = 9,
+};
+
+#define V4L2_CID_WIDE_DYNAMIC_RANGE            (V4L2_CID_CAMERA_CLASS_BASE+21)
+#define V4L2_CID_IMAGE_STABILIZATION           (V4L2_CID_CAMERA_CLASS_BASE+22)
+
+#define V4L2_CID_ISO_SENSITIVITY               (V4L2_CID_CAMERA_CLASS_BASE+23)
+#define V4L2_CID_ISO_SENSITIVITY_AUTO          (V4L2_CID_CAMERA_CLASS_BASE+24)
+enum v4l2_iso_sensitivity_auto_type {
+       V4L2_ISO_SENSITIVITY_MANUAL             = 0,
+       V4L2_ISO_SENSITIVITY_AUTO               = 1,
+};
+
+#define V4L2_CID_EXPOSURE_METERING             (V4L2_CID_CAMERA_CLASS_BASE+25)
+enum v4l2_exposure_metering {
+       V4L2_EXPOSURE_METERING_AVERAGE          = 0,
+       V4L2_EXPOSURE_METERING_CENTER_WEIGHTED  = 1,
+       V4L2_EXPOSURE_METERING_SPOT             = 2,
+       V4L2_EXPOSURE_METERING_MATRIX           = 3,
+};
+
+#define V4L2_CID_SCENE_MODE                    (V4L2_CID_CAMERA_CLASS_BASE+26)
+enum v4l2_scene_mode {
+       V4L2_SCENE_MODE_NONE                    = 0,
+       V4L2_SCENE_MODE_BACKLIGHT               = 1,
+       V4L2_SCENE_MODE_BEACH_SNOW              = 2,
+       V4L2_SCENE_MODE_CANDLE_LIGHT            = 3,
+       V4L2_SCENE_MODE_DAWN_DUSK               = 4,
+       V4L2_SCENE_MODE_FALL_COLORS             = 5,
+       V4L2_SCENE_MODE_FIREWORKS               = 6,
+       V4L2_SCENE_MODE_LANDSCAPE               = 7,
+       V4L2_SCENE_MODE_NIGHT                   = 8,
+       V4L2_SCENE_MODE_PARTY_INDOOR            = 9,
+       V4L2_SCENE_MODE_PORTRAIT                = 10,
+       V4L2_SCENE_MODE_SPORTS                  = 11,
+       V4L2_SCENE_MODE_SUNSET                  = 12,
+       V4L2_SCENE_MODE_TEXT                    = 13,
+};
+
+#define V4L2_CID_3A_LOCK                       (V4L2_CID_CAMERA_CLASS_BASE+27)
+#define V4L2_LOCK_EXPOSURE                     (1 << 0)
+#define V4L2_LOCK_WHITE_BALANCE                        (1 << 1)
+#define V4L2_LOCK_FOCUS                                (1 << 2)
+
+#define V4L2_CID_AUTO_FOCUS_START              (V4L2_CID_CAMERA_CLASS_BASE+28)
+#define V4L2_CID_AUTO_FOCUS_STOP               (V4L2_CID_CAMERA_CLASS_BASE+29)
+#define V4L2_CID_AUTO_FOCUS_STATUS             (V4L2_CID_CAMERA_CLASS_BASE+30)
+#define V4L2_AUTO_FOCUS_STATUS_IDLE            (0 << 0)
+#define V4L2_AUTO_FOCUS_STATUS_BUSY            (1 << 0)
+#define V4L2_AUTO_FOCUS_STATUS_REACHED         (1 << 1)
+#define V4L2_AUTO_FOCUS_STATUS_FAILED          (1 << 2)
+
+#define V4L2_CID_AUTO_FOCUS_RANGE              (V4L2_CID_CAMERA_CLASS_BASE+31)
+enum v4l2_auto_focus_range {
+       V4L2_AUTO_FOCUS_RANGE_AUTO              = 0,
+       V4L2_AUTO_FOCUS_RANGE_NORMAL            = 1,
+       V4L2_AUTO_FOCUS_RANGE_MACRO             = 2,
+       V4L2_AUTO_FOCUS_RANGE_INFINITY          = 3,
+};
+
+
+/* FM Modulator class control IDs */
+
+#define V4L2_CID_FM_TX_CLASS_BASE              (V4L2_CTRL_CLASS_FM_TX | 0x900)
+#define V4L2_CID_FM_TX_CLASS                   (V4L2_CTRL_CLASS_FM_TX | 1)
+
+#define V4L2_CID_RDS_TX_DEVIATION              (V4L2_CID_FM_TX_CLASS_BASE + 1)
+#define V4L2_CID_RDS_TX_PI                     (V4L2_CID_FM_TX_CLASS_BASE + 2)
+#define V4L2_CID_RDS_TX_PTY                    (V4L2_CID_FM_TX_CLASS_BASE + 3)
+#define V4L2_CID_RDS_TX_PS_NAME                        (V4L2_CID_FM_TX_CLASS_BASE + 5)
+#define V4L2_CID_RDS_TX_RADIO_TEXT             (V4L2_CID_FM_TX_CLASS_BASE + 6)
+
+#define V4L2_CID_AUDIO_LIMITER_ENABLED         (V4L2_CID_FM_TX_CLASS_BASE + 64)
+#define V4L2_CID_AUDIO_LIMITER_RELEASE_TIME    (V4L2_CID_FM_TX_CLASS_BASE + 65)
+#define V4L2_CID_AUDIO_LIMITER_DEVIATION       (V4L2_CID_FM_TX_CLASS_BASE + 66)
+
+#define V4L2_CID_AUDIO_COMPRESSION_ENABLED     (V4L2_CID_FM_TX_CLASS_BASE + 80)
+#define V4L2_CID_AUDIO_COMPRESSION_GAIN                (V4L2_CID_FM_TX_CLASS_BASE + 81)
+#define V4L2_CID_AUDIO_COMPRESSION_THRESHOLD   (V4L2_CID_FM_TX_CLASS_BASE + 82)
+#define V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME (V4L2_CID_FM_TX_CLASS_BASE + 83)
+#define V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME        (V4L2_CID_FM_TX_CLASS_BASE + 84)
+
+#define V4L2_CID_PILOT_TONE_ENABLED            (V4L2_CID_FM_TX_CLASS_BASE + 96)
+#define V4L2_CID_PILOT_TONE_DEVIATION          (V4L2_CID_FM_TX_CLASS_BASE + 97)
+#define V4L2_CID_PILOT_TONE_FREQUENCY          (V4L2_CID_FM_TX_CLASS_BASE + 98)
+
+#define V4L2_CID_TUNE_PREEMPHASIS              (V4L2_CID_FM_TX_CLASS_BASE + 112)
+enum v4l2_preemphasis {
+       V4L2_PREEMPHASIS_DISABLED       = 0,
+       V4L2_PREEMPHASIS_50_uS          = 1,
+       V4L2_PREEMPHASIS_75_uS          = 2,
+};
+#define V4L2_CID_TUNE_POWER_LEVEL              (V4L2_CID_FM_TX_CLASS_BASE + 113)
+#define V4L2_CID_TUNE_ANTENNA_CAPACITOR                (V4L2_CID_FM_TX_CLASS_BASE + 114)
+
+
+/* Flash and privacy (indicator) light controls */
+
+#define V4L2_CID_FLASH_CLASS_BASE              (V4L2_CTRL_CLASS_FLASH | 0x900)
+#define V4L2_CID_FLASH_CLASS                   (V4L2_CTRL_CLASS_FLASH | 1)
+
+#define V4L2_CID_FLASH_LED_MODE                        (V4L2_CID_FLASH_CLASS_BASE + 1)
+enum v4l2_flash_led_mode {
+       V4L2_FLASH_LED_MODE_NONE,
+       V4L2_FLASH_LED_MODE_FLASH,
+       V4L2_FLASH_LED_MODE_TORCH,
+};
+
+#define V4L2_CID_FLASH_STROBE_SOURCE           (V4L2_CID_FLASH_CLASS_BASE + 2)
+enum v4l2_flash_strobe_source {
+       V4L2_FLASH_STROBE_SOURCE_SOFTWARE,
+       V4L2_FLASH_STROBE_SOURCE_EXTERNAL,
+};
+
+#define V4L2_CID_FLASH_STROBE                  (V4L2_CID_FLASH_CLASS_BASE + 3)
+#define V4L2_CID_FLASH_STROBE_STOP             (V4L2_CID_FLASH_CLASS_BASE + 4)
+#define V4L2_CID_FLASH_STROBE_STATUS           (V4L2_CID_FLASH_CLASS_BASE + 5)
+
+#define V4L2_CID_FLASH_TIMEOUT                 (V4L2_CID_FLASH_CLASS_BASE + 6)
+#define V4L2_CID_FLASH_INTENSITY               (V4L2_CID_FLASH_CLASS_BASE + 7)
+#define V4L2_CID_FLASH_TORCH_INTENSITY         (V4L2_CID_FLASH_CLASS_BASE + 8)
+#define V4L2_CID_FLASH_INDICATOR_INTENSITY     (V4L2_CID_FLASH_CLASS_BASE + 9)
+
+#define V4L2_CID_FLASH_FAULT                   (V4L2_CID_FLASH_CLASS_BASE + 10)
+#define V4L2_FLASH_FAULT_OVER_VOLTAGE          (1 << 0)
+#define V4L2_FLASH_FAULT_TIMEOUT               (1 << 1)
+#define V4L2_FLASH_FAULT_OVER_TEMPERATURE      (1 << 2)
+#define V4L2_FLASH_FAULT_SHORT_CIRCUIT         (1 << 3)
+#define V4L2_FLASH_FAULT_OVER_CURRENT          (1 << 4)
+#define V4L2_FLASH_FAULT_INDICATOR             (1 << 5)
+
+#define V4L2_CID_FLASH_CHARGE                  (V4L2_CID_FLASH_CLASS_BASE + 11)
+#define V4L2_CID_FLASH_READY                   (V4L2_CID_FLASH_CLASS_BASE + 12)
+
+
+/* JPEG-class control IDs */
+
+#define V4L2_CID_JPEG_CLASS_BASE               (V4L2_CTRL_CLASS_JPEG | 0x900)
+#define V4L2_CID_JPEG_CLASS                    (V4L2_CTRL_CLASS_JPEG | 1)
+
+#define        V4L2_CID_JPEG_CHROMA_SUBSAMPLING        (V4L2_CID_JPEG_CLASS_BASE + 1)
+enum v4l2_jpeg_chroma_subsampling {
+       V4L2_JPEG_CHROMA_SUBSAMPLING_444        = 0,
+       V4L2_JPEG_CHROMA_SUBSAMPLING_422        = 1,
+       V4L2_JPEG_CHROMA_SUBSAMPLING_420        = 2,
+       V4L2_JPEG_CHROMA_SUBSAMPLING_411        = 3,
+       V4L2_JPEG_CHROMA_SUBSAMPLING_410        = 4,
+       V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY       = 5,
+};
+#define        V4L2_CID_JPEG_RESTART_INTERVAL          (V4L2_CID_JPEG_CLASS_BASE + 2)
+#define        V4L2_CID_JPEG_COMPRESSION_QUALITY       (V4L2_CID_JPEG_CLASS_BASE + 3)
+
+#define        V4L2_CID_JPEG_ACTIVE_MARKER             (V4L2_CID_JPEG_CLASS_BASE + 4)
+#define        V4L2_JPEG_ACTIVE_MARKER_APP0            (1 << 0)
+#define        V4L2_JPEG_ACTIVE_MARKER_APP1            (1 << 1)
+#define        V4L2_JPEG_ACTIVE_MARKER_COM             (1 << 16)
+#define        V4L2_JPEG_ACTIVE_MARKER_DQT             (1 << 17)
+#define        V4L2_JPEG_ACTIVE_MARKER_DHT             (1 << 18)
+
+
+/* Image source controls */
+#define V4L2_CID_IMAGE_SOURCE_CLASS_BASE       (V4L2_CTRL_CLASS_IMAGE_SOURCE | 0x900)
+#define V4L2_CID_IMAGE_SOURCE_CLASS            (V4L2_CTRL_CLASS_IMAGE_SOURCE | 1)
+
+#define V4L2_CID_VBLANK                                (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 1)
+#define V4L2_CID_HBLANK                                (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 2)
+#define V4L2_CID_ANALOGUE_GAIN                 (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 3)
+
+
+/* Image processing controls */
+
+#define V4L2_CID_IMAGE_PROC_CLASS_BASE         (V4L2_CTRL_CLASS_IMAGE_PROC | 0x900)
+#define V4L2_CID_IMAGE_PROC_CLASS              (V4L2_CTRL_CLASS_IMAGE_PROC | 1)
+
+#define V4L2_CID_LINK_FREQ                     (V4L2_CID_IMAGE_PROC_CLASS_BASE + 1)
+#define V4L2_CID_PIXEL_RATE                    (V4L2_CID_IMAGE_PROC_CLASS_BASE + 2)
+#define V4L2_CID_TEST_PATTERN                  (V4L2_CID_IMAGE_PROC_CLASS_BASE + 3)
+
+
+/*  DV-class control IDs defined by V4L2 */
+#define V4L2_CID_DV_CLASS_BASE                 (V4L2_CTRL_CLASS_DV | 0x900)
+#define V4L2_CID_DV_CLASS                      (V4L2_CTRL_CLASS_DV | 1)
+
+#define        V4L2_CID_DV_TX_HOTPLUG                  (V4L2_CID_DV_CLASS_BASE + 1)
+#define        V4L2_CID_DV_TX_RXSENSE                  (V4L2_CID_DV_CLASS_BASE + 2)
+#define        V4L2_CID_DV_TX_EDID_PRESENT             (V4L2_CID_DV_CLASS_BASE + 3)
+#define        V4L2_CID_DV_TX_MODE                     (V4L2_CID_DV_CLASS_BASE + 4)
+enum v4l2_dv_tx_mode {
+       V4L2_DV_TX_MODE_DVI_D   = 0,
+       V4L2_DV_TX_MODE_HDMI    = 1,
+};
+#define V4L2_CID_DV_TX_RGB_RANGE               (V4L2_CID_DV_CLASS_BASE + 5)
+enum v4l2_dv_rgb_range {
+       V4L2_DV_RGB_RANGE_AUTO    = 0,
+       V4L2_DV_RGB_RANGE_LIMITED = 1,
+       V4L2_DV_RGB_RANGE_FULL    = 2,
+};
+
+#define        V4L2_CID_DV_RX_POWER_PRESENT            (V4L2_CID_DV_CLASS_BASE + 100)
+#define V4L2_CID_DV_RX_RGB_RANGE               (V4L2_CID_DV_CLASS_BASE + 101)
+
+#define V4L2_CID_FM_RX_CLASS_BASE              (V4L2_CTRL_CLASS_FM_RX | 0x900)
+#define V4L2_CID_FM_RX_CLASS                   (V4L2_CTRL_CLASS_FM_RX | 1)
+
+#define V4L2_CID_TUNE_DEEMPHASIS               (V4L2_CID_FM_RX_CLASS_BASE + 1)
+enum v4l2_deemphasis {
+       V4L2_DEEMPHASIS_DISABLED        = V4L2_PREEMPHASIS_DISABLED,
+       V4L2_DEEMPHASIS_50_uS           = V4L2_PREEMPHASIS_50_uS,
+       V4L2_DEEMPHASIS_75_uS           = V4L2_PREEMPHASIS_75_uS,
+};
+
+#define V4L2_CID_RDS_RECEPTION                 (V4L2_CID_FM_RX_CLASS_BASE + 2)
+
+#endif
diff --git a/usr/include/linux/v4l2-dv-timings.h b/usr/include/linux/v4l2-dv-timings.h
new file mode 100644 (file)
index 0000000..4e0c58d
--- /dev/null
@@ -0,0 +1,834 @@
+/*
+ * V4L2 DV timings header.
+ *
+ * Copyright (C) 2012  Hans Verkuil <hans.verkuil@cisco.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.
+ *
+ * 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 St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+
+#ifndef _V4L2_DV_TIMINGS_H
+#define _V4L2_DV_TIMINGS_H
+
+#if __GNUC__ < 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ < 6))
+/* Sadly gcc versions older than 4.6 have a bug in how they initialize
+   anonymous unions where they require additional curly brackets.
+   This violates the C1x standard. This workaround adds the curly brackets
+   if needed. */
+#define V4L2_INIT_BT_TIMINGS(_width, args...) \
+       { .bt = { _width , ## args } }
+#else
+#define V4L2_INIT_BT_TIMINGS(_width, args...) \
+       .bt = { _width , ## args }
+#endif
+
+/* CEA-861-E timings (i.e. standard HDTV timings) */
+
+#define V4L2_DV_BT_CEA_640X480P59_94 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(640, 480, 0, 0, \
+               25175000, 16, 96, 48, 10, 2, 33, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CEA861, 0) \
+}
+
+/* Note: these are the nominal timings, for HDMI links this format is typically
+ * double-clocked to meet the minimum pixelclock requirements.  */
+#define V4L2_DV_BT_CEA_720X480I59_94 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(720, 480, 1, 0, \
+               13500000, 19, 62, 57, 4, 3, 15, 4, 3, 16, \
+               V4L2_DV_BT_STD_CEA861, V4L2_DV_FL_HALF_LINE) \
+}
+
+#define V4L2_DV_BT_CEA_720X480P59_94 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(720, 480, 0, 0, \
+               27000000, 16, 62, 60, 9, 6, 30, 0, 0, 0, \
+               V4L2_DV_BT_STD_CEA861, 0) \
+}
+
+/* Note: these are the nominal timings, for HDMI links this format is typically
+ * double-clocked to meet the minimum pixelclock requirements.  */
+#define V4L2_DV_BT_CEA_720X576I50 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(720, 576, 1, 0, \
+               13500000, 12, 63, 69, 2, 3, 19, 2, 3, 20, \
+               V4L2_DV_BT_STD_CEA861, V4L2_DV_FL_HALF_LINE) \
+}
+
+#define V4L2_DV_BT_CEA_720X576P50 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(720, 576, 0, 0, \
+               27000000, 12, 64, 68, 5, 5, 39, 0, 0, 0, \
+               V4L2_DV_BT_STD_CEA861, 0) \
+}
+
+#define V4L2_DV_BT_CEA_1280X720P24 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1280, 720, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               59400000, 1760, 40, 220, 5, 5, 20, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CEA861, \
+               V4L2_DV_FL_CAN_REDUCE_FPS) \
+}
+
+#define V4L2_DV_BT_CEA_1280X720P25 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1280, 720, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               74250000, 2420, 40, 220, 5, 5, 20, 0, 0, 0, \
+               V4L2_DV_BT_STD_CEA861, 0) \
+}
+
+#define V4L2_DV_BT_CEA_1280X720P30 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1280, 720, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               74250000, 1760, 40, 220, 5, 5, 20, 0, 0, 0, \
+               V4L2_DV_BT_STD_CEA861, V4L2_DV_FL_CAN_REDUCE_FPS) \
+}
+
+#define V4L2_DV_BT_CEA_1280X720P50 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1280, 720, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               74250000, 440, 40, 220, 5, 5, 20, 0, 0, 0, \
+               V4L2_DV_BT_STD_CEA861, 0) \
+}
+
+#define V4L2_DV_BT_CEA_1280X720P60 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1280, 720, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               74250000, 110, 40, 220, 5, 5, 20, 0, 0, 0, \
+               V4L2_DV_BT_STD_CEA861, V4L2_DV_FL_CAN_REDUCE_FPS) \
+}
+
+#define V4L2_DV_BT_CEA_1920X1080P24 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1920, 1080, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               74250000, 638, 44, 148, 4, 5, 36, 0, 0, 0, \
+               V4L2_DV_BT_STD_CEA861, V4L2_DV_FL_CAN_REDUCE_FPS) \
+}
+
+#define V4L2_DV_BT_CEA_1920X1080P25 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1920, 1080, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               74250000, 528, 44, 148, 4, 5, 36, 0, 0, 0, \
+               V4L2_DV_BT_STD_CEA861, 0) \
+}
+
+#define V4L2_DV_BT_CEA_1920X1080P30 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1920, 1080, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               74250000, 88, 44, 148, 4, 5, 36, 0, 0, 0, \
+               V4L2_DV_BT_STD_CEA861, V4L2_DV_FL_CAN_REDUCE_FPS) \
+}
+
+#define V4L2_DV_BT_CEA_1920X1080I50 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1920, 1080, 1, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               74250000, 528, 44, 148, 2, 5, 15, 2, 5, 16, \
+               V4L2_DV_BT_STD_CEA861, V4L2_DV_FL_HALF_LINE) \
+}
+
+#define V4L2_DV_BT_CEA_1920X1080P50 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1920, 1080, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               148500000, 528, 44, 148, 4, 5, 36, 0, 0, 0, \
+               V4L2_DV_BT_STD_CEA861, 0) \
+}
+
+#define V4L2_DV_BT_CEA_1920X1080I60 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1920, 1080, 1, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               74250000, 88, 44, 148, 2, 5, 15, 2, 5, 16, \
+               V4L2_DV_BT_STD_CEA861, \
+               V4L2_DV_FL_CAN_REDUCE_FPS | V4L2_DV_FL_HALF_LINE) \
+}
+
+#define V4L2_DV_BT_CEA_1920X1080P60 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1920, 1080, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               148500000, 88, 44, 148, 4, 5, 36, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CEA861, \
+               V4L2_DV_FL_CAN_REDUCE_FPS) \
+}
+
+
+/* VESA Discrete Monitor Timings as per version 1.0, revision 12 */
+
+#define V4L2_DV_BT_DMT_640X350P85 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(640, 350, 0, V4L2_DV_HSYNC_POS_POL, \
+               31500000, 32, 64, 96, 32, 3, 60, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_640X400P85 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(640, 400, 0, V4L2_DV_VSYNC_POS_POL, \
+               31500000, 32, 64, 96, 1, 3, 41, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_720X400P85 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(720, 400, 0, V4L2_DV_VSYNC_POS_POL, \
+               35500000, 36, 72, 108, 1, 3, 42, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+/* VGA resolutions */
+#define V4L2_DV_BT_DMT_640X480P60 V4L2_DV_BT_CEA_640X480P59_94
+
+#define V4L2_DV_BT_DMT_640X480P72 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(640, 480, 0, 0, \
+               31500000, 24, 40, 128, 9, 3, 28, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_640X480P75 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(640, 480, 0, 0, \
+               31500000, 16, 64, 120, 1, 3, 16, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_640X480P85 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(640, 480, 0, 0, \
+               36000000, 56, 56, 80, 1, 3, 25, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+/* SVGA resolutions */
+#define V4L2_DV_BT_DMT_800X600P56 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(800, 600, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               36000000, 24, 72, 128, 1, 2, 22, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_800X600P60 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(800, 600, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               40000000, 40, 128, 88, 1, 4, 23, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_800X600P72 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(800, 600, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               50000000, 56, 120, 64, 37, 6, 23, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_800X600P75 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(800, 600, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               49500000, 16, 80, 160, 1, 3, 21, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_800X600P85 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(800, 600, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               56250000, 32, 64, 152, 1, 3, 27, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_800X600P120_RB { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(800, 600, 0, V4L2_DV_HSYNC_POS_POL, \
+               73250000, 48, 32, 80, 3, 4, 29, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, \
+               V4L2_DV_FL_REDUCED_BLANKING) \
+}
+
+#define V4L2_DV_BT_DMT_848X480P60 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(848, 480, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               33750000, 16, 112, 112, 6, 8, 23, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1024X768I43 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1024, 768, 1, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               44900000, 8, 176, 56, 0, 4, 20, 0, 4, 21, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+/* XGA resolutions */
+#define V4L2_DV_BT_DMT_1024X768P60 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1024, 768, 0, 0, \
+               65000000, 24, 136, 160, 3, 6, 29, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1024X768P70 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1024, 768, 0, 0, \
+               75000000, 24, 136, 144, 3, 6, 29, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1024X768P75 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1024, 768, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               78750000, 16, 96, 176, 1, 3, 28, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1024X768P85 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1024, 768, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               94500000, 48, 96, 208, 1, 3, 36, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1024X768P120_RB { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1024, 768, 0, V4L2_DV_HSYNC_POS_POL, \
+               115500000, 48, 32, 80, 3, 4, 38, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, \
+               V4L2_DV_FL_REDUCED_BLANKING) \
+}
+
+/* XGA+ resolution */
+#define V4L2_DV_BT_DMT_1152X864P75 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1152, 864, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               108000000, 64, 128, 256, 1, 3, 32, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1280X720P60 V4L2_DV_BT_CEA_1280X720P60
+
+/* WXGA resolutions */
+#define V4L2_DV_BT_DMT_1280X768P60_RB { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1280, 768, 0, V4L2_DV_HSYNC_POS_POL, \
+               68250000, 48, 32, 80, 3, 7, 12, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, \
+               V4L2_DV_FL_REDUCED_BLANKING) \
+}
+
+#define V4L2_DV_BT_DMT_1280X768P60 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1280, 768, 0, V4L2_DV_VSYNC_POS_POL, \
+               79500000, 64, 128, 192, 3, 7, 20, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1280X768P75 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1280, 768, 0, V4L2_DV_VSYNC_POS_POL, \
+               102250000, 80, 128, 208, 3, 7, 27, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1280X768P85 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1280, 768, 0, V4L2_DV_VSYNC_POS_POL, \
+               117500000, 80, 136, 216, 3, 7, 31, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1280X768P120_RB { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1280, 768, 0, V4L2_DV_HSYNC_POS_POL, \
+               140250000, 48, 32, 80, 3, 7, 35, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, \
+               V4L2_DV_FL_REDUCED_BLANKING) \
+}
+
+#define V4L2_DV_BT_DMT_1280X800P60_RB { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1280, 800, 0, V4L2_DV_HSYNC_POS_POL, \
+               71000000, 48, 32, 80, 3, 6, 14, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, \
+               V4L2_DV_FL_REDUCED_BLANKING) \
+}
+
+#define V4L2_DV_BT_DMT_1280X800P60 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1280, 800, 0, V4L2_DV_VSYNC_POS_POL, \
+               83500000, 72, 128, 200, 3, 6, 22, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1280X800P75 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1280, 800, 0, V4L2_DV_VSYNC_POS_POL, \
+               106500000, 80, 128, 208, 3, 6, 29, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1280X800P85 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1280, 800, 0, V4L2_DV_VSYNC_POS_POL, \
+               122500000, 80, 136, 216, 3, 6, 34, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1280X800P120_RB { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1280, 800, 0, V4L2_DV_HSYNC_POS_POL, \
+               146250000, 48, 32, 80, 3, 6, 38, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, \
+               V4L2_DV_FL_REDUCED_BLANKING) \
+}
+
+#define V4L2_DV_BT_DMT_1280X960P60 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1280, 960, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               108000000, 96, 112, 312, 1, 3, 36, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1280X960P85 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1280, 960, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               148500000, 64, 160, 224, 1, 3, 47, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1280X960P120_RB { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1280, 960, 0, V4L2_DV_HSYNC_POS_POL, \
+               175500000, 48, 32, 80, 3, 4, 50, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, \
+               V4L2_DV_FL_REDUCED_BLANKING) \
+}
+
+/* SXGA resolutions */
+#define V4L2_DV_BT_DMT_1280X1024P60 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1280, 1024, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               108000000, 48, 112, 248, 1, 3, 38, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1280X1024P75 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1280, 1024, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               135000000, 16, 144, 248, 1, 3, 38, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1280X1024P85 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1280, 1024, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               157500000, 64, 160, 224, 1, 3, 44, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1280X1024P120_RB { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1280, 1024, 0, V4L2_DV_HSYNC_POS_POL, \
+               187250000, 48, 32, 80, 3, 7, 50, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, \
+               V4L2_DV_FL_REDUCED_BLANKING) \
+}
+
+#define V4L2_DV_BT_DMT_1360X768P60 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1360, 768, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               85500000, 64, 112, 256, 3, 6, 18, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1360X768P120_RB { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1360, 768, 0, V4L2_DV_HSYNC_POS_POL, \
+               148250000, 48, 32, 80, 3, 5, 37, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, \
+               V4L2_DV_FL_REDUCED_BLANKING) \
+}
+
+#define V4L2_DV_BT_DMT_1366X768P60 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1366, 768, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               85500000, 70, 143, 213, 3, 3, 24, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1366X768P60_RB { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1366, 768, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               72000000, 14, 56, 64, 1, 3, 28, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, V4L2_DV_FL_REDUCED_BLANKING) \
+}
+
+/* SXGA+ resolutions */
+#define V4L2_DV_BT_DMT_1400X1050P60_RB { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1400, 1050, 0, V4L2_DV_HSYNC_POS_POL, \
+               101000000, 48, 32, 80, 3, 4, 23, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, \
+               V4L2_DV_FL_REDUCED_BLANKING) \
+}
+
+#define V4L2_DV_BT_DMT_1400X1050P60 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1400, 1050, 0, V4L2_DV_VSYNC_POS_POL, \
+               121750000, 88, 144, 232, 3, 4, 32, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1400X1050P75 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1400, 1050, 0, V4L2_DV_VSYNC_POS_POL, \
+               156000000, 104, 144, 248, 3, 4, 42, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1400X1050P85 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1400, 1050, 0, V4L2_DV_VSYNC_POS_POL, \
+               179500000, 104, 152, 256, 3, 4, 48, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1400X1050P120_RB { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1400, 1050, 0, V4L2_DV_HSYNC_POS_POL, \
+               208000000, 48, 32, 80, 3, 4, 55, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, \
+               V4L2_DV_FL_REDUCED_BLANKING) \
+}
+
+/* WXGA+ resolutions */
+#define V4L2_DV_BT_DMT_1440X900P60_RB { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1440, 900, 0, V4L2_DV_HSYNC_POS_POL, \
+               88750000, 48, 32, 80, 3, 6, 17, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, \
+               V4L2_DV_FL_REDUCED_BLANKING) \
+}
+
+#define V4L2_DV_BT_DMT_1440X900P60 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1440, 900, 0, V4L2_DV_VSYNC_POS_POL, \
+               106500000, 80, 152, 232, 3, 6, 25, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1440X900P75 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1440, 900, 0, V4L2_DV_VSYNC_POS_POL, \
+               136750000, 96, 152, 248, 3, 6, 33, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1440X900P85 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1440, 900, 0, V4L2_DV_VSYNC_POS_POL, \
+               157000000, 104, 152, 256, 3, 6, 39, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1440X900P120_RB { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1440, 900, 0, V4L2_DV_HSYNC_POS_POL, \
+               182750000, 48, 32, 80, 3, 6, 44, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, \
+               V4L2_DV_FL_REDUCED_BLANKING) \
+}
+
+#define V4L2_DV_BT_DMT_1600X900P60_RB { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1600, 900, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               108000000, 24, 80, 96, 1, 3, 96, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, V4L2_DV_FL_REDUCED_BLANKING) \
+}
+
+/* UXGA resolutions */
+#define V4L2_DV_BT_DMT_1600X1200P60 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1600, 1200, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               162000000, 64, 192, 304, 1, 3, 46, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1600X1200P65 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1600, 1200, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               175500000, 64, 192, 304, 1, 3, 46, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1600X1200P70 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1600, 1200, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               189000000, 64, 192, 304, 1, 3, 46, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1600X1200P75 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1600, 1200, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               202500000, 64, 192, 304, 1, 3, 46, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1600X1200P85 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1600, 1200, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               229500000, 64, 192, 304, 1, 3, 46, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1600X1200P120_RB { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1600, 1200, 0, V4L2_DV_HSYNC_POS_POL, \
+               268250000, 48, 32, 80, 3, 4, 64, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, \
+               V4L2_DV_FL_REDUCED_BLANKING) \
+}
+
+/* WSXGA+ resolutions */
+#define V4L2_DV_BT_DMT_1680X1050P60_RB { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1680, 1050, 0, V4L2_DV_HSYNC_POS_POL, \
+               119000000, 48, 32, 80, 3, 6, 21, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, \
+               V4L2_DV_FL_REDUCED_BLANKING) \
+}
+
+#define V4L2_DV_BT_DMT_1680X1050P60 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1680, 1050, 0, V4L2_DV_VSYNC_POS_POL, \
+               146250000, 104, 176, 280, 3, 6, 30, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1680X1050P75 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1680, 1050, 0, V4L2_DV_VSYNC_POS_POL, \
+               187000000, 120, 176, 296, 3, 6, 40, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1680X1050P85 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1680, 1050, 0, V4L2_DV_VSYNC_POS_POL, \
+               214750000, 128, 176, 304, 3, 6, 46, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1680X1050P120_RB { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1680, 1050, 0, V4L2_DV_HSYNC_POS_POL, \
+               245500000, 48, 32, 80, 3, 6, 53, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, \
+               V4L2_DV_FL_REDUCED_BLANKING) \
+}
+
+#define V4L2_DV_BT_DMT_1792X1344P60 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1792, 1344, 0, V4L2_DV_VSYNC_POS_POL, \
+               204750000, 128, 200, 328, 1, 3, 46, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1792X1344P75 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1792, 1344, 0, V4L2_DV_VSYNC_POS_POL, \
+               261000000, 96, 216, 352, 1, 3, 69, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1792X1344P120_RB { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1792, 1344, 0, V4L2_DV_HSYNC_POS_POL, \
+               333250000, 48, 32, 80, 3, 4, 72, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, \
+               V4L2_DV_FL_REDUCED_BLANKING) \
+}
+
+#define V4L2_DV_BT_DMT_1856X1392P60 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1856, 1392, 0, V4L2_DV_VSYNC_POS_POL, \
+               218250000, 96, 224, 352, 1, 3, 43, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1856X1392P75 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1856, 1392, 0, V4L2_DV_VSYNC_POS_POL, \
+               288000000, 128, 224, 352, 1, 3, 104, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1856X1392P120_RB { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1856, 1392, 0, V4L2_DV_HSYNC_POS_POL, \
+               356500000, 48, 32, 80, 3, 4, 75, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, \
+               V4L2_DV_FL_REDUCED_BLANKING) \
+}
+
+#define V4L2_DV_BT_DMT_1920X1080P60 V4L2_DV_BT_CEA_1920X1080P60
+
+/* WUXGA resolutions */
+#define V4L2_DV_BT_DMT_1920X1200P60_RB { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1920, 1200, 0, V4L2_DV_HSYNC_POS_POL, \
+               154000000, 48, 32, 80, 3, 6, 26, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, \
+               V4L2_DV_FL_REDUCED_BLANKING) \
+}
+
+#define V4L2_DV_BT_DMT_1920X1200P60 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1920, 1200, 0, V4L2_DV_VSYNC_POS_POL, \
+               193250000, 136, 200, 336, 3, 6, 36, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1920X1200P75 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1920, 1200, 0, V4L2_DV_VSYNC_POS_POL, \
+               245250000, 136, 208, 344, 3, 6, 46, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1920X1200P85 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1920, 1200, 0, V4L2_DV_VSYNC_POS_POL, \
+               281250000, 144, 208, 352, 3, 6, 53, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1920X1200P120_RB { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1920, 1200, 0, V4L2_DV_HSYNC_POS_POL, \
+               317000000, 48, 32, 80, 3, 6, 62, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, \
+               V4L2_DV_FL_REDUCED_BLANKING) \
+}
+
+#define V4L2_DV_BT_DMT_1920X1440P60 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1920, 1440, 0, V4L2_DV_VSYNC_POS_POL, \
+               234000000, 128, 208, 344, 1, 3, 56, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1920X1440P75 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1920, 1440, 0, V4L2_DV_VSYNC_POS_POL, \
+               297000000, 144, 224, 352, 1, 3, 56, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_1920X1440P120_RB { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1920, 1440, 0, V4L2_DV_HSYNC_POS_POL, \
+               380500000, 48, 32, 80, 3, 4, 78, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, \
+               V4L2_DV_FL_REDUCED_BLANKING) \
+}
+
+#define V4L2_DV_BT_DMT_2048X1152P60_RB { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(2048, 1152, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               162000000, 26, 80, 96, 1, 3, 44, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, V4L2_DV_FL_REDUCED_BLANKING) \
+}
+
+/* WQXGA resolutions */
+#define V4L2_DV_BT_DMT_2560X1600P60_RB { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(2560, 1600, 0, V4L2_DV_HSYNC_POS_POL, \
+               268500000, 48, 32, 80, 3, 6, 37, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, \
+               V4L2_DV_FL_REDUCED_BLANKING) \
+}
+
+#define V4L2_DV_BT_DMT_2560X1600P60 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(2560, 1600, 0, V4L2_DV_VSYNC_POS_POL, \
+               348500000, 192, 280, 472, 3, 6, 49, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_2560X1600P75 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(2560, 1600, 0, V4L2_DV_VSYNC_POS_POL, \
+               443250000, 208, 280, 488, 3, 6, 63, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_2560X1600P85 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(2560, 1600, 0, V4L2_DV_VSYNC_POS_POL, \
+               505250000, 208, 280, 488, 3, 6, 73, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, 0) \
+}
+
+#define V4L2_DV_BT_DMT_2560X1600P120_RB { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(2560, 1600, 0, V4L2_DV_HSYNC_POS_POL, \
+               552750000, 48, 32, 80, 3, 6, 85, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, \
+               V4L2_DV_FL_REDUCED_BLANKING) \
+}
+
+#define V4L2_DV_BT_DMT_1366X768P60 { \
+       .type = V4L2_DV_BT_656_1120, \
+       V4L2_INIT_BT_TIMINGS(1366, 768, 0, \
+               V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \
+               85500000, 70, 143, 213, 3, 3, 24, 0, 0, 0, \
+               V4L2_DV_BT_STD_DMT, 0) \
+}
+
+#endif
index 5ea7f75..6ee63d0 100644 (file)
@@ -37,7 +37,7 @@
 enum v4l2_mbus_pixelcode {
        V4L2_MBUS_FMT_FIXED = 0x0001,
 
-       /* RGB - next is 0x1009 */
+       /* RGB - next is 0x100d */
        V4L2_MBUS_FMT_RGB444_2X8_PADHI_BE = 0x1001,
        V4L2_MBUS_FMT_RGB444_2X8_PADHI_LE = 0x1002,
        V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE = 0x1003,
@@ -46,9 +46,14 @@ enum v4l2_mbus_pixelcode {
        V4L2_MBUS_FMT_BGR565_2X8_LE = 0x1006,
        V4L2_MBUS_FMT_RGB565_2X8_BE = 0x1007,
        V4L2_MBUS_FMT_RGB565_2X8_LE = 0x1008,
+       V4L2_MBUS_FMT_RGB666_1X18 = 0x1009,
+       V4L2_MBUS_FMT_RGB888_1X24 = 0x100a,
+       V4L2_MBUS_FMT_RGB888_2X12_BE = 0x100b,
+       V4L2_MBUS_FMT_RGB888_2X12_LE = 0x100c,
 
-       /* YUV (including grey) - next is 0x2014 */
+       /* YUV (including grey) - next is 0x2017 */
        V4L2_MBUS_FMT_Y8_1X8 = 0x2001,
+       V4L2_MBUS_FMT_UV8_1X8 = 0x2015,
        V4L2_MBUS_FMT_UYVY8_1_5X8 = 0x2002,
        V4L2_MBUS_FMT_VYUY8_1_5X8 = 0x2003,
        V4L2_MBUS_FMT_YUYV8_1_5X8 = 0x2004,
@@ -65,14 +70,20 @@ enum v4l2_mbus_pixelcode {
        V4L2_MBUS_FMT_VYUY8_1X16 = 0x2010,
        V4L2_MBUS_FMT_YUYV8_1X16 = 0x2011,
        V4L2_MBUS_FMT_YVYU8_1X16 = 0x2012,
+       V4L2_MBUS_FMT_YDYUYDYV8_1X16 = 0x2014,
        V4L2_MBUS_FMT_YUYV10_1X20 = 0x200d,
        V4L2_MBUS_FMT_YVYU10_1X20 = 0x200e,
+       V4L2_MBUS_FMT_YUV10_1X30 = 0x2016,
 
-       /* Bayer - next is 0x3015 */
+       /* Bayer - next is 0x3019 */
        V4L2_MBUS_FMT_SBGGR8_1X8 = 0x3001,
        V4L2_MBUS_FMT_SGBRG8_1X8 = 0x3013,
        V4L2_MBUS_FMT_SGRBG8_1X8 = 0x3002,
        V4L2_MBUS_FMT_SRGGB8_1X8 = 0x3014,
+       V4L2_MBUS_FMT_SBGGR10_ALAW8_1X8 = 0x3015,
+       V4L2_MBUS_FMT_SGBRG10_ALAW8_1X8 = 0x3016,
+       V4L2_MBUS_FMT_SGRBG10_ALAW8_1X8 = 0x3017,
+       V4L2_MBUS_FMT_SRGGB10_ALAW8_1X8 = 0x3018,
        V4L2_MBUS_FMT_SBGGR10_DPCM8_1X8 = 0x300b,
        V4L2_MBUS_FMT_SGBRG10_DPCM8_1X8 = 0x300c,
        V4L2_MBUS_FMT_SGRBG10_DPCM8_1X8 = 0x3009,
@@ -92,6 +103,11 @@ enum v4l2_mbus_pixelcode {
 
        /* JPEG compressed formats - next is 0x4002 */
        V4L2_MBUS_FMT_JPEG_1X8 = 0x4001,
+
+       /* Vendor specific formats - next is 0x5002 */
+
+       /* S5C73M3 sensor specific interleaved UYVY and JPEG */
+       V4L2_MBUS_FMT_S5C_UYVY_JPEG_1X8 = 0x5001,
 };
 
 /**
index ed29cbb..c1add0d 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <linux/ioctl.h>
 #include <linux/types.h>
+#include <linux/v4l2-common.h>
 #include <linux/v4l2-mediabus.h>
 
 /**
@@ -123,6 +124,38 @@ struct v4l2_subdev_frame_interval_enum {
        __u32 reserved[9];
 };
 
+/**
+ * struct v4l2_subdev_selection - selection info
+ *
+ * @which: either V4L2_SUBDEV_FORMAT_ACTIVE or V4L2_SUBDEV_FORMAT_TRY
+ * @pad: pad number, as reported by the media API
+ * @target: Selection target, used to choose one of possible rectangles,
+ *         defined in v4l2-common.h; V4L2_SEL_TGT_* .
+ * @flags: constraint flags, defined in v4l2-common.h; V4L2_SEL_FLAG_*.
+ * @r: coordinates of the selection window
+ * @reserved: for future use, set to zero for now
+ *
+ * Hardware may use multiple helper windows to process a video stream.
+ * The structure is used to exchange this selection areas between
+ * an application and a driver.
+ */
+struct v4l2_subdev_selection {
+       __u32 which;
+       __u32 pad;
+       __u32 target;
+       __u32 flags;
+       struct v4l2_rect r;
+       __u32 reserved[8];
+};
+
+struct v4l2_subdev_edid {
+       __u32 pad;
+       __u32 start_block;
+       __u32 blocks;
+       __u32 reserved[5];
+       __u8 *edid;
+};
+
 #define VIDIOC_SUBDEV_G_FMT    _IOWR('V',  4, struct v4l2_subdev_format)
 #define VIDIOC_SUBDEV_S_FMT    _IOWR('V',  5, struct v4l2_subdev_format)
 #define VIDIOC_SUBDEV_G_FRAME_INTERVAL \
@@ -137,5 +170,11 @@ struct v4l2_subdev_frame_interval_enum {
                        _IOWR('V', 75, struct v4l2_subdev_frame_interval_enum)
 #define VIDIOC_SUBDEV_G_CROP   _IOWR('V', 59, struct v4l2_subdev_crop)
 #define VIDIOC_SUBDEV_S_CROP   _IOWR('V', 60, struct v4l2_subdev_crop)
+#define VIDIOC_SUBDEV_G_SELECTION \
+       _IOWR('V', 61, struct v4l2_subdev_selection)
+#define VIDIOC_SUBDEV_S_SELECTION \
+       _IOWR('V', 62, struct v4l2_subdev_selection)
+#define VIDIOC_SUBDEV_G_EDID   _IOWR('V', 40, struct v4l2_subdev_edid)
+#define VIDIOC_SUBDEV_S_EDID   _IOWR('V', 41, struct v4l2_subdev_edid)
 
 #endif
index 7504e47..5661c67 100644 (file)
@@ -1,2 +1,2 @@
-#define LINUX_VERSION_CODE 197632
+#define LINUX_VERSION_CODE 199168
 #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
diff --git a/usr/include/linux/vfio.h b/usr/include/linux/vfio.h
new file mode 100644 (file)
index 0000000..7ec1864
--- /dev/null
@@ -0,0 +1,378 @@
+/*
+ * VFIO API definition
+ *
+ * Copyright (C) 2012 Red Hat, Inc.  All rights reserved.
+ *     Author: Alex Williamson <alex.williamson@redhat.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 VFIO_H
+#define VFIO_H
+
+#include <linux/types.h>
+#include <linux/ioctl.h>
+
+#define VFIO_API_VERSION       0
+
+
+/* Kernel & User level defines for VFIO IOCTLs. */
+
+/* Extensions */
+
+#define VFIO_TYPE1_IOMMU               1
+
+/*
+ * The IOCTL interface is designed for extensibility by embedding the
+ * structure length (argsz) and flags into structures passed between
+ * kernel and userspace.  We therefore use the _IO() macro for these
+ * defines to avoid implicitly embedding a size into the ioctl request.
+ * As structure fields are added, argsz will increase to match and flag
+ * bits will be defined to indicate additional fields with valid data.
+ * It's *always* the caller's responsibility to indicate the size of
+ * the structure passed by setting argsz appropriately.
+ */
+
+#define VFIO_TYPE      (';')
+#define VFIO_BASE      100
+
+/* -------- IOCTLs for VFIO file descriptor (/dev/vfio/vfio) -------- */
+
+/**
+ * VFIO_GET_API_VERSION - _IO(VFIO_TYPE, VFIO_BASE + 0)
+ *
+ * Report the version of the VFIO API.  This allows us to bump the entire
+ * API version should we later need to add or change features in incompatible
+ * ways.
+ * Return: VFIO_API_VERSION
+ * Availability: Always
+ */
+#define VFIO_GET_API_VERSION           _IO(VFIO_TYPE, VFIO_BASE + 0)
+
+/**
+ * VFIO_CHECK_EXTENSION - _IOW(VFIO_TYPE, VFIO_BASE + 1, __u32)
+ *
+ * Check whether an extension is supported.
+ * Return: 0 if not supported, 1 (or some other positive integer) if supported.
+ * Availability: Always
+ */
+#define VFIO_CHECK_EXTENSION           _IO(VFIO_TYPE, VFIO_BASE + 1)
+
+/**
+ * VFIO_SET_IOMMU - _IOW(VFIO_TYPE, VFIO_BASE + 2, __s32)
+ *
+ * Set the iommu to the given type.  The type must be supported by an
+ * iommu driver as verified by calling CHECK_EXTENSION using the same
+ * type.  A group must be set to this file descriptor before this
+ * ioctl is available.  The IOMMU interfaces enabled by this call are
+ * specific to the value set.
+ * Return: 0 on success, -errno on failure
+ * Availability: When VFIO group attached
+ */
+#define VFIO_SET_IOMMU                 _IO(VFIO_TYPE, VFIO_BASE + 2)
+
+/* -------- IOCTLs for GROUP file descriptors (/dev/vfio/$GROUP) -------- */
+
+/**
+ * VFIO_GROUP_GET_STATUS - _IOR(VFIO_TYPE, VFIO_BASE + 3,
+ *                                             struct vfio_group_status)
+ *
+ * Retrieve information about the group.  Fills in provided
+ * struct vfio_group_info.  Caller sets argsz.
+ * Return: 0 on succes, -errno on failure.
+ * Availability: Always
+ */
+struct vfio_group_status {
+       __u32   argsz;
+       __u32   flags;
+#define VFIO_GROUP_FLAGS_VIABLE                (1 << 0)
+#define VFIO_GROUP_FLAGS_CONTAINER_SET (1 << 1)
+};
+#define VFIO_GROUP_GET_STATUS          _IO(VFIO_TYPE, VFIO_BASE + 3)
+
+/**
+ * VFIO_GROUP_SET_CONTAINER - _IOW(VFIO_TYPE, VFIO_BASE + 4, __s32)
+ *
+ * Set the container for the VFIO group to the open VFIO file
+ * descriptor provided.  Groups may only belong to a single
+ * container.  Containers may, at their discretion, support multiple
+ * groups.  Only when a container is set are all of the interfaces
+ * of the VFIO file descriptor and the VFIO group file descriptor
+ * available to the user.
+ * Return: 0 on success, -errno on failure.
+ * Availability: Always
+ */
+#define VFIO_GROUP_SET_CONTAINER       _IO(VFIO_TYPE, VFIO_BASE + 4)
+
+/**
+ * VFIO_GROUP_UNSET_CONTAINER - _IO(VFIO_TYPE, VFIO_BASE + 5)
+ *
+ * Remove the group from the attached container.  This is the
+ * opposite of the SET_CONTAINER call and returns the group to
+ * an initial state.  All device file descriptors must be released
+ * prior to calling this interface.  When removing the last group
+ * from a container, the IOMMU will be disabled and all state lost,
+ * effectively also returning the VFIO file descriptor to an initial
+ * state.
+ * Return: 0 on success, -errno on failure.
+ * Availability: When attached to container
+ */
+#define VFIO_GROUP_UNSET_CONTAINER     _IO(VFIO_TYPE, VFIO_BASE + 5)
+
+/**
+ * VFIO_GROUP_GET_DEVICE_FD - _IOW(VFIO_TYPE, VFIO_BASE + 6, char)
+ *
+ * Return a new file descriptor for the device object described by
+ * the provided string.  The string should match a device listed in
+ * the devices subdirectory of the IOMMU group sysfs entry.  The
+ * group containing the device must already be added to this context.
+ * Return: new file descriptor on success, -errno on failure.
+ * Availability: When attached to container
+ */
+#define VFIO_GROUP_GET_DEVICE_FD       _IO(VFIO_TYPE, VFIO_BASE + 6)
+
+/* --------------- IOCTLs for DEVICE file descriptors --------------- */
+
+/**
+ * VFIO_DEVICE_GET_INFO - _IOR(VFIO_TYPE, VFIO_BASE + 7,
+ *                                             struct vfio_device_info)
+ *
+ * Retrieve information about the device.  Fills in provided
+ * struct vfio_device_info.  Caller sets argsz.
+ * Return: 0 on success, -errno on failure.
+ */
+struct vfio_device_info {
+       __u32   argsz;
+       __u32   flags;
+#define VFIO_DEVICE_FLAGS_RESET        (1 << 0)        /* Device supports reset */
+#define VFIO_DEVICE_FLAGS_PCI  (1 << 1)        /* vfio-pci device */
+       __u32   num_regions;    /* Max region index + 1 */
+       __u32   num_irqs;       /* Max IRQ index + 1 */
+};
+#define VFIO_DEVICE_GET_INFO           _IO(VFIO_TYPE, VFIO_BASE + 7)
+
+/**
+ * VFIO_DEVICE_GET_REGION_INFO - _IOWR(VFIO_TYPE, VFIO_BASE + 8,
+ *                                    struct vfio_region_info)
+ *
+ * Retrieve information about a device region.  Caller provides
+ * struct vfio_region_info with index value set.  Caller sets argsz.
+ * Implementation of region mapping is bus driver specific.  This is
+ * intended to describe MMIO, I/O port, as well as bus specific
+ * regions (ex. PCI config space).  Zero sized regions may be used
+ * to describe unimplemented regions (ex. unimplemented PCI BARs).
+ * Return: 0 on success, -errno on failure.
+ */
+struct vfio_region_info {
+       __u32   argsz;
+       __u32   flags;
+#define VFIO_REGION_INFO_FLAG_READ     (1 << 0) /* Region supports read */
+#define VFIO_REGION_INFO_FLAG_WRITE    (1 << 1) /* Region supports write */
+#define VFIO_REGION_INFO_FLAG_MMAP     (1 << 2) /* Region supports mmap */
+       __u32   index;          /* Region index */
+       __u32   resv;           /* Reserved for alignment */
+       __u64   size;           /* Region size (bytes) */
+       __u64   offset;         /* Region offset from start of device fd */
+};
+#define VFIO_DEVICE_GET_REGION_INFO    _IO(VFIO_TYPE, VFIO_BASE + 8)
+
+/**
+ * VFIO_DEVICE_GET_IRQ_INFO - _IOWR(VFIO_TYPE, VFIO_BASE + 9,
+ *                                 struct vfio_irq_info)
+ *
+ * Retrieve information about a device IRQ.  Caller provides
+ * struct vfio_irq_info with index value set.  Caller sets argsz.
+ * Implementation of IRQ mapping is bus driver specific.  Indexes
+ * using multiple IRQs are primarily intended to support MSI-like
+ * interrupt blocks.  Zero count irq blocks may be used to describe
+ * unimplemented interrupt types.
+ *
+ * The EVENTFD flag indicates the interrupt index supports eventfd based
+ * signaling.
+ *
+ * The MASKABLE flags indicates the index supports MASK and UNMASK
+ * actions described below.
+ *
+ * AUTOMASKED indicates that after signaling, the interrupt line is
+ * automatically masked by VFIO and the user needs to unmask the line
+ * to receive new interrupts.  This is primarily intended to distinguish
+ * level triggered interrupts.
+ *
+ * The NORESIZE flag indicates that the interrupt lines within the index
+ * are setup as a set and new subindexes cannot be enabled without first
+ * disabling the entire index.  This is used for interrupts like PCI MSI
+ * and MSI-X where the driver may only use a subset of the available
+ * indexes, but VFIO needs to enable a specific number of vectors
+ * upfront.  In the case of MSI-X, where the user can enable MSI-X and
+ * then add and unmask vectors, it's up to userspace to make the decision
+ * whether to allocate the maximum supported number of vectors or tear
+ * down setup and incrementally increase the vectors as each is enabled.
+ */
+struct vfio_irq_info {
+       __u32   argsz;
+       __u32   flags;
+#define VFIO_IRQ_INFO_EVENTFD          (1 << 0)
+#define VFIO_IRQ_INFO_MASKABLE         (1 << 1)
+#define VFIO_IRQ_INFO_AUTOMASKED       (1 << 2)
+#define VFIO_IRQ_INFO_NORESIZE         (1 << 3)
+       __u32   index;          /* IRQ index */
+       __u32   count;          /* Number of IRQs within this index */
+};
+#define VFIO_DEVICE_GET_IRQ_INFO       _IO(VFIO_TYPE, VFIO_BASE + 9)
+
+/**
+ * VFIO_DEVICE_SET_IRQS - _IOW(VFIO_TYPE, VFIO_BASE + 10, struct vfio_irq_set)
+ *
+ * Set signaling, masking, and unmasking of interrupts.  Caller provides
+ * struct vfio_irq_set with all fields set.  'start' and 'count' indicate
+ * the range of subindexes being specified.
+ *
+ * The DATA flags specify the type of data provided.  If DATA_NONE, the
+ * operation performs the specified action immediately on the specified
+ * interrupt(s).  For example, to unmask AUTOMASKED interrupt [0,0]:
+ * flags = (DATA_NONE|ACTION_UNMASK), index = 0, start = 0, count = 1.
+ *
+ * DATA_BOOL allows sparse support for the same on arrays of interrupts.
+ * For example, to mask interrupts [0,1] and [0,3] (but not [0,2]):
+ * flags = (DATA_BOOL|ACTION_MASK), index = 0, start = 1, count = 3,
+ * data = {1,0,1}
+ *
+ * DATA_EVENTFD binds the specified ACTION to the provided __s32 eventfd.
+ * A value of -1 can be used to either de-assign interrupts if already
+ * assigned or skip un-assigned interrupts.  For example, to set an eventfd
+ * to be trigger for interrupts [0,0] and [0,2]:
+ * flags = (DATA_EVENTFD|ACTION_TRIGGER), index = 0, start = 0, count = 3,
+ * data = {fd1, -1, fd2}
+ * If index [0,1] is previously set, two count = 1 ioctls calls would be
+ * required to set [0,0] and [0,2] without changing [0,1].
+ *
+ * Once a signaling mechanism is set, DATA_BOOL or DATA_NONE can be used
+ * with ACTION_TRIGGER to perform kernel level interrupt loopback testing
+ * from userspace (ie. simulate hardware triggering).
+ *
+ * Setting of an event triggering mechanism to userspace for ACTION_TRIGGER
+ * enables the interrupt index for the device.  Individual subindex interrupts
+ * can be disabled using the -1 value for DATA_EVENTFD or the index can be
+ * disabled as a whole with: flags = (DATA_NONE|ACTION_TRIGGER), count = 0.
+ *
+ * Note that ACTION_[UN]MASK specify user->kernel signaling (irqfds) while
+ * ACTION_TRIGGER specifies kernel->user signaling.
+ */
+struct vfio_irq_set {
+       __u32   argsz;
+       __u32   flags;
+#define VFIO_IRQ_SET_DATA_NONE         (1 << 0) /* Data not present */
+#define VFIO_IRQ_SET_DATA_BOOL         (1 << 1) /* Data is bool (u8) */
+#define VFIO_IRQ_SET_DATA_EVENTFD      (1 << 2) /* Data is eventfd (s32) */
+#define VFIO_IRQ_SET_ACTION_MASK       (1 << 3) /* Mask interrupt */
+#define VFIO_IRQ_SET_ACTION_UNMASK     (1 << 4) /* Unmask interrupt */
+#define VFIO_IRQ_SET_ACTION_TRIGGER    (1 << 5) /* Trigger interrupt */
+       __u32   index;
+       __u32   start;
+       __u32   count;
+       __u8    data[];
+};
+#define VFIO_DEVICE_SET_IRQS           _IO(VFIO_TYPE, VFIO_BASE + 10)
+
+#define VFIO_IRQ_SET_DATA_TYPE_MASK    (VFIO_IRQ_SET_DATA_NONE | \
+                                        VFIO_IRQ_SET_DATA_BOOL | \
+                                        VFIO_IRQ_SET_DATA_EVENTFD)
+#define VFIO_IRQ_SET_ACTION_TYPE_MASK  (VFIO_IRQ_SET_ACTION_MASK | \
+                                        VFIO_IRQ_SET_ACTION_UNMASK | \
+                                        VFIO_IRQ_SET_ACTION_TRIGGER)
+/**
+ * VFIO_DEVICE_RESET - _IO(VFIO_TYPE, VFIO_BASE + 11)
+ *
+ * Reset a device.
+ */
+#define VFIO_DEVICE_RESET              _IO(VFIO_TYPE, VFIO_BASE + 11)
+
+/*
+ * The VFIO-PCI bus driver makes use of the following fixed region and
+ * IRQ index mapping.  Unimplemented regions return a size of zero.
+ * Unimplemented IRQ types return a count of zero.
+ */
+
+enum {
+       VFIO_PCI_BAR0_REGION_INDEX,
+       VFIO_PCI_BAR1_REGION_INDEX,
+       VFIO_PCI_BAR2_REGION_INDEX,
+       VFIO_PCI_BAR3_REGION_INDEX,
+       VFIO_PCI_BAR4_REGION_INDEX,
+       VFIO_PCI_BAR5_REGION_INDEX,
+       VFIO_PCI_ROM_REGION_INDEX,
+       VFIO_PCI_CONFIG_REGION_INDEX,
+       /*
+        * Expose VGA regions defined for PCI base class 03, subclass 00.
+        * This includes I/O port ranges 0x3b0 to 0x3bb and 0x3c0 to 0x3df
+        * as well as the MMIO range 0xa0000 to 0xbffff.  Each implemented
+        * range is found at it's identity mapped offset from the region
+        * offset, for example 0x3b0 is region_info.offset + 0x3b0.  Areas
+        * between described ranges are unimplemented.
+        */
+       VFIO_PCI_VGA_REGION_INDEX,
+       VFIO_PCI_NUM_REGIONS
+};
+
+enum {
+       VFIO_PCI_INTX_IRQ_INDEX,
+       VFIO_PCI_MSI_IRQ_INDEX,
+       VFIO_PCI_MSIX_IRQ_INDEX,
+       VFIO_PCI_ERR_IRQ_INDEX,
+       VFIO_PCI_NUM_IRQS
+};
+
+/* -------- API for Type1 VFIO IOMMU -------- */
+
+/**
+ * VFIO_IOMMU_GET_INFO - _IOR(VFIO_TYPE, VFIO_BASE + 12, struct vfio_iommu_info)
+ *
+ * Retrieve information about the IOMMU object. Fills in provided
+ * struct vfio_iommu_info. Caller sets argsz.
+ *
+ * XXX Should we do these by CHECK_EXTENSION too?
+ */
+struct vfio_iommu_type1_info {
+       __u32   argsz;
+       __u32   flags;
+#define VFIO_IOMMU_INFO_PGSIZES (1 << 0)       /* supported page sizes info */
+       __u64   iova_pgsizes;           /* Bitmap of supported page sizes */
+};
+
+#define VFIO_IOMMU_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12)
+
+/**
+ * VFIO_IOMMU_MAP_DMA - _IOW(VFIO_TYPE, VFIO_BASE + 13, struct vfio_dma_map)
+ *
+ * Map process virtual addresses to IO virtual addresses using the
+ * provided struct vfio_dma_map. Caller sets argsz. READ &/ WRITE required.
+ */
+struct vfio_iommu_type1_dma_map {
+       __u32   argsz;
+       __u32   flags;
+#define VFIO_DMA_MAP_FLAG_READ (1 << 0)                /* readable from device */
+#define VFIO_DMA_MAP_FLAG_WRITE (1 << 1)       /* writable from device */
+       __u64   vaddr;                          /* Process virtual address */
+       __u64   iova;                           /* IO virtual address */
+       __u64   size;                           /* Size of mapping (bytes) */
+};
+
+#define VFIO_IOMMU_MAP_DMA _IO(VFIO_TYPE, VFIO_BASE + 13)
+
+/**
+ * VFIO_IOMMU_UNMAP_DMA - _IOW(VFIO_TYPE, VFIO_BASE + 14, struct vfio_dma_unmap)
+ *
+ * Unmap IO virtual addresses using the provided struct vfio_dma_unmap.
+ * Caller sets argsz.
+ */
+struct vfio_iommu_type1_dma_unmap {
+       __u32   argsz;
+       __u32   flags;
+       __u64   iova;                           /* IO virtual address */
+       __u64   size;                           /* Size of mapping (bytes) */
+};
+
+#define VFIO_IOMMU_UNMAP_DMA _IO(VFIO_TYPE, VFIO_BASE + 14)
+
+#endif /* VFIO_H */
index 165a484..c656f61 100644 (file)
@@ -127,4 +127,32 @@ struct vhost_memory {
 /* vhost-net should add virtio_net_hdr for RX, and strip for TX packets. */
 #define VHOST_NET_F_VIRTIO_NET_HDR 27
 
+/* VHOST_SCSI specific definitions */
+
+/*
+ * Used by QEMU userspace to ensure a consistent vhost-scsi ABI.
+ *
+ * ABI Rev 0: July 2012 version starting point for v3.6-rc merge candidate +
+ *            RFC-v2 vhost-scsi userspace.  Add GET_ABI_VERSION ioctl usage
+ * ABI Rev 1: January 2013. Ignore vhost_tpgt filed in struct vhost_scsi_target.
+ *            All the targets under vhost_wwpn can be seen and used by guset.
+ */
+
+#define VHOST_SCSI_ABI_VERSION 1
+
+struct vhost_scsi_target {
+       int abi_version;
+       char vhost_wwpn[224]; /* TRANSPORT_IQN_LEN */
+       unsigned short vhost_tpgt;
+       unsigned short reserved;
+};
+
+#define VHOST_SCSI_SET_ENDPOINT _IOW(VHOST_VIRTIO, 0x40, struct vhost_scsi_target)
+#define VHOST_SCSI_CLEAR_ENDPOINT _IOW(VHOST_VIRTIO, 0x41, struct vhost_scsi_target)
+/* Changing this breaks userspace. */
+#define VHOST_SCSI_GET_ABI_VERSION _IOW(VHOST_VIRTIO, 0x42, int)
+/* Set and get the events missed flag */
+#define VHOST_SCSI_SET_EVENTS_MISSED _IOW(VHOST_VIRTIO, 0x43, __u32)
+#define VHOST_SCSI_GET_EVENTS_MISSED _IOW(VHOST_VIRTIO, 0x44, __u32)
+
 #endif
index 92b875e..e47ea1d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  Video for Linux Two header file
  *
- *  Copyright (C) 1999-2007 the contributors
+ *  Copyright (C) 1999-2012 the contributors
  *
  *  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
@@ -60,6 +60,8 @@
 
 #include <linux/ioctl.h>
 #include <linux/types.h>
+#include <linux/v4l2-common.h>
+#include <linux/v4l2-controls.h>
 
 /*
  * Common stuff for both V4L1 and V4L2
 #define VIDEO_MAX_FRAME               32
 #define VIDEO_MAX_PLANES               8
 
-
-/* These defines are V4L1 specific and should not be used with the V4L2 API!
-   They will be removed from this header in the future. */
-
-#define VID_TYPE_CAPTURE       1       /* Can capture */
-#define VID_TYPE_TUNER         2       /* Can tune */
-#define VID_TYPE_TELETEXT      4       /* Does teletext */
-#define VID_TYPE_OVERLAY       8       /* Overlay onto frame buffer */
-#define VID_TYPE_CHROMAKEY     16      /* Overlay by chromakey */
-#define VID_TYPE_CLIPPING      32      /* Can clip */
-#define VID_TYPE_FRAMERAM      64      /* Uses the frame buffer memory */
-#define VID_TYPE_SCALES                128     /* Scalable */
-#define VID_TYPE_MONOCHROME    256     /* Monochrome only */
-#define VID_TYPE_SUBCAPTURE    512     /* Can capture subareas of the image */
-#define VID_TYPE_MPEG_DECODER  1024    /* Can decode MPEG streams */
-#define VID_TYPE_MPEG_ENCODER  2048    /* Can encode MPEG streams */
-#define VID_TYPE_MJPEG_DECODER 4096    /* Can decode MJPEG streams */
-#define VID_TYPE_MJPEG_ENCODER 8192    /* Can encode MJPEG streams */
-
 /*
  *     M I S C E L L A N E O U S
  */
@@ -154,6 +137,7 @@ enum v4l2_buf_type {
 #endif
        V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE = 9,
        V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE  = 10,
+       /* Deprecated, do not use */
        V4L2_BUF_TYPE_PRIVATE              = 0x80,
 };
 
@@ -179,6 +163,7 @@ enum v4l2_memory {
        V4L2_MEMORY_MMAP             = 1,
        V4L2_MEMORY_USERPTR          = 2,
        V4L2_MEMORY_OVERLAY          = 3,
+       V4L2_MEMORY_DMABUF           = 4,
 };
 
 /* see also http://vektor.theorem.ca/graphics/ycbcr/ */
@@ -267,6 +252,10 @@ struct v4l2_capability {
 #define V4L2_CAP_VIDEO_CAPTURE_MPLANE  0x00001000
 /* Is a video output device that supports multiplanar formats */
 #define V4L2_CAP_VIDEO_OUTPUT_MPLANE   0x00002000
+/* Is a video mem-to-mem device that supports multiplanar formats */
+#define V4L2_CAP_VIDEO_M2M_MPLANE      0x00004000
+/* Is a video mem-to-mem device */
+#define V4L2_CAP_VIDEO_M2M             0x00008000
 
 #define V4L2_CAP_TUNER                 0x00010000  /* has a tuner */
 #define V4L2_CAP_AUDIO                 0x00020000  /* has audio support */
@@ -286,10 +275,10 @@ struct v4l2_pix_format {
        __u32                   width;
        __u32                   height;
        __u32                   pixelformat;
-       enum v4l2_field         field;
+       __u32                   field;          /* enum v4l2_field */
        __u32                   bytesperline;   /* for padding, zero if unused */
        __u32                   sizeimage;
-       enum v4l2_colorspace    colorspace;
+       __u32                   colorspace;     /* enum v4l2_colorspace */
        __u32                   priv;           /* private data, depends on pixelformat */
 };
 
@@ -322,6 +311,9 @@ struct v4l2_pix_format {
 /* Palette formats */
 #define V4L2_PIX_FMT_PAL8    v4l2_fourcc('P', 'A', 'L', '8') /*  8  8-bit palette */
 
+/* Chrominance formats */
+#define V4L2_PIX_FMT_UV8     v4l2_fourcc('U', 'V', '8', ' ') /*  8  UV 4:4 */
+
 /* Luminance+Chrominance formats */
 #define V4L2_PIX_FMT_YVU410  v4l2_fourcc('Y', 'V', 'U', '9') /*  9  YVU 4:1:0     */
 #define V4L2_PIX_FMT_YVU420  v4l2_fourcc('Y', 'V', '1', '2') /* 12  YVU 4:2:0     */
@@ -353,10 +345,13 @@ struct v4l2_pix_format {
 
 /* two non contiguous planes - one Y, one Cr + Cb interleaved  */
 #define V4L2_PIX_FMT_NV12M   v4l2_fourcc('N', 'M', '1', '2') /* 12  Y/CbCr 4:2:0  */
+#define V4L2_PIX_FMT_NV21M   v4l2_fourcc('N', 'M', '2', '1') /* 21  Y/CrCb 4:2:0  */
 #define V4L2_PIX_FMT_NV12MT  v4l2_fourcc('T', 'M', '1', '2') /* 12  Y/CbCr 4:2:0 64x32 macroblocks */
+#define V4L2_PIX_FMT_NV12MT_16X16 v4l2_fourcc('V', 'M', '1', '2') /* 12  Y/CbCr 4:2:0 16x16 macroblocks */
 
 /* three non contiguous planes - Y, Cb, Cr */
 #define V4L2_PIX_FMT_YUV420M v4l2_fourcc('Y', 'M', '1', '2') /* 12  YUV420 planar */
+#define V4L2_PIX_FMT_YVU420M v4l2_fourcc('Y', 'M', '2', '1') /* 12  YVU420 planar */
 
 /* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */
 #define V4L2_PIX_FMT_SBGGR8  v4l2_fourcc('B', 'A', '8', '1') /*  8  BGBG.. GRGR.. */
@@ -371,8 +366,16 @@ struct v4l2_pix_format {
 #define V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2') /* 12  GBGB.. RGRG.. */
 #define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2') /* 12  GRGR.. BGBG.. */
 #define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2') /* 12  RGRG.. GBGB.. */
+       /* 10bit raw bayer a-law compressed to 8 bits */
+#define V4L2_PIX_FMT_SBGGR10ALAW8 v4l2_fourcc('a', 'B', 'A', '8')
+#define V4L2_PIX_FMT_SGBRG10ALAW8 v4l2_fourcc('a', 'G', 'A', '8')
+#define V4L2_PIX_FMT_SGRBG10ALAW8 v4l2_fourcc('a', 'g', 'A', '8')
+#define V4L2_PIX_FMT_SRGGB10ALAW8 v4l2_fourcc('a', 'R', 'A', '8')
        /* 10bit raw bayer DPCM compressed to 8 bits */
+#define V4L2_PIX_FMT_SBGGR10DPCM8 v4l2_fourcc('b', 'B', 'A', '8')
+#define V4L2_PIX_FMT_SGBRG10DPCM8 v4l2_fourcc('b', 'G', 'A', '8')
 #define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0')
+#define V4L2_PIX_FMT_SRGGB10DPCM8 v4l2_fourcc('b', 'R', 'A', '8')
        /*
         * 10bit raw bayer, expanded to 16 bits
         * xxxxrrrrrrrrrrxxxxgggggggggg xxxxggggggggggxxxxbbbbbbbbbb...
@@ -386,6 +389,7 @@ struct v4l2_pix_format {
 #define V4L2_PIX_FMT_MPEG     v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 Multiplexed */
 #define V4L2_PIX_FMT_H264     v4l2_fourcc('H', '2', '6', '4') /* H264 with start codes */
 #define V4L2_PIX_FMT_H264_NO_SC v4l2_fourcc('A', 'V', 'C', '1') /* H264 without start codes */
+#define V4L2_PIX_FMT_H264_MVC v4l2_fourcc('M', '2', '6', '4') /* H264 MVC */
 #define V4L2_PIX_FMT_H263     v4l2_fourcc('H', '2', '6', '3') /* H263          */
 #define V4L2_PIX_FMT_MPEG1    v4l2_fourcc('M', 'P', 'G', '1') /* MPEG-1 ES     */
 #define V4L2_PIX_FMT_MPEG2    v4l2_fourcc('M', 'P', 'G', '2') /* MPEG-2 ES     */
@@ -393,6 +397,7 @@ struct v4l2_pix_format {
 #define V4L2_PIX_FMT_XVID     v4l2_fourcc('X', 'V', 'I', 'D') /* Xvid           */
 #define V4L2_PIX_FMT_VC1_ANNEX_G v4l2_fourcc('V', 'C', '1', 'G') /* SMPTE 421M Annex G compliant stream */
 #define V4L2_PIX_FMT_VC1_ANNEX_L v4l2_fourcc('V', 'C', '1', 'L') /* SMPTE 421M Annex L compliant stream */
+#define V4L2_PIX_FMT_VP8      v4l2_fourcc('V', 'P', '8', '0') /* VP8 */
 
 /*  Vendor-specific formats   */
 #define V4L2_PIX_FMT_CPIA1    v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */
@@ -420,13 +425,14 @@ struct v4l2_pix_format {
 #define V4L2_PIX_FMT_KONICA420  v4l2_fourcc('K', 'O', 'N', 'I') /* YUV420 planar in blocks of 256 pixels */
 #define V4L2_PIX_FMT_JPGL      v4l2_fourcc('J', 'P', 'G', 'L') /* JPEG-Lite */
 #define V4L2_PIX_FMT_SE401      v4l2_fourcc('S', '4', '0', '1') /* se401 janggu compressed rgb */
+#define V4L2_PIX_FMT_S5C_UYVY_JPG v4l2_fourcc('S', '5', 'C', 'I') /* S5C73M3 interleaved UYVY/JPEG */
 
 /*
  *     F O R M A T   E N U M E R A T I O N
  */
 struct v4l2_fmtdesc {
        __u32               index;             /* Format number      */
-       enum v4l2_buf_type  type;              /* buffer type        */
+       __u32               type;              /* enum v4l2_buf_type */
        __u32               flags;
        __u8                description[32];   /* Description string */
        __u32               pixelformat;       /* Format fourcc      */
@@ -567,8 +573,8 @@ struct v4l2_jpegcompression {
  */
 struct v4l2_requestbuffers {
        __u32                   count;
-       enum v4l2_buf_type      type;
-       enum v4l2_memory        memory;
+       __u32                   type;           /* enum v4l2_buf_type */
+       __u32                   memory;         /* enum v4l2_memory */
        __u32                   reserved[2];
 };
 
@@ -582,6 +588,8 @@ struct v4l2_requestbuffers {
  *                     should be passed to mmap() called on the video node)
  * @userptr:           when memory is V4L2_MEMORY_USERPTR, a userspace pointer
  *                     pointing to this plane
+ * @fd:                        when memory is V4L2_MEMORY_DMABUF, a userspace file
+ *                     descriptor associated with this plane
  * @data_offset:       offset in the plane to the start of data; usually 0,
  *                     unless there is a header in front of the data
  *
@@ -596,6 +604,7 @@ struct v4l2_plane {
        union {
                __u32           mem_offset;
                unsigned long   userptr;
+               __s32           fd;
        } m;
        __u32                   data_offset;
        __u32                   reserved[11];
@@ -604,20 +613,24 @@ struct v4l2_plane {
 /**
  * struct v4l2_buffer - video buffer info
  * @index:     id number of the buffer
- * @type:      buffer type (type == *_MPLANE for multiplanar buffers)
+ * @type:      enum v4l2_buf_type; buffer type (type == *_MPLANE for
+ *             multiplanar buffers);
  * @bytesused: number of bytes occupied by data in the buffer (payload);
  *             unused (set to 0) for multiplanar buffers
  * @flags:     buffer informational flags
- * @field:     field order of the image in the buffer
+ * @field:     enum v4l2_field; field order of the image in the buffer
  * @timestamp: frame timestamp
  * @timecode:  frame timecode
  * @sequence:  sequence count of this frame
- * @memory:    the method, in which the actual video data is passed
+ * @memory:    enum v4l2_memory; the method, in which the actual video data is
+ *             passed
  * @offset:    for non-multiplanar buffers with memory == V4L2_MEMORY_MMAP;
  *             offset from the start of the device memory for this plane,
  *             (or a "cookie" that should be passed to mmap() as offset)
  * @userptr:   for non-multiplanar buffers with memory == V4L2_MEMORY_USERPTR;
  *             a userspace pointer pointing to this buffer
+ * @fd:                for non-multiplanar buffers with memory == V4L2_MEMORY_DMABUF;
+ *             a userspace file descriptor associated with this buffer
  * @planes:    for multiplanar buffers; userspace pointer to the array of plane
  *             info structs for this buffer
  * @length:    size in bytes of the buffer (NOT its payload) for single-plane
@@ -630,23 +643,24 @@ struct v4l2_plane {
  */
 struct v4l2_buffer {
        __u32                   index;
-       enum v4l2_buf_type      type;
+       __u32                   type;
        __u32                   bytesused;
        __u32                   flags;
-       enum v4l2_field         field;
+       __u32                   field;
        struct timeval          timestamp;
        struct v4l2_timecode    timecode;
        __u32                   sequence;
 
        /* memory location */
-       enum v4l2_memory        memory;
+       __u32                   memory;
        union {
                __u32           offset;
                unsigned long   userptr;
                struct v4l2_plane *planes;
+               __s32           fd;
        } m;
        __u32                   length;
-       __u32                   input;
+       __u32                   reserved2;
        __u32                   reserved;
 };
 
@@ -660,11 +674,42 @@ struct v4l2_buffer {
 /* Buffer is ready, but the data contained within is corrupted. */
 #define V4L2_BUF_FLAG_ERROR    0x0040
 #define V4L2_BUF_FLAG_TIMECODE 0x0100  /* timecode field is valid */
-#define V4L2_BUF_FLAG_INPUT     0x0200  /* input field is valid */
 #define V4L2_BUF_FLAG_PREPARED 0x0400  /* Buffer is prepared for queuing */
 /* Cache handling flags */
 #define V4L2_BUF_FLAG_NO_CACHE_INVALIDATE      0x0800
 #define V4L2_BUF_FLAG_NO_CACHE_CLEAN           0x1000
+/* Timestamp type */
+#define V4L2_BUF_FLAG_TIMESTAMP_MASK           0xe000
+#define V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN                0x0000
+#define V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC      0x2000
+#define V4L2_BUF_FLAG_TIMESTAMP_COPY           0x4000
+
+/**
+ * struct v4l2_exportbuffer - export of video buffer as DMABUF file descriptor
+ *
+ * @index:     id number of the buffer
+ * @type:      enum v4l2_buf_type; buffer type (type == *_MPLANE for
+ *             multiplanar buffers);
+ * @plane:     index of the plane to be exported, 0 for single plane queues
+ * @flags:     flags for newly created file, currently only O_CLOEXEC is
+ *             supported, refer to manual of open syscall for more details
+ * @fd:                file descriptor associated with DMABUF (set by driver)
+ *
+ * Contains data used for exporting a video buffer as DMABUF file descriptor.
+ * The buffer is identified by a 'cookie' returned by VIDIOC_QUERYBUF
+ * (identical to the cookie used to mmap() the buffer to userspace). All
+ * reserved fields must be set to zero. The field reserved0 is expected to
+ * become a structure 'type' allowing an alternative layout of the structure
+ * content. Therefore this field should not be used for any other extensions.
+ */
+struct v4l2_exportbuffer {
+       __u32           type; /* enum v4l2_buf_type */
+       __u32           index;
+       __u32           plane;
+       __u32           flags;
+       __s32           fd;
+       __u32           reserved[11];
+};
 
 /*
  *     O V E R L A Y   P R E V I E W
@@ -702,7 +747,7 @@ struct v4l2_clip {
 
 struct v4l2_window {
        struct v4l2_rect        w;
-       enum v4l2_field         field;
+       __u32                   field;   /* enum v4l2_field */
        __u32                   chromakey;
        struct v4l2_clip        *clips;
        __u32                   clipcount;
@@ -716,7 +761,7 @@ struct v4l2_window {
 struct v4l2_captureparm {
        __u32              capability;    /*  Supported modes */
        __u32              capturemode;   /*  Current mode */
-       struct v4l2_fract  timeperframe;  /*  Time per frame in .1us units */
+       struct v4l2_fract  timeperframe;  /*  Time per frame in seconds */
        __u32              extendedmode;  /*  Driver-specific extensions */
        __u32              readbuffers;   /*  # of buffers for read */
        __u32              reserved[4];
@@ -739,43 +784,23 @@ struct v4l2_outputparm {
  *     I N P U T   I M A G E   C R O P P I N G
  */
 struct v4l2_cropcap {
-       enum v4l2_buf_type      type;
+       __u32                   type;   /* enum v4l2_buf_type */
        struct v4l2_rect        bounds;
        struct v4l2_rect        defrect;
        struct v4l2_fract       pixelaspect;
 };
 
 struct v4l2_crop {
-       enum v4l2_buf_type      type;
+       __u32                   type;   /* enum v4l2_buf_type */
        struct v4l2_rect        c;
 };
 
-/* Hints for adjustments of selection rectangle */
-#define V4L2_SEL_FLAG_GE       0x00000001
-#define V4L2_SEL_FLAG_LE       0x00000002
-
-/* Selection targets */
-
-/* Current cropping area */
-#define V4L2_SEL_TGT_CROP_ACTIVE       0x0000
-/* Default cropping area */
-#define V4L2_SEL_TGT_CROP_DEFAULT      0x0001
-/* Cropping bounds */
-#define V4L2_SEL_TGT_CROP_BOUNDS       0x0002
-/* Current composing area */
-#define V4L2_SEL_TGT_COMPOSE_ACTIVE    0x0100
-/* Default composing area */
-#define V4L2_SEL_TGT_COMPOSE_DEFAULT   0x0101
-/* Composing bounds */
-#define V4L2_SEL_TGT_COMPOSE_BOUNDS    0x0102
-/* Current composing area plus all padding pixels */
-#define V4L2_SEL_TGT_COMPOSE_PADDED    0x0103
-
 /**
  * struct v4l2_selection - selection info
  * @type:      buffer type (do not use *_MPLANE types)
- * @target:    selection target, used to choose one of possible rectangles
- * @flags:     constraints flags
+ * @target:    Selection target, used to choose one of possible rectangles;
+ *             defined in v4l2-common.h; V4L2_SEL_TGT_* .
+ * @flags:     constraints flags, defined in v4l2-common.h; V4L2_SEL_FLAG_*.
  * @r:         coordinates of selection window
  * @reserved:  for future use, rounds structure size to 64 bytes, set to zero
  *
@@ -934,75 +959,59 @@ struct v4l2_standard {
 };
 
 /*
- *     V I D E O       T I M I N G S   D V     P R E S E T
+ *     D V     B T     T I M I N G S
  */
-struct v4l2_dv_preset {
-       __u32   preset;
-       __u32   reserved[4];
-};
 
-/*
- *     D V     P R E S E T S   E N U M E R A T I O N
+/** struct v4l2_bt_timings - BT.656/BT.1120 timing data
+ * @width:     total width of the active video in pixels
+ * @height:    total height of the active video in lines
+ * @interlaced:        Interlaced or progressive
+ * @polarities:        Positive or negative polarities
+ * @pixelclock:        Pixel clock in HZ. Ex. 74.25MHz->74250000
+ * @hfrontporch:Horizontal front porch in pixels
+ * @hsync:     Horizontal Sync length in pixels
+ * @hbackporch:        Horizontal back porch in pixels
+ * @vfrontporch:Vertical front porch in lines
+ * @vsync:     Vertical Sync length in lines
+ * @vbackporch:        Vertical back porch in lines
+ * @il_vfrontporch:Vertical front porch for the even field
+ *             (aka field 2) of interlaced field formats
+ * @il_vsync:  Vertical Sync length for the even field
+ *             (aka field 2) of interlaced field formats
+ * @il_vbackporch:Vertical back porch for the even field
+ *             (aka field 2) of interlaced field formats
+ * @standards: Standards the timing belongs to
+ * @flags:     Flags
+ * @reserved:  Reserved fields, must be zeroed.
+ *
+ * A note regarding vertical interlaced timings: height refers to the total
+ * height of the active video frame (= two fields). The blanking timings refer
+ * to the blanking of each field. So the height of the total frame is
+ * calculated as follows:
+ *
+ * tot_height = height + vfrontporch + vsync + vbackporch +
+ *                       il_vfrontporch + il_vsync + il_vbackporch
+ *
+ * The active height of each field is height / 2.
  */
-struct v4l2_dv_enum_preset {
-       __u32   index;
-       __u32   preset;
-       __u8    name[32]; /* Name of the preset timing */
+struct v4l2_bt_timings {
        __u32   width;
        __u32   height;
-       __u32   reserved[4];
-};
-
-/*
- *     D V     P R E S E T     V A L U E S
- */
-#define                V4L2_DV_INVALID         0
-#define                V4L2_DV_480P59_94       1 /* BT.1362 */
-#define                V4L2_DV_576P50          2 /* BT.1362 */
-#define                V4L2_DV_720P24          3 /* SMPTE 296M */
-#define                V4L2_DV_720P25          4 /* SMPTE 296M */
-#define                V4L2_DV_720P30          5 /* SMPTE 296M */
-#define                V4L2_DV_720P50          6 /* SMPTE 296M */
-#define                V4L2_DV_720P59_94       7 /* SMPTE 274M */
-#define                V4L2_DV_720P60          8 /* SMPTE 274M/296M */
-#define                V4L2_DV_1080I29_97      9 /* BT.1120/ SMPTE 274M */
-#define                V4L2_DV_1080I30         10 /* BT.1120/ SMPTE 274M */
-#define                V4L2_DV_1080I25         11 /* BT.1120 */
-#define                V4L2_DV_1080I50         12 /* SMPTE 296M */
-#define                V4L2_DV_1080I60         13 /* SMPTE 296M */
-#define                V4L2_DV_1080P24         14 /* SMPTE 296M */
-#define                V4L2_DV_1080P25         15 /* SMPTE 296M */
-#define                V4L2_DV_1080P30         16 /* SMPTE 296M */
-#define                V4L2_DV_1080P50         17 /* BT.1120 */
-#define                V4L2_DV_1080P60         18 /* BT.1120 */
-
-/*
- *     D V     B T     T I M I N G S
- */
-
-/* BT.656/BT.1120 timing data */
-struct v4l2_bt_timings {
-       __u32   width;          /* width in pixels */
-       __u32   height;         /* height in lines */
-       __u32   interlaced;     /* Interlaced or progressive */
-       __u32   polarities;     /* Positive or negative polarity */
-       __u64   pixelclock;     /* Pixel clock in HZ. Ex. 74.25MHz->74250000 */
-       __u32   hfrontporch;    /* Horizpontal front porch in pixels */
-       __u32   hsync;          /* Horizontal Sync length in pixels */
-       __u32   hbackporch;     /* Horizontal back porch in pixels */
-       __u32   vfrontporch;    /* Vertical front porch in pixels */
-       __u32   vsync;          /* Vertical Sync length in lines */
-       __u32   vbackporch;     /* Vertical back porch in lines */
-       __u32   il_vfrontporch; /* Vertical front porch for bottom field of
-                                * interlaced field formats
-                                */
-       __u32   il_vsync;       /* Vertical sync length for bottom field of
-                                * interlaced field formats
-                                */
-       __u32   il_vbackporch;  /* Vertical back porch for bottom field of
-                                * interlaced field formats
-                                */
-       __u32   reserved[16];
+       __u32   interlaced;
+       __u32   polarities;
+       __u64   pixelclock;
+       __u32   hfrontporch;
+       __u32   hsync;
+       __u32   hbackporch;
+       __u32   vfrontporch;
+       __u32   vsync;
+       __u32   vbackporch;
+       __u32   il_vfrontporch;
+       __u32   il_vsync;
+       __u32   il_vbackporch;
+       __u32   standards;
+       __u32   flags;
+       __u32   reserved[14];
 } __attribute__ ((packed));
 
 /* Interlaced or progressive format */
@@ -1013,8 +1022,42 @@ struct v4l2_bt_timings {
 #define V4L2_DV_VSYNC_POS_POL  0x00000001
 #define V4L2_DV_HSYNC_POS_POL  0x00000002
 
-
-/* DV timings */
+/* Timings standards */
+#define V4L2_DV_BT_STD_CEA861  (1 << 0)  /* CEA-861 Digital TV Profile */
+#define V4L2_DV_BT_STD_DMT     (1 << 1)  /* VESA Discrete Monitor Timings */
+#define V4L2_DV_BT_STD_CVT     (1 << 2)  /* VESA Coordinated Video Timings */
+#define V4L2_DV_BT_STD_GTF     (1 << 3)  /* VESA Generalized Timings Formula */
+
+/* Flags */
+
+/* CVT/GTF specific: timing uses reduced blanking (CVT) or the 'Secondary
+   GTF' curve (GTF). In both cases the horizontal and/or vertical blanking
+   intervals are reduced, allowing a higher resolution over the same
+   bandwidth. This is a read-only flag. */
+#define V4L2_DV_FL_REDUCED_BLANKING            (1 << 0)
+/* CEA-861 specific: set for CEA-861 formats with a framerate of a multiple
+   of six. These formats can be optionally played at 1 / 1.001 speed.
+   This is a read-only flag. */
+#define V4L2_DV_FL_CAN_REDUCE_FPS              (1 << 1)
+/* CEA-861 specific: only valid for video transmitters, the flag is cleared
+   by receivers.
+   If the framerate of the format is a multiple of six, then the pixelclock
+   used to set up the transmitter is divided by 1.001 to make it compatible
+   with 60 Hz based standards such as NTSC and PAL-M that use a framerate of
+   29.97 Hz. Otherwise this flag is cleared. If the transmitter can't generate
+   such frequencies, then the flag will also be cleared. */
+#define V4L2_DV_FL_REDUCED_FPS                 (1 << 2)
+/* Specific to interlaced formats: if set, then field 1 is really one half-line
+   longer and field 2 is really one half-line shorter, so each field has
+   exactly the same number of half-lines. Whether half-lines can be detected
+   or used depends on the hardware. */
+#define V4L2_DV_FL_HALF_LINE                   (1 << 3)
+
+
+/** struct v4l2_dv_timings - DV timings
+ * @type:      the type of the timings
+ * @bt:        BT656/1120 timings
+ */
 struct v4l2_dv_timings {
        __u32 type;
        union {
@@ -1026,6 +1069,64 @@ struct v4l2_dv_timings {
 /* Values for the type field */
 #define V4L2_DV_BT_656_1120    0       /* BT.656/1120 timing type */
 
+
+/** struct v4l2_enum_dv_timings - DV timings enumeration
+ * @index:     enumeration index
+ * @reserved:  must be zeroed
+ * @timings:   the timings for the given index
+ */
+struct v4l2_enum_dv_timings {
+       __u32 index;
+       __u32 reserved[3];
+       struct v4l2_dv_timings timings;
+};
+
+/** struct v4l2_bt_timings_cap - BT.656/BT.1120 timing capabilities
+ * @min_width:         width in pixels
+ * @max_width:         width in pixels
+ * @min_height:                height in lines
+ * @max_height:                height in lines
+ * @min_pixelclock:    Pixel clock in HZ. Ex. 74.25MHz->74250000
+ * @max_pixelclock:    Pixel clock in HZ. Ex. 74.25MHz->74250000
+ * @standards:         Supported standards
+ * @capabilities:      Supported capabilities
+ * @reserved:          Must be zeroed
+ */
+struct v4l2_bt_timings_cap {
+       __u32   min_width;
+       __u32   max_width;
+       __u32   min_height;
+       __u32   max_height;
+       __u64   min_pixelclock;
+       __u64   max_pixelclock;
+       __u32   standards;
+       __u32   capabilities;
+       __u32   reserved[16];
+} __attribute__ ((packed));
+
+/* Supports interlaced formats */
+#define V4L2_DV_BT_CAP_INTERLACED      (1 << 0)
+/* Supports progressive formats */
+#define V4L2_DV_BT_CAP_PROGRESSIVE     (1 << 1)
+/* Supports CVT/GTF reduced blanking */
+#define V4L2_DV_BT_CAP_REDUCED_BLANKING        (1 << 2)
+/* Supports custom formats */
+#define V4L2_DV_BT_CAP_CUSTOM          (1 << 3)
+
+/** struct v4l2_dv_timings_cap - DV timings capabilities
+ * @type:      the type of the timings (same as in struct v4l2_dv_timings)
+ * @bt:                the BT656/1120 timings capabilities
+ */
+struct v4l2_dv_timings_cap {
+       __u32 type;
+       __u32 reserved[3];
+       union {
+               struct v4l2_bt_timings_cap bt;
+               __u32 raw_data[32];
+       };
+};
+
+
 /*
  *     V I D E O   I N P U T S
  */
@@ -1034,7 +1135,7 @@ struct v4l2_input {
        __u8         name[32];          /*  Label */
        __u32        type;              /*  Type of input */
        __u32        audioset;          /*  Associated audios (bitfield) */
-       __u32        tuner;             /*  Associated tuner */
+       __u32        tuner;             /*  enum v4l2_tuner_type */
        v4l2_std_id  std;
        __u32        status;
        __u32        capabilities;
@@ -1070,8 +1171,8 @@ struct v4l2_input {
 #define V4L2_IN_ST_VTR         0x04000000  /* VTR time constant */
 
 /* capabilities flags */
-#define V4L2_IN_CAP_PRESETS            0x00000001 /* Supports S_DV_PRESET */
-#define V4L2_IN_CAP_CUSTOM_TIMINGS     0x00000002 /* Supports S_DV_TIMINGS */
+#define V4L2_IN_CAP_DV_TIMINGS         0x00000002 /* Supports S_DV_TIMINGS */
+#define V4L2_IN_CAP_CUSTOM_TIMINGS     V4L2_IN_CAP_DV_TIMINGS /* For compatibility */
 #define V4L2_IN_CAP_STD                        0x00000004 /* Supports S_STD */
 
 /*
@@ -1093,8 +1194,8 @@ struct v4l2_output {
 #define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY      3
 
 /* capabilities flags */
-#define V4L2_OUT_CAP_PRESETS           0x00000001 /* Supports S_DV_PRESET */
-#define V4L2_OUT_CAP_CUSTOM_TIMINGS    0x00000002 /* Supports S_DV_TIMINGS */
+#define V4L2_OUT_CAP_DV_TIMINGS                0x00000002 /* Supports S_DV_TIMINGS */
+#define V4L2_OUT_CAP_CUSTOM_TIMINGS    V4L2_OUT_CAP_DV_TIMINGS /* For compatibility */
 #define V4L2_OUT_CAP_STD               0x00000004 /* Supports S_STD */
 
 /*
@@ -1124,14 +1225,6 @@ struct v4l2_ext_controls {
        struct v4l2_ext_control *controls;
 };
 
-/*  Values for ctrl_class field */
-#define V4L2_CTRL_CLASS_USER 0x00980000        /* Old-style 'user' controls */
-#define V4L2_CTRL_CLASS_MPEG 0x00990000        /* MPEG-compression controls */
-#define V4L2_CTRL_CLASS_CAMERA 0x009a0000      /* Camera class controls */
-#define V4L2_CTRL_CLASS_FM_TX 0x009b0000       /* FM Modulator control class */
-#define V4L2_CTRL_CLASS_FLASH 0x009c0000       /* Camera flash controls */
-#define V4L2_CTRL_CLASS_JPEG 0x009d0000                /* JPEG-compression controls */
-
 #define V4L2_CTRL_ID_MASK                (0x0fffffff)
 #define V4L2_CTRL_ID2CLASS(id)    ((id) & 0x0fff0000UL)
 #define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000)
@@ -1145,12 +1238,13 @@ enum v4l2_ctrl_type {
        V4L2_CTRL_TYPE_CTRL_CLASS    = 6,
        V4L2_CTRL_TYPE_STRING        = 7,
        V4L2_CTRL_TYPE_BITMASK       = 8,
+       V4L2_CTRL_TYPE_INTEGER_MENU = 9,
 };
 
 /*  Used in the VIDIOC_QUERYCTRL ioctl for querying controls */
 struct v4l2_queryctrl {
        __u32                id;
-       enum v4l2_ctrl_type  type;
+       __u32                type;      /* enum v4l2_ctrl_type */
        __u8                 name[32];  /* Whatever */
        __s32                minimum;   /* Note signedness */
        __s32                maximum;
@@ -1164,9 +1258,12 @@ struct v4l2_queryctrl {
 struct v4l2_querymenu {
        __u32           id;
        __u32           index;
-       __u8            name[32];       /* Whatever */
+       union {
+               __u8    name[32];       /* Whatever */
+               __s64   value;
+       };
        __u32           reserved;
-};
+} __attribute__ ((packed));
 
 /*  Control flags  */
 #define V4L2_CTRL_FLAG_DISABLED                0x0001
@@ -1183,598 +1280,9 @@ struct v4l2_querymenu {
 
 /*  User-class control IDs defined by V4L2 */
 #define V4L2_CID_MAX_CTRLS             1024
-#define V4L2_CID_BASE                  (V4L2_CTRL_CLASS_USER | 0x900)
-#define V4L2_CID_USER_BASE             V4L2_CID_BASE
 /*  IDs reserved for driver specific controls */
 #define V4L2_CID_PRIVATE_BASE          0x08000000
 
-#define V4L2_CID_USER_CLASS            (V4L2_CTRL_CLASS_USER | 1)
-#define V4L2_CID_BRIGHTNESS            (V4L2_CID_BASE+0)
-#define V4L2_CID_CONTRAST              (V4L2_CID_BASE+1)
-#define V4L2_CID_SATURATION            (V4L2_CID_BASE+2)
-#define V4L2_CID_HUE                   (V4L2_CID_BASE+3)
-#define V4L2_CID_AUDIO_VOLUME          (V4L2_CID_BASE+5)
-#define V4L2_CID_AUDIO_BALANCE         (V4L2_CID_BASE+6)
-#define V4L2_CID_AUDIO_BASS            (V4L2_CID_BASE+7)
-#define V4L2_CID_AUDIO_TREBLE          (V4L2_CID_BASE+8)
-#define V4L2_CID_AUDIO_MUTE            (V4L2_CID_BASE+9)
-#define V4L2_CID_AUDIO_LOUDNESS                (V4L2_CID_BASE+10)
-#define V4L2_CID_BLACK_LEVEL           (V4L2_CID_BASE+11) /* Deprecated */
-#define V4L2_CID_AUTO_WHITE_BALANCE    (V4L2_CID_BASE+12)
-#define V4L2_CID_DO_WHITE_BALANCE      (V4L2_CID_BASE+13)
-#define V4L2_CID_RED_BALANCE           (V4L2_CID_BASE+14)
-#define V4L2_CID_BLUE_BALANCE          (V4L2_CID_BASE+15)
-#define V4L2_CID_GAMMA                 (V4L2_CID_BASE+16)
-#define V4L2_CID_WHITENESS             (V4L2_CID_GAMMA) /* Deprecated */
-#define V4L2_CID_EXPOSURE              (V4L2_CID_BASE+17)
-#define V4L2_CID_AUTOGAIN              (V4L2_CID_BASE+18)
-#define V4L2_CID_GAIN                  (V4L2_CID_BASE+19)
-#define V4L2_CID_HFLIP                 (V4L2_CID_BASE+20)
-#define V4L2_CID_VFLIP                 (V4L2_CID_BASE+21)
-
-/* Deprecated; use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */
-#define V4L2_CID_HCENTER               (V4L2_CID_BASE+22)
-#define V4L2_CID_VCENTER               (V4L2_CID_BASE+23)
-
-#define V4L2_CID_POWER_LINE_FREQUENCY  (V4L2_CID_BASE+24)
-enum v4l2_power_line_frequency {
-       V4L2_CID_POWER_LINE_FREQUENCY_DISABLED  = 0,
-       V4L2_CID_POWER_LINE_FREQUENCY_50HZ      = 1,
-       V4L2_CID_POWER_LINE_FREQUENCY_60HZ      = 2,
-       V4L2_CID_POWER_LINE_FREQUENCY_AUTO      = 3,
-};
-#define V4L2_CID_HUE_AUTO                      (V4L2_CID_BASE+25)
-#define V4L2_CID_WHITE_BALANCE_TEMPERATURE     (V4L2_CID_BASE+26)
-#define V4L2_CID_SHARPNESS                     (V4L2_CID_BASE+27)
-#define V4L2_CID_BACKLIGHT_COMPENSATION        (V4L2_CID_BASE+28)
-#define V4L2_CID_CHROMA_AGC                     (V4L2_CID_BASE+29)
-#define V4L2_CID_COLOR_KILLER                   (V4L2_CID_BASE+30)
-#define V4L2_CID_COLORFX                       (V4L2_CID_BASE+31)
-enum v4l2_colorfx {
-       V4L2_COLORFX_NONE       = 0,
-       V4L2_COLORFX_BW         = 1,
-       V4L2_COLORFX_SEPIA      = 2,
-       V4L2_COLORFX_NEGATIVE = 3,
-       V4L2_COLORFX_EMBOSS = 4,
-       V4L2_COLORFX_SKETCH = 5,
-       V4L2_COLORFX_SKY_BLUE = 6,
-       V4L2_COLORFX_GRASS_GREEN = 7,
-       V4L2_COLORFX_SKIN_WHITEN = 8,
-       V4L2_COLORFX_VIVID = 9,
-};
-#define V4L2_CID_AUTOBRIGHTNESS                        (V4L2_CID_BASE+32)
-#define V4L2_CID_BAND_STOP_FILTER              (V4L2_CID_BASE+33)
-
-#define V4L2_CID_ROTATE                                (V4L2_CID_BASE+34)
-#define V4L2_CID_BG_COLOR                      (V4L2_CID_BASE+35)
-
-#define V4L2_CID_CHROMA_GAIN                    (V4L2_CID_BASE+36)
-
-#define V4L2_CID_ILLUMINATORS_1                        (V4L2_CID_BASE+37)
-#define V4L2_CID_ILLUMINATORS_2                        (V4L2_CID_BASE+38)
-
-#define V4L2_CID_MIN_BUFFERS_FOR_CAPTURE       (V4L2_CID_BASE+39)
-#define V4L2_CID_MIN_BUFFERS_FOR_OUTPUT                (V4L2_CID_BASE+40)
-
-#define V4L2_CID_ALPHA_COMPONENT               (V4L2_CID_BASE+41)
-
-/* last CID + 1 */
-#define V4L2_CID_LASTP1                         (V4L2_CID_BASE+42)
-
-/*  MPEG-class control IDs defined by V4L2 */
-#define V4L2_CID_MPEG_BASE                     (V4L2_CTRL_CLASS_MPEG | 0x900)
-#define V4L2_CID_MPEG_CLASS                    (V4L2_CTRL_CLASS_MPEG | 1)
-
-/*  MPEG streams, specific to multiplexed streams */
-#define V4L2_CID_MPEG_STREAM_TYPE              (V4L2_CID_MPEG_BASE+0)
-enum v4l2_mpeg_stream_type {
-       V4L2_MPEG_STREAM_TYPE_MPEG2_PS   = 0, /* MPEG-2 program stream */
-       V4L2_MPEG_STREAM_TYPE_MPEG2_TS   = 1, /* MPEG-2 transport stream */
-       V4L2_MPEG_STREAM_TYPE_MPEG1_SS   = 2, /* MPEG-1 system stream */
-       V4L2_MPEG_STREAM_TYPE_MPEG2_DVD  = 3, /* MPEG-2 DVD-compatible stream */
-       V4L2_MPEG_STREAM_TYPE_MPEG1_VCD  = 4, /* MPEG-1 VCD-compatible stream */
-       V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD = 5, /* MPEG-2 SVCD-compatible stream */
-};
-#define V4L2_CID_MPEG_STREAM_PID_PMT           (V4L2_CID_MPEG_BASE+1)
-#define V4L2_CID_MPEG_STREAM_PID_AUDIO                 (V4L2_CID_MPEG_BASE+2)
-#define V4L2_CID_MPEG_STREAM_PID_VIDEO                 (V4L2_CID_MPEG_BASE+3)
-#define V4L2_CID_MPEG_STREAM_PID_PCR           (V4L2_CID_MPEG_BASE+4)
-#define V4L2_CID_MPEG_STREAM_PES_ID_AUDIO      (V4L2_CID_MPEG_BASE+5)
-#define V4L2_CID_MPEG_STREAM_PES_ID_VIDEO      (V4L2_CID_MPEG_BASE+6)
-#define V4L2_CID_MPEG_STREAM_VBI_FMT           (V4L2_CID_MPEG_BASE+7)
-enum v4l2_mpeg_stream_vbi_fmt {
-       V4L2_MPEG_STREAM_VBI_FMT_NONE = 0,  /* No VBI in the MPEG stream */
-       V4L2_MPEG_STREAM_VBI_FMT_IVTV = 1,  /* VBI in private packets, IVTV format */
-};
-
-/*  MPEG audio controls specific to multiplexed streams  */
-#define V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ      (V4L2_CID_MPEG_BASE+100)
-enum v4l2_mpeg_audio_sampling_freq {
-       V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100 = 0,
-       V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000 = 1,
-       V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000 = 2,
-};
-#define V4L2_CID_MPEG_AUDIO_ENCODING           (V4L2_CID_MPEG_BASE+101)
-enum v4l2_mpeg_audio_encoding {
-       V4L2_MPEG_AUDIO_ENCODING_LAYER_1 = 0,
-       V4L2_MPEG_AUDIO_ENCODING_LAYER_2 = 1,
-       V4L2_MPEG_AUDIO_ENCODING_LAYER_3 = 2,
-       V4L2_MPEG_AUDIO_ENCODING_AAC     = 3,
-       V4L2_MPEG_AUDIO_ENCODING_AC3     = 4,
-};
-#define V4L2_CID_MPEG_AUDIO_L1_BITRATE                 (V4L2_CID_MPEG_BASE+102)
-enum v4l2_mpeg_audio_l1_bitrate {
-       V4L2_MPEG_AUDIO_L1_BITRATE_32K  = 0,
-       V4L2_MPEG_AUDIO_L1_BITRATE_64K  = 1,
-       V4L2_MPEG_AUDIO_L1_BITRATE_96K  = 2,
-       V4L2_MPEG_AUDIO_L1_BITRATE_128K = 3,
-       V4L2_MPEG_AUDIO_L1_BITRATE_160K = 4,
-       V4L2_MPEG_AUDIO_L1_BITRATE_192K = 5,
-       V4L2_MPEG_AUDIO_L1_BITRATE_224K = 6,
-       V4L2_MPEG_AUDIO_L1_BITRATE_256K = 7,
-       V4L2_MPEG_AUDIO_L1_BITRATE_288K = 8,
-       V4L2_MPEG_AUDIO_L1_BITRATE_320K = 9,
-       V4L2_MPEG_AUDIO_L1_BITRATE_352K = 10,
-       V4L2_MPEG_AUDIO_L1_BITRATE_384K = 11,
-       V4L2_MPEG_AUDIO_L1_BITRATE_416K = 12,
-       V4L2_MPEG_AUDIO_L1_BITRATE_448K = 13,
-};
-#define V4L2_CID_MPEG_AUDIO_L2_BITRATE                 (V4L2_CID_MPEG_BASE+103)
-enum v4l2_mpeg_audio_l2_bitrate {
-       V4L2_MPEG_AUDIO_L2_BITRATE_32K  = 0,
-       V4L2_MPEG_AUDIO_L2_BITRATE_48K  = 1,
-       V4L2_MPEG_AUDIO_L2_BITRATE_56K  = 2,
-       V4L2_MPEG_AUDIO_L2_BITRATE_64K  = 3,
-       V4L2_MPEG_AUDIO_L2_BITRATE_80K  = 4,
-       V4L2_MPEG_AUDIO_L2_BITRATE_96K  = 5,
-       V4L2_MPEG_AUDIO_L2_BITRATE_112K = 6,
-       V4L2_MPEG_AUDIO_L2_BITRATE_128K = 7,
-       V4L2_MPEG_AUDIO_L2_BITRATE_160K = 8,
-       V4L2_MPEG_AUDIO_L2_BITRATE_192K = 9,
-       V4L2_MPEG_AUDIO_L2_BITRATE_224K = 10,
-       V4L2_MPEG_AUDIO_L2_BITRATE_256K = 11,
-       V4L2_MPEG_AUDIO_L2_BITRATE_320K = 12,
-       V4L2_MPEG_AUDIO_L2_BITRATE_384K = 13,
-};
-#define V4L2_CID_MPEG_AUDIO_L3_BITRATE                 (V4L2_CID_MPEG_BASE+104)
-enum v4l2_mpeg_audio_l3_bitrate {
-       V4L2_MPEG_AUDIO_L3_BITRATE_32K  = 0,
-       V4L2_MPEG_AUDIO_L3_BITRATE_40K  = 1,
-       V4L2_MPEG_AUDIO_L3_BITRATE_48K  = 2,
-       V4L2_MPEG_AUDIO_L3_BITRATE_56K  = 3,
-       V4L2_MPEG_AUDIO_L3_BITRATE_64K  = 4,
-       V4L2_MPEG_AUDIO_L3_BITRATE_80K  = 5,
-       V4L2_MPEG_AUDIO_L3_BITRATE_96K  = 6,
-       V4L2_MPEG_AUDIO_L3_BITRATE_112K = 7,
-       V4L2_MPEG_AUDIO_L3_BITRATE_128K = 8,
-       V4L2_MPEG_AUDIO_L3_BITRATE_160K = 9,
-       V4L2_MPEG_AUDIO_L3_BITRATE_192K = 10,
-       V4L2_MPEG_AUDIO_L3_BITRATE_224K = 11,
-       V4L2_MPEG_AUDIO_L3_BITRATE_256K = 12,
-       V4L2_MPEG_AUDIO_L3_BITRATE_320K = 13,
-};
-#define V4L2_CID_MPEG_AUDIO_MODE               (V4L2_CID_MPEG_BASE+105)
-enum v4l2_mpeg_audio_mode {
-       V4L2_MPEG_AUDIO_MODE_STEREO       = 0,
-       V4L2_MPEG_AUDIO_MODE_JOINT_STEREO = 1,
-       V4L2_MPEG_AUDIO_MODE_DUAL         = 2,
-       V4L2_MPEG_AUDIO_MODE_MONO         = 3,
-};
-#define V4L2_CID_MPEG_AUDIO_MODE_EXTENSION     (V4L2_CID_MPEG_BASE+106)
-enum v4l2_mpeg_audio_mode_extension {
-       V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4  = 0,
-       V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8  = 1,
-       V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12 = 2,
-       V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16 = 3,
-};
-#define V4L2_CID_MPEG_AUDIO_EMPHASIS           (V4L2_CID_MPEG_BASE+107)
-enum v4l2_mpeg_audio_emphasis {
-       V4L2_MPEG_AUDIO_EMPHASIS_NONE         = 0,
-       V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS = 1,
-       V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17    = 2,
-};
-#define V4L2_CID_MPEG_AUDIO_CRC                (V4L2_CID_MPEG_BASE+108)
-enum v4l2_mpeg_audio_crc {
-       V4L2_MPEG_AUDIO_CRC_NONE  = 0,
-       V4L2_MPEG_AUDIO_CRC_CRC16 = 1,
-};
-#define V4L2_CID_MPEG_AUDIO_MUTE               (V4L2_CID_MPEG_BASE+109)
-#define V4L2_CID_MPEG_AUDIO_AAC_BITRATE                (V4L2_CID_MPEG_BASE+110)
-#define V4L2_CID_MPEG_AUDIO_AC3_BITRATE                (V4L2_CID_MPEG_BASE+111)
-enum v4l2_mpeg_audio_ac3_bitrate {
-       V4L2_MPEG_AUDIO_AC3_BITRATE_32K  = 0,
-       V4L2_MPEG_AUDIO_AC3_BITRATE_40K  = 1,
-       V4L2_MPEG_AUDIO_AC3_BITRATE_48K  = 2,
-       V4L2_MPEG_AUDIO_AC3_BITRATE_56K  = 3,
-       V4L2_MPEG_AUDIO_AC3_BITRATE_64K  = 4,
-       V4L2_MPEG_AUDIO_AC3_BITRATE_80K  = 5,
-       V4L2_MPEG_AUDIO_AC3_BITRATE_96K  = 6,
-       V4L2_MPEG_AUDIO_AC3_BITRATE_112K = 7,
-       V4L2_MPEG_AUDIO_AC3_BITRATE_128K = 8,
-       V4L2_MPEG_AUDIO_AC3_BITRATE_160K = 9,
-       V4L2_MPEG_AUDIO_AC3_BITRATE_192K = 10,
-       V4L2_MPEG_AUDIO_AC3_BITRATE_224K = 11,
-       V4L2_MPEG_AUDIO_AC3_BITRATE_256K = 12,
-       V4L2_MPEG_AUDIO_AC3_BITRATE_320K = 13,
-       V4L2_MPEG_AUDIO_AC3_BITRATE_384K = 14,
-       V4L2_MPEG_AUDIO_AC3_BITRATE_448K = 15,
-       V4L2_MPEG_AUDIO_AC3_BITRATE_512K = 16,
-       V4L2_MPEG_AUDIO_AC3_BITRATE_576K = 17,
-       V4L2_MPEG_AUDIO_AC3_BITRATE_640K = 18,
-};
-#define V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK       (V4L2_CID_MPEG_BASE+112)
-enum v4l2_mpeg_audio_dec_playback {
-       V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO           = 0,
-       V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO         = 1,
-       V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT           = 2,
-       V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT          = 3,
-       V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO           = 4,
-       V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO = 5,
-};
-#define V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK (V4L2_CID_MPEG_BASE+113)
-
-/*  MPEG video controls specific to multiplexed streams */
-#define V4L2_CID_MPEG_VIDEO_ENCODING           (V4L2_CID_MPEG_BASE+200)
-enum v4l2_mpeg_video_encoding {
-       V4L2_MPEG_VIDEO_ENCODING_MPEG_1     = 0,
-       V4L2_MPEG_VIDEO_ENCODING_MPEG_2     = 1,
-       V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC = 2,
-};
-#define V4L2_CID_MPEG_VIDEO_ASPECT             (V4L2_CID_MPEG_BASE+201)
-enum v4l2_mpeg_video_aspect {
-       V4L2_MPEG_VIDEO_ASPECT_1x1     = 0,
-       V4L2_MPEG_VIDEO_ASPECT_4x3     = 1,
-       V4L2_MPEG_VIDEO_ASPECT_16x9    = 2,
-       V4L2_MPEG_VIDEO_ASPECT_221x100 = 3,
-};
-#define V4L2_CID_MPEG_VIDEO_B_FRAMES           (V4L2_CID_MPEG_BASE+202)
-#define V4L2_CID_MPEG_VIDEO_GOP_SIZE           (V4L2_CID_MPEG_BASE+203)
-#define V4L2_CID_MPEG_VIDEO_GOP_CLOSURE        (V4L2_CID_MPEG_BASE+204)
-#define V4L2_CID_MPEG_VIDEO_PULLDOWN           (V4L2_CID_MPEG_BASE+205)
-#define V4L2_CID_MPEG_VIDEO_BITRATE_MODE       (V4L2_CID_MPEG_BASE+206)
-enum v4l2_mpeg_video_bitrate_mode {
-       V4L2_MPEG_VIDEO_BITRATE_MODE_VBR = 0,
-       V4L2_MPEG_VIDEO_BITRATE_MODE_CBR = 1,
-};
-#define V4L2_CID_MPEG_VIDEO_BITRATE            (V4L2_CID_MPEG_BASE+207)
-#define V4L2_CID_MPEG_VIDEO_BITRATE_PEAK       (V4L2_CID_MPEG_BASE+208)
-#define V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (V4L2_CID_MPEG_BASE+209)
-#define V4L2_CID_MPEG_VIDEO_MUTE               (V4L2_CID_MPEG_BASE+210)
-#define V4L2_CID_MPEG_VIDEO_MUTE_YUV           (V4L2_CID_MPEG_BASE+211)
-#define V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE            (V4L2_CID_MPEG_BASE+212)
-#define V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER       (V4L2_CID_MPEG_BASE+213)
-#define V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB            (V4L2_CID_MPEG_BASE+214)
-#define V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE                    (V4L2_CID_MPEG_BASE+215)
-#define V4L2_CID_MPEG_VIDEO_HEADER_MODE                                (V4L2_CID_MPEG_BASE+216)
-enum v4l2_mpeg_video_header_mode {
-       V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE                    = 0,
-       V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME       = 1,
-
-};
-#define V4L2_CID_MPEG_VIDEO_MAX_REF_PIC                        (V4L2_CID_MPEG_BASE+217)
-#define V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE               (V4L2_CID_MPEG_BASE+218)
-#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES      (V4L2_CID_MPEG_BASE+219)
-#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB         (V4L2_CID_MPEG_BASE+220)
-#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE           (V4L2_CID_MPEG_BASE+221)
-enum v4l2_mpeg_video_multi_slice_mode {
-       V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE         = 0,
-       V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_MB          = 1,
-       V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_BYTES       = 2,
-};
-#define V4L2_CID_MPEG_VIDEO_VBV_SIZE                   (V4L2_CID_MPEG_BASE+222)
-#define V4L2_CID_MPEG_VIDEO_DEC_PTS                    (V4L2_CID_MPEG_BASE+223)
-#define V4L2_CID_MPEG_VIDEO_DEC_FRAME                  (V4L2_CID_MPEG_BASE+224)
-
-#define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP            (V4L2_CID_MPEG_BASE+300)
-#define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP            (V4L2_CID_MPEG_BASE+301)
-#define V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP            (V4L2_CID_MPEG_BASE+302)
-#define V4L2_CID_MPEG_VIDEO_H263_MIN_QP                        (V4L2_CID_MPEG_BASE+303)
-#define V4L2_CID_MPEG_VIDEO_H263_MAX_QP                        (V4L2_CID_MPEG_BASE+304)
-#define V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP            (V4L2_CID_MPEG_BASE+350)
-#define V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP            (V4L2_CID_MPEG_BASE+351)
-#define V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP            (V4L2_CID_MPEG_BASE+352)
-#define V4L2_CID_MPEG_VIDEO_H264_MIN_QP                        (V4L2_CID_MPEG_BASE+353)
-#define V4L2_CID_MPEG_VIDEO_H264_MAX_QP                        (V4L2_CID_MPEG_BASE+354)
-#define V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM         (V4L2_CID_MPEG_BASE+355)
-#define V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE              (V4L2_CID_MPEG_BASE+356)
-#define V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE          (V4L2_CID_MPEG_BASE+357)
-enum v4l2_mpeg_video_h264_entropy_mode {
-       V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC = 0,
-       V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC = 1,
-};
-#define V4L2_CID_MPEG_VIDEO_H264_I_PERIOD              (V4L2_CID_MPEG_BASE+358)
-#define V4L2_CID_MPEG_VIDEO_H264_LEVEL                 (V4L2_CID_MPEG_BASE+359)
-enum v4l2_mpeg_video_h264_level {
-       V4L2_MPEG_VIDEO_H264_LEVEL_1_0  = 0,
-       V4L2_MPEG_VIDEO_H264_LEVEL_1B   = 1,
-       V4L2_MPEG_VIDEO_H264_LEVEL_1_1  = 2,
-       V4L2_MPEG_VIDEO_H264_LEVEL_1_2  = 3,
-       V4L2_MPEG_VIDEO_H264_LEVEL_1_3  = 4,
-       V4L2_MPEG_VIDEO_H264_LEVEL_2_0  = 5,
-       V4L2_MPEG_VIDEO_H264_LEVEL_2_1  = 6,
-       V4L2_MPEG_VIDEO_H264_LEVEL_2_2  = 7,
-       V4L2_MPEG_VIDEO_H264_LEVEL_3_0  = 8,
-       V4L2_MPEG_VIDEO_H264_LEVEL_3_1  = 9,
-       V4L2_MPEG_VIDEO_H264_LEVEL_3_2  = 10,
-       V4L2_MPEG_VIDEO_H264_LEVEL_4_0  = 11,
-       V4L2_MPEG_VIDEO_H264_LEVEL_4_1  = 12,
-       V4L2_MPEG_VIDEO_H264_LEVEL_4_2  = 13,
-       V4L2_MPEG_VIDEO_H264_LEVEL_5_0  = 14,
-       V4L2_MPEG_VIDEO_H264_LEVEL_5_1  = 15,
-};
-#define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA     (V4L2_CID_MPEG_BASE+360)
-#define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA      (V4L2_CID_MPEG_BASE+361)
-#define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE      (V4L2_CID_MPEG_BASE+362)
-enum v4l2_mpeg_video_h264_loop_filter_mode {
-       V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED                           = 0,
-       V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED                          = 1,
-       V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY        = 2,
-};
-#define V4L2_CID_MPEG_VIDEO_H264_PROFILE               (V4L2_CID_MPEG_BASE+363)
-enum v4l2_mpeg_video_h264_profile {
-       V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE                   = 0,
-       V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE       = 1,
-       V4L2_MPEG_VIDEO_H264_PROFILE_MAIN                       = 2,
-       V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED                   = 3,
-       V4L2_MPEG_VIDEO_H264_PROFILE_HIGH                       = 4,
-       V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10                    = 5,
-       V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422                   = 6,
-       V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE        = 7,
-       V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA              = 8,
-       V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA             = 9,
-       V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA             = 10,
-       V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA            = 11,
-       V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE          = 12,
-       V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH              = 13,
-       V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA        = 14,
-       V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH                = 15,
-       V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH             = 16,
-};
-#define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT    (V4L2_CID_MPEG_BASE+364)
-#define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH     (V4L2_CID_MPEG_BASE+365)
-#define V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE                (V4L2_CID_MPEG_BASE+366)
-#define V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC           (V4L2_CID_MPEG_BASE+367)
-enum v4l2_mpeg_video_h264_vui_sar_idc {
-       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED    = 0,
-       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_1x1            = 1,
-       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_12x11          = 2,
-       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_10x11          = 3,
-       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_16x11          = 4,
-       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_40x33          = 5,
-       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_24x11          = 6,
-       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_20x11          = 7,
-       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_32x11          = 8,
-       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_80x33          = 9,
-       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_18x11          = 10,
-       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_15x11          = 11,
-       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_64x33          = 12,
-       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_160x99         = 13,
-       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_4x3            = 14,
-       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_3x2            = 15,
-       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1            = 16,
-       V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED       = 17,
-};
-#define V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP   (V4L2_CID_MPEG_BASE+400)
-#define V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP   (V4L2_CID_MPEG_BASE+401)
-#define V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP   (V4L2_CID_MPEG_BASE+402)
-#define V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP       (V4L2_CID_MPEG_BASE+403)
-#define V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP       (V4L2_CID_MPEG_BASE+404)
-#define V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL                (V4L2_CID_MPEG_BASE+405)
-enum v4l2_mpeg_video_mpeg4_level {
-       V4L2_MPEG_VIDEO_MPEG4_LEVEL_0   = 0,
-       V4L2_MPEG_VIDEO_MPEG4_LEVEL_0B  = 1,
-       V4L2_MPEG_VIDEO_MPEG4_LEVEL_1   = 2,
-       V4L2_MPEG_VIDEO_MPEG4_LEVEL_2   = 3,
-       V4L2_MPEG_VIDEO_MPEG4_LEVEL_3   = 4,
-       V4L2_MPEG_VIDEO_MPEG4_LEVEL_3B  = 5,
-       V4L2_MPEG_VIDEO_MPEG4_LEVEL_4   = 6,
-       V4L2_MPEG_VIDEO_MPEG4_LEVEL_5   = 7,
-};
-#define V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE      (V4L2_CID_MPEG_BASE+406)
-enum v4l2_mpeg_video_mpeg4_profile {
-       V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE                            = 0,
-       V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE                   = 1,
-       V4L2_MPEG_VIDEO_MPEG4_PROFILE_CORE                              = 2,
-       V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE_SCALABLE                   = 3,
-       V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY        = 4,
-};
-#define V4L2_CID_MPEG_VIDEO_MPEG4_QPEL         (V4L2_CID_MPEG_BASE+407)
-
-/*  MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */
-#define V4L2_CID_MPEG_CX2341X_BASE                             (V4L2_CTRL_CLASS_MPEG | 0x1000)
-#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE        (V4L2_CID_MPEG_CX2341X_BASE+0)
-enum v4l2_mpeg_cx2341x_video_spatial_filter_mode {
-       V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL = 0,
-       V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO   = 1,
-};
-#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER             (V4L2_CID_MPEG_CX2341X_BASE+1)
-#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE   (V4L2_CID_MPEG_CX2341X_BASE+2)
-enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type {
-       V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF                  = 0,
-       V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR               = 1,
-       V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT              = 2,
-       V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE      = 3,
-       V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE = 4,
-};
-#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE         (V4L2_CID_MPEG_CX2341X_BASE+3)
-enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type {
-       V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF    = 0,
-       V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR = 1,
-};
-#define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE       (V4L2_CID_MPEG_CX2341X_BASE+4)
-enum v4l2_mpeg_cx2341x_video_temporal_filter_mode {
-       V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL = 0,
-       V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO   = 1,
-};
-#define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER            (V4L2_CID_MPEG_CX2341X_BASE+5)
-#define V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE                 (V4L2_CID_MPEG_CX2341X_BASE+6)
-enum v4l2_mpeg_cx2341x_video_median_filter_type {
-       V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF      = 0,
-       V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR      = 1,
-       V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT     = 2,
-       V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT = 3,
-       V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG     = 4,
-};
-#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM  (V4L2_CID_MPEG_CX2341X_BASE+7)
-#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP     (V4L2_CID_MPEG_CX2341X_BASE+8)
-#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM        (V4L2_CID_MPEG_CX2341X_BASE+9)
-#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP   (V4L2_CID_MPEG_CX2341X_BASE+10)
-#define V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS        (V4L2_CID_MPEG_CX2341X_BASE+11)
-
-/*  MPEG-class control IDs specific to the Samsung MFC 5.1 driver as defined by V4L2 */
-#define V4L2_CID_MPEG_MFC51_BASE                               (V4L2_CTRL_CLASS_MPEG | 0x1100)
-
-#define V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY           (V4L2_CID_MPEG_MFC51_BASE+0)
-#define V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE    (V4L2_CID_MPEG_MFC51_BASE+1)
-#define V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE                      (V4L2_CID_MPEG_MFC51_BASE+2)
-enum v4l2_mpeg_mfc51_video_frame_skip_mode {
-       V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_DISABLED          = 0,
-       V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT       = 1,
-       V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT         = 2,
-};
-#define V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE                     (V4L2_CID_MPEG_MFC51_BASE+3)
-enum v4l2_mpeg_mfc51_video_force_frame_type {
-       V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_DISABLED         = 0,
-       V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_I_FRAME          = 1,
-       V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_NOT_CODED        = 2,
-};
-#define V4L2_CID_MPEG_MFC51_VIDEO_PADDING                              (V4L2_CID_MPEG_MFC51_BASE+4)
-#define V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV                          (V4L2_CID_MPEG_MFC51_BASE+5)
-#define V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT                  (V4L2_CID_MPEG_MFC51_BASE+6)
-#define V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF                    (V4L2_CID_MPEG_MFC51_BASE+7)
-#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY            (V4L2_CID_MPEG_MFC51_BASE+50)
-#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK                        (V4L2_CID_MPEG_MFC51_BASE+51)
-#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH              (V4L2_CID_MPEG_MFC51_BASE+52)
-#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC              (V4L2_CID_MPEG_MFC51_BASE+53)
-#define V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P               (V4L2_CID_MPEG_MFC51_BASE+54)
-
-/*  Camera class control IDs */
-#define V4L2_CID_CAMERA_CLASS_BASE     (V4L2_CTRL_CLASS_CAMERA | 0x900)
-#define V4L2_CID_CAMERA_CLASS          (V4L2_CTRL_CLASS_CAMERA | 1)
-
-#define V4L2_CID_EXPOSURE_AUTO                 (V4L2_CID_CAMERA_CLASS_BASE+1)
-enum  v4l2_exposure_auto_type {
-       V4L2_EXPOSURE_AUTO = 0,
-       V4L2_EXPOSURE_MANUAL = 1,
-       V4L2_EXPOSURE_SHUTTER_PRIORITY = 2,
-       V4L2_EXPOSURE_APERTURE_PRIORITY = 3
-};
-#define V4L2_CID_EXPOSURE_ABSOLUTE             (V4L2_CID_CAMERA_CLASS_BASE+2)
-#define V4L2_CID_EXPOSURE_AUTO_PRIORITY                (V4L2_CID_CAMERA_CLASS_BASE+3)
-
-#define V4L2_CID_PAN_RELATIVE                  (V4L2_CID_CAMERA_CLASS_BASE+4)
-#define V4L2_CID_TILT_RELATIVE                 (V4L2_CID_CAMERA_CLASS_BASE+5)
-#define V4L2_CID_PAN_RESET                     (V4L2_CID_CAMERA_CLASS_BASE+6)
-#define V4L2_CID_TILT_RESET                    (V4L2_CID_CAMERA_CLASS_BASE+7)
-
-#define V4L2_CID_PAN_ABSOLUTE                  (V4L2_CID_CAMERA_CLASS_BASE+8)
-#define V4L2_CID_TILT_ABSOLUTE                 (V4L2_CID_CAMERA_CLASS_BASE+9)
-
-#define V4L2_CID_FOCUS_ABSOLUTE                        (V4L2_CID_CAMERA_CLASS_BASE+10)
-#define V4L2_CID_FOCUS_RELATIVE                        (V4L2_CID_CAMERA_CLASS_BASE+11)
-#define V4L2_CID_FOCUS_AUTO                    (V4L2_CID_CAMERA_CLASS_BASE+12)
-
-#define V4L2_CID_ZOOM_ABSOLUTE                 (V4L2_CID_CAMERA_CLASS_BASE+13)
-#define V4L2_CID_ZOOM_RELATIVE                 (V4L2_CID_CAMERA_CLASS_BASE+14)
-#define V4L2_CID_ZOOM_CONTINUOUS               (V4L2_CID_CAMERA_CLASS_BASE+15)
-
-#define V4L2_CID_PRIVACY                       (V4L2_CID_CAMERA_CLASS_BASE+16)
-
-#define V4L2_CID_IRIS_ABSOLUTE                 (V4L2_CID_CAMERA_CLASS_BASE+17)
-#define V4L2_CID_IRIS_RELATIVE                 (V4L2_CID_CAMERA_CLASS_BASE+18)
-
-/* FM Modulator class control IDs */
-#define V4L2_CID_FM_TX_CLASS_BASE              (V4L2_CTRL_CLASS_FM_TX | 0x900)
-#define V4L2_CID_FM_TX_CLASS                   (V4L2_CTRL_CLASS_FM_TX | 1)
-
-#define V4L2_CID_RDS_TX_DEVIATION              (V4L2_CID_FM_TX_CLASS_BASE + 1)
-#define V4L2_CID_RDS_TX_PI                     (V4L2_CID_FM_TX_CLASS_BASE + 2)
-#define V4L2_CID_RDS_TX_PTY                    (V4L2_CID_FM_TX_CLASS_BASE + 3)
-#define V4L2_CID_RDS_TX_PS_NAME                        (V4L2_CID_FM_TX_CLASS_BASE + 5)
-#define V4L2_CID_RDS_TX_RADIO_TEXT             (V4L2_CID_FM_TX_CLASS_BASE + 6)
-
-#define V4L2_CID_AUDIO_LIMITER_ENABLED         (V4L2_CID_FM_TX_CLASS_BASE + 64)
-#define V4L2_CID_AUDIO_LIMITER_RELEASE_TIME    (V4L2_CID_FM_TX_CLASS_BASE + 65)
-#define V4L2_CID_AUDIO_LIMITER_DEVIATION       (V4L2_CID_FM_TX_CLASS_BASE + 66)
-
-#define V4L2_CID_AUDIO_COMPRESSION_ENABLED     (V4L2_CID_FM_TX_CLASS_BASE + 80)
-#define V4L2_CID_AUDIO_COMPRESSION_GAIN                (V4L2_CID_FM_TX_CLASS_BASE + 81)
-#define V4L2_CID_AUDIO_COMPRESSION_THRESHOLD   (V4L2_CID_FM_TX_CLASS_BASE + 82)
-#define V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME (V4L2_CID_FM_TX_CLASS_BASE + 83)
-#define V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME        (V4L2_CID_FM_TX_CLASS_BASE + 84)
-
-#define V4L2_CID_PILOT_TONE_ENABLED            (V4L2_CID_FM_TX_CLASS_BASE + 96)
-#define V4L2_CID_PILOT_TONE_DEVIATION          (V4L2_CID_FM_TX_CLASS_BASE + 97)
-#define V4L2_CID_PILOT_TONE_FREQUENCY          (V4L2_CID_FM_TX_CLASS_BASE + 98)
-
-#define V4L2_CID_TUNE_PREEMPHASIS              (V4L2_CID_FM_TX_CLASS_BASE + 112)
-enum v4l2_preemphasis {
-       V4L2_PREEMPHASIS_DISABLED       = 0,
-       V4L2_PREEMPHASIS_50_uS          = 1,
-       V4L2_PREEMPHASIS_75_uS          = 2,
-};
-#define V4L2_CID_TUNE_POWER_LEVEL              (V4L2_CID_FM_TX_CLASS_BASE + 113)
-#define V4L2_CID_TUNE_ANTENNA_CAPACITOR                (V4L2_CID_FM_TX_CLASS_BASE + 114)
-
-/* Flash and privacy (indicator) light controls */
-#define V4L2_CID_FLASH_CLASS_BASE              (V4L2_CTRL_CLASS_FLASH | 0x900)
-#define V4L2_CID_FLASH_CLASS                   (V4L2_CTRL_CLASS_FLASH | 1)
-
-#define V4L2_CID_FLASH_LED_MODE                        (V4L2_CID_FLASH_CLASS_BASE + 1)
-enum v4l2_flash_led_mode {
-       V4L2_FLASH_LED_MODE_NONE,
-       V4L2_FLASH_LED_MODE_FLASH,
-       V4L2_FLASH_LED_MODE_TORCH,
-};
-
-#define V4L2_CID_FLASH_STROBE_SOURCE           (V4L2_CID_FLASH_CLASS_BASE + 2)
-enum v4l2_flash_strobe_source {
-       V4L2_FLASH_STROBE_SOURCE_SOFTWARE,
-       V4L2_FLASH_STROBE_SOURCE_EXTERNAL,
-};
-
-#define V4L2_CID_FLASH_STROBE                  (V4L2_CID_FLASH_CLASS_BASE + 3)
-#define V4L2_CID_FLASH_STROBE_STOP             (V4L2_CID_FLASH_CLASS_BASE + 4)
-#define V4L2_CID_FLASH_STROBE_STATUS           (V4L2_CID_FLASH_CLASS_BASE + 5)
-
-#define V4L2_CID_FLASH_TIMEOUT                 (V4L2_CID_FLASH_CLASS_BASE + 6)
-#define V4L2_CID_FLASH_INTENSITY               (V4L2_CID_FLASH_CLASS_BASE + 7)
-#define V4L2_CID_FLASH_TORCH_INTENSITY         (V4L2_CID_FLASH_CLASS_BASE + 8)
-#define V4L2_CID_FLASH_INDICATOR_INTENSITY     (V4L2_CID_FLASH_CLASS_BASE + 9)
-
-#define V4L2_CID_FLASH_FAULT                   (V4L2_CID_FLASH_CLASS_BASE + 10)
-#define V4L2_FLASH_FAULT_OVER_VOLTAGE          (1 << 0)
-#define V4L2_FLASH_FAULT_TIMEOUT               (1 << 1)
-#define V4L2_FLASH_FAULT_OVER_TEMPERATURE      (1 << 2)
-#define V4L2_FLASH_FAULT_SHORT_CIRCUIT         (1 << 3)
-#define V4L2_FLASH_FAULT_OVER_CURRENT          (1 << 4)
-#define V4L2_FLASH_FAULT_INDICATOR             (1 << 5)
-
-#define V4L2_CID_FLASH_CHARGE                  (V4L2_CID_FLASH_CLASS_BASE + 11)
-#define V4L2_CID_FLASH_READY                   (V4L2_CID_FLASH_CLASS_BASE + 12)
-
-/*  JPEG-class control IDs defined by V4L2 */
-#define V4L2_CID_JPEG_CLASS_BASE               (V4L2_CTRL_CLASS_JPEG | 0x900)
-#define V4L2_CID_JPEG_CLASS                    (V4L2_CTRL_CLASS_JPEG | 1)
-
-#define        V4L2_CID_JPEG_CHROMA_SUBSAMPLING        (V4L2_CID_JPEG_CLASS_BASE + 1)
-enum v4l2_jpeg_chroma_subsampling {
-       V4L2_JPEG_CHROMA_SUBSAMPLING_444        = 0,
-       V4L2_JPEG_CHROMA_SUBSAMPLING_422        = 1,
-       V4L2_JPEG_CHROMA_SUBSAMPLING_420        = 2,
-       V4L2_JPEG_CHROMA_SUBSAMPLING_411        = 3,
-       V4L2_JPEG_CHROMA_SUBSAMPLING_410        = 4,
-       V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY       = 5,
-};
-#define        V4L2_CID_JPEG_RESTART_INTERVAL          (V4L2_CID_JPEG_CLASS_BASE + 2)
-#define        V4L2_CID_JPEG_COMPRESSION_QUALITY       (V4L2_CID_JPEG_CLASS_BASE + 3)
-
-#define        V4L2_CID_JPEG_ACTIVE_MARKER             (V4L2_CID_JPEG_CLASS_BASE + 4)
-#define        V4L2_JPEG_ACTIVE_MARKER_APP0            (1 << 0)
-#define        V4L2_JPEG_ACTIVE_MARKER_APP1            (1 << 1)
-#define        V4L2_JPEG_ACTIVE_MARKER_COM             (1 << 16)
-#define        V4L2_JPEG_ACTIVE_MARKER_DQT             (1 << 17)
-#define        V4L2_JPEG_ACTIVE_MARKER_DHT             (1 << 18)
 
 /*
  *     T U N I N G
@@ -1782,7 +1290,7 @@ enum v4l2_jpeg_chroma_subsampling {
 struct v4l2_tuner {
        __u32                   index;
        __u8                    name[32];
-       enum v4l2_tuner_type    type;
+       __u32                   type;   /* enum v4l2_tuner_type */
        __u32                   capability;
        __u32                   rangelow;
        __u32                   rangehigh;
@@ -1806,6 +1314,8 @@ struct v4l2_modulator {
 /*  Flags for the 'capability' field */
 #define V4L2_TUNER_CAP_LOW             0x0001
 #define V4L2_TUNER_CAP_NORM            0x0002
+#define V4L2_TUNER_CAP_HWSEEK_BOUNDED  0x0004
+#define V4L2_TUNER_CAP_HWSEEK_WRAP     0x0008
 #define V4L2_TUNER_CAP_STEREO          0x0010
 #define V4L2_TUNER_CAP_LANG2           0x0020
 #define V4L2_TUNER_CAP_SAP             0x0020
@@ -1813,6 +1323,8 @@ struct v4l2_modulator {
 #define V4L2_TUNER_CAP_RDS             0x0080
 #define V4L2_TUNER_CAP_RDS_BLOCK_IO    0x0100
 #define V4L2_TUNER_CAP_RDS_CONTROLS    0x0200
+#define V4L2_TUNER_CAP_FREQ_BANDS      0x0400
+#define V4L2_TUNER_CAP_HWSEEK_PROG_LIM 0x0800
 
 /*  Flags for the 'rxsubchans' field */
 #define V4L2_TUNER_SUB_MONO            0x0001
@@ -1831,19 +1343,36 @@ struct v4l2_modulator {
 #define V4L2_TUNER_MODE_LANG1_LANG2    0x0004
 
 struct v4l2_frequency {
-       __u32                 tuner;
-       enum v4l2_tuner_type  type;
-       __u32                 frequency;
-       __u32                 reserved[8];
+       __u32   tuner;
+       __u32   type;   /* enum v4l2_tuner_type */
+       __u32   frequency;
+       __u32   reserved[8];
+};
+
+#define V4L2_BAND_MODULATION_VSB       (1 << 1)
+#define V4L2_BAND_MODULATION_FM                (1 << 2)
+#define V4L2_BAND_MODULATION_AM                (1 << 3)
+
+struct v4l2_frequency_band {
+       __u32   tuner;
+       __u32   type;   /* enum v4l2_tuner_type */
+       __u32   index;
+       __u32   capability;
+       __u32   rangelow;
+       __u32   rangehigh;
+       __u32   modulation;
+       __u32   reserved[9];
 };
 
 struct v4l2_hw_freq_seek {
-       __u32                 tuner;
-       enum v4l2_tuner_type  type;
-       __u32                 seek_upward;
-       __u32                 wrap_around;
-       __u32                 spacing;
-       __u32                 reserved[7];
+       __u32   tuner;
+       __u32   type;   /* enum v4l2_tuner_type */
+       __u32   seek_upward;
+       __u32   wrap_around;
+       __u32   spacing;
+       __u32   rangelow;
+       __u32   rangehigh;
+       __u32   reserved[5];
 };
 
 /*
@@ -2050,7 +1579,7 @@ struct v4l2_sliced_vbi_cap {
                                 (equals frame lines 313-336 for 625 line video
                                  standards, 263-286 for 525 line standards) */
        __u16   service_lines[2][24];
-       enum v4l2_buf_type type;
+       __u32   type;           /* enum v4l2_buf_type */
        __u32   reserved[3];    /* must be 0 */
 };
 
@@ -2131,8 +1660,8 @@ struct v4l2_plane_pix_format {
  * @width:             image width in pixels
  * @height:            image height in pixels
  * @pixelformat:       little endian four character code (fourcc)
- * @field:             field order (for interlaced video)
- * @colorspace:                supplemental to pixelformat
+ * @field:             enum v4l2_field; field order (for interlaced video)
+ * @colorspace:                enum v4l2_colorspace; supplemental to pixelformat
  * @plane_fmt:         per-plane information
  * @num_planes:                number of planes for this format
  */
@@ -2140,8 +1669,8 @@ struct v4l2_pix_format_mplane {
        __u32                           width;
        __u32                           height;
        __u32                           pixelformat;
-       enum v4l2_field                 field;
-       enum v4l2_colorspace            colorspace;
+       __u32                           field;
+       __u32                           colorspace;
 
        struct v4l2_plane_pix_format    plane_fmt[VIDEO_MAX_PLANES];
        __u8                            num_planes;
@@ -2150,7 +1679,7 @@ struct v4l2_pix_format_mplane {
 
 /**
  * struct v4l2_format - stream data format
- * @type:      type of the data stream
+ * @type:      enum v4l2_buf_type; type of the data stream
  * @pix:       definition of an image format
  * @pix_mp:    definition of a multiplanar image format
  * @win:       definition of an overlaid image
@@ -2159,7 +1688,7 @@ struct v4l2_pix_format_mplane {
  * @raw_data:  placeholder for future extensions and custom formats
  */
 struct v4l2_format {
-       enum v4l2_buf_type type;
+       __u32    type;
        union {
                struct v4l2_pix_format          pix;     /* V4L2_BUF_TYPE_VIDEO_CAPTURE */
                struct v4l2_pix_format_mplane   pix_mp;  /* V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE */
@@ -2173,7 +1702,7 @@ struct v4l2_format {
 /*     Stream type-dependent parameters
  */
 struct v4l2_streamparm {
-       enum v4l2_buf_type type;
+       __u32    type;                  /* enum v4l2_buf_type */
        union {
                struct v4l2_captureparm capture;
                struct v4l2_outputparm  output;
@@ -2201,6 +1730,7 @@ struct v4l2_event_vsync {
 /* Payload for V4L2_EVENT_CTRL */
 #define V4L2_EVENT_CTRL_CH_VALUE               (1 << 0)
 #define V4L2_EVENT_CTRL_CH_FLAGS               (1 << 1)
+#define V4L2_EVENT_CTRL_CH_RANGE               (1 << 2)
 
 struct v4l2_event_ctrl {
        __u32 changes;
@@ -2254,10 +1784,12 @@ struct v4l2_event_subscription {
 
 /* VIDIOC_DBG_G_REGISTER and VIDIOC_DBG_S_REGISTER */
 
-#define V4L2_CHIP_MATCH_HOST       0  /* Match against chip ID on host (0 for the host) */
-#define V4L2_CHIP_MATCH_I2C_DRIVER 1  /* Match against I2C driver name */
-#define V4L2_CHIP_MATCH_I2C_ADDR   2  /* Match against I2C 7-bit address */
-#define V4L2_CHIP_MATCH_AC97       3  /* Match against anciliary AC97 chip */
+#define V4L2_CHIP_MATCH_BRIDGE      0  /* Match against chip ID on the bridge (0 for the bridge) */
+#define V4L2_CHIP_MATCH_HOST V4L2_CHIP_MATCH_BRIDGE
+#define V4L2_CHIP_MATCH_I2C_DRIVER  1  /* Match against I2C driver name */
+#define V4L2_CHIP_MATCH_I2C_ADDR    2  /* Match against I2C 7-bit address */
+#define V4L2_CHIP_MATCH_AC97        3  /* Match against anciliary AC97 chip */
+#define V4L2_CHIP_MATCH_SUBDEV      4  /* Match against subdev index */
 
 struct v4l2_dbg_match {
        __u32 type; /* Match type */
@@ -2281,19 +1813,30 @@ struct v4l2_dbg_chip_ident {
        __u32 revision;    /* chip revision, chip specific */
 } __attribute__ ((packed));
 
+#define V4L2_CHIP_FL_READABLE (1 << 0)
+#define V4L2_CHIP_FL_WRITABLE (1 << 1)
+
+/* VIDIOC_DBG_G_CHIP_INFO */
+struct v4l2_dbg_chip_info {
+       struct v4l2_dbg_match match;
+       char name[32];
+       __u32 flags;
+       __u32 reserved[32];
+} __attribute__ ((packed));
+
 /**
  * struct v4l2_create_buffers - VIDIOC_CREATE_BUFS argument
  * @index:     on return, index of the first created buffer
  * @count:     entry: number of requested buffers,
  *             return: number of created buffers
- * @memory:    buffer memory type
+ * @memory:    enum v4l2_memory; buffer memory type
  * @format:    frame format, for which buffers are requested
  * @reserved:  future extensions
  */
 struct v4l2_create_buffers {
        __u32                   index;
        __u32                   count;
-       enum v4l2_memory        memory;
+       __u32                   memory;
        struct v4l2_format      format;
        __u32                   reserved[8];
 };
@@ -2313,6 +1856,7 @@ struct v4l2_create_buffers {
 #define VIDIOC_S_FBUF           _IOW('V', 11, struct v4l2_framebuffer)
 #define VIDIOC_OVERLAY          _IOW('V', 14, int)
 #define VIDIOC_QBUF            _IOWR('V', 15, struct v4l2_buffer)
+#define VIDIOC_EXPBUF          _IOWR('V', 16, struct v4l2_exportbuffer)
 #define VIDIOC_DQBUF           _IOWR('V', 17, struct v4l2_buffer)
 #define VIDIOC_STREAMON                 _IOW('V', 18, int)
 #define VIDIOC_STREAMOFF        _IOW('V', 19, int)
@@ -2350,22 +1894,19 @@ struct v4l2_create_buffers {
 #define VIDIOC_TRY_FMT         _IOWR('V', 64, struct v4l2_format)
 #define VIDIOC_ENUMAUDIO       _IOWR('V', 65, struct v4l2_audio)
 #define VIDIOC_ENUMAUDOUT      _IOWR('V', 66, struct v4l2_audioout)
-#define VIDIOC_G_PRIORITY        _IOR('V', 67, enum v4l2_priority)
-#define VIDIOC_S_PRIORITY        _IOW('V', 68, enum v4l2_priority)
+#define VIDIOC_G_PRIORITY       _IOR('V', 67, __u32) /* enum v4l2_priority */
+#define VIDIOC_S_PRIORITY       _IOW('V', 68, __u32) /* enum v4l2_priority */
 #define VIDIOC_G_SLICED_VBI_CAP _IOWR('V', 69, struct v4l2_sliced_vbi_cap)
 #define VIDIOC_LOG_STATUS         _IO('V', 70)
 #define VIDIOC_G_EXT_CTRLS     _IOWR('V', 71, struct v4l2_ext_controls)
 #define VIDIOC_S_EXT_CTRLS     _IOWR('V', 72, struct v4l2_ext_controls)
 #define VIDIOC_TRY_EXT_CTRLS   _IOWR('V', 73, struct v4l2_ext_controls)
-#if 1
 #define VIDIOC_ENUM_FRAMESIZES _IOWR('V', 74, struct v4l2_frmsizeenum)
 #define VIDIOC_ENUM_FRAMEINTERVALS _IOWR('V', 75, struct v4l2_frmivalenum)
 #define VIDIOC_G_ENC_INDEX       _IOR('V', 76, struct v4l2_enc_idx)
 #define VIDIOC_ENCODER_CMD      _IOWR('V', 77, struct v4l2_encoder_cmd)
 #define VIDIOC_TRY_ENCODER_CMD  _IOWR('V', 78, struct v4l2_encoder_cmd)
-#endif
 
-#if 1
 /* Experimental, meant for debugging, testing and internal use.
    Only implemented if CONFIG_VIDEO_ADV_DEBUG is defined.
    You must be root to use these ioctls. Never use these in applications! */
@@ -2373,15 +1914,13 @@ struct v4l2_create_buffers {
 #define        VIDIOC_DBG_G_REGISTER   _IOWR('V', 80, struct v4l2_dbg_register)
 
 /* Experimental, meant for debugging, testing and internal use.
-   Never use this ioctl in applications! */
+   Never use this ioctl in applications!
+   Note: this ioctl is deprecated in favor of VIDIOC_DBG_G_CHIP_INFO and
+   will go away in the future. */
 #define VIDIOC_DBG_G_CHIP_IDENT _IOWR('V', 81, struct v4l2_dbg_chip_ident)
-#endif
 
 #define VIDIOC_S_HW_FREQ_SEEK   _IOW('V', 82, struct v4l2_hw_freq_seek)
-#define        VIDIOC_ENUM_DV_PRESETS  _IOWR('V', 83, struct v4l2_dv_enum_preset)
-#define        VIDIOC_S_DV_PRESET      _IOWR('V', 84, struct v4l2_dv_preset)
-#define        VIDIOC_G_DV_PRESET      _IOWR('V', 85, struct v4l2_dv_preset)
-#define        VIDIOC_QUERY_DV_PRESET  _IOR('V',  86, struct v4l2_dv_preset)
+
 #define        VIDIOC_S_DV_TIMINGS     _IOWR('V', 87, struct v4l2_dv_timings)
 #define        VIDIOC_G_DV_TIMINGS     _IOWR('V', 88, struct v4l2_dv_timings)
 #define        VIDIOC_DQEVENT           _IOR('V', 89, struct v4l2_event)
@@ -2402,6 +1941,20 @@ struct v4l2_create_buffers {
 #define VIDIOC_DECODER_CMD     _IOWR('V', 96, struct v4l2_decoder_cmd)
 #define VIDIOC_TRY_DECODER_CMD _IOWR('V', 97, struct v4l2_decoder_cmd)
 
+/* Experimental, these three ioctls may change over the next couple of kernel
+   versions. */
+#define VIDIOC_ENUM_DV_TIMINGS  _IOWR('V', 98, struct v4l2_enum_dv_timings)
+#define VIDIOC_QUERY_DV_TIMINGS  _IOR('V', 99, struct v4l2_dv_timings)
+#define VIDIOC_DV_TIMINGS_CAP   _IOWR('V', 100, struct v4l2_dv_timings_cap)
+
+/* Experimental, this ioctl may change over the next couple of kernel
+   versions. */
+#define VIDIOC_ENUM_FREQ_BANDS _IOWR('V', 101, struct v4l2_frequency_band)
+
+/* Experimental, meant for debugging, testing and internal use.
+   Never use these in applications! */
+#define VIDIOC_DBG_G_CHIP_INFO  _IOWR('V', 102, struct v4l2_dbg_chip_info)
+
 /* Reminder: when adding new ioctls please add support for them to
    drivers/media/video/v4l2-compat-ioctl32.c as well! */
 
index 652dc8b..5e26f61 100644 (file)
@@ -52,8 +52,8 @@ struct virtio_balloon_config
 #define VIRTIO_BALLOON_S_NR       6
 
 struct virtio_balloon_stat {
-       u16 tag;
-       u64 val;
+       __u16 tag;
+       __u64 val;
 } __attribute__((packed));
 
 #endif /* _LINUX_VIRTIO_BALLOON_H */
index e0edb40..8270c14 100644 (file)
 #define VIRTIO_BLK_F_RO                5       /* Disk is read-only */
 #define VIRTIO_BLK_F_BLK_SIZE  6       /* Block size of disk is available*/
 #define VIRTIO_BLK_F_SCSI      7       /* Supports scsi command passthru */
-#define VIRTIO_BLK_F_FLUSH     9       /* Cache flush command support */
+#define VIRTIO_BLK_F_WCE       9       /* Writeback mode enabled after reset */
 #define VIRTIO_BLK_F_TOPOLOGY  10      /* Topology information is available */
+#define VIRTIO_BLK_F_CONFIG_WCE        11      /* Writeback mode available in config */
+
+/* Old (deprecated) name for VIRTIO_BLK_F_WCE. */
+#define VIRTIO_BLK_F_FLUSH VIRTIO_BLK_F_WCE
 
 #define VIRTIO_BLK_ID_BYTES    20      /* ID string length */
 
@@ -69,6 +73,8 @@ struct virtio_blk_config {
        /* optimal sustained I/O size in logical blocks. */
        __u32 opt_io_size;
 
+       /* writeback mode (if VIRTIO_BLK_F_CONFIG_WCE) */
+       __u8 wce;
 } __attribute__((packed));
 
 /*
index 5454e2e..5403535 100644 (file)
@@ -1,8 +1,3 @@
-#ifndef _LINUX_VIRTIO_CONSOLE_H
-#define _LINUX_VIRTIO_CONSOLE_H
-#include <linux/types.h>
-#include <linux/virtio_ids.h>
-#include <linux/virtio_config.h>
 /*
  * This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so
  * anyone can use the definitions to implement compatible drivers/servers:
  * Copyright (C) Red Hat, Inc., 2009, 2010, 2011
  * Copyright (C) Amit Shah <amit.shah@redhat.com>, 2009, 2010, 2011
  */
+#ifndef _LINUX_VIRTIO_CONSOLE_H
+#define _LINUX_VIRTIO_CONSOLE_H
+#include <linux/types.h>
+#include <linux/virtio_ids.h>
+#include <linux/virtio_config.h>
 
 /* Feature bits */
 #define VIRTIO_CONSOLE_F_SIZE  0       /* Does host provide console size? */
 #define VIRTIO_CONSOLE_F_MULTIPORT 1   /* Does host provide multiple ports? */
 
-#define VIRTIO_CONSOLE_BAD_ID          (~(u32)0)
+#define VIRTIO_CONSOLE_BAD_ID          (~(__u32)0)
 
 struct virtio_console_config {
        /* colums of the screens */
index 7529b85..284fc3a 100644 (file)
 #define VIRTIO_ID_NET          1 /* virtio net */
 #define VIRTIO_ID_BLOCK                2 /* virtio block */
 #define VIRTIO_ID_CONSOLE      3 /* virtio console */
-#define VIRTIO_ID_RNG          4 /* virtio ring */
+#define VIRTIO_ID_RNG          4 /* virtio rng */
 #define VIRTIO_ID_BALLOON      5 /* virtio balloon */
 #define VIRTIO_ID_RPMSG                7 /* virtio remote processor messaging */
 #define VIRTIO_ID_SCSI         8 /* virtio scsi */
 #define VIRTIO_ID_9P           9 /* 9p virtio console */
+#define VIRTIO_ID_RPROC_SERIAL 11 /* virtio remoteproc serial link */
+#define VIRTIO_ID_CAIF        12 /* Virtio caif */
 
 #endif /* _LINUX_VIRTIO_IDS_H */
index 970d5a2..c520203 100644 (file)
 #define VIRTIO_NET_F_CTRL_RX   18      /* Control channel RX mode support */
 #define VIRTIO_NET_F_CTRL_VLAN 19      /* Control channel VLAN filtering */
 #define VIRTIO_NET_F_CTRL_RX_EXTRA 20  /* Extra RX mode control support */
+#define VIRTIO_NET_F_GUEST_ANNOUNCE 21 /* Guest can announce device on the
+                                        * network */
+#define VIRTIO_NET_F_MQ        22      /* Device supports Receive Flow
+                                        * Steering */
+#define VIRTIO_NET_F_CTRL_MAC_ADDR 23  /* Set MAC address */
 
 #define VIRTIO_NET_S_LINK_UP   1       /* Link is up */
+#define VIRTIO_NET_S_ANNOUNCE  2       /* Announcement is needed */
 
 struct virtio_net_config {
        /* The config defining mac address (if VIRTIO_NET_F_MAC) */
        __u8 mac[6];
        /* See VIRTIO_NET_F_STATUS and VIRTIO_NET_S_* above */
        __u16 status;
+       /* Maximum number of each of transmit and receive queues;
+        * see VIRTIO_NET_F_MQ and VIRTIO_NET_CTRL_MQ.
+        * Legal values are between 1 and 0x8000
+        */
+       __u16 max_virtqueue_pairs;
 } __attribute__((packed));
 
 /* This is the first element of the scatter-gather list.  If you don't
@@ -117,7 +128,7 @@ typedef __u8 virtio_net_ctrl_ack;
  #define VIRTIO_NET_CTRL_RX_NOBCAST      5
 
 /*
- * Control the MAC filter table.
+ * Control the MAC
  *
  * The MAC filter table is managed by the hypervisor, the guest should
  * assume the size is infinite.  Filtering should be considered
@@ -130,6 +141,10 @@ typedef __u8 virtio_net_ctrl_ack;
  * first sg list contains unicast addresses, the second is for multicast.
  * This functionality is present if the VIRTIO_NET_F_CTRL_RX feature
  * is available.
+ *
+ * The ADDR_SET command requests one out scatterlist, it contains a
+ * 6 bytes MAC address. This functionality is present if the
+ * VIRTIO_NET_F_CTRL_MAC_ADDR feature is available.
  */
 struct virtio_net_ctrl_mac {
        __u32 entries;
@@ -138,6 +153,7 @@ struct virtio_net_ctrl_mac {
 
 #define VIRTIO_NET_CTRL_MAC    1
  #define VIRTIO_NET_CTRL_MAC_TABLE_SET        0
+ #define VIRTIO_NET_CTRL_MAC_ADDR_SET         1
 
 /*
  * Control VLAN filtering
@@ -152,4 +168,35 @@ struct virtio_net_ctrl_mac {
  #define VIRTIO_NET_CTRL_VLAN_ADD             0
  #define VIRTIO_NET_CTRL_VLAN_DEL             1
 
+/*
+ * Control link announce acknowledgement
+ *
+ * The command VIRTIO_NET_CTRL_ANNOUNCE_ACK is used to indicate that
+ * driver has recevied the notification; device would clear the
+ * VIRTIO_NET_S_ANNOUNCE bit in the status field after it receives
+ * this command.
+ */
+#define VIRTIO_NET_CTRL_ANNOUNCE       3
+ #define VIRTIO_NET_CTRL_ANNOUNCE_ACK         0
+
+/*
+ * Control Receive Flow Steering
+ *
+ * The command VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET
+ * enables Receive Flow Steering, specifying the number of the transmit and
+ * receive queues that will be used. After the command is consumed and acked by
+ * the device, the device will not steer new packets on receive virtqueues
+ * other than specified nor read from transmit virtqueues other than specified.
+ * Accordingly, driver should not transmit new packets  on virtqueues other than
+ * specified.
+ */
+struct virtio_net_ctrl_mq {
+       __u16 virtqueue_pairs;
+};
+
+#define VIRTIO_NET_CTRL_MQ   4
+ #define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET        0
+ #define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MIN        1
+ #define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MAX        0x8000
+
 #endif /* _LINUX_VIRTIO_NET_H */
index 03dbdc2..bb88233 100644 (file)
@@ -18,4 +18,4 @@
 #define P_PGID         2
 
 
-#endif
+#endif /* _LINUX_WAIT_H */
index f26b2a8..cc61950 100644 (file)
@@ -1,363 +1,9 @@
-/*****************************************************************************
-* wanrouter.h  Definitions for the WAN Multiprotocol Router Module.
-*              This module provides API and common services for WAN Link
-*              Drivers and is completely hardware-independent.
-*
-* Author:      Nenad Corbic <ncorbic@sangoma.com>
-*              Gideon Hack     
-* Additions:   Arnaldo Melo
-*
-* Copyright:   (c) 1995-2000 Sangoma Technologies Inc.
-*
-*              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.
-* ============================================================================
-* Jul 21, 2000  Nenad Corbic   Added WAN_FT1_READY State
-* Feb 24, 2000  Nenad Corbic    Added support for socket based x25api
-* Jan 28, 2000  Nenad Corbic    Added support for the ASYNC protocol.
-* Oct 04, 1999  Nenad Corbic   Updated for 2.1.0 release
-* Jun 02, 1999  Gideon Hack    Added support for the S514 adapter.
-* May 23, 1999 Arnaldo Melo    Added local_addr to wanif_conf_t
-*                              WAN_DISCONNECTING state added
-* Jul 20, 1998 David Fong      Added Inverse ARP options to 'wanif_conf_t'
-* Jun 12, 1998 David Fong      Added Cisco HDLC support.
-* Dec 16, 1997 Jaspreet Singh  Moved 'enable_IPX' and 'network_number' to
-*                              'wanif_conf_t'
-* Dec 05, 1997 Jaspreet Singh  Added 'pap', 'chap' to 'wanif_conf_t'
-*                              Added 'authenticator' to 'wan_ppp_conf_t'
-* Nov 06, 1997 Jaspreet Singh  Changed Router Driver version to 1.1 from 1.0
-* Oct 20, 1997 Jaspreet Singh  Added 'cir','bc','be' and 'mc' to 'wanif_conf_t'
-*                              Added 'enable_IPX' and 'network_number' to 
-*                              'wan_device_t'.  Also added defines for
-*                              UDP PACKET TYPE, Interrupt test, critical values
-*                              for RACE conditions.
-* Oct 05, 1997 Jaspreet Singh  Added 'dlci_num' and 'dlci[100]' to 
-*                              'wan_fr_conf_t' to configure a list of dlci(s)
-*                              for a NODE 
-* Jul 07, 1997 Jaspreet Singh  Added 'ttl' to 'wandev_conf_t' & 'wan_device_t'
-* May 29, 1997         Jaspreet Singh  Added 'tx_int_enabled' to 'wan_device_t'
-* May 21, 1997 Jaspreet Singh  Added 'udp_port' to 'wan_device_t'
-* Apr 25, 1997  Farhan Thawar   Added 'udp_port' to 'wandev_conf_t'
-* Jan 16, 1997 Gene Kozin      router_devlist made public
-* Jan 02, 1997 Gene Kozin      Initial version (based on wanpipe.h).
-*****************************************************************************/
-
-#ifndef        _ROUTER_H
-#define        _ROUTER_H
-
-#define        ROUTER_NAME     "wanrouter"     /* in case we ever change it */
-#define        ROUTER_VERSION  1               /* version number */
-#define        ROUTER_RELEASE  1               /* release (minor version) number */
-#define        ROUTER_IOCTL    'W'             /* for IOCTL calls */
-#define        ROUTER_MAGIC    0x524D4157L     /* signature: 'WANR' reversed */
-
-/* IOCTL codes for /proc/router/<device> entries (up to 255) */
-enum router_ioctls
-{
-       ROUTER_SETUP    = ROUTER_IOCTL<<8,      /* configure device */
-       ROUTER_DOWN,                            /* shut down device */
-       ROUTER_STAT,                            /* get device status */
-       ROUTER_IFNEW,                           /* add interface */
-       ROUTER_IFDEL,                           /* delete interface */
-       ROUTER_IFSTAT,                          /* get interface status */
-       ROUTER_USER     = (ROUTER_IOCTL<<8)+16, /* driver-specific calls */
-       ROUTER_USER_MAX = (ROUTER_IOCTL<<8)+31
-};
-
-/* identifiers for displaying proc file data for dual port adapters */
-#define PROC_DATA_PORT_0 0x8000        /* the data is for port 0 */
-#define PROC_DATA_PORT_1 0x8001        /* the data is for port 1 */
-
-/* NLPID for packet encapsulation (ISO/IEC TR 9577) */
-#define        NLPID_IP        0xCC    /* Internet Protocol Datagram */
-#define        NLPID_SNAP      0x80    /* IEEE Subnetwork Access Protocol */
-#define        NLPID_CLNP      0x81    /* ISO/IEC 8473 */
-#define        NLPID_ESIS      0x82    /* ISO/IEC 9542 */
-#define        NLPID_ISIS      0x83    /* ISO/IEC ISIS */
-#define        NLPID_Q933      0x08    /* CCITT Q.933 */
-
-/* Miscellaneous */
-#define        WAN_IFNAME_SZ   15      /* max length of the interface name */
-#define        WAN_DRVNAME_SZ  15      /* max length of the link driver name */
-#define        WAN_ADDRESS_SZ  31      /* max length of the WAN media address */
-#define USED_BY_FIELD  8       /* max length of the used by field */
-
-/* Defines for UDP PACKET TYPE */
-#define UDP_PTPIPE_TYPE        0x01
-#define UDP_FPIPE_TYPE         0x02
-#define UDP_CPIPE_TYPE         0x03
-#define UDP_DRVSTATS_TYPE      0x04
-#define UDP_INVALID_TYPE       0x05
-
-/* Command return code */
-#define CMD_OK         0               /* normal firmware return code */
-#define CMD_TIMEOUT    0xFF            /* firmware command timed out */
-
-/* UDP Packet Management */
-#define UDP_PKT_FRM_STACK      0x00
-#define UDP_PKT_FRM_NETWORK    0x01
-
-/* Maximum interrupt test counter */
-#define MAX_INTR_TEST_COUNTER  100
-
-/* Critical Values for RACE conditions*/
-#define CRITICAL_IN_ISR                0xA1
-#define CRITICAL_INTR_HANDLED  0xB1
-
-/****** Data Types **********************************************************/
-
-/*----------------------------------------------------------------------------
- * X.25-specific link-level configuration.
- */
-typedef struct wan_x25_conf
-{
-       unsigned lo_pvc;        /* lowest permanent circuit number */
-       unsigned hi_pvc;        /* highest permanent circuit number */
-       unsigned lo_svc;        /* lowest switched circuit number */
-       unsigned hi_svc;        /* highest switched circuit number */
-       unsigned hdlc_window;   /* HDLC window size (1..7) */
-       unsigned pkt_window;    /* X.25 packet window size (1..7) */
-       unsigned t1;            /* HDLC timer T1, sec (1..30) */
-       unsigned t2;            /* HDLC timer T2, sec (0..29) */
-       unsigned t4;            /* HDLC supervisory frame timer = T4 * T1 */
-       unsigned n2;            /* HDLC retransmission limit (1..30) */
-       unsigned t10_t20;       /* X.25 RESTART timeout, sec (1..255) */
-       unsigned t11_t21;       /* X.25 CALL timeout, sec (1..255) */
-       unsigned t12_t22;       /* X.25 RESET timeout, sec (1..255) */
-       unsigned t13_t23;       /* X.25 CLEAR timeout, sec (1..255) */
-       unsigned t16_t26;       /* X.25 INTERRUPT timeout, sec (1..255) */
-       unsigned t28;           /* X.25 REGISTRATION timeout, sec (1..255) */
-       unsigned r10_r20;       /* RESTART retransmission limit (0..250) */
-       unsigned r12_r22;       /* RESET retransmission limit (0..250) */
-       unsigned r13_r23;       /* CLEAR retransmission limit (0..250) */
-       unsigned ccitt_compat;  /* compatibility mode: 1988/1984/1980 */
-       unsigned x25_conf_opt;   /* User defined x25 config optoins */
-       unsigned char LAPB_hdlc_only; /* Run in HDLC only mode */
-       unsigned char logging;   /* Control connection logging */  
-       unsigned char oob_on_modem; /* Whether to send modem status to the user app */
-} wan_x25_conf_t;
-
-/*----------------------------------------------------------------------------
- * Frame relay specific link-level configuration.
- */
-typedef struct wan_fr_conf
-{
-       unsigned signalling;    /* local in-channel signalling type */
-       unsigned t391;          /* link integrity verification timer */
-       unsigned t392;          /* polling verification timer */
-       unsigned n391;          /* full status polling cycle counter */
-       unsigned n392;          /* error threshold counter */
-       unsigned n393;          /* monitored events counter */
-       unsigned dlci_num;      /* number of DLCs (access node) */
-       unsigned  dlci[100];    /* List of all DLCIs */
-} wan_fr_conf_t;
-
-/*----------------------------------------------------------------------------
- * PPP-specific link-level configuration.
- */
-typedef struct wan_ppp_conf
-{
-       unsigned restart_tmr;   /* restart timer */
-       unsigned auth_rsrt_tmr; /* authentication timer */
-       unsigned auth_wait_tmr; /* authentication timer */
-       unsigned mdm_fail_tmr;  /* modem failure timer */
-       unsigned dtr_drop_tmr;  /* DTR drop timer */
-       unsigned connect_tmout; /* connection timeout */
-       unsigned conf_retry;    /* max. retry */
-       unsigned term_retry;    /* max. retry */
-       unsigned fail_retry;    /* max. retry */
-       unsigned auth_retry;    /* max. retry */
-       unsigned auth_options;  /* authentication opt. */
-       unsigned ip_options;    /* IP options */
-       char    authenticator;  /* AUTHENTICATOR or not */
-       char    ip_mode;        /* Static/Host/Peer */
-} wan_ppp_conf_t;
-
-/*----------------------------------------------------------------------------
- * CHDLC-specific link-level configuration.
- */
-typedef struct wan_chdlc_conf
-{
-       unsigned char ignore_dcd;       /* Protocol options:            */
-       unsigned char ignore_cts;       /*  Ignore these to determine   */
-       unsigned char ignore_keepalive; /*  link status (Yes or No)     */
-       unsigned char hdlc_streaming;   /*  hdlc_streaming mode (Y/N) */
-       unsigned char receive_only;     /*  no transmit buffering (Y/N) */
-       unsigned keepalive_tx_tmr;      /* transmit keepalive timer */
-       unsigned keepalive_rx_tmr;      /* receive  keepalive timer */
-       unsigned keepalive_err_margin;  /* keepalive_error_tolerance */
-       unsigned slarp_timer;           /* SLARP request timer */
-} wan_chdlc_conf_t;
-
-
-/*----------------------------------------------------------------------------
- * WAN device configuration. Passed to ROUTER_SETUP IOCTL.
- */
-typedef struct wandev_conf
-{
-       unsigned magic;         /* magic number (for verification) */
-       unsigned config_id;     /* configuration structure identifier */
-                               /****** hardware configuration ******/
-       unsigned ioport;        /* adapter I/O port base */
-       unsigned long maddr;    /* dual-port memory address */
-       unsigned msize;         /* dual-port memory size */
-       int irq;                /* interrupt request level */
-       int dma;                /* DMA request level */
-        char S514_CPU_no[1];   /* S514 PCI adapter CPU number ('A' or 'B') */
-        unsigned PCI_slot_no;  /* S514 PCI adapter slot number */
-       char auto_pci_cfg;      /* S515 PCI automatic slot detection */
-       char comm_port;         /* Communication Port (PRI=0, SEC=1) */ 
-       unsigned bps;           /* data transfer rate */
-       unsigned mtu;           /* maximum transmit unit size */
-        unsigned udp_port;      /* UDP port for management */
-       unsigned char ttl;      /* Time To Live for UDP security */
-       unsigned char ft1;      /* FT1 Configurator Option */
-        char interface;                /* RS-232/V.35, etc. */
-       char clocking;          /* external/internal */
-       char line_coding;       /* NRZ/NRZI/FM0/FM1, etc. */
-       char station;           /* DTE/DCE, primary/secondary, etc. */
-       char connection;        /* permanent/switched/on-demand */
-       char read_mode;         /* read mode: Polling or interrupt */
-       char receive_only;      /* disable tx buffers */
-       char tty;               /* Create a fake tty device */
-       unsigned tty_major;     /* Major number for wanpipe tty device */
-       unsigned tty_minor;     /* Minor number for wanpipe tty device */
-       unsigned tty_mode;      /* TTY operation mode SYNC or ASYNC */
-       char backup;            /* Backup Mode */
-       unsigned hw_opt[4];     /* other hardware options */
-       unsigned reserved[4];
-                               /****** arbitrary data ***************/
-       unsigned data_size;     /* data buffer size */
-       void* data;             /* data buffer, e.g. firmware */
-       union                   /****** protocol-specific ************/
-       {
-               wan_x25_conf_t x25;     /* X.25 configuration */
-               wan_ppp_conf_t ppp;     /* PPP configuration */
-               wan_fr_conf_t fr;       /* frame relay configuration */
-               wan_chdlc_conf_t chdlc; /* Cisco HDLC configuration */
-       } u;
-} wandev_conf_t;
-
-/* 'config_id' definitions */
-#define        WANCONFIG_X25   101     /* X.25 link */
-#define        WANCONFIG_FR    102     /* frame relay link */
-#define        WANCONFIG_PPP   103     /* synchronous PPP link */
-#define WANCONFIG_CHDLC        104     /* Cisco HDLC Link */
-#define WANCONFIG_BSC  105     /* BiSync Streaming */
-#define WANCONFIG_HDLC 106     /* HDLC Support */
-#define WANCONFIG_MPPP  107    /* Multi Port PPP over RAW CHDLC */
-
 /*
- * Configuration options defines.
+ * wanrouter.h Legacy declarations kept around until X25 is removed
  */
-/* general options */
-#define        WANOPT_OFF      0
-#define        WANOPT_ON       1
-#define        WANOPT_NO       0
-#define        WANOPT_YES      1
-
-/* intercace options */
-#define        WANOPT_RS232    0
-#define        WANOPT_V35      1
-
-/* data encoding options */
-#define        WANOPT_NRZ      0
-#define        WANOPT_NRZI     1
-#define        WANOPT_FM0      2
-#define        WANOPT_FM1      3
-
-/* link type options */
-#define        WANOPT_POINTTOPOINT     0       /* RTS always active */
-#define        WANOPT_MULTIDROP        1       /* RTS is active when transmitting */
-
-/* clocking options */
-#define        WANOPT_EXTERNAL 0
-#define        WANOPT_INTERNAL 1
-
-/* station options */
-#define        WANOPT_DTE              0
-#define        WANOPT_DCE              1
-#define        WANOPT_CPE              0
-#define        WANOPT_NODE             1
-#define        WANOPT_SECONDARY        0
-#define        WANOPT_PRIMARY          1
-
-/* connection options */
-#define        WANOPT_PERMANENT        0       /* DTR always active */
-#define        WANOPT_SWITCHED         1       /* use DTR to setup link (dial-up) */
-#define        WANOPT_ONDEMAND         2       /* activate DTR only before sending */
-
-/* frame relay in-channel signalling */
-#define        WANOPT_FR_ANSI          1       /* ANSI T1.617 Annex D */
-#define        WANOPT_FR_Q933          2       /* ITU Q.933A */
-#define        WANOPT_FR_LMI           3       /* LMI */
-
-/* PPP IP Mode Options */
-#define        WANOPT_PPP_STATIC       0
-#define        WANOPT_PPP_HOST         1
-#define        WANOPT_PPP_PEER         2
-
-/* ASY Mode Options */
-#define WANOPT_ONE             1
-#define WANOPT_TWO             2
-#define WANOPT_ONE_AND_HALF    3
-
-#define WANOPT_NONE    0
-#define WANOPT_ODD      1
-#define WANOPT_EVEN    2
-
-/* CHDLC Protocol Options */
-/* DF Commented out for now.
-
-#define WANOPT_CHDLC_NO_DCD            IGNORE_DCD_FOR_LINK_STAT
-#define WANOPT_CHDLC_NO_CTS            IGNORE_CTS_FOR_LINK_STAT
-#define WANOPT_CHDLC_NO_KEEPALIVE      IGNORE_KPALV_FOR_LINK_STAT
-*/
 
-/* Port options */
-#define WANOPT_PRI 0
-#define WANOPT_SEC 1
-/* read mode */
-#define        WANOPT_INTR     0
-#define WANOPT_POLL    1
-
-
-#define WANOPT_TTY_SYNC  0
-#define WANOPT_TTY_ASYNC 1
-/*----------------------------------------------------------------------------
- * WAN Link Status Info (for ROUTER_STAT IOCTL).
- */
-typedef struct wandev_stat
-{
-       unsigned state;         /* link state */
-       unsigned ndev;          /* number of configured interfaces */
-
-       /* link/interface configuration */
-       unsigned connection;    /* permanent/switched/on-demand */
-       unsigned media_type;    /* Frame relay/PPP/X.25/SDLC, etc. */
-       unsigned mtu;           /* max. transmit unit for this device */
-
-       /* physical level statistics */
-       unsigned modem_status;  /* modem status */
-       unsigned rx_frames;     /* received frames count */
-       unsigned rx_overruns;   /* receiver overrun error count */
-       unsigned rx_crc_err;    /* receive CRC error count */
-       unsigned rx_aborts;     /* received aborted frames count */
-       unsigned rx_bad_length; /* unexpetedly long/short frames count */
-       unsigned rx_dropped;    /* frames discarded at device level */
-       unsigned tx_frames;     /* transmitted frames count */
-       unsigned tx_underruns;  /* aborted transmissions (underruns) count */
-       unsigned tx_timeouts;   /* transmission timeouts */
-       unsigned tx_rejects;    /* other transmit errors */
-
-       /* media level statistics */
-       unsigned rx_bad_format; /* frames with invalid format */
-       unsigned rx_bad_addr;   /* frames with invalid media address */
-       unsigned tx_retries;    /* frames re-transmitted */
-       unsigned reserved[16];  /* reserved for future use */
-} wandev_stat_t;
+#ifndef _ROUTER_H
+#define _ROUTER_H
 
 /* 'state' defines */
 enum wan_states
@@ -365,88 +11,7 @@ enum wan_states
        WAN_UNCONFIGURED,       /* link/channel is not configured */
        WAN_DISCONNECTED,       /* link/channel is disconnected */
        WAN_CONNECTING,         /* connection is in progress */
-       WAN_CONNECTED,          /* link/channel is operational */
-       WAN_LIMIT,              /* for verification only */
-       WAN_DUALPORT,           /* for Dual Port cards */
-       WAN_DISCONNECTING,
-       WAN_FT1_READY           /* FT1 Configurator Ready */
+       WAN_CONNECTED           /* link/channel is operational */
 };
 
-enum {
-       WAN_LOCAL_IP,
-       WAN_POINTOPOINT_IP,
-       WAN_NETMASK_IP,
-       WAN_BROADCAST_IP
-};
-
-/* 'modem_status' masks */
-#define        WAN_MODEM_CTS   0x0001  /* CTS line active */
-#define        WAN_MODEM_DCD   0x0002  /* DCD line active */
-#define        WAN_MODEM_DTR   0x0010  /* DTR line active */
-#define        WAN_MODEM_RTS   0x0020  /* RTS line active */
-
-/*----------------------------------------------------------------------------
- * WAN interface (logical channel) configuration (for ROUTER_IFNEW IOCTL).
- */
-typedef struct wanif_conf
-{
-       unsigned magic;                 /* magic number */
-       unsigned config_id;             /* configuration identifier */
-       char name[WAN_IFNAME_SZ+1];     /* interface name, ASCIIZ */
-       char addr[WAN_ADDRESS_SZ+1];    /* media address, ASCIIZ */
-       char usedby[USED_BY_FIELD];     /* used by API or WANPIPE */
-       unsigned idle_timeout;          /* sec, before disconnecting */
-       unsigned hold_timeout;          /* sec, before re-connecting */
-       unsigned cir;                   /* Committed Information Rate fwd,bwd*/
-       unsigned bc;                    /* Committed Burst Size fwd, bwd */
-       unsigned be;                    /* Excess Burst Size fwd, bwd */ 
-       unsigned char enable_IPX;       /* Enable or Disable IPX */
-       unsigned char inarp;            /* Send Inverse ARP requests Y/N */
-       unsigned inarp_interval;        /* sec, between InARP requests */
-       unsigned long network_number;   /* Network Number for IPX */
-       char mc;                        /* Multicast on or off */
-       char local_addr[WAN_ADDRESS_SZ+1];/* local media address, ASCIIZ */
-       unsigned char port;             /* board port */
-       unsigned char protocol;         /* prococol used in this channel (TCPOX25 or X25) */
-       char pap;                       /* PAP enabled or disabled */
-       char chap;                      /* CHAP enabled or disabled */
-       unsigned char userid[511];      /* List of User Id */
-       unsigned char passwd[511];      /* List of passwords */
-       unsigned char sysname[31];      /* Name of the system */
-       unsigned char ignore_dcd;       /* Protocol options: */
-       unsigned char ignore_cts;       /*  Ignore these to determine */
-       unsigned char ignore_keepalive; /*  link status (Yes or No) */
-       unsigned char hdlc_streaming;   /*  Hdlc streaming mode (Y/N) */
-       unsigned keepalive_tx_tmr;      /* transmit keepalive timer */
-       unsigned keepalive_rx_tmr;      /* receive  keepalive timer */
-       unsigned keepalive_err_margin;  /* keepalive_error_tolerance */
-       unsigned slarp_timer;           /* SLARP request timer */
-       unsigned char ttl;              /* Time To Live for UDP security */
-       char interface;                 /* RS-232/V.35, etc. */
-       char clocking;                  /* external/internal */
-       unsigned bps;                   /* data transfer rate */
-       unsigned mtu;                   /* maximum transmit unit size */
-       unsigned char if_down;          /* brind down interface when disconnected */
-       unsigned char gateway;          /* Is this interface a gateway */
-       unsigned char true_if_encoding; /* Set the dev->type to true board protocol */
-
-       unsigned char asy_data_trans;     /* async API options */
-        unsigned char rts_hs_for_receive; /* async Protocol options */
-        unsigned char xon_xoff_hs_for_receive;
-       unsigned char xon_xoff_hs_for_transmit;
-       unsigned char dcd_hs_for_transmit;
-       unsigned char cts_hs_for_transmit;
-       unsigned char async_mode;
-       unsigned tx_bits_per_char;
-       unsigned rx_bits_per_char;
-       unsigned stop_bits;  
-       unsigned char parity;
-       unsigned break_timer;
-        unsigned inter_char_timer;
-       unsigned rx_complete_length;
-       unsigned xon_char;
-       unsigned xoff_char;
-       unsigned char receive_only;     /*  no transmit buffering (Y/N) */
-} wanif_conf_t;
-
-#endif /* _ROUTER_H */
+#endif /* _ROUTER_H */
index 5bc0c62..a89ed11 100644 (file)
@@ -45,6 +45,8 @@ struct watchdog_info {
 #define        WDIOF_SETTIMEOUT        0x0080  /* Set timeout (in seconds) */
 #define        WDIOF_MAGICCLOSE        0x0100  /* Supports magic close char */
 #define        WDIOF_PRETIMEOUT        0x0200  /* Pretimeout (in seconds), get/set */
+#define        WDIOF_ALARMONLY         0x0400  /* Watchdog triggers a management or
+                                          other external alarm not a reboot */
 #define        WDIOF_KEEPALIVEPING     0x8000  /* Keep alive ping reply */
 
 #define        WDIOS_DISABLECARD       0x0001  /* Turn off the watchdog timer */
@@ -52,4 +54,4 @@ struct watchdog_info {
 #define        WDIOS_TEMPPANIC         0x0004  /* Kernel panic on temperature trip */
 
 
-#endif  /* ifndef _LINUX_WATCHDOG_H */
+#endif /* _LINUX_WATCHDOG_H */
index 2c6426b..ad9839f 100644 (file)
@@ -1125,4 +1125,4 @@ struct iw_event
 #define IW_EV_QUAL_PK_LEN      (IW_EV_LCP_PK_LEN + sizeof(struct iw_quality))
 #define IW_EV_POINT_PK_LEN     (IW_EV_LCP_PK_LEN + 4)
 
-#endif /* _LINUX_WIRELESS_H */
+#endif /* _LINUX_WIRELESS_H */
index ac62537..4b00c10 100644 (file)
 
 /* Namespaces */
 #define XATTR_OS2_PREFIX "os2."
-#define XATTR_OS2_PREFIX_LEN (sizeof (XATTR_OS2_PREFIX) - 1)
+#define XATTR_OS2_PREFIX_LEN (sizeof(XATTR_OS2_PREFIX) - 1)
+
+#define XATTR_MAC_OSX_PREFIX "osx."
+#define XATTR_MAC_OSX_PREFIX_LEN (sizeof(XATTR_MAC_OSX_PREFIX) - 1)
 
 #define XATTR_SECURITY_PREFIX  "security."
-#define XATTR_SECURITY_PREFIX_LEN (sizeof (XATTR_SECURITY_PREFIX) - 1)
+#define XATTR_SECURITY_PREFIX_LEN (sizeof(XATTR_SECURITY_PREFIX) - 1)
 
 #define XATTR_SYSTEM_PREFIX "system."
-#define XATTR_SYSTEM_PREFIX_LEN (sizeof (XATTR_SYSTEM_PREFIX) - 1)
+#define XATTR_SYSTEM_PREFIX_LEN (sizeof(XATTR_SYSTEM_PREFIX) - 1)
 
 #define XATTR_TRUSTED_PREFIX "trusted."
-#define XATTR_TRUSTED_PREFIX_LEN (sizeof (XATTR_TRUSTED_PREFIX) - 1)
+#define XATTR_TRUSTED_PREFIX_LEN (sizeof(XATTR_TRUSTED_PREFIX) - 1)
 
 #define XATTR_USER_PREFIX "user."
-#define XATTR_USER_PREFIX_LEN (sizeof (XATTR_USER_PREFIX) - 1)
+#define XATTR_USER_PREFIX_LEN (sizeof(XATTR_USER_PREFIX) - 1)
 
 /* Security namespace */
 #define XATTR_EVM_SUFFIX "evm"
 #define XATTR_NAME_EVM XATTR_SECURITY_PREFIX XATTR_EVM_SUFFIX
 
+#define XATTR_IMA_SUFFIX "ima"
+#define XATTR_NAME_IMA XATTR_SECURITY_PREFIX XATTR_IMA_SUFFIX
+
 #define XATTR_SELINUX_SUFFIX "selinux"
 #define XATTR_NAME_SELINUX XATTR_SECURITY_PREFIX XATTR_SELINUX_SUFFIX
 
@@ -58,4 +64,4 @@
 #define XATTR_NAME_POSIX_ACL_DEFAULT XATTR_SYSTEM_PREFIX XATTR_POSIX_ACL_DEFAULT
 
 
-#endif /* _LINUX_XATTR_H */
+#endif /* _LINUX_XATTR_H */
index 0aa3805..341c3c9 100644 (file)
@@ -84,6 +84,8 @@ struct xfrm_replay_state {
        __u32   bitmap;
 };
 
+#define XFRMA_REPLAY_ESN_MAX   4096
+
 struct xfrm_replay_state_esn {
        unsigned int    bmp_len;
        __u32           oseq;
@@ -295,6 +297,7 @@ enum xfrm_attr_type_t {
        XFRMA_MARK,             /* struct xfrm_mark */
        XFRMA_TFCPAD,           /* __u32 */
        XFRMA_REPLAY_ESN_VAL,   /* struct xfrm_replay_esn */
+       XFRMA_SA_EXTRA_FLAGS,   /* __u32 */
        __XFRMA_MAX
 
 #define XFRMA_MAX (__XFRMA_MAX - 1)
@@ -365,6 +368,8 @@ struct xfrm_usersa_info {
 #define XFRM_STATE_ESN         128
 };
 
+#define XFRM_SA_XFLAG_DONT_ENCAP_DSCP  1
+
 struct xfrm_usersa_id {
        xfrm_address_t                  daddr;
        __be32                          spi;
index cce1993..a12c884 100644 (file)
 #define UBI_MAX_RNVOL 32
 
 /*
- * UBI data type hint constants.
- *
- * UBI_LONGTERM: long-term data
- * UBI_SHORTTERM: short-term data
- * UBI_UNKNOWN: data persistence is unknown
- *
- * These constants are used when data is written to UBI volumes in order to
- * help the UBI wear-leveling unit to find more appropriate physical
- * eraseblocks.
- */
-enum {
-       UBI_LONGTERM  = 1,
-       UBI_SHORTTERM = 2,
-       UBI_UNKNOWN   = 3,
-};
-
-/*
  * UBI volume type constants.
  *
  * @UBI_DYNAMIC_VOLUME: dynamic volume
@@ -239,6 +222,7 @@ enum {
  * @ubi_num: UBI device number to create
  * @mtd_num: MTD device number to attach
  * @vid_hdr_offset: VID header offset (use defaults if %0)
+ * @max_beb_per1024: maximum expected number of bad PEB per 1024 PEBs
  * @padding: reserved for future, not used, has to be zeroed
  *
  * This data structure is used to specify MTD device UBI has to attach and the
@@ -262,12 +246,25 @@ enum {
  * be 2KiB-64 bytes = 1984. Note, that this position is not even 512-bytes
  * aligned, which is OK, as UBI is clever enough to realize this is 4th
  * sub-page of the first page and add needed padding.
+ *
+ * The @max_beb_per1024 is the maximum amount of bad PEBs UBI expects on the
+ * UBI device per 1024 eraseblocks.  This value is often given in an other form
+ * in the NAND datasheet (min NVB i.e. minimal number of valid blocks). The
+ * maximum expected bad eraseblocks per 1024 is then:
+ *    1024 * (1 - MinNVB / MaxNVB)
+ * Which gives 20 for most NAND devices.  This limit is used in order to derive
+ * amount of eraseblock UBI reserves for handling new bad blocks. If the device
+ * has more bad eraseblocks than this limit, UBI does not reserve any physical
+ * eraseblocks for new bad eraseblocks, but attempts to use available
+ * eraseblocks (if any). The accepted range is 0-768. If 0 is given, the
+ * default kernel value of %CONFIG_MTD_UBI_BEB_LIMIT will be used.
  */
 struct ubi_attach_req {
        __s32 ubi_num;
        __s32 mtd_num;
        __s32 vid_hdr_offset;
-       __s8 padding[12];
+       __s16 max_beb_per1024;
+       __s8 padding[10];
 };
 
 /**
@@ -375,25 +372,34 @@ struct ubi_rnvol_req {
  *                             requests.
  * @lnum: logical eraseblock number to change
  * @bytes: how many bytes will be written to the logical eraseblock
- * @dtype: data type (%UBI_LONGTERM, %UBI_SHORTTERM, %UBI_UNKNOWN)
+ * @dtype: pass "3" for better compatibility with old kernels
  * @padding: reserved for future, not used, has to be zeroed
+ *
+ * The @dtype field used to inform UBI about what kind of data will be written
+ * to the LEB: long term (value 1), short term (value 2), unknown (value 3).
+ * UBI tried to pick a PEB with lower erase counter for short term data and a
+ * PEB with higher erase counter for long term data. But this was not really
+ * used because users usually do not know this and could easily mislead UBI. We
+ * removed this feature in May 2012. UBI currently just ignores the @dtype
+ * field. But for better compatibility with older kernels it is recommended to
+ * set @dtype to 3 (unknown).
  */
 struct ubi_leb_change_req {
        __s32 lnum;
        __s32 bytes;
-       __s8  dtype;
+       __s8  dtype; /* obsolete, do not use! */
        __s8  padding[7];
 } __attribute__((packed));
 
 /**
  * struct ubi_map_req - a data structure used in map LEB requests.
+ * @dtype: pass "3" for better compatibility with old kernels
  * @lnum: logical eraseblock number to unmap
- * @dtype: data type (%UBI_LONGTERM, %UBI_SHORTTERM, %UBI_UNKNOWN)
  * @padding: reserved for future, not used, has to be zeroed
  */
 struct ubi_map_req {
        __s32 lnum;
-       __s8  dtype;
+       __s8  dtype; /* obsolete, do not use! */
        __s8  padding[3];
 } __attribute__((packed));
 
index 81aba3a..805711e 100644 (file)
@@ -261,6 +261,22 @@ struct ib_uverbs_dereg_mr {
        __u32 mr_handle;
 };
 
+struct ib_uverbs_alloc_mw {
+       __u64 response;
+       __u32 pd_handle;
+       __u8  mw_type;
+       __u8  reserved[3];
+};
+
+struct ib_uverbs_alloc_mw_resp {
+       __u32 mw_handle;
+       __u32 rkey;
+};
+
+struct ib_uverbs_dealloc_mw {
+       __u32 mw_handle;
+};
+
 struct ib_uverbs_create_comp_channel {
        __u64 response;
 };
index 5348a00..1ee9239 100644 (file)
@@ -224,6 +224,7 @@ enum {
 enum {
        RDMA_OPTION_ID_TOS       = 0,
        RDMA_OPTION_ID_REUSEADDR = 1,
+       RDMA_OPTION_ID_AFONLY    = 2,
        RDMA_OPTION_IB_PATH      = 1
 };
 
index 91a4e4f..3031b90 100644 (file)
@@ -26,8 +26,6 @@
  * This file intended to be included by both kernel and user space
  */
 
-#include <scsi/scsi.h>
-
 /*
  * FC Transport SGIO v4 BSG Message Support
  */
index b6a47e2..62b4eda 100644 (file)
@@ -119,7 +119,5 @@ struct scsi_nl_host_vendor_msg {
        (hdr)->msglen = mlen;                                   \
        }
 
-
-
 #endif /* SCSI_NETLINK_H */
 
index 3fd93a6..2cc8ac6 100644 (file)
@@ -54,6 +54,20 @@ struct snd_aes_iec958 {
 
 /****************************************************************************
  *                                                                          *
+ *        CEA-861 Audio InfoFrame. Used in HDMI and DisplayPort                    *
+ *                                                                          *
+ ****************************************************************************/
+
+struct snd_cea_861_aud_if {
+       unsigned char db1_ct_cc; /* coding type and channel count */
+       unsigned char db2_sf_ss; /* sample frequency and size */
+       unsigned char db3; /* not used, all zeros */
+       unsigned char db4_ca; /* channel allocation code */
+       unsigned char db5_dminh_lsv; /* downmix inhibit & level-shit values */
+};
+
+/****************************************************************************
+ *                                                                          *
  *      Section for driver hardware dependent interface - /dev/snd/hw?      *
  *                                                                          *
  ****************************************************************************/
@@ -122,7 +136,7 @@ struct snd_hwdep_dsp_image {
  *                                                                           *
  *****************************************************************************/
 
-#define SNDRV_PCM_VERSION              SNDRV_PROTOCOL_VERSION(2, 0, 10)
+#define SNDRV_PCM_VERSION              SNDRV_PROTOCOL_VERSION(2, 0, 11)
 
 typedef unsigned long snd_pcm_uframes_t;
 typedef signed long snd_pcm_sframes_t;
@@ -200,7 +214,9 @@ typedef int __bitwise snd_pcm_format_t;
 #define        SNDRV_PCM_FORMAT_G723_24_1B     ((snd_pcm_format_t) 45) /* 1 sample in 1 byte */
 #define        SNDRV_PCM_FORMAT_G723_40        ((snd_pcm_format_t) 46) /* 8 Samples in 5 bytes */
 #define        SNDRV_PCM_FORMAT_G723_40_1B     ((snd_pcm_format_t) 47) /* 1 sample in 1 byte */
-#define        SNDRV_PCM_FORMAT_LAST           SNDRV_PCM_FORMAT_G723_40_1B
+#define        SNDRV_PCM_FORMAT_DSD_U8         ((snd_pcm_format_t) 48) /* DSD, 1-byte samples DSD (x8) */
+#define        SNDRV_PCM_FORMAT_DSD_U16_LE     ((snd_pcm_format_t) 49) /* DSD, 2-byte samples DSD (x16), little endian */
+#define        SNDRV_PCM_FORMAT_LAST           SNDRV_PCM_FORMAT_DSD_U16_LE
 
 #ifdef SNDRV_LITTLE_ENDIAN
 #define        SNDRV_PCM_FORMAT_S16            SNDRV_PCM_FORMAT_S16_LE
@@ -244,6 +260,7 @@ typedef int __bitwise snd_pcm_subformat_t;
 #define SNDRV_PCM_INFO_JOINT_DUPLEX    0x00200000      /* playback and capture stream are somewhat correlated */
 #define SNDRV_PCM_INFO_SYNC_START      0x00400000      /* pcm support some kind of sync go */
 #define SNDRV_PCM_INFO_NO_PERIOD_WAKEUP        0x00800000      /* period wakeup can be disabled */
+#define SNDRV_PCM_INFO_HAS_WALL_CLOCK   0x01000000      /* has audio wall clock for audio/system time sync */
 #define SNDRV_PCM_INFO_FIFO_IN_FRAMES  0x80000000      /* internal kernel flag - FIFO size is in frames */
 
 typedef int __bitwise snd_pcm_state_t;
@@ -392,7 +409,9 @@ struct snd_pcm_status {
        snd_pcm_uframes_t avail_max;    /* max frames available on hw since last status */
        snd_pcm_uframes_t overrange;    /* count of ADC (capture) overrange detections from last status */
        snd_pcm_state_t suspended_state; /* suspended stream state */
-       unsigned char reserved[60];     /* must be filled with zero */
+       __u32 reserved_alignment;       /* must be filled with zero */
+       struct timespec audio_tstamp;   /* from sample counter or wall clock */
+       unsigned char reserved[56-sizeof(struct timespec)]; /* must be filled with zero */
 };
 
 struct snd_pcm_mmap_status {
@@ -401,6 +420,7 @@ struct snd_pcm_mmap_status {
        snd_pcm_uframes_t hw_ptr;       /* RO: hw ptr (0...boundary-1) */
        struct timespec tstamp;         /* Timestamp */
        snd_pcm_state_t suspended_state; /* RO: suspended stream state */
+       struct timespec audio_tstamp;   /* from sample counter or wall clock */
 };
 
 struct snd_pcm_mmap_control {
@@ -442,6 +462,55 @@ enum {
        SNDRV_PCM_TSTAMP_TYPE_LAST = SNDRV_PCM_TSTAMP_TYPE_MONOTONIC,
 };
 
+/* channel positions */
+enum {
+       SNDRV_CHMAP_UNKNOWN = 0,
+       SNDRV_CHMAP_NA,         /* N/A, silent */
+       SNDRV_CHMAP_MONO,       /* mono stream */
+       /* this follows the alsa-lib mixer channel value + 3 */
+       SNDRV_CHMAP_FL,         /* front left */
+       SNDRV_CHMAP_FR,         /* front right */
+       SNDRV_CHMAP_RL,         /* rear left */
+       SNDRV_CHMAP_RR,         /* rear right */
+       SNDRV_CHMAP_FC,         /* front center */
+       SNDRV_CHMAP_LFE,        /* LFE */
+       SNDRV_CHMAP_SL,         /* side left */
+       SNDRV_CHMAP_SR,         /* side right */
+       SNDRV_CHMAP_RC,         /* rear center */
+       /* new definitions */
+       SNDRV_CHMAP_FLC,        /* front left center */
+       SNDRV_CHMAP_FRC,        /* front right center */
+       SNDRV_CHMAP_RLC,        /* rear left center */
+       SNDRV_CHMAP_RRC,        /* rear right center */
+       SNDRV_CHMAP_FLW,        /* front left wide */
+       SNDRV_CHMAP_FRW,        /* front right wide */
+       SNDRV_CHMAP_FLH,        /* front left high */
+       SNDRV_CHMAP_FCH,        /* front center high */
+       SNDRV_CHMAP_FRH,        /* front right high */
+       SNDRV_CHMAP_TC,         /* top center */
+       SNDRV_CHMAP_TFL,        /* top front left */
+       SNDRV_CHMAP_TFR,        /* top front right */
+       SNDRV_CHMAP_TFC,        /* top front center */
+       SNDRV_CHMAP_TRL,        /* top rear left */
+       SNDRV_CHMAP_TRR,        /* top rear right */
+       SNDRV_CHMAP_TRC,        /* top rear center */
+       /* new definitions for UAC2 */
+       SNDRV_CHMAP_TFLC,       /* top front left center */
+       SNDRV_CHMAP_TFRC,       /* top front right center */
+       SNDRV_CHMAP_TSL,        /* top side left */
+       SNDRV_CHMAP_TSR,        /* top side right */
+       SNDRV_CHMAP_LLFE,       /* left LFE */
+       SNDRV_CHMAP_RLFE,       /* right LFE */
+       SNDRV_CHMAP_BC,         /* bottom center */
+       SNDRV_CHMAP_BLC,        /* bottom left center */
+       SNDRV_CHMAP_BRC,        /* bottom right center */
+       SNDRV_CHMAP_LAST = SNDRV_CHMAP_BRC,
+};
+
+#define SNDRV_CHMAP_POSITION_MASK      0xffff
+#define SNDRV_CHMAP_PHASE_INVERSE      (0x01 << 16)
+#define SNDRV_CHMAP_DRIVER_SPEC                (0x02 << 16)
+
 #define SNDRV_PCM_IOCTL_PVERSION       _IOR('A', 0x00, int)
 #define SNDRV_PCM_IOCTL_INFO           _IOR('A', 0x01, struct snd_pcm_info)
 #define SNDRV_PCM_IOCTL_TSTAMP         _IOW('A', 0x02, int)
index 05341a4..d630163 100644 (file)
@@ -30,7 +30,7 @@
 #include <sound/compress_params.h>
 
 
-#define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 1, 0)
+#define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 1, 1)
 /**
  * struct snd_compressed_buffer: compressed buffer
  * @fragment_size: size of buffer fragment in bytes
@@ -122,6 +122,27 @@ struct snd_compr_codec_caps {
 };
 
 /**
+ * @SNDRV_COMPRESS_ENCODER_PADDING: no of samples appended by the encoder at the
+ * end of the track
+ * @SNDRV_COMPRESS_ENCODER_DELAY: no of samples inserted by the encoder at the
+ * beginning of the track
+ */
+enum {
+       SNDRV_COMPRESS_ENCODER_PADDING = 1,
+       SNDRV_COMPRESS_ENCODER_DELAY = 2,
+};
+
+/**
+ * struct snd_compr_metadata: compressed stream metadata
+ * @key: key id
+ * @value: key value
+ */
+struct snd_compr_metadata {
+        __u32 key;
+        __u32 value[8];
+};
+
+/**
  * compress path ioctl definitions
  * SNDRV_COMPRESS_GET_CAPS: Query capability of DSP
  * SNDRV_COMPRESS_GET_CODEC_CAPS: Query capability of a codec
@@ -145,6 +166,10 @@ struct snd_compr_codec_caps {
                                                struct snd_compr_codec_caps)
 #define SNDRV_COMPRESS_SET_PARAMS      _IOW('C', 0x12, struct snd_compr_params)
 #define SNDRV_COMPRESS_GET_PARAMS      _IOR('C', 0x13, struct snd_codec)
+#define SNDRV_COMPRESS_SET_METADATA    _IOW('C', 0x14,\
+                                                struct snd_compr_metadata)
+#define SNDRV_COMPRESS_GET_METADATA    _IOWR('C', 0x15,\
+                                                struct snd_compr_metadata)
 #define SNDRV_COMPRESS_TSTAMP          _IOR('C', 0x20, struct snd_compr_tstamp)
 #define SNDRV_COMPRESS_AVAIL           _IOR('C', 0x21, struct snd_compr_avail)
 #define SNDRV_COMPRESS_PAUSE           _IO('C', 0x30)
@@ -152,10 +177,14 @@ struct snd_compr_codec_caps {
 #define SNDRV_COMPRESS_START           _IO('C', 0x32)
 #define SNDRV_COMPRESS_STOP            _IO('C', 0x33)
 #define SNDRV_COMPRESS_DRAIN           _IO('C', 0x34)
+#define SNDRV_COMPRESS_NEXT_TRACK      _IO('C', 0x35)
+#define SNDRV_COMPRESS_PARTIAL_DRAIN   _IO('C', 0x36)
 /*
  * TODO
  * 1. add mmap support
  *
  */
 #define SND_COMPR_TRIGGER_DRAIN 7 /*FIXME move this to pcm.h */
+#define SND_COMPR_TRIGGER_NEXT_TRACK 8
+#define SND_COMPR_TRIGGER_PARTIAL_DRAIN 9
 #endif
index da4a456..602dc6c 100644 (file)
@@ -72,6 +72,7 @@
 #define SND_AUDIOCODEC_IEC61937              ((__u32) 0x0000000B)
 #define SND_AUDIOCODEC_G723_1                ((__u32) 0x0000000C)
 #define SND_AUDIOCODEC_G729                  ((__u32) 0x0000000D)
+#define SND_AUDIOCODEC_MAX                   SND_AUDIOCODEC_G729
 
 /*
  * Profile and modes are listed with bit masks. This allows for a
index 3524a84..88449df 100644 (file)
@@ -1,8 +1,3 @@
-#ifndef __SOUND_EMU10K1_H
-#define __SOUND_EMU10K1_H
-
-#include <linux/types.h>
-
 /*
  *  Copyright (c) by Jaroslav Kysela <perex@perex.cz>,
  *                  Creative Labs, Inc.
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  *
  */
+#ifndef __SOUND_EMU10K1_H
+#define __SOUND_EMU10K1_H
+
+#include <linux/types.h>
+
 
 
 /*
@@ -368,4 +368,4 @@ typedef struct snd_emu10k1_fx8010_code emu10k1_fx8010_code_t;
 typedef struct snd_emu10k1_fx8010_tram emu10k1_fx8010_tram_t;
 typedef struct snd_emu10k1_fx8010_pcm_rec emu10k1_fx8010_pcm_t;
 
-#endif /* __SOUND_EMU10K1_H */
+#endif /* __SOUND_EMU10K1_H */
index b342eb9..255f69c 100644 (file)
@@ -1,6 +1,3 @@
-#ifndef __SOUND_SB16_CSP_H
-#define __SOUND_SB16_CSP_H
-
 /*
  *  Copyright (c) 1999 by Uros Bizjak <uros@kss-loka.si>
  *                        Takashi Iwai <tiwai@suse.de>
@@ -22,6 +19,9 @@
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  *
  */
+#ifndef __SOUND_SB16_CSP_H
+#define __SOUND_SB16_CSP_H
+
 
 /* CSP modes */
 #define SNDRV_SB_CSP_MODE_NONE         0x00
@@ -119,4 +119,4 @@ struct snd_sb_csp_info {
 #define SNDRV_SB_CSP_IOCTL_RESTART     _IO('H', 0x16)
 
 
-#endif /* __SOUND_SB16_CSP */
+#endif /* __SOUND_SB16_CSP_H */
index 22b7b3d..e9b8e2c 100644 (file)
@@ -206,4 +206,4 @@ struct sis_memreq {
 /**********************************************/
 
 
-#endif
+#endif /* _LINUX_SISFB_H_ */
index 8fb03c5..12eab3c 100644 (file)
@@ -35,8 +35,7 @@
 
 #include <linux/types.h>
 
-
-typedef unsigned long xen_pfn_t;
+#include <xen/interface/xen.h>
 
 struct privcmd_hypercall {
        __u64 op;
@@ -59,13 +58,33 @@ struct privcmd_mmapbatch {
        int num;     /* number of pages to populate */
        domid_t dom; /* target domain */
        __u64 addr;  /* virtual address */
-       xen_pfn_t *arr; /* array of mfns - top nibble set on err */
+       xen_pfn_t *arr; /* array of mfns - or'd with
+                                 PRIVCMD_MMAPBATCH_*_ERROR on err */
+};
+
+#define PRIVCMD_MMAPBATCH_MFN_ERROR     0xf0000000U
+#define PRIVCMD_MMAPBATCH_PAGED_ERROR   0x80000000U
+
+struct privcmd_mmapbatch_v2 {
+       unsigned int num; /* number of pages to populate */
+       domid_t dom;      /* target domain */
+       __u64 addr;       /* virtual address */
+       const xen_pfn_t *arr; /* array of mfns */
+       int *err;  /* array of error codes */
 };
 
 /*
  * @cmd: IOCTL_PRIVCMD_HYPERCALL
  * @arg: &privcmd_hypercall_t
  * Return: Value returned from execution of the specified hypercall.
+ *
+ * @cmd: IOCTL_PRIVCMD_MMAPBATCH_V2
+ * @arg: &struct privcmd_mmapbatch_v2
+ * Return: 0 on success (i.e., arg->err contains valid error codes for
+ * each frame).  On an error other than a failed frame remap, -1 is
+ * returned and errno is set to EINVAL, EFAULT etc.  As an exception,
+ * if the operation was otherwise successful but any frame failed with
+ * -ENOENT, then -1 is returned and errno is set to ENOENT.
  */
 #define IOCTL_PRIVCMD_HYPERCALL                                        \
        _IOC(_IOC_NONE, 'P', 0, sizeof(struct privcmd_hypercall))
@@ -73,5 +92,7 @@ struct privcmd_mmapbatch {
        _IOC(_IOC_NONE, 'P', 2, sizeof(struct privcmd_mmap))
 #define IOCTL_PRIVCMD_MMAPBATCH                                        \
        _IOC(_IOC_NONE, 'P', 3, sizeof(struct privcmd_mmapbatch))
+#define IOCTL_PRIVCMD_MMAPBATCH_V2                             \
+       _IOC(_IOC_NONE, 'P', 4, sizeof(struct privcmd_mmapbatch_v2))
 
 #endif /* __LINUX_PUBLIC_PRIVCMD_H__ */