From a984eb367c032dbe2577f01238c3d1268526be70 Mon Sep 17 00:00:00 2001 From: Kacper Date: Thu, 25 Dec 2025 19:24:38 +0100 Subject: Clang-tidy fixes --- include/arch/x86_64/linux/a.out.h | 31 +- include/arch/x86_64/linux/acct.h | 3 +- include/arch/x86_64/linux/acrn.h | 58 +- include/arch/x86_64/linux/aio_abi.h | 6 +- include/arch/x86_64/linux/android/binder.h | 32 +- include/arch/x86_64/linux/arm_sdei.h | 9 +- include/arch/x86_64/linux/aspeed-lpc-ctrl.h | 8 +- include/arch/x86_64/linux/aspeed-p2a-ctrl.h | 9 +- include/arch/x86_64/linux/atm.h | 12 +- include/arch/x86_64/linux/atm_idt77105.h | 3 +- include/arch/x86_64/linux/atm_zatm.h | 6 +- include/arch/x86_64/linux/atmdev.h | 14 +- include/arch/x86_64/linux/atmlec.h | 6 +- include/arch/x86_64/linux/atmmpc.h | 7 +- include/arch/x86_64/linux/atmsap.h | 34 +- include/arch/x86_64/linux/audit.h | 52 +- include/arch/x86_64/linux/auto_dev-ioctl.h | 54 +- include/arch/x86_64/linux/auto_fs.h | 25 +- include/arch/x86_64/linux/bfs_fs.h | 20 +- include/arch/x86_64/linux/bits.h | 6 +- include/arch/x86_64/linux/blk-crypto.h | 7 +- include/arch/x86_64/linux/bpf.h | 299 +++-- include/arch/x86_64/linux/btrfs.h | 209 ++-- include/arch/x86_64/linux/btrfs_tree.h | 44 +- include/arch/x86_64/linux/caif/caif_socket.h | 5 +- include/arch/x86_64/linux/can.h | 2 +- include/arch/x86_64/linux/can/isotp.h | 2 +- include/arch/x86_64/linux/can/j1939.h | 3 +- include/arch/x86_64/linux/can/netlink.h | 5 +- include/arch/x86_64/linux/can/raw.h | 5 +- include/arch/x86_64/linux/capi.h | 9 +- include/arch/x86_64/linux/cdrom.h | 22 +- include/arch/x86_64/linux/cec-funcs.h | 611 ++++------ include/arch/x86_64/linux/cec.h | 48 +- include/arch/x86_64/linux/cfm_bridge.h | 5 +- include/arch/x86_64/linux/cgroupstats.h | 4 +- include/arch/x86_64/linux/cifs/cifs_mount.h | 8 +- include/arch/x86_64/linux/cn_proc.h | 7 +- include/arch/x86_64/linux/coda.h | 27 +- include/arch/x86_64/linux/coff.h | 35 +- include/arch/x86_64/linux/comedi.h | 69 +- include/arch/x86_64/linux/cramfs_fs.h | 9 +- include/arch/x86_64/linux/cryptouser.h | 4 +- include/arch/x86_64/linux/cxl_mem.h | 41 +- include/arch/x86_64/linux/dcbnl.h | 13 +- include/arch/x86_64/linux/dccp.h | 9 +- include/arch/x86_64/linux/devlink.h | 38 +- include/arch/x86_64/linux/dm-ioctl.h | 10 +- include/arch/x86_64/linux/dm-log-userspace.h | 5 +- include/arch/x86_64/linux/dma-buf.h | 12 +- include/arch/x86_64/linux/dma-heap.h | 3 +- include/arch/x86_64/linux/dns_resolver.h | 10 +- include/arch/x86_64/linux/dqblk_xfs.h | 16 +- include/arch/x86_64/linux/dvb/dmx.h | 7 +- include/arch/x86_64/linux/dvb/frontend.h | 15 +- include/arch/x86_64/linux/dvb/video.h | 8 +- include/arch/x86_64/linux/edd.h | 10 +- include/arch/x86_64/linux/elf.h | 143 ++- include/arch/x86_64/linux/ethtool.h | 165 +-- include/arch/x86_64/linux/ethtool_netlink.h | 4 +- .../arch/x86_64/linux/ethtool_netlink_generated.h | 15 +- include/arch/x86_64/linux/ext4.h | 5 +- include/arch/x86_64/linux/f2fs.h | 55 +- include/arch/x86_64/linux/fanotify.h | 40 +- include/arch/x86_64/linux/fb.h | 29 +- include/arch/x86_64/linux/fcntl.h | 6 +- include/arch/x86_64/linux/fd.h | 24 +- include/arch/x86_64/linux/firewire-cdev.h | 73 +- include/arch/x86_64/linux/fpga-dfl.h | 18 +- include/arch/x86_64/linux/fs.h | 50 +- include/arch/x86_64/linux/fscrypt.h | 22 +- include/arch/x86_64/linux/fsi.h | 8 +- include/arch/x86_64/linux/fsl_hypervisor.h | 24 +- include/arch/x86_64/linux/fsl_mc.h | 4 +- include/arch/x86_64/linux/fsmap.h | 3 +- include/arch/x86_64/linux/fsverity.h | 7 +- include/arch/x86_64/linux/fuse.h | 19 +- include/arch/x86_64/linux/futex.h | 32 +- include/arch/x86_64/linux/genwqe/genwqe_card.h | 9 +- include/arch/x86_64/linux/gfs2_ondisk.h | 7 +- include/arch/x86_64/linux/gpio.h | 32 +- include/arch/x86_64/linux/gtp.h | 4 +- include/arch/x86_64/linux/hdlcdrv.h | 2 +- include/arch/x86_64/linux/hdreg.h | 419 ++++--- include/arch/x86_64/linux/i2c.h | 63 +- include/arch/x86_64/linux/icmpv6.h | 12 +- include/arch/x86_64/linux/if.h | 11 +- include/arch/x86_64/linux/if_addr.h | 4 +- include/arch/x86_64/linux/if_arp.h | 10 +- include/arch/x86_64/linux/if_bonding.h | 6 +- include/arch/x86_64/linux/if_bridge.h | 26 +- include/arch/x86_64/linux/if_ether.h | 44 +- include/arch/x86_64/linux/if_link.h | 56 +- include/arch/x86_64/linux/if_macsec.h | 12 +- include/arch/x86_64/linux/if_packet.h | 14 +- include/arch/x86_64/linux/if_tunnel.h | 4 +- include/arch/x86_64/linux/if_vlan.h | 8 +- include/arch/x86_64/linux/if_xdp.h | 5 +- include/arch/x86_64/linux/ife.h | 9 +- include/arch/x86_64/linux/in.h | 47 +- include/arch/x86_64/linux/inet_diag.h | 7 +- include/arch/x86_64/linux/inotify.h | 14 +- include/arch/x86_64/linux/input-event-codes.h | 41 +- include/arch/x86_64/linux/input.h | 27 +- include/arch/x86_64/linux/io_uring.h | 8 +- include/arch/x86_64/linux/ioam6.h | 60 +- include/arch/x86_64/linux/iommufd.h | 9 +- include/arch/x86_64/linux/ioprio.h | 31 +- include/arch/x86_64/linux/ip.h | 3 +- include/arch/x86_64/linux/ip_vs.h | 15 +- include/arch/x86_64/linux/ipmi.h | 27 +- include/arch/x86_64/linux/ipsec.h | 7 +- include/arch/x86_64/linux/ipv6.h | 4 +- include/arch/x86_64/linux/isdn/capicmd.h | 6 +- include/arch/x86_64/linux/isst_if.h | 51 +- include/arch/x86_64/linux/ivtv.h | 11 +- include/arch/x86_64/linux/ivtvfb.h | 3 +- include/arch/x86_64/linux/jffs2.h | 16 +- include/arch/x86_64/linux/joystick.h | 7 +- include/arch/x86_64/linux/kd.h | 18 +- include/arch/x86_64/linux/keyctl.h | 79 +- include/arch/x86_64/linux/kfd_ioctl.h | 231 ++-- include/arch/x86_64/linux/kvm.h | 98 +- include/arch/x86_64/linux/l2tp.h | 3 +- include/arch/x86_64/linux/llc.h | 4 +- include/arch/x86_64/linux/loadpin.h | 3 +- include/arch/x86_64/linux/loop.h | 4 +- include/arch/x86_64/linux/lp.h | 4 +- include/arch/x86_64/linux/major.h | 3 +- include/arch/x86_64/linux/map_to_14segment.h | 206 ++-- include/arch/x86_64/linux/map_to_7segment.h | 155 +-- include/arch/x86_64/linux/matroxfb.h | 6 +- include/arch/x86_64/linux/mdio.h | 132 +-- include/arch/x86_64/linux/media.h | 9 +- .../x86_64/linux/media/amlogic/c3-isp-config.h | 13 +- .../linux/media/raspberrypi/pisp_be_config.h | 18 +- .../x86_64/linux/media/raspberrypi/pisp_common.h | 79 +- .../linux/media/raspberrypi/pisp_fe_config.h | 3 +- include/arch/x86_64/linux/mei.h | 6 +- include/arch/x86_64/linux/mei_uuid.h | 13 +- include/arch/x86_64/linux/mempolicy.h | 12 +- include/arch/x86_64/linux/mii.h | 4 +- include/arch/x86_64/linux/misc/bcm_vk.h | 13 +- include/arch/x86_64/linux/mount.h | 54 +- include/arch/x86_64/linux/mptcp.h | 2 +- include/arch/x86_64/linux/mroute.h | 6 +- include/arch/x86_64/linux/mroute6.h | 12 +- include/arch/x86_64/linux/msdos_fs.h | 29 +- include/arch/x86_64/linux/msg.h | 8 +- include/arch/x86_64/linux/mshv.h | 26 +- include/arch/x86_64/linux/mtio.h | 9 +- include/arch/x86_64/linux/nbd.h | 8 +- include/arch/x86_64/linux/ndctl.h | 22 +- include/arch/x86_64/linux/net_tstamp.h | 13 +- include/arch/x86_64/linux/netdev.h | 8 +- include/arch/x86_64/linux/netfilter/ipset/ip_set.h | 30 +- .../x86_64/linux/netfilter/nf_conntrack_common.h | 6 +- .../linux/netfilter/nf_conntrack_tuple_common.h | 3 +- include/arch/x86_64/linux/netfilter/nf_nat.h | 13 +- include/arch/x86_64/linux/netfilter/nf_synproxy.h | 5 +- include/arch/x86_64/linux/netfilter/nf_tables.h | 148 +-- .../arch/x86_64/linux/netfilter/nf_tables_compat.h | 8 +- include/arch/x86_64/linux/netfilter/nfnetlink.h | 6 +- .../arch/x86_64/linux/netfilter/nfnetlink_acct.h | 7 +- .../arch/x86_64/linux/netfilter/nfnetlink_compat.h | 37 +- .../x86_64/linux/netfilter/nfnetlink_conntrack.h | 45 +- .../x86_64/linux/netfilter/nfnetlink_cttimeout.h | 18 +- include/arch/x86_64/linux/netfilter/x_tables.h | 80 +- include/arch/x86_64/linux/netfilter/xt_CT.h | 3 +- .../arch/x86_64/linux/netfilter/xt_TCPOPTSTRIP.h | 5 +- include/arch/x86_64/linux/netfilter/xt_multiport.h | 6 +- include/arch/x86_64/linux/netfilter/xt_owner.h | 3 +- include/arch/x86_64/linux/netfilter/xt_recent.h | 5 +- include/arch/x86_64/linux/netfilter/xt_sctp.h | 50 +- include/arch/x86_64/linux/netfilter/xt_socket.h | 3 +- include/arch/x86_64/linux/netfilter/xt_statistic.h | 6 +- .../arch/x86_64/linux/netfilter_arp/arp_tables.h | 25 +- .../arch/x86_64/linux/netfilter_bridge/ebt_among.h | 17 +- .../arch/x86_64/linux/netfilter_bridge/ebt_arp.h | 6 +- .../arch/x86_64/linux/netfilter_bridge/ebt_ip.h | 6 +- .../arch/x86_64/linux/netfilter_bridge/ebt_ip6.h | 5 +- .../arch/x86_64/linux/netfilter_bridge/ebtables.h | 99 +- .../arch/x86_64/linux/netfilter_ipv4/ip_tables.h | 6 +- .../arch/x86_64/linux/netfilter_ipv6/ip6_tables.h | 34 +- include/arch/x86_64/linux/netlink.h | 16 +- include/arch/x86_64/linux/nfc.h | 4 +- include/arch/x86_64/linux/nfs.h | 12 +- include/arch/x86_64/linux/nfs3.h | 6 +- include/arch/x86_64/linux/nfs4.h | 3 +- include/arch/x86_64/linux/nfs_mount.h | 6 +- include/arch/x86_64/linux/nfsd/export.h | 10 +- include/arch/x86_64/linux/nilfs2_api.h | 72 +- include/arch/x86_64/linux/nilfs2_ondisk.h | 119 +- include/arch/x86_64/linux/nl80211.h | 72 +- include/arch/x86_64/linux/nubus.h | 16 +- include/arch/x86_64/linux/omap3isp.h | 40 +- include/arch/x86_64/linux/omapfb.h | 6 +- include/arch/x86_64/linux/openvswitch.h | 123 +- include/arch/x86_64/linux/parport.h | 4 +- include/arch/x86_64/linux/pci.h | 14 +- include/arch/x86_64/linux/pci_regs.h | 787 ++++++------- include/arch/x86_64/linux/perf_event.h | 95 +- include/arch/x86_64/linux/personality.h | 4 +- include/arch/x86_64/linux/pfrut.h | 12 +- include/arch/x86_64/linux/phonet.h | 9 +- include/arch/x86_64/linux/pidfd.h | 9 +- include/arch/x86_64/linux/pkt_cls.h | 43 +- include/arch/x86_64/linux/pkt_sched.h | 36 +- include/arch/x86_64/linux/pmu.h | 7 +- include/arch/x86_64/linux/ppp-ioctl.h | 21 +- include/arch/x86_64/linux/prctl.h | 12 +- include/arch/x86_64/linux/psample.h | 8 +- include/arch/x86_64/linux/psci.h | 16 +- include/arch/x86_64/linux/ptp_clock.h | 57 +- include/arch/x86_64/linux/ptrace.h | 3 +- include/arch/x86_64/linux/raid/md_p.h | 68 +- include/arch/x86_64/linux/rds.h | 5 +- include/arch/x86_64/linux/rio_mport_cdev.h | 62 +- include/arch/x86_64/linux/rkisp1-config.h | 70 +- include/arch/x86_64/linux/rseq.h | 9 +- include/arch/x86_64/linux/rtc.h | 21 +- include/arch/x86_64/linux/rtnetlink.h | 45 +- include/arch/x86_64/linux/rxrpc.h | 120 +- include/arch/x86_64/linux/scc.h | 2 +- include/arch/x86_64/linux/sched.h | 38 +- include/arch/x86_64/linux/sctp.h | 8 +- include/arch/x86_64/linux/securebits.h | 36 +- include/arch/x86_64/linux/selinux_netlink.h | 6 +- include/arch/x86_64/linux/sem.h | 10 +- include/arch/x86_64/linux/serial_reg.h | 68 +- include/arch/x86_64/linux/sev-guest.h | 20 +- include/arch/x86_64/linux/snmp.h | 26 +- include/arch/x86_64/linux/sockios.h | 6 +- include/arch/x86_64/linux/sonet.h | 13 +- include/arch/x86_64/linux/sound.h | 2 +- include/arch/x86_64/linux/soundcard.h | 136 +-- include/arch/x86_64/linux/stat.h | 29 +- include/arch/x86_64/linux/suspend_ioctls.h | 17 +- include/arch/x86_64/linux/swab.h | 39 +- include/arch/x86_64/linux/switchtec_ioctl.h | 21 +- include/arch/x86_64/linux/sysctl.h | 168 +-- include/arch/x86_64/linux/sysinfo.h | 26 +- include/arch/x86_64/linux/target_core_user.h | 5 +- include/arch/x86_64/linux/tc_act/tc_connmark.h | 8 +- include/arch/x86_64/linux/tc_act/tc_csum.h | 8 +- include/arch/x86_64/linux/tc_act/tc_defact.h | 9 +- include/arch/x86_64/linux/tc_act/tc_gact.h | 9 +- include/arch/x86_64/linux/tc_act/tc_mirred.h | 9 +- include/arch/x86_64/linux/tc_act/tc_pedit.h | 6 +- include/arch/x86_64/linux/tc_act/tc_tunnel_key.h | 9 +- include/arch/x86_64/linux/tc_ematch/tc_em_meta.h | 8 +- include/arch/x86_64/linux/tcp.h | 100 +- include/arch/x86_64/linux/tee.h | 32 +- include/arch/x86_64/linux/thermal.h | 54 +- include/arch/x86_64/linux/thp7312.h | 11 +- include/arch/x86_64/linux/timex.h | 33 +- include/arch/x86_64/linux/tiocl.h | 3 +- include/arch/x86_64/linux/tipc.h | 13 +- include/arch/x86_64/linux/tipc_config.h | 25 +- include/arch/x86_64/linux/tls.h | 3 +- include/arch/x86_64/linux/tty_flags.h | 8 +- include/arch/x86_64/linux/ublk_cmd.h | 60 +- include/arch/x86_64/linux/udp.h | 17 +- include/arch/x86_64/linux/uinput.h | 9 +- include/arch/x86_64/linux/uio.h | 2 +- include/arch/x86_64/linux/ultrasound.h | 45 +- include/arch/x86_64/linux/usb/audio.h | 104 +- include/arch/x86_64/linux/usb/cdc.h | 6 +- include/arch/x86_64/linux/usb/ch11.h | 5 +- include/arch/x86_64/linux/usb/ch9.h | 98 +- include/arch/x86_64/linux/usb/functionfs.h | 6 +- include/arch/x86_64/linux/usb/midi.h | 2 +- include/arch/x86_64/linux/usb/tmc.h | 20 +- include/arch/x86_64/linux/usb/video.h | 3 +- include/arch/x86_64/linux/usbdevice_fs.h | 11 +- include/arch/x86_64/linux/userfaultfd.h | 62 +- include/arch/x86_64/linux/userio.h | 6 +- include/arch/x86_64/linux/uvcvideo.h | 5 +- include/arch/x86_64/linux/v4l2-controls.h | 377 +++--- include/arch/x86_64/linux/v4l2-dv-timings.h | 1237 ++++++++------------ include/arch/x86_64/linux/v4l2-mediabus.h | 3 +- include/arch/x86_64/linux/v4l2-subdev.h | 58 +- include/arch/x86_64/linux/vbox_vmmdev_types.h | 7 +- include/arch/x86_64/linux/vboxguest.h | 24 +- include/arch/x86_64/linux/version.h | 5 +- include/arch/x86_64/linux/vfio.h | 52 +- include/arch/x86_64/linux/vhost.h | 48 +- include/arch/x86_64/linux/videodev2.h | 880 ++++++-------- include/arch/x86_64/linux/virtio_balloon.h | 17 +- include/arch/x86_64/linux/virtio_crypto.h | 62 +- include/arch/x86_64/linux/virtio_iommu.h | 4 +- include/arch/x86_64/linux/virtio_net.h | 43 +- include/arch/x86_64/linux/virtio_pci.h | 3 +- include/arch/x86_64/linux/virtio_ring.h | 29 +- include/arch/x86_64/linux/vm_sockets.h | 12 +- include/arch/x86_64/linux/vmclock-abi.h | 2 +- include/arch/x86_64/linux/wait.h | 7 +- include/arch/x86_64/linux/watch_queue.h | 17 +- include/arch/x86_64/linux/wireguard.h | 13 +- include/arch/x86_64/linux/wireless.h | 30 +- include/arch/x86_64/linux/xfrm.h | 25 +- include/arch/x86_64/linux/zorro.h | 3 +- include/arch/x86_64/linux/zorro_ids.h | 446 +++---- 303 files changed, 5120 insertions(+), 7737 deletions(-) (limited to 'include/arch/x86_64/linux') diff --git a/include/arch/x86_64/linux/a.out.h b/include/arch/x86_64/linux/a.out.h index 38e9e661..65d8a05e 100644 --- a/include/arch/x86_64/linux/a.out.h +++ b/include/arch/x86_64/linux/a.out.h @@ -45,19 +45,14 @@ enum machine_type { #endif #define N_MACHTYPE(exec) ((enum machine_type)(((exec).a_info >> 16) & 0xff)) #define N_FLAGS(exec) (((exec).a_info >> 24) & 0xff) -#define N_SET_INFO(exec, magic, type, flags) \ - ((exec).a_info = ((magic) & 0xffff) | (((int)(type) & 0xff) << 16) | \ - (((flags) & 0xff) << 24)) -#define N_SET_MAGIC(exec, magic) \ - ((exec).a_info = (((exec).a_info & 0xffff0000) | ((magic) & 0xffff))) +#define N_SET_INFO(exec, magic, type, flags) \ + ((exec).a_info = ((magic) & 0xffff) | (((int)(type) & 0xff) << 16) | (((flags) & 0xff) << 24)) +#define N_SET_MAGIC(exec, magic) ((exec).a_info = (((exec).a_info & 0xffff0000) | ((magic) & 0xffff))) -#define N_SET_MACHTYPE(exec, machtype) \ - ((exec).a_info = ((exec).a_info & 0xff00ffff) | \ - ((((int)(machtype)) & 0xff) << 16)) +#define N_SET_MACHTYPE(exec, machtype) \ + ((exec).a_info = ((exec).a_info & 0xff00ffff) | ((((int)(machtype)) & 0xff) << 16)) -#define N_SET_FLAGS(exec, flags) \ - ((exec).a_info = ((exec).a_info & 0x00ffffff) | \ - (((flags) & 0xff) << 24)) +#define N_SET_FLAGS(exec, flags) ((exec).a_info = ((exec).a_info & 0x00ffffff) | (((flags) & 0xff) << 24)) /* Code indicating object file or impure executable. */ #define OMAGIC 0407 @@ -73,18 +68,14 @@ enum machine_type { #define CMAGIC 0421 #if !defined(N_BADMAG) -#define N_BADMAG(x) \ - (N_MAGIC(x) != OMAGIC && N_MAGIC(x) != NMAGIC && \ - N_MAGIC(x) != ZMAGIC && N_MAGIC(x) != QMAGIC) +#define N_BADMAG(x) (N_MAGIC(x) != OMAGIC && N_MAGIC(x) != NMAGIC && N_MAGIC(x) != ZMAGIC && N_MAGIC(x) != QMAGIC) #endif #define _N_HDROFF(x) (1024 - sizeof(struct exec)) #if !defined(N_TXTOFF) -#define N_TXTOFF(x) \ - (N_MAGIC(x) == ZMAGIC ? \ - _N_HDROFF((x)) + sizeof(struct exec) : \ - (N_MAGIC(x) == QMAGIC ? 0 : sizeof(struct exec))) +#define N_TXTOFF(x) \ + (N_MAGIC(x) == ZMAGIC ? _N_HDROFF((x)) + sizeof(struct exec) : (N_MAGIC(x) == QMAGIC ? 0 : sizeof(struct exec))) #endif #if !defined(N_DATOFF) @@ -127,9 +118,7 @@ enum machine_type { #define _N_TXTENDADDR(x) (N_TXTADDR(x) + (x).a_text) #ifndef N_DATADDR -#define N_DATADDR(x) \ - (N_MAGIC(x) == OMAGIC ? (_N_TXTENDADDR(x)) : \ - (_N_SEGMENT_ROUND(_N_TXTENDADDR(x)))) +#define N_DATADDR(x) (N_MAGIC(x) == OMAGIC ? (_N_TXTENDADDR(x)) : (_N_SEGMENT_ROUND(_N_TXTENDADDR(x)))) #endif /* Address of bss segment in memory after it is loaded. */ diff --git a/include/arch/x86_64/linux/acct.h b/include/arch/x86_64/linux/acct.h index 6f27a6a2..dd66d818 100644 --- a/include/arch/x86_64/linux/acct.h +++ b/include/arch/x86_64/linux/acct.h @@ -105,8 +105,7 @@ struct acct_v3 { #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN) #define ACCT_BYTEORDER 0x80 /* accounting file is big endian */ -#elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : \ - defined(__LITTLE_ENDIAN) +#elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN) #define ACCT_BYTEORDER 0x00 /* accounting file is little endian */ #else #error unspecified endianness diff --git a/include/arch/x86_64/linux/acrn.h b/include/arch/x86_64/linux/acrn.h index 88c3c00c..b725fe91 100644 --- a/include/arch/x86_64/linux/acrn.h +++ b/include/arch/x86_64/linux/acrn.h @@ -325,8 +325,7 @@ struct acrn_vcpu_regs { #define ACRN_MEM_ACCESS_READ 0x00000001U #define ACRN_MEM_ACCESS_WRITE 0x00000002U #define ACRN_MEM_ACCESS_EXEC 0x00000004U -#define ACRN_MEM_ACCESS_RWX \ - (ACRN_MEM_ACCESS_READ | ACRN_MEM_ACCESS_WRITE | ACRN_MEM_ACCESS_EXEC) +#define ACRN_MEM_ACCESS_RWX (ACRN_MEM_ACCESS_READ | ACRN_MEM_ACCESS_WRITE | ACRN_MEM_ACCESS_EXEC) #define ACRN_MEM_TYPE_MASK 0x000007C0U #define ACRN_MEM_TYPE_WB 0x00000040U @@ -585,43 +584,34 @@ struct acrn_irqfd { /* * Common IOCTL IDs definition for ACRN userspace */ -#define ACRN_IOCTL_CREATE_VM \ - _IOWR(ACRN_IOCTL_TYPE, 0x10, struct acrn_vm_creation) -#define ACRN_IOCTL_DESTROY_VM _IO(ACRN_IOCTL_TYPE, 0x11) -#define ACRN_IOCTL_START_VM _IO(ACRN_IOCTL_TYPE, 0x12) -#define ACRN_IOCTL_PAUSE_VM _IO(ACRN_IOCTL_TYPE, 0x13) -#define ACRN_IOCTL_RESET_VM _IO(ACRN_IOCTL_TYPE, 0x15) -#define ACRN_IOCTL_SET_VCPU_REGS \ - _IOW(ACRN_IOCTL_TYPE, 0x16, struct acrn_vcpu_regs) +#define ACRN_IOCTL_CREATE_VM _IOWR(ACRN_IOCTL_TYPE, 0x10, struct acrn_vm_creation) +#define ACRN_IOCTL_DESTROY_VM _IO(ACRN_IOCTL_TYPE, 0x11) +#define ACRN_IOCTL_START_VM _IO(ACRN_IOCTL_TYPE, 0x12) +#define ACRN_IOCTL_PAUSE_VM _IO(ACRN_IOCTL_TYPE, 0x13) +#define ACRN_IOCTL_RESET_VM _IO(ACRN_IOCTL_TYPE, 0x15) +#define ACRN_IOCTL_SET_VCPU_REGS _IOW(ACRN_IOCTL_TYPE, 0x16, struct acrn_vcpu_regs) #define ACRN_IOCTL_INJECT_MSI _IOW(ACRN_IOCTL_TYPE, 0x23, struct acrn_msi_entry) #define ACRN_IOCTL_VM_INTR_MONITOR _IOW(ACRN_IOCTL_TYPE, 0x24, unsigned long) #define ACRN_IOCTL_SET_IRQLINE _IOW(ACRN_IOCTL_TYPE, 0x25, __u64) -#define ACRN_IOCTL_NOTIFY_REQUEST_FINISH \ - _IOW(ACRN_IOCTL_TYPE, 0x31, struct acrn_ioreq_notify) -#define ACRN_IOCTL_CREATE_IOREQ_CLIENT _IO(ACRN_IOCTL_TYPE, 0x32) -#define ACRN_IOCTL_ATTACH_IOREQ_CLIENT _IO(ACRN_IOCTL_TYPE, 0x33) -#define ACRN_IOCTL_DESTROY_IOREQ_CLIENT _IO(ACRN_IOCTL_TYPE, 0x34) -#define ACRN_IOCTL_CLEAR_VM_IOREQ _IO(ACRN_IOCTL_TYPE, 0x35) - -#define ACRN_IOCTL_SET_MEMSEG _IOW(ACRN_IOCTL_TYPE, 0x41, struct acrn_vm_memmap) -#define ACRN_IOCTL_UNSET_MEMSEG \ - _IOW(ACRN_IOCTL_TYPE, 0x42, struct acrn_vm_memmap) - -#define ACRN_IOCTL_SET_PTDEV_INTR \ - _IOW(ACRN_IOCTL_TYPE, 0x53, struct acrn_ptdev_irq) -#define ACRN_IOCTL_RESET_PTDEV_INTR \ - _IOW(ACRN_IOCTL_TYPE, 0x54, struct acrn_ptdev_irq) -#define ACRN_IOCTL_ASSIGN_PCIDEV _IOW(ACRN_IOCTL_TYPE, 0x55, struct acrn_pcidev) -#define ACRN_IOCTL_DEASSIGN_PCIDEV \ - _IOW(ACRN_IOCTL_TYPE, 0x56, struct acrn_pcidev) -#define ACRN_IOCTL_ASSIGN_MMIODEV \ - _IOW(ACRN_IOCTL_TYPE, 0x57, struct acrn_mmiodev) -#define ACRN_IOCTL_DEASSIGN_MMIODEV \ - _IOW(ACRN_IOCTL_TYPE, 0x58, struct acrn_mmiodev) -#define ACRN_IOCTL_CREATE_VDEV _IOW(ACRN_IOCTL_TYPE, 0x59, struct acrn_vdev) -#define ACRN_IOCTL_DESTROY_VDEV _IOW(ACRN_IOCTL_TYPE, 0x5A, struct acrn_vdev) +#define ACRN_IOCTL_NOTIFY_REQUEST_FINISH _IOW(ACRN_IOCTL_TYPE, 0x31, struct acrn_ioreq_notify) +#define ACRN_IOCTL_CREATE_IOREQ_CLIENT _IO(ACRN_IOCTL_TYPE, 0x32) +#define ACRN_IOCTL_ATTACH_IOREQ_CLIENT _IO(ACRN_IOCTL_TYPE, 0x33) +#define ACRN_IOCTL_DESTROY_IOREQ_CLIENT _IO(ACRN_IOCTL_TYPE, 0x34) +#define ACRN_IOCTL_CLEAR_VM_IOREQ _IO(ACRN_IOCTL_TYPE, 0x35) + +#define ACRN_IOCTL_SET_MEMSEG _IOW(ACRN_IOCTL_TYPE, 0x41, struct acrn_vm_memmap) +#define ACRN_IOCTL_UNSET_MEMSEG _IOW(ACRN_IOCTL_TYPE, 0x42, struct acrn_vm_memmap) + +#define ACRN_IOCTL_SET_PTDEV_INTR _IOW(ACRN_IOCTL_TYPE, 0x53, struct acrn_ptdev_irq) +#define ACRN_IOCTL_RESET_PTDEV_INTR _IOW(ACRN_IOCTL_TYPE, 0x54, struct acrn_ptdev_irq) +#define ACRN_IOCTL_ASSIGN_PCIDEV _IOW(ACRN_IOCTL_TYPE, 0x55, struct acrn_pcidev) +#define ACRN_IOCTL_DEASSIGN_PCIDEV _IOW(ACRN_IOCTL_TYPE, 0x56, struct acrn_pcidev) +#define ACRN_IOCTL_ASSIGN_MMIODEV _IOW(ACRN_IOCTL_TYPE, 0x57, struct acrn_mmiodev) +#define ACRN_IOCTL_DEASSIGN_MMIODEV _IOW(ACRN_IOCTL_TYPE, 0x58, struct acrn_mmiodev) +#define ACRN_IOCTL_CREATE_VDEV _IOW(ACRN_IOCTL_TYPE, 0x59, struct acrn_vdev) +#define ACRN_IOCTL_DESTROY_VDEV _IOW(ACRN_IOCTL_TYPE, 0x5A, struct acrn_vdev) #define ACRN_IOCTL_PM_GET_CPU_STATE _IOWR(ACRN_IOCTL_TYPE, 0x60, __u64) diff --git a/include/arch/x86_64/linux/aio_abi.h b/include/arch/x86_64/linux/aio_abi.h index 9418be0c..52fbe46d 100644 --- a/include/arch/x86_64/linux/aio_abi.h +++ b/include/arch/x86_64/linux/aio_abi.h @@ -74,12 +74,10 @@ struct iocb { /* these are internal to the kernel/libc. */ __u64 aio_data; /* data to be returned in event's data */ -#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : \ - defined(__LITTLE_ENDIAN) +#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN) __u32 aio_key; /* the kernel sets aio_key to the req # */ __kernel_rwf_t aio_rw_flags; /* RWF_* flags */ -#elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : \ - defined(__BIG_ENDIAN) +#elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN) __kernel_rwf_t aio_rw_flags; /* RWF_* flags */ __u32 aio_key; /* the kernel sets aio_key to the req # */ #else diff --git a/include/arch/x86_64/linux/android/binder.h b/include/arch/x86_64/linux/android/binder.h index 301086ae..21b0b00d 100644 --- a/include/arch/x86_64/linux/android/binder.h +++ b/include/arch/x86_64/linux/android/binder.h @@ -24,9 +24,8 @@ #include #include -#define B_PACK_CHARS(c1, c2, c3, c4) \ - ((((c1) << 24)) | (((c2) << 16)) | (((c3) << 8)) | (c4)) -#define B_TYPE_LARGE 0x85 +#define B_PACK_CHARS(c1, c2, c3, c4) ((((c1) << 24)) | (((c2) << 16)) | (((c3) << 8)) | (c4)) +#define B_TYPE_LARGE 0x85 enum { BINDER_TYPE_BINDER = B_PACK_CHARS('s', 'b', '*', B_TYPE_LARGE), @@ -265,17 +264,13 @@ enum { BINDER_SET_CONTEXT_MGR = _IOW('b', 7, __s32), BINDER_THREAD_EXIT = _IOW('b', 8, __s32), BINDER_VERSION = _IOWR('b', 9, struct binder_version), - BINDER_GET_NODE_DEBUG_INFO = - _IOWR('b', 11, struct binder_node_debug_info), - BINDER_GET_NODE_INFO_FOR_REF = - _IOWR('b', 12, struct binder_node_info_for_ref), + BINDER_GET_NODE_DEBUG_INFO = _IOWR('b', 11, struct binder_node_debug_info), + BINDER_GET_NODE_INFO_FOR_REF = _IOWR('b', 12, struct binder_node_info_for_ref), BINDER_SET_CONTEXT_MGR_EXT = _IOW('b', 13, struct flat_binder_object), BINDER_FREEZE = _IOW('b', 14, struct binder_freeze_info), - BINDER_GET_FROZEN_INFO = - _IOWR('b', 15, struct binder_frozen_status_info), + BINDER_GET_FROZEN_INFO = _IOWR('b', 15, struct binder_frozen_status_info), BINDER_ENABLE_ONEWAY_SPAM_DETECTION = _IOW('b', 16, __u32), - BINDER_GET_EXTENDED_ERROR = - _IOWR('b', 17, struct binder_extended_error), + BINDER_GET_EXTENDED_ERROR = _IOWR('b', 17, struct binder_extended_error), }; /* @@ -377,8 +372,7 @@ enum binder_driver_return_protocol { BR_OK = _IO('r', 1), /* No parameters! */ - BR_TRANSACTION_SEC_CTX = - _IOR('r', 2, struct binder_transaction_data_secctx), + BR_TRANSACTION_SEC_CTX = _IOR('r', 2, struct binder_transaction_data_secctx), /* * binder_transaction_data_secctx: the received command. */ @@ -547,15 +541,13 @@ enum binder_driver_command_protocol { * of looping threads it has available. */ - BC_REQUEST_DEATH_NOTIFICATION = - _IOW('c', 14, struct binder_handle_cookie), + BC_REQUEST_DEATH_NOTIFICATION = _IOW('c', 14, struct binder_handle_cookie), /* * int: handle * void *: cookie */ - BC_CLEAR_DEATH_NOTIFICATION = - _IOW('c', 15, struct binder_handle_cookie), + BC_CLEAR_DEATH_NOTIFICATION = _IOW('c', 15, struct binder_handle_cookie), /* * int: handle * void *: cookie @@ -572,15 +564,13 @@ enum binder_driver_command_protocol { * binder_transaction_data_sg: the sent command. */ - BC_REQUEST_FREEZE_NOTIFICATION = - _IOW('c', 19, struct binder_handle_cookie), + BC_REQUEST_FREEZE_NOTIFICATION = _IOW('c', 19, struct binder_handle_cookie), /* * int: handle * void *: cookie */ - BC_CLEAR_FREEZE_NOTIFICATION = - _IOW('c', 20, struct binder_handle_cookie), + BC_CLEAR_FREEZE_NOTIFICATION = _IOW('c', 20, struct binder_handle_cookie), /* * int: handle * void *: cookie diff --git a/include/arch/x86_64/linux/arm_sdei.h b/include/arch/x86_64/linux/arm_sdei.h index c0ca9600..54b70a00 100644 --- a/include/arch/x86_64/linux/arm_sdei.h +++ b/include/arch/x86_64/linux/arm_sdei.h @@ -32,12 +32,9 @@ #define SDEI_VERSION_VENDOR_SHIFT 0 #define SDEI_VERSION_VENDOR_MASK 0xffffffff -#define SDEI_VERSION_MAJOR(x) \ - (x >> SDEI_VERSION_MAJOR_SHIFT & SDEI_VERSION_MAJOR_MASK) -#define SDEI_VERSION_MINOR(x) \ - (x >> SDEI_VERSION_MINOR_SHIFT & SDEI_VERSION_MINOR_MASK) -#define SDEI_VERSION_VENDOR(x) \ - (x >> SDEI_VERSION_VENDOR_SHIFT & SDEI_VERSION_VENDOR_MASK) +#define SDEI_VERSION_MAJOR(x) (x >> SDEI_VERSION_MAJOR_SHIFT & SDEI_VERSION_MAJOR_MASK) +#define SDEI_VERSION_MINOR(x) (x >> SDEI_VERSION_MINOR_SHIFT & SDEI_VERSION_MINOR_MASK) +#define SDEI_VERSION_VENDOR(x) (x >> SDEI_VERSION_VENDOR_SHIFT & SDEI_VERSION_VENDOR_MASK) /* SDEI return values */ #define SDEI_SUCCESS 0 diff --git a/include/arch/x86_64/linux/aspeed-lpc-ctrl.h b/include/arch/x86_64/linux/aspeed-lpc-ctrl.h index 50c6ab41..92f50222 100644 --- a/include/arch/x86_64/linux/aspeed-lpc-ctrl.h +++ b/include/arch/x86_64/linux/aspeed-lpc-ctrl.h @@ -53,12 +53,8 @@ struct aspeed_lpc_ctrl_mapping { #define __ASPEED_LPC_CTRL_IOCTL_MAGIC 0xb2 -#define ASPEED_LPC_CTRL_IOCTL_GET_SIZE \ - _IOWR(__ASPEED_LPC_CTRL_IOCTL_MAGIC, 0x00, \ - struct aspeed_lpc_ctrl_mapping) +#define ASPEED_LPC_CTRL_IOCTL_GET_SIZE _IOWR(__ASPEED_LPC_CTRL_IOCTL_MAGIC, 0x00, struct aspeed_lpc_ctrl_mapping) -#define ASPEED_LPC_CTRL_IOCTL_MAP \ - _IOW(__ASPEED_LPC_CTRL_IOCTL_MAGIC, 0x01, \ - struct aspeed_lpc_ctrl_mapping) +#define ASPEED_LPC_CTRL_IOCTL_MAP _IOW(__ASPEED_LPC_CTRL_IOCTL_MAGIC, 0x01, struct aspeed_lpc_ctrl_mapping) #endif /* _LINUX_ASPEED_LPC_CTRL_H */ diff --git a/include/arch/x86_64/linux/aspeed-p2a-ctrl.h b/include/arch/x86_64/linux/aspeed-p2a-ctrl.h index 9b4773c7..1004279f 100644 --- a/include/arch/x86_64/linux/aspeed-p2a-ctrl.h +++ b/include/arch/x86_64/linux/aspeed-p2a-ctrl.h @@ -48,16 +48,13 @@ struct aspeed_p2a_ctrl_mapping { * starting address and length to be readable by the host, or * readable-writeable. */ -#define ASPEED_P2A_CTRL_IOCTL_SET_WINDOW \ - _IOW(__ASPEED_P2A_CTRL_IOCTL_MAGIC, 0x00, \ - struct aspeed_p2a_ctrl_mapping) +#define ASPEED_P2A_CTRL_IOCTL_SET_WINDOW _IOW(__ASPEED_P2A_CTRL_IOCTL_MAGIC, 0x00, struct aspeed_p2a_ctrl_mapping) /* * This IOCTL is meant to read back to the user the base address and length of * the memory-region specified to the driver for use with mmap. */ -#define ASPEED_P2A_CTRL_IOCTL_GET_MEMORY_CONFIG \ - _IOWR(__ASPEED_P2A_CTRL_IOCTL_MAGIC, 0x01, \ - struct aspeed_p2a_ctrl_mapping) +#define ASPEED_P2A_CTRL_IOCTL_GET_MEMORY_CONFIG \ + _IOWR(__ASPEED_P2A_CTRL_IOCTL_MAGIC, 0x01, struct aspeed_p2a_ctrl_mapping) #endif /* _LINUX_ASPEED_P2A_CTRL_H */ diff --git a/include/arch/x86_64/linux/atm.h b/include/arch/x86_64/linux/atm.h index f9c8ae35..445bbbe1 100644 --- a/include/arch/x86_64/linux/atm.h +++ b/include/arch/x86_64/linux/atm.h @@ -141,12 +141,12 @@ struct atm_trafprm { unsigned int trm_pres : 1; /* rm present bit */ unsigned int adtf_pres : 1; /* adtf present bit */ unsigned int cdf_pres : 1; /* cdf present bit*/ - unsigned int nrm : 3; /* Max # of Cells for each forward RM cell (3-bit) - */ - unsigned int trm : 3; /* Time between forward RM cells (3-bit) */ - unsigned int adtf : 10; /* ACR Decrease Time Factor (10-bit) */ - unsigned int cdf : 3; /* Cutoff Decrease Factor (3-bit) */ - unsigned int spare : 9; /* spare bits */ + unsigned int nrm : 3; /* Max # of Cells for each forward RM cell (3-bit) + */ + unsigned int trm : 3; /* Time between forward RM cells (3-bit) */ + unsigned int adtf : 10; /* ACR Decrease Time Factor (10-bit) */ + unsigned int cdf : 3; /* Cutoff Decrease Factor (3-bit) */ + unsigned int spare : 9; /* spare bits */ }; struct atm_qos { diff --git a/include/arch/x86_64/linux/atm_idt77105.h b/include/arch/x86_64/linux/atm_idt77105.h index 7401eb65..b692c0ca 100644 --- a/include/arch/x86_64/linux/atm_idt77105.h +++ b/include/arch/x86_64/linux/atm_idt77105.h @@ -22,8 +22,7 @@ struct idt77105_stats { __u32 rx_hec_errors; /* Header Error Check errors on receive */ }; -#define IDT77105_GETSTAT \ - _IOW('a', ATMIOC_PHYPRV + 2, struct atmif_sioc) /* get stats */ +#define IDT77105_GETSTAT _IOW('a', ATMIOC_PHYPRV + 2, struct atmif_sioc) /* get stats */ #define IDT77105_GETSTATZ \ _IOW('a', ATMIOC_PHYPRV + 3, struct atmif_sioc) /* get stats and zero \ */ diff --git a/include/arch/x86_64/linux/atm_zatm.h b/include/arch/x86_64/linux/atm_zatm.h index ecbf33e9..f408fed8 100644 --- a/include/arch/x86_64/linux/atm_zatm.h +++ b/include/arch/x86_64/linux/atm_zatm.h @@ -35,9 +35,9 @@ struct zatm_pool_req { struct zatm_pool_info info; /* actual information */ }; -#define ZATM_OAM_POOL 0 /* free buffer pool for OAM cells */ -#define ZATM_AAL0_POOL 1 /* free buffer pool for AAL0 cells */ -#define ZATM_AAL5_POOL_BASE 2 /* first AAL5 free buffer pool */ +#define ZATM_OAM_POOL 0 /* free buffer pool for OAM cells */ +#define ZATM_AAL0_POOL 1 /* free buffer pool for AAL0 cells */ +#define ZATM_AAL5_POOL_BASE 2 /* first AAL5 free buffer pool */ #define ZATM_LAST_POOL ZATM_AAL5_POOL_BASE + 10 /* max. 64 kB */ #define ZATM_TIMER_HISTORY_SIZE \ diff --git a/include/arch/x86_64/linux/atmdev.h b/include/arch/x86_64/linux/atmdev.h index 2b9d8c51..7510d0f0 100644 --- a/include/arch/x86_64/linux/atmdev.h +++ b/include/arch/x86_64/linux/atmdev.h @@ -178,9 +178,7 @@ struct atm_cirange { #define ATM_MF_DEC_SHP 16 /* Change shaping on decrease */ #define ATM_MF_BWD 32 /* Set the backward direction parameters */ -#define ATM_MF_SET \ - (ATM_MF_INC_RSV | ATM_MF_INC_SHP | ATM_MF_DEC_RSV | ATM_MF_DEC_SHP | \ - ATM_MF_BWD) +#define ATM_MF_SET (ATM_MF_INC_RSV | ATM_MF_INC_SHP | ATM_MF_DEC_RSV | ATM_MF_DEC_SHP | ATM_MF_BWD) /* * ATM_VS_* are used to express VC state in a human-friendly way. @@ -193,12 +191,10 @@ struct atm_cirange { #define ATM_VS_INUSE 4 /* VC is in use (registered with atmsigd) */ #define ATM_VS_BOUND 5 /* VC is bound */ -#define ATM_VS2TXT_MAP \ - "IDLE", "CONNECTED", "CLOSING", "LISTEN", "INUSE", "BOUND" +#define ATM_VS2TXT_MAP "IDLE", "CONNECTED", "CLOSING", "LISTEN", "INUSE", "BOUND" -#define ATM_VF2TXT_MAP \ - "ADDR", "READY", "PARTIAL", "REGIS", "RELEASED", "HASQOS", "LISTEN", \ - "META", "256", "512", "1024", "2048", "SESSION", "HASSAP", \ - "BOUND", "CLOSE" +#define ATM_VF2TXT_MAP \ + "ADDR", "READY", "PARTIAL", "REGIS", "RELEASED", "HASQOS", "LISTEN", "META", "256", "512", "1024", "2048", \ + "SESSION", "HASSAP", "BOUND", "CLOSE" #endif /* LINUX_ATMDEV_H */ diff --git a/include/arch/x86_64/linux/atmlec.h b/include/arch/x86_64/linux/atmlec.h index 0dd3cf37..893ca4c7 100644 --- a/include/arch/x86_64/linux/atmlec.h +++ b/include/arch/x86_64/linux/atmlec.h @@ -73,9 +73,9 @@ struct atmlec_msg { } normal; struct atmlec_config_msg config; struct { - __u16 lec_id; /* requestor lec_id */ - __u32 tran_id; /* transaction id */ - unsigned char mac_addr[ETH_ALEN]; /* dst mac addr */ + __u16 lec_id; /* requestor lec_id */ + __u32 tran_id; /* transaction id */ + unsigned char mac_addr[ETH_ALEN]; /* dst mac addr */ unsigned char atm_addr[ATM_ESA_LEN]; /* reqestor ATM addr */ } proxy; /* diff --git a/include/arch/x86_64/linux/atmmpc.h b/include/arch/x86_64/linux/atmmpc.h index 7747e075..63472a48 100644 --- a/include/arch/x86_64/linux/atmmpc.h +++ b/include/arch/x86_64/linux/atmmpc.h @@ -96,10 +96,9 @@ struct llc_snap_hdr { /* Message types - to MPOA daemon */ -#define SND_MPOA_RES_RQST 201 -#define SET_MPS_CTRL_ADDR 202 -#define SND_MPOA_RES_RTRY \ - 203 /* Different type in a retry due to req id */ +#define SND_MPOA_RES_RQST 201 +#define SET_MPS_CTRL_ADDR 202 +#define SND_MPOA_RES_RTRY 203 /* Different type in a retry due to req id */ #define STOP_KEEP_ALIVE_SM 204 #define EGRESS_ENTRY_REMOVED 205 #define SND_EGRESS_PURGE 206 diff --git a/include/arch/x86_64/linux/atmsap.h b/include/arch/x86_64/linux/atmsap.h index 1a94d2dc..3adc6197 100644 --- a/include/arch/x86_64/linux/atmsap.h +++ b/include/arch/x86_64/linux/atmsap.h @@ -99,40 +99,40 @@ struct atm_blli { unsigned char l2_proto; /* layer 2 protocol */ union { struct { - unsigned char mode; /* mode of operation (ATM_IMD_xxx), - 0 if */ - /* absent */ + unsigned char mode; /* mode of operation (ATM_IMD_xxx), + 0 if */ + /* absent */ unsigned char window; /* window size (k), 1-127 (0 to omit) */ } itu; /* ITU-T encoding */ - unsigned char user; /* user-specified l2 information */ + unsigned char user; /* user-specified l2 information */ } l2; unsigned char l3_proto; /* layer 3 protocol */ union { struct { - unsigned char mode; /* mode of operation (ATM_IMD_xxx), - 0 if */ - /* absent */ - unsigned char def_size; /* default packet size (log2), - 4-12 (0 to */ - /* omit) */ - unsigned char window; /* packet window size, 1-127 (0 to - omit) */ - } itu; /* ITU-T encoding */ - unsigned char user; /* user specified l3 information */ - struct { /* if l3_proto = ATM_L3_H310 */ + unsigned char mode; /* mode of operation (ATM_IMD_xxx), + 0 if */ + /* absent */ + unsigned char def_size; /* default packet size (log2), + 4-12 (0 to */ + /* omit) */ + unsigned char window; /* packet window size, 1-127 (0 to + omit) */ + } itu; /* ITU-T encoding */ + unsigned char user; /* user specified l3 information */ + struct { /* if l3_proto = ATM_L3_H310 */ unsigned char term_type; /* terminal type */ unsigned char fw_mpx_cap; /* forward multiplexing capability */ /* only if term_type != ATM_TT_NONE */ unsigned char bw_mpx_cap; /* backward multiplexing capability */ - /* only if term_type != ATM_TT_NONE */ + /* only if term_type != ATM_TT_NONE */ } h310; struct { /* if l3_proto = ATM_L3_TR9577 */ unsigned char ipi; /* initial protocol id */ unsigned char snap[5]; /* IEEE 802.1 SNAP identifier */ - /* (only if ipi == NLPID_IEEE802_1_SNAP) */ + /* (only if ipi == NLPID_IEEE802_1_SNAP) */ } tr9577; } l3; } __ATM_API_ALIGN; diff --git a/include/arch/x86_64/linux/audit.h b/include/arch/x86_64/linux/audit.h index 76ca9e66..0afb7cbf 100644 --- a/include/arch/x86_64/linux/audit.h +++ b/include/arch/x86_64/linux/audit.h @@ -72,8 +72,7 @@ #define AUDIT_SET_FEATURE 1018 /* Turn an audit feature on or off */ #define AUDIT_GET_FEATURE 1019 /* Get which features are enabled */ -#define AUDIT_FIRST_USER_MSG \ - 1100 /* Userspace messages mostly uninteresting to kernel */ +#define AUDIT_FIRST_USER_MSG 1100 /* Userspace messages mostly uninteresting to kernel */ #define AUDIT_USER_AVC 1107 /* We filter this differently */ #define AUDIT_USER_TTY 1124 /* Non-ICANON TTY input meaning */ #define AUDIT_LAST_USER_MSG 1199 @@ -334,17 +333,7 @@ #define AUDIT_GREATER_THAN_OR_EQUAL (AUDIT_GREATER_THAN | AUDIT_EQUAL) #define AUDIT_OPERATORS (AUDIT_EQUAL | AUDIT_NOT_EQUAL | AUDIT_BIT_MASK) -enum { - Audit_equal, - Audit_not_equal, - Audit_bitmask, - Audit_bittest, - Audit_lt, - Audit_gt, - Audit_le, - Audit_ge, - Audit_bad -}; +enum { Audit_equal, Audit_not_equal, Audit_bitmask, Audit_bittest, Audit_lt, Audit_gt, Audit_le, Audit_ge, Audit_bad }; /* Status symbols */ /* Mask values */ @@ -365,13 +354,10 @@ enum { #define AUDIT_FEATURE_BITMAP_LOST_RESET 0x00000020 #define AUDIT_FEATURE_BITMAP_FILTER_FS 0x00000040 -#define AUDIT_FEATURE_BITMAP_ALL \ - (AUDIT_FEATURE_BITMAP_BACKLOG_LIMIT | \ - AUDIT_FEATURE_BITMAP_BACKLOG_WAIT_TIME | \ - AUDIT_FEATURE_BITMAP_EXECUTABLE_PATH | \ - AUDIT_FEATURE_BITMAP_EXCLUDE_EXTEND | \ - AUDIT_FEATURE_BITMAP_SESSIONID_FILTER | \ - AUDIT_FEATURE_BITMAP_LOST_RESET | AUDIT_FEATURE_BITMAP_FILTER_FS) +#define AUDIT_FEATURE_BITMAP_ALL \ + (AUDIT_FEATURE_BITMAP_BACKLOG_LIMIT | AUDIT_FEATURE_BITMAP_BACKLOG_WAIT_TIME | \ + AUDIT_FEATURE_BITMAP_EXECUTABLE_PATH | AUDIT_FEATURE_BITMAP_EXCLUDE_EXTEND | \ + AUDIT_FEATURE_BITMAP_SESSIONID_FILTER | AUDIT_FEATURE_BITMAP_LOST_RESET | AUDIT_FEATURE_BITMAP_FILTER_FS) /* deprecated: AUDIT_VERSION_* */ #define AUDIT_VERSION_LATEST AUDIT_FEATURE_BITMAP_ALL @@ -417,19 +403,16 @@ enum { #define AUDIT_ARCH_MIPS (EM_MIPS) #define AUDIT_ARCH_MIPSEL (EM_MIPS | __AUDIT_ARCH_LE) #define AUDIT_ARCH_MIPS64 (EM_MIPS | __AUDIT_ARCH_64BIT) -#define AUDIT_ARCH_MIPS64N32 \ - (EM_MIPS | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_CONVENTION_MIPS64_N32) -#define AUDIT_ARCH_MIPSEL64 (EM_MIPS | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE) -#define AUDIT_ARCH_MIPSEL64N32 \ - (EM_MIPS | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE | \ - __AUDIT_ARCH_CONVENTION_MIPS64_N32) -#define AUDIT_ARCH_NDS32 (EM_NDS32 | __AUDIT_ARCH_LE) -#define AUDIT_ARCH_NDS32BE (EM_NDS32) -#define AUDIT_ARCH_NIOS2 (EM_ALTERA_NIOS2 | __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) +#define AUDIT_ARCH_MIPS64N32 (EM_MIPS | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_CONVENTION_MIPS64_N32) +#define AUDIT_ARCH_MIPSEL64 (EM_MIPS | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE) +#define AUDIT_ARCH_MIPSEL64N32 (EM_MIPS | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE | __AUDIT_ARCH_CONVENTION_MIPS64_N32) +#define AUDIT_ARCH_NDS32 (EM_NDS32 | __AUDIT_ARCH_LE) +#define AUDIT_ARCH_NDS32BE (EM_NDS32) +#define AUDIT_ARCH_NIOS2 (EM_ALTERA_NIOS2 | __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) /* do not define AUDIT_ARCH_PPCLE since it is not supported by audit */ #define AUDIT_ARCH_PPC64 (EM_PPC64 | __AUDIT_ARCH_64BIT) #define AUDIT_ARCH_PPC64LE (EM_PPC64 | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE) @@ -450,8 +433,7 @@ enum { #define AUDIT_ARCH_X86_64 (EM_X86_64 | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE) #define AUDIT_ARCH_XTENSA (EM_XTENSA) #define AUDIT_ARCH_LOONGARCH32 (EM_LOONGARCH | __AUDIT_ARCH_LE) -#define AUDIT_ARCH_LOONGARCH64 \ - (EM_LOONGARCH | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE) +#define AUDIT_ARCH_LOONGARCH64 (EM_LOONGARCH | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE) #define AUDIT_PERM_EXEC 1 #define AUDIT_PERM_WRITE 2 diff --git a/include/arch/x86_64/linux/auto_dev-ioctl.h b/include/arch/x86_64/linux/auto_dev-ioctl.h index 30ef3c11..f8c2f79b 100644 --- a/include/arch/x86_64/linux/auto_dev-ioctl.h +++ b/include/arch/x86_64/linux/auto_dev-ioctl.h @@ -157,58 +157,32 @@ enum { AUTOFS_DEV_IOCTL_ISMOUNTPOINT_CMD, }; -#define AUTOFS_DEV_IOCTL_VERSION \ - _IOWR(AUTOFS_IOCTL, AUTOFS_DEV_IOCTL_VERSION_CMD, \ - struct autofs_dev_ioctl) +#define AUTOFS_DEV_IOCTL_VERSION _IOWR(AUTOFS_IOCTL, AUTOFS_DEV_IOCTL_VERSION_CMD, struct autofs_dev_ioctl) -#define AUTOFS_DEV_IOCTL_PROTOVER \ - _IOWR(AUTOFS_IOCTL, AUTOFS_DEV_IOCTL_PROTOVER_CMD, \ - struct autofs_dev_ioctl) +#define AUTOFS_DEV_IOCTL_PROTOVER _IOWR(AUTOFS_IOCTL, AUTOFS_DEV_IOCTL_PROTOVER_CMD, struct autofs_dev_ioctl) -#define AUTOFS_DEV_IOCTL_PROTOSUBVER \ - _IOWR(AUTOFS_IOCTL, AUTOFS_DEV_IOCTL_PROTOSUBVER_CMD, \ - struct autofs_dev_ioctl) +#define AUTOFS_DEV_IOCTL_PROTOSUBVER _IOWR(AUTOFS_IOCTL, AUTOFS_DEV_IOCTL_PROTOSUBVER_CMD, struct autofs_dev_ioctl) -#define AUTOFS_DEV_IOCTL_OPENMOUNT \ - _IOWR(AUTOFS_IOCTL, AUTOFS_DEV_IOCTL_OPENMOUNT_CMD, \ - struct autofs_dev_ioctl) +#define AUTOFS_DEV_IOCTL_OPENMOUNT _IOWR(AUTOFS_IOCTL, AUTOFS_DEV_IOCTL_OPENMOUNT_CMD, struct autofs_dev_ioctl) -#define AUTOFS_DEV_IOCTL_CLOSEMOUNT \ - _IOWR(AUTOFS_IOCTL, AUTOFS_DEV_IOCTL_CLOSEMOUNT_CMD, \ - struct autofs_dev_ioctl) +#define AUTOFS_DEV_IOCTL_CLOSEMOUNT _IOWR(AUTOFS_IOCTL, AUTOFS_DEV_IOCTL_CLOSEMOUNT_CMD, struct autofs_dev_ioctl) -#define AUTOFS_DEV_IOCTL_READY \ - _IOWR(AUTOFS_IOCTL, AUTOFS_DEV_IOCTL_READY_CMD, struct autofs_dev_ioctl) +#define AUTOFS_DEV_IOCTL_READY _IOWR(AUTOFS_IOCTL, AUTOFS_DEV_IOCTL_READY_CMD, struct autofs_dev_ioctl) -#define AUTOFS_DEV_IOCTL_FAIL \ - _IOWR(AUTOFS_IOCTL, AUTOFS_DEV_IOCTL_FAIL_CMD, struct autofs_dev_ioctl) +#define AUTOFS_DEV_IOCTL_FAIL _IOWR(AUTOFS_IOCTL, AUTOFS_DEV_IOCTL_FAIL_CMD, struct autofs_dev_ioctl) -#define AUTOFS_DEV_IOCTL_SETPIPEFD \ - _IOWR(AUTOFS_IOCTL, AUTOFS_DEV_IOCTL_SETPIPEFD_CMD, \ - struct autofs_dev_ioctl) +#define AUTOFS_DEV_IOCTL_SETPIPEFD _IOWR(AUTOFS_IOCTL, AUTOFS_DEV_IOCTL_SETPIPEFD_CMD, struct autofs_dev_ioctl) -#define AUTOFS_DEV_IOCTL_CATATONIC \ - _IOWR(AUTOFS_IOCTL, AUTOFS_DEV_IOCTL_CATATONIC_CMD, \ - struct autofs_dev_ioctl) +#define AUTOFS_DEV_IOCTL_CATATONIC _IOWR(AUTOFS_IOCTL, AUTOFS_DEV_IOCTL_CATATONIC_CMD, struct autofs_dev_ioctl) -#define AUTOFS_DEV_IOCTL_TIMEOUT \ - _IOWR(AUTOFS_IOCTL, AUTOFS_DEV_IOCTL_TIMEOUT_CMD, \ - struct autofs_dev_ioctl) +#define AUTOFS_DEV_IOCTL_TIMEOUT _IOWR(AUTOFS_IOCTL, AUTOFS_DEV_IOCTL_TIMEOUT_CMD, struct autofs_dev_ioctl) -#define AUTOFS_DEV_IOCTL_REQUESTER \ - _IOWR(AUTOFS_IOCTL, AUTOFS_DEV_IOCTL_REQUESTER_CMD, \ - struct autofs_dev_ioctl) +#define AUTOFS_DEV_IOCTL_REQUESTER _IOWR(AUTOFS_IOCTL, AUTOFS_DEV_IOCTL_REQUESTER_CMD, struct autofs_dev_ioctl) -#define AUTOFS_DEV_IOCTL_EXPIRE \ - _IOWR(AUTOFS_IOCTL, AUTOFS_DEV_IOCTL_EXPIRE_CMD, \ - struct autofs_dev_ioctl) +#define AUTOFS_DEV_IOCTL_EXPIRE _IOWR(AUTOFS_IOCTL, AUTOFS_DEV_IOCTL_EXPIRE_CMD, struct autofs_dev_ioctl) -#define AUTOFS_DEV_IOCTL_ASKUMOUNT \ - _IOWR(AUTOFS_IOCTL, AUTOFS_DEV_IOCTL_ASKUMOUNT_CMD, \ - struct autofs_dev_ioctl) +#define AUTOFS_DEV_IOCTL_ASKUMOUNT _IOWR(AUTOFS_IOCTL, AUTOFS_DEV_IOCTL_ASKUMOUNT_CMD, struct autofs_dev_ioctl) -#define AUTOFS_DEV_IOCTL_ISMOUNTPOINT \ - _IOWR(AUTOFS_IOCTL, AUTOFS_DEV_IOCTL_ISMOUNTPOINT_CMD, \ - struct autofs_dev_ioctl) +#define AUTOFS_DEV_IOCTL_ISMOUNTPOINT _IOWR(AUTOFS_IOCTL, AUTOFS_DEV_IOCTL_ISMOUNTPOINT_CMD, struct autofs_dev_ioctl) #endif /* _LINUX_AUTO_DEV_IOCTL_H */ diff --git a/include/arch/x86_64/linux/auto_fs.h b/include/arch/x86_64/linux/auto_fs.h index 71ecd3eb..8e4a887f 100644 --- a/include/arch/x86_64/linux/auto_fs.h +++ b/include/arch/x86_64/linux/auto_fs.h @@ -70,16 +70,13 @@ enum { AUTOFS_IOC_EXPIRE_CMD, }; -#define AUTOFS_IOC_READY _IO(AUTOFS_IOCTL, AUTOFS_IOC_READY_CMD) -#define AUTOFS_IOC_FAIL _IO(AUTOFS_IOCTL, AUTOFS_IOC_FAIL_CMD) -#define AUTOFS_IOC_CATATONIC _IO(AUTOFS_IOCTL, AUTOFS_IOC_CATATONIC_CMD) -#define AUTOFS_IOC_PROTOVER _IOR(AUTOFS_IOCTL, AUTOFS_IOC_PROTOVER_CMD, int) -#define AUTOFS_IOC_SETTIMEOUT32 \ - _IOWR(AUTOFS_IOCTL, AUTOFS_IOC_SETTIMEOUT_CMD, compat_ulong_t) -#define AUTOFS_IOC_SETTIMEOUT \ - _IOWR(AUTOFS_IOCTL, AUTOFS_IOC_SETTIMEOUT_CMD, unsigned long) -#define AUTOFS_IOC_EXPIRE \ - _IOR(AUTOFS_IOCTL, AUTOFS_IOC_EXPIRE_CMD, struct autofs_packet_expire) +#define AUTOFS_IOC_READY _IO(AUTOFS_IOCTL, AUTOFS_IOC_READY_CMD) +#define AUTOFS_IOC_FAIL _IO(AUTOFS_IOCTL, AUTOFS_IOC_FAIL_CMD) +#define AUTOFS_IOC_CATATONIC _IO(AUTOFS_IOCTL, AUTOFS_IOC_CATATONIC_CMD) +#define AUTOFS_IOC_PROTOVER _IOR(AUTOFS_IOCTL, AUTOFS_IOC_PROTOVER_CMD, int) +#define AUTOFS_IOC_SETTIMEOUT32 _IOWR(AUTOFS_IOCTL, AUTOFS_IOC_SETTIMEOUT_CMD, compat_ulong_t) +#define AUTOFS_IOC_SETTIMEOUT _IOWR(AUTOFS_IOCTL, AUTOFS_IOC_SETTIMEOUT_CMD, unsigned long) +#define AUTOFS_IOC_EXPIRE _IOR(AUTOFS_IOCTL, AUTOFS_IOC_EXPIRE_CMD, struct autofs_packet_expire) /* autofs version 4 and later definitions */ @@ -211,10 +208,8 @@ enum { AUTOFS_IOC_ASKUMOUNT_CMD = 0x70, /* AUTOFS_DEV_IOCTL_VERSION_CMD - 1 */ }; -#define AUTOFS_IOC_EXPIRE_MULTI \ - _IOW(AUTOFS_IOCTL, AUTOFS_IOC_EXPIRE_MULTI_CMD, int) -#define AUTOFS_IOC_PROTOSUBVER \ - _IOR(AUTOFS_IOCTL, AUTOFS_IOC_PROTOSUBVER_CMD, int) -#define AUTOFS_IOC_ASKUMOUNT _IOR(AUTOFS_IOCTL, AUTOFS_IOC_ASKUMOUNT_CMD, int) +#define AUTOFS_IOC_EXPIRE_MULTI _IOW(AUTOFS_IOCTL, AUTOFS_IOC_EXPIRE_MULTI_CMD, int) +#define AUTOFS_IOC_PROTOSUBVER _IOR(AUTOFS_IOCTL, AUTOFS_IOC_PROTOSUBVER_CMD, int) +#define AUTOFS_IOC_ASKUMOUNT _IOR(AUTOFS_IOCTL, AUTOFS_IOC_ASKUMOUNT_CMD, int) #endif /* _LINUX_AUTO_FS_H */ diff --git a/include/arch/x86_64/linux/bfs_fs.h b/include/arch/x86_64/linux/bfs_fs.h index 22163401..db20333f 100644 --- a/include/arch/x86_64/linux/bfs_fs.h +++ b/include/arch/x86_64/linux/bfs_fs.h @@ -61,23 +61,15 @@ struct bfs_super_block { __u32 s_padding[118]; }; -#define BFS_OFF2INO(offset) \ - ((((offset) - BFS_BSIZE) / sizeof(struct bfs_inode)) + BFS_ROOT_INO) +#define BFS_OFF2INO(offset) ((((offset) - BFS_BSIZE) / sizeof(struct bfs_inode)) + BFS_ROOT_INO) -#define BFS_INO2OFF(ino) \ - ((__u32)(((ino) - BFS_ROOT_INO) * sizeof(struct bfs_inode)) + BFS_BSIZE) -#define BFS_NZFILESIZE(ip) \ - ((le32_to_cpu((ip)->i_eoffset) + 1) - \ - le32_to_cpu((ip)->i_sblock) * BFS_BSIZE) +#define BFS_INO2OFF(ino) ((__u32)(((ino) - BFS_ROOT_INO) * sizeof(struct bfs_inode)) + BFS_BSIZE) +#define BFS_NZFILESIZE(ip) ((le32_to_cpu((ip)->i_eoffset) + 1) - le32_to_cpu((ip)->i_sblock) * BFS_BSIZE) #define BFS_FILESIZE(ip) ((ip)->i_sblock == 0 ? 0 : BFS_NZFILESIZE(ip)) -#define BFS_FILEBLOCKS(ip) \ - ((ip)->i_sblock == 0 ? 0 : \ - (le32_to_cpu((ip)->i_eblock) + 1) - \ - le32_to_cpu((ip)->i_sblock)) -#define BFS_UNCLEAN(bfs_sb, sb) \ - ((le32_to_cpu(bfs_sb->s_from) != -1) && \ - (le32_to_cpu(bfs_sb->s_to) != -1) && !(sb->s_flags & SB_RDONLY)) +#define BFS_FILEBLOCKS(ip) ((ip)->i_sblock == 0 ? 0 : (le32_to_cpu((ip)->i_eblock) + 1) - le32_to_cpu((ip)->i_sblock)) +#define BFS_UNCLEAN(bfs_sb, sb) \ + ((le32_to_cpu(bfs_sb->s_from) != -1) && (le32_to_cpu(bfs_sb->s_to) != -1) && !(sb->s_flags & SB_RDONLY)) #endif /* _LINUX_BFS_FS_H */ diff --git a/include/arch/x86_64/linux/bits.h b/include/arch/x86_64/linux/bits.h index 7c2f98e4..9838e9d6 100644 --- a/include/arch/x86_64/linux/bits.h +++ b/include/arch/x86_64/linux/bits.h @@ -4,11 +4,9 @@ #ifndef _LINUX_BITS_H #define _LINUX_BITS_H -#define __GENMASK(h, l) \ - (((~_UL(0)) << (l)) & (~_UL(0) >> (__BITS_PER_LONG - 1 - (h)))) +#define __GENMASK(h, l) (((~_UL(0)) << (l)) & (~_UL(0) >> (__BITS_PER_LONG - 1 - (h)))) -#define __GENMASK_ULL(h, l) \ - (((~_ULL(0)) << (l)) & (~_ULL(0) >> (__BITS_PER_LONG_LONG - 1 - (h)))) +#define __GENMASK_ULL(h, l) (((~_ULL(0)) << (l)) & (~_ULL(0) >> (__BITS_PER_LONG_LONG - 1 - (h)))) #define __GENMASK_U128(h, l) ((_BIT128((h)) << 1) - (_BIT128(l))) diff --git a/include/arch/x86_64/linux/blk-crypto.h b/include/arch/x86_64/linux/blk-crypto.h index 5055afb8..dad306c1 100644 --- a/include/arch/x86_64/linux/blk-crypto.h +++ b/include/arch/x86_64/linux/blk-crypto.h @@ -37,9 +37,8 @@ struct blk_crypto_prepare_key_arg { * 140-141 are reserved for future blk-crypto ioctls; any more than that would * require an additional allocation from the block device ioctl space. */ -#define BLKCRYPTOIMPORTKEY _IOWR(0x12, 137, struct blk_crypto_import_key_arg) -#define BLKCRYPTOGENERATEKEY \ - _IOWR(0x12, 138, struct blk_crypto_generate_key_arg) -#define BLKCRYPTOPREPAREKEY _IOWR(0x12, 139, struct blk_crypto_prepare_key_arg) +#define BLKCRYPTOIMPORTKEY _IOWR(0x12, 137, struct blk_crypto_import_key_arg) +#define BLKCRYPTOGENERATEKEY _IOWR(0x12, 138, struct blk_crypto_generate_key_arg) +#define BLKCRYPTOPREPAREKEY _IOWR(0x12, 139, struct blk_crypto_prepare_key_arg) #endif /* _LINUX_BLK_CRYPTO_H */ diff --git a/include/arch/x86_64/linux/bpf.h b/include/arch/x86_64/linux/bpf.h index 529e6cbd..7c4ac22c 100644 --- a/include/arch/x86_64/linux/bpf.h +++ b/include/arch/x86_64/linux/bpf.h @@ -47,7 +47,7 @@ #define BPF_EXIT 0x90 /* function return */ /* atomic op type fields (stored in immediate) */ -#define BPF_FETCH 0x01 /* not an opcode on its own, used to build others */ +#define BPF_FETCH 0x01 /* not an opcode on its own, used to build others */ #define BPF_XCHG (0xe0 | BPF_FETCH) /* atomic exchange */ #define BPF_CMPXCHG (0xf0 | BPF_FETCH) /* atomic compare-and-write */ @@ -1013,8 +1013,7 @@ enum bpf_map_type { * functionality and more. So mark * BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE * deprecated. */ - BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = - BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED, + BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED, BPF_MAP_TYPE_QUEUE, BPF_MAP_TYPE_STACK, BPF_MAP_TYPE_SK_STORAGE, @@ -1483,7 +1482,7 @@ enum { }; union bpf_attr { - struct { /* anonymous struct used by BPF_MAP_CREATE command */ + struct { /* anonymous struct used by BPF_MAP_CREATE command */ __u32 map_type; /* one of enum bpf_map_type */ __u32 key_size; /* size of key in bytes */ __u32 value_size; /* size of value in bytes */ @@ -1496,10 +1495,10 @@ union bpf_attr { * BPF_F_NUMA_NODE is set). */ char map_name[BPF_OBJ_NAME_LEN]; - __u32 map_ifindex; /* ifindex of netdev to create on */ - __u32 btf_fd; /* fd pointing to a BTF type data */ - __u32 btf_key_type_id; /* BTF type_id of the key */ - __u32 btf_value_type_id; /* BTF type_id of the value */ + __u32 map_ifindex; /* ifindex of netdev to create on */ + __u32 btf_fd; /* fd pointing to a BTF type data */ + __u32 btf_key_type_id; /* BTF type_id of the key */ + __u32 btf_value_type_id; /* BTF type_id of the value */ __u32 btf_vmlinux_value_type_id; /* BTF type_id of a kernel- * struct stored as the * map value @@ -1536,7 +1535,7 @@ union bpf_attr { __u64 flags; }; - struct { /* struct used by BPF_MAP_*_BATCH commands */ + struct { /* struct used by BPF_MAP_*_BATCH commands */ __aligned_u64 in_batch; /* start batch, * NULL to start from beginning */ @@ -1553,7 +1552,7 @@ union bpf_attr { __u64 flags; } batch; - struct { /* anonymous struct used by BPF_PROG_LOAD command */ + struct { /* anonymous struct used by BPF_PROG_LOAD command */ __u32 prog_type; /* one of enum bpf_prog_type */ __u32 insn_cnt; __aligned_u64 insns; @@ -1577,7 +1576,7 @@ union bpf_attr { __u32 line_info_rec_size; /* userspace bpf_line_info size */ __aligned_u64 line_info; /* line info */ __u32 line_info_cnt; /* number of bpf_line_info records */ - __u32 attach_btf_id; /* in-kernel BTF type id to attach to */ + __u32 attach_btf_id; /* in-kernel BTF type id to attach to */ union { /* valid prog_fd to attach to bpf prog */ __u32 attach_prog_fd; @@ -1626,7 +1625,7 @@ union bpf_attr { struct { /* anonymous struct used by BPF_PROG_ATTACH/DETACH commands */ union { - __u32 target_fd; /* target object to attach to or ... */ + __u32 target_fd; /* target object to attach to or ... */ __u32 target_ifindex; /* target ifindex */ }; __u32 attach_bpf_fd; @@ -1685,7 +1684,7 @@ union bpf_attr { struct { /* anonymous struct used by BPF_PROG_QUERY command */ union { - __u32 target_fd; /* target object to query or ... */ + __u32 target_fd; /* target object to query or ... */ __u32 target_ifindex; /* target ifindex */ }; __u32 attach_type; @@ -1754,7 +1753,7 @@ union bpf_attr { __u32 map_fd; /* struct_ops to attach */ }; union { - __u32 target_fd; /* target object to attach to or ... */ + __u32 target_fd; /* target object to attach to or ... */ __u32 target_ifindex; /* target ifindex */ }; __u32 attach_type; /* attach type */ @@ -6117,9 +6116,7 @@ enum { BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 56, }; -#define BPF_F_ADJ_ROOM_ENCAP_L2(len) \ - (((__u64)len & BPF_ADJ_ROOM_ENCAP_L2_MASK) \ - << BPF_ADJ_ROOM_ENCAP_L2_SHIFT) +#define BPF_F_ADJ_ROOM_ENCAP_L2(len) (((__u64)len & BPF_ADJ_ROOM_ENCAP_L2_MASK) << BPF_ADJ_ROOM_ENCAP_L2_SHIFT) /* BPF_FUNC_sysctl_get_name flags. */ enum { @@ -6198,8 +6195,7 @@ enum { BPF_F_INGRESS = (1ULL << 0), /* used for skb path */ BPF_F_BROADCAST = (1ULL << 3), /* used for XDP path */ BPF_F_EXCLUDE_INGRESS = (1ULL << 4), /* used for XDP path */ -#define BPF_F_REDIRECT_FLAGS \ - (BPF_F_INGRESS | BPF_F_BROADCAST | BPF_F_EXCLUDE_INGRESS) +#define BPF_F_REDIRECT_FLAGS (BPF_F_INGRESS | BPF_F_BROADCAST | BPF_F_EXCLUDE_INGRESS) }; #define __bpf_md_ptr(type, name) \ @@ -6644,8 +6640,8 @@ struct bpf_link_info { struct { __aligned_u64 target_name; /* in/out: target_name buffer ptr */ - __u32 target_name_len; /* in/out: target_name buffer len - */ + __u32 target_name_len; /* in/out: target_name buffer len + */ /* If the iter specific field is 32 bits, it can be put * in the first or second union. Otherwise it should be @@ -6926,8 +6922,7 @@ enum { enum { SK_BPF_CB_TX_TIMESTAMPING = 1 << 0, - SK_BPF_CB_MASK = (SK_BPF_CB_TX_TIMESTAMPING - 1) | - SK_BPF_CB_TX_TIMESTAMPING + SK_BPF_CB_MASK = (SK_BPF_CB_TX_TIMESTAMPING - 1) | SK_BPF_CB_TX_TIMESTAMPING }; /* List of known BPF sock_ops operators. @@ -6935,16 +6930,16 @@ enum { */ enum { BPF_SOCK_OPS_VOID, - BPF_SOCK_OPS_TIMEOUT_INIT, /* Should return SYN-RTO value to use or - * -1 if default value should be used - */ - BPF_SOCK_OPS_RWND_INIT, /* Should return initial advertized - * window (in packets) or -1 if default - * value should be used - */ - BPF_SOCK_OPS_TCP_CONNECT_CB, /* Calls BPF program right before an - * active connection is initialized - */ + BPF_SOCK_OPS_TIMEOUT_INIT, /* Should return SYN-RTO value to use or + * -1 if default value should be used + */ + BPF_SOCK_OPS_RWND_INIT, /* Should return initial advertized + * window (in packets) or -1 if default + * value should be used + */ + BPF_SOCK_OPS_TCP_CONNECT_CB, /* Calls BPF program right before an + * active connection is initialized + */ BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB, /* Calls BPF program when an * active connection is * established @@ -6953,119 +6948,119 @@ enum { * passive connection is * established */ - BPF_SOCK_OPS_NEEDS_ECN, /* If connection's congestion control - * needs ECN - */ - BPF_SOCK_OPS_BASE_RTT, /* Get base RTT. The correct value is - * based on the path and may be - * dependent on the congestion control - * algorithm. In general it indicates - * a congestion threshold. RTTs above - * this indicate congestion - */ - BPF_SOCK_OPS_RTO_CB, /* Called when an RTO has triggered. - * Arg1: value of icsk_retransmits - * Arg2: value of icsk_rto - * Arg3: whether RTO has expired - */ - BPF_SOCK_OPS_RETRANS_CB, /* Called when skb is retransmitted. - * Arg1: sequence number of 1st byte - * Arg2: # segments - * Arg3: return value of - * tcp_transmit_skb (0 => success) - */ - BPF_SOCK_OPS_STATE_CB, /* Called when TCP changes state. - * Arg1: old_state - * Arg2: new_state - */ - BPF_SOCK_OPS_TCP_LISTEN_CB, /* Called on listen(2), right after - * socket transition to LISTEN state. - */ - BPF_SOCK_OPS_RTT_CB, /* Called on every RTT. - * Arg1: measured RTT input (mrtt) - * Arg2: updated srtt - */ - BPF_SOCK_OPS_PARSE_HDR_OPT_CB, /* Parse the header option. - * It will be called to handle - * the packets received at - * an already established - * connection. - * - * sock_ops->skb_data: - * Referring to the received skb. - * It covers the TCP header only. - * - * bpf_load_hdr_opt() can also - * be used to search for a - * particular option. - */ - BPF_SOCK_OPS_HDR_OPT_LEN_CB, /* Reserve space for writing the - * header option later in - * BPF_SOCK_OPS_WRITE_HDR_OPT_CB. - * Arg1: bool want_cookie. (in - * writing SYNACK only) - * - * sock_ops->skb_data: - * Not available because no header has - * been written yet. - * - * sock_ops->skb_tcp_flags: - * The tcp_flags of the - * outgoing skb. (e.g. SYN, ACK, FIN). - * - * bpf_reserve_hdr_opt() should - * be used to reserve space. - */ - BPF_SOCK_OPS_WRITE_HDR_OPT_CB, /* Write the header options - * Arg1: bool want_cookie. (in - * writing SYNACK only) - * - * sock_ops->skb_data: - * Referring to the outgoing skb. - * It covers the TCP header - * that has already been written - * by the kernel and the - * earlier bpf-progs. - * - * sock_ops->skb_tcp_flags: - * The tcp_flags of the outgoing - * skb. (e.g. SYN, ACK, FIN). - * - * bpf_store_hdr_opt() should - * be used to write the - * option. - * - * bpf_load_hdr_opt() can also - * be used to search for a - * particular option that - * has already been written - * by the kernel or the - * earlier bpf-progs. - */ - BPF_SOCK_OPS_TSTAMP_SCHED_CB, /* Called when skb is passing - * through dev layer when - * SK_BPF_CB_TX_TIMESTAMPING - * feature is on. - */ - BPF_SOCK_OPS_TSTAMP_SND_SW_CB, /* Called when skb is about to send - * to the nic when - * SK_BPF_CB_TX_TIMESTAMPING feature is - * on. - */ - BPF_SOCK_OPS_TSTAMP_SND_HW_CB, /* Called in hardware phase when - * SK_BPF_CB_TX_TIMESTAMPING feature - * is on. - */ - BPF_SOCK_OPS_TSTAMP_ACK_CB, /* Called when all the skbs in the - * same sendmsg call are acked - * when SK_BPF_CB_TX_TIMESTAMPING - * feature is on. - */ - BPF_SOCK_OPS_TSTAMP_SENDMSG_CB, /* Called when every sendmsg syscall - * is triggered. It's used to correlate - * sendmsg timestamp with corresponding - * tskey. - */ + BPF_SOCK_OPS_NEEDS_ECN, /* If connection's congestion control + * needs ECN + */ + BPF_SOCK_OPS_BASE_RTT, /* Get base RTT. The correct value is + * based on the path and may be + * dependent on the congestion control + * algorithm. In general it indicates + * a congestion threshold. RTTs above + * this indicate congestion + */ + BPF_SOCK_OPS_RTO_CB, /* Called when an RTO has triggered. + * Arg1: value of icsk_retransmits + * Arg2: value of icsk_rto + * Arg3: whether RTO has expired + */ + BPF_SOCK_OPS_RETRANS_CB, /* Called when skb is retransmitted. + * Arg1: sequence number of 1st byte + * Arg2: # segments + * Arg3: return value of + * tcp_transmit_skb (0 => success) + */ + BPF_SOCK_OPS_STATE_CB, /* Called when TCP changes state. + * Arg1: old_state + * Arg2: new_state + */ + BPF_SOCK_OPS_TCP_LISTEN_CB, /* Called on listen(2), right after + * socket transition to LISTEN state. + */ + BPF_SOCK_OPS_RTT_CB, /* Called on every RTT. + * Arg1: measured RTT input (mrtt) + * Arg2: updated srtt + */ + BPF_SOCK_OPS_PARSE_HDR_OPT_CB, /* Parse the header option. + * It will be called to handle + * the packets received at + * an already established + * connection. + * + * sock_ops->skb_data: + * Referring to the received skb. + * It covers the TCP header only. + * + * bpf_load_hdr_opt() can also + * be used to search for a + * particular option. + */ + BPF_SOCK_OPS_HDR_OPT_LEN_CB, /* Reserve space for writing the + * header option later in + * BPF_SOCK_OPS_WRITE_HDR_OPT_CB. + * Arg1: bool want_cookie. (in + * writing SYNACK only) + * + * sock_ops->skb_data: + * Not available because no header has + * been written yet. + * + * sock_ops->skb_tcp_flags: + * The tcp_flags of the + * outgoing skb. (e.g. SYN, ACK, FIN). + * + * bpf_reserve_hdr_opt() should + * be used to reserve space. + */ + BPF_SOCK_OPS_WRITE_HDR_OPT_CB, /* Write the header options + * Arg1: bool want_cookie. (in + * writing SYNACK only) + * + * sock_ops->skb_data: + * Referring to the outgoing skb. + * It covers the TCP header + * that has already been written + * by the kernel and the + * earlier bpf-progs. + * + * sock_ops->skb_tcp_flags: + * The tcp_flags of the outgoing + * skb. (e.g. SYN, ACK, FIN). + * + * bpf_store_hdr_opt() should + * be used to write the + * option. + * + * bpf_load_hdr_opt() can also + * be used to search for a + * particular option that + * has already been written + * by the kernel or the + * earlier bpf-progs. + */ + BPF_SOCK_OPS_TSTAMP_SCHED_CB, /* Called when skb is passing + * through dev layer when + * SK_BPF_CB_TX_TIMESTAMPING + * feature is on. + */ + BPF_SOCK_OPS_TSTAMP_SND_SW_CB, /* Called when skb is about to send + * to the nic when + * SK_BPF_CB_TX_TIMESTAMPING feature is + * on. + */ + BPF_SOCK_OPS_TSTAMP_SND_HW_CB, /* Called in hardware phase when + * SK_BPF_CB_TX_TIMESTAMPING feature + * is on. + */ + BPF_SOCK_OPS_TSTAMP_ACK_CB, /* Called when all the skbs in the + * same sendmsg call are acked + * when SK_BPF_CB_TX_TIMESTAMPING + * feature is on. + */ + BPF_SOCK_OPS_TSTAMP_SENDMSG_CB, /* Called when every sendmsg syscall + * is triggered. It's used to correlate + * sendmsg timestamp with corresponding + * tskey. + */ }; /* List of TCP states. There is a build check in net/ipv4/tcp.c to detect @@ -7128,11 +7123,11 @@ enum { * -ENOENT: The SYN skb is not available now and the earlier SYN pkt * is not saved by setsockopt(TCP_SAVE_SYN). */ - TCP_BPF_SYN = 1005, /* Copy the TCP header */ - TCP_BPF_SYN_IP = 1006, /* Copy the IP[46] and TCP header */ - TCP_BPF_SYN_MAC = 1007, /* Copy the MAC, IP[46], and TCP header */ + TCP_BPF_SYN = 1005, /* Copy the TCP header */ + TCP_BPF_SYN_IP = 1006, /* Copy the IP[46] and TCP header */ + TCP_BPF_SYN_MAC = 1007, /* Copy the MAC, IP[46], and TCP header */ TCP_BPF_SOCK_OPS_CB_FLAGS = 1008, /* Get or Set TCP sock ops flags */ - SK_BPF_CB_FLAGS = 1009, /* Get or set sock ops flags in socket */ + SK_BPF_CB_FLAGS = 1009, /* Get or set sock ops flags in socket */ }; enum { @@ -7426,8 +7421,8 @@ struct bpf_pidns_info { struct bpf_sk_lookup { union { __bpf_md_ptr(struct bpf_sock *, sk); /* Selected socket */ - __u64 cookie; /* Non-zero if socket was selected in - PROG_TEST_RUN */ + __u64 cookie; /* Non-zero if socket was selected in + PROG_TEST_RUN */ }; __u32 family; /* Protocol family (AF_INET, AF_INET6) */ diff --git a/include/arch/x86_64/linux/btrfs.h b/include/arch/x86_64/linux/btrfs.h index d8bee719..de654681 100644 --- a/include/arch/x86_64/linux/btrfs.h +++ b/include/arch/x86_64/linux/btrfs.h @@ -51,9 +51,8 @@ struct btrfs_ioctl_vol_args { #define BTRFS_SUBVOL_SPEC_BY_ID (1ULL << 4) -#define BTRFS_VOL_ARG_V2_FLAGS_SUPPORTED \ - (BTRFS_SUBVOL_RDONLY | BTRFS_SUBVOL_QGROUP_INHERIT | \ - BTRFS_DEVICE_SPEC_BY_ID | BTRFS_SUBVOL_SPEC_BY_ID) +#define BTRFS_VOL_ARG_V2_FLAGS_SUPPORTED \ + (BTRFS_SUBVOL_RDONLY | BTRFS_SUBVOL_QGROUP_INHERIT | BTRFS_DEVICE_SPEC_BY_ID | BTRFS_SUBVOL_SPEC_BY_ID) #define BTRFS_FSID_SIZE 16 #define BTRFS_UUID_SIZE 16 @@ -120,8 +119,7 @@ struct btrfs_ioctl_qgroup_limit_args { /* Supported flags for BTRFS_IOC_SNAP_CREATE_V2 and BTRFS_IOC_SUBVOL_CREATE_V2 */ -#define BTRFS_SUBVOL_CREATE_ARGS_MASK \ - (BTRFS_SUBVOL_RDONLY | BTRFS_SUBVOL_QGROUP_INHERIT) +#define BTRFS_SUBVOL_CREATE_ARGS_MASK (BTRFS_SUBVOL_RDONLY | BTRFS_SUBVOL_QGROUP_INHERIT) /* Supported flags for BTRFS_IOC_SNAP_DESTROY_V2 */ #define BTRFS_SUBVOL_DELETE_ARGS_MASK (BTRFS_SUBVOL_SPEC_BY_ID) @@ -196,7 +194,7 @@ struct btrfs_ioctl_scrub_args { #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 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 */ @@ -414,8 +412,7 @@ struct btrfs_balance_progress { #define BTRFS_BALANCE_SYSTEM (1ULL << 1) #define BTRFS_BALANCE_METADATA (1ULL << 2) -#define BTRFS_BALANCE_TYPE_MASK \ - (BTRFS_BALANCE_DATA | BTRFS_BALANCE_SYSTEM | BTRFS_BALANCE_METADATA) +#define BTRFS_BALANCE_TYPE_MASK (BTRFS_BALANCE_DATA | BTRFS_BALANCE_SYSTEM | BTRFS_BALANCE_METADATA) #define BTRFS_BALANCE_FORCE (1ULL << 3) #define BTRFS_BALANCE_RESUME (1ULL << 4) @@ -438,12 +435,10 @@ struct btrfs_balance_progress { #define BTRFS_BALANCE_ARGS_STRIPES_RANGE (1ULL << 7) #define BTRFS_BALANCE_ARGS_USAGE_RANGE (1ULL << 10) -#define BTRFS_BALANCE_ARGS_MASK \ - (BTRFS_BALANCE_ARGS_PROFILES | BTRFS_BALANCE_ARGS_USAGE | \ - BTRFS_BALANCE_ARGS_DEVID | BTRFS_BALANCE_ARGS_DRANGE | \ - BTRFS_BALANCE_ARGS_VRANGE | BTRFS_BALANCE_ARGS_LIMIT | \ - BTRFS_BALANCE_ARGS_LIMIT_RANGE | BTRFS_BALANCE_ARGS_STRIPES_RANGE | \ - BTRFS_BALANCE_ARGS_USAGE_RANGE) +#define BTRFS_BALANCE_ARGS_MASK \ + (BTRFS_BALANCE_ARGS_PROFILES | BTRFS_BALANCE_ARGS_USAGE | BTRFS_BALANCE_ARGS_DEVID | \ + BTRFS_BALANCE_ARGS_DRANGE | BTRFS_BALANCE_ARGS_VRANGE | BTRFS_BALANCE_ARGS_LIMIT | \ + BTRFS_BALANCE_ARGS_LIMIT_RANGE | BTRFS_BALANCE_ARGS_STRIPES_RANGE | BTRFS_BALANCE_ARGS_USAGE_RANGE) /* * Profile changing flags. When SOFT is set we won't relocate chunk if @@ -606,9 +601,9 @@ struct btrfs_ioctl_clone_range_args { #define BTRFS_DEFRAG_RANGE_COMPRESS_LEVEL 4 /* Request no compression on the range (uncompress if necessary). */ #define BTRFS_DEFRAG_RANGE_NOCOMPRESS 8 -#define BTRFS_DEFRAG_RANGE_FLAGS_SUPP \ - (BTRFS_DEFRAG_RANGE_COMPRESS | BTRFS_DEFRAG_RANGE_COMPRESS_LEVEL | \ - BTRFS_DEFRAG_RANGE_NOCOMPRESS | BTRFS_DEFRAG_RANGE_START_IO) +#define BTRFS_DEFRAG_RANGE_FLAGS_SUPP \ + (BTRFS_DEFRAG_RANGE_COMPRESS | BTRFS_DEFRAG_RANGE_COMPRESS_LEVEL | BTRFS_DEFRAG_RANGE_NOCOMPRESS | \ + BTRFS_DEFRAG_RANGE_START_IO) struct btrfs_ioctl_defrag_range_args { /* start of the defrag operation */ @@ -827,10 +822,9 @@ struct btrfs_ioctl_received_subvol_args { */ #define BTRFS_SEND_FLAG_COMPRESSED 0x10 -#define BTRFS_SEND_FLAG_MASK \ - (BTRFS_SEND_FLAG_NO_FILE_DATA | BTRFS_SEND_FLAG_OMIT_STREAM_HEADER | \ - BTRFS_SEND_FLAG_OMIT_END_CMD | BTRFS_SEND_FLAG_VERSION | \ - BTRFS_SEND_FLAG_COMPRESSED) +#define BTRFS_SEND_FLAG_MASK \ + (BTRFS_SEND_FLAG_NO_FILE_DATA | BTRFS_SEND_FLAG_OMIT_STREAM_HEADER | BTRFS_SEND_FLAG_OMIT_END_CMD | \ + BTRFS_SEND_FLAG_VERSION | BTRFS_SEND_FLAG_COMPRESSED) struct btrfs_ioctl_send_args { __s64 send_fd; /* in */ @@ -1084,14 +1078,11 @@ enum btrfs_err_code { BTRFS_ERROR_DEV_RAID1C4_MIN_NOT_MET, }; -#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) -#define BTRFS_IOC_FORGET_DEV \ - _IOW(BTRFS_IOCTL_MAGIC, 5, struct btrfs_ioctl_vol_args) +#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) +#define BTRFS_IOC_FORGET_DEV _IOW(BTRFS_IOCTL_MAGIC, 5, 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 @@ -1100,108 +1091,64 @@ enum btrfs_err_code { #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_TREE_SEARCH_V2 \ - _IOWR(BTRFS_IOCTL_MAGIC, 17, struct btrfs_ioctl_search_args_v2) -#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_logical_ino_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_QUOTA_RESCAN_WAIT _IO(BTRFS_IOCTL_MAGIC, 46) -#define BTRFS_IOC_GET_FSLABEL FS_IOC_GETFSLABEL -#define BTRFS_IOC_SET_FSLABEL FS_IOC_SETFSLABEL -#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) -#define BTRFS_IOC_FILE_EXTENT_SAME \ - _IOWR(BTRFS_IOCTL_MAGIC, 54, struct btrfs_ioctl_same_args) -#define BTRFS_IOC_GET_FEATURES \ - _IOR(BTRFS_IOCTL_MAGIC, 57, struct btrfs_ioctl_feature_flags) -#define BTRFS_IOC_SET_FEATURES \ - _IOW(BTRFS_IOCTL_MAGIC, 57, struct btrfs_ioctl_feature_flags[2]) -#define BTRFS_IOC_GET_SUPPORTED_FEATURES \ - _IOR(BTRFS_IOCTL_MAGIC, 57, struct btrfs_ioctl_feature_flags[3]) -#define BTRFS_IOC_RM_DEV_V2 \ - _IOW(BTRFS_IOCTL_MAGIC, 58, struct btrfs_ioctl_vol_args_v2) -#define BTRFS_IOC_LOGICAL_INO_V2 \ - _IOWR(BTRFS_IOCTL_MAGIC, 59, struct btrfs_ioctl_logical_ino_args) -#define BTRFS_IOC_GET_SUBVOL_INFO \ - _IOR(BTRFS_IOCTL_MAGIC, 60, struct btrfs_ioctl_get_subvol_info_args) -#define BTRFS_IOC_GET_SUBVOL_ROOTREF \ - _IOWR(BTRFS_IOCTL_MAGIC, 61, struct btrfs_ioctl_get_subvol_rootref_args) -#define BTRFS_IOC_INO_LOOKUP_USER \ - _IOWR(BTRFS_IOCTL_MAGIC, 62, struct btrfs_ioctl_ino_lookup_user_args) -#define BTRFS_IOC_SNAP_DESTROY_V2 \ - _IOW(BTRFS_IOCTL_MAGIC, 63, struct btrfs_ioctl_vol_args_v2) -#define BTRFS_IOC_ENCODED_READ \ - _IOR(BTRFS_IOCTL_MAGIC, 64, struct btrfs_ioctl_encoded_io_args) -#define BTRFS_IOC_ENCODED_WRITE \ - _IOW(BTRFS_IOCTL_MAGIC, 64, struct btrfs_ioctl_encoded_io_args) -#define BTRFS_IOC_SUBVOL_SYNC_WAIT \ - _IOW(BTRFS_IOCTL_MAGIC, 65, struct btrfs_ioctl_subvol_wait) +#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_TREE_SEARCH_V2 _IOWR(BTRFS_IOCTL_MAGIC, 17, struct btrfs_ioctl_search_args_v2) +#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_logical_ino_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_QUOTA_RESCAN_WAIT _IO(BTRFS_IOCTL_MAGIC, 46) +#define BTRFS_IOC_GET_FSLABEL FS_IOC_GETFSLABEL +#define BTRFS_IOC_SET_FSLABEL FS_IOC_SETFSLABEL +#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) +#define BTRFS_IOC_FILE_EXTENT_SAME _IOWR(BTRFS_IOCTL_MAGIC, 54, struct btrfs_ioctl_same_args) +#define BTRFS_IOC_GET_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, struct btrfs_ioctl_feature_flags) +#define BTRFS_IOC_SET_FEATURES _IOW(BTRFS_IOCTL_MAGIC, 57, struct btrfs_ioctl_feature_flags[2]) +#define BTRFS_IOC_GET_SUPPORTED_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, struct btrfs_ioctl_feature_flags[3]) +#define BTRFS_IOC_RM_DEV_V2 _IOW(BTRFS_IOCTL_MAGIC, 58, struct btrfs_ioctl_vol_args_v2) +#define BTRFS_IOC_LOGICAL_INO_V2 _IOWR(BTRFS_IOCTL_MAGIC, 59, struct btrfs_ioctl_logical_ino_args) +#define BTRFS_IOC_GET_SUBVOL_INFO _IOR(BTRFS_IOCTL_MAGIC, 60, struct btrfs_ioctl_get_subvol_info_args) +#define BTRFS_IOC_GET_SUBVOL_ROOTREF _IOWR(BTRFS_IOCTL_MAGIC, 61, struct btrfs_ioctl_get_subvol_rootref_args) +#define BTRFS_IOC_INO_LOOKUP_USER _IOWR(BTRFS_IOCTL_MAGIC, 62, struct btrfs_ioctl_ino_lookup_user_args) +#define BTRFS_IOC_SNAP_DESTROY_V2 _IOW(BTRFS_IOCTL_MAGIC, 63, struct btrfs_ioctl_vol_args_v2) +#define BTRFS_IOC_ENCODED_READ _IOR(BTRFS_IOCTL_MAGIC, 64, struct btrfs_ioctl_encoded_io_args) +#define BTRFS_IOC_ENCODED_WRITE _IOW(BTRFS_IOCTL_MAGIC, 64, struct btrfs_ioctl_encoded_io_args) +#define BTRFS_IOC_SUBVOL_SYNC_WAIT _IOW(BTRFS_IOCTL_MAGIC, 65, struct btrfs_ioctl_subvol_wait) #ifdef __cplusplus } diff --git a/include/arch/x86_64/linux/btrfs_tree.h b/include/arch/x86_64/linux/btrfs_tree.h index 74219192..411d253a 100644 --- a/include/arch/x86_64/linux/btrfs_tree.h +++ b/include/arch/x86_64/linux/btrfs_tree.h @@ -423,13 +423,10 @@ static __inline__ __u8 btrfs_dir_flags_to_ftype(__u8 flags) #define BTRFS_INODE_ROOT_ITEM_INIT (1U << 31) -#define BTRFS_INODE_FLAG_MASK \ - (BTRFS_INODE_NODATASUM | BTRFS_INODE_NODATACOW | \ - BTRFS_INODE_READONLY | BTRFS_INODE_NOCOMPRESS | \ - BTRFS_INODE_PREALLOC | BTRFS_INODE_SYNC | BTRFS_INODE_IMMUTABLE | \ - BTRFS_INODE_APPEND | BTRFS_INODE_NODUMP | BTRFS_INODE_NOATIME | \ - BTRFS_INODE_DIRSYNC | BTRFS_INODE_COMPRESS | \ - BTRFS_INODE_ROOT_ITEM_INIT) +#define BTRFS_INODE_FLAG_MASK \ + (BTRFS_INODE_NODATASUM | BTRFS_INODE_NODATACOW | BTRFS_INODE_READONLY | BTRFS_INODE_NOCOMPRESS | \ + BTRFS_INODE_PREALLOC | BTRFS_INODE_SYNC | BTRFS_INODE_IMMUTABLE | BTRFS_INODE_APPEND | BTRFS_INODE_NODUMP | \ + BTRFS_INODE_NOATIME | BTRFS_INODE_DIRSYNC | BTRFS_INODE_COMPRESS | BTRFS_INODE_ROOT_ITEM_INIT) #define BTRFS_INODE_RO_VERITY (1U << 0) @@ -788,8 +785,7 @@ struct btrfs_extent_item_v0 { #define BTRFS_BACKREF_REV_MAX 256 #define BTRFS_BACKREF_REV_SHIFT 56 -#define BTRFS_BACKREF_REV_MASK \ - (((u64)BTRFS_BACKREF_REV_MAX - 1) << BTRFS_BACKREF_REV_SHIFT) +#define BTRFS_BACKREF_REV_MASK (((u64)BTRFS_BACKREF_REV_MAX - 1) << BTRFS_BACKREF_REV_SHIFT) #define BTRFS_OLD_BACKREF_REV 0 #define BTRFS_MIXED_BACKREF_REV 1 @@ -1149,24 +1145,16 @@ struct btrfs_dev_replace_item { #define BTRFS_BLOCK_GROUP_RAID6 (1ULL << 8) #define BTRFS_BLOCK_GROUP_RAID1C3 (1ULL << 9) #define BTRFS_BLOCK_GROUP_RAID1C4 (1ULL << 10) -#define BTRFS_BLOCK_GROUP_RESERVED \ - (BTRFS_AVAIL_ALLOC_BIT_SINGLE | BTRFS_SPACE_INFO_GLOBAL_RSV) +#define BTRFS_BLOCK_GROUP_RESERVED (BTRFS_AVAIL_ALLOC_BIT_SINGLE | BTRFS_SPACE_INFO_GLOBAL_RSV) -#define BTRFS_BLOCK_GROUP_TYPE_MASK \ - (BTRFS_BLOCK_GROUP_DATA | BTRFS_BLOCK_GROUP_SYSTEM | \ - BTRFS_BLOCK_GROUP_METADATA) +#define BTRFS_BLOCK_GROUP_TYPE_MASK (BTRFS_BLOCK_GROUP_DATA | BTRFS_BLOCK_GROUP_SYSTEM | BTRFS_BLOCK_GROUP_METADATA) -#define BTRFS_BLOCK_GROUP_PROFILE_MASK \ - (BTRFS_BLOCK_GROUP_RAID0 | BTRFS_BLOCK_GROUP_RAID1 | \ - BTRFS_BLOCK_GROUP_RAID1C3 | BTRFS_BLOCK_GROUP_RAID1C4 | \ - BTRFS_BLOCK_GROUP_RAID5 | BTRFS_BLOCK_GROUP_RAID6 | \ - BTRFS_BLOCK_GROUP_DUP | BTRFS_BLOCK_GROUP_RAID10) -#define BTRFS_BLOCK_GROUP_RAID56_MASK \ - (BTRFS_BLOCK_GROUP_RAID5 | BTRFS_BLOCK_GROUP_RAID6) +#define BTRFS_BLOCK_GROUP_PROFILE_MASK \ + (BTRFS_BLOCK_GROUP_RAID0 | BTRFS_BLOCK_GROUP_RAID1 | BTRFS_BLOCK_GROUP_RAID1C3 | BTRFS_BLOCK_GROUP_RAID1C4 | \ + BTRFS_BLOCK_GROUP_RAID5 | BTRFS_BLOCK_GROUP_RAID6 | BTRFS_BLOCK_GROUP_DUP | BTRFS_BLOCK_GROUP_RAID10) +#define BTRFS_BLOCK_GROUP_RAID56_MASK (BTRFS_BLOCK_GROUP_RAID5 | BTRFS_BLOCK_GROUP_RAID6) -#define BTRFS_BLOCK_GROUP_RAID1_MASK \ - (BTRFS_BLOCK_GROUP_RAID1 | BTRFS_BLOCK_GROUP_RAID1C3 | \ - BTRFS_BLOCK_GROUP_RAID1C4) +#define BTRFS_BLOCK_GROUP_RAID1_MASK (BTRFS_BLOCK_GROUP_RAID1 | BTRFS_BLOCK_GROUP_RAID1C3 | BTRFS_BLOCK_GROUP_RAID1C4) /* * We need a bit for restriper to be able to tell when chunks of type @@ -1183,8 +1171,7 @@ struct btrfs_dev_replace_item { */ #define BTRFS_SPACE_INFO_GLOBAL_RSV (1ULL << 49) -#define BTRFS_EXTENDED_PROFILE_MASK \ - (BTRFS_BLOCK_GROUP_PROFILE_MASK | BTRFS_AVAIL_ALLOC_BIT_SINGLE) +#define BTRFS_EXTENDED_PROFILE_MASK (BTRFS_BLOCK_GROUP_PROFILE_MASK | BTRFS_AVAIL_ALLOC_BIT_SINGLE) static __inline__ __u64 chunk_to_extended(__u64 flags) { @@ -1241,9 +1228,8 @@ static __inline__ __u16 btrfs_qgroup_level(__u64 qgroupid) */ #define BTRFS_QGROUP_STATUS_FLAG_SIMPLE_MODE (1ULL << 3) -#define BTRFS_QGROUP_STATUS_FLAGS_MASK \ - (BTRFS_QGROUP_STATUS_FLAG_ON | BTRFS_QGROUP_STATUS_FLAG_RESCAN | \ - BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT | \ +#define BTRFS_QGROUP_STATUS_FLAGS_MASK \ + (BTRFS_QGROUP_STATUS_FLAG_ON | BTRFS_QGROUP_STATUS_FLAG_RESCAN | BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT | \ BTRFS_QGROUP_STATUS_FLAG_SIMPLE_MODE) #define BTRFS_QGROUP_STATUS_VERSION 1 diff --git a/include/arch/x86_64/linux/caif/caif_socket.h b/include/arch/x86_64/linux/caif/caif_socket.h index 4136d490..0c638181 100644 --- a/include/arch/x86_64/linux/caif/caif_socket.h +++ b/include/arch/x86_64/linux/caif/caif_socket.h @@ -94,10 +94,7 @@ enum caif_debug_type { * @CAIF_RADIO_DEBUG_SERVICE: Debug service on the Radio sub-system * @CAIF_APP_DEBUG_SERVICE: Debug for the applications sub-system */ -enum caif_debug_service { - CAIF_RADIO_DEBUG_SERVICE = 1, - CAIF_APP_DEBUG_SERVICE -}; +enum caif_debug_service { CAIF_RADIO_DEBUG_SERVICE = 1, CAIF_APP_DEBUG_SERVICE }; /** * struct sockaddr_caif - the sockaddr structure for CAIF sockets. diff --git a/include/arch/x86_64/linux/can.h b/include/arch/x86_64/linux/can.h index 081c0e64..1213da69 100644 --- a/include/arch/x86_64/linux/can.h +++ b/include/arch/x86_64/linux/can.h @@ -130,7 +130,7 @@ struct can_frame { } __attribute__((packed)); /* disable padding added in some ABIs */ __u8 __pad; /* padding */ __u8 __res0; /* reserved / padding */ - __u8 len8_dlc; /* optional DLC for 8 byte payload length (9 .. 15) */ + __u8 len8_dlc; /* optional DLC for 8 byte payload length (9 .. 15) */ __u8 data[CAN_MAX_DLEN] __attribute__((aligned(8))); }; diff --git a/include/arch/x86_64/linux/can/isotp.h b/include/arch/x86_64/linux/can/isotp.h index d986173d..3d72f3d3 100644 --- a/include/arch/x86_64/linux/can/isotp.h +++ b/include/arch/x86_64/linux/can/isotp.h @@ -85,7 +85,7 @@ struct can_isotp_options { /* __u8 value : content on rx path */ __u8 rx_ext_address; /* set address for extended addressing */ - /* __u8 value : extended address (rx) */ + /* __u8 value : extended address (rx) */ }; struct can_isotp_fc_options { diff --git a/include/arch/x86_64/linux/can/j1939.h b/include/arch/x86_64/linux/can/j1939.h index 3b995888..68c424e1 100644 --- a/include/arch/x86_64/linux/can/j1939.h +++ b/include/arch/x86_64/linux/can/j1939.h @@ -103,7 +103,6 @@ struct j1939_filter { __u8 addr_mask; }; -#define J1939_FILTER_MAX \ - 512 /* maximum number of j1939_filter set via setsockopt() */ +#define J1939_FILTER_MAX 512 /* maximum number of j1939_filter set via setsockopt() */ #endif /* !_UAPI_CAN_J1939_H_ */ diff --git a/include/arch/x86_64/linux/can/netlink.h b/include/arch/x86_64/linux/can/netlink.h index 872ae869..334b9ffc 100644 --- a/include/arch/x86_64/linux/can/netlink.h +++ b/include/arch/x86_64/linux/can/netlink.h @@ -101,9 +101,8 @@ struct can_ctrlmode { #define CAN_CTRLMODE_PRESUME_ACK 0x40 /* Ignore missing CAN ACKs */ #define CAN_CTRLMODE_FD_NON_ISO 0x80 /* CAN FD in non-ISO mode */ #define CAN_CTRLMODE_CC_LEN8_DLC 0x100 /* Classic CAN DLC option */ -#define CAN_CTRLMODE_TDC_AUTO \ - 0x200 /* CAN transiver automatically calculates TDCV */ -#define CAN_CTRLMODE_TDC_MANUAL 0x400 /* TDCV is manually set up by user */ +#define CAN_CTRLMODE_TDC_AUTO 0x200 /* CAN transiver automatically calculates TDCV */ +#define CAN_CTRLMODE_TDC_MANUAL 0x400 /* TDCV is manually set up by user */ /* * CAN device statistics diff --git a/include/arch/x86_64/linux/can/raw.h b/include/arch/x86_64/linux/can/raw.h index 63fc6760..580e0a9f 100644 --- a/include/arch/x86_64/linux/can/raw.h +++ b/include/arch/x86_64/linux/can/raw.h @@ -49,9 +49,8 @@ #include -#define SOL_CAN_RAW (SOL_CAN_BASE + CAN_RAW) -#define CAN_RAW_FILTER_MAX \ - 512 /* maximum number of can_filter set via setsockopt() */ +#define SOL_CAN_RAW (SOL_CAN_BASE + CAN_RAW) +#define CAN_RAW_FILTER_MAX 512 /* maximum number of can_filter set via setsockopt() */ enum { SCM_CAN_RAW_ERRQUEUE = 1, diff --git a/include/arch/x86_64/linux/capi.h b/include/arch/x86_64/linux/capi.h index 970a5703..6ad38c7c 100644 --- a/include/arch/x86_64/linux/capi.h +++ b/include/arch/x86_64/linux/capi.h @@ -22,9 +22,9 @@ */ typedef struct capi_register_params { /* CAPI_REGISTER */ - __u32 level3cnt; /* No. of simulatneous user data connections */ - __u32 datablkcnt; /* No. of buffered data messages */ - __u32 datablklen; /* Size of buffered data messages */ + __u32 level3cnt; /* No. of simulatneous user data connections */ + __u32 datablkcnt; /* No. of buffered data messages */ + __u32 datablklen; /* Size of buffered data messages */ } capi_register_params; #define CAPI_REGISTER _IOW('C', 0x01, struct capi_register_params) @@ -57,8 +57,7 @@ typedef struct capi_version { */ #define CAPI_SERIAL_LEN 8 -#define CAPI_GET_SERIAL \ - _IOWR('C', 0x08, int) /* broken: wanted size 8 (CAPI_SERIAL_LEN) */ +#define CAPI_GET_SERIAL _IOWR('C', 0x08, int) /* broken: wanted size 8 (CAPI_SERIAL_LEN) */ /* * CAPI_GET_PROFILE diff --git a/include/arch/x86_64/linux/cdrom.h b/include/arch/x86_64/linux/cdrom.h index 4f7579c3..2fb2ae58 100644 --- a/include/arch/x86_64/linux/cdrom.h +++ b/include/arch/x86_64/linux/cdrom.h @@ -159,8 +159,7 @@ #define CDROM_NEXT_WRITABLE 0x5394 /* get next writable block */ #define CDROM_LAST_WRITTEN 0x5395 /* get last block written on disc */ -#define CDROM_TIMED_MEDIA_CHANGE \ - 0x5396 /* get the timestamp of the last media change */ +#define CDROM_TIMED_MEDIA_CHANGE 0x5396 /* get the timestamp of the last media change */ /******************************************************* * CDROM IOCTL structures @@ -365,17 +364,14 @@ struct cdrom_timed_media_change_info { #define CD_FRAMESIZE_RAW 2352 /* bytes per frame, "raw" mode */ #define CD_FRAMESIZE_RAWER 2646 /* The maximum possible returned bytes */ /* most drives don't deliver everything: */ -#define CD_FRAMESIZE_RAW1 (CD_FRAMESIZE_RAW - CD_SYNC_SIZE) /*2340*/ -#define CD_FRAMESIZE_RAW0 \ - (CD_FRAMESIZE_RAW - CD_SYNC_SIZE - CD_HEAD_SIZE) /*2336*/ - -#define CD_XA_HEAD \ - (CD_HEAD_SIZE + CD_SUBHEAD_SIZE) /* "before data" part of raw XA frame \ - */ -#define CD_XA_TAIL \ - (CD_EDC_SIZE + CD_ECC_SIZE) /* "after data" part of raw XA frame */ -#define CD_XA_SYNC_HEAD \ - (CD_SYNC_SIZE + CD_XA_HEAD) /* sync bytes + header of XA frame */ +#define CD_FRAMESIZE_RAW1 (CD_FRAMESIZE_RAW - CD_SYNC_SIZE) /*2340*/ +#define CD_FRAMESIZE_RAW0 (CD_FRAMESIZE_RAW - CD_SYNC_SIZE - CD_HEAD_SIZE) /*2336*/ + +#define CD_XA_HEAD \ + (CD_HEAD_SIZE + CD_SUBHEAD_SIZE) /* "before data" part of raw XA frame \ + */ +#define CD_XA_TAIL (CD_EDC_SIZE + CD_ECC_SIZE) /* "after data" part of raw XA frame */ +#define CD_XA_SYNC_HEAD (CD_SYNC_SIZE + CD_XA_HEAD) /* sync bytes + header of XA frame */ /* CD-ROM address types (cdrom_tocentry.cdte_format) */ #define CDROM_LBA 0x01 /* "logical block": first frame is #0 */ diff --git a/include/arch/x86_64/linux/cec-funcs.h b/include/arch/x86_64/linux/cec-funcs.h index 834a8aca..1948fbd6 100644 --- a/include/arch/x86_64/linux/cec-funcs.h +++ b/include/arch/x86_64/linux/cec-funcs.h @@ -13,8 +13,7 @@ #include /* One Touch Play Feature */ -static __inline__ void cec_msg_active_source(struct cec_msg *msg, - __u16 phys_addr) +static __inline__ void cec_msg_active_source(struct cec_msg *msg, __u16 phys_addr) { msg->len = 4; msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; @@ -23,8 +22,7 @@ static __inline__ void cec_msg_active_source(struct cec_msg *msg, msg->msg[3] = phys_addr & 0xff; } -static __inline__ void cec_ops_active_source(const struct cec_msg *msg, - __u16 *phys_addr) +static __inline__ void cec_ops_active_source(const struct cec_msg *msg, __u16 *phys_addr) { *phys_addr = (msg->msg[2] << 8) | msg->msg[3]; } @@ -42,8 +40,7 @@ static __inline__ void cec_msg_text_view_on(struct cec_msg *msg) } /* Routing Control Feature */ -static __inline__ void cec_msg_inactive_source(struct cec_msg *msg, - __u16 phys_addr) +static __inline__ void cec_msg_inactive_source(struct cec_msg *msg, __u16 phys_addr) { msg->len = 4; msg->msg[1] = CEC_MSG_INACTIVE_SOURCE; @@ -51,14 +48,12 @@ static __inline__ void cec_msg_inactive_source(struct cec_msg *msg, msg->msg[3] = phys_addr & 0xff; } -static __inline__ void cec_ops_inactive_source(const struct cec_msg *msg, - __u16 *phys_addr) +static __inline__ void cec_ops_inactive_source(const struct cec_msg *msg, __u16 *phys_addr) { *phys_addr = (msg->msg[2] << 8) | msg->msg[3]; } -static __inline__ void cec_msg_request_active_source(struct cec_msg *msg, - int reply) +static __inline__ void cec_msg_request_active_source(struct cec_msg *msg, int reply) { msg->len = 2; msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; @@ -66,8 +61,7 @@ static __inline__ void cec_msg_request_active_source(struct cec_msg *msg, msg->reply = reply ? CEC_MSG_ACTIVE_SOURCE : 0; } -static __inline__ void cec_msg_routing_information(struct cec_msg *msg, - __u16 phys_addr) +static __inline__ void cec_msg_routing_information(struct cec_msg *msg, __u16 phys_addr) { msg->len = 4; msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; @@ -76,15 +70,12 @@ static __inline__ void cec_msg_routing_information(struct cec_msg *msg, msg->msg[3] = phys_addr & 0xff; } -static __inline__ void cec_ops_routing_information(const struct cec_msg *msg, - __u16 *phys_addr) +static __inline__ void cec_ops_routing_information(const struct cec_msg *msg, __u16 *phys_addr) { *phys_addr = (msg->msg[2] << 8) | msg->msg[3]; } -static __inline__ void cec_msg_routing_change(struct cec_msg *msg, int reply, - __u16 orig_phys_addr, - __u16 new_phys_addr) +static __inline__ void cec_msg_routing_change(struct cec_msg *msg, int reply, __u16 orig_phys_addr, __u16 new_phys_addr) { msg->len = 6; msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; @@ -96,16 +87,13 @@ static __inline__ void cec_msg_routing_change(struct cec_msg *msg, int reply, msg->reply = reply ? CEC_MSG_ROUTING_INFORMATION : 0; } -static __inline__ void cec_ops_routing_change(const struct cec_msg *msg, - __u16 *orig_phys_addr, - __u16 *new_phys_addr) +static __inline__ void cec_ops_routing_change(const struct cec_msg *msg, __u16 *orig_phys_addr, __u16 *new_phys_addr) { *orig_phys_addr = (msg->msg[2] << 8) | msg->msg[3]; *new_phys_addr = (msg->msg[4] << 8) | msg->msg[5]; } -static __inline__ void cec_msg_set_stream_path(struct cec_msg *msg, - __u16 phys_addr) +static __inline__ void cec_msg_set_stream_path(struct cec_msg *msg, __u16 phys_addr) { msg->len = 4; msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; @@ -114,8 +102,7 @@ static __inline__ void cec_msg_set_stream_path(struct cec_msg *msg, msg->msg[3] = phys_addr & 0xff; } -static __inline__ void cec_ops_set_stream_path(const struct cec_msg *msg, - __u16 *phys_addr) +static __inline__ void cec_ops_set_stream_path(const struct cec_msg *msg, __u16 *phys_addr) { *phys_addr = (msg->msg[2] << 8) | msg->msg[3]; } @@ -187,14 +174,11 @@ struct cec_op_record_src { }; }; -static __inline__ void -cec_set_digital_service_id(__u8 *msg, - const struct cec_op_digital_service_id *digital) +static __inline__ void cec_set_digital_service_id(__u8 *msg, const struct cec_op_digital_service_id *digital) { *msg++ = (digital->service_id_method << 7) | digital->dig_bcast_system; if (digital->service_id_method == CEC_OP_SERVICE_ID_METHOD_BY_CHANNEL) { - *msg++ = (digital->channel.channel_number_fmt << 2) | - (digital->channel.major >> 8); + *msg++ = (digital->channel.channel_number_fmt << 2) | (digital->channel.major >> 8); *msg++ = digital->channel.major & 0xff; *msg++ = digital->channel.minor >> 8; *msg++ = digital->channel.minor & 0xff; @@ -225,9 +209,7 @@ cec_set_digital_service_id(__u8 *msg, } } -static __inline__ void -cec_get_digital_service_id(const __u8 *msg, - struct cec_op_digital_service_id *digital) +static __inline__ void cec_get_digital_service_id(const __u8 *msg, struct cec_op_digital_service_id *digital) { digital->service_id_method = msg[0] >> 7; digital->dig_bcast_system = msg[0] & 0x7f; @@ -249,9 +231,7 @@ static __inline__ void cec_msg_record_on_own(struct cec_msg *msg) msg->msg[2] = CEC_OP_RECORD_SRC_OWN; } -static __inline__ void -cec_msg_record_on_digital(struct cec_msg *msg, - const struct cec_op_digital_service_id *digital) +static __inline__ void cec_msg_record_on_digital(struct cec_msg *msg, const struct cec_op_digital_service_id *digital) { msg->len = 10; msg->msg[1] = CEC_MSG_RECORD_ON; @@ -259,9 +239,7 @@ cec_msg_record_on_digital(struct cec_msg *msg, cec_set_digital_service_id(msg->msg + 3, digital); } -static __inline__ void cec_msg_record_on_analog(struct cec_msg *msg, - __u8 ana_bcast_type, - __u16 ana_freq, +static __inline__ void cec_msg_record_on_analog(struct cec_msg *msg, __u8 ana_bcast_type, __u16 ana_freq, __u8 bcast_system) { msg->len = 7; @@ -281,8 +259,7 @@ static __inline__ void cec_msg_record_on_plug(struct cec_msg *msg, __u8 plug) msg->msg[3] = plug; } -static __inline__ void cec_msg_record_on_phys_addr(struct cec_msg *msg, - __u16 phys_addr) +static __inline__ void cec_msg_record_on_phys_addr(struct cec_msg *msg, __u16 phys_addr) { msg->len = 5; msg->msg[1] = CEC_MSG_RECORD_ON; @@ -291,9 +268,7 @@ static __inline__ void cec_msg_record_on_phys_addr(struct cec_msg *msg, msg->msg[4] = phys_addr & 0xff; } -static __inline__ void -cec_msg_record_on(struct cec_msg *msg, int reply, - const struct cec_op_record_src *rec_src) +static __inline__ void cec_msg_record_on(struct cec_msg *msg, int reply, const struct cec_op_record_src *rec_src) { switch (rec_src->type) { case CEC_OP_RECORD_SRC_OWN: @@ -303,23 +278,20 @@ cec_msg_record_on(struct cec_msg *msg, int reply, cec_msg_record_on_digital(msg, &rec_src->digital); break; case CEC_OP_RECORD_SRC_ANALOG: - cec_msg_record_on_analog(msg, rec_src->analog.ana_bcast_type, - rec_src->analog.ana_freq, + cec_msg_record_on_analog(msg, rec_src->analog.ana_bcast_type, rec_src->analog.ana_freq, rec_src->analog.bcast_system); break; case CEC_OP_RECORD_SRC_EXT_PLUG: cec_msg_record_on_plug(msg, rec_src->ext_plug.plug); break; case CEC_OP_RECORD_SRC_EXT_PHYS_ADDR: - cec_msg_record_on_phys_addr(msg, - rec_src->ext_phys_addr.phys_addr); + cec_msg_record_on_phys_addr(msg, rec_src->ext_phys_addr.phys_addr); break; } msg->reply = reply ? CEC_MSG_RECORD_STATUS : 0; } -static __inline__ void cec_ops_record_on(const struct cec_msg *msg, - struct cec_op_record_src *rec_src) +static __inline__ void cec_ops_record_on(const struct cec_msg *msg, struct cec_op_record_src *rec_src) { rec_src->type = msg->msg[2]; switch (rec_src->type) { @@ -337,22 +309,19 @@ static __inline__ void cec_ops_record_on(const struct cec_msg *msg, rec_src->ext_plug.plug = msg->msg[3]; break; case CEC_OP_RECORD_SRC_EXT_PHYS_ADDR: - rec_src->ext_phys_addr.phys_addr = (msg->msg[3] << 8) | - msg->msg[4]; + rec_src->ext_phys_addr.phys_addr = (msg->msg[3] << 8) | msg->msg[4]; break; } } -static __inline__ void cec_msg_record_status(struct cec_msg *msg, - __u8 rec_status) +static __inline__ void cec_msg_record_status(struct cec_msg *msg, __u8 rec_status) { msg->len = 3; msg->msg[1] = CEC_MSG_RECORD_STATUS; msg->msg[2] = rec_status; } -static __inline__ void cec_ops_record_status(const struct cec_msg *msg, - __u8 *rec_status) +static __inline__ void cec_ops_record_status(const struct cec_msg *msg, __u8 *rec_status) { *rec_status = msg->msg[2]; } @@ -365,19 +334,14 @@ static __inline__ void cec_msg_record_tv_screen(struct cec_msg *msg, int reply) } /* Timer Programming Feature */ -static __inline__ void cec_msg_timer_status(struct cec_msg *msg, - __u8 timer_overlap_warning, - __u8 media_info, __u8 prog_info, - __u8 prog_error, __u8 duration_hr, - __u8 duration_min) +static __inline__ void cec_msg_timer_status(struct cec_msg *msg, __u8 timer_overlap_warning, __u8 media_info, + __u8 prog_info, __u8 prog_error, __u8 duration_hr, __u8 duration_min) { msg->len = 3; msg->msg[1] = CEC_MSG_TIMER_STATUS; - msg->msg[2] = (timer_overlap_warning << 7) | (media_info << 5) | - (prog_info ? 0x10 : 0) | + msg->msg[2] = (timer_overlap_warning << 7) | (media_info << 5) | (prog_info ? 0x10 : 0) | (prog_info ? prog_info : prog_error); - if (prog_info == CEC_OP_PROG_INFO_NOT_ENOUGH_SPACE || - prog_info == CEC_OP_PROG_INFO_MIGHT_NOT_BE_ENOUGH_SPACE || + if (prog_info == CEC_OP_PROG_INFO_NOT_ENOUGH_SPACE || prog_info == CEC_OP_PROG_INFO_MIGHT_NOT_BE_ENOUGH_SPACE || prog_error == CEC_OP_PROG_ERROR_DUPLICATE) { msg->len += 2; msg->msg[3] = ((duration_hr / 10) << 4) | (duration_hr % 10); @@ -385,11 +349,8 @@ static __inline__ void cec_msg_timer_status(struct cec_msg *msg, } } -static __inline__ void cec_ops_timer_status(const struct cec_msg *msg, - __u8 *timer_overlap_warning, - __u8 *media_info, __u8 *prog_info, - __u8 *prog_error, __u8 *duration_hr, - __u8 *duration_min) +static __inline__ void cec_ops_timer_status(const struct cec_msg *msg, __u8 *timer_overlap_warning, __u8 *media_info, + __u8 *prog_info, __u8 *prog_error, __u8 *duration_hr, __u8 *duration_min) { *timer_overlap_warning = msg->msg[2] >> 7; *media_info = (msg->msg[2] >> 5) & 3; @@ -401,8 +362,7 @@ static __inline__ void cec_ops_timer_status(const struct cec_msg *msg, *prog_error = msg->msg[2] & 0xf; } if (*prog_info == CEC_OP_PROG_INFO_NOT_ENOUGH_SPACE || - *prog_info == CEC_OP_PROG_INFO_MIGHT_NOT_BE_ENOUGH_SPACE || - *prog_error == CEC_OP_PROG_ERROR_DUPLICATE) { + *prog_info == CEC_OP_PROG_INFO_MIGHT_NOT_BE_ENOUGH_SPACE || *prog_error == CEC_OP_PROG_ERROR_DUPLICATE) { *duration_hr = (msg->msg[3] >> 4) * 10 + (msg->msg[3] & 0xf); *duration_min = (msg->msg[4] >> 4) * 10 + (msg->msg[4] & 0xf); } else { @@ -410,24 +370,22 @@ static __inline__ void cec_ops_timer_status(const struct cec_msg *msg, } } -static __inline__ void cec_msg_timer_cleared_status(struct cec_msg *msg, - __u8 timer_cleared_status) +static __inline__ void cec_msg_timer_cleared_status(struct cec_msg *msg, __u8 timer_cleared_status) { msg->len = 3; msg->msg[1] = CEC_MSG_TIMER_CLEARED_STATUS; msg->msg[2] = timer_cleared_status; } -static __inline__ void cec_ops_timer_cleared_status(const struct cec_msg *msg, - __u8 *timer_cleared_status) +static __inline__ void cec_ops_timer_cleared_status(const struct cec_msg *msg, __u8 *timer_cleared_status) { *timer_cleared_status = msg->msg[2]; } -static __inline__ void cec_msg_clear_analogue_timer( - struct cec_msg *msg, int reply, __u8 day, __u8 month, __u8 start_hr, - __u8 start_min, __u8 duration_hr, __u8 duration_min, __u8 recording_seq, - __u8 ana_bcast_type, __u16 ana_freq, __u8 bcast_system) +static __inline__ void cec_msg_clear_analogue_timer(struct cec_msg *msg, int reply, __u8 day, __u8 month, __u8 start_hr, + __u8 start_min, __u8 duration_hr, __u8 duration_min, + __u8 recording_seq, __u8 ana_bcast_type, __u16 ana_freq, + __u8 bcast_system) { msg->len = 13; msg->msg[1] = CEC_MSG_CLEAR_ANALOGUE_TIMER; @@ -446,12 +404,10 @@ static __inline__ void cec_msg_clear_analogue_timer( msg->reply = reply ? CEC_MSG_TIMER_CLEARED_STATUS : 0; } -static __inline__ void -cec_ops_clear_analogue_timer(const struct cec_msg *msg, __u8 *day, __u8 *month, - __u8 *start_hr, __u8 *start_min, __u8 *duration_hr, - __u8 *duration_min, __u8 *recording_seq, - __u8 *ana_bcast_type, __u16 *ana_freq, - __u8 *bcast_system) +static __inline__ void cec_ops_clear_analogue_timer(const struct cec_msg *msg, __u8 *day, __u8 *month, __u8 *start_hr, + __u8 *start_min, __u8 *duration_hr, __u8 *duration_min, + __u8 *recording_seq, __u8 *ana_bcast_type, __u16 *ana_freq, + __u8 *bcast_system) { *day = msg->msg[2]; *month = msg->msg[3]; @@ -466,10 +422,9 @@ cec_ops_clear_analogue_timer(const struct cec_msg *msg, __u8 *day, __u8 *month, *bcast_system = msg->msg[12]; } -static __inline__ void cec_msg_clear_digital_timer( - struct cec_msg *msg, int reply, __u8 day, __u8 month, __u8 start_hr, - __u8 start_min, __u8 duration_hr, __u8 duration_min, __u8 recording_seq, - const struct cec_op_digital_service_id *digital) +static __inline__ void cec_msg_clear_digital_timer(struct cec_msg *msg, int reply, __u8 day, __u8 month, __u8 start_hr, + __u8 start_min, __u8 duration_hr, __u8 duration_min, + __u8 recording_seq, const struct cec_op_digital_service_id *digital) { msg->len = 16; msg->reply = reply ? CEC_MSG_TIMER_CLEARED_STATUS : 0; @@ -485,11 +440,9 @@ static __inline__ void cec_msg_clear_digital_timer( cec_set_digital_service_id(msg->msg + 9, digital); } -static __inline__ void -cec_ops_clear_digital_timer(const struct cec_msg *msg, __u8 *day, __u8 *month, - __u8 *start_hr, __u8 *start_min, __u8 *duration_hr, - __u8 *duration_min, __u8 *recording_seq, - struct cec_op_digital_service_id *digital) +static __inline__ void cec_ops_clear_digital_timer(const struct cec_msg *msg, __u8 *day, __u8 *month, __u8 *start_hr, + __u8 *start_min, __u8 *duration_hr, __u8 *duration_min, + __u8 *recording_seq, struct cec_op_digital_service_id *digital) { *day = msg->msg[2]; *month = msg->msg[3]; @@ -502,11 +455,9 @@ cec_ops_clear_digital_timer(const struct cec_msg *msg, __u8 *day, __u8 *month, cec_get_digital_service_id(msg->msg + 9, digital); } -static __inline__ void -cec_msg_clear_ext_timer(struct cec_msg *msg, int reply, __u8 day, __u8 month, - __u8 start_hr, __u8 start_min, __u8 duration_hr, - __u8 duration_min, __u8 recording_seq, - __u8 ext_src_spec, __u8 plug, __u16 phys_addr) +static __inline__ void cec_msg_clear_ext_timer(struct cec_msg *msg, int reply, __u8 day, __u8 month, __u8 start_hr, + __u8 start_min, __u8 duration_hr, __u8 duration_min, __u8 recording_seq, + __u8 ext_src_spec, __u8 plug, __u16 phys_addr) { msg->len = 13; msg->msg[1] = CEC_MSG_CLEAR_EXT_TIMER; @@ -525,11 +476,9 @@ cec_msg_clear_ext_timer(struct cec_msg *msg, int reply, __u8 day, __u8 month, msg->reply = reply ? CEC_MSG_TIMER_CLEARED_STATUS : 0; } -static __inline__ void -cec_ops_clear_ext_timer(const struct cec_msg *msg, __u8 *day, __u8 *month, - __u8 *start_hr, __u8 *start_min, __u8 *duration_hr, - __u8 *duration_min, __u8 *recording_seq, - __u8 *ext_src_spec, __u8 *plug, __u16 *phys_addr) +static __inline__ void cec_ops_clear_ext_timer(const struct cec_msg *msg, __u8 *day, __u8 *month, __u8 *start_hr, + __u8 *start_min, __u8 *duration_hr, __u8 *duration_min, + __u8 *recording_seq, __u8 *ext_src_spec, __u8 *plug, __u16 *phys_addr) { *day = msg->msg[2]; *month = msg->msg[3]; @@ -544,10 +493,10 @@ cec_ops_clear_ext_timer(const struct cec_msg *msg, __u8 *day, __u8 *month, *phys_addr = (msg->msg[11] << 8) | msg->msg[12]; } -static __inline__ void cec_msg_set_analogue_timer( - struct cec_msg *msg, int reply, __u8 day, __u8 month, __u8 start_hr, - __u8 start_min, __u8 duration_hr, __u8 duration_min, __u8 recording_seq, - __u8 ana_bcast_type, __u16 ana_freq, __u8 bcast_system) +static __inline__ void cec_msg_set_analogue_timer(struct cec_msg *msg, int reply, __u8 day, __u8 month, __u8 start_hr, + __u8 start_min, __u8 duration_hr, __u8 duration_min, + __u8 recording_seq, __u8 ana_bcast_type, __u16 ana_freq, + __u8 bcast_system) { msg->len = 13; msg->msg[1] = CEC_MSG_SET_ANALOGUE_TIMER; @@ -566,12 +515,10 @@ static __inline__ void cec_msg_set_analogue_timer( msg->reply = reply ? CEC_MSG_TIMER_STATUS : 0; } -static __inline__ void -cec_ops_set_analogue_timer(const struct cec_msg *msg, __u8 *day, __u8 *month, - __u8 *start_hr, __u8 *start_min, __u8 *duration_hr, - __u8 *duration_min, __u8 *recording_seq, - __u8 *ana_bcast_type, __u16 *ana_freq, - __u8 *bcast_system) +static __inline__ void cec_ops_set_analogue_timer(const struct cec_msg *msg, __u8 *day, __u8 *month, __u8 *start_hr, + __u8 *start_min, __u8 *duration_hr, __u8 *duration_min, + __u8 *recording_seq, __u8 *ana_bcast_type, __u16 *ana_freq, + __u8 *bcast_system) { *day = msg->msg[2]; *month = msg->msg[3]; @@ -586,11 +533,9 @@ cec_ops_set_analogue_timer(const struct cec_msg *msg, __u8 *day, __u8 *month, *bcast_system = msg->msg[12]; } -static __inline__ void -cec_msg_set_digital_timer(struct cec_msg *msg, int reply, __u8 day, __u8 month, - __u8 start_hr, __u8 start_min, __u8 duration_hr, - __u8 duration_min, __u8 recording_seq, - const struct cec_op_digital_service_id *digital) +static __inline__ void cec_msg_set_digital_timer(struct cec_msg *msg, int reply, __u8 day, __u8 month, __u8 start_hr, + __u8 start_min, __u8 duration_hr, __u8 duration_min, + __u8 recording_seq, const struct cec_op_digital_service_id *digital) { msg->len = 16; msg->reply = reply ? CEC_MSG_TIMER_STATUS : 0; @@ -606,11 +551,9 @@ cec_msg_set_digital_timer(struct cec_msg *msg, int reply, __u8 day, __u8 month, cec_set_digital_service_id(msg->msg + 9, digital); } -static __inline__ void -cec_ops_set_digital_timer(const struct cec_msg *msg, __u8 *day, __u8 *month, - __u8 *start_hr, __u8 *start_min, __u8 *duration_hr, - __u8 *duration_min, __u8 *recording_seq, - struct cec_op_digital_service_id *digital) +static __inline__ void cec_ops_set_digital_timer(const struct cec_msg *msg, __u8 *day, __u8 *month, __u8 *start_hr, + __u8 *start_min, __u8 *duration_hr, __u8 *duration_min, + __u8 *recording_seq, struct cec_op_digital_service_id *digital) { *day = msg->msg[2]; *month = msg->msg[3]; @@ -623,11 +566,9 @@ cec_ops_set_digital_timer(const struct cec_msg *msg, __u8 *day, __u8 *month, cec_get_digital_service_id(msg->msg + 9, digital); } -static __inline__ void -cec_msg_set_ext_timer(struct cec_msg *msg, int reply, __u8 day, __u8 month, - __u8 start_hr, __u8 start_min, __u8 duration_hr, - __u8 duration_min, __u8 recording_seq, __u8 ext_src_spec, - __u8 plug, __u16 phys_addr) +static __inline__ void cec_msg_set_ext_timer(struct cec_msg *msg, int reply, __u8 day, __u8 month, __u8 start_hr, + __u8 start_min, __u8 duration_hr, __u8 duration_min, __u8 recording_seq, + __u8 ext_src_spec, __u8 plug, __u16 phys_addr) { msg->len = 13; msg->msg[1] = CEC_MSG_SET_EXT_TIMER; @@ -646,11 +587,9 @@ cec_msg_set_ext_timer(struct cec_msg *msg, int reply, __u8 day, __u8 month, msg->reply = reply ? CEC_MSG_TIMER_STATUS : 0; } -static __inline__ void -cec_ops_set_ext_timer(const struct cec_msg *msg, __u8 *day, __u8 *month, - __u8 *start_hr, __u8 *start_min, __u8 *duration_hr, - __u8 *duration_min, __u8 *recording_seq, - __u8 *ext_src_spec, __u8 *plug, __u16 *phys_addr) +static __inline__ void cec_ops_set_ext_timer(const struct cec_msg *msg, __u8 *day, __u8 *month, __u8 *start_hr, + __u8 *start_min, __u8 *duration_hr, __u8 *duration_min, + __u8 *recording_seq, __u8 *ext_src_spec, __u8 *plug, __u16 *phys_addr) { *day = msg->msg[2]; *month = msg->msg[3]; @@ -665,8 +604,7 @@ cec_ops_set_ext_timer(const struct cec_msg *msg, __u8 *day, __u8 *month, *phys_addr = (msg->msg[11] << 8) | msg->msg[12]; } -static __inline__ void cec_msg_set_timer_program_title(struct cec_msg *msg, - const char *prog_title) +static __inline__ void cec_msg_set_timer_program_title(struct cec_msg *msg, const char *prog_title) { unsigned int len = strlen(prog_title); @@ -677,8 +615,7 @@ static __inline__ void cec_msg_set_timer_program_title(struct cec_msg *msg, memcpy(msg->msg + 2, prog_title, len); } -static __inline__ void -cec_ops_set_timer_program_title(const struct cec_msg *msg, char *prog_title) +static __inline__ void cec_ops_set_timer_program_title(const struct cec_msg *msg, char *prog_title) { unsigned int len = msg->len > 2 ? msg->len - 2 : 0; @@ -689,16 +626,14 @@ cec_ops_set_timer_program_title(const struct cec_msg *msg, char *prog_title) } /* System Information Feature */ -static __inline__ void cec_msg_cec_version(struct cec_msg *msg, - __u8 cec_version) +static __inline__ void cec_msg_cec_version(struct cec_msg *msg, __u8 cec_version) { msg->len = 3; msg->msg[1] = CEC_MSG_CEC_VERSION; msg->msg[2] = cec_version; } -static __inline__ void cec_ops_cec_version(const struct cec_msg *msg, - __u8 *cec_version) +static __inline__ void cec_ops_cec_version(const struct cec_msg *msg, __u8 *cec_version) { *cec_version = msg->msg[2]; } @@ -710,9 +645,7 @@ static __inline__ void cec_msg_get_cec_version(struct cec_msg *msg, int reply) msg->reply = reply ? CEC_MSG_CEC_VERSION : 0; } -static __inline__ void cec_msg_report_physical_addr(struct cec_msg *msg, - __u16 phys_addr, - __u8 prim_devtype) +static __inline__ void cec_msg_report_physical_addr(struct cec_msg *msg, __u16 phys_addr, __u8 prim_devtype) { msg->len = 5; msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; @@ -722,24 +655,20 @@ static __inline__ void cec_msg_report_physical_addr(struct cec_msg *msg, msg->msg[4] = prim_devtype; } -static __inline__ void cec_ops_report_physical_addr(const struct cec_msg *msg, - __u16 *phys_addr, - __u8 *prim_devtype) +static __inline__ void cec_ops_report_physical_addr(const struct cec_msg *msg, __u16 *phys_addr, __u8 *prim_devtype) { *phys_addr = (msg->msg[2] << 8) | msg->msg[3]; *prim_devtype = msg->msg[4]; } -static __inline__ void cec_msg_give_physical_addr(struct cec_msg *msg, - int reply) +static __inline__ void cec_msg_give_physical_addr(struct cec_msg *msg, int reply) { msg->len = 2; msg->msg[1] = CEC_MSG_GIVE_PHYSICAL_ADDR; msg->reply = reply ? CEC_MSG_REPORT_PHYSICAL_ADDR : 0; } -static __inline__ void cec_msg_set_menu_language(struct cec_msg *msg, - const char *language) +static __inline__ void cec_msg_set_menu_language(struct cec_msg *msg, const char *language) { msg->len = 5; msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; @@ -747,8 +676,7 @@ static __inline__ void cec_msg_set_menu_language(struct cec_msg *msg, memcpy(msg->msg + 2, language, 3); } -static __inline__ void cec_ops_set_menu_language(const struct cec_msg *msg, - char *language) +static __inline__ void cec_ops_set_menu_language(const struct cec_msg *msg, char *language) { memcpy(language, msg->msg + 2, 3); language[3] = '\0'; @@ -769,11 +697,8 @@ static __inline__ void cec_msg_get_menu_language(struct cec_msg *msg, int reply) * in the future, then this function needs to be adapted or a new function * should be added. */ -static __inline__ void cec_msg_report_features(struct cec_msg *msg, - __u8 cec_version, - __u8 all_device_types, - __u8 rc_profile, - __u8 dev_features) +static __inline__ void cec_msg_report_features(struct cec_msg *msg, __u8 cec_version, __u8 all_device_types, + __u8 rc_profile, __u8 dev_features) { msg->len = 6; msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; @@ -784,11 +709,8 @@ static __inline__ void cec_msg_report_features(struct cec_msg *msg, msg->msg[5] = dev_features; } -static __inline__ void cec_ops_report_features(const struct cec_msg *msg, - __u8 *cec_version, - __u8 *all_device_types, - const __u8 **rc_profile, - const __u8 **dev_features) +static __inline__ void cec_ops_report_features(const struct cec_msg *msg, __u8 *cec_version, __u8 *all_device_types, + const __u8 **rc_profile, const __u8 **dev_features) { const __u8 *p = &msg->msg[4]; @@ -815,16 +737,14 @@ static __inline__ void cec_msg_give_features(struct cec_msg *msg, int reply) } /* Deck Control Feature */ -static __inline__ void cec_msg_deck_control(struct cec_msg *msg, - __u8 deck_control_mode) +static __inline__ void cec_msg_deck_control(struct cec_msg *msg, __u8 deck_control_mode) { msg->len = 3; msg->msg[1] = CEC_MSG_DECK_CONTROL; msg->msg[2] = deck_control_mode; } -static __inline__ void cec_ops_deck_control(const struct cec_msg *msg, - __u8 *deck_control_mode) +static __inline__ void cec_ops_deck_control(const struct cec_msg *msg, __u8 *deck_control_mode) { *deck_control_mode = msg->msg[2]; } @@ -836,25 +756,20 @@ static __inline__ void cec_msg_deck_status(struct cec_msg *msg, __u8 deck_info) msg->msg[2] = deck_info; } -static __inline__ void cec_ops_deck_status(const struct cec_msg *msg, - __u8 *deck_info) +static __inline__ void cec_ops_deck_status(const struct cec_msg *msg, __u8 *deck_info) { *deck_info = msg->msg[2]; } -static __inline__ void cec_msg_give_deck_status(struct cec_msg *msg, int reply, - __u8 status_req) +static __inline__ void cec_msg_give_deck_status(struct cec_msg *msg, int reply, __u8 status_req) { msg->len = 3; msg->msg[1] = CEC_MSG_GIVE_DECK_STATUS; msg->msg[2] = status_req; - msg->reply = (reply && status_req != CEC_OP_STATUS_REQ_OFF) ? - CEC_MSG_DECK_STATUS : - 0; + msg->reply = (reply && status_req != CEC_OP_STATUS_REQ_OFF) ? CEC_MSG_DECK_STATUS : 0; } -static __inline__ void cec_ops_give_deck_status(const struct cec_msg *msg, - __u8 *status_req) +static __inline__ void cec_ops_give_deck_status(const struct cec_msg *msg, __u8 *status_req) { *status_req = msg->msg[2]; } @@ -886,10 +801,8 @@ struct cec_op_tuner_device_info { }; }; -static __inline__ void -cec_msg_tuner_device_status_analog(struct cec_msg *msg, __u8 rec_flag, - __u8 tuner_display_info, __u8 ana_bcast_type, - __u16 ana_freq, __u8 bcast_system) +static __inline__ void cec_msg_tuner_device_status_analog(struct cec_msg *msg, __u8 rec_flag, __u8 tuner_display_info, + __u8 ana_bcast_type, __u16 ana_freq, __u8 bcast_system) { msg->len = 7; msg->msg[1] = CEC_MSG_TUNER_DEVICE_STATUS; @@ -900,9 +813,8 @@ cec_msg_tuner_device_status_analog(struct cec_msg *msg, __u8 rec_flag, msg->msg[6] = bcast_system; } -static __inline__ void cec_msg_tuner_device_status_digital( - struct cec_msg *msg, __u8 rec_flag, __u8 tuner_display_info, - const struct cec_op_digital_service_id *digital) +static __inline__ void cec_msg_tuner_device_status_digital(struct cec_msg *msg, __u8 rec_flag, __u8 tuner_display_info, + const struct cec_op_digital_service_id *digital) { msg->len = 10; msg->msg[1] = CEC_MSG_TUNER_DEVICE_STATUS; @@ -910,62 +822,48 @@ static __inline__ void cec_msg_tuner_device_status_digital( cec_set_digital_service_id(msg->msg + 3, digital); } -static __inline__ void cec_msg_tuner_device_status( - struct cec_msg *msg, - const struct cec_op_tuner_device_info *tuner_dev_info) +static __inline__ void cec_msg_tuner_device_status(struct cec_msg *msg, + const struct cec_op_tuner_device_info *tuner_dev_info) { if (tuner_dev_info->is_analog) - cec_msg_tuner_device_status_analog( - msg, tuner_dev_info->rec_flag, - tuner_dev_info->tuner_display_info, - tuner_dev_info->analog.ana_bcast_type, - tuner_dev_info->analog.ana_freq, - tuner_dev_info->analog.bcast_system); + cec_msg_tuner_device_status_analog(msg, tuner_dev_info->rec_flag, tuner_dev_info->tuner_display_info, + tuner_dev_info->analog.ana_bcast_type, + tuner_dev_info->analog.ana_freq, + tuner_dev_info->analog.bcast_system); else - cec_msg_tuner_device_status_digital( - msg, tuner_dev_info->rec_flag, - tuner_dev_info->tuner_display_info, - &tuner_dev_info->digital); + cec_msg_tuner_device_status_digital(msg, tuner_dev_info->rec_flag, tuner_dev_info->tuner_display_info, + &tuner_dev_info->digital); } -static __inline__ void -cec_ops_tuner_device_status(const struct cec_msg *msg, - struct cec_op_tuner_device_info *tuner_dev_info) +static __inline__ void cec_ops_tuner_device_status(const struct cec_msg *msg, + struct cec_op_tuner_device_info *tuner_dev_info) { tuner_dev_info->is_analog = msg->len < 10; tuner_dev_info->rec_flag = msg->msg[2] >> 7; tuner_dev_info->tuner_display_info = msg->msg[2] & 0x7f; if (tuner_dev_info->is_analog) { tuner_dev_info->analog.ana_bcast_type = msg->msg[3]; - tuner_dev_info->analog.ana_freq = (msg->msg[4] << 8) | - msg->msg[5]; + tuner_dev_info->analog.ana_freq = (msg->msg[4] << 8) | msg->msg[5]; tuner_dev_info->analog.bcast_system = msg->msg[6]; return; } cec_get_digital_service_id(msg->msg + 3, &tuner_dev_info->digital); } -static __inline__ void cec_msg_give_tuner_device_status(struct cec_msg *msg, - int reply, - __u8 status_req) +static __inline__ void cec_msg_give_tuner_device_status(struct cec_msg *msg, int reply, __u8 status_req) { msg->len = 3; msg->msg[1] = CEC_MSG_GIVE_TUNER_DEVICE_STATUS; msg->msg[2] = status_req; - msg->reply = (reply && status_req != CEC_OP_STATUS_REQ_OFF) ? - CEC_MSG_TUNER_DEVICE_STATUS : - 0; + msg->reply = (reply && status_req != CEC_OP_STATUS_REQ_OFF) ? CEC_MSG_TUNER_DEVICE_STATUS : 0; } -static __inline__ void -cec_ops_give_tuner_device_status(const struct cec_msg *msg, __u8 *status_req) +static __inline__ void cec_ops_give_tuner_device_status(const struct cec_msg *msg, __u8 *status_req) { *status_req = msg->msg[2]; } -static __inline__ void cec_msg_select_analogue_service(struct cec_msg *msg, - __u8 ana_bcast_type, - __u16 ana_freq, +static __inline__ void cec_msg_select_analogue_service(struct cec_msg *msg, __u8 ana_bcast_type, __u16 ana_freq, __u8 bcast_system) { msg->len = 6; @@ -976,27 +874,24 @@ static __inline__ void cec_msg_select_analogue_service(struct cec_msg *msg, msg->msg[5] = bcast_system; } -static __inline__ void -cec_ops_select_analogue_service(const struct cec_msg *msg, __u8 *ana_bcast_type, - __u16 *ana_freq, __u8 *bcast_system) +static __inline__ void cec_ops_select_analogue_service(const struct cec_msg *msg, __u8 *ana_bcast_type, __u16 *ana_freq, + __u8 *bcast_system) { *ana_bcast_type = msg->msg[2]; *ana_freq = (msg->msg[3] << 8) | msg->msg[4]; *bcast_system = msg->msg[5]; } -static __inline__ void -cec_msg_select_digital_service(struct cec_msg *msg, - const struct cec_op_digital_service_id *digital) +static __inline__ void cec_msg_select_digital_service(struct cec_msg *msg, + const struct cec_op_digital_service_id *digital) { msg->len = 9; msg->msg[1] = CEC_MSG_SELECT_DIGITAL_SERVICE; cec_set_digital_service_id(msg->msg + 2, digital); } -static __inline__ void -cec_ops_select_digital_service(const struct cec_msg *msg, - struct cec_op_digital_service_id *digital) +static __inline__ void cec_ops_select_digital_service(const struct cec_msg *msg, + struct cec_op_digital_service_id *digital) { cec_get_digital_service_id(msg->msg + 2, digital); } @@ -1014,8 +909,7 @@ static __inline__ void cec_msg_tuner_step_increment(struct cec_msg *msg) } /* Vendor Specific Commands Feature */ -static __inline__ void cec_msg_device_vendor_id(struct cec_msg *msg, - __u32 vendor_id) +static __inline__ void cec_msg_device_vendor_id(struct cec_msg *msg, __u32 vendor_id) { msg->len = 5; msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; @@ -1025,22 +919,19 @@ static __inline__ void cec_msg_device_vendor_id(struct cec_msg *msg, msg->msg[4] = vendor_id & 0xff; } -static __inline__ void cec_ops_device_vendor_id(const struct cec_msg *msg, - __u32 *vendor_id) +static __inline__ void cec_ops_device_vendor_id(const struct cec_msg *msg, __u32 *vendor_id) { *vendor_id = (msg->msg[2] << 16) | (msg->msg[3] << 8) | msg->msg[4]; } -static __inline__ void cec_msg_give_device_vendor_id(struct cec_msg *msg, - int reply) +static __inline__ void cec_msg_give_device_vendor_id(struct cec_msg *msg, int reply) { msg->len = 2; msg->msg[1] = CEC_MSG_GIVE_DEVICE_VENDOR_ID; msg->reply = reply ? CEC_MSG_DEVICE_VENDOR_ID : 0; } -static __inline__ void cec_msg_vendor_command(struct cec_msg *msg, __u8 size, - const __u8 *vendor_cmd) +static __inline__ void cec_msg_vendor_command(struct cec_msg *msg, __u8 size, const __u8 *vendor_cmd) { if (size > 14) size = 14; @@ -1049,9 +940,7 @@ static __inline__ void cec_msg_vendor_command(struct cec_msg *msg, __u8 size, memcpy(msg->msg + 2, vendor_cmd, size); } -static __inline__ void cec_ops_vendor_command(const struct cec_msg *msg, - __u8 *size, - const __u8 **vendor_cmd) +static __inline__ void cec_ops_vendor_command(const struct cec_msg *msg, __u8 *size, const __u8 **vendor_cmd) { *size = msg->len - 2; @@ -1060,9 +949,7 @@ static __inline__ void cec_ops_vendor_command(const struct cec_msg *msg, *vendor_cmd = msg->msg + 2; } -static __inline__ void cec_msg_vendor_command_with_id(struct cec_msg *msg, - __u32 vendor_id, - __u8 size, +static __inline__ void cec_msg_vendor_command_with_id(struct cec_msg *msg, __u32 vendor_id, __u8 size, const __u8 *vendor_cmd) { if (size > 11) @@ -1075,9 +962,7 @@ static __inline__ void cec_msg_vendor_command_with_id(struct cec_msg *msg, memcpy(msg->msg + 5, vendor_cmd, size); } -static __inline__ void cec_ops_vendor_command_with_id(const struct cec_msg *msg, - __u32 *vendor_id, - __u8 *size, +static __inline__ void cec_ops_vendor_command_with_id(const struct cec_msg *msg, __u32 *vendor_id, __u8 *size, const __u8 **vendor_cmd) { *size = msg->len - 5; @@ -1088,9 +973,7 @@ static __inline__ void cec_ops_vendor_command_with_id(const struct cec_msg *msg, *vendor_cmd = msg->msg + 5; } -static __inline__ void cec_msg_vendor_remote_button_down(struct cec_msg *msg, - __u8 size, - const __u8 *rc_code) +static __inline__ void cec_msg_vendor_remote_button_down(struct cec_msg *msg, __u8 size, const __u8 *rc_code) { if (size > 14) size = 14; @@ -1099,9 +982,7 @@ static __inline__ void cec_msg_vendor_remote_button_down(struct cec_msg *msg, memcpy(msg->msg + 2, rc_code, size); } -static __inline__ void -cec_ops_vendor_remote_button_down(const struct cec_msg *msg, __u8 *size, - const __u8 **rc_code) +static __inline__ void cec_ops_vendor_remote_button_down(const struct cec_msg *msg, __u8 *size, const __u8 **rc_code) { *size = msg->len - 2; @@ -1117,8 +998,7 @@ static __inline__ void cec_msg_vendor_remote_button_up(struct cec_msg *msg) } /* OSD Display Feature */ -static __inline__ void cec_msg_set_osd_string(struct cec_msg *msg, - __u8 disp_ctl, const char *osd) +static __inline__ void cec_msg_set_osd_string(struct cec_msg *msg, __u8 disp_ctl, const char *osd) { unsigned int len = strlen(osd); @@ -1130,8 +1010,7 @@ static __inline__ void cec_msg_set_osd_string(struct cec_msg *msg, memcpy(msg->msg + 3, osd, len); } -static __inline__ void cec_ops_set_osd_string(const struct cec_msg *msg, - __u8 *disp_ctl, char *osd) +static __inline__ void cec_ops_set_osd_string(const struct cec_msg *msg, __u8 *disp_ctl, char *osd) { unsigned int len = msg->len > 3 ? msg->len - 3 : 0; @@ -1143,8 +1022,7 @@ static __inline__ void cec_ops_set_osd_string(const struct cec_msg *msg, } /* Device OSD Transfer Feature */ -static __inline__ void cec_msg_set_osd_name(struct cec_msg *msg, - const char *name) +static __inline__ void cec_msg_set_osd_name(struct cec_msg *msg, const char *name) { unsigned int len = strlen(name); @@ -1155,8 +1033,7 @@ static __inline__ void cec_msg_set_osd_name(struct cec_msg *msg, memcpy(msg->msg + 2, name, len); } -static __inline__ void cec_ops_set_osd_name(const struct cec_msg *msg, - char *name) +static __inline__ void cec_ops_set_osd_name(const struct cec_msg *msg, char *name) { unsigned int len = msg->len > 2 ? msg->len - 2 : 0; @@ -1181,14 +1058,12 @@ static __inline__ void cec_msg_menu_status(struct cec_msg *msg, __u8 menu_state) msg->msg[2] = menu_state; } -static __inline__ void cec_ops_menu_status(const struct cec_msg *msg, - __u8 *menu_state) +static __inline__ void cec_ops_menu_status(const struct cec_msg *msg, __u8 *menu_state) { *menu_state = msg->msg[2]; } -static __inline__ void cec_msg_menu_request(struct cec_msg *msg, int reply, - __u8 menu_req) +static __inline__ void cec_msg_menu_request(struct cec_msg *msg, int reply, __u8 menu_req) { msg->len = 3; msg->msg[1] = CEC_MSG_MENU_REQUEST; @@ -1196,8 +1071,7 @@ static __inline__ void cec_msg_menu_request(struct cec_msg *msg, int reply, msg->reply = reply ? CEC_MSG_MENU_STATUS : 0; } -static __inline__ void cec_ops_menu_request(const struct cec_msg *msg, - __u8 *menu_req) +static __inline__ void cec_ops_menu_request(const struct cec_msg *msg, __u8 *menu_req) { *menu_req = msg->msg[2]; } @@ -1216,9 +1090,7 @@ struct cec_op_ui_command { }; }; -static __inline__ void -cec_msg_user_control_pressed(struct cec_msg *msg, - const struct cec_op_ui_command *ui_cmd) +static __inline__ void cec_msg_user_control_pressed(struct cec_msg *msg, const struct cec_op_ui_command *ui_cmd) { msg->len = 3; msg->msg[1] = CEC_MSG_USER_CONTROL_PRESSED; @@ -1238,9 +1110,8 @@ cec_msg_user_control_pressed(struct cec_msg *msg, break; case CEC_OP_UI_CMD_TUNE_FUNCTION: msg->len += 4; - msg->msg[3] = - (ui_cmd->channel_identifier.channel_number_fmt << 2) | - (ui_cmd->channel_identifier.major >> 8); + msg->msg[3] = (ui_cmd->channel_identifier.channel_number_fmt << 2) | + (ui_cmd->channel_identifier.major >> 8); msg->msg[4] = ui_cmd->channel_identifier.major & 0xff; msg->msg[5] = ui_cmd->channel_identifier.minor >> 8; msg->msg[6] = ui_cmd->channel_identifier.minor & 0xff; @@ -1248,9 +1119,7 @@ cec_msg_user_control_pressed(struct cec_msg *msg, } } -static __inline__ void -cec_ops_user_control_pressed(const struct cec_msg *msg, - struct cec_op_ui_command *ui_cmd) +static __inline__ void cec_ops_user_control_pressed(const struct cec_msg *msg, struct cec_op_ui_command *ui_cmd) { ui_cmd->ui_cmd = msg->msg[2]; ui_cmd->has_opt_arg = 0; @@ -1271,12 +1140,9 @@ cec_ops_user_control_pressed(const struct cec_msg *msg, if (msg->len < 7) break; ui_cmd->has_opt_arg = 1; - ui_cmd->channel_identifier.channel_number_fmt = msg->msg[3] >> - 2; - ui_cmd->channel_identifier.major = ((msg->msg[3] & 3) << 6) | - msg->msg[4]; - ui_cmd->channel_identifier.minor = (msg->msg[5] << 8) | - msg->msg[6]; + ui_cmd->channel_identifier.channel_number_fmt = msg->msg[3] >> 2; + ui_cmd->channel_identifier.major = ((msg->msg[3] & 3) << 6) | msg->msg[4]; + ui_cmd->channel_identifier.minor = (msg->msg[5] << 8) | msg->msg[6]; break; } } @@ -1290,22 +1156,19 @@ static __inline__ void cec_msg_user_control_released(struct cec_msg *msg) /* Remote Control Passthrough Feature */ /* Power Status Feature */ -static __inline__ void cec_msg_report_power_status(struct cec_msg *msg, - __u8 pwr_state) +static __inline__ void cec_msg_report_power_status(struct cec_msg *msg, __u8 pwr_state) { msg->len = 3; msg->msg[1] = CEC_MSG_REPORT_POWER_STATUS; msg->msg[2] = pwr_state; } -static __inline__ void cec_ops_report_power_status(const struct cec_msg *msg, - __u8 *pwr_state) +static __inline__ void cec_ops_report_power_status(const struct cec_msg *msg, __u8 *pwr_state) { *pwr_state = msg->msg[2]; } -static __inline__ void cec_msg_give_device_power_status(struct cec_msg *msg, - int reply) +static __inline__ void cec_msg_give_device_power_status(struct cec_msg *msg, int reply) { msg->len = 2; msg->msg[1] = CEC_MSG_GIVE_DEVICE_POWER_STATUS; @@ -1313,8 +1176,7 @@ static __inline__ void cec_msg_give_device_power_status(struct cec_msg *msg, } /* General Protocol Messages */ -static __inline__ void cec_msg_feature_abort(struct cec_msg *msg, - __u8 abort_msg, __u8 reason) +static __inline__ void cec_msg_feature_abort(struct cec_msg *msg, __u8 abort_msg, __u8 reason) { msg->len = 4; msg->msg[1] = CEC_MSG_FEATURE_ABORT; @@ -1322,16 +1184,14 @@ static __inline__ void cec_msg_feature_abort(struct cec_msg *msg, msg->msg[3] = reason; } -static __inline__ void cec_ops_feature_abort(const struct cec_msg *msg, - __u8 *abort_msg, __u8 *reason) +static __inline__ void cec_ops_feature_abort(const struct cec_msg *msg, __u8 *abort_msg, __u8 *reason) { *abort_msg = msg->msg[2]; *reason = msg->msg[3]; } /* This changes the current message into a feature abort message */ -static __inline__ void cec_msg_reply_feature_abort(struct cec_msg *msg, - __u8 reason) +static __inline__ void cec_msg_reply_feature_abort(struct cec_msg *msg, __u8 reason) { cec_msg_set_reply_to(msg, msg); msg->len = 4; @@ -1347,17 +1207,14 @@ static __inline__ void cec_msg_abort(struct cec_msg *msg) } /* System Audio Control Feature */ -static __inline__ void cec_msg_report_audio_status(struct cec_msg *msg, - __u8 aud_mute_status, - __u8 aud_vol_status) +static __inline__ void cec_msg_report_audio_status(struct cec_msg *msg, __u8 aud_mute_status, __u8 aud_vol_status) { msg->len = 3; msg->msg[1] = CEC_MSG_REPORT_AUDIO_STATUS; msg->msg[2] = (aud_mute_status << 7) | (aud_vol_status & 0x7f); } -static __inline__ void cec_ops_report_audio_status(const struct cec_msg *msg, - __u8 *aud_mute_status, +static __inline__ void cec_ops_report_audio_status(const struct cec_msg *msg, __u8 *aud_mute_status, __u8 *aud_vol_status) { *aud_mute_status = msg->msg[2] >> 7; @@ -1371,23 +1228,19 @@ static __inline__ void cec_msg_give_audio_status(struct cec_msg *msg, int reply) msg->reply = reply ? CEC_MSG_REPORT_AUDIO_STATUS : 0; } -static __inline__ void cec_msg_set_system_audio_mode(struct cec_msg *msg, - __u8 sys_aud_status) +static __inline__ void cec_msg_set_system_audio_mode(struct cec_msg *msg, __u8 sys_aud_status) { msg->len = 3; msg->msg[1] = CEC_MSG_SET_SYSTEM_AUDIO_MODE; msg->msg[2] = sys_aud_status; } -static __inline__ void cec_ops_set_system_audio_mode(const struct cec_msg *msg, - __u8 *sys_aud_status) +static __inline__ void cec_ops_set_system_audio_mode(const struct cec_msg *msg, __u8 *sys_aud_status) { *sys_aud_status = msg->msg[2]; } -static __inline__ void cec_msg_system_audio_mode_request(struct cec_msg *msg, - int reply, - __u16 phys_addr) +static __inline__ void cec_msg_system_audio_mode_request(struct cec_msg *msg, int reply, __u16 phys_addr) { msg->len = phys_addr == 0xffff ? 2 : 4; msg->msg[1] = CEC_MSG_SYSTEM_AUDIO_MODE_REQUEST; @@ -1396,8 +1249,7 @@ static __inline__ void cec_msg_system_audio_mode_request(struct cec_msg *msg, msg->reply = reply ? CEC_MSG_SET_SYSTEM_AUDIO_MODE : 0; } -static __inline__ void -cec_ops_system_audio_mode_request(const struct cec_msg *msg, __u16 *phys_addr) +static __inline__ void cec_ops_system_audio_mode_request(const struct cec_msg *msg, __u16 *phys_addr) { if (msg->len < 4) *phys_addr = 0xffff; @@ -1405,32 +1257,27 @@ cec_ops_system_audio_mode_request(const struct cec_msg *msg, __u16 *phys_addr) *phys_addr = (msg->msg[2] << 8) | msg->msg[3]; } -static __inline__ void cec_msg_system_audio_mode_status(struct cec_msg *msg, - __u8 sys_aud_status) +static __inline__ void cec_msg_system_audio_mode_status(struct cec_msg *msg, __u8 sys_aud_status) { msg->len = 3; msg->msg[1] = CEC_MSG_SYSTEM_AUDIO_MODE_STATUS; msg->msg[2] = sys_aud_status; } -static __inline__ void -cec_ops_system_audio_mode_status(const struct cec_msg *msg, - __u8 *sys_aud_status) +static __inline__ void cec_ops_system_audio_mode_status(const struct cec_msg *msg, __u8 *sys_aud_status) { *sys_aud_status = msg->msg[2]; } -static __inline__ void -cec_msg_give_system_audio_mode_status(struct cec_msg *msg, int reply) +static __inline__ void cec_msg_give_system_audio_mode_status(struct cec_msg *msg, int reply) { msg->len = 2; msg->msg[1] = CEC_MSG_GIVE_SYSTEM_AUDIO_MODE_STATUS; msg->reply = reply ? CEC_MSG_SYSTEM_AUDIO_MODE_STATUS : 0; } -static __inline__ void -cec_msg_report_short_audio_descriptor(struct cec_msg *msg, __u8 num_descriptors, - const __u32 *descriptors) +static __inline__ void cec_msg_report_short_audio_descriptor(struct cec_msg *msg, __u8 num_descriptors, + const __u32 *descriptors) { unsigned int i; @@ -1445,9 +1292,8 @@ cec_msg_report_short_audio_descriptor(struct cec_msg *msg, __u8 num_descriptors, } } -static __inline__ void -cec_ops_report_short_audio_descriptor(const struct cec_msg *msg, - __u8 *num_descriptors, __u32 *descriptors) +static __inline__ void cec_ops_report_short_audio_descriptor(const struct cec_msg *msg, __u8 *num_descriptors, + __u32 *descriptors) { unsigned int i; @@ -1455,14 +1301,12 @@ cec_ops_report_short_audio_descriptor(const struct cec_msg *msg, if (*num_descriptors > 4) *num_descriptors = 4; for (i = 0; i < *num_descriptors; i++) - descriptors[i] = (msg->msg[2 + i * 3] << 16) | - (msg->msg[3 + i * 3] << 8) | - msg->msg[4 + i * 3]; + descriptors[i] = (msg->msg[2 + i * 3] << 16) | (msg->msg[3 + i * 3] << 8) | msg->msg[4 + i * 3]; } -static __inline__ void cec_msg_request_short_audio_descriptor( - struct cec_msg *msg, int reply, __u8 num_descriptors, - const __u8 *audio_format_id, const __u8 *audio_format_code) +static __inline__ void cec_msg_request_short_audio_descriptor(struct cec_msg *msg, int reply, __u8 num_descriptors, + const __u8 *audio_format_id, + const __u8 *audio_format_code) { unsigned int i; @@ -1472,13 +1316,11 @@ static __inline__ void cec_msg_request_short_audio_descriptor( msg->msg[1] = CEC_MSG_REQUEST_SHORT_AUDIO_DESCRIPTOR; msg->reply = reply ? CEC_MSG_REPORT_SHORT_AUDIO_DESCRIPTOR : 0; for (i = 0; i < num_descriptors; i++) - msg->msg[2 + i] = (audio_format_id[i] << 6) | - (audio_format_code[i] & 0x3f); + msg->msg[2 + i] = (audio_format_id[i] << 6) | (audio_format_code[i] & 0x3f); } -static __inline__ void cec_ops_request_short_audio_descriptor( - const struct cec_msg *msg, __u8 *num_descriptors, __u8 *audio_format_id, - __u8 *audio_format_code) +static __inline__ void cec_ops_request_short_audio_descriptor(const struct cec_msg *msg, __u8 *num_descriptors, + __u8 *audio_format_id, __u8 *audio_format_code) { unsigned int i; @@ -1491,31 +1333,27 @@ static __inline__ void cec_ops_request_short_audio_descriptor( } } -static __inline__ void cec_msg_set_audio_volume_level(struct cec_msg *msg, - __u8 audio_volume_level) +static __inline__ void cec_msg_set_audio_volume_level(struct cec_msg *msg, __u8 audio_volume_level) { msg->len = 3; msg->msg[1] = CEC_MSG_SET_AUDIO_VOLUME_LEVEL; msg->msg[2] = audio_volume_level; } -static __inline__ void cec_ops_set_audio_volume_level(const struct cec_msg *msg, - __u8 *audio_volume_level) +static __inline__ void cec_ops_set_audio_volume_level(const struct cec_msg *msg, __u8 *audio_volume_level) { *audio_volume_level = msg->msg[2]; } /* Audio Rate Control Feature */ -static __inline__ void cec_msg_set_audio_rate(struct cec_msg *msg, - __u8 audio_rate) +static __inline__ void cec_msg_set_audio_rate(struct cec_msg *msg, __u8 audio_rate) { msg->len = 3; msg->msg[1] = CEC_MSG_SET_AUDIO_RATE; msg->msg[2] = audio_rate; } -static __inline__ void cec_ops_set_audio_rate(const struct cec_msg *msg, - __u8 *audio_rate) +static __inline__ void cec_ops_set_audio_rate(const struct cec_msg *msg, __u8 *audio_rate) { *audio_rate = msg->msg[2]; } @@ -1534,8 +1372,7 @@ static __inline__ void cec_msg_initiate_arc(struct cec_msg *msg, int reply) msg->reply = reply ? CEC_MSG_REPORT_ARC_INITIATED : 0; } -static __inline__ void cec_msg_request_arc_initiation(struct cec_msg *msg, - int reply) +static __inline__ void cec_msg_request_arc_initiation(struct cec_msg *msg, int reply) { msg->len = 2; msg->msg[1] = CEC_MSG_REQUEST_ARC_INITIATION; @@ -1555,8 +1392,7 @@ static __inline__ void cec_msg_terminate_arc(struct cec_msg *msg, int reply) msg->reply = reply ? CEC_MSG_REPORT_ARC_TERMINATED : 0; } -static __inline__ void cec_msg_request_arc_termination(struct cec_msg *msg, - int reply) +static __inline__ void cec_msg_request_arc_termination(struct cec_msg *msg, int reply) { msg->len = 2; msg->msg[1] = CEC_MSG_REQUEST_ARC_TERMINATION; @@ -1565,10 +1401,9 @@ static __inline__ void cec_msg_request_arc_termination(struct cec_msg *msg, /* Dynamic Audio Lipsync Feature */ /* Only for CEC 2.0 and up */ -static __inline__ void -cec_msg_report_current_latency(struct cec_msg *msg, __u16 phys_addr, - __u8 video_latency, __u8 low_latency_mode, - __u8 audio_out_compensated, __u8 audio_out_delay) +static __inline__ void cec_msg_report_current_latency(struct cec_msg *msg, __u16 phys_addr, __u8 video_latency, + __u8 low_latency_mode, __u8 audio_out_compensated, + __u8 audio_out_delay) { msg->len = 6; msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; @@ -1581,11 +1416,9 @@ cec_msg_report_current_latency(struct cec_msg *msg, __u16 phys_addr, msg->msg[msg->len++] = audio_out_delay; } -static __inline__ void -cec_ops_report_current_latency(const struct cec_msg *msg, __u16 *phys_addr, - __u8 *video_latency, __u8 *low_latency_mode, - __u8 *audio_out_compensated, - __u8 *audio_out_delay) +static __inline__ void cec_ops_report_current_latency(const struct cec_msg *msg, __u16 *phys_addr, __u8 *video_latency, + __u8 *low_latency_mode, __u8 *audio_out_compensated, + __u8 *audio_out_delay) { *phys_addr = (msg->msg[2] << 8) | msg->msg[3]; *video_latency = msg->msg[4]; @@ -1597,8 +1430,7 @@ cec_ops_report_current_latency(const struct cec_msg *msg, __u16 *phys_addr, *audio_out_delay = 1; } -static __inline__ void -cec_msg_request_current_latency(struct cec_msg *msg, int reply, __u16 phys_addr) +static __inline__ void cec_msg_request_current_latency(struct cec_msg *msg, int reply, __u16 phys_addr) { msg->len = 4; msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; @@ -1608,16 +1440,13 @@ cec_msg_request_current_latency(struct cec_msg *msg, int reply, __u16 phys_addr) msg->reply = reply ? CEC_MSG_REPORT_CURRENT_LATENCY : 0; } -static __inline__ void -cec_ops_request_current_latency(const struct cec_msg *msg, __u16 *phys_addr) +static __inline__ void cec_ops_request_current_latency(const struct cec_msg *msg, __u16 *phys_addr) { *phys_addr = (msg->msg[2] << 8) | msg->msg[3]; } /* Capability Discovery and Control Feature */ -static __inline__ void cec_msg_cdc_hec_inquire_state(struct cec_msg *msg, - __u16 phys_addr1, - __u16 phys_addr2) +static __inline__ void cec_msg_cdc_hec_inquire_state(struct cec_msg *msg, __u16 phys_addr1, __u16 phys_addr2) { msg->len = 9; msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; @@ -1630,9 +1459,7 @@ static __inline__ void cec_msg_cdc_hec_inquire_state(struct cec_msg *msg, msg->msg[8] = phys_addr2 & 0xff; } -static __inline__ void cec_ops_cdc_hec_inquire_state(const struct cec_msg *msg, - __u16 *phys_addr, - __u16 *phys_addr1, +static __inline__ void cec_ops_cdc_hec_inquire_state(const struct cec_msg *msg, __u16 *phys_addr, __u16 *phys_addr1, __u16 *phys_addr2) { *phys_addr = (msg->msg[2] << 8) | msg->msg[3]; @@ -1640,11 +1467,9 @@ static __inline__ void cec_ops_cdc_hec_inquire_state(const struct cec_msg *msg, *phys_addr2 = (msg->msg[7] << 8) | msg->msg[8]; } -static __inline__ void -cec_msg_cdc_hec_report_state(struct cec_msg *msg, __u16 target_phys_addr, - __u8 hec_func_state, __u8 host_func_state, - __u8 enc_func_state, __u8 cdc_errcode, - __u8 has_field, __u16 hec_field) +static __inline__ void cec_msg_cdc_hec_report_state(struct cec_msg *msg, __u16 target_phys_addr, __u8 hec_func_state, + __u8 host_func_state, __u8 enc_func_state, __u8 cdc_errcode, + __u8 has_field, __u16 hec_field) { msg->len = has_field ? 10 : 8; msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; @@ -1653,18 +1478,17 @@ cec_msg_cdc_hec_report_state(struct cec_msg *msg, __u16 target_phys_addr, msg->msg[4] = CEC_MSG_CDC_HEC_REPORT_STATE; msg->msg[5] = target_phys_addr >> 8; msg->msg[6] = target_phys_addr & 0xff; - msg->msg[7] = (hec_func_state << 6) | (host_func_state << 4) | - (enc_func_state << 2) | cdc_errcode; + msg->msg[7] = (hec_func_state << 6) | (host_func_state << 4) | (enc_func_state << 2) | cdc_errcode; if (has_field) { msg->msg[8] = hec_field >> 8; msg->msg[9] = hec_field & 0xff; } } -static __inline__ void cec_ops_cdc_hec_report_state( - const struct cec_msg *msg, __u16 *phys_addr, __u16 *target_phys_addr, - __u8 *hec_func_state, __u8 *host_func_state, __u8 *enc_func_state, - __u8 *cdc_errcode, __u8 *has_field, __u16 *hec_field) +static __inline__ void cec_ops_cdc_hec_report_state(const struct cec_msg *msg, __u16 *phys_addr, + __u16 *target_phys_addr, __u8 *hec_func_state, + __u8 *host_func_state, __u8 *enc_func_state, __u8 *cdc_errcode, + __u8 *has_field, __u16 *hec_field) { *phys_addr = (msg->msg[2] << 8) | msg->msg[3]; *target_phys_addr = (msg->msg[5] << 8) | msg->msg[6]; @@ -1676,10 +1500,9 @@ static __inline__ void cec_ops_cdc_hec_report_state( *hec_field = *has_field ? ((msg->msg[8] << 8) | msg->msg[9]) : 0; } -static __inline__ void -cec_msg_cdc_hec_set_state(struct cec_msg *msg, __u16 phys_addr1, - __u16 phys_addr2, __u8 hec_set_state, - __u16 phys_addr3, __u16 phys_addr4, __u16 phys_addr5) +static __inline__ void cec_msg_cdc_hec_set_state(struct cec_msg *msg, __u16 phys_addr1, __u16 phys_addr2, + __u8 hec_set_state, __u16 phys_addr3, __u16 phys_addr4, + __u16 phys_addr5) { msg->len = 10; msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; @@ -1705,11 +1528,9 @@ cec_msg_cdc_hec_set_state(struct cec_msg *msg, __u16 phys_addr1, } } -static __inline__ void -cec_ops_cdc_hec_set_state(const struct cec_msg *msg, __u16 *phys_addr, - __u16 *phys_addr1, __u16 *phys_addr2, - __u8 *hec_set_state, __u16 *phys_addr3, - __u16 *phys_addr4, __u16 *phys_addr5) +static __inline__ void cec_ops_cdc_hec_set_state(const struct cec_msg *msg, __u16 *phys_addr, __u16 *phys_addr1, + __u16 *phys_addr2, __u8 *hec_set_state, __u16 *phys_addr3, + __u16 *phys_addr4, __u16 *phys_addr5) { *phys_addr = (msg->msg[2] << 8) | msg->msg[3]; *phys_addr1 = (msg->msg[5] << 8) | msg->msg[6]; @@ -1724,9 +1545,7 @@ cec_ops_cdc_hec_set_state(const struct cec_msg *msg, __u16 *phys_addr, *phys_addr5 = (msg->msg[14] << 8) | msg->msg[15]; } -static __inline__ void cec_msg_cdc_hec_set_state_adjacent(struct cec_msg *msg, - __u16 phys_addr1, - __u8 hec_set_state) +static __inline__ void cec_msg_cdc_hec_set_state_adjacent(struct cec_msg *msg, __u16 phys_addr1, __u8 hec_set_state) { msg->len = 8; msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; @@ -1738,18 +1557,15 @@ static __inline__ void cec_msg_cdc_hec_set_state_adjacent(struct cec_msg *msg, msg->msg[7] = hec_set_state; } -static __inline__ void -cec_ops_cdc_hec_set_state_adjacent(const struct cec_msg *msg, __u16 *phys_addr, - __u16 *phys_addr1, __u8 *hec_set_state) +static __inline__ void cec_ops_cdc_hec_set_state_adjacent(const struct cec_msg *msg, __u16 *phys_addr, + __u16 *phys_addr1, __u8 *hec_set_state) { *phys_addr = (msg->msg[2] << 8) | msg->msg[3]; *phys_addr1 = (msg->msg[5] << 8) | msg->msg[6]; *hec_set_state = msg->msg[7]; } -static __inline__ void cec_msg_cdc_hec_request_deactivation(struct cec_msg *msg, - __u16 phys_addr1, - __u16 phys_addr2, +static __inline__ void cec_msg_cdc_hec_request_deactivation(struct cec_msg *msg, __u16 phys_addr1, __u16 phys_addr2, __u16 phys_addr3) { msg->len = 11; @@ -1765,10 +1581,8 @@ static __inline__ void cec_msg_cdc_hec_request_deactivation(struct cec_msg *msg, msg->msg[10] = phys_addr3 & 0xff; } -static __inline__ void -cec_ops_cdc_hec_request_deactivation(const struct cec_msg *msg, - __u16 *phys_addr, __u16 *phys_addr1, - __u16 *phys_addr2, __u16 *phys_addr3) +static __inline__ void cec_ops_cdc_hec_request_deactivation(const struct cec_msg *msg, __u16 *phys_addr, + __u16 *phys_addr1, __u16 *phys_addr2, __u16 *phys_addr3) { *phys_addr = (msg->msg[2] << 8) | msg->msg[3]; *phys_addr1 = (msg->msg[5] << 8) | msg->msg[6]; @@ -1785,8 +1599,7 @@ static __inline__ void cec_msg_cdc_hec_notify_alive(struct cec_msg *msg) msg->msg[4] = CEC_MSG_CDC_HEC_NOTIFY_ALIVE; } -static __inline__ void cec_ops_cdc_hec_notify_alive(const struct cec_msg *msg, - __u16 *phys_addr) +static __inline__ void cec_ops_cdc_hec_notify_alive(const struct cec_msg *msg, __u16 *phys_addr) { *phys_addr = (msg->msg[2] << 8) | msg->msg[3]; } @@ -1800,14 +1613,12 @@ static __inline__ void cec_msg_cdc_hec_discover(struct cec_msg *msg) msg->msg[4] = CEC_MSG_CDC_HEC_DISCOVER; } -static __inline__ void cec_ops_cdc_hec_discover(const struct cec_msg *msg, - __u16 *phys_addr) +static __inline__ void cec_ops_cdc_hec_discover(const struct cec_msg *msg, __u16 *phys_addr) { *phys_addr = (msg->msg[2] << 8) | msg->msg[3]; } -static __inline__ void -cec_msg_cdc_hpd_set_state(struct cec_msg *msg, __u8 input_port, __u8 hpd_state) +static __inline__ void cec_msg_cdc_hpd_set_state(struct cec_msg *msg, __u8 input_port, __u8 hpd_state) { msg->len = 6; msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; @@ -1817,9 +1628,7 @@ cec_msg_cdc_hpd_set_state(struct cec_msg *msg, __u8 input_port, __u8 hpd_state) msg->msg[5] = (input_port << 4) | hpd_state; } -static __inline__ void cec_ops_cdc_hpd_set_state(const struct cec_msg *msg, - __u16 *phys_addr, - __u8 *input_port, +static __inline__ void cec_ops_cdc_hpd_set_state(const struct cec_msg *msg, __u16 *phys_addr, __u8 *input_port, __u8 *hpd_state) { *phys_addr = (msg->msg[2] << 8) | msg->msg[3]; @@ -1827,9 +1636,7 @@ static __inline__ void cec_ops_cdc_hpd_set_state(const struct cec_msg *msg, *hpd_state = msg->msg[5] & 0xf; } -static __inline__ void cec_msg_cdc_hpd_report_state(struct cec_msg *msg, - __u8 hpd_state, - __u8 hpd_error) +static __inline__ void cec_msg_cdc_hpd_report_state(struct cec_msg *msg, __u8 hpd_state, __u8 hpd_error) { msg->len = 6; msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; @@ -1839,9 +1646,7 @@ static __inline__ void cec_msg_cdc_hpd_report_state(struct cec_msg *msg, msg->msg[5] = (hpd_state << 4) | hpd_error; } -static __inline__ void cec_ops_cdc_hpd_report_state(const struct cec_msg *msg, - __u16 *phys_addr, - __u8 *hpd_state, +static __inline__ void cec_ops_cdc_hpd_report_state(const struct cec_msg *msg, __u16 *phys_addr, __u8 *hpd_state, __u8 *hpd_error) { *phys_addr = (msg->msg[2] << 8) | msg->msg[3]; diff --git a/include/arch/x86_64/linux/cec.h b/include/arch/x86_64/linux/cec.h index 9ed8b2d5..a12db89d 100644 --- a/include/arch/x86_64/linux/cec.h +++ b/include/arch/x86_64/linux/cec.h @@ -118,8 +118,7 @@ static __inline__ int cec_msg_is_broadcast(const struct cec_msg *msg) * The whole structure is zeroed, the len field is set to 1 (i.e. a poll * message) and the initiator and destination are filled in. */ -static __inline__ void cec_msg_init(struct cec_msg *msg, __u8 initiator, - __u8 destination) +static __inline__ void cec_msg_init(struct cec_msg *msg, __u8 initiator, __u8 destination) { memset(msg, 0, sizeof(*msg)); msg->msg[0] = (initiator << 4) | destination; @@ -137,12 +136,10 @@ static __inline__ void cec_msg_init(struct cec_msg *msg, __u8 initiator, * * It also zeroes the reply, timeout and flags fields. */ -static __inline__ void cec_msg_set_reply_to(struct cec_msg *msg, - struct cec_msg *orig) +static __inline__ void cec_msg_set_reply_to(struct cec_msg *msg, struct cec_msg *orig) { /* The destination becomes the initiator and vice versa */ - msg->msg[0] = (cec_msg_destination(orig) << 4) | - cec_msg_initiator(orig); + msg->msg[0] = (cec_msg_destination(orig) << 4) | cec_msg_initiator(orig); msg->reply = 0; msg->timeout = 0; msg->flags = 0; @@ -242,18 +239,15 @@ static __inline__ int cec_msg_status_is_ok(const struct cec_msg *msg) */ #define CEC_LOG_ADDR_MASK_TV (1 << CEC_LOG_ADDR_TV) -#define CEC_LOG_ADDR_MASK_RECORD \ - ((1 << CEC_LOG_ADDR_RECORD_1) | (1 << CEC_LOG_ADDR_RECORD_2) | \ - (1 << CEC_LOG_ADDR_RECORD_3)) -#define CEC_LOG_ADDR_MASK_TUNER \ - ((1 << CEC_LOG_ADDR_TUNER_1) | (1 << CEC_LOG_ADDR_TUNER_2) | \ - (1 << CEC_LOG_ADDR_TUNER_3) | (1 << CEC_LOG_ADDR_TUNER_4)) -#define CEC_LOG_ADDR_MASK_PLAYBACK \ - ((1 << CEC_LOG_ADDR_PLAYBACK_1) | (1 << CEC_LOG_ADDR_PLAYBACK_2) | \ - (1 << CEC_LOG_ADDR_PLAYBACK_3)) -#define CEC_LOG_ADDR_MASK_AUDIOSYSTEM (1 << CEC_LOG_ADDR_AUDIOSYSTEM) -#define CEC_LOG_ADDR_MASK_BACKUP \ - ((1 << CEC_LOG_ADDR_BACKUP_1) | (1 << CEC_LOG_ADDR_BACKUP_2)) +#define CEC_LOG_ADDR_MASK_RECORD \ + ((1 << CEC_LOG_ADDR_RECORD_1) | (1 << CEC_LOG_ADDR_RECORD_2) | (1 << CEC_LOG_ADDR_RECORD_3)) +#define CEC_LOG_ADDR_MASK_TUNER \ + ((1 << CEC_LOG_ADDR_TUNER_1) | (1 << CEC_LOG_ADDR_TUNER_2) | (1 << CEC_LOG_ADDR_TUNER_3) | \ + (1 << CEC_LOG_ADDR_TUNER_4)) +#define CEC_LOG_ADDR_MASK_PLAYBACK \ + ((1 << CEC_LOG_ADDR_PLAYBACK_1) | (1 << CEC_LOG_ADDR_PLAYBACK_2) | (1 << CEC_LOG_ADDR_PLAYBACK_3)) +#define CEC_LOG_ADDR_MASK_AUDIOSYSTEM (1 << CEC_LOG_ADDR_AUDIOSYSTEM) +#define CEC_LOG_ADDR_MASK_BACKUP ((1 << CEC_LOG_ADDR_BACKUP_1) | (1 << CEC_LOG_ADDR_BACKUP_2)) #define CEC_LOG_ADDR_MASK_SPECIFIC (1 << CEC_LOG_ADDR_SPECIFIC) #define CEC_LOG_ADDR_MASK_UNREGISTERED (1 << CEC_LOG_ADDR_UNREGISTERED) @@ -1153,8 +1147,7 @@ static __inline__ int cec_is_2nd_tv(const struct cec_log_addrs *las) * It is a second TV if the logical address is 14 or 15 and the * primary device type is a TV. */ - return las->num_log_addrs && - las->log_addr[0] >= CEC_LOG_ADDR_SPECIFIC && + return las->num_log_addrs && las->log_addr[0] >= CEC_LOG_ADDR_SPECIFIC && las->primary_device_type[0] == CEC_OP_PRIM_DEVTYPE_TV; } @@ -1164,8 +1157,7 @@ static __inline__ int cec_is_processor(const struct cec_log_addrs *las) * It is a processor if the logical address is 12-15 and the * primary device type is a Processor. */ - return las->num_log_addrs && - las->log_addr[0] >= CEC_LOG_ADDR_BACKUP_1 && + return las->num_log_addrs && las->log_addr[0] >= CEC_LOG_ADDR_BACKUP_1 && las->primary_device_type[0] == CEC_OP_PRIM_DEVTYPE_PROCESSOR; } @@ -1175,10 +1167,8 @@ static __inline__ int cec_is_switch(const struct cec_log_addrs *las) * It is a switch if the logical address is 15 and the * primary device type is a Switch and the CDC-Only flag is not set. */ - return las->num_log_addrs == 1 && - las->log_addr[0] == CEC_LOG_ADDR_UNREGISTERED && - las->primary_device_type[0] == CEC_OP_PRIM_DEVTYPE_SWITCH && - !(las->flags & CEC_LOG_ADDRS_FL_CDC_ONLY); + return las->num_log_addrs == 1 && las->log_addr[0] == CEC_LOG_ADDR_UNREGISTERED && + las->primary_device_type[0] == CEC_OP_PRIM_DEVTYPE_SWITCH && !(las->flags & CEC_LOG_ADDRS_FL_CDC_ONLY); } static __inline__ int cec_is_cdc_only(const struct cec_log_addrs *las) @@ -1187,10 +1177,8 @@ static __inline__ int cec_is_cdc_only(const struct cec_log_addrs *las) * It is a CDC-only device if the logical address is 15 and the * primary device type is a Switch and the CDC-Only flag is set. */ - return las->num_log_addrs == 1 && - las->log_addr[0] == CEC_LOG_ADDR_UNREGISTERED && - las->primary_device_type[0] == CEC_OP_PRIM_DEVTYPE_SWITCH && - (las->flags & CEC_LOG_ADDRS_FL_CDC_ONLY); + return las->num_log_addrs == 1 && las->log_addr[0] == CEC_LOG_ADDR_UNREGISTERED && + las->primary_device_type[0] == CEC_OP_PRIM_DEVTYPE_SWITCH && (las->flags & CEC_LOG_ADDRS_FL_CDC_ONLY); } #endif diff --git a/include/arch/x86_64/linux/cfm_bridge.h b/include/arch/x86_64/linux/cfm_bridge.h index 21fc6bd1..9090da0a 100644 --- a/include/arch/x86_64/linux/cfm_bridge.h +++ b/include/arch/x86_64/linux/cfm_bridge.h @@ -14,9 +14,8 @@ #define CFM_IF_STATUS_TLV_TYPE 4 #define CFM_PORT_STATUS_TLV_TYPE 2 #define CFM_ENDE_TLV_TYPE 0 -#define CFM_CCM_MAX_FRAME_LENGTH \ - (ETHER_HEADER_LENGTH + CFM_CCM_PDU_LENGTH + \ - CFM_PORT_STATUS_TLV_LENGTH + CFM_IF_STATUS_TLV_LENGTH) +#define CFM_CCM_MAX_FRAME_LENGTH \ + (ETHER_HEADER_LENGTH + CFM_CCM_PDU_LENGTH + CFM_PORT_STATUS_TLV_LENGTH + CFM_IF_STATUS_TLV_LENGTH) #define CFM_FRAME_PRIO 7 #define CFM_CCM_TLV_OFFSET 70 #define CFM_CCM_PDU_MAID_OFFSET 10 diff --git a/include/arch/x86_64/linux/cgroupstats.h b/include/arch/x86_64/linux/cgroupstats.h index 2b39badf..52f9eda6 100644 --- a/include/arch/x86_64/linux/cgroupstats.h +++ b/include/arch/x86_64/linux/cgroupstats.h @@ -44,8 +44,8 @@ struct cgroupstats { enum { CGROUPSTATS_CMD_UNSPEC = __TASKSTATS_CMD_MAX, /* Reserved */ - CGROUPSTATS_CMD_GET, /* user->kernel request/get-response */ - CGROUPSTATS_CMD_NEW, /* kernel->user event */ + CGROUPSTATS_CMD_GET, /* user->kernel request/get-response */ + CGROUPSTATS_CMD_NEW, /* kernel->user event */ __CGROUPSTATS_CMD_MAX, }; diff --git a/include/arch/x86_64/linux/cifs/cifs_mount.h b/include/arch/x86_64/linux/cifs/cifs_mount.h index 42868a75..901cb2a7 100644 --- a/include/arch/x86_64/linux/cifs/cifs_mount.h +++ b/include/arch/x86_64/linux/cifs/cifs_mount.h @@ -17,10 +17,10 @@ #define _CIFS_MOUNT_H /* Max string lengths for cifs mounting options. */ -#define CIFS_MAX_DOMAINNAME_LEN 256 /* max fully qualified domain name */ -#define CIFS_MAX_USERNAME_LEN 256 /* reasonable max for current servers */ -#define CIFS_MAX_PASSWORD_LEN 512 /* Windows max seems to be 256 wide chars */ -#define CIFS_MAX_SHARE_LEN 256 /* reasonable max share name length */ +#define CIFS_MAX_DOMAINNAME_LEN 256 /* max fully qualified domain name */ +#define CIFS_MAX_USERNAME_LEN 256 /* reasonable max for current servers */ +#define CIFS_MAX_PASSWORD_LEN 512 /* Windows max seems to be 256 wide chars */ +#define CIFS_MAX_SHARE_LEN 256 /* reasonable max share name length */ #define CIFS_NI_MAXHOST 1024 /* max host name length (256 * 4 bytes) */ #endif /* _CIFS_MOUNT_H */ diff --git a/include/arch/x86_64/linux/cn_proc.h b/include/arch/x86_64/linux/cn_proc.h index bf31314f..5875ddc4 100644 --- a/include/arch/x86_64/linux/cn_proc.h +++ b/include/arch/x86_64/linux/cn_proc.h @@ -27,10 +27,9 @@ */ enum proc_cn_mcast_op { PROC_CN_MCAST_LISTEN = 1, PROC_CN_MCAST_IGNORE = 2 }; -#define PROC_EVENT_ALL \ - (PROC_EVENT_FORK | PROC_EVENT_EXEC | PROC_EVENT_UID | PROC_EVENT_GID | \ - PROC_EVENT_SID | PROC_EVENT_PTRACE | PROC_EVENT_COMM | \ - PROC_EVENT_NONZERO_EXIT | PROC_EVENT_COREDUMP | PROC_EVENT_EXIT) +#define PROC_EVENT_ALL \ + (PROC_EVENT_FORK | PROC_EVENT_EXEC | PROC_EVENT_UID | PROC_EVENT_GID | PROC_EVENT_SID | PROC_EVENT_PTRACE | \ + PROC_EVENT_COMM | PROC_EVENT_NONZERO_EXIT | PROC_EVENT_COREDUMP | PROC_EVENT_EXIT) /* * If you add an entry in proc_cn_event, make sure you add it in diff --git a/include/arch/x86_64/linux/coda.h b/include/arch/x86_64/linux/coda.h index 6cca63dc..19196aa1 100644 --- a/include/arch/x86_64/linux/coda.h +++ b/include/arch/x86_64/linux/coda.h @@ -60,8 +60,7 @@ Mellon the rights to redistribute these changes without encumbrance. #define _CODA_HEADER_ /* Catch new _KERNEL defn for NetBSD and DJGPP/__CYGWIN32__ */ -#if defined(__NetBSD__) || \ - ((defined(DJGPP) || defined(__CYGWIN32__)) && !defined(KERNEL)) +#if defined(__NetBSD__) || ((defined(DJGPP) || defined(__CYGWIN32__)) && !defined(KERNEL)) #include #endif @@ -149,9 +148,7 @@ struct venus_dirent { char d_name[CODA_MAXNAMLEN + 1]; /* name must be no longer than this */ }; #undef DIRSIZ -#define DIRSIZ(dp) \ - ((sizeof(struct venus_dirent) - (CODA_MAXNAMLEN + 1)) + \ - (((dp)->d_namlen + 1 + 3) & ~3)) +#define DIRSIZ(dp) ((sizeof(struct venus_dirent) - (CODA_MAXNAMLEN + 1)) + (((dp)->d_namlen + 1 + 3) & ~3)) /* * File types @@ -184,27 +181,14 @@ struct CodaFid { u_int32_t opaque[4]; }; -#define coda_f2i(fid) \ - (fid ? (fid->opaque[3] ^ (fid->opaque[2] << 10) ^ \ - (fid->opaque[1] << 20) ^ fid->opaque[0]) : \ - 0) +#define coda_f2i(fid) (fid ? (fid->opaque[3] ^ (fid->opaque[2] << 10) ^ (fid->opaque[1] << 20) ^ fid->opaque[0]) : 0) #ifndef _VENUS_VATTR_T_ #define _VENUS_VATTR_T_ /* * Vnode types. VNON means no type. */ -enum coda_vtype { - C_VNON, - C_VREG, - C_VDIR, - C_VBLK, - C_VCHR, - C_VLNK, - C_VSOCK, - C_VFIFO, - C_VBAD -}; +enum coda_vtype { C_VNON, C_VREG, C_VDIR, C_VBLK, C_VCHR, C_VLNK, C_VSOCK, C_VFIFO, C_VBAD }; struct coda_timespec { int64_t tv_sec; /* seconds */ @@ -283,8 +267,7 @@ struct coda_statfs { #define DOWNCALL(opcode) (opcode >= CODA_REPLACE && opcode <= CODA_PURGEFID) #define VC_MAXDATASIZE 8192 -#define VC_MAXMSGSIZE \ - sizeof(union inputArgs) + sizeof(union outputArgs) + VC_MAXDATASIZE +#define VC_MAXMSGSIZE sizeof(union inputArgs) + sizeof(union outputArgs) + VC_MAXDATASIZE #define CIOC_KERNEL_VERSION _IOWR('c', 10, size_t) diff --git a/include/arch/x86_64/linux/coff.h b/include/arch/x86_64/linux/coff.h index c55e9e76..08eb9352 100644 --- a/include/arch/x86_64/linux/coff.h +++ b/include/arch/x86_64/linux/coff.h @@ -26,28 +26,22 @@ */ /* Load a short int from the following tables with little-endian formats */ -#define COFF_SHORT_L(ps) \ - ((short)(((unsigned short)((unsigned char)ps[1]) << 8) | \ - ((unsigned short)((unsigned char)ps[0])))) +#define COFF_SHORT_L(ps) \ + ((short)(((unsigned short)((unsigned char)ps[1]) << 8) | ((unsigned short)((unsigned char)ps[0])))) /* Load a long int from the following tables with little-endian formats */ -#define COFF_LONG_L(ps) \ - (((long)(((unsigned long)((unsigned char)ps[3]) << 24) | \ - ((unsigned long)((unsigned char)ps[2]) << 16) | \ - ((unsigned long)((unsigned char)ps[1]) << 8) | \ - ((unsigned long)((unsigned char)ps[0]))))) +#define COFF_LONG_L(ps) \ + (((long)(((unsigned long)((unsigned char)ps[3]) << 24) | ((unsigned long)((unsigned char)ps[2]) << 16) | \ + ((unsigned long)((unsigned char)ps[1]) << 8) | ((unsigned long)((unsigned char)ps[0]))))) /* Load a short int from the following tables with big-endian formats */ -#define COFF_SHORT_H(ps) \ - ((short)(((unsigned short)((unsigned char)ps[0]) << 8) | \ - ((unsigned short)((unsigned char)ps[1])))) +#define COFF_SHORT_H(ps) \ + ((short)(((unsigned short)((unsigned char)ps[0]) << 8) | ((unsigned short)((unsigned char)ps[1])))) /* Load a long int from the following tables with big-endian formats */ -#define COFF_LONG_H(ps) \ - (((long)(((unsigned long)((unsigned char)ps[0]) << 24) | \ - ((unsigned long)((unsigned char)ps[1]) << 16) | \ - ((unsigned long)((unsigned char)ps[2]) << 8) | \ - ((unsigned long)((unsigned char)ps[3]))))) +#define COFF_LONG_H(ps) \ + (((long)(((unsigned long)((unsigned char)ps[0]) << 24) | ((unsigned long)((unsigned char)ps[1]) << 16) | \ + ((unsigned long)((unsigned char)ps[2]) << 8) | ((unsigned long)((unsigned char)ps[3]))))) /* These may be overridden later by brain dead implementations which generate a big-endian header with little-endian data. In that case, generate a @@ -111,9 +105,8 @@ struct COFF_filehdr { #if 0 /* Perhaps, someday, these formats may be used. */ #define COFF_I386PTXMAGIC 0x154 #define COFF_I386AIXMAGIC 0x175 /* IBM's AIX system */ -#define COFF_I386BADMAG(x) \ - ((COFF_SHORT((x).f_magic) != COFF_I386MAGIC) && \ - COFF_SHORT((x).f_magic) != COFF_I386PTXMAGIC && \ +#define COFF_I386BADMAG(x) \ + ((COFF_SHORT((x).f_magic) != COFF_I386MAGIC) && COFF_SHORT((x).f_magic) != COFF_I386PTXMAGIC && \ COFF_SHORT((x).f_magic) != COFF_I386AIXMAGIC) #else #define COFF_I386BADMAG(x) (COFF_SHORT((x).f_magic) != COFF_I386MAGIC) @@ -288,7 +281,7 @@ union COFF_auxent { union { struct { /* if ISFCN, tag, or .bb */ char x_lnnoptr[4]; /* ptr to fcn line # */ - char x_endndx[4]; /* entry ndx past block end */ + char x_endndx[4]; /* entry ndx past block end */ } x_fcn; struct { /* if ISARY, up to 4 dimen. */ @@ -329,7 +322,7 @@ union COFF_auxent { char x_tvfill[4]; /* tv fill value */ char x_tvlen[2]; /* length of .tv */ char x_tvran[2][2]; /* tv range */ - } x_tv; /* info about .tv section (in auxent of symbol .tv)) */ + } x_tv; /* info about .tv section (in auxent of symbol .tv)) */ }; #define COFF_SYMENT struct COFF_syment diff --git a/include/arch/x86_64/linux/comedi.h b/include/arch/x86_64/linux/comedi.h index f3bf0861..a1dc6dd5 100644 --- a/include/arch/x86_64/linux/comedi.h +++ b/include/arch/x86_64/linux/comedi.h @@ -53,10 +53,8 @@ /* packs and unpacks a channel/range number */ -#define CR_PACK(chan, rng, aref) \ - ((((aref) & 0x3) << 24) | (((rng) & 0xff) << 16) | (chan)) -#define CR_PACK_FLAGS(chan, range, aref, flags) \ - (CR_PACK(chan, range, aref) | ((flags) & CR_FLAGS_MASK)) +#define CR_PACK(chan, rng, aref) ((((aref) & 0x3) << 24) | (((rng) & 0xff) << 16) | (chan)) +#define CR_PACK_FLAGS(chan, range, aref, flags) (CR_PACK(chan, range, aref) | ((flags) & CR_FLAGS_MASK)) #define CR_CHAN(a) ((a) & 0xffff) #define CR_RANGE(a) (((a) >> 16) & 0xff) @@ -246,11 +244,7 @@ enum comedi_subdevice_type { * report a direction. They may also be used in other places where a direction * needs to be specified. */ -enum comedi_io_direction { - COMEDI_INPUT = 0, - COMEDI_OUTPUT = 1, - COMEDI_OPENDRAIN = 2 -}; +enum comedi_io_direction { COMEDI_INPUT = 0, COMEDI_OUTPUT = 1, COMEDI_OPENDRAIN = 2 }; /** * enum configuration_ids - COMEDI configuration instruction codes @@ -430,11 +424,7 @@ enum comedi_digital_trig_op { * @COMEDI_SUPPORTED: Feature is supported. * @COMEDI_UNSUPPORTED: Feature is unsupported. */ -enum comedi_support_level { - COMEDI_UNKNOWN_SUPPORT = 0, - COMEDI_SUPPORTED, - COMEDI_UNSUPPORTED -}; +enum comedi_support_level { COMEDI_UNKNOWN_SUPPORT = 0, COMEDI_SUPPORTED, COMEDI_UNSUPPORTED }; /** * enum comedi_counter_status_flags - counter status bits @@ -1030,8 +1020,7 @@ enum i8254_mode { #define NI_CtrZ(x) _TERM_N(NI_CtrB(-1) + 1, NI_MAX_COUNTERS, x) #define NI_GATES_NAMES_MAX NI_CtrZ(-1) #define NI_CtrArmStartTrigger(x) _TERM_N(NI_CtrZ(-1) + 1, NI_MAX_COUNTERS, x) -#define NI_CtrInternalOutput(x) \ - _TERM_N(NI_CtrArmStartTrigger(-1) + 1, NI_MAX_COUNTERS, x) +#define NI_CtrInternalOutput(x) _TERM_N(NI_CtrArmStartTrigger(-1) + 1, NI_MAX_COUNTERS, x) /** external pin(s) labeled conveniently as CtrOut. */ #define NI_CtrOut(x) _TERM_N(NI_CtrInternalOutput(-1) + 1, NI_MAX_COUNTERS, x) /** For Buffered sampling of ctr -- x series capability. */ @@ -1138,36 +1127,22 @@ enum ni_gpct_mode_bits { NI_GPCT_LOADING_ON_GATE_BIT = 0x4000, NI_GPCT_COUNTING_MODE_MASK = 0x7 << NI_GPCT_COUNTING_MODE_SHIFT, NI_GPCT_COUNTING_MODE_NORMAL_BITS = 0x0 << NI_GPCT_COUNTING_MODE_SHIFT, - NI_GPCT_COUNTING_MODE_QUADRATURE_X1_BITS = - 0x1 << NI_GPCT_COUNTING_MODE_SHIFT, - NI_GPCT_COUNTING_MODE_QUADRATURE_X2_BITS = - 0x2 << NI_GPCT_COUNTING_MODE_SHIFT, - NI_GPCT_COUNTING_MODE_QUADRATURE_X4_BITS = - 0x3 << NI_GPCT_COUNTING_MODE_SHIFT, - NI_GPCT_COUNTING_MODE_TWO_PULSE_BITS = 0x4 - << NI_GPCT_COUNTING_MODE_SHIFT, - NI_GPCT_COUNTING_MODE_SYNC_SOURCE_BITS = 0x6 - << NI_GPCT_COUNTING_MODE_SHIFT, + NI_GPCT_COUNTING_MODE_QUADRATURE_X1_BITS = 0x1 << NI_GPCT_COUNTING_MODE_SHIFT, + NI_GPCT_COUNTING_MODE_QUADRATURE_X2_BITS = 0x2 << NI_GPCT_COUNTING_MODE_SHIFT, + NI_GPCT_COUNTING_MODE_QUADRATURE_X4_BITS = 0x3 << NI_GPCT_COUNTING_MODE_SHIFT, + NI_GPCT_COUNTING_MODE_TWO_PULSE_BITS = 0x4 << NI_GPCT_COUNTING_MODE_SHIFT, + NI_GPCT_COUNTING_MODE_SYNC_SOURCE_BITS = 0x6 << NI_GPCT_COUNTING_MODE_SHIFT, NI_GPCT_INDEX_PHASE_MASK = 0x3 << NI_GPCT_INDEX_PHASE_BITSHIFT, - NI_GPCT_INDEX_PHASE_LOW_A_LOW_B_BITS = 0x0 - << NI_GPCT_INDEX_PHASE_BITSHIFT, - NI_GPCT_INDEX_PHASE_LOW_A_HIGH_B_BITS = 0x1 - << NI_GPCT_INDEX_PHASE_BITSHIFT, - NI_GPCT_INDEX_PHASE_HIGH_A_LOW_B_BITS = 0x2 - << NI_GPCT_INDEX_PHASE_BITSHIFT, - NI_GPCT_INDEX_PHASE_HIGH_A_HIGH_B_BITS = - 0x3 << NI_GPCT_INDEX_PHASE_BITSHIFT, + NI_GPCT_INDEX_PHASE_LOW_A_LOW_B_BITS = 0x0 << NI_GPCT_INDEX_PHASE_BITSHIFT, + NI_GPCT_INDEX_PHASE_LOW_A_HIGH_B_BITS = 0x1 << NI_GPCT_INDEX_PHASE_BITSHIFT, + NI_GPCT_INDEX_PHASE_HIGH_A_LOW_B_BITS = 0x2 << NI_GPCT_INDEX_PHASE_BITSHIFT, + NI_GPCT_INDEX_PHASE_HIGH_A_HIGH_B_BITS = 0x3 << NI_GPCT_INDEX_PHASE_BITSHIFT, NI_GPCT_INDEX_ENABLE_BIT = 0x400000, - NI_GPCT_COUNTING_DIRECTION_MASK = 0x3 - << NI_GPCT_COUNTING_DIRECTION_SHIFT, - NI_GPCT_COUNTING_DIRECTION_DOWN_BITS = - 0x00 << NI_GPCT_COUNTING_DIRECTION_SHIFT, - NI_GPCT_COUNTING_DIRECTION_UP_BITS = - 0x1 << NI_GPCT_COUNTING_DIRECTION_SHIFT, - NI_GPCT_COUNTING_DIRECTION_HW_UP_DOWN_BITS = - 0x2 << NI_GPCT_COUNTING_DIRECTION_SHIFT, - NI_GPCT_COUNTING_DIRECTION_HW_GATE_BITS = - 0x3 << NI_GPCT_COUNTING_DIRECTION_SHIFT, + NI_GPCT_COUNTING_DIRECTION_MASK = 0x3 << NI_GPCT_COUNTING_DIRECTION_SHIFT, + NI_GPCT_COUNTING_DIRECTION_DOWN_BITS = 0x00 << NI_GPCT_COUNTING_DIRECTION_SHIFT, + NI_GPCT_COUNTING_DIRECTION_UP_BITS = 0x1 << NI_GPCT_COUNTING_DIRECTION_SHIFT, + NI_GPCT_COUNTING_DIRECTION_HW_UP_DOWN_BITS = 0x2 << NI_GPCT_COUNTING_DIRECTION_SHIFT, + NI_GPCT_COUNTING_DIRECTION_HW_GATE_BITS = 0x3 << NI_GPCT_COUNTING_DIRECTION_SHIFT, NI_GPCT_RELOAD_SOURCE_MASK = 0xc000000, NI_GPCT_RELOAD_SOURCE_FIXED_BITS = 0x0, NI_GPCT_RELOAD_SOURCE_SWITCHING_BITS = 0x4000000, @@ -1248,11 +1223,7 @@ enum ni_gpct_gate_select { * Possibilities for setting a source with * INSN_CONFIG_SET_OTHER_SRC when using NI general-purpose counters. */ -enum ni_gpct_other_index { - NI_GPCT_SOURCE_ENCODER_A, - NI_GPCT_SOURCE_ENCODER_B, - NI_GPCT_SOURCE_ENCODER_Z -}; +enum ni_gpct_other_index { NI_GPCT_SOURCE_ENCODER_A, NI_GPCT_SOURCE_ENCODER_B, NI_GPCT_SOURCE_ENCODER_Z }; enum ni_gpct_other_select { /* m-series gates */ diff --git a/include/arch/x86_64/linux/cramfs_fs.h b/include/arch/x86_64/linux/cramfs_fs.h index 08d399f9..ba22aad0 100644 --- a/include/arch/x86_64/linux/cramfs_fs.h +++ b/include/arch/x86_64/linux/cramfs_fs.h @@ -83,9 +83,9 @@ struct cramfs_super { * if (flags & ~CRAMFS_SUPPORTED_FLAGS). Maybe that should be * changed to test super.future instead. */ -#define CRAMFS_SUPPORTED_FLAGS \ - (0x000000ff | CRAMFS_FLAG_HOLES | CRAMFS_FLAG_WRONG_SIGNATURE | \ - CRAMFS_FLAG_SHIFTED_ROOT_OFFSET | CRAMFS_FLAG_EXT_BLOCK_POINTERS) +#define CRAMFS_SUPPORTED_FLAGS \ + (0x000000ff | CRAMFS_FLAG_HOLES | CRAMFS_FLAG_WRONG_SIGNATURE | CRAMFS_FLAG_SHIFTED_ROOT_OFFSET | \ + CRAMFS_FLAG_EXT_BLOCK_POINTERS) /* * Block pointer flags @@ -101,8 +101,7 @@ struct cramfs_super { #define CRAMFS_BLK_FLAG_UNCOMPRESSED (1 << 31) #define CRAMFS_BLK_FLAG_DIRECT_PTR (1 << 30) -#define CRAMFS_BLK_FLAGS \ - (CRAMFS_BLK_FLAG_UNCOMPRESSED | CRAMFS_BLK_FLAG_DIRECT_PTR) +#define CRAMFS_BLK_FLAGS (CRAMFS_BLK_FLAG_UNCOMPRESSED | CRAMFS_BLK_FLAG_DIRECT_PTR) /* * Direct blocks are at least 4-byte aligned. diff --git a/include/arch/x86_64/linux/cryptouser.h b/include/arch/x86_64/linux/cryptouser.h index 4a5c09c8..7f461cc6 100644 --- a/include/arch/x86_64/linux/cryptouser.h +++ b/include/arch/x86_64/linux/cryptouser.h @@ -212,8 +212,6 @@ struct crypto_report_sig { char type[CRYPTO_MAX_NAME]; }; -#define CRYPTO_REPORT_MAXSIZE \ - (sizeof(struct crypto_user_alg) + \ - sizeof(struct crypto_report_blkcipher)) +#define CRYPTO_REPORT_MAXSIZE (sizeof(struct crypto_user_alg) + sizeof(struct crypto_report_blkcipher)) #endif /* _LINUX_CRYPTOUSER_H */ diff --git a/include/arch/x86_64/linux/cxl_mem.h b/include/arch/x86_64/linux/cxl_mem.h index b1bd7682..1bddf79c 100644 --- a/include/arch/x86_64/linux/cxl_mem.h +++ b/include/arch/x86_64/linux/cxl_mem.h @@ -24,31 +24,19 @@ * NOTE: New defines must be added to the end of the list to preserve * compatibility because this enum is exported to user space. */ -#define CXL_CMDS \ - ___C(INVALID, "Invalid Command"), ___C(IDENTIFY, "Identify Command"), \ - ___C(RAW, "Raw device command"), \ - ___C(GET_SUPPORTED_LOGS, "Get Supported Logs"), \ - ___C(GET_FW_INFO, "Get FW Info"), \ - ___C(GET_PARTITION_INFO, "Get Partition Information"), \ - ___C(GET_LSA, "Get Label Storage Area"), \ - ___C(GET_HEALTH_INFO, "Get Health Info"), \ - ___C(GET_LOG, "Get Log"), \ - ___C(SET_PARTITION_INFO, "Set Partition Information"), \ - ___C(SET_LSA, "Set Label Storage Area"), \ - ___C(GET_ALERT_CONFIG, "Get Alert Configuration"), \ - ___C(SET_ALERT_CONFIG, "Set Alert Configuration"), \ - ___C(GET_SHUTDOWN_STATE, "Get Shutdown State"), \ - ___C(SET_SHUTDOWN_STATE, "Set Shutdown State"), \ - ___DEPRECATED(GET_POISON, "Get Poison List"), \ - ___DEPRECATED(INJECT_POISON, "Inject Poison"), \ - ___DEPRECATED(CLEAR_POISON, "Clear Poison"), \ - ___C(GET_SCAN_MEDIA_CAPS, "Get Scan Media Capabilities"), \ - ___DEPRECATED(SCAN_MEDIA, "Scan Media"), \ - ___DEPRECATED(GET_SCAN_MEDIA, "Get Scan Media Results"), \ - ___C(GET_TIMESTAMP, "Get Timestamp"), \ - ___C(GET_LOG_CAPS, "Get Log Capabilities"), \ - ___C(CLEAR_LOG, "Clear Log"), \ - ___C(GET_SUP_LOG_SUBLIST, "Get Supported Logs Sub-List"), \ +#define CXL_CMDS \ + ___C(INVALID, "Invalid Command"), ___C(IDENTIFY, "Identify Command"), ___C(RAW, "Raw device command"), \ + ___C(GET_SUPPORTED_LOGS, "Get Supported Logs"), ___C(GET_FW_INFO, "Get FW Info"), \ + ___C(GET_PARTITION_INFO, "Get Partition Information"), ___C(GET_LSA, "Get Label Storage Area"), \ + ___C(GET_HEALTH_INFO, "Get Health Info"), ___C(GET_LOG, "Get Log"), \ + ___C(SET_PARTITION_INFO, "Set Partition Information"), ___C(SET_LSA, "Set Label Storage Area"), \ + ___C(GET_ALERT_CONFIG, "Get Alert Configuration"), ___C(SET_ALERT_CONFIG, "Set Alert Configuration"), \ + ___C(GET_SHUTDOWN_STATE, "Get Shutdown State"), ___C(SET_SHUTDOWN_STATE, "Set Shutdown State"), \ + ___DEPRECATED(GET_POISON, "Get Poison List"), ___DEPRECATED(INJECT_POISON, "Inject Poison"), \ + ___DEPRECATED(CLEAR_POISON, "Clear Poison"), ___C(GET_SCAN_MEDIA_CAPS, "Get Scan Media Capabilities"), \ + ___DEPRECATED(SCAN_MEDIA, "Scan Media"), ___DEPRECATED(GET_SCAN_MEDIA, "Get Scan Media Results"), \ + ___C(GET_TIMESTAMP, "Get Timestamp"), ___C(GET_LOG_CAPS, "Get Log Capabilities"), \ + ___C(CLEAR_LOG, "Clear Log"), ___C(GET_SUP_LOG_SUBLIST, "Get Supported Logs Sub-List"), \ ___C(MAX, "invalid / last command") #define ___C(a, b) CXL_MEM_COMMAND_ID_##a @@ -78,8 +66,7 @@ static const struct { #define ___C(a, b) (0) #define ___DEPRECATED(a, b) (1) -static const __u8 cxl_deprecated_commands[] - __attribute__((__unused__)) = { CXL_CMDS }; +static const __u8 cxl_deprecated_commands[] __attribute__((__unused__)) = { CXL_CMDS }; /* * Here's how this actually breaks out: diff --git a/include/arch/x86_64/linux/dcbnl.h b/include/arch/x86_64/linux/dcbnl.h index 1d5a75f1..e3fe40ed 100644 --- a/include/arch/x86_64/linux/dcbnl.h +++ b/include/arch/x86_64/linux/dcbnl.h @@ -431,12 +431,7 @@ enum ieee_attrs { }; #define DCB_ATTR_IEEE_MAX (__DCB_ATTR_IEEE_MAX - 1) -enum ieee_attrs_app { - DCB_ATTR_IEEE_APP_UNSPEC, - DCB_ATTR_IEEE_APP, - DCB_ATTR_DCB_APP, - __DCB_ATTR_IEEE_APP_MAX -}; +enum ieee_attrs_app { DCB_ATTR_IEEE_APP_UNSPEC, DCB_ATTR_IEEE_APP, DCB_ATTR_DCB_APP, __DCB_ATTR_IEEE_APP_MAX }; #define DCB_ATTR_IEEE_APP_MAX (__DCB_ATTR_IEEE_APP_MAX - 1) /** @@ -476,11 +471,7 @@ enum peer_app_attr { }; #define DCB_ATTR_CEE_PEER_APP_MAX (__DCB_ATTR_CEE_PEER_APP_MAX - 1) -enum cee_attrs_app { - DCB_ATTR_CEE_APP_UNSPEC, - DCB_ATTR_CEE_APP, - __DCB_ATTR_CEE_APP_MAX -}; +enum cee_attrs_app { DCB_ATTR_CEE_APP_UNSPEC, DCB_ATTR_CEE_APP, __DCB_ATTR_CEE_APP_MAX }; #define DCB_ATTR_CEE_APP_MAX (__DCB_ATTR_CEE_APP_MAX - 1) /** diff --git a/include/arch/x86_64/linux/dccp.h b/include/arch/x86_64/linux/dccp.h index 91a58667..88b4f91f 100644 --- a/include/arch/x86_64/linux/dccp.h +++ b/include/arch/x86_64/linux/dccp.h @@ -111,8 +111,7 @@ static __inline__ unsigned int dccp_packet_hdr_len(const __u8 type) { if (type == DCCP_PKT_DATA) return 0; - if (type == DCCP_PKT_DATAACK || type == DCCP_PKT_ACK || - type == DCCP_PKT_SYNC || type == DCCP_PKT_SYNCACK || + if (type == DCCP_PKT_DATAACK || type == DCCP_PKT_ACK || type == DCCP_PKT_SYNC || type == DCCP_PKT_SYNCACK || type == DCCP_PKT_CLOSE || type == DCCP_PKT_CLOSEREQ) return sizeof(struct dccp_hdr_ack_bits); if (type == DCCP_PKT_REQUEST) @@ -196,11 +195,7 @@ enum dccp_cmsg_type { }; /* DCCP priorities for outgoing/queued packets */ -enum dccp_packet_dequeueing_policy { - DCCPQ_POLICY_SIMPLE, - DCCPQ_POLICY_PRIO, - DCCPQ_POLICY_MAX -}; +enum dccp_packet_dequeueing_policy { DCCPQ_POLICY_SIMPLE, DCCPQ_POLICY_PRIO, DCCPQ_POLICY_MAX }; /* DCCP socket options */ #define DCCP_SOCKOPT_PACKET_SIZE 1 /* XXX deprecated, without effect */ diff --git a/include/arch/x86_64/linux/devlink.h b/include/arch/x86_64/linux/devlink.h index 481f6d3b..8e9f011b 100644 --- a/include/arch/x86_64/linux/devlink.h +++ b/include/arch/x86_64/linux/devlink.h @@ -61,12 +61,10 @@ enum devlink_command { DEVLINK_CMD_SB_OCC_MAX_CLEAR, DEVLINK_CMD_ESWITCH_GET, -#define DEVLINK_CMD_ESWITCH_MODE_GET /* obsolete, never use this! */ \ - DEVLINK_CMD_ESWITCH_GET +#define DEVLINK_CMD_ESWITCH_MODE_GET /* obsolete, never use this! */ DEVLINK_CMD_ESWITCH_GET DEVLINK_CMD_ESWITCH_SET, -#define DEVLINK_CMD_ESWITCH_MODE_SET /* obsolete, never use this! */ \ - DEVLINK_CMD_ESWITCH_SET +#define DEVLINK_CMD_ESWITCH_MODE_SET /* obsolete, never use this! */ DEVLINK_CMD_ESWITCH_SET DEVLINK_CMD_DPIPE_TABLE_GET, DEVLINK_CMD_DPIPE_ENTRIES_GET, @@ -280,13 +278,10 @@ enum devlink_flash_overwrite { DEVLINK_FLASH_OVERWRITE_MAX_BIT = __DEVLINK_FLASH_OVERWRITE_MAX_BIT - 1 }; -#define DEVLINK_FLASH_OVERWRITE_SETTINGS \ - _BITUL(DEVLINK_FLASH_OVERWRITE_SETTINGS_BIT) -#define DEVLINK_FLASH_OVERWRITE_IDENTIFIERS \ - _BITUL(DEVLINK_FLASH_OVERWRITE_IDENTIFIERS_BIT) +#define DEVLINK_FLASH_OVERWRITE_SETTINGS _BITUL(DEVLINK_FLASH_OVERWRITE_SETTINGS_BIT) +#define DEVLINK_FLASH_OVERWRITE_IDENTIFIERS _BITUL(DEVLINK_FLASH_OVERWRITE_IDENTIFIERS_BIT) -#define DEVLINK_SUPPORTED_FLASH_OVERWRITE_SECTIONS \ - (_BITUL(__DEVLINK_FLASH_OVERWRITE_MAX_BIT) - 1) +#define DEVLINK_SUPPORTED_FLASH_OVERWRITE_SECTIONS (_BITUL(__DEVLINK_FLASH_OVERWRITE_MAX_BIT) - 1) enum devlink_attr_selftest_id { DEVLINK_ATTR_SELFTEST_ID_UNSPEC, @@ -304,15 +299,14 @@ enum devlink_selftest_status { enum devlink_attr_selftest_result { DEVLINK_ATTR_SELFTEST_RESULT_UNSPEC, - DEVLINK_ATTR_SELFTEST_RESULT, /* nested */ - DEVLINK_ATTR_SELFTEST_RESULT_ID, /* u32, enum devlink_attr_selftest_id - */ + DEVLINK_ATTR_SELFTEST_RESULT, /* nested */ + DEVLINK_ATTR_SELFTEST_RESULT_ID, /* u32, enum devlink_attr_selftest_id + */ DEVLINK_ATTR_SELFTEST_RESULT_STATUS, /* u8, enum devlink_selftest_status */ __DEVLINK_ATTR_SELFTEST_RESULT_MAX, - DEVLINK_ATTR_SELFTEST_RESULT_MAX = - __DEVLINK_ATTR_SELFTEST_RESULT_MAX - 1 + DEVLINK_ATTR_SELFTEST_RESULT_MAX = __DEVLINK_ATTR_SELFTEST_RESULT_MAX - 1 }; /** @@ -382,8 +376,7 @@ enum devlink_reload_limit { DEVLINK_RELOAD_LIMIT_MAX = __DEVLINK_RELOAD_LIMIT_MAX - 1 }; -#define DEVLINK_RELOAD_LIMITS_VALID_MASK \ - (_BITUL(__DEVLINK_RELOAD_LIMIT_MAX) - 1) +#define DEVLINK_RELOAD_LIMITS_VALID_MASK (_BITUL(__DEVLINK_RELOAD_LIMIT_MAX) - 1) enum devlink_linecard_state { DEVLINK_LINECARD_STATE_UNSPEC, @@ -712,13 +705,10 @@ enum devlink_port_fn_attr_cap { __DEVLINK_PORT_FN_ATTR_CAPS_MAX, }; -#define DEVLINK_PORT_FN_CAP_ROCE _BITUL(DEVLINK_PORT_FN_ATTR_CAP_ROCE_BIT) -#define DEVLINK_PORT_FN_CAP_MIGRATABLE \ - _BITUL(DEVLINK_PORT_FN_ATTR_CAP_MIGRATABLE_BIT) -#define DEVLINK_PORT_FN_CAP_IPSEC_CRYPTO \ - _BITUL(DEVLINK_PORT_FN_ATTR_CAP_IPSEC_CRYPTO_BIT) -#define DEVLINK_PORT_FN_CAP_IPSEC_PACKET \ - _BITUL(DEVLINK_PORT_FN_ATTR_CAP_IPSEC_PACKET_BIT) +#define DEVLINK_PORT_FN_CAP_ROCE _BITUL(DEVLINK_PORT_FN_ATTR_CAP_ROCE_BIT) +#define DEVLINK_PORT_FN_CAP_MIGRATABLE _BITUL(DEVLINK_PORT_FN_ATTR_CAP_MIGRATABLE_BIT) +#define DEVLINK_PORT_FN_CAP_IPSEC_CRYPTO _BITUL(DEVLINK_PORT_FN_ATTR_CAP_IPSEC_CRYPTO_BIT) +#define DEVLINK_PORT_FN_CAP_IPSEC_PACKET _BITUL(DEVLINK_PORT_FN_ATTR_CAP_IPSEC_PACKET_BIT) enum devlink_port_function_attr { DEVLINK_PORT_FUNCTION_ATTR_UNSPEC, diff --git a/include/arch/x86_64/linux/dm-ioctl.h b/include/arch/x86_64/linux/dm-ioctl.h index ed96bbc2..b3581c91 100644 --- a/include/arch/x86_64/linux/dm-ioctl.h +++ b/include/arch/x86_64/linux/dm-ioctl.h @@ -281,13 +281,11 @@ enum { #define DM_TABLE_DEPS _IOWR(DM_IOCTL, DM_TABLE_DEPS_CMD, struct dm_ioctl) #define DM_TABLE_STATUS _IOWR(DM_IOCTL, DM_TABLE_STATUS_CMD, struct dm_ioctl) -#define DM_LIST_VERSIONS _IOWR(DM_IOCTL, DM_LIST_VERSIONS_CMD, struct dm_ioctl) -#define DM_GET_TARGET_VERSION \ - _IOWR(DM_IOCTL, DM_GET_TARGET_VERSION_CMD, struct dm_ioctl) +#define DM_LIST_VERSIONS _IOWR(DM_IOCTL, DM_LIST_VERSIONS_CMD, struct dm_ioctl) +#define DM_GET_TARGET_VERSION _IOWR(DM_IOCTL, DM_GET_TARGET_VERSION_CMD, struct dm_ioctl) -#define DM_TARGET_MSG _IOWR(DM_IOCTL, DM_TARGET_MSG_CMD, struct dm_ioctl) -#define DM_DEV_SET_GEOMETRY \ - _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) +#define DM_TARGET_MSG _IOWR(DM_IOCTL, DM_TARGET_MSG_CMD, struct dm_ioctl) +#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) /* Block device ioctls */ #define DM_MPATH_PROBE_PATHS _IO(DM_IOCTL, DM_MPATH_PROBE_PATHS_CMD) diff --git a/include/arch/x86_64/linux/dm-log-userspace.h b/include/arch/x86_64/linux/dm-log-userspace.h index 4b7b2a2a..68aba29e 100644 --- a/include/arch/x86_64/linux/dm-log-userspace.h +++ b/include/arch/x86_64/linux/dm-log-userspace.h @@ -380,9 +380,8 @@ * User-space should always use DM_ULOG_REQUEST_TYPE to acquire the * request type from the 'request_type' field to maintain forward compatibility. */ -#define DM_ULOG_REQUEST_MASK 0xFF -#define DM_ULOG_REQUEST_TYPE(request_type) \ - (DM_ULOG_REQUEST_MASK & (request_type)) +#define DM_ULOG_REQUEST_MASK 0xFF +#define DM_ULOG_REQUEST_TYPE(request_type) (DM_ULOG_REQUEST_MASK & (request_type)) /* * DM_ULOG_REQUEST_VERSION is incremented when there is a diff --git a/include/arch/x86_64/linux/dma-buf.h b/include/arch/x86_64/linux/dma-buf.h index 5899d238..e772916a 100644 --- a/include/arch/x86_64/linux/dma-buf.h +++ b/include/arch/x86_64/linux/dma-buf.h @@ -172,12 +172,10 @@ struct dma_buf_import_sync_file { /* 32/64bitness of this uapi was botched in android, there's no difference * between them in actual uapi, they're just different numbers. */ -#define DMA_BUF_SET_NAME _IOW(DMA_BUF_BASE, 1, const char *) -#define DMA_BUF_SET_NAME_A _IOW(DMA_BUF_BASE, 1, __u32) -#define DMA_BUF_SET_NAME_B _IOW(DMA_BUF_BASE, 1, __u64) -#define DMA_BUF_IOCTL_EXPORT_SYNC_FILE \ - _IOWR(DMA_BUF_BASE, 2, struct dma_buf_export_sync_file) -#define DMA_BUF_IOCTL_IMPORT_SYNC_FILE \ - _IOW(DMA_BUF_BASE, 3, struct dma_buf_import_sync_file) +#define DMA_BUF_SET_NAME _IOW(DMA_BUF_BASE, 1, const char *) +#define DMA_BUF_SET_NAME_A _IOW(DMA_BUF_BASE, 1, __u32) +#define DMA_BUF_SET_NAME_B _IOW(DMA_BUF_BASE, 1, __u64) +#define DMA_BUF_IOCTL_EXPORT_SYNC_FILE _IOWR(DMA_BUF_BASE, 2, struct dma_buf_export_sync_file) +#define DMA_BUF_IOCTL_IMPORT_SYNC_FILE _IOW(DMA_BUF_BASE, 3, struct dma_buf_import_sync_file) #endif diff --git a/include/arch/x86_64/linux/dma-heap.h b/include/arch/x86_64/linux/dma-heap.h index ae84eb89..923b2282 100644 --- a/include/arch/x86_64/linux/dma-heap.h +++ b/include/arch/x86_64/linux/dma-heap.h @@ -47,7 +47,6 @@ struct dma_heap_allocation_data { * Takes a dma_heap_allocation_data struct and returns it with the fd field * populated with the dmabuf handle of the allocation. */ -#define DMA_HEAP_IOCTL_ALLOC \ - _IOWR(DMA_HEAP_IOC_MAGIC, 0x0, struct dma_heap_allocation_data) +#define DMA_HEAP_IOCTL_ALLOC _IOWR(DMA_HEAP_IOC_MAGIC, 0x0, struct dma_heap_allocation_data) #endif /* _LINUX_DMABUF_POOL_H */ diff --git a/include/arch/x86_64/linux/dns_resolver.h b/include/arch/x86_64/linux/dns_resolver.h index 4ad41ea2..6e5a5630 100644 --- a/include/arch/x86_64/linux/dns_resolver.h +++ b/include/arch/x86_64/linux/dns_resolver.h @@ -57,11 +57,11 @@ enum dns_record_source { * Status of record included in DNS resolver payload. */ enum dns_lookup_status { - DNS_LOOKUP_NOT_DONE = 0, /* No lookup has been made */ - DNS_LOOKUP_GOOD = 1, /* Good records obtained */ - DNS_LOOKUP_GOOD_WITH_BAD = 2, /* Good records, some decoding errors */ - DNS_LOOKUP_BAD = 3, /* Couldn't decode results */ - DNS_LOOKUP_GOT_NOT_FOUND = 4, /* Got a "Not Found" result */ + DNS_LOOKUP_NOT_DONE = 0, /* No lookup has been made */ + DNS_LOOKUP_GOOD = 1, /* Good records obtained */ + DNS_LOOKUP_GOOD_WITH_BAD = 2, /* Good records, some decoding errors */ + DNS_LOOKUP_BAD = 3, /* Couldn't decode results */ + DNS_LOOKUP_GOT_NOT_FOUND = 4, /* Got a "Not Found" result */ DNS_LOOKUP_GOT_LOCAL_FAILURE = 5, /* Local failure during lookup */ DNS_LOOKUP_GOT_TEMP_FAILURE = 6, /* Temporary failure during lookup */ DNS_LOOKUP_GOT_NS_FAILURE = 7, /* Name server failure */ diff --git a/include/arch/x86_64/linux/dqblk_xfs.h b/include/arch/x86_64/linux/dqblk_xfs.h index e1c5b142..9bd052a8 100644 --- a/include/arch/x86_64/linux/dqblk_xfs.h +++ b/include/arch/x86_64/linux/dqblk_xfs.h @@ -85,15 +85,13 @@ typedef struct fs_disk_quota { /* * These fields are sent to Q_XSETQLIM to specify fields that need to change. */ -#define FS_DQ_ISOFT (1 << 0) -#define FS_DQ_IHARD (1 << 1) -#define FS_DQ_BSOFT (1 << 2) -#define FS_DQ_BHARD (1 << 3) -#define FS_DQ_RTBSOFT (1 << 4) -#define FS_DQ_RTBHARD (1 << 5) -#define FS_DQ_LIMIT_MASK \ - (FS_DQ_ISOFT | FS_DQ_IHARD | FS_DQ_BSOFT | FS_DQ_BHARD | \ - FS_DQ_RTBSOFT | FS_DQ_RTBHARD) +#define FS_DQ_ISOFT (1 << 0) +#define FS_DQ_IHARD (1 << 1) +#define FS_DQ_BSOFT (1 << 2) +#define FS_DQ_BHARD (1 << 3) +#define FS_DQ_RTBSOFT (1 << 4) +#define FS_DQ_RTBHARD (1 << 5) +#define FS_DQ_LIMIT_MASK (FS_DQ_ISOFT | FS_DQ_IHARD | FS_DQ_BSOFT | FS_DQ_BHARD | FS_DQ_RTBSOFT | FS_DQ_RTBHARD) /* * These timers can only be set in super user's dquot. For others, timers are * automatically started and stopped. Superusers timer values set the limits diff --git a/include/arch/x86_64/linux/dvb/dmx.h b/include/arch/x86_64/linux/dvb/dmx.h index cca7c8ce..9fa40525 100644 --- a/include/arch/x86_64/linux/dvb/dmx.h +++ b/include/arch/x86_64/linux/dvb/dmx.h @@ -32,12 +32,7 @@ * @DMX_OUT_TSDEMUX_TAP: * Like @DMX_OUT_TS_TAP but retrieved from the DMX device. */ -enum dmx_output { - DMX_OUT_DECODER, - DMX_OUT_TAP, - DMX_OUT_TS_TAP, - DMX_OUT_TSDEMUX_TAP -}; +enum dmx_output { DMX_OUT_DECODER, DMX_OUT_TAP, DMX_OUT_TS_TAP, DMX_OUT_TSDEMUX_TAP }; /** * enum dmx_input - Input from the demux. diff --git a/include/arch/x86_64/linux/dvb/frontend.h b/include/arch/x86_64/linux/dvb/frontend.h index 93c2c7bb..af8d3f19 100644 --- a/include/arch/x86_64/linux/dvb/frontend.h +++ b/include/arch/x86_64/linux/dvb/frontend.h @@ -452,13 +452,7 @@ enum fe_guard_interval { * * Please note that not all hierarchy types are supported by a given standard. */ -enum fe_hierarchy { - HIERARCHY_NONE, - HIERARCHY_1, - HIERARCHY_2, - HIERARCHY_4, - HIERARCHY_AUTO -}; +enum fe_hierarchy { HIERARCHY_NONE, HIERARCHY_1, HIERARCHY_2, HIERARCHY_4, HIERARCHY_AUTO }; /** * enum fe_interleaving - Interleaving @@ -779,12 +773,7 @@ enum atscmh_rs_code_mode { * @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 -}; +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 diff --git a/include/arch/x86_64/linux/dvb/video.h b/include/arch/x86_64/linux/dvb/video.h index 58b920fb..e22fc8b2 100644 --- a/include/arch/x86_64/linux/dvb/video.h +++ b/include/arch/x86_64/linux/dvb/video.h @@ -117,10 +117,10 @@ struct video_event { }; struct video_status { - int video_blank; /* blank video on freeze? */ - video_play_state_t play_state; /* current state of playback */ - video_stream_source_t stream_source; /* current source (demux/memory) */ - video_format_t video_format; /* current aspect ratio of stream*/ + int video_blank; /* blank video on freeze? */ + video_play_state_t play_state; /* current state of playback */ + video_stream_source_t stream_source; /* current source (demux/memory) */ + video_format_t video_format; /* current aspect ratio of stream*/ video_displayformat_t display_format; /* selected cropping mode */ }; diff --git a/include/arch/x86_64/linux/edd.h b/include/arch/x86_64/linux/edd.h index 0c77ac86..55af31a1 100644 --- a/include/arch/x86_64/linux/edd.h +++ b/include/arch/x86_64/linux/edd.h @@ -33,12 +33,12 @@ #include -#define EDDNR \ - 0x1e9 /* addr of number of edd_info structs at EDDBUF \ - in boot_params - treat this as 1 byte */ +#define EDDNR \ + 0x1e9 /* addr of number of edd_info structs at EDDBUF \ + in boot_params - treat this as 1 byte */ #define EDDBUF 0xd00 /* addr of edd_info structs in boot_params */ -#define EDDMAXNR 6 /* number of edd_info structs starting at EDDBUF */ -#define EDDEXTSIZE 8 /* change these if you muck with the structures */ +#define EDDMAXNR 6 /* number of edd_info structs starting at EDDBUF */ +#define EDDEXTSIZE 8 /* change these if you muck with the structures */ #define EDDPARMSIZE 74 #define CHECKEXTENSIONSPRESENT 0x41 #define GETDEVICEPARAMETERS 0x48 diff --git a/include/arch/x86_64/linux/elf.h b/include/arch/x86_64/linux/elf.h index 77e3e2d3..1e52a169 100644 --- a/include/arch/x86_64/linux/elf.h +++ b/include/arch/x86_64/linux/elf.h @@ -461,64 +461,62 @@ typedef struct elf64_shdr { #define NN_X86_XSTATE "LINUX" #define NT_X86_XSTATE 0x202 /* x86 extended state using xsave */ /* Old binutils treats 0x203 as a CET state */ -#define NN_X86_SHSTK "LINUX" -#define NT_X86_SHSTK 0x204 /* x86 SHSTK state */ -#define NN_X86_XSAVE_LAYOUT "LINUX" -#define NT_X86_XSAVE_LAYOUT 0x205 /* XSAVE layout description */ -#define NN_S390_HIGH_GPRS "LINUX" -#define NT_S390_HIGH_GPRS 0x300 /* s390 upper register halves */ -#define NN_S390_TIMER "LINUX" -#define NT_S390_TIMER 0x301 /* s390 timer register */ -#define NN_S390_TODCMP "LINUX" -#define NT_S390_TODCMP 0x302 /* s390 TOD clock comparator register */ -#define NN_S390_TODPREG "LINUX" -#define NT_S390_TODPREG 0x303 /* s390 TOD programmable register */ -#define NN_S390_CTRS "LINUX" -#define NT_S390_CTRS 0x304 /* s390 control registers */ -#define NN_S390_PREFIX "LINUX" -#define NT_S390_PREFIX 0x305 /* s390 prefix register */ -#define NN_S390_LAST_BREAK "LINUX" -#define NT_S390_LAST_BREAK 0x306 /* s390 breaking event address */ -#define NN_S390_SYSTEM_CALL "LINUX" -#define NT_S390_SYSTEM_CALL 0x307 /* s390 system call restart data */ -#define NN_S390_TDB "LINUX" -#define NT_S390_TDB 0x308 /* s390 transaction diagnostic block */ -#define NN_S390_VXRS_LOW "LINUX" -#define NT_S390_VXRS_LOW 0x309 /* s390 vector registers 0-15 upper half */ -#define NN_S390_VXRS_HIGH "LINUX" -#define NT_S390_VXRS_HIGH 0x30a /* s390 vector registers 16-31 */ -#define NN_S390_GS_CB "LINUX" -#define NT_S390_GS_CB 0x30b /* s390 guarded storage registers */ -#define NN_S390_GS_BC "LINUX" -#define NT_S390_GS_BC 0x30c /* s390 guarded storage broadcast control block */ -#define NN_S390_RI_CB "LINUX" -#define NT_S390_RI_CB 0x30d /* s390 runtime instrumentation */ -#define NN_S390_PV_CPU_DATA "LINUX" -#define NT_S390_PV_CPU_DATA 0x30e /* s390 protvirt cpu dump data */ -#define NN_ARM_VFP "LINUX" -#define NT_ARM_VFP 0x400 /* ARM VFP/NEON registers */ -#define NN_ARM_TLS "LINUX" -#define NT_ARM_TLS 0x401 /* ARM TLS register */ -#define NN_ARM_HW_BREAK "LINUX" -#define NT_ARM_HW_BREAK 0x402 /* ARM hardware breakpoint registers */ -#define NN_ARM_HW_WATCH "LINUX" -#define NT_ARM_HW_WATCH 0x403 /* ARM hardware watchpoint registers */ -#define NN_ARM_SYSTEM_CALL "LINUX" -#define NT_ARM_SYSTEM_CALL 0x404 /* ARM system call number */ -#define NN_ARM_SVE "LINUX" -#define NT_ARM_SVE 0x405 /* ARM Scalable Vector Extension registers */ -#define NN_ARM_PAC_MASK "LINUX" -#define NT_ARM_PAC_MASK 0x406 /* ARM pointer authentication code masks */ -#define NN_ARM_PACA_KEYS "LINUX" -#define NT_ARM_PACA_KEYS 0x407 /* ARM pointer authentication address keys */ -#define NN_ARM_PACG_KEYS "LINUX" -#define NT_ARM_PACG_KEYS 0x408 /* ARM pointer authentication generic key */ -#define NN_ARM_TAGGED_ADDR_CTRL "LINUX" -#define NT_ARM_TAGGED_ADDR_CTRL \ - 0x409 /* arm64 tagged address control (prctl()) */ -#define NN_ARM_PAC_ENABLED_KEYS "LINUX" -#define NT_ARM_PAC_ENABLED_KEYS \ - 0x40a /* arm64 ptr auth enabled keys (prctl()) */ +#define NN_X86_SHSTK "LINUX" +#define NT_X86_SHSTK 0x204 /* x86 SHSTK state */ +#define NN_X86_XSAVE_LAYOUT "LINUX" +#define NT_X86_XSAVE_LAYOUT 0x205 /* XSAVE layout description */ +#define NN_S390_HIGH_GPRS "LINUX" +#define NT_S390_HIGH_GPRS 0x300 /* s390 upper register halves */ +#define NN_S390_TIMER "LINUX" +#define NT_S390_TIMER 0x301 /* s390 timer register */ +#define NN_S390_TODCMP "LINUX" +#define NT_S390_TODCMP 0x302 /* s390 TOD clock comparator register */ +#define NN_S390_TODPREG "LINUX" +#define NT_S390_TODPREG 0x303 /* s390 TOD programmable register */ +#define NN_S390_CTRS "LINUX" +#define NT_S390_CTRS 0x304 /* s390 control registers */ +#define NN_S390_PREFIX "LINUX" +#define NT_S390_PREFIX 0x305 /* s390 prefix register */ +#define NN_S390_LAST_BREAK "LINUX" +#define NT_S390_LAST_BREAK 0x306 /* s390 breaking event address */ +#define NN_S390_SYSTEM_CALL "LINUX" +#define NT_S390_SYSTEM_CALL 0x307 /* s390 system call restart data */ +#define NN_S390_TDB "LINUX" +#define NT_S390_TDB 0x308 /* s390 transaction diagnostic block */ +#define NN_S390_VXRS_LOW "LINUX" +#define NT_S390_VXRS_LOW 0x309 /* s390 vector registers 0-15 upper half */ +#define NN_S390_VXRS_HIGH "LINUX" +#define NT_S390_VXRS_HIGH 0x30a /* s390 vector registers 16-31 */ +#define NN_S390_GS_CB "LINUX" +#define NT_S390_GS_CB 0x30b /* s390 guarded storage registers */ +#define NN_S390_GS_BC "LINUX" +#define NT_S390_GS_BC 0x30c /* s390 guarded storage broadcast control block */ +#define NN_S390_RI_CB "LINUX" +#define NT_S390_RI_CB 0x30d /* s390 runtime instrumentation */ +#define NN_S390_PV_CPU_DATA "LINUX" +#define NT_S390_PV_CPU_DATA 0x30e /* s390 protvirt cpu dump data */ +#define NN_ARM_VFP "LINUX" +#define NT_ARM_VFP 0x400 /* ARM VFP/NEON registers */ +#define NN_ARM_TLS "LINUX" +#define NT_ARM_TLS 0x401 /* ARM TLS register */ +#define NN_ARM_HW_BREAK "LINUX" +#define NT_ARM_HW_BREAK 0x402 /* ARM hardware breakpoint registers */ +#define NN_ARM_HW_WATCH "LINUX" +#define NT_ARM_HW_WATCH 0x403 /* ARM hardware watchpoint registers */ +#define NN_ARM_SYSTEM_CALL "LINUX" +#define NT_ARM_SYSTEM_CALL 0x404 /* ARM system call number */ +#define NN_ARM_SVE "LINUX" +#define NT_ARM_SVE 0x405 /* ARM Scalable Vector Extension registers */ +#define NN_ARM_PAC_MASK "LINUX" +#define NT_ARM_PAC_MASK 0x406 /* ARM pointer authentication code masks */ +#define NN_ARM_PACA_KEYS "LINUX" +#define NT_ARM_PACA_KEYS 0x407 /* ARM pointer authentication address keys */ +#define NN_ARM_PACG_KEYS "LINUX" +#define NT_ARM_PACG_KEYS 0x408 /* ARM pointer authentication generic key */ +#define NN_ARM_TAGGED_ADDR_CTRL "LINUX" +#define NT_ARM_TAGGED_ADDR_CTRL 0x409 /* arm64 tagged address control (prctl()) */ +#define NN_ARM_PAC_ENABLED_KEYS "LINUX" +#define NT_ARM_PAC_ENABLED_KEYS 0x40a /* arm64 ptr auth enabled keys (prctl()) */ #define NN_ARM_SSVE "LINUX" #define NT_ARM_SSVE 0x40b /* ARM Streaming SVE registers */ #define NN_ARM_ZA "LINUX" @@ -546,28 +544,23 @@ typedef struct elf64_shdr { #define NN_RISCV_VECTOR "LINUX" #define NT_RISCV_VECTOR 0x901 /* RISC-V vector registers */ #define NN_RISCV_TAGGED_ADDR_CTRL "LINUX" -#define NT_RISCV_TAGGED_ADDR_CTRL \ - 0x902 /* RISC-V tagged address control (prctl()) */ -#define NN_LOONGARCH_CPUCFG "LINUX" -#define NT_LOONGARCH_CPUCFG 0xa00 /* LoongArch CPU config registers */ -#define NN_LOONGARCH_CSR "LINUX" -#define NT_LOONGARCH_CSR 0xa01 /* LoongArch control and status registers */ -#define NN_LOONGARCH_LSX "LINUX" +#define NT_RISCV_TAGGED_ADDR_CTRL 0x902 /* RISC-V tagged address control (prctl()) */ +#define NN_LOONGARCH_CPUCFG "LINUX" +#define NT_LOONGARCH_CPUCFG 0xa00 /* LoongArch CPU config registers */ +#define NN_LOONGARCH_CSR "LINUX" +#define NT_LOONGARCH_CSR 0xa01 /* LoongArch control and status registers */ +#define NN_LOONGARCH_LSX "LINUX" #define NT_LOONGARCH_LSX \ 0xa02 /* LoongArch Loongson SIMD Extension registers \ */ -#define NN_LOONGARCH_LASX "LINUX" -#define NT_LOONGARCH_LASX \ - 0xa03 /* LoongArch Loongson Advanced SIMD Extension registers */ -#define NN_LOONGARCH_LBT "LINUX" -#define NT_LOONGARCH_LBT \ - 0xa04 /* LoongArch Loongson Binary Translation registers */ +#define NN_LOONGARCH_LASX "LINUX" +#define NT_LOONGARCH_LASX 0xa03 /* LoongArch Loongson Advanced SIMD Extension registers */ +#define NN_LOONGARCH_LBT "LINUX" +#define NT_LOONGARCH_LBT 0xa04 /* LoongArch Loongson Binary Translation registers */ #define NN_LOONGARCH_HW_BREAK "LINUX" -#define NT_LOONGARCH_HW_BREAK \ - 0xa05 /* LoongArch hardware breakpoint registers */ +#define NT_LOONGARCH_HW_BREAK 0xa05 /* LoongArch hardware breakpoint registers */ #define NN_LOONGARCH_HW_WATCH "LINUX" -#define NT_LOONGARCH_HW_WATCH \ - 0xa06 /* LoongArch hardware watchpoint registers */ +#define NT_LOONGARCH_HW_WATCH 0xa06 /* LoongArch hardware watchpoint registers */ /* Note header in a PT_NOTE section */ typedef struct elf32_note { diff --git a/include/arch/x86_64/linux/ethtool.h b/include/arch/x86_64/linux/ethtool.h index 7ff1653e..cbada4f3 100644 --- a/include/arch/x86_64/linux/ethtool.h +++ b/include/arch/x86_64/linux/ethtool.h @@ -120,8 +120,7 @@ struct ethtool_cmd { __u32 reserved[2]; }; -static __inline__ void ethtool_cmd_speed_set(struct ethtool_cmd *ep, - __u32 speed) +static __inline__ void ethtool_cmd_speed_set(struct ethtool_cmd *ep, __u32 speed) { ep->speed = (__u16)(speed & 0xFFFF); ep->speed_hi = (__u16)(speed >> 16); @@ -1418,8 +1417,7 @@ static __inline__ __u64 ethtool_get_flow_spec_ring(__u64 ring_cookie) static __inline__ __u64 ethtool_get_flow_spec_ring_vf(__u64 ring_cookie) { - return (ETHTOOL_RX_FLOW_SPEC_RING_VF & ring_cookie) >> - ETHTOOL_RX_FLOW_SPEC_RING_VF_OFF; + return (ETHTOOL_RX_FLOW_SPEC_RING_VF & ring_cookie) >> ETHTOOL_RX_FLOW_SPEC_RING_VF_OFF; } /** @@ -2084,58 +2082,43 @@ enum ethtool_link_mode_bit_indices { __ETHTOOL_LINK_MODE_MASK_NBITS }; -#define __ETHTOOL_LINK_MODE_LEGACY_MASK(base_name) \ - (1UL << (ETHTOOL_LINK_MODE_##base_name##_BIT)) +#define __ETHTOOL_LINK_MODE_LEGACY_MASK(base_name) (1UL << (ETHTOOL_LINK_MODE_##base_name##_BIT)) /* DEPRECATED macros. Please migrate to * ETHTOOL_GLINKSETTINGS/ETHTOOL_SLINKSETTINGS API. Please do NOT * define any new SUPPORTED_* macro for bits > 31. */ -#define SUPPORTED_10baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Half) -#define SUPPORTED_10baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Full) -#define SUPPORTED_100baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Half) -#define SUPPORTED_100baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Full) -#define SUPPORTED_1000baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Half) -#define SUPPORTED_1000baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Full) -#define SUPPORTED_Autoneg __ETHTOOL_LINK_MODE_LEGACY_MASK(Autoneg) -#define SUPPORTED_TP __ETHTOOL_LINK_MODE_LEGACY_MASK(TP) -#define SUPPORTED_AUI __ETHTOOL_LINK_MODE_LEGACY_MASK(AUI) -#define SUPPORTED_MII __ETHTOOL_LINK_MODE_LEGACY_MASK(MII) -#define SUPPORTED_FIBRE __ETHTOOL_LINK_MODE_LEGACY_MASK(FIBRE) -#define SUPPORTED_BNC __ETHTOOL_LINK_MODE_LEGACY_MASK(BNC) -#define SUPPORTED_10000baseT_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseT_Full) -#define SUPPORTED_Pause __ETHTOOL_LINK_MODE_LEGACY_MASK(Pause) -#define SUPPORTED_Asym_Pause __ETHTOOL_LINK_MODE_LEGACY_MASK(Asym_Pause) -#define SUPPORTED_2500baseX_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(2500baseX_Full) -#define SUPPORTED_Backplane __ETHTOOL_LINK_MODE_LEGACY_MASK(Backplane) -#define SUPPORTED_1000baseKX_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseKX_Full) -#define SUPPORTED_10000baseKX4_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKX4_Full) -#define SUPPORTED_10000baseKR_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKR_Full) -#define SUPPORTED_10000baseR_FEC __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseR_FEC) -#define SUPPORTED_20000baseMLD2_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseMLD2_Full) -#define SUPPORTED_20000baseKR2_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseKR2_Full) -#define SUPPORTED_40000baseKR4_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseKR4_Full) -#define SUPPORTED_40000baseCR4_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseCR4_Full) -#define SUPPORTED_40000baseSR4_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseSR4_Full) -#define SUPPORTED_40000baseLR4_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseLR4_Full) -#define SUPPORTED_56000baseKR4_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseKR4_Full) -#define SUPPORTED_56000baseCR4_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseCR4_Full) -#define SUPPORTED_56000baseSR4_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseSR4_Full) -#define SUPPORTED_56000baseLR4_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseLR4_Full) +#define SUPPORTED_10baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Half) +#define SUPPORTED_10baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Full) +#define SUPPORTED_100baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Half) +#define SUPPORTED_100baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Full) +#define SUPPORTED_1000baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Half) +#define SUPPORTED_1000baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Full) +#define SUPPORTED_Autoneg __ETHTOOL_LINK_MODE_LEGACY_MASK(Autoneg) +#define SUPPORTED_TP __ETHTOOL_LINK_MODE_LEGACY_MASK(TP) +#define SUPPORTED_AUI __ETHTOOL_LINK_MODE_LEGACY_MASK(AUI) +#define SUPPORTED_MII __ETHTOOL_LINK_MODE_LEGACY_MASK(MII) +#define SUPPORTED_FIBRE __ETHTOOL_LINK_MODE_LEGACY_MASK(FIBRE) +#define SUPPORTED_BNC __ETHTOOL_LINK_MODE_LEGACY_MASK(BNC) +#define SUPPORTED_10000baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseT_Full) +#define SUPPORTED_Pause __ETHTOOL_LINK_MODE_LEGACY_MASK(Pause) +#define SUPPORTED_Asym_Pause __ETHTOOL_LINK_MODE_LEGACY_MASK(Asym_Pause) +#define SUPPORTED_2500baseX_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(2500baseX_Full) +#define SUPPORTED_Backplane __ETHTOOL_LINK_MODE_LEGACY_MASK(Backplane) +#define SUPPORTED_1000baseKX_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseKX_Full) +#define SUPPORTED_10000baseKX4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKX4_Full) +#define SUPPORTED_10000baseKR_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKR_Full) +#define SUPPORTED_10000baseR_FEC __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseR_FEC) +#define SUPPORTED_20000baseMLD2_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseMLD2_Full) +#define SUPPORTED_20000baseKR2_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseKR2_Full) +#define SUPPORTED_40000baseKR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseKR4_Full) +#define SUPPORTED_40000baseCR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseCR4_Full) +#define SUPPORTED_40000baseSR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseSR4_Full) +#define SUPPORTED_40000baseLR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseLR4_Full) +#define SUPPORTED_56000baseKR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseKR4_Full) +#define SUPPORTED_56000baseCR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseCR4_Full) +#define SUPPORTED_56000baseSR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseSR4_Full) +#define SUPPORTED_56000baseLR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseLR4_Full) /* Please do not define any new SUPPORTED_* macro for bits > 31, see * notice above. */ @@ -2145,55 +2128,37 @@ enum ethtool_link_mode_bit_indices { * ETHTOOL_GLINKSETTINGS/ETHTOOL_SLINKSETTINGS API. Please do NOT * define any new ADERTISE_* macro for bits > 31. */ -#define ADVERTISED_10baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Half) -#define ADVERTISED_10baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Full) -#define ADVERTISED_100baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Half) -#define ADVERTISED_100baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Full) -#define ADVERTISED_1000baseT_Half \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Half) -#define ADVERTISED_1000baseT_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Full) -#define ADVERTISED_Autoneg __ETHTOOL_LINK_MODE_LEGACY_MASK(Autoneg) -#define ADVERTISED_TP __ETHTOOL_LINK_MODE_LEGACY_MASK(TP) -#define ADVERTISED_AUI __ETHTOOL_LINK_MODE_LEGACY_MASK(AUI) -#define ADVERTISED_MII __ETHTOOL_LINK_MODE_LEGACY_MASK(MII) -#define ADVERTISED_FIBRE __ETHTOOL_LINK_MODE_LEGACY_MASK(FIBRE) -#define ADVERTISED_BNC __ETHTOOL_LINK_MODE_LEGACY_MASK(BNC) -#define ADVERTISED_10000baseT_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseT_Full) -#define ADVERTISED_Pause __ETHTOOL_LINK_MODE_LEGACY_MASK(Pause) -#define ADVERTISED_Asym_Pause __ETHTOOL_LINK_MODE_LEGACY_MASK(Asym_Pause) -#define ADVERTISED_2500baseX_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(2500baseX_Full) -#define ADVERTISED_Backplane __ETHTOOL_LINK_MODE_LEGACY_MASK(Backplane) -#define ADVERTISED_1000baseKX_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseKX_Full) -#define ADVERTISED_10000baseKX4_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKX4_Full) -#define ADVERTISED_10000baseKR_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKR_Full) -#define ADVERTISED_10000baseR_FEC \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseR_FEC) -#define ADVERTISED_20000baseMLD2_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseMLD2_Full) -#define ADVERTISED_20000baseKR2_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseKR2_Full) -#define ADVERTISED_40000baseKR4_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseKR4_Full) -#define ADVERTISED_40000baseCR4_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseCR4_Full) -#define ADVERTISED_40000baseSR4_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseSR4_Full) -#define ADVERTISED_40000baseLR4_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseLR4_Full) -#define ADVERTISED_56000baseKR4_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseKR4_Full) -#define ADVERTISED_56000baseCR4_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseCR4_Full) -#define ADVERTISED_56000baseSR4_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseSR4_Full) -#define ADVERTISED_56000baseLR4_Full \ - __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseLR4_Full) +#define ADVERTISED_10baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Half) +#define ADVERTISED_10baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Full) +#define ADVERTISED_100baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Half) +#define ADVERTISED_100baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Full) +#define ADVERTISED_1000baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Half) +#define ADVERTISED_1000baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Full) +#define ADVERTISED_Autoneg __ETHTOOL_LINK_MODE_LEGACY_MASK(Autoneg) +#define ADVERTISED_TP __ETHTOOL_LINK_MODE_LEGACY_MASK(TP) +#define ADVERTISED_AUI __ETHTOOL_LINK_MODE_LEGACY_MASK(AUI) +#define ADVERTISED_MII __ETHTOOL_LINK_MODE_LEGACY_MASK(MII) +#define ADVERTISED_FIBRE __ETHTOOL_LINK_MODE_LEGACY_MASK(FIBRE) +#define ADVERTISED_BNC __ETHTOOL_LINK_MODE_LEGACY_MASK(BNC) +#define ADVERTISED_10000baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseT_Full) +#define ADVERTISED_Pause __ETHTOOL_LINK_MODE_LEGACY_MASK(Pause) +#define ADVERTISED_Asym_Pause __ETHTOOL_LINK_MODE_LEGACY_MASK(Asym_Pause) +#define ADVERTISED_2500baseX_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(2500baseX_Full) +#define ADVERTISED_Backplane __ETHTOOL_LINK_MODE_LEGACY_MASK(Backplane) +#define ADVERTISED_1000baseKX_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseKX_Full) +#define ADVERTISED_10000baseKX4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKX4_Full) +#define ADVERTISED_10000baseKR_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKR_Full) +#define ADVERTISED_10000baseR_FEC __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseR_FEC) +#define ADVERTISED_20000baseMLD2_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseMLD2_Full) +#define ADVERTISED_20000baseKR2_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseKR2_Full) +#define ADVERTISED_40000baseKR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseKR4_Full) +#define ADVERTISED_40000baseCR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseCR4_Full) +#define ADVERTISED_40000baseSR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseSR4_Full) +#define ADVERTISED_40000baseLR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseLR4_Full) +#define ADVERTISED_56000baseKR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseKR4_Full) +#define ADVERTISED_56000baseCR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseCR4_Full) +#define ADVERTISED_56000baseSR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseSR4_Full) +#define ADVERTISED_56000baseLR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseLR4_Full) /* Please do not define any new ADVERTISED_* macro for bits > 31, see * notice above. */ diff --git a/include/arch/x86_64/linux/ethtool_netlink.h b/include/arch/x86_64/linux/ethtool_netlink.h index 3d81efce..ccb07b66 100644 --- a/include/arch/x86_64/linux/ethtool_netlink.h +++ b/include/arch/x86_64/linux/ethtool_netlink.h @@ -12,9 +12,7 @@ #include #include -#define ETHTOOL_FLAG_ALL \ - (ETHTOOL_FLAG_COMPACT_BITSETS | ETHTOOL_FLAG_OMIT_REPLY | \ - ETHTOOL_FLAG_STATS) +#define ETHTOOL_FLAG_ALL (ETHTOOL_FLAG_COMPACT_BITSETS | ETHTOOL_FLAG_OMIT_REPLY | ETHTOOL_FLAG_STATS) /* CABLE TEST NOTIFY */ enum { diff --git a/include/arch/x86_64/linux/ethtool_netlink_generated.h b/include/arch/x86_64/linux/ethtool_netlink_generated.h index c8ab679b..7aa284d9 100644 --- a/include/arch/x86_64/linux/ethtool_netlink_generated.h +++ b/include/arch/x86_64/linux/ethtool_netlink_generated.h @@ -430,8 +430,7 @@ enum { ETHTOOL_A_TS_HWTSTAMP_PROVIDER_QUALIFIER, __ETHTOOL_A_TS_HWTSTAMP_PROVIDER_CNT, - ETHTOOL_A_TS_HWTSTAMP_PROVIDER_MAX = - (__ETHTOOL_A_TS_HWTSTAMP_PROVIDER_CNT - 1) + ETHTOOL_A_TS_HWTSTAMP_PROVIDER_MAX = (__ETHTOOL_A_TS_HWTSTAMP_PROVIDER_CNT - 1) }; enum { @@ -467,8 +466,7 @@ enum { ETHTOOL_A_CABLE_FAULT_LENGTH_SRC, __ETHTOOL_A_CABLE_FAULT_LENGTH_CNT, - ETHTOOL_A_CABLE_FAULT_LENGTH_MAX = - (__ETHTOOL_A_CABLE_FAULT_LENGTH_CNT - 1) + ETHTOOL_A_CABLE_FAULT_LENGTH_MAX = (__ETHTOOL_A_CABLE_FAULT_LENGTH_CNT - 1) }; enum { @@ -506,8 +504,7 @@ enum { ETHTOOL_A_CABLE_TEST_TDR_CFG_PAIR, __ETHTOOL_A_CABLE_TEST_TDR_CFG_CNT, - ETHTOOL_A_CABLE_TEST_TDR_CFG_MAX = - (__ETHTOOL_A_CABLE_TEST_TDR_CFG_CNT - 1) + ETHTOOL_A_CABLE_TEST_TDR_CFG_MAX = (__ETHTOOL_A_CABLE_TEST_TDR_CFG_CNT - 1) }; enum { @@ -517,8 +514,7 @@ enum { ETHTOOL_A_CABLE_TEST_TDR_NTF_NEST, __ETHTOOL_A_CABLE_TEST_TDR_NTF_CNT, - ETHTOOL_A_CABLE_TEST_TDR_NTF_MAX = - (__ETHTOOL_A_CABLE_TEST_TDR_NTF_CNT - 1) + ETHTOOL_A_CABLE_TEST_TDR_NTF_MAX = (__ETHTOOL_A_CABLE_TEST_TDR_NTF_CNT - 1) }; enum { @@ -657,8 +653,7 @@ enum { ETHTOOL_A_C33_PSE_PW_LIMIT_MAX, __ETHTOOL_A_C33_PSE_PW_LIMIT_CNT, - __ETHTOOL_A_C33_PSE_PW_LIMIT_MAX = - (__ETHTOOL_A_C33_PSE_PW_LIMIT_CNT - 1) + __ETHTOOL_A_C33_PSE_PW_LIMIT_MAX = (__ETHTOOL_A_C33_PSE_PW_LIMIT_CNT - 1) }; enum { diff --git a/include/arch/x86_64/linux/ext4.h b/include/arch/x86_64/linux/ext4.h index c22028f7..89e4d9be 100644 --- a/include/arch/x86_64/linux/ext4.h +++ b/include/arch/x86_64/linux/ext4.h @@ -65,9 +65,8 @@ #define EXT4_IOC_CHECKPOINT_FLAG_DISCARD 0x1 #define EXT4_IOC_CHECKPOINT_FLAG_ZEROOUT 0x2 #define EXT4_IOC_CHECKPOINT_FLAG_DRY_RUN 0x4 -#define EXT4_IOC_CHECKPOINT_FLAG_VALID \ - (EXT4_IOC_CHECKPOINT_FLAG_DISCARD | EXT4_IOC_CHECKPOINT_FLAG_ZEROOUT | \ - EXT4_IOC_CHECKPOINT_FLAG_DRY_RUN) +#define EXT4_IOC_CHECKPOINT_FLAG_VALID \ + (EXT4_IOC_CHECKPOINT_FLAG_DISCARD | EXT4_IOC_CHECKPOINT_FLAG_ZEROOUT | EXT4_IOC_CHECKPOINT_FLAG_DRY_RUN) /* * Structure for EXT4_IOC_GETFSUUID/EXT4_IOC_SETFSUUID diff --git a/include/arch/x86_64/linux/f2fs.h b/include/arch/x86_64/linux/f2fs.h index 4f4a035a..0ef1cc52 100644 --- a/include/arch/x86_64/linux/f2fs.h +++ b/include/arch/x86_64/linux/f2fs.h @@ -8,20 +8,18 @@ /* * f2fs-specific ioctl commands */ -#define F2FS_IOCTL_MAGIC 0xf5 -#define F2FS_IOC_START_ATOMIC_WRITE _IO(F2FS_IOCTL_MAGIC, 1) -#define F2FS_IOC_COMMIT_ATOMIC_WRITE _IO(F2FS_IOCTL_MAGIC, 2) -#define F2FS_IOC_START_VOLATILE_WRITE _IO(F2FS_IOCTL_MAGIC, 3) -#define F2FS_IOC_RELEASE_VOLATILE_WRITE _IO(F2FS_IOCTL_MAGIC, 4) -#define F2FS_IOC_ABORT_ATOMIC_WRITE _IO(F2FS_IOCTL_MAGIC, 5) -#define F2FS_IOC_GARBAGE_COLLECT _IOW(F2FS_IOCTL_MAGIC, 6, __u32) -#define F2FS_IOC_WRITE_CHECKPOINT _IO(F2FS_IOCTL_MAGIC, 7) -#define F2FS_IOC_DEFRAGMENT _IOWR(F2FS_IOCTL_MAGIC, 8, struct f2fs_defragment) -#define F2FS_IOC_MOVE_RANGE _IOWR(F2FS_IOCTL_MAGIC, 9, struct f2fs_move_range) -#define F2FS_IOC_FLUSH_DEVICE \ - _IOW(F2FS_IOCTL_MAGIC, 10, struct f2fs_flush_device) -#define F2FS_IOC_GARBAGE_COLLECT_RANGE \ - _IOW(F2FS_IOCTL_MAGIC, 11, struct f2fs_gc_range) +#define F2FS_IOCTL_MAGIC 0xf5 +#define F2FS_IOC_START_ATOMIC_WRITE _IO(F2FS_IOCTL_MAGIC, 1) +#define F2FS_IOC_COMMIT_ATOMIC_WRITE _IO(F2FS_IOCTL_MAGIC, 2) +#define F2FS_IOC_START_VOLATILE_WRITE _IO(F2FS_IOCTL_MAGIC, 3) +#define F2FS_IOC_RELEASE_VOLATILE_WRITE _IO(F2FS_IOCTL_MAGIC, 4) +#define F2FS_IOC_ABORT_ATOMIC_WRITE _IO(F2FS_IOCTL_MAGIC, 5) +#define F2FS_IOC_GARBAGE_COLLECT _IOW(F2FS_IOCTL_MAGIC, 6, __u32) +#define F2FS_IOC_WRITE_CHECKPOINT _IO(F2FS_IOCTL_MAGIC, 7) +#define F2FS_IOC_DEFRAGMENT _IOWR(F2FS_IOCTL_MAGIC, 8, struct f2fs_defragment) +#define F2FS_IOC_MOVE_RANGE _IOWR(F2FS_IOCTL_MAGIC, 9, struct f2fs_move_range) +#define F2FS_IOC_FLUSH_DEVICE _IOW(F2FS_IOCTL_MAGIC, 10, struct f2fs_flush_device) +#define F2FS_IOC_GARBAGE_COLLECT_RANGE _IOW(F2FS_IOCTL_MAGIC, 11, struct f2fs_gc_range) #define F2FS_IOC_GET_FEATURES _IOR(F2FS_IOCTL_MAGIC, 12, __u32) #define F2FS_IOC_SET_PIN_FILE _IOW(F2FS_IOCTL_MAGIC, 13, __u32) #define F2FS_IOC_GET_PIN_FILE _IOR(F2FS_IOCTL_MAGIC, 14, __u32) @@ -30,28 +28,25 @@ #define F2FS_IOC_GET_COMPRESS_BLOCKS _IOR(F2FS_IOCTL_MAGIC, 17, __u64) #define F2FS_IOC_RELEASE_COMPRESS_BLOCKS _IOR(F2FS_IOCTL_MAGIC, 18, __u64) #define F2FS_IOC_RESERVE_COMPRESS_BLOCKS _IOR(F2FS_IOCTL_MAGIC, 19, __u64) -#define F2FS_IOC_SEC_TRIM_FILE \ - _IOW(F2FS_IOCTL_MAGIC, 20, struct f2fs_sectrim_range) -#define F2FS_IOC_GET_COMPRESS_OPTION \ - _IOR(F2FS_IOCTL_MAGIC, 21, struct f2fs_comp_option) -#define F2FS_IOC_SET_COMPRESS_OPTION \ - _IOW(F2FS_IOCTL_MAGIC, 22, struct f2fs_comp_option) -#define F2FS_IOC_DECOMPRESS_FILE _IO(F2FS_IOCTL_MAGIC, 23) -#define F2FS_IOC_COMPRESS_FILE _IO(F2FS_IOCTL_MAGIC, 24) -#define F2FS_IOC_START_ATOMIC_REPLACE _IO(F2FS_IOCTL_MAGIC, 25) -#define F2FS_IOC_GET_DEV_ALIAS_FILE _IOR(F2FS_IOCTL_MAGIC, 26, __u32) -#define F2FS_IOC_IO_PRIO _IOW(F2FS_IOCTL_MAGIC, 27, __u32) +#define F2FS_IOC_SEC_TRIM_FILE _IOW(F2FS_IOCTL_MAGIC, 20, struct f2fs_sectrim_range) +#define F2FS_IOC_GET_COMPRESS_OPTION _IOR(F2FS_IOCTL_MAGIC, 21, struct f2fs_comp_option) +#define F2FS_IOC_SET_COMPRESS_OPTION _IOW(F2FS_IOCTL_MAGIC, 22, struct f2fs_comp_option) +#define F2FS_IOC_DECOMPRESS_FILE _IO(F2FS_IOCTL_MAGIC, 23) +#define F2FS_IOC_COMPRESS_FILE _IO(F2FS_IOCTL_MAGIC, 24) +#define F2FS_IOC_START_ATOMIC_REPLACE _IO(F2FS_IOCTL_MAGIC, 25) +#define F2FS_IOC_GET_DEV_ALIAS_FILE _IOR(F2FS_IOCTL_MAGIC, 26, __u32) +#define F2FS_IOC_IO_PRIO _IOW(F2FS_IOCTL_MAGIC, 27, __u32) /* * should be same as XFS_IOC_GOINGDOWN. * Flags for going down operation used by FS_IOC_GOINGDOWN */ #define F2FS_IOC_SHUTDOWN _IOR('X', 125, __u32) /* Shutdown */ -#define F2FS_GOING_DOWN_FULLSYNC 0x0 /* going down with full sync */ -#define F2FS_GOING_DOWN_METASYNC 0x1 /* going down with metadata */ -#define F2FS_GOING_DOWN_NOSYNC 0x2 /* going down */ -#define F2FS_GOING_DOWN_METAFLUSH 0x3 /* going down with meta flush */ -#define F2FS_GOING_DOWN_NEED_FSCK 0x4 /* going down to trigger fsck */ +#define F2FS_GOING_DOWN_FULLSYNC 0x0 /* going down with full sync */ +#define F2FS_GOING_DOWN_METASYNC 0x1 /* going down with metadata */ +#define F2FS_GOING_DOWN_NOSYNC 0x2 /* going down */ +#define F2FS_GOING_DOWN_METAFLUSH 0x3 /* going down with meta flush */ +#define F2FS_GOING_DOWN_NEED_FSCK 0x4 /* going down to trigger fsck */ /* * Flags used by F2FS_IOC_SEC_TRIM_FILE diff --git a/include/arch/x86_64/linux/fanotify.h b/include/arch/x86_64/linux/fanotify.h index 75e3c630..2cf5b197 100644 --- a/include/arch/x86_64/linux/fanotify.h +++ b/include/arch/x86_64/linux/fanotify.h @@ -51,8 +51,7 @@ #define FAN_CLASS_PRE_CONTENT 0x00000008 /* Deprecated - do not use this in programs and do not add new flags here! */ -#define FAN_ALL_CLASS_BITS \ - (FAN_CLASS_NOTIF | FAN_CLASS_CONTENT | FAN_CLASS_PRE_CONTENT) +#define FAN_ALL_CLASS_BITS (FAN_CLASS_NOTIF | FAN_CLASS_CONTENT | FAN_CLASS_PRE_CONTENT) #define FAN_UNLIMITED_QUEUE 0x00000010 #define FAN_UNLIMITED_MARKS 0x00000020 @@ -71,13 +70,10 @@ /* Convenience macro - FAN_REPORT_NAME requires FAN_REPORT_DIR_FID */ #define FAN_REPORT_DFID_NAME (FAN_REPORT_DIR_FID | FAN_REPORT_NAME) /* Convenience macro - FAN_REPORT_TARGET_FID requires all other FID flags */ -#define FAN_REPORT_DFID_NAME_TARGET \ - (FAN_REPORT_DFID_NAME | FAN_REPORT_FID | FAN_REPORT_TARGET_FID) +#define FAN_REPORT_DFID_NAME_TARGET (FAN_REPORT_DFID_NAME | FAN_REPORT_FID | FAN_REPORT_TARGET_FID) /* Deprecated - do not use this in programs and do not add new flags here! */ -#define FAN_ALL_INIT_FLAGS \ - (FAN_CLOEXEC | FAN_NONBLOCK | FAN_ALL_CLASS_BITS | \ - FAN_UNLIMITED_QUEUE | FAN_UNLIMITED_MARKS) +#define FAN_ALL_INIT_FLAGS (FAN_CLOEXEC | FAN_NONBLOCK | FAN_ALL_CLASS_BITS | FAN_UNLIMITED_QUEUE | FAN_UNLIMITED_MARKS) /* flags used for fanotify_modify_mark() */ #define FAN_MARK_ADD 0x00000001 @@ -106,10 +102,9 @@ #define FAN_MARK_IGNORE_SURV (FAN_MARK_IGNORE | FAN_MARK_IGNORED_SURV_MODIFY) /* Deprecated - do not use this in programs and do not add new flags here! */ -#define FAN_ALL_MARK_FLAGS \ - (FAN_MARK_ADD | FAN_MARK_REMOVE | FAN_MARK_DONT_FOLLOW | \ - FAN_MARK_ONLYDIR | FAN_MARK_MOUNT | FAN_MARK_IGNORED_MASK | \ - FAN_MARK_IGNORED_SURV_MODIFY | FAN_MARK_FLUSH) +#define FAN_ALL_MARK_FLAGS \ + (FAN_MARK_ADD | FAN_MARK_REMOVE | FAN_MARK_DONT_FOLLOW | FAN_MARK_ONLYDIR | FAN_MARK_MOUNT | \ + FAN_MARK_IGNORED_MASK | FAN_MARK_IGNORED_SURV_MODIFY | FAN_MARK_FLUSH) /* Deprecated - do not use this in programs and do not add new flags here! */ #define FAN_ALL_EVENTS (FAN_ACCESS | FAN_MODIFY | FAN_CLOSE | FAN_OPEN) @@ -121,8 +116,7 @@ #define FAN_ALL_PERM_EVENTS (FAN_OPEN_PERM | FAN_ACCESS_PERM) /* Deprecated - do not use this in programs and do not add new flags here! */ -#define FAN_ALL_OUTGOING_EVENTS \ - (FAN_ALL_EVENTS | FAN_ALL_PERM_EVENTS | FAN_Q_OVERFLOW) +#define FAN_ALL_OUTGOING_EVENTS (FAN_ALL_EVENTS | FAN_ALL_PERM_EVENTS | FAN_Q_OVERFLOW) #define FANOTIFY_METADATA_VERSION 3 @@ -237,11 +231,10 @@ struct fanotify_response_info_audit_rule { #define FAN_ALLOW 0x01 #define FAN_DENY 0x02 /* errno other than EPERM can specified in upper byte of deny response */ -#define FAN_ERRNO_BITS 8 -#define FAN_ERRNO_SHIFT (32 - FAN_ERRNO_BITS) -#define FAN_ERRNO_MASK ((1 << FAN_ERRNO_BITS) - 1) -#define FAN_DENY_ERRNO(err) \ - (FAN_DENY | ((((__u32)(err)) & FAN_ERRNO_MASK) << FAN_ERRNO_SHIFT)) +#define FAN_ERRNO_BITS 8 +#define FAN_ERRNO_SHIFT (32 - FAN_ERRNO_BITS) +#define FAN_ERRNO_MASK ((1 << FAN_ERRNO_BITS) - 1) +#define FAN_DENY_ERRNO(err) (FAN_DENY | ((((__u32)(err)) & FAN_ERRNO_MASK) << FAN_ERRNO_SHIFT)) #define FAN_AUDIT 0x10 /* Bitmask to create audit record for result */ #define FAN_INFO 0x20 /* Bitmask to indicate additional information */ @@ -254,14 +247,11 @@ struct fanotify_response_info_audit_rule { /* Helper functions to deal with fanotify_event_metadata buffers */ #define FAN_EVENT_METADATA_LEN (sizeof(struct fanotify_event_metadata)) -#define FAN_EVENT_NEXT(meta, len) \ - ((len) -= (meta)->event_len, \ - (struct fanotify_event_metadata *)(((char *)(meta)) + \ - (meta)->event_len)) +#define FAN_EVENT_NEXT(meta, len) \ + ((len) -= (meta)->event_len, (struct fanotify_event_metadata *)(((char *)(meta)) + (meta)->event_len)) -#define FAN_EVENT_OK(meta, len) \ - ((long)(len) >= (long)FAN_EVENT_METADATA_LEN && \ - (long)(meta)->event_len >= (long)FAN_EVENT_METADATA_LEN && \ +#define FAN_EVENT_OK(meta, len) \ + ((long)(len) >= (long)FAN_EVENT_METADATA_LEN && (long)(meta)->event_len >= (long)FAN_EVENT_METADATA_LEN && \ (long)(meta)->event_len <= (long)(len)) #endif /* _LINUX_FANOTIFY_H */ diff --git a/include/arch/x86_64/linux/fb.h b/include/arch/x86_64/linux/fb.h index a0ac9036..b82718f6 100644 --- a/include/arch/x86_64/linux/fb.h +++ b/include/arch/x86_64/linux/fb.h @@ -42,23 +42,18 @@ #define FB_TYPE_VGA_PLANES 4 /* EGA/VGA planes */ #define FB_TYPE_FOURCC 5 /* Type identified by a V4L2 FOURCC */ -#define FB_AUX_TEXT_MDA 0 /* Monochrome text */ -#define FB_AUX_TEXT_CGA 1 /* CGA/EGA/VGA Color text */ -#define FB_AUX_TEXT_S3_MMIO 2 /* S3 MMIO fasttext */ -#define FB_AUX_TEXT_MGA_STEP16 \ - 3 /* MGA Millenium I: text, attr, 14 reserved bytes */ -#define FB_AUX_TEXT_MGA_STEP8 \ - 4 /* other MGAs: text, attr, 6 reserved bytes */ -#define FB_AUX_TEXT_SVGA_GROUP 8 /* 8-15: SVGA tileblit compatible modes */ -#define FB_AUX_TEXT_SVGA_MASK 7 /* lower three bits says step */ -#define FB_AUX_TEXT_SVGA_STEP2 8 /* SVGA text mode: text, attr */ -#define FB_AUX_TEXT_SVGA_STEP4 \ - 9 /* SVGA text mode: text, attr, 2 reserved bytes */ -#define FB_AUX_TEXT_SVGA_STEP8 \ - 10 /* SVGA text mode: text, attr, 6 reserved bytes */ -#define FB_AUX_TEXT_SVGA_STEP16 \ - 11 /* SVGA text mode: text, attr, 14 reserved bytes */ -#define FB_AUX_TEXT_SVGA_LAST 15 /* reserved up to 15 */ +#define FB_AUX_TEXT_MDA 0 /* Monochrome text */ +#define FB_AUX_TEXT_CGA 1 /* CGA/EGA/VGA Color text */ +#define FB_AUX_TEXT_S3_MMIO 2 /* S3 MMIO fasttext */ +#define FB_AUX_TEXT_MGA_STEP16 3 /* MGA Millenium I: text, attr, 14 reserved bytes */ +#define FB_AUX_TEXT_MGA_STEP8 4 /* other MGAs: text, attr, 6 reserved bytes */ +#define FB_AUX_TEXT_SVGA_GROUP 8 /* 8-15: SVGA tileblit compatible modes */ +#define FB_AUX_TEXT_SVGA_MASK 7 /* lower three bits says step */ +#define FB_AUX_TEXT_SVGA_STEP2 8 /* SVGA text mode: text, attr */ +#define FB_AUX_TEXT_SVGA_STEP4 9 /* SVGA text mode: text, attr, 2 reserved bytes */ +#define FB_AUX_TEXT_SVGA_STEP8 10 /* SVGA text mode: text, attr, 6 reserved bytes */ +#define FB_AUX_TEXT_SVGA_STEP16 11 /* SVGA text mode: text, attr, 14 reserved bytes */ +#define FB_AUX_TEXT_SVGA_LAST 15 /* reserved up to 15 */ #define FB_AUX_VGA_PLANES_VGA4 0 /* 16 color planes (EGA/VGA) */ #define FB_AUX_VGA_PLANES_CFB4 1 /* CFB4 in planes (VGA) */ diff --git a/include/arch/x86_64/linux/fcntl.h b/include/arch/x86_64/linux/fcntl.h index 6339c5f1..e7f1e019 100644 --- a/include/arch/x86_64/linux/fcntl.h +++ b/include/arch/x86_64/linux/fcntl.h @@ -135,11 +135,9 @@ * These flags are currently statx(2)-specific, but they could be made generic * in the future and so they should not be used for other per-syscall flags. */ -#define AT_STATX_SYNC_TYPE \ - 0x6000 /* Type of synchronisation required from statx() */ +#define AT_STATX_SYNC_TYPE 0x6000 /* Type of synchronisation required from statx() */ #define AT_STATX_SYNC_AS_STAT 0x0000 /* - Do whatever stat() does */ -#define AT_STATX_FORCE_SYNC \ - 0x2000 /* - Force the attributes to be sync'd with the server */ +#define AT_STATX_FORCE_SYNC 0x2000 /* - Force the attributes to be sync'd with the server */ #define AT_STATX_DONT_SYNC \ 0x4000 /* - Don't sync attributes with the server \ */ diff --git a/include/arch/x86_64/linux/fd.h b/include/arch/x86_64/linux/fd.h index bdebcc4f..39d63629 100644 --- a/include/arch/x86_64/linux/fd.h +++ b/include/arch/x86_64/linux/fd.h @@ -29,13 +29,11 @@ struct floppy_struct { unsigned char gap, /* gap1 size */ rate, /* data rate. |= 0x40 for perpendicular */ -#define FD_2M 0x4 -#define FD_SIZECODEMASK 0x38 -#define FD_SIZECODE(floppy) \ - (((((floppy)->rate & FD_SIZECODEMASK) >> 3) + 2) % 8) -#define FD_SECTSIZE(floppy) \ - ((floppy)->rate & FD_2M ? 512 : 128 << FD_SIZECODE(floppy)) -#define FD_PERP 0x40 +#define FD_2M 0x4 +#define FD_SIZECODEMASK 0x38 +#define FD_SIZECODE(floppy) (((((floppy)->rate & FD_SIZECODEMASK) >> 3) + 2) % 8) +#define FD_SECTSIZE(floppy) ((floppy)->rate & FD_2M ? 512 : 128 << FD_SIZECODE(floppy)) +#define FD_PERP 0x40 spec1, /* stepping rate, head unload time */ fmt_gap; /* gap2 size */ @@ -85,9 +83,9 @@ struct floppy_max_errors { unsigned int abort, /* number of errors to be reached before aborting */ read_track, /* maximal number of errors permitted to read an * entire track at once */ - reset, /* maximal number of errors before a reset is tried */ - recal, /* maximal number of errors before a recalibrate is - * tried */ + reset, /* maximal number of errors before a reset is tried */ + recal, /* maximal number of errors before a recalibrate is + * tried */ /* * Threshold for reporting FDC errors to the console. @@ -345,9 +343,9 @@ struct floppy_raw_cmd { char *kernel_data; /* location of data buffer in the kernel */ struct floppy_raw_cmd *next; /* used for chaining of raw cmd's * within the kernel */ - long length; /* in: length of dma transfer. out: remaining bytes */ - long phys_length; /* physical length, if different from dma length */ - int buffer_length; /* length of allocated buffer */ + long length; /* in: length of dma transfer. out: remaining bytes */ + long phys_length; /* physical length, if different from dma length */ + int buffer_length; /* length of allocated buffer */ unsigned char rate; diff --git a/include/arch/x86_64/linux/firewire-cdev.h b/include/arch/x86_64/linux/firewire-cdev.h index b43d34f8..b8ea8be8 100644 --- a/include/arch/x86_64/linux/firewire-cdev.h +++ b/include/arch/x86_64/linux/firewire-cdev.h @@ -532,61 +532,46 @@ union fw_cdev_event { struct fw_cdev_event_iso_interrupt iso_interrupt; struct fw_cdev_event_iso_interrupt_mc iso_interrupt_mc; /* added in 2.6.36 */ - struct fw_cdev_event_iso_resource iso_resource; /* added in 2.6.30 */ - struct fw_cdev_event_phy_packet phy_packet; /* added in 2.6.36 */ - struct fw_cdev_event_request3 request3; /* added in 6.5 */ - struct fw_cdev_event_response2 response2; /* added in 6.5 */ - struct fw_cdev_event_phy_packet2 phy_packet2; /* added in 6.5 */ + struct fw_cdev_event_iso_resource iso_resource; /* added in 2.6.30 */ + struct fw_cdev_event_phy_packet phy_packet; /* added in 2.6.36 */ + struct fw_cdev_event_request3 request3; /* added in 6.5 */ + struct fw_cdev_event_response2 response2; /* added in 6.5 */ + struct fw_cdev_event_phy_packet2 phy_packet2; /* added in 6.5 */ }; /* available since kernel version 2.6.22 */ -#define FW_CDEV_IOC_GET_INFO _IOWR('#', 0x00, struct fw_cdev_get_info) -#define FW_CDEV_IOC_SEND_REQUEST _IOW('#', 0x01, struct fw_cdev_send_request) -#define FW_CDEV_IOC_ALLOCATE _IOWR('#', 0x02, struct fw_cdev_allocate) -#define FW_CDEV_IOC_DEALLOCATE _IOW('#', 0x03, struct fw_cdev_deallocate) -#define FW_CDEV_IOC_SEND_RESPONSE _IOW('#', 0x04, struct fw_cdev_send_response) -#define FW_CDEV_IOC_INITIATE_BUS_RESET \ - _IOW('#', 0x05, struct fw_cdev_initiate_bus_reset) -#define FW_CDEV_IOC_ADD_DESCRIPTOR \ - _IOWR('#', 0x06, struct fw_cdev_add_descriptor) -#define FW_CDEV_IOC_REMOVE_DESCRIPTOR \ - _IOW('#', 0x07, struct fw_cdev_remove_descriptor) -#define FW_CDEV_IOC_CREATE_ISO_CONTEXT \ - _IOWR('#', 0x08, struct fw_cdev_create_iso_context) -#define FW_CDEV_IOC_QUEUE_ISO _IOWR('#', 0x09, struct fw_cdev_queue_iso) -#define FW_CDEV_IOC_START_ISO _IOW('#', 0x0a, struct fw_cdev_start_iso) -#define FW_CDEV_IOC_STOP_ISO _IOW('#', 0x0b, struct fw_cdev_stop_iso) +#define FW_CDEV_IOC_GET_INFO _IOWR('#', 0x00, struct fw_cdev_get_info) +#define FW_CDEV_IOC_SEND_REQUEST _IOW('#', 0x01, struct fw_cdev_send_request) +#define FW_CDEV_IOC_ALLOCATE _IOWR('#', 0x02, struct fw_cdev_allocate) +#define FW_CDEV_IOC_DEALLOCATE _IOW('#', 0x03, struct fw_cdev_deallocate) +#define FW_CDEV_IOC_SEND_RESPONSE _IOW('#', 0x04, struct fw_cdev_send_response) +#define FW_CDEV_IOC_INITIATE_BUS_RESET _IOW('#', 0x05, struct fw_cdev_initiate_bus_reset) +#define FW_CDEV_IOC_ADD_DESCRIPTOR _IOWR('#', 0x06, struct fw_cdev_add_descriptor) +#define FW_CDEV_IOC_REMOVE_DESCRIPTOR _IOW('#', 0x07, struct fw_cdev_remove_descriptor) +#define FW_CDEV_IOC_CREATE_ISO_CONTEXT _IOWR('#', 0x08, struct fw_cdev_create_iso_context) +#define FW_CDEV_IOC_QUEUE_ISO _IOWR('#', 0x09, struct fw_cdev_queue_iso) +#define FW_CDEV_IOC_START_ISO _IOW('#', 0x0a, struct fw_cdev_start_iso) +#define FW_CDEV_IOC_STOP_ISO _IOW('#', 0x0b, struct fw_cdev_stop_iso) /* available since kernel version 2.6.24 */ -#define FW_CDEV_IOC_GET_CYCLE_TIMER \ - _IOR('#', 0x0c, struct fw_cdev_get_cycle_timer) +#define FW_CDEV_IOC_GET_CYCLE_TIMER _IOR('#', 0x0c, struct fw_cdev_get_cycle_timer) /* available since kernel version 2.6.30 */ -#define FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE \ - _IOWR('#', 0x0d, struct fw_cdev_allocate_iso_resource) -#define FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE \ - _IOW('#', 0x0e, struct fw_cdev_deallocate) -#define FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE_ONCE \ - _IOW('#', 0x0f, struct fw_cdev_allocate_iso_resource) -#define FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE_ONCE \ - _IOW('#', 0x10, struct fw_cdev_allocate_iso_resource) -#define FW_CDEV_IOC_GET_SPEED _IO('#', 0x11) /* returns speed code */ -#define FW_CDEV_IOC_SEND_BROADCAST_REQUEST \ - _IOW('#', 0x12, struct fw_cdev_send_request) -#define FW_CDEV_IOC_SEND_STREAM_PACKET \ - _IOW('#', 0x13, struct fw_cdev_send_stream_packet) +#define FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE _IOWR('#', 0x0d, struct fw_cdev_allocate_iso_resource) +#define FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE _IOW('#', 0x0e, struct fw_cdev_deallocate) +#define FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE_ONCE _IOW('#', 0x0f, struct fw_cdev_allocate_iso_resource) +#define FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE_ONCE _IOW('#', 0x10, struct fw_cdev_allocate_iso_resource) +#define FW_CDEV_IOC_GET_SPEED _IO('#', 0x11) /* returns speed code */ +#define FW_CDEV_IOC_SEND_BROADCAST_REQUEST _IOW('#', 0x12, struct fw_cdev_send_request) +#define FW_CDEV_IOC_SEND_STREAM_PACKET _IOW('#', 0x13, struct fw_cdev_send_stream_packet) /* available since kernel version 2.6.34 */ -#define FW_CDEV_IOC_GET_CYCLE_TIMER2 \ - _IOWR('#', 0x14, struct fw_cdev_get_cycle_timer2) +#define FW_CDEV_IOC_GET_CYCLE_TIMER2 _IOWR('#', 0x14, struct fw_cdev_get_cycle_timer2) /* available since kernel version 2.6.36 */ -#define FW_CDEV_IOC_SEND_PHY_PACKET \ - _IOWR('#', 0x15, struct fw_cdev_send_phy_packet) -#define FW_CDEV_IOC_RECEIVE_PHY_PACKETS \ - _IOW('#', 0x16, struct fw_cdev_receive_phy_packets) -#define FW_CDEV_IOC_SET_ISO_CHANNELS \ - _IOW('#', 0x17, struct fw_cdev_set_iso_channels) +#define FW_CDEV_IOC_SEND_PHY_PACKET _IOWR('#', 0x15, struct fw_cdev_send_phy_packet) +#define FW_CDEV_IOC_RECEIVE_PHY_PACKETS _IOW('#', 0x16, struct fw_cdev_receive_phy_packets) +#define FW_CDEV_IOC_SET_ISO_CHANNELS _IOW('#', 0x17, struct fw_cdev_set_iso_channels) /* available since kernel version 3.4 */ #define FW_CDEV_IOC_FLUSH_ISO _IOW('#', 0x18, struct fw_cdev_flush_iso) diff --git a/include/arch/x86_64/linux/fpga-dfl.h b/include/arch/x86_64/linux/fpga-dfl.h index c4c4870e..a154dd65 100644 --- a/include/arch/x86_64/linux/fpga-dfl.h +++ b/include/arch/x86_64/linux/fpga-dfl.h @@ -172,8 +172,7 @@ struct dfl_fpga_irq_set { * feature. Currently hardware supports up to 1 irq. * Return: 0 on success, -errno on failure. */ -#define DFL_FPGA_PORT_ERR_GET_IRQ_NUM \ - _IOR(DFL_FPGA_MAGIC, DFL_PORT_BASE + 5, __u32) +#define DFL_FPGA_PORT_ERR_GET_IRQ_NUM _IOR(DFL_FPGA_MAGIC, DFL_PORT_BASE + 5, __u32) /** * DFL_FPGA_PORT_ERR_SET_IRQ - _IOW(DFL_FPGA_MAGIC, DFL_PORT_BASE + 6, @@ -183,8 +182,7 @@ struct dfl_fpga_irq_set { * Unset related interrupt trigger if evtfds[n] is a negative value. * Return: 0 on success, -errno on failure. */ -#define DFL_FPGA_PORT_ERR_SET_IRQ \ - _IOW(DFL_FPGA_MAGIC, DFL_PORT_BASE + 6, struct dfl_fpga_irq_set) +#define DFL_FPGA_PORT_ERR_SET_IRQ _IOW(DFL_FPGA_MAGIC, DFL_PORT_BASE + 6, struct dfl_fpga_irq_set) /** * DFL_FPGA_PORT_UINT_GET_IRQ_NUM - _IOR(DFL_FPGA_MAGIC, DFL_PORT_BASE + 7, @@ -194,8 +192,7 @@ struct dfl_fpga_irq_set { * feature. * Return: 0 on success, -errno on failure. */ -#define DFL_FPGA_PORT_UINT_GET_IRQ_NUM \ - _IOR(DFL_FPGA_MAGIC, DFL_PORT_BASE + 7, __u32) +#define DFL_FPGA_PORT_UINT_GET_IRQ_NUM _IOR(DFL_FPGA_MAGIC, DFL_PORT_BASE + 7, __u32) /** * DFL_FPGA_PORT_UINT_SET_IRQ - _IOW(DFL_FPGA_MAGIC, DFL_PORT_BASE + 8, @@ -205,8 +202,7 @@ struct dfl_fpga_irq_set { * Unset related interrupt trigger if evtfds[n] is a negative value. * Return: 0 on success, -errno on failure. */ -#define DFL_FPGA_PORT_UINT_SET_IRQ \ - _IOW(DFL_FPGA_MAGIC, DFL_PORT_BASE + 8, struct dfl_fpga_irq_set) +#define DFL_FPGA_PORT_UINT_SET_IRQ _IOW(DFL_FPGA_MAGIC, DFL_PORT_BASE + 8, struct dfl_fpga_irq_set) /* IOCTLs for FME file descriptor */ @@ -259,8 +255,7 @@ struct dfl_fpga_fme_port_pr { * feature. Currently hardware supports up to 1 irq. * Return: 0 on success, -errno on failure. */ -#define DFL_FPGA_FME_ERR_GET_IRQ_NUM \ - _IOR(DFL_FPGA_MAGIC, DFL_FME_BASE + 3, __u32) +#define DFL_FPGA_FME_ERR_GET_IRQ_NUM _IOR(DFL_FPGA_MAGIC, DFL_FME_BASE + 3, __u32) /** * DFL_FPGA_FME_ERR_SET_IRQ - _IOW(DFL_FPGA_MAGIC, DFL_FME_BASE + 4, @@ -270,7 +265,6 @@ struct dfl_fpga_fme_port_pr { * Unset related interrupt trigger if evtfds[n] is a negative value. * Return: 0 on success, -errno on failure. */ -#define DFL_FPGA_FME_ERR_SET_IRQ \ - _IOW(DFL_FPGA_MAGIC, DFL_FME_BASE + 4, struct dfl_fpga_irq_set) +#define DFL_FPGA_FME_ERR_SET_IRQ _IOW(DFL_FPGA_MAGIC, DFL_FME_BASE + 4, struct dfl_fpga_irq_set) #endif /* _LINUX_FPGA_DFL_H */ diff --git a/include/arch/x86_64/linux/fs.h b/include/arch/x86_64/linux/fs.h index 86ead53c..fcaa4bbc 100644 --- a/include/arch/x86_64/linux/fs.h +++ b/include/arch/x86_64/linux/fs.h @@ -10,10 +10,10 @@ * linux-api@vger.kernel.org. */ -#include +#include #include +#include #include -#include /* Use of MS_* flags within the kernel is restricted to core mount(2) code. */ #include @@ -41,9 +41,7 @@ #define IO_INTEGRITY_CHK_REFTAG (1U << 1) /* enforce ref check */ #define IO_INTEGRITY_CHK_APPTAG (1U << 2) /* enforce app check */ -#define IO_INTEGRITY_VALID_FLAGS \ - (IO_INTEGRITY_CHK_GUARD | IO_INTEGRITY_CHK_REFTAG | \ - IO_INTEGRITY_CHK_APPTAG) +#define IO_INTEGRITY_VALID_FLAGS (IO_INTEGRITY_CHK_GUARD | IO_INTEGRITY_CHK_REFTAG | IO_INTEGRITY_CHK_APPTAG) #define SEEK_SET 0 /* seek relative to beginning of file */ #define SEEK_CUR 1 /* seek relative to current file position */ @@ -263,14 +261,12 @@ struct file_attr { #define BLKFRASET \ _IO(0x12, 100) /* set filesystem (mm/filemap.c) read-ahead \ */ -#define BLKFRAGET \ - _IO(0x12, 101) /* get filesystem (mm/filemap.c) read-ahead \ - */ -#define BLKSECTSET \ - _IO(0x12, 102) /* set max sectors per request (ll_rw_blk.c) */ -#define BLKSECTGET \ - _IO(0x12, 103) /* get max sectors per request (ll_rw_blk.c) */ -#define BLKSSZGET _IO(0x12, 104) /* get block device sector size */ +#define BLKFRAGET \ + _IO(0x12, 101) /* get filesystem (mm/filemap.c) read-ahead \ + */ +#define BLKSECTSET _IO(0x12, 102) /* set max sectors per request (ll_rw_blk.c) */ +#define BLKSECTGET _IO(0x12, 103) /* get max sectors per request (ll_rw_blk.c) */ +#define BLKSSZGET _IO(0x12, 104) /* get block device sector size */ #if 0 #define BLKPG _IO(0x12, 105) /* See blkpg.h */ @@ -282,10 +278,9 @@ struct file_attr { probably all these _IO(0x12,*) ioctls should be moved to blkpg.h. */ #endif /* A jump here: 108-111 have been used for various private purposes. */ -#define BLKBSZGET _IOR(0x12, 112, size_t) -#define BLKBSZSET _IOW(0x12, 113, size_t) -#define BLKGETSIZE64 \ - _IOR(0x12, 114, size_t) /* return device size in bytes (u64 *arg) */ +#define BLKBSZGET _IOR(0x12, 112, size_t) +#define BLKBSZSET _IOW(0x12, 113, size_t) +#define BLKGETSIZE64 _IOR(0x12, 114, size_t) /* return device size in bytes (u64 *arg) */ #define BLKTRACESETUP _IOWR(0x12, 115, struct blk_user_trace_setup) #define BLKTRACESTART _IO(0x12, 116) #define BLKTRACESTOP _IO(0x12, 117) @@ -303,9 +298,9 @@ struct file_attr { /* 130-136 are used by zoned block device ioctls (uapi/linux/blkzoned.h) */ /* 137-141 are used by blk-crypto ioctls (uapi/linux/blk-crypto.h) */ -#define BMAP_IOCTL 1 /* obsolete - kept for compatibility */ -#define FIBMAP _IO(0x00, 1) /* bmap access */ -#define FIGETBSZ _IO(0x00, 2) /* get the block size used for bmap */ +#define BMAP_IOCTL 1 /* obsolete - kept for compatibility */ +#define FIBMAP _IO(0x00, 1) /* bmap access */ +#define FIGETBSZ _IO(0x00, 2) /* get the block size used for bmap */ #define FIFREEZE _IOWR('X', 119, int) /* Freeze */ #define FITHAW _IOWR('X', 120, int) /* Thaw */ #define FITRIM _IOWR('X', 121, struct fstrim_range) /* Trim */ @@ -397,9 +392,8 @@ struct file_attr { #define SYNC_FILE_RANGE_WAIT_BEFORE 1 #define SYNC_FILE_RANGE_WRITE 2 #define SYNC_FILE_RANGE_WAIT_AFTER 4 -#define SYNC_FILE_RANGE_WRITE_AND_WAIT \ - (SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_BEFORE | \ - SYNC_FILE_RANGE_WAIT_AFTER) +#define SYNC_FILE_RANGE_WRITE_AND_WAIT \ + (SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WAIT_AFTER) /* * Flags for preadv2/pwritev2: @@ -432,9 +426,8 @@ typedef int __bitwise __kernel_rwf_t; #define RWF_DONTCACHE ((__kernel_rwf_t)0x00000080) /* mask of flags supported by the kernel */ -#define RWF_SUPPORTED \ - (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT | RWF_APPEND | \ - RWF_NOAPPEND | RWF_ATOMIC | RWF_DONTCACHE) +#define RWF_SUPPORTED \ + (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT | RWF_APPEND | RWF_NOAPPEND | RWF_ATOMIC | RWF_DONTCACHE) #define PROCFS_IOCTL_MAGIC 'f' @@ -466,9 +459,8 @@ struct page_region { }; /* Flags for PAGEMAP_SCAN ioctl */ -#define PM_SCAN_WP_MATCHING (1 << 0) /* Write protect the pages matched. */ -#define PM_SCAN_CHECK_WPASYNC \ - (1 << 1) /* Abort the scan when a non-WP-enabled page is found. */ +#define PM_SCAN_WP_MATCHING (1 << 0) /* Write protect the pages matched. */ +#define PM_SCAN_CHECK_WPASYNC (1 << 1) /* Abort the scan when a non-WP-enabled page is found. */ /* * struct pm_scan_arg - Pagemap ioctl argument diff --git a/include/arch/x86_64/linux/fscrypt.h b/include/arch/x86_64/linux/fscrypt.h index 3bc04164..ab260b6b 100644 --- a/include/arch/x86_64/linux/fscrypt.h +++ b/include/arch/x86_64/linux/fscrypt.h @@ -160,19 +160,15 @@ struct fscrypt_get_key_status_arg { __u32 __out_reserved[13]; }; -#define FS_IOC_SET_ENCRYPTION_POLICY _IOR('f', 19, struct fscrypt_policy_v1) -#define FS_IOC_GET_ENCRYPTION_PWSALT _IOW('f', 20, __u8[16]) -#define FS_IOC_GET_ENCRYPTION_POLICY _IOW('f', 21, struct fscrypt_policy_v1) -#define FS_IOC_GET_ENCRYPTION_POLICY_EX \ - _IOWR('f', 22, __u8[9]) /* size + version */ -#define FS_IOC_ADD_ENCRYPTION_KEY _IOWR('f', 23, struct fscrypt_add_key_arg) -#define FS_IOC_REMOVE_ENCRYPTION_KEY \ - _IOWR('f', 24, struct fscrypt_remove_key_arg) -#define FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS \ - _IOWR('f', 25, struct fscrypt_remove_key_arg) -#define FS_IOC_GET_ENCRYPTION_KEY_STATUS \ - _IOWR('f', 26, struct fscrypt_get_key_status_arg) -#define FS_IOC_GET_ENCRYPTION_NONCE _IOR('f', 27, __u8[16]) +#define FS_IOC_SET_ENCRYPTION_POLICY _IOR('f', 19, struct fscrypt_policy_v1) +#define FS_IOC_GET_ENCRYPTION_PWSALT _IOW('f', 20, __u8[16]) +#define FS_IOC_GET_ENCRYPTION_POLICY _IOW('f', 21, struct fscrypt_policy_v1) +#define FS_IOC_GET_ENCRYPTION_POLICY_EX _IOWR('f', 22, __u8[9]) /* size + version */ +#define FS_IOC_ADD_ENCRYPTION_KEY _IOWR('f', 23, struct fscrypt_add_key_arg) +#define FS_IOC_REMOVE_ENCRYPTION_KEY _IOWR('f', 24, struct fscrypt_remove_key_arg) +#define FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS _IOWR('f', 25, struct fscrypt_remove_key_arg) +#define FS_IOC_GET_ENCRYPTION_KEY_STATUS _IOWR('f', 26, struct fscrypt_get_key_status_arg) +#define FS_IOC_GET_ENCRYPTION_NONCE _IOR('f', 27, __u8[16]) /**********************************************************************/ diff --git a/include/arch/x86_64/linux/fsi.h b/include/arch/x86_64/linux/fsi.h index 5f58ed95..b26804b3 100644 --- a/include/arch/x86_64/linux/fsi.h +++ b/include/arch/x86_64/linux/fsi.h @@ -17,10 +17,10 @@ /* Structure for SCOM read/write */ struct scom_access { - __u64 addr; /* SCOM address, supports indirect */ - __u64 data; /* SCOM data (in for write, out for read) */ - __u64 mask; /* Data mask for writes */ - __u32 intf_errors; /* Interface error flags */ + __u64 addr; /* SCOM address, supports indirect */ + __u64 data; /* SCOM data (in for write, out for read) */ + __u64 mask; /* Data mask for writes */ + __u32 intf_errors; /* Interface error flags */ #define SCOM_INTF_ERR_PARITY 0x00000001 /* Parity error */ #define SCOM_INTF_ERR_PROTECTION 0x00000002 /* Blocked by secure boot */ #define SCOM_INTF_ERR_ABORT 0x00000004 /* PIB reset during access */ diff --git a/include/arch/x86_64/linux/fsl_hypervisor.h b/include/arch/x86_64/linux/fsl_hypervisor.h index ca875b54..16ebf3bd 100644 --- a/include/arch/x86_64/linux/fsl_hypervisor.h +++ b/include/arch/x86_64/linux/fsl_hypervisor.h @@ -187,35 +187,27 @@ struct fsl_hv_ioctl_prop { #define FSL_HV_IOCTL_TYPE 0xAF /* Restart another partition */ -#define FSL_HV_IOCTL_PARTITION_RESTART \ - _IOWR(FSL_HV_IOCTL_TYPE, 1, struct fsl_hv_ioctl_restart) +#define FSL_HV_IOCTL_PARTITION_RESTART _IOWR(FSL_HV_IOCTL_TYPE, 1, struct fsl_hv_ioctl_restart) /* Get a partition's status */ -#define FSL_HV_IOCTL_PARTITION_GET_STATUS \ - _IOWR(FSL_HV_IOCTL_TYPE, 2, struct fsl_hv_ioctl_status) +#define FSL_HV_IOCTL_PARTITION_GET_STATUS _IOWR(FSL_HV_IOCTL_TYPE, 2, struct fsl_hv_ioctl_status) /* Boot another partition */ -#define FSL_HV_IOCTL_PARTITION_START \ - _IOWR(FSL_HV_IOCTL_TYPE, 3, struct fsl_hv_ioctl_start) +#define FSL_HV_IOCTL_PARTITION_START _IOWR(FSL_HV_IOCTL_TYPE, 3, struct fsl_hv_ioctl_start) /* Stop this or another partition */ -#define FSL_HV_IOCTL_PARTITION_STOP \ - _IOWR(FSL_HV_IOCTL_TYPE, 4, struct fsl_hv_ioctl_stop) +#define FSL_HV_IOCTL_PARTITION_STOP _IOWR(FSL_HV_IOCTL_TYPE, 4, struct fsl_hv_ioctl_stop) /* Copy data from one partition to another */ -#define FSL_HV_IOCTL_MEMCPY \ - _IOWR(FSL_HV_IOCTL_TYPE, 5, struct fsl_hv_ioctl_memcpy) +#define FSL_HV_IOCTL_MEMCPY _IOWR(FSL_HV_IOCTL_TYPE, 5, struct fsl_hv_ioctl_memcpy) /* Ring a doorbell */ -#define FSL_HV_IOCTL_DOORBELL \ - _IOWR(FSL_HV_IOCTL_TYPE, 6, struct fsl_hv_ioctl_doorbell) +#define FSL_HV_IOCTL_DOORBELL _IOWR(FSL_HV_IOCTL_TYPE, 6, struct fsl_hv_ioctl_doorbell) /* Get a property from another guest's device tree */ -#define FSL_HV_IOCTL_GETPROP \ - _IOWR(FSL_HV_IOCTL_TYPE, 7, struct fsl_hv_ioctl_prop) +#define FSL_HV_IOCTL_GETPROP _IOWR(FSL_HV_IOCTL_TYPE, 7, struct fsl_hv_ioctl_prop) /* Set a property in another guest's device tree */ -#define FSL_HV_IOCTL_SETPROP \ - _IOWR(FSL_HV_IOCTL_TYPE, 8, struct fsl_hv_ioctl_prop) +#define FSL_HV_IOCTL_SETPROP _IOWR(FSL_HV_IOCTL_TYPE, 8, struct fsl_hv_ioctl_prop) #endif /* FSL_HYPERVISOR_H */ diff --git a/include/arch/x86_64/linux/fsl_mc.h b/include/arch/x86_64/linux/fsl_mc.h index 043bc0f0..0bbeee3e 100644 --- a/include/arch/x86_64/linux/fsl_mc.h +++ b/include/arch/x86_64/linux/fsl_mc.h @@ -27,8 +27,6 @@ struct fsl_mc_command { #define FSL_MC_SEND_CMD_IOCTL_TYPE 'R' #define FSL_MC_SEND_CMD_IOCTL_SEQ 0xE0 -#define FSL_MC_SEND_MC_COMMAND \ - _IOWR(FSL_MC_SEND_CMD_IOCTL_TYPE, FSL_MC_SEND_CMD_IOCTL_SEQ, \ - struct fsl_mc_command) +#define FSL_MC_SEND_MC_COMMAND _IOWR(FSL_MC_SEND_CMD_IOCTL_TYPE, FSL_MC_SEND_CMD_IOCTL_SEQ, struct fsl_mc_command) #endif /* _FSL_MC_H_ */ diff --git a/include/arch/x86_64/linux/fsmap.h b/include/arch/x86_64/linux/fsmap.h index 093a86aa..2321fc3a 100644 --- a/include/arch/x86_64/linux/fsmap.h +++ b/include/arch/x86_64/linux/fsmap.h @@ -96,8 +96,7 @@ static __inline__ void fsmap_advance(struct fsmap_head *head) #define FMR_OF_LAST 0x20 /* segment is the last in the dataset */ /* Each FS gets to define its own special owner codes. */ -#define FMR_OWNER(type, code) \ - (((__u64)type << 32) | ((__u64)code & 0xFFFFFFFFULL)) +#define FMR_OWNER(type, code) (((__u64)type << 32) | ((__u64)code & 0xFFFFFFFFULL)) #define FMR_OWNER_TYPE(owner) ((__u32)((__u64)owner >> 32)) #define FMR_OWNER_CODE(owner) ((__u32)(((__u64)owner & 0xFFFFFFFFULL))) #define FMR_OWN_FREE FMR_OWNER(0, 1) /* free space */ diff --git a/include/arch/x86_64/linux/fsverity.h b/include/arch/x86_64/linux/fsverity.h index da0231bc..6b7b6803 100644 --- a/include/arch/x86_64/linux/fsverity.h +++ b/include/arch/x86_64/linux/fsverity.h @@ -88,9 +88,8 @@ struct fsverity_read_metadata_arg { __u64 __reserved; }; -#define FS_IOC_ENABLE_VERITY _IOW('f', 133, struct fsverity_enable_arg) -#define FS_IOC_MEASURE_VERITY _IOWR('f', 134, struct fsverity_digest) -#define FS_IOC_READ_VERITY_METADATA \ - _IOWR('f', 135, struct fsverity_read_metadata_arg) +#define FS_IOC_ENABLE_VERITY _IOW('f', 133, struct fsverity_enable_arg) +#define FS_IOC_MEASURE_VERITY _IOWR('f', 134, struct fsverity_digest) +#define FS_IOC_READ_VERITY_METADATA _IOWR('f', 135, struct fsverity_read_metadata_arg) #endif /* _LINUX_FSVERITY_H */ diff --git a/include/arch/x86_64/linux/fuse.h b/include/arch/x86_64/linux/fuse.h index 44ecae91..6bc893d3 100644 --- a/include/arch/x86_64/linux/fuse.h +++ b/include/arch/x86_64/linux/fuse.h @@ -1049,8 +1049,7 @@ struct fuse_dirent { }; /* Align variable length records to 64bit boundary */ -#define FUSE_REC_ALIGN(x) \ - (((x) + sizeof(uint64_t) - 1) & ~(sizeof(uint64_t) - 1)) +#define FUSE_REC_ALIGN(x) (((x) + sizeof(uint64_t) - 1) & ~(sizeof(uint64_t) - 1)) #define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name) #define FUSE_DIRENT_ALIGN(x) FUSE_REC_ALIGN(x) @@ -1061,10 +1060,8 @@ struct fuse_direntplus { 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) +#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 { uint64_t ino; @@ -1117,10 +1114,9 @@ struct fuse_backing_map { }; /* Device ioctls: */ -#define FUSE_DEV_IOC_MAGIC 229 -#define FUSE_DEV_IOC_CLONE _IOR(FUSE_DEV_IOC_MAGIC, 0, uint32_t) -#define FUSE_DEV_IOC_BACKING_OPEN \ - _IOW(FUSE_DEV_IOC_MAGIC, 1, struct fuse_backing_map) +#define FUSE_DEV_IOC_MAGIC 229 +#define FUSE_DEV_IOC_CLONE _IOR(FUSE_DEV_IOC_MAGIC, 0, uint32_t) +#define FUSE_DEV_IOC_BACKING_OPEN _IOW(FUSE_DEV_IOC_MAGIC, 1, struct fuse_backing_map) #define FUSE_DEV_IOC_BACKING_CLOSE _IOW(FUSE_DEV_IOC_MAGIC, 2, uint32_t) struct fuse_lseek_in { @@ -1171,8 +1167,7 @@ struct fuse_removemapping_one { uint64_t len; }; -#define FUSE_REMOVEMAPPING_MAX_ENTRY \ - (PAGE_SIZE / sizeof(struct fuse_removemapping_one)) +#define FUSE_REMOVEMAPPING_MAX_ENTRY (PAGE_SIZE / sizeof(struct fuse_removemapping_one)) struct fuse_syncfs_in { uint64_t padding; diff --git a/include/arch/x86_64/linux/futex.h b/include/arch/x86_64/linux/futex.h index 48689f00..b7f49719 100644 --- a/include/arch/x86_64/linux/futex.h +++ b/include/arch/x86_64/linux/futex.h @@ -25,20 +25,19 @@ #define FUTEX_CLOCK_REALTIME 256 #define FUTEX_CMD_MASK ~(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME) -#define FUTEX_WAIT_PRIVATE (FUTEX_WAIT | FUTEX_PRIVATE_FLAG) -#define FUTEX_WAKE_PRIVATE (FUTEX_WAKE | FUTEX_PRIVATE_FLAG) -#define FUTEX_REQUEUE_PRIVATE (FUTEX_REQUEUE | FUTEX_PRIVATE_FLAG) -#define FUTEX_CMP_REQUEUE_PRIVATE (FUTEX_CMP_REQUEUE | FUTEX_PRIVATE_FLAG) -#define FUTEX_WAKE_OP_PRIVATE (FUTEX_WAKE_OP | FUTEX_PRIVATE_FLAG) -#define FUTEX_LOCK_PI_PRIVATE (FUTEX_LOCK_PI | FUTEX_PRIVATE_FLAG) -#define FUTEX_LOCK_PI2_PRIVATE (FUTEX_LOCK_PI2 | FUTEX_PRIVATE_FLAG) -#define FUTEX_UNLOCK_PI_PRIVATE (FUTEX_UNLOCK_PI | FUTEX_PRIVATE_FLAG) -#define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG) -#define FUTEX_WAIT_BITSET_PRIVATE (FUTEX_WAIT_BITSET | FUTEX_PRIVATE_FLAG) -#define FUTEX_WAKE_BITSET_PRIVATE (FUTEX_WAKE_BITSET | FUTEX_PRIVATE_FLAG) -#define FUTEX_WAIT_REQUEUE_PI_PRIVATE \ - (FUTEX_WAIT_REQUEUE_PI | FUTEX_PRIVATE_FLAG) -#define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | FUTEX_PRIVATE_FLAG) +#define FUTEX_WAIT_PRIVATE (FUTEX_WAIT | FUTEX_PRIVATE_FLAG) +#define FUTEX_WAKE_PRIVATE (FUTEX_WAKE | FUTEX_PRIVATE_FLAG) +#define FUTEX_REQUEUE_PRIVATE (FUTEX_REQUEUE | FUTEX_PRIVATE_FLAG) +#define FUTEX_CMP_REQUEUE_PRIVATE (FUTEX_CMP_REQUEUE | FUTEX_PRIVATE_FLAG) +#define FUTEX_WAKE_OP_PRIVATE (FUTEX_WAKE_OP | FUTEX_PRIVATE_FLAG) +#define FUTEX_LOCK_PI_PRIVATE (FUTEX_LOCK_PI | FUTEX_PRIVATE_FLAG) +#define FUTEX_LOCK_PI2_PRIVATE (FUTEX_LOCK_PI2 | FUTEX_PRIVATE_FLAG) +#define FUTEX_UNLOCK_PI_PRIVATE (FUTEX_UNLOCK_PI | FUTEX_PRIVATE_FLAG) +#define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG) +#define FUTEX_WAIT_BITSET_PRIVATE (FUTEX_WAIT_BITSET | FUTEX_PRIVATE_FLAG) +#define FUTEX_WAKE_BITSET_PRIVATE (FUTEX_WAKE_BITSET | FUTEX_PRIVATE_FLAG) +#define FUTEX_WAIT_REQUEUE_PI_PRIVATE (FUTEX_WAIT_REQUEUE_PI | FUTEX_PRIVATE_FLAG) +#define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | FUTEX_PRIVATE_FLAG) /* * Flags for futex2 syscalls. @@ -201,8 +200,7 @@ struct robust_list_head { if (oldval CMP CMPARG) wake UADDR2; */ -#define FUTEX_OP(op, oparg, cmp, cmparg) \ - (((op & 0xf) << 28) | ((cmp & 0xf) << 24) | ((oparg & 0xfff) << 12) | \ - (cmparg & 0xfff)) +#define FUTEX_OP(op, oparg, cmp, cmparg) \ + ((((op) & 0xf) << 28) | (((cmp) & 0xf) << 24) | (((oparg) & 0xfff) << 12) | ((cmparg) & 0xfff)) #endif /* _LINUX_FUTEX_H */ diff --git a/include/arch/x86_64/linux/genwqe/genwqe_card.h b/include/arch/x86_64/linux/genwqe/genwqe_card.h index 7f8fde44..cf79522b 100644 --- a/include/arch/x86_64/linux/genwqe/genwqe_card.h +++ b/include/arch/x86_64/linux/genwqe/genwqe_card.h @@ -388,11 +388,9 @@ struct genwqe_debug_data { #define ATS_TYPE_SGL_RD 0x6ull /* sgl read only */ #define ATS_TYPE_SGL_RDWR 0x7ull /* sgl read/write */ -#define ATS_SET_FLAGS(_struct, _field, _flags) \ - (((_flags) & 0xf) << (44 - (4 * (offsetof(_struct, _field) / 8)))) +#define ATS_SET_FLAGS(_struct, _field, _flags) (((_flags) & 0xf) << (44 - (4 * (offsetof(_struct, _field) / 8)))) -#define ATS_GET_FLAGS(_ats, _byte_offs) \ - (((_ats) >> (44 - (4 * ((_byte_offs) / 8)))) & 0xf) +#define ATS_GET_FLAGS(_ats, _byte_offs) (((_ats) >> (44 - (4 * ((_byte_offs) / 8)))) & 0xf) /** * struct genwqe_ddcb_cmd - User parameter for generic DDCB commands @@ -491,8 +489,7 @@ struct genwqe_mem { */ #define GENWQE_EXECUTE_DDCB _IOWR(GENWQE_IOC_CODE, 50, struct genwqe_ddcb_cmd) -#define GENWQE_EXECUTE_RAW_DDCB \ - _IOWR(GENWQE_IOC_CODE, 51, struct genwqe_ddcb_cmd) +#define GENWQE_EXECUTE_RAW_DDCB _IOWR(GENWQE_IOC_CODE, 51, struct genwqe_ddcb_cmd) /* Service Layer functions (PF only) */ #define GENWQE_SLU_UPDATE _IOWR(GENWQE_IOC_CODE, 80, struct genwqe_bitstream) diff --git a/include/arch/x86_64/linux/gfs2_ondisk.h b/include/arch/x86_64/linux/gfs2_ondisk.h index 08ae6cdb..70cf5f54 100644 --- a/include/arch/x86_64/linux/gfs2_ondisk.h +++ b/include/arch/x86_64/linux/gfs2_ondisk.h @@ -311,10 +311,9 @@ struct gfs2_dinode { * directory structure - many of these per directory file */ -#define GFS2_FNAMESIZE 255 -#define GFS2_DIRENT_SIZE(name_len) \ - ((sizeof(struct gfs2_dirent) + (name_len) + 7) & ~7) -#define GFS2_MIN_DIRENT_SIZE (GFS2_DIRENT_SIZE(1)) +#define GFS2_FNAMESIZE 255 +#define GFS2_DIRENT_SIZE(name_len) ((sizeof(struct gfs2_dirent) + (name_len) + 7) & ~7) +#define GFS2_MIN_DIRENT_SIZE (GFS2_DIRENT_SIZE(1)) struct gfs2_dirent { struct gfs2_inum de_inum; diff --git a/include/arch/x86_64/linux/gpio.h b/include/arch/x86_64/linux/gpio.h index d7639d22..9c36c099 100644 --- a/include/arch/x86_64/linux/gpio.h +++ b/include/arch/x86_64/linux/gpio.h @@ -512,30 +512,24 @@ struct gpioevent_data { /* * v2 ioctl()s */ -#define GPIO_V2_GET_LINEINFO_IOCTL _IOWR(0xB4, 0x05, struct gpio_v2_line_info) -#define GPIO_V2_GET_LINEINFO_WATCH_IOCTL \ - _IOWR(0xB4, 0x06, struct gpio_v2_line_info) -#define GPIO_V2_GET_LINE_IOCTL _IOWR(0xB4, 0x07, struct gpio_v2_line_request) -#define GPIO_V2_LINE_SET_CONFIG_IOCTL \ - _IOWR(0xB4, 0x0D, struct gpio_v2_line_config) -#define GPIO_V2_LINE_GET_VALUES_IOCTL \ - _IOWR(0xB4, 0x0E, struct gpio_v2_line_values) -#define GPIO_V2_LINE_SET_VALUES_IOCTL \ - _IOWR(0xB4, 0x0F, struct gpio_v2_line_values) +#define GPIO_V2_GET_LINEINFO_IOCTL _IOWR(0xB4, 0x05, struct gpio_v2_line_info) +#define GPIO_V2_GET_LINEINFO_WATCH_IOCTL _IOWR(0xB4, 0x06, struct gpio_v2_line_info) +#define GPIO_V2_GET_LINE_IOCTL _IOWR(0xB4, 0x07, struct gpio_v2_line_request) +#define GPIO_V2_LINE_SET_CONFIG_IOCTL _IOWR(0xB4, 0x0D, struct gpio_v2_line_config) +#define GPIO_V2_LINE_GET_VALUES_IOCTL _IOWR(0xB4, 0x0E, struct gpio_v2_line_values) +#define GPIO_V2_LINE_SET_VALUES_IOCTL _IOWR(0xB4, 0x0F, struct gpio_v2_line_values) /* * v1 ioctl()s * * These ioctl()s are deprecated. Use the v2 equivalent instead. */ -#define GPIO_GET_LINEINFO_IOCTL _IOWR(0xB4, 0x02, struct gpioline_info) -#define GPIO_GET_LINEHANDLE_IOCTL _IOWR(0xB4, 0x03, struct gpiohandle_request) -#define GPIO_GET_LINEEVENT_IOCTL _IOWR(0xB4, 0x04, struct gpioevent_request) -#define GPIOHANDLE_GET_LINE_VALUES_IOCTL \ - _IOWR(0xB4, 0x08, struct gpiohandle_data) -#define GPIOHANDLE_SET_LINE_VALUES_IOCTL \ - _IOWR(0xB4, 0x09, struct gpiohandle_data) -#define GPIOHANDLE_SET_CONFIG_IOCTL _IOWR(0xB4, 0x0A, struct gpiohandle_config) -#define GPIO_GET_LINEINFO_WATCH_IOCTL _IOWR(0xB4, 0x0B, struct gpioline_info) +#define GPIO_GET_LINEINFO_IOCTL _IOWR(0xB4, 0x02, struct gpioline_info) +#define GPIO_GET_LINEHANDLE_IOCTL _IOWR(0xB4, 0x03, struct gpiohandle_request) +#define GPIO_GET_LINEEVENT_IOCTL _IOWR(0xB4, 0x04, struct gpioevent_request) +#define GPIOHANDLE_GET_LINE_VALUES_IOCTL _IOWR(0xB4, 0x08, struct gpiohandle_data) +#define GPIOHANDLE_SET_LINE_VALUES_IOCTL _IOWR(0xB4, 0x09, struct gpiohandle_data) +#define GPIOHANDLE_SET_CONFIG_IOCTL _IOWR(0xB4, 0x0A, struct gpiohandle_config) +#define GPIO_GET_LINEINFO_WATCH_IOCTL _IOWR(0xB4, 0x0B, struct gpioline_info) #endif /* _GPIO_H_ */ diff --git a/include/arch/x86_64/linux/gtp.h b/include/arch/x86_64/linux/gtp.h index 471e069c..53e7c497 100644 --- a/include/arch/x86_64/linux/gtp.h +++ b/include/arch/x86_64/linux/gtp.h @@ -22,8 +22,8 @@ enum gtp_attrs { GTPA_UNSPEC = 0, GTPA_LINK, GTPA_VERSION, - GTPA_TID, /* for GTPv0 only */ - GTPA_PEER_ADDRESS, /* Remote GSN peer, either SGSN or GGSN */ + GTPA_TID, /* for GTPv0 only */ + GTPA_PEER_ADDRESS, /* Remote GSN peer, either SGSN or GGSN */ #define GTPA_SGSN_ADDRESS GTPA_PEER_ADDRESS /* maintain legacy attr name */ GTPA_MS_ADDRESS, GTPA_FLOW, diff --git a/include/arch/x86_64/linux/hdlcdrv.h b/include/arch/x86_64/linux/hdlcdrv.h index 784d1dcf..0d3f0ba7 100644 --- a/include/arch/x86_64/linux/hdlcdrv.h +++ b/include/arch/x86_64/linux/hdlcdrv.h @@ -29,7 +29,7 @@ struct hdlcdrv_channel_params { int slottime; /* the slottime in 10ms; usually 10 = 100ms */ int ppersist; /* the p-persistence 0..255 */ int fulldup; /* some driver do not support full duplex, setting */ - /* this just makes them send even if DCD is on */ + /* this just makes them send even if DCD is on */ }; struct hdlcdrv_old_channel_state { diff --git a/include/arch/x86_64/linux/hdreg.h b/include/arch/x86_64/linux/hdreg.h index ce171ac3..bba86d16 100644 --- a/include/arch/x86_64/linux/hdreg.h +++ b/include/arch/x86_64/linux/hdreg.h @@ -214,9 +214,9 @@ typedef struct hd_drive_hob_hdr { #define WIN_READDMA_ONCE 0xC9 /* 28-Bit - without retries */ #define WIN_WRITEDMA 0xCA /* write sectors using DMA transfers */ #define WIN_WRITEDMA_ONCE 0xCB /* 28-Bit - without retries */ -#define WIN_WRITEDMA_QUEUED \ - 0xCC /* write sectors using Queued DMA transfers \ - */ +#define WIN_WRITEDMA_QUEUED \ + 0xCC /* write sectors using Queued DMA transfers \ + */ #define CFA_WRITE_MULTI_WO_ERASE 0xCD /* CFA Write multiple without erase */ #define WIN_GETMEDIASTATUS 0xDA #define WIN_ACKMEDIACHANGE 0xDB /* ATA-1, ATA-2 vendor */ @@ -328,17 +328,16 @@ struct hd_geometry { #define HDIO_SET_XFER 0x0306 /* set transfer rate via proc */ -#define HDIO_OBSOLETE_IDENTITY \ - 0x0307 /* OBSOLETE, DO NOT USE: returns 142 bytes */ -#define HDIO_GET_KEEPSETTINGS 0x0308 /* get keep-settings-on-reset flag */ -#define HDIO_GET_32BIT 0x0309 /* get current io_32bit setting */ -#define HDIO_GET_NOWERR 0x030a /* get ignore-write-error flag */ -#define HDIO_GET_DMA 0x030b /* get use-dma flag */ -#define HDIO_GET_NICE 0x030c /* get nice flags */ -#define HDIO_GET_IDENTITY 0x030d /* get IDE identification info */ -#define HDIO_GET_WCACHE 0x030e /* get write cache mode on|off */ -#define HDIO_GET_ACOUSTIC 0x030f /* get acoustic value */ -#define HDIO_GET_ADDRESS 0x0310 /* */ +#define HDIO_OBSOLETE_IDENTITY 0x0307 /* OBSOLETE, DO NOT USE: returns 142 bytes */ +#define HDIO_GET_KEEPSETTINGS 0x0308 /* get keep-settings-on-reset flag */ +#define HDIO_GET_32BIT 0x0309 /* get current io_32bit setting */ +#define HDIO_GET_NOWERR 0x030a /* get ignore-write-error flag */ +#define HDIO_GET_DMA 0x030b /* get use-dma flag */ +#define HDIO_GET_NICE 0x030c /* get nice flags */ +#define HDIO_GET_IDENTITY 0x030d /* get IDE identification info */ +#define HDIO_GET_WCACHE 0x030e /* get write cache mode on|off */ +#define HDIO_GET_ACOUSTIC 0x030f /* get acoustic value */ +#define HDIO_GET_ADDRESS 0x0310 /* */ #define HDIO_GET_BUSSTATE 0x031a /* get the bus state of the hwif */ #define HDIO_TRISTATE_HWIF 0x031b /* execute a channel tristate */ @@ -383,202 +382,202 @@ enum { BUSSTATE_OFF = 0, BUSSTATE_ON, BUSSTATE_TRISTATE }; * ide/probe.c. */ struct hd_driveid { - unsigned short config; /* lots of obsolete bit flags */ - unsigned short cyls; /* Obsolete, "physical" cyls */ - unsigned short reserved2; /* reserved (word 2) */ - unsigned short heads; /* Obsolete, "physical" heads */ - unsigned short track_bytes; /* unformatted bytes per track */ - unsigned short sector_bytes; /* unformatted bytes per sector */ - unsigned short sectors; /* Obsolete, "physical" sectors per track */ - unsigned short vendor0; /* vendor unique */ - unsigned short vendor1; /* vendor unique */ - unsigned short vendor2; /* Retired vendor unique */ - unsigned char serial_no[20]; /* 0 = not_specified */ - unsigned short buf_type; /* Retired */ - unsigned short buf_size; /* Retired, 512 byte increments - * 0 = not_specified - */ - unsigned short ecc_bytes; /* for r/w long cmds; 0 = not_specified */ - unsigned char fw_rev[8]; /* 0 = not_specified */ - unsigned char model[40]; /* 0 = not_specified */ - unsigned char max_multsect; /* 0=not_implemented */ - unsigned char vendor3; /* vendor unique */ - unsigned short dword_io; /* 0=not_implemented; 1=implemented */ - unsigned char vendor4; /* vendor unique */ - unsigned char capability; /* (upper byte of word 49) - * 3: IORDYsup - * 2: IORDYsw - * 1: LBA - * 0: DMA - */ - unsigned short reserved50; /* reserved (word 50) */ - unsigned char vendor5; /* Obsolete, vendor unique */ - unsigned char tPIO; /* Obsolete, 0=slow, 1=medium, 2=fast */ - unsigned char vendor6; /* Obsolete, vendor unique */ - unsigned char tDMA; /* Obsolete, 0=slow, 1=medium, 2=fast */ - unsigned short field_valid; /* (word 53) - * 2: ultra_ok word 88 - * 1: eide_ok words 64-70 - * 0: cur_ok words 54-58 - */ - unsigned short cur_cyls; /* Obsolete, logical cylinders */ - unsigned short cur_heads; /* Obsolete, l heads */ - unsigned short cur_sectors; /* Obsolete, l sectors per track */ - unsigned short cur_capacity0; /* Obsolete, l total sectors on drive */ - unsigned short cur_capacity1; /* Obsolete, (2 words, misaligned int) */ - unsigned char multsect; /* current multiple sector count */ - unsigned char multsect_valid; /* when (bit0==1) multsect is ok */ - unsigned int lba_capacity; /* Obsolete, total number of sectors */ - unsigned short dma_1word; /* Obsolete, single-word dma info */ - unsigned short dma_mword; /* multiple-word dma info */ - unsigned short eide_pio_modes; /* bits 0:mode3 1:mode4 */ - unsigned short eide_dma_min; /* min mword dma cycle time (ns) */ - unsigned short eide_dma_time; /* recommended mword dma cycle time (ns) - */ - unsigned short eide_pio; /* min cycle time (ns), no IORDY */ - unsigned short eide_pio_iordy; /* min cycle time (ns), with IORDY */ - unsigned short words69_70[2]; /* reserved words 69-70 - * future command overlap and queuing - */ - unsigned short words71_74[4]; /* reserved words 71-74 - * for IDENTIFY PACKET DEVICE command - */ - unsigned short queue_depth; /* (word 75) - * 15:5 reserved - * 4:0 Maximum queue depth -1 - */ - unsigned short words76_79[4]; /* reserved words 76-79 */ - unsigned short major_rev_num; /* (word 80) */ - unsigned short minor_rev_num; /* (word 81) */ - unsigned short command_set_1; /* (word 82) supported - * 15: Obsolete - * 14: NOP command - * 13: READ_BUFFER - * 12: WRITE_BUFFER - * 11: Obsolete - * 10: Host Protected Area - * 9: DEVICE Reset - * 8: SERVICE Interrupt - * 7: Release Interrupt - * 6: look-ahead - * 5: write cache - * 4: PACKET Command - * 3: Power Management Feature Set - * 2: Removable Feature Set - * 1: Security Feature Set - * 0: SMART Feature Set - */ - unsigned short command_set_2; /* (word 83) - * 15: Shall be ZERO - * 14: Shall be ONE - * 13: FLUSH CACHE EXT - * 12: FLUSH CACHE - * 11: Device Configuration Overlay - * 10: 48-bit Address Feature Set - * 9: Automatic Acoustic Management - * 8: SET MAX security - * 7: reserved 1407DT PARTIES - * 6: SetF sub-command Power-Up - * 5: Power-Up in Standby Feature Set - * 4: Removable Media Notification - * 3: APM Feature Set - * 2: CFA Feature Set - * 1: READ/WRITE DMA QUEUED - * 0: Download MicroCode - */ - unsigned short cfsse; /* (word 84) - * cmd set-feature supported extensions - * 15: Shall be ZERO - * 14: Shall be ONE - * 13:6 reserved - * 5: General Purpose Logging - * 4: Streaming Feature Set - * 3: Media Card Pass Through - * 2: Media Serial Number Valid - * 1: SMART selt-test supported - * 0: SMART error logging - */ - unsigned short cfs_enable_1; /* (word 85) - * command set-feature enabled - * 15: Obsolete - * 14: NOP command - * 13: READ_BUFFER - * 12: WRITE_BUFFER - * 11: Obsolete - * 10: Host Protected Area - * 9: DEVICE Reset - * 8: SERVICE Interrupt - * 7: Release Interrupt - * 6: look-ahead - * 5: write cache - * 4: PACKET Command - * 3: Power Management Feature Set - * 2: Removable Feature Set - * 1: Security Feature Set - * 0: SMART Feature Set - */ - unsigned short cfs_enable_2; /* (word 86) - * command set-feature enabled - * 15: Shall be ZERO - * 14: Shall be ONE - * 13: FLUSH CACHE EXT - * 12: FLUSH CACHE - * 11: Device Configuration Overlay - * 10: 48-bit Address Feature Set - * 9: Automatic Acoustic Management - * 8: SET MAX security - * 7: reserved 1407DT PARTIES - * 6: SetF sub-command Power-Up - * 5: Power-Up in Standby Feature Set - * 4: Removable Media Notification - * 3: APM Feature Set - * 2: CFA Feature Set - * 1: READ/WRITE DMA QUEUED - * 0: Download MicroCode - */ - unsigned short csf_default; /* (word 87) - * command set-feature default - * 15: Shall be ZERO - * 14: Shall be ONE - * 13:6 reserved - * 5: General Purpose Logging enabled - * 4: Valid CONFIGURE STREAM executed - * 3: Media Card Pass Through enabled - * 2: Media Serial Number Valid - * 1: SMART selt-test supported - * 0: SMART error logging - */ - unsigned short dma_ultra; /* (word 88) */ - unsigned short trseuc; /* time required for security erase */ - unsigned short trsEuc; /* time required for enhanced erase */ - unsigned short CurAPMvalues; /* current APM values */ - unsigned short mprc; /* master password revision code */ - unsigned short hw_config; /* hardware config (word 93) - * 15: Shall be ZERO - * 14: Shall be ONE - * 13: - * 12: - * 11: - * 10: - * 9: - * 8: - * 7: - * 6: - * 5: - * 4: - * 3: - * 2: - * 1: - * 0: Shall be ONE - */ - unsigned short acoustic; /* (word 94) - * 15:8 Vendor's recommended value - * 7:0 current value - */ - unsigned short msrqs; /* min stream request size */ - unsigned short sxfert; /* stream transfer time */ - unsigned short sal; /* stream access latency */ - unsigned int spg; /* stream performance granularity */ + unsigned short config; /* lots of obsolete bit flags */ + unsigned short cyls; /* Obsolete, "physical" cyls */ + unsigned short reserved2; /* reserved (word 2) */ + unsigned short heads; /* Obsolete, "physical" heads */ + unsigned short track_bytes; /* unformatted bytes per track */ + unsigned short sector_bytes; /* unformatted bytes per sector */ + unsigned short sectors; /* Obsolete, "physical" sectors per track */ + unsigned short vendor0; /* vendor unique */ + unsigned short vendor1; /* vendor unique */ + unsigned short vendor2; /* Retired vendor unique */ + unsigned char serial_no[20]; /* 0 = not_specified */ + unsigned short buf_type; /* Retired */ + unsigned short buf_size; /* Retired, 512 byte increments + * 0 = not_specified + */ + unsigned short ecc_bytes; /* for r/w long cmds; 0 = not_specified */ + unsigned char fw_rev[8]; /* 0 = not_specified */ + unsigned char model[40]; /* 0 = not_specified */ + unsigned char max_multsect; /* 0=not_implemented */ + unsigned char vendor3; /* vendor unique */ + unsigned short dword_io; /* 0=not_implemented; 1=implemented */ + unsigned char vendor4; /* vendor unique */ + unsigned char capability; /* (upper byte of word 49) + * 3: IORDYsup + * 2: IORDYsw + * 1: LBA + * 0: DMA + */ + unsigned short reserved50; /* reserved (word 50) */ + unsigned char vendor5; /* Obsolete, vendor unique */ + unsigned char tPIO; /* Obsolete, 0=slow, 1=medium, 2=fast */ + unsigned char vendor6; /* Obsolete, vendor unique */ + unsigned char tDMA; /* Obsolete, 0=slow, 1=medium, 2=fast */ + unsigned short field_valid; /* (word 53) + * 2: ultra_ok word 88 + * 1: eide_ok words 64-70 + * 0: cur_ok words 54-58 + */ + unsigned short cur_cyls; /* Obsolete, logical cylinders */ + unsigned short cur_heads; /* Obsolete, l heads */ + unsigned short cur_sectors; /* Obsolete, l sectors per track */ + unsigned short cur_capacity0; /* Obsolete, l total sectors on drive */ + unsigned short cur_capacity1; /* Obsolete, (2 words, misaligned int) */ + unsigned char multsect; /* current multiple sector count */ + unsigned char multsect_valid; /* when (bit0==1) multsect is ok */ + unsigned int lba_capacity; /* Obsolete, total number of sectors */ + unsigned short dma_1word; /* Obsolete, single-word dma info */ + unsigned short dma_mword; /* multiple-word dma info */ + unsigned short eide_pio_modes; /* bits 0:mode3 1:mode4 */ + unsigned short eide_dma_min; /* min mword dma cycle time (ns) */ + unsigned short eide_dma_time; /* recommended mword dma cycle time (ns) + */ + unsigned short eide_pio; /* min cycle time (ns), no IORDY */ + unsigned short eide_pio_iordy; /* min cycle time (ns), with IORDY */ + unsigned short words69_70[2]; /* reserved words 69-70 + * future command overlap and queuing + */ + unsigned short words71_74[4]; /* reserved words 71-74 + * for IDENTIFY PACKET DEVICE command + */ + unsigned short queue_depth; /* (word 75) + * 15:5 reserved + * 4:0 Maximum queue depth -1 + */ + unsigned short words76_79[4]; /* reserved words 76-79 */ + unsigned short major_rev_num; /* (word 80) */ + unsigned short minor_rev_num; /* (word 81) */ + unsigned short command_set_1; /* (word 82) supported + * 15: Obsolete + * 14: NOP command + * 13: READ_BUFFER + * 12: WRITE_BUFFER + * 11: Obsolete + * 10: Host Protected Area + * 9: DEVICE Reset + * 8: SERVICE Interrupt + * 7: Release Interrupt + * 6: look-ahead + * 5: write cache + * 4: PACKET Command + * 3: Power Management Feature Set + * 2: Removable Feature Set + * 1: Security Feature Set + * 0: SMART Feature Set + */ + unsigned short command_set_2; /* (word 83) + * 15: Shall be ZERO + * 14: Shall be ONE + * 13: FLUSH CACHE EXT + * 12: FLUSH CACHE + * 11: Device Configuration Overlay + * 10: 48-bit Address Feature Set + * 9: Automatic Acoustic Management + * 8: SET MAX security + * 7: reserved 1407DT PARTIES + * 6: SetF sub-command Power-Up + * 5: Power-Up in Standby Feature Set + * 4: Removable Media Notification + * 3: APM Feature Set + * 2: CFA Feature Set + * 1: READ/WRITE DMA QUEUED + * 0: Download MicroCode + */ + unsigned short cfsse; /* (word 84) + * cmd set-feature supported extensions + * 15: Shall be ZERO + * 14: Shall be ONE + * 13:6 reserved + * 5: General Purpose Logging + * 4: Streaming Feature Set + * 3: Media Card Pass Through + * 2: Media Serial Number Valid + * 1: SMART selt-test supported + * 0: SMART error logging + */ + unsigned short cfs_enable_1; /* (word 85) + * command set-feature enabled + * 15: Obsolete + * 14: NOP command + * 13: READ_BUFFER + * 12: WRITE_BUFFER + * 11: Obsolete + * 10: Host Protected Area + * 9: DEVICE Reset + * 8: SERVICE Interrupt + * 7: Release Interrupt + * 6: look-ahead + * 5: write cache + * 4: PACKET Command + * 3: Power Management Feature Set + * 2: Removable Feature Set + * 1: Security Feature Set + * 0: SMART Feature Set + */ + unsigned short cfs_enable_2; /* (word 86) + * command set-feature enabled + * 15: Shall be ZERO + * 14: Shall be ONE + * 13: FLUSH CACHE EXT + * 12: FLUSH CACHE + * 11: Device Configuration Overlay + * 10: 48-bit Address Feature Set + * 9: Automatic Acoustic Management + * 8: SET MAX security + * 7: reserved 1407DT PARTIES + * 6: SetF sub-command Power-Up + * 5: Power-Up in Standby Feature Set + * 4: Removable Media Notification + * 3: APM Feature Set + * 2: CFA Feature Set + * 1: READ/WRITE DMA QUEUED + * 0: Download MicroCode + */ + unsigned short csf_default; /* (word 87) + * command set-feature default + * 15: Shall be ZERO + * 14: Shall be ONE + * 13:6 reserved + * 5: General Purpose Logging enabled + * 4: Valid CONFIGURE STREAM executed + * 3: Media Card Pass Through enabled + * 2: Media Serial Number Valid + * 1: SMART selt-test supported + * 0: SMART error logging + */ + unsigned short dma_ultra; /* (word 88) */ + unsigned short trseuc; /* time required for security erase */ + unsigned short trsEuc; /* time required for enhanced erase */ + unsigned short CurAPMvalues; /* current APM values */ + unsigned short mprc; /* master password revision code */ + unsigned short hw_config; /* hardware config (word 93) + * 15: Shall be ZERO + * 14: Shall be ONE + * 13: + * 12: + * 11: + * 10: + * 9: + * 8: + * 7: + * 6: + * 5: + * 4: + * 3: + * 2: + * 1: + * 0: Shall be ONE + */ + unsigned short acoustic; /* (word 94) + * 15:8 Vendor's recommended value + * 7:0 current value + */ + unsigned short msrqs; /* min stream request size */ + unsigned short sxfert; /* stream transfer time */ + unsigned short sal; /* stream access latency */ + unsigned int spg; /* stream performance granularity */ unsigned long long lba_capacity_2; /* 48-bit total number of sectors */ unsigned short words104_125[22]; /* reserved words 104-125 */ unsigned short last_lun; /* (word 126) */ diff --git a/include/arch/x86_64/linux/i2c.h b/include/arch/x86_64/linux/i2c.h index f8401b59..1794f459 100644 --- a/include/arch/x86_64/linux/i2c.h +++ b/include/arch/x86_64/linux/i2c.h @@ -89,50 +89,39 @@ struct i2c_msg { /* To determine what functionality is present */ -#define I2C_FUNC_I2C 0x00000001 -#define I2C_FUNC_10BIT_ADDR 0x00000002 /* required for I2C_M_TEN */ -#define I2C_FUNC_PROTOCOL_MANGLING \ - 0x00000004 /* required for I2C_M_IGNORE_NAK etc. */ -#define I2C_FUNC_SMBUS_PEC 0x00000008 -#define I2C_FUNC_NOSTART 0x00000010 /* required for I2C_M_NOSTART */ -#define I2C_FUNC_SLAVE 0x00000020 -#define I2C_FUNC_SMBUS_BLOCK_PROC_CALL 0x00008000 /* SMBus 2.0 or later */ -#define I2C_FUNC_SMBUS_QUICK 0x00010000 -#define I2C_FUNC_SMBUS_READ_BYTE 0x00020000 -#define I2C_FUNC_SMBUS_WRITE_BYTE 0x00040000 -#define I2C_FUNC_SMBUS_READ_BYTE_DATA 0x00080000 -#define I2C_FUNC_SMBUS_WRITE_BYTE_DATA 0x00100000 -#define I2C_FUNC_SMBUS_READ_WORD_DATA 0x00200000 -#define I2C_FUNC_SMBUS_WRITE_WORD_DATA 0x00400000 -#define I2C_FUNC_SMBUS_PROC_CALL 0x00800000 -#define I2C_FUNC_SMBUS_READ_BLOCK_DATA \ - 0x01000000 /* required for I2C_M_RECV_LEN */ +#define I2C_FUNC_I2C 0x00000001 +#define I2C_FUNC_10BIT_ADDR 0x00000002 /* required for I2C_M_TEN */ +#define I2C_FUNC_PROTOCOL_MANGLING 0x00000004 /* required for I2C_M_IGNORE_NAK etc. */ +#define I2C_FUNC_SMBUS_PEC 0x00000008 +#define I2C_FUNC_NOSTART 0x00000010 /* required for I2C_M_NOSTART */ +#define I2C_FUNC_SLAVE 0x00000020 +#define I2C_FUNC_SMBUS_BLOCK_PROC_CALL 0x00008000 /* SMBus 2.0 or later */ +#define I2C_FUNC_SMBUS_QUICK 0x00010000 +#define I2C_FUNC_SMBUS_READ_BYTE 0x00020000 +#define I2C_FUNC_SMBUS_WRITE_BYTE 0x00040000 +#define I2C_FUNC_SMBUS_READ_BYTE_DATA 0x00080000 +#define I2C_FUNC_SMBUS_WRITE_BYTE_DATA 0x00100000 +#define I2C_FUNC_SMBUS_READ_WORD_DATA 0x00200000 +#define I2C_FUNC_SMBUS_WRITE_WORD_DATA 0x00400000 +#define I2C_FUNC_SMBUS_PROC_CALL 0x00800000 +#define I2C_FUNC_SMBUS_READ_BLOCK_DATA 0x01000000 /* required for I2C_M_RECV_LEN */ #define I2C_FUNC_SMBUS_WRITE_BLOCK_DATA 0x02000000 #define I2C_FUNC_SMBUS_READ_I2C_BLOCK 0x04000000 /* I2C-like block xfer */ #define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK 0x08000000 /* w/ 1-byte reg. addr. */ #define I2C_FUNC_SMBUS_HOST_NOTIFY 0x10000000 /* SMBus 2.0 or later */ -#define I2C_FUNC_SMBUS_BYTE \ - (I2C_FUNC_SMBUS_READ_BYTE | I2C_FUNC_SMBUS_WRITE_BYTE) -#define I2C_FUNC_SMBUS_BYTE_DATA \ - (I2C_FUNC_SMBUS_READ_BYTE_DATA | I2C_FUNC_SMBUS_WRITE_BYTE_DATA) -#define I2C_FUNC_SMBUS_WORD_DATA \ - (I2C_FUNC_SMBUS_READ_WORD_DATA | I2C_FUNC_SMBUS_WRITE_WORD_DATA) -#define I2C_FUNC_SMBUS_BLOCK_DATA \ - (I2C_FUNC_SMBUS_READ_BLOCK_DATA | I2C_FUNC_SMBUS_WRITE_BLOCK_DATA) -#define I2C_FUNC_SMBUS_I2C_BLOCK \ - (I2C_FUNC_SMBUS_READ_I2C_BLOCK | I2C_FUNC_SMBUS_WRITE_I2C_BLOCK) +#define I2C_FUNC_SMBUS_BYTE (I2C_FUNC_SMBUS_READ_BYTE | I2C_FUNC_SMBUS_WRITE_BYTE) +#define I2C_FUNC_SMBUS_BYTE_DATA (I2C_FUNC_SMBUS_READ_BYTE_DATA | I2C_FUNC_SMBUS_WRITE_BYTE_DATA) +#define I2C_FUNC_SMBUS_WORD_DATA (I2C_FUNC_SMBUS_READ_WORD_DATA | I2C_FUNC_SMBUS_WRITE_WORD_DATA) +#define I2C_FUNC_SMBUS_BLOCK_DATA (I2C_FUNC_SMBUS_READ_BLOCK_DATA | I2C_FUNC_SMBUS_WRITE_BLOCK_DATA) +#define I2C_FUNC_SMBUS_I2C_BLOCK (I2C_FUNC_SMBUS_READ_I2C_BLOCK | I2C_FUNC_SMBUS_WRITE_I2C_BLOCK) -#define I2C_FUNC_SMBUS_EMUL \ - (I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE | \ - I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA | \ - I2C_FUNC_SMBUS_PROC_CALL | I2C_FUNC_SMBUS_WRITE_BLOCK_DATA | \ - I2C_FUNC_SMBUS_I2C_BLOCK | I2C_FUNC_SMBUS_PEC) +#define I2C_FUNC_SMBUS_EMUL \ + (I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE | I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA | \ + I2C_FUNC_SMBUS_PROC_CALL | I2C_FUNC_SMBUS_WRITE_BLOCK_DATA | I2C_FUNC_SMBUS_I2C_BLOCK | I2C_FUNC_SMBUS_PEC) /* if I2C_M_RECV_LEN is also supported */ -#define I2C_FUNC_SMBUS_EMUL_ALL \ - (I2C_FUNC_SMBUS_EMUL | I2C_FUNC_SMBUS_READ_BLOCK_DATA | \ - I2C_FUNC_SMBUS_BLOCK_PROC_CALL) +#define I2C_FUNC_SMBUS_EMUL_ALL (I2C_FUNC_SMBUS_EMUL | I2C_FUNC_SMBUS_READ_BLOCK_DATA | I2C_FUNC_SMBUS_BLOCK_PROC_CALL) /* * Data for SMBus Messages @@ -142,7 +131,7 @@ union i2c_smbus_data { __u8 byte; __u16 word; __u8 block[I2C_SMBUS_BLOCK_MAX + 2]; /* block[0] is used for length */ - /* and one more for user-space compatibility */ + /* and one more for user-space compatibility */ }; /* i2c_smbus_xfer read or write markers */ diff --git a/include/arch/x86_64/linux/icmpv6.h b/include/arch/x86_64/linux/icmpv6.h index f5645526..7d1dcbc8 100644 --- a/include/arch/x86_64/linux/icmpv6.h +++ b/include/arch/x86_64/linux/icmpv6.h @@ -22,11 +22,9 @@ struct icmp6hdr { struct icmpv6_nd_advt { #if defined(__LITTLE_ENDIAN_BITFIELD) - __u32 reserved : 5, override : 1, solicited : 1, - router : 1, reserved2 : 24; + __u32 reserved : 5, override : 1, solicited : 1, router : 1, reserved2 : 24; #elif defined(__BIG_ENDIAN_BITFIELD) - __u32 router : 1, solicited : 1, override : 1, - reserved : 29; + __u32 router : 1, solicited : 1, override : 1, reserved : 29; #else #error "Please fix " #endif @@ -35,12 +33,10 @@ struct icmp6hdr { struct icmpv6_nd_ra { __u8 hop_limit; #if defined(__LITTLE_ENDIAN_BITFIELD) - __u8 reserved : 3, router_pref : 2, home_agent : 1, - other : 1, managed : 1; + __u8 reserved : 3, router_pref : 2, home_agent : 1, other : 1, managed : 1; #elif defined(__BIG_ENDIAN_BITFIELD) - __u8 managed : 1, other : 1, home_agent : 1, - router_pref : 2, reserved : 3; + __u8 managed : 1, other : 1, home_agent : 1, router_pref : 2, reserved : 3; #else #error "Please fix " #endif diff --git a/include/arch/x86_64/linux/if.h b/include/arch/x86_64/linux/if.h index 8d63d635..109f786f 100644 --- a/include/arch/x86_64/linux/if.h +++ b/include/arch/x86_64/linux/if.h @@ -35,8 +35,7 @@ #include /* For glibc compatibility. An empty enum does not compile. */ -#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO != 0 || \ - __UAPI_DEF_IF_NET_DEVICE_FLAGS != 0 +#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO != 0 || __UAPI_DEF_IF_NET_DEVICE_FLAGS != 0 /** * enum net_device_flags - &struct net_device flags * @@ -101,7 +100,7 @@ enum net_device_flags { IFF_LOWER_UP = 1 << 16, /* __volatile__ */ IFF_DORMANT = 1 << 17, /* __volatile__ */ IFF_ECHO = 1 << 18, /* __volatile__ */ -#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */ +#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */ }; #endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO != 0 || \ __UAPI_DEF_IF_NET_DEVICE_FLAGS != 0 */ @@ -132,9 +131,9 @@ enum net_device_flags { #define IFF_ECHO IFF_ECHO #endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */ -#define IFF_VOLATILE \ - (IFF_LOOPBACK | IFF_POINTOPOINT | IFF_BROADCAST | IFF_ECHO | \ - IFF_MASTER | IFF_SLAVE | IFF_RUNNING | IFF_LOWER_UP | IFF_DORMANT) +#define IFF_VOLATILE \ + (IFF_LOOPBACK | IFF_POINTOPOINT | IFF_BROADCAST | IFF_ECHO | IFF_MASTER | IFF_SLAVE | IFF_RUNNING | \ + IFF_LOWER_UP | IFF_DORMANT) #define IF_GET_IFACE 0x0001 /* for querying only */ #define IF_GET_PROTO 0x0002 diff --git a/include/arch/x86_64/linux/if_addr.h b/include/arch/x86_64/linux/if_addr.h index 43512efe..0200880e 100644 --- a/include/arch/x86_64/linux/if_addr.h +++ b/include/arch/x86_64/linux/if_addr.h @@ -65,9 +65,7 @@ struct ifa_cacheinfo { }; /* backwards compatibility for userspace */ -#define IFA_RTA(r) \ - ((struct rtattr *)(((char *)(r)) + \ - NLMSG_ALIGN(sizeof(struct ifaddrmsg)))) +#define IFA_RTA(r) ((struct rtattr *)(((char *)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg)))) #define IFA_PAYLOAD(n) NLMSG_PAYLOAD(n, sizeof(struct ifaddrmsg)) /* ifa_proto */ diff --git a/include/arch/x86_64/linux/if_arp.h b/include/arch/x86_64/linux/if_arp.h index 402f92bc..cf8bcd05 100644 --- a/include/arch/x86_64/linux/if_arp.h +++ b/include/arch/x86_64/linux/if_arp.h @@ -80,11 +80,11 @@ #define ARPHRD_ECONET 782 /* Acorn Econet */ #define ARPHRD_IRDA 783 /* Linux-IrDA */ /* ARP works differently on different FC media .. so */ -#define ARPHRD_FCPP 784 /* Point to point fibrechannel */ -#define ARPHRD_FCAL 785 /* Fibrechannel arbitrated loop */ -#define ARPHRD_FCPL 786 /* Fibrechannel public loop */ -#define ARPHRD_FCFABRIC 787 /* Fibrechannel fabric */ - /* 787->799 reserved for fibrechannel media types */ +#define ARPHRD_FCPP 784 /* Point to point fibrechannel */ +#define ARPHRD_FCAL 785 /* Fibrechannel arbitrated loop */ +#define ARPHRD_FCPL 786 /* Fibrechannel public loop */ +#define ARPHRD_FCFABRIC 787 /* Fibrechannel fabric */ + /* 787->799 reserved for fibrechannel media types */ #define ARPHRD_IEEE802_TR 800 /* Magic type ident for TR */ #define ARPHRD_IEEE80211 801 /* IEEE 802.11 */ #define ARPHRD_IEEE80211_PRISM 802 /* IEEE 802.11 + Prism2 header */ diff --git a/include/arch/x86_64/linux/if_bonding.h b/include/arch/x86_64/linux/if_bonding.h index 1c7b31ee..a72e9ce9 100644 --- a/include/arch/x86_64/linux/if_bonding.h +++ b/include/arch/x86_64/linux/if_bonding.h @@ -82,13 +82,11 @@ #define BOND_STATE_ACTIVE 0 /* link is active */ #define BOND_STATE_BACKUP 1 /* link is backup */ -#define BOND_DEFAULT_MAX_BONDS \ - 1 /* Default maximum number of devices to support */ +#define BOND_DEFAULT_MAX_BONDS 1 /* Default maximum number of devices to support */ #define BOND_DEFAULT_TX_QUEUES 16 /* Default number of tx queues per device */ -#define BOND_DEFAULT_RESEND_IGMP \ - 1 /* Default number of IGMP membership reports */ +#define BOND_DEFAULT_RESEND_IGMP 1 /* Default number of IGMP membership reports */ /* hashing types */ #define BOND_XMIT_POLICY_LAYER2 0 /* layer 2 (MAC only), default */ diff --git a/include/arch/x86_64/linux/if_bridge.h b/include/arch/x86_64/linux/if_bridge.h index 8650d78e..77db0e85 100644 --- a/include/arch/x86_64/linux/if_bridge.h +++ b/include/arch/x86_64/linux/if_bridge.h @@ -288,8 +288,7 @@ enum { __IFLA_BRIDGE_MRP_START_IN_TEST_MAX, }; -#define IFLA_BRIDGE_MRP_START_IN_TEST_MAX \ - (__IFLA_BRIDGE_MRP_START_IN_TEST_MAX - 1) +#define IFLA_BRIDGE_MRP_START_IN_TEST_MAX (__IFLA_BRIDGE_MRP_START_IN_TEST_MAX - 1) struct br_mrp_instance { __u32 ring_id; @@ -457,8 +456,7 @@ enum { __IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX, }; -#define IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX \ - (__IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX - 1) +#define IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX (__IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX - 1) enum { IFLA_BRIDGE_MST_UNSPEC, @@ -652,31 +650,17 @@ enum { #define MDBA_MDB_EATTR_MAX (__MDBA_MDB_EATTR_MAX - 1) /* per mdb entry source */ -enum { - MDBA_MDB_SRCLIST_UNSPEC, - MDBA_MDB_SRCLIST_ENTRY, - __MDBA_MDB_SRCLIST_MAX -}; +enum { MDBA_MDB_SRCLIST_UNSPEC, MDBA_MDB_SRCLIST_ENTRY, __MDBA_MDB_SRCLIST_MAX }; #define MDBA_MDB_SRCLIST_MAX (__MDBA_MDB_SRCLIST_MAX - 1) /* per mdb entry per source attributes * these are embedded in MDBA_MDB_SRCLIST_ENTRY */ -enum { - MDBA_MDB_SRCATTR_UNSPEC, - MDBA_MDB_SRCATTR_ADDRESS, - MDBA_MDB_SRCATTR_TIMER, - __MDBA_MDB_SRCATTR_MAX -}; +enum { MDBA_MDB_SRCATTR_UNSPEC, MDBA_MDB_SRCATTR_ADDRESS, MDBA_MDB_SRCATTR_TIMER, __MDBA_MDB_SRCATTR_MAX }; #define MDBA_MDB_SRCATTR_MAX (__MDBA_MDB_SRCATTR_MAX - 1) /* multicast router types */ -enum { - MDB_RTR_TYPE_DISABLED, - MDB_RTR_TYPE_TEMP_QUERY, - MDB_RTR_TYPE_PERM, - MDB_RTR_TYPE_TEMP -}; +enum { MDB_RTR_TYPE_DISABLED, MDB_RTR_TYPE_TEMP_QUERY, MDB_RTR_TYPE_PERM, MDB_RTR_TYPE_TEMP }; enum { MDBA_ROUTER_UNSPEC, diff --git a/include/arch/x86_64/linux/if_ether.h b/include/arch/x86_64/linux/if_ether.h index 6ead4a8d..0c8c6993 100644 --- a/include/arch/x86_64/linux/if_ether.h +++ b/include/arch/x86_64/linux/if_ether.h @@ -52,14 +52,14 @@ #define ETH_P_IP 0x0800 /* Internet Protocol packet */ #define ETH_P_X25 0x0805 /* CCITT X.25 */ #define ETH_P_ARP 0x0806 /* Address Resolution packet */ -#define ETH_P_BPQ \ - 0x08FF /* G8BPQ AX.25 Ethernet Packet [ NOT AN OFFICIALLY REGISTERED \ - ID ] */ +#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_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 */ @@ -113,28 +113,22 @@ #define ETH_P_IBOE 0x8915 /* Infiniband over Ethernet */ #define ETH_P_TDLS 0x890D /* TDLS */ #define ETH_P_FIP 0x8914 /* FCoE Initialization Protocol */ -#define ETH_P_80221 \ - 0x8917 /* IEEE 802.21 Media Independent Handover Protocol \ - */ +#define ETH_P_80221 \ + 0x8917 /* IEEE 802.21 Media Independent Handover Protocol \ + */ #define ETH_P_HSR 0x892F /* IEC 62439-3 HSRv1 */ #define ETH_P_NSH 0x894F /* Network Service Header */ #define ETH_P_LOOPBACK 0x9000 /* Ethernet loopback packet, per IEEE 802.3 */ -#define ETH_P_QINQ1 \ - 0x9100 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ -#define ETH_P_QINQ2 \ - 0x9200 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ -#define ETH_P_QINQ3 \ - 0x9300 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ -#define ETH_P_EDSA \ - 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */ -#define ETH_P_DSA_8021Q \ - 0xDADB /* Fake VLAN Header for DSA [ NOT AN OFFICIALLY REGISTERED ID ] \ - */ -#define ETH_P_DSA_A5PSW \ - 0xE001 /* A5PSW Tag Value [ NOT AN OFFICIALLY REGISTERED ID ] */ -#define ETH_P_IFE 0xED3E /* ForCES inter-FE LFB type */ -#define ETH_P_AF_IUCV \ - 0xFBFB /* IBM af_iucv [ NOT AN OFFICIALLY REGISTERED ID ] */ +#define ETH_P_QINQ1 0x9100 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ +#define ETH_P_QINQ2 0x9200 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ +#define ETH_P_QINQ3 0x9300 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ +#define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */ +#define ETH_P_DSA_8021Q \ + 0xDADB /* Fake VLAN Header for DSA [ NOT AN OFFICIALLY REGISTERED ID ] \ + */ +#define ETH_P_DSA_A5PSW 0xE001 /* A5PSW Tag Value [ NOT AN OFFICIALLY REGISTERED ID ] */ +#define ETH_P_IFE 0xED3E /* ForCES inter-FE LFB type */ +#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 more than this value \ diff --git a/include/arch/x86_64/linux/if_link.h b/include/arch/x86_64/linux/if_link.h index 05036500..fc3780fd 100644 --- a/include/arch/x86_64/linux/if_link.h +++ b/include/arch/x86_64/linux/if_link.h @@ -394,9 +394,7 @@ enum { }; /* backwards compatibility for userspace */ -#define IFLA_RTA(r) \ - ((struct rtattr *)(((char *)(r)) + \ - NLMSG_ALIGN(sizeof(struct ifinfomsg)))) +#define IFLA_RTA(r) ((struct rtattr *)(((char *)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg)))) #define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n, sizeof(struct ifinfomsg)) enum { @@ -1217,13 +1215,7 @@ enum { #define IFLA_MACSEC_MAX (__IFLA_MACSEC_MAX - 1) /* XFRM section */ -enum { - IFLA_XFRM_UNSPEC, - IFLA_XFRM_LINK, - IFLA_XFRM_IF_ID, - IFLA_XFRM_COLLECT_METADATA, - __IFLA_XFRM_MAX -}; +enum { IFLA_XFRM_UNSPEC, IFLA_XFRM_LINK, IFLA_XFRM_IF_ID, IFLA_XFRM_COLLECT_METADATA, __IFLA_XFRM_MAX }; #define IFLA_XFRM_MAX (__IFLA_XFRM_MAX - 1) @@ -1244,21 +1236,11 @@ enum macsec_offload { }; /* IPVLAN section */ -enum { - IFLA_IPVLAN_UNSPEC, - IFLA_IPVLAN_MODE, - IFLA_IPVLAN_FLAGS, - __IFLA_IPVLAN_MAX -}; +enum { IFLA_IPVLAN_UNSPEC, IFLA_IPVLAN_MODE, IFLA_IPVLAN_FLAGS, __IFLA_IPVLAN_MAX }; #define IFLA_IPVLAN_MAX (__IFLA_IPVLAN_MAX - 1) -enum ipvlan_mode { - IPVLAN_MODE_L2 = 0, - IPVLAN_MODE_L3, - IPVLAN_MODE_L3S, - IPVLAN_MODE_MAX -}; +enum ipvlan_mode { IPVLAN_MODE_L2 = 0, IPVLAN_MODE_L3, IPVLAN_MODE_L3S, IPVLAN_MODE_MAX }; #define IPVLAN_F_PRIVATE 0x01 #define IPVLAN_F_VEPA 0x02 @@ -1747,13 +1729,7 @@ struct ifla_port_vsi { /* IPoIB section */ -enum { - IFLA_IPOIB_UNSPEC, - IFLA_IPOIB_PKEY, - IFLA_IPOIB_MODE, - IFLA_IPOIB_UMCAST, - __IFLA_IPOIB_MAX -}; +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 */ @@ -1817,9 +1793,9 @@ enum { enum { IFLA_STATS_GETSET_UNSPEC, - IFLA_STATS_GET_FILTERS, /* Nest of IFLA_STATS_LINK_xxx, each a u32 with - * a filter mask for the corresponding group. - */ + IFLA_STATS_GET_FILTERS, /* Nest of IFLA_STATS_LINK_xxx, each a u32 with + * a filter mask for the corresponding group. + */ IFLA_STATS_SET_OFFLOAD_XSTATS_L3_STATS, /* 0 or 1 as u8 */ __IFLA_STATS_GETSET_MAX, }; @@ -1831,12 +1807,7 @@ enum { * -> [LINK_XSTATS_TYPE_xxx] * -> [rtnl link type specific attributes] */ -enum { - LINK_XSTATS_TYPE_UNSPEC, - LINK_XSTATS_TYPE_BRIDGE, - LINK_XSTATS_TYPE_BOND, - __LINK_XSTATS_TYPE_MAX -}; +enum { LINK_XSTATS_TYPE_UNSPEC, LINK_XSTATS_TYPE_BRIDGE, LINK_XSTATS_TYPE_BOND, __LINK_XSTATS_TYPE_MAX }; #define LINK_XSTATS_TYPE_MAX (__LINK_XSTATS_TYPE_MAX - 1) /* These are stats embedded into IFLA_STATS_LINK_OFFLOAD_XSTATS */ @@ -1855,8 +1826,7 @@ enum { IFLA_OFFLOAD_XSTATS_HW_S_INFO_USED, /* u8 */ __IFLA_OFFLOAD_XSTATS_HW_S_INFO_MAX, }; -#define IFLA_OFFLOAD_XSTATS_HW_S_INFO_MAX \ - (__IFLA_OFFLOAD_XSTATS_HW_S_INFO_MAX - 1) +#define IFLA_OFFLOAD_XSTATS_HW_S_INFO_MAX (__IFLA_OFFLOAD_XSTATS_HW_S_INFO_MAX - 1) /* XDP section */ @@ -1865,10 +1835,8 @@ enum { #define XDP_FLAGS_DRV_MODE (1U << 2) #define XDP_FLAGS_HW_MODE (1U << 3) #define XDP_FLAGS_REPLACE (1U << 4) -#define XDP_FLAGS_MODES \ - (XDP_FLAGS_SKB_MODE | XDP_FLAGS_DRV_MODE | XDP_FLAGS_HW_MODE) -#define XDP_FLAGS_MASK \ - (XDP_FLAGS_UPDATE_IF_NOEXIST | XDP_FLAGS_MODES | XDP_FLAGS_REPLACE) +#define XDP_FLAGS_MODES (XDP_FLAGS_SKB_MODE | XDP_FLAGS_DRV_MODE | XDP_FLAGS_HW_MODE) +#define XDP_FLAGS_MASK (XDP_FLAGS_UPDATE_IF_NOEXIST | XDP_FLAGS_MODES | XDP_FLAGS_REPLACE) /* These are stored into IFLA_XDP_ATTACHED on dump. */ enum { diff --git a/include/arch/x86_64/linux/if_macsec.h b/include/arch/x86_64/linux/if_macsec.h index 3693ef5b..9ec2c3d5 100644 --- a/include/arch/x86_64/linux/if_macsec.h +++ b/include/arch/x86_64/linux/if_macsec.h @@ -45,12 +45,12 @@ enum macsec_attrs { MACSEC_ATTR_RXSC_CONFIG, /* config, nested macsec_rxsc_attrs */ MACSEC_ATTR_SA_CONFIG, /* config, nested macsec_sa_attrs */ MACSEC_ATTR_SECY, /* dump, nested macsec_secy_attrs */ - MACSEC_ATTR_TXSA_LIST, /* dump, nested, macsec_sa_attrs for each TXSA */ - MACSEC_ATTR_RXSC_LIST, /* dump, nested, macsec_rxsc_attrs for each RXSC - */ - MACSEC_ATTR_TXSC_STATS, /* dump, nested, macsec_txsc_stats_attr */ - MACSEC_ATTR_SECY_STATS, /* dump, nested, macsec_secy_stats_attr */ - MACSEC_ATTR_OFFLOAD, /* config, nested, macsec_offload_attrs */ + MACSEC_ATTR_TXSA_LIST, /* dump, nested, macsec_sa_attrs for each TXSA */ + MACSEC_ATTR_RXSC_LIST, /* dump, nested, macsec_rxsc_attrs for each RXSC + */ + MACSEC_ATTR_TXSC_STATS, /* dump, nested, macsec_txsc_stats_attr */ + MACSEC_ATTR_SECY_STATS, /* dump, nested, macsec_secy_stats_attr */ + MACSEC_ATTR_OFFLOAD, /* config, nested, macsec_offload_attrs */ __MACSEC_ATTR_END, NUM_MACSEC_ATTR = __MACSEC_ATTR_END, MACSEC_ATTR_MAX = __MACSEC_ATTR_END - 1, diff --git a/include/arch/x86_64/linux/if_packet.h b/include/arch/x86_64/linux/if_packet.h index 2bd0e81b..f2da4164 100644 --- a/include/arch/x86_64/linux/if_packet.h +++ b/include/arch/x86_64/linux/if_packet.h @@ -145,10 +145,8 @@ struct tpacket_hdr { }; #define TPACKET_ALIGNMENT 16 -#define TPACKET_ALIGN(x) \ - (((x) + TPACKET_ALIGNMENT - 1) & ~(TPACKET_ALIGNMENT - 1)) -#define TPACKET_HDRLEN \ - (TPACKET_ALIGN(sizeof(struct tpacket_hdr)) + sizeof(struct sockaddr_ll)) +#define TPACKET_ALIGN(x) (((x) + TPACKET_ALIGNMENT - 1) & ~(TPACKET_ALIGNMENT - 1)) +#define TPACKET_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket_hdr)) + sizeof(struct sockaddr_ll)) struct tpacket2_hdr { __u32 tp_status; @@ -253,12 +251,8 @@ struct tpacket_block_desc { union tpacket_bd_header_u hdr; }; -#define TPACKET2_HDRLEN \ - (TPACKET_ALIGN(sizeof(struct tpacket2_hdr)) + \ - sizeof(struct sockaddr_ll)) -#define TPACKET3_HDRLEN \ - (TPACKET_ALIGN(sizeof(struct tpacket3_hdr)) + \ - sizeof(struct sockaddr_ll)) +#define TPACKET2_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket2_hdr)) + sizeof(struct sockaddr_ll)) +#define TPACKET3_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket3_hdr)) + sizeof(struct sockaddr_ll)) enum tpacket_versions { TPACKET_V1, TPACKET_V2, TPACKET_V3 }; diff --git a/include/arch/x86_64/linux/if_tunnel.h b/include/arch/x86_64/linux/if_tunnel.h index 3ca3becf..3464be57 100644 --- a/include/arch/x86_64/linux/if_tunnel.h +++ b/include/arch/x86_64/linux/if_tunnel.h @@ -184,9 +184,7 @@ enum { #define TUNNEL_ERSPAN_OPT __cpu_to_be16(0x4000) #define TUNNEL_GTP_OPT __cpu_to_be16(0x8000) -#define TUNNEL_OPTIONS_PRESENT \ - (TUNNEL_GENEVE_OPT | TUNNEL_VXLAN_OPT | TUNNEL_ERSPAN_OPT | \ - TUNNEL_GTP_OPT) +#define TUNNEL_OPTIONS_PRESENT (TUNNEL_GENEVE_OPT | TUNNEL_VXLAN_OPT | TUNNEL_ERSPAN_OPT | TUNNEL_GTP_OPT) enum { IP_TUNNEL_CSUM_BIT = 0U, diff --git a/include/arch/x86_64/linux/if_vlan.h b/include/arch/x86_64/linux/if_vlan.h index d47ff6b2..56207c88 100644 --- a/include/arch/x86_64/linux/if_vlan.h +++ b/include/arch/x86_64/linux/if_vlan.h @@ -28,7 +28,7 @@ enum vlan_ioctl_cmds { SET_VLAN_FLAG_CMD, GET_VLAN_REALDEV_NAME_CMD, /* If this works, you know it's a VLAN device, btw */ - GET_VLAN_VID_CMD /* Get the VID of this VLAN (specified by name) */ + GET_VLAN_VID_CMD /* Get the VID of this VLAN (specified by name) */ }; enum vlan_flags { @@ -40,9 +40,9 @@ enum vlan_flags { }; enum vlan_name_types { - VLAN_NAME_TYPE_PLUS_VID, /* Name will look like: vlan0005 */ - VLAN_NAME_TYPE_RAW_PLUS_VID, /* name will look like: eth1.0005 */ - VLAN_NAME_TYPE_PLUS_VID_NO_PAD, /* Name will look like: vlan5 */ + VLAN_NAME_TYPE_PLUS_VID, /* Name will look like: vlan0005 */ + VLAN_NAME_TYPE_RAW_PLUS_VID, /* name will look like: eth1.0005 */ + VLAN_NAME_TYPE_PLUS_VID_NO_PAD, /* Name will look like: vlan5 */ VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD, /* Name will look like: eth0.5 */ VLAN_NAME_TYPE_HIGHEST }; diff --git a/include/arch/x86_64/linux/if_xdp.h b/include/arch/x86_64/linux/if_xdp.h index 106794b1..2c24c870 100644 --- a/include/arch/x86_64/linux/if_xdp.h +++ b/include/arch/x86_64/linux/if_xdp.h @@ -97,7 +97,7 @@ struct xdp_statistics { __u64 rx_ring_full; /* Dropped due to rx ring being full */ __u64 rx_fill_ring_empty_descs; /* Failed to retrieve item from fill ring */ - __u64 tx_ring_empty_descs; /* Failed to retrieve item from tx ring */ + __u64 tx_ring_empty_descs; /* Failed to retrieve item from tx ring */ }; struct xdp_options { @@ -115,8 +115,7 @@ struct xdp_options { /* Masks for unaligned chunks mode */ #define XSK_UNALIGNED_BUF_OFFSET_SHIFT 48 -#define XSK_UNALIGNED_BUF_ADDR_MASK \ - ((1ULL << XSK_UNALIGNED_BUF_OFFSET_SHIFT) - 1) +#define XSK_UNALIGNED_BUF_ADDR_MASK ((1ULL << XSK_UNALIGNED_BUF_OFFSET_SHIFT) - 1) /* Request transmit timestamp. Upon completion, put it into tx_timestamp * field of struct xsk_tx_metadata. diff --git a/include/arch/x86_64/linux/ife.h b/include/arch/x86_64/linux/ife.h index bdd953c6..66e22428 100644 --- a/include/arch/x86_64/linux/ife.h +++ b/include/arch/x86_64/linux/ife.h @@ -4,14 +4,7 @@ #define IFE_METAHDRLEN 2 -enum { - IFE_META_SKBMARK = 1, - IFE_META_HASHID, - IFE_META_PRIO, - IFE_META_QMAP, - IFE_META_TCINDEX, - __IFE_META_MAX -}; +enum { IFE_META_SKBMARK = 1, IFE_META_HASHID, IFE_META_PRIO, IFE_META_QMAP, IFE_META_TCINDEX, __IFE_META_MAX }; /*Can be overridden at runtime by module option*/ #define IFE_META_MAX (__IFE_META_MAX - 1) diff --git a/include/arch/x86_64/linux/in.h b/include/arch/x86_64/linux/in.h index 9ada02e3..592f3048 100644 --- a/include/arch/x86_64/linux/in.h +++ b/include/arch/x86_64/linux/in.h @@ -207,8 +207,7 @@ struct ip_msfilter { }; }; -#define IP_MSFILTER_SIZE(numsrc) \ - (sizeof(struct ip_msfilter) - sizeof(__u32) + (numsrc) * sizeof(__u32)) +#define IP_MSFILTER_SIZE(numsrc) (sizeof(struct ip_msfilter) - sizeof(__u32) + (numsrc) * sizeof(__u32)) struct group_req { __u32 gr_interface; /* interface index */ @@ -224,34 +223,31 @@ struct group_source_req { struct group_filter { union { struct { - __u32 gf_interface_aux; /* interface index */ - struct __kernel_sockaddr_storage - gf_group_aux; /* multicast - address - */ - __u32 gf_fmode_aux; /* filter mode */ - __u32 gf_numsrc_aux; /* number of sources */ - struct __kernel_sockaddr_storage gf_slist[1]; /* interface - index - */ + __u32 gf_interface_aux; /* interface index */ + struct __kernel_sockaddr_storage gf_group_aux; /* multicast + address + */ + __u32 gf_fmode_aux; /* filter mode */ + __u32 gf_numsrc_aux; /* number of sources */ + struct __kernel_sockaddr_storage gf_slist[1]; /* interface + index + */ }; struct { - __u32 gf_interface; /* interface index */ - struct __kernel_sockaddr_storage gf_group; /* multicast - address */ - __u32 gf_fmode; /* filter mode */ - __u32 gf_numsrc; /* number of sources */ - struct __kernel_sockaddr_storage - gf_slist_flex[]; /* interface - index - */ + __u32 gf_interface; /* interface index */ + struct __kernel_sockaddr_storage gf_group; /* multicast + address */ + __u32 gf_fmode; /* filter mode */ + __u32 gf_numsrc; /* number of sources */ + struct __kernel_sockaddr_storage gf_slist_flex[]; /* interface + index + */ }; }; }; -#define GROUP_FILTER_SIZE(numsrc) \ - (sizeof(struct group_filter) - \ - sizeof(struct __kernel_sockaddr_storage) + \ +#define GROUP_FILTER_SIZE(numsrc) \ + (sizeof(struct group_filter) - sizeof(struct __kernel_sockaddr_storage) + \ (numsrc) * sizeof(struct __kernel_sockaddr_storage)) #endif @@ -272,8 +268,7 @@ struct sockaddr_in { struct in_addr sin_addr; /* Internet address */ /* Pad to size of `struct sockaddr'. */ - unsigned char __pad[__SOCK_SIZE__ - sizeof(short int) - - sizeof(unsigned short int) - sizeof(struct in_addr)]; + unsigned char __pad[__SOCK_SIZE__ - sizeof(short int) - sizeof(unsigned short int) - sizeof(struct in_addr)]; }; #define sin_zero __pad /* for BSD UNIX comp. -FvK */ #endif diff --git a/include/arch/x86_64/linux/inet_diag.h b/include/arch/x86_64/linux/inet_diag.h index 1aa0b207..fc25b00b 100644 --- a/include/arch/x86_64/linux/inet_diag.h +++ b/include/arch/x86_64/linux/inet_diag.h @@ -187,10 +187,9 @@ struct inet_diag_meminfo { /* INET_DIAG_SOCKOPT */ struct inet_diag_sockopt { - __u8 recverr : 1, is_icsk : 1, freebind : 1, hdrincl : 1, mc_loop : 1, - transparent : 1, mc_all : 1, nodefrag : 1; - __u8 bind_address_no_port : 1, recverr_rfc4884 : 1, defer_connect : 1, - unused : 5; + __u8 recverr : 1, is_icsk : 1, freebind : 1, hdrincl : 1, mc_loop : 1, transparent : 1, mc_all : 1, + nodefrag : 1; + __u8 bind_address_no_port : 1, recverr_rfc4884 : 1, defer_connect : 1, unused : 5; }; /* INET_DIAG_VEGASINFO */ diff --git a/include/arch/x86_64/linux/inotify.h b/include/arch/x86_64/linux/inotify.h index ce3d538c..193e9275 100644 --- a/include/arch/x86_64/linux/inotify.h +++ b/include/arch/x86_64/linux/inotify.h @@ -54,20 +54,18 @@ struct inotify_event { #define IN_DONT_FOLLOW 0x02000000 /* don't follow a sym link */ #define IN_EXCL_UNLINK 0x04000000 /* exclude events on unlinked objects */ #define IN_MASK_CREATE 0x10000000 /* only create watches */ -#define IN_MASK_ADD \ - 0x20000000 /* add to the mask of an already existing watch */ -#define IN_ISDIR 0x40000000 /* event occurred against dir */ -#define IN_ONESHOT 0x80000000 /* only send event once */ +#define IN_MASK_ADD 0x20000000 /* add to the mask of an already existing watch */ +#define IN_ISDIR 0x40000000 /* event occurred against dir */ +#define IN_ONESHOT 0x80000000 /* only send event once */ /* * All of the events - we build the list by hand so that we can add flags in * the future and not break backward compatibility. Apps will get only the * events that they originally wanted. Be sure to add new events here! */ -#define IN_ALL_EVENTS \ - (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE | \ - IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM | IN_MOVED_TO | \ - IN_DELETE | IN_CREATE | IN_DELETE_SELF | IN_MOVE_SELF) +#define IN_ALL_EVENTS \ + (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE | IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM | \ + IN_MOVED_TO | IN_DELETE | IN_CREATE | IN_DELETE_SELF | IN_MOVE_SELF) /* Flags for sys_inotify_init1. */ #define IN_CLOEXEC O_CLOEXEC diff --git a/include/arch/x86_64/linux/input-event-codes.h b/include/arch/x86_64/linux/input-event-codes.h index e357a68e..9df32082 100644 --- a/include/arch/x86_64/linux/input-event-codes.h +++ b/include/arch/x86_64/linux/input-event-codes.h @@ -622,21 +622,18 @@ #define KEY_ASSISTANT 0x247 /* AL Context-aware desktop assistant */ #define KEY_KBD_LAYOUT_NEXT 0x248 /* AC Next Keyboard Layout Select */ #define KEY_EMOJI_PICKER 0x249 /* Show/hide emoji picker (HUTRR101) */ -#define KEY_DICTATE \ - 0x24a /* Start or Stop Voice Dictation Session (HUTRR99) \ - */ -#define KEY_CAMERA_ACCESS_ENABLE \ - 0x24b /* Enables programmatic access to camera devices. (HUTRR72) */ -#define KEY_CAMERA_ACCESS_DISABLE \ - 0x24c /* Disables programmatic access to camera devices. (HUTRR72) */ +#define KEY_DICTATE \ + 0x24a /* Start or Stop Voice Dictation Session (HUTRR99) \ + */ +#define KEY_CAMERA_ACCESS_ENABLE 0x24b /* Enables programmatic access to camera devices. (HUTRR72) */ +#define KEY_CAMERA_ACCESS_DISABLE 0x24c /* Disables programmatic access to camera devices. (HUTRR72) */ #define KEY_CAMERA_ACCESS_TOGGLE \ 0x24d /* Toggles the current state of the camera access control. \ (HUTRR72) */ -#define KEY_ACCESSIBILITY \ - 0x24e /* Toggles the system bound accessibility UI/command (HUTRR116) \ - */ -#define KEY_DO_NOT_DISTURB \ - 0x24f /* Toggles the system-wide "Do Not Disturb" control (HUTRR94)*/ +#define KEY_ACCESSIBILITY \ + 0x24e /* Toggles the system bound accessibility UI/command (HUTRR116) \ + */ +#define KEY_DO_NOT_DISTURB 0x24f /* Toggles the system-wide "Do Not Disturb" control (HUTRR94)*/ #define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */ #define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */ @@ -928,9 +925,9 @@ #define SW_LID 0x00 /* set = lid shut */ #define SW_TABLET_MODE 0x01 /* set = tablet mode */ #define SW_HEADPHONE_INSERT 0x02 /* set = inserted */ -#define SW_RFKILL_ALL \ - 0x03 /* rfkill master switch, type "any" \ - set = radio enabled */ +#define SW_RFKILL_ALL \ + 0x03 /* rfkill master switch, type "any" \ + set = radio enabled */ #define SW_RADIO SW_RFKILL_ALL /* deprecated */ #define SW_MICROPHONE_INSERT 0x04 /* set = inserted */ #define SW_DOCK 0x05 /* set = plugged into dock */ @@ -939,13 +936,13 @@ #define SW_VIDEOOUT_INSERT 0x08 /* set = inserted */ #define SW_CAMERA_LENS_COVER 0x09 /* set = lens covered */ #define SW_KEYPAD_SLIDE 0x0a /* set = keypad slide out */ -#define SW_FRONT_PROXIMITY 0x0b /* set = front proximity sensor active */ -#define SW_ROTATE_LOCK 0x0c /* set = rotate locked/disabled */ -#define SW_LINEIN_INSERT 0x0d /* set = inserted */ -#define SW_MUTE_DEVICE 0x0e /* set = device disabled */ -#define SW_PEN_INSERTED 0x0f /* set = pen inserted */ -#define SW_MACHINE_COVER 0x10 /* set = cover closed */ -#define SW_USB_INSERT 0x11 /* set = USB audio device connected */ +#define SW_FRONT_PROXIMITY 0x0b /* set = front proximity sensor active */ +#define SW_ROTATE_LOCK 0x0c /* set = rotate locked/disabled */ +#define SW_LINEIN_INSERT 0x0d /* set = inserted */ +#define SW_MUTE_DEVICE 0x0e /* set = device disabled */ +#define SW_PEN_INSERTED 0x0f /* set = pen inserted */ +#define SW_MACHINE_COVER 0x10 /* set = cover closed */ +#define SW_USB_INSERT 0x11 /* set = USB audio device connected */ #define SW_MAX 0x11 #define SW_CNT (SW_MAX + 1) diff --git a/include/arch/x86_64/linux/input.h b/include/arch/x86_64/linux/input.h index eec04d61..94d893b1 100644 --- a/include/arch/x86_64/linux/input.h +++ b/include/arch/x86_64/linux/input.h @@ -23,8 +23,7 @@ */ struct input_event { -#if (__BITS_PER_LONG != 32 || !defined(__USE_TIME_BITS64)) && \ - !defined(__KERNEL__) +#if (__BITS_PER_LONG != 32 || !defined(__USE_TIME_BITS64)) && !defined(__KERNEL__) struct timeval time; #define input_event_sec time.tv_sec #define input_event_usec time.tv_usec @@ -138,12 +137,9 @@ struct input_mask { #define EVIOCSKEYCODE_V2 _IOW('E', 0x04, struct input_keymap_entry) #define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ -#define EVIOCGPHYS(len) \ - _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ -#define EVIOCGUNIQ(len) \ - _IOC(_IOC_READ, 'E', 0x08, len) /* get unique identifier */ -#define EVIOCGPROP(len) \ - _IOC(_IOC_READ, 'E', 0x09, len) /* get device properties */ +#define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ +#define EVIOCGUNIQ(len) _IOC(_IOC_READ, 'E', 0x08, len) /* get unique identifier */ +#define EVIOCGPROP(len) _IOC(_IOC_READ, 'E', 0x09, len) /* get device properties */ /** * EVIOCGMTSLOTS(len) - get MT slot values @@ -171,16 +167,12 @@ struct input_mask { */ #define EVIOCGMTSLOTS(len) _IOC(_IOC_READ, 'E', 0x0a, len) -#define EVIOCGKEY(len) \ - _IOC(_IOC_READ, 'E', 0x18, len) /* get global key state */ +#define EVIOCGKEY(len) _IOC(_IOC_READ, 'E', 0x18, len) /* get global key state */ #define EVIOCGLED(len) _IOC(_IOC_READ, 'E', 0x19, len) /* get all LEDs */ -#define EVIOCGSND(len) \ - _IOC(_IOC_READ, 'E', 0x1a, len) /* get all sounds status */ -#define EVIOCGSW(len) \ - _IOC(_IOC_READ, 'E', 0x1b, len) /* get all switch states */ +#define EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len) /* get all sounds status */ +#define EVIOCGSW(len) _IOC(_IOC_READ, 'E', 0x1b, len) /* get all switch states */ -#define EVIOCGBIT(ev, len) \ - _IOC(_IOC_READ, 'E', 0x20 + (ev), len) /* get event bits */ +#define EVIOCGBIT(ev, len) _IOC(_IOC_READ, 'E', 0x20 + (ev), len) /* get event bits */ #define EVIOCGABS(abs) \ _IOR('E', 0x40 + (abs), struct input_absinfo) /* get abs value/limits \ */ @@ -253,8 +245,7 @@ struct input_mask { */ #define EVIOCSMASK _IOW('E', 0x93, struct input_mask) /* Set event-masks */ -#define EVIOCSCLOCKID \ - _IOW('E', 0xa0, int) /* Set clockid to be used for timestamps */ +#define EVIOCSCLOCKID _IOW('E', 0xa0, int) /* Set clockid to be used for timestamps */ /* * IDs. diff --git a/include/arch/x86_64/linux/io_uring.h b/include/arch/x86_64/linux/io_uring.h index 8d1912b9..04171260 100644 --- a/include/arch/x86_64/linux/io_uring.h +++ b/include/arch/x86_64/linux/io_uring.h @@ -105,7 +105,7 @@ struct io_uring_sqe { __u64 __pad2[1]; }; struct { - __u64 attr_ptr; /* pointer to attribute information */ + __u64 attr_ptr; /* pointer to attribute information */ __u64 attr_type_mask; /* bit mask of attributes */ }; __u64 optval; @@ -317,10 +317,8 @@ enum io_uring_op { #define IORING_LINK_TIMEOUT_UPDATE (1U << 4) #define IORING_TIMEOUT_ETIME_SUCCESS (1U << 5) #define IORING_TIMEOUT_MULTISHOT (1U << 6) -#define IORING_TIMEOUT_CLOCK_MASK \ - (IORING_TIMEOUT_BOOTTIME | IORING_TIMEOUT_REALTIME) -#define IORING_TIMEOUT_UPDATE_MASK \ - (IORING_TIMEOUT_UPDATE | IORING_LINK_TIMEOUT_UPDATE) +#define IORING_TIMEOUT_CLOCK_MASK (IORING_TIMEOUT_BOOTTIME | IORING_TIMEOUT_REALTIME) +#define IORING_TIMEOUT_UPDATE_MASK (IORING_TIMEOUT_UPDATE | IORING_LINK_TIMEOUT_UPDATE) /* * sqe->splice_flags * extends splice(2) flags diff --git a/include/arch/x86_64/linux/ioam6.h b/include/arch/x86_64/linux/ioam6.h index 4f47fe83..86bccddb 100644 --- a/include/arch/x86_64/linux/ioam6.h +++ b/include/arch/x86_64/linux/ioam6.h @@ -50,22 +50,20 @@ struct ioam6_trace_hdr { __be32 type_be32; struct { - __u32 bit7 : 1, bit6 : 1, bit5 : 1, bit4 : 1, bit3 : 1, - bit2 : 1, bit1 : 1, bit0 : 1, - bit15 : 1, /* unused - */ - bit14 : 1, /* unused */ - bit13 : 1, /* unused */ - bit12 : 1, /* unused */ - bit11 : 1, bit10 : 1, bit9 : 1, bit8 : 1, - bit23 : 1, /* reserved */ - bit22 : 1, bit21 : 1, /* unused */ - bit20 : 1, /* unused */ - bit19 : 1, /* unused */ - bit18 : 1, /* unused */ - bit17 : 1, /* unused */ - bit16 : 1, /* unused */ - : 8; /* reserved */ + __u32 bit7 : 1, bit6 : 1, bit5 : 1, bit4 : 1, bit3 : 1, bit2 : 1, bit1 : 1, bit0 : 1, + bit15 : 1, /* unused + */ + bit14 : 1, /* unused */ + bit13 : 1, /* unused */ + bit12 : 1, /* unused */ + bit11 : 1, bit10 : 1, bit9 : 1, bit8 : 1, bit23 : 1, /* reserved */ + bit22 : 1, bit21 : 1, /* unused */ + bit20 : 1, /* unused */ + bit19 : 1, /* unused */ + bit18 : 1, /* unused */ + bit17 : 1, /* unused */ + bit16 : 1, /* unused */ + : 8; /* reserved */ } type; }; @@ -81,22 +79,20 @@ struct ioam6_trace_hdr { __be32 type_be32; struct { - __u32 bit0 : 1, bit1 : 1, bit2 : 1, bit3 : 1, bit4 : 1, - bit5 : 1, bit6 : 1, bit7 : 1, bit8 : 1, - bit9 : 1, bit10 : 1, bit11 : 1, - bit12 : 1, /* unused - */ - bit13 : 1, /* unused */ - bit14 : 1, /* unused */ - bit15 : 1, /* unused */ - bit16 : 1, /* unused */ - bit17 : 1, /* unused */ - bit18 : 1, /* unused */ - bit19 : 1, /* unused */ - bit20 : 1, /* unused */ - bit21 : 1, /* unused */ - bit22 : 1, bit23 : 1, /* reserved */ - : 8; /* reserved */ + __u32 bit0 : 1, bit1 : 1, bit2 : 1, bit3 : 1, bit4 : 1, bit5 : 1, bit6 : 1, bit7 : 1, bit8 : 1, + bit9 : 1, bit10 : 1, bit11 : 1, bit12 : 1, /* unused + */ + bit13 : 1, /* unused */ + bit14 : 1, /* unused */ + bit15 : 1, /* unused */ + bit16 : 1, /* unused */ + bit17 : 1, /* unused */ + bit18 : 1, /* unused */ + bit19 : 1, /* unused */ + bit20 : 1, /* unused */ + bit21 : 1, /* unused */ + bit22 : 1, bit23 : 1, /* reserved */ + : 8; /* reserved */ } type; }; diff --git a/include/arch/x86_64/linux/iommufd.h b/include/arch/x86_64/linux/iommufd.h index 76d0c918..1482dfe9 100644 --- a/include/arch/x86_64/linux/iommufd.h +++ b/include/arch/x86_64/linux/iommufd.h @@ -741,8 +741,7 @@ struct iommu_hwpt_set_dirty_tracking { __u32 hwpt_id; __u32 __reserved; }; -#define IOMMU_HWPT_SET_DIRTY_TRACKING \ - _IO(IOMMUFD_TYPE, IOMMUFD_CMD_HWPT_SET_DIRTY_TRACKING) +#define IOMMU_HWPT_SET_DIRTY_TRACKING _IO(IOMMUFD_TYPE, IOMMUFD_CMD_HWPT_SET_DIRTY_TRACKING) /** * enum iommufd_hwpt_get_dirty_bitmap_flags - Flags for getting dirty bits @@ -787,8 +786,7 @@ struct iommu_hwpt_get_dirty_bitmap { __aligned_u64 page_size; __aligned_u64 data; }; -#define IOMMU_HWPT_GET_DIRTY_BITMAP \ - _IO(IOMMUFD_TYPE, IOMMUFD_CMD_HWPT_GET_DIRTY_BITMAP) +#define IOMMU_HWPT_GET_DIRTY_BITMAP _IO(IOMMUFD_TYPE, IOMMUFD_CMD_HWPT_GET_DIRTY_BITMAP) /** * enum iommu_hwpt_invalidate_data_type - IOMMU HWPT Cache Invalidation @@ -1104,8 +1102,7 @@ struct iommu_ioas_change_process { __u32 __reserved; }; -#define IOMMU_IOAS_CHANGE_PROCESS \ - _IO(IOMMUFD_TYPE, IOMMUFD_CMD_IOAS_CHANGE_PROCESS) +#define IOMMU_IOAS_CHANGE_PROCESS _IO(IOMMUFD_TYPE, IOMMUFD_CMD_IOAS_CHANGE_PROCESS) /** * enum iommu_veventq_flag - flag for struct iommufd_vevent_header diff --git a/include/arch/x86_64/linux/ioprio.h b/include/arch/x86_64/linux/ioprio.h index 2a977d1d..0612b319 100644 --- a/include/arch/x86_64/linux/ioprio.h +++ b/include/arch/x86_64/linux/ioprio.h @@ -13,9 +13,8 @@ #define IOPRIO_CLASS_MASK (IOPRIO_NR_CLASSES - 1) #define IOPRIO_PRIO_MASK ((1UL << IOPRIO_CLASS_SHIFT) - 1) -#define IOPRIO_PRIO_CLASS(ioprio) \ - (((ioprio) >> IOPRIO_CLASS_SHIFT) & IOPRIO_CLASS_MASK) -#define IOPRIO_PRIO_DATA(ioprio) ((ioprio) & IOPRIO_PRIO_MASK) +#define IOPRIO_PRIO_CLASS(ioprio) (((ioprio) >> IOPRIO_CLASS_SHIFT) & IOPRIO_CLASS_MASK) +#define IOPRIO_PRIO_DATA(ioprio) ((ioprio) & IOPRIO_PRIO_MASK) /* * These are the io priority classes as implemented by the BFQ and mq-deadline @@ -70,12 +69,11 @@ enum { * without affecting the I/O scheduling ordering defined by the I/O priority * class and level. */ -#define IOPRIO_HINT_SHIFT IOPRIO_LEVEL_NR_BITS -#define IOPRIO_HINT_NR_BITS 10 -#define IOPRIO_NR_HINTS (1 << IOPRIO_HINT_NR_BITS) -#define IOPRIO_HINT_MASK (IOPRIO_NR_HINTS - 1) -#define IOPRIO_PRIO_HINT(ioprio) \ - (((ioprio) >> IOPRIO_HINT_SHIFT) & IOPRIO_HINT_MASK) +#define IOPRIO_HINT_SHIFT IOPRIO_LEVEL_NR_BITS +#define IOPRIO_HINT_NR_BITS 10 +#define IOPRIO_NR_HINTS (1 << IOPRIO_HINT_NR_BITS) +#define IOPRIO_HINT_MASK (IOPRIO_NR_HINTS - 1) +#define IOPRIO_PRIO_HINT(ioprio) (((ioprio) >> IOPRIO_HINT_SHIFT) & IOPRIO_HINT_MASK) /* * I/O hints. @@ -107,21 +105,16 @@ enum { /* * Return an I/O priority value based on a class, a level and a hint. */ -static __always_inline __u16 ioprio_value(int prioclass, int priolevel, - int priohint) +static __always_inline __u16 ioprio_value(int prioclass, int priolevel, int priohint) { - if (IOPRIO_BAD_VALUE(prioclass, IOPRIO_NR_CLASSES) || - IOPRIO_BAD_VALUE(priolevel, IOPRIO_NR_LEVELS) || + if (IOPRIO_BAD_VALUE(prioclass, IOPRIO_NR_CLASSES) || IOPRIO_BAD_VALUE(priolevel, IOPRIO_NR_LEVELS) || IOPRIO_BAD_VALUE(priohint, IOPRIO_NR_HINTS)) return IOPRIO_CLASS_INVALID << IOPRIO_CLASS_SHIFT; - return (prioclass << IOPRIO_CLASS_SHIFT) | - (priohint << IOPRIO_HINT_SHIFT) | priolevel; + return (prioclass << IOPRIO_CLASS_SHIFT) | (priohint << IOPRIO_HINT_SHIFT) | priolevel; } -#define IOPRIO_PRIO_VALUE(prioclass, priolevel) \ - ioprio_value(prioclass, priolevel, IOPRIO_HINT_NONE) -#define IOPRIO_PRIO_VALUE_HINT(prioclass, priolevel, priohint) \ - ioprio_value(prioclass, priolevel, priohint) +#define IOPRIO_PRIO_VALUE(prioclass, priolevel) ioprio_value(prioclass, priolevel, IOPRIO_HINT_NONE) +#define IOPRIO_PRIO_VALUE_HINT(prioclass, priolevel, priohint) ioprio_value(prioclass, priolevel, priohint) #endif /* _LINUX_IOPRIO_H */ diff --git a/include/arch/x86_64/linux/ip.h b/include/arch/x86_64/linux/ip.h index d48ff48c..cd83b348 100644 --- a/include/arch/x86_64/linux/ip.h +++ b/include/arch/x86_64/linux/ip.h @@ -98,8 +98,7 @@ struct iphdr { __u8 ttl; __u8 protocol; __sum16 check; - __struct_group(/* no tag */, addrs, /* no attrs */, __be32 saddr; - __be32 daddr;); + __struct_group(/* no tag */, addrs, /* no attrs */, __be32 saddr; __be32 daddr;); /*The options start here. */ }; diff --git a/include/arch/x86_64/linux/ip_vs.h b/include/arch/x86_64/linux/ip_vs.h index c46511c8..58dbe574 100644 --- a/include/arch/x86_64/linux/ip_vs.h +++ b/include/arch/x86_64/linux/ip_vs.h @@ -10,8 +10,7 @@ #include /* For __beXX types in userland */ #define IP_VS_VERSION_CODE 0x010201 -#define NVERSION(version) \ - (version >> 16) & 0xFF, (version >> 8) & 0xFF, version & 0xFF +#define NVERSION(version) (version >> 16) & 0xFF, (version >> 8) & 0xFF, version & 0xFF /* * Virtual Service Flags @@ -94,22 +93,18 @@ #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_SEQ_MASK | \ +#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_SEQ_MASK | \ IP_VS_CONN_F_NO_CPORT | 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) +#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 */ /* Connection flags from destination that can be changed by user space */ -#define IP_VS_CONN_F_DEST_MASK \ - (IP_VS_CONN_F_FWD_MASK | IP_VS_CONN_F_ONE_PACKET | IP_VS_CONN_F_NFCT | \ - 0) +#define IP_VS_CONN_F_DEST_MASK (IP_VS_CONN_F_FWD_MASK | IP_VS_CONN_F_ONE_PACKET | IP_VS_CONN_F_NFCT | 0) #define IP_VS_SCHEDNAME_MAXLEN 16 #define IP_VS_PENAME_MAXLEN 16 diff --git a/include/arch/x86_64/linux/ipmi.h b/include/arch/x86_64/linux/ipmi.h index 9385b8a4..2021a896 100644 --- a/include/arch/x86_64/linux/ipmi.h +++ b/include/arch/x86_64/linux/ipmi.h @@ -277,8 +277,7 @@ struct ipmi_req_settime { * - EMSGSIZE - The message to was too large. * - ENOMEM - Buffers could not be allocated for the command. */ -#define IPMICTL_SEND_COMMAND_SETTIME \ - _IOR(IPMI_IOC_MAGIC, 21, struct ipmi_req_settime) +#define IPMICTL_SEND_COMMAND_SETTIME _IOR(IPMI_IOC_MAGIC, 21, struct ipmi_req_settime) /* Messages received from the interface are this format. */ struct ipmi_recv { @@ -363,15 +362,13 @@ struct ipmi_cmdspec_chans { * - EBUSY - One of the netfn/cmd/chans supplied was already in use. * - ENOMEM - could not allocate memory for the entry. */ -#define IPMICTL_REGISTER_FOR_CMD_CHANS \ - _IOR(IPMI_IOC_MAGIC, 28, struct ipmi_cmdspec_chans) +#define IPMICTL_REGISTER_FOR_CMD_CHANS _IOR(IPMI_IOC_MAGIC, 28, struct ipmi_cmdspec_chans) /* * Unregister some netfn/cmd/chans. error values: * - EFAULT - an address supplied was invalid. * - ENOENT - None of the netfn/cmd/chans were found registered for this user. */ -#define IPMICTL_UNREGISTER_FOR_CMD_CHANS \ - _IOR(IPMI_IOC_MAGIC, 29, struct ipmi_cmdspec_chans) +#define IPMICTL_UNREGISTER_FOR_CMD_CHANS _IOR(IPMI_IOC_MAGIC, 29, struct ipmi_cmdspec_chans) /* * Set whether this interface receives events. Note that the first @@ -393,14 +390,10 @@ struct ipmi_channel_lun_address_set { unsigned short channel; unsigned char value; }; -#define IPMICTL_SET_MY_CHANNEL_ADDRESS_CMD \ - _IOR(IPMI_IOC_MAGIC, 24, struct ipmi_channel_lun_address_set) -#define IPMICTL_GET_MY_CHANNEL_ADDRESS_CMD \ - _IOR(IPMI_IOC_MAGIC, 25, struct ipmi_channel_lun_address_set) -#define IPMICTL_SET_MY_CHANNEL_LUN_CMD \ - _IOR(IPMI_IOC_MAGIC, 26, struct ipmi_channel_lun_address_set) -#define IPMICTL_GET_MY_CHANNEL_LUN_CMD \ - _IOR(IPMI_IOC_MAGIC, 27, struct ipmi_channel_lun_address_set) +#define IPMICTL_SET_MY_CHANNEL_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC, 24, struct ipmi_channel_lun_address_set) +#define IPMICTL_GET_MY_CHANNEL_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC, 25, struct ipmi_channel_lun_address_set) +#define IPMICTL_SET_MY_CHANNEL_LUN_CMD _IOR(IPMI_IOC_MAGIC, 26, struct ipmi_channel_lun_address_set) +#define IPMICTL_GET_MY_CHANNEL_LUN_CMD _IOR(IPMI_IOC_MAGIC, 27, struct ipmi_channel_lun_address_set) /* Legacy interfaces, these only set IPMB 0. */ #define IPMICTL_SET_MY_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC, 17, unsigned int) #define IPMICTL_GET_MY_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC, 18, unsigned int) @@ -415,10 +408,8 @@ struct ipmi_timing_parms { int retries; unsigned int retry_time_ms; }; -#define IPMICTL_SET_TIMING_PARMS_CMD \ - _IOR(IPMI_IOC_MAGIC, 22, struct ipmi_timing_parms) -#define IPMICTL_GET_TIMING_PARMS_CMD \ - _IOR(IPMI_IOC_MAGIC, 23, struct ipmi_timing_parms) +#define IPMICTL_SET_TIMING_PARMS_CMD _IOR(IPMI_IOC_MAGIC, 22, struct ipmi_timing_parms) +#define IPMICTL_GET_TIMING_PARMS_CMD _IOR(IPMI_IOC_MAGIC, 23, struct ipmi_timing_parms) /* * Set the maintenance mode. See ipmi_set_maintenance_mode() above diff --git a/include/arch/x86_64/linux/ipsec.h b/include/arch/x86_64/linux/ipsec.h index f931451b..2a7782de 100644 --- a/include/arch/x86_64/linux/ipsec.h +++ b/include/arch/x86_64/linux/ipsec.h @@ -35,12 +35,7 @@ enum { IPSEC_POLICY_BYPASS = 4 }; -enum { - IPSEC_LEVEL_DEFAULT = 0, - IPSEC_LEVEL_USE = 1, - IPSEC_LEVEL_REQUIRE = 2, - IPSEC_LEVEL_UNIQUE = 3 -}; +enum { IPSEC_LEVEL_DEFAULT = 0, IPSEC_LEVEL_USE = 1, IPSEC_LEVEL_REQUIRE = 2, IPSEC_LEVEL_UNIQUE = 3 }; #define IPSEC_MANUAL_REQID_MAX 0x3fff diff --git a/include/arch/x86_64/linux/ipv6.h b/include/arch/x86_64/linux/ipv6.h index 1de88086..83f39254 100644 --- a/include/arch/x86_64/linux/ipv6.h +++ b/include/arch/x86_64/linux/ipv6.h @@ -128,9 +128,7 @@ struct ipv6hdr { __u8 nexthdr; __u8 hop_limit; - __struct_group(/* no tag */, addrs, /* no attrs */, - struct in6_addr saddr; - struct in6_addr daddr;); + __struct_group(/* no tag */, addrs, /* no attrs */, struct in6_addr saddr; struct in6_addr daddr;); }; /* index values for the variables in ipv6_devconf */ diff --git a/include/arch/x86_64/linux/isdn/capicmd.h b/include/arch/x86_64/linux/isdn/capicmd.h index 08b2e2e5..66dd2864 100644 --- a/include/arch/x86_64/linux/isdn/capicmd.h +++ b/include/arch/x86_64/linux/isdn/capicmd.h @@ -77,10 +77,8 @@ #define CAPI_CONNECT_B3_IND CAPICMD(CAPI_CONNECT_B3, CAPI_IND) #define CAPI_CONNECT_B3_RESP CAPICMD(CAPI_CONNECT_B3, CAPI_RESP) -#define CAPI_CONNECT_B3_T90_ACTIVE_IND \ - CAPICMD(CAPI_CONNECT_B3_T90_ACTIVE, CAPI_IND) -#define CAPI_CONNECT_B3_T90_ACTIVE_RESP \ - CAPICMD(CAPI_CONNECT_B3_T90_ACTIVE, CAPI_RESP) +#define CAPI_CONNECT_B3_T90_ACTIVE_IND CAPICMD(CAPI_CONNECT_B3_T90_ACTIVE, CAPI_IND) +#define CAPI_CONNECT_B3_T90_ACTIVE_RESP CAPICMD(CAPI_CONNECT_B3_T90_ACTIVE, CAPI_RESP) #define CAPI_DATA_B3_REQ CAPICMD(CAPI_DATA_B3, CAPI_REQ) #define CAPI_DATA_B3_CONF CAPICMD(CAPI_DATA_B3, CAPI_CONF) diff --git a/include/arch/x86_64/linux/isst_if.h b/include/arch/x86_64/linux/isst_if.h index 680124f3..64d7ca29 100644 --- a/include/arch/x86_64/linux/isst_if.h +++ b/include/arch/x86_64/linux/isst_if.h @@ -475,39 +475,26 @@ struct isst_turbo_freq_info { __u16 trl_freq_mhz[TRL_MAX_LEVELS][TRL_MAX_BUCKETS]; }; -#define ISST_IF_MAGIC 0xFE -#define ISST_IF_GET_PLATFORM_INFO \ - _IOR(ISST_IF_MAGIC, 0, struct isst_if_platform_info *) -#define ISST_IF_GET_PHY_ID _IOWR(ISST_IF_MAGIC, 1, struct isst_if_cpu_map *) -#define ISST_IF_IO_CMD _IOW(ISST_IF_MAGIC, 2, struct isst_if_io_regs *) -#define ISST_IF_MBOX_COMMAND _IOWR(ISST_IF_MAGIC, 3, struct isst_if_mbox_cmds *) -#define ISST_IF_MSR_COMMAND _IOWR(ISST_IF_MAGIC, 4, struct isst_if_msr_cmds *) +#define ISST_IF_MAGIC 0xFE +#define ISST_IF_GET_PLATFORM_INFO _IOR(ISST_IF_MAGIC, 0, struct isst_if_platform_info *) +#define ISST_IF_GET_PHY_ID _IOWR(ISST_IF_MAGIC, 1, struct isst_if_cpu_map *) +#define ISST_IF_IO_CMD _IOW(ISST_IF_MAGIC, 2, struct isst_if_io_regs *) +#define ISST_IF_MBOX_COMMAND _IOWR(ISST_IF_MAGIC, 3, struct isst_if_mbox_cmds *) +#define ISST_IF_MSR_COMMAND _IOWR(ISST_IF_MAGIC, 4, struct isst_if_msr_cmds *) -#define ISST_IF_COUNT_TPMI_INSTANCES \ - _IOR(ISST_IF_MAGIC, 5, struct isst_tpmi_instance_count *) -#define ISST_IF_CORE_POWER_STATE \ - _IOWR(ISST_IF_MAGIC, 6, struct isst_core_power *) -#define ISST_IF_CLOS_PARAM _IOWR(ISST_IF_MAGIC, 7, struct isst_clos_param *) -#define ISST_IF_CLOS_ASSOC \ - _IOWR(ISST_IF_MAGIC, 8, struct isst_if_clos_assoc_cmds *) +#define ISST_IF_COUNT_TPMI_INSTANCES _IOR(ISST_IF_MAGIC, 5, struct isst_tpmi_instance_count *) +#define ISST_IF_CORE_POWER_STATE _IOWR(ISST_IF_MAGIC, 6, struct isst_core_power *) +#define ISST_IF_CLOS_PARAM _IOWR(ISST_IF_MAGIC, 7, struct isst_clos_param *) +#define ISST_IF_CLOS_ASSOC _IOWR(ISST_IF_MAGIC, 8, struct isst_if_clos_assoc_cmds *) -#define ISST_IF_PERF_LEVELS \ - _IOWR(ISST_IF_MAGIC, 9, struct isst_perf_level_info *) -#define ISST_IF_PERF_SET_LEVEL \ - _IOW(ISST_IF_MAGIC, 10, struct isst_perf_level_control *) -#define ISST_IF_PERF_SET_FEATURE \ - _IOW(ISST_IF_MAGIC, 11, struct isst_perf_feature_control *) -#define ISST_IF_GET_PERF_LEVEL_INFO \ - _IOR(ISST_IF_MAGIC, 12, struct isst_perf_level_data_info *) -#define ISST_IF_GET_PERF_LEVEL_CPU_MASK \ - _IOR(ISST_IF_MAGIC, 13, struct isst_perf_level_cpu_mask *) -#define ISST_IF_GET_BASE_FREQ_INFO \ - _IOR(ISST_IF_MAGIC, 14, struct isst_base_freq_info *) -#define ISST_IF_GET_BASE_FREQ_CPU_MASK \ - _IOR(ISST_IF_MAGIC, 15, struct isst_perf_level_cpu_mask *) -#define ISST_IF_GET_TURBO_FREQ_INFO \ - _IOR(ISST_IF_MAGIC, 16, struct isst_turbo_freq_info *) -#define ISST_IF_GET_PERF_LEVEL_FABRIC_INFO \ - _IOR(ISST_IF_MAGIC, 17, struct isst_perf_level_fabric_info *) +#define ISST_IF_PERF_LEVELS _IOWR(ISST_IF_MAGIC, 9, struct isst_perf_level_info *) +#define ISST_IF_PERF_SET_LEVEL _IOW(ISST_IF_MAGIC, 10, struct isst_perf_level_control *) +#define ISST_IF_PERF_SET_FEATURE _IOW(ISST_IF_MAGIC, 11, struct isst_perf_feature_control *) +#define ISST_IF_GET_PERF_LEVEL_INFO _IOR(ISST_IF_MAGIC, 12, struct isst_perf_level_data_info *) +#define ISST_IF_GET_PERF_LEVEL_CPU_MASK _IOR(ISST_IF_MAGIC, 13, struct isst_perf_level_cpu_mask *) +#define ISST_IF_GET_BASE_FREQ_INFO _IOR(ISST_IF_MAGIC, 14, struct isst_base_freq_info *) +#define ISST_IF_GET_BASE_FREQ_CPU_MASK _IOR(ISST_IF_MAGIC, 15, struct isst_perf_level_cpu_mask *) +#define ISST_IF_GET_TURBO_FREQ_INFO _IOR(ISST_IF_MAGIC, 16, struct isst_turbo_freq_info *) +#define ISST_IF_GET_PERF_LEVEL_FABRIC_INFO _IOR(ISST_IF_MAGIC, 17, struct isst_perf_level_fabric_info *) #endif diff --git a/include/arch/x86_64/linux/ivtv.h b/include/arch/x86_64/linux/ivtv.h index f2d0abf8..62740bb7 100644 --- a/include/arch/x86_64/linux/ivtv.h +++ b/include/arch/x86_64/linux/ivtv.h @@ -49,18 +49,17 @@ struct ivtv_dma_frame { enum v4l2_buf_type type; /* V4L2_BUF_TYPE_VIDEO_OUTPUT */ __u32 pixelformat; /* 0 == same as destination */ - void *y_source; /* if NULL and type == V4L2_BUF_TYPE_VIDEO_OUTPUT, - then just switch to user DMA YUV output mode - */ - void *uv_source; /* Unused for RGB pixelformats */ + void *y_source; /* if NULL and type == V4L2_BUF_TYPE_VIDEO_OUTPUT, + then just switch to user DMA YUV output mode + */ + void *uv_source; /* Unused for RGB pixelformats */ struct v4l2_rect src; struct v4l2_rect dst; __u32 src_width; __u32 src_height; }; -#define IVTV_IOC_DMA_FRAME \ - _IOW('V', BASE_VIDIOC_PRIVATE + 0, struct ivtv_dma_frame) +#define IVTV_IOC_DMA_FRAME _IOW('V', BASE_VIDIOC_PRIVATE + 0, struct ivtv_dma_frame) /* Select the passthrough mode (if the argument is non-zero). In the passthrough mode the output of the encoder is passed immediately into the decoder. */ diff --git a/include/arch/x86_64/linux/ivtvfb.h b/include/arch/x86_64/linux/ivtvfb.h index 3155e010..4abcaedc 100644 --- a/include/arch/x86_64/linux/ivtvfb.h +++ b/include/arch/x86_64/linux/ivtvfb.h @@ -32,7 +32,6 @@ struct ivtvfb_dma_frame { int count; }; -#define IVTVFB_IOC_DMA_FRAME \ - _IOW('V', BASE_VIDIOC_PRIVATE + 0, struct ivtvfb_dma_frame) +#define IVTVFB_IOC_DMA_FRAME _IOW('V', BASE_VIDIOC_PRIVATE + 0, struct ivtvfb_dma_frame) #endif diff --git a/include/arch/x86_64/linux/jffs2.h b/include/arch/x86_64/linux/jffs2.h index af24fefd..dee8d3e0 100644 --- a/include/arch/x86_64/linux/jffs2.h +++ b/include/arch/x86_64/linux/jffs2.h @@ -47,8 +47,7 @@ #define JFFS2_COMPR_ZLIB 0x06 #define JFFS2_COMPR_LZO 0x07 /* Compatibility flags. */ -#define JFFS2_COMPAT_MASK \ - 0xc000 /* What do to if an unknown nodetype is found */ +#define JFFS2_COMPAT_MASK 0xc000 /* What do to if an unknown nodetype is found */ #define JFFS2_NODE_ACCURATE 0x2000 /* INCOMPAT: Fail to mount the filesystem */ #define JFFS2_FEATURE_INCOMPAT 0xc000 @@ -59,15 +58,12 @@ /* RWCOMPAT_DELETE: Mount read/write, and delete the node when it's GC'd */ #define JFFS2_FEATURE_RWCOMPAT_DELETE 0x0000 -#define JFFS2_NODETYPE_DIRENT (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 1) -#define JFFS2_NODETYPE_INODE (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 2) -#define JFFS2_NODETYPE_CLEANMARKER \ - (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 3) -#define JFFS2_NODETYPE_PADDING \ - (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 4) +#define JFFS2_NODETYPE_DIRENT (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 1) +#define JFFS2_NODETYPE_INODE (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 2) +#define JFFS2_NODETYPE_CLEANMARKER (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 3) +#define JFFS2_NODETYPE_PADDING (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 4) -#define JFFS2_NODETYPE_SUMMARY \ - (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 6) +#define JFFS2_NODETYPE_SUMMARY (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 6) #define JFFS2_NODETYPE_XATTR (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 8) #define JFFS2_NODETYPE_XREF (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 9) diff --git a/include/arch/x86_64/linux/joystick.h b/include/arch/x86_64/linux/joystick.h index 6d607c18..8f09200d 100644 --- a/include/arch/x86_64/linux/joystick.h +++ b/include/arch/x86_64/linux/joystick.h @@ -52,10 +52,9 @@ struct js_event { #define JSIOCGVERSION _IOR('j', 0x01, __u32) /* get driver version */ -#define JSIOCGAXES _IOR('j', 0x11, __u8) /* get number of axes */ -#define JSIOCGBUTTONS _IOR('j', 0x12, __u8) /* get number of buttons */ -#define JSIOCGNAME(len) \ - _IOC(_IOC_READ, 'j', 0x13, len) /* get identifier string */ +#define JSIOCGAXES _IOR('j', 0x11, __u8) /* get number of axes */ +#define JSIOCGBUTTONS _IOR('j', 0x12, __u8) /* get number of buttons */ +#define JSIOCGNAME(len) _IOC(_IOC_READ, 'j', 0x13, len) /* get identifier string */ #define JSIOCSCORR _IOW('j', 0x21, struct js_corr) /* set correction values */ #define JSIOCGCORR _IOR('j', 0x22, struct js_corr) /* get correction values */ diff --git a/include/arch/x86_64/linux/kd.h b/include/arch/x86_64/linux/kd.h index aa77a91b..1b165c01 100644 --- a/include/arch/x86_64/linux/kd.h +++ b/include/arch/x86_64/linux/kd.h @@ -130,7 +130,7 @@ struct kbdiacruc { unsigned int diacr, base, result; }; struct kbdiacrsuc { - unsigned int kb_cnt; /* number of entries in following array */ + unsigned int kb_cnt; /* number of entries in following array */ struct kbdiacruc kbdiacruc[256]; /* MAX_DIACR from keyboard.h */ }; #define KDGKBDIACRUC 0x4BFA /* read kernel accent table - UCS */ @@ -174,16 +174,14 @@ struct console_font { */ }; -#define KD_FONT_OP_SET 0 /* Set font */ -#define KD_FONT_OP_GET 1 /* Get font */ -#define KD_FONT_OP_SET_DEFAULT \ - 2 /* Set font to default, data points to name / NULL */ -#define KD_FONT_OP_COPY 3 /* Obsolete, do not use */ -#define KD_FONT_OP_SET_TALL 4 /* Set font with vpitch = height */ -#define KD_FONT_OP_GET_TALL 5 /* Get font with vpitch = height */ +#define KD_FONT_OP_SET 0 /* Set font */ +#define KD_FONT_OP_GET 1 /* Get font */ +#define KD_FONT_OP_SET_DEFAULT 2 /* Set font to default, data points to name / NULL */ +#define KD_FONT_OP_COPY 3 /* Obsolete, do not use */ +#define KD_FONT_OP_SET_TALL 4 /* Set font with vpitch = height */ +#define KD_FONT_OP_GET_TALL 5 /* Get font with vpitch = height */ -#define KD_FONT_FLAG_DONT_RECALC \ - 1 /* Don't recalculate hw charcell size [compat] */ +#define KD_FONT_FLAG_DONT_RECALC 1 /* Don't recalculate hw charcell size [compat] */ /* note: 0x4B00-0x4B4E all have had a value at some time; don't reuse for the time being */ diff --git a/include/arch/x86_64/linux/keyctl.h b/include/arch/x86_64/linux/keyctl.h index eb9750e9..0d598cd3 100644 --- a/include/arch/x86_64/linux/keyctl.h +++ b/include/arch/x86_64/linux/keyctl.h @@ -24,14 +24,12 @@ -3 /* - key ID for session-specific keyring \ */ #define KEY_SPEC_USER_KEYRING -4 /* - key ID for UID-specific keyring */ -#define KEY_SPEC_USER_SESSION_KEYRING \ - -5 /* - key ID for UID-session keyring \ - */ -#define KEY_SPEC_GROUP_KEYRING -6 /* - key ID for GID-specific keyring */ -#define KEY_SPEC_REQKEY_AUTH_KEY \ - -7 /* - key ID for assumed request_key auth key */ -#define KEY_SPEC_REQUESTOR_KEYRING \ - -8 /* - key ID for request_key() dest keyring */ +#define KEY_SPEC_USER_SESSION_KEYRING \ + -5 /* - key ID for UID-session keyring \ + */ +#define KEY_SPEC_GROUP_KEYRING -6 /* - key ID for GID-specific keyring */ +#define KEY_SPEC_REQKEY_AUTH_KEY -7 /* - key ID for assumed request_key auth key */ +#define KEY_SPEC_REQUESTOR_KEYRING -8 /* - key ID for request_key() dest keyring */ /* request-key default keyrings */ #define KEY_REQKEY_DEFL_NO_CHANGE -1 @@ -65,25 +63,23 @@ #define KEYCTL_SET_TIMEOUT 15 /* set key timeout */ #define KEYCTL_ASSUME_AUTHORITY 16 /* assume request_key() authorisation */ #define KEYCTL_GET_SECURITY 17 /* get key security label */ -#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 */ -#define KEYCTL_GET_PERSISTENT 22 /* get a user's persistent keyring */ -#define KEYCTL_DH_COMPUTE 23 /* Compute Diffie-Hellman values */ -#define KEYCTL_PKEY_QUERY 24 /* Query public key parameters */ -#define KEYCTL_PKEY_ENCRYPT 25 /* Encrypt a blob using a public key */ -#define KEYCTL_PKEY_DECRYPT 26 /* Decrypt a blob using a public key */ -#define KEYCTL_PKEY_SIGN 27 /* Create a public key signature */ -#define KEYCTL_PKEY_VERIFY 28 /* Verify a public key signature */ -#define KEYCTL_RESTRICT_KEYRING \ - 29 /* Restrict keys allowed to link to a keyring */ -#define KEYCTL_MOVE 30 /* Move keys between keyrings */ -#define KEYCTL_CAPABILITIES 31 /* Find capabilities of keyrings subsystem */ -#define KEYCTL_WATCH_KEY 32 /* Watch a key or ring of keys for changes */ +#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 */ +#define KEYCTL_GET_PERSISTENT 22 /* get a user's persistent keyring */ +#define KEYCTL_DH_COMPUTE 23 /* Compute Diffie-Hellman values */ +#define KEYCTL_PKEY_QUERY 24 /* Query public key parameters */ +#define KEYCTL_PKEY_ENCRYPT 25 /* Encrypt a blob using a public key */ +#define KEYCTL_PKEY_DECRYPT 26 /* Decrypt a blob using a public key */ +#define KEYCTL_PKEY_SIGN 27 /* Create a public key signature */ +#define KEYCTL_PKEY_VERIFY 28 /* Verify a public key signature */ +#define KEYCTL_RESTRICT_KEYRING 29 /* Restrict keys allowed to link to a keyring */ +#define KEYCTL_MOVE 30 /* Move keys between keyrings */ +#define KEYCTL_CAPABILITIES 31 /* Find capabilities of keyrings subsystem */ +#define KEYCTL_WATCH_KEY 32 /* Watch a key or ring of keys for changes */ /* keyctl structures */ struct keyctl_dh_params { @@ -136,22 +132,17 @@ struct keyctl_pkey_params { * each integer can carry up to 8 flags. */ #define KEYCTL_CAPS0_CAPABILITIES 0x01 /* KEYCTL_CAPABILITIES supported */ -#define KEYCTL_CAPS0_PERSISTENT_KEYRINGS \ - 0x02 /* Persistent keyrings enabled \ - */ -#define KEYCTL_CAPS0_DIFFIE_HELLMAN \ - 0x04 /* Diffie-Hellman computation enabled */ -#define KEYCTL_CAPS0_PUBLIC_KEY 0x08 /* Public key ops enabled */ -#define KEYCTL_CAPS0_BIG_KEY 0x10 /* big_key-type enabled */ -#define KEYCTL_CAPS0_INVALIDATE 0x20 /* KEYCTL_INVALIDATE supported */ -#define KEYCTL_CAPS0_RESTRICT_KEYRING \ - 0x40 /* KEYCTL_RESTRICT_KEYRING supported */ -#define KEYCTL_CAPS0_MOVE 0x80 /* KEYCTL_MOVE supported */ -#define KEYCTL_CAPS1_NS_KEYRING_NAME \ - 0x01 /* Keyring names are per-user_namespace */ -#define KEYCTL_CAPS1_NS_KEY_TAG \ - 0x02 /* Key indexing can include a namespace tag */ -#define KEYCTL_CAPS1_NOTIFICATIONS \ - 0x04 /* Keys generate watchable notifications */ +#define KEYCTL_CAPS0_PERSISTENT_KEYRINGS \ + 0x02 /* Persistent keyrings enabled \ + */ +#define KEYCTL_CAPS0_DIFFIE_HELLMAN 0x04 /* Diffie-Hellman computation enabled */ +#define KEYCTL_CAPS0_PUBLIC_KEY 0x08 /* Public key ops enabled */ +#define KEYCTL_CAPS0_BIG_KEY 0x10 /* big_key-type enabled */ +#define KEYCTL_CAPS0_INVALIDATE 0x20 /* KEYCTL_INVALIDATE supported */ +#define KEYCTL_CAPS0_RESTRICT_KEYRING 0x40 /* KEYCTL_RESTRICT_KEYRING supported */ +#define KEYCTL_CAPS0_MOVE 0x80 /* KEYCTL_MOVE supported */ +#define KEYCTL_CAPS1_NS_KEYRING_NAME 0x01 /* Keyring names are per-user_namespace */ +#define KEYCTL_CAPS1_NS_KEY_TAG 0x02 /* Key indexing can include a namespace tag */ +#define KEYCTL_CAPS1_NOTIFICATIONS 0x04 /* Keys generate watchable notifications */ #endif /* _LINUX_KEYCTL_H */ diff --git a/include/arch/x86_64/linux/kfd_ioctl.h b/include/arch/x86_64/linux/kfd_ioctl.h index 4ad89298..9e6ddd5c 100644 --- a/include/arch/x86_64/linux/kfd_ioctl.h +++ b/include/arch/x86_64/linux/kfd_ioctl.h @@ -199,8 +199,7 @@ struct kfd_process_device_apertures { */ #define NUM_OF_SUPPORTED_GPUS 7 struct kfd_ioctl_get_process_apertures_args { - struct kfd_process_device_apertures - process_apertures[NUM_OF_SUPPORTED_GPUS]; /* from KFD */ + struct kfd_process_device_apertures process_apertures[NUM_OF_SUPPORTED_GPUS]; /* from KFD */ /* from KFD, should be in the range [1 - NUM_OF_SUPPORTED_GPUS] */ __u32 num_of_nodes; @@ -550,8 +549,8 @@ enum kfd_smi_event { /* The reason of the page migration event */ enum KFD_MIGRATE_TRIGGERS { - KFD_MIGRATE_TRIGGER_PREFETCH, /* Prefetch to GPU VRAM or system memory - */ + KFD_MIGRATE_TRIGGER_PREFETCH, /* Prefetch to GPU VRAM or system memory + */ KFD_MIGRATE_TRIGGER_PAGEFAULT_GPU, /* GPU page fault recover */ KFD_MIGRATE_TRIGGER_PAGEFAULT_CPU, /* CPU page fault recover */ KFD_MIGRATE_TRIGGER_TTM_EVICTION /* TTM eviction */ @@ -569,7 +568,7 @@ enum KFD_QUEUE_EVICTION_TRIGGERS { /* The reason of unmap buffer from GPU event */ enum KFD_SVM_UNMAP_TRIGGERS { - KFD_SVM_UNMAP_TRIGGER_MMU_NOTIFY, /* MMU notifier CPU buffer movement */ + KFD_SVM_UNMAP_TRIGGER_MMU_NOTIFY, /* MMU notifier CPU buffer movement */ KFD_SVM_UNMAP_TRIGGER_MMU_NOTIFY_MIGRATE, /* MMU notifier page migration */ KFD_SVM_UNMAP_TRIGGER_UNMAP_FROM_CPU /* Unmap to free the buffer */ @@ -618,11 +617,9 @@ struct kfd_ioctl_smi_events_args { * if the queue restore failed and rescheduled to try again error_code: migrate * failure error code, 0 if no error */ -#define KFD_EVENT_FMT_UPDATE_GPU_RESET(reset_seq_num, reset_cause) \ - "%x %s\n", (reset_seq_num), (reset_cause) +#define KFD_EVENT_FMT_UPDATE_GPU_RESET(reset_seq_num, reset_cause) "%x %s\n", (reset_seq_num), (reset_cause) -#define KFD_EVENT_FMT_THERMAL_THROTTLING(bitmask, counter) \ - "%llx:%llx\n", (bitmask), (counter) +#define KFD_EVENT_FMT_THERMAL_THROTTLING(bitmask, counter) "%llx:%llx\n", (bitmask), (counter) #define KFD_EVENT_FMT_VMFAULT(pid, task_name) "%x:%s\n", (pid), (task_name) @@ -632,27 +629,20 @@ struct kfd_ioctl_smi_events_args { #define KFD_EVENT_FMT_PAGEFAULT_END(ns, pid, addr, node, migrate_update) \ "%lld -%d @%lx(%x) %c\n", (ns), (pid), (addr), (node), (migrate_update) -#define KFD_EVENT_FMT_MIGRATE_START(ns, pid, start, size, from, to, \ - prefetch_loc, preferred_loc, \ - migrate_trigger) \ - "%lld -%d @%lx(%lx) %x->%x %x:%x %d\n", (ns), (pid), (start), (size), \ - (from), (to), (prefetch_loc), (preferred_loc), \ - (migrate_trigger) +#define KFD_EVENT_FMT_MIGRATE_START(ns, pid, start, size, from, to, prefetch_loc, preferred_loc, migrate_trigger) \ + "%lld -%d @%lx(%lx) %x->%x %x:%x %d\n", (ns), (pid), (start), (size), (from), (to), (prefetch_loc), \ + (preferred_loc), (migrate_trigger) -#define KFD_EVENT_FMT_MIGRATE_END(ns, pid, start, size, from, to, \ - migrate_trigger, error_code) \ - "%lld -%d @%lx(%lx) %x->%x %d %d\n", (ns), (pid), (start), (size), \ - (from), (to), (migrate_trigger), (error_code) +#define KFD_EVENT_FMT_MIGRATE_END(ns, pid, start, size, from, to, migrate_trigger, error_code) \ + "%lld -%d @%lx(%lx) %x->%x %d %d\n", (ns), (pid), (start), (size), (from), (to), (migrate_trigger), (error_code) #define KFD_EVENT_FMT_QUEUE_EVICTION(ns, pid, node, evict_trigger) \ "%lld -%d %x %d\n", (ns), (pid), (node), (evict_trigger) -#define KFD_EVENT_FMT_QUEUE_RESTORE(ns, pid, node, rescheduled) \ - "%lld -%d %x %c\n", (ns), (pid), (node), (rescheduled) +#define KFD_EVENT_FMT_QUEUE_RESTORE(ns, pid, node, rescheduled) "%lld -%d %x %c\n", (ns), (pid), (node), (rescheduled) #define KFD_EVENT_FMT_UNMAP_FROM_GPU(ns, pid, addr, size, node, unmap_trigger) \ - "%lld -%d @%lx(%lx) %x %d\n", (ns), (pid), (addr), (size), (node), \ - (unmap_trigger) + "%lld -%d @%lx(%lx) %x %d\n", (ns), (pid), (addr), (size), (node), (unmap_trigger) #define KFD_EVENT_FMT_PROCESS(pid, task_name) "%x %s\n", (pid), (task_name) @@ -775,10 +765,7 @@ enum kfd_ioctl_svm_op { KFD_IOCTL_SVM_OP_SET_ATTR, KFD_IOCTL_SVM_OP_GET_ATTR }; * Below definitions are used for system memory or for leaving the preferred * location unspecified. */ -enum kfd_ioctl_svm_location { - KFD_IOCTL_SVM_LOCATION_SYSMEM = 0, - KFD_IOCTL_SVM_LOCATION_UNDEFINED = 0xffffffff -}; +enum kfd_ioctl_svm_location { KFD_IOCTL_SVM_LOCATION_SYSMEM = 0, KFD_IOCTL_SVM_LOCATION_UNDEFINED = 0xffffffff }; /** * kfd_ioctl_svm_attr_type - SVM attribute types @@ -908,10 +895,7 @@ struct kfd_ioctl_set_xnack_mode_args { }; /* Wave launch override modes */ -enum kfd_dbg_trap_override_mode { - KFD_DBG_TRAP_OVERRIDE_OR = 0, - KFD_DBG_TRAP_OVERRIDE_REPLACE = 1 -}; +enum kfd_dbg_trap_override_mode { KFD_DBG_TRAP_OVERRIDE_OR = 0, KFD_DBG_TRAP_OVERRIDE_REPLACE = 1 }; /* Wave launch overrides */ enum kfd_dbg_trap_mask { @@ -985,53 +969,32 @@ enum kfd_dbg_trap_exception_code { #define KFD_EC_MASK(ecode) (1ULL << (ecode - 1)) /* Masks for exception code type checks below */ -#define KFD_EC_MASK_QUEUE \ - (KFD_EC_MASK(EC_QUEUE_WAVE_ABORT) | KFD_EC_MASK(EC_QUEUE_WAVE_TRAP) | \ - KFD_EC_MASK(EC_QUEUE_WAVE_MATH_ERROR) | \ - KFD_EC_MASK(EC_QUEUE_WAVE_ILLEGAL_INSTRUCTION) | \ - KFD_EC_MASK(EC_QUEUE_WAVE_MEMORY_VIOLATION) | \ - KFD_EC_MASK(EC_QUEUE_WAVE_APERTURE_VIOLATION) | \ - KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_DIM_INVALID) | \ - KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_GROUP_SEGMENT_SIZE_INVALID) | \ - KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_CODE_INVALID) | \ - KFD_EC_MASK(EC_QUEUE_PACKET_RESERVED) | \ - KFD_EC_MASK(EC_QUEUE_PACKET_UNSUPPORTED) | \ - KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_WORK_GROUP_SIZE_INVALID) | \ - KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_REGISTER_INVALID) | \ - KFD_EC_MASK(EC_QUEUE_PACKET_VENDOR_UNSUPPORTED) | \ +#define KFD_EC_MASK_QUEUE \ + (KFD_EC_MASK(EC_QUEUE_WAVE_ABORT) | KFD_EC_MASK(EC_QUEUE_WAVE_TRAP) | KFD_EC_MASK(EC_QUEUE_WAVE_MATH_ERROR) | \ + KFD_EC_MASK(EC_QUEUE_WAVE_ILLEGAL_INSTRUCTION) | KFD_EC_MASK(EC_QUEUE_WAVE_MEMORY_VIOLATION) | \ + KFD_EC_MASK(EC_QUEUE_WAVE_APERTURE_VIOLATION) | KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_DIM_INVALID) | \ + KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_GROUP_SEGMENT_SIZE_INVALID) | \ + KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_CODE_INVALID) | KFD_EC_MASK(EC_QUEUE_PACKET_RESERVED) | \ + KFD_EC_MASK(EC_QUEUE_PACKET_UNSUPPORTED) | KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_WORK_GROUP_SIZE_INVALID) | \ + KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_REGISTER_INVALID) | KFD_EC_MASK(EC_QUEUE_PACKET_VENDOR_UNSUPPORTED) | \ KFD_EC_MASK(EC_QUEUE_PREEMPTION_ERROR) | KFD_EC_MASK(EC_QUEUE_NEW)) -#define KFD_EC_MASK_DEVICE \ - (KFD_EC_MASK(EC_DEVICE_QUEUE_DELETE) | \ - KFD_EC_MASK(EC_DEVICE_RAS_ERROR) | \ - KFD_EC_MASK(EC_DEVICE_FATAL_HALT) | \ +#define KFD_EC_MASK_DEVICE \ + (KFD_EC_MASK(EC_DEVICE_QUEUE_DELETE) | KFD_EC_MASK(EC_DEVICE_RAS_ERROR) | KFD_EC_MASK(EC_DEVICE_FATAL_HALT) | \ KFD_EC_MASK(EC_DEVICE_MEMORY_VIOLATION) | KFD_EC_MASK(EC_DEVICE_NEW)) -#define KFD_EC_MASK_PROCESS \ - (KFD_EC_MASK(EC_PROCESS_RUNTIME) | \ - KFD_EC_MASK(EC_PROCESS_DEVICE_REMOVE)) -#define KFD_EC_MASK_PACKET \ - (KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_DIM_INVALID) | \ - KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_GROUP_SEGMENT_SIZE_INVALID) | \ - KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_CODE_INVALID) | \ - KFD_EC_MASK(EC_QUEUE_PACKET_RESERVED) | \ - KFD_EC_MASK(EC_QUEUE_PACKET_UNSUPPORTED) | \ - KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_WORK_GROUP_SIZE_INVALID) | \ - KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_REGISTER_INVALID) | \ - KFD_EC_MASK(EC_QUEUE_PACKET_VENDOR_UNSUPPORTED)) +#define KFD_EC_MASK_PROCESS (KFD_EC_MASK(EC_PROCESS_RUNTIME) | KFD_EC_MASK(EC_PROCESS_DEVICE_REMOVE)) +#define KFD_EC_MASK_PACKET \ + (KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_DIM_INVALID) | \ + KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_GROUP_SEGMENT_SIZE_INVALID) | \ + KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_CODE_INVALID) | KFD_EC_MASK(EC_QUEUE_PACKET_RESERVED) | \ + KFD_EC_MASK(EC_QUEUE_PACKET_UNSUPPORTED) | KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_WORK_GROUP_SIZE_INVALID) | \ + KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_REGISTER_INVALID) | KFD_EC_MASK(EC_QUEUE_PACKET_VENDOR_UNSUPPORTED)) /* Checks for exception code types for KFD search */ -#define KFD_DBG_EC_IS_VALID(ecode) (ecode > EC_NONE && ecode < EC_MAX) -#define KFD_DBG_EC_TYPE_IS_QUEUE(ecode) \ - (KFD_DBG_EC_IS_VALID(ecode) && \ - !!(KFD_EC_MASK(ecode) & KFD_EC_MASK_QUEUE)) -#define KFD_DBG_EC_TYPE_IS_DEVICE(ecode) \ - (KFD_DBG_EC_IS_VALID(ecode) && \ - !!(KFD_EC_MASK(ecode) & KFD_EC_MASK_DEVICE)) -#define KFD_DBG_EC_TYPE_IS_PROCESS(ecode) \ - (KFD_DBG_EC_IS_VALID(ecode) && \ - !!(KFD_EC_MASK(ecode) & KFD_EC_MASK_PROCESS)) -#define KFD_DBG_EC_TYPE_IS_PACKET(ecode) \ - (KFD_DBG_EC_IS_VALID(ecode) && \ - !!(KFD_EC_MASK(ecode) & KFD_EC_MASK_PACKET)) +#define KFD_DBG_EC_IS_VALID(ecode) (ecode > EC_NONE && ecode < EC_MAX) +#define KFD_DBG_EC_TYPE_IS_QUEUE(ecode) (KFD_DBG_EC_IS_VALID(ecode) && !!(KFD_EC_MASK(ecode) & KFD_EC_MASK_QUEUE)) +#define KFD_DBG_EC_TYPE_IS_DEVICE(ecode) (KFD_DBG_EC_IS_VALID(ecode) && !!(KFD_EC_MASK(ecode) & KFD_EC_MASK_DEVICE)) +#define KFD_DBG_EC_TYPE_IS_PROCESS(ecode) (KFD_DBG_EC_IS_VALID(ecode) && !!(KFD_EC_MASK(ecode) & KFD_EC_MASK_PROCESS)) +#define KFD_DBG_EC_TYPE_IS_PACKET(ecode) (KFD_DBG_EC_IS_VALID(ecode) && !!(KFD_EC_MASK(ecode) & KFD_EC_MASK_PACKET)) /* Runtime enable states */ enum kfd_dbg_runtime_state { @@ -1548,24 +1511,17 @@ struct kfd_ioctl_dbg_trap_args { union { struct kfd_ioctl_dbg_trap_enable_args enable; - struct kfd_ioctl_dbg_trap_send_runtime_event_args - send_runtime_event; - struct kfd_ioctl_dbg_trap_set_exceptions_enabled_args - set_exceptions_enabled; - struct kfd_ioctl_dbg_trap_set_wave_launch_override_args - launch_override; + struct kfd_ioctl_dbg_trap_send_runtime_event_args send_runtime_event; + struct kfd_ioctl_dbg_trap_set_exceptions_enabled_args set_exceptions_enabled; + struct kfd_ioctl_dbg_trap_set_wave_launch_override_args launch_override; struct kfd_ioctl_dbg_trap_set_wave_launch_mode_args launch_mode; struct kfd_ioctl_dbg_trap_suspend_queues_args suspend_queues; struct kfd_ioctl_dbg_trap_resume_queues_args resume_queues; - struct kfd_ioctl_dbg_trap_set_node_address_watch_args - set_node_address_watch; - struct kfd_ioctl_dbg_trap_clear_node_address_watch_args - clear_node_address_watch; + struct kfd_ioctl_dbg_trap_set_node_address_watch_args set_node_address_watch; + struct kfd_ioctl_dbg_trap_clear_node_address_watch_args clear_node_address_watch; struct kfd_ioctl_dbg_trap_set_flags_args set_flags; - struct kfd_ioctl_dbg_trap_query_debug_event_args - query_debug_event; - struct kfd_ioctl_dbg_trap_query_exception_info_args - query_exception_info; + struct kfd_ioctl_dbg_trap_query_debug_event_args query_debug_event; + struct kfd_ioctl_dbg_trap_query_exception_info_args query_exception_info; struct kfd_ioctl_dbg_trap_queue_snapshot_args queue_snapshot; struct kfd_ioctl_dbg_trap_device_snapshot_args device_snapshot; }; @@ -1577,112 +1533,79 @@ struct kfd_ioctl_dbg_trap_args { #define AMDKFD_IOW(nr, type) _IOW(AMDKFD_IOCTL_BASE, nr, type) #define AMDKFD_IOWR(nr, type) _IOWR(AMDKFD_IOCTL_BASE, nr, type) -#define AMDKFD_IOC_GET_VERSION \ - AMDKFD_IOR(0x01, struct kfd_ioctl_get_version_args) +#define AMDKFD_IOC_GET_VERSION AMDKFD_IOR(0x01, struct kfd_ioctl_get_version_args) -#define AMDKFD_IOC_CREATE_QUEUE \ - AMDKFD_IOWR(0x02, struct kfd_ioctl_create_queue_args) +#define AMDKFD_IOC_CREATE_QUEUE AMDKFD_IOWR(0x02, struct kfd_ioctl_create_queue_args) -#define AMDKFD_IOC_DESTROY_QUEUE \ - AMDKFD_IOWR(0x03, struct kfd_ioctl_destroy_queue_args) +#define AMDKFD_IOC_DESTROY_QUEUE AMDKFD_IOWR(0x03, struct kfd_ioctl_destroy_queue_args) -#define AMDKFD_IOC_SET_MEMORY_POLICY \ - AMDKFD_IOW(0x04, struct kfd_ioctl_set_memory_policy_args) +#define AMDKFD_IOC_SET_MEMORY_POLICY AMDKFD_IOW(0x04, struct kfd_ioctl_set_memory_policy_args) -#define AMDKFD_IOC_GET_CLOCK_COUNTERS \ - AMDKFD_IOWR(0x05, struct kfd_ioctl_get_clock_counters_args) +#define AMDKFD_IOC_GET_CLOCK_COUNTERS AMDKFD_IOWR(0x05, struct kfd_ioctl_get_clock_counters_args) -#define AMDKFD_IOC_GET_PROCESS_APERTURES \ - AMDKFD_IOR(0x06, struct kfd_ioctl_get_process_apertures_args) +#define AMDKFD_IOC_GET_PROCESS_APERTURES AMDKFD_IOR(0x06, struct kfd_ioctl_get_process_apertures_args) -#define AMDKFD_IOC_UPDATE_QUEUE \ - AMDKFD_IOW(0x07, struct kfd_ioctl_update_queue_args) +#define AMDKFD_IOC_UPDATE_QUEUE AMDKFD_IOW(0x07, struct kfd_ioctl_update_queue_args) -#define AMDKFD_IOC_CREATE_EVENT \ - AMDKFD_IOWR(0x08, struct kfd_ioctl_create_event_args) +#define AMDKFD_IOC_CREATE_EVENT AMDKFD_IOWR(0x08, struct kfd_ioctl_create_event_args) -#define AMDKFD_IOC_DESTROY_EVENT \ - AMDKFD_IOW(0x09, struct kfd_ioctl_destroy_event_args) +#define AMDKFD_IOC_DESTROY_EVENT AMDKFD_IOW(0x09, struct kfd_ioctl_destroy_event_args) #define AMDKFD_IOC_SET_EVENT AMDKFD_IOW(0x0A, struct kfd_ioctl_set_event_args) -#define AMDKFD_IOC_RESET_EVENT \ - AMDKFD_IOW(0x0B, struct kfd_ioctl_reset_event_args) +#define AMDKFD_IOC_RESET_EVENT AMDKFD_IOW(0x0B, struct kfd_ioctl_reset_event_args) -#define AMDKFD_IOC_WAIT_EVENTS \ - AMDKFD_IOWR(0x0C, struct kfd_ioctl_wait_events_args) +#define AMDKFD_IOC_WAIT_EVENTS AMDKFD_IOWR(0x0C, struct kfd_ioctl_wait_events_args) -#define AMDKFD_IOC_DBG_REGISTER_DEPRECATED \ - AMDKFD_IOW(0x0D, struct kfd_ioctl_dbg_register_args) +#define AMDKFD_IOC_DBG_REGISTER_DEPRECATED AMDKFD_IOW(0x0D, struct kfd_ioctl_dbg_register_args) -#define AMDKFD_IOC_DBG_UNREGISTER_DEPRECATED \ - AMDKFD_IOW(0x0E, struct kfd_ioctl_dbg_unregister_args) +#define AMDKFD_IOC_DBG_UNREGISTER_DEPRECATED AMDKFD_IOW(0x0E, struct kfd_ioctl_dbg_unregister_args) -#define AMDKFD_IOC_DBG_ADDRESS_WATCH_DEPRECATED \ - AMDKFD_IOW(0x0F, struct kfd_ioctl_dbg_address_watch_args) +#define AMDKFD_IOC_DBG_ADDRESS_WATCH_DEPRECATED AMDKFD_IOW(0x0F, struct kfd_ioctl_dbg_address_watch_args) -#define AMDKFD_IOC_DBG_WAVE_CONTROL_DEPRECATED \ - AMDKFD_IOW(0x10, struct kfd_ioctl_dbg_wave_control_args) +#define AMDKFD_IOC_DBG_WAVE_CONTROL_DEPRECATED AMDKFD_IOW(0x10, struct kfd_ioctl_dbg_wave_control_args) -#define AMDKFD_IOC_SET_SCRATCH_BACKING_VA \ - AMDKFD_IOWR(0x11, struct kfd_ioctl_set_scratch_backing_va_args) +#define AMDKFD_IOC_SET_SCRATCH_BACKING_VA AMDKFD_IOWR(0x11, struct kfd_ioctl_set_scratch_backing_va_args) -#define AMDKFD_IOC_GET_TILE_CONFIG \ - AMDKFD_IOWR(0x12, struct kfd_ioctl_get_tile_config_args) +#define AMDKFD_IOC_GET_TILE_CONFIG AMDKFD_IOWR(0x12, struct kfd_ioctl_get_tile_config_args) -#define AMDKFD_IOC_SET_TRAP_HANDLER \ - AMDKFD_IOW(0x13, struct kfd_ioctl_set_trap_handler_args) +#define AMDKFD_IOC_SET_TRAP_HANDLER AMDKFD_IOW(0x13, struct kfd_ioctl_set_trap_handler_args) -#define AMDKFD_IOC_GET_PROCESS_APERTURES_NEW \ - AMDKFD_IOWR(0x14, struct kfd_ioctl_get_process_apertures_new_args) +#define AMDKFD_IOC_GET_PROCESS_APERTURES_NEW AMDKFD_IOWR(0x14, struct kfd_ioctl_get_process_apertures_new_args) #define AMDKFD_IOC_ACQUIRE_VM AMDKFD_IOW(0x15, struct kfd_ioctl_acquire_vm_args) -#define AMDKFD_IOC_ALLOC_MEMORY_OF_GPU \ - AMDKFD_IOWR(0x16, struct kfd_ioctl_alloc_memory_of_gpu_args) +#define AMDKFD_IOC_ALLOC_MEMORY_OF_GPU AMDKFD_IOWR(0x16, struct kfd_ioctl_alloc_memory_of_gpu_args) -#define AMDKFD_IOC_FREE_MEMORY_OF_GPU \ - AMDKFD_IOW(0x17, struct kfd_ioctl_free_memory_of_gpu_args) +#define AMDKFD_IOC_FREE_MEMORY_OF_GPU AMDKFD_IOW(0x17, struct kfd_ioctl_free_memory_of_gpu_args) -#define AMDKFD_IOC_MAP_MEMORY_TO_GPU \ - AMDKFD_IOWR(0x18, struct kfd_ioctl_map_memory_to_gpu_args) +#define AMDKFD_IOC_MAP_MEMORY_TO_GPU AMDKFD_IOWR(0x18, struct kfd_ioctl_map_memory_to_gpu_args) -#define AMDKFD_IOC_UNMAP_MEMORY_FROM_GPU \ - AMDKFD_IOWR(0x19, struct kfd_ioctl_unmap_memory_from_gpu_args) +#define AMDKFD_IOC_UNMAP_MEMORY_FROM_GPU AMDKFD_IOWR(0x19, struct kfd_ioctl_unmap_memory_from_gpu_args) -#define AMDKFD_IOC_SET_CU_MASK \ - AMDKFD_IOW(0x1A, struct kfd_ioctl_set_cu_mask_args) +#define AMDKFD_IOC_SET_CU_MASK AMDKFD_IOW(0x1A, struct kfd_ioctl_set_cu_mask_args) -#define AMDKFD_IOC_GET_QUEUE_WAVE_STATE \ - AMDKFD_IOWR(0x1B, struct kfd_ioctl_get_queue_wave_state_args) +#define AMDKFD_IOC_GET_QUEUE_WAVE_STATE AMDKFD_IOWR(0x1B, struct kfd_ioctl_get_queue_wave_state_args) -#define AMDKFD_IOC_GET_DMABUF_INFO \ - AMDKFD_IOWR(0x1C, struct kfd_ioctl_get_dmabuf_info_args) +#define AMDKFD_IOC_GET_DMABUF_INFO AMDKFD_IOWR(0x1C, struct kfd_ioctl_get_dmabuf_info_args) -#define AMDKFD_IOC_IMPORT_DMABUF \ - AMDKFD_IOWR(0x1D, struct kfd_ioctl_import_dmabuf_args) +#define AMDKFD_IOC_IMPORT_DMABUF AMDKFD_IOWR(0x1D, struct kfd_ioctl_import_dmabuf_args) -#define AMDKFD_IOC_ALLOC_QUEUE_GWS \ - AMDKFD_IOWR(0x1E, struct kfd_ioctl_alloc_queue_gws_args) +#define AMDKFD_IOC_ALLOC_QUEUE_GWS AMDKFD_IOWR(0x1E, struct kfd_ioctl_alloc_queue_gws_args) -#define AMDKFD_IOC_SMI_EVENTS \ - AMDKFD_IOWR(0x1F, struct kfd_ioctl_smi_events_args) +#define AMDKFD_IOC_SMI_EVENTS AMDKFD_IOWR(0x1F, struct kfd_ioctl_smi_events_args) #define AMDKFD_IOC_SVM AMDKFD_IOWR(0x20, struct kfd_ioctl_svm_args) -#define AMDKFD_IOC_SET_XNACK_MODE \ - AMDKFD_IOWR(0x21, struct kfd_ioctl_set_xnack_mode_args) +#define AMDKFD_IOC_SET_XNACK_MODE AMDKFD_IOWR(0x21, struct kfd_ioctl_set_xnack_mode_args) #define AMDKFD_IOC_CRIU_OP AMDKFD_IOWR(0x22, struct kfd_ioctl_criu_args) -#define AMDKFD_IOC_AVAILABLE_MEMORY \ - AMDKFD_IOWR(0x23, struct kfd_ioctl_get_available_memory_args) +#define AMDKFD_IOC_AVAILABLE_MEMORY AMDKFD_IOWR(0x23, struct kfd_ioctl_get_available_memory_args) -#define AMDKFD_IOC_EXPORT_DMABUF \ - AMDKFD_IOWR(0x24, struct kfd_ioctl_export_dmabuf_args) +#define AMDKFD_IOC_EXPORT_DMABUF AMDKFD_IOWR(0x24, struct kfd_ioctl_export_dmabuf_args) -#define AMDKFD_IOC_RUNTIME_ENABLE \ - AMDKFD_IOWR(0x25, struct kfd_ioctl_runtime_enable_args) +#define AMDKFD_IOC_RUNTIME_ENABLE AMDKFD_IOWR(0x25, struct kfd_ioctl_runtime_enable_args) #define AMDKFD_IOC_DBG_TRAP AMDKFD_IOWR(0x26, struct kfd_ioctl_dbg_trap_args) diff --git a/include/arch/x86_64/linux/kvm.h b/include/arch/x86_64/linux/kvm.h index 1cba509b..09d169ac 100644 --- a/include/arch/x86_64/linux/kvm.h +++ b/include/arch/x86_64/linux/kvm.h @@ -406,9 +406,8 @@ struct kvm_run { #define KVM_MSR_EXIT_REASON_INVAL (1 << 0) #define KVM_MSR_EXIT_REASON_UNKNOWN (1 << 1) #define KVM_MSR_EXIT_REASON_FILTER (1 << 2) -#define KVM_MSR_EXIT_REASON_VALID_MASK \ - (KVM_MSR_EXIT_REASON_INVAL | KVM_MSR_EXIT_REASON_UNKNOWN | \ - KVM_MSR_EXIT_REASON_FILTER) +#define KVM_MSR_EXIT_REASON_VALID_MASK \ + (KVM_MSR_EXIT_REASON_INVAL | KVM_MSR_EXIT_REASON_UNKNOWN | KVM_MSR_EXIT_REASON_FILTER) __u32 reason; /* kernel -> user */ __u32 index; /* kernel -> user */ __u64 data; /* kernel <-> user */ @@ -515,9 +514,8 @@ struct kvm_coalesced_mmio_ring { struct kvm_coalesced_mmio coalesced_mmio[]; }; -#define KVM_COALESCED_MMIO_MAX \ - ((PAGE_SIZE - sizeof(struct kvm_coalesced_mmio_ring)) / \ - sizeof(struct kvm_coalesced_mmio)) +#define KVM_COALESCED_MMIO_MAX \ + ((PAGE_SIZE - sizeof(struct kvm_coalesced_mmio_ring)) / sizeof(struct kvm_coalesced_mmio)) /* for KVM_TRANSLATE */ struct kvm_translation { @@ -616,11 +614,10 @@ enum { 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_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) @@ -704,7 +701,7 @@ struct kvm_enable_cap { #define KVM_CAP_VAPIC 6 #define KVM_CAP_EXT_CPUID 7 #define KVM_CAP_CLOCKSOURCE 8 -#define KVM_CAP_NR_VCPUS 9 /* returns recommended max vcpus per vm */ +#define KVM_CAP_NR_VCPUS 9 /* returns recommended max vcpus per vm */ #define KVM_CAP_NR_MEMSLOTS 10 /* returns max memory slots per vm */ #define KVM_CAP_PIT 11 #define KVM_CAP_NOP_IO_DELAY 12 @@ -1092,8 +1089,7 @@ struct kvm_dirty_tlb { #define KVM_REG_SIZE_SHIFT 52 #define KVM_REG_SIZE_MASK 0x00f0000000000000ULL -#define KVM_REG_SIZE(id) \ - (1U << (((id) & KVM_REG_SIZE_MASK) >> KVM_REG_SIZE_SHIFT)) +#define KVM_REG_SIZE(id) (1U << (((id) & KVM_REG_SIZE_MASK) >> KVM_REG_SIZE_SHIFT)) #define KVM_REG_SIZE_U8 0x0000000000000000ULL #define KVM_REG_SIZE_U16 0x0010000000000000ULL @@ -1203,16 +1199,14 @@ struct kvm_vfio_spapr_tce { * KVM_CREATE_VCPU receives as a parameter the vcpu slot, and returns * a vcpu fd. */ -#define KVM_CREATE_VCPU _IO(KVMIO, 0x41) -#define KVM_GET_DIRTY_LOG _IOW(KVMIO, 0x42, struct kvm_dirty_log) -#define KVM_SET_NR_MMU_PAGES _IO(KVMIO, 0x44) -#define KVM_GET_NR_MMU_PAGES _IO(KVMIO, 0x45) /* deprecated */ -#define KVM_SET_USER_MEMORY_REGION \ - _IOW(KVMIO, 0x46, struct kvm_userspace_memory_region) -#define KVM_SET_TSS_ADDR _IO(KVMIO, 0x47) -#define KVM_SET_IDENTITY_MAP_ADDR _IOW(KVMIO, 0x48, __u64) -#define KVM_SET_USER_MEMORY_REGION2 \ - _IOW(KVMIO, 0x49, struct kvm_userspace_memory_region2) +#define KVM_CREATE_VCPU _IO(KVMIO, 0x41) +#define KVM_GET_DIRTY_LOG _IOW(KVMIO, 0x42, struct kvm_dirty_log) +#define KVM_SET_NR_MMU_PAGES _IO(KVMIO, 0x44) +#define KVM_GET_NR_MMU_PAGES _IO(KVMIO, 0x45) /* deprecated */ +#define KVM_SET_USER_MEMORY_REGION _IOW(KVMIO, 0x46, struct kvm_userspace_memory_region) +#define KVM_SET_TSS_ADDR _IO(KVMIO, 0x47) +#define KVM_SET_IDENTITY_MAP_ADDR _IOW(KVMIO, 0x48, __u64) +#define KVM_SET_USER_MEMORY_REGION2 _IOW(KVMIO, 0x49, struct kvm_userspace_memory_region2) /* enable ucontrol for s390 */ #define KVM_S390_UCAS_MAP _IOW(KVMIO, 0x50, struct kvm_s390_ucas_mapping) @@ -1220,27 +1214,25 @@ struct kvm_vfio_spapr_tce { #define KVM_S390_VCPU_FAULT _IOW(KVMIO, 0x52, unsigned long) /* Device model IOC */ -#define KVM_CREATE_IRQCHIP _IO(KVMIO, 0x60) -#define KVM_IRQ_LINE _IOW(KVMIO, 0x61, struct kvm_irq_level) -#define KVM_GET_IRQCHIP _IOWR(KVMIO, 0x62, struct kvm_irqchip) -#define KVM_SET_IRQCHIP _IOR(KVMIO, 0x63, struct kvm_irqchip) -#define KVM_CREATE_PIT _IO(KVMIO, 0x64) -#define KVM_GET_PIT _IOWR(KVMIO, 0x65, struct kvm_pit_state) -#define KVM_SET_PIT _IOR(KVMIO, 0x66, struct kvm_pit_state) -#define KVM_IRQ_LINE_STATUS _IOWR(KVMIO, 0x67, struct kvm_irq_level) -#define KVM_REGISTER_COALESCED_MMIO \ - _IOW(KVMIO, 0x67, struct kvm_coalesced_mmio_zone) -#define KVM_UNREGISTER_COALESCED_MMIO \ - _IOW(KVMIO, 0x68, struct kvm_coalesced_mmio_zone) -#define KVM_SET_GSI_ROUTING _IOW(KVMIO, 0x6a, struct kvm_irq_routing) -#define KVM_REINJECT_CONTROL _IO(KVMIO, 0x71) -#define KVM_IRQFD _IOW(KVMIO, 0x76, struct kvm_irqfd) -#define KVM_CREATE_PIT2 _IOW(KVMIO, 0x77, struct kvm_pit_config) -#define KVM_SET_BOOT_CPU_ID _IO(KVMIO, 0x78) -#define KVM_IOEVENTFD _IOW(KVMIO, 0x79, struct kvm_ioeventfd) -#define KVM_XEN_HVM_CONFIG _IOW(KVMIO, 0x7a, struct kvm_xen_hvm_config) -#define KVM_SET_CLOCK _IOW(KVMIO, 0x7b, struct kvm_clock_data) -#define KVM_GET_CLOCK _IOR(KVMIO, 0x7c, struct kvm_clock_data) +#define KVM_CREATE_IRQCHIP _IO(KVMIO, 0x60) +#define KVM_IRQ_LINE _IOW(KVMIO, 0x61, struct kvm_irq_level) +#define KVM_GET_IRQCHIP _IOWR(KVMIO, 0x62, struct kvm_irqchip) +#define KVM_SET_IRQCHIP _IOR(KVMIO, 0x63, struct kvm_irqchip) +#define KVM_CREATE_PIT _IO(KVMIO, 0x64) +#define KVM_GET_PIT _IOWR(KVMIO, 0x65, struct kvm_pit_state) +#define KVM_SET_PIT _IOR(KVMIO, 0x66, struct kvm_pit_state) +#define KVM_IRQ_LINE_STATUS _IOWR(KVMIO, 0x67, struct kvm_irq_level) +#define KVM_REGISTER_COALESCED_MMIO _IOW(KVMIO, 0x67, struct kvm_coalesced_mmio_zone) +#define KVM_UNREGISTER_COALESCED_MMIO _IOW(KVMIO, 0x68, struct kvm_coalesced_mmio_zone) +#define KVM_SET_GSI_ROUTING _IOW(KVMIO, 0x6a, struct kvm_irq_routing) +#define KVM_REINJECT_CONTROL _IO(KVMIO, 0x71) +#define KVM_IRQFD _IOW(KVMIO, 0x76, struct kvm_irqfd) +#define KVM_CREATE_PIT2 _IOW(KVMIO, 0x77, struct kvm_pit_config) +#define KVM_SET_BOOT_CPU_ID _IO(KVMIO, 0x78) +#define KVM_IOEVENTFD _IOW(KVMIO, 0x79, struct kvm_ioeventfd) +#define KVM_XEN_HVM_CONFIG _IOW(KVMIO, 0x7a, struct kvm_xen_hvm_config) +#define KVM_SET_CLOCK _IOW(KVMIO, 0x7b, struct kvm_clock_data) +#define KVM_GET_CLOCK _IOR(KVMIO, 0x7c, struct kvm_clock_data) /* Available with KVM_CAP_PIT_STATE2 */ #define KVM_GET_PIT2 _IOR(KVMIO, 0x9f, struct kvm_pit_state2) #define KVM_SET_PIT2 _IOW(KVMIO, 0xa0, struct kvm_pit_state2) @@ -1255,10 +1247,9 @@ struct kvm_vfio_spapr_tce { /* 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) -#define KVM_CREATE_SPAPR_TCE_64 \ - _IOW(KVMIO, 0xa8, struct kvm_create_spapr_tce_64) +#define KVM_PPC_ALLOCATE_HTAB _IOWR(KVMIO, 0xa7, __u32) +#define KVM_CREATE_SPAPR_TCE _IOW(KVMIO, 0xa8, struct kvm_create_spapr_tce) +#define KVM_CREATE_SPAPR_TCE_64 _IOW(KVMIO, 0xa8, struct kvm_create_spapr_tce_64) /* Available with KVM_CAP_RMA */ #define KVM_ALLOCATE_RMA _IOR(KVMIO, 0xa9, struct kvm_allocate_rma) /* Available with KVM_CAP_PPC_HTAB_FD */ @@ -1281,8 +1272,7 @@ struct kvm_vfio_spapr_tce { #define KVM_PPC_SVM_OFF _IO(KVMIO, 0xb3) #define KVM_ARM_MTE_COPY_TAGS _IOR(KVMIO, 0xb4, struct kvm_arm_copy_mte_tags) /* Available with KVM_CAP_COUNTER_OFFSET */ -#define KVM_ARM_SET_COUNTER_OFFSET \ - _IOW(KVMIO, 0xb5, struct kvm_arm_counter_offset) +#define KVM_ARM_SET_COUNTER_OFFSET _IOW(KVMIO, 0xb5, struct kvm_arm_counter_offset) #define KVM_ARM_GET_REG_WRITABLE_MASKS _IOR(KVMIO, 0xb6, struct reg_mask_range) /* ioctl for vm fd */ @@ -1429,8 +1419,7 @@ struct kvm_enc_region { #define KVM_XEN_VCPU_SET_ATTR _IOW(KVMIO, 0xcb, struct kvm_xen_vcpu_attr) /* Available with KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_EVTCHN_SEND */ -#define KVM_XEN_HVM_EVTCHN_SEND \ - _IOW(KVMIO, 0xd0, struct kvm_irq_routing_xen_evtchn) +#define KVM_XEN_HVM_EVTCHN_SEND _IOW(KVMIO, 0xd0, struct kvm_irq_routing_xen_evtchn) #define KVM_GET_SREGS2 _IOR(KVMIO, 0xcc, struct kvm_sregs2) #define KVM_SET_SREGS2 _IOW(KVMIO, 0xcd, struct kvm_sregs2) @@ -1581,8 +1570,7 @@ struct kvm_stats_desc { #define KVM_S390_ZPCI_OP _IOW(KVMIO, 0xd1, struct kvm_s390_zpci_op) /* Available with KVM_CAP_MEMORY_ATTRIBUTES */ -#define KVM_SET_MEMORY_ATTRIBUTES \ - _IOW(KVMIO, 0xd2, struct kvm_memory_attributes) +#define KVM_SET_MEMORY_ATTRIBUTES _IOW(KVMIO, 0xd2, struct kvm_memory_attributes) struct kvm_memory_attributes { __u64 address; diff --git a/include/arch/x86_64/linux/l2tp.h b/include/arch/x86_64/linux/l2tp.h index 7eb9ee43..6cb62ad4 100644 --- a/include/arch/x86_64/linux/l2tp.h +++ b/include/arch/x86_64/linux/l2tp.h @@ -29,8 +29,7 @@ struct sockaddr_l2tpip { __u32 l2tp_conn_id; /* Connection ID of tunnel */ /* Pad to size of `struct sockaddr'. */ - unsigned char __pad[__SOCK_SIZE__ - sizeof(__kernel_sa_family_t) - - sizeof(__be16) - sizeof(struct in_addr) - + unsigned char __pad[__SOCK_SIZE__ - sizeof(__kernel_sa_family_t) - sizeof(__be16) - sizeof(struct in_addr) - sizeof(__u32)]; }; diff --git a/include/arch/x86_64/linux/llc.h b/include/arch/x86_64/linux/llc.h index c218a2a2..6bfdabcb 100644 --- a/include/arch/x86_64/linux/llc.h +++ b/include/arch/x86_64/linux/llc.h @@ -26,8 +26,8 @@ struct sockaddr_llc { unsigned char sllc_ua; /* UA data, only for SOCK_STREAM. */ unsigned char sllc_sap; unsigned char sllc_mac[IFHWADDRLEN]; - unsigned char __pad[__LLC_SOCK_SIZE__ - sizeof(__kernel_sa_family_t) * 2 - - sizeof(unsigned char) * 4 - IFHWADDRLEN]; + unsigned char + __pad[__LLC_SOCK_SIZE__ - sizeof(__kernel_sa_family_t) * 2 - sizeof(unsigned char) * 4 - IFHWADDRLEN]; }; /* sockopt definitions. */ diff --git a/include/arch/x86_64/linux/loadpin.h b/include/arch/x86_64/linux/loadpin.h index 97d00f81..9b044057 100644 --- a/include/arch/x86_64/linux/loadpin.h +++ b/include/arch/x86_64/linux/loadpin.h @@ -18,7 +18,6 @@ * attribute 'loadpin/dm-verity' (which can be typically found under * /sys/kernel/security/loadpin/dm-verity). */ -#define LOADPIN_IOC_SET_TRUSTED_VERITY_DIGESTS \ - _IOW(LOADPIN_IOC_MAGIC, 0x00, unsigned int) +#define LOADPIN_IOC_SET_TRUSTED_VERITY_DIGESTS _IOW(LOADPIN_IOC_MAGIC, 0x00, unsigned int) #endif /* _LINUX_LOOP_LOADPIN_H */ diff --git a/include/arch/x86_64/linux/loop.h b/include/arch/x86_64/linux/loop.h index e8d5fe08..d4adc1a9 100644 --- a/include/arch/x86_64/linux/loop.h +++ b/include/arch/x86_64/linux/loop.h @@ -25,9 +25,7 @@ enum { #define LOOP_SET_STATUS_CLEARABLE_FLAGS (LO_FLAGS_AUTOCLEAR) /* LO_FLAGS that can be set using LOOP_CONFIGURE */ -#define LOOP_CONFIGURE_SETTABLE_FLAGS \ - (LO_FLAGS_READ_ONLY | LO_FLAGS_AUTOCLEAR | LO_FLAGS_PARTSCAN | \ - LO_FLAGS_DIRECT_IO) +#define LOOP_CONFIGURE_SETTABLE_FLAGS (LO_FLAGS_READ_ONLY | LO_FLAGS_AUTOCLEAR | LO_FLAGS_PARTSCAN | LO_FLAGS_DIRECT_IO) #include /* for __kernel_old_dev_t */ #include /* for __u64 */ diff --git a/include/arch/x86_64/linux/lp.h b/include/arch/x86_64/linux/lp.h index fe78bd28..e41b3f52 100644 --- a/include/arch/x86_64/linux/lp.h +++ b/include/arch/x86_64/linux/lp.h @@ -99,9 +99,7 @@ #if __BITS_PER_LONG == 64 #define LPSETTIMEOUT LPSETTIMEOUT_OLD #else -#define LPSETTIMEOUT \ - (sizeof(time_t) > sizeof(__kernel_long_t) ? LPSETTIMEOUT_NEW : \ - LPSETTIMEOUT_OLD) +#define LPSETTIMEOUT (sizeof(time_t) > sizeof(__kernel_long_t) ? LPSETTIMEOUT_NEW : LPSETTIMEOUT_OLD) #endif /* timeout for printk'ing a timeout, in jiffies (100ths of a second). diff --git a/include/arch/x86_64/linux/major.h b/include/arch/x86_64/linux/major.h index 7f082880..ed1ec181 100644 --- a/include/arch/x86_64/linux/major.h +++ b/include/arch/x86_64/linux/major.h @@ -144,8 +144,7 @@ #define UNIX98_PTY_MASTER_MAJOR 128 #define UNIX98_PTY_MAJOR_COUNT 8 -#define UNIX98_PTY_SLAVE_MAJOR \ - (UNIX98_PTY_MASTER_MAJOR + UNIX98_PTY_MAJOR_COUNT) +#define UNIX98_PTY_SLAVE_MAJOR (UNIX98_PTY_MASTER_MAJOR + UNIX98_PTY_MAJOR_COUNT) #define DRBD_MAJOR 147 #define RTF_MAJOR 150 diff --git a/include/arch/x86_64/linux/map_to_14segment.h b/include/arch/x86_64/linux/map_to_14segment.h index 39feaa58..51e127fd 100644 --- a/include/arch/x86_64/linux/map_to_14segment.h +++ b/include/arch/x86_64/linux/map_to_14segment.h @@ -90,8 +90,7 @@ static __inline__ int map_to_seg14(struct seg14_conversion_map *map, int c) return __be16_to_cpu(map->table[c]); } -#define SEG14_CONVERSION_MAP(_name, _map) \ - struct seg14_conversion_map _name = { .table = { _map } } +#define SEG14_CONVERSION_MAP(_name, _map) struct seg14_conversion_map _name = { .table = { _map } } /* * It is recommended to use a facility that allows user space to redefine @@ -104,123 +103,113 @@ static __inline__ int map_to_seg14(struct seg14_conversion_map *map, int c) * ASCII conversion table ******************************************************************************/ -#define _SEG14(sym, a, b, c, d, e, f, g1, g2, h, j, k, l, m, n) \ - __cpu_to_be16(a << BIT_SEG14_A | b << BIT_SEG14_B | c << BIT_SEG14_C | \ - d << BIT_SEG14_D | e << BIT_SEG14_E | f << BIT_SEG14_F | \ - g1 << BIT_SEG14_G1 | g2 << BIT_SEG14_G2 | \ - h << BIT_SEG14_H | j << BIT_SEG14_I | k << BIT_SEG14_J | \ - l << BIT_SEG14_K | m << BIT_SEG14_L | n << BIT_SEG14_M) - -#define _MAP_0_32_ASCII_SEG14_NON_PRINTABLE \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -#define _MAP_33_47_ASCII_SEG14_SYMBOL \ - _SEG14('!', 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), \ - _SEG14('"', 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0), \ - _SEG14('#', 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0), \ - _SEG14('$', 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0), \ - _SEG14('%', 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0), \ - _SEG14('&', 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1), \ - _SEG14('\'', 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0), \ - _SEG14('(', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1), \ - _SEG14(')', 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0), \ - _SEG14('*', 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1), \ - _SEG14('+', 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0), \ - _SEG14(',', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0), \ - _SEG14('-', 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0), \ - _SEG14('.', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1), \ +#define _SEG14(sym, a, b, c, d, e, f, g1, g2, h, j, k, l, m, n) \ + __cpu_to_be16(a << BIT_SEG14_A | b << BIT_SEG14_B | c << BIT_SEG14_C | d << BIT_SEG14_D | e << BIT_SEG14_E | \ + f << BIT_SEG14_F | g1 << BIT_SEG14_G1 | g2 << BIT_SEG14_G2 | h << BIT_SEG14_H | \ + j << BIT_SEG14_I | k << BIT_SEG14_J | l << BIT_SEG14_K | m << BIT_SEG14_L | n << BIT_SEG14_M) + +#define _MAP_0_32_ASCII_SEG14_NON_PRINTABLE \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + +#define _MAP_33_47_ASCII_SEG14_SYMBOL \ + _SEG14('!', 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), _SEG14('"', 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0), \ + _SEG14('#', 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0), \ + _SEG14('$', 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0), \ + _SEG14('%', 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0), \ + _SEG14('&', 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1), \ + _SEG14('\'', 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0), \ + _SEG14('(', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1), \ + _SEG14(')', 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0), \ + _SEG14('*', 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1), \ + _SEG14('+', 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0), \ + _SEG14(',', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0), \ + _SEG14('-', 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0), \ + _SEG14('.', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1), \ _SEG14('/', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0), -#define _MAP_48_57_ASCII_SEG14_NUMERIC \ - _SEG14('0', 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0), \ - _SEG14('1', 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0), \ - _SEG14('2', 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0), \ - _SEG14('3', 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0), \ - _SEG14('4', 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0), \ - _SEG14('5', 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1), \ - _SEG14('6', 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0), \ - _SEG14('7', 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0), \ - _SEG14('8', 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0), \ +#define _MAP_48_57_ASCII_SEG14_NUMERIC \ + _SEG14('0', 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0), _SEG14('1', 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0), \ + _SEG14('2', 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0), \ + _SEG14('3', 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0), \ + _SEG14('4', 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0), \ + _SEG14('5', 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1), \ + _SEG14('6', 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0), \ + _SEG14('7', 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0), \ + _SEG14('8', 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0), \ _SEG14('9', 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0), -#define _MAP_58_64_ASCII_SEG14_SYMBOL \ - _SEG14(':', 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0), \ - _SEG14(';', 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0), \ - _SEG14('<', 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1), \ - _SEG14('=', 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0), \ - _SEG14('>', 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0), \ - _SEG14('?', 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0), \ +#define _MAP_58_64_ASCII_SEG14_SYMBOL \ + _SEG14(':', 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0), _SEG14(';', 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0), \ + _SEG14('<', 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1), \ + _SEG14('=', 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0), \ + _SEG14('>', 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0), \ + _SEG14('?', 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0), \ _SEG14('@', 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0), -#define _MAP_65_90_ASCII_SEG14_ALPHA_UPPER \ - _SEG14('A', 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0), \ - _SEG14('B', 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0), \ - _SEG14('C', 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0), \ - _SEG14('D', 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0), \ - _SEG14('E', 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0), \ - _SEG14('F', 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0), \ - _SEG14('G', 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0), \ - _SEG14('H', 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0), \ - _SEG14('I', 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0), \ - _SEG14('J', 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), \ - _SEG14('K', 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1), \ - _SEG14('L', 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0), \ - _SEG14('M', 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0), \ - _SEG14('N', 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1), \ - _SEG14('O', 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0), \ - _SEG14('P', 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0), \ - _SEG14('Q', 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1), \ - _SEG14('R', 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1), \ - _SEG14('S', 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0), \ - _SEG14('T', 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0), \ - _SEG14('U', 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0), \ - _SEG14('V', 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0), \ - _SEG14('W', 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1), \ - _SEG14('X', 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1), \ - _SEG14('Y', 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0), \ +#define _MAP_65_90_ASCII_SEG14_ALPHA_UPPER \ + _SEG14('A', 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0), _SEG14('B', 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0), \ + _SEG14('C', 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0), \ + _SEG14('D', 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0), \ + _SEG14('E', 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0), \ + _SEG14('F', 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0), \ + _SEG14('G', 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0), \ + _SEG14('H', 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0), \ + _SEG14('I', 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0), \ + _SEG14('J', 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), \ + _SEG14('K', 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1), \ + _SEG14('L', 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0), \ + _SEG14('M', 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0), \ + _SEG14('N', 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1), \ + _SEG14('O', 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0), \ + _SEG14('P', 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0), \ + _SEG14('Q', 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1), \ + _SEG14('R', 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1), \ + _SEG14('S', 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0), \ + _SEG14('T', 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0), \ + _SEG14('U', 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0), \ + _SEG14('V', 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0), \ + _SEG14('W', 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1), \ + _SEG14('X', 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1), \ + _SEG14('Y', 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0), \ _SEG14('Z', 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0), -#define _MAP_91_96_ASCII_SEG14_SYMBOL \ - _SEG14('[', 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0), \ - _SEG14('\\', 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), \ - _SEG14(']', 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), \ - _SEG14('^', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1), \ - _SEG14('_', 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), \ +#define _MAP_91_96_ASCII_SEG14_SYMBOL \ + _SEG14('[', 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0), _SEG14('\\', 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), \ + _SEG14(']', 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), \ + _SEG14('^', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1), \ + _SEG14('_', 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), \ _SEG14('`', 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0), -#define _MAP_97_122_ASCII_SEG14_ALPHA_LOWER \ - _SEG14('a', 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0), \ - _SEG14('b', 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1), \ - _SEG14('c', 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0), \ - _SEG14('d', 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0), \ - _SEG14('e', 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0), \ - _SEG14('f', 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0), \ - _SEG14('g', 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0), \ - _SEG14('h', 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0), \ - _SEG14('i', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0), \ - _SEG14('j', 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0), \ - _SEG14('k', 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1), \ - _SEG14('l', 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0), \ - _SEG14('m', 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0), \ - _SEG14('n', 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0), \ - _SEG14('o', 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0), \ - _SEG14('p', 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0), \ - _SEG14('q', 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0), \ - _SEG14('r', 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0), \ - _SEG14('s', 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1), \ - _SEG14('t', 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0), \ - _SEG14('u', 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0), \ - _SEG14('v', 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0), \ - _SEG14('w', 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1), \ - _SEG14('x', 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1), \ - _SEG14('y', 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0), \ +#define _MAP_97_122_ASCII_SEG14_ALPHA_LOWER \ + _SEG14('a', 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0), _SEG14('b', 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1), \ + _SEG14('c', 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0), \ + _SEG14('d', 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0), \ + _SEG14('e', 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0), \ + _SEG14('f', 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0), \ + _SEG14('g', 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0), \ + _SEG14('h', 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0), \ + _SEG14('i', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0), \ + _SEG14('j', 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0), \ + _SEG14('k', 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1), \ + _SEG14('l', 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0), \ + _SEG14('m', 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0), \ + _SEG14('n', 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0), \ + _SEG14('o', 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0), \ + _SEG14('p', 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0), \ + _SEG14('q', 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0), \ + _SEG14('r', 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0), \ + _SEG14('s', 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1), \ + _SEG14('t', 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0), \ + _SEG14('u', 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0), \ + _SEG14('v', 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0), \ + _SEG14('w', 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1), \ + _SEG14('x', 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1), \ + _SEG14('y', 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0), \ _SEG14('z', 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0), -#define _MAP_123_126_ASCII_SEG14_SYMBOL \ - _SEG14('{', 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0), \ - _SEG14('|', 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0), \ - _SEG14('}', 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1), \ +#define _MAP_123_126_ASCII_SEG14_SYMBOL \ + _SEG14('{', 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0), _SEG14('|', 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0), \ + _SEG14('}', 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1), \ _SEG14('~', 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0), /* Maps */ @@ -234,7 +223,6 @@ static __inline__ int map_to_seg14(struct seg14_conversion_map *map, int c) _MAP_97_122_ASCII_SEG14_ALPHA_LOWER \ _MAP_123_126_ASCII_SEG14_SYMBOL -#define SEG14_DEFAULT_MAP(_name) \ - SEG14_CONVERSION_MAP(_name, MAP_ASCII14SEG_ALPHANUM) +#define SEG14_DEFAULT_MAP(_name) SEG14_CONVERSION_MAP(_name, MAP_ASCII14SEG_ALPHANUM) #endif /* MAP_TO_14SEGMENT_H */ diff --git a/include/arch/x86_64/linux/map_to_7segment.h b/include/arch/x86_64/linux/map_to_7segment.h index 26fd2aa8..3b8b6987 100644 --- a/include/arch/x86_64/linux/map_to_7segment.h +++ b/include/arch/x86_64/linux/map_to_7segment.h @@ -71,8 +71,7 @@ static __inline__ int map_to_seg7(struct seg7_conversion_map *map, int c) return c >= 0 && c < sizeof(map->table) ? map->table[c] : -EINVAL; } -#define SEG7_CONVERSION_MAP(_name, _map) \ - struct seg7_conversion_map _name = { .table = { _map } } +#define SEG7_CONVERSION_MAP(_name, _map) struct seg7_conversion_map _name = { .table = { _map } } /* * It is recommended to use a facility that allows user space to redefine @@ -85,114 +84,59 @@ static __inline__ int map_to_seg7(struct seg7_conversion_map *map, int c) * ASCII conversion table ******************************************************************************/ -#define _SEG7(l, a, b, c, d, e, f, g) \ - (a << BIT_SEG7_A | b << BIT_SEG7_B | c << BIT_SEG7_C | \ - d << BIT_SEG7_D | e << BIT_SEG7_E | f << BIT_SEG7_F | \ +#define _SEG7(l, a, b, c, d, e, f, g) \ + (a << BIT_SEG7_A | b << BIT_SEG7_B | c << BIT_SEG7_C | d << BIT_SEG7_D | e << BIT_SEG7_E | f << BIT_SEG7_F | \ g << BIT_SEG7_G) -#define _MAP_0_32_ASCII_SEG7_NON_PRINTABLE \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -#define _MAP_33_47_ASCII_SEG7_SYMBOL \ - _SEG7('!', 0, 0, 0, 0, 1, 1, 0), _SEG7('"', 0, 1, 0, 0, 0, 1, 0), \ - _SEG7('#', 0, 1, 1, 0, 1, 1, 0), \ - _SEG7('$', 1, 0, 1, 1, 0, 1, 1), \ - _SEG7('%', 0, 0, 1, 0, 0, 1, 0), \ - _SEG7('&', 1, 0, 1, 1, 1, 1, 1), \ - _SEG7('\'', 0, 0, 0, 0, 0, 1, 0), \ - _SEG7('(', 1, 0, 0, 1, 1, 1, 0), \ - _SEG7(')', 1, 1, 1, 1, 0, 0, 0), \ - _SEG7('*', 0, 1, 1, 0, 1, 1, 1), \ - _SEG7('+', 0, 1, 1, 0, 0, 0, 1), \ - _SEG7(',', 0, 0, 0, 0, 1, 0, 0), \ - _SEG7('-', 0, 0, 0, 0, 0, 0, 1), \ - _SEG7('.', 0, 0, 0, 0, 1, 0, 0), \ - _SEG7('/', 0, 1, 0, 0, 1, 0, 1), - -#define _MAP_48_57_ASCII_SEG7_NUMERIC \ - _SEG7('0', 1, 1, 1, 1, 1, 1, 0), _SEG7('1', 0, 1, 1, 0, 0, 0, 0), \ - _SEG7('2', 1, 1, 0, 1, 1, 0, 1), \ - _SEG7('3', 1, 1, 1, 1, 0, 0, 1), \ - _SEG7('4', 0, 1, 1, 0, 0, 1, 1), \ - _SEG7('5', 1, 0, 1, 1, 0, 1, 1), \ - _SEG7('6', 1, 0, 1, 1, 1, 1, 1), \ - _SEG7('7', 1, 1, 1, 0, 0, 0, 0), \ - _SEG7('8', 1, 1, 1, 1, 1, 1, 1), \ +#define _MAP_0_32_ASCII_SEG7_NON_PRINTABLE \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + +#define _MAP_33_47_ASCII_SEG7_SYMBOL \ + _SEG7('!', 0, 0, 0, 0, 1, 1, 0), _SEG7('"', 0, 1, 0, 0, 0, 1, 0), _SEG7('#', 0, 1, 1, 0, 1, 1, 0), \ + _SEG7('$', 1, 0, 1, 1, 0, 1, 1), _SEG7('%', 0, 0, 1, 0, 0, 1, 0), _SEG7('&', 1, 0, 1, 1, 1, 1, 1), \ + _SEG7('\'', 0, 0, 0, 0, 0, 1, 0), _SEG7('(', 1, 0, 0, 1, 1, 1, 0), _SEG7(')', 1, 1, 1, 1, 0, 0, 0), \ + _SEG7('*', 0, 1, 1, 0, 1, 1, 1), _SEG7('+', 0, 1, 1, 0, 0, 0, 1), _SEG7(',', 0, 0, 0, 0, 1, 0, 0), \ + _SEG7('-', 0, 0, 0, 0, 0, 0, 1), _SEG7('.', 0, 0, 0, 0, 1, 0, 0), _SEG7('/', 0, 1, 0, 0, 1, 0, 1), + +#define _MAP_48_57_ASCII_SEG7_NUMERIC \ + _SEG7('0', 1, 1, 1, 1, 1, 1, 0), _SEG7('1', 0, 1, 1, 0, 0, 0, 0), _SEG7('2', 1, 1, 0, 1, 1, 0, 1), \ + _SEG7('3', 1, 1, 1, 1, 0, 0, 1), _SEG7('4', 0, 1, 1, 0, 0, 1, 1), _SEG7('5', 1, 0, 1, 1, 0, 1, 1), \ + _SEG7('6', 1, 0, 1, 1, 1, 1, 1), _SEG7('7', 1, 1, 1, 0, 0, 0, 0), _SEG7('8', 1, 1, 1, 1, 1, 1, 1), \ _SEG7('9', 1, 1, 1, 1, 0, 1, 1), -#define _MAP_58_64_ASCII_SEG7_SYMBOL \ - _SEG7(':', 0, 0, 0, 1, 0, 0, 1), _SEG7(';', 0, 0, 0, 1, 0, 0, 1), \ - _SEG7('<', 1, 0, 0, 0, 0, 1, 1), \ - _SEG7('=', 0, 0, 0, 1, 0, 0, 1), \ - _SEG7('>', 1, 1, 0, 0, 0, 0, 1), \ - _SEG7('?', 1, 1, 1, 0, 0, 1, 0), \ +#define _MAP_58_64_ASCII_SEG7_SYMBOL \ + _SEG7(':', 0, 0, 0, 1, 0, 0, 1), _SEG7(';', 0, 0, 0, 1, 0, 0, 1), _SEG7('<', 1, 0, 0, 0, 0, 1, 1), \ + _SEG7('=', 0, 0, 0, 1, 0, 0, 1), _SEG7('>', 1, 1, 0, 0, 0, 0, 1), _SEG7('?', 1, 1, 1, 0, 0, 1, 0), \ _SEG7('@', 1, 1, 0, 1, 1, 1, 1), -#define _MAP_65_90_ASCII_SEG7_ALPHA_UPPR \ - _SEG7('A', 1, 1, 1, 0, 1, 1, 1), _SEG7('B', 1, 1, 1, 1, 1, 1, 1), \ - _SEG7('C', 1, 0, 0, 1, 1, 1, 0), \ - _SEG7('D', 1, 1, 1, 1, 1, 1, 0), \ - _SEG7('E', 1, 0, 0, 1, 1, 1, 1), \ - _SEG7('F', 1, 0, 0, 0, 1, 1, 1), \ - _SEG7('G', 1, 1, 1, 1, 0, 1, 1), \ - _SEG7('H', 0, 1, 1, 0, 1, 1, 1), \ - _SEG7('I', 0, 1, 1, 0, 0, 0, 0), \ - _SEG7('J', 0, 1, 1, 1, 0, 0, 0), \ - _SEG7('K', 0, 1, 1, 0, 1, 1, 1), \ - _SEG7('L', 0, 0, 0, 1, 1, 1, 0), \ - _SEG7('M', 1, 1, 1, 0, 1, 1, 0), \ - _SEG7('N', 1, 1, 1, 0, 1, 1, 0), \ - _SEG7('O', 1, 1, 1, 1, 1, 1, 0), \ - _SEG7('P', 1, 1, 0, 0, 1, 1, 1), \ - _SEG7('Q', 1, 1, 1, 1, 1, 1, 0), \ - _SEG7('R', 1, 1, 1, 0, 1, 1, 1), \ - _SEG7('S', 1, 0, 1, 1, 0, 1, 1), \ - _SEG7('T', 0, 0, 0, 1, 1, 1, 1), \ - _SEG7('U', 0, 1, 1, 1, 1, 1, 0), \ - _SEG7('V', 0, 1, 1, 1, 1, 1, 0), \ - _SEG7('W', 0, 1, 1, 1, 1, 1, 1), \ - _SEG7('X', 0, 1, 1, 0, 1, 1, 1), \ - _SEG7('Y', 0, 1, 1, 0, 0, 1, 1), \ - _SEG7('Z', 1, 1, 0, 1, 1, 0, 1), - -#define _MAP_91_96_ASCII_SEG7_SYMBOL \ - _SEG7('[', 1, 0, 0, 1, 1, 1, 0), _SEG7('\\', 0, 0, 1, 0, 0, 1, 1), \ - _SEG7(']', 1, 1, 1, 1, 0, 0, 0), \ - _SEG7('^', 1, 1, 0, 0, 0, 1, 0), \ - _SEG7('_', 0, 0, 0, 1, 0, 0, 0), \ - _SEG7('`', 0, 1, 0, 0, 0, 0, 0), - -#define _MAP_97_122_ASCII_SEG7_ALPHA_LOWER \ - _SEG7('A', 1, 1, 1, 0, 1, 1, 1), _SEG7('b', 0, 0, 1, 1, 1, 1, 1), \ - _SEG7('c', 0, 0, 0, 1, 1, 0, 1), \ - _SEG7('d', 0, 1, 1, 1, 1, 0, 1), \ - _SEG7('E', 1, 0, 0, 1, 1, 1, 1), \ - _SEG7('F', 1, 0, 0, 0, 1, 1, 1), \ - _SEG7('G', 1, 1, 1, 1, 0, 1, 1), \ - _SEG7('h', 0, 0, 1, 0, 1, 1, 1), \ - _SEG7('i', 0, 0, 1, 0, 0, 0, 0), \ - _SEG7('j', 0, 0, 1, 1, 0, 0, 0), \ - _SEG7('k', 0, 0, 1, 0, 1, 1, 1), \ - _SEG7('L', 0, 0, 0, 1, 1, 1, 0), \ - _SEG7('M', 1, 1, 1, 0, 1, 1, 0), \ - _SEG7('n', 0, 0, 1, 0, 1, 0, 1), \ - _SEG7('o', 0, 0, 1, 1, 1, 0, 1), \ - _SEG7('P', 1, 1, 0, 0, 1, 1, 1), \ - _SEG7('q', 1, 1, 1, 0, 0, 1, 1), \ - _SEG7('r', 0, 0, 0, 0, 1, 0, 1), \ - _SEG7('S', 1, 0, 1, 1, 0, 1, 1), \ - _SEG7('T', 0, 0, 0, 1, 1, 1, 1), \ - _SEG7('u', 0, 0, 1, 1, 1, 0, 0), \ - _SEG7('v', 0, 0, 1, 1, 1, 0, 0), \ - _SEG7('W', 0, 1, 1, 1, 1, 1, 1), \ - _SEG7('X', 0, 1, 1, 0, 1, 1, 1), \ - _SEG7('y', 0, 1, 1, 1, 0, 1, 1), \ - _SEG7('Z', 1, 1, 0, 1, 1, 0, 1), - -#define _MAP_123_126_ASCII_SEG7_SYMBOL \ - _SEG7('{', 1, 0, 0, 1, 1, 1, 0), _SEG7('|', 0, 0, 0, 0, 1, 1, 0), \ - _SEG7('}', 1, 1, 1, 1, 0, 0, 0), \ +#define _MAP_65_90_ASCII_SEG7_ALPHA_UPPR \ + _SEG7('A', 1, 1, 1, 0, 1, 1, 1), _SEG7('B', 1, 1, 1, 1, 1, 1, 1), _SEG7('C', 1, 0, 0, 1, 1, 1, 0), \ + _SEG7('D', 1, 1, 1, 1, 1, 1, 0), _SEG7('E', 1, 0, 0, 1, 1, 1, 1), _SEG7('F', 1, 0, 0, 0, 1, 1, 1), \ + _SEG7('G', 1, 1, 1, 1, 0, 1, 1), _SEG7('H', 0, 1, 1, 0, 1, 1, 1), _SEG7('I', 0, 1, 1, 0, 0, 0, 0), \ + _SEG7('J', 0, 1, 1, 1, 0, 0, 0), _SEG7('K', 0, 1, 1, 0, 1, 1, 1), _SEG7('L', 0, 0, 0, 1, 1, 1, 0), \ + _SEG7('M', 1, 1, 1, 0, 1, 1, 0), _SEG7('N', 1, 1, 1, 0, 1, 1, 0), _SEG7('O', 1, 1, 1, 1, 1, 1, 0), \ + _SEG7('P', 1, 1, 0, 0, 1, 1, 1), _SEG7('Q', 1, 1, 1, 1, 1, 1, 0), _SEG7('R', 1, 1, 1, 0, 1, 1, 1), \ + _SEG7('S', 1, 0, 1, 1, 0, 1, 1), _SEG7('T', 0, 0, 0, 1, 1, 1, 1), _SEG7('U', 0, 1, 1, 1, 1, 1, 0), \ + _SEG7('V', 0, 1, 1, 1, 1, 1, 0), _SEG7('W', 0, 1, 1, 1, 1, 1, 1), _SEG7('X', 0, 1, 1, 0, 1, 1, 1), \ + _SEG7('Y', 0, 1, 1, 0, 0, 1, 1), _SEG7('Z', 1, 1, 0, 1, 1, 0, 1), + +#define _MAP_91_96_ASCII_SEG7_SYMBOL \ + _SEG7('[', 1, 0, 0, 1, 1, 1, 0), _SEG7('\\', 0, 0, 1, 0, 0, 1, 1), _SEG7(']', 1, 1, 1, 1, 0, 0, 0), \ + _SEG7('^', 1, 1, 0, 0, 0, 1, 0), _SEG7('_', 0, 0, 0, 1, 0, 0, 0), _SEG7('`', 0, 1, 0, 0, 0, 0, 0), + +#define _MAP_97_122_ASCII_SEG7_ALPHA_LOWER \ + _SEG7('A', 1, 1, 1, 0, 1, 1, 1), _SEG7('b', 0, 0, 1, 1, 1, 1, 1), _SEG7('c', 0, 0, 0, 1, 1, 0, 1), \ + _SEG7('d', 0, 1, 1, 1, 1, 0, 1), _SEG7('E', 1, 0, 0, 1, 1, 1, 1), _SEG7('F', 1, 0, 0, 0, 1, 1, 1), \ + _SEG7('G', 1, 1, 1, 1, 0, 1, 1), _SEG7('h', 0, 0, 1, 0, 1, 1, 1), _SEG7('i', 0, 0, 1, 0, 0, 0, 0), \ + _SEG7('j', 0, 0, 1, 1, 0, 0, 0), _SEG7('k', 0, 0, 1, 0, 1, 1, 1), _SEG7('L', 0, 0, 0, 1, 1, 1, 0), \ + _SEG7('M', 1, 1, 1, 0, 1, 1, 0), _SEG7('n', 0, 0, 1, 0, 1, 0, 1), _SEG7('o', 0, 0, 1, 1, 1, 0, 1), \ + _SEG7('P', 1, 1, 0, 0, 1, 1, 1), _SEG7('q', 1, 1, 1, 0, 0, 1, 1), _SEG7('r', 0, 0, 0, 0, 1, 0, 1), \ + _SEG7('S', 1, 0, 1, 1, 0, 1, 1), _SEG7('T', 0, 0, 0, 1, 1, 1, 1), _SEG7('u', 0, 0, 1, 1, 1, 0, 0), \ + _SEG7('v', 0, 0, 1, 1, 1, 0, 0), _SEG7('W', 0, 1, 1, 1, 1, 1, 1), _SEG7('X', 0, 1, 1, 0, 1, 1, 1), \ + _SEG7('y', 0, 1, 1, 1, 0, 1, 1), _SEG7('Z', 1, 1, 0, 1, 1, 0, 1), + +#define _MAP_123_126_ASCII_SEG7_SYMBOL \ + _SEG7('{', 1, 0, 0, 1, 1, 1, 0), _SEG7('|', 0, 0, 0, 0, 1, 1, 0), _SEG7('}', 1, 1, 1, 1, 0, 0, 0), \ _SEG7('~', 1, 0, 0, 0, 0, 0, 0), /* Maps */ @@ -226,7 +170,6 @@ static __inline__ int map_to_seg7(struct seg7_conversion_map *map, int c) _MAP_97_122_ASCII_SEG7_ALPHA_LOWER \ _MAP_123_126_ASCII_SEG7_SYMBOL -#define SEG7_DEFAULT_MAP(_name) \ - SEG7_CONVERSION_MAP(_name, MAP_ASCII7SEG_ALPHANUM) +#define SEG7_DEFAULT_MAP(_name) SEG7_CONVERSION_MAP(_name, MAP_ASCII7SEG_ALPHANUM) #endif /* MAP_TO_7SEGMENT_H */ diff --git a/include/arch/x86_64/linux/matroxfb.h b/include/arch/x86_64/linux/matroxfb.h index 7fa80b11..4c669f9f 100644 --- a/include/arch/x86_64/linux/matroxfb.h +++ b/include/arch/x86_64/linux/matroxfb.h @@ -33,10 +33,6 @@ struct matroxioc_output_mode { /* which outputs exist on this framebuffer */ #define MATROXFB_GET_ALL_OUTPUTS _IOR('n', 0xFB, size_t) -enum matroxfb_ctrl_id { - MATROXFB_CID_TESTOUT = V4L2_CID_PRIVATE_BASE, - MATROXFB_CID_DEFLICKER, - MATROXFB_CID_LAST -}; +enum matroxfb_ctrl_id { MATROXFB_CID_TESTOUT = V4L2_CID_PRIVATE_BASE, MATROXFB_CID_DEFLICKER, MATROXFB_CID_LAST }; #endif diff --git a/include/arch/x86_64/linux/mdio.h b/include/arch/x86_64/linux/mdio.h index a05b1eac..b802fbe8 100644 --- a/include/arch/x86_64/linux/mdio.h +++ b/include/arch/x86_64/linux/mdio.h @@ -60,37 +60,33 @@ /* Media-dependent registers. */ #define MDIO_PMA_10GBT_SWAPPOL 130 /* 10GBASE-T pair swap & polarity */ #define MDIO_PMA_10GBT_TXPWR 131 /* 10GBASE-T TX power control */ -#define MDIO_PMA_10GBT_SNR \ - 133 /* 10GBASE-T SNR margin, lane A. \ - * Lanes B-D are numbered 134-136. */ -#define MDIO_PMA_10GBR_FSRT_CSR \ - 147 /* 10GBASE-R fast retrain status and control */ -#define MDIO_PMA_10GBR_FECABLE 170 /* 10GBASE-R FEC ability */ -#define MDIO_PCS_10GBX_STAT1 24 /* 10GBASE-X PCS status 1 */ -#define MDIO_PCS_10GBRT_STAT1 32 /* 10GBASE-R/-T PCS status 1 */ -#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_B10L_PMA_CTRL 2294 /* 10BASE-T1L PMA control */ -#define MDIO_PMA_10T1L_STAT 2295 /* 10BASE-T1L PMA status */ -#define MDIO_PCS_10T1L_CTRL 2278 /* 10BASE-T1L PCS control */ -#define MDIO_PMA_PMD_BT1 18 /* BASE-T1 PMA/PMD extended ability */ -#define MDIO_AN_T1_CTRL 512 /* BASE-T1 AN control */ -#define MDIO_AN_T1_STAT 513 /* BASE-T1 AN status */ -#define MDIO_AN_T1_ADV_L 514 /* BASE-T1 AN advertisement register [15:0] */ -#define MDIO_AN_T1_ADV_M 515 /* BASE-T1 AN advertisement register [31:16] */ -#define MDIO_AN_T1_ADV_H 516 /* BASE-T1 AN advertisement register [47:32] */ -#define MDIO_AN_T1_LP_L \ - 517 /* BASE-T1 AN LP Base Page ability register [15:0] */ -#define MDIO_AN_T1_LP_M \ - 518 /* BASE-T1 AN LP Base Page ability register [31:16] */ -#define MDIO_AN_T1_LP_H \ - 519 /* BASE-T1 AN LP Base Page ability register [47:32] */ -#define MDIO_AN_10BT1_AN_CTRL 526 /* 10BASE-T1 AN control register */ -#define MDIO_AN_10BT1_AN_STAT 527 /* 10BASE-T1 AN status register */ -#define MDIO_PMA_PMD_BT1_CTRL 2100 /* BASE-T1 PMA/PMD control register */ -#define MDIO_PCS_1000BT1_CTRL 2304 /* 1000BASE-T1 PCS control register */ -#define MDIO_PCS_1000BT1_STAT 2305 /* 1000BASE-T1 PCS status register */ +#define MDIO_PMA_10GBT_SNR \ + 133 /* 10GBASE-T SNR margin, lane A. \ + * Lanes B-D are numbered 134-136. */ +#define MDIO_PMA_10GBR_FSRT_CSR 147 /* 10GBASE-R fast retrain status and control */ +#define MDIO_PMA_10GBR_FECABLE 170 /* 10GBASE-R FEC ability */ +#define MDIO_PCS_10GBX_STAT1 24 /* 10GBASE-X PCS status 1 */ +#define MDIO_PCS_10GBRT_STAT1 32 /* 10GBASE-R/-T PCS status 1 */ +#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_B10L_PMA_CTRL 2294 /* 10BASE-T1L PMA control */ +#define MDIO_PMA_10T1L_STAT 2295 /* 10BASE-T1L PMA status */ +#define MDIO_PCS_10T1L_CTRL 2278 /* 10BASE-T1L PCS control */ +#define MDIO_PMA_PMD_BT1 18 /* BASE-T1 PMA/PMD extended ability */ +#define MDIO_AN_T1_CTRL 512 /* BASE-T1 AN control */ +#define MDIO_AN_T1_STAT 513 /* BASE-T1 AN status */ +#define MDIO_AN_T1_ADV_L 514 /* BASE-T1 AN advertisement register [15:0] */ +#define MDIO_AN_T1_ADV_M 515 /* BASE-T1 AN advertisement register [31:16] */ +#define MDIO_AN_T1_ADV_H 516 /* BASE-T1 AN advertisement register [47:32] */ +#define MDIO_AN_T1_LP_L 517 /* BASE-T1 AN LP Base Page ability register [15:0] */ +#define MDIO_AN_T1_LP_M 518 /* BASE-T1 AN LP Base Page ability register [31:16] */ +#define MDIO_AN_T1_LP_H 519 /* BASE-T1 AN LP Base Page ability register [47:32] */ +#define MDIO_AN_10BT1_AN_CTRL 526 /* 10BASE-T1 AN control register */ +#define MDIO_AN_10BT1_AN_STAT 527 /* 10BASE-T1 AN status register */ +#define MDIO_PMA_PMD_BT1_CTRL 2100 /* BASE-T1 PMA/PMD control register */ +#define MDIO_PCS_1000BT1_CTRL 2304 /* 1000BASE-T1 PCS control register */ +#define MDIO_PCS_1000BT1_STAT 2305 /* 1000BASE-T1 PCS status register */ /* LASI (Link Alarm Status Interrupt) registers, defined by XENPAK MSA. */ #define MDIO_PMA_LASI_RXCTRL 0x9000 /* RX_ALARM control */ @@ -305,11 +301,10 @@ #define MDIO_PCS_10GBRT_STAT2_BER 0x3f00 /* AN 10GBASE-T control register. */ -#define MDIO_AN_10GBT_CTRL_ADVFSRT2_5G \ - 0x0020 /* Advertise 2.5GBASE-T fast retrain */ -#define MDIO_AN_10GBT_CTRL_ADV2_5G 0x0080 /* Advertise 2.5GBASE-T */ -#define MDIO_AN_10GBT_CTRL_ADV5G 0x0100 /* Advertise 5GBASE-T */ -#define MDIO_AN_10GBT_CTRL_ADV10G 0x1000 /* Advertise 10GBASE-T */ +#define MDIO_AN_10GBT_CTRL_ADVFSRT2_5G 0x0020 /* Advertise 2.5GBASE-T fast retrain */ +#define MDIO_AN_10GBT_CTRL_ADV2_5G 0x0080 /* Advertise 2.5GBASE-T */ +#define MDIO_AN_10GBT_CTRL_ADV5G 0x0100 /* Advertise 5GBASE-T */ +#define MDIO_AN_10GBT_CTRL_ADV10G 0x1000 /* Advertise 10GBASE-T */ /* AN 10GBASE-T status register. */ #define MDIO_AN_10GBT_STAT_LP2_5G 0x0020 /* LP is 2.5GBT capable */ @@ -331,16 +326,14 @@ #define MDIO_PMA_10T1L_CTRL_PMA_RST 0x8000 /* MA reset */ /* 10BASE-T1L PMA status register. */ -#define MDIO_PMA_10T1L_STAT_LINK 0x0001 /* PMA receive link up */ -#define MDIO_PMA_10T1L_STAT_FAULT 0x0002 /* Fault condition detected */ -#define MDIO_PMA_10T1L_STAT_POLARITY 0x0004 /* Receive polarity is reversed */ -#define MDIO_PMA_10T1L_STAT_RECV_FAULT \ - 0x0200 /* Able to detect fault on receive path */ -#define MDIO_PMA_10T1L_STAT_EEE 0x0400 /* PHY has EEE ability */ -#define MDIO_PMA_10T1L_STAT_LOW_POWER 0x0800 /* PMA has low-power ability */ -#define MDIO_PMA_10T1L_STAT_2V4_ABLE \ - 0x1000 /* PHY has 2.4 Vpp operating mode ability */ -#define MDIO_PMA_10T1L_STAT_LB_ABLE 0x2000 /* PHY has loopback ability */ +#define MDIO_PMA_10T1L_STAT_LINK 0x0001 /* PMA receive link up */ +#define MDIO_PMA_10T1L_STAT_FAULT 0x0002 /* Fault condition detected */ +#define MDIO_PMA_10T1L_STAT_POLARITY 0x0004 /* Receive polarity is reversed */ +#define MDIO_PMA_10T1L_STAT_RECV_FAULT 0x0200 /* Able to detect fault on receive path */ +#define MDIO_PMA_10T1L_STAT_EEE 0x0400 /* PHY has EEE ability */ +#define MDIO_PMA_10T1L_STAT_LOW_POWER 0x0800 /* PMA has low-power ability */ +#define MDIO_PMA_10T1L_STAT_2V4_ABLE 0x1000 /* PHY has 2.4 Vpp operating mode ability */ +#define MDIO_PMA_10T1L_STAT_LB_ABLE 0x2000 /* PHY has loopback ability */ /* 10BASE-T1L PCS control register. */ #define MDIO_PCS_10T1L_CTRL_LB 0x4000 /* Enable PCS level loopback mode */ @@ -362,24 +355,21 @@ #define MDIO_AN_T1_ADV_L_NEXT_PAGE_REQ ADVERTISE_NPAGE /* BASE-T1 auto-negotiation advertisement register [31:16] */ -#define MDIO_AN_T1_ADV_M_B10L \ - 0x4000 /* device is compatible with 10BASE-T1L \ - */ +#define MDIO_AN_T1_ADV_M_B10L \ + 0x4000 /* device is compatible with 10BASE-T1L \ + */ #define MDIO_AN_T1_ADV_M_1000BT1 0x0080 /* advertise 1000BASE-T1 */ #define MDIO_AN_T1_ADV_M_100BT1 0x0020 /* advertise 100BASE-T1 */ #define MDIO_AN_T1_ADV_M_MST 0x0010 /* advertise master preference */ /* BASE-T1 auto-negotiation advertisement register [47:32] */ -#define MDIO_AN_T1_ADV_H_10L_TX_HI_REQ \ - 0x1000 /* 10BASE-T1L High Level Transmit Request */ -#define MDIO_AN_T1_ADV_H_10L_TX_HI \ - 0x2000 /* 10BASE-T1L High Level Transmit Ability */ +#define MDIO_AN_T1_ADV_H_10L_TX_HI_REQ 0x1000 /* 10BASE-T1L High Level Transmit Request */ +#define MDIO_AN_T1_ADV_H_10L_TX_HI 0x2000 /* 10BASE-T1L High Level Transmit Ability */ /* BASE-T1 AN LP Base Page ability register [15:0] */ -#define MDIO_AN_T1_LP_L_PAUSE_CAP LPA_PAUSE_CAP -#define MDIO_AN_T1_LP_L_PAUSE_ASYM LPA_PAUSE_ASYM -#define MDIO_AN_T1_LP_L_FORCE_MS \ - 0x1000 /* LP Force Master/slave Configuration */ +#define MDIO_AN_T1_LP_L_PAUSE_CAP LPA_PAUSE_CAP +#define MDIO_AN_T1_LP_L_PAUSE_ASYM LPA_PAUSE_ASYM +#define MDIO_AN_T1_LP_L_FORCE_MS 0x1000 /* LP Force Master/slave Configuration */ #define MDIO_AN_T1_LP_L_REMOTE_FAULT LPA_RFAULT #define MDIO_AN_T1_LP_L_ACK LPA_LPACK #define MDIO_AN_T1_LP_L_NEXT_PAGE_REQ LPA_NPAGE @@ -389,18 +379,14 @@ #define MDIO_AN_T1_LP_M_B10L 0x4000 /* LP is compatible with 10BASE-T1L */ /* BASE-T1 AN LP Base Page ability register [47:32] */ -#define MDIO_AN_T1_LP_H_10L_TX_HI_REQ \ - 0x1000 /* 10BASE-T1L High Level LP Transmit Request */ -#define MDIO_AN_T1_LP_H_10L_TX_HI \ - 0x2000 /* 10BASE-T1L High Level LP Transmit Ability */ +#define MDIO_AN_T1_LP_H_10L_TX_HI_REQ 0x1000 /* 10BASE-T1L High Level LP Transmit Request */ +#define MDIO_AN_T1_LP_H_10L_TX_HI 0x2000 /* 10BASE-T1L High Level LP Transmit Ability */ /* 10BASE-T1 AN control register */ -#define MDIO_AN_10BT1_AN_CTRL_ADV_EEE_T1L \ - 0x4000 /* 10BASE-T1L EEE ability advertisement */ +#define MDIO_AN_10BT1_AN_CTRL_ADV_EEE_T1L 0x4000 /* 10BASE-T1L EEE ability advertisement */ /* 10BASE-T1 AN status register */ -#define MDIO_AN_10BT1_AN_STAT_LPA_EEE_T1L \ - 0x4000 /* 10BASE-T1L LP EEE ability advertisement */ +#define MDIO_AN_10BT1_AN_STAT_LPA_EEE_T1L 0x4000 /* 10BASE-T1L LP EEE ability advertisement */ /* BASE-T1 PMA/PMD control register */ #define MDIO_PMA_PMD_BT1_CTRL_STRAP 0x000F /* Type selection (Strap) */ @@ -408,10 +394,9 @@ #define MDIO_PMA_PMD_BT1_CTRL_CFG_MST 0x4000 /* MASTER-SLAVE config value */ /* 1000BASE-T1 PCS control register */ -#define MDIO_PCS_1000BT1_CTRL_LOW_POWER 0x0800 /* Low power mode */ -#define MDIO_PCS_1000BT1_CTRL_DISABLE_TX \ - 0x4000 /* Global PMA transmit disable */ -#define MDIO_PCS_1000BT1_CTRL_RESET 0x8000 /* Software reset value */ +#define MDIO_PCS_1000BT1_CTRL_LOW_POWER 0x0800 /* Low power mode */ +#define MDIO_PCS_1000BT1_CTRL_DISABLE_TX 0x4000 /* Global PMA transmit disable */ +#define MDIO_PCS_1000BT1_CTRL_RESET 0x8000 /* Software reset value */ /* 1000BASE-T1 PCS status register */ #define MDIO_PCS_1000BT1_STAT_LINK 0x0004 /* PCS Link is up */ @@ -473,11 +458,10 @@ /* Mapping between MDIO PRTAD/DEVAD and mii_ioctl_data::phy_id */ -#define MDIO_PHY_ID_C45 0x8000 -#define MDIO_PHY_ID_PRTAD 0x03e0 -#define MDIO_PHY_ID_DEVAD 0x001f -#define MDIO_PHY_ID_C45_MASK \ - (MDIO_PHY_ID_C45 | MDIO_PHY_ID_PRTAD | MDIO_PHY_ID_DEVAD) +#define MDIO_PHY_ID_C45 0x8000 +#define MDIO_PHY_ID_PRTAD 0x03e0 +#define MDIO_PHY_ID_DEVAD 0x001f +#define MDIO_PHY_ID_C45_MASK (MDIO_PHY_ID_C45 | MDIO_PHY_ID_PRTAD | MDIO_PHY_ID_DEVAD) static __inline__ __u16 mdio_phy_id_c45(int prtad, int devad) { diff --git a/include/arch/x86_64/linux/media.h b/include/arch/x86_64/linux/media.h index eb82a4e5..de46f3ff 100644 --- a/include/arch/x86_64/linux/media.h +++ b/include/arch/x86_64/linux/media.h @@ -274,8 +274,7 @@ struct media_links_enum { * The media_version argument comes from the media_version field in * struct media_device_info. */ -#define MEDIA_V2_ENTITY_HAS_FLAGS(media_version) \ - ((media_version) >= ((4U << 16) | (19U << 8) | 0U)) +#define MEDIA_V2_ENTITY_HAS_FLAGS(media_version) ((media_version) >= ((4U << 16) | (19U << 8) | 0U)) struct media_v2_entity { __u32 id; @@ -309,8 +308,7 @@ struct media_v2_interface { * The media_version argument comes from the media_version field in * struct media_device_info. */ -#define MEDIA_V2_PAD_HAS_INDEX(media_version) \ - ((media_version) >= ((4U << 16) | (19U << 8) | 0U)) +#define MEDIA_V2_PAD_HAS_INDEX(media_version) ((media_version) >= ((4U << 16) | (19U << 8) | 0U)) struct media_v2_pad { __u32 id; @@ -376,8 +374,7 @@ struct media_v2_topology { #define MEDIA_ENT_TYPE_MASK 0x00ff0000 #define MEDIA_ENT_SUBTYPE_MASK 0x0000ffff -#define MEDIA_ENT_T_DEVNODE_UNKNOWN \ - (MEDIA_ENT_F_OLD_BASE | MEDIA_ENT_SUBTYPE_MASK) +#define MEDIA_ENT_T_DEVNODE_UNKNOWN (MEDIA_ENT_F_OLD_BASE | MEDIA_ENT_SUBTYPE_MASK) #define MEDIA_ENT_T_DEVNODE MEDIA_ENT_F_OLD_BASE #define MEDIA_ENT_T_DEVNODE_V4L MEDIA_ENT_F_IO_V4L diff --git a/include/arch/x86_64/linux/media/amlogic/c3-isp-config.h b/include/arch/x86_64/linux/media/amlogic/c3-isp-config.h index 8fbb487d..7dfac291 100644 --- a/include/arch/x86_64/linux/media/amlogic/c3-isp-config.h +++ b/include/arch/x86_64/linux/media/amlogic/c3-isp-config.h @@ -485,14 +485,11 @@ struct c3_isp_params_blc { * a buffer sized appropriately to accommodate userspace attempting to set all * possible parameters in a single frame. */ -#define C3_ISP_PARAMS_MAX_SIZE \ - (sizeof(struct c3_isp_params_awb_gains) + \ - sizeof(struct c3_isp_params_awb_config) + \ - sizeof(struct c3_isp_params_ae_config) + \ - sizeof(struct c3_isp_params_af_config) + \ - sizeof(struct c3_isp_params_pst_gamma) + \ - sizeof(struct c3_isp_params_ccm) + sizeof(struct c3_isp_params_csc) + \ - sizeof(struct c3_isp_params_blc)) +#define C3_ISP_PARAMS_MAX_SIZE \ + (sizeof(struct c3_isp_params_awb_gains) + sizeof(struct c3_isp_params_awb_config) + \ + sizeof(struct c3_isp_params_ae_config) + sizeof(struct c3_isp_params_af_config) + \ + sizeof(struct c3_isp_params_pst_gamma) + sizeof(struct c3_isp_params_ccm) + \ + sizeof(struct c3_isp_params_csc) + sizeof(struct c3_isp_params_blc)) /** * struct c3_isp_params_cfg - C3 ISP configuration parameters diff --git a/include/arch/x86_64/linux/media/raspberrypi/pisp_be_config.h b/include/arch/x86_64/linux/media/raspberrypi/pisp_be_config.h index a8c292a3..67c2b6c7 100644 --- a/include/arch/x86_64/linux/media/raspberrypi/pisp_be_config.h +++ b/include/arch/x86_64/linux/media/raspberrypi/pisp_be_config.h @@ -88,11 +88,7 @@ enum pisp_be_rgb_enable { * We use the enable flags to show when blocks are "dirty", but we need some * extra ones too. */ -enum pisp_be_dirty { - PISP_BE_DIRTY_GLOBAL = 0x0001, - PISP_BE_DIRTY_SH_FC_COMBINE = 0x0002, - PISP_BE_DIRTY_CROP = 0x0004 -}; +enum pisp_be_dirty { PISP_BE_DIRTY_GLOBAL = 0x0001, PISP_BE_DIRTY_SH_FC_COMBINE = 0x0002, PISP_BE_DIRTY_CROP = 0x0004 }; /** * struct pisp_be_global_config - PiSP global enable bitmaps @@ -683,8 +679,7 @@ enum pisp_be_transform { PISP_BE_TRANSFORM_NONE = 0x0, PISP_BE_TRANSFORM_HFLIP = 0x1, PISP_BE_TRANSFORM_VFLIP = 0x2, - PISP_BE_TRANSFORM_ROT180 = - (PISP_BE_TRANSFORM_HFLIP | PISP_BE_TRANSFORM_VFLIP) + PISP_BE_TRANSFORM_ROT180 = (PISP_BE_TRANSFORM_HFLIP | PISP_BE_TRANSFORM_VFLIP) }; struct pisp_be_output_format_config { @@ -782,8 +777,7 @@ struct pisp_be_config { struct pisp_be_stitch_input_buffer_config stitch_input_buffer; struct pisp_be_tdn_output_buffer_config tdn_output_buffer; struct pisp_be_stitch_output_buffer_config stitch_output_buffer; - struct pisp_be_output_buffer_config - output_buffer[PISP_BACK_END_NUM_OUTPUTS]; + struct pisp_be_output_buffer_config output_buffer[PISP_BACK_END_NUM_OUTPUTS]; struct pisp_be_hog_buffer_config hog_buffer; /* Processing configuration: */ struct pisp_be_global_config global; @@ -821,15 +815,13 @@ struct pisp_be_config { struct pisp_be_ccm_config csc[PISP_BACK_END_NUM_OUTPUTS]; struct pisp_be_downscale_config downscale[PISP_BACK_END_NUM_OUTPUTS]; struct pisp_be_resample_config resample[PISP_BACK_END_NUM_OUTPUTS]; - struct pisp_be_output_format_config - output_format[PISP_BACK_END_NUM_OUTPUTS]; + struct pisp_be_output_format_config output_format[PISP_BACK_END_NUM_OUTPUTS]; struct pisp_be_hog_config hog; struct pisp_be_axi_config axi; /* Non-register fields: */ struct pisp_be_lsc_extra lsc_extra; struct pisp_be_cac_extra cac_extra; - struct pisp_be_downscale_extra - downscale_extra[PISP_BACK_END_NUM_OUTPUTS]; + struct pisp_be_downscale_extra downscale_extra[PISP_BACK_END_NUM_OUTPUTS]; struct pisp_be_resample_extra resample_extra[PISP_BACK_END_NUM_OUTPUTS]; struct pisp_be_crop_config crop; struct pisp_image_format_config hog_format; diff --git a/include/arch/x86_64/linux/media/raspberrypi/pisp_common.h b/include/arch/x86_64/linux/media/raspberrypi/pisp_common.h index ab172063..8df0f23a 100644 --- a/include/arch/x86_64/linux/media/raspberrypi/pisp_common.h +++ b/include/arch/x86_64/linux/media/raspberrypi/pisp_common.h @@ -88,59 +88,36 @@ enum pisp_image_format { /* Lastly a few specific instantiations of the above. */ PISP_IMAGE_FORMAT_SINGLE_16 = PISP_IMAGE_FORMAT_BPS_16, - PISP_IMAGE_FORMAT_THREE_16 = PISP_IMAGE_FORMAT_BPS_16 | - PISP_IMAGE_FORMAT_THREE_CHANNEL + PISP_IMAGE_FORMAT_THREE_16 = PISP_IMAGE_FORMAT_BPS_16 | PISP_IMAGE_FORMAT_THREE_CHANNEL }; -#define PISP_IMAGE_FORMAT_BPS_8(fmt) \ - (((fmt) & PISP_IMAGE_FORMAT_BPS_MASK) == PISP_IMAGE_FORMAT_BPS_8) -#define PISP_IMAGE_FORMAT_BPS_10(fmt) \ - (((fmt) & PISP_IMAGE_FORMAT_BPS_MASK) == PISP_IMAGE_FORMAT_BPS_10) -#define PISP_IMAGE_FORMAT_BPS_12(fmt) \ - (((fmt) & PISP_IMAGE_FORMAT_BPS_MASK) == PISP_IMAGE_FORMAT_BPS_12) -#define PISP_IMAGE_FORMAT_BPS_16(fmt) \ - (((fmt) & PISP_IMAGE_FORMAT_BPS_MASK) == PISP_IMAGE_FORMAT_BPS_16) -#define PISP_IMAGE_FORMAT_BPS(fmt) \ - (((fmt) & PISP_IMAGE_FORMAT_BPS_MASK) ? \ - 8 + (2 << (((fmt) & PISP_IMAGE_FORMAT_BPS_MASK) - 1)) : \ - 8) -#define PISP_IMAGE_FORMAT_SHIFT(fmt) \ - (((fmt) & PISP_IMAGE_FORMAT_SHIFT_MASK) / PISP_IMAGE_FORMAT_SHIFT_1) -#define PISP_IMAGE_FORMAT_THREE_CHANNEL(fmt) \ - ((fmt) & PISP_IMAGE_FORMAT_THREE_CHANNEL) -#define PISP_IMAGE_FORMAT_SINGLE_CHANNEL(fmt) \ - (!((fmt) & PISP_IMAGE_FORMAT_THREE_CHANNEL)) -#define PISP_IMAGE_FORMAT_COMPRESSED(fmt) \ - (((fmt) & PISP_IMAGE_FORMAT_COMPRESSION_MASK) != \ - PISP_IMAGE_FORMAT_UNCOMPRESSED) -#define PISP_IMAGE_FORMAT_SAMPLING_444(fmt) \ - (((fmt) & PISP_IMAGE_FORMAT_SAMPLING_MASK) == \ - PISP_IMAGE_FORMAT_SAMPLING_444) -#define PISP_IMAGE_FORMAT_SAMPLING_422(fmt) \ - (((fmt) & PISP_IMAGE_FORMAT_SAMPLING_MASK) == \ - PISP_IMAGE_FORMAT_SAMPLING_422) -#define PISP_IMAGE_FORMAT_SAMPLING_420(fmt) \ - (((fmt) & PISP_IMAGE_FORMAT_SAMPLING_MASK) == \ - PISP_IMAGE_FORMAT_SAMPLING_420) -#define PISP_IMAGE_FORMAT_ORDER_NORMAL(fmt) \ - (!((fmt) & PISP_IMAGE_FORMAT_ORDER_SWAPPED)) -#define PISP_IMAGE_FORMAT_ORDER_SWAPPED(fmt) \ - ((fmt) & PISP_IMAGE_FORMAT_ORDER_SWAPPED) -#define PISP_IMAGE_FORMAT_INTERLEAVED(fmt) \ - (((fmt) & PISP_IMAGE_FORMAT_PLANARITY_MASK) == \ - PISP_IMAGE_FORMAT_PLANARITY_INTERLEAVED) -#define PISP_IMAGE_FORMAT_SEMIPLANAR(fmt) \ - (((fmt) & PISP_IMAGE_FORMAT_PLANARITY_MASK) == \ - PISP_IMAGE_FORMAT_PLANARITY_SEMI_PLANAR) -#define PISP_IMAGE_FORMAT_PLANAR(fmt) \ - (((fmt) & PISP_IMAGE_FORMAT_PLANARITY_MASK) == \ - PISP_IMAGE_FORMAT_PLANARITY_PLANAR) -#define PISP_IMAGE_FORMAT_WALLPAPER(fmt) \ - ((fmt) & PISP_IMAGE_FORMAT_WALLPAPER_ROLL) -#define PISP_IMAGE_FORMAT_BPP_32(fmt) ((fmt) & PISP_IMAGE_FORMAT_BPP_32) -#define PISP_IMAGE_FORMAT_HOG(fmt) \ - ((fmt) & \ - (PISP_IMAGE_FORMAT_HOG_SIGNED | PISP_IMAGE_FORMAT_HOG_UNSIGNED)) +#define PISP_IMAGE_FORMAT_BPS_8(fmt) (((fmt) & PISP_IMAGE_FORMAT_BPS_MASK) == PISP_IMAGE_FORMAT_BPS_8) +#define PISP_IMAGE_FORMAT_BPS_10(fmt) (((fmt) & PISP_IMAGE_FORMAT_BPS_MASK) == PISP_IMAGE_FORMAT_BPS_10) +#define PISP_IMAGE_FORMAT_BPS_12(fmt) (((fmt) & PISP_IMAGE_FORMAT_BPS_MASK) == PISP_IMAGE_FORMAT_BPS_12) +#define PISP_IMAGE_FORMAT_BPS_16(fmt) (((fmt) & PISP_IMAGE_FORMAT_BPS_MASK) == PISP_IMAGE_FORMAT_BPS_16) +#define PISP_IMAGE_FORMAT_BPS(fmt) \ + (((fmt) & PISP_IMAGE_FORMAT_BPS_MASK) ? 8 + (2 << (((fmt) & PISP_IMAGE_FORMAT_BPS_MASK) - 1)) : 8) +#define PISP_IMAGE_FORMAT_SHIFT(fmt) (((fmt) & PISP_IMAGE_FORMAT_SHIFT_MASK) / PISP_IMAGE_FORMAT_SHIFT_1) +#define PISP_IMAGE_FORMAT_THREE_CHANNEL(fmt) ((fmt) & PISP_IMAGE_FORMAT_THREE_CHANNEL) +#define PISP_IMAGE_FORMAT_SINGLE_CHANNEL(fmt) (!((fmt) & PISP_IMAGE_FORMAT_THREE_CHANNEL)) +#define PISP_IMAGE_FORMAT_COMPRESSED(fmt) \ + (((fmt) & PISP_IMAGE_FORMAT_COMPRESSION_MASK) != PISP_IMAGE_FORMAT_UNCOMPRESSED) +#define PISP_IMAGE_FORMAT_SAMPLING_444(fmt) \ + (((fmt) & PISP_IMAGE_FORMAT_SAMPLING_MASK) == PISP_IMAGE_FORMAT_SAMPLING_444) +#define PISP_IMAGE_FORMAT_SAMPLING_422(fmt) \ + (((fmt) & PISP_IMAGE_FORMAT_SAMPLING_MASK) == PISP_IMAGE_FORMAT_SAMPLING_422) +#define PISP_IMAGE_FORMAT_SAMPLING_420(fmt) \ + (((fmt) & PISP_IMAGE_FORMAT_SAMPLING_MASK) == PISP_IMAGE_FORMAT_SAMPLING_420) +#define PISP_IMAGE_FORMAT_ORDER_NORMAL(fmt) (!((fmt) & PISP_IMAGE_FORMAT_ORDER_SWAPPED)) +#define PISP_IMAGE_FORMAT_ORDER_SWAPPED(fmt) ((fmt) & PISP_IMAGE_FORMAT_ORDER_SWAPPED) +#define PISP_IMAGE_FORMAT_INTERLEAVED(fmt) \ + (((fmt) & PISP_IMAGE_FORMAT_PLANARITY_MASK) == PISP_IMAGE_FORMAT_PLANARITY_INTERLEAVED) +#define PISP_IMAGE_FORMAT_SEMIPLANAR(fmt) \ + (((fmt) & PISP_IMAGE_FORMAT_PLANARITY_MASK) == PISP_IMAGE_FORMAT_PLANARITY_SEMI_PLANAR) +#define PISP_IMAGE_FORMAT_PLANAR(fmt) (((fmt) & PISP_IMAGE_FORMAT_PLANARITY_MASK) == PISP_IMAGE_FORMAT_PLANARITY_PLANAR) +#define PISP_IMAGE_FORMAT_WALLPAPER(fmt) ((fmt) & PISP_IMAGE_FORMAT_WALLPAPER_ROLL) +#define PISP_IMAGE_FORMAT_BPP_32(fmt) ((fmt) & PISP_IMAGE_FORMAT_BPP_32) +#define PISP_IMAGE_FORMAT_HOG(fmt) ((fmt) & (PISP_IMAGE_FORMAT_HOG_SIGNED | PISP_IMAGE_FORMAT_HOG_UNSIGNED)) #define PISP_WALLPAPER_WIDTH 128 /* in bytes */ diff --git a/include/arch/x86_64/linux/media/raspberrypi/pisp_fe_config.h b/include/arch/x86_64/linux/media/raspberrypi/pisp_fe_config.h index cce9e926..aba7556f 100644 --- a/include/arch/x86_64/linux/media/raspberrypi/pisp_fe_config.h +++ b/include/arch/x86_64/linux/media/raspberrypi/pisp_fe_config.h @@ -179,8 +179,7 @@ struct pisp_fe_floating_stats_region { } __attribute__((packed)); struct pisp_fe_floating_stats_config { - struct pisp_fe_floating_stats_region - regions[PISP_FLOATING_STATS_NUM_ZONES]; + struct pisp_fe_floating_stats_region regions[PISP_FLOATING_STATS_NUM_ZONES]; } __attribute__((packed)); #define PISP_FE_CDAF_NUM_WEIGHTS 8 diff --git a/include/arch/x86_64/linux/mei.h b/include/arch/x86_64/linux/mei.h index 8becbd0d..b9d27702 100644 --- a/include/arch/x86_64/linux/mei.h +++ b/include/arch/x86_64/linux/mei.h @@ -26,8 +26,7 @@ * (FW protocol version and max message size). * */ -#define IOCTL_MEI_CONNECT_CLIENT \ - _IOWR('H', 0x01, struct mei_connect_client_data) +#define IOCTL_MEI_CONNECT_CLIENT _IOWR('H', 0x01, struct mei_connect_client_data) /* * Intel MEI client information struct @@ -113,7 +112,6 @@ struct mei_connect_client_data_vtag { * Clients that do not support tagged connection * will respond with -EOPNOTSUPP. */ -#define IOCTL_MEI_CONNECT_CLIENT_VTAG \ - _IOWR('H', 0x04, struct mei_connect_client_data_vtag) +#define IOCTL_MEI_CONNECT_CLIENT_VTAG _IOWR('H', 0x04, struct mei_connect_client_data_vtag) #endif /* _LINUX_MEI_H */ diff --git a/include/arch/x86_64/linux/mei_uuid.h b/include/arch/x86_64/linux/mei_uuid.h index 7c49688e..1f0116c8 100644 --- a/include/arch/x86_64/linux/mei_uuid.h +++ b/include/arch/x86_64/linux/mei_uuid.h @@ -15,14 +15,11 @@ typedef struct { __u8 b[16]; } uuid_le; -#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_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 NULL_UUID_LE \ - UUID_LE(0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00) +#define NULL_UUID_LE UUID_LE(0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00) #endif /* _LINUX_MEI_UUID_H_ */ diff --git a/include/arch/x86_64/linux/mempolicy.h b/include/arch/x86_64/linux/mempolicy.h index 3e1b25c9..e9e54747 100644 --- a/include/arch/x86_64/linux/mempolicy.h +++ b/include/arch/x86_64/linux/mempolicy.h @@ -29,15 +29,13 @@ enum { /* Flags for set_mempolicy */ #define MPOL_F_STATIC_NODES (1 << 15) #define MPOL_F_RELATIVE_NODES (1 << 14) -#define MPOL_F_NUMA_BALANCING \ - (1 << 13) /* Optimize with NUMA balancing if possible */ +#define MPOL_F_NUMA_BALANCING (1 << 13) /* Optimize with NUMA balancing if possible */ /* * MPOL_MODE_FLAGS is the union of all possible optional mode flags passed to * either set_mempolicy() or mbind(). */ -#define MPOL_MODE_FLAGS \ - (MPOL_F_STATIC_NODES | MPOL_F_RELATIVE_NODES | MPOL_F_NUMA_BALANCING) +#define MPOL_MODE_FLAGS (MPOL_F_STATIC_NODES | MPOL_F_RELATIVE_NODES | MPOL_F_NUMA_BALANCING) /* Flags for get_mempolicy */ #define MPOL_F_NODE (1 << 0) /* return next IL mode instead of node mask */ @@ -46,9 +44,9 @@ enum { /* 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 policy */ +#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) /* UNSUPPORTED FLAG: Lazy migrate on fault */ #define MPOL_MF_INTERNAL (1 << 4) /* Internal flags start here */ diff --git a/include/arch/x86_64/linux/mii.h b/include/arch/x86_64/linux/mii.h index 495c8cc2..b6ec1d4e 100644 --- a/include/arch/x86_64/linux/mii.h +++ b/include/arch/x86_64/linux/mii.h @@ -88,9 +88,7 @@ #define ADVERTISE_NPAGE 0x8000 /* Next page bit */ #define ADVERTISE_FULL (ADVERTISE_100FULL | ADVERTISE_10FULL | ADVERTISE_CSMA) -#define ADVERTISE_ALL \ - (ADVERTISE_10HALF | ADVERTISE_10FULL | ADVERTISE_100HALF | \ - ADVERTISE_100FULL) +#define ADVERTISE_ALL (ADVERTISE_10HALF | ADVERTISE_10FULL | ADVERTISE_100HALF | ADVERTISE_100FULL) /* Link partner ability register. */ #define LPA_SLCT 0x001f /* Same as advertise selector */ diff --git a/include/arch/x86_64/linux/misc/bcm_vk.h b/include/arch/x86_64/linux/misc/bcm_vk.h index 100f8543..b8657040 100644 --- a/include/arch/x86_64/linux/misc/bcm_vk.h +++ b/include/arch/x86_64/linux/misc/bcm_vk.h @@ -48,20 +48,17 @@ struct vk_reset { #define VK_FWSTS_APP_INIT_START (1UL << 8) #define VK_FWSTS_APP_INIT_DONE (1UL << 9) #define VK_FWSTS_MASK 0xffffffff -#define VK_FWSTS_READY \ - (VK_FWSTS_INIT_START | VK_FWSTS_ARCH_INIT_DONE | \ - VK_FWSTS_PRE_KNL1_INIT_DONE | VK_FWSTS_PRE_KNL2_INIT_DONE | \ - VK_FWSTS_POST_KNL_INIT_DONE | VK_FWSTS_INIT_DONE | \ - VK_FWSTS_APP_INIT_START | VK_FWSTS_APP_INIT_DONE) +#define VK_FWSTS_READY \ + (VK_FWSTS_INIT_START | VK_FWSTS_ARCH_INIT_DONE | VK_FWSTS_PRE_KNL1_INIT_DONE | VK_FWSTS_PRE_KNL2_INIT_DONE | \ + VK_FWSTS_POST_KNL_INIT_DONE | VK_FWSTS_INIT_DONE | VK_FWSTS_APP_INIT_START | VK_FWSTS_APP_INIT_DONE) /* Deinit */ #define VK_FWSTS_APP_DEINIT_START (1UL << 23) #define VK_FWSTS_APP_DEINIT_DONE (1UL << 24) #define VK_FWSTS_DRV_DEINIT_START (1UL << 25) #define VK_FWSTS_DRV_DEINIT_DONE (1UL << 26) #define VK_FWSTS_RESET_DONE (1UL << 27) -#define VK_FWSTS_DEINIT_TRIGGERED \ - (VK_FWSTS_APP_DEINIT_START | VK_FWSTS_APP_DEINIT_DONE | \ - VK_FWSTS_DRV_DEINIT_START | VK_FWSTS_DRV_DEINIT_DONE) +#define VK_FWSTS_DEINIT_TRIGGERED \ + (VK_FWSTS_APP_DEINIT_START | VK_FWSTS_APP_DEINIT_DONE | VK_FWSTS_DRV_DEINIT_START | VK_FWSTS_DRV_DEINIT_DONE) /* Last nibble for reboot reason */ #define VK_FWSTS_RESET_REASON_SHIFT 28 #define VK_FWSTS_RESET_REASON_MASK (0xf << VK_FWSTS_RESET_REASON_SHIFT) diff --git a/include/arch/x86_64/linux/mount.h b/include/arch/x86_64/linux/mount.h index 4baac606..e9bc4f64 100644 --- a/include/arch/x86_64/linux/mount.h +++ b/include/arch/x86_64/linux/mount.h @@ -50,8 +50,7 @@ /* * Superblock flags that can be altered by MS_REMOUNT */ -#define MS_RMT_MASK \ - (MS_RDONLY | MS_SYNCHRONOUS | MS_MANDLOCK | MS_I_VERSION | MS_LAZYTIME) +#define MS_RMT_MASK (MS_RDONLY | MS_SYNCHRONOUS | MS_MANDLOCK | MS_I_VERSION | MS_LAZYTIME) /* * Old magic mount flag and mask @@ -62,7 +61,7 @@ /* * open_tree() flags. */ -#define OPEN_TREE_CLONE 1 /* Clone the target tree and attach the clone */ +#define OPEN_TREE_CLONE 1 /* Clone the target tree and attach the clone */ #define OPEN_TREE_CLOEXEC O_CLOEXEC /* Close the file on execve() */ /* @@ -97,15 +96,15 @@ * The type of fsconfig() call made. */ enum fsconfig_command { - FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */ - FSCONFIG_SET_STRING = 1, /* Set parameter, supplying a string value */ - FSCONFIG_SET_BINARY = 2, /* Set parameter, supplying a binary blob value - */ - FSCONFIG_SET_PATH = 3, /* Set parameter, supplying an object by path */ - FSCONFIG_SET_PATH_EMPTY = 4, /* Set parameter, supplying an object by - (empty) path */ - FSCONFIG_SET_FD = 5, /* Set parameter, supplying an object by fd */ - FSCONFIG_CMD_CREATE = 6, /* Create new or reuse existing superblock */ + FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */ + FSCONFIG_SET_STRING = 1, /* Set parameter, supplying a string value */ + FSCONFIG_SET_BINARY = 2, /* Set parameter, supplying a binary blob value + */ + FSCONFIG_SET_PATH = 3, /* Set parameter, supplying an object by path */ + FSCONFIG_SET_PATH_EMPTY = 4, /* Set parameter, supplying an object by + (empty) path */ + FSCONFIG_SET_FD = 5, /* Set parameter, supplying an object by fd */ + FSCONFIG_CMD_CREATE = 6, /* Create new or reuse existing superblock */ FSCONFIG_CMD_RECONFIGURE = 7, /* Invoke superblock reconfiguration */ FSCONFIG_CMD_CREATE_EXCL = 8, /* Create new superblock, fail if reusing existing superblock */ @@ -119,21 +118,16 @@ enum fsconfig_command { /* * Mount attributes. */ -#define MOUNT_ATTR_RDONLY 0x00000001 /* Mount read-only */ -#define MOUNT_ATTR_NOSUID 0x00000002 /* Ignore suid and sgid bits */ -#define MOUNT_ATTR_NODEV \ - 0x00000004 /* Disallow access to device special files */ -#define MOUNT_ATTR_NOEXEC 0x00000008 /* Disallow program execution */ -#define MOUNT_ATTR__ATIME \ - 0x00000070 /* Setting on how atime should be updated */ -#define MOUNT_ATTR_RELATIME \ - 0x00000000 /* - Update atime relative to mtime/ctime. */ +#define MOUNT_ATTR_RDONLY 0x00000001 /* Mount read-only */ +#define MOUNT_ATTR_NOSUID 0x00000002 /* Ignore suid and sgid bits */ +#define MOUNT_ATTR_NODEV 0x00000004 /* Disallow access to device special files */ +#define MOUNT_ATTR_NOEXEC 0x00000008 /* Disallow program execution */ +#define MOUNT_ATTR__ATIME 0x00000070 /* Setting on how atime should be updated */ +#define MOUNT_ATTR_RELATIME 0x00000000 /* - Update atime relative to mtime/ctime. */ #define MOUNT_ATTR_NOATIME 0x00000010 /* - Do not update access times. */ #define MOUNT_ATTR_STRICTATIME 0x00000020 /* - Always perform atime updates */ -#define MOUNT_ATTR_NODIRATIME \ - 0x00000080 /* Do not update directory access times */ -#define MOUNT_ATTR_IDMAP \ - 0x00100000 /* Idmap mount to @userns_fd in struct mount_attr. */ +#define MOUNT_ATTR_NODIRATIME 0x00000080 /* Do not update directory access times */ +#define MOUNT_ATTR_IDMAP 0x00100000 /* Idmap mount to @userns_fd in struct mount_attr. */ #define MOUNT_ATTR_NOSYMFOLLOW 0x00200000 /* Do not follow symlinks */ /* @@ -192,11 +186,11 @@ struct statmount { */ __u64 supported_mask; /* Mask flags that this kernel supports */ __u32 mnt_uidmap_num; /* Number of uid mappings */ - __u32 mnt_uidmap; /* [str] Array of uid mappings (as seen from callers - namespace) */ - __u32 mnt_gidmap_num; /* Number of gid mappings */ - __u32 mnt_gidmap; /* [str] Array of gid mappings (as seen from callers - namespace) */ + __u32 mnt_uidmap; /* [str] Array of uid mappings (as seen from callers + namespace) */ + __u32 mnt_gidmap_num; /* Number of gid mappings */ + __u32 mnt_gidmap; /* [str] Array of gid mappings (as seen from callers + namespace) */ __u64 __spare2[43]; char str[]; /* Variable size part containing strings */ }; diff --git a/include/arch/x86_64/linux/mptcp.h b/include/arch/x86_64/linux/mptcp.h index 1d4322f0..a7dd1752 100644 --- a/include/arch/x86_64/linux/mptcp.h +++ b/include/arch/x86_64/linux/mptcp.h @@ -106,7 +106,7 @@ struct mptcp_full_info { __u32 size_tcpinfo_user; __u32 size_sfinfo_kernel; /* must be 0, set by kernel */ __u32 size_sfinfo_user; - __u32 num_subflows; /* must be 0, set by kernel (real subflow count) */ + __u32 num_subflows; /* must be 0, set by kernel (real subflow count) */ __u32 size_arrays_user; /* max subflows that userspace is interested in; * the buffers at subflow_info/tcp_info * are respectively at least: diff --git a/include/arch/x86_64/linux/mroute.h b/include/arch/x86_64/linux/mroute.h index df833684..8c9f68be 100644 --- a/include/arch/x86_64/linux/mroute.h +++ b/include/arch/x86_64/linux/mroute.h @@ -23,9 +23,9 @@ (MRT_BASE + 3) /* Delete a virtual interface \ */ #define MRT_ADD_MFC (MRT_BASE + 4) /* Add a multicast forwarding entry */ -#define MRT_DEL_MFC \ - (MRT_BASE + 5) /* Delete a multicast forwarding entry \ - */ +#define MRT_DEL_MFC \ + (MRT_BASE + 5) /* Delete a multicast forwarding entry \ + */ #define MRT_VERSION (MRT_BASE + 6) /* Get the kernel multicast version */ #define MRT_ASSERT (MRT_BASE + 7) /* Activate PIM assert mode */ #define MRT_PIM (MRT_BASE + 8) /* enable PIM code */ diff --git a/include/arch/x86_64/linux/mroute6.h b/include/arch/x86_64/linux/mroute6.h index 262f1e10..9ed2e27f 100644 --- a/include/arch/x86_64/linux/mroute6.h +++ b/include/arch/x86_64/linux/mroute6.h @@ -31,12 +31,12 @@ #define MRT6_DEL_MFC \ (MRT6_BASE + 5) /* Delete a multicast forwarding entry \ */ -#define MRT6_VERSION \ - (MRT6_BASE + 6) /* Get the kernel multicast version \ - */ -#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_VERSION \ + (MRT6_BASE + 6) /* Get the kernel multicast version \ + */ +#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_FLUSH \ diff --git a/include/arch/x86_64/linux/msdos_fs.h b/include/arch/x86_64/linux/msdos_fs.h index 5b47d3fe..a2a39c57 100644 --- a/include/arch/x86_64/linux/msdos_fs.h +++ b/include/arch/x86_64/linux/msdos_fs.h @@ -82,9 +82,8 @@ #define FAT_FSINFO_SIG1 0x41615252 #define FAT_FSINFO_SIG2 0x61417272 -#define IS_FSINFO(x) \ - (le32_to_cpu((x)->signature1) == FAT_FSINFO_SIG1 && \ - le32_to_cpu((x)->signature2) == FAT_FSINFO_SIG2) +#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 @@ -126,14 +125,14 @@ struct fat_boot_sector { union { struct { /* Extended BPB Fields for FAT16 */ - __u8 drive_number; /* Physical drive number */ - __u8 state; /* undocumented, but used - for mount state. */ - __u8 signature; /* extended boot signature */ - __u8 vol_id[4]; /* volume ID */ + __u8 drive_number; /* Physical drive number */ + __u8 state; /* undocumented, but used + for mount state. */ + __u8 signature; /* extended boot signature */ + __u8 vol_id[4]; /* volume ID */ __u8 vol_label[MSDOS_NAME]; /* volume label */ __u8 fs_type[8]; /* file system type */ - /* other fields are not added here */ + /* other fields are not added here */ } fat16; struct { @@ -149,14 +148,14 @@ struct fat_boot_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. */ - __u8 signature; /* extended boot signature */ - __u8 vol_id[4]; /* volume ID */ + __u8 drive_number; /* Physical drive number */ + __u8 state; /* undocumented, but used + for mount state. */ + __u8 signature; /* extended boot signature */ + __u8 vol_id[4]; /* volume ID */ __u8 vol_label[MSDOS_NAME]; /* volume label */ __u8 fs_type[8]; /* file system type */ - /* other fields are not added here */ + /* other fields are not added here */ } fat32; }; }; diff --git a/include/arch/x86_64/linux/msg.h b/include/arch/x86_64/linux/msg.h index 11769746..165130bd 100644 --- a/include/arch/x86_64/linux/msg.h +++ b/include/arch/x86_64/linux/msg.h @@ -81,10 +81,10 @@ struct msginfo { */ /* unused */ -#define MSGPOOL (MSGMNI * MSGMNB / 1024) /* size in kbytes of message pool */ -#define MSGTQL MSGMNB /* number of system message headers */ -#define MSGMAP MSGMNB /* number of entries in message map */ -#define MSGSSZ 16 /* message segment size */ +#define MSGPOOL (MSGMNI * MSGMNB / 1024) /* size in kbytes of message pool */ +#define MSGTQL MSGMNB /* number of system message headers */ +#define MSGMAP MSGMNB /* number of entries in message map */ +#define MSGSSZ 16 /* message segment size */ #define __MSGSEG ((MSGPOOL * 1024) / MSGSSZ) /* max no. of segments */ #define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff) diff --git a/include/arch/x86_64/linux/mshv.h b/include/arch/x86_64/linux/mshv.h index 592f44bc..22d54720 100644 --- a/include/arch/x86_64/linux/mshv.h +++ b/include/arch/x86_64/linux/mshv.h @@ -53,8 +53,7 @@ struct mshv_create_partition { }; /* /dev/mshv */ -#define MSHV_CREATE_PARTITION \ - _IOW(MSHV_IOCTL, 0x00, struct mshv_create_partition) +#define MSHV_CREATE_PARTITION _IOW(MSHV_IOCTL, 0x00, struct mshv_create_partition) /* ************************ @@ -66,12 +65,7 @@ struct mshv_create_vp { __u32 vp_index; }; -enum { - MSHV_SET_MEM_BIT_WRITABLE, - MSHV_SET_MEM_BIT_EXECUTABLE, - MSHV_SET_MEM_BIT_UNMAP, - MSHV_SET_MEM_BIT_COUNT -}; +enum { MSHV_SET_MEM_BIT_WRITABLE, MSHV_SET_MEM_BIT_EXECUTABLE, MSHV_SET_MEM_BIT_UNMAP, MSHV_SET_MEM_BIT_COUNT }; #define MSHV_SET_MEM_FLAGS_MASK ((1 << MSHV_SET_MEM_BIT_COUNT) - 1) @@ -210,15 +204,13 @@ struct mshv_root_hvcall { }; /* Partition fds created with MSHV_CREATE_PARTITION */ -#define MSHV_INITIALIZE_PARTITION _IO(MSHV_IOCTL, 0x00) -#define MSHV_CREATE_VP _IOW(MSHV_IOCTL, 0x01, struct mshv_create_vp) -#define MSHV_SET_GUEST_MEMORY \ - _IOW(MSHV_IOCTL, 0x02, struct mshv_user_mem_region) -#define MSHV_IRQFD _IOW(MSHV_IOCTL, 0x03, struct mshv_user_irqfd) -#define MSHV_IOEVENTFD _IOW(MSHV_IOCTL, 0x04, struct mshv_user_ioeventfd) -#define MSHV_SET_MSI_ROUTING _IOW(MSHV_IOCTL, 0x05, struct mshv_user_irq_table) -#define MSHV_GET_GPAP_ACCESS_BITMAP \ - _IOWR(MSHV_IOCTL, 0x06, struct mshv_gpap_access_bitmap) +#define MSHV_INITIALIZE_PARTITION _IO(MSHV_IOCTL, 0x00) +#define MSHV_CREATE_VP _IOW(MSHV_IOCTL, 0x01, struct mshv_create_vp) +#define MSHV_SET_GUEST_MEMORY _IOW(MSHV_IOCTL, 0x02, struct mshv_user_mem_region) +#define MSHV_IRQFD _IOW(MSHV_IOCTL, 0x03, struct mshv_user_irqfd) +#define MSHV_IOEVENTFD _IOW(MSHV_IOCTL, 0x04, struct mshv_user_ioeventfd) +#define MSHV_SET_MSI_ROUTING _IOW(MSHV_IOCTL, 0x05, struct mshv_user_irq_table) +#define MSHV_GET_GPAP_ACCESS_BITMAP _IOWR(MSHV_IOCTL, 0x06, struct mshv_gpap_access_bitmap) /* Generic hypercall */ #define MSHV_ROOT_HVCALL _IOWR(MSHV_IOCTL, 0x07, struct mshv_root_hvcall) diff --git a/include/arch/x86_64/linux/mtio.h b/include/arch/x86_64/linux/mtio.h index b58e2783..55eba074 100644 --- a/include/arch/x86_64/linux/mtio.h +++ b/include/arch/x86_64/linux/mtio.h @@ -102,11 +102,10 @@ struct mtget { #define MT_ISARCHIVESC499 0x0A /* Archive SC-499 QIC-36 controller */ #define MT_ISQIC02_ALL_FEATURES 0x0F /* Generic QIC-02 with all features */ #define MT_ISWT5099EEN24 0x11 /* Wangtek 5099-een24, 60MB, QIC-24 */ -#define MT_ISTEAC_MT2ST \ - 0x12 /* Teac MT-2ST 155mb drive, Teac DC-1 card (Wangtek type) */ -#define MT_ISEVEREX_FT40A 0x32 /* Everex FT40A (QIC-40) */ -#define MT_ISDDS1 0x51 /* DDS device without partitions */ -#define MT_ISDDS2 0x52 /* DDS device with partitions */ +#define MT_ISTEAC_MT2ST 0x12 /* Teac MT-2ST 155mb drive, Teac DC-1 card (Wangtek type) */ +#define MT_ISEVEREX_FT40A 0x32 /* Everex FT40A (QIC-40) */ +#define MT_ISDDS1 0x51 /* DDS device without partitions */ +#define MT_ISDDS2 0x52 /* DDS device with partitions */ #define MT_ISONSTREAM_SC \ 0x61 /* OnStream SCSI tape drives (SC-x0) \ and SCSI emulated (DI, DP, USB) */ diff --git a/include/arch/x86_64/linux/nbd.h b/include/arch/x86_64/linux/nbd.h index c339b184..17928322 100644 --- a/include/arch/x86_64/linux/nbd.h +++ b/include/arch/x86_64/linux/nbd.h @@ -56,13 +56,11 @@ enum { #define NBD_FLAG_SEND_TRIM (1 << 5) /* send trim/discard */ #define NBD_FLAG_SEND_WRITE_ZEROES (1 << 6) /* supports WRITE_ZEROES */ /* there is a gap here to match userspace */ -#define NBD_FLAG_CAN_MULTI_CONN \ - (1 << 8) /* Server supports multiple connections per export. */ +#define NBD_FLAG_CAN_MULTI_CONN (1 << 8) /* Server supports multiple connections per export. */ /* values for cmd flags in the upper 16 bits of request type */ -#define NBD_CMD_FLAG_FUA (1 << 16) /* FUA (forced unit access) op */ -#define NBD_CMD_FLAG_NO_HOLE \ - (1 << 17) /* Do not punch a hole for WRITE_ZEROES */ +#define NBD_CMD_FLAG_FUA (1 << 16) /* FUA (forced unit access) op */ +#define NBD_CMD_FLAG_NO_HOLE (1 << 17) /* Do not punch a hole for WRITE_ZEROES */ /* These are client behavior specific flags. */ #define NBD_CFLAG_DESTROY_ON_DISCONNECT \ diff --git a/include/arch/x86_64/linux/ndctl.h b/include/arch/x86_64/linux/ndctl.h index 614c70ad..cc88e38f 100644 --- a/include/arch/x86_64/linux/ndctl.h +++ b/include/arch/x86_64/linux/ndctl.h @@ -174,31 +174,23 @@ static __inline__ const char *nvdimm_cmd_name(unsigned cmd) #define ND_IOCTL 'N' -#define ND_IOCTL_DIMM_FLAGS \ - _IOWR(ND_IOCTL, ND_CMD_DIMM_FLAGS, struct nd_cmd_dimm_flags) +#define ND_IOCTL_DIMM_FLAGS _IOWR(ND_IOCTL, ND_CMD_DIMM_FLAGS, struct nd_cmd_dimm_flags) -#define ND_IOCTL_GET_CONFIG_SIZE \ - _IOWR(ND_IOCTL, ND_CMD_GET_CONFIG_SIZE, struct nd_cmd_get_config_size) +#define ND_IOCTL_GET_CONFIG_SIZE _IOWR(ND_IOCTL, ND_CMD_GET_CONFIG_SIZE, struct nd_cmd_get_config_size) -#define ND_IOCTL_GET_CONFIG_DATA \ - _IOWR(ND_IOCTL, ND_CMD_GET_CONFIG_DATA, \ - struct nd_cmd_get_config_data_hdr) +#define ND_IOCTL_GET_CONFIG_DATA _IOWR(ND_IOCTL, ND_CMD_GET_CONFIG_DATA, struct nd_cmd_get_config_data_hdr) -#define ND_IOCTL_SET_CONFIG_DATA \ - _IOWR(ND_IOCTL, ND_CMD_SET_CONFIG_DATA, struct nd_cmd_set_config_hdr) +#define ND_IOCTL_SET_CONFIG_DATA _IOWR(ND_IOCTL, ND_CMD_SET_CONFIG_DATA, struct nd_cmd_set_config_hdr) #define ND_IOCTL_VENDOR _IOWR(ND_IOCTL, ND_CMD_VENDOR, struct nd_cmd_vendor_hdr) #define ND_IOCTL_ARS_CAP _IOWR(ND_IOCTL, ND_CMD_ARS_CAP, struct nd_cmd_ars_cap) -#define ND_IOCTL_ARS_START \ - _IOWR(ND_IOCTL, ND_CMD_ARS_START, struct nd_cmd_ars_start) +#define ND_IOCTL_ARS_START _IOWR(ND_IOCTL, ND_CMD_ARS_START, struct nd_cmd_ars_start) -#define ND_IOCTL_ARS_STATUS \ - _IOWR(ND_IOCTL, ND_CMD_ARS_STATUS, struct nd_cmd_ars_status) +#define ND_IOCTL_ARS_STATUS _IOWR(ND_IOCTL, ND_CMD_ARS_STATUS, struct nd_cmd_ars_status) -#define ND_IOCTL_CLEAR_ERROR \ - _IOWR(ND_IOCTL, ND_CMD_CLEAR_ERROR, struct nd_cmd_clear_error) +#define ND_IOCTL_CLEAR_ERROR _IOWR(ND_IOCTL, ND_CMD_CLEAR_ERROR, struct nd_cmd_clear_error) #define ND_DEVICE_DIMM 1 /* nd_dimm: container for "config data" */ #define ND_DEVICE_REGION_PMEM 2 /* nd_region: (parent of PMEM namespaces) */ diff --git a/include/arch/x86_64/linux/net_tstamp.h b/include/arch/x86_64/linux/net_tstamp.h index 90b780a5..2b3d5b13 100644 --- a/include/arch/x86_64/linux/net_tstamp.h +++ b/include/arch/x86_64/linux/net_tstamp.h @@ -47,8 +47,7 @@ enum { SOF_TIMESTAMPING_TX_COMPLETION = (1 << 18), SOF_TIMESTAMPING_LAST = SOF_TIMESTAMPING_TX_COMPLETION, - SOF_TIMESTAMPING_MASK = (SOF_TIMESTAMPING_LAST - 1) | - SOF_TIMESTAMPING_LAST + SOF_TIMESTAMPING_MASK = (SOF_TIMESTAMPING_LAST - 1) | SOF_TIMESTAMPING_LAST }; /* @@ -56,10 +55,9 @@ enum { * reporting the timestamp to user space. * Recording flags can be set both via socket options and control messages. */ -#define SOF_TIMESTAMPING_TX_RECORD_MASK \ - (SOF_TIMESTAMPING_TX_HARDWARE | SOF_TIMESTAMPING_TX_SOFTWARE | \ - SOF_TIMESTAMPING_TX_SCHED | SOF_TIMESTAMPING_TX_ACK | \ - SOF_TIMESTAMPING_TX_COMPLETION) +#define SOF_TIMESTAMPING_TX_RECORD_MASK \ + (SOF_TIMESTAMPING_TX_HARDWARE | SOF_TIMESTAMPING_TX_SOFTWARE | SOF_TIMESTAMPING_TX_SCHED | \ + SOF_TIMESTAMPING_TX_ACK | SOF_TIMESTAMPING_TX_COMPLETION) /** * struct so_timestamping - SO_TIMESTAMPING parameter @@ -206,8 +204,7 @@ enum txtime_flags { SOF_TXTIME_REPORT_ERRORS = (1 << 1), SOF_TXTIME_FLAGS_LAST = SOF_TXTIME_REPORT_ERRORS, - SOF_TXTIME_FLAGS_MASK = (SOF_TXTIME_FLAGS_LAST - 1) | - SOF_TXTIME_FLAGS_LAST + SOF_TXTIME_FLAGS_MASK = (SOF_TXTIME_FLAGS_LAST - 1) | SOF_TXTIME_FLAGS_LAST }; struct sock_txtime { diff --git a/include/arch/x86_64/linux/netdev.h b/include/arch/x86_64/linux/netdev.h index 771930a1..23bce4b2 100644 --- a/include/arch/x86_64/linux/netdev.h +++ b/include/arch/x86_64/linux/netdev.h @@ -97,8 +97,7 @@ enum { enum { __NETDEV_A_IO_URING_PROVIDER_INFO_MAX, - NETDEV_A_IO_URING_PROVIDER_INFO_MAX = - (__NETDEV_A_IO_URING_PROVIDER_INFO_MAX - 1) + NETDEV_A_IO_URING_PROVIDER_INFO_MAX = (__NETDEV_A_IO_URING_PROVIDER_INFO_MAX - 1) }; enum { @@ -147,10 +146,7 @@ enum { NETDEV_A_NAPI_MAX = (__NETDEV_A_NAPI_MAX - 1) }; -enum { - __NETDEV_A_XSK_INFO_MAX, - NETDEV_A_XSK_INFO_MAX = (__NETDEV_A_XSK_INFO_MAX - 1) -}; +enum { __NETDEV_A_XSK_INFO_MAX, NETDEV_A_XSK_INFO_MAX = (__NETDEV_A_XSK_INFO_MAX - 1) }; enum { NETDEV_A_QUEUE_ID = 1, diff --git a/include/arch/x86_64/linux/netfilter/ipset/ip_set.h b/include/arch/x86_64/linux/netfilter/ipset/ip_set.h index 5c72cd08..41614ce8 100644 --- a/include/arch/x86_64/linux/netfilter/ipset/ip_set.h +++ b/include/arch/x86_64/linux/netfilter/ipset/ip_set.h @@ -53,19 +53,19 @@ enum ipset_cmd { /* Attributes at command level */ enum { IPSET_ATTR_UNSPEC, - IPSET_ATTR_PROTOCOL, /* 1: Protocol version */ - IPSET_ATTR_SETNAME, /* 2: Name of the set */ - IPSET_ATTR_TYPENAME, /* 3: Typename */ - IPSET_ATTR_SETNAME2 = IPSET_ATTR_TYPENAME, /* Setname at rename/swap */ - IPSET_ATTR_REVISION, /* 4: Settype revision */ - IPSET_ATTR_FAMILY, /* 5: Settype family */ - IPSET_ATTR_FLAGS, /* 6: Flags at command level */ - IPSET_ATTR_DATA, /* 7: Nested attributes */ - IPSET_ATTR_ADT, /* 8: Multiple data containers */ - IPSET_ATTR_LINENO, /* 9: Restore lineno */ - IPSET_ATTR_PROTOCOL_MIN, /* 10: Minimal supported version number */ + IPSET_ATTR_PROTOCOL, /* 1: Protocol version */ + IPSET_ATTR_SETNAME, /* 2: Name of the set */ + IPSET_ATTR_TYPENAME, /* 3: Typename */ + IPSET_ATTR_SETNAME2 = IPSET_ATTR_TYPENAME, /* Setname at rename/swap */ + IPSET_ATTR_REVISION, /* 4: Settype revision */ + IPSET_ATTR_FAMILY, /* 5: Settype family */ + IPSET_ATTR_FLAGS, /* 6: Flags at command level */ + IPSET_ATTR_DATA, /* 7: Nested attributes */ + IPSET_ATTR_ADT, /* 8: Multiple data containers */ + IPSET_ATTR_LINENO, /* 9: Restore lineno */ + IPSET_ATTR_PROTOCOL_MIN, /* 10: Minimal supported version number */ IPSET_ATTR_REVISION_MIN = IPSET_ATTR_PROTOCOL_MIN, /* type rev min */ - IPSET_ATTR_INDEX, /* 11: Kernel index of set */ + IPSET_ATTR_INDEX, /* 11: Kernel index of set */ __IPSET_ATTR_CMD_MAX, }; #define IPSET_ATTR_CMD_MAX (__IPSET_ATTR_CMD_MAX - 1) @@ -169,11 +169,9 @@ enum ipset_cmd_flags { IPSET_FLAG_BIT_LIST_HEADER = 2, IPSET_FLAG_LIST_HEADER = (1 << IPSET_FLAG_BIT_LIST_HEADER), IPSET_FLAG_BIT_SKIP_COUNTER_UPDATE = 3, - IPSET_FLAG_SKIP_COUNTER_UPDATE = - (1 << IPSET_FLAG_BIT_SKIP_COUNTER_UPDATE), + 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_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, diff --git a/include/arch/x86_64/linux/netfilter/nf_conntrack_common.h b/include/arch/x86_64/linux/netfilter/nf_conntrack_common.h index c5c2cad7..7bd3f433 100644 --- a/include/arch/x86_64/linux/netfilter/nf_conntrack_common.h +++ b/include/arch/x86_64/linux/netfilter/nf_conntrack_common.h @@ -109,10 +109,8 @@ enum ip_conntrack_status { /* Be careful here, modifying these bits can make things messy, * so don't let users modify them directly. */ - IPS_UNCHANGEABLE_MASK = - (IPS_NAT_DONE_MASK | IPS_NAT_MASK | IPS_EXPECTED | - IPS_CONFIRMED | IPS_DYING | IPS_SEQ_ADJUST | IPS_TEMPLATE | - IPS_UNTRACKED | IPS_OFFLOAD | IPS_HW_OFFLOAD), + IPS_UNCHANGEABLE_MASK = (IPS_NAT_DONE_MASK | IPS_NAT_MASK | IPS_EXPECTED | IPS_CONFIRMED | IPS_DYING | + IPS_SEQ_ADJUST | IPS_TEMPLATE | IPS_UNTRACKED | IPS_OFFLOAD | IPS_HW_OFFLOAD), __IPS_MAX_BIT = 16, }; diff --git a/include/arch/x86_64/linux/netfilter/nf_conntrack_tuple_common.h b/include/arch/x86_64/linux/netfilter/nf_conntrack_tuple_common.h index 5581c6fc..8fac504f 100644 --- a/include/arch/x86_64/linux/netfilter/nf_conntrack_tuple_common.h +++ b/include/arch/x86_64/linux/netfilter/nf_conntrack_tuple_common.h @@ -35,7 +35,6 @@ union nf_conntrack_man_proto { } gre; }; -#define CTINFO2DIR(ctinfo) \ - ((ctinfo) >= IP_CT_IS_REPLY ? IP_CT_DIR_REPLY : IP_CT_DIR_ORIGINAL) +#define CTINFO2DIR(ctinfo) ((ctinfo) >= IP_CT_IS_REPLY ? IP_CT_DIR_REPLY : IP_CT_DIR_ORIGINAL) #endif /* _NF_CONNTRACK_TUPLE_COMMON_H */ diff --git a/include/arch/x86_64/linux/netfilter/nf_nat.h b/include/arch/x86_64/linux/netfilter/nf_nat.h index 827a6874..24329a72 100644 --- a/include/arch/x86_64/linux/netfilter/nf_nat.h +++ b/include/arch/x86_64/linux/netfilter/nf_nat.h @@ -13,14 +13,11 @@ #define NF_NAT_RANGE_PROTO_OFFSET (1 << 5) #define NF_NAT_RANGE_NETMAP (1 << 6) -#define NF_NAT_RANGE_PROTO_RANDOM_ALL \ - (NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PROTO_RANDOM_FULLY) - -#define NF_NAT_RANGE_MASK \ - (NF_NAT_RANGE_MAP_IPS | NF_NAT_RANGE_PROTO_SPECIFIED | \ - NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PERSISTENT | \ - NF_NAT_RANGE_PROTO_RANDOM_FULLY | NF_NAT_RANGE_PROTO_OFFSET | \ - NF_NAT_RANGE_NETMAP) +#define NF_NAT_RANGE_PROTO_RANDOM_ALL (NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PROTO_RANDOM_FULLY) + +#define NF_NAT_RANGE_MASK \ + (NF_NAT_RANGE_MAP_IPS | NF_NAT_RANGE_PROTO_SPECIFIED | NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PERSISTENT | \ + NF_NAT_RANGE_PROTO_RANDOM_FULLY | NF_NAT_RANGE_PROTO_OFFSET | NF_NAT_RANGE_NETMAP) struct nf_nat_ipv4_range { unsigned int flags; diff --git a/include/arch/x86_64/linux/netfilter/nf_synproxy.h b/include/arch/x86_64/linux/netfilter/nf_synproxy.h index 1f716195..5605c913 100644 --- a/include/arch/x86_64/linux/netfilter/nf_synproxy.h +++ b/include/arch/x86_64/linux/netfilter/nf_synproxy.h @@ -9,9 +9,8 @@ #define NF_SYNPROXY_OPT_SACK_PERM 0x04 #define NF_SYNPROXY_OPT_TIMESTAMP 0x08 #define NF_SYNPROXY_OPT_ECN 0x10 -#define NF_SYNPROXY_OPT_MASK \ - (NF_SYNPROXY_OPT_MSS | NF_SYNPROXY_OPT_WSCALE | \ - NF_SYNPROXY_OPT_SACK_PERM | NF_SYNPROXY_OPT_TIMESTAMP) +#define NF_SYNPROXY_OPT_MASK \ + (NF_SYNPROXY_OPT_MSS | NF_SYNPROXY_OPT_WSCALE | NF_SYNPROXY_OPT_SACK_PERM | NF_SYNPROXY_OPT_TIMESTAMP) struct nf_synproxy_info { __u8 options; diff --git a/include/arch/x86_64/linux/netfilter/nf_tables.h b/include/arch/x86_64/linux/netfilter/nf_tables.h index e779e2bd..25efe252 100644 --- a/include/arch/x86_64/linux/netfilter/nf_tables.h +++ b/include/arch/x86_64/linux/netfilter/nf_tables.h @@ -188,8 +188,7 @@ enum nft_table_flags { NFT_TABLE_F_OWNER = 0x2, NFT_TABLE_F_PERSIST = 0x4, }; -#define NFT_TABLE_F_MASK \ - (NFT_TABLE_F_DORMANT | NFT_TABLE_F_OWNER | NFT_TABLE_F_PERSIST) +#define NFT_TABLE_F_MASK (NFT_TABLE_F_DORMANT | NFT_TABLE_F_OWNER | NFT_TABLE_F_PERSIST) /** * enum nft_table_attributes - nf_tables table netlink attributes @@ -218,8 +217,7 @@ enum nft_chain_flags { NFT_CHAIN_HW_OFFLOAD = (1 << 1), NFT_CHAIN_BINDING = (1 << 2), }; -#define NFT_CHAIN_FLAGS \ - (NFT_CHAIN_BASE | NFT_CHAIN_HW_OFFLOAD | NFT_CHAIN_BINDING) +#define NFT_CHAIN_FLAGS (NFT_CHAIN_BASE | NFT_CHAIN_HW_OFFLOAD | NFT_CHAIN_BINDING) /** * enum nft_chain_attributes - nf_tables chain netlink attributes @@ -358,12 +356,7 @@ enum nft_set_policies { * @NFTA_SET_DESC_SIZE: number of elements in set (NLA_U32) * @NFTA_SET_DESC_CONCAT: description of field concatenation (NLA_NESTED) */ -enum nft_set_desc_attributes { - NFTA_SET_DESC_UNSPEC, - NFTA_SET_DESC_SIZE, - NFTA_SET_DESC_CONCAT, - __NFTA_SET_DESC_MAX -}; +enum nft_set_desc_attributes { NFTA_SET_DESC_UNSPEC, NFTA_SET_DESC_SIZE, NFTA_SET_DESC_CONCAT, __NFTA_SET_DESC_MAX }; #define NFTA_SET_DESC_MAX (__NFTA_SET_DESC_MAX - 1) /** @@ -371,11 +364,7 @@ enum nft_set_desc_attributes { * * @NFTA_SET_FIELD_LEN: length of single field, in bits (NLA_U32) */ -enum nft_set_field_attributes { - NFTA_SET_FIELD_UNSPEC, - NFTA_SET_FIELD_LEN, - __NFTA_SET_FIELD_MAX -}; +enum nft_set_field_attributes { NFTA_SET_FIELD_UNSPEC, NFTA_SET_FIELD_LEN, __NFTA_SET_FIELD_MAX }; #define NFTA_SET_FIELD_MAX (__NFTA_SET_FIELD_MAX - 1) /** @@ -518,12 +507,7 @@ enum nft_data_types { * @NFTA_DATA_VALUE: generic data (NLA_BINARY) * @NFTA_DATA_VERDICT: nf_tables verdict (NLA_NESTED: nft_verdict_attributes) */ -enum nft_data_attributes { - NFTA_DATA_UNSPEC, - NFTA_DATA_VALUE, - NFTA_DATA_VERDICT, - __NFTA_DATA_MAX -}; +enum nft_data_attributes { NFTA_DATA_UNSPEC, NFTA_DATA_VALUE, NFTA_DATA_VERDICT, __NFTA_DATA_MAX }; #define NFTA_DATA_MAX (__NFTA_DATA_MAX - 1) /* Maximum length of a value */ @@ -551,12 +535,7 @@ enum nft_verdict_attributes { * @NFTA_EXPR_NAME: name of the expression type (NLA_STRING) * @NFTA_EXPR_DATA: type specific data (NLA_NESTED) */ -enum nft_expr_attributes { - NFTA_EXPR_UNSPEC, - NFTA_EXPR_NAME, - NFTA_EXPR_DATA, - __NFTA_EXPR_MAX -}; +enum nft_expr_attributes { NFTA_EXPR_UNSPEC, NFTA_EXPR_NAME, NFTA_EXPR_DATA, __NFTA_EXPR_MAX }; #define NFTA_EXPR_MAX (__NFTA_EXPR_MAX - 1) /** @@ -566,12 +545,7 @@ enum nft_expr_attributes { * @NFTA_IMMEDIATE_DREG: destination register to load data into (NLA_U32) * @NFTA_IMMEDIATE_DATA: data to load (NLA_NESTED: nft_data_attributes) */ -enum nft_immediate_attributes { - NFTA_IMMEDIATE_UNSPEC, - NFTA_IMMEDIATE_DREG, - NFTA_IMMEDIATE_DATA, - __NFTA_IMMEDIATE_MAX -}; +enum nft_immediate_attributes { NFTA_IMMEDIATE_UNSPEC, NFTA_IMMEDIATE_DREG, NFTA_IMMEDIATE_DATA, __NFTA_IMMEDIATE_MAX }; #define NFTA_IMMEDIATE_MAX (__NFTA_IMMEDIATE_MAX - 1) /** @@ -696,13 +670,7 @@ enum nft_cmp_ops { * @NFTA_CMP_OP: cmp operation (NLA_U32: nft_cmp_ops) * @NFTA_CMP_DATA: data to compare against (NLA_NESTED: nft_data_attributes) */ -enum nft_cmp_attributes { - NFTA_CMP_UNSPEC, - NFTA_CMP_SREG, - NFTA_CMP_OP, - NFTA_CMP_DATA, - __NFTA_CMP_MAX -}; +enum nft_cmp_attributes { NFTA_CMP_UNSPEC, NFTA_CMP_SREG, NFTA_CMP_OP, NFTA_CMP_DATA, __NFTA_CMP_MAX }; #define NFTA_CMP_MAX (__NFTA_CMP_MAX - 1) /** @@ -847,8 +815,7 @@ enum nft_inner_flags { NFT_INNER_NH = (1 << 2), NFT_INNER_TH = (1 << 3), }; -#define NFT_INNER_MASK \ - (NFT_INNER_HDRSIZE | NFT_INNER_LL | NFT_INNER_NH | NFT_INNER_TH) +#define NFT_INNER_MASK (NFT_INNER_HDRSIZE | NFT_INNER_LL | NFT_INNER_NH | NFT_INNER_TH) enum nft_inner_attributes { NFTA_INNER_UNSPEC, @@ -1030,14 +997,7 @@ enum nft_meta_keys { * @NFT_RT_TCPMSS: fetch current path tcp mss * @NFT_RT_XFRM: boolean, skb->dst->xfrm != NULL */ -enum nft_rt_keys { - NFT_RT_CLASSID, - NFT_RT_NEXTHOP4, - NFT_RT_NEXTHOP6, - NFT_RT_TCPMSS, - NFT_RT_XFRM, - __NFT_RT_MAX -}; +enum nft_rt_keys { NFT_RT_CLASSID, NFT_RT_NEXTHOP4, NFT_RT_NEXTHOP6, NFT_RT_TCPMSS, NFT_RT_XFRM, __NFT_RT_MAX }; #define NFT_RT_MAX (__NFT_RT_MAX - 1) /** @@ -1086,13 +1046,7 @@ enum nft_hash_attributes { * @NFTA_META_KEY: meta data item to load (NLA_U32: nft_meta_keys) * @NFTA_META_SREG: source register (NLA_U32) */ -enum nft_meta_attributes { - NFTA_META_UNSPEC, - NFTA_META_DREG, - NFTA_META_KEY, - NFTA_META_SREG, - __NFTA_META_MAX -}; +enum nft_meta_attributes { NFTA_META_UNSPEC, NFTA_META_DREG, NFTA_META_KEY, NFTA_META_SREG, __NFTA_META_MAX }; #define NFTA_META_MAX (__NFTA_META_MAX - 1) /** @@ -1101,12 +1055,7 @@ enum nft_meta_attributes { * @NFTA_RT_DREG: destination register (NLA_U32) * @NFTA_RT_KEY: routing data item to load (NLA_U32: nft_rt_keys) */ -enum nft_rt_attributes { - NFTA_RT_UNSPEC, - NFTA_RT_DREG, - NFTA_RT_KEY, - __NFTA_RT_MAX -}; +enum nft_rt_attributes { NFTA_RT_UNSPEC, NFTA_RT_DREG, NFTA_RT_KEY, __NFTA_RT_MAX }; #define NFTA_RT_MAX (__NFTA_RT_MAX - 1) /** @@ -1209,14 +1158,7 @@ enum nft_ct_keys { * @NFTA_CT_DIRECTION: direction in case of directional keys (NLA_U8) * @NFTA_CT_SREG: source register (NLA_U32) */ -enum nft_ct_attributes { - NFTA_CT_UNSPEC, - NFTA_CT_DREG, - NFTA_CT_KEY, - NFTA_CT_DIRECTION, - NFTA_CT_SREG, - __NFTA_CT_MAX -}; +enum nft_ct_attributes { NFTA_CT_UNSPEC, NFTA_CT_DREG, NFTA_CT_KEY, NFTA_CT_DIRECTION, NFTA_CT_SREG, __NFTA_CT_MAX }; #define NFTA_CT_MAX (__NFTA_CT_MAX - 1) /** @@ -1297,13 +1239,7 @@ enum nft_counter_attributes { * @NFTA_LAST_SET: last update has been set, zero means never updated (NLA_U32) * @NFTA_LAST_MSECS: milliseconds since last update (NLA_U64) */ -enum nft_last_attributes { - NFTA_LAST_UNSPEC, - NFTA_LAST_SET, - NFTA_LAST_MSECS, - NFTA_LAST_PAD, - __NFTA_LAST_MAX -}; +enum nft_last_attributes { NFTA_LAST_UNSPEC, NFTA_LAST_SET, NFTA_LAST_MSECS, NFTA_LAST_PAD, __NFTA_LAST_MAX }; #define NFTA_LAST_MAX (__NFTA_LAST_MAX - 1) /** @@ -1453,12 +1389,7 @@ enum nft_reject_inet_code { * @NFTA_REJECT_TYPE: packet type to use (NLA_U32: nft_reject_types) * @NFTA_REJECT_ICMP_CODE: ICMP code to use (NLA_U8) */ -enum nft_reject_attributes { - NFTA_REJECT_UNSPEC, - NFTA_REJECT_TYPE, - NFTA_REJECT_ICMP_CODE, - __NFTA_REJECT_MAX -}; +enum nft_reject_attributes { NFTA_REJECT_UNSPEC, NFTA_REJECT_TYPE, NFTA_REJECT_ICMP_CODE, __NFTA_REJECT_MAX }; #define NFTA_REJECT_MAX (__NFTA_REJECT_MAX - 1) /** @@ -1562,12 +1493,7 @@ enum nft_redir_attributes { * @NFTA_DUP_SREG_DEV: source register of output interface (NLA_U32: * nft_register) */ -enum nft_dup_attributes { - NFTA_DUP_UNSPEC, - NFTA_DUP_SREG_ADDR, - NFTA_DUP_SREG_DEV, - __NFTA_DUP_MAX -}; +enum nft_dup_attributes { NFTA_DUP_UNSPEC, NFTA_DUP_SREG_ADDR, NFTA_DUP_SREG_DEV, __NFTA_DUP_MAX }; #define NFTA_DUP_MAX (__NFTA_DUP_MAX - 1) /** @@ -1580,13 +1506,7 @@ enum nft_dup_attributes { * @NFTA_FWD_NFPROTO: layer 3 family of source register address (NLA_U32: enum * nfproto) */ -enum nft_fwd_attributes { - NFTA_FWD_UNSPEC, - NFTA_FWD_SREG_DEV, - NFTA_FWD_SREG_ADDR, - NFTA_FWD_NFPROTO, - __NFTA_FWD_MAX -}; +enum nft_fwd_attributes { NFTA_FWD_UNSPEC, NFTA_FWD_SREG_DEV, NFTA_FWD_SREG_ADDR, NFTA_FWD_NFPROTO, __NFTA_FWD_MAX }; #define NFTA_FWD_MAX (__NFTA_FWD_MAX - 1) /** @@ -1618,13 +1538,7 @@ enum nft_objref_attributes { * * @NFTA_GEN_ID: Ruleset generation ID (NLA_U32) */ -enum nft_gen_attributes { - NFTA_GEN_UNSPEC, - NFTA_GEN_ID, - NFTA_GEN_PROC_PID, - NFTA_GEN_PROC_NAME, - __NFTA_GEN_MAX -}; +enum nft_gen_attributes { NFTA_GEN_UNSPEC, NFTA_GEN_ID, NFTA_GEN_PROC_PID, NFTA_GEN_PROC_NAME, __NFTA_GEN_MAX }; #define NFTA_GEN_MAX (__NFTA_GEN_MAX - 1) /* @@ -1637,13 +1551,7 @@ enum nft_gen_attributes { * The FIB expression performs a route lookup according * to the packet data. */ -enum nft_fib_attributes { - NFTA_FIB_UNSPEC, - NFTA_FIB_DREG, - NFTA_FIB_RESULT, - NFTA_FIB_FLAGS, - __NFTA_FIB_MAX -}; +enum nft_fib_attributes { NFTA_FIB_UNSPEC, NFTA_FIB_DREG, NFTA_FIB_RESULT, NFTA_FIB_FLAGS, __NFTA_FIB_MAX }; #define NFTA_FIB_MAX (__NFTA_FIB_MAX - 1) enum nft_fib_result { @@ -1829,12 +1737,7 @@ enum nft_synproxy_attributes { * @NFTA_DEVICE_NAME: name of this device (NLA_STRING) * @NFTA_DEVICE_PREFIX: device name prefix, a simple wildcard (NLA_STRING) */ -enum nft_devices_attributes { - NFTA_DEVICE_UNSPEC, - NFTA_DEVICE_NAME, - NFTA_DEVICE_PREFIX, - __NFTA_DEVICE_MAX -}; +enum nft_devices_attributes { NFTA_DEVICE_UNSPEC, NFTA_DEVICE_NAME, NFTA_DEVICE_PREFIX, __NFTA_DEVICE_MAX }; #define NFTA_DEVICE_MAX (__NFTA_DEVICE_MAX - 1) /* @@ -2010,9 +1913,7 @@ enum nft_tunnel_flags { NFT_TUNNEL_F_DONT_FRAGMENT = (1 << 1), NFT_TUNNEL_F_SEQ_NUMBER = (1 << 2), }; -#define NFT_TUNNEL_F_MASK \ - (NFT_TUNNEL_F_ZERO_CSUM_TX | NFT_TUNNEL_F_DONT_FRAGMENT | \ - NFT_TUNNEL_F_SEQ_NUMBER) +#define NFT_TUNNEL_F_MASK (NFT_TUNNEL_F_ZERO_CSUM_TX | NFT_TUNNEL_F_DONT_FRAGMENT | NFT_TUNNEL_F_SEQ_NUMBER) enum nft_tunnel_key_attributes { NFTA_TUNNEL_KEY_UNSPEC, @@ -2032,12 +1933,7 @@ enum nft_tunnel_key_attributes { enum nft_tunnel_keys { NFT_TUNNEL_PATH, NFT_TUNNEL_ID, __NFT_TUNNEL_MAX }; #define NFT_TUNNEL_MAX (__NFT_TUNNEL_MAX - 1) -enum nft_tunnel_mode { - NFT_TUNNEL_MODE_NONE, - NFT_TUNNEL_MODE_RX, - NFT_TUNNEL_MODE_TX, - __NFT_TUNNEL_MODE_MAX -}; +enum nft_tunnel_mode { NFT_TUNNEL_MODE_NONE, NFT_TUNNEL_MODE_RX, NFT_TUNNEL_MODE_TX, __NFT_TUNNEL_MODE_MAX }; #define NFT_TUNNEL_MODE_MAX (__NFT_TUNNEL_MODE_MAX - 1) enum nft_tunnel_attributes { diff --git a/include/arch/x86_64/linux/netfilter/nf_tables_compat.h b/include/arch/x86_64/linux/netfilter/nf_tables_compat.h index 5f24d793..39793932 100644 --- a/include/arch/x86_64/linux/netfilter/nf_tables_compat.h +++ b/include/arch/x86_64/linux/netfilter/nf_tables_compat.h @@ -11,13 +11,7 @@ enum nft_target_attributes { }; #define NFTA_TARGET_MAX (__NFTA_TARGET_MAX - 1) -enum nft_match_attributes { - NFTA_MATCH_UNSPEC, - NFTA_MATCH_NAME, - NFTA_MATCH_REV, - NFTA_MATCH_INFO, - __NFTA_MATCH_MAX -}; +enum nft_match_attributes { NFTA_MATCH_UNSPEC, NFTA_MATCH_NAME, NFTA_MATCH_REV, NFTA_MATCH_INFO, __NFTA_MATCH_MAX }; #define NFTA_MATCH_MAX (__NFTA_MATCH_MAX - 1) #define NFT_COMPAT_NAME_MAX 32 diff --git a/include/arch/x86_64/linux/netfilter/nfnetlink.h b/include/arch/x86_64/linux/netfilter/nfnetlink.h index 9c0aacf1..3a431d0a 100644 --- a/include/arch/x86_64/linux/netfilter/nfnetlink.h +++ b/include/arch/x86_64/linux/netfilter/nfnetlink.h @@ -72,11 +72,7 @@ struct nfgenmsg { * * @NFNL_BATCH_GENID: generation ID for this changeset (NLA_U32) */ -enum nfnl_batch_attributes { - NFNL_BATCH_UNSPEC, - NFNL_BATCH_GENID, - __NFNL_BATCH_MAX -}; +enum nfnl_batch_attributes { NFNL_BATCH_UNSPEC, NFNL_BATCH_GENID, __NFNL_BATCH_MAX }; #define NFNL_BATCH_MAX (__NFNL_BATCH_MAX - 1) #endif /* _NFNETLINK_H */ diff --git a/include/arch/x86_64/linux/netfilter/nfnetlink_acct.h b/include/arch/x86_64/linux/netfilter/nfnetlink_acct.h index 654cea65..e5fd0bc3 100644 --- a/include/arch/x86_64/linux/netfilter/nfnetlink_acct.h +++ b/include/arch/x86_64/linux/netfilter/nfnetlink_acct.h @@ -35,12 +35,7 @@ enum nfnl_acct_type { }; #define NFACCT_MAX (__NFACCT_MAX - 1) -enum nfnl_attr_filter_type { - NFACCT_FILTER_UNSPEC, - NFACCT_FILTER_MASK, - NFACCT_FILTER_VALUE, - __NFACCT_FILTER_MAX -}; +enum nfnl_attr_filter_type { NFACCT_FILTER_UNSPEC, NFACCT_FILTER_MASK, NFACCT_FILTER_VALUE, __NFACCT_FILTER_MAX }; #define NFACCT_FILTER_MAX (__NFACCT_FILTER_MAX - 1) #endif /* _NFNL_ACCT_H_ */ diff --git a/include/arch/x86_64/linux/netfilter/nfnetlink_compat.h b/include/arch/x86_64/linux/netfilter/nfnetlink_compat.h index fd70274f..4f4f13c4 100644 --- a/include/arch/x86_64/linux/netfilter/nfnetlink_compat.h +++ b/include/arch/x86_64/linux/netfilter/nfnetlink_compat.h @@ -33,30 +33,25 @@ struct nfattr { #define NFNL_NFA_NEST 0x8000 #define NFA_TYPE(attr) ((attr)->nfa_type & 0x7fff) -#define NFA_ALIGNTO 4 -#define NFA_ALIGN(len) (((len) + NFA_ALIGNTO - 1) & ~(NFA_ALIGNTO - 1)) -#define NFA_OK(nfa, len) \ - ((len) > 0 && (nfa)->nfa_len >= sizeof(struct nfattr) && \ - (nfa)->nfa_len <= (len)) -#define NFA_NEXT(nfa, attrlen) \ - ((attrlen) -= NFA_ALIGN((nfa)->nfa_len), \ - (struct nfattr *)(((char *)(nfa)) + NFA_ALIGN((nfa)->nfa_len))) +#define NFA_ALIGNTO 4 +#define NFA_ALIGN(len) (((len) + NFA_ALIGNTO - 1) & ~(NFA_ALIGNTO - 1)) +#define NFA_OK(nfa, len) ((len) > 0 && (nfa)->nfa_len >= sizeof(struct nfattr) && (nfa)->nfa_len <= (len)) +#define NFA_NEXT(nfa, attrlen) \ + ((attrlen) -= NFA_ALIGN((nfa)->nfa_len), (struct nfattr *)(((char *)(nfa)) + NFA_ALIGN((nfa)->nfa_len))) #define NFA_LENGTH(len) (NFA_ALIGN(sizeof(struct nfattr)) + (len)) #define NFA_SPACE(len) NFA_ALIGN(NFA_LENGTH(len)) #define NFA_DATA(nfa) ((void *)(((char *)(nfa)) + NFA_LENGTH(0))) #define NFA_PAYLOAD(nfa) ((int)((nfa)->nfa_len) - NFA_LENGTH(0)) -#define NFA_NEST(skb, type) \ - ({ \ - struct nfattr *__start = \ - (struct nfattr *)skb_tail_pointer(skb); \ - NFA_PUT(skb, (NFNL_NFA_NEST | type), 0, NULL); \ - __start; \ +#define NFA_NEST(skb, type) \ + ({ \ + struct nfattr *__start = (struct nfattr *)skb_tail_pointer(skb); \ + NFA_PUT(skb, (NFNL_NFA_NEST | type), 0, NULL); \ + __start; \ }) -#define NFA_NEST_END(skb, start) \ - ({ \ - (start)->nfa_len = \ - skb_tail_pointer(skb) - (unsigned char *)(start); \ - (skb)->len; \ +#define NFA_NEST_END(skb, start) \ + ({ \ + (start)->nfa_len = skb_tail_pointer(skb) - (unsigned char *)(start); \ + (skb)->len; \ }) #define NFA_NEST_CANCEL(skb, start) \ ({ \ @@ -65,9 +60,7 @@ struct nfattr { -1; \ }) -#define NFM_NFA(n) \ - ((struct nfattr *)(((char *)(n)) + \ - NLMSG_ALIGN(sizeof(struct nfgenmsg)))) +#define NFM_NFA(n) ((struct nfattr *)(((char *)(n)) + NLMSG_ALIGN(sizeof(struct nfgenmsg)))) #define NFM_PAYLOAD(n) NLMSG_PAYLOAD(n, sizeof(struct nfgenmsg)) #endif /* _NFNETLINK_COMPAT_H */ diff --git a/include/arch/x86_64/linux/netfilter/nfnetlink_conntrack.h b/include/arch/x86_64/linux/netfilter/nfnetlink_conntrack.h index ff525c5b..a5f88cb6 100644 --- a/include/arch/x86_64/linux/netfilter/nfnetlink_conntrack.h +++ b/include/arch/x86_64/linux/netfilter/nfnetlink_conntrack.h @@ -61,23 +61,10 @@ enum ctattr_type { }; #define CTA_MAX (__CTA_MAX - 1) -enum ctattr_tuple { - CTA_TUPLE_UNSPEC, - CTA_TUPLE_IP, - CTA_TUPLE_PROTO, - CTA_TUPLE_ZONE, - __CTA_TUPLE_MAX -}; +enum ctattr_tuple { CTA_TUPLE_UNSPEC, CTA_TUPLE_IP, CTA_TUPLE_PROTO, CTA_TUPLE_ZONE, __CTA_TUPLE_MAX }; #define CTA_TUPLE_MAX (__CTA_TUPLE_MAX - 1) -enum ctattr_ip { - CTA_IP_UNSPEC, - CTA_IP_V4_SRC, - CTA_IP_V4_DST, - CTA_IP_V6_SRC, - CTA_IP_V6_DST, - __CTA_IP_MAX -}; +enum ctattr_ip { CTA_IP_UNSPEC, CTA_IP_V4_SRC, CTA_IP_V4_DST, CTA_IP_V6_SRC, CTA_IP_V6_DST, __CTA_IP_MAX }; #define CTA_IP_MAX (__CTA_IP_MAX - 1) enum ctattr_l4proto { @@ -167,12 +154,7 @@ enum ctattr_nat { }; #define CTA_NAT_MAX (__CTA_NAT_MAX - 1) -enum ctattr_protonat { - CTA_PROTONAT_UNSPEC, - CTA_PROTONAT_PORT_MIN, - CTA_PROTONAT_PORT_MAX, - __CTA_PROTONAT_MAX -}; +enum ctattr_protonat { CTA_PROTONAT_UNSPEC, CTA_PROTONAT_PORT_MIN, CTA_PROTONAT_PORT_MAX, __CTA_PROTONAT_MAX }; #define CTA_PROTONAT_MAX (__CTA_PROTONAT_MAX - 1) enum ctattr_seqadj { @@ -219,20 +201,10 @@ enum ctattr_expect { }; #define CTA_EXPECT_MAX (__CTA_EXPECT_MAX - 1) -enum ctattr_expect_nat { - CTA_EXPECT_NAT_UNSPEC, - CTA_EXPECT_NAT_DIR, - CTA_EXPECT_NAT_TUPLE, - __CTA_EXPECT_NAT_MAX -}; +enum ctattr_expect_nat { CTA_EXPECT_NAT_UNSPEC, CTA_EXPECT_NAT_DIR, CTA_EXPECT_NAT_TUPLE, __CTA_EXPECT_NAT_MAX }; #define CTA_EXPECT_NAT_MAX (__CTA_EXPECT_NAT_MAX - 1) -enum ctattr_help { - CTA_HELP_UNSPEC, - CTA_HELP_NAME, - CTA_HELP_INFO, - __CTA_HELP_MAX -}; +enum ctattr_help { CTA_HELP_UNSPEC, CTA_HELP_NAME, CTA_HELP_INFO, __CTA_HELP_MAX }; #define CTA_HELP_MAX (__CTA_HELP_MAX - 1) enum ctattr_secctx { CTA_SECCTX_UNSPEC, CTA_SECCTX_NAME, __CTA_SECCTX_MAX }; @@ -276,12 +248,7 @@ enum ctattr_expect_stats { }; #define CTA_STATS_EXP_MAX (__CTA_STATS_EXP_MAX - 1) -enum ctattr_filter { - CTA_FILTER_UNSPEC, - CTA_FILTER_ORIG_FLAGS, - CTA_FILTER_REPLY_FLAGS, - __CTA_FILTER_MAX -}; +enum ctattr_filter { CTA_FILTER_UNSPEC, CTA_FILTER_ORIG_FLAGS, CTA_FILTER_REPLY_FLAGS, __CTA_FILTER_MAX }; #define CTA_FILTER_MAX (__CTA_FILTER_MAX - 1) #endif /* _IPCONNTRACK_NETLINK_H */ diff --git a/include/arch/x86_64/linux/netfilter/nfnetlink_cttimeout.h b/include/arch/x86_64/linux/netfilter/nfnetlink_cttimeout.h index 096114db..e5a7647a 100644 --- a/include/arch/x86_64/linux/netfilter/nfnetlink_cttimeout.h +++ b/include/arch/x86_64/linux/netfilter/nfnetlink_cttimeout.h @@ -24,11 +24,7 @@ enum ctattr_timeout { }; #define CTA_TIMEOUT_MAX (__CTA_TIMEOUT_MAX - 1) -enum ctattr_timeout_generic { - CTA_TIMEOUT_GENERIC_UNSPEC, - CTA_TIMEOUT_GENERIC_TIMEOUT, - __CTA_TIMEOUT_GENERIC_MAX -}; +enum ctattr_timeout_generic { CTA_TIMEOUT_GENERIC_UNSPEC, CTA_TIMEOUT_GENERIC_TIMEOUT, __CTA_TIMEOUT_GENERIC_MAX }; #define CTA_TIMEOUT_GENERIC_MAX (__CTA_TIMEOUT_GENERIC_MAX - 1) enum ctattr_timeout_tcp { @@ -64,11 +60,7 @@ enum ctattr_timeout_udplite { }; #define CTA_TIMEOUT_UDPLITE_MAX (__CTA_TIMEOUT_UDPLITE_MAX - 1) -enum ctattr_timeout_icmp { - CTA_TIMEOUT_ICMP_UNSPEC, - CTA_TIMEOUT_ICMP_TIMEOUT, - __CTA_TIMEOUT_ICMP_MAX -}; +enum ctattr_timeout_icmp { CTA_TIMEOUT_ICMP_UNSPEC, CTA_TIMEOUT_ICMP_TIMEOUT, __CTA_TIMEOUT_ICMP_MAX }; #define CTA_TIMEOUT_ICMP_MAX (__CTA_TIMEOUT_ICMP_MAX - 1) enum ctattr_timeout_dccp { @@ -99,11 +91,7 @@ enum ctattr_timeout_sctp { }; #define CTA_TIMEOUT_SCTP_MAX (__CTA_TIMEOUT_SCTP_MAX - 1) -enum ctattr_timeout_icmpv6 { - CTA_TIMEOUT_ICMPV6_UNSPEC, - CTA_TIMEOUT_ICMPV6_TIMEOUT, - __CTA_TIMEOUT_ICMPV6_MAX -}; +enum ctattr_timeout_icmpv6 { CTA_TIMEOUT_ICMPV6_UNSPEC, CTA_TIMEOUT_ICMPV6_TIMEOUT, __CTA_TIMEOUT_ICMPV6_MAX }; #define CTA_TIMEOUT_ICMPV6_MAX (__CTA_TIMEOUT_ICMPV6_MAX - 1) enum ctattr_timeout_gre { diff --git a/include/arch/x86_64/linux/netfilter/x_tables.h b/include/arch/x86_64/linux/netfilter/x_tables.h index 6337dc88..f454b019 100644 --- a/include/arch/x86_64/linux/netfilter/x_tables.h +++ b/include/arch/x86_64/linux/netfilter/x_tables.h @@ -133,59 +133,53 @@ struct xt_counters_info { #define XT_INV_PROTO 0x40 /* Invert the sense of PROTO. */ /* fn returns 0 to continue iteration */ -#define XT_MATCH_ITERATE(type, e, fn, args...) \ - ({ \ - unsigned int __i; \ - int __ret = 0; \ - struct xt_entry_match *__m; \ - \ - for (__i = sizeof(type); __i < (e)->target_offset; \ - __i += __m->u.match_size) { \ - __m = (void *)e + __i; \ - \ - __ret = fn(__m, ##args); \ - if (__ret != 0) \ - break; \ - } \ - __ret; \ +#define XT_MATCH_ITERATE(type, e, fn, args...) \ + ({ \ + unsigned int __i; \ + int __ret = 0; \ + struct xt_entry_match *__m; \ + \ + for (__i = sizeof(type); __i < (e)->target_offset; __i += __m->u.match_size) { \ + __m = (void *)e + __i; \ + \ + __ret = fn(__m, ##args); \ + if (__ret != 0) \ + break; \ + } \ + __ret; \ }) /* fn returns 0 to continue iteration */ -#define XT_ENTRY_ITERATE_CONTINUE(type, entries, size, n, fn, args...) \ - ({ \ - unsigned int __i, __n; \ - int __ret = 0; \ - type *__entry; \ - \ - for (__i = 0, __n = 0; __i < (size); \ - __i += __entry->next_offset, __n++) { \ - __entry = (void *)(entries) + __i; \ - if (__n < n) \ - continue; \ - \ - __ret = fn(__entry, ##args); \ - if (__ret != 0) \ - break; \ - } \ - __ret; \ +#define XT_ENTRY_ITERATE_CONTINUE(type, entries, size, n, fn, args...) \ + ({ \ + unsigned int __i, __n; \ + int __ret = 0; \ + type *__entry; \ + \ + for (__i = 0, __n = 0; __i < (size); __i += __entry->next_offset, __n++) { \ + __entry = (void *)(entries) + __i; \ + if (__n < n) \ + continue; \ + \ + __ret = fn(__entry, ##args); \ + if (__ret != 0) \ + break; \ + } \ + __ret; \ }) /* fn returns 0 to continue iteration */ -#define XT_ENTRY_ITERATE(type, entries, size, fn, args...) \ - XT_ENTRY_ITERATE_CONTINUE(type, entries, size, 0, fn, args) +#define XT_ENTRY_ITERATE(type, entries, size, fn, args...) XT_ENTRY_ITERATE_CONTINUE(type, entries, size, 0, fn, args) /* pos is normally a struct ipt_entry/ip6t_entry/etc. */ -#define xt_entry_foreach(pos, ehead, esize) \ - for ((pos) = (typeof(pos))(ehead); \ - (pos) < (typeof(pos))((char *)(ehead) + (esize)); \ +#define xt_entry_foreach(pos, ehead, esize) \ + for ((pos) = (typeof(pos))(ehead); (pos) < (typeof(pos))((char *)(ehead) + (esize)); \ (pos) = (typeof(pos))((char *)(pos) + (pos)->next_offset)) /* can only be xt_entry_match, so no use of typeof here */ -#define xt_ematch_foreach(pos, entry) \ - for ((pos) = (struct xt_entry_match *)entry->elems; \ - (pos) < (struct xt_entry_match *)((char *)(entry) + \ - (entry)->target_offset); \ - (pos) = (struct xt_entry_match *)((char *)(pos) + \ - (pos)->u.match_size)) +#define xt_ematch_foreach(pos, entry) \ + for ((pos) = (struct xt_entry_match *)entry->elems; \ + (pos) < (struct xt_entry_match *)((char *)(entry) + (entry)->target_offset); \ + (pos) = (struct xt_entry_match *)((char *)(pos) + (pos)->u.match_size)) #endif /* _X_TABLES_H */ diff --git a/include/arch/x86_64/linux/netfilter/xt_CT.h b/include/arch/x86_64/linux/netfilter/xt_CT.h index f322a721..8eb5e0cf 100644 --- a/include/arch/x86_64/linux/netfilter/xt_CT.h +++ b/include/arch/x86_64/linux/netfilter/xt_CT.h @@ -11,8 +11,7 @@ enum { XT_CT_ZONE_DIR_REPL = 1 << 3, XT_CT_ZONE_MARK = 1 << 4, - XT_CT_MASK = XT_CT_NOTRACK | XT_CT_NOTRACK_ALIAS | XT_CT_ZONE_DIR_ORIG | - XT_CT_ZONE_DIR_REPL | XT_CT_ZONE_MARK, + XT_CT_MASK = XT_CT_NOTRACK | XT_CT_NOTRACK_ALIAS | XT_CT_ZONE_DIR_ORIG | XT_CT_ZONE_DIR_REPL | XT_CT_ZONE_MARK, }; struct xt_ct_target_info { diff --git a/include/arch/x86_64/linux/netfilter/xt_TCPOPTSTRIP.h b/include/arch/x86_64/linux/netfilter/xt_TCPOPTSTRIP.h index 3a7c0483..a8782fd2 100644 --- a/include/arch/x86_64/linux/netfilter/xt_TCPOPTSTRIP.h +++ b/include/arch/x86_64/linux/netfilter/xt_TCPOPTSTRIP.h @@ -4,9 +4,8 @@ #include -#define tcpoptstrip_set_bit(bmap, idx) (bmap[(idx) >> 5] |= 1U << (idx & 31)) -#define tcpoptstrip_test_bit(bmap, idx) \ - (((1U << (idx & 31)) & bmap[(idx) >> 5]) != 0) +#define tcpoptstrip_set_bit(bmap, idx) (bmap[(idx) >> 5] |= 1U << (idx & 31)) +#define tcpoptstrip_test_bit(bmap, idx) (((1U << (idx & 31)) & bmap[(idx) >> 5]) != 0) struct xt_tcpoptstrip_target_info { __u32 strip_bmap[8]; diff --git a/include/arch/x86_64/linux/netfilter/xt_multiport.h b/include/arch/x86_64/linux/netfilter/xt_multiport.h index 31112fff..9d8486fc 100644 --- a/include/arch/x86_64/linux/netfilter/xt_multiport.h +++ b/include/arch/x86_64/linux/netfilter/xt_multiport.h @@ -4,11 +4,7 @@ #include -enum xt_multiport_flags { - XT_MULTIPORT_SOURCE, - XT_MULTIPORT_DESTINATION, - XT_MULTIPORT_EITHER -}; +enum xt_multiport_flags { XT_MULTIPORT_SOURCE, XT_MULTIPORT_DESTINATION, XT_MULTIPORT_EITHER }; #define XT_MULTI_PORTS 15 diff --git a/include/arch/x86_64/linux/netfilter/xt_owner.h b/include/arch/x86_64/linux/netfilter/xt_owner.h index bea87379..f089f842 100644 --- a/include/arch/x86_64/linux/netfilter/xt_owner.h +++ b/include/arch/x86_64/linux/netfilter/xt_owner.h @@ -11,8 +11,7 @@ enum { XT_OWNER_SUPPL_GROUPS = 1 << 3, }; -#define XT_OWNER_MASK \ - (XT_OWNER_UID | XT_OWNER_GID | XT_OWNER_SOCKET | XT_OWNER_SUPPL_GROUPS) +#define XT_OWNER_MASK (XT_OWNER_UID | XT_OWNER_GID | XT_OWNER_SOCKET | XT_OWNER_SUPPL_GROUPS) struct xt_owner_match_info { __u32 uid_min, uid_max; diff --git a/include/arch/x86_64/linux/netfilter/xt_recent.h b/include/arch/x86_64/linux/netfilter/xt_recent.h index 995f95cf..47b46557 100644 --- a/include/arch/x86_64/linux/netfilter/xt_recent.h +++ b/include/arch/x86_64/linux/netfilter/xt_recent.h @@ -22,9 +22,8 @@ enum { /* Only allowed with --rcheck and --update */ #define XT_RECENT_MODIFIERS (XT_RECENT_TTL | XT_RECENT_REAP) -#define XT_RECENT_VALID_FLAGS \ - (XT_RECENT_CHECK | XT_RECENT_SET | XT_RECENT_UPDATE | \ - XT_RECENT_REMOVE | XT_RECENT_TTL | XT_RECENT_REAP) +#define XT_RECENT_VALID_FLAGS \ + (XT_RECENT_CHECK | XT_RECENT_SET | XT_RECENT_UPDATE | XT_RECENT_REMOVE | XT_RECENT_TTL | XT_RECENT_REAP) struct xt_recent_mtinfo { __u32 seconds; diff --git a/include/arch/x86_64/linux/netfilter/xt_sctp.h b/include/arch/x86_64/linux/netfilter/xt_sctp.h index 772f68ac..2d257c37 100644 --- a/include/arch/x86_64/linux/netfilter/xt_sctp.h +++ b/include/arch/x86_64/linux/netfilter/xt_sctp.h @@ -25,12 +25,9 @@ struct xt_sctp_info { __u32 chunkmap[256 / sizeof(__u32)]; /* Bit mask of chunks to be matched according to RFC 2960 */ -#define SCTP_CHUNK_MATCH_ANY \ - 0x01 /* Match if any of the chunk types are present */ -#define SCTP_CHUNK_MATCH_ALL \ - 0x02 /* Match if all of the chunk types are present */ -#define SCTP_CHUNK_MATCH_ONLY \ - 0x04 /* Match if these are the only chunk types present */ +#define SCTP_CHUNK_MATCH_ANY 0x01 /* Match if any of the chunk types are present */ +#define SCTP_CHUNK_MATCH_ALL 0x02 /* Match if all of the chunk types are present */ +#define SCTP_CHUNK_MATCH_ONLY 0x04 /* Match if these are the only chunk types present */ __u32 chunk_match_type; struct xt_sctp_flag_info flag_info[XT_NUM_SCTP_FLAGS]; @@ -42,38 +39,27 @@ struct xt_sctp_info { #define bytes(type) (sizeof(type) * 8) -#define SCTP_CHUNKMAP_SET(chunkmap, type) \ - do { \ - (chunkmap)[type / bytes(__u32)] |= 1u \ - << (type % bytes(__u32)); \ +#define SCTP_CHUNKMAP_SET(chunkmap, type) \ + do { \ + (chunkmap)[type / bytes(__u32)] |= 1u << (type % bytes(__u32)); \ } while (0) -#define SCTP_CHUNKMAP_CLEAR(chunkmap, type) \ - do { \ - (chunkmap)[type / bytes(__u32)] &= \ - ~(1u << (type % bytes(__u32))); \ +#define SCTP_CHUNKMAP_CLEAR(chunkmap, type) \ + do { \ + (chunkmap)[type / bytes(__u32)] &= ~(1u << (type % bytes(__u32))); \ } while (0) -#define SCTP_CHUNKMAP_IS_SET(chunkmap, type) \ - ({ \ - ((chunkmap)[type / bytes(__u32)] & \ - (1u << (type % bytes(__u32)))) ? \ - 1 : \ - 0; \ - }) +#define SCTP_CHUNKMAP_IS_SET(chunkmap, type) \ + ({ ((chunkmap)[type / bytes(__u32)] & (1u << (type % bytes(__u32)))) ? 1 : 0; }) #define SCTP_CHUNKMAP_RESET(chunkmap) memset((chunkmap), 0, sizeof(chunkmap)) -#define SCTP_CHUNKMAP_SET_ALL(chunkmap) \ - memset((chunkmap), ~0U, sizeof(chunkmap)) +#define SCTP_CHUNKMAP_SET_ALL(chunkmap) memset((chunkmap), ~0U, sizeof(chunkmap)) -#define SCTP_CHUNKMAP_COPY(destmap, srcmap) \ - memcpy((destmap), (srcmap), sizeof(srcmap)) +#define SCTP_CHUNKMAP_COPY(destmap, srcmap) memcpy((destmap), (srcmap), sizeof(srcmap)) -#define SCTP_CHUNKMAP_IS_CLEAR(chunkmap) \ - __sctp_chunkmap_is_clear((chunkmap), ARRAY_SIZE(chunkmap)) -static __inline__ _Bool __sctp_chunkmap_is_clear(const __u32 *chunkmap, - unsigned int n) +#define SCTP_CHUNKMAP_IS_CLEAR(chunkmap) __sctp_chunkmap_is_clear((chunkmap), ARRAY_SIZE(chunkmap)) +static __inline__ _Bool __sctp_chunkmap_is_clear(const __u32 *chunkmap, unsigned int n) { unsigned int i; for (i = 0; i < n; ++i) @@ -82,10 +68,8 @@ static __inline__ _Bool __sctp_chunkmap_is_clear(const __u32 *chunkmap, return 1; } -#define SCTP_CHUNKMAP_IS_ALL_SET(chunkmap) \ - __sctp_chunkmap_is_all_set((chunkmap), ARRAY_SIZE(chunkmap)) -static __inline__ _Bool __sctp_chunkmap_is_all_set(const __u32 *chunkmap, - unsigned int n) +#define SCTP_CHUNKMAP_IS_ALL_SET(chunkmap) __sctp_chunkmap_is_all_set((chunkmap), ARRAY_SIZE(chunkmap)) +static __inline__ _Bool __sctp_chunkmap_is_all_set(const __u32 *chunkmap, unsigned int n) { unsigned int i; for (i = 0; i < n; ++i) diff --git a/include/arch/x86_64/linux/netfilter/xt_socket.h b/include/arch/x86_64/linux/netfilter/xt_socket.h index 690b0385..7d5b29fe 100644 --- a/include/arch/x86_64/linux/netfilter/xt_socket.h +++ b/include/arch/x86_64/linux/netfilter/xt_socket.h @@ -23,7 +23,6 @@ struct xt_socket_mtinfo2 { struct xt_socket_mtinfo3 { __u8 flags; }; -#define XT_SOCKET_FLAGS_V3 \ - (XT_SOCKET_TRANSPARENT | XT_SOCKET_NOWILDCARD | XT_SOCKET_RESTORESKMARK) +#define XT_SOCKET_FLAGS_V3 (XT_SOCKET_TRANSPARENT | XT_SOCKET_NOWILDCARD | XT_SOCKET_RESTORESKMARK) #endif /* _XT_SOCKET_H */ diff --git a/include/arch/x86_64/linux/netfilter/xt_statistic.h b/include/arch/x86_64/linux/netfilter/xt_statistic.h index e339b04b..769a70e6 100644 --- a/include/arch/x86_64/linux/netfilter/xt_statistic.h +++ b/include/arch/x86_64/linux/netfilter/xt_statistic.h @@ -4,11 +4,7 @@ #include -enum xt_statistic_mode { - XT_STATISTIC_MODE_RANDOM, - XT_STATISTIC_MODE_NTH, - __XT_STATISTIC_MODE_MAX -}; +enum xt_statistic_mode { XT_STATISTIC_MODE_RANDOM, XT_STATISTIC_MODE_NTH, __XT_STATISTIC_MODE_MAX }; #define XT_STATISTIC_MODE_MAX (__XT_STATISTIC_MODE_MAX - 1) enum xt_statistic_flags { diff --git a/include/arch/x86_64/linux/netfilter_arp/arp_tables.h b/include/arch/x86_64/linux/netfilter_arp/arp_tables.h index 16fd36c8..a6152b7e 100644 --- a/include/arch/x86_64/linux/netfilter_arp/arp_tables.h +++ b/include/arch/x86_64/linux/netfilter_arp/arp_tables.h @@ -17,19 +17,18 @@ #include -#define ARPT_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN -#define ARPT_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN -#define arpt_entry_target xt_entry_target -#define arpt_standard_target xt_standard_target -#define arpt_error_target xt_error_target -#define ARPT_CONTINUE XT_CONTINUE -#define ARPT_RETURN XT_RETURN -#define arpt_counters_info xt_counters_info -#define arpt_counters xt_counters -#define ARPT_STANDARD_TARGET XT_STANDARD_TARGET -#define ARPT_ERROR_TARGET XT_ERROR_TARGET -#define ARPT_ENTRY_ITERATE(entries, size, fn, args...) \ - XT_ENTRY_ITERATE(struct arpt_entry, entries, size, fn, ##args) +#define ARPT_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN +#define ARPT_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN +#define arpt_entry_target xt_entry_target +#define arpt_standard_target xt_standard_target +#define arpt_error_target xt_error_target +#define ARPT_CONTINUE XT_CONTINUE +#define ARPT_RETURN XT_RETURN +#define arpt_counters_info xt_counters_info +#define arpt_counters xt_counters +#define ARPT_STANDARD_TARGET XT_STANDARD_TARGET +#define ARPT_ERROR_TARGET XT_ERROR_TARGET +#define ARPT_ENTRY_ITERATE(entries, size, fn, args...) XT_ENTRY_ITERATE(struct arpt_entry, entries, size, fn, ##args) #define ARPT_DEV_ADDR_LEN_MAX 16 diff --git a/include/arch/x86_64/linux/netfilter_bridge/ebt_among.h b/include/arch/x86_64/linux/netfilter_bridge/ebt_among.h index 4b613653..08c86b68 100644 --- a/include/arch/x86_64/linux/netfilter_bridge/ebt_among.h +++ b/include/arch/x86_64/linux/netfilter_bridge/ebt_among.h @@ -43,11 +43,8 @@ struct ebt_mac_wormhash { struct ebt_mac_wormhash_tuple pool[]; }; -#define ebt_mac_wormhash_size(x) \ - ((x) ? sizeof(struct ebt_mac_wormhash) + \ - (x)->poolsize * \ - sizeof(struct ebt_mac_wormhash_tuple) : \ - 0) +#define ebt_mac_wormhash_size(x) \ + ((x) ? sizeof(struct ebt_mac_wormhash) + (x)->poolsize * sizeof(struct ebt_mac_wormhash_tuple) : 0) struct ebt_among_info { int wh_dst_ofs; @@ -58,14 +55,8 @@ struct ebt_among_info { #define EBT_AMONG_DST_NEG 0x1 #define EBT_AMONG_SRC_NEG 0x2 -#define ebt_among_wh_dst(x) \ - ((x)->wh_dst_ofs ? \ - (struct ebt_mac_wormhash *)((char *)(x) + (x)->wh_dst_ofs) : \ - NULL) -#define ebt_among_wh_src(x) \ - ((x)->wh_src_ofs ? \ - (struct ebt_mac_wormhash *)((char *)(x) + (x)->wh_src_ofs) : \ - NULL) +#define ebt_among_wh_dst(x) ((x)->wh_dst_ofs ? (struct ebt_mac_wormhash *)((char *)(x) + (x)->wh_dst_ofs) : NULL) +#define ebt_among_wh_src(x) ((x)->wh_src_ofs ? (struct ebt_mac_wormhash *)((char *)(x) + (x)->wh_src_ofs) : NULL) #define EBT_AMONG_MATCH "among" diff --git a/include/arch/x86_64/linux/netfilter_bridge/ebt_arp.h b/include/arch/x86_64/linux/netfilter_bridge/ebt_arp.h index 4c488858..ddb124e9 100644 --- a/include/arch/x86_64/linux/netfilter_bridge/ebt_arp.h +++ b/include/arch/x86_64/linux/netfilter_bridge/ebt_arp.h @@ -13,9 +13,9 @@ #define EBT_ARP_SRC_MAC 0x20 #define EBT_ARP_DST_MAC 0x40 #define EBT_ARP_GRAT 0x80 -#define EBT_ARP_MASK \ - (EBT_ARP_OPCODE | EBT_ARP_HTYPE | EBT_ARP_PTYPE | EBT_ARP_SRC_IP | \ - EBT_ARP_DST_IP | EBT_ARP_SRC_MAC | EBT_ARP_DST_MAC | EBT_ARP_GRAT) +#define EBT_ARP_MASK \ + (EBT_ARP_OPCODE | EBT_ARP_HTYPE | EBT_ARP_PTYPE | EBT_ARP_SRC_IP | EBT_ARP_DST_IP | EBT_ARP_SRC_MAC | \ + EBT_ARP_DST_MAC | EBT_ARP_GRAT) #define EBT_ARP_MATCH "arp" struct ebt_arp_info { diff --git a/include/arch/x86_64/linux/netfilter_bridge/ebt_ip.h b/include/arch/x86_64/linux/netfilter_bridge/ebt_ip.h index b5fcb723..5d70315a 100644 --- a/include/arch/x86_64/linux/netfilter_bridge/ebt_ip.h +++ b/include/arch/x86_64/linux/netfilter_bridge/ebt_ip.h @@ -26,9 +26,9 @@ #define EBT_IP_DPORT 0x20 #define EBT_IP_ICMP 0x40 #define EBT_IP_IGMP 0x80 -#define EBT_IP_MASK \ - (EBT_IP_SOURCE | EBT_IP_DEST | EBT_IP_TOS | EBT_IP_PROTO | \ - EBT_IP_SPORT | EBT_IP_DPORT | EBT_IP_ICMP | EBT_IP_IGMP) +#define EBT_IP_MASK \ + (EBT_IP_SOURCE | EBT_IP_DEST | EBT_IP_TOS | EBT_IP_PROTO | EBT_IP_SPORT | EBT_IP_DPORT | EBT_IP_ICMP | \ + EBT_IP_IGMP) #define EBT_IP_MATCH "ip" /* the same values are used for the invflags */ diff --git a/include/arch/x86_64/linux/netfilter_bridge/ebt_ip6.h b/include/arch/x86_64/linux/netfilter_bridge/ebt_ip6.h index b38b6b25..4dbf7c94 100644 --- a/include/arch/x86_64/linux/netfilter_bridge/ebt_ip6.h +++ b/include/arch/x86_64/linux/netfilter_bridge/ebt_ip6.h @@ -24,9 +24,8 @@ #define EBT_IP6_DPORT 0x20 #define EBT_IP6_ICMP6 0x40 -#define EBT_IP6_MASK \ - (EBT_IP6_SOURCE | EBT_IP6_DEST | EBT_IP6_TCLASS | EBT_IP6_PROTO | \ - EBT_IP6_SPORT | EBT_IP6_DPORT | EBT_IP6_ICMP6) +#define EBT_IP6_MASK \ + (EBT_IP6_SOURCE | EBT_IP6_DEST | EBT_IP6_TCLASS | EBT_IP6_PROTO | EBT_IP6_SPORT | EBT_IP6_DPORT | EBT_IP6_ICMP6) #define EBT_IP6_MATCH "ip6" /* the same values are used for the invflags */ diff --git a/include/arch/x86_64/linux/netfilter_bridge/ebtables.h b/include/arch/x86_64/linux/netfilter_bridge/ebtables.h index 25bc2f54..226690de 100644 --- a/include/arch/x86_64/linux/netfilter_bridge/ebtables.h +++ b/include/arch/x86_64/linux/netfilter_bridge/ebtables.h @@ -106,9 +106,7 @@ struct ebt_entries { #define EBT_802_3 0x04 #define EBT_SOURCEMAC 0x08 #define EBT_DESTMAC 0x10 -#define EBT_F_MASK \ - (EBT_NOPROTO | EBT_802_3 | EBT_SOURCEMAC | EBT_DESTMAC | \ - EBT_ENTRY_OR_ENTRIES) +#define EBT_F_MASK (EBT_NOPROTO | EBT_802_3 | EBT_SOURCEMAC | EBT_DESTMAC | EBT_ENTRY_OR_ENTRIES) #define EBT_IPROTO 0x01 #define EBT_IIN 0x02 @@ -117,9 +115,7 @@ struct ebt_entries { #define EBT_IDEST 0x10 #define EBT_ILOGICALIN 0x20 #define EBT_ILOGICALOUT 0x40 -#define EBT_INV_MASK \ - (EBT_IPROTO | EBT_IIN | EBT_IOUT | EBT_ILOGICALIN | EBT_ILOGICALOUT | \ - EBT_ISOURCE | EBT_IDEST) +#define EBT_INV_MASK (EBT_IPROTO | EBT_IIN | EBT_IOUT | EBT_ILOGICALIN | EBT_ILOGICALOUT | EBT_ISOURCE | EBT_IDEST) struct ebt_entry_match { union { @@ -131,8 +127,7 @@ struct ebt_entry_match { } u; /* size of data */ unsigned int match_size; - unsigned char data[] - __attribute__((aligned(__alignof__(struct ebt_replace)))); + unsigned char data[] __attribute__((aligned(__alignof__(struct ebt_replace)))); }; struct ebt_entry_watcher { @@ -145,8 +140,7 @@ struct ebt_entry_watcher { } u; /* size of data */ unsigned int watcher_size; - unsigned char data[] - __attribute__((aligned(__alignof__(struct ebt_replace)))); + unsigned char data[] __attribute__((aligned(__alignof__(struct ebt_replace)))); }; struct ebt_entry_target { @@ -159,8 +153,7 @@ struct ebt_entry_target { } u; /* size of data */ unsigned int target_size; - unsigned char data[0] - __attribute__((aligned(__alignof__(struct ebt_replace)))); + unsigned char data[0] __attribute__((aligned(__alignof__(struct ebt_replace)))); }; #define EBT_STANDARD_TARGET "standard" @@ -194,8 +187,7 @@ struct ebt_entry { unsigned int target_offset; /* sizeof ebt_entry + matches + watchers + target */ unsigned int next_offset;); - unsigned char elems[] - __attribute__((aligned(__alignof__(struct ebt_replace)))); + unsigned char elems[] __attribute__((aligned(__alignof__(struct ebt_replace)))); }; static __inline__ struct ebt_entry_target *ebt_get_target(struct ebt_entry *e) @@ -218,49 +210,46 @@ static __inline__ struct ebt_entry_target *ebt_get_target(struct ebt_entry *e) /* blatently stolen from ip_tables.h * fn returns 0 to continue iteration */ -#define EBT_MATCH_ITERATE(e, fn, args...) \ - ({ \ - unsigned int __i; \ - int __ret = 0; \ - struct ebt_entry_match *__match; \ - \ - for (__i = sizeof(struct ebt_entry); \ - __i < (e)->watchers_offset; \ - __i += \ - __match->match_size + sizeof(struct ebt_entry_match)) { \ - __match = (void *)(e) + __i; \ - \ - __ret = fn(__match, ##args); \ - if (__ret != 0) \ - break; \ - } \ - if (__ret == 0) { \ - if (__i != (e)->watchers_offset) \ - __ret = -EINVAL; \ - } \ - __ret; \ +#define EBT_MATCH_ITERATE(e, fn, args...) \ + ({ \ + unsigned int __i; \ + int __ret = 0; \ + struct ebt_entry_match *__match; \ + \ + for (__i = sizeof(struct ebt_entry); __i < (e)->watchers_offset; \ + __i += __match->match_size + sizeof(struct ebt_entry_match)) { \ + __match = (void *)(e) + __i; \ + \ + __ret = fn(__match, ##args); \ + if (__ret != 0) \ + break; \ + } \ + if (__ret == 0) { \ + if (__i != (e)->watchers_offset) \ + __ret = -EINVAL; \ + } \ + __ret; \ }) -#define EBT_WATCHER_ITERATE(e, fn, args...) \ - ({ \ - unsigned int __i; \ - int __ret = 0; \ - struct ebt_entry_watcher *__watcher; \ - \ - for (__i = e->watchers_offset; __i < (e)->target_offset; \ - __i += __watcher->watcher_size + \ - sizeof(struct ebt_entry_watcher)) { \ - __watcher = (void *)(e) + __i; \ - \ - __ret = fn(__watcher, ##args); \ - if (__ret != 0) \ - break; \ - } \ - if (__ret == 0) { \ - if (__i != (e)->target_offset) \ - __ret = -EINVAL; \ - } \ - __ret; \ +#define EBT_WATCHER_ITERATE(e, fn, args...) \ + ({ \ + unsigned int __i; \ + int __ret = 0; \ + struct ebt_entry_watcher *__watcher; \ + \ + for (__i = e->watchers_offset; __i < (e)->target_offset; \ + __i += __watcher->watcher_size + sizeof(struct ebt_entry_watcher)) { \ + __watcher = (void *)(e) + __i; \ + \ + __ret = fn(__watcher, ##args); \ + if (__ret != 0) \ + break; \ + } \ + if (__ret == 0) { \ + if (__i != (e)->target_offset) \ + __ret = -EINVAL; \ + } \ + __ret; \ }) #define EBT_ENTRY_ITERATE(entries, size, fn, args...) \ diff --git a/include/arch/x86_64/linux/netfilter_ipv4/ip_tables.h b/include/arch/x86_64/linux/netfilter_ipv4/ip_tables.h index add68dbe..f8ef6557 100644 --- a/include/arch/x86_64/linux/netfilter_ipv4/ip_tables.h +++ b/include/arch/x86_64/linux/netfilter_ipv4/ip_tables.h @@ -58,12 +58,10 @@ #define IPT_ERROR_TARGET XT_ERROR_TARGET /* fn returns 0 to continue iteration */ -#define IPT_MATCH_ITERATE(e, fn, args...) \ - XT_MATCH_ITERATE(struct ipt_entry, e, fn, ##args) +#define IPT_MATCH_ITERATE(e, fn, args...) XT_MATCH_ITERATE(struct ipt_entry, e, fn, ##args) /* fn returns 0 to continue iteration */ -#define IPT_ENTRY_ITERATE(entries, size, fn, args...) \ - XT_ENTRY_ITERATE(struct ipt_entry, entries, size, fn, ##args) +#define IPT_ENTRY_ITERATE(entries, size, fn, args...) XT_ENTRY_ITERATE(struct ipt_entry, entries, size, fn, ##args) /* Yes, Virginia, you have to zero the padding. */ struct ipt_ip { diff --git a/include/arch/x86_64/linux/netfilter_ipv6/ip6_tables.h b/include/arch/x86_64/linux/netfilter_ipv6/ip6_tables.h index fedc2e51..fafbb777 100644 --- a/include/arch/x86_64/linux/netfilter_ipv6/ip6_tables.h +++ b/include/arch/x86_64/linux/netfilter_ipv6/ip6_tables.h @@ -50,13 +50,11 @@ #define IP6T_UDP_INV_DSTPT XT_UDP_INV_DSTPT #define IP6T_UDP_INV_MASK XT_UDP_INV_MASK -#define ip6t_counters_info xt_counters_info -#define IP6T_STANDARD_TARGET XT_STANDARD_TARGET -#define IP6T_ERROR_TARGET XT_ERROR_TARGET -#define IP6T_MATCH_ITERATE(e, fn, args...) \ - XT_MATCH_ITERATE(struct ip6t_entry, e, fn, ##args) -#define IP6T_ENTRY_ITERATE(entries, size, fn, args...) \ - XT_ENTRY_ITERATE(struct ip6t_entry, entries, size, fn, ##args) +#define ip6t_counters_info xt_counters_info +#define IP6T_STANDARD_TARGET XT_STANDARD_TARGET +#define IP6T_ERROR_TARGET XT_ERROR_TARGET +#define IP6T_MATCH_ITERATE(e, fn, args...) XT_MATCH_ITERATE(struct ip6t_entry, e, fn, ##args) +#define IP6T_ENTRY_ITERATE(entries, size, fn, args...) XT_ENTRY_ITERATE(struct ip6t_entry, entries, size, fn, ##args) /* Yes, Virginia, you have to zero the padding. */ struct ip6t_ip6 { @@ -144,20 +142,18 @@ struct ip6t_error { .next_offset = (__size), \ } -#define IP6T_STANDARD_INIT(__verdict) \ - { \ - .entry = IP6T_ENTRY_INIT(sizeof(struct ip6t_standard)), \ - .target = XT_TARGET_INIT(XT_STANDARD_TARGET, \ - sizeof(struct xt_standard_target)), \ - .target.verdict = -(__verdict) - 1, \ +#define IP6T_STANDARD_INIT(__verdict) \ + { \ + .entry = IP6T_ENTRY_INIT(sizeof(struct ip6t_standard)), \ + .target = XT_TARGET_INIT(XT_STANDARD_TARGET, sizeof(struct xt_standard_target)), \ + .target.verdict = -(__verdict) - 1, \ } -#define IP6T_ERROR_INIT \ - { \ - .entry = IP6T_ENTRY_INIT(sizeof(struct ip6t_error)), \ - .target = XT_TARGET_INIT(XT_ERROR_TARGET, \ - sizeof(struct xt_error_target)), \ - .target.errorname = "ERROR", \ +#define IP6T_ERROR_INIT \ + { \ + .entry = IP6T_ENTRY_INIT(sizeof(struct ip6t_error)), \ + .target = XT_TARGET_INIT(XT_ERROR_TARGET, sizeof(struct xt_error_target)), \ + .target.errorname = "ERROR", \ } /* diff --git a/include/arch/x86_64/linux/netlink.h b/include/arch/x86_64/linux/netlink.h index a740fb7c..ea5b9308 100644 --- a/include/arch/x86_64/linux/netlink.h +++ b/include/arch/x86_64/linux/netlink.h @@ -65,9 +65,9 @@ struct nlmsghdr { #define NLM_F_MULTI 0x02 /* Multipart message, terminated by NLMSG_DONE */ #define NLM_F_ACK 0x04 /* Reply with ack, with zero or error code */ #define NLM_F_ECHO 0x08 /* Receive resulting notifications */ -#define NLM_F_DUMP_INTR \ - 0x10 /* Dump was inconsistent due to sequence change \ - */ +#define NLM_F_DUMP_INTR \ + 0x10 /* Dump was inconsistent due to sequence change \ + */ #define NLM_F_DUMP_FILTERED 0x20 /* Dump was filtered as requested */ /* Modifiers to GET request */ @@ -105,12 +105,10 @@ struct nlmsghdr { #define NLMSG_LENGTH(len) ((len) + NLMSG_HDRLEN) #define NLMSG_SPACE(len) NLMSG_ALIGN(NLMSG_LENGTH(len)) #define NLMSG_DATA(nlh) ((void *)(((char *)nlh) + NLMSG_HDRLEN)) -#define NLMSG_NEXT(nlh, len) \ - ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ - (struct nlmsghdr *)(((char *)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) -#define NLMSG_OK(nlh, len) \ - ((len) >= (int)sizeof(struct nlmsghdr) && \ - (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \ +#define NLMSG_NEXT(nlh, len) \ + ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), (struct nlmsghdr *)(((char *)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) +#define NLMSG_OK(nlh, len) \ + ((len) >= (int)sizeof(struct nlmsghdr) && (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \ (nlh)->nlmsg_len <= (len)) #define NLMSG_PAYLOAD(nlh, len) ((nlh)->nlmsg_len - NLMSG_SPACE((len))) diff --git a/include/arch/x86_64/linux/nfc.h b/include/arch/x86_64/linux/nfc.h index be7bf37b..d6306603 100644 --- a/include/arch/x86_64/linux/nfc.h +++ b/include/arch/x86_64/linux/nfc.h @@ -278,8 +278,8 @@ struct sockaddr_nfc_llcp { __u32 dev_idx; __u32 target_idx; __u32 nfc_protocol; - __u8 dsap; /* Destination SAP, if known */ - __u8 ssap; /* Source SAP to be bound to */ + __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 */ ; __kernel_size_t service_name_len; diff --git a/include/arch/x86_64/linux/nfs.h b/include/arch/x86_64/linux/nfs.h index 71eee7d2..ffad8246 100644 --- a/include/arch/x86_64/linux/nfs.h +++ b/include/arch/x86_64/linux/nfs.h @@ -119,16 +119,6 @@ enum nfs_stat { /* NFSv2 file types - beware, these are not the same in NFSv3 */ -enum nfs_ftype { - NFNON = 0, - NFREG = 1, - NFDIR = 2, - NFBLK = 3, - NFCHR = 4, - NFLNK = 5, - NFSOCK = 6, - NFBAD = 7, - NFFIFO = 8 -}; +enum nfs_ftype { NFNON = 0, NFREG = 1, NFDIR = 2, NFBLK = 3, NFCHR = 4, NFLNK = 5, NFSOCK = 6, NFBAD = 7, NFFIFO = 8 }; #endif /* _LINUX_NFS_H */ diff --git a/include/arch/x86_64/linux/nfs3.h b/include/arch/x86_64/linux/nfs3.h index 5a71a97b..f4f30313 100644 --- a/include/arch/x86_64/linux/nfs3.h +++ b/include/arch/x86_64/linux/nfs3.h @@ -35,11 +35,7 @@ #define NFS3_ACCESS_FULL 0x003f /* Flags for create mode */ -enum nfs3_createmode { - NFS3_CREATE_UNCHECKED = 0, - NFS3_CREATE_GUARDED = 1, - NFS3_CREATE_EXCLUSIVE = 2 -}; +enum nfs3_createmode { NFS3_CREATE_UNCHECKED = 0, NFS3_CREATE_GUARDED = 1, NFS3_CREATE_EXCLUSIVE = 2 }; /* NFSv3 file system properties */ #define NFS3_FSF_LINK 0x0001 diff --git a/include/arch/x86_64/linux/nfs4.h b/include/arch/x86_64/linux/nfs4.h index d65a48d8..590abccc 100644 --- a/include/arch/x86_64/linux/nfs4.h +++ b/include/arch/x86_64/linux/nfs4.h @@ -74,8 +74,7 @@ #define NFS4_SHARE_WANT_DELEG_TIMESTAMPS 0x100000 #define NFS4_SHARE_WANT_OPEN_XOR_DELEGATION 0x200000 -#define NFS4_SHARE_WANT_MASK \ - (NFS4_SHARE_WANT_TYPE_MASK | NFS4_SHARE_WANT_MOD_MASK) +#define NFS4_SHARE_WANT_MASK (NFS4_SHARE_WANT_TYPE_MASK | NFS4_SHARE_WANT_MOD_MASK) #define NFS4_CDFC4_FORE 0x1 #define NFS4_CDFC4_BACK 0x2 diff --git a/include/arch/x86_64/linux/nfs_mount.h b/include/arch/x86_64/linux/nfs_mount.h index 217043d8..e78bf1f4 100644 --- a/include/arch/x86_64/linux/nfs_mount.h +++ b/include/arch/x86_64/linux/nfs_mount.h @@ -61,9 +61,9 @@ struct nfs_mount_data { #define NFS_MOUNT_BROKEN_SUID 0x0400 /* 4 */ #define NFS_MOUNT_NOACL 0x0800 /* 4 */ #define NFS_MOUNT_STRICTLOCK 0x1000 /* reserved for NFSv4 */ -#define NFS_MOUNT_SECFLAVOUR 0x2000 /* 5 non-text parsed mount data only */ -#define NFS_MOUNT_NORDIRPLUS 0x4000 /* 5 */ -#define NFS_MOUNT_UNSHARED 0x8000 /* 5 */ +#define NFS_MOUNT_SECFLAVOUR 0x2000 /* 5 non-text parsed mount data only */ +#define NFS_MOUNT_NORDIRPLUS 0x4000 /* 5 */ +#define NFS_MOUNT_UNSHARED 0x8000 /* 5 */ #define NFS_MOUNT_FLAGMASK 0xFFFF #endif diff --git a/include/arch/x86_64/linux/nfsd/export.h b/include/arch/x86_64/linux/nfsd/export.h index 37a0ffae..4acf5b68 100644 --- a/include/arch/x86_64/linux/nfsd/export.h +++ b/include/arch/x86_64/linux/nfsd/export.h @@ -37,8 +37,7 @@ /* 0x100 currently unused */ #define NFSEXP_NOHIDE 0x0200 #define NFSEXP_NOSUBTREECHECK 0x0400 -#define NFSEXP_NOAUTHNLM \ - 0x0800 /* Don't authenticate NLM requests - just trust */ +#define NFSEXP_NOAUTHNLM 0x0800 /* Don't authenticate NLM requests - just trust */ #define NFSEXP_MSNFS \ 0x1000 /* do silly things that MS clients expect; no longer supported \ */ @@ -61,9 +60,7 @@ #define NFSEXP_ALLFLAGS 0x3FEFF /* The flags that may vary depending on security flavor: */ -#define NFSEXP_SECINFO_FLAGS \ - (NFSEXP_READONLY | NFSEXP_ROOTSQUASH | NFSEXP_ALLSQUASH | \ - NFSEXP_INSECURE_PORT) +#define NFSEXP_SECINFO_FLAGS (NFSEXP_READONLY | NFSEXP_ROOTSQUASH | NFSEXP_ALLSQUASH | NFSEXP_INSECURE_PORT) /* * Transport layer security policies that are permitted to access @@ -75,7 +72,6 @@ #define NFSEXP_XPRTSEC_NUM (3) -#define NFSEXP_XPRTSEC_ALL \ - (NFSEXP_XPRTSEC_NONE | NFSEXP_XPRTSEC_TLS | NFSEXP_XPRTSEC_MTLS) +#define NFSEXP_XPRTSEC_ALL (NFSEXP_XPRTSEC_NONE | NFSEXP_XPRTSEC_TLS | NFSEXP_XPRTSEC_MTLS) #endif /* NFSD_EXPORT_H */ diff --git a/include/arch/x86_64/linux/nilfs2_api.h b/include/arch/x86_64/linux/nilfs2_api.h index c4acae71..b31bf1f4 100644 --- a/include/arch/x86_64/linux/nilfs2_api.h +++ b/include/arch/x86_64/linux/nilfs2_api.h @@ -46,11 +46,10 @@ enum { NILFS_CPINFO_MINOR, }; -#define NILFS_CPINFO_FNS(flag, name) \ - static __inline__ int nilfs_cpinfo_##name( \ - const struct nilfs_cpinfo *cpinfo) \ - { \ - return !!(cpinfo->ci_flags & (1UL << NILFS_CPINFO_##flag)); \ +#define NILFS_CPINFO_FNS(flag, name) \ + static __inline__ int nilfs_cpinfo_##name(const struct nilfs_cpinfo *cpinfo) \ + { \ + return !!(cpinfo->ci_flags & (1UL << NILFS_CPINFO_##flag)); \ } NILFS_CPINFO_FNS(SNAPSHOT, snapshot) @@ -76,11 +75,10 @@ enum { NILFS_SUINFO_ERROR, }; -#define NILFS_SUINFO_FNS(flag, name) \ - static __inline__ int nilfs_suinfo_##name( \ - const struct nilfs_suinfo *si) \ - { \ - return si->sui_flags & (1UL << NILFS_SUINFO_##flag); \ +#define NILFS_SUINFO_FNS(flag, name) \ + static __inline__ int nilfs_suinfo_##name(const struct nilfs_suinfo *si) \ + { \ + return si->sui_flags & (1UL << NILFS_SUINFO_##flag); \ } NILFS_SUINFO_FNS(ACTIVE, active) @@ -113,22 +111,18 @@ enum { __NR_NILFS_SUINFO_UPDATE_FIELDS, }; -#define NILFS_SUINFO_UPDATE_FNS(flag, name) \ - static __inline__ void nilfs_suinfo_update_set_##name( \ - struct nilfs_suinfo_update *sup) \ - { \ - sup->sup_flags |= 1UL << NILFS_SUINFO_UPDATE_##flag; \ - } \ - static __inline__ void nilfs_suinfo_update_clear_##name( \ - struct nilfs_suinfo_update *sup) \ - { \ - sup->sup_flags &= ~(1UL << NILFS_SUINFO_UPDATE_##flag); \ - } \ - static __inline__ int nilfs_suinfo_update_##name( \ - const struct nilfs_suinfo_update *sup) \ - { \ - return !!(sup->sup_flags & \ - (1UL << NILFS_SUINFO_UPDATE_##flag)); \ +#define NILFS_SUINFO_UPDATE_FNS(flag, name) \ + static __inline__ void nilfs_suinfo_update_set_##name(struct nilfs_suinfo_update *sup) \ + { \ + sup->sup_flags |= 1UL << NILFS_SUINFO_UPDATE_##flag; \ + } \ + static __inline__ void nilfs_suinfo_update_clear_##name(struct nilfs_suinfo_update *sup) \ + { \ + sup->sup_flags &= ~(1UL << NILFS_SUINFO_UPDATE_##flag); \ + } \ + static __inline__ int nilfs_suinfo_update_##name(const struct nilfs_suinfo_update *sup) \ + { \ + return !!(sup->sup_flags & (1UL << NILFS_SUINFO_UPDATE_##flag)); \ } NILFS_SUINFO_UPDATE_FNS(LASTMOD, lastmod) @@ -264,22 +258,18 @@ struct nilfs_bdesc { #define NILFS_IOCTL_IDENT 'n' -#define NILFS_IOCTL_CHANGE_CPMODE \ - _IOW(NILFS_IOCTL_IDENT, 0x80, struct nilfs_cpmode) +#define NILFS_IOCTL_CHANGE_CPMODE _IOW(NILFS_IOCTL_IDENT, 0x80, struct nilfs_cpmode) #define NILFS_IOCTL_DELETE_CHECKPOINT _IOW(NILFS_IOCTL_IDENT, 0x81, __u64) #define NILFS_IOCTL_GET_CPINFO _IOR(NILFS_IOCTL_IDENT, 0x82, struct nilfs_argv) -#define NILFS_IOCTL_GET_CPSTAT \ - _IOR(NILFS_IOCTL_IDENT, 0x83, struct nilfs_cpstat) -#define NILFS_IOCTL_GET_SUINFO _IOR(NILFS_IOCTL_IDENT, 0x84, struct nilfs_argv) -#define NILFS_IOCTL_GET_SUSTAT \ - _IOR(NILFS_IOCTL_IDENT, 0x85, struct nilfs_sustat) -#define NILFS_IOCTL_GET_VINFO _IOWR(NILFS_IOCTL_IDENT, 0x86, struct nilfs_argv) -#define NILFS_IOCTL_GET_BDESCS _IOWR(NILFS_IOCTL_IDENT, 0x87, struct nilfs_argv) -#define NILFS_IOCTL_CLEAN_SEGMENTS \ - _IOW(NILFS_IOCTL_IDENT, 0x88, struct nilfs_argv[5]) -#define NILFS_IOCTL_SYNC _IOR(NILFS_IOCTL_IDENT, 0x8A, __u64) -#define NILFS_IOCTL_RESIZE _IOW(NILFS_IOCTL_IDENT, 0x8B, __u64) -#define NILFS_IOCTL_SET_ALLOC_RANGE _IOW(NILFS_IOCTL_IDENT, 0x8C, __u64[2]) -#define NILFS_IOCTL_SET_SUINFO _IOW(NILFS_IOCTL_IDENT, 0x8D, struct nilfs_argv) +#define NILFS_IOCTL_GET_CPSTAT _IOR(NILFS_IOCTL_IDENT, 0x83, struct nilfs_cpstat) +#define NILFS_IOCTL_GET_SUINFO _IOR(NILFS_IOCTL_IDENT, 0x84, struct nilfs_argv) +#define NILFS_IOCTL_GET_SUSTAT _IOR(NILFS_IOCTL_IDENT, 0x85, struct nilfs_sustat) +#define NILFS_IOCTL_GET_VINFO _IOWR(NILFS_IOCTL_IDENT, 0x86, struct nilfs_argv) +#define NILFS_IOCTL_GET_BDESCS _IOWR(NILFS_IOCTL_IDENT, 0x87, struct nilfs_argv) +#define NILFS_IOCTL_CLEAN_SEGMENTS _IOW(NILFS_IOCTL_IDENT, 0x88, struct nilfs_argv[5]) +#define NILFS_IOCTL_SYNC _IOR(NILFS_IOCTL_IDENT, 0x8A, __u64) +#define NILFS_IOCTL_RESIZE _IOW(NILFS_IOCTL_IDENT, 0x8B, __u64) +#define NILFS_IOCTL_SET_ALLOC_RANGE _IOW(NILFS_IOCTL_IDENT, 0x8C, __u64[2]) +#define NILFS_IOCTL_SET_SUINFO _IOW(NILFS_IOCTL_IDENT, 0x8D, struct nilfs_argv) #endif /* _LINUX_NILFS2_API_H */ diff --git a/include/arch/x86_64/linux/nilfs2_ondisk.h b/include/arch/x86_64/linux/nilfs2_ondisk.h index c12fa160..2580e6ad 100644 --- a/include/arch/x86_64/linux/nilfs2_ondisk.h +++ b/include/arch/x86_64/linux/nilfs2_ondisk.h @@ -92,9 +92,7 @@ struct nilfs_super_root { struct nilfs_inode sr_sufile; }; -#define NILFS_SR_MDT_OFFSET(inode_size, i) \ - ((unsigned long)&((struct nilfs_super_root *)0)->sr_dat + \ - (inode_size) * (i)) +#define NILFS_SR_MDT_OFFSET(inode_size, i) ((unsigned long)&((struct nilfs_super_root *)0)->sr_dat + (inode_size) * (i)) #define NILFS_SR_DAT_OFFSET(inode_size) NILFS_SR_MDT_OFFSET(inode_size, 0) #define NILFS_SR_CPFILE_OFFSET(inode_size) NILFS_SR_MDT_OFFSET(inode_size, 1) #define NILFS_SR_SUFILE_OFFSET(inode_size) NILFS_SR_MDT_OFFSET(inode_size, 2) @@ -149,21 +147,21 @@ struct nilfs_super_block { __le32 s_crc_seed; /* Seed value of CRC calculation */ /*10*/ __le32 s_sum; /* Check sum of super block */ - __le32 s_log_block_size; /* - * Block size represented as follows - * blocksize = - * 1 << (s_log_block_size + 10) - */ - __le64 s_nsegments; /* Number of segments in filesystem */ - /*20*/ __le64 s_dev_size; /* block device size in bytes */ - __le64 s_first_data_block; /* 1st seg disk block number */ + __le32 s_log_block_size; /* + * Block size represented as follows + * blocksize = + * 1 << (s_log_block_size + 10) + */ + __le64 s_nsegments; /* Number of segments in filesystem */ + /*20*/ __le64 s_dev_size; /* block device size in bytes */ + __le64 s_first_data_block; /* 1st seg disk block number */ /*30*/ __le32 s_blocks_per_segment; /* number of blocks per full segment */ __le32 s_r_segments_percentage; /* Reserved segments percentage */ - __le64 s_last_cno; /* Last checkpoint number */ - /*40*/ __le64 s_last_pseg; /* disk block addr pseg written last */ - __le64 s_last_seq; /* seq. number of seg written last */ + __le64 s_last_cno; /* Last checkpoint number */ + /*40*/ __le64 s_last_pseg; /* disk block addr pseg written last */ + __le64 s_last_seq; /* seq. number of seg written last */ /*50*/ __le64 s_free_blocks_count; /* Free blocks count */ __le64 s_ctime; /* @@ -270,8 +268,7 @@ struct nilfs_super_block { * these files are written in super root block instead of ifile, and * garbage collector doesn't keep any past versions of these files. */ -#define NILFS_ROOT_METADATA_FILE(ino) \ - ((ino) >= NILFS_DAT_INO && (ino) <= NILFS_SUFILE_INO) +#define NILFS_ROOT_METADATA_FILE(ino) ((ino) >= NILFS_DAT_INO && (ino) <= NILFS_SUFILE_INO) /* * bytes offset of secondary super block @@ -332,11 +329,10 @@ enum { * * NOTE: It must be a multiple of 8 */ -#define NILFS_DIR_PAD 8 -#define NILFS_DIR_ROUND (NILFS_DIR_PAD - 1) -#define NILFS_DIR_REC_LEN(name_len) \ - (((name_len) + 12 + NILFS_DIR_ROUND) & ~NILFS_DIR_ROUND) -#define NILFS_MAX_REC_LEN ((1 << 16) - 1) +#define NILFS_DIR_PAD 8 +#define NILFS_DIR_ROUND (NILFS_DIR_PAD - 1) +#define NILFS_DIR_REC_LEN(name_len) (((name_len) + 12 + NILFS_DIR_ROUND) & ~NILFS_DIR_ROUND) +#define NILFS_MAX_REC_LEN ((1 << 16) - 1) /** * struct nilfs_finfo - file information @@ -534,26 +530,18 @@ enum { NILFS_CHECKPOINT_MINOR, }; -#define NILFS_CHECKPOINT_FNS(flag, name) \ - static __inline__ void nilfs_checkpoint_set_##name( \ - struct nilfs_checkpoint *cp) \ - { \ - cp->cp_flags = \ - __cpu_to_le32(__le32_to_cpu(cp->cp_flags) | \ - (1UL << NILFS_CHECKPOINT_##flag)); \ - } \ - static __inline__ void nilfs_checkpoint_clear_##name( \ - struct nilfs_checkpoint *cp) \ - { \ - cp->cp_flags = \ - __cpu_to_le32(__le32_to_cpu(cp->cp_flags) & \ - ~(1UL << NILFS_CHECKPOINT_##flag)); \ - } \ - static __inline__ int nilfs_checkpoint_##name( \ - const struct nilfs_checkpoint *cp) \ - { \ - return !!(__le32_to_cpu(cp->cp_flags) & \ - (1UL << NILFS_CHECKPOINT_##flag)); \ +#define NILFS_CHECKPOINT_FNS(flag, name) \ + static __inline__ void nilfs_checkpoint_set_##name(struct nilfs_checkpoint *cp) \ + { \ + cp->cp_flags = __cpu_to_le32(__le32_to_cpu(cp->cp_flags) | (1UL << NILFS_CHECKPOINT_##flag)); \ + } \ + static __inline__ void nilfs_checkpoint_clear_##name(struct nilfs_checkpoint *cp) \ + { \ + cp->cp_flags = __cpu_to_le32(__le32_to_cpu(cp->cp_flags) & ~(1UL << NILFS_CHECKPOINT_##flag)); \ + } \ + static __inline__ int nilfs_checkpoint_##name(const struct nilfs_checkpoint *cp) \ + { \ + return !!(__le32_to_cpu(cp->cp_flags) & (1UL << NILFS_CHECKPOINT_##flag)); \ } NILFS_CHECKPOINT_FNS(SNAPSHOT, snapshot) @@ -572,10 +560,8 @@ struct nilfs_cpfile_header { struct nilfs_snapshot_list ch_snapshot_list; }; -#define NILFS_CPFILE_FIRST_CHECKPOINT_OFFSET \ - ((sizeof(struct nilfs_cpfile_header) + \ - sizeof(struct nilfs_checkpoint) - 1) / \ - sizeof(struct nilfs_checkpoint)) +#define NILFS_CPFILE_FIRST_CHECKPOINT_OFFSET \ + ((sizeof(struct nilfs_cpfile_header) + sizeof(struct nilfs_checkpoint) - 1) / sizeof(struct nilfs_checkpoint)) /** * struct nilfs_segment_usage - segment usage @@ -598,42 +584,32 @@ enum { NILFS_SEGMENT_USAGE_ERROR, }; -#define NILFS_SEGMENT_USAGE_FNS(flag, name) \ - static __inline__ void nilfs_segment_usage_set_##name( \ - struct nilfs_segment_usage *su) \ - { \ - su->su_flags = \ - __cpu_to_le32(__le32_to_cpu(su->su_flags) | \ - (1UL << NILFS_SEGMENT_USAGE_##flag)); \ - } \ - static __inline__ void nilfs_segment_usage_clear_##name( \ - struct nilfs_segment_usage *su) \ - { \ - su->su_flags = \ - __cpu_to_le32(__le32_to_cpu(su->su_flags) & \ - ~(1UL << NILFS_SEGMENT_USAGE_##flag)); \ - } \ - static __inline__ int nilfs_segment_usage_##name( \ - const struct nilfs_segment_usage *su) \ - { \ - return !!(__le32_to_cpu(su->su_flags) & \ - (1UL << NILFS_SEGMENT_USAGE_##flag)); \ +#define NILFS_SEGMENT_USAGE_FNS(flag, name) \ + static __inline__ void nilfs_segment_usage_set_##name(struct nilfs_segment_usage *su) \ + { \ + su->su_flags = __cpu_to_le32(__le32_to_cpu(su->su_flags) | (1UL << NILFS_SEGMENT_USAGE_##flag)); \ + } \ + static __inline__ void nilfs_segment_usage_clear_##name(struct nilfs_segment_usage *su) \ + { \ + su->su_flags = __cpu_to_le32(__le32_to_cpu(su->su_flags) & ~(1UL << NILFS_SEGMENT_USAGE_##flag)); \ + } \ + static __inline__ int nilfs_segment_usage_##name(const struct nilfs_segment_usage *su) \ + { \ + return !!(__le32_to_cpu(su->su_flags) & (1UL << NILFS_SEGMENT_USAGE_##flag)); \ } NILFS_SEGMENT_USAGE_FNS(ACTIVE, active) NILFS_SEGMENT_USAGE_FNS(DIRTY, dirty) NILFS_SEGMENT_USAGE_FNS(ERROR, error) -static __inline__ void -nilfs_segment_usage_set_clean(struct nilfs_segment_usage *su) +static __inline__ void nilfs_segment_usage_set_clean(struct nilfs_segment_usage *su) { su->su_lastmod = __cpu_to_le64(0); su->su_nblocks = __cpu_to_le32(0); su->su_flags = __cpu_to_le32(0); } -static __inline__ int -nilfs_segment_usage_clean(const struct nilfs_segment_usage *su) +static __inline__ int nilfs_segment_usage_clean(const struct nilfs_segment_usage *su) { return !__le32_to_cpu(su->su_flags); } @@ -651,9 +627,8 @@ struct nilfs_sufile_header { /* ... */ }; -#define NILFS_SUFILE_FIRST_SEGMENT_USAGE_OFFSET \ - ((sizeof(struct nilfs_sufile_header) + \ - sizeof(struct nilfs_segment_usage) - 1) / \ +#define NILFS_SUFILE_FIRST_SEGMENT_USAGE_OFFSET \ + ((sizeof(struct nilfs_sufile_header) + sizeof(struct nilfs_segment_usage) - 1) / \ sizeof(struct nilfs_segment_usage)) #endif /* _LINUX_NILFS2_ONDISK_H */ diff --git a/include/arch/x86_64/linux/nl80211.h b/include/arch/x86_64/linux/nl80211.h index 10c47f1e..f3358332 100644 --- a/include/arch/x86_64/linux/nl80211.h +++ b/include/arch/x86_64/linux/nl80211.h @@ -4424,16 +4424,13 @@ enum nl80211_frequency_attr { NL80211_FREQUENCY_ATTR_MAX = __NL80211_FREQUENCY_ATTR_AFTER_LAST - 1 }; -#define NL80211_FREQUENCY_ATTR_MAX_TX_POWER NL80211_FREQUENCY_ATTR_MAX_TX_POWER -#define NL80211_FREQUENCY_ATTR_PASSIVE_SCAN NL80211_FREQUENCY_ATTR_NO_IR -#define NL80211_FREQUENCY_ATTR_NO_IBSS NL80211_FREQUENCY_ATTR_NO_IR -#define NL80211_FREQUENCY_ATTR_NO_IR NL80211_FREQUENCY_ATTR_NO_IR -#define NL80211_FREQUENCY_ATTR_GO_CONCURRENT \ - NL80211_FREQUENCY_ATTR_IR_CONCURRENT -#define NL80211_FREQUENCY_ATTR_NO_UHB_VLP_CLIENT \ - NL80211_FREQUENCY_ATTR_NO_6GHZ_VLP_CLIENT -#define NL80211_FREQUENCY_ATTR_NO_UHB_AFC_CLIENT \ - NL80211_FREQUENCY_ATTR_NO_6GHZ_AFC_CLIENT +#define NL80211_FREQUENCY_ATTR_MAX_TX_POWER NL80211_FREQUENCY_ATTR_MAX_TX_POWER +#define NL80211_FREQUENCY_ATTR_PASSIVE_SCAN NL80211_FREQUENCY_ATTR_NO_IR +#define NL80211_FREQUENCY_ATTR_NO_IBSS NL80211_FREQUENCY_ATTR_NO_IR +#define NL80211_FREQUENCY_ATTR_NO_IR NL80211_FREQUENCY_ATTR_NO_IR +#define NL80211_FREQUENCY_ATTR_GO_CONCURRENT NL80211_FREQUENCY_ATTR_IR_CONCURRENT +#define NL80211_FREQUENCY_ATTR_NO_UHB_VLP_CLIENT NL80211_FREQUENCY_ATTR_NO_6GHZ_VLP_CLIENT +#define NL80211_FREQUENCY_ATTR_NO_UHB_AFC_CLIENT NL80211_FREQUENCY_ATTR_NO_6GHZ_AFC_CLIENT /** * enum nl80211_bitrate_attr - bitrate attributes @@ -4588,8 +4585,7 @@ enum nl80211_sched_scan_match_attr { /* keep last */ __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST, - NL80211_SCHED_SCAN_MATCH_ATTR_MAX = - __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST - 1 + NL80211_SCHED_SCAN_MATCH_ATTR_MAX = __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST - 1 }; /* only for backward compatibility */ @@ -4759,12 +4755,11 @@ enum nl80211_survey_info { }; /* keep old names for compatibility */ -#define NL80211_SURVEY_INFO_CHANNEL_TIME NL80211_SURVEY_INFO_TIME -#define NL80211_SURVEY_INFO_CHANNEL_TIME_BUSY NL80211_SURVEY_INFO_TIME_BUSY -#define NL80211_SURVEY_INFO_CHANNEL_TIME_EXT_BUSY \ - NL80211_SURVEY_INFO_TIME_EXT_BUSY -#define NL80211_SURVEY_INFO_CHANNEL_TIME_RX NL80211_SURVEY_INFO_TIME_RX -#define NL80211_SURVEY_INFO_CHANNEL_TIME_TX NL80211_SURVEY_INFO_TIME_TX +#define NL80211_SURVEY_INFO_CHANNEL_TIME NL80211_SURVEY_INFO_TIME +#define NL80211_SURVEY_INFO_CHANNEL_TIME_BUSY NL80211_SURVEY_INFO_TIME_BUSY +#define NL80211_SURVEY_INFO_CHANNEL_TIME_EXT_BUSY NL80211_SURVEY_INFO_TIME_EXT_BUSY +#define NL80211_SURVEY_INFO_CHANNEL_TIME_RX NL80211_SURVEY_INFO_TIME_RX +#define NL80211_SURVEY_INFO_CHANNEL_TIME_TX NL80211_SURVEY_INFO_TIME_TX /** * enum nl80211_mntr_flags - monitor configuration flags @@ -5083,13 +5078,7 @@ enum nl80211_txq_attr { NL80211_TXQ_ATTR_MAX = __NL80211_TXQ_ATTR_AFTER_LAST - 1 }; -enum nl80211_ac { - NL80211_AC_VO, - NL80211_AC_VI, - NL80211_AC_BE, - NL80211_AC_BK, - NL80211_NUM_ACS -}; +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 @@ -5107,12 +5096,7 @@ enum nl80211_ac { * @NL80211_CHAN_HT40PLUS: HT40 channel, secondary channel * above the control channel */ -enum nl80211_channel_type { - NL80211_CHAN_NO_HT, - NL80211_CHAN_HT20, - NL80211_CHAN_HT40MINUS, - NL80211_CHAN_HT40PLUS -}; +enum nl80211_channel_type { NL80211_CHAN_NO_HT, NL80211_CHAN_HT20, NL80211_CHAN_HT40MINUS, NL80211_CHAN_HT40PLUS }; /** * enum nl80211_key_mode - Key mode @@ -5129,11 +5113,7 @@ enum nl80211_channel_type { * The unicast key identified by idx and mac is cleared for Tx and becomes * the preferred Tx key for the station. */ -enum nl80211_key_mode { - NL80211_KEY_RX_TX, - NL80211_KEY_NO_TX, - NL80211_KEY_SET_TX -}; +enum nl80211_key_mode { NL80211_KEY_RX_TX, NL80211_KEY_NO_TX, NL80211_KEY_SET_TX }; /** * enum nl80211_chan_width - channel width definitions @@ -5224,8 +5204,7 @@ enum nl80211_bss_cannot_use_reasons { NL80211_BSS_CANNOT_USE_6GHZ_PWR_MISMATCH = 1 << 1, }; -#define NL80211_BSS_CANNOT_USE_UHB_PWR_MISMATCH \ - NL80211_BSS_CANNOT_USE_6GHZ_PWR_MISMATCH +#define NL80211_BSS_CANNOT_USE_UHB_PWR_MISMATCH NL80211_BSS_CANNOT_USE_6GHZ_PWR_MISMATCH /** * enum nl80211_bss - netlink attributes for a BSS @@ -6054,10 +6033,7 @@ enum nl80211_attr_coalesce_rule { * @NL80211_COALESCE_CONDITION_NO_MATCH: coalesce Rx packets when patterns * in a rule are not matched. */ -enum nl80211_coalesce_condition { - NL80211_COALESCE_CONDITION_MATCH, - NL80211_COALESCE_CONDITION_NO_MATCH -}; +enum nl80211_coalesce_condition { NL80211_COALESCE_CONDITION_MATCH, NL80211_COALESCE_CONDITION_NO_MATCH }; /** * enum nl80211_iface_limit_attrs - limit attributes @@ -6681,8 +6657,7 @@ enum nl80211_ext_feature_index { NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211, NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT, /* we renamed this - stay compatible */ - NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT = - NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT, + NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT = NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT, NL80211_EXT_FEATURE_TXQS, NL80211_EXT_FEATURE_SCAN_RANDOM_SN, NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT, @@ -7912,8 +7887,7 @@ enum nl80211_unsol_bcast_probe_resp_attributes { /* keep last */ __NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_LAST, - NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_MAX = - __NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_LAST - 1 + NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_MAX = __NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_LAST - 1 }; /** @@ -8161,8 +8135,7 @@ enum nl80211_wiphy_radio_freq_range { NL80211_WIPHY_RADIO_FREQ_ATTR_END, __NL80211_WIPHY_RADIO_FREQ_ATTR_LAST, - NL80211_WIPHY_RADIO_FREQ_ATTR_MAX = - __NL80211_WIPHY_RADIO_FREQ_ATTR_LAST - 1, + NL80211_WIPHY_RADIO_FREQ_ATTR_MAX = __NL80211_WIPHY_RADIO_FREQ_ATTR_LAST - 1, }; /** @@ -8184,8 +8157,7 @@ enum nl80211_s1g_short_beacon_attrs { /* keep last */ __NL80211_S1G_SHORT_BEACON_ATTR_LAST, - NL80211_S1G_SHORT_BEACON_ATTR_MAX = - __NL80211_S1G_SHORT_BEACON_ATTR_LAST - 1 + NL80211_S1G_SHORT_BEACON_ATTR_MAX = __NL80211_S1G_SHORT_BEACON_ATTR_LAST - 1 }; #endif /* __LINUX_NL80211_H */ diff --git a/include/arch/x86_64/linux/nubus.h b/include/arch/x86_64/linux/nubus.h index a6df8ef9..13f30e45 100644 --- a/include/arch/x86_64/linux/nubus.h +++ b/include/arch/x86_64/linux/nubus.h @@ -26,18 +26,11 @@ enum nubus_category { NUBUS_CAT_DUODOCK = 0x0020 }; -enum nubus_type_network { - NUBUS_TYPE_ETHERNET = 0x0001, - NUBUS_TYPE_RS232 = 0x0002 -}; +enum nubus_type_network { NUBUS_TYPE_ETHERNET = 0x0001, NUBUS_TYPE_RS232 = 0x0002 }; enum nubus_type_display { NUBUS_TYPE_VIDEO = 0x0001 }; -enum nubus_type_cpu { - NUBUS_TYPE_68020 = 0x0003, - NUBUS_TYPE_68030 = 0x0004, - NUBUS_TYPE_68040 = 0x0005 -}; +enum nubus_type_cpu { NUBUS_TYPE_68020 = 0x0003, NUBUS_TYPE_68030 = 0x0004, NUBUS_TYPE_68040 = 0x0005 }; /* Known tuples: (according to TattleTech and Slots) * 68030 motherboards: <10,4,0,24> @@ -200,10 +193,7 @@ enum nubus_vendor_res_id { enum nubus_net_res_id { NUBUS_RESID_MAC_ADDRESS = 0x0080 }; -enum nubus_cpu_res_id { - NUBUS_RESID_MEMINFO = 0x0081, - NUBUS_RESID_ROMINFO = 0x0082 -}; +enum nubus_cpu_res_id { NUBUS_RESID_MEMINFO = 0x0081, NUBUS_RESID_ROMINFO = 0x0082 }; enum nubus_display_res_id { NUBUS_RESID_GAMMADIR = 0x0040, diff --git a/include/arch/x86_64/linux/omap3isp.h b/include/arch/x86_64/linux/omap3isp.h index 6791a208..82f54be0 100644 --- a/include/arch/x86_64/linux/omap3isp.h +++ b/include/arch/x86_64/linux/omap3isp.h @@ -43,22 +43,14 @@ * VIDIOC_OMAP3ISP_STAT_EN: Enable/disable a statistics module */ -#define VIDIOC_OMAP3ISP_CCDC_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct omap3isp_ccdc_update_config) -#define VIDIOC_OMAP3ISP_PRV_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 2, struct omap3isp_prev_update_config) -#define VIDIOC_OMAP3ISP_AEWB_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 3, struct omap3isp_h3a_aewb_config) -#define VIDIOC_OMAP3ISP_HIST_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 4, struct omap3isp_hist_config) -#define VIDIOC_OMAP3ISP_AF_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 5, struct omap3isp_h3a_af_config) -#define VIDIOC_OMAP3ISP_STAT_REQ \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 6, struct omap3isp_stat_data) -#define VIDIOC_OMAP3ISP_STAT_REQ_TIME32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 6, struct omap3isp_stat_data_time32) -#define VIDIOC_OMAP3ISP_STAT_EN \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 7, unsigned long) +#define VIDIOC_OMAP3ISP_CCDC_CFG _IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct omap3isp_ccdc_update_config) +#define VIDIOC_OMAP3ISP_PRV_CFG _IOWR('V', BASE_VIDIOC_PRIVATE + 2, struct omap3isp_prev_update_config) +#define VIDIOC_OMAP3ISP_AEWB_CFG _IOWR('V', BASE_VIDIOC_PRIVATE + 3, struct omap3isp_h3a_aewb_config) +#define VIDIOC_OMAP3ISP_HIST_CFG _IOWR('V', BASE_VIDIOC_PRIVATE + 4, struct omap3isp_hist_config) +#define VIDIOC_OMAP3ISP_AF_CFG _IOWR('V', BASE_VIDIOC_PRIVATE + 5, struct omap3isp_h3a_af_config) +#define VIDIOC_OMAP3ISP_STAT_REQ _IOWR('V', BASE_VIDIOC_PRIVATE + 6, struct omap3isp_stat_data) +#define VIDIOC_OMAP3ISP_STAT_REQ_TIME32 _IOWR('V', BASE_VIDIOC_PRIVATE + 6, struct omap3isp_stat_data_time32) +#define VIDIOC_OMAP3ISP_STAT_EN _IOWR('V', BASE_VIDIOC_PRIVATE + 7, unsigned long) /* * Events @@ -170,8 +162,7 @@ struct omap3isp_h3a_aewb_config { struct omap3isp_stat_data { struct timeval ts; void *buf; - __struct_group(/* no tag */, frame, /* no attrs */, __u32 buf_size; - __u16 frame_number; __u16 cur_frame; + __struct_group(/* no tag */, frame, /* no attrs */, __u32 buf_size; __u16 frame_number; __u16 cur_frame; __u16 config_counter;); }; @@ -220,10 +211,10 @@ struct omap3isp_hist_config { __u32 buf_size; __u16 config_counter; - __u8 num_acc_frames; /* Num of image frames to be processed and - accumulated for each histogram frame */ - __u16 hist_bins; /* number of bins: 32, 64, 128, or 256 */ - __u8 cfa; /* BAYER or FOVEON X3 */ + __u8 num_acc_frames; /* Num of image frames to be processed and + accumulated for each histogram frame */ + __u16 hist_bins; /* number of bins: 32, 64, 128, or 256 */ + __u8 cfa; /* BAYER or FOVEON X3 */ __u8 wg[OMAP3ISP_HIST_MAX_WG]; /* White Balance Gain */ __u8 num_regions; /* number of regions to be configured */ struct omap3isp_hist_region region[OMAP3ISP_HIST_MAX_REGIONS]; @@ -233,10 +224,7 @@ struct omap3isp_hist_config { #define OMAP3ISP_AF_NUM_COEF 11 -enum omap3isp_h3a_af_fvmode { - OMAP3ISP_AF_MODE_SUMMED = 0, - OMAP3ISP_AF_MODE_PEAK = 1 -}; +enum omap3isp_h3a_af_fvmode { OMAP3ISP_AF_MODE_SUMMED = 0, OMAP3ISP_AF_MODE_PEAK = 1 }; /* Red, Green, and blue pixel location in the AF windows */ enum omap3isp_h3a_af_rgbpos { diff --git a/include/arch/x86_64/linux/omapfb.h b/include/arch/x86_64/linux/omapfb.h index 41a27f74..74e87089 100644 --- a/include/arch/x86_64/linux/omapfb.h +++ b/include/arch/x86_64/linux/omapfb.h @@ -171,11 +171,7 @@ struct omapfb_color_key { __u8 key_type; }; -enum omapfb_update_mode { - OMAPFB_UPDATE_DISABLED = 0, - OMAPFB_AUTO_UPDATE, - OMAPFB_MANUAL_UPDATE -}; +enum omapfb_update_mode { OMAPFB_UPDATE_DISABLED = 0, OMAPFB_AUTO_UPDATE, OMAPFB_MANUAL_UPDATE }; struct omapfb_memory_read { __u16 x; diff --git a/include/arch/x86_64/linux/openvswitch.h b/include/arch/x86_64/linux/openvswitch.h index e087f385..469b7629 100644 --- a/include/arch/x86_64/linux/openvswitch.h +++ b/include/arch/x86_64/linux/openvswitch.h @@ -51,13 +51,7 @@ struct ovs_header { /* First OVS datapath version to support features */ #define OVS_DP_VER_FEATURES 2 -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_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. @@ -198,10 +192,10 @@ enum ovs_packet_cmd { */ 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_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_EGRESS_TUN_KEY, /* Nested OVS_TUNNEL_KEY_ATTR_* attributes. */ OVS_PACKET_ATTR_UNUSED1, @@ -223,13 +217,7 @@ enum ovs_packet_attr { #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_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, @@ -295,11 +283,7 @@ enum ovs_vport_attr { * @OVS_VPORT_UPCALL_SUCCESS: 64-bit upcall success packets. * @OVS_VPORT_UPCALL_FAIL: 64-bit upcall fail packets. */ -enum ovs_vport_upcall_attr { - OVS_VPORT_UPCALL_ATTR_SUCCESS, - OVS_VPORT_UPCALL_ATTR_FAIL, - __OVS_VPORT_UPCALL_ATTR_MAX -}; +enum ovs_vport_upcall_attr { OVS_VPORT_UPCALL_ATTR_SUCCESS, OVS_VPORT_UPCALL_ATTR_FAIL, __OVS_VPORT_UPCALL_ATTR_MAX }; #define OVS_VPORT_UPCALL_ATTR_MAX (__OVS_VPORT_UPCALL_ATTR_MAX - 1) @@ -328,13 +312,7 @@ enum { #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 -}; +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. */ @@ -343,34 +321,34 @@ struct ovs_flow_stats { 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_TUNNEL, /* Nested set of ovs_tunnel attributes */ - OVS_KEY_ATTR_SCTP, /* struct ovs_key_sctp */ - OVS_KEY_ATTR_TCP_FLAGS, /* be16 TCP flags. */ - OVS_KEY_ATTR_DP_HASH, /* u32 hash value. Value 0 indicates the hash - is not computed by the datapath. */ - OVS_KEY_ATTR_RECIRC_ID, /* u32 recirc id */ - OVS_KEY_ATTR_MPLS, /* array of struct ovs_key_mpls. - * The implementation may restrict - * the accepted length of the array. */ - OVS_KEY_ATTR_CT_STATE, /* u32 bitmask of OVS_CS_F_* */ - OVS_KEY_ATTR_CT_ZONE, /* u16 connection tracking zone. */ - OVS_KEY_ATTR_CT_MARK, /* u32 connection tracking mark */ - OVS_KEY_ATTR_CT_LABELS, /* 16-octet connection tracking label */ + 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_TUNNEL, /* Nested set of ovs_tunnel attributes */ + OVS_KEY_ATTR_SCTP, /* struct ovs_key_sctp */ + OVS_KEY_ATTR_TCP_FLAGS, /* be16 TCP flags. */ + OVS_KEY_ATTR_DP_HASH, /* u32 hash value. Value 0 indicates the hash + is not computed by the datapath. */ + OVS_KEY_ATTR_RECIRC_ID, /* u32 recirc id */ + OVS_KEY_ATTR_MPLS, /* array of struct ovs_key_mpls. + * The implementation may restrict + * the accepted length of the array. */ + OVS_KEY_ATTR_CT_STATE, /* u32 bitmask of OVS_CS_F_* */ + OVS_KEY_ATTR_CT_ZONE, /* u16 connection tracking zone. */ + OVS_KEY_ATTR_CT_MARK, /* u32 connection tracking mark */ + OVS_KEY_ATTR_CT_LABELS, /* 16-octet connection tracking label */ OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV4, /* struct ovs_key_ct_tuple_ipv4 */ OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV6, /* struct ovs_key_ct_tuple_ipv6 */ OVS_KEY_ATTR_NSH, /* Nested set of ovs_nsh_key_* */ @@ -408,8 +386,8 @@ enum ovs_tunnel_key_attr { OVS_TUNNEL_KEY_ATTR_TP_SRC, /* be16 src Transport Port. */ OVS_TUNNEL_KEY_ATTR_TP_DST, /* be16 dst Transport Port. */ OVS_TUNNEL_KEY_ATTR_VXLAN_OPTS, /* Nested OVS_VXLAN_EXT_* */ - OVS_TUNNEL_KEY_ATTR_IPV6_SRC, /* struct in6_addr src IPv6 address. */ - OVS_TUNNEL_KEY_ATTR_IPV6_DST, /* struct in6_addr dst IPv6 address. */ + OVS_TUNNEL_KEY_ATTR_IPV6_SRC, /* struct in6_addr src IPv6 address. */ + OVS_TUNNEL_KEY_ATTR_IPV6_DST, /* struct in6_addr dst IPv6 address. */ OVS_TUNNEL_KEY_ATTR_PAD, OVS_TUNNEL_KEY_ATTR_ERSPAN_OPTS, /* struct erspan_metadata */ OVS_TUNNEL_KEY_ATTR_IPV4_INFO_BRIDGE, /* No argument. IPV4_INFO_BRIDGE @@ -428,12 +406,7 @@ enum ovs_tunnel_key_attr { * 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 -}; +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) @@ -684,8 +657,8 @@ enum ovs_sample_attr { */ 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_PID, /* u32 Netlink PID to receive upcalls. */ + OVS_USERSPACE_ATTR_USERDATA, /* Optional user-specified cookie. */ OVS_USERSPACE_ATTR_EGRESS_TUN_PORT, /* Optional, u32 output port * to get tunnel info. */ OVS_USERSPACE_ATTR_ACTIONS, /* Optional flag to get actions. */ @@ -811,13 +784,13 @@ struct ovs_action_hash { */ enum ovs_ct_attr { OVS_CT_ATTR_UNSPEC, - OVS_CT_ATTR_COMMIT, /* No argument, commits connection. */ - OVS_CT_ATTR_ZONE, /* u16 zone id. */ - OVS_CT_ATTR_MARK, /* mark to associate with this connection. */ - OVS_CT_ATTR_LABELS, /* labels to associate with this connection. */ - OVS_CT_ATTR_HELPER, /* netlink helper to assist detection of - related connections. */ - OVS_CT_ATTR_NAT, /* Nested OVS_NAT_ATTR_* */ + OVS_CT_ATTR_COMMIT, /* No argument, commits connection. */ + OVS_CT_ATTR_ZONE, /* u16 zone id. */ + OVS_CT_ATTR_MARK, /* mark to associate with this connection. */ + OVS_CT_ATTR_LABELS, /* labels to associate with this connection. */ + OVS_CT_ATTR_HELPER, /* netlink helper to assist detection of + related connections. */ + OVS_CT_ATTR_NAT, /* Nested OVS_NAT_ATTR_* */ OVS_CT_ATTR_FORCE_COMMIT, /* No argument */ OVS_CT_ATTR_EVENTMASK, /* u32 mask of IPCT_* events. */ OVS_CT_ATTR_TIMEOUT, /* Associate timeout with this connection for diff --git a/include/arch/x86_64/linux/parport.h b/include/arch/x86_64/linux/parport.h index be799520..659f8e5a 100644 --- a/include/arch/x86_64/linux/parport.h +++ b/include/arch/x86_64/linux/parport.h @@ -89,8 +89,8 @@ typedef enum { #define IEEE1284_DATA 0 /* So is this */ /* Flags for block transfer operations. */ -#define PARPORT_EPP_FAST (1 << 0) /* Unreliable counts. */ -#define PARPORT_W91284PIC (1 << 1) /* have a Warp9 w91284pic in the device */ +#define PARPORT_EPP_FAST (1 << 0) /* Unreliable counts. */ +#define PARPORT_W91284PIC (1 << 1) /* have a Warp9 w91284pic in the device */ #define PARPORT_EPP_FAST_32 PARPORT_EPP_FAST /* 32-bit EPP transfers */ #define PARPORT_EPP_FAST_16 (1 << 2) /* 16-bit EPP transfers */ #define PARPORT_EPP_FAST_8 (1 << 3) /* 8-bit EPP transfers */ diff --git a/include/arch/x86_64/linux/pci.h b/include/arch/x86_64/linux/pci.h index 730c8643..8f8f6a5b 100644 --- a/include/arch/x86_64/linux/pci.h +++ b/include/arch/x86_64/linux/pci.h @@ -33,14 +33,10 @@ #define PCI_FUNC(devfn) ((devfn) & 0x07) /* Ioctls for /proc/bus/pci/X/Y nodes. */ -#define PCIIOC_BASE ('P' << 24 | 'C' << 16 | 'I' << 8) -#define PCIIOC_CONTROLLER \ - (PCIIOC_BASE | 0x00) /* Get controller for PCI device. */ -#define PCIIOC_MMAP_IS_IO \ - (PCIIOC_BASE | 0x01) /* Set mmap state to I/O space. */ -#define PCIIOC_MMAP_IS_MEM \ - (PCIIOC_BASE | 0x02) /* Set mmap state to MEM space. */ -#define PCIIOC_WRITE_COMBINE \ - (PCIIOC_BASE | 0x03) /* Enable/disable write-combining. */ +#define PCIIOC_BASE ('P' << 24 | 'C' << 16 | 'I' << 8) +#define PCIIOC_CONTROLLER (PCIIOC_BASE | 0x00) /* Get controller for PCI device. */ +#define PCIIOC_MMAP_IS_IO (PCIIOC_BASE | 0x01) /* Set mmap state to I/O space. */ +#define PCIIOC_MMAP_IS_MEM (PCIIOC_BASE | 0x02) /* Set mmap state to MEM space. */ +#define PCIIOC_WRITE_COMBINE (PCIIOC_BASE | 0x03) /* Enable/disable write-combining. */ #endif /* LINUX_PCI_H */ diff --git a/include/arch/x86_64/linux/pci_regs.h b/include/arch/x86_64/linux/pci_regs.h index 69e48abb..7b028a62 100644 --- a/include/arch/x86_64/linux/pci_regs.h +++ b/include/arch/x86_64/linux/pci_regs.h @@ -50,12 +50,12 @@ #define PCI_COMMAND_FAST_BACK 0x200 /* Enable back-to-back writes */ #define PCI_COMMAND_INTX_DISABLE 0x400 /* INTx Emulation Disable */ -#define PCI_STATUS 0x06 /* 16 bits */ -#define PCI_STATUS_IMM_READY 0x01 /* Immediate Readiness */ -#define PCI_STATUS_INTERRUPT 0x08 /* Interrupt status */ -#define PCI_STATUS_CAP_LIST 0x10 /* Support Capability List */ -#define PCI_STATUS_66MHZ 0x20 /* Support 66 MHz PCI 2.1 bus */ -#define PCI_STATUS_UDF 0x40 /* Support User Definable Features [obsolete] */ +#define PCI_STATUS 0x06 /* 16 bits */ +#define PCI_STATUS_IMM_READY 0x01 /* Immediate Readiness */ +#define PCI_STATUS_INTERRUPT 0x08 /* Interrupt status */ +#define PCI_STATUS_CAP_LIST 0x10 /* Support Capability List */ +#define PCI_STATUS_66MHZ 0x20 /* Support 66 MHz PCI 2.1 bus */ +#define PCI_STATUS_UDF 0x40 /* Support User Definable Features [obsolete] */ #define PCI_STATUS_FAST_BACK 0x80 /* Accept fast-back to back */ #define PCI_STATUS_PARITY 0x100 /* Detected parity error */ #define PCI_STATUS_DEVSEL_MASK 0x600 /* DEVSEL timing */ @@ -139,8 +139,8 @@ #define PCI_IO_RANGE_TYPE_32 0x01 #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_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_MEMORY_RANGE_TYPE_MASK 0x0fUL #define PCI_MEMORY_RANGE_MASK (~0x0fUL) @@ -160,16 +160,14 @@ /* 0x35-0x3b is reserved */ #define PCI_ROM_ADDRESS1 0x38 /* Same as PCI_ROM_ADDRESS, but for htype 1 */ /* 0x3c-0x3d are same as for htype 0 */ -#define PCI_BRIDGE_CONTROL 0x3e -#define PCI_BRIDGE_CTL_PARITY \ - 0x01 /* Enable parity detection on secondary interface */ +#define PCI_BRIDGE_CONTROL 0x3e +#define PCI_BRIDGE_CTL_PARITY 0x01 /* Enable parity detection on secondary interface */ #define PCI_BRIDGE_CTL_SERR 0x02 /* The same for SERR forwarding */ #define PCI_BRIDGE_CTL_ISA 0x04 /* Enable ISA mode */ #define PCI_BRIDGE_CTL_VGA 0x08 /* Forward VGA addresses */ #define PCI_BRIDGE_CTL_MASTER_ABORT 0x20 /* Report master aborts */ #define PCI_BRIDGE_CTL_BUS_RESET 0x40 /* Secondary bus reset */ -#define PCI_BRIDGE_CTL_FAST_BACK \ - 0x80 /* Fast Back2Back enabled on secondary interface */ +#define PCI_BRIDGE_CTL_FAST_BACK 0x80 /* Fast Back2Back enabled on secondary interface */ /* Header type 2 (CardBus bridges) */ #define PCI_CB_CAPABILITY_LIST 0x14 @@ -193,25 +191,22 @@ #define PCI_CB_IO_LIMIT_1_HI 0x3a #define PCI_CB_IO_RANGE_MASK (~0x03UL) /* 0x3c-0x3d are same as for htype 0 */ -#define PCI_CB_BRIDGE_CONTROL 0x3e -#define PCI_CB_BRIDGE_CTL_PARITY \ - 0x01 /* Similar to standard bridge control register */ +#define PCI_CB_BRIDGE_CONTROL 0x3e +#define PCI_CB_BRIDGE_CTL_PARITY 0x01 /* Similar to standard bridge control register */ #define PCI_CB_BRIDGE_CTL_SERR 0x02 #define PCI_CB_BRIDGE_CTL_ISA 0x04 #define PCI_CB_BRIDGE_CTL_VGA 0x08 #define PCI_CB_BRIDGE_CTL_MASTER_ABORT 0x20 #define PCI_CB_BRIDGE_CTL_CB_RESET 0x40 /* CardBus reset */ -#define PCI_CB_BRIDGE_CTL_16BIT_INT \ - 0x80 /* Enable interrupt for 16-bit cards \ - */ -#define PCI_CB_BRIDGE_CTL_PREFETCH_MEM0 \ - 0x100 /* Prefetch enable for both memory regions */ +#define PCI_CB_BRIDGE_CTL_16BIT_INT \ + 0x80 /* Enable interrupt for 16-bit cards \ + */ +#define PCI_CB_BRIDGE_CTL_PREFETCH_MEM0 0x100 /* Prefetch enable for both memory regions */ #define PCI_CB_BRIDGE_CTL_PREFETCH_MEM1 0x200 #define PCI_CB_BRIDGE_CTL_POST_WRITES 0x400 #define PCI_CB_SUBSYSTEM_VENDOR_ID 0x40 #define PCI_CB_SUBSYSTEM_ID 0x42 -#define PCI_CB_LEGACY_MODE_BASE \ - 0x44 /* 16-bit PC Card legacy mode base address (ExCa) */ +#define PCI_CB_LEGACY_MODE_BASE 0x44 /* 16-bit PC Card legacy mode base address (ExCa) */ /* 0x48-0x7f reserved */ /* Capability lists */ @@ -269,27 +264,26 @@ #define PCI_PM_CTRL_PME_STATUS 0x8000 /* PME pin status */ #define PCI_PM_PPB_EXTENSIONS 6 /* PPB support extensions (??) */ #define PCI_PM_PPB_B2_B3 0x40 /* Stop clock when in D3hot (??) */ -#define PCI_PM_BPCC_ENABLE 0x80 /* Bus power/clock control enable (??) */ -#define PCI_PM_DATA_REGISTER 7 /* (??) */ +#define PCI_PM_BPCC_ENABLE 0x80 /* Bus power/clock control enable (??) */ +#define PCI_PM_DATA_REGISTER 7 /* (??) */ #define PCI_PM_SIZEOF 8 /* AGP registers */ -#define PCI_AGP_VERSION 2 /* BCD version number */ -#define PCI_AGP_RFU 3 /* Rest of capability flags */ -#define PCI_AGP_STATUS 4 /* Status register */ -#define PCI_AGP_STATUS_RQ_MASK 0xff000000 /* Maximum number of requests - 1 */ -#define PCI_AGP_STATUS_SBA 0x0200 /* Sideband addressing supported */ -#define PCI_AGP_STATUS_64BIT 0x0020 /* 64-bit addressing supported */ -#define PCI_AGP_STATUS_FW 0x0010 /* FW transfers supported */ -#define PCI_AGP_STATUS_RATE4 0x0004 /* 4x transfer rate supported */ -#define PCI_AGP_STATUS_RATE2 0x0002 /* 2x transfer rate supported */ -#define PCI_AGP_STATUS_RATE1 0x0001 /* 1x transfer rate supported */ -#define PCI_AGP_COMMAND 8 /* Control register */ -#define PCI_AGP_COMMAND_RQ_MASK \ - 0xff000000 /* Master: Maximum number of requests */ -#define PCI_AGP_COMMAND_SBA 0x0200 /* Sideband addressing enabled */ -#define PCI_AGP_COMMAND_AGP 0x0100 /* Allow processing of AGP transactions */ +#define PCI_AGP_VERSION 2 /* BCD version number */ +#define PCI_AGP_RFU 3 /* Rest of capability flags */ +#define PCI_AGP_STATUS 4 /* Status register */ +#define PCI_AGP_STATUS_RQ_MASK 0xff000000 /* Maximum number of requests - 1 */ +#define PCI_AGP_STATUS_SBA 0x0200 /* Sideband addressing supported */ +#define PCI_AGP_STATUS_64BIT 0x0020 /* 64-bit addressing supported */ +#define PCI_AGP_STATUS_FW 0x0010 /* FW transfers supported */ +#define PCI_AGP_STATUS_RATE4 0x0004 /* 4x transfer rate supported */ +#define PCI_AGP_STATUS_RATE2 0x0002 /* 2x transfer rate supported */ +#define PCI_AGP_STATUS_RATE1 0x0001 /* 1x transfer rate supported */ +#define PCI_AGP_COMMAND 8 /* Control register */ +#define PCI_AGP_COMMAND_RQ_MASK 0xff000000 /* Master: Maximum number of requests */ +#define PCI_AGP_COMMAND_SBA 0x0200 /* Sideband addressing enabled */ +#define PCI_AGP_COMMAND_AGP 0x0100 /* Allow processing of AGP transactions */ #define PCI_AGP_COMMAND_64BIT \ 0x0020 /* Allow processing of 64-bit addresses \ */ @@ -335,11 +329,11 @@ #define PCI_MSI_PENDING_64 0x14 /* Pending intrs for 64-bit devices */ /* MSI-X registers (in MSI-X capability) */ -#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_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 */ @@ -428,45 +422,44 @@ /* 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_CMD_ERO 0x0002 /* Enable Relaxed Ordering */ -#define PCI_X_CMD_READ_512 0x0000 /* 512 byte maximum read byte count */ -#define PCI_X_CMD_READ_1K 0x0004 /* 1Kbyte maximum read byte count */ -#define PCI_X_CMD_READ_2K 0x0008 /* 2Kbyte maximum read byte count */ -#define PCI_X_CMD_READ_4K 0x000c /* 4Kbyte maximum read byte count */ -#define PCI_X_CMD_MAX_READ 0x000c /* Max Memory Read Byte Count */ - /* Max # of outstanding split transactions */ -#define PCI_X_CMD_SPLIT_1 0x0000 /* Max 1 */ -#define PCI_X_CMD_SPLIT_2 0x0010 /* Max 2 */ -#define PCI_X_CMD_SPLIT_3 0x0020 /* Max 3 */ -#define PCI_X_CMD_SPLIT_4 0x0030 /* Max 4 */ -#define PCI_X_CMD_SPLIT_8 0x0040 /* Max 8 */ -#define PCI_X_CMD_SPLIT_12 0x0050 /* Max 12 */ -#define PCI_X_CMD_SPLIT_16 0x0060 /* Max 16 */ -#define PCI_X_CMD_SPLIT_32 0x0070 /* Max 32 */ -#define PCI_X_CMD_MAX_SPLIT 0x0070 /* Max Outstanding Split Transactions */ -#define PCI_X_CMD_VERSION(x) (((x) >> 12) & 3) /* Version */ -#define PCI_X_STATUS 4 /* PCI-X capabilities */ -#define PCI_X_STATUS_DEVFN 0x000000ff /* A copy of devfn */ -#define PCI_X_STATUS_BUS 0x0000ff00 /* A copy of bus nr */ -#define PCI_X_STATUS_64BIT 0x00010000 /* 64-bit device */ -#define PCI_X_STATUS_133MHZ 0x00020000 /* 133 MHz capable */ -#define PCI_X_STATUS_SPL_DISC 0x00040000 /* Split Completion Discarded */ -#define PCI_X_STATUS_UNX_SPL 0x00080000 /* Unexpected Split Completion */ -#define PCI_X_STATUS_COMPLEX 0x00100000 /* Device Complexity */ -#define PCI_X_STATUS_MAX_READ 0x00600000 /* Designed Max Memory Read Count */ -#define PCI_X_STATUS_MAX_SPLIT \ - 0x03800000 /* Designed Max Outstanding Split Transactions */ -#define PCI_X_STATUS_MAX_CUM \ - 0x1c000000 /* Designed Max Cumulative Read Size \ - */ -#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_X_CMD 2 /* Modes & Features */ +#define PCI_X_CMD_DPERR_E 0x0001 /* Data Parity Error Recovery Enable */ +#define PCI_X_CMD_ERO 0x0002 /* Enable Relaxed Ordering */ +#define PCI_X_CMD_READ_512 0x0000 /* 512 byte maximum read byte count */ +#define PCI_X_CMD_READ_1K 0x0004 /* 1Kbyte maximum read byte count */ +#define PCI_X_CMD_READ_2K 0x0008 /* 2Kbyte maximum read byte count */ +#define PCI_X_CMD_READ_4K 0x000c /* 4Kbyte maximum read byte count */ +#define PCI_X_CMD_MAX_READ 0x000c /* Max Memory Read Byte Count */ + /* Max # of outstanding split transactions */ +#define PCI_X_CMD_SPLIT_1 0x0000 /* Max 1 */ +#define PCI_X_CMD_SPLIT_2 0x0010 /* Max 2 */ +#define PCI_X_CMD_SPLIT_3 0x0020 /* Max 3 */ +#define PCI_X_CMD_SPLIT_4 0x0030 /* Max 4 */ +#define PCI_X_CMD_SPLIT_8 0x0040 /* Max 8 */ +#define PCI_X_CMD_SPLIT_12 0x0050 /* Max 12 */ +#define PCI_X_CMD_SPLIT_16 0x0060 /* Max 16 */ +#define PCI_X_CMD_SPLIT_32 0x0070 /* Max 32 */ +#define PCI_X_CMD_MAX_SPLIT 0x0070 /* Max Outstanding Split Transactions */ +#define PCI_X_CMD_VERSION(x) (((x) >> 12) & 3) /* Version */ +#define PCI_X_STATUS 4 /* PCI-X capabilities */ +#define PCI_X_STATUS_DEVFN 0x000000ff /* A copy of devfn */ +#define PCI_X_STATUS_BUS 0x0000ff00 /* A copy of bus nr */ +#define PCI_X_STATUS_64BIT 0x00010000 /* 64-bit device */ +#define PCI_X_STATUS_133MHZ 0x00020000 /* 133 MHz capable */ +#define PCI_X_STATUS_SPL_DISC 0x00040000 /* Split Completion Discarded */ +#define PCI_X_STATUS_UNX_SPL 0x00080000 /* Unexpected Split Completion */ +#define PCI_X_STATUS_COMPLEX 0x00100000 /* Device Complexity */ +#define PCI_X_STATUS_MAX_READ 0x00600000 /* Designed Max Memory Read Count */ +#define PCI_X_STATUS_MAX_SPLIT 0x03800000 /* Designed Max Outstanding Split Transactions */ +#define PCI_X_STATUS_MAX_CUM \ + 0x1c000000 /* Designed Max Cumulative Read Size \ + */ +#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) */ @@ -489,72 +482,71 @@ /* PCI Express capability registers */ -#define PCI_EXP_FLAGS 0x02 /* Capabilities register */ -#define PCI_EXP_FLAGS_VERS 0x000f /* Capability version */ -#define PCI_EXP_FLAGS_TYPE 0x00f0 /* Device/Port type */ -#define PCI_EXP_TYPE_ENDPOINT 0x0 /* Express Endpoint */ -#define PCI_EXP_TYPE_LEG_END 0x1 /* Legacy Endpoint */ -#define PCI_EXP_TYPE_ROOT_PORT 0x4 /* Root Port */ -#define PCI_EXP_TYPE_UPSTREAM 0x5 /* Upstream Port */ -#define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */ -#define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCIe to PCI/PCI-X Bridge */ -#define PCI_EXP_TYPE_PCIE_BRIDGE 0x8 /* PCI/PCI-X to PCIe Bridge */ -#define PCI_EXP_TYPE_RC_END 0x9 /* Root Complex Integrated Endpoint */ -#define PCI_EXP_TYPE_RC_EC 0xa /* Root Complex Event Collector */ -#define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */ -#define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */ -#define PCI_EXP_FLAGS_FLIT 0x8000 /* Flit Mode Supported */ -#define PCI_EXP_DEVCAP 0x04 /* Device capabilities */ -#define PCI_EXP_DEVCAP_PAYLOAD 0x00000007 /* Max_Payload_Size */ -#define PCI_EXP_DEVCAP_PHANTOM 0x00000018 /* Phantom functions */ -#define PCI_EXP_DEVCAP_EXT_TAG 0x00000020 /* Extended tags */ -#define PCI_EXP_DEVCAP_L0S 0x000001c0 /* L0s Acceptable Latency */ -#define PCI_EXP_DEVCAP_L1 0x00000e00 /* L1 Acceptable Latency */ -#define PCI_EXP_DEVCAP_ATN_BUT 0x00001000 /* Attention Button Present */ -#define PCI_EXP_DEVCAP_ATN_IND 0x00002000 /* Attention Indicator Present */ -#define PCI_EXP_DEVCAP_PWR_IND 0x00004000 /* Power Indicator Present */ -#define PCI_EXP_DEVCAP_RBER 0x00008000 /* Role-Based Error Reporting */ -#define PCI_EXP_DEVCAP_PWR_VAL 0x03fc0000 /* Slot Power Limit Value */ -#define PCI_EXP_DEVCAP_PWR_SCL 0x0c000000 /* Slot Power Limit Scale */ -#define PCI_EXP_DEVCAP_FLR 0x10000000 /* Function Level Reset */ -#define PCI_EXP_DEVCTL 0x08 /* Device Control */ -#define PCI_EXP_DEVCTL_CERE 0x0001 /* Correctable Error Reporting En. */ -#define PCI_EXP_DEVCTL_NFERE 0x0002 /* Non-Fatal Error Reporting Enable */ -#define PCI_EXP_DEVCTL_FERE 0x0004 /* Fatal Error Reporting Enable */ -#define PCI_EXP_DEVCTL_URRE 0x0008 /* Unsupported Request Reporting En. */ -#define PCI_EXP_DEVCTL_RELAX_EN 0x0010 /* Enable relaxed ordering */ -#define PCI_EXP_DEVCTL_PAYLOAD 0x00e0 /* Max_Payload_Size */ -#define PCI_EXP_DEVCTL_PAYLOAD_128B 0x0000 /* 128 Bytes */ -#define PCI_EXP_DEVCTL_PAYLOAD_256B 0x0020 /* 256 Bytes */ -#define PCI_EXP_DEVCTL_PAYLOAD_512B 0x0040 /* 512 Bytes */ -#define PCI_EXP_DEVCTL_PAYLOAD_1024B 0x0060 /* 1024 Bytes */ -#define PCI_EXP_DEVCTL_PAYLOAD_2048B 0x0080 /* 2048 Bytes */ -#define PCI_EXP_DEVCTL_PAYLOAD_4096B 0x00a0 /* 4096 Bytes */ -#define PCI_EXP_DEVCTL_EXT_TAG 0x0100 /* Extended Tag Field Enable */ -#define PCI_EXP_DEVCTL_PHANTOM 0x0200 /* Phantom Functions Enable */ -#define PCI_EXP_DEVCTL_AUX_PME 0x0400 /* Auxiliary Power PM Enable */ -#define PCI_EXP_DEVCTL_NOSNOOP_EN 0x0800 /* Enable No Snoop */ -#define PCI_EXP_DEVCTL_READRQ 0x7000 /* Max_Read_Request_Size */ -#define PCI_EXP_DEVCTL_READRQ_128B 0x0000 /* 128 Bytes */ -#define PCI_EXP_DEVCTL_READRQ_256B 0x1000 /* 256 Bytes */ -#define PCI_EXP_DEVCTL_READRQ_512B 0x2000 /* 512 Bytes */ -#define PCI_EXP_DEVCTL_READRQ_1024B 0x3000 /* 1024 Bytes */ -#define PCI_EXP_DEVCTL_READRQ_2048B 0x4000 /* 2048 Bytes */ -#define PCI_EXP_DEVCTL_READRQ_4096B 0x5000 /* 4096 Bytes */ -#define PCI_EXP_DEVCTL_BCR_FLR 0x8000 /* Bridge Configuration Retry / FLR */ -#define PCI_EXP_DEVSTA 0x0a /* Device Status */ -#define PCI_EXP_DEVSTA_CED 0x0001 /* Correctable Error Detected */ -#define PCI_EXP_DEVSTA_NFED 0x0002 /* Non-Fatal Error Detected */ -#define PCI_EXP_DEVSTA_FED 0x0004 /* Fatal Error Detected */ -#define PCI_EXP_DEVSTA_URD 0x0008 /* Unsupported Request Detected */ -#define PCI_EXP_DEVSTA_AUXPD 0x0010 /* AUX Power Detected */ -#define PCI_EXP_DEVSTA_TRPND 0x0020 /* Transactions Pending */ -#define PCI_CAP_EXP_RC_ENDPOINT_SIZEOF_V1 \ - 12 /* v1 endpoints without link end here */ -#define PCI_EXP_LNKCAP 0x0c /* Link Capabilities */ -#define PCI_EXP_LNKCAP_SLS \ - 0x0000000f /* Max Link Speed (prior to PCIe r3.0: Supported Link \ - Speeds) */ +#define PCI_EXP_FLAGS 0x02 /* Capabilities register */ +#define PCI_EXP_FLAGS_VERS 0x000f /* Capability version */ +#define PCI_EXP_FLAGS_TYPE 0x00f0 /* Device/Port type */ +#define PCI_EXP_TYPE_ENDPOINT 0x0 /* Express Endpoint */ +#define PCI_EXP_TYPE_LEG_END 0x1 /* Legacy Endpoint */ +#define PCI_EXP_TYPE_ROOT_PORT 0x4 /* Root Port */ +#define PCI_EXP_TYPE_UPSTREAM 0x5 /* Upstream Port */ +#define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */ +#define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCIe to PCI/PCI-X Bridge */ +#define PCI_EXP_TYPE_PCIE_BRIDGE 0x8 /* PCI/PCI-X to PCIe Bridge */ +#define PCI_EXP_TYPE_RC_END 0x9 /* Root Complex Integrated Endpoint */ +#define PCI_EXP_TYPE_RC_EC 0xa /* Root Complex Event Collector */ +#define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */ +#define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */ +#define PCI_EXP_FLAGS_FLIT 0x8000 /* Flit Mode Supported */ +#define PCI_EXP_DEVCAP 0x04 /* Device capabilities */ +#define PCI_EXP_DEVCAP_PAYLOAD 0x00000007 /* Max_Payload_Size */ +#define PCI_EXP_DEVCAP_PHANTOM 0x00000018 /* Phantom functions */ +#define PCI_EXP_DEVCAP_EXT_TAG 0x00000020 /* Extended tags */ +#define PCI_EXP_DEVCAP_L0S 0x000001c0 /* L0s Acceptable Latency */ +#define PCI_EXP_DEVCAP_L1 0x00000e00 /* L1 Acceptable Latency */ +#define PCI_EXP_DEVCAP_ATN_BUT 0x00001000 /* Attention Button Present */ +#define PCI_EXP_DEVCAP_ATN_IND 0x00002000 /* Attention Indicator Present */ +#define PCI_EXP_DEVCAP_PWR_IND 0x00004000 /* Power Indicator Present */ +#define PCI_EXP_DEVCAP_RBER 0x00008000 /* Role-Based Error Reporting */ +#define PCI_EXP_DEVCAP_PWR_VAL 0x03fc0000 /* Slot Power Limit Value */ +#define PCI_EXP_DEVCAP_PWR_SCL 0x0c000000 /* Slot Power Limit Scale */ +#define PCI_EXP_DEVCAP_FLR 0x10000000 /* Function Level Reset */ +#define PCI_EXP_DEVCTL 0x08 /* Device Control */ +#define PCI_EXP_DEVCTL_CERE 0x0001 /* Correctable Error Reporting En. */ +#define PCI_EXP_DEVCTL_NFERE 0x0002 /* Non-Fatal Error Reporting Enable */ +#define PCI_EXP_DEVCTL_FERE 0x0004 /* Fatal Error Reporting Enable */ +#define PCI_EXP_DEVCTL_URRE 0x0008 /* Unsupported Request Reporting En. */ +#define PCI_EXP_DEVCTL_RELAX_EN 0x0010 /* Enable relaxed ordering */ +#define PCI_EXP_DEVCTL_PAYLOAD 0x00e0 /* Max_Payload_Size */ +#define PCI_EXP_DEVCTL_PAYLOAD_128B 0x0000 /* 128 Bytes */ +#define PCI_EXP_DEVCTL_PAYLOAD_256B 0x0020 /* 256 Bytes */ +#define PCI_EXP_DEVCTL_PAYLOAD_512B 0x0040 /* 512 Bytes */ +#define PCI_EXP_DEVCTL_PAYLOAD_1024B 0x0060 /* 1024 Bytes */ +#define PCI_EXP_DEVCTL_PAYLOAD_2048B 0x0080 /* 2048 Bytes */ +#define PCI_EXP_DEVCTL_PAYLOAD_4096B 0x00a0 /* 4096 Bytes */ +#define PCI_EXP_DEVCTL_EXT_TAG 0x0100 /* Extended Tag Field Enable */ +#define PCI_EXP_DEVCTL_PHANTOM 0x0200 /* Phantom Functions Enable */ +#define PCI_EXP_DEVCTL_AUX_PME 0x0400 /* Auxiliary Power PM Enable */ +#define PCI_EXP_DEVCTL_NOSNOOP_EN 0x0800 /* Enable No Snoop */ +#define PCI_EXP_DEVCTL_READRQ 0x7000 /* Max_Read_Request_Size */ +#define PCI_EXP_DEVCTL_READRQ_128B 0x0000 /* 128 Bytes */ +#define PCI_EXP_DEVCTL_READRQ_256B 0x1000 /* 256 Bytes */ +#define PCI_EXP_DEVCTL_READRQ_512B 0x2000 /* 512 Bytes */ +#define PCI_EXP_DEVCTL_READRQ_1024B 0x3000 /* 1024 Bytes */ +#define PCI_EXP_DEVCTL_READRQ_2048B 0x4000 /* 2048 Bytes */ +#define PCI_EXP_DEVCTL_READRQ_4096B 0x5000 /* 4096 Bytes */ +#define PCI_EXP_DEVCTL_BCR_FLR 0x8000 /* Bridge Configuration Retry / FLR */ +#define PCI_EXP_DEVSTA 0x0a /* Device Status */ +#define PCI_EXP_DEVSTA_CED 0x0001 /* Correctable Error Detected */ +#define PCI_EXP_DEVSTA_NFED 0x0002 /* Non-Fatal Error Detected */ +#define PCI_EXP_DEVSTA_FED 0x0004 /* Fatal Error Detected */ +#define PCI_EXP_DEVSTA_URD 0x0008 /* Unsupported Request Detected */ +#define PCI_EXP_DEVSTA_AUXPD 0x0010 /* AUX Power Detected */ +#define PCI_EXP_DEVSTA_TRPND 0x0020 /* Transactions Pending */ +#define PCI_CAP_EXP_RC_ENDPOINT_SIZEOF_V1 12 /* v1 endpoints without link end here */ +#define PCI_EXP_LNKCAP 0x0c /* Link Capabilities */ +#define PCI_EXP_LNKCAP_SLS \ + 0x0000000f /* Max Link Speed (prior to PCIe r3.0: Supported Link \ + Speeds) */ #define PCI_EXP_LNKCAP_SLS_2_5GB 0x00000001 /* LNKCAP2 SLS Vector bit 0 */ #define PCI_EXP_LNKCAP_SLS_5_0GB 0x00000002 /* LNKCAP2 SLS Vector bit 1 */ #define PCI_EXP_LNKCAP_SLS_8_0GB 0x00000003 /* LNKCAP2 SLS Vector bit 2 */ @@ -568,47 +560,42 @@ #define PCI_EXP_LNKCAP_L0SEL 0x00007000 /* L0s Exit Latency */ #define PCI_EXP_LNKCAP_L1EL 0x00038000 /* L1 Exit Latency */ #define PCI_EXP_LNKCAP_CLKPM 0x00040000 /* Clock Power Management */ -#define PCI_EXP_LNKCAP_SDERC \ - 0x00080000 /* Surprise Down Error Reporting Capable */ -#define PCI_EXP_LNKCAP_DLLLARC \ - 0x00100000 /* Data Link Layer Link Active Reporting Capable */ -#define PCI_EXP_LNKCAP_LBNC \ - 0x00200000 /* Link Bandwidth Notification Capability */ -#define PCI_EXP_LNKCAP_PN 0xff000000 /* Port Number */ -#define PCI_EXP_LNKCTL 0x10 /* Link Control */ -#define PCI_EXP_LNKCTL_ASPMC 0x0003 /* ASPM Control */ -#define PCI_EXP_LNKCTL_ASPM_L0S 0x0001 /* L0s Enable */ -#define PCI_EXP_LNKCTL_ASPM_L1 0x0002 /* 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_LNKCTL_CCC 0x0040 /* Common Clock Configuration */ -#define PCI_EXP_LNKCTL_ES 0x0080 /* Extended Synch */ -#define PCI_EXP_LNKCTL_CLKREQ_EN 0x0100 /* Enable clkreq */ -#define PCI_EXP_LNKCTL_HAWD 0x0200 /* Hardware Autonomous Width Disable */ -#define PCI_EXP_LNKCTL_LBMIE \ - 0x0400 /* Link Bandwidth Management Interrupt Enable */ -#define PCI_EXP_LNKCTL_LABIE \ - 0x0800 /* Link Autonomous Bandwidth Interrupt Enable */ -#define PCI_EXP_LNKSTA 0x12 /* Link Status */ -#define PCI_EXP_LNKSTA_CLS 0x000f /* Current Link Speed */ -#define PCI_EXP_LNKSTA_CLS_2_5GB 0x0001 /* Current Link Speed 2.5GT/s */ -#define PCI_EXP_LNKSTA_CLS_5_0GB 0x0002 /* Current Link Speed 5.0GT/s */ -#define PCI_EXP_LNKSTA_CLS_8_0GB 0x0003 /* Current Link Speed 8.0GT/s */ -#define PCI_EXP_LNKSTA_CLS_16_0GB 0x0004 /* Current Link Speed 16.0GT/s */ -#define PCI_EXP_LNKSTA_CLS_32_0GB 0x0005 /* Current Link Speed 32.0GT/s */ -#define PCI_EXP_LNKSTA_CLS_64_0GB 0x0006 /* Current Link Speed 64.0GT/s */ -#define PCI_EXP_LNKSTA_NLW 0x03f0 /* Negotiated Link Width */ -#define PCI_EXP_LNKSTA_NLW_X1 0x0010 /* Current Link Width x1 */ -#define PCI_EXP_LNKSTA_NLW_X2 0x0020 /* Current Link Width x2 */ -#define PCI_EXP_LNKSTA_NLW_X4 0x0040 /* Current Link Width x4 */ -#define PCI_EXP_LNKSTA_NLW_X8 0x0080 /* Current Link Width x8 */ -#define PCI_EXP_LNKSTA_NLW_SHIFT 4 /* start of NLW mask in link status */ -#define PCI_EXP_LNKSTA_LT 0x0800 /* Link Training */ -#define PCI_EXP_LNKSTA_SLC 0x1000 /* Slot Clock Configuration */ -#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_EXP_LNKCAP_SDERC 0x00080000 /* Surprise Down Error Reporting Capable */ +#define PCI_EXP_LNKCAP_DLLLARC 0x00100000 /* Data Link Layer Link Active Reporting Capable */ +#define PCI_EXP_LNKCAP_LBNC 0x00200000 /* Link Bandwidth Notification Capability */ +#define PCI_EXP_LNKCAP_PN 0xff000000 /* Port Number */ +#define PCI_EXP_LNKCTL 0x10 /* Link Control */ +#define PCI_EXP_LNKCTL_ASPMC 0x0003 /* ASPM Control */ +#define PCI_EXP_LNKCTL_ASPM_L0S 0x0001 /* L0s Enable */ +#define PCI_EXP_LNKCTL_ASPM_L1 0x0002 /* 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_LNKCTL_CCC 0x0040 /* Common Clock Configuration */ +#define PCI_EXP_LNKCTL_ES 0x0080 /* Extended Synch */ +#define PCI_EXP_LNKCTL_CLKREQ_EN 0x0100 /* Enable clkreq */ +#define PCI_EXP_LNKCTL_HAWD 0x0200 /* Hardware Autonomous Width Disable */ +#define PCI_EXP_LNKCTL_LBMIE 0x0400 /* Link Bandwidth Management Interrupt Enable */ +#define PCI_EXP_LNKCTL_LABIE 0x0800 /* Link Autonomous Bandwidth Interrupt Enable */ +#define PCI_EXP_LNKSTA 0x12 /* Link Status */ +#define PCI_EXP_LNKSTA_CLS 0x000f /* Current Link Speed */ +#define PCI_EXP_LNKSTA_CLS_2_5GB 0x0001 /* Current Link Speed 2.5GT/s */ +#define PCI_EXP_LNKSTA_CLS_5_0GB 0x0002 /* Current Link Speed 5.0GT/s */ +#define PCI_EXP_LNKSTA_CLS_8_0GB 0x0003 /* Current Link Speed 8.0GT/s */ +#define PCI_EXP_LNKSTA_CLS_16_0GB 0x0004 /* Current Link Speed 16.0GT/s */ +#define PCI_EXP_LNKSTA_CLS_32_0GB 0x0005 /* Current Link Speed 32.0GT/s */ +#define PCI_EXP_LNKSTA_CLS_64_0GB 0x0006 /* Current Link Speed 64.0GT/s */ +#define PCI_EXP_LNKSTA_NLW 0x03f0 /* Negotiated Link Width */ +#define PCI_EXP_LNKSTA_NLW_X1 0x0010 /* Current Link Width x1 */ +#define PCI_EXP_LNKSTA_NLW_X2 0x0020 /* Current Link Width x2 */ +#define PCI_EXP_LNKSTA_NLW_X4 0x0040 /* Current Link Width x4 */ +#define PCI_EXP_LNKSTA_NLW_X8 0x0080 /* Current Link Width x8 */ +#define PCI_EXP_LNKSTA_NLW_SHIFT 4 /* start of NLW mask in link status */ +#define PCI_EXP_LNKSTA_LT 0x0800 /* Link Training */ +#define PCI_EXP_LNKSTA_SLC 0x1000 /* Slot Clock Configuration */ +#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 with link end here \ */ @@ -622,21 +609,21 @@ #define PCI_EXP_SLTCAP_HPC 0x00000040 /* Hot-Plug Capable */ #define PCI_EXP_SLTCAP_SPLV 0x00007f80 /* Slot Power Limit Value */ #define PCI_EXP_SLTCAP_SPLS 0x00018000 /* Slot Power Limit Scale */ -#define PCI_EXP_SLTCAP_EIP \ - 0x00020000 /* Electromechanical Interlock Present \ - */ +#define PCI_EXP_SLTCAP_EIP \ + 0x00020000 /* Electromechanical Interlock Present \ + */ #define PCI_EXP_SLTCAP_NCCS 0x00040000 /* No Command Completed Support */ #define PCI_EXP_SLTCAP_PSN 0xfff80000 /* Physical Slot Number */ #define PCI_EXP_SLTCTL 0x18 /* Slot Control */ -#define PCI_EXP_SLTCTL_ABPE 0x0001 /* Attention Button Pressed Enable */ -#define PCI_EXP_SLTCTL_PFDE 0x0002 /* Power Fault Detected Enable */ -#define PCI_EXP_SLTCTL_MRLSCE 0x0004 /* MRL Sensor Changed Enable */ -#define PCI_EXP_SLTCTL_PDCE 0x0008 /* Presence Detect Changed Enable */ -#define PCI_EXP_SLTCTL_CCIE 0x0010 /* Command Completed Interrupt Enable */ -#define PCI_EXP_SLTCTL_HPIE 0x0020 /* Hot-Plug Interrupt Enable */ -#define PCI_EXP_SLTCTL_AIC 0x00c0 /* Attention Indicator Control */ -#define PCI_EXP_SLTCTL_ATTN_IND_SHIFT 6 /* Attention Indicator shift */ -#define PCI_EXP_SLTCTL_ATTN_IND_ON 0x0040 /* Attention Indicator on */ +#define PCI_EXP_SLTCTL_ABPE 0x0001 /* Attention Button Pressed Enable */ +#define PCI_EXP_SLTCTL_PFDE 0x0002 /* Power Fault Detected Enable */ +#define PCI_EXP_SLTCTL_MRLSCE 0x0004 /* MRL Sensor Changed Enable */ +#define PCI_EXP_SLTCTL_PDCE 0x0008 /* Presence Detect Changed Enable */ +#define PCI_EXP_SLTCTL_CCIE 0x0010 /* Command Completed Interrupt Enable */ +#define PCI_EXP_SLTCTL_HPIE 0x0020 /* Hot-Plug Interrupt Enable */ +#define PCI_EXP_SLTCTL_AIC 0x00c0 /* Attention Indicator Control */ +#define PCI_EXP_SLTCTL_ATTN_IND_SHIFT 6 /* Attention Indicator shift */ +#define PCI_EXP_SLTCTL_ATTN_IND_ON 0x0040 /* Attention Indicator on */ #define PCI_EXP_SLTCTL_ATTN_IND_BLINK \ 0x0080 /* Attention Indicator blinking \ */ @@ -649,9 +636,9 @@ #define PCI_EXP_SLTCTL_PWR_ON 0x0000 /* Power On */ #define PCI_EXP_SLTCTL_PWR_OFF 0x0400 /* Power Off */ #define PCI_EXP_SLTCTL_EIC 0x0800 /* Electromechanical Interlock Control */ -#define PCI_EXP_SLTCTL_DLLSCE \ - 0x1000 /* Data Link Layer State Changed Enable \ - */ +#define PCI_EXP_SLTCTL_DLLSCE \ + 0x1000 /* Data Link Layer State Changed Enable \ + */ #define PCI_EXP_SLTCTL_ASPL_DISABLE 0x2000 /* Auto Slot Power Limit Disable */ #define PCI_EXP_SLTCTL_IBPD_DISABLE 0x4000 /* In-band PD disable */ #define PCI_EXP_SLTSTA 0x1a /* Slot Status */ @@ -669,17 +656,17 @@ #define PCI_EXP_RTCTL_SENFEE 0x0002 /* System Error on Non-Fatal Error */ #define PCI_EXP_RTCTL_SEFEE 0x0004 /* System Error on Fatal Error */ #define PCI_EXP_RTCTL_PMEIE 0x0008 /* PME Interrupt Enable */ -#define PCI_EXP_RTCTL_RRS_SVE \ - 0x0010 /* Config RRS Software Visibility Enable \ - */ +#define PCI_EXP_RTCTL_RRS_SVE \ + 0x0010 /* Config RRS Software Visibility Enable \ + */ #define PCI_EXP_RTCTL_CRSSVE PCI_EXP_RTCTL_RRS_SVE /* compatibility */ #define PCI_EXP_RTCAP 0x1e /* Root Capabilities */ -#define PCI_EXP_RTCAP_RRS_SV 0x0001 /* Config RRS Software Visibility */ -#define PCI_EXP_RTCAP_CRSVIS PCI_EXP_RTCAP_RRS_SV /* compatibility */ -#define PCI_EXP_RTSTA 0x20 /* Root Status */ -#define PCI_EXP_RTSTA_PME_RQ_ID 0x0000ffff /* PME Requester ID */ -#define PCI_EXP_RTSTA_PME 0x00010000 /* PME status */ -#define PCI_EXP_RTSTA_PENDING 0x00020000 /* PME pending */ +#define PCI_EXP_RTCAP_RRS_SV 0x0001 /* Config RRS Software Visibility */ +#define PCI_EXP_RTCAP_CRSVIS PCI_EXP_RTCAP_RRS_SV /* compatibility */ +#define PCI_EXP_RTSTA 0x20 /* Root Status */ +#define PCI_EXP_RTSTA_PME_RQ_ID 0x0000ffff /* PME Requester ID */ +#define PCI_EXP_RTSTA_PME 0x00010000 /* PME status */ +#define PCI_EXP_RTSTA_PENDING 0x00020000 /* PME pending */ /* * The Device Capabilities 2, Device Status 2, Device Control 2, * Link Capabilities 2, Link Status 2, Link Control 2, @@ -688,13 +675,12 @@ * Use pcie_capability_read_word() and similar interfaces to use them * safely. */ -#define PCI_EXP_DEVCAP2 0x24 /* Device Capabilities 2 */ -#define PCI_EXP_DEVCAP2_COMP_TMOUT_DIS \ - 0x00000010 /* Completion Timeout Disable supported */ -#define PCI_EXP_DEVCAP2_ARI 0x00000020 /* Alternative Routing-ID */ -#define PCI_EXP_DEVCAP2_ATOMIC_ROUTE 0x00000040 /* Atomic Op routing */ -#define PCI_EXP_DEVCAP2_ATOMIC_COMP32 0x00000080 /* 32b AtomicOp completion */ -#define PCI_EXP_DEVCAP2_ATOMIC_COMP64 0x00000100 /* 64b AtomicOp completion */ +#define PCI_EXP_DEVCAP2 0x24 /* Device Capabilities 2 */ +#define PCI_EXP_DEVCAP2_COMP_TMOUT_DIS 0x00000010 /* Completion Timeout Disable supported */ +#define PCI_EXP_DEVCAP2_ARI 0x00000020 /* Alternative Routing-ID */ +#define PCI_EXP_DEVCAP2_ATOMIC_ROUTE 0x00000040 /* Atomic Op routing */ +#define PCI_EXP_DEVCAP2_ATOMIC_COMP32 0x00000080 /* 32b AtomicOp completion */ +#define PCI_EXP_DEVCAP2_ATOMIC_COMP64 0x00000100 /* 64b AtomicOp completion */ #define PCI_EXP_DEVCAP2_ATOMIC_COMP128 \ 0x00000200 /* 128b AtomicOp completion \ */ @@ -704,24 +690,24 @@ #define PCI_EXP_DEVCAP2_OBFF_MSG 0x00040000 /* New message signaling */ #define PCI_EXP_DEVCAP2_OBFF_WAKE 0x00080000 /* Re-use WAKE# for OBFF */ #define PCI_EXP_DEVCAP2_EE_PREFIX 0x00200000 /* End-End TLP Prefix */ -#define PCI_EXP_DEVCAP2_EE_PREFIX_MAX \ - 0x00c00000 /* Max End-End TLP Prefixes \ - */ -#define PCI_EXP_DEVCTL2 0x28 /* Device Control 2 */ -#define PCI_EXP_DEVCTL2_COMP_TIMEOUT 0x000f /* Completion Timeout Value */ -#define PCI_EXP_DEVCTL2_COMP_TMOUT_DIS 0x0010 /* Completion Timeout Disable */ -#define PCI_EXP_DEVCTL2_ARI 0x0020 /* Alternative Routing-ID */ -#define PCI_EXP_DEVCTL2_ATOMIC_REQ 0x0040 /* Set Atomic requests */ -#define PCI_EXP_DEVCTL2_ATOMIC_EGRESS_BLOCK 0x0080 /* Block atomic egress */ -#define PCI_EXP_DEVCTL2_IDO_REQ_EN 0x0100 /* Allow IDO for requests */ -#define PCI_EXP_DEVCTL2_IDO_CMP_EN 0x0200 /* Allow IDO for completions */ -#define PCI_EXP_DEVCTL2_LTR_EN 0x0400 /* Enable LTR mechanism */ -#define PCI_EXP_DEVCTL2_OBFF_MSGA_EN 0x2000 /* Enable OBFF Message type A */ -#define PCI_EXP_DEVCTL2_OBFF_MSGB_EN 0x4000 /* Enable OBFF Message type B */ -#define PCI_EXP_DEVCTL2_OBFF_WAKE_EN 0x6000 /* OBFF using WAKE# signaling */ -#define PCI_EXP_DEVSTA2 0x2a /* Device Status 2 */ -#define PCI_CAP_EXP_RC_ENDPOINT_SIZEOF_V2 0x2c /* end of v2 EPs w/o link */ -#define PCI_EXP_LNKCAP2 0x2c /* Link Capabilities 2 */ +#define PCI_EXP_DEVCAP2_EE_PREFIX_MAX \ + 0x00c00000 /* Max End-End TLP Prefixes \ + */ +#define PCI_EXP_DEVCTL2 0x28 /* Device Control 2 */ +#define PCI_EXP_DEVCTL2_COMP_TIMEOUT 0x000f /* Completion Timeout Value */ +#define PCI_EXP_DEVCTL2_COMP_TMOUT_DIS 0x0010 /* Completion Timeout Disable */ +#define PCI_EXP_DEVCTL2_ARI 0x0020 /* Alternative Routing-ID */ +#define PCI_EXP_DEVCTL2_ATOMIC_REQ 0x0040 /* Set Atomic requests */ +#define PCI_EXP_DEVCTL2_ATOMIC_EGRESS_BLOCK 0x0080 /* Block atomic egress */ +#define PCI_EXP_DEVCTL2_IDO_REQ_EN 0x0100 /* Allow IDO for requests */ +#define PCI_EXP_DEVCTL2_IDO_CMP_EN 0x0200 /* Allow IDO for completions */ +#define PCI_EXP_DEVCTL2_LTR_EN 0x0400 /* Enable LTR mechanism */ +#define PCI_EXP_DEVCTL2_OBFF_MSGA_EN 0x2000 /* Enable OBFF Message type A */ +#define PCI_EXP_DEVCTL2_OBFF_MSGB_EN 0x4000 /* Enable OBFF Message type B */ +#define PCI_EXP_DEVCTL2_OBFF_WAKE_EN 0x6000 /* OBFF using WAKE# signaling */ +#define PCI_EXP_DEVSTA2 0x2a /* Device Status 2 */ +#define PCI_CAP_EXP_RC_ENDPOINT_SIZEOF_V2 0x2c /* end of v2 EPs w/o link */ +#define PCI_EXP_LNKCAP2 0x2c /* Link Capabilities 2 */ #define PCI_EXP_LNKCAP2_SLS 0x000000fe /* Supported Link Speeds Vector */ #define PCI_EXP_LNKCAP2_SLS_2_5GB 0x00000002 /* Supported Speed 2.5GT/s */ #define PCI_EXP_LNKCAP2_SLS_5_0GB 0x00000004 /* Supported Speed 5GT/s */ @@ -732,22 +718,22 @@ #define PCI_EXP_LNKCAP2_CROSSLINK 0x00000100 /* Crosslink supported */ #define PCI_EXP_LNKCTL2 0x30 /* Link Control 2 */ #define PCI_EXP_LNKCTL2_TLS 0x000f -#define PCI_EXP_LNKCTL2_TLS_2_5GT 0x0001 /* Supported Speed 2.5GT/s */ -#define PCI_EXP_LNKCTL2_TLS_5_0GT 0x0002 /* Supported Speed 5GT/s */ -#define PCI_EXP_LNKCTL2_TLS_8_0GT 0x0003 /* Supported Speed 8GT/s */ -#define PCI_EXP_LNKCTL2_TLS_16_0GT 0x0004 /* Supported Speed 16GT/s */ -#define PCI_EXP_LNKCTL2_TLS_32_0GT 0x0005 /* Supported Speed 32GT/s */ -#define PCI_EXP_LNKCTL2_TLS_64_0GT 0x0006 /* Supported Speed 64GT/s */ -#define PCI_EXP_LNKCTL2_ENTER_COMP 0x0010 /* Enter Compliance */ -#define PCI_EXP_LNKCTL2_TX_MARGIN 0x0380 /* Transmit Margin */ -#define PCI_EXP_LNKCTL2_HASD 0x0020 /* HW Autonomous Speed Disable */ -#define PCI_EXP_LNKSTA2 0x32 /* Link Status 2 */ -#define PCI_EXP_LNKSTA2_FLIT 0x0400 /* Flit Mode Status */ -#define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 0x32 /* end of v2 EPs w/ link */ -#define PCI_EXP_SLTCAP2 0x34 /* Slot Capabilities 2 */ +#define PCI_EXP_LNKCTL2_TLS_2_5GT 0x0001 /* Supported Speed 2.5GT/s */ +#define PCI_EXP_LNKCTL2_TLS_5_0GT 0x0002 /* Supported Speed 5GT/s */ +#define PCI_EXP_LNKCTL2_TLS_8_0GT 0x0003 /* Supported Speed 8GT/s */ +#define PCI_EXP_LNKCTL2_TLS_16_0GT 0x0004 /* Supported Speed 16GT/s */ +#define PCI_EXP_LNKCTL2_TLS_32_0GT 0x0005 /* Supported Speed 32GT/s */ +#define PCI_EXP_LNKCTL2_TLS_64_0GT 0x0006 /* Supported Speed 64GT/s */ +#define PCI_EXP_LNKCTL2_ENTER_COMP 0x0010 /* Enter Compliance */ +#define PCI_EXP_LNKCTL2_TX_MARGIN 0x0380 /* Transmit Margin */ +#define PCI_EXP_LNKCTL2_HASD 0x0020 /* HW Autonomous Speed Disable */ +#define PCI_EXP_LNKSTA2 0x32 /* Link Status 2 */ +#define PCI_EXP_LNKSTA2_FLIT 0x0400 /* Flit Mode Status */ +#define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 0x32 /* end of v2 EPs w/ link */ +#define PCI_EXP_SLTCAP2 0x34 /* Slot Capabilities 2 */ #define PCI_EXP_SLTCAP2_IBPD 0x00000001 /* In-band PD Disable Supported */ -#define PCI_EXP_SLTCTL2 0x38 /* Slot Control 2 */ -#define PCI_EXP_SLTSTA2 0x3a /* Slot Status 2 */ +#define PCI_EXP_SLTCTL2 0x38 /* Slot Control 2 */ +#define PCI_EXP_SLTSTA2 0x3a /* Slot Status 2 */ /* Extended Capabilities (PCI-X 2.0 and Express) */ #define PCI_EXT_CAP_ID(header) (header & 0x0000ffff) @@ -798,68 +784,64 @@ #define PCI_EXT_CAP_MCAST_ENDPOINT_SIZEOF 40 /* Advanced Error Reporting */ -#define PCI_ERR_UNCOR_STATUS 0x04 /* Uncorrectable Error Status */ -#define PCI_ERR_UNC_UND 0x00000001 /* Undefined */ -#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_COMP_ABORT 0x00008000 /* Completer Abort */ -#define PCI_ERR_UNC_UNX_COMP 0x00010000 /* Unexpected Completion */ -#define PCI_ERR_UNC_RX_OVER 0x00020000 /* Receiver Overflow */ -#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 0x08 /* Uncorrectable Error Mask */ - /* Same bits as above */ -#define PCI_ERR_UNCOR_SEVER 0x0c /* Uncorrectable Error Severity */ - /* Same bits as above */ -#define PCI_ERR_COR_STATUS 0x10 /* Correctable Error Status */ -#define PCI_ERR_COR_RCVR 0x00000001 /* Receiver Error Status */ -#define PCI_ERR_COR_BAD_TLP 0x00000040 /* Bad TLP Status */ -#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 0x14 /* Correctable Error Mask */ - /* Same bits as above */ -#define PCI_ERR_CAP 0x18 /* Advanced Error Capabilities & Ctrl*/ +#define PCI_ERR_UNCOR_STATUS 0x04 /* Uncorrectable Error Status */ +#define PCI_ERR_UNC_UND 0x00000001 /* Undefined */ +#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_COMP_ABORT 0x00008000 /* Completer Abort */ +#define PCI_ERR_UNC_UNX_COMP 0x00010000 /* Unexpected Completion */ +#define PCI_ERR_UNC_RX_OVER 0x00020000 /* Receiver Overflow */ +#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 0x08 /* Uncorrectable Error Mask */ + /* Same bits as above */ +#define PCI_ERR_UNCOR_SEVER 0x0c /* Uncorrectable Error Severity */ + /* Same bits as above */ +#define PCI_ERR_COR_STATUS 0x10 /* Correctable Error Status */ +#define PCI_ERR_COR_RCVR 0x00000001 /* Receiver Error Status */ +#define PCI_ERR_COR_BAD_TLP 0x00000040 /* Bad TLP Status */ +#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 0x14 /* Correctable Error Mask */ + /* Same bits as above */ +#define PCI_ERR_CAP 0x18 /* Advanced Error Capabilities & Ctrl*/ #define PCI_ERR_CAP_FEP(x) ((x) & 0x1f) /* First Error Pointer */ -#define PCI_ERR_CAP_ECRC_GENC 0x00000020 /* ECRC Generation Capable */ -#define PCI_ERR_CAP_ECRC_GENE 0x00000040 /* ECRC Generation Enable */ -#define PCI_ERR_CAP_ECRC_CHKC 0x00000080 /* ECRC Check Capable */ -#define PCI_ERR_CAP_ECRC_CHKE 0x00000100 /* ECRC Check Enable */ -#define PCI_ERR_CAP_PREFIX_LOG_PRESENT 0x00000800 /* TLP Prefix Log Present */ -#define PCI_ERR_CAP_TLP_LOG_FLIT 0x00040000 /* TLP was logged in Flit Mode */ -#define PCI_ERR_CAP_TLP_LOG_SIZE \ - 0x00f80000 /* Logged TLP Size (only in Flit mode) */ -#define PCI_ERR_HEADER_LOG 0x1c /* Header Log Register (16 bytes) */ -#define PCI_ERR_ROOT_COMMAND 0x2c /* Root Error Command */ -#define PCI_ERR_ROOT_CMD_COR_EN \ - 0x00000001 /* Correctable Err Reporting Enable */ -#define PCI_ERR_ROOT_CMD_NONFATAL_EN \ - 0x00000002 /* Non-Fatal Err Reporting Enable */ -#define PCI_ERR_ROOT_CMD_FATAL_EN 0x00000004 /* Fatal Err Reporting Enable */ -#define PCI_ERR_ROOT_STATUS 0x30 -#define PCI_ERR_ROOT_COR_RCV 0x00000001 /* ERR_COR Received */ -#define PCI_ERR_ROOT_MULTI_COR_RCV 0x00000002 /* Multiple ERR_COR */ -#define PCI_ERR_ROOT_UNCOR_RCV 0x00000004 /* ERR_FATAL/NONFATAL */ -#define PCI_ERR_ROOT_MULTI_UNCOR_RCV 0x00000008 /* Multiple FATAL/NONFATAL */ -#define PCI_ERR_ROOT_FIRST_FATAL 0x00000010 /* First UNC is Fatal */ -#define PCI_ERR_ROOT_NONFATAL_RCV 0x00000020 /* Non-Fatal Received */ -#define PCI_ERR_ROOT_FATAL_RCV 0x00000040 /* Fatal Received */ -#define PCI_ERR_ROOT_AER_IRQ \ - 0xf8000000 /* Advanced Error Interrupt Message Number */ -#define PCI_ERR_ROOT_ERR_SRC 0x34 /* Error Source Identification */ -#define PCI_ERR_PREFIX_LOG 0x38 /* TLP Prefix LOG Register (up to 16 bytes) */ +#define PCI_ERR_CAP_ECRC_GENC 0x00000020 /* ECRC Generation Capable */ +#define PCI_ERR_CAP_ECRC_GENE 0x00000040 /* ECRC Generation Enable */ +#define PCI_ERR_CAP_ECRC_CHKC 0x00000080 /* ECRC Check Capable */ +#define PCI_ERR_CAP_ECRC_CHKE 0x00000100 /* ECRC Check Enable */ +#define PCI_ERR_CAP_PREFIX_LOG_PRESENT 0x00000800 /* TLP Prefix Log Present */ +#define PCI_ERR_CAP_TLP_LOG_FLIT 0x00040000 /* TLP was logged in Flit Mode */ +#define PCI_ERR_CAP_TLP_LOG_SIZE 0x00f80000 /* Logged TLP Size (only in Flit mode) */ +#define PCI_ERR_HEADER_LOG 0x1c /* Header Log Register (16 bytes) */ +#define PCI_ERR_ROOT_COMMAND 0x2c /* Root Error Command */ +#define PCI_ERR_ROOT_CMD_COR_EN 0x00000001 /* Correctable Err Reporting Enable */ +#define PCI_ERR_ROOT_CMD_NONFATAL_EN 0x00000002 /* Non-Fatal Err Reporting Enable */ +#define PCI_ERR_ROOT_CMD_FATAL_EN 0x00000004 /* Fatal Err Reporting Enable */ +#define PCI_ERR_ROOT_STATUS 0x30 +#define PCI_ERR_ROOT_COR_RCV 0x00000001 /* ERR_COR Received */ +#define PCI_ERR_ROOT_MULTI_COR_RCV 0x00000002 /* Multiple ERR_COR */ +#define PCI_ERR_ROOT_UNCOR_RCV 0x00000004 /* ERR_FATAL/NONFATAL */ +#define PCI_ERR_ROOT_MULTI_UNCOR_RCV 0x00000008 /* Multiple FATAL/NONFATAL */ +#define PCI_ERR_ROOT_FIRST_FATAL 0x00000010 /* First UNC is Fatal */ +#define PCI_ERR_ROOT_NONFATAL_RCV 0x00000020 /* Non-Fatal Received */ +#define PCI_ERR_ROOT_FATAL_RCV 0x00000040 /* Fatal Received */ +#define PCI_ERR_ROOT_AER_IRQ 0xf8000000 /* Advanced Error Interrupt Message Number */ +#define PCI_ERR_ROOT_ERR_SRC 0x34 /* Error Source Identification */ +#define PCI_ERR_PREFIX_LOG 0x38 /* TLP Prefix LOG Register (up to 16 bytes) */ /* Virtual Channel */ #define PCI_VC_PORT_CAP1 0x04 @@ -903,7 +885,7 @@ #define PCI_PWR_DATA_TYPE(x) (((x) >> 15) & 7) /* Type */ #define PCI_PWR_DATA_RAIL(x) (((x) >> 18) & 7) /* Power Rail */ #define PCI_PWR_CAP 0x0c /* Capability */ -#define PCI_PWR_CAP_BUDGET(x) ((x) & 1) /* Included in system budget */ +#define PCI_PWR_CAP_BUDGET(x) ((x) & 1) /* Included in system budget */ #define PCI_EXT_CAP_PWR_SIZEOF 0x10 /* Root Complex Event Collector Endpoint Association */ @@ -932,36 +914,36 @@ #define HT_CAPTYPE_HOST 0x20 /* Host/Secondary link configuration */ #define HT_5BIT_CAP_MASK 0xF8 -#define HT_CAPTYPE_IRQ 0x80 /* IRQ Configuration */ -#define HT_CAPTYPE_REMAPPING_40 0xA0 /* 40 bit address remapping */ -#define HT_CAPTYPE_REMAPPING_64 0xA2 /* 64 bit address remapping */ -#define HT_CAPTYPE_UNITID_CLUMP 0x90 /* Unit ID clumping */ -#define HT_CAPTYPE_EXTCONF 0x98 /* Extended Configuration Space Access */ -#define HT_CAPTYPE_MSI_MAPPING 0xA8 /* MSI Mapping Capability */ -#define HT_MSI_FLAGS 0x02 /* Offset to flags */ -#define HT_MSI_FLAGS_ENABLE 0x1 /* Mapping enable */ -#define HT_MSI_FLAGS_FIXED 0x2 /* Fixed mapping only */ +#define HT_CAPTYPE_IRQ 0x80 /* IRQ Configuration */ +#define HT_CAPTYPE_REMAPPING_40 0xA0 /* 40 bit address remapping */ +#define HT_CAPTYPE_REMAPPING_64 0xA2 /* 64 bit address remapping */ +#define HT_CAPTYPE_UNITID_CLUMP 0x90 /* Unit ID clumping */ +#define HT_CAPTYPE_EXTCONF 0x98 /* Extended Configuration Space Access */ +#define HT_CAPTYPE_MSI_MAPPING 0xA8 /* MSI Mapping Capability */ +#define HT_MSI_FLAGS 0x02 /* Offset to flags */ +#define HT_MSI_FLAGS_ENABLE 0x1 /* Mapping enable */ +#define HT_MSI_FLAGS_FIXED 0x2 /* Fixed mapping only */ #define HT_MSI_FIXED_ADDR 0x00000000FEE00000ULL /* Fixed addr */ -#define HT_MSI_ADDR_LO 0x04 /* Offset to low addr bits */ -#define HT_MSI_ADDR_LO_MASK 0xFFF00000 /* Low address bit mask */ -#define HT_MSI_ADDR_HI 0x08 /* Offset to high addr bits */ -#define HT_CAPTYPE_DIRECT_ROUTE 0xB0 /* Direct routing configuration */ -#define HT_CAPTYPE_VCSET 0xB8 /* Virtual Channel configuration */ -#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 power management configuration */ -#define HT_CAP_SIZEOF_LONG 28 /* slave & primary */ -#define HT_CAP_SIZEOF_SHORT 24 /* host & secondary */ +#define HT_MSI_ADDR_LO 0x04 /* Offset to low addr bits */ +#define HT_MSI_ADDR_LO_MASK 0xFFF00000 /* Low address bit mask */ +#define HT_MSI_ADDR_HI 0x08 /* Offset to high addr bits */ +#define HT_CAPTYPE_DIRECT_ROUTE 0xB0 /* Direct routing configuration */ +#define HT_CAPTYPE_VCSET 0xB8 /* Virtual Channel configuration */ +#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 power management 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_CAP_MFVC 0x0001 /* MFVC Function Groups Capability */ -#define PCI_ARI_CAP_ACS 0x0002 /* ACS Function Groups Capability */ +#define PCI_ARI_CAP 0x04 /* ARI Capability Register */ +#define PCI_ARI_CAP_MFVC 0x0001 /* MFVC Function Groups Capability */ +#define PCI_ARI_CAP_ACS 0x0002 /* ACS Function Groups Capability */ #define PCI_ARI_CAP_NFN(x) (((x) >> 8) & 0xff) /* Next Function Number */ #define PCI_ARI_CTRL 0x06 /* ARI Control 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_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 */ @@ -1022,13 +1004,13 @@ #define PCI_SRIOV_SYS_PGSIZE 0x20 /* System Page Size */ #define PCI_SRIOV_BAR 0x24 /* VF BAR0 */ #define PCI_SRIOV_NUM_BARS 6 /* Number of VF BARs */ -#define PCI_SRIOV_VFM 0x3c /* VF Migration State Array Offset*/ -#define PCI_SRIOV_VFM_BIR(x) ((x) & 7) /* State BIR */ -#define PCI_SRIOV_VFM_OFFSET(x) ((x) & ~7) /* State Offset */ -#define PCI_SRIOV_VFM_UA 0x0 /* Inactive.Unavailable */ -#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_SRIOV_VFM 0x3c /* VF Migration State Array Offset*/ +#define PCI_SRIOV_VFM_BIR(x) ((x) & 7) /* State BIR */ +#define PCI_SRIOV_VFM_OFFSET(x) ((x) & ~7) /* State Offset */ +#define PCI_SRIOV_VFM_UA 0x0 /* Inactive.Unavailable */ +#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 0x40 #define PCI_LTR_MAX_SNOOP_LAT 0x4 @@ -1102,42 +1084,36 @@ #define PCI_TPH_CTRL_REQ_EN_MASK 0x00000300 /* TPH Requester Enable */ #define PCI_TPH_REQ_DISABLE 0x0 /* No TPH requests allowed */ #define PCI_TPH_REQ_TPH_ONLY 0x1 /* TPH only requests allowed */ -#define PCI_TPH_REQ_EXT_TPH 0x3 /* Extended TPH requests allowed */ +#define PCI_TPH_REQ_EXT_TPH 0x3 /* Extended TPH requests allowed */ /* Downstream Port Containment */ -#define PCI_EXP_DPC_CAP 0x04 /* DPC Capability */ -#define PCI_EXP_DPC_IRQ 0x001F /* Interrupt Message Number */ -#define PCI_EXP_DPC_CAP_RP_EXT 0x0020 /* Root Port Extensions */ -#define PCI_EXP_DPC_CAP_POISONED_TLP \ - 0x0040 /* Poisoned TLP Egress Blocking Supported */ -#define PCI_EXP_DPC_CAP_SW_TRIGGER 0x0080 /* Software Triggering Supported */ -#define PCI_EXP_DPC_RP_PIO_LOG_SIZE 0x0F00 /* RP PIO Log Size [3:0] */ -#define PCI_EXP_DPC_CAP_DL_ACTIVE \ - 0x1000 /* ERR_COR signal on DL_Active supported */ +#define PCI_EXP_DPC_CAP 0x04 /* DPC Capability */ +#define PCI_EXP_DPC_IRQ 0x001F /* Interrupt Message Number */ +#define PCI_EXP_DPC_CAP_RP_EXT 0x0020 /* Root Port Extensions */ +#define PCI_EXP_DPC_CAP_POISONED_TLP 0x0040 /* Poisoned TLP Egress Blocking Supported */ +#define PCI_EXP_DPC_CAP_SW_TRIGGER 0x0080 /* Software Triggering Supported */ +#define PCI_EXP_DPC_RP_PIO_LOG_SIZE 0x0F00 /* RP PIO Log Size [3:0] */ +#define PCI_EXP_DPC_CAP_DL_ACTIVE 0x1000 /* ERR_COR signal on DL_Active supported */ #define PCI_EXP_DPC_RP_PIO_LOG_SIZE4 0x2000 /* RP PIO Log Size [4] */ -#define PCI_EXP_DPC_CTL 0x06 /* DPC control */ -#define PCI_EXP_DPC_CTL_EN_FATAL \ - 0x0001 /* Enable trigger on ERR_FATAL message */ -#define PCI_EXP_DPC_CTL_EN_NONFATAL \ - 0x0002 /* Enable trigger on ERR_NONFATAL message */ -#define PCI_EXP_DPC_CTL_INT_EN 0x0008 /* DPC Interrupt Enable */ - -#define PCI_EXP_DPC_STATUS 0x08 /* DPC Status */ -#define PCI_EXP_DPC_STATUS_TRIGGER 0x0001 /* Trigger Status */ -#define PCI_EXP_DPC_STATUS_TRIGGER_RSN 0x0006 /* Trigger Reason */ -#define PCI_EXP_DPC_STATUS_TRIGGER_RSN_UNCOR 0x0000 /* Uncorrectable error */ -#define PCI_EXP_DPC_STATUS_TRIGGER_RSN_NFE 0x0002 /* Rcvd ERR_NONFATAL */ -#define PCI_EXP_DPC_STATUS_TRIGGER_RSN_FE 0x0004 /* Rcvd ERR_FATAL */ -#define PCI_EXP_DPC_STATUS_TRIGGER_RSN_IN_EXT \ - 0x0006 /* Reason in Trig Reason Extension field */ -#define PCI_EXP_DPC_STATUS_INTERRUPT 0x0008 /* Interrupt Status */ -#define PCI_EXP_DPC_RP_BUSY 0x0010 /* Root Port Busy */ -#define PCI_EXP_DPC_STATUS_TRIGGER_RSN_EXT 0x0060 /* Trig Reason Extension */ -#define PCI_EXP_DPC_STATUS_TRIGGER_RSN_RP_PIO 0x0000 /* RP PIO error */ -#define PCI_EXP_DPC_STATUS_TRIGGER_RSN_SW_TRIGGER \ - 0x0020 /* DPC SW Trigger bit */ -#define PCI_EXP_DPC_RP_PIO_FEP 0x1f00 /* RP PIO First Err Ptr */ +#define PCI_EXP_DPC_CTL 0x06 /* DPC control */ +#define PCI_EXP_DPC_CTL_EN_FATAL 0x0001 /* Enable trigger on ERR_FATAL message */ +#define PCI_EXP_DPC_CTL_EN_NONFATAL 0x0002 /* Enable trigger on ERR_NONFATAL message */ +#define PCI_EXP_DPC_CTL_INT_EN 0x0008 /* DPC Interrupt Enable */ + +#define PCI_EXP_DPC_STATUS 0x08 /* DPC Status */ +#define PCI_EXP_DPC_STATUS_TRIGGER 0x0001 /* Trigger Status */ +#define PCI_EXP_DPC_STATUS_TRIGGER_RSN 0x0006 /* Trigger Reason */ +#define PCI_EXP_DPC_STATUS_TRIGGER_RSN_UNCOR 0x0000 /* Uncorrectable error */ +#define PCI_EXP_DPC_STATUS_TRIGGER_RSN_NFE 0x0002 /* Rcvd ERR_NONFATAL */ +#define PCI_EXP_DPC_STATUS_TRIGGER_RSN_FE 0x0004 /* Rcvd ERR_FATAL */ +#define PCI_EXP_DPC_STATUS_TRIGGER_RSN_IN_EXT 0x0006 /* Reason in Trig Reason Extension field */ +#define PCI_EXP_DPC_STATUS_INTERRUPT 0x0008 /* Interrupt Status */ +#define PCI_EXP_DPC_RP_BUSY 0x0010 /* Root Port Busy */ +#define PCI_EXP_DPC_STATUS_TRIGGER_RSN_EXT 0x0060 /* Trig Reason Extension */ +#define PCI_EXP_DPC_STATUS_TRIGGER_RSN_RP_PIO 0x0000 /* RP PIO error */ +#define PCI_EXP_DPC_STATUS_TRIGGER_RSN_SW_TRIGGER 0x0020 /* DPC SW Trigger bit */ +#define PCI_EXP_DPC_RP_PIO_FEP 0x1f00 /* RP PIO First Err Ptr */ #define PCI_EXP_DPC_SOURCE_ID 0x0A /* DPC Source Identifier */ @@ -1161,23 +1137,22 @@ #define PCI_PTM_CTRL_ROOT 0x00000002 /* Root select */ /* ASPM L1 PM Substates */ -#define PCI_L1SS_CAP 0x04 /* Capabilities Register */ -#define PCI_L1SS_CAP_PCIPM_L1_2 0x00000001 /* PCI-PM L1.2 Supported */ -#define PCI_L1SS_CAP_PCIPM_L1_1 0x00000002 /* PCI-PM L1.1 Supported */ -#define PCI_L1SS_CAP_ASPM_L1_2 0x00000004 /* ASPM L1.2 Supported */ -#define PCI_L1SS_CAP_ASPM_L1_1 0x00000008 /* ASPM L1.1 Supported */ -#define PCI_L1SS_CAP_L1_PM_SS 0x00000010 /* L1 PM Substates Supported */ -#define PCI_L1SS_CAP_CM_RESTORE_TIME \ - 0x0000ff00 /* Port Common_Mode_Restore_Time */ -#define PCI_L1SS_CAP_P_PWR_ON_SCALE 0x00030000 /* Port T_POWER_ON scale */ -#define PCI_L1SS_CAP_P_PWR_ON_VALUE 0x00f80000 /* Port T_POWER_ON value */ -#define PCI_L1SS_CTL1 0x08 /* Control 1 Register */ -#define PCI_L1SS_CTL1_PCIPM_L1_2 0x00000001 /* PCI-PM L1.2 Enable */ -#define PCI_L1SS_CTL1_PCIPM_L1_1 0x00000002 /* PCI-PM L1.1 Enable */ -#define PCI_L1SS_CTL1_ASPM_L1_2 0x00000004 /* ASPM L1.2 Enable */ -#define PCI_L1SS_CTL1_ASPM_L1_1 0x00000008 /* ASPM L1.1 Enable */ -#define PCI_L1SS_CTL1_L1_2_MASK 0x00000005 -#define PCI_L1SS_CTL1_L1SS_MASK 0x0000000f +#define PCI_L1SS_CAP 0x04 /* Capabilities Register */ +#define PCI_L1SS_CAP_PCIPM_L1_2 0x00000001 /* PCI-PM L1.2 Supported */ +#define PCI_L1SS_CAP_PCIPM_L1_1 0x00000002 /* PCI-PM L1.1 Supported */ +#define PCI_L1SS_CAP_ASPM_L1_2 0x00000004 /* ASPM L1.2 Supported */ +#define PCI_L1SS_CAP_ASPM_L1_1 0x00000008 /* ASPM L1.1 Supported */ +#define PCI_L1SS_CAP_L1_PM_SS 0x00000010 /* L1 PM Substates Supported */ +#define PCI_L1SS_CAP_CM_RESTORE_TIME 0x0000ff00 /* Port Common_Mode_Restore_Time */ +#define PCI_L1SS_CAP_P_PWR_ON_SCALE 0x00030000 /* Port T_POWER_ON scale */ +#define PCI_L1SS_CAP_P_PWR_ON_VALUE 0x00f80000 /* Port T_POWER_ON value */ +#define PCI_L1SS_CTL1 0x08 /* Control 1 Register */ +#define PCI_L1SS_CTL1_PCIPM_L1_2 0x00000001 /* PCI-PM L1.2 Enable */ +#define PCI_L1SS_CTL1_PCIPM_L1_1 0x00000002 /* PCI-PM L1.1 Enable */ +#define PCI_L1SS_CTL1_ASPM_L1_2 0x00000004 /* ASPM L1.2 Enable */ +#define PCI_L1SS_CTL1_ASPM_L1_1 0x00000008 /* ASPM L1.1 Enable */ +#define PCI_L1SS_CTL1_L1_2_MASK 0x00000005 +#define PCI_L1SS_CTL1_L1SS_MASK 0x0000000f #define PCI_L1SS_CTL1_CM_RESTORE_TIME \ 0x0000ff00 /* Common_Mode_Restore_Time \ */ @@ -1208,9 +1183,8 @@ #define PCI_VF_REBAR_CTRL_BAR_SIZE PCI_REBAR_CTRL_BAR_SIZE /* Data Link Feature */ -#define PCI_DLF_CAP 0x04 /* Capabilities Register */ -#define PCI_DLF_EXCHANGE_ENABLE \ - 0x80000000 /* Data Link Feature Exchange Enable */ +#define PCI_DLF_CAP 0x04 /* Capabilities Register */ +#define PCI_DLF_EXCHANGE_ENABLE 0x80000000 /* Data Link Feature Exchange Enable */ /* Secondary PCIe Capability 8.0 GT/s */ #define PCI_SECPCI_LE_CTRL 0x0c /* Lane Equalization Control Register */ @@ -1262,7 +1236,7 @@ #define PCI_NPEM_STATUS_CC 0x00000001 /* Command Completed */ /* Data Object Exchange */ -#define PCI_DOE_CAP 0x04 /* DOE Capabilities Register */ +#define PCI_DOE_CAP 0x04 /* DOE Capabilities Register */ #define PCI_DOE_CAP_INT_SUP 0x00000001 /* Interrupt Support */ #define PCI_DOE_CAP_INT_MSG_NUM 0x00000ffe /* Interrupt Message Number */ #define PCI_DOE_CTRL 0x08 /* DOE Control Register */ @@ -1274,9 +1248,9 @@ #define PCI_DOE_STATUS_INT_STATUS 0x00000002 /* DOE Interrupt Status */ #define PCI_DOE_STATUS_ERROR 0x00000004 /* DOE Error */ #define PCI_DOE_STATUS_DATA_OBJECT_READY 0x80000000 /* Data Object Ready */ -#define PCI_DOE_WRITE 0x10 /* DOE Write Data Mailbox Register */ -#define PCI_DOE_READ 0x14 /* DOE Read Data Mailbox Register */ -#define PCI_DOE_CAP_SIZEOF 0x18 /* Size of DOE register block */ +#define PCI_DOE_WRITE 0x10 /* DOE Write Data Mailbox Register */ +#define PCI_DOE_READ 0x14 /* DOE Read Data Mailbox Register */ +#define PCI_DOE_CAP_SIZEOF 0x18 /* Size of DOE register block */ /* DOE Data Object - note not actually registers */ #define PCI_DOE_DATA_OBJECT_HEADER_1_VID 0x0000ffff @@ -1290,8 +1264,7 @@ #define PCI_DOE_DATA_OBJECT_DISC_RSP_3_NEXT_INDEX 0xff000000 /* Deprecated old name, replaced with PCI_DOE_DATA_OBJECT_DISC_RSP_3_TYPE */ -#define PCI_DOE_DATA_OBJECT_DISC_RSP_3_PROTOCOL \ - PCI_DOE_DATA_OBJECT_DISC_RSP_3_TYPE +#define PCI_DOE_DATA_OBJECT_DISC_RSP_3_PROTOCOL PCI_DOE_DATA_OBJECT_DISC_RSP_3_TYPE /* Compute Express Link (CXL r3.1, sec 8.1.5) */ #define PCI_DVSEC_CXL_PORT 3 diff --git a/include/arch/x86_64/linux/perf_event.h b/include/arch/x86_64/linux/perf_event.h index 8711e65f..afd7797b 100644 --- a/include/arch/x86_64/linux/perf_event.h +++ b/include/arch/x86_64/linux/perf_event.h @@ -222,16 +222,14 @@ enum perf_branch_sample_type { PERF_SAMPLE_BRANCH_ANY = 1U << PERF_SAMPLE_BRANCH_ANY_SHIFT, PERF_SAMPLE_BRANCH_ANY_CALL = 1U << PERF_SAMPLE_BRANCH_ANY_CALL_SHIFT, - PERF_SAMPLE_BRANCH_ANY_RETURN = 1U - << PERF_SAMPLE_BRANCH_ANY_RETURN_SHIFT, + PERF_SAMPLE_BRANCH_ANY_RETURN = 1U << PERF_SAMPLE_BRANCH_ANY_RETURN_SHIFT, PERF_SAMPLE_BRANCH_IND_CALL = 1U << PERF_SAMPLE_BRANCH_IND_CALL_SHIFT, PERF_SAMPLE_BRANCH_ABORT_TX = 1U << PERF_SAMPLE_BRANCH_ABORT_TX_SHIFT, PERF_SAMPLE_BRANCH_IN_TX = 1U << PERF_SAMPLE_BRANCH_IN_TX_SHIFT, PERF_SAMPLE_BRANCH_NO_TX = 1U << PERF_SAMPLE_BRANCH_NO_TX_SHIFT, PERF_SAMPLE_BRANCH_COND = 1U << PERF_SAMPLE_BRANCH_COND_SHIFT, - PERF_SAMPLE_BRANCH_CALL_STACK = 1U - << PERF_SAMPLE_BRANCH_CALL_STACK_SHIFT, + PERF_SAMPLE_BRANCH_CALL_STACK = 1U << PERF_SAMPLE_BRANCH_CALL_STACK_SHIFT, PERF_SAMPLE_BRANCH_IND_JUMP = 1U << PERF_SAMPLE_BRANCH_IND_JUMP_SHIFT, PERF_SAMPLE_BRANCH_CALL = 1U << PERF_SAMPLE_BRANCH_CALL_SHIFT, @@ -309,9 +307,7 @@ enum { #define PERF_BR_ARM64_DEBUG_INST PERF_BR_NEW_ARCH_4 #define PERF_BR_ARM64_DEBUG_DATA PERF_BR_NEW_ARCH_5 -#define PERF_SAMPLE_BRANCH_PLM_ALL \ - (PERF_SAMPLE_BRANCH_USER | PERF_SAMPLE_BRANCH_KERNEL | \ - PERF_SAMPLE_BRANCH_HV) +#define PERF_SAMPLE_BRANCH_PLM_ALL (PERF_SAMPLE_BRANCH_USER | PERF_SAMPLE_BRANCH_KERNEL | PERF_SAMPLE_BRANCH_HV) /* * Values to determine ABI of the registers dump. @@ -376,8 +372,7 @@ enum perf_event_read_format { PERF_FORMAT_MAX = 1U << 5, /* non-ABI */ }; -#define PERF_ATTR_SIZE_VER0 \ - 64 /* Size of first published 'struct perf_event_attr' */ +#define PERF_ATTR_SIZE_VER0 64 /* Size of first published 'struct perf_event_attr' */ #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 */ @@ -452,23 +447,23 @@ struct perf_event_attr { exclude_callchain_kernel : 1, /* exclude kernel callchains */ exclude_callchain_user : 1, /* exclude user callchains */ - mmap2 : 1, /* include mmap with inode data */ - comm_exec : 1, /* flag comm events that are due to an exec */ - use_clockid : 1, /* use @clockid for time fields */ - context_switch : 1, /* context switch data */ - write_backward : 1, /* write ring buffer from end to beginning - */ - namespaces : 1, /* include namespaces data */ - ksymbol : 1, /* include ksymbol events */ - bpf_event : 1, /* include BPF events */ - aux_output : 1, /* generate AUX records instead of events */ - cgroup : 1, /* include cgroup events */ - text_poke : 1, /* include text poke events */ - build_id : 1, /* use build ID in mmap2 events */ - inherit_thread : 1, /* children only inherit if cloned with - CLONE_THREAD */ - remove_on_exec : 1, /* event is removed from task on exec */ - sigtrap : 1, /* send synchronous SIGTRAP on event */ + mmap2 : 1, /* include mmap with inode data */ + comm_exec : 1, /* flag comm events that are due to an exec */ + use_clockid : 1, /* use @clockid for time fields */ + context_switch : 1, /* context switch data */ + write_backward : 1, /* write ring buffer from end to beginning + */ + namespaces : 1, /* include namespaces data */ + ksymbol : 1, /* include ksymbol events */ + bpf_event : 1, /* include BPF events */ + aux_output : 1, /* generate AUX records instead of events */ + cgroup : 1, /* include cgroup events */ + text_poke : 1, /* include text poke events */ + build_id : 1, /* use build ID in mmap2 events */ + inherit_thread : 1, /* children only inherit if cloned with + CLONE_THREAD */ + remove_on_exec : 1, /* event is removed from task on exec */ + sigtrap : 1, /* send synchronous SIGTRAP on event */ __reserved_1 : 26; union { @@ -535,10 +530,10 @@ struct perf_event_attr { struct { __u32 aux_start_paused : 1, /* start AUX area tracing paused */ - aux_pause : 1, /* on overflow, pause AUX area - tracing */ - aux_resume : 1, /* on overflow, resume AUX area - tracing */ + aux_pause : 1, /* on overflow, pause AUX area + tracing */ + aux_resume : 1, /* on overflow, resume AUX area + tracing */ __reserved_3 : 29; }; }; @@ -645,17 +640,17 @@ struct perf_event_mmap_page { union { __u64 capabilities; struct { - __u64 cap_bit0 : 1, /* Always 0, deprecated, see commit - 860f085b74e9 */ + __u64 cap_bit0 : 1, /* Always 0, deprecated, see commit + 860f085b74e9 */ cap_bit0_is_deprecated : 1, /* Always 1, signals that bit 0 is zero */ - cap_user_rdpmc : 1, /* The RDPMC instruction can - be used to read counts */ - cap_user_time : 1, /* The - time_{shift,mult,offset} - fields are used */ + cap_user_rdpmc : 1, /* The RDPMC instruction can + be used to read counts */ + cap_user_time : 1, /* The + time_{shift,mult,offset} + fields are used */ cap_user_time_zero : 1, /* The time_zero field is used */ cap_user_time_short : 1, /* the @@ -1299,16 +1294,14 @@ enum perf_callchain_context { /** * PERF_RECORD_AUX::flags bits */ -#define PERF_AUX_FLAG_TRUNCATED 0x0001 /* Record was truncated to fit */ -#define PERF_AUX_FLAG_OVERWRITE 0x0002 /* Snapshot from overwrite mode */ -#define PERF_AUX_FLAG_PARTIAL 0x0004 /* Record contains gaps */ -#define PERF_AUX_FLAG_COLLISION 0x0008 /* Sample collided with another */ -#define PERF_AUX_FLAG_PMU_FORMAT_TYPE_MASK \ - 0xff00 /* PMU specific trace format type */ +#define PERF_AUX_FLAG_TRUNCATED 0x0001 /* Record was truncated to fit */ +#define PERF_AUX_FLAG_OVERWRITE 0x0002 /* Snapshot from overwrite mode */ +#define PERF_AUX_FLAG_PARTIAL 0x0004 /* Record contains gaps */ +#define PERF_AUX_FLAG_COLLISION 0x0008 /* Sample collided with another */ +#define PERF_AUX_FLAG_PMU_FORMAT_TYPE_MASK 0xff00 /* PMU specific trace format type */ /* CoreSight PMU AUX buffer formats */ -#define PERF_AUX_FLAG_CORESIGHT_FORMAT_CORESIGHT \ - 0x0000 /* Default for backward compatibility */ +#define PERF_AUX_FLAG_CORESIGHT_FORMAT_CORESIGHT 0x0000 /* Default for backward compatibility */ #define PERF_AUX_FLAG_CORESIGHT_FORMAT_RAW \ 0x0100 /* Raw format of the source \ */ @@ -1343,12 +1336,12 @@ union perf_mem_data_src { mem_blk : 3, /* Access blocked */ mem_snoopx : 2, /* Snoop mode, ext */ mem_remote : 1, /* Remote */ - mem_lvl_num : 4, /* Memory hierarchy level number */ - mem_dtlb : 7, /* TLB access */ - mem_lock : 2, /* Lock instr */ - mem_snoop : 5, /* Snoop mode */ - mem_lvl : 14, /* Memory hierarchy level */ - mem_op : 5; /* Type of opcode */ + mem_lvl_num : 4, /* Memory hierarchy level number */ + mem_dtlb : 7, /* TLB access */ + mem_lock : 2, /* Lock instr */ + mem_snoop : 5, /* Snoop mode */ + mem_lvl : 14, /* Memory hierarchy level */ + mem_op : 5; /* Type of opcode */ }; }; #else diff --git a/include/arch/x86_64/linux/personality.h b/include/arch/x86_64/linux/personality.h index 025d72d8..8a64f81b 100644 --- a/include/arch/x86_64/linux/personality.h +++ b/include/arch/x86_64/linux/personality.h @@ -27,9 +27,7 @@ enum { * Security-relevant compatibility flags that must be * cleared upon setuid or setgid exec: */ -#define PER_CLEAR_ON_SETID \ - (READ_IMPLIES_EXEC | ADDR_NO_RANDOMIZE | ADDR_COMPAT_LAYOUT | \ - MMAP_PAGE_ZERO) +#define PER_CLEAR_ON_SETID (READ_IMPLIES_EXEC | ADDR_NO_RANDOMIZE | ADDR_COMPAT_LAYOUT | MMAP_PAGE_ZERO) /* * Personality types. diff --git a/include/arch/x86_64/linux/pfrut.h b/include/arch/x86_64/linux/pfrut.h index f8491b40..91655f36 100644 --- a/include/arch/x86_64/linux/pfrut.h +++ b/include/arch/x86_64/linux/pfrut.h @@ -69,8 +69,7 @@ * Retrieve information on the Platform Firmware Runtime Update capability. * The information is a struct pfru_update_cap_info. */ -#define PFRU_IOC_QUERY_CAP \ - _IOR(PFRUT_IOCTL_MAGIC, 0x05, struct pfru_update_cap_info) +#define PFRU_IOC_QUERY_CAP _IOR(PFRUT_IOCTL_MAGIC, 0x05, struct pfru_update_cap_info) /** * struct pfru_payload_hdr - Capsule file payload header. @@ -233,8 +232,7 @@ struct pfrt_log_info { * Set the PFRT log level and log type. The input information is * a struct pfrt_log_info. */ -#define PFRT_LOG_IOC_SET_INFO \ - _IOW(PFRUT_IOCTL_MAGIC, 0x06, struct pfrt_log_info) +#define PFRT_LOG_IOC_SET_INFO _IOW(PFRUT_IOCTL_MAGIC, 0x06, struct pfrt_log_info) /** * PFRT_LOG_IOC_GET_INFO - _IOR(PFRUT_IOCTL_MAGIC, 0x07, @@ -248,8 +246,7 @@ struct pfrt_log_info { * Retrieve log level and log type of the telemetry. The information is * a struct pfrt_log_info. */ -#define PFRT_LOG_IOC_GET_INFO \ - _IOR(PFRUT_IOCTL_MAGIC, 0x07, struct pfrt_log_info) +#define PFRT_LOG_IOC_GET_INFO _IOR(PFRUT_IOCTL_MAGIC, 0x07, struct pfrt_log_info) /** * PFRT_LOG_IOC_GET_DATA_INFO - _IOR(PFRUT_IOCTL_MAGIC, 0x08, @@ -263,7 +260,6 @@ struct pfrt_log_info { * Retrieve data information about the telemetry. The information * is a struct pfrt_log_data_info. */ -#define PFRT_LOG_IOC_GET_DATA_INFO \ - _IOR(PFRUT_IOCTL_MAGIC, 0x08, struct pfrt_log_data_info) +#define PFRT_LOG_IOC_GET_DATA_INFO _IOR(PFRUT_IOCTL_MAGIC, 0x08, struct pfrt_log_data_info) #endif /* __PFRUT_H__ */ diff --git a/include/arch/x86_64/linux/phonet.h b/include/arch/x86_64/linux/phonet.h index 08be79c4..c524b300 100644 --- a/include/arch/x86_64/linux/phonet.h +++ b/include/arch/x86_64/linux/phonet.h @@ -104,8 +104,7 @@ struct sockaddr_pn { __u8 spn_obj; __u8 spn_dev; __u8 spn_resource; - __u8 spn_zero[sizeof(struct sockaddr) - sizeof(__kernel_sa_family_t) - - 3]; + __u8 spn_zero[sizeof(struct sockaddr) - sizeof(__kernel_sa_family_t) - 3]; } __attribute__((packed)); /* Well known address */ @@ -149,15 +148,13 @@ static __inline__ void pn_sockaddr_set_port(struct sockaddr_pn *spn, __u16 port) spn->spn_obj = port & 0xff; } -static __inline__ void pn_sockaddr_set_object(struct sockaddr_pn *spn, - __u16 handle) +static __inline__ void pn_sockaddr_set_object(struct sockaddr_pn *spn, __u16 handle) { spn->spn_dev = pn_dev(handle); spn->spn_obj = pn_obj(handle); } -static __inline__ void pn_sockaddr_set_resource(struct sockaddr_pn *spn, - __u8 resource) +static __inline__ void pn_sockaddr_set_resource(struct sockaddr_pn *spn, __u8 resource) { spn->spn_resource = resource; } diff --git a/include/arch/x86_64/linux/pidfd.h b/include/arch/x86_64/linux/pidfd.h index 0f91b663..386f9bcd 100644 --- a/include/arch/x86_64/linux/pidfd.h +++ b/include/arch/x86_64/linux/pidfd.h @@ -18,11 +18,10 @@ /* Flags for pidfd_info. */ #define PIDFD_INFO_PID (1UL << 0) /* Always returned, even if not requested */ -#define PIDFD_INFO_CREDS \ - (1UL << 1) /* Always returned, even if not requested \ - */ -#define PIDFD_INFO_CGROUPID \ - (1UL << 2) /* Always returned if available, even if not requested */ +#define PIDFD_INFO_CREDS \ + (1UL << 1) /* Always returned, even if not requested \ + */ +#define PIDFD_INFO_CGROUPID (1UL << 2) /* Always returned if available, even if not requested */ #define PIDFD_INFO_EXIT (1UL << 3) /* Only returned if requested. */ #define PIDFD_INFO_COREDUMP (1UL << 4) /* Only returned if requested. */ diff --git a/include/arch/x86_64/linux/pkt_cls.h b/include/arch/x86_64/linux/pkt_cls.h index 900a3d8d..c9c71a43 100644 --- a/include/arch/x86_64/linux/pkt_cls.h +++ b/include/arch/x86_64/linux/pkt_cls.h @@ -251,8 +251,8 @@ struct tc_u32_key { struct tc_u32_sel { /* New members MUST be added within the __struct_group() macro below. */ - __struct_group(tc_u32_sel_hdr, hdr, /* no attrs */, unsigned char flags; - unsigned char offshift; unsigned char nkeys; + __struct_group(tc_u32_sel_hdr, hdr, /* no attrs */, unsigned char flags; unsigned char offshift; + unsigned char nkeys; __be16 offmask; __u16 off; short offoff; @@ -562,16 +562,16 @@ enum { #define TCA_FLOWER_MAX (__TCA_FLOWER_MAX - 1) enum { - TCA_FLOWER_KEY_CT_FLAGS_NEW = 1 << 0, /* Beginning of a new connection. - */ + TCA_FLOWER_KEY_CT_FLAGS_NEW = 1 << 0, /* Beginning of a new connection. + */ TCA_FLOWER_KEY_CT_FLAGS_ESTABLISHED = 1 << 1, /* Part of an existing connection. */ - TCA_FLOWER_KEY_CT_FLAGS_RELATED = 1 << 2, /* Related to an established - connection. */ - TCA_FLOWER_KEY_CT_FLAGS_TRACKED = 1 << 3, /* Conntrack has occurred. */ - TCA_FLOWER_KEY_CT_FLAGS_INVALID = 1 << 4, /* Conntrack is invalid. */ - TCA_FLOWER_KEY_CT_FLAGS_REPLY = 1 << 5, /* Packet is in the reply - direction. */ + TCA_FLOWER_KEY_CT_FLAGS_RELATED = 1 << 2, /* Related to an established + connection. */ + TCA_FLOWER_KEY_CT_FLAGS_TRACKED = 1 << 3, /* Conntrack has occurred. */ + TCA_FLOWER_KEY_CT_FLAGS_INVALID = 1 << 4, /* Conntrack is invalid. */ + TCA_FLOWER_KEY_CT_FLAGS_REPLY = 1 << 5, /* Packet is in the reply + direction. */ __TCA_FLOWER_KEY_CT_FLAGS_MAX, }; @@ -611,8 +611,7 @@ enum { __TCA_FLOWER_KEY_ENC_OPT_GENEVE_MAX, }; -#define TCA_FLOWER_KEY_ENC_OPT_GENEVE_MAX \ - (__TCA_FLOWER_KEY_ENC_OPT_GENEVE_MAX - 1) +#define TCA_FLOWER_KEY_ENC_OPT_GENEVE_MAX (__TCA_FLOWER_KEY_ENC_OPT_GENEVE_MAX - 1) enum { TCA_FLOWER_KEY_ENC_OPT_VXLAN_UNSPEC, @@ -620,8 +619,7 @@ enum { __TCA_FLOWER_KEY_ENC_OPT_VXLAN_MAX, }; -#define TCA_FLOWER_KEY_ENC_OPT_VXLAN_MAX \ - (__TCA_FLOWER_KEY_ENC_OPT_VXLAN_MAX - 1) +#define TCA_FLOWER_KEY_ENC_OPT_VXLAN_MAX (__TCA_FLOWER_KEY_ENC_OPT_VXLAN_MAX - 1) enum { TCA_FLOWER_KEY_ENC_OPT_ERSPAN_UNSPEC, @@ -632,8 +630,7 @@ enum { __TCA_FLOWER_KEY_ENC_OPT_ERSPAN_MAX, }; -#define TCA_FLOWER_KEY_ENC_OPT_ERSPAN_MAX \ - (__TCA_FLOWER_KEY_ENC_OPT_ERSPAN_MAX - 1) +#define TCA_FLOWER_KEY_ENC_OPT_ERSPAN_MAX (__TCA_FLOWER_KEY_ENC_OPT_ERSPAN_MAX - 1) enum { TCA_FLOWER_KEY_ENC_OPT_GTP_UNSPEC, @@ -723,12 +720,7 @@ struct tcf_ematch_tree_hdr { __u16 progid; }; -enum { - TCA_EMATCH_TREE_UNSPEC, - TCA_EMATCH_TREE_HDR, - TCA_EMATCH_TREE_LIST, - __TCA_EMATCH_TREE_MAX -}; +enum { TCA_EMATCH_TREE_UNSPEC, TCA_EMATCH_TREE_HDR, TCA_EMATCH_TREE_LIST, __TCA_EMATCH_TREE_MAX }; #define TCA_EMATCH_TREE_MAX (__TCA_EMATCH_TREE_MAX - 1) struct tcf_ematch_hdr { @@ -761,12 +753,7 @@ struct tcf_ematch_hdr { #define TCF_EM_REL_MASK 3 #define TCF_EM_REL_VALID(v) (((v) & TCF_EM_REL_MASK) != TCF_EM_REL_MASK) -enum { - TCF_LAYER_LINK, - TCF_LAYER_NETWORK, - TCF_LAYER_TRANSPORT, - __TCF_LAYER_MAX -}; +enum { TCF_LAYER_LINK, TCF_LAYER_NETWORK, TCF_LAYER_TRANSPORT, __TCF_LAYER_MAX }; #define TCF_LAYER_MAX (__TCF_LAYER_MAX - 1) /* Ematch type assignments diff --git a/include/arch/x86_64/linux/pkt_sched.h b/include/arch/x86_64/linux/pkt_sched.h index b2cae69c..dfae4c2c 100644 --- a/include/arch/x86_64/linux/pkt_sched.h +++ b/include/arch/x86_64/linux/pkt_sched.h @@ -651,14 +651,14 @@ enum { */ struct tc_sfb_qopt { __u32 rehash_interval; /* delay between hash move, in ms */ - __u32 warmup_time; /* double buffering warmup time in ms (warmup_time < - rehash_interval) */ - __u32 max; /* max len of qlen_min */ - __u32 bin_size; /* maximum queue length per bin */ - __u32 increment; /* probability increment, (d1 in Blue) */ - __u32 decrement; /* probability decrement, (d2 in Blue) */ - __u32 limit; /* max SFB queue length */ - __u32 penalty_rate; /* inelastic flows are rate limited to 'rate' pps */ + __u32 warmup_time; /* double buffering warmup time in ms (warmup_time < + rehash_interval) */ + __u32 max; /* max len of qlen_min */ + __u32 bin_size; /* maximum queue length per bin */ + __u32 increment; /* probability increment, (d1 in Blue) */ + __u32 decrement; /* probability decrement, (d2 in Blue) */ + __u32 limit; /* max SFB queue length */ + __u32 penalty_rate; /* inelastic flows are rate limited to 'rate' pps */ __u32 penalty_burst; }; @@ -701,18 +701,18 @@ enum { #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 */ + __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 ? */ - __u32 ce_mark; /* number of CE marked packets because of ce_threshold */ + __u32 ecn_mark; /* number of packets we ECN marked instead of dropped */ + __u32 dropping; /* are we in dropping state ? */ + __u32 ce_mark; /* number of CE marked packets because of ce_threshold */ }; /* FQ_CODEL */ @@ -1153,7 +1153,7 @@ enum { TCA_TAPRIO_ATTR_SCHED_CLOCKID, /* s32 */ TCA_TAPRIO_PAD, TCA_TAPRIO_ATTR_PAD = TCA_TAPRIO_PAD, - TCA_TAPRIO_ATTR_ADMIN_SCHED, /* The admin sched, only used in dump */ + TCA_TAPRIO_ATTR_ADMIN_SCHED, /* The admin sched, only used in dump */ TCA_TAPRIO_ATTR_SCHED_CYCLE_TIME, /* s64 */ TCA_TAPRIO_ATTR_SCHED_CYCLE_TIME_EXTENSION, /* s64 */ TCA_TAPRIO_ATTR_FLAGS, /* u32 */ diff --git a/include/arch/x86_64/linux/pmu.h b/include/arch/x86_64/linux/pmu.h index 9fcb9dbf..6945a5a3 100644 --- a/include/arch/x86_64/linux/pmu.h +++ b/include/arch/x86_64/linux/pmu.h @@ -45,10 +45,9 @@ #define PMU_GET_VERSION 0xea /* read the PMU version */ /* Bits to use with the PMU_POWER_CTRL0 command */ -#define PMU_POW0_ON 0x80 /* OR this to power ON the device */ -#define PMU_POW0_OFF 0x00 /* leave bit 7 to 0 to power it OFF */ -#define PMU_POW0_HARD_DRIVE \ - 0x04 /* Hard drive power (on wallstreet/lombard ?) */ +#define PMU_POW0_ON 0x80 /* OR this to power ON the device */ +#define PMU_POW0_OFF 0x00 /* leave bit 7 to 0 to power it OFF */ +#define PMU_POW0_HARD_DRIVE 0x04 /* Hard drive power (on wallstreet/lombard ?) */ /* Bits to use with the PMU_POWER_CTRL command */ #define PMU_POW_ON 0x80 /* OR this to power ON the device */ diff --git a/include/arch/x86_64/linux/ppp-ioctl.h b/include/arch/x86_64/linux/ppp-ioctl.h index 06d7c1f5..3c145358 100644 --- a/include/arch/x86_64/linux/ppp-ioctl.h +++ b/include/arch/x86_64/linux/ppp-ioctl.h @@ -39,9 +39,8 @@ #define SC_LOG_RAWIN 0x00080000 /* log all chars received */ #define SC_LOG_FLUSH 0x00100000 /* log all chars flushed */ #define SC_SYNC 0x00200000 /* synchronous serial mode */ -#define SC_MUST_COMP \ - 0x00400000 /* no uncompressed packets may be sent or received */ -#define SC_MASK 0x0f600fff /* bits that user can change */ +#define SC_MUST_COMP 0x00400000 /* no uncompressed packets may be sent or received */ +#define SC_MASK 0x0f600fff /* bits that user can change */ /* state bits */ #define SC_XMIT_BUSY 0x10000000 /* (used by isdn_ppp?) */ @@ -107,14 +106,14 @@ struct pppol2tp_ioc_stats { #define PPPIOCGIDLE _IOR('t', 63, struct ppp_idle) /* get idle time */ #define PPPIOCGIDLE32 _IOR('t', 63, struct ppp_idle32) /* 32-bit times */ #define PPPIOCGIDLE64 _IOR('t', 63, struct ppp_idle64) /* 64-bit times */ -#define PPPIOCNEWUNIT _IOWR('t', 62, int) /* create new ppp unit */ -#define PPPIOCATTACH _IOW('t', 61, int) /* attach to ppp unit */ -#define PPPIOCDETACH _IOW('t', 60, int) /* obsolete, do not use */ -#define PPPIOCSMRRU _IOW('t', 59, int) /* set multilink MRU */ -#define PPPIOCCONNECT _IOW('t', 58, int) /* connect channel to unit */ -#define PPPIOCDISCONN _IO('t', 57) /* disconnect channel */ -#define PPPIOCATTCHAN _IOW('t', 56, int) /* attach to ppp channel */ -#define PPPIOCGCHAN _IOR('t', 55, int) /* get ppp channel number */ +#define PPPIOCNEWUNIT _IOWR('t', 62, int) /* create new ppp unit */ +#define PPPIOCATTACH _IOW('t', 61, int) /* attach to ppp unit */ +#define PPPIOCDETACH _IOW('t', 60, int) /* obsolete, do not use */ +#define PPPIOCSMRRU _IOW('t', 59, int) /* set multilink MRU */ +#define PPPIOCCONNECT _IOW('t', 58, int) /* connect channel to unit */ +#define PPPIOCDISCONN _IO('t', 57) /* disconnect channel */ +#define PPPIOCATTCHAN _IOW('t', 56, int) /* attach to ppp channel */ +#define PPPIOCGCHAN _IOR('t', 55, int) /* get ppp channel number */ #define PPPIOCGL2TPSTATS _IOR('t', 54, struct pppol2tp_ioc_stats) #define PPPIOCBRIDGECHAN \ _IOW('t', 53, int) /* bridge one channel to another \ diff --git a/include/arch/x86_64/linux/prctl.h b/include/arch/x86_64/linux/prctl.h index 2c2e38fc..ad7d1587 100644 --- a/include/arch/x86_64/linux/prctl.h +++ b/include/arch/x86_64/linux/prctl.h @@ -330,18 +330,16 @@ struct prctl_mm_map { #define PR_PPC_GET_DEXCR 72 #define PR_PPC_SET_DEXCR 73 /* DEXCR aspect to act on */ -#define PR_PPC_DEXCR_SBHE 0 /* Speculative branch hint enable */ -#define PR_PPC_DEXCR_IBRTPD \ - 1 /* Indirect branch recurrent target prediction disable */ +#define PR_PPC_DEXCR_SBHE 0 /* Speculative branch hint enable */ +#define PR_PPC_DEXCR_IBRTPD 1 /* Indirect branch recurrent target prediction disable */ #define PR_PPC_DEXCR_SRAPD \ 2 /* Subroutine return address prediction disable \ */ #define PR_PPC_DEXCR_NPHIE 3 /* Non-privileged hash instruction enable */ /* Action to apply / return */ -#define PR_PPC_DEXCR_CTRL_EDITABLE \ - 0x1 /* Aspect can be modified with PR_PPC_SET_DEXCR */ -#define PR_PPC_DEXCR_CTRL_SET 0x2 /* Set the aspect for this process */ -#define PR_PPC_DEXCR_CTRL_CLEAR 0x4 /* Clear the aspect for this process */ +#define PR_PPC_DEXCR_CTRL_EDITABLE 0x1 /* Aspect can be modified with PR_PPC_SET_DEXCR */ +#define PR_PPC_DEXCR_CTRL_SET 0x2 /* Set the aspect for this process */ +#define PR_PPC_DEXCR_CTRL_CLEAR 0x4 /* Clear the aspect for this process */ #define PR_PPC_DEXCR_CTRL_SET_ONEXEC 0x8 /* Set the aspect on exec */ #define PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC 0x10 /* Clear the aspect on exec */ #define PR_PPC_DEXCR_CTRL_MASK 0x1f diff --git a/include/arch/x86_64/linux/psample.h b/include/arch/x86_64/linux/psample.h index 32960e3c..424694a2 100644 --- a/include/arch/x86_64/linux/psample.h +++ b/include/arch/x86_64/linux/psample.h @@ -52,10 +52,10 @@ enum psample_tunnel_key_attr { PSAMPLE_TUNNEL_KEY_ATTR_TP_SRC, /* be16 src Transport Port. */ PSAMPLE_TUNNEL_KEY_ATTR_TP_DST, /* be16 dst Transport Port. */ PSAMPLE_TUNNEL_KEY_ATTR_VXLAN_OPTS, /* Nested VXLAN opts* */ - PSAMPLE_TUNNEL_KEY_ATTR_IPV6_SRC, /* struct in6_addr src IPv6 address. - */ - PSAMPLE_TUNNEL_KEY_ATTR_IPV6_DST, /* struct in6_addr dst IPv6 address. - */ + PSAMPLE_TUNNEL_KEY_ATTR_IPV6_SRC, /* struct in6_addr src IPv6 address. + */ + PSAMPLE_TUNNEL_KEY_ATTR_IPV6_DST, /* struct in6_addr dst IPv6 address. + */ PSAMPLE_TUNNEL_KEY_ATTR_PAD, PSAMPLE_TUNNEL_KEY_ATTR_ERSPAN_OPTS, /* struct erspan_metadata */ PSAMPLE_TUNNEL_KEY_ATTR_IPV4_INFO_BRIDGE, /* No argument. diff --git a/include/arch/x86_64/linux/psci.h b/include/arch/x86_64/linux/psci.h index 2e7237e9..0a61b17b 100644 --- a/include/arch/x86_64/linux/psci.h +++ b/include/arch/x86_64/linux/psci.h @@ -82,8 +82,7 @@ #define PSCI_1_0_EXT_POWER_STATE_ID_MASK 0xfffffff #define PSCI_1_0_EXT_POWER_STATE_ID_SHIFT 0 #define PSCI_1_0_EXT_POWER_STATE_TYPE_SHIFT 30 -#define PSCI_1_0_EXT_POWER_STATE_TYPE_MASK \ - (0x1 << PSCI_1_0_EXT_POWER_STATE_TYPE_SHIFT) +#define PSCI_1_0_EXT_POWER_STATE_TYPE_MASK (0x1 << PSCI_1_0_EXT_POWER_STATE_TYPE_SHIFT) /* PSCI v0.2 affinity level state returned by AFFINITY_INFO */ #define PSCI_0_2_AFFINITY_LEVEL_ON 0 @@ -106,17 +105,14 @@ #define PSCI_VERSION_MAJOR_SHIFT 16 #define PSCI_VERSION_MINOR_MASK ((1U << PSCI_VERSION_MAJOR_SHIFT) - 1) #define PSCI_VERSION_MAJOR_MASK ~PSCI_VERSION_MINOR_MASK -#define PSCI_VERSION_MAJOR(ver) \ - (((ver) & PSCI_VERSION_MAJOR_MASK) >> PSCI_VERSION_MAJOR_SHIFT) -#define PSCI_VERSION_MINOR(ver) ((ver) & PSCI_VERSION_MINOR_MASK) -#define PSCI_VERSION(maj, min) \ - ((((maj) << PSCI_VERSION_MAJOR_SHIFT) & PSCI_VERSION_MAJOR_MASK) | \ - ((min) & PSCI_VERSION_MINOR_MASK)) +#define PSCI_VERSION_MAJOR(ver) (((ver) & PSCI_VERSION_MAJOR_MASK) >> PSCI_VERSION_MAJOR_SHIFT) +#define PSCI_VERSION_MINOR(ver) ((ver) & PSCI_VERSION_MINOR_MASK) +#define PSCI_VERSION(maj, min) \ + ((((maj) << PSCI_VERSION_MAJOR_SHIFT) & PSCI_VERSION_MAJOR_MASK) | ((min) & PSCI_VERSION_MINOR_MASK)) /* PSCI features decoding (>=1.0) */ #define PSCI_1_0_FEATURES_CPU_SUSPEND_PF_SHIFT 1 -#define PSCI_1_0_FEATURES_CPU_SUSPEND_PF_MASK \ - (0x1 << PSCI_1_0_FEATURES_CPU_SUSPEND_PF_SHIFT) +#define PSCI_1_0_FEATURES_CPU_SUSPEND_PF_MASK (0x1 << PSCI_1_0_FEATURES_CPU_SUSPEND_PF_SHIFT) #define PSCI_1_0_OS_INITIATED BIT(0) #define PSCI_1_0_SUSPEND_MODE_PC 0 diff --git a/include/arch/x86_64/linux/ptp_clock.h b/include/arch/x86_64/linux/ptp_clock.h index 22e2cae6..80bafbd2 100644 --- a/include/arch/x86_64/linux/ptp_clock.h +++ b/include/arch/x86_64/linux/ptp_clock.h @@ -41,16 +41,14 @@ * Note: PTP_STRICT_FLAGS is always enabled by the kernel for * PTP_EXTTS_REQUEST2 regardless of whether it is set by userspace. */ -#define PTP_EXTTS_VALID_FLAGS \ - (PTP_ENABLE_FEATURE | PTP_RISING_EDGE | PTP_FALLING_EDGE | \ - PTP_STRICT_FLAGS | PTP_EXT_OFFSET) +#define PTP_EXTTS_VALID_FLAGS \ + (PTP_ENABLE_FEATURE | PTP_RISING_EDGE | PTP_FALLING_EDGE | PTP_STRICT_FLAGS | PTP_EXT_OFFSET) /* * flag fields valid for the original PTP_EXTTS_REQUEST ioctl. * DO NOT ADD NEW FLAGS HERE. */ -#define PTP_EXTTS_V1_VALID_FLAGS \ - (PTP_ENABLE_FEATURE | PTP_RISING_EDGE | PTP_FALLING_EDGE) +#define PTP_EXTTS_V1_VALID_FLAGS (PTP_ENABLE_FEATURE | PTP_RISING_EDGE | PTP_FALLING_EDGE) /* * flag fields valid for the ptp_extts_event report. @@ -67,8 +65,7 @@ /* * flag fields valid for the new PTP_PEROUT_REQUEST2 ioctl. */ -#define PTP_PEROUT_VALID_FLAGS \ - (PTP_PEROUT_ONE_SHOT | PTP_PEROUT_DUTY_CYCLE | PTP_PEROUT_PHASE) +#define PTP_PEROUT_VALID_FLAGS (PTP_PEROUT_ONE_SHOT | PTP_PEROUT_DUTY_CYCLE | PTP_PEROUT_PHASE) /* * No flags are valid for the original PTP_PEROUT_REQUEST ioctl @@ -219,31 +216,27 @@ struct ptp_pin_desc { #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) -#define PTP_PIN_GETFUNC _IOWR(PTP_CLK_MAGIC, 6, struct ptp_pin_desc) -#define PTP_PIN_SETFUNC _IOW(PTP_CLK_MAGIC, 7, struct ptp_pin_desc) -#define PTP_SYS_OFFSET_PRECISE \ - _IOWR(PTP_CLK_MAGIC, 8, struct ptp_sys_offset_precise) -#define PTP_SYS_OFFSET_EXTENDED \ - _IOWR(PTP_CLK_MAGIC, 9, struct ptp_sys_offset_extended) - -#define PTP_CLOCK_GETCAPS2 _IOR(PTP_CLK_MAGIC, 10, struct ptp_clock_caps) -#define PTP_EXTTS_REQUEST2 _IOW(PTP_CLK_MAGIC, 11, struct ptp_extts_request) -#define PTP_PEROUT_REQUEST2 _IOW(PTP_CLK_MAGIC, 12, struct ptp_perout_request) -#define PTP_ENABLE_PPS2 _IOW(PTP_CLK_MAGIC, 13, int) -#define PTP_SYS_OFFSET2 _IOW(PTP_CLK_MAGIC, 14, struct ptp_sys_offset) -#define PTP_PIN_GETFUNC2 _IOWR(PTP_CLK_MAGIC, 15, struct ptp_pin_desc) -#define PTP_PIN_SETFUNC2 _IOW(PTP_CLK_MAGIC, 16, struct ptp_pin_desc) -#define PTP_SYS_OFFSET_PRECISE2 \ - _IOWR(PTP_CLK_MAGIC, 17, struct ptp_sys_offset_precise) -#define PTP_SYS_OFFSET_EXTENDED2 \ - _IOWR(PTP_CLK_MAGIC, 18, struct ptp_sys_offset_extended) -#define PTP_MASK_CLEAR_ALL _IO(PTP_CLK_MAGIC, 19) -#define PTP_MASK_EN_SINGLE _IOW(PTP_CLK_MAGIC, 20, unsigned int) +#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) +#define PTP_PIN_GETFUNC _IOWR(PTP_CLK_MAGIC, 6, struct ptp_pin_desc) +#define PTP_PIN_SETFUNC _IOW(PTP_CLK_MAGIC, 7, struct ptp_pin_desc) +#define PTP_SYS_OFFSET_PRECISE _IOWR(PTP_CLK_MAGIC, 8, struct ptp_sys_offset_precise) +#define PTP_SYS_OFFSET_EXTENDED _IOWR(PTP_CLK_MAGIC, 9, struct ptp_sys_offset_extended) + +#define PTP_CLOCK_GETCAPS2 _IOR(PTP_CLK_MAGIC, 10, struct ptp_clock_caps) +#define PTP_EXTTS_REQUEST2 _IOW(PTP_CLK_MAGIC, 11, struct ptp_extts_request) +#define PTP_PEROUT_REQUEST2 _IOW(PTP_CLK_MAGIC, 12, struct ptp_perout_request) +#define PTP_ENABLE_PPS2 _IOW(PTP_CLK_MAGIC, 13, int) +#define PTP_SYS_OFFSET2 _IOW(PTP_CLK_MAGIC, 14, struct ptp_sys_offset) +#define PTP_PIN_GETFUNC2 _IOWR(PTP_CLK_MAGIC, 15, struct ptp_pin_desc) +#define PTP_PIN_SETFUNC2 _IOW(PTP_CLK_MAGIC, 16, struct ptp_pin_desc) +#define PTP_SYS_OFFSET_PRECISE2 _IOWR(PTP_CLK_MAGIC, 17, struct ptp_sys_offset_precise) +#define PTP_SYS_OFFSET_EXTENDED2 _IOWR(PTP_CLK_MAGIC, 18, struct ptp_sys_offset_extended) +#define PTP_MASK_CLEAR_ALL _IO(PTP_CLK_MAGIC, 19) +#define PTP_MASK_EN_SINGLE _IOW(PTP_CLK_MAGIC, 20, unsigned int) struct ptp_extts_event { struct ptp_clock_time t; /* Time event occurred. */ diff --git a/include/arch/x86_64/linux/ptrace.h b/include/arch/x86_64/linux/ptrace.h index c85adf55..35ff09f3 100644 --- a/include/arch/x86_64/linux/ptrace.h +++ b/include/arch/x86_64/linux/ptrace.h @@ -182,8 +182,7 @@ struct ptrace_sud_config { #define PTRACE_O_EXITKILL (1 << 20) #define PTRACE_O_SUSPEND_SECCOMP (1 << 21) -#define PTRACE_O_MASK \ - (0x000000ff | PTRACE_O_EXITKILL | PTRACE_O_SUSPEND_SECCOMP) +#define PTRACE_O_MASK (0x000000ff | PTRACE_O_EXITKILL | PTRACE_O_SUSPEND_SECCOMP) #include diff --git a/include/arch/x86_64/linux/raid/md_p.h b/include/arch/x86_64/linux/raid/md_p.h index 0150d231..340b31b5 100644 --- a/include/arch/x86_64/linux/raid/md_p.h +++ b/include/arch/x86_64/linux/raid/md_p.h @@ -44,8 +44,7 @@ #define MD_RESERVED_BYTES (64 * 1024) #define MD_RESERVED_SECTORS (MD_RESERVED_BYTES / 512) -#define MD_NEW_SIZE_SECTORS(x) \ - ((x & ~(MD_RESERVED_SECTORS - 1)) - MD_RESERVED_SECTORS) +#define MD_NEW_SIZE_SECTORS(x) ((x & ~(MD_RESERVED_SECTORS - 1)) - MD_RESERVED_SECTORS) #define MD_SB_BYTES 4096 #define MD_SB_WORDS (MD_SB_BYTES / 4) @@ -61,17 +60,14 @@ #define MD_SB_GENERIC_CONSTANT_WORDS 32 #define MD_SB_GENERIC_STATE_WORDS 32 -#define MD_SB_GENERIC_WORDS \ - (MD_SB_GENERIC_CONSTANT_WORDS + MD_SB_GENERIC_STATE_WORDS) -#define MD_SB_PERSONALITY_WORDS 64 -#define MD_SB_DESCRIPTOR_WORDS 32 -#define MD_SB_DISKS 27 -#define MD_SB_DISKS_WORDS (MD_SB_DISKS * MD_SB_DESCRIPTOR_WORDS) -#define MD_SB_RESERVED_WORDS \ - (1024 - MD_SB_GENERIC_WORDS - MD_SB_PERSONALITY_WORDS - \ - MD_SB_DISKS_WORDS - MD_SB_DESCRIPTOR_WORDS) -#define MD_SB_EQUAL_WORDS \ - (MD_SB_GENERIC_WORDS + MD_SB_PERSONALITY_WORDS + MD_SB_DISKS_WORDS) +#define MD_SB_GENERIC_WORDS (MD_SB_GENERIC_CONSTANT_WORDS + MD_SB_GENERIC_STATE_WORDS) +#define MD_SB_PERSONALITY_WORDS 64 +#define MD_SB_DESCRIPTOR_WORDS 32 +#define MD_SB_DISKS 27 +#define MD_SB_DISKS_WORDS (MD_SB_DISKS * MD_SB_DESCRIPTOR_WORDS) +#define MD_SB_RESERVED_WORDS \ + (1024 - MD_SB_GENERIC_WORDS - MD_SB_PERSONALITY_WORDS - MD_SB_DISKS_WORDS - MD_SB_DESCRIPTOR_WORDS) +#define MD_SB_EQUAL_WORDS (MD_SB_GENERIC_WORDS + MD_SB_PERSONALITY_WORDS + MD_SB_DISKS_WORDS) /* * Device "operational" state bits @@ -173,8 +169,7 @@ typedef struct mdp_superblock_s { __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 */ -#elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : \ - defined(__LITTLE_ENDIAN) +#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 */ @@ -277,8 +272,8 @@ struct mdp_superblock_1 { */ /* constant this-device information - 64 bytes */ - __le64 data_offset; /* sector start of data, often 0 */ - __le64 data_size; /* sectors in this device that can be used for data */ + __le64 data_offset; /* sector start of data, often 0 */ + __le64 data_size; /* sectors in this device that can be used for data */ __le64 super_offset; /* sector start of this superblock */ union { __le64 recovery_offset; /* sectors before this offset (from @@ -286,14 +281,14 @@ struct mdp_superblock_1 { __le64 journal_tail; /* journal tail of journal device (from data_offset) */ }; - __le32 dev_number; /* permanent identifier of this device - not role in - raid */ + __le32 dev_number; /* permanent identifier of this device - not role in + raid */ __le32 cnt_corrected_read; /* number of read errors that were corrected by re-writing */ __u8 device_uuid[16]; /* user-space setable, ignored by kernel */ __u8 devflags; /* per-device flags. Only two defined...*/ #define WriteMostly1 1 /* mask for writemostly flag in above */ -#define FailFast1 2 /* Should avoid retries and fixups and just fail */ +#define FailFast1 2 /* Should avoid retries and fixups and just fail */ /* Bad block log. If there are any bad blocks the feature flag is set. * If offset and size are non-zero, that space is reserved and available */ @@ -349,13 +344,11 @@ struct mdp_superblock_1 { #define MD_FEATURE_PPL 1024 /* support PPL */ #define MD_FEATURE_MULTIPLE_PPLS 2048 /* support for multiple PPLs */ #define MD_FEATURE_RAID0_LAYOUT 4096 /* layout is meaningful for RAID0 */ -#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_RESHAPE_BACKWARDS | \ - MD_FEATURE_NEW_OFFSET | MD_FEATURE_RECOVERY_BITMAP | \ - MD_FEATURE_CLUSTERED | MD_FEATURE_JOURNAL | MD_FEATURE_PPL | \ - MD_FEATURE_MULTIPLE_PPLS | MD_FEATURE_RAID0_LAYOUT) +#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_RESHAPE_BACKWARDS | MD_FEATURE_NEW_OFFSET | MD_FEATURE_RECOVERY_BITMAP | \ + MD_FEATURE_CLUSTERED | MD_FEATURE_JOURNAL | MD_FEATURE_PPL | MD_FEATURE_MULTIPLE_PPLS | \ + MD_FEATURE_RAID0_LAYOUT) struct r5l_payload_header { __le16 type; @@ -426,21 +419,18 @@ struct ppl_header_entry { * entry (~crc32c) */ } __attribute__((__packed__)); -#define PPL_HEADER_SIZE 4096 -#define PPL_HDR_RESERVED 512 -#define PPL_HDR_ENTRY_SPACE \ - (PPL_HEADER_SIZE - PPL_HDR_RESERVED - 4 * sizeof(__le32) - \ - sizeof(__le64)) -#define PPL_HDR_MAX_ENTRIES \ - (PPL_HDR_ENTRY_SPACE / sizeof(struct ppl_header_entry)) +#define PPL_HEADER_SIZE 4096 +#define PPL_HDR_RESERVED 512 +#define PPL_HDR_ENTRY_SPACE (PPL_HEADER_SIZE - PPL_HDR_RESERVED - 4 * sizeof(__le32) - sizeof(__le64)) +#define PPL_HDR_MAX_ENTRIES (PPL_HDR_ENTRY_SPACE / sizeof(struct ppl_header_entry)) struct ppl_header { __u8 reserved[PPL_HDR_RESERVED]; /* reserved space, fill with 0xff */ - __le32 signature; /* signature (family number of volume) */ - __le32 padding; /* zero pad */ - __le64 generation; /* generation number of the header */ - __le32 entries_count; /* number of entries in entry array */ - __le32 checksum; /* checksum of the header (~crc32c) */ + __le32 signature; /* signature (family number of volume) */ + __le32 padding; /* zero pad */ + __le64 generation; /* generation number of the header */ + __le32 entries_count; /* number of entries in entry array */ + __le32 checksum; /* checksum of the header (~crc32c) */ struct ppl_header_entry entries[PPL_HDR_MAX_ENTRIES]; } __attribute__((__packed__)); diff --git a/include/arch/x86_64/linux/rds.h b/include/arch/x86_64/linux/rds.h index b93ab987..a3105fd6 100644 --- a/include/arch/x86_64/linux/rds.h +++ b/include/arch/x86_64/linux/rds.h @@ -314,9 +314,8 @@ struct rds_cmsg_rx_trace { * The correspondence between bits and ports is * 1 << (portnum % 64) */ -#define RDS_CONG_MONITOR_SIZE 64 -#define RDS_CONG_MONITOR_BIT(port) \ - (((unsigned int)port) % RDS_CONG_MONITOR_SIZE) +#define RDS_CONG_MONITOR_SIZE 64 +#define RDS_CONG_MONITOR_BIT(port) (((unsigned int)port) % RDS_CONG_MONITOR_SIZE) #define RDS_CONG_MONITOR_MASK(port) (1ULL << RDS_CONG_MONITOR_BIT(port)) /* diff --git a/include/arch/x86_64/linux/rio_mport_cdev.h b/include/arch/x86_64/linux/rio_mport_cdev.h index b9fb9cfa..ea78089c 100644 --- a/include/arch/x86_64/linux/rio_mport_cdev.h +++ b/include/arch/x86_64/linux/rio_mport_cdev.h @@ -192,10 +192,10 @@ struct rio_transfer_io { __u64 rio_addr; /* Address in target's RIO mem space */ __u64 loc_addr; __u64 handle; - __u64 offset; /* Offset in buffer */ - __u64 length; /* Length in bytes */ - __u16 rioid; /* Target destID */ - __u16 method; /* Data exchange method, one of rio_exchange enum */ + __u64 offset; /* Offset in buffer */ + __u64 length; /* Length in bytes */ + __u16 rioid; /* Target destID */ + __u16 method; /* Data exchange method, one of rio_exchange enum */ __u32 completion_code; /* Completion code for this transfer */ }; @@ -204,7 +204,7 @@ struct rio_transaction { __u32 count; /* Number of transfers */ __u32 transfer_mode; /* Data transfer mode */ __u16 sync; /* Synch method, one of rio_transfer_sync enum */ - __u16 dir; /* Transfer direction, one of rio_transfer_dir enum */ + __u16 dir; /* Transfer direction, one of rio_transfer_dir enum */ __u32 pad0; }; @@ -229,36 +229,26 @@ struct rio_rdev_info { #define RIO_MPORT_MAINT_HDID_SET _IOW(RIO_MPORT_DRV_MAGIC, 1, __u16) #define RIO_MPORT_MAINT_COMPTAG_SET _IOW(RIO_MPORT_DRV_MAGIC, 2, __u32) #define RIO_MPORT_MAINT_PORT_IDX_GET _IOR(RIO_MPORT_DRV_MAGIC, 3, __u32) -#define RIO_MPORT_GET_PROPERTIES \ - _IOR(RIO_MPORT_DRV_MAGIC, 4, struct rio_mport_properties) -#define RIO_MPORT_MAINT_READ_LOCAL \ - _IOR(RIO_MPORT_DRV_MAGIC, 5, struct rio_mport_maint_io) -#define RIO_MPORT_MAINT_WRITE_LOCAL \ - _IOW(RIO_MPORT_DRV_MAGIC, 6, struct rio_mport_maint_io) -#define RIO_MPORT_MAINT_READ_REMOTE \ - _IOR(RIO_MPORT_DRV_MAGIC, 7, struct rio_mport_maint_io) -#define RIO_MPORT_MAINT_WRITE_REMOTE \ - _IOW(RIO_MPORT_DRV_MAGIC, 8, struct rio_mport_maint_io) -#define RIO_ENABLE_DOORBELL_RANGE \ - _IOW(RIO_MPORT_DRV_MAGIC, 9, struct rio_doorbell_filter) -#define RIO_DISABLE_DOORBELL_RANGE \ - _IOW(RIO_MPORT_DRV_MAGIC, 10, struct rio_doorbell_filter) -#define RIO_ENABLE_PORTWRITE_RANGE \ - _IOW(RIO_MPORT_DRV_MAGIC, 11, struct rio_pw_filter) -#define RIO_DISABLE_PORTWRITE_RANGE \ - _IOW(RIO_MPORT_DRV_MAGIC, 12, struct rio_pw_filter) -#define RIO_SET_EVENT_MASK _IOW(RIO_MPORT_DRV_MAGIC, 13, __u32) -#define RIO_GET_EVENT_MASK _IOR(RIO_MPORT_DRV_MAGIC, 14, __u32) -#define RIO_MAP_OUTBOUND _IOWR(RIO_MPORT_DRV_MAGIC, 15, struct rio_mmap) -#define RIO_UNMAP_OUTBOUND _IOW(RIO_MPORT_DRV_MAGIC, 16, struct rio_mmap) -#define RIO_MAP_INBOUND _IOWR(RIO_MPORT_DRV_MAGIC, 17, struct rio_mmap) -#define RIO_UNMAP_INBOUND _IOW(RIO_MPORT_DRV_MAGIC, 18, __u64) -#define RIO_ALLOC_DMA _IOWR(RIO_MPORT_DRV_MAGIC, 19, struct rio_dma_mem) -#define RIO_FREE_DMA _IOW(RIO_MPORT_DRV_MAGIC, 20, __u64) -#define RIO_TRANSFER _IOWR(RIO_MPORT_DRV_MAGIC, 21, struct rio_transaction) -#define RIO_WAIT_FOR_ASYNC \ - _IOW(RIO_MPORT_DRV_MAGIC, 22, struct rio_async_tx_wait) -#define RIO_DEV_ADD _IOW(RIO_MPORT_DRV_MAGIC, 23, struct rio_rdev_info) -#define RIO_DEV_DEL _IOW(RIO_MPORT_DRV_MAGIC, 24, struct rio_rdev_info) +#define RIO_MPORT_GET_PROPERTIES _IOR(RIO_MPORT_DRV_MAGIC, 4, struct rio_mport_properties) +#define RIO_MPORT_MAINT_READ_LOCAL _IOR(RIO_MPORT_DRV_MAGIC, 5, struct rio_mport_maint_io) +#define RIO_MPORT_MAINT_WRITE_LOCAL _IOW(RIO_MPORT_DRV_MAGIC, 6, struct rio_mport_maint_io) +#define RIO_MPORT_MAINT_READ_REMOTE _IOR(RIO_MPORT_DRV_MAGIC, 7, struct rio_mport_maint_io) +#define RIO_MPORT_MAINT_WRITE_REMOTE _IOW(RIO_MPORT_DRV_MAGIC, 8, struct rio_mport_maint_io) +#define RIO_ENABLE_DOORBELL_RANGE _IOW(RIO_MPORT_DRV_MAGIC, 9, struct rio_doorbell_filter) +#define RIO_DISABLE_DOORBELL_RANGE _IOW(RIO_MPORT_DRV_MAGIC, 10, struct rio_doorbell_filter) +#define RIO_ENABLE_PORTWRITE_RANGE _IOW(RIO_MPORT_DRV_MAGIC, 11, struct rio_pw_filter) +#define RIO_DISABLE_PORTWRITE_RANGE _IOW(RIO_MPORT_DRV_MAGIC, 12, struct rio_pw_filter) +#define RIO_SET_EVENT_MASK _IOW(RIO_MPORT_DRV_MAGIC, 13, __u32) +#define RIO_GET_EVENT_MASK _IOR(RIO_MPORT_DRV_MAGIC, 14, __u32) +#define RIO_MAP_OUTBOUND _IOWR(RIO_MPORT_DRV_MAGIC, 15, struct rio_mmap) +#define RIO_UNMAP_OUTBOUND _IOW(RIO_MPORT_DRV_MAGIC, 16, struct rio_mmap) +#define RIO_MAP_INBOUND _IOWR(RIO_MPORT_DRV_MAGIC, 17, struct rio_mmap) +#define RIO_UNMAP_INBOUND _IOW(RIO_MPORT_DRV_MAGIC, 18, __u64) +#define RIO_ALLOC_DMA _IOWR(RIO_MPORT_DRV_MAGIC, 19, struct rio_dma_mem) +#define RIO_FREE_DMA _IOW(RIO_MPORT_DRV_MAGIC, 20, __u64) +#define RIO_TRANSFER _IOWR(RIO_MPORT_DRV_MAGIC, 21, struct rio_transaction) +#define RIO_WAIT_FOR_ASYNC _IOW(RIO_MPORT_DRV_MAGIC, 22, struct rio_async_tx_wait) +#define RIO_DEV_ADD _IOW(RIO_MPORT_DRV_MAGIC, 23, struct rio_rdev_info) +#define RIO_DEV_DEL _IOW(RIO_MPORT_DRV_MAGIC, 24, struct rio_rdev_info) #endif /* _RIO_MPORT_CDEV_H_ */ diff --git a/include/arch/x86_64/linux/rkisp1-config.h b/include/arch/x86_64/linux/rkisp1-config.h index 99096e5c..254918cc 100644 --- a/include/arch/x86_64/linux/rkisp1-config.h +++ b/include/arch/x86_64/linux/rkisp1-config.h @@ -94,8 +94,7 @@ /* Maximum number of color samples supported */ #define RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V10 17 #define RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V12 34 -#define RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES \ - RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V12 +#define RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V12 /* * Lens shade correction @@ -113,8 +112,7 @@ */ #define RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V10 25 #define RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V12 81 -#define RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE \ - RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V12 +#define RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V12 /* * Defect Pixel Cluster Correction @@ -174,9 +172,8 @@ /* * Wide Dynamic Range */ -#define RKISP1_CIF_ISP_WDR_CURVE_NUM_INTERV 32 -#define RKISP1_CIF_ISP_WDR_CURVE_NUM_COEFF \ - (RKISP1_CIF_ISP_WDR_CURVE_NUM_INTERV + 1) +#define RKISP1_CIF_ISP_WDR_CURVE_NUM_INTERV 32 +#define RKISP1_CIF_ISP_WDR_CURVE_NUM_COEFF (RKISP1_CIF_ISP_WDR_CURVE_NUM_INTERV + 1) #define RKISP1_CIF_ISP_WDR_CURVE_NUM_DY_REGS 4 /* @@ -222,10 +219,7 @@ enum rkisp1_cif_isp_awb_mode_type { RKISP1_CIF_ISP_AWB_MODE_YCBCR }; -enum rkisp1_cif_isp_flt_mode { - RKISP1_CIF_ISP_FLT_STATIC_MODE, - RKISP1_CIF_ISP_FLT_DYNAMIC_MODE -}; +enum rkisp1_cif_isp_flt_mode { RKISP1_CIF_ISP_FLT_STATIC_MODE, RKISP1_CIF_ISP_FLT_DYNAMIC_MODE }; /** * enum rkisp1_cif_isp_exp_ctrl_autostop - stop modes @@ -356,8 +350,7 @@ struct rkisp1_cif_isp_dpcc_config { __u32 mode; __u32 output_mode; __u32 set_use; - struct rkisp1_cif_isp_dpcc_methods_config - methods[RKISP1_CIF_ISP_DPCC_METHODS_MAX]; + struct rkisp1_cif_isp_dpcc_methods_config methods[RKISP1_CIF_ISP_DPCC_METHODS_MAX]; __u32 ro_limits; __u32 rnd_offs; }; @@ -427,14 +420,10 @@ struct rkisp1_cif_isp_sdg_config { * @config_height: not used at the moment */ struct rkisp1_cif_isp_lsc_config { - __u16 r_data_tbl[RKISP1_CIF_ISP_LSC_SAMPLES_MAX] - [RKISP1_CIF_ISP_LSC_SAMPLES_MAX]; - __u16 gr_data_tbl[RKISP1_CIF_ISP_LSC_SAMPLES_MAX] - [RKISP1_CIF_ISP_LSC_SAMPLES_MAX]; - __u16 gb_data_tbl[RKISP1_CIF_ISP_LSC_SAMPLES_MAX] - [RKISP1_CIF_ISP_LSC_SAMPLES_MAX]; - __u16 b_data_tbl[RKISP1_CIF_ISP_LSC_SAMPLES_MAX] - [RKISP1_CIF_ISP_LSC_SAMPLES_MAX]; + __u16 r_data_tbl[RKISP1_CIF_ISP_LSC_SAMPLES_MAX][RKISP1_CIF_ISP_LSC_SAMPLES_MAX]; + __u16 gr_data_tbl[RKISP1_CIF_ISP_LSC_SAMPLES_MAX][RKISP1_CIF_ISP_LSC_SAMPLES_MAX]; + __u16 gb_data_tbl[RKISP1_CIF_ISP_LSC_SAMPLES_MAX][RKISP1_CIF_ISP_LSC_SAMPLES_MAX]; + __u16 b_data_tbl[RKISP1_CIF_ISP_LSC_SAMPLES_MAX][RKISP1_CIF_ISP_LSC_SAMPLES_MAX]; __u16 x_grad_tbl[RKISP1_CIF_ISP_LSC_SECTORS_TBL_SIZE]; __u16 y_grad_tbl[RKISP1_CIF_ISP_LSC_SECTORS_TBL_SIZE]; @@ -615,10 +604,7 @@ struct rkisp1_cif_isp_ctk_config { __u16 ct_offset[3]; }; -enum rkisp1_cif_isp_goc_mode { - RKISP1_CIF_ISP_GOC_MODE_LOGARITHMIC, - RKISP1_CIF_ISP_GOC_MODE_EQUIDISTANT -}; +enum rkisp1_cif_isp_goc_mode { RKISP1_CIF_ISP_GOC_MODE_LOGARITHMIC, RKISP1_CIF_ISP_GOC_MODE_EQUIDISTANT }; /** * struct rkisp1_cif_isp_goc_config - Configuration used by Gamma Out correction @@ -1599,28 +1585,18 @@ struct rkisp1_ext_params_wdr_config { * The rkisp1_ext_params_compand_curve_config structure is counted twice as it * is used for both the COMPAND_EXPAND and COMPAND_COMPRESS block types. */ -#define RKISP1_EXT_PARAMS_MAX_SIZE \ - (sizeof(struct rkisp1_ext_params_bls_config) + \ - sizeof(struct rkisp1_ext_params_dpcc_config) + \ - sizeof(struct rkisp1_ext_params_sdg_config) + \ - sizeof(struct rkisp1_ext_params_lsc_config) + \ - sizeof(struct rkisp1_ext_params_awb_gain_config) + \ - sizeof(struct rkisp1_ext_params_flt_config) + \ - sizeof(struct rkisp1_ext_params_bdm_config) + \ - sizeof(struct rkisp1_ext_params_ctk_config) + \ - sizeof(struct rkisp1_ext_params_goc_config) + \ - sizeof(struct rkisp1_ext_params_dpf_config) + \ - sizeof(struct rkisp1_ext_params_dpf_strength_config) + \ - sizeof(struct rkisp1_ext_params_cproc_config) + \ - sizeof(struct rkisp1_ext_params_ie_config) + \ - sizeof(struct rkisp1_ext_params_awb_meas_config) + \ - sizeof(struct rkisp1_ext_params_hst_config) + \ - sizeof(struct rkisp1_ext_params_aec_config) + \ - sizeof(struct rkisp1_ext_params_afc_config) + \ - sizeof(struct rkisp1_ext_params_compand_bls_config) + \ - sizeof(struct rkisp1_ext_params_compand_curve_config) + \ - sizeof(struct rkisp1_ext_params_compand_curve_config) + \ - sizeof(struct rkisp1_ext_params_wdr_config)) +#define RKISP1_EXT_PARAMS_MAX_SIZE \ + (sizeof(struct rkisp1_ext_params_bls_config) + sizeof(struct rkisp1_ext_params_dpcc_config) + \ + sizeof(struct rkisp1_ext_params_sdg_config) + sizeof(struct rkisp1_ext_params_lsc_config) + \ + sizeof(struct rkisp1_ext_params_awb_gain_config) + sizeof(struct rkisp1_ext_params_flt_config) + \ + sizeof(struct rkisp1_ext_params_bdm_config) + sizeof(struct rkisp1_ext_params_ctk_config) + \ + sizeof(struct rkisp1_ext_params_goc_config) + sizeof(struct rkisp1_ext_params_dpf_config) + \ + sizeof(struct rkisp1_ext_params_dpf_strength_config) + sizeof(struct rkisp1_ext_params_cproc_config) + \ + sizeof(struct rkisp1_ext_params_ie_config) + sizeof(struct rkisp1_ext_params_awb_meas_config) + \ + sizeof(struct rkisp1_ext_params_hst_config) + sizeof(struct rkisp1_ext_params_aec_config) + \ + sizeof(struct rkisp1_ext_params_afc_config) + sizeof(struct rkisp1_ext_params_compand_bls_config) + \ + sizeof(struct rkisp1_ext_params_compand_curve_config) + \ + sizeof(struct rkisp1_ext_params_compand_curve_config) + sizeof(struct rkisp1_ext_params_wdr_config)) /** * enum rksip1_ext_param_buffer_version - RkISP1 extensible parameters version diff --git a/include/arch/x86_64/linux/rseq.h b/include/arch/x86_64/linux/rseq.h index 2190aa78..4b8cb36e 100644 --- a/include/arch/x86_64/linux/rseq.h +++ b/include/arch/x86_64/linux/rseq.h @@ -29,12 +29,9 @@ enum rseq_cs_flags_bit { }; enum rseq_cs_flags { - RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT = - (1U << RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT_BIT), - RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL = - (1U << RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL_BIT), - RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE = - (1U << RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE_BIT), + RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT = (1U << RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT_BIT), + RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL = (1U << RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL_BIT), + RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE = (1U << RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE_BIT), }; /* diff --git a/include/arch/x86_64/linux/rtc.h b/include/arch/x86_64/linux/rtc.h index 0f9c0d99..3ab176b9 100644 --- a/include/arch/x86_64/linux/rtc.h +++ b/include/arch/x86_64/linux/rtc.h @@ -104,25 +104,22 @@ struct rtc_param { #define RTC_WKALM_SET _IOW('p', 0x0f, struct rtc_wkalrm) /* Set wakeup alarm*/ #define RTC_WKALM_RD _IOR('p', 0x10, struct rtc_wkalrm) /* Get wakeup alarm*/ -#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_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_PARAM_GET _IOW('p', 0x13, struct rtc_param) /* Get parameter */ #define RTC_PARAM_SET _IOW('p', 0x14, struct rtc_param) /* Set parameter */ -#define RTC_VL_DATA_INVALID \ - _BITUL(0) /* Voltage too low, RTC data is invalid \ - */ -#define RTC_VL_BACKUP_LOW _BITUL(1) /* Backup voltage is low */ -#define RTC_VL_BACKUP_EMPTY _BITUL(2) /* Backup empty or not present */ -#define RTC_VL_ACCURACY_LOW \ - _BITUL(3) /* Voltage is low, RTC accuracy is reduced */ +#define RTC_VL_DATA_INVALID \ + _BITUL(0) /* Voltage too low, RTC data is invalid \ + */ +#define RTC_VL_BACKUP_LOW _BITUL(1) /* Backup voltage is low */ +#define RTC_VL_BACKUP_EMPTY _BITUL(2) /* Backup empty or not present */ +#define RTC_VL_ACCURACY_LOW _BITUL(3) /* Voltage is low, RTC accuracy is reduced */ #define RTC_VL_BACKUP_SWITCH _BITUL(4) /* Backup switchover happened */ #define RTC_VL_READ _IOR('p', 0x13, unsigned int) /* Voltage low detection */ -#define RTC_VL_CLR _IO('p', 0x14) /* Clear voltage low information */ +#define RTC_VL_CLR _IO('p', 0x14) /* Clear voltage low information */ /* interrupt flags */ #define RTC_IRQF 0x80 /* Any of the following is active */ diff --git a/include/arch/x86_64/linux/rtnetlink.h b/include/arch/x86_64/linux/rtnetlink.h index 77554457..58d54ffb 100644 --- a/include/arch/x86_64/linux/rtnetlink.h +++ b/include/arch/x86_64/linux/rtnetlink.h @@ -225,12 +225,10 @@ struct rtattr { #define RTA_ALIGNTO 4U #define RTA_ALIGN(len) (((len) + RTA_ALIGNTO - 1) & ~(RTA_ALIGNTO - 1)) -#define RTA_OK(rta, len) \ - ((len) >= (int)sizeof(struct rtattr) && \ - (rta)->rta_len >= sizeof(struct rtattr) && (rta)->rta_len <= (len)) -#define RTA_NEXT(rta, attrlen) \ - ((attrlen) -= RTA_ALIGN((rta)->rta_len), \ - (struct rtattr *)(((char *)(rta)) + RTA_ALIGN((rta)->rta_len))) +#define RTA_OK(rta, len) \ + ((len) >= (int)sizeof(struct rtattr) && (rta)->rta_len >= sizeof(struct rtattr) && (rta)->rta_len <= (len)) +#define RTA_NEXT(rta, attrlen) \ + ((attrlen) -= RTA_ALIGN((rta)->rta_len), (struct rtattr *)(((char *)(rta)) + RTA_ALIGN((rta)->rta_len))) #define RTA_LENGTH(len) (RTA_ALIGN(sizeof(struct rtattr)) + (len)) #define RTA_SPACE(len) RTA_ALIGN(RTA_LENGTH(len)) #define RTA_DATA(rta) ((void *)(((char *)(rta)) + RTA_LENGTH(0))) @@ -402,8 +400,7 @@ enum rtattr_type_t { #define RTA_MAX (__RTA_MAX - 1) -#define RTM_RTA(r) \ - ((struct rtattr *)(((char *)(r)) + NLMSG_ALIGN(sizeof(struct rtmsg)))) +#define RTM_RTA(r) ((struct rtattr *)(((char *)(r)) + NLMSG_ALIGN(sizeof(struct rtmsg)))) #define RTM_PAYLOAD(n) NLMSG_PAYLOAD(n, sizeof(struct rtmsg)) /* RTM_MULTIPATH --- array of struct rtnexthop. @@ -432,21 +429,17 @@ struct rtnexthop { #define RTNH_F_UNRESOLVED 32 /* The entry is unresolved (ipmr) */ #define RTNH_F_TRAP 64 /* Nexthop is trapping packets */ -#define RTNH_COMPARE_MASK \ - (RTNH_F_DEAD | RTNH_F_LINKDOWN | RTNH_F_OFFLOAD | RTNH_F_TRAP) +#define RTNH_COMPARE_MASK (RTNH_F_DEAD | RTNH_F_LINKDOWN | RTNH_F_OFFLOAD | RTNH_F_TRAP) /* Macros to handle hexthops */ -#define RTNH_ALIGNTO 4 -#define RTNH_ALIGN(len) (((len) + RTNH_ALIGNTO - 1) & ~(RTNH_ALIGNTO - 1)) -#define RTNH_OK(rtnh, len) \ - ((rtnh)->rtnh_len >= sizeof(struct rtnexthop) && \ - ((int)(rtnh)->rtnh_len) <= (len)) -#define RTNH_NEXT(rtnh) \ - ((struct rtnexthop *)(((char *)(rtnh)) + RTNH_ALIGN((rtnh)->rtnh_len))) -#define RTNH_LENGTH(len) (RTNH_ALIGN(sizeof(struct rtnexthop)) + (len)) -#define RTNH_SPACE(len) RTNH_ALIGN(RTNH_LENGTH(len)) -#define RTNH_DATA(rtnh) ((struct rtattr *)(((char *)(rtnh)) + RTNH_LENGTH(0))) +#define RTNH_ALIGNTO 4 +#define RTNH_ALIGN(len) (((len) + RTNH_ALIGNTO - 1) & ~(RTNH_ALIGNTO - 1)) +#define RTNH_OK(rtnh, len) ((rtnh)->rtnh_len >= sizeof(struct rtnexthop) && ((int)(rtnh)->rtnh_len) <= (len)) +#define RTNH_NEXT(rtnh) ((struct rtnexthop *)(((char *)(rtnh)) + RTNH_ALIGN((rtnh)->rtnh_len))) +#define RTNH_LENGTH(len) (RTNH_ALIGN(sizeof(struct rtnexthop)) + (len)) +#define RTNH_SPACE(len) RTNH_ALIGN(RTNH_LENGTH(len)) +#define RTNH_DATA(rtnh) ((struct rtattr *)(((char *)(rtnh)) + RTNH_LENGTH(0))) /* RTA_VIA */ struct rtvia { @@ -519,9 +512,9 @@ enum { #define RTAX_FEATURE_ALLFRAG (1 << 3) /* unused */ #define RTAX_FEATURE_TCP_USEC_TS (1 << 4) -#define RTAX_FEATURE_MASK \ - (RTAX_FEATURE_ECN | RTAX_FEATURE_SACK | RTAX_FEATURE_TIMESTAMP | \ - RTAX_FEATURE_ALLFRAG | RTAX_FEATURE_TCP_USEC_TS) +#define RTAX_FEATURE_MASK \ + (RTAX_FEATURE_ECN | RTAX_FEATURE_SACK | RTAX_FEATURE_TIMESTAMP | RTAX_FEATURE_ALLFRAG | \ + RTAX_FEATURE_TCP_USEC_TS) struct rta_session { __u8 proto; @@ -653,8 +646,7 @@ enum { * (handle, cookie, etc.) and stats. \ */ -#define TCA_RTA(r) \ - ((struct rtattr *)(((char *)(r)) + NLMSG_ALIGN(sizeof(struct tcmsg)))) +#define TCA_RTA(r) ((struct rtattr *)(((char *)(r)) + NLMSG_ALIGN(sizeof(struct tcmsg)))) #define TCA_PAYLOAD(n) NLMSG_PAYLOAD(n, sizeof(struct tcmsg)) /******************************************************************** @@ -802,8 +794,7 @@ enum { #define TCA_ROOT_MAX (__TCA_ROOT_MAX - 1) }; -#define TA_RTA(r) \ - ((struct rtattr *)(((char *)(r)) + NLMSG_ALIGN(sizeof(struct tcamsg)))) +#define TA_RTA(r) ((struct rtattr *)(((char *)(r)) + NLMSG_ALIGN(sizeof(struct tcamsg)))) #define TA_PAYLOAD(n) NLMSG_PAYLOAD(n, sizeof(struct tcamsg)) /* tcamsg flags stored in attribute TCA_ROOT_FLAGS * diff --git a/include/arch/x86_64/linux/rxrpc.h b/include/arch/x86_64/linux/rxrpc.h index dda19740..ee5b3b0d 100644 --- a/include/arch/x86_64/linux/rxrpc.h +++ b/include/arch/x86_64/linux/rxrpc.h @@ -18,8 +18,8 @@ struct sockaddr_rxrpc { __kernel_sa_family_t srx_family; /* address family */ __u16 srx_service; /* service desired */ - __u16 transport_type; /* type of transport socket (SOCK_DGRAM) */ - __u16 transport_len; /* length of transport address */ + __u16 transport_type; /* type of transport socket (SOCK_DGRAM) */ + __u16 transport_len; /* length of transport address */ union { __kernel_sa_family_t family; /* transport address family */ struct sockaddr_in sin; /* IPv4 transport address */ @@ -30,12 +30,11 @@ struct sockaddr_rxrpc { /* * RxRPC socket options */ -#define RXRPC_SECURITY_KEY 1 /* [clnt] set client security key */ -#define RXRPC_SECURITY_KEYRING 2 /* [srvr] set ring of server security keys */ -#define RXRPC_EXCLUSIVE_CONNECTION \ - 3 /* Deprecated; use RXRPC_EXCLUSIVE_CALL instead */ -#define RXRPC_MIN_SECURITY_LEVEL 4 /* minimum security level */ -#define RXRPC_UPGRADEABLE_SERVICE 5 /* Upgrade service[0] -> service[1] */ +#define RXRPC_SECURITY_KEY 1 /* [clnt] set client security key */ +#define RXRPC_SECURITY_KEYRING 2 /* [srvr] set ring of server security keys */ +#define RXRPC_EXCLUSIVE_CONNECTION 3 /* Deprecated; use RXRPC_EXCLUSIVE_CALL instead */ +#define RXRPC_MIN_SECURITY_LEVEL 4 /* minimum security level */ +#define RXRPC_UPGRADEABLE_SERVICE 5 /* Upgrade service[0] -> service[1] */ #define RXRPC_SUPPORTED_CMSG \ 6 /* Get highest supported control message type \ */ @@ -49,25 +48,25 @@ struct sockaddr_rxrpc { * - s/r/- indicate whether these are applicable to sendmsg() and/or recvmsg() */ enum rxrpc_cmsg_type { - RXRPC_USER_CALL_ID = 1, /* -sr: User call ID specifier */ - RXRPC_ABORT = 2, /* -sr: Abort request / notification [terminal] */ - RXRPC_ACK = 3, /* S-r: RPC op final ACK received [terminal] */ - RXRPC_NET_ERROR = 5, /* --r: Network error received [terminal] */ - RXRPC_BUSY = 6, /* C-r: Server busy received [terminal] */ - RXRPC_LOCAL_ERROR = 7, /* --r: Local error generated [terminal] */ - RXRPC_NEW_CALL = 8, /* S-r: New incoming call notification */ - RXRPC_EXCLUSIVE_CALL = 10, /* Cs-: Call should be on exclusive - connection */ - RXRPC_UPGRADE_SERVICE = 11, /* Cs-: Request service upgrade for client - call */ - RXRPC_TX_LENGTH = 12, /* -s-: Total length of Tx data */ - RXRPC_SET_CALL_TIMEOUT = 13, /* -s-: Set one or more call timeouts */ - RXRPC_CHARGE_ACCEPT = 14, /* Ss-: Charge the accept pool with a user - call ID */ - RXRPC_OOB_ID = 15, /* -sr: OOB message ID */ - RXRPC_CHALLENGED = 16, /* C-r: Info on a received CHALLENGE */ - RXRPC_RESPOND = 17, /* Cs-: Respond to a challenge */ - RXRPC_RESPONDED = 18, /* S-r: Data received in RESPONSE */ + RXRPC_USER_CALL_ID = 1, /* -sr: User call ID specifier */ + RXRPC_ABORT = 2, /* -sr: Abort request / notification [terminal] */ + RXRPC_ACK = 3, /* S-r: RPC op final ACK received [terminal] */ + RXRPC_NET_ERROR = 5, /* --r: Network error received [terminal] */ + RXRPC_BUSY = 6, /* C-r: Server busy received [terminal] */ + RXRPC_LOCAL_ERROR = 7, /* --r: Local error generated [terminal] */ + RXRPC_NEW_CALL = 8, /* S-r: New incoming call notification */ + RXRPC_EXCLUSIVE_CALL = 10, /* Cs-: Call should be on exclusive + connection */ + RXRPC_UPGRADE_SERVICE = 11, /* Cs-: Request service upgrade for client + call */ + RXRPC_TX_LENGTH = 12, /* -s-: Total length of Tx data */ + RXRPC_SET_CALL_TIMEOUT = 13, /* -s-: Set one or more call timeouts */ + RXRPC_CHARGE_ACCEPT = 14, /* Ss-: Charge the accept pool with a user + call ID */ + RXRPC_OOB_ID = 15, /* -sr: OOB message ID */ + RXRPC_CHALLENGED = 16, /* C-r: Info on a received CHALLENGE */ + RXRPC_RESPOND = 17, /* Cs-: Respond to a challenge */ + RXRPC_RESPONDED = 18, /* S-r: Data received in RESPONSE */ RXRPC_RESP_RXGK_APPDATA = 19, /* Cs-: RESPONSE: RxGK app data to include */ RXRPC__SUPPORTED @@ -131,26 +130,22 @@ enum rxrpc_cmsg_type { #define RXKADNOAUTH 19270405 /* caller not authorised */ #define RXKADBADKEY 19270406 /* illegal key: bad parity or weak */ #define RXKADBADTICKET 19270407 /* security object was passed a bad ticket */ -#define RXKADUNKNOWNKEY \ - 19270408 /* ticket contained unknown key version number */ -#define RXKADEXPIRED 19270409 /* authentication expired */ -#define RXKADSEALEDINCON 19270410 /* sealed data inconsistent */ -#define RXKADDATALEN 19270411 /* user data too long */ -#define RXKADILLEGALLEVEL \ - 19270412 /* caller not authorised to use encrypted conns */ +#define RXKADUNKNOWNKEY 19270408 /* ticket contained unknown key version number */ +#define RXKADEXPIRED 19270409 /* authentication expired */ +#define RXKADSEALEDINCON 19270410 /* sealed data inconsistent */ +#define RXKADDATALEN 19270411 /* user data too long */ +#define RXKADILLEGALLEVEL 19270412 /* caller not authorised to use encrypted conns */ /* * RxGK GSSAPI security abort codes. */ -#if 0 /* Original standard abort codes (used by OpenAFS) */ -#define RXGK_INCONSISTENCY \ - 1233242880 /* Security module structure inconsistent */ -#define RXGK_PACKETSHORT \ - 1233242881 /* Packet too short for security challenge */ -#define RXGK_BADCHALLENGE 1233242882 /* Invalid security challenge */ -#define RXGK_BADETYPE \ - 1233242883 /* Invalid or impermissible encryption type \ - */ +#if 0 /* Original standard abort codes (used by OpenAFS) */ +#define RXGK_INCONSISTENCY 1233242880 /* Security module structure inconsistent */ +#define RXGK_PACKETSHORT 1233242881 /* Packet too short for security challenge */ +#define RXGK_BADCHALLENGE 1233242882 /* Invalid security challenge */ +#define RXGK_BADETYPE \ + 1233242883 /* Invalid or impermissible encryption type \ + */ #define RXGK_BADLEVEL 1233242884 /* Invalid or impermissible security level */ #define RXGK_BADKEYNO 1233242885 /* Key version number not found */ #define RXGK_EXPIRED 1233242886 /* Token has expired */ @@ -158,35 +153,32 @@ enum rxrpc_cmsg_type { #define RXGK_BAD_TOKEN 1233242888 /* Security object was passed a bad token */ #define RXGK_SEALED_INCON 1233242889 /* Sealed data inconsistent */ #define RXGK_DATA_LEN 1233242890 /* User data too long */ -#define RXGK_BAD_QOP \ - 1233242891 /* Inadequate quality of protection available \ - */ -#else /* Revised standard abort codes (used by YFS) */ -#define RXGK_INCONSISTENCY \ - 1233242880 /* Security module structure inconsistent */ -#define RXGK_PACKETSHORT \ - 1233242881 /* Packet too short for security challenge */ -#define RXGK_BADCHALLENGE 1233242882 /* Security challenge/response failed */ -#define RXGK_SEALEDINCON 1233242883 /* Sealed data is inconsistent */ -#define RXGK_NOTAUTH 1233242884 /* Caller not authorised */ -#define RXGK_EXPIRED 1233242885 /* Authentication expired */ -#define RXGK_BADLEVEL \ - 1233242886 /* Unsupported or not permitted security level */ -#define RXGK_BADKEYNO 1233242887 /* Bad transport key number */ -#define RXGK_NOTRXGK 1233242888 /* Security layer is not rxgk */ -#define RXGK_UNSUPPORTED 1233242889 /* Endpoint does not support rxgk */ -#define RXGK_GSSERROR 1233242890 /* GSSAPI mechanism error */ +#define RXGK_BAD_QOP \ + 1233242891 /* Inadequate quality of protection available \ + */ +#else /* Revised standard abort codes (used by YFS) */ +#define RXGK_INCONSISTENCY 1233242880 /* Security module structure inconsistent */ +#define RXGK_PACKETSHORT 1233242881 /* Packet too short for security challenge */ +#define RXGK_BADCHALLENGE 1233242882 /* Security challenge/response failed */ +#define RXGK_SEALEDINCON 1233242883 /* Sealed data is inconsistent */ +#define RXGK_NOTAUTH 1233242884 /* Caller not authorised */ +#define RXGK_EXPIRED 1233242885 /* Authentication expired */ +#define RXGK_BADLEVEL 1233242886 /* Unsupported or not permitted security level */ +#define RXGK_BADKEYNO 1233242887 /* Bad transport key number */ +#define RXGK_NOTRXGK 1233242888 /* Security layer is not rxgk */ +#define RXGK_UNSUPPORTED 1233242889 /* Endpoint does not support rxgk */ +#define RXGK_GSSERROR 1233242890 /* GSSAPI mechanism error */ #endif /* * Challenge information in the RXRPC_CHALLENGED control message. */ struct rxrpc_challenge { - __u16 service_id; /* The service ID of the connection (may be upgraded) - */ + __u16 service_id; /* The service ID of the connection (may be upgraded) + */ __u8 security_index; /* The security index of the connection */ __u8 pad; /* Round out to a multiple of 4 bytes. */ - /* ... The security class gets to append extra information ... */ + /* ... The security class gets to append extra information ... */ }; struct rxgk_challenge { diff --git a/include/arch/x86_64/linux/scc.h b/include/arch/x86_64/linux/scc.h index ce9c783b..ac19e3ef 100644 --- a/include/arch/x86_64/linux/scc.h +++ b/include/arch/x86_64/linux/scc.h @@ -87,7 +87,7 @@ enum CLOCK_sources { CLK_DIVIDER, /* Rx = DPLL, Tx = divider (fullduplex with */ /* modems without clock regeneration */ CLK_BRG /* experimental fullduplex mode with DPLL/BRG for */ - /* MODEMs without clock recovery */ + /* MODEMs without clock recovery */ }; /* Tx state */ diff --git a/include/arch/x86_64/linux/sched.h b/include/arch/x86_64/linux/sched.h index 8d0aaa11..d598b78e 100644 --- a/include/arch/x86_64/linux/sched.h +++ b/include/arch/x86_64/linux/sched.h @@ -10,20 +10,18 @@ #define CSIGNAL 0x000000ff /* signal mask to be sent at exit */ #define CLONE_VM 0x00000100 /* set if VM shared between processes */ #define CLONE_FS 0x00000200 /* set if fs info shared between processes */ -#define CLONE_FILES \ - 0x00000400 /* set if open files shared between processes \ - */ -#define CLONE_SIGHAND \ - 0x00000800 /* set if signal handlers and blocked signals shared */ -#define CLONE_PIDFD 0x00001000 /* set if a pidfd should be placed in parent */ +#define CLONE_FILES \ + 0x00000400 /* set if open files shared between processes \ + */ +#define CLONE_SIGHAND 0x00000800 /* set if signal handlers and blocked signals shared */ +#define CLONE_PIDFD 0x00001000 /* set if a pidfd should be placed in parent */ #define CLONE_PTRACE \ 0x00002000 /* set if we want to let tracing continue on the child too \ */ -#define CLONE_VFORK \ - 0x00004000 /* set if the parent wants the child to wake it up on \ - mm_release */ -#define CLONE_PARENT \ - 0x00008000 /* set if we want to have the same parent as the cloner */ +#define CLONE_VFORK \ + 0x00004000 /* set if the parent wants the child to wake it up on \ + mm_release */ +#define CLONE_PARENT 0x00008000 /* set if we want to have the same parent as the cloner */ #define CLONE_THREAD 0x00010000 /* Same thread group? */ #define CLONE_NEWNS 0x00020000 /* New mount namespace group */ #define CLONE_SYSVSEM 0x00040000 /* share system V SEM_UNDO semantics */ @@ -31,9 +29,9 @@ #define CLONE_PARENT_SETTID 0x00100000 /* set the TID in the parent */ #define CLONE_CHILD_CLEARTID 0x00200000 /* clear the TID in the child */ #define CLONE_DETACHED 0x00400000 /* Unused, ignored */ -#define CLONE_UNTRACED \ - 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on \ - this clone */ +#define CLONE_UNTRACED \ + 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on \ + this clone */ #define CLONE_CHILD_SETTID 0x01000000 /* set the TID in the child */ #define CLONE_NEWCGROUP 0x02000000 /* New cgroup namespace */ #define CLONE_NEWUTS 0x04000000 /* New utsname namespace */ @@ -44,8 +42,7 @@ #define CLONE_IO 0x80000000 /* Clone io context */ /* Flags for the clone3() syscall. */ -#define CLONE_CLEAR_SIGHAND \ - 0x100000000ULL /* Clear any signal handler and reset to SIG_DFL. */ +#define CLONE_CLEAR_SIGHAND 0x100000000ULL /* Clear any signal handler and reset to SIG_DFL. */ #define CLONE_INTO_CGROUP \ 0x200000000ULL /* Clone into a specific cgroup given the right \ permissions. */ @@ -150,11 +147,10 @@ struct clone_args { #define SCHED_FLAG_KEEP_ALL (SCHED_FLAG_KEEP_POLICY | SCHED_FLAG_KEEP_PARAMS) -#define SCHED_FLAG_UTIL_CLAMP \ - (SCHED_FLAG_UTIL_CLAMP_MIN | SCHED_FLAG_UTIL_CLAMP_MAX) +#define SCHED_FLAG_UTIL_CLAMP (SCHED_FLAG_UTIL_CLAMP_MIN | SCHED_FLAG_UTIL_CLAMP_MAX) -#define SCHED_FLAG_ALL \ - (SCHED_FLAG_RESET_ON_FORK | SCHED_FLAG_RECLAIM | \ - SCHED_FLAG_DL_OVERRUN | SCHED_FLAG_KEEP_ALL | SCHED_FLAG_UTIL_CLAMP) +#define SCHED_FLAG_ALL \ + (SCHED_FLAG_RESET_ON_FORK | SCHED_FLAG_RECLAIM | SCHED_FLAG_DL_OVERRUN | SCHED_FLAG_KEEP_ALL | \ + SCHED_FLAG_UTIL_CLAMP) #endif /* _LINUX_SCHED_H */ diff --git a/include/arch/x86_64/linux/sctp.h b/include/arch/x86_64/linux/sctp.h index 9ba5f999..d75ba431 100644 --- a/include/arch/x86_64/linux/sctp.h +++ b/include/arch/x86_64/linux/sctp.h @@ -308,9 +308,9 @@ struct sctp_authinfo { * a bitwise OR of these values. */ enum sctp_sinfo_flags { - SCTP_UNORDERED = (1 << 0), /* Send/receive message unordered. */ - SCTP_ADDR_OVER = (1 << 1), /* Override the primary destination. */ - SCTP_ABORT = (1 << 2), /* Send an ABORT message to the peer. */ + SCTP_UNORDERED = (1 << 0), /* Send/receive message unordered. */ + SCTP_ADDR_OVER = (1 << 1), /* Override the primary destination. */ + SCTP_ABORT = (1 << 2), /* Send an ABORT message to the peer. */ SCTP_SACK_IMMEDIATELY = (1 << 3), /* SACK should be sent without delay. */ /* 2 bits here have been used by SCTP_PR_SCTP_MASK */ @@ -318,7 +318,7 @@ enum sctp_sinfo_flags { SCTP_PR_SCTP_ALL = (1 << 7), SCTP_NOTIFICATION = MSG_NOTIFICATION, /* Next message is not user msg but notification. */ - SCTP_EOF = MSG_FIN, /* Initiate graceful shutdown process. */ + SCTP_EOF = MSG_FIN, /* Initiate graceful shutdown process. */ }; typedef union { diff --git a/include/arch/x86_64/linux/securebits.h b/include/arch/x86_64/linux/securebits.h index 6606366a..8cfaf799 100644 --- a/include/arch/x86_64/linux/securebits.h +++ b/include/arch/x86_64/linux/securebits.h @@ -29,9 +29,8 @@ #define SECURE_NO_SETUID_FIXUP 2 #define SECURE_NO_SETUID_FIXUP_LOCKED 3 /* make bit-2 immutable */ -#define SECBIT_NO_SETUID_FIXUP (issecure_mask(SECURE_NO_SETUID_FIXUP)) -#define SECBIT_NO_SETUID_FIXUP_LOCKED \ - (issecure_mask(SECURE_NO_SETUID_FIXUP_LOCKED)) +#define SECBIT_NO_SETUID_FIXUP (issecure_mask(SECURE_NO_SETUID_FIXUP)) +#define SECBIT_NO_SETUID_FIXUP_LOCKED (issecure_mask(SECURE_NO_SETUID_FIXUP_LOCKED)) /* When set, a process can retain its capabilities even after transitioning to a non-root user (the set-uid fixup suppressed by @@ -48,38 +47,29 @@ #define SECURE_NO_CAP_AMBIENT_RAISE 6 #define SECURE_NO_CAP_AMBIENT_RAISE_LOCKED 7 /* make bit-6 immutable */ -#define SECBIT_NO_CAP_AMBIENT_RAISE (issecure_mask(SECURE_NO_CAP_AMBIENT_RAISE)) -#define SECBIT_NO_CAP_AMBIENT_RAISE_LOCKED \ - (issecure_mask(SECURE_NO_CAP_AMBIENT_RAISE_LOCKED)) +#define SECBIT_NO_CAP_AMBIENT_RAISE (issecure_mask(SECURE_NO_CAP_AMBIENT_RAISE)) +#define SECBIT_NO_CAP_AMBIENT_RAISE_LOCKED (issecure_mask(SECURE_NO_CAP_AMBIENT_RAISE_LOCKED)) /* See Documentation/userspace-api/check_exec.rst */ #define SECURE_EXEC_RESTRICT_FILE 8 #define SECURE_EXEC_RESTRICT_FILE_LOCKED 9 /* make bit-8 immutable */ -#define SECBIT_EXEC_RESTRICT_FILE (issecure_mask(SECURE_EXEC_RESTRICT_FILE)) -#define SECBIT_EXEC_RESTRICT_FILE_LOCKED \ - (issecure_mask(SECURE_EXEC_RESTRICT_FILE_LOCKED)) +#define SECBIT_EXEC_RESTRICT_FILE (issecure_mask(SECURE_EXEC_RESTRICT_FILE)) +#define SECBIT_EXEC_RESTRICT_FILE_LOCKED (issecure_mask(SECURE_EXEC_RESTRICT_FILE_LOCKED)) /* See Documentation/userspace-api/check_exec.rst */ #define SECURE_EXEC_DENY_INTERACTIVE 10 #define SECURE_EXEC_DENY_INTERACTIVE_LOCKED 11 /* make bit-10 immutable */ -#define SECBIT_EXEC_DENY_INTERACTIVE \ - (issecure_mask(SECURE_EXEC_DENY_INTERACTIVE)) -#define SECBIT_EXEC_DENY_INTERACTIVE_LOCKED \ - (issecure_mask(SECURE_EXEC_DENY_INTERACTIVE_LOCKED)) - -#define SECURE_ALL_BITS \ - (issecure_mask(SECURE_NOROOT) | \ - issecure_mask(SECURE_NO_SETUID_FIXUP) | \ - issecure_mask(SECURE_KEEP_CAPS) | \ - issecure_mask(SECURE_NO_CAP_AMBIENT_RAISE) | \ - issecure_mask(SECURE_EXEC_RESTRICT_FILE) | \ +#define SECBIT_EXEC_DENY_INTERACTIVE (issecure_mask(SECURE_EXEC_DENY_INTERACTIVE)) +#define SECBIT_EXEC_DENY_INTERACTIVE_LOCKED (issecure_mask(SECURE_EXEC_DENY_INTERACTIVE_LOCKED)) + +#define SECURE_ALL_BITS \ + (issecure_mask(SECURE_NOROOT) | issecure_mask(SECURE_NO_SETUID_FIXUP) | issecure_mask(SECURE_KEEP_CAPS) | \ + issecure_mask(SECURE_NO_CAP_AMBIENT_RAISE) | issecure_mask(SECURE_EXEC_RESTRICT_FILE) | \ issecure_mask(SECURE_EXEC_DENY_INTERACTIVE)) #define SECURE_ALL_LOCKS (SECURE_ALL_BITS << 1) -#define SECURE_ALL_UNPRIVILEGED \ - (issecure_mask(SECURE_EXEC_RESTRICT_FILE) | \ - issecure_mask(SECURE_EXEC_DENY_INTERACTIVE)) +#define SECURE_ALL_UNPRIVILEGED (issecure_mask(SECURE_EXEC_RESTRICT_FILE) | issecure_mask(SECURE_EXEC_DENY_INTERACTIVE)) #endif /* _LINUX_SECUREBITS_H */ diff --git a/include/arch/x86_64/linux/selinux_netlink.h b/include/arch/x86_64/linux/selinux_netlink.h index beaba300..be243728 100644 --- a/include/arch/x86_64/linux/selinux_netlink.h +++ b/include/arch/x86_64/linux/selinux_netlink.h @@ -17,11 +17,7 @@ /* Message types. */ #define SELNL_MSG_BASE 0x10 -enum { - SELNL_MSG_SETENFORCE = SELNL_MSG_BASE, - SELNL_MSG_POLICYLOAD, - SELNL_MSG_MAX -}; +enum { SELNL_MSG_SETENFORCE = SELNL_MSG_BASE, SELNL_MSG_POLICYLOAD, SELNL_MSG_MAX }; /* Multicast groups - backwards compatiblility for userspace */ #define SELNL_GRP_NONE 0x00000000 diff --git a/include/arch/x86_64/linux/sem.h b/include/arch/x86_64/linux/sem.h index 38685e75..c607bc92 100644 --- a/include/arch/x86_64/linux/sem.h +++ b/include/arch/x86_64/linux/sem.h @@ -23,11 +23,11 @@ /* Obsolete, used only for backwards compatibility and libc5 compiles */ struct semid_ds { - struct ipc_perm sem_perm; /* permissions .. see ipc.h */ - __kernel_old_time_t sem_otime; /* last semop time */ - __kernel_old_time_t sem_ctime; /* create/last semctl() time */ - struct sem *sem_base; /* ptr to first semaphore in array */ - struct sem_queue *sem_pending; /* pending operations to be processed */ + struct ipc_perm sem_perm; /* permissions .. see ipc.h */ + __kernel_old_time_t sem_otime; /* last semop time */ + __kernel_old_time_t sem_ctime; /* create/last semctl() time */ + struct sem *sem_base; /* ptr to first semaphore in array */ + struct sem_queue *sem_pending; /* pending operations to be processed */ struct sem_queue **sem_pending_last; /* last pending operation */ struct sem_undo *undo; /* undo requests on this array */ unsigned short sem_nsems; /* no. of semaphores in array */ diff --git a/include/arch/x86_64/linux/serial_reg.h b/include/arch/x86_64/linux/serial_reg.h index 981d703b..74188a3e 100644 --- a/include/arch/x86_64/linux/serial_reg.h +++ b/include/arch/x86_64/linux/serial_reg.h @@ -41,12 +41,11 @@ #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_IIR_64BYTE_FIFO 0x20 /* 16750 64 bytes FIFO */ -#define UART_IIR_FIFO_ENABLED \ - 0xc0 /* FIFOs enabled / port type identification */ +#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_IIR_64BYTE_FIFO 0x20 /* 16750 64 bytes FIFO */ +#define UART_IIR_FIFO_ENABLED 0xc0 /* FIFOs enabled / port type identification */ #define UART_IIR_FIFO_ENABLED_8250 0x00 /* 8250: no FIFO */ #define UART_IIR_FIFO_ENABLED_16550 0x80 /* 16550: (broken/unusable) FIFO */ #define UART_IIR_FIFO_ENABLED_16550A 0xc0 /* 16550A: FIFO enabled */ @@ -99,9 +98,8 @@ 0x20 /* Go into 64 byte mode (TI16C750 and \ some Freescale UARTs) */ -#define UART_FCR_R_TRIG_SHIFT 6 -#define UART_FCR_R_TRIG_BITS(x) \ - (((x) & UART_FCR_TRIGGER_MASK) >> UART_FCR_R_TRIG_SHIFT) +#define UART_FCR_R_TRIG_SHIFT 6 +#define UART_FCR_R_TRIG_BITS(x) (((x) & UART_FCR_TRIGGER_MASK) >> UART_FCR_R_TRIG_SHIFT) #define UART_FCR_R_TRIG_MAX_STATE 4 #define UART_LCR 3 /* Out: Line Control Register */ @@ -138,29 +136,27 @@ #define UART_MCR_RTS 0x02 /* RTS complement */ #define UART_MCR_DTR 0x01 /* DTR complement */ -#define UART_LSR 5 /* In: Line Status Register */ -#define UART_LSR_FIFOE 0x80 /* Fifo error */ -#define UART_LSR_TEMT 0x40 /* Transmitter empty */ -#define UART_LSR_THRE 0x20 /* Transmit-hold-register empty */ -#define UART_LSR_BI 0x10 /* Break interrupt indicator */ -#define UART_LSR_FE 0x08 /* Frame error indicator */ -#define UART_LSR_PE 0x04 /* Parity error indicator */ -#define UART_LSR_OE 0x02 /* Overrun error indicator */ -#define UART_LSR_DR 0x01 /* Receiver data ready */ -#define UART_LSR_BRK_ERROR_BITS \ - (UART_LSR_BI | UART_LSR_FE | UART_LSR_PE | UART_LSR_OE) - -#define UART_MSR 6 /* In: Modem Status Register */ -#define UART_MSR_DCD 0x80 /* Data Carrier Detect */ -#define UART_MSR_RI 0x40 /* Ring Indicator */ -#define UART_MSR_DSR 0x20 /* Data Set Ready */ -#define UART_MSR_CTS 0x10 /* Clear to Send */ -#define UART_MSR_DDCD 0x08 /* Delta DCD */ -#define UART_MSR_TERI 0x04 /* Trailing edge ring indicator */ -#define UART_MSR_DDSR 0x02 /* Delta DSR */ -#define UART_MSR_DCTS 0x01 /* Delta CTS */ -#define UART_MSR_ANY_DELTA \ - (UART_MSR_DDCD | UART_MSR_TERI | UART_MSR_DDSR | UART_MSR_DCTS) +#define UART_LSR 5 /* In: Line Status Register */ +#define UART_LSR_FIFOE 0x80 /* Fifo error */ +#define UART_LSR_TEMT 0x40 /* Transmitter empty */ +#define UART_LSR_THRE 0x20 /* Transmit-hold-register empty */ +#define UART_LSR_BI 0x10 /* Break interrupt indicator */ +#define UART_LSR_FE 0x08 /* Frame error indicator */ +#define UART_LSR_PE 0x04 /* Parity error indicator */ +#define UART_LSR_OE 0x02 /* Overrun error indicator */ +#define UART_LSR_DR 0x01 /* Receiver data ready */ +#define UART_LSR_BRK_ERROR_BITS (UART_LSR_BI | UART_LSR_FE | UART_LSR_PE | UART_LSR_OE) + +#define UART_MSR 6 /* In: Modem Status Register */ +#define UART_MSR_DCD 0x80 /* Data Carrier Detect */ +#define UART_MSR_RI 0x40 /* Ring Indicator */ +#define UART_MSR_DSR 0x20 /* Data Set Ready */ +#define UART_MSR_CTS 0x10 /* Clear to Send */ +#define UART_MSR_DDCD 0x08 /* Delta DCD */ +#define UART_MSR_TERI 0x04 /* Trailing edge ring indicator */ +#define UART_MSR_DDSR 0x02 /* Delta DSR */ +#define UART_MSR_DCTS 0x01 /* Delta CTS */ +#define UART_MSR_ANY_DELTA (UART_MSR_DDCD | UART_MSR_TERI | UART_MSR_DDSR | UART_MSR_DCTS) #define UART_SCR 7 /* I/O: Scratch Register */ @@ -325,14 +321,12 @@ #define UART_RSA_SRR_Rx_FIFO_NEMP (1 << 3) /* Rx FIFO is not empty (1) */ #define UART_RSA_SRR_Rx_FIFO_NHFL (1 << 4) /* Rx FIFO is not half full (1) */ #define UART_RSA_SRR_Rx_FIFO_NFUL (1 << 5) /* Rx FIFO is not full (1) */ -#define UART_RSA_SRR_Rx_TOUT \ - (1 << 6) /* Character reception timeout occurred (1) */ -#define UART_RSA_SRR_TIMER (1 << 7) /* Timer interrupt occurred */ +#define UART_RSA_SRR_Rx_TOUT (1 << 6) /* Character reception timeout occurred (1) */ +#define UART_RSA_SRR_TIMER (1 << 7) /* Timer interrupt occurred */ #define UART_RSA_FRR ((UART_RSA_BASE) + 2) /* OUT: FIFO Reset Register */ -#define UART_RSA_TIVSR \ - ((UART_RSA_BASE) + 3) /* I/O: Timer Interval Value Set Register */ +#define UART_RSA_TIVSR ((UART_RSA_BASE) + 3) /* I/O: Timer Interval Value Set Register */ #define UART_RSA_TCR ((UART_RSA_BASE) + 4) /* OUT: Timer Control Register */ diff --git a/include/arch/x86_64/linux/sev-guest.h b/include/arch/x86_64/linux/sev-guest.h index 4b510b8a..dff882f5 100644 --- a/include/arch/x86_64/linux/sev-guest.h +++ b/include/arch/x86_64/linux/sev-guest.h @@ -78,24 +78,20 @@ struct snp_ext_report_req { #define SNP_GUEST_REQ_IOC_TYPE 'S' /* Get SNP attestation report */ -#define SNP_GET_REPORT \ - _IOWR(SNP_GUEST_REQ_IOC_TYPE, 0x0, struct snp_guest_request_ioctl) +#define SNP_GET_REPORT _IOWR(SNP_GUEST_REQ_IOC_TYPE, 0x0, struct snp_guest_request_ioctl) /* Get a derived key from the root */ -#define SNP_GET_DERIVED_KEY \ - _IOWR(SNP_GUEST_REQ_IOC_TYPE, 0x1, struct snp_guest_request_ioctl) +#define SNP_GET_DERIVED_KEY _IOWR(SNP_GUEST_REQ_IOC_TYPE, 0x1, struct snp_guest_request_ioctl) /* Get SNP extended report as defined in the GHCB specification version 2. */ -#define SNP_GET_EXT_REPORT \ - _IOWR(SNP_GUEST_REQ_IOC_TYPE, 0x2, struct snp_guest_request_ioctl) +#define SNP_GET_EXT_REPORT _IOWR(SNP_GUEST_REQ_IOC_TYPE, 0x2, struct snp_guest_request_ioctl) /* Guest message request EXIT_INFO_2 constants */ -#define SNP_GUEST_FW_ERR_MASK GENMASK_ULL(31, 0) -#define SNP_GUEST_VMM_ERR_SHIFT 32 -#define SNP_GUEST_VMM_ERR(x) (((u64)x) << SNP_GUEST_VMM_ERR_SHIFT) -#define SNP_GUEST_FW_ERR(x) ((x) & SNP_GUEST_FW_ERR_MASK) -#define SNP_GUEST_ERR(vmm_err, fw_err) \ - (SNP_GUEST_VMM_ERR(vmm_err) | SNP_GUEST_FW_ERR(fw_err)) +#define SNP_GUEST_FW_ERR_MASK GENMASK_ULL(31, 0) +#define SNP_GUEST_VMM_ERR_SHIFT 32 +#define SNP_GUEST_VMM_ERR(x) (((u64)x) << SNP_GUEST_VMM_ERR_SHIFT) +#define SNP_GUEST_FW_ERR(x) ((x) & SNP_GUEST_FW_ERR_MASK) +#define SNP_GUEST_ERR(vmm_err, fw_err) (SNP_GUEST_VMM_ERR(vmm_err) | SNP_GUEST_FW_ERR(fw_err)) #define SNP_GUEST_VMM_ERR_INVALID_LEN 1 #define SNP_GUEST_VMM_ERR_BUSY 2 diff --git a/include/arch/x86_64/linux/snmp.h b/include/arch/x86_64/linux/snmp.h index 5ffd83b1..e4b53937 100644 --- a/include/arch/x86_64/linux/snmp.h +++ b/include/arch/x86_64/linux/snmp.h @@ -240,19 +240,19 @@ enum { LINUX_MIB_PFMEMALLOCDROP, LINUX_MIB_TCPMINTTLDROP, /* RFC 5082 */ LINUX_MIB_TCPDEFERACCEPTDROP, - LINUX_MIB_IPRPFILTER, /* IP Reverse Path Filter (rp_filter) */ - LINUX_MIB_TCPTIMEWAITOVERFLOW, /* TCPTimeWaitOverflow */ - LINUX_MIB_TCPREQQFULLDOCOOKIES, /* TCPReqQFullDoCookies */ - LINUX_MIB_TCPREQQFULLDROP, /* TCPReqQFullDrop */ - LINUX_MIB_TCPRETRANSFAIL, /* TCPRetransFail */ - LINUX_MIB_TCPRCVCOALESCE, /* TCPRcvCoalesce */ - LINUX_MIB_TCPBACKLOGCOALESCE, /* TCPBacklogCoalesce */ - 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_IPRPFILTER, /* IP Reverse Path Filter (rp_filter) */ + LINUX_MIB_TCPTIMEWAITOVERFLOW, /* TCPTimeWaitOverflow */ + LINUX_MIB_TCPREQQFULLDOCOOKIES, /* TCPReqQFullDoCookies */ + LINUX_MIB_TCPREQQFULLDROP, /* TCPReqQFullDrop */ + LINUX_MIB_TCPRETRANSFAIL, /* TCPRetransFail */ + LINUX_MIB_TCPRCVCOALESCE, /* TCPRcvCoalesce */ + LINUX_MIB_TCPBACKLOGCOALESCE, /* TCPBacklogCoalesce */ + 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_TCPFASTOPENACTIVEFAIL, /* TCPFastOpenActiveFail */ LINUX_MIB_TCPFASTOPENPASSIVE, /* TCPFastOpenPassive*/ LINUX_MIB_TCPFASTOPENPASSIVEFAIL, /* TCPFastOpenPassiveFail */ diff --git a/include/arch/x86_64/linux/sockios.h b/include/arch/x86_64/linux/sockios.h index 96c608f8..b2a64f98 100644 --- a/include/arch/x86_64/linux/sockios.h +++ b/include/arch/x86_64/linux/sockios.h @@ -42,10 +42,8 @@ #define SIOCGSTAMP SIOCGSTAMP_OLD #define SIOCGSTAMPNS SIOCGSTAMPNS_OLD #else -#define SIOCGSTAMP \ - ((sizeof(struct timeval)) == 8 ? SIOCGSTAMP_OLD : SIOCGSTAMP_NEW) -#define SIOCGSTAMPNS \ - ((sizeof(struct timespec)) == 8 ? SIOCGSTAMPNS_OLD : SIOCGSTAMPNS_NEW) +#define SIOCGSTAMP ((sizeof(struct timeval)) == 8 ? SIOCGSTAMP_OLD : SIOCGSTAMP_NEW) +#define SIOCGSTAMPNS ((sizeof(struct timespec)) == 8 ? SIOCGSTAMPNS_OLD : SIOCGSTAMPNS_NEW) #endif /* Routing table calls. */ diff --git a/include/arch/x86_64/linux/sonet.h b/include/arch/x86_64/linux/sonet.h index 98828b2e..239435bf 100644 --- a/include/arch/x86_64/linux/sonet.h +++ b/include/arch/x86_64/linux/sonet.h @@ -37,13 +37,12 @@ struct sonet_stats { /* set framing mode (SONET/SDH) */ #define SONET_GETFRAMING _IOR('a', ATMIOC_PHYTYP + 6, int) /* get framing mode */ -#define SONET_GETFRSENSE \ - _IOR('a', ATMIOC_PHYTYP + 7, \ - unsigned char[SONET_FRSENSE_SIZE]) /* get \ - framing \ - sense \ - information \ - */ +#define SONET_GETFRSENSE \ + _IOR('a', ATMIOC_PHYTYP + 7, unsigned char[SONET_FRSENSE_SIZE]) /* get \ + framing \ + sense \ + information \ + */ #define SONET_INS_SBIP 1 /* section BIP */ #define SONET_INS_LBIP 2 /* line BIP */ diff --git a/include/arch/x86_64/linux/sound.h b/include/arch/x86_64/linux/sound.h index 6eca9a36..3c533c7c 100644 --- a/include/arch/x86_64/linux/sound.h +++ b/include/arch/x86_64/linux/sound.h @@ -23,7 +23,7 @@ /* #define SND_DEV_SNDPROC 9 */ /* /dev/sndproc for programmable devices (not used) */ /* #define SND_DEV_DMMIDI 9 */ -#define SND_DEV_SYNTH 9 /* Raw synth access /dev/synth (same as /dev/dmfm) */ +#define SND_DEV_SYNTH 9 /* Raw synth access /dev/synth (same as /dev/dmfm) */ #define SND_DEV_DMFM 10 /* Raw synth access /dev/dmfm */ #define SND_DEV_UNKNOWN11 11 #define SND_DEV_ADSP 12 /* Like /dev/dsp (obsolete) */ diff --git a/include/arch/x86_64/linux/soundcard.h b/include/arch/x86_64/linux/soundcard.h index d204e873..16ac1716 100644 --- a/include/arch/x86_64/linux/soundcard.h +++ b/include/arch/x86_64/linux/soundcard.h @@ -78,10 +78,8 @@ */ #ifndef _SIOWR -#if defined(_IOWR) && \ - (defined(_AIX) || \ - (!defined(sun) && !defined(sparc) && !defined(__sparc__) && \ - !defined(__INCioctlh) && !defined(__Lynx__))) +#if defined(_IOWR) && (defined(_AIX) || (!defined(sun) && !defined(sparc) && !defined(__sparc__) && \ + !defined(__INCioctlh) && !defined(__Lynx__))) /* Use already defined ioctl defines if they exist (except with Sun or Sparc) */ #define SIOCPARM_MASK IOCPARM_MASK #define SIOC_VOID IOC_VOID @@ -106,38 +104,33 @@ * we restrict parameters to at most 8191 bytes. */ /* #define SIOCTYPE (0xff<<8) */ -#define SIOCPARM_MASK 0x1fff /* parameters must be < 8192 bytes */ -#define SIOC_VOID 0x00000000 /* no parameters */ -#define SIOC_OUT 0x20000000 /* copy out parameters */ -#define SIOC_IN 0x40000000 /* copy in parameters */ -#define SIOC_INOUT (SIOC_IN | SIOC_OUT) +#define SIOCPARM_MASK 0x1fff /* parameters must be < 8192 bytes */ +#define SIOC_VOID 0x00000000 /* no parameters */ +#define SIOC_OUT 0x20000000 /* copy out parameters */ +#define SIOC_IN 0x40000000 /* copy in parameters */ +#define SIOC_INOUT (SIOC_IN | SIOC_OUT) /* the 0x20000000 is so we can distinguish new ioctl's from old */ -#define _SIO(x, y) ((int)(SIOC_VOID | (x << 8) | y)) -#define _SIOR(x, y, t) \ - ((int)(SIOC_OUT | ((sizeof(t) & SIOCPARM_MASK) << 16) | (x << 8) | y)) -#define _SIOW(x, y, t) \ - ((int)(SIOC_IN | ((sizeof(t) & SIOCPARM_MASK) << 16) | (x << 8) | y)) +#define _SIO(x, y) ((int)(SIOC_VOID | (x << 8) | y)) +#define _SIOR(x, y, t) ((int)(SIOC_OUT | ((sizeof(t) & SIOCPARM_MASK) << 16) | (x << 8) | y)) +#define _SIOW(x, y, t) ((int)(SIOC_IN | ((sizeof(t) & SIOCPARM_MASK) << 16) | (x << 8) | y)) /* this should be _SIORW, but stdio got there first */ -#define _SIOWR(x, y, t) \ - ((int)(SIOC_INOUT | ((sizeof(t) & SIOCPARM_MASK) << 16) | (x << 8) | y)) -#define _SIOC_SIZE(x) ((x >> 16) & SIOCPARM_MASK) -#define _SIOC_DIR(x) (x & 0xf0000000) -#define _SIOC_NONE SIOC_VOID -#define _SIOC_READ SIOC_OUT -#define _SIOC_WRITE SIOC_IN +#define _SIOWR(x, y, t) ((int)(SIOC_INOUT | ((sizeof(t) & SIOCPARM_MASK) << 16) | (x << 8) | y)) +#define _SIOC_SIZE(x) ((x >> 16) & SIOCPARM_MASK) +#define _SIOC_DIR(x) (x & 0xf0000000) +#define _SIOC_NONE SIOC_VOID +#define _SIOC_READ SIOC_OUT +#define _SIOC_WRITE SIOC_IN #endif /* _IOWR */ #endif /* !_SIOWR */ -#define SNDCTL_SEQ_RESET _SIO('Q', 0) -#define SNDCTL_SEQ_SYNC _SIO('Q', 1) -#define SNDCTL_SYNTH_INFO _SIOWR('Q', 2, struct synth_info) -#define SNDCTL_SEQ_CTRLRATE \ - _SIOWR('Q', 3, int) /* Set/get timer resolution (HZ) */ -#define SNDCTL_SEQ_GETOUTCOUNT _SIOR('Q', 4, int) -#define SNDCTL_SEQ_GETINCOUNT _SIOR('Q', 5, int) -#define SNDCTL_SEQ_PERCMODE _SIOW('Q', 6, int) -#define SNDCTL_FM_LOAD_INSTR \ - _SIOW('Q', 7, struct sbi_instrument) /* Obsolete. Don't use!!!!!! */ +#define SNDCTL_SEQ_RESET _SIO('Q', 0) +#define SNDCTL_SEQ_SYNC _SIO('Q', 1) +#define SNDCTL_SYNTH_INFO _SIOWR('Q', 2, struct synth_info) +#define SNDCTL_SEQ_CTRLRATE _SIOWR('Q', 3, int) /* Set/get timer resolution (HZ) */ +#define SNDCTL_SEQ_GETOUTCOUNT _SIOR('Q', 4, int) +#define SNDCTL_SEQ_GETINCOUNT _SIOR('Q', 5, int) +#define SNDCTL_SEQ_PERCMODE _SIOW('Q', 6, int) +#define SNDCTL_FM_LOAD_INSTR _SIOW('Q', 7, struct sbi_instrument) /* Obsolete. Don't use!!!!!! */ #define SNDCTL_SEQ_TESTMIDI _SIOW('Q', 8, int) #define SNDCTL_SEQ_RESETSAMPLES _SIOW('Q', 9, int) #define SNDCTL_SEQ_NRSYNTHS _SIOR('Q', 10, int) @@ -602,7 +595,7 @@ typedef struct audio_buf_info { #define DSP_CAP_TRIGGER 0x00001000 /* Supports SETTRIGGER */ #define DSP_CAP_MMAP 0x00002000 /* Supports mmap() */ #define DSP_CAP_MULTI 0x00004000 /* support multiple open */ -#define DSP_CAP_BIND 0x00008000 /* channel binding to front/rear/cneter/lfe */ +#define DSP_CAP_BIND 0x00008000 /* channel binding to front/rear/cneter/lfe */ #define SNDCTL_DSP_GETTRIGGER _SIOR('P', 16, int) #define SNDCTL_DSP_SETTRIGGER _SIOW('P', 16, int) @@ -801,33 +794,25 @@ typedef struct copr_msg { #define SOUND_MIXER_MUTE SOUND_MIXER_NONE #define SOUND_MIXER_LOUD SOUND_MIXER_NONE -#define SOUND_DEVICE_LABELS \ - { "Vol ", "Bass ", "Trebl", "Synth", "Pcm ", \ - "Spkr ", "Line ", "Mic ", "CD ", "Mix ", \ - "Pcm2 ", "Rec ", "IGain", "OGain", "Line1", \ - "Line2", "Line3", "Digital1", "Digital2", "Digital3", \ - "PhoneIn", "PhoneOut", "Video", "Radio", "Monitor" } +#define SOUND_DEVICE_LABELS \ + { "Vol ", "Bass ", "Trebl", "Synth", "Pcm ", "Spkr ", "Line ", "Mic ", "CD ", \ + "Mix ", "Pcm2 ", "Rec ", "IGain", "OGain", "Line1", "Line2", "Line3", "Digital1", \ + "Digital2", "Digital3", "PhoneIn", "PhoneOut", "Video", "Radio", "Monitor" } -#define SOUND_DEVICE_NAMES \ - { "vol", "bass", "treble", "synth", "pcm", "speaker", "line", \ - "mic", "cd", "mix", "pcm2", "rec", "igain", "ogain", \ - "line1", "line2", "line3", "dig1", "dig2", "dig3", "phin", \ - "phout", "video", "radio", "monitor" } +#define SOUND_DEVICE_NAMES \ + { "vol", "bass", "treble", "synth", "pcm", "speaker", "line", "mic", "cd", \ + "mix", "pcm2", "rec", "igain", "ogain", "line1", "line2", "line3", "dig1", \ + "dig2", "dig3", "phin", "phout", "video", "radio", "monitor" } /* Device bitmask identifiers */ -#define SOUND_MIXER_RECSRC \ - 0xff /* Arg contains a bit for each recording source */ -#define SOUND_MIXER_DEVMASK \ - 0xfe /* Arg contains a bit for each supported device */ -#define SOUND_MIXER_RECMASK \ - 0xfd /* Arg contains a bit for each supported recording source */ -#define SOUND_MIXER_CAPS 0xfc -#define SOUND_CAP_EXCL_INPUT \ - 0x00000001 /* Only one recording source at a time */ -#define SOUND_MIXER_STEREODEVS 0xfb /* Mixer channels supporting stereo */ -#define SOUND_MIXER_OUTSRC \ - 0xfa /* Arg contains a bit for each input source to output */ +#define SOUND_MIXER_RECSRC 0xff /* Arg contains a bit for each recording source */ +#define SOUND_MIXER_DEVMASK 0xfe /* Arg contains a bit for each supported device */ +#define SOUND_MIXER_RECMASK 0xfd /* Arg contains a bit for each supported recording source */ +#define SOUND_MIXER_CAPS 0xfc +#define SOUND_CAP_EXCL_INPUT 0x00000001 /* Only one recording source at a time */ +#define SOUND_MIXER_STEREODEVS 0xfb /* Mixer channels supporting stereo */ +#define SOUND_MIXER_OUTSRC 0xfa /* Arg contains a bit for each input source to output */ #define SOUND_MIXER_OUTMASK \ 0xf9 /* Arg contains a bit for each supported input source to output \ */ @@ -1164,14 +1149,11 @@ void seqbuf_dump(void); /* This function must be provided by programs */ _SEQ_ADVBUF(8); \ } -#define SEQ_START_NOTE(dev, chn, note, vol) \ - _CHN_VOICE(dev, MIDI_NOTEON, chn, note, vol) +#define SEQ_START_NOTE(dev, chn, note, vol) _CHN_VOICE(dev, MIDI_NOTEON, chn, note, vol) -#define SEQ_STOP_NOTE(dev, chn, note, vol) \ - _CHN_VOICE(dev, MIDI_NOTEOFF, chn, note, vol) +#define SEQ_STOP_NOTE(dev, chn, note, vol) _CHN_VOICE(dev, MIDI_NOTEOFF, chn, note, vol) -#define SEQ_KEY_PRESSURE(dev, chn, note, pressure) \ - _CHN_VOICE(dev, MIDI_KEY_PRESSURE, chn, note, pressure) +#define SEQ_KEY_PRESSURE(dev, chn, note, pressure) _CHN_VOICE(dev, MIDI_KEY_PRESSURE, chn, note, pressure) /* * Midi channel messages @@ -1220,18 +1202,14 @@ void seqbuf_dump(void); /* This function must be provided by programs */ _SEQ_ADVBUF(8); \ } -#define SEQ_CHN_PRESSURE(dev, chn, pressure) \ - _CHN_COMMON(dev, MIDI_CHN_PRESSURE, chn, pressure, 0, 0) +#define SEQ_CHN_PRESSURE(dev, chn, pressure) _CHN_COMMON(dev, MIDI_CHN_PRESSURE, chn, pressure, 0, 0) -#define SEQ_SET_PATCH SEQ_PGM_CHANGE -#define SEQ_PGM_CHANGE(dev, chn, patch) \ - _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0) +#define SEQ_SET_PATCH SEQ_PGM_CHANGE +#define SEQ_PGM_CHANGE(dev, chn, patch) _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0) -#define SEQ_CONTROL(dev, chn, controller, value) \ - _CHN_COMMON(dev, MIDI_CTL_CHANGE, chn, controller, 0, value) +#define SEQ_CONTROL(dev, chn, controller, value) _CHN_COMMON(dev, MIDI_CTL_CHANGE, chn, controller, 0, value) -#define SEQ_BENDER(dev, chn, value) \ - _CHN_COMMON(dev, MIDI_PITCH_BEND, chn, 0, 0, value) +#define SEQ_BENDER(dev, chn, value) _CHN_COMMON(dev, MIDI_PITCH_BEND, chn, 0, 0, value) #define SEQ_V2_X_CONTROL(dev, voice, controller, value) \ { \ @@ -1250,16 +1228,11 @@ void seqbuf_dump(void); /* This function must be provided by programs */ * The following 5 macros are incorrectly implemented and obsolete. * Use SEQ_BENDER and SEQ_CONTROL (with proper controller) instead. */ -#define SEQ_PITCHBEND(dev, voice, value) \ - SEQ_V2_X_CONTROL(dev, voice, CTRL_PITCH_BENDER, value) -#define SEQ_BENDER_RANGE(dev, voice, value) \ - SEQ_V2_X_CONTROL(dev, voice, CTRL_PITCH_BENDER_RANGE, value) -#define SEQ_EXPRESSION(dev, voice, value) \ - SEQ_CONTROL(dev, voice, CTL_EXPRESSION, value * 128) -#define SEQ_MAIN_VOLUME(dev, voice, value) \ - SEQ_CONTROL(dev, voice, CTL_MAIN_VOLUME, (value * 16383) / 100) -#define SEQ_PANNING(dev, voice, pos) \ - SEQ_CONTROL(dev, voice, CTL_PAN, (pos + 128) / 2) +#define SEQ_PITCHBEND(dev, voice, value) SEQ_V2_X_CONTROL(dev, voice, CTRL_PITCH_BENDER, value) +#define SEQ_BENDER_RANGE(dev, voice, value) SEQ_V2_X_CONTROL(dev, voice, CTRL_PITCH_BENDER_RANGE, value) +#define SEQ_EXPRESSION(dev, voice, value) SEQ_CONTROL(dev, voice, CTL_EXPRESSION, value * 128) +#define SEQ_MAIN_VOLUME(dev, voice, value) SEQ_CONTROL(dev, voice, CTL_MAIN_VOLUME, (value * 16383) / 100) +#define SEQ_PANNING(dev, voice, pos) SEQ_CONTROL(dev, voice, CTL_PAN, (pos + 128) / 2) /* * Timing and synchronization macros @@ -1326,7 +1299,6 @@ void seqbuf_dump(void); /* This function must be provided by programs */ if (write(seqfd, (char *)(patchx), len) == -1) \ perror("Write patch: /dev/sequencer"); \ } -#define SEQ_WRPATCH2(patchx, len) \ - (SEQ_DUMPBUF(), write(seqfd, (char *)(patchx), len)) +#define SEQ_WRPATCH2(patchx, len) (SEQ_DUMPBUF(), write(seqfd, (char *)(patchx), len)) #endif /* SOUNDCARD_H */ diff --git a/include/arch/x86_64/linux/stat.h b/include/arch/x86_64/linux/stat.h index f324012a..5c02dd62 100644 --- a/include/arch/x86_64/linux/stat.h +++ b/include/arch/x86_64/linux/stat.h @@ -224,8 +224,7 @@ struct statx { 0x00020000U /* Want/got dio read alignment info \ */ -#define STATX__RESERVED \ - 0x80000000U /* Reserved for future struct statx expansion */ +#define STATX__RESERVED 0x80000000U /* Reserved for future struct statx expansion */ /* * This is deprecated, and shall remain the same value in the future. To avoid @@ -248,19 +247,17 @@ struct statx { * some filesystems support. * */ -#define STATX_ATTR_COMPRESSED \ - 0x00000004 /* [I] File is compressed by the fs \ - */ -#define STATX_ATTR_IMMUTABLE 0x00000010 /* [I] File is marked immutable */ -#define STATX_ATTR_APPEND 0x00000020 /* [I] File is append-only */ -#define STATX_ATTR_NODUMP 0x00000040 /* [I] File is not to be dumped */ -#define STATX_ATTR_ENCRYPTED \ - 0x00000800 /* [I] File requires key to decrypt in fs */ -#define STATX_ATTR_AUTOMOUNT 0x00001000 /* Dir: Automount trigger */ -#define STATX_ATTR_MOUNT_ROOT 0x00002000 /* Root of a mount */ -#define STATX_ATTR_VERITY 0x00100000 /* [I] Verity protected file */ -#define STATX_ATTR_DAX 0x00200000 /* File is currently in DAX state */ -#define STATX_ATTR_WRITE_ATOMIC \ - 0x00400000 /* File supports atomic write operations */ +#define STATX_ATTR_COMPRESSED \ + 0x00000004 /* [I] File is compressed by the fs \ + */ +#define STATX_ATTR_IMMUTABLE 0x00000010 /* [I] File is marked immutable */ +#define STATX_ATTR_APPEND 0x00000020 /* [I] File is append-only */ +#define STATX_ATTR_NODUMP 0x00000040 /* [I] File is not to be dumped */ +#define STATX_ATTR_ENCRYPTED 0x00000800 /* [I] File requires key to decrypt in fs */ +#define STATX_ATTR_AUTOMOUNT 0x00001000 /* Dir: Automount trigger */ +#define STATX_ATTR_MOUNT_ROOT 0x00002000 /* Root of a mount */ +#define STATX_ATTR_VERITY 0x00100000 /* [I] Verity protected file */ +#define STATX_ATTR_DAX 0x00200000 /* File is currently in DAX state */ +#define STATX_ATTR_WRITE_ATOMIC 0x00400000 /* File supports atomic write operations */ #endif /* _LINUX_STAT_H */ diff --git a/include/arch/x86_64/linux/suspend_ioctls.h b/include/arch/x86_64/linux/suspend_ioctls.h index c81830ba..0c3d2dfe 100644 --- a/include/arch/x86_64/linux/suspend_ioctls.h +++ b/include/arch/x86_64/linux/suspend_ioctls.h @@ -13,15 +13,14 @@ struct resume_swap_area { __u32 dev; } __attribute__((packed)); -#define SNAPSHOT_IOC_MAGIC '3' -#define SNAPSHOT_FREEZE _IO(SNAPSHOT_IOC_MAGIC, 1) -#define SNAPSHOT_UNFREEZE _IO(SNAPSHOT_IOC_MAGIC, 2) -#define SNAPSHOT_ATOMIC_RESTORE _IO(SNAPSHOT_IOC_MAGIC, 4) -#define SNAPSHOT_FREE _IO(SNAPSHOT_IOC_MAGIC, 5) -#define SNAPSHOT_FREE_SWAP_PAGES _IO(SNAPSHOT_IOC_MAGIC, 9) -#define SNAPSHOT_S2RAM _IO(SNAPSHOT_IOC_MAGIC, 11) -#define SNAPSHOT_SET_SWAP_AREA \ - _IOW(SNAPSHOT_IOC_MAGIC, 13, struct resume_swap_area) +#define SNAPSHOT_IOC_MAGIC '3' +#define SNAPSHOT_FREEZE _IO(SNAPSHOT_IOC_MAGIC, 1) +#define SNAPSHOT_UNFREEZE _IO(SNAPSHOT_IOC_MAGIC, 2) +#define SNAPSHOT_ATOMIC_RESTORE _IO(SNAPSHOT_IOC_MAGIC, 4) +#define SNAPSHOT_FREE _IO(SNAPSHOT_IOC_MAGIC, 5) +#define SNAPSHOT_FREE_SWAP_PAGES _IO(SNAPSHOT_IOC_MAGIC, 9) +#define SNAPSHOT_S2RAM _IO(SNAPSHOT_IOC_MAGIC, 11) +#define SNAPSHOT_SET_SWAP_AREA _IOW(SNAPSHOT_IOC_MAGIC, 13, struct resume_swap_area) #define SNAPSHOT_GET_IMAGE_SIZE _IOR(SNAPSHOT_IOC_MAGIC, 14, __kernel_loff_t) #define SNAPSHOT_PLATFORM_SUPPORT _IO(SNAPSHOT_IOC_MAGIC, 15) #define SNAPSHOT_POWER_OFF _IO(SNAPSHOT_IOC_MAGIC, 16) diff --git a/include/arch/x86_64/linux/swab.h b/include/arch/x86_64/linux/swab.h index 2645a845..c416f8bd 100644 --- a/include/arch/x86_64/linux/swab.h +++ b/include/arch/x86_64/linux/swab.h @@ -11,15 +11,11 @@ * casts are necessary for constants, because we never know how for sure * how U/UL/ULL map to __u16, __u32, __u64. At least not in a portable way. */ -#define ___constant_swab16(x) \ - ((__u16)((((__u16)(x) & (__u16)0x00ffU) << 8) | \ - (((__u16)(x) & (__u16)0xff00U) >> 8))) +#define ___constant_swab16(x) ((__u16)((((__u16)(x) & (__u16)0x00ffU) << 8) | (((__u16)(x) & (__u16)0xff00U) >> 8))) -#define ___constant_swab32(x) \ - ((__u32)((((__u32)(x) & (__u32)0x000000ffUL) << 24) | \ - (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \ - (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \ - (((__u32)(x) & (__u32)0xff000000UL) >> 24))) +#define ___constant_swab32(x) \ + ((__u32)((((__u32)(x) & (__u32)0x000000ffUL) << 24) | (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \ + (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(x) & (__u32)0xff000000UL) >> 24))) #define ___constant_swab64(x) \ ((__u64)((((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | \ @@ -31,13 +27,11 @@ (((__u64)(x) & (__u64)0x00ff000000000000ULL) >> 40) | \ (((__u64)(x) & (__u64)0xff00000000000000ULL) >> 56))) -#define ___constant_swahw32(x) \ - ((__u32)((((__u32)(x) & (__u32)0x0000ffffUL) << 16) | \ - (((__u32)(x) & (__u32)0xffff0000UL) >> 16))) +#define ___constant_swahw32(x) \ + ((__u32)((((__u32)(x) & (__u32)0x0000ffffUL) << 16) | (((__u32)(x) & (__u32)0xffff0000UL) >> 16))) -#define ___constant_swahb32(x) \ - ((__u32)((((__u32)(x) & (__u32)0x00ff00ffUL) << 8) | \ - (((__u32)(x) & (__u32)0xff00ff00UL) >> 8))) +#define ___constant_swahb32(x) \ + ((__u32)((((__u32)(x) & (__u32)0x00ff00ffUL) << 8) | (((__u32)(x) & (__u32)0xff00ff00UL) >> 8))) /* * Implement the following as inlines, but define the interface using @@ -101,8 +95,7 @@ static __inline__ __u32 __fswahb32(__u32 val) #ifdef __HAVE_BUILTIN_BSWAP16__ #define __swab16(x) (__u16) __builtin_bswap16((__u16)(x)) #else -#define __swab16(x) \ - (__u16)(__builtin_constant_p(x) ? ___constant_swab16(x) : __fswab16(x)) +#define __swab16(x) (__u16)(__builtin_constant_p(x) ? ___constant_swab16(x) : __fswab16(x)) #endif /** @@ -112,8 +105,7 @@ static __inline__ __u32 __fswahb32(__u32 val) #ifdef __HAVE_BUILTIN_BSWAP32__ #define __swab32(x) (__u32) __builtin_bswap32((__u32)(x)) #else -#define __swab32(x) \ - (__u32)(__builtin_constant_p(x) ? ___constant_swab32(x) : __fswab32(x)) +#define __swab32(x) (__u32)(__builtin_constant_p(x) ? ___constant_swab32(x) : __fswab32(x)) #endif /** @@ -123,8 +115,7 @@ static __inline__ __u32 __fswahb32(__u32 val) #ifdef __HAVE_BUILTIN_BSWAP64__ #define __swab64(x) (__u64) __builtin_bswap64((__u64)(x)) #else -#define __swab64(x) \ - (__u64)(__builtin_constant_p(x) ? ___constant_swab64(x) : __fswab64(x)) +#define __swab64(x) (__u64)(__builtin_constant_p(x) ? ___constant_swab64(x) : __fswab64(x)) #endif static __always_inline unsigned long __swab(const unsigned long y) @@ -142,9 +133,7 @@ static __always_inline unsigned long __swab(const unsigned long y) * * __swahw32(0x12340000) is 0x00001234 */ -#define __swahw32(x) \ - (__builtin_constant_p((__u32)(x)) ? ___constant_swahw32(x) : \ - __fswahw32(x)) +#define __swahw32(x) (__builtin_constant_p((__u32)(x)) ? ___constant_swahw32(x) : __fswahw32(x)) /** * __swahb32 - return a high and low byte-swapped 32-bit value @@ -152,9 +141,7 @@ static __always_inline unsigned long __swab(const unsigned long y) * * __swahb32(0x12345678) is 0x34127856 */ -#define __swahb32(x) \ - (__builtin_constant_p((__u32)(x)) ? ___constant_swahb32(x) : \ - __fswahb32(x)) +#define __swahb32(x) (__builtin_constant_p((__u32)(x)) ? ___constant_swahb32(x) : __fswahb32(x)) /** * __swab16p - return a byteswapped 16-bit value from a pointer diff --git a/include/arch/x86_64/linux/switchtec_ioctl.h b/include/arch/x86_64/linux/switchtec_ioctl.h index 91f5408d..ba276c95 100644 --- a/include/arch/x86_64/linux/switchtec_ioctl.h +++ b/include/arch/x86_64/linux/switchtec_ioctl.h @@ -143,19 +143,12 @@ struct switchtec_ioctl_pff_port { __u32 port; }; -#define SWITCHTEC_IOCTL_FLASH_INFO \ - _IOR('W', 0x40, struct switchtec_ioctl_flash_info) -#define SWITCHTEC_IOCTL_FLASH_PART_INFO \ - _IOWR('W', 0x41, struct switchtec_ioctl_flash_part_info) -#define SWITCHTEC_IOCTL_EVENT_SUMMARY \ - _IOR('W', 0x42, struct switchtec_ioctl_event_summary) -#define SWITCHTEC_IOCTL_EVENT_SUMMARY_LEGACY \ - _IOR('W', 0x42, struct switchtec_ioctl_event_summary_legacy) -#define SWITCHTEC_IOCTL_EVENT_CTL \ - _IOWR('W', 0x43, struct switchtec_ioctl_event_ctl) -#define SWITCHTEC_IOCTL_PFF_TO_PORT \ - _IOWR('W', 0x44, struct switchtec_ioctl_pff_port) -#define SWITCHTEC_IOCTL_PORT_TO_PFF \ - _IOWR('W', 0x45, struct switchtec_ioctl_pff_port) +#define SWITCHTEC_IOCTL_FLASH_INFO _IOR('W', 0x40, struct switchtec_ioctl_flash_info) +#define SWITCHTEC_IOCTL_FLASH_PART_INFO _IOWR('W', 0x41, struct switchtec_ioctl_flash_part_info) +#define SWITCHTEC_IOCTL_EVENT_SUMMARY _IOR('W', 0x42, struct switchtec_ioctl_event_summary) +#define SWITCHTEC_IOCTL_EVENT_SUMMARY_LEGACY _IOR('W', 0x42, struct switchtec_ioctl_event_summary_legacy) +#define SWITCHTEC_IOCTL_EVENT_CTL _IOWR('W', 0x43, struct switchtec_ioctl_event_ctl) +#define SWITCHTEC_IOCTL_PFF_TO_PORT _IOWR('W', 0x44, struct switchtec_ioctl_pff_port) +#define SWITCHTEC_IOCTL_PORT_TO_PFF _IOWR('W', 0x45, struct switchtec_ioctl_pff_port) #endif diff --git a/include/arch/x86_64/linux/sysctl.h b/include/arch/x86_64/linux/sysctl.h index d0dd89b3..6a759952 100644 --- a/include/arch/x86_64/linux/sysctl.h +++ b/include/arch/x86_64/linux/sysctl.h @@ -90,10 +90,10 @@ enum { KERN_PANIC = 15, /* int: panic timeout */ KERN_REALROOTDEV = 16, /* real root device to mount after initrd */ - KERN_SPARC_REBOOT = 21, /* reboot command on Sparc */ - KERN_CTLALTDEL = 22, /* int: allow ctl-alt-del to reboot */ - KERN_PRINTK = 23, /* struct: control printk logging parameters */ - KERN_NAMETRANS = 24, /* Name translation */ + KERN_SPARC_REBOOT = 21, /* reboot command on Sparc */ + KERN_CTLALTDEL = 22, /* int: allow ctl-alt-del to reboot */ + KERN_PRINTK = 23, /* struct: control printk logging parameters */ + KERN_NAMETRANS = 24, /* Name translation */ KERN_PPC_HTABRECLAIM = 25, /* turn htab reclaimation on/off on PPC */ KERN_PPC_ZEROPAGED = 26, /* turn idle page zeroing on/off on PPC */ KERN_PPC_POWERSAVE_NAP = 27, /* use nap mode for power saving */ @@ -105,98 +105,98 @@ enum { KERN_RTSIGNR = 32, /* Number of rt sigs queued */ KERN_RTSIGMAX = 33, /* Max queuable */ - KERN_SHMMAX = 34, /* long: Maximum shared memory segment */ - KERN_MSGMAX = 35, /* int: Maximum size of a messege */ - KERN_MSGMNB = 36, /* int: Maximum message queue size */ - KERN_MSGPOOL = 37, /* int: Maximum system message pool size */ - KERN_SYSRQ = 38, /* int: Sysreq enable */ - KERN_MAX_THREADS = 39, /* int: Maximum nr of threads in the system */ - KERN_RANDOM = 40, /* Random driver */ - KERN_SHMALL = 41, /* int: Maximum size of shared memory */ - KERN_MSGMNI = 42, /* int: msg queue identifiers */ - KERN_SEM = 43, /* struct: sysv semaphore limits */ - KERN_SPARC_STOP_A = 44, /* int: Sparc Stop-A enable */ - KERN_SHMMNI = 45, /* int: shm array identifiers */ - KERN_OVERFLOWUID = 46, /* int: overflow UID */ - KERN_OVERFLOWGID = 47, /* int: overflow GID */ - KERN_SHMPATH = 48, /* string: path to shm fs */ - KERN_HOTPLUG = 49, /* string: path to uevent helper (deprecated) */ + KERN_SHMMAX = 34, /* long: Maximum shared memory segment */ + KERN_MSGMAX = 35, /* int: Maximum size of a messege */ + KERN_MSGMNB = 36, /* int: Maximum message queue size */ + KERN_MSGPOOL = 37, /* int: Maximum system message pool size */ + KERN_SYSRQ = 38, /* int: Sysreq enable */ + KERN_MAX_THREADS = 39, /* int: Maximum nr of threads in the system */ + KERN_RANDOM = 40, /* Random driver */ + KERN_SHMALL = 41, /* int: Maximum size of shared memory */ + KERN_MSGMNI = 42, /* int: msg queue identifiers */ + KERN_SEM = 43, /* struct: sysv semaphore limits */ + KERN_SPARC_STOP_A = 44, /* int: Sparc Stop-A enable */ + KERN_SHMMNI = 45, /* int: shm array identifiers */ + KERN_OVERFLOWUID = 46, /* int: overflow UID */ + KERN_OVERFLOWGID = 47, /* int: overflow GID */ + KERN_SHMPATH = 48, /* string: path to shm fs */ + KERN_HOTPLUG = 49, /* string: path to uevent helper (deprecated) */ KERN_IEEE_EMULATION_WARNINGS = 50, /* int: unimplemented ieee instructions */ KERN_S390_USER_DEBUG_LOGGING = 51, /* int: dumps of user faults */ KERN_CORE_USES_PID = 52, /* int: use core or core.%pid */ - KERN_TAINTED = 53, /* int: various kernel tainted flags */ - KERN_CADPID = 54, /* int: PID of the process to notify on CAD */ - KERN_PIDMAX = 55, /* int: PID # limit */ - KERN_CORE_PATTERN = 56, /* string: pattern for core-file names */ - KERN_PANIC_ON_OOPS = 57, /* int: whether we will panic on an oops */ - KERN_HPPA_PWRSW = 58, /* int: hppa soft-power enable */ - KERN_HPPA_UNALIGNED = 59, /* int: hppa unaligned-trap enable */ - KERN_PRINTK_RATELIMIT = 60, /* int: tune printk ratelimiting */ - KERN_PRINTK_RATELIMIT_BURST = 61, /* int: tune printk ratelimiting */ - KERN_PTY = 62, /* dir: pty driver */ - KERN_NGROUPS_MAX = 63, /* int: NGROUPS_MAX */ - KERN_SPARC_SCONS_PWROFF = 64, /* int: serial console power-off halt */ - KERN_HZ_TIMER = 65, /* int: hz timer on or off */ - KERN_UNKNOWN_NMI_PANIC = 66, /* int: unknown nmi panic flag */ - KERN_BOOTLOADER_TYPE = 67, /* int: boot loader type */ - KERN_RANDOMIZE = 68, /* int: randomize virtual address space */ - KERN_SETUID_DUMPABLE = 69, /* int: behaviour of dumps for setuid core */ - KERN_SPIN_RETRY = 70, /* int: number of spinlock retries */ - KERN_ACPI_VIDEO_FLAGS = 71, /* int: flags for setting up video after - ACPI sleep */ - KERN_IA64_UNALIGNED = 72, /* int: ia64 unaligned userland trap enable */ - KERN_COMPAT_LOG = 73, /* int: print compat layer messages */ - KERN_MAX_LOCK_DEPTH = 74, /* int: rtmutex's maximum lock depth */ - KERN_NMI_WATCHDOG = 75, /* int: enable/disable nmi watchdog */ - KERN_PANIC_ON_NMI = 76, /* int: whether we will panic on an unrecovered - */ - KERN_PANIC_ON_WARN = 77, /* int: call panic() in WARN() functions */ - KERN_PANIC_PRINT = 78, /* ulong: bitmask to print system info on panic - */ + KERN_TAINTED = 53, /* int: various kernel tainted flags */ + KERN_CADPID = 54, /* int: PID of the process to notify on CAD */ + KERN_PIDMAX = 55, /* int: PID # limit */ + KERN_CORE_PATTERN = 56, /* string: pattern for core-file names */ + KERN_PANIC_ON_OOPS = 57, /* int: whether we will panic on an oops */ + KERN_HPPA_PWRSW = 58, /* int: hppa soft-power enable */ + KERN_HPPA_UNALIGNED = 59, /* int: hppa unaligned-trap enable */ + KERN_PRINTK_RATELIMIT = 60, /* int: tune printk ratelimiting */ + KERN_PRINTK_RATELIMIT_BURST = 61, /* int: tune printk ratelimiting */ + KERN_PTY = 62, /* dir: pty driver */ + KERN_NGROUPS_MAX = 63, /* int: NGROUPS_MAX */ + KERN_SPARC_SCONS_PWROFF = 64, /* int: serial console power-off halt */ + KERN_HZ_TIMER = 65, /* int: hz timer on or off */ + KERN_UNKNOWN_NMI_PANIC = 66, /* int: unknown nmi panic flag */ + KERN_BOOTLOADER_TYPE = 67, /* int: boot loader type */ + KERN_RANDOMIZE = 68, /* int: randomize virtual address space */ + KERN_SETUID_DUMPABLE = 69, /* int: behaviour of dumps for setuid core */ + KERN_SPIN_RETRY = 70, /* int: number of spinlock retries */ + KERN_ACPI_VIDEO_FLAGS = 71, /* int: flags for setting up video after + ACPI sleep */ + KERN_IA64_UNALIGNED = 72, /* int: ia64 unaligned userland trap enable */ + KERN_COMPAT_LOG = 73, /* int: print compat layer messages */ + KERN_MAX_LOCK_DEPTH = 74, /* int: rtmutex's maximum lock depth */ + KERN_NMI_WATCHDOG = 75, /* int: enable/disable nmi watchdog */ + KERN_PANIC_ON_NMI = 76, /* int: whether we will panic on an unrecovered + */ + KERN_PANIC_ON_WARN = 77, /* int: call panic() in WARN() functions */ + KERN_PANIC_PRINT = 78, /* ulong: bitmask to print system info on panic + */ }; /* CTL_VM names: */ enum { - VM_UNUSED1 = 1, /* was: struct: Set vm swapping control */ - VM_UNUSED2 = 2, /* was; int: Linear or sqrt() swapout for hogs */ - VM_UNUSED3 = 3, /* was: struct: Set free page thresholds */ - VM_UNUSED4 = 4, /* Spare */ - VM_OVERCOMMIT_MEMORY = 5, /* Turn off the virtual memory safety limit */ - VM_UNUSED5 = 6, /* was: struct: Set buffer memory thresholds */ - VM_UNUSED7 = 7, /* was: struct: Set cache memory thresholds */ - VM_UNUSED8 = 8, /* was: struct: Control kswapd behaviour */ - VM_UNUSED9 = 9, /* was: struct: Set page table cache parameters */ - VM_PAGE_CLUSTER = 10, /* int: set number of pages to swap together */ - VM_DIRTY_BACKGROUND = 11, /* dirty_background_ratio */ - VM_DIRTY_RATIO = 12, /* dirty_ratio */ - VM_DIRTY_WB_CS = 13, /* dirty_writeback_centisecs */ - VM_DIRTY_EXPIRE_CS = 14, /* dirty_expire_centisecs */ - VM_NR_PDFLUSH_THREADS = 15, /* nr_pdflush_threads */ - VM_OVERCOMMIT_RATIO = 16, /* percent of RAM to allow overcommit in */ - VM_PAGEBUF = 17, /* struct: Control pagebuf parameters */ - VM_HUGETLB_PAGES = 18, /* int: Number of available Huge Pages */ - VM_SWAPPINESS = 19, /* Tendency to steal mapped memory */ - VM_LOWMEM_RESERVE_RATIO = 20, /* reservation ratio for lower memory - zones */ - VM_MIN_FREE_KBYTES = 21, /* Minimum free kilobytes to maintain */ - VM_MAX_MAP_COUNT = 22, /* int: Maximum number of mmaps/address-space */ - VM_LAPTOP_MODE = 23, /* vm laptop mode */ - VM_BLOCK_DUMP = 24, /* block dump mode */ - VM_HUGETLB_GROUP = 25, /* permitted hugetlb group */ - VM_VFS_CACHE_PRESSURE = 26, /* dcache/icache reclaim pressure */ - VM_LEGACY_VA_LAYOUT = 27, /* legacy/compatibility virtual address space - layout */ + VM_UNUSED1 = 1, /* was: struct: Set vm swapping control */ + VM_UNUSED2 = 2, /* was; int: Linear or sqrt() swapout for hogs */ + VM_UNUSED3 = 3, /* was: struct: Set free page thresholds */ + VM_UNUSED4 = 4, /* Spare */ + VM_OVERCOMMIT_MEMORY = 5, /* Turn off the virtual memory safety limit */ + VM_UNUSED5 = 6, /* was: struct: Set buffer memory thresholds */ + VM_UNUSED7 = 7, /* was: struct: Set cache memory thresholds */ + VM_UNUSED8 = 8, /* was: struct: Control kswapd behaviour */ + VM_UNUSED9 = 9, /* was: struct: Set page table cache parameters */ + VM_PAGE_CLUSTER = 10, /* int: set number of pages to swap together */ + VM_DIRTY_BACKGROUND = 11, /* dirty_background_ratio */ + VM_DIRTY_RATIO = 12, /* dirty_ratio */ + VM_DIRTY_WB_CS = 13, /* dirty_writeback_centisecs */ + VM_DIRTY_EXPIRE_CS = 14, /* dirty_expire_centisecs */ + VM_NR_PDFLUSH_THREADS = 15, /* nr_pdflush_threads */ + VM_OVERCOMMIT_RATIO = 16, /* percent of RAM to allow overcommit in */ + VM_PAGEBUF = 17, /* struct: Control pagebuf parameters */ + VM_HUGETLB_PAGES = 18, /* int: Number of available Huge Pages */ + VM_SWAPPINESS = 19, /* Tendency to steal mapped memory */ + VM_LOWMEM_RESERVE_RATIO = 20, /* reservation ratio for lower memory + zones */ + VM_MIN_FREE_KBYTES = 21, /* Minimum free kilobytes to maintain */ + VM_MAX_MAP_COUNT = 22, /* int: Maximum number of mmaps/address-space */ + VM_LAPTOP_MODE = 23, /* vm laptop mode */ + VM_BLOCK_DUMP = 24, /* block dump mode */ + VM_HUGETLB_GROUP = 25, /* permitted hugetlb group */ + VM_VFS_CACHE_PRESSURE = 26, /* dcache/icache reclaim pressure */ + VM_LEGACY_VA_LAYOUT = 27, /* legacy/compatibility virtual address space + layout */ VM_SWAP_TOKEN_TIMEOUT = 28, /* default time for token time out */ VM_DROP_PAGECACHE = 29, /* int: nuke lots of pagecache */ VM_PERCPU_PAGELIST_FRACTION = 30, /* int: fraction of pages in each percpu_pagelist */ - VM_ZONE_RECLAIM_MODE = 31, /* reclaim local zone memory before going off - node */ - VM_MIN_UNMAPPED = 32, /* Set min percent of unmapped pages */ - VM_PANIC_ON_OOM = 33, /* panic at out-of-memory */ - VM_VDSO_ENABLED = 34, /* map VDSO into new processes? */ - VM_MIN_SLAB = 35, /* Percent pages ignored by node reclaim */ + VM_ZONE_RECLAIM_MODE = 31, /* reclaim local zone memory before going off + node */ + VM_MIN_UNMAPPED = 32, /* Set min percent of unmapped pages */ + VM_PANIC_ON_OOM = 33, /* panic at out-of-memory */ + VM_VDSO_ENABLED = 34, /* map VDSO into new processes? */ + VM_MIN_SLAB = 35, /* Percent pages ignored by node reclaim */ }; /* CTL_NET names: */ diff --git a/include/arch/x86_64/linux/sysinfo.h b/include/arch/x86_64/linux/sysinfo.h index 8207a1ae..a00dfa5b 100644 --- a/include/arch/x86_64/linux/sysinfo.h +++ b/include/arch/x86_64/linux/sysinfo.h @@ -6,19 +6,19 @@ #define SI_LOAD_SHIFT 16 struct sysinfo { - __kernel_long_t uptime; /* Seconds since boot */ - __kernel_ulong_t loads[3]; /* 1, 5, and 15 minute load averages */ - __kernel_ulong_t totalram; /* Total usable main memory size */ - __kernel_ulong_t freeram; /* Available memory size */ - __kernel_ulong_t sharedram; /* Amount of shared memory */ - __kernel_ulong_t bufferram; /* Memory used by buffers */ - __kernel_ulong_t totalswap; /* Total swap space size */ - __kernel_ulong_t freeswap; /* swap space still available */ - __u16 procs; /* Number of current processes */ - __u16 pad; /* Explicit padding for m68k */ - __kernel_ulong_t totalhigh; /* Total high memory size */ - __kernel_ulong_t freehigh; /* Available high memory size */ - __u32 mem_unit; /* Memory unit size in bytes */ + __kernel_long_t uptime; /* Seconds since boot */ + __kernel_ulong_t loads[3]; /* 1, 5, and 15 minute load averages */ + __kernel_ulong_t totalram; /* Total usable main memory size */ + __kernel_ulong_t freeram; /* Available memory size */ + __kernel_ulong_t sharedram; /* Amount of shared memory */ + __kernel_ulong_t bufferram; /* Memory used by buffers */ + __kernel_ulong_t totalswap; /* Total swap space size */ + __kernel_ulong_t freeswap; /* swap space still available */ + __u16 procs; /* Number of current processes */ + __u16 pad; /* Explicit padding for m68k */ + __kernel_ulong_t totalhigh; /* Total high memory size */ + __kernel_ulong_t freehigh; /* Available high memory size */ + __u32 mem_unit; /* Memory unit size in bytes */ char _f[20 - 2 * sizeof(__kernel_ulong_t) - sizeof(__u32)]; /* Padding: libc5 uses diff --git a/include/arch/x86_64/linux/target_core_user.h b/include/arch/x86_64/linux/target_core_user.h index 57cc2eff..7274d026 100644 --- a/include/arch/x86_64/linux/target_core_user.h +++ b/include/arch/x86_64/linux/target_core_user.h @@ -42,12 +42,11 @@ */ #define TCMU_MAILBOX_VERSION 2 -#define ALIGN_SIZE 64 /* Should be enough for most CPUs */ +#define ALIGN_SIZE 64 /* Should be enough for most CPUs */ #define TCMU_MAILBOX_FLAG_CAP_OOOC (1 << 0) /* Out-of-order completions */ #define TCMU_MAILBOX_FLAG_CAP_READ_LEN (1 << 1) /* Read data length */ #define TCMU_MAILBOX_FLAG_CAP_TMR (1 << 2) /* TMR notifications */ -#define TCMU_MAILBOX_FLAG_CAP_KEEP_BUF \ - (1 << 3) /* Keep buf after cmd completion */ +#define TCMU_MAILBOX_FLAG_CAP_KEEP_BUF (1 << 3) /* Keep buf after cmd completion */ struct tcmu_mailbox { __u16 version; diff --git a/include/arch/x86_64/linux/tc_act/tc_connmark.h b/include/arch/x86_64/linux/tc_act/tc_connmark.h index 9f8f6f70..bc14a152 100644 --- a/include/arch/x86_64/linux/tc_act/tc_connmark.h +++ b/include/arch/x86_64/linux/tc_act/tc_connmark.h @@ -10,13 +10,7 @@ struct tc_connmark { __u16 zone; }; -enum { - TCA_CONNMARK_UNSPEC, - TCA_CONNMARK_PARMS, - TCA_CONNMARK_TM, - TCA_CONNMARK_PAD, - __TCA_CONNMARK_MAX -}; +enum { TCA_CONNMARK_UNSPEC, TCA_CONNMARK_PARMS, TCA_CONNMARK_TM, TCA_CONNMARK_PAD, __TCA_CONNMARK_MAX }; #define TCA_CONNMARK_MAX (__TCA_CONNMARK_MAX - 1) #endif diff --git a/include/arch/x86_64/linux/tc_act/tc_csum.h b/include/arch/x86_64/linux/tc_act/tc_csum.h index 6e55abf9..6751c8bf 100644 --- a/include/arch/x86_64/linux/tc_act/tc_csum.h +++ b/include/arch/x86_64/linux/tc_act/tc_csum.h @@ -5,13 +5,7 @@ #include #include -enum { - TCA_CSUM_UNSPEC, - TCA_CSUM_PARMS, - TCA_CSUM_TM, - TCA_CSUM_PAD, - __TCA_CSUM_MAX -}; +enum { TCA_CSUM_UNSPEC, TCA_CSUM_PARMS, TCA_CSUM_TM, TCA_CSUM_PAD, __TCA_CSUM_MAX }; #define TCA_CSUM_MAX (__TCA_CSUM_MAX - 1) enum { diff --git a/include/arch/x86_64/linux/tc_act/tc_defact.h b/include/arch/x86_64/linux/tc_act/tc_defact.h index e3ecd8bf..706c2889 100644 --- a/include/arch/x86_64/linux/tc_act/tc_defact.h +++ b/include/arch/x86_64/linux/tc_act/tc_defact.h @@ -8,14 +8,7 @@ struct tc_defact { tc_gen; }; -enum { - TCA_DEF_UNSPEC, - TCA_DEF_TM, - TCA_DEF_PARMS, - TCA_DEF_DATA, - TCA_DEF_PAD, - __TCA_DEF_MAX -}; +enum { TCA_DEF_UNSPEC, TCA_DEF_TM, TCA_DEF_PARMS, TCA_DEF_DATA, TCA_DEF_PAD, __TCA_DEF_MAX }; #define TCA_DEF_MAX (__TCA_DEF_MAX - 1) #endif diff --git a/include/arch/x86_64/linux/tc_act/tc_gact.h b/include/arch/x86_64/linux/tc_act/tc_gact.h index 824f4c7d..ff6ac91e 100644 --- a/include/arch/x86_64/linux/tc_act/tc_gact.h +++ b/include/arch/x86_64/linux/tc_act/tc_gact.h @@ -19,14 +19,7 @@ struct tc_gact_p { int paction; }; -enum { - TCA_GACT_UNSPEC, - TCA_GACT_TM, - TCA_GACT_PARMS, - TCA_GACT_PROB, - TCA_GACT_PAD, - __TCA_GACT_MAX -}; +enum { TCA_GACT_UNSPEC, TCA_GACT_TM, TCA_GACT_PARMS, TCA_GACT_PROB, TCA_GACT_PAD, __TCA_GACT_MAX }; #define TCA_GACT_MAX (__TCA_GACT_MAX - 1) #endif diff --git a/include/arch/x86_64/linux/tc_act/tc_mirred.h b/include/arch/x86_64/linux/tc_act/tc_mirred.h index ff6acdc3..ae949d19 100644 --- a/include/arch/x86_64/linux/tc_act/tc_mirred.h +++ b/include/arch/x86_64/linux/tc_act/tc_mirred.h @@ -16,14 +16,7 @@ struct tc_mirred { __u32 ifindex; /* ifindex of egress port */ }; -enum { - TCA_MIRRED_UNSPEC, - TCA_MIRRED_TM, - TCA_MIRRED_PARMS, - TCA_MIRRED_PAD, - TCA_MIRRED_BLOCKID, - __TCA_MIRRED_MAX -}; +enum { TCA_MIRRED_UNSPEC, TCA_MIRRED_TM, TCA_MIRRED_PARMS, TCA_MIRRED_PAD, TCA_MIRRED_BLOCKID, __TCA_MIRRED_MAX }; #define TCA_MIRRED_MAX (__TCA_MIRRED_MAX - 1) #endif diff --git a/include/arch/x86_64/linux/tc_act/tc_pedit.h b/include/arch/x86_64/linux/tc_act/tc_pedit.h index 06381992..ac9ec1d8 100644 --- a/include/arch/x86_64/linux/tc_act/tc_pedit.h +++ b/include/arch/x86_64/linux/tc_act/tc_pedit.h @@ -18,11 +18,7 @@ enum { #define TCA_PEDIT_MAX (__TCA_PEDIT_MAX - 1) -enum { - TCA_PEDIT_KEY_EX_HTYPE = 1, - TCA_PEDIT_KEY_EX_CMD = 2, - __TCA_PEDIT_KEY_EX_MAX -}; +enum { TCA_PEDIT_KEY_EX_HTYPE = 1, TCA_PEDIT_KEY_EX_CMD = 2, __TCA_PEDIT_KEY_EX_MAX }; #define TCA_PEDIT_KEY_EX_MAX (__TCA_PEDIT_KEY_EX_MAX - 1) diff --git a/include/arch/x86_64/linux/tc_act/tc_tunnel_key.h b/include/arch/x86_64/linux/tc_act/tc_tunnel_key.h index 9dd4b383..a71c000c 100644 --- a/include/arch/x86_64/linux/tc_act/tc_tunnel_key.h +++ b/include/arch/x86_64/linux/tc_act/tc_tunnel_key.h @@ -68,8 +68,7 @@ enum { __TCA_TUNNEL_KEY_ENC_OPT_GENEVE_MAX, }; -#define TCA_TUNNEL_KEY_ENC_OPT_GENEVE_MAX \ - (__TCA_TUNNEL_KEY_ENC_OPT_GENEVE_MAX - 1) +#define TCA_TUNNEL_KEY_ENC_OPT_GENEVE_MAX (__TCA_TUNNEL_KEY_ENC_OPT_GENEVE_MAX - 1) enum { TCA_TUNNEL_KEY_ENC_OPT_VXLAN_UNSPEC, @@ -77,8 +76,7 @@ enum { __TCA_TUNNEL_KEY_ENC_OPT_VXLAN_MAX, }; -#define TCA_TUNNEL_KEY_ENC_OPT_VXLAN_MAX \ - (__TCA_TUNNEL_KEY_ENC_OPT_VXLAN_MAX - 1) +#define TCA_TUNNEL_KEY_ENC_OPT_VXLAN_MAX (__TCA_TUNNEL_KEY_ENC_OPT_VXLAN_MAX - 1) enum { TCA_TUNNEL_KEY_ENC_OPT_ERSPAN_UNSPEC, @@ -89,7 +87,6 @@ enum { __TCA_TUNNEL_KEY_ENC_OPT_ERSPAN_MAX, }; -#define TCA_TUNNEL_KEY_ENC_OPT_ERSPAN_MAX \ - (__TCA_TUNNEL_KEY_ENC_OPT_ERSPAN_MAX - 1) +#define TCA_TUNNEL_KEY_ENC_OPT_ERSPAN_MAX (__TCA_TUNNEL_KEY_ENC_OPT_ERSPAN_MAX - 1) #endif diff --git a/include/arch/x86_64/linux/tc_ematch/tc_em_meta.h b/include/arch/x86_64/linux/tc_ematch/tc_em_meta.h index 447946d7..bacd40e6 100644 --- a/include/arch/x86_64/linux/tc_ematch/tc_em_meta.h +++ b/include/arch/x86_64/linux/tc_ematch/tc_em_meta.h @@ -5,13 +5,7 @@ #include #include -enum { - TCA_EM_META_UNSPEC, - TCA_EM_META_HDR, - TCA_EM_META_LVALUE, - TCA_EM_META_RVALUE, - __TCA_EM_META_MAX -}; +enum { TCA_EM_META_UNSPEC, TCA_EM_META_HDR, TCA_EM_META_LVALUE, TCA_EM_META_RVALUE, __TCA_EM_META_MAX }; #define TCA_EM_META_MAX (__TCA_EM_META_MAX - 1) struct tcf_meta_val { diff --git a/include/arch/x86_64/linux/tcp.h b/include/arch/x86_64/linux/tcp.h index cd53ffb2..74306f50 100644 --- a/include/arch/x86_64/linux/tcp.h +++ b/include/arch/x86_64/linux/tcp.h @@ -28,11 +28,9 @@ struct tcphdr { __be32 seq; __be32 ack_seq; #if defined(__LITTLE_ENDIAN_BITFIELD) - __u16 ae : 1, res1 : 3, doff : 4, fin : 1, syn : 1, rst : 1, psh : 1, - ack : 1, urg : 1, ece : 1, cwr : 1; + __u16 ae : 1, res1 : 3, doff : 4, fin : 1, syn : 1, rst : 1, psh : 1, ack : 1, urg : 1, ece : 1, cwr : 1; #elif defined(__BIG_ENDIAN_BITFIELD) - __u16 doff : 4, res1 : 3, ae : 1, cwr : 1, ece : 1, urg : 1, ack : 1, - psh : 1, rst : 1, syn : 1, fin : 1; + __u16 doff : 4, res1 : 3, ae : 1, cwr : 1, ece : 1, urg : 1, ack : 1, psh : 1, rst : 1, syn : 1, fin : 1; #else #error "Adjust your defines" #endif @@ -288,9 +286,9 @@ struct tcp_info { __u32 tcpi_rehash; /* PLB or timeout triggered rehash attempts */ - __u16 tcpi_total_rto; /* Total number of RTO timeouts, including - * SYN/SYN-ACK and recurring timeouts. - */ + __u16 tcpi_total_rto; /* Total number of RTO timeouts, including + * SYN/SYN-ACK and recurring timeouts. + */ __u16 tcpi_total_rto_recoveries; /* Total number of RTO * recoveries, including any * unfinished recovery. @@ -304,33 +302,33 @@ struct tcp_info { /* netlink attributes types for SCM_TIMESTAMPING_OPT_STATS */ enum { TCP_NLA_PAD, - TCP_NLA_BUSY, /* Time (usec) busy sending data */ - TCP_NLA_RWND_LIMITED, /* Time (usec) limited by receive window */ - TCP_NLA_SNDBUF_LIMITED, /* Time (usec) limited by send buffer */ - TCP_NLA_DATA_SEGS_OUT, /* Data pkts sent including retransmission */ - TCP_NLA_TOTAL_RETRANS, /* Data pkts retransmitted */ - TCP_NLA_PACING_RATE, /* Pacing rate in bytes per second */ - TCP_NLA_DELIVERY_RATE, /* Delivery rate in bytes per second */ - TCP_NLA_SND_CWND, /* Sending congestion window */ - TCP_NLA_REORDERING, /* Reordering metric */ - TCP_NLA_MIN_RTT, /* minimum RTT */ - TCP_NLA_RECUR_RETRANS, /* Recurring retransmits for the current pkt */ + TCP_NLA_BUSY, /* Time (usec) busy sending data */ + TCP_NLA_RWND_LIMITED, /* Time (usec) limited by receive window */ + TCP_NLA_SNDBUF_LIMITED, /* Time (usec) limited by send buffer */ + TCP_NLA_DATA_SEGS_OUT, /* Data pkts sent including retransmission */ + TCP_NLA_TOTAL_RETRANS, /* Data pkts retransmitted */ + TCP_NLA_PACING_RATE, /* Pacing rate in bytes per second */ + TCP_NLA_DELIVERY_RATE, /* Delivery rate in bytes per second */ + TCP_NLA_SND_CWND, /* Sending congestion window */ + TCP_NLA_REORDERING, /* Reordering metric */ + TCP_NLA_MIN_RTT, /* minimum RTT */ + TCP_NLA_RECUR_RETRANS, /* Recurring retransmits for the current pkt */ TCP_NLA_DELIVERY_RATE_APP_LMT, /* delivery rate application limited ? */ TCP_NLA_SNDQ_SIZE, /* Data (bytes) pending in send queue */ TCP_NLA_CA_STATE, /* ca_state of socket */ TCP_NLA_SND_SSTHRESH, /* Slow start size threshold */ - TCP_NLA_DELIVERED, /* Data pkts delivered incl. out-of-order */ - TCP_NLA_DELIVERED_CE, /* Like above but only ones w/ CE marks */ - TCP_NLA_BYTES_SENT, /* Data bytes sent including retransmission */ - TCP_NLA_BYTES_RETRANS, /* Data bytes retransmitted */ - TCP_NLA_DSACK_DUPS, /* DSACK blocks received */ - TCP_NLA_REORD_SEEN, /* reordering events seen */ - TCP_NLA_SRTT, /* smoothed RTT in usecs */ - TCP_NLA_TIMEOUT_REHASH, /* Timeout-triggered rehash attempts */ - TCP_NLA_BYTES_NOTSENT, /* Bytes in write queue not yet sent */ - TCP_NLA_EDT, /* Earliest departure time (CLOCK_MONOTONIC) */ - TCP_NLA_TTL, /* TTL or hop limit of a packet received */ - TCP_NLA_REHASH, /* PLB and timeout triggered rehash attempts */ + TCP_NLA_DELIVERED, /* Data pkts delivered incl. out-of-order */ + TCP_NLA_DELIVERED_CE, /* Like above but only ones w/ CE marks */ + TCP_NLA_BYTES_SENT, /* Data bytes sent including retransmission */ + TCP_NLA_BYTES_RETRANS, /* Data bytes retransmitted */ + TCP_NLA_DSACK_DUPS, /* DSACK blocks received */ + TCP_NLA_REORD_SEEN, /* reordering events seen */ + TCP_NLA_SRTT, /* smoothed RTT in usecs */ + TCP_NLA_TIMEOUT_REHASH, /* Timeout-triggered rehash attempts */ + TCP_NLA_BYTES_NOTSENT, /* Bytes in write queue not yet sent */ + TCP_NLA_EDT, /* Earliest departure time (CLOCK_MONOTONIC) */ + TCP_NLA_TTL, /* TTL or hop limit of a packet received */ + TCP_NLA_REHASH, /* PLB and timeout triggered rehash attempts */ }; /* for TCP_MD5SIG socket option */ @@ -370,18 +368,18 @@ struct tcp_diag_md5sig { struct tcp_ao_add { /* setsockopt(TCP_AO_ADD_KEY) */ struct __kernel_sockaddr_storage addr; /* peer's address for the key */ - char alg_name[64]; /* crypto hash algorithm to use */ - __s32 ifindex; /* L3 dev index for VRF */ - __u32 set_current : 1, /* set key as Current_key at once */ - set_rnext : 1, /* request it from peer with RNext_key */ - reserved : 30; /* must be 0 */ - __u16 reserved2; /* padding, must be 0 */ - __u8 prefix; /* peer's address prefix */ - __u8 sndid; /* SendID for outgoing segments */ - __u8 rcvid; /* RecvID to match for incoming seg */ - __u8 maclen; /* length of authentication code (hash) */ - __u8 keyflags; /* see TCP_AO_KEYF_ */ - __u8 keylen; /* length of ::key */ + char alg_name[64]; /* crypto hash algorithm to use */ + __s32 ifindex; /* L3 dev index for VRF */ + __u32 set_current : 1, /* set key as Current_key at once */ + set_rnext : 1, /* request it from peer with RNext_key */ + reserved : 30; /* must be 0 */ + __u16 reserved2; /* padding, must be 0 */ + __u8 prefix; /* peer's address prefix */ + __u8 sndid; /* SendID for outgoing segments */ + __u8 rcvid; /* RecvID to match for incoming seg */ + __u8 maclen; /* length of authentication code (hash) */ + __u8 keyflags; /* see TCP_AO_KEYF_ */ + __u8 keylen; /* length of ::key */ __u8 key[TCP_AO_MAXKEYLEN]; } __attribute__((aligned(8))); @@ -390,15 +388,15 @@ struct tcp_ao_del { /* setsockopt(TCP_AO_DEL_KEY) */ __s32 ifindex; /* L3 dev index for VRF */ __u32 set_current : 1, /* corresponding ::current_key */ set_rnext : 1, /* corresponding ::rnext */ - del_async : 1, /* only valid for listen sockets */ - reserved : 29; /* must be 0 */ - __u16 reserved2; /* padding, must be 0 */ - __u8 prefix; /* peer's address prefix */ - __u8 sndid; /* SendID for outgoing segments */ - __u8 rcvid; /* RecvID to match for incoming seg */ - __u8 current_key; /* KeyID to set as Current_key */ - __u8 rnext; /* KeyID to set as Rnext_key */ - __u8 keyflags; /* see TCP_AO_KEYF_ */ + del_async : 1, /* only valid for listen sockets */ + reserved : 29; /* must be 0 */ + __u16 reserved2; /* padding, must be 0 */ + __u8 prefix; /* peer's address prefix */ + __u8 sndid; /* SendID for outgoing segments */ + __u8 rcvid; /* RecvID to match for incoming seg */ + __u8 current_key; /* KeyID to set as Current_key */ + __u8 rnext; /* KeyID to set as Rnext_key */ + __u8 keyflags; /* see TCP_AO_KEYF_ */ } __attribute__((aligned(8))); struct tcp_ao_info_opt { /* setsockopt(TCP_AO_INFO), getsockopt(TCP_AO_INFO) */ diff --git a/include/arch/x86_64/linux/tee.h b/include/arch/x86_64/linux/tee.h index 6576abad..5054293a 100644 --- a/include/arch/x86_64/linux/tee.h +++ b/include/arch/x86_64/linux/tee.h @@ -87,8 +87,7 @@ struct tee_ioctl_version_data { * Takes a tee_ioctl_version_data struct and returns with the TEE version * data filled in. */ -#define TEE_IOC_VERSION \ - _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 0, struct tee_ioctl_version_data) +#define TEE_IOC_VERSION _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 0, struct tee_ioctl_version_data) /** * struct tee_ioctl_shm_alloc_data - Shared memory allocate argument @@ -117,8 +116,7 @@ struct tee_ioctl_shm_alloc_data { * space. The shared memory is freed when the descriptor is closed and the * memory is unmapped. */ -#define TEE_IOC_SHM_ALLOC \ - _IOWR(TEE_IOC_MAGIC, TEE_IOC_BASE + 1, struct tee_ioctl_shm_alloc_data) +#define TEE_IOC_SHM_ALLOC _IOWR(TEE_IOC_MAGIC, TEE_IOC_BASE + 1, struct tee_ioctl_shm_alloc_data) /** * struct tee_ioctl_buf_data - Variable sized buffer @@ -162,8 +160,7 @@ struct tee_ioctl_buf_data { #define TEE_IOCTL_PARAM_ATTR_META 0x100 /* Mask of all known attr bits */ -#define TEE_IOCTL_PARAM_ATTR_MASK \ - (TEE_IOCTL_PARAM_ATTR_TYPE_MASK | TEE_IOCTL_PARAM_ATTR_META) +#define TEE_IOCTL_PARAM_ATTR_MASK (TEE_IOCTL_PARAM_ATTR_TYPE_MASK | TEE_IOCTL_PARAM_ATTR_META) /* * Matches TEEC_LOGIN_* in GP TEE Client API @@ -253,8 +250,7 @@ struct tee_ioctl_open_session_arg { * tee_ioctl_open_session_arg followed by any array of struct * tee_ioctl_param */ -#define TEE_IOC_OPEN_SESSION \ - _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 2, struct tee_ioctl_buf_data) +#define TEE_IOC_OPEN_SESSION _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 2, struct tee_ioctl_buf_data) /** * struct tee_ioctl_invoke_func_arg - Invokes a function in a Trusted @@ -283,8 +279,7 @@ struct tee_ioctl_invoke_arg { * Takes a struct tee_ioctl_buf_data which contains a struct * tee_invoke_func_arg followed by any array of struct tee_param */ -#define TEE_IOC_INVOKE \ - _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 3, struct tee_ioctl_buf_data) +#define TEE_IOC_INVOKE _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 3, struct tee_ioctl_buf_data) /** * struct tee_ioctl_cancel_arg - Cancels an open session or invoke ioctl @@ -299,8 +294,7 @@ struct tee_ioctl_cancel_arg { /** * TEE_IOC_CANCEL - Cancels an open session or invoke */ -#define TEE_IOC_CANCEL \ - _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 4, struct tee_ioctl_cancel_arg) +#define TEE_IOC_CANCEL _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 4, struct tee_ioctl_cancel_arg) /** * struct tee_ioctl_close_session_arg - Closes an open session @@ -313,9 +307,7 @@ struct tee_ioctl_close_session_arg { /** * TEE_IOC_CLOSE_SESSION - Closes a session */ -#define TEE_IOC_CLOSE_SESSION \ - _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 5, \ - struct tee_ioctl_close_session_arg) +#define TEE_IOC_CLOSE_SESSION _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 5, struct tee_ioctl_close_session_arg) /** * struct tee_iocl_supp_recv_arg - Receive a request for a supplicant function @@ -339,8 +331,7 @@ struct tee_iocl_supp_recv_arg { * Takes a struct tee_ioctl_buf_data which contains a struct * tee_iocl_supp_recv_arg followed by any array of struct tee_param */ -#define TEE_IOC_SUPPL_RECV \ - _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 6, struct tee_ioctl_buf_data) +#define TEE_IOC_SUPPL_RECV _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 6, struct tee_ioctl_buf_data) /** * struct tee_iocl_supp_send_arg - Send a response to a received request @@ -360,8 +351,7 @@ struct tee_iocl_supp_send_arg { * Takes a struct tee_ioctl_buf_data which contains a struct * tee_iocl_supp_send_arg followed by any array of struct tee_param */ -#define TEE_IOC_SUPPL_SEND \ - _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 7, struct tee_ioctl_buf_data) +#define TEE_IOC_SUPPL_SEND _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 7, struct tee_ioctl_buf_data) /** * struct tee_ioctl_shm_register_data - Shared memory register argument @@ -390,9 +380,7 @@ struct tee_ioctl_shm_register_data { * * The shared memory is unregisterred when the descriptor is closed. */ -#define TEE_IOC_SHM_REGISTER \ - _IOWR(TEE_IOC_MAGIC, TEE_IOC_BASE + 9, \ - struct tee_ioctl_shm_register_data) +#define TEE_IOC_SHM_REGISTER _IOWR(TEE_IOC_MAGIC, TEE_IOC_BASE + 9, struct tee_ioctl_shm_register_data) /* * Five syscalls are used when communicating with the TEE driver. * open(): opens the device associated with the driver diff --git a/include/arch/x86_64/linux/thermal.h b/include/arch/x86_64/linux/thermal.h index b2242bfe..e6595d76 100644 --- a/include/arch/x86_64/linux/thermal.h +++ b/include/arch/x86_64/linux/thermal.h @@ -67,28 +67,28 @@ enum thermal_genl_sampling { /* Events of thermal_genl_family */ enum thermal_genl_event { THERMAL_GENL_EVENT_UNSPEC, - THERMAL_GENL_EVENT_TZ_CREATE, /* Thermal zone creation */ - THERMAL_GENL_EVENT_TZ_DELETE, /* Thermal zone deletion */ - THERMAL_GENL_EVENT_TZ_DISABLE, /* Thermal zone disabled */ - THERMAL_GENL_EVENT_TZ_ENABLE, /* Thermal zone enabled */ - THERMAL_GENL_EVENT_TZ_TRIP_UP, /* Trip point crossed the way up */ - THERMAL_GENL_EVENT_TZ_TRIP_DOWN, /* Trip point crossed the way down */ - THERMAL_GENL_EVENT_TZ_TRIP_CHANGE, /* Trip point changed */ - THERMAL_GENL_EVENT_TZ_TRIP_ADD, /* Trip point added */ - THERMAL_GENL_EVENT_TZ_TRIP_DELETE, /* Trip point deleted */ - THERMAL_GENL_EVENT_CDEV_ADD, /* Cdev bound to the thermal zone */ - THERMAL_GENL_EVENT_CDEV_DELETE, /* Cdev unbound */ + THERMAL_GENL_EVENT_TZ_CREATE, /* Thermal zone creation */ + THERMAL_GENL_EVENT_TZ_DELETE, /* Thermal zone deletion */ + THERMAL_GENL_EVENT_TZ_DISABLE, /* Thermal zone disabled */ + THERMAL_GENL_EVENT_TZ_ENABLE, /* Thermal zone enabled */ + THERMAL_GENL_EVENT_TZ_TRIP_UP, /* Trip point crossed the way up */ + THERMAL_GENL_EVENT_TZ_TRIP_DOWN, /* Trip point crossed the way down */ + THERMAL_GENL_EVENT_TZ_TRIP_CHANGE, /* Trip point changed */ + THERMAL_GENL_EVENT_TZ_TRIP_ADD, /* Trip point added */ + THERMAL_GENL_EVENT_TZ_TRIP_DELETE, /* Trip point deleted */ + THERMAL_GENL_EVENT_CDEV_ADD, /* Cdev bound to the thermal zone */ + THERMAL_GENL_EVENT_CDEV_DELETE, /* Cdev unbound */ THERMAL_GENL_EVENT_CDEV_STATE_UPDATE, /* Cdev state updated */ THERMAL_GENL_EVENT_TZ_GOV_CHANGE, /* Governor policy changed */ THERMAL_GENL_EVENT_CPU_CAPABILITY_CHANGE, /* CPU capability changed */ - THERMAL_GENL_EVENT_THRESHOLD_ADD, /* A thresold has been added */ - THERMAL_GENL_EVENT_THRESHOLD_DELETE, /* A thresold has been deleted */ - THERMAL_GENL_EVENT_THRESHOLD_FLUSH, /* All thresolds have been deleted - */ - THERMAL_GENL_EVENT_THRESHOLD_UP, /* A thresold has been crossed the way - up */ - THERMAL_GENL_EVENT_THRESHOLD_DOWN, /* A thresold has been crossed the - way down */ + THERMAL_GENL_EVENT_THRESHOLD_ADD, /* A thresold has been added */ + THERMAL_GENL_EVENT_THRESHOLD_DELETE, /* A thresold has been deleted */ + THERMAL_GENL_EVENT_THRESHOLD_FLUSH, /* All thresolds have been deleted + */ + THERMAL_GENL_EVENT_THRESHOLD_UP, /* A thresold has been crossed the way + up */ + THERMAL_GENL_EVENT_THRESHOLD_DOWN, /* A thresold has been crossed the + way down */ __THERMAL_GENL_EVENT_MAX, }; #define THERMAL_GENL_EVENT_MAX (__THERMAL_GENL_EVENT_MAX - 1) @@ -96,14 +96,14 @@ enum thermal_genl_event { /* Commands supported by the thermal_genl_family */ enum thermal_genl_cmd { THERMAL_GENL_CMD_UNSPEC, - THERMAL_GENL_CMD_TZ_GET_ID, /* List of thermal zones id */ - THERMAL_GENL_CMD_TZ_GET_TRIP, /* List of thermal trips */ - THERMAL_GENL_CMD_TZ_GET_TEMP, /* Get the thermal zone temperature */ - THERMAL_GENL_CMD_TZ_GET_GOV, /* Get the thermal zone governor */ - THERMAL_GENL_CMD_TZ_GET_MODE, /* Get the thermal zone mode */ - THERMAL_GENL_CMD_CDEV_GET, /* List of cdev id */ - THERMAL_GENL_CMD_THRESHOLD_GET, /* List of thresholds */ - THERMAL_GENL_CMD_THRESHOLD_ADD, /* Add a threshold */ + THERMAL_GENL_CMD_TZ_GET_ID, /* List of thermal zones id */ + THERMAL_GENL_CMD_TZ_GET_TRIP, /* List of thermal trips */ + THERMAL_GENL_CMD_TZ_GET_TEMP, /* Get the thermal zone temperature */ + THERMAL_GENL_CMD_TZ_GET_GOV, /* Get the thermal zone governor */ + THERMAL_GENL_CMD_TZ_GET_MODE, /* Get the thermal zone mode */ + THERMAL_GENL_CMD_CDEV_GET, /* List of cdev id */ + THERMAL_GENL_CMD_THRESHOLD_GET, /* List of thresholds */ + THERMAL_GENL_CMD_THRESHOLD_ADD, /* Add a threshold */ THERMAL_GENL_CMD_THRESHOLD_DELETE, /* Delete a threshold */ THERMAL_GENL_CMD_THRESHOLD_FLUSH, /* Flush all the thresholds */ __THERMAL_GENL_CMD_MAX, diff --git a/include/arch/x86_64/linux/thp7312.h b/include/arch/x86_64/linux/thp7312.h index 837485df..e213686c 100644 --- a/include/arch/x86_64/linux/thp7312.h +++ b/include/arch/x86_64/linux/thp7312.h @@ -11,12 +11,9 @@ #include -#define V4L2_CID_THP7312_LOW_LIGHT_COMPENSATION \ - (V4L2_CID_USER_THP7312_BASE + 0x01) -#define V4L2_CID_THP7312_AUTO_FOCUS_METHOD (V4L2_CID_USER_THP7312_BASE + 0x02) -#define V4L2_CID_THP7312_NOISE_REDUCTION_AUTO \ - (V4L2_CID_USER_THP7312_BASE + 0x03) -#define V4L2_CID_THP7312_NOISE_REDUCTION_ABSOLUTE \ - (V4L2_CID_USER_THP7312_BASE + 0x04) +#define V4L2_CID_THP7312_LOW_LIGHT_COMPENSATION (V4L2_CID_USER_THP7312_BASE + 0x01) +#define V4L2_CID_THP7312_AUTO_FOCUS_METHOD (V4L2_CID_USER_THP7312_BASE + 0x02) +#define V4L2_CID_THP7312_NOISE_REDUCTION_AUTO (V4L2_CID_USER_THP7312_BASE + 0x03) +#define V4L2_CID_THP7312_NOISE_REDUCTION_ABSOLUTE (V4L2_CID_USER_THP7312_BASE + 0x04) #endif /* __UAPI_THP7312_H_ */ diff --git a/include/arch/x86_64/linux/timex.h b/include/arch/x86_64/linux/timex.h index dc867f67..64c9a14e 100644 --- a/include/arch/x86_64/linux/timex.h +++ b/include/arch/x86_64/linux/timex.h @@ -106,22 +106,22 @@ struct __kernel_timex_timeval { }; struct __kernel_timex { - unsigned int modes; /* mode selector */ - int : 32; /* pad */ - long long offset; /* time offset (usec) */ - long long freq; /* frequency offset (scaled ppm) */ - long long maxerror; /* maximum error (usec) */ - long long esterror; /* estimated error (usec) */ - int status; /* clock command/status */ - int : 32; /* pad */ - long long constant; /* pll time constant */ - long long precision; /* clock precision (usec) (read only) */ - long long tolerance; /* clock frequency tolerance (ppm) - * (read only) - */ + unsigned int modes; /* mode selector */ + int : 32; /* pad */ + long long offset; /* time offset (usec) */ + long long freq; /* frequency offset (scaled ppm) */ + long long maxerror; /* maximum error (usec) */ + long long esterror; /* estimated error (usec) */ + int status; /* clock command/status */ + int : 32; /* pad */ + long long constant; /* pll time constant */ + long long precision; /* clock precision (usec) (read only) */ + long long tolerance; /* clock frequency tolerance (ppm) + * (read only) + */ struct __kernel_timex_timeval time; /* (read only, except for ADJ_SETOFFSET) */ - long long tick; /* (modified) usecs between clock ticks */ + long long tick; /* (modified) usecs between clock ticks */ long long ppsfreq; /* pps frequency (scaled ppm) (ro) */ long long jitter; /* pps jitter (us) (ro) */ @@ -201,9 +201,8 @@ struct __kernel_timex { #define STA_CLK 0x8000 /* clock source (0 = A, 1 = B) (ro) */ /* read-only bits */ -#define STA_RONLY \ - (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR | \ - STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK) +#define STA_RONLY \ + (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK) /* * Clock states (time_state) diff --git a/include/arch/x86_64/linux/tiocl.h b/include/arch/x86_64/linux/tiocl.h index d2b7eda3..5de9cbe5 100644 --- a/include/arch/x86_64/linux/tiocl.h +++ b/include/arch/x86_64/linux/tiocl.h @@ -35,8 +35,7 @@ struct tiocl_selection { #define TIOCL_SCROLLCONSOLE 13 /* scroll console */ #define TIOCL_BLANKSCREEN 14 /* keep screen blank even if a key is pressed */ #define TIOCL_BLANKEDSCREEN 15 /* return which vt was blanked */ -#define TIOCL_GETKMSGREDIRECT \ - 17 /* get the vt the kernel messages are restricted to */ +#define TIOCL_GETKMSGREDIRECT 17 /* get the vt the kernel messages are restricted to */ #define TIOCL_GETBRACKETEDPASTE 18 /* get whether paste may be bracketed */ #endif /* _LINUX_TIOCL_H */ diff --git a/include/arch/x86_64/linux/tipc.h b/include/arch/x86_64/linux/tipc.h index eaf40889..47a5349c 100644 --- a/include/arch/x86_64/linux/tipc.h +++ b/include/arch/x86_64/linux/tipc.h @@ -245,10 +245,9 @@ struct tipc_aead_key { char key[]; }; -#define TIPC_AEAD_KEYLEN_MIN (16 + 4) -#define TIPC_AEAD_KEYLEN_MAX (32 + 4) -#define TIPC_AEAD_KEY_SIZE_MAX \ - (sizeof(struct tipc_aead_key) + TIPC_AEAD_KEYLEN_MAX) +#define TIPC_AEAD_KEYLEN_MIN (16 + 4) +#define TIPC_AEAD_KEYLEN_MAX (32 + 4) +#define TIPC_AEAD_KEY_SIZE_MAX (sizeof(struct tipc_aead_key) + TIPC_AEAD_KEYLEN_MAX) static __inline__ int tipc_aead_key_size(struct tipc_aead_key *key) { @@ -289,11 +288,9 @@ static __inline__ int tipc_aead_key_size(struct tipc_aead_key *key) #define tipc_name tipc_service_addr #define tipc_name_seq tipc_service_range -static __inline__ __u32 tipc_addr(unsigned int zone, unsigned int cluster, - unsigned int node) +static __inline__ __u32 tipc_addr(unsigned int zone, unsigned int cluster, unsigned int node) { - return (zone << TIPC_ZONE_OFFSET) | (cluster << TIPC_CLUSTER_OFFSET) | - node; + return (zone << TIPC_ZONE_OFFSET) | (cluster << TIPC_CLUSTER_OFFSET) | node; } static __inline__ unsigned int tipc_zone(__u32 addr) diff --git a/include/arch/x86_64/linux/tipc_config.h b/include/arch/x86_64/linux/tipc_config.h index c19eda61..ca784b77 100644 --- a/include/arch/x86_64/linux/tipc_config.h +++ b/include/arch/x86_64/linux/tipc_config.h @@ -215,8 +215,8 @@ struct tipc_link_config { #define TIPC_NTQ_ALLTYPES 0x80000000 struct tipc_name_table_query { - __be32 depth; /* 1:type, 2:+name info, 3:+port info, 4+:+debug info */ - __be32 type; /* {t,l,u} info ignored if high bit of "depth" is set */ + __be32 depth; /* 1:type, 2:+name info, 3:+port info, 4+:+debug info */ + __be32 type; /* {t,l,u} info ignored if high bit of "depth" is set */ __be32 lowbound; /* (i.e. displays all entries of name table) */ __be32 upbound; }; @@ -251,8 +251,7 @@ struct tlv_desc { #define TLV_ALIGNTO 4 -#define TLV_ALIGN(datalen) \ - (((datalen) + (TLV_ALIGNTO - 1)) & ~(TLV_ALIGNTO - 1)) +#define TLV_ALIGN(datalen) (((datalen) + (TLV_ALIGNTO - 1)) & ~(TLV_ALIGNTO - 1)) #define TLV_LENGTH(datalen) (sizeof(struct tlv_desc) + (datalen)) #define TLV_SPACE(datalen) (TLV_ALIGN(TLV_LENGTH(datalen))) #define TLV_DATA(tlv) ((void *)((char *)(tlv) + TLV_LENGTH(0))) @@ -268,14 +267,12 @@ static __inline__ int TLV_OK(const void *tlv, __u16 space) * mismatch when pointer is bigger than chosen type (int, long, ...). */ - return (space >= TLV_SPACE(0)) && - (__be16_to_cpu(((struct tlv_desc *)tlv)->tlv_len) <= space); + return (space >= TLV_SPACE(0)) && (__be16_to_cpu(((struct tlv_desc *)tlv)->tlv_len) <= space); } static __inline__ int TLV_CHECK(const void *tlv, __u16 space, __u16 exp_type) { - return TLV_OK(tlv, space) && - (__be16_to_cpu(((struct tlv_desc *)tlv)->tlv_type) == exp_type); + return TLV_OK(tlv, space) && (__be16_to_cpu(((struct tlv_desc *)tlv)->tlv_type) == exp_type); } static __inline__ int TLV_GET_LEN(struct tlv_desc *tlv) @@ -309,8 +306,7 @@ static __inline__ int TLV_SET(void *tlv, __u16 type, void *data, __u16 len) tlv_ptr->tlv_len = __cpu_to_be16(tlv_len); if (len && data) { memcpy(TLV_DATA(tlv_ptr), data, len); - memset((char *)TLV_DATA(tlv_ptr) + len, 0, - TLV_SPACE(len) - tlv_len); + memset((char *)TLV_DATA(tlv_ptr) + len, 0, TLV_SPACE(len) - tlv_len); } return TLV_SPACE(len); } @@ -325,8 +321,7 @@ struct tlv_list_desc { __u32 tlv_space; /* # bytes from curr TLV to list end */ }; -static __inline__ void TLV_LIST_INIT(struct tlv_list_desc *list, void *data, - __u32 space) +static __inline__ void TLV_LIST_INIT(struct tlv_list_desc *list, void *data, __u32 space) { list->tlv_ptr = (struct tlv_desc *)data; list->tlv_space = space; @@ -397,8 +392,7 @@ struct tipc_cfg_msg_hdr { #define TCM_SPACE(datalen) (TCM_ALIGN(TCM_LENGTH(datalen))) #define TCM_DATA(tcm_hdr) ((void *)((char *)(tcm_hdr) + TCM_LENGTH(0))) -static __inline__ int TCM_SET(void *msg, __u16 cmd, __u16 flags, void *data, - __u16 data_len) +static __inline__ int TCM_SET(void *msg, __u16 cmd, __u16 flags, void *data, __u16 data_len) { struct tipc_cfg_msg_hdr *tcm_hdr; int msg_len; @@ -410,8 +404,7 @@ static __inline__ int TCM_SET(void *msg, __u16 cmd, __u16 flags, void *data, tcm_hdr->tcm_flags = __cpu_to_be16(flags); if (data_len && data) { memcpy(TCM_DATA(msg), data, data_len); - memset((char *)TCM_DATA(msg) + data_len, 0, - TCM_SPACE(data_len) - msg_len); + memset((char *)TCM_DATA(msg) + data_len, 0, TCM_SPACE(data_len) - msg_len); } return TCM_SPACE(data_len); } diff --git a/include/arch/x86_64/linux/tls.h b/include/arch/x86_64/linux/tls.h index e4ae43f2..a2f3faca 100644 --- a/include/arch/x86_64/linux/tls.h +++ b/include/arch/x86_64/linux/tls.h @@ -47,8 +47,7 @@ #define TLS_VERSION_MINOR(ver) ((ver) & 0xFF) #define TLS_VERSION_MAJOR(ver) (((ver) >> 8) & 0xFF) -#define TLS_VERSION_NUMBER(id) \ - ((((id##_VERSION_MAJOR) & 0xFF) << 8) | ((id##_VERSION_MINOR) & 0xFF)) +#define TLS_VERSION_NUMBER(id) ((((id##_VERSION_MAJOR) & 0xFF) << 8) | ((id##_VERSION_MINOR) & 0xFF)) #define TLS_1_2_VERSION_MAJOR 0x3 #define TLS_1_2_VERSION_MINOR 0x3 diff --git a/include/arch/x86_64/linux/tty_flags.h b/include/arch/x86_64/linux/tty_flags.h index 209cd4ec..5de89f2a 100644 --- a/include/arch/x86_64/linux/tty_flags.h +++ b/include/arch/x86_64/linux/tty_flags.h @@ -74,11 +74,9 @@ #define ASYNC_MAGIC_MULTIPLIER (1U << ASYNCB_MAGIC_MULTIPLIER) #define ASYNC_FLAGS ((1U << (ASYNCB_LAST_USER + 1)) - 1) -#define ASYNC_DEPRECATED \ - (ASYNC_SPLIT_TERMIOS | ASYNC_SESSION_LOCKOUT | ASYNC_PGRP_LOCKOUT | \ - ASYNC_CALLOUT_NOHUP | ASYNC_AUTOPROBE) -#define ASYNC_USR_MASK \ - (ASYNC_SPD_MASK | ASYNC_CALLOUT_NOHUP | ASYNC_LOW_LATENCY) +#define ASYNC_DEPRECATED \ + (ASYNC_SPLIT_TERMIOS | ASYNC_SESSION_LOCKOUT | ASYNC_PGRP_LOCKOUT | ASYNC_CALLOUT_NOHUP | ASYNC_AUTOPROBE) +#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) diff --git a/include/arch/x86_64/linux/ublk_cmd.h b/include/arch/x86_64/linux/ublk_cmd.h index d00e3d71..e61cc2dc 100644 --- a/include/arch/x86_64/linux/ublk_cmd.h +++ b/include/arch/x86_64/linux/ublk_cmd.h @@ -25,30 +25,21 @@ #define UBLK_CMD_GET_DEV_INFO2 0x12 /* Any new ctrl command should encode by __IO*() */ -#define UBLK_U_CMD_GET_QUEUE_AFFINITY \ - _IOR('u', UBLK_CMD_GET_QUEUE_AFFINITY, struct ublksrv_ctrl_cmd) -#define UBLK_U_CMD_GET_DEV_INFO \ - _IOR('u', UBLK_CMD_GET_DEV_INFO, struct ublksrv_ctrl_cmd) -#define UBLK_U_CMD_ADD_DEV _IOWR('u', UBLK_CMD_ADD_DEV, struct ublksrv_ctrl_cmd) -#define UBLK_U_CMD_DEL_DEV _IOWR('u', UBLK_CMD_DEL_DEV, struct ublksrv_ctrl_cmd) -#define UBLK_U_CMD_START_DEV \ - _IOWR('u', UBLK_CMD_START_DEV, struct ublksrv_ctrl_cmd) -#define UBLK_U_CMD_STOP_DEV \ - _IOWR('u', UBLK_CMD_STOP_DEV, struct ublksrv_ctrl_cmd) -#define UBLK_U_CMD_SET_PARAMS \ - _IOWR('u', UBLK_CMD_SET_PARAMS, struct ublksrv_ctrl_cmd) -#define UBLK_U_CMD_GET_PARAMS \ - _IOR('u', UBLK_CMD_GET_PARAMS, struct ublksrv_ctrl_cmd) -#define UBLK_U_CMD_START_USER_RECOVERY \ - _IOWR('u', UBLK_CMD_START_USER_RECOVERY, struct ublksrv_ctrl_cmd) -#define UBLK_U_CMD_END_USER_RECOVERY \ - _IOWR('u', UBLK_CMD_END_USER_RECOVERY, struct ublksrv_ctrl_cmd) -#define UBLK_U_CMD_GET_DEV_INFO2 \ - _IOR('u', UBLK_CMD_GET_DEV_INFO2, struct ublksrv_ctrl_cmd) -#define UBLK_U_CMD_GET_FEATURES _IOR('u', 0x13, struct ublksrv_ctrl_cmd) -#define UBLK_U_CMD_DEL_DEV_ASYNC _IOR('u', 0x14, struct ublksrv_ctrl_cmd) -#define UBLK_U_CMD_UPDATE_SIZE _IOWR('u', 0x15, struct ublksrv_ctrl_cmd) -#define UBLK_U_CMD_QUIESCE_DEV _IOWR('u', 0x16, struct ublksrv_ctrl_cmd) +#define UBLK_U_CMD_GET_QUEUE_AFFINITY _IOR('u', UBLK_CMD_GET_QUEUE_AFFINITY, struct ublksrv_ctrl_cmd) +#define UBLK_U_CMD_GET_DEV_INFO _IOR('u', UBLK_CMD_GET_DEV_INFO, struct ublksrv_ctrl_cmd) +#define UBLK_U_CMD_ADD_DEV _IOWR('u', UBLK_CMD_ADD_DEV, struct ublksrv_ctrl_cmd) +#define UBLK_U_CMD_DEL_DEV _IOWR('u', UBLK_CMD_DEL_DEV, struct ublksrv_ctrl_cmd) +#define UBLK_U_CMD_START_DEV _IOWR('u', UBLK_CMD_START_DEV, struct ublksrv_ctrl_cmd) +#define UBLK_U_CMD_STOP_DEV _IOWR('u', UBLK_CMD_STOP_DEV, struct ublksrv_ctrl_cmd) +#define UBLK_U_CMD_SET_PARAMS _IOWR('u', UBLK_CMD_SET_PARAMS, struct ublksrv_ctrl_cmd) +#define UBLK_U_CMD_GET_PARAMS _IOR('u', UBLK_CMD_GET_PARAMS, struct ublksrv_ctrl_cmd) +#define UBLK_U_CMD_START_USER_RECOVERY _IOWR('u', UBLK_CMD_START_USER_RECOVERY, struct ublksrv_ctrl_cmd) +#define UBLK_U_CMD_END_USER_RECOVERY _IOWR('u', UBLK_CMD_END_USER_RECOVERY, struct ublksrv_ctrl_cmd) +#define UBLK_U_CMD_GET_DEV_INFO2 _IOR('u', UBLK_CMD_GET_DEV_INFO2, struct ublksrv_ctrl_cmd) +#define UBLK_U_CMD_GET_FEATURES _IOR('u', 0x13, struct ublksrv_ctrl_cmd) +#define UBLK_U_CMD_DEL_DEV_ASYNC _IOR('u', 0x14, struct ublksrv_ctrl_cmd) +#define UBLK_U_CMD_UPDATE_SIZE _IOWR('u', 0x15, struct ublksrv_ctrl_cmd) +#define UBLK_U_CMD_QUIESCE_DEV _IOWR('u', 0x16, struct ublksrv_ctrl_cmd) /* * 64bits are enough now, and it should be easy to extend in case of @@ -86,13 +77,11 @@ #define UBLK_IO_NEED_GET_DATA 0x22 /* Any new IO command should encode by __IOWR() */ -#define UBLK_U_IO_FETCH_REQ _IOWR('u', UBLK_IO_FETCH_REQ, struct ublksrv_io_cmd) -#define UBLK_U_IO_COMMIT_AND_FETCH_REQ \ - _IOWR('u', UBLK_IO_COMMIT_AND_FETCH_REQ, struct ublksrv_io_cmd) -#define UBLK_U_IO_NEED_GET_DATA \ - _IOWR('u', UBLK_IO_NEED_GET_DATA, struct ublksrv_io_cmd) -#define UBLK_U_IO_REGISTER_IO_BUF _IOWR('u', 0x23, struct ublksrv_io_cmd) -#define UBLK_U_IO_UNREGISTER_IO_BUF _IOWR('u', 0x24, struct ublksrv_io_cmd) +#define UBLK_U_IO_FETCH_REQ _IOWR('u', UBLK_IO_FETCH_REQ, struct ublksrv_io_cmd) +#define UBLK_U_IO_COMMIT_AND_FETCH_REQ _IOWR('u', UBLK_IO_COMMIT_AND_FETCH_REQ, struct ublksrv_io_cmd) +#define UBLK_U_IO_NEED_GET_DATA _IOWR('u', UBLK_IO_NEED_GET_DATA, struct ublksrv_io_cmd) +#define UBLK_U_IO_REGISTER_IO_BUF _IOWR('u', 0x23, struct ublksrv_io_cmd) +#define UBLK_U_IO_UNREGISTER_IO_BUF _IOWR('u', 0x24, struct ublksrv_io_cmd) /* only ABORT means that no re-fetch */ #define UBLK_IO_RES_OK 0 @@ -467,8 +456,7 @@ struct ublk_auto_buf_reg { * - bit24 ~ bit31: reserved0 * - bit32 ~ bit63: reserved1 */ -static __inline__ struct ublk_auto_buf_reg -ublk_sqe_addr_to_auto_buf_reg(__u64 sqe_addr) +static __inline__ struct ublk_auto_buf_reg ublk_sqe_addr_to_auto_buf_reg(__u64 sqe_addr) { struct ublk_auto_buf_reg reg = { .index = (__u16)sqe_addr, @@ -480,11 +468,9 @@ ublk_sqe_addr_to_auto_buf_reg(__u64 sqe_addr) return reg; } -static __inline__ __u64 -ublk_auto_buf_reg_to_sqe_addr(const struct ublk_auto_buf_reg *buf) +static __inline__ __u64 ublk_auto_buf_reg_to_sqe_addr(const struct ublk_auto_buf_reg *buf) { - __u64 addr = buf->index | (__u64)buf->flags << 16 | - (__u64)buf->reserved0 << 24 | (__u64)buf->reserved1 << 32; + __u64 addr = buf->index | (__u64)buf->flags << 16 | (__u64)buf->reserved0 << 24 | (__u64)buf->reserved1 << 32; return addr; } diff --git a/include/arch/x86_64/linux/udp.h b/include/arch/x86_64/linux/udp.h index 28645579..737c0eb6 100644 --- a/include/arch/x86_64/linux/udp.h +++ b/include/arch/x86_64/linux/udp.h @@ -36,14 +36,13 @@ struct udphdr { #define UDP_GRO 104 /* This socket can receive UDP GRO packets */ /* UDP encapsulation types */ -#define UDP_ENCAP_ESPINUDP_NON_IKE \ - 1 /* unused draft-ietf-ipsec-nat-t-ike-00/01 */ -#define UDP_ENCAP_ESPINUDP 2 /* draft-ietf-ipsec-udp-encaps-06 */ -#define UDP_ENCAP_L2TPINUDP 3 /* rfc2661 */ -#define UDP_ENCAP_GTP0 4 /* GSM TS 09.60 */ -#define UDP_ENCAP_GTP1U 5 /* 3GPP TS 29.060 */ -#define UDP_ENCAP_RXRPC 6 -#define TCP_ENCAP_ESPINTCP 7 /* Yikes, this is really xfrm encap types. */ -#define UDP_ENCAP_OVPNINUDP 8 /* OpenVPN traffic */ +#define UDP_ENCAP_ESPINUDP_NON_IKE 1 /* unused draft-ietf-ipsec-nat-t-ike-00/01 */ +#define UDP_ENCAP_ESPINUDP 2 /* draft-ietf-ipsec-udp-encaps-06 */ +#define UDP_ENCAP_L2TPINUDP 3 /* rfc2661 */ +#define UDP_ENCAP_GTP0 4 /* GSM TS 09.60 */ +#define UDP_ENCAP_GTP1U 5 /* 3GPP TS 29.060 */ +#define UDP_ENCAP_RXRPC 6 +#define TCP_ENCAP_ESPINTCP 7 /* Yikes, this is really xfrm encap types. */ +#define UDP_ENCAP_OVPNINUDP 8 /* OpenVPN traffic */ #endif /* _LINUX_UDP_H */ diff --git a/include/arch/x86_64/linux/uinput.h b/include/arch/x86_64/linux/uinput.h index d489070d..f7a08f77 100644 --- a/include/arch/x86_64/linux/uinput.h +++ b/include/arch/x86_64/linux/uinput.h @@ -146,11 +146,10 @@ struct uinput_abs_setup { #define UI_SET_SWBIT _IOW(UINPUT_IOCTL_BASE, 109, int) #define UI_SET_PROPBIT _IOW(UINPUT_IOCTL_BASE, 110, int) -#define UI_BEGIN_FF_UPLOAD \ - _IOWR(UINPUT_IOCTL_BASE, 200, struct uinput_ff_upload) -#define UI_END_FF_UPLOAD _IOW(UINPUT_IOCTL_BASE, 201, struct uinput_ff_upload) -#define UI_BEGIN_FF_ERASE _IOWR(UINPUT_IOCTL_BASE, 202, struct uinput_ff_erase) -#define UI_END_FF_ERASE _IOW(UINPUT_IOCTL_BASE, 203, struct uinput_ff_erase) +#define UI_BEGIN_FF_UPLOAD _IOWR(UINPUT_IOCTL_BASE, 200, struct uinput_ff_upload) +#define UI_END_FF_UPLOAD _IOW(UINPUT_IOCTL_BASE, 201, struct uinput_ff_upload) +#define UI_BEGIN_FF_ERASE _IOWR(UINPUT_IOCTL_BASE, 202, struct uinput_ff_erase) +#define UI_END_FF_ERASE _IOW(UINPUT_IOCTL_BASE, 203, struct uinput_ff_erase) /** * UI_GET_SYSNAME - get the sysfs name of the created uinput device diff --git a/include/arch/x86_64/linux/uio.h b/include/arch/x86_64/linux/uio.h index 42e7ffd2..d1c14b79 100644 --- a/include/arch/x86_64/linux/uio.h +++ b/include/arch/x86_64/linux/uio.h @@ -13,7 +13,7 @@ #include struct iovec { - void *iov_base; /* BSD uses caddr_t (1003.1g requires void *) */ + void *iov_base; /* BSD uses caddr_t (1003.1g requires void *) */ __kernel_size_t iov_len; /* Must be size_t (1003.1g) */ }; diff --git a/include/arch/x86_64/linux/ultrasound.h b/include/arch/x86_64/linux/ultrasound.h index eda9e5a7..f2dea9f7 100644 --- a/include/arch/x86_64/linux/ultrasound.h +++ b/include/arch/x86_64/linux/ultrasound.h @@ -84,33 +84,22 @@ _SEQ_ADVBUF(8); \ } -#define GUS_NUMVOICES(chn, p1) _GUS_CMD(chn, 0, _GUS_NUMVOICES, (p1), 0) -#define GUS_VOICESAMPLE(chn, voice, p1) \ - _GUS_CMD(chn, voice, _GUS_VOICESAMPLE, (p1), 0) /* OBSOLETE */ -#define GUS_VOICEON(chn, voice, p1) _GUS_CMD(chn, voice, _GUS_VOICEON, (p1), 0) -#define GUS_VOICEOFF(chn, voice) _GUS_CMD(chn, voice, _GUS_VOICEOFF, 0, 0) -#define GUS_VOICEFADE(chn, voice) _GUS_CMD(chn, voice, _GUS_VOICEFADE, 0, 0) -#define GUS_VOICEMODE(chn, voice, p1) \ - _GUS_CMD(chn, voice, _GUS_VOICEMODE, (p1), 0) -#define GUS_VOICEBALA(chn, voice, p1) \ - _GUS_CMD(chn, voice, _GUS_VOICEBALA, (p1), 0) -#define GUS_VOICEFREQ(chn, voice, p) \ - _GUS_CMD(chn, voice, _GUS_VOICEFREQ, (p) & 0xffff, ((p) >> 16) & 0xffff) -#define GUS_VOICEVOL(chn, voice, p1) \ - _GUS_CMD(chn, voice, _GUS_VOICEVOL, (p1), 0) -#define GUS_VOICEVOL2(chn, voice, p1) \ - _GUS_CMD(chn, voice, _GUS_VOICEVOL2, (p1), 0) -#define GUS_RAMPRANGE(chn, voice, low, high) \ - _GUS_CMD(chn, voice, _GUS_RAMPRANGE, (low), (high)) -#define GUS_RAMPRATE(chn, voice, p1, p2) \ - _GUS_CMD(chn, voice, _GUS_RAMPRATE, (p1), (p2)) -#define GUS_RAMPMODE(chn, voice, p1) \ - _GUS_CMD(chn, voice, _GUS_RAMPMODE, (p1), 0) -#define GUS_RAMPON(chn, voice, p1) _GUS_CMD(chn, voice, _GUS_RAMPON, (p1), 0) -#define GUS_RAMPOFF(chn, voice) _GUS_CMD(chn, voice, _GUS_RAMPOFF, 0, 0) -#define GUS_VOLUME_SCALE(chn, voice, p1, p2) \ - _GUS_CMD(chn, voice, _GUS_VOLUME_SCALE, (p1), (p2)) -#define GUS_VOICE_POS(chn, voice, p) \ - _GUS_CMD(chn, voice, _GUS_VOICE_POS, (p) & 0xffff, ((p) >> 16) & 0xffff) +#define GUS_NUMVOICES(chn, p1) _GUS_CMD(chn, 0, _GUS_NUMVOICES, (p1), 0) +#define GUS_VOICESAMPLE(chn, voice, p1) _GUS_CMD(chn, voice, _GUS_VOICESAMPLE, (p1), 0) /* OBSOLETE */ +#define GUS_VOICEON(chn, voice, p1) _GUS_CMD(chn, voice, _GUS_VOICEON, (p1), 0) +#define GUS_VOICEOFF(chn, voice) _GUS_CMD(chn, voice, _GUS_VOICEOFF, 0, 0) +#define GUS_VOICEFADE(chn, voice) _GUS_CMD(chn, voice, _GUS_VOICEFADE, 0, 0) +#define GUS_VOICEMODE(chn, voice, p1) _GUS_CMD(chn, voice, _GUS_VOICEMODE, (p1), 0) +#define GUS_VOICEBALA(chn, voice, p1) _GUS_CMD(chn, voice, _GUS_VOICEBALA, (p1), 0) +#define GUS_VOICEFREQ(chn, voice, p) _GUS_CMD(chn, voice, _GUS_VOICEFREQ, (p) & 0xffff, ((p) >> 16) & 0xffff) +#define GUS_VOICEVOL(chn, voice, p1) _GUS_CMD(chn, voice, _GUS_VOICEVOL, (p1), 0) +#define GUS_VOICEVOL2(chn, voice, p1) _GUS_CMD(chn, voice, _GUS_VOICEVOL2, (p1), 0) +#define GUS_RAMPRANGE(chn, voice, low, high) _GUS_CMD(chn, voice, _GUS_RAMPRANGE, (low), (high)) +#define GUS_RAMPRATE(chn, voice, p1, p2) _GUS_CMD(chn, voice, _GUS_RAMPRATE, (p1), (p2)) +#define GUS_RAMPMODE(chn, voice, p1) _GUS_CMD(chn, voice, _GUS_RAMPMODE, (p1), 0) +#define GUS_RAMPON(chn, voice, p1) _GUS_CMD(chn, voice, _GUS_RAMPON, (p1), 0) +#define GUS_RAMPOFF(chn, voice) _GUS_CMD(chn, voice, _GUS_RAMPOFF, 0, 0) +#define GUS_VOLUME_SCALE(chn, voice, p1, p2) _GUS_CMD(chn, voice, _GUS_VOLUME_SCALE, (p1), (p2)) +#define GUS_VOICE_POS(chn, voice, p) _GUS_CMD(chn, voice, _GUS_VOICE_POS, (p) & 0xffff, ((p) >> 16) & 0xffff) #endif diff --git a/include/arch/x86_64/linux/usb/audio.h b/include/arch/x86_64/linux/usb/audio.h index 6f54d12f..43bb09a1 100644 --- a/include/arch/x86_64/linux/usb/audio.h +++ b/include/arch/x86_64/linux/usb/audio.h @@ -264,37 +264,27 @@ struct uac_mixer_unit_descriptor { __u8 baSourceID[]; } __attribute__((packed)); -static __inline__ __u8 -uac_mixer_unit_bNrChannels(struct uac_mixer_unit_descriptor *desc) +static __inline__ __u8 uac_mixer_unit_bNrChannels(struct uac_mixer_unit_descriptor *desc) { return desc->baSourceID[desc->bNrInPins]; } -static __inline__ __u32 -uac_mixer_unit_wChannelConfig(struct uac_mixer_unit_descriptor *desc, - int protocol) +static __inline__ __u32 uac_mixer_unit_wChannelConfig(struct uac_mixer_unit_descriptor *desc, int protocol) { if (protocol == UAC_VERSION_1) - return (desc->baSourceID[desc->bNrInPins + 2] << 8) | - desc->baSourceID[desc->bNrInPins + 1]; + return (desc->baSourceID[desc->bNrInPins + 2] << 8) | desc->baSourceID[desc->bNrInPins + 1]; else - return (desc->baSourceID[desc->bNrInPins + 4] << 24) | - (desc->baSourceID[desc->bNrInPins + 3] << 16) | - (desc->baSourceID[desc->bNrInPins + 2] << 8) | - (desc->baSourceID[desc->bNrInPins + 1]); + return (desc->baSourceID[desc->bNrInPins + 4] << 24) | (desc->baSourceID[desc->bNrInPins + 3] << 16) | + (desc->baSourceID[desc->bNrInPins + 2] << 8) | (desc->baSourceID[desc->bNrInPins + 1]); } -static __inline__ __u8 -uac_mixer_unit_iChannelNames(struct uac_mixer_unit_descriptor *desc, - int protocol) +static __inline__ __u8 uac_mixer_unit_iChannelNames(struct uac_mixer_unit_descriptor *desc, int protocol) { - return (protocol == UAC_VERSION_1) ? - desc->baSourceID[desc->bNrInPins + 3] : - desc->baSourceID[desc->bNrInPins + 5]; + return (protocol == UAC_VERSION_1) ? desc->baSourceID[desc->bNrInPins + 3] : + desc->baSourceID[desc->bNrInPins + 5]; } -static __inline__ __u8 * -uac_mixer_unit_bmControls(struct uac_mixer_unit_descriptor *desc, int protocol) +static __inline__ __u8 *uac_mixer_unit_bmControls(struct uac_mixer_unit_descriptor *desc, int protocol) { switch (protocol) { case UAC_VERSION_1: @@ -308,15 +298,12 @@ uac_mixer_unit_bmControls(struct uac_mixer_unit_descriptor *desc, int protocol) } } -static __inline__ __u16 -uac3_mixer_unit_wClusterDescrID(struct uac_mixer_unit_descriptor *desc) +static __inline__ __u16 uac3_mixer_unit_wClusterDescrID(struct uac_mixer_unit_descriptor *desc) { - return (desc->baSourceID[desc->bNrInPins + 1] << 8) | - desc->baSourceID[desc->bNrInPins]; + return (desc->baSourceID[desc->bNrInPins + 1] << 8) | desc->baSourceID[desc->bNrInPins]; } -static __inline__ __u8 -uac_mixer_unit_iMixer(struct uac_mixer_unit_descriptor *desc) +static __inline__ __u8 uac_mixer_unit_iMixer(struct uac_mixer_unit_descriptor *desc) { __u8 *raw = (__u8 *)desc; return raw[desc->bLength - 1]; @@ -332,8 +319,7 @@ struct uac_selector_unit_descriptor { __u8 baSourceID[]; } __attribute__((packed)); -static __inline__ __u8 -uac_selector_unit_iSelector(struct uac_selector_unit_descriptor *desc) +static __inline__ __u8 uac_selector_unit_iSelector(struct uac_selector_unit_descriptor *desc) { __u8 *raw = (__u8 *)desc; return raw[desc->bLength - 1]; @@ -350,8 +336,7 @@ struct uac_feature_unit_descriptor { __u8 bmaControls[]; /* variable length */ } __attribute__((packed)); -static __inline__ __u8 -uac_feature_unit_iFeature(struct uac_feature_unit_descriptor *desc) +static __inline__ __u8 uac_feature_unit_iFeature(struct uac_feature_unit_descriptor *desc) { __u8 *raw = (__u8 *)desc; return raw[desc->bLength - 1]; @@ -368,38 +353,27 @@ struct uac_processing_unit_descriptor { __u8 baSourceID[]; } __attribute__((packed)); -static __inline__ __u8 -uac_processing_unit_bNrChannels(struct uac_processing_unit_descriptor *desc) +static __inline__ __u8 uac_processing_unit_bNrChannels(struct uac_processing_unit_descriptor *desc) { return desc->baSourceID[desc->bNrInPins]; } -static __inline__ __u32 -uac_processing_unit_wChannelConfig(struct uac_processing_unit_descriptor *desc, - int protocol) +static __inline__ __u32 uac_processing_unit_wChannelConfig(struct uac_processing_unit_descriptor *desc, int protocol) { if (protocol == UAC_VERSION_1) - return (desc->baSourceID[desc->bNrInPins + 2] << 8) | - desc->baSourceID[desc->bNrInPins + 1]; + return (desc->baSourceID[desc->bNrInPins + 2] << 8) | desc->baSourceID[desc->bNrInPins + 1]; else - return (desc->baSourceID[desc->bNrInPins + 4] << 24) | - (desc->baSourceID[desc->bNrInPins + 3] << 16) | - (desc->baSourceID[desc->bNrInPins + 2] << 8) | - (desc->baSourceID[desc->bNrInPins + 1]); + return (desc->baSourceID[desc->bNrInPins + 4] << 24) | (desc->baSourceID[desc->bNrInPins + 3] << 16) | + (desc->baSourceID[desc->bNrInPins + 2] << 8) | (desc->baSourceID[desc->bNrInPins + 1]); } -static __inline__ __u8 -uac_processing_unit_iChannelNames(struct uac_processing_unit_descriptor *desc, - int protocol) +static __inline__ __u8 uac_processing_unit_iChannelNames(struct uac_processing_unit_descriptor *desc, int protocol) { - return (protocol == UAC_VERSION_1) ? - desc->baSourceID[desc->bNrInPins + 3] : - desc->baSourceID[desc->bNrInPins + 5]; + return (protocol == UAC_VERSION_1) ? desc->baSourceID[desc->bNrInPins + 3] : + desc->baSourceID[desc->bNrInPins + 5]; } -static __inline__ __u8 -uac_processing_unit_bControlSize(struct uac_processing_unit_descriptor *desc, - int protocol) +static __inline__ __u8 uac_processing_unit_bControlSize(struct uac_processing_unit_descriptor *desc, int protocol) { switch (protocol) { case UAC_VERSION_1: @@ -413,9 +387,7 @@ uac_processing_unit_bControlSize(struct uac_processing_unit_descriptor *desc, } } -static __inline__ __u8 * -uac_processing_unit_bmControls(struct uac_processing_unit_descriptor *desc, - int protocol) +static __inline__ __u8 *uac_processing_unit_bmControls(struct uac_processing_unit_descriptor *desc, int protocol) { switch (protocol) { case UAC_VERSION_1: @@ -429,9 +401,7 @@ uac_processing_unit_bmControls(struct uac_processing_unit_descriptor *desc, } } -static __inline__ __u8 -uac_processing_unit_iProcessing(struct uac_processing_unit_descriptor *desc, - int protocol) +static __inline__ __u8 uac_processing_unit_iProcessing(struct uac_processing_unit_descriptor *desc, int protocol) { __u8 control_size = uac_processing_unit_bControlSize(desc, protocol); @@ -439,16 +409,13 @@ uac_processing_unit_iProcessing(struct uac_processing_unit_descriptor *desc, case UAC_VERSION_1: case UAC_VERSION_2: default: - return *(uac_processing_unit_bmControls(desc, protocol) + - control_size); + return *(uac_processing_unit_bmControls(desc, protocol) + control_size); case UAC_VERSION_3: return 0; /* UAC3 does not have this field */ } } -static __inline__ __u8 * -uac_processing_unit_specific(struct uac_processing_unit_descriptor *desc, - int protocol) +static __inline__ __u8 *uac_processing_unit_specific(struct uac_processing_unit_descriptor *desc, int protocol) { __u8 control_size = uac_processing_unit_bControlSize(desc, protocol); @@ -456,11 +423,9 @@ uac_processing_unit_specific(struct uac_processing_unit_descriptor *desc, case UAC_VERSION_1: case UAC_VERSION_2: default: - return uac_processing_unit_bmControls(desc, protocol) + - control_size + 1; + return uac_processing_unit_bmControls(desc, protocol) + control_size + 1; case UAC_VERSION_3: - return uac_processing_unit_bmControls(desc, protocol) + - control_size; + return uac_processing_unit_bmControls(desc, protocol) + control_size; } } @@ -470,9 +435,7 @@ uac_processing_unit_specific(struct uac_processing_unit_descriptor *desc, * XU while 2 bytes for PU. The last iExtension field is a one-byte index as * well as iProcessing field of PU. */ -static __inline__ __u8 -uac_extension_unit_bControlSize(struct uac_processing_unit_descriptor *desc, - int protocol) +static __inline__ __u8 uac_extension_unit_bControlSize(struct uac_processing_unit_descriptor *desc, int protocol) { switch (protocol) { case UAC_VERSION_1: @@ -486,9 +449,7 @@ uac_extension_unit_bControlSize(struct uac_processing_unit_descriptor *desc, } } -static __inline__ __u8 -uac_extension_unit_iExtension(struct uac_processing_unit_descriptor *desc, - int protocol) +static __inline__ __u8 uac_extension_unit_iExtension(struct uac_processing_unit_descriptor *desc, int protocol) { __u8 control_size = uac_extension_unit_bControlSize(desc, protocol); @@ -496,8 +457,7 @@ uac_extension_unit_iExtension(struct uac_processing_unit_descriptor *desc, case UAC_VERSION_1: case UAC_VERSION_2: default: - return *(uac_processing_unit_bmControls(desc, protocol) + - control_size); + return *(uac_processing_unit_bmControls(desc, protocol) + control_size); case UAC_VERSION_3: return 0; /* UAC3 does not have this field */ } diff --git a/include/arch/x86_64/linux/usb/cdc.h b/include/arch/x86_64/linux/usb/cdc.h index 32ae0b7a..14fd53e5 100644 --- a/include/arch/x86_64/linux/usb/cdc.h +++ b/include/arch/x86_64/linux/usb/cdc.h @@ -375,10 +375,8 @@ 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 : IPS0 for now */ -#define USB_CDC_MBIM_NDP32_IPS_SIGN \ - 0x00737069 /* ips : ips0 for now */ +#define USB_CDC_MBIM_NDP16_IPS_SIGN 0x00535049 /* IPS : IPS0 for now */ +#define USB_CDC_MBIM_NDP32_IPS_SIGN 0x00737069 /* ips : ips0 for now */ #define USB_CDC_MBIM_NDP16_DSS_SIGN 0x00535344 /* DSS */ #define USB_CDC_MBIM_NDP32_DSS_SIGN 0x00737364 /* dss */ diff --git a/include/arch/x86_64/linux/usb/ch11.h b/include/arch/x86_64/linux/usb/ch11.h index f47ba10f..0773174d 100644 --- a/include/arch/x86_64/linux/usb/ch11.h +++ b/include/arch/x86_64/linux/usb/ch11.h @@ -144,9 +144,8 @@ struct usb_port_status { #define USB_PORT_STAT_SPEED_5GBPS 0x0000 /* Valid only if port is enabled */ /* Bits that are the same from USB 2.0 */ -#define USB_SS_PORT_STAT_MASK \ - (USB_PORT_STAT_CONNECTION | USB_PORT_STAT_ENABLE | \ - USB_PORT_STAT_OVERCURRENT | USB_PORT_STAT_RESET) +#define USB_SS_PORT_STAT_MASK \ + (USB_PORT_STAT_CONNECTION | USB_PORT_STAT_ENABLE | USB_PORT_STAT_OVERCURRENT | USB_PORT_STAT_RESET) /* * Definitions for PORT_LINK_STATE values diff --git a/include/arch/x86_64/linux/usb/ch9.h b/include/arch/x86_64/linux/usb/ch9.h index 19b44287..f62ffe01 100644 --- a/include/arch/x86_64/linux/usb/ch9.h +++ b/include/arch/x86_64/linux/usb/ch9.h @@ -444,8 +444,7 @@ struct usb_endpoint_descriptor { #define USB_ENDPOINT_MAXP_MASK 0x07ff #define USB_EP_MAXP_MULT_SHIFT 11 #define USB_EP_MAXP_MULT_MASK (3 << USB_EP_MAXP_MULT_SHIFT) -#define USB_EP_MAXP_MULT(m) \ - (((m) & USB_EP_MAXP_MULT_MASK) >> USB_EP_MAXP_MULT_SHIFT) +#define USB_EP_MAXP_MULT(m) (((m) & USB_EP_MAXP_MULT_MASK) >> USB_EP_MAXP_MULT_SHIFT) /* The USB 3.0 spec redefines bits 5:4 of bmAttributes as interrupt ep type. */ #define USB_ENDPOINT_INTRTYPE 0x30 @@ -458,11 +457,10 @@ struct usb_endpoint_descriptor { #define USB_ENDPOINT_SYNC_ADAPTIVE (2 << 2) #define USB_ENDPOINT_SYNC_SYNC (3 << 2) -#define USB_ENDPOINT_USAGE_MASK 0x30 -#define USB_ENDPOINT_USAGE_DATA 0x00 -#define USB_ENDPOINT_USAGE_FEEDBACK 0x10 -#define USB_ENDPOINT_USAGE_IMPLICIT_FB \ - 0x20 /* Implicit feedback Data endpoint */ +#define USB_ENDPOINT_USAGE_MASK 0x30 +#define USB_ENDPOINT_USAGE_DATA 0x00 +#define USB_ENDPOINT_USAGE_FEEDBACK 0x10 +#define USB_ENDPOINT_USAGE_IMPLICIT_FB 0x20 /* Implicit feedback Data endpoint */ /*-------------------------------------------------------------------------*/ @@ -472,8 +470,7 @@ struct usb_endpoint_descriptor { * * Returns @epd's number: 0 to 15. */ -static __inline__ int -usb_endpoint_num(const struct usb_endpoint_descriptor *epd) +static __inline__ int usb_endpoint_num(const struct usb_endpoint_descriptor *epd) { return epd->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; } @@ -485,8 +482,7 @@ usb_endpoint_num(const struct usb_endpoint_descriptor *epd) * Returns one of USB_ENDPOINT_XFER_{CONTROL, ISOC, BULK, INT} according * to @epd's transfer type. */ -static __inline__ int -usb_endpoint_type(const struct usb_endpoint_descriptor *epd) +static __inline__ int usb_endpoint_type(const struct usb_endpoint_descriptor *epd) { return epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; } @@ -497,8 +493,7 @@ usb_endpoint_type(const struct usb_endpoint_descriptor *epd) * * Returns true if the endpoint is of type IN, otherwise it returns false. */ -static __inline__ int -usb_endpoint_dir_in(const struct usb_endpoint_descriptor *epd) +static __inline__ int usb_endpoint_dir_in(const struct usb_endpoint_descriptor *epd) { return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN); } @@ -509,8 +504,7 @@ usb_endpoint_dir_in(const struct usb_endpoint_descriptor *epd) * * Returns true if the endpoint is of type OUT, otherwise it returns false. */ -static __inline__ int -usb_endpoint_dir_out(const struct usb_endpoint_descriptor *epd) +static __inline__ int usb_endpoint_dir_out(const struct usb_endpoint_descriptor *epd) { return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT); } @@ -521,11 +515,9 @@ usb_endpoint_dir_out(const struct usb_endpoint_descriptor *epd) * * Returns true if the endpoint is of type bulk, otherwise it returns false. */ -static __inline__ int -usb_endpoint_xfer_bulk(const struct usb_endpoint_descriptor *epd) +static __inline__ int usb_endpoint_xfer_bulk(const struct usb_endpoint_descriptor *epd) { - return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == - USB_ENDPOINT_XFER_BULK); + return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_BULK); } /** @@ -534,11 +526,9 @@ usb_endpoint_xfer_bulk(const struct usb_endpoint_descriptor *epd) * * Returns true if the endpoint is of type control, otherwise it returns false. */ -static __inline__ int -usb_endpoint_xfer_control(const struct usb_endpoint_descriptor *epd) +static __inline__ int usb_endpoint_xfer_control(const struct usb_endpoint_descriptor *epd) { - return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == - USB_ENDPOINT_XFER_CONTROL); + return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_CONTROL); } /** @@ -548,11 +538,9 @@ usb_endpoint_xfer_control(const struct usb_endpoint_descriptor *epd) * Returns true if the endpoint is of type interrupt, otherwise it returns * false. */ -static __inline__ int -usb_endpoint_xfer_int(const struct usb_endpoint_descriptor *epd) +static __inline__ int usb_endpoint_xfer_int(const struct usb_endpoint_descriptor *epd) { - return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == - USB_ENDPOINT_XFER_INT); + return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT); } /** @@ -562,11 +550,9 @@ usb_endpoint_xfer_int(const struct usb_endpoint_descriptor *epd) * Returns true if the endpoint is of type isochronous, otherwise it returns * false. */ -static __inline__ int -usb_endpoint_xfer_isoc(const struct usb_endpoint_descriptor *epd) +static __inline__ int usb_endpoint_xfer_isoc(const struct usb_endpoint_descriptor *epd) { - return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == - USB_ENDPOINT_XFER_ISOC); + return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_ISOC); } /** @@ -576,8 +562,7 @@ usb_endpoint_xfer_isoc(const struct usb_endpoint_descriptor *epd) * Returns true if the endpoint has bulk transfer type and IN direction, * otherwise it returns false. */ -static __inline__ int -usb_endpoint_is_bulk_in(const struct usb_endpoint_descriptor *epd) +static __inline__ int usb_endpoint_is_bulk_in(const struct usb_endpoint_descriptor *epd) { return usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_in(epd); } @@ -589,8 +574,7 @@ usb_endpoint_is_bulk_in(const struct usb_endpoint_descriptor *epd) * Returns true if the endpoint has bulk transfer type and OUT direction, * otherwise it returns false. */ -static __inline__ int -usb_endpoint_is_bulk_out(const struct usb_endpoint_descriptor *epd) +static __inline__ int usb_endpoint_is_bulk_out(const struct usb_endpoint_descriptor *epd) { return usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_out(epd); } @@ -602,8 +586,7 @@ usb_endpoint_is_bulk_out(const struct usb_endpoint_descriptor *epd) * Returns true if the endpoint has interrupt transfer type and IN direction, * otherwise it returns false. */ -static __inline__ int -usb_endpoint_is_int_in(const struct usb_endpoint_descriptor *epd) +static __inline__ int usb_endpoint_is_int_in(const struct usb_endpoint_descriptor *epd) { return usb_endpoint_xfer_int(epd) && usb_endpoint_dir_in(epd); } @@ -615,8 +598,7 @@ usb_endpoint_is_int_in(const struct usb_endpoint_descriptor *epd) * Returns true if the endpoint has interrupt transfer type and OUT direction, * otherwise it returns false. */ -static __inline__ int -usb_endpoint_is_int_out(const struct usb_endpoint_descriptor *epd) +static __inline__ int usb_endpoint_is_int_out(const struct usb_endpoint_descriptor *epd) { return usb_endpoint_xfer_int(epd) && usb_endpoint_dir_out(epd); } @@ -628,8 +610,7 @@ usb_endpoint_is_int_out(const struct usb_endpoint_descriptor *epd) * Returns true if the endpoint has isochronous transfer type and IN direction, * otherwise it returns false. */ -static __inline__ int -usb_endpoint_is_isoc_in(const struct usb_endpoint_descriptor *epd) +static __inline__ int usb_endpoint_is_isoc_in(const struct usb_endpoint_descriptor *epd) { return usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_in(epd); } @@ -641,8 +622,7 @@ usb_endpoint_is_isoc_in(const struct usb_endpoint_descriptor *epd) * Returns true if the endpoint has isochronous transfer type and OUT direction, * otherwise it returns false. */ -static __inline__ int -usb_endpoint_is_isoc_out(const struct usb_endpoint_descriptor *epd) +static __inline__ int usb_endpoint_is_isoc_out(const struct usb_endpoint_descriptor *epd) { return usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_out(epd); } @@ -653,8 +633,7 @@ usb_endpoint_is_isoc_out(const struct usb_endpoint_descriptor *epd) * * Returns @epd's max packet bits [10:0] */ -static __inline__ int -usb_endpoint_maxp(const struct usb_endpoint_descriptor *epd) +static __inline__ int usb_endpoint_maxp(const struct usb_endpoint_descriptor *epd) { return __le16_to_cpu(epd->wMaxPacketSize) & USB_ENDPOINT_MAXP_MASK; } @@ -665,16 +644,14 @@ usb_endpoint_maxp(const struct usb_endpoint_descriptor *epd) * * Return @epd's wMaxPacketSize[12:11] + 1 */ -static __inline__ int -usb_endpoint_maxp_mult(const struct usb_endpoint_descriptor *epd) +static __inline__ int usb_endpoint_maxp_mult(const struct usb_endpoint_descriptor *epd) { int maxp = __le16_to_cpu(epd->wMaxPacketSize); return USB_EP_MAXP_MULT(maxp) + 1; } -static __inline__ int -usb_endpoint_interrupt_type(const struct usb_endpoint_descriptor *epd) +static __inline__ int usb_endpoint_interrupt_type(const struct usb_endpoint_descriptor *epd) { return epd->bmAttributes & USB_ENDPOINT_INTRTYPE; } @@ -720,8 +697,7 @@ struct usb_ss_ep_comp_descriptor { #define USB_DT_SS_EP_COMP_SIZE 6 /* Bits 4:0 of bmAttributes if this is a bulk endpoint */ -static __inline__ int -usb_ss_max_streams(const struct usb_ss_ep_comp_descriptor *comp) +static __inline__ int usb_ss_max_streams(const struct usb_ss_ep_comp_descriptor *comp) { int max_streams; @@ -983,8 +959,7 @@ struct usb_plat_dev_cap_descriptor { __u8 CapabilityData[]; } __attribute__((packed)); -#define USB_DT_USB_PLAT_DEV_CAP_SIZE(capability_data_size) \ - (20 + capability_data_size) +#define USB_DT_USB_PLAT_DEV_CAP_SIZE(capability_data_size) (20 + capability_data_size) /* * SuperSpeed Plus USB Capability descriptor: Defines the set of @@ -1049,14 +1024,11 @@ struct usb_pd_cap_descriptor { __u8 bDevCapabilityType; /* set to USB_PD_POWER_DELIVERY_CAPABILITY */ __u8 bReserved; __le32 bmAttributes; -#define USB_PD_CAP_BATTERY_CHARGING \ - (1 << 1) /* supports Battery Charging specification */ -#define USB_PD_CAP_USB_PD \ - (1 << 2) /* supports USB Power Delivery specification */ -#define USB_PD_CAP_PROVIDER (1 << 3) /* can provide power */ -#define USB_PD_CAP_CONSUMER (1 << 4) /* can consume power */ -#define USB_PD_CAP_CHARGING_POLICY \ - (1 << 5) /* supports CHARGING_POLICY feature */ +#define USB_PD_CAP_BATTERY_CHARGING (1 << 1) /* supports Battery Charging specification */ +#define USB_PD_CAP_USB_PD (1 << 2) /* supports USB Power Delivery specification */ +#define USB_PD_CAP_PROVIDER (1 << 3) /* can provide power */ +#define USB_PD_CAP_CONSUMER (1 << 4) /* can consume power */ +#define USB_PD_CAP_CHARGING_POLICY (1 << 5) /* supports CHARGING_POLICY feature */ #define USB_PD_CAP_TYPE_C_CURRENT \ (1 << 6) /* supports power capabilities defined in the USB Type-C \ Specification */ @@ -1116,8 +1088,8 @@ struct usb_pd_cap_consumer_port_descriptor { __le16 wMaxVoltage; /* in 50mV units */ __u16 wReserved; __le32 dwMaxOperatingPower; /* in 10 mW - operating at steady state */ - __le32 dwMaxPeakPower; /* in 10mW units - operating at peak power */ - __le32 dwMaxPeakPowerTime; /* in 100ms units - duration of peak */ + __le32 dwMaxPeakPower; /* in 10mW units - operating at peak power */ + __le32 dwMaxPeakPowerTime; /* in 100ms units - duration of peak */ #define USB_PD_CAP_CONSUMER_UNKNOWN_PEAK_POWER_TIME 0xffff } __attribute__((packed)); diff --git a/include/arch/x86_64/linux/usb/functionfs.h b/include/arch/x86_64/linux/usb/functionfs.h index 7e43d6b3..e39b9877 100644 --- a/include/arch/x86_64/linux/usb/functionfs.h +++ b/include/arch/x86_64/linux/usb/functionfs.h @@ -96,8 +96,7 @@ struct usb_os_desc_header { struct usb_ext_compat_desc { __u8 bFirstInterfaceNumber; __u8 Reserved1; - __struct_group(/* no tag */, IDs, /* no attrs */, __u8 CompatibleID[8]; - __u8 SubCompatibleID[8];); + __struct_group(/* no tag */, IDs, /* no attrs */, __u8 CompatibleID[8]; __u8 SubCompatibleID[8];); __u8 Reserved2[6]; }; @@ -398,7 +397,6 @@ struct usb_functionfs_event { * for now. Returns zero on success, and a negative errno value on * error. */ -#define FUNCTIONFS_DMABUF_TRANSFER \ - _IOW('g', 133, struct usb_ffs_dmabuf_transfer_req) +#define FUNCTIONFS_DMABUF_TRANSFER _IOW('g', 133, struct usb_ffs_dmabuf_transfer_req) #endif /* __LINUX_FUNCTIONFS_H__ */ diff --git a/include/arch/x86_64/linux/usb/midi.h b/include/arch/x86_64/linux/usb/midi.h index e8da478f..c9760b1b 100644 --- a/include/arch/x86_64/linux/usb/midi.h +++ b/include/arch/x86_64/linux/usb/midi.h @@ -71,7 +71,7 @@ struct usb_midi_out_jack_descriptor { __u8 bJackID; __u8 bNrInputPins; /* p */ struct usb_midi_source_pin pins[]; /* [p] */ - /*__u8 iJack; -- omitted due to variable-sized pins[] */ + /*__u8 iJack; -- omitted due to variable-sized pins[] */ } __attribute__((packed)); #define USB_DT_MIDI_OUT_SIZE(p) (7 + 2 * (p)) diff --git a/include/arch/x86_64/linux/usb/tmc.h b/include/arch/x86_64/linux/usb/tmc.h index 8497da59..e60178f4 100644 --- a/include/arch/x86_64/linux/usb/tmc.h +++ b/include/arch/x86_64/linux/usb/tmc.h @@ -81,17 +81,15 @@ struct usbtmc_message { #define USBTMC_IOCTL_ABORT_BULK_IN _IO(USBTMC_IOC_NR, 4) #define USBTMC_IOCTL_CLEAR_OUT_HALT _IO(USBTMC_IOC_NR, 6) #define USBTMC_IOCTL_CLEAR_IN_HALT _IO(USBTMC_IOC_NR, 7) -#define USBTMC_IOCTL_CTRL_REQUEST \ - _IOWR(USBTMC_IOC_NR, 8, struct usbtmc_ctrlrequest) -#define USBTMC_IOCTL_GET_TIMEOUT _IOR(USBTMC_IOC_NR, 9, __u32) -#define USBTMC_IOCTL_SET_TIMEOUT _IOW(USBTMC_IOC_NR, 10, __u32) -#define USBTMC_IOCTL_EOM_ENABLE _IOW(USBTMC_IOC_NR, 11, __u8) -#define USBTMC_IOCTL_CONFIG_TERMCHAR \ - _IOW(USBTMC_IOC_NR, 12, struct usbtmc_termchar) -#define USBTMC_IOCTL_WRITE _IOWR(USBTMC_IOC_NR, 13, struct usbtmc_message) -#define USBTMC_IOCTL_READ _IOWR(USBTMC_IOC_NR, 14, struct usbtmc_message) -#define USBTMC_IOCTL_WRITE_RESULT _IOWR(USBTMC_IOC_NR, 15, __u32) -#define USBTMC_IOCTL_API_VERSION _IOR(USBTMC_IOC_NR, 16, __u32) +#define USBTMC_IOCTL_CTRL_REQUEST _IOWR(USBTMC_IOC_NR, 8, struct usbtmc_ctrlrequest) +#define USBTMC_IOCTL_GET_TIMEOUT _IOR(USBTMC_IOC_NR, 9, __u32) +#define USBTMC_IOCTL_SET_TIMEOUT _IOW(USBTMC_IOC_NR, 10, __u32) +#define USBTMC_IOCTL_EOM_ENABLE _IOW(USBTMC_IOC_NR, 11, __u8) +#define USBTMC_IOCTL_CONFIG_TERMCHAR _IOW(USBTMC_IOC_NR, 12, struct usbtmc_termchar) +#define USBTMC_IOCTL_WRITE _IOWR(USBTMC_IOC_NR, 13, struct usbtmc_message) +#define USBTMC_IOCTL_READ _IOWR(USBTMC_IOC_NR, 14, struct usbtmc_message) +#define USBTMC_IOCTL_WRITE_RESULT _IOWR(USBTMC_IOC_NR, 15, __u32) +#define USBTMC_IOCTL_API_VERSION _IOR(USBTMC_IOC_NR, 16, __u32) #define USBTMC488_IOCTL_GET_CAPS _IOR(USBTMC_IOC_NR, 17, unsigned char) #define USBTMC488_IOCTL_READ_STB _IOR(USBTMC_IOC_NR, 18, unsigned char) diff --git a/include/arch/x86_64/linux/usb/video.h b/include/arch/x86_64/linux/usb/video.h index 678f5a5e..05f4dc96 100644 --- a/include/arch/x86_64/linux/usb/video.h +++ b/include/arch/x86_64/linux/usb/video.h @@ -353,8 +353,7 @@ struct uvc_extension_unit_descriptor { #define UVC_DT_EXTENSION_UNIT_SIZE(p, n) (24 + (p) + (n)) -#define UVC_EXTENSION_UNIT_DESCRIPTOR(p, n) \ - uvc_extension_unit_descriptor_##p_##n +#define UVC_EXTENSION_UNIT_DESCRIPTOR(p, n) uvc_extension_unit_descriptor_##p_##n #define DECLARE_UVC_EXTENSION_UNIT_DESCRIPTOR(p, n) \ struct UVC_EXTENSION_UNIT_DESCRIPTOR(p, n) { \ diff --git a/include/arch/x86_64/linux/usbdevice_fs.h b/include/arch/x86_64/linux/usbdevice_fs.h index 81a9115c..7649362a 100644 --- a/include/arch/x86_64/linux/usbdevice_fs.h +++ b/include/arch/x86_64/linux/usbdevice_fs.h @@ -214,12 +214,11 @@ struct usbdevfs_streams { #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) -#define USBDEVFS_ALLOC_STREAMS _IOR('U', 28, struct usbdevfs_streams) -#define USBDEVFS_FREE_STREAMS _IOR('U', 29, struct usbdevfs_streams) -#define USBDEVFS_DROP_PRIVILEGES _IOW('U', 30, __u32) -#define USBDEVFS_GET_SPEED _IO('U', 31) +#define USBDEVFS_DISCONNECT_CLAIM _IOR('U', 27, struct usbdevfs_disconnect_claim) +#define USBDEVFS_ALLOC_STREAMS _IOR('U', 28, struct usbdevfs_streams) +#define USBDEVFS_FREE_STREAMS _IOR('U', 29, struct usbdevfs_streams) +#define USBDEVFS_DROP_PRIVILEGES _IOW('U', 30, __u32) +#define USBDEVFS_GET_SPEED _IO('U', 31) /* * Returns struct usbdevfs_conninfo_ex; length is variable to allow * extending size of the data returned. diff --git a/include/arch/x86_64/linux/userfaultfd.h b/include/arch/x86_64/linux/userfaultfd.h index 1468531c..c0133077 100644 --- a/include/arch/x86_64/linux/userfaultfd.h +++ b/include/arch/x86_64/linux/userfaultfd.h @@ -22,31 +22,22 @@ * userfaultfd.h we assumed the kernel was reading (instead _IOC_READ * means the userland is reading). */ -#define UFFD_API ((__u64)0xAA) -#define UFFD_API_REGISTER_MODES \ - (UFFDIO_REGISTER_MODE_MISSING | UFFDIO_REGISTER_MODE_WP | \ - UFFDIO_REGISTER_MODE_MINOR) -#define UFFD_API_FEATURES \ - (UFFD_FEATURE_PAGEFAULT_FLAG_WP | UFFD_FEATURE_EVENT_FORK | \ - UFFD_FEATURE_EVENT_REMAP | UFFD_FEATURE_EVENT_REMOVE | \ - UFFD_FEATURE_EVENT_UNMAP | UFFD_FEATURE_MISSING_HUGETLBFS | \ - UFFD_FEATURE_MISSING_SHMEM | UFFD_FEATURE_SIGBUS | \ - UFFD_FEATURE_THREAD_ID | UFFD_FEATURE_MINOR_HUGETLBFS | \ - UFFD_FEATURE_MINOR_SHMEM | UFFD_FEATURE_EXACT_ADDRESS | \ - UFFD_FEATURE_WP_HUGETLBFS_SHMEM | UFFD_FEATURE_WP_UNPOPULATED | \ - UFFD_FEATURE_POISON | UFFD_FEATURE_WP_ASYNC | UFFD_FEATURE_MOVE) -#define UFFD_API_IOCTLS \ - ((__u64)1 << _UFFDIO_REGISTER | (__u64)1 << _UFFDIO_UNREGISTER | \ - (__u64)1 << _UFFDIO_API) -#define UFFD_API_RANGE_IOCTLS \ - ((__u64)1 << _UFFDIO_WAKE | (__u64)1 << _UFFDIO_COPY | \ - (__u64)1 << _UFFDIO_ZEROPAGE | (__u64)1 << _UFFDIO_MOVE | \ - (__u64)1 << _UFFDIO_WRITEPROTECT | (__u64)1 << _UFFDIO_CONTINUE | \ - (__u64)1 << _UFFDIO_POISON) -#define UFFD_API_RANGE_IOCTLS_BASIC \ - ((__u64)1 << _UFFDIO_WAKE | (__u64)1 << _UFFDIO_COPY | \ - (__u64)1 << _UFFDIO_WRITEPROTECT | (__u64)1 << _UFFDIO_CONTINUE | \ +#define UFFD_API ((__u64)0xAA) +#define UFFD_API_REGISTER_MODES (UFFDIO_REGISTER_MODE_MISSING | UFFDIO_REGISTER_MODE_WP | UFFDIO_REGISTER_MODE_MINOR) +#define UFFD_API_FEATURES \ + (UFFD_FEATURE_PAGEFAULT_FLAG_WP | UFFD_FEATURE_EVENT_FORK | UFFD_FEATURE_EVENT_REMAP | \ + UFFD_FEATURE_EVENT_REMOVE | UFFD_FEATURE_EVENT_UNMAP | UFFD_FEATURE_MISSING_HUGETLBFS | \ + UFFD_FEATURE_MISSING_SHMEM | UFFD_FEATURE_SIGBUS | UFFD_FEATURE_THREAD_ID | UFFD_FEATURE_MINOR_HUGETLBFS | \ + UFFD_FEATURE_MINOR_SHMEM | UFFD_FEATURE_EXACT_ADDRESS | UFFD_FEATURE_WP_HUGETLBFS_SHMEM | \ + UFFD_FEATURE_WP_UNPOPULATED | UFFD_FEATURE_POISON | UFFD_FEATURE_WP_ASYNC | UFFD_FEATURE_MOVE) +#define UFFD_API_IOCTLS ((__u64)1 << _UFFDIO_REGISTER | (__u64)1 << _UFFDIO_UNREGISTER | (__u64)1 << _UFFDIO_API) +#define UFFD_API_RANGE_IOCTLS \ + ((__u64)1 << _UFFDIO_WAKE | (__u64)1 << _UFFDIO_COPY | (__u64)1 << _UFFDIO_ZEROPAGE | \ + (__u64)1 << _UFFDIO_MOVE | (__u64)1 << _UFFDIO_WRITEPROTECT | (__u64)1 << _UFFDIO_CONTINUE | \ (__u64)1 << _UFFDIO_POISON) +#define UFFD_API_RANGE_IOCTLS_BASIC \ + ((__u64)1 << _UFFDIO_WAKE | (__u64)1 << _UFFDIO_COPY | (__u64)1 << _UFFDIO_WRITEPROTECT | \ + (__u64)1 << _UFFDIO_CONTINUE | (__u64)1 << _UFFDIO_POISON) /* * Valid ioctl command number range with this API is from 0x00 to @@ -68,18 +59,17 @@ #define _UFFDIO_API (0x3F) /* userfaultfd ioctl ids */ -#define UFFDIO 0xAA -#define UFFDIO_API _IOWR(UFFDIO, _UFFDIO_API, struct uffdio_api) -#define UFFDIO_REGISTER _IOWR(UFFDIO, _UFFDIO_REGISTER, struct uffdio_register) -#define UFFDIO_UNREGISTER _IOR(UFFDIO, _UFFDIO_UNREGISTER, struct uffdio_range) -#define UFFDIO_WAKE _IOR(UFFDIO, _UFFDIO_WAKE, struct uffdio_range) -#define UFFDIO_COPY _IOWR(UFFDIO, _UFFDIO_COPY, struct uffdio_copy) -#define UFFDIO_ZEROPAGE _IOWR(UFFDIO, _UFFDIO_ZEROPAGE, struct uffdio_zeropage) -#define UFFDIO_MOVE _IOWR(UFFDIO, _UFFDIO_MOVE, struct uffdio_move) -#define UFFDIO_WRITEPROTECT \ - _IOWR(UFFDIO, _UFFDIO_WRITEPROTECT, struct uffdio_writeprotect) -#define UFFDIO_CONTINUE _IOWR(UFFDIO, _UFFDIO_CONTINUE, struct uffdio_continue) -#define UFFDIO_POISON _IOWR(UFFDIO, _UFFDIO_POISON, struct uffdio_poison) +#define UFFDIO 0xAA +#define UFFDIO_API _IOWR(UFFDIO, _UFFDIO_API, struct uffdio_api) +#define UFFDIO_REGISTER _IOWR(UFFDIO, _UFFDIO_REGISTER, struct uffdio_register) +#define UFFDIO_UNREGISTER _IOR(UFFDIO, _UFFDIO_UNREGISTER, struct uffdio_range) +#define UFFDIO_WAKE _IOR(UFFDIO, _UFFDIO_WAKE, struct uffdio_range) +#define UFFDIO_COPY _IOWR(UFFDIO, _UFFDIO_COPY, struct uffdio_copy) +#define UFFDIO_ZEROPAGE _IOWR(UFFDIO, _UFFDIO_ZEROPAGE, struct uffdio_zeropage) +#define UFFDIO_MOVE _IOWR(UFFDIO, _UFFDIO_MOVE, struct uffdio_move) +#define UFFDIO_WRITEPROTECT _IOWR(UFFDIO, _UFFDIO_WRITEPROTECT, struct uffdio_writeprotect) +#define UFFDIO_CONTINUE _IOWR(UFFDIO, _UFFDIO_CONTINUE, struct uffdio_continue) +#define UFFDIO_POISON _IOWR(UFFDIO, _UFFDIO_POISON, struct uffdio_poison) /* read() structure */ struct uffd_msg { diff --git a/include/arch/x86_64/linux/userio.h b/include/arch/x86_64/linux/userio.h index 74c9951d..715b91f3 100644 --- a/include/arch/x86_64/linux/userio.h +++ b/include/arch/x86_64/linux/userio.h @@ -24,11 +24,7 @@ #include -enum userio_cmd_type { - USERIO_CMD_REGISTER = 0, - USERIO_CMD_SET_PORT_TYPE = 1, - USERIO_CMD_SEND_INTERRUPT = 2 -}; +enum userio_cmd_type { USERIO_CMD_REGISTER = 0, USERIO_CMD_SET_PORT_TYPE = 1, USERIO_CMD_SEND_INTERRUPT = 2 }; /* * userio Commands diff --git a/include/arch/x86_64/linux/uvcvideo.h b/include/arch/x86_64/linux/uvcvideo.h index 23166ca4..6f362f4b 100644 --- a/include/arch/x86_64/linux/uvcvideo.h +++ b/include/arch/x86_64/linux/uvcvideo.h @@ -32,9 +32,8 @@ /* Control supports asynchronous reporting */ #define UVC_CTRL_FLAG_ASYNCHRONOUS (1 << 8) -#define UVC_CTRL_FLAG_GET_RANGE \ - (UVC_CTRL_FLAG_GET_CUR | UVC_CTRL_FLAG_GET_MIN | \ - UVC_CTRL_FLAG_GET_MAX | UVC_CTRL_FLAG_GET_RES | \ +#define UVC_CTRL_FLAG_GET_RANGE \ + (UVC_CTRL_FLAG_GET_CUR | UVC_CTRL_FLAG_GET_MIN | UVC_CTRL_FLAG_GET_MAX | UVC_CTRL_FLAG_GET_RES | \ UVC_CTRL_FLAG_GET_DEF) #define UVC_MENU_NAME_LEN 32 diff --git a/include/arch/x86_64/linux/v4l2-controls.h b/include/arch/x86_64/linux/v4l2-controls.h index fcd05f2a..19c676bd 100644 --- a/include/arch/x86_64/linux/v4l2-controls.h +++ b/include/arch/x86_64/linux/v4l2-controls.h @@ -17,21 +17,20 @@ #include /* Control classes */ -#define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' controls */ -#define V4L2_CTRL_CLASS_CODEC 0x00990000 /* Stateful codec controls */ -#define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls */ -#define V4L2_CTRL_CLASS_FM_TX 0x009b0000 /* FM Modulator controls */ -#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 /* FM Receiver controls */ -#define V4L2_CTRL_CLASS_RF_TUNER 0x00a20000 /* RF tuner controls */ -#define V4L2_CTRL_CLASS_DETECT 0x00a30000 /* Detection controls */ -#define V4L2_CTRL_CLASS_CODEC_STATELESS \ - 0x00a40000 /* Stateless codecs controls */ -#define V4L2_CTRL_CLASS_COLORIMETRY 0x00a50000 /* Colorimetry controls */ +#define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' controls */ +#define V4L2_CTRL_CLASS_CODEC 0x00990000 /* Stateful codec controls */ +#define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls */ +#define V4L2_CTRL_CLASS_FM_TX 0x009b0000 /* FM Modulator controls */ +#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 /* FM Receiver controls */ +#define V4L2_CTRL_CLASS_RF_TUNER 0x00a20000 /* RF tuner controls */ +#define V4L2_CTRL_CLASS_DETECT 0x00a30000 /* Detection controls */ +#define V4L2_CTRL_CLASS_CODEC_STATELESS 0x00a40000 /* Stateless codecs controls */ +#define V4L2_CTRL_CLASS_COLORIMETRY 0x00a50000 /* Colorimetry controls */ /* User-class control IDs */ @@ -382,8 +381,7 @@ enum v4l2_mpeg_audio_dec_playback { 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_CODEC_BASE + 113) +#define V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK (V4L2_CID_CODEC_BASE + 113) /* MPEG video controls specific to multiplexed streams */ #define V4L2_CID_MPEG_VIDEO_ENCODING (V4L2_CID_CODEC_BASE + 200) @@ -409,17 +407,16 @@ enum v4l2_mpeg_video_bitrate_mode { V4L2_MPEG_VIDEO_BITRATE_MODE_CBR = 1, V4L2_MPEG_VIDEO_BITRATE_MODE_CQ = 2, }; -#define V4L2_CID_MPEG_VIDEO_BITRATE (V4L2_CID_CODEC_BASE + 207) -#define V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (V4L2_CID_CODEC_BASE + 208) -#define V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (V4L2_CID_CODEC_BASE + 209) -#define V4L2_CID_MPEG_VIDEO_MUTE (V4L2_CID_CODEC_BASE + 210) -#define V4L2_CID_MPEG_VIDEO_MUTE_YUV (V4L2_CID_CODEC_BASE + 211) -#define V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE (V4L2_CID_CODEC_BASE + 212) -#define V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER \ - (V4L2_CID_CODEC_BASE + 213) -#define V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB (V4L2_CID_CODEC_BASE + 214) -#define V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE (V4L2_CID_CODEC_BASE + 215) -#define V4L2_CID_MPEG_VIDEO_HEADER_MODE (V4L2_CID_CODEC_BASE + 216) +#define V4L2_CID_MPEG_VIDEO_BITRATE (V4L2_CID_CODEC_BASE + 207) +#define V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (V4L2_CID_CODEC_BASE + 208) +#define V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (V4L2_CID_CODEC_BASE + 209) +#define V4L2_CID_MPEG_VIDEO_MUTE (V4L2_CID_CODEC_BASE + 210) +#define V4L2_CID_MPEG_VIDEO_MUTE_YUV (V4L2_CID_CODEC_BASE + 211) +#define V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE (V4L2_CID_CODEC_BASE + 212) +#define V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER (V4L2_CID_CODEC_BASE + 213) +#define V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB (V4L2_CID_CODEC_BASE + 214) +#define V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE (V4L2_CID_CODEC_BASE + 215) +#define V4L2_CID_MPEG_VIDEO_HEADER_MODE (V4L2_CID_CODEC_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, @@ -438,23 +435,22 @@ enum v4l2_mpeg_video_multi_slice_mode { 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_CODEC_BASE + 222) -#define V4L2_CID_MPEG_VIDEO_DEC_PTS (V4L2_CID_CODEC_BASE + 223) -#define V4L2_CID_MPEG_VIDEO_DEC_FRAME (V4L2_CID_CODEC_BASE + 224) -#define V4L2_CID_MPEG_VIDEO_VBV_DELAY (V4L2_CID_CODEC_BASE + 225) -#define V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER (V4L2_CID_CODEC_BASE + 226) -#define V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE (V4L2_CID_CODEC_BASE + 227) -#define V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (V4L2_CID_CODEC_BASE + 228) -#define V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME (V4L2_CID_CODEC_BASE + 229) -#define V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID (V4L2_CID_CODEC_BASE + 230) -#define V4L2_CID_MPEG_VIDEO_AU_DELIMITER (V4L2_CID_CODEC_BASE + 231) -#define V4L2_CID_MPEG_VIDEO_LTR_COUNT (V4L2_CID_CODEC_BASE + 232) -#define V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX (V4L2_CID_CODEC_BASE + 233) -#define V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES (V4L2_CID_CODEC_BASE + 234) -#define V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR (V4L2_CID_CODEC_BASE + 235) -#define V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD (V4L2_CID_CODEC_BASE + 236) -#define V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE \ - (V4L2_CID_CODEC_BASE + 237) +#define V4L2_CID_MPEG_VIDEO_VBV_SIZE (V4L2_CID_CODEC_BASE + 222) +#define V4L2_CID_MPEG_VIDEO_DEC_PTS (V4L2_CID_CODEC_BASE + 223) +#define V4L2_CID_MPEG_VIDEO_DEC_FRAME (V4L2_CID_CODEC_BASE + 224) +#define V4L2_CID_MPEG_VIDEO_VBV_DELAY (V4L2_CID_CODEC_BASE + 225) +#define V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER (V4L2_CID_CODEC_BASE + 226) +#define V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE (V4L2_CID_CODEC_BASE + 227) +#define V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (V4L2_CID_CODEC_BASE + 228) +#define V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME (V4L2_CID_CODEC_BASE + 229) +#define V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID (V4L2_CID_CODEC_BASE + 230) +#define V4L2_CID_MPEG_VIDEO_AU_DELIMITER (V4L2_CID_CODEC_BASE + 231) +#define V4L2_CID_MPEG_VIDEO_LTR_COUNT (V4L2_CID_CODEC_BASE + 232) +#define V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX (V4L2_CID_CODEC_BASE + 233) +#define V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES (V4L2_CID_CODEC_BASE + 234) +#define V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR (V4L2_CID_CODEC_BASE + 235) +#define V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD (V4L2_CID_CODEC_BASE + 236) +#define V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE (V4L2_CID_CODEC_BASE + 237) enum v4l2_mpeg_video_intra_refresh_period_type { V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_RANDOM = 0, V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_CYCLIC = 1, @@ -576,11 +572,9 @@ enum v4l2_mpeg_video_h264_vui_sar_idc { 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_CODEC_BASE + 368) -#define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0 \ - (V4L2_CID_CODEC_BASE + 369) -#define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE \ - (V4L2_CID_CODEC_BASE + 370) +#define V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING (V4L2_CID_CODEC_BASE + 368) +#define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0 (V4L2_CID_CODEC_BASE + 369) +#define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE (V4L2_CID_CODEC_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, @@ -600,51 +594,45 @@ enum v4l2_mpeg_video_h264_fmo_map_type { 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_CODEC_BASE + 373) -#define V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION \ - (V4L2_CID_CODEC_BASE + 374) +#define V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP (V4L2_CID_CODEC_BASE + 373) +#define V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION (V4L2_CID_CODEC_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_CODEC_BASE + 375) -#define V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH (V4L2_CID_CODEC_BASE + 376) -#define V4L2_CID_MPEG_VIDEO_H264_ASO (V4L2_CID_CODEC_BASE + 377) -#define V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER (V4L2_CID_CODEC_BASE + 378) -#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING (V4L2_CID_CODEC_BASE + 379) -#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE \ - (V4L2_CID_CODEC_BASE + 380) +#define V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE (V4L2_CID_CODEC_BASE + 375) +#define V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH (V4L2_CID_CODEC_BASE + 376) +#define V4L2_CID_MPEG_VIDEO_H264_ASO (V4L2_CID_CODEC_BASE + 377) +#define V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER (V4L2_CID_CODEC_BASE + 378) +#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING (V4L2_CID_CODEC_BASE + 379) +#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE (V4L2_CID_CODEC_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_CODEC_BASE + 381) -#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP \ - (V4L2_CID_CODEC_BASE + 382) -#define V4L2_CID_MPEG_VIDEO_H264_CONSTRAINED_INTRA_PREDICTION \ - (V4L2_CID_CODEC_BASE + 383) -#define V4L2_CID_MPEG_VIDEO_H264_CHROMA_QP_INDEX_OFFSET \ - (V4L2_CID_CODEC_BASE + 384) -#define V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MIN_QP (V4L2_CID_CODEC_BASE + 385) -#define V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MAX_QP (V4L2_CID_CODEC_BASE + 386) -#define V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MIN_QP (V4L2_CID_CODEC_BASE + 387) -#define V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MAX_QP (V4L2_CID_CODEC_BASE + 388) -#define V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MIN_QP (V4L2_CID_CODEC_BASE + 389) -#define V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MAX_QP (V4L2_CID_CODEC_BASE + 390) -#define V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L0_BR (V4L2_CID_CODEC_BASE + 391) -#define V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L1_BR (V4L2_CID_CODEC_BASE + 392) -#define V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L2_BR (V4L2_CID_CODEC_BASE + 393) -#define V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L3_BR (V4L2_CID_CODEC_BASE + 394) -#define V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L4_BR (V4L2_CID_CODEC_BASE + 395) -#define V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L5_BR (V4L2_CID_CODEC_BASE + 396) -#define V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L6_BR (V4L2_CID_CODEC_BASE + 397) -#define V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (V4L2_CID_CODEC_BASE + 400) -#define V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (V4L2_CID_CODEC_BASE + 401) -#define V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (V4L2_CID_CODEC_BASE + 402) -#define V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP (V4L2_CID_CODEC_BASE + 403) -#define V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP (V4L2_CID_CODEC_BASE + 404) -#define V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL (V4L2_CID_CODEC_BASE + 405) +#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER (V4L2_CID_CODEC_BASE + 381) +#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP (V4L2_CID_CODEC_BASE + 382) +#define V4L2_CID_MPEG_VIDEO_H264_CONSTRAINED_INTRA_PREDICTION (V4L2_CID_CODEC_BASE + 383) +#define V4L2_CID_MPEG_VIDEO_H264_CHROMA_QP_INDEX_OFFSET (V4L2_CID_CODEC_BASE + 384) +#define V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MIN_QP (V4L2_CID_CODEC_BASE + 385) +#define V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MAX_QP (V4L2_CID_CODEC_BASE + 386) +#define V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MIN_QP (V4L2_CID_CODEC_BASE + 387) +#define V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MAX_QP (V4L2_CID_CODEC_BASE + 388) +#define V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MIN_QP (V4L2_CID_CODEC_BASE + 389) +#define V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MAX_QP (V4L2_CID_CODEC_BASE + 390) +#define V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L0_BR (V4L2_CID_CODEC_BASE + 391) +#define V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L1_BR (V4L2_CID_CODEC_BASE + 392) +#define V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L2_BR (V4L2_CID_CODEC_BASE + 393) +#define V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L3_BR (V4L2_CID_CODEC_BASE + 394) +#define V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L4_BR (V4L2_CID_CODEC_BASE + 395) +#define V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L5_BR (V4L2_CID_CODEC_BASE + 396) +#define V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L6_BR (V4L2_CID_CODEC_BASE + 397) +#define V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (V4L2_CID_CODEC_BASE + 400) +#define V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (V4L2_CID_CODEC_BASE + 401) +#define V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (V4L2_CID_CODEC_BASE + 402) +#define V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP (V4L2_CID_CODEC_BASE + 403) +#define V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP (V4L2_CID_CODEC_BASE + 404) +#define V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL (V4L2_CID_CODEC_BASE + 405) enum v4l2_mpeg_video_mpeg4_level { V4L2_MPEG_VIDEO_MPEG4_LEVEL_0 = 0, V4L2_MPEG_VIDEO_MPEG4_LEVEL_0B = 1, @@ -683,11 +671,10 @@ enum v4l2_vp8_num_ref_frames { V4L2_CID_MPEG_VIDEO_VPX_2_REF_FRAME = 1, V4L2_CID_MPEG_VIDEO_VPX_3_REF_FRAME = 2, }; -#define V4L2_CID_MPEG_VIDEO_VPX_FILTER_LEVEL (V4L2_CID_CODEC_BASE + 503) -#define V4L2_CID_MPEG_VIDEO_VPX_FILTER_SHARPNESS (V4L2_CID_CODEC_BASE + 504) -#define V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD \ - (V4L2_CID_CODEC_BASE + 505) -#define V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL (V4L2_CID_CODEC_BASE + 506) +#define V4L2_CID_MPEG_VIDEO_VPX_FILTER_LEVEL (V4L2_CID_CODEC_BASE + 503) +#define V4L2_CID_MPEG_VIDEO_VPX_FILTER_SHARPNESS (V4L2_CID_CODEC_BASE + 504) +#define V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD (V4L2_CID_CODEC_BASE + 505) +#define V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL (V4L2_CID_CODEC_BASE + 506) enum v4l2_vp8_golden_frame_sel { V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV = 0, V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD = 1, @@ -774,9 +761,8 @@ enum v4l2_mpeg_video_hevc_level { V4L2_MPEG_VIDEO_HEVC_LEVEL_6_1 = 11, V4L2_MPEG_VIDEO_HEVC_LEVEL_6_2 = 12, }; -#define V4L2_CID_MPEG_VIDEO_HEVC_FRAME_RATE_RESOLUTION \ - (V4L2_CID_CODEC_BASE + 617) -#define V4L2_CID_MPEG_VIDEO_HEVC_TIER (V4L2_CID_CODEC_BASE + 618) +#define V4L2_CID_MPEG_VIDEO_HEVC_FRAME_RATE_RESOLUTION (V4L2_CID_CODEC_BASE + 617) +#define V4L2_CID_MPEG_VIDEO_HEVC_TIER (V4L2_CID_CODEC_BASE + 618) enum v4l2_mpeg_video_hevc_tier { V4L2_MPEG_VIDEO_HEVC_TIER_MAIN = 0, V4L2_MPEG_VIDEO_HEVC_TIER_HIGH = 1, @@ -796,20 +782,18 @@ enum v4l2_cid_mpeg_video_hevc_refresh_type { V4L2_MPEG_VIDEO_HEVC_REFRESH_CRA = 1, V4L2_MPEG_VIDEO_HEVC_REFRESH_IDR = 2, }; -#define V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD (V4L2_CID_CODEC_BASE + 624) -#define V4L2_CID_MPEG_VIDEO_HEVC_LOSSLESS_CU (V4L2_CID_CODEC_BASE + 625) -#define V4L2_CID_MPEG_VIDEO_HEVC_CONST_INTRA_PRED (V4L2_CID_CODEC_BASE + 626) -#define V4L2_CID_MPEG_VIDEO_HEVC_WAVEFRONT (V4L2_CID_CODEC_BASE + 627) -#define V4L2_CID_MPEG_VIDEO_HEVC_GENERAL_PB (V4L2_CID_CODEC_BASE + 628) -#define V4L2_CID_MPEG_VIDEO_HEVC_TEMPORAL_ID (V4L2_CID_CODEC_BASE + 629) -#define V4L2_CID_MPEG_VIDEO_HEVC_STRONG_SMOOTHING (V4L2_CID_CODEC_BASE + 630) -#define V4L2_CID_MPEG_VIDEO_HEVC_MAX_NUM_MERGE_MV_MINUS1 \ - (V4L2_CID_CODEC_BASE + 631) -#define V4L2_CID_MPEG_VIDEO_HEVC_INTRA_PU_SPLIT (V4L2_CID_CODEC_BASE + 632) -#define V4L2_CID_MPEG_VIDEO_HEVC_TMV_PREDICTION (V4L2_CID_CODEC_BASE + 633) -#define V4L2_CID_MPEG_VIDEO_HEVC_WITHOUT_STARTCODE (V4L2_CID_CODEC_BASE + 634) -#define V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD \ - (V4L2_CID_CODEC_BASE + 635) +#define V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD (V4L2_CID_CODEC_BASE + 624) +#define V4L2_CID_MPEG_VIDEO_HEVC_LOSSLESS_CU (V4L2_CID_CODEC_BASE + 625) +#define V4L2_CID_MPEG_VIDEO_HEVC_CONST_INTRA_PRED (V4L2_CID_CODEC_BASE + 626) +#define V4L2_CID_MPEG_VIDEO_HEVC_WAVEFRONT (V4L2_CID_CODEC_BASE + 627) +#define V4L2_CID_MPEG_VIDEO_HEVC_GENERAL_PB (V4L2_CID_CODEC_BASE + 628) +#define V4L2_CID_MPEG_VIDEO_HEVC_TEMPORAL_ID (V4L2_CID_CODEC_BASE + 629) +#define V4L2_CID_MPEG_VIDEO_HEVC_STRONG_SMOOTHING (V4L2_CID_CODEC_BASE + 630) +#define V4L2_CID_MPEG_VIDEO_HEVC_MAX_NUM_MERGE_MV_MINUS1 (V4L2_CID_CODEC_BASE + 631) +#define V4L2_CID_MPEG_VIDEO_HEVC_INTRA_PU_SPLIT (V4L2_CID_CODEC_BASE + 632) +#define V4L2_CID_MPEG_VIDEO_HEVC_TMV_PREDICTION (V4L2_CID_CODEC_BASE + 633) +#define V4L2_CID_MPEG_VIDEO_HEVC_WITHOUT_STARTCODE (V4L2_CID_CODEC_BASE + 634) +#define V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD (V4L2_CID_CODEC_BASE + 635) enum v4l2_cid_mpeg_video_hevc_size_of_length_field { V4L2_MPEG_VIDEO_HEVC_SIZE_0 = 0, V4L2_MPEG_VIDEO_HEVC_SIZE_1 = 1, @@ -928,41 +912,33 @@ enum v4l2_mpeg_video_av1_level { #define V4L2_CID_MPEG_VIDEO_AVERAGE_QP (V4L2_CID_CODEC_BASE + 657) /* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */ -#define V4L2_CID_CODEC_CX2341X_BASE (V4L2_CTRL_CLASS_CODEC | 0x1000) -#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE \ - (V4L2_CID_CODEC_CX2341X_BASE + 0) +#define V4L2_CID_CODEC_CX2341X_BASE (V4L2_CTRL_CLASS_CODEC | 0x1000) +#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE (V4L2_CID_CODEC_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_CODEC_CX2341X_BASE + 1) -#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE \ - (V4L2_CID_CODEC_CX2341X_BASE + 2) +#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER (V4L2_CID_CODEC_CX2341X_BASE + 1) +#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE (V4L2_CID_CODEC_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, + 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_CODEC_CX2341X_BASE + 3) +#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE (V4L2_CID_CODEC_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_CODEC_CX2341X_BASE + 4) +#define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE (V4L2_CID_CODEC_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_CODEC_CX2341X_BASE + 5) -#define V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE \ - (V4L2_CID_CODEC_CX2341X_BASE + 6) +#define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER (V4L2_CID_CODEC_CX2341X_BASE + 5) +#define V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE (V4L2_CID_CODEC_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, @@ -970,55 +946,39 @@ enum v4l2_mpeg_cx2341x_video_median_filter_type { 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_CODEC_CX2341X_BASE + 7) -#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP \ - (V4L2_CID_CODEC_CX2341X_BASE + 8) -#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM \ - (V4L2_CID_CODEC_CX2341X_BASE + 9) -#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP \ - (V4L2_CID_CODEC_CX2341X_BASE + 10) -#define V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS \ - (V4L2_CID_CODEC_CX2341X_BASE + 11) +#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_CODEC_CX2341X_BASE + 7) +#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (V4L2_CID_CODEC_CX2341X_BASE + 8) +#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_CODEC_CX2341X_BASE + 9) +#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (V4L2_CID_CODEC_CX2341X_BASE + 10) +#define V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (V4L2_CID_CODEC_CX2341X_BASE + 11) /* MPEG-class control IDs specific to the Samsung MFC 5.1 driver as defined by * V4L2 */ #define V4L2_CID_CODEC_MFC51_BASE (V4L2_CTRL_CLASS_CODEC | 0x1100) -#define V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY \ - (V4L2_CID_CODEC_MFC51_BASE + 0) -#define V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE \ - (V4L2_CID_CODEC_MFC51_BASE + 1) -#define V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE \ - (V4L2_CID_CODEC_MFC51_BASE + 2) +#define V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY (V4L2_CID_CODEC_MFC51_BASE + 0) +#define V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE (V4L2_CID_CODEC_MFC51_BASE + 1) +#define V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE (V4L2_CID_CODEC_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_CODEC_MFC51_BASE + 3) +#define V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE (V4L2_CID_CODEC_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_CODEC_MFC51_BASE + 4) -#define V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV (V4L2_CID_CODEC_MFC51_BASE + 5) -#define V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT \ - (V4L2_CID_CODEC_MFC51_BASE + 6) -#define V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF \ - (V4L2_CID_CODEC_MFC51_BASE + 7) -#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY \ - (V4L2_CID_CODEC_MFC51_BASE + 50) -#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK \ - (V4L2_CID_CODEC_MFC51_BASE + 51) -#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH \ - (V4L2_CID_CODEC_MFC51_BASE + 52) -#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC \ - (V4L2_CID_CODEC_MFC51_BASE + 53) -#define V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P \ - (V4L2_CID_CODEC_MFC51_BASE + 54) +#define V4L2_CID_MPEG_MFC51_VIDEO_PADDING (V4L2_CID_CODEC_MFC51_BASE + 4) +#define V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV (V4L2_CID_CODEC_MFC51_BASE + 5) +#define V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT (V4L2_CID_CODEC_MFC51_BASE + 6) +#define V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF (V4L2_CID_CODEC_MFC51_BASE + 7) +#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY (V4L2_CID_CODEC_MFC51_BASE + 50) +#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK (V4L2_CID_CODEC_MFC51_BASE + 51) +#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH (V4L2_CID_CODEC_MFC51_BASE + 52) +#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC (V4L2_CID_CODEC_MFC51_BASE + 53) +#define V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P (V4L2_CID_CODEC_MFC51_BASE + 54) /* Camera class control IDs */ @@ -1411,13 +1371,11 @@ enum v4l2_stateless_h264_start_code { #define V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD 0x20 #define V4L2_H264_SPS_FLAG_DIRECT_8X8_INFERENCE 0x40 -#define V4L2_H264_SPS_HAS_CHROMA_FORMAT(sps) \ - ((sps)->profile_idc == 100 || (sps)->profile_idc == 110 || \ - (sps)->profile_idc == 122 || (sps)->profile_idc == 244 || \ - (sps)->profile_idc == 44 || (sps)->profile_idc == 83 || \ - (sps)->profile_idc == 86 || (sps)->profile_idc == 118 || \ - (sps)->profile_idc == 128 || (sps)->profile_idc == 138 || \ - (sps)->profile_idc == 139 || (sps)->profile_idc == 134 || \ +#define V4L2_H264_SPS_HAS_CHROMA_FORMAT(sps) \ + ((sps)->profile_idc == 100 || (sps)->profile_idc == 110 || (sps)->profile_idc == 122 || \ + (sps)->profile_idc == 244 || (sps)->profile_idc == 44 || (sps)->profile_idc == 83 || \ + (sps)->profile_idc == 86 || (sps)->profile_idc == 118 || (sps)->profile_idc == 128 || \ + (sps)->profile_idc == 138 || (sps)->profile_idc == 139 || (sps)->profile_idc == 134 || \ (sps)->profile_idc == 135) #define V4L2_CID_STATELESS_H264_SPS (V4L2_CID_CODEC_STATELESS_BASE + 2) @@ -1516,8 +1474,7 @@ struct v4l2_ctrl_h264_pps { __u16 flags; }; -#define V4L2_CID_STATELESS_H264_SCALING_MATRIX \ - (V4L2_CID_CODEC_STATELESS_BASE + 4) +#define V4L2_CID_STATELESS_H264_SCALING_MATRIX (V4L2_CID_CODEC_STATELESS_BASE + 4) /** * struct v4l2_ctrl_h264_scaling_matrix - H264 scaling matrices * @@ -1547,12 +1504,10 @@ struct v4l2_h264_weight_factors { __s16 chroma_offset[32][2]; }; -#define V4L2_H264_CTRL_PRED_WEIGHTS_REQUIRED(pps, slice) \ - ((((pps)->flags & V4L2_H264_PPS_FLAG_WEIGHTED_PRED) && \ - ((slice)->slice_type == V4L2_H264_SLICE_TYPE_P || \ - (slice)->slice_type == V4L2_H264_SLICE_TYPE_SP)) || \ - ((pps)->weighted_bipred_idc == 1 && \ - (slice)->slice_type == V4L2_H264_SLICE_TYPE_B)) +#define V4L2_H264_CTRL_PRED_WEIGHTS_REQUIRED(pps, slice) \ + ((((pps)->flags & V4L2_H264_PPS_FLAG_WEIGHTED_PRED) && \ + ((slice)->slice_type == V4L2_H264_SLICE_TYPE_P || (slice)->slice_type == V4L2_H264_SLICE_TYPE_SP)) || \ + ((pps)->weighted_bipred_idc == 1 && (slice)->slice_type == V4L2_H264_SLICE_TYPE_B)) #define V4L2_CID_STATELESS_H264_PRED_WEIGHTS (V4L2_CID_CODEC_STATELESS_BASE + 5) /** @@ -1703,8 +1658,7 @@ struct v4l2_h264_dpb_entry { #define V4L2_H264_DECODE_PARAM_FLAG_PFRAME 0x08 #define V4L2_H264_DECODE_PARAM_FLAG_BFRAME 0x10 -#define V4L2_CID_STATELESS_H264_DECODE_PARAMS \ - (V4L2_CID_CODEC_STATELESS_BASE + 7) +#define V4L2_CID_STATELESS_H264_DECODE_PARAMS (V4L2_CID_CODEC_STATELESS_BASE + 7) /** * struct v4l2_ctrl_h264_decode_params - H264 decoding parameters * @@ -1948,8 +1902,7 @@ struct v4l2_vp8_entropy_coder_state { #define V4L2_VP8_FRAME_FLAG_SIGN_BIAS_GOLDEN 0x10 #define V4L2_VP8_FRAME_FLAG_SIGN_BIAS_ALT 0x20 -#define V4L2_VP8_FRAME_IS_KEY_FRAME(hdr) \ - (!!((hdr)->flags & V4L2_VP8_FRAME_FLAG_KEY_FRAME)) +#define V4L2_VP8_FRAME_IS_KEY_FRAME(hdr) (!!((hdr)->flags & V4L2_VP8_FRAME_FLAG_KEY_FRAME)) #define V4L2_CID_STATELESS_VP8_FRAME (V4L2_CID_CODEC_STATELESS_BASE + 200) /** @@ -2095,8 +2048,7 @@ struct v4l2_ctrl_mpeg2_picture { __u8 reserved[5]; }; -#define V4L2_CID_STATELESS_MPEG2_QUANTISATION \ - (V4L2_CID_CODEC_STATELESS_BASE + 222) +#define V4L2_CID_STATELESS_MPEG2_QUANTISATION (V4L2_CID_CODEC_STATELESS_BASE + 222) /** * struct v4l2_ctrl_mpeg2_quantisation - MPEG-2 quantisation * @@ -2125,19 +2077,14 @@ struct v4l2_ctrl_mpeg2_quantisation { __u8 chroma_non_intra_quantiser_matrix[64]; }; -#define V4L2_CID_STATELESS_HEVC_SPS (V4L2_CID_CODEC_STATELESS_BASE + 400) -#define V4L2_CID_STATELESS_HEVC_PPS (V4L2_CID_CODEC_STATELESS_BASE + 401) -#define V4L2_CID_STATELESS_HEVC_SLICE_PARAMS \ - (V4L2_CID_CODEC_STATELESS_BASE + 402) -#define V4L2_CID_STATELESS_HEVC_SCALING_MATRIX \ - (V4L2_CID_CODEC_STATELESS_BASE + 403) -#define V4L2_CID_STATELESS_HEVC_DECODE_PARAMS \ - (V4L2_CID_CODEC_STATELESS_BASE + 404) -#define V4L2_CID_STATELESS_HEVC_DECODE_MODE \ - (V4L2_CID_CODEC_STATELESS_BASE + 405) -#define V4L2_CID_STATELESS_HEVC_START_CODE (V4L2_CID_CODEC_STATELESS_BASE + 406) -#define V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS \ - (V4L2_CID_CODEC_STATELESS_BASE + 407) +#define V4L2_CID_STATELESS_HEVC_SPS (V4L2_CID_CODEC_STATELESS_BASE + 400) +#define V4L2_CID_STATELESS_HEVC_PPS (V4L2_CID_CODEC_STATELESS_BASE + 401) +#define V4L2_CID_STATELESS_HEVC_SLICE_PARAMS (V4L2_CID_CODEC_STATELESS_BASE + 402) +#define V4L2_CID_STATELESS_HEVC_SCALING_MATRIX (V4L2_CID_CODEC_STATELESS_BASE + 403) +#define V4L2_CID_STATELESS_HEVC_DECODE_PARAMS (V4L2_CID_CODEC_STATELESS_BASE + 404) +#define V4L2_CID_STATELESS_HEVC_DECODE_MODE (V4L2_CID_CODEC_STATELESS_BASE + 405) +#define V4L2_CID_STATELESS_HEVC_START_CODE (V4L2_CID_CODEC_STATELESS_BASE + 406) +#define V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS (V4L2_CID_CODEC_STATELESS_BASE + 407) enum v4l2_stateless_hevc_decode_mode { V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED, @@ -2409,17 +2356,16 @@ struct v4l2_hevc_pred_weight_table { __s8 delta_chroma_log2_weight_denom; }; -#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA (1ULL << 0) -#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA (1ULL << 1) -#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED (1ULL << 2) -#define V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO (1ULL << 3) -#define V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT (1ULL << 4) -#define V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0 (1ULL << 5) -#define V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV (1ULL << 6) -#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED (1ULL << 7) -#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED \ - (1ULL << 8) -#define V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT (1ULL << 9) +#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA (1ULL << 0) +#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA (1ULL << 1) +#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED (1ULL << 2) +#define V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO (1ULL << 3) +#define V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT (1ULL << 4) +#define V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0 (1ULL << 5) +#define V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV (1ULL << 6) +#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED (1ULL << 7) +#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 8) +#define V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT (1ULL << 9) /** * struct v4l2_ctrl_hevc_slice_params - HEVC slice parameters @@ -2607,16 +2553,14 @@ struct v4l2_ctrl_hevc_scaling_matrix { #define V4L2_CID_COLORIMETRY_CLASS_BASE (V4L2_CTRL_CLASS_COLORIMETRY | 0x900) #define V4L2_CID_COLORIMETRY_CLASS (V4L2_CTRL_CLASS_COLORIMETRY | 1) -#define V4L2_CID_COLORIMETRY_HDR10_CLL_INFO \ - (V4L2_CID_COLORIMETRY_CLASS_BASE + 0) +#define V4L2_CID_COLORIMETRY_HDR10_CLL_INFO (V4L2_CID_COLORIMETRY_CLASS_BASE + 0) struct v4l2_ctrl_hdr10_cll_info { __u16 max_content_light_level; __u16 max_pic_average_light_level; }; -#define V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY \ - (V4L2_CID_COLORIMETRY_CLASS_BASE + 1) +#define V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY (V4L2_CID_COLORIMETRY_CLASS_BASE + 1) #define V4L2_HDR10_MASTERING_PRIMARIES_X_LOW 5 #define V4L2_HDR10_MASTERING_PRIMARIES_X_HIGH 37000 @@ -2874,8 +2818,7 @@ struct v4l2_vp9_mv_probs { __u8 hp[2]; }; -#define V4L2_CID_STATELESS_VP9_COMPRESSED_HDR \ - (V4L2_CID_CODEC_STATELESS_BASE + 301) +#define V4L2_CID_STATELESS_VP9_COMPRESSED_HDR (V4L2_CID_CODEC_STATELESS_BASE + 301) #define V4L2_VP9_TX_MODE_ONLY_4X4 0 #define V4L2_VP9_TX_MODE_ALLOW_8X8 1 @@ -2999,8 +2942,7 @@ struct v4l2_ctrl_av1_sequence { __u16 max_frame_height_minus_1; }; -#define V4L2_CID_STATELESS_AV1_TILE_GROUP_ENTRY \ - (V4L2_CID_CODEC_STATELESS_BASE + 501) +#define V4L2_CID_STATELESS_AV1_TILE_GROUP_ENTRY (V4L2_CID_CODEC_STATELESS_BASE + 501) /** * struct v4l2_ctrl_av1_tile_group_entry - AV1 Tile Group entry * @@ -3130,8 +3072,7 @@ struct v4l2_av1_loop_restoration { __u8 lr_unit_shift; __u8 lr_uv_shift; __u8 reserved; - enum v4l2_av1_frame_restoration_type - frame_restoration_type[V4L2_AV1_NUM_PLANES_MAX]; + enum v4l2_av1_frame_restoration_type frame_restoration_type[V4L2_AV1_NUM_PLANES_MAX]; __u32 loop_restoration_size[V4L2_AV1_MAX_NUM_PLANES]; }; @@ -3362,11 +3303,7 @@ enum v4l2_av1_interpolation_filter { * @V4L2_AV1_TX_MODE_SELECT: the choice of transform size is specified * explicitly for each block. */ -enum v4l2_av1_tx_mode { - V4L2_AV1_TX_MODE_ONLY_4X4 = 0, - V4L2_AV1_TX_MODE_LARGEST = 1, - V4L2_AV1_TX_MODE_SELECT = 2 -}; +enum v4l2_av1_tx_mode { V4L2_AV1_TX_MODE_ONLY_4X4 = 0, V4L2_AV1_TX_MODE_LARGEST = 1, V4L2_AV1_TX_MODE_SELECT = 2 }; #define V4L2_AV1_FRAME_FLAG_SHOW_FRAME 0x00000001 #define V4L2_AV1_FRAME_FLAG_SHOWABLE_FRAME 0x00000002 diff --git a/include/arch/x86_64/linux/v4l2-dv-timings.h b/include/arch/x86_64/linux/v4l2-dv-timings.h index ec87d37b..7a5c120f 100644 --- a/include/arch/x86_64/linux/v4l2-dv-timings.h +++ b/include/arch/x86_64/linux/v4l2-dv-timings.h @@ -23,851 +23,638 @@ /* CEA-861-F 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, \ - V4L2_DV_FL_HAS_CEA861_VIC, { 0, 0 }, 1) } +#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, V4L2_DV_FL_HAS_CEA861_VIC, { 0, 0 }, 1) } /* 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 | V4L2_DV_FL_IS_CE_VIDEO | \ - V4L2_DV_FL_HAS_PICTURE_ASPECT | \ - V4L2_DV_FL_HAS_CEA861_VIC, \ +#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 | V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_PICTURE_ASPECT | \ + V4L2_DV_FL_HAS_CEA861_VIC, \ { 4, 3 }, 6) } -#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, \ - V4L2_DV_FL_IS_CE_VIDEO | \ - V4L2_DV_FL_HAS_PICTURE_ASPECT | \ - V4L2_DV_FL_HAS_CEA861_VIC, \ +#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, \ + V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_PICTURE_ASPECT | V4L2_DV_FL_HAS_CEA861_VIC, \ { 4, 3 }, 2) } /* 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 | V4L2_DV_FL_IS_CE_VIDEO | \ - V4L2_DV_FL_HAS_PICTURE_ASPECT | \ - V4L2_DV_FL_HAS_CEA861_VIC, \ +#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 | V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_PICTURE_ASPECT | \ + V4L2_DV_FL_HAS_CEA861_VIC, \ { 4, 3 }, 21) } -#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, \ - V4L2_DV_FL_IS_CE_VIDEO | \ - V4L2_DV_FL_HAS_PICTURE_ASPECT | \ - V4L2_DV_FL_HAS_CEA861_VIC, \ +#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, \ + V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_PICTURE_ASPECT | V4L2_DV_FL_HAS_CEA861_VIC, \ { 4, 3 }, 17) } -#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 | V4L2_DV_FL_HAS_CEA861_VIC, \ - { 0, 0 }, 60) } - -#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, \ - V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_CEA861_VIC, \ - { 0, 0 }, 61) } - -#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 | V4L2_DV_FL_IS_CE_VIDEO | \ - V4L2_DV_FL_HAS_CEA861_VIC, \ - { 0, 0 }, 62) } - -#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, \ - V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_CEA861_VIC, \ - { 0, 0 }, 19) } - -#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 | V4L2_DV_FL_IS_CE_VIDEO | \ - V4L2_DV_FL_HAS_CEA861_VIC, \ - { 0, 0 }, 4) } - -#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 | V4L2_DV_FL_IS_CE_VIDEO | \ - V4L2_DV_FL_HAS_CEA861_VIC, \ - { 0, 0 }, 32) } - -#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, \ - V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_CEA861_VIC, \ - { 0, 0 }, 33) } - -#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 | V4L2_DV_FL_IS_CE_VIDEO | \ - V4L2_DV_FL_HAS_CEA861_VIC, \ - { 0, 0 }, 34) } - -#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 | V4L2_DV_FL_IS_CE_VIDEO | \ - V4L2_DV_FL_HAS_CEA861_VIC, \ - { 0, 0 }, 20) } - -#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, \ - V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_CEA861_VIC, \ - { 0, 0 }, 31) } - -#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 | \ - V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_CEA861_VIC, \ - { 0, 0 }, 5) } - -#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 | \ - V4L2_DV_FL_IS_CE_VIDEO | \ - V4L2_DV_FL_HAS_CEA861_VIC, \ +#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 | V4L2_DV_FL_HAS_CEA861_VIC, { 0, 0 }, 60) } + +#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, \ + V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_CEA861_VIC, { 0, 0 }, 61) } + +#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 | V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_CEA861_VIC, \ + { 0, 0 }, 62) } + +#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, \ + V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_CEA861_VIC, { 0, 0 }, 19) } + +#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 | V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_CEA861_VIC, \ + { 0, 0 }, 4) } + +#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 | V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_CEA861_VIC, \ + { 0, 0 }, 32) } + +#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, \ + V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_CEA861_VIC, { 0, 0 }, 33) } + +#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 | V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_CEA861_VIC, \ + { 0, 0 }, 34) } + +#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 | V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_CEA861_VIC, { 0, 0 }, \ + 20) } + +#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, \ + V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_CEA861_VIC, { 0, 0 }, 31) } + +#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 | V4L2_DV_FL_IS_CE_VIDEO | \ + V4L2_DV_FL_HAS_CEA861_VIC, \ + { 0, 0 }, 5) } + +#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 | V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_CEA861_VIC, \ { 0, 0 }, 16) } -#define V4L2_DV_BT_CEA_3840X2160P24 \ - { .type = V4L2_DV_BT_656_1120, \ - V4L2_INIT_BT_TIMINGS( \ - 3840, 2160, 0, \ - V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, 297000000, \ - 1276, 88, 296, 8, 10, 72, 0, 0, 0, V4L2_DV_BT_STD_CEA861, \ - V4L2_DV_FL_CAN_REDUCE_FPS | V4L2_DV_FL_IS_CE_VIDEO | \ - V4L2_DV_FL_HAS_CEA861_VIC | V4L2_DV_FL_HAS_HDMI_VIC, \ - { 0, 0 }, 93, 3) } - -#define V4L2_DV_BT_CEA_3840X2160P25 \ - { .type = V4L2_DV_BT_656_1120, \ - V4L2_INIT_BT_TIMINGS( \ - 3840, 2160, 0, \ - V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, 297000000, \ - 1056, 88, 296, 8, 10, 72, 0, 0, 0, V4L2_DV_BT_STD_CEA861, \ - V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_CEA861_VIC | \ - V4L2_DV_FL_HAS_HDMI_VIC, \ - { 0, 0 }, 94, 2) } - -#define V4L2_DV_BT_CEA_3840X2160P30 \ - { .type = V4L2_DV_BT_656_1120, \ - V4L2_INIT_BT_TIMINGS( \ - 3840, 2160, 0, \ - V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, 297000000, \ - 176, 88, 296, 8, 10, 72, 0, 0, 0, V4L2_DV_BT_STD_CEA861, \ - V4L2_DV_FL_CAN_REDUCE_FPS | V4L2_DV_FL_IS_CE_VIDEO | \ - V4L2_DV_FL_HAS_CEA861_VIC | V4L2_DV_FL_HAS_HDMI_VIC, \ - { 0, 0 }, 95, 1) } - -#define V4L2_DV_BT_CEA_3840X2160P50 \ - { .type = V4L2_DV_BT_656_1120, \ - V4L2_INIT_BT_TIMINGS( \ - 3840, 2160, 0, \ - V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, 594000000, \ - 1056, 88, 296, 8, 10, 72, 0, 0, 0, V4L2_DV_BT_STD_CEA861, \ - V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_CEA861_VIC, \ - { 0, 0 }, 96) } - -#define V4L2_DV_BT_CEA_3840X2160P60 \ - { .type = V4L2_DV_BT_656_1120, \ - V4L2_INIT_BT_TIMINGS( \ - 3840, 2160, 0, \ - V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, 594000000, \ - 176, 88, 296, 8, 10, 72, 0, 0, 0, V4L2_DV_BT_STD_CEA861, \ - V4L2_DV_FL_CAN_REDUCE_FPS | V4L2_DV_FL_IS_CE_VIDEO | \ - V4L2_DV_FL_HAS_CEA861_VIC, \ - { 0, 0 }, 97) } - -#define V4L2_DV_BT_CEA_4096X2160P24 \ - { .type = V4L2_DV_BT_656_1120, \ - V4L2_INIT_BT_TIMINGS( \ - 4096, 2160, 0, \ - V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, 297000000, \ - 1020, 88, 296, 8, 10, 72, 0, 0, 0, V4L2_DV_BT_STD_CEA861, \ - V4L2_DV_FL_CAN_REDUCE_FPS | V4L2_DV_FL_IS_CE_VIDEO | \ - V4L2_DV_FL_HAS_CEA861_VIC | V4L2_DV_FL_HAS_HDMI_VIC, \ - { 0, 0 }, 98, 4) } - -#define V4L2_DV_BT_CEA_4096X2160P25 \ - { .type = V4L2_DV_BT_656_1120, \ - V4L2_INIT_BT_TIMINGS( \ - 4096, 2160, 0, \ - V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, 297000000, \ - 968, 88, 128, 8, 10, 72, 0, 0, 0, V4L2_DV_BT_STD_CEA861, \ - V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_CEA861_VIC, \ - { 0, 0 }, 99) } - -#define V4L2_DV_BT_CEA_4096X2160P30 \ - { .type = V4L2_DV_BT_656_1120, \ - V4L2_INIT_BT_TIMINGS( \ - 4096, 2160, 0, \ - V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, 297000000, \ - 88, 88, 128, 8, 10, 72, 0, 0, 0, V4L2_DV_BT_STD_CEA861, \ - V4L2_DV_FL_CAN_REDUCE_FPS | V4L2_DV_FL_IS_CE_VIDEO | \ - V4L2_DV_FL_HAS_CEA861_VIC, \ - { 0, 0 }, 100) } - -#define V4L2_DV_BT_CEA_4096X2160P50 \ - { .type = V4L2_DV_BT_656_1120, \ - V4L2_INIT_BT_TIMINGS( \ - 4096, 2160, 0, \ - V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, 594000000, \ - 968, 88, 128, 8, 10, 72, 0, 0, 0, V4L2_DV_BT_STD_CEA861, \ - V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_CEA861_VIC, \ - { 0, 0 }, 101) } - -#define V4L2_DV_BT_CEA_4096X2160P60 \ - { .type = V4L2_DV_BT_656_1120, \ - V4L2_INIT_BT_TIMINGS( \ - 4096, 2160, 0, \ - V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, 594000000, \ - 88, 88, 128, 8, 10, 72, 0, 0, 0, V4L2_DV_BT_STD_CEA861, \ - V4L2_DV_FL_CAN_REDUCE_FPS | V4L2_DV_FL_IS_CE_VIDEO | \ - V4L2_DV_FL_HAS_CEA861_VIC, \ - { 0, 0 }, 102) } +#define V4L2_DV_BT_CEA_3840X2160P24 \ + { .type = V4L2_DV_BT_656_1120, \ + V4L2_INIT_BT_TIMINGS(3840, 2160, 0, V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, 297000000, 1276, 88, 296, \ + 8, 10, 72, 0, 0, 0, V4L2_DV_BT_STD_CEA861, \ + V4L2_DV_FL_CAN_REDUCE_FPS | V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_CEA861_VIC | \ + V4L2_DV_FL_HAS_HDMI_VIC, \ + { 0, 0 }, 93, 3) } + +#define V4L2_DV_BT_CEA_3840X2160P25 \ + { .type = V4L2_DV_BT_656_1120, \ + V4L2_INIT_BT_TIMINGS(3840, 2160, 0, V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, 297000000, 1056, 88, 296, \ + 8, 10, 72, 0, 0, 0, V4L2_DV_BT_STD_CEA861, \ + V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_CEA861_VIC | V4L2_DV_FL_HAS_HDMI_VIC, { 0, 0 }, \ + 94, 2) } + +#define V4L2_DV_BT_CEA_3840X2160P30 \ + { .type = V4L2_DV_BT_656_1120, \ + V4L2_INIT_BT_TIMINGS(3840, 2160, 0, V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, 297000000, 176, 88, 296, \ + 8, 10, 72, 0, 0, 0, V4L2_DV_BT_STD_CEA861, \ + V4L2_DV_FL_CAN_REDUCE_FPS | V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_CEA861_VIC | \ + V4L2_DV_FL_HAS_HDMI_VIC, \ + { 0, 0 }, 95, 1) } + +#define V4L2_DV_BT_CEA_3840X2160P50 \ + { .type = V4L2_DV_BT_656_1120, \ + V4L2_INIT_BT_TIMINGS(3840, 2160, 0, V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, 594000000, 1056, 88, 296, \ + 8, 10, 72, 0, 0, 0, V4L2_DV_BT_STD_CEA861, \ + V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_CEA861_VIC, { 0, 0 }, 96) } + +#define V4L2_DV_BT_CEA_3840X2160P60 \ + { .type = V4L2_DV_BT_656_1120, \ + V4L2_INIT_BT_TIMINGS(3840, 2160, 0, V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, 594000000, 176, 88, 296, \ + 8, 10, 72, 0, 0, 0, V4L2_DV_BT_STD_CEA861, \ + V4L2_DV_FL_CAN_REDUCE_FPS | V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_CEA861_VIC, \ + { 0, 0 }, 97) } + +#define V4L2_DV_BT_CEA_4096X2160P24 \ + { .type = V4L2_DV_BT_656_1120, \ + V4L2_INIT_BT_TIMINGS(4096, 2160, 0, V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, 297000000, 1020, 88, 296, \ + 8, 10, 72, 0, 0, 0, V4L2_DV_BT_STD_CEA861, \ + V4L2_DV_FL_CAN_REDUCE_FPS | V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_CEA861_VIC | \ + V4L2_DV_FL_HAS_HDMI_VIC, \ + { 0, 0 }, 98, 4) } + +#define V4L2_DV_BT_CEA_4096X2160P25 \ + { .type = V4L2_DV_BT_656_1120, \ + V4L2_INIT_BT_TIMINGS(4096, 2160, 0, V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, 297000000, 968, 88, 128, \ + 8, 10, 72, 0, 0, 0, V4L2_DV_BT_STD_CEA861, \ + V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_CEA861_VIC, { 0, 0 }, 99) } + +#define V4L2_DV_BT_CEA_4096X2160P30 \ + { .type = V4L2_DV_BT_656_1120, \ + V4L2_INIT_BT_TIMINGS(4096, 2160, 0, V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, 297000000, 88, 88, 128, \ + 8, 10, 72, 0, 0, 0, V4L2_DV_BT_STD_CEA861, \ + V4L2_DV_FL_CAN_REDUCE_FPS | V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_CEA861_VIC, \ + { 0, 0 }, 100) } + +#define V4L2_DV_BT_CEA_4096X2160P50 \ + { .type = V4L2_DV_BT_656_1120, \ + V4L2_INIT_BT_TIMINGS(4096, 2160, 0, V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, 594000000, 968, 88, 128, \ + 8, 10, 72, 0, 0, 0, V4L2_DV_BT_STD_CEA861, \ + V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_CEA861_VIC, { 0, 0 }, 101) } + +#define V4L2_DV_BT_CEA_4096X2160P60 \ + { .type = V4L2_DV_BT_656_1120, \ + V4L2_INIT_BT_TIMINGS(4096, 2160, 0, V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, 594000000, 88, 88, 128, \ + 8, 10, 72, 0, 0, 0, V4L2_DV_BT_STD_CEA861, \ + V4L2_DV_FL_CAN_REDUCE_FPS | V4L2_DV_FL_IS_CE_VIDEO | V4L2_DV_FL_HAS_CEA861_VIC, \ + { 0, 0 }, 102) } /* 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, \ +#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, \ +#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, \ +#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_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_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) } +#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_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) } -#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) } +/* 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_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_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_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_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_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) } +#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) } -/* 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) } +#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_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, \ +#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, \ +#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, \ +#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_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_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_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_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, \ +#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_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) } +#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) } -/* 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_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_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_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_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_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_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_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_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_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) } -#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_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, \ +#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, \ +#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, \ +#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) } +#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, \ +#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, \ +#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, \ +#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_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) } +#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) } +#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, \ +#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, \ +#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, \ +#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, \ +#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, \ +#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, \ +#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, \ +#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_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, \ +#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, \ +#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, \ +#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, \ +#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, \ +#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) } +#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, \ +#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, \ +#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, \ +#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_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) } /* 4K resolutions */ -#define V4L2_DV_BT_DMT_4096X2160P60_RB \ - { .type = V4L2_DV_BT_656_1120, \ - V4L2_INIT_BT_TIMINGS(4096, 2160, 0, V4L2_DV_HSYNC_POS_POL, \ - 556744000, 8, 32, 40, 48, 8, 6, 0, 0, 0, \ - V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, \ - V4L2_DV_FL_REDUCED_BLANKING) } - -#define V4L2_DV_BT_DMT_4096X2160P59_94_RB \ - { .type = V4L2_DV_BT_656_1120, \ - V4L2_INIT_BT_TIMINGS(4096, 2160, 0, V4L2_DV_HSYNC_POS_POL, \ - 556188000, 8, 32, 40, 48, 8, 6, 0, 0, 0, \ - V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, \ - V4L2_DV_FL_REDUCED_BLANKING) } +#define V4L2_DV_BT_DMT_4096X2160P60_RB \ + { .type = V4L2_DV_BT_656_1120, \ + V4L2_INIT_BT_TIMINGS(4096, 2160, 0, V4L2_DV_HSYNC_POS_POL, 556744000, 8, 32, 40, 48, 8, 6, 0, 0, 0, \ + V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, V4L2_DV_FL_REDUCED_BLANKING) } + +#define V4L2_DV_BT_DMT_4096X2160P59_94_RB \ + { .type = V4L2_DV_BT_656_1120, \ + V4L2_INIT_BT_TIMINGS(4096, 2160, 0, V4L2_DV_HSYNC_POS_POL, 556188000, 8, 32, 40, 48, 8, 6, 0, 0, 0, \ + V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT, V4L2_DV_FL_REDUCED_BLANKING) } /* SDI timings definitions */ /* SMPTE-125M */ -#define V4L2_DV_BT_SDI_720X487I60 \ - { .type = V4L2_DV_BT_656_1120, \ - V4L2_INIT_BT_TIMINGS(720, 487, 1, V4L2_DV_HSYNC_POS_POL, 13500000, \ - 16, 121, 0, 0, 19, 0, 0, 19, 0, \ - V4L2_DV_BT_STD_SDI, \ - V4L2_DV_FL_FIRST_FIELD_EXTRA_LINE) } +#define V4L2_DV_BT_SDI_720X487I60 \ + { .type = V4L2_DV_BT_656_1120, \ + V4L2_INIT_BT_TIMINGS(720, 487, 1, V4L2_DV_HSYNC_POS_POL, 13500000, 16, 121, 0, 0, 19, 0, 0, 19, 0, \ + V4L2_DV_BT_STD_SDI, V4L2_DV_FL_FIRST_FIELD_EXTRA_LINE) } #endif diff --git a/include/arch/x86_64/linux/v4l2-mediabus.h b/include/arch/x86_64/linux/v4l2-mediabus.h index d05a9bb9..d2475f00 100644 --- a/include/arch/x86_64/linux/v4l2-mediabus.h +++ b/include/arch/x86_64/linux/v4l2-mediabus.h @@ -61,8 +61,7 @@ struct v4l2_mbus_framefmt { * v4l2_mbus_pixelcode enum is frozen. */ -#define V4L2_MBUS_FROM_MEDIA_BUS_FMT(name) \ - V4L2_MBUS_FMT_##name = MEDIA_BUS_FMT_##name +#define V4L2_MBUS_FROM_MEDIA_BUS_FMT(name) V4L2_MBUS_FMT_##name = MEDIA_BUS_FMT_##name enum v4l2_mbus_pixelcode { V4L2_MBUS_FROM_MEDIA_BUS_FMT(FIXED), diff --git a/include/arch/x86_64/linux/v4l2-subdev.h b/include/arch/x86_64/linux/v4l2-subdev.h index 01a1ec37..ca237823 100644 --- a/include/arch/x86_64/linux/v4l2-subdev.h +++ b/include/arch/x86_64/linux/v4l2-subdev.h @@ -271,41 +271,33 @@ struct v4l2_subdev_client_capability { /* Backwards compatibility define --- to be removed */ #define v4l2_subdev_edid v4l2_edid -#define VIDIOC_SUBDEV_QUERYCAP _IOR('V', 0, struct v4l2_subdev_capability) -#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 \ - _IOWR('V', 21, struct v4l2_subdev_frame_interval) -#define VIDIOC_SUBDEV_S_FRAME_INTERVAL \ - _IOWR('V', 22, struct v4l2_subdev_frame_interval) -#define VIDIOC_SUBDEV_ENUM_MBUS_CODE \ - _IOWR('V', 2, struct v4l2_subdev_mbus_code_enum) -#define VIDIOC_SUBDEV_ENUM_FRAME_SIZE \ - _IOWR('V', 74, struct v4l2_subdev_frame_size_enum) -#define VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL \ - _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_ROUTING _IOWR('V', 38, struct v4l2_subdev_routing) -#define VIDIOC_SUBDEV_S_ROUTING _IOWR('V', 39, struct v4l2_subdev_routing) -#define VIDIOC_SUBDEV_G_CLIENT_CAP \ - _IOR('V', 101, struct v4l2_subdev_client_capability) -#define VIDIOC_SUBDEV_S_CLIENT_CAP \ - _IOWR('V', 102, struct v4l2_subdev_client_capability) +#define VIDIOC_SUBDEV_QUERYCAP _IOR('V', 0, struct v4l2_subdev_capability) +#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 _IOWR('V', 21, struct v4l2_subdev_frame_interval) +#define VIDIOC_SUBDEV_S_FRAME_INTERVAL _IOWR('V', 22, struct v4l2_subdev_frame_interval) +#define VIDIOC_SUBDEV_ENUM_MBUS_CODE _IOWR('V', 2, struct v4l2_subdev_mbus_code_enum) +#define VIDIOC_SUBDEV_ENUM_FRAME_SIZE _IOWR('V', 74, struct v4l2_subdev_frame_size_enum) +#define VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL _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_ROUTING _IOWR('V', 38, struct v4l2_subdev_routing) +#define VIDIOC_SUBDEV_S_ROUTING _IOWR('V', 39, struct v4l2_subdev_routing) +#define VIDIOC_SUBDEV_G_CLIENT_CAP _IOR('V', 101, struct v4l2_subdev_client_capability) +#define VIDIOC_SUBDEV_S_CLIENT_CAP _IOWR('V', 102, struct v4l2_subdev_client_capability) /* The following ioctls are identical to the ioctls in videodev2.h */ -#define VIDIOC_SUBDEV_G_STD _IOR('V', 23, v4l2_std_id) -#define VIDIOC_SUBDEV_S_STD _IOW('V', 24, v4l2_std_id) -#define VIDIOC_SUBDEV_ENUMSTD _IOWR('V', 25, struct v4l2_standard) -#define VIDIOC_SUBDEV_G_EDID _IOWR('V', 40, struct v4l2_edid) -#define VIDIOC_SUBDEV_S_EDID _IOWR('V', 41, struct v4l2_edid) -#define VIDIOC_SUBDEV_QUERYSTD _IOR('V', 63, v4l2_std_id) -#define VIDIOC_SUBDEV_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings) -#define VIDIOC_SUBDEV_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings) -#define VIDIOC_SUBDEV_ENUM_DV_TIMINGS \ - _IOWR('V', 98, struct v4l2_enum_dv_timings) +#define VIDIOC_SUBDEV_G_STD _IOR('V', 23, v4l2_std_id) +#define VIDIOC_SUBDEV_S_STD _IOW('V', 24, v4l2_std_id) +#define VIDIOC_SUBDEV_ENUMSTD _IOWR('V', 25, struct v4l2_standard) +#define VIDIOC_SUBDEV_G_EDID _IOWR('V', 40, struct v4l2_edid) +#define VIDIOC_SUBDEV_S_EDID _IOWR('V', 41, struct v4l2_edid) +#define VIDIOC_SUBDEV_QUERYSTD _IOR('V', 63, v4l2_std_id) +#define VIDIOC_SUBDEV_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings) +#define VIDIOC_SUBDEV_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings) +#define VIDIOC_SUBDEV_ENUM_DV_TIMINGS _IOWR('V', 98, struct v4l2_enum_dv_timings) #define VIDIOC_SUBDEV_QUERY_DV_TIMINGS _IOR('V', 99, struct v4l2_dv_timings) #define VIDIOC_SUBDEV_DV_TIMINGS_CAP _IOWR('V', 100, struct v4l2_dv_timings_cap) diff --git a/include/arch/x86_64/linux/vbox_vmmdev_types.h b/include/arch/x86_64/linux/vbox_vmmdev_types.h index 22f6cf8e..c2394546 100644 --- a/include/arch/x86_64/linux/vbox_vmmdev_types.h +++ b/include/arch/x86_64/linux/vbox_vmmdev_types.h @@ -16,8 +16,7 @@ * We cannot use linux' compiletime_assert here because it expects to be used * inside a function only. Use a typedef to a char array with a negative size. */ -#define VMMDEV_ASSERT_SIZE(type, size) \ - typedef char type##_asrt_size[1 - 2 * !!(sizeof(struct type) != (size))] +#define VMMDEV_ASSERT_SIZE(type, size) typedef char type##_asrt_size[1 - 2 * !!(sizeof(struct type) != (size))] /** enum vmmdev_request_type - VMMDev request types. */ enum vmmdev_request_type { @@ -283,8 +282,8 @@ struct vmmdev_hgcm_pagelist { __u16 offset_first_page; /** Data offset in the first page. */ __u16 page_count; /** Number of pages. */ union { - __u64 unused; /** Deprecated place-holder for first "pages" - entry. */ + __u64 unused; /** Deprecated place-holder for first "pages" + entry. */ __DECLARE_FLEX_ARRAY(__u64, pages); /** Page addresses. */ }; }; diff --git a/include/arch/x86_64/linux/vboxguest.h b/include/arch/x86_64/linux/vboxguest.h index d3770afb..e120ee5f 100644 --- a/include/arch/x86_64/linux/vboxguest.h +++ b/include/arch/x86_64/linux/vboxguest.h @@ -93,8 +93,7 @@ struct vbg_ioctl_driver_version_info { }; VMMDEV_ASSERT_SIZE(vbg_ioctl_driver_version_info, 24 + 20); -#define VBG_IOCTL_DRIVER_VERSION_INFO \ - _IOWR('V', 0, struct vbg_ioctl_driver_version_info) +#define VBG_IOCTL_DRIVER_VERSION_INFO _IOWR('V', 0, struct vbg_ioctl_driver_version_info) /* IOCTL to perform a VMM Device request less than 1KB in size. */ #define VBG_IOCTL_VMMDEV_REQUEST(s) _IOC(_IOC_READ | _IOC_WRITE, 'V', 2, s) @@ -129,8 +128,7 @@ struct vbg_ioctl_hgcm_disconnect { }; VMMDEV_ASSERT_SIZE(vbg_ioctl_hgcm_disconnect, 24 + 4); -#define VBG_IOCTL_HGCM_DISCONNECT \ - _IOWR('V', 5, struct vbg_ioctl_hgcm_disconnect) +#define VBG_IOCTL_HGCM_DISCONNECT _IOWR('V', 5, struct vbg_ioctl_hgcm_disconnect) /** VBG_IOCTL_HGCM_CALL data structure. */ struct vbg_ioctl_hgcm_call { @@ -211,8 +209,7 @@ struct vbg_ioctl_wait_for_events { }; VMMDEV_ASSERT_SIZE(vbg_ioctl_wait_for_events, 24 + 8); -#define VBG_IOCTL_WAIT_FOR_EVENTS \ - _IOWR('V', 10, struct vbg_ioctl_wait_for_events) +#define VBG_IOCTL_WAIT_FOR_EVENTS _IOWR('V', 10, struct vbg_ioctl_wait_for_events) /* * IOCTL to VBoxGuest to interrupt (cancel) any pending @@ -223,8 +220,7 @@ VMMDEV_ASSERT_SIZE(vbg_ioctl_wait_for_events, 24 + 8); * the same session. Any VBOXGUEST_IOCTL_WAITEVENT calls in the same session * done after calling this will directly exit with -EINTR. */ -#define VBG_IOCTL_INTERRUPT_ALL_WAIT_FOR_EVENTS \ - _IOWR('V', 11, struct vbg_ioctl_hdr) +#define VBG_IOCTL_INTERRUPT_ALL_WAIT_FOR_EVENTS _IOWR('V', 11, struct vbg_ioctl_hdr) /** VBG_IOCTL_CHANGE_FILTER_MASK data structure. */ struct vbg_ioctl_change_filter { @@ -242,8 +238,7 @@ struct vbg_ioctl_change_filter { VMMDEV_ASSERT_SIZE(vbg_ioctl_change_filter, 24 + 8); /* IOCTL to VBoxGuest to control the event filter mask. */ -#define VBG_IOCTL_CHANGE_FILTER_MASK \ - _IOWR('V', 12, struct vbg_ioctl_change_filter) +#define VBG_IOCTL_CHANGE_FILTER_MASK _IOWR('V', 12, struct vbg_ioctl_change_filter) /** VBG_IOCTL_ACQUIRE_GUEST_CAPABILITIES data structure. */ struct vbg_ioctl_acquire_guest_caps { @@ -265,8 +260,7 @@ VMMDEV_ASSERT_SIZE(vbg_ioctl_acquire_guest_caps, 24 + 12); #define VBGL_IOC_AGC_FLAGS_CONFIG_ACQUIRE_MODE 0x00000001 #define VBGL_IOC_AGC_FLAGS_VALID_MASK 0x00000001 -#define VBG_IOCTL_ACQUIRE_GUEST_CAPABILITIES \ - _IOWR('V', 13, struct vbg_ioctl_acquire_guest_caps) +#define VBG_IOCTL_ACQUIRE_GUEST_CAPABILITIES _IOWR('V', 13, struct vbg_ioctl_acquire_guest_caps) /** VBG_IOCTL_CHANGE_GUEST_CAPABILITIES data structure. */ struct vbg_ioctl_set_guest_caps { @@ -289,8 +283,7 @@ struct vbg_ioctl_set_guest_caps { }; VMMDEV_ASSERT_SIZE(vbg_ioctl_set_guest_caps, 24 + 8); -#define VBG_IOCTL_CHANGE_GUEST_CAPABILITIES \ - _IOWR('V', 14, struct vbg_ioctl_set_guest_caps) +#define VBG_IOCTL_CHANGE_GUEST_CAPABILITIES _IOWR('V', 14, struct vbg_ioctl_set_guest_caps) /** VBG_IOCTL_CHECK_BALLOON data structure. */ struct vbg_ioctl_check_balloon { @@ -332,7 +325,6 @@ struct vbg_ioctl_write_coredump { }; VMMDEV_ASSERT_SIZE(vbg_ioctl_write_coredump, 24 + 4); -#define VBG_IOCTL_WRITE_CORE_DUMP \ - _IOWR('V', 19, struct vbg_ioctl_write_coredump) +#define VBG_IOCTL_WRITE_CORE_DUMP _IOWR('V', 19, struct vbg_ioctl_write_coredump) #endif diff --git a/include/arch/x86_64/linux/version.h b/include/arch/x86_64/linux/version.h index 66af9fdf..d1873224 100644 --- a/include/arch/x86_64/linux/version.h +++ b/include/arch/x86_64/linux/version.h @@ -1,6 +1,5 @@ -#define LINUX_VERSION_CODE 397576 -#define KERNEL_VERSION(a, b, c) \ - (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c))) +#define LINUX_VERSION_CODE 397576 +#define KERNEL_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c))) #define LINUX_VERSION_MAJOR 6 #define LINUX_VERSION_PATCHLEVEL 17 #define LINUX_VERSION_SUBLEVEL 8 diff --git a/include/arch/x86_64/linux/vfio.h b/include/arch/x86_64/linux/vfio.h index b45509bc..0be4ceee 100644 --- a/include/arch/x86_64/linux/vfio.h +++ b/include/arch/x86_64/linux/vfio.h @@ -215,7 +215,7 @@ struct vfio_device_info { #define VFIO_DEVICE_FLAGS_CDX (1 << 8) /* vfio-cdx device */ __u32 num_regions; /* Max region index + 1 */ __u32 num_irqs; /* Max IRQ index + 1 */ - __u32 cap_offset; /* Offset within info struct of first cap */ + __u32 cap_offset; /* Offset within info struct of first cap */ __u32 pad; }; #define VFIO_DEVICE_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 7) @@ -275,9 +275,9 @@ struct vfio_region_info { #define VFIO_REGION_INFO_FLAG_MMAP (1 << 2) /* Region supports mmap */ #define VFIO_REGION_INFO_FLAG_CAPS (1 << 3) /* Info supports caps */ __u32 index; /* Region index */ - __u32 cap_offset; /* Offset within info struct of first cap */ - __aligned_u64 size; /* Region size (bytes) */ - __aligned_u64 offset; /* Region offset from start of device fd */ + __u32 cap_offset; /* Offset within info struct of first cap */ + __aligned_u64 size; /* Region size (bytes) */ + __aligned_u64 offset; /* Region offset from start of device fd */ }; #define VFIO_DEVICE_GET_REGION_INFO _IO(VFIO_TYPE, VFIO_BASE + 8) @@ -432,23 +432,17 @@ struct vfio_device_migration_info { #define VFIO_DEVICE_STATE_V1_RUNNING (1 << 0) #define VFIO_DEVICE_STATE_V1_SAVING (1 << 1) #define VFIO_DEVICE_STATE_V1_RESUMING (1 << 2) -#define VFIO_DEVICE_STATE_MASK \ - (VFIO_DEVICE_STATE_V1_RUNNING | VFIO_DEVICE_STATE_V1_SAVING | \ - VFIO_DEVICE_STATE_V1_RESUMING) +#define VFIO_DEVICE_STATE_MASK \ + (VFIO_DEVICE_STATE_V1_RUNNING | VFIO_DEVICE_STATE_V1_SAVING | VFIO_DEVICE_STATE_V1_RESUMING) -#define VFIO_DEVICE_STATE_VALID(state) \ - (state & VFIO_DEVICE_STATE_V1_RESUMING ? \ - (state & VFIO_DEVICE_STATE_MASK) == \ - VFIO_DEVICE_STATE_V1_RESUMING : \ - 1) +#define VFIO_DEVICE_STATE_VALID(state) \ + (state & VFIO_DEVICE_STATE_V1_RESUMING ? (state & VFIO_DEVICE_STATE_MASK) == VFIO_DEVICE_STATE_V1_RESUMING : 1) -#define VFIO_DEVICE_STATE_IS_ERROR(state) \ - ((state & VFIO_DEVICE_STATE_MASK) == \ - (VFIO_DEVICE_STATE_V1_SAVING | VFIO_DEVICE_STATE_V1_RESUMING)) +#define VFIO_DEVICE_STATE_IS_ERROR(state) \ + ((state & VFIO_DEVICE_STATE_MASK) == (VFIO_DEVICE_STATE_V1_SAVING | VFIO_DEVICE_STATE_V1_RESUMING)) -#define VFIO_DEVICE_STATE_SET_ERROR(state) \ - ((state & ~VFIO_DEVICE_STATE_MASK) | VFIO_DEVICE_STATE_V1_SAVING | \ - VFIO_DEVICE_STATE_V1_RESUMING) +#define VFIO_DEVICE_STATE_SET_ERROR(state) \ + ((state & ~VFIO_DEVICE_STATE_MASK) | VFIO_DEVICE_STATE_V1_SAVING | VFIO_DEVICE_STATE_V1_RESUMING) __u32 reserved; __aligned_u64 pending_bytes; @@ -598,12 +592,9 @@ struct vfio_irq_set { }; #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) +#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) * @@ -656,12 +647,7 @@ enum { enum { VFIO_CCW_CONFIG_REGION_INDEX, VFIO_CCW_NUM_REGIONS }; -enum { - VFIO_CCW_IO_IRQ_INDEX, - VFIO_CCW_CRW_IRQ_INDEX, - VFIO_CCW_REQ_IRQ_INDEX, - VFIO_CCW_NUM_IRQS -}; +enum { VFIO_CCW_IO_IRQ_INDEX, VFIO_CCW_CRW_IRQ_INDEX, VFIO_CCW_REQ_IRQ_INDEX, VFIO_CCW_NUM_IRQS }; /* * The vfio-ap bus driver makes use of the following IRQ index mapping. @@ -818,8 +804,8 @@ struct vfio_device_gfx_plane_info { __u32 size; /* size of plane in bytes, align on page*/ __u32 x_pos; /* horizontal position of cursor plane */ __u32 y_pos; /* vertical position of cursor plane*/ - __u32 x_hot; /* horizontal position of cursor hotspot */ - __u32 y_hot; /* vertical position of cursor hotspot */ + __u32 x_hot; /* horizontal position of cursor hotspot */ + __u32 y_hot; /* vertical position of cursor hotspot */ union { __u32 region_index; /* region index */ __u32 dmabuf_id; /* dma-buf id */ @@ -1488,7 +1474,7 @@ struct vfio_iommu_type1_info { #define VFIO_IOMMU_INFO_PGSIZES (1 << 0) /* supported page sizes info */ #define VFIO_IOMMU_INFO_CAPS (1 << 1) /* Info supports caps */ __aligned_u64 iova_pgsizes; /* Bitmap of supported page sizes */ - __u32 cap_offset; /* Offset within info struct of first cap */ + __u32 cap_offset; /* Offset within info struct of first cap */ __u32 pad; }; diff --git a/include/arch/x86_64/linux/vhost.h b/include/arch/x86_64/linux/vhost.h index a1708801..20da4528 100644 --- a/include/arch/x86_64/linux/vhost.h +++ b/include/arch/x86_64/linux/vhost.h @@ -87,10 +87,8 @@ */ #define VHOST_VRING_LITTLE_ENDIAN 0 #define VHOST_VRING_BIG_ENDIAN 1 -#define VHOST_SET_VRING_ENDIAN \ - _IOW(VHOST_VIRTIO, 0x13, struct vhost_vring_state) -#define VHOST_GET_VRING_ENDIAN \ - _IOW(VHOST_VIRTIO, 0x14, struct vhost_vring_state) +#define VHOST_SET_VRING_ENDIAN _IOW(VHOST_VIRTIO, 0x13, struct vhost_vring_state) +#define VHOST_GET_VRING_ENDIAN _IOW(VHOST_VIRTIO, 0x14, struct vhost_vring_state) /* Attach a vhost_worker created with VHOST_NEW_WORKER to one of the device's * virtqueues. * @@ -98,11 +96,9 @@ * is no longer attached to any virtqueues, it can be freed with * VHOST_FREE_WORKER. */ -#define VHOST_ATTACH_VRING_WORKER \ - _IOW(VHOST_VIRTIO, 0x15, struct vhost_vring_worker) +#define VHOST_ATTACH_VRING_WORKER _IOW(VHOST_VIRTIO, 0x15, struct vhost_vring_worker) /* Return the vring worker's ID */ -#define VHOST_GET_VRING_WORKER \ - _IOWR(VHOST_VIRTIO, 0x16, struct vhost_vring_worker) +#define VHOST_GET_VRING_WORKER _IOWR(VHOST_VIRTIO, 0x16, struct vhost_vring_worker) /* The following ioctls use eventfd file descriptors to signal and poll * for events. */ @@ -114,11 +110,9 @@ /* Set eventfd to signal an error */ #define VHOST_SET_VRING_ERR _IOW(VHOST_VIRTIO, 0x22, struct vhost_vring_file) /* Set busy loop timeout (in us) */ -#define VHOST_SET_VRING_BUSYLOOP_TIMEOUT \ - _IOW(VHOST_VIRTIO, 0x23, struct vhost_vring_state) +#define VHOST_SET_VRING_BUSYLOOP_TIMEOUT _IOW(VHOST_VIRTIO, 0x23, struct vhost_vring_state) /* Get busy loop timeout (in us) */ -#define VHOST_GET_VRING_BUSYLOOP_TIMEOUT \ - _IOW(VHOST_VIRTIO, 0x24, struct vhost_vring_state) +#define VHOST_GET_VRING_BUSYLOOP_TIMEOUT _IOW(VHOST_VIRTIO, 0x24, struct vhost_vring_state) /* Set or get vhost backend capability */ @@ -135,10 +129,8 @@ /* VHOST_SCSI specific defines */ -#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) +#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 */ @@ -167,8 +159,7 @@ #define VHOST_VDPA_GET_CONFIG _IOR(VHOST_VIRTIO, 0x73, struct vhost_vdpa_config) #define VHOST_VDPA_SET_CONFIG _IOW(VHOST_VIRTIO, 0x74, struct vhost_vdpa_config) /* Enable/disable the ring. */ -#define VHOST_VDPA_SET_VRING_ENABLE \ - _IOW(VHOST_VIRTIO, 0x75, struct vhost_vring_state) +#define VHOST_VDPA_SET_VRING_ENABLE _IOW(VHOST_VIRTIO, 0x75, struct vhost_vring_state) /* Get the max ring size. */ #define VHOST_VDPA_GET_VRING_NUM _IOR(VHOST_VIRTIO, 0x76, __u16) @@ -176,8 +167,7 @@ #define VHOST_VDPA_SET_CONFIG_CALL _IOW(VHOST_VIRTIO, 0x77, int) /* Get the valid iova range */ -#define VHOST_VDPA_GET_IOVA_RANGE \ - _IOR(VHOST_VIRTIO, 0x78, struct vhost_vdpa_iova_range) +#define VHOST_VDPA_GET_IOVA_RANGE _IOR(VHOST_VIRTIO, 0x78, struct vhost_vdpa_iova_range) /* Get the config size */ #define VHOST_VDPA_GET_CONFIG_SIZE _IOR(VHOST_VIRTIO, 0x79, __u32) @@ -189,14 +179,12 @@ * vhost_vring_state. The group for this specific virtqueue is * returned via num field of vhost_vring_state. */ -#define VHOST_VDPA_GET_VRING_GROUP \ - _IOWR(VHOST_VIRTIO, 0x7B, struct vhost_vring_state) +#define VHOST_VDPA_GET_VRING_GROUP _IOWR(VHOST_VIRTIO, 0x7B, struct vhost_vring_state) /* Set the ASID for a virtqueue group. The group index is stored in * the index field of vhost_vring_state, the ASID associated with this * group is stored at num field of vhost_vring_state. */ -#define VHOST_VDPA_SET_GROUP_ASID \ - _IOW(VHOST_VIRTIO, 0x7C, struct vhost_vring_state) +#define VHOST_VDPA_SET_GROUP_ASID _IOW(VHOST_VIRTIO, 0x7C, struct vhost_vring_state) /* Suspend a device so it does not process virtqueue requests anymore * @@ -221,8 +209,7 @@ * The group ID of the descriptor table for this specific virtqueue * is returned via num field of vhost_vring_state. */ -#define VHOST_VDPA_GET_VRING_DESC_GROUP \ - _IOWR(VHOST_VIRTIO, 0x7F, struct vhost_vring_state) +#define VHOST_VDPA_GET_VRING_DESC_GROUP _IOWR(VHOST_VIRTIO, 0x7F, struct vhost_vring_state) /* Get the count of all virtqueues */ #define VHOST_VDPA_GET_VQS_COUNT _IOR(VHOST_VIRTIO, 0x80, __u32) @@ -234,14 +221,11 @@ * userspace set the vring index in vhost_vring_state.index * kernel set the queue size in vhost_vring_state.num */ -#define VHOST_VDPA_GET_VRING_SIZE \ - _IOWR(VHOST_VIRTIO, 0x82, struct vhost_vring_state) +#define VHOST_VDPA_GET_VRING_SIZE _IOWR(VHOST_VIRTIO, 0x82, struct vhost_vring_state) /* Extended features manipulation */ -#define VHOST_GET_FEATURES_ARRAY \ - _IOR(VHOST_VIRTIO, 0x83, struct vhost_features_array) -#define VHOST_SET_FEATURES_ARRAY \ - _IOW(VHOST_VIRTIO, 0x83, struct vhost_features_array) +#define VHOST_GET_FEATURES_ARRAY _IOR(VHOST_VIRTIO, 0x83, struct vhost_features_array) +#define VHOST_SET_FEATURES_ARRAY _IOW(VHOST_VIRTIO, 0x83, struct vhost_features_array) /* fork_owner values for vhost */ #define VHOST_FORK_OWNER_KTHREAD 0 diff --git a/include/arch/x86_64/linux/videodev2.h b/include/arch/x86_64/linux/videodev2.h index e0643d14..db9813a2 100644 --- a/include/arch/x86_64/linux/videodev2.h +++ b/include/arch/x86_64/linux/videodev2.h @@ -77,9 +77,7 @@ */ /* Four-character-code (FOURCC) */ -#define v4l2_fourcc(a, b, c, d) \ - ((__u32)(a) | ((__u32)(b) << 8) | ((__u32)(c) << 16) | \ - ((__u32)(d) << 24)) +#define v4l2_fourcc(a, b, c, d) ((__u32)(a) | ((__u32)(b) << 8) | ((__u32)(c) << 16) | ((__u32)(d) << 24)) #define v4l2_fourcc_be(a, b, c, d) (v4l2_fourcc(a, b, c, d) | (1U << 31)) /* @@ -106,30 +104,20 @@ enum v4l2_field { first and the bottom field is transmitted first */ }; -#define V4L2_FIELD_HAS_TOP(field) \ - ((field) == V4L2_FIELD_TOP || (field) == V4L2_FIELD_INTERLACED || \ - (field) == V4L2_FIELD_INTERLACED_TB || \ - (field) == V4L2_FIELD_INTERLACED_BT || \ - (field) == V4L2_FIELD_SEQ_TB || (field) == V4L2_FIELD_SEQ_BT) -#define V4L2_FIELD_HAS_BOTTOM(field) \ - ((field) == V4L2_FIELD_BOTTOM || (field) == V4L2_FIELD_INTERLACED || \ - (field) == V4L2_FIELD_INTERLACED_TB || \ - (field) == V4L2_FIELD_INTERLACED_BT || \ - (field) == V4L2_FIELD_SEQ_TB || (field) == V4L2_FIELD_SEQ_BT) -#define V4L2_FIELD_HAS_BOTH(field) \ - ((field) == V4L2_FIELD_INTERLACED || \ - (field) == V4L2_FIELD_INTERLACED_TB || \ - (field) == V4L2_FIELD_INTERLACED_BT || \ - (field) == V4L2_FIELD_SEQ_TB || (field) == V4L2_FIELD_SEQ_BT) -#define V4L2_FIELD_HAS_T_OR_B(field) \ - ((field) == V4L2_FIELD_BOTTOM || (field) == V4L2_FIELD_TOP || \ - (field) == V4L2_FIELD_ALTERNATE) -#define V4L2_FIELD_IS_INTERLACED(field) \ - ((field) == V4L2_FIELD_INTERLACED || \ - (field) == V4L2_FIELD_INTERLACED_TB || \ - (field) == V4L2_FIELD_INTERLACED_BT) -#define V4L2_FIELD_IS_SEQUENTIAL(field) \ - ((field) == V4L2_FIELD_SEQ_TB || (field) == V4L2_FIELD_SEQ_BT) +#define V4L2_FIELD_HAS_TOP(field) \ + ((field) == V4L2_FIELD_TOP || (field) == V4L2_FIELD_INTERLACED || (field) == V4L2_FIELD_INTERLACED_TB || \ + (field) == V4L2_FIELD_INTERLACED_BT || (field) == V4L2_FIELD_SEQ_TB || (field) == V4L2_FIELD_SEQ_BT) +#define V4L2_FIELD_HAS_BOTTOM(field) \ + ((field) == V4L2_FIELD_BOTTOM || (field) == V4L2_FIELD_INTERLACED || (field) == V4L2_FIELD_INTERLACED_TB || \ + (field) == V4L2_FIELD_INTERLACED_BT || (field) == V4L2_FIELD_SEQ_TB || (field) == V4L2_FIELD_SEQ_BT) +#define V4L2_FIELD_HAS_BOTH(field) \ + ((field) == V4L2_FIELD_INTERLACED || (field) == V4L2_FIELD_INTERLACED_TB || \ + (field) == V4L2_FIELD_INTERLACED_BT || (field) == V4L2_FIELD_SEQ_TB || (field) == V4L2_FIELD_SEQ_BT) +#define V4L2_FIELD_HAS_T_OR_B(field) \ + ((field) == V4L2_FIELD_BOTTOM || (field) == V4L2_FIELD_TOP || (field) == V4L2_FIELD_ALTERNATE) +#define V4L2_FIELD_IS_INTERLACED(field) \ + ((field) == V4L2_FIELD_INTERLACED || (field) == V4L2_FIELD_INTERLACED_TB || (field) == V4L2_FIELD_INTERLACED_BT) +#define V4L2_FIELD_IS_SEQUENTIAL(field) ((field) == V4L2_FIELD_SEQ_TB || (field) == V4L2_FIELD_SEQ_BT) enum v4l2_buf_type { V4L2_BUF_TYPE_VIDEO_CAPTURE = 1, @@ -154,25 +142,18 @@ enum v4l2_buf_type { V4L2_BUF_TYPE_PRIVATE = 0x80, }; -#define V4L2_TYPE_IS_VALID(type) \ - ((type) >= V4L2_BUF_TYPE_VIDEO_CAPTURE && \ - (type) <= V4L2_BUF_TYPE_META_OUTPUT) +#define V4L2_TYPE_IS_VALID(type) ((type) >= V4L2_BUF_TYPE_VIDEO_CAPTURE && (type) <= V4L2_BUF_TYPE_META_OUTPUT) -#define V4L2_TYPE_IS_MULTIPLANAR(type) \ - ((type) == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE || \ - (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) +#define V4L2_TYPE_IS_MULTIPLANAR(type) \ + ((type) == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) -#define V4L2_TYPE_IS_OUTPUT(type) \ - ((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT || \ - (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE || \ - (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY || \ - (type) == V4L2_BUF_TYPE_VBI_OUTPUT || \ - (type) == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT || \ - (type) == V4L2_BUF_TYPE_SDR_OUTPUT || \ +#define V4L2_TYPE_IS_OUTPUT(type) \ + ((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE || \ + (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY || (type) == V4L2_BUF_TYPE_VBI_OUTPUT || \ + (type) == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT || (type) == V4L2_BUF_TYPE_SDR_OUTPUT || \ (type) == V4L2_BUF_TYPE_META_OUTPUT) -#define V4L2_TYPE_IS_CAPTURE(type) \ - (V4L2_TYPE_IS_VALID(type) && !V4L2_TYPE_IS_OUTPUT(type)) +#define V4L2_TYPE_IS_CAPTURE(type) (V4L2_TYPE_IS_VALID(type) && !V4L2_TYPE_IS_OUTPUT(type)) enum v4l2_tuner_type { V4L2_TUNER_RADIO = 1, @@ -255,9 +236,7 @@ enum v4l2_colorspace { * HDTV image (use Rec. 709), or something else (use sRGB). */ #define V4L2_MAP_COLORSPACE_DEFAULT(is_sdtv, is_hdtv) \ - ((is_sdtv) ? \ - V4L2_COLORSPACE_SMPTE170M : \ - ((is_hdtv) ? V4L2_COLORSPACE_REC709 : V4L2_COLORSPACE_SRGB)) + ((is_sdtv) ? V4L2_COLORSPACE_SMPTE170M : ((is_hdtv) ? V4L2_COLORSPACE_REC709 : V4L2_COLORSPACE_SRGB)) enum v4l2_xfer_func { /* @@ -292,19 +271,17 @@ enum v4l2_xfer_func { * Determine how XFER_FUNC_DEFAULT should map to a proper transfer function. * This depends on the colorspace. */ -#define V4L2_MAP_XFER_FUNC_DEFAULT(colsp) \ - ((colsp) == V4L2_COLORSPACE_OPRGB ? \ - V4L2_XFER_FUNC_OPRGB : \ - ((colsp) == V4L2_COLORSPACE_SMPTE240M ? \ - V4L2_XFER_FUNC_SMPTE240M : \ - ((colsp) == V4L2_COLORSPACE_DCI_P3 ? \ - V4L2_XFER_FUNC_DCI_P3 : \ - ((colsp) == V4L2_COLORSPACE_RAW ? \ - V4L2_XFER_FUNC_NONE : \ - ((colsp) == V4L2_COLORSPACE_SRGB || \ - (colsp) == \ - V4L2_COLORSPACE_JPEG ? \ - V4L2_XFER_FUNC_SRGB : \ +#define V4L2_MAP_XFER_FUNC_DEFAULT(colsp) \ + ((colsp) == V4L2_COLORSPACE_OPRGB ? \ + V4L2_XFER_FUNC_OPRGB : \ + ((colsp) == V4L2_COLORSPACE_SMPTE240M ? \ + V4L2_XFER_FUNC_SMPTE240M : \ + ((colsp) == V4L2_COLORSPACE_DCI_P3 ? \ + V4L2_XFER_FUNC_DCI_P3 : \ + ((colsp) == V4L2_COLORSPACE_RAW ? \ + V4L2_XFER_FUNC_NONE : \ + ((colsp) == V4L2_COLORSPACE_SRGB || (colsp) == V4L2_COLORSPACE_JPEG ? \ + V4L2_XFER_FUNC_SRGB : \ V4L2_XFER_FUNC_709))))) enum v4l2_ycbcr_encoding { @@ -370,15 +347,12 @@ enum v4l2_hsv_encoding { * Determine how YCBCR_ENC_DEFAULT should map to a proper Y'CbCr encoding. * This depends on the colorspace. */ -#define V4L2_MAP_YCBCR_ENC_DEFAULT(colsp) \ - (((colsp) == V4L2_COLORSPACE_REC709 || \ - (colsp) == V4L2_COLORSPACE_DCI_P3) ? \ - V4L2_YCBCR_ENC_709 : \ - ((colsp) == V4L2_COLORSPACE_BT2020 ? \ - V4L2_YCBCR_ENC_BT2020 : \ - ((colsp) == V4L2_COLORSPACE_SMPTE240M ? \ - V4L2_YCBCR_ENC_SMPTE240M : \ - V4L2_YCBCR_ENC_601))) +#define V4L2_MAP_YCBCR_ENC_DEFAULT(colsp) \ + (((colsp) == V4L2_COLORSPACE_REC709 || (colsp) == V4L2_COLORSPACE_DCI_P3) ? \ + V4L2_YCBCR_ENC_709 : \ + ((colsp) == V4L2_COLORSPACE_BT2020 ? \ + V4L2_YCBCR_ENC_BT2020 : \ + ((colsp) == V4L2_COLORSPACE_SMPTE240M ? V4L2_YCBCR_ENC_SMPTE240M : V4L2_YCBCR_ENC_601))) enum v4l2_quantization { /* @@ -397,10 +371,9 @@ enum v4l2_quantization { * The Y'CbCr encoding is not used anymore, but is still there for backwards * compatibility. */ -#define V4L2_MAP_QUANTIZATION_DEFAULT(is_rgb_or_hsv, colsp, ycbcr_enc) \ - (((is_rgb_or_hsv) || (colsp) == V4L2_COLORSPACE_JPEG) ? \ - V4L2_QUANTIZATION_FULL_RANGE : \ - V4L2_QUANTIZATION_LIM_RANGE) +#define V4L2_MAP_QUANTIZATION_DEFAULT(is_rgb_or_hsv, colsp, ycbcr_enc) \ + (((is_rgb_or_hsv) || (colsp) == V4L2_COLORSPACE_JPEG) ? V4L2_QUANTIZATION_FULL_RANGE : \ + V4L2_QUANTIZATION_LIM_RANGE) /* * Deprecated names for opRGB colorspace (IEC 61966-2-5) @@ -459,20 +432,17 @@ struct v4l2_capability { }; /* Values for 'capabilities' field */ -#define V4L2_CAP_VIDEO_CAPTURE 0x00000001 /* Is a video capture device */ -#define V4L2_CAP_VIDEO_OUTPUT 0x00000002 /* Is a video output device */ -#define V4L2_CAP_VIDEO_OVERLAY 0x00000004 /* Can do video overlay */ -#define V4L2_CAP_VBI_CAPTURE 0x00000010 /* Is a raw VBI capture device */ -#define V4L2_CAP_VBI_OUTPUT 0x00000020 /* Is a raw VBI output device */ -#define V4L2_CAP_SLICED_VBI_CAPTURE \ - 0x00000040 /* Is a sliced VBI capture device */ -#define V4L2_CAP_SLICED_VBI_OUTPUT \ - 0x00000080 /* Is a sliced VBI output device */ -#define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */ -#define V4L2_CAP_VIDEO_OUTPUT_OVERLAY \ - 0x00000200 /* Can do video output overlay */ -#define V4L2_CAP_HW_FREQ_SEEK 0x00000400 /* Can do hardware frequency seek */ -#define V4L2_CAP_RDS_OUTPUT 0x00000800 /* Is an RDS encoder */ +#define V4L2_CAP_VIDEO_CAPTURE 0x00000001 /* Is a video capture device */ +#define V4L2_CAP_VIDEO_OUTPUT 0x00000002 /* Is a video output device */ +#define V4L2_CAP_VIDEO_OVERLAY 0x00000004 /* Can do video overlay */ +#define V4L2_CAP_VBI_CAPTURE 0x00000010 /* Is a raw VBI capture device */ +#define V4L2_CAP_VBI_OUTPUT 0x00000020 /* Is a raw VBI output device */ +#define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040 /* Is a sliced VBI capture device */ +#define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */ +#define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */ +#define V4L2_CAP_VIDEO_OUTPUT_OVERLAY 0x00000200 /* Can do video output overlay */ +#define V4L2_CAP_HW_FREQ_SEEK 0x00000400 /* Can do hardware frequency seek */ +#define V4L2_CAP_RDS_OUTPUT 0x00000800 /* Is an RDS encoder */ /* Is a video capture device that supports multiplanar formats */ #define V4L2_CAP_VIDEO_CAPTURE_MPLANE 0x00001000 @@ -488,11 +458,10 @@ struct v4l2_capability { #define V4L2_CAP_RADIO 0x00040000 /* is a radio device */ #define V4L2_CAP_MODULATOR 0x00080000 /* has a modulator */ -#define V4L2_CAP_SDR_CAPTURE 0x00100000 /* Is a SDR capture device */ -#define V4L2_CAP_EXT_PIX_FORMAT \ - 0x00200000 /* Supports the extended pixel format */ -#define V4L2_CAP_SDR_OUTPUT 0x00400000 /* Is a SDR output device */ -#define V4L2_CAP_META_CAPTURE 0x00800000 /* Is a metadata capture device */ +#define V4L2_CAP_SDR_CAPTURE 0x00100000 /* Is a SDR capture device */ +#define V4L2_CAP_EXT_PIX_FORMAT 0x00200000 /* Supports the extended pixel format */ +#define V4L2_CAP_SDR_OUTPUT 0x00400000 /* Is a SDR output device */ +#define V4L2_CAP_META_CAPTURE 0x00800000 /* Is a metadata capture device */ #define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */ #define V4L2_CAP_EDID 0x02000000 /* Is an EDID-only device */ @@ -501,8 +470,7 @@ struct v4l2_capability { #define V4L2_CAP_TOUCH 0x10000000 /* Is a touch device */ -#define V4L2_CAP_IO_MC \ - 0x20000000 /* Is input/output controlled by the media controller */ +#define V4L2_CAP_IO_MC 0x20000000 /* Is input/output controlled by the media controller */ #define V4L2_CAP_DEVICE_CAPS 0x80000000 /* sets device capabilities field */ @@ -533,166 +501,97 @@ struct v4l2_pix_format { */ /* RGB formats (1 or 2 bytes per pixel) */ -#define V4L2_PIX_FMT_RGB332 \ - v4l2_fourcc('R', 'G', 'B', '1') /* 8 RGB-3-3-2 */ -#define V4L2_PIX_FMT_RGB444 \ - v4l2_fourcc('R', '4', '4', '4') /* 16 xxxxrrrr ggggbbbb */ -#define V4L2_PIX_FMT_ARGB444 \ - v4l2_fourcc('A', 'R', '1', '2') /* 16 aaaarrrr ggggbbbb */ -#define V4L2_PIX_FMT_XRGB444 \ - v4l2_fourcc('X', 'R', '1', '2') /* 16 xxxxrrrr ggggbbbb */ -#define V4L2_PIX_FMT_RGBA444 \ - v4l2_fourcc('R', 'A', '1', '2') /* 16 rrrrgggg bbbbaaaa */ -#define V4L2_PIX_FMT_RGBX444 \ - v4l2_fourcc('R', 'X', '1', '2') /* 16 rrrrgggg bbbbxxxx */ -#define V4L2_PIX_FMT_ABGR444 \ - v4l2_fourcc('A', 'B', '1', '2') /* 16 aaaabbbb ggggrrrr */ -#define V4L2_PIX_FMT_XBGR444 \ - v4l2_fourcc('X', 'B', '1', '2') /* 16 xxxxbbbb ggggrrrr */ -#define V4L2_PIX_FMT_BGRA444 \ - v4l2_fourcc('G', 'A', '1', '2') /* 16 bbbbgggg rrrraaaa */ -#define V4L2_PIX_FMT_BGRX444 \ - v4l2_fourcc('B', 'X', '1', '2') /* 16 bbbbgggg rrrrxxxx */ -#define V4L2_PIX_FMT_RGB555 \ - v4l2_fourcc('R', 'G', 'B', 'O') /* 16 RGB-5-5-5 */ -#define V4L2_PIX_FMT_ARGB555 \ - v4l2_fourcc('A', 'R', '1', '5') /* 16 ARGB-1-5-5-5 */ -#define V4L2_PIX_FMT_XRGB555 \ - v4l2_fourcc('X', 'R', '1', '5') /* 16 XRGB-1-5-5-5 */ -#define V4L2_PIX_FMT_RGBA555 \ - v4l2_fourcc('R', 'A', '1', '5') /* 16 RGBA-5-5-5-1 */ -#define V4L2_PIX_FMT_RGBX555 \ - v4l2_fourcc('R', 'X', '1', '5') /* 16 RGBX-5-5-5-1 */ -#define V4L2_PIX_FMT_ABGR555 \ - v4l2_fourcc('A', 'B', '1', '5') /* 16 ABGR-1-5-5-5 */ -#define V4L2_PIX_FMT_XBGR555 \ - v4l2_fourcc('X', 'B', '1', '5') /* 16 XBGR-1-5-5-5 */ -#define V4L2_PIX_FMT_BGRA555 \ - v4l2_fourcc('B', 'A', '1', '5') /* 16 BGRA-5-5-5-1 */ -#define V4L2_PIX_FMT_BGRX555 \ - v4l2_fourcc('B', 'X', '1', '5') /* 16 BGRX-5-5-5-1 */ -#define V4L2_PIX_FMT_RGB565 \ - v4l2_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */ -#define V4L2_PIX_FMT_RGB555X \ - v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ -#define V4L2_PIX_FMT_ARGB555X \ - v4l2_fourcc_be('A', 'R', '1', '5') /* 16 ARGB-5-5-5 BE */ -#define V4L2_PIX_FMT_XRGB555X \ - v4l2_fourcc_be('X', 'R', '1', '5') /* 16 XRGB-5-5-5 BE */ -#define V4L2_PIX_FMT_RGB565X \ - v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */ +#define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R', 'G', 'B', '1') /* 8 RGB-3-3-2 */ +#define V4L2_PIX_FMT_RGB444 v4l2_fourcc('R', '4', '4', '4') /* 16 xxxxrrrr ggggbbbb */ +#define V4L2_PIX_FMT_ARGB444 v4l2_fourcc('A', 'R', '1', '2') /* 16 aaaarrrr ggggbbbb */ +#define V4L2_PIX_FMT_XRGB444 v4l2_fourcc('X', 'R', '1', '2') /* 16 xxxxrrrr ggggbbbb */ +#define V4L2_PIX_FMT_RGBA444 v4l2_fourcc('R', 'A', '1', '2') /* 16 rrrrgggg bbbbaaaa */ +#define V4L2_PIX_FMT_RGBX444 v4l2_fourcc('R', 'X', '1', '2') /* 16 rrrrgggg bbbbxxxx */ +#define V4L2_PIX_FMT_ABGR444 v4l2_fourcc('A', 'B', '1', '2') /* 16 aaaabbbb ggggrrrr */ +#define V4L2_PIX_FMT_XBGR444 v4l2_fourcc('X', 'B', '1', '2') /* 16 xxxxbbbb ggggrrrr */ +#define V4L2_PIX_FMT_BGRA444 v4l2_fourcc('G', 'A', '1', '2') /* 16 bbbbgggg rrrraaaa */ +#define V4L2_PIX_FMT_BGRX444 v4l2_fourcc('B', 'X', '1', '2') /* 16 bbbbgggg rrrrxxxx */ +#define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R', 'G', 'B', 'O') /* 16 RGB-5-5-5 */ +#define V4L2_PIX_FMT_ARGB555 v4l2_fourcc('A', 'R', '1', '5') /* 16 ARGB-1-5-5-5 */ +#define V4L2_PIX_FMT_XRGB555 v4l2_fourcc('X', 'R', '1', '5') /* 16 XRGB-1-5-5-5 */ +#define V4L2_PIX_FMT_RGBA555 v4l2_fourcc('R', 'A', '1', '5') /* 16 RGBA-5-5-5-1 */ +#define V4L2_PIX_FMT_RGBX555 v4l2_fourcc('R', 'X', '1', '5') /* 16 RGBX-5-5-5-1 */ +#define V4L2_PIX_FMT_ABGR555 v4l2_fourcc('A', 'B', '1', '5') /* 16 ABGR-1-5-5-5 */ +#define V4L2_PIX_FMT_XBGR555 v4l2_fourcc('X', 'B', '1', '5') /* 16 XBGR-1-5-5-5 */ +#define V4L2_PIX_FMT_BGRA555 v4l2_fourcc('B', 'A', '1', '5') /* 16 BGRA-5-5-5-1 */ +#define V4L2_PIX_FMT_BGRX555 v4l2_fourcc('B', 'X', '1', '5') /* 16 BGRX-5-5-5-1 */ +#define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */ +#define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ +#define V4L2_PIX_FMT_ARGB555X v4l2_fourcc_be('A', 'R', '1', '5') /* 16 ARGB-5-5-5 BE */ +#define V4L2_PIX_FMT_XRGB555X v4l2_fourcc_be('X', 'R', '1', '5') /* 16 XRGB-5-5-5 BE */ +#define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */ /* RGB formats (3 or 4 bytes per pixel) */ -#define V4L2_PIX_FMT_BGR666 \ - v4l2_fourcc('B', 'G', 'R', 'H') /* 18 BGR-6-6-6 */ -#define V4L2_PIX_FMT_BGR24 \ - v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */ -#define V4L2_PIX_FMT_RGB24 \ - v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */ -#define V4L2_PIX_FMT_BGR32 \ - v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */ -#define V4L2_PIX_FMT_ABGR32 \ - v4l2_fourcc('A', 'R', '2', '4') /* 32 BGRA-8-8-8-8 */ -#define V4L2_PIX_FMT_XBGR32 \ - v4l2_fourcc('X', 'R', '2', '4') /* 32 BGRX-8-8-8-8 */ -#define V4L2_PIX_FMT_BGRA32 \ - v4l2_fourcc('R', 'A', '2', '4') /* 32 ABGR-8-8-8-8 */ -#define V4L2_PIX_FMT_BGRX32 \ - v4l2_fourcc('R', 'X', '2', '4') /* 32 XBGR-8-8-8-8 */ -#define V4L2_PIX_FMT_RGB32 \ - v4l2_fourcc('R', 'G', 'B', '4') /* 32 RGB-8-8-8-8 */ -#define V4L2_PIX_FMT_RGBA32 \ - v4l2_fourcc('A', 'B', '2', '4') /* 32 RGBA-8-8-8-8 */ -#define V4L2_PIX_FMT_RGBX32 \ - v4l2_fourcc('X', 'B', '2', '4') /* 32 RGBX-8-8-8-8 */ -#define V4L2_PIX_FMT_ARGB32 \ - v4l2_fourcc('B', 'A', '2', '4') /* 32 ARGB-8-8-8-8 */ -#define V4L2_PIX_FMT_XRGB32 \ - v4l2_fourcc('B', 'X', '2', '4') /* 32 XRGB-8-8-8-8 */ -#define V4L2_PIX_FMT_RGBX1010102 \ - v4l2_fourcc('R', 'X', '3', '0') /* 32 RGBX-10-10-10-2 */ -#define V4L2_PIX_FMT_RGBA1010102 \ - v4l2_fourcc('R', 'A', '3', '0') /* 32 RGBA-10-10-10-2 */ -#define V4L2_PIX_FMT_ARGB2101010 \ - v4l2_fourcc('A', 'R', '3', '0') /* 32 ARGB-2-10-10-10 */ +#define V4L2_PIX_FMT_BGR666 v4l2_fourcc('B', 'G', 'R', 'H') /* 18 BGR-6-6-6 */ +#define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */ +#define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */ +#define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */ +#define V4L2_PIX_FMT_ABGR32 v4l2_fourcc('A', 'R', '2', '4') /* 32 BGRA-8-8-8-8 */ +#define V4L2_PIX_FMT_XBGR32 v4l2_fourcc('X', 'R', '2', '4') /* 32 BGRX-8-8-8-8 */ +#define V4L2_PIX_FMT_BGRA32 v4l2_fourcc('R', 'A', '2', '4') /* 32 ABGR-8-8-8-8 */ +#define V4L2_PIX_FMT_BGRX32 v4l2_fourcc('R', 'X', '2', '4') /* 32 XBGR-8-8-8-8 */ +#define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R', 'G', 'B', '4') /* 32 RGB-8-8-8-8 */ +#define V4L2_PIX_FMT_RGBA32 v4l2_fourcc('A', 'B', '2', '4') /* 32 RGBA-8-8-8-8 */ +#define V4L2_PIX_FMT_RGBX32 v4l2_fourcc('X', 'B', '2', '4') /* 32 RGBX-8-8-8-8 */ +#define V4L2_PIX_FMT_ARGB32 v4l2_fourcc('B', 'A', '2', '4') /* 32 ARGB-8-8-8-8 */ +#define V4L2_PIX_FMT_XRGB32 v4l2_fourcc('B', 'X', '2', '4') /* 32 XRGB-8-8-8-8 */ +#define V4L2_PIX_FMT_RGBX1010102 v4l2_fourcc('R', 'X', '3', '0') /* 32 RGBX-10-10-10-2 */ +#define V4L2_PIX_FMT_RGBA1010102 v4l2_fourcc('R', 'A', '3', '0') /* 32 RGBA-10-10-10-2 */ +#define V4L2_PIX_FMT_ARGB2101010 v4l2_fourcc('A', 'R', '3', '0') /* 32 ARGB-2-10-10-10 */ /* RGB formats (6 or 8 bytes per pixel) */ -#define V4L2_PIX_FMT_BGR48_12 \ - v4l2_fourcc('B', '3', '1', '2') /* 48 BGR 12-bit per component */ -#define V4L2_PIX_FMT_BGR48 \ - v4l2_fourcc('B', 'G', 'R', '6') /* 48 BGR 16-bit per component */ -#define V4L2_PIX_FMT_RGB48 \ - v4l2_fourcc('R', 'G', 'B', '6') /* 48 RGB 16-bit per component */ -#define V4L2_PIX_FMT_ABGR64_12 \ - v4l2_fourcc('B', '4', '1', '2') /* 64 BGRA 12-bit per component */ +#define V4L2_PIX_FMT_BGR48_12 v4l2_fourcc('B', '3', '1', '2') /* 48 BGR 12-bit per component */ +#define V4L2_PIX_FMT_BGR48 v4l2_fourcc('B', 'G', 'R', '6') /* 48 BGR 16-bit per component */ +#define V4L2_PIX_FMT_RGB48 v4l2_fourcc('R', 'G', 'B', '6') /* 48 RGB 16-bit per component */ +#define V4L2_PIX_FMT_ABGR64_12 v4l2_fourcc('B', '4', '1', '2') /* 64 BGRA 12-bit per component */ /* Grey formats */ -#define V4L2_PIX_FMT_GREY \ - v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */ -#define V4L2_PIX_FMT_Y4 v4l2_fourcc('Y', '0', '4', ' ') /* 4 Greyscale */ -#define V4L2_PIX_FMT_Y6 v4l2_fourcc('Y', '0', '6', ' ') /* 6 Greyscale */ -#define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */ -#define V4L2_PIX_FMT_Y12 v4l2_fourcc('Y', '1', '2', ' ') /* 12 Greyscale */ -#define V4L2_PIX_FMT_Y012 \ - v4l2_fourcc('Y', '0', '1', '2') /* 12 Greyscale */ -#define V4L2_PIX_FMT_Y14 v4l2_fourcc('Y', '1', '4', ' ') /* 14 Greyscale */ -#define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ -#define V4L2_PIX_FMT_Y16_BE \ - v4l2_fourcc_be('Y', '1', '6', ' ') /* 16 Greyscale BE */ +#define V4L2_PIX_FMT_GREY v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */ +#define V4L2_PIX_FMT_Y4 v4l2_fourcc('Y', '0', '4', ' ') /* 4 Greyscale */ +#define V4L2_PIX_FMT_Y6 v4l2_fourcc('Y', '0', '6', ' ') /* 6 Greyscale */ +#define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */ +#define V4L2_PIX_FMT_Y12 v4l2_fourcc('Y', '1', '2', ' ') /* 12 Greyscale */ +#define V4L2_PIX_FMT_Y012 v4l2_fourcc('Y', '0', '1', '2') /* 12 Greyscale */ +#define V4L2_PIX_FMT_Y14 v4l2_fourcc('Y', '1', '4', ' ') /* 14 Greyscale */ +#define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ +#define V4L2_PIX_FMT_Y16_BE v4l2_fourcc_be('Y', '1', '6', ' ') /* 16 Greyscale BE */ /* Grey bit-packed formats */ -#define V4L2_PIX_FMT_Y10BPACK \ - v4l2_fourcc('Y', '1', '0', 'B') /* 10 Greyscale bit-packed */ -#define V4L2_PIX_FMT_Y10P \ - v4l2_fourcc('Y', '1', '0', 'P') /* 10 Greyscale, MIPI RAW10 packed */ -#define V4L2_PIX_FMT_IPU3_Y10 \ - v4l2_fourcc('i', 'p', '3', 'y') /* IPU3 packed 10-bit greyscale */ -#define V4L2_PIX_FMT_Y12P \ - v4l2_fourcc('Y', '1', '2', 'P') /* 12 Greyscale, MIPI RAW12 packed */ -#define V4L2_PIX_FMT_Y14P \ - v4l2_fourcc('Y', '1', '4', 'P') /* 14 Greyscale, MIPI RAW14 packed */ +#define V4L2_PIX_FMT_Y10BPACK v4l2_fourcc('Y', '1', '0', 'B') /* 10 Greyscale bit-packed */ +#define V4L2_PIX_FMT_Y10P v4l2_fourcc('Y', '1', '0', 'P') /* 10 Greyscale, MIPI RAW10 packed */ +#define V4L2_PIX_FMT_IPU3_Y10 v4l2_fourcc('i', 'p', '3', 'y') /* IPU3 packed 10-bit greyscale */ +#define V4L2_PIX_FMT_Y12P v4l2_fourcc('Y', '1', '2', 'P') /* 12 Greyscale, MIPI RAW12 packed */ +#define V4L2_PIX_FMT_Y14P v4l2_fourcc('Y', '1', '4', 'P') /* 14 Greyscale, MIPI RAW14 packed */ /* Palette formats */ -#define V4L2_PIX_FMT_PAL8 \ - v4l2_fourcc('P', 'A', 'L', '8') /* 8 8-bit palette */ +#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_YUYV \ - v4l2_fourcc('Y', 'U', 'Y', 'V') /* 16 YUV 4:2:2 */ -#define V4L2_PIX_FMT_YYUV \ - v4l2_fourcc('Y', 'Y', 'U', 'V') /* 16 YUV 4:2:2 */ -#define V4L2_PIX_FMT_YVYU v4l2_fourcc('Y', 'V', 'Y', 'U') /* 16 YVU 4:2:2 */ -#define V4L2_PIX_FMT_UYVY \ - v4l2_fourcc('U', 'Y', 'V', 'Y') /* 16 YUV 4:2:2 */ -#define V4L2_PIX_FMT_VYUY \ - v4l2_fourcc('V', 'Y', 'U', 'Y') /* 16 YUV 4:2:2 */ -#define V4L2_PIX_FMT_Y41P \ - v4l2_fourcc('Y', '4', '1', 'P') /* 12 YUV 4:1:1 */ -#define V4L2_PIX_FMT_YUV444 \ - v4l2_fourcc('Y', '4', '4', '4') /* 16 xxxxyyyy uuuuvvvv */ -#define V4L2_PIX_FMT_YUV555 \ - v4l2_fourcc('Y', 'U', 'V', 'O') /* 16 YUV-5-5-5 */ -#define V4L2_PIX_FMT_YUV565 \ - v4l2_fourcc('Y', 'U', 'V', 'P') /* 16 YUV-5-6-5 */ -#define V4L2_PIX_FMT_YUV24 \ - v4l2_fourcc('Y', 'U', 'V', '3') /* 24 YUV-8-8-8 */ -#define V4L2_PIX_FMT_YUV32 \ - v4l2_fourcc('Y', 'U', 'V', '4') /* 32 YUV-8-8-8-8 */ -#define V4L2_PIX_FMT_AYUV32 \ - v4l2_fourcc('A', 'Y', 'U', 'V') /* 32 AYUV-8-8-8-8 */ -#define V4L2_PIX_FMT_XYUV32 \ - v4l2_fourcc('X', 'Y', 'U', 'V') /* 32 XYUV-8-8-8-8 */ -#define V4L2_PIX_FMT_VUYA32 \ - v4l2_fourcc('V', 'U', 'Y', 'A') /* 32 VUYA-8-8-8-8 */ -#define V4L2_PIX_FMT_VUYX32 \ - v4l2_fourcc('V', 'U', 'Y', 'X') /* 32 VUYX-8-8-8-8 */ -#define V4L2_PIX_FMT_YUVA32 \ - v4l2_fourcc('Y', 'U', 'V', 'A') /* 32 YUVA-8-8-8-8 */ -#define V4L2_PIX_FMT_YUVX32 \ - v4l2_fourcc('Y', 'U', 'V', 'X') /* 32 YUVX-8-8-8-8 */ +#define V4L2_PIX_FMT_YUYV v4l2_fourcc('Y', 'U', 'Y', 'V') /* 16 YUV 4:2:2 */ +#define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y', 'Y', 'U', 'V') /* 16 YUV 4:2:2 */ +#define V4L2_PIX_FMT_YVYU v4l2_fourcc('Y', 'V', 'Y', 'U') /* 16 YVU 4:2:2 */ +#define V4L2_PIX_FMT_UYVY v4l2_fourcc('U', 'Y', 'V', 'Y') /* 16 YUV 4:2:2 */ +#define V4L2_PIX_FMT_VYUY v4l2_fourcc('V', 'Y', 'U', 'Y') /* 16 YUV 4:2:2 */ +#define V4L2_PIX_FMT_Y41P v4l2_fourcc('Y', '4', '1', 'P') /* 12 YUV 4:1:1 */ +#define V4L2_PIX_FMT_YUV444 v4l2_fourcc('Y', '4', '4', '4') /* 16 xxxxyyyy uuuuvvvv */ +#define V4L2_PIX_FMT_YUV555 v4l2_fourcc('Y', 'U', 'V', 'O') /* 16 YUV-5-5-5 */ +#define V4L2_PIX_FMT_YUV565 v4l2_fourcc('Y', 'U', 'V', 'P') /* 16 YUV-5-6-5 */ +#define V4L2_PIX_FMT_YUV24 v4l2_fourcc('Y', 'U', 'V', '3') /* 24 YUV-8-8-8 */ +#define V4L2_PIX_FMT_YUV32 v4l2_fourcc('Y', 'U', 'V', '4') /* 32 YUV-8-8-8-8 */ +#define V4L2_PIX_FMT_AYUV32 v4l2_fourcc('A', 'Y', 'U', 'V') /* 32 AYUV-8-8-8-8 */ +#define V4L2_PIX_FMT_XYUV32 v4l2_fourcc('X', 'Y', 'U', 'V') /* 32 XYUV-8-8-8-8 */ +#define V4L2_PIX_FMT_VUYA32 v4l2_fourcc('V', 'U', 'Y', 'A') /* 32 VUYA-8-8-8-8 */ +#define V4L2_PIX_FMT_VUYX32 v4l2_fourcc('V', 'U', 'Y', 'X') /* 32 VUYX-8-8-8-8 */ +#define V4L2_PIX_FMT_YUVA32 v4l2_fourcc('Y', 'U', 'V', 'A') /* 32 YUVA-8-8-8-8 */ +#define V4L2_PIX_FMT_YUVX32 v4l2_fourcc('Y', 'U', 'V', 'X') /* 32 YUVX-8-8-8-8 */ #define V4L2_PIX_FMT_M420 \ v4l2_fourcc('M', '4', '2', '0') /* 12 YUV 4:2:0 2 lines y, 1 line uv \ interleaved */ @@ -710,22 +609,14 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_Y216 v4l2_fourcc('Y', '2', '1', '6') /* 32 YUYV 4:2:2 */ /* two planes -- one Y, one Cr + Cb interleaved */ -#define V4L2_PIX_FMT_NV12 \ - v4l2_fourcc('N', 'V', '1', '2') /* 12 Y/CbCr 4:2:0 */ -#define V4L2_PIX_FMT_NV21 \ - v4l2_fourcc('N', 'V', '2', '1') /* 12 Y/CrCb 4:2:0 */ -#define V4L2_PIX_FMT_NV15 \ - v4l2_fourcc('N', 'V', '1', '5') /* 15 Y/CbCr 4:2:0 10-bit packed */ -#define V4L2_PIX_FMT_NV16 \ - v4l2_fourcc('N', 'V', '1', '6') /* 16 Y/CbCr 4:2:2 */ -#define V4L2_PIX_FMT_NV61 \ - v4l2_fourcc('N', 'V', '6', '1') /* 16 Y/CrCb 4:2:2 */ -#define V4L2_PIX_FMT_NV20 \ - v4l2_fourcc('N', 'V', '2', '0') /* 20 Y/CbCr 4:2:2 10-bit packed */ -#define V4L2_PIX_FMT_NV24 \ - v4l2_fourcc('N', 'V', '2', '4') /* 24 Y/CbCr 4:4:4 */ -#define V4L2_PIX_FMT_NV42 \ - v4l2_fourcc('N', 'V', '4', '2') /* 24 Y/CrCb 4:4:4 */ +#define V4L2_PIX_FMT_NV12 v4l2_fourcc('N', 'V', '1', '2') /* 12 Y/CbCr 4:2:0 */ +#define V4L2_PIX_FMT_NV21 v4l2_fourcc('N', 'V', '2', '1') /* 12 Y/CrCb 4:2:0 */ +#define V4L2_PIX_FMT_NV15 v4l2_fourcc('N', 'V', '1', '5') /* 15 Y/CbCr 4:2:0 10-bit packed */ +#define V4L2_PIX_FMT_NV16 v4l2_fourcc('N', 'V', '1', '6') /* 16 Y/CbCr 4:2:2 */ +#define V4L2_PIX_FMT_NV61 v4l2_fourcc('N', 'V', '6', '1') /* 16 Y/CrCb 4:2:2 */ +#define V4L2_PIX_FMT_NV20 v4l2_fourcc('N', 'V', '2', '0') /* 20 Y/CbCr 4:2:2 10-bit packed */ +#define V4L2_PIX_FMT_NV24 v4l2_fourcc('N', 'V', '2', '4') /* 24 Y/CbCr 4:4:4 */ +#define V4L2_PIX_FMT_NV42 v4l2_fourcc('N', 'V', '4', '2') /* 24 Y/CrCb 4:4:4 */ #define V4L2_PIX_FMT_P010 \ v4l2_fourcc('P', '0', '1', '0') /* 24 Y/CbCr 4:2:0 10-bit per \ component */ @@ -734,92 +625,60 @@ struct v4l2_pix_format { component */ /* 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_NV16M \ - v4l2_fourcc('N', 'M', '1', '6') /* 16 Y/CbCr 4:2:2 */ -#define V4L2_PIX_FMT_NV61M \ - v4l2_fourcc('N', 'M', '6', '1') /* 16 Y/CrCb 4:2:2 */ +#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_NV16M v4l2_fourcc('N', 'M', '1', '6') /* 16 Y/CbCr 4:2:2 */ +#define V4L2_PIX_FMT_NV61M v4l2_fourcc('N', 'M', '6', '1') /* 16 Y/CrCb 4:2:2 */ #define V4L2_PIX_FMT_P012M \ v4l2_fourcc('P', 'M', '1', '2') /* 24 Y/CbCr 4:2:0 12-bit per \ component */ /* three planes - Y Cb, Cr */ -#define V4L2_PIX_FMT_YUV410 \ - v4l2_fourcc('Y', 'U', 'V', '9') /* 9 YUV 4:1:0 */ -#define V4L2_PIX_FMT_YVU410 \ - v4l2_fourcc('Y', 'V', 'U', '9') /* 9 YVU 4:1:0 */ -#define V4L2_PIX_FMT_YUV411P \ - v4l2_fourcc('4', '1', '1', 'P') /* 12 YVU411 planar */ -#define V4L2_PIX_FMT_YUV420 \ - v4l2_fourcc('Y', 'U', '1', '2') /* 12 YUV 4:2:0 */ -#define V4L2_PIX_FMT_YVU420 \ - v4l2_fourcc('Y', 'V', '1', '2') /* 12 YVU 4:2:0 */ -#define V4L2_PIX_FMT_YUV422P \ - v4l2_fourcc('4', '2', '2', 'P') /* 16 YVU422 planar */ +#define V4L2_PIX_FMT_YUV410 v4l2_fourcc('Y', 'U', 'V', '9') /* 9 YUV 4:1:0 */ +#define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y', 'V', 'U', '9') /* 9 YVU 4:1:0 */ +#define V4L2_PIX_FMT_YUV411P v4l2_fourcc('4', '1', '1', 'P') /* 12 YVU411 planar */ +#define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y', 'U', '1', '2') /* 12 YUV 4:2:0 */ +#define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y', 'V', '1', '2') /* 12 YVU 4:2:0 */ +#define V4L2_PIX_FMT_YUV422P v4l2_fourcc('4', '2', '2', 'P') /* 16 YVU422 planar */ /* 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 */ -#define V4L2_PIX_FMT_YUV422M \ - v4l2_fourcc('Y', 'M', '1', '6') /* 16 YUV422 planar */ -#define V4L2_PIX_FMT_YVU422M \ - v4l2_fourcc('Y', 'M', '6', '1') /* 16 YVU422 planar */ -#define V4L2_PIX_FMT_YUV444M \ - v4l2_fourcc('Y', 'M', '2', '4') /* 24 YUV444 planar */ -#define V4L2_PIX_FMT_YVU444M \ - v4l2_fourcc('Y', 'M', '4', '2') /* 24 YVU444 planar */ +#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 */ +#define V4L2_PIX_FMT_YUV422M v4l2_fourcc('Y', 'M', '1', '6') /* 16 YUV422 planar */ +#define V4L2_PIX_FMT_YVU422M v4l2_fourcc('Y', 'M', '6', '1') /* 16 YVU422 planar */ +#define V4L2_PIX_FMT_YUV444M v4l2_fourcc('Y', 'M', '2', '4') /* 24 YUV444 planar */ +#define V4L2_PIX_FMT_YVU444M v4l2_fourcc('Y', 'M', '4', '2') /* 24 YVU444 planar */ /* Tiled YUV formats */ -#define V4L2_PIX_FMT_NV12_4L4 \ - v4l2_fourcc('V', 'T', '1', '2') /* 12 Y/CbCr 4:2:0 4x4 tiles */ -#define V4L2_PIX_FMT_NV12_16L16 \ - v4l2_fourcc('H', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 16x16 tiles */ -#define V4L2_PIX_FMT_NV12_32L32 \ - v4l2_fourcc('S', 'T', '1', '2') /* 12 Y/CbCr 4:2:0 32x32 tiles */ -#define V4L2_PIX_FMT_NV15_4L4 \ - v4l2_fourcc('V', 'T', '1', '5') /* 15 Y/CbCr 4:2:0 10-bit 4x4 tiles */ -#define V4L2_PIX_FMT_P010_4L4 \ - v4l2_fourcc('T', '0', '1', '0') /* 12 Y/CbCr 4:2:0 10-bit 4x4 \ - macroblocks */ -#define V4L2_PIX_FMT_NV12_8L128 \ - v4l2_fourcc('A', 'T', '1', '2') /* Y/CbCr 4:2:0 8x128 tiles */ +#define V4L2_PIX_FMT_NV12_4L4 v4l2_fourcc('V', 'T', '1', '2') /* 12 Y/CbCr 4:2:0 4x4 tiles */ +#define V4L2_PIX_FMT_NV12_16L16 v4l2_fourcc('H', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 16x16 tiles */ +#define V4L2_PIX_FMT_NV12_32L32 v4l2_fourcc('S', 'T', '1', '2') /* 12 Y/CbCr 4:2:0 32x32 tiles */ +#define V4L2_PIX_FMT_NV15_4L4 v4l2_fourcc('V', 'T', '1', '5') /* 15 Y/CbCr 4:2:0 10-bit 4x4 tiles */ +#define V4L2_PIX_FMT_P010_4L4 \ + v4l2_fourcc('T', '0', '1', '0') /* 12 Y/CbCr 4:2:0 10-bit 4x4 \ + macroblocks */ +#define V4L2_PIX_FMT_NV12_8L128 v4l2_fourcc('A', 'T', '1', '2') /* Y/CbCr 4:2:0 8x128 tiles */ #define V4L2_PIX_FMT_NV12_10BE_8L128 \ v4l2_fourcc_be('A', 'X', '1', '2') /* Y/CbCr 4:2:0 10-bit 8x128 tiles \ */ /* Tiled YUV formats, non contiguous planes */ -#define V4L2_PIX_FMT_NV12MT \ - v4l2_fourcc('T', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 64x32 tiles */ -#define V4L2_PIX_FMT_NV12MT_16X16 \ - v4l2_fourcc('V', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 16x16 tiles */ -#define V4L2_PIX_FMT_NV12M_8L128 \ - v4l2_fourcc('N', 'A', '1', '2') /* Y/CbCr 4:2:0 8x128 tiles */ +#define V4L2_PIX_FMT_NV12MT v4l2_fourcc('T', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 64x32 tiles */ +#define V4L2_PIX_FMT_NV12MT_16X16 v4l2_fourcc('V', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 16x16 tiles */ +#define V4L2_PIX_FMT_NV12M_8L128 v4l2_fourcc('N', 'A', '1', '2') /* Y/CbCr 4:2:0 8x128 tiles */ #define V4L2_PIX_FMT_NV12M_10BE_8L128 \ v4l2_fourcc_be('N', 'T', '1', '2') /* Y/CbCr 4:2:0 10-bit 8x128 tiles \ */ /* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */ -#define V4L2_PIX_FMT_SBGGR8 \ - v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */ -#define V4L2_PIX_FMT_SGBRG8 \ - v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */ -#define V4L2_PIX_FMT_SGRBG8 \ - v4l2_fourcc('G', 'R', 'B', 'G') /* 8 GRGR.. BGBG.. */ -#define V4L2_PIX_FMT_SRGGB8 \ - v4l2_fourcc('R', 'G', 'G', 'B') /* 8 RGRG.. GBGB.. */ -#define V4L2_PIX_FMT_SBGGR10 \ - v4l2_fourcc('B', 'G', '1', '0') /* 10 BGBG.. GRGR.. */ -#define V4L2_PIX_FMT_SGBRG10 \ - v4l2_fourcc('G', 'B', '1', '0') /* 10 GBGB.. RGRG.. */ -#define V4L2_PIX_FMT_SGRBG10 \ - v4l2_fourcc('B', 'A', '1', '0') /* 10 GRGR.. BGBG.. */ -#define V4L2_PIX_FMT_SRGGB10 \ - v4l2_fourcc('R', 'G', '1', '0') /* 10 RGRG.. GBGB.. */ +#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */ +#define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */ +#define V4L2_PIX_FMT_SGRBG8 v4l2_fourcc('G', 'R', 'B', 'G') /* 8 GRGR.. BGBG.. */ +#define V4L2_PIX_FMT_SRGGB8 v4l2_fourcc('R', 'G', 'G', 'B') /* 8 RGRG.. GBGB.. */ +#define V4L2_PIX_FMT_SBGGR10 v4l2_fourcc('B', 'G', '1', '0') /* 10 BGBG.. GRGR.. */ +#define V4L2_PIX_FMT_SGBRG10 v4l2_fourcc('G', 'B', '1', '0') /* 10 GBGB.. RGRG.. */ +#define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0') /* 10 GRGR.. BGBG.. */ +#define V4L2_PIX_FMT_SRGGB10 v4l2_fourcc('R', 'G', '1', '0') /* 10 RGRG.. GBGB.. */ /* 10bit raw bayer packed, 5 bytes for every 4 pixels */ #define V4L2_PIX_FMT_SBGGR10P v4l2_fourcc('p', 'B', 'A', 'A') #define V4L2_PIX_FMT_SGBRG10P v4l2_fourcc('p', 'G', 'A', 'A') @@ -835,131 +694,98 @@ struct v4l2_pix_format { #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') -#define V4L2_PIX_FMT_SBGGR12 \ - v4l2_fourcc('B', 'G', '1', '2') /* 12 BGBG.. GRGR.. */ -#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.. */ +#define V4L2_PIX_FMT_SBGGR12 v4l2_fourcc('B', 'G', '1', '2') /* 12 BGBG.. GRGR.. */ +#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.. */ /* 12bit raw bayer packed, 3 bytes for every 2 pixels */ #define V4L2_PIX_FMT_SBGGR12P v4l2_fourcc('p', 'B', 'C', 'C') #define V4L2_PIX_FMT_SGBRG12P v4l2_fourcc('p', 'G', 'C', 'C') #define V4L2_PIX_FMT_SGRBG12P v4l2_fourcc('p', 'g', 'C', 'C') #define V4L2_PIX_FMT_SRGGB12P v4l2_fourcc('p', 'R', 'C', 'C') -#define V4L2_PIX_FMT_SBGGR14 \ - v4l2_fourcc('B', 'G', '1', '4') /* 14 BGBG.. GRGR.. */ -#define V4L2_PIX_FMT_SGBRG14 \ - v4l2_fourcc('G', 'B', '1', '4') /* 14 GBGB.. RGRG.. */ -#define V4L2_PIX_FMT_SGRBG14 \ - v4l2_fourcc('G', 'R', '1', '4') /* 14 GRGR.. BGBG.. */ -#define V4L2_PIX_FMT_SRGGB14 \ - v4l2_fourcc('R', 'G', '1', '4') /* 14 RGRG.. GBGB.. */ +#define V4L2_PIX_FMT_SBGGR14 v4l2_fourcc('B', 'G', '1', '4') /* 14 BGBG.. GRGR.. */ +#define V4L2_PIX_FMT_SGBRG14 v4l2_fourcc('G', 'B', '1', '4') /* 14 GBGB.. RGRG.. */ +#define V4L2_PIX_FMT_SGRBG14 v4l2_fourcc('G', 'R', '1', '4') /* 14 GRGR.. BGBG.. */ +#define V4L2_PIX_FMT_SRGGB14 v4l2_fourcc('R', 'G', '1', '4') /* 14 RGRG.. GBGB.. */ /* 14bit raw bayer packed, 7 bytes for every 4 pixels */ #define V4L2_PIX_FMT_SBGGR14P v4l2_fourcc('p', 'B', 'E', 'E') #define V4L2_PIX_FMT_SGBRG14P v4l2_fourcc('p', 'G', 'E', 'E') #define V4L2_PIX_FMT_SGRBG14P v4l2_fourcc('p', 'g', 'E', 'E') #define V4L2_PIX_FMT_SRGGB14P v4l2_fourcc('p', 'R', 'E', 'E') -#define V4L2_PIX_FMT_SBGGR16 \ - v4l2_fourcc('B', 'Y', 'R', '2') /* 16 BGBG.. GRGR.. */ -#define V4L2_PIX_FMT_SGBRG16 \ - v4l2_fourcc('G', 'B', '1', '6') /* 16 GBGB.. RGRG.. */ -#define V4L2_PIX_FMT_SGRBG16 \ - v4l2_fourcc('G', 'R', '1', '6') /* 16 GRGR.. BGBG.. */ -#define V4L2_PIX_FMT_SRGGB16 \ - v4l2_fourcc('R', 'G', '1', '6') /* 16 RGRG.. GBGB.. */ +#define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2') /* 16 BGBG.. GRGR.. */ +#define V4L2_PIX_FMT_SGBRG16 v4l2_fourcc('G', 'B', '1', '6') /* 16 GBGB.. RGRG.. */ +#define V4L2_PIX_FMT_SGRBG16 v4l2_fourcc('G', 'R', '1', '6') /* 16 GRGR.. BGBG.. */ +#define V4L2_PIX_FMT_SRGGB16 v4l2_fourcc('R', 'G', '1', '6') /* 16 RGRG.. GBGB.. */ /* HSV formats */ #define V4L2_PIX_FMT_HSV24 v4l2_fourcc('H', 'S', 'V', '3') #define V4L2_PIX_FMT_HSV32 v4l2_fourcc('H', 'S', 'V', '4') /* compressed formats */ -#define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M', 'J', 'P', 'G') /* Motion-JPEG */ -#define V4L2_PIX_FMT_JPEG v4l2_fourcc('J', 'P', 'E', 'G') /* JFIF JPEG */ -#define V4L2_PIX_FMT_DV v4l2_fourcc('d', 'v', 's', 'd') /* 1394 */ -#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 */ -#define V4L2_PIX_FMT_MPEG2_SLICE \ - v4l2_fourcc('M', 'G', '2', 'S') /* MPEG-2 parsed slice data */ -#define V4L2_PIX_FMT_MPEG4 \ - v4l2_fourcc('M', 'P', 'G', '4') /* MPEG-4 part 2 ES */ -#define V4L2_PIX_FMT_XVID v4l2_fourcc('X', 'V', 'I', 'D') /* Xvid */ +#define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M', 'J', 'P', 'G') /* Motion-JPEG */ +#define V4L2_PIX_FMT_JPEG v4l2_fourcc('J', 'P', 'E', 'G') /* JFIF JPEG */ +#define V4L2_PIX_FMT_DV v4l2_fourcc('d', 'v', 's', 'd') /* 1394 */ +#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 */ +#define V4L2_PIX_FMT_MPEG2_SLICE v4l2_fourcc('M', 'G', '2', 'S') /* MPEG-2 parsed slice data */ +#define V4L2_PIX_FMT_MPEG4 v4l2_fourcc('M', 'P', 'G', '4') /* MPEG-4 part 2 ES */ +#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 */ -#define V4L2_PIX_FMT_VP8_FRAME \ - v4l2_fourcc('V', 'P', '8', 'F') /* VP8 parsed frame */ -#define V4L2_PIX_FMT_VP9 v4l2_fourcc('V', 'P', '9', '0') /* VP9 */ -#define V4L2_PIX_FMT_VP9_FRAME \ - v4l2_fourcc('V', 'P', '9', 'F') /* VP9 parsed frame */ -#define V4L2_PIX_FMT_HEVC v4l2_fourcc('H', 'E', 'V', 'C') /* HEVC aka H.265 */ -#define V4L2_PIX_FMT_FWHT \ - v4l2_fourcc('F', 'W', 'H', 'T') /* Fast Walsh Hadamard Transform \ - (vicodec) */ -#define V4L2_PIX_FMT_FWHT_STATELESS \ - v4l2_fourcc('S', 'F', 'W', 'H') /* Stateless FWHT (vicodec) */ -#define V4L2_PIX_FMT_H264_SLICE \ - v4l2_fourcc('S', '2', '6', '4') /* H264 parsed slices */ -#define V4L2_PIX_FMT_HEVC_SLICE \ - v4l2_fourcc('S', '2', '6', '5') /* HEVC parsed slices */ -#define V4L2_PIX_FMT_AV1_FRAME \ - v4l2_fourcc('A', 'V', '1', 'F') /* AV1 parsed frame */ -#define V4L2_PIX_FMT_SPK v4l2_fourcc('S', 'P', 'K', '0') /* Sorenson Spark */ -#define V4L2_PIX_FMT_RV30 v4l2_fourcc('R', 'V', '3', '0') /* RealVideo 8 */ +#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 */ +#define V4L2_PIX_FMT_VP8_FRAME v4l2_fourcc('V', 'P', '8', 'F') /* VP8 parsed frame */ +#define V4L2_PIX_FMT_VP9 v4l2_fourcc('V', 'P', '9', '0') /* VP9 */ +#define V4L2_PIX_FMT_VP9_FRAME v4l2_fourcc('V', 'P', '9', 'F') /* VP9 parsed frame */ +#define V4L2_PIX_FMT_HEVC v4l2_fourcc('H', 'E', 'V', 'C') /* HEVC aka H.265 */ +#define V4L2_PIX_FMT_FWHT \ + v4l2_fourcc('F', 'W', 'H', 'T') /* Fast Walsh Hadamard Transform \ + (vicodec) */ +#define V4L2_PIX_FMT_FWHT_STATELESS v4l2_fourcc('S', 'F', 'W', 'H') /* Stateless FWHT (vicodec) */ +#define V4L2_PIX_FMT_H264_SLICE v4l2_fourcc('S', '2', '6', '4') /* H264 parsed slices */ +#define V4L2_PIX_FMT_HEVC_SLICE v4l2_fourcc('S', '2', '6', '5') /* HEVC parsed slices */ +#define V4L2_PIX_FMT_AV1_FRAME v4l2_fourcc('A', 'V', '1', 'F') /* AV1 parsed frame */ +#define V4L2_PIX_FMT_SPK v4l2_fourcc('S', 'P', 'K', '0') /* Sorenson Spark */ +#define V4L2_PIX_FMT_RV30 v4l2_fourcc('R', 'V', '3', '0') /* RealVideo 8 */ #define V4L2_PIX_FMT_RV40 \ v4l2_fourcc('R', 'V', '4', '0') /* RealVideo 9 & 10 \ */ /* Vendor-specific formats */ -#define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */ -#define V4L2_PIX_FMT_WNVA \ - v4l2_fourcc('W', 'N', 'V', 'A') /* Winnov hw compress */ -#define V4L2_PIX_FMT_SN9C10X \ - v4l2_fourcc('S', '9', '1', '0') /* SN9C10x compression */ -#define V4L2_PIX_FMT_SN9C20X_I420 \ - v4l2_fourcc('S', '9', '2', '0') /* SN9C20x YUV 4:2:0 */ +#define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */ +#define V4L2_PIX_FMT_WNVA v4l2_fourcc('W', 'N', 'V', 'A') /* Winnov hw compress */ +#define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S', '9', '1', '0') /* SN9C10x compression */ +#define V4L2_PIX_FMT_SN9C20X_I420 v4l2_fourcc('S', '9', '2', '0') /* SN9C20x YUV 4:2:0 */ #define V4L2_PIX_FMT_PWC1 \ v4l2_fourcc('P', 'W', 'C', '1') /* pwc older webcam \ */ -#define V4L2_PIX_FMT_PWC2 \ - v4l2_fourcc('P', 'W', 'C', '2') /* pwc newer webcam \ - */ -#define V4L2_PIX_FMT_ET61X251 \ - v4l2_fourcc('E', '6', '2', '5') /* ET61X251 compression */ +#define V4L2_PIX_FMT_PWC2 \ + v4l2_fourcc('P', 'W', 'C', '2') /* pwc newer webcam \ + */ +#define V4L2_PIX_FMT_ET61X251 v4l2_fourcc('E', '6', '2', '5') /* ET61X251 compression */ #define V4L2_PIX_FMT_SPCA501 \ v4l2_fourcc('S', '5', '0', '1') /* YUYV per line \ */ #define V4L2_PIX_FMT_SPCA505 \ v4l2_fourcc('S', '5', '0', '5') /* YYUV per line \ */ -#define V4L2_PIX_FMT_SPCA508 \ - v4l2_fourcc('S', '5', '0', '8') /* YUVY per line \ - */ -#define V4L2_PIX_FMT_SPCA561 \ - v4l2_fourcc('S', '5', '6', '1') /* compressed GBRG bayer */ -#define V4L2_PIX_FMT_PAC207 \ - v4l2_fourcc('P', '2', '0', '7') /* compressed BGGR bayer */ -#define V4L2_PIX_FMT_MR97310A \ - v4l2_fourcc('M', '3', '1', '0') /* compressed BGGR bayer */ -#define V4L2_PIX_FMT_JL2005BCD \ - v4l2_fourcc('J', 'L', '2', '0') /* compressed RGGB bayer */ -#define V4L2_PIX_FMT_SN9C2028 \ - v4l2_fourcc('S', 'O', 'N', 'X') /* compressed GBRG bayer */ -#define V4L2_PIX_FMT_SQ905C \ - v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */ +#define V4L2_PIX_FMT_SPCA508 \ + v4l2_fourcc('S', '5', '0', '8') /* YUVY per line \ + */ +#define V4L2_PIX_FMT_SPCA561 v4l2_fourcc('S', '5', '6', '1') /* compressed GBRG bayer */ +#define V4L2_PIX_FMT_PAC207 v4l2_fourcc('P', '2', '0', '7') /* compressed BGGR bayer */ +#define V4L2_PIX_FMT_MR97310A v4l2_fourcc('M', '3', '1', '0') /* compressed BGGR bayer */ +#define V4L2_PIX_FMT_JL2005BCD v4l2_fourcc('J', 'L', '2', '0') /* compressed RGGB bayer */ +#define V4L2_PIX_FMT_SN9C2028 v4l2_fourcc('S', 'O', 'N', 'X') /* compressed GBRG bayer */ +#define V4L2_PIX_FMT_SQ905C v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */ #define V4L2_PIX_FMT_PJPG \ v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG \ */ @@ -974,58 +800,43 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_CIT_YYVYUY \ v4l2_fourcc('C', 'I', 'T', 'V') /* one line of Y then 1 line of VYUY \ */ -#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 */ -#define V4L2_PIX_FMT_Y8I \ - v4l2_fourcc('Y', '8', 'I', ' ') /* Greyscale 8-bit L/R interleaved */ -#define V4L2_PIX_FMT_Y12I \ - v4l2_fourcc('Y', '1', '2', 'I') /* Greyscale 12-bit L/R interleaved */ -#define V4L2_PIX_FMT_Y16I \ - v4l2_fourcc('Y', '1', '6', 'I') /* Greyscale 16-bit L/R interleaved */ -#define V4L2_PIX_FMT_Z16 \ - v4l2_fourcc('Z', '1', '6', ' ') /* Depth data 16-bit \ - */ -#define V4L2_PIX_FMT_MT21C \ - v4l2_fourcc('M', 'T', '2', '1') /* Mediatek compressed block mode */ -#define V4L2_PIX_FMT_MM21 \ - v4l2_fourcc('M', 'M', '2', '1') /* Mediatek 8-bit block mode, two \ - non-contiguous planes */ -#define V4L2_PIX_FMT_MT2110T \ - v4l2_fourcc('M', 'T', '2', 'T') /* Mediatek 10-bit block tile mode */ +#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 */ +#define V4L2_PIX_FMT_Y8I v4l2_fourcc('Y', '8', 'I', ' ') /* Greyscale 8-bit L/R interleaved */ +#define V4L2_PIX_FMT_Y12I v4l2_fourcc('Y', '1', '2', 'I') /* Greyscale 12-bit L/R interleaved */ +#define V4L2_PIX_FMT_Y16I v4l2_fourcc('Y', '1', '6', 'I') /* Greyscale 16-bit L/R interleaved */ +#define V4L2_PIX_FMT_Z16 \ + v4l2_fourcc('Z', '1', '6', ' ') /* Depth data 16-bit \ + */ +#define V4L2_PIX_FMT_MT21C v4l2_fourcc('M', 'T', '2', '1') /* Mediatek compressed block mode */ +#define V4L2_PIX_FMT_MM21 \ + v4l2_fourcc('M', 'M', '2', '1') /* Mediatek 8-bit block mode, two \ + non-contiguous planes */ +#define V4L2_PIX_FMT_MT2110T v4l2_fourcc('M', 'T', '2', 'T') /* Mediatek 10-bit block tile mode */ #define V4L2_PIX_FMT_MT2110R \ v4l2_fourcc('M', 'T', '2', 'R') /* Mediatek 10-bit block raster mode \ */ #define V4L2_PIX_FMT_INZI \ v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Planar Greyscale 10-bit and \ Depth 16-bit */ -#define V4L2_PIX_FMT_CNF4 \ - v4l2_fourcc('C', 'N', 'F', '4') /* Intel 4-bit packed depth confidence \ - information */ -#define V4L2_PIX_FMT_HI240 \ - v4l2_fourcc('H', 'I', '2', '4') /* BTTV 8-bit dithered RGB */ -#define V4L2_PIX_FMT_QC08C \ - v4l2_fourcc('Q', '0', '8', 'C') /* Qualcomm 8-bit compressed */ -#define V4L2_PIX_FMT_QC10C \ - v4l2_fourcc('Q', '1', '0', 'C') /* Qualcomm 10-bit compressed */ -#define V4L2_PIX_FMT_AJPG v4l2_fourcc('A', 'J', 'P', 'G') /* Aspeed JPEG */ -#define V4L2_PIX_FMT_HEXTILE \ - v4l2_fourcc('H', 'X', 'T', 'L') /* Hextile compressed */ +#define V4L2_PIX_FMT_CNF4 \ + v4l2_fourcc('C', 'N', 'F', '4') /* Intel 4-bit packed depth confidence \ + information */ +#define V4L2_PIX_FMT_HI240 v4l2_fourcc('H', 'I', '2', '4') /* BTTV 8-bit dithered RGB */ +#define V4L2_PIX_FMT_QC08C v4l2_fourcc('Q', '0', '8', 'C') /* Qualcomm 8-bit compressed */ +#define V4L2_PIX_FMT_QC10C v4l2_fourcc('Q', '1', '0', 'C') /* Qualcomm 10-bit compressed */ +#define V4L2_PIX_FMT_AJPG v4l2_fourcc('A', 'J', 'P', 'G') /* Aspeed JPEG */ +#define V4L2_PIX_FMT_HEXTILE v4l2_fourcc('H', 'X', 'T', 'L') /* Hextile compressed */ /* 10bit raw packed, 32 bytes for every 25 pixels, last LSB 6 bits unused */ -#define V4L2_PIX_FMT_IPU3_SBGGR10 \ - v4l2_fourcc('i', 'p', '3', 'b') /* IPU3 packed 10-bit BGGR bayer */ -#define V4L2_PIX_FMT_IPU3_SGBRG10 \ - v4l2_fourcc('i', 'p', '3', 'g') /* IPU3 packed 10-bit GBRG bayer */ -#define V4L2_PIX_FMT_IPU3_SGRBG10 \ - v4l2_fourcc('i', 'p', '3', 'G') /* IPU3 packed 10-bit GRBG bayer */ -#define V4L2_PIX_FMT_IPU3_SRGGB10 \ - v4l2_fourcc('i', 'p', '3', 'r') /* IPU3 packed 10-bit RGGB bayer */ +#define V4L2_PIX_FMT_IPU3_SBGGR10 v4l2_fourcc('i', 'p', '3', 'b') /* IPU3 packed 10-bit BGGR bayer */ +#define V4L2_PIX_FMT_IPU3_SGBRG10 v4l2_fourcc('i', 'p', '3', 'g') /* IPU3 packed 10-bit GBRG bayer */ +#define V4L2_PIX_FMT_IPU3_SGRBG10 v4l2_fourcc('i', 'p', '3', 'G') /* IPU3 packed 10-bit GRBG bayer */ +#define V4L2_PIX_FMT_IPU3_SRGGB10 v4l2_fourcc('i', 'p', '3', 'r') /* IPU3 packed 10-bit RGGB bayer */ /* Raspberry Pi PiSP compressed formats. */ #define V4L2_PIX_FMT_PISP_COMP1_RGGB \ @@ -1069,64 +880,45 @@ struct v4l2_pix_format { #define V4L2_SDR_FMT_CU8 v4l2_fourcc('C', 'U', '0', '8') /* IQ u8 */ #define V4L2_SDR_FMT_CU16LE v4l2_fourcc('C', 'U', '1', '6') /* IQ u16le */ #define V4L2_SDR_FMT_CS8 v4l2_fourcc('C', 'S', '0', '8') /* complex s8 */ -#define V4L2_SDR_FMT_CS14LE \ - v4l2_fourcc('C', 'S', '1', '4') /* complex s14le \ - */ -#define V4L2_SDR_FMT_RU12LE v4l2_fourcc('R', 'U', '1', '2') /* real u12le */ -#define V4L2_SDR_FMT_PCU16BE \ - v4l2_fourcc('P', 'C', '1', '6') /* planar complex u16be */ -#define V4L2_SDR_FMT_PCU18BE \ - v4l2_fourcc('P', 'C', '1', '8') /* planar complex u18be */ -#define V4L2_SDR_FMT_PCU20BE \ - v4l2_fourcc('P', 'C', '2', '0') /* planar complex u20be */ +#define V4L2_SDR_FMT_CS14LE \ + v4l2_fourcc('C', 'S', '1', '4') /* complex s14le \ + */ +#define V4L2_SDR_FMT_RU12LE v4l2_fourcc('R', 'U', '1', '2') /* real u12le */ +#define V4L2_SDR_FMT_PCU16BE v4l2_fourcc('P', 'C', '1', '6') /* planar complex u16be */ +#define V4L2_SDR_FMT_PCU18BE v4l2_fourcc('P', 'C', '1', '8') /* planar complex u18be */ +#define V4L2_SDR_FMT_PCU20BE v4l2_fourcc('P', 'C', '2', '0') /* planar complex u20be */ /* Touch formats - used for Touch devices */ -#define V4L2_TCH_FMT_DELTA_TD16 \ - v4l2_fourcc('T', 'D', '1', '6') /* 16-bit signed deltas */ -#define V4L2_TCH_FMT_DELTA_TD08 \ - v4l2_fourcc('T', 'D', '0', '8') /* 8-bit signed deltas */ -#define V4L2_TCH_FMT_TU16 \ - v4l2_fourcc('T', 'U', '1', '6') /* 16-bit unsigned touch data */ -#define V4L2_TCH_FMT_TU08 \ - v4l2_fourcc('T', 'U', '0', '8') /* 8-bit unsigned touch data */ +#define V4L2_TCH_FMT_DELTA_TD16 v4l2_fourcc('T', 'D', '1', '6') /* 16-bit signed deltas */ +#define V4L2_TCH_FMT_DELTA_TD08 v4l2_fourcc('T', 'D', '0', '8') /* 8-bit signed deltas */ +#define V4L2_TCH_FMT_TU16 v4l2_fourcc('T', 'U', '1', '6') /* 16-bit unsigned touch data */ +#define V4L2_TCH_FMT_TU08 v4l2_fourcc('T', 'U', '0', '8') /* 8-bit unsigned touch data */ /* Meta-data formats */ -#define V4L2_META_FMT_VSP1_HGO \ - v4l2_fourcc('V', 'S', 'P', 'H') /* R-Car VSP1 1-D Histogram */ -#define V4L2_META_FMT_VSP1_HGT \ - v4l2_fourcc('V', 'S', 'P', 'T') /* R-Car VSP1 2-D Histogram */ -#define V4L2_META_FMT_UVC \ - v4l2_fourcc('U', 'V', 'C', 'H') /* UVC Payload Header metadata */ -#define V4L2_META_FMT_D4XX \ - v4l2_fourcc('D', '4', 'X', 'X') /* D4XX Payload Header metadata */ -#define V4L2_META_FMT_UVC_MSXU_1_5 \ - v4l2_fourcc('U', 'V', 'C', 'M') /* UVC MSXU metadata */ +#define V4L2_META_FMT_VSP1_HGO v4l2_fourcc('V', 'S', 'P', 'H') /* R-Car VSP1 1-D Histogram */ +#define V4L2_META_FMT_VSP1_HGT v4l2_fourcc('V', 'S', 'P', 'T') /* R-Car VSP1 2-D Histogram */ +#define V4L2_META_FMT_UVC v4l2_fourcc('U', 'V', 'C', 'H') /* UVC Payload Header metadata */ +#define V4L2_META_FMT_D4XX v4l2_fourcc('D', '4', 'X', 'X') /* D4XX Payload Header metadata */ +#define V4L2_META_FMT_UVC_MSXU_1_5 v4l2_fourcc('U', 'V', 'C', 'M') /* UVC MSXU metadata */ #define V4L2_META_FMT_VIVID \ v4l2_fourcc('V', 'I', 'V', 'D') /* Vivid Metadata \ */ /* Vendor specific - used for RK_ISP1 camera sub-system */ -#define V4L2_META_FMT_RK_ISP1_PARAMS \ - v4l2_fourcc('R', 'K', '1', 'P') /* Rockchip ISP1 3A Parameters */ -#define V4L2_META_FMT_RK_ISP1_STAT_3A \ - v4l2_fourcc('R', 'K', '1', 'S') /* Rockchip ISP1 3A Statistics */ +#define V4L2_META_FMT_RK_ISP1_PARAMS v4l2_fourcc('R', 'K', '1', 'P') /* Rockchip ISP1 3A Parameters */ +#define V4L2_META_FMT_RK_ISP1_STAT_3A v4l2_fourcc('R', 'K', '1', 'S') /* Rockchip ISP1 3A Statistics */ #define V4L2_META_FMT_RK_ISP1_EXT_PARAMS \ v4l2_fourcc('R', 'K', '1', 'E') /* Rockchip ISP1 3a Extensible \ Parameters */ /* Vendor specific - used for C3_ISP */ -#define V4L2_META_FMT_C3ISP_PARAMS \ - v4l2_fourcc('C', '3', 'P', 'M') /* Amlogic C3 ISP Parameters */ -#define V4L2_META_FMT_C3ISP_STATS \ - v4l2_fourcc('C', '3', 'S', 'T') /* Amlogic C3 ISP Statistics */ +#define V4L2_META_FMT_C3ISP_PARAMS v4l2_fourcc('C', '3', 'P', 'M') /* Amlogic C3 ISP Parameters */ +#define V4L2_META_FMT_C3ISP_STATS v4l2_fourcc('C', '3', 'S', 'T') /* Amlogic C3 ISP Statistics */ /* Vendor specific - used for RaspberryPi PiSP */ -#define V4L2_META_FMT_RPI_BE_CFG \ - v4l2_fourcc('R', 'P', 'B', 'C') /* PiSP BE configuration */ -#define V4L2_META_FMT_RPI_FE_CFG \ - v4l2_fourcc('R', 'P', 'F', 'C') /* PiSP FE configuration */ -#define V4L2_META_FMT_RPI_FE_STATS \ - v4l2_fourcc('R', 'P', 'F', 'S') /* PiSP FE stats */ +#define V4L2_META_FMT_RPI_BE_CFG v4l2_fourcc('R', 'P', 'B', 'C') /* PiSP BE configuration */ +#define V4L2_META_FMT_RPI_FE_CFG v4l2_fourcc('R', 'P', 'F', 'C') /* PiSP FE configuration */ +#define V4L2_META_FMT_RPI_FE_STATS v4l2_fourcc('R', 'P', 'F', 'S') /* PiSP FE stats */ /* priv field value to indicates that subsequent fields are valid. */ #define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe @@ -1664,15 +1456,13 @@ typedef __u64 v4l2_std_id; * "Common" NTSC/M - It should be noticed that V4L2_STD_NTSC_443 is * Missing here. */ -#define V4L2_STD_NTSC \ - (V4L2_STD_NTSC_M | V4L2_STD_NTSC_M_JP | V4L2_STD_NTSC_M_KR) +#define V4L2_STD_NTSC (V4L2_STD_NTSC_M | V4L2_STD_NTSC_M_JP | V4L2_STD_NTSC_M_KR) /* Secam macros */ -#define V4L2_STD_SECAM_DK \ - (V4L2_STD_SECAM_D | V4L2_STD_SECAM_K | V4L2_STD_SECAM_K1) +#define V4L2_STD_SECAM_DK (V4L2_STD_SECAM_D | V4L2_STD_SECAM_K | V4L2_STD_SECAM_K1) /* All Secam Standards */ -#define V4L2_STD_SECAM \ - (V4L2_STD_SECAM_B | V4L2_STD_SECAM_G | V4L2_STD_SECAM_H | \ - V4L2_STD_SECAM_DK | V4L2_STD_SECAM_L | V4L2_STD_SECAM_LC) +#define V4L2_STD_SECAM \ + (V4L2_STD_SECAM_B | V4L2_STD_SECAM_G | V4L2_STD_SECAM_H | V4L2_STD_SECAM_DK | V4L2_STD_SECAM_L | \ + V4L2_STD_SECAM_LC) /* PAL macros */ #define V4L2_STD_PAL_BG (V4L2_STD_PAL_B | V4L2_STD_PAL_B1 | V4L2_STD_PAL_G) #define V4L2_STD_PAL_DK (V4L2_STD_PAL_D | V4L2_STD_PAL_D1 | V4L2_STD_PAL_K) @@ -1681,8 +1471,7 @@ typedef __u64 v4l2_std_id; * V4L1 concept of "PAL": /BGDKHI. * Several PAL standards are missing here: /M, /N and /Nc */ -#define V4L2_STD_PAL \ - (V4L2_STD_PAL_BG | V4L2_STD_PAL_DK | V4L2_STD_PAL_H | V4L2_STD_PAL_I) +#define V4L2_STD_PAL (V4L2_STD_PAL_BG | V4L2_STD_PAL_DK | V4L2_STD_PAL_H | V4L2_STD_PAL_I) /* Chroma "agnostic" standards */ #define V4L2_STD_B (V4L2_STD_PAL_B | V4L2_STD_PAL_B1 | V4L2_STD_SECAM_B) #define V4L2_STD_G (V4L2_STD_PAL_G | V4L2_STD_SECAM_G) @@ -1691,19 +1480,15 @@ typedef __u64 v4l2_std_id; #define V4L2_STD_GH (V4L2_STD_G | V4L2_STD_H) #define V4L2_STD_DK (V4L2_STD_PAL_DK | V4L2_STD_SECAM_DK) #define V4L2_STD_BG (V4L2_STD_B | V4L2_STD_G) -#define V4L2_STD_MN \ - (V4L2_STD_PAL_M | V4L2_STD_PAL_N | V4L2_STD_PAL_Nc | V4L2_STD_NTSC) +#define V4L2_STD_MN (V4L2_STD_PAL_M | V4L2_STD_PAL_N | V4L2_STD_PAL_Nc | V4L2_STD_NTSC) /* Standards where MTS/BTSC stereo could be found */ -#define V4L2_STD_MTS \ - (V4L2_STD_NTSC_M | V4L2_STD_PAL_M | V4L2_STD_PAL_N | V4L2_STD_PAL_Nc) +#define V4L2_STD_MTS (V4L2_STD_NTSC_M | V4L2_STD_PAL_M | V4L2_STD_PAL_N | V4L2_STD_PAL_Nc) /* Standards for Countries with 60Hz Line frequency */ -#define V4L2_STD_525_60 \ - (V4L2_STD_PAL_M | V4L2_STD_PAL_60 | V4L2_STD_NTSC | V4L2_STD_NTSC_443) +#define V4L2_STD_525_60 (V4L2_STD_PAL_M | V4L2_STD_PAL_60 | V4L2_STD_NTSC | V4L2_STD_NTSC_443) /* Standards for Countries with 50Hz Line frequency */ -#define V4L2_STD_625_50 \ - (V4L2_STD_PAL | V4L2_STD_PAL_N | V4L2_STD_PAL_Nc | V4L2_STD_SECAM) +#define V4L2_STD_625_50 (V4L2_STD_PAL | V4L2_STD_PAL_N | V4L2_STD_PAL_Nc | V4L2_STD_SECAM) #define V4L2_STD_ATSC (V4L2_STD_ATSC_8_VSB | V4L2_STD_ATSC_16_VSB) /* Macros with none and all analog standards */ @@ -1867,16 +1652,12 @@ struct v4l2_bt_timings { #define V4L2_DV_FL_CAN_DETECT_REDUCED_FPS (1 << 9) /* A few useful defines to calculate the total blanking and frame sizes */ -#define V4L2_DV_BT_BLANKING_WIDTH(bt) \ - ((bt)->hfrontporch + (bt)->hsync + (bt)->hbackporch) -#define V4L2_DV_BT_FRAME_WIDTH(bt) ((bt)->width + V4L2_DV_BT_BLANKING_WIDTH(bt)) -#define V4L2_DV_BT_BLANKING_HEIGHT(bt) \ - ((bt)->vfrontporch + (bt)->vsync + (bt)->vbackporch + \ - ((bt)->interlaced ? ((bt)->il_vfrontporch + (bt)->il_vsync + \ - (bt)->il_vbackporch) : \ - 0)) -#define V4L2_DV_BT_FRAME_HEIGHT(bt) \ - ((bt)->height + V4L2_DV_BT_BLANKING_HEIGHT(bt)) +#define V4L2_DV_BT_BLANKING_WIDTH(bt) ((bt)->hfrontporch + (bt)->hsync + (bt)->hbackporch) +#define V4L2_DV_BT_FRAME_WIDTH(bt) ((bt)->width + V4L2_DV_BT_BLANKING_WIDTH(bt)) +#define V4L2_DV_BT_BLANKING_HEIGHT(bt) \ + ((bt)->vfrontporch + (bt)->vsync + (bt)->vbackporch + \ + ((bt)->interlaced ? ((bt)->il_vfrontporch + (bt)->il_vsync + (bt)->il_vbackporch) : 0)) +#define V4L2_DV_BT_FRAME_HEIGHT(bt) ((bt)->height + V4L2_DV_BT_BLANKING_HEIGHT(bt)) /** struct v4l2_dv_timings - DV timings * @type: the type of the timings @@ -2002,11 +1783,10 @@ struct v4l2_input { #define V4L2_IN_ST_VTR 0x04000000 /* VTR time constant */ /* capabilities flags */ -#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 */ -#define V4L2_IN_CAP_NATIVE_SIZE 0x00000008 /* Supports setting native size */ +#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 */ +#define V4L2_IN_CAP_NATIVE_SIZE 0x00000008 /* Supports setting native size */ /* * V I D E O O U T P U T S @@ -2027,11 +1807,10 @@ struct v4l2_output { #define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY 3 /* capabilities flags */ -#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 */ -#define V4L2_OUT_CAP_NATIVE_SIZE 0x00000008 /* Supports setting native size */ +#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 */ +#define V4L2_OUT_CAP_NATIVE_SIZE 0x00000008 /* Supports setting native size */ /* * C O N T R O L S @@ -2079,8 +1858,7 @@ struct v4l2_ext_control { struct v4l2_ctrl_av1_frame *p_av1_frame; struct v4l2_ctrl_av1_film_grain *p_av1_film_grain; struct v4l2_ctrl_hdr10_cll_info *p_hdr10_cll_info; - struct v4l2_ctrl_hdr10_mastering_display - *p_hdr10_mastering_display; + struct v4l2_ctrl_hdr10_mastering_display *p_hdr10_mastering_display; void *ptr; } __attribute__((packed)); } __attribute__((packed)); @@ -2517,8 +2295,7 @@ struct v4l2_sliced_vbi_format { #define V4L2_SLICED_WSS_625 (0x4000) #define V4L2_SLICED_VBI_525 (V4L2_SLICED_CAPTION_525) -#define V4L2_SLICED_VBI_625 \ - (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625) +#define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625) struct v4l2_sliced_vbi_cap { __u16 service_set; @@ -2685,18 +2462,16 @@ struct v4l2_meta_format { struct v4l2_format { __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 - */ - struct v4l2_window win; /* V4L2_BUF_TYPE_VIDEO_OVERLAY */ - struct v4l2_vbi_format vbi; /* V4L2_BUF_TYPE_VBI_CAPTURE */ - struct v4l2_sliced_vbi_format - sliced; /* V4L2_BUF_TYPE_SLICED_VBI_CAPTURE - */ - struct v4l2_sdr_format sdr; /* V4L2_BUF_TYPE_SDR_CAPTURE */ - struct v4l2_meta_format meta; /* V4L2_BUF_TYPE_META_CAPTURE */ - __u8 raw_data[200]; /* user-defined */ + struct v4l2_pix_format pix; /* V4L2_BUF_TYPE_VIDEO_CAPTURE */ + struct v4l2_pix_format_mplane pix_mp; /* V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE + */ + struct v4l2_window win; /* V4L2_BUF_TYPE_VIDEO_OVERLAY */ + struct v4l2_vbi_format vbi; /* V4L2_BUF_TYPE_VBI_CAPTURE */ + struct v4l2_sliced_vbi_format sliced; /* V4L2_BUF_TYPE_SLICED_VBI_CAPTURE + */ + struct v4l2_sdr_format sdr; /* V4L2_BUF_TYPE_SDR_CAPTURE */ + struct v4l2_meta_format meta; /* V4L2_BUF_TYPE_META_CAPTURE */ + __u8 raw_data[200]; /* user-defined */ } fmt; }; @@ -2811,8 +2586,7 @@ struct v4l2_event_subscription { /* VIDIOC_DBG_G_REGISTER and VIDIOC_DBG_S_REGISTER */ -#define V4L2_CHIP_MATCH_BRIDGE \ - 0 /* Match against chip ID on the bridge (0 for the bridge) */ +#define V4L2_CHIP_MATCH_BRIDGE 0 /* Match against chip ID on the bridge (0 for the bridge) */ #define V4L2_CHIP_MATCH_SUBDEV 4 /* Match against subdev index */ /* The following four defines are no longer in use */ diff --git a/include/arch/x86_64/linux/virtio_balloon.h b/include/arch/x86_64/linux/virtio_balloon.h index 20e877d5..303d9f85 100644 --- a/include/arch/x86_64/linux/virtio_balloon.h +++ b/include/arch/x86_64/linux/virtio_balloon.h @@ -73,16 +73,13 @@ struct virtio_balloon_config { #define VIRTIO_BALLOON_S_HTLB_PGFAIL 9 /* Hugetlb page allocation failures */ #define VIRTIO_BALLOON_S_OOM_KILL 10 /* OOM killer invocations */ #define VIRTIO_BALLOON_S_ALLOC_STALL 11 /* Stall count of memory allocatoin */ -#define VIRTIO_BALLOON_S_ASYNC_SCAN \ - 12 /* Amount of memory scanned asynchronously */ -#define VIRTIO_BALLOON_S_DIRECT_SCAN \ - 13 /* Amount of memory scanned directly \ - */ -#define VIRTIO_BALLOON_S_ASYNC_RECLAIM \ - 14 /* Amount of memory reclaimed asynchronously */ -#define VIRTIO_BALLOON_S_DIRECT_RECLAIM \ - 15 /* Amount of memory reclaimed directly */ -#define VIRTIO_BALLOON_S_NR 16 +#define VIRTIO_BALLOON_S_ASYNC_SCAN 12 /* Amount of memory scanned asynchronously */ +#define VIRTIO_BALLOON_S_DIRECT_SCAN \ + 13 /* Amount of memory scanned directly \ + */ +#define VIRTIO_BALLOON_S_ASYNC_RECLAIM 14 /* Amount of memory reclaimed asynchronously */ +#define VIRTIO_BALLOON_S_DIRECT_RECLAIM 15 /* Amount of memory reclaimed directly */ +#define VIRTIO_BALLOON_S_NR 16 #define VIRTIO_BALLOON_S_NAMES_WITH_PREFIX(VIRTIO_BALLOON_S_NAMES_prefix) \ { VIRTIO_BALLOON_S_NAMES_prefix "swap-in", \ diff --git a/include/arch/x86_64/linux/virtio_crypto.h b/include/arch/x86_64/linux/virtio_crypto.h index 6c4526bc..3d3d0f70 100644 --- a/include/arch/x86_64/linux/virtio_crypto.h +++ b/include/arch/x86_64/linux/virtio_crypto.h @@ -41,26 +41,16 @@ #define VIRTIO_CRYPTO_OPCODE(service, op) (((service) << 8) | (op)) struct virtio_crypto_ctrl_header { -#define VIRTIO_CRYPTO_CIPHER_CREATE_SESSION \ - VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_CIPHER, 0x02) -#define VIRTIO_CRYPTO_CIPHER_DESTROY_SESSION \ - VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_CIPHER, 0x03) -#define VIRTIO_CRYPTO_HASH_CREATE_SESSION \ - VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_HASH, 0x02) -#define VIRTIO_CRYPTO_HASH_DESTROY_SESSION \ - VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_HASH, 0x03) -#define VIRTIO_CRYPTO_MAC_CREATE_SESSION \ - VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_MAC, 0x02) -#define VIRTIO_CRYPTO_MAC_DESTROY_SESSION \ - VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_MAC, 0x03) -#define VIRTIO_CRYPTO_AEAD_CREATE_SESSION \ - VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AEAD, 0x02) -#define VIRTIO_CRYPTO_AEAD_DESTROY_SESSION \ - VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AEAD, 0x03) -#define VIRTIO_CRYPTO_AKCIPHER_CREATE_SESSION \ - VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AKCIPHER, 0x04) -#define VIRTIO_CRYPTO_AKCIPHER_DESTROY_SESSION \ - VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AKCIPHER, 0x05) +#define VIRTIO_CRYPTO_CIPHER_CREATE_SESSION VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_CIPHER, 0x02) +#define VIRTIO_CRYPTO_CIPHER_DESTROY_SESSION VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_CIPHER, 0x03) +#define VIRTIO_CRYPTO_HASH_CREATE_SESSION VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_HASH, 0x02) +#define VIRTIO_CRYPTO_HASH_DESTROY_SESSION VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_HASH, 0x03) +#define VIRTIO_CRYPTO_MAC_CREATE_SESSION VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_MAC, 0x02) +#define VIRTIO_CRYPTO_MAC_DESTROY_SESSION VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_MAC, 0x03) +#define VIRTIO_CRYPTO_AEAD_CREATE_SESSION VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AEAD, 0x02) +#define VIRTIO_CRYPTO_AEAD_DESTROY_SESSION VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AEAD, 0x03) +#define VIRTIO_CRYPTO_AKCIPHER_CREATE_SESSION VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AKCIPHER, 0x04) +#define VIRTIO_CRYPTO_AKCIPHER_DESTROY_SESSION VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AKCIPHER, 0x05) __le32 opcode; __le32 algo; __le32 flag; @@ -299,34 +289,24 @@ struct virtio_crypto_op_ctrl_req { struct virtio_crypto_hash_create_session_req hash_create_session; struct virtio_crypto_mac_create_session_req mac_create_session; struct virtio_crypto_aead_create_session_req aead_create_session; - struct virtio_crypto_akcipher_create_session_req - akcipher_create_session; + struct virtio_crypto_akcipher_create_session_req akcipher_create_session; struct virtio_crypto_destroy_session_req destroy_session; __u8 padding[56]; } u; }; struct virtio_crypto_op_header { -#define VIRTIO_CRYPTO_CIPHER_ENCRYPT \ - VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_CIPHER, 0x00) -#define VIRTIO_CRYPTO_CIPHER_DECRYPT \ - VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_CIPHER, 0x01) -#define VIRTIO_CRYPTO_HASH \ - VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_HASH, 0x00) -#define VIRTIO_CRYPTO_MAC VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_MAC, 0x00) -#define VIRTIO_CRYPTO_AEAD_ENCRYPT \ - VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AEAD, 0x00) -#define VIRTIO_CRYPTO_AEAD_DECRYPT \ - VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AEAD, 0x01) -#define VIRTIO_CRYPTO_AKCIPHER_ENCRYPT \ - VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AKCIPHER, 0x00) -#define VIRTIO_CRYPTO_AKCIPHER_DECRYPT \ - VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AKCIPHER, 0x01) +#define VIRTIO_CRYPTO_CIPHER_ENCRYPT VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_CIPHER, 0x00) +#define VIRTIO_CRYPTO_CIPHER_DECRYPT VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_CIPHER, 0x01) +#define VIRTIO_CRYPTO_HASH VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_HASH, 0x00) +#define VIRTIO_CRYPTO_MAC VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_MAC, 0x00) +#define VIRTIO_CRYPTO_AEAD_ENCRYPT VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AEAD, 0x00) +#define VIRTIO_CRYPTO_AEAD_DECRYPT VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AEAD, 0x01) +#define VIRTIO_CRYPTO_AKCIPHER_ENCRYPT VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AKCIPHER, 0x00) +#define VIRTIO_CRYPTO_AKCIPHER_DECRYPT VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AKCIPHER, 0x01) /* akcipher sign/verify opcodes are deprecated */ -#define VIRTIO_CRYPTO_AKCIPHER_SIGN \ - VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AKCIPHER, 0x02) -#define VIRTIO_CRYPTO_AKCIPHER_VERIFY \ - VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AKCIPHER, 0x03) +#define VIRTIO_CRYPTO_AKCIPHER_SIGN VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AKCIPHER, 0x02) +#define VIRTIO_CRYPTO_AKCIPHER_VERIFY VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AKCIPHER, 0x03) __le32 opcode; /* algo should be service-specific algorithms */ __le32 algo; diff --git a/include/arch/x86_64/linux/virtio_iommu.h b/include/arch/x86_64/linux/virtio_iommu.h index ac19656a..e2301576 100644 --- a/include/arch/x86_64/linux/virtio_iommu.h +++ b/include/arch/x86_64/linux/virtio_iommu.h @@ -92,9 +92,7 @@ struct virtio_iommu_req_detach { #define VIRTIO_IOMMU_MAP_F_WRITE (1 << 1) #define VIRTIO_IOMMU_MAP_F_MMIO (1 << 2) -#define VIRTIO_IOMMU_MAP_F_MASK \ - (VIRTIO_IOMMU_MAP_F_READ | VIRTIO_IOMMU_MAP_F_WRITE | \ - VIRTIO_IOMMU_MAP_F_MMIO) +#define VIRTIO_IOMMU_MAP_F_MASK (VIRTIO_IOMMU_MAP_F_READ | VIRTIO_IOMMU_MAP_F_WRITE | VIRTIO_IOMMU_MAP_F_MMIO) struct virtio_iommu_req_map { struct virtio_iommu_req_head head; diff --git a/include/arch/x86_64/linux/virtio_net.h b/include/arch/x86_64/linux/virtio_net.h index a74191c2..a21b15d6 100644 --- a/include/arch/x86_64/linux/virtio_net.h +++ b/include/arch/x86_64/linux/virtio_net.h @@ -60,21 +60,18 @@ 22 /* Device supports Receive Flow \ * Steering */ #define VIRTIO_NET_F_CTRL_MAC_ADDR 23 /* Set MAC address */ -#define VIRTIO_NET_F_DEVICE_STATS \ - 50 /* Device can provide device-level statistics. */ -#define VIRTIO_NET_F_VQ_NOTF_COAL \ - 52 /* Device supports virtqueue notification coalescing */ -#define VIRTIO_NET_F_NOTF_COAL \ - 53 /* Device supports notifications coalescing \ - */ -#define VIRTIO_NET_F_GUEST_USO4 54 /* Guest can handle USOv4 in. */ -#define VIRTIO_NET_F_GUEST_USO6 55 /* Guest can handle USOv6 in. */ -#define VIRTIO_NET_F_HOST_USO 56 /* Host can handle USO in. */ -#define VIRTIO_NET_F_HASH_REPORT 57 /* Supports hash report */ -#define VIRTIO_NET_F_GUEST_HDRLEN \ - 59 /* Guest provides the exact hdr_len value. */ -#define VIRTIO_NET_F_RSS 60 /* Supports RSS RX steering */ -#define VIRTIO_NET_F_RSC_EXT 61 /* extended coalescing info */ +#define VIRTIO_NET_F_DEVICE_STATS 50 /* Device can provide device-level statistics. */ +#define VIRTIO_NET_F_VQ_NOTF_COAL 52 /* Device supports virtqueue notification coalescing */ +#define VIRTIO_NET_F_NOTF_COAL \ + 53 /* Device supports notifications coalescing \ + */ +#define VIRTIO_NET_F_GUEST_USO4 54 /* Guest can handle USOv4 in. */ +#define VIRTIO_NET_F_GUEST_USO6 55 /* Guest can handle USOv6 in. */ +#define VIRTIO_NET_F_HOST_USO 56 /* Host can handle USO in. */ +#define VIRTIO_NET_F_HASH_REPORT 57 /* Supports hash report */ +#define VIRTIO_NET_F_GUEST_HDRLEN 59 /* Guest provides the exact hdr_len value. */ +#define VIRTIO_NET_F_RSS 60 /* Supports RSS RX steering */ +#define VIRTIO_NET_F_RSC_EXT 61 /* extended coalescing info */ #define VIRTIO_NET_F_STANDBY \ 62 /* Act as standby for another device \ * with the same MAC. \ @@ -169,17 +166,15 @@ struct virtio_net_hdr_v1 { #define VIRTIO_NET_HDR_F_RSC_INFO 4 /* rsc info in csum_ fields */ #define VIRTIO_NET_HDR_F_UDP_TUNNEL_CSUM 8 /* UDP tunnel csum offload */ __u8 flags; -#define VIRTIO_NET_HDR_GSO_NONE 0 /* Not a GSO frame */ -#define VIRTIO_NET_HDR_GSO_TCPV4 1 /* GSO frame, IPv4 TCP (TSO) */ -#define VIRTIO_NET_HDR_GSO_UDP 3 /* GSO frame, IPv4 UDP (UFO) */ -#define VIRTIO_NET_HDR_GSO_TCPV6 4 /* GSO frame, IPv6 TCP */ -#define VIRTIO_NET_HDR_GSO_UDP_L4 5 /* GSO frame, IPv4& IPv6 UDP (USO) */ +#define VIRTIO_NET_HDR_GSO_NONE 0 /* Not a GSO frame */ +#define VIRTIO_NET_HDR_GSO_TCPV4 1 /* GSO frame, IPv4 TCP (TSO) */ +#define VIRTIO_NET_HDR_GSO_UDP 3 /* GSO frame, IPv4 UDP (UFO) */ +#define VIRTIO_NET_HDR_GSO_TCPV6 4 /* GSO frame, IPv6 TCP */ +#define VIRTIO_NET_HDR_GSO_UDP_L4 5 /* GSO frame, IPv4& IPv6 UDP (USO) */ #define VIRTIO_NET_HDR_GSO_UDP_TUNNEL_IPV4 0x20 /* UDPv4 tunnel present */ #define VIRTIO_NET_HDR_GSO_UDP_TUNNEL_IPV6 0x40 /* UDPv6 tunnel present */ -#define VIRTIO_NET_HDR_GSO_UDP_TUNNEL \ - (VIRTIO_NET_HDR_GSO_UDP_TUNNEL_IPV4 | \ - VIRTIO_NET_HDR_GSO_UDP_TUNNEL_IPV6) -#define VIRTIO_NET_HDR_GSO_ECN 0x80 /* TCP has ECN set */ +#define VIRTIO_NET_HDR_GSO_UDP_TUNNEL (VIRTIO_NET_HDR_GSO_UDP_TUNNEL_IPV4 | VIRTIO_NET_HDR_GSO_UDP_TUNNEL_IPV6) +#define VIRTIO_NET_HDR_GSO_ECN 0x80 /* TCP has ECN set */ __u8 gso_type; __virtio16 hdr_len; /* Ethernet + IP + tcp/udp hdrs */ __virtio16 gso_size; /* Bytes to append to hdr_len per frame */ diff --git a/include/arch/x86_64/linux/virtio_pci.h b/include/arch/x86_64/linux/virtio_pci.h index 6bebbfce..000d81af 100644 --- a/include/arch/x86_64/linux/virtio_pci.h +++ b/include/arch/x86_64/linux/virtio_pci.h @@ -310,8 +310,7 @@ struct virtio_admin_cmd_notify_info_data { }; struct virtio_admin_cmd_notify_info_result { - struct virtio_admin_cmd_notify_info_data - entries[VIRTIO_ADMIN_CMD_MAX_NOTIFY_INFO]; + struct virtio_admin_cmd_notify_info_data entries[VIRTIO_ADMIN_CMD_MAX_NOTIFY_INFO]; }; #define VIRTIO_DEV_PARTS_CAP 0x0000 diff --git a/include/arch/x86_64/linux/virtio_ring.h b/include/arch/x86_64/linux/virtio_ring.h index 0af526a6..4caf041d 100644 --- a/include/arch/x86_64/linux/virtio_ring.h +++ b/include/arch/x86_64/linux/virtio_ring.h @@ -123,8 +123,7 @@ struct vring_used_elem { __virtio32 len; }; -typedef struct vring_used_elem - __attribute__((aligned(VRING_USED_ALIGN_SIZE))) vring_used_elem_t; +typedef struct vring_used_elem __attribute__((aligned(VRING_USED_ALIGN_SIZE))) vring_used_elem_t; struct vring_used { __virtio16 flags; @@ -146,12 +145,9 @@ struct vring_used { * can both increase and decrease alignment, and specifying the packed * attribute generates a warning. */ -typedef struct vring_desc - __attribute__((aligned(VRING_DESC_ALIGN_SIZE))) vring_desc_t; -typedef struct vring_avail - __attribute__((aligned(VRING_AVAIL_ALIGN_SIZE))) vring_avail_t; -typedef struct vring_used - __attribute__((aligned(VRING_USED_ALIGN_SIZE))) vring_used_t; +typedef struct vring_desc __attribute__((aligned(VRING_DESC_ALIGN_SIZE))) vring_desc_t; +typedef struct vring_avail __attribute__((aligned(VRING_AVAIL_ALIGN_SIZE))) vring_avail_t; +typedef struct vring_used __attribute__((aligned(VRING_USED_ALIGN_SIZE))) vring_used_t; struct vring { unsigned int num; @@ -194,23 +190,17 @@ struct vring { #define vring_used_event(vr) ((vr)->avail->ring[(vr)->num]) #define vring_avail_event(vr) (*(__virtio16 *)&(vr)->used->ring[(vr)->num]) -static __inline__ void vring_init(struct vring *vr, unsigned int num, void *p, - unsigned long align) +static __inline__ void vring_init(struct vring *vr, unsigned int num, void *p, unsigned long align) { vr->num = num; vr->desc = p; - vr->avail = (struct vring_avail *)((char *)p + - num * sizeof(struct vring_desc)); - vr->used = (void *)(((uintptr_t)&vr->avail->ring[num] + - sizeof(__virtio16) + align - 1) & - ~(align - 1)); + vr->avail = (struct vring_avail *)((char *)p + num * sizeof(struct vring_desc)); + vr->used = (void *)(((uintptr_t)&vr->avail->ring[num] + sizeof(__virtio16) + align - 1) & ~(align - 1)); } static __inline__ unsigned vring_size(unsigned int num, unsigned long align) { - return ((sizeof(struct vring_desc) * num + - sizeof(__virtio16) * (3 + num) + align - 1) & - ~(align - 1)) + + return ((sizeof(struct vring_desc) * num + sizeof(__virtio16) * (3 + num) + align - 1) & ~(align - 1)) + sizeof(__virtio16) * 3 + sizeof(struct vring_used_elem) * num; } @@ -220,8 +210,7 @@ static __inline__ unsigned vring_size(unsigned int num, unsigned long align) /* Assuming a given event_idx value from the other side, if * we have just incremented index from old to new_idx, * should we trigger an event? */ -static __inline__ int vring_need_event(__u16 event_idx, __u16 new_idx, - __u16 old) +static __inline__ int vring_need_event(__u16 event_idx, __u16 new_idx, __u16 old) { /* Note: Xen has similar logic for notification hold-off * in include/xen/interface/io/ring.h with req_event and req_prod diff --git a/include/arch/x86_64/linux/vm_sockets.h b/include/arch/x86_64/linux/vm_sockets.h index 4fc0ce11..71ac0020 100644 --- a/include/arch/x86_64/linux/vm_sockets.h +++ b/include/arch/x86_64/linux/vm_sockets.h @@ -88,10 +88,9 @@ #if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__)) #define SO_VM_SOCKETS_CONNECT_TIMEOUT SO_VM_SOCKETS_CONNECT_TIMEOUT_OLD #else -#define SO_VM_SOCKETS_CONNECT_TIMEOUT \ - (sizeof(time_t) == sizeof(__kernel_long_t) ? \ - SO_VM_SOCKETS_CONNECT_TIMEOUT_OLD : \ - SO_VM_SOCKETS_CONNECT_TIMEOUT_NEW) +#define SO_VM_SOCKETS_CONNECT_TIMEOUT \ + (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_VM_SOCKETS_CONNECT_TIMEOUT_OLD : \ + SO_VM_SOCKETS_CONNECT_TIMEOUT_NEW) #endif /* The vSocket equivalent of INADDR_ANY. This works for the svm_cid field of @@ -183,9 +182,8 @@ struct sockaddr_vm { unsigned int svm_port; unsigned int svm_cid; __u8 svm_flags; - unsigned char svm_zero[sizeof(struct sockaddr) - sizeof(sa_family_t) - - sizeof(unsigned short) - sizeof(unsigned int) - - sizeof(unsigned int) - sizeof(__u8)]; + unsigned char svm_zero[sizeof(struct sockaddr) - sizeof(sa_family_t) - sizeof(unsigned short) - + sizeof(unsigned int) - sizeof(unsigned int) - sizeof(__u8)]; }; #define IOCTL_VM_SOCKETS_GET_LOCAL_CID _IO(7, 0xb9) diff --git a/include/arch/x86_64/linux/vmclock-abi.h b/include/arch/x86_64/linux/vmclock-abi.h index 38a0d1ca..5ba2394a 100644 --- a/include/arch/x86_64/linux/vmclock-abi.h +++ b/include/arch/x86_64/linux/vmclock-abi.h @@ -67,7 +67,7 @@ struct vmclock_abi { #define VMCLOCK_MAGIC 0x4b4c4356 /* "VCLK" */ __le32 size; /* Size of region containing this structure */ __le16 version; /* 1 */ - __u8 counter_id; /* Matches VIRTIO_RTC_COUNTER_xxx except INVALID */ + __u8 counter_id; /* Matches VIRTIO_RTC_COUNTER_xxx except INVALID */ #define VMCLOCK_COUNTER_ARM_VCNT 0 #define VMCLOCK_COUNTER_X86_TSC 1 #define VMCLOCK_COUNTER_INVALID 0xff diff --git a/include/arch/x86_64/linux/wait.h b/include/arch/x86_64/linux/wait.h index debe28c1..0bab0e92 100644 --- a/include/arch/x86_64/linux/wait.h +++ b/include/arch/x86_64/linux/wait.h @@ -9,10 +9,9 @@ #define WCONTINUED 0x00000008 #define WNOWAIT 0x01000000 /* Don't reap, just poll status. */ -#define __WNOTHREAD \ - 0x20000000 /* Don't wait on children of other threads in this group */ -#define __WALL 0x40000000 /* Wait on all children, regardless of type */ -#define __WCLONE 0x80000000 /* Wait only on non-SIGCHLD children */ +#define __WNOTHREAD 0x20000000 /* Don't wait on children of other threads in this group */ +#define __WALL 0x40000000 /* Wait on all children, regardless of type */ +#define __WCLONE 0x80000000 /* Wait only on non-SIGCHLD children */ /* First argument to waitid: */ #define P_ALL 0 diff --git a/include/arch/x86_64/linux/watch_queue.h b/include/arch/x86_64/linux/watch_queue.h index 51611331..c4c986e4 100644 --- a/include/arch/x86_64/linux/watch_queue.h +++ b/include/arch/x86_64/linux/watch_queue.h @@ -6,8 +6,7 @@ #include #include -#define O_NOTIFICATION_PIPE \ - O_EXCL /* Parameter to pipe2() selecting notification pipe */ +#define O_NOTIFICATION_PIPE O_EXCL /* Parameter to pipe2() selecting notification pipe */ #define IOC_WATCH_QUEUE_SET_SIZE _IO('W', 0x60) /* Set the size in pages */ #define IOC_WATCH_QUEUE_SET_FILTER _IO('W', 0x61) /* Set the filter */ @@ -83,13 +82,13 @@ enum key_notification_subtype { NOTIFY_KEY_INSTANTIATED = 0, /* Key was instantiated (aux is error code) */ NOTIFY_KEY_UPDATED = 1, /* Key was updated */ - NOTIFY_KEY_LINKED = 2, /* Key (aux) was added to watched keyring */ - NOTIFY_KEY_UNLINKED = 3, /* Key (aux) was removed from watched keyring - */ - NOTIFY_KEY_CLEARED = 4, /* Keyring was cleared */ - NOTIFY_KEY_REVOKED = 5, /* Key was revoked */ - NOTIFY_KEY_INVALIDATED = 6, /* Key was invalidated */ - NOTIFY_KEY_SETATTR = 7, /* Key's attributes got changed */ + NOTIFY_KEY_LINKED = 2, /* Key (aux) was added to watched keyring */ + NOTIFY_KEY_UNLINKED = 3, /* Key (aux) was removed from watched keyring + */ + NOTIFY_KEY_CLEARED = 4, /* Keyring was cleared */ + NOTIFY_KEY_REVOKED = 5, /* Key was revoked */ + NOTIFY_KEY_INVALIDATED = 6, /* Key was invalidated */ + NOTIFY_KEY_SETATTR = 7, /* Key's attributes got changed */ }; /* diff --git a/include/arch/x86_64/linux/wireguard.h b/include/arch/x86_64/linux/wireguard.h index 57d8c326..8daf5265 100644 --- a/include/arch/x86_64/linux/wireguard.h +++ b/include/arch/x86_64/linux/wireguard.h @@ -143,10 +143,7 @@ enum wg_cmd { WG_CMD_GET_DEVICE, WG_CMD_SET_DEVICE, __WG_CMD_MAX }; #define WG_CMD_MAX (__WG_CMD_MAX - 1) -enum wgdevice_flag { - WGDEVICE_F_REPLACE_PEERS = 1U << 0, - __WGDEVICE_F_ALL = WGDEVICE_F_REPLACE_PEERS -}; +enum wgdevice_flag { WGDEVICE_F_REPLACE_PEERS = 1U << 0, __WGDEVICE_F_ALL = WGDEVICE_F_REPLACE_PEERS }; enum wgdevice_attribute { WGDEVICE_A_UNSPEC, WGDEVICE_A_IFINDEX, @@ -165,8 +162,7 @@ enum wgpeer_flag { WGPEER_F_REMOVE_ME = 1U << 0, WGPEER_F_REPLACE_ALLOWEDIPS = 1U << 1, WGPEER_F_UPDATE_ONLY = 1U << 2, - __WGPEER_F_ALL = WGPEER_F_REMOVE_ME | WGPEER_F_REPLACE_ALLOWEDIPS | - WGPEER_F_UPDATE_ONLY + __WGPEER_F_ALL = WGPEER_F_REMOVE_ME | WGPEER_F_REPLACE_ALLOWEDIPS | WGPEER_F_UPDATE_ONLY }; enum wgpeer_attribute { WGPEER_A_UNSPEC, @@ -184,10 +180,7 @@ enum wgpeer_attribute { }; #define WGPEER_A_MAX (__WGPEER_A_LAST - 1) -enum wgallowedip_flag { - WGALLOWEDIP_F_REMOVE_ME = 1U << 0, - __WGALLOWEDIP_F_ALL = WGALLOWEDIP_F_REMOVE_ME -}; +enum wgallowedip_flag { WGALLOWEDIP_F_REMOVE_ME = 1U << 0, __WGALLOWEDIP_F_ALL = WGALLOWEDIP_F_REMOVE_ME }; enum wgallowedip_attribute { WGALLOWEDIP_A_UNSPEC, WGALLOWEDIP_A_FAMILY, diff --git a/include/arch/x86_64/linux/wireless.h b/include/arch/x86_64/linux/wireless.h index c149c2c3..1c82f136 100644 --- a/include/arch/x86_64/linux/wireless.h +++ b/include/arch/x86_64/linux/wireless.h @@ -658,20 +658,15 @@ /* Event capability macros - in (struct iw_range *)->event_capa * Because we have more than 32 possible events, we use an array of * 32 bit bitmasks. Note : 32 bits = 0x20 = 2^5. */ -#define IW_EVENT_CAPA_BASE(cmd) \ - ((cmd >= SIOCIWFIRSTPRIV) ? (cmd - SIOCIWFIRSTPRIV + 0x60) : \ - (cmd - SIOCIWFIRST)) +#define IW_EVENT_CAPA_BASE(cmd) ((cmd >= SIOCIWFIRSTPRIV) ? (cmd - SIOCIWFIRSTPRIV + 0x60) : (cmd - SIOCIWFIRST)) #define IW_EVENT_CAPA_INDEX(cmd) (IW_EVENT_CAPA_BASE(cmd) >> 5) #define IW_EVENT_CAPA_MASK(cmd) (1 << (IW_EVENT_CAPA_BASE(cmd) & 0x1F)) /* Event capability constants - event autogenerated by the kernel * This list is valid for most 802.11 devices, customise as needed... */ -#define IW_EVENT_CAPA_K_0 \ - (IW_EVENT_CAPA_MASK(0x8B04) | IW_EVENT_CAPA_MASK(0x8B06) | \ - IW_EVENT_CAPA_MASK(0x8B1A)) +#define IW_EVENT_CAPA_K_0 (IW_EVENT_CAPA_MASK(0x8B04) | IW_EVENT_CAPA_MASK(0x8B06) | IW_EVENT_CAPA_MASK(0x8B1A)) #define IW_EVENT_CAPA_K_1 (IW_EVENT_CAPA_MASK(0x8B2A)) /* "Easy" macro to set events in iw_range (less efficient) */ -#define IW_EVENT_CAPA_SET(event_capa, cmd) \ - (event_capa[IW_EVENT_CAPA_INDEX(cmd)] |= IW_EVENT_CAPA_MASK(cmd)) +#define IW_EVENT_CAPA_SET(event_capa, cmd) (event_capa[IW_EVENT_CAPA_INDEX(cmd)] |= IW_EVENT_CAPA_MASK(cmd)) #define IW_EVENT_CAPA_SET_KERNEL(event_capa) \ { \ event_capa[0] |= IW_EVENT_CAPA_K_0; \ @@ -836,10 +831,10 @@ struct iw_encode_ext { __u32 ext_flags; /* IW_ENCODE_EXT_* */ __u8 tx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */ __u8 rx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */ - struct sockaddr addr; /* ff:ff:ff:ff:ff:ff for broadcast/multicast - * (group) keys or unicast address for - * individual keys */ - __u16 alg; /* IW_ENCODE_ALG_* */ + struct sockaddr addr; /* ff:ff:ff:ff:ff:ff for broadcast/multicast + * (group) keys or unicast address for + * individual keys */ + __u16 alg; /* IW_ENCODE_ALG_* */ __u16 key_len; __u8 key[]; }; @@ -1028,8 +1023,8 @@ struct iw_range { /* Encoder stuff */ __u16 encoding_size[IW_MAX_ENCODING_SIZES]; /* Different token sizes */ - __u8 num_encoding_sizes; /* Number of entry in the list */ - __u8 max_encoding_tokens; /* Max number of tokens */ + __u8 num_encoding_sizes; /* Number of entry in the list */ + __u8 max_encoding_tokens; /* Max number of tokens */ /* For drivers that need a "login/passwd" form */ __u8 encoding_login_index; /* token index for login token */ @@ -1052,8 +1047,8 @@ struct iw_range { __s32 max_r_time; /* Maximal retry lifetime */ /* Frequency */ - __u16 num_channels; /* Number of channels [0; num - 1] */ - __u8 num_frequency; /* Number of entry in the list */ + __u16 num_channels; /* Number of channels [0; num - 1] */ + __u8 num_frequency; /* Number of entry in the list */ struct iw_freq freq[IW_MAX_FREQUENCIES]; /* list */ /* Note : this frequency list doesn't need to fit channel numbers, * because each entry contain its channel index */ @@ -1102,8 +1097,7 @@ struct iw_event { * the end of the event, so they are bigger than IW_EV_POINT_LEN. Second, * we omit the pointer, so start at an offset. */ #define IW_EV_POINT_OFF offsetof(struct iw_point, length) -#define IW_EV_POINT_LEN \ - (IW_EV_LCP_LEN + sizeof(struct iw_point) - IW_EV_POINT_OFF) +#define IW_EV_POINT_LEN (IW_EV_LCP_LEN + sizeof(struct iw_point) - IW_EV_POINT_OFF) /* Size of the Event prefix when packed in stream */ #define IW_EV_LCP_PK_LEN (4) diff --git a/include/arch/x86_64/linux/xfrm.h b/include/arch/x86_64/linux/xfrm.h index 7667bbff..e50bc661 100644 --- a/include/arch/x86_64/linux/xfrm.h +++ b/include/arch/x86_64/linux/xfrm.h @@ -126,20 +126,9 @@ struct xfrm_stats { __u32 integrity_failed; }; -enum { - XFRM_POLICY_TYPE_MAIN = 0, - XFRM_POLICY_TYPE_SUB = 1, - XFRM_POLICY_TYPE_MAX = 2, - XFRM_POLICY_TYPE_ANY = 255 -}; +enum { XFRM_POLICY_TYPE_MAIN = 0, XFRM_POLICY_TYPE_SUB = 1, XFRM_POLICY_TYPE_MAX = 2, XFRM_POLICY_TYPE_ANY = 255 }; -enum { - XFRM_POLICY_IN = 0, - XFRM_POLICY_OUT = 1, - XFRM_POLICY_FWD = 2, - XFRM_POLICY_MASK = 3, - XFRM_POLICY_MAX = 3 -}; +enum { XFRM_POLICY_IN = 0, XFRM_POLICY_OUT = 1, XFRM_POLICY_FWD = 2, XFRM_POLICY_MASK = 3, XFRM_POLICY_MAX = 3 }; enum xfrm_sa_dir { XFRM_SA_DIR_IN = 1, XFRM_SA_DIR_OUT = 2 }; @@ -324,10 +313,10 @@ enum xfrm_attr_type_t { XFRMA_IPTFS_DROP_TIME, /* __u32 in: usec to wait for next seq */ XFRMA_IPTFS_REORDER_WINDOW, /* __u16 in: reorder window size (pkts) */ XFRMA_IPTFS_DONT_FRAG, /* out: don't use fragmentation */ - XFRMA_IPTFS_INIT_DELAY, /* __u32 out: initial packet wait delay (usec) - */ - XFRMA_IPTFS_MAX_QSIZE, /* __u32 out: max ingress queue size (octets) */ - XFRMA_IPTFS_PKT_SIZE, /* __u32 out: size of outer packet, 0 for PMTU */ + XFRMA_IPTFS_INIT_DELAY, /* __u32 out: initial packet wait delay (usec) + */ + XFRMA_IPTFS_MAX_QSIZE, /* __u32 out: max ingress queue size (octets) */ + XFRMA_IPTFS_PKT_SIZE, /* __u32 out: size of outer packet, 0 for PMTU */ __XFRMA_MAX #define XFRMA_OUTPUT_MARK XFRMA_SET_MARK /* Compatibility */ @@ -441,7 +430,7 @@ struct xfrm_userpolicy_info { #define XFRM_POLICY_BLOCK 1 __u8 flags; #define XFRM_POLICY_LOCALOK 1 /* Allow user to override global policy */ - /* Automatically expand selector to include matching ICMP payloads. */ + /* Automatically expand selector to include matching ICMP payloads. */ #define XFRM_POLICY_ICMP 2 #define XFRM_POLICY_CPU_ACQUIRE 4 __u8 share; diff --git a/include/arch/x86_64/linux/zorro.h b/include/arch/x86_64/linux/zorro.h index d1ca0c2d..0110b76c 100644 --- a/include/arch/x86_64/linux/zorro.h +++ b/include/arch/x86_64/linux/zorro.h @@ -31,8 +31,7 @@ #define ZORRO_PROD(id) (((id) >> 8) & 0xff) #define ZORRO_EPC(id) ((id) & 0xff) -#define ZORRO_ID(manuf, prod, epc) \ - ((ZORRO_MANUF_##manuf << 16) | ((prod) << 8) | (epc)) +#define ZORRO_ID(manuf, prod, epc) ((ZORRO_MANUF_##manuf << 16) | ((prod) << 8) | (epc)) typedef __u32 zorro_id; diff --git a/include/arch/x86_64/linux/zorro_ids.h b/include/arch/x86_64/linux/zorro_ids.h index 12139762..1409a6c4 100644 --- a/include/arch/x86_64/linux/zorro_ids.h +++ b/include/arch/x86_64/linux/zorro_ids.h @@ -5,15 +5,12 @@ * Please keep sorted. */ -#define ZORRO_MANUF_PACIFIC_PERIPHERALS 0x00D3 -#define ZORRO_PROD_PACIFIC_PERIPHERALS_SE_2000_A500 \ - ZORRO_ID(PACIFIC_PERIPHERALS, 0x00, 0) -#define ZORRO_PROD_PACIFIC_PERIPHERALS_SCSI \ - ZORRO_ID(PACIFIC_PERIPHERALS, 0x0A, 0) +#define ZORRO_MANUF_PACIFIC_PERIPHERALS 0x00D3 +#define ZORRO_PROD_PACIFIC_PERIPHERALS_SE_2000_A500 ZORRO_ID(PACIFIC_PERIPHERALS, 0x00, 0) +#define ZORRO_PROD_PACIFIC_PERIPHERALS_SCSI ZORRO_ID(PACIFIC_PERIPHERALS, 0x0A, 0) -#define ZORRO_MANUF_MACROSYSTEMS_USA_2 0x0100 -#define ZORRO_PROD_MACROSYSTEMS_WARP_ENGINE \ - ZORRO_ID(MACROSYSTEMS_USA_2, 0x13, 0) +#define ZORRO_MANUF_MACROSYSTEMS_USA_2 0x0100 +#define ZORRO_PROD_MACROSYSTEMS_WARP_ENGINE ZORRO_ID(MACROSYSTEMS_USA_2, 0x13, 0) #define ZORRO_MANUF_KUPKE_1 0x00DD #define ZORRO_PROD_KUPKE_GOLEM_RAM_BOX_2MB ZORRO_ID(KUPKE_1, 0x00, 0) @@ -30,34 +27,30 @@ #define ZORRO_PROD_CBM_A4091_1 ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x54, 0) #define ZORRO_PROD_CBM_A2386SX_1 ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x67, 0) -#define ZORRO_MANUF_COMMODORE_WEST_CHESTER_1 0x0202 -#define ZORRO_PROD_CBM_A2090A ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x01, 0) -#define ZORRO_PROD_CBM_A590_A2091_1 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x02, 0) -#define ZORRO_PROD_CBM_A590_A2091_2 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x03, 0) -#define ZORRO_PROD_CBM_A2090B ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x04, 0) -#define ZORRO_PROD_CBM_A2060 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x09, 0) -#define ZORRO_PROD_CBM_A590_A2052_A2058_A2091 \ - ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x0A, 0) -#define ZORRO_PROD_CBM_A560_RAM ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x20, 0) -#define ZORRO_PROD_CBM_A2232_PROTOTYPE \ - ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x45, 0) -#define ZORRO_PROD_CBM_A2232 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x46, 0) -#define ZORRO_PROD_CBM_A2620 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x50, 0) -#define ZORRO_PROD_CBM_A2630 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x51, 0) -#define ZORRO_PROD_CBM_A4091_2 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x54, 0) -#define ZORRO_PROD_CBM_A2065_1 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x5A, 0) -#define ZORRO_PROD_CBM_ROMULATOR ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x60, 0) -#define ZORRO_PROD_CBM_A3000_TEST_FIXTURE \ - ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x61, 0) -#define ZORRO_PROD_CBM_A2386SX_2 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x67, 0) -#define ZORRO_PROD_CBM_A2065_2 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x70, 0) +#define ZORRO_MANUF_COMMODORE_WEST_CHESTER_1 0x0202 +#define ZORRO_PROD_CBM_A2090A ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x01, 0) +#define ZORRO_PROD_CBM_A590_A2091_1 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x02, 0) +#define ZORRO_PROD_CBM_A590_A2091_2 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x03, 0) +#define ZORRO_PROD_CBM_A2090B ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x04, 0) +#define ZORRO_PROD_CBM_A2060 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x09, 0) +#define ZORRO_PROD_CBM_A590_A2052_A2058_A2091 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x0A, 0) +#define ZORRO_PROD_CBM_A560_RAM ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x20, 0) +#define ZORRO_PROD_CBM_A2232_PROTOTYPE ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x45, 0) +#define ZORRO_PROD_CBM_A2232 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x46, 0) +#define ZORRO_PROD_CBM_A2620 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x50, 0) +#define ZORRO_PROD_CBM_A2630 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x51, 0) +#define ZORRO_PROD_CBM_A4091_2 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x54, 0) +#define ZORRO_PROD_CBM_A2065_1 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x5A, 0) +#define ZORRO_PROD_CBM_ROMULATOR ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x60, 0) +#define ZORRO_PROD_CBM_A3000_TEST_FIXTURE ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x61, 0) +#define ZORRO_PROD_CBM_A2386SX_2 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x67, 0) +#define ZORRO_PROD_CBM_A2065_2 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x70, 0) #define ZORRO_MANUF_COMMODORE_WEST_CHESTER_2 0x0203 #define ZORRO_PROD_CBM_A2090A_CM ZORRO_ID(COMMODORE_WEST_CHESTER_2, 0x03, 0) #define ZORRO_MANUF_PROGRESSIVE_PERIPHERALS_AND_SYSTEMS_2 0x02F4 -#define ZORRO_PROD_PPS_EXP8000 \ - ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS_2, 0x02, 0) +#define ZORRO_PROD_PPS_EXP8000 ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS_2, 0x02, 0) #define ZORRO_MANUF_KOLFF_COMPUTER_SUPPLIES 0x02FF #define ZORRO_PROD_KCS_POWER_PC_BOARD ZORRO_ID(KOLFF_COMPUTER_SUPPLIES, 0x00, 0) @@ -71,9 +64,8 @@ #define ZORRO_MANUF_A_SQUARED 0x03ED #define ZORRO_PROD_A_SQUARED_LIVE_2000 ZORRO_ID(A_SQUARED, 0x01, 0) -#define ZORRO_MANUF_COMSPEC_COMMUNICATIONS 0x03EE -#define ZORRO_PROD_COMSPEC_COMMUNICATIONS_AX2000 \ - ZORRO_ID(COMSPEC_COMMUNICATIONS, 0x01, 0) +#define ZORRO_MANUF_COMSPEC_COMMUNICATIONS 0x03EE +#define ZORRO_PROD_COMSPEC_COMMUNICATIONS_AX2000 ZORRO_ID(COMSPEC_COMMUNICATIONS, 0x01, 0) #define ZORRO_MANUF_ANAKIN_RESEARCH 0x03F1 #define ZORRO_PROD_ANAKIN_RESEARCH_EASYL ZORRO_ID(ANAKIN_RESEARCH, 0x01, 0) @@ -139,77 +131,53 @@ #define ZORRO_PROD_MTEC_AT500_1 ZORRO_ID(M_TECH, 0x03, 0) #define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_1 0x06E1 -#define ZORRO_PROD_GVP_IMPACT_SERIES_I \ - ZORRO_ID(GREAT_VALLEY_PRODUCTS_1, 0x08, 0) +#define ZORRO_PROD_GVP_IMPACT_SERIES_I ZORRO_ID(GREAT_VALLEY_PRODUCTS_1, 0x08, 0) #define ZORRO_MANUF_BYTEBOX 0x07DA #define ZORRO_PROD_BYTEBOX_A500 ZORRO_ID(BYTEBOX, 0x00, 0) -#define ZORRO_MANUF_DKB_POWER_COMPUTING 0x07DC -#define ZORRO_PROD_DKB_POWER_COMPUTING_SECUREKEY \ - ZORRO_ID(DKB_POWER_COMPUTING, 0x09, 0) -#define ZORRO_PROD_DKB_POWER_COMPUTING_DKM_3128 \ - ZORRO_ID(DKB_POWER_COMPUTING, 0x0E, 0) -#define ZORRO_PROD_DKB_POWER_COMPUTING_RAPID_FIRE \ - ZORRO_ID(DKB_POWER_COMPUTING, 0x0F, 0) -#define ZORRO_PROD_DKB_POWER_COMPUTING_DKM_1202 \ - ZORRO_ID(DKB_POWER_COMPUTING, 0x10, 0) -#define ZORRO_PROD_DKB_POWER_COMPUTING_COBRA_VIPER_II_68EC030 \ - ZORRO_ID(DKB_POWER_COMPUTING, 0x12, 0) -#define ZORRO_PROD_DKB_POWER_COMPUTING_WILDFIRE_060_1 \ - ZORRO_ID(DKB_POWER_COMPUTING, 0x17, 0) -#define ZORRO_PROD_DKB_POWER_COMPUTING_WILDFIRE_060_2 \ - ZORRO_ID(DKB_POWER_COMPUTING, 0xFF, 0) - -#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_2 0x07E1 -#define ZORRO_PROD_GVP_IMPACT_SERIES_I_4K \ - ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x01, 0) -#define ZORRO_PROD_GVP_IMPACT_SERIES_I_16K_2 \ - ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x02, 0) -#define ZORRO_PROD_GVP_IMPACT_SERIES_I_16K_3 \ - ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x03, 0) -#define ZORRO_PROD_GVP_IMPACT_3001_IDE_1 \ - ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x08, 0) -#define ZORRO_PROD_GVP_IMPACT_3001_RAM \ - ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x09, 0) -#define ZORRO_PROD_GVP_IMPACT_SERIES_II_RAM_1 \ - ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0A, 0) -#define ZORRO_PROD_GVP_EPC_BASE ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0) -#define ZORRO_PROD_GVP_GFORCE_040_1 \ - ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x20) -#define ZORRO_PROD_GVP_GFORCE_040_SCSI_1 \ - ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x30) -#define ZORRO_PROD_GVP_A1291 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x40) -#define ZORRO_PROD_GVP_COMBO_030_R4 \ - ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x60) -#define ZORRO_PROD_GVP_COMBO_030_R4_SCSI \ - ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x70) -#define ZORRO_PROD_GVP_PHONEPAK ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x78) -#define ZORRO_PROD_GVP_IO_EXTENDER ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x98) -#define ZORRO_PROD_GVP_GFORCE_030 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xa0) -#define ZORRO_PROD_GVP_GFORCE_030_SCSI \ - ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xb0) -#define ZORRO_PROD_GVP_A530 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xc0) -#define ZORRO_PROD_GVP_A530_SCSI ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xd0) -#define ZORRO_PROD_GVP_COMBO_030_R3 \ - ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xe0) -#define ZORRO_PROD_GVP_COMBO_030_R3_SCSI \ - ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xf0) -#define ZORRO_PROD_GVP_SERIES_II ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xf8) -#define ZORRO_PROD_GVP_IMPACT_3001_IDE_2 \ - ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0D, 0) +#define ZORRO_MANUF_DKB_POWER_COMPUTING 0x07DC +#define ZORRO_PROD_DKB_POWER_COMPUTING_SECUREKEY ZORRO_ID(DKB_POWER_COMPUTING, 0x09, 0) +#define ZORRO_PROD_DKB_POWER_COMPUTING_DKM_3128 ZORRO_ID(DKB_POWER_COMPUTING, 0x0E, 0) +#define ZORRO_PROD_DKB_POWER_COMPUTING_RAPID_FIRE ZORRO_ID(DKB_POWER_COMPUTING, 0x0F, 0) +#define ZORRO_PROD_DKB_POWER_COMPUTING_DKM_1202 ZORRO_ID(DKB_POWER_COMPUTING, 0x10, 0) +#define ZORRO_PROD_DKB_POWER_COMPUTING_COBRA_VIPER_II_68EC030 ZORRO_ID(DKB_POWER_COMPUTING, 0x12, 0) +#define ZORRO_PROD_DKB_POWER_COMPUTING_WILDFIRE_060_1 ZORRO_ID(DKB_POWER_COMPUTING, 0x17, 0) +#define ZORRO_PROD_DKB_POWER_COMPUTING_WILDFIRE_060_2 ZORRO_ID(DKB_POWER_COMPUTING, 0xFF, 0) + +#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_2 0x07E1 +#define ZORRO_PROD_GVP_IMPACT_SERIES_I_4K ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x01, 0) +#define ZORRO_PROD_GVP_IMPACT_SERIES_I_16K_2 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x02, 0) +#define ZORRO_PROD_GVP_IMPACT_SERIES_I_16K_3 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x03, 0) +#define ZORRO_PROD_GVP_IMPACT_3001_IDE_1 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x08, 0) +#define ZORRO_PROD_GVP_IMPACT_3001_RAM ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x09, 0) +#define ZORRO_PROD_GVP_IMPACT_SERIES_II_RAM_1 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0A, 0) +#define ZORRO_PROD_GVP_EPC_BASE ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0) +#define ZORRO_PROD_GVP_GFORCE_040_1 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x20) +#define ZORRO_PROD_GVP_GFORCE_040_SCSI_1 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x30) +#define ZORRO_PROD_GVP_A1291 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x40) +#define ZORRO_PROD_GVP_COMBO_030_R4 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x60) +#define ZORRO_PROD_GVP_COMBO_030_R4_SCSI ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x70) +#define ZORRO_PROD_GVP_PHONEPAK ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x78) +#define ZORRO_PROD_GVP_IO_EXTENDER ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x98) +#define ZORRO_PROD_GVP_GFORCE_030 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xa0) +#define ZORRO_PROD_GVP_GFORCE_030_SCSI ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xb0) +#define ZORRO_PROD_GVP_A530 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xc0) +#define ZORRO_PROD_GVP_A530_SCSI ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xd0) +#define ZORRO_PROD_GVP_COMBO_030_R3 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xe0) +#define ZORRO_PROD_GVP_COMBO_030_R3_SCSI ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xf0) +#define ZORRO_PROD_GVP_SERIES_II ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xf8) +#define ZORRO_PROD_GVP_IMPACT_3001_IDE_2 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0D, 0) /*#define ZORRO_PROD_GVP_A2000_030 * ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0D, 0)*/ /*#define ZORRO_PROD_GVP_GFORCE_040_SCSI_2 * ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0D, 0)*/ -#define ZORRO_PROD_GVP_GFORCE_040_060 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x16, 0) -#define ZORRO_PROD_GVP_IMPACT_VISION_24 \ - ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x20, 0) -#define ZORRO_PROD_GVP_GFORCE_040_2 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0xFF, 0) +#define ZORRO_PROD_GVP_GFORCE_040_060 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x16, 0) +#define ZORRO_PROD_GVP_IMPACT_VISION_24 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x20, 0) +#define ZORRO_PROD_GVP_GFORCE_040_2 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0xFF, 0) -#define ZORRO_MANUF_CALIFORNIA_ACCESS_SYNERGY 0x07E5 -#define ZORRO_PROD_CALIFORNIA_ACCESS_SYNERGY_MALIBU \ - ZORRO_ID(CALIFORNIA_ACCESS_SYNERGY, 0x01, 0) +#define ZORRO_MANUF_CALIFORNIA_ACCESS_SYNERGY 0x07E5 +#define ZORRO_PROD_CALIFORNIA_ACCESS_SYNERGY_MALIBU ZORRO_ID(CALIFORNIA_ACCESS_SYNERGY, 0x01, 0) #define ZORRO_MANUF_XETEC 0x07E6 #define ZORRO_PROD_XETEC_FASTCARD ZORRO_ID(XETEC, 0x01, 0) @@ -217,31 +185,22 @@ #define ZORRO_PROD_XETEC_FASTCARD_PLUS ZORRO_ID(XETEC, 0x03, 0) #define ZORRO_MANUF_PROGRESSIVE_PERIPHERALS_AND_SYSTEMS 0x07EA -#define ZORRO_PROD_PPS_MERCURY \ - ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x00, 0) -#define ZORRO_PROD_PPS_A3000_68040 \ - ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x01, 0) -#define ZORRO_PROD_PPS_A2000_68040 \ - ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x69, 0) -#define ZORRO_PROD_PPS_ZEUS \ - ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x96, 0) -#define ZORRO_PROD_PPS_A500_68040 \ - ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0xBB, 0) +#define ZORRO_PROD_PPS_MERCURY ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x00, 0) +#define ZORRO_PROD_PPS_A3000_68040 ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x01, 0) +#define ZORRO_PROD_PPS_A2000_68040 ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x69, 0) +#define ZORRO_PROD_PPS_ZEUS ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x96, 0) +#define ZORRO_PROD_PPS_A500_68040 ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0xBB, 0) #define ZORRO_MANUF_XEBEC 0x07EC -#define ZORRO_MANUF_SPIRIT_TECHNOLOGY 0x07F2 -#define ZORRO_PROD_SPIRIT_TECHNOLOGY_INSIDER_IN1000 \ - ZORRO_ID(SPIRIT_TECHNOLOGY, 0x01, 0) -#define ZORRO_PROD_SPIRIT_TECHNOLOGY_INSIDER_IN500 \ - ZORRO_ID(SPIRIT_TECHNOLOGY, 0x02, 0) -#define ZORRO_PROD_SPIRIT_TECHNOLOGY_SIN500 ZORRO_ID(SPIRIT_TECHNOLOGY, 0x03, 0) -#define ZORRO_PROD_SPIRIT_TECHNOLOGY_HDA_506 \ - ZORRO_ID(SPIRIT_TECHNOLOGY, 0x04, 0) -#define ZORRO_PROD_SPIRIT_TECHNOLOGY_AX_S ZORRO_ID(SPIRIT_TECHNOLOGY, 0x05, 0) -#define ZORRO_PROD_SPIRIT_TECHNOLOGY_OCTABYTE \ - ZORRO_ID(SPIRIT_TECHNOLOGY, 0x06, 0) -#define ZORRO_PROD_SPIRIT_TECHNOLOGY_INMATE ZORRO_ID(SPIRIT_TECHNOLOGY, 0x08, 0) +#define ZORRO_MANUF_SPIRIT_TECHNOLOGY 0x07F2 +#define ZORRO_PROD_SPIRIT_TECHNOLOGY_INSIDER_IN1000 ZORRO_ID(SPIRIT_TECHNOLOGY, 0x01, 0) +#define ZORRO_PROD_SPIRIT_TECHNOLOGY_INSIDER_IN500 ZORRO_ID(SPIRIT_TECHNOLOGY, 0x02, 0) +#define ZORRO_PROD_SPIRIT_TECHNOLOGY_SIN500 ZORRO_ID(SPIRIT_TECHNOLOGY, 0x03, 0) +#define ZORRO_PROD_SPIRIT_TECHNOLOGY_HDA_506 ZORRO_ID(SPIRIT_TECHNOLOGY, 0x04, 0) +#define ZORRO_PROD_SPIRIT_TECHNOLOGY_AX_S ZORRO_ID(SPIRIT_TECHNOLOGY, 0x05, 0) +#define ZORRO_PROD_SPIRIT_TECHNOLOGY_OCTABYTE ZORRO_ID(SPIRIT_TECHNOLOGY, 0x06, 0) +#define ZORRO_PROD_SPIRIT_TECHNOLOGY_INMATE ZORRO_ID(SPIRIT_TECHNOLOGY, 0x08, 0) #define ZORRO_MANUF_SPIRIT_TECHNOLOGY_2 0x07F3 @@ -260,9 +219,8 @@ #define ZORRO_MANUF_JOCHHEIM 0x0804 #define ZORRO_PROD_JOCHHEIM_RAM ZORRO_ID(JOCHHEIM, 0x01, 0) -#define ZORRO_MANUF_CHECKPOINT_TECHNOLOGIES 0x0807 -#define ZORRO_PROD_CHECKPOINT_TECHNOLOGIES_SERIAL_SOLUTION \ - ZORRO_ID(CHECKPOINT_TECHNOLOGIES, 0x00, 0) +#define ZORRO_MANUF_CHECKPOINT_TECHNOLOGIES 0x0807 +#define ZORRO_PROD_CHECKPOINT_TECHNOLOGIES_SERIAL_SOLUTION ZORRO_ID(CHECKPOINT_TECHNOLOGIES, 0x00, 0) #define ZORRO_MANUF_EDOTRONIK 0x0810 #define ZORRO_PROD_EDOTRONIK_IEEE_488 ZORRO_ID(EDOTRONIK, 0x01, 0) @@ -290,22 +248,18 @@ #define ZORRO_PROD_KUPKE_030_882 ZORRO_ID(KUPKE_2, 0x04, 0) #define ZORRO_PROD_KUPKE_SCSI_AT ZORRO_ID(KUPKE_2, 0x05, 0) -#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_3 0x081D -#define ZORRO_PROD_GVP_A2000_RAM8 ZORRO_ID(GREAT_VALLEY_PRODUCTS_3, 0x09, 0) -#define ZORRO_PROD_GVP_IMPACT_SERIES_II_RAM_2 \ - ZORRO_ID(GREAT_VALLEY_PRODUCTS_3, 0x0A, 0) +#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_3 0x081D +#define ZORRO_PROD_GVP_A2000_RAM8 ZORRO_ID(GREAT_VALLEY_PRODUCTS_3, 0x09, 0) +#define ZORRO_PROD_GVP_IMPACT_SERIES_II_RAM_2 ZORRO_ID(GREAT_VALLEY_PRODUCTS_3, 0x0A, 0) #define ZORRO_MANUF_INTERWORKS_NETWORK 0x081E -#define ZORRO_MANUF_HARDITAL_SYNTHESIS 0x0820 -#define ZORRO_PROD_HARDITAL_SYNTHESIS_TQM_68030_68882 \ - ZORRO_ID(HARDITAL_SYNTHESIS, 0x14, 0) +#define ZORRO_MANUF_HARDITAL_SYNTHESIS 0x0820 +#define ZORRO_PROD_HARDITAL_SYNTHESIS_TQM_68030_68882 ZORRO_ID(HARDITAL_SYNTHESIS, 0x14, 0) -#define ZORRO_MANUF_APPLIED_ENGINEERING 0x0828 -#define ZORRO_PROD_APPLIED_ENGINEERING_DL2000 \ - ZORRO_ID(APPLIED_ENGINEERING, 0x10, 0) -#define ZORRO_PROD_APPLIED_ENGINEERING_RAM_WORKS \ - ZORRO_ID(APPLIED_ENGINEERING, 0xE0, 0) +#define ZORRO_MANUF_APPLIED_ENGINEERING 0x0828 +#define ZORRO_PROD_APPLIED_ENGINEERING_DL2000 ZORRO_ID(APPLIED_ENGINEERING, 0x10, 0) +#define ZORRO_PROD_APPLIED_ENGINEERING_RAM_WORKS ZORRO_ID(APPLIED_ENGINEERING, 0xE0, 0) #define ZORRO_MANUF_BSC_ALFADATA_3 0x082C #define ZORRO_PROD_BSC_OKTAGON_2008 ZORRO_ID(BSC_ALFADATA_3, 0x05, 0) @@ -326,11 +280,9 @@ #define ZORRO_PROD_PHOENIX_SCSI ZORRO_ID(PHOENIX, 0x22, 0) #define ZORRO_PROD_PHOENIX_RAM ZORRO_ID(PHOENIX, 0xBE, 0) -#define ZORRO_MANUF_ADVANCED_STORAGE_SYSTEMS 0x0836 -#define ZORRO_PROD_ADVANCED_STORAGE_SYSTEMS_NEXUS \ - ZORRO_ID(ADVANCED_STORAGE_SYSTEMS, 0x01, 0) -#define ZORRO_PROD_ADVANCED_STORAGE_SYSTEMS_NEXUS_RAM \ - ZORRO_ID(ADVANCED_STORAGE_SYSTEMS, 0x08, 0) +#define ZORRO_MANUF_ADVANCED_STORAGE_SYSTEMS 0x0836 +#define ZORRO_PROD_ADVANCED_STORAGE_SYSTEMS_NEXUS ZORRO_ID(ADVANCED_STORAGE_SYSTEMS, 0x01, 0) +#define ZORRO_PROD_ADVANCED_STORAGE_SYSTEMS_NEXUS_RAM ZORRO_ID(ADVANCED_STORAGE_SYSTEMS, 0x08, 0) #define ZORRO_MANUF_IMPULSE 0x0838 #define ZORRO_PROD_IMPULSE_FIRECRACKER_24 ZORRO_ID(IMPULSE, 0x00, 0) @@ -359,21 +311,17 @@ #define ZORRO_MANUF_HYDRA_SYSTEMS 0x0849 #define ZORRO_PROD_HYDRA_SYSTEMS_AMIGANET ZORRO_ID(HYDRA_SYSTEMS, 0x01, 0) -#define ZORRO_MANUF_SUNRIZE_INDUSTRIES 0x084F -#define ZORRO_PROD_SUNRIZE_INDUSTRIES_AD1012 \ - ZORRO_ID(SUNRIZE_INDUSTRIES, 0x01, 0) -#define ZORRO_PROD_SUNRIZE_INDUSTRIES_AD516 \ - ZORRO_ID(SUNRIZE_INDUSTRIES, 0x02, 0) -#define ZORRO_PROD_SUNRIZE_INDUSTRIES_DD512 \ - ZORRO_ID(SUNRIZE_INDUSTRIES, 0x03, 0) +#define ZORRO_MANUF_SUNRIZE_INDUSTRIES 0x084F +#define ZORRO_PROD_SUNRIZE_INDUSTRIES_AD1012 ZORRO_ID(SUNRIZE_INDUSTRIES, 0x01, 0) +#define ZORRO_PROD_SUNRIZE_INDUSTRIES_AD516 ZORRO_ID(SUNRIZE_INDUSTRIES, 0x02, 0) +#define ZORRO_PROD_SUNRIZE_INDUSTRIES_DD512 ZORRO_ID(SUNRIZE_INDUSTRIES, 0x03, 0) #define ZORRO_MANUF_TRICERATOPS 0x0850 #define ZORRO_PROD_TRICERATOPS_MULTI_IO ZORRO_ID(TRICERATOPS, 0x01, 0) -#define ZORRO_MANUF_APPLIED_MAGIC 0x0851 -#define ZORRO_PROD_APPLIED_MAGIC_DMI_RESOLVER ZORRO_ID(APPLIED_MAGIC, 0x01, 0) -#define ZORRO_PROD_APPLIED_MAGIC_DIGITAL_BROADCASTER \ - ZORRO_ID(APPLIED_MAGIC, 0x06, 0) +#define ZORRO_MANUF_APPLIED_MAGIC 0x0851 +#define ZORRO_PROD_APPLIED_MAGIC_DMI_RESOLVER ZORRO_ID(APPLIED_MAGIC, 0x01, 0) +#define ZORRO_PROD_APPLIED_MAGIC_DIGITAL_BROADCASTER ZORRO_ID(APPLIED_MAGIC, 0x06, 0) #define ZORRO_MANUF_GFX_BASE 0x085E #define ZORRO_PROD_GFX_BASE_GDA_1_VRAM ZORRO_ID(GFX_BASE, 0x00, 0) @@ -396,9 +344,8 @@ #define ZORRO_MANUF_ACS 0x0865 -#define ZORRO_MANUF_SOFTWARE_RESULTS_ENTERPRISES 0x0866 -#define ZORRO_PROD_SOFTWARE_RESULTS_ENTERPRISES_GOLDEN_GATE_2_BUS_PLUS \ - ZORRO_ID(SOFTWARE_RESULTS_ENTERPRISES, 0x01, 0) +#define ZORRO_MANUF_SOFTWARE_RESULTS_ENTERPRISES 0x0866 +#define ZORRO_PROD_SOFTWARE_RESULTS_ENTERPRISES_GOLDEN_GATE_2_BUS_PLUS ZORRO_ID(SOFTWARE_RESULTS_ENTERPRISES, 0x01, 0) #define ZORRO_MANUF_MASOBOSHI 0x086D #define ZORRO_PROD_MASOBOSHI_MASTER_CARD_SC201 ZORRO_ID(MASOBOSHI, 0x03, 0) @@ -408,33 +355,23 @@ #define ZORRO_MANUF_MAINHATTAN_DATA 0x086F #define ZORRO_PROD_MAINHATTAN_DATA_IDE ZORRO_ID(MAINHATTAN_DATA, 0x01, 0) -#define ZORRO_MANUF_VILLAGE_TRONIC 0x0877 -#define ZORRO_PROD_VILLAGE_TRONIC_DOMINO_RAM ZORRO_ID(VILLAGE_TRONIC, 0x01, 0) -#define ZORRO_PROD_VILLAGE_TRONIC_DOMINO_REG ZORRO_ID(VILLAGE_TRONIC, 0x02, 0) -#define ZORRO_PROD_VILLAGE_TRONIC_DOMINO_16M_PROTOTYPE \ - ZORRO_ID(VILLAGE_TRONIC, 0x03, 0) -#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_RAM \ - ZORRO_ID(VILLAGE_TRONIC, 0x0B, 0) -#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_REG \ - ZORRO_ID(VILLAGE_TRONIC, 0x0C, 0) -#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_SEGMENTED_MODE \ - ZORRO_ID(VILLAGE_TRONIC, 0x0D, 0) -#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_RAM1 \ - ZORRO_ID(VILLAGE_TRONIC, 0x15, 0) -#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_RAM2 \ - ZORRO_ID(VILLAGE_TRONIC, 0x16, 0) -#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_REG \ - ZORRO_ID(VILLAGE_TRONIC, 0x17, 0) -#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z3 \ - ZORRO_ID(VILLAGE_TRONIC, 0x18, 0) -#define ZORRO_PROD_VILLAGE_TRONIC_ARIADNE ZORRO_ID(VILLAGE_TRONIC, 0xC9, 0) -#define ZORRO_PROD_VILLAGE_TRONIC_ARIADNE2 ZORRO_ID(VILLAGE_TRONIC, 0xCA, 0) - -#define ZORRO_MANUF_UTILITIES_UNLIMITED 0x087B -#define ZORRO_PROD_UTILITIES_UNLIMITED_EMPLANT_DELUXE \ - ZORRO_ID(UTILITIES_UNLIMITED, 0x15, 0) -#define ZORRO_PROD_UTILITIES_UNLIMITED_EMPLANT_DELUXE2 \ - ZORRO_ID(UTILITIES_UNLIMITED, 0x20, 0) +#define ZORRO_MANUF_VILLAGE_TRONIC 0x0877 +#define ZORRO_PROD_VILLAGE_TRONIC_DOMINO_RAM ZORRO_ID(VILLAGE_TRONIC, 0x01, 0) +#define ZORRO_PROD_VILLAGE_TRONIC_DOMINO_REG ZORRO_ID(VILLAGE_TRONIC, 0x02, 0) +#define ZORRO_PROD_VILLAGE_TRONIC_DOMINO_16M_PROTOTYPE ZORRO_ID(VILLAGE_TRONIC, 0x03, 0) +#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_RAM ZORRO_ID(VILLAGE_TRONIC, 0x0B, 0) +#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_REG ZORRO_ID(VILLAGE_TRONIC, 0x0C, 0) +#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_SEGMENTED_MODE ZORRO_ID(VILLAGE_TRONIC, 0x0D, 0) +#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_RAM1 ZORRO_ID(VILLAGE_TRONIC, 0x15, 0) +#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_RAM2 ZORRO_ID(VILLAGE_TRONIC, 0x16, 0) +#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_REG ZORRO_ID(VILLAGE_TRONIC, 0x17, 0) +#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z3 ZORRO_ID(VILLAGE_TRONIC, 0x18, 0) +#define ZORRO_PROD_VILLAGE_TRONIC_ARIADNE ZORRO_ID(VILLAGE_TRONIC, 0xC9, 0) +#define ZORRO_PROD_VILLAGE_TRONIC_ARIADNE2 ZORRO_ID(VILLAGE_TRONIC, 0xCA, 0) + +#define ZORRO_MANUF_UTILITIES_UNLIMITED 0x087B +#define ZORRO_PROD_UTILITIES_UNLIMITED_EMPLANT_DELUXE ZORRO_ID(UTILITIES_UNLIMITED, 0x15, 0) +#define ZORRO_PROD_UTILITIES_UNLIMITED_EMPLANT_DELUXE2 ZORRO_ID(UTILITIES_UNLIMITED, 0x20, 0) #define ZORRO_MANUF_AMITRIX 0x0880 #define ZORRO_PROD_AMITRIX_MULTI_IO ZORRO_ID(AMITRIX, 0x01, 0) @@ -449,22 +386,18 @@ #define ZORRO_MANUF_NEWTEK 0x088F #define ZORRO_PROD_NEWTEK_VIDEOTOASTER ZORRO_ID(NEWTEK, 0x00, 0) -#define ZORRO_MANUF_M_TECH_GERMANY 0x0890 -#define ZORRO_PROD_MTEC_AT500_2 ZORRO_ID(M_TECH_GERMANY, 0x01, 0) -#define ZORRO_PROD_MTEC_68030 ZORRO_ID(M_TECH_GERMANY, 0x03, 0) -#define ZORRO_PROD_MTEC_68020I ZORRO_ID(M_TECH_GERMANY, 0x06, 0) -#define ZORRO_PROD_MTEC_A1200_T68030_RTC ZORRO_ID(M_TECH_GERMANY, 0x20, 0) -#define ZORRO_PROD_MTEC_VIPER_MK_V_E_MATRIX_530 \ - ZORRO_ID(M_TECH_GERMANY, 0x21, 0) -#define ZORRO_PROD_MTEC_8_MB_RAM ZORRO_ID(M_TECH_GERMANY, 0x22, 0) -#define ZORRO_PROD_MTEC_VIPER_MK_V_E_MATRIX_530_SCSI_IDE \ - ZORRO_ID(M_TECH_GERMANY, 0x24, 0) - -#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_4 0x0891 -#define ZORRO_PROD_GVP_EGS_28_24_SPECTRUM_RAM \ - ZORRO_ID(GREAT_VALLEY_PRODUCTS_4, 0x01, 0) -#define ZORRO_PROD_GVP_EGS_28_24_SPECTRUM_REG \ - ZORRO_ID(GREAT_VALLEY_PRODUCTS_4, 0x02, 0) +#define ZORRO_MANUF_M_TECH_GERMANY 0x0890 +#define ZORRO_PROD_MTEC_AT500_2 ZORRO_ID(M_TECH_GERMANY, 0x01, 0) +#define ZORRO_PROD_MTEC_68030 ZORRO_ID(M_TECH_GERMANY, 0x03, 0) +#define ZORRO_PROD_MTEC_68020I ZORRO_ID(M_TECH_GERMANY, 0x06, 0) +#define ZORRO_PROD_MTEC_A1200_T68030_RTC ZORRO_ID(M_TECH_GERMANY, 0x20, 0) +#define ZORRO_PROD_MTEC_VIPER_MK_V_E_MATRIX_530 ZORRO_ID(M_TECH_GERMANY, 0x21, 0) +#define ZORRO_PROD_MTEC_8_MB_RAM ZORRO_ID(M_TECH_GERMANY, 0x22, 0) +#define ZORRO_PROD_MTEC_VIPER_MK_V_E_MATRIX_530_SCSI_IDE ZORRO_ID(M_TECH_GERMANY, 0x24, 0) + +#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_4 0x0891 +#define ZORRO_PROD_GVP_EGS_28_24_SPECTRUM_RAM ZORRO_ID(GREAT_VALLEY_PRODUCTS_4, 0x01, 0) +#define ZORRO_PROD_GVP_EGS_28_24_SPECTRUM_REG ZORRO_ID(GREAT_VALLEY_PRODUCTS_4, 0x02, 0) #define ZORRO_MANUF_APOLLO_1 0x0892 #define ZORRO_PROD_APOLLO_A1200 ZORRO_ID(APOLLO_1, 0x01, 0) @@ -477,17 +410,15 @@ #define ZORRO_PROD_HELFRICH_SD64_RAM ZORRO_ID(HELFRICH_2, 0x0A, 0) #define ZORRO_PROD_HELFRICH_SD64_REG ZORRO_ID(HELFRICH_2, 0x0B, 0) -#define ZORRO_MANUF_MACROSYSTEMS_USA 0x089B -#define ZORRO_PROD_MACROSYSTEMS_WARP_ENGINE_40xx \ - ZORRO_ID(MACROSYSTEMS_USA, 0x13, 0) +#define ZORRO_MANUF_MACROSYSTEMS_USA 0x089B +#define ZORRO_PROD_MACROSYSTEMS_WARP_ENGINE_40xx ZORRO_ID(MACROSYSTEMS_USA, 0x13, 0) #define ZORRO_MANUF_ELBOX_COMPUTER 0x089E #define ZORRO_PROD_ELBOX_COMPUTER_1200_4 ZORRO_ID(ELBOX_COMPUTER, 0x06, 0) -#define ZORRO_MANUF_HARMS_PROFESSIONAL 0x0A00 -#define ZORRO_PROD_HARMS_PROFESSIONAL_030_PLUS \ - ZORRO_ID(HARMS_PROFESSIONAL, 0x10, 0) -#define ZORRO_PROD_HARMS_PROFESSIONAL_3500 ZORRO_ID(HARMS_PROFESSIONAL, 0xD0, 0) +#define ZORRO_MANUF_HARMS_PROFESSIONAL 0x0A00 +#define ZORRO_PROD_HARMS_PROFESSIONAL_030_PLUS ZORRO_ID(HARMS_PROFESSIONAL, 0x10, 0) +#define ZORRO_PROD_HARMS_PROFESSIONAL_3500 ZORRO_ID(HARMS_PROFESSIONAL, 0xD0, 0) #define ZORRO_MANUF_MICRONIK 0x0A50 #define ZORRO_PROD_MICRONIK_RCA_120 ZORRO_ID(MICRONIK, 0x0A, 0) @@ -504,13 +435,10 @@ #define ZORRO_PROD_IMTRONICS_HURRICANE_2800_4 ZORRO_ID(IMTRONICS_2, 0x57, 0) /* unofficial ID */ -#define ZORRO_MANUF_INDIVIDUAL_COMPUTERS 0x1212 -#define ZORRO_PROD_INDIVIDUAL_COMPUTERS_BUDDHA \ - ZORRO_ID(INDIVIDUAL_COMPUTERS, 0x00, 0) -#define ZORRO_PROD_INDIVIDUAL_COMPUTERS_X_SURF \ - ZORRO_ID(INDIVIDUAL_COMPUTERS, 0x17, 0) -#define ZORRO_PROD_INDIVIDUAL_COMPUTERS_CATWEASEL \ - ZORRO_ID(INDIVIDUAL_COMPUTERS, 0x2A, 0) +#define ZORRO_MANUF_INDIVIDUAL_COMPUTERS 0x1212 +#define ZORRO_PROD_INDIVIDUAL_COMPUTERS_BUDDHA ZORRO_ID(INDIVIDUAL_COMPUTERS, 0x00, 0) +#define ZORRO_PROD_INDIVIDUAL_COMPUTERS_X_SURF ZORRO_ID(INDIVIDUAL_COMPUTERS, 0x17, 0) +#define ZORRO_PROD_INDIVIDUAL_COMPUTERS_CATWEASEL ZORRO_ID(INDIVIDUAL_COMPUTERS, 0x2A, 0) #define ZORRO_MANUF_KUPKE_3 0x1248 #define ZORRO_PROD_KUPKE_GOLEM_HD_3000 ZORRO_ID(KUPKE_3, 0x01, 0) @@ -533,32 +461,29 @@ #define ZORRO_PROD_VORTEX_GOLDEN_GATE_RAM ZORRO_ID(VORTEX, 0x08, 0) #define ZORRO_PROD_VORTEX_GOLDEN_GATE_80486 ZORRO_ID(VORTEX, 0x09, 0) -#define ZORRO_MANUF_EXPANSION_SYSTEMS 0x2062 -#define ZORRO_PROD_EXPANSION_SYSTEMS_DATAFLYER_4000SX \ - ZORRO_ID(EXPANSION_SYSTEMS, 0x01, 0) -#define ZORRO_PROD_EXPANSION_SYSTEMS_DATAFLYER_4000SX_RAM \ - ZORRO_ID(EXPANSION_SYSTEMS, 0x02, 0) +#define ZORRO_MANUF_EXPANSION_SYSTEMS 0x2062 +#define ZORRO_PROD_EXPANSION_SYSTEMS_DATAFLYER_4000SX ZORRO_ID(EXPANSION_SYSTEMS, 0x01, 0) +#define ZORRO_PROD_EXPANSION_SYSTEMS_DATAFLYER_4000SX_RAM ZORRO_ID(EXPANSION_SYSTEMS, 0x02, 0) #define ZORRO_MANUF_READYSOFT 0x2100 #define ZORRO_PROD_READYSOFT_AMAX_II_IV ZORRO_ID(READYSOFT, 0x01, 0) -#define ZORRO_MANUF_PHASE5 0x2140 -#define ZORRO_PROD_PHASE5_BLIZZARD_RAM ZORRO_ID(PHASE5, 0x01, 0) -#define ZORRO_PROD_PHASE5_BLIZZARD ZORRO_ID(PHASE5, 0x02, 0) -#define ZORRO_PROD_PHASE5_BLIZZARD_1220_IV ZORRO_ID(PHASE5, 0x06, 0) -#define ZORRO_PROD_PHASE5_FASTLANE_Z3_RAM ZORRO_ID(PHASE5, 0x0A, 0) -#define ZORRO_PROD_PHASE5_BLIZZARD_1230_II_FASTLANE_Z3_CYBERSCSI_CYBERSTORM060 \ - ZORRO_ID(PHASE5, 0x0B, 0) -#define ZORRO_PROD_PHASE5_BLIZZARD_1220_CYBERSTORM ZORRO_ID(PHASE5, 0x0C, 0) -#define ZORRO_PROD_PHASE5_BLIZZARD_1230 ZORRO_ID(PHASE5, 0x0D, 0) -#define ZORRO_PROD_PHASE5_BLIZZARD_1230_IV_1260 ZORRO_ID(PHASE5, 0x11, 0) -#define ZORRO_PROD_PHASE5_BLIZZARD_2060 ZORRO_ID(PHASE5, 0x18, 0) -#define ZORRO_PROD_PHASE5_CYBERSTORM_MK_II ZORRO_ID(PHASE5, 0x19, 0) -#define ZORRO_PROD_PHASE5_CYBERVISION64 ZORRO_ID(PHASE5, 0x22, 0) -#define ZORRO_PROD_PHASE5_CYBERVISION64_3D_PROTOTYPE ZORRO_ID(PHASE5, 0x32, 0) -#define ZORRO_PROD_PHASE5_CYBERVISION64_3D ZORRO_ID(PHASE5, 0x43, 0) -#define ZORRO_PROD_PHASE5_CYBERSTORM_MK_III ZORRO_ID(PHASE5, 0x64, 0) -#define ZORRO_PROD_PHASE5_BLIZZARD_603E_PLUS ZORRO_ID(PHASE5, 0x6e, 0) +#define ZORRO_MANUF_PHASE5 0x2140 +#define ZORRO_PROD_PHASE5_BLIZZARD_RAM ZORRO_ID(PHASE5, 0x01, 0) +#define ZORRO_PROD_PHASE5_BLIZZARD ZORRO_ID(PHASE5, 0x02, 0) +#define ZORRO_PROD_PHASE5_BLIZZARD_1220_IV ZORRO_ID(PHASE5, 0x06, 0) +#define ZORRO_PROD_PHASE5_FASTLANE_Z3_RAM ZORRO_ID(PHASE5, 0x0A, 0) +#define ZORRO_PROD_PHASE5_BLIZZARD_1230_II_FASTLANE_Z3_CYBERSCSI_CYBERSTORM060 ZORRO_ID(PHASE5, 0x0B, 0) +#define ZORRO_PROD_PHASE5_BLIZZARD_1220_CYBERSTORM ZORRO_ID(PHASE5, 0x0C, 0) +#define ZORRO_PROD_PHASE5_BLIZZARD_1230 ZORRO_ID(PHASE5, 0x0D, 0) +#define ZORRO_PROD_PHASE5_BLIZZARD_1230_IV_1260 ZORRO_ID(PHASE5, 0x11, 0) +#define ZORRO_PROD_PHASE5_BLIZZARD_2060 ZORRO_ID(PHASE5, 0x18, 0) +#define ZORRO_PROD_PHASE5_CYBERSTORM_MK_II ZORRO_ID(PHASE5, 0x19, 0) +#define ZORRO_PROD_PHASE5_CYBERVISION64 ZORRO_ID(PHASE5, 0x22, 0) +#define ZORRO_PROD_PHASE5_CYBERVISION64_3D_PROTOTYPE ZORRO_ID(PHASE5, 0x32, 0) +#define ZORRO_PROD_PHASE5_CYBERVISION64_3D ZORRO_ID(PHASE5, 0x43, 0) +#define ZORRO_PROD_PHASE5_CYBERSTORM_MK_III ZORRO_ID(PHASE5, 0x64, 0) +#define ZORRO_PROD_PHASE5_BLIZZARD_603E_PLUS ZORRO_ID(PHASE5, 0x6e, 0) #define ZORRO_MANUF_DPS 0x2169 #define ZORRO_PROD_DPS_PERSONAL_ANIMATION_RECORDER ZORRO_ID(DPS, 0x01, 0) @@ -567,10 +492,9 @@ #define ZORRO_PROD_APOLLO_A620_68020_1 ZORRO_ID(APOLLO_2, 0x00, 0) #define ZORRO_PROD_APOLLO_A620_68020_2 ZORRO_ID(APOLLO_2, 0x01, 0) -#define ZORRO_MANUF_APOLLO_3 0x2222 -#define ZORRO_PROD_APOLLO_AT_APOLLO ZORRO_ID(APOLLO_3, 0x22, 0) -#define ZORRO_PROD_APOLLO_1230_1240_1260_2030_4040_4060 \ - ZORRO_ID(APOLLO_3, 0x23, 0) +#define ZORRO_MANUF_APOLLO_3 0x2222 +#define ZORRO_PROD_APOLLO_AT_APOLLO ZORRO_ID(APOLLO_3, 0x22, 0) +#define ZORRO_PROD_APOLLO_1230_1240_1260_2030_4040_4060 ZORRO_ID(APOLLO_3, 0x23, 0) #define ZORRO_MANUF_PETSOFF_LP 0x38A5 #define ZORRO_PROD_PETSOFF_LP_DELFINA ZORRO_ID(PETSOFF_LP, 0x00, 0) @@ -582,30 +506,23 @@ #define ZORRO_MANUF_ACT 0x4231 #define ZORRO_PROD_ACT_PRELUDE ZORRO_ID(ACT, 0x01, 0) -#define ZORRO_MANUF_MACROSYSTEMS_GERMANY 0x4754 -#define ZORRO_PROD_MACROSYSTEMS_MAESTRO ZORRO_ID(MACROSYSTEMS_GERMANY, 0x03, 0) -#define ZORRO_PROD_MACROSYSTEMS_VLAB ZORRO_ID(MACROSYSTEMS_GERMANY, 0x04, 0) -#define ZORRO_PROD_MACROSYSTEMS_MAESTRO_PRO \ - ZORRO_ID(MACROSYSTEMS_GERMANY, 0x05, 0) -#define ZORRO_PROD_MACROSYSTEMS_RETINA ZORRO_ID(MACROSYSTEMS_GERMANY, 0x06, 0) -#define ZORRO_PROD_MACROSYSTEMS_MULTI_EVOLUTION \ - ZORRO_ID(MACROSYSTEMS_GERMANY, 0x08, 0) -#define ZORRO_PROD_MACROSYSTEMS_TOCCATA ZORRO_ID(MACROSYSTEMS_GERMANY, 0x0C, 0) -#define ZORRO_PROD_MACROSYSTEMS_RETINA_Z3 \ - ZORRO_ID(MACROSYSTEMS_GERMANY, 0x10, 0) -#define ZORRO_PROD_MACROSYSTEMS_VLAB_MOTION \ - ZORRO_ID(MACROSYSTEMS_GERMANY, 0x12, 0) -#define ZORRO_PROD_MACROSYSTEMS_ALTAIS ZORRO_ID(MACROSYSTEMS_GERMANY, 0x13, 0) -#define ZORRO_PROD_MACROSYSTEMS_FALCON_040 \ - ZORRO_ID(MACROSYSTEMS_GERMANY, 0xFD, 0) +#define ZORRO_MANUF_MACROSYSTEMS_GERMANY 0x4754 +#define ZORRO_PROD_MACROSYSTEMS_MAESTRO ZORRO_ID(MACROSYSTEMS_GERMANY, 0x03, 0) +#define ZORRO_PROD_MACROSYSTEMS_VLAB ZORRO_ID(MACROSYSTEMS_GERMANY, 0x04, 0) +#define ZORRO_PROD_MACROSYSTEMS_MAESTRO_PRO ZORRO_ID(MACROSYSTEMS_GERMANY, 0x05, 0) +#define ZORRO_PROD_MACROSYSTEMS_RETINA ZORRO_ID(MACROSYSTEMS_GERMANY, 0x06, 0) +#define ZORRO_PROD_MACROSYSTEMS_MULTI_EVOLUTION ZORRO_ID(MACROSYSTEMS_GERMANY, 0x08, 0) +#define ZORRO_PROD_MACROSYSTEMS_TOCCATA ZORRO_ID(MACROSYSTEMS_GERMANY, 0x0C, 0) +#define ZORRO_PROD_MACROSYSTEMS_RETINA_Z3 ZORRO_ID(MACROSYSTEMS_GERMANY, 0x10, 0) +#define ZORRO_PROD_MACROSYSTEMS_VLAB_MOTION ZORRO_ID(MACROSYSTEMS_GERMANY, 0x12, 0) +#define ZORRO_PROD_MACROSYSTEMS_ALTAIS ZORRO_ID(MACROSYSTEMS_GERMANY, 0x13, 0) +#define ZORRO_PROD_MACROSYSTEMS_FALCON_040 ZORRO_ID(MACROSYSTEMS_GERMANY, 0xFD, 0) #define ZORRO_MANUF_COMBITEC 0x6766 -#define ZORRO_MANUF_SKI_PERIPHERALS 0x8000 -#define ZORRO_PROD_SKI_PERIPHERALS_MAST_FIREBALL \ - ZORRO_ID(SKI_PERIPHERALS, 0x08, 0) -#define ZORRO_PROD_SKI_PERIPHERALS_SCSI_DUAL_SERIAL \ - ZORRO_ID(SKI_PERIPHERALS, 0x80, 0) +#define ZORRO_MANUF_SKI_PERIPHERALS 0x8000 +#define ZORRO_PROD_SKI_PERIPHERALS_MAST_FIREBALL ZORRO_ID(SKI_PERIPHERALS, 0x08, 0) +#define ZORRO_PROD_SKI_PERIPHERALS_SCSI_DUAL_SERIAL ZORRO_ID(SKI_PERIPHERALS, 0x80, 0) #define ZORRO_MANUF_REIS_WARE_2 0xA9AD #define ZORRO_PROD_REIS_WARE_SCAN_KING ZORRO_ID(REIS_WARE_2, 0x11, 0) @@ -629,12 +546,11 @@ * Test and illegal Manufacturer IDs. */ -#define ZORRO_MANUF_HACKER 0x07DB -#define ZORRO_PROD_GENERAL_PROTOTYPE ZORRO_ID(HACKER, 0x00, 0) -#define ZORRO_PROD_HACKER_SCSI ZORRO_ID(HACKER, 0x01, 0) -#define ZORRO_PROD_RESOURCE_MANAGEMENT_FORCE_QUICKNET_QN2000 \ - ZORRO_ID(HACKER, 0x02, 0) -#define ZORRO_PROD_VECTOR_CONNECTION_2 ZORRO_ID(HACKER, 0xE0, 0) -#define ZORRO_PROD_VECTOR_CONNECTION_3 ZORRO_ID(HACKER, 0xE1, 0) -#define ZORRO_PROD_VECTOR_CONNECTION_4 ZORRO_ID(HACKER, 0xE2, 0) -#define ZORRO_PROD_VECTOR_CONNECTION_5 ZORRO_ID(HACKER, 0xE3, 0) +#define ZORRO_MANUF_HACKER 0x07DB +#define ZORRO_PROD_GENERAL_PROTOTYPE ZORRO_ID(HACKER, 0x00, 0) +#define ZORRO_PROD_HACKER_SCSI ZORRO_ID(HACKER, 0x01, 0) +#define ZORRO_PROD_RESOURCE_MANAGEMENT_FORCE_QUICKNET_QN2000 ZORRO_ID(HACKER, 0x02, 0) +#define ZORRO_PROD_VECTOR_CONNECTION_2 ZORRO_ID(HACKER, 0xE0, 0) +#define ZORRO_PROD_VECTOR_CONNECTION_3 ZORRO_ID(HACKER, 0xE1, 0) +#define ZORRO_PROD_VECTOR_CONNECTION_4 ZORRO_ID(HACKER, 0xE2, 0) +#define ZORRO_PROD_VECTOR_CONNECTION_5 ZORRO_ID(HACKER, 0xE3, 0) -- cgit v1.2.3