summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKacper <kacper@mail.openlinux.dev>2025-12-25 19:24:38 +0100
committerKacper <kacper@mail.openlinux.dev>2025-12-25 20:35:03 +0100
commita984eb367c032dbe2577f01238c3d1268526be70 (patch)
tree437fef40379b2758b129ccea39df3570fa2d145e
parent8834571b202cf4dc9c649cfb096c213b6ecf1566 (diff)
Clang-tidy fixes
-rw-r--r--bin/free/free.c26
-rw-r--r--bin/gzip/bits.c2
-rw-r--r--bin/gzip/deflate.c97
-rw-r--r--bin/gzip/gzip.c223
-rw-r--r--bin/gzip/gzip.h19
-rw-r--r--bin/gzip/inflate.c103
-rw-r--r--bin/gzip/trees.c94
-rw-r--r--bin/gzip/util.c87
-rw-r--r--bin/gzip/zip.c3
-rw-r--r--bin/playground/main.c1
-rw-r--r--bin/pwd/pwd.c7
-rw-r--r--bin/sleep/sleep.c1
-rw-r--r--boot/init/init.c3
-rw-r--r--include/aio.h5
-rw-r--r--include/arch/x86_64/asm-generic/errno.h82
-rw-r--r--include/arch/x86_64/asm-generic/ioctl.h25
-rw-r--r--include/arch/x86_64/asm-generic/ioctls.h5
-rw-r--r--include/arch/x86_64/asm-generic/mman-common.h24
-rw-r--r--include/arch/x86_64/asm-generic/mman.h6
-rw-r--r--include/arch/x86_64/asm-generic/siginfo.h11
-rw-r--r--include/arch/x86_64/asm-generic/socket.h22
-rw-r--r--include/arch/x86_64/asm-generic/unistd.h42
-rw-r--r--include/arch/x86_64/asm/a.out.h12
-rw-r--r--include/arch/x86_64/asm/amd_hsmp.h679
-rw-r--r--include/arch/x86_64/asm/atomic.h30
-rw-r--r--include/arch/x86_64/asm/bootparam.h8
-rw-r--r--include/arch/x86_64/asm/elf.h3
-rw-r--r--include/arch/x86_64/asm/kvm.h20
-rw-r--r--include/arch/x86_64/asm/processor-flags.h12
-rw-r--r--include/arch/x86_64/asm/sgx.h31
-rw-r--r--include/arch/x86_64/asm/svm.h150
-rw-r--r--include/arch/x86_64/asm/swab.h4
-rw-r--r--include/arch/x86_64/asm/vmx.h97
-rw-r--r--include/arch/x86_64/cxl/features.h11
-rw-r--r--include/arch/x86_64/drm/amdgpu_drm.h109
-rw-r--r--include/arch/x86_64/drm/amdxdna_accel.h40
-rw-r--r--include/arch/x86_64/drm/armada_drm.h3
-rw-r--r--include/arch/x86_64/drm/asahi_drm.h20
-rw-r--r--include/arch/x86_64/drm/drm.h114
-rw-r--r--include/arch/x86_64/drm/drm_fourcc.h216
-rw-r--r--include/arch/x86_64/drm/drm_mode.h41
-rw-r--r--include/arch/x86_64/drm/drm_sarea.h2
-rw-r--r--include/arch/x86_64/drm/etnaviv_drm.h54
-rw-r--r--include/arch/x86_64/drm/exynos_drm.h60
-rw-r--r--include/arch/x86_64/drm/habanalabs_accel.h31
-rw-r--r--include/arch/x86_64/drm/i915_drm.h325
-rw-r--r--include/arch/x86_64/drm/ivpu_accel.h55
-rw-r--r--include/arch/x86_64/drm/lima_drm.h29
-rw-r--r--include/arch/x86_64/drm/msm_drm.h113
-rw-r--r--include/arch/x86_64/drm/nouveau_drm.h62
-rw-r--r--include/arch/x86_64/drm/nova_drm.h10
-rw-r--r--include/arch/x86_64/drm/omap_drm.h20
-rw-r--r--include/arch/x86_64/drm/panfrost_drm.h47
-rw-r--r--include/arch/x86_64/drm/panthor_drm.h57
-rw-r--r--include/arch/x86_64/drm/pvr_drm.h79
-rw-r--r--include/arch/x86_64/drm/qaic_accel.h31
-rw-r--r--include/arch/x86_64/drm/qxl_drm.h24
-rw-r--r--include/arch/x86_64/drm/radeon_drm.h163
-rw-r--r--include/arch/x86_64/drm/tegra_drm.h94
-rw-r--r--include/arch/x86_64/drm/v3d_drm.h55
-rw-r--r--include/arch/x86_64/drm/vc4_drm.h57
-rw-r--r--include/arch/x86_64/drm/vgem_drm.h8
-rw-r--r--include/arch/x86_64/drm/virtgpu_drm.h78
-rw-r--r--include/arch/x86_64/drm/vmwgfx_drm.h5
-rw-r--r--include/arch/x86_64/drm/xe_drm.h46
-rw-r--r--include/arch/x86_64/fwctl/cxl.h7
-rw-r--r--include/arch/x86_64/linux/a.out.h31
-rw-r--r--include/arch/x86_64/linux/acct.h3
-rw-r--r--include/arch/x86_64/linux/acrn.h58
-rw-r--r--include/arch/x86_64/linux/aio_abi.h6
-rw-r--r--include/arch/x86_64/linux/android/binder.h32
-rw-r--r--include/arch/x86_64/linux/arm_sdei.h9
-rw-r--r--include/arch/x86_64/linux/aspeed-lpc-ctrl.h8
-rw-r--r--include/arch/x86_64/linux/aspeed-p2a-ctrl.h9
-rw-r--r--include/arch/x86_64/linux/atm.h12
-rw-r--r--include/arch/x86_64/linux/atm_idt77105.h3
-rw-r--r--include/arch/x86_64/linux/atm_zatm.h6
-rw-r--r--include/arch/x86_64/linux/atmdev.h14
-rw-r--r--include/arch/x86_64/linux/atmlec.h6
-rw-r--r--include/arch/x86_64/linux/atmmpc.h7
-rw-r--r--include/arch/x86_64/linux/atmsap.h34
-rw-r--r--include/arch/x86_64/linux/audit.h52
-rw-r--r--include/arch/x86_64/linux/auto_dev-ioctl.h54
-rw-r--r--include/arch/x86_64/linux/auto_fs.h25
-rw-r--r--include/arch/x86_64/linux/bfs_fs.h20
-rw-r--r--include/arch/x86_64/linux/bits.h6
-rw-r--r--include/arch/x86_64/linux/blk-crypto.h7
-rw-r--r--include/arch/x86_64/linux/bpf.h299
-rw-r--r--include/arch/x86_64/linux/btrfs.h209
-rw-r--r--include/arch/x86_64/linux/btrfs_tree.h44
-rw-r--r--include/arch/x86_64/linux/caif/caif_socket.h5
-rw-r--r--include/arch/x86_64/linux/can.h2
-rw-r--r--include/arch/x86_64/linux/can/isotp.h2
-rw-r--r--include/arch/x86_64/linux/can/j1939.h3
-rw-r--r--include/arch/x86_64/linux/can/netlink.h5
-rw-r--r--include/arch/x86_64/linux/can/raw.h5
-rw-r--r--include/arch/x86_64/linux/capi.h9
-rw-r--r--include/arch/x86_64/linux/cdrom.h22
-rw-r--r--include/arch/x86_64/linux/cec-funcs.h611
-rw-r--r--include/arch/x86_64/linux/cec.h48
-rw-r--r--include/arch/x86_64/linux/cfm_bridge.h5
-rw-r--r--include/arch/x86_64/linux/cgroupstats.h4
-rw-r--r--include/arch/x86_64/linux/cifs/cifs_mount.h8
-rw-r--r--include/arch/x86_64/linux/cn_proc.h7
-rw-r--r--include/arch/x86_64/linux/coda.h27
-rw-r--r--include/arch/x86_64/linux/coff.h35
-rw-r--r--include/arch/x86_64/linux/comedi.h69
-rw-r--r--include/arch/x86_64/linux/cramfs_fs.h9
-rw-r--r--include/arch/x86_64/linux/cryptouser.h4
-rw-r--r--include/arch/x86_64/linux/cxl_mem.h41
-rw-r--r--include/arch/x86_64/linux/dcbnl.h13
-rw-r--r--include/arch/x86_64/linux/dccp.h9
-rw-r--r--include/arch/x86_64/linux/devlink.h38
-rw-r--r--include/arch/x86_64/linux/dm-ioctl.h10
-rw-r--r--include/arch/x86_64/linux/dm-log-userspace.h5
-rw-r--r--include/arch/x86_64/linux/dma-buf.h12
-rw-r--r--include/arch/x86_64/linux/dma-heap.h3
-rw-r--r--include/arch/x86_64/linux/dns_resolver.h10
-rw-r--r--include/arch/x86_64/linux/dqblk_xfs.h16
-rw-r--r--include/arch/x86_64/linux/dvb/dmx.h7
-rw-r--r--include/arch/x86_64/linux/dvb/frontend.h15
-rw-r--r--include/arch/x86_64/linux/dvb/video.h8
-rw-r--r--include/arch/x86_64/linux/edd.h10
-rw-r--r--include/arch/x86_64/linux/elf.h143
-rw-r--r--include/arch/x86_64/linux/ethtool.h165
-rw-r--r--include/arch/x86_64/linux/ethtool_netlink.h4
-rw-r--r--include/arch/x86_64/linux/ethtool_netlink_generated.h15
-rw-r--r--include/arch/x86_64/linux/ext4.h5
-rw-r--r--include/arch/x86_64/linux/f2fs.h55
-rw-r--r--include/arch/x86_64/linux/fanotify.h40
-rw-r--r--include/arch/x86_64/linux/fb.h29
-rw-r--r--include/arch/x86_64/linux/fcntl.h6
-rw-r--r--include/arch/x86_64/linux/fd.h24
-rw-r--r--include/arch/x86_64/linux/firewire-cdev.h73
-rw-r--r--include/arch/x86_64/linux/fpga-dfl.h18
-rw-r--r--include/arch/x86_64/linux/fs.h50
-rw-r--r--include/arch/x86_64/linux/fscrypt.h22
-rw-r--r--include/arch/x86_64/linux/fsi.h8
-rw-r--r--include/arch/x86_64/linux/fsl_hypervisor.h24
-rw-r--r--include/arch/x86_64/linux/fsl_mc.h4
-rw-r--r--include/arch/x86_64/linux/fsmap.h3
-rw-r--r--include/arch/x86_64/linux/fsverity.h7
-rw-r--r--include/arch/x86_64/linux/fuse.h19
-rw-r--r--include/arch/x86_64/linux/futex.h32
-rw-r--r--include/arch/x86_64/linux/genwqe/genwqe_card.h9
-rw-r--r--include/arch/x86_64/linux/gfs2_ondisk.h7
-rw-r--r--include/arch/x86_64/linux/gpio.h32
-rw-r--r--include/arch/x86_64/linux/gtp.h4
-rw-r--r--include/arch/x86_64/linux/hdlcdrv.h2
-rw-r--r--include/arch/x86_64/linux/hdreg.h419
-rw-r--r--include/arch/x86_64/linux/i2c.h63
-rw-r--r--include/arch/x86_64/linux/icmpv6.h12
-rw-r--r--include/arch/x86_64/linux/if.h11
-rw-r--r--include/arch/x86_64/linux/if_addr.h4
-rw-r--r--include/arch/x86_64/linux/if_arp.h10
-rw-r--r--include/arch/x86_64/linux/if_bonding.h6
-rw-r--r--include/arch/x86_64/linux/if_bridge.h26
-rw-r--r--include/arch/x86_64/linux/if_ether.h44
-rw-r--r--include/arch/x86_64/linux/if_link.h56
-rw-r--r--include/arch/x86_64/linux/if_macsec.h12
-rw-r--r--include/arch/x86_64/linux/if_packet.h14
-rw-r--r--include/arch/x86_64/linux/if_tunnel.h4
-rw-r--r--include/arch/x86_64/linux/if_vlan.h8
-rw-r--r--include/arch/x86_64/linux/if_xdp.h5
-rw-r--r--include/arch/x86_64/linux/ife.h9
-rw-r--r--include/arch/x86_64/linux/in.h47
-rw-r--r--include/arch/x86_64/linux/inet_diag.h7
-rw-r--r--include/arch/x86_64/linux/inotify.h14
-rw-r--r--include/arch/x86_64/linux/input-event-codes.h41
-rw-r--r--include/arch/x86_64/linux/input.h27
-rw-r--r--include/arch/x86_64/linux/io_uring.h8
-rw-r--r--include/arch/x86_64/linux/ioam6.h60
-rw-r--r--include/arch/x86_64/linux/iommufd.h9
-rw-r--r--include/arch/x86_64/linux/ioprio.h31
-rw-r--r--include/arch/x86_64/linux/ip.h3
-rw-r--r--include/arch/x86_64/linux/ip_vs.h15
-rw-r--r--include/arch/x86_64/linux/ipmi.h27
-rw-r--r--include/arch/x86_64/linux/ipsec.h7
-rw-r--r--include/arch/x86_64/linux/ipv6.h4
-rw-r--r--include/arch/x86_64/linux/isdn/capicmd.h6
-rw-r--r--include/arch/x86_64/linux/isst_if.h51
-rw-r--r--include/arch/x86_64/linux/ivtv.h11
-rw-r--r--include/arch/x86_64/linux/ivtvfb.h3
-rw-r--r--include/arch/x86_64/linux/jffs2.h16
-rw-r--r--include/arch/x86_64/linux/joystick.h7
-rw-r--r--include/arch/x86_64/linux/kd.h18
-rw-r--r--include/arch/x86_64/linux/keyctl.h79
-rw-r--r--include/arch/x86_64/linux/kfd_ioctl.h231
-rw-r--r--include/arch/x86_64/linux/kvm.h98
-rw-r--r--include/arch/x86_64/linux/l2tp.h3
-rw-r--r--include/arch/x86_64/linux/llc.h4
-rw-r--r--include/arch/x86_64/linux/loadpin.h3
-rw-r--r--include/arch/x86_64/linux/loop.h4
-rw-r--r--include/arch/x86_64/linux/lp.h4
-rw-r--r--include/arch/x86_64/linux/major.h3
-rw-r--r--include/arch/x86_64/linux/map_to_14segment.h206
-rw-r--r--include/arch/x86_64/linux/map_to_7segment.h155
-rw-r--r--include/arch/x86_64/linux/matroxfb.h6
-rw-r--r--include/arch/x86_64/linux/mdio.h132
-rw-r--r--include/arch/x86_64/linux/media.h9
-rw-r--r--include/arch/x86_64/linux/media/amlogic/c3-isp-config.h13
-rw-r--r--include/arch/x86_64/linux/media/raspberrypi/pisp_be_config.h18
-rw-r--r--include/arch/x86_64/linux/media/raspberrypi/pisp_common.h79
-rw-r--r--include/arch/x86_64/linux/media/raspberrypi/pisp_fe_config.h3
-rw-r--r--include/arch/x86_64/linux/mei.h6
-rw-r--r--include/arch/x86_64/linux/mei_uuid.h13
-rw-r--r--include/arch/x86_64/linux/mempolicy.h12
-rw-r--r--include/arch/x86_64/linux/mii.h4
-rw-r--r--include/arch/x86_64/linux/misc/bcm_vk.h13
-rw-r--r--include/arch/x86_64/linux/mount.h54
-rw-r--r--include/arch/x86_64/linux/mptcp.h2
-rw-r--r--include/arch/x86_64/linux/mroute.h6
-rw-r--r--include/arch/x86_64/linux/mroute6.h12
-rw-r--r--include/arch/x86_64/linux/msdos_fs.h29
-rw-r--r--include/arch/x86_64/linux/msg.h8
-rw-r--r--include/arch/x86_64/linux/mshv.h26
-rw-r--r--include/arch/x86_64/linux/mtio.h9
-rw-r--r--include/arch/x86_64/linux/nbd.h8
-rw-r--r--include/arch/x86_64/linux/ndctl.h22
-rw-r--r--include/arch/x86_64/linux/net_tstamp.h13
-rw-r--r--include/arch/x86_64/linux/netdev.h8
-rw-r--r--include/arch/x86_64/linux/netfilter/ipset/ip_set.h30
-rw-r--r--include/arch/x86_64/linux/netfilter/nf_conntrack_common.h6
-rw-r--r--include/arch/x86_64/linux/netfilter/nf_conntrack_tuple_common.h3
-rw-r--r--include/arch/x86_64/linux/netfilter/nf_nat.h13
-rw-r--r--include/arch/x86_64/linux/netfilter/nf_synproxy.h5
-rw-r--r--include/arch/x86_64/linux/netfilter/nf_tables.h148
-rw-r--r--include/arch/x86_64/linux/netfilter/nf_tables_compat.h8
-rw-r--r--include/arch/x86_64/linux/netfilter/nfnetlink.h6
-rw-r--r--include/arch/x86_64/linux/netfilter/nfnetlink_acct.h7
-rw-r--r--include/arch/x86_64/linux/netfilter/nfnetlink_compat.h37
-rw-r--r--include/arch/x86_64/linux/netfilter/nfnetlink_conntrack.h45
-rw-r--r--include/arch/x86_64/linux/netfilter/nfnetlink_cttimeout.h18
-rw-r--r--include/arch/x86_64/linux/netfilter/x_tables.h80
-rw-r--r--include/arch/x86_64/linux/netfilter/xt_CT.h3
-rw-r--r--include/arch/x86_64/linux/netfilter/xt_TCPOPTSTRIP.h5
-rw-r--r--include/arch/x86_64/linux/netfilter/xt_multiport.h6
-rw-r--r--include/arch/x86_64/linux/netfilter/xt_owner.h3
-rw-r--r--include/arch/x86_64/linux/netfilter/xt_recent.h5
-rw-r--r--include/arch/x86_64/linux/netfilter/xt_sctp.h50
-rw-r--r--include/arch/x86_64/linux/netfilter/xt_socket.h3
-rw-r--r--include/arch/x86_64/linux/netfilter/xt_statistic.h6
-rw-r--r--include/arch/x86_64/linux/netfilter_arp/arp_tables.h25
-rw-r--r--include/arch/x86_64/linux/netfilter_bridge/ebt_among.h17
-rw-r--r--include/arch/x86_64/linux/netfilter_bridge/ebt_arp.h6
-rw-r--r--include/arch/x86_64/linux/netfilter_bridge/ebt_ip.h6
-rw-r--r--include/arch/x86_64/linux/netfilter_bridge/ebt_ip6.h5
-rw-r--r--include/arch/x86_64/linux/netfilter_bridge/ebtables.h99
-rw-r--r--include/arch/x86_64/linux/netfilter_ipv4/ip_tables.h6
-rw-r--r--include/arch/x86_64/linux/netfilter_ipv6/ip6_tables.h34
-rw-r--r--include/arch/x86_64/linux/netlink.h16
-rw-r--r--include/arch/x86_64/linux/nfc.h4
-rw-r--r--include/arch/x86_64/linux/nfs.h12
-rw-r--r--include/arch/x86_64/linux/nfs3.h6
-rw-r--r--include/arch/x86_64/linux/nfs4.h3
-rw-r--r--include/arch/x86_64/linux/nfs_mount.h6
-rw-r--r--include/arch/x86_64/linux/nfsd/export.h10
-rw-r--r--include/arch/x86_64/linux/nilfs2_api.h72
-rw-r--r--include/arch/x86_64/linux/nilfs2_ondisk.h119
-rw-r--r--include/arch/x86_64/linux/nl80211.h72
-rw-r--r--include/arch/x86_64/linux/nubus.h16
-rw-r--r--include/arch/x86_64/linux/omap3isp.h40
-rw-r--r--include/arch/x86_64/linux/omapfb.h6
-rw-r--r--include/arch/x86_64/linux/openvswitch.h123
-rw-r--r--include/arch/x86_64/linux/parport.h4
-rw-r--r--include/arch/x86_64/linux/pci.h14
-rw-r--r--include/arch/x86_64/linux/pci_regs.h787
-rw-r--r--include/arch/x86_64/linux/perf_event.h95
-rw-r--r--include/arch/x86_64/linux/personality.h4
-rw-r--r--include/arch/x86_64/linux/pfrut.h12
-rw-r--r--include/arch/x86_64/linux/phonet.h9
-rw-r--r--include/arch/x86_64/linux/pidfd.h9
-rw-r--r--include/arch/x86_64/linux/pkt_cls.h43
-rw-r--r--include/arch/x86_64/linux/pkt_sched.h36
-rw-r--r--include/arch/x86_64/linux/pmu.h7
-rw-r--r--include/arch/x86_64/linux/ppp-ioctl.h21
-rw-r--r--include/arch/x86_64/linux/prctl.h12
-rw-r--r--include/arch/x86_64/linux/psample.h8
-rw-r--r--include/arch/x86_64/linux/psci.h16
-rw-r--r--include/arch/x86_64/linux/ptp_clock.h57
-rw-r--r--include/arch/x86_64/linux/ptrace.h3
-rw-r--r--include/arch/x86_64/linux/raid/md_p.h68
-rw-r--r--include/arch/x86_64/linux/rds.h5
-rw-r--r--include/arch/x86_64/linux/rio_mport_cdev.h62
-rw-r--r--include/arch/x86_64/linux/rkisp1-config.h70
-rw-r--r--include/arch/x86_64/linux/rseq.h9
-rw-r--r--include/arch/x86_64/linux/rtc.h21
-rw-r--r--include/arch/x86_64/linux/rtnetlink.h45
-rw-r--r--include/arch/x86_64/linux/rxrpc.h120
-rw-r--r--include/arch/x86_64/linux/scc.h2
-rw-r--r--include/arch/x86_64/linux/sched.h38
-rw-r--r--include/arch/x86_64/linux/sctp.h8
-rw-r--r--include/arch/x86_64/linux/securebits.h36
-rw-r--r--include/arch/x86_64/linux/selinux_netlink.h6
-rw-r--r--include/arch/x86_64/linux/sem.h10
-rw-r--r--include/arch/x86_64/linux/serial_reg.h68
-rw-r--r--include/arch/x86_64/linux/sev-guest.h20
-rw-r--r--include/arch/x86_64/linux/snmp.h26
-rw-r--r--include/arch/x86_64/linux/sockios.h6
-rw-r--r--include/arch/x86_64/linux/sonet.h13
-rw-r--r--include/arch/x86_64/linux/sound.h2
-rw-r--r--include/arch/x86_64/linux/soundcard.h136
-rw-r--r--include/arch/x86_64/linux/stat.h29
-rw-r--r--include/arch/x86_64/linux/suspend_ioctls.h17
-rw-r--r--include/arch/x86_64/linux/swab.h39
-rw-r--r--include/arch/x86_64/linux/switchtec_ioctl.h21
-rw-r--r--include/arch/x86_64/linux/sysctl.h168
-rw-r--r--include/arch/x86_64/linux/sysinfo.h26
-rw-r--r--include/arch/x86_64/linux/target_core_user.h5
-rw-r--r--include/arch/x86_64/linux/tc_act/tc_connmark.h8
-rw-r--r--include/arch/x86_64/linux/tc_act/tc_csum.h8
-rw-r--r--include/arch/x86_64/linux/tc_act/tc_defact.h9
-rw-r--r--include/arch/x86_64/linux/tc_act/tc_gact.h9
-rw-r--r--include/arch/x86_64/linux/tc_act/tc_mirred.h9
-rw-r--r--include/arch/x86_64/linux/tc_act/tc_pedit.h6
-rw-r--r--include/arch/x86_64/linux/tc_act/tc_tunnel_key.h9
-rw-r--r--include/arch/x86_64/linux/tc_ematch/tc_em_meta.h8
-rw-r--r--include/arch/x86_64/linux/tcp.h100
-rw-r--r--include/arch/x86_64/linux/tee.h32
-rw-r--r--include/arch/x86_64/linux/thermal.h54
-rw-r--r--include/arch/x86_64/linux/thp7312.h11
-rw-r--r--include/arch/x86_64/linux/timex.h33
-rw-r--r--include/arch/x86_64/linux/tiocl.h3
-rw-r--r--include/arch/x86_64/linux/tipc.h13
-rw-r--r--include/arch/x86_64/linux/tipc_config.h25
-rw-r--r--include/arch/x86_64/linux/tls.h3
-rw-r--r--include/arch/x86_64/linux/tty_flags.h8
-rw-r--r--include/arch/x86_64/linux/ublk_cmd.h60
-rw-r--r--include/arch/x86_64/linux/udp.h17
-rw-r--r--include/arch/x86_64/linux/uinput.h9
-rw-r--r--include/arch/x86_64/linux/uio.h2
-rw-r--r--include/arch/x86_64/linux/ultrasound.h45
-rw-r--r--include/arch/x86_64/linux/usb/audio.h104
-rw-r--r--include/arch/x86_64/linux/usb/cdc.h6
-rw-r--r--include/arch/x86_64/linux/usb/ch11.h5
-rw-r--r--include/arch/x86_64/linux/usb/ch9.h98
-rw-r--r--include/arch/x86_64/linux/usb/functionfs.h6
-rw-r--r--include/arch/x86_64/linux/usb/midi.h2
-rw-r--r--include/arch/x86_64/linux/usb/tmc.h20
-rw-r--r--include/arch/x86_64/linux/usb/video.h3
-rw-r--r--include/arch/x86_64/linux/usbdevice_fs.h11
-rw-r--r--include/arch/x86_64/linux/userfaultfd.h62
-rw-r--r--include/arch/x86_64/linux/userio.h6
-rw-r--r--include/arch/x86_64/linux/uvcvideo.h5
-rw-r--r--include/arch/x86_64/linux/v4l2-controls.h377
-rw-r--r--include/arch/x86_64/linux/v4l2-dv-timings.h1237
-rw-r--r--include/arch/x86_64/linux/v4l2-mediabus.h3
-rw-r--r--include/arch/x86_64/linux/v4l2-subdev.h58
-rw-r--r--include/arch/x86_64/linux/vbox_vmmdev_types.h7
-rw-r--r--include/arch/x86_64/linux/vboxguest.h24
-rw-r--r--include/arch/x86_64/linux/version.h5
-rw-r--r--include/arch/x86_64/linux/vfio.h52
-rw-r--r--include/arch/x86_64/linux/vhost.h48
-rw-r--r--include/arch/x86_64/linux/videodev2.h880
-rw-r--r--include/arch/x86_64/linux/virtio_balloon.h17
-rw-r--r--include/arch/x86_64/linux/virtio_crypto.h62
-rw-r--r--include/arch/x86_64/linux/virtio_iommu.h4
-rw-r--r--include/arch/x86_64/linux/virtio_net.h43
-rw-r--r--include/arch/x86_64/linux/virtio_pci.h3
-rw-r--r--include/arch/x86_64/linux/virtio_ring.h29
-rw-r--r--include/arch/x86_64/linux/vm_sockets.h12
-rw-r--r--include/arch/x86_64/linux/vmclock-abi.h2
-rw-r--r--include/arch/x86_64/linux/wait.h7
-rw-r--r--include/arch/x86_64/linux/watch_queue.h17
-rw-r--r--include/arch/x86_64/linux/wireguard.h13
-rw-r--r--include/arch/x86_64/linux/wireless.h30
-rw-r--r--include/arch/x86_64/linux/xfrm.h25
-rw-r--r--include/arch/x86_64/linux/zorro.h3
-rw-r--r--include/arch/x86_64/linux/zorro_ids.h446
-rw-r--r--include/arch/x86_64/misc/amd-apml.h6
-rw-r--r--include/arch/x86_64/misc/fastrpc.h26
-rw-r--r--include/arch/x86_64/misc/ocxl.h17
-rw-r--r--include/arch/x86_64/misc/xilinx_sdfec.h12
-rw-r--r--include/arch/x86_64/mtd/mtd-abi.h5
-rw-r--r--include/arch/x86_64/mtd/ubi-user.h3
-rw-r--r--include/arch/x86_64/rdma/hfi/hfi1_ioctl.h16
-rw-r--r--include/arch/x86_64/rdma/hfi/hfi1_user.h6
-rw-r--r--include/arch/x86_64/rdma/ib_user_ioctl_cmds.h3
-rw-r--r--include/arch/x86_64/rdma/ib_user_ioctl_verbs.h5
-rw-r--r--include/arch/x86_64/rdma/mlx4-abi.h4
-rw-r--r--include/arch/x86_64/rdma/mlx5-abi.h18
-rw-r--r--include/arch/x86_64/rdma/mlx5_user_ioctl_cmds.h15
-rw-r--r--include/arch/x86_64/rdma/rdma_netlink.h30
-rw-r--r--include/arch/x86_64/rdma/rdma_user_cm.h6
-rw-r--r--include/arch/x86_64/rdma/rdma_user_ioctl.h15
-rw-r--r--include/arch/x86_64/rdma/siw-abi.h3
-rw-r--r--include/arch/x86_64/scsi/fc/fc_els.h3
-rw-r--r--include/arch/x86_64/scsi/fc/fc_fs.h10
-rw-r--r--include/arch/x86_64/sound/asequencer.h208
-rw-r--r--include/arch/x86_64/sound/asoc.h135
-rw-r--r--include/arch/x86_64/sound/asound.h595
-rw-r--r--include/arch/x86_64/sound/compress_offload.h42
-rw-r--r--include/arch/x86_64/sound/emu10k1.h147
-rw-r--r--include/arch/x86_64/sound/fcp.h3
-rw-r--r--include/arch/x86_64/sound/firewire.h48
-rw-r--r--include/arch/x86_64/sound/hdsp.h3
-rw-r--r--include/arch/x86_64/sound/hdspm.h11
-rw-r--r--include/arch/x86_64/sound/sb16_csp.h3
-rw-r--r--include/arch/x86_64/sound/scarlett2.h8
-rw-r--r--include/arch/x86_64/sound/sfnt_info.h35
-rw-r--r--include/arch/x86_64/sound/skl-tplg-interface.h33
-rw-r--r--include/arch/x86_64/sound/sof/abi.h17
-rw-r--r--include/arch/x86_64/sound/sof/fw.h6
-rw-r--r--include/arch/x86_64/sound/tlv.h37
-rw-r--r--include/arch/x86_64/sound/usb_stream.h3
-rw-r--r--include/arch/x86_64/video/sisfb.h27
-rw-r--r--include/arch/x86_64/xen/evtchn.h21
-rw-r--r--include/arch/x86_64/xen/gntalloc.h9
-rw-r--r--include/arch/x86_64/xen/gntdev.h32
-rw-r--r--include/arch/x86_64/xen/privcmd.h26
-rw-r--r--include/assert.h8
-rw-r--r--include/bits/select.h15
-rw-r--r--include/endian.h1
-rw-r--r--include/ftw.h4
-rw-r--r--include/glob.h3
-rw-r--r--include/libintl.h9
-rw-r--r--include/mqueue.h8
-rw-r--r--include/netdb.h7
-rw-r--r--include/netinet/in.h45
-rw-r--r--include/poll.h3
-rw-r--r--include/pthread.h82
-rw-r--r--include/sched.h1
-rw-r--r--include/signal.h6
-rw-r--r--include/stdatomic.h1
-rw-r--r--include/stdlib.h6
-rw-r--r--include/sys/cdefs.h27
-rw-r--r--include/sys/inotify.h1
-rw-r--r--include/sys/mount.h3
-rw-r--r--include/sys/select.h7
-rw-r--r--include/sys/socket.h34
-rw-r--r--include/sys/time.h3
-rw-r--r--include/time.h9
-rw-r--r--lib/libc/aio/aio.c21
-rw-r--r--lib/libc/aio/aio_cancel.c19
-rw-r--r--lib/libc/aio/aio_error.c8
-rw-r--r--lib/libc/aio/aio_fsync.c12
-rw-r--r--lib/libc/aio/aio_read.c10
-rw-r--r--lib/libc/aio/aio_return.c10
-rw-r--r--lib/libc/aio/aio_suspend.c26
-rw-r--r--lib/libc/aio/aio_write.c10
-rw-r--r--lib/libc/aio/lio_listio.c21
-rw-r--r--lib/libc/assert/assert.c6
-rw-r--r--lib/libc/ctype/isalnum.c4
-rw-r--r--lib/libc/devctl/posix_devctl.c1
-rw-r--r--lib/libc/errno/errno.c1
-rw-r--r--lib/libc/grp/getgrgid_r.c3
-rw-r--r--lib/libc/internal/arch/x86_64/longjmp.c3
-rw-r--r--lib/libc/internal/deinit/tls.c2
-rw-r--r--lib/libc/internal/include/__signal.h12
-rw-r--r--lib/libc/internal/include/__thread.h1
-rw-r--r--lib/libc/internal/include/atomic.h1
-rw-r--r--lib/libc/internal/include/io_uring.h4
-rw-r--r--lib/libc/internal/include/malloc.h73
-rw-r--r--lib/libc/internal/init/init.c1
-rw-r--r--lib/libc/internal/init/io.c4
-rw-r--r--lib/libc/internal/init/tls.c3
-rw-r--r--lib/libc/internal/init/vdso.c2
-rw-r--r--lib/libc/inttypes/strtoimax.c3
-rw-r--r--lib/libc/poll/ppoll.c4
-rw-r--r--lib/libc/pwd/getgrgid_r.c9
-rw-r--r--lib/libc/sched/sched_rr_get_interval.c1
-rw-r--r--lib/libc/select/pselect.c5
-rw-r--r--lib/libc/select/select.c7
-rw-r--r--lib/libc/sem/semctl.c4
-rw-r--r--lib/libc/signal/psignal.c3
-rw-r--r--lib/libc/signal/pthread_sigmask.c1
-rw-r--r--lib/libc/signal/sig2str.c9
-rw-r--r--lib/libc/signal/sigabbrev.h16
-rw-r--r--lib/libc/signal/sigaction.c3
-rw-r--r--lib/libc/signal/sigtimedwait.c3
-rw-r--r--lib/libc/socket/accept.c3
-rw-r--r--lib/libc/socket/accept4.c3
-rw-r--r--lib/libc/socket/getpeername.c3
-rw-r--r--lib/libc/socket/getsockname.c3
-rw-r--r--lib/libc/socket/getsockopt.c6
-rw-r--r--lib/libc/socket/recvfrom.c6
-rw-r--r--lib/libc/socket/sendto.c7
-rw-r--r--lib/libc/socket/setsockopt.c6
-rw-r--r--lib/libc/stat/fstatat.c16
-rw-r--r--lib/libc/stat/utimensat.c3
-rw-r--r--lib/libc/stdio/clearerr.c1
-rw-r--r--lib/libc/stdio/clearerr_unlocked.c1
-rw-r--r--lib/libc/stdio/dtoa.c1542
-rw-r--r--lib/libc/stdio/fclose.c5
-rw-r--r--lib/libc/stdio/fdopen.c7
-rw-r--r--lib/libc/stdio/feof.c1
-rw-r--r--lib/libc/stdio/feof_unlocked.c2
-rw-r--r--lib/libc/stdio/fflush.c3
-rw-r--r--lib/libc/stdio/fflush_unlocked.c2
-rw-r--r--lib/libc/stdio/fgets_unlocked.c1
-rw-r--r--lib/libc/stdio/fileno_unlocked.c2
-rw-r--r--lib/libc/stdio/flockfile.c2
-rw-r--r--lib/libc/stdio/fopen.c7
-rw-r--r--lib/libc/stdio/fread_unlocked.c1
-rw-r--r--lib/libc/stdio/fseek.c1
-rw-r--r--lib/libc/stdio/ftrylockfile.c5
-rw-r--r--lib/libc/stdio/funlockfile.c2
-rw-r--r--lib/libc/stdio/fwrite_unlocked.c1
-rw-r--r--lib/libc/stdio/pclose.c4
-rw-r--r--lib/libc/stdio/popen.c14
-rw-r--r--lib/libc/stdio/setvbuf.c6
-rw-r--r--lib/libc/stdio/vsnprintf.c3
-rw-r--r--lib/libc/stdlib/aligned_alloc.c3
-rw-r--r--lib/libc/stdlib/bsearch.c3
-rw-r--r--lib/libc/stdlib/calloc.c1
-rw-r--r--lib/libc/stdlib/heapsort.c77
-rw-r--r--lib/libc/stdlib/heapsort_r.c77
-rw-r--r--lib/libc/stdlib/malloc.c1
-rw-r--r--lib/libc/stdlib/posix_memalign.c3
-rw-r--r--lib/libc/stdlib/qsort.c3
-rw-r--r--lib/libc/stdlib/qsort_r.c39
-rw-r--r--lib/libc/string/memcpy.c98
-rw-r--r--lib/libc/string/memmem.c3
-rw-r--r--lib/libc/string/strcoll.c1
-rw-r--r--lib/libc/string/strerror.c2
-rw-r--r--lib/libc/string/strtok_r.c3
-rw-r--r--lib/libc/strings/strcasecmp.c1
-rw-r--r--lib/libc/strings/strncasecmp.c1
-rw-r--r--lib/libc/sys/eventfd/eventfd_read.c1
-rw-r--r--lib/libc/sys/eventfd/eventfd_write.c1
-rw-r--r--lib/libc/sys/inotify/inotify_add_watch.c1
-rw-r--r--lib/libc/sys/io_uring/io_uring_enter.c9
-rw-r--r--lib/libc/sys/io_uring/io_uring_register.c3
-rw-r--r--lib/libc/sys/io_uring/io_uring_setup.c34
-rw-r--r--lib/libc/sys/mount.c4
-rw-r--r--lib/libc/sys/mqueue/mq_getattr.c1
-rw-r--r--lib/libc/sys/mqueue/mq_notify.c1
-rw-r--r--lib/libc/sys/mqueue/mq_receive.c4
-rw-r--r--lib/libc/sys/mqueue/mq_setattr.c3
-rw-r--r--lib/libc/sys/mqueue/mq_timedreceive.c8
-rw-r--r--lib/libc/sys/mqueue/mq_timedsend.c8
-rw-r--r--lib/libc/termios/tcsendbreak.c2
-rw-r--r--lib/libc/thread/thrd_create.c8
-rw-r--r--lib/libc/thread/thrd_detach.c3
-rw-r--r--lib/libc/thread/thrd_join.c1
-rw-r--r--lib/libc/time/asctime.c15
-rw-r--r--lib/libc/time/clock.c3
-rw-r--r--lib/libc/time/clock_gettime.c2
-rw-r--r--lib/libc/time/gmtime_r.c4
-rw-r--r--lib/libc/time/strftime.c1
-rw-r--r--lib/libc/time/time.c2
-rw-r--r--lib/libc/time/tzset.c3
-rw-r--r--lib/libc/time/utimes.c3
-rw-r--r--lib/libc/unistd/execvp.c13
-rw-r--r--lib/libc/unistd/getopt.c3
-rw-r--r--lib/libc/unistd/readlinkat.c3
-rw-r--r--lib/libc/unistd/write.c1
-rw-r--r--lib/libm/__cos.c10
-rw-r--r--lib/libm/__cosdf.c6
-rw-r--r--lib/libm/__cosl.c40
-rw-r--r--lib/libm/__invtrigl.c42
-rw-r--r--lib/libm/__rem_pio2.c10
-rw-r--r--lib/libm/__rem_pio2_large.c163
-rw-r--r--lib/libm/__rem_pio2f.c5
-rw-r--r--lib/libm/__rem_pio2l.c66
-rw-r--r--lib/libm/__sin.c10
-rw-r--r--lib/libm/__sindf.c6
-rw-r--r--lib/libm/__sinl.c64
-rw-r--r--lib/libm/__tan.c7
-rw-r--r--lib/libm/__tanl.c148
-rw-r--r--lib/libm/acos.c22
-rw-r--r--lib/libm/acosf.c3
-rw-r--r--lib/libm/asin.c5
-rw-r--r--lib/libm/asinf.c3
-rw-r--r--lib/libm/asinl.c3
-rw-r--r--lib/libm/atan.c4
-rw-r--r--lib/libm/atanf.c3
-rw-r--r--lib/libm/atanl.c67
-rw-r--r--lib/libm/atomic.h19
-rw-r--r--lib/libm/cbrt.c2
-rw-r--r--lib/libm/cbrtf.c2
-rw-r--r--lib/libm/csinhl.c3
-rw-r--r--lib/libm/csinl.c3
-rw-r--r--lib/libm/ctan.c3
-rw-r--r--lib/libm/ctanhl.c3
-rw-r--r--lib/libm/ctanl.c3
-rw-r--r--lib/libm/erf.c40
-rw-r--r--lib/libm/erff.c37
-rw-r--r--lib/libm/erfl.c66
-rw-r--r--lib/libm/exp.c3
-rw-r--r--lib/libm/exp10.c9
-rw-r--r--lib/libm/exp10f.c5
-rw-r--r--lib/libm/exp10l.c10
-rw-r--r--lib/libm/exp2.c3
-rw-r--r--lib/libm/exp2l.c277
-rw-r--r--lib/libm/expl.c3
-rw-r--r--lib/libm/expm1.c6
-rw-r--r--lib/libm/expm1l.c3
-rw-r--r--lib/libm/fma.c9
-rw-r--r--lib/libm/fmaf.c3
-rw-r--r--lib/libm/fmal.c3
-rw-r--r--lib/libm/j0.c45
-rw-r--r--lib/libm/j0f.c9
-rw-r--r--lib/libm/j1.c25
-rw-r--r--lib/libm/j1f.c7
-rw-r--r--lib/libm/lgamma_r.c66
-rw-r--r--lib/libm/lgammaf_r.c38
-rw-r--r--lib/libm/lgammal.c115
-rw-r--r--lib/libm/libm.h18
-rw-r--r--lib/libm/log.c9
-rw-r--r--lib/libm/log10.c20
-rw-r--r--lib/libm/log10f.c3
-rw-r--r--lib/libm/log10l.c10
-rw-r--r--lib/libm/log1pl.c10
-rw-r--r--lib/libm/log2.c3
-rw-r--r--lib/libm/log2l.c10
-rw-r--r--lib/libm/logl.c10
-rw-r--r--lib/libm/pow.c19
-rw-r--r--lib/libm/powf.c9
-rw-r--r--lib/libm/powl.c48
-rw-r--r--lib/libm/remquo.c3
-rw-r--r--lib/libm/remquof.c3
-rw-r--r--lib/libm/remquol.c6
-rw-r--r--lib/libm/sin.c3
-rw-r--r--lib/libm/sincos.c3
-rw-r--r--lib/libm/sincosf.c3
-rw-r--r--lib/libm/sinf.c3
-rw-r--r--lib/libm/sinhl.c3
-rw-r--r--lib/libm/sqrt_data.c25
-rw-r--r--lib/libm/sqrtl.c6
-rw-r--r--lib/libm/tan.c3
-rw-r--r--lib/libm/tanf.c3
-rw-r--r--lib/libm/tgamma.c21
-rw-r--r--lib/libm/tgammal.c42
-rw-r--r--makefile2
-rw-r--r--notes3
-rw-r--r--tests/headers/aio.c36
-rw-r--r--tests/headers/arpa_inet.c30
-rw-r--r--tests/headers/assert.c15
-rw-r--r--tests/headers/complex.c117
-rw-r--r--tests/headers/core.h54
-rw-r--r--tests/headers/cpio.c38
-rw-r--r--tests/headers/ctype.c35
-rw-r--r--tests/headers/devctl.c13
-rw-r--r--tests/headers/dirent.c57
-rw-r--r--tests/headers/dlfcn.c26
-rw-r--r--tests/headers/endian.c32
-rw-r--r--tests/headers/errno.c145
-rw-r--r--tests/headers/fcntl.c86
-rw-r--r--tests/headers/fenv.c38
-rw-r--r--tests/headers/float.c41
-rw-r--r--tests/headers/fmtmsg.c38
-rw-r--r--tests/headers/fnmatch.c17
-rw-r--r--tests/headers/ftw.c26
-rw-r--r--tests/headers/glob.c32
-rw-r--r--tests/headers/grp.c26
-rw-r--r--tests/headers/iconv.h16
-rw-r--r--tests/headers/inttypes.c173
-rw-r--r--tests/headers/iso646.c23
-rw-r--r--tests/headers/langinfo.c93
-rw-r--r--tests/headers/libgen.c11
-rw-r--r--tests/headers/libintl.c35
-rw-r--r--tests/headers/limits.c151
-rw-r--r--tests/headers/locale.c61
-rw-r--r--tests/headers/math.c327
-rw-r--r--tests/headers/monetary.c17
-rw-r--r--tests/headers/mqueue.c36
-rw-r--r--tests/headers/ndbm.c30
-rw-r--r--tests/headers/net_if.c19
-rw-r--r--tests/headers/netdb.c127
-rw-r--r--tests/headers/netinet_tcp.c10
661 files changed, 9040 insertions, 16047 deletions
diff --git a/bin/free/free.c b/bin/free/free.c
index b42ad99a..26ce195c 100644
--- a/bin/free/free.c
+++ b/bin/free/free.c
@@ -30,31 +30,19 @@ int main(int argc, char **argv)
if (sysinfo(&info) < 0)
perror("sysinfo");
- printf(" %13s%13s%13s%13s%13s\n", "total", "used", "free", "shared",
- "buffers");
+ printf(" %13s%13s%13s%13s%13s\n", "total", "used", "free", "shared", "buffers");
- printf("Mem: %13llu%13llu%13llu%13llu%13llu\n",
- (unsigned long long)((info.totalram * info.mem_unit) >> shift),
- (unsigned long long)(((info.totalram - info.freeram) *
- info.mem_unit) >>
- shift),
+ printf("Mem: %13llu%13llu%13llu%13llu%13llu\n", (unsigned long long)((info.totalram * info.mem_unit) >> shift),
+ (unsigned long long)(((info.totalram - info.freeram) * info.mem_unit) >> shift),
(unsigned long long)((info.freeram * info.mem_unit) >> shift),
(unsigned long long)((info.sharedram * info.mem_unit) >> shift),
(unsigned long long)((info.bufferram * info.mem_unit) >> shift));
printf("-/+ buffers/cache:%13llu%13llu\n",
- (unsigned long long)(((info.totalram - info.freeram -
- info.bufferram) *
- info.mem_unit) >>
- shift),
- (unsigned long long)(((info.freeram + info.bufferram) *
- info.mem_unit) >>
- shift));
- printf("Swap:%13llu%13llu%13llu\n",
- (unsigned long long)((info.totalswap * info.mem_unit) >> shift),
- (unsigned long long)(((info.totalswap - info.freeswap) *
- info.mem_unit) >>
- shift),
+ (unsigned long long)(((info.totalram - info.freeram - info.bufferram) * info.mem_unit) >> shift),
+ (unsigned long long)(((info.freeram + info.bufferram) * info.mem_unit) >> shift));
+ printf("Swap:%13llu%13llu%13llu\n", (unsigned long long)((info.totalswap * info.mem_unit) >> shift),
+ (unsigned long long)(((info.totalswap - info.freeswap) * info.mem_unit) >> shift),
(unsigned long long)((info.freeswap * info.mem_unit) >> shift));
return 0;
diff --git a/bin/gzip/bits.c b/bin/gzip/bits.c
index a3d31fbd..1a453648 100644
--- a/bin/gzip/bits.c
+++ b/bin/gzip/bits.c
@@ -177,7 +177,7 @@ void bi_windup()
*/
void copy_block(buf, len, header) char *buf; /* the input data */
unsigned len; /* its length */
-int header; /* true if block header must be written */
+int header; /* true if block header must be written */
{
bi_windup(); /* align on byte boundary */
diff --git a/bin/gzip/deflate.c b/bin/gzip/deflate.c
index 2f839851..790a85a6 100644
--- a/bin/gzip/deflate.c
+++ b/bin/gzip/deflate.c
@@ -102,8 +102,7 @@ static char rcsid[] = "$Id: deflate.c,v 1.1 2002/08/18 00:59:21 hpa Exp $";
error : cannot overlay window with tab_suffix and prev with tab_prefix0
#endif
#if HASH_BITS > BITS - 1
- error
- : cannot overlay head with tab_prefix1
+ error : cannot overlay head with tab_prefix1
#endif
#define HASH_SIZE (unsigned)(1 << HASH_BITS)
@@ -121,14 +120,14 @@ error : cannot overlay window with tab_suffix and prev with tab_prefix0
#ifndef TOO_FAR
#define TOO_FAR 4096
#endif
- /* Matches of length 3 are discarded if their distance exceeds TOO_FAR
- */
+ /* Matches of length 3 are discarded if their distance exceeds TOO_FAR
+ */
- /* ===========================================================================
- * Local data used by the "longest match" routines.
- */
+ /* ===========================================================================
+ * Local data used by the "longest match" routines.
+ */
- typedef ush Pos;
+ typedef ush Pos;
typedef unsigned IPos;
/* A Pos is an index in the character window. We use short instead of int to
* save space in the various tables. IPos is used only for parameter passing.
@@ -213,7 +212,7 @@ unsigned good_match;
typedef struct config {
ush good_length; /* reduce lazy search above this match length */
- ush max_lazy; /* do not perform lazy search above this match length */
+ ush max_lazy; /* do not perform lazy search above this match length */
ush nice_length; /* quit search above this match length */
ush max_chain;
} config;
@@ -278,9 +277,9 @@ local void check_match OF((IPos start, IPos match, int length));
* input characters and the first MIN_MATCH bytes of s are valid
* (except for the last MIN_MATCH-1 bytes of the input file).
*/
-#define INSERT_STRING(s, match_head) \
- (UPDATE_HASH(ins_h, window[(s) + MIN_MATCH - 1]), \
- prev[(s) & WMASK] = (match_head) = head[ins_h], head[ins_h] = (s))
+#define INSERT_STRING(s, match_head) \
+ (UPDATE_HASH(ins_h, window[(s) + MIN_MATCH - 1]), prev[(s) & WMASK] = (match_head) = head[ins_h], \
+ head[ins_h] = (s))
/* ===========================================================================
* Initialize the "longest match" routines for a new file
@@ -319,8 +318,7 @@ void lm_init(int pack_level, ush *flags)
match_init(); /* initialize the asm code */
#endif
- lookahead = read_buf((char *)window,
- sizeof(int) <= 2 ? (unsigned)WSIZE : 2 * WSIZE);
+ lookahead = read_buf((char *)window, sizeof(int) <= 2 ? (unsigned)WSIZE : 2 * WSIZE);
if (lookahead == 0 || lookahead == (unsigned)EOF) {
eofile = 1, lookahead = 0;
@@ -362,8 +360,7 @@ IPos cur_match; /* current match */
register uch *match; /* matched string */
register int len; /* length of current match */
int best_len = prev_length; /* best match length so far */
- IPos limit = strstart > (IPos)MAX_DIST ? strstart - (IPos)MAX_DIST :
- NIL;
+ IPos limit = strstart > (IPos)MAX_DIST ? strstart - (IPos)MAX_DIST : NIL;
/* Stop when cur_match becomes <= limit. To simplify the code,
* we prevent matches with the string of window index 0.
*/
@@ -393,8 +390,7 @@ error:
if (prev_length >= good_match) {
chain_length >>= 2;
}
- Assert(strstart <= window_size - MIN_LOOKAHEAD,
- "insufficient lookahead");
+ Assert(strstart <= window_size - MIN_LOOKAHEAD, "insufficient lookahead");
do {
Assert(cur_match < strstart, "no future");
@@ -407,8 +403,7 @@ error:
/* This code assumes sizeof(unsigned short) == 2. Do not use
* UNALIGNED_OK if your compiler uses a different size.
*/
- if (*(ush *)(match + best_len - 1) != scan_end ||
- *(ush *)match != scan_start)
+ if (*(ush *)(match + best_len - 1) != scan_end || *(ush *)match != scan_start)
continue;
/* It is not necessary to compare scan[2] and match[2] since
@@ -423,16 +418,13 @@ error:
*/
scan++, match++;
do {
- } while (*(ush *)(scan += 2) == *(ush *)(match += 2) &&
- *(ush *)(scan += 2) == *(ush *)(match += 2) &&
- *(ush *)(scan += 2) == *(ush *)(match += 2) &&
- *(ush *)(scan += 2) == *(ush *)(match += 2) &&
+ } while (*(ush *)(scan += 2) == *(ush *)(match += 2) && *(ush *)(scan += 2) == *(ush *)(match += 2) &&
+ *(ush *)(scan += 2) == *(ush *)(match += 2) && *(ush *)(scan += 2) == *(ush *)(match += 2) &&
scan < strend);
/* The funny "do {}" generates better code on most compilers */
/* Here, scan <= window+strstart+257 */
- Assert(scan <= window + (unsigned)(window_size - 1),
- "wild scan");
+ Assert(scan <= window + (unsigned)(window_size - 1), "wild scan");
if (*scan == *match)
scan++;
@@ -441,8 +433,7 @@ error:
#else /* UNALIGNED_OK */
- if (match[best_len] != scan_end ||
- match[best_len - 1] != scan_end1 || *match != *scan ||
+ if (match[best_len] != scan_end || match[best_len - 1] != scan_end1 || *match != *scan ||
*++match != scan[1])
continue;
@@ -458,10 +449,8 @@ error:
* comparison; the 256th check will be made at strstart+258.
*/
do {
- } while (*++scan == *++match && *++scan == *++match &&
- *++scan == *++match && *++scan == *++match &&
- *++scan == *++match && *++scan == *++match &&
- *++scan == *++match && *++scan == *++match &&
+ } while (*++scan == *++match && *++scan == *++match && *++scan == *++match && *++scan == *++match &&
+ *++scan == *++match && *++scan == *++match && *++scan == *++match && *++scan == *++match &&
scan < strend);
len = MAX_MATCH - (int)(strend - scan);
@@ -481,8 +470,7 @@ error:
scan_end = scan[best_len];
#endif
}
- } while ((cur_match = prev[cur_match & WMASK]) > limit &&
- --chain_length != 0);
+ } while ((cur_match = prev[cur_match & WMASK]) > limit && --chain_length != 0);
return best_len;
}
@@ -496,10 +484,8 @@ local void check_match(start, match, length) IPos start, match;
int length;
{
/* check that the match is indeed a match */
- if (memcmp((char *)window + match, (char *)window + start, length) !=
- EQUAL) {
- fprintf(stderr, " start %d, match %d, length %d\n", start,
- match, length);
+ if (memcmp((char *)window + match, (char *)window + start, length) != EQUAL) {
+ fprintf(stderr, " start %d, match %d, length %d\n", start, match, length);
error("invalid match");
}
if (verbose > 1) {
@@ -524,8 +510,7 @@ int length;
local void fill_window()
{
register unsigned n, m;
- unsigned more =
- (unsigned)(window_size - (ulg)lookahead - (ulg)strstart);
+ unsigned more = (unsigned)(window_size - (ulg)lookahead - (ulg)strstart);
/* Amount of free space at the end of the window. */
/* If the window is almost full and there is insufficient lookahead,
@@ -540,8 +525,7 @@ local void fill_window()
/* By the IN assertion, the window is not empty so we can't
* confuse more == 0 with more == 64K on a 16 bit machine.
*/
- Assert(window_size == (ulg)2 * WSIZE,
- "no sliding with BIG_MEM");
+ Assert(window_size == (ulg)2 * WSIZE, "no sliding with BIG_MEM");
memcpy((char *)window, (char *)window + WSIZE, (unsigned)WSIZE);
match_start -= WSIZE;
@@ -577,10 +561,8 @@ local void fill_window()
* Flush the current block, with given end-of-file flag.
* IN assertion: strstart is set to the end of the current match.
*/
-#define FLUSH_BLOCK(eof) \
- flush_block(block_start >= 0L ? \
- (char *)&window[(unsigned)block_start] : \
- (char *)NULL, \
+#define FLUSH_BLOCK(eof) \
+ flush_block(block_start >= 0L ? (char *)&window[(unsigned)block_start] : (char *)NULL, \
(long)strstart - block_start, (eof))
/* ===========================================================================
@@ -619,8 +601,7 @@ local ulg deflate_fast()
if (match_length >= MIN_MATCH) {
check_match(strstart, match_start, match_length);
- flush = ct_tally(strstart - match_start,
- match_length - MIN_MATCH);
+ flush = ct_tally(strstart - match_start, match_length - MIN_MATCH);
lookahead -= match_length;
@@ -681,10 +662,10 @@ local ulg deflate_fast()
*/
ulg deflate()
{
- IPos hash_head; /* head of hash chain */
- IPos prev_match; /* previous match */
- int flush; /* set if current block must be flushed */
- int match_available = 0; /* set if previous match exists */
+ IPos hash_head; /* head of hash chain */
+ IPos prev_match; /* previous match */
+ int flush; /* set if current block must be flushed */
+ int match_available = 0; /* set if previous match exists */
register unsigned match_length = MIN_MATCH - 1; /* length of best match
*/
#ifdef DEBUG
@@ -706,8 +687,7 @@ ulg deflate()
prev_length = match_length, prev_match = match_start;
match_length = MIN_MATCH - 1;
- if (hash_head != NIL && prev_length < max_lazy_match &&
- strstart - hash_head <= MAX_DIST) {
+ if (hash_head != NIL && prev_length < max_lazy_match && strstart - hash_head <= MAX_DIST) {
/* To simplify the code, we prevent matches with the
* string of window index 0 (in particular we have to
* avoid a match of the string with itself at the start
@@ -719,8 +699,7 @@ ulg deflate()
match_length = lookahead;
/* Ignore a length 3 match if it is too distant: */
- if (match_length == MIN_MATCH &&
- strstart - match_start > TOO_FAR) {
+ if (match_length == MIN_MATCH && strstart - match_start > TOO_FAR) {
/* If prev_match is also MIN_MATCH, match_start
* is garbage but we will ignore the current
* match anyway.
@@ -734,8 +713,7 @@ ulg deflate()
if (prev_length >= MIN_MATCH && match_length <= prev_length) {
check_match(strstart - 1, prev_match, prev_length);
- flush = ct_tally(strstart - 1 - prev_match,
- prev_length - MIN_MATCH);
+ flush = ct_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);
/* Insert in hash table all strings up to the end of the
* match. strstart-1 and strstart are already inserted.
@@ -779,8 +757,7 @@ ulg deflate()
strstart++;
lookahead--;
}
- Assert(strstart <= isize && lookahead <= isize,
- "a bit too far");
+ Assert(strstart <= isize && lookahead <= isize, "a bit too far");
/* Make sure that we always have enough lookahead, except
* at the end of the input file. We need MAX_MATCH bytes
diff --git a/bin/gzip/gzip.c b/bin/gzip/gzip.c
index b0e20bb1..919ab7a2 100644
--- a/bin/gzip/gzip.c
+++ b/bin/gzip/gzip.c
@@ -14,23 +14,21 @@
#include <stdio.h> // for fprintf, stderr, perror, fileno, stdin, stdout
#include <string.h> // for strcpy, strcmp, strlen, strcat, memcmp, strncmp
-static char *license_msg[] = {
- " Copyright (C) 1992-1993 Jean-loup Gailly",
- " This program is free software; you can redistribute it and/or modify",
- " it under the terms of the GNU General Public License as published by",
- " the Free Software Foundation; either version 2, or (at your option)",
- " any later version.",
- "",
- " This program is distributed in the hope that it will be useful,",
- " but WITHOUT ANY WARRANTY; without even the implied warranty of",
- " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the",
- " GNU General Public License for more details.",
- "",
- " You should have received a copy of the GNU General Public License",
- " along with this program; if not, write to the Free Software",
- " Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.",
- 0
-};
+static char *license_msg[] = { " Copyright (C) 1992-1993 Jean-loup Gailly",
+ " This program is free software; you can redistribute it and/or modify",
+ " it under the terms of the GNU General Public License as published by",
+ " the Free Software Foundation; either version 2, or (at your option)",
+ " any later version.",
+ "",
+ " This program is distributed in the hope that it will be useful,",
+ " but WITHOUT ANY WARRANTY; without even the implied warranty of",
+ " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the",
+ " GNU General Public License for more details.",
+ "",
+ " You should have received a copy of the GNU General Public License",
+ " along with this program; if not, write to the Free Software",
+ " Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.",
+ 0 };
/* Compress files with zip algorithm and 'compress' interface.
* See usage() and help() functions below for all options.
@@ -98,23 +96,23 @@ int decompress_wanted;
int decompress; /* decompress (-d) */
#define decompress_wanted decompress
#endif
-int force; /* don't ask questions, compress links (-f) */
-int no_name = -1; /* don't save or restore the original file name */
-int no_time = -1; /* don't save or restore the original file time */
-int verbose; /* be verbose (-v) */
-int quiet; /* be very quiet (-q) */
-int test; /* test .gz file integrity */
-int foreground; /* set if program run in foreground */
-char *progname; /* program name */
-int method = DEFLATED; /* compression method */
-int exit_code = OK; /* program exit code */
-int save_orig_name; /* set if original name must be saved */
-int last_member; /* set for .zip and .Z files */
-int part_nb; /* number of parts in .gz file */
-time_t time_stamp; /* original time stamp (modification time) */
-long ifile_size; /* input file size, -1 for devices (debug only) */
-char *env; /* contents of GZIP env variable */
-char **args = NULL; /* argv pointer if GZIP env variable defined */
+int force; /* don't ask questions, compress links (-f) */
+int no_name = -1; /* don't save or restore the original file name */
+int no_time = -1; /* don't save or restore the original file time */
+int verbose; /* be verbose (-v) */
+int quiet; /* be very quiet (-q) */
+int test; /* test .gz file integrity */
+int foreground; /* set if program run in foreground */
+char *progname; /* program name */
+int method = DEFLATED; /* compression method */
+int exit_code = OK; /* program exit code */
+int save_orig_name; /* set if original name must be saved */
+int last_member; /* set for .zip and .Z files */
+int part_nb; /* number of parts in .gz file */
+time_t time_stamp; /* original time stamp (modification time) */
+long ifile_size; /* input file size, -1 for devices (debug only) */
+char *env; /* contents of GZIP env variable */
+char **args = NULL; /* argv pointer if GZIP env variable defined */
char z_suffix[MAX_SUFFIX + 1]; /* default suffix (can be set with --suffix) */
int z_len; /* strlen(z_suffix) */
@@ -167,39 +165,36 @@ local void reset_times OF((char *name, struct stat *statb));
/* ======================================================================== */
local void usage()
{
- fprintf(stderr, "usage: %s [-cdfhlLnNtvV19] [-S suffix] [file ...]\n",
- progname);
+ fprintf(stderr, "usage: %s [-cdfhlLnNtvV19] [-S suffix] [file ...]\n", progname);
}
/* ======================================================================== */
local void help()
{
- static char *help_msg[] = {
- " -c --stdout write on standard output, keep original files unchanged",
- " -d --decompress decompress",
- " -f --force force overwrite of output file and compress links",
- " -h --help give this help",
- " -L --license display software license",
+ static char *help_msg[] = { " -c --stdout write on standard output, keep original files unchanged",
+ " -d --decompress decompress",
+ " -f --force force overwrite of output file and compress links",
+ " -h --help give this help",
+ " -L --license display software license",
#ifdef UNDOCUMENTED
- " -m --no-time do not save or restore the original modification time",
- " -M --time save or restore the original modification time",
+ " -m --no-time do not save or restore the original modification time",
+ " -M --time save or restore the original modification time",
#endif
- " -n --no-name do not save or restore the original name and time stamp",
- " -N --name save or restore the original name and time stamp",
- " -q --quiet suppress all warnings",
- " -S .suf --suffix .suf use suffix .suf on compressed files",
- " -t --test test compressed file integrity",
- " -v --verbose verbose mode",
- " -V --version display version number",
+ " -n --no-name do not save or restore the original name and time stamp",
+ " -N --name save or restore the original name and time stamp",
+ " -q --quiet suppress all warnings",
+ " -S .suf --suffix .suf use suffix .suf on compressed files",
+ " -t --test test compressed file integrity",
+ " -v --verbose verbose mode",
+ " -V --version display version number",
#ifdef SUPPORT_ZIP
- " -1 --fast compress faster",
- " -9 --best compress better",
- " file... files to (de)compress. If none given, use standard input.",
+ " -1 --fast compress faster",
+ " -9 --best compress better",
+ " file... files to (de)compress. If none given, use standard input.",
#else
- " file... files to decompress. If none given, use standard input.",
+ " file... files to decompress. If none given, use standard input.",
#endif
- 0
- };
+ 0 };
char **p = help_msg;
fprintf(stderr, "%s %s (%s)\n", progname, VERSION, REVDATE);
@@ -280,8 +275,7 @@ int main(int argc, char **argv)
strncpy(z_suffix, Z_SUFFIX, sizeof(z_suffix) - 1);
z_len = strlen(z_suffix);
- while ((optc = getopt(argc, argv, "cdfhH?LmMnNqrS:tvV123456789")) !=
- EOF) {
+ while ((optc = getopt(argc, argv, "cdfhH?LmMnNqrS:tvV123456789")) != EOF) {
switch (optc) {
case 'c':
to_stdout = 1;
@@ -356,9 +350,7 @@ int main(int argc, char **argv)
#ifndef SUPPORT_ZIP
if (!decompress_wanted) {
- fprintf(stderr,
- "%s: this version does not support compression\n",
- progname);
+ fprintf(stderr, "%s: this version does not support compression\n", progname);
do_exit(ERROR);
}
#endif
@@ -374,8 +366,7 @@ int main(int argc, char **argv)
file_count = argc - optind;
if ((z_len == 0 && !decompress) || z_len > MAX_SUFFIX) {
- fprintf(stderr, "%s: incorrect suffix '%s'\n", progname,
- optarg);
+ fprintf(stderr, "%s: incorrect suffix '%s'\n", progname, optarg);
do_exit(ERROR);
}
@@ -418,10 +409,8 @@ local void treat_stdin()
*
* Here we use the --force option to get the other behavior.
*/
- fprintf(stderr,
- "%s: compressed data not %s a terminal. Use -f to force %scompression.\n",
- progname, decompress ? "read from" : "written to",
- decompress ? "de" : "");
+ fprintf(stderr, "%s: compressed data not %s a terminal. Use -f to force %scompression.\n", progname,
+ decompress ? "read from" : "written to", decompress ? "de" : "");
fprintf(stderr, "For help, type: %s -h\n", progname);
do_exit(ERROR);
}
@@ -472,13 +461,11 @@ local void treat_stdin()
fprintf(stderr, " OK\n");
} else if (!decompress) {
- display_ratio(bytes_in - (bytes_out - header_bytes),
- bytes_in, stderr);
+ display_ratio(bytes_in - (bytes_out - header_bytes), bytes_in, stderr);
fprintf(stderr, "\n");
#ifdef DISPLAY_STDIN_RATIO
} else {
- display_ratio(bytes_out - (bytes_in - header_bytes),
- bytes_out, stderr);
+ display_ratio(bytes_out - (bytes_in - header_bytes), bytes_out, stderr);
fprintf(stderr, "\n");
#endif
}
@@ -504,19 +491,15 @@ local void treat_file(char *iname)
/* If the input name is that of a directory, recurse or ignore: */
if (S_ISDIR(istat.st_mode)) {
- WARN((stderr, "%s: %s is a directory -- ignored\n", progname,
- ifname));
+ WARN((stderr, "%s: %s is a directory -- ignored\n", progname, ifname));
return;
}
if (!S_ISREG(istat.st_mode)) {
- WARN((stderr,
- "%s: %s is not a directory or a regular file - ignored\n",
- progname, ifname));
+ WARN((stderr, "%s: %s is not a directory or a regular file - ignored\n", progname, ifname));
return;
}
if (istat.st_nlink > 1 && !to_stdout && !force) {
- WARN((stderr, "%s: %s has %d other link%c -- unchanged\n",
- progname, ifname, (int)istat.st_nlink - 1,
+ WARN((stderr, "%s: %s has %d other link%c -- unchanged\n", progname, ifname, (int)istat.st_nlink - 1,
istat.st_nlink > 2 ? 's' : ' '));
return;
}
@@ -568,8 +551,7 @@ local void treat_file(char *iname)
return;
if (!decompress && save_orig_name && !verbose && !quiet) {
- fprintf(stderr, "%s: %s compressed to %s\n", progname,
- ifname, ofname);
+ fprintf(stderr, "%s: %s compressed to %s\n", progname, ifname, ofname);
}
}
/* Keep the name even if not truncated except with --no-name: */
@@ -578,9 +560,7 @@ local void treat_file(char *iname)
if (verbose) {
fprintf(stderr, "%s:\t%s", ifname,
- (int)strlen(ifname) >= 15 ?
- "" :
- ((int)strlen(ifname) >= 7 ? "\t" : "\t\t"));
+ (int)strlen(ifname) >= 15 ? "" : ((int)strlen(ifname) >= 7 ? "\t" : "\t\t"));
}
/* Actually do the compression/decompression. Loop over zipped members.
@@ -614,11 +594,9 @@ local void treat_file(char *iname)
if (test) {
fprintf(stderr, " OK");
} else if (decompress) {
- display_ratio(bytes_out - (bytes_in - header_bytes),
- bytes_out, stderr);
+ display_ratio(bytes_out - (bytes_in - header_bytes), bytes_out, stderr);
} else {
- display_ratio(bytes_in - (bytes_out - header_bytes),
- bytes_in, stderr);
+ display_ratio(bytes_in - (bytes_out - header_bytes), bytes_in, stderr);
}
if (!test && !to_stdout) {
fprintf(stderr, " -- replaced with %s", ofname);
@@ -677,8 +655,7 @@ local int create_outfile()
if (decompress) {
/* name might be too long if an original name was saved
*/
- WARN((stderr, "%s: %s: warning, name truncated\n",
- progname, ofname));
+ WARN((stderr, "%s: %s: warning, name truncated\n", progname, ofname));
return OK;
}
close(ofd);
@@ -717,8 +694,7 @@ local char *get_suffix(char *name)
int nlen, slen;
char suffix[MAX_SUFFIX + 3]; /* last chars of name, forced to lower case
*/
- static char *known_suffixes[] = { z_suffix, ".gz", ".z", ".taz", ".tgz",
- "-gz", "-z", "_z", NULL };
+ static char *known_suffixes[] = { z_suffix, ".gz", ".z", ".taz", ".tgz", "-gz", "-z", "_z", NULL };
char **suf = known_suffixes;
if (strequ(z_suffix, "z"))
@@ -734,8 +710,7 @@ local char *get_suffix(char *name)
slen = strlen(suffix);
do {
int s = strlen(*suf);
- if (slen > s && suffix[slen - s - 1] != PATH_SEP &&
- strequ(suffix + slen - s, *suf)) {
+ if (slen > s && suffix[slen - s - 1] != PATH_SEP && strequ(suffix + slen - s, *suf)) {
return name + nlen - s;
}
} while (*++suf != NULL);
@@ -820,9 +795,7 @@ local int make_ofname()
/* Avoid annoying messages with -r */
if (verbose || !quiet) {
- WARN((stderr,
- "%s: %s: unknown suffix -- ignored\n",
- progname, ifname));
+ WARN((stderr, "%s: %s: unknown suffix -- ignored\n", progname, ifname));
}
return WARNING;
}
@@ -839,9 +812,7 @@ local int make_ofname()
} else if (suff != NULL) {
/* Avoid annoying messages with -r (see treat_dir()) */
if (verbose || !quiet) {
- fprintf(stderr,
- "%s: %s already has %s suffix -- unchanged\n",
- progname, ifname, suff);
+ fprintf(stderr, "%s: %s already has %s suffix -- unchanged\n", progname, ifname, suff);
}
if (exit_code == OK)
exit_code = WARNING;
@@ -889,13 +860,11 @@ local int get_method()
/* assume multiple members in gzip file except for record oriented I/O
*/
- if (memcmp(magic, GZIP_MAGIC, 2) == 0 ||
- memcmp(magic, OLD_GZIP_MAGIC, 2) == 0) {
+ if (memcmp(magic, GZIP_MAGIC, 2) == 0 || memcmp(magic, OLD_GZIP_MAGIC, 2) == 0) {
method = (int)get_byte();
if (method != DEFLATED) {
- fprintf(stderr,
- "%s: %s: unknown method %d -- get newer version of gzip\n",
- progname, ifname, method);
+ fprintf(stderr, "%s: %s: unknown method %d -- get newer version of gzip\n", progname, ifname,
+ method);
exit_code = ERROR;
return -1;
}
@@ -903,24 +872,20 @@ local int get_method()
flags = (uch)get_byte();
if ((flags & ENCRYPTED) != 0) {
- fprintf(stderr,
- "%s: %s is encrypted -- get newer version of gzip\n",
- progname, ifname);
+ fprintf(stderr, "%s: %s is encrypted -- get newer version of gzip\n", progname, ifname);
exit_code = ERROR;
return -1;
}
if ((flags & CONTINUATION) != 0) {
- fprintf(stderr,
- "%s: %s is a a multi-part gzip file -- get newer version of gzip\n",
- progname, ifname);
+ fprintf(stderr, "%s: %s is a a multi-part gzip file -- get newer version of gzip\n", progname,
+ ifname);
exit_code = ERROR;
if (force <= 1)
return -1;
}
if ((flags & RESERVED) != 0) {
- fprintf(stderr,
- "%s: %s has flags 0x%x -- get newer version of gzip\n",
- progname, ifname, flags);
+ fprintf(stderr, "%s: %s has flags 0x%x -- get newer version of gzip\n", progname, ifname,
+ flags);
exit_code = ERROR;
if (force <= 1)
return -1;
@@ -939,17 +904,14 @@ local int get_method()
unsigned part = (unsigned)get_byte();
part |= ((unsigned)get_byte()) << 8;
if (verbose) {
- fprintf(stderr, "%s: %s: part number %u\n",
- progname, ifname, part);
+ fprintf(stderr, "%s: %s: part number %u\n", progname, ifname, part);
}
}
if ((flags & EXTRA_FIELD) != 0) {
unsigned len = (unsigned)get_byte();
len |= ((unsigned)get_byte()) << 8;
if (verbose) {
- fprintf(stderr,
- "%s: %s: extra field of %u bytes ignored\n",
- progname, ifname, len);
+ fprintf(stderr, "%s: %s: extra field of %u bytes ignored\n", progname, ifname, len);
}
while (len--)
(void)get_byte();
@@ -998,13 +960,11 @@ local int get_method()
return method;
if (part_nb == 1) {
- fprintf(stderr, "\n%s: %s: not in gzip format\n", progname,
- ifname);
+ fprintf(stderr, "\n%s: %s: not in gzip format\n", progname, ifname);
exit_code = ERROR;
return -1;
}
- WARN((stderr, "\n%s: %s: decompression OK, trailing garbage ignored\n",
- progname, ifname));
+ WARN((stderr, "\n%s: %s: decompression OK, trailing garbage ignored\n", progname, ifname));
return -2;
}
@@ -1017,12 +977,9 @@ local int same_file(struct stat *stat1, struct stat *stat2)
stat1->st_dev == stat2->st_dev
#ifdef NO_ST_INO
/* Can't rely on st_ino and st_dev, use other fields: */
- && stat1->st_mode == stat2->st_mode &&
- stat1->st_uid == stat2->st_uid &&
- stat1->st_gid == stat2->st_gid &&
- stat1->st_size == stat2->st_size &&
- stat1->st_atime == stat2->st_atime &&
- stat1->st_mtime == stat2->st_mtime &&
+ && stat1->st_mode == stat2->st_mode && stat1->st_uid == stat2->st_uid &&
+ stat1->st_gid == stat2->st_gid && stat1->st_size == stat2->st_size &&
+ stat1->st_atime == stat2->st_atime && stat1->st_mtime == stat2->st_mtime &&
stat1->st_ctime == stat2->st_ctime
#endif
;
@@ -1160,12 +1117,10 @@ local int check_ofname()
*/
if (same_file(&istat, &ostat)) {
if (strequ(ifname, ofname)) {
- fprintf(stderr,
- "%s: %s: cannot %scompress onto itself\n",
- progname, ifname, decompress ? "de" : "");
+ fprintf(stderr, "%s: %s: cannot %scompress onto itself\n", progname, ifname,
+ decompress ? "de" : "");
} else {
- fprintf(stderr, "%s: %s and %s are the same file\n",
- progname, ifname, ofname);
+ fprintf(stderr, "%s: %s and %s are the same file\n", progname, ifname, ofname);
}
exit_code = ERROR;
return ERROR;
diff --git a/bin/gzip/gzip.h b/bin/gzip/gzip.h
index 6e01f429..5258bc76 100644
--- a/bin/gzip/gzip.h
+++ b/bin/gzip/gzip.h
@@ -85,12 +85,11 @@ extern int method; /* compression method */
#ifdef DYN_ALLOC
#define EXTERN(type, array) extern type *near array
#define DECLARE(type, array, size) type *near array
-#define ALLOC(type, array, size) \
- { \
- array = (type *)fcalloc((size_t)(((size) + 1L) / 2), \
- 2 * sizeof(type)); \
- if (array == NULL) \
- error("insufficient memory"); \
+#define ALLOC(type, array, size) \
+ { \
+ array = (type *)fcalloc((size_t)(((size) + 1L) / 2), 2 * sizeof(type)); \
+ if (array == NULL) \
+ error("insufficient memory"); \
}
#define FREE(array) \
{ \
@@ -143,10 +142,10 @@ extern long ifile_size; /* input file size, -1 for devices (debug only) */
typedef int file_t; /* Do not use stdio */
#define NO_FILE (-1) /* in memory compression */
-#define PACK_MAGIC "\037\036" /* Magic header for packed files */
-#define GZIP_MAGIC "\037\213" /* Magic header for gzip files, 1F 8B */
-#define OLD_GZIP_MAGIC "\037\236" /* Magic header for gzip 0.5 = freeze 1.x */
-#define LZH_MAGIC "\037\240" /* Magic header for SCO LZH Compress files*/
+#define PACK_MAGIC "\037\036" /* Magic header for packed files */
+#define GZIP_MAGIC "\037\213" /* Magic header for gzip files, 1F 8B */
+#define OLD_GZIP_MAGIC "\037\236" /* Magic header for gzip 0.5 = freeze 1.x */
+#define LZH_MAGIC "\037\240" /* Magic header for SCO LZH Compress files*/
#define PKZIP_MAGIC "\120\113\003\004" /* Magic header for pkzip files */
/* gzip flag byte */
diff --git a/bin/gzip/inflate.c b/bin/gzip/inflate.c
index af2e1e92..29015a7d 100644
--- a/bin/gzip/inflate.c
+++ b/bin/gzip/inflate.c
@@ -126,8 +126,7 @@ struct huft {
};
/* Function prototypes */
-int huft_build OF((unsigned *, unsigned, unsigned, ush *, ush *, struct huft **,
- int *));
+int huft_build OF((unsigned *, unsigned, unsigned, ush *, ush *, struct huft **, int *));
int huft_free OF((struct huft *));
int inflate_codes OF((struct huft *, struct huft *, int, int));
int inflate_stored OF((void));
@@ -150,28 +149,22 @@ int inflate OF((void));
/* Tables for deflate from PKZIP's appnote.txt. */
static unsigned border[] = { /* Order of the bit length code lengths */
- 16, 17, 18, 0, 8, 7, 9, 6, 10, 5,
- 11, 4, 12, 3, 13, 2, 14, 1, 15
+ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15
};
static ush cplens[] = { /* Copy lengths for literal codes 257..285 */
- 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15,
- 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83,
- 99, 115, 131, 163, 195, 227, 258, 0, 0
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
+ 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0
};
/* note: see note #13 above about the 258 in this list. */
static ush cplext[] = { /* Extra bits for literal codes 257..285 */
- 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,
- 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99
}; /* 99==invalid */
static ush cpdist[] = { /* Copy offsets for distance codes 0..29 */
- 1, 2, 3, 4, 5, 7, 9, 13,
- 17, 25, 33, 49, 65, 97, 129, 193,
- 257, 385, 513, 769, 1025, 1537, 2049, 3073,
- 4097, 6145, 8193, 12289, 16385, 24577
+ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129,
+ 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577
};
static ush cpdext[] = { /* Extra bits for distance codes */
- 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6,
- 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13
+ 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13
};
/* Macros for inflate() bit peeking and grabbing.
@@ -207,9 +200,8 @@ static ush cpdext[] = { /* Extra bits for distance codes */
ulg bb; /* bit buffer */
unsigned bk; /* bits in bit buffer */
-ush mask_bits[] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000f, 0x001f,
- 0x003f, 0x007f, 0x00ff, 0x01ff, 0x03ff, 0x07ff,
- 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff };
+ush mask_bits[] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
+ 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff };
#ifdef CRYPT
uch cc;
@@ -271,8 +263,7 @@ int dbits = 6; /* bits in base distance lookup table */
unsigned hufts; /* track memory usage */
-int huft_build(unsigned *b, unsigned n, unsigned s, ush *d, ush *e,
- struct huft **t, int *m)
+int huft_build(unsigned *b, unsigned n, unsigned s, ush *d, ush *e, struct huft **t, int *m)
{
unsigned a; /* counter for codes of length k */
unsigned c[BMAX + 1]; /* bit length count table */
@@ -299,10 +290,7 @@ int huft_build(unsigned *b, unsigned n, unsigned s, ush *d, ush *e,
p = b;
i = n;
do {
- Tracecv(*p, (stderr,
- (n - i >= ' ' && n - i <= '~' ? "%c %d\n" :
- "0x%x %d\n"),
- n - i, *p));
+ Tracecv(*p, (stderr, (n - i >= ' ' && n - i <= '~' ? "%c %d\n" : "0x%x %d\n"), n - i, *p));
c[*p]++; /* assume all entries <= BMAX */
p++; /* Can't combine with above line (Solaris bug) */
} while (--i);
@@ -375,15 +363,13 @@ int huft_build(unsigned *b, unsigned n, unsigned s, ush *d, ush *e,
/* compute minimum size table less than or equal
* to l bits */
- z = (z = g - w) > (unsigned)l ?
- (unsigned)l :
- z; /* upper limit on table size */
- if ((f = 1 << (j = k - w)) > a + 1) /* try a k-w
- bit table
- */
- { /* too few codes for k-w bit table */
- f -= a + 1; /* deduct codes from
- patterns left */
+ z = (z = g - w) > (unsigned)l ? (unsigned)l : z; /* upper limit on table size */
+ if ((f = 1 << (j = k - w)) > a + 1) /* try a k-w
+ bit table
+ */
+ { /* too few codes for k-w bit table */
+ f -= a + 1; /* deduct codes from
+ patterns left */
xp = c + k;
while (++j < z) /* try smaller tables up
to z bits */
@@ -392,38 +378,36 @@ int huft_build(unsigned *b, unsigned n, unsigned s, ush *d, ush *e,
break; /* enough codes
to use up j
bits */
- f -= *xp; /* else deduct codes
- from patterns */
+ f -= *xp; /* else deduct codes
+ from patterns */
}
}
z = 1 << j; /* table entries for j-bit table */
/* allocate and link in new table */
- if ((q = (struct huft *)malloc(
- (z + 1) * sizeof(struct huft))) ==
- (struct huft *)NULL) {
+ if ((q = (struct huft *)malloc((z + 1) * sizeof(struct huft))) == (struct huft *)NULL) {
if (h)
huft_free(u[0]);
return 3; /* not enough memory */
}
hufts += z + 1; /* track memory usage */
- *t = q + 1; /* link to list for huft_free() */
+ *t = q + 1; /* link to list for huft_free() */
*(t = &(q->v.t)) = (struct huft *)NULL;
u[h] = ++q; /* table starts after link */
/* connect to last table, if there is one */
if (h) {
- x[h] = i; /* save pattern for backing up
- */
- r.b = (uch)l; /* bits to dump before
- this table */
+ x[h] = i; /* save pattern for backing up
+ */
+ r.b = (uch)l; /* bits to dump before
+ this table */
r.e = (uch)(16 + j); /* bits in this
table */
- r.v.t = q; /* pointer to this table */
- j = i >> (w - l); /* (get around Turbo C
- bug) */
- u[h - 1][j] = r; /* connect to last
- table */
+ r.v.t = q; /* pointer to this table */
+ j = i >> (w - l); /* (get around Turbo C
+ bug) */
+ u[h - 1][j] = r; /* connect to last
+ table */
}
}
@@ -435,9 +419,9 @@ int huft_build(unsigned *b, unsigned n, unsigned s, ush *d, ush *e,
r.e = (uch)(*p < 256 ? 16 : 15); /* 256 is
end-of-block
code */
- r.v.n = (ush)(*p); /* simple code is just the
- value */
- p++; /* one compiler does not like *p++ */
+ r.v.n = (ush)(*p); /* simple code is just the
+ value */
+ p++; /* one compiler does not like *p++ */
} else {
r.e = (uch)e[*p - s]; /* non-simple--look up in
lists */
@@ -508,9 +492,7 @@ int inflate_codes(struct huft *tl, struct huft *td, int bl, int bd)
DUMPBITS(t->b)
e -= 16;
NEEDBITS(e)
- } while (
- (e = (t = t->v.t + ((unsigned)b & mask_bits[e]))
- ->e) > 16);
+ } while ((e = (t = t->v.t + ((unsigned)b & mask_bits[e]))->e) > 16);
DUMPBITS(t->b)
if (e == 16) /* then it's a literal */
{
@@ -540,9 +522,7 @@ int inflate_codes(struct huft *tl, struct huft *td, int bl, int bd)
DUMPBITS(t->b)
e -= 16;
NEEDBITS(e)
- } while ((e = (t = t->v.t +
- ((unsigned)b & mask_bits[e]))
- ->e) > 16);
+ } while ((e = (t = t->v.t + ((unsigned)b & mask_bits[e]))->e) > 16);
DUMPBITS(t->b)
NEEDBITS(e)
d = w - t->v.n - ((unsigned)b & mask_bits[e]);
@@ -551,11 +531,7 @@ int inflate_codes(struct huft *tl, struct huft *td, int bl, int bd)
/* do the copy */
do {
- n -= (e = (e = WSIZE -
- ((d &= WSIZE - 1) > w ? d : w)) >
- n ?
- n :
- e);
+ n -= (e = (e = WSIZE - ((d &= WSIZE - 1) > w ? d : w)) > n ? n : e);
#if !defined(NOMEMCPY) && !defined(DEBUG)
if (w - d >= e) /* (this test assumes unsigned
comparison) */
@@ -568,8 +544,7 @@ int inflate_codes(struct huft *tl, struct huft *td, int bl, int bd)
#endif /* !NOMEMCPY */
do {
slide[w++] = slide[d++];
- Tracevv((stderr, "%c",
- slide[w - 1]));
+ Tracevv((stderr, "%c", slide[w - 1]));
} while (--e);
if (w == WSIZE) {
flush_output(w);
diff --git a/bin/gzip/trees.c b/bin/gzip/trees.c
index 1b73553d..41e296a2 100644
--- a/bin/gzip/trees.c
+++ b/bin/gzip/trees.c
@@ -89,12 +89,10 @@ static char rcsid[] = "$Id: trees.c,v 1.1 2002/08/18 00:59:21 hpa Exp $";
/* number of codes used to transfer the bit lengths */
local int extra_lbits[LENGTH_CODES] /* extra bits for each length code */
- = { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2,
- 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0 };
+ = { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0 };
local int extra_dbits[D_CODES] /* extra bits for each distance code */
- = { 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6,
- 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13 };
+ = { 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13 };
local int extra_blbits[BL_CODES] /* extra bits for each bit length code */
= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7 };
@@ -203,23 +201,16 @@ typedef struct tree_desc {
int max_code; /* largest code with non zero frequency */
} tree_desc;
-local tree_desc l_desc = {
- dyn_ltree, static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS, 0
-};
+local tree_desc l_desc = { dyn_ltree, static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS, 0 };
-local tree_desc d_desc = { dyn_dtree, static_dtree, extra_dbits,
- 0, D_CODES, MAX_BITS,
- 0 };
+local tree_desc d_desc = { dyn_dtree, static_dtree, extra_dbits, 0, D_CODES, MAX_BITS, 0 };
-local tree_desc bl_desc = { bl_tree, (ct_data *)0, extra_blbits,
- 0, BL_CODES, MAX_BL_BITS,
- 0 };
+local tree_desc bl_desc = { bl_tree, (ct_data *)0, extra_blbits, 0, BL_CODES, MAX_BL_BITS, 0 };
local ush bl_count[MAX_BITS + 1];
/* number of codes at each bit length for an optimal tree */
-local uch bl_order[BL_CODES] = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5,
- 11, 4, 12, 3, 13, 2, 14, 1, 15 };
+local uch bl_order[BL_CODES] = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 };
/* The lengths of the bit length codes are sent in order of decreasing
* probability, to avoid transmitting the lengths for unused bit length codes.
*/
@@ -317,8 +308,7 @@ local void set_file_type OF((void));
}
#endif
-#define d_code(dist) \
- ((dist) < 256 ? dist_code[dist] : dist_code[256 + ((dist) >> 7)])
+#define d_code(dist) ((dist) < 256 ? dist_code[dist] : dist_code[256 + ((dist) >> 7)])
/* Mapping from a distance to a distance code. dist is the distance - 1 and
* must not have side effects. dist_code[256] and dist_code[257] are never
* used.
@@ -449,9 +439,8 @@ local void init_block()
* Compares to subtrees, using the tree depth as tie breaker when
* the subtrees have equal frequency. This minimizes the worst case length.
*/
-#define smaller(tree, n, m) \
- ((tree)[n].Freq < (tree)[m].Freq || \
- ((tree)[n].Freq == (tree)[m].Freq && depth[n] <= depth[m]))
+#define smaller(tree, n, m) \
+ ((tree)[n].Freq < (tree)[m].Freq || ((tree)[n].Freq == (tree)[m].Freq && depth[n] <= depth[m]))
/* ===========================================================================
* Restore the heap property by moving down the tree starting at node k,
@@ -569,10 +558,8 @@ local void gen_bitlen(desc) tree_desc *desc; /* the tree descriptor */
if (m > max_code)
continue;
if (tree[m].Len != (unsigned)bits) {
- Trace((stderr, "code %d bits %d->%d\n", m,
- tree[m].Len, bits));
- opt_len += ((long)bits - (long)tree[m].Len) *
- (long)tree[m].Freq;
+ Trace((stderr, "code %d bits %d->%d\n", m, tree[m].Len, bits));
+ opt_len += ((long)bits - (long)tree[m].Len) * (long)tree[m].Freq;
tree[m].Len = (ush)bits;
}
n--;
@@ -589,7 +576,7 @@ local void gen_bitlen(desc) tree_desc *desc; /* the tree descriptor */
* zero code length.
*/
local void gen_codes(tree, max_code) ct_data *tree; /* the tree to decorate */
-int max_code; /* largest code with non zero frequency */
+int max_code; /* largest code with non zero frequency */
{
ush next_code[MAX_BITS + 1]; /* next code value for each bit length */
ush code = 0; /* running code value */
@@ -605,8 +592,7 @@ int max_code; /* largest code with non zero frequency */
/* Check that the bit counts in bl_count are consistent. The last code
* must be all ones.
*/
- Assert(code + bl_count[MAX_BITS] - 1 == (1 << MAX_BITS) - 1,
- "inconsistent bit counts");
+ Assert(code + bl_count[MAX_BITS] - 1 == (1 << MAX_BITS) - 1, "inconsistent bit counts");
Tracev((stderr, "\ngen_codes: max_code %d ", max_code));
for (n = 0; n <= max_code; n++) {
@@ -616,10 +602,8 @@ int max_code; /* largest code with non zero frequency */
/* Now reverse the bits */
tree[n].Code = bi_reverse(next_code[len]++, len);
- Tracec(tree != static_ltree,
- (stderr, "\nn %3d %c l %2d c %4x (%x) ", n,
- (isgraph(n) ? n : ' '), len, tree[n].Code,
- next_code[len] - 1));
+ Tracec(tree != static_ltree, (stderr, "\nn %3d %c l %2d c %4x (%x) ", n, (isgraph(n) ? n : ' '), len,
+ tree[n].Code, next_code[len] - 1));
}
}
@@ -693,8 +677,7 @@ local void build_tree(desc) tree_desc *desc; /* the tree descriptor */
tree[n].Dad = tree[m].Dad = (ush)node;
#ifdef DUMP_BL_TREE
if (tree == bl_tree) {
- fprintf(stderr, "\nnode %d(%d), sons %d(%d) %d(%d)",
- node, tree[node].Freq, n, tree[n].Freq, m,
+ fprintf(stderr, "\nnode %d(%d), sons %d(%d) %d(%d)", node, tree[node].Freq, n, tree[n].Freq, m,
tree[m].Freq);
}
#endif
@@ -722,7 +705,7 @@ local void build_tree(desc) tree_desc *desc; /* the tree descriptor */
* during the construction of bl_tree.)
*/
local void scan_tree(tree, max_code) ct_data *tree; /* the tree to be scanned */
-int max_code; /* and its largest code of non zero frequency */
+int max_code; /* and its largest code of non zero frequency */
{
int n; /* iterates over all tree elements */
int prevlen = -1; /* last emitted length */
@@ -770,7 +753,7 @@ int max_code; /* and its largest code of non zero frequency */
* bl_tree.
*/
local void send_tree(tree, max_code) ct_data *tree; /* the tree to be scanned */
-int max_code; /* and its largest code of non zero frequency */
+int max_code; /* and its largest code of non zero frequency */
{
int n; /* iterates over all tree elements */
int prevlen = -1; /* last emitted length */
@@ -864,15 +847,12 @@ local int build_bl_tree()
* lengths of the bit length codes, the literal tree and the distance tree.
* IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
*/
-local void send_all_trees(lcodes, dcodes, blcodes) int lcodes, dcodes,
- blcodes; /* number of codes for each tree */
+local void send_all_trees(lcodes, dcodes, blcodes) int lcodes, dcodes, blcodes; /* number of codes for each tree */
{
int rank; /* index in bl_order */
- Assert(lcodes >= 257 && dcodes >= 1 && blcodes >= 4,
- "not enough codes");
- Assert(lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,
- "too many codes");
+ Assert(lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
+ Assert(lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, "too many codes");
Tracev((stderr, "\nbl counts: "));
send_bits(lcodes - 257, 5); /* not +255 as stated in appnote.txt */
send_bits(dcodes - 1, 5);
@@ -902,7 +882,7 @@ ulg stored_len; /* length of input block */
int eof; /* true if this is the last block for a file */
{
ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */
- int max_blindex; /* index of last bit length code of non zero freq */
+ int max_blindex; /* index of last bit length code of non zero freq */
flag_buf[last_flags] = flags; /* Save the flags for the last 8 items */
@@ -931,10 +911,8 @@ int eof; /* true if this is the last block for a file */
static_lenb = (static_len + 3 + 7) >> 3;
input_len += stored_len; /* for debugging only */
- Trace((stderr,
- "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u dist %u ",
- opt_lenb, opt_len, static_lenb, static_len, stored_len, last_lit,
- last_dist));
+ Trace((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u dist %u ", opt_lenb, opt_len, static_lenb,
+ static_len, stored_len, last_lit, last_dist));
if (static_lenb <= opt_lenb)
opt_lenb = static_lenb;
@@ -946,8 +924,7 @@ int eof; /* true if this is the last block for a file */
#ifdef FORCE_METHOD
if (level == 1 && eof && compressed_len == 0L) { /* force stored file */
#else
- if (stored_len <= opt_lenb && eof && compressed_len == 0L &&
- seekable()) {
+ if (stored_len <= opt_lenb && eof && compressed_len == 0L && seekable()) {
#endif
/* Since LIT_BUFSIZE <= 2*WSIZE, the input data must be there:
*/
@@ -982,13 +959,11 @@ int eof; /* true if this is the last block for a file */
} else if (static_lenb == opt_lenb) {
#endif
send_bits((STATIC_TREES << 1) + eof, 3);
- compress_block((ct_data *)static_ltree,
- (ct_data *)static_dtree);
+ compress_block((ct_data *)static_ltree, (ct_data *)static_dtree);
compressed_len += 3 + static_len;
} else {
send_bits((DYN_TREES << 1) + eof, 3);
- send_all_trees(l_desc.max_code + 1, d_desc.max_code + 1,
- max_blindex + 1);
+ send_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);
compress_block((ct_data *)dyn_ltree, (ct_data *)dyn_dtree);
compressed_len += 3 + opt_len;
}
@@ -1000,8 +975,7 @@ int eof; /* true if this is the last block for a file */
bi_windup();
compressed_len += 7; /* align on byte boundary */
}
- Tracev((stderr, "\ncomprlen %lu(%lu) ", compressed_len >> 3,
- compressed_len - 7 * eof));
+ Tracev((stderr, "\ncomprlen %lu(%lu) ", compressed_len >> 3, compressed_len - 7 * eof));
return compressed_len >> 3;
}
@@ -1021,8 +995,7 @@ int lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
} else {
/* Here, lc is the match length - MIN_MATCH */
dist--; /* dist = match distance - 1 */
- Assert((ush)dist < (ush)MAX_DIST &&
- (ush)lc <= (ush)(MAX_MATCH - MIN_MATCH) &&
+ Assert((ush)dist < (ush)MAX_DIST && (ush)lc <= (ush)(MAX_MATCH - MIN_MATCH) &&
(ush)d_code(dist) < (ush)D_CODES,
"ct_tally: bad match");
@@ -1046,14 +1019,11 @@ int lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
ulg in_length = (ulg)strstart - block_start;
int dcode;
for (dcode = 0; dcode < D_CODES; dcode++) {
- out_length += (ulg)dyn_dtree[dcode].Freq *
- (5L + extra_dbits[dcode]);
+ out_length += (ulg)dyn_dtree[dcode].Freq * (5L + extra_dbits[dcode]);
}
out_length >>= 3;
- Trace((stderr,
- "\nlast_lit %u, last_dist %u, in %ld, out ~%ld(%ld%%) ",
- last_lit, last_dist, in_length, out_length,
- 100L - out_length * 100L / in_length));
+ Trace((stderr, "\nlast_lit %u, last_dist %u, in %ld, out ~%ld(%ld%%) ", last_lit, last_dist, in_length,
+ out_length, 100L - out_length * 100L / in_length));
if (last_dist < last_lit / 2 && out_length < in_length / 2)
return 1;
}
diff --git a/bin/gzip/util.c b/bin/gzip/util.c
index 056f85e9..b6b037c0 100644
--- a/bin/gzip/util.c
+++ b/bin/gzip/util.c
@@ -58,8 +58,7 @@ ulg updcrc(uch *s, unsigned n)
c = crc;
if (n)
do {
- c = crc_32_tab[((int)c ^ (*s++)) & 0xff] ^
- (c >> 8);
+ c = crc_32_tab[((int)c ^ (*s++)) & 0xff] ^ (c >> 8);
} while (--n);
}
crc = c;
@@ -316,56 +315,36 @@ voidp xmalloc(unsigned size)
* Table of CRC-32's of all single-byte values (made by makecrc.c)
*/
ulg crc_32_tab[] = {
- 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L,
- 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L,
- 0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L,
- 0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL,
- 0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L,
- 0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L,
- 0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L,
- 0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL,
- 0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L,
- 0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL,
- 0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L,
- 0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L,
- 0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L,
- 0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL,
- 0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL,
- 0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L,
- 0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL,
- 0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L,
- 0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L,
- 0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L,
- 0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL,
- 0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L,
- 0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L,
- 0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL,
- 0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L,
- 0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L,
- 0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L,
- 0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L,
- 0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L,
- 0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL,
- 0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL,
- 0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L,
- 0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L,
- 0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL,
- 0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL,
- 0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L,
- 0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL,
- 0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L,
- 0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL,
- 0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L,
- 0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL,
- 0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L,
- 0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L,
- 0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL,
- 0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L,
- 0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L,
- 0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L,
- 0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L,
- 0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L,
- 0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L,
- 0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL,
- 0x2d02ef8dL
+ 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L, 0x706af48fL, 0xe963a535L, 0x9e6495a3L,
+ 0x0edb8832L, 0x79dcb8a4L, 0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L, 0x90bf1d91L,
+ 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL, 0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L,
+ 0x136c9856L, 0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L, 0xfa0f3d63L, 0x8d080df5L,
+ 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L, 0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL,
+ 0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L, 0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L,
+ 0x26d930acL, 0x51de003aL, 0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L, 0xb8bda50fL,
+ 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L, 0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL,
+ 0x76dc4190L, 0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL, 0x9fbfe4a5L, 0xe8b8d433L,
+ 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL, 0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L,
+ 0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL, 0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L,
+ 0x65b0d9c6L, 0x12b7e950L, 0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L, 0xfbd44c65L,
+ 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L, 0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL,
+ 0x4369e96aL, 0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L, 0xaa0a4c5fL, 0xdd0d7cc9L,
+ 0x5005713cL, 0x270241aaL, 0xbe0b1010L, 0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL,
+ 0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L, 0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL,
+ 0xedb88320L, 0x9abfb3b6L, 0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L, 0x73dc1683L,
+ 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L, 0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L,
+ 0xf00f9344L, 0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL, 0x196c3671L, 0x6e6b06e7L,
+ 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL, 0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L,
+ 0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L, 0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL,
+ 0xd80d2bdaL, 0xaf0a1b4cL, 0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL, 0x4669be79L,
+ 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L, 0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL,
+ 0xc5ba3bbeL, 0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L, 0x2cd99e8bL, 0x5bdeae1dL,
+ 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL, 0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L,
+ 0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL, 0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L,
+ 0x86d3d2d4L, 0xf1d4e242L, 0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L, 0x18b74777L,
+ 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL, 0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L,
+ 0xa00ae278L, 0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L, 0x4969474dL, 0x3e6e77dbL,
+ 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L, 0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L,
+ 0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L, 0xcdd70693L, 0x54de5729L, 0x23d967bfL,
+ 0xb3667a2eL, 0xc4614ab8L, 0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL, 0x2d02ef8dL
};
diff --git a/bin/gzip/zip.c b/bin/gzip/zip.c
index e373edff..e3041b20 100644
--- a/bin/gzip/zip.c
+++ b/bin/gzip/zip.c
@@ -72,8 +72,7 @@ int in, out; /* input and output file descriptors */
*/
if (ifile_size != -1L && isize != (ulg)ifile_size) {
Trace((stderr, " actual=%ld, read=%ld ", ifile_size, isize));
- fprintf(stderr, "%s: %s: file size changed while zipping\n",
- progname, ifname);
+ fprintf(stderr, "%s: %s: file size changed while zipping\n", progname, ifname);
}
#endif
diff --git a/bin/playground/main.c b/bin/playground/main.c
index 15f3992a..3aab72f8 100644
--- a/bin/playground/main.c
+++ b/bin/playground/main.c
@@ -1,4 +1,3 @@
-#include <sched.h>
int main(void)
{
diff --git a/bin/pwd/pwd.c b/bin/pwd/pwd.c
index fef433cf..a5cfa248 100644
--- a/bin/pwd/pwd.c
+++ b/bin/pwd/pwd.c
@@ -36,8 +36,7 @@ int main(int argc, char **argv)
const char *pwd;
struct stat cst, pst;
- if ((pwd = getenv("PWD")) == NULL || *pwd != '/' ||
- stat(pwd, &pst) < 0) {
+ if ((pwd = getenv("PWD")) == NULL || *pwd != '/' || stat(pwd, &pst) < 0) {
out = cwd;
}
@@ -45,9 +44,7 @@ int main(int argc, char **argv)
perror("pwd: stat");
}
- out = (pst.st_dev == cst.st_dev && pst.st_ino == cst.st_ino) ?
- pwd :
- cwd;
+ out = (pst.st_dev == cst.st_dev && pst.st_ino == cst.st_ino) ? pwd : cwd;
}
iov[0].iov_base = (char *)out;
diff --git a/bin/sleep/sleep.c b/bin/sleep/sleep.c
index 7b4ce77a..6060e73e 100644
--- a/bin/sleep/sleep.c
+++ b/bin/sleep/sleep.c
@@ -1,3 +1,4 @@
+#include "stddef.h"
#include <err.h>
#include <stdlib.h>
#include <time.h>
diff --git a/boot/init/init.c b/boot/init/init.c
index 4e643a34..9b7cb318 100644
--- a/boot/init/init.c
+++ b/boot/init/init.c
@@ -1,8 +1,9 @@
+#include "stddef.h"
+#include "linux/mount.h"
#include <dirent.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
-#include <linux/fs.h>
#include <stdio.h>
#include <string.h>
#include <sys/mount.h>
diff --git a/include/aio.h b/include/aio.h
index aa3598a6..0ac9c7d6 100644
--- a/include/aio.h
+++ b/include/aio.h
@@ -1,6 +1,8 @@
#ifndef __AIO_H
#define __AIO_H
+#include <stddef.h>
+#include <time.h>
#define __BITS_SIGEVENT_H_
#include <bits/sigevent.h>
@@ -39,7 +41,6 @@ int aio_read(struct aiocb *);
ssize_t aio_return(struct aiocb *);
int aio_suspend(const struct aiocb *const[], int, const struct timespec *);
int aio_write(struct aiocb *);
-int lio_listio(int, struct aiocb *restrict const[restrict], int,
- struct sigevent *restrict);
+int lio_listio(int, struct aiocb *restrict const[restrict], int, struct sigevent *restrict);
#endif
diff --git a/include/arch/x86_64/asm-generic/errno.h b/include/arch/x86_64/asm-generic/errno.h
index 48c02e75..374c95d9 100644
--- a/include/arch/x86_64/asm-generic/errno.h
+++ b/include/arch/x86_64/asm-generic/errno.h
@@ -39,47 +39,47 @@
#define EDEADLOCK EDEADLK
-#define EBFONT 59 /* Bad font file format */
-#define ENOSTR 60 /* Device not a stream */
-#define ENODATA 61 /* No data available */
-#define ETIME 62 /* Timer expired */
-#define ENOSR 63 /* Out of streams resources */
-#define ENONET 64 /* Machine is not on the network */
-#define ENOPKG 65 /* Package not installed */
-#define EREMOTE 66 /* Object is remote */
-#define ENOLINK 67 /* Link has been severed */
-#define EADV 68 /* Advertise error */
-#define ESRMNT 69 /* Srmount error */
-#define ECOMM 70 /* Communication error on send */
-#define EPROTO 71 /* Protocol error */
-#define EMULTIHOP 72 /* Multihop attempted */
-#define EDOTDOT 73 /* RFS specific error */
-#define EBADMSG 74 /* Not a data message */
-#define EOVERFLOW 75 /* Value too large for defined data type */
-#define ENOTUNIQ 76 /* Name not unique on network */
-#define EBADFD 77 /* File descriptor in bad state */
-#define EREMCHG 78 /* Remote address changed */
-#define ELIBACC 79 /* Can not access a needed shared library */
-#define ELIBBAD 80 /* Accessing a corrupted shared library */
-#define ELIBSCN 81 /* .lib section in a.out corrupted */
-#define ELIBMAX 82 /* Attempting to link in too many shared libraries */
-#define ELIBEXEC 83 /* Cannot exec a shared library directly */
-#define EILSEQ 84 /* Illegal byte sequence */
-#define ERESTART 85 /* Interrupted system call should be restarted */
-#define ESTRPIPE 86 /* Streams pipe error */
-#define EUSERS 87 /* Too many users */
-#define ENOTSOCK 88 /* Socket operation on non-socket */
-#define EDESTADDRREQ 89 /* Destination address required */
-#define EMSGSIZE 90 /* Message too long */
-#define EPROTOTYPE 91 /* Protocol wrong type for socket */
-#define ENOPROTOOPT 92 /* Protocol not available */
-#define EPROTONOSUPPORT 93 /* Protocol not supported */
-#define ESOCKTNOSUPPORT 94 /* Socket type not supported */
-#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */
-#define EPFNOSUPPORT 96 /* Protocol family not supported */
-#define EAFNOSUPPORT 97 /* Address family not supported by protocol */
-#define EADDRINUSE 98 /* Address already in use */
-#define EADDRNOTAVAIL 99 /* Cannot assign requested address */
+#define EBFONT 59 /* Bad font file format */
+#define ENOSTR 60 /* Device not a stream */
+#define ENODATA 61 /* No data available */
+#define ETIME 62 /* Timer expired */
+#define ENOSR 63 /* Out of streams resources */
+#define ENONET 64 /* Machine is not on the network */
+#define ENOPKG 65 /* Package not installed */
+#define EREMOTE 66 /* Object is remote */
+#define ENOLINK 67 /* Link has been severed */
+#define EADV 68 /* Advertise error */
+#define ESRMNT 69 /* Srmount error */
+#define ECOMM 70 /* Communication error on send */
+#define EPROTO 71 /* Protocol error */
+#define EMULTIHOP 72 /* Multihop attempted */
+#define EDOTDOT 73 /* RFS specific error */
+#define EBADMSG 74 /* Not a data message */
+#define EOVERFLOW 75 /* Value too large for defined data type */
+#define ENOTUNIQ 76 /* Name not unique on network */
+#define EBADFD 77 /* File descriptor in bad state */
+#define EREMCHG 78 /* Remote address changed */
+#define ELIBACC 79 /* Can not access a needed shared library */
+#define ELIBBAD 80 /* Accessing a corrupted shared library */
+#define ELIBSCN 81 /* .lib section in a.out corrupted */
+#define ELIBMAX 82 /* Attempting to link in too many shared libraries */
+#define ELIBEXEC 83 /* Cannot exec a shared library directly */
+#define EILSEQ 84 /* Illegal byte sequence */
+#define ERESTART 85 /* Interrupted system call should be restarted */
+#define ESTRPIPE 86 /* Streams pipe error */
+#define EUSERS 87 /* Too many users */
+#define ENOTSOCK 88 /* Socket operation on non-socket */
+#define EDESTADDRREQ 89 /* Destination address required */
+#define EMSGSIZE 90 /* Message too long */
+#define EPROTOTYPE 91 /* Protocol wrong type for socket */
+#define ENOPROTOOPT 92 /* Protocol not available */
+#define EPROTONOSUPPORT 93 /* Protocol not supported */
+#define ESOCKTNOSUPPORT 94 /* Socket type not supported */
+#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */
+#define EPFNOSUPPORT 96 /* Protocol family not supported */
+#define EAFNOSUPPORT 97 /* Address family not supported by protocol */
+#define EADDRINUSE 98 /* Address already in use */
+#define EADDRNOTAVAIL 99 /* Cannot assign requested address */
#define ENETDOWN 100 /* Network is down */
#define ENETUNREACH 101 /* Network is unreachable */
#define ENETRESET 102 /* Network dropped connection because of reset */
diff --git a/include/arch/x86_64/asm-generic/ioctl.h b/include/arch/x86_64/asm-generic/ioctl.h
index a512641b..252a73bc 100644
--- a/include/arch/x86_64/asm-generic/ioctl.h
+++ b/include/arch/x86_64/asm-generic/ioctl.h
@@ -66,9 +66,8 @@
#define _IOC_READ 2U
#endif
-#define _IOC(dir, type, nr, size) \
- (((dir) << _IOC_DIRSHIFT) | ((type) << _IOC_TYPESHIFT) | \
- ((nr) << _IOC_NRSHIFT) | ((size) << _IOC_SIZESHIFT))
+#define _IOC(dir, type, nr, size) \
+ (((dir) << _IOC_DIRSHIFT) | ((type) << _IOC_TYPESHIFT) | ((nr) << _IOC_NRSHIFT) | ((size) << _IOC_SIZESHIFT))
#define _IOC_TYPECHECK(t) (sizeof(t))
@@ -78,19 +77,13 @@
* NOTE: _IOW means userland is writing and kernel is reading. _IOR
* means userland is reading and kernel is writing.
*/
-#define _IO(type, nr) _IOC(_IOC_NONE, (type), (nr), 0)
-#define _IOR(type, nr, argtype) \
- _IOC(_IOC_READ, (type), (nr), (_IOC_TYPECHECK(argtype)))
-#define _IOW(type, nr, argtype) \
- _IOC(_IOC_WRITE, (type), (nr), (_IOC_TYPECHECK(argtype)))
-#define _IOWR(type, nr, argtype) \
- _IOC(_IOC_READ | _IOC_WRITE, (type), (nr), (_IOC_TYPECHECK(argtype)))
-#define _IOR_BAD(type, nr, argtype) \
- _IOC(_IOC_READ, (type), (nr), sizeof(argtype))
-#define _IOW_BAD(type, nr, argtype) \
- _IOC(_IOC_WRITE, (type), (nr), sizeof(argtype))
-#define _IOWR_BAD(type, nr, argtype) \
- _IOC(_IOC_READ | _IOC_WRITE, (type), (nr), sizeof(argtype))
+#define _IO(type, nr) _IOC(_IOC_NONE, (type), (nr), 0)
+#define _IOR(type, nr, argtype) _IOC(_IOC_READ, (type), (nr), (_IOC_TYPECHECK(argtype)))
+#define _IOW(type, nr, argtype) _IOC(_IOC_WRITE, (type), (nr), (_IOC_TYPECHECK(argtype)))
+#define _IOWR(type, nr, argtype) _IOC(_IOC_READ | _IOC_WRITE, (type), (nr), (_IOC_TYPECHECK(argtype)))
+#define _IOR_BAD(type, nr, argtype) _IOC(_IOC_READ, (type), (nr), sizeof(argtype))
+#define _IOW_BAD(type, nr, argtype) _IOC(_IOC_WRITE, (type), (nr), sizeof(argtype))
+#define _IOWR_BAD(type, nr, argtype) _IOC(_IOC_READ | _IOC_WRITE, (type), (nr), sizeof(argtype))
/* used to decode ioctl numbers.. */
#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK)
diff --git a/include/arch/x86_64/asm-generic/ioctls.h b/include/arch/x86_64/asm-generic/ioctls.h
index e7b4519d..3351185d 100644
--- a/include/arch/x86_64/asm-generic/ioctls.h
+++ b/include/arch/x86_64/asm-generic/ioctls.h
@@ -66,9 +66,8 @@
#ifndef TIOCSRS485
#define TIOCSRS485 0x542F
#endif
-#define TIOCGPTN \
- _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
-#define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */
+#define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
+#define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */
#define TIOCGDEV \
_IOR('T', 0x32, unsigned int) /* Get primary device node of \
/dev/console */
diff --git a/include/arch/x86_64/asm-generic/mman-common.h b/include/arch/x86_64/asm-generic/mman-common.h
index cbcba366..f571d971 100644
--- a/include/arch/x86_64/asm-generic/mman-common.h
+++ b/include/arch/x86_64/asm-generic/mman-common.h
@@ -14,11 +14,10 @@
/* 0x10 reserved for arch-specific use */
/* 0x20 reserved for arch-specific use */
#define PROT_NONE 0x0 /* page can not be accessed */
-#define PROT_GROWSDOWN \
- 0x01000000 /* mprotect flag: extend change to start of growsdown vma \
- */
-#define PROT_GROWSUP \
- 0x02000000 /* mprotect flag: extend change to end of growsup vma */
+#define PROT_GROWSDOWN \
+ 0x01000000 /* mprotect flag: extend change to start of growsdown vma \
+ */
+#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
/* 0x01 - 0x03 are defined in linux/mman.h */
#define MAP_TYPE 0x0f /* Mask for type of mapping */
@@ -28,15 +27,14 @@
/* 0x0100 - 0x4000 flags are defined in asm-generic/mman.h */
#define MAP_POPULATE 0x008000 /* populate (prefault) pagetables */
#define MAP_NONBLOCK 0x010000 /* do not block on IO */
-#define MAP_STACK \
- 0x020000 /* give out an address that is best suited for process/thread \
- stacks */
+#define MAP_STACK \
+ 0x020000 /* give out an address that is best suited for process/thread \
+ stacks */
#define MAP_HUGETLB 0x040000 /* create a huge page mapping */
-#define MAP_SYNC \
- 0x080000 /* perform synchronous page faults for the mapping \
- */
-#define MAP_FIXED_NOREPLACE \
- 0x100000 /* MAP_FIXED which doesn't unmap underlying mapping */
+#define MAP_SYNC \
+ 0x080000 /* perform synchronous page faults for the mapping \
+ */
+#define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED which doesn't unmap underlying mapping */
#define MAP_UNINITIALIZED \
0x4000000 /* For anonymous mmap, memory could be \
diff --git a/include/arch/x86_64/asm-generic/mman.h b/include/arch/x86_64/asm-generic/mman.h
index f4c1b653..a4d89337 100644
--- a/include/arch/x86_64/asm-generic/mman.h
+++ b/include/arch/x86_64/asm-generic/mman.h
@@ -19,9 +19,7 @@
#define MCL_FUTURE 2 /* lock all future mappings */
#define MCL_ONFAULT 4 /* lock all pages that are faulted in */
-#define SHADOW_STACK_SET_TOKEN \
- (1ULL << 0) /* Set up a restore token in the shadow stack */
-#define SHADOW_STACK_SET_MARKER \
- (1ULL << 1) /* Set up a top of stack marker in the shadow stack */
+#define SHADOW_STACK_SET_TOKEN (1ULL << 0) /* Set up a restore token in the shadow stack */
+#define SHADOW_STACK_SET_MARKER (1ULL << 1) /* Set up a top of stack marker in the shadow stack */
#endif /* __ASM_GENERIC_MMAN_H */
diff --git a/include/arch/x86_64/asm-generic/siginfo.h b/include/arch/x86_64/asm-generic/siginfo.h
index eae3587b..479feb9c 100644
--- a/include/arch/x86_64/asm-generic/siginfo.h
+++ b/include/arch/x86_64/asm-generic/siginfo.h
@@ -45,8 +45,8 @@ union __sifields {
__kernel_timer_t _tid; /* timer id */
int _overrun; /* overrun count */
sigval_t _sigval; /* same as below */
- int _sys_private; /* Not used by the kernel. Historic leftover.
- Always 0. */
+ int _sys_private; /* Not used by the kernel. Historic leftover.
+ Always 0. */
} _timer;
/* POSIX.1b signals */
@@ -69,9 +69,7 @@ union __sifields {
struct {
void *_addr; /* faulting insn/memory ref. */
-#define __ADDR_BND_PKEY_PAD \
- (__alignof__(void *) < sizeof(short) ? sizeof(short) : \
- __alignof__(void *))
+#define __ADDR_BND_PKEY_PAD (__alignof__(void *) < sizeof(short) ? sizeof(short) : __alignof__(void *))
union {
/* used on alpha and sparc */
int _trapno; /* TRAP # which caused the signal */
@@ -331,8 +329,7 @@ typedef struct siginfo {
#endif
#define SIGEV_MAX_SIZE 64
-#define SIGEV_PAD_SIZE \
- ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) / sizeof(int))
+#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) / sizeof(int))
typedef struct sigevent {
sigval_t sigev_value;
diff --git a/include/arch/x86_64/asm-generic/socket.h b/include/arch/x86_64/asm-generic/socket.h
index fb9a86f9..99cc4305 100644
--- a/include/arch/x86_64/asm-generic/socket.h
+++ b/include/arch/x86_64/asm-generic/socket.h
@@ -159,22 +159,12 @@
#define SO_RCVTIMEO SO_RCVTIMEO_OLD
#define SO_SNDTIMEO SO_SNDTIMEO_OLD
#else
-#define SO_TIMESTAMP \
- (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMP_OLD : \
- SO_TIMESTAMP_NEW)
-#define SO_TIMESTAMPNS \
- (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMPNS_OLD : \
- SO_TIMESTAMPNS_NEW)
-#define SO_TIMESTAMPING \
- (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMPING_OLD : \
- SO_TIMESTAMPING_NEW)
-
-#define SO_RCVTIMEO \
- (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_RCVTIMEO_OLD : \
- SO_RCVTIMEO_NEW)
-#define SO_SNDTIMEO \
- (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_SNDTIMEO_OLD : \
- SO_SNDTIMEO_NEW)
+#define SO_TIMESTAMP (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMP_OLD : SO_TIMESTAMP_NEW)
+#define SO_TIMESTAMPNS (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMPNS_OLD : SO_TIMESTAMPNS_NEW)
+#define SO_TIMESTAMPING (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMPING_OLD : SO_TIMESTAMPING_NEW)
+
+#define SO_RCVTIMEO (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_RCVTIMEO_OLD : SO_RCVTIMEO_NEW)
+#define SO_SNDTIMEO (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_SNDTIMEO_OLD : SO_SNDTIMEO_NEW)
#endif
#define SCM_TIMESTAMP SO_TIMESTAMP
diff --git a/include/arch/x86_64/asm-generic/unistd.h b/include/arch/x86_64/asm-generic/unistd.h
index 65a53249..c4e26715 100644
--- a/include/arch/x86_64/asm-generic/unistd.h
+++ b/include/arch/x86_64/asm-generic/unistd.h
@@ -128,14 +128,11 @@ __SYSCALL(__NR_nfsservctl, sys_ni_syscall)
#define __NR3264_statfs 43
__SC_COMP_3264(__NR3264_statfs, sys_statfs64, sys_statfs, compat_sys_statfs64)
#define __NR3264_fstatfs 44
-__SC_COMP_3264(__NR3264_fstatfs, sys_fstatfs64, sys_fstatfs,
- compat_sys_fstatfs64)
+__SC_COMP_3264(__NR3264_fstatfs, sys_fstatfs64, sys_fstatfs, compat_sys_fstatfs64)
#define __NR3264_truncate 45
-__SC_COMP_3264(__NR3264_truncate, sys_truncate64, sys_truncate,
- compat_sys_truncate64)
+__SC_COMP_3264(__NR3264_truncate, sys_truncate64, sys_truncate, compat_sys_truncate64)
#define __NR3264_ftruncate 46
-__SC_COMP_3264(__NR3264_ftruncate, sys_ftruncate64, sys_ftruncate,
- compat_sys_ftruncate64)
+__SC_COMP_3264(__NR3264_ftruncate, sys_ftruncate64, sys_ftruncate, compat_sys_ftruncate64)
#define __NR_fallocate 47
__SC_COMP(__NR_fallocate, sys_fallocate, compat_sys_fallocate)
#define __NR_faccessat 48
@@ -189,8 +186,7 @@ __SYSCALL(__NR3264_sendfile, sys_sendfile64)
#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
#define __NR_pselect6 72
-__SC_COMP_3264(__NR_pselect6, sys_pselect6_time32, sys_pselect6,
- compat_sys_pselect6_time32)
+__SC_COMP_3264(__NR_pselect6, sys_pselect6_time32, sys_pselect6, compat_sys_pselect6_time32)
#define __NR_ppoll 73
__SC_COMP_3264(__NR_ppoll, sys_ppoll_time32, sys_ppoll, compat_sys_ppoll_time32)
#endif
@@ -222,8 +218,7 @@ __SYSCALL(__NR_fdatasync, sys_fdatasync)
#ifdef __ARCH_WANT_SYNC_FILE_RANGE2
#define __NR_sync_file_range2 84
-__SC_COMP(__NR_sync_file_range2, sys_sync_file_range2,
- compat_sys_sync_file_range2)
+__SC_COMP(__NR_sync_file_range2, sys_sync_file_range2, compat_sys_sync_file_range2)
#else
#define __NR_sync_file_range 84
__SC_COMP(__NR_sync_file_range, sys_sync_file_range, compat_sys_sync_file_range)
@@ -331,11 +326,9 @@ __SYSCALL(__NR_sched_getscheduler, sys_sched_getscheduler)
#define __NR_sched_getparam 121
__SYSCALL(__NR_sched_getparam, sys_sched_getparam)
#define __NR_sched_setaffinity 122
-__SC_COMP(__NR_sched_setaffinity, sys_sched_setaffinity,
- compat_sys_sched_setaffinity)
+__SC_COMP(__NR_sched_setaffinity, sys_sched_setaffinity, compat_sys_sched_setaffinity)
#define __NR_sched_getaffinity 123
-__SC_COMP(__NR_sched_getaffinity, sys_sched_getaffinity,
- compat_sys_sched_getaffinity)
+__SC_COMP(__NR_sched_getaffinity, sys_sched_getaffinity, compat_sys_sched_getaffinity)
#define __NR_sched_yield 124
__SYSCALL(__NR_sched_yield, sys_sched_yield)
#define __NR_sched_get_priority_max 125
@@ -345,8 +338,7 @@ __SYSCALL(__NR_sched_get_priority_min, sys_sched_get_priority_min)
#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
#define __NR_sched_rr_get_interval 127
-__SC_3264(__NR_sched_rr_get_interval, sys_sched_rr_get_interval_time32,
- sys_sched_rr_get_interval)
+__SC_3264(__NR_sched_rr_get_interval, sys_sched_rr_get_interval_time32, sys_sched_rr_get_interval)
#endif
#define __NR_restart_syscall 128
@@ -370,8 +362,7 @@ __SC_COMP(__NR_rt_sigpending, sys_rt_sigpending, compat_sys_rt_sigpending)
#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
#define __NR_rt_sigtimedwait 137
-__SC_COMP_3264(__NR_rt_sigtimedwait, sys_rt_sigtimedwait_time32,
- sys_rt_sigtimedwait, compat_sys_rt_sigtimedwait_time32)
+__SC_COMP_3264(__NR_rt_sigtimedwait, sys_rt_sigtimedwait_time32, sys_rt_sigtimedwait, compat_sys_rt_sigtimedwait_time32)
#endif
#define __NR_rt_sigqueueinfo 138
@@ -601,8 +592,7 @@ __SYSCALL(__NR_move_pages, sys_move_pages)
#endif
#define __NR_rt_tgsigqueueinfo 240
-__SC_COMP(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo,
- compat_sys_rt_tgsigqueueinfo)
+__SC_COMP(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo, compat_sys_rt_tgsigqueueinfo)
#define __NR_perf_event_open 241
__SYSCALL(__NR_perf_event_open, sys_perf_event_open)
#define __NR_accept4 242
@@ -610,8 +600,7 @@ __SYSCALL(__NR_accept4, sys_accept4)
#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
#define __NR_recvmmsg 243
-__SC_COMP_3264(__NR_recvmmsg, sys_recvmmsg_time32, sys_recvmmsg,
- compat_sys_recvmmsg_time32)
+__SC_COMP_3264(__NR_recvmmsg, sys_recvmmsg_time32, sys_recvmmsg, compat_sys_recvmmsg_time32)
#endif
/*
@@ -694,8 +683,7 @@ __SYSCALL(__NR_statx, sys_statx)
#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
#define __NR_io_pgetevents 292
-__SC_COMP_3264(__NR_io_pgetevents, sys_io_pgetevents_time32, sys_io_pgetevents,
- compat_sys_io_pgetevents)
+__SC_COMP_3264(__NR_io_pgetevents, sys_io_pgetevents_time32, sys_io_pgetevents, compat_sys_io_pgetevents)
#endif
#define __NR_rseq 293
@@ -731,8 +719,7 @@ __SC_COMP(__NR_pselect6_time64, sys_pselect6, compat_sys_pselect6_time64)
#define __NR_ppoll_time64 414
__SC_COMP(__NR_ppoll_time64, sys_ppoll, compat_sys_ppoll_time64)
#define __NR_io_pgetevents_time64 416
-__SC_COMP(__NR_io_pgetevents_time64, sys_io_pgetevents,
- compat_sys_io_pgetevents_time64)
+__SC_COMP(__NR_io_pgetevents_time64, sys_io_pgetevents, compat_sys_io_pgetevents_time64)
#define __NR_recvmmsg_time64 417
__SC_COMP(__NR_recvmmsg_time64, sys_recvmmsg, compat_sys_recvmmsg_time64)
#define __NR_mq_timedsend_time64 418
@@ -742,8 +729,7 @@ __SYSCALL(__NR_mq_timedreceive_time64, sys_mq_timedreceive)
#define __NR_semtimedop_time64 420
__SYSCALL(__NR_semtimedop_time64, sys_semtimedop)
#define __NR_rt_sigtimedwait_time64 421
-__SC_COMP(__NR_rt_sigtimedwait_time64, sys_rt_sigtimedwait,
- compat_sys_rt_sigtimedwait_time64)
+__SC_COMP(__NR_rt_sigtimedwait_time64, sys_rt_sigtimedwait, compat_sys_rt_sigtimedwait_time64)
#define __NR_futex_time64 422
__SYSCALL(__NR_futex_time64, sys_futex)
#define __NR_sched_rr_get_interval_time64 423
diff --git a/include/arch/x86_64/asm/a.out.h b/include/arch/x86_64/asm/a.out.h
index 5df47aa2..8238fca4 100644
--- a/include/arch/x86_64/asm/a.out.h
+++ b/include/arch/x86_64/asm/a.out.h
@@ -6,12 +6,12 @@ struct exec {
unsigned int a_info; /* Use macros N_MAGIC, etc for access */
unsigned a_text; /* length of text, in bytes */
unsigned a_data; /* length of data, in bytes */
- unsigned a_bss; /* length of uninitialized data area for file, in bytes
- */
- unsigned a_syms; /* length of symbol table data in file, in bytes */
- unsigned a_entry; /* start address */
- unsigned a_trsize; /* length of relocation info for text, in bytes */
- unsigned a_drsize; /* length of relocation info for data, in bytes */
+ unsigned a_bss; /* length of uninitialized data area for file, in bytes
+ */
+ unsigned a_syms; /* length of symbol table data in file, in bytes */
+ unsigned a_entry; /* start address */
+ unsigned a_trsize; /* length of relocation info for text, in bytes */
+ unsigned a_drsize; /* length of relocation info for data, in bytes */
};
#define N_TRSIZE(a) ((a).a_trsize)
diff --git a/include/arch/x86_64/asm/amd_hsmp.h b/include/arch/x86_64/asm/amd_hsmp.h
index 8f1d8340..abe444a5 100644
--- a/include/arch/x86_64/asm/amd_hsmp.h
+++ b/include/arch/x86_64/asm/amd_hsmp.h
@@ -13,51 +13,51 @@
* HSMP Messages supported
*/
enum hsmp_message_ids {
- HSMP_TEST = 1, /* 01h Increments input value by 1 */
- HSMP_GET_SMU_VER, /* 02h SMU FW version */
- HSMP_GET_PROTO_VER, /* 03h HSMP interface version */
- HSMP_GET_SOCKET_POWER, /* 04h average package power consumption */
- HSMP_SET_SOCKET_POWER_LIMIT, /* 05h Set the socket power limit */
- HSMP_GET_SOCKET_POWER_LIMIT, /* 06h Get current socket power limit */
+ HSMP_TEST = 1, /* 01h Increments input value by 1 */
+ HSMP_GET_SMU_VER, /* 02h SMU FW version */
+ HSMP_GET_PROTO_VER, /* 03h HSMP interface version */
+ HSMP_GET_SOCKET_POWER, /* 04h average package power consumption */
+ HSMP_SET_SOCKET_POWER_LIMIT, /* 05h Set the socket power limit */
+ HSMP_GET_SOCKET_POWER_LIMIT, /* 06h Get current socket power limit */
HSMP_GET_SOCKET_POWER_LIMIT_MAX, /* 07h Get maximum socket power value
*/
- HSMP_SET_BOOST_LIMIT, /* 08h Set a core maximum frequency limit */
- HSMP_SET_BOOST_LIMIT_SOCKET, /* 09h Set socket maximum frequency level
- */
- HSMP_GET_BOOST_LIMIT, /* 0Ah Get current frequency limit */
- HSMP_GET_PROC_HOT, /* 0Bh Get PROCHOT status */
- HSMP_SET_XGMI_LINK_WIDTH, /* 0Ch Set max and min width of xGMI Link */
- HSMP_SET_DF_PSTATE, /* 0Dh Alter APEnable/Disable messages behavior */
- HSMP_SET_AUTO_DF_PSTATE, /* 0Eh Enable DF P-State Performance Boost
- algorithm */
- HSMP_GET_FCLK_MCLK, /* 0Fh Get FCLK and MEMCLK for current socket */
- HSMP_GET_CCLK_THROTTLE_LIMIT, /* 10h Get CCLK frequency limit in socket
- */
- HSMP_GET_C0_PERCENT, /* 11h Get average C0 residency in socket */
- HSMP_SET_NBIO_DPM_LEVEL, /* 12h Set max/min LCLK DPM Level for a given
- NBIO */
- HSMP_GET_NBIO_DPM_LEVEL, /* 13h Get LCLK DPM level min and max for a
- given NBIO */
- HSMP_GET_DDR_BANDWIDTH, /* 14h Get theoretical maximum and current DDR
- Bandwidth */
- HSMP_GET_TEMP_MONITOR, /* 15h Get socket temperature */
- HSMP_GET_DIMM_TEMP_RANGE, /* 16h Get per-DIMM temperature range and
- refresh rate */
- HSMP_GET_DIMM_POWER, /* 17h Get per-DIMM power consumption */
- HSMP_GET_DIMM_THERMAL, /* 18h Get per-DIMM thermal sensors */
- HSMP_GET_SOCKET_FREQ_LIMIT, /* 19h Get current active frequency per
- socket */
- HSMP_GET_CCLK_CORE_LIMIT, /* 1Ah Get CCLK frequency limit per core */
- HSMP_GET_RAILS_SVI, /* 1Bh Get SVI-based Telemetry for all rails */
- HSMP_GET_SOCKET_FMAX_FMIN, /* 1Ch Get Fmax and Fmin per socket */
- HSMP_GET_IOLINK_BANDWITH, /* 1Dh Get current bandwidth on IO Link */
- HSMP_GET_XGMI_BANDWITH, /* 1Eh Get current bandwidth on xGMI Link */
- HSMP_SET_GMI3_WIDTH, /* 1Fh Set max and min GMI3 Link width */
- HSMP_SET_PCI_RATE, /* 20h Control link rate on PCIe devices */
- HSMP_SET_POWER_MODE, /* 21h Select power efficiency profile policy */
- HSMP_SET_PSTATE_MAX_MIN, /* 22h Set the max and min DF P-State */
- HSMP_GET_METRIC_TABLE_VER, /* 23h Get metrics table version */
- HSMP_GET_METRIC_TABLE, /* 24h Get metrics table */
+ HSMP_SET_BOOST_LIMIT, /* 08h Set a core maximum frequency limit */
+ HSMP_SET_BOOST_LIMIT_SOCKET, /* 09h Set socket maximum frequency level
+ */
+ HSMP_GET_BOOST_LIMIT, /* 0Ah Get current frequency limit */
+ HSMP_GET_PROC_HOT, /* 0Bh Get PROCHOT status */
+ HSMP_SET_XGMI_LINK_WIDTH, /* 0Ch Set max and min width of xGMI Link */
+ HSMP_SET_DF_PSTATE, /* 0Dh Alter APEnable/Disable messages behavior */
+ HSMP_SET_AUTO_DF_PSTATE, /* 0Eh Enable DF P-State Performance Boost
+ algorithm */
+ HSMP_GET_FCLK_MCLK, /* 0Fh Get FCLK and MEMCLK for current socket */
+ HSMP_GET_CCLK_THROTTLE_LIMIT, /* 10h Get CCLK frequency limit in socket
+ */
+ HSMP_GET_C0_PERCENT, /* 11h Get average C0 residency in socket */
+ HSMP_SET_NBIO_DPM_LEVEL, /* 12h Set max/min LCLK DPM Level for a given
+ NBIO */
+ HSMP_GET_NBIO_DPM_LEVEL, /* 13h Get LCLK DPM level min and max for a
+ given NBIO */
+ HSMP_GET_DDR_BANDWIDTH, /* 14h Get theoretical maximum and current DDR
+ Bandwidth */
+ HSMP_GET_TEMP_MONITOR, /* 15h Get socket temperature */
+ HSMP_GET_DIMM_TEMP_RANGE, /* 16h Get per-DIMM temperature range and
+ refresh rate */
+ HSMP_GET_DIMM_POWER, /* 17h Get per-DIMM power consumption */
+ HSMP_GET_DIMM_THERMAL, /* 18h Get per-DIMM thermal sensors */
+ HSMP_GET_SOCKET_FREQ_LIMIT, /* 19h Get current active frequency per
+ socket */
+ HSMP_GET_CCLK_CORE_LIMIT, /* 1Ah Get CCLK frequency limit per core */
+ HSMP_GET_RAILS_SVI, /* 1Bh Get SVI-based Telemetry for all rails */
+ HSMP_GET_SOCKET_FMAX_FMIN, /* 1Ch Get Fmax and Fmin per socket */
+ HSMP_GET_IOLINK_BANDWITH, /* 1Dh Get current bandwidth on IO Link */
+ HSMP_GET_XGMI_BANDWITH, /* 1Eh Get current bandwidth on xGMI Link */
+ HSMP_SET_GMI3_WIDTH, /* 1Fh Set max and min GMI3 Link width */
+ HSMP_SET_PCI_RATE, /* 20h Control link rate on PCIe devices */
+ HSMP_SET_POWER_MODE, /* 21h Select power efficiency profile policy */
+ HSMP_SET_PSTATE_MAX_MIN, /* 22h Set the max and min DF P-State */
+ HSMP_GET_METRIC_TABLE_VER, /* 23h Get metrics table version */
+ HSMP_GET_METRIC_TABLE, /* 24h Get metrics table */
HSMP_GET_METRIC_TABLE_DRAM_ADDR, /* 25h Get metrics table dram address
*/
HSMP_SET_XGMI_PSTATE_RANGE, /* 26h Set xGMI P-state range */
@@ -72,9 +72,9 @@ enum hsmp_message_ids {
};
struct hsmp_message {
- __u32 msg_id; /* Message ID */
- __u16 num_args; /* Number of input argument words in message */
- __u16 response_sz; /* Number of expected output/response words */
+ __u32 msg_id; /* Message ID */
+ __u16 num_args; /* Number of input argument words in message */
+ __u16 response_sz; /* Number of expected output/response words */
__u32 args[HSMP_MAX_MSG_LEN]; /* argument/response buffer */
__u16 sock_ind; /* socket number */
};
@@ -108,300 +108,299 @@ struct hsmp_msg_desc {
*
* Not supported messages would return -ENOMSG.
*/
-static const struct hsmp_msg_desc hsmp_msg_desc_table[]
- __attribute__((unused)) = {
- /* RESERVED */
- { 0, 0, HSMP_RSVD },
-
- /*
- * HSMP_TEST, num_args = 1, response_sz = 1
- * input: args[0] = xx
- * output: args[0] = xx + 1
- */
- { 1, 1, HSMP_GET },
-
- /*
- * HSMP_GET_SMU_VER, num_args = 0, response_sz = 1
- * output: args[0] = smu fw ver
- */
- { 0, 1, HSMP_GET },
-
- /*
- * HSMP_GET_PROTO_VER, num_args = 0, response_sz = 1
- * output: args[0] = proto version
- */
- { 0, 1, HSMP_GET },
-
- /*
- * HSMP_GET_SOCKET_POWER, num_args = 0, response_sz = 1
- * output: args[0] = socket power in mWatts
- */
- { 0, 1, HSMP_GET },
-
- /*
- * HSMP_SET_SOCKET_POWER_LIMIT, num_args = 1, response_sz = 0
- * input: args[0] = power limit value in mWatts
- */
- { 1, 0, HSMP_SET },
-
- /*
- * HSMP_GET_SOCKET_POWER_LIMIT, num_args = 0, response_sz = 1
- * output: args[0] = socket power limit value in mWatts
- */
- { 0, 1, HSMP_GET },
-
- /*
- * HSMP_GET_SOCKET_POWER_LIMIT_MAX, num_args = 0, response_sz =
- * 1 output: args[0] = maximuam socket power limit in mWatts
- */
- { 0, 1, HSMP_GET },
-
- /*
- * HSMP_SET_BOOST_LIMIT, num_args = 1, response_sz = 0
- * input: args[0] = apic id[31:16] + boost limit value in
- * MHz[15:0]
- */
- { 1, 0, HSMP_SET },
-
- /*
- * HSMP_SET_BOOST_LIMIT_SOCKET, num_args = 1, response_sz = 0
- * input: args[0] = boost limit value in MHz
- */
- { 1, 0, HSMP_SET },
-
- /*
- * HSMP_GET_BOOST_LIMIT, num_args = 1, response_sz = 1
- * input: args[0] = apic id
- * output: args[0] = boost limit value in MHz
- */
- { 1, 1, HSMP_GET },
-
- /*
- * HSMP_GET_PROC_HOT, num_args = 0, response_sz = 1
- * output: args[0] = proc hot status
- */
- { 0, 1, HSMP_GET },
-
- /*
- * HSMP_SET_XGMI_LINK_WIDTH, num_args = 1, response_sz = 0
- * input: args[0] = min link width[15:8] + max link width[7:0]
- */
- { 1, 0, HSMP_SET },
-
- /*
- * HSMP_SET_DF_PSTATE, num_args = 1, response_sz = 0
- * input: args[0] = df pstate[7:0]
- */
- { 1, 0, HSMP_SET },
-
- /* HSMP_SET_AUTO_DF_PSTATE, num_args = 0, response_sz = 0 */
- { 0, 0, HSMP_SET },
-
- /*
- * HSMP_GET_FCLK_MCLK, num_args = 0, response_sz = 2
- * output: args[0] = fclk in MHz, args[1] = mclk in MHz
- */
- { 0, 2, HSMP_GET },
-
- /*
- * HSMP_GET_CCLK_THROTTLE_LIMIT, num_args = 0, response_sz = 1
- * output: args[0] = core clock in MHz
- */
- { 0, 1, HSMP_GET },
-
- /*
- * HSMP_GET_C0_PERCENT, num_args = 0, response_sz = 1
- * output: args[0] = average c0 residency
- */
- { 0, 1, HSMP_GET },
-
- /*
- * HSMP_SET_NBIO_DPM_LEVEL, num_args = 1, response_sz = 0
- * input: args[0] = nbioid[23:16] + max dpm level[15:8] + min
- * dpm level[7:0]
- */
- { 1, 0, HSMP_SET },
-
- /*
- * HSMP_GET_NBIO_DPM_LEVEL, num_args = 1, response_sz = 1
- * input: args[0] = nbioid[23:16]
- * output: args[0] = max dpm level[15:8] + min dpm level[7:0]
- */
- { 1, 1, HSMP_GET },
-
- /*
- * HSMP_GET_DDR_BANDWIDTH, num_args = 0, response_sz = 1
- * output: args[0] = max bw in Gbps[31:20] + utilised bw in
- * Gbps[19:8] + bw in percentage[7:0]
- */
- { 0, 1, HSMP_GET },
-
- /*
- * HSMP_GET_TEMP_MONITOR, num_args = 0, response_sz = 1
- * output: args[0] = temperature in degree celsius. [15:8]
- * integer part + [7:5] fractional part
- */
- { 0, 1, HSMP_GET },
-
- /*
- * HSMP_GET_DIMM_TEMP_RANGE, num_args = 1, response_sz = 1
- * input: args[0] = DIMM address[7:0]
- * output: args[0] = refresh rate[3] + temperature range[2:0]
- */
- { 1, 1, HSMP_GET },
-
- /*
- * HSMP_GET_DIMM_POWER, num_args = 1, response_sz = 1
- * input: args[0] = DIMM address[7:0]
- * output: args[0] = DIMM power in mW[31:17] + update rate in
- * ms[16:8] + DIMM address[7:0]
- */
- { 1, 1, HSMP_GET },
-
- /*
- * HSMP_GET_DIMM_THERMAL, num_args = 1, response_sz = 1
- * input: args[0] = DIMM address[7:0]
- * output: args[0] = temperature in degree celsius[31:21] +
- * update rate in ms[16:8] + DIMM address[7:0]
- */
- { 1, 1, HSMP_GET },
-
- /*
- * HSMP_GET_SOCKET_FREQ_LIMIT, num_args = 0, response_sz = 1
- * output: args[0] = frequency in MHz[31:16] + frequency
- * source[15:0]
- */
- { 0, 1, HSMP_GET },
-
- /*
- * HSMP_GET_CCLK_CORE_LIMIT, num_args = 1, response_sz = 1
- * input: args[0] = apic id [31:0]
- * output: args[0] = frequency in MHz[31:0]
- */
- { 1, 1, HSMP_GET },
-
- /*
- * HSMP_GET_RAILS_SVI, num_args = 0, response_sz = 1
- * output: args[0] = power in mW[31:0]
- */
- { 0, 1, HSMP_GET },
-
- /*
- * HSMP_GET_SOCKET_FMAX_FMIN, num_args = 0, response_sz = 1
- * output: args[0] = fmax in MHz[31:16] + fmin in MHz[15:0]
- */
- { 0, 1, HSMP_GET },
-
- /*
- * HSMP_GET_IOLINK_BANDWITH, num_args = 1, response_sz = 1
- * input: args[0] = link id[15:8] + bw type[2:0]
- * output: args[0] = io bandwidth in Mbps[31:0]
- */
- { 1, 1, HSMP_GET },
-
- /*
- * HSMP_GET_XGMI_BANDWITH, num_args = 1, response_sz = 1
- * input: args[0] = link id[15:8] + bw type[2:0]
- * output: args[0] = xgmi bandwidth in Mbps[31:0]
- */
- { 1, 1, HSMP_GET },
-
- /*
- * HSMP_SET_GMI3_WIDTH, num_args = 1, response_sz = 0
- * input: args[0] = min link width[15:8] + max link width[7:0]
- */
- { 1, 0, HSMP_SET },
-
- /*
- * HSMP_SET_PCI_RATE, num_args = 1, response_sz = 1
- * input: args[0] = link rate control value
- * output: args[0] = previous link rate control value
- */
- { 1, 1, HSMP_SET },
-
- /*
- * HSMP_SET_POWER_MODE, num_args = 1, response_sz = 0
- * input: args[0] = power efficiency mode[2:0]
- */
- { 1, 1, HSMP_SET_GET },
-
- /*
- * HSMP_SET_PSTATE_MAX_MIN, num_args = 1, response_sz = 0
- * input: args[0] = min df pstate[15:8] + max df pstate[7:0]
- */
- { 1, 0, HSMP_SET },
-
- /*
- * HSMP_GET_METRIC_TABLE_VER, num_args = 0, response_sz = 1
- * output: args[0] = metrics table version
- */
- { 0, 1, HSMP_GET },
-
- /*
- * HSMP_GET_METRIC_TABLE, num_args = 0, response_sz = 0
- */
- { 0, 0, HSMP_GET },
-
- /*
- * HSMP_GET_METRIC_TABLE_DRAM_ADDR, num_args = 0, response_sz =
- * 2 output: args[0] = lower 32 bits of the address output:
- * args[1] = upper 32 bits of the address
- */
- { 0, 2, HSMP_GET },
-
- /*
- * HSMP_SET_XGMI_PSTATE_RANGE, num_args = 1, response_sz = 0
- * input: args[0] = min xGMI p-state[15:8] + max xGMI
- * p-state[7:0]
- */
- { 1, 0, HSMP_SET },
-
- /*
- * HSMP_CPU_RAIL_ISO_FREQ_POLICY, num_args = 1, response_sz = 1
- * input: args[0] = set/get policy[31] +
- * disable/enable independent control[0]
- * output: args[0] = current policy[0]
- */
- { 1, 1, HSMP_SET_GET },
-
- /*
- * HSMP_DFC_ENABLE_CTRL, num_args = 1, response_sz = 1
- * input: args[0] = set/get policy[31] + enable/disable DFC[0]
- * output: args[0] = current policy[0]
- */
- { 1, 1, HSMP_SET_GET },
-
- /* RESERVED(0x29-0x2f) */
- { 0, 0, HSMP_RSVD },
- { 0, 0, HSMP_RSVD },
- { 0, 0, HSMP_RSVD },
- { 0, 0, HSMP_RSVD },
- { 0, 0, HSMP_RSVD },
- { 0, 0, HSMP_RSVD },
- { 0, 0, HSMP_RSVD },
-
- /*
- * HSMP_GET_RAPL_UNITS, response_sz = 1
- * output: args[0] = tu value[19:16] + esu value[12:8]
- */
- { 0, 1, HSMP_GET },
-
- /*
- * HSMP_GET_RAPL_CORE_COUNTER, num_args = 1, response_sz = 1
- * input: args[0] = apic id[15:0]
- * output: args[0] = lower 32 bits of energy
- * output: args[1] = upper 32 bits of energy
- */
- { 1, 2, HSMP_GET },
-
- /*
- * HSMP_GET_RAPL_PACKAGE_COUNTER, num_args = 0, response_sz = 1
- * output: args[0] = lower 32 bits of energy
- * output: args[1] = upper 32 bits of energy
- */
- { 0, 2, HSMP_GET },
-
- };
+static const struct hsmp_msg_desc hsmp_msg_desc_table[] __attribute__((unused)) = {
+ /* RESERVED */
+ { 0, 0, HSMP_RSVD },
+
+ /*
+ * HSMP_TEST, num_args = 1, response_sz = 1
+ * input: args[0] = xx
+ * output: args[0] = xx + 1
+ */
+ { 1, 1, HSMP_GET },
+
+ /*
+ * HSMP_GET_SMU_VER, num_args = 0, response_sz = 1
+ * output: args[0] = smu fw ver
+ */
+ { 0, 1, HSMP_GET },
+
+ /*
+ * HSMP_GET_PROTO_VER, num_args = 0, response_sz = 1
+ * output: args[0] = proto version
+ */
+ { 0, 1, HSMP_GET },
+
+ /*
+ * HSMP_GET_SOCKET_POWER, num_args = 0, response_sz = 1
+ * output: args[0] = socket power in mWatts
+ */
+ { 0, 1, HSMP_GET },
+
+ /*
+ * HSMP_SET_SOCKET_POWER_LIMIT, num_args = 1, response_sz = 0
+ * input: args[0] = power limit value in mWatts
+ */
+ { 1, 0, HSMP_SET },
+
+ /*
+ * HSMP_GET_SOCKET_POWER_LIMIT, num_args = 0, response_sz = 1
+ * output: args[0] = socket power limit value in mWatts
+ */
+ { 0, 1, HSMP_GET },
+
+ /*
+ * HSMP_GET_SOCKET_POWER_LIMIT_MAX, num_args = 0, response_sz =
+ * 1 output: args[0] = maximuam socket power limit in mWatts
+ */
+ { 0, 1, HSMP_GET },
+
+ /*
+ * HSMP_SET_BOOST_LIMIT, num_args = 1, response_sz = 0
+ * input: args[0] = apic id[31:16] + boost limit value in
+ * MHz[15:0]
+ */
+ { 1, 0, HSMP_SET },
+
+ /*
+ * HSMP_SET_BOOST_LIMIT_SOCKET, num_args = 1, response_sz = 0
+ * input: args[0] = boost limit value in MHz
+ */
+ { 1, 0, HSMP_SET },
+
+ /*
+ * HSMP_GET_BOOST_LIMIT, num_args = 1, response_sz = 1
+ * input: args[0] = apic id
+ * output: args[0] = boost limit value in MHz
+ */
+ { 1, 1, HSMP_GET },
+
+ /*
+ * HSMP_GET_PROC_HOT, num_args = 0, response_sz = 1
+ * output: args[0] = proc hot status
+ */
+ { 0, 1, HSMP_GET },
+
+ /*
+ * HSMP_SET_XGMI_LINK_WIDTH, num_args = 1, response_sz = 0
+ * input: args[0] = min link width[15:8] + max link width[7:0]
+ */
+ { 1, 0, HSMP_SET },
+
+ /*
+ * HSMP_SET_DF_PSTATE, num_args = 1, response_sz = 0
+ * input: args[0] = df pstate[7:0]
+ */
+ { 1, 0, HSMP_SET },
+
+ /* HSMP_SET_AUTO_DF_PSTATE, num_args = 0, response_sz = 0 */
+ { 0, 0, HSMP_SET },
+
+ /*
+ * HSMP_GET_FCLK_MCLK, num_args = 0, response_sz = 2
+ * output: args[0] = fclk in MHz, args[1] = mclk in MHz
+ */
+ { 0, 2, HSMP_GET },
+
+ /*
+ * HSMP_GET_CCLK_THROTTLE_LIMIT, num_args = 0, response_sz = 1
+ * output: args[0] = core clock in MHz
+ */
+ { 0, 1, HSMP_GET },
+
+ /*
+ * HSMP_GET_C0_PERCENT, num_args = 0, response_sz = 1
+ * output: args[0] = average c0 residency
+ */
+ { 0, 1, HSMP_GET },
+
+ /*
+ * HSMP_SET_NBIO_DPM_LEVEL, num_args = 1, response_sz = 0
+ * input: args[0] = nbioid[23:16] + max dpm level[15:8] + min
+ * dpm level[7:0]
+ */
+ { 1, 0, HSMP_SET },
+
+ /*
+ * HSMP_GET_NBIO_DPM_LEVEL, num_args = 1, response_sz = 1
+ * input: args[0] = nbioid[23:16]
+ * output: args[0] = max dpm level[15:8] + min dpm level[7:0]
+ */
+ { 1, 1, HSMP_GET },
+
+ /*
+ * HSMP_GET_DDR_BANDWIDTH, num_args = 0, response_sz = 1
+ * output: args[0] = max bw in Gbps[31:20] + utilised bw in
+ * Gbps[19:8] + bw in percentage[7:0]
+ */
+ { 0, 1, HSMP_GET },
+
+ /*
+ * HSMP_GET_TEMP_MONITOR, num_args = 0, response_sz = 1
+ * output: args[0] = temperature in degree celsius. [15:8]
+ * integer part + [7:5] fractional part
+ */
+ { 0, 1, HSMP_GET },
+
+ /*
+ * HSMP_GET_DIMM_TEMP_RANGE, num_args = 1, response_sz = 1
+ * input: args[0] = DIMM address[7:0]
+ * output: args[0] = refresh rate[3] + temperature range[2:0]
+ */
+ { 1, 1, HSMP_GET },
+
+ /*
+ * HSMP_GET_DIMM_POWER, num_args = 1, response_sz = 1
+ * input: args[0] = DIMM address[7:0]
+ * output: args[0] = DIMM power in mW[31:17] + update rate in
+ * ms[16:8] + DIMM address[7:0]
+ */
+ { 1, 1, HSMP_GET },
+
+ /*
+ * HSMP_GET_DIMM_THERMAL, num_args = 1, response_sz = 1
+ * input: args[0] = DIMM address[7:0]
+ * output: args[0] = temperature in degree celsius[31:21] +
+ * update rate in ms[16:8] + DIMM address[7:0]
+ */
+ { 1, 1, HSMP_GET },
+
+ /*
+ * HSMP_GET_SOCKET_FREQ_LIMIT, num_args = 0, response_sz = 1
+ * output: args[0] = frequency in MHz[31:16] + frequency
+ * source[15:0]
+ */
+ { 0, 1, HSMP_GET },
+
+ /*
+ * HSMP_GET_CCLK_CORE_LIMIT, num_args = 1, response_sz = 1
+ * input: args[0] = apic id [31:0]
+ * output: args[0] = frequency in MHz[31:0]
+ */
+ { 1, 1, HSMP_GET },
+
+ /*
+ * HSMP_GET_RAILS_SVI, num_args = 0, response_sz = 1
+ * output: args[0] = power in mW[31:0]
+ */
+ { 0, 1, HSMP_GET },
+
+ /*
+ * HSMP_GET_SOCKET_FMAX_FMIN, num_args = 0, response_sz = 1
+ * output: args[0] = fmax in MHz[31:16] + fmin in MHz[15:0]
+ */
+ { 0, 1, HSMP_GET },
+
+ /*
+ * HSMP_GET_IOLINK_BANDWITH, num_args = 1, response_sz = 1
+ * input: args[0] = link id[15:8] + bw type[2:0]
+ * output: args[0] = io bandwidth in Mbps[31:0]
+ */
+ { 1, 1, HSMP_GET },
+
+ /*
+ * HSMP_GET_XGMI_BANDWITH, num_args = 1, response_sz = 1
+ * input: args[0] = link id[15:8] + bw type[2:0]
+ * output: args[0] = xgmi bandwidth in Mbps[31:0]
+ */
+ { 1, 1, HSMP_GET },
+
+ /*
+ * HSMP_SET_GMI3_WIDTH, num_args = 1, response_sz = 0
+ * input: args[0] = min link width[15:8] + max link width[7:0]
+ */
+ { 1, 0, HSMP_SET },
+
+ /*
+ * HSMP_SET_PCI_RATE, num_args = 1, response_sz = 1
+ * input: args[0] = link rate control value
+ * output: args[0] = previous link rate control value
+ */
+ { 1, 1, HSMP_SET },
+
+ /*
+ * HSMP_SET_POWER_MODE, num_args = 1, response_sz = 0
+ * input: args[0] = power efficiency mode[2:0]
+ */
+ { 1, 1, HSMP_SET_GET },
+
+ /*
+ * HSMP_SET_PSTATE_MAX_MIN, num_args = 1, response_sz = 0
+ * input: args[0] = min df pstate[15:8] + max df pstate[7:0]
+ */
+ { 1, 0, HSMP_SET },
+
+ /*
+ * HSMP_GET_METRIC_TABLE_VER, num_args = 0, response_sz = 1
+ * output: args[0] = metrics table version
+ */
+ { 0, 1, HSMP_GET },
+
+ /*
+ * HSMP_GET_METRIC_TABLE, num_args = 0, response_sz = 0
+ */
+ { 0, 0, HSMP_GET },
+
+ /*
+ * HSMP_GET_METRIC_TABLE_DRAM_ADDR, num_args = 0, response_sz =
+ * 2 output: args[0] = lower 32 bits of the address output:
+ * args[1] = upper 32 bits of the address
+ */
+ { 0, 2, HSMP_GET },
+
+ /*
+ * HSMP_SET_XGMI_PSTATE_RANGE, num_args = 1, response_sz = 0
+ * input: args[0] = min xGMI p-state[15:8] + max xGMI
+ * p-state[7:0]
+ */
+ { 1, 0, HSMP_SET },
+
+ /*
+ * HSMP_CPU_RAIL_ISO_FREQ_POLICY, num_args = 1, response_sz = 1
+ * input: args[0] = set/get policy[31] +
+ * disable/enable independent control[0]
+ * output: args[0] = current policy[0]
+ */
+ { 1, 1, HSMP_SET_GET },
+
+ /*
+ * HSMP_DFC_ENABLE_CTRL, num_args = 1, response_sz = 1
+ * input: args[0] = set/get policy[31] + enable/disable DFC[0]
+ * output: args[0] = current policy[0]
+ */
+ { 1, 1, HSMP_SET_GET },
+
+ /* RESERVED(0x29-0x2f) */
+ { 0, 0, HSMP_RSVD },
+ { 0, 0, HSMP_RSVD },
+ { 0, 0, HSMP_RSVD },
+ { 0, 0, HSMP_RSVD },
+ { 0, 0, HSMP_RSVD },
+ { 0, 0, HSMP_RSVD },
+ { 0, 0, HSMP_RSVD },
+
+ /*
+ * HSMP_GET_RAPL_UNITS, response_sz = 1
+ * output: args[0] = tu value[19:16] + esu value[12:8]
+ */
+ { 0, 1, HSMP_GET },
+
+ /*
+ * HSMP_GET_RAPL_CORE_COUNTER, num_args = 1, response_sz = 1
+ * input: args[0] = apic id[15:0]
+ * output: args[0] = lower 32 bits of energy
+ * output: args[1] = upper 32 bits of energy
+ */
+ { 1, 2, HSMP_GET },
+
+ /*
+ * HSMP_GET_RAPL_PACKAGE_COUNTER, num_args = 0, response_sz = 1
+ * output: args[0] = lower 32 bits of energy
+ * output: args[1] = upper 32 bits of energy
+ */
+ { 0, 2, HSMP_GET },
+
+};
/* Metrics table (supported only with proto version 6) */
struct hsmp_metric_table {
diff --git a/include/arch/x86_64/asm/atomic.h b/include/arch/x86_64/asm/atomic.h
index b673c7e3..9b2a4fd3 100644
--- a/include/arch/x86_64/asm/atomic.h
+++ b/include/arch/x86_64/asm/atomic.h
@@ -3,50 +3,35 @@
#define a_cas a_cas
static inline int a_cas(volatile int *p, int t, int s)
{
- __asm__ __volatile__("lock ; cmpxchg %3, %1"
- : "=a"(t), "=m"(*p)
- : "a"(t), "r"(s)
- : "memory");
+ __asm__ __volatile__("lock ; cmpxchg %3, %1" : "=a"(t), "=m"(*p) : "a"(t), "r"(s) : "memory");
return t;
}
#define a_cas_p a_cas_p
static inline void *a_cas_p(volatile void *p, void *t, void *s)
{
- __asm__("lock ; cmpxchg %3, %1"
- : "=a"(t), "=m"(*(void *volatile *)p)
- : "a"(t), "r"(s)
- : "memory");
+ __asm__("lock ; cmpxchg %3, %1" : "=a"(t), "=m"(*(void *volatile *)p) : "a"(t), "r"(s) : "memory");
return t;
}
#define a_swap a_swap
static inline int a_swap(volatile int *p, int v)
{
- __asm__ __volatile__("xchg %0, %1"
- : "=r"(v), "=m"(*p)
- : "0"(v)
- : "memory");
+ __asm__ __volatile__("xchg %0, %1" : "=r"(v), "=m"(*p) : "0"(v) : "memory");
return v;
}
#define a_fetch_add a_fetch_add
static inline int a_fetch_add(volatile int *p, int v)
{
- __asm__ __volatile__("lock ; xadd %0, %1"
- : "=r"(v), "=m"(*p)
- : "0"(v)
- : "memory");
+ __asm__ __volatile__("lock ; xadd %0, %1" : "=r"(v), "=m"(*p) : "0"(v) : "memory");
return v;
}
#define a_and a_and
static inline void a_and(volatile int *p, int v)
{
- __asm__ __volatile__("lock ; and %1, %0"
- : "=m"(*p)
- : "r"(v)
- : "memory");
+ __asm__ __volatile__("lock ; and %1, %0" : "=m"(*p) : "r"(v) : "memory");
}
#define a_or a_or
@@ -82,10 +67,7 @@ static inline void a_dec(volatile int *p)
#define a_store a_store
static inline void a_store(volatile int *p, int x)
{
- __asm__ __volatile__("mov %1, %0 ; lock ; orl $0,(%%rsp)"
- : "=m"(*p)
- : "r"(x)
- : "memory");
+ __asm__ __volatile__("mov %1, %0 ; lock ; orl $0,(%%rsp)" : "=m"(*p) : "r"(x) : "memory");
}
#define a_barrier a_barrier
diff --git a/include/arch/x86_64/asm/bootparam.h b/include/arch/x86_64/asm/bootparam.h
index ad10c79f..bc6e0879 100644
--- a/include/arch/x86_64/asm/bootparam.h
+++ b/include/arch/x86_64/asm/bootparam.h
@@ -155,12 +155,12 @@ struct boot_params {
__u8 _pad6[1]; /* 0x1f0 */
struct setup_header hdr; /* setup header */ /* 0x1f1 */
__u8 _pad7[0x290 - 0x1f1 - sizeof(struct setup_header)];
- __u32 edd_mbr_sig_buffer[EDD_MBR_SIG_MAX]; /* 0x290 */
+ __u32 edd_mbr_sig_buffer[EDD_MBR_SIG_MAX]; /* 0x290 */
struct boot_e820_entry e820_table[E820_MAX_ENTRIES_ZEROPAGE]; /* 0x2d0
*/
- __u8 _pad8[48]; /* 0xcd0 */
- struct edd_info eddbuf[EDDMAXNR]; /* 0xd00 */
- __u8 _pad9[276]; /* 0xeec */
+ __u8 _pad8[48]; /* 0xcd0 */
+ struct edd_info eddbuf[EDDMAXNR]; /* 0xd00 */
+ __u8 _pad9[276]; /* 0xeec */
} __attribute__((packed));
/**
diff --git a/include/arch/x86_64/asm/elf.h b/include/arch/x86_64/asm/elf.h
index 3353eeb0..6bf01641 100644
--- a/include/arch/x86_64/asm/elf.h
+++ b/include/arch/x86_64/asm/elf.h
@@ -11,7 +11,6 @@ struct x86_xfeat_component {
__u32 flags;
} __attribute__((packed));
-_Static_assert(sizeof(struct x86_xfeat_component) % 4 == 0,
- "x86_xfeat_component is not aligned");
+_Static_assert(sizeof(struct x86_xfeat_component) % 4 == 0, "x86_xfeat_component is not aligned");
#endif /* _ASM_X86_ELF_H */
diff --git a/include/arch/x86_64/asm/kvm.h b/include/arch/x86_64/asm/kvm.h
index f37ee487..102869f4 100644
--- a/include/arch/x86_64/asm/kvm.h
+++ b/include/arch/x86_64/asm/kvm.h
@@ -205,10 +205,9 @@ struct kvm_msr_list {
/* for KVM_X86_SET_MSR_FILTER */
struct kvm_msr_filter_range {
-#define KVM_MSR_FILTER_READ (1 << 0)
-#define KVM_MSR_FILTER_WRITE (1 << 1)
-#define KVM_MSR_FILTER_RANGE_VALID_MASK \
- (KVM_MSR_FILTER_READ | KVM_MSR_FILTER_WRITE)
+#define KVM_MSR_FILTER_READ (1 << 0)
+#define KVM_MSR_FILTER_WRITE (1 << 1)
+#define KVM_MSR_FILTER_RANGE_VALID_MASK (KVM_MSR_FILTER_READ | KVM_MSR_FILTER_WRITE)
__u32 flags;
__u32 nmsrs; /* number of msrs in bitmap */
__u32 base; /* MSR index the bitmap starts at */
@@ -412,8 +411,7 @@ struct kvm_xcrs {
#define KVM_SYNC_X86_SREGS (1UL << 1)
#define KVM_SYNC_X86_EVENTS (1UL << 2)
-#define KVM_SYNC_X86_VALID_FIELDS \
- (KVM_SYNC_X86_REGS | KVM_SYNC_X86_SREGS | KVM_SYNC_X86_EVENTS)
+#define KVM_SYNC_X86_VALID_FIELDS (KVM_SYNC_X86_REGS | KVM_SYNC_X86_SREGS | KVM_SYNC_X86_EVENTS)
/* kvm_sync_regs struct included by kvm_run struct */
struct kvm_sync_regs {
@@ -899,13 +897,11 @@ struct kvm_hyperv_eventfd {
* 63:56 umask mask
*/
-#define KVM_PMU_ENCODE_MASKED_ENTRY(event_select, mask, match, exclude) \
- (((event_select) & 0xFFULL) | (((event_select) & 0XF00ULL) << 24) | \
- (((mask) & 0xFFULL) << 56) | (((match) & 0xFFULL) << 8) | \
- ((__u64)(!!(exclude)) << 55))
+#define KVM_PMU_ENCODE_MASKED_ENTRY(event_select, mask, match, exclude) \
+ (((event_select) & 0xFFULL) | (((event_select) & 0XF00ULL) << 24) | (((mask) & 0xFFULL) << 56) | \
+ (((match) & 0xFFULL) << 8) | ((__u64)(!!(exclude)) << 55))
-#define KVM_PMU_MASKED_ENTRY_EVENT_SELECT \
- (__GENMASK_ULL(7, 0) | __GENMASK_ULL(35, 32))
+#define KVM_PMU_MASKED_ENTRY_EVENT_SELECT (__GENMASK_ULL(7, 0) | __GENMASK_ULL(35, 32))
#define KVM_PMU_MASKED_ENTRY_UMASK_MASK (__GENMASK_ULL(63, 56))
#define KVM_PMU_MASKED_ENTRY_UMASK_MATCH (__GENMASK_ULL(15, 8))
#define KVM_PMU_MASKED_ENTRY_EXCLUDE (_BITULL(55))
diff --git a/include/arch/x86_64/asm/processor-flags.h b/include/arch/x86_64/asm/processor-flags.h
index 02177c91..298ebe45 100644
--- a/include/arch/x86_64/asm/processor-flags.h
+++ b/include/arch/x86_64/asm/processor-flags.h
@@ -82,11 +82,9 @@
#define X86_CR3_PCID_BITS 12
#define X86_CR3_PCID_MASK (_AC((1UL << X86_CR3_PCID_BITS) - 1, UL))
-#define X86_CR3_LAM_U57_BIT \
- 61 /* Activate LAM for userspace, 62:57 bits masked */
-#define X86_CR3_LAM_U57 _BITULL(X86_CR3_LAM_U57_BIT)
-#define X86_CR3_LAM_U48_BIT \
- 62 /* Activate LAM for userspace, 62:48 bits masked */
+#define X86_CR3_LAM_U57_BIT 61 /* Activate LAM for userspace, 62:57 bits masked */
+#define X86_CR3_LAM_U57 _BITULL(X86_CR3_LAM_U57_BIT)
+#define X86_CR3_LAM_U48_BIT 62 /* Activate LAM for userspace, 62:48 bits masked */
#define X86_CR3_LAM_U48 _BITULL(X86_CR3_LAM_U48_BIT)
#define X86_CR3_PCID_NOFLUSH_BIT 63 /* Preserve old PCID */
#define X86_CR3_PCID_NOFLUSH _BITULL(X86_CR3_PCID_NOFLUSH_BIT)
@@ -176,8 +174,6 @@
#define CX86_ARR_BASE 0xc4
#define CX86_RCR_BASE 0xdc
-#define CR0_STATE \
- (X86_CR0_PE | X86_CR0_MP | X86_CR0_ET | X86_CR0_NE | X86_CR0_WP | \
- X86_CR0_AM | X86_CR0_PG)
+#define CR0_STATE (X86_CR0_PE | X86_CR0_MP | X86_CR0_ET | X86_CR0_NE | X86_CR0_WP | X86_CR0_AM | X86_CR0_PG)
#endif /* _ASM_X86_PROCESSOR_FLAGS_H */
diff --git a/include/arch/x86_64/asm/sgx.h b/include/arch/x86_64/asm/sgx.h
index 0fce30b3..e63c85ee 100644
--- a/include/arch/x86_64/asm/sgx.h
+++ b/include/arch/x86_64/asm/sgx.h
@@ -19,19 +19,14 @@ enum sgx_page_flags {
#define SGX_MAGIC 0xA4
-#define SGX_IOC_ENCLAVE_CREATE _IOW(SGX_MAGIC, 0x00, struct sgx_enclave_create)
-#define SGX_IOC_ENCLAVE_ADD_PAGES \
- _IOWR(SGX_MAGIC, 0x01, struct sgx_enclave_add_pages)
-#define SGX_IOC_ENCLAVE_INIT _IOW(SGX_MAGIC, 0x02, struct sgx_enclave_init)
-#define SGX_IOC_ENCLAVE_PROVISION \
- _IOW(SGX_MAGIC, 0x03, struct sgx_enclave_provision)
-#define SGX_IOC_VEPC_REMOVE_ALL _IO(SGX_MAGIC, 0x04)
-#define SGX_IOC_ENCLAVE_RESTRICT_PERMISSIONS \
- _IOWR(SGX_MAGIC, 0x05, struct sgx_enclave_restrict_permissions)
-#define SGX_IOC_ENCLAVE_MODIFY_TYPES \
- _IOWR(SGX_MAGIC, 0x06, struct sgx_enclave_modify_types)
-#define SGX_IOC_ENCLAVE_REMOVE_PAGES \
- _IOWR(SGX_MAGIC, 0x07, struct sgx_enclave_remove_pages)
+#define SGX_IOC_ENCLAVE_CREATE _IOW(SGX_MAGIC, 0x00, struct sgx_enclave_create)
+#define SGX_IOC_ENCLAVE_ADD_PAGES _IOWR(SGX_MAGIC, 0x01, struct sgx_enclave_add_pages)
+#define SGX_IOC_ENCLAVE_INIT _IOW(SGX_MAGIC, 0x02, struct sgx_enclave_init)
+#define SGX_IOC_ENCLAVE_PROVISION _IOW(SGX_MAGIC, 0x03, struct sgx_enclave_provision)
+#define SGX_IOC_VEPC_REMOVE_ALL _IO(SGX_MAGIC, 0x04)
+#define SGX_IOC_ENCLAVE_RESTRICT_PERMISSIONS _IOWR(SGX_MAGIC, 0x05, struct sgx_enclave_restrict_permissions)
+#define SGX_IOC_ENCLAVE_MODIFY_TYPES _IOWR(SGX_MAGIC, 0x06, struct sgx_enclave_modify_types)
+#define SGX_IOC_ENCLAVE_REMOVE_PAGES _IOWR(SGX_MAGIC, 0x07, struct sgx_enclave_remove_pages)
/**
* struct sgx_enclave_create - parameter structure for the
@@ -150,8 +145,7 @@ struct sgx_enclave_run;
* - <= 0: The given value is returned back to the caller.
* - > 0: ENCLU function to invoke, either EENTER or ERESUME.
*/
-typedef int (*sgx_enclave_user_handler_t)(long rdi, long rsi, long rdx,
- long rsp, long r8, long r9,
+typedef int (*sgx_enclave_user_handler_t)(long rdi, long rsi, long rdx, long rsp, long r8, long r9,
struct sgx_enclave_run *run);
/**
@@ -223,10 +217,7 @@ struct sgx_enclave_run {
* - 0: ENCLU function was successfully executed.
* - -EINVAL: Invalid ENCL number (neither EENTER nor ERESUME).
*/
-typedef int (*vdso_sgx_enter_enclave_t)(unsigned long rdi, unsigned long rsi,
- unsigned long rdx,
- unsigned int function, unsigned long r8,
- unsigned long r9,
- struct sgx_enclave_run *run);
+typedef int (*vdso_sgx_enter_enclave_t)(unsigned long rdi, unsigned long rsi, unsigned long rdx, unsigned int function,
+ unsigned long r8, unsigned long r9, struct sgx_enclave_run *run);
#endif /* _ASM_X86_SGX_H */
diff --git a/include/arch/x86_64/asm/svm.h b/include/arch/x86_64/asm/svm.h
index 76c30970..1a72c7ef 100644
--- a/include/arch/x86_64/asm/svm.h
+++ b/include/arch/x86_64/asm/svm.h
@@ -131,102 +131,58 @@
#define SVM_EXIT_ERR -1
-#define SVM_EXIT_REASONS \
- { SVM_EXIT_READ_CR0, "read_cr0" }, { SVM_EXIT_READ_CR2, "read_cr2" }, \
- { SVM_EXIT_READ_CR3, "read_cr3" }, \
- { SVM_EXIT_READ_CR4, "read_cr4" }, \
- { SVM_EXIT_READ_CR8, "read_cr8" }, \
- { SVM_EXIT_WRITE_CR0, "write_cr0" }, \
- { SVM_EXIT_WRITE_CR2, "write_cr2" }, \
- { SVM_EXIT_WRITE_CR3, "write_cr3" }, \
- { SVM_EXIT_WRITE_CR4, "write_cr4" }, \
- { SVM_EXIT_WRITE_CR8, "write_cr8" }, \
- { SVM_EXIT_READ_DR0, "read_dr0" }, \
- { SVM_EXIT_READ_DR1, "read_dr1" }, \
- { SVM_EXIT_READ_DR2, "read_dr2" }, \
- { SVM_EXIT_READ_DR3, "read_dr3" }, \
- { SVM_EXIT_READ_DR4, "read_dr4" }, \
- { SVM_EXIT_READ_DR5, "read_dr5" }, \
- { SVM_EXIT_READ_DR6, "read_dr6" }, \
- { SVM_EXIT_READ_DR7, "read_dr7" }, \
- { SVM_EXIT_WRITE_DR0, "write_dr0" }, \
- { SVM_EXIT_WRITE_DR1, "write_dr1" }, \
- { SVM_EXIT_WRITE_DR2, "write_dr2" }, \
- { SVM_EXIT_WRITE_DR3, "write_dr3" }, \
- { SVM_EXIT_WRITE_DR4, "write_dr4" }, \
- { SVM_EXIT_WRITE_DR5, "write_dr5" }, \
- { SVM_EXIT_WRITE_DR6, "write_dr6" }, \
- { SVM_EXIT_WRITE_DR7, "write_dr7" }, \
- { SVM_EXIT_EXCP_BASE + DE_VECTOR, "DE excp" }, \
- { SVM_EXIT_EXCP_BASE + DB_VECTOR, "DB excp" }, \
- { SVM_EXIT_EXCP_BASE + BP_VECTOR, "BP excp" }, \
- { SVM_EXIT_EXCP_BASE + OF_VECTOR, "OF excp" }, \
- { SVM_EXIT_EXCP_BASE + BR_VECTOR, "BR excp" }, \
- { SVM_EXIT_EXCP_BASE + UD_VECTOR, "UD excp" }, \
- { SVM_EXIT_EXCP_BASE + NM_VECTOR, "NM excp" }, \
- { SVM_EXIT_EXCP_BASE + DF_VECTOR, "DF excp" }, \
- { SVM_EXIT_EXCP_BASE + TS_VECTOR, "TS excp" }, \
- { SVM_EXIT_EXCP_BASE + NP_VECTOR, "NP excp" }, \
- { SVM_EXIT_EXCP_BASE + SS_VECTOR, "SS excp" }, \
- { SVM_EXIT_EXCP_BASE + GP_VECTOR, "GP excp" }, \
- { SVM_EXIT_EXCP_BASE + PF_VECTOR, "PF excp" }, \
- { SVM_EXIT_EXCP_BASE + MF_VECTOR, "MF excp" }, \
- { SVM_EXIT_EXCP_BASE + AC_VECTOR, "AC excp" }, \
- { SVM_EXIT_EXCP_BASE + MC_VECTOR, "MC excp" }, \
- { SVM_EXIT_EXCP_BASE + XM_VECTOR, "XF excp" }, \
- { SVM_EXIT_INTR, "interrupt" }, { SVM_EXIT_NMI, "nmi" }, \
- { SVM_EXIT_SMI, "smi" }, { SVM_EXIT_INIT, "init" }, \
- { SVM_EXIT_VINTR, "vintr" }, \
- { SVM_EXIT_CR0_SEL_WRITE, "cr0_sel_write" }, \
- { SVM_EXIT_IDTR_READ, "read_idtr" }, \
- { SVM_EXIT_GDTR_READ, "read_gdtr" }, \
- { SVM_EXIT_LDTR_READ, "read_ldtr" }, \
- { SVM_EXIT_TR_READ, "read_rt" }, \
- { SVM_EXIT_IDTR_WRITE, "write_idtr" }, \
- { SVM_EXIT_GDTR_WRITE, "write_gdtr" }, \
- { SVM_EXIT_LDTR_WRITE, "write_ldtr" }, \
- { SVM_EXIT_TR_WRITE, "write_rt" }, \
- { SVM_EXIT_RDTSC, "rdtsc" }, { SVM_EXIT_RDPMC, "rdpmc" }, \
- { SVM_EXIT_PUSHF, "pushf" }, { SVM_EXIT_POPF, "popf" }, \
- { SVM_EXIT_CPUID, "cpuid" }, { SVM_EXIT_RSM, "rsm" }, \
- { SVM_EXIT_IRET, "iret" }, { SVM_EXIT_SWINT, "swint" }, \
- { SVM_EXIT_INVD, "invd" }, { SVM_EXIT_PAUSE, "pause" }, \
- { SVM_EXIT_HLT, "hlt" }, { SVM_EXIT_INVLPG, "invlpg" }, \
- { SVM_EXIT_INVLPGA, "invlpga" }, { SVM_EXIT_IOIO, "io" }, \
- { SVM_EXIT_MSR, "msr" }, \
- { SVM_EXIT_TASK_SWITCH, "task_switch" }, \
- { SVM_EXIT_FERR_FREEZE, "ferr_freeze" }, \
- { SVM_EXIT_SHUTDOWN, "shutdown" }, \
- { SVM_EXIT_VMRUN, "vmrun" }, \
- { SVM_EXIT_VMMCALL, "hypercall" }, \
- { SVM_EXIT_VMLOAD, "vmload" }, { SVM_EXIT_VMSAVE, "vmsave" }, \
- { SVM_EXIT_STGI, "stgi" }, { SVM_EXIT_CLGI, "clgi" }, \
- { SVM_EXIT_SKINIT, "skinit" }, { SVM_EXIT_RDTSCP, "rdtscp" }, \
- { SVM_EXIT_ICEBP, "icebp" }, { SVM_EXIT_WBINVD, "wbinvd" }, \
- { SVM_EXIT_MONITOR, "monitor" }, { SVM_EXIT_MWAIT, "mwait" }, \
- { SVM_EXIT_XSETBV, "xsetbv" }, \
- { SVM_EXIT_EFER_WRITE_TRAP, "write_efer_trap" }, \
- { SVM_EXIT_CR0_WRITE_TRAP, "write_cr0_trap" }, \
- { SVM_EXIT_CR4_WRITE_TRAP, "write_cr4_trap" }, \
- { SVM_EXIT_CR8_WRITE_TRAP, "write_cr8_trap" }, \
- { SVM_EXIT_INVPCID, "invpcid" }, \
- { SVM_EXIT_BUS_LOCK, "buslock" }, \
- { SVM_EXIT_IDLE_HLT, "idle-halt" }, { SVM_EXIT_NPF, "npf" }, \
- { SVM_EXIT_AVIC_INCOMPLETE_IPI, "avic_incomplete_ipi" }, \
- { SVM_EXIT_AVIC_UNACCELERATED_ACCESS, \
- "avic_unaccelerated_access" }, \
- { SVM_EXIT_VMGEXIT, "vmgexit" }, \
- { SVM_VMGEXIT_MMIO_READ, "vmgexit_mmio_read" }, \
- { SVM_VMGEXIT_MMIO_WRITE, "vmgexit_mmio_write" }, \
- { SVM_VMGEXIT_NMI_COMPLETE, "vmgexit_nmi_complete" }, \
- { SVM_VMGEXIT_AP_HLT_LOOP, "vmgexit_ap_hlt_loop" }, \
- { SVM_VMGEXIT_AP_JUMP_TABLE, "vmgexit_ap_jump_table" }, \
- { SVM_VMGEXIT_PSC, "vmgexit_page_state_change" }, \
- { SVM_VMGEXIT_GUEST_REQUEST, "vmgexit_guest_request" }, \
- { SVM_VMGEXIT_EXT_GUEST_REQUEST, \
- "vmgexit_ext_guest_request" }, \
- { SVM_VMGEXIT_AP_CREATION, "vmgexit_ap_creation" }, \
- { SVM_VMGEXIT_HV_FEATURES, "vmgexit_hypervisor_feature" }, \
- { SVM_EXIT_ERR, "invalid_guest_state" }
+#define SVM_EXIT_REASONS \
+ { SVM_EXIT_READ_CR0, "read_cr0" }, { SVM_EXIT_READ_CR2, "read_cr2" }, { SVM_EXIT_READ_CR3, "read_cr3" }, \
+ { SVM_EXIT_READ_CR4, "read_cr4" }, { SVM_EXIT_READ_CR8, "read_cr8" }, \
+ { SVM_EXIT_WRITE_CR0, "write_cr0" }, { SVM_EXIT_WRITE_CR2, "write_cr2" }, \
+ { SVM_EXIT_WRITE_CR3, "write_cr3" }, { SVM_EXIT_WRITE_CR4, "write_cr4" }, \
+ { SVM_EXIT_WRITE_CR8, "write_cr8" }, { SVM_EXIT_READ_DR0, "read_dr0" }, \
+ { SVM_EXIT_READ_DR1, "read_dr1" }, { SVM_EXIT_READ_DR2, "read_dr2" }, \
+ { SVM_EXIT_READ_DR3, "read_dr3" }, { SVM_EXIT_READ_DR4, "read_dr4" }, \
+ { SVM_EXIT_READ_DR5, "read_dr5" }, { SVM_EXIT_READ_DR6, "read_dr6" }, \
+ { SVM_EXIT_READ_DR7, "read_dr7" }, { SVM_EXIT_WRITE_DR0, "write_dr0" }, \
+ { SVM_EXIT_WRITE_DR1, "write_dr1" }, { SVM_EXIT_WRITE_DR2, "write_dr2" }, \
+ { SVM_EXIT_WRITE_DR3, "write_dr3" }, { SVM_EXIT_WRITE_DR4, "write_dr4" }, \
+ { SVM_EXIT_WRITE_DR5, "write_dr5" }, { SVM_EXIT_WRITE_DR6, "write_dr6" }, \
+ { SVM_EXIT_WRITE_DR7, "write_dr7" }, { SVM_EXIT_EXCP_BASE + DE_VECTOR, "DE excp" }, \
+ { SVM_EXIT_EXCP_BASE + DB_VECTOR, "DB excp" }, { SVM_EXIT_EXCP_BASE + BP_VECTOR, "BP excp" }, \
+ { SVM_EXIT_EXCP_BASE + OF_VECTOR, "OF excp" }, { SVM_EXIT_EXCP_BASE + BR_VECTOR, "BR excp" }, \
+ { SVM_EXIT_EXCP_BASE + UD_VECTOR, "UD excp" }, { SVM_EXIT_EXCP_BASE + NM_VECTOR, "NM excp" }, \
+ { SVM_EXIT_EXCP_BASE + DF_VECTOR, "DF excp" }, { SVM_EXIT_EXCP_BASE + TS_VECTOR, "TS excp" }, \
+ { SVM_EXIT_EXCP_BASE + NP_VECTOR, "NP excp" }, { SVM_EXIT_EXCP_BASE + SS_VECTOR, "SS excp" }, \
+ { SVM_EXIT_EXCP_BASE + GP_VECTOR, "GP excp" }, { SVM_EXIT_EXCP_BASE + PF_VECTOR, "PF excp" }, \
+ { SVM_EXIT_EXCP_BASE + MF_VECTOR, "MF excp" }, { SVM_EXIT_EXCP_BASE + AC_VECTOR, "AC excp" }, \
+ { SVM_EXIT_EXCP_BASE + MC_VECTOR, "MC excp" }, { SVM_EXIT_EXCP_BASE + XM_VECTOR, "XF excp" }, \
+ { SVM_EXIT_INTR, "interrupt" }, { SVM_EXIT_NMI, "nmi" }, { SVM_EXIT_SMI, "smi" }, \
+ { SVM_EXIT_INIT, "init" }, { SVM_EXIT_VINTR, "vintr" }, { SVM_EXIT_CR0_SEL_WRITE, "cr0_sel_write" }, \
+ { SVM_EXIT_IDTR_READ, "read_idtr" }, { SVM_EXIT_GDTR_READ, "read_gdtr" }, \
+ { SVM_EXIT_LDTR_READ, "read_ldtr" }, { SVM_EXIT_TR_READ, "read_rt" }, \
+ { SVM_EXIT_IDTR_WRITE, "write_idtr" }, { SVM_EXIT_GDTR_WRITE, "write_gdtr" }, \
+ { SVM_EXIT_LDTR_WRITE, "write_ldtr" }, { SVM_EXIT_TR_WRITE, "write_rt" }, { SVM_EXIT_RDTSC, "rdtsc" }, \
+ { SVM_EXIT_RDPMC, "rdpmc" }, { SVM_EXIT_PUSHF, "pushf" }, { SVM_EXIT_POPF, "popf" }, \
+ { SVM_EXIT_CPUID, "cpuid" }, { SVM_EXIT_RSM, "rsm" }, { SVM_EXIT_IRET, "iret" }, \
+ { SVM_EXIT_SWINT, "swint" }, { SVM_EXIT_INVD, "invd" }, { SVM_EXIT_PAUSE, "pause" }, \
+ { SVM_EXIT_HLT, "hlt" }, { SVM_EXIT_INVLPG, "invlpg" }, { SVM_EXIT_INVLPGA, "invlpga" }, \
+ { SVM_EXIT_IOIO, "io" }, { SVM_EXIT_MSR, "msr" }, { SVM_EXIT_TASK_SWITCH, "task_switch" }, \
+ { SVM_EXIT_FERR_FREEZE, "ferr_freeze" }, { SVM_EXIT_SHUTDOWN, "shutdown" }, \
+ { SVM_EXIT_VMRUN, "vmrun" }, { SVM_EXIT_VMMCALL, "hypercall" }, { SVM_EXIT_VMLOAD, "vmload" }, \
+ { SVM_EXIT_VMSAVE, "vmsave" }, { SVM_EXIT_STGI, "stgi" }, { SVM_EXIT_CLGI, "clgi" }, \
+ { SVM_EXIT_SKINIT, "skinit" }, { SVM_EXIT_RDTSCP, "rdtscp" }, { SVM_EXIT_ICEBP, "icebp" }, \
+ { SVM_EXIT_WBINVD, "wbinvd" }, { SVM_EXIT_MONITOR, "monitor" }, { SVM_EXIT_MWAIT, "mwait" }, \
+ { SVM_EXIT_XSETBV, "xsetbv" }, { SVM_EXIT_EFER_WRITE_TRAP, "write_efer_trap" }, \
+ { SVM_EXIT_CR0_WRITE_TRAP, "write_cr0_trap" }, { SVM_EXIT_CR4_WRITE_TRAP, "write_cr4_trap" }, \
+ { SVM_EXIT_CR8_WRITE_TRAP, "write_cr8_trap" }, { SVM_EXIT_INVPCID, "invpcid" }, \
+ { SVM_EXIT_BUS_LOCK, "buslock" }, { SVM_EXIT_IDLE_HLT, "idle-halt" }, { SVM_EXIT_NPF, "npf" }, \
+ { SVM_EXIT_AVIC_INCOMPLETE_IPI, "avic_incomplete_ipi" }, \
+ { SVM_EXIT_AVIC_UNACCELERATED_ACCESS, "avic_unaccelerated_access" }, { SVM_EXIT_VMGEXIT, "vmgexit" }, \
+ { SVM_VMGEXIT_MMIO_READ, "vmgexit_mmio_read" }, { SVM_VMGEXIT_MMIO_WRITE, "vmgexit_mmio_write" }, \
+ { SVM_VMGEXIT_NMI_COMPLETE, "vmgexit_nmi_complete" }, \
+ { SVM_VMGEXIT_AP_HLT_LOOP, "vmgexit_ap_hlt_loop" }, \
+ { SVM_VMGEXIT_AP_JUMP_TABLE, "vmgexit_ap_jump_table" }, \
+ { SVM_VMGEXIT_PSC, "vmgexit_page_state_change" }, \
+ { SVM_VMGEXIT_GUEST_REQUEST, "vmgexit_guest_request" }, \
+ { SVM_VMGEXIT_EXT_GUEST_REQUEST, "vmgexit_ext_guest_request" }, \
+ { SVM_VMGEXIT_AP_CREATION, "vmgexit_ap_creation" }, \
+ { SVM_VMGEXIT_HV_FEATURES, "vmgexit_hypervisor_feature" }, { SVM_EXIT_ERR, "invalid_guest_state" }
#endif /* __SVM_H */
diff --git a/include/arch/x86_64/asm/swab.h b/include/arch/x86_64/asm/swab.h
index 0324f00d..8707b4cd 100644
--- a/include/arch/x86_64/asm/swab.h
+++ b/include/arch/x86_64/asm/swab.h
@@ -22,9 +22,7 @@ static __inline__ __u64 __arch_swab64(__u64 val)
__u64 u;
} v;
v.u = val;
- __asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
- : "=r"(v.s.a), "=r"(v.s.b)
- : "0"(v.s.a), "1"(v.s.b));
+ __asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1" : "=r"(v.s.a), "=r"(v.s.b) : "0"(v.s.a), "1"(v.s.b));
return v.u;
#else /* __i386__ */
__asm__("bswapq %0" : "=r"(val) : "0"(val));
diff --git a/include/arch/x86_64/asm/vmx.h b/include/arch/x86_64/asm/vmx.h
index 1c039c30..96d87c22 100644
--- a/include/arch/x86_64/asm/vmx.h
+++ b/include/arch/x86_64/asm/vmx.h
@@ -94,71 +94,42 @@
#define EXIT_REASON_NOTIFY 75
#define EXIT_REASON_TDCALL 77
-#define VMX_EXIT_REASONS \
- { EXIT_REASON_EXCEPTION_NMI, "EXCEPTION_NMI" }, \
- { EXIT_REASON_EXTERNAL_INTERRUPT, "EXTERNAL_INTERRUPT" }, \
- { EXIT_REASON_TRIPLE_FAULT, "TRIPLE_FAULT" }, \
- { EXIT_REASON_INIT_SIGNAL, "INIT_SIGNAL" }, \
- { EXIT_REASON_SIPI_SIGNAL, "SIPI_SIGNAL" }, \
- { EXIT_REASON_INTERRUPT_WINDOW, "INTERRUPT_WINDOW" }, \
- { EXIT_REASON_NMI_WINDOW, "NMI_WINDOW" }, \
- { EXIT_REASON_TASK_SWITCH, "TASK_SWITCH" }, \
- { EXIT_REASON_CPUID, "CPUID" }, { EXIT_REASON_HLT, "HLT" }, \
- { EXIT_REASON_INVD, "INVD" }, \
- { EXIT_REASON_INVLPG, "INVLPG" }, \
- { EXIT_REASON_RDPMC, "RDPMC" }, \
- { EXIT_REASON_RDTSC, "RDTSC" }, \
- { EXIT_REASON_VMCALL, "VMCALL" }, \
- { EXIT_REASON_VMCLEAR, "VMCLEAR" }, \
- { EXIT_REASON_VMLAUNCH, "VMLAUNCH" }, \
- { EXIT_REASON_VMPTRLD, "VMPTRLD" }, \
- { EXIT_REASON_VMPTRST, "VMPTRST" }, \
- { EXIT_REASON_VMREAD, "VMREAD" }, \
- { EXIT_REASON_VMRESUME, "VMRESUME" }, \
- { EXIT_REASON_VMWRITE, "VMWRITE" }, \
- { EXIT_REASON_VMOFF, "VMOFF" }, { EXIT_REASON_VMON, "VMON" }, \
- { EXIT_REASON_CR_ACCESS, "CR_ACCESS" }, \
- { EXIT_REASON_DR_ACCESS, "DR_ACCESS" }, \
- { EXIT_REASON_IO_INSTRUCTION, "IO_INSTRUCTION" }, \
- { EXIT_REASON_MSR_READ, "MSR_READ" }, \
- { EXIT_REASON_MSR_WRITE, "MSR_WRITE" }, \
- { EXIT_REASON_INVALID_STATE, "INVALID_STATE" }, \
- { EXIT_REASON_MSR_LOAD_FAIL, "MSR_LOAD_FAIL" }, \
- { EXIT_REASON_MWAIT_INSTRUCTION, "MWAIT_INSTRUCTION" }, \
- { EXIT_REASON_MONITOR_TRAP_FLAG, "MONITOR_TRAP_FLAG" }, \
- { EXIT_REASON_MONITOR_INSTRUCTION, "MONITOR_INSTRUCTION" }, \
- { EXIT_REASON_PAUSE_INSTRUCTION, "PAUSE_INSTRUCTION" }, \
- { EXIT_REASON_MCE_DURING_VMENTRY, "MCE_DURING_VMENTRY" }, \
- { EXIT_REASON_TPR_BELOW_THRESHOLD, "TPR_BELOW_THRESHOLD" }, \
- { EXIT_REASON_APIC_ACCESS, "APIC_ACCESS" }, \
- { EXIT_REASON_EOI_INDUCED, "EOI_INDUCED" }, \
- { EXIT_REASON_GDTR_IDTR, "GDTR_IDTR" }, \
- { EXIT_REASON_LDTR_TR, "LDTR_TR" }, \
- { EXIT_REASON_EPT_VIOLATION, "EPT_VIOLATION" }, \
- { EXIT_REASON_EPT_MISCONFIG, "EPT_MISCONFIG" }, \
- { EXIT_REASON_INVEPT, "INVEPT" }, \
- { EXIT_REASON_RDTSCP, "RDTSCP" }, \
- { EXIT_REASON_PREEMPTION_TIMER, "PREEMPTION_TIMER" }, \
- { EXIT_REASON_INVVPID, "INVVPID" }, \
- { EXIT_REASON_WBINVD, "WBINVD" }, \
- { EXIT_REASON_XSETBV, "XSETBV" }, \
- { EXIT_REASON_APIC_WRITE, "APIC_WRITE" }, \
- { EXIT_REASON_RDRAND, "RDRAND" }, \
- { EXIT_REASON_INVPCID, "INVPCID" }, \
- { EXIT_REASON_VMFUNC, "VMFUNC" }, \
- { EXIT_REASON_ENCLS, "ENCLS" }, \
- { EXIT_REASON_RDSEED, "RDSEED" }, \
- { EXIT_REASON_PML_FULL, "PML_FULL" }, \
- { EXIT_REASON_XSAVES, "XSAVES" }, \
- { EXIT_REASON_XRSTORS, "XRSTORS" }, \
- { EXIT_REASON_UMWAIT, "UMWAIT" }, \
- { EXIT_REASON_TPAUSE, "TPAUSE" }, \
- { EXIT_REASON_BUS_LOCK, "BUS_LOCK" }, \
- { EXIT_REASON_NOTIFY, "NOTIFY" }, \
+#define VMX_EXIT_REASONS \
+ { EXIT_REASON_EXCEPTION_NMI, "EXCEPTION_NMI" }, { EXIT_REASON_EXTERNAL_INTERRUPT, "EXTERNAL_INTERRUPT" }, \
+ { EXIT_REASON_TRIPLE_FAULT, "TRIPLE_FAULT" }, { EXIT_REASON_INIT_SIGNAL, "INIT_SIGNAL" }, \
+ { EXIT_REASON_SIPI_SIGNAL, "SIPI_SIGNAL" }, { EXIT_REASON_INTERRUPT_WINDOW, "INTERRUPT_WINDOW" }, \
+ { EXIT_REASON_NMI_WINDOW, "NMI_WINDOW" }, { EXIT_REASON_TASK_SWITCH, "TASK_SWITCH" }, \
+ { EXIT_REASON_CPUID, "CPUID" }, { EXIT_REASON_HLT, "HLT" }, { EXIT_REASON_INVD, "INVD" }, \
+ { EXIT_REASON_INVLPG, "INVLPG" }, { EXIT_REASON_RDPMC, "RDPMC" }, { EXIT_REASON_RDTSC, "RDTSC" }, \
+ { EXIT_REASON_VMCALL, "VMCALL" }, { EXIT_REASON_VMCLEAR, "VMCLEAR" }, \
+ { EXIT_REASON_VMLAUNCH, "VMLAUNCH" }, { EXIT_REASON_VMPTRLD, "VMPTRLD" }, \
+ { EXIT_REASON_VMPTRST, "VMPTRST" }, { EXIT_REASON_VMREAD, "VMREAD" }, \
+ { EXIT_REASON_VMRESUME, "VMRESUME" }, { EXIT_REASON_VMWRITE, "VMWRITE" }, \
+ { EXIT_REASON_VMOFF, "VMOFF" }, { EXIT_REASON_VMON, "VMON" }, { EXIT_REASON_CR_ACCESS, "CR_ACCESS" }, \
+ { EXIT_REASON_DR_ACCESS, "DR_ACCESS" }, { EXIT_REASON_IO_INSTRUCTION, "IO_INSTRUCTION" }, \
+ { EXIT_REASON_MSR_READ, "MSR_READ" }, { EXIT_REASON_MSR_WRITE, "MSR_WRITE" }, \
+ { EXIT_REASON_INVALID_STATE, "INVALID_STATE" }, { EXIT_REASON_MSR_LOAD_FAIL, "MSR_LOAD_FAIL" }, \
+ { EXIT_REASON_MWAIT_INSTRUCTION, "MWAIT_INSTRUCTION" }, \
+ { EXIT_REASON_MONITOR_TRAP_FLAG, "MONITOR_TRAP_FLAG" }, \
+ { EXIT_REASON_MONITOR_INSTRUCTION, "MONITOR_INSTRUCTION" }, \
+ { EXIT_REASON_PAUSE_INSTRUCTION, "PAUSE_INSTRUCTION" }, \
+ { EXIT_REASON_MCE_DURING_VMENTRY, "MCE_DURING_VMENTRY" }, \
+ { EXIT_REASON_TPR_BELOW_THRESHOLD, "TPR_BELOW_THRESHOLD" }, \
+ { EXIT_REASON_APIC_ACCESS, "APIC_ACCESS" }, { EXIT_REASON_EOI_INDUCED, "EOI_INDUCED" }, \
+ { EXIT_REASON_GDTR_IDTR, "GDTR_IDTR" }, { EXIT_REASON_LDTR_TR, "LDTR_TR" }, \
+ { EXIT_REASON_EPT_VIOLATION, "EPT_VIOLATION" }, { EXIT_REASON_EPT_MISCONFIG, "EPT_MISCONFIG" }, \
+ { EXIT_REASON_INVEPT, "INVEPT" }, { EXIT_REASON_RDTSCP, "RDTSCP" }, \
+ { EXIT_REASON_PREEMPTION_TIMER, "PREEMPTION_TIMER" }, { EXIT_REASON_INVVPID, "INVVPID" }, \
+ { EXIT_REASON_WBINVD, "WBINVD" }, { EXIT_REASON_XSETBV, "XSETBV" }, \
+ { EXIT_REASON_APIC_WRITE, "APIC_WRITE" }, { EXIT_REASON_RDRAND, "RDRAND" }, \
+ { EXIT_REASON_INVPCID, "INVPCID" }, { EXIT_REASON_VMFUNC, "VMFUNC" }, { EXIT_REASON_ENCLS, "ENCLS" }, \
+ { EXIT_REASON_RDSEED, "RDSEED" }, { EXIT_REASON_PML_FULL, "PML_FULL" }, \
+ { EXIT_REASON_XSAVES, "XSAVES" }, { EXIT_REASON_XRSTORS, "XRSTORS" }, \
+ { EXIT_REASON_UMWAIT, "UMWAIT" }, { EXIT_REASON_TPAUSE, "TPAUSE" }, \
+ { EXIT_REASON_BUS_LOCK, "BUS_LOCK" }, { EXIT_REASON_NOTIFY, "NOTIFY" }, \
{ EXIT_REASON_TDCALL, "TDCALL" }
-#define VMX_EXIT_REASON_FLAGS \
- { VMX_EXIT_REASONS_FAILED_VMENTRY, "FAILED_VMENTRY" }
+#define VMX_EXIT_REASON_FLAGS { VMX_EXIT_REASONS_FAILED_VMENTRY, "FAILED_VMENTRY" }
#define VMX_ABORT_SAVE_GUEST_MSR_FAIL 1
#define VMX_ABORT_LOAD_HOST_PDPTE_FAIL 2
diff --git a/include/arch/x86_64/cxl/features.h b/include/arch/x86_64/cxl/features.h
index c525c9fd..104f31b8 100644
--- a/include/arch/x86_64/cxl/features.h
+++ b/include/arch/x86_64/cxl/features.h
@@ -85,9 +85,8 @@ struct cxl_feat_entry {
* Get supported Features Output Payload
*/
struct cxl_mbox_get_sup_feats_out {
- __struct_group(cxl_mbox_get_sup_feats_out_hdr, hdr, /* no attrs */,
- __le16 num_entries;
- __le16 supported_feats; __u8 reserved[4];);
+ __struct_group(cxl_mbox_get_sup_feats_out_hdr, hdr, /* no attrs */, __le16 num_entries; __le16 supported_feats;
+ __u8 reserved[4];);
struct cxl_feat_entry ents[] __counted_by_le(num_entries);
} __attribute__((__packed__));
@@ -137,10 +136,8 @@ enum cxl_get_feat_selection {
* CXL spec r3.2 section 8.2.9.6.3 Table 8-101
*/
struct cxl_mbox_set_feat_in {
- __struct_group(cxl_mbox_set_feat_hdr, hdr, /* no attrs */,
- __uapi_uuid_t uuid;
- __le32 flags; __le16 offset; __u8 version;
- __u8 rsvd[9];);
+ __struct_group(cxl_mbox_set_feat_hdr, hdr, /* no attrs */, __uapi_uuid_t uuid; __le32 flags; __le16 offset;
+ __u8 version; __u8 rsvd[9];);
__u8 feat_data[];
} __attribute__((packed));
diff --git a/include/arch/x86_64/drm/amdgpu_drm.h b/include/arch/x86_64/drm/amdgpu_drm.h
index b6f422e8..086586df 100644
--- a/include/arch/x86_64/drm/amdgpu_drm.h
+++ b/include/arch/x86_64/drm/amdgpu_drm.h
@@ -58,55 +58,29 @@ extern "C" {
#define DRM_AMDGPU_USERQ_SIGNAL 0x17
#define DRM_AMDGPU_USERQ_WAIT 0x18
-#define DRM_IOCTL_AMDGPU_GEM_CREATE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_CREATE, \
- union drm_amdgpu_gem_create)
-#define DRM_IOCTL_AMDGPU_GEM_MMAP \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_MMAP, \
- union drm_amdgpu_gem_mmap)
-#define DRM_IOCTL_AMDGPU_CTX \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_CTX, union drm_amdgpu_ctx)
-#define DRM_IOCTL_AMDGPU_BO_LIST \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_BO_LIST, \
- union drm_amdgpu_bo_list)
-#define DRM_IOCTL_AMDGPU_CS \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_CS, union drm_amdgpu_cs)
-#define DRM_IOCTL_AMDGPU_INFO \
- DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_INFO, struct drm_amdgpu_info)
-#define DRM_IOCTL_AMDGPU_GEM_METADATA \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_METADATA, \
- struct drm_amdgpu_gem_metadata)
-#define DRM_IOCTL_AMDGPU_GEM_WAIT_IDLE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_WAIT_IDLE, \
- union drm_amdgpu_gem_wait_idle)
-#define DRM_IOCTL_AMDGPU_GEM_VA \
- DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_VA, struct drm_amdgpu_gem_va)
-#define DRM_IOCTL_AMDGPU_WAIT_CS \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_WAIT_CS, \
- union drm_amdgpu_wait_cs)
-#define DRM_IOCTL_AMDGPU_GEM_OP \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_OP, struct drm_amdgpu_gem_op)
-#define DRM_IOCTL_AMDGPU_GEM_USERPTR \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_USERPTR, \
- struct drm_amdgpu_gem_userptr)
-#define DRM_IOCTL_AMDGPU_WAIT_FENCES \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_WAIT_FENCES, \
- union drm_amdgpu_wait_fences)
-#define DRM_IOCTL_AMDGPU_VM \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_VM, union drm_amdgpu_vm)
-#define DRM_IOCTL_AMDGPU_FENCE_TO_HANDLE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_FENCE_TO_HANDLE, \
- union drm_amdgpu_fence_to_handle)
-#define DRM_IOCTL_AMDGPU_SCHED \
- DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_SCHED, union drm_amdgpu_sched)
-#define DRM_IOCTL_AMDGPU_USERQ \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_USERQ, union drm_amdgpu_userq)
-#define DRM_IOCTL_AMDGPU_USERQ_SIGNAL \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_USERQ_SIGNAL, \
- struct drm_amdgpu_userq_signal)
-#define DRM_IOCTL_AMDGPU_USERQ_WAIT \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_USERQ_WAIT, \
- struct drm_amdgpu_userq_wait)
+#define DRM_IOCTL_AMDGPU_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_CREATE, union drm_amdgpu_gem_create)
+#define DRM_IOCTL_AMDGPU_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_MMAP, union drm_amdgpu_gem_mmap)
+#define DRM_IOCTL_AMDGPU_CTX DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_CTX, union drm_amdgpu_ctx)
+#define DRM_IOCTL_AMDGPU_BO_LIST DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_BO_LIST, union drm_amdgpu_bo_list)
+#define DRM_IOCTL_AMDGPU_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_CS, union drm_amdgpu_cs)
+#define DRM_IOCTL_AMDGPU_INFO DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_INFO, struct drm_amdgpu_info)
+#define DRM_IOCTL_AMDGPU_GEM_METADATA \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_METADATA, struct drm_amdgpu_gem_metadata)
+#define DRM_IOCTL_AMDGPU_GEM_WAIT_IDLE \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_WAIT_IDLE, union drm_amdgpu_gem_wait_idle)
+#define DRM_IOCTL_AMDGPU_GEM_VA DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_VA, struct drm_amdgpu_gem_va)
+#define DRM_IOCTL_AMDGPU_WAIT_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_WAIT_CS, union drm_amdgpu_wait_cs)
+#define DRM_IOCTL_AMDGPU_GEM_OP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_OP, struct drm_amdgpu_gem_op)
+#define DRM_IOCTL_AMDGPU_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_USERPTR, struct drm_amdgpu_gem_userptr)
+#define DRM_IOCTL_AMDGPU_WAIT_FENCES DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_WAIT_FENCES, union drm_amdgpu_wait_fences)
+#define DRM_IOCTL_AMDGPU_VM DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_VM, union drm_amdgpu_vm)
+#define DRM_IOCTL_AMDGPU_FENCE_TO_HANDLE \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_FENCE_TO_HANDLE, union drm_amdgpu_fence_to_handle)
+#define DRM_IOCTL_AMDGPU_SCHED DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_SCHED, union drm_amdgpu_sched)
+#define DRM_IOCTL_AMDGPU_USERQ DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_USERQ, union drm_amdgpu_userq)
+#define DRM_IOCTL_AMDGPU_USERQ_SIGNAL \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_USERQ_SIGNAL, struct drm_amdgpu_userq_signal)
+#define DRM_IOCTL_AMDGPU_USERQ_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_USERQ_WAIT, struct drm_amdgpu_userq_wait)
/**
* DOC: memory domains
@@ -141,11 +115,9 @@ extern "C" {
#define AMDGPU_GEM_DOMAIN_GWS 0x10
#define AMDGPU_GEM_DOMAIN_OA 0x20
#define AMDGPU_GEM_DOMAIN_DOORBELL 0x40
-#define AMDGPU_GEM_DOMAIN_MASK \
- (AMDGPU_GEM_DOMAIN_CPU | AMDGPU_GEM_DOMAIN_GTT | \
- AMDGPU_GEM_DOMAIN_VRAM | AMDGPU_GEM_DOMAIN_GDS | \
- AMDGPU_GEM_DOMAIN_GWS | AMDGPU_GEM_DOMAIN_OA | \
- AMDGPU_GEM_DOMAIN_DOORBELL)
+#define AMDGPU_GEM_DOMAIN_MASK \
+ (AMDGPU_GEM_DOMAIN_CPU | AMDGPU_GEM_DOMAIN_GTT | AMDGPU_GEM_DOMAIN_VRAM | AMDGPU_GEM_DOMAIN_GDS | \
+ AMDGPU_GEM_DOMAIN_GWS | AMDGPU_GEM_DOMAIN_OA | AMDGPU_GEM_DOMAIN_DOORBELL)
/* Flag that CPU access will be required for the case of VRAM domain */
#define AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED (1 << 0)
@@ -714,14 +686,11 @@ struct drm_amdgpu_gem_userptr {
#define AMDGPU_TILING_GFX12_SWIZZLE_MODE_MASK 0x7
/* These are DCC recompression settings for memory management: */
#define AMDGPU_TILING_GFX12_DCC_MAX_COMPRESSED_BLOCK_SHIFT 3
-#define AMDGPU_TILING_GFX12_DCC_MAX_COMPRESSED_BLOCK_MASK \
- 0x3 /* 0:64B, 1:128B, 2:256B */
-#define AMDGPU_TILING_GFX12_DCC_NUMBER_TYPE_SHIFT 5
-#define AMDGPU_TILING_GFX12_DCC_NUMBER_TYPE_MASK \
- 0x7 /* CB_COLOR0_INFO.NUMBER_TYPE */
-#define AMDGPU_TILING_GFX12_DCC_DATA_FORMAT_SHIFT 8
-#define AMDGPU_TILING_GFX12_DCC_DATA_FORMAT_MASK \
- 0x3f /* [0:4]:CB_COLOR0_INFO.FORMAT, [5]:MM */
+#define AMDGPU_TILING_GFX12_DCC_MAX_COMPRESSED_BLOCK_MASK 0x3 /* 0:64B, 1:128B, 2:256B */
+#define AMDGPU_TILING_GFX12_DCC_NUMBER_TYPE_SHIFT 5
+#define AMDGPU_TILING_GFX12_DCC_NUMBER_TYPE_MASK 0x7 /* CB_COLOR0_INFO.NUMBER_TYPE */
+#define AMDGPU_TILING_GFX12_DCC_DATA_FORMAT_SHIFT 8
+#define AMDGPU_TILING_GFX12_DCC_DATA_FORMAT_MASK 0x3f /* [0:4]:CB_COLOR0_INFO.FORMAT, [5]:MM */
/* When clearing the buffer or moving it from VRAM to GTT, don't compress and
* set DCC metadata to uncompressed. Set when parts of an allocation bypass DCC
* and read raw data. */
@@ -732,12 +701,10 @@ struct drm_amdgpu_gem_userptr {
#define AMDGPU_TILING_GFX12_SCANOUT_MASK 0x1
/* Set/Get helpers for tiling flags. */
-#define AMDGPU_TILING_SET(field, value) \
- (((__u64)(value) & AMDGPU_TILING_##field##_MASK) \
- << AMDGPU_TILING_##field##_SHIFT)
-#define AMDGPU_TILING_GET(value, field) \
- (((__u64)(value) >> AMDGPU_TILING_##field##_SHIFT) & \
- AMDGPU_TILING_##field##_MASK)
+#define AMDGPU_TILING_SET(field, value) \
+ (((__u64)(value) & AMDGPU_TILING_##field##_MASK) << AMDGPU_TILING_##field##_SHIFT)
+#define AMDGPU_TILING_GET(value, field) \
+ (((__u64)(value) >> AMDGPU_TILING_##field##_SHIFT) & AMDGPU_TILING_##field##_MASK)
#define AMDGPU_GEM_METADATA_OP_SET_METADATA 1
#define AMDGPU_GEM_METADATA_OP_GET_METADATA 2
@@ -1566,8 +1533,7 @@ struct drm_amdgpu_info_vce_clock_table_entry {
};
struct drm_amdgpu_info_vce_clock_table {
- struct drm_amdgpu_info_vce_clock_table_entry
- entries[AMDGPU_VCE_CLOCK_TABLE_ENTRIES];
+ struct drm_amdgpu_info_vce_clock_table_entry entries[AMDGPU_VCE_CLOCK_TABLE_ENTRIES];
__u32 num_valid_entries;
__u32 pad;
};
@@ -1593,8 +1559,7 @@ struct drm_amdgpu_info_video_codec_info {
};
struct drm_amdgpu_info_video_caps {
- struct drm_amdgpu_info_video_codec_info
- codec_info[AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_COUNT];
+ struct drm_amdgpu_info_video_codec_info codec_info[AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_COUNT];
};
#define AMDGPU_VMHUB_TYPE_MASK 0xff
diff --git a/include/arch/x86_64/drm/amdxdna_accel.h b/include/arch/x86_64/drm/amdxdna_accel.h
index 75b74e1d..4064d731 100644
--- a/include/arch/x86_64/drm/amdxdna_accel.h
+++ b/include/arch/x86_64/drm/amdxdna_accel.h
@@ -464,41 +464,27 @@ struct amdxdna_drm_set_power_mode {
__u8 pad[7];
};
-#define DRM_IOCTL_AMDXDNA_CREATE_HWCTX \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_CREATE_HWCTX, \
- struct amdxdna_drm_create_hwctx)
+#define DRM_IOCTL_AMDXDNA_CREATE_HWCTX \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_CREATE_HWCTX, struct amdxdna_drm_create_hwctx)
-#define DRM_IOCTL_AMDXDNA_DESTROY_HWCTX \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_DESTROY_HWCTX, \
- struct amdxdna_drm_destroy_hwctx)
+#define DRM_IOCTL_AMDXDNA_DESTROY_HWCTX \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_DESTROY_HWCTX, struct amdxdna_drm_destroy_hwctx)
-#define DRM_IOCTL_AMDXDNA_CONFIG_HWCTX \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_CONFIG_HWCTX, \
- struct amdxdna_drm_config_hwctx)
+#define DRM_IOCTL_AMDXDNA_CONFIG_HWCTX \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_CONFIG_HWCTX, struct amdxdna_drm_config_hwctx)
-#define DRM_IOCTL_AMDXDNA_CREATE_BO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_CREATE_BO, \
- struct amdxdna_drm_create_bo)
+#define DRM_IOCTL_AMDXDNA_CREATE_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_CREATE_BO, struct amdxdna_drm_create_bo)
-#define DRM_IOCTL_AMDXDNA_GET_BO_INFO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_GET_BO_INFO, \
- struct amdxdna_drm_get_bo_info)
+#define DRM_IOCTL_AMDXDNA_GET_BO_INFO \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_GET_BO_INFO, struct amdxdna_drm_get_bo_info)
-#define DRM_IOCTL_AMDXDNA_SYNC_BO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_SYNC_BO, \
- struct amdxdna_drm_sync_bo)
+#define DRM_IOCTL_AMDXDNA_SYNC_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_SYNC_BO, struct amdxdna_drm_sync_bo)
-#define DRM_IOCTL_AMDXDNA_EXEC_CMD \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_EXEC_CMD, \
- struct amdxdna_drm_exec_cmd)
+#define DRM_IOCTL_AMDXDNA_EXEC_CMD DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_EXEC_CMD, struct amdxdna_drm_exec_cmd)
-#define DRM_IOCTL_AMDXDNA_GET_INFO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_GET_INFO, \
- struct amdxdna_drm_get_info)
+#define DRM_IOCTL_AMDXDNA_GET_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_GET_INFO, struct amdxdna_drm_get_info)
-#define DRM_IOCTL_AMDXDNA_SET_STATE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_SET_STATE, \
- struct amdxdna_drm_set_state)
+#define DRM_IOCTL_AMDXDNA_SET_STATE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_SET_STATE, struct amdxdna_drm_set_state)
#if defined(__cplusplus)
} /* extern c end */
diff --git a/include/arch/x86_64/drm/armada_drm.h b/include/arch/x86_64/drm/armada_drm.h
index 449c9b4f..88d398bf 100644
--- a/include/arch/x86_64/drm/armada_drm.h
+++ b/include/arch/x86_64/drm/armada_drm.h
@@ -20,8 +20,7 @@ extern "C" {
#define DRM_ARMADA_GEM_MMAP 0x02
#define DRM_ARMADA_GEM_PWRITE 0x03
-#define ARMADA_IOCTL(dir, name, str) \
- DRM_##dir(DRM_COMMAND_BASE + DRM_ARMADA_##name, struct drm_armada_##str)
+#define ARMADA_IOCTL(dir, name, str) DRM_##dir(DRM_COMMAND_BASE + DRM_ARMADA_##name, struct drm_armada_##str)
struct drm_armada_gem_create {
__u32 handle;
diff --git a/include/arch/x86_64/drm/asahi_drm.h b/include/arch/x86_64/drm/asahi_drm.h
index bda7ce43..4567b981 100644
--- a/include/arch/x86_64/drm/asahi_drm.h
+++ b/include/arch/x86_64/drm/asahi_drm.h
@@ -1168,9 +1168,8 @@ struct drm_asahi_get_time {
*
* Return: An IOCTL number to be passed to ioctl() from userspace.
*/
-#define DRM_IOCTL_ASAHI(__access, __id, __type) \
- DRM_IO##__access(DRM_COMMAND_BASE + DRM_ASAHI_##__id, \
- struct drm_asahi_##__type)
+#define DRM_IOCTL_ASAHI(__access, __id, __type) \
+ DRM_IO##__access(DRM_COMMAND_BASE + DRM_ASAHI_##__id, struct drm_asahi_##__type)
/* Note: this is an enum so that it can be resolved by Rust bindgen. */
enum {
@@ -1179,16 +1178,11 @@ enum {
DRM_IOCTL_ASAHI_VM_CREATE = DRM_IOCTL_ASAHI(WR, VM_CREATE, vm_create),
DRM_IOCTL_ASAHI_VM_DESTROY = DRM_IOCTL_ASAHI(W, VM_DESTROY, vm_destroy),
DRM_IOCTL_ASAHI_VM_BIND = DRM_IOCTL_ASAHI(W, VM_BIND, vm_bind),
- DRM_IOCTL_ASAHI_GEM_CREATE =
- DRM_IOCTL_ASAHI(WR, GEM_CREATE, gem_create),
- DRM_IOCTL_ASAHI_GEM_MMAP_OFFSET =
- DRM_IOCTL_ASAHI(WR, GEM_MMAP_OFFSET, gem_mmap_offset),
- DRM_IOCTL_ASAHI_GEM_BIND_OBJECT =
- DRM_IOCTL_ASAHI(WR, GEM_BIND_OBJECT, gem_bind_object),
- DRM_IOCTL_ASAHI_QUEUE_CREATE =
- DRM_IOCTL_ASAHI(WR, QUEUE_CREATE, queue_create),
- DRM_IOCTL_ASAHI_QUEUE_DESTROY =
- DRM_IOCTL_ASAHI(W, QUEUE_DESTROY, queue_destroy),
+ DRM_IOCTL_ASAHI_GEM_CREATE = DRM_IOCTL_ASAHI(WR, GEM_CREATE, gem_create),
+ DRM_IOCTL_ASAHI_GEM_MMAP_OFFSET = DRM_IOCTL_ASAHI(WR, GEM_MMAP_OFFSET, gem_mmap_offset),
+ DRM_IOCTL_ASAHI_GEM_BIND_OBJECT = DRM_IOCTL_ASAHI(WR, GEM_BIND_OBJECT, gem_bind_object),
+ DRM_IOCTL_ASAHI_QUEUE_CREATE = DRM_IOCTL_ASAHI(WR, QUEUE_CREATE, queue_create),
+ DRM_IOCTL_ASAHI_QUEUE_DESTROY = DRM_IOCTL_ASAHI(W, QUEUE_DESTROY, queue_destroy),
DRM_IOCTL_ASAHI_SUBMIT = DRM_IOCTL_ASAHI(W, SUBMIT, submit),
};
diff --git a/include/arch/x86_64/drm/drm.h b/include/arch/x86_64/drm/drm.h
index a928f61f..7ba7a721 100644
--- a/include/arch/x86_64/drm/drm.h
+++ b/include/arch/x86_64/drm/drm.h
@@ -167,12 +167,7 @@ struct drm_block {
* \sa drmCtlInstHandler() and drmCtlUninstHandler().
*/
struct drm_control {
- enum {
- DRM_ADD_COMMAND,
- DRM_RM_COMMAND,
- DRM_INST_HANDLER,
- DRM_UNINST_HANDLER
- } func;
+ enum { DRM_ADD_COMMAND, DRM_RM_COMMAND, DRM_INST_HANDLER, DRM_UNINST_HANDLER } func;
int irq;
};
@@ -214,9 +209,9 @@ struct drm_ctx_priv_map {
* \sa drmAddMap().
*/
struct drm_map {
- unsigned long offset; /**< Requested physical address (0 for SAREA)*/
- unsigned long size; /**< Requested physical size (bytes) */
- enum drm_map_type type; /**< Type of memory to map */
+ unsigned long offset; /**< Requested physical address (0 for SAREA)*/
+ unsigned long size; /**< Requested physical size (bytes) */
+ enum drm_map_type type; /**< Type of memory to map */
enum drm_map_flags flags; /**< Flags */
void *handle; /**< User-space: "Handle" to pass to mmap() */
/**< Kernel-space: kernel-virtual address */
@@ -253,7 +248,7 @@ enum drm_stat_type {
_DRM_STAT_DMA, /**< DMA */
_DRM_STAT_SPECIAL, /**< Special DMA (e.g., priority or polled) */
_DRM_STAT_MISSED /**< Missed DMA opportunity */
- /* Add to the *END* of the list */
+ /* Add to the *END* of the list */
};
/*
@@ -332,10 +327,10 @@ struct drm_buf_desc {
int low_mark; /**< Low water mark */
int high_mark; /**< High water mark */
enum {
- _DRM_PAGE_ALIGN = 0x01, /**< Align on page boundaries for DMA */
- _DRM_AGP_BUFFER = 0x02, /**< Buffer is in AGP space */
- _DRM_SG_BUFFER = 0x04, /**< Scatter/gather memory buffer */
- _DRM_FB_BUFFER = 0x08, /**< Buffer is in frame buffer */
+ _DRM_PAGE_ALIGN = 0x01, /**< Align on page boundaries for DMA */
+ _DRM_AGP_BUFFER = 0x02, /**< Buffer is in AGP space */
+ _DRM_SG_BUFFER = 0x04, /**< Scatter/gather memory buffer */
+ _DRM_FB_BUFFER = 0x08, /**< Buffer is in frame buffer */
_DRM_PCI_BUFFER_RO = 0x10 /**< Map PCI DMA buffer read-only */
} flags;
unsigned long agp_start; /**<
@@ -405,10 +400,7 @@ struct drm_dma {
int granted_count; /**< Number of buffers granted */
};
-enum drm_ctx_flags {
- _DRM_CONTEXT_PRESERVED = 0x01,
- _DRM_CONTEXT_2DONLY = 0x02
-};
+enum drm_ctx_flags { _DRM_CONTEXT_PRESERVED = 0x01, _DRM_CONTEXT_2DONLY = 0x02 };
/*
* DRM_IOCTL_ADD_CTX ioctl argument type.
@@ -472,20 +464,18 @@ enum drm_vblank_seq_type {
_DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */
/* bits 1-6 are reserved for high crtcs */
_DRM_VBLANK_HIGH_CRTC_MASK = 0x0000003e,
- _DRM_VBLANK_EVENT = 0x4000000, /**< Send event instead of blocking */
- _DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */
+ _DRM_VBLANK_EVENT = 0x4000000, /**< Send event instead of blocking */
+ _DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */
_DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next
vblank */
- _DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */
- _DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking,
- unsupported */
+ _DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */
+ _DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking,
+ unsupported */
};
#define _DRM_VBLANK_HIGH_CRTC_SHIFT 1
#define _DRM_VBLANK_TYPES_MASK (_DRM_VBLANK_ABSOLUTE | _DRM_VBLANK_RELATIVE)
-#define _DRM_VBLANK_FLAGS_MASK \
- (_DRM_VBLANK_EVENT | _DRM_VBLANK_SIGNAL | _DRM_VBLANK_SECONDARY | \
- _DRM_VBLANK_NEXTONMISS)
+#define _DRM_VBLANK_FLAGS_MASK (_DRM_VBLANK_EVENT | _DRM_VBLANK_SIGNAL | _DRM_VBLANK_SECONDARY | _DRM_VBLANK_NEXTONMISS)
struct drm_wait_vblank_request {
enum drm_vblank_seq_type type;
@@ -925,10 +915,8 @@ struct drm_syncobj_transfer {
#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL (1 << 0)
#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT (1 << 1)
-#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE \
- (1 << 2) /* wait for time point to become available */
-#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_DEADLINE \
- (1 << 3) /* set fence deadline to deadline_nsec */
+#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE (1 << 2) /* wait for time point to become available */
+#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_DEADLINE (1 << 3) /* set fence deadline to deadline_nsec */
struct drm_syncobj_wait {
__u64 handles;
/* absolute timeout */
@@ -994,8 +982,7 @@ struct drm_syncobj_array {
__u32 pad;
};
-#define DRM_SYNCOBJ_QUERY_FLAGS_LAST_SUBMITTED \
- (1 << 0) /* last available point on timeline syncobj */
+#define DRM_SYNCOBJ_QUERY_FLAGS_LAST_SUBMITTED (1 << 0) /* last available point on timeline syncobj */
struct drm_syncobj_timeline_array {
__u64 handles;
__u64 points;
@@ -1015,16 +1002,14 @@ struct drm_crtc_get_sequence {
* when the first pixel of the refresh cycle leaves the display engine
* for the display
*/
-#define DRM_CRTC_SEQUENCE_RELATIVE \
- 0x00000001 /* sequence is relative to current */
-#define DRM_CRTC_SEQUENCE_NEXT_ON_MISS \
- 0x00000002 /* Use next sequence if we've missed */
+#define DRM_CRTC_SEQUENCE_RELATIVE 0x00000001 /* sequence is relative to current */
+#define DRM_CRTC_SEQUENCE_NEXT_ON_MISS 0x00000002 /* Use next sequence if we've missed */
struct drm_crtc_queue_sequence {
__u32 crtc_id;
__u32 flags;
- __u64 sequence; /* on input, target sequence. on output, actual sequence
- */
+ __u64 sequence; /* on input, target sequence. on output, actual sequence
+ */
__u64 user_data; /* user data passed to event */
};
@@ -1159,9 +1144,8 @@ extern "C" {
#define DRM_IOCTL_WAIT_VBLANK DRM_IOWR(0x3a, union drm_wait_vblank)
-#define DRM_IOCTL_CRTC_GET_SEQUENCE DRM_IOWR(0x3b, struct drm_crtc_get_sequence)
-#define DRM_IOCTL_CRTC_QUEUE_SEQUENCE \
- DRM_IOWR(0x3c, struct drm_crtc_queue_sequence)
+#define DRM_IOCTL_CRTC_GET_SEQUENCE DRM_IOWR(0x3b, struct drm_crtc_get_sequence)
+#define DRM_IOCTL_CRTC_QUEUE_SEQUENCE DRM_IOWR(0x3c, struct drm_crtc_queue_sequence)
#define DRM_IOCTL_UPDATE_DRAW DRM_IOW(0x3f, struct drm_update_draw)
@@ -1172,8 +1156,7 @@ extern "C" {
#define DRM_IOCTL_MODE_GETGAMMA DRM_IOWR(0xA4, struct drm_mode_crtc_lut)
#define DRM_IOCTL_MODE_SETGAMMA DRM_IOWR(0xA5, struct drm_mode_crtc_lut)
#define DRM_IOCTL_MODE_GETENCODER DRM_IOWR(0xA6, struct drm_mode_get_encoder)
-#define DRM_IOCTL_MODE_GETCONNECTOR \
- DRM_IOWR(0xA7, struct drm_mode_get_connector)
+#define DRM_IOCTL_MODE_GETCONNECTOR DRM_IOWR(0xA7, struct drm_mode_get_connector)
#define DRM_IOCTL_MODE_ATTACHMODE \
DRM_IOWR(0xA8, struct drm_mode_mode_cmd) /* deprecated (never worked) \
*/
@@ -1182,8 +1165,7 @@ extern "C" {
*/
#define DRM_IOCTL_MODE_GETPROPERTY DRM_IOWR(0xAA, struct drm_mode_get_property)
-#define DRM_IOCTL_MODE_SETPROPERTY \
- DRM_IOWR(0xAB, struct drm_mode_connector_set_property)
+#define DRM_IOCTL_MODE_SETPROPERTY DRM_IOWR(0xAB, struct drm_mode_connector_set_property)
#define DRM_IOCTL_MODE_GETPROPBLOB DRM_IOWR(0xAC, struct drm_mode_get_blob)
#define DRM_IOCTL_MODE_GETFB DRM_IOWR(0xAD, struct drm_mode_fb_cmd)
#define DRM_IOCTL_MODE_ADDFB DRM_IOWR(0xAE, struct drm_mode_fb_cmd)
@@ -1221,24 +1203,19 @@ extern "C" {
* &DRM_CAP_DUMB_PREFERRED_DEPTH and &DRM_CAP_DUMB_PREFER_SHADOW indicate
* driver preferences for dumb buffers.
*/
-#define DRM_IOCTL_MODE_CREATE_DUMB DRM_IOWR(0xB2, struct drm_mode_create_dumb)
-#define DRM_IOCTL_MODE_MAP_DUMB DRM_IOWR(0xB3, struct drm_mode_map_dumb)
-#define DRM_IOCTL_MODE_DESTROY_DUMB DRM_IOWR(0xB4, struct drm_mode_destroy_dumb)
-#define DRM_IOCTL_MODE_GETPLANERESOURCES \
- DRM_IOWR(0xB5, struct drm_mode_get_plane_res)
-#define DRM_IOCTL_MODE_GETPLANE DRM_IOWR(0xB6, struct drm_mode_get_plane)
-#define DRM_IOCTL_MODE_SETPLANE DRM_IOWR(0xB7, struct drm_mode_set_plane)
-#define DRM_IOCTL_MODE_ADDFB2 DRM_IOWR(0xB8, struct drm_mode_fb_cmd2)
-#define DRM_IOCTL_MODE_OBJ_GETPROPERTIES \
- DRM_IOWR(0xB9, struct drm_mode_obj_get_properties)
-#define DRM_IOCTL_MODE_OBJ_SETPROPERTY \
- DRM_IOWR(0xBA, struct drm_mode_obj_set_property)
-#define DRM_IOCTL_MODE_CURSOR2 DRM_IOWR(0xBB, struct drm_mode_cursor2)
-#define DRM_IOCTL_MODE_ATOMIC DRM_IOWR(0xBC, struct drm_mode_atomic)
-#define DRM_IOCTL_MODE_CREATEPROPBLOB \
- DRM_IOWR(0xBD, struct drm_mode_create_blob)
-#define DRM_IOCTL_MODE_DESTROYPROPBLOB \
- DRM_IOWR(0xBE, struct drm_mode_destroy_blob)
+#define DRM_IOCTL_MODE_CREATE_DUMB DRM_IOWR(0xB2, struct drm_mode_create_dumb)
+#define DRM_IOCTL_MODE_MAP_DUMB DRM_IOWR(0xB3, struct drm_mode_map_dumb)
+#define DRM_IOCTL_MODE_DESTROY_DUMB DRM_IOWR(0xB4, struct drm_mode_destroy_dumb)
+#define DRM_IOCTL_MODE_GETPLANERESOURCES DRM_IOWR(0xB5, struct drm_mode_get_plane_res)
+#define DRM_IOCTL_MODE_GETPLANE DRM_IOWR(0xB6, struct drm_mode_get_plane)
+#define DRM_IOCTL_MODE_SETPLANE DRM_IOWR(0xB7, struct drm_mode_set_plane)
+#define DRM_IOCTL_MODE_ADDFB2 DRM_IOWR(0xB8, struct drm_mode_fb_cmd2)
+#define DRM_IOCTL_MODE_OBJ_GETPROPERTIES DRM_IOWR(0xB9, struct drm_mode_obj_get_properties)
+#define DRM_IOCTL_MODE_OBJ_SETPROPERTY DRM_IOWR(0xBA, struct drm_mode_obj_set_property)
+#define DRM_IOCTL_MODE_CURSOR2 DRM_IOWR(0xBB, struct drm_mode_cursor2)
+#define DRM_IOCTL_MODE_ATOMIC DRM_IOWR(0xBC, struct drm_mode_atomic)
+#define DRM_IOCTL_MODE_CREATEPROPBLOB DRM_IOWR(0xBD, struct drm_mode_create_blob)
+#define DRM_IOCTL_MODE_DESTROYPROPBLOB DRM_IOWR(0xBE, struct drm_mode_destroy_blob)
#define DRM_IOCTL_SYNCOBJ_CREATE DRM_IOWR(0xBF, struct drm_syncobj_create)
#define DRM_IOCTL_SYNCOBJ_DESTROY DRM_IOWR(0xC0, struct drm_syncobj_destroy)
@@ -1253,13 +1230,10 @@ extern "C" {
#define DRM_IOCTL_MODE_GET_LEASE DRM_IOWR(0xC8, struct drm_mode_get_lease)
#define DRM_IOCTL_MODE_REVOKE_LEASE DRM_IOWR(0xC9, struct drm_mode_revoke_lease)
-#define DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT \
- DRM_IOWR(0xCA, struct drm_syncobj_timeline_wait)
-#define DRM_IOCTL_SYNCOBJ_QUERY \
- DRM_IOWR(0xCB, struct drm_syncobj_timeline_array)
-#define DRM_IOCTL_SYNCOBJ_TRANSFER DRM_IOWR(0xCC, struct drm_syncobj_transfer)
-#define DRM_IOCTL_SYNCOBJ_TIMELINE_SIGNAL \
- DRM_IOWR(0xCD, struct drm_syncobj_timeline_array)
+#define DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT DRM_IOWR(0xCA, struct drm_syncobj_timeline_wait)
+#define DRM_IOCTL_SYNCOBJ_QUERY DRM_IOWR(0xCB, struct drm_syncobj_timeline_array)
+#define DRM_IOCTL_SYNCOBJ_TRANSFER DRM_IOWR(0xCC, struct drm_syncobj_transfer)
+#define DRM_IOCTL_SYNCOBJ_TIMELINE_SIGNAL DRM_IOWR(0xCD, struct drm_syncobj_timeline_array)
/**
* DRM_IOCTL_MODE_GETFB2 - Get framebuffer metadata.
diff --git a/include/arch/x86_64/drm/drm_fourcc.h b/include/arch/x86_64/drm/drm_fourcc.h
index b37e02b3..0f3d05c0 100644
--- a/include/arch/x86_64/drm/drm_fourcc.h
+++ b/include/arch/x86_64/drm/drm_fourcc.h
@@ -102,12 +102,9 @@ extern "C" {
* stacks should approve additions.
*/
-#define fourcc_code(a, b, c, d) \
- ((__u32)(a) | ((__u32)(b) << 8) | ((__u32)(c) << 16) | \
- ((__u32)(d) << 24))
+#define fourcc_code(a, b, c, d) ((__u32)(a) | ((__u32)(b) << 8) | ((__u32)(c) << 16) | ((__u32)(d) << 24))
-#define DRM_FORMAT_BIG_ENDIAN \
- (1U << 31) /* format is big endian instead of little endian */
+#define DRM_FORMAT_BIG_ENDIAN (1U << 31) /* format is big endian instead of little endian */
/* Reserve 0 for the invalid format specifier */
#define DRM_FORMAT_INVALID 0
@@ -117,11 +114,10 @@ extern "C" {
fourcc_code('C', '1', ' ', ' ') /* [7:0] C0:C1:C2:C3:C4:C5:C6:C7 \
1:1:1:1:1:1:1:1 eight pixels/byte \
*/
-#define DRM_FORMAT_C2 \
- fourcc_code('C', '2', ' ', ' ') /* [7:0] C0:C1:C2:C3 2:2:2:2 four \
- pixels/byte */
-#define DRM_FORMAT_C4 \
- fourcc_code('C', '4', ' ', ' ') /* [7:0] C0:C1 4:4 two pixels/byte */
+#define DRM_FORMAT_C2 \
+ fourcc_code('C', '2', ' ', ' ') /* [7:0] C0:C1:C2:C3 2:2:2:2 four \
+ pixels/byte */
+#define DRM_FORMAT_C4 fourcc_code('C', '4', ' ', ' ') /* [7:0] C0:C1 4:4 two pixels/byte */
#define DRM_FORMAT_C8 fourcc_code('C', '8', ' ', ' ') /* [7:0] C */
/* 1 bpp Darkness (inverse relationship between channel value and brightness) */
@@ -136,8 +132,7 @@ extern "C" {
pixels/byte */
/* 4 bpp Darkness (inverse relationship between channel value and brightness) */
-#define DRM_FORMAT_D4 \
- fourcc_code('D', '4', ' ', ' ') /* [7:0] D0:D1 4:4 two pixels/byte */
+#define DRM_FORMAT_D4 fourcc_code('D', '4', ' ', ' ') /* [7:0] D0:D1 4:4 two pixels/byte */
/* 8 bpp Darkness (inverse relationship between channel value and brightness) */
#define DRM_FORMAT_D8 fourcc_code('D', '8', ' ', ' ') /* [7:0] D */
@@ -154,41 +149,31 @@ extern "C" {
pixels/byte */
/* 4 bpp Red (direct relationship between channel value and brightness) */
-#define DRM_FORMAT_R4 \
- fourcc_code('R', '4', ' ', ' ') /* [7:0] R0:R1 4:4 two pixels/byte */
+#define DRM_FORMAT_R4 fourcc_code('R', '4', ' ', ' ') /* [7:0] R0:R1 4:4 two pixels/byte */
/* 8 bpp Red (direct relationship between channel value and brightness) */
#define DRM_FORMAT_R8 fourcc_code('R', '8', ' ', ' ') /* [7:0] R */
/* 10 bpp Red (direct relationship between channel value and brightness) */
-#define DRM_FORMAT_R10 \
- fourcc_code('R', '1', '0', ' ') /* [15:0] x:R 6:10 little endian */
+#define DRM_FORMAT_R10 fourcc_code('R', '1', '0', ' ') /* [15:0] x:R 6:10 little endian */
/* 12 bpp Red (direct relationship between channel value and brightness) */
-#define DRM_FORMAT_R12 \
- fourcc_code('R', '1', '2', ' ') /* [15:0] x:R 4:12 little endian */
+#define DRM_FORMAT_R12 fourcc_code('R', '1', '2', ' ') /* [15:0] x:R 4:12 little endian */
/* 16 bpp Red (direct relationship between channel value and brightness) */
-#define DRM_FORMAT_R16 \
- fourcc_code('R', '1', '6', ' ') /* [15:0] R little endian */
+#define DRM_FORMAT_R16 fourcc_code('R', '1', '6', ' ') /* [15:0] R little endian */
/* 16 bpp RG */
-#define DRM_FORMAT_RG88 \
- fourcc_code('R', 'G', '8', '8') /* [15:0] R:G 8:8 little endian */
-#define DRM_FORMAT_GR88 \
- fourcc_code('G', 'R', '8', '8') /* [15:0] G:R 8:8 little endian */
+#define DRM_FORMAT_RG88 fourcc_code('R', 'G', '8', '8') /* [15:0] R:G 8:8 little endian */
+#define DRM_FORMAT_GR88 fourcc_code('G', 'R', '8', '8') /* [15:0] G:R 8:8 little endian */
/* 32 bpp RG */
-#define DRM_FORMAT_RG1616 \
- fourcc_code('R', 'G', '3', '2') /* [31:0] R:G 16:16 little endian */
-#define DRM_FORMAT_GR1616 \
- fourcc_code('G', 'R', '3', '2') /* [31:0] G:R 16:16 little endian */
+#define DRM_FORMAT_RG1616 fourcc_code('R', 'G', '3', '2') /* [31:0] R:G 16:16 little endian */
+#define DRM_FORMAT_GR1616 fourcc_code('G', 'R', '3', '2') /* [31:0] G:R 16:16 little endian */
/* 8 bpp RGB */
-#define DRM_FORMAT_RGB332 \
- fourcc_code('R', 'G', 'B', '8') /* [7:0] R:G:B 3:3:2 */
-#define DRM_FORMAT_BGR233 \
- fourcc_code('B', 'G', 'R', '8') /* [7:0] B:G:R 2:3:3 */
+#define DRM_FORMAT_RGB332 fourcc_code('R', 'G', 'B', '8') /* [7:0] R:G:B 3:3:2 */
+#define DRM_FORMAT_BGR233 fourcc_code('B', 'G', 'R', '8') /* [7:0] B:G:R 2:3:3 */
/* 16 bpp RGB */
#define DRM_FORMAT_XRGB4444 \
@@ -243,16 +228,12 @@ extern "C" {
fourcc_code('B', 'A', '1', '5') /* [15:0] B:G:R:A 5:5:5:1 little \
endian */
-#define DRM_FORMAT_RGB565 \
- fourcc_code('R', 'G', '1', '6') /* [15:0] R:G:B 5:6:5 little endian */
-#define DRM_FORMAT_BGR565 \
- fourcc_code('B', 'G', '1', '6') /* [15:0] B:G:R 5:6:5 little endian */
+#define DRM_FORMAT_RGB565 fourcc_code('R', 'G', '1', '6') /* [15:0] R:G:B 5:6:5 little endian */
+#define DRM_FORMAT_BGR565 fourcc_code('B', 'G', '1', '6') /* [15:0] B:G:R 5:6:5 little endian */
/* 24 bpp RGB */
-#define DRM_FORMAT_RGB888 \
- fourcc_code('R', 'G', '2', '4') /* [23:0] R:G:B little endian */
-#define DRM_FORMAT_BGR888 \
- fourcc_code('B', 'G', '2', '4') /* [23:0] B:G:R little endian */
+#define DRM_FORMAT_RGB888 fourcc_code('R', 'G', '2', '4') /* [23:0] R:G:B little endian */
+#define DRM_FORMAT_BGR888 fourcc_code('B', 'G', '2', '4') /* [23:0] B:G:R little endian */
/* 32 bpp RGB */
#define DRM_FORMAT_XRGB8888 \
@@ -349,10 +330,8 @@ extern "C" {
fourcc_code('A', 'B', '4', 'H') /* [63:0] A:B:G:R 16:16:16:16 little \
endian */
-#define DRM_FORMAT_R16F \
- fourcc_code('R', ' ', ' ', 'H') /* [15:0] R 16 little endian */
-#define DRM_FORMAT_GR1616F \
- fourcc_code('G', 'R', ' ', 'H') /* [31:0] G:R 16:16 little endian */
+#define DRM_FORMAT_R16F fourcc_code('R', ' ', ' ', 'H') /* [15:0] R 16 little endian */
+#define DRM_FORMAT_GR1616F fourcc_code('G', 'R', ' ', 'H') /* [31:0] G:R 16:16 little endian */
#define DRM_FORMAT_BGR161616F \
fourcc_code('B', 'G', 'R', 'H') /* [47:0] B:G:R 16:16:16 little endian \
*/
@@ -362,10 +341,8 @@ extern "C" {
* IEEE 754-2008 binary32 float
* [31:0] sign:exponent:mantissa 1:8:23
*/
-#define DRM_FORMAT_R32F \
- fourcc_code('R', ' ', ' ', 'F') /* [31:0] R 32 little endian */
-#define DRM_FORMAT_GR3232F \
- fourcc_code('G', 'R', ' ', 'F') /* [63:0] R:G 32:32 little endian */
+#define DRM_FORMAT_R32F fourcc_code('R', ' ', ' ', 'F') /* [31:0] R 32 little endian */
+#define DRM_FORMAT_GR3232F fourcc_code('G', 'R', ' ', 'F') /* [63:0] R:G 32:32 little endian */
#define DRM_FORMAT_BGR323232F \
fourcc_code('B', 'G', 'R', 'F') /* [95:0] R:G:B 32:32:32 little endian \
*/
@@ -505,29 +482,20 @@ extern "C" {
* or
* index 1 = Cb:Cr plane, [15:0] Cb:Cr little endian
*/
-#define DRM_FORMAT_NV12 \
- fourcc_code('N', 'V', '1', '2') /* 2x2 subsampled Cr:Cb plane */
-#define DRM_FORMAT_NV21 \
- fourcc_code('N', 'V', '2', '1') /* 2x2 subsampled Cb:Cr plane */
-#define DRM_FORMAT_NV16 \
- fourcc_code('N', 'V', '1', '6') /* 2x1 subsampled Cr:Cb plane */
-#define DRM_FORMAT_NV61 \
- fourcc_code('N', 'V', '6', '1') /* 2x1 subsampled Cb:Cr plane */
-#define DRM_FORMAT_NV24 \
- fourcc_code('N', 'V', '2', '4') /* non-subsampled Cr:Cb plane */
-#define DRM_FORMAT_NV42 \
- fourcc_code('N', 'V', '4', '2') /* non-subsampled Cb:Cr plane */
+#define DRM_FORMAT_NV12 fourcc_code('N', 'V', '1', '2') /* 2x2 subsampled Cr:Cb plane */
+#define DRM_FORMAT_NV21 fourcc_code('N', 'V', '2', '1') /* 2x2 subsampled Cb:Cr plane */
+#define DRM_FORMAT_NV16 fourcc_code('N', 'V', '1', '6') /* 2x1 subsampled Cr:Cb plane */
+#define DRM_FORMAT_NV61 fourcc_code('N', 'V', '6', '1') /* 2x1 subsampled Cb:Cr plane */
+#define DRM_FORMAT_NV24 fourcc_code('N', 'V', '2', '4') /* non-subsampled Cr:Cb plane */
+#define DRM_FORMAT_NV42 fourcc_code('N', 'V', '4', '2') /* non-subsampled Cb:Cr plane */
/*
* 2 plane YCbCr
* index 0 = Y plane, [39:0] Y3:Y2:Y1:Y0 little endian
* index 1 = Cr:Cb plane, [39:0] Cr1:Cb1:Cr0:Cb0 little endian
*/
-#define DRM_FORMAT_NV15 \
- fourcc_code('N', 'V', '1', '5') /* 2x2 subsampled Cr:Cb plane */
-#define DRM_FORMAT_NV20 \
- fourcc_code('N', 'V', '2', '0') /* 2x1 subsampled Cr:Cb plane */
-#define DRM_FORMAT_NV30 \
- fourcc_code('N', 'V', '3', '0') /* non-subsampled Cr:Cb plane */
+#define DRM_FORMAT_NV15 fourcc_code('N', 'V', '1', '5') /* 2x2 subsampled Cr:Cb plane */
+#define DRM_FORMAT_NV20 fourcc_code('N', 'V', '2', '0') /* 2x1 subsampled Cr:Cb plane */
+#define DRM_FORMAT_NV30 fourcc_code('N', 'V', '3', '0') /* non-subsampled Cr:Cb plane */
/*
* 2 plane YCbCr MSB aligned
@@ -717,12 +685,9 @@ extern "C" {
#define fourcc_mod_get_vendor(modifier) (((modifier) >> 56) & 0xff)
-#define fourcc_mod_is_vendor(modifier, vendor) \
- (fourcc_mod_get_vendor(modifier) == DRM_FORMAT_MOD_VENDOR_##vendor)
+#define fourcc_mod_is_vendor(modifier, vendor) (fourcc_mod_get_vendor(modifier) == DRM_FORMAT_MOD_VENDOR_##vendor)
-#define fourcc_mod_code(vendor, val) \
- ((((__u64)DRM_FORMAT_MOD_VENDOR_##vendor) << 56) | \
- ((val) & 0x00ffffffffffffffULL))
+#define fourcc_mod_code(vendor, val) ((((__u64)DRM_FORMAT_MOD_VENDOR_##vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
/*
* Format Modifier tokens:
@@ -1242,10 +1207,9 @@ extern "C" {
*
* 55:28 - Reserved for future use. Must be zero.
*/
-#define DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(c, s, g, k, h) \
- fourcc_mod_code(NVIDIA, (0x10 | ((h) & 0xf) | (((k) & 0xff) << 12) | \
- (((g) & 0x3) << 20) | (((s) & 0x1) << 22) | \
- (((s) & 0x6) << 25) | (((c) & 0x7) << 23)))
+#define DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(c, s, g, k, h) \
+ fourcc_mod_code(NVIDIA, (0x10 | ((h) & 0xf) | (((k) & 0xff) << 12) | (((g) & 0x3) << 20) | \
+ (((s) & 0x1) << 22) | (((s) & 0x6) << 25) | (((c) & 0x7) << 23)))
/* To grandfather in prior block linear format modifiers to the above layout,
* the page kind "0", which corresponds to "pitch/linear" and hence is unusable
@@ -1253,8 +1217,7 @@ extern "C" {
* which corresponds to the "generic" kind used for simple single-sample
* uncompressed color formats on Fermi - Volta GPUs.
*/
-static __inline__ __u64
-drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)
+static __inline__ __u64 drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)
{
if (!(modifier & 0x10) || (modifier & (0xff << 12)))
return modifier;
@@ -1283,21 +1246,14 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)
* Chapter 20 "Pixel Memory Formats" of the Tegra X1 TRM describes this format
* in full detail.
*/
-#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(v) \
- DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(0, 0, 0, 0, (v))
+#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(v) DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(0, 0, 0, 0, (v))
-#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_ONE_GOB \
- DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(0)
-#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_TWO_GOB \
- DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(1)
-#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_FOUR_GOB \
- DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(2)
-#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_EIGHT_GOB \
- DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(3)
-#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_SIXTEEN_GOB \
- DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(4)
-#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_THIRTYTWO_GOB \
- DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(5)
+#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_ONE_GOB DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(0)
+#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_TWO_GOB DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(1)
+#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_FOUR_GOB DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(2)
+#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_EIGHT_GOB DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(3)
+#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_SIXTEEN_GOB DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(4)
+#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_THIRTYTWO_GOB DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(5)
/*
* Some Broadcom modifiers take parameters, for example the number of
@@ -1307,16 +1263,12 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)
*/
#define __fourcc_mod_broadcom_param_shift 8
#define __fourcc_mod_broadcom_param_bits 48
-#define fourcc_mod_broadcom_code(val, params) \
- fourcc_mod_code(BROADCOM, ((((__u64)params) \
- << __fourcc_mod_broadcom_param_shift) | \
- val))
-#define fourcc_mod_broadcom_param(m) \
- ((int)(((m) >> __fourcc_mod_broadcom_param_shift) & \
- ((1ULL << __fourcc_mod_broadcom_param_bits) - 1)))
-#define fourcc_mod_broadcom_mod(m) \
- ((m) & ~(((1ULL << __fourcc_mod_broadcom_param_bits) - 1) \
- << __fourcc_mod_broadcom_param_shift))
+#define fourcc_mod_broadcom_code(val, params) \
+ fourcc_mod_code(BROADCOM, ((((__u64)params) << __fourcc_mod_broadcom_param_shift) | val))
+#define fourcc_mod_broadcom_param(m) \
+ ((int)(((m) >> __fourcc_mod_broadcom_param_shift) & ((1ULL << __fourcc_mod_broadcom_param_bits) - 1)))
+#define fourcc_mod_broadcom_mod(m) \
+ ((m) & ~(((1ULL << __fourcc_mod_broadcom_param_bits) - 1) << __fourcc_mod_broadcom_param_shift))
/*
* Broadcom VC4 "T" format
@@ -1367,23 +1319,15 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)
* wide, but as this is a 10 bpp format that translates to 96 pixels.
*/
-#define DRM_FORMAT_MOD_BROADCOM_SAND32_COL_HEIGHT(v) \
- fourcc_mod_broadcom_code(2, v)
-#define DRM_FORMAT_MOD_BROADCOM_SAND64_COL_HEIGHT(v) \
- fourcc_mod_broadcom_code(3, v)
-#define DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT(v) \
- fourcc_mod_broadcom_code(4, v)
-#define DRM_FORMAT_MOD_BROADCOM_SAND256_COL_HEIGHT(v) \
- fourcc_mod_broadcom_code(5, v)
-
-#define DRM_FORMAT_MOD_BROADCOM_SAND32 \
- DRM_FORMAT_MOD_BROADCOM_SAND32_COL_HEIGHT(0)
-#define DRM_FORMAT_MOD_BROADCOM_SAND64 \
- DRM_FORMAT_MOD_BROADCOM_SAND64_COL_HEIGHT(0)
-#define DRM_FORMAT_MOD_BROADCOM_SAND128 \
- DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT(0)
-#define DRM_FORMAT_MOD_BROADCOM_SAND256 \
- DRM_FORMAT_MOD_BROADCOM_SAND256_COL_HEIGHT(0)
+#define DRM_FORMAT_MOD_BROADCOM_SAND32_COL_HEIGHT(v) fourcc_mod_broadcom_code(2, v)
+#define DRM_FORMAT_MOD_BROADCOM_SAND64_COL_HEIGHT(v) fourcc_mod_broadcom_code(3, v)
+#define DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT(v) fourcc_mod_broadcom_code(4, v)
+#define DRM_FORMAT_MOD_BROADCOM_SAND256_COL_HEIGHT(v) fourcc_mod_broadcom_code(5, v)
+
+#define DRM_FORMAT_MOD_BROADCOM_SAND32 DRM_FORMAT_MOD_BROADCOM_SAND32_COL_HEIGHT(0)
+#define DRM_FORMAT_MOD_BROADCOM_SAND64 DRM_FORMAT_MOD_BROADCOM_SAND64_COL_HEIGHT(0)
+#define DRM_FORMAT_MOD_BROADCOM_SAND128 DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT(0)
+#define DRM_FORMAT_MOD_BROADCOM_SAND256 DRM_FORMAT_MOD_BROADCOM_SAND256_COL_HEIGHT(0)
/* Broadcom UIF format
*
@@ -1427,15 +1371,13 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)
* categories of modifiers ie AFBC, MISC and AFRC. We can have a maximum of
* sixteen different categories.
*/
-#define DRM_FORMAT_MOD_ARM_CODE(__type, __val) \
- fourcc_mod_code(ARM, ((__u64)(__type) << 52) | \
- ((__val) & 0x000fffffffffffffULL))
+#define DRM_FORMAT_MOD_ARM_CODE(__type, __val) \
+ fourcc_mod_code(ARM, ((__u64)(__type) << 52) | ((__val) & 0x000fffffffffffffULL))
#define DRM_FORMAT_MOD_ARM_TYPE_AFBC 0x00
#define DRM_FORMAT_MOD_ARM_TYPE_MISC 0x01
-#define DRM_FORMAT_MOD_ARM_AFBC(__afbc_mode) \
- DRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_AFBC, __afbc_mode)
+#define DRM_FORMAT_MOD_ARM_AFBC(__afbc_mode) DRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_AFBC, __afbc_mode)
/*
* AFBC superblock size
@@ -1606,8 +1548,7 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)
#define DRM_FORMAT_MOD_ARM_TYPE_AFRC 0x02
-#define DRM_FORMAT_MOD_ARM_AFRC(__afrc_mode) \
- DRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_AFRC, __afrc_mode)
+#define DRM_FORMAT_MOD_ARM_AFRC(__afrc_mode) DRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_AFRC, __afrc_mode)
/*
* AFRC coding unit size modifier.
@@ -1656,8 +1597,7 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)
* into 16x16 pixel blocks. Blocks are stored linearly in order, but pixels
* in the block are reordered.
*/
-#define DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED \
- DRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_MISC, 1ULL)
+#define DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED DRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_MISC, 1ULL)
/*
* Allwinner tiled modifier
@@ -1698,12 +1638,10 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)
#define __fourcc_mod_amlogic_options_shift 8
#define __fourcc_mod_amlogic_options_mask 0xff
-#define DRM_FORMAT_MOD_AMLOGIC_FBC(__layout, __options) \
- fourcc_mod_code( \
- AMLOGIC, \
- ((__layout) & __fourcc_mod_amlogic_layout_mask) | \
- (((__options) & __fourcc_mod_amlogic_options_mask) \
- << __fourcc_mod_amlogic_options_shift))
+#define DRM_FORMAT_MOD_AMLOGIC_FBC(__layout, __options) \
+ fourcc_mod_code(AMLOGIC, ((__layout) & __fourcc_mod_amlogic_layout_mask) | \
+ (((__options) & __fourcc_mod_amlogic_options_mask) \
+ << __fourcc_mod_amlogic_options_shift))
/* Amlogic FBC Layouts */
@@ -1792,8 +1730,7 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)
#define MTK_FMT_MOD_10BIT_LAYOUT_LSBRASTER (0x2 << 16)
/* alias for the most common tiling format */
-#define DRM_FORMAT_MOD_MTK_16L_32S_TILE \
- DRM_FORMAT_MOD_MTK(MTK_FMT_MOD_TILE_16L32S)
+#define DRM_FORMAT_MOD_MTK_16L_32S_TILE DRM_FORMAT_MOD_MTK(MTK_FMT_MOD_TILE_16L32S)
/*
* Apple GPU-tiled layouts.
@@ -1988,12 +1925,9 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)
#define AMD_FMT_MOD_PIPE_SHIFT 33
#define AMD_FMT_MOD_PIPE_MASK 0x7
-#define AMD_FMT_MOD_SET(field, value) \
- ((__u64)(value) << AMD_FMT_MOD_##field##_SHIFT)
-#define AMD_FMT_MOD_GET(field, value) \
- (((value) >> AMD_FMT_MOD_##field##_SHIFT) & AMD_FMT_MOD_##field##_MASK)
-#define AMD_FMT_MOD_CLEAR(field) \
- (~((__u64)AMD_FMT_MOD_##field##_MASK << AMD_FMT_MOD_##field##_SHIFT))
+#define AMD_FMT_MOD_SET(field, value) ((__u64)(value) << AMD_FMT_MOD_##field##_SHIFT)
+#define AMD_FMT_MOD_GET(field, value) (((value) >> AMD_FMT_MOD_##field##_SHIFT) & AMD_FMT_MOD_##field##_MASK)
+#define AMD_FMT_MOD_CLEAR(field) (~((__u64)AMD_FMT_MOD_##field##_MASK << AMD_FMT_MOD_##field##_SHIFT))
#if defined(__cplusplus)
}
diff --git a/include/arch/x86_64/drm/drm_mode.h b/include/arch/x86_64/drm/drm_mode.h
index 8517ff0c..8881cfc1 100644
--- a/include/arch/x86_64/drm/drm_mode.h
+++ b/include/arch/x86_64/drm/drm_mode.h
@@ -46,9 +46,8 @@ extern "C" {
#define DRM_DISPLAY_MODE_LEN 32
#define DRM_PROP_NAME_LEN 32
-#define DRM_MODE_TYPE_BUILTIN (1 << 0) /* deprecated */
-#define DRM_MODE_TYPE_CLOCK_C \
- ((1 << 1) | DRM_MODE_TYPE_BUILTIN) /* deprecated */
+#define DRM_MODE_TYPE_BUILTIN (1 << 0) /* deprecated */
+#define DRM_MODE_TYPE_CLOCK_C ((1 << 1) | DRM_MODE_TYPE_BUILTIN) /* deprecated */
#define DRM_MODE_TYPE_CRTC_C \
((1 << 2) | DRM_MODE_TYPE_BUILTIN) /* deprecated \
*/
@@ -57,8 +56,7 @@ extern "C" {
#define DRM_MODE_TYPE_USERDEF (1 << 5)
#define DRM_MODE_TYPE_DRIVER (1 << 6)
-#define DRM_MODE_TYPE_ALL \
- (DRM_MODE_TYPE_PREFERRED | DRM_MODE_TYPE_USERDEF | DRM_MODE_TYPE_DRIVER)
+#define DRM_MODE_TYPE_ALL (DRM_MODE_TYPE_PREFERRED | DRM_MODE_TYPE_USERDEF | DRM_MODE_TYPE_DRIVER)
/* Video mode flags */
/* bit compatible with the xrandr RR_ definitions (bits 0-13)
@@ -121,12 +119,11 @@ extern "C" {
#define DRM_MODE_FLAG_PIC_AR_64_27 (DRM_MODE_PICTURE_ASPECT_64_27 << 19)
#define DRM_MODE_FLAG_PIC_AR_256_135 (DRM_MODE_PICTURE_ASPECT_256_135 << 19)
-#define DRM_MODE_FLAG_ALL \
- (DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC | \
- DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_INTERLACE | \
- DRM_MODE_FLAG_DBLSCAN | DRM_MODE_FLAG_CSYNC | DRM_MODE_FLAG_PCSYNC | \
- DRM_MODE_FLAG_NCSYNC | DRM_MODE_FLAG_HSKEW | DRM_MODE_FLAG_DBLCLK | \
- DRM_MODE_FLAG_CLKDIV2 | DRM_MODE_FLAG_3D_MASK)
+#define DRM_MODE_FLAG_ALL \
+ (DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC | DRM_MODE_FLAG_NVSYNC | \
+ DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_DBLSCAN | DRM_MODE_FLAG_CSYNC | DRM_MODE_FLAG_PCSYNC | \
+ DRM_MODE_FLAG_NCSYNC | DRM_MODE_FLAG_HSKEW | DRM_MODE_FLAG_DBLCLK | DRM_MODE_FLAG_CLKDIV2 | \
+ DRM_MODE_FLAG_3D_MASK)
/* DPMS flags */
/* bit compatible with the xorg definitions. */
@@ -176,9 +173,7 @@ extern "C" {
*
* Bitmask used to look for drm plane rotations.
*/
-#define DRM_MODE_ROTATE_MASK \
- (DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_90 | DRM_MODE_ROTATE_180 | \
- DRM_MODE_ROTATE_270)
+#define DRM_MODE_ROTATE_MASK (DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_90 | DRM_MODE_ROTATE_180 | DRM_MODE_ROTATE_270)
/*
* DRM_MODE_REFLECT_<axis>
@@ -510,9 +505,8 @@ struct drm_mode_get_connector {
#define DRM_MODE_PROP_BITMASK (1 << 5) /* bitmask of enumerated types */
/* non-extended types: legacy bitmask, one bit per type: */
-#define DRM_MODE_PROP_LEGACY_TYPE \
- (DRM_MODE_PROP_RANGE | DRM_MODE_PROP_ENUM | DRM_MODE_PROP_BLOB | \
- DRM_MODE_PROP_BITMASK)
+#define DRM_MODE_PROP_LEGACY_TYPE \
+ (DRM_MODE_PROP_RANGE | DRM_MODE_PROP_ENUM | DRM_MODE_PROP_BLOB | DRM_MODE_PROP_BITMASK)
/* extended-types: rather than continue to consume a bit per type,
* grab a chunk of the bits to use as integer type id.
@@ -968,17 +962,13 @@ struct hdr_output_metadata {
#define DRM_MODE_PAGE_FLIP_ASYNC 0x02
#define DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE 0x4
#define DRM_MODE_PAGE_FLIP_TARGET_RELATIVE 0x8
-#define DRM_MODE_PAGE_FLIP_TARGET \
- (DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE | \
- DRM_MODE_PAGE_FLIP_TARGET_RELATIVE)
+#define DRM_MODE_PAGE_FLIP_TARGET (DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE | DRM_MODE_PAGE_FLIP_TARGET_RELATIVE)
/**
* DRM_MODE_PAGE_FLIP_FLAGS
*
* Bitmask of flags suitable for &drm_mode_crtc_page_flip_target.flags.
*/
-#define DRM_MODE_PAGE_FLIP_FLAGS \
- (DRM_MODE_PAGE_FLIP_EVENT | DRM_MODE_PAGE_FLIP_ASYNC | \
- DRM_MODE_PAGE_FLIP_TARGET)
+#define DRM_MODE_PAGE_FLIP_FLAGS (DRM_MODE_PAGE_FLIP_EVENT | DRM_MODE_PAGE_FLIP_ASYNC | DRM_MODE_PAGE_FLIP_TARGET)
/*
* Request a page flip on the specified crtc.
@@ -1128,9 +1118,8 @@ struct drm_mode_destroy_dumb {
* Bitfield of flags accepted by the &DRM_IOCTL_MODE_ATOMIC IOCTL in
* &drm_mode_atomic.flags.
*/
-#define DRM_MODE_ATOMIC_FLAGS \
- (DRM_MODE_PAGE_FLIP_EVENT | DRM_MODE_PAGE_FLIP_ASYNC | \
- DRM_MODE_ATOMIC_TEST_ONLY | DRM_MODE_ATOMIC_NONBLOCK | \
+#define DRM_MODE_ATOMIC_FLAGS \
+ (DRM_MODE_PAGE_FLIP_EVENT | DRM_MODE_PAGE_FLIP_ASYNC | DRM_MODE_ATOMIC_TEST_ONLY | DRM_MODE_ATOMIC_NONBLOCK | \
DRM_MODE_ATOMIC_ALLOW_MODESET)
struct drm_mode_atomic {
diff --git a/include/arch/x86_64/drm/drm_sarea.h b/include/arch/x86_64/drm/drm_sarea.h
index 645d4925..0bd4c1f0 100644
--- a/include/arch/x86_64/drm/drm_sarea.h
+++ b/include/arch/x86_64/drm/drm_sarea.h
@@ -79,7 +79,7 @@ struct drm_sarea {
struct drm_sarea_drawable drawableTable[SAREA_MAX_DRAWABLES]; /**<
drawables
*/
- struct drm_sarea_frame frame; /**< frame */
+ struct drm_sarea_frame frame; /**< frame */
drm_context_t dummy_context;
};
diff --git a/include/arch/x86_64/drm/etnaviv_drm.h b/include/arch/x86_64/drm/etnaviv_drm.h
index 7ed02dcc..dba78b7f 100644
--- a/include/arch/x86_64/drm/etnaviv_drm.h
+++ b/include/arch/x86_64/drm/etnaviv_drm.h
@@ -187,9 +187,8 @@ struct drm_etnaviv_gem_submit_pmr {
#define ETNA_SUBMIT_FENCE_FD_IN 0x0002
#define ETNA_SUBMIT_FENCE_FD_OUT 0x0004
#define ETNA_SUBMIT_SOFTPIN 0x0008
-#define ETNA_SUBMIT_FLAGS \
- (ETNA_SUBMIT_NO_IMPLICIT | ETNA_SUBMIT_FENCE_FD_IN | \
- ETNA_SUBMIT_FENCE_FD_OUT | ETNA_SUBMIT_SOFTPIN)
+#define ETNA_SUBMIT_FLAGS \
+ (ETNA_SUBMIT_NO_IMPLICIT | ETNA_SUBMIT_FENCE_FD_IN | ETNA_SUBMIT_FENCE_FD_OUT | ETNA_SUBMIT_SOFTPIN)
#define ETNA_PIPE_3D 0x00
#define ETNA_PIPE_2D 0x01
#define ETNA_PIPE_VG 0x02
@@ -280,39 +279,22 @@ struct drm_etnaviv_pm_signal {
#define DRM_ETNAVIV_PM_QUERY_SIG 0x0b
#define DRM_ETNAVIV_NUM_IOCTLS 0x0c
-#define DRM_IOCTL_ETNAVIV_GET_PARAM \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GET_PARAM, \
- struct drm_etnaviv_param)
-#define DRM_IOCTL_ETNAVIV_GEM_NEW \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_NEW, \
- struct drm_etnaviv_gem_new)
-#define DRM_IOCTL_ETNAVIV_GEM_INFO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_INFO, \
- struct drm_etnaviv_gem_info)
-#define DRM_IOCTL_ETNAVIV_GEM_CPU_PREP \
- DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_CPU_PREP, \
- struct drm_etnaviv_gem_cpu_prep)
-#define DRM_IOCTL_ETNAVIV_GEM_CPU_FINI \
- DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_CPU_FINI, \
- struct drm_etnaviv_gem_cpu_fini)
-#define DRM_IOCTL_ETNAVIV_GEM_SUBMIT \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_SUBMIT, \
- struct drm_etnaviv_gem_submit)
-#define DRM_IOCTL_ETNAVIV_WAIT_FENCE \
- DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_WAIT_FENCE, \
- struct drm_etnaviv_wait_fence)
-#define DRM_IOCTL_ETNAVIV_GEM_USERPTR \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_USERPTR, \
- struct drm_etnaviv_gem_userptr)
-#define DRM_IOCTL_ETNAVIV_GEM_WAIT \
- DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_WAIT, \
- struct drm_etnaviv_gem_wait)
-#define DRM_IOCTL_ETNAVIV_PM_QUERY_DOM \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_PM_QUERY_DOM, \
- struct drm_etnaviv_pm_domain)
-#define DRM_IOCTL_ETNAVIV_PM_QUERY_SIG \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_PM_QUERY_SIG, \
- struct drm_etnaviv_pm_signal)
+#define DRM_IOCTL_ETNAVIV_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GET_PARAM, struct drm_etnaviv_param)
+#define DRM_IOCTL_ETNAVIV_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_NEW, struct drm_etnaviv_gem_new)
+#define DRM_IOCTL_ETNAVIV_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_INFO, struct drm_etnaviv_gem_info)
+#define DRM_IOCTL_ETNAVIV_GEM_CPU_PREP \
+ DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_CPU_PREP, struct drm_etnaviv_gem_cpu_prep)
+#define DRM_IOCTL_ETNAVIV_GEM_CPU_FINI \
+ DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_CPU_FINI, struct drm_etnaviv_gem_cpu_fini)
+#define DRM_IOCTL_ETNAVIV_GEM_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_SUBMIT, struct drm_etnaviv_gem_submit)
+#define DRM_IOCTL_ETNAVIV_WAIT_FENCE DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_WAIT_FENCE, struct drm_etnaviv_wait_fence)
+#define DRM_IOCTL_ETNAVIV_GEM_USERPTR \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_USERPTR, struct drm_etnaviv_gem_userptr)
+#define DRM_IOCTL_ETNAVIV_GEM_WAIT DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_WAIT, struct drm_etnaviv_gem_wait)
+#define DRM_IOCTL_ETNAVIV_PM_QUERY_DOM \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_PM_QUERY_DOM, struct drm_etnaviv_pm_domain)
+#define DRM_IOCTL_ETNAVIV_PM_QUERY_SIG \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_PM_QUERY_SIG, struct drm_etnaviv_pm_signal)
#if defined(__cplusplus)
}
diff --git a/include/arch/x86_64/drm/exynos_drm.h b/include/arch/x86_64/drm/exynos_drm.h
index 414cabdc..877f666b 100644
--- a/include/arch/x86_64/drm/exynos_drm.h
+++ b/include/arch/x86_64/drm/exynos_drm.h
@@ -324,9 +324,7 @@ enum drm_exynos_ipp_flag {
DRM_EXYNOS_IPP_FLAG_NONBLOCK = 0x04,
};
-#define DRM_EXYNOS_IPP_FLAGS \
- (DRM_EXYNOS_IPP_FLAG_EVENT | DRM_EXYNOS_IPP_FLAG_TEST_ONLY | \
- DRM_EXYNOS_IPP_FLAG_NONBLOCK)
+#define DRM_EXYNOS_IPP_FLAGS (DRM_EXYNOS_IPP_FLAG_EVENT | DRM_EXYNOS_IPP_FLAG_TEST_ONLY | DRM_EXYNOS_IPP_FLAG_NONBLOCK)
/**
* Perform image processing described by array of drm_exynos_ipp_task_*
@@ -366,42 +364,26 @@ struct drm_exynos_ioctl_ipp_commit {
#define DRM_EXYNOS_IPP_GET_LIMITS 0x42
#define DRM_EXYNOS_IPP_COMMIT 0x43
-#define DRM_IOCTL_EXYNOS_GEM_CREATE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_GEM_CREATE, \
- struct drm_exynos_gem_create)
-#define DRM_IOCTL_EXYNOS_GEM_MAP \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_GEM_MAP, \
- struct drm_exynos_gem_map)
-#define DRM_IOCTL_EXYNOS_GEM_GET \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_GEM_GET, \
- struct drm_exynos_gem_info)
-
-#define DRM_IOCTL_EXYNOS_VIDI_CONNECTION \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_VIDI_CONNECTION, \
- struct drm_exynos_vidi_connection)
-
-#define DRM_IOCTL_EXYNOS_G2D_GET_VER \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_G2D_GET_VER, \
- struct drm_exynos_g2d_get_ver)
-#define DRM_IOCTL_EXYNOS_G2D_SET_CMDLIST \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_G2D_SET_CMDLIST, \
- struct drm_exynos_g2d_set_cmdlist)
-#define DRM_IOCTL_EXYNOS_G2D_EXEC \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_G2D_EXEC, \
- struct drm_exynos_g2d_exec)
-
-#define DRM_IOCTL_EXYNOS_IPP_GET_RESOURCES \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_IPP_GET_RESOURCES, \
- struct drm_exynos_ioctl_ipp_get_res)
-#define DRM_IOCTL_EXYNOS_IPP_GET_CAPS \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_IPP_GET_CAPS, \
- struct drm_exynos_ioctl_ipp_get_caps)
-#define DRM_IOCTL_EXYNOS_IPP_GET_LIMITS \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_IPP_GET_LIMITS, \
- struct drm_exynos_ioctl_ipp_get_limits)
-#define DRM_IOCTL_EXYNOS_IPP_COMMIT \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_IPP_COMMIT, \
- struct drm_exynos_ioctl_ipp_commit)
+#define DRM_IOCTL_EXYNOS_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_GEM_CREATE, struct drm_exynos_gem_create)
+#define DRM_IOCTL_EXYNOS_GEM_MAP DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_GEM_MAP, struct drm_exynos_gem_map)
+#define DRM_IOCTL_EXYNOS_GEM_GET DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_GEM_GET, struct drm_exynos_gem_info)
+
+#define DRM_IOCTL_EXYNOS_VIDI_CONNECTION \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_VIDI_CONNECTION, struct drm_exynos_vidi_connection)
+
+#define DRM_IOCTL_EXYNOS_G2D_GET_VER DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_G2D_GET_VER, struct drm_exynos_g2d_get_ver)
+#define DRM_IOCTL_EXYNOS_G2D_SET_CMDLIST \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_G2D_SET_CMDLIST, struct drm_exynos_g2d_set_cmdlist)
+#define DRM_IOCTL_EXYNOS_G2D_EXEC DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_G2D_EXEC, struct drm_exynos_g2d_exec)
+
+#define DRM_IOCTL_EXYNOS_IPP_GET_RESOURCES \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_IPP_GET_RESOURCES, struct drm_exynos_ioctl_ipp_get_res)
+#define DRM_IOCTL_EXYNOS_IPP_GET_CAPS \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_IPP_GET_CAPS, struct drm_exynos_ioctl_ipp_get_caps)
+#define DRM_IOCTL_EXYNOS_IPP_GET_LIMITS \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_IPP_GET_LIMITS, struct drm_exynos_ioctl_ipp_get_limits)
+#define DRM_IOCTL_EXYNOS_IPP_COMMIT \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_IPP_COMMIT, struct drm_exynos_ioctl_ipp_commit)
/* Exynos specific events */
#define DRM_EXYNOS_G2D_EVENT 0x80000000
diff --git a/include/arch/x86_64/drm/habanalabs_accel.h b/include/arch/x86_64/drm/habanalabs_accel.h
index 60b1f21d..dd83a435 100644
--- a/include/arch/x86_64/drm/habanalabs_accel.h
+++ b/include/arch/x86_64/drm/habanalabs_accel.h
@@ -1008,11 +1008,7 @@ struct hl_info_pci_counters {
__u64 replay_cnt;
};
-enum hl_clk_throttling_type {
- HL_CLK_THROTTLE_TYPE_POWER,
- HL_CLK_THROTTLE_TYPE_THERMAL,
- HL_CLK_THROTTLE_TYPE_MAX
-};
+enum hl_clk_throttling_type { HL_CLK_THROTTLE_TYPE_POWER, HL_CLK_THROTTLE_TYPE_THERMAL, HL_CLK_THROTTLE_TYPE_MAX };
/* clk_throttling_reason masks */
#define HL_CLK_THROTTLE_POWER (1 << HL_CLK_THROTTLE_TYPE_POWER)
@@ -1348,12 +1344,7 @@ struct hl_user_mapping {
__u64 size;
};
-enum gaudi_dcores {
- HL_GAUDI_WS_DCORE,
- HL_GAUDI_WN_DCORE,
- HL_GAUDI_EN_DCORE,
- HL_GAUDI_ES_DCORE
-};
+enum gaudi_dcores { HL_GAUDI_WS_DCORE, HL_GAUDI_WN_DCORE, HL_GAUDI_EN_DCORE, HL_GAUDI_ES_DCORE };
/**
* struct hl_info_args - Main structure to retrieve device related information.
@@ -2237,8 +2228,7 @@ struct hl_debug_args {
* definitions of structures in kernel and userspace, e.g. in case of old
* userspace and new kernel driver
*/
-#define DRM_IOCTL_HL_INFO \
- DRM_IOWR(DRM_COMMAND_BASE + HL_IOCTL_INFO, struct hl_info_args)
+#define DRM_IOCTL_HL_INFO DRM_IOWR(DRM_COMMAND_BASE + HL_IOCTL_INFO, struct hl_info_args)
/*
* Command Buffer
@@ -2259,8 +2249,7 @@ struct hl_debug_args {
* and won't be returned to user.
*
*/
-#define DRM_IOCTL_HL_CB \
- DRM_IOWR(DRM_COMMAND_BASE + HL_IOCTL_CB, union hl_cb_args)
+#define DRM_IOCTL_HL_CB DRM_IOWR(DRM_COMMAND_BASE + HL_IOCTL_CB, union hl_cb_args)
/*
* Command Submission
@@ -2312,8 +2301,7 @@ struct hl_debug_args {
* and only if CS N and CS N-1 are exactly the same (same CBs for the same
* queues).
*/
-#define DRM_IOCTL_HL_CS \
- DRM_IOWR(DRM_COMMAND_BASE + HL_IOCTL_CS, union hl_cs_args)
+#define DRM_IOCTL_HL_CS DRM_IOWR(DRM_COMMAND_BASE + HL_IOCTL_CS, union hl_cs_args)
/*
* Wait for Command Submission
@@ -2345,8 +2333,7 @@ struct hl_debug_args {
* HL_WAIT_CS_STATUS_ABORTED - The CS was aborted, usually because the
* device was reset (EIO)
*/
-#define DRM_IOCTL_HL_WAIT_CS \
- DRM_IOWR(DRM_COMMAND_BASE + HL_IOCTL_WAIT_CS, union hl_wait_cs_args)
+#define DRM_IOCTL_HL_WAIT_CS DRM_IOWR(DRM_COMMAND_BASE + HL_IOCTL_WAIT_CS, union hl_wait_cs_args)
/*
* Memory
@@ -2363,8 +2350,7 @@ struct hl_debug_args {
* There is an option for the user to specify the requested virtual address.
*
*/
-#define DRM_IOCTL_HL_MEMORY \
- DRM_IOWR(DRM_COMMAND_BASE + HL_IOCTL_MEMORY, union hl_mem_args)
+#define DRM_IOCTL_HL_MEMORY DRM_IOWR(DRM_COMMAND_BASE + HL_IOCTL_MEMORY, union hl_mem_args)
/*
* Debug
@@ -2390,8 +2376,7 @@ struct hl_debug_args {
* The driver can decide to "kick out" the user if he abuses this interface.
*
*/
-#define DRM_IOCTL_HL_DEBUG \
- DRM_IOWR(DRM_COMMAND_BASE + HL_IOCTL_DEBUG, struct hl_debug_args)
+#define DRM_IOCTL_HL_DEBUG DRM_IOWR(DRM_COMMAND_BASE + HL_IOCTL_DEBUG, struct hl_debug_args)
#define HL_COMMAND_START (DRM_COMMAND_BASE + HL_IOCTL_INFO)
#define HL_COMMAND_END (DRM_COMMAND_BASE + HL_IOCTL_DEBUG + 1)
diff --git a/include/arch/x86_64/drm/i915_drm.h b/include/arch/x86_64/drm/i915_drm.h
index e0403cb6..e9458f90 100644
--- a/include/arch/x86_64/drm/i915_drm.h
+++ b/include/arch/x86_64/drm/i915_drm.h
@@ -254,39 +254,29 @@ struct i915_engine_class_instance {
*
*/
-enum drm_i915_pmu_engine_sample {
- I915_SAMPLE_BUSY = 0,
- I915_SAMPLE_WAIT = 1,
- I915_SAMPLE_SEMA = 2
-};
+enum drm_i915_pmu_engine_sample { I915_SAMPLE_BUSY = 0, I915_SAMPLE_WAIT = 1, I915_SAMPLE_SEMA = 2 };
#define I915_PMU_SAMPLE_BITS (4)
#define I915_PMU_SAMPLE_MASK (0xf)
#define I915_PMU_SAMPLE_INSTANCE_BITS (8)
-#define I915_PMU_CLASS_SHIFT \
- (I915_PMU_SAMPLE_BITS + I915_PMU_SAMPLE_INSTANCE_BITS)
+#define I915_PMU_CLASS_SHIFT (I915_PMU_SAMPLE_BITS + I915_PMU_SAMPLE_INSTANCE_BITS)
#define __I915_PMU_ENGINE(class, instance, sample) \
- ((class) << I915_PMU_CLASS_SHIFT | \
- (instance) << I915_PMU_SAMPLE_BITS | (sample))
+ ((class) << I915_PMU_CLASS_SHIFT | (instance) << I915_PMU_SAMPLE_BITS | (sample))
-#define I915_PMU_ENGINE_BUSY(class, instance) \
- __I915_PMU_ENGINE(class, instance, I915_SAMPLE_BUSY)
+#define I915_PMU_ENGINE_BUSY(class, instance) __I915_PMU_ENGINE(class, instance, I915_SAMPLE_BUSY)
-#define I915_PMU_ENGINE_WAIT(class, instance) \
- __I915_PMU_ENGINE(class, instance, I915_SAMPLE_WAIT)
+#define I915_PMU_ENGINE_WAIT(class, instance) __I915_PMU_ENGINE(class, instance, I915_SAMPLE_WAIT)
-#define I915_PMU_ENGINE_SEMA(class, instance) \
- __I915_PMU_ENGINE(class, instance, I915_SAMPLE_SEMA)
+#define I915_PMU_ENGINE_SEMA(class, instance) __I915_PMU_ENGINE(class, instance, I915_SAMPLE_SEMA)
/*
* Top 4 bits of every non-engine counter are GT id.
*/
#define __I915_PMU_GT_SHIFT (60)
-#define ___I915_PMU_OTHER(gt, x) \
- (((__u64)__I915_PMU_ENGINE(0xff, 0xff, 0xf) + 1 + (x)) | \
- ((__u64)(gt) << __I915_PMU_GT_SHIFT))
+#define ___I915_PMU_OTHER(gt, x) \
+ (((__u64)__I915_PMU_ENGINE(0xff, 0xff, 0xf) + 1 + (x)) | ((__u64)(gt) << __I915_PMU_GT_SHIFT))
#define __I915_PMU_OTHER(x) ___I915_PMU_OTHER(0, x)
@@ -312,11 +302,7 @@ enum drm_i915_pmu_engine_sample {
#define I915_LOG_MIN_TEX_REGION_SIZE 14
typedef struct _drm_i915_init {
- enum {
- I915_INIT_DMA = 0x01,
- I915_CLEANUP_DMA = 0x02,
- I915_RESUME_DMA = 0x03
- } func;
+ enum { I915_INIT_DMA = 0x01, I915_CLEANUP_DMA = 0x02, I915_RESUME_DMA = 0x03 } func;
unsigned int mmio_offset;
int sarea_priv_offset;
unsigned int ring_start;
@@ -487,176 +473,100 @@ typedef struct _drm_i915_sarea {
#define DRM_I915_GEM_CREATE_EXT 0x3c
/* Must be kept compact -- no holes */
-#define DRM_IOCTL_I915_INIT \
- DRM_IOW(DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t)
-#define DRM_IOCTL_I915_FLUSH DRM_IO(DRM_COMMAND_BASE + DRM_I915_FLUSH)
-#define DRM_IOCTL_I915_FLIP DRM_IO(DRM_COMMAND_BASE + DRM_I915_FLIP)
-#define DRM_IOCTL_I915_BATCHBUFFER \
- DRM_IOW(DRM_COMMAND_BASE + DRM_I915_BATCHBUFFER, drm_i915_batchbuffer_t)
-#define DRM_IOCTL_I915_IRQ_EMIT \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_IRQ_EMIT, drm_i915_irq_emit_t)
-#define DRM_IOCTL_I915_IRQ_WAIT \
- DRM_IOW(DRM_COMMAND_BASE + DRM_I915_IRQ_WAIT, drm_i915_irq_wait_t)
-#define DRM_IOCTL_I915_GETPARAM \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GETPARAM, drm_i915_getparam_t)
-#define DRM_IOCTL_I915_SETPARAM \
- DRM_IOW(DRM_COMMAND_BASE + DRM_I915_SETPARAM, drm_i915_setparam_t)
-#define DRM_IOCTL_I915_ALLOC \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_ALLOC, drm_i915_mem_alloc_t)
-#define DRM_IOCTL_I915_FREE \
- DRM_IOW(DRM_COMMAND_BASE + DRM_I915_FREE, drm_i915_mem_free_t)
-#define DRM_IOCTL_I915_INIT_HEAP \
- DRM_IOW(DRM_COMMAND_BASE + DRM_I915_INIT_HEAP, drm_i915_mem_init_heap_t)
-#define DRM_IOCTL_I915_CMDBUFFER \
- DRM_IOW(DRM_COMMAND_BASE + DRM_I915_CMDBUFFER, drm_i915_cmdbuffer_t)
-#define DRM_IOCTL_I915_DESTROY_HEAP \
- DRM_IOW(DRM_COMMAND_BASE + DRM_I915_DESTROY_HEAP, \
- drm_i915_mem_destroy_heap_t)
-#define DRM_IOCTL_I915_SET_VBLANK_PIPE \
- DRM_IOW(DRM_COMMAND_BASE + DRM_I915_SET_VBLANK_PIPE, \
- drm_i915_vblank_pipe_t)
-#define DRM_IOCTL_I915_GET_VBLANK_PIPE \
- DRM_IOR(DRM_COMMAND_BASE + DRM_I915_GET_VBLANK_PIPE, \
- drm_i915_vblank_pipe_t)
-#define DRM_IOCTL_I915_VBLANK_SWAP \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_VBLANK_SWAP, \
- drm_i915_vblank_swap_t)
-#define DRM_IOCTL_I915_HWS_ADDR \
- DRM_IOW(DRM_COMMAND_BASE + DRM_I915_HWS_ADDR, struct drm_i915_gem_init)
-#define DRM_IOCTL_I915_GEM_INIT \
- DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_INIT, struct drm_i915_gem_init)
-#define DRM_IOCTL_I915_GEM_EXECBUFFER \
- DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER, \
- struct drm_i915_gem_execbuffer)
-#define DRM_IOCTL_I915_GEM_EXECBUFFER2 \
- DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER2, \
- struct drm_i915_gem_execbuffer2)
-#define DRM_IOCTL_I915_GEM_EXECBUFFER2_WR \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER2_WR, \
- struct drm_i915_gem_execbuffer2)
-#define DRM_IOCTL_I915_GEM_PIN \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_PIN, struct drm_i915_gem_pin)
-#define DRM_IOCTL_I915_GEM_UNPIN \
- DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_UNPIN, \
- struct drm_i915_gem_unpin)
-#define DRM_IOCTL_I915_GEM_BUSY \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_BUSY, struct drm_i915_gem_busy)
-#define DRM_IOCTL_I915_GEM_SET_CACHING \
- DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_SET_CACHING, \
- struct drm_i915_gem_caching)
-#define DRM_IOCTL_I915_GEM_GET_CACHING \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_GET_CACHING, \
- struct drm_i915_gem_caching)
-#define DRM_IOCTL_I915_GEM_THROTTLE \
- DRM_IO(DRM_COMMAND_BASE + DRM_I915_GEM_THROTTLE)
-#define DRM_IOCTL_I915_GEM_ENTERVT \
- DRM_IO(DRM_COMMAND_BASE + DRM_I915_GEM_ENTERVT)
-#define DRM_IOCTL_I915_GEM_LEAVEVT \
- DRM_IO(DRM_COMMAND_BASE + DRM_I915_GEM_LEAVEVT)
-#define DRM_IOCTL_I915_GEM_CREATE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CREATE, \
- struct drm_i915_gem_create)
-#define DRM_IOCTL_I915_GEM_CREATE_EXT \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CREATE_EXT, \
- struct drm_i915_gem_create_ext)
-#define DRM_IOCTL_I915_GEM_PREAD \
- DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_PREAD, \
- struct drm_i915_gem_pread)
-#define DRM_IOCTL_I915_GEM_PWRITE \
- DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_PWRITE, \
- struct drm_i915_gem_pwrite)
-#define DRM_IOCTL_I915_GEM_MMAP \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MMAP, struct drm_i915_gem_mmap)
-#define DRM_IOCTL_I915_GEM_MMAP_GTT \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MMAP_GTT, \
- struct drm_i915_gem_mmap_gtt)
-#define DRM_IOCTL_I915_GEM_MMAP_OFFSET \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MMAP_GTT, \
- struct drm_i915_gem_mmap_offset)
-#define DRM_IOCTL_I915_GEM_SET_DOMAIN \
- DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_SET_DOMAIN, \
- struct drm_i915_gem_set_domain)
-#define DRM_IOCTL_I915_GEM_SW_FINISH \
- DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_SW_FINISH, \
- struct drm_i915_gem_sw_finish)
-#define DRM_IOCTL_I915_GEM_SET_TILING \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_SET_TILING, \
- struct drm_i915_gem_set_tiling)
-#define DRM_IOCTL_I915_GEM_GET_TILING \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_GET_TILING, \
- struct drm_i915_gem_get_tiling)
-#define DRM_IOCTL_I915_GEM_GET_APERTURE \
- DRM_IOR(DRM_COMMAND_BASE + DRM_I915_GEM_GET_APERTURE, \
- struct drm_i915_gem_get_aperture)
-#define DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_PIPE_FROM_CRTC_ID, \
- struct drm_i915_get_pipe_from_crtc_id)
-#define DRM_IOCTL_I915_GEM_MADVISE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MADVISE, \
- struct drm_i915_gem_madvise)
-#define DRM_IOCTL_I915_OVERLAY_PUT_IMAGE \
- DRM_IOW(DRM_COMMAND_BASE + DRM_I915_OVERLAY_PUT_IMAGE, \
- struct drm_intel_overlay_put_image)
-#define DRM_IOCTL_I915_OVERLAY_ATTRS \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_OVERLAY_ATTRS, \
- struct drm_intel_overlay_attrs)
-#define DRM_IOCTL_I915_SET_SPRITE_COLORKEY \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_SET_SPRITE_COLORKEY, \
- struct drm_intel_sprite_colorkey)
-#define DRM_IOCTL_I915_GET_SPRITE_COLORKEY \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_SPRITE_COLORKEY, \
- struct drm_intel_sprite_colorkey)
-#define DRM_IOCTL_I915_GEM_WAIT \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_WAIT, struct drm_i915_gem_wait)
-#define DRM_IOCTL_I915_GEM_CONTEXT_CREATE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_CREATE, \
- struct drm_i915_gem_context_create)
-#define DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_CREATE, \
- struct drm_i915_gem_context_create_ext)
-#define DRM_IOCTL_I915_GEM_CONTEXT_DESTROY \
- DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_DESTROY, \
- struct drm_i915_gem_context_destroy)
-#define DRM_IOCTL_I915_REG_READ \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_REG_READ, struct drm_i915_reg_read)
-#define DRM_IOCTL_I915_GET_RESET_STATS \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_RESET_STATS, \
- struct drm_i915_reset_stats)
-#define DRM_IOCTL_I915_GEM_USERPTR \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_USERPTR, \
- struct drm_i915_gem_userptr)
-#define DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_GETPARAM, \
- struct drm_i915_gem_context_param)
-#define DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_SETPARAM, \
- struct drm_i915_gem_context_param)
-#define DRM_IOCTL_I915_PERF_OPEN \
- DRM_IOW(DRM_COMMAND_BASE + DRM_I915_PERF_OPEN, \
- struct drm_i915_perf_open_param)
-#define DRM_IOCTL_I915_PERF_ADD_CONFIG \
- DRM_IOW(DRM_COMMAND_BASE + DRM_I915_PERF_ADD_CONFIG, \
- struct drm_i915_perf_oa_config)
-#define DRM_IOCTL_I915_PERF_REMOVE_CONFIG \
- DRM_IOW(DRM_COMMAND_BASE + DRM_I915_PERF_REMOVE_CONFIG, __u64)
-#define DRM_IOCTL_I915_QUERY \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_QUERY, struct drm_i915_query)
-#define DRM_IOCTL_I915_GEM_VM_CREATE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_VM_CREATE, \
- struct drm_i915_gem_vm_control)
-#define DRM_IOCTL_I915_GEM_VM_DESTROY \
- DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_VM_DESTROY, \
- struct drm_i915_gem_vm_control)
+#define DRM_IOCTL_I915_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t)
+#define DRM_IOCTL_I915_FLUSH DRM_IO(DRM_COMMAND_BASE + DRM_I915_FLUSH)
+#define DRM_IOCTL_I915_FLIP DRM_IO(DRM_COMMAND_BASE + DRM_I915_FLIP)
+#define DRM_IOCTL_I915_BATCHBUFFER DRM_IOW(DRM_COMMAND_BASE + DRM_I915_BATCHBUFFER, drm_i915_batchbuffer_t)
+#define DRM_IOCTL_I915_IRQ_EMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_IRQ_EMIT, drm_i915_irq_emit_t)
+#define DRM_IOCTL_I915_IRQ_WAIT DRM_IOW(DRM_COMMAND_BASE + DRM_I915_IRQ_WAIT, drm_i915_irq_wait_t)
+#define DRM_IOCTL_I915_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GETPARAM, drm_i915_getparam_t)
+#define DRM_IOCTL_I915_SETPARAM DRM_IOW(DRM_COMMAND_BASE + DRM_I915_SETPARAM, drm_i915_setparam_t)
+#define DRM_IOCTL_I915_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_ALLOC, drm_i915_mem_alloc_t)
+#define DRM_IOCTL_I915_FREE DRM_IOW(DRM_COMMAND_BASE + DRM_I915_FREE, drm_i915_mem_free_t)
+#define DRM_IOCTL_I915_INIT_HEAP DRM_IOW(DRM_COMMAND_BASE + DRM_I915_INIT_HEAP, drm_i915_mem_init_heap_t)
+#define DRM_IOCTL_I915_CMDBUFFER DRM_IOW(DRM_COMMAND_BASE + DRM_I915_CMDBUFFER, drm_i915_cmdbuffer_t)
+#define DRM_IOCTL_I915_DESTROY_HEAP DRM_IOW(DRM_COMMAND_BASE + DRM_I915_DESTROY_HEAP, drm_i915_mem_destroy_heap_t)
+#define DRM_IOCTL_I915_SET_VBLANK_PIPE DRM_IOW(DRM_COMMAND_BASE + DRM_I915_SET_VBLANK_PIPE, drm_i915_vblank_pipe_t)
+#define DRM_IOCTL_I915_GET_VBLANK_PIPE DRM_IOR(DRM_COMMAND_BASE + DRM_I915_GET_VBLANK_PIPE, drm_i915_vblank_pipe_t)
+#define DRM_IOCTL_I915_VBLANK_SWAP DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_VBLANK_SWAP, drm_i915_vblank_swap_t)
+#define DRM_IOCTL_I915_HWS_ADDR DRM_IOW(DRM_COMMAND_BASE + DRM_I915_HWS_ADDR, struct drm_i915_gem_init)
+#define DRM_IOCTL_I915_GEM_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_INIT, struct drm_i915_gem_init)
+#define DRM_IOCTL_I915_GEM_EXECBUFFER \
+ DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER, struct drm_i915_gem_execbuffer)
+#define DRM_IOCTL_I915_GEM_EXECBUFFER2 \
+ DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER2, struct drm_i915_gem_execbuffer2)
+#define DRM_IOCTL_I915_GEM_EXECBUFFER2_WR \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER2_WR, struct drm_i915_gem_execbuffer2)
+#define DRM_IOCTL_I915_GEM_PIN DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_PIN, struct drm_i915_gem_pin)
+#define DRM_IOCTL_I915_GEM_UNPIN DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_UNPIN, struct drm_i915_gem_unpin)
+#define DRM_IOCTL_I915_GEM_BUSY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_BUSY, struct drm_i915_gem_busy)
+#define DRM_IOCTL_I915_GEM_SET_CACHING DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_SET_CACHING, struct drm_i915_gem_caching)
+#define DRM_IOCTL_I915_GEM_GET_CACHING \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_GET_CACHING, struct drm_i915_gem_caching)
+#define DRM_IOCTL_I915_GEM_THROTTLE DRM_IO(DRM_COMMAND_BASE + DRM_I915_GEM_THROTTLE)
+#define DRM_IOCTL_I915_GEM_ENTERVT DRM_IO(DRM_COMMAND_BASE + DRM_I915_GEM_ENTERVT)
+#define DRM_IOCTL_I915_GEM_LEAVEVT DRM_IO(DRM_COMMAND_BASE + DRM_I915_GEM_LEAVEVT)
+#define DRM_IOCTL_I915_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CREATE, struct drm_i915_gem_create)
+#define DRM_IOCTL_I915_GEM_CREATE_EXT \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CREATE_EXT, struct drm_i915_gem_create_ext)
+#define DRM_IOCTL_I915_GEM_PREAD DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_PREAD, struct drm_i915_gem_pread)
+#define DRM_IOCTL_I915_GEM_PWRITE DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_PWRITE, struct drm_i915_gem_pwrite)
+#define DRM_IOCTL_I915_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MMAP, struct drm_i915_gem_mmap)
+#define DRM_IOCTL_I915_GEM_MMAP_GTT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MMAP_GTT, struct drm_i915_gem_mmap_gtt)
+#define DRM_IOCTL_I915_GEM_MMAP_OFFSET \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MMAP_GTT, struct drm_i915_gem_mmap_offset)
+#define DRM_IOCTL_I915_GEM_SET_DOMAIN \
+ DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_SET_DOMAIN, struct drm_i915_gem_set_domain)
+#define DRM_IOCTL_I915_GEM_SW_FINISH DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_SW_FINISH, struct drm_i915_gem_sw_finish)
+#define DRM_IOCTL_I915_GEM_SET_TILING \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_SET_TILING, struct drm_i915_gem_set_tiling)
+#define DRM_IOCTL_I915_GEM_GET_TILING \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_GET_TILING, struct drm_i915_gem_get_tiling)
+#define DRM_IOCTL_I915_GEM_GET_APERTURE \
+ DRM_IOR(DRM_COMMAND_BASE + DRM_I915_GEM_GET_APERTURE, struct drm_i915_gem_get_aperture)
+#define DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_PIPE_FROM_CRTC_ID, struct drm_i915_get_pipe_from_crtc_id)
+#define DRM_IOCTL_I915_GEM_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MADVISE, struct drm_i915_gem_madvise)
+#define DRM_IOCTL_I915_OVERLAY_PUT_IMAGE \
+ DRM_IOW(DRM_COMMAND_BASE + DRM_I915_OVERLAY_PUT_IMAGE, struct drm_intel_overlay_put_image)
+#define DRM_IOCTL_I915_OVERLAY_ATTRS DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_OVERLAY_ATTRS, struct drm_intel_overlay_attrs)
+#define DRM_IOCTL_I915_SET_SPRITE_COLORKEY \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_SET_SPRITE_COLORKEY, struct drm_intel_sprite_colorkey)
+#define DRM_IOCTL_I915_GET_SPRITE_COLORKEY \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_SPRITE_COLORKEY, struct drm_intel_sprite_colorkey)
+#define DRM_IOCTL_I915_GEM_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_WAIT, struct drm_i915_gem_wait)
+#define DRM_IOCTL_I915_GEM_CONTEXT_CREATE \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_CREATE, struct drm_i915_gem_context_create)
+#define DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_CREATE, struct drm_i915_gem_context_create_ext)
+#define DRM_IOCTL_I915_GEM_CONTEXT_DESTROY \
+ DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_DESTROY, struct drm_i915_gem_context_destroy)
+#define DRM_IOCTL_I915_REG_READ DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_REG_READ, struct drm_i915_reg_read)
+#define DRM_IOCTL_I915_GET_RESET_STATS \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_RESET_STATS, struct drm_i915_reset_stats)
+#define DRM_IOCTL_I915_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_USERPTR, struct drm_i915_gem_userptr)
+#define DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_GETPARAM, struct drm_i915_gem_context_param)
+#define DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_SETPARAM, struct drm_i915_gem_context_param)
+#define DRM_IOCTL_I915_PERF_OPEN DRM_IOW(DRM_COMMAND_BASE + DRM_I915_PERF_OPEN, struct drm_i915_perf_open_param)
+#define DRM_IOCTL_I915_PERF_ADD_CONFIG \
+ DRM_IOW(DRM_COMMAND_BASE + DRM_I915_PERF_ADD_CONFIG, struct drm_i915_perf_oa_config)
+#define DRM_IOCTL_I915_PERF_REMOVE_CONFIG DRM_IOW(DRM_COMMAND_BASE + DRM_I915_PERF_REMOVE_CONFIG, __u64)
+#define DRM_IOCTL_I915_QUERY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_QUERY, struct drm_i915_query)
+#define DRM_IOCTL_I915_GEM_VM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_VM_CREATE, struct drm_i915_gem_vm_control)
+#define DRM_IOCTL_I915_GEM_VM_DESTROY \
+ DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_VM_DESTROY, struct drm_i915_gem_vm_control)
/* Allow drivers to submit batchbuffers directly to hardware, relying
* on the security mechanisms provided by hardware.
*/
typedef struct drm_i915_batchbuffer {
- int start; /* agp offset */
- int used; /* nr bytes in use */
- int DR1; /* hw flags for GFX_OP_DRAWRECT_INFO */
- int DR4; /* window origin for GFX_OP_DRAWRECT_INFO */
- int num_cliprects; /* mulitpass with multiple cliprects? */
+ int start; /* agp offset */
+ int used; /* nr bytes in use */
+ int DR1; /* hw flags for GFX_OP_DRAWRECT_INFO */
+ int DR4; /* window origin for GFX_OP_DRAWRECT_INFO */
+ int num_cliprects; /* mulitpass with multiple cliprects? */
struct drm_clip_rect *cliprects; /* pointer to userspace cliprects */
} drm_i915_batchbuffer_t;
@@ -664,11 +574,11 @@ typedef struct drm_i915_batchbuffer {
* validated by the kernel prior to sending to hardware.
*/
typedef struct _drm_i915_cmdbuffer {
- char *buf; /* pointer to userspace command buffer */
- int sz; /* nr bytes in buf */
- int DR1; /* hw flags for GFX_OP_DRAWRECT_INFO */
- int DR4; /* window origin for GFX_OP_DRAWRECT_INFO */
- int num_cliprects; /* mulitpass with multiple cliprects? */
+ char *buf; /* pointer to userspace command buffer */
+ int sz; /* nr bytes in buf */
+ int DR1; /* hw flags for GFX_OP_DRAWRECT_INFO */
+ int DR4; /* window origin for GFX_OP_DRAWRECT_INFO */
+ int num_cliprects; /* mulitpass with multiple cliprects? */
struct drm_clip_rect *cliprects; /* pointer to userspace cliprects */
} drm_i915_cmdbuffer_t;
@@ -1669,11 +1579,9 @@ struct drm_i915_gem_execbuffer2 {
__u64 rsvd2;
};
-#define I915_EXEC_CONTEXT_ID_MASK (0xffffffff)
-#define i915_execbuffer2_set_context_id(eb2, context) \
- (eb2).rsvd1 = context & I915_EXEC_CONTEXT_ID_MASK
-#define i915_execbuffer2_get_context_id(eb2) \
- ((eb2).rsvd1 & I915_EXEC_CONTEXT_ID_MASK)
+#define I915_EXEC_CONTEXT_ID_MASK (0xffffffff)
+#define i915_execbuffer2_set_context_id(eb2, context) (eb2).rsvd1 = context & I915_EXEC_CONTEXT_ID_MASK
+#define i915_execbuffer2_get_context_id(eb2) ((eb2).rsvd1 & I915_EXEC_CONTEXT_ID_MASK)
struct drm_i915_gem_pin {
/** Handle of the buffer to be pinned. */
@@ -2071,8 +1979,7 @@ struct drm_i915_gem_context_create_ext {
__u32 flags;
#define I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS (1u << 0)
#define I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE (1u << 1)
-#define I915_CONTEXT_CREATE_FLAGS_UNKNOWN \
- (-(I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE << 1))
+#define I915_CONTEXT_CREATE_FLAGS_UNKNOWN (-(I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE << 1))
/**
* @extensions: Zero-terminated chain of extensions.
@@ -2115,10 +2022,10 @@ struct drm_i915_gem_context_param {
#define I915_CONTEXT_MAX_USER_PRIORITY 1023 /* inclusive */
#define I915_CONTEXT_DEFAULT_PRIORITY 0
#define I915_CONTEXT_MIN_USER_PRIORITY -1023 /* inclusive */
- /*
- * When using the following param, value should be a pointer to
- * drm_i915_gem_context_param_sseu.
- */
+ /*
+ * When using the following param, value should be a pointer to
+ * drm_i915_gem_context_param_sseu.
+ */
#define I915_CONTEXT_PARAM_SSEU 0x7
/*
@@ -2671,12 +2578,10 @@ struct i915_context_engines_parallel_submit {
*/
struct i915_context_param_engines {
- __u64 extensions; /* linked chain of extension blocks, 0 terminates */
-#define I915_CONTEXT_ENGINES_EXT_LOAD_BALANCE \
- 0 /* see i915_context_engines_load_balance */
-#define I915_CONTEXT_ENGINES_EXT_BOND 1 /* see i915_context_engines_bond */
-#define I915_CONTEXT_ENGINES_EXT_PARALLEL_SUBMIT \
- 2 /* see i915_context_engines_parallel_submit */
+ __u64 extensions; /* linked chain of extension blocks, 0 terminates */
+#define I915_CONTEXT_ENGINES_EXT_LOAD_BALANCE 0 /* see i915_context_engines_load_balance */
+#define I915_CONTEXT_ENGINES_EXT_BOND 1 /* see i915_context_engines_bond */
+#define I915_CONTEXT_ENGINES_EXT_PARALLEL_SUBMIT 2 /* see i915_context_engines_parallel_submit */
struct i915_engine_class_instance engines[];
} __attribute__((packed));
diff --git a/include/arch/x86_64/drm/ivpu_accel.h b/include/arch/x86_64/drm/ivpu_accel.h
index 1198ec64..09304d80 100644
--- a/include/arch/x86_64/drm/ivpu_accel.h
+++ b/include/arch/x86_64/drm/ivpu_accel.h
@@ -26,52 +26,35 @@ extern "C" {
#define DRM_IVPU_CMDQ_DESTROY 0x0c
#define DRM_IVPU_CMDQ_SUBMIT 0x0d
-#define DRM_IOCTL_IVPU_GET_PARAM \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_GET_PARAM, struct drm_ivpu_param)
+#define DRM_IOCTL_IVPU_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_GET_PARAM, struct drm_ivpu_param)
-#define DRM_IOCTL_IVPU_SET_PARAM \
- DRM_IOW(DRM_COMMAND_BASE + DRM_IVPU_SET_PARAM, struct drm_ivpu_param)
+#define DRM_IOCTL_IVPU_SET_PARAM DRM_IOW(DRM_COMMAND_BASE + DRM_IVPU_SET_PARAM, struct drm_ivpu_param)
-#define DRM_IOCTL_IVPU_BO_CREATE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_BO_CREATE, \
- struct drm_ivpu_bo_create)
+#define DRM_IOCTL_IVPU_BO_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_BO_CREATE, struct drm_ivpu_bo_create)
-#define DRM_IOCTL_IVPU_BO_INFO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_BO_INFO, struct drm_ivpu_bo_info)
+#define DRM_IOCTL_IVPU_BO_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_BO_INFO, struct drm_ivpu_bo_info)
-#define DRM_IOCTL_IVPU_SUBMIT \
- DRM_IOW(DRM_COMMAND_BASE + DRM_IVPU_SUBMIT, struct drm_ivpu_submit)
+#define DRM_IOCTL_IVPU_SUBMIT DRM_IOW(DRM_COMMAND_BASE + DRM_IVPU_SUBMIT, struct drm_ivpu_submit)
-#define DRM_IOCTL_IVPU_BO_WAIT \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_BO_WAIT, struct drm_ivpu_bo_wait)
+#define DRM_IOCTL_IVPU_BO_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_BO_WAIT, struct drm_ivpu_bo_wait)
-#define DRM_IOCTL_IVPU_METRIC_STREAMER_START \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_METRIC_STREAMER_START, \
- struct drm_ivpu_metric_streamer_start)
+#define DRM_IOCTL_IVPU_METRIC_STREAMER_START \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_METRIC_STREAMER_START, struct drm_ivpu_metric_streamer_start)
-#define DRM_IOCTL_IVPU_METRIC_STREAMER_STOP \
- DRM_IOW(DRM_COMMAND_BASE + DRM_IVPU_METRIC_STREAMER_STOP, \
- struct drm_ivpu_metric_streamer_stop)
+#define DRM_IOCTL_IVPU_METRIC_STREAMER_STOP \
+ DRM_IOW(DRM_COMMAND_BASE + DRM_IVPU_METRIC_STREAMER_STOP, struct drm_ivpu_metric_streamer_stop)
-#define DRM_IOCTL_IVPU_METRIC_STREAMER_GET_DATA \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_METRIC_STREAMER_GET_DATA, \
- struct drm_ivpu_metric_streamer_get_data)
+#define DRM_IOCTL_IVPU_METRIC_STREAMER_GET_DATA \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_METRIC_STREAMER_GET_DATA, struct drm_ivpu_metric_streamer_get_data)
-#define DRM_IOCTL_IVPU_METRIC_STREAMER_GET_INFO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_METRIC_STREAMER_GET_INFO, \
- struct drm_ivpu_metric_streamer_get_data)
+#define DRM_IOCTL_IVPU_METRIC_STREAMER_GET_INFO \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_METRIC_STREAMER_GET_INFO, struct drm_ivpu_metric_streamer_get_data)
-#define DRM_IOCTL_IVPU_CMDQ_CREATE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_CMDQ_CREATE, \
- struct drm_ivpu_cmdq_create)
+#define DRM_IOCTL_IVPU_CMDQ_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_CMDQ_CREATE, struct drm_ivpu_cmdq_create)
-#define DRM_IOCTL_IVPU_CMDQ_DESTROY \
- DRM_IOW(DRM_COMMAND_BASE + DRM_IVPU_CMDQ_DESTROY, \
- struct drm_ivpu_cmdq_destroy)
+#define DRM_IOCTL_IVPU_CMDQ_DESTROY DRM_IOW(DRM_COMMAND_BASE + DRM_IVPU_CMDQ_DESTROY, struct drm_ivpu_cmdq_destroy)
-#define DRM_IOCTL_IVPU_CMDQ_SUBMIT \
- DRM_IOW(DRM_COMMAND_BASE + DRM_IVPU_CMDQ_SUBMIT, \
- struct drm_ivpu_cmdq_submit)
+#define DRM_IOCTL_IVPU_CMDQ_SUBMIT DRM_IOW(DRM_COMMAND_BASE + DRM_IVPU_CMDQ_SUBMIT, struct drm_ivpu_cmdq_submit)
/**
* DOC: contexts
@@ -202,9 +185,7 @@ struct drm_ivpu_param {
#define DRM_IVPU_BO_WC 0x00020000
#define DRM_IVPU_BO_CACHE_MASK 0x00030000
-#define DRM_IVPU_BO_FLAGS \
- (DRM_IVPU_BO_HIGH_MEM | DRM_IVPU_BO_MAPPABLE | DRM_IVPU_BO_DMA_MEM | \
- DRM_IVPU_BO_CACHE_MASK)
+#define DRM_IVPU_BO_FLAGS (DRM_IVPU_BO_HIGH_MEM | DRM_IVPU_BO_MAPPABLE | DRM_IVPU_BO_DMA_MEM | DRM_IVPU_BO_CACHE_MASK)
/**
* struct drm_ivpu_bo_create - Create BO backed by SHMEM
diff --git a/include/arch/x86_64/drm/lima_drm.h b/include/arch/x86_64/drm/lima_drm.h
index 92917b4c..c22c636d 100644
--- a/include/arch/x86_64/drm/lima_drm.h
+++ b/include/arch/x86_64/drm/lima_drm.h
@@ -121,8 +121,8 @@ struct drm_lima_gem_submit {
__u64 bos; /* in, array of drm_lima_gem_submit_bo */
__u64 frame; /* in, GP/PP frame */
__u32 flags; /* in, submit flags */
- __u32 out_sync; /* in, drm_syncobj handle used to wait task finish after
- submission */
+ __u32 out_sync; /* in, drm_syncobj handle used to wait task finish after
+ submission */
__u32 in_sync[2]; /* in, drm_syncobj handle used to wait before start
this task */
};
@@ -163,24 +163,13 @@ struct drm_lima_ctx_free {
#define DRM_LIMA_CTX_CREATE 0x05
#define DRM_LIMA_CTX_FREE 0x06
-#define DRM_IOCTL_LIMA_GET_PARAM \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_LIMA_GET_PARAM, \
- struct drm_lima_get_param)
-#define DRM_IOCTL_LIMA_GEM_CREATE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_LIMA_GEM_CREATE, \
- struct drm_lima_gem_create)
-#define DRM_IOCTL_LIMA_GEM_INFO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_LIMA_GEM_INFO, struct drm_lima_gem_info)
-#define DRM_IOCTL_LIMA_GEM_SUBMIT \
- DRM_IOW(DRM_COMMAND_BASE + DRM_LIMA_GEM_SUBMIT, \
- struct drm_lima_gem_submit)
-#define DRM_IOCTL_LIMA_GEM_WAIT \
- DRM_IOW(DRM_COMMAND_BASE + DRM_LIMA_GEM_WAIT, struct drm_lima_gem_wait)
-#define DRM_IOCTL_LIMA_CTX_CREATE \
- DRM_IOR(DRM_COMMAND_BASE + DRM_LIMA_CTX_CREATE, \
- struct drm_lima_ctx_create)
-#define DRM_IOCTL_LIMA_CTX_FREE \
- DRM_IOW(DRM_COMMAND_BASE + DRM_LIMA_CTX_FREE, struct drm_lima_ctx_free)
+#define DRM_IOCTL_LIMA_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_LIMA_GET_PARAM, struct drm_lima_get_param)
+#define DRM_IOCTL_LIMA_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_LIMA_GEM_CREATE, struct drm_lima_gem_create)
+#define DRM_IOCTL_LIMA_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_LIMA_GEM_INFO, struct drm_lima_gem_info)
+#define DRM_IOCTL_LIMA_GEM_SUBMIT DRM_IOW(DRM_COMMAND_BASE + DRM_LIMA_GEM_SUBMIT, struct drm_lima_gem_submit)
+#define DRM_IOCTL_LIMA_GEM_WAIT DRM_IOW(DRM_COMMAND_BASE + DRM_LIMA_GEM_WAIT, struct drm_lima_gem_wait)
+#define DRM_IOCTL_LIMA_CTX_CREATE DRM_IOR(DRM_COMMAND_BASE + DRM_LIMA_CTX_CREATE, struct drm_lima_ctx_create)
+#define DRM_IOCTL_LIMA_CTX_FREE DRM_IOW(DRM_COMMAND_BASE + DRM_LIMA_CTX_FREE, struct drm_lima_ctx_free)
#if defined(__cplusplus)
}
diff --git a/include/arch/x86_64/drm/msm_drm.h b/include/arch/x86_64/drm/msm_drm.h
index efc01123..caeac45d 100644
--- a/include/arch/x86_64/drm/msm_drm.h
+++ b/include/arch/x86_64/drm/msm_drm.h
@@ -71,18 +71,17 @@ struct drm_msm_timespec {
* "RW" indicates a param that can be both read (GET_PARAM) and written
* (SET_PARAM)
*/
-#define MSM_PARAM_GPU_ID 0x01 /* RO */
-#define MSM_PARAM_GMEM_SIZE 0x02 /* RO */
-#define MSM_PARAM_CHIP_ID 0x03 /* RO */
-#define MSM_PARAM_MAX_FREQ 0x04 /* RO */
-#define MSM_PARAM_TIMESTAMP 0x05 /* RO */
-#define MSM_PARAM_GMEM_BASE 0x06 /* RO */
-#define MSM_PARAM_PRIORITIES 0x07 /* RO: The # of priority levels */
-#define MSM_PARAM_PP_PGTABLE 0x08 /* RO: Deprecated, always returns zero */
-#define MSM_PARAM_FAULTS 0x09 /* RO */
-#define MSM_PARAM_SUSPENDS 0x0a /* RO */
-#define MSM_PARAM_SYSPROF \
- 0x0b /* WO: 1 preserves perfcntrs, 2 also disables suspend */
+#define MSM_PARAM_GPU_ID 0x01 /* RO */
+#define MSM_PARAM_GMEM_SIZE 0x02 /* RO */
+#define MSM_PARAM_CHIP_ID 0x03 /* RO */
+#define MSM_PARAM_MAX_FREQ 0x04 /* RO */
+#define MSM_PARAM_TIMESTAMP 0x05 /* RO */
+#define MSM_PARAM_GMEM_BASE 0x06 /* RO */
+#define MSM_PARAM_PRIORITIES 0x07 /* RO: The # of priority levels */
+#define MSM_PARAM_PP_PGTABLE 0x08 /* RO: Deprecated, always returns zero */
+#define MSM_PARAM_FAULTS 0x09 /* RO */
+#define MSM_PARAM_SUSPENDS 0x0a /* RO */
+#define MSM_PARAM_SYSPROF 0x0b /* WO: 1 preserves perfcntrs, 2 also disables suspend */
#define MSM_PARAM_COMM 0x0c /* WO: override for task->comm */
#define MSM_PARAM_CMDLINE 0x0d /* WO: override for task cmdline */
#define MSM_PARAM_VA_START 0x0e /* RO: start of valid GPU iova range */
@@ -161,9 +160,7 @@ struct drm_msm_param {
#define MSM_BO_UNCACHED 0x00040000 /* deprecated, use MSM_BO_WC */
#define MSM_BO_CACHED_COHERENT 0x080000
-#define MSM_BO_FLAGS \
- (MSM_BO_SCANOUT | MSM_BO_GPU_READONLY | MSM_BO_NO_SHARE | \
- MSM_BO_CACHE_MASK)
+#define MSM_BO_FLAGS (MSM_BO_SCANOUT | MSM_BO_GPU_READONLY | MSM_BO_NO_SHARE | MSM_BO_CACHE_MASK)
struct drm_msm_gem_new {
__u64 size; /* in */
@@ -200,8 +197,7 @@ struct drm_msm_gem_info {
#define MSM_PREP_NOSYNC 0x04
#define MSM_PREP_BOOST 0x08
-#define MSM_PREP_FLAGS \
- (MSM_PREP_READ | MSM_PREP_WRITE | MSM_PREP_NOSYNC | MSM_PREP_BOOST | 0)
+#define MSM_PREP_FLAGS (MSM_PREP_READ | MSM_PREP_WRITE | MSM_PREP_NOSYNC | MSM_PREP_BOOST | 0)
struct drm_msm_gem_cpu_prep {
__u32 handle; /* in */
@@ -289,9 +285,7 @@ struct drm_msm_gem_submit_cmd {
#define MSM_SUBMIT_BO_DUMP 0x0004
#define MSM_SUBMIT_BO_NO_IMPLICIT 0x0008
-#define MSM_SUBMIT_BO_FLAGS \
- (MSM_SUBMIT_BO_READ | MSM_SUBMIT_BO_WRITE | MSM_SUBMIT_BO_DUMP | \
- MSM_SUBMIT_BO_NO_IMPLICIT)
+#define MSM_SUBMIT_BO_FLAGS (MSM_SUBMIT_BO_READ | MSM_SUBMIT_BO_WRITE | MSM_SUBMIT_BO_DUMP | MSM_SUBMIT_BO_NO_IMPLICIT)
struct drm_msm_gem_submit_bo {
__u32 flags; /* in, mask of MSM_SUBMIT_BO_x */
@@ -309,24 +303,23 @@ struct drm_msm_gem_submit_bo {
#define MSM_SUBMIT_FENCE_SN_IN \
0x02000000 /* userspace passes in seqno fence \
*/
-#define MSM_SUBMIT_FLAGS \
- (MSM_SUBMIT_NO_IMPLICIT | MSM_SUBMIT_FENCE_FD_IN | \
- MSM_SUBMIT_FENCE_FD_OUT | MSM_SUBMIT_SUDO | MSM_SUBMIT_SYNCOBJ_IN | \
- MSM_SUBMIT_SYNCOBJ_OUT | MSM_SUBMIT_FENCE_SN_IN | 0)
+#define MSM_SUBMIT_FLAGS \
+ (MSM_SUBMIT_NO_IMPLICIT | MSM_SUBMIT_FENCE_FD_IN | MSM_SUBMIT_FENCE_FD_OUT | MSM_SUBMIT_SUDO | \
+ MSM_SUBMIT_SYNCOBJ_IN | MSM_SUBMIT_SYNCOBJ_OUT | MSM_SUBMIT_FENCE_SN_IN | 0)
/* Each cmdstream submit consists of a table of buffers involved, and
* one or more cmdstream buffers. This allows for conditional execution
* (context-restore), and IB buffers needed for per tile/bin draw cmds.
*/
struct drm_msm_gem_submit {
- __u32 flags; /* MSM_PIPE_x | MSM_SUBMIT_x */
- __u32 fence; /* out (or in with MSM_SUBMIT_FENCE_SN_IN flag) */
- __u32 nr_bos; /* in, number of submit_bo's */
- __u32 nr_cmds; /* in, number of submit_cmd's */
- __u64 bos; /* in, ptr to array of submit_bo's */
- __u64 cmds; /* in, ptr to array of submit_cmd's */
- __s32 fence_fd; /* in/out fence fd (see MSM_SUBMIT_FENCE_FD_IN/OUT) */
- __u32 queueid; /* in, submitqueue id */
+ __u32 flags; /* MSM_PIPE_x | MSM_SUBMIT_x */
+ __u32 fence; /* out (or in with MSM_SUBMIT_FENCE_SN_IN flag) */
+ __u32 nr_bos; /* in, number of submit_bo's */
+ __u32 nr_cmds; /* in, number of submit_cmd's */
+ __u64 bos; /* in, ptr to array of submit_bo's */
+ __u64 cmds; /* in, ptr to array of submit_cmd's */
+ __s32 fence_fd; /* in/out fence fd (see MSM_SUBMIT_FENCE_FD_IN/OUT) */
+ __u32 queueid; /* in, submitqueue id */
__u64 in_syncobjs; /* in, ptr to array of drm_msm_syncobj */
__u64 out_syncobjs; /* in, ptr to array of drm_msm_syncobj */
__u32 nr_in_syncobjs; /* in, number of entries in in_syncobj */
@@ -364,8 +357,7 @@ struct drm_msm_vm_bind_op {
#define MSM_VM_BIND_FENCE_FD_IN 0x00000001
#define MSM_VM_BIND_FENCE_FD_OUT 0x00000002
-#define MSM_VM_BIND_FLAGS \
- (MSM_VM_BIND_FENCE_FD_IN | MSM_VM_BIND_FENCE_FD_OUT | 0)
+#define MSM_VM_BIND_FLAGS (MSM_VM_BIND_FENCE_FD_IN | MSM_VM_BIND_FENCE_FD_OUT | 0)
/**
* struct drm_msm_vm_bind - Input of &DRM_IOCTL_MSM_VM_BIND
@@ -428,8 +420,7 @@ struct drm_msm_wait_fence {
* In the WILLNEED case, 'retained' indicates to userspace whether the
* backing pages still exist.
*/
-#define MSM_MADV_WILLNEED \
- 0 /* backing pages are needed, status returned in 'retained' */
+#define MSM_MADV_WILLNEED 0 /* backing pages are needed, status returned in 'retained' */
#define MSM_MADV_DONTNEED 1 /* backing pages not needed */
#define __MSM_MADV_PURGED 2 /* internal state */
@@ -452,8 +443,7 @@ struct drm_msm_gem_madvise {
#define MSM_SUBMITQUEUE_ALLOW_PREEMPT 0x00000001
#define MSM_SUBMITQUEUE_VM_BIND 0x00000002 /* virtual queue for VM_BIND ops */
-#define MSM_SUBMITQUEUE_FLAGS \
- (MSM_SUBMITQUEUE_ALLOW_PREEMPT | MSM_SUBMITQUEUE_VM_BIND | 0)
+#define MSM_SUBMITQUEUE_FLAGS (MSM_SUBMITQUEUE_ALLOW_PREEMPT | MSM_SUBMITQUEUE_VM_BIND | 0)
/*
* The submitqueue priority should be between 0 and MSM_PARAM_PRIORITIES-1,
@@ -492,39 +482,20 @@ struct drm_msm_submitqueue_query {
#define DRM_MSM_SUBMITQUEUE_QUERY 0x0C
#define DRM_MSM_VM_BIND 0x0D
-#define DRM_IOCTL_MSM_GET_PARAM \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GET_PARAM, struct drm_msm_param)
-#define DRM_IOCTL_MSM_SET_PARAM \
- DRM_IOW(DRM_COMMAND_BASE + DRM_MSM_SET_PARAM, struct drm_msm_param)
-#define DRM_IOCTL_MSM_GEM_NEW \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_NEW, struct drm_msm_gem_new)
-#define DRM_IOCTL_MSM_GEM_INFO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_INFO, struct drm_msm_gem_info)
-#define DRM_IOCTL_MSM_GEM_CPU_PREP \
- DRM_IOW(DRM_COMMAND_BASE + DRM_MSM_GEM_CPU_PREP, \
- struct drm_msm_gem_cpu_prep)
-#define DRM_IOCTL_MSM_GEM_CPU_FINI \
- DRM_IOW(DRM_COMMAND_BASE + DRM_MSM_GEM_CPU_FINI, \
- struct drm_msm_gem_cpu_fini)
-#define DRM_IOCTL_MSM_GEM_SUBMIT \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_SUBMIT, \
- struct drm_msm_gem_submit)
-#define DRM_IOCTL_MSM_WAIT_FENCE \
- DRM_IOW(DRM_COMMAND_BASE + DRM_MSM_WAIT_FENCE, \
- struct drm_msm_wait_fence)
-#define DRM_IOCTL_MSM_GEM_MADVISE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_MADVISE, \
- struct drm_msm_gem_madvise)
-#define DRM_IOCTL_MSM_SUBMITQUEUE_NEW \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_NEW, \
- struct drm_msm_submitqueue)
-#define DRM_IOCTL_MSM_SUBMITQUEUE_CLOSE \
- DRM_IOW(DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_CLOSE, __u32)
-#define DRM_IOCTL_MSM_SUBMITQUEUE_QUERY \
- DRM_IOW(DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_QUERY, \
- struct drm_msm_submitqueue_query)
-#define DRM_IOCTL_MSM_VM_BIND \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_VM_BIND, struct drm_msm_vm_bind)
+#define DRM_IOCTL_MSM_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GET_PARAM, struct drm_msm_param)
+#define DRM_IOCTL_MSM_SET_PARAM DRM_IOW(DRM_COMMAND_BASE + DRM_MSM_SET_PARAM, struct drm_msm_param)
+#define DRM_IOCTL_MSM_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_NEW, struct drm_msm_gem_new)
+#define DRM_IOCTL_MSM_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_INFO, struct drm_msm_gem_info)
+#define DRM_IOCTL_MSM_GEM_CPU_PREP DRM_IOW(DRM_COMMAND_BASE + DRM_MSM_GEM_CPU_PREP, struct drm_msm_gem_cpu_prep)
+#define DRM_IOCTL_MSM_GEM_CPU_FINI DRM_IOW(DRM_COMMAND_BASE + DRM_MSM_GEM_CPU_FINI, struct drm_msm_gem_cpu_fini)
+#define DRM_IOCTL_MSM_GEM_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_SUBMIT, struct drm_msm_gem_submit)
+#define DRM_IOCTL_MSM_WAIT_FENCE DRM_IOW(DRM_COMMAND_BASE + DRM_MSM_WAIT_FENCE, struct drm_msm_wait_fence)
+#define DRM_IOCTL_MSM_GEM_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_MADVISE, struct drm_msm_gem_madvise)
+#define DRM_IOCTL_MSM_SUBMITQUEUE_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_NEW, struct drm_msm_submitqueue)
+#define DRM_IOCTL_MSM_SUBMITQUEUE_CLOSE DRM_IOW(DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_CLOSE, __u32)
+#define DRM_IOCTL_MSM_SUBMITQUEUE_QUERY \
+ DRM_IOW(DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_QUERY, struct drm_msm_submitqueue_query)
+#define DRM_IOCTL_MSM_VM_BIND DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_VM_BIND, struct drm_msm_vm_bind)
#if defined(__cplusplus)
}
diff --git a/include/arch/x86_64/drm/nouveau_drm.h b/include/arch/x86_64/drm/nouveau_drm.h
index 8ba0ee86..78659301 100644
--- a/include/arch/x86_64/drm/nouveau_drm.h
+++ b/include/arch/x86_64/drm/nouveau_drm.h
@@ -496,47 +496,27 @@ struct drm_nouveau_svm_bind {
*/
#define NOUVEAU_SVM_BIND_TARGET__GPU_VRAM (1UL << 31)
-#define DRM_IOCTL_NOUVEAU_GETPARAM \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GETPARAM, \
- struct drm_nouveau_getparam)
-#define DRM_IOCTL_NOUVEAU_CHANNEL_ALLOC \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_CHANNEL_ALLOC, \
- struct drm_nouveau_channel_alloc)
-#define DRM_IOCTL_NOUVEAU_CHANNEL_FREE \
- DRM_IOW(DRM_COMMAND_BASE + DRM_NOUVEAU_CHANNEL_FREE, \
- struct drm_nouveau_channel_free)
-
-#define DRM_IOCTL_NOUVEAU_SVM_INIT \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_SVM_INIT, \
- struct drm_nouveau_svm_init)
-#define DRM_IOCTL_NOUVEAU_SVM_BIND \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_SVM_BIND, \
- struct drm_nouveau_svm_bind)
-
-#define DRM_IOCTL_NOUVEAU_GEM_NEW \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_NEW, \
- struct drm_nouveau_gem_new)
-#define DRM_IOCTL_NOUVEAU_GEM_PUSHBUF \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_PUSHBUF, \
- struct drm_nouveau_gem_pushbuf)
-#define DRM_IOCTL_NOUVEAU_GEM_CPU_PREP \
- DRM_IOW(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_CPU_PREP, \
- struct drm_nouveau_gem_cpu_prep)
-#define DRM_IOCTL_NOUVEAU_GEM_CPU_FINI \
- DRM_IOW(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_CPU_FINI, \
- struct drm_nouveau_gem_cpu_fini)
-#define DRM_IOCTL_NOUVEAU_GEM_INFO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_INFO, \
- struct drm_nouveau_gem_info)
-
-#define DRM_IOCTL_NOUVEAU_VM_INIT \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_VM_INIT, \
- struct drm_nouveau_vm_init)
-#define DRM_IOCTL_NOUVEAU_VM_BIND \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_VM_BIND, \
- struct drm_nouveau_vm_bind)
-#define DRM_IOCTL_NOUVEAU_EXEC \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_EXEC, struct drm_nouveau_exec)
+#define DRM_IOCTL_NOUVEAU_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GETPARAM, struct drm_nouveau_getparam)
+#define DRM_IOCTL_NOUVEAU_CHANNEL_ALLOC \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_CHANNEL_ALLOC, struct drm_nouveau_channel_alloc)
+#define DRM_IOCTL_NOUVEAU_CHANNEL_FREE \
+ DRM_IOW(DRM_COMMAND_BASE + DRM_NOUVEAU_CHANNEL_FREE, struct drm_nouveau_channel_free)
+
+#define DRM_IOCTL_NOUVEAU_SVM_INIT DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_SVM_INIT, struct drm_nouveau_svm_init)
+#define DRM_IOCTL_NOUVEAU_SVM_BIND DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_SVM_BIND, struct drm_nouveau_svm_bind)
+
+#define DRM_IOCTL_NOUVEAU_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_NEW, struct drm_nouveau_gem_new)
+#define DRM_IOCTL_NOUVEAU_GEM_PUSHBUF \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_PUSHBUF, struct drm_nouveau_gem_pushbuf)
+#define DRM_IOCTL_NOUVEAU_GEM_CPU_PREP \
+ DRM_IOW(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_CPU_PREP, struct drm_nouveau_gem_cpu_prep)
+#define DRM_IOCTL_NOUVEAU_GEM_CPU_FINI \
+ DRM_IOW(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_CPU_FINI, struct drm_nouveau_gem_cpu_fini)
+#define DRM_IOCTL_NOUVEAU_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_INFO, struct drm_nouveau_gem_info)
+
+#define DRM_IOCTL_NOUVEAU_VM_INIT DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_VM_INIT, struct drm_nouveau_vm_init)
+#define DRM_IOCTL_NOUVEAU_VM_BIND DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_VM_BIND, struct drm_nouveau_vm_bind)
+#define DRM_IOCTL_NOUVEAU_EXEC DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_EXEC, struct drm_nouveau_exec)
#if defined(__cplusplus)
}
#endif
diff --git a/include/arch/x86_64/drm/nova_drm.h b/include/arch/x86_64/drm/nova_drm.h
index 5725b84e..d29dfbb9 100644
--- a/include/arch/x86_64/drm/nova_drm.h
+++ b/include/arch/x86_64/drm/nova_drm.h
@@ -86,13 +86,9 @@ struct drm_nova_gem_info {
/* Note: this is an enum so that it can be resolved by Rust bindgen. */
enum {
- DRM_IOCTL_NOVA_GETPARAM = DRM_IOWR(DRM_COMMAND_BASE + DRM_NOVA_GETPARAM,
- struct drm_nova_getparam),
- DRM_IOCTL_NOVA_GEM_CREATE =
- DRM_IOWR(DRM_COMMAND_BASE + DRM_NOVA_GEM_CREATE,
- struct drm_nova_gem_create),
- DRM_IOCTL_NOVA_GEM_INFO = DRM_IOWR(DRM_COMMAND_BASE + DRM_NOVA_GEM_INFO,
- struct drm_nova_gem_info),
+ DRM_IOCTL_NOVA_GETPARAM = DRM_IOWR(DRM_COMMAND_BASE + DRM_NOVA_GETPARAM, struct drm_nova_getparam),
+ DRM_IOCTL_NOVA_GEM_CREATE = DRM_IOWR(DRM_COMMAND_BASE + DRM_NOVA_GEM_CREATE, struct drm_nova_gem_create),
+ DRM_IOCTL_NOVA_GEM_INFO = DRM_IOWR(DRM_COMMAND_BASE + DRM_NOVA_GEM_INFO, struct drm_nova_gem_info),
};
#if defined(__cplusplus)
diff --git a/include/arch/x86_64/drm/omap_drm.h b/include/arch/x86_64/drm/omap_drm.h
index 54f01ad1..dbb3c58e 100644
--- a/include/arch/x86_64/drm/omap_drm.h
+++ b/include/arch/x86_64/drm/omap_drm.h
@@ -113,20 +113,12 @@ struct drm_omap_gem_info {
#define DRM_OMAP_GEM_INFO 0x06
#define DRM_OMAP_NUM_IOCTLS 0x07
-#define DRM_IOCTL_OMAP_GET_PARAM \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GET_PARAM, struct drm_omap_param)
-#define DRM_IOCTL_OMAP_SET_PARAM \
- DRM_IOW(DRM_COMMAND_BASE + DRM_OMAP_SET_PARAM, struct drm_omap_param)
-#define DRM_IOCTL_OMAP_GEM_NEW \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_NEW, struct drm_omap_gem_new)
-#define DRM_IOCTL_OMAP_GEM_CPU_PREP \
- DRM_IOW(DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_PREP, \
- struct drm_omap_gem_cpu_prep)
-#define DRM_IOCTL_OMAP_GEM_CPU_FINI \
- DRM_IOW(DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_FINI, \
- struct drm_omap_gem_cpu_fini)
-#define DRM_IOCTL_OMAP_GEM_INFO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_INFO, struct drm_omap_gem_info)
+#define DRM_IOCTL_OMAP_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GET_PARAM, struct drm_omap_param)
+#define DRM_IOCTL_OMAP_SET_PARAM DRM_IOW(DRM_COMMAND_BASE + DRM_OMAP_SET_PARAM, struct drm_omap_param)
+#define DRM_IOCTL_OMAP_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_NEW, struct drm_omap_gem_new)
+#define DRM_IOCTL_OMAP_GEM_CPU_PREP DRM_IOW(DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_PREP, struct drm_omap_gem_cpu_prep)
+#define DRM_IOCTL_OMAP_GEM_CPU_FINI DRM_IOW(DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_FINI, struct drm_omap_gem_cpu_fini)
+#define DRM_IOCTL_OMAP_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_INFO, struct drm_omap_gem_info)
#if defined(__cplusplus)
}
diff --git a/include/arch/x86_64/drm/panfrost_drm.h b/include/arch/x86_64/drm/panfrost_drm.h
index 2ce0e858..accbcba2 100644
--- a/include/arch/x86_64/drm/panfrost_drm.h
+++ b/include/arch/x86_64/drm/panfrost_drm.h
@@ -23,30 +23,16 @@ extern "C" {
#define DRM_PANFROST_MADVISE 0x08
#define DRM_PANFROST_SET_LABEL_BO 0x09
-#define DRM_IOCTL_PANFROST_SUBMIT \
- DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_SUBMIT, \
- struct drm_panfrost_submit)
-#define DRM_IOCTL_PANFROST_WAIT_BO \
- DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_WAIT_BO, \
- struct drm_panfrost_wait_bo)
-#define DRM_IOCTL_PANFROST_CREATE_BO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_CREATE_BO, \
- struct drm_panfrost_create_bo)
-#define DRM_IOCTL_PANFROST_MMAP_BO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_MMAP_BO, \
- struct drm_panfrost_mmap_bo)
-#define DRM_IOCTL_PANFROST_GET_PARAM \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_GET_PARAM, \
- struct drm_panfrost_get_param)
-#define DRM_IOCTL_PANFROST_GET_BO_OFFSET \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_GET_BO_OFFSET, \
- struct drm_panfrost_get_bo_offset)
-#define DRM_IOCTL_PANFROST_MADVISE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_MADVISE, \
- struct drm_panfrost_madvise)
-#define DRM_IOCTL_PANFROST_SET_LABEL_BO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_SET_LABEL_BO, \
- struct drm_panfrost_set_label_bo)
+#define DRM_IOCTL_PANFROST_SUBMIT DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_SUBMIT, struct drm_panfrost_submit)
+#define DRM_IOCTL_PANFROST_WAIT_BO DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_WAIT_BO, struct drm_panfrost_wait_bo)
+#define DRM_IOCTL_PANFROST_CREATE_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_CREATE_BO, struct drm_panfrost_create_bo)
+#define DRM_IOCTL_PANFROST_MMAP_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_MMAP_BO, struct drm_panfrost_mmap_bo)
+#define DRM_IOCTL_PANFROST_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_GET_PARAM, struct drm_panfrost_get_param)
+#define DRM_IOCTL_PANFROST_GET_BO_OFFSET \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_GET_BO_OFFSET, struct drm_panfrost_get_bo_offset)
+#define DRM_IOCTL_PANFROST_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_MADVISE, struct drm_panfrost_madvise)
+#define DRM_IOCTL_PANFROST_SET_LABEL_BO \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_SET_LABEL_BO, struct drm_panfrost_set_label_bo)
/*
* Unstable ioctl(s): only exposed when the unsafe unstable_ioctls module
@@ -54,12 +40,10 @@ extern "C" {
* All these ioctl(s) are subject to deprecation, so please don't rely on
* them for anything but debugging purpose.
*/
-#define DRM_IOCTL_PANFROST_PERFCNT_ENABLE \
- DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_PERFCNT_ENABLE, \
- struct drm_panfrost_perfcnt_enable)
-#define DRM_IOCTL_PANFROST_PERFCNT_DUMP \
- DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_PERFCNT_DUMP, \
- struct drm_panfrost_perfcnt_dump)
+#define DRM_IOCTL_PANFROST_PERFCNT_ENABLE \
+ DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_PERFCNT_ENABLE, struct drm_panfrost_perfcnt_enable)
+#define DRM_IOCTL_PANFROST_PERFCNT_DUMP \
+ DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_PERFCNT_DUMP, struct drm_panfrost_perfcnt_dump)
#define PANFROST_JD_REQ_FS (1 << 0)
#define PANFROST_JD_REQ_CYCLE_COUNT (1 << 1)
@@ -240,8 +224,7 @@ struct drm_panfrost_perfcnt_dump {
* In the WILLNEED case, 'retained' indicates to userspace whether the
* backing pages still exist.
*/
-#define PANFROST_MADV_WILLNEED \
- 0 /* backing pages are needed, status returned in 'retained' */
+#define PANFROST_MADV_WILLNEED 0 /* backing pages are needed, status returned in 'retained' */
#define PANFROST_MADV_DONTNEED 1 /* backing pages not needed */
struct drm_panfrost_madvise {
diff --git a/include/arch/x86_64/drm/panthor_drm.h b/include/arch/x86_64/drm/panthor_drm.h
index cd9b3ad8..e5517d39 100644
--- a/include/arch/x86_64/drm/panthor_drm.h
+++ b/include/arch/x86_64/drm/panthor_drm.h
@@ -67,9 +67,8 @@ extern "C" {
*/
#define DRM_PANTHOR_USER_MMIO_OFFSET_32BIT (1ull << 43)
#define DRM_PANTHOR_USER_MMIO_OFFSET_64BIT (1ull << 56)
-#define DRM_PANTHOR_USER_MMIO_OFFSET \
- (sizeof(unsigned long) < 8 ? DRM_PANTHOR_USER_MMIO_OFFSET_32BIT : \
- DRM_PANTHOR_USER_MMIO_OFFSET_64BIT)
+#define DRM_PANTHOR_USER_MMIO_OFFSET \
+ (sizeof(unsigned long) < 8 ? DRM_PANTHOR_USER_MMIO_OFFSET_32BIT : DRM_PANTHOR_USER_MMIO_OFFSET_64BIT)
#define DRM_PANTHOR_USER_FLUSH_ID_MMIO_OFFSET (DRM_PANTHOR_USER_MMIO_OFFSET | 0)
/**
@@ -184,10 +183,7 @@ struct drm_panthor_obj_array {
* Macro initializing a drm_panthor_obj_array based on the object size as known
* by userspace.
*/
-#define DRM_PANTHOR_OBJ_ARRAY(cnt, ptr) \
- { .stride = sizeof((ptr)[0]), \
- .count = (cnt), \
- .array = (__u64)(uintptr_t)(ptr) }
+#define DRM_PANTHOR_OBJ_ARRAY(cnt, ptr) { .stride = sizeof((ptr)[0]), .count = (cnt), .array = (__u64)(uintptr_t)(ptr) }
/**
* enum drm_panthor_sync_op_flags - Synchronization operation flags.
@@ -1097,40 +1093,25 @@ struct drm_panthor_set_user_mmio_offset {
*
* Return: An IOCTL number to be passed to ioctl() from userspace.
*/
-#define DRM_IOCTL_PANTHOR(__access, __id, __type) \
- DRM_IO##__access(DRM_COMMAND_BASE + DRM_PANTHOR_##__id, \
- struct drm_panthor_##__type)
+#define DRM_IOCTL_PANTHOR(__access, __id, __type) \
+ DRM_IO##__access(DRM_COMMAND_BASE + DRM_PANTHOR_##__id, struct drm_panthor_##__type)
enum {
- DRM_IOCTL_PANTHOR_DEV_QUERY =
- DRM_IOCTL_PANTHOR(WR, DEV_QUERY, dev_query),
- DRM_IOCTL_PANTHOR_VM_CREATE =
- DRM_IOCTL_PANTHOR(WR, VM_CREATE, vm_create),
- DRM_IOCTL_PANTHOR_VM_DESTROY =
- DRM_IOCTL_PANTHOR(WR, VM_DESTROY, vm_destroy),
+ DRM_IOCTL_PANTHOR_DEV_QUERY = DRM_IOCTL_PANTHOR(WR, DEV_QUERY, dev_query),
+ DRM_IOCTL_PANTHOR_VM_CREATE = DRM_IOCTL_PANTHOR(WR, VM_CREATE, vm_create),
+ DRM_IOCTL_PANTHOR_VM_DESTROY = DRM_IOCTL_PANTHOR(WR, VM_DESTROY, vm_destroy),
DRM_IOCTL_PANTHOR_VM_BIND = DRM_IOCTL_PANTHOR(WR, VM_BIND, vm_bind),
- DRM_IOCTL_PANTHOR_VM_GET_STATE =
- DRM_IOCTL_PANTHOR(WR, VM_GET_STATE, vm_get_state),
- DRM_IOCTL_PANTHOR_BO_CREATE =
- DRM_IOCTL_PANTHOR(WR, BO_CREATE, bo_create),
- DRM_IOCTL_PANTHOR_BO_MMAP_OFFSET =
- DRM_IOCTL_PANTHOR(WR, BO_MMAP_OFFSET, bo_mmap_offset),
- DRM_IOCTL_PANTHOR_GROUP_CREATE =
- DRM_IOCTL_PANTHOR(WR, GROUP_CREATE, group_create),
- DRM_IOCTL_PANTHOR_GROUP_DESTROY =
- DRM_IOCTL_PANTHOR(WR, GROUP_DESTROY, group_destroy),
- DRM_IOCTL_PANTHOR_GROUP_SUBMIT =
- DRM_IOCTL_PANTHOR(WR, GROUP_SUBMIT, group_submit),
- DRM_IOCTL_PANTHOR_GROUP_GET_STATE =
- DRM_IOCTL_PANTHOR(WR, GROUP_GET_STATE, group_get_state),
- DRM_IOCTL_PANTHOR_TILER_HEAP_CREATE =
- DRM_IOCTL_PANTHOR(WR, TILER_HEAP_CREATE, tiler_heap_create),
- DRM_IOCTL_PANTHOR_TILER_HEAP_DESTROY =
- DRM_IOCTL_PANTHOR(WR, TILER_HEAP_DESTROY, tiler_heap_destroy),
- DRM_IOCTL_PANTHOR_BO_SET_LABEL =
- DRM_IOCTL_PANTHOR(WR, BO_SET_LABEL, bo_set_label),
- DRM_IOCTL_PANTHOR_SET_USER_MMIO_OFFSET = DRM_IOCTL_PANTHOR(
- WR, SET_USER_MMIO_OFFSET, set_user_mmio_offset),
+ DRM_IOCTL_PANTHOR_VM_GET_STATE = DRM_IOCTL_PANTHOR(WR, VM_GET_STATE, vm_get_state),
+ DRM_IOCTL_PANTHOR_BO_CREATE = DRM_IOCTL_PANTHOR(WR, BO_CREATE, bo_create),
+ DRM_IOCTL_PANTHOR_BO_MMAP_OFFSET = DRM_IOCTL_PANTHOR(WR, BO_MMAP_OFFSET, bo_mmap_offset),
+ DRM_IOCTL_PANTHOR_GROUP_CREATE = DRM_IOCTL_PANTHOR(WR, GROUP_CREATE, group_create),
+ DRM_IOCTL_PANTHOR_GROUP_DESTROY = DRM_IOCTL_PANTHOR(WR, GROUP_DESTROY, group_destroy),
+ DRM_IOCTL_PANTHOR_GROUP_SUBMIT = DRM_IOCTL_PANTHOR(WR, GROUP_SUBMIT, group_submit),
+ DRM_IOCTL_PANTHOR_GROUP_GET_STATE = DRM_IOCTL_PANTHOR(WR, GROUP_GET_STATE, group_get_state),
+ DRM_IOCTL_PANTHOR_TILER_HEAP_CREATE = DRM_IOCTL_PANTHOR(WR, TILER_HEAP_CREATE, tiler_heap_create),
+ DRM_IOCTL_PANTHOR_TILER_HEAP_DESTROY = DRM_IOCTL_PANTHOR(WR, TILER_HEAP_DESTROY, tiler_heap_destroy),
+ DRM_IOCTL_PANTHOR_BO_SET_LABEL = DRM_IOCTL_PANTHOR(WR, BO_SET_LABEL, bo_set_label),
+ DRM_IOCTL_PANTHOR_SET_USER_MMIO_OFFSET = DRM_IOCTL_PANTHOR(WR, SET_USER_MMIO_OFFSET, set_user_mmio_offset),
};
#if defined(__cplusplus)
diff --git a/include/arch/x86_64/drm/pvr_drm.h b/include/arch/x86_64/drm/pvr_drm.h
index fdaac8dd..b77a84fe 100644
--- a/include/arch/x86_64/drm/pvr_drm.h
+++ b/include/arch/x86_64/drm/pvr_drm.h
@@ -71,10 +71,7 @@ struct drm_pvr_obj_array {
*
* Return: Literal of type &struct drm_pvr_obj_array.
*/
-#define DRM_PVR_OBJ_ARRAY(cnt, ptr) \
- { .stride = sizeof((ptr)[0]), \
- .count = (cnt), \
- .array = (__u64)(uintptr_t)(ptr) }
+#define DRM_PVR_OBJ_ARRAY(cnt, ptr) { .stride = sizeof((ptr)[0]), .count = (cnt), .array = (__u64)(uintptr_t)(ptr) }
/**
* DOC: PowerVR IOCTL interface
@@ -94,30 +91,22 @@ struct drm_pvr_obj_array {
*
* Return: An IOCTL number to be passed to ioctl() from userspace.
*/
-#define PVR_IOCTL(_ioctl, _mode, _data) \
- _mode(DRM_COMMAND_BASE + (_ioctl), struct drm_pvr_ioctl_##_data##_args)
-
-#define DRM_IOCTL_PVR_DEV_QUERY PVR_IOCTL(0x00, DRM_IOWR, dev_query)
-#define DRM_IOCTL_PVR_CREATE_BO PVR_IOCTL(0x01, DRM_IOWR, create_bo)
-#define DRM_IOCTL_PVR_GET_BO_MMAP_OFFSET \
- PVR_IOCTL(0x02, DRM_IOWR, get_bo_mmap_offset)
-#define DRM_IOCTL_PVR_CREATE_VM_CONTEXT \
- PVR_IOCTL(0x03, DRM_IOWR, create_vm_context)
-#define DRM_IOCTL_PVR_DESTROY_VM_CONTEXT \
- PVR_IOCTL(0x04, DRM_IOW, destroy_vm_context)
-#define DRM_IOCTL_PVR_VM_MAP PVR_IOCTL(0x05, DRM_IOW, vm_map)
-#define DRM_IOCTL_PVR_VM_UNMAP PVR_IOCTL(0x06, DRM_IOW, vm_unmap)
-#define DRM_IOCTL_PVR_CREATE_CONTEXT PVR_IOCTL(0x07, DRM_IOWR, create_context)
-#define DRM_IOCTL_PVR_DESTROY_CONTEXT PVR_IOCTL(0x08, DRM_IOW, destroy_context)
-#define DRM_IOCTL_PVR_CREATE_FREE_LIST \
- PVR_IOCTL(0x09, DRM_IOWR, create_free_list)
-#define DRM_IOCTL_PVR_DESTROY_FREE_LIST \
- PVR_IOCTL(0x0a, DRM_IOW, destroy_free_list)
-#define DRM_IOCTL_PVR_CREATE_HWRT_DATASET \
- PVR_IOCTL(0x0b, DRM_IOWR, create_hwrt_dataset)
-#define DRM_IOCTL_PVR_DESTROY_HWRT_DATASET \
- PVR_IOCTL(0x0c, DRM_IOW, destroy_hwrt_dataset)
-#define DRM_IOCTL_PVR_SUBMIT_JOBS PVR_IOCTL(0x0d, DRM_IOW, submit_jobs)
+#define PVR_IOCTL(_ioctl, _mode, _data) _mode(DRM_COMMAND_BASE + (_ioctl), struct drm_pvr_ioctl_##_data##_args)
+
+#define DRM_IOCTL_PVR_DEV_QUERY PVR_IOCTL(0x00, DRM_IOWR, dev_query)
+#define DRM_IOCTL_PVR_CREATE_BO PVR_IOCTL(0x01, DRM_IOWR, create_bo)
+#define DRM_IOCTL_PVR_GET_BO_MMAP_OFFSET PVR_IOCTL(0x02, DRM_IOWR, get_bo_mmap_offset)
+#define DRM_IOCTL_PVR_CREATE_VM_CONTEXT PVR_IOCTL(0x03, DRM_IOWR, create_vm_context)
+#define DRM_IOCTL_PVR_DESTROY_VM_CONTEXT PVR_IOCTL(0x04, DRM_IOW, destroy_vm_context)
+#define DRM_IOCTL_PVR_VM_MAP PVR_IOCTL(0x05, DRM_IOW, vm_map)
+#define DRM_IOCTL_PVR_VM_UNMAP PVR_IOCTL(0x06, DRM_IOW, vm_unmap)
+#define DRM_IOCTL_PVR_CREATE_CONTEXT PVR_IOCTL(0x07, DRM_IOWR, create_context)
+#define DRM_IOCTL_PVR_DESTROY_CONTEXT PVR_IOCTL(0x08, DRM_IOW, destroy_context)
+#define DRM_IOCTL_PVR_CREATE_FREE_LIST PVR_IOCTL(0x09, DRM_IOWR, create_free_list)
+#define DRM_IOCTL_PVR_DESTROY_FREE_LIST PVR_IOCTL(0x0a, DRM_IOW, destroy_free_list)
+#define DRM_IOCTL_PVR_CREATE_HWRT_DATASET PVR_IOCTL(0x0b, DRM_IOWR, create_hwrt_dataset)
+#define DRM_IOCTL_PVR_DESTROY_HWRT_DATASET PVR_IOCTL(0x0c, DRM_IOW, destroy_hwrt_dataset)
+#define DRM_IOCTL_PVR_SUBMIT_JOBS PVR_IOCTL(0x0d, DRM_IOW, submit_jobs)
/**
* DOC: PowerVR IOCTL DEV_QUERY interface
@@ -557,9 +546,8 @@ struct drm_pvr_ioctl_dev_query_args {
#define DRM_PVR_BO_ALLOW_CPU_USERSPACE_ACCESS _BITULL(2)
/* Bits 3..63 are reserved. */
-#define DRM_PVR_BO_FLAGS_MASK \
- (DRM_PVR_BO_BYPASS_DEVICE_CACHE | DRM_PVR_BO_PM_FW_PROTECT | \
- DRM_PVR_BO_ALLOW_CPU_USERSPACE_ACCESS)
+#define DRM_PVR_BO_FLAGS_MASK \
+ (DRM_PVR_BO_BYPASS_DEVICE_CACHE | DRM_PVR_BO_PM_FW_PROTECT | DRM_PVR_BO_ALLOW_CPU_USERSPACE_ACCESS)
/**
* struct drm_pvr_ioctl_create_bo_args - Arguments for %DRM_IOCTL_PVR_CREATE_BO
@@ -1092,8 +1080,7 @@ struct drm_pvr_ioctl_destroy_hwrt_dataset_args {
#define DRM_PVR_SYNC_OP_FLAG_SIGNAL _BITULL(31)
#define DRM_PVR_SYNC_OP_FLAG_WAIT 0
-#define DRM_PVR_SYNC_OP_FLAGS_MASK \
- (DRM_PVR_SYNC_OP_FLAG_HANDLE_TYPE_MASK | DRM_PVR_SYNC_OP_FLAG_SIGNAL)
+#define DRM_PVR_SYNC_OP_FLAGS_MASK (DRM_PVR_SYNC_OP_FLAG_HANDLE_TYPE_MASK | DRM_PVR_SYNC_OP_FLAG_SIGNAL)
/**
* struct drm_pvr_sync_op - Object describing a sync operation
@@ -1133,9 +1120,7 @@ struct drm_pvr_sync_op {
#define DRM_PVR_SUBMIT_JOB_GEOM_CMD_LAST _BITULL(1)
#define DRM_PVR_SUBMIT_JOB_GEOM_CMD_SINGLE_CORE _BITULL(2)
#define DRM_PVR_SUBMIT_JOB_GEOM_CMD_FLAGS_MASK \
- (DRM_PVR_SUBMIT_JOB_GEOM_CMD_FIRST | \
- DRM_PVR_SUBMIT_JOB_GEOM_CMD_LAST | \
- DRM_PVR_SUBMIT_JOB_GEOM_CMD_SINGLE_CORE)
+ (DRM_PVR_SUBMIT_JOB_GEOM_CMD_FIRST | DRM_PVR_SUBMIT_JOB_GEOM_CMD_LAST | DRM_PVR_SUBMIT_JOB_GEOM_CMD_SINGLE_CORE)
/**
* DOC: Flags for SUBMIT_JOB ioctl fragment command.
@@ -1182,15 +1167,11 @@ struct drm_pvr_sync_op {
#define DRM_PVR_SUBMIT_JOB_FRAG_CMD_GET_VIS_RESULTS _BITULL(5)
#define DRM_PVR_SUBMIT_JOB_FRAG_CMD_PARTIAL_RENDER _BITULL(6)
#define DRM_PVR_SUBMIT_JOB_FRAG_CMD_DISABLE_PIXELMERGE _BITULL(7)
-#define DRM_PVR_SUBMIT_JOB_FRAG_CMD_FLAGS_MASK \
- (DRM_PVR_SUBMIT_JOB_FRAG_CMD_SINGLE_CORE | \
- DRM_PVR_SUBMIT_JOB_FRAG_CMD_DEPTHBUFFER | \
- DRM_PVR_SUBMIT_JOB_FRAG_CMD_STENCILBUFFER | \
- DRM_PVR_SUBMIT_JOB_FRAG_CMD_PREVENT_CDM_OVERLAP | \
- DRM_PVR_SUBMIT_JOB_FRAG_CMD_SCRATCHBUFFER | \
- DRM_PVR_SUBMIT_JOB_FRAG_CMD_GET_VIS_RESULTS | \
- DRM_PVR_SUBMIT_JOB_FRAG_CMD_PARTIAL_RENDER | \
- DRM_PVR_SUBMIT_JOB_FRAG_CMD_DISABLE_PIXELMERGE)
+#define DRM_PVR_SUBMIT_JOB_FRAG_CMD_FLAGS_MASK \
+ (DRM_PVR_SUBMIT_JOB_FRAG_CMD_SINGLE_CORE | DRM_PVR_SUBMIT_JOB_FRAG_CMD_DEPTHBUFFER | \
+ DRM_PVR_SUBMIT_JOB_FRAG_CMD_STENCILBUFFER | DRM_PVR_SUBMIT_JOB_FRAG_CMD_PREVENT_CDM_OVERLAP | \
+ DRM_PVR_SUBMIT_JOB_FRAG_CMD_SCRATCHBUFFER | DRM_PVR_SUBMIT_JOB_FRAG_CMD_GET_VIS_RESULTS | \
+ DRM_PVR_SUBMIT_JOB_FRAG_CMD_PARTIAL_RENDER | DRM_PVR_SUBMIT_JOB_FRAG_CMD_DISABLE_PIXELMERGE)
/**
* DOC: Flags for SUBMIT_JOB ioctl compute command.
@@ -1209,9 +1190,8 @@ struct drm_pvr_sync_op {
*/
#define DRM_PVR_SUBMIT_JOB_COMPUTE_CMD_PREVENT_ALL_OVERLAP _BITULL(0)
#define DRM_PVR_SUBMIT_JOB_COMPUTE_CMD_SINGLE_CORE _BITULL(1)
-#define DRM_PVR_SUBMIT_JOB_COMPUTE_CMD_FLAGS_MASK \
- (DRM_PVR_SUBMIT_JOB_COMPUTE_CMD_PREVENT_ALL_OVERLAP | \
- DRM_PVR_SUBMIT_JOB_COMPUTE_CMD_SINGLE_CORE)
+#define DRM_PVR_SUBMIT_JOB_COMPUTE_CMD_FLAGS_MASK \
+ (DRM_PVR_SUBMIT_JOB_COMPUTE_CMD_PREVENT_ALL_OVERLAP | DRM_PVR_SUBMIT_JOB_COMPUTE_CMD_SINGLE_CORE)
/**
* DOC: Flags for SUBMIT_JOB ioctl transfer command.
@@ -1226,8 +1206,7 @@ struct drm_pvr_sync_op {
*/
#define DRM_PVR_SUBMIT_JOB_TRANSFER_CMD_SINGLE_CORE _BITULL(0)
-#define DRM_PVR_SUBMIT_JOB_TRANSFER_CMD_FLAGS_MASK \
- DRM_PVR_SUBMIT_JOB_TRANSFER_CMD_SINGLE_CORE
+#define DRM_PVR_SUBMIT_JOB_TRANSFER_CMD_FLAGS_MASK DRM_PVR_SUBMIT_JOB_TRANSFER_CMD_SINGLE_CORE
/**
* enum drm_pvr_job_type - Arguments for &struct drm_pvr_job.job_type
diff --git a/include/arch/x86_64/drm/qaic_accel.h b/include/arch/x86_64/drm/qaic_accel.h
index b6497637..491c646d 100644
--- a/include/arch/x86_64/drm/qaic_accel.h
+++ b/include/arch/x86_64/drm/qaic_accel.h
@@ -382,28 +382,15 @@ struct qaic_detach_slice {
#define DRM_QAIC_PERF_STATS_BO 0x07
#define DRM_QAIC_DETACH_SLICE_BO 0x08
-#define DRM_IOCTL_QAIC_MANAGE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_QAIC_MANAGE, struct qaic_manage_msg)
-#define DRM_IOCTL_QAIC_CREATE_BO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_QAIC_CREATE_BO, struct qaic_create_bo)
-#define DRM_IOCTL_QAIC_MMAP_BO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_QAIC_MMAP_BO, struct qaic_mmap_bo)
-#define DRM_IOCTL_QAIC_ATTACH_SLICE_BO \
- DRM_IOW(DRM_COMMAND_BASE + DRM_QAIC_ATTACH_SLICE_BO, \
- struct qaic_attach_slice)
-#define DRM_IOCTL_QAIC_EXECUTE_BO \
- DRM_IOW(DRM_COMMAND_BASE + DRM_QAIC_EXECUTE_BO, struct qaic_execute)
-#define DRM_IOCTL_QAIC_PARTIAL_EXECUTE_BO \
- DRM_IOW(DRM_COMMAND_BASE + DRM_QAIC_PARTIAL_EXECUTE_BO, \
- struct qaic_execute)
-#define DRM_IOCTL_QAIC_WAIT_BO \
- DRM_IOW(DRM_COMMAND_BASE + DRM_QAIC_WAIT_BO, struct qaic_wait)
-#define DRM_IOCTL_QAIC_PERF_STATS_BO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_QAIC_PERF_STATS_BO, \
- struct qaic_perf_stats)
-#define DRM_IOCTL_QAIC_DETACH_SLICE_BO \
- DRM_IOW(DRM_COMMAND_BASE + DRM_QAIC_DETACH_SLICE_BO, \
- struct qaic_detach_slice)
+#define DRM_IOCTL_QAIC_MANAGE DRM_IOWR(DRM_COMMAND_BASE + DRM_QAIC_MANAGE, struct qaic_manage_msg)
+#define DRM_IOCTL_QAIC_CREATE_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_QAIC_CREATE_BO, struct qaic_create_bo)
+#define DRM_IOCTL_QAIC_MMAP_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_QAIC_MMAP_BO, struct qaic_mmap_bo)
+#define DRM_IOCTL_QAIC_ATTACH_SLICE_BO DRM_IOW(DRM_COMMAND_BASE + DRM_QAIC_ATTACH_SLICE_BO, struct qaic_attach_slice)
+#define DRM_IOCTL_QAIC_EXECUTE_BO DRM_IOW(DRM_COMMAND_BASE + DRM_QAIC_EXECUTE_BO, struct qaic_execute)
+#define DRM_IOCTL_QAIC_PARTIAL_EXECUTE_BO DRM_IOW(DRM_COMMAND_BASE + DRM_QAIC_PARTIAL_EXECUTE_BO, struct qaic_execute)
+#define DRM_IOCTL_QAIC_WAIT_BO DRM_IOW(DRM_COMMAND_BASE + DRM_QAIC_WAIT_BO, struct qaic_wait)
+#define DRM_IOCTL_QAIC_PERF_STATS_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_QAIC_PERF_STATS_BO, struct qaic_perf_stats)
+#define DRM_IOCTL_QAIC_DETACH_SLICE_BO DRM_IOW(DRM_COMMAND_BASE + DRM_QAIC_DETACH_SLICE_BO, struct qaic_detach_slice)
#if defined(__cplusplus)
}
diff --git a/include/arch/x86_64/drm/qxl_drm.h b/include/arch/x86_64/drm/qxl_drm.h
index 56bed67c..9368e139 100644
--- a/include/arch/x86_64/drm/qxl_drm.h
+++ b/include/arch/x86_64/drm/qxl_drm.h
@@ -125,29 +125,19 @@ struct drm_qxl_alloc_surf {
__u32 pad;
};
-#define DRM_IOCTL_QXL_ALLOC \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_ALLOC, struct drm_qxl_alloc)
+#define DRM_IOCTL_QXL_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_ALLOC, struct drm_qxl_alloc)
-#define DRM_IOCTL_QXL_MAP \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_MAP, struct drm_qxl_map)
+#define DRM_IOCTL_QXL_MAP DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_MAP, struct drm_qxl_map)
-#define DRM_IOCTL_QXL_EXECBUFFER \
- DRM_IOW(DRM_COMMAND_BASE + DRM_QXL_EXECBUFFER, \
- struct drm_qxl_execbuffer)
+#define DRM_IOCTL_QXL_EXECBUFFER DRM_IOW(DRM_COMMAND_BASE + DRM_QXL_EXECBUFFER, struct drm_qxl_execbuffer)
-#define DRM_IOCTL_QXL_UPDATE_AREA \
- DRM_IOW(DRM_COMMAND_BASE + DRM_QXL_UPDATE_AREA, \
- struct drm_qxl_update_area)
+#define DRM_IOCTL_QXL_UPDATE_AREA DRM_IOW(DRM_COMMAND_BASE + DRM_QXL_UPDATE_AREA, struct drm_qxl_update_area)
-#define DRM_IOCTL_QXL_GETPARAM \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_GETPARAM, struct drm_qxl_getparam)
+#define DRM_IOCTL_QXL_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_GETPARAM, struct drm_qxl_getparam)
-#define DRM_IOCTL_QXL_CLIENTCAP \
- DRM_IOW(DRM_COMMAND_BASE + DRM_QXL_CLIENTCAP, struct drm_qxl_clientcap)
+#define DRM_IOCTL_QXL_CLIENTCAP DRM_IOW(DRM_COMMAND_BASE + DRM_QXL_CLIENTCAP, struct drm_qxl_clientcap)
-#define DRM_IOCTL_QXL_ALLOC_SURF \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_ALLOC_SURF, \
- struct drm_qxl_alloc_surf)
+#define DRM_IOCTL_QXL_ALLOC_SURF DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_ALLOC_SURF, struct drm_qxl_alloc_surf)
#if defined(__cplusplus)
}
diff --git a/include/arch/x86_64/drm/radeon_drm.h b/include/arch/x86_64/drm/radeon_drm.h
index 6ac625ab..663e20f9 100644
--- a/include/arch/x86_64/drm/radeon_drm.h
+++ b/include/arch/x86_64/drm/radeon_drm.h
@@ -454,8 +454,7 @@ typedef struct {
unsigned int last_dispatch;
unsigned int last_clear;
- struct drm_tex_region tex_list[RADEON_NR_TEX_HEAPS]
- [RADEON_NR_TEX_REGIONS + 1];
+ struct drm_tex_region tex_list[RADEON_NR_TEX_HEAPS][RADEON_NR_TEX_REGIONS + 1];
unsigned int tex_age[RADEON_NR_TEX_HEAPS];
int ctx_owner;
int pfState; /* number of 3d windows (0,1,2ormore) */
@@ -518,100 +517,53 @@ typedef struct {
#define DRM_RADEON_GEM_OP 0x2c
#define DRM_RADEON_GEM_USERPTR 0x2d
-#define DRM_IOCTL_RADEON_CP_INIT \
- DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_CP_INIT, drm_radeon_init_t)
-#define DRM_IOCTL_RADEON_CP_START DRM_IO(DRM_COMMAND_BASE + DRM_RADEON_CP_START)
-#define DRM_IOCTL_RADEON_CP_STOP \
- DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_CP_STOP, drm_radeon_cp_stop_t)
-#define DRM_IOCTL_RADEON_CP_RESET DRM_IO(DRM_COMMAND_BASE + DRM_RADEON_CP_RESET)
-#define DRM_IOCTL_RADEON_CP_IDLE DRM_IO(DRM_COMMAND_BASE + DRM_RADEON_CP_IDLE)
-#define DRM_IOCTL_RADEON_RESET DRM_IO(DRM_COMMAND_BASE + DRM_RADEON_RESET)
-#define DRM_IOCTL_RADEON_FULLSCREEN \
- DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_FULLSCREEN, \
- drm_radeon_fullscreen_t)
-#define DRM_IOCTL_RADEON_SWAP DRM_IO(DRM_COMMAND_BASE + DRM_RADEON_SWAP)
-#define DRM_IOCTL_RADEON_CLEAR \
- DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_CLEAR, drm_radeon_clear_t)
-#define DRM_IOCTL_RADEON_VERTEX \
- DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_VERTEX, drm_radeon_vertex_t)
-#define DRM_IOCTL_RADEON_INDICES \
- DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_INDICES, drm_radeon_indices_t)
-#define DRM_IOCTL_RADEON_STIPPLE \
- DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_STIPPLE, drm_radeon_stipple_t)
-#define DRM_IOCTL_RADEON_INDIRECT \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_INDIRECT, drm_radeon_indirect_t)
-#define DRM_IOCTL_RADEON_TEXTURE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_TEXTURE, drm_radeon_texture_t)
-#define DRM_IOCTL_RADEON_VERTEX2 \
- DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_VERTEX2, drm_radeon_vertex2_t)
-#define DRM_IOCTL_RADEON_CMDBUF \
- DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_CMDBUF, drm_radeon_cmd_buffer_t)
-#define DRM_IOCTL_RADEON_GETPARAM \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GETPARAM, drm_radeon_getparam_t)
-#define DRM_IOCTL_RADEON_FLIP DRM_IO(DRM_COMMAND_BASE + DRM_RADEON_FLIP)
-#define DRM_IOCTL_RADEON_ALLOC \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_ALLOC, drm_radeon_mem_alloc_t)
-#define DRM_IOCTL_RADEON_FREE \
- DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_FREE, drm_radeon_mem_free_t)
-#define DRM_IOCTL_RADEON_INIT_HEAP \
- DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_INIT_HEAP, \
- drm_radeon_mem_init_heap_t)
-#define DRM_IOCTL_RADEON_IRQ_EMIT \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_IRQ_EMIT, drm_radeon_irq_emit_t)
-#define DRM_IOCTL_RADEON_IRQ_WAIT \
- DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_IRQ_WAIT, drm_radeon_irq_wait_t)
-#define DRM_IOCTL_RADEON_CP_RESUME \
- DRM_IO(DRM_COMMAND_BASE + DRM_RADEON_CP_RESUME)
-#define DRM_IOCTL_RADEON_SETPARAM \
- DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_SETPARAM, drm_radeon_setparam_t)
-#define DRM_IOCTL_RADEON_SURF_ALLOC \
- DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_SURF_ALLOC, \
- drm_radeon_surface_alloc_t)
-#define DRM_IOCTL_RADEON_SURF_FREE \
- DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_SURF_FREE, \
- drm_radeon_surface_free_t)
+#define DRM_IOCTL_RADEON_CP_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_CP_INIT, drm_radeon_init_t)
+#define DRM_IOCTL_RADEON_CP_START DRM_IO(DRM_COMMAND_BASE + DRM_RADEON_CP_START)
+#define DRM_IOCTL_RADEON_CP_STOP DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_CP_STOP, drm_radeon_cp_stop_t)
+#define DRM_IOCTL_RADEON_CP_RESET DRM_IO(DRM_COMMAND_BASE + DRM_RADEON_CP_RESET)
+#define DRM_IOCTL_RADEON_CP_IDLE DRM_IO(DRM_COMMAND_BASE + DRM_RADEON_CP_IDLE)
+#define DRM_IOCTL_RADEON_RESET DRM_IO(DRM_COMMAND_BASE + DRM_RADEON_RESET)
+#define DRM_IOCTL_RADEON_FULLSCREEN DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_FULLSCREEN, drm_radeon_fullscreen_t)
+#define DRM_IOCTL_RADEON_SWAP DRM_IO(DRM_COMMAND_BASE + DRM_RADEON_SWAP)
+#define DRM_IOCTL_RADEON_CLEAR DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_CLEAR, drm_radeon_clear_t)
+#define DRM_IOCTL_RADEON_VERTEX DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_VERTEX, drm_radeon_vertex_t)
+#define DRM_IOCTL_RADEON_INDICES DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_INDICES, drm_radeon_indices_t)
+#define DRM_IOCTL_RADEON_STIPPLE DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_STIPPLE, drm_radeon_stipple_t)
+#define DRM_IOCTL_RADEON_INDIRECT DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_INDIRECT, drm_radeon_indirect_t)
+#define DRM_IOCTL_RADEON_TEXTURE DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_TEXTURE, drm_radeon_texture_t)
+#define DRM_IOCTL_RADEON_VERTEX2 DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_VERTEX2, drm_radeon_vertex2_t)
+#define DRM_IOCTL_RADEON_CMDBUF DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_CMDBUF, drm_radeon_cmd_buffer_t)
+#define DRM_IOCTL_RADEON_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GETPARAM, drm_radeon_getparam_t)
+#define DRM_IOCTL_RADEON_FLIP DRM_IO(DRM_COMMAND_BASE + DRM_RADEON_FLIP)
+#define DRM_IOCTL_RADEON_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_ALLOC, drm_radeon_mem_alloc_t)
+#define DRM_IOCTL_RADEON_FREE DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_FREE, drm_radeon_mem_free_t)
+#define DRM_IOCTL_RADEON_INIT_HEAP DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_INIT_HEAP, drm_radeon_mem_init_heap_t)
+#define DRM_IOCTL_RADEON_IRQ_EMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_IRQ_EMIT, drm_radeon_irq_emit_t)
+#define DRM_IOCTL_RADEON_IRQ_WAIT DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_IRQ_WAIT, drm_radeon_irq_wait_t)
+#define DRM_IOCTL_RADEON_CP_RESUME DRM_IO(DRM_COMMAND_BASE + DRM_RADEON_CP_RESUME)
+#define DRM_IOCTL_RADEON_SETPARAM DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_SETPARAM, drm_radeon_setparam_t)
+#define DRM_IOCTL_RADEON_SURF_ALLOC DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_SURF_ALLOC, drm_radeon_surface_alloc_t)
+#define DRM_IOCTL_RADEON_SURF_FREE DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_SURF_FREE, drm_radeon_surface_free_t)
/* KMS */
-#define DRM_IOCTL_RADEON_GEM_INFO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_INFO, \
- struct drm_radeon_gem_info)
-#define DRM_IOCTL_RADEON_GEM_CREATE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_CREATE, \
- struct drm_radeon_gem_create)
-#define DRM_IOCTL_RADEON_GEM_MMAP \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_MMAP, \
- struct drm_radeon_gem_mmap)
-#define DRM_IOCTL_RADEON_GEM_PREAD \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_PREAD, \
- struct drm_radeon_gem_pread)
-#define DRM_IOCTL_RADEON_GEM_PWRITE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_PWRITE, \
- struct drm_radeon_gem_pwrite)
-#define DRM_IOCTL_RADEON_GEM_SET_DOMAIN \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_SET_DOMAIN, \
- struct drm_radeon_gem_set_domain)
-#define DRM_IOCTL_RADEON_GEM_WAIT_IDLE \
- DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_GEM_WAIT_IDLE, \
- struct drm_radeon_gem_wait_idle)
-#define DRM_IOCTL_RADEON_CS \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_CS, struct drm_radeon_cs)
-#define DRM_IOCTL_RADEON_INFO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_INFO, struct drm_radeon_info)
-#define DRM_IOCTL_RADEON_GEM_SET_TILING \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_SET_TILING, \
- struct drm_radeon_gem_set_tiling)
-#define DRM_IOCTL_RADEON_GEM_GET_TILING \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_GET_TILING, \
- struct drm_radeon_gem_get_tiling)
-#define DRM_IOCTL_RADEON_GEM_BUSY \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_BUSY, \
- struct drm_radeon_gem_busy)
-#define DRM_IOCTL_RADEON_GEM_VA \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_VA, struct drm_radeon_gem_va)
-#define DRM_IOCTL_RADEON_GEM_OP \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_OP, struct drm_radeon_gem_op)
-#define DRM_IOCTL_RADEON_GEM_USERPTR \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_USERPTR, \
- struct drm_radeon_gem_userptr)
+#define DRM_IOCTL_RADEON_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_INFO, struct drm_radeon_gem_info)
+#define DRM_IOCTL_RADEON_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_CREATE, struct drm_radeon_gem_create)
+#define DRM_IOCTL_RADEON_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_MMAP, struct drm_radeon_gem_mmap)
+#define DRM_IOCTL_RADEON_GEM_PREAD DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_PREAD, struct drm_radeon_gem_pread)
+#define DRM_IOCTL_RADEON_GEM_PWRITE DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_PWRITE, struct drm_radeon_gem_pwrite)
+#define DRM_IOCTL_RADEON_GEM_SET_DOMAIN \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_SET_DOMAIN, struct drm_radeon_gem_set_domain)
+#define DRM_IOCTL_RADEON_GEM_WAIT_IDLE \
+ DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_GEM_WAIT_IDLE, struct drm_radeon_gem_wait_idle)
+#define DRM_IOCTL_RADEON_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_CS, struct drm_radeon_cs)
+#define DRM_IOCTL_RADEON_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_INFO, struct drm_radeon_info)
+#define DRM_IOCTL_RADEON_GEM_SET_TILING \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_SET_TILING, struct drm_radeon_gem_set_tiling)
+#define DRM_IOCTL_RADEON_GEM_GET_TILING \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_GET_TILING, struct drm_radeon_gem_get_tiling)
+#define DRM_IOCTL_RADEON_GEM_BUSY DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_BUSY, struct drm_radeon_gem_busy)
+#define DRM_IOCTL_RADEON_GEM_VA DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_VA, struct drm_radeon_gem_va)
+#define DRM_IOCTL_RADEON_GEM_OP DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_OP, struct drm_radeon_gem_op)
+#define DRM_IOCTL_RADEON_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_USERPTR, struct drm_radeon_gem_userptr)
typedef struct drm_radeon_init {
enum {
@@ -648,10 +600,7 @@ typedef struct drm_radeon_cp_stop {
} drm_radeon_cp_stop_t;
typedef struct drm_radeon_fullscreen {
- enum {
- RADEON_INIT_FULLSCREEN = 0x01,
- RADEON_CLEANUP_FULLSCREEN = 0x02
- } func;
+ enum { RADEON_INIT_FULLSCREEN = 0x01, RADEON_CLEANUP_FULLSCREEN = 0x02 } func;
} drm_radeon_fullscreen_t;
#define CLEAR_X1 0
@@ -1006,8 +955,7 @@ struct drm_radeon_gem_va {
/* The first dword of RADEON_CHUNK_ID_FLAGS is a uint32 of these flags: */
#define RADEON_CS_KEEP_TILING_FLAGS 0x01
#define RADEON_CS_USE_VM 0x02
-#define RADEON_CS_END_OF_FRAME \
- 0x04 /* a hint from userspace which CS is the last one */
+#define RADEON_CS_END_OF_FRAME 0x04 /* a hint from userspace which CS is the last one */
/* The second dword of RADEON_CHUNK_ID_FLAGS is a uint32 that sets the ring type
*/
#define RADEON_CS_RING_GFX 0
@@ -1055,13 +1003,12 @@ struct drm_radeon_cs {
#define RADEON_INFO_WANT_HYPERZ 0x07
#define RADEON_INFO_WANT_CMASK 0x08 /* get access to CMASK on r300 */
#define RADEON_INFO_CLOCK_CRYSTAL_FREQ 0x09 /* clock crystal frequency */
-#define RADEON_INFO_NUM_BACKENDS \
- 0x0a /* DB/backends for r600+ - need for OQ \
- */
-#define RADEON_INFO_NUM_TILE_PIPES 0x0b /* tile pipes for r600+ */
-#define RADEON_INFO_FUSION_GART_WORKING \
- 0x0c /* fusion writes to GTT were broken before this */
-#define RADEON_INFO_BACKEND_MAP 0x0d /* pipe to backend map, needed by mesa */
+#define RADEON_INFO_NUM_BACKENDS \
+ 0x0a /* DB/backends for r600+ - need for OQ \
+ */
+#define RADEON_INFO_NUM_TILE_PIPES 0x0b /* tile pipes for r600+ */
+#define RADEON_INFO_FUSION_GART_WORKING 0x0c /* fusion writes to GTT were broken before this */
+#define RADEON_INFO_BACKEND_MAP 0x0d /* pipe to backend map, needed by mesa */
/* virtual address start, va < start are reserved by the kernel */
#define RADEON_INFO_VA_START 0x0e
/* maximum size of ib using the virtual memory cs */
diff --git a/include/arch/x86_64/drm/tegra_drm.h b/include/arch/x86_64/drm/tegra_drm.h
index 2219bf94..7532fd6f 100644
--- a/include/arch/x86_64/drm/tegra_drm.h
+++ b/include/arch/x86_64/drm/tegra_drm.h
@@ -642,47 +642,26 @@ struct drm_tegra_gem_get_flags {
#define DRM_TEGRA_GEM_SET_FLAGS 0x0c
#define DRM_TEGRA_GEM_GET_FLAGS 0x0d
-#define DRM_IOCTL_TEGRA_GEM_CREATE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_CREATE, \
- struct drm_tegra_gem_create)
-#define DRM_IOCTL_TEGRA_GEM_MMAP \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_MMAP, \
- struct drm_tegra_gem_mmap)
-#define DRM_IOCTL_TEGRA_SYNCPT_READ \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_READ, \
- struct drm_tegra_syncpt_read)
-#define DRM_IOCTL_TEGRA_SYNCPT_INCR \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_INCR, \
- struct drm_tegra_syncpt_incr)
-#define DRM_IOCTL_TEGRA_SYNCPT_WAIT \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_WAIT, \
- struct drm_tegra_syncpt_wait)
-#define DRM_IOCTL_TEGRA_OPEN_CHANNEL \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_OPEN_CHANNEL, \
- struct drm_tegra_open_channel)
-#define DRM_IOCTL_TEGRA_CLOSE_CHANNEL \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_CLOSE_CHANNEL, \
- struct drm_tegra_close_channel)
-#define DRM_IOCTL_TEGRA_GET_SYNCPT \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT, \
- struct drm_tegra_get_syncpt)
-#define DRM_IOCTL_TEGRA_SUBMIT \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SUBMIT, struct drm_tegra_submit)
-#define DRM_IOCTL_TEGRA_GET_SYNCPT_BASE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT_BASE, \
- struct drm_tegra_get_syncpt_base)
-#define DRM_IOCTL_TEGRA_GEM_SET_TILING \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_TILING, \
- struct drm_tegra_gem_set_tiling)
-#define DRM_IOCTL_TEGRA_GEM_GET_TILING \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_TILING, \
- struct drm_tegra_gem_get_tiling)
-#define DRM_IOCTL_TEGRA_GEM_SET_FLAGS \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_FLAGS, \
- struct drm_tegra_gem_set_flags)
-#define DRM_IOCTL_TEGRA_GEM_GET_FLAGS \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_FLAGS, \
- struct drm_tegra_gem_get_flags)
+#define DRM_IOCTL_TEGRA_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_CREATE, struct drm_tegra_gem_create)
+#define DRM_IOCTL_TEGRA_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_MMAP, struct drm_tegra_gem_mmap)
+#define DRM_IOCTL_TEGRA_SYNCPT_READ DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_READ, struct drm_tegra_syncpt_read)
+#define DRM_IOCTL_TEGRA_SYNCPT_INCR DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_INCR, struct drm_tegra_syncpt_incr)
+#define DRM_IOCTL_TEGRA_SYNCPT_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_WAIT, struct drm_tegra_syncpt_wait)
+#define DRM_IOCTL_TEGRA_OPEN_CHANNEL DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_OPEN_CHANNEL, struct drm_tegra_open_channel)
+#define DRM_IOCTL_TEGRA_CLOSE_CHANNEL \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_CLOSE_CHANNEL, struct drm_tegra_close_channel)
+#define DRM_IOCTL_TEGRA_GET_SYNCPT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT, struct drm_tegra_get_syncpt)
+#define DRM_IOCTL_TEGRA_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SUBMIT, struct drm_tegra_submit)
+#define DRM_IOCTL_TEGRA_GET_SYNCPT_BASE \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT_BASE, struct drm_tegra_get_syncpt_base)
+#define DRM_IOCTL_TEGRA_GEM_SET_TILING \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_TILING, struct drm_tegra_gem_set_tiling)
+#define DRM_IOCTL_TEGRA_GEM_GET_TILING \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_TILING, struct drm_tegra_gem_get_tiling)
+#define DRM_IOCTL_TEGRA_GEM_SET_FLAGS \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_FLAGS, struct drm_tegra_gem_set_flags)
+#define DRM_IOCTL_TEGRA_GEM_GET_FLAGS \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_FLAGS, struct drm_tegra_gem_get_flags)
/* New Tegra DRM UAPI */
@@ -750,10 +729,9 @@ struct drm_tegra_channel_close {
* DRM_TEGRA_CHANNEL_MAP_READ: create mapping that allows HW read access
* DRM_TEGRA_CHANNEL_MAP_WRITE: create mapping that allows HW write access
*/
-#define DRM_TEGRA_CHANNEL_MAP_READ (1 << 0)
-#define DRM_TEGRA_CHANNEL_MAP_WRITE (1 << 1)
-#define DRM_TEGRA_CHANNEL_MAP_READ_WRITE \
- (DRM_TEGRA_CHANNEL_MAP_READ | DRM_TEGRA_CHANNEL_MAP_WRITE)
+#define DRM_TEGRA_CHANNEL_MAP_READ (1 << 0)
+#define DRM_TEGRA_CHANNEL_MAP_WRITE (1 << 1)
+#define DRM_TEGRA_CHANNEL_MAP_READ_WRITE (DRM_TEGRA_CHANNEL_MAP_READ | DRM_TEGRA_CHANNEL_MAP_WRITE)
struct drm_tegra_channel_map {
/**
@@ -1070,23 +1048,15 @@ struct drm_tegra_syncpoint_wait {
__u32 padding;
};
-#define DRM_IOCTL_TEGRA_CHANNEL_OPEN \
- DRM_IOWR(DRM_COMMAND_BASE + 0x10, struct drm_tegra_channel_open)
-#define DRM_IOCTL_TEGRA_CHANNEL_CLOSE \
- DRM_IOWR(DRM_COMMAND_BASE + 0x11, struct drm_tegra_channel_close)
-#define DRM_IOCTL_TEGRA_CHANNEL_MAP \
- DRM_IOWR(DRM_COMMAND_BASE + 0x12, struct drm_tegra_channel_map)
-#define DRM_IOCTL_TEGRA_CHANNEL_UNMAP \
- DRM_IOWR(DRM_COMMAND_BASE + 0x13, struct drm_tegra_channel_unmap)
-#define DRM_IOCTL_TEGRA_CHANNEL_SUBMIT \
- DRM_IOWR(DRM_COMMAND_BASE + 0x14, struct drm_tegra_channel_submit)
-
-#define DRM_IOCTL_TEGRA_SYNCPOINT_ALLOCATE \
- DRM_IOWR(DRM_COMMAND_BASE + 0x20, struct drm_tegra_syncpoint_allocate)
-#define DRM_IOCTL_TEGRA_SYNCPOINT_FREE \
- DRM_IOWR(DRM_COMMAND_BASE + 0x21, struct drm_tegra_syncpoint_free)
-#define DRM_IOCTL_TEGRA_SYNCPOINT_WAIT \
- DRM_IOWR(DRM_COMMAND_BASE + 0x22, struct drm_tegra_syncpoint_wait)
+#define DRM_IOCTL_TEGRA_CHANNEL_OPEN DRM_IOWR(DRM_COMMAND_BASE + 0x10, struct drm_tegra_channel_open)
+#define DRM_IOCTL_TEGRA_CHANNEL_CLOSE DRM_IOWR(DRM_COMMAND_BASE + 0x11, struct drm_tegra_channel_close)
+#define DRM_IOCTL_TEGRA_CHANNEL_MAP DRM_IOWR(DRM_COMMAND_BASE + 0x12, struct drm_tegra_channel_map)
+#define DRM_IOCTL_TEGRA_CHANNEL_UNMAP DRM_IOWR(DRM_COMMAND_BASE + 0x13, struct drm_tegra_channel_unmap)
+#define DRM_IOCTL_TEGRA_CHANNEL_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + 0x14, struct drm_tegra_channel_submit)
+
+#define DRM_IOCTL_TEGRA_SYNCPOINT_ALLOCATE DRM_IOWR(DRM_COMMAND_BASE + 0x20, struct drm_tegra_syncpoint_allocate)
+#define DRM_IOCTL_TEGRA_SYNCPOINT_FREE DRM_IOWR(DRM_COMMAND_BASE + 0x21, struct drm_tegra_syncpoint_free)
+#define DRM_IOCTL_TEGRA_SYNCPOINT_WAIT DRM_IOWR(DRM_COMMAND_BASE + 0x22, struct drm_tegra_syncpoint_wait)
#if defined(__cplusplus)
}
diff --git a/include/arch/x86_64/drm/v3d_drm.h b/include/arch/x86_64/drm/v3d_drm.h
index 1ae21341..f4f75a1d 100644
--- a/include/arch/x86_64/drm/v3d_drm.h
+++ b/include/arch/x86_64/drm/v3d_drm.h
@@ -45,43 +45,24 @@ extern "C" {
#define DRM_V3D_PERFMON_GET_COUNTER 0x0c
#define DRM_V3D_PERFMON_SET_GLOBAL 0x0d
-#define DRM_IOCTL_V3D_SUBMIT_CL \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CL, struct drm_v3d_submit_cl)
-#define DRM_IOCTL_V3D_WAIT_BO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_WAIT_BO, struct drm_v3d_wait_bo)
-#define DRM_IOCTL_V3D_CREATE_BO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_CREATE_BO, struct drm_v3d_create_bo)
-#define DRM_IOCTL_V3D_MMAP_BO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_MMAP_BO, struct drm_v3d_mmap_bo)
-#define DRM_IOCTL_V3D_GET_PARAM \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_GET_PARAM, struct drm_v3d_get_param)
-#define DRM_IOCTL_V3D_GET_BO_OFFSET \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_GET_BO_OFFSET, \
- struct drm_v3d_get_bo_offset)
-#define DRM_IOCTL_V3D_SUBMIT_TFU \
- DRM_IOW(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_TFU, \
- struct drm_v3d_submit_tfu)
-#define DRM_IOCTL_V3D_SUBMIT_CSD \
- DRM_IOW(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CSD, \
- struct drm_v3d_submit_csd)
-#define DRM_IOCTL_V3D_PERFMON_CREATE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_PERFMON_CREATE, \
- struct drm_v3d_perfmon_create)
-#define DRM_IOCTL_V3D_PERFMON_DESTROY \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_PERFMON_DESTROY, \
- struct drm_v3d_perfmon_destroy)
-#define DRM_IOCTL_V3D_PERFMON_GET_VALUES \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_PERFMON_GET_VALUES, \
- struct drm_v3d_perfmon_get_values)
-#define DRM_IOCTL_V3D_SUBMIT_CPU \
- DRM_IOW(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CPU, \
- struct drm_v3d_submit_cpu)
-#define DRM_IOCTL_V3D_PERFMON_GET_COUNTER \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_PERFMON_GET_COUNTER, \
- struct drm_v3d_perfmon_get_counter)
-#define DRM_IOCTL_V3D_PERFMON_SET_GLOBAL \
- DRM_IOW(DRM_COMMAND_BASE + DRM_V3D_PERFMON_SET_GLOBAL, \
- struct drm_v3d_perfmon_set_global)
+#define DRM_IOCTL_V3D_SUBMIT_CL DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CL, struct drm_v3d_submit_cl)
+#define DRM_IOCTL_V3D_WAIT_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_WAIT_BO, struct drm_v3d_wait_bo)
+#define DRM_IOCTL_V3D_CREATE_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_CREATE_BO, struct drm_v3d_create_bo)
+#define DRM_IOCTL_V3D_MMAP_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_MMAP_BO, struct drm_v3d_mmap_bo)
+#define DRM_IOCTL_V3D_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_GET_PARAM, struct drm_v3d_get_param)
+#define DRM_IOCTL_V3D_GET_BO_OFFSET DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_GET_BO_OFFSET, struct drm_v3d_get_bo_offset)
+#define DRM_IOCTL_V3D_SUBMIT_TFU DRM_IOW(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_TFU, struct drm_v3d_submit_tfu)
+#define DRM_IOCTL_V3D_SUBMIT_CSD DRM_IOW(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CSD, struct drm_v3d_submit_csd)
+#define DRM_IOCTL_V3D_PERFMON_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_PERFMON_CREATE, struct drm_v3d_perfmon_create)
+#define DRM_IOCTL_V3D_PERFMON_DESTROY \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_PERFMON_DESTROY, struct drm_v3d_perfmon_destroy)
+#define DRM_IOCTL_V3D_PERFMON_GET_VALUES \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_PERFMON_GET_VALUES, struct drm_v3d_perfmon_get_values)
+#define DRM_IOCTL_V3D_SUBMIT_CPU DRM_IOW(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CPU, struct drm_v3d_submit_cpu)
+#define DRM_IOCTL_V3D_PERFMON_GET_COUNTER \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_PERFMON_GET_COUNTER, struct drm_v3d_perfmon_get_counter)
+#define DRM_IOCTL_V3D_PERFMON_SET_GLOBAL \
+ DRM_IOW(DRM_COMMAND_BASE + DRM_V3D_PERFMON_SET_GLOBAL, struct drm_v3d_perfmon_set_global)
#define DRM_V3D_SUBMIT_CL_FLUSH_CACHE 0x01
#define DRM_V3D_SUBMIT_EXTENSION 0x02
diff --git a/include/arch/x86_64/drm/vc4_drm.h b/include/arch/x86_64/drm/vc4_drm.h
index 691fa998..6ce70979 100644
--- a/include/arch/x86_64/drm/vc4_drm.h
+++ b/include/arch/x86_64/drm/vc4_drm.h
@@ -46,45 +46,24 @@ extern "C" {
#define DRM_VC4_PERFMON_DESTROY 0x0d
#define DRM_VC4_PERFMON_GET_VALUES 0x0e
-#define DRM_IOCTL_VC4_SUBMIT_CL \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_SUBMIT_CL, struct drm_vc4_submit_cl)
-#define DRM_IOCTL_VC4_WAIT_SEQNO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_WAIT_SEQNO, \
- struct drm_vc4_wait_seqno)
-#define DRM_IOCTL_VC4_WAIT_BO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_WAIT_BO, struct drm_vc4_wait_bo)
-#define DRM_IOCTL_VC4_CREATE_BO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_CREATE_BO, struct drm_vc4_create_bo)
-#define DRM_IOCTL_VC4_MMAP_BO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_MMAP_BO, struct drm_vc4_mmap_bo)
-#define DRM_IOCTL_VC4_CREATE_SHADER_BO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_CREATE_SHADER_BO, \
- struct drm_vc4_create_shader_bo)
-#define DRM_IOCTL_VC4_GET_HANG_STATE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_GET_HANG_STATE, \
- struct drm_vc4_get_hang_state)
-#define DRM_IOCTL_VC4_GET_PARAM \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_GET_PARAM, struct drm_vc4_get_param)
-#define DRM_IOCTL_VC4_SET_TILING \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_SET_TILING, \
- struct drm_vc4_set_tiling)
-#define DRM_IOCTL_VC4_GET_TILING \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_GET_TILING, \
- struct drm_vc4_get_tiling)
-#define DRM_IOCTL_VC4_LABEL_BO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_LABEL_BO, struct drm_vc4_label_bo)
-#define DRM_IOCTL_VC4_GEM_MADVISE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_GEM_MADVISE, \
- struct drm_vc4_gem_madvise)
-#define DRM_IOCTL_VC4_PERFMON_CREATE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_PERFMON_CREATE, \
- struct drm_vc4_perfmon_create)
-#define DRM_IOCTL_VC4_PERFMON_DESTROY \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_PERFMON_DESTROY, \
- struct drm_vc4_perfmon_destroy)
-#define DRM_IOCTL_VC4_PERFMON_GET_VALUES \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_PERFMON_GET_VALUES, \
- struct drm_vc4_perfmon_get_values)
+#define DRM_IOCTL_VC4_SUBMIT_CL DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_SUBMIT_CL, struct drm_vc4_submit_cl)
+#define DRM_IOCTL_VC4_WAIT_SEQNO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_WAIT_SEQNO, struct drm_vc4_wait_seqno)
+#define DRM_IOCTL_VC4_WAIT_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_WAIT_BO, struct drm_vc4_wait_bo)
+#define DRM_IOCTL_VC4_CREATE_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_CREATE_BO, struct drm_vc4_create_bo)
+#define DRM_IOCTL_VC4_MMAP_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_MMAP_BO, struct drm_vc4_mmap_bo)
+#define DRM_IOCTL_VC4_CREATE_SHADER_BO \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_CREATE_SHADER_BO, struct drm_vc4_create_shader_bo)
+#define DRM_IOCTL_VC4_GET_HANG_STATE DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_GET_HANG_STATE, struct drm_vc4_get_hang_state)
+#define DRM_IOCTL_VC4_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_GET_PARAM, struct drm_vc4_get_param)
+#define DRM_IOCTL_VC4_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_SET_TILING, struct drm_vc4_set_tiling)
+#define DRM_IOCTL_VC4_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_GET_TILING, struct drm_vc4_get_tiling)
+#define DRM_IOCTL_VC4_LABEL_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_LABEL_BO, struct drm_vc4_label_bo)
+#define DRM_IOCTL_VC4_GEM_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_GEM_MADVISE, struct drm_vc4_gem_madvise)
+#define DRM_IOCTL_VC4_PERFMON_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_PERFMON_CREATE, struct drm_vc4_perfmon_create)
+#define DRM_IOCTL_VC4_PERFMON_DESTROY \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_PERFMON_DESTROY, struct drm_vc4_perfmon_destroy)
+#define DRM_IOCTL_VC4_PERFMON_GET_VALUES \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_PERFMON_GET_VALUES, struct drm_vc4_perfmon_get_values)
struct drm_vc4_submit_rcl_surface {
__u32 hindex; /* Handle index, or ~0 if not present. */
diff --git a/include/arch/x86_64/drm/vgem_drm.h b/include/arch/x86_64/drm/vgem_drm.h
index b2d8eed6..9e68e0da 100644
--- a/include/arch/x86_64/drm/vgem_drm.h
+++ b/include/arch/x86_64/drm/vgem_drm.h
@@ -39,12 +39,8 @@ extern "C" {
#define DRM_VGEM_FENCE_ATTACH 0x1
#define DRM_VGEM_FENCE_SIGNAL 0x2
-#define DRM_IOCTL_VGEM_FENCE_ATTACH \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VGEM_FENCE_ATTACH, \
- struct drm_vgem_fence_attach)
-#define DRM_IOCTL_VGEM_FENCE_SIGNAL \
- DRM_IOW(DRM_COMMAND_BASE + DRM_VGEM_FENCE_SIGNAL, \
- struct drm_vgem_fence_signal)
+#define DRM_IOCTL_VGEM_FENCE_ATTACH DRM_IOWR(DRM_COMMAND_BASE + DRM_VGEM_FENCE_ATTACH, struct drm_vgem_fence_attach)
+#define DRM_IOCTL_VGEM_FENCE_SIGNAL DRM_IOW(DRM_COMMAND_BASE + DRM_VGEM_FENCE_SIGNAL, struct drm_vgem_fence_signal)
struct drm_vgem_fence_attach {
__u32 handle;
diff --git a/include/arch/x86_64/drm/virtgpu_drm.h b/include/arch/x86_64/drm/virtgpu_drm.h
index 77b8c034..77ce25d7 100644
--- a/include/arch/x86_64/drm/virtgpu_drm.h
+++ b/include/arch/x86_64/drm/virtgpu_drm.h
@@ -52,9 +52,8 @@ extern "C" {
#define VIRTGPU_EXECBUF_FENCE_FD_IN 0x01
#define VIRTGPU_EXECBUF_FENCE_FD_OUT 0x02
#define VIRTGPU_EXECBUF_RING_IDX 0x04
-#define VIRTGPU_EXECBUF_FLAGS \
- (VIRTGPU_EXECBUF_FENCE_FD_IN | VIRTGPU_EXECBUF_FENCE_FD_OUT | \
- VIRTGPU_EXECBUF_RING_IDX | 0)
+#define VIRTGPU_EXECBUF_FLAGS \
+ (VIRTGPU_EXECBUF_FENCE_FD_IN | VIRTGPU_EXECBUF_FENCE_FD_OUT | VIRTGPU_EXECBUF_RING_IDX | 0)
struct drm_virtgpu_map {
__u64 offset; /* use for mmap system call */
@@ -78,9 +77,9 @@ struct drm_virtgpu_execbuffer {
__u64 command; /* void* */
__u64 bo_handles;
__u32 num_bo_handles;
- __s32 fence_fd; /* in/out fence fd (see VIRTGPU_EXECBUF_FENCE_FD_IN/OUT)
- */
- __u32 ring_idx; /* command ring index (see VIRTGPU_EXECBUF_RING_IDX) */
+ __s32 fence_fd; /* in/out fence fd (see VIRTGPU_EXECBUF_FENCE_FD_IN/OUT)
+ */
+ __u32 ring_idx; /* command ring index (see VIRTGPU_EXECBUF_RING_IDX) */
__u32 syncobj_stride; /* size of @drm_virtgpu_execbuffer_syncobj */
__u32 num_in_syncobjs;
__u32 num_out_syncobjs;
@@ -92,14 +91,12 @@ struct drm_virtgpu_execbuffer {
#define VIRTGPU_PARAM_CAPSET_QUERY_FIX 2 /* do we have the capset fix */
#define VIRTGPU_PARAM_RESOURCE_BLOB 3 /* DRM_VIRTGPU_RESOURCE_CREATE_BLOB */
#define VIRTGPU_PARAM_HOST_VISIBLE 4 /* Host blob resources are mappable */
-#define VIRTGPU_PARAM_CROSS_DEVICE \
- 5 /* Cross virtio-device resource sharing \
- */
-#define VIRTGPU_PARAM_CONTEXT_INIT 6 /* DRM_VIRTGPU_CONTEXT_INIT */
-#define VIRTGPU_PARAM_SUPPORTED_CAPSET_IDs \
- 7 /* Bitmask of supported capability set ids */
-#define VIRTGPU_PARAM_EXPLICIT_DEBUG_NAME \
- 8 /* Ability to set debug name from userspace */
+#define VIRTGPU_PARAM_CROSS_DEVICE \
+ 5 /* Cross virtio-device resource sharing \
+ */
+#define VIRTGPU_PARAM_CONTEXT_INIT 6 /* DRM_VIRTGPU_CONTEXT_INIT */
+#define VIRTGPU_PARAM_SUPPORTED_CAPSET_IDs 7 /* Bitmask of supported capability set ids */
+#define VIRTGPU_PARAM_EXPLICIT_DEBUG_NAME 8 /* Ability to set debug name from userspace */
struct drm_virtgpu_getparam {
__u64 param;
@@ -119,8 +116,8 @@ struct drm_virtgpu_resource_create {
__u32 last_level;
__u32 nr_samples;
__u32 flags;
- __u32 bo_handle; /* if this is set - recreate a new resource attached to
- this bo ? */
+ __u32 bo_handle; /* if this is set - recreate a new resource attached to
+ this bo ? */
__u32 res_handle; /* returned by kernel */
__u32 size; /* validate transfer in the host */
__u32 stride; /* validate transfer in the host */
@@ -229,48 +226,33 @@ struct drm_virtgpu_context_init {
*/
#define VIRTGPU_EVENT_FENCE_SIGNALED 0x90000000
-#define DRM_IOCTL_VIRTGPU_MAP \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_MAP, struct drm_virtgpu_map)
+#define DRM_IOCTL_VIRTGPU_MAP DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_MAP, struct drm_virtgpu_map)
-#define DRM_IOCTL_VIRTGPU_EXECBUFFER \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_EXECBUFFER, \
- struct drm_virtgpu_execbuffer)
+#define DRM_IOCTL_VIRTGPU_EXECBUFFER DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_EXECBUFFER, struct drm_virtgpu_execbuffer)
-#define DRM_IOCTL_VIRTGPU_GETPARAM \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_GETPARAM, \
- struct drm_virtgpu_getparam)
+#define DRM_IOCTL_VIRTGPU_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_GETPARAM, struct drm_virtgpu_getparam)
-#define DRM_IOCTL_VIRTGPU_RESOURCE_CREATE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_RESOURCE_CREATE, \
- struct drm_virtgpu_resource_create)
+#define DRM_IOCTL_VIRTGPU_RESOURCE_CREATE \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_RESOURCE_CREATE, struct drm_virtgpu_resource_create)
-#define DRM_IOCTL_VIRTGPU_RESOURCE_INFO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_RESOURCE_INFO, \
- struct drm_virtgpu_resource_info)
+#define DRM_IOCTL_VIRTGPU_RESOURCE_INFO \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_RESOURCE_INFO, struct drm_virtgpu_resource_info)
-#define DRM_IOCTL_VIRTGPU_TRANSFER_FROM_HOST \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_TRANSFER_FROM_HOST, \
- struct drm_virtgpu_3d_transfer_from_host)
+#define DRM_IOCTL_VIRTGPU_TRANSFER_FROM_HOST \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_TRANSFER_FROM_HOST, struct drm_virtgpu_3d_transfer_from_host)
-#define DRM_IOCTL_VIRTGPU_TRANSFER_TO_HOST \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_TRANSFER_TO_HOST, \
- struct drm_virtgpu_3d_transfer_to_host)
+#define DRM_IOCTL_VIRTGPU_TRANSFER_TO_HOST \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_TRANSFER_TO_HOST, struct drm_virtgpu_3d_transfer_to_host)
-#define DRM_IOCTL_VIRTGPU_WAIT \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_WAIT, \
- struct drm_virtgpu_3d_wait)
+#define DRM_IOCTL_VIRTGPU_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_WAIT, struct drm_virtgpu_3d_wait)
-#define DRM_IOCTL_VIRTGPU_GET_CAPS \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_GET_CAPS, \
- struct drm_virtgpu_get_caps)
+#define DRM_IOCTL_VIRTGPU_GET_CAPS DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_GET_CAPS, struct drm_virtgpu_get_caps)
-#define DRM_IOCTL_VIRTGPU_RESOURCE_CREATE_BLOB \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_RESOURCE_CREATE_BLOB, \
- struct drm_virtgpu_resource_create_blob)
+#define DRM_IOCTL_VIRTGPU_RESOURCE_CREATE_BLOB \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_RESOURCE_CREATE_BLOB, struct drm_virtgpu_resource_create_blob)
-#define DRM_IOCTL_VIRTGPU_CONTEXT_INIT \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_CONTEXT_INIT, \
- struct drm_virtgpu_context_init)
+#define DRM_IOCTL_VIRTGPU_CONTEXT_INIT \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_CONTEXT_INIT, struct drm_virtgpu_context_init)
#if defined(__cplusplus)
}
diff --git a/include/arch/x86_64/drm/vmwgfx_drm.h b/include/arch/x86_64/drm/vmwgfx_drm.h
index 1103ccfd..abb0d219 100644
--- a/include/arch/x86_64/drm/vmwgfx_drm.h
+++ b/include/arch/x86_64/drm/vmwgfx_drm.h
@@ -123,10 +123,7 @@ extern "C" {
* enum drm_vmw_handle_type - handle type for ref ioctls
*
*/
-enum drm_vmw_handle_type {
- DRM_VMW_HANDLE_LEGACY = 0,
- DRM_VMW_HANDLE_PRIME = 1
-};
+enum drm_vmw_handle_type { DRM_VMW_HANDLE_LEGACY = 0, DRM_VMW_HANDLE_PRIME = 1 };
/**
* struct drm_vmw_getparam_arg
diff --git a/include/arch/x86_64/drm/xe_drm.h b/include/arch/x86_64/drm/xe_drm.h
index e170d120..9a3efa5c 100644
--- a/include/arch/x86_64/drm/xe_drm.h
+++ b/include/arch/x86_64/drm/xe_drm.h
@@ -105,37 +105,21 @@ extern "C" {
/* Must be kept compact -- no holes */
-#define DRM_IOCTL_XE_DEVICE_QUERY \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_DEVICE_QUERY, \
- struct drm_xe_device_query)
-#define DRM_IOCTL_XE_GEM_CREATE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_GEM_CREATE, struct drm_xe_gem_create)
-#define DRM_IOCTL_XE_GEM_MMAP_OFFSET \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_GEM_MMAP_OFFSET, \
- struct drm_xe_gem_mmap_offset)
-#define DRM_IOCTL_XE_VM_CREATE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_VM_CREATE, struct drm_xe_vm_create)
-#define DRM_IOCTL_XE_VM_DESTROY \
- DRM_IOW(DRM_COMMAND_BASE + DRM_XE_VM_DESTROY, struct drm_xe_vm_destroy)
-#define DRM_IOCTL_XE_VM_BIND \
- DRM_IOW(DRM_COMMAND_BASE + DRM_XE_VM_BIND, struct drm_xe_vm_bind)
-#define DRM_IOCTL_XE_EXEC_QUEUE_CREATE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_EXEC_QUEUE_CREATE, \
- struct drm_xe_exec_queue_create)
-#define DRM_IOCTL_XE_EXEC_QUEUE_DESTROY \
- DRM_IOW(DRM_COMMAND_BASE + DRM_XE_EXEC_QUEUE_DESTROY, \
- struct drm_xe_exec_queue_destroy)
-#define DRM_IOCTL_XE_EXEC_QUEUE_GET_PROPERTY \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_EXEC_QUEUE_GET_PROPERTY, \
- struct drm_xe_exec_queue_get_property)
-#define DRM_IOCTL_XE_EXEC \
- DRM_IOW(DRM_COMMAND_BASE + DRM_XE_EXEC, struct drm_xe_exec)
-#define DRM_IOCTL_XE_WAIT_USER_FENCE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_WAIT_USER_FENCE, \
- struct drm_xe_wait_user_fence)
-#define DRM_IOCTL_XE_OBSERVATION \
- DRM_IOW(DRM_COMMAND_BASE + DRM_XE_OBSERVATION, \
- struct drm_xe_observation_param)
+#define DRM_IOCTL_XE_DEVICE_QUERY DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_DEVICE_QUERY, struct drm_xe_device_query)
+#define DRM_IOCTL_XE_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_GEM_CREATE, struct drm_xe_gem_create)
+#define DRM_IOCTL_XE_GEM_MMAP_OFFSET DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_GEM_MMAP_OFFSET, struct drm_xe_gem_mmap_offset)
+#define DRM_IOCTL_XE_VM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_VM_CREATE, struct drm_xe_vm_create)
+#define DRM_IOCTL_XE_VM_DESTROY DRM_IOW(DRM_COMMAND_BASE + DRM_XE_VM_DESTROY, struct drm_xe_vm_destroy)
+#define DRM_IOCTL_XE_VM_BIND DRM_IOW(DRM_COMMAND_BASE + DRM_XE_VM_BIND, struct drm_xe_vm_bind)
+#define DRM_IOCTL_XE_EXEC_QUEUE_CREATE \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_EXEC_QUEUE_CREATE, struct drm_xe_exec_queue_create)
+#define DRM_IOCTL_XE_EXEC_QUEUE_DESTROY \
+ DRM_IOW(DRM_COMMAND_BASE + DRM_XE_EXEC_QUEUE_DESTROY, struct drm_xe_exec_queue_destroy)
+#define DRM_IOCTL_XE_EXEC_QUEUE_GET_PROPERTY \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_EXEC_QUEUE_GET_PROPERTY, struct drm_xe_exec_queue_get_property)
+#define DRM_IOCTL_XE_EXEC DRM_IOW(DRM_COMMAND_BASE + DRM_XE_EXEC, struct drm_xe_exec)
+#define DRM_IOCTL_XE_WAIT_USER_FENCE DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_WAIT_USER_FENCE, struct drm_xe_wait_user_fence)
+#define DRM_IOCTL_XE_OBSERVATION DRM_IOW(DRM_COMMAND_BASE + DRM_XE_OBSERVATION, struct drm_xe_observation_param)
/**
* DOC: Xe IOCTL Extensions
diff --git a/include/arch/x86_64/fwctl/cxl.h b/include/arch/x86_64/fwctl/cxl.h
index e0e211ce..5ed2f3c0 100644
--- a/include/arch/x86_64/fwctl/cxl.h
+++ b/include/arch/x86_64/fwctl/cxl.h
@@ -22,8 +22,8 @@
* @set_feat_in: Set Feature input
*/
struct fwctl_rpc_cxl {
- __struct_group(fwctl_rpc_cxl_hdr, hdr, /* no attrs */, __u32 opcode;
- __u32 flags; __u32 op_size; __u32 reserved1;);
+ __struct_group(fwctl_rpc_cxl_hdr, hdr, /* no attrs */, __u32 opcode; __u32 flags; __u32 op_size;
+ __u32 reserved1;);
union {
struct cxl_mbox_get_sup_feats_in get_sup_feats_in;
struct cxl_mbox_get_feat_in get_feat_in;
@@ -39,8 +39,7 @@ struct fwctl_rpc_cxl {
* @payload: raw byte stream of payload
*/
struct fwctl_rpc_cxl_out {
- __struct_group(fwctl_rpc_cxl_out_hdr, hdr, /* no attrs */, __u32 size;
- __u32 retval;);
+ __struct_group(fwctl_rpc_cxl_out_hdr, hdr, /* no attrs */, __u32 size; __u32 retval;);
union {
struct cxl_mbox_get_sup_feats_out get_sup_feats_out;
__DECLARE_FLEX_ARRAY(__u8, payload);
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 <linux/types.h>
#include <linux/ioctl.h>
-#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 <linux/can.h>
-#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 <linux/cec.h>
/* 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 <sys/types.h>
#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 Ctr<i>Out. */
#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 <linux/types.h>
-#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 <linux/ethtool.h>
#include <linux/ethtool_netlink_generated.h>
-#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 <linux/limits.h>
+#include <linux/fscrypt.h>
#include <linux/ioctl.h>
+#include <linux/limits.h>
#include <linux/types.h>
-#include <linux/fscrypt.h>
/* Use of MS_* flags within the kernel is restricted to core mount(2) code. */
#include <linux/mount.h>
@@ -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 <asm/byteorder.h>"
#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 <asm/byteorder.h>"
#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 <linux/hdlc/ioctl.h>
/* 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 <linux/types.h> /* 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 <asm/posix_types.h> /* for __kernel_old_dev_t */
#include <linux/types.h> /* 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 <linux/types.h>
-#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 <linux/types.h>
-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 <linux/types.h>
-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 <linux/netfilter/x_tables.h>
-#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 <Cat,Type,SW,HW> 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 <asm/ptrace.h>
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 <linux/types.h>
#include <linux/pkt_cls.h>
-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 <linux/types.h>
#include <linux/pkt_cls.h>
-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 <asm/byteorder.h> 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 <linux/v4l2-controls.h>
-#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 <linux/types.h>
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<sessionID> : IPS0 for now */
-#define USB_CDC_MBIM_NDP32_IPS_SIGN \
- 0x00737069 /* ips<sessionID> : ips0 for now */
+#define USB_CDC_MBIM_NDP16_IPS_SIGN 0x00535049 /* IPS<sessionID> : IPS0 for now */
+#define USB_CDC_MBIM_NDP32_IPS_SIGN 0x00737069 /* ips<sessionID> : ips0 for now */
#define USB_CDC_MBIM_NDP16_DSS_SIGN 0x00535344 /* DSS<sessionID> */
#define USB_CDC_MBIM_NDP32_DSS_SIGN 0x00737364 /* dss<sessionID> */
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 <linux/types.h>
-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 <linux/types.h>
/* 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 <linux/fcntl.h>
#include <linux/ioctl.h>
-#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)
diff --git a/include/arch/x86_64/misc/amd-apml.h b/include/arch/x86_64/misc/amd-apml.h
index 76c4d48e..8e2354b8 100644
--- a/include/arch/x86_64/misc/amd-apml.h
+++ b/include/arch/x86_64/misc/amd-apml.h
@@ -131,8 +131,7 @@ struct apml_reg_xfer_msg {
* - returning "-EFAULT" if none of the above
* "-EPROTOTYPE" error is returned to provide additional error details
*/
-#define SBRMI_IOCTL_MCAMSR_CMD \
- _IOWR(SB_BASE_IOCTL_NR, 2, struct apml_mcamsr_msg)
+#define SBRMI_IOCTL_MCAMSR_CMD _IOWR(SB_BASE_IOCTL_NR, 2, struct apml_mcamsr_msg)
/**
* DOC: SBRMI_IOCTL_REG_XFER_CMD
@@ -148,7 +147,6 @@ struct apml_reg_xfer_msg {
* The IOCTL provides userspace access to AMD sideband register xfer protocol
* - Register xfer protocol to get/set hardware register for given offset
*/
-#define SBRMI_IOCTL_REG_XFER_CMD \
- _IOWR(SB_BASE_IOCTL_NR, 3, struct apml_reg_xfer_msg)
+#define SBRMI_IOCTL_REG_XFER_CMD _IOWR(SB_BASE_IOCTL_NR, 3, struct apml_reg_xfer_msg)
#endif /*_AMD_APML_H_*/
diff --git a/include/arch/x86_64/misc/fastrpc.h b/include/arch/x86_64/misc/fastrpc.h
index 7f08c7ee..5c28f13f 100644
--- a/include/arch/x86_64/misc/fastrpc.h
+++ b/include/arch/x86_64/misc/fastrpc.h
@@ -5,20 +5,18 @@
#include <linux/types.h>
-#define FASTRPC_IOCTL_ALLOC_DMA_BUFF _IOWR('R', 1, struct fastrpc_alloc_dma_buf)
-#define FASTRPC_IOCTL_FREE_DMA_BUFF _IOWR('R', 2, __u32)
-#define FASTRPC_IOCTL_INVOKE _IOWR('R', 3, struct fastrpc_invoke)
-#define FASTRPC_IOCTL_INIT_ATTACH _IO('R', 4)
-#define FASTRPC_IOCTL_INIT_CREATE _IOWR('R', 5, struct fastrpc_init_create)
-#define FASTRPC_IOCTL_MMAP _IOWR('R', 6, struct fastrpc_req_mmap)
-#define FASTRPC_IOCTL_MUNMAP _IOWR('R', 7, struct fastrpc_req_munmap)
-#define FASTRPC_IOCTL_INIT_ATTACH_SNS _IO('R', 8)
-#define FASTRPC_IOCTL_INIT_CREATE_STATIC \
- _IOWR('R', 9, struct fastrpc_init_create_static)
-#define FASTRPC_IOCTL_MEM_MAP _IOWR('R', 10, struct fastrpc_mem_map)
-#define FASTRPC_IOCTL_MEM_UNMAP _IOWR('R', 11, struct fastrpc_mem_unmap)
-#define FASTRPC_IOCTL_GET_DSP_INFO \
- _IOWR('R', 13, struct fastrpc_ioctl_capability)
+#define FASTRPC_IOCTL_ALLOC_DMA_BUFF _IOWR('R', 1, struct fastrpc_alloc_dma_buf)
+#define FASTRPC_IOCTL_FREE_DMA_BUFF _IOWR('R', 2, __u32)
+#define FASTRPC_IOCTL_INVOKE _IOWR('R', 3, struct fastrpc_invoke)
+#define FASTRPC_IOCTL_INIT_ATTACH _IO('R', 4)
+#define FASTRPC_IOCTL_INIT_CREATE _IOWR('R', 5, struct fastrpc_init_create)
+#define FASTRPC_IOCTL_MMAP _IOWR('R', 6, struct fastrpc_req_mmap)
+#define FASTRPC_IOCTL_MUNMAP _IOWR('R', 7, struct fastrpc_req_munmap)
+#define FASTRPC_IOCTL_INIT_ATTACH_SNS _IO('R', 8)
+#define FASTRPC_IOCTL_INIT_CREATE_STATIC _IOWR('R', 9, struct fastrpc_init_create_static)
+#define FASTRPC_IOCTL_MEM_MAP _IOWR('R', 10, struct fastrpc_mem_map)
+#define FASTRPC_IOCTL_MEM_UNMAP _IOWR('R', 11, struct fastrpc_mem_unmap)
+#define FASTRPC_IOCTL_GET_DSP_INFO _IOWR('R', 13, struct fastrpc_ioctl_capability)
/**
* enum fastrpc_map_flags - control flags for mapping memory on DSP user process
diff --git a/include/arch/x86_64/misc/ocxl.h b/include/arch/x86_64/misc/ocxl.h
index 9ba66e01..838ba0a8 100644
--- a/include/arch/x86_64/misc/ocxl.h
+++ b/include/arch/x86_64/misc/ocxl.h
@@ -71,15 +71,12 @@ struct ocxl_ioctl_irq_fd {
/* ioctl numbers */
#define OCXL_MAGIC 0xCA
/* AFU devices */
-#define OCXL_IOCTL_ATTACH _IOW(OCXL_MAGIC, 0x10, struct ocxl_ioctl_attach)
-#define OCXL_IOCTL_IRQ_ALLOC _IOR(OCXL_MAGIC, 0x11, __u64)
-#define OCXL_IOCTL_IRQ_FREE _IOW(OCXL_MAGIC, 0x12, __u64)
-#define OCXL_IOCTL_IRQ_SET_FD _IOW(OCXL_MAGIC, 0x13, struct ocxl_ioctl_irq_fd)
-#define OCXL_IOCTL_GET_METADATA \
- _IOR(OCXL_MAGIC, 0x14, struct ocxl_ioctl_metadata)
-#define OCXL_IOCTL_ENABLE_P9_WAIT \
- _IOR(OCXL_MAGIC, 0x15, struct ocxl_ioctl_p9_wait)
-#define OCXL_IOCTL_GET_FEATURES \
- _IOR(OCXL_MAGIC, 0x16, struct ocxl_ioctl_features)
+#define OCXL_IOCTL_ATTACH _IOW(OCXL_MAGIC, 0x10, struct ocxl_ioctl_attach)
+#define OCXL_IOCTL_IRQ_ALLOC _IOR(OCXL_MAGIC, 0x11, __u64)
+#define OCXL_IOCTL_IRQ_FREE _IOW(OCXL_MAGIC, 0x12, __u64)
+#define OCXL_IOCTL_IRQ_SET_FD _IOW(OCXL_MAGIC, 0x13, struct ocxl_ioctl_irq_fd)
+#define OCXL_IOCTL_GET_METADATA _IOR(OCXL_MAGIC, 0x14, struct ocxl_ioctl_metadata)
+#define OCXL_IOCTL_ENABLE_P9_WAIT _IOR(OCXL_MAGIC, 0x15, struct ocxl_ioctl_p9_wait)
+#define OCXL_IOCTL_GET_FEATURES _IOR(OCXL_MAGIC, 0x16, struct ocxl_ioctl_features)
#endif /* _MISC_OCXL_H */
diff --git a/include/arch/x86_64/misc/xilinx_sdfec.h b/include/arch/x86_64/misc/xilinx_sdfec.h
index fab151e1..e480f2ee 100644
--- a/include/arch/x86_64/misc/xilinx_sdfec.h
+++ b/include/arch/x86_64/misc/xilinx_sdfec.h
@@ -22,12 +22,9 @@
#define XSDFEC_LDPC_QC_TABLE_ADDR_HIGH (0x28000)
/* LDPC tables depth */
-#define XSDFEC_SC_TABLE_DEPTH \
- (XSDFEC_LDPC_SC_TABLE_ADDR_HIGH - XSDFEC_LDPC_SC_TABLE_ADDR_BASE)
-#define XSDFEC_LA_TABLE_DEPTH \
- (XSDFEC_LDPC_LA_TABLE_ADDR_HIGH - XSDFEC_LDPC_LA_TABLE_ADDR_BASE)
-#define XSDFEC_QC_TABLE_DEPTH \
- (XSDFEC_LDPC_QC_TABLE_ADDR_HIGH - XSDFEC_LDPC_QC_TABLE_ADDR_BASE)
+#define XSDFEC_SC_TABLE_DEPTH (XSDFEC_LDPC_SC_TABLE_ADDR_HIGH - XSDFEC_LDPC_SC_TABLE_ADDR_BASE)
+#define XSDFEC_LA_TABLE_DEPTH (XSDFEC_LDPC_LA_TABLE_ADDR_HIGH - XSDFEC_LDPC_LA_TABLE_ADDR_BASE)
+#define XSDFEC_QC_TABLE_DEPTH (XSDFEC_LDPC_QC_TABLE_ADDR_HIGH - XSDFEC_LDPC_QC_TABLE_ADDR_BASE)
/**
* enum xsdfec_code - Code Type.
@@ -339,8 +336,7 @@ struct xsdfec_ldpc_param_table_sizes {
*
* - SD-FEC Code Write Protection is disabled
*/
-#define XSDFEC_ADD_LDPC_CODE_PARAMS \
- _IOW(XSDFEC_MAGIC, 5, struct xsdfec_ldpc_params)
+#define XSDFEC_ADD_LDPC_CODE_PARAMS _IOW(XSDFEC_MAGIC, 5, struct xsdfec_ldpc_params)
/**
* DOC: XSDFEC_GET_CONFIG
* @Parameters
diff --git a/include/arch/x86_64/mtd/mtd-abi.h b/include/arch/x86_64/mtd/mtd-abi.h
index a239dac9..1eaf60ac 100644
--- a/include/arch/x86_64/mtd/mtd-abi.h
+++ b/include/arch/x86_64/mtd/mtd-abi.h
@@ -163,9 +163,8 @@ struct mtd_read_req {
#define MTD_CAP_NVRAM (MTD_WRITEABLE | MTD_BIT_WRITEABLE | MTD_NO_ERASE)
/* Obsolete ECC byte placement modes (used with obsolete MEMGETOOBSEL) */
-#define MTD_NANDECC_OFF 0 /* Switch off ECC (Not recommended) */
-#define MTD_NANDECC_PLACE \
- 1 /* Use the given placement in the structure (YAFFS1 legacy mode) */
+#define MTD_NANDECC_OFF 0 /* Switch off ECC (Not recommended) */
+#define MTD_NANDECC_PLACE 1 /* Use the given placement in the structure (YAFFS1 legacy mode) */
#define MTD_NANDECC_AUTOPLACE 2 /* Use the default placement scheme */
#define MTD_NANDECC_PLACEONLY \
3 /* Use the given placement in the structure (Do not store ecc result \
diff --git a/include/arch/x86_64/mtd/ubi-user.h b/include/arch/x86_64/mtd/ubi-user.h
index 298fdbf8..73e76b92 100644
--- a/include/arch/x86_64/mtd/ubi-user.h
+++ b/include/arch/x86_64/mtd/ubi-user.h
@@ -207,8 +207,7 @@
/* Check if LEB is mapped command */
#define UBI_IOCEBISMAP _IOR(UBI_VOL_IOC_MAGIC, 5, __s32)
/* Set an UBI volume property */
-#define UBI_IOCSETVOLPROP \
- _IOW(UBI_VOL_IOC_MAGIC, 6, struct ubi_set_vol_prop_req)
+#define UBI_IOCSETVOLPROP _IOW(UBI_VOL_IOC_MAGIC, 6, struct ubi_set_vol_prop_req)
/* Create a R/O block device on top of an UBI volume */
#define UBI_IOCVOLCRBLK _IOW(UBI_VOL_IOC_MAGIC, 7, struct ubi_blkcreate_req)
/* Remove the R/O block device */
diff --git a/include/arch/x86_64/rdma/hfi/hfi1_ioctl.h b/include/arch/x86_64/rdma/hfi/hfi1_ioctl.h
index 2a60a3f8..66423b1d 100644
--- a/include/arch/x86_64/rdma/hfi/hfi1_ioctl.h
+++ b/include/arch/x86_64/rdma/hfi/hfi1_ioctl.h
@@ -87,14 +87,14 @@ struct hfi1_ctxt_info {
__u16 ctxt; /* ctxt on unit assigned to caller */
__u16 subctxt; /* subctxt on unit assigned to caller */
__u16 rcvtids; /* number of Rcv TIDs for this context */
- __u16 credits; /* number of PIO credits for this context */
- __u16 numa_node; /* NUMA node of the assigned device */
- __u16 rec_cpu; /* cpu # for affinity (0xffff if none) */
- __u16 send_ctxt; /* send context in use by this user context */
- __u16 egrtids; /* number of RcvArray entries for Eager Rcvs */
- __u16 rcvhdrq_cnt; /* number of RcvHdrQ entries */
- __u16 rcvhdrq_entsize; /* size (in bytes) for each RcvHdrQ entry */
- __u16 sdma_ring_size; /* number of entries in SDMA request ring */
+ __u16 credits; /* number of PIO credits for this context */
+ __u16 numa_node; /* NUMA node of the assigned device */
+ __u16 rec_cpu; /* cpu # for affinity (0xffff if none) */
+ __u16 send_ctxt; /* send context in use by this user context */
+ __u16 egrtids; /* number of RcvArray entries for Eager Rcvs */
+ __u16 rcvhdrq_cnt; /* number of RcvHdrQ entries */
+ __u16 rcvhdrq_entsize; /* size (in bytes) for each RcvHdrQ entry */
+ __u16 sdma_ring_size; /* number of entries in SDMA request ring */
};
struct hfi1_tid_info {
diff --git a/include/arch/x86_64/rdma/hfi/hfi1_user.h b/include/arch/x86_64/rdma/hfi/hfi1_user.h
index 31e9eb3c..7cf7e526 100644
--- a/include/arch/x86_64/rdma/hfi/hfi1_user.h
+++ b/include/arch/x86_64/rdma/hfi/hfi1_user.h
@@ -108,9 +108,9 @@
*/
#define HFI1_CAP_NO_INTEGRITY (1UL << 13) /* Enable ctxt integrity checks */
#define HFI1_CAP_PKEY_CHECK (1UL << 14) /* Enable ctxt PKey checking */
-#define HFI1_CAP_STATIC_RATE_CTRL \
- (1UL << 15) /* Allow PBC.StaticRateControl \
- */
+#define HFI1_CAP_STATIC_RATE_CTRL \
+ (1UL << 15) /* Allow PBC.StaticRateControl \
+ */
#define HFI1_CAP_OPFN (1UL << 16) /* Enable the OPFN protocol */
#define HFI1_CAP_SDMA_HEAD_CHECK (1UL << 17) /* SDMA head checking */
#define HFI1_CAP_EARLY_CREDIT_RETURN (1UL << 18) /* early credit return */
diff --git a/include/arch/x86_64/rdma/ib_user_ioctl_cmds.h b/include/arch/x86_64/rdma/ib_user_ioctl_cmds.h
index 1cc9b6b5..7f40ce47 100644
--- a/include/arch/x86_64/rdma/ib_user_ioctl_cmds.h
+++ b/include/arch/x86_64/rdma/ib_user_ioctl_cmds.h
@@ -127,8 +127,7 @@ enum uverbs_attrs_create_flow_action_esp {
};
enum uverbs_attrs_modify_flow_action_esp {
- UVERBS_ATTR_MODIFY_FLOW_ACTION_ESP_HANDLE =
- UVERBS_ATTR_CREATE_FLOW_ACTION_ESP_HANDLE,
+ UVERBS_ATTR_MODIFY_FLOW_ACTION_ESP_HANDLE = UVERBS_ATTR_CREATE_FLOW_ACTION_ESP_HANDLE,
};
enum uverbs_attrs_destroy_flow_action_esp {
diff --git a/include/arch/x86_64/rdma/ib_user_ioctl_verbs.h b/include/arch/x86_64/rdma/ib_user_ioctl_verbs.h
index f67eec9d..f2e2c5d0 100644
--- a/include/arch/x86_64/rdma/ib_user_ioctl_verbs.h
+++ b/include/arch/x86_64/rdma/ib_user_ioctl_verbs.h
@@ -62,9 +62,8 @@ enum ib_uverbs_access_flags {
IB_UVERBS_ACCESS_FLUSH_PERSISTENT = 1 << 9,
IB_UVERBS_ACCESS_RELAXED_ORDERING = IB_UVERBS_ACCESS_OPTIONAL_FIRST,
- IB_UVERBS_ACCESS_OPTIONAL_RANGE =
- ((IB_UVERBS_ACCESS_OPTIONAL_LAST << 1) - 1) &
- ~(IB_UVERBS_ACCESS_OPTIONAL_FIRST - 1)
+ IB_UVERBS_ACCESS_OPTIONAL_RANGE = ((IB_UVERBS_ACCESS_OPTIONAL_LAST << 1) - 1) &
+ ~(IB_UVERBS_ACCESS_OPTIONAL_FIRST - 1)
};
enum ib_uverbs_srq_type {
diff --git a/include/arch/x86_64/rdma/mlx4-abi.h b/include/arch/x86_64/rdma/mlx4-abi.h
index 75627f40..8004c7ce 100644
--- a/include/arch/x86_64/rdma/mlx4-abi.h
+++ b/include/arch/x86_64/rdma/mlx4-abi.h
@@ -104,7 +104,7 @@ struct mlx4_ib_create_srq_resp {
struct mlx4_ib_create_qp_rss {
__aligned_u64 rx_hash_fields_mask; /* Use enum mlx4_ib_rx_hash_fields
*/
- __u8 rx_hash_function; /* Use enum mlx4_ib_rx_hash_function_flags */
+ __u8 rx_hash_function; /* Use enum mlx4_ib_rx_hash_function_flags */
__u8 reserved[7];
__u8 rx_hash_key[40];
__u32 comp_mask;
@@ -164,7 +164,7 @@ enum mlx4_ib_rx_hash_fields {
struct mlx4_ib_rss_caps {
__aligned_u64 rx_hash_fields_mask; /* enum mlx4_ib_rx_hash_fields */
- __u8 rx_hash_function; /* enum mlx4_ib_rx_hash_function_flags */
+ __u8 rx_hash_function; /* enum mlx4_ib_rx_hash_function_flags */
__u8 reserved[7];
};
diff --git a/include/arch/x86_64/rdma/mlx5-abi.h b/include/arch/x86_64/rdma/mlx5-abi.h
index f85708de..846c1eef 100644
--- a/include/arch/x86_64/rdma/mlx5-abi.h
+++ b/include/arch/x86_64/rdma/mlx5-abi.h
@@ -127,14 +127,10 @@ enum mlx5_user_inline_mode {
enum {
MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM = 1 << 0,
- MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_REQ_METADATA =
- 1 << 1,
- MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_SPI_STEERING =
- 1 << 2,
- MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_FULL_OFFLOAD =
- 1 << 3,
- MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_TX_IV_IS_ESN =
- 1 << 4,
+ MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_REQ_METADATA = 1 << 1,
+ MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_SPI_STEERING = 1 << 2,
+ MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_FULL_OFFLOAD = 1 << 3,
+ MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_TX_IV_IS_ESN = 1 << 4,
};
struct mlx5_ib_alloc_ucontext_resp {
@@ -178,7 +174,7 @@ struct mlx5_ib_tso_caps {
struct mlx5_ib_rss_caps {
__aligned_u64 rx_hash_fields_mask; /* enum mlx5_rx_hash_fields */
- __u8 rx_hash_function; /* enum mlx5_rx_hash_function_flags */
+ __u8 rx_hash_function; /* enum mlx5_rx_hash_function_flags */
__u8 reserved[7];
};
@@ -381,8 +377,8 @@ enum mlx5_rx_hash_fields {
struct mlx5_ib_create_qp_rss {
__aligned_u64 rx_hash_fields_mask; /* enum mlx5_rx_hash_fields */
- __u8 rx_hash_function; /* enum mlx5_rx_hash_function_flags */
- __u8 rx_key_len; /* valid only for Toeplitz */
+ __u8 rx_hash_function; /* enum mlx5_rx_hash_function_flags */
+ __u8 rx_key_len; /* valid only for Toeplitz */
__u8 reserved[6];
__u8 rx_hash_key[128]; /* valid only for Toeplitz */
__u32 comp_mask;
diff --git a/include/arch/x86_64/rdma/mlx5_user_ioctl_cmds.h b/include/arch/x86_64/rdma/mlx5_user_ioctl_cmds.h
index 333bd0e1..fa9fecc2 100644
--- a/include/arch/x86_64/rdma/mlx5_user_ioctl_cmds.h
+++ b/include/arch/x86_64/rdma/mlx5_user_ioctl_cmds.h
@@ -114,8 +114,7 @@ enum mlx5_ib_devx_obj_query_async_attrs {
};
enum mlx5_ib_devx_subscribe_event_attrs {
- MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_FD_HANDLE =
- (1U << UVERBS_ID_NS_SHIFT),
+ MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_FD_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_OBJ_HANDLE,
MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_TYPE_NUM_LIST,
MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_FD_NUM,
@@ -204,13 +203,11 @@ enum mlx5_ib_devx_umem_methods {
};
enum mlx5_ib_devx_async_cmd_fd_alloc_attrs {
- MLX5_IB_ATTR_DEVX_ASYNC_CMD_FD_ALLOC_HANDLE =
- (1U << UVERBS_ID_NS_SHIFT),
+ MLX5_IB_ATTR_DEVX_ASYNC_CMD_FD_ALLOC_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
};
enum mlx5_ib_devx_async_event_fd_alloc_attrs {
- MLX5_IB_ATTR_DEVX_ASYNC_EVENT_FD_ALLOC_HANDLE =
- (1U << UVERBS_ID_NS_SHIFT),
+ MLX5_IB_ATTR_DEVX_ASYNC_EVENT_FD_ALLOC_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
MLX5_IB_ATTR_DEVX_ASYNC_EVENT_FD_ALLOC_FLAGS,
};
@@ -262,8 +259,7 @@ enum mlx5_ib_flow_steering_anchor_create_attrs {
};
enum mlx5_ib_flow_steering_anchor_destroy_attrs {
- MLX5_IB_ATTR_STEERING_ANCHOR_DESTROY_HANDLE =
- (1U << UVERBS_ID_NS_SHIFT),
+ MLX5_IB_ATTR_STEERING_ANCHOR_DESTROY_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
};
enum mlx5_ib_steering_anchor_methods {
@@ -324,8 +320,7 @@ enum mlx5_ib_flow_methods {
};
enum mlx5_ib_flow_action_methods {
- MLX5_IB_METHOD_FLOW_ACTION_CREATE_MODIFY_HEADER =
- (1U << UVERBS_ID_NS_SHIFT),
+ MLX5_IB_METHOD_FLOW_ACTION_CREATE_MODIFY_HEADER = (1U << UVERBS_ID_NS_SHIFT),
MLX5_IB_METHOD_FLOW_ACTION_CREATE_PACKET_REFORMAT,
};
diff --git a/include/arch/x86_64/rdma/rdma_netlink.h b/include/arch/x86_64/rdma/rdma_netlink.h
index a11920e2..bc53767a 100644
--- a/include/arch/x86_64/rdma/rdma_netlink.h
+++ b/include/arch/x86_64/rdma/rdma_netlink.h
@@ -12,12 +12,7 @@ enum {
RDMA_NL_NUM_CLIENTS
};
-enum {
- RDMA_NL_GROUP_IWPM = 2,
- RDMA_NL_GROUP_LS,
- RDMA_NL_GROUP_NOTIFY,
- RDMA_NL_NUM_GROUPS
-};
+enum { RDMA_NL_GROUP_IWPM = 2, RDMA_NL_GROUP_LS, RDMA_NL_GROUP_NOTIFY, RDMA_NL_NUM_GROUPS };
#define RDMA_NL_GET_CLIENT(type) ((type & (((1 << 6) - 1) << 10)) >> 10)
#define RDMA_NL_GET_OP(type) (type & ((1 << 10) - 1))
@@ -135,18 +130,9 @@ enum {
IWPM_NLA_MAPINFO_NUM_MAX
};
-enum {
- IWPM_NLA_ERR_UNSPEC = 0,
- IWPM_NLA_ERR_SEQ,
- IWPM_NLA_ERR_CODE,
- IWPM_NLA_ERR_MAX
-};
+enum { IWPM_NLA_ERR_UNSPEC = 0, IWPM_NLA_ERR_SEQ, IWPM_NLA_ERR_CODE, IWPM_NLA_ERR_MAX };
-enum {
- IWPM_NLA_HELLO_UNSPEC = 0,
- IWPM_NLA_HELLO_ABI_VERSION,
- IWPM_NLA_HELLO_MAX
-};
+enum { IWPM_NLA_HELLO_UNSPEC = 0, IWPM_NLA_HELLO_ABI_VERSION, IWPM_NLA_HELLO_MAX };
/* For RDMA_NLDEV_ATTR_DEV_NODE_TYPE */
enum {
@@ -166,12 +152,7 @@ enum {
* SET_TIMEOUT - The local service requests the client to set the timeout.
* IP_RESOLVE - The client requests the local service to resolve an IP to GID.
*/
-enum {
- RDMA_NL_LS_OP_RESOLVE = 0,
- RDMA_NL_LS_OP_SET_TIMEOUT,
- RDMA_NL_LS_OP_IP_RESOLVE,
- RDMA_NL_LS_NUM_OPS
-};
+enum { RDMA_NL_LS_OP_RESOLVE = 0, RDMA_NL_LS_OP_SET_TIMEOUT, RDMA_NL_LS_OP_IP_RESOLVE, RDMA_NL_LS_NUM_OPS };
/* Local service netlink message flags */
#define RDMA_NL_LS_F_ERR 0x0100 /* Failed response */
@@ -213,8 +194,7 @@ struct rdma_ls_ip_resolve_header {
/* Local service attribute type */
#define RDMA_NLA_F_MANDATORY (1 << 13)
-#define RDMA_NLA_TYPE_MASK \
- (~(NLA_F_NESTED | NLA_F_NET_BYTEORDER | RDMA_NLA_F_MANDATORY))
+#define RDMA_NLA_TYPE_MASK (~(NLA_F_NESTED | NLA_F_NET_BYTEORDER | RDMA_NLA_F_MANDATORY))
/*
* Local service attributes:
diff --git a/include/arch/x86_64/rdma/rdma_user_cm.h b/include/arch/x86_64/rdma/rdma_user_cm.h
index 9ca67d9d..fce14f3f 100644
--- a/include/arch/x86_64/rdma/rdma_user_cm.h
+++ b/include/arch/x86_64/rdma/rdma_user_cm.h
@@ -145,11 +145,7 @@ struct rdma_ucm_resolve_route {
__u32 timeout_ms;
};
-enum {
- RDMA_USER_CM_QUERY_ADDR,
- RDMA_USER_CM_QUERY_PATH,
- RDMA_USER_CM_QUERY_GID
-};
+enum { RDMA_USER_CM_QUERY_ADDR, RDMA_USER_CM_QUERY_PATH, RDMA_USER_CM_QUERY_GID };
struct rdma_ucm_query {
__aligned_u64 response;
diff --git a/include/arch/x86_64/rdma/rdma_user_ioctl.h b/include/arch/x86_64/rdma/rdma_user_ioctl.h
index 27b08ecf..4953659f 100644
--- a/include/arch/x86_64/rdma/rdma_user_ioctl.h
+++ b/include/arch/x86_64/rdma/rdma_user_ioctl.h
@@ -50,24 +50,20 @@
*/
/* MAD specific section */
-#define IB_USER_MAD_REGISTER_AGENT \
- _IOWR(RDMA_IOCTL_MAGIC, 0x01, struct ib_user_mad_reg_req)
+#define IB_USER_MAD_REGISTER_AGENT _IOWR(RDMA_IOCTL_MAGIC, 0x01, struct ib_user_mad_reg_req)
#define IB_USER_MAD_UNREGISTER_AGENT _IOW(RDMA_IOCTL_MAGIC, 0x02, __u32)
#define IB_USER_MAD_ENABLE_PKEY _IO(RDMA_IOCTL_MAGIC, 0x03)
-#define IB_USER_MAD_REGISTER_AGENT2 \
- _IOWR(RDMA_IOCTL_MAGIC, 0x04, struct ib_user_mad_reg_req2)
+#define IB_USER_MAD_REGISTER_AGENT2 _IOWR(RDMA_IOCTL_MAGIC, 0x04, struct ib_user_mad_reg_req2)
/* HFI specific section */
/* allocate HFI and context */
-#define HFI1_IOCTL_ASSIGN_CTXT \
- _IOWR(RDMA_IOCTL_MAGIC, 0xE1, struct hfi1_user_info)
+#define HFI1_IOCTL_ASSIGN_CTXT _IOWR(RDMA_IOCTL_MAGIC, 0xE1, struct hfi1_user_info)
/* find out what resources we got */
#define HFI1_IOCTL_CTXT_INFO _IOW(RDMA_IOCTL_MAGIC, 0xE2, struct hfi1_ctxt_info)
/* set up userspace */
#define HFI1_IOCTL_USER_INFO _IOW(RDMA_IOCTL_MAGIC, 0xE3, struct hfi1_base_info)
/* update expected TID entries */
-#define HFI1_IOCTL_TID_UPDATE \
- _IOWR(RDMA_IOCTL_MAGIC, 0xE4, struct hfi1_tid_info)
+#define HFI1_IOCTL_TID_UPDATE _IOWR(RDMA_IOCTL_MAGIC, 0xE4, struct hfi1_tid_info)
/* free expected TID entries */
#define HFI1_IOCTL_TID_FREE _IOWR(RDMA_IOCTL_MAGIC, 0xE5, struct hfi1_tid_info)
/* force an update of PIO credit */
@@ -83,8 +79,7 @@
/* reset context's HW send context */
#define HFI1_IOCTL_CTXT_RESET _IO(RDMA_IOCTL_MAGIC, 0xEC)
/* read TID cache invalidations */
-#define HFI1_IOCTL_TID_INVAL_READ \
- _IOWR(RDMA_IOCTL_MAGIC, 0xED, struct hfi1_tid_info)
+#define HFI1_IOCTL_TID_INVAL_READ _IOWR(RDMA_IOCTL_MAGIC, 0xED, struct hfi1_tid_info)
/* get the version of the user cdev */
#define HFI1_IOCTL_GET_VERS _IOR(RDMA_IOCTL_MAGIC, 0xEE, int)
diff --git a/include/arch/x86_64/rdma/siw-abi.h b/include/arch/x86_64/rdma/siw-abi.h
index 2ae8ca8b..96f57393 100644
--- a/include/arch/x86_64/rdma/siw-abi.h
+++ b/include/arch/x86_64/rdma/siw-abi.h
@@ -140,8 +140,7 @@ enum siw_notify_flags {
SIW_NOTIFY_SOLICITED = (1 << 0),
SIW_NOTIFY_NEXT_COMPLETION = (1 << 1),
SIW_NOTIFY_MISSED_EVENTS = (1 << 2),
- SIW_NOTIFY_ALL = SIW_NOTIFY_SOLICITED | SIW_NOTIFY_NEXT_COMPLETION |
- SIW_NOTIFY_MISSED_EVENTS
+ SIW_NOTIFY_ALL = SIW_NOTIFY_SOLICITED | SIW_NOTIFY_NEXT_COMPLETION | SIW_NOTIFY_MISSED_EVENTS
};
enum siw_wc_status {
diff --git a/include/arch/x86_64/scsi/fc/fc_els.h b/include/arch/x86_64/scsi/fc/fc_els.h
index 6507344f..945c9468 100644
--- a/include/arch/x86_64/scsi/fc/fc_els.h
+++ b/include/arch/x86_64/scsi/fc/fc_els.h
@@ -279,8 +279,7 @@ struct fc_tlv_desc {
#define FC_TLV_DESC_LENGTH_FROM_SZ(desc) (sizeof(desc) - FC_TLV_DESC_HDR_SZ)
/* Macro, used on received payloads, to return the descriptor length */
-#define FC_TLV_DESC_SZ_FROM_LENGTH(tlv) \
- (__be32_to_cpu((tlv)->desc_len) + FC_TLV_DESC_HDR_SZ)
+#define FC_TLV_DESC_SZ_FROM_LENGTH(tlv) (__be32_to_cpu((tlv)->desc_len) + FC_TLV_DESC_HDR_SZ)
/*
* This helper is used to walk descriptors in a descriptor list.
diff --git a/include/arch/x86_64/scsi/fc/fc_fs.h b/include/arch/x86_64/scsi/fc/fc_fs.h
index 36d2f1fe..3068d5a0 100644
--- a/include/arch/x86_64/scsi/fc/fc_fs.h
+++ b/include/arch/x86_64/scsi/fc/fc_fs.h
@@ -186,12 +186,10 @@ enum fc_fh_type {
* FC_TYPE names initializer.
* Please keep this matching the above definitions.
*/
-#define FC_TYPE_NAMES_INIT \
- { \
- [FC_TYPE_BLS] = "BLS", [FC_TYPE_ELS] = "ELS", \
- [FC_TYPE_IP] = "IP", [FC_TYPE_FCP] = "FCP", \
- [FC_TYPE_CT] = "CT", [FC_TYPE_ILS] = "ILS", \
- [FC_TYPE_NVME] = "NVME", \
+#define FC_TYPE_NAMES_INIT \
+ { \
+ [FC_TYPE_BLS] = "BLS", [FC_TYPE_ELS] = "ELS", [FC_TYPE_IP] = "IP", [FC_TYPE_FCP] = "FCP", \
+ [FC_TYPE_CT] = "CT", [FC_TYPE_ILS] = "ILS", [FC_TYPE_NVME] = "NVME", \
}
/*
diff --git a/include/arch/x86_64/sound/asequencer.h b/include/arch/x86_64/sound/asequencer.h
index 61e31e42..a33bf14a 100644
--- a/include/arch/x86_64/sound/asequencer.h
+++ b/include/arch/x86_64/sound/asequencer.h
@@ -33,21 +33,18 @@
/** control messages (channel specific)
* event data type = #snd_seq_ev_ctrl
*/
-#define SNDRV_SEQ_EVENT_CONTROLLER 10
-#define SNDRV_SEQ_EVENT_PGMCHANGE 11
-#define SNDRV_SEQ_EVENT_CHANPRESS 12
-#define SNDRV_SEQ_EVENT_PITCHBEND 13 /**< from -8192 to 8191 */
-#define SNDRV_SEQ_EVENT_CONTROL14 14 /**< 14 bit controller value */
-#define SNDRV_SEQ_EVENT_NONREGPARAM \
- 15 /**< 14 bit NRPN address + 14 bit unsigned value */
-#define SNDRV_SEQ_EVENT_REGPARAM \
- 16 /**< 14 bit RPN address + 14 bit unsigned value */
+#define SNDRV_SEQ_EVENT_CONTROLLER 10
+#define SNDRV_SEQ_EVENT_PGMCHANGE 11
+#define SNDRV_SEQ_EVENT_CHANPRESS 12
+#define SNDRV_SEQ_EVENT_PITCHBEND 13 /**< from -8192 to 8191 */
+#define SNDRV_SEQ_EVENT_CONTROL14 14 /**< 14 bit controller value */
+#define SNDRV_SEQ_EVENT_NONREGPARAM 15 /**< 14 bit NRPN address + 14 bit unsigned value */
+#define SNDRV_SEQ_EVENT_REGPARAM 16 /**< 14 bit RPN address + 14 bit unsigned value */
/** synchronisation messages
* event data type = #snd_seq_ev_ctrl
*/
-#define SNDRV_SEQ_EVENT_SONGPOS \
- 20 /* Song Position Pointer with LSB and MSB values */
+#define SNDRV_SEQ_EVENT_SONGPOS 20 /* Song Position Pointer with LSB and MSB values */
#define SNDRV_SEQ_EVENT_SONGSEL 21 /* Song Select with song ID number */
#define SNDRV_SEQ_EVENT_QFRAME 22 /* midi time code quarter frame */
#define SNDRV_SEQ_EVENT_TIMESIGN 23 /* SMF Time Signature event */
@@ -149,8 +146,8 @@ typedef unsigned char snd_seq_event_type_t;
struct snd_seq_addr {
unsigned char client; /**< Client number: 0..255, 255 =
broadcast to all clients */
- unsigned char port; /**< Port within client: 0..255, 255 = broadcast
- to all ports */
+ unsigned char port; /**< Port within client: 0..255, 255 = broadcast
+ to all ports */
};
/** port connection */
@@ -159,12 +156,10 @@ struct snd_seq_connect {
struct snd_seq_addr dest;
};
-#define SNDRV_SEQ_ADDRESS_UNKNOWN 253 /* unknown source */
-#define SNDRV_SEQ_ADDRESS_SUBSCRIBERS \
- 254 /* send event to all subscribed ports */
-#define SNDRV_SEQ_ADDRESS_BROADCAST \
- 255 /* send event to all queues/clients/ports/channels */
-#define SNDRV_SEQ_QUEUE_DIRECT 253 /* direct dispatch */
+#define SNDRV_SEQ_ADDRESS_UNKNOWN 253 /* unknown source */
+#define SNDRV_SEQ_ADDRESS_SUBSCRIBERS 254 /* send event to all subscribed ports */
+#define SNDRV_SEQ_ADDRESS_BROADCAST 255 /* send event to all queues/clients/ports/channels */
+#define SNDRV_SEQ_QUEUE_DIRECT 253 /* direct dispatch */
/* event mode flag - NOTE: only 8 bits available! */
#define SNDRV_SEQ_TIME_STAMP_TICK (0 << 0) /* timestamp in clock ticks */
@@ -177,14 +172,12 @@ struct snd_seq_connect {
#define SNDRV_SEQ_EVENT_LENGTH_FIXED (0 << 2) /* fixed event size */
#define SNDRV_SEQ_EVENT_LENGTH_VARIABLE (1 << 2) /* variable event size */
-#define SNDRV_SEQ_EVENT_LENGTH_VARUSR \
- (2 << 2) /* variable event size - user memory space */
-#define SNDRV_SEQ_EVENT_LENGTH_MASK (3 << 2)
+#define SNDRV_SEQ_EVENT_LENGTH_VARUSR (2 << 2) /* variable event size - user memory space */
+#define SNDRV_SEQ_EVENT_LENGTH_MASK (3 << 2)
#define SNDRV_SEQ_PRIORITY_NORMAL (0 << 4) /* normal priority */
-#define SNDRV_SEQ_PRIORITY_HIGH \
- (1 << 4) /* event should be processed before others */
-#define SNDRV_SEQ_PRIORITY_MASK (1 << 4)
+#define SNDRV_SEQ_PRIORITY_HIGH (1 << 4) /* event should be processed before others */
+#define SNDRV_SEQ_PRIORITY_MASK (1 << 4)
#define SNDRV_SEQ_EVENT_UMP (1 << 5) /* event holds a UMP packet */
@@ -358,9 +351,9 @@ typedef int __bitwise snd_seq_client_type_t;
#define KERNEL_CLIENT ((snd_seq_client_type_t)2)
/* event filter flags */
-#define SNDRV_SEQ_FILTER_BROADCAST (1U << 0) /* accept broadcast messages */
-#define SNDRV_SEQ_FILTER_MULTICAST (1U << 1) /* accept multicast messages */
-#define SNDRV_SEQ_FILTER_BOUNCE (1U << 2) /* accept bounce event in error */
+#define SNDRV_SEQ_FILTER_BROADCAST (1U << 0) /* accept broadcast messages */
+#define SNDRV_SEQ_FILTER_MULTICAST (1U << 1) /* accept multicast messages */
+#define SNDRV_SEQ_FILTER_BOUNCE (1U << 2) /* accept bounce event in error */
#define SNDRV_SEQ_FILTER_NO_CONVERT (1U << 30) /* don't convert UMP events */
#define SNDRV_SEQ_FILTER_USE_EVENT (1U << 31) /* use event filter */
@@ -401,18 +394,16 @@ struct snd_seq_client_pool {
/* Remove events by specified criteria */
-#define SNDRV_SEQ_REMOVE_INPUT (1 << 0) /* Flush input queues */
-#define SNDRV_SEQ_REMOVE_OUTPUT (1 << 1) /* Flush output queues */
-#define SNDRV_SEQ_REMOVE_DEST \
- (1 << 2) /* Restrict by destination q:client:port */
+#define SNDRV_SEQ_REMOVE_INPUT (1 << 0) /* Flush input queues */
+#define SNDRV_SEQ_REMOVE_OUTPUT (1 << 1) /* Flush output queues */
+#define SNDRV_SEQ_REMOVE_DEST (1 << 2) /* Restrict by destination q:client:port */
#define SNDRV_SEQ_REMOVE_DEST_CHANNEL (1 << 3) /* Restrict by channel */
#define SNDRV_SEQ_REMOVE_TIME_BEFORE (1 << 4) /* Restrict to before time */
#define SNDRV_SEQ_REMOVE_TIME_AFTER (1 << 5) /* Restrict to time or after */
#define SNDRV_SEQ_REMOVE_TIME_TICK (1 << 6) /* Time is in ticks */
#define SNDRV_SEQ_REMOVE_EVENT_TYPE (1 << 7) /* Restrict to event type */
#define SNDRV_SEQ_REMOVE_IGNORE_OFF (1 << 8) /* Do not flush off events */
-#define SNDRV_SEQ_REMOVE_TAG_MATCH \
- (1 << 9) /* Restrict to events with given tag */
+#define SNDRV_SEQ_REMOVE_TAG_MATCH (1 << 9) /* Restrict to events with given tag */
struct snd_seq_remove_events {
unsigned int remove_mode; /* Flags that determine what gets removed */
@@ -442,40 +433,32 @@ struct snd_seq_remove_events {
#define SNDRV_SEQ_PORT_CAP_DUPLEX (1 << 4)
-#define SNDRV_SEQ_PORT_CAP_SUBS_READ (1 << 5) /* allow read subscription */
-#define SNDRV_SEQ_PORT_CAP_SUBS_WRITE (1 << 6) /* allow write subscription */
-#define SNDRV_SEQ_PORT_CAP_NO_EXPORT (1 << 7) /* routing not allowed */
-#define SNDRV_SEQ_PORT_CAP_INACTIVE (1 << 8) /* inactive port */
-#define SNDRV_SEQ_PORT_CAP_UMP_ENDPOINT \
- (1 << 9) /* MIDI 2.0 UMP Endpoint port */
+#define SNDRV_SEQ_PORT_CAP_SUBS_READ (1 << 5) /* allow read subscription */
+#define SNDRV_SEQ_PORT_CAP_SUBS_WRITE (1 << 6) /* allow write subscription */
+#define SNDRV_SEQ_PORT_CAP_NO_EXPORT (1 << 7) /* routing not allowed */
+#define SNDRV_SEQ_PORT_CAP_INACTIVE (1 << 8) /* inactive port */
+#define SNDRV_SEQ_PORT_CAP_UMP_ENDPOINT (1 << 9) /* MIDI 2.0 UMP Endpoint port */
/* port type */
#define SNDRV_SEQ_PORT_TYPE_SPECIFIC (1 << 0) /* hardware specific */
#define SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC (1 << 1) /* generic MIDI device */
-#define SNDRV_SEQ_PORT_TYPE_MIDI_GM \
- (1 << 2) /* General MIDI compatible device */
-#define SNDRV_SEQ_PORT_TYPE_MIDI_GS (1 << 3) /* GS compatible device */
-#define SNDRV_SEQ_PORT_TYPE_MIDI_XG (1 << 4) /* XG compatible device */
-#define SNDRV_SEQ_PORT_TYPE_MIDI_MT32 (1 << 5) /* MT-32 compatible device */
-#define SNDRV_SEQ_PORT_TYPE_MIDI_GM2 \
- (1 << 6) /* General MIDI 2 compatible device */
-#define SNDRV_SEQ_PORT_TYPE_MIDI_UMP (1 << 7) /* UMP */
+#define SNDRV_SEQ_PORT_TYPE_MIDI_GM (1 << 2) /* General MIDI compatible device */
+#define SNDRV_SEQ_PORT_TYPE_MIDI_GS (1 << 3) /* GS compatible device */
+#define SNDRV_SEQ_PORT_TYPE_MIDI_XG (1 << 4) /* XG compatible device */
+#define SNDRV_SEQ_PORT_TYPE_MIDI_MT32 (1 << 5) /* MT-32 compatible device */
+#define SNDRV_SEQ_PORT_TYPE_MIDI_GM2 (1 << 6) /* General MIDI 2 compatible device */
+#define SNDRV_SEQ_PORT_TYPE_MIDI_UMP (1 << 7) /* UMP */
/* other standards...*/
-#define SNDRV_SEQ_PORT_TYPE_SYNTH \
- (1 << 10) /* Synth device (no MIDI compatible - direct wavetable) */
-#define SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE \
- (1 << 11) /* Sampling device (support sample download) */
-#define SNDRV_SEQ_PORT_TYPE_SAMPLE \
- (1 << 12) /* Sampling device (sample can be downloaded at any time) */
+#define SNDRV_SEQ_PORT_TYPE_SYNTH (1 << 10) /* Synth device (no MIDI compatible - direct wavetable) */
+#define SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE (1 << 11) /* Sampling device (support sample download) */
+#define SNDRV_SEQ_PORT_TYPE_SAMPLE (1 << 12) /* Sampling device (sample can be downloaded at any time) */
/*...*/
-#define SNDRV_SEQ_PORT_TYPE_HARDWARE \
- (1 << 16) /* driver for a hardware device */
+#define SNDRV_SEQ_PORT_TYPE_HARDWARE (1 << 16) /* driver for a hardware device */
#define SNDRV_SEQ_PORT_TYPE_SOFTWARE (1 << 17) /* implemented in software */
#define SNDRV_SEQ_PORT_TYPE_SYNTHESIZER (1 << 18) /* generates sound */
#define SNDRV_SEQ_PORT_TYPE_PORT (1 << 19) /* connects to other device(s) */
-#define SNDRV_SEQ_PORT_TYPE_APPLICATION \
- (1 << 20) /* application (sequencer/editor) */
+#define SNDRV_SEQ_PORT_TYPE_APPLICATION (1 << 20) /* application (sequencer/editor) */
/* misc. conditioning flags */
#define SNDRV_SEQ_PORT_FLG_GIVEN_PORT (1 << 0)
@@ -507,9 +490,9 @@ struct snd_seq_port_info {
unsigned int flags; /* misc. conditioning */
unsigned char time_queue; /* queue # for timestamping */
unsigned char direction; /* port usage direction (r/w/bidir) */
- unsigned char ump_group; /* 0 = UMP EP (no conversion), 1-16 = UMP group
- number */
- char reserved[57]; /* for future use */
+ unsigned char ump_group; /* 0 = UMP EP (no conversion), 1-16 = UMP group
+ number */
+ char reserved[57]; /* for future use */
};
/* queue flags */
@@ -543,10 +526,10 @@ struct snd_seq_queue_status {
/* queue tempo */
struct snd_seq_queue_tempo {
- int queue; /* sequencer queue */
- unsigned int tempo; /* current tempo, us/tick (or different time-base
- below) */
- int ppq; /* time resolution, ticks/quarter */
+ int queue; /* sequencer queue */
+ unsigned int tempo; /* current tempo, us/tick (or different time-base
+ below) */
+ int ppq; /* time resolution, ticks/quarter */
unsigned int skew_value; /* queue skew */
unsigned int skew_base; /* queue skew base */
unsigned short tempo_base; /* tempo base in nsec unit; either 10 or 1000
@@ -588,11 +571,11 @@ struct snd_seq_queue_client {
struct snd_seq_port_subscribe {
struct snd_seq_addr sender; /* sender address */
struct snd_seq_addr dest; /* destination address */
- unsigned int voices; /* number of voices to be allocated (0 = don't
- care) */
- unsigned int flags; /* modes */
- unsigned char queue; /* input time-stamp queue (optional) */
- unsigned char pad[3]; /* reserved */
+ unsigned int voices; /* number of voices to be allocated (0 = don't
+ care) */
+ unsigned int flags; /* modes */
+ unsigned char queue; /* input time-stamp queue (optional) */
+ unsigned char pad[3]; /* reserved */
char reserved[64];
};
@@ -604,7 +587,7 @@ struct snd_seq_query_subs {
struct snd_seq_addr root; /* client/port id to be searched */
int type; /* READ or WRITE */
int index; /* 0..N-1 */
- int num_subs; /* R/O: number of subscriptions on this port */
+ int num_subs; /* R/O: number of subscriptions on this port */
struct snd_seq_addr addr; /* R/O: result */
unsigned char queue; /* R/O: result */
unsigned int flags; /* R/O: result */
@@ -628,66 +611,43 @@ struct snd_seq_client_ump_info {
* IOCTL commands
*/
-#define SNDRV_SEQ_IOCTL_PVERSION _IOR('S', 0x00, int)
-#define SNDRV_SEQ_IOCTL_CLIENT_ID _IOR('S', 0x01, int)
-#define SNDRV_SEQ_IOCTL_SYSTEM_INFO _IOWR('S', 0x02, struct snd_seq_system_info)
-#define SNDRV_SEQ_IOCTL_RUNNING_MODE \
- _IOWR('S', 0x03, struct snd_seq_running_info)
+#define SNDRV_SEQ_IOCTL_PVERSION _IOR('S', 0x00, int)
+#define SNDRV_SEQ_IOCTL_CLIENT_ID _IOR('S', 0x01, int)
+#define SNDRV_SEQ_IOCTL_SYSTEM_INFO _IOWR('S', 0x02, struct snd_seq_system_info)
+#define SNDRV_SEQ_IOCTL_RUNNING_MODE _IOWR('S', 0x03, struct snd_seq_running_info)
#define SNDRV_SEQ_IOCTL_USER_PVERSION _IOW('S', 0x04, int)
-#define SNDRV_SEQ_IOCTL_GET_CLIENT_INFO \
- _IOWR('S', 0x10, struct snd_seq_client_info)
-#define SNDRV_SEQ_IOCTL_SET_CLIENT_INFO \
- _IOW('S', 0x11, struct snd_seq_client_info)
-#define SNDRV_SEQ_IOCTL_GET_CLIENT_UMP_INFO \
- _IOWR('S', 0x12, struct snd_seq_client_ump_info)
-#define SNDRV_SEQ_IOCTL_SET_CLIENT_UMP_INFO \
- _IOWR('S', 0x13, struct snd_seq_client_ump_info)
+#define SNDRV_SEQ_IOCTL_GET_CLIENT_INFO _IOWR('S', 0x10, struct snd_seq_client_info)
+#define SNDRV_SEQ_IOCTL_SET_CLIENT_INFO _IOW('S', 0x11, struct snd_seq_client_info)
+#define SNDRV_SEQ_IOCTL_GET_CLIENT_UMP_INFO _IOWR('S', 0x12, struct snd_seq_client_ump_info)
+#define SNDRV_SEQ_IOCTL_SET_CLIENT_UMP_INFO _IOWR('S', 0x13, struct snd_seq_client_ump_info)
#define SNDRV_SEQ_IOCTL_CREATE_PORT _IOWR('S', 0x20, struct snd_seq_port_info)
#define SNDRV_SEQ_IOCTL_DELETE_PORT _IOW('S', 0x21, struct snd_seq_port_info)
#define SNDRV_SEQ_IOCTL_GET_PORT_INFO _IOWR('S', 0x22, struct snd_seq_port_info)
#define SNDRV_SEQ_IOCTL_SET_PORT_INFO _IOW('S', 0x23, struct snd_seq_port_info)
-#define SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT \
- _IOW('S', 0x30, struct snd_seq_port_subscribe)
-#define SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT \
- _IOW('S', 0x31, struct snd_seq_port_subscribe)
-
-#define SNDRV_SEQ_IOCTL_CREATE_QUEUE _IOWR('S', 0x32, struct snd_seq_queue_info)
-#define SNDRV_SEQ_IOCTL_DELETE_QUEUE _IOW('S', 0x33, struct snd_seq_queue_info)
-#define SNDRV_SEQ_IOCTL_GET_QUEUE_INFO \
- _IOWR('S', 0x34, struct snd_seq_queue_info)
-#define SNDRV_SEQ_IOCTL_SET_QUEUE_INFO \
- _IOWR('S', 0x35, struct snd_seq_queue_info)
-#define SNDRV_SEQ_IOCTL_GET_NAMED_QUEUE \
- _IOWR('S', 0x36, struct snd_seq_queue_info)
-#define SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS \
- _IOWR('S', 0x40, struct snd_seq_queue_status)
-#define SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO \
- _IOWR('S', 0x41, struct snd_seq_queue_tempo)
-#define SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO \
- _IOW('S', 0x42, struct snd_seq_queue_tempo)
-#define SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER \
- _IOWR('S', 0x45, struct snd_seq_queue_timer)
-#define SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER \
- _IOW('S', 0x46, struct snd_seq_queue_timer)
-#define SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT \
- _IOWR('S', 0x49, struct snd_seq_queue_client)
-#define SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT \
- _IOW('S', 0x4a, struct snd_seq_queue_client)
-#define SNDRV_SEQ_IOCTL_GET_CLIENT_POOL \
- _IOWR('S', 0x4b, struct snd_seq_client_pool)
-#define SNDRV_SEQ_IOCTL_SET_CLIENT_POOL \
- _IOW('S', 0x4c, struct snd_seq_client_pool)
-#define SNDRV_SEQ_IOCTL_REMOVE_EVENTS \
- _IOW('S', 0x4e, struct snd_seq_remove_events)
-#define SNDRV_SEQ_IOCTL_QUERY_SUBS _IOWR('S', 0x4f, struct snd_seq_query_subs)
-#define SNDRV_SEQ_IOCTL_GET_SUBSCRIPTION \
- _IOWR('S', 0x50, struct snd_seq_port_subscribe)
-#define SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT \
- _IOWR('S', 0x51, struct snd_seq_client_info)
-#define SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT \
- _IOWR('S', 0x52, struct snd_seq_port_info)
+#define SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT _IOW('S', 0x30, struct snd_seq_port_subscribe)
+#define SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT _IOW('S', 0x31, struct snd_seq_port_subscribe)
+
+#define SNDRV_SEQ_IOCTL_CREATE_QUEUE _IOWR('S', 0x32, struct snd_seq_queue_info)
+#define SNDRV_SEQ_IOCTL_DELETE_QUEUE _IOW('S', 0x33, struct snd_seq_queue_info)
+#define SNDRV_SEQ_IOCTL_GET_QUEUE_INFO _IOWR('S', 0x34, struct snd_seq_queue_info)
+#define SNDRV_SEQ_IOCTL_SET_QUEUE_INFO _IOWR('S', 0x35, struct snd_seq_queue_info)
+#define SNDRV_SEQ_IOCTL_GET_NAMED_QUEUE _IOWR('S', 0x36, struct snd_seq_queue_info)
+#define SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS _IOWR('S', 0x40, struct snd_seq_queue_status)
+#define SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO _IOWR('S', 0x41, struct snd_seq_queue_tempo)
+#define SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO _IOW('S', 0x42, struct snd_seq_queue_tempo)
+#define SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER _IOWR('S', 0x45, struct snd_seq_queue_timer)
+#define SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER _IOW('S', 0x46, struct snd_seq_queue_timer)
+#define SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT _IOWR('S', 0x49, struct snd_seq_queue_client)
+#define SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT _IOW('S', 0x4a, struct snd_seq_queue_client)
+#define SNDRV_SEQ_IOCTL_GET_CLIENT_POOL _IOWR('S', 0x4b, struct snd_seq_client_pool)
+#define SNDRV_SEQ_IOCTL_SET_CLIENT_POOL _IOW('S', 0x4c, struct snd_seq_client_pool)
+#define SNDRV_SEQ_IOCTL_REMOVE_EVENTS _IOW('S', 0x4e, struct snd_seq_remove_events)
+#define SNDRV_SEQ_IOCTL_QUERY_SUBS _IOWR('S', 0x4f, struct snd_seq_query_subs)
+#define SNDRV_SEQ_IOCTL_GET_SUBSCRIPTION _IOWR('S', 0x50, struct snd_seq_port_subscribe)
+#define SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT _IOWR('S', 0x51, struct snd_seq_client_info)
+#define SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT _IOWR('S', 0x52, struct snd_seq_port_info)
#endif /* __SOUND_ASEQUENCER_H */
diff --git a/include/arch/x86_64/sound/asoc.h b/include/arch/x86_64/sound/asoc.h
index 5a48620a..dc5da281 100644
--- a/include/arch/x86_64/sound/asoc.h
+++ b/include/arch/x86_64/sound/asoc.h
@@ -217,16 +217,13 @@ struct snd_soc_tplg_vendor_string_elem {
} __attribute__((packed));
struct snd_soc_tplg_vendor_array {
- __le32 size; /* size in bytes of the array, including all elements */
- __le32 type; /* SND_SOC_TPLG_TUPLE_TYPE_ */
+ __le32 size; /* size in bytes of the array, including all elements */
+ __le32 type; /* SND_SOC_TPLG_TUPLE_TYPE_ */
__le32 num_elems; /* number of elements in array */
union {
- __DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_uuid_elem,
- uuid);
- __DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_value_elem,
- value);
- __DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_string_elem,
- string);
+ __DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_uuid_elem, uuid);
+ __DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_value_elem, value);
+ __DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_string_elem, string);
};
} __attribute__((packed));
@@ -319,7 +316,7 @@ struct snd_soc_tplg_stream_caps {
* FE or BE Stream configuration supported by SW/FW
*/
struct snd_soc_tplg_stream {
- __le32 size; /* in bytes of this structure */
+ __le32 size; /* in bytes of this structure */
char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* Name of the stream */
__le64 format; /* SNDRV_PCM_FMTBIT_* */
__le32 rate; /* SNDRV_PCM_RATE_* */
@@ -333,24 +330,24 @@ struct snd_soc_tplg_stream {
* i.e. hardware audio formats.
*/
struct snd_soc_tplg_hw_config {
- __le32 size; /* in bytes of this structure */
- __le32 id; /* unique ID - - used to match */
- __le32 fmt; /* SND_SOC_DAI_FORMAT_ format value */
- __u8 clock_gated; /* SND_SOC_TPLG_DAI_CLK_GATE_ value */
- __u8 invert_bclk; /* 1 for inverted BCLK, 0 for normal */
- __u8 invert_fsync; /* 1 for inverted frame clock, 0 for normal */
- __u8 bclk_provider; /* SND_SOC_TPLG_BCLK_ value */
- __u8 fsync_provider; /* SND_SOC_TPLG_FSYNC_ value */
- __u8 mclk_direction; /* SND_SOC_TPLG_MCLK_ value */
- __le16 reserved; /* for 32bit alignment */
- __le32 mclk_rate; /* MCLK or SYSCLK freqency in Hz */
- __le32 bclk_rate; /* BCLK freqency in Hz */
- __le32 fsync_rate; /* frame clock in Hz */
- __le32 tdm_slots; /* number of TDM slots in use */
- __le32 tdm_slot_width; /* width in bits for each slot */
- __le32 tx_slots; /* bit mask for active Tx slots */
- __le32 rx_slots; /* bit mask for active Rx slots */
- __le32 tx_channels; /* number of Tx channels */
+ __le32 size; /* in bytes of this structure */
+ __le32 id; /* unique ID - - used to match */
+ __le32 fmt; /* SND_SOC_DAI_FORMAT_ format value */
+ __u8 clock_gated; /* SND_SOC_TPLG_DAI_CLK_GATE_ value */
+ __u8 invert_bclk; /* 1 for inverted BCLK, 0 for normal */
+ __u8 invert_fsync; /* 1 for inverted frame clock, 0 for normal */
+ __u8 bclk_provider; /* SND_SOC_TPLG_BCLK_ value */
+ __u8 fsync_provider; /* SND_SOC_TPLG_FSYNC_ value */
+ __u8 mclk_direction; /* SND_SOC_TPLG_MCLK_ value */
+ __le16 reserved; /* for 32bit alignment */
+ __le32 mclk_rate; /* MCLK or SYSCLK freqency in Hz */
+ __le32 bclk_rate; /* BCLK freqency in Hz */
+ __le32 fsync_rate; /* frame clock in Hz */
+ __le32 tdm_slots; /* number of TDM slots in use */
+ __le32 tdm_slot_width; /* width in bits for each slot */
+ __le32 tx_slots; /* bit mask for active Tx slots */
+ __le32 rx_slots; /* bit mask for active Rx slots */
+ __le32 tx_channels; /* number of Tx channels */
__le32 tx_chanmap[SND_SOC_TPLG_MAX_CHAN]; /* array of slot number */
__le32 rx_channels; /* number of Rx channels */
__le32 rx_chanmap[SND_SOC_TPLG_MAX_CHAN]; /* array of slot number */
@@ -421,8 +418,7 @@ struct snd_soc_tplg_enum_control {
__le32 mask;
__le32 count;
char texts[SND_SOC_TPLG_NUM_TEXTS][SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
- __le32 values[SND_SOC_TPLG_NUM_TEXTS * SNDRV_CTL_ELEM_ID_NAME_MAXLEN /
- 4];
+ __le32 values[SND_SOC_TPLG_NUM_TEXTS * SNDRV_CTL_ELEM_ID_NAME_MAXLEN / 4];
struct snd_soc_tplg_private priv;
} __attribute__((packed));
@@ -515,21 +511,20 @@ struct snd_soc_tplg_pcm {
__le32 size; /* in bytes of this structure */
char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
- __le32 pcm_id; /* unique ID - used to match with DAI link */
- __le32 dai_id; /* unique ID - used to match */
- __le32 playback; /* supports playback mode */
- __le32 capture; /* supports capture mode */
- __le32 compress; /* 1 = compressed; 0 = PCM */
- struct snd_soc_tplg_stream
- stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for
- DAI
- link
- */
- __le32 num_streams; /* number of streams */
- struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI
- */
- __le32 flag_mask; /* bitmask of flags to configure */
- __le32 flags; /* SND_SOC_TPLG_LNK_FLGBIT_* flag value */
+ __le32 pcm_id; /* unique ID - used to match with DAI link */
+ __le32 dai_id; /* unique ID - used to match */
+ __le32 playback; /* supports playback mode */
+ __le32 capture; /* supports capture mode */
+ __le32 compress; /* 1 = compressed; 0 = PCM */
+ struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for
+ DAI
+ link
+ */
+ __le32 num_streams; /* number of streams */
+ struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI
+ */
+ __le32 flag_mask; /* bitmask of flags to configure */
+ __le32 flags; /* SND_SOC_TPLG_LNK_FLGBIT_* flag value */
struct snd_soc_tplg_private priv;
} __attribute__((packed));
@@ -544,25 +539,23 @@ struct snd_soc_tplg_pcm {
* +-----------------------------------+-----+
*/
struct snd_soc_tplg_link_config {
- __le32 size; /* in bytes of this structure */
- __le32 id; /* unique ID - used to match */
- char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* name - used to match */
- char stream_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* stream name - used
- to match */
- struct snd_soc_tplg_stream
- stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported
- configs
- playback
- and
- captrure
- */
- __le32 num_streams; /* number of streams */
- struct snd_soc_tplg_hw_config
- hw_config[SND_SOC_TPLG_HW_CONFIG_MAX]; /* hw configs */
- __le32 num_hw_configs; /* number of hw configs */
- __le32 default_hw_config_id; /* default hw config ID for init */
- __le32 flag_mask; /* bitmask of flags to configure */
- __le32 flags; /* SND_SOC_TPLG_LNK_FLGBIT_* flag value */
+ __le32 size; /* in bytes of this structure */
+ __le32 id; /* unique ID - used to match */
+ char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* name - used to match */
+ char stream_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* stream name - used
+ to match */
+ struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported
+ configs
+ playback
+ and
+ captrure
+ */
+ __le32 num_streams; /* number of streams */
+ struct snd_soc_tplg_hw_config hw_config[SND_SOC_TPLG_HW_CONFIG_MAX]; /* hw configs */
+ __le32 num_hw_configs; /* number of hw configs */
+ __le32 default_hw_config_id; /* default hw config ID for init */
+ __le32 flag_mask; /* bitmask of flags to configure */
+ __le32 flags; /* SND_SOC_TPLG_LNK_FLGBIT_* flag value */
struct snd_soc_tplg_private priv;
} __attribute__((packed));
@@ -578,15 +571,15 @@ struct snd_soc_tplg_link_config {
* +-----------------------------------+-----+
*/
struct snd_soc_tplg_dai {
- __le32 size; /* in bytes of this structure */
+ __le32 size; /* in bytes of this structure */
char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* name - used to match */
- __le32 dai_id; /* unique ID - used to match */
- __le32 playback; /* supports playback mode */
- __le32 capture; /* supports capture mode */
- struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI
- */
- __le32 flag_mask; /* bitmask of flags to configure */
- __le32 flags; /* SND_SOC_TPLG_DAI_FLGBIT_* */
+ __le32 dai_id; /* unique ID - used to match */
+ __le32 playback; /* supports playback mode */
+ __le32 capture; /* supports capture mode */
+ struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI
+ */
+ __le32 flag_mask; /* bitmask of flags to configure */
+ __le32 flags; /* SND_SOC_TPLG_DAI_FLGBIT_* */
struct snd_soc_tplg_private priv;
} __attribute__((packed));
diff --git a/include/arch/x86_64/sound/asound.h b/include/arch/x86_64/sound/asound.h
index 46a4e3fa..c9c77145 100644
--- a/include/arch/x86_64/sound/asound.h
+++ b/include/arch/x86_64/sound/asound.h
@@ -23,11 +23,10 @@
* protocol version
*/
-#define SNDRV_PROTOCOL_VERSION(major, minor, subminor) \
- (((major) << 16) | ((minor) << 8) | (subminor))
-#define SNDRV_PROTOCOL_MAJOR(version) (((version) >> 16) & 0xffff)
-#define SNDRV_PROTOCOL_MINOR(version) (((version) >> 8) & 0xff)
-#define SNDRV_PROTOCOL_MICRO(version) ((version) & 0xff)
+#define SNDRV_PROTOCOL_VERSION(major, minor, subminor) (((major) << 16) | ((minor) << 8) | (subminor))
+#define SNDRV_PROTOCOL_MAJOR(version) (((version) >> 16) & 0xffff)
+#define SNDRV_PROTOCOL_MINOR(version) (((version) >> 8) & 0xff)
+#define SNDRV_PROTOCOL_MICRO(version) ((version) & 0xff)
#define SNDRV_PROTOCOL_INCOMPATIBLE(kversion, uversion) \
(SNDRV_PROTOCOL_MAJOR(kversion) != SNDRV_PROTOCOL_MAJOR(uversion) || \
(SNDRV_PROTOCOL_MAJOR(kversion) == SNDRV_PROTOCOL_MAJOR(uversion) && \
@@ -44,9 +43,9 @@
struct snd_aes_iec958 {
unsigned char status[AES_IEC958_STATUS_SIZE]; /* AES/IEC958 channel
status bits */
- unsigned char subcode[147]; /* AES/IEC958 subcode bits */
- unsigned char pad; /* nothing */
- unsigned char dig_subframe[4]; /* AES/IEC958 subframe bits */
+ unsigned char subcode[147]; /* AES/IEC958 subcode bits */
+ unsigned char pad; /* nothing */
+ unsigned char dig_subframe[4]; /* AES/IEC958 subframe bits */
};
/****************************************************************************
@@ -75,31 +74,31 @@ enum {
SNDRV_HWDEP_IFACE_OPL2 = 0,
SNDRV_HWDEP_IFACE_OPL3,
SNDRV_HWDEP_IFACE_OPL4,
- SNDRV_HWDEP_IFACE_SB16CSP, /* Creative Signal Processor */
- SNDRV_HWDEP_IFACE_EMU10K1, /* FX8010 processor in EMU10K1 chip */
- SNDRV_HWDEP_IFACE_YSS225, /* Yamaha FX processor */
- SNDRV_HWDEP_IFACE_ICS2115, /* Wavetable synth */
- SNDRV_HWDEP_IFACE_SSCAPE, /* Ensoniq SoundScape ISA card (MC68EC000) */
- SNDRV_HWDEP_IFACE_VX, /* Digigram VX cards */
- SNDRV_HWDEP_IFACE_MIXART, /* Digigram miXart cards */
- SNDRV_HWDEP_IFACE_USX2Y, /* Tascam US122, US224 & US428 usb */
+ SNDRV_HWDEP_IFACE_SB16CSP, /* Creative Signal Processor */
+ SNDRV_HWDEP_IFACE_EMU10K1, /* FX8010 processor in EMU10K1 chip */
+ SNDRV_HWDEP_IFACE_YSS225, /* Yamaha FX processor */
+ SNDRV_HWDEP_IFACE_ICS2115, /* Wavetable synth */
+ SNDRV_HWDEP_IFACE_SSCAPE, /* Ensoniq SoundScape ISA card (MC68EC000) */
+ SNDRV_HWDEP_IFACE_VX, /* Digigram VX cards */
+ SNDRV_HWDEP_IFACE_MIXART, /* Digigram miXart cards */
+ SNDRV_HWDEP_IFACE_USX2Y, /* Tascam US122, US224 & US428 usb */
SNDRV_HWDEP_IFACE_EMUX_WAVETABLE, /* EmuX wavetable */
SNDRV_HWDEP_IFACE_BLUETOOTH, /* Bluetooth audio */
- SNDRV_HWDEP_IFACE_USX2Y_PCM, /* Tascam US122, US224 & US428 rawusb pcm
- */
- SNDRV_HWDEP_IFACE_PCXHR, /* Digigram PCXHR */
- SNDRV_HWDEP_IFACE_SB_RC, /* SB Extigy/Audigy2NX remote control */
- SNDRV_HWDEP_IFACE_HDA, /* HD-audio */
- SNDRV_HWDEP_IFACE_USB_STREAM, /* direct access to usb stream */
- SNDRV_HWDEP_IFACE_FW_DICE, /* TC DICE FireWire device */
- SNDRV_HWDEP_IFACE_FW_FIREWORKS, /* Echo Audio Fireworks based device */
- SNDRV_HWDEP_IFACE_FW_BEBOB, /* BridgeCo BeBoB based device */
- SNDRV_HWDEP_IFACE_FW_OXFW, /* Oxford OXFW970/971 based device */
- SNDRV_HWDEP_IFACE_FW_DIGI00X, /* Digidesign Digi 002/003 family */
- SNDRV_HWDEP_IFACE_FW_TASCAM, /* TASCAM FireWire series */
- SNDRV_HWDEP_IFACE_LINE6, /* Line6 USB processors */
- SNDRV_HWDEP_IFACE_FW_MOTU, /* MOTU FireWire series */
- SNDRV_HWDEP_IFACE_FW_FIREFACE, /* RME Fireface series */
+ SNDRV_HWDEP_IFACE_USX2Y_PCM, /* Tascam US122, US224 & US428 rawusb pcm
+ */
+ SNDRV_HWDEP_IFACE_PCXHR, /* Digigram PCXHR */
+ SNDRV_HWDEP_IFACE_SB_RC, /* SB Extigy/Audigy2NX remote control */
+ SNDRV_HWDEP_IFACE_HDA, /* HD-audio */
+ SNDRV_HWDEP_IFACE_USB_STREAM, /* direct access to usb stream */
+ SNDRV_HWDEP_IFACE_FW_DICE, /* TC DICE FireWire device */
+ SNDRV_HWDEP_IFACE_FW_FIREWORKS, /* Echo Audio Fireworks based device */
+ SNDRV_HWDEP_IFACE_FW_BEBOB, /* BridgeCo BeBoB based device */
+ SNDRV_HWDEP_IFACE_FW_OXFW, /* Oxford OXFW970/971 based device */
+ SNDRV_HWDEP_IFACE_FW_DIGI00X, /* Digidesign Digi 002/003 family */
+ SNDRV_HWDEP_IFACE_FW_TASCAM, /* TASCAM FireWire series */
+ SNDRV_HWDEP_IFACE_LINE6, /* Line6 USB processors */
+ SNDRV_HWDEP_IFACE_FW_MOTU, /* MOTU FireWire series */
+ SNDRV_HWDEP_IFACE_FW_FIREFACE, /* RME Fireface series */
/* Don't forget to change the following: */
SNDRV_HWDEP_IFACE_LAST = SNDRV_HWDEP_IFACE_FW_FIREFACE
@@ -116,11 +115,11 @@ struct snd_hwdep_info {
/* generic DSP loader */
struct snd_hwdep_dsp_status {
- unsigned int version; /* R: driver-specific version */
- unsigned char id[32]; /* R: driver-specific ID string */
- unsigned int num_dsps; /* R: number of DSP images to transfer */
- unsigned int dsp_loaded; /* R: bit flags indicating the loaded DSPs */
- unsigned int chip_ready; /* R: 1 = initialization finished */
+ unsigned int version; /* R: driver-specific version */
+ unsigned char id[32]; /* R: driver-specific ID string */
+ unsigned int num_dsps; /* R: number of DSP images to transfer */
+ unsigned int dsp_loaded; /* R: bit flags indicating the loaded DSPs */
+ unsigned int chip_ready; /* R: 1 = initialization finished */
unsigned char reserved[16]; /* reserved for future use */
};
@@ -132,11 +131,10 @@ struct snd_hwdep_dsp_image {
unsigned long driver_data; /* W: driver-specific data */
};
-#define SNDRV_HWDEP_IOCTL_PVERSION _IOR('H', 0x00, int)
-#define SNDRV_HWDEP_IOCTL_INFO _IOR('H', 0x01, struct snd_hwdep_info)
-#define SNDRV_HWDEP_IOCTL_DSP_STATUS \
- _IOR('H', 0x02, struct snd_hwdep_dsp_status)
-#define SNDRV_HWDEP_IOCTL_DSP_LOAD _IOW('H', 0x03, struct snd_hwdep_dsp_image)
+#define SNDRV_HWDEP_IOCTL_PVERSION _IOR('H', 0x00, int)
+#define SNDRV_HWDEP_IOCTL_INFO _IOR('H', 0x01, struct snd_hwdep_info)
+#define SNDRV_HWDEP_IOCTL_DSP_STATUS _IOR('H', 0x02, struct snd_hwdep_dsp_status)
+#define SNDRV_HWDEP_IOCTL_DSP_LOAD _IOW('H', 0x03, struct snd_hwdep_dsp_image)
/*****************************************************************************
* *
@@ -174,17 +172,14 @@ enum {
};
typedef int __bitwise snd_pcm_access_t;
-#define SNDRV_PCM_ACCESS_MMAP_INTERLEAVED \
- ((snd_pcm_access_t)0) /* interleaved mmap */
-#define SNDRV_PCM_ACCESS_MMAP_NONINTERLEAVED \
- ((snd_pcm_access_t)1) /* noninterleaved mmap */
-#define SNDRV_PCM_ACCESS_MMAP_COMPLEX ((snd_pcm_access_t)2) /* complex mmap */
-#define SNDRV_PCM_ACCESS_RW_INTERLEAVED \
- ((snd_pcm_access_t)3) /* readi/writei \
- */
-#define SNDRV_PCM_ACCESS_RW_NONINTERLEAVED \
- ((snd_pcm_access_t)4) /* readn/writen */
-#define SNDRV_PCM_ACCESS_LAST SNDRV_PCM_ACCESS_RW_NONINTERLEAVED
+#define SNDRV_PCM_ACCESS_MMAP_INTERLEAVED ((snd_pcm_access_t)0) /* interleaved mmap */
+#define SNDRV_PCM_ACCESS_MMAP_NONINTERLEAVED ((snd_pcm_access_t)1) /* noninterleaved mmap */
+#define SNDRV_PCM_ACCESS_MMAP_COMPLEX ((snd_pcm_access_t)2) /* complex mmap */
+#define SNDRV_PCM_ACCESS_RW_INTERLEAVED \
+ ((snd_pcm_access_t)3) /* readi/writei \
+ */
+#define SNDRV_PCM_ACCESS_RW_NONINTERLEAVED ((snd_pcm_access_t)4) /* readn/writen */
+#define SNDRV_PCM_ACCESS_LAST SNDRV_PCM_ACCESS_RW_NONINTERLEAVED
typedef int __bitwise snd_pcm_format_t;
#define SNDRV_PCM_FORMAT_S8 ((snd_pcm_format_t)0)
@@ -216,62 +211,49 @@ typedef int __bitwise snd_pcm_format_t;
#define SNDRV_PCM_FORMAT_FLOAT64_LE \
((snd_pcm_format_t)16) /* 8-byte float, IEEE-754 64-bit, range -1.0 \
to 1.0 */
-#define SNDRV_PCM_FORMAT_FLOAT64_BE \
- ((snd_pcm_format_t)17) /* 8-byte float, IEEE-754 64-bit, range -1.0 \
- to 1.0 */
-#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE \
- ((snd_pcm_format_t)18) /* IEC-958 subframe, Little Endian */
-#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE \
- ((snd_pcm_format_t)19) /* IEC-958 subframe, Big Endian */
-#define SNDRV_PCM_FORMAT_MU_LAW ((snd_pcm_format_t)20)
-#define SNDRV_PCM_FORMAT_A_LAW ((snd_pcm_format_t)21)
-#define SNDRV_PCM_FORMAT_IMA_ADPCM ((snd_pcm_format_t)22)
-#define SNDRV_PCM_FORMAT_MPEG ((snd_pcm_format_t)23)
-#define SNDRV_PCM_FORMAT_GSM ((snd_pcm_format_t)24)
-#define SNDRV_PCM_FORMAT_S20_LE \
- ((snd_pcm_format_t)25) /* in four bytes, LSB justified */
-#define SNDRV_PCM_FORMAT_S20_BE \
- ((snd_pcm_format_t)26) /* in four bytes, LSB justified */
-#define SNDRV_PCM_FORMAT_U20_LE \
- ((snd_pcm_format_t)27) /* in four bytes, LSB justified */
-#define SNDRV_PCM_FORMAT_U20_BE \
- ((snd_pcm_format_t)28) /* in four bytes, LSB justified */
+#define SNDRV_PCM_FORMAT_FLOAT64_BE \
+ ((snd_pcm_format_t)17) /* 8-byte float, IEEE-754 64-bit, range -1.0 \
+ to 1.0 */
+#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE ((snd_pcm_format_t)18) /* IEC-958 subframe, Little Endian */
+#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE ((snd_pcm_format_t)19) /* IEC-958 subframe, Big Endian */
+#define SNDRV_PCM_FORMAT_MU_LAW ((snd_pcm_format_t)20)
+#define SNDRV_PCM_FORMAT_A_LAW ((snd_pcm_format_t)21)
+#define SNDRV_PCM_FORMAT_IMA_ADPCM ((snd_pcm_format_t)22)
+#define SNDRV_PCM_FORMAT_MPEG ((snd_pcm_format_t)23)
+#define SNDRV_PCM_FORMAT_GSM ((snd_pcm_format_t)24)
+#define SNDRV_PCM_FORMAT_S20_LE ((snd_pcm_format_t)25) /* in four bytes, LSB justified */
+#define SNDRV_PCM_FORMAT_S20_BE ((snd_pcm_format_t)26) /* in four bytes, LSB justified */
+#define SNDRV_PCM_FORMAT_U20_LE ((snd_pcm_format_t)27) /* in four bytes, LSB justified */
+#define SNDRV_PCM_FORMAT_U20_BE ((snd_pcm_format_t)28) /* in four bytes, LSB justified */
/* gap in the numbering for a future standard linear format */
-#define SNDRV_PCM_FORMAT_SPECIAL ((snd_pcm_format_t)31)
-#define SNDRV_PCM_FORMAT_S24_3LE ((snd_pcm_format_t)32) /* in three bytes */
-#define SNDRV_PCM_FORMAT_S24_3BE ((snd_pcm_format_t)33) /* in three bytes */
-#define SNDRV_PCM_FORMAT_U24_3LE ((snd_pcm_format_t)34) /* in three bytes */
-#define SNDRV_PCM_FORMAT_U24_3BE ((snd_pcm_format_t)35) /* in three bytes */
-#define SNDRV_PCM_FORMAT_S20_3LE ((snd_pcm_format_t)36) /* in three bytes */
-#define SNDRV_PCM_FORMAT_S20_3BE ((snd_pcm_format_t)37) /* in three bytes */
-#define SNDRV_PCM_FORMAT_U20_3LE ((snd_pcm_format_t)38) /* in three bytes */
-#define SNDRV_PCM_FORMAT_U20_3BE ((snd_pcm_format_t)39) /* in three bytes */
-#define SNDRV_PCM_FORMAT_S18_3LE ((snd_pcm_format_t)40) /* in three bytes */
-#define SNDRV_PCM_FORMAT_S18_3BE ((snd_pcm_format_t)41) /* in three bytes */
-#define SNDRV_PCM_FORMAT_U18_3LE ((snd_pcm_format_t)42) /* in three bytes */
-#define SNDRV_PCM_FORMAT_U18_3BE ((snd_pcm_format_t)43) /* in three bytes */
-#define SNDRV_PCM_FORMAT_G723_24 \
- ((snd_pcm_format_t)44) /* 8 samples in 3 bytes */
-#define SNDRV_PCM_FORMAT_G723_24_1B \
- ((snd_pcm_format_t)45) /* 1 sample in 1 byte */
-#define SNDRV_PCM_FORMAT_G723_40 \
- ((snd_pcm_format_t)46) /* 8 Samples in 5 bytes */
-#define SNDRV_PCM_FORMAT_G723_40_1B \
- ((snd_pcm_format_t)47) /* 1 sample in 1 byte */
-#define SNDRV_PCM_FORMAT_DSD_U8 \
- ((snd_pcm_format_t)48) /* DSD, 1-byte samples DSD (x8) */
+#define SNDRV_PCM_FORMAT_SPECIAL ((snd_pcm_format_t)31)
+#define SNDRV_PCM_FORMAT_S24_3LE ((snd_pcm_format_t)32) /* in three bytes */
+#define SNDRV_PCM_FORMAT_S24_3BE ((snd_pcm_format_t)33) /* in three bytes */
+#define SNDRV_PCM_FORMAT_U24_3LE ((snd_pcm_format_t)34) /* in three bytes */
+#define SNDRV_PCM_FORMAT_U24_3BE ((snd_pcm_format_t)35) /* in three bytes */
+#define SNDRV_PCM_FORMAT_S20_3LE ((snd_pcm_format_t)36) /* in three bytes */
+#define SNDRV_PCM_FORMAT_S20_3BE ((snd_pcm_format_t)37) /* in three bytes */
+#define SNDRV_PCM_FORMAT_U20_3LE ((snd_pcm_format_t)38) /* in three bytes */
+#define SNDRV_PCM_FORMAT_U20_3BE ((snd_pcm_format_t)39) /* in three bytes */
+#define SNDRV_PCM_FORMAT_S18_3LE ((snd_pcm_format_t)40) /* in three bytes */
+#define SNDRV_PCM_FORMAT_S18_3BE ((snd_pcm_format_t)41) /* in three bytes */
+#define SNDRV_PCM_FORMAT_U18_3LE ((snd_pcm_format_t)42) /* in three bytes */
+#define SNDRV_PCM_FORMAT_U18_3BE ((snd_pcm_format_t)43) /* in three bytes */
+#define SNDRV_PCM_FORMAT_G723_24 ((snd_pcm_format_t)44) /* 8 samples in 3 bytes */
+#define SNDRV_PCM_FORMAT_G723_24_1B ((snd_pcm_format_t)45) /* 1 sample in 1 byte */
+#define SNDRV_PCM_FORMAT_G723_40 ((snd_pcm_format_t)46) /* 8 Samples in 5 bytes */
+#define SNDRV_PCM_FORMAT_G723_40_1B ((snd_pcm_format_t)47) /* 1 sample in 1 byte */
+#define SNDRV_PCM_FORMAT_DSD_U8 ((snd_pcm_format_t)48) /* DSD, 1-byte samples DSD (x8) */
#define SNDRV_PCM_FORMAT_DSD_U16_LE \
((snd_pcm_format_t)49) /* DSD, 2-byte samples DSD (x16), little endian \
*/
-#define SNDRV_PCM_FORMAT_DSD_U32_LE \
- ((snd_pcm_format_t)50) /* DSD, 4-byte samples DSD (x32), little endian \
- */
-#define SNDRV_PCM_FORMAT_DSD_U16_BE \
- ((snd_pcm_format_t)51) /* DSD, 2-byte samples DSD (x16), big endian */
-#define SNDRV_PCM_FORMAT_DSD_U32_BE \
- ((snd_pcm_format_t)52) /* DSD, 4-byte samples DSD (x32), big endian */
-#define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_BE
-#define SNDRV_PCM_FORMAT_FIRST SNDRV_PCM_FORMAT_S8
+#define SNDRV_PCM_FORMAT_DSD_U32_LE \
+ ((snd_pcm_format_t)50) /* DSD, 4-byte samples DSD (x32), little endian \
+ */
+#define SNDRV_PCM_FORMAT_DSD_U16_BE ((snd_pcm_format_t)51) /* DSD, 2-byte samples DSD (x16), big endian */
+#define SNDRV_PCM_FORMAT_DSD_U32_BE ((snd_pcm_format_t)52) /* DSD, 4-byte samples DSD (x32), big endian */
+#define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_BE
+#define SNDRV_PCM_FORMAT_FIRST SNDRV_PCM_FORMAT_S8
#ifdef SNDRV_LITTLE_ENDIAN
#define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_LE
@@ -307,75 +289,54 @@ typedef int __bitwise snd_pcm_subformat_t;
#define SNDRV_PCM_SUBFORMAT_MSBITS_24 ((snd_pcm_subformat_t)3)
#define SNDRV_PCM_SUBFORMAT_LAST SNDRV_PCM_SUBFORMAT_MSBITS_24
-#define SNDRV_PCM_INFO_MMAP 0x00000001 /* hardware supports mmap */
-#define SNDRV_PCM_INFO_MMAP_VALID \
- 0x00000002 /* period data are valid during transfer */
-#define SNDRV_PCM_INFO_DOUBLE \
- 0x00000004 /* Double buffering needed for PCM start/stop */
-#define SNDRV_PCM_INFO_BATCH 0x00000010 /* double buffering */
-#define SNDRV_PCM_INFO_SYNC_APPLPTR \
- 0x00000020 /* need the explicit sync of appl_ptr update */
-#define SNDRV_PCM_INFO_PERFECT_DRAIN \
- 0x00000040 /* silencing at the end of stream is not required */
-#define SNDRV_PCM_INFO_INTERLEAVED 0x00000100 /* channels are interleaved */
-#define SNDRV_PCM_INFO_NONINTERLEAVED \
- 0x00000200 /* channels are not interleaved */
-#define SNDRV_PCM_INFO_COMPLEX \
- 0x00000400 /* complex frame organization (mmap only) */
-#define SNDRV_PCM_INFO_BLOCK_TRANSFER \
- 0x00010000 /* hardware transfer block of samples */
-#define SNDRV_PCM_INFO_OVERRANGE \
- 0x00020000 /* hardware supports ADC (capture) overrange detection */
-#define SNDRV_PCM_INFO_RESUME \
- 0x00040000 /* hardware supports stream resume after suspend */
-#define SNDRV_PCM_INFO_PAUSE 0x00080000 /* pause ioctl is supported */
-#define SNDRV_PCM_INFO_HALF_DUPLEX 0x00100000 /* only half duplex */
-#define SNDRV_PCM_INFO_JOINT_DUPLEX \
- 0x00200000 /* playback and capture stream are somewhat correlated */
-#define SNDRV_PCM_INFO_SYNC_START \
- 0x00400000 /* pcm support some kind of sync go */
-#define SNDRV_PCM_INFO_NO_PERIOD_WAKEUP \
- 0x00800000 /* period wakeup can be disabled */
-#define SNDRV_PCM_INFO_HAS_WALL_CLOCK \
- 0x01000000 /* (Deprecated)has audio wall clock for audio/system time \
- sync */
-#define SNDRV_PCM_INFO_HAS_LINK_ATIME \
- 0x01000000 /* report hardware link audio time, reset on startup */
+#define SNDRV_PCM_INFO_MMAP 0x00000001 /* hardware supports mmap */
+#define SNDRV_PCM_INFO_MMAP_VALID 0x00000002 /* period data are valid during transfer */
+#define SNDRV_PCM_INFO_DOUBLE 0x00000004 /* Double buffering needed for PCM start/stop */
+#define SNDRV_PCM_INFO_BATCH 0x00000010 /* double buffering */
+#define SNDRV_PCM_INFO_SYNC_APPLPTR 0x00000020 /* need the explicit sync of appl_ptr update */
+#define SNDRV_PCM_INFO_PERFECT_DRAIN 0x00000040 /* silencing at the end of stream is not required */
+#define SNDRV_PCM_INFO_INTERLEAVED 0x00000100 /* channels are interleaved */
+#define SNDRV_PCM_INFO_NONINTERLEAVED 0x00000200 /* channels are not interleaved */
+#define SNDRV_PCM_INFO_COMPLEX 0x00000400 /* complex frame organization (mmap only) */
+#define SNDRV_PCM_INFO_BLOCK_TRANSFER 0x00010000 /* hardware transfer block of samples */
+#define SNDRV_PCM_INFO_OVERRANGE 0x00020000 /* hardware supports ADC (capture) overrange detection */
+#define SNDRV_PCM_INFO_RESUME 0x00040000 /* hardware supports stream resume after suspend */
+#define SNDRV_PCM_INFO_PAUSE 0x00080000 /* pause ioctl is supported */
+#define SNDRV_PCM_INFO_HALF_DUPLEX 0x00100000 /* only half duplex */
+#define SNDRV_PCM_INFO_JOINT_DUPLEX 0x00200000 /* playback and capture stream are somewhat correlated */
+#define SNDRV_PCM_INFO_SYNC_START 0x00400000 /* pcm support some kind of sync go */
+#define SNDRV_PCM_INFO_NO_PERIOD_WAKEUP 0x00800000 /* period wakeup can be disabled */
+#define SNDRV_PCM_INFO_HAS_WALL_CLOCK \
+ 0x01000000 /* (Deprecated)has audio wall clock for audio/system time \
+ sync */
+#define SNDRV_PCM_INFO_HAS_LINK_ATIME 0x01000000 /* report hardware link audio time, reset on startup */
#define SNDRV_PCM_INFO_HAS_LINK_ABSOLUTE_ATIME \
0x02000000 /* report absolute hardware link audio time, not reset on \
startup */
-#define SNDRV_PCM_INFO_HAS_LINK_ESTIMATED_ATIME \
- 0x04000000 /* report estimated link audio time */
-#define SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME \
- 0x08000000 /* report synchronized audio/system time */
-#define SNDRV_PCM_INFO_EXPLICIT_SYNC \
- 0x10000000 /* needs explicit sync of pointers and data */
-#define SNDRV_PCM_INFO_NO_REWINDS \
- 0x20000000 /* hardware can only support monotonic changes of appl_ptr \
- */
-#define SNDRV_PCM_INFO_DRAIN_TRIGGER \
- 0x40000000 /* internal kernel flag - trigger in drain */
-#define SNDRV_PCM_INFO_FIFO_IN_FRAMES \
- 0x80000000 /* internal kernel flag - FIFO size is in frames */
+#define SNDRV_PCM_INFO_HAS_LINK_ESTIMATED_ATIME 0x04000000 /* report estimated link audio time */
+#define SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME 0x08000000 /* report synchronized audio/system time */
+#define SNDRV_PCM_INFO_EXPLICIT_SYNC 0x10000000 /* needs explicit sync of pointers and data */
+#define SNDRV_PCM_INFO_NO_REWINDS \
+ 0x20000000 /* hardware can only support monotonic changes of appl_ptr \
+ */
+#define SNDRV_PCM_INFO_DRAIN_TRIGGER 0x40000000 /* internal kernel flag - trigger in drain */
+#define SNDRV_PCM_INFO_FIFO_IN_FRAMES 0x80000000 /* internal kernel flag - FIFO size is in frames */
#if (__BITS_PER_LONG == 32 && defined(__USE_TIME_BITS64)) || defined __KERNEL__
#define __SND_STRUCT_TIME64
#endif
typedef int __bitwise snd_pcm_state_t;
-#define SNDRV_PCM_STATE_OPEN ((snd_pcm_state_t)0) /* stream is open */
-#define SNDRV_PCM_STATE_SETUP ((snd_pcm_state_t)1) /* stream has a setup */
-#define SNDRV_PCM_STATE_PREPARED \
- ((snd_pcm_state_t)2) /* stream is ready to start */
-#define SNDRV_PCM_STATE_RUNNING ((snd_pcm_state_t)3) /* stream is running */
-#define SNDRV_PCM_STATE_XRUN ((snd_pcm_state_t)4) /* stream reached an xrun */
-#define SNDRV_PCM_STATE_DRAINING ((snd_pcm_state_t)5) /* stream is draining */
-#define SNDRV_PCM_STATE_PAUSED ((snd_pcm_state_t)6) /* stream is paused */
-#define SNDRV_PCM_STATE_SUSPENDED \
- ((snd_pcm_state_t)7) /* hardware is suspended */
-#define SNDRV_PCM_STATE_DISCONNECTED \
- ((snd_pcm_state_t)8) /* hardware is disconnected */
-#define SNDRV_PCM_STATE_LAST SNDRV_PCM_STATE_DISCONNECTED
+#define SNDRV_PCM_STATE_OPEN ((snd_pcm_state_t)0) /* stream is open */
+#define SNDRV_PCM_STATE_SETUP ((snd_pcm_state_t)1) /* stream has a setup */
+#define SNDRV_PCM_STATE_PREPARED ((snd_pcm_state_t)2) /* stream is ready to start */
+#define SNDRV_PCM_STATE_RUNNING ((snd_pcm_state_t)3) /* stream is running */
+#define SNDRV_PCM_STATE_XRUN ((snd_pcm_state_t)4) /* stream reached an xrun */
+#define SNDRV_PCM_STATE_DRAINING ((snd_pcm_state_t)5) /* stream is draining */
+#define SNDRV_PCM_STATE_PAUSED ((snd_pcm_state_t)6) /* stream is paused */
+#define SNDRV_PCM_STATE_SUSPENDED ((snd_pcm_state_t)7) /* hardware is suspended */
+#define SNDRV_PCM_STATE_DISCONNECTED ((snd_pcm_state_t)8) /* hardware is disconnected */
+#define SNDRV_PCM_STATE_LAST SNDRV_PCM_STATE_DISCONNECTED
enum {
SNDRV_PCM_MMAP_OFFSET_DATA = 0x00000000,
@@ -451,10 +412,9 @@ typedef int snd_pcm_hw_param_t;
#define SNDRV_PCM_HW_PARAM_FIRST_INTERVAL SNDRV_PCM_HW_PARAM_SAMPLE_BITS
#define SNDRV_PCM_HW_PARAM_LAST_INTERVAL SNDRV_PCM_HW_PARAM_TICK_TIME
-#define SNDRV_PCM_HW_PARAMS_NORESAMPLE (1 << 0) /* avoid rate resampling */
-#define SNDRV_PCM_HW_PARAMS_EXPORT_BUFFER (1 << 1) /* export buffer */
-#define SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP \
- (1 << 2) /* disable period wakeups */
+#define SNDRV_PCM_HW_PARAMS_NORESAMPLE (1 << 0) /* avoid rate resampling */
+#define SNDRV_PCM_HW_PARAMS_EXPORT_BUFFER (1 << 1) /* export buffer */
+#define SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP (1 << 2) /* disable period wakeups */
#define SNDRV_PCM_HW_PARAMS_NO_DRAIN_SILENCE \
(1 << 3) /* suppress drain with the filling \
* of the silence samples \
@@ -473,11 +433,9 @@ struct snd_mask {
struct snd_pcm_hw_params {
unsigned int flags;
- struct snd_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK -
- SNDRV_PCM_HW_PARAM_FIRST_MASK + 1];
+ struct snd_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK - SNDRV_PCM_HW_PARAM_FIRST_MASK + 1];
struct snd_mask mres[5]; /* reserved masks */
- struct snd_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL -
- SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1];
+ struct snd_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1];
struct snd_interval ires[9]; /* reserved intervals */
unsigned int rmask; /* W: requested masks */
unsigned int cmask; /* R: changed masks */
@@ -487,9 +445,9 @@ struct snd_pcm_hw_params {
unsigned int rate_num; /* R: rate numerator */
unsigned int rate_den; /* R: rate denominator */
snd_pcm_uframes_t fifo_size; /* R: chip FIFO size in frames */
- unsigned char sync[16]; /* R: synchronization ID (perfect sync - one
- clock source) */
- unsigned char reserved[48]; /* reserved for future */
+ unsigned char sync[16]; /* R: synchronization ID (perfect sync - one
+ clock source) */
+ unsigned char reserved[48]; /* reserved for future */
};
enum {
@@ -515,13 +473,13 @@ struct snd_pcm_sw_params {
snd_pcm_uframes_t stop_threshold; /* - stop playback */
snd_pcm_uframes_t silence_threshold; /* - pre-fill buffer with silence
*/
- snd_pcm_uframes_t silence_size; /* max size of silence pre-fill; when >=
- * boundary, fill played area with
- * silence immediately */
- snd_pcm_uframes_t boundary; /* pointers wrap point */
- unsigned int proto; /* protocol version */
- unsigned int tstamp_type; /* timestamp type (req. proto >= 2.0.12) */
- unsigned char reserved[56]; /* reserved for future */
+ snd_pcm_uframes_t silence_size; /* max size of silence pre-fill; when >=
+ * boundary, fill played area with
+ * silence immediately */
+ snd_pcm_uframes_t boundary; /* pointers wrap point */
+ unsigned int proto; /* protocol version */
+ unsigned int tstamp_type; /* timestamp type (req. proto >= 2.0.12) */
+ unsigned char reserved[56]; /* reserved for future */
};
struct snd_pcm_channel_info {
@@ -540,22 +498,21 @@ enum {
SNDRV_PCM_AUDIO_TSTAMP_TYPE_COMPAT = 0,
/* timestamp definitions */
- SNDRV_PCM_AUDIO_TSTAMP_TYPE_DEFAULT = 1, /* DMA time, reported as per
- hw_ptr */
- SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK = 2, /* link time reported by sample or
- wallclock counter, reset on
- startup */
- SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ABSOLUTE = 3, /* link time reported by
- sample or wallclock
- counter, not reset on
- startup */
- SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ESTIMATED = 4, /* link time estimated
- indirectly */
+ SNDRV_PCM_AUDIO_TSTAMP_TYPE_DEFAULT = 1, /* DMA time, reported as per
+ hw_ptr */
+ SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK = 2, /* link time reported by sample or
+ wallclock counter, reset on
+ startup */
+ SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ABSOLUTE = 3, /* link time reported by
+ sample or wallclock
+ counter, not reset on
+ startup */
+ SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ESTIMATED = 4, /* link time estimated
+ indirectly */
SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED = 5, /* link time
synchronized with
system time */
- SNDRV_PCM_AUDIO_TSTAMP_TYPE_LAST =
- SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED
+ SNDRV_PCM_AUDIO_TSTAMP_TYPE_LAST = SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED
};
/* explicit padding avoids incompatibility between i386 and x86-64 */
@@ -564,28 +521,28 @@ typedef struct {
} __time_pad;
struct snd_pcm_status {
- snd_pcm_state_t state; /* stream state */
- __time_pad pad1; /* align to timespec */
- struct timespec trigger_tstamp; /* time when stream was
- started/stopped/paused */
- struct timespec tstamp; /* reference timestamp */
- snd_pcm_uframes_t appl_ptr; /* appl ptr */
- snd_pcm_uframes_t hw_ptr; /* hw ptr */
- snd_pcm_sframes_t delay; /* current delay in frames */
- snd_pcm_uframes_t avail; /* number of frames available */
- snd_pcm_uframes_t avail_max; /* max frames available on hw since last
- status */
- snd_pcm_uframes_t overrange; /* count of ADC (capture) overrange
- detections from last status */
- snd_pcm_state_t suspended_state; /* suspended stream state */
- __u32 audio_tstamp_data; /* needed for 64-bit alignment, used for
- configs/report to/from userspace */
- struct timespec audio_tstamp; /* sample counter, wall clock, PHC or
- on-demand sync'ed */
- struct timespec driver_tstamp; /* useful in case reference system tstamp
- is reported with delay */
- __u32 audio_tstamp_accuracy; /* in ns units, only valid if indicated in
- audio_tstamp_data */
+ snd_pcm_state_t state; /* stream state */
+ __time_pad pad1; /* align to timespec */
+ struct timespec trigger_tstamp; /* time when stream was
+ started/stopped/paused */
+ struct timespec tstamp; /* reference timestamp */
+ snd_pcm_uframes_t appl_ptr; /* appl ptr */
+ snd_pcm_uframes_t hw_ptr; /* hw ptr */
+ snd_pcm_sframes_t delay; /* current delay in frames */
+ snd_pcm_uframes_t avail; /* number of frames available */
+ snd_pcm_uframes_t avail_max; /* max frames available on hw since last
+ status */
+ snd_pcm_uframes_t overrange; /* count of ADC (capture) overrange
+ detections from last status */
+ snd_pcm_state_t suspended_state; /* suspended stream state */
+ __u32 audio_tstamp_data; /* needed for 64-bit alignment, used for
+ configs/report to/from userspace */
+ struct timespec audio_tstamp; /* sample counter, wall clock, PHC or
+ on-demand sync'ed */
+ struct timespec driver_tstamp; /* useful in case reference system tstamp
+ is reported with delay */
+ __u32 audio_tstamp_accuracy; /* in ns units, only valid if indicated in
+ audio_tstamp_data */
unsigned char reserved[52 - 2 * sizeof(struct timespec)]; /* must be
filled with
zero */
@@ -618,11 +575,11 @@ struct __snd_timespec64 {
#endif
struct __snd_pcm_mmap_status {
- snd_pcm_state_t state; /* RO: state - SNDRV_PCM_STATE_XXXX */
- int pad1; /* Needed for 64 bit alignment */
- snd_pcm_uframes_t hw_ptr; /* RO: hw ptr (0...boundary-1) */
- struct __snd_timespec tstamp; /* Timestamp */
- snd_pcm_state_t suspended_state; /* RO: suspended stream state */
+ snd_pcm_state_t state; /* RO: state - SNDRV_PCM_STATE_XXXX */
+ int pad1; /* Needed for 64 bit alignment */
+ snd_pcm_uframes_t hw_ptr; /* RO: hw ptr (0...boundary-1) */
+ struct __snd_timespec tstamp; /* Timestamp */
+ snd_pcm_state_t suspended_state; /* RO: suspended stream state */
struct __snd_timespec audio_tstamp; /* from sample counter or wall clock
*/
};
@@ -633,9 +590,9 @@ struct __snd_pcm_mmap_control {
};
#define SNDRV_PCM_SYNC_PTR_HWSYNC (1 << 0) /* execute hwsync */
-#define SNDRV_PCM_SYNC_PTR_APPL \
- (1 << 1) /* get appl_ptr from driver (r/w op) \
- */
+#define SNDRV_PCM_SYNC_PTR_APPL \
+ (1 << 1) /* get appl_ptr from driver (r/w op) \
+ */
#define SNDRV_PCM_SYNC_PTR_AVAIL_MIN (1 << 2) /* get avail_min from driver */
struct __snd_pcm_sync_ptr {
@@ -655,8 +612,7 @@ typedef char __pad_before_uframe[sizeof(__u64) - sizeof(snd_pcm_uframes_t)];
typedef char __pad_after_uframe[0];
#endif
-#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : \
- defined(__LITTLE_ENDIAN)
+#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN)
typedef char __pad_before_uframe[0];
typedef char __pad_after_uframe[sizeof(__u64) - sizeof(snd_pcm_uframes_t)];
#endif
@@ -712,8 +668,8 @@ struct snd_xfern {
enum {
SNDRV_PCM_TSTAMP_TYPE_GETTIMEOFDAY = 0, /* gettimeofday equivalent */
- SNDRV_PCM_TSTAMP_TYPE_MONOTONIC, /* posix_clock_monotonic equivalent */
- SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW, /* monotonic_raw (no NTP) */
+ SNDRV_PCM_TSTAMP_TYPE_MONOTONIC, /* posix_clock_monotonic equivalent */
+ SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW, /* monotonic_raw (no NTP) */
SNDRV_PCM_TSTAMP_TYPE_LAST = SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW,
};
@@ -779,12 +735,10 @@ enum {
#define SNDRV_PCM_IOCTL_DELAY _IOR('A', 0x21, snd_pcm_sframes_t)
#define SNDRV_PCM_IOCTL_HWSYNC _IO('A', 0x22)
#define __SNDRV_PCM_IOCTL_SYNC_PTR _IOWR('A', 0x23, struct __snd_pcm_sync_ptr)
-#define __SNDRV_PCM_IOCTL_SYNC_PTR64 \
- _IOWR('A', 0x23, struct __snd_pcm_sync_ptr64)
-#define SNDRV_PCM_IOCTL_SYNC_PTR _IOWR('A', 0x23, struct snd_pcm_sync_ptr)
-#define SNDRV_PCM_IOCTL_STATUS_EXT _IOWR('A', 0x24, struct snd_pcm_status)
-#define SNDRV_PCM_IOCTL_CHANNEL_INFO \
- _IOR('A', 0x32, struct snd_pcm_channel_info)
+#define __SNDRV_PCM_IOCTL_SYNC_PTR64 _IOWR('A', 0x23, struct __snd_pcm_sync_ptr64)
+#define SNDRV_PCM_IOCTL_SYNC_PTR _IOWR('A', 0x23, struct snd_pcm_sync_ptr)
+#define SNDRV_PCM_IOCTL_STATUS_EXT _IOWR('A', 0x24, struct snd_pcm_status)
+#define SNDRV_PCM_IOCTL_CHANNEL_INFO _IOR('A', 0x32, struct snd_pcm_channel_info)
#define SNDRV_PCM_IOCTL_PREPARE _IO('A', 0x40)
#define SNDRV_PCM_IOCTL_RESET _IO('A', 0x41)
#define SNDRV_PCM_IOCTL_START _IO('A', 0x42)
@@ -874,16 +828,16 @@ struct snd_rawmidi_params {
size_t avail_min; /* minimum avail bytes for wakeup */
unsigned int no_active_sensing : 1; /* do not send active sensing byte
in close() */
- unsigned int mode; /* For input data only, frame incoming data */
- unsigned char reserved[12]; /* reserved for future use */
+ unsigned int mode; /* For input data only, frame incoming data */
+ unsigned char reserved[12]; /* reserved for future use */
};
struct snd_rawmidi_status {
int stream;
__time_pad pad1;
- struct timespec tstamp; /* Timestamp */
- size_t avail; /* available bytes */
- size_t xruns; /* count of overruns since last status (in bytes) */
+ struct timespec tstamp; /* Timestamp */
+ size_t avail; /* available bytes */
+ size_t xruns; /* count of overruns since last status (in bytes) */
unsigned char reserved[16]; /* reserved for future use */
};
@@ -961,9 +915,8 @@ struct snd_ump_block_info {
#define SNDRV_RAWMIDI_IOCTL_DROP _IOW('W', 0x30, int)
#define SNDRV_RAWMIDI_IOCTL_DRAIN _IOW('W', 0x31, int)
/* Additional ioctls for UMP rawmidi devices */
-#define SNDRV_UMP_IOCTL_ENDPOINT_INFO \
- _IOR('W', 0x40, struct snd_ump_endpoint_info)
-#define SNDRV_UMP_IOCTL_BLOCK_INFO _IOR('W', 0x41, struct snd_ump_block_info)
+#define SNDRV_UMP_IOCTL_ENDPOINT_INFO _IOR('W', 0x40, struct snd_ump_endpoint_info)
+#define SNDRV_UMP_IOCTL_BLOCK_INFO _IOR('W', 0x41, struct snd_ump_block_info)
/*
* Timer section - /dev/snd/timer
@@ -1055,18 +1008,16 @@ struct snd_timer_info {
unsigned char reserved[64]; /* reserved */
};
-#define SNDRV_TIMER_PSFLG_AUTO (1 << 0) /* auto start, otherwise one-shot */
-#define SNDRV_TIMER_PSFLG_EXCLUSIVE \
- (1 << 1) /* exclusive use, precise start/stop/pause/continue */
-#define SNDRV_TIMER_PSFLG_EARLY_EVENT \
- (1 << 2) /* write early event to the poll queue */
+#define SNDRV_TIMER_PSFLG_AUTO (1 << 0) /* auto start, otherwise one-shot */
+#define SNDRV_TIMER_PSFLG_EXCLUSIVE (1 << 1) /* exclusive use, precise start/stop/pause/continue */
+#define SNDRV_TIMER_PSFLG_EARLY_EVENT (1 << 2) /* write early event to the poll queue */
struct snd_timer_params {
- unsigned int flags; /* flags - SNDRV_TIMER_PSFLG_* */
- unsigned int ticks; /* requested resolution in ticks */
- unsigned int queue_size; /* total size of queue (32-1024) */
- unsigned int reserved0; /* reserved, was: failure locations */
- unsigned int filter; /* event filter (bitmask of SNDRV_TIMER_EVENT_*) */
+ unsigned int flags; /* flags - SNDRV_TIMER_PSFLG_* */
+ unsigned int ticks; /* requested resolution in ticks */
+ unsigned int queue_size; /* total size of queue (32-1024) */
+ unsigned int reserved0; /* reserved, was: failure locations */
+ unsigned int filter; /* event filter (bitmask of SNDRV_TIMER_EVENT_*) */
unsigned char reserved[60]; /* reserved */
};
@@ -1115,10 +1066,8 @@ struct snd_timer_uinfo {
#if __BITS_PER_LONG == 64
#define SNDRV_TIMER_IOCTL_TREAD SNDRV_TIMER_IOCTL_TREAD_OLD
#else
-#define SNDRV_TIMER_IOCTL_TREAD \
- ((sizeof(__kernel_long_t) >= sizeof(time_t)) ? \
- SNDRV_TIMER_IOCTL_TREAD_OLD : \
- SNDRV_TIMER_IOCTL_TREAD64)
+#define SNDRV_TIMER_IOCTL_TREAD \
+ ((sizeof(__kernel_long_t) >= sizeof(time_t)) ? SNDRV_TIMER_IOCTL_TREAD_OLD : SNDRV_TIMER_IOCTL_TREAD64)
#endif
struct snd_timer_read {
@@ -1162,14 +1111,14 @@ struct snd_timer_tread {
#define SNDRV_CTL_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 9)
struct snd_ctl_card_info {
- int card; /* card number */
- int pad; /* reserved for future (was type) */
- unsigned char id[16]; /* ID of card (user selectable) */
- unsigned char driver[16]; /* Driver name */
- unsigned char name[32]; /* Short name of soundcard */
- unsigned char longname[80]; /* name + info text about soundcard */
- unsigned char reserved_[16]; /* reserved for future (was ID of mixer) */
- unsigned char mixername[80]; /* visual mixer identification */
+ int card; /* card number */
+ int pad; /* reserved for future (was type) */
+ unsigned char id[16]; /* ID of card (user selectable) */
+ unsigned char driver[16]; /* Driver name */
+ unsigned char name[32]; /* Short name of soundcard */
+ unsigned char longname[80]; /* name + info text about soundcard */
+ unsigned char reserved_[16]; /* reserved for future (was ID of mixer) */
+ unsigned char mixername[80]; /* visual mixer identification */
unsigned char components[128]; /* card components / fine identification,
delimited with one space (AC97 etc..)
*/
@@ -1180,76 +1129,62 @@ typedef int __bitwise snd_ctl_elem_type_t;
#define SNDRV_CTL_ELEM_TYPE_BOOLEAN \
((snd_ctl_elem_type_t)1) /* boolean type \
*/
-#define SNDRV_CTL_ELEM_TYPE_INTEGER \
- ((snd_ctl_elem_type_t)2) /* integer type \
- */
-#define SNDRV_CTL_ELEM_TYPE_ENUMERATED \
- ((snd_ctl_elem_type_t)3) /* enumerated type */
-#define SNDRV_CTL_ELEM_TYPE_BYTES ((snd_ctl_elem_type_t)4) /* byte array */
-#define SNDRV_CTL_ELEM_TYPE_IEC958 \
- ((snd_ctl_elem_type_t)5) /* IEC958 (S/PDIF) setup */
-#define SNDRV_CTL_ELEM_TYPE_INTEGER64 \
- ((snd_ctl_elem_type_t)6) /* 64-bit integer type */
-#define SNDRV_CTL_ELEM_TYPE_LAST SNDRV_CTL_ELEM_TYPE_INTEGER64
+#define SNDRV_CTL_ELEM_TYPE_INTEGER \
+ ((snd_ctl_elem_type_t)2) /* integer type \
+ */
+#define SNDRV_CTL_ELEM_TYPE_ENUMERATED ((snd_ctl_elem_type_t)3) /* enumerated type */
+#define SNDRV_CTL_ELEM_TYPE_BYTES ((snd_ctl_elem_type_t)4) /* byte array */
+#define SNDRV_CTL_ELEM_TYPE_IEC958 ((snd_ctl_elem_type_t)5) /* IEC958 (S/PDIF) setup */
+#define SNDRV_CTL_ELEM_TYPE_INTEGER64 ((snd_ctl_elem_type_t)6) /* 64-bit integer type */
+#define SNDRV_CTL_ELEM_TYPE_LAST SNDRV_CTL_ELEM_TYPE_INTEGER64
typedef int __bitwise snd_ctl_elem_iface_t;
-#define SNDRV_CTL_ELEM_IFACE_CARD \
- ((snd_ctl_elem_iface_t)0) /* global control \
- */
-#define SNDRV_CTL_ELEM_IFACE_HWDEP \
- ((snd_ctl_elem_iface_t)1) /* hardware dependent device */
-#define SNDRV_CTL_ELEM_IFACE_MIXER \
- ((snd_ctl_elem_iface_t)2) /* virtual mixer device */
-#define SNDRV_CTL_ELEM_IFACE_PCM ((snd_ctl_elem_iface_t)3) /* PCM device */
-#define SNDRV_CTL_ELEM_IFACE_RAWMIDI \
- ((snd_ctl_elem_iface_t)4) /* RawMidi device */
-#define SNDRV_CTL_ELEM_IFACE_TIMER \
- ((snd_ctl_elem_iface_t)5) /* timer device \
- */
-#define SNDRV_CTL_ELEM_IFACE_SEQUENCER \
- ((snd_ctl_elem_iface_t)6) /* sequencer client */
-#define SNDRV_CTL_ELEM_IFACE_LAST SNDRV_CTL_ELEM_IFACE_SEQUENCER
-
-#define SNDRV_CTL_ELEM_ACCESS_READ (1 << 0)
-#define SNDRV_CTL_ELEM_ACCESS_WRITE (1 << 1)
-#define SNDRV_CTL_ELEM_ACCESS_READWRITE \
- (SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_WRITE)
-#define SNDRV_CTL_ELEM_ACCESS_VOLATILE \
- (1 << 2) /* control value may be changed without a notification */
+#define SNDRV_CTL_ELEM_IFACE_CARD \
+ ((snd_ctl_elem_iface_t)0) /* global control \
+ */
+#define SNDRV_CTL_ELEM_IFACE_HWDEP ((snd_ctl_elem_iface_t)1) /* hardware dependent device */
+#define SNDRV_CTL_ELEM_IFACE_MIXER ((snd_ctl_elem_iface_t)2) /* virtual mixer device */
+#define SNDRV_CTL_ELEM_IFACE_PCM ((snd_ctl_elem_iface_t)3) /* PCM device */
+#define SNDRV_CTL_ELEM_IFACE_RAWMIDI ((snd_ctl_elem_iface_t)4) /* RawMidi device */
+#define SNDRV_CTL_ELEM_IFACE_TIMER \
+ ((snd_ctl_elem_iface_t)5) /* timer device \
+ */
+#define SNDRV_CTL_ELEM_IFACE_SEQUENCER ((snd_ctl_elem_iface_t)6) /* sequencer client */
+#define SNDRV_CTL_ELEM_IFACE_LAST SNDRV_CTL_ELEM_IFACE_SEQUENCER
+
+#define SNDRV_CTL_ELEM_ACCESS_READ (1 << 0)
+#define SNDRV_CTL_ELEM_ACCESS_WRITE (1 << 1)
+#define SNDRV_CTL_ELEM_ACCESS_READWRITE (SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_WRITE)
+#define SNDRV_CTL_ELEM_ACCESS_VOLATILE (1 << 2) /* control value may be changed without a notification */
/* (1 << 3) is unused. */
-#define SNDRV_CTL_ELEM_ACCESS_TLV_READ (1 << 4) /* TLV read is possible */
-#define SNDRV_CTL_ELEM_ACCESS_TLV_WRITE (1 << 5) /* TLV write is possible */
-#define SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE \
- (SNDRV_CTL_ELEM_ACCESS_TLV_READ | SNDRV_CTL_ELEM_ACCESS_TLV_WRITE)
-#define SNDRV_CTL_ELEM_ACCESS_TLV_COMMAND \
- (1 << 6) /* TLV command is possible \
- */
-#define SNDRV_CTL_ELEM_ACCESS_INACTIVE \
- (1 << 8) /* control does actually nothing, but may be updated */
-#define SNDRV_CTL_ELEM_ACCESS_LOCK (1 << 9) /* write lock */
-#define SNDRV_CTL_ELEM_ACCESS_OWNER (1 << 10) /* write lock owner */
-#define SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK \
- (1 << 28) /* kernel use a TLV callback */
-#define SNDRV_CTL_ELEM_ACCESS_USER (1 << 29) /* user space element */
+#define SNDRV_CTL_ELEM_ACCESS_TLV_READ (1 << 4) /* TLV read is possible */
+#define SNDRV_CTL_ELEM_ACCESS_TLV_WRITE (1 << 5) /* TLV write is possible */
+#define SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE (SNDRV_CTL_ELEM_ACCESS_TLV_READ | SNDRV_CTL_ELEM_ACCESS_TLV_WRITE)
+#define SNDRV_CTL_ELEM_ACCESS_TLV_COMMAND \
+ (1 << 6) /* TLV command is possible \
+ */
+#define SNDRV_CTL_ELEM_ACCESS_INACTIVE (1 << 8) /* control does actually nothing, but may be updated */
+#define SNDRV_CTL_ELEM_ACCESS_LOCK (1 << 9) /* write lock */
+#define SNDRV_CTL_ELEM_ACCESS_OWNER (1 << 10) /* write lock owner */
+#define SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK (1 << 28) /* kernel use a TLV callback */
+#define SNDRV_CTL_ELEM_ACCESS_USER (1 << 29) /* user space element */
/* bits 30 and 31 are obsoleted (for indirect access) */
/* for further details see the ACPI and PCI power management specification */
-#define SNDRV_CTL_POWER_D0 0x0000 /* full On */
-#define SNDRV_CTL_POWER_D1 0x0100 /* partial On */
-#define SNDRV_CTL_POWER_D2 0x0200 /* partial On */
-#define SNDRV_CTL_POWER_D3 0x0300 /* Off */
-#define SNDRV_CTL_POWER_D3hot \
- (SNDRV_CTL_POWER_D3 | 0x0000) /* Off, with power */
-#define SNDRV_CTL_POWER_D3cold \
- (SNDRV_CTL_POWER_D3 | 0x0001) /* Off, without power */
+#define SNDRV_CTL_POWER_D0 0x0000 /* full On */
+#define SNDRV_CTL_POWER_D1 0x0100 /* partial On */
+#define SNDRV_CTL_POWER_D2 0x0200 /* partial On */
+#define SNDRV_CTL_POWER_D3 0x0300 /* Off */
+#define SNDRV_CTL_POWER_D3hot (SNDRV_CTL_POWER_D3 | 0x0000) /* Off, with power */
+#define SNDRV_CTL_POWER_D3cold (SNDRV_CTL_POWER_D3 | 0x0001) /* Off, without power */
#define SNDRV_CTL_ELEM_ID_NAME_MAXLEN 44
struct snd_ctl_elem_id {
- unsigned int numid; /* numeric identifier, zero = invalid */
- snd_ctl_elem_iface_t iface; /* interface identifier */
- unsigned int device; /* device/client number */
- unsigned int subdevice; /* subdevice (substream) number */
+ unsigned int numid; /* numeric identifier, zero = invalid */
+ snd_ctl_elem_iface_t iface; /* interface identifier */
+ unsigned int device; /* device/client number */
+ unsigned int subdevice; /* subdevice (substream) number */
unsigned char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* ASCII name of item
*/
unsigned int index; /* index of item */
@@ -1349,12 +1284,10 @@ struct snd_ctl_tlv {
#define SNDRV_CTL_IOCTL_RAWMIDI_INFO _IOWR('U', 0x41, struct snd_rawmidi_info)
#define SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE _IOW('U', 0x42, int)
#define SNDRV_CTL_IOCTL_UMP_NEXT_DEVICE _IOWR('U', 0x43, int)
-#define SNDRV_CTL_IOCTL_UMP_ENDPOINT_INFO \
- _IOWR('U', 0x44, struct snd_ump_endpoint_info)
-#define SNDRV_CTL_IOCTL_UMP_BLOCK_INFO \
- _IOWR('U', 0x45, struct snd_ump_block_info)
-#define SNDRV_CTL_IOCTL_POWER _IOWR('U', 0xd0, int)
-#define SNDRV_CTL_IOCTL_POWER_STATE _IOR('U', 0xd1, int)
+#define SNDRV_CTL_IOCTL_UMP_ENDPOINT_INFO _IOWR('U', 0x44, struct snd_ump_endpoint_info)
+#define SNDRV_CTL_IOCTL_UMP_BLOCK_INFO _IOWR('U', 0x45, struct snd_ump_block_info)
+#define SNDRV_CTL_IOCTL_POWER _IOWR('U', 0xd0, int)
+#define SNDRV_CTL_IOCTL_POWER_STATE _IOR('U', 0xd1, int)
/*
* Read interface.
diff --git a/include/arch/x86_64/sound/compress_offload.h b/include/arch/x86_64/sound/compress_offload.h
index 7f7c6747..9e385aca 100644
--- a/include/arch/x86_64/sound/compress_offload.h
+++ b/include/arch/x86_64/sound/compress_offload.h
@@ -65,11 +65,7 @@ struct snd_compr_avail {
struct snd_compr_tstamp tstamp;
} __attribute__((packed, aligned(4)));
-enum snd_compr_direction {
- SND_COMPRESS_PLAYBACK = 0,
- SND_COMPRESS_CAPTURE,
- SND_COMPRESS_ACCEL
-};
+enum snd_compr_direction { SND_COMPRESS_PLAYBACK = 0, SND_COMPRESS_CAPTURE, SND_COMPRESS_ACCEL };
/**
* struct snd_compr_caps - caps descriptor
@@ -201,30 +197,28 @@ struct snd_compr_task_status {
* SNDRV_COMPRESS_DRAIN: Play till end of buffers and stop after that
* SNDRV_COMPRESS_IOCTL_VERSION: Query the API version
*/
-#define SNDRV_COMPRESS_IOCTL_VERSION _IOR('C', 0x00, int)
-#define SNDRV_COMPRESS_GET_CAPS _IOWR('C', 0x10, struct snd_compr_caps)
-#define SNDRV_COMPRESS_GET_CODEC_CAPS \
- _IOWR('C', 0x11, struct snd_compr_codec_caps)
-#define SNDRV_COMPRESS_SET_PARAMS _IOW('C', 0x12, struct snd_compr_params)
-#define SNDRV_COMPRESS_GET_PARAMS _IOR('C', 0x13, struct snd_codec)
-#define SNDRV_COMPRESS_SET_METADATA _IOW('C', 0x14, struct snd_compr_metadata)
-#define SNDRV_COMPRESS_GET_METADATA _IOWR('C', 0x15, struct snd_compr_metadata)
-#define SNDRV_COMPRESS_TSTAMP _IOR('C', 0x20, struct snd_compr_tstamp)
-#define SNDRV_COMPRESS_AVAIL _IOR('C', 0x21, struct snd_compr_avail)
-#define SNDRV_COMPRESS_PAUSE _IO('C', 0x30)
-#define SNDRV_COMPRESS_RESUME _IO('C', 0x31)
-#define SNDRV_COMPRESS_START _IO('C', 0x32)
-#define SNDRV_COMPRESS_STOP _IO('C', 0x33)
-#define SNDRV_COMPRESS_DRAIN _IO('C', 0x34)
-#define SNDRV_COMPRESS_NEXT_TRACK _IO('C', 0x35)
-#define SNDRV_COMPRESS_PARTIAL_DRAIN _IO('C', 0x36)
+#define SNDRV_COMPRESS_IOCTL_VERSION _IOR('C', 0x00, int)
+#define SNDRV_COMPRESS_GET_CAPS _IOWR('C', 0x10, struct snd_compr_caps)
+#define SNDRV_COMPRESS_GET_CODEC_CAPS _IOWR('C', 0x11, struct snd_compr_codec_caps)
+#define SNDRV_COMPRESS_SET_PARAMS _IOW('C', 0x12, struct snd_compr_params)
+#define SNDRV_COMPRESS_GET_PARAMS _IOR('C', 0x13, struct snd_codec)
+#define SNDRV_COMPRESS_SET_METADATA _IOW('C', 0x14, struct snd_compr_metadata)
+#define SNDRV_COMPRESS_GET_METADATA _IOWR('C', 0x15, struct snd_compr_metadata)
+#define SNDRV_COMPRESS_TSTAMP _IOR('C', 0x20, struct snd_compr_tstamp)
+#define SNDRV_COMPRESS_AVAIL _IOR('C', 0x21, struct snd_compr_avail)
+#define SNDRV_COMPRESS_PAUSE _IO('C', 0x30)
+#define SNDRV_COMPRESS_RESUME _IO('C', 0x31)
+#define SNDRV_COMPRESS_START _IO('C', 0x32)
+#define SNDRV_COMPRESS_STOP _IO('C', 0x33)
+#define SNDRV_COMPRESS_DRAIN _IO('C', 0x34)
+#define SNDRV_COMPRESS_NEXT_TRACK _IO('C', 0x35)
+#define SNDRV_COMPRESS_PARTIAL_DRAIN _IO('C', 0x36)
#define SNDRV_COMPRESS_TASK_CREATE _IOWR('C', 0x60, struct snd_compr_task)
#define SNDRV_COMPRESS_TASK_FREE _IOW('C', 0x61, __u64)
#define SNDRV_COMPRESS_TASK_START _IOWR('C', 0x62, struct snd_compr_task)
#define SNDRV_COMPRESS_TASK_STOP _IOW('C', 0x63, __u64)
-#define SNDRV_COMPRESS_TASK_STATUS \
- _IOWR('C', 0x68, struct snd_compr_task_status)
+#define SNDRV_COMPRESS_TASK_STATUS _IOWR('C', 0x68, struct snd_compr_task_status)
/*
* TODO
diff --git a/include/arch/x86_64/sound/emu10k1.h b/include/arch/x86_64/sound/emu10k1.h
index 99b2a976..22e6d5ac 100644
--- a/include/arch/x86_64/sound/emu10k1.h
+++ b/include/arch/x86_64/sound/emu10k1.h
@@ -22,8 +22,7 @@
* this header file in userspace since they are not generally available for
* uapi headers.
*/
-#define __EMU10K1_DECLARE_BITMAP(name, bits) \
- unsigned long name[(bits) / (sizeof(unsigned long) * 8)]
+#define __EMU10K1_DECLARE_BITMAP(name, bits) unsigned long name[(bits) / (sizeof(unsigned long) * 8)]
/* instruction set */
#define iMAC0 0x00 /* R = A + (X * Y >> 31) ; saturation */
@@ -38,23 +37,16 @@
#define iTSTNEG 0x09 /* R = (A >= Y) ? X : ~X */
#define iLIMITGE 0x0a /* R = (A >= Y) ? X : Y */
#define iLIMITLT 0x0b /* R = (A < Y) ? X : Y */
-#define iLOG \
- 0x0c /* R = linear_data, A (log_data), X (max_exp), Y (format_word) */
-#define iEXP \
- 0x0d /* R = log_data, A (linear_data), X (max_exp), Y (format_word) */
-#define iINTERP 0x0e /* R = A + (X * (Y - A) >> 31) ; saturation */
-#define iSKIP 0x0f /* R = A (cc_reg), X (count), Y (cc_test) */
-
-#define LOWORD_OPX_MASK \
- 0x000ffc00 /* Instruction operand X */
-#define LOWORD_OPY_MASK \
- 0x000003ff /* Instruction operand Y */
-#define HIWORD_OPCODE_MASK \
- 0x00f00000 /* Instruction opcode */
-#define HIWORD_RESULT_MASK \
- 0x000ffc00 /* Instruction result */
-#define HIWORD_OPA_MASK \
- 0x000003ff /* Instruction operand A */
+#define iLOG 0x0c /* R = linear_data, A (log_data), X (max_exp), Y (format_word) */
+#define iEXP 0x0d /* R = log_data, A (linear_data), X (max_exp), Y (format_word) */
+#define iINTERP 0x0e /* R = A + (X * (Y - A) >> 31) ; saturation */
+#define iSKIP 0x0f /* R = A (cc_reg), X (count), Y (cc_test) */
+
+#define LOWORD_OPX_MASK 0x000ffc00 /* Instruction operand X */
+#define LOWORD_OPY_MASK 0x000003ff /* Instruction operand Y */
+#define HIWORD_OPCODE_MASK 0x00f00000 /* Instruction opcode */
+#define HIWORD_RESULT_MASK 0x000ffc00 /* Instruction result */
+#define HIWORD_OPA_MASK 0x000003ff /* Instruction operand A */
/* Audigy Soundcards have a different instruction format */
#define A_LOWORD_OPX_MASK 0x007ff000
@@ -64,25 +56,23 @@
#define A_HIWORD_OPA_MASK 0x000007ff
/* GPRs */
-#define FXBUS(x) (0x00 + (x)) /* x = 0x00 - 0x0f */
-#define EXTIN(x) (0x10 + (x)) /* x = 0x00 - 0x0f */
-#define EXTOUT(x) \
- (0x20 + (x)) /* x = 0x00 - 0x0f physical outs -> FXWC low 16 bits */
+#define FXBUS(x) (0x00 + (x)) /* x = 0x00 - 0x0f */
+#define EXTIN(x) (0x10 + (x)) /* x = 0x00 - 0x0f */
+#define EXTOUT(x) (0x20 + (x)) /* x = 0x00 - 0x0f physical outs -> FXWC low 16 bits */
#define FXBUS2(x) \
(0x30 + (x)) /* x = 0x00 - 0x0f copies of fx buses for capture -> FXWC \
high 16 bits */
/* NB: 0x31 and 0x32 are shared with Center/LFE on SB live 5.1 */
-#define A_FXBUS(x) (0x00 + (x)) /* x = 0x00 - 0x3f FX buses */
-#define A_EXTIN(x) (0x40 + (x)) /* x = 0x00 - 0x0f physical ins */
-#define A_P16VIN(x) \
- (0x50 + (x)) /* x = 0x00 - 0x0f p16v ins (A2 only) "EMU32 inputs" */
+#define A_FXBUS(x) (0x00 + (x)) /* x = 0x00 - 0x3f FX buses */
+#define A_EXTIN(x) (0x40 + (x)) /* x = 0x00 - 0x0f physical ins */
+#define A_P16VIN(x) (0x50 + (x)) /* x = 0x00 - 0x0f p16v ins (A2 only) "EMU32 inputs" */
#define A_EXTOUT(x) \
(0x60 + (x)) /* x = 0x00 - 0x1f physical outs -> A_FXWC1 0x79-7f \
unknown */
-#define A_FXBUS2(x) \
- (0x80 + (x)) /* x = 0x00 - 0x1f extra outs used for EFX capture -> \
- A_FXWC2 */
+#define A_FXBUS2(x) \
+ (0x80 + (x)) /* x = 0x00 - 0x1f extra outs used for EFX capture -> \
+ A_FXWC2 */
#define A_EMU32OUTH(x) (0xa0 + (x)) /* x = 0x00 - 0x0f "EMU32_OUT_10 - _1F" */
#define A_EMU32OUTL(x) (0xb0 + (x)) /* x = 0x00 - 0x0f "EMU32_OUT_01 - _0F" */
#define A3_EMU32IN(x) \
@@ -159,9 +149,8 @@
0x400 /* Audigy GPRs, 0x400 to 0x5ff \
*/
-#define A_TANKMEMCTLREGBASE \
- 0x100 /* Tank memory control registers base - only for Audigy */
-#define A_TANKMEMCTLREG_MASK 0x1f /* only 5 bits used - only for Audigy */
+#define A_TANKMEMCTLREGBASE 0x100 /* Tank memory control registers base - only for Audigy */
+#define A_TANKMEMCTLREG_MASK 0x1f /* only 5 bits used - only for Audigy */
/* Tank audio data is logarithmically compressed down to 16 bits before writing
* to TRAM and is */
@@ -169,27 +158,19 @@
* the last 32 */
/* locations are for external TRAM.
*/
-#define TANKMEMDATAREGBASE \
- 0x200 /* Tank memory data registers base */
-#define TANKMEMDATAREG_MASK \
- 0x000fffff /* 20 bit tank audio data field */
+#define TANKMEMDATAREGBASE 0x200 /* Tank memory data registers base */
+#define TANKMEMDATAREG_MASK 0x000fffff /* 20 bit tank audio data field */
/* Combined address field and memory opcode or flag field. 160 locations, last
* 32 are external */
-#define TANKMEMADDRREGBASE \
- 0x300 /* Tank memory address registers base */
-#define TANKMEMADDRREG_ADDR_MASK \
- 0x000fffff /* 20 bit tank address field */
-#define TANKMEMADDRREG_CLEAR \
- 0x00800000 /* Clear tank memory */
-#define TANKMEMADDRREG_ALIGN \
- 0x00400000 /* Align read or write relative to tank access */
-#define TANKMEMADDRREG_WRITE \
- 0x00200000 /* Write to tank memory */
-#define TANKMEMADDRREG_READ \
- 0x00100000 /* Read from tank memory */
-
-#define GPR(x) (FXGPREGBASE + (x)) /* free GPRs: x = 0x00 - 0xff */
+#define TANKMEMADDRREGBASE 0x300 /* Tank memory address registers base */
+#define TANKMEMADDRREG_ADDR_MASK 0x000fffff /* 20 bit tank address field */
+#define TANKMEMADDRREG_CLEAR 0x00800000 /* Clear tank memory */
+#define TANKMEMADDRREG_ALIGN 0x00400000 /* Align read or write relative to tank access */
+#define TANKMEMADDRREG_WRITE 0x00200000 /* Write to tank memory */
+#define TANKMEMADDRREG_READ 0x00100000 /* Read from tank memory */
+
+#define GPR(x) (FXGPREGBASE + (x)) /* free GPRs: x = 0x00 - 0xff */
#define ITRAM_DATA(x) (TANKMEMDATAREGBASE + 0x00 + (x)) /* x = 0x00 - 0x7f */
#define ETRAM_DATA(x) (TANKMEMDATAREGBASE + 0x80 + (x)) /* x = 0x00 - 0x1f */
#define ITRAM_ADDR(x) (TANKMEMADDRREGBASE + 0x00 + (x)) /* x = 0x00 - 0x7f */
@@ -380,8 +361,8 @@ struct snd_emu10k1_fx8010_control_gpr {
int value[32]; /* initial values */
int min; /* minimum range */
int max; /* maximum range */
- unsigned int translation; /* translation type (EMU10K1_GPR_TRANSLATION*)
- */
+ unsigned int translation; /* translation type (EMU10K1_GPR_TRANSLATION*)
+ */
const unsigned int *tlv;
};
@@ -404,20 +385,20 @@ struct snd_emu10k1_fx8010_code {
initializers */
__u32 *gpr_map; /* initializers */
- unsigned int gpr_add_control_count; /* count of GPR controls to
- add/replace */
+ unsigned int gpr_add_control_count; /* count of GPR controls to
+ add/replace */
struct snd_emu10k1_fx8010_control_gpr *gpr_add_controls; /* GPR controls
to
add/replace
*/
- unsigned int gpr_del_control_count; /* count of GPR controls to remove
- */
+ unsigned int gpr_del_control_count; /* count of GPR controls to remove
+ */
struct emu10k1_ctl_elem_id *gpr_del_controls; /* IDs of GPR controls to
remove */
- unsigned int gpr_list_control_count; /* count of GPR controls to list */
- unsigned int gpr_list_control_total; /* total count of GPR controls */
+ unsigned int gpr_list_control_count; /* count of GPR controls to list */
+ unsigned int gpr_list_control_total; /* total count of GPR controls */
struct snd_emu10k1_fx8010_control_gpr *gpr_list_controls; /* listed GPR
controls */
@@ -428,7 +409,7 @@ struct snd_emu10k1_fx8010_code {
__EMU10K1_DECLARE_BITMAP(code_valid, 1024); /* bitmask of valid
instructions */
- __u32 *code; /* one instruction - 64 bits */
+ __u32 *code; /* one instruction - 64 bits */
};
struct snd_emu10k1_fx8010_tram {
@@ -439,18 +420,18 @@ struct snd_emu10k1_fx8010_tram {
};
struct snd_emu10k1_fx8010_pcm_rec {
- unsigned int substream; /* substream number */
- unsigned int res1; /* reserved */
- unsigned int channels; /* 16-bit channels count, zero = remove this
- substream */
- unsigned int tram_start; /* ring buffer position in TRAM (in samples) */
- unsigned int buffer_size; /* count of buffered samples */
- unsigned short gpr_size; /* GPR containing size of ringbuffer in samples
- (host) */
- unsigned short gpr_ptr; /* GPR containing current pointer in the ring
- buffer (host = reset, FX8010) */
- unsigned short gpr_count; /* GPR containing count of samples between two
- interrupts (host) */
+ unsigned int substream; /* substream number */
+ unsigned int res1; /* reserved */
+ unsigned int channels; /* 16-bit channels count, zero = remove this
+ substream */
+ unsigned int tram_start; /* ring buffer position in TRAM (in samples) */
+ unsigned int buffer_size; /* count of buffered samples */
+ unsigned short gpr_size; /* GPR containing size of ringbuffer in samples
+ (host) */
+ unsigned short gpr_ptr; /* GPR containing current pointer in the ring
+ buffer (host = reset, FX8010) */
+ unsigned short gpr_count; /* GPR containing count of samples between two
+ interrupts (host) */
unsigned short gpr_tmpcount; /* GPR containing current count of samples
to interrupt (host = set, FX8010) */
unsigned short gpr_trigger; /* GPR containing trigger (activate)
@@ -465,20 +446,14 @@ struct snd_emu10k1_fx8010_pcm_rec {
#define SNDRV_EMU10K1_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 1)
-#define SNDRV_EMU10K1_IOCTL_INFO _IOR('H', 0x10, struct snd_emu10k1_fx8010_info)
-#define SNDRV_EMU10K1_IOCTL_CODE_POKE \
- _IOW('H', 0x11, struct snd_emu10k1_fx8010_code)
-#define SNDRV_EMU10K1_IOCTL_CODE_PEEK \
- _IOWR('H', 0x12, struct snd_emu10k1_fx8010_code)
-#define SNDRV_EMU10K1_IOCTL_TRAM_SETUP _IOW('H', 0x20, int)
-#define SNDRV_EMU10K1_IOCTL_TRAM_POKE \
- _IOW('H', 0x21, struct snd_emu10k1_fx8010_tram)
-#define SNDRV_EMU10K1_IOCTL_TRAM_PEEK \
- _IOWR('H', 0x22, struct snd_emu10k1_fx8010_tram)
-#define SNDRV_EMU10K1_IOCTL_PCM_POKE \
- _IOW('H', 0x30, struct snd_emu10k1_fx8010_pcm_rec)
-#define SNDRV_EMU10K1_IOCTL_PCM_PEEK \
- _IOWR('H', 0x31, struct snd_emu10k1_fx8010_pcm_rec)
+#define SNDRV_EMU10K1_IOCTL_INFO _IOR('H', 0x10, struct snd_emu10k1_fx8010_info)
+#define SNDRV_EMU10K1_IOCTL_CODE_POKE _IOW('H', 0x11, struct snd_emu10k1_fx8010_code)
+#define SNDRV_EMU10K1_IOCTL_CODE_PEEK _IOWR('H', 0x12, struct snd_emu10k1_fx8010_code)
+#define SNDRV_EMU10K1_IOCTL_TRAM_SETUP _IOW('H', 0x20, int)
+#define SNDRV_EMU10K1_IOCTL_TRAM_POKE _IOW('H', 0x21, struct snd_emu10k1_fx8010_tram)
+#define SNDRV_EMU10K1_IOCTL_TRAM_PEEK _IOWR('H', 0x22, struct snd_emu10k1_fx8010_tram)
+#define SNDRV_EMU10K1_IOCTL_PCM_POKE _IOW('H', 0x30, struct snd_emu10k1_fx8010_pcm_rec)
+#define SNDRV_EMU10K1_IOCTL_PCM_PEEK _IOWR('H', 0x31, struct snd_emu10k1_fx8010_pcm_rec)
#define SNDRV_EMU10K1_IOCTL_PVERSION _IOR('H', 0x40, int)
#define SNDRV_EMU10K1_IOCTL_STOP _IO('H', 0x80)
#define SNDRV_EMU10K1_IOCTL_CONTINUE _IO('H', 0x81)
diff --git a/include/arch/x86_64/sound/fcp.h b/include/arch/x86_64/sound/fcp.h
index 4efd72ba..135ff412 100644
--- a/include/arch/x86_64/sound/fcp.h
+++ b/include/arch/x86_64/sound/fcp.h
@@ -62,8 +62,7 @@
#define FCP_HWDEP_MINOR 0
#define FCP_HWDEP_SUBMINOR 0
-#define FCP_HWDEP_VERSION \
- ((FCP_HWDEP_MAJOR << 16) | (FCP_HWDEP_MINOR << 8) | FCP_HWDEP_SUBMINOR)
+#define FCP_HWDEP_VERSION ((FCP_HWDEP_MAJOR << 16) | (FCP_HWDEP_MINOR << 8) | FCP_HWDEP_SUBMINOR)
#define FCP_HWDEP_VERSION_MAJOR(v) (((v) >> 16) & 0xFF)
#define FCP_HWDEP_VERSION_MINOR(v) (((v) >> 8) & 0xFF)
diff --git a/include/arch/x86_64/sound/firewire.h b/include/arch/x86_64/sound/firewire.h
index febaf527..37d1c70e 100644
--- a/include/arch/x86_64/sound/firewire.h
+++ b/include/arch/x86_64/sound/firewire.h
@@ -106,21 +106,16 @@ union snd_firewire_event {
struct snd_firewire_event_digi00x_message digi00x_message;
struct snd_firewire_event_tascam_control tascam_control;
struct snd_firewire_event_motu_notification motu_notification;
- struct snd_firewire_event_motu_register_dsp_change
- motu_register_dsp_change;
+ struct snd_firewire_event_motu_register_dsp_change motu_register_dsp_change;
struct snd_firewire_event_ff400_message ff400_message;
};
-#define SNDRV_FIREWIRE_IOCTL_GET_INFO \
- _IOR('H', 0xf8, struct snd_firewire_get_info)
-#define SNDRV_FIREWIRE_IOCTL_LOCK _IO('H', 0xf9)
-#define SNDRV_FIREWIRE_IOCTL_UNLOCK _IO('H', 0xfa)
-#define SNDRV_FIREWIRE_IOCTL_TASCAM_STATE \
- _IOR('H', 0xfb, struct snd_firewire_tascam_state)
-#define SNDRV_FIREWIRE_IOCTL_MOTU_REGISTER_DSP_METER \
- _IOR('H', 0xfc, struct snd_firewire_motu_register_dsp_meter)
-#define SNDRV_FIREWIRE_IOCTL_MOTU_COMMAND_DSP_METER \
- _IOR('H', 0xfd, struct snd_firewire_motu_command_dsp_meter)
+#define SNDRV_FIREWIRE_IOCTL_GET_INFO _IOR('H', 0xf8, struct snd_firewire_get_info)
+#define SNDRV_FIREWIRE_IOCTL_LOCK _IO('H', 0xf9)
+#define SNDRV_FIREWIRE_IOCTL_UNLOCK _IO('H', 0xfa)
+#define SNDRV_FIREWIRE_IOCTL_TASCAM_STATE _IOR('H', 0xfb, struct snd_firewire_tascam_state)
+#define SNDRV_FIREWIRE_IOCTL_MOTU_REGISTER_DSP_METER _IOR('H', 0xfc, struct snd_firewire_motu_register_dsp_meter)
+#define SNDRV_FIREWIRE_IOCTL_MOTU_COMMAND_DSP_METER _IOR('H', 0xfd, struct snd_firewire_motu_command_dsp_meter)
#define SNDRV_FIREWIRE_IOCTL_MOTU_REGISTER_DSP_PARAMETER \
_IOR('H', 0xfe, struct snd_firewire_motu_register_dsp_parameter)
@@ -179,9 +174,8 @@ struct snd_firewire_tascam_state {
#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_INPUT_COUNT 24
#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_OUTPUT_COUNT 24
-#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_COUNT \
- (SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_INPUT_COUNT + \
- SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_OUTPUT_COUNT)
+#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_COUNT \
+ (SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_INPUT_COUNT + SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_OUTPUT_COUNT)
/**
* struct snd_firewire_motu_register_dsp_meter - the container for meter
@@ -196,11 +190,10 @@ struct snd_firewire_motu_register_dsp_meter {
__u8 data[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_COUNT];
};
-#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_COUNT 4
-#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT 20
-#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_INPUT_COUNT 10
-#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_ALIGNED_INPUT_COUNT \
- (SNDRV_FIREWIRE_MOTU_REGISTER_DSP_INPUT_COUNT + 2)
+#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_COUNT 4
+#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT 20
+#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_INPUT_COUNT 10
+#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_ALIGNED_INPUT_COUNT (SNDRV_FIREWIRE_MOTU_REGISTER_DSP_INPUT_COUNT + 2)
/**
* snd_firewire_motu_register_dsp_parameter - the container for parameters of
@@ -239,16 +232,12 @@ struct snd_firewire_motu_register_dsp_parameter {
__u8 gain[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT];
__u8 pan[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT];
__u8 flag[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT];
- __u8 paired_balance
- [SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT];
- __u8 paired_width
- [SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT];
+ __u8 paired_balance[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT];
+ __u8 paired_width[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT];
} source[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_COUNT];
struct {
- __u8 paired_volume
- [SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_COUNT];
- __u8 paired_flag
- [SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_COUNT];
+ __u8 paired_volume[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_COUNT];
+ __u8 paired_flag[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_COUNT];
} output;
} mixer;
struct {
@@ -263,8 +252,7 @@ struct snd_firewire_motu_register_dsp_parameter {
__u8 reserved[6];
} line_input;
struct {
- __u8 gain_and_invert
- [SNDRV_FIREWIRE_MOTU_REGISTER_DSP_ALIGNED_INPUT_COUNT];
+ __u8 gain_and_invert[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_ALIGNED_INPUT_COUNT];
__u8 flag[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_ALIGNED_INPUT_COUNT];
} input;
__u8 reserved[64];
diff --git a/include/arch/x86_64/sound/hdsp.h b/include/arch/x86_64/sound/hdsp.h
index c340e9af..db28b235 100644
--- a/include/arch/x86_64/sound/hdsp.h
+++ b/include/arch/x86_64/sound/hdsp.h
@@ -59,8 +59,7 @@ struct hdsp_config_info {
unsigned char analog_extension_board;
};
-#define SNDRV_HDSP_IOCTL_GET_CONFIG_INFO \
- _IOR('H', 0x41, struct hdsp_config_info)
+#define SNDRV_HDSP_IOCTL_GET_CONFIG_INFO _IOR('H', 0x41, struct hdsp_config_info)
struct hdsp_firmware {
void *firmware_data; /* 24413 x 4 bytes */
diff --git a/include/arch/x86_64/sound/hdspm.h b/include/arch/x86_64/sound/hdspm.h
index a873e680..b416eff6 100644
--- a/include/arch/x86_64/sound/hdspm.h
+++ b/include/arch/x86_64/sound/hdspm.h
@@ -83,18 +83,11 @@ struct hdspm_ltc {
* connection status.
*/
-enum hdspm_sync {
- hdspm_sync_no_lock = 0,
- hdspm_sync_lock = 1,
- hdspm_sync_sync = 2
-};
+enum hdspm_sync { hdspm_sync_no_lock = 0, hdspm_sync_lock = 1, hdspm_sync_sync = 2 };
enum hdspm_madi_input { hdspm_input_optical = 0, hdspm_input_coax = 1 };
-enum hdspm_madi_channel_format {
- hdspm_format_ch_64 = 0,
- hdspm_format_ch_56 = 1
-};
+enum hdspm_madi_channel_format { hdspm_format_ch_64 = 0, hdspm_format_ch_56 = 1 };
enum hdspm_madi_frame_format { hdspm_frame_48 = 0, hdspm_frame_96 = 1 };
diff --git a/include/arch/x86_64/sound/sb16_csp.h b/include/arch/x86_64/sound/sb16_csp.h
index 5a2617f2..84b3e9f0 100644
--- a/include/arch/x86_64/sound/sb16_csp.h
+++ b/include/arch/x86_64/sound/sb16_csp.h
@@ -90,8 +90,7 @@ struct snd_sb_csp_info {
* As a workaround for skipping the size-limit check, here we don't use the
* normal _IOW() macro but _IOC() with the manual argument.
*/
-#define SNDRV_SB_CSP_IOCTL_LOAD_CODE \
- _IOC(_IOC_WRITE, 'H', 0x11, sizeof(struct snd_sb_csp_microcode))
+#define SNDRV_SB_CSP_IOCTL_LOAD_CODE _IOC(_IOC_WRITE, 'H', 0x11, sizeof(struct snd_sb_csp_microcode))
/* unload microcode from CSP */
#define SNDRV_SB_CSP_IOCTL_UNLOAD_CODE _IO('H', 0x12)
/* start CSP */
diff --git a/include/arch/x86_64/sound/scarlett2.h b/include/arch/x86_64/sound/scarlett2.h
index c909190a..d3b94d46 100644
--- a/include/arch/x86_64/sound/scarlett2.h
+++ b/include/arch/x86_64/sound/scarlett2.h
@@ -16,9 +16,8 @@
#define SCARLETT2_HWDEP_MINOR 0
#define SCARLETT2_HWDEP_SUBMINOR 0
-#define SCARLETT2_HWDEP_VERSION \
- ((SCARLETT2_HWDEP_MAJOR << 16) | (SCARLETT2_HWDEP_MINOR << 8) | \
- SCARLETT2_HWDEP_SUBMINOR)
+#define SCARLETT2_HWDEP_VERSION \
+ ((SCARLETT2_HWDEP_MAJOR << 16) | (SCARLETT2_HWDEP_MINOR << 8) | SCARLETT2_HWDEP_SUBMINOR)
#define SCARLETT2_HWDEP_VERSION_MAJOR(v) (((v) >> 16) & 0xFF)
#define SCARLETT2_HWDEP_VERSION_MINOR(v) (((v) >> 8) & 0xFF)
@@ -47,7 +46,6 @@ struct scarlett2_flash_segment_erase_progress {
unsigned char progress;
unsigned char num_blocks;
};
-#define SCARLETT2_IOCTL_GET_ERASE_PROGRESS \
- _IOR('S', 0x64, struct scarlett2_flash_segment_erase_progress)
+#define SCARLETT2_IOCTL_GET_ERASE_PROGRESS _IOR('S', 0x64, struct scarlett2_flash_segment_erase_progress)
#endif /* __UAPI_SOUND_SCARLETT2_H */
diff --git a/include/arch/x86_64/sound/sfnt_info.h b/include/arch/x86_64/sound/sfnt_info.h
index 17430b08..6ff08a87 100644
--- a/include/arch/x86_64/sound/sfnt_info.h
+++ b/include/arch/x86_64/sound/sfnt_info.h
@@ -71,10 +71,10 @@ struct soundfont_open_parm {
/* wave table envelope & effect parameters to control EMU8000 */
struct soundfont_voice_parm {
- unsigned short moddelay; /* modulation delay (0x8000) */
- unsigned short modatkhld; /* modulation attack & hold time (0x7f7f) */
- unsigned short moddcysus; /* modulation decay & sustain (0x7f7f) */
- unsigned short modrelease; /* modulation release time (0x807f) */
+ unsigned short moddelay; /* modulation delay (0x8000) */
+ unsigned short modatkhld; /* modulation attack & hold time (0x7f7f) */
+ unsigned short moddcysus; /* modulation decay & sustain (0x7f7f) */
+ unsigned short modrelease; /* modulation release time (0x807f) */
short modkeyhold, modkeydecay; /* envelope change per key (not used) */
unsigned short voldelay; /* volume delay (0x8000) */
unsigned short volatkhld; /* volume attack & hold time (0x7f7f) */
@@ -108,16 +108,16 @@ struct soundfont_voice_info {
#define SNDRV_SFNT_MODE_NORELEASE 4 /* obsolete */
#define SNDRV_SFNT_MODE_INIT_PARM 8
- short root; /* midi root key */
- short tune; /* pitch tuning (in cents) */
- unsigned char low, high; /* key note range */
- unsigned char vellow, velhigh; /* velocity range */
- signed char fixkey, fixvel; /* fixed key, velocity */
- signed char pan, fixpan; /* panning, fixed panning */
- short exclusiveClass; /* exclusive class (0 = none) */
- unsigned char amplitude; /* sample volume (127 max) */
- unsigned char attenuation; /* attenuation (0.375dB) */
- short scaleTuning; /* pitch scale tuning(%), normally 100 */
+ short root; /* midi root key */
+ short tune; /* pitch tuning (in cents) */
+ unsigned char low, high; /* key note range */
+ unsigned char vellow, velhigh; /* velocity range */
+ signed char fixkey, fixvel; /* fixed key, velocity */
+ signed char pan, fixpan; /* panning, fixed panning */
+ short exclusiveClass; /* exclusive class (0 = none) */
+ unsigned char amplitude; /* sample volume (127 max) */
+ unsigned char attenuation; /* attenuation (0.375dB) */
+ short scaleTuning; /* pitch scale tuning(%), normally 100 */
struct soundfont_voice_parm parm; /* voice envelope parameters */
unsigned short sample_mode; /* sample mode_flag (set by driver) */
};
@@ -154,7 +154,7 @@ struct soundfont_sample_info {
#define SNDRV_SFNT_SAMPLE_STEREO_LEFT 32 /* stereo left sound */
#define SNDRV_SFNT_SAMPLE_STEREO_RIGHT 64 /* stereo right sound */
#define SNDRV_SFNT_SAMPLE_REVERSE_LOOP 128 /* reverse looping */
- unsigned int truesize; /* used memory size (set by driver) */
+ unsigned int truesize; /* used memory size (set by driver) */
};
/*
@@ -181,9 +181,8 @@ struct snd_emux_misc_mode {
int value2; /* reserved */
};
-#define SNDRV_EMUX_IOCTL_VERSION _IOR('H', 0x80, unsigned int)
-#define SNDRV_EMUX_IOCTL_LOAD_PATCH \
- _IOWR('H', 0x81, struct soundfont_patch_info)
+#define SNDRV_EMUX_IOCTL_VERSION _IOR('H', 0x80, unsigned int)
+#define SNDRV_EMUX_IOCTL_LOAD_PATCH _IOWR('H', 0x81, struct soundfont_patch_info)
#define SNDRV_EMUX_IOCTL_RESET_SAMPLES _IO('H', 0x82)
#define SNDRV_EMUX_IOCTL_REMOVE_LAST_SAMPLES _IO('H', 0x83)
#define SNDRV_EMUX_IOCTL_MEM_AVAIL _IOW('H', 0x84, int)
diff --git a/include/arch/x86_64/sound/skl-tplg-interface.h b/include/arch/x86_64/sound/skl-tplg-interface.h
index a958344f..c947abf9 100644
--- a/include/arch/x86_64/sound/skl-tplg-interface.h
+++ b/include/arch/x86_64/sound/skl-tplg-interface.h
@@ -28,13 +28,7 @@
#define SKL_UUID_STR_SZ 40
/* Event types goes here */
/* Reserve event type 0 for no event handlers */
-enum skl_event_types {
- SKL_EVENT_NONE = 0,
- SKL_MIXER_EVENT,
- SKL_MUX_EVENT,
- SKL_VMIXER_EVENT,
- SKL_PGA_EVENT
-};
+enum skl_event_types { SKL_EVENT_NONE = 0, SKL_MIXER_EVENT, SKL_MUX_EVENT, SKL_VMIXER_EVENT, SKL_PGA_EVENT };
/**
* enum skl_ch_cfg - channel configuration
@@ -84,23 +78,11 @@ enum skl_module_type {
SKL_MODULE_TYPE_MIC_SELECT,
};
-enum skl_core_affinity {
- SKL_AFFINITY_CORE_0 = 0,
- SKL_AFFINITY_CORE_1,
- SKL_AFFINITY_CORE_MAX
-};
+enum skl_core_affinity { SKL_AFFINITY_CORE_0 = 0, SKL_AFFINITY_CORE_1, SKL_AFFINITY_CORE_MAX };
-enum skl_pipe_conn_type {
- SKL_PIPE_CONN_TYPE_NONE = 0,
- SKL_PIPE_CONN_TYPE_FE,
- SKL_PIPE_CONN_TYPE_BE
-};
+enum skl_pipe_conn_type { SKL_PIPE_CONN_TYPE_NONE = 0, SKL_PIPE_CONN_TYPE_FE, SKL_PIPE_CONN_TYPE_BE };
-enum skl_hw_conn_type {
- SKL_CONN_NONE = 0,
- SKL_CONN_SOURCE = 1,
- SKL_CONN_SINK = 2
-};
+enum skl_hw_conn_type { SKL_CONN_NONE = 0, SKL_CONN_SOURCE = 1, SKL_CONN_SINK = 2 };
enum skl_dev_type {
SKL_DEVICE_BT = 0x0,
@@ -142,12 +124,7 @@ enum module_pin_type {
SKL_PIN_TYPE_HETEROGENEOUS,
};
-enum skl_module_param_type {
- SKL_PARAM_DEFAULT = 0,
- SKL_PARAM_INIT,
- SKL_PARAM_SET,
- SKL_PARAM_BIND
-};
+enum skl_module_param_type { SKL_PARAM_DEFAULT = 0, SKL_PARAM_INIT, SKL_PARAM_SET, SKL_PARAM_BIND };
struct skl_dfw_algo_data {
__u32 set_params : 2;
diff --git a/include/arch/x86_64/sound/sof/abi.h b/include/arch/x86_64/sound/sof/abi.h
index b3b33960..09411a1a 100644
--- a/include/arch/x86_64/sound/sof/abi.h
+++ b/include/arch/x86_64/sound/sof/abi.h
@@ -40,20 +40,15 @@
#define SOF_ABI_PATCH_SHIFT 0
#define SOF_ABI_PATCH_MASK 0xfff
-#define SOF_ABI_VER(major, minor, patch) \
- (((major) << SOF_ABI_MAJOR_SHIFT) | ((minor) << SOF_ABI_MINOR_SHIFT) | \
- ((patch) << SOF_ABI_PATCH_SHIFT))
+#define SOF_ABI_VER(major, minor, patch) \
+ (((major) << SOF_ABI_MAJOR_SHIFT) | ((minor) << SOF_ABI_MINOR_SHIFT) | ((patch) << SOF_ABI_PATCH_SHIFT))
-#define SOF_ABI_VERSION_MAJOR(version) \
- (((version) >> SOF_ABI_MAJOR_SHIFT) & SOF_ABI_MAJOR_MASK)
-#define SOF_ABI_VERSION_MINOR(version) \
- (((version) >> SOF_ABI_MINOR_SHIFT) & SOF_ABI_MINOR_MASK)
-#define SOF_ABI_VERSION_PATCH(version) \
- (((version) >> SOF_ABI_PATCH_SHIFT) & SOF_ABI_PATCH_MASK)
+#define SOF_ABI_VERSION_MAJOR(version) (((version) >> SOF_ABI_MAJOR_SHIFT) & SOF_ABI_MAJOR_MASK)
+#define SOF_ABI_VERSION_MINOR(version) (((version) >> SOF_ABI_MINOR_SHIFT) & SOF_ABI_MINOR_MASK)
+#define SOF_ABI_VERSION_PATCH(version) (((version) >> SOF_ABI_PATCH_SHIFT) & SOF_ABI_PATCH_MASK)
#define SOF_ABI_VERSION_INCOMPATIBLE(sof_ver, client_ver) \
- (SOF_ABI_VERSION_MAJOR((sof_ver)) != \
- SOF_ABI_VERSION_MAJOR((client_ver)))
+ (SOF_ABI_VERSION_MAJOR((sof_ver)) != SOF_ABI_VERSION_MAJOR((client_ver)))
#define SOF_ABI_VERSION SOF_ABI_VER(SOF_ABI_MAJOR, SOF_ABI_MINOR, SOF_ABI_PATCH)
diff --git a/include/arch/x86_64/sound/sof/fw.h b/include/arch/x86_64/sound/sof/fw.h
index 98608953..af9292f5 100644
--- a/include/arch/x86_64/sound/sof/fw.h
+++ b/include/arch/x86_64/sound/sof/fw.h
@@ -73,9 +73,9 @@ struct snd_sof_mod_hdr {
*/
struct snd_sof_fw_header {
unsigned char sig[SND_SOF_FW_SIG_SIZE]; /* "Reef" */
- __u32 file_size; /* size of file minus this header */
- __u32 num_modules; /* number of modules */
- __u32 abi; /* version of header format */
+ __u32 file_size; /* size of file minus this header */
+ __u32 num_modules; /* number of modules */
+ __u32 abi; /* version of header format */
} __attribute__((packed));
#endif
diff --git a/include/arch/x86_64/sound/tlv.h b/include/arch/x86_64/sound/tlv.h
index 1c6c5a82..26a1c7e9 100644
--- a/include/arch/x86_64/sound/tlv.h
+++ b/include/arch/x86_64/sound/tlv.h
@@ -28,27 +28,21 @@
* block_length = (length + (sizeof(unsigned int) - 1)) &
* ~(sizeof(unsigned int) - 1)) ....
*/
-#define SNDRV_CTL_TLVD_ITEM(type, ...) \
- (type), SNDRV_CTL_TLVD_LENGTH(__VA_ARGS__), __VA_ARGS__
-#define SNDRV_CTL_TLVD_LENGTH(...) \
- ((unsigned int)sizeof((const unsigned int[]){ __VA_ARGS__ }))
+#define SNDRV_CTL_TLVD_ITEM(type, ...) (type), SNDRV_CTL_TLVD_LENGTH(__VA_ARGS__), __VA_ARGS__
+#define SNDRV_CTL_TLVD_LENGTH(...) ((unsigned int)sizeof((const unsigned int[]){ __VA_ARGS__ }))
/* Accessor offsets for TLV data items */
#define SNDRV_CTL_TLVO_TYPE 0
#define SNDRV_CTL_TLVO_LEN 1
-#define SNDRV_CTL_TLVD_CONTAINER_ITEM(...) \
- SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_CONTAINER, __VA_ARGS__)
-#define SNDRV_CTL_TLVD_DECLARE_CONTAINER(name, ...) \
- unsigned int name[] = { SNDRV_CTL_TLVD_CONTAINER_ITEM(__VA_ARGS__) }
+#define SNDRV_CTL_TLVD_CONTAINER_ITEM(...) SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_CONTAINER, __VA_ARGS__)
+#define SNDRV_CTL_TLVD_DECLARE_CONTAINER(name, ...) unsigned int name[] = { SNDRV_CTL_TLVD_CONTAINER_ITEM(__VA_ARGS__) }
#define SNDRV_CTL_TLVD_DB_SCALE_MASK 0xffff
#define SNDRV_CTL_TLVD_DB_SCALE_MUTE 0x10000
-#define SNDRV_CTL_TLVD_DB_SCALE_ITEM(min, step, mute) \
- SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_SCALE, (min), \
- ((step) & SNDRV_CTL_TLVD_DB_SCALE_MASK) | \
- ((mute) ? SNDRV_CTL_TLVD_DB_SCALE_MUTE : \
- 0))
+#define SNDRV_CTL_TLVD_DB_SCALE_ITEM(min, step, mute) \
+ SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_SCALE, (min), \
+ ((step) & SNDRV_CTL_TLVD_DB_SCALE_MASK) | ((mute) ? SNDRV_CTL_TLVD_DB_SCALE_MUTE : 0))
#define SNDRV_CTL_TLVD_DECLARE_DB_SCALE(name, min, step, mute) \
unsigned int name[] = { SNDRV_CTL_TLVD_DB_SCALE_ITEM(min, step, mute) }
@@ -57,23 +51,20 @@
#define SNDRV_CTL_TLVO_DB_SCALE_MUTE_AND_STEP 3
/* dB scale specified with min/max values instead of step */
-#define SNDRV_CTL_TLVD_DB_MINMAX_ITEM(min_dB, max_dB) \
- SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_MINMAX, (min_dB), (max_dB))
+#define SNDRV_CTL_TLVD_DB_MINMAX_ITEM(min_dB, max_dB) SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_MINMAX, (min_dB), (max_dB))
#define SNDRV_CTL_TLVD_DB_MINMAX_MUTE_ITEM(min_dB, max_dB) \
SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_MINMAX_MUTE, (min_dB), (max_dB))
#define SNDRV_CTL_TLVD_DECLARE_DB_MINMAX(name, min_dB, max_dB) \
unsigned int name[] = { SNDRV_CTL_TLVD_DB_MINMAX_ITEM(min_dB, max_dB) }
-#define SNDRV_CTL_TLVD_DECLARE_DB_MINMAX_MUTE(name, min_dB, max_dB) \
- unsigned int name[] = { SNDRV_CTL_TLVD_DB_MINMAX_MUTE_ITEM(min_dB, \
- max_dB) }
+#define SNDRV_CTL_TLVD_DECLARE_DB_MINMAX_MUTE(name, min_dB, max_dB) \
+ unsigned int name[] = { SNDRV_CTL_TLVD_DB_MINMAX_MUTE_ITEM(min_dB, max_dB) }
/* Accessor offsets for min, max items in db-minmax types of TLV. */
#define SNDRV_CTL_TLVO_DB_MINMAX_MIN 2
#define SNDRV_CTL_TLVO_DB_MINMAX_MAX 3
/* linear volume between min_dB and max_dB (.01dB unit) */
-#define SNDRV_CTL_TLVD_DB_LINEAR_ITEM(min_dB, max_dB) \
- SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_LINEAR, (min_dB), (max_dB))
+#define SNDRV_CTL_TLVD_DB_LINEAR_ITEM(min_dB, max_dB) SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_LINEAR, (min_dB), (max_dB))
#define SNDRV_CTL_TLVD_DECLARE_DB_LINEAR(name, min_dB, max_dB) \
unsigned int name[] = { SNDRV_CTL_TLVD_DB_LINEAR_ITEM(min_dB, max_dB) }
@@ -87,10 +78,8 @@
* dB values (which is also required for all other mixer controls).
*/
/* Each item is: <min> <max> <TLV> */
-#define SNDRV_CTL_TLVD_DB_RANGE_ITEM(...) \
- SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_RANGE, __VA_ARGS__)
-#define SNDRV_CTL_TLVD_DECLARE_DB_RANGE(name, ...) \
- unsigned int name[] = { SNDRV_CTL_TLVD_DB_RANGE_ITEM(__VA_ARGS__) }
+#define SNDRV_CTL_TLVD_DB_RANGE_ITEM(...) SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_RANGE, __VA_ARGS__)
+#define SNDRV_CTL_TLVD_DECLARE_DB_RANGE(name, ...) unsigned int name[] = { SNDRV_CTL_TLVD_DB_RANGE_ITEM(__VA_ARGS__) }
#define SNDRV_CTL_TLVD_DB_GAIN_MUTE -9999999
diff --git a/include/arch/x86_64/sound/usb_stream.h b/include/arch/x86_64/sound/usb_stream.h
index 6a6c3ca6..b4a7a4bb 100644
--- a/include/arch/x86_64/sound/usb_stream.h
+++ b/include/arch/x86_64/sound/usb_stream.h
@@ -8,8 +8,7 @@
#define USB_STREAM_INTERFACE_VERSION 2
-#define SNDRV_USB_STREAM_IOCTL_SET_PARAMS \
- _IOW('H', 0x90, struct usb_stream_config)
+#define SNDRV_USB_STREAM_IOCTL_SET_PARAMS _IOW('H', 0x90, struct usb_stream_config)
struct usb_stream_packet {
unsigned offset;
diff --git a/include/arch/x86_64/video/sisfb.h b/include/arch/x86_64/video/sisfb.h
index 52f21164..c97efb04 100644
--- a/include/arch/x86_64/video/sisfb.h
+++ b/include/arch/x86_64/video/sisfb.h
@@ -50,18 +50,14 @@
#define CRT1_LCDA 0x00020000
#define VGA2_CONNECTED 0x00040000
#define VB_DISPTYPE_CRT1 0x00080000 /* CRT1 connected and used */
-#define VB_SINGLE_MODE \
- 0x20000000 /* CRT1 or CRT2; determined by DISPTYPE_CRTx */
-#define VB_MIRROR_MODE 0x40000000 /* CRT1 + CRT2 identical (mirror mode) */
-#define VB_DUALVIEW_MODE \
- 0x80000000 /* CRT1 + CRT2 independent (dual head mode) */
+#define VB_SINGLE_MODE 0x20000000 /* CRT1 or CRT2; determined by DISPTYPE_CRTx */
+#define VB_MIRROR_MODE 0x40000000 /* CRT1 + CRT2 identical (mirror mode) */
+#define VB_DUALVIEW_MODE 0x80000000 /* CRT1 + CRT2 independent (dual head mode) */
/* Aliases: */
-#define CRT2_ENABLE (CRT2_LCD | CRT2_TV | CRT2_VGA)
-#define TV_STANDARD (TV_NTSC | TV_PAL | TV_PALM | TV_PALN | TV_NTSCJ)
-#define TV_INTERFACE \
- (TV_AVIDEO | TV_SVIDEO | TV_SCART | TV_HIVISION | TV_YPBPR | \
- TV_CHSCART | TV_CHYPBPR525I)
+#define CRT2_ENABLE (CRT2_LCD | CRT2_TV | CRT2_VGA)
+#define TV_STANDARD (TV_NTSC | TV_PAL | TV_PALM | TV_PALN | TV_NTSCJ)
+#define TV_INTERFACE (TV_AVIDEO | TV_SVIDEO | TV_SCART | TV_HIVISION | TV_YPBPR | TV_CHSCART | TV_CHYPBPR525I)
/* Only if TV_YPBPR is set: */
#define TV_YPBPR525I TV_NTSC
@@ -139,17 +135,14 @@ struct sisfb_info {
};
#define SISFB_CMD_GETVBFLAGS 0x55AA0001 /* no arg; result[1] = vbflags */
-#define SISFB_CMD_SWITCHCRT1 \
- 0x55AA0010 /* arg[0]: 99 = query, 0 = off, 1 = on */
+#define SISFB_CMD_SWITCHCRT1 0x55AA0010 /* arg[0]: 99 = query, 0 = off, 1 = on */
/* more to come */
#define SISFB_CMD_ERR_OK 0x80000000 /* command succeeded */
#define SISFB_CMD_ERR_LOCKED 0x80000001 /* sisfb is locked */
-#define SISFB_CMD_ERR_EARLY \
- 0x80000002 /* request before sisfb took over gfx system */
-#define SISFB_CMD_ERR_NOVB 0x80000003 /* No video bridge */
-#define SISFB_CMD_ERR_NOCRT2 \
- 0x80000004 /* can't change CRT1 status, CRT2 disabled */
+#define SISFB_CMD_ERR_EARLY 0x80000002 /* request before sisfb took over gfx system */
+#define SISFB_CMD_ERR_NOVB 0x80000003 /* No video bridge */
+#define SISFB_CMD_ERR_NOCRT2 0x80000004 /* can't change CRT1 status, CRT2 disabled */
/* more to come */
#define SISFB_CMD_ERR_UNKNOWN 0x8000ffff /* Unknown command */
#define SISFB_CMD_ERR_OTHER 0x80010000 /* Other error */
diff --git a/include/arch/x86_64/xen/evtchn.h b/include/arch/x86_64/xen/evtchn.h
index fbba8441..959bac91 100644
--- a/include/arch/x86_64/xen/evtchn.h
+++ b/include/arch/x86_64/xen/evtchn.h
@@ -38,8 +38,7 @@
* Bind a fresh port to VIRQ @virq.
* Return allocated port.
*/
-#define IOCTL_EVTCHN_BIND_VIRQ \
- _IOC(_IOC_NONE, 'E', 0, sizeof(struct ioctl_evtchn_bind_virq))
+#define IOCTL_EVTCHN_BIND_VIRQ _IOC(_IOC_NONE, 'E', 0, sizeof(struct ioctl_evtchn_bind_virq))
struct ioctl_evtchn_bind_virq {
unsigned int virq;
};
@@ -48,8 +47,7 @@ struct ioctl_evtchn_bind_virq {
* Bind a fresh port to remote <@remote_domain, @remote_port>.
* Return allocated port.
*/
-#define IOCTL_EVTCHN_BIND_INTERDOMAIN \
- _IOC(_IOC_NONE, 'E', 1, sizeof(struct ioctl_evtchn_bind_interdomain))
+#define IOCTL_EVTCHN_BIND_INTERDOMAIN _IOC(_IOC_NONE, 'E', 1, sizeof(struct ioctl_evtchn_bind_interdomain))
struct ioctl_evtchn_bind_interdomain {
unsigned int remote_domain, remote_port;
};
@@ -58,8 +56,7 @@ struct ioctl_evtchn_bind_interdomain {
* Allocate a fresh port for binding to @remote_domain.
* Return allocated port.
*/
-#define IOCTL_EVTCHN_BIND_UNBOUND_PORT \
- _IOC(_IOC_NONE, 'E', 2, sizeof(struct ioctl_evtchn_bind_unbound_port))
+#define IOCTL_EVTCHN_BIND_UNBOUND_PORT _IOC(_IOC_NONE, 'E', 2, sizeof(struct ioctl_evtchn_bind_unbound_port))
struct ioctl_evtchn_bind_unbound_port {
unsigned int remote_domain;
};
@@ -67,8 +64,7 @@ struct ioctl_evtchn_bind_unbound_port {
/*
* Unbind previously allocated @port.
*/
-#define IOCTL_EVTCHN_UNBIND \
- _IOC(_IOC_NONE, 'E', 3, sizeof(struct ioctl_evtchn_unbind))
+#define IOCTL_EVTCHN_UNBIND _IOC(_IOC_NONE, 'E', 3, sizeof(struct ioctl_evtchn_unbind))
struct ioctl_evtchn_unbind {
unsigned int port;
};
@@ -76,8 +72,7 @@ struct ioctl_evtchn_unbind {
/*
* Unbind previously allocated @port.
*/
-#define IOCTL_EVTCHN_NOTIFY \
- _IOC(_IOC_NONE, 'E', 4, sizeof(struct ioctl_evtchn_notify))
+#define IOCTL_EVTCHN_NOTIFY _IOC(_IOC_NONE, 'E', 4, sizeof(struct ioctl_evtchn_notify))
struct ioctl_evtchn_notify {
unsigned int port;
};
@@ -94,8 +89,7 @@ struct ioctl_evtchn_notify {
* which were bound before restricting remain bound afterwards, and
* can be notified as usual.
*/
-#define IOCTL_EVTCHN_RESTRICT_DOMID \
- _IOC(_IOC_NONE, 'E', 6, sizeof(struct ioctl_evtchn_restrict_domid))
+#define IOCTL_EVTCHN_RESTRICT_DOMID _IOC(_IOC_NONE, 'E', 6, sizeof(struct ioctl_evtchn_restrict_domid))
struct ioctl_evtchn_restrict_domid {
domid_t domid;
};
@@ -103,8 +97,7 @@ struct ioctl_evtchn_restrict_domid {
/*
* Bind statically allocated @port.
*/
-#define IOCTL_EVTCHN_BIND_STATIC \
- _IOC(_IOC_NONE, 'E', 7, sizeof(struct ioctl_evtchn_bind))
+#define IOCTL_EVTCHN_BIND_STATIC _IOC(_IOC_NONE, 'E', 7, sizeof(struct ioctl_evtchn_bind))
struct ioctl_evtchn_bind {
unsigned int port;
};
diff --git a/include/arch/x86_64/xen/gntalloc.h b/include/arch/x86_64/xen/gntalloc.h
index 58b3a8b8..7ec7e7be 100644
--- a/include/arch/x86_64/xen/gntalloc.h
+++ b/include/arch/x86_64/xen/gntalloc.h
@@ -16,8 +16,7 @@
/*
* Allocates a new page and creates a new grant reference.
*/
-#define IOCTL_GNTALLOC_ALLOC_GREF \
- _IOC(_IOC_NONE, 'G', 5, sizeof(struct ioctl_gntalloc_alloc_gref))
+#define IOCTL_GNTALLOC_ALLOC_GREF _IOC(_IOC_NONE, 'G', 5, sizeof(struct ioctl_gntalloc_alloc_gref))
struct ioctl_gntalloc_alloc_gref {
/* IN parameters */
/* The ID of the domain to be given access to the grants. */
@@ -43,8 +42,7 @@ struct ioctl_gntalloc_alloc_gref {
* Deallocates the grant reference, allowing the associated page to be freed if
* no other domains are using it.
*/
-#define IOCTL_GNTALLOC_DEALLOC_GREF \
- _IOC(_IOC_NONE, 'G', 6, sizeof(struct ioctl_gntalloc_dealloc_gref))
+#define IOCTL_GNTALLOC_DEALLOC_GREF _IOC(_IOC_NONE, 'G', 6, sizeof(struct ioctl_gntalloc_dealloc_gref))
struct ioctl_gntalloc_dealloc_gref {
/* IN parameters */
/* The offset returned in the map operation */
@@ -63,8 +61,7 @@ struct ioctl_gntalloc_dealloc_gref {
* notification prior to the IOCTL_GNTALLOC_DEALLOC_GREF if you do not want it
* to occur.
*/
-#define IOCTL_GNTALLOC_SET_UNMAP_NOTIFY \
- _IOC(_IOC_NONE, 'G', 7, sizeof(struct ioctl_gntalloc_unmap_notify))
+#define IOCTL_GNTALLOC_SET_UNMAP_NOTIFY _IOC(_IOC_NONE, 'G', 7, sizeof(struct ioctl_gntalloc_unmap_notify))
struct ioctl_gntalloc_unmap_notify {
/* IN parameters */
/* Offset in the file descriptor for a byte within the page (same as
diff --git a/include/arch/x86_64/xen/gntdev.h b/include/arch/x86_64/xen/gntdev.h
index 9d26b9f6..d61a1dd6 100644
--- a/include/arch/x86_64/xen/gntdev.h
+++ b/include/arch/x86_64/xen/gntdev.h
@@ -55,8 +55,7 @@ struct ioctl_gntdev_grant_ref {
* mmap()'d at offset 0, such as Wayland. If @count is set to 0, this
* ioctl will fail.
*/
-#define IOCTL_GNTDEV_MAP_GRANT_REF \
- _IOC(_IOC_NONE, 'G', 0, sizeof(struct ioctl_gntdev_map_grant_ref))
+#define IOCTL_GNTDEV_MAP_GRANT_REF _IOC(_IOC_NONE, 'G', 0, sizeof(struct ioctl_gntdev_map_grant_ref))
struct ioctl_gntdev_map_grant_ref {
/* IN parameters */
/* The number of grants to be mapped. */
@@ -75,8 +74,7 @@ struct ioctl_gntdev_map_grant_ref {
* gntdev. N.B. munmap() must be called on the relevant virtual address(es)
* before this ioctl is called, or an error will result.
*/
-#define IOCTL_GNTDEV_UNMAP_GRANT_REF \
- _IOC(_IOC_NONE, 'G', 1, sizeof(struct ioctl_gntdev_unmap_grant_ref))
+#define IOCTL_GNTDEV_UNMAP_GRANT_REF _IOC(_IOC_NONE, 'G', 1, sizeof(struct ioctl_gntdev_unmap_grant_ref))
struct ioctl_gntdev_unmap_grant_ref {
/* IN parameters */
/* The offset was returned by the corresponding map operation. */
@@ -98,9 +96,7 @@ struct ioctl_gntdev_unmap_grant_ref {
* an error will result. It is only possible to munmap() the entire
* contiguously-allocated range at once, and not any subrange thereof.
*/
-#define IOCTL_GNTDEV_GET_OFFSET_FOR_VADDR \
- _IOC(_IOC_NONE, 'G', 2, \
- sizeof(struct ioctl_gntdev_get_offset_for_vaddr))
+#define IOCTL_GNTDEV_GET_OFFSET_FOR_VADDR _IOC(_IOC_NONE, 'G', 2, sizeof(struct ioctl_gntdev_get_offset_for_vaddr))
struct ioctl_gntdev_get_offset_for_vaddr {
/* IN parameters */
/* The virtual address of the first mapped page in a range. */
@@ -119,8 +115,7 @@ struct ioctl_gntdev_get_offset_for_vaddr {
*
* N.B. This must be called before any other ioctl is performed on the device.
*/
-#define IOCTL_GNTDEV_SET_MAX_GRANTS \
- _IOC(_IOC_NONE, 'G', 3, sizeof(struct ioctl_gntdev_set_max_grants))
+#define IOCTL_GNTDEV_SET_MAX_GRANTS _IOC(_IOC_NONE, 'G', 3, sizeof(struct ioctl_gntdev_set_max_grants))
struct ioctl_gntdev_set_max_grants {
/* IN parameter */
/* The maximum number of grants that may be mapped at once. */
@@ -137,8 +132,7 @@ struct ioctl_gntdev_set_max_grants {
* notification prior to the IOCTL_GNTALLOC_DEALLOC_GREF if you do not want it
* to occur.
*/
-#define IOCTL_GNTDEV_SET_UNMAP_NOTIFY \
- _IOC(_IOC_NONE, 'G', 7, sizeof(struct ioctl_gntdev_unmap_notify))
+#define IOCTL_GNTDEV_SET_UNMAP_NOTIFY _IOC(_IOC_NONE, 'G', 7, sizeof(struct ioctl_gntdev_unmap_notify))
struct ioctl_gntdev_unmap_notify {
/* IN parameters */
/* Offset in the file descriptor for a byte within the page (same as
@@ -196,8 +190,7 @@ struct gntdev_grant_copy_segment {
* EINVAL: A segment crosses the boundary of a foreign page.
* EFAULT: A segment's local buffer is not accessible.
*/
-#define IOCTL_GNTDEV_GRANT_COPY \
- _IOC(_IOC_NONE, 'G', 8, sizeof(struct ioctl_gntdev_grant_copy))
+#define IOCTL_GNTDEV_GRANT_COPY _IOC(_IOC_NONE, 'G', 8, sizeof(struct ioctl_gntdev_grant_copy))
struct ioctl_gntdev_grant_copy {
unsigned int count;
struct gntdev_grant_copy_segment *segments;
@@ -238,9 +231,7 @@ struct ioctl_gntdev_grant_copy {
* [1] Documentation/driver-api/dma-buf.rst
*/
-#define IOCTL_GNTDEV_DMABUF_EXP_FROM_REFS \
- _IOC(_IOC_NONE, 'G', 9, \
- sizeof(struct ioctl_gntdev_dmabuf_exp_from_refs))
+#define IOCTL_GNTDEV_DMABUF_EXP_FROM_REFS _IOC(_IOC_NONE, 'G', 9, sizeof(struct ioctl_gntdev_dmabuf_exp_from_refs))
struct ioctl_gntdev_dmabuf_exp_from_refs {
/* IN parameters. */
/* Specific options for this dma-buf: see GNTDEV_DMA_FLAG_XXX. */
@@ -269,8 +260,7 @@ struct ioctl_gntdev_dmabuf_exp_from_refs {
* this must not be treated as error.
*/
#define IOCTL_GNTDEV_DMABUF_EXP_WAIT_RELEASED \
- _IOC(_IOC_NONE, 'G', 10, \
- sizeof(struct ioctl_gntdev_dmabuf_exp_wait_released))
+ _IOC(_IOC_NONE, 'G', 10, sizeof(struct ioctl_gntdev_dmabuf_exp_wait_released))
struct ioctl_gntdev_dmabuf_exp_wait_released {
/* IN parameters */
__u32 fd;
@@ -281,8 +271,7 @@ struct ioctl_gntdev_dmabuf_exp_wait_released {
* Import a dma-buf with file descriptor @fd and export granted references
* to the pages of that dma-buf into array @refs of size @count.
*/
-#define IOCTL_GNTDEV_DMABUF_IMP_TO_REFS \
- _IOC(_IOC_NONE, 'G', 11, sizeof(struct ioctl_gntdev_dmabuf_imp_to_refs))
+#define IOCTL_GNTDEV_DMABUF_IMP_TO_REFS _IOC(_IOC_NONE, 'G', 11, sizeof(struct ioctl_gntdev_dmabuf_imp_to_refs))
struct ioctl_gntdev_dmabuf_imp_to_refs {
/* IN parameters. */
/* File descriptor of the dma-buf. */
@@ -303,8 +292,7 @@ struct ioctl_gntdev_dmabuf_imp_to_refs {
* @fd, so it can be released by the owner. This is only valid for buffers
* created with IOCTL_GNTDEV_DMABUF_IMP_TO_REFS.
*/
-#define IOCTL_GNTDEV_DMABUF_IMP_RELEASE \
- _IOC(_IOC_NONE, 'G', 12, sizeof(struct ioctl_gntdev_dmabuf_imp_release))
+#define IOCTL_GNTDEV_DMABUF_IMP_RELEASE _IOC(_IOC_NONE, 'G', 12, sizeof(struct ioctl_gntdev_dmabuf_imp_release))
struct ioctl_gntdev_dmabuf_imp_release {
/* IN parameters */
__u32 fd;
diff --git a/include/arch/x86_64/xen/privcmd.h b/include/arch/x86_64/xen/privcmd.h
index b5011e68..686f11ef 100644
--- a/include/arch/x86_64/xen/privcmd.h
+++ b/include/arch/x86_64/xen/privcmd.h
@@ -144,21 +144,15 @@ struct privcmd_pcidev_get_gsi {
* if the operation was otherwise successful but any frame failed with
* -ENOENT, then -1 is returned and errno is set to ENOENT.
*/
-#define IOCTL_PRIVCMD_HYPERCALL \
- _IOC(_IOC_NONE, 'P', 0, sizeof(struct privcmd_hypercall))
-#define IOCTL_PRIVCMD_MMAP _IOC(_IOC_NONE, 'P', 2, sizeof(struct privcmd_mmap))
-#define IOCTL_PRIVCMD_MMAPBATCH \
- _IOC(_IOC_NONE, 'P', 3, sizeof(struct privcmd_mmapbatch))
-#define IOCTL_PRIVCMD_MMAPBATCH_V2 \
- _IOC(_IOC_NONE, 'P', 4, sizeof(struct privcmd_mmapbatch_v2))
-#define IOCTL_PRIVCMD_DM_OP \
- _IOC(_IOC_NONE, 'P', 5, sizeof(struct privcmd_dm_op))
-#define IOCTL_PRIVCMD_RESTRICT _IOC(_IOC_NONE, 'P', 6, sizeof(domid_t))
-#define IOCTL_PRIVCMD_MMAP_RESOURCE \
- _IOC(_IOC_NONE, 'P', 7, sizeof(struct privcmd_mmap_resource))
-#define IOCTL_PRIVCMD_IRQFD _IOW('P', 8, struct privcmd_irqfd)
-#define IOCTL_PRIVCMD_IOEVENTFD _IOW('P', 9, struct privcmd_ioeventfd)
-#define IOCTL_PRIVCMD_PCIDEV_GET_GSI \
- _IOC(_IOC_NONE, 'P', 10, sizeof(struct privcmd_pcidev_get_gsi))
+#define IOCTL_PRIVCMD_HYPERCALL _IOC(_IOC_NONE, 'P', 0, sizeof(struct privcmd_hypercall))
+#define IOCTL_PRIVCMD_MMAP _IOC(_IOC_NONE, 'P', 2, sizeof(struct privcmd_mmap))
+#define IOCTL_PRIVCMD_MMAPBATCH _IOC(_IOC_NONE, 'P', 3, sizeof(struct privcmd_mmapbatch))
+#define IOCTL_PRIVCMD_MMAPBATCH_V2 _IOC(_IOC_NONE, 'P', 4, sizeof(struct privcmd_mmapbatch_v2))
+#define IOCTL_PRIVCMD_DM_OP _IOC(_IOC_NONE, 'P', 5, sizeof(struct privcmd_dm_op))
+#define IOCTL_PRIVCMD_RESTRICT _IOC(_IOC_NONE, 'P', 6, sizeof(domid_t))
+#define IOCTL_PRIVCMD_MMAP_RESOURCE _IOC(_IOC_NONE, 'P', 7, sizeof(struct privcmd_mmap_resource))
+#define IOCTL_PRIVCMD_IRQFD _IOW('P', 8, struct privcmd_irqfd)
+#define IOCTL_PRIVCMD_IOEVENTFD _IOW('P', 9, struct privcmd_ioeventfd)
+#define IOCTL_PRIVCMD_PCIDEV_GET_GSI _IOC(_IOC_NONE, 'P', 10, sizeof(struct privcmd_pcidev_get_gsi))
#endif /* __LINUX_PUBLIC_PRIVCMD_H__ */
diff --git a/include/assert.h b/include/assert.h
index 56d7d1e2..49550e39 100644
--- a/include/assert.h
+++ b/include/assert.h
@@ -5,14 +5,10 @@
#define assert(ignore) ((void)0)
#else
-#define assert(__expr) \
- ((__expr) ? \
- (void)0 : \
- __assert(__FILE__, __LINE__, __PRETTY_FUNCTION__, #__expr))
+#define assert(__expr) ((__expr) ? (void)0 : __assert(__FILE__, __LINE__, __PRETTY_FUNCTION__, #__expr))
#endif
-_Noreturn void __assert(const char *_Nonnull __file, int __line,
- const char *_Nonnull __func,
+_Noreturn void __assert(const char *_Nonnull __file, int __line, const char *_Nonnull __func,
const char *_Nonnull __expr);
#endif
diff --git a/include/bits/select.h b/include/bits/select.h
index f5b63ccc..6b0f8bb7 100644
--- a/include/bits/select.h
+++ b/include/bits/select.h
@@ -11,17 +11,14 @@
#define FD_ZERO(set) __builtin_memset((set), 0, sizeof(*(set)))
-#define FD_SET(fd, set) \
- ((set)->fds_bits[(fd) / (8 * sizeof(unsigned long))] |= \
- 1UL << ((fd) % (8 * sizeof(unsigned long))))
+#define FD_SET(fd, set) \
+ ((set)->fds_bits[(fd) / (8 * sizeof(unsigned long))] |= 1UL << ((fd) % (8 * sizeof(unsigned long))))
-#define FD_CLR(fd, set) \
- ((set)->fds_bits[(fd) / (8 * sizeof(unsigned long))] &= \
- ~(1UL << ((fd) % (8 * sizeof(unsigned long)))))
+#define FD_CLR(fd, set) \
+ ((set)->fds_bits[(fd) / (8 * sizeof(unsigned long))] &= ~(1UL << ((fd) % (8 * sizeof(unsigned long)))))
-#define FD_ISSET(fd, set) \
- ((set)->fds_bits[(fd) / (8 * sizeof(unsigned long))] & \
- (1UL << ((fd) % (8 * sizeof(unsigned long)))))
+#define FD_ISSET(fd, set) \
+ ((set)->fds_bits[(fd) / (8 * sizeof(unsigned long))] & (1UL << ((fd) % (8 * sizeof(unsigned long)))))
typedef __INT64_TYPE__ time_t;
typedef __INT64_TYPE__ suseconds_t;
diff --git a/include/endian.h b/include/endian.h
index e03bc636..c49b7dac 100644
--- a/include/endian.h
+++ b/include/endian.h
@@ -2,6 +2,7 @@
#define __ENDIAN_H
#include <stdint.h>
+
#define BYTE_ORDER __BYTE_ORDER__
#define LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__
#define BIG_ENDIAN __ORDER_BIG_ENDIAN__
diff --git a/include/ftw.h b/include/ftw.h
index 53f7379f..06463185 100644
--- a/include/ftw.h
+++ b/include/ftw.h
@@ -24,8 +24,6 @@ struct FTW {
int level;
};
-int nftw(const char *,
- int (*)(const char *, const struct stat *, int, struct FTW *), int,
- int);
+int nftw(const char *, int (*)(const char *, const struct stat *, int, struct FTW *), int, int);
#endif
diff --git a/include/glob.h b/include/glob.h
index ef253721..54ce01da 100644
--- a/include/glob.h
+++ b/include/glob.h
@@ -22,8 +22,7 @@ typedef struct {
size_t gl_offs;
} glob_t;
-int glob(const char *restrict, int, int (*)(const char *, int),
- glob_t *restrict);
+int glob(const char *restrict, int, int (*)(const char *, int), glob_t *restrict);
void globfree(glob_t *);
#endif
diff --git a/include/libintl.h b/include/libintl.h
index 837bf354..640d04fd 100644
--- a/include/libintl.h
+++ b/include/libintl.h
@@ -8,15 +8,12 @@ char *bindtextdomain(const char *, const char *);
char *bind_textdomain_codeset(const char *, const char *);
char *dcgettext(const char *, const char *, int);
char *dcgettext_l(const char *, const char *, int, locale_t);
-char *dcngettext(const char *, const char *, const char *, unsigned long int,
- int);
-char *dcngettext_l(const char *, const char *, const char *, unsigned long int,
- int, locale_t);
+char *dcngettext(const char *, const char *, const char *, unsigned long int, int);
+char *dcngettext_l(const char *, const char *, const char *, unsigned long int, int, locale_t);
char *dgettext(const char *, const char *);
char *dgettext_l(const char *, const char *, locale_t);
char *dngettext(const char *, const char *, const char *, unsigned long int);
-char *dngettext_l(const char *, const char *, const char *, unsigned long int,
- locale_t);
+char *dngettext_l(const char *, const char *, const char *, unsigned long int, locale_t);
char *gettext(const char *);
char *gettext_l(const char *, locale_t);
char *ngettext(const char *, const char *, unsigned long int);
diff --git a/include/mqueue.h b/include/mqueue.h
index 109123e4..227b8373 100644
--- a/include/mqueue.h
+++ b/include/mqueue.h
@@ -1,7 +1,9 @@
#ifndef __MQUEUE_H
#define __MQUEUE_H
+#include <stddef.h>
#include <sys/cdefs.h>
+#include <time.h>
__BEGIN_DECLS
@@ -39,10 +41,8 @@ mqd_t mq_open(const char *, int, ...);
ssize_t mq_receive(mqd_t, char *, size_t, unsigned *);
int mq_send(mqd_t, const char *, size_t, unsigned);
int mq_setattr(mqd_t, const struct mq_attr *restrict, struct mq_attr *restrict);
-ssize_t mq_timedreceive(mqd_t, char *restrict, size_t, unsigned *restrict,
- const struct timespec *restrict);
-int mq_timedsend(mqd_t, const char *, size_t, unsigned,
- const struct timespec *);
+ssize_t mq_timedreceive(mqd_t, char *restrict, size_t, unsigned *restrict, const struct timespec *restrict);
+int mq_timedsend(mqd_t, const char *, size_t, unsigned, const struct timespec *);
int mq_unlink(const char *);
__END_DECLS
diff --git a/include/netdb.h b/include/netdb.h
index 9f7c7195..cbf0cf49 100644
--- a/include/netdb.h
+++ b/include/netdb.h
@@ -79,11 +79,10 @@ void endprotoent(void);
void endservent(void);
void freeaddrinfo(struct addrinfo *);
const char *gai_strerror(int);
-int getaddrinfo(const char *restrict, const char *restrict,
- const struct addrinfo *restrict, struct addrinfo **restrict);
+int getaddrinfo(const char *restrict, const char *restrict, const struct addrinfo *restrict,
+ struct addrinfo **restrict);
struct hostent *gethostent(void);
-int getnameinfo(const struct sockaddr *restrict, socklen_t, char *restrict,
- socklen_t, char *restrict, socklen_t, int);
+int getnameinfo(const struct sockaddr *restrict, socklen_t, char *restrict, socklen_t, char *restrict, socklen_t, int);
struct netent *getnetbyaddr(uint32_t, int);
struct netent *getnetbyname(const char *);
struct netent *getnetent(void);
diff --git a/include/netinet/in.h b/include/netinet/in.h
index 368a61c1..8e7f3b03 100644
--- a/include/netinet/in.h
+++ b/include/netinet/in.h
@@ -34,45 +34,36 @@
#define IPV6_MULTICAST_IF 17
#define IPV6_UNICAST_HOPS 16
-#define IN6_IS_ADDR_UNSPECIFIED(a) \
- ((((a)->s6_addr32[0]) == 0) && (((a)->s6_addr32[1]) == 0) && \
- (((a)->s6_addr32[2]) == 0) && (((a)->s6_addr32[3]) == 0))
+#define IN6_IS_ADDR_UNSPECIFIED(a) \
+ ((((a)->s6_addr32[0]) == 0) && (((a)->s6_addr32[1]) == 0) && (((a)->s6_addr32[2]) == 0) && \
+ (((a)->s6_addr32[3]) == 0))
-#define IN6_IS_ADDR_LOOPBACK(a) \
- ((((a)->s6_addr32[0]) == 0) && (((a)->s6_addr32[1]) == 0) && \
- (((a)->s6_addr32[2]) == 0) && (((a)->s6_addr32[3]) == ntohl(1)))
+#define IN6_IS_ADDR_LOOPBACK(a) \
+ ((((a)->s6_addr32[0]) == 0) && (((a)->s6_addr32[1]) == 0) && (((a)->s6_addr32[2]) == 0) && \
+ (((a)->s6_addr32[3]) == ntohl(1)))
#define IN6_IS_ADDR_MULTICAST(a) (((uint8_t *)(a))[0] == 0xff)
-#define IN6_IS_ADDR_LINKLOCAL(a) \
- ((((uint8_t *)(a))[0]) == 0xfe && (((uint8_t *)(a))[1] & 0xc0) == 0x80)
+#define IN6_IS_ADDR_LINKLOCAL(a) ((((uint8_t *)(a))[0]) == 0xfe && (((uint8_t *)(a))[1] & 0xc0) == 0x80)
-#define IN6_IS_ADDR_SITELOCAL(a) \
- ((((uint8_t *)(a))[0]) == 0xfe && (((uint8_t *)(a))[1] & 0xc0) == 0xc0)
+#define IN6_IS_ADDR_SITELOCAL(a) ((((uint8_t *)(a))[0]) == 0xfe && (((uint8_t *)(a))[1] & 0xc0) == 0xc0)
-#define IN6_IS_ADDR_V4MAPPED(a) \
- ((((a)->s6_addr32[0]) == 0) && (((a)->s6_addr32[1]) == 0) && \
- (((a)->s6_addr32[2]) == ntohl(0x0000ffff)))
+#define IN6_IS_ADDR_V4MAPPED(a) \
+ ((((a)->s6_addr32[0]) == 0) && (((a)->s6_addr32[1]) == 0) && (((a)->s6_addr32[2]) == ntohl(0x0000ffff)))
-#define IN6_IS_ADDR_V4COMPAT(a) \
- ((((a)->s6_addr32[0]) == 0) && (((a)->s6_addr32[1]) == 0) && \
- (((a)->s6_addr32[2]) == 0) && (((a)->s6_addr32[3]) != 0) && \
- (((a)->s6_addr32[3]) != ntohl(1)))
+#define IN6_IS_ADDR_V4COMPAT(a) \
+ ((((a)->s6_addr32[0]) == 0) && (((a)->s6_addr32[1]) == 0) && (((a)->s6_addr32[2]) == 0) && \
+ (((a)->s6_addr32[3]) != 0) && (((a)->s6_addr32[3]) != ntohl(1)))
-#define IN6_IS_ADDR_MC_NODELOCAL(a) \
- (IN6_IS_ADDR_MULTICAST(a) && ((((uint8_t *)(a))[1] & 0xf) == 0x1))
+#define IN6_IS_ADDR_MC_NODELOCAL(a) (IN6_IS_ADDR_MULTICAST(a) && ((((uint8_t *)(a))[1] & 0xf) == 0x1))
-#define IN6_IS_ADDR_MC_LINKLOCAL(a) \
- (IN6_IS_ADDR_MULTICAST(a) && ((((uint8_t *)(a))[1] & 0xf) == 0x2))
+#define IN6_IS_ADDR_MC_LINKLOCAL(a) (IN6_IS_ADDR_MULTICAST(a) && ((((uint8_t *)(a))[1] & 0xf) == 0x2))
-#define IN6_IS_ADDR_MC_SITELOCAL(a) \
- (IN6_IS_ADDR_MULTICAST(a) && ((((uint8_t *)(a))[1] & 0xf) == 0x5))
+#define IN6_IS_ADDR_MC_SITELOCAL(a) (IN6_IS_ADDR_MULTICAST(a) && ((((uint8_t *)(a))[1] & 0xf) == 0x5))
-#define IN6_IS_ADDR_MC_ORGLOCAL(a) \
- (IN6_IS_ADDR_MULTICAST(a) && ((((uint8_t *)(a))[1] & 0xf) == 0x8))
+#define IN6_IS_ADDR_MC_ORGLOCAL(a) (IN6_IS_ADDR_MULTICAST(a) && ((((uint8_t *)(a))[1] & 0xf) == 0x8))
-#define IN6_IS_ADDR_MC_GLOBAL(a) \
- (IN6_IS_ADDR_MULTICAST(a) && ((((uint8_t *)(a))[1] & 0xf) == 0xe))
+#define IN6_IS_ADDR_MC_GLOBAL(a) (IN6_IS_ADDR_MULTICAST(a) && ((((uint8_t *)(a))[1] & 0xf) == 0xe))
typedef __UINT8_TYPE__ uint8_t;
typedef __UINT16_TYPE__ in_port_t;
diff --git a/include/poll.h b/include/poll.h
index 948666ba..12f666a1 100644
--- a/include/poll.h
+++ b/include/poll.h
@@ -26,7 +26,6 @@ struct pollfd {
};
int poll(struct pollfd[], nfds_t, int);
-int ppoll(struct pollfd[], nfds_t, const struct timespec *restrict,
- const sigset_t *restrict);
+int ppoll(struct pollfd[], nfds_t, const struct timespec *restrict, const sigset_t *restrict);
#endif
diff --git a/include/pthread.h b/include/pthread.h
index 5141a286..6c8ebd6e 100644
--- a/include/pthread.h
+++ b/include/pthread.h
@@ -29,89 +29,69 @@ int pthread_attr_destroy(pthread_attr_t *);
int pthread_attr_getdetachstate(const pthread_attr_t *, int *);
int pthread_attr_getguardsize(const pthread_attr_t *restrict, size_t *restrict);
int pthread_attr_getinheritsched(const pthread_attr_t *restrict, int *restrict);
-int pthread_attr_getschedparam(const pthread_attr_t *restrict,
- struct sched_param *restrict);
+int pthread_attr_getschedparam(const pthread_attr_t *restrict, struct sched_param *restrict);
int pthread_attr_getschedpolicy(const pthread_attr_t *restrict, int *restrict);
int pthread_attr_getscope(const pthread_attr_t *restrict, int *restrict);
-int pthread_attr_getstack(const pthread_attr_t *restrict, void **restrict,
- size_t *restrict);
+int pthread_attr_getstack(const pthread_attr_t *restrict, void **restrict, size_t *restrict);
int pthread_attr_getstacksize(const pthread_attr_t *restrict, size_t *restrict);
int pthread_attr_init(pthread_attr_t *);
int pthread_attr_setdetachstate(pthread_attr_t *, int);
int pthread_attr_setguardsize(pthread_attr_t *, size_t);
int pthread_attr_setinheritsched(pthread_attr_t *, int);
-int pthread_attr_setschedparam(pthread_attr_t *restrict,
- const struct sched_param *restrict);
+int pthread_attr_setschedparam(pthread_attr_t *restrict, const struct sched_param *restrict);
int pthread_attr_setschedpolicy(pthread_attr_t *, int);
int pthread_attr_setscope(pthread_attr_t *, int);
int pthread_attr_setstack(pthread_attr_t *, void *, size_t);
int pthread_attr_setstacksize(pthread_attr_t *, size_t);
int pthread_barrier_destroy(pthread_barrier_t *);
-int pthread_barrier_init(pthread_barrier_t *restrict,
- const pthread_barrierattr_t *restrict, unsigned);
+int pthread_barrier_init(pthread_barrier_t *restrict, const pthread_barrierattr_t *restrict, unsigned);
int pthread_barrier_wait(pthread_barrier_t *);
int pthread_barrierattr_destroy(pthread_barrierattr_t *);
-int pthread_barrierattr_getpshared(const pthread_barrierattr_t *restrict,
- int *restrict);
+int pthread_barrierattr_getpshared(const pthread_barrierattr_t *restrict, int *restrict);
int pthread_barrierattr_init(pthread_barrierattr_t *);
int pthread_barrierattr_setpshared(pthread_barrierattr_t *, int);
int pthread_cancel(pthread_t);
int pthread_cond_broadcast(pthread_cond_t *);
-int pthread_cond_clockwait(pthread_cond_t *restrict, pthread_mutex_t *restrict,
- clockid_t, const struct timespec *restrict);
+int pthread_cond_clockwait(pthread_cond_t *restrict, pthread_mutex_t *restrict, clockid_t,
+ const struct timespec *restrict);
int pthread_cond_destroy(pthread_cond_t *);
-int pthread_cond_init(pthread_cond_t *restrict,
- const pthread_condattr_t *restrict);
+int pthread_cond_init(pthread_cond_t *restrict, const pthread_condattr_t *restrict);
int pthread_cond_signal(pthread_cond_t *);
-int pthread_cond_timedwait(pthread_cond_t *restrict, pthread_mutex_t *restrict,
- const struct timespec *restrict);
+int pthread_cond_timedwait(pthread_cond_t *restrict, pthread_mutex_t *restrict, const struct timespec *restrict);
int pthread_cond_wait(pthread_cond_t *restrict, pthread_mutex_t *restrict);
int pthread_condattr_destroy(pthread_condattr_t *);
-int pthread_condattr_getclock(const pthread_condattr_t *restrict,
- clockid_t *restrict);
-int pthread_condattr_getpshared(const pthread_condattr_t *restrict,
- int *restrict);
+int pthread_condattr_getclock(const pthread_condattr_t *restrict, clockid_t *restrict);
+int pthread_condattr_getpshared(const pthread_condattr_t *restrict, int *restrict);
int pthread_condattr_init(pthread_condattr_t *);
int pthread_condattr_setclock(pthread_condattr_t *, clockid_t);
int pthread_condattr_setpshared(pthread_condattr_t *, int);
int pthread_condattr_setpshared(pthread_condattr_t *, int);
-int pthread_create(pthread_t *restrict, const pthread_attr_t *restrict,
- void *(*)(void *), void *restrict);
+int pthread_create(pthread_t *restrict, const pthread_attr_t *restrict, void *(*)(void *), void *restrict);
int pthread_detach(pthread_t);
int pthread_equal(pthread_t, pthread_t);
_Noreturn void pthread_exit(void *);
int pthread_getcpuclockid(pthread_t, clockid_t *);
-int pthread_getschedparam(pthread_t, int *restrict,
- struct sched_param *restrict);
+int pthread_getschedparam(pthread_t, int *restrict, struct sched_param *restrict);
void *pthread_getspecific(pthread_key_t);
int pthread_join(pthread_t, void **);
int pthread_key_create(pthread_key_t *, void (*)(void *));
int pthread_key_delete(pthread_key_t);
-int pthread_mutex_clocklock(pthread_mutex_t *restrict, clockid_t,
- const struct timespec *restrict);
+int pthread_mutex_clocklock(pthread_mutex_t *restrict, clockid_t, const struct timespec *restrict);
int pthread_mutex_consistent(pthread_mutex_t *);
int pthread_mutex_destroy(pthread_mutex_t *);
-int pthread_mutex_getprioceiling(const pthread_mutex_t *restrict,
- int *restrict);
-int pthread_mutex_init(pthread_mutex_t *restrict,
- const pthread_mutexattr_t *restrict);
+int pthread_mutex_getprioceiling(const pthread_mutex_t *restrict, int *restrict);
+int pthread_mutex_init(pthread_mutex_t *restrict, const pthread_mutexattr_t *restrict);
int pthread_mutex_lock(pthread_mutex_t *);
int pthread_mutex_setprioceiling(pthread_mutex_t *restrict, int, int *restrict);
-int pthread_mutex_timedlock(pthread_mutex_t *restrict,
- const struct timespec *restrict);
+int pthread_mutex_timedlock(pthread_mutex_t *restrict, const struct timespec *restrict);
int pthread_mutex_trylock(pthread_mutex_t *);
int pthread_mutex_unlock(pthread_mutex_t *);
int pthread_mutexattr_destroy(pthread_mutexattr_t *);
-int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t *restrict,
- int *restrict);
-int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *restrict,
- int *restrict);
-int pthread_mutexattr_getpshared(const pthread_mutexattr_t *restrict,
- int *restrict);
-int pthread_mutexattr_getrobust(const pthread_mutexattr_t *restrict,
- int *restrict);
-int pthread_mutexattr_gettype(const pthread_mutexattr_t *restrict,
- int *restrict);
+int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t *restrict, int *restrict);
+int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *restrict, int *restrict);
+int pthread_mutexattr_getpshared(const pthread_mutexattr_t *restrict, int *restrict);
+int pthread_mutexattr_getrobust(const pthread_mutexattr_t *restrict, int *restrict);
+int pthread_mutexattr_gettype(const pthread_mutexattr_t *restrict, int *restrict);
int pthread_mutexattr_init(pthread_mutexattr_t *);
int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *, int);
int pthread_mutexattr_setprotocol(pthread_mutexattr_t *, int);
@@ -120,24 +100,18 @@ int pthread_mutexattr_setrobust(pthread_mutexattr_t *, int);
int pthread_mutexattr_settype(pthread_mutexattr_t *, int);
int pthread_once(pthread_once_t *, void (*)(void));
int pthread_rwlock_destroy(pthread_rwlock_t *);
-int pthread_rwlock_init(pthread_rwlock_t *restrict,
- const pthread_rwlockattr_t *restrict);
-int pthread_rwlock_clockrdlock(pthread_rwlock_t *restrict, clockid_t,
- const struct timespec *restrict);
-int pthread_rwlock_clockwrlock(pthread_rwlock_t *restrict, clockid_t,
- const struct timespec *restrict);
+int pthread_rwlock_init(pthread_rwlock_t *restrict, const pthread_rwlockattr_t *restrict);
+int pthread_rwlock_clockrdlock(pthread_rwlock_t *restrict, clockid_t, const struct timespec *restrict);
+int pthread_rwlock_clockwrlock(pthread_rwlock_t *restrict, clockid_t, const struct timespec *restrict);
int pthread_rwlock_rdlock(pthread_rwlock_t *);
-int pthread_rwlock_timedrdlock(pthread_rwlock_t *restrict,
- const struct timespec *restrict);
-int pthread_rwlock_timedwrlock(pthread_rwlock_t *restrict,
- const struct timespec *restrict);
+int pthread_rwlock_timedrdlock(pthread_rwlock_t *restrict, const struct timespec *restrict);
+int pthread_rwlock_timedwrlock(pthread_rwlock_t *restrict, const struct timespec *restrict);
int pthread_rwlock_tryrdlock(pthread_rwlock_t *);
int pthread_rwlock_trywrlock(pthread_rwlock_t *);
int pthread_rwlock_unlock(pthread_rwlock_t *);
int pthread_rwlock_wrlock(pthread_rwlock_t *);
int pthread_rwlockattr_destroy(pthread_rwlockattr_t *);
-int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *restrict,
- int *restrict);
+int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *restrict, int *restrict);
int pthread_rwlockattr_init(pthread_rwlockattr_t *);
int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int);
pthread_t pthread_self(void);
diff --git a/include/sched.h b/include/sched.h
index a0bd5af7..34b3a00d 100644
--- a/include/sched.h
+++ b/include/sched.h
@@ -2,6 +2,7 @@
#define __SCHED_H
#include <sys/cdefs.h>
+#include <time.h>
#define __BITS_TIMESPEC_H_
#include <bits/timespec.h>
diff --git a/include/signal.h b/include/signal.h
index 1760ef4a..65ddb2dd 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -120,8 +120,7 @@ int pthread_kill(pthread_t, int);
int pthread_sigmask(int, const sigset_t *restrict, sigset_t *restrict);
int raise(int);
int sig2str(int, char *);
-int sigaction(int, const struct sigaction *restrict,
- struct sigaction *restrict);
+int sigaction(int, const struct sigaction *restrict, struct sigaction *restrict);
int sigaddset(sigset_t *, int);
int sigaltstack(const stack_t *restrict, stack_t *restrict);
int sigdelset(sigset_t *, int);
@@ -133,8 +132,7 @@ int sigpending(sigset_t *);
int sigprocmask(int, const sigset_t *restrict, sigset_t *restrict);
int sigqueue(pid_t, int, union sigval);
int sigsuspend(const sigset_t *);
-int sigtimedwait(const sigset_t *restrict, siginfo_t *restrict,
- const struct timespec *restrict);
+int sigtimedwait(const sigset_t *restrict, siginfo_t *restrict, const struct timespec *restrict);
int sigwait(const sigset_t *restrict, int *restrict);
int sigwaitinfo(const sigset_t *restrict, siginfo_t *restrict);
int str2sig(const char *restrict, int *restrict);
diff --git a/include/stdatomic.h b/include/stdatomic.h
index d487464e..3c697af4 100644
--- a/include/stdatomic.h
+++ b/include/stdatomic.h
@@ -1,6 +1,7 @@
#ifndef __STDATOMIC_H
#define __STDATOMIC_H
+#include <stdatomic.h>
#define atomic_bool _Atomic _Bool
#define atomic_char _Atomic char
#define atomic_schar _Atomic signed char
diff --git a/include/stdlib.h b/include/stdlib.h
index a75dbb43..2491a2ea 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -47,8 +47,7 @@ double atof(const char *);
int atoi(const char *);
long atol(const char *);
long long atoll(const char *);
-void *bsearch(const void *, const void *, size_t, size_t,
- int (*)(const void *, const void *));
+void *bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *));
void *calloc(size_t, size_t);
div_t div(int, int);
double drand48(void);
@@ -81,8 +80,7 @@ int ptsname_r(int, char *, size_t);
int putenv(char *);
void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
_Noreturn void quick_exit(int);
-void qsort_r(void *, size_t, size_t,
- int (*)(const void *, const void *, void *), void *);
+void qsort_r(void *, size_t, size_t, int (*)(const void *, const void *, void *), void *);
int rand(void);
long random(void);
void *realloc(void *, size_t);
diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h
index bbb12fb2..50fe0c19 100644
--- a/include/sys/cdefs.h
+++ b/include/sys/cdefs.h
@@ -20,11 +20,32 @@
#define __malloc __attribute__((__malloc__))
#define __pure __attribute__((__pure__))
#define __nodiscard __attribute__((__warn_unused_result__))
-#define __weak __attribute__((__weak__))
-#define __naked __attribute__((__naked__))
-#define __const __attribute__((__const__))
+#undef __weak
+#define __weak __attribute__((__weak__))
+#define __naked __attribute__((__naked__))
+#define __const __attribute__((__const__))
#define __predict_true(exp) __builtin_expect((exp) != 0, 1)
#define __predict_false(exp) __builtin_expect((exp) != 0, 0)
+#define __INT128_TYPE__ __int128
+#define __UINT128_TYPE__ unsigned __INT128_TYPE__
+
+typedef __INT8_TYPE__ i8;
+typedef __INT16_TYPE__ i16;
+typedef __INT32_TYPE__ i32;
+typedef __INT64_TYPE__ i64;
+typedef __INT128_TYPE__ i128;
+
+typedef __UINT8_TYPE__ u8;
+typedef __UINT16_TYPE__ u16;
+typedef __UINT32_TYPE__ u32;
+typedef __UINT64_TYPE__ u64;
+typedef __UINT128_TYPE__ u128;
+
+typedef _Float16 f16;
+typedef float f32;
+typedef double f64;
+typedef __float128 f128;
+
#endif
diff --git a/include/sys/inotify.h b/include/sys/inotify.h
index b7a59853..0a8ed1cd 100644
--- a/include/sys/inotify.h
+++ b/include/sys/inotify.h
@@ -1,6 +1,7 @@
#ifndef __SYS_INOTIFY_H
#define __SYS_INOTIFY_H
+#include <stdint.h>
typedef __UINT32_TYPE__ uint32_t;
#define IN_ACCESS 0x00000001
diff --git a/include/sys/mount.h b/include/sys/mount.h
index 66207be3..1864e0ef 100644
--- a/include/sys/mount.h
+++ b/include/sys/mount.h
@@ -1,8 +1,7 @@
#ifndef __SYS_MOUNT_H
#define __SYS_MOUNT_H
-int mount(const char *, const char *, const char *, unsigned long,
- const void *);
+int mount(const char *, const char *, const char *, unsigned long, const void *);
int umount(const char *);
int umount2(const char *, int);
diff --git a/include/sys/select.h b/include/sys/select.h
index 9c1edcae..1c3b3d53 100644
--- a/include/sys/select.h
+++ b/include/sys/select.h
@@ -10,9 +10,8 @@ struct timespec;
typedef __UINT64_TYPE__ sigset_t;
-int pselect(int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
- const struct timespec *restrict, const sigset_t *restrict);
-int select(int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
- struct timeval *restrict);
+int pselect(int, fd_set *restrict, fd_set *restrict, fd_set *restrict, const struct timespec *restrict,
+ const sigset_t *restrict);
+int select(int, fd_set *restrict, fd_set *restrict, fd_set *restrict, struct timeval *restrict);
#endif
diff --git a/include/sys/socket.h b/include/sys/socket.h
index 0dd4f454..ca3553ae 100644
--- a/include/sys/socket.h
+++ b/include/sys/socket.h
@@ -6,22 +6,18 @@
#define CMSG_DATA(cmsg) ((void *)(cmsg) + sizeof(struct cmsghdr))
-#define CMSG_NXTHDR(mhdr, cmsg) \
- ((cmsg)->cmsg_len < sizeof(struct cmsghdr) || \
- (((cmsg)->cmsg_len + sizeof(long) - 1) & \
- ~(long)(sizeof(long) - 1)) + \
- sizeof(struct cmsghdr) >= \
- ((unsigned char *)(mhdr)->msg_control + \
- (mhdr)->msg_controllen) - \
- (unsigned char *)(cmsg) ? \
- 0 : \
- (struct cmsghdr *)((unsigned char *)(cmsg) + \
- __CMSG_LEN(cmsg)))
-
-#define CMSG_FIRSTHDR(mhdr) \
- ((size_t)(mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \
- (struct cmsghdr *)(mhdr)->msg_control : \
- (struct cmsghdr *)0)
+#define CMSG_NXTHDR(mhdr, cmsg) \
+ ((cmsg)->cmsg_len < sizeof(struct cmsghdr) || \
+ (((cmsg)->cmsg_len + sizeof(long) - 1) & ~(long)(sizeof(long) - 1)) + \
+ sizeof(struct cmsghdr) >= \
+ ((unsigned char *)(mhdr)->msg_control + (mhdr)->msg_controllen) - \
+ (unsigned char *)(cmsg) ? \
+ 0 : \
+ (struct cmsghdr *)((unsigned char *)(cmsg) + __CMSG_LEN(cmsg)))
+
+#define CMSG_FIRSTHDR(mhdr) \
+ ((size_t)(mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? (struct cmsghdr *)(mhdr)->msg_control : \
+ (struct cmsghdr *)0)
#define CMSG_SPACE(len) (CMSG_ALIGN(len) + CMSG_ALIGN(sizeof(struct cmsghdr)))
@@ -127,13 +123,11 @@ int getsockname(int, struct sockaddr *restrict, socklen_t *restrict);
int getsockopt(int, int, int, void *restrict, socklen_t *restrict);
int listen(int, int);
ssize_t recv(int, void *, size_t, int);
-ssize_t recvfrom(int, void *restrict, size_t, int, struct sockaddr *restrict,
- socklen_t *restrict);
+ssize_t recvfrom(int, void *restrict, size_t, int, struct sockaddr *restrict, socklen_t *restrict);
ssize_t recvmsg(int, struct msghdr *, int);
ssize_t send(int, const void *, size_t, int);
ssize_t sendmsg(int, const struct msghdr *, int);
-ssize_t sendto(int, const void *, size_t, int, const struct sockaddr *,
- socklen_t);
+ssize_t sendto(int, const void *, size_t, int, const struct sockaddr *, socklen_t);
int setsockopt(int, int, int, const void *, socklen_t);
int shutdown(int, int);
int sockatmark(int);
diff --git a/include/sys/time.h b/include/sys/time.h
index 0746f411..6940b0d7 100644
--- a/include/sys/time.h
+++ b/include/sys/time.h
@@ -6,8 +6,7 @@
struct timezone;
-int select(int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
- struct timeval *restrict);
+int select(int, fd_set *restrict, fd_set *restrict, fd_set *restrict, struct timeval *restrict);
int gettimeofday(struct timeval *, struct timezone *);
char *strtotimeval(const char *, struct timeval *);
int utimes(const char *, const struct timeval[2]);
diff --git a/include/time.h b/include/time.h
index e297ff59..8daf2c32 100644
--- a/include/time.h
+++ b/include/time.h
@@ -73,18 +73,15 @@ struct tm *localtime(const time_t *);
struct tm *localtime_r(const time_t *restrict, struct tm *restrict);
time_t mktime(struct tm *);
int nanosleep(const struct timespec *, struct timespec *);
-size_t strftime(char *restrict, size_t, const char *restrict,
- const struct tm *restrict);
-size_t strftime_l(char *restrict, size_t, const char *restrict,
- const struct tm *restrict, locale_t);
+size_t strftime(char *restrict, size_t, const char *restrict, const struct tm *restrict);
+size_t strftime_l(char *restrict, size_t, const char *restrict, const struct tm *restrict, locale_t);
char *strptime(const char *restrict, const char *restrict, struct tm *restrict);
time_t time(time_t *);
int timer_create(clockid_t, struct sigevent *restrict, timer_t *restrict);
int timer_delete(timer_t);
int timer_getoverrun(timer_t);
int timer_gettime(timer_t, struct itimerspec *);
-int timer_settime(timer_t, int, const struct itimerspec *restrict,
- struct itimerspec *restrict);
+int timer_settime(timer_t, int, const struct itimerspec *restrict, struct itimerspec *restrict);
int timespec_get(struct timespec *, int);
void tzset(void);
diff --git a/lib/libc/aio/aio.c b/lib/libc/aio/aio.c
index 0ca2ec64..204f2296 100644
--- a/lib/libc/aio/aio.c
+++ b/lib/libc/aio/aio.c
@@ -1,10 +1,14 @@
-#include <__aio.h>
-#include <io_uring.h>
-#include <signal.h>
-#include <stdint.h>
-#include <string.h>
-#include <sys/mman.h>
-#include <unistd.h>
+#include "aio.h" // for aiocb
+#include "linux/io_uring.h" // for io_uring_sqe, io_uring_cqe, io_uring_sqe...
+#include "stddef.h" // for NULL
+
+#include <__aio.h> // for aio_request, aio_context, lio_group, AIO...
+#include <aio.h> // for sigevent
+#include <io_uring.h> // for __io_uring, io_uring, io_uring_cq, io_ur...
+#include <signal.h> // for kill, SIGEV_SIGNAL, SIGEV_THREAD
+#include <stdint.h> // for uint64_t
+#include <string.h> // for memset
+#include <unistd.h> // for getpid, write
struct aio_context __aio_context = { 0 };
@@ -103,8 +107,7 @@ void __aio_poll(void)
unsigned tail = *__io_uring.cq.tail;
while (head != tail) {
- struct io_uring_cqe *cqe =
- &__io_uring.cq.cqes[head & *__io_uring.cq.ring_mask];
+ struct io_uring_cqe *cqe = &__io_uring.cq.cqes[head & *__io_uring.cq.ring_mask];
struct aio_request *req = (struct aio_request *)cqe->user_data;
diff --git a/lib/libc/aio/aio_cancel.c b/lib/libc/aio/aio_cancel.c
index b4d373bf..5bb340db 100644
--- a/lib/libc/aio/aio_cancel.c
+++ b/lib/libc/aio/aio_cancel.c
@@ -1,11 +1,14 @@
-#include <__aio.h>
-#include <errno.h>
-#include <io_uring.h>
-#include <stddef.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/cdefs.h>
+#include "aio.h" // for AIO_ALLDONE, AIO_CANCELED, aio_cancel
+#include "linux/io_uring.h" // for io_uring_sqe, IORING_ENTER_GETEVENTS
+
+#include <__aio.h> // for __aio_lookup, __aio_remove, AIO_REQUEST_...
+#include <errno.h> // for EINVAL, errno
+#include <io_uring.h> // for __io_uring, io_uring, io_uring_sq, IO_UR...
+#include <stddef.h> // for NULL
+#include <stdint.h> // for uint64_t
+#include <stdlib.h> // for free
+#include <string.h> // for memset
+#include <sys/cdefs.h> // for __unused
int aio_cancel(int __unused fildes, struct aiocb *aiocbp)
{
diff --git a/lib/libc/aio/aio_error.c b/lib/libc/aio/aio_error.c
index 27c7f134..9f7d05ca 100644
--- a/lib/libc/aio/aio_error.c
+++ b/lib/libc/aio/aio_error.c
@@ -1,6 +1,8 @@
-#include <__aio.h>
-#include <errno.h>
-#include <stddef.h>
+#include "aio.h" // for aio_error, aiocb (ptr only)
+
+#include <__aio.h> // for aio_request, __aio_lookup, AIO_REQUEST_STATUS_PE...
+#include <errno.h> // for EINVAL, errno, EINPROGRESS
+#include <stddef.h> // for NULL
int aio_error(const struct aiocb *aiocbp)
{
diff --git a/lib/libc/aio/aio_fsync.c b/lib/libc/aio/aio_fsync.c
index 00d56b42..2b06ba8f 100644
--- a/lib/libc/aio/aio_fsync.c
+++ b/lib/libc/aio/aio_fsync.c
@@ -1,8 +1,10 @@
-#include <__aio.h>
-#include <aio.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <io_uring.h>
+#include "linux/io_uring.h" // for io_uring_op, IORING_FSYNC_DATASYNC
+#include "stddef.h" // for NULL
+
+#include <__aio.h> // for __aio_lookup, __aio_request
+#include <aio.h> // for aio_fsync
+#include <errno.h> // for EINVAL, errno
+#include <fcntl.h> // for O_DSYNC
int aio_fsync(int op, struct aiocb *aiocbp)
{
diff --git a/lib/libc/aio/aio_read.c b/lib/libc/aio/aio_read.c
index 286b2d02..150f8b0e 100644
--- a/lib/libc/aio/aio_read.c
+++ b/lib/libc/aio/aio_read.c
@@ -1,7 +1,9 @@
-#include <__aio.h>
-#include <aio.h>
-#include <io_uring.h>
-#include <stdlib.h>
+#include "linux/io_uring.h" // for io_uring_op
+#include "stddef.h" // for NULL
+
+#include <__aio.h> // for __aio_request, aio_request
+#include <aio.h> // for aio_read
+#include <stdlib.h> // for malloc
int aio_read(struct aiocb *aiocbp)
{
diff --git a/lib/libc/aio/aio_return.c b/lib/libc/aio/aio_return.c
index 45b0d795..a19d355a 100644
--- a/lib/libc/aio/aio_return.c
+++ b/lib/libc/aio/aio_return.c
@@ -1,7 +1,9 @@
-#include <__aio.h>
-#include <errno.h>
-#include <stddef.h>
-#include <stdlib.h>
+#include "aio.h" // for ssize_t, aio_return, aiocb (ptr only)
+
+#include <__aio.h> // for __aio_remove, aio_request, AIO_REQUEST_STATUS_PE...
+#include <errno.h> // for EINVAL, errno
+#include <stddef.h> // for NULL
+#include <stdlib.h> // for free
ssize_t aio_return(struct aiocb *aiocbp)
{
diff --git a/lib/libc/aio/aio_suspend.c b/lib/libc/aio/aio_suspend.c
index 939b9d6b..89afe9fd 100644
--- a/lib/libc/aio/aio_suspend.c
+++ b/lib/libc/aio/aio_suspend.c
@@ -1,14 +1,16 @@
-#include <__aio.h>
-#include <aio.h>
-#include <errno.h>
-#include <io_uring.h>
-#include <poll.h>
-#include <stdint.h>
+#include "linux/io_uring.h" // for IORING_ENTER_GETEVENTS
+#include "stddef.h" // for NULL
+
+#include <__aio.h> // for __aio_lookup, __aio_poll, AIO_REQUEST_ST...
+#include <aio.h> // for timespec, aio_suspend
+#include <errno.h> // for errno, EAGAIN, EINVAL
+#include <io_uring.h> // for __io_uring, io_uring, io_uring_enter
+#include <poll.h> // for pollfd, poll, POLLIN
+#include <stdint.h> // for uint64_t
#include <time.h>
-#include <unistd.h>
+#include <unistd.h> // for read
-int aio_suspend(const struct aiocb *const list[], int nent,
- const struct timespec *timeout)
+int aio_suspend(const struct aiocb *const list[], int nent, const struct timespec *timeout)
{
struct pollfd pfd;
struct aio_request *req;
@@ -32,8 +34,7 @@ int aio_suspend(const struct aiocb *const list[], int nent,
pfd.events = POLLIN;
if (timeout) {
- timeout_ms = timeout->tv_sec * 1000 +
- timeout->tv_nsec / 1000000;
+ timeout_ms = timeout->tv_sec * 1000 + timeout->tv_nsec / 1000000;
} else {
timeout_ms = -1;
}
@@ -51,7 +52,6 @@ int aio_suspend(const struct aiocb *const list[], int nent,
uint64_t val;
read(__io_uring.eventfd, &val, sizeof(val));
- io_uring_enter(__io_uring.fd, 0, 0, IORING_ENTER_GETEVENTS,
- NULL, 0);
+ io_uring_enter(__io_uring.fd, 0, 0, IORING_ENTER_GETEVENTS, NULL, 0);
}
}
diff --git a/lib/libc/aio/aio_write.c b/lib/libc/aio/aio_write.c
index 4254fdcd..9315296e 100644
--- a/lib/libc/aio/aio_write.c
+++ b/lib/libc/aio/aio_write.c
@@ -1,7 +1,9 @@
-#include <__aio.h>
-#include <aio.h>
-#include <io_uring.h>
-#include <stdlib.h>
+#include "linux/io_uring.h" // for io_uring_op
+#include "stddef.h" // for NULL
+
+#include <__aio.h> // for __aio_request, aio_request
+#include <aio.h> // for aio_write
+#include <stdlib.h> // for malloc
int aio_write(struct aiocb *aiocbp)
{
diff --git a/lib/libc/aio/lio_listio.c b/lib/libc/aio/lio_listio.c
index 0a345c16..3011268e 100644
--- a/lib/libc/aio/lio_listio.c
+++ b/lib/libc/aio/lio_listio.c
@@ -1,15 +1,14 @@
-#include <__aio.h>
-#include <aio.h>
-#include <errno.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/eventfd.h>
-#include <unistd.h>
-#include <stdint.h>
+#include <__aio.h> // for lio_group, __aio_lookup, aio_request
+#include <aio.h> // for LIO_NOWAIT, aio_read, aio_write, LIO_NOP
+#include <errno.h> // for errno, EINVAL, EIO
+#include <stddef.h> // for NULL
+#include <stdint.h> // for uint64_t
+#include <stdlib.h> // for malloc
+#include <string.h> // for memset
+#include <sys/eventfd.h> // for eventfd, EFD_CLOEXEC
+#include <unistd.h> // for read
-int lio_listio(int mode, struct aiocb *restrict const list[restrict], int nent,
- struct sigevent *restrict sig)
+int lio_listio(int mode, struct aiocb *restrict const list[restrict], int nent, struct sigevent *restrict sig)
{
struct lio_group *grp = NULL;
diff --git a/lib/libc/assert/assert.c b/lib/libc/assert/assert.c
index 367f5421..f0af5354 100644
--- a/lib/libc/assert/assert.c
+++ b/lib/libc/assert/assert.c
@@ -2,11 +2,9 @@
#include <stdio.h> // for fprintf, stderr
#include <stdlib.h> // for abort
-_Noreturn void __assert(const char *_Nonnull __file, int __line,
- const char *_Nonnull __func,
+_Noreturn void __assert(const char *_Nonnull __file, int __line, const char *_Nonnull __func,
const char *_Nonnull __expr)
{
- fprintf(stderr, "%s:%d: %s: assertion \"%s\" failed\n", __file, __line,
- __func, __expr);
+ fprintf(stderr, "%s:%d: %s: assertion \"%s\" failed\n", __file, __line, __func, __expr);
abort();
}
diff --git a/lib/libc/ctype/isalnum.c b/lib/libc/ctype/isalnum.c
index 9548071d..fb10e351 100644
--- a/lib/libc/ctype/isalnum.c
+++ b/lib/libc/ctype/isalnum.c
@@ -1,5 +1,5 @@
-#include <ctype.h>
-#include <sys/cdefs.h>
+#include <ctype.h> // for isalpha, isdigit, isalnum, isalnum_l, locale_t
+#include <sys/cdefs.h> // for __unused, __weak
int isalnum(int c)
{
diff --git a/lib/libc/devctl/posix_devctl.c b/lib/libc/devctl/posix_devctl.c
index 01af3111..c60b984e 100644
--- a/lib/libc/devctl/posix_devctl.c
+++ b/lib/libc/devctl/posix_devctl.c
@@ -1,5 +1,6 @@
#include <devctl.h>
#include <errno.h>
+#include <stddef.h>
#include <sys/cdefs.h>
#include <syscall.h>
diff --git a/lib/libc/errno/errno.c b/lib/libc/errno/errno.c
index 08d5dd83..29a65057 100644
--- a/lib/libc/errno/errno.c
+++ b/lib/libc/errno/errno.c
@@ -1,5 +1,4 @@
#include <__thread.h>
-#include <libc.h>
#include <threads.h>
diff --git a/lib/libc/grp/getgrgid_r.c b/lib/libc/grp/getgrgid_r.c
index 13884fd5..67d3bd10 100644
--- a/lib/libc/grp/getgrgid_r.c
+++ b/lib/libc/grp/getgrgid_r.c
@@ -8,8 +8,7 @@
#include <string.h> // for strtok, memcpy, strlen
#include <sys/types.h> // for gid_t, size_t
-int getgrgid_r(gid_t gid, struct group *grp, char *buf, size_t buflen,
- struct group **result)
+int getgrgid_r(gid_t gid, struct group *grp, char *buf, size_t buflen, struct group **result)
{
FILE *f = fopen("/etc/group", "r");
if (!f) {
diff --git a/lib/libc/internal/arch/x86_64/longjmp.c b/lib/libc/internal/arch/x86_64/longjmp.c
index dbd18632..672b2177 100644
--- a/lib/libc/internal/arch/x86_64/longjmp.c
+++ b/lib/libc/internal/arch/x86_64/longjmp.c
@@ -2,8 +2,7 @@
#include <setjmp.h> // for longjmp
-__attribute__((noreturn, naked, returns_twice)) void longjmp(jmp_buf env,
- int val)
+__attribute__((noreturn, naked, returns_twice)) void longjmp(jmp_buf env, int val)
{
__asm__ __volatile__("mov 0(%rdi), %rbx\n"
"mov 8(%rdi), %rbp\n"
diff --git a/lib/libc/internal/deinit/tls.c b/lib/libc/internal/deinit/tls.c
index 0eb78aeb..9e0af1b4 100644
--- a/lib/libc/internal/deinit/tls.c
+++ b/lib/libc/internal/deinit/tls.c
@@ -1,3 +1,5 @@
+#include "stddef.h"
+#include "sys/cdefs.h"
#include <libc.h>
#include <sys/mman.h>
diff --git a/lib/libc/internal/include/__signal.h b/lib/libc/internal/include/__signal.h
index 6b762dee..f5d32e3c 100644
--- a/lib/libc/internal/include/__signal.h
+++ b/lib/libc/internal/include/__signal.h
@@ -1,12 +1,10 @@
#ifndef __LIBC_SIGNAL_H
#define __LIBC_SIGNAL_H
-static const char *__sys_signame[] = {
- "SIGHUP", "SIGINT", "SIGQUIT", "SIGILL", "SIGTRAP", "SIGABRT",
- "SIGBUS", "SIGFPE", "SIGKILL", "SIGUSR1", "SIGSEGV", "SIGUSR2",
- "SIGPIPE", "SIGALRM", "SIGTERM", "SIGCHLD", "SIGCONT", "SIGSTOP",
- "SIGTSTP", "SIGTTIN", "SIGTTOU", "SIGURG", "SIGXCPU", "SIGXFSZ",
- "SIGVTALRM", "SIGPROF", "SIGWINCH", "SIGIO", "SIGSYS"
-};
+static const char *__sys_signame[] = { "SIGHUP", "SIGINT", "SIGQUIT", "SIGILL", "SIGTRAP", "SIGABRT",
+ "SIGBUS", "SIGFPE", "SIGKILL", "SIGUSR1", "SIGSEGV", "SIGUSR2",
+ "SIGPIPE", "SIGALRM", "SIGTERM", "SIGCHLD", "SIGCONT", "SIGSTOP",
+ "SIGTSTP", "SIGTTIN", "SIGTTOU", "SIGURG", "SIGXCPU", "SIGXFSZ",
+ "SIGVTALRM", "SIGPROF", "SIGWINCH", "SIGIO", "SIGSYS" };
#endif
diff --git a/lib/libc/internal/include/__thread.h b/lib/libc/internal/include/__thread.h
index 3c68f8dd..1bdd42c2 100644
--- a/lib/libc/internal/include/__thread.h
+++ b/lib/libc/internal/include/__thread.h
@@ -1,7 +1,6 @@
#ifndef __LIBC_THREAD_H
#define __LIBC_THREAD_H
-#include <stdatomic.h>
#include <stddef.h>
#include <stdint.h>
diff --git a/lib/libc/internal/include/atomic.h b/lib/libc/internal/include/atomic.h
index d40c1eae..c935535c 100644
--- a/lib/libc/internal/include/atomic.h
+++ b/lib/libc/internal/include/atomic.h
@@ -4,7 +4,6 @@
#include <libc/futex.h>
#include <sched.h>
#include <stdatomic.h>
-#include <unistd.h>
#define LIBC_LOCK(__lock) __libc_lock(&((__lock)))
#define LIBC_UNLOCK(__lock) __libc_unlock(&((__lock)))
diff --git a/lib/libc/internal/include/io_uring.h b/lib/libc/internal/include/io_uring.h
index 4dac4583..cd53941d 100644
--- a/lib/libc/internal/include/io_uring.h
+++ b/lib/libc/internal/include/io_uring.h
@@ -3,6 +3,7 @@
#include <linux/io_uring.h>
#include <signal.h>
+#include <stddef.h>
#define IO_URING_ENTRIES 256
@@ -47,7 +48,6 @@ int io_uring_setup(unsigned int, struct io_uring_params *);
int io_uring_register(unsigned int, unsigned int, void *, unsigned int);
-int io_uring_enter(unsigned int, unsigned int, unsigned int, unsigned int,
- sigset_t *, size_t);
+int io_uring_enter(unsigned int, unsigned int, unsigned int, unsigned int, sigset_t *, size_t);
#endif
diff --git a/lib/libc/internal/include/malloc.h b/lib/libc/internal/include/malloc.h
index b7cb0093..98361ebd 100644
--- a/lib/libc/internal/include/malloc.h
+++ b/lib/libc/internal/include/malloc.h
@@ -45,54 +45,35 @@ extern struct page *__malloc_pvec;
#define LARGE_PAGE_SIZE (1 << LARGE_PAGE_SIZE_SHIFT)
#define LARGE_PAGE_MASK (~((uintptr_t)LARGE_PAGE_SIZE - 1))
-#define SMALL_CLASS(n) \
- { (((n)) * 16), (SMALL_PAGE_SIZE - sizeof(struct page)) / (((n)) * 16) }
-#define MEDIUM_CLASS(n) \
- { (((n)) * 16), \
- (MEDIUM_PAGE_SIZE - sizeof(struct page)) / (((n)) * 16) }
-#define LARGE_CLASS(n) \
- { (((n)) * 16), (LARGE_PAGE_SIZE - sizeof(struct page)) / (((n)) * 16) }
+#define SMALL_CLASS(n) { (((n)) * 16), (SMALL_PAGE_SIZE - sizeof(struct page)) / (((n)) * 16) }
+#define MEDIUM_CLASS(n) { (((n)) * 16), (MEDIUM_PAGE_SIZE - sizeof(struct page)) / (((n)) * 16) }
+#define LARGE_CLASS(n) { (((n)) * 16), (LARGE_PAGE_SIZE - sizeof(struct page)) / (((n)) * 16) }
static const struct class global_size_class[] = {
- SMALL_CLASS(1), SMALL_CLASS(1), SMALL_CLASS(2),
- SMALL_CLASS(3), SMALL_CLASS(4), SMALL_CLASS(5),
- SMALL_CLASS(6), SMALL_CLASS(7), SMALL_CLASS(8),
- SMALL_CLASS(9), SMALL_CLASS(10), SMALL_CLASS(11),
- SMALL_CLASS(12), SMALL_CLASS(13), SMALL_CLASS(14),
- SMALL_CLASS(15), SMALL_CLASS(16), SMALL_CLASS(17),
- SMALL_CLASS(18), SMALL_CLASS(19), SMALL_CLASS(20),
- SMALL_CLASS(21), SMALL_CLASS(22), SMALL_CLASS(23),
- SMALL_CLASS(24), SMALL_CLASS(25), SMALL_CLASS(26),
- SMALL_CLASS(27), SMALL_CLASS(28), SMALL_CLASS(29),
- SMALL_CLASS(30), SMALL_CLASS(31), SMALL_CLASS(32),
- SMALL_CLASS(33), SMALL_CLASS(34), SMALL_CLASS(35),
- SMALL_CLASS(36), SMALL_CLASS(37), SMALL_CLASS(38),
- SMALL_CLASS(39), SMALL_CLASS(40), SMALL_CLASS(41),
- SMALL_CLASS(42), SMALL_CLASS(43), SMALL_CLASS(44),
- SMALL_CLASS(45), SMALL_CLASS(46), SMALL_CLASS(47),
- SMALL_CLASS(48), SMALL_CLASS(49), SMALL_CLASS(50),
- SMALL_CLASS(51), SMALL_CLASS(52), SMALL_CLASS(53),
- SMALL_CLASS(54), SMALL_CLASS(55), SMALL_CLASS(56),
- SMALL_CLASS(57), SMALL_CLASS(58), SMALL_CLASS(59),
- SMALL_CLASS(60), SMALL_CLASS(61), SMALL_CLASS(62),
- SMALL_CLASS(63), SMALL_CLASS(64), SMALL_CLASS(80),
- SMALL_CLASS(96), SMALL_CLASS(112), SMALL_CLASS(128),
- SMALL_CLASS(160), SMALL_CLASS(192), SMALL_CLASS(224),
- SMALL_CLASS(256), MEDIUM_CLASS(320), MEDIUM_CLASS(384),
- MEDIUM_CLASS(448), MEDIUM_CLASS(512), MEDIUM_CLASS(640),
- MEDIUM_CLASS(768), MEDIUM_CLASS(896), MEDIUM_CLASS(1024),
- MEDIUM_CLASS(1280), MEDIUM_CLASS(1536), MEDIUM_CLASS(1792),
- MEDIUM_CLASS(2048), MEDIUM_CLASS(2560), MEDIUM_CLASS(3072),
- MEDIUM_CLASS(3584), MEDIUM_CLASS(4096), MEDIUM_CLASS(5120),
- MEDIUM_CLASS(6144), MEDIUM_CLASS(7168), MEDIUM_CLASS(8192),
- MEDIUM_CLASS(10240), MEDIUM_CLASS(12288), MEDIUM_CLASS(14336),
- MEDIUM_CLASS(16384), LARGE_CLASS(20480), LARGE_CLASS(24576),
- LARGE_CLASS(28672), LARGE_CLASS(32768), LARGE_CLASS(40960),
- LARGE_CLASS(49152), LARGE_CLASS(57344), LARGE_CLASS(65536),
- LARGE_CLASS(81920), LARGE_CLASS(98304), LARGE_CLASS(114688),
- LARGE_CLASS(131072), LARGE_CLASS(163840), LARGE_CLASS(196608),
- LARGE_CLASS(229376), LARGE_CLASS(262144), LARGE_CLASS(327680),
- LARGE_CLASS(393216), LARGE_CLASS(458752), LARGE_CLASS(524288)
+ SMALL_CLASS(1), SMALL_CLASS(1), SMALL_CLASS(2), SMALL_CLASS(3), SMALL_CLASS(4),
+ SMALL_CLASS(5), SMALL_CLASS(6), SMALL_CLASS(7), SMALL_CLASS(8), SMALL_CLASS(9),
+ SMALL_CLASS(10), SMALL_CLASS(11), SMALL_CLASS(12), SMALL_CLASS(13), SMALL_CLASS(14),
+ SMALL_CLASS(15), SMALL_CLASS(16), SMALL_CLASS(17), SMALL_CLASS(18), SMALL_CLASS(19),
+ SMALL_CLASS(20), SMALL_CLASS(21), SMALL_CLASS(22), SMALL_CLASS(23), SMALL_CLASS(24),
+ SMALL_CLASS(25), SMALL_CLASS(26), SMALL_CLASS(27), SMALL_CLASS(28), SMALL_CLASS(29),
+ SMALL_CLASS(30), SMALL_CLASS(31), SMALL_CLASS(32), SMALL_CLASS(33), SMALL_CLASS(34),
+ SMALL_CLASS(35), SMALL_CLASS(36), SMALL_CLASS(37), SMALL_CLASS(38), SMALL_CLASS(39),
+ SMALL_CLASS(40), SMALL_CLASS(41), SMALL_CLASS(42), SMALL_CLASS(43), SMALL_CLASS(44),
+ SMALL_CLASS(45), SMALL_CLASS(46), SMALL_CLASS(47), SMALL_CLASS(48), SMALL_CLASS(49),
+ SMALL_CLASS(50), SMALL_CLASS(51), SMALL_CLASS(52), SMALL_CLASS(53), SMALL_CLASS(54),
+ SMALL_CLASS(55), SMALL_CLASS(56), SMALL_CLASS(57), SMALL_CLASS(58), SMALL_CLASS(59),
+ SMALL_CLASS(60), SMALL_CLASS(61), SMALL_CLASS(62), SMALL_CLASS(63), SMALL_CLASS(64),
+ SMALL_CLASS(80), SMALL_CLASS(96), SMALL_CLASS(112), SMALL_CLASS(128), SMALL_CLASS(160),
+ SMALL_CLASS(192), SMALL_CLASS(224), SMALL_CLASS(256), MEDIUM_CLASS(320), MEDIUM_CLASS(384),
+ MEDIUM_CLASS(448), MEDIUM_CLASS(512), MEDIUM_CLASS(640), MEDIUM_CLASS(768), MEDIUM_CLASS(896),
+ MEDIUM_CLASS(1024), MEDIUM_CLASS(1280), MEDIUM_CLASS(1536), MEDIUM_CLASS(1792), MEDIUM_CLASS(2048),
+ MEDIUM_CLASS(2560), MEDIUM_CLASS(3072), MEDIUM_CLASS(3584), MEDIUM_CLASS(4096), MEDIUM_CLASS(5120),
+ MEDIUM_CLASS(6144), MEDIUM_CLASS(7168), MEDIUM_CLASS(8192), MEDIUM_CLASS(10240), MEDIUM_CLASS(12288),
+ MEDIUM_CLASS(14336), MEDIUM_CLASS(16384), LARGE_CLASS(20480), LARGE_CLASS(24576), LARGE_CLASS(28672),
+ LARGE_CLASS(32768), LARGE_CLASS(40960), LARGE_CLASS(49152), LARGE_CLASS(57344), LARGE_CLASS(65536),
+ LARGE_CLASS(81920), LARGE_CLASS(98304), LARGE_CLASS(114688), LARGE_CLASS(131072), LARGE_CLASS(163840),
+ LARGE_CLASS(196608), LARGE_CLASS(229376), LARGE_CLASS(262144), LARGE_CLASS(327680), LARGE_CLASS(393216),
+ LARGE_CLASS(458752), LARGE_CLASS(524288)
};
#endif
diff --git a/lib/libc/internal/init/init.c b/lib/libc/internal/init/init.c
index 62678dce..85d4d8f0 100644
--- a/lib/libc/internal/init/init.c
+++ b/lib/libc/internal/init/init.c
@@ -2,6 +2,7 @@
#include <libc.h>
#include <stddef.h>
#include <stdint.h>
+#include <stdio.h>
#include <stdlib.h>
#include <sys/cdefs.h>
diff --git a/lib/libc/internal/init/io.c b/lib/libc/internal/init/io.c
index 4790af89..2bf58a9a 100644
--- a/lib/libc/internal/init/io.c
+++ b/lib/libc/internal/init/io.c
@@ -1,7 +1,9 @@
-#include <atomic.h>
+#include "__stdio.h"
+#include "stddef.h"
#include <fcntl.h>
#include <libc.h>
#include <stdio.h>
+#include <string.h>
#include <unistd.h>
struct __FILE *const stdout = (struct __FILE *)&__libc.stdout;
diff --git a/lib/libc/internal/init/tls.c b/lib/libc/internal/init/tls.c
index 302edd9d..e23efc0d 100644
--- a/lib/libc/internal/init/tls.c
+++ b/lib/libc/internal/init/tls.c
@@ -1,7 +1,8 @@
+#include "stddef.h"
#include <__thread.h>
-#include <asm/prctl.h>
#include <elf.h>
#include <libc.h>
+#include <stdint.h>
#include <string.h>
#include <sys/mman.h>
#include <syscall.h>
diff --git a/lib/libc/internal/init/vdso.c b/lib/libc/internal/init/vdso.c
index 73bfb46b..660bb74a 100644
--- a/lib/libc/internal/init/vdso.c
+++ b/lib/libc/internal/init/vdso.c
@@ -1,7 +1,9 @@
+#include "stddef.h"
#include <asm/vdso.h>
#include <elf.h>
#include <string.h>
#include <sys/auxv.h>
+#include <time.h>
int (*__vdso_clock_gettime)(int, struct timespec *) = 0;
int (*__vdso_getcpu)(unsigned *, unsigned *, void *) = 0;
diff --git a/lib/libc/inttypes/strtoimax.c b/lib/libc/inttypes/strtoimax.c
index a8f0820b..ac1847b1 100644
--- a/lib/libc/inttypes/strtoimax.c
+++ b/lib/libc/inttypes/strtoimax.c
@@ -75,8 +75,7 @@ intmax_t strtoimax(const char *nptr, char **endptr, int base)
if (c == '+')
c = *s++;
}
- if ((base == 0 || base == 16) && c == '0' && (*s == 'x' || *s == 'X') &&
- isxdigit((unsigned char)s[1])) {
+ if ((base == 0 || base == 16) && c == '0' && (*s == 'x' || *s == 'X') && isxdigit((unsigned char)s[1])) {
c = s[1];
s += 2;
base = 16;
diff --git a/lib/libc/poll/ppoll.c b/lib/libc/poll/ppoll.c
index 902ae5c5..dd62efd2 100644
--- a/lib/libc/poll/ppoll.c
+++ b/lib/libc/poll/ppoll.c
@@ -7,9 +7,7 @@
struct timespec;
-int ppoll(struct pollfd fds[], nfds_t nfds,
- const struct timespec *restrict timeout,
- const sigset_t *restrict sigmask)
+int ppoll(struct pollfd fds[], nfds_t nfds, const struct timespec *restrict timeout, const sigset_t *restrict sigmask)
{
return syscall(ppoll, fds, nfds, timeout, sigmask, 8);
}
diff --git a/lib/libc/pwd/getgrgid_r.c b/lib/libc/pwd/getgrgid_r.c
index 2f9c1952..0aec3e08 100644
--- a/lib/libc/pwd/getgrgid_r.c
+++ b/lib/libc/pwd/getgrgid_r.c
@@ -20,8 +20,7 @@ static char *copy_str(const char *src, char **buf, size_t *buflen)
return dst;
}
-int getpwuid_r(uid_t uid, struct passwd *pwd, char *buf, size_t buflen,
- struct passwd **result)
+int getpwuid_r(uid_t uid, struct passwd *pwd, char *buf, size_t buflen, struct passwd **result)
{
FILE *stream = fopen("/etc/passwd", "r");
if (stream == NULL) {
@@ -40,8 +39,7 @@ int getpwuid_r(uid_t uid, struct passwd *pwd, char *buf, size_t buflen,
char *dir = strtok(NULL, ":");
char *shell = strtok(NULL, "\n");
- if (name == NULL || passwd == NULL || uid_str == NULL ||
- gid_str == NULL)
+ if (name == NULL || passwd == NULL || uid_str == NULL || gid_str == NULL)
continue;
uid_t file_uid = (uid_t)strtoul(uid_str, NULL, 10);
@@ -58,8 +56,7 @@ int getpwuid_r(uid_t uid, struct passwd *pwd, char *buf, size_t buflen,
pwd->pw_uid = file_uid;
pwd->pw_gid = (gid_t)strtoul(gid_str, NULL, 10);
- if (pwd->pw_name == NULL || pwd->pw_dir == NULL ||
- pwd->pw_shell == NULL) {
+ if (pwd->pw_name == NULL || pwd->pw_dir == NULL || pwd->pw_shell == NULL) {
fclose(stream);
return ERANGE;
}
diff --git a/lib/libc/sched/sched_rr_get_interval.c b/lib/libc/sched/sched_rr_get_interval.c
index a99f2a3d..b63e0a06 100644
--- a/lib/libc/sched/sched_rr_get_interval.c
+++ b/lib/libc/sched/sched_rr_get_interval.c
@@ -1,5 +1,6 @@
#include <sched.h>
#include <syscall.h>
+#include <time.h>
int sched_rr_get_interval(pid_t pid, struct timespec *tp)
{
diff --git a/lib/libc/select/pselect.c b/lib/libc/select/pselect.c
index 7ac84ad5..b9d3858f 100644
--- a/lib/libc/select/pselect.c
+++ b/lib/libc/select/pselect.c
@@ -7,9 +7,8 @@
struct timespec;
-int pselect(int nfds, fd_set *restrict readfds, fd_set *restrict writefds,
- fd_set *restrict errorfds, const struct timespec *restrict timeout,
- const sigset_t *restrict sigmask)
+int pselect(int nfds, fd_set *restrict readfds, fd_set *restrict writefds, fd_set *restrict errorfds,
+ const struct timespec *restrict timeout, const sigset_t *restrict sigmask)
{
return syscall(pselect6, nfds, readfds, writefds, errorfds, timeout,
((syscall_arg_t[]){ (uintptr_t)sigmask, 8 }));
diff --git a/lib/libc/select/select.c b/lib/libc/select/select.c
index 9a0480c9..9a506640 100644
--- a/lib/libc/select/select.c
+++ b/lib/libc/select/select.c
@@ -4,9 +4,8 @@
#include <sys/select.h> // for select
#include <syscall.h> // for __syscall_6, syscall, syscall_arg_t
-int select(int nfds, fd_set *restrict readfds, fd_set *restrict writefds,
- fd_set *restrict errorfds, struct timeval *restrict timeout)
+int select(int nfds, fd_set *restrict readfds, fd_set *restrict writefds, fd_set *restrict errorfds,
+ struct timeval *restrict timeout)
{
- return syscall(pselect6, nfds, readfds, writefds, errorfds, timeout,
- ((syscall_arg_t[]){ 0, 8 }));
+ return syscall(pselect6, nfds, readfds, writefds, errorfds, timeout, ((syscall_arg_t[]){ 0, 8 }));
}
diff --git a/lib/libc/sem/semctl.c b/lib/libc/sem/semctl.c
index 7b047b62..3ac48b97 100644
--- a/lib/libc/sem/semctl.c
+++ b/lib/libc/sem/semctl.c
@@ -1,5 +1,3 @@
-
-
#include <stdarg.h> // for va_arg, va_end, va_list, va_start
#include <stddef.h> // for NULL
#include <sys/ipc.h> // for IPC_SET, IPC_STAT
@@ -20,6 +18,8 @@ int semctl(int semid, int semnum, int cmd, ...)
va_start(ap, cmd);
buf = va_arg(ap, struct semid_ds *);
va_end(ap);
+ default:
+ break;
}
return syscall(semctl, semid, semnum, cmd, buf);
diff --git a/lib/libc/signal/psignal.c b/lib/libc/signal/psignal.c
index fdf0dc94..d8c35bbd 100644
--- a/lib/libc/signal/psignal.c
+++ b/lib/libc/signal/psignal.c
@@ -4,6 +4,5 @@
void psignal(int signum, const char *message)
{
- fprintf(stderr, "%s%s%s\n", message ? message : "", message ? ": " : "",
- strsignal(signum));
+ fprintf(stderr, "%s%s%s\n", message ? message : "", message ? ": " : "", strsignal(signum));
}
diff --git a/lib/libc/signal/pthread_sigmask.c b/lib/libc/signal/pthread_sigmask.c
index 89c4f0d3..15eacd72 100644
--- a/lib/libc/signal/pthread_sigmask.c
+++ b/lib/libc/signal/pthread_sigmask.c
@@ -3,7 +3,6 @@
#undef __ASSEMBLY__
#include <errno.h>
-#include <libc.h>
#include <stddef.h>
#include <sys/cdefs.h>
diff --git a/lib/libc/signal/sig2str.c b/lib/libc/signal/sig2str.c
index eec1c805..52bd3ec2 100644
--- a/lib/libc/signal/sig2str.c
+++ b/lib/libc/signal/sig2str.c
@@ -6,8 +6,7 @@
int sig2str(int signum, char *str)
{
if (signum >= SIGHUP && signum <= SIGSYS) {
- strlcpy(str, __sys_signame[signum - SIGHUP],
- sizeof(__sys_signame[signum - SIGHUP]));
+ strlcpy(str, __sys_signame[signum - SIGHUP], sizeof(__sys_signame[signum - SIGHUP]));
return 0;
}
@@ -23,11 +22,9 @@ int sig2str(int signum, char *str)
if (signum > SIGRTMIN && signum < SIGRTMAX) {
if (signum - SIGRTMIN <= SIGRTMAX - signum) {
- snprintf(str, sizeof("RTMIN+") + 1, "RTMIN+%d",
- signum - SIGRTMIN);
+ snprintf(str, sizeof("RTMIN+") + 1, "RTMIN+%d", signum - SIGRTMIN);
} else {
- snprintf(str, sizeof("RTMAX-") + 1, "RTMAX-%d",
- SIGRTMAX - signum);
+ snprintf(str, sizeof("RTMAX-") + 1, "RTMAX-%d", SIGRTMAX - signum);
}
return 0;
}
diff --git a/lib/libc/signal/sigabbrev.h b/lib/libc/signal/sigabbrev.h
index 4ed6d7d3..b289fa97 100644
--- a/lib/libc/signal/sigabbrev.h
+++ b/lib/libc/signal/sigabbrev.h
@@ -1,9 +1,8 @@
#include <signal.h>
const char *const sys_sigabbrev[64] = {
- [SIGABRT] = "ABRT", [SIGALRM] = "ALRM", [SIGBUS] = "BUS",
- [SIGCHLD] = "CHLD", [SIGFPE] = "FPE", [SIGHUP] = "HUP",
- [SIGILL] = "ILL", [SIGINT] = "INT", [SIGIO] = "IO",
+ [SIGABRT] = "ABRT", [SIGALRM] = "ALRM", [SIGBUS] = "BUS", [SIGCHLD] = "CHLD", [SIGFPE] = "FPE",
+ [SIGHUP] = "HUP", [SIGILL] = "ILL", [SIGINT] = "INT", [SIGIO] = "IO",
#if defined(SIGIOT) && (SIGIOT != SIGABRT)
[SIGIOT] = "IOT",
#endif
@@ -11,11 +10,8 @@ const char *const sys_sigabbrev[64] = {
#if defined(SIGPOLL) && (SIGPOLL != SIGIO)
[SIGPOLL] = "POLL",
#endif
- [SIGPROF] = "PROF", [SIGPWR] = "PWR", [SIGQUIT] = "QUIT",
- [SIGSEGV] = "SEGV", [SIGSTKFLT] = "STKFLT", [SIGSTOP] = "STOP",
- [SIGSYS] = "SYS", [SIGTERM] = "TERM", [SIGTSTP] = "TSTP",
- [SIGTTIN] = "TTIN", [SIGTTOU] = "TTOU", [SIGURG] = "URG",
- [SIGUSR1] = "USR1", [SIGUSR2] = "USR2", [SIGVTALRM] = "VTALRM",
- [SIGWINCH] = "WINCH", [SIGXCPU] = "XCPU", [SIGXFSZ] = "XFSZ",
- [SIGCONT] = "CONT", [SIGTRAP] = "TRAP",
+ [SIGPROF] = "PROF", [SIGPWR] = "PWR", [SIGQUIT] = "QUIT", [SIGSEGV] = "SEGV", [SIGSTKFLT] = "STKFLT",
+ [SIGSTOP] = "STOP", [SIGSYS] = "SYS", [SIGTERM] = "TERM", [SIGTSTP] = "TSTP", [SIGTTIN] = "TTIN",
+ [SIGTTOU] = "TTOU", [SIGURG] = "URG", [SIGUSR1] = "USR1", [SIGUSR2] = "USR2", [SIGVTALRM] = "VTALRM",
+ [SIGWINCH] = "WINCH", [SIGXCPU] = "XCPU", [SIGXFSZ] = "XFSZ", [SIGCONT] = "CONT", [SIGTRAP] = "TRAP",
};
diff --git a/lib/libc/signal/sigaction.c b/lib/libc/signal/sigaction.c
index 95f485d3..23231899 100644
--- a/lib/libc/signal/sigaction.c
+++ b/lib/libc/signal/sigaction.c
@@ -3,8 +3,7 @@
#include <signal.h> // for sigaction, sigset_t
#include <syscall.h> // for __syscall_4, syscall
-int sigaction(int sig, const struct sigaction *restrict act,
- struct sigaction *restrict oact)
+int sigaction(int sig, const struct sigaction *restrict act, struct sigaction *restrict oact)
{
return syscall(rt_sigaction, sig, act, oact, sizeof(sigset_t));
}
diff --git a/lib/libc/signal/sigtimedwait.c b/lib/libc/signal/sigtimedwait.c
index e33743d9..0be3c712 100644
--- a/lib/libc/signal/sigtimedwait.c
+++ b/lib/libc/signal/sigtimedwait.c
@@ -8,8 +8,7 @@ struct timespec;
#define _NSIG 64
-int sigtimedwait(const sigset_t *restrict set, siginfo_t *restrict info,
- const struct timespec *restrict timeout)
+int sigtimedwait(const sigset_t *restrict set, siginfo_t *restrict info, const struct timespec *restrict timeout)
{
return syscall(rt_sigtimedwait, set, info, timeout, _NSIG / 8);
}
diff --git a/lib/libc/socket/accept.c b/lib/libc/socket/accept.c
index af897d3c..aeb43619 100644
--- a/lib/libc/socket/accept.c
+++ b/lib/libc/socket/accept.c
@@ -3,8 +3,7 @@
#include <sys/socket.h> // for accept, socklen_t
#include <syscall.h> // for __syscall_3, syscall
-int accept(int socket, struct sockaddr *restrict address,
- socklen_t *restrict address_len)
+int accept(int socket, struct sockaddr *restrict address, socklen_t *restrict address_len)
{
return syscall(accept, socket, address, address_len);
}
diff --git a/lib/libc/socket/accept4.c b/lib/libc/socket/accept4.c
index 80b05488..25c28c0e 100644
--- a/lib/libc/socket/accept4.c
+++ b/lib/libc/socket/accept4.c
@@ -3,8 +3,7 @@
#include <sys/socket.h> // for accept4, socklen_t
#include <syscall.h> // for __syscall_4, syscall
-int accept4(int socket, struct sockaddr *restrict address,
- socklen_t *restrict address_len, int flag)
+int accept4(int socket, struct sockaddr *restrict address, socklen_t *restrict address_len, int flag)
{
return syscall(accept4, socket, address, address_len, flag);
}
diff --git a/lib/libc/socket/getpeername.c b/lib/libc/socket/getpeername.c
index ed5361b0..36cd852b 100644
--- a/lib/libc/socket/getpeername.c
+++ b/lib/libc/socket/getpeername.c
@@ -3,8 +3,7 @@
#include <sys/socket.h> // for getpeername, socklen_t
#include <syscall.h> // for __syscall_3, syscall
-int getpeername(int socket, struct sockaddr *restrict address,
- socklen_t *restrict address_len)
+int getpeername(int socket, struct sockaddr *restrict address, socklen_t *restrict address_len)
{
return syscall(getpeername, socket, address, address_len);
}
diff --git a/lib/libc/socket/getsockname.c b/lib/libc/socket/getsockname.c
index 3da117cc..c7775b6b 100644
--- a/lib/libc/socket/getsockname.c
+++ b/lib/libc/socket/getsockname.c
@@ -3,8 +3,7 @@
#include <sys/socket.h> // for getsockname, socklen_t
#include <syscall.h> // for __syscall_3, syscall
-int getsockname(int socket, struct sockaddr *restrict address,
- socklen_t *restrict address_len)
+int getsockname(int socket, struct sockaddr *restrict address, socklen_t *restrict address_len)
{
return syscall(getsockname, socket, address, address_len);
}
diff --git a/lib/libc/socket/getsockopt.c b/lib/libc/socket/getsockopt.c
index c2c5f0eb..0e1fc571 100644
--- a/lib/libc/socket/getsockopt.c
+++ b/lib/libc/socket/getsockopt.c
@@ -3,9 +3,7 @@
#include <sys/socket.h> // for getsockopt, socklen_t
#include <syscall.h> // for __syscall_5, syscall
-int getsockopt(int socket, int level, int option_name,
- void *restrict option_value, socklen_t *restrict option_len)
+int getsockopt(int socket, int level, int option_name, void *restrict option_value, socklen_t *restrict option_len)
{
- return syscall(getsockopt, socket, level, option_name, option_value,
- option_len);
+ return syscall(getsockopt, socket, level, option_name, option_value, option_len);
}
diff --git a/lib/libc/socket/recvfrom.c b/lib/libc/socket/recvfrom.c
index d8aff7e1..ed07623e 100644
--- a/lib/libc/socket/recvfrom.c
+++ b/lib/libc/socket/recvfrom.c
@@ -5,10 +5,8 @@
#include <sys/types.h> // for size_t, ssize_t
#include <syscall.h> // for __syscall_6, syscall
-ssize_t recvfrom(int socket, void *restrict buffer, size_t length, int flags,
- struct sockaddr *restrict address,
+ssize_t recvfrom(int socket, void *restrict buffer, size_t length, int flags, struct sockaddr *restrict address,
socklen_t *restrict address_len)
{
- return syscall(recvfrom, socket, buffer, length, flags, address,
- address_len);
+ return syscall(recvfrom, socket, buffer, length, flags, address, address_len);
}
diff --git a/lib/libc/socket/sendto.c b/lib/libc/socket/sendto.c
index 6dc4cc66..6c81d8a8 100644
--- a/lib/libc/socket/sendto.c
+++ b/lib/libc/socket/sendto.c
@@ -5,9 +5,8 @@
#include <sys/types.h> // for size_t, ssize_t
#include <syscall.h> // for __syscall_6, syscall
-ssize_t sendto(int socket, const void *message, size_t length, int flags,
- const struct sockaddr *dest_addr, socklen_t dest_len)
+ssize_t sendto(int socket, const void *message, size_t length, int flags, const struct sockaddr *dest_addr,
+ socklen_t dest_len)
{
- return syscall(sendto, socket, message, length, flags, dest_addr,
- dest_len);
+ return syscall(sendto, socket, message, length, flags, dest_addr, dest_len);
}
diff --git a/lib/libc/socket/setsockopt.c b/lib/libc/socket/setsockopt.c
index 1a2531a6..1292e335 100644
--- a/lib/libc/socket/setsockopt.c
+++ b/lib/libc/socket/setsockopt.c
@@ -3,9 +3,7 @@
#include <sys/socket.h> // for setsockopt, socklen_t
#include <syscall.h> // for __syscall_5, syscall
-int setsockopt(int socket, int level, int option_name, const void *option_value,
- socklen_t option_len)
+int setsockopt(int socket, int level, int option_name, const void *option_value, socklen_t option_len)
{
- return syscall(setsockopt, socket, level, option_name, option_value,
- option_len);
+ return syscall(setsockopt, socket, level, option_name, option_value, option_len);
}
diff --git a/lib/libc/stat/fstatat.c b/lib/libc/stat/fstatat.c
index 746848b7..ed3c0272 100644
--- a/lib/libc/stat/fstatat.c
+++ b/lib/libc/stat/fstatat.c
@@ -6,13 +6,11 @@
#include <bits/stat.h> // for stat
#include <syscall.h> // for __syscall_5, syscall
-#define makedev(major, minor) \
- ((((major) & 0xfffff000ULL) << 32) | \
- (((major) & 0x00000fffULL) << 8) | \
- (((minor) & 0xffffff00ULL) << 12) | (((minor) & 0x000000ffULL)))
+#define makedev(major, minor) \
+ ((((major) & 0xfffff000ULL) << 32) | (((major) & 0x00000fffULL) << 8) | (((minor) & 0xffffff00ULL) << 12) | \
+ (((minor) & 0x000000ffULL)))
-int fstatat(int fd, const char *restrict path, struct stat *restrict buf,
- int flag)
+int fstatat(int fd, const char *restrict path, struct stat *restrict buf, int flag)
{
int ret;
struct statx stx = { 0 };
@@ -21,15 +19,13 @@ int fstatat(int fd, const char *restrict path, struct stat *restrict buf,
if (ret == 0) {
if (stx.stx_mask & STATX_BASIC_STATS) {
- buf->st_dev =
- makedev(stx.stx_dev_major, stx.stx_dev_minor);
+ buf->st_dev = makedev(stx.stx_dev_major, stx.stx_dev_minor);
buf->st_ino = stx.stx_ino;
buf->st_mode = stx.stx_mode;
buf->st_nlink = stx.stx_nlink;
buf->st_uid = stx.stx_uid;
buf->st_gid = stx.stx_gid;
- buf->st_rdev =
- makedev(stx.stx_rdev_major, stx.stx_rdev_minor);
+ buf->st_rdev = makedev(stx.stx_rdev_major, stx.stx_rdev_minor);
buf->st_size = stx.stx_size;
buf->st_atim.tv_sec = stx.stx_atime.tv_sec;
buf->st_atim.tv_nsec = stx.stx_atime.tv_nsec;
diff --git a/lib/libc/stat/utimensat.c b/lib/libc/stat/utimensat.c
index aba18657..941eaa74 100644
--- a/lib/libc/stat/utimensat.c
+++ b/lib/libc/stat/utimensat.c
@@ -3,8 +3,7 @@
#include <syscall.h> // for __syscall_4, syscall
#include <time.h> // for timespec
-int utimensat(int fd, const char *path, const struct timespec times[2],
- int flag)
+int utimensat(int fd, const char *path, const struct timespec times[2], int flag)
{
return syscall(utimensat, fd, path, times, flag);
}
diff --git a/lib/libc/stdio/clearerr.c b/lib/libc/stdio/clearerr.c
index 8389a085..83884f12 100644
--- a/lib/libc/stdio/clearerr.c
+++ b/lib/libc/stdio/clearerr.c
@@ -1,4 +1,3 @@
-#include <__stdio.h>
#include <stdio.h>
void clearerr(FILE *stream)
diff --git a/lib/libc/stdio/clearerr_unlocked.c b/lib/libc/stdio/clearerr_unlocked.c
index da4ea106..c6e48c3b 100644
--- a/lib/libc/stdio/clearerr_unlocked.c
+++ b/lib/libc/stdio/clearerr_unlocked.c
@@ -1,3 +1,4 @@
+#include "stddef.h"
#include <__stdio.h>
#include <stdio.h>
diff --git a/lib/libc/stdio/dtoa.c b/lib/libc/stdio/dtoa.c
index 0322162b..5c978383 100644
--- a/lib/libc/stdio/dtoa.c
+++ b/lib/libc/stdio/dtoa.c
@@ -397,870 +397,457 @@ int dtoa_divmax = 2; /* Permit experimenting: on some systems, 64-bit integer */
/* dtoa_divmax <= 27.*/
#endif
-typedef struct BF96 { /* Normalized 96-bit software floating point numbers */
+typedef struct BF96 { /* Normalized 96-bit software floating point numbers */
unsigned int b0, b1, b2; /* b0 = most significant, binary point just to
its left */
- int e; /* number represented = b * 2^e, with .5 <= b < 1 */
+ int e; /* number represented = b * 2^e, with .5 <= b < 1 */
} BF96;
-static BF96 pten[667] = { { 0xeef453d6, 0x923bd65a, 0x113faa29, -1136 },
- { 0x9558b466, 0x1b6565f8, 0x4ac7ca59, -1132 },
- { 0xbaaee17f, 0xa23ebf76, 0x5d79bcf0, -1129 },
- { 0xe95a99df, 0x8ace6f53, 0xf4d82c2c, -1126 },
- { 0x91d8a02b, 0xb6c10594, 0x79071b9b, -1122 },
- { 0xb64ec836, 0xa47146f9, 0x9748e282, -1119 },
- { 0xe3e27a44, 0x4d8d98b7, 0xfd1b1b23, -1116 },
- { 0x8e6d8c6a, 0xb0787f72, 0xfe30f0f5, -1112 },
- { 0xb208ef85, 0x5c969f4f, 0xbdbd2d33, -1109 },
- { 0xde8b2b66, 0xb3bc4723, 0xad2c7880, -1106 },
- { 0x8b16fb20, 0x3055ac76, 0x4c3bcb50, -1102 },
- { 0xaddcb9e8, 0x3c6b1793, 0xdf4abe24, -1099 },
- { 0xd953e862, 0x4b85dd78, 0xd71d6dad, -1096 },
- { 0x87d4713d, 0x6f33aa6b, 0x8672648c, -1092 },
- { 0xa9c98d8c, 0xcb009506, 0x680efdaf, -1089 },
- { 0xd43bf0ef, 0xfdc0ba48, 0x0212bd1b, -1086 },
- { 0x84a57695, 0xfe98746d, 0x014bb630, -1082 },
- { 0xa5ced43b, 0x7e3e9188, 0x419ea3bd, -1079 },
- { 0xcf42894a, 0x5dce35ea, 0x52064cac, -1076 },
- { 0x818995ce, 0x7aa0e1b2, 0x7343efeb, -1072 },
- { 0xa1ebfb42, 0x19491a1f, 0x1014ebe6, -1069 },
- { 0xca66fa12, 0x9f9b60a6, 0xd41a26e0, -1066 },
- { 0xfd00b897, 0x478238d0, 0x8920b098, -1063 },
- { 0x9e20735e, 0x8cb16382, 0x55b46e5f, -1059 },
- { 0xc5a89036, 0x2fddbc62, 0xeb2189f7, -1056 },
- { 0xf712b443, 0xbbd52b7b, 0xa5e9ec75, -1053 },
- { 0x9a6bb0aa, 0x55653b2d, 0x47b233c9, -1049 },
- { 0xc1069cd4, 0xeabe89f8, 0x999ec0bb, -1046 },
- { 0xf148440a, 0x256e2c76, 0xc00670ea, -1043 },
- { 0x96cd2a86, 0x5764dbca, 0x38040692, -1039 },
- { 0xbc807527, 0xed3e12bc, 0xc6050837, -1036 },
- { 0xeba09271, 0xe88d976b, 0xf7864a44, -1033 },
- { 0x93445b87, 0x31587ea3, 0x7ab3ee6a, -1029 },
- { 0xb8157268, 0xfdae9e4c, 0x5960ea05, -1026 },
- { 0xe61acf03, 0x3d1a45df, 0x6fb92487, -1023 },
- { 0x8fd0c162, 0x06306bab, 0xa5d3b6d4, -1019 },
- { 0xb3c4f1ba, 0x87bc8696, 0x8f48a489, -1016 },
- { 0xe0b62e29, 0x29aba83c, 0x331acdab, -1013 },
- { 0x8c71dcd9, 0xba0b4925, 0x9ff0c08b, -1009 },
- { 0xaf8e5410, 0x288e1b6f, 0x07ecf0ae, -1006 },
- { 0xdb71e914, 0x32b1a24a, 0xc9e82cd9, -1003 },
- { 0x892731ac, 0x9faf056e, 0xbe311c08, -999 },
- { 0xab70fe17, 0xc79ac6ca, 0x6dbd630a, -996 },
- { 0xd64d3d9d, 0xb981787d, 0x092cbbcc, -993 },
- { 0x85f04682, 0x93f0eb4e, 0x25bbf560, -989 },
- { 0xa76c5823, 0x38ed2621, 0xaf2af2b8, -986 },
- { 0xd1476e2c, 0x07286faa, 0x1af5af66, -983 },
- { 0x82cca4db, 0x847945ca, 0x50d98d9f, -979 },
- { 0xa37fce12, 0x6597973c, 0xe50ff107, -976 },
- { 0xcc5fc196, 0xfefd7d0c, 0x1e53ed49, -973 },
- { 0xff77b1fc, 0xbebcdc4f, 0x25e8e89c, -970 },
- { 0x9faacf3d, 0xf73609b1, 0x77b19161, -966 },
- { 0xc795830d, 0x75038c1d, 0xd59df5b9, -963 },
- { 0xf97ae3d0, 0xd2446f25, 0x4b057328, -960 },
- { 0x9becce62, 0x836ac577, 0x4ee367f9, -956 },
- { 0xc2e801fb, 0x244576d5, 0x229c41f7, -953 },
- { 0xf3a20279, 0xed56d48a, 0x6b435275, -950 },
- { 0x9845418c, 0x345644d6, 0x830a1389, -946 },
- { 0xbe5691ef, 0x416bd60c, 0x23cc986b, -943 },
- { 0xedec366b, 0x11c6cb8f, 0x2cbfbe86, -940 },
- { 0x94b3a202, 0xeb1c3f39, 0x7bf7d714, -936 },
- { 0xb9e08a83, 0xa5e34f07, 0xdaf5ccd9, -933 },
- { 0xe858ad24, 0x8f5c22c9, 0xd1b3400f, -930 },
- { 0x91376c36, 0xd99995be, 0x23100809, -926 },
- { 0xb5854744, 0x8ffffb2d, 0xabd40a0c, -923 },
- { 0xe2e69915, 0xb3fff9f9, 0x16c90c8f, -920 },
- { 0x8dd01fad, 0x907ffc3b, 0xae3da7d9, -916 },
- { 0xb1442798, 0xf49ffb4a, 0x99cd11cf, -913 },
- { 0xdd95317f, 0x31c7fa1d, 0x40405643, -910 },
- { 0x8a7d3eef, 0x7f1cfc52, 0x482835ea, -906 },
- { 0xad1c8eab, 0x5ee43b66, 0xda324365, -903 },
- { 0xd863b256, 0x369d4a40, 0x90bed43e, -900 },
- { 0x873e4f75, 0xe2224e68, 0x5a7744a6, -896 },
- { 0xa90de353, 0x5aaae202, 0x711515d0, -893 },
- { 0xd3515c28, 0x31559a83, 0x0d5a5b44, -890 },
- { 0x8412d999, 0x1ed58091, 0xe858790a, -886 },
- { 0xa5178fff, 0x668ae0b6, 0x626e974d, -883 },
- { 0xce5d73ff, 0x402d98e3, 0xfb0a3d21, -880 },
- { 0x80fa687f, 0x881c7f8e, 0x7ce66634, -876 },
- { 0xa139029f, 0x6a239f72, 0x1c1fffc1, -873 },
- { 0xc9874347, 0x44ac874e, 0xa327ffb2, -870 },
- { 0xfbe91419, 0x15d7a922, 0x4bf1ff9f, -867 },
- { 0x9d71ac8f, 0xada6c9b5, 0x6f773fc3, -863 },
- { 0xc4ce17b3, 0x99107c22, 0xcb550fb4, -860 },
- { 0xf6019da0, 0x7f549b2b, 0x7e2a53a1, -857 },
- { 0x99c10284, 0x4f94e0fb, 0x2eda7444, -853 },
- { 0xc0314325, 0x637a1939, 0xfa911155, -850 },
- { 0xf03d93ee, 0xbc589f88, 0x793555ab, -847 },
- { 0x96267c75, 0x35b763b5, 0x4bc1558b, -843 },
- { 0xbbb01b92, 0x83253ca2, 0x9eb1aaed, -840 },
- { 0xea9c2277, 0x23ee8bcb, 0x465e15a9, -837 },
- { 0x92a1958a, 0x7675175f, 0x0bfacd89, -833 },
- { 0xb749faed, 0x14125d36, 0xcef980ec, -830 },
- { 0xe51c79a8, 0x5916f484, 0x82b7e127, -827 },
- { 0x8f31cc09, 0x37ae58d2, 0xd1b2ecb8, -823 },
- { 0xb2fe3f0b, 0x8599ef07, 0x861fa7e6, -820 },
- { 0xdfbdcece, 0x67006ac9, 0x67a791e0, -817 },
- { 0x8bd6a141, 0x006042bd, 0xe0c8bb2c, -813 },
- { 0xaecc4991, 0x4078536d, 0x58fae9f7, -810 },
- { 0xda7f5bf5, 0x90966848, 0xaf39a475, -807 },
- { 0x888f9979, 0x7a5e012d, 0x6d8406c9, -803 },
- { 0xaab37fd7, 0xd8f58178, 0xc8e5087b, -800 },
- { 0xd5605fcd, 0xcf32e1d6, 0xfb1e4a9a, -797 },
- { 0x855c3be0, 0xa17fcd26, 0x5cf2eea0, -793 },
- { 0xa6b34ad8, 0xc9dfc06f, 0xf42faa48, -790 },
- { 0xd0601d8e, 0xfc57b08b, 0xf13b94da, -787 },
- { 0x823c1279, 0x5db6ce57, 0x76c53d08, -783 },
- { 0xa2cb1717, 0xb52481ed, 0x54768c4b, -780 },
- { 0xcb7ddcdd, 0xa26da268, 0xa9942f5d, -777 },
- { 0xfe5d5415, 0x0b090b02, 0xd3f93b35, -774 },
- { 0x9efa548d, 0x26e5a6e1, 0xc47bc501, -770 },
- { 0xc6b8e9b0, 0x709f109a, 0x359ab641, -767 },
- { 0xf867241c, 0x8cc6d4c0, 0xc30163d2, -764 },
- { 0x9b407691, 0xd7fc44f8, 0x79e0de63, -760 },
- { 0xc2109436, 0x4dfb5636, 0x985915fc, -757 },
- { 0xf294b943, 0xe17a2bc4, 0x3e6f5b7b, -754 },
- { 0x979cf3ca, 0x6cec5b5a, 0xa705992c, -750 },
- { 0xbd8430bd, 0x08277231, 0x50c6ff78, -747 },
- { 0xece53cec, 0x4a314ebd, 0xa4f8bf56, -744 },
- { 0x940f4613, 0xae5ed136, 0x871b7795, -740 },
- { 0xb9131798, 0x99f68584, 0x28e2557b, -737 },
- { 0xe757dd7e, 0xc07426e5, 0x331aeada, -734 },
- { 0x9096ea6f, 0x3848984f, 0x3ff0d2c8, -730 },
- { 0xb4bca50b, 0x065abe63, 0x0fed077a, -727 },
- { 0xe1ebce4d, 0xc7f16dfb, 0xd3e84959, -724 },
- { 0x8d3360f0, 0x9cf6e4bd, 0x64712dd7, -720 },
- { 0xb080392c, 0xc4349dec, 0xbd8d794d, -717 },
- { 0xdca04777, 0xf541c567, 0xecf0d7a0, -714 },
- { 0x89e42caa, 0xf9491b60, 0xf41686c4, -710 },
- { 0xac5d37d5, 0xb79b6239, 0x311c2875, -707 },
- { 0xd77485cb, 0x25823ac7, 0x7d633293, -704 },
- { 0x86a8d39e, 0xf77164bc, 0xae5dff9c, -700 },
- { 0xa8530886, 0xb54dbdeb, 0xd9f57f83, -697 },
- { 0xd267caa8, 0x62a12d66, 0xd072df63, -694 },
- { 0x8380dea9, 0x3da4bc60, 0x4247cb9e, -690 },
- { 0xa4611653, 0x8d0deb78, 0x52d9be85, -687 },
- { 0xcd795be8, 0x70516656, 0x67902e27, -684 },
- { 0x806bd971, 0x4632dff6, 0x00ba1cd8, -680 },
- { 0xa086cfcd, 0x97bf97f3, 0x80e8a40e, -677 },
- { 0xc8a883c0, 0xfdaf7df0, 0x6122cd12, -674 },
- { 0xfad2a4b1, 0x3d1b5d6c, 0x796b8057, -671 },
- { 0x9cc3a6ee, 0xc6311a63, 0xcbe33036, -667 },
- { 0xc3f490aa, 0x77bd60fc, 0xbedbfc44, -664 },
- { 0xf4f1b4d5, 0x15acb93b, 0xee92fb55, -661 },
- { 0x99171105, 0x2d8bf3c5, 0x751bdd15, -657 },
- { 0xbf5cd546, 0x78eef0b6, 0xd262d45a, -654 },
- { 0xef340a98, 0x172aace4, 0x86fb8971, -651 },
- { 0x9580869f, 0x0e7aac0e, 0xd45d35e6, -647 },
- { 0xbae0a846, 0xd2195712, 0x89748360, -644 },
- { 0xe998d258, 0x869facd7, 0x2bd1a438, -641 },
- { 0x91ff8377, 0x5423cc06, 0x7b6306a3, -637 },
- { 0xb67f6455, 0x292cbf08, 0x1a3bc84c, -634 },
- { 0xe41f3d6a, 0x7377eeca, 0x20caba5f, -631 },
- { 0x8e938662, 0x882af53e, 0x547eb47b, -627 },
- { 0xb23867fb, 0x2a35b28d, 0xe99e619a, -624 },
- { 0xdec681f9, 0xf4c31f31, 0x6405fa00, -621 },
- { 0x8b3c113c, 0x38f9f37e, 0xde83bc40, -617 },
- { 0xae0b158b, 0x4738705e, 0x9624ab50, -614 },
- { 0xd98ddaee, 0x19068c76, 0x3badd624, -611 },
- { 0x87f8a8d4, 0xcfa417c9, 0xe54ca5d7, -607 },
- { 0xa9f6d30a, 0x038d1dbc, 0x5e9fcf4c, -604 },
- { 0xd47487cc, 0x8470652b, 0x7647c320, -601 },
- { 0x84c8d4df, 0xd2c63f3b, 0x29ecd9f4, -597 },
- { 0xa5fb0a17, 0xc777cf09, 0xf4681071, -594 },
- { 0xcf79cc9d, 0xb955c2cc, 0x7182148d, -591 },
- { 0x81ac1fe2, 0x93d599bf, 0xc6f14cd8, -587 },
- { 0xa21727db, 0x38cb002f, 0xb8ada00e, -584 },
- { 0xca9cf1d2, 0x06fdc03b, 0xa6d90811, -581 },
- { 0xfd442e46, 0x88bd304a, 0x908f4a16, -578 },
- { 0x9e4a9cec, 0x15763e2e, 0x9a598e4e, -574 },
- { 0xc5dd4427, 0x1ad3cdba, 0x40eff1e1, -571 },
- { 0xf7549530, 0xe188c128, 0xd12bee59, -568 },
- { 0x9a94dd3e, 0x8cf578b9, 0x82bb74f8, -564 },
- { 0xc13a148e, 0x3032d6e7, 0xe36a5236, -561 },
- { 0xf18899b1, 0xbc3f8ca1, 0xdc44e6c3, -558 },
- { 0x96f5600f, 0x15a7b7e5, 0x29ab103a, -554 },
- { 0xbcb2b812, 0xdb11a5de, 0x7415d448, -551 },
- { 0xebdf6617, 0x91d60f56, 0x111b495b, -548 },
- { 0x936b9fce, 0xbb25c995, 0xcab10dd9, -544 },
- { 0xb84687c2, 0x69ef3bfb, 0x3d5d514f, -541 },
- { 0xe65829b3, 0x046b0afa, 0x0cb4a5a3, -538 },
- { 0x8ff71a0f, 0xe2c2e6dc, 0x47f0e785, -534 },
- { 0xb3f4e093, 0xdb73a093, 0x59ed2167, -531 },
- { 0xe0f218b8, 0xd25088b8, 0x306869c1, -528 },
- { 0x8c974f73, 0x83725573, 0x1e414218, -524 },
- { 0xafbd2350, 0x644eeacf, 0xe5d1929e, -521 },
- { 0xdbac6c24, 0x7d62a583, 0xdf45f746, -518 },
- { 0x894bc396, 0xce5da772, 0x6b8bba8c, -514 },
- { 0xab9eb47c, 0x81f5114f, 0x066ea92f, -511 },
- { 0xd686619b, 0xa27255a2, 0xc80a537b, -508 },
- { 0x8613fd01, 0x45877585, 0xbd06742c, -504 },
- { 0xa798fc41, 0x96e952e7, 0x2c481138, -501 },
- { 0xd17f3b51, 0xfca3a7a0, 0xf75a1586, -498 },
- { 0x82ef8513, 0x3de648c4, 0x9a984d73, -494 },
- { 0xa3ab6658, 0x0d5fdaf5, 0xc13e60d0, -491 },
- { 0xcc963fee, 0x10b7d1b3, 0x318df905, -488 },
- { 0xffbbcfe9, 0x94e5c61f, 0xfdf17746, -485 },
- { 0x9fd561f1, 0xfd0f9bd3, 0xfeb6ea8b, -481 },
- { 0xc7caba6e, 0x7c5382c8, 0xfe64a52e, -478 },
- { 0xf9bd690a, 0x1b68637b, 0x3dfdce7a, -475 },
- { 0x9c1661a6, 0x51213e2d, 0x06bea10c, -471 },
- { 0xc31bfa0f, 0xe5698db8, 0x486e494f, -468 },
- { 0xf3e2f893, 0xdec3f126, 0x5a89dba3, -465 },
- { 0x986ddb5c, 0x6b3a76b7, 0xf8962946, -461 },
- { 0xbe895233, 0x86091465, 0xf6bbb397, -458 },
- { 0xee2ba6c0, 0x678b597f, 0x746aa07d, -455 },
- { 0x94db4838, 0x40b717ef, 0xa8c2a44e, -451 },
- { 0xba121a46, 0x50e4ddeb, 0x92f34d62, -448 },
- { 0xe896a0d7, 0xe51e1566, 0x77b020ba, -445 },
- { 0x915e2486, 0xef32cd60, 0x0ace1474, -441 },
- { 0xb5b5ada8, 0xaaff80b8, 0x0d819992, -438 },
- { 0xe3231912, 0xd5bf60e6, 0x10e1fff6, -435 },
- { 0x8df5efab, 0xc5979c8f, 0xca8d3ffa, -431 },
- { 0xb1736b96, 0xb6fd83b3, 0xbd308ff8, -428 },
- { 0xddd0467c, 0x64bce4a0, 0xac7cb3f6, -425 },
- { 0x8aa22c0d, 0xbef60ee4, 0x6bcdf07a, -421 },
- { 0xad4ab711, 0x2eb3929d, 0x86c16c98, -418 },
- { 0xd89d64d5, 0x7a607744, 0xe871c7bf, -415 },
- { 0x87625f05, 0x6c7c4a8b, 0x11471cd7, -411 },
- { 0xa93af6c6, 0xc79b5d2d, 0xd598e40d, -408 },
- { 0xd389b478, 0x79823479, 0x4aff1d10, -405 },
- { 0x843610cb, 0x4bf160cb, 0xcedf722a, -401 },
- { 0xa54394fe, 0x1eedb8fe, 0xc2974eb4, -398 },
- { 0xce947a3d, 0xa6a9273e, 0x733d2262, -395 },
- { 0x811ccc66, 0x8829b887, 0x0806357d, -391 },
- { 0xa163ff80, 0x2a3426a8, 0xca07c2dc, -388 },
- { 0xc9bcff60, 0x34c13052, 0xfc89b393, -385 },
- { 0xfc2c3f38, 0x41f17c67, 0xbbac2078, -382 },
- { 0x9d9ba783, 0x2936edc0, 0xd54b944b, -378 },
- { 0xc5029163, 0xf384a931, 0x0a9e795e, -375 },
- { 0xf64335bc, 0xf065d37d, 0x4d4617b5, -372 },
- { 0x99ea0196, 0x163fa42e, 0x504bced1, -368 },
- { 0xc06481fb, 0x9bcf8d39, 0xe45ec286, -365 },
- { 0xf07da27a, 0x82c37088, 0x5d767327, -362 },
- { 0x964e858c, 0x91ba2655, 0x3a6a07f8, -358 },
- { 0xbbe226ef, 0xb628afea, 0x890489f7, -355 },
- { 0xeadab0ab, 0xa3b2dbe5, 0x2b45ac74, -352 },
- { 0x92c8ae6b, 0x464fc96f, 0x3b0b8bc9, -348 },
- { 0xb77ada06, 0x17e3bbcb, 0x09ce6ebb, -345 },
- { 0xe5599087, 0x9ddcaabd, 0xcc420a6a, -342 },
- { 0x8f57fa54, 0xc2a9eab6, 0x9fa94682, -338 },
- { 0xb32df8e9, 0xf3546564, 0x47939822, -335 },
- { 0xdff97724, 0x70297ebd, 0x59787e2b, -332 },
- { 0x8bfbea76, 0xc619ef36, 0x57eb4edb, -328 },
- { 0xaefae514, 0x77a06b03, 0xede62292, -325 },
- { 0xdab99e59, 0x958885c4, 0xe95fab36, -322 },
- { 0x88b402f7, 0xfd75539b, 0x11dbcb02, -318 },
- { 0xaae103b5, 0xfcd2a881, 0xd652bdc2, -315 },
- { 0xd59944a3, 0x7c0752a2, 0x4be76d33, -312 },
- { 0x857fcae6, 0x2d8493a5, 0x6f70a440, -308 },
- { 0xa6dfbd9f, 0xb8e5b88e, 0xcb4ccd50, -305 },
- { 0xd097ad07, 0xa71f26b2, 0x7e2000a4, -302 },
- { 0x825ecc24, 0xc873782f, 0x8ed40066, -298 },
- { 0xa2f67f2d, 0xfa90563b, 0x72890080, -295 },
- { 0xcbb41ef9, 0x79346bca, 0x4f2b40a0, -292 },
- { 0xfea126b7, 0xd78186bc, 0xe2f610c8, -289 },
- { 0x9f24b832, 0xe6b0f436, 0x0dd9ca7d, -285 },
- { 0xc6ede63f, 0xa05d3143, 0x91503d1c, -282 },
- { 0xf8a95fcf, 0x88747d94, 0x75a44c63, -279 },
- { 0x9b69dbe1, 0xb548ce7c, 0xc986afbe, -275 },
- { 0xc24452da, 0x229b021b, 0xfbe85bad, -272 },
- { 0xf2d56790, 0xab41c2a2, 0xfae27299, -269 },
- { 0x97c560ba, 0x6b0919a5, 0xdccd879f, -265 },
- { 0xbdb6b8e9, 0x05cb600f, 0x5400e987, -262 },
- { 0xed246723, 0x473e3813, 0x290123e9, -259 },
- { 0x9436c076, 0x0c86e30b, 0xf9a0b672, -255 },
- { 0xb9447093, 0x8fa89bce, 0xf808e40e, -252 },
- { 0xe7958cb8, 0x7392c2c2, 0xb60b1d12, -249 },
- { 0x90bd77f3, 0x483bb9b9, 0xb1c6f22b, -245 },
- { 0xb4ecd5f0, 0x1a4aa828, 0x1e38aeb6, -242 },
- { 0xe2280b6c, 0x20dd5232, 0x25c6da63, -239 },
- { 0x8d590723, 0x948a535f, 0x579c487e, -235 },
- { 0xb0af48ec, 0x79ace837, 0x2d835a9d, -232 },
- { 0xdcdb1b27, 0x98182244, 0xf8e43145, -229 },
- { 0x8a08f0f8, 0xbf0f156b, 0x1b8e9ecb, -225 },
- { 0xac8b2d36, 0xeed2dac5, 0xe272467e, -222 },
- { 0xd7adf884, 0xaa879177, 0x5b0ed81d, -219 },
- { 0x86ccbb52, 0xea94baea, 0x98e94712, -215 },
- { 0xa87fea27, 0xa539e9a5, 0x3f2398d7, -212 },
- { 0xd29fe4b1, 0x8e88640e, 0x8eec7f0d, -209 },
- { 0x83a3eeee, 0xf9153e89, 0x1953cf68, -205 },
- { 0xa48ceaaa, 0xb75a8e2b, 0x5fa8c342, -202 },
- { 0xcdb02555, 0x653131b6, 0x3792f412, -199 },
- { 0x808e1755, 0x5f3ebf11, 0xe2bbd88b, -195 },
- { 0xa0b19d2a, 0xb70e6ed6, 0x5b6aceae, -192 },
- { 0xc8de0475, 0x64d20a8b, 0xf245825a, -189 },
- { 0xfb158592, 0xbe068d2e, 0xeed6e2f0, -186 },
- { 0x9ced737b, 0xb6c4183d, 0x55464dd6, -182 },
- { 0xc428d05a, 0xa4751e4c, 0xaa97e14c, -179 },
- { 0xf5330471, 0x4d9265df, 0xd53dd99f, -176 },
- { 0x993fe2c6, 0xd07b7fab, 0xe546a803, -172 },
- { 0xbf8fdb78, 0x849a5f96, 0xde985204, -169 },
- { 0xef73d256, 0xa5c0f77c, 0x963e6685, -166 },
- { 0x95a86376, 0x27989aad, 0xdde70013, -162 },
- { 0xbb127c53, 0xb17ec159, 0x5560c018, -159 },
- { 0xe9d71b68, 0x9dde71af, 0xaab8f01e, -156 },
- { 0x92267121, 0x62ab070d, 0xcab39613, -152 },
- { 0xb6b00d69, 0xbb55c8d1, 0x3d607b97, -149 },
- { 0xe45c10c4, 0x2a2b3b05, 0x8cb89a7d, -146 },
- { 0x8eb98a7a, 0x9a5b04e3, 0x77f3608e, -142 },
- { 0xb267ed19, 0x40f1c61c, 0x55f038b2, -139 },
- { 0xdf01e85f, 0x912e37a3, 0x6b6c46de, -136 },
- { 0x8b61313b, 0xbabce2c6, 0x2323ac4b, -132 },
- { 0xae397d8a, 0xa96c1b77, 0xabec975e, -129 },
- { 0xd9c7dced, 0x53c72255, 0x96e7bd35, -126 },
- { 0x881cea14, 0x545c7575, 0x7e50d641, -122 },
- { 0xaa242499, 0x697392d2, 0xdde50bd1, -119 },
- { 0xd4ad2dbf, 0xc3d07787, 0x955e4ec6, -116 },
- { 0x84ec3c97, 0xda624ab4, 0xbd5af13b, -112 },
- { 0xa6274bbd, 0xd0fadd61, 0xecb1ad8a, -109 },
- { 0xcfb11ead, 0x453994ba, 0x67de18ed, -106 },
- { 0x81ceb32c, 0x4b43fcf4, 0x80eacf94, -102 },
- { 0xa2425ff7, 0x5e14fc31, 0xa1258379, -99 },
- { 0xcad2f7f5, 0x359a3b3e, 0x096ee458, -96 },
- { 0xfd87b5f2, 0x8300ca0d, 0x8bca9d6e, -93 },
- { 0x9e74d1b7, 0x91e07e48, 0x775ea264, -89 },
- { 0xc6120625, 0x76589dda, 0x95364afe, -86 },
- { 0xf79687ae, 0xd3eec551, 0x3a83ddbd, -83 },
- { 0x9abe14cd, 0x44753b52, 0xc4926a96, -79 },
- { 0xc16d9a00, 0x95928a27, 0x75b7053c, -76 },
- { 0xf1c90080, 0xbaf72cb1, 0x5324c68b, -73 },
- { 0x971da050, 0x74da7bee, 0xd3f6fc16, -69 },
- { 0xbce50864, 0x92111aea, 0x88f4bb1c, -66 },
- { 0xec1e4a7d, 0xb69561a5, 0x2b31e9e3, -63 },
- { 0x9392ee8e, 0x921d5d07, 0x3aff322e, -59 },
- { 0xb877aa32, 0x36a4b449, 0x09befeb9, -56 },
- { 0xe69594be, 0xc44de15b, 0x4c2ebe68, -53 },
- { 0x901d7cf7, 0x3ab0acd9, 0x0f9d3701, -49 },
- { 0xb424dc35, 0x095cd80f, 0x538484c1, -46 },
- { 0xe12e1342, 0x4bb40e13, 0x2865a5f2, -43 },
- { 0x8cbccc09, 0x6f5088cb, 0xf93f87b7, -39 },
- { 0xafebff0b, 0xcb24aafe, 0xf78f69a5, -36 },
- { 0xdbe6fece, 0xbdedd5be, 0xb573440e, -33 },
- { 0x89705f41, 0x36b4a597, 0x31680a88, -29 },
- { 0xabcc7711, 0x8461cefc, 0xfdc20d2b, -26 },
- { 0xd6bf94d5, 0xe57a42bc, 0x3d329076, -23 },
- { 0x8637bd05, 0xaf6c69b5, 0xa63f9a49, -19 },
- { 0xa7c5ac47, 0x1b478423, 0x0fcf80dc, -16 },
- { 0xd1b71758, 0xe219652b, 0xd3c36113, -13 },
- { 0x83126e97, 0x8d4fdf3b, 0x645a1cac, -9 },
- { 0xa3d70a3d, 0x70a3d70a, 0x3d70a3d7, -6 },
- { 0xcccccccc, 0xcccccccc, 0xcccccccc, -3 },
- { 0x80000000, 0x00000000, 0x00000000, 1 },
- { 0xa0000000, 0x00000000, 0x00000000, 4 },
- { 0xc8000000, 0x00000000, 0x00000000, 7 },
- { 0xfa000000, 0x00000000, 0x00000000, 10 },
- { 0x9c400000, 0x00000000, 0x00000000, 14 },
- { 0xc3500000, 0x00000000, 0x00000000, 17 },
- { 0xf4240000, 0x00000000, 0x00000000, 20 },
- { 0x98968000, 0x00000000, 0x00000000, 24 },
- { 0xbebc2000, 0x00000000, 0x00000000, 27 },
- { 0xee6b2800, 0x00000000, 0x00000000, 30 },
- { 0x9502f900, 0x00000000, 0x00000000, 34 },
- { 0xba43b740, 0x00000000, 0x00000000, 37 },
- { 0xe8d4a510, 0x00000000, 0x00000000, 40 },
- { 0x9184e72a, 0x00000000, 0x00000000, 44 },
- { 0xb5e620f4, 0x80000000, 0x00000000, 47 },
- { 0xe35fa931, 0xa0000000, 0x00000000, 50 },
- { 0x8e1bc9bf, 0x04000000, 0x00000000, 54 },
- { 0xb1a2bc2e, 0xc5000000, 0x00000000, 57 },
- { 0xde0b6b3a, 0x76400000, 0x00000000, 60 },
- { 0x8ac72304, 0x89e80000, 0x00000000, 64 },
- { 0xad78ebc5, 0xac620000, 0x00000000, 67 },
- { 0xd8d726b7, 0x177a8000, 0x00000000, 70 },
- { 0x87867832, 0x6eac9000, 0x00000000, 74 },
- { 0xa968163f, 0x0a57b400, 0x00000000, 77 },
- { 0xd3c21bce, 0xcceda100, 0x00000000, 80 },
- { 0x84595161, 0x401484a0, 0x00000000, 84 },
- { 0xa56fa5b9, 0x9019a5c8, 0x00000000, 87 },
- { 0xcecb8f27, 0xf4200f3a, 0x00000000, 90 },
- { 0x813f3978, 0xf8940984, 0x40000000, 94 },
- { 0xa18f07d7, 0x36b90be5, 0x50000000, 97 },
- { 0xc9f2c9cd, 0x04674ede, 0xa4000000, 100 },
- { 0xfc6f7c40, 0x45812296, 0x4d000000, 103 },
- { 0x9dc5ada8, 0x2b70b59d, 0xf0200000, 107 },
- { 0xc5371912, 0x364ce305, 0x6c280000, 110 },
- { 0xf684df56, 0xc3e01bc6, 0xc7320000, 113 },
- { 0x9a130b96, 0x3a6c115c, 0x3c7f4000, 117 },
- { 0xc097ce7b, 0xc90715b3, 0x4b9f1000, 120 },
- { 0xf0bdc21a, 0xbb48db20, 0x1e86d400, 123 },
- { 0x96769950, 0xb50d88f4, 0x13144480, 127 },
- { 0xbc143fa4, 0xe250eb31, 0x17d955a0, 130 },
- { 0xeb194f8e, 0x1ae525fd, 0x5dcfab08, 133 },
- { 0x92efd1b8, 0xd0cf37be, 0x5aa1cae5, 137 },
- { 0xb7abc627, 0x050305ad, 0xf14a3d9e, 140 },
- { 0xe596b7b0, 0xc643c719, 0x6d9ccd05, 143 },
- { 0x8f7e32ce, 0x7bea5c6f, 0xe4820023, 147 },
- { 0xb35dbf82, 0x1ae4f38b, 0xdda2802c, 150 },
- { 0xe0352f62, 0xa19e306e, 0xd50b2037, 153 },
- { 0x8c213d9d, 0xa502de45, 0x4526f422, 157 },
- { 0xaf298d05, 0x0e4395d6, 0x9670b12b, 160 },
- { 0xdaf3f046, 0x51d47b4c, 0x3c0cdd76, 163 },
- { 0x88d8762b, 0xf324cd0f, 0xa5880a69, 167 },
- { 0xab0e93b6, 0xefee0053, 0x8eea0d04, 170 },
- { 0xd5d238a4, 0xabe98068, 0x72a49045, 173 },
- { 0x85a36366, 0xeb71f041, 0x47a6da2b, 177 },
- { 0xa70c3c40, 0xa64e6c51, 0x999090b6, 180 },
- { 0xd0cf4b50, 0xcfe20765, 0xfff4b4e3, 183 },
- { 0x82818f12, 0x81ed449f, 0xbff8f10e, 187 },
- { 0xa321f2d7, 0x226895c7, 0xaff72d52, 190 },
- { 0xcbea6f8c, 0xeb02bb39, 0x9bf4f8a6, 193 },
- { 0xfee50b70, 0x25c36a08, 0x02f236d0, 196 },
- { 0x9f4f2726, 0x179a2245, 0x01d76242, 200 },
- { 0xc722f0ef, 0x9d80aad6, 0x424d3ad2, 203 },
- { 0xf8ebad2b, 0x84e0d58b, 0xd2e08987, 206 },
- { 0x9b934c3b, 0x330c8577, 0x63cc55f4, 210 },
- { 0xc2781f49, 0xffcfa6d5, 0x3cbf6b71, 213 },
- { 0xf316271c, 0x7fc3908a, 0x8bef464e, 216 },
- { 0x97edd871, 0xcfda3a56, 0x97758bf0, 220 },
- { 0xbde94e8e, 0x43d0c8ec, 0x3d52eeed, 223 },
- { 0xed63a231, 0xd4c4fb27, 0x4ca7aaa8, 226 },
- { 0x945e455f, 0x24fb1cf8, 0x8fe8caa9, 230 },
- { 0xb975d6b6, 0xee39e436, 0xb3e2fd53, 233 },
- { 0xe7d34c64, 0xa9c85d44, 0x60dbbca8, 236 },
- { 0x90e40fbe, 0xea1d3a4a, 0xbc8955e9, 240 },
- { 0xb51d13ae, 0xa4a488dd, 0x6babab63, 243 },
- { 0xe264589a, 0x4dcdab14, 0xc696963c, 246 },
- { 0x8d7eb760, 0x70a08aec, 0xfc1e1de5, 250 },
- { 0xb0de6538, 0x8cc8ada8, 0x3b25a55f, 253 },
- { 0xdd15fe86, 0xaffad912, 0x49ef0eb7, 256 },
- { 0x8a2dbf14, 0x2dfcc7ab, 0x6e356932, 260 },
- { 0xacb92ed9, 0x397bf996, 0x49c2c37f, 263 },
- { 0xd7e77a8f, 0x87daf7fb, 0xdc33745e, 266 },
- { 0x86f0ac99, 0xb4e8dafd, 0x69a028bb, 270 },
- { 0xa8acd7c0, 0x222311bc, 0xc40832ea, 273 },
- { 0xd2d80db0, 0x2aabd62b, 0xf50a3fa4, 276 },
- { 0x83c7088e, 0x1aab65db, 0x792667c6, 280 },
- { 0xa4b8cab1, 0xa1563f52, 0x577001b8, 283 },
- { 0xcde6fd5e, 0x09abcf26, 0xed4c0226, 286 },
- { 0x80b05e5a, 0xc60b6178, 0x544f8158, 290 },
- { 0xa0dc75f1, 0x778e39d6, 0x696361ae, 293 },
- { 0xc913936d, 0xd571c84c, 0x03bc3a19, 296 },
- { 0xfb587849, 0x4ace3a5f, 0x04ab48a0, 299 },
- { 0x9d174b2d, 0xcec0e47b, 0x62eb0d64, 303 },
- { 0xc45d1df9, 0x42711d9a, 0x3ba5d0bd, 306 },
- { 0xf5746577, 0x930d6500, 0xca8f44ec, 309 },
- { 0x9968bf6a, 0xbbe85f20, 0x7e998b13, 313 },
- { 0xbfc2ef45, 0x6ae276e8, 0x9e3fedd8, 316 },
- { 0xefb3ab16, 0xc59b14a2, 0xc5cfe94e, 319 },
- { 0x95d04aee, 0x3b80ece5, 0xbba1f1d1, 323 },
- { 0xbb445da9, 0xca61281f, 0x2a8a6e45, 326 },
- { 0xea157514, 0x3cf97226, 0xf52d09d7, 329 },
- { 0x924d692c, 0xa61be758, 0x593c2626, 333 },
- { 0xb6e0c377, 0xcfa2e12e, 0x6f8b2fb0, 336 },
- { 0xe498f455, 0xc38b997a, 0x0b6dfb9c, 339 },
- { 0x8edf98b5, 0x9a373fec, 0x4724bd41, 343 },
- { 0xb2977ee3, 0x00c50fe7, 0x58edec91, 346 },
- { 0xdf3d5e9b, 0xc0f653e1, 0x2f2967b6, 349 },
- { 0x8b865b21, 0x5899f46c, 0xbd79e0d2, 353 },
- { 0xae67f1e9, 0xaec07187, 0xecd85906, 356 },
- { 0xda01ee64, 0x1a708de9, 0xe80e6f48, 359 },
- { 0x884134fe, 0x908658b2, 0x3109058d, 363 },
- { 0xaa51823e, 0x34a7eede, 0xbd4b46f0, 366 },
- { 0xd4e5e2cd, 0xc1d1ea96, 0x6c9e18ac, 369 },
- { 0x850fadc0, 0x9923329e, 0x03e2cf6b, 373 },
- { 0xa6539930, 0xbf6bff45, 0x84db8346, 376 },
- { 0xcfe87f7c, 0xef46ff16, 0xe6126418, 379 },
- { 0x81f14fae, 0x158c5f6e, 0x4fcb7e8f, 383 },
- { 0xa26da399, 0x9aef7749, 0xe3be5e33, 386 },
- { 0xcb090c80, 0x01ab551c, 0x5cadf5bf, 389 },
- { 0xfdcb4fa0, 0x02162a63, 0x73d9732f, 392 },
- { 0x9e9f11c4, 0x014dda7e, 0x2867e7fd, 396 },
- { 0xc646d635, 0x01a1511d, 0xb281e1fd, 399 },
- { 0xf7d88bc2, 0x4209a565, 0x1f225a7c, 402 },
- { 0x9ae75759, 0x6946075f, 0x3375788d, 406 },
- { 0xc1a12d2f, 0xc3978937, 0x0052d6b1, 409 },
- { 0xf209787b, 0xb47d6b84, 0xc0678c5d, 412 },
- { 0x9745eb4d, 0x50ce6332, 0xf840b7ba, 416 },
- { 0xbd176620, 0xa501fbff, 0xb650e5a9, 419 },
- { 0xec5d3fa8, 0xce427aff, 0xa3e51f13, 422 },
- { 0x93ba47c9, 0x80e98cdf, 0xc66f336c, 426 },
- { 0xb8a8d9bb, 0xe123f017, 0xb80b0047, 429 },
- { 0xe6d3102a, 0xd96cec1d, 0xa60dc059, 432 },
- { 0x9043ea1a, 0xc7e41392, 0x87c89837, 436 },
- { 0xb454e4a1, 0x79dd1877, 0x29babe45, 439 },
- { 0xe16a1dc9, 0xd8545e94, 0xf4296dd6, 442 },
- { 0x8ce2529e, 0x2734bb1d, 0x1899e4a6, 446 },
- { 0xb01ae745, 0xb101e9e4, 0x5ec05dcf, 449 },
- { 0xdc21a117, 0x1d42645d, 0x76707543, 452 },
- { 0x899504ae, 0x72497eba, 0x6a06494a, 456 },
- { 0xabfa45da, 0x0edbde69, 0x0487db9d, 459 },
- { 0xd6f8d750, 0x9292d603, 0x45a9d284, 462 },
- { 0x865b8692, 0x5b9bc5c2, 0x0b8a2392, 466 },
- { 0xa7f26836, 0xf282b732, 0x8e6cac77, 469 },
- { 0xd1ef0244, 0xaf2364ff, 0x3207d795, 472 },
- { 0x8335616a, 0xed761f1f, 0x7f44e6bd, 476 },
- { 0xa402b9c5, 0xa8d3a6e7, 0x5f16206c, 479 },
- { 0xcd036837, 0x130890a1, 0x36dba887, 482 },
- { 0x80222122, 0x6be55a64, 0xc2494954, 486 },
- { 0xa02aa96b, 0x06deb0fd, 0xf2db9baa, 489 },
- { 0xc83553c5, 0xc8965d3d, 0x6f928294, 492 },
- { 0xfa42a8b7, 0x3abbf48c, 0xcb772339, 495 },
- { 0x9c69a972, 0x84b578d7, 0xff2a7604, 499 },
- { 0xc38413cf, 0x25e2d70d, 0xfef51385, 502 },
- { 0xf46518c2, 0xef5b8cd1, 0x7eb25866, 505 },
- { 0x98bf2f79, 0xd5993802, 0xef2f773f, 509 },
- { 0xbeeefb58, 0x4aff8603, 0xaafb550f, 512 },
- { 0xeeaaba2e, 0x5dbf6784, 0x95ba2a53, 515 },
- { 0x952ab45c, 0xfa97a0b2, 0xdd945a74, 519 },
- { 0xba756174, 0x393d88df, 0x94f97111, 522 },
- { 0xe912b9d1, 0x478ceb17, 0x7a37cd56, 525 },
- { 0x91abb422, 0xccb812ee, 0xac62e055, 529 },
- { 0xb616a12b, 0x7fe617aa, 0x577b986b, 532 },
- { 0xe39c4976, 0x5fdf9d94, 0xed5a7e85, 535 },
- { 0x8e41ade9, 0xfbebc27d, 0x14588f13, 539 },
- { 0xb1d21964, 0x7ae6b31c, 0x596eb2d8, 542 },
- { 0xde469fbd, 0x99a05fe3, 0x6fca5f8e, 545 },
- { 0x8aec23d6, 0x80043bee, 0x25de7bb9, 549 },
- { 0xada72ccc, 0x20054ae9, 0xaf561aa7, 552 },
- { 0xd910f7ff, 0x28069da4, 0x1b2ba151, 555 },
- { 0x87aa9aff, 0x79042286, 0x90fb44d2, 559 },
- { 0xa99541bf, 0x57452b28, 0x353a1607, 562 },
- { 0xd3fa922f, 0x2d1675f2, 0x42889b89, 565 },
- { 0x847c9b5d, 0x7c2e09b7, 0x69956135, 569 },
- { 0xa59bc234, 0xdb398c25, 0x43fab983, 572 },
- { 0xcf02b2c2, 0x1207ef2e, 0x94f967e4, 575 },
- { 0x8161afb9, 0x4b44f57d, 0x1d1be0ee, 579 },
- { 0xa1ba1ba7, 0x9e1632dc, 0x6462d92a, 582 },
- { 0xca28a291, 0x859bbf93, 0x7d7b8f75, 585 },
- { 0xfcb2cb35, 0xe702af78, 0x5cda7352, 588 },
- { 0x9defbf01, 0xb061adab, 0x3a088813, 592 },
- { 0xc56baec2, 0x1c7a1916, 0x088aaa18, 595 },
- { 0xf6c69a72, 0xa3989f5b, 0x8aad549e, 598 },
- { 0x9a3c2087, 0xa63f6399, 0x36ac54e2, 602 },
- { 0xc0cb28a9, 0x8fcf3c7f, 0x84576a1b, 605 },
- { 0xf0fdf2d3, 0xf3c30b9f, 0x656d44a2, 608 },
- { 0x969eb7c4, 0x7859e743, 0x9f644ae5, 612 },
- { 0xbc4665b5, 0x96706114, 0x873d5d9f, 615 },
- { 0xeb57ff22, 0xfc0c7959, 0xa90cb506, 618 },
- { 0x9316ff75, 0xdd87cbd8, 0x09a7f124, 622 },
- { 0xb7dcbf53, 0x54e9bece, 0x0c11ed6d, 625 },
- { 0xe5d3ef28, 0x2a242e81, 0x8f1668c8, 628 },
- { 0x8fa47579, 0x1a569d10, 0xf96e017d, 632 },
- { 0xb38d92d7, 0x60ec4455, 0x37c981dc, 635 },
- { 0xe070f78d, 0x3927556a, 0x85bbe253, 638 },
- { 0x8c469ab8, 0x43b89562, 0x93956d74, 642 },
- { 0xaf584166, 0x54a6babb, 0x387ac8d1, 645 },
- { 0xdb2e51bf, 0xe9d0696a, 0x06997b05, 648 },
- { 0x88fcf317, 0xf22241e2, 0x441fece3, 652 },
- { 0xab3c2fdd, 0xeeaad25a, 0xd527e81c, 655 },
- { 0xd60b3bd5, 0x6a5586f1, 0x8a71e223, 658 },
- { 0x85c70565, 0x62757456, 0xf6872d56, 662 },
- { 0xa738c6be, 0xbb12d16c, 0xb428f8ac, 665 },
- { 0xd106f86e, 0x69d785c7, 0xe13336d7, 668 },
- { 0x82a45b45, 0x0226b39c, 0xecc00246, 672 },
- { 0xa34d7216, 0x42b06084, 0x27f002d7, 675 },
- { 0xcc20ce9b, 0xd35c78a5, 0x31ec038d, 678 },
- { 0xff290242, 0xc83396ce, 0x7e670471, 681 },
- { 0x9f79a169, 0xbd203e41, 0x0f0062c6, 685 },
- { 0xc75809c4, 0x2c684dd1, 0x52c07b78, 688 },
- { 0xf92e0c35, 0x37826145, 0xa7709a56, 691 },
- { 0x9bbcc7a1, 0x42b17ccb, 0x88a66076, 695 },
- { 0xc2abf989, 0x935ddbfe, 0x6acff893, 698 },
- { 0xf356f7eb, 0xf83552fe, 0x0583f6b8, 701 },
- { 0x98165af3, 0x7b2153de, 0xc3727a33, 705 },
- { 0xbe1bf1b0, 0x59e9a8d6, 0x744f18c0, 708 },
- { 0xeda2ee1c, 0x7064130c, 0x1162def0, 711 },
- { 0x9485d4d1, 0xc63e8be7, 0x8addcb56, 715 },
- { 0xb9a74a06, 0x37ce2ee1, 0x6d953e2b, 718 },
- { 0xe8111c87, 0xc5c1ba99, 0xc8fa8db6, 721 },
- { 0x910ab1d4, 0xdb9914a0, 0x1d9c9892, 725 },
- { 0xb54d5e4a, 0x127f59c8, 0x2503beb6, 728 },
- { 0xe2a0b5dc, 0x971f303a, 0x2e44ae64, 731 },
- { 0x8da471a9, 0xde737e24, 0x5ceaecfe, 735 },
- { 0xb10d8e14, 0x56105dad, 0x7425a83e, 738 },
- { 0xdd50f199, 0x6b947518, 0xd12f124e, 741 },
- { 0x8a5296ff, 0xe33cc92f, 0x82bd6b70, 745 },
- { 0xace73cbf, 0xdc0bfb7b, 0x636cc64d, 748 },
- { 0xd8210bef, 0xd30efa5a, 0x3c47f7e0, 751 },
- { 0x8714a775, 0xe3e95c78, 0x65acfaec, 755 },
- { 0xa8d9d153, 0x5ce3b396, 0x7f1839a7, 758 },
- { 0xd31045a8, 0x341ca07c, 0x1ede4811, 761 },
- { 0x83ea2b89, 0x2091e44d, 0x934aed0a, 765 },
- { 0xa4e4b66b, 0x68b65d60, 0xf81da84d, 768 },
- { 0xce1de406, 0x42e3f4b9, 0x36251260, 771 },
- { 0x80d2ae83, 0xe9ce78f3, 0xc1d72b7c, 775 },
- { 0xa1075a24, 0xe4421730, 0xb24cf65b, 778 },
- { 0xc94930ae, 0x1d529cfc, 0xdee033f2, 781 },
- { 0xfb9b7cd9, 0xa4a7443c, 0x169840ef, 784 },
- { 0x9d412e08, 0x06e88aa5, 0x8e1f2895, 788 },
- { 0xc491798a, 0x08a2ad4e, 0xf1a6f2ba, 791 },
- { 0xf5b5d7ec, 0x8acb58a2, 0xae10af69, 794 },
- { 0x9991a6f3, 0xd6bf1765, 0xacca6da1, 798 },
- { 0xbff610b0, 0xcc6edd3f, 0x17fd090a, 801 },
- { 0xeff394dc, 0xff8a948e, 0xddfc4b4c, 804 },
- { 0x95f83d0a, 0x1fb69cd9, 0x4abdaf10, 808 },
- { 0xbb764c4c, 0xa7a4440f, 0x9d6d1ad4, 811 },
- { 0xea53df5f, 0xd18d5513, 0x84c86189, 814 },
- { 0x92746b9b, 0xe2f8552c, 0x32fd3cf5, 818 },
- { 0xb7118682, 0xdbb66a77, 0x3fbc8c33, 821 },
- { 0xe4d5e823, 0x92a40515, 0x0fabaf3f, 824 },
- { 0x8f05b116, 0x3ba6832d, 0x29cb4d87, 828 },
- { 0xb2c71d5b, 0xca9023f8, 0x743e20e9, 831 },
- { 0xdf78e4b2, 0xbd342cf6, 0x914da924, 834 },
- { 0x8bab8eef, 0xb6409c1a, 0x1ad089b6, 838 },
- { 0xae9672ab, 0xa3d0c320, 0xa184ac24, 841 },
- { 0xda3c0f56, 0x8cc4f3e8, 0xc9e5d72d, 844 },
- { 0x88658996, 0x17fb1871, 0x7e2fa67c, 848 },
- { 0xaa7eebfb, 0x9df9de8d, 0xddbb901b, 851 },
- { 0xd51ea6fa, 0x85785631, 0x552a7422, 854 },
- { 0x8533285c, 0x936b35de, 0xd53a8895, 858 },
- { 0xa67ff273, 0xb8460356, 0x8a892aba, 861 },
- { 0xd01fef10, 0xa657842c, 0x2d2b7569, 864 },
- { 0x8213f56a, 0x67f6b29b, 0x9c3b2962, 868 },
- { 0xa298f2c5, 0x01f45f42, 0x8349f3ba, 871 },
- { 0xcb3f2f76, 0x42717713, 0x241c70a9, 874 },
- { 0xfe0efb53, 0xd30dd4d7, 0xed238cd3, 877 },
- { 0x9ec95d14, 0x63e8a506, 0xf4363804, 881 },
- { 0xc67bb459, 0x7ce2ce48, 0xb143c605, 884 },
- { 0xf81aa16f, 0xdc1b81da, 0xdd94b786, 887 },
- { 0x9b10a4e5, 0xe9913128, 0xca7cf2b4, 891 },
- { 0xc1d4ce1f, 0x63f57d72, 0xfd1c2f61, 894 },
- { 0xf24a01a7, 0x3cf2dccf, 0xbc633b39, 897 },
- { 0x976e4108, 0x8617ca01, 0xd5be0503, 901 },
- { 0xbd49d14a, 0xa79dbc82, 0x4b2d8644, 904 },
- { 0xec9c459d, 0x51852ba2, 0xddf8e7d6, 907 },
- { 0x93e1ab82, 0x52f33b45, 0xcabb90e5, 911 },
- { 0xb8da1662, 0xe7b00a17, 0x3d6a751f, 914 },
- { 0xe7109bfb, 0xa19c0c9d, 0x0cc51267, 917 },
- { 0x906a617d, 0x450187e2, 0x27fb2b80, 921 },
- { 0xb484f9dc, 0x9641e9da, 0xb1f9f660, 924 },
- { 0xe1a63853, 0xbbd26451, 0x5e7873f8, 927 },
- { 0x8d07e334, 0x55637eb2, 0xdb0b487b, 931 },
- { 0xb049dc01, 0x6abc5e5f, 0x91ce1a9a, 934 },
- { 0xdc5c5301, 0xc56b75f7, 0x7641a140, 937 },
- { 0x89b9b3e1, 0x1b6329ba, 0xa9e904c8, 941 },
- { 0xac2820d9, 0x623bf429, 0x546345fa, 944 },
- { 0xd732290f, 0xbacaf133, 0xa97c1779, 947 },
- { 0x867f59a9, 0xd4bed6c0, 0x49ed8eab, 951 },
- { 0xa81f3014, 0x49ee8c70, 0x5c68f256, 954 },
- { 0xd226fc19, 0x5c6a2f8c, 0x73832eec, 957 },
- { 0x83585d8f, 0xd9c25db7, 0xc831fd53, 961 },
- { 0xa42e74f3, 0xd032f525, 0xba3e7ca8, 964 },
- { 0xcd3a1230, 0xc43fb26f, 0x28ce1bd2, 967 },
- { 0x80444b5e, 0x7aa7cf85, 0x7980d163, 971 },
- { 0xa0555e36, 0x1951c366, 0xd7e105bc, 974 },
- { 0xc86ab5c3, 0x9fa63440, 0x8dd9472b, 977 },
- { 0xfa856334, 0x878fc150, 0xb14f98f6, 980 },
- { 0x9c935e00, 0xd4b9d8d2, 0x6ed1bf9a, 984 },
- { 0xc3b83581, 0x09e84f07, 0x0a862f80, 987 },
- { 0xf4a642e1, 0x4c6262c8, 0xcd27bb61, 990 },
- { 0x98e7e9cc, 0xcfbd7dbd, 0x8038d51c, 994 },
- { 0xbf21e440, 0x03acdd2c, 0xe0470a63, 997 },
- { 0xeeea5d50, 0x04981478, 0x1858ccfc, 1000 },
- { 0x95527a52, 0x02df0ccb, 0x0f37801e, 1004 },
- { 0xbaa718e6, 0x8396cffd, 0xd3056025, 1007 },
- { 0xe950df20, 0x247c83fd, 0x47c6b82e, 1010 },
- { 0x91d28b74, 0x16cdd27e, 0x4cdc331d, 1014 },
- { 0xb6472e51, 0x1c81471d, 0xe0133fe4, 1017 },
- { 0xe3d8f9e5, 0x63a198e5, 0x58180fdd, 1020 },
- { 0x8e679c2f, 0x5e44ff8f, 0x570f09ea, 1024 },
- { 0xb201833b, 0x35d63f73, 0x2cd2cc65, 1027 },
- { 0xde81e40a, 0x034bcf4f, 0xf8077f7e, 1030 },
- { 0x8b112e86, 0x420f6191, 0xfb04afaf, 1034 },
- { 0xadd57a27, 0xd29339f6, 0x79c5db9a, 1037 },
- { 0xd94ad8b1, 0xc7380874, 0x18375281, 1040 },
- { 0x87cec76f, 0x1c830548, 0x8f229391, 1044 },
- { 0xa9c2794a, 0xe3a3c69a, 0xb2eb3875, 1047 },
- { 0xd433179d, 0x9c8cb841, 0x5fa60692, 1050 },
- { 0x849feec2, 0x81d7f328, 0xdbc7c41b, 1054 },
- { 0xa5c7ea73, 0x224deff3, 0x12b9b522, 1057 },
- { 0xcf39e50f, 0xeae16bef, 0xd768226b, 1060 },
- { 0x81842f29, 0xf2cce375, 0xe6a11583, 1064 },
- { 0xa1e53af4, 0x6f801c53, 0x60495ae3, 1067 },
- { 0xca5e89b1, 0x8b602368, 0x385bb19c, 1070 },
- { 0xfcf62c1d, 0xee382c42, 0x46729e03, 1073 },
+static BF96 pten[667] = { { 0xeef453d6, 0x923bd65a, 0x113faa29, -1136 }, { 0x9558b466, 0x1b6565f8, 0x4ac7ca59, -1132 },
+ { 0xbaaee17f, 0xa23ebf76, 0x5d79bcf0, -1129 }, { 0xe95a99df, 0x8ace6f53, 0xf4d82c2c, -1126 },
+ { 0x91d8a02b, 0xb6c10594, 0x79071b9b, -1122 }, { 0xb64ec836, 0xa47146f9, 0x9748e282, -1119 },
+ { 0xe3e27a44, 0x4d8d98b7, 0xfd1b1b23, -1116 }, { 0x8e6d8c6a, 0xb0787f72, 0xfe30f0f5, -1112 },
+ { 0xb208ef85, 0x5c969f4f, 0xbdbd2d33, -1109 }, { 0xde8b2b66, 0xb3bc4723, 0xad2c7880, -1106 },
+ { 0x8b16fb20, 0x3055ac76, 0x4c3bcb50, -1102 }, { 0xaddcb9e8, 0x3c6b1793, 0xdf4abe24, -1099 },
+ { 0xd953e862, 0x4b85dd78, 0xd71d6dad, -1096 }, { 0x87d4713d, 0x6f33aa6b, 0x8672648c, -1092 },
+ { 0xa9c98d8c, 0xcb009506, 0x680efdaf, -1089 }, { 0xd43bf0ef, 0xfdc0ba48, 0x0212bd1b, -1086 },
+ { 0x84a57695, 0xfe98746d, 0x014bb630, -1082 }, { 0xa5ced43b, 0x7e3e9188, 0x419ea3bd, -1079 },
+ { 0xcf42894a, 0x5dce35ea, 0x52064cac, -1076 }, { 0x818995ce, 0x7aa0e1b2, 0x7343efeb, -1072 },
+ { 0xa1ebfb42, 0x19491a1f, 0x1014ebe6, -1069 }, { 0xca66fa12, 0x9f9b60a6, 0xd41a26e0, -1066 },
+ { 0xfd00b897, 0x478238d0, 0x8920b098, -1063 }, { 0x9e20735e, 0x8cb16382, 0x55b46e5f, -1059 },
+ { 0xc5a89036, 0x2fddbc62, 0xeb2189f7, -1056 }, { 0xf712b443, 0xbbd52b7b, 0xa5e9ec75, -1053 },
+ { 0x9a6bb0aa, 0x55653b2d, 0x47b233c9, -1049 }, { 0xc1069cd4, 0xeabe89f8, 0x999ec0bb, -1046 },
+ { 0xf148440a, 0x256e2c76, 0xc00670ea, -1043 }, { 0x96cd2a86, 0x5764dbca, 0x38040692, -1039 },
+ { 0xbc807527, 0xed3e12bc, 0xc6050837, -1036 }, { 0xeba09271, 0xe88d976b, 0xf7864a44, -1033 },
+ { 0x93445b87, 0x31587ea3, 0x7ab3ee6a, -1029 }, { 0xb8157268, 0xfdae9e4c, 0x5960ea05, -1026 },
+ { 0xe61acf03, 0x3d1a45df, 0x6fb92487, -1023 }, { 0x8fd0c162, 0x06306bab, 0xa5d3b6d4, -1019 },
+ { 0xb3c4f1ba, 0x87bc8696, 0x8f48a489, -1016 }, { 0xe0b62e29, 0x29aba83c, 0x331acdab, -1013 },
+ { 0x8c71dcd9, 0xba0b4925, 0x9ff0c08b, -1009 }, { 0xaf8e5410, 0x288e1b6f, 0x07ecf0ae, -1006 },
+ { 0xdb71e914, 0x32b1a24a, 0xc9e82cd9, -1003 }, { 0x892731ac, 0x9faf056e, 0xbe311c08, -999 },
+ { 0xab70fe17, 0xc79ac6ca, 0x6dbd630a, -996 }, { 0xd64d3d9d, 0xb981787d, 0x092cbbcc, -993 },
+ { 0x85f04682, 0x93f0eb4e, 0x25bbf560, -989 }, { 0xa76c5823, 0x38ed2621, 0xaf2af2b8, -986 },
+ { 0xd1476e2c, 0x07286faa, 0x1af5af66, -983 }, { 0x82cca4db, 0x847945ca, 0x50d98d9f, -979 },
+ { 0xa37fce12, 0x6597973c, 0xe50ff107, -976 }, { 0xcc5fc196, 0xfefd7d0c, 0x1e53ed49, -973 },
+ { 0xff77b1fc, 0xbebcdc4f, 0x25e8e89c, -970 }, { 0x9faacf3d, 0xf73609b1, 0x77b19161, -966 },
+ { 0xc795830d, 0x75038c1d, 0xd59df5b9, -963 }, { 0xf97ae3d0, 0xd2446f25, 0x4b057328, -960 },
+ { 0x9becce62, 0x836ac577, 0x4ee367f9, -956 }, { 0xc2e801fb, 0x244576d5, 0x229c41f7, -953 },
+ { 0xf3a20279, 0xed56d48a, 0x6b435275, -950 }, { 0x9845418c, 0x345644d6, 0x830a1389, -946 },
+ { 0xbe5691ef, 0x416bd60c, 0x23cc986b, -943 }, { 0xedec366b, 0x11c6cb8f, 0x2cbfbe86, -940 },
+ { 0x94b3a202, 0xeb1c3f39, 0x7bf7d714, -936 }, { 0xb9e08a83, 0xa5e34f07, 0xdaf5ccd9, -933 },
+ { 0xe858ad24, 0x8f5c22c9, 0xd1b3400f, -930 }, { 0x91376c36, 0xd99995be, 0x23100809, -926 },
+ { 0xb5854744, 0x8ffffb2d, 0xabd40a0c, -923 }, { 0xe2e69915, 0xb3fff9f9, 0x16c90c8f, -920 },
+ { 0x8dd01fad, 0x907ffc3b, 0xae3da7d9, -916 }, { 0xb1442798, 0xf49ffb4a, 0x99cd11cf, -913 },
+ { 0xdd95317f, 0x31c7fa1d, 0x40405643, -910 }, { 0x8a7d3eef, 0x7f1cfc52, 0x482835ea, -906 },
+ { 0xad1c8eab, 0x5ee43b66, 0xda324365, -903 }, { 0xd863b256, 0x369d4a40, 0x90bed43e, -900 },
+ { 0x873e4f75, 0xe2224e68, 0x5a7744a6, -896 }, { 0xa90de353, 0x5aaae202, 0x711515d0, -893 },
+ { 0xd3515c28, 0x31559a83, 0x0d5a5b44, -890 }, { 0x8412d999, 0x1ed58091, 0xe858790a, -886 },
+ { 0xa5178fff, 0x668ae0b6, 0x626e974d, -883 }, { 0xce5d73ff, 0x402d98e3, 0xfb0a3d21, -880 },
+ { 0x80fa687f, 0x881c7f8e, 0x7ce66634, -876 }, { 0xa139029f, 0x6a239f72, 0x1c1fffc1, -873 },
+ { 0xc9874347, 0x44ac874e, 0xa327ffb2, -870 }, { 0xfbe91419, 0x15d7a922, 0x4bf1ff9f, -867 },
+ { 0x9d71ac8f, 0xada6c9b5, 0x6f773fc3, -863 }, { 0xc4ce17b3, 0x99107c22, 0xcb550fb4, -860 },
+ { 0xf6019da0, 0x7f549b2b, 0x7e2a53a1, -857 }, { 0x99c10284, 0x4f94e0fb, 0x2eda7444, -853 },
+ { 0xc0314325, 0x637a1939, 0xfa911155, -850 }, { 0xf03d93ee, 0xbc589f88, 0x793555ab, -847 },
+ { 0x96267c75, 0x35b763b5, 0x4bc1558b, -843 }, { 0xbbb01b92, 0x83253ca2, 0x9eb1aaed, -840 },
+ { 0xea9c2277, 0x23ee8bcb, 0x465e15a9, -837 }, { 0x92a1958a, 0x7675175f, 0x0bfacd89, -833 },
+ { 0xb749faed, 0x14125d36, 0xcef980ec, -830 }, { 0xe51c79a8, 0x5916f484, 0x82b7e127, -827 },
+ { 0x8f31cc09, 0x37ae58d2, 0xd1b2ecb8, -823 }, { 0xb2fe3f0b, 0x8599ef07, 0x861fa7e6, -820 },
+ { 0xdfbdcece, 0x67006ac9, 0x67a791e0, -817 }, { 0x8bd6a141, 0x006042bd, 0xe0c8bb2c, -813 },
+ { 0xaecc4991, 0x4078536d, 0x58fae9f7, -810 }, { 0xda7f5bf5, 0x90966848, 0xaf39a475, -807 },
+ { 0x888f9979, 0x7a5e012d, 0x6d8406c9, -803 }, { 0xaab37fd7, 0xd8f58178, 0xc8e5087b, -800 },
+ { 0xd5605fcd, 0xcf32e1d6, 0xfb1e4a9a, -797 }, { 0x855c3be0, 0xa17fcd26, 0x5cf2eea0, -793 },
+ { 0xa6b34ad8, 0xc9dfc06f, 0xf42faa48, -790 }, { 0xd0601d8e, 0xfc57b08b, 0xf13b94da, -787 },
+ { 0x823c1279, 0x5db6ce57, 0x76c53d08, -783 }, { 0xa2cb1717, 0xb52481ed, 0x54768c4b, -780 },
+ { 0xcb7ddcdd, 0xa26da268, 0xa9942f5d, -777 }, { 0xfe5d5415, 0x0b090b02, 0xd3f93b35, -774 },
+ { 0x9efa548d, 0x26e5a6e1, 0xc47bc501, -770 }, { 0xc6b8e9b0, 0x709f109a, 0x359ab641, -767 },
+ { 0xf867241c, 0x8cc6d4c0, 0xc30163d2, -764 }, { 0x9b407691, 0xd7fc44f8, 0x79e0de63, -760 },
+ { 0xc2109436, 0x4dfb5636, 0x985915fc, -757 }, { 0xf294b943, 0xe17a2bc4, 0x3e6f5b7b, -754 },
+ { 0x979cf3ca, 0x6cec5b5a, 0xa705992c, -750 }, { 0xbd8430bd, 0x08277231, 0x50c6ff78, -747 },
+ { 0xece53cec, 0x4a314ebd, 0xa4f8bf56, -744 }, { 0x940f4613, 0xae5ed136, 0x871b7795, -740 },
+ { 0xb9131798, 0x99f68584, 0x28e2557b, -737 }, { 0xe757dd7e, 0xc07426e5, 0x331aeada, -734 },
+ { 0x9096ea6f, 0x3848984f, 0x3ff0d2c8, -730 }, { 0xb4bca50b, 0x065abe63, 0x0fed077a, -727 },
+ { 0xe1ebce4d, 0xc7f16dfb, 0xd3e84959, -724 }, { 0x8d3360f0, 0x9cf6e4bd, 0x64712dd7, -720 },
+ { 0xb080392c, 0xc4349dec, 0xbd8d794d, -717 }, { 0xdca04777, 0xf541c567, 0xecf0d7a0, -714 },
+ { 0x89e42caa, 0xf9491b60, 0xf41686c4, -710 }, { 0xac5d37d5, 0xb79b6239, 0x311c2875, -707 },
+ { 0xd77485cb, 0x25823ac7, 0x7d633293, -704 }, { 0x86a8d39e, 0xf77164bc, 0xae5dff9c, -700 },
+ { 0xa8530886, 0xb54dbdeb, 0xd9f57f83, -697 }, { 0xd267caa8, 0x62a12d66, 0xd072df63, -694 },
+ { 0x8380dea9, 0x3da4bc60, 0x4247cb9e, -690 }, { 0xa4611653, 0x8d0deb78, 0x52d9be85, -687 },
+ { 0xcd795be8, 0x70516656, 0x67902e27, -684 }, { 0x806bd971, 0x4632dff6, 0x00ba1cd8, -680 },
+ { 0xa086cfcd, 0x97bf97f3, 0x80e8a40e, -677 }, { 0xc8a883c0, 0xfdaf7df0, 0x6122cd12, -674 },
+ { 0xfad2a4b1, 0x3d1b5d6c, 0x796b8057, -671 }, { 0x9cc3a6ee, 0xc6311a63, 0xcbe33036, -667 },
+ { 0xc3f490aa, 0x77bd60fc, 0xbedbfc44, -664 }, { 0xf4f1b4d5, 0x15acb93b, 0xee92fb55, -661 },
+ { 0x99171105, 0x2d8bf3c5, 0x751bdd15, -657 }, { 0xbf5cd546, 0x78eef0b6, 0xd262d45a, -654 },
+ { 0xef340a98, 0x172aace4, 0x86fb8971, -651 }, { 0x9580869f, 0x0e7aac0e, 0xd45d35e6, -647 },
+ { 0xbae0a846, 0xd2195712, 0x89748360, -644 }, { 0xe998d258, 0x869facd7, 0x2bd1a438, -641 },
+ { 0x91ff8377, 0x5423cc06, 0x7b6306a3, -637 }, { 0xb67f6455, 0x292cbf08, 0x1a3bc84c, -634 },
+ { 0xe41f3d6a, 0x7377eeca, 0x20caba5f, -631 }, { 0x8e938662, 0x882af53e, 0x547eb47b, -627 },
+ { 0xb23867fb, 0x2a35b28d, 0xe99e619a, -624 }, { 0xdec681f9, 0xf4c31f31, 0x6405fa00, -621 },
+ { 0x8b3c113c, 0x38f9f37e, 0xde83bc40, -617 }, { 0xae0b158b, 0x4738705e, 0x9624ab50, -614 },
+ { 0xd98ddaee, 0x19068c76, 0x3badd624, -611 }, { 0x87f8a8d4, 0xcfa417c9, 0xe54ca5d7, -607 },
+ { 0xa9f6d30a, 0x038d1dbc, 0x5e9fcf4c, -604 }, { 0xd47487cc, 0x8470652b, 0x7647c320, -601 },
+ { 0x84c8d4df, 0xd2c63f3b, 0x29ecd9f4, -597 }, { 0xa5fb0a17, 0xc777cf09, 0xf4681071, -594 },
+ { 0xcf79cc9d, 0xb955c2cc, 0x7182148d, -591 }, { 0x81ac1fe2, 0x93d599bf, 0xc6f14cd8, -587 },
+ { 0xa21727db, 0x38cb002f, 0xb8ada00e, -584 }, { 0xca9cf1d2, 0x06fdc03b, 0xa6d90811, -581 },
+ { 0xfd442e46, 0x88bd304a, 0x908f4a16, -578 }, { 0x9e4a9cec, 0x15763e2e, 0x9a598e4e, -574 },
+ { 0xc5dd4427, 0x1ad3cdba, 0x40eff1e1, -571 }, { 0xf7549530, 0xe188c128, 0xd12bee59, -568 },
+ { 0x9a94dd3e, 0x8cf578b9, 0x82bb74f8, -564 }, { 0xc13a148e, 0x3032d6e7, 0xe36a5236, -561 },
+ { 0xf18899b1, 0xbc3f8ca1, 0xdc44e6c3, -558 }, { 0x96f5600f, 0x15a7b7e5, 0x29ab103a, -554 },
+ { 0xbcb2b812, 0xdb11a5de, 0x7415d448, -551 }, { 0xebdf6617, 0x91d60f56, 0x111b495b, -548 },
+ { 0x936b9fce, 0xbb25c995, 0xcab10dd9, -544 }, { 0xb84687c2, 0x69ef3bfb, 0x3d5d514f, -541 },
+ { 0xe65829b3, 0x046b0afa, 0x0cb4a5a3, -538 }, { 0x8ff71a0f, 0xe2c2e6dc, 0x47f0e785, -534 },
+ { 0xb3f4e093, 0xdb73a093, 0x59ed2167, -531 }, { 0xe0f218b8, 0xd25088b8, 0x306869c1, -528 },
+ { 0x8c974f73, 0x83725573, 0x1e414218, -524 }, { 0xafbd2350, 0x644eeacf, 0xe5d1929e, -521 },
+ { 0xdbac6c24, 0x7d62a583, 0xdf45f746, -518 }, { 0x894bc396, 0xce5da772, 0x6b8bba8c, -514 },
+ { 0xab9eb47c, 0x81f5114f, 0x066ea92f, -511 }, { 0xd686619b, 0xa27255a2, 0xc80a537b, -508 },
+ { 0x8613fd01, 0x45877585, 0xbd06742c, -504 }, { 0xa798fc41, 0x96e952e7, 0x2c481138, -501 },
+ { 0xd17f3b51, 0xfca3a7a0, 0xf75a1586, -498 }, { 0x82ef8513, 0x3de648c4, 0x9a984d73, -494 },
+ { 0xa3ab6658, 0x0d5fdaf5, 0xc13e60d0, -491 }, { 0xcc963fee, 0x10b7d1b3, 0x318df905, -488 },
+ { 0xffbbcfe9, 0x94e5c61f, 0xfdf17746, -485 }, { 0x9fd561f1, 0xfd0f9bd3, 0xfeb6ea8b, -481 },
+ { 0xc7caba6e, 0x7c5382c8, 0xfe64a52e, -478 }, { 0xf9bd690a, 0x1b68637b, 0x3dfdce7a, -475 },
+ { 0x9c1661a6, 0x51213e2d, 0x06bea10c, -471 }, { 0xc31bfa0f, 0xe5698db8, 0x486e494f, -468 },
+ { 0xf3e2f893, 0xdec3f126, 0x5a89dba3, -465 }, { 0x986ddb5c, 0x6b3a76b7, 0xf8962946, -461 },
+ { 0xbe895233, 0x86091465, 0xf6bbb397, -458 }, { 0xee2ba6c0, 0x678b597f, 0x746aa07d, -455 },
+ { 0x94db4838, 0x40b717ef, 0xa8c2a44e, -451 }, { 0xba121a46, 0x50e4ddeb, 0x92f34d62, -448 },
+ { 0xe896a0d7, 0xe51e1566, 0x77b020ba, -445 }, { 0x915e2486, 0xef32cd60, 0x0ace1474, -441 },
+ { 0xb5b5ada8, 0xaaff80b8, 0x0d819992, -438 }, { 0xe3231912, 0xd5bf60e6, 0x10e1fff6, -435 },
+ { 0x8df5efab, 0xc5979c8f, 0xca8d3ffa, -431 }, { 0xb1736b96, 0xb6fd83b3, 0xbd308ff8, -428 },
+ { 0xddd0467c, 0x64bce4a0, 0xac7cb3f6, -425 }, { 0x8aa22c0d, 0xbef60ee4, 0x6bcdf07a, -421 },
+ { 0xad4ab711, 0x2eb3929d, 0x86c16c98, -418 }, { 0xd89d64d5, 0x7a607744, 0xe871c7bf, -415 },
+ { 0x87625f05, 0x6c7c4a8b, 0x11471cd7, -411 }, { 0xa93af6c6, 0xc79b5d2d, 0xd598e40d, -408 },
+ { 0xd389b478, 0x79823479, 0x4aff1d10, -405 }, { 0x843610cb, 0x4bf160cb, 0xcedf722a, -401 },
+ { 0xa54394fe, 0x1eedb8fe, 0xc2974eb4, -398 }, { 0xce947a3d, 0xa6a9273e, 0x733d2262, -395 },
+ { 0x811ccc66, 0x8829b887, 0x0806357d, -391 }, { 0xa163ff80, 0x2a3426a8, 0xca07c2dc, -388 },
+ { 0xc9bcff60, 0x34c13052, 0xfc89b393, -385 }, { 0xfc2c3f38, 0x41f17c67, 0xbbac2078, -382 },
+ { 0x9d9ba783, 0x2936edc0, 0xd54b944b, -378 }, { 0xc5029163, 0xf384a931, 0x0a9e795e, -375 },
+ { 0xf64335bc, 0xf065d37d, 0x4d4617b5, -372 }, { 0x99ea0196, 0x163fa42e, 0x504bced1, -368 },
+ { 0xc06481fb, 0x9bcf8d39, 0xe45ec286, -365 }, { 0xf07da27a, 0x82c37088, 0x5d767327, -362 },
+ { 0x964e858c, 0x91ba2655, 0x3a6a07f8, -358 }, { 0xbbe226ef, 0xb628afea, 0x890489f7, -355 },
+ { 0xeadab0ab, 0xa3b2dbe5, 0x2b45ac74, -352 }, { 0x92c8ae6b, 0x464fc96f, 0x3b0b8bc9, -348 },
+ { 0xb77ada06, 0x17e3bbcb, 0x09ce6ebb, -345 }, { 0xe5599087, 0x9ddcaabd, 0xcc420a6a, -342 },
+ { 0x8f57fa54, 0xc2a9eab6, 0x9fa94682, -338 }, { 0xb32df8e9, 0xf3546564, 0x47939822, -335 },
+ { 0xdff97724, 0x70297ebd, 0x59787e2b, -332 }, { 0x8bfbea76, 0xc619ef36, 0x57eb4edb, -328 },
+ { 0xaefae514, 0x77a06b03, 0xede62292, -325 }, { 0xdab99e59, 0x958885c4, 0xe95fab36, -322 },
+ { 0x88b402f7, 0xfd75539b, 0x11dbcb02, -318 }, { 0xaae103b5, 0xfcd2a881, 0xd652bdc2, -315 },
+ { 0xd59944a3, 0x7c0752a2, 0x4be76d33, -312 }, { 0x857fcae6, 0x2d8493a5, 0x6f70a440, -308 },
+ { 0xa6dfbd9f, 0xb8e5b88e, 0xcb4ccd50, -305 }, { 0xd097ad07, 0xa71f26b2, 0x7e2000a4, -302 },
+ { 0x825ecc24, 0xc873782f, 0x8ed40066, -298 }, { 0xa2f67f2d, 0xfa90563b, 0x72890080, -295 },
+ { 0xcbb41ef9, 0x79346bca, 0x4f2b40a0, -292 }, { 0xfea126b7, 0xd78186bc, 0xe2f610c8, -289 },
+ { 0x9f24b832, 0xe6b0f436, 0x0dd9ca7d, -285 }, { 0xc6ede63f, 0xa05d3143, 0x91503d1c, -282 },
+ { 0xf8a95fcf, 0x88747d94, 0x75a44c63, -279 }, { 0x9b69dbe1, 0xb548ce7c, 0xc986afbe, -275 },
+ { 0xc24452da, 0x229b021b, 0xfbe85bad, -272 }, { 0xf2d56790, 0xab41c2a2, 0xfae27299, -269 },
+ { 0x97c560ba, 0x6b0919a5, 0xdccd879f, -265 }, { 0xbdb6b8e9, 0x05cb600f, 0x5400e987, -262 },
+ { 0xed246723, 0x473e3813, 0x290123e9, -259 }, { 0x9436c076, 0x0c86e30b, 0xf9a0b672, -255 },
+ { 0xb9447093, 0x8fa89bce, 0xf808e40e, -252 }, { 0xe7958cb8, 0x7392c2c2, 0xb60b1d12, -249 },
+ { 0x90bd77f3, 0x483bb9b9, 0xb1c6f22b, -245 }, { 0xb4ecd5f0, 0x1a4aa828, 0x1e38aeb6, -242 },
+ { 0xe2280b6c, 0x20dd5232, 0x25c6da63, -239 }, { 0x8d590723, 0x948a535f, 0x579c487e, -235 },
+ { 0xb0af48ec, 0x79ace837, 0x2d835a9d, -232 }, { 0xdcdb1b27, 0x98182244, 0xf8e43145, -229 },
+ { 0x8a08f0f8, 0xbf0f156b, 0x1b8e9ecb, -225 }, { 0xac8b2d36, 0xeed2dac5, 0xe272467e, -222 },
+ { 0xd7adf884, 0xaa879177, 0x5b0ed81d, -219 }, { 0x86ccbb52, 0xea94baea, 0x98e94712, -215 },
+ { 0xa87fea27, 0xa539e9a5, 0x3f2398d7, -212 }, { 0xd29fe4b1, 0x8e88640e, 0x8eec7f0d, -209 },
+ { 0x83a3eeee, 0xf9153e89, 0x1953cf68, -205 }, { 0xa48ceaaa, 0xb75a8e2b, 0x5fa8c342, -202 },
+ { 0xcdb02555, 0x653131b6, 0x3792f412, -199 }, { 0x808e1755, 0x5f3ebf11, 0xe2bbd88b, -195 },
+ { 0xa0b19d2a, 0xb70e6ed6, 0x5b6aceae, -192 }, { 0xc8de0475, 0x64d20a8b, 0xf245825a, -189 },
+ { 0xfb158592, 0xbe068d2e, 0xeed6e2f0, -186 }, { 0x9ced737b, 0xb6c4183d, 0x55464dd6, -182 },
+ { 0xc428d05a, 0xa4751e4c, 0xaa97e14c, -179 }, { 0xf5330471, 0x4d9265df, 0xd53dd99f, -176 },
+ { 0x993fe2c6, 0xd07b7fab, 0xe546a803, -172 }, { 0xbf8fdb78, 0x849a5f96, 0xde985204, -169 },
+ { 0xef73d256, 0xa5c0f77c, 0x963e6685, -166 }, { 0x95a86376, 0x27989aad, 0xdde70013, -162 },
+ { 0xbb127c53, 0xb17ec159, 0x5560c018, -159 }, { 0xe9d71b68, 0x9dde71af, 0xaab8f01e, -156 },
+ { 0x92267121, 0x62ab070d, 0xcab39613, -152 }, { 0xb6b00d69, 0xbb55c8d1, 0x3d607b97, -149 },
+ { 0xe45c10c4, 0x2a2b3b05, 0x8cb89a7d, -146 }, { 0x8eb98a7a, 0x9a5b04e3, 0x77f3608e, -142 },
+ { 0xb267ed19, 0x40f1c61c, 0x55f038b2, -139 }, { 0xdf01e85f, 0x912e37a3, 0x6b6c46de, -136 },
+ { 0x8b61313b, 0xbabce2c6, 0x2323ac4b, -132 }, { 0xae397d8a, 0xa96c1b77, 0xabec975e, -129 },
+ { 0xd9c7dced, 0x53c72255, 0x96e7bd35, -126 }, { 0x881cea14, 0x545c7575, 0x7e50d641, -122 },
+ { 0xaa242499, 0x697392d2, 0xdde50bd1, -119 }, { 0xd4ad2dbf, 0xc3d07787, 0x955e4ec6, -116 },
+ { 0x84ec3c97, 0xda624ab4, 0xbd5af13b, -112 }, { 0xa6274bbd, 0xd0fadd61, 0xecb1ad8a, -109 },
+ { 0xcfb11ead, 0x453994ba, 0x67de18ed, -106 }, { 0x81ceb32c, 0x4b43fcf4, 0x80eacf94, -102 },
+ { 0xa2425ff7, 0x5e14fc31, 0xa1258379, -99 }, { 0xcad2f7f5, 0x359a3b3e, 0x096ee458, -96 },
+ { 0xfd87b5f2, 0x8300ca0d, 0x8bca9d6e, -93 }, { 0x9e74d1b7, 0x91e07e48, 0x775ea264, -89 },
+ { 0xc6120625, 0x76589dda, 0x95364afe, -86 }, { 0xf79687ae, 0xd3eec551, 0x3a83ddbd, -83 },
+ { 0x9abe14cd, 0x44753b52, 0xc4926a96, -79 }, { 0xc16d9a00, 0x95928a27, 0x75b7053c, -76 },
+ { 0xf1c90080, 0xbaf72cb1, 0x5324c68b, -73 }, { 0x971da050, 0x74da7bee, 0xd3f6fc16, -69 },
+ { 0xbce50864, 0x92111aea, 0x88f4bb1c, -66 }, { 0xec1e4a7d, 0xb69561a5, 0x2b31e9e3, -63 },
+ { 0x9392ee8e, 0x921d5d07, 0x3aff322e, -59 }, { 0xb877aa32, 0x36a4b449, 0x09befeb9, -56 },
+ { 0xe69594be, 0xc44de15b, 0x4c2ebe68, -53 }, { 0x901d7cf7, 0x3ab0acd9, 0x0f9d3701, -49 },
+ { 0xb424dc35, 0x095cd80f, 0x538484c1, -46 }, { 0xe12e1342, 0x4bb40e13, 0x2865a5f2, -43 },
+ { 0x8cbccc09, 0x6f5088cb, 0xf93f87b7, -39 }, { 0xafebff0b, 0xcb24aafe, 0xf78f69a5, -36 },
+ { 0xdbe6fece, 0xbdedd5be, 0xb573440e, -33 }, { 0x89705f41, 0x36b4a597, 0x31680a88, -29 },
+ { 0xabcc7711, 0x8461cefc, 0xfdc20d2b, -26 }, { 0xd6bf94d5, 0xe57a42bc, 0x3d329076, -23 },
+ { 0x8637bd05, 0xaf6c69b5, 0xa63f9a49, -19 }, { 0xa7c5ac47, 0x1b478423, 0x0fcf80dc, -16 },
+ { 0xd1b71758, 0xe219652b, 0xd3c36113, -13 }, { 0x83126e97, 0x8d4fdf3b, 0x645a1cac, -9 },
+ { 0xa3d70a3d, 0x70a3d70a, 0x3d70a3d7, -6 }, { 0xcccccccc, 0xcccccccc, 0xcccccccc, -3 },
+ { 0x80000000, 0x00000000, 0x00000000, 1 }, { 0xa0000000, 0x00000000, 0x00000000, 4 },
+ { 0xc8000000, 0x00000000, 0x00000000, 7 }, { 0xfa000000, 0x00000000, 0x00000000, 10 },
+ { 0x9c400000, 0x00000000, 0x00000000, 14 }, { 0xc3500000, 0x00000000, 0x00000000, 17 },
+ { 0xf4240000, 0x00000000, 0x00000000, 20 }, { 0x98968000, 0x00000000, 0x00000000, 24 },
+ { 0xbebc2000, 0x00000000, 0x00000000, 27 }, { 0xee6b2800, 0x00000000, 0x00000000, 30 },
+ { 0x9502f900, 0x00000000, 0x00000000, 34 }, { 0xba43b740, 0x00000000, 0x00000000, 37 },
+ { 0xe8d4a510, 0x00000000, 0x00000000, 40 }, { 0x9184e72a, 0x00000000, 0x00000000, 44 },
+ { 0xb5e620f4, 0x80000000, 0x00000000, 47 }, { 0xe35fa931, 0xa0000000, 0x00000000, 50 },
+ { 0x8e1bc9bf, 0x04000000, 0x00000000, 54 }, { 0xb1a2bc2e, 0xc5000000, 0x00000000, 57 },
+ { 0xde0b6b3a, 0x76400000, 0x00000000, 60 }, { 0x8ac72304, 0x89e80000, 0x00000000, 64 },
+ { 0xad78ebc5, 0xac620000, 0x00000000, 67 }, { 0xd8d726b7, 0x177a8000, 0x00000000, 70 },
+ { 0x87867832, 0x6eac9000, 0x00000000, 74 }, { 0xa968163f, 0x0a57b400, 0x00000000, 77 },
+ { 0xd3c21bce, 0xcceda100, 0x00000000, 80 }, { 0x84595161, 0x401484a0, 0x00000000, 84 },
+ { 0xa56fa5b9, 0x9019a5c8, 0x00000000, 87 }, { 0xcecb8f27, 0xf4200f3a, 0x00000000, 90 },
+ { 0x813f3978, 0xf8940984, 0x40000000, 94 }, { 0xa18f07d7, 0x36b90be5, 0x50000000, 97 },
+ { 0xc9f2c9cd, 0x04674ede, 0xa4000000, 100 }, { 0xfc6f7c40, 0x45812296, 0x4d000000, 103 },
+ { 0x9dc5ada8, 0x2b70b59d, 0xf0200000, 107 }, { 0xc5371912, 0x364ce305, 0x6c280000, 110 },
+ { 0xf684df56, 0xc3e01bc6, 0xc7320000, 113 }, { 0x9a130b96, 0x3a6c115c, 0x3c7f4000, 117 },
+ { 0xc097ce7b, 0xc90715b3, 0x4b9f1000, 120 }, { 0xf0bdc21a, 0xbb48db20, 0x1e86d400, 123 },
+ { 0x96769950, 0xb50d88f4, 0x13144480, 127 }, { 0xbc143fa4, 0xe250eb31, 0x17d955a0, 130 },
+ { 0xeb194f8e, 0x1ae525fd, 0x5dcfab08, 133 }, { 0x92efd1b8, 0xd0cf37be, 0x5aa1cae5, 137 },
+ { 0xb7abc627, 0x050305ad, 0xf14a3d9e, 140 }, { 0xe596b7b0, 0xc643c719, 0x6d9ccd05, 143 },
+ { 0x8f7e32ce, 0x7bea5c6f, 0xe4820023, 147 }, { 0xb35dbf82, 0x1ae4f38b, 0xdda2802c, 150 },
+ { 0xe0352f62, 0xa19e306e, 0xd50b2037, 153 }, { 0x8c213d9d, 0xa502de45, 0x4526f422, 157 },
+ { 0xaf298d05, 0x0e4395d6, 0x9670b12b, 160 }, { 0xdaf3f046, 0x51d47b4c, 0x3c0cdd76, 163 },
+ { 0x88d8762b, 0xf324cd0f, 0xa5880a69, 167 }, { 0xab0e93b6, 0xefee0053, 0x8eea0d04, 170 },
+ { 0xd5d238a4, 0xabe98068, 0x72a49045, 173 }, { 0x85a36366, 0xeb71f041, 0x47a6da2b, 177 },
+ { 0xa70c3c40, 0xa64e6c51, 0x999090b6, 180 }, { 0xd0cf4b50, 0xcfe20765, 0xfff4b4e3, 183 },
+ { 0x82818f12, 0x81ed449f, 0xbff8f10e, 187 }, { 0xa321f2d7, 0x226895c7, 0xaff72d52, 190 },
+ { 0xcbea6f8c, 0xeb02bb39, 0x9bf4f8a6, 193 }, { 0xfee50b70, 0x25c36a08, 0x02f236d0, 196 },
+ { 0x9f4f2726, 0x179a2245, 0x01d76242, 200 }, { 0xc722f0ef, 0x9d80aad6, 0x424d3ad2, 203 },
+ { 0xf8ebad2b, 0x84e0d58b, 0xd2e08987, 206 }, { 0x9b934c3b, 0x330c8577, 0x63cc55f4, 210 },
+ { 0xc2781f49, 0xffcfa6d5, 0x3cbf6b71, 213 }, { 0xf316271c, 0x7fc3908a, 0x8bef464e, 216 },
+ { 0x97edd871, 0xcfda3a56, 0x97758bf0, 220 }, { 0xbde94e8e, 0x43d0c8ec, 0x3d52eeed, 223 },
+ { 0xed63a231, 0xd4c4fb27, 0x4ca7aaa8, 226 }, { 0x945e455f, 0x24fb1cf8, 0x8fe8caa9, 230 },
+ { 0xb975d6b6, 0xee39e436, 0xb3e2fd53, 233 }, { 0xe7d34c64, 0xa9c85d44, 0x60dbbca8, 236 },
+ { 0x90e40fbe, 0xea1d3a4a, 0xbc8955e9, 240 }, { 0xb51d13ae, 0xa4a488dd, 0x6babab63, 243 },
+ { 0xe264589a, 0x4dcdab14, 0xc696963c, 246 }, { 0x8d7eb760, 0x70a08aec, 0xfc1e1de5, 250 },
+ { 0xb0de6538, 0x8cc8ada8, 0x3b25a55f, 253 }, { 0xdd15fe86, 0xaffad912, 0x49ef0eb7, 256 },
+ { 0x8a2dbf14, 0x2dfcc7ab, 0x6e356932, 260 }, { 0xacb92ed9, 0x397bf996, 0x49c2c37f, 263 },
+ { 0xd7e77a8f, 0x87daf7fb, 0xdc33745e, 266 }, { 0x86f0ac99, 0xb4e8dafd, 0x69a028bb, 270 },
+ { 0xa8acd7c0, 0x222311bc, 0xc40832ea, 273 }, { 0xd2d80db0, 0x2aabd62b, 0xf50a3fa4, 276 },
+ { 0x83c7088e, 0x1aab65db, 0x792667c6, 280 }, { 0xa4b8cab1, 0xa1563f52, 0x577001b8, 283 },
+ { 0xcde6fd5e, 0x09abcf26, 0xed4c0226, 286 }, { 0x80b05e5a, 0xc60b6178, 0x544f8158, 290 },
+ { 0xa0dc75f1, 0x778e39d6, 0x696361ae, 293 }, { 0xc913936d, 0xd571c84c, 0x03bc3a19, 296 },
+ { 0xfb587849, 0x4ace3a5f, 0x04ab48a0, 299 }, { 0x9d174b2d, 0xcec0e47b, 0x62eb0d64, 303 },
+ { 0xc45d1df9, 0x42711d9a, 0x3ba5d0bd, 306 }, { 0xf5746577, 0x930d6500, 0xca8f44ec, 309 },
+ { 0x9968bf6a, 0xbbe85f20, 0x7e998b13, 313 }, { 0xbfc2ef45, 0x6ae276e8, 0x9e3fedd8, 316 },
+ { 0xefb3ab16, 0xc59b14a2, 0xc5cfe94e, 319 }, { 0x95d04aee, 0x3b80ece5, 0xbba1f1d1, 323 },
+ { 0xbb445da9, 0xca61281f, 0x2a8a6e45, 326 }, { 0xea157514, 0x3cf97226, 0xf52d09d7, 329 },
+ { 0x924d692c, 0xa61be758, 0x593c2626, 333 }, { 0xb6e0c377, 0xcfa2e12e, 0x6f8b2fb0, 336 },
+ { 0xe498f455, 0xc38b997a, 0x0b6dfb9c, 339 }, { 0x8edf98b5, 0x9a373fec, 0x4724bd41, 343 },
+ { 0xb2977ee3, 0x00c50fe7, 0x58edec91, 346 }, { 0xdf3d5e9b, 0xc0f653e1, 0x2f2967b6, 349 },
+ { 0x8b865b21, 0x5899f46c, 0xbd79e0d2, 353 }, { 0xae67f1e9, 0xaec07187, 0xecd85906, 356 },
+ { 0xda01ee64, 0x1a708de9, 0xe80e6f48, 359 }, { 0x884134fe, 0x908658b2, 0x3109058d, 363 },
+ { 0xaa51823e, 0x34a7eede, 0xbd4b46f0, 366 }, { 0xd4e5e2cd, 0xc1d1ea96, 0x6c9e18ac, 369 },
+ { 0x850fadc0, 0x9923329e, 0x03e2cf6b, 373 }, { 0xa6539930, 0xbf6bff45, 0x84db8346, 376 },
+ { 0xcfe87f7c, 0xef46ff16, 0xe6126418, 379 }, { 0x81f14fae, 0x158c5f6e, 0x4fcb7e8f, 383 },
+ { 0xa26da399, 0x9aef7749, 0xe3be5e33, 386 }, { 0xcb090c80, 0x01ab551c, 0x5cadf5bf, 389 },
+ { 0xfdcb4fa0, 0x02162a63, 0x73d9732f, 392 }, { 0x9e9f11c4, 0x014dda7e, 0x2867e7fd, 396 },
+ { 0xc646d635, 0x01a1511d, 0xb281e1fd, 399 }, { 0xf7d88bc2, 0x4209a565, 0x1f225a7c, 402 },
+ { 0x9ae75759, 0x6946075f, 0x3375788d, 406 }, { 0xc1a12d2f, 0xc3978937, 0x0052d6b1, 409 },
+ { 0xf209787b, 0xb47d6b84, 0xc0678c5d, 412 }, { 0x9745eb4d, 0x50ce6332, 0xf840b7ba, 416 },
+ { 0xbd176620, 0xa501fbff, 0xb650e5a9, 419 }, { 0xec5d3fa8, 0xce427aff, 0xa3e51f13, 422 },
+ { 0x93ba47c9, 0x80e98cdf, 0xc66f336c, 426 }, { 0xb8a8d9bb, 0xe123f017, 0xb80b0047, 429 },
+ { 0xe6d3102a, 0xd96cec1d, 0xa60dc059, 432 }, { 0x9043ea1a, 0xc7e41392, 0x87c89837, 436 },
+ { 0xb454e4a1, 0x79dd1877, 0x29babe45, 439 }, { 0xe16a1dc9, 0xd8545e94, 0xf4296dd6, 442 },
+ { 0x8ce2529e, 0x2734bb1d, 0x1899e4a6, 446 }, { 0xb01ae745, 0xb101e9e4, 0x5ec05dcf, 449 },
+ { 0xdc21a117, 0x1d42645d, 0x76707543, 452 }, { 0x899504ae, 0x72497eba, 0x6a06494a, 456 },
+ { 0xabfa45da, 0x0edbde69, 0x0487db9d, 459 }, { 0xd6f8d750, 0x9292d603, 0x45a9d284, 462 },
+ { 0x865b8692, 0x5b9bc5c2, 0x0b8a2392, 466 }, { 0xa7f26836, 0xf282b732, 0x8e6cac77, 469 },
+ { 0xd1ef0244, 0xaf2364ff, 0x3207d795, 472 }, { 0x8335616a, 0xed761f1f, 0x7f44e6bd, 476 },
+ { 0xa402b9c5, 0xa8d3a6e7, 0x5f16206c, 479 }, { 0xcd036837, 0x130890a1, 0x36dba887, 482 },
+ { 0x80222122, 0x6be55a64, 0xc2494954, 486 }, { 0xa02aa96b, 0x06deb0fd, 0xf2db9baa, 489 },
+ { 0xc83553c5, 0xc8965d3d, 0x6f928294, 492 }, { 0xfa42a8b7, 0x3abbf48c, 0xcb772339, 495 },
+ { 0x9c69a972, 0x84b578d7, 0xff2a7604, 499 }, { 0xc38413cf, 0x25e2d70d, 0xfef51385, 502 },
+ { 0xf46518c2, 0xef5b8cd1, 0x7eb25866, 505 }, { 0x98bf2f79, 0xd5993802, 0xef2f773f, 509 },
+ { 0xbeeefb58, 0x4aff8603, 0xaafb550f, 512 }, { 0xeeaaba2e, 0x5dbf6784, 0x95ba2a53, 515 },
+ { 0x952ab45c, 0xfa97a0b2, 0xdd945a74, 519 }, { 0xba756174, 0x393d88df, 0x94f97111, 522 },
+ { 0xe912b9d1, 0x478ceb17, 0x7a37cd56, 525 }, { 0x91abb422, 0xccb812ee, 0xac62e055, 529 },
+ { 0xb616a12b, 0x7fe617aa, 0x577b986b, 532 }, { 0xe39c4976, 0x5fdf9d94, 0xed5a7e85, 535 },
+ { 0x8e41ade9, 0xfbebc27d, 0x14588f13, 539 }, { 0xb1d21964, 0x7ae6b31c, 0x596eb2d8, 542 },
+ { 0xde469fbd, 0x99a05fe3, 0x6fca5f8e, 545 }, { 0x8aec23d6, 0x80043bee, 0x25de7bb9, 549 },
+ { 0xada72ccc, 0x20054ae9, 0xaf561aa7, 552 }, { 0xd910f7ff, 0x28069da4, 0x1b2ba151, 555 },
+ { 0x87aa9aff, 0x79042286, 0x90fb44d2, 559 }, { 0xa99541bf, 0x57452b28, 0x353a1607, 562 },
+ { 0xd3fa922f, 0x2d1675f2, 0x42889b89, 565 }, { 0x847c9b5d, 0x7c2e09b7, 0x69956135, 569 },
+ { 0xa59bc234, 0xdb398c25, 0x43fab983, 572 }, { 0xcf02b2c2, 0x1207ef2e, 0x94f967e4, 575 },
+ { 0x8161afb9, 0x4b44f57d, 0x1d1be0ee, 579 }, { 0xa1ba1ba7, 0x9e1632dc, 0x6462d92a, 582 },
+ { 0xca28a291, 0x859bbf93, 0x7d7b8f75, 585 }, { 0xfcb2cb35, 0xe702af78, 0x5cda7352, 588 },
+ { 0x9defbf01, 0xb061adab, 0x3a088813, 592 }, { 0xc56baec2, 0x1c7a1916, 0x088aaa18, 595 },
+ { 0xf6c69a72, 0xa3989f5b, 0x8aad549e, 598 }, { 0x9a3c2087, 0xa63f6399, 0x36ac54e2, 602 },
+ { 0xc0cb28a9, 0x8fcf3c7f, 0x84576a1b, 605 }, { 0xf0fdf2d3, 0xf3c30b9f, 0x656d44a2, 608 },
+ { 0x969eb7c4, 0x7859e743, 0x9f644ae5, 612 }, { 0xbc4665b5, 0x96706114, 0x873d5d9f, 615 },
+ { 0xeb57ff22, 0xfc0c7959, 0xa90cb506, 618 }, { 0x9316ff75, 0xdd87cbd8, 0x09a7f124, 622 },
+ { 0xb7dcbf53, 0x54e9bece, 0x0c11ed6d, 625 }, { 0xe5d3ef28, 0x2a242e81, 0x8f1668c8, 628 },
+ { 0x8fa47579, 0x1a569d10, 0xf96e017d, 632 }, { 0xb38d92d7, 0x60ec4455, 0x37c981dc, 635 },
+ { 0xe070f78d, 0x3927556a, 0x85bbe253, 638 }, { 0x8c469ab8, 0x43b89562, 0x93956d74, 642 },
+ { 0xaf584166, 0x54a6babb, 0x387ac8d1, 645 }, { 0xdb2e51bf, 0xe9d0696a, 0x06997b05, 648 },
+ { 0x88fcf317, 0xf22241e2, 0x441fece3, 652 }, { 0xab3c2fdd, 0xeeaad25a, 0xd527e81c, 655 },
+ { 0xd60b3bd5, 0x6a5586f1, 0x8a71e223, 658 }, { 0x85c70565, 0x62757456, 0xf6872d56, 662 },
+ { 0xa738c6be, 0xbb12d16c, 0xb428f8ac, 665 }, { 0xd106f86e, 0x69d785c7, 0xe13336d7, 668 },
+ { 0x82a45b45, 0x0226b39c, 0xecc00246, 672 }, { 0xa34d7216, 0x42b06084, 0x27f002d7, 675 },
+ { 0xcc20ce9b, 0xd35c78a5, 0x31ec038d, 678 }, { 0xff290242, 0xc83396ce, 0x7e670471, 681 },
+ { 0x9f79a169, 0xbd203e41, 0x0f0062c6, 685 }, { 0xc75809c4, 0x2c684dd1, 0x52c07b78, 688 },
+ { 0xf92e0c35, 0x37826145, 0xa7709a56, 691 }, { 0x9bbcc7a1, 0x42b17ccb, 0x88a66076, 695 },
+ { 0xc2abf989, 0x935ddbfe, 0x6acff893, 698 }, { 0xf356f7eb, 0xf83552fe, 0x0583f6b8, 701 },
+ { 0x98165af3, 0x7b2153de, 0xc3727a33, 705 }, { 0xbe1bf1b0, 0x59e9a8d6, 0x744f18c0, 708 },
+ { 0xeda2ee1c, 0x7064130c, 0x1162def0, 711 }, { 0x9485d4d1, 0xc63e8be7, 0x8addcb56, 715 },
+ { 0xb9a74a06, 0x37ce2ee1, 0x6d953e2b, 718 }, { 0xe8111c87, 0xc5c1ba99, 0xc8fa8db6, 721 },
+ { 0x910ab1d4, 0xdb9914a0, 0x1d9c9892, 725 }, { 0xb54d5e4a, 0x127f59c8, 0x2503beb6, 728 },
+ { 0xe2a0b5dc, 0x971f303a, 0x2e44ae64, 731 }, { 0x8da471a9, 0xde737e24, 0x5ceaecfe, 735 },
+ { 0xb10d8e14, 0x56105dad, 0x7425a83e, 738 }, { 0xdd50f199, 0x6b947518, 0xd12f124e, 741 },
+ { 0x8a5296ff, 0xe33cc92f, 0x82bd6b70, 745 }, { 0xace73cbf, 0xdc0bfb7b, 0x636cc64d, 748 },
+ { 0xd8210bef, 0xd30efa5a, 0x3c47f7e0, 751 }, { 0x8714a775, 0xe3e95c78, 0x65acfaec, 755 },
+ { 0xa8d9d153, 0x5ce3b396, 0x7f1839a7, 758 }, { 0xd31045a8, 0x341ca07c, 0x1ede4811, 761 },
+ { 0x83ea2b89, 0x2091e44d, 0x934aed0a, 765 }, { 0xa4e4b66b, 0x68b65d60, 0xf81da84d, 768 },
+ { 0xce1de406, 0x42e3f4b9, 0x36251260, 771 }, { 0x80d2ae83, 0xe9ce78f3, 0xc1d72b7c, 775 },
+ { 0xa1075a24, 0xe4421730, 0xb24cf65b, 778 }, { 0xc94930ae, 0x1d529cfc, 0xdee033f2, 781 },
+ { 0xfb9b7cd9, 0xa4a7443c, 0x169840ef, 784 }, { 0x9d412e08, 0x06e88aa5, 0x8e1f2895, 788 },
+ { 0xc491798a, 0x08a2ad4e, 0xf1a6f2ba, 791 }, { 0xf5b5d7ec, 0x8acb58a2, 0xae10af69, 794 },
+ { 0x9991a6f3, 0xd6bf1765, 0xacca6da1, 798 }, { 0xbff610b0, 0xcc6edd3f, 0x17fd090a, 801 },
+ { 0xeff394dc, 0xff8a948e, 0xddfc4b4c, 804 }, { 0x95f83d0a, 0x1fb69cd9, 0x4abdaf10, 808 },
+ { 0xbb764c4c, 0xa7a4440f, 0x9d6d1ad4, 811 }, { 0xea53df5f, 0xd18d5513, 0x84c86189, 814 },
+ { 0x92746b9b, 0xe2f8552c, 0x32fd3cf5, 818 }, { 0xb7118682, 0xdbb66a77, 0x3fbc8c33, 821 },
+ { 0xe4d5e823, 0x92a40515, 0x0fabaf3f, 824 }, { 0x8f05b116, 0x3ba6832d, 0x29cb4d87, 828 },
+ { 0xb2c71d5b, 0xca9023f8, 0x743e20e9, 831 }, { 0xdf78e4b2, 0xbd342cf6, 0x914da924, 834 },
+ { 0x8bab8eef, 0xb6409c1a, 0x1ad089b6, 838 }, { 0xae9672ab, 0xa3d0c320, 0xa184ac24, 841 },
+ { 0xda3c0f56, 0x8cc4f3e8, 0xc9e5d72d, 844 }, { 0x88658996, 0x17fb1871, 0x7e2fa67c, 848 },
+ { 0xaa7eebfb, 0x9df9de8d, 0xddbb901b, 851 }, { 0xd51ea6fa, 0x85785631, 0x552a7422, 854 },
+ { 0x8533285c, 0x936b35de, 0xd53a8895, 858 }, { 0xa67ff273, 0xb8460356, 0x8a892aba, 861 },
+ { 0xd01fef10, 0xa657842c, 0x2d2b7569, 864 }, { 0x8213f56a, 0x67f6b29b, 0x9c3b2962, 868 },
+ { 0xa298f2c5, 0x01f45f42, 0x8349f3ba, 871 }, { 0xcb3f2f76, 0x42717713, 0x241c70a9, 874 },
+ { 0xfe0efb53, 0xd30dd4d7, 0xed238cd3, 877 }, { 0x9ec95d14, 0x63e8a506, 0xf4363804, 881 },
+ { 0xc67bb459, 0x7ce2ce48, 0xb143c605, 884 }, { 0xf81aa16f, 0xdc1b81da, 0xdd94b786, 887 },
+ { 0x9b10a4e5, 0xe9913128, 0xca7cf2b4, 891 }, { 0xc1d4ce1f, 0x63f57d72, 0xfd1c2f61, 894 },
+ { 0xf24a01a7, 0x3cf2dccf, 0xbc633b39, 897 }, { 0x976e4108, 0x8617ca01, 0xd5be0503, 901 },
+ { 0xbd49d14a, 0xa79dbc82, 0x4b2d8644, 904 }, { 0xec9c459d, 0x51852ba2, 0xddf8e7d6, 907 },
+ { 0x93e1ab82, 0x52f33b45, 0xcabb90e5, 911 }, { 0xb8da1662, 0xe7b00a17, 0x3d6a751f, 914 },
+ { 0xe7109bfb, 0xa19c0c9d, 0x0cc51267, 917 }, { 0x906a617d, 0x450187e2, 0x27fb2b80, 921 },
+ { 0xb484f9dc, 0x9641e9da, 0xb1f9f660, 924 }, { 0xe1a63853, 0xbbd26451, 0x5e7873f8, 927 },
+ { 0x8d07e334, 0x55637eb2, 0xdb0b487b, 931 }, { 0xb049dc01, 0x6abc5e5f, 0x91ce1a9a, 934 },
+ { 0xdc5c5301, 0xc56b75f7, 0x7641a140, 937 }, { 0x89b9b3e1, 0x1b6329ba, 0xa9e904c8, 941 },
+ { 0xac2820d9, 0x623bf429, 0x546345fa, 944 }, { 0xd732290f, 0xbacaf133, 0xa97c1779, 947 },
+ { 0x867f59a9, 0xd4bed6c0, 0x49ed8eab, 951 }, { 0xa81f3014, 0x49ee8c70, 0x5c68f256, 954 },
+ { 0xd226fc19, 0x5c6a2f8c, 0x73832eec, 957 }, { 0x83585d8f, 0xd9c25db7, 0xc831fd53, 961 },
+ { 0xa42e74f3, 0xd032f525, 0xba3e7ca8, 964 }, { 0xcd3a1230, 0xc43fb26f, 0x28ce1bd2, 967 },
+ { 0x80444b5e, 0x7aa7cf85, 0x7980d163, 971 }, { 0xa0555e36, 0x1951c366, 0xd7e105bc, 974 },
+ { 0xc86ab5c3, 0x9fa63440, 0x8dd9472b, 977 }, { 0xfa856334, 0x878fc150, 0xb14f98f6, 980 },
+ { 0x9c935e00, 0xd4b9d8d2, 0x6ed1bf9a, 984 }, { 0xc3b83581, 0x09e84f07, 0x0a862f80, 987 },
+ { 0xf4a642e1, 0x4c6262c8, 0xcd27bb61, 990 }, { 0x98e7e9cc, 0xcfbd7dbd, 0x8038d51c, 994 },
+ { 0xbf21e440, 0x03acdd2c, 0xe0470a63, 997 }, { 0xeeea5d50, 0x04981478, 0x1858ccfc, 1000 },
+ { 0x95527a52, 0x02df0ccb, 0x0f37801e, 1004 }, { 0xbaa718e6, 0x8396cffd, 0xd3056025, 1007 },
+ { 0xe950df20, 0x247c83fd, 0x47c6b82e, 1010 }, { 0x91d28b74, 0x16cdd27e, 0x4cdc331d, 1014 },
+ { 0xb6472e51, 0x1c81471d, 0xe0133fe4, 1017 }, { 0xe3d8f9e5, 0x63a198e5, 0x58180fdd, 1020 },
+ { 0x8e679c2f, 0x5e44ff8f, 0x570f09ea, 1024 }, { 0xb201833b, 0x35d63f73, 0x2cd2cc65, 1027 },
+ { 0xde81e40a, 0x034bcf4f, 0xf8077f7e, 1030 }, { 0x8b112e86, 0x420f6191, 0xfb04afaf, 1034 },
+ { 0xadd57a27, 0xd29339f6, 0x79c5db9a, 1037 }, { 0xd94ad8b1, 0xc7380874, 0x18375281, 1040 },
+ { 0x87cec76f, 0x1c830548, 0x8f229391, 1044 }, { 0xa9c2794a, 0xe3a3c69a, 0xb2eb3875, 1047 },
+ { 0xd433179d, 0x9c8cb841, 0x5fa60692, 1050 }, { 0x849feec2, 0x81d7f328, 0xdbc7c41b, 1054 },
+ { 0xa5c7ea73, 0x224deff3, 0x12b9b522, 1057 }, { 0xcf39e50f, 0xeae16bef, 0xd768226b, 1060 },
+ { 0x81842f29, 0xf2cce375, 0xe6a11583, 1064 }, { 0xa1e53af4, 0x6f801c53, 0x60495ae3, 1067 },
+ { 0xca5e89b1, 0x8b602368, 0x385bb19c, 1070 }, { 0xfcf62c1d, 0xee382c42, 0x46729e03, 1073 },
{ 0x9e19db92, 0xb4e31ba9, 0x6c07a2c2, 1077 } };
static short int Lhint[2098] = {
- /*18,*/ 19, 19, 19, 19, 20, 20, 20, 21, 21, 21, 22,
- 22, 22, 23, 23, 23, 23, 24, 24, 24, 25, 25,
- 25, 26, 26, 26, 26, 27, 27, 27, 28, 28, 28,
- 29, 29, 29, 29, 30, 30, 30, 31, 31, 31, 32,
- 32, 32, 32, 33, 33, 33, 34, 34, 34, 35, 35,
- 35, 35, 36, 36, 36, 37, 37, 37, 38, 38, 38,
- 38, 39, 39, 39, 40, 40, 40, 41, 41, 41, 41,
- 42, 42, 42, 43, 43, 43, 44, 44, 44, 44, 45,
- 45, 45, 46, 46, 46, 47, 47, 47, 47, 48, 48,
- 48, 49, 49, 49, 50, 50, 50, 51, 51, 51, 51,
- 52, 52, 52, 53, 53, 53, 54, 54, 54, 54, 55,
- 55, 55, 56, 56, 56, 57, 57, 57, 57, 58, 58,
- 58, 59, 59, 59, 60, 60, 60, 60, 61, 61, 61,
- 62, 62, 62, 63, 63, 63, 63, 64, 64, 64, 65,
- 65, 65, 66, 66, 66, 66, 67, 67, 67, 68, 68,
- 68, 69, 69, 69, 69, 70, 70, 70, 71, 71, 71,
- 72, 72, 72, 72, 73, 73, 73, 74, 74, 74, 75,
- 75, 75, 75, 76, 76, 76, 77, 77, 77, 78, 78,
- 78, 78, 79, 79, 79, 80, 80, 80, 81, 81, 81,
- 82, 82, 82, 82, 83, 83, 83, 84, 84, 84, 85,
- 85, 85, 85, 86, 86, 86, 87, 87, 87, 88, 88,
- 88, 88, 89, 89, 89, 90, 90, 90, 91, 91, 91,
- 91, 92, 92, 92, 93, 93, 93, 94, 94, 94, 94,
- 95, 95, 95, 96, 96, 96, 97, 97, 97, 97, 98,
- 98, 98, 99, 99, 99, 100, 100, 100, 100, 101, 101,
- 101, 102, 102, 102, 103, 103, 103, 103, 104, 104, 104,
- 105, 105, 105, 106, 106, 106, 106, 107, 107, 107, 108,
- 108, 108, 109, 109, 109, 110, 110, 110, 110, 111, 111,
- 111, 112, 112, 112, 113, 113, 113, 113, 114, 114, 114,
- 115, 115, 115, 116, 116, 116, 116, 117, 117, 117, 118,
- 118, 118, 119, 119, 119, 119, 120, 120, 120, 121, 121,
- 121, 122, 122, 122, 122, 123, 123, 123, 124, 124, 124,
- 125, 125, 125, 125, 126, 126, 126, 127, 127, 127, 128,
- 128, 128, 128, 129, 129, 129, 130, 130, 130, 131, 131,
- 131, 131, 132, 132, 132, 133, 133, 133, 134, 134, 134,
- 134, 135, 135, 135, 136, 136, 136, 137, 137, 137, 137,
- 138, 138, 138, 139, 139, 139, 140, 140, 140, 141, 141,
- 141, 141, 142, 142, 142, 143, 143, 143, 144, 144, 144,
- 144, 145, 145, 145, 146, 146, 146, 147, 147, 147, 147,
- 148, 148, 148, 149, 149, 149, 150, 150, 150, 150, 151,
- 151, 151, 152, 152, 152, 153, 153, 153, 153, 154, 154,
- 154, 155, 155, 155, 156, 156, 156, 156, 157, 157, 157,
- 158, 158, 158, 159, 159, 159, 159, 160, 160, 160, 161,
- 161, 161, 162, 162, 162, 162, 163, 163, 163, 164, 164,
- 164, 165, 165, 165, 165, 166, 166, 166, 167, 167, 167,
- 168, 168, 168, 169, 169, 169, 169, 170, 170, 170, 171,
- 171, 171, 172, 172, 172, 172, 173, 173, 173, 174, 174,
- 174, 175, 175, 175, 175, 176, 176, 176, 177, 177, 177,
- 178, 178, 178, 178, 179, 179, 179, 180, 180, 180, 181,
- 181, 181, 181, 182, 182, 182, 183, 183, 183, 184, 184,
- 184, 184, 185, 185, 185, 186, 186, 186, 187, 187, 187,
- 187, 188, 188, 188, 189, 189, 189, 190, 190, 190, 190,
- 191, 191, 191, 192, 192, 192, 193, 193, 193, 193, 194,
- 194, 194, 195, 195, 195, 196, 196, 196, 197, 197, 197,
- 197, 198, 198, 198, 199, 199, 199, 200, 200, 200, 200,
- 201, 201, 201, 202, 202, 202, 203, 203, 203, 203, 204,
- 204, 204, 205, 205, 205, 206, 206, 206, 206, 207, 207,
- 207, 208, 208, 208, 209, 209, 209, 209, 210, 210, 210,
- 211, 211, 211, 212, 212, 212, 212, 213, 213, 213, 214,
- 214, 214, 215, 215, 215, 215, 216, 216, 216, 217, 217,
- 217, 218, 218, 218, 218, 219, 219, 219, 220, 220, 220,
- 221, 221, 221, 221, 222, 222, 222, 223, 223, 223, 224,
- 224, 224, 224, 225, 225, 225, 226, 226, 226, 227, 227,
- 227, 228, 228, 228, 228, 229, 229, 229, 230, 230, 230,
- 231, 231, 231, 231, 232, 232, 232, 233, 233, 233, 234,
- 234, 234, 234, 235, 235, 235, 236, 236, 236, 237, 237,
- 237, 237, 238, 238, 238, 239, 239, 239, 240, 240, 240,
- 240, 241, 241, 241, 242, 242, 242, 243, 243, 243, 243,
- 244, 244, 244, 245, 245, 245, 246, 246, 246, 246, 247,
- 247, 247, 248, 248, 248, 249, 249, 249, 249, 250, 250,
- 250, 251, 251, 251, 252, 252, 252, 252, 253, 253, 253,
- 254, 254, 254, 255, 255, 255, 256, 256, 256, 256, 257,
- 257, 257, 258, 258, 258, 259, 259, 259, 259, 260, 260,
- 260, 261, 261, 261, 262, 262, 262, 262, 263, 263, 263,
- 264, 264, 264, 265, 265, 265, 265, 266, 266, 266, 267,
- 267, 267, 268, 268, 268, 268, 269, 269, 269, 270, 270,
- 270, 271, 271, 271, 271, 272, 272, 272, 273, 273, 273,
- 274, 274, 274, 274, 275, 275, 275, 276, 276, 276, 277,
- 277, 277, 277, 278, 278, 278, 279, 279, 279, 280, 280,
- 280, 280, 281, 281, 281, 282, 282, 282, 283, 283, 283,
- 283, 284, 284, 284, 285, 285, 285, 286, 286, 286, 287,
- 287, 287, 287, 288, 288, 288, 289, 289, 289, 290, 290,
- 290, 290, 291, 291, 291, 292, 292, 292, 293, 293, 293,
- 293, 294, 294, 294, 295, 295, 295, 296, 296, 296, 296,
- 297, 297, 297, 298, 298, 298, 299, 299, 299, 299, 300,
- 300, 300, 301, 301, 301, 302, 302, 302, 302, 303, 303,
- 303, 304, 304, 304, 305, 305, 305, 305, 306, 306, 306,
- 307, 307, 307, 308, 308, 308, 308, 309, 309, 309, 310,
- 310, 310, 311, 311, 311, 311, 312, 312, 312, 313, 313,
- 313, 314, 314, 314, 315, 315, 315, 315, 316, 316, 316,
- 317, 317, 317, 318, 318, 318, 318, 319, 319, 319, 320,
- 320, 320, 321, 321, 321, 321, 322, 322, 322, 323, 323,
- 323, 324, 324, 324, 324, 325, 325, 325, 326, 326, 326,
- 327, 327, 327, 327, 328, 328, 328, 329, 329, 329, 330,
- 330, 330, 330, 331, 331, 331, 332, 332, 332, 333, 333,
- 333, 333, 334, 334, 334, 335, 335, 335, 336, 336, 336,
- 336, 337, 337, 337, 338, 338, 338, 339, 339, 339, 339,
- 340, 340, 340, 341, 341, 341, 342, 342, 342, 342, 343,
- 343, 343, 344, 344, 344, 345, 345, 345, 346, 346, 346,
- 346, 347, 347, 347, 348, 348, 348, 349, 349, 349, 349,
- 350, 350, 350, 351, 351, 351, 352, 352, 352, 352, 353,
- 353, 353, 354, 354, 354, 355, 355, 355, 355, 356, 356,
- 356, 357, 357, 357, 358, 358, 358, 358, 359, 359, 359,
- 360, 360, 360, 361, 361, 361, 361, 362, 362, 362, 363,
- 363, 363, 364, 364, 364, 364, 365, 365, 365, 366, 366,
- 366, 367, 367, 367, 367, 368, 368, 368, 369, 369, 369,
- 370, 370, 370, 370, 371, 371, 371, 372, 372, 372, 373,
- 373, 373, 374, 374, 374, 374, 375, 375, 375, 376, 376,
- 376, 377, 377, 377, 377, 378, 378, 378, 379, 379, 379,
- 380, 380, 380, 380, 381, 381, 381, 382, 382, 382, 383,
- 383, 383, 383, 384, 384, 384, 385, 385, 385, 386, 386,
- 386, 386, 387, 387, 387, 388, 388, 388, 389, 389, 389,
- 389, 390, 390, 390, 391, 391, 391, 392, 392, 392, 392,
- 393, 393, 393, 394, 394, 394, 395, 395, 395, 395, 396,
- 396, 396, 397, 397, 397, 398, 398, 398, 398, 399, 399,
- 399, 400, 400, 400, 401, 401, 401, 402, 402, 402, 402,
- 403, 403, 403, 404, 404, 404, 405, 405, 405, 405, 406,
- 406, 406, 407, 407, 407, 408, 408, 408, 408, 409, 409,
- 409, 410, 410, 410, 411, 411, 411, 411, 412, 412, 412,
- 413, 413, 413, 414, 414, 414, 414, 415, 415, 415, 416,
- 416, 416, 417, 417, 417, 417, 418, 418, 418, 419, 419,
- 419, 420, 420, 420, 420, 421, 421, 421, 422, 422, 422,
- 423, 423, 423, 423, 424, 424, 424, 425, 425, 425, 426,
- 426, 426, 426, 427, 427, 427, 428, 428, 428, 429, 429,
- 429, 429, 430, 430, 430, 431, 431, 431, 432, 432, 432,
- 433, 433, 433, 433, 434, 434, 434, 435, 435, 435, 436,
- 436, 436, 436, 437, 437, 437, 438, 438, 438, 439, 439,
- 439, 439, 440, 440, 440, 441, 441, 441, 442, 442, 442,
- 442, 443, 443, 443, 444, 444, 444, 445, 445, 445, 445,
- 446, 446, 446, 447, 447, 447, 448, 448, 448, 448, 449,
- 449, 449, 450, 450, 450, 451, 451, 451, 451, 452, 452,
- 452, 453, 453, 453, 454, 454, 454, 454, 455, 455, 455,
- 456, 456, 456, 457, 457, 457, 457, 458, 458, 458, 459,
- 459, 459, 460, 460, 460, 461, 461, 461, 461, 462, 462,
- 462, 463, 463, 463, 464, 464, 464, 464, 465, 465, 465,
- 466, 466, 466, 467, 467, 467, 467, 468, 468, 468, 469,
- 469, 469, 470, 470, 470, 470, 471, 471, 471, 472, 472,
- 472, 473, 473, 473, 473, 474, 474, 474, 475, 475, 475,
- 476, 476, 476, 476, 477, 477, 477, 478, 478, 478, 479,
- 479, 479, 479, 480, 480, 480, 481, 481, 481, 482, 482,
- 482, 482, 483, 483, 483, 484, 484, 484, 485, 485, 485,
- 485, 486, 486, 486, 487, 487, 487, 488, 488, 488, 488,
- 489, 489, 489, 490, 490, 490, 491, 491, 491, 492, 492,
- 492, 492, 493, 493, 493, 494, 494, 494, 495, 495, 495,
- 495, 496, 496, 496, 497, 497, 497, 498, 498, 498, 498,
- 499, 499, 499, 500, 500, 500, 501, 501, 501, 501, 502,
- 502, 502, 503, 503, 503, 504, 504, 504, 504, 505, 505,
- 505, 506, 506, 506, 507, 507, 507, 507, 508, 508, 508,
- 509, 509, 509, 510, 510, 510, 510, 511, 511, 511, 512,
- 512, 512, 513, 513, 513, 513, 514, 514, 514, 515, 515,
- 515, 516, 516, 516, 516, 517, 517, 517, 518, 518, 518,
- 519, 519, 519, 520, 520, 520, 520, 521, 521, 521, 522,
- 522, 522, 523, 523, 523, 523, 524, 524, 524, 525, 525,
- 525, 526, 526, 526, 526, 527, 527, 527, 528, 528, 528,
- 529, 529, 529, 529, 530, 530, 530, 531, 531, 531, 532,
- 532, 532, 532, 533, 533, 533, 534, 534, 534, 535, 535,
- 535, 535, 536, 536, 536, 537, 537, 537, 538, 538, 538,
- 538, 539, 539, 539, 540, 540, 540, 541, 541, 541, 541,
- 542, 542, 542, 543, 543, 543, 544, 544, 544, 544, 545,
- 545, 545, 546, 546, 546, 547, 547, 547, 548, 548, 548,
- 548, 549, 549, 549, 550, 550, 550, 551, 551, 551, 551,
- 552, 552, 552, 553, 553, 553, 554, 554, 554, 554, 555,
- 555, 555, 556, 556, 556, 557, 557, 557, 557, 558, 558,
- 558, 559, 559, 559, 560, 560, 560, 560, 561, 561, 561,
- 562, 562, 562, 563, 563, 563, 563, 564, 564, 564, 565,
- 565, 565, 566, 566, 566, 566, 567, 567, 567, 568, 568,
- 568, 569, 569, 569, 569, 570, 570, 570, 571, 571, 571,
- 572, 572, 572, 572, 573, 573, 573, 574, 574, 574, 575,
- 575, 575, 575, 576, 576, 576, 577, 577, 577, 578, 578,
- 578, 579, 579, 579, 579, 580, 580, 580, 581, 581, 581,
- 582, 582, 582, 582, 583, 583, 583, 584, 584, 584, 585,
- 585, 585, 585, 586, 586, 586, 587, 587, 587, 588, 588,
- 588, 588, 589, 589, 589, 590, 590, 590, 591, 591, 591,
- 591, 592, 592, 592, 593, 593, 593, 594, 594, 594, 594,
- 595, 595, 595, 596, 596, 596, 597, 597, 597, 597, 598,
- 598, 598, 599, 599, 599, 600, 600, 600, 600, 601, 601,
- 601, 602, 602, 602, 603, 603, 603, 603, 604, 604, 604,
- 605, 605, 605, 606, 606, 606, 607, 607, 607, 607, 608,
- 608, 608, 609, 609, 609, 610, 610, 610, 610, 611, 611,
- 611, 612, 612, 612, 613, 613, 613, 613, 614, 614, 614,
- 615, 615, 615, 616, 616, 616, 616, 617, 617, 617, 618,
- 618, 618, 619, 619, 619, 619, 620, 620, 620, 621, 621,
- 621, 622, 622, 622, 622, 623, 623, 623, 624, 624, 624,
- 625, 625, 625, 625, 626, 626, 626, 627, 627, 627, 628,
- 628, 628, 628, 629, 629, 629, 630, 630, 630, 631, 631,
- 631, 631, 632, 632, 632, 633, 633, 633, 634, 634, 634,
- 634, 635, 635, 635, 636, 636, 636, 637, 637, 637, 638,
- 638, 638, 638, 639, 639, 639, 640, 640, 640, 641, 641,
- 641, 641, 642, 642, 642, 643, 643, 643, 644, 644, 644,
- 644, 645, 645, 645, 646, 646, 646, 647, 647, 647, 647,
+ /*18,*/ 19, 19, 19, 19, 20, 20, 20, 21, 21, 21, 22, 22, 22, 23, 23, 23, 23, 24, 24,
+ 24, 25, 25, 25, 26, 26, 26, 26, 27, 27, 27, 28, 28, 28, 29, 29, 29, 29, 30,
+ 30, 30, 31, 31, 31, 32, 32, 32, 32, 33, 33, 33, 34, 34, 34, 35, 35, 35, 35,
+ 36, 36, 36, 37, 37, 37, 38, 38, 38, 38, 39, 39, 39, 40, 40, 40, 41, 41, 41,
+ 41, 42, 42, 42, 43, 43, 43, 44, 44, 44, 44, 45, 45, 45, 46, 46, 46, 47, 47,
+ 47, 47, 48, 48, 48, 49, 49, 49, 50, 50, 50, 51, 51, 51, 51, 52, 52, 52, 53,
+ 53, 53, 54, 54, 54, 54, 55, 55, 55, 56, 56, 56, 57, 57, 57, 57, 58, 58, 58,
+ 59, 59, 59, 60, 60, 60, 60, 61, 61, 61, 62, 62, 62, 63, 63, 63, 63, 64, 64,
+ 64, 65, 65, 65, 66, 66, 66, 66, 67, 67, 67, 68, 68, 68, 69, 69, 69, 69, 70,
+ 70, 70, 71, 71, 71, 72, 72, 72, 72, 73, 73, 73, 74, 74, 74, 75, 75, 75, 75,
+ 76, 76, 76, 77, 77, 77, 78, 78, 78, 78, 79, 79, 79, 80, 80, 80, 81, 81, 81,
+ 82, 82, 82, 82, 83, 83, 83, 84, 84, 84, 85, 85, 85, 85, 86, 86, 86, 87, 87,
+ 87, 88, 88, 88, 88, 89, 89, 89, 90, 90, 90, 91, 91, 91, 91, 92, 92, 92, 93,
+ 93, 93, 94, 94, 94, 94, 95, 95, 95, 96, 96, 96, 97, 97, 97, 97, 98, 98, 98,
+ 99, 99, 99, 100, 100, 100, 100, 101, 101, 101, 102, 102, 102, 103, 103, 103, 103, 104, 104,
+ 104, 105, 105, 105, 106, 106, 106, 106, 107, 107, 107, 108, 108, 108, 109, 109, 109, 110, 110,
+ 110, 110, 111, 111, 111, 112, 112, 112, 113, 113, 113, 113, 114, 114, 114, 115, 115, 115, 116,
+ 116, 116, 116, 117, 117, 117, 118, 118, 118, 119, 119, 119, 119, 120, 120, 120, 121, 121, 121,
+ 122, 122, 122, 122, 123, 123, 123, 124, 124, 124, 125, 125, 125, 125, 126, 126, 126, 127, 127,
+ 127, 128, 128, 128, 128, 129, 129, 129, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 133,
+ 133, 133, 134, 134, 134, 134, 135, 135, 135, 136, 136, 136, 137, 137, 137, 137, 138, 138, 138,
+ 139, 139, 139, 140, 140, 140, 141, 141, 141, 141, 142, 142, 142, 143, 143, 143, 144, 144, 144,
+ 144, 145, 145, 145, 146, 146, 146, 147, 147, 147, 147, 148, 148, 148, 149, 149, 149, 150, 150,
+ 150, 150, 151, 151, 151, 152, 152, 152, 153, 153, 153, 153, 154, 154, 154, 155, 155, 155, 156,
+ 156, 156, 156, 157, 157, 157, 158, 158, 158, 159, 159, 159, 159, 160, 160, 160, 161, 161, 161,
+ 162, 162, 162, 162, 163, 163, 163, 164, 164, 164, 165, 165, 165, 165, 166, 166, 166, 167, 167,
+ 167, 168, 168, 168, 169, 169, 169, 169, 170, 170, 170, 171, 171, 171, 172, 172, 172, 172, 173,
+ 173, 173, 174, 174, 174, 175, 175, 175, 175, 176, 176, 176, 177, 177, 177, 178, 178, 178, 178,
+ 179, 179, 179, 180, 180, 180, 181, 181, 181, 181, 182, 182, 182, 183, 183, 183, 184, 184, 184,
+ 184, 185, 185, 185, 186, 186, 186, 187, 187, 187, 187, 188, 188, 188, 189, 189, 189, 190, 190,
+ 190, 190, 191, 191, 191, 192, 192, 192, 193, 193, 193, 193, 194, 194, 194, 195, 195, 195, 196,
+ 196, 196, 197, 197, 197, 197, 198, 198, 198, 199, 199, 199, 200, 200, 200, 200, 201, 201, 201,
+ 202, 202, 202, 203, 203, 203, 203, 204, 204, 204, 205, 205, 205, 206, 206, 206, 206, 207, 207,
+ 207, 208, 208, 208, 209, 209, 209, 209, 210, 210, 210, 211, 211, 211, 212, 212, 212, 212, 213,
+ 213, 213, 214, 214, 214, 215, 215, 215, 215, 216, 216, 216, 217, 217, 217, 218, 218, 218, 218,
+ 219, 219, 219, 220, 220, 220, 221, 221, 221, 221, 222, 222, 222, 223, 223, 223, 224, 224, 224,
+ 224, 225, 225, 225, 226, 226, 226, 227, 227, 227, 228, 228, 228, 228, 229, 229, 229, 230, 230,
+ 230, 231, 231, 231, 231, 232, 232, 232, 233, 233, 233, 234, 234, 234, 234, 235, 235, 235, 236,
+ 236, 236, 237, 237, 237, 237, 238, 238, 238, 239, 239, 239, 240, 240, 240, 240, 241, 241, 241,
+ 242, 242, 242, 243, 243, 243, 243, 244, 244, 244, 245, 245, 245, 246, 246, 246, 246, 247, 247,
+ 247, 248, 248, 248, 249, 249, 249, 249, 250, 250, 250, 251, 251, 251, 252, 252, 252, 252, 253,
+ 253, 253, 254, 254, 254, 255, 255, 255, 256, 256, 256, 256, 257, 257, 257, 258, 258, 258, 259,
+ 259, 259, 259, 260, 260, 260, 261, 261, 261, 262, 262, 262, 262, 263, 263, 263, 264, 264, 264,
+ 265, 265, 265, 265, 266, 266, 266, 267, 267, 267, 268, 268, 268, 268, 269, 269, 269, 270, 270,
+ 270, 271, 271, 271, 271, 272, 272, 272, 273, 273, 273, 274, 274, 274, 274, 275, 275, 275, 276,
+ 276, 276, 277, 277, 277, 277, 278, 278, 278, 279, 279, 279, 280, 280, 280, 280, 281, 281, 281,
+ 282, 282, 282, 283, 283, 283, 283, 284, 284, 284, 285, 285, 285, 286, 286, 286, 287, 287, 287,
+ 287, 288, 288, 288, 289, 289, 289, 290, 290, 290, 290, 291, 291, 291, 292, 292, 292, 293, 293,
+ 293, 293, 294, 294, 294, 295, 295, 295, 296, 296, 296, 296, 297, 297, 297, 298, 298, 298, 299,
+ 299, 299, 299, 300, 300, 300, 301, 301, 301, 302, 302, 302, 302, 303, 303, 303, 304, 304, 304,
+ 305, 305, 305, 305, 306, 306, 306, 307, 307, 307, 308, 308, 308, 308, 309, 309, 309, 310, 310,
+ 310, 311, 311, 311, 311, 312, 312, 312, 313, 313, 313, 314, 314, 314, 315, 315, 315, 315, 316,
+ 316, 316, 317, 317, 317, 318, 318, 318, 318, 319, 319, 319, 320, 320, 320, 321, 321, 321, 321,
+ 322, 322, 322, 323, 323, 323, 324, 324, 324, 324, 325, 325, 325, 326, 326, 326, 327, 327, 327,
+ 327, 328, 328, 328, 329, 329, 329, 330, 330, 330, 330, 331, 331, 331, 332, 332, 332, 333, 333,
+ 333, 333, 334, 334, 334, 335, 335, 335, 336, 336, 336, 336, 337, 337, 337, 338, 338, 338, 339,
+ 339, 339, 339, 340, 340, 340, 341, 341, 341, 342, 342, 342, 342, 343, 343, 343, 344, 344, 344,
+ 345, 345, 345, 346, 346, 346, 346, 347, 347, 347, 348, 348, 348, 349, 349, 349, 349, 350, 350,
+ 350, 351, 351, 351, 352, 352, 352, 352, 353, 353, 353, 354, 354, 354, 355, 355, 355, 355, 356,
+ 356, 356, 357, 357, 357, 358, 358, 358, 358, 359, 359, 359, 360, 360, 360, 361, 361, 361, 361,
+ 362, 362, 362, 363, 363, 363, 364, 364, 364, 364, 365, 365, 365, 366, 366, 366, 367, 367, 367,
+ 367, 368, 368, 368, 369, 369, 369, 370, 370, 370, 370, 371, 371, 371, 372, 372, 372, 373, 373,
+ 373, 374, 374, 374, 374, 375, 375, 375, 376, 376, 376, 377, 377, 377, 377, 378, 378, 378, 379,
+ 379, 379, 380, 380, 380, 380, 381, 381, 381, 382, 382, 382, 383, 383, 383, 383, 384, 384, 384,
+ 385, 385, 385, 386, 386, 386, 386, 387, 387, 387, 388, 388, 388, 389, 389, 389, 389, 390, 390,
+ 390, 391, 391, 391, 392, 392, 392, 392, 393, 393, 393, 394, 394, 394, 395, 395, 395, 395, 396,
+ 396, 396, 397, 397, 397, 398, 398, 398, 398, 399, 399, 399, 400, 400, 400, 401, 401, 401, 402,
+ 402, 402, 402, 403, 403, 403, 404, 404, 404, 405, 405, 405, 405, 406, 406, 406, 407, 407, 407,
+ 408, 408, 408, 408, 409, 409, 409, 410, 410, 410, 411, 411, 411, 411, 412, 412, 412, 413, 413,
+ 413, 414, 414, 414, 414, 415, 415, 415, 416, 416, 416, 417, 417, 417, 417, 418, 418, 418, 419,
+ 419, 419, 420, 420, 420, 420, 421, 421, 421, 422, 422, 422, 423, 423, 423, 423, 424, 424, 424,
+ 425, 425, 425, 426, 426, 426, 426, 427, 427, 427, 428, 428, 428, 429, 429, 429, 429, 430, 430,
+ 430, 431, 431, 431, 432, 432, 432, 433, 433, 433, 433, 434, 434, 434, 435, 435, 435, 436, 436,
+ 436, 436, 437, 437, 437, 438, 438, 438, 439, 439, 439, 439, 440, 440, 440, 441, 441, 441, 442,
+ 442, 442, 442, 443, 443, 443, 444, 444, 444, 445, 445, 445, 445, 446, 446, 446, 447, 447, 447,
+ 448, 448, 448, 448, 449, 449, 449, 450, 450, 450, 451, 451, 451, 451, 452, 452, 452, 453, 453,
+ 453, 454, 454, 454, 454, 455, 455, 455, 456, 456, 456, 457, 457, 457, 457, 458, 458, 458, 459,
+ 459, 459, 460, 460, 460, 461, 461, 461, 461, 462, 462, 462, 463, 463, 463, 464, 464, 464, 464,
+ 465, 465, 465, 466, 466, 466, 467, 467, 467, 467, 468, 468, 468, 469, 469, 469, 470, 470, 470,
+ 470, 471, 471, 471, 472, 472, 472, 473, 473, 473, 473, 474, 474, 474, 475, 475, 475, 476, 476,
+ 476, 476, 477, 477, 477, 478, 478, 478, 479, 479, 479, 479, 480, 480, 480, 481, 481, 481, 482,
+ 482, 482, 482, 483, 483, 483, 484, 484, 484, 485, 485, 485, 485, 486, 486, 486, 487, 487, 487,
+ 488, 488, 488, 488, 489, 489, 489, 490, 490, 490, 491, 491, 491, 492, 492, 492, 492, 493, 493,
+ 493, 494, 494, 494, 495, 495, 495, 495, 496, 496, 496, 497, 497, 497, 498, 498, 498, 498, 499,
+ 499, 499, 500, 500, 500, 501, 501, 501, 501, 502, 502, 502, 503, 503, 503, 504, 504, 504, 504,
+ 505, 505, 505, 506, 506, 506, 507, 507, 507, 507, 508, 508, 508, 509, 509, 509, 510, 510, 510,
+ 510, 511, 511, 511, 512, 512, 512, 513, 513, 513, 513, 514, 514, 514, 515, 515, 515, 516, 516,
+ 516, 516, 517, 517, 517, 518, 518, 518, 519, 519, 519, 520, 520, 520, 520, 521, 521, 521, 522,
+ 522, 522, 523, 523, 523, 523, 524, 524, 524, 525, 525, 525, 526, 526, 526, 526, 527, 527, 527,
+ 528, 528, 528, 529, 529, 529, 529, 530, 530, 530, 531, 531, 531, 532, 532, 532, 532, 533, 533,
+ 533, 534, 534, 534, 535, 535, 535, 535, 536, 536, 536, 537, 537, 537, 538, 538, 538, 538, 539,
+ 539, 539, 540, 540, 540, 541, 541, 541, 541, 542, 542, 542, 543, 543, 543, 544, 544, 544, 544,
+ 545, 545, 545, 546, 546, 546, 547, 547, 547, 548, 548, 548, 548, 549, 549, 549, 550, 550, 550,
+ 551, 551, 551, 551, 552, 552, 552, 553, 553, 553, 554, 554, 554, 554, 555, 555, 555, 556, 556,
+ 556, 557, 557, 557, 557, 558, 558, 558, 559, 559, 559, 560, 560, 560, 560, 561, 561, 561, 562,
+ 562, 562, 563, 563, 563, 563, 564, 564, 564, 565, 565, 565, 566, 566, 566, 566, 567, 567, 567,
+ 568, 568, 568, 569, 569, 569, 569, 570, 570, 570, 571, 571, 571, 572, 572, 572, 572, 573, 573,
+ 573, 574, 574, 574, 575, 575, 575, 575, 576, 576, 576, 577, 577, 577, 578, 578, 578, 579, 579,
+ 579, 579, 580, 580, 580, 581, 581, 581, 582, 582, 582, 582, 583, 583, 583, 584, 584, 584, 585,
+ 585, 585, 585, 586, 586, 586, 587, 587, 587, 588, 588, 588, 588, 589, 589, 589, 590, 590, 590,
+ 591, 591, 591, 591, 592, 592, 592, 593, 593, 593, 594, 594, 594, 594, 595, 595, 595, 596, 596,
+ 596, 597, 597, 597, 597, 598, 598, 598, 599, 599, 599, 600, 600, 600, 600, 601, 601, 601, 602,
+ 602, 602, 603, 603, 603, 603, 604, 604, 604, 605, 605, 605, 606, 606, 606, 607, 607, 607, 607,
+ 608, 608, 608, 609, 609, 609, 610, 610, 610, 610, 611, 611, 611, 612, 612, 612, 613, 613, 613,
+ 613, 614, 614, 614, 615, 615, 615, 616, 616, 616, 616, 617, 617, 617, 618, 618, 618, 619, 619,
+ 619, 619, 620, 620, 620, 621, 621, 621, 622, 622, 622, 622, 623, 623, 623, 624, 624, 624, 625,
+ 625, 625, 625, 626, 626, 626, 627, 627, 627, 628, 628, 628, 628, 629, 629, 629, 630, 630, 630,
+ 631, 631, 631, 631, 632, 632, 632, 633, 633, 633, 634, 634, 634, 634, 635, 635, 635, 636, 636,
+ 636, 637, 637, 637, 638, 638, 638, 638, 639, 639, 639, 640, 640, 640, 641, 641, 641, 641, 642,
+ 642, 642, 643, 643, 643, 644, 644, 644, 644, 645, 645, 645, 646, 646, 646, 647, 647, 647, 647,
648, 648, 648, 649, 649, 649, 650, 650
};
static ULLong pfive[27] = { 5ll,
@@ -1329,13 +916,11 @@ extern int strtod_diglim;
* #define Storeinc(a,b,c) (*a++ = b << 16 | c & 0xffff)
*/
#if defined(IEEE_8087) + defined(VAX)
-#define Storeinc(a, b, c) \
- (((unsigned short *)a)[1] = (unsigned short)b, \
- ((unsigned short *)a)[0] = (unsigned short)c, a++)
+#define Storeinc(a, b, c) \
+ (((unsigned short *)a)[1] = (unsigned short)b, ((unsigned short *)a)[0] = (unsigned short)c, a++)
#else
-#define Storeinc(a, b, c) \
- (((unsigned short *)a)[0] = (unsigned short)b, \
- ((unsigned short *)a)[1] = (unsigned short)c, a++)
+#define Storeinc(a, b, c) \
+ (((unsigned short *)a)[0] = (unsigned short)b, ((unsigned short *)a)[1] = (unsigned short)c, a++)
#endif
/* #define P DBL_MANT_DIG */
@@ -1487,8 +1072,7 @@ extern double rnd_prod(double, double), rnd_quot(double, double);
typedef struct BCinfo BCinfo;
struct BCinfo {
- int dp0, dp1, dplen, dsign, e0, inexact, nd, nd0, rounding, scale,
- uflchk;
+ int dp0, dp1, dplen, dsign, e0, inexact, nd, nd0, rounding, scale, uflchk;
};
#define FFFFFFFF 0xffffffffUL
@@ -1508,8 +1092,7 @@ static unsigned int maxthreads = 0;
#ifdef __cplusplus
extern "C" double strtod(const char *s00, char **se);
-extern "C" char *dtoa(double d, int mode, int ndigits, int *decpt, int *sign,
- char **rve);
+extern "C" char *dtoa(double d, int mode, int ndigits, int *decpt, int *sign, char **rve);
#endif
struct Bigint {
@@ -1538,8 +1121,7 @@ void set_max_dtoa_threads(unsigned int n)
L = n * sizeof(ThInfo);
if (TI1) {
TI1 = (ThInfo *)REALLOC(TI1, L);
- memset(TI1 + maxthreads, 0,
- (n - maxthreads) * sizeof(ThInfo));
+ memset(TI1 + maxthreads, 0, (n - maxthreads) * sizeof(ThInfo));
} else {
TI1 = (ThInfo *)MALLOC(L);
if (TI0_used) {
@@ -1595,12 +1177,8 @@ static Bigint *Balloc(int k MTd)
#ifdef Omit_Private_Memory
rv = (Bigint *)MALLOC(sizeof(Bigint) + (x - 1) * sizeof(ULong));
#else
- len = (sizeof(Bigint) + (x - 1) * sizeof(ULong) +
- sizeof(double) - 1) /
- sizeof(double);
- if (k <= Kmax &&
- (long)(pmem_next - private_mem) + (long)len <=
- (long)PRIVATE_mem
+ len = (sizeof(Bigint) + (x - 1) * sizeof(ULong) + sizeof(double) - 1) / sizeof(double);
+ if (k <= Kmax && (long)(pmem_next - private_mem) + (long)len <= (long)PRIVATE_mem
#ifdef MULTIPLE_THREADS
&& TI == TI1
#endif
@@ -1646,9 +1224,7 @@ static void Bfree(Bigint *v MTd)
}
}
-#define Bcopy(x, y) \
- memcpy((char *)&x->sign, (char *)&y->sign, \
- y->wds * sizeof(Long) + 2 * sizeof(int))
+#define Bcopy(x, y) memcpy((char *)&x->sign, (char *)&y->sign, y->wds * sizeof(Long) + 2 * sizeof(int))
static Bigint *multadd(Bigint *b, int m, int a MTd) /* multiply by m and add a
*/
@@ -2493,21 +2069,14 @@ hexdig_init(void) /* Use of hexdig_init omitted 20121220 to avoid a */
}
#else
static unsigned char hexdig[256] = {
- 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, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 25, 0, 0, 0, 0, 0, 0, 0, 26, 27, 28, 29, 30, 31, 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, 26, 27, 28, 29, 30, 31, 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, 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, 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, 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, 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, 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, 0, 0, 0, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 0, 0, 0, 0, 0,
+ 0, 26, 27, 28, 29, 30, 31, 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, 26, 27, 28, 29, 30, 31, 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, 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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
#endif
#endif /* } Need_Hexdig */
@@ -2731,15 +2300,13 @@ void gethex(const char **sp, U *rvp, int rounding, int sign MTd)
#ifdef USE_LOCALE
int i;
#ifdef NO_LOCALE_CACHE
- const unsigned char *decimalpoint =
- (unsigned char *)localeconv()->decimal_point;
+ const unsigned char *decimalpoint = (unsigned char *)localeconv()->decimal_point;
#else
const unsigned char *decimalpoint;
static unsigned char *decimalpoint_cache;
if (!(s0 = decimalpoint_cache)) {
s0 = (unsigned char *)localeconv()->decimal_point;
- if ((decimalpoint_cache = (unsigned char *)MALLOC(
- strlen((const char *)s0) + 1))) {
+ if ((decimalpoint_cache = (unsigned char *)MALLOC(strlen((const char *)s0) + 1))) {
strcpy((char *)decimalpoint_cache, (const char *)s0);
s0 = decimalpoint_cache;
}
@@ -2964,8 +2531,7 @@ ovfl1:
#ifdef IEEE_Arith /*{*/
switch (rounding) {
case Round_near:
- if (n == nbits &&
- (n < 2 || lostbits || any_on(b, n - 1)))
+ if (n == nbits && (n < 2 || lostbits || any_on(b, n - 1)))
goto ret_tinyf;
break;
case Round_up:
@@ -2989,8 +2555,7 @@ retz1:
if (!k) {
switch (rounding) {
case Round_near:
- if (((b->x[0] & 3) == 3) ||
- (lostbits && (b->x[0] & 1))) {
+ if (((b->x[0] & 3) == 3) || (lostbits && (b->x[0] & 1))) {
multadd(b, 1, 1 MTa);
emin_check:
if (b->x[1] == (1 << (Exp_shift + 1))) {
@@ -3052,9 +2617,7 @@ no_lostbits:
k = b->wds;
b = increment(b MTa);
x = b->x;
- if (!denorm &&
- (b->wds > k || ((n = nbits & kmask) != 0 &&
- hi0bits(x[k - 1]) < 32 - n))) {
+ if (!denorm && (b->wds > k || ((n = nbits & kmask) != 0 && hi0bits(x[k - 1]) < 32 - n))) {
rshift(b, 1);
if (++e > Emax)
goto ovfl;
@@ -3099,8 +2662,7 @@ normal:
/* The next two lines ignore swap of low- and high-order 2 bytes. */
/* word0(rvp) = (b->x[1] & ~0x800000) | ((e + 129 + 55) << 23); */
/* word1(rvp) = b->x[0]; */
- word0(rvp) = ((b->x[1] & ~0x800000) >> 16) | ((e + 129 + 55) << 7) |
- (b->x[1] << 16);
+ word0(rvp) = ((b->x[1] & ~0x800000) >> 16) | ((e + 129 + 55) << 7) | (b->x[1] << 16);
word1(rvp) = (b->x[0] >> 16) | (b->x[0] << 16);
#endif
Bfree(b MTa);
@@ -3239,8 +2801,7 @@ static double sulp(U *x, BCinfo *bc)
int i;
rv = ulp(x);
- if (!bc->scale ||
- (i = 2 * P + 1 - ((word0(x) & Exp_mask) >> Exp_shift)) <= 0)
+ if (!bc->scale || (i = 2 * P + 1 - ((word0(x) & Exp_mask) >> Exp_shift)) <= 0)
return rv; /* Is there an example where i <= 0 ? */
word0(&u) = Exp_1 + (i << Exp_shift);
word1(&u) = 0;
@@ -3417,8 +2978,7 @@ rethi1:
}
} else {
/* Exact half-way case: apply round-even rule. */
- if ((j = ((word0(rv) & Exp_mask) >> Exp_shift) - bc->scale) <=
- 0) {
+ if ((j = ((word0(rv) & Exp_mask) >> Exp_shift) - bc->scale) <= 0) {
i = 1 - j;
if (i <= 31) {
if (word1(rv) & (0x1 << i))
@@ -3768,8 +3328,7 @@ ret0:
vax_ovfl_check:
word0(&rv) -= P * Exp_msk1;
/* rv = */ rounded_product(dval(&rv), tens[e]);
- if ((word0(&rv) & Exp_mask) >
- Exp_msk1 * (DBL_MAX_EXP + Bias - 1 - P))
+ if ((word0(&rv) & Exp_mask) > Exp_msk1 * (DBL_MAX_EXP + Bias - 1 - P))
goto ovfl;
word0(&rv) += P * Exp_msk1;
#else
@@ -3873,8 +3432,7 @@ vax_ovfl_check:
t00 = bhi * p10->b0 + (t01 >> 32) + (t10 >> 32);
if (t00 & 0x8000000000000000ull) {
if ((t00 & 0x3ff) && (~t00 & 0x3fe)) { /* unambiguous result? */
- if (nd > 19 &&
- ((t00 + (1 << i) + 2) & 0x400) ^ (t00 & 0x400))
+ if (nd > 19 && ((t00 + (1 << i) + 2) & 0x400) ^ (t00 & 0x400))
goto many_digits;
if (erv <= 0)
goto denormal;
@@ -3892,8 +3450,7 @@ vax_ovfl_check:
}
} else {
if ((t00 & 0x1ff) && (~t00 & 0x1fe)) { /* unambiguous result? */
- if (nd > 19 &&
- ((t00 + (1 << i) + 2) & 0x200) ^ (t00 & 0x200))
+ if (nd > 19 && ((t00 + (1 << i) + 2) & 0x200) ^ (t00 & 0x200))
goto many_digits;
if (erv <= 1)
goto denormal1;
@@ -3988,9 +3545,7 @@ noround_den:
goto noround;
}
if ((tlo & 0xfffffff0) | (t00 & 0x3ff) &&
- (nd <= 19 ||
- ((t00 + (1ull << i)) & 0xfffffffffffffc00ull) ==
- (t00 & 0xfffffffffffffc00ull))) {
+ (nd <= 19 || ((t00 + (1ull << i)) & 0xfffffffffffffc00ull) == (t00 & 0xfffffffffffffc00ull))) {
/* Unambiguous result. */
/* If nd > 19, then incrementing the 19th digit */
/* does not affect rv. */
@@ -4018,8 +3573,7 @@ noround:
if (erv >= 0x7ff)
goto ovfl;
terv = erv;
- LLval(&rv) = (terv << 52) |
- ((t00 & 0x7ffffffffffff800ull) >> 11);
+ LLval(&rv) = (terv << 52) | ((t00 & 0x7ffffffffffff800ull) >> 11);
goto ret;
}
} else {
@@ -4056,9 +3610,7 @@ tiniest:
#ifdef Honor_FLT_ROUNDS
roundup1_den:
#endif
- if (0x8000000000000000ull &
- (t00 += (tg << 1)) &&
- erv == 1) {
+ if (0x8000000000000000ull & (t00 += (tg << 1)) && erv == 1) {
smallest_normal:
LLval(&rv) = 0x0010000000000000ull;
goto ret;
@@ -4094,9 +3646,7 @@ noround1_den:
goto noround1;
}
if ((tlo & 0xfffffff0) | (t00 & 0x1ff) &&
- (nd <= 19 ||
- ((t00 + (1ull << i)) & 0x7ffffffffffffe00ull) ==
- (t00 & 0x7ffffffffffffe00ull))) {
+ (nd <= 19 || ((t00 + (1ull << i)) & 0x7ffffffffffffe00ull) == (t00 & 0x7ffffffffffffe00ull))) {
/* Unambiguous result. */
#ifdef Honor_FLT_ROUNDS
switch (bc.rounding) {
@@ -4122,8 +3672,7 @@ noround1:
if (erv >= 0x800)
goto ovfl;
terv = erv - 1;
- LLval(&rv) = (terv << 52) |
- ((t00 & 0x3ffffffffffffc00ull) >> 10);
+ LLval(&rv) = (terv << 52) | ((t00 & 0x3ffffffffffffc00ull) >> 10);
goto ret;
}
}
@@ -4204,8 +3753,7 @@ range_err:
/* The last multiplication could overflow. */
word0(&rv) -= P * Exp_msk1;
dval(&rv) *= bigtens[j];
- if ((z = word0(&rv) & Exp_mask) >
- Exp_msk1 * (DBL_MAX_EXP + Bias - P))
+ if ((z = word0(&rv) & Exp_mask) > Exp_msk1 * (DBL_MAX_EXP + Bias - P))
goto ovfl;
if (z > Exp_msk1 * (DBL_MAX_EXP + Bias - 1 - P)) {
/* set to largest number */
@@ -4228,9 +3776,7 @@ range_err:
for (j = 0; e1 > 0; j++, e1 >>= 1)
if (e1 & 1)
dval(&rv) *= tinytens[j];
- if (bc.scale &&
- (j = 2 * P + 1 -
- ((word0(&rv) & Exp_mask) >> Exp_shift)) > 0) {
+ if (bc.scale && (j = 2 * P + 1 - ((word0(&rv) & Exp_mask) >> Exp_shift)) > 0) {
/* scaled rv is denormal; clear j low bits */
if (j >= 32) {
if (j > 54)
@@ -4239,8 +3785,7 @@ range_err:
if (j >= 53)
word0(&rv) = (P + 2) * Exp_msk1;
else
- word0(&rv) &= 0xffffffff
- << (j - 32);
+ word0(&rv) &= 0xffffffff << (j - 32);
} else
word1(&rv) &= 0xffffffff << j;
}
@@ -4442,18 +3987,15 @@ for (;;) {
if (y)
#endif
{
- delta = lshift(delta,
- Log2P MTb);
+ delta = lshift(delta, Log2P MTb);
if (cmp(delta, bs) <= 0)
adj.d = -0.5;
}
}
apply_adj:
#ifdef Avoid_Underflow /*{*/
- if (bc.scale && (y = word0(&rv) & Exp_mask) <=
- 2 * P * Exp_msk1)
- word0(&adj) +=
- (2 * P + 1) * Exp_msk1 - y;
+ if (bc.scale && (y = word0(&rv) & Exp_mask) <= 2 * P * Exp_msk1)
+ word0(&adj) += (2 * P + 1) * Exp_msk1 - y;
#else
#ifdef Sudden_Underflow
if ((word0(&rv) & Exp_mask) <= P * Exp_msk1) {
@@ -4545,13 +4087,8 @@ apply_adj:
word1(&rv) ==
(
#ifdef Avoid_Underflow
- (bc.scale &&
- (y = word0(&rv) & Exp_mask) <=
- 2 * P * Exp_msk1) ?
- (0xffffffff &
- (0xffffffff
- << (2 * P + 1 -
- (y >> Exp_shift)))) :
+ (bc.scale && (y = word0(&rv) & Exp_mask) <= 2 * P * Exp_msk1) ?
+ (0xffffffff & (0xffffffff << (2 * P + 1 - (y >> Exp_shift)))) :
#endif
0xffffffff)) {
/*boundary case -- increment exponent*/
@@ -4594,10 +4131,8 @@ drop_down:
#ifdef Avoid_Underflow
if (bc.scale) {
L = word0(&rv) & Exp_mask;
- if (L <=
- (2 * P + 1) * Exp_msk1) {
- if (L >
- (P + 2) * Exp_msk1)
+ if (L <= (2 * P + 1) * Exp_msk1) {
+ if (L > (P + 2) * Exp_msk1)
/* round even
* ==> */
/* accept rv */
@@ -4718,8 +4253,7 @@ drop_down:
word0(&rv) -= P * Exp_msk1;
adj.d = aadj1 * ulp(&rv);
dval(&rv) += adj.d;
- if ((word0(&rv) & Exp_mask) >=
- Exp_msk1 * (DBL_MAX_EXP + Bias - P)) {
+ if ((word0(&rv) & Exp_mask) >= Exp_msk1 * (DBL_MAX_EXP + Bias - P)) {
if (word0(&rv0) == Big0 && word1(&rv0) == Big1)
goto ovfl;
word0(&rv) = Big0;
@@ -4762,15 +4296,12 @@ drop_down:
adj.d = aadj1 * ulp(&rv);
dval(&rv) += adj.d;
#ifdef IBM
- if ((word0(&rv) & Exp_mask) <
- P * Exp_msk1)
+ if ((word0(&rv) & Exp_mask) < P * Exp_msk1)
#else
- if ((word0(&rv) & Exp_mask) <=
- P * Exp_msk1)
+ if ((word0(&rv) & Exp_mask) <= P * Exp_msk1)
#endif
{
- if (word0(&rv0) == Tiny0 &&
- word1(&rv0) == Tiny1) {
+ if (word0(&rv0) == Tiny0 && word1(&rv0) == Tiny1) {
if (bc.nd > nd) {
bc.uflchk = 1;
break;
@@ -4815,8 +4346,7 @@ drop_down:
L = (Long)aadj;
aadj -= L;
/* The tolerances below are conservative. */
- if (bc.dsign || word1(&rv) ||
- word0(&rv) & Bndry_mask) {
+ if (bc.dsign || word1(&rv) || word0(&rv) & Bndry_mask) {
if (aadj < .4999999 || aadj > .5000001)
break;
} else if (aadj < .4999999 / FLT_RADIX)
@@ -4893,9 +4423,7 @@ static char *rv_alloc(int i MTd)
int j, k, *r;
j = sizeof(ULong);
- for (k = 0;
- sizeof(Bigint) - sizeof(ULong) - sizeof(int) + j <= (size_t)i;
- j <<= 1)
+ for (k = 0; sizeof(Bigint) - sizeof(ULong) - sizeof(int) + j <= (size_t)i; j <<= 1)
k++;
r = (int *)Balloc(k MTa);
*r = k;
@@ -4906,8 +4434,7 @@ static char *rv_alloc(int i MTd)
(char *)(r + 1);
}
-static char *nrv_alloc(const char *s, char *s0, size_t s0len, char **rve,
- int n MTd)
+static char *nrv_alloc(const char *s, char *s0, size_t s0len, char **rve, int n MTd)
{
char *rv, *t;
@@ -4981,8 +4508,7 @@ void freedtoa(char *s)
* calculation.
*/
-char *dtoa_r(double dd, int mode, int ndigits, int *decpt, int *sign,
- char **rve, char *buf, size_t blen)
+char *dtoa_r(double dd, int mode, int ndigits, int *decpt, int *sign, char **rve, char *buf, size_t blen)
{
/* Arguments ndigits, decpt, sign are similar to those
of ecvt and fcvt; trailing zeros are suppressed from
@@ -5030,8 +4556,7 @@ char *dtoa_r(double dd, int mode, int ndigits, int *decpt, int *sign,
#ifdef MULTIPLE_THREADS
ThInfo *TI = 0;
#endif
- int bbits, b2, b5, be, dig, i, ilim, ilim1, j, j1, k, leftright, m2, m5,
- s2, s5, spec_case;
+ int bbits, b2, b5, be, dig, i, ilim, ilim1, j, j1, k, leftright, m2, m5, s2, s5, spec_case;
#if !defined(Sudden_Underflow) || defined(USE_BF96)
int denorm;
#endif
@@ -5043,9 +4568,8 @@ char *dtoa_r(double dd, int mode, int ndigits, int *decpt, int *sign,
#endif
#ifdef USE_BF96 /*{{*/
BF96 *p10;
- ULLong dbhi, dbits, dblo, den, hb, rb, rblo, res, res0, res3, reslo,
- sres, sulp, tv0, tv1, tv2, tv3, ulp, ulplo, ulpmask, ures,
- ureslo, zb;
+ ULLong dbhi, dbits, dblo, den, hb, rb, rblo, res, res0, res3, reslo, sres, sulp, tv0, tv1, tv2, tv3, ulp, ulplo,
+ ulpmask, ures, ureslo, zb;
int eulp, k1, n2, ulpadj, ulpshift;
#else /*}{*/
#ifndef Sudden_Underflow
@@ -5168,8 +4692,7 @@ char *dtoa_r(double dd, int mode, int ndigits, int *decpt, int *sign,
dbhi = dbits >> 32;
dblo = dbits & 0xffffffffull;
i = be - 0x3fe;
- if (i < p10->e || (i == p10->e && (dbhi < p10->b0 || (dbhi == p10->b0 &&
- dblo < p10->b1))))
+ if (i < p10->e || (i == p10->e && (dbhi < p10->b0 || (dbhi == p10->b0 && dblo < p10->b1))))
--j;
k = j - 342;
@@ -5181,8 +4704,7 @@ char *dtoa_r(double dd, int mode, int ndigits, int *decpt, int *sign,
#ifdef Sudden_Underflow
i = (int)(word0(&u) >> Exp_shift1 & (Exp_mask >> Exp_shift1));
#else
- if ((i = (int)(word0(&u) >> Exp_shift1 &
- (Exp_mask >> Exp_shift1)))) {
+ if ((i = (int)(word0(&u) >> Exp_shift1 & (Exp_mask >> Exp_shift1)))) {
#endif
dval(&d2) = dval(&u);
word0(&d2) &= Frac_mask1;
@@ -5227,16 +4749,14 @@ char *dtoa_r(double dd, int mode, int ndigits, int *decpt, int *sign,
/* d is denormalized */
i = bbits + be + (Bias + (P - 1) - 1);
- x = i > 32 ? word0(&u) << (64 - i) | word1(&u) >> (i - 32) :
- word1(&u) << (32 - i);
+ x = i > 32 ? word0(&u) << (64 - i) | word1(&u) >> (i - 32) : word1(&u) << (32 - i);
dval(&d2) = x;
word0(&d2) -= 31 * Exp_msk1; /* adjust exponent */
i -= (Bias + (P - 1) - 1) + 1;
denorm = 1;
}
#endif
- ds = (dval(&d2) - 1.5) * 0.289529654602168 + 0.1760912590558 +
- i * 0.301029995663981;
+ ds = (dval(&d2) - 1.5) * 0.289529654602168 + 0.1760912590558 + i * 0.301029995663981;
k = (int)ds;
if (ds < 0. && ds != k)
k--; /* want k = floor(ds) */
@@ -5312,9 +4832,7 @@ char *dtoa_r(double dd, int mode, int ndigits, int *decpt, int *sign,
}
if (!buf) {
buf = rv_alloc(i MTb);
- blen = sizeof(Bigint) +
- ((1 << ((int *)buf)[-1]) - 1) * sizeof(ULong) -
- sizeof(int);
+ blen = sizeof(Bigint) + ((1 << ((int *)buf)[-1]) - 1) * sizeof(ULong) - sizeof(int);
} else if (blen <= (size_t)i) {
buf = 0;
if (rve)
@@ -5409,9 +4927,7 @@ use_exact:
}
if (ilim < 0) {
ures = den - res;
- if (2 * res <= ulp &&
- (spec_case ? 4 * res <= ulp :
- (2 * res < ulp || dig & 1)))
+ if (2 * res <= ulp && (spec_case ? 4 * res <= ulp : (2 * res < ulp || dig & 1)))
goto ulp_reached;
if (2 * ures < ulp)
goto Roundup;
@@ -5450,13 +4966,9 @@ no_div:
}
if (ilim < 0) {
ures = (1ull << j) - res;
- if (2 * res <= ulp &&
- (spec_case ? 4 * res <= ulp :
- (2 * res < ulp || dig & 1))) {
+ if (2 * res <= ulp && (spec_case ? 4 * res <= ulp : (2 * res < ulp || dig & 1))) {
ulp_reached:
- if (ures < res ||
- (ures == res && dig & 1) ||
- (dig == 9 && 2 * ures <= ulp))
+ if (ures < res || (ures == res && dig & 1) || (dig == 9 && 2 * ures <= ulp))
goto Roundup;
goto retc;
}
@@ -5530,8 +5042,7 @@ toobig:
/* scaled ulp = ulp * 2^(eulp - 60) */
/* We maintain 61 bits of the scaled ulp. */
if (ilim == 0) {
- if (!(res & 0x7fffffffffffffeull) ||
- !((~res) & 0x7fffffffffffffeull))
+ if (!(res & 0x7fffffffffffffeull) || !((~res) & 0x7fffffffffffffeull))
goto Fast_failed1;
S = mhi = 0;
if (res >= 0x5000000000000000ull)
@@ -5563,14 +5074,11 @@ toobig:
zb = -(1ull << (eulp + 63));
if (!(zb & res)) {
sres = res << (1 - eulp);
- if (sres < ulp &&
- (!spec_case || 2 * sres < ulp)) {
- if ((res + rb) << (1 - eulp) >=
- ulp)
+ if (sres < ulp && (!spec_case || 2 * sres < ulp)) {
+ if ((res + rb) << (1 - eulp) >= ulp)
goto Fast_failed;
if (ures < res) {
- if (ures + rb >=
- res - rb)
+ if (ures + rb >= res - rb)
goto Fast_failed;
goto Roundup;
}
@@ -5680,26 +5188,18 @@ Fast_failed:
zb = -(1ull << (eulp + 60));
if (!(zb & (res + rb))) {
sres = (res - rb) << (1 - eulp);
- if (sres < ulp &&
- (!spec_case || 2 * sres < ulp)) {
+ if (sres < ulp && (!spec_case || 2 * sres < ulp)) {
sres = res << (1 - eulp);
if ((j = eulp + 31) > 0)
- sres += (rblo +
- reslo) >>
- j;
+ sres += (rblo + reslo) >> j;
else
- sres += (rblo + reslo)
- << -j;
- if (sres + (rb << (1 - eulp)) >=
- ulp)
+ sres += (rblo + reslo) << -j;
+ if (sres + (rb << (1 - eulp)) >= ulp)
goto Fast_failed1;
if (sres >= ulp)
goto more96;
- if (ures < res ||
- (ures == res &&
- ureslo < reslo)) {
- if (ures + rb >=
- res - rb)
+ if (ures < res || (ures == res && ureslo < reslo)) {
+ if (ures + rb >= res - rb)
goto Fast_failed1;
goto Roundup;
}
@@ -5708,8 +5208,7 @@ Fast_failed:
goto retc;
}
}
- if (!(zb & ures) &&
- (ures - rb) << (1 - eulp) < ulp) {
+ if (!(zb & ures) && (ures - rb) << (1 - eulp) < ulp) {
if ((ures + rb) << (2 - eulp) < ulp)
goto Roundup;
goto Fast_failed1;
@@ -5857,8 +5356,7 @@ Fast_failed1:
the next few lines */
word0(&eps1) -= Exp_msk1 * (Bias + P - 1);
dval(&eps1) *= tens[j1 & 0xf];
- for (i = 0, j = (j1 - 256) >> 4; j;
- j >>= 1, i++)
+ for (i = 0, j = (j1 - 256) >> 4; j; j >>= 1, i++)
if (j & 1)
dval(&eps1) *= bigtens[i];
if (eps.d < eps1.d)
diff --git a/lib/libc/stdio/fclose.c b/lib/libc/stdio/fclose.c
index 4fdf6495..06cda830 100644
--- a/lib/libc/stdio/fclose.c
+++ b/lib/libc/stdio/fclose.c
@@ -1,6 +1,5 @@
-#include <__stdio.h> // for __FILE
-#include <stdio.h> // for fflush, FILE, fclose, stderr, stdin, stdout
-#include <unistd.h> // for close
+#include <stdio.h> // for fflush, FILE, fclose, stderr, stdin, stdout
+#include <unistd.h> // for close
int fclose(FILE *stream)
{
diff --git a/lib/libc/stdio/fdopen.c b/lib/libc/stdio/fdopen.c
index dc9da567..ea0868b4 100644
--- a/lib/libc/stdio/fdopen.c
+++ b/lib/libc/stdio/fdopen.c
@@ -1,7 +1,8 @@
#include "__stdio.h" // for __FILE, __libc_fadd
-#include <stdio.h> // for FILE, _IONBF, SEEK_END, _IOLBF, fdopen
-#include <stdlib.h> // for calloc, free
-#include <sys/cdefs.h>
+#include "stddef.h"
+#include <stdatomic.h>
+#include <stdio.h> // for FILE, _IONBF, SEEK_END, _IOLBF, fdopen
+#include <stdlib.h> // for calloc, free
#include <unistd.h> // for lseek, off_t
FILE *fdopen(int fildes, const char *mode)
diff --git a/lib/libc/stdio/feof.c b/lib/libc/stdio/feof.c
index 6a36172b..235c4931 100644
--- a/lib/libc/stdio/feof.c
+++ b/lib/libc/stdio/feof.c
@@ -1,4 +1,3 @@
-#include <__stdio.h>
#include <stdio.h>
int feof(FILE *stream)
diff --git a/lib/libc/stdio/feof_unlocked.c b/lib/libc/stdio/feof_unlocked.c
index 4d7d9d53..f6edee58 100644
--- a/lib/libc/stdio/feof_unlocked.c
+++ b/lib/libc/stdio/feof_unlocked.c
@@ -3,5 +3,5 @@
int feof_unlocked(FILE *stream)
{
- return (stream) ? stream->eof : 0;
+ return (stream) ? ((struct __FILE *)stream)->eof : 0;
}
diff --git a/lib/libc/stdio/fflush.c b/lib/libc/stdio/fflush.c
index b3fca8bd..b73422a6 100644
--- a/lib/libc/stdio/fflush.c
+++ b/lib/libc/stdio/fflush.c
@@ -1,8 +1,5 @@
#include "__stdio.h" // for __FILE, _IO_ERR
-#include "stddef.h" // for NULL
-#include <atomic.h> // for LIBC_UNLOCK, LIBC_LOCK
-#include <errno.h> // for errno, EBADF, EIO
#include <stdio.h>
int fflush(struct __FILE *stream)
diff --git a/lib/libc/stdio/fflush_unlocked.c b/lib/libc/stdio/fflush_unlocked.c
index b4ee3e43..49bc1acc 100644
--- a/lib/libc/stdio/fflush_unlocked.c
+++ b/lib/libc/stdio/fflush_unlocked.c
@@ -1,7 +1,9 @@
+#include "stddef.h"
#include <__stdio.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
+#include <string.h>
#include <sys/cdefs.h>
#include <unistd.h>
diff --git a/lib/libc/stdio/fgets_unlocked.c b/lib/libc/stdio/fgets_unlocked.c
index 9e2dca60..3258a4e8 100644
--- a/lib/libc/stdio/fgets_unlocked.c
+++ b/lib/libc/stdio/fgets_unlocked.c
@@ -1,3 +1,4 @@
+#include "stddef.h"
#include <stdio.h>
char *fgets_unlocked(char *s, int n, FILE *stream)
diff --git a/lib/libc/stdio/fileno_unlocked.c b/lib/libc/stdio/fileno_unlocked.c
index a3490686..d15d6387 100644
--- a/lib/libc/stdio/fileno_unlocked.c
+++ b/lib/libc/stdio/fileno_unlocked.c
@@ -2,7 +2,7 @@
#include <errno.h>
#include <stdio.h>
-int fileno_unlocked(FILE *stream)
+int fileno_unlocked(struct __FILE *stream)
{
if (stream->fd < 0) {
errno = EBADF;
diff --git a/lib/libc/stdio/flockfile.c b/lib/libc/stdio/flockfile.c
index 788750b0..8732685b 100644
--- a/lib/libc/stdio/flockfile.c
+++ b/lib/libc/stdio/flockfile.c
@@ -4,5 +4,5 @@
void flockfile(FILE *file)
{
- LIBC_LOCK(file->lock);
+ LIBC_LOCK(((struct __FILE *)file)->lock);
}
diff --git a/lib/libc/stdio/fopen.c b/lib/libc/stdio/fopen.c
index 0265694a..20273077 100644
--- a/lib/libc/stdio/fopen.c
+++ b/lib/libc/stdio/fopen.c
@@ -1,11 +1,12 @@
+#include "stddef.h"
#include <__stdio.h>
-#include <errno.h> // for EINVAL, errno
-#include <fcntl.h> // for O_WRONLY, O_CREAT, O_RDONLY, open, O_APPEND
+#include <errno.h> // for EINVAL, errno
+#include <fcntl.h> // for O_WRONLY, O_CREAT, O_RDONLY, open, O_APPEND
+#include <stdatomic.h>
#include <stdio.h> // for FILE, BUFSIZ, fopen, _IOLBF
#include <stdlib.h> // for calloc, free, malloc
#include <string.h> // for strchr
-#include <sys/cdefs.h>
#include <unistd.h> // for close
FILE *fopen(const char *restrict pathname, const char *restrict mode)
diff --git a/lib/libc/stdio/fread_unlocked.c b/lib/libc/stdio/fread_unlocked.c
index 4251a7ed..c80dd9c0 100644
--- a/lib/libc/stdio/fread_unlocked.c
+++ b/lib/libc/stdio/fread_unlocked.c
@@ -1,6 +1,5 @@
#include "__stdio.h" // for __FILE, _IO_EOF, _IO_ERR
-#include <atomic.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
diff --git a/lib/libc/stdio/fseek.c b/lib/libc/stdio/fseek.c
index 19459e7f..65f654f9 100644
--- a/lib/libc/stdio/fseek.c
+++ b/lib/libc/stdio/fseek.c
@@ -1,7 +1,6 @@
#include "__stdio.h" // for __FILE, _IO_EOF, _IO_ERR
#include "stddef.h" // for NULL
-#include <atomic.h> // for LIBC_LOCK, LIBC_UNLOCK
#include <stdio.h> // for FILE, fseek
#include <unistd.h> // for lseek, off_t
diff --git a/lib/libc/stdio/ftrylockfile.c b/lib/libc/stdio/ftrylockfile.c
index b8f89e4b..0c25dfeb 100644
--- a/lib/libc/stdio/ftrylockfile.c
+++ b/lib/libc/stdio/ftrylockfile.c
@@ -1,8 +1,9 @@
#include <__stdio.h>
-#include <atomic.h>
+#include <stdatomic.h>
+#include <stddef.h>
#include <stdio.h>
-int ftrylockfile(FILE *file)
+int ftrylockfile(struct __FILE *file)
{
if (file == NULL)
return -1;
diff --git a/lib/libc/stdio/funlockfile.c b/lib/libc/stdio/funlockfile.c
index 9d4154c7..509e4eae 100644
--- a/lib/libc/stdio/funlockfile.c
+++ b/lib/libc/stdio/funlockfile.c
@@ -2,7 +2,7 @@
#include <atomic.h>
#include <stdio.h>
-void funlockfile(FILE *file)
+void funlockfile(struct __FILE *file)
{
LIBC_UNLOCK(file->lock);
}
diff --git a/lib/libc/stdio/fwrite_unlocked.c b/lib/libc/stdio/fwrite_unlocked.c
index dd5f4c0b..ec23a58a 100644
--- a/lib/libc/stdio/fwrite_unlocked.c
+++ b/lib/libc/stdio/fwrite_unlocked.c
@@ -1,5 +1,4 @@
#include "__stdio.h"
-#include <atomic.h>
#include <errno.h>
#include <fcntl.h>
#include <stddef.h>
diff --git a/lib/libc/stdio/pclose.c b/lib/libc/stdio/pclose.c
index 1967b2c8..31afe5be 100644
--- a/lib/libc/stdio/pclose.c
+++ b/lib/libc/stdio/pclose.c
@@ -1,8 +1,8 @@
-#include <__stdio.h> // for __FILE
+#include <__stdio.h>
#include <stdio.h> // for fclose, FILE, pclose
#include <sys/wait.h> // for waitpid
-int pclose(FILE *stream)
+int pclose(struct __FILE *stream)
{
int stat;
fclose(stream);
diff --git a/lib/libc/stdio/popen.c b/lib/libc/stdio/popen.c
index 5720fba3..a1ef6a9f 100644
--- a/lib/libc/stdio/popen.c
+++ b/lib/libc/stdio/popen.c
@@ -1,14 +1,14 @@
-#include "stddef.h" // for NULL
+#include <__stdio.h>
+#include <stddef.h> // for NULL
-#include <__stdio.h> // for __FILE
-#include <errno.h> // for EINVAL, errno
-#include <fcntl.h> // for O_RDONLY, O_CLOEXEC, O_WRONLY
-#include <stdio.h> // for FILE, fclose, fdopen, popen
-#include <unistd.h> // for close, dup2, _exit, execl, fork, pipe2, STDIN_F...
+#include <errno.h> // for EINVAL, errno
+#include <fcntl.h> // for O_RDONLY, O_CLOEXEC, O_WRONLY
+#include <stdio.h> // for FILE, fclose, fdopen, popen
+#include <unistd.h> // for close, dup2, _exit, execl, fork, pipe2, STDIN_F...
FILE *popen(const char *command, const char *mode)
{
- FILE *stream;
+ struct __FILE *stream;
int oflag;
int pipefd[2];
diff --git a/lib/libc/stdio/setvbuf.c b/lib/libc/stdio/setvbuf.c
index d6b41d31..ec0f7757 100644
--- a/lib/libc/stdio/setvbuf.c
+++ b/lib/libc/stdio/setvbuf.c
@@ -1,9 +1,9 @@
#include "stddef.h" // for NULL
-#include <__stdio.h> // for __FILE
-#include <stdio.h> // for _IONBF, FILE, _IOFBF, _IOLBF, setvbuf, size_t
+#include <__stdio.h>
+#include <stdio.h> // for _IONBF, FILE, _IOFBF, _IOLBF, setvbuf, size_t
-int setvbuf(FILE *restrict stream, char *restrict buf, int type, size_t size)
+int setvbuf(struct __FILE *restrict stream, char *restrict buf, int type, size_t size)
{
if (type != _IOFBF && type != _IOLBF && type != _IONBF)
return -1;
diff --git a/lib/libc/stdio/vsnprintf.c b/lib/libc/stdio/vsnprintf.c
index 818cffb5..9c249fb8 100644
--- a/lib/libc/stdio/vsnprintf.c
+++ b/lib/libc/stdio/vsnprintf.c
@@ -6,8 +6,7 @@
#include <stdio.h> // for vfprintf, vsnprintf, _IONBF, size_t, va_list
#include <string.h> // for memset
-int vsnprintf(char *restrict s, size_t n, const char *restrict format,
- va_list ap)
+int vsnprintf(char *restrict s, size_t n, const char *restrict format, va_list ap)
{
int r;
struct __FILE stream;
diff --git a/lib/libc/stdlib/aligned_alloc.c b/lib/libc/stdlib/aligned_alloc.c
index f8ab24db..be5bab4c 100644
--- a/lib/libc/stdlib/aligned_alloc.c
+++ b/lib/libc/stdlib/aligned_alloc.c
@@ -29,8 +29,7 @@ void *aligned_alloc(size_t alignment, size_t size)
}
uintptr_t raw_addr = (uintptr_t)raw_ptr;
- uintptr_t aligned_addr = (raw_addr + sizeof(void *) + alignment - 1) &
- ~(alignment - 1);
+ uintptr_t aligned_addr = (raw_addr + sizeof(void *) + alignment - 1) & ~(alignment - 1);
void **orig_ptr_slot = (void **)(aligned_addr - sizeof(void *));
*orig_ptr_slot = raw_ptr;
diff --git a/lib/libc/stdlib/bsearch.c b/lib/libc/stdlib/bsearch.c
index b4f83d55..3d2ef896 100644
--- a/lib/libc/stdlib/bsearch.c
+++ b/lib/libc/stdlib/bsearch.c
@@ -67,8 +67,7 @@ is respectively less than, matching, or greater than the array member.
* have to make lim 3, then halve, obtaining 1, so that we will only
* look at item 3.
*/
-void *bsearch(const void *key, const void *base0, size_t nmemb, size_t size,
- int (*compar)(const void *, const void *))
+void *bsearch(const void *key, const void *base0, size_t nmemb, size_t size, int (*compar)(const void *, const void *))
{
const char *base = (const char *)base0;
int lim, cmp;
diff --git a/lib/libc/stdlib/calloc.c b/lib/libc/stdlib/calloc.c
index b472d446..d5762de6 100644
--- a/lib/libc/stdlib/calloc.c
+++ b/lib/libc/stdlib/calloc.c
@@ -1,3 +1,4 @@
+#include "stddef.h"
#include <errno.h> // for errno, EINVAL, ENOMEM
#include <stdlib.h> // for calloc, malloc
#include <string.h> // for size_t, memset
diff --git a/lib/libc/stdlib/heapsort.c b/lib/libc/stdlib/heapsort.c
index 20922f12..b6b97430 100644
--- a/lib/libc/stdlib/heapsort.c
+++ b/lib/libc/stdlib/heapsort.c
@@ -68,21 +68,19 @@
* There two cases. If j == nmemb, select largest of Ki and Kj. If
* j < nmemb, select largest of Ki, Kj and Kj+1.
*/
-#define CREATE(initval, nmemb, par_i, child_i, par, child, size, count, tmp) \
- { \
- for ((par_i) = initval; ((child_i) = (par_i) * 2) <= (nmemb); \
- (par_i) = (child_i)) { \
- (child) = base + (child_i) * (size); \
- if ((child_i) < (nmemb) && \
- compar(child, (child) + (size)) < 0) { \
- (child) += (size); \
- ++(child_i); \
- } \
- (par) = base + (par_i) * (size); \
- if (compar(child, par) <= 0) \
- break; \
- SWAP(par, child, count, size, tmp); \
- } \
+#define CREATE(initval, nmemb, par_i, child_i, par, child, size, count, tmp) \
+ { \
+ for ((par_i) = initval; ((child_i) = (par_i) * 2) <= (nmemb); (par_i) = (child_i)) { \
+ (child) = base + (child_i) * (size); \
+ if ((child_i) < (nmemb) && compar(child, (child) + (size)) < 0) { \
+ (child) += (size); \
+ ++(child_i); \
+ } \
+ (par) = base + (par_i) * (size); \
+ if (compar(child, par) <= 0) \
+ break; \
+ SWAP(par, child, count, size, tmp); \
+ } \
}
/*
@@ -102,30 +100,28 @@
*
* XXX Don't break the #define SELECT line, below. Reiser cpp gets upset.
*/
-#define SELECT(par_i, child_i, nmemb, par, child, size, k, count, tmp1, tmp2) \
- { \
- for ((par_i) = 1; ((child_i) = (par_i) * 2) <= (nmemb); \
- (par_i) = (child_i)) { \
- (child) = base + (child_i) * (size); \
- if ((child_i) < (nmemb) && \
- compar(child, (child) + (size)) < 0) { \
- (child) += (size); \
- ++(child_i); \
- } \
- (par) = base + (par_i) * (size); \
- COPY(par, child, count, size, tmp1, tmp2); \
- } \
- for (;;) { \
- (child_i) = par_i; \
- (par_i) = (child_i) / 2; \
- (child) = base + (child_i) * (size); \
- (par) = base + (par_i) * (size); \
- if ((child_i) == 1 || compar(k, par) < 0) { \
- COPY(child, k, count, size, tmp1, tmp2); \
- break; \
- } \
- COPY(child, par, count, size, tmp1, tmp2); \
- } \
+#define SELECT(par_i, child_i, nmemb, par, child, size, k, count, tmp1, tmp2) \
+ { \
+ for ((par_i) = 1; ((child_i) = (par_i) * 2) <= (nmemb); (par_i) = (child_i)) { \
+ (child) = base + (child_i) * (size); \
+ if ((child_i) < (nmemb) && compar(child, (child) + (size)) < 0) { \
+ (child) += (size); \
+ ++(child_i); \
+ } \
+ (par) = base + (par_i) * (size); \
+ COPY(par, child, count, size, tmp1, tmp2); \
+ } \
+ for (;;) { \
+ (child_i) = par_i; \
+ (par_i) = (child_i) / 2; \
+ (child) = base + (child_i) * (size); \
+ (par) = base + (par_i) * (size); \
+ if ((child_i) == 1 || compar(k, par) < 0) { \
+ COPY(child, k, count, size, tmp1, tmp2); \
+ break; \
+ } \
+ COPY(child, par, count, size, tmp1, tmp2); \
+ } \
}
/*
@@ -135,8 +131,7 @@
* a data set that will trigger the worst case is nonexistent. Heapsort's
* only advantage over quicksort is that it requires little additional memory.
*/
-int heapsort(void *vbase, size_t nmemb, size_t size,
- int (*compar)(const void *, const void *))
+int heapsort(void *vbase, size_t nmemb, size_t size, int (*compar)(const void *, const void *))
{
size_t cnt;
size_t i;
diff --git a/lib/libc/stdlib/heapsort_r.c b/lib/libc/stdlib/heapsort_r.c
index 05c6e3ae..348d5a07 100644
--- a/lib/libc/stdlib/heapsort_r.c
+++ b/lib/libc/stdlib/heapsort_r.c
@@ -68,21 +68,19 @@
* There two cases. If j == nmemb, select largest of Ki and Kj. If
* j < nmemb, select largest of Ki, Kj and Kj+1.
*/
-#define CREATE(initval, nmemb, par_i, child_i, par, child, size, count, tmp) \
- { \
- for ((par_i) = initval; ((child_i) = (par_i) * 2) <= (nmemb); \
- (par_i) = (child_i)) { \
- (child) = base + (child_i) * (size); \
- if ((child_i) < (nmemb) && \
- compar(thunk, child, (child) + (size)) < 0) { \
- (child) += (size); \
- ++(child_i); \
- } \
- (par) = base + (par_i) * (size); \
- if (compar(thunk, child, par) <= 0) \
- break; \
- SWAP(par, child, count, size, tmp); \
- } \
+#define CREATE(initval, nmemb, par_i, child_i, par, child, size, count, tmp) \
+ { \
+ for ((par_i) = initval; ((child_i) = (par_i) * 2) <= (nmemb); (par_i) = (child_i)) { \
+ (child) = base + (child_i) * (size); \
+ if ((child_i) < (nmemb) && compar(thunk, child, (child) + (size)) < 0) { \
+ (child) += (size); \
+ ++(child_i); \
+ } \
+ (par) = base + (par_i) * (size); \
+ if (compar(thunk, child, par) <= 0) \
+ break; \
+ SWAP(par, child, count, size, tmp); \
+ } \
}
/*
@@ -102,30 +100,28 @@
*
* XXX Don't break the #define SELECT line, below. Reiser cpp gets upset.
*/
-#define SELECT(par_i, child_i, nmemb, par, child, size, k, count, tmp1, tmp2) \
- { \
- for ((par_i) = 1; ((child_i) = (par_i) * 2) <= (nmemb); \
- (par_i) = (child_i)) { \
- (child) = base + (child_i) * (size); \
- if ((child_i) < (nmemb) && \
- compar(thunk, child, (child) + (size)) < 0) { \
- (child) += (size); \
- ++(child_i); \
- } \
- (par) = base + (par_i) * (size); \
- COPY(par, child, count, size, tmp1, tmp2); \
- } \
- for (;;) { \
- (child_i) = par_i; \
- (par_i) = (child_i) / 2; \
- (child) = base + (child_i) * (size); \
- (par) = base + (par_i) * (size); \
- if ((child_i) == 1 || compar(thunk, k, par) < 0) { \
- COPY(child, k, count, size, tmp1, tmp2); \
- break; \
- } \
- COPY(child, par, count, size, tmp1, tmp2); \
- } \
+#define SELECT(par_i, child_i, nmemb, par, child, size, k, count, tmp1, tmp2) \
+ { \
+ for ((par_i) = 1; ((child_i) = (par_i) * 2) <= (nmemb); (par_i) = (child_i)) { \
+ (child) = base + (child_i) * (size); \
+ if ((child_i) < (nmemb) && compar(thunk, child, (child) + (size)) < 0) { \
+ (child) += (size); \
+ ++(child_i); \
+ } \
+ (par) = base + (par_i) * (size); \
+ COPY(par, child, count, size, tmp1, tmp2); \
+ } \
+ for (;;) { \
+ (child_i) = par_i; \
+ (par_i) = (child_i) / 2; \
+ (child) = base + (child_i) * (size); \
+ (par) = base + (par_i) * (size); \
+ if ((child_i) == 1 || compar(thunk, k, par) < 0) { \
+ COPY(child, k, count, size, tmp1, tmp2); \
+ break; \
+ } \
+ COPY(child, par, count, size, tmp1, tmp2); \
+ } \
}
/*
@@ -135,8 +131,7 @@
* a data set that will trigger the worst case is nonexistent. Heapsort's
* only advantage over quicksort is that it requires little additional memory.
*/
-int heapsort_r(void *vbase, size_t nmemb, size_t size, void *thunk,
- int (*compar)(void *, const void *, const void *))
+int heapsort_r(void *vbase, size_t nmemb, size_t size, void *thunk, int (*compar)(void *, const void *, const void *))
{
size_t cnt;
size_t i;
diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c
index c696e64c..ff89dfa3 100644
--- a/lib/libc/stdlib/malloc.c
+++ b/lib/libc/stdlib/malloc.c
@@ -1,3 +1,4 @@
+#include "stddef.h"
#include <atomic.h> // for LIBC_UNLOCK, LIBC_LOCK
#include <libc.h> // for libc, libc::(anonymous)
#include <malloc.h> // for page, page::(anonymous), class, global_size_c...
diff --git a/lib/libc/stdlib/posix_memalign.c b/lib/libc/stdlib/posix_memalign.c
index f76e63fe..251512a1 100644
--- a/lib/libc/stdlib/posix_memalign.c
+++ b/lib/libc/stdlib/posix_memalign.c
@@ -11,8 +11,7 @@ int posix_memalign(void **memptr, size_t alignment, size_t size)
*memptr = NULL;
- if (alignment < sizeof(void *) || alignment % sizeof(void *) != 0 ||
- (alignment & (alignment - 1)) != 0) {
+ if (alignment < sizeof(void *) || alignment % sizeof(void *) != 0 || (alignment & (alignment - 1)) != 0) {
return EINVAL;
}
diff --git a/lib/libc/stdlib/qsort.c b/lib/libc/stdlib/qsort.c
index ab0256a5..1f78ce9a 100644
--- a/lib/libc/stdlib/qsort.c
+++ b/lib/libc/stdlib/qsort.c
@@ -5,8 +5,7 @@ static int wrapper(const void *a, const void *b, void *compar)
return ((int (*)(const void *, const void *))compar)(a, b);
}
-void qsort(void *base, size_t nel, size_t width,
- int (*compar)(const void *, const void *))
+void qsort(void *base, size_t nel, size_t width, int (*compar)(const void *, const void *))
{
qsort_r(base, nel, width, wrapper, compar);
}
diff --git a/lib/libc/stdlib/qsort_r.c b/lib/libc/stdlib/qsort_r.c
index 25a3aa81..54420ebd 100644
--- a/lib/libc/stdlib/qsort_r.c
+++ b/lib/libc/stdlib/qsort_r.c
@@ -38,8 +38,7 @@ typedef int (*cmpfun)(const void *, const void *, void *);
static inline int pntz(size_t p[2])
{
int r = ntz(p[0] - 1);
- if (r != 0 ||
- (r = 8 * sizeof(size_t) + ntz(p[1])) != 8 * sizeof(size_t)) {
+ if (r != 0 || (r = 8 * sizeof(size_t) + ntz(p[1])) != 8 * sizeof(size_t)) {
return r;
}
return 0;
@@ -98,8 +97,7 @@ static inline void shr(size_t p[2], int n)
p[1] >>= n;
}
-static void sift(unsigned char *head, size_t width, cmpfun cmp, void *arg,
- int pshift, size_t lp[], int max_lp_index)
+static void sift(unsigned char *head, size_t width, cmpfun cmp, void *arg, int pshift, size_t lp[], int max_lp_index)
{
unsigned char *rt, *lf;
unsigned char *ar[14 * sizeof(size_t) + 1];
@@ -129,9 +127,8 @@ static void sift(unsigned char *head, size_t width, cmpfun cmp, void *arg,
cycle(width, ar, i);
}
-static void trinkle(unsigned char *head, size_t width, cmpfun cmp, void *arg,
- size_t pp[2], int pshift, int trusty, size_t lp[],
- int max_lp_index)
+static void trinkle(unsigned char *head, size_t width, cmpfun cmp, void *arg, size_t pp[2], int pshift, int trusty,
+ size_t lp[], int max_lp_index)
{
unsigned char *stepson, *rt, *lf;
size_t p[2];
@@ -151,12 +148,10 @@ static void trinkle(unsigned char *head, size_t width, cmpfun cmp, void *arg,
if (cmp(stepson, ar[0], arg) <= 0) {
break;
}
- if (!trusty && pshift > 1 && pshift - 2 >= 0 &&
- pshift - 2 <= max_lp_index) {
+ if (!trusty && pshift > 1 && pshift - 2 >= 0 && pshift - 2 <= max_lp_index) {
rt = head - width;
lf = head - width - lp[pshift - 2];
- if (cmp(rt, stepson, arg) >= 0 ||
- cmp(lf, stepson, arg) >= 0) {
+ if (cmp(rt, stepson, arg) >= 0 || cmp(lf, stepson, arg) >= 0) {
break;
}
}
@@ -191,8 +186,7 @@ void qsort_r(void *base, size_t nel, size_t width, cmpfun cmp, void *arg)
high = head + size - width;
/* Precompute Leonardo numbers, scaled by element width */
- for (lp[0] = lp[1] = width, i = 2;
- (lp[i] = lp[i - 2] + lp[i - 1] + width) < size && i < 63; i++)
+ for (lp[0] = lp[1] = width, i = 2; (lp[i] = lp[i - 2] + lp[i - 1] + width) < size && i < 63; i++)
;
max_lp_index = i - 1;
@@ -202,13 +196,10 @@ void qsort_r(void *base, size_t nel, size_t width, cmpfun cmp, void *arg)
shr(p, 2);
pshift += 2;
} else {
- if (pshift - 1 >= 0 && pshift - 1 <= max_lp_index &&
- lp[pshift - 1] >= (size_t)(high - head)) {
- trinkle(head, width, cmp, arg, p, pshift, 0, lp,
- max_lp_index);
+ if (pshift - 1 >= 0 && pshift - 1 <= max_lp_index && lp[pshift - 1] >= (size_t)(high - head)) {
+ trinkle(head, width, cmp, arg, p, pshift, 0, lp, max_lp_index);
} else {
- sift(head, width, cmp, arg, pshift, lp,
- max_lp_index);
+ sift(head, width, cmp, arg, pshift, lp, max_lp_index);
}
if (pshift == 1) {
@@ -236,16 +227,12 @@ void qsort_r(void *base, size_t nel, size_t width, cmpfun cmp, void *arg)
pshift -= 2;
p[0] ^= 7;
shr(p, 1);
- if (pshift >= 0 && pshift <= max_lp_index &&
- pshift < 64) {
- trinkle(head - lp[pshift] - width, width, cmp,
- arg, p, pshift + 1, 1, lp,
- max_lp_index);
+ if (pshift >= 0 && pshift <= max_lp_index && pshift < 64) {
+ trinkle(head - lp[pshift] - width, width, cmp, arg, p, pshift + 1, 1, lp, max_lp_index);
}
shl(p, 1);
p[0] |= 1;
- trinkle(head - width, width, cmp, arg, p, pshift, 1, lp,
- max_lp_index);
+ trinkle(head - width, width, cmp, arg, p, pshift, 1, lp, max_lp_index);
}
head -= width;
}
diff --git a/lib/libc/string/memcpy.c b/lib/libc/string/memcpy.c
index f87d95cd..83a29170 100644
--- a/lib/libc/string/memcpy.c
+++ b/lib/libc/string/memcpy.c
@@ -1,5 +1,6 @@
#include <errno.h> // for EINVAL, ERANGE
#include <stddef.h> // for NULL, errno_t
+#include <stdint.h>
#include <string.h> // for rsize_t, memcpy, size_t, memcpy_s
#include <sys/cdefs.h>
@@ -7,12 +8,101 @@ __weak void *memcpy(void *restrict s1, const void *restrict s2, size_t n);
void *memcpy(void *restrict s1, const void *restrict s2, size_t n)
{
- unsigned char *dest = (unsigned char *)s1;
- const unsigned char *src = (const unsigned char *)s2;
+ unsigned char *d = (unsigned char *)s1;
+ const unsigned char *s = (const unsigned char *)s2;
- while (n--) {
- *dest++ = *src++;
+ if (n == 0)
+ return s1;
+
+ if (n < 16) {
+ if (n >= 8) {
+ *(uint64_t *)d = *(const uint64_t *)s;
+ d += 8;
+ s += 8;
+ n -= 8;
+ }
+ if (n >= 4) {
+ *(uint32_t *)d = *(const uint32_t *)s;
+ d += 4;
+ s += 4;
+ n -= 4;
+ }
+ if (n >= 2) {
+ *(uint16_t *)d = *(const uint16_t *)s;
+ d += 2;
+ s += 2;
+ n -= 2;
+ }
+ if (n)
+ *d = *s;
+ return s1;
+ }
+
+ uintptr_t align_mask = 15;
+ size_t misalign = (uintptr_t)d & align_mask;
+ if (misalign) {
+ size_t to_align = 16 - misalign;
+ if (to_align > n)
+ to_align = n;
+ for (size_t i = 0; i < to_align; ++i)
+ *d++ = *s++;
+ n -= to_align;
+ }
+
+ while (n >= 128) {
+#pragma unroll
+ for (int i = 0; i < 8; ++i) {
+ ((i128 *)d)[i] = ((const i128 *)s)[i];
+ }
+ d += 128;
+ s += 128;
+ n -= 128;
+ }
+ while (n >= 64) {
+#pragma unroll
+ for (int i = 0; i < 4; ++i) {
+ ((i128 *)d)[i] = ((const i128 *)s)[i];
+ }
+ d += 64;
+ s += 64;
+ n -= 64;
+ }
+ while (n >= 32) {
+#pragma unroll
+ for (int i = 0; i < 2; ++i) {
+ ((i128 *)d)[i] = ((const i128 *)s)[i];
+ }
+ d += 32;
+ s += 32;
+ n -= 32;
+ }
+ while (n >= 16) {
+ *(i128 *)d = *(const i128 *)s;
+ d += 16;
+ s += 16;
+ n -= 16;
+ }
+
+ if (n >= 8) {
+ *(uint64_t *)d = *(const uint64_t *)s;
+ d += 8;
+ s += 8;
+ n -= 8;
+ }
+ if (n >= 4) {
+ *(uint32_t *)d = *(const uint32_t *)s;
+ d += 4;
+ s += 4;
+ n -= 4;
+ }
+ if (n >= 2) {
+ *(uint16_t *)d = *(const uint16_t *)s;
+ d += 2;
+ s += 2;
+ n -= 2;
}
+ if (n)
+ *d = *s;
return s1;
}
diff --git a/lib/libc/string/memmem.c b/lib/libc/string/memmem.c
index 4f55cf41..ab9f5398 100644
--- a/lib/libc/string/memmem.c
+++ b/lib/libc/string/memmem.c
@@ -2,8 +2,7 @@
#include <string.h> // for memcmp, size_t, memmem
-void *memmem(const void *haystack, size_t haystacklen, const void *needle,
- size_t needlelen)
+void *memmem(const void *haystack, size_t haystacklen, const void *needle, size_t needlelen)
{
const unsigned char *p1 = haystack;
const unsigned char *p2 = needle;
diff --git a/lib/libc/string/strcoll.c b/lib/libc/string/strcoll.c
index 2a4a3473..334f470c 100644
--- a/lib/libc/string/strcoll.c
+++ b/lib/libc/string/strcoll.c
@@ -1,4 +1,3 @@
-#include <libc.h> // for __unused
#include <string.h> // for strcmp, locale_t, strcoll, strcoll_l
#include <sys/cdefs.h>
diff --git a/lib/libc/string/strerror.c b/lib/libc/string/strerror.c
index b96884ea..6607ab2e 100644
--- a/lib/libc/string/strerror.c
+++ b/lib/libc/string/strerror.c
@@ -1,5 +1,5 @@
+#include "stddef.h"
#include <errno.h> // for ERANGE, E2BIG, EACCES, EADDRINUSE, EADDRNOTAVAIL
-#include <libc.h> // for __unused
#include <string.h> // for memcpy, size_t, strerror, strlen, locale_t
#include <sys/cdefs.h>
diff --git a/lib/libc/string/strtok_r.c b/lib/libc/string/strtok_r.c
index 274f6f08..e0cb4cac 100644
--- a/lib/libc/string/strtok_r.c
+++ b/lib/libc/string/strtok_r.c
@@ -2,8 +2,7 @@
#include <string.h> // for strchr, strtok_r
-char *strtok_r(char *restrict s, const char *restrict sep,
- char **restrict state)
+char *strtok_r(char *restrict s, const char *restrict sep, char **restrict state)
{
if (s == NULL) {
s = *state;
diff --git a/lib/libc/strings/strcasecmp.c b/lib/libc/strings/strcasecmp.c
index 476a5d8d..be8fb719 100644
--- a/lib/libc/strings/strcasecmp.c
+++ b/lib/libc/strings/strcasecmp.c
@@ -1,5 +1,4 @@
#include <ctype.h> // for tolower
-#include <libc.h> // for __unused
#include <locale.h> // for locale_t
#include <sys/cdefs.h>
diff --git a/lib/libc/strings/strncasecmp.c b/lib/libc/strings/strncasecmp.c
index a36990cf..146e07ec 100644
--- a/lib/libc/strings/strncasecmp.c
+++ b/lib/libc/strings/strncasecmp.c
@@ -1,5 +1,4 @@
#include <ctype.h> // for tolower
-#include <libc.h> // for __unused
#include <locale.h> // for locale_t
#include <stddef.h> // for size_t
#include <sys/cdefs.h>
diff --git a/lib/libc/sys/eventfd/eventfd_read.c b/lib/libc/sys/eventfd/eventfd_read.c
index 78d73623..a376489c 100644
--- a/lib/libc/sys/eventfd/eventfd_read.c
+++ b/lib/libc/sys/eventfd/eventfd_read.c
@@ -1,5 +1,4 @@
#include <sys/eventfd.h>
-#include <syscall.h>
#include <unistd.h>
int eventfd_read(int fildes, eventfd_t *value)
diff --git a/lib/libc/sys/eventfd/eventfd_write.c b/lib/libc/sys/eventfd/eventfd_write.c
index 9c89b388..a9aa3e0b 100644
--- a/lib/libc/sys/eventfd/eventfd_write.c
+++ b/lib/libc/sys/eventfd/eventfd_write.c
@@ -1,5 +1,4 @@
#include <sys/eventfd.h>
-#include <syscall.h>
#include <unistd.h>
int eventfd_write(int fildes, eventfd_t value)
diff --git a/lib/libc/sys/inotify/inotify_add_watch.c b/lib/libc/sys/inotify/inotify_add_watch.c
index 22ffd7b1..de2cd8ce 100644
--- a/lib/libc/sys/inotify/inotify_add_watch.c
+++ b/lib/libc/sys/inotify/inotify_add_watch.c
@@ -1,3 +1,4 @@
+#include <stdint.h>
#include <sys/inotify.h>
#include <syscall.h>
diff --git a/lib/libc/sys/io_uring/io_uring_enter.c b/lib/libc/sys/io_uring/io_uring_enter.c
index 5fe0773d..da63ecd8 100644
--- a/lib/libc/sys/io_uring/io_uring_enter.c
+++ b/lib/libc/sys/io_uring/io_uring_enter.c
@@ -1,10 +1,9 @@
#include <signal.h>
+#include <stddef.h>
#include <syscall.h>
-int io_uring_enter(unsigned int fd, unsigned int to_submit,
- unsigned int min_complete, unsigned int flags, sigset_t *sig,
- size_t sz)
+int io_uring_enter(unsigned int fd, unsigned int to_submit, unsigned int min_complete, unsigned int flags,
+ sigset_t *sig, size_t sz)
{
- return syscall(io_uring_enter, fd, to_submit, min_complete, flags, sig,
- sz);
+ return syscall(io_uring_enter, fd, to_submit, min_complete, flags, sig, sz);
}
diff --git a/lib/libc/sys/io_uring/io_uring_register.c b/lib/libc/sys/io_uring/io_uring_register.c
index bee2355f..bbbcb9ee 100644
--- a/lib/libc/sys/io_uring/io_uring_register.c
+++ b/lib/libc/sys/io_uring/io_uring_register.c
@@ -1,7 +1,6 @@
#include <syscall.h>
-int io_uring_register(unsigned int fd, unsigned int opcode, void *arg,
- unsigned int nr_args)
+int io_uring_register(unsigned int fd, unsigned int opcode, void *arg, unsigned int nr_args)
{
return syscall(io_uring_register, fd, opcode, arg, nr_args);
}
diff --git a/lib/libc/sys/io_uring/io_uring_setup.c b/lib/libc/sys/io_uring/io_uring_setup.c
index 0a368a81..916efc27 100644
--- a/lib/libc/sys/io_uring/io_uring_setup.c
+++ b/lib/libc/sys/io_uring/io_uring_setup.c
@@ -1,6 +1,8 @@
-#include <sys/eventfd.h>
+#include "linux/io_uring.h"
+#include "stddef.h"
#include <io_uring.h>
#include <string.h>
+#include <sys/eventfd.h>
#include <sys/mman.h>
#include <syscall.h>
@@ -21,12 +23,9 @@ int __io_uring_setup(void)
if (__io_uring.fd < 0)
return -1;
- __io_uring.sq.ring_size =
- p.sq_off.array + p.sq_entries * sizeof(unsigned int);
- __io_uring.sq.ring = mmap(NULL, __io_uring.sq.ring_size,
- PROT_READ | PROT_WRITE,
- MAP_SHARED | MAP_POPULATE, __io_uring.fd,
- IORING_OFF_SQ_RING);
+ __io_uring.sq.ring_size = p.sq_off.array + p.sq_entries * sizeof(unsigned int);
+ __io_uring.sq.ring = mmap(NULL, __io_uring.sq.ring_size, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_POPULATE,
+ __io_uring.fd, IORING_OFF_SQ_RING);
if (__io_uring.sq.ring == MAP_FAILED)
return -1;
@@ -38,27 +37,21 @@ int __io_uring_setup(void)
__io_uring.sq.flags = __io_uring.sq.ring + p.sq_off.flags;
__io_uring.sq.dropped = __io_uring.sq.ring + p.sq_off.dropped;
__io_uring.sq.array = __io_uring.sq.ring + p.sq_off.array;
- __io_uring.sq.sqes =
- mmap(NULL, p.sq_entries * sizeof(struct io_uring_sqe),
- PROT_READ | PROT_WRITE, MAP_SHARED | MAP_POPULATE,
- __io_uring.fd, IORING_OFF_SQES);
+ __io_uring.sq.sqes = mmap(NULL, p.sq_entries * sizeof(struct io_uring_sqe), PROT_READ | PROT_WRITE,
+ MAP_SHARED | MAP_POPULATE, __io_uring.fd, IORING_OFF_SQES);
if (__io_uring.sq.sqes == MAP_FAILED) {
munmap(__io_uring.sq.ring, __io_uring.sq.ring_size);
return -1;
}
- __io_uring.cq.ring_size =
- p.cq_off.cqes + p.cq_entries * sizeof(struct io_uring_cqe);
- __io_uring.cq.ring = mmap(NULL, __io_uring.cq.ring_size,
- PROT_READ | PROT_WRITE,
- MAP_SHARED | MAP_POPULATE, __io_uring.fd,
- IORING_OFF_CQ_RING);
+ __io_uring.cq.ring_size = p.cq_off.cqes + p.cq_entries * sizeof(struct io_uring_cqe);
+ __io_uring.cq.ring = mmap(NULL, __io_uring.cq.ring_size, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_POPULATE,
+ __io_uring.fd, IORING_OFF_CQ_RING);
if (__io_uring.cq.ring == MAP_FAILED) {
munmap(__io_uring.sq.ring, __io_uring.sq.ring_size);
- munmap(__io_uring.sq.sqes,
- p.sq_entries * sizeof(struct io_uring_sqe));
+ munmap(__io_uring.sq.sqes, p.sq_entries * sizeof(struct io_uring_sqe));
return -1;
}
@@ -66,8 +59,7 @@ int __io_uring_setup(void)
if (__io_uring.eventfd < 0)
return -1;
- io_uring_register(__io_uring.fd, IORING_REGISTER_EVENTFD,
- &__io_uring.eventfd, 1);
+ io_uring_register(__io_uring.fd, IORING_REGISTER_EVENTFD, &__io_uring.eventfd, 1);
__io_uring.cq.head = __io_uring.cq.ring + p.cq_off.head;
__io_uring.cq.tail = __io_uring.cq.ring + p.cq_off.tail;
diff --git a/lib/libc/sys/mount.c b/lib/libc/sys/mount.c
index 75532cdf..6cd77f1b 100644
--- a/lib/libc/sys/mount.c
+++ b/lib/libc/sys/mount.c
@@ -2,8 +2,8 @@
#include <sys/mount.h> // for mount
#include <syscall.h> // for __syscall_5, syscall
-int mount(const char *source, const char *target, const char *filesystemtype,
- unsigned long mountflags, const void *_Nullable data)
+int mount(const char *source, const char *target, const char *filesystemtype, unsigned long mountflags,
+ const void *_Nullable data)
{
return syscall(mount, source, target, filesystemtype, mountflags, data);
}
diff --git a/lib/libc/sys/mqueue/mq_getattr.c b/lib/libc/sys/mqueue/mq_getattr.c
index f5ca62de..2087a5b9 100644
--- a/lib/libc/sys/mqueue/mq_getattr.c
+++ b/lib/libc/sys/mqueue/mq_getattr.c
@@ -1,5 +1,4 @@
#include <mqueue.h>
-#include <syscall.h>
int mq_getattr(mqd_t mqdes, struct mq_attr *mqstat)
{
diff --git a/lib/libc/sys/mqueue/mq_notify.c b/lib/libc/sys/mqueue/mq_notify.c
index 6011f567..0652da12 100644
--- a/lib/libc/sys/mqueue/mq_notify.c
+++ b/lib/libc/sys/mqueue/mq_notify.c
@@ -1,3 +1,4 @@
+#include "stddef.h"
#include <errno.h>
#include <mqueue.h>
#include <signal.h>
diff --git a/lib/libc/sys/mqueue/mq_receive.c b/lib/libc/sys/mqueue/mq_receive.c
index 98d3cd9e..a33ef0ae 100644
--- a/lib/libc/sys/mqueue/mq_receive.c
+++ b/lib/libc/sys/mqueue/mq_receive.c
@@ -1,7 +1,7 @@
#include <mqueue.h>
+#include <stddef.h>
-ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, size_t msg_len,
- unsigned *msg_prio)
+ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned *msg_prio)
{
return mq_timedreceive(mqdes, msg_ptr, msg_len, msg_prio, 0);
}
diff --git a/lib/libc/sys/mqueue/mq_setattr.c b/lib/libc/sys/mqueue/mq_setattr.c
index be2a3b3d..a1bde88b 100644
--- a/lib/libc/sys/mqueue/mq_setattr.c
+++ b/lib/libc/sys/mqueue/mq_setattr.c
@@ -1,8 +1,7 @@
#include <mqueue.h>
#include <syscall.h>
-int mq_setattr(mqd_t mqdes, const struct mq_attr *restrict mqstat,
- struct mq_attr *restrict omqstat)
+int mq_setattr(mqd_t mqdes, const struct mq_attr *restrict mqstat, struct mq_attr *restrict omqstat)
{
return syscall(mq_getsetattr, mqdes, mqstat, omqstat);
}
diff --git a/lib/libc/sys/mqueue/mq_timedreceive.c b/lib/libc/sys/mqueue/mq_timedreceive.c
index bf877fa5..53328862 100644
--- a/lib/libc/sys/mqueue/mq_timedreceive.c
+++ b/lib/libc/sys/mqueue/mq_timedreceive.c
@@ -1,10 +1,10 @@
#include <mqueue.h>
+#include <stddef.h>
#include <syscall.h>
+#include <time.h>
-ssize_t mq_timedreceive(mqd_t mqdes, char *restrict msg_ptr, size_t msg_len,
- unsigned *restrict msg_prio,
+ssize_t mq_timedreceive(mqd_t mqdes, char *restrict msg_ptr, size_t msg_len, unsigned *restrict msg_prio,
const struct timespec *restrict abstime)
{
- return syscall(mq_timedreceive, mqdes, msg_ptr, msg_len, msg_prio,
- abstime);
+ return syscall(mq_timedreceive, mqdes, msg_ptr, msg_len, msg_prio, abstime);
}
diff --git a/lib/libc/sys/mqueue/mq_timedsend.c b/lib/libc/sys/mqueue/mq_timedsend.c
index 228a5d06..3f533095 100644
--- a/lib/libc/sys/mqueue/mq_timedsend.c
+++ b/lib/libc/sys/mqueue/mq_timedsend.c
@@ -1,9 +1,9 @@
#include <mqueue.h>
+#include <stddef.h>
#include <syscall.h>
+#include <time.h>
-int mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len,
- unsigned msg_prio, const struct timespec *abstime)
+int mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec *abstime)
{
- return syscall(mq_timedsend, mqdes, msg_ptr, msg_len, msg_prio,
- abstime);
+ return syscall(mq_timedsend, mqdes, msg_ptr, msg_len, msg_prio, abstime);
}
diff --git a/lib/libc/termios/tcsendbreak.c b/lib/libc/termios/tcsendbreak.c
index a064e7bb..2d5abbca 100644
--- a/lib/libc/termios/tcsendbreak.c
+++ b/lib/libc/termios/tcsendbreak.c
@@ -1,5 +1,5 @@
+#include "sys/cdefs.h"
#include <asm-generic/ioctls.h>
-#include <libc.h>
#include <syscall.h>
#include <termios.h>
diff --git a/lib/libc/thread/thrd_create.c b/lib/libc/thread/thrd_create.c
index e5b7405c..fa7ada78 100644
--- a/lib/libc/thread/thrd_create.c
+++ b/lib/libc/thread/thrd_create.c
@@ -1,15 +1,13 @@
+#include "stddef.h"
+#include "sys/cdefs.h"
#include <__thread.h>
-#include <asm/prctl.h>
-#include <errno.h>
#include <libc.h>
-#include <linux/sched.h>
#include <sched.h>
-#include <signal.h>
+#include <stdint.h>
#include <stdio.h>
#include <sys/mman.h>
#include <syscall.h>
#include <threads.h>
-#include <unistd.h>
struct thread_start {
struct __thread_self *self;
diff --git a/lib/libc/thread/thrd_detach.c b/lib/libc/thread/thrd_detach.c
index b315a20a..1cbe7627 100644
--- a/lib/libc/thread/thrd_detach.c
+++ b/lib/libc/thread/thrd_detach.c
@@ -1,9 +1,8 @@
+#include "stddef.h"
#include <__thread.h>
-#include <libc/futex.h>
#include <stdatomic.h>
#include <sys/mman.h>
#include <threads.h>
-#include <unistd.h>
int thrd_detach(thrd_t thr)
{
diff --git a/lib/libc/thread/thrd_join.c b/lib/libc/thread/thrd_join.c
index 7ec38c4a..5a36f597 100644
--- a/lib/libc/thread/thrd_join.c
+++ b/lib/libc/thread/thrd_join.c
@@ -1,3 +1,4 @@
+#include "stddef.h"
#include <__thread.h>
#include <libc/futex.h>
#include <stdatomic.h>
diff --git a/lib/libc/time/asctime.c b/lib/libc/time/asctime.c
index 0bf76cb2..d878288a 100644
--- a/lib/libc/time/asctime.c
+++ b/lib/libc/time/asctime.c
@@ -3,16 +3,15 @@
char *asctime(const struct tm *timeptr)
{
- static char wday_name[][4] = { "Sun", "Mon", "Tue", "Wed",
- "Thu", "Fri", "Sat" };
- static char mon_name[][4] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
+ static char wday_name[][4] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
+ static char mon_name[][4] = {
+ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
+ };
static char result[26];
- snprintf(result, sizeof(result), "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n",
- wday_name[timeptr->tm_wday], mon_name[timeptr->tm_mon],
- timeptr->tm_mday, timeptr->tm_hour, timeptr->tm_min,
- timeptr->tm_sec, 1900 + timeptr->tm_year);
+ snprintf(result, sizeof(result), "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n", wday_name[timeptr->tm_wday],
+ mon_name[timeptr->tm_mon], timeptr->tm_mday, timeptr->tm_hour, timeptr->tm_min, timeptr->tm_sec,
+ 1900 + timeptr->tm_year);
return result;
}
diff --git a/lib/libc/time/clock.c b/lib/libc/time/clock.c
index 50cc4a6e..f7961f8f 100644
--- a/lib/libc/time/clock.c
+++ b/lib/libc/time/clock.c
@@ -8,8 +8,7 @@ clock_t clock(void)
if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts))
return -1;
- if (ts.tv_sec > LONG_MAX / 1000000 ||
- ts.tv_nsec / 1000 > LONG_MAX - 1000000 * ts.tv_sec)
+ if (ts.tv_sec > LONG_MAX / 1000000 || ts.tv_nsec / 1000 > LONG_MAX - 1000000 * ts.tv_sec)
return -1;
return ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
diff --git a/lib/libc/time/clock_gettime.c b/lib/libc/time/clock_gettime.c
index 1cf1cdaa..424d916a 100644
--- a/lib/libc/time/clock_gettime.c
+++ b/lib/libc/time/clock_gettime.c
@@ -3,7 +3,7 @@
#include <time.h>
extern void __libc_init_vdso(void);
-void *__libc_force_vdso_init = (void *) __libc_init_vdso;
+void *__libc_force_vdso_init = (void *)__libc_init_vdso;
int clock_gettime(clockid_t clock_id, struct timespec *tp)
{
diff --git a/lib/libc/time/gmtime_r.c b/lib/libc/time/gmtime_r.c
index 47dbd105..cb66e6cf 100644
--- a/lib/libc/time/gmtime_r.c
+++ b/lib/libc/time/gmtime_r.c
@@ -26,9 +26,7 @@ struct tm *gmtime_r(const time_t *timer, struct tm *result)
long z = days + 719468;
long era = (z >= 0 ? z : z - 146096) / 146097;
long day_of_era = z - era * 146097;
- long yoe = (day_of_era - day_of_era / 1460 + day_of_era / 36524 -
- day_of_era / 146096) /
- 365;
+ long yoe = (day_of_era - day_of_era / 1460 + day_of_era / 36524 - day_of_era / 146096) / 365;
year = (int)(yoe + era * 400);
long doy = day_of_era - (365 * yoe + yoe / 4 - yoe / 100);
result->tm_yday = (int)doy;
diff --git a/lib/libc/time/strftime.c b/lib/libc/time/strftime.c
index b1763380..f6feb5c6 100644
--- a/lib/libc/time/strftime.c
+++ b/lib/libc/time/strftime.c
@@ -1,4 +1,3 @@
-#include <libc.h> // for __unused
#include <string.h> // for strlcpy, strlen
#include <sys/cdefs.h>
#include <time.h> // for tm, size_t, locale_t, strftime, strftime_l
diff --git a/lib/libc/time/time.c b/lib/libc/time/time.c
index 27e5a06f..49fb6e21 100644
--- a/lib/libc/time/time.c
+++ b/lib/libc/time/time.c
@@ -2,7 +2,7 @@
#include <time.h>
extern void __libc_init_vdso(void);
-void *__libc_force_vdso_init = (void *) __libc_init_vdso;
+void *__libc_force_vdso_init = (void *)__libc_init_vdso;
time_t time(time_t *tloc)
{
diff --git a/lib/libc/time/tzset.c b/lib/libc/time/tzset.c
index eeb1d247..ca54c46e 100644
--- a/lib/libc/time/tzset.c
+++ b/lib/libc/time/tzset.c
@@ -24,8 +24,7 @@ void tzset(void)
static char stdname[8];
int i = 0;
- while (*p && !isdigit((unsigned char)*p) && *p != '+' && *p != '-' &&
- i < 7) {
+ while (*p && !isdigit((unsigned char)*p) && *p != '+' && *p != '-' && i < 7) {
stdname[i++] = *p++;
}
diff --git a/lib/libc/time/utimes.c b/lib/libc/time/utimes.c
index af644481..65d63b6c 100644
--- a/lib/libc/time/utimes.c
+++ b/lib/libc/time/utimes.c
@@ -10,8 +10,7 @@ int utimes(const char *path, const struct timeval times[2])
struct timespec ts[2];
if (times) {
- if (times[0].tv_usec >= 1000000L ||
- times[1].tv_usec >= 1000000L) {
+ if (times[0].tv_usec >= 1000000L || times[1].tv_usec >= 1000000L) {
errno = EINVAL;
return -1;
}
diff --git a/lib/libc/unistd/execvp.c b/lib/libc/unistd/execvp.c
index 26934a76..9865aa1b 100644
--- a/lib/libc/unistd/execvp.c
+++ b/lib/libc/unistd/execvp.c
@@ -31,31 +31,26 @@ int execvp(const char *file, char *const argv[])
ptr = strchr(path, ':');
if (ptr == NULL) {
- if (snprintf(buf, PATH_MAX, "%s/%s", path,
- file) >= PATH_MAX) {
+ if (snprintf(buf, PATH_MAX, "%s/%s", path, file) >= PATH_MAX) {
errno = ENAMETOOLONG;
return -1;
}
/* Validate path doesn't contain dangerous
* characters */
- if (strstr(buf, "..") == NULL &&
- strchr(buf, '\0') == buf + strlen(buf)) {
+ if (strstr(buf, "..") == NULL && strchr(buf, '\0') == buf + strlen(buf)) {
execv(buf, argv);
}
break;
}
- if (snprintf(buf, PATH_MAX, "%.*s/%s",
- (int)(ptr - path), path,
- file) >= PATH_MAX) {
+ if (snprintf(buf, PATH_MAX, "%.*s/%s", (int)(ptr - path), path, file) >= PATH_MAX) {
errno = ENAMETOOLONG;
return -1;
}
/* Validate path doesn't contain dangerous characters */
- if (strstr(buf, "..") == NULL &&
- strchr(buf, '\0') == buf + strlen(buf)) {
+ if (strstr(buf, "..") == NULL && strchr(buf, '\0') == buf + strlen(buf)) {
execv(buf, argv);
}
path = ptr + 1;
diff --git a/lib/libc/unistd/getopt.c b/lib/libc/unistd/getopt.c
index c942da56..4cfca00e 100644
--- a/lib/libc/unistd/getopt.c
+++ b/lib/libc/unistd/getopt.c
@@ -95,8 +95,7 @@ int getopt(int argc, char *const argv[], const char *optstring)
iov[0].iov_base = argv[0];
iov[0].iov_len = strlen(argv[0]);
- iov[1].iov_base =
- ": option requires an argument -- ";
+ iov[1].iov_base = ": option requires an argument -- ";
iov[1].iov_len = 33;
iov[2].iov_base = opt_char;
iov[2].iov_len = 1;
diff --git a/lib/libc/unistd/readlinkat.c b/lib/libc/unistd/readlinkat.c
index b4fbcb39..47161cff 100644
--- a/lib/libc/unistd/readlinkat.c
+++ b/lib/libc/unistd/readlinkat.c
@@ -4,8 +4,7 @@
#include <syscall.h> // for __syscall_4, syscall
#include <unistd.h> // for readlinkat, size_t, ssize_t
-ssize_t readlinkat(int fd, const char *restrict path, char *restrict buf,
- size_t bufsize)
+ssize_t readlinkat(int fd, const char *restrict path, char *restrict buf, size_t bufsize)
{
return syscall(readlinkat, fd, path, buf, bufsize);
}
diff --git a/lib/libc/unistd/write.c b/lib/libc/unistd/write.c
index 9e8ce260..3be27fa5 100644
--- a/lib/libc/unistd/write.c
+++ b/lib/libc/unistd/write.c
@@ -1,3 +1,4 @@
+#include <stddef.h>
#include <syscall.h>
#include <unistd.h>
diff --git a/lib/libm/__cos.c b/lib/libm/__cos.c
index a55d0eba..1ead64ed 100644
--- a/lib/libm/__cos.c
+++ b/lib/libm/__cos.c
@@ -54,11 +54,11 @@
static const double C1 = 4.16666666666666019037e-02, /* 0x3FA55555, 0x5555554C
*/
- C2 = -1.38888888888741095749e-03, /* 0xBF56C16C, 0x16C15177 */
- C3 = 2.48015872894767294178e-05, /* 0x3EFA01A0, 0x19CB1590 */
- C4 = -2.75573143513906633035e-07, /* 0xBE927E4F, 0x809C52AD */
- C5 = 2.08757232129817482790e-09, /* 0x3E21EE9E, 0xBDB4B1C4 */
- C6 = -1.13596475577881948265e-11; /* 0xBDA8FAE9, 0xBE8838D4 */
+ C2 = -1.38888888888741095749e-03, /* 0xBF56C16C, 0x16C15177 */
+ C3 = 2.48015872894767294178e-05, /* 0x3EFA01A0, 0x19CB1590 */
+ C4 = -2.75573143513906633035e-07, /* 0xBE927E4F, 0x809C52AD */
+ C5 = 2.08757232129817482790e-09, /* 0x3E21EE9E, 0xBDB4B1C4 */
+ C6 = -1.13596475577881948265e-11; /* 0xBDA8FAE9, 0xBE8838D4 */
double __cos(double x, double y)
{
diff --git a/lib/libm/__cosdf.c b/lib/libm/__cosdf.c
index d5469271..0b158223 100644
--- a/lib/libm/__cosdf.c
+++ b/lib/libm/__cosdf.c
@@ -20,9 +20,9 @@
/* |cos(x) - c(x)| < 2**-34.1 (~[-5.37e-11, 5.295e-11]). */
static const double C0 = -0x1ffffffd0c5e81.0p-54, /* -0.499999997251031003120 */
- C1 = 0x155553e1053a42.0p-57, /* 0.0416666233237390631894 */
- C2 = -0x16c087e80f1e27.0p-62, /* -0.00138867637746099294692 */
- C3 = 0x199342e0ee5069.0p-68; /* 0.0000243904487962774090654 */
+ C1 = 0x155553e1053a42.0p-57, /* 0.0416666233237390631894 */
+ C2 = -0x16c087e80f1e27.0p-62, /* -0.00138867637746099294692 */
+ C3 = 0x199342e0ee5069.0p-68; /* 0.0000243904487962774090654 */
float __cosdf(double x)
{
diff --git a/lib/libm/__cosl.c b/lib/libm/__cosl.c
index 18858e6b..89978d9a 100644
--- a/lib/libm/__cosl.c
+++ b/lib/libm/__cosl.c
@@ -44,21 +44,15 @@
* almost for free from the complications needed to search for the best
* higher coefficients.
*/
-static const long double C1 =
- 0.0416666666666666666136L; /* 0xaaaaaaaaaaaaaa9b.0p-68
- */
-static const double C2 = -0.0013888888888888874, /* -0x16c16c16c16c10.0p-62 */
- C3 = 0.000024801587301571716, /* 0x1a01a01a018e22.0p-68 */
- C4 = -0.00000027557319215507120, /* -0x127e4fb7602f22.0p-74 */
- C5 = 0.0000000020876754400407278, /* 0x11eed8caaeccf1.0p-81 */
- C6 = -1.1470297442401303e-11, /* -0x19393412bd1529.0p-89 */
- C7 = 4.7383039476436467e-14; /* 0x1aac9d9af5c43e.0p-97 */
-#define POLY(z) \
- ((z) * \
- (C1 + \
- (z) * (C2 + \
- (z) * (C3 + \
- (z) * (C4 + (z) * (C5 + (z) * (C6 + (z) * C7)))))))
+static const long double C1 = 0.0416666666666666666136L; /* 0xaaaaaaaaaaaaaa9b.0p-68
+ */
+static const double C2 = -0.0013888888888888874, /* -0x16c16c16c16c10.0p-62 */
+ C3 = 0.000024801587301571716, /* 0x1a01a01a018e22.0p-68 */
+ C4 = -0.00000027557319215507120, /* -0x127e4fb7602f22.0p-74 */
+ C5 = 0.0000000020876754400407278, /* 0x11eed8caaeccf1.0p-81 */
+ C6 = -1.1470297442401303e-11, /* -0x19393412bd1529.0p-89 */
+ C7 = 4.7383039476436467e-14; /* 0x1aac9d9af5c43e.0p-97 */
+#define POLY(z) ((z) * (C1 + (z) * (C2 + (z) * (C3 + (z) * (C4 + (z) * (C5 + (z) * (C6 + (z) * C7)))))))
#elif LDBL_MANT_DIG == 113
/*
* ld128 version of __cos.c. See __cos.c for most comments.
@@ -83,18 +77,10 @@ static const double C8 = -0.1561920696721507929516718307820958119868e-15,
C9 = 0.4110317413744594971475941557607804508039e-18,
C10 = -0.8896592467191938803288521958313920156409e-21,
C11 = 0.1601061435794535138244346256065192782581e-23;
-#define POLY(z) \
- (z * \
- (C1 + \
- z * (C2 + \
- z * (C3 + \
- z * (C4 + \
- z * (C5 + \
- z * (C6 + \
- z * (C7 + \
- z * (C8 + \
- z * (C9 + z * (C10 + \
- z * C11)))))))))))
+#define POLY(z) \
+ (z * (C1 + \
+ z * (C2 + \
+ z * (C3 + z * (C4 + z * (C5 + z * (C6 + z * (C7 + z * (C8 + z * (C9 + z * (C10 + z * C11)))))))))))
#endif
long double __cosl(long double x, long double y)
diff --git a/lib/libm/__invtrigl.c b/lib/libm/__invtrigl.c
index 8e8273ae..eed13971 100644
--- a/lib/libm/__invtrigl.c
+++ b/lib/libm/__invtrigl.c
@@ -3,18 +3,12 @@
#include <float.h> // for LDBL_MANT_DIG, LDBL_MAX_EXP
#if LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384
-static const long double pS0 = 1.66666666666666666631e-01L,
- pS1 = -4.16313987993683104320e-01L,
- pS2 = 3.69068046323246813704e-01L,
- pS3 = -1.36213932016738603108e-01L,
- pS4 = 1.78324189708471965733e-02L,
- pS5 = -2.19216428382605211588e-04L,
- pS6 = -7.10526623669075243183e-06L,
- qS1 = -2.94788392796209867269e+00L,
- qS2 = 3.27309890266528636716e+00L,
- qS3 = -1.68285799854822427013e+00L,
- qS4 = 3.90699412641738801874e-01L,
- qS5 = -3.14365703596053263322e-02L;
+static const long double pS0 = 1.66666666666666666631e-01L, pS1 = -4.16313987993683104320e-01L,
+ pS2 = 3.69068046323246813704e-01L, pS3 = -1.36213932016738603108e-01L,
+ pS4 = 1.78324189708471965733e-02L, pS5 = -2.19216428382605211588e-04L,
+ pS6 = -7.10526623669075243183e-06L, qS1 = -2.94788392796209867269e+00L,
+ qS2 = 3.27309890266528636716e+00L, qS3 = -1.68285799854822427013e+00L,
+ qS4 = 3.90699412641738801874e-01L, qS5 = -3.14365703596053263322e-02L;
const long double pio2_hi = 1.57079632679489661926L;
const long double pio2_lo = -2.50827880633416601173e-20L;
@@ -24,9 +18,7 @@ const long double pio2_lo = -2.50827880633416601173e-20L;
long double __invtrigl_R(long double z)
{
long double p, q;
- p = z * (pS0 +
- z * (pS1 +
- z * (pS2 + z * (pS3 + z * (pS4 + z * (pS5 + z * pS6))))));
+ p = z * (pS0 + z * (pS1 + z * (pS2 + z * (pS3 + z * (pS4 + z * (pS5 + z * pS6))))));
q = 1.0 + z * (qS1 + z * (qS2 + z * (qS3 + z * (qS4 + z * qS5))));
return p / q;
}
@@ -57,23 +49,11 @@ const long double pio2_lo = 4.33590506506189051239852201302167613e-35L;
long double __invtrigl_R(long double z)
{
long double p, q;
- p = z * (pS0 +
- z * (pS1 +
- z * (pS2 +
- z * (pS3 +
- z * (pS4 +
- z * (pS5 +
- z * (pS6 +
- z * (pS7 +
- z * (pS8 + z * pS9)))))))));
+ p = z *
+ (pS0 +
+ z * (pS1 + z * (pS2 + z * (pS3 + z * (pS4 + z * (pS5 + z * (pS6 + z * (pS7 + z * (pS8 + z * pS9)))))))));
q = 1.0 +
- z * (qS1 +
- z * (qS2 +
- z * (qS3 +
- z * (qS4 +
- z * (qS5 +
- z * (qS6 +
- z * (qS7 + z * (qS8 + z * qS9))))))));
+ z * (qS1 + z * (qS2 + z * (qS3 + z * (qS4 + z * (qS5 + z * (qS6 + z * (qS7 + z * (qS8 + z * qS9))))))));
return p / q;
}
#endif
diff --git a/lib/libm/__rem_pio2.c b/lib/libm/__rem_pio2.c
index 1d81061f..822b729f 100644
--- a/lib/libm/__rem_pio2.c
+++ b/lib/libm/__rem_pio2.c
@@ -38,9 +38,9 @@
* pio2_3: third 33 bit of pi/2
* pio2_3t: pi/2 - (pio2_1+pio2_2+pio2_3)
*/
-static const double toint = 1.5 / EPS, pio4 = 0x1.921fb54442d18p-1,
- invpio2 = 6.36619772367581382433e-01, /* 0x3FE45F30,
- 0x6DC9C883 */
+static const double toint = 1.5 / EPS, pio4 = 0x1.921fb54442d18p-1, invpio2 = 6.36619772367581382433e-01, /* 0x3FE45F30,
+ 0x6DC9C883
+ */
pio2_1 = 1.57079632673412561417e+00, /* 0x3FF921FB, 0x54400000 */
pio2_1t = 6.07710050650619224932e-11, /* 0x3DD0B461, 0x1A626331 */
pio2_2 = 6.07710050630396597660e-11, /* 0x3DD0B461, 0x1A600000 */
@@ -64,8 +64,8 @@ int __rem_pio2(double x, double *y)
ix = u.i >> 32 & 0x7fffffff;
if (ix <= 0x400f6a7a) { /* |x| ~<= 5pi/4 */
if ((ix & 0xfffff) == 0x921fb) /* |x| ~= pi/2 or 2pi/2 */
- goto medium; /* cancellation -- use medium case */
- if (ix <= 0x4002d97c) { /* |x| ~<= 3pi/4 */
+ goto medium; /* cancellation -- use medium case */
+ if (ix <= 0x4002d97c) { /* |x| ~<= 3pi/4 */
if (!sign) {
z = x - pio2_1; /* one round good to 85 bits */
y[0] = z - pio2_1t;
diff --git a/lib/libm/__rem_pio2_large.c b/lib/libm/__rem_pio2_large.c
index 8b97a6f6..f7df00d4 100644
--- a/lib/libm/__rem_pio2_large.c
+++ b/lib/libm/__rem_pio2_large.c
@@ -143,108 +143,71 @@ static const int init_jk[] = { 3, 4, 4, 6 }; /* initial value for jk */
* For quad precision (e0 <= 16360, jk = 6), this is 686.
*/
static const int32_t ipio2[] = {
- 0xA2F983, 0x6E4E44, 0x1529FC, 0x2757D1, 0xF534DD, 0xC0DB62, 0x95993C,
- 0x439041, 0xFE5163, 0xABDEBB, 0xC561B7, 0x246E3A, 0x424DD2, 0xE00649,
- 0x2EEA09, 0xD1921C, 0xFE1DEB, 0x1CB129, 0xA73EE8, 0x8235F5, 0x2EBB44,
- 0x84E99C, 0x7026B4, 0x5F7E41, 0x3991D6, 0x398353, 0x39F49C, 0x845F8B,
- 0xBDF928, 0x3B1FF8, 0x97FFDE, 0x05980F, 0xEF2F11, 0x8B5A0A, 0x6D1F6D,
- 0x367ECF, 0x27CB09, 0xB74F46, 0x3F669E, 0x5FEA2D, 0x7527BA, 0xC7EBE5,
- 0xF17B3D, 0x0739F7, 0x8A5292, 0xEA6BFB, 0x5FB11F, 0x8D5D08, 0x560330,
- 0x46FC7B, 0x6BABF0, 0xCFBC20, 0x9AF436, 0x1DA9E3, 0x91615E, 0xE61B08,
- 0x659985, 0x5F14A0, 0x68408D, 0xFFD880, 0x4D7327, 0x310606, 0x1556CA,
- 0x73A8C9, 0x60E27B, 0xC08C6B,
+ 0xA2F983, 0x6E4E44, 0x1529FC, 0x2757D1, 0xF534DD, 0xC0DB62, 0x95993C, 0x439041, 0xFE5163, 0xABDEBB, 0xC561B7,
+ 0x246E3A, 0x424DD2, 0xE00649, 0x2EEA09, 0xD1921C, 0xFE1DEB, 0x1CB129, 0xA73EE8, 0x8235F5, 0x2EBB44, 0x84E99C,
+ 0x7026B4, 0x5F7E41, 0x3991D6, 0x398353, 0x39F49C, 0x845F8B, 0xBDF928, 0x3B1FF8, 0x97FFDE, 0x05980F, 0xEF2F11,
+ 0x8B5A0A, 0x6D1F6D, 0x367ECF, 0x27CB09, 0xB74F46, 0x3F669E, 0x5FEA2D, 0x7527BA, 0xC7EBE5, 0xF17B3D, 0x0739F7,
+ 0x8A5292, 0xEA6BFB, 0x5FB11F, 0x8D5D08, 0x560330, 0x46FC7B, 0x6BABF0, 0xCFBC20, 0x9AF436, 0x1DA9E3, 0x91615E,
+ 0xE61B08, 0x659985, 0x5F14A0, 0x68408D, 0xFFD880, 0x4D7327, 0x310606, 0x1556CA, 0x73A8C9, 0x60E27B, 0xC08C6B,
#if LDBL_MAX_EXP > 1024
- 0x47C419, 0xC367CD, 0xDCE809, 0x2A8359, 0xC4768B, 0x961CA6, 0xDDAF44,
- 0xD15719, 0x053EA5, 0xFF0705, 0x3F7E33, 0xE832C2, 0xDE4F98, 0x327DBB,
- 0xC33D26, 0xEF6B1E, 0x5EF89F, 0x3A1F35, 0xCAF27F, 0x1D87F1, 0x21907C,
- 0x7C246A, 0xFA6ED5, 0x772D30, 0x433B15, 0xC614B5, 0x9D19C3, 0xC2C4AD,
- 0x414D2C, 0x5D000C, 0x467D86, 0x2D71E3, 0x9AC69B, 0x006233, 0x7CD2B4,
- 0x97A7B4, 0xD55537, 0xF63ED7, 0x1810A3, 0xFC764D, 0x2A9D64, 0xABD770,
- 0xF87C63, 0x57B07A, 0xE71517, 0x5649C0, 0xD9D63B, 0x3884A7, 0xCB2324,
- 0x778AD6, 0x23545A, 0xB91F00, 0x1B0AF1, 0xDFCE19, 0xFF319F, 0x6A1E66,
- 0x615799, 0x47FBAC, 0xD87F7E, 0xB76522, 0x89E832, 0x60BFE6, 0xCDC4EF,
- 0x09366C, 0xD43F5D, 0xD7DE16, 0xDE3B58, 0x929BDE, 0x2822D2, 0xE88628,
- 0x4D58E2, 0x32CAC6, 0x16E308, 0xCB7DE0, 0x50C017, 0xA71DF3, 0x5BE018,
- 0x34132E, 0x621283, 0x014883, 0x5B8EF5, 0x7FB0AD, 0xF2E91E, 0x434A48,
- 0xD36710, 0xD8DDAA, 0x425FAE, 0xCE616A, 0xA4280A, 0xB499D3, 0xF2A606,
- 0x7F775C, 0x83C2A3, 0x883C61, 0x78738A, 0x5A8CAF, 0xBDD76F, 0x63A62D,
- 0xCBBFF4, 0xEF818D, 0x67C126, 0x45CA55, 0x36D9CA, 0xD2A828, 0x8D61C2,
- 0x77C912, 0x142604, 0x9B4612, 0xC459C4, 0x44C5C8, 0x91B24D, 0xF31700,
- 0xAD43D4, 0xE54929, 0x10D5FD, 0xFCBE00, 0xCC941E, 0xEECE70, 0xF53E13,
- 0x80F1EC, 0xC3E7B3, 0x28F8C7, 0x940593, 0x3E71C1, 0xB3092E, 0xF3450B,
- 0x9C1288, 0x7B20AB, 0x9FB52E, 0xC29247, 0x2F327B, 0x6D550C, 0x90A772,
- 0x1FE76B, 0x96CB31, 0x4A1679, 0xE27941, 0x89DFF4, 0x9794E8, 0x84E6E2,
- 0x973199, 0x6BED88, 0x365F5F, 0x0EFDBB, 0xB49A48, 0x6CA467, 0x427271,
- 0x325D8D, 0xB8159F, 0x09E5BC, 0x25318D, 0x3974F7, 0x1C0530, 0x010C0D,
- 0x68084B, 0x58EE2C, 0x90AA47, 0x02E774, 0x24D6BD, 0xA67DF7, 0x72486E,
- 0xEF169F, 0xA6948E, 0xF691B4, 0x5153D1, 0xF20ACF, 0x339820, 0x7E4BF5,
- 0x6863B2, 0x5F3EDD, 0x035D40, 0x7F8985, 0x295255, 0xC06437, 0x10D86D,
- 0x324832, 0x754C5B, 0xD4714E, 0x6E5445, 0xC1090B, 0x69F52A, 0xD56614,
- 0x9D0727, 0x50045D, 0xDB3BB4, 0xC576EA, 0x17F987, 0x7D6B49, 0xBA271D,
- 0x296996, 0xACCCC6, 0x5414AD, 0x6AE290, 0x89D988, 0x50722C, 0xBEA404,
- 0x940777, 0x7030F3, 0x27FC00, 0xA871EA, 0x49C266, 0x3DE064, 0x83DD97,
- 0x973FA3, 0xFD9443, 0x8C860D, 0xDE4131, 0x9D3992, 0x8C70DD, 0xE7B717,
- 0x3BDF08, 0x2B3715, 0xA0805C, 0x93805A, 0x921110, 0xD8E80F, 0xAF806C,
- 0x4BFFDB, 0x0F9038, 0x761859, 0x15A562, 0xBBCB61, 0xB989C7, 0xBD4010,
- 0x04F2D2, 0x277549, 0xF6B6EB, 0xBB22DB, 0xAA140A, 0x2F2689, 0x768364,
- 0x333B09, 0x1A940E, 0xAA3A51, 0xC2A31D, 0xAEEDAF, 0x12265C, 0x4DC26D,
- 0x9C7A2D, 0x9756C0, 0x833F03, 0xF6F009, 0x8C402B, 0x99316D, 0x07B439,
- 0x15200C, 0x5BC3D8, 0xC492F5, 0x4BADC6, 0xA5CA4E, 0xCD37A7, 0x36A9E6,
- 0x9492AB, 0x6842DD, 0xDE6319, 0xEF8C76, 0x528B68, 0x37DBFC, 0xABA1AE,
- 0x3115DF, 0xA1AE00, 0xDAFB0C, 0x664D64, 0xB705ED, 0x306529, 0xBF5657,
- 0x3AFF47, 0xB9F96A, 0xF3BE75, 0xDF9328, 0x3080AB, 0xF68C66, 0x15CB04,
- 0x0622FA, 0x1DE4D9, 0xA4B33D, 0x8F1B57, 0x09CD36, 0xE9424E, 0xA4BE13,
- 0xB52333, 0x1AAAF0, 0xA8654F, 0xA5C1D2, 0x0F3F0B, 0xCD785B, 0x76F923,
- 0x048B7B, 0x721789, 0x53A6C6, 0xE26E6F, 0x00EBEF, 0x584A9B, 0xB7DAC4,
- 0xBA66AA, 0xCFCF76, 0x1D02D1, 0x2DF1B1, 0xC1998C, 0x77ADC3, 0xDA4886,
- 0xA05DF7, 0xF480C6, 0x2FF0AC, 0x9AECDD, 0xBC5C3F, 0x6DDED0, 0x1FC790,
- 0xB6DB2A, 0x3A25A3, 0x9AAF00, 0x9353AD, 0x0457B6, 0xB42D29, 0x7E804B,
- 0xA707DA, 0x0EAA76, 0xA1597B, 0x2A1216, 0x2DB7DC, 0xFDE5FA, 0xFEDB89,
- 0xFDBE89, 0x6C76E4, 0xFCA906, 0x70803E, 0x156E85, 0xFF87FD, 0x073E28,
- 0x336761, 0x86182A, 0xEABD4D, 0xAFE7B3, 0x6E6D8F, 0x396795, 0x5BBF31,
- 0x48D784, 0x16DF30, 0x432DC7, 0x356125, 0xCE70C9, 0xB8CB30, 0xFD6CBF,
- 0xA200A4, 0xE46C05, 0xA0DD5A, 0x476F21, 0xD21262, 0x845CB9, 0x496170,
- 0xE0566B, 0x015299, 0x375550, 0xB7D51E, 0xC4F133, 0x5F6E13, 0xE4305D,
- 0xA92E85, 0xC3B21D, 0x3632A1, 0xA4B708, 0xD4B1EA, 0x21F716, 0xE4698F,
- 0x77FF27, 0x80030C, 0x2D408D, 0xA0CD4F, 0x99A520, 0xD3A2B3, 0x0A5D2F,
- 0x42F9B4, 0xCBDA11, 0xD0BE7D, 0xC1DB9B, 0xBD17AB, 0x81A2CA, 0x5C6A08,
- 0x17552E, 0x550027, 0xF0147F, 0x8607E1, 0x640B14, 0x8D4196, 0xDEBE87,
- 0x2AFDDA, 0xB6256B, 0x34897B, 0xFEF305, 0x9EBFB9, 0x4F6A68, 0xA82A4A,
- 0x5AC44F, 0xBCF82D, 0x985AD7, 0x95C7F4, 0x8D4D0D, 0xA63A20, 0x5F57A4,
- 0xB13F14, 0x953880, 0x0120CC, 0x86DD71, 0xB6DEC9, 0xF560BF, 0x11654D,
- 0x6B0701, 0xACB08C, 0xD0C0B2, 0x485551, 0x0EFB1E, 0xC37295, 0x3B06A3,
- 0x3540C0, 0x7BDC06, 0xCC45E0, 0xFA294E, 0xC8CAD6, 0x41F3E8, 0xDE647C,
- 0xD8649B, 0x31BED9, 0xC397A4, 0xD45877, 0xC5E369, 0x13DAF0, 0x3C3ABA,
- 0x461846, 0x5F7555, 0xF5BDD2, 0xC6926E, 0x5D2EAC, 0xED440E, 0x423E1C,
- 0x87C461, 0xE9FD29, 0xF3D6E7, 0xCA7C22, 0x35916F, 0xC5E008, 0x8DD7FF,
- 0xE26A6E, 0xC6FDB0, 0xC10893, 0x745D7C, 0xB2AD6B, 0x9D6ECD, 0x7B723E,
- 0x6A11C6, 0xA9CFF7, 0xDF7329, 0xBAC9B5, 0x5100B7, 0x0DB2E2, 0x24BA74,
- 0x607DE5, 0x8AD874, 0x2C150D, 0x0C1881, 0x94667E, 0x162901, 0x767A9F,
- 0xBEFDFD, 0xEF4556, 0x367ED9, 0x13D9EC, 0xB9BA8B, 0xFC97C4, 0x27A831,
- 0xC36EF1, 0x36C594, 0x56A8D8, 0xB5A8B4, 0x0ECCCF, 0x2D8912, 0x34576F,
- 0x89562C, 0xE3CE99, 0xB920D6, 0xAA5E6B, 0x9C2A3E, 0xCC5F11, 0x4A0BFD,
- 0xFBF4E1, 0x6D3B8E, 0x2C86E2, 0x84D4E9, 0xA9B4FC, 0xD1EEEF, 0xC9352E,
- 0x61392F, 0x442138, 0xC8D91B, 0x0AFC81, 0x6A4AFB, 0xD81C2F, 0x84B453,
- 0x8C994E, 0xCC2254, 0xDC552A, 0xD6C6C0, 0x96190B, 0xB8701A, 0x649569,
- 0x605A26, 0xEE523F, 0x0F117F, 0x11B5F4, 0xF5CBFC, 0x2DBC34, 0xEEBC34,
- 0xCC5DE8, 0x605EDD, 0x9B8E67, 0xEF3392, 0xB817C9, 0x9B5861, 0xBC57E1,
- 0xC68351, 0x103ED8, 0x4871DD, 0xDD1C2D, 0xA118AF, 0x462C21, 0xD7F359,
- 0x987AD9, 0xC0549E, 0xFA864F, 0xFC0656, 0xAE79E5, 0x362289, 0x22AD38,
- 0xDC9367, 0xAAE855, 0x382682, 0x9BE7CA, 0xA40D51, 0xB13399, 0x0ED7A9,
- 0x480569, 0xF0B265, 0xA7887F, 0x974C88, 0x36D1F9, 0xB39221, 0x4A827B,
- 0x21CF98, 0xDC9F40, 0x5547DC, 0x3A74E1, 0x42EB67, 0xDF9DFE, 0x5FD45E,
- 0xA4677B, 0x7AACBA, 0xA2F655, 0x23882B, 0x55BA41, 0x086E59, 0x862A21,
- 0x834739, 0xE6E389, 0xD49EE5, 0x40FB49, 0xE956FF, 0xCA0F1C, 0x8A59C5,
- 0x2BFA94, 0xC5C1D3, 0xCFC50F, 0xAE5ADB, 0x86C547, 0x624385, 0x3B8621,
- 0x94792C, 0x876110, 0x7B4C2A, 0x1A2C80, 0x12BF43, 0x902688, 0x893C78,
- 0xE4C4A8, 0x7BDBE5, 0xC23AC4, 0xEAF426, 0x8A67F7, 0xBF920D, 0x2BA365,
- 0xB1933D, 0x0B7CBD, 0xDC51A4, 0x63DD27, 0xDDE169, 0x19949A, 0x9529A8,
- 0x28CE68, 0xB4ED09, 0x209F44, 0xCA984E, 0x638270, 0x237C7E, 0x32B90F,
- 0x8EF5A7, 0xE75614, 0x08F121, 0x2A9DB5, 0x4D7E6F, 0x5119A5, 0xABF9B5,
- 0xD6DF82, 0x61DD96, 0x023616, 0x9F3AC4, 0xA1A283, 0x6DED72, 0x7A8D39,
- 0xA9B882, 0x5C326B, 0x5B2746, 0xED3400, 0x7700D2, 0x55F4FC, 0x4D5901,
- 0x8071E0,
+ 0x47C419, 0xC367CD, 0xDCE809, 0x2A8359, 0xC4768B, 0x961CA6, 0xDDAF44, 0xD15719, 0x053EA5, 0xFF0705, 0x3F7E33,
+ 0xE832C2, 0xDE4F98, 0x327DBB, 0xC33D26, 0xEF6B1E, 0x5EF89F, 0x3A1F35, 0xCAF27F, 0x1D87F1, 0x21907C, 0x7C246A,
+ 0xFA6ED5, 0x772D30, 0x433B15, 0xC614B5, 0x9D19C3, 0xC2C4AD, 0x414D2C, 0x5D000C, 0x467D86, 0x2D71E3, 0x9AC69B,
+ 0x006233, 0x7CD2B4, 0x97A7B4, 0xD55537, 0xF63ED7, 0x1810A3, 0xFC764D, 0x2A9D64, 0xABD770, 0xF87C63, 0x57B07A,
+ 0xE71517, 0x5649C0, 0xD9D63B, 0x3884A7, 0xCB2324, 0x778AD6, 0x23545A, 0xB91F00, 0x1B0AF1, 0xDFCE19, 0xFF319F,
+ 0x6A1E66, 0x615799, 0x47FBAC, 0xD87F7E, 0xB76522, 0x89E832, 0x60BFE6, 0xCDC4EF, 0x09366C, 0xD43F5D, 0xD7DE16,
+ 0xDE3B58, 0x929BDE, 0x2822D2, 0xE88628, 0x4D58E2, 0x32CAC6, 0x16E308, 0xCB7DE0, 0x50C017, 0xA71DF3, 0x5BE018,
+ 0x34132E, 0x621283, 0x014883, 0x5B8EF5, 0x7FB0AD, 0xF2E91E, 0x434A48, 0xD36710, 0xD8DDAA, 0x425FAE, 0xCE616A,
+ 0xA4280A, 0xB499D3, 0xF2A606, 0x7F775C, 0x83C2A3, 0x883C61, 0x78738A, 0x5A8CAF, 0xBDD76F, 0x63A62D, 0xCBBFF4,
+ 0xEF818D, 0x67C126, 0x45CA55, 0x36D9CA, 0xD2A828, 0x8D61C2, 0x77C912, 0x142604, 0x9B4612, 0xC459C4, 0x44C5C8,
+ 0x91B24D, 0xF31700, 0xAD43D4, 0xE54929, 0x10D5FD, 0xFCBE00, 0xCC941E, 0xEECE70, 0xF53E13, 0x80F1EC, 0xC3E7B3,
+ 0x28F8C7, 0x940593, 0x3E71C1, 0xB3092E, 0xF3450B, 0x9C1288, 0x7B20AB, 0x9FB52E, 0xC29247, 0x2F327B, 0x6D550C,
+ 0x90A772, 0x1FE76B, 0x96CB31, 0x4A1679, 0xE27941, 0x89DFF4, 0x9794E8, 0x84E6E2, 0x973199, 0x6BED88, 0x365F5F,
+ 0x0EFDBB, 0xB49A48, 0x6CA467, 0x427271, 0x325D8D, 0xB8159F, 0x09E5BC, 0x25318D, 0x3974F7, 0x1C0530, 0x010C0D,
+ 0x68084B, 0x58EE2C, 0x90AA47, 0x02E774, 0x24D6BD, 0xA67DF7, 0x72486E, 0xEF169F, 0xA6948E, 0xF691B4, 0x5153D1,
+ 0xF20ACF, 0x339820, 0x7E4BF5, 0x6863B2, 0x5F3EDD, 0x035D40, 0x7F8985, 0x295255, 0xC06437, 0x10D86D, 0x324832,
+ 0x754C5B, 0xD4714E, 0x6E5445, 0xC1090B, 0x69F52A, 0xD56614, 0x9D0727, 0x50045D, 0xDB3BB4, 0xC576EA, 0x17F987,
+ 0x7D6B49, 0xBA271D, 0x296996, 0xACCCC6, 0x5414AD, 0x6AE290, 0x89D988, 0x50722C, 0xBEA404, 0x940777, 0x7030F3,
+ 0x27FC00, 0xA871EA, 0x49C266, 0x3DE064, 0x83DD97, 0x973FA3, 0xFD9443, 0x8C860D, 0xDE4131, 0x9D3992, 0x8C70DD,
+ 0xE7B717, 0x3BDF08, 0x2B3715, 0xA0805C, 0x93805A, 0x921110, 0xD8E80F, 0xAF806C, 0x4BFFDB, 0x0F9038, 0x761859,
+ 0x15A562, 0xBBCB61, 0xB989C7, 0xBD4010, 0x04F2D2, 0x277549, 0xF6B6EB, 0xBB22DB, 0xAA140A, 0x2F2689, 0x768364,
+ 0x333B09, 0x1A940E, 0xAA3A51, 0xC2A31D, 0xAEEDAF, 0x12265C, 0x4DC26D, 0x9C7A2D, 0x9756C0, 0x833F03, 0xF6F009,
+ 0x8C402B, 0x99316D, 0x07B439, 0x15200C, 0x5BC3D8, 0xC492F5, 0x4BADC6, 0xA5CA4E, 0xCD37A7, 0x36A9E6, 0x9492AB,
+ 0x6842DD, 0xDE6319, 0xEF8C76, 0x528B68, 0x37DBFC, 0xABA1AE, 0x3115DF, 0xA1AE00, 0xDAFB0C, 0x664D64, 0xB705ED,
+ 0x306529, 0xBF5657, 0x3AFF47, 0xB9F96A, 0xF3BE75, 0xDF9328, 0x3080AB, 0xF68C66, 0x15CB04, 0x0622FA, 0x1DE4D9,
+ 0xA4B33D, 0x8F1B57, 0x09CD36, 0xE9424E, 0xA4BE13, 0xB52333, 0x1AAAF0, 0xA8654F, 0xA5C1D2, 0x0F3F0B, 0xCD785B,
+ 0x76F923, 0x048B7B, 0x721789, 0x53A6C6, 0xE26E6F, 0x00EBEF, 0x584A9B, 0xB7DAC4, 0xBA66AA, 0xCFCF76, 0x1D02D1,
+ 0x2DF1B1, 0xC1998C, 0x77ADC3, 0xDA4886, 0xA05DF7, 0xF480C6, 0x2FF0AC, 0x9AECDD, 0xBC5C3F, 0x6DDED0, 0x1FC790,
+ 0xB6DB2A, 0x3A25A3, 0x9AAF00, 0x9353AD, 0x0457B6, 0xB42D29, 0x7E804B, 0xA707DA, 0x0EAA76, 0xA1597B, 0x2A1216,
+ 0x2DB7DC, 0xFDE5FA, 0xFEDB89, 0xFDBE89, 0x6C76E4, 0xFCA906, 0x70803E, 0x156E85, 0xFF87FD, 0x073E28, 0x336761,
+ 0x86182A, 0xEABD4D, 0xAFE7B3, 0x6E6D8F, 0x396795, 0x5BBF31, 0x48D784, 0x16DF30, 0x432DC7, 0x356125, 0xCE70C9,
+ 0xB8CB30, 0xFD6CBF, 0xA200A4, 0xE46C05, 0xA0DD5A, 0x476F21, 0xD21262, 0x845CB9, 0x496170, 0xE0566B, 0x015299,
+ 0x375550, 0xB7D51E, 0xC4F133, 0x5F6E13, 0xE4305D, 0xA92E85, 0xC3B21D, 0x3632A1, 0xA4B708, 0xD4B1EA, 0x21F716,
+ 0xE4698F, 0x77FF27, 0x80030C, 0x2D408D, 0xA0CD4F, 0x99A520, 0xD3A2B3, 0x0A5D2F, 0x42F9B4, 0xCBDA11, 0xD0BE7D,
+ 0xC1DB9B, 0xBD17AB, 0x81A2CA, 0x5C6A08, 0x17552E, 0x550027, 0xF0147F, 0x8607E1, 0x640B14, 0x8D4196, 0xDEBE87,
+ 0x2AFDDA, 0xB6256B, 0x34897B, 0xFEF305, 0x9EBFB9, 0x4F6A68, 0xA82A4A, 0x5AC44F, 0xBCF82D, 0x985AD7, 0x95C7F4,
+ 0x8D4D0D, 0xA63A20, 0x5F57A4, 0xB13F14, 0x953880, 0x0120CC, 0x86DD71, 0xB6DEC9, 0xF560BF, 0x11654D, 0x6B0701,
+ 0xACB08C, 0xD0C0B2, 0x485551, 0x0EFB1E, 0xC37295, 0x3B06A3, 0x3540C0, 0x7BDC06, 0xCC45E0, 0xFA294E, 0xC8CAD6,
+ 0x41F3E8, 0xDE647C, 0xD8649B, 0x31BED9, 0xC397A4, 0xD45877, 0xC5E369, 0x13DAF0, 0x3C3ABA, 0x461846, 0x5F7555,
+ 0xF5BDD2, 0xC6926E, 0x5D2EAC, 0xED440E, 0x423E1C, 0x87C461, 0xE9FD29, 0xF3D6E7, 0xCA7C22, 0x35916F, 0xC5E008,
+ 0x8DD7FF, 0xE26A6E, 0xC6FDB0, 0xC10893, 0x745D7C, 0xB2AD6B, 0x9D6ECD, 0x7B723E, 0x6A11C6, 0xA9CFF7, 0xDF7329,
+ 0xBAC9B5, 0x5100B7, 0x0DB2E2, 0x24BA74, 0x607DE5, 0x8AD874, 0x2C150D, 0x0C1881, 0x94667E, 0x162901, 0x767A9F,
+ 0xBEFDFD, 0xEF4556, 0x367ED9, 0x13D9EC, 0xB9BA8B, 0xFC97C4, 0x27A831, 0xC36EF1, 0x36C594, 0x56A8D8, 0xB5A8B4,
+ 0x0ECCCF, 0x2D8912, 0x34576F, 0x89562C, 0xE3CE99, 0xB920D6, 0xAA5E6B, 0x9C2A3E, 0xCC5F11, 0x4A0BFD, 0xFBF4E1,
+ 0x6D3B8E, 0x2C86E2, 0x84D4E9, 0xA9B4FC, 0xD1EEEF, 0xC9352E, 0x61392F, 0x442138, 0xC8D91B, 0x0AFC81, 0x6A4AFB,
+ 0xD81C2F, 0x84B453, 0x8C994E, 0xCC2254, 0xDC552A, 0xD6C6C0, 0x96190B, 0xB8701A, 0x649569, 0x605A26, 0xEE523F,
+ 0x0F117F, 0x11B5F4, 0xF5CBFC, 0x2DBC34, 0xEEBC34, 0xCC5DE8, 0x605EDD, 0x9B8E67, 0xEF3392, 0xB817C9, 0x9B5861,
+ 0xBC57E1, 0xC68351, 0x103ED8, 0x4871DD, 0xDD1C2D, 0xA118AF, 0x462C21, 0xD7F359, 0x987AD9, 0xC0549E, 0xFA864F,
+ 0xFC0656, 0xAE79E5, 0x362289, 0x22AD38, 0xDC9367, 0xAAE855, 0x382682, 0x9BE7CA, 0xA40D51, 0xB13399, 0x0ED7A9,
+ 0x480569, 0xF0B265, 0xA7887F, 0x974C88, 0x36D1F9, 0xB39221, 0x4A827B, 0x21CF98, 0xDC9F40, 0x5547DC, 0x3A74E1,
+ 0x42EB67, 0xDF9DFE, 0x5FD45E, 0xA4677B, 0x7AACBA, 0xA2F655, 0x23882B, 0x55BA41, 0x086E59, 0x862A21, 0x834739,
+ 0xE6E389, 0xD49EE5, 0x40FB49, 0xE956FF, 0xCA0F1C, 0x8A59C5, 0x2BFA94, 0xC5C1D3, 0xCFC50F, 0xAE5ADB, 0x86C547,
+ 0x624385, 0x3B8621, 0x94792C, 0x876110, 0x7B4C2A, 0x1A2C80, 0x12BF43, 0x902688, 0x893C78, 0xE4C4A8, 0x7BDBE5,
+ 0xC23AC4, 0xEAF426, 0x8A67F7, 0xBF920D, 0x2BA365, 0xB1933D, 0x0B7CBD, 0xDC51A4, 0x63DD27, 0xDDE169, 0x19949A,
+ 0x9529A8, 0x28CE68, 0xB4ED09, 0x209F44, 0xCA984E, 0x638270, 0x237C7E, 0x32B90F, 0x8EF5A7, 0xE75614, 0x08F121,
+ 0x2A9DB5, 0x4D7E6F, 0x5119A5, 0xABF9B5, 0xD6DF82, 0x61DD96, 0x023616, 0x9F3AC4, 0xA1A283, 0x6DED72, 0x7A8D39,
+ 0xA9B882, 0x5C326B, 0x5B2746, 0xED3400, 0x7700D2, 0x55F4FC, 0x4D5901, 0x8071E0,
#endif
};
diff --git a/lib/libm/__rem_pio2f.c b/lib/libm/__rem_pio2f.c
index 6316b60a..04326777 100644
--- a/lib/libm/__rem_pio2f.c
+++ b/lib/libm/__rem_pio2f.c
@@ -37,9 +37,8 @@
* pio2_1: first 25 bits of pi/2
* pio2_1t: pi/2 - pio2_1
*/
-static const double toint = 1.5 / EPS, pio4 = 0x1.921fb6p-1,
- invpio2 = 6.36619772367581382433e-01, /* 0x3FE45F30,
- 0x6DC9C883 */
+static const double toint = 1.5 / EPS, pio4 = 0x1.921fb6p-1, invpio2 = 6.36619772367581382433e-01, /* 0x3FE45F30,
+ 0x6DC9C883 */
pio2_1 = 1.57079631090164184570e+00, /* 0x3FF921FB, 0x50000000 */
pio2_1t = 1.58932547735281966916e-08; /* 0x3E5110b4, 0x611A6263 */
diff --git a/lib/libm/__rem_pio2l.c b/lib/libm/__rem_pio2l.c
index f5d28dde..7c980ba4 100644
--- a/lib/libm/__rem_pio2l.c
+++ b/lib/libm/__rem_pio2l.c
@@ -27,9 +27,7 @@ static const long double toint = 1.5 / LDBL_EPSILON;
#if LDBL_MANT_DIG == 64
/* u ~< 0x1p25*pi/2 */
-#define SMALL(u) \
- ((((u).i.se & 0x7fffU) << 16 | (u).i.m >> 48) < \
- ((0x3fff + 25) << 16 | 0x921f >> 1 | 0x8000))
+#define SMALL(u) ((((u).i.se & 0x7fffU) << 16 | (u).i.m >> 48) < ((0x3fff + 25) << 16 | 0x921f >> 1 | 0x8000))
#define QUOBITS(x) ((uint32_t)(int32_t)(x) & 0x7fffffff)
#define ROUND1 22
#define ROUND2 61
@@ -46,47 +44,37 @@ static const long double toint = 1.5 / LDBL_EPSILON;
*/
static const double pio2_1 = 1.57079632679597125389e+00, /* 0x3FF921FB,
0x54444000 */
- pio2_2 = -1.07463465549783099519e-12, /* -0x12e7b967674000.0p-92 */
- pio2_3 = 6.36831716351370313614e-25; /* 0x18a2e037074000.0p-133 */
-static const long double
- pio4 = 0x1.921fb54442d1846ap-1L,
- invpio2 = 6.36619772367581343076e-01L, /* 0xa2f9836e4e44152a.0p-64
- */
- pio2_1t = -1.07463465549719416346e-12L, /* -0x973dcb3b399d747f.0p-103 */
- pio2_2t = 6.36831716351095013979e-25L, /* 0xc51701b839a25205.0p-144 */
- pio2_3t = -2.75299651904407171810e-37L; /* -0xbb5bf6c7ddd660ce.0p-185 */
+ pio2_2 = -1.07463465549783099519e-12, /* -0x12e7b967674000.0p-92 */
+ pio2_3 = 6.36831716351370313614e-25; /* 0x18a2e037074000.0p-133 */
+static const long double pio4 = 0x1.921fb54442d1846ap-1L,
+ invpio2 = 6.36619772367581343076e-01L, /* 0xa2f9836e4e44152a.0p-64
+ */
+ pio2_1t = -1.07463465549719416346e-12L, /* -0x973dcb3b399d747f.0p-103 */
+ pio2_2t = 6.36831716351095013979e-25L, /* 0xc51701b839a25205.0p-144 */
+ pio2_3t = -2.75299651904407171810e-37L; /* -0xbb5bf6c7ddd660ce.0p-185 */
#elif LDBL_MANT_DIG == 113
/* u ~< 0x1p45*pi/2 */
-#define SMALL(u) \
- (((u.i.se & 0x7fffU) << 16 | u.i.top) < ((0x3fff + 45) << 16 | 0x921f))
+#define SMALL(u) (((u.i.se & 0x7fffU) << 16 | u.i.top) < ((0x3fff + 45) << 16 | 0x921f))
#define QUOBITS(x) ((uint32_t)(int64_t)x & 0x7fffffff)
#define ROUND1 51
#define ROUND2 119
#define NX 5
#define NY 3
-static const long double
- pio4 = 0x1.921fb54442d18469898cc51701b8p-1L,
- invpio2 =
- 6.3661977236758134307553505349005747e-01L, /* 0x145f306dc9c882a53f84eafa3ea6a.0p-113
- */
- pio2_1 =
- 1.5707963267948966192292994253909555e+00L, /* 0x1921fb54442d18469800000000000.0p-112
- */
- pio2_1t =
- 2.0222662487959507323996846200947577e-21L, /* 0x13198a2e03707344a4093822299f3.0p-181
- */
- pio2_2 =
- 2.0222662487959507323994779168837751e-21L, /* 0x13198a2e03707344a400000000000.0p-181
- */
- pio2_2t =
- 2.0670321098263988236496903051604844e-43L, /* 0x127044533e63a0105df531d89cd91.0p-254
- */
- pio2_3 =
- 2.0670321098263988236499468110329591e-43L, /* 0x127044533e63a0105e00000000000.0p-254
- */
- pio2_3t =
- -2.5650587247459238361625433492959285e-65L; /* -0x159c4ec64ddaeb5f78671cbfb2210.0p-327
- */
+static const long double pio4 = 0x1.921fb54442d18469898cc51701b8p-1L,
+ invpio2 = 6.3661977236758134307553505349005747e-01L, /* 0x145f306dc9c882a53f84eafa3ea6a.0p-113
+ */
+ pio2_1 = 1.5707963267948966192292994253909555e+00L, /* 0x1921fb54442d18469800000000000.0p-112
+ */
+ pio2_1t = 2.0222662487959507323996846200947577e-21L, /* 0x13198a2e03707344a4093822299f3.0p-181
+ */
+ pio2_2 = 2.0222662487959507323994779168837751e-21L, /* 0x13198a2e03707344a400000000000.0p-181
+ */
+ pio2_2t = 2.0670321098263988236496903051604844e-43L, /* 0x127044533e63a0105df531d89cd91.0p-254
+ */
+ pio2_3 = 2.0670321098263988236499468110329591e-43L, /* 0x127044533e63a0105e00000000000.0p-254
+ */
+ pio2_3t = -2.5650587247459238361625433492959285e-65L; /* -0x159c4ec64ddaeb5f78671cbfb2210.0p-327
+ */
#endif
int __rem_pio2l(long double x, long double *y)
@@ -131,8 +119,8 @@ int __rem_pio2l(long double x, long double *y)
ey = u.i.se & 0x7fff;
if (ex - ey > ROUND2) { /* 3rd iteration, good to
180/316 bits */
- t = r; /* will cover all possible cases (not
- verified for ld128) */
+ t = r; /* will cover all possible cases (not
+ verified for ld128) */
w = fn * pio2_3;
r = t - w;
w = fn * pio2_3t - ((t - r) - w);
diff --git a/lib/libm/__sin.c b/lib/libm/__sin.c
index e44c66e7..53b71c59 100644
--- a/lib/libm/__sin.c
+++ b/lib/libm/__sin.c
@@ -45,11 +45,11 @@
static const double S1 = -1.66666666666666324348e-01, /* 0xBFC55555, 0x55555549
*/
- S2 = 8.33333333332248946124e-03, /* 0x3F811111, 0x1110F8A6 */
- S3 = -1.98412698298579493134e-04, /* 0xBF2A01A0, 0x19C161D5 */
- S4 = 2.75573137070700676789e-06, /* 0x3EC71DE3, 0x57B1FE7D */
- S5 = -2.50507602534068634195e-08, /* 0xBE5AE5E6, 0x8A2B9CEB */
- S6 = 1.58969099521155010221e-10; /* 0x3DE5D93A, 0x5ACFD57C */
+ S2 = 8.33333333332248946124e-03, /* 0x3F811111, 0x1110F8A6 */
+ S3 = -1.98412698298579493134e-04, /* 0xBF2A01A0, 0x19C161D5 */
+ S4 = 2.75573137070700676789e-06, /* 0x3EC71DE3, 0x57B1FE7D */
+ S5 = -2.50507602534068634195e-08, /* 0xBE5AE5E6, 0x8A2B9CEB */
+ S6 = 1.58969099521155010221e-10; /* 0x3DE5D93A, 0x5ACFD57C */
double __sin(double x, double y, int iy)
{
diff --git a/lib/libm/__sindf.c b/lib/libm/__sindf.c
index b6b9cf42..ad67f804 100644
--- a/lib/libm/__sindf.c
+++ b/lib/libm/__sindf.c
@@ -20,9 +20,9 @@
/* |sin(x)/x - s(x)| < 2**-37.5 (~[-4.89e-12, 4.824e-12]). */
static const double S1 = -0x15555554cbac77.0p-55, /* -0.166666666416265235595 */
- S2 = 0x111110896efbb2.0p-59, /* 0.0083333293858894631756 */
- S3 = -0x1a00f9e2cae774.0p-65, /* -0.000198393348360966317347 */
- S4 = 0x16cd878c3b46a7.0p-71; /* 0.0000027183114939898219064 */
+ S2 = 0x111110896efbb2.0p-59, /* 0.0083333293858894631756 */
+ S3 = -0x1a00f9e2cae774.0p-65, /* -0.000198393348360966317347 */
+ S4 = 0x16cd878c3b46a7.0p-71; /* 0.0000027183114939898219064 */
float __sindf(double x)
{
diff --git a/lib/libm/__sinl.c b/lib/libm/__sinl.c
index ecc23a1a..465b7500 100644
--- a/lib/libm/__sinl.c
+++ b/lib/libm/__sinl.c
@@ -27,20 +27,16 @@
*
* See __cosl.c for more details about the polynomial.
*/
-static const long double S1 =
- -0.166666666666666666671L; /* -0xaaaaaaaaaaaaaaab.0p-66
- */
-static const double S2 = 0.0083333333333333332, /* 0x11111111111111.0p-59 */
- S3 = -0.00019841269841269427, /* -0x1a01a01a019f81.0p-65 */
- S4 = 0.0000027557319223597490, /* 0x171de3a55560f7.0p-71 */
- S5 = -0.000000025052108218074604, /* -0x1ae64564f16cad.0p-78 */
- S6 = 1.6059006598854211e-10, /* 0x161242b90243b5.0p-85 */
- S7 = -7.6429779983024564e-13, /* -0x1ae42ebd1b2e00.0p-93 */
- S8 = 2.6174587166648325e-15; /* 0x179372ea0b3f64.0p-101 */
-#define POLY(z) \
- (S2 + \
- (z) * (S3 + \
- (z) * (S4 + (z) * (S5 + (z) * (S6 + (z) * (S7 + (z) * S8))))))
+static const long double S1 = -0.166666666666666666671L; /* -0xaaaaaaaaaaaaaaab.0p-66
+ */
+static const double S2 = 0.0083333333333333332, /* 0x11111111111111.0p-59 */
+ S3 = -0.00019841269841269427, /* -0x1a01a01a019f81.0p-65 */
+ S4 = 0.0000027557319223597490, /* 0x171de3a55560f7.0p-71 */
+ S5 = -0.000000025052108218074604, /* -0x1ae64564f16cad.0p-78 */
+ S6 = 1.6059006598854211e-10, /* 0x161242b90243b5.0p-85 */
+ S7 = -7.6429779983024564e-13, /* -0x1ae42ebd1b2e00.0p-93 */
+ S8 = 2.6174587166648325e-15; /* 0x179372ea0b3f64.0p-101 */
+#define POLY(z) (S2 + (z) * (S3 + (z) * (S4 + (z) * (S5 + (z) * (S6 + (z) * (S7 + (z) * S8))))))
#elif LDBL_MANT_DIG == 113
/*
* ld128 version of __sin.c. See __sin.c for most comments.
@@ -51,31 +47,21 @@ static const double S2 = 0.0083333333333333332, /* 0x11111111111111.0p-59 */
*
* See __cosl.c for more details about the polynomial.
*/
-static const long double
- S1 = -0.16666666666666666666666666666666666606732416116558L,
- S2 = 0.0083333333333333333333333333333331135404851288270047L,
- S3 = -0.00019841269841269841269841269839935785325638310428717L,
- S4 = 0.27557319223985890652557316053039946268333231205686e-5L,
- S5 = -0.25052108385441718775048214826384312253862930064745e-7L,
- S6 = 0.16059043836821614596571832194524392581082444805729e-9L,
- S7 = -0.76471637318198151807063387954939213287488216303768e-12L,
- S8 = 0.28114572543451292625024967174638477283187397621303e-14L;
-static const double
- S9 = -0.82206352458348947812512122163446202498005154296863e-17,
- S10 = 0.19572940011906109418080609928334380560135358385256e-19,
- S11 = -0.38680813379701966970673724299207480965452616911420e-22,
- S12 = 0.64038150078671872796678569586315881020659912139412e-25;
-#define POLY(z) \
- (S2 + \
- z * (S3 + \
- z * (S4 + \
- z * (S5 + \
- z * (S6 + \
- z * (S7 + \
- z * (S8 + \
- z * (S9 + \
- z * (S10 + \
- z * (S11 + z * S12))))))))))
+static const long double S1 = -0.16666666666666666666666666666666666606732416116558L,
+ S2 = 0.0083333333333333333333333333333331135404851288270047L,
+ S3 = -0.00019841269841269841269841269839935785325638310428717L,
+ S4 = 0.27557319223985890652557316053039946268333231205686e-5L,
+ S5 = -0.25052108385441718775048214826384312253862930064745e-7L,
+ S6 = 0.16059043836821614596571832194524392581082444805729e-9L,
+ S7 = -0.76471637318198151807063387954939213287488216303768e-12L,
+ S8 = 0.28114572543451292625024967174638477283187397621303e-14L;
+static const double S9 = -0.82206352458348947812512122163446202498005154296863e-17,
+ S10 = 0.19572940011906109418080609928334380560135358385256e-19,
+ S11 = -0.38680813379701966970673724299207480965452616911420e-22,
+ S12 = 0.64038150078671872796678569586315881020659912139412e-25;
+#define POLY(z) \
+ (S2 + \
+ z * (S3 + z * (S4 + z * (S5 + z * (S6 + z * (S7 + z * (S8 + z * (S9 + z * (S10 + z * (S11 + z * S12))))))))))
#endif
long double __sinl(long double x, long double y, int iy)
diff --git a/lib/libm/__tan.c b/lib/libm/__tan.c
index 9abfff35..4f0e6279 100644
--- a/lib/libm/__tan.c
+++ b/lib/libm/__tan.c
@@ -92,11 +92,8 @@ double __tan(double x, double y, int odd)
* x^5(T[1]+x^4*T[3]+...+x^20*T[11]) +
* x^5(x^2*(T[2]+x^4*T[4]+...+x^22*[T12]))
*/
- r = T[1] +
- w * (T[3] + w * (T[5] + w * (T[7] + w * (T[9] + w * T[11]))));
- v = z *
- (T[2] +
- w * (T[4] + w * (T[6] + w * (T[8] + w * (T[10] + w * T[12])))));
+ r = T[1] + w * (T[3] + w * (T[5] + w * (T[7] + w * (T[9] + w * T[11]))));
+ v = z * (T[2] + w * (T[4] + w * (T[6] + w * (T[8] + w * (T[10] + w * T[12])))));
s = z * x;
r = y + z * (s * (r + v) + y) + s * T[0];
w = x + r;
diff --git a/lib/libm/__tanl.c b/lib/libm/__tanl.c
index 28167d02..a7d0dce0 100644
--- a/lib/libm/__tanl.c
+++ b/lib/libm/__tanl.c
@@ -27,38 +27,27 @@
*
* See __cosl.c for more details about the polynomial.
*/
-static const long double
- T3 = 0.333333333333333333180L, /* 0xaaaaaaaaaaaaaaa5.0p-65
- */
- T5 = 0.133333333333333372290L, /* 0x88888888888893c3.0p-66 */
- T7 = 0.0539682539682504975744L, /* 0xdd0dd0dd0dc13ba2.0p-68 */
- pio4 = 0.785398163397448309628L, /* 0xc90fdaa22168c235.0p-64 */
- pio4lo = -1.25413940316708300586e-20L; /* -0xece675d1fc8f8cbb.0p-130 */
-static const double T9 = 0.021869488536312216, /* 0x1664f4882cc1c2.0p-58 */
- T11 = 0.0088632355256619590, /* 0x1226e355c17612.0p-59 */
- T13 = 0.0035921281113786528, /* 0x1d6d3d185d7ff8.0p-61 */
- T15 = 0.0014558334756312418, /* 0x17da354aa3f96b.0p-62 */
- T17 = 0.00059003538700862256, /* 0x13559358685b83.0p-63 */
- T19 = 0.00023907843576635544, /* 0x1f56242026b5be.0p-65 */
- T21 = 0.000097154625656538905, /* 0x1977efc26806f4.0p-66 */
- T23 = 0.000038440165747303162, /* 0x14275a09b3ceac.0p-67 */
- T25 = 0.000018082171885432524, /* 0x12f5e563e5487e.0p-68 */
- T27 = 0.0000024196006108814377, /* 0x144c0d80cc6896.0p-71 */
- T29 = 0.0000078293456938132840, /* 0x106b59141a6cb3.0p-69 */
- T31 = -0.0000032609076735050182, /* -0x1b5abef3ba4b59.0p-71 */
- T33 = 0.0000023261313142559411; /* 0x13835436c0c87f.0p-71 */
-#define RPOLY(w) \
- (T5 + \
- (w) * (T9 + (w) * (T13 + \
- (w) * (T17 + \
- (w) * (T21 + \
- (w) * (T25 + \
- (w) * (T29 + (w) * T33)))))))
-#define VPOLY(w) \
- (T7 + \
- (w) * (T11 + \
- (w) * (T15 + \
- (w) * (T19 + (w) * (T23 + (w) * (T27 + (w) * T31))))))
+static const long double T3 = 0.333333333333333333180L, /* 0xaaaaaaaaaaaaaaa5.0p-65
+ */
+ T5 = 0.133333333333333372290L, /* 0x88888888888893c3.0p-66 */
+ T7 = 0.0539682539682504975744L, /* 0xdd0dd0dd0dc13ba2.0p-68 */
+ pio4 = 0.785398163397448309628L, /* 0xc90fdaa22168c235.0p-64 */
+ pio4lo = -1.25413940316708300586e-20L; /* -0xece675d1fc8f8cbb.0p-130 */
+static const double T9 = 0.021869488536312216, /* 0x1664f4882cc1c2.0p-58 */
+ T11 = 0.0088632355256619590, /* 0x1226e355c17612.0p-59 */
+ T13 = 0.0035921281113786528, /* 0x1d6d3d185d7ff8.0p-61 */
+ T15 = 0.0014558334756312418, /* 0x17da354aa3f96b.0p-62 */
+ T17 = 0.00059003538700862256, /* 0x13559358685b83.0p-63 */
+ T19 = 0.00023907843576635544, /* 0x1f56242026b5be.0p-65 */
+ T21 = 0.000097154625656538905, /* 0x1977efc26806f4.0p-66 */
+ T23 = 0.000038440165747303162, /* 0x14275a09b3ceac.0p-67 */
+ T25 = 0.000018082171885432524, /* 0x12f5e563e5487e.0p-68 */
+ T27 = 0.0000024196006108814377, /* 0x144c0d80cc6896.0p-71 */
+ T29 = 0.0000078293456938132840, /* 0x106b59141a6cb3.0p-69 */
+ T31 = -0.0000032609076735050182, /* -0x1b5abef3ba4b59.0p-71 */
+ T33 = 0.0000023261313142559411; /* 0x13835436c0c87f.0p-71 */
+#define RPOLY(w) (T5 + (w) * (T9 + (w) * (T13 + (w) * (T17 + (w) * (T21 + (w) * (T25 + (w) * (T29 + (w) * T33)))))))
+#define VPOLY(w) (T7 + (w) * (T11 + (w) * (T15 + (w) * (T19 + (w) * (T23 + (w) * (T27 + (w) * T31))))))
#elif LDBL_MANT_DIG == 113
/*
* ld128 version of __tan.c. See __tan.c for most comments.
@@ -69,66 +58,45 @@ static const double T9 = 0.021869488536312216, /* 0x1664f4882cc1c2.0p-58 */
*
* See __cosl.c for more details about the polynomial.
*/
-static const long double T3 = 0x1.5555555555555555555555555553p-2L,
- T5 = 0x1.1111111111111111111111111eb5p-3L,
- T7 = 0x1.ba1ba1ba1ba1ba1ba1ba1b694cd6p-5L,
- T9 = 0x1.664f4882c10f9f32d6bbe09d8bcdp-6L,
- T11 = 0x1.226e355e6c23c8f5b4f5762322eep-7L,
- T13 = 0x1.d6d3d0e157ddfb5fed8e84e27b37p-9L,
- T15 = 0x1.7da36452b75e2b5fce9ee7c2c92ep-10L,
- T17 = 0x1.355824803674477dfcf726649efep-11L,
- T19 = 0x1.f57d7734d1656e0aceb716f614c2p-13L,
- T21 = 0x1.967e18afcb180ed942dfdc518d6cp-14L,
- T23 = 0x1.497d8eea21e95bc7e2aa79b9f2cdp-15L,
- T25 = 0x1.0b132d39f055c81be49eff7afd50p-16L,
- T27 = 0x1.b0f72d33eff7bfa2fbc1059d90b6p-18L,
- T29 = 0x1.5ef2daf21d1113df38d0fbc00267p-19L,
- T31 = 0x1.1c77d6eac0234988cdaa04c96626p-20L,
- T33 = 0x1.cd2a5a292b180e0bdd701057dfe3p-22L,
- T35 = 0x1.75c7357d0298c01a31d0a6f7d518p-23L,
- T37 = 0x1.2f3190f4718a9a520f98f50081fcp-24L,
- pio4 = 0x1.921fb54442d18469898cc51701b8p-1L,
- pio4lo = 0x1.cd129024e088a67cc74020bbea60p-116L;
+static const long double T3 = 0x1.5555555555555555555555555553p-2L, T5 = 0x1.1111111111111111111111111eb5p-3L,
+ T7 = 0x1.ba1ba1ba1ba1ba1ba1ba1b694cd6p-5L, T9 = 0x1.664f4882c10f9f32d6bbe09d8bcdp-6L,
+ T11 = 0x1.226e355e6c23c8f5b4f5762322eep-7L, T13 = 0x1.d6d3d0e157ddfb5fed8e84e27b37p-9L,
+ T15 = 0x1.7da36452b75e2b5fce9ee7c2c92ep-10L, T17 = 0x1.355824803674477dfcf726649efep-11L,
+ T19 = 0x1.f57d7734d1656e0aceb716f614c2p-13L, T21 = 0x1.967e18afcb180ed942dfdc518d6cp-14L,
+ T23 = 0x1.497d8eea21e95bc7e2aa79b9f2cdp-15L, T25 = 0x1.0b132d39f055c81be49eff7afd50p-16L,
+ T27 = 0x1.b0f72d33eff7bfa2fbc1059d90b6p-18L, T29 = 0x1.5ef2daf21d1113df38d0fbc00267p-19L,
+ T31 = 0x1.1c77d6eac0234988cdaa04c96626p-20L, T33 = 0x1.cd2a5a292b180e0bdd701057dfe3p-22L,
+ T35 = 0x1.75c7357d0298c01a31d0a6f7d518p-23L, T37 = 0x1.2f3190f4718a9a520f98f50081fcp-24L,
+ pio4 = 0x1.921fb54442d18469898cc51701b8p-1L, pio4lo = 0x1.cd129024e088a67cc74020bbea60p-116L;
static const double T39 = 0.000000028443389121318352, /* 0x1e8a7592977938.0p-78
*/
- T41 = 0.000000011981013102001973, /* 0x19baa1b1223219.0p-79 */
- T43 = 0.0000000038303578044958070, /* 0x107385dfb24529.0p-80 */
- T45 = 0.0000000034664378216909893, /* 0x1dc6c702a05262.0p-81 */
- T47 = -0.0000000015090641701997785, /* -0x19ecef3569ebb6.0p-82 */
- T49 = 0.0000000029449552300483952, /* 0x194c0668da786a.0p-81 */
- T51 = -0.0000000022006995706097711, /* -0x12e763b8845268.0p-81 */
- T53 = 0.0000000015468200913196612, /* 0x1a92fc98c29554.0p-82 */
- T55 = -0.00000000061311613386849674, /* -0x151106cbc779a9.0p-83 */
- T57 = 1.4912469681508012e-10; /* 0x147edbdba6f43a.0p-85 */
-#define RPOLY(w) \
- (T5 + \
- w * (T9 + \
- w * (T13 + \
- w * (T17 + \
- w * (T21 + \
- w * (T25 + \
- w * (T29 + \
- w * (T33 + \
- w * (T37 + \
- w * (T41 + \
- w * (T45 + \
- w * (T49 + \
- w * (T53 + \
- w * T57)))))))))))))
-#define VPOLY(w) \
- (T7 + \
- w * (T11 + \
- w * (T15 + \
- w * (T19 + \
- w * (T23 + \
- w * (T27 + \
- w * (T31 + \
- w * (T35 + \
- w * (T39 + \
- w * (T43 + \
- w * (T47 + \
- w * (T51 + \
- w * T55))))))))))))
+ T41 = 0.000000011981013102001973, /* 0x19baa1b1223219.0p-79 */
+ T43 = 0.0000000038303578044958070, /* 0x107385dfb24529.0p-80 */
+ T45 = 0.0000000034664378216909893, /* 0x1dc6c702a05262.0p-81 */
+ T47 = -0.0000000015090641701997785, /* -0x19ecef3569ebb6.0p-82 */
+ T49 = 0.0000000029449552300483952, /* 0x194c0668da786a.0p-81 */
+ T51 = -0.0000000022006995706097711, /* -0x12e763b8845268.0p-81 */
+ T53 = 0.0000000015468200913196612, /* 0x1a92fc98c29554.0p-82 */
+ T55 = -0.00000000061311613386849674, /* -0x151106cbc779a9.0p-83 */
+ T57 = 1.4912469681508012e-10; /* 0x147edbdba6f43a.0p-85 */
+#define RPOLY(w) \
+ (T5 + \
+ w * (T9 + \
+ w * (T13 + \
+ w * (T17 + \
+ w * (T21 + \
+ w * (T25 + \
+ w * (T29 + \
+ w * (T33 + \
+ w * (T37 + w * (T41 + w * (T45 + w * (T49 + w * (T53 + w * T57)))))))))))))
+#define VPOLY(w) \
+ (T7 + \
+ w * (T11 + \
+ w * (T15 + \
+ w * (T19 + \
+ w * (T23 + \
+ w * (T27 + \
+ w * (T31 + w * (T35 + w * (T39 + w * (T43 + w * (T47 + w * (T51 + w * T55))))))))))))
#endif
long double __tanl(long double x, long double y, int odd)
diff --git a/lib/libm/acos.c b/lib/libm/acos.c
index 67c059af..ade05239 100644
--- a/lib/libm/acos.c
+++ b/lib/libm/acos.c
@@ -40,17 +40,17 @@
static const double pio2_hi = 1.57079632679489655800e+00, /* 0x3FF921FB,
0x54442D18 */
- pio2_lo = 6.12323399573676603587e-17, /* 0x3C91A626, 0x33145C07 */
- pS0 = 1.66666666666666657415e-01, /* 0x3FC55555, 0x55555555 */
- pS1 = -3.25565818622400915405e-01, /* 0xBFD4D612, 0x03EB6F7D */
- pS2 = 2.01212532134862925881e-01, /* 0x3FC9C155, 0x0E884455 */
- pS3 = -4.00555345006794114027e-02, /* 0xBFA48228, 0xB5688F3B */
- pS4 = 7.91534994289814532176e-04, /* 0x3F49EFE0, 0x7501B288 */
- pS5 = 3.47933107596021167570e-05, /* 0x3F023DE1, 0x0DFDF709 */
- qS1 = -2.40339491173441421878e+00, /* 0xC0033A27, 0x1C8A2D4B */
- qS2 = 2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */
- qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */
- qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
+ pio2_lo = 6.12323399573676603587e-17, /* 0x3C91A626, 0x33145C07 */
+ pS0 = 1.66666666666666657415e-01, /* 0x3FC55555, 0x55555555 */
+ pS1 = -3.25565818622400915405e-01, /* 0xBFD4D612, 0x03EB6F7D */
+ pS2 = 2.01212532134862925881e-01, /* 0x3FC9C155, 0x0E884455 */
+ pS3 = -4.00555345006794114027e-02, /* 0xBFA48228, 0xB5688F3B */
+ pS4 = 7.91534994289814532176e-04, /* 0x3F49EFE0, 0x7501B288 */
+ pS5 = 3.47933107596021167570e-05, /* 0x3F023DE1, 0x0DFDF709 */
+ qS1 = -2.40339491173441421878e+00, /* 0xC0033A27, 0x1C8A2D4B */
+ qS2 = 2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */
+ qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */
+ qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
static double R(double z)
{
diff --git a/lib/libm/acosf.c b/lib/libm/acosf.c
index 51e5c5ea..31b987e0 100644
--- a/lib/libm/acosf.c
+++ b/lib/libm/acosf.c
@@ -20,8 +20,7 @@
static const float pio2_hi = 1.5707962513e+00, /* 0x3fc90fda */
pio2_lo = 7.5497894159e-08, /* 0x33a22168 */
- pS0 = 1.6666586697e-01, pS1 = -4.2743422091e-02,
- pS2 = -8.6563630030e-03, qS1 = -7.0662963390e-01;
+ pS0 = 1.6666586697e-01, pS1 = -4.2743422091e-02, pS2 = -8.6563630030e-03, qS1 = -7.0662963390e-01;
static float R(float z)
{
diff --git a/lib/libm/asin.c b/lib/libm/asin.c
index eb669b87..8fdc1b19 100644
--- a/lib/libm/asin.c
+++ b/lib/libm/asin.c
@@ -46,7 +46,7 @@
static const double pio2_hi = 1.57079632679489655800e+00, /* 0x3FF921FB,
0x54442D18 */
- pio2_lo = 6.12323399573676603587e-17, /* 0x3C91A626, 0x33145C07 */
+ pio2_lo = 6.12323399573676603587e-17, /* 0x3C91A626, 0x33145C07 */
/* coefficients for R(x^2) */
pS0 = 1.66666666666666657415e-01, /* 0x3FC55555, 0x55555555 */
pS1 = -3.25565818622400915405e-01, /* 0xBFD4D612, 0x03EB6F7D */
@@ -102,8 +102,7 @@ double asin(double x)
f = s;
SET_LOW_WORD(f, 0);
c = (z - f * f) / (s + f);
- x = 0.5 * pio2_hi -
- (2 * s * r - (pio2_lo - 2 * c) - (0.5 * pio2_hi - 2 * f));
+ x = 0.5 * pio2_hi - (2 * s * r - (pio2_lo - 2 * c) - (0.5 * pio2_hi - 2 * f));
}
if (hx >> 31)
return -x;
diff --git a/lib/libm/asinf.c b/lib/libm/asinf.c
index 0175f4d5..6e26e646 100644
--- a/lib/libm/asinf.c
+++ b/lib/libm/asinf.c
@@ -22,8 +22,7 @@ static const double pio2 = 1.570796326794896558e+00;
static const float
/* coefficients for R(x^2) */
pS0 = 1.6666586697e-01,
- pS1 = -4.2743422091e-02, pS2 = -8.6563630030e-03,
- qS1 = -7.0662963390e-01;
+ pS1 = -4.2743422091e-02, pS2 = -8.6563630030e-03, qS1 = -7.0662963390e-01;
static float R(float z)
{
diff --git a/lib/libm/asinl.c b/lib/libm/asinl.c
index 7a5f6710..da0120b9 100644
--- a/lib/libm/asinl.c
+++ b/lib/libm/asinl.c
@@ -68,8 +68,7 @@ long double asinl(long double x)
CLEARBOTTOM(u);
f = u.f;
c = (z - f * f) / (s + f);
- x = 0.5 * pio2_hi -
- (2 * s * r - (pio2_lo - 2 * c) - (0.5 * pio2_hi - 2 * f));
+ x = 0.5 * pio2_hi - (2 * s * r - (pio2_lo - 2 * c) - (0.5 * pio2_hi - 2 * f));
}
return sign ? -x : x;
}
diff --git a/lib/libm/atan.c b/lib/libm/atan.c
index 36d10d73..2346d21c 100644
--- a/lib/libm/atan.c
+++ b/lib/libm/atan.c
@@ -109,9 +109,7 @@ double atan(double x)
z = x * x;
w = z * z;
/* break sum from i=0 to 10 aT[i]z**(i+1) into odd and even poly */
- s1 = z * (aT[0] +
- w * (aT[2] +
- w * (aT[4] + w * (aT[6] + w * (aT[8] + w * aT[10])))));
+ s1 = z * (aT[0] + w * (aT[2] + w * (aT[4] + w * (aT[6] + w * (aT[8] + w * aT[10])))));
s2 = w * (aT[1] + w * (aT[3] + w * (aT[5] + w * (aT[7] + w * aT[9]))));
if (id < 0)
return x - x * (s1 + s2);
diff --git a/lib/libm/atanf.c b/lib/libm/atanf.c
index 74881a92..c46b970f 100644
--- a/lib/libm/atanf.c
+++ b/lib/libm/atanf.c
@@ -33,8 +33,7 @@ static const float atanlo[] = {
};
static const float aT[] = {
- 3.3333328366e-01, -1.9999158382e-01, 1.4253635705e-01,
- -1.0648017377e-01, 6.1687607318e-02,
+ 3.3333328366e-01, -1.9999158382e-01, 1.4253635705e-01, -1.0648017377e-01, 6.1687607318e-02,
};
float atanf(float x)
diff --git a/lib/libm/atanl.c b/lib/libm/atanl.c
index 1f1bff44..4a59fb40 100644
--- a/lib/libm/atanl.c
+++ b/lib/libm/atanl.c
@@ -44,28 +44,21 @@ static const long double atanlo[] = {
};
static const long double aT[] = {
- 3.33333333333333333017e-01L, -1.99999999999999632011e-01L,
- 1.42857142857046531280e-01L, -1.11111111100562372733e-01L,
- 9.09090902935647302252e-02L, -7.69230552476207730353e-02L,
- 6.66661718042406260546e-02L, -5.88158892835030888692e-02L,
- 5.25499891539726639379e-02L, -4.70119845393155721494e-02L,
- 4.03539201366454414072e-02L, -2.91303858419364158725e-02L,
+ 3.33333333333333333017e-01L, -1.99999999999999632011e-01L, 1.42857142857046531280e-01L,
+ -1.11111111100562372733e-01L, 9.09090902935647302252e-02L, -7.69230552476207730353e-02L,
+ 6.66661718042406260546e-02L, -5.88158892835030888692e-02L, 5.25499891539726639379e-02L,
+ -4.70119845393155721494e-02L, 4.03539201366454414072e-02L, -2.91303858419364158725e-02L,
1.24822046299269234080e-02L,
};
static long double T_even(long double x)
{
- return aT[0] +
- x * (aT[2] +
- x * (aT[4] + x * (aT[6] + x * (aT[8] + x * (aT[10] +
- x * aT[12])))));
+ return aT[0] + x * (aT[2] + x * (aT[4] + x * (aT[6] + x * (aT[8] + x * (aT[10] + x * aT[12])))));
}
static long double T_odd(long double x)
{
- return aT[1] +
- x * (aT[3] +
- x * (aT[5] + x * (aT[7] + x * (aT[9] + x * aT[11]))));
+ return aT[1] + x * (aT[3] + x * (aT[5] + x * (aT[7] + x * (aT[9] + x * aT[11]))));
}
#elif LDBL_MANT_DIG == 113
#define EXPMAN(u) ((u.i.se & 0x7fff) << 8 | u.i.top >> 8)
@@ -85,30 +78,18 @@ static const long double atanlo[] = {
};
static const long double aT[] = {
- 3.33333333333333333333333333333333125e-01L,
- -1.99999999999999999999999999999180430e-01L,
- 1.42857142857142857142857142125269827e-01L,
- -1.11111111111111111111110834490810169e-01L,
- 9.09090909090909090908522355708623681e-02L,
- -7.69230769230769230696553844935357021e-02L,
- 6.66666666666666660390096773046256096e-02L,
- -5.88235294117646671706582985209643694e-02L,
- 5.26315789473666478515847092020327506e-02L,
- -4.76190476189855517021024424991436144e-02L,
- 4.34782608678695085948531993458097026e-02L,
- -3.99999999632663469330634215991142368e-02L,
- 3.70370363987423702891250829918659723e-02L,
- -3.44827496515048090726669907612335954e-02L,
- 3.22579620681420149871973710852268528e-02L,
- -3.03020767654269261041647570626778067e-02L,
- 2.85641979882534783223403715930946138e-02L,
- -2.69824879726738568189929461383741323e-02L,
- 2.54194698498808542954187110873675769e-02L,
- -2.35083879708189059926183138130183215e-02L,
- 2.04832358998165364349957325067131428e-02L,
- -1.54489555488544397858507248612362957e-02L,
- 8.64492360989278761493037861575248038e-03L,
- -2.58521121597609872727919154569765469e-03L,
+ 3.33333333333333333333333333333333125e-01L, -1.99999999999999999999999999999180430e-01L,
+ 1.42857142857142857142857142125269827e-01L, -1.11111111111111111111110834490810169e-01L,
+ 9.09090909090909090908522355708623681e-02L, -7.69230769230769230696553844935357021e-02L,
+ 6.66666666666666660390096773046256096e-02L, -5.88235294117646671706582985209643694e-02L,
+ 5.26315789473666478515847092020327506e-02L, -4.76190476189855517021024424991436144e-02L,
+ 4.34782608678695085948531993458097026e-02L, -3.99999999632663469330634215991142368e-02L,
+ 3.70370363987423702891250829918659723e-02L, -3.44827496515048090726669907612335954e-02L,
+ 3.22579620681420149871973710852268528e-02L, -3.03020767654269261041647570626778067e-02L,
+ 2.85641979882534783223403715930946138e-02L, -2.69824879726738568189929461383741323e-02L,
+ 2.54194698498808542954187110873675769e-02L, -2.35083879708189059926183138130183215e-02L,
+ 2.04832358998165364349957325067131428e-02L, -1.54489555488544397858507248612362957e-02L,
+ 8.64492360989278761493037861575248038e-03L, -2.58521121597609872727919154569765469e-03L,
};
static long double T_even(long double x)
@@ -121,10 +102,7 @@ static long double T_even(long double x)
x * (aT[10] +
x * (aT[12] +
x * (aT[14] +
- x * (aT[16] +
- x * (aT[18] +
- x * (aT[20] +
- x * aT[22])))))))))));
+ x * (aT[16] + x * (aT[18] + x * (aT[20] + x * aT[22])))))))))));
}
static long double T_odd(long double x)
@@ -137,10 +115,7 @@ static long double T_odd(long double x)
x * (aT[11] +
x * (aT[13] +
x * (aT[15] +
- x * (aT[17] +
- x * (aT[19] +
- x * (aT[21] +
- x * aT[23])))))))))));
+ x * (aT[17] + x * (aT[19] + x * (aT[21] + x * aT[23])))))))))));
}
#endif
@@ -172,7 +147,7 @@ long double atanl(long double x)
id = -1;
} else {
x = fabsl(x);
- if (expman < (0x3fff << 8) + 0x30) { /* |x| < 1.1875 */
+ if (expman < (0x3fff << 8) + 0x30) { /* |x| < 1.1875 */
if (expman < ((0x3fff - 1) << 8) + 0x60) { /* 7/16 <=
|x| <
11/16 */
diff --git a/lib/libm/atomic.h b/lib/libm/atomic.h
index 44d659b7..b0a406ea 100644
--- a/lib/libm/atomic.h
+++ b/lib/libm/atomic.h
@@ -246,8 +246,7 @@ static inline void a_or_64(volatile uint64_t *p, uint64_t v)
#endif
#ifndef a_cas_p
-typedef char a_cas_p_undefined_but_pointer_not_32bit
- [-sizeof(char) == 0xffffffff ? 1 : -1];
+typedef char a_cas_p_undefined_but_pointer_not_32bit[-sizeof(char) == 0xffffffff ? 1 : -1];
#define a_cas_p a_cas_p
static inline void *a_cas_p(volatile void *p, void *t, void *s)
{
@@ -281,10 +280,8 @@ static inline int a_ctz_32(uint32_t x)
#ifdef a_clz_32
return 31 - a_clz_32(x & -x);
#else
- static const char debruijn32[32] = { 0, 1, 23, 2, 29, 24, 19, 3,
- 30, 27, 25, 11, 20, 8, 4, 13,
- 31, 22, 28, 18, 26, 10, 7, 12,
- 21, 17, 9, 6, 16, 5, 15, 14 };
+ static const char debruijn32[32] = { 0, 1, 23, 2, 29, 24, 19, 3, 30, 27, 25, 11, 20, 8, 4, 13,
+ 31, 22, 28, 18, 26, 10, 7, 12, 21, 17, 9, 6, 16, 5, 15, 14 };
return debruijn32[(x & -x) * 0x076be629 >> 27];
#endif
}
@@ -294,12 +291,10 @@ static inline int a_ctz_32(uint32_t x)
#define a_ctz_64 a_ctz_64
static inline int a_ctz_64(uint64_t x)
{
- static const char debruijn64[64] = {
- 0, 1, 2, 53, 3, 7, 54, 27, 4, 38, 41, 8, 34, 55, 48, 28,
- 62, 5, 39, 46, 44, 42, 22, 9, 24, 35, 59, 56, 49, 18, 29, 11,
- 63, 52, 6, 26, 37, 40, 33, 47, 61, 45, 43, 21, 23, 58, 17, 10,
- 51, 25, 36, 32, 60, 20, 57, 16, 50, 31, 19, 15, 30, 14, 13, 12
- };
+ static const char debruijn64[64] = { 0, 1, 2, 53, 3, 7, 54, 27, 4, 38, 41, 8, 34, 55, 48, 28,
+ 62, 5, 39, 46, 44, 42, 22, 9, 24, 35, 59, 56, 49, 18, 29, 11,
+ 63, 52, 6, 26, 37, 40, 33, 47, 61, 45, 43, 21, 23, 58, 17, 10,
+ 51, 25, 36, 32, 60, 20, 57, 16, 50, 31, 19, 15, 30, 14, 13, 12 };
if (sizeof(long) < 8) {
uint32_t y = x;
if (!y) {
diff --git a/lib/libm/cbrt.c b/lib/libm/cbrt.c
index d583b062..2ef082fb 100644
--- a/lib/libm/cbrt.c
+++ b/lib/libm/cbrt.c
@@ -20,7 +20,7 @@
static const uint32_t B1 = 715094163, /* B1 = (1023-1023/3-0.03306235651)*2**20
*/
- B2 = 696219795; /* B2 = (1023-1023/3-54/3-0.03306235651)*2**20 */
+ B2 = 696219795; /* B2 = (1023-1023/3-54/3-0.03306235651)*2**20 */
/* |1/cbrt(x) - p(x)| < 2**-23.5 (~[-7.93e-8, 7.929e-8]). */
static const double P0 = 1.87595182427177009643, /* 0x3ffe03e6, 0x0f61e692 */
diff --git a/lib/libm/cbrtf.c b/lib/libm/cbrtf.c
index f35aae33..ec32a5b1 100644
--- a/lib/libm/cbrtf.c
+++ b/lib/libm/cbrtf.c
@@ -22,7 +22,7 @@
static const unsigned B1 = 709958130, /* B1 = (127-127.0/3-0.03306235651)*2**23
*/
- B2 = 642849266; /* B2 = (127-127.0/3-24/3-0.03306235651)*2**23 */
+ B2 = 642849266; /* B2 = (127-127.0/3-24/3-0.03306235651)*2**23 */
float cbrtf(float x)
{
diff --git a/lib/libm/csinhl.c b/lib/libm/csinhl.c
index a8a2e4f3..3bede995 100644
--- a/lib/libm/csinhl.c
+++ b/lib/libm/csinhl.c
@@ -8,6 +8,5 @@ long double complex csinhl(long double complex z)
x = creall(z);
y = cimagl(z);
- return sinhl(x) * cosl(y) +
- (coshl(x) * sinl(y)) * (long double complex)I;
+ return sinhl(x) * cosl(y) + (coshl(x) * sinl(y)) * (long double complex)I;
}
diff --git a/lib/libm/csinl.c b/lib/libm/csinl.c
index 9793d4ad..245d609f 100644
--- a/lib/libm/csinl.c
+++ b/lib/libm/csinl.c
@@ -7,6 +7,5 @@ long double complex csinl(long double complex z)
{
long double ch, sh;
cchshl(cimagl(z), &ch, &sh);
- return sinl(creall(z)) * ch +
- (cosl(creall(z)) * sh) * (long double complex)I;
+ return sinl(creall(z)) * ch + (cosl(creall(z)) * sh) * (long double complex)I;
}
diff --git a/lib/libm/ctan.c b/lib/libm/ctan.c
index b06e60a6..8be23bb7 100644
--- a/lib/libm/ctan.c
+++ b/lib/libm/ctan.c
@@ -51,6 +51,5 @@ double complex ctan(double complex z)
return HUGE_VAL + HUGE_VAL * (double complex)I;
}
- return sin(2.0 * creal(z)) / d +
- (sinh(2.0 * cimag(z)) / d) * (double complex)I;
+ return sin(2.0 * creal(z)) / d + (sinh(2.0 * cimag(z)) / d) * (double complex)I;
}
diff --git a/lib/libm/ctanhl.c b/lib/libm/ctanhl.c
index 1c9b9b81..2aa2323d 100644
--- a/lib/libm/ctanhl.c
+++ b/lib/libm/ctanhl.c
@@ -9,6 +9,5 @@ long double complex ctanhl(long double complex z)
y = cimagl(z);
d = coshl(2.0L * x) + cosl(2.0L * y);
- return sinhl(2.0L * x) / d +
- (sinl(2.0L * y) / d) * (long double complex)I;
+ return sinhl(2.0L * x) / d + (sinl(2.0L * y) / d) * (long double complex)I;
}
diff --git a/lib/libm/ctanl.c b/lib/libm/ctanl.c
index 65a9c2a5..1402d52e 100644
--- a/lib/libm/ctanl.c
+++ b/lib/libm/ctanl.c
@@ -15,6 +15,5 @@ long double complex ctanl(long double complex z)
return HUGE_VALL + HUGE_VALL * (long double complex)I;
}
- return sinl(2.0L * creall(z)) / d +
- (sinhl(2.0L * cimagl(z)) / d) * (long double complex)I;
+ return sinl(2.0L * creall(z)) / d + (sinhl(2.0L * cimagl(z)) / d) * (long double complex)I;
}
diff --git a/lib/libm/erf.c b/lib/libm/erf.c
index e95fb98c..25980189 100644
--- a/lib/libm/erf.c
+++ b/lib/libm/erf.c
@@ -182,10 +182,8 @@ static double erfc1(double x)
double_t s, P, Q;
s = fabs(x) - 1;
- P = pa0 +
- s * (pa1 + s * (pa2 + s * (pa3 + s * (pa4 + s * (pa5 + s * pa6)))));
- Q = 1 +
- s * (qa1 + s * (qa2 + s * (qa3 + s * (qa4 + s * (qa5 + s * qa6)))));
+ P = pa0 + s * (pa1 + s * (pa2 + s * (pa3 + s * (pa4 + s * (pa5 + s * pa6)))));
+ Q = 1 + s * (qa1 + s * (qa2 + s * (qa3 + s * (qa4 + s * (qa5 + s * qa6)))));
return 1 - erx - P / Q;
}
@@ -200,31 +198,11 @@ static double erfc2(uint32_t ix, double x)
x = fabs(x);
s = 1 / (x * x);
if (ix < 0x4006db6d) { /* |x| < 1/.35 ~ 2.85714 */
- R = ra0 +
- s * (ra1 +
- s * (ra2 +
- s * (ra3 +
- s * (ra4 +
- s * (ra5 + s * (ra6 + s * ra7))))));
- S = 1.0 +
- s * (sa1 +
- s * (sa2 +
- s * (sa3 +
- s * (sa4 +
- s * (sa5 +
- s * (sa6 +
- s * (sa7 + s * sa8)))))));
+ R = ra0 + s * (ra1 + s * (ra2 + s * (ra3 + s * (ra4 + s * (ra5 + s * (ra6 + s * ra7))))));
+ S = 1.0 + s * (sa1 + s * (sa2 + s * (sa3 + s * (sa4 + s * (sa5 + s * (sa6 + s * (sa7 + s * sa8)))))));
} else { /* |x| > 1/.35 */
- R = rb0 +
- s * (rb1 +
- s * (rb2 +
- s * (rb3 + s * (rb4 + s * (rb5 + s * rb6)))));
- S = 1.0 +
- s * (sb1 +
- s * (sb2 +
- s * (sb3 +
- s * (sb4 +
- s * (sb5 + s * (sb6 + s * sb7))))));
+ R = rb0 + s * (rb1 + s * (rb2 + s * (rb3 + s * (rb4 + s * (rb5 + s * rb6)))));
+ S = 1.0 + s * (sb1 + s * (sb2 + s * (sb3 + s * (sb4 + s * (sb5 + s * (sb6 + s * sb7))))));
}
z = x;
SET_LOW_WORD(z, 0);
@@ -251,8 +229,7 @@ double erf(double x)
}
z = x * x;
r = pp0 + z * (pp1 + z * (pp2 + z * (pp3 + z * pp4)));
- s = 1.0 +
- z * (qq1 + z * (qq2 + z * (qq3 + z * (qq4 + z * qq5))));
+ s = 1.0 + z * (qq1 + z * (qq2 + z * (qq3 + z * (qq4 + z * qq5))));
y = r / s;
return x + x * y;
}
@@ -281,8 +258,7 @@ double erfc(double x)
return 1.0 - x;
z = x * x;
r = pp0 + z * (pp1 + z * (pp2 + z * (pp3 + z * pp4)));
- s = 1.0 +
- z * (qq1 + z * (qq2 + z * (qq3 + z * (qq4 + z * qq5))));
+ s = 1.0 + z * (qq1 + z * (qq2 + z * (qq3 + z * (qq4 + z * qq5))));
y = r / s;
if (sign || ix < 0x3fd00000) { /* x < 1/4 */
return 1.0 - (x + x * y);
diff --git a/lib/libm/erff.c b/lib/libm/erff.c
index 2bf5d39e..dde5dc64 100644
--- a/lib/libm/erff.c
+++ b/lib/libm/erff.c
@@ -91,10 +91,8 @@ static float erfc1(float x)
float_t s, P, Q;
s = fabsf(x) - 1;
- P = pa0 +
- s * (pa1 + s * (pa2 + s * (pa3 + s * (pa4 + s * (pa5 + s * pa6)))));
- Q = 1 +
- s * (qa1 + s * (qa2 + s * (qa3 + s * (qa4 + s * (qa5 + s * qa6)))));
+ P = pa0 + s * (pa1 + s * (pa2 + s * (pa3 + s * (pa4 + s * (pa5 + s * pa6)))));
+ Q = 1 + s * (qa1 + s * (qa2 + s * (qa3 + s * (qa4 + s * (qa5 + s * qa6)))));
return 1 - erx - P / Q;
}
@@ -109,31 +107,11 @@ static float erfc2(uint32_t ix, float x)
x = fabsf(x);
s = 1 / (x * x);
if (ix < 0x4036db6d) { /* |x| < 1/0.35 */
- R = ra0 +
- s * (ra1 +
- s * (ra2 +
- s * (ra3 +
- s * (ra4 +
- s * (ra5 + s * (ra6 + s * ra7))))));
- S = 1.0f +
- s * (sa1 +
- s * (sa2 +
- s * (sa3 +
- s * (sa4 +
- s * (sa5 +
- s * (sa6 +
- s * (sa7 + s * sa8)))))));
+ R = ra0 + s * (ra1 + s * (ra2 + s * (ra3 + s * (ra4 + s * (ra5 + s * (ra6 + s * ra7))))));
+ S = 1.0f + s * (sa1 + s * (sa2 + s * (sa3 + s * (sa4 + s * (sa5 + s * (sa6 + s * (sa7 + s * sa8)))))));
} else { /* |x| >= 1/0.35 */
- R = rb0 +
- s * (rb1 +
- s * (rb2 +
- s * (rb3 + s * (rb4 + s * (rb5 + s * rb6)))));
- S = 1.0f +
- s * (sb1 +
- s * (sb2 +
- s * (sb3 +
- s * (sb4 +
- s * (sb5 + s * (sb6 + s * sb7))))));
+ R = rb0 + s * (rb1 + s * (rb2 + s * (rb3 + s * (rb4 + s * (rb5 + s * rb6)))));
+ S = 1.0f + s * (sb1 + s * (sb2 + s * (sb3 + s * (sb4 + s * (sb5 + s * (sb6 + s * sb7))))));
}
GET_FLOAT_WORD(ix, x);
SET_FLOAT_WORD(z, ix & 0xffffe000);
@@ -190,8 +168,7 @@ float erfcf(float x)
return 1.0f - x;
z = x * x;
r = pp0 + z * (pp1 + z * (pp2 + z * (pp3 + z * pp4)));
- s = 1.0f +
- z * (qq1 + z * (qq2 + z * (qq3 + z * (qq4 + z * qq5))));
+ s = 1.0f + z * (qq1 + z * (qq2 + z * (qq3 + z * (qq4 + z * qq5))));
y = r / s;
if (sign || ix < 0x3e800000) /* x < 1/4 */
return 1.0f - (x + x * y);
diff --git a/lib/libm/erfl.c b/lib/libm/erfl.c
index bb571734..143f6035 100644
--- a/lib/libm/erfl.c
+++ b/lib/libm/erfl.c
@@ -247,17 +247,8 @@ static long double erfc1(long double x)
long double s, P, Q;
s = fabsl(x) - 1;
- P = pa[0] +
- s * (pa[1] +
- s * (pa[2] +
- s * (pa[3] +
- s * (pa[4] +
- s * (pa[5] + s * (pa[6] + s * pa[7]))))));
- Q = qa[0] +
- s * (qa[1] +
- s * (qa[2] +
- s * (qa[3] +
- s * (qa[4] + s * (qa[5] + s * (qa[6] + s))))));
+ P = pa[0] + s * (pa[1] + s * (pa[2] + s * (pa[3] + s * (pa[4] + s * (pa[5] + s * (pa[6] + s * pa[7]))))));
+ Q = qa[0] + s * (qa[1] + s * (qa[2] + s * (qa[3] + s * (qa[4] + s * (qa[5] + s * (qa[6] + s))))));
return 1 - erx - P / Q;
}
@@ -274,41 +265,18 @@ static long double erfc2(uint32_t ix, long double x)
if (ix < 0x4000b6db) { /* 1.25 <= |x| < 2.857 ~ 1/.35 */
R = ra[0] +
s * (ra[1] +
- s * (ra[2] +
- s * (ra[3] +
- s * (ra[4] +
- s * (ra[5] +
- s * (ra[6] +
- s * (ra[7] + s * ra[8])))))));
+ s * (ra[2] + s * (ra[3] + s * (ra[4] + s * (ra[5] + s * (ra[6] + s * (ra[7] + s * ra[8])))))));
S = sa[0] +
s * (sa[1] +
s * (sa[2] +
- s * (sa[3] +
- s * (sa[4] +
- s * (sa[5] +
- s * (sa[6] +
- s * (sa[7] +
- s * (sa[8] + s))))))));
+ s * (sa[3] + s * (sa[4] + s * (sa[5] + s * (sa[6] + s * (sa[7] + s * (sa[8] + s))))))));
} else if (ix < 0x4001d555) { /* 2.857 <= |x| < 6.6666259765625 */
R = rb[0] +
- s * (rb[1] +
- s * (rb[2] +
- s * (rb[3] +
- s * (rb[4] +
- s * (rb[5] +
- s * (rb[6] + s * rb[7]))))));
- S = sb[0] +
- s * (sb[1] +
- s * (sb[2] +
- s * (sb[3] +
- s * (sb[4] +
- s * (sb[5] + s * (sb[6] + s))))));
+ s * (rb[1] + s * (rb[2] + s * (rb[3] + s * (rb[4] + s * (rb[5] + s * (rb[6] + s * rb[7]))))));
+ S = sb[0] + s * (sb[1] + s * (sb[2] + s * (sb[3] + s * (sb[4] + s * (sb[5] + s * (sb[6] + s))))));
} else { /* 6.666 <= |x| < 107 (erfc only) */
- R = rc[0] +
- s * (rc[1] +
- s * (rc[2] + s * (rc[3] + s * (rc[4] + s * rc[5]))));
- S = sc[0] +
- s * (sc[1] + s * (sc[2] + s * (sc[3] + s * (sc[4] + s))));
+ R = rc[0] + s * (rc[1] + s * (rc[2] + s * (rc[3] + s * (rc[4] + s * rc[5]))));
+ S = sc[0] + s * (sc[1] + s * (sc[2] + s * (sc[3] + s * (sc[4] + s))));
}
u.f = x;
u.i.m &= -1ULL << 40;
@@ -331,13 +299,8 @@ long double erfl(long double x)
return 0.125 * (8 * x + efx8 * x); /* avoid underflow */
}
z = x * x;
- r = pp[0] +
- z * (pp[1] +
- z * (pp[2] + z * (pp[3] + z * (pp[4] + z * pp[5]))));
- s = qq[0] +
- z * (qq[1] +
- z * (qq[2] +
- z * (qq[3] + z * (qq[4] + z * (qq[5] + z)))));
+ r = pp[0] + z * (pp[1] + z * (pp[2] + z * (pp[3] + z * (pp[4] + z * pp[5]))));
+ s = qq[0] + z * (qq[1] + z * (qq[2] + z * (qq[3] + z * (qq[4] + z * (qq[5] + z)))));
y = r / s;
return x + x * y;
}
@@ -362,13 +325,8 @@ long double erfcl(long double x)
if (ix < 0x3fbe0000) /* |x| < 2**-65 */
return 1.0 - x;
z = x * x;
- r = pp[0] +
- z * (pp[1] +
- z * (pp[2] + z * (pp[3] + z * (pp[4] + z * pp[5]))));
- s = qq[0] +
- z * (qq[1] +
- z * (qq[2] +
- z * (qq[3] + z * (qq[4] + z * (qq[5] + z)))));
+ r = pp[0] + z * (pp[1] + z * (pp[2] + z * (pp[3] + z * (pp[4] + z * pp[5]))));
+ s = qq[0] + z * (qq[1] + z * (qq[2] + z * (qq[3] + z * (qq[4] + z * (qq[5] + z)))));
y = r / s;
if (ix < 0x3ffd8000) /* x < 1/4 */
return 1.0 - (x + x * y);
diff --git a/lib/libm/exp.c b/lib/libm/exp.c
index 088a0cbb..21619f6d 100644
--- a/lib/libm/exp.c
+++ b/lib/libm/exp.c
@@ -79,8 +79,7 @@ double exp(double x)
double_t kd, z, r, r2, scale, tail, tmp;
abstop = top12(x) & 0x7ff;
- if (predict_false(abstop - top12(0x1p-54) >=
- top12(512.0) - top12(0x1p-54))) {
+ if (predict_false(abstop - top12(0x1p-54) >= top12(512.0) - top12(0x1p-54))) {
if (abstop - top12(0x1p-54) >= 0x80000000)
/* Avoid spurious underflow for tiny x. */
/* Note: 0 is common input. */
diff --git a/lib/libm/exp10.c b/lib/libm/exp10.c
index deed9dcb..06130c80 100644
--- a/lib/libm/exp10.c
+++ b/lib/libm/exp10.c
@@ -6,12 +6,9 @@
double exp10(double x)
{
- static const double p10[] = { 1e-15, 1e-14, 1e-13, 1e-12, 1e-11, 1e-10,
- 1e-9, 1e-8, 1e-7, 1e-6, 1e-5, 1e-4,
- 1e-3, 1e-2, 1e-1, 1, 1e1, 1e2,
- 1e3, 1e4, 1e5, 1e6, 1e7, 1e8,
- 1e9, 1e10, 1e11, 1e12, 1e13, 1e14,
- 1e15 };
+ static const double p10[] = { 1e-15, 1e-14, 1e-13, 1e-12, 1e-11, 1e-10, 1e-9, 1e-8, 1e-7, 1e-6, 1e-5,
+ 1e-4, 1e-3, 1e-2, 1e-1, 1, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6,
+ 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13, 1e14, 1e15 };
double n, y = modf(x, &n);
union {
double f;
diff --git a/lib/libm/exp10f.c b/lib/libm/exp10f.c
index a9cde41d..d4e322b4 100644
--- a/lib/libm/exp10f.c
+++ b/lib/libm/exp10f.c
@@ -6,9 +6,8 @@
float exp10f(float x)
{
- static const float p10[] = { 1e-7f, 1e-6f, 1e-5f, 1e-4f, 1e-3f,
- 1e-2f, 1e-1f, 1, 1e1, 1e2,
- 1e3, 1e4, 1e5, 1e6, 1e7 };
+ static const float p10[] = { 1e-7f, 1e-6f, 1e-5f, 1e-4f, 1e-3f, 1e-2f, 1e-1f, 1,
+ 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7 };
float n, y = modff(x, &n);
union {
float f;
diff --git a/lib/libm/exp10l.c b/lib/libm/exp10l.c
index f0bf23d9..ba522faf 100644
--- a/lib/libm/exp10l.c
+++ b/lib/libm/exp10l.c
@@ -12,12 +12,10 @@ long double exp10l(long double x)
#elif (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384
long double exp10l(long double x)
{
- static const long double p10[] = {
- 1e-15L, 1e-14L, 1e-13L, 1e-12L, 1e-11L, 1e-10L, 1e-9L, 1e-8L,
- 1e-7L, 1e-6L, 1e-5L, 1e-4L, 1e-3L, 1e-2L, 1e-1L, 1,
- 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8,
- 1e9, 1e10, 1e11, 1e12, 1e13, 1e14, 1e15
- };
+ static const long double p10[] = { 1e-15L, 1e-14L, 1e-13L, 1e-12L, 1e-11L, 1e-10L, 1e-9L, 1e-8L,
+ 1e-7L, 1e-6L, 1e-5L, 1e-4L, 1e-3L, 1e-2L, 1e-1L, 1,
+ 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8,
+ 1e9, 1e10, 1e11, 1e12, 1e13, 1e14, 1e15 };
long double n, y = modfl(x, &n);
union ldshape u = { n };
/* fabsl(n) < 16 without raising invalid on nan */
diff --git a/lib/libm/exp2.c b/lib/libm/exp2.c
index b94232fa..57acec22 100644
--- a/lib/libm/exp2.c
+++ b/lib/libm/exp2.c
@@ -76,8 +76,7 @@ double exp2(double x)
double_t kd, r, r2, scale, tail, tmp;
abstop = top12(x) & 0x7ff;
- if (predict_false(abstop - top12(0x1p-54) >=
- top12(512.0) - top12(0x1p-54))) {
+ if (predict_false(abstop - top12(0x1p-54) >= top12(512.0) - top12(0x1p-54))) {
if (abstop - top12(0x1p-54) >= 0x80000000)
/* Avoid spurious underflow for tiny x. */
/* Note: 0 is common input. */
diff --git a/lib/libm/exp2l.c b/lib/libm/exp2l.c
index d5899e2d..6c7fa21f 100644
--- a/lib/libm/exp2l.c
+++ b/lib/libm/exp2l.c
@@ -41,9 +41,8 @@ long double exp2l(long double x)
#define TBLBITS 7
#define TBLSIZE (1 << TBLBITS)
-static const double redux = 0x1.8p63 / TBLSIZE, P1 = 0x1.62e42fefa39efp-1,
- P2 = 0x1.ebfbdff82c58fp-3, P3 = 0x1.c6b08d7049fap-5,
- P4 = 0x1.3b2ab6fba4da5p-7, P5 = 0x1.5d8804780a736p-10,
+static const double redux = 0x1.8p63 / TBLSIZE, P1 = 0x1.62e42fefa39efp-1, P2 = 0x1.ebfbdff82c58fp-3,
+ P3 = 0x1.c6b08d7049fap-5, P4 = 0x1.3b2ab6fba4da5p-7, P5 = 0x1.5d8804780a736p-10,
P6 = 0x1.430918835e33dp-13;
static const double tbl[TBLSIZE * 2] = {
@@ -378,10 +377,7 @@ long double exp2l(long double x)
long double t_hi = tbl[2 * i0];
long double t_lo = tbl[2 * i0 + 1];
/* XXX This gives > 1 ulp errors outside of FE_TONEAREST mode */
- r = t_lo +
- (t_hi + t_lo) * z *
- (P1 + z * (P2 + z * (P3 + z * (P4 + z * (P5 + z * P6))))) +
- t_hi;
+ r = t_lo + (t_hi + t_lo) * z * (P1 + z * (P2 + z * (P3 + z * (P4 + z * (P5 + z * P6))))) + t_hi;
return scalbnl(r, k.i);
}
@@ -389,181 +385,100 @@ long double exp2l(long double x)
#define TBLBITS 7
#define TBLSIZE (1 << TBLBITS)
-static const long double P1 = 0x1.62e42fefa39ef35793c7673007e6p-1L,
- P2 = 0x1.ebfbdff82c58ea86f16b06ec9736p-3L,
- P3 = 0x1.c6b08d704a0bf8b33a762bad3459p-5L,
- P4 = 0x1.3b2ab6fba4e7729ccbbe0b4f3fc2p-7L,
- P5 = 0x1.5d87fe78a67311071dee13fd11d9p-10L,
- P6 = 0x1.430912f86c7876f4b663b23c5fe5p-13L;
+static const long double P1 = 0x1.62e42fefa39ef35793c7673007e6p-1L, P2 = 0x1.ebfbdff82c58ea86f16b06ec9736p-3L,
+ P3 = 0x1.c6b08d704a0bf8b33a762bad3459p-5L, P4 = 0x1.3b2ab6fba4e7729ccbbe0b4f3fc2p-7L,
+ P5 = 0x1.5d87fe78a67311071dee13fd11d9p-10L, P6 = 0x1.430912f86c7876f4b663b23c5fe5p-13L;
-static const double P7 = 0x1.ffcbfc588b041p-17, P8 = 0x1.62c0223a5c7c7p-20,
- P9 = 0x1.b52541ff59713p-24, P10 = 0x1.e4cf56a391e22p-28,
- redux = 0x1.8p112 / TBLSIZE;
+static const double P7 = 0x1.ffcbfc588b041p-17, P8 = 0x1.62c0223a5c7c7p-20, P9 = 0x1.b52541ff59713p-24,
+ P10 = 0x1.e4cf56a391e22p-28, redux = 0x1.8p112 / TBLSIZE;
static const long double tbl[TBLSIZE] = {
- 0x1.6a09e667f3bcc908b2fb1366dfeap-1L,
- 0x1.6c012750bdabeed76a99800f4edep-1L,
- 0x1.6dfb23c651a2ef220e2cbe1bc0d4p-1L,
- 0x1.6ff7df9519483cf87e1b4f3e1e98p-1L,
- 0x1.71f75e8ec5f73dd2370f2ef0b148p-1L,
- 0x1.73f9a48a58173bd5c9a4e68ab074p-1L,
- 0x1.75feb564267c8bf6e9aa33a489a8p-1L,
- 0x1.780694fde5d3f619ae02808592a4p-1L,
- 0x1.7a11473eb0186d7d51023f6ccb1ap-1L,
- 0x1.7c1ed0130c1327c49334459378dep-1L,
- 0x1.7e2f336cf4e62105d02ba1579756p-1L,
- 0x1.80427543e1a11b60de67649a3842p-1L,
- 0x1.82589994cce128acf88afab34928p-1L,
- 0x1.8471a4623c7acce52f6b97c6444cp-1L,
- 0x1.868d99b4492ec80e41d90ac2556ap-1L,
- 0x1.88ac7d98a669966530bcdf2d4cc0p-1L,
- 0x1.8ace5422aa0db5ba7c55a192c648p-1L,
- 0x1.8cf3216b5448bef2aa1cd161c57ap-1L,
- 0x1.8f1ae991577362b982745c72eddap-1L,
- 0x1.9145b0b91ffc588a61b469f6b6a0p-1L,
- 0x1.93737b0cdc5e4f4501c3f2540ae8p-1L,
- 0x1.95a44cbc8520ee9b483695a0e7fep-1L,
- 0x1.97d829fde4e4f8b9e920f91e8eb6p-1L,
- 0x1.9a0f170ca07b9ba3109b8c467844p-1L,
- 0x1.9c49182a3f0901c7c46b071f28dep-1L,
- 0x1.9e86319e323231824ca78e64c462p-1L,
- 0x1.a0c667b5de564b29ada8b8cabbacp-1L,
- 0x1.a309bec4a2d3358c171f770db1f4p-1L,
- 0x1.a5503b23e255c8b424491caf88ccp-1L,
- 0x1.a799e1330b3586f2dfb2b158f31ep-1L,
- 0x1.a9e6b5579fdbf43eb243bdff53a2p-1L,
- 0x1.ac36bbfd3f379c0db966a3126988p-1L,
- 0x1.ae89f995ad3ad5e8734d17731c80p-1L,
- 0x1.b0e07298db66590842acdfc6fb4ep-1L,
- 0x1.b33a2b84f15faf6bfd0e7bd941b0p-1L,
- 0x1.b59728de559398e3881111648738p-1L,
- 0x1.b7f76f2fb5e46eaa7b081ab53ff6p-1L,
- 0x1.ba5b030a10649840cb3c6af5b74cp-1L,
- 0x1.bcc1e904bc1d2247ba0f45b3d06cp-1L,
- 0x1.bf2c25bd71e088408d7025190cd0p-1L,
- 0x1.c199bdd85529c2220cb12a0916bap-1L,
- 0x1.c40ab5fffd07a6d14df820f17deap-1L,
- 0x1.c67f12e57d14b4a2137fd20f2a26p-1L,
- 0x1.c8f6d9406e7b511acbc48805c3f6p-1L,
- 0x1.cb720dcef90691503cbd1e949d0ap-1L,
- 0x1.cdf0b555dc3f9c44f8958fac4f12p-1L,
- 0x1.d072d4a07897b8d0f22f21a13792p-1L,
- 0x1.d2f87080d89f18ade123989ea50ep-1L,
- 0x1.d5818dcfba48725da05aeb66dff8p-1L,
- 0x1.d80e316c98397bb84f9d048807a0p-1L,
- 0x1.da9e603db3285708c01a5b6d480cp-1L,
- 0x1.dd321f301b4604b695de3c0630c0p-1L,
- 0x1.dfc97337b9b5eb968cac39ed284cp-1L,
- 0x1.e264614f5a128a12761fa17adc74p-1L,
- 0x1.e502ee78b3ff6273d130153992d0p-1L,
- 0x1.e7a51fbc74c834b548b2832378a4p-1L,
- 0x1.ea4afa2a490d9858f73a18f5dab4p-1L,
- 0x1.ecf482d8e67f08db0312fb949d50p-1L,
- 0x1.efa1bee615a27771fd21a92dabb6p-1L,
- 0x1.f252b376bba974e8696fc3638f24p-1L,
- 0x1.f50765b6e4540674f84b762861a6p-1L,
- 0x1.f7bfdad9cbe138913b4bfe72bd78p-1L,
- 0x1.fa7c1819e90d82e90a7e74b26360p-1L,
- 0x1.fd3c22b8f71f10975ba4b32bd006p-1L,
- 0x1.0000000000000000000000000000p+0L,
- 0x1.0163da9fb33356d84a66ae336e98p+0L,
- 0x1.02c9a3e778060ee6f7caca4f7a18p+0L,
- 0x1.04315e86e7f84bd738f9a20da442p+0L,
- 0x1.059b0d31585743ae7c548eb68c6ap+0L,
- 0x1.0706b29ddf6ddc6dc403a9d87b1ep+0L,
- 0x1.0874518759bc808c35f25d942856p+0L,
- 0x1.09e3ecac6f3834521e060c584d5cp+0L,
- 0x1.0b5586cf9890f6298b92b7184200p+0L,
- 0x1.0cc922b7247f7407b705b893dbdep+0L,
- 0x1.0e3ec32d3d1a2020742e4f8af794p+0L,
- 0x1.0fb66affed31af232091dd8a169ep+0L,
- 0x1.11301d0125b50a4ebbf1aed9321cp+0L,
- 0x1.12abdc06c31cbfb92bad324d6f84p+0L,
- 0x1.1429aaea92ddfb34101943b2588ep+0L,
- 0x1.15a98c8a58e512480d573dd562aep+0L,
- 0x1.172b83c7d517adcdf7c8c50eb162p+0L,
- 0x1.18af9388c8de9bbbf70b9a3c269cp+0L,
- 0x1.1a35beb6fcb753cb698f692d2038p+0L,
- 0x1.1bbe084045cd39ab1e72b442810ep+0L,
- 0x1.1d4873168b9aa7805b8028990be8p+0L,
- 0x1.1ed5022fcd91cb8819ff61121fbep+0L,
- 0x1.2063b88628cd63b8eeb0295093f6p+0L,
- 0x1.21f49917ddc962552fd29294bc20p+0L,
- 0x1.2387a6e75623866c1fadb1c159c0p+0L,
- 0x1.251ce4fb2a63f3582ab7de9e9562p+0L,
- 0x1.26b4565e27cdd257a673281d3068p+0L,
- 0x1.284dfe1f5638096cf15cf03c9fa0p+0L,
- 0x1.29e9df51fdee12c25d15f5a25022p+0L,
- 0x1.2b87fd0dad98ffddea46538fca24p+0L,
- 0x1.2d285a6e4030b40091d536d0733ep+0L,
- 0x1.2ecafa93e2f5611ca0f45d5239a4p+0L,
- 0x1.306fe0a31b7152de8d5a463063bep+0L,
- 0x1.32170fc4cd8313539cf1c3009330p+0L,
- 0x1.33c08b26416ff4c9c8610d96680ep+0L,
- 0x1.356c55f929ff0c94623476373be4p+0L,
- 0x1.371a7373aa9caa7145502f45452ap+0L,
- 0x1.38cae6d05d86585a9cb0d9bed530p+0L,
- 0x1.3a7db34e59ff6ea1bc9299e0a1fep+0L,
- 0x1.3c32dc313a8e484001f228b58cf0p+0L,
- 0x1.3dea64c12342235b41223e13d7eep+0L,
- 0x1.3fa4504ac801ba0bf701aa417b9cp+0L,
- 0x1.4160a21f72e29f84325b8f3dbacap+0L,
- 0x1.431f5d950a896dc704439410b628p+0L,
- 0x1.44e086061892d03136f409df0724p+0L,
- 0x1.46a41ed1d005772512f459229f0ap+0L,
- 0x1.486a2b5c13cd013c1a3b69062f26p+0L,
- 0x1.4a32af0d7d3de672d8bcf46f99b4p+0L,
- 0x1.4bfdad5362a271d4397afec42e36p+0L,
- 0x1.4dcb299fddd0d63b36ef1a9e19dep+0L,
- 0x1.4f9b2769d2ca6ad33d8b69aa0b8cp+0L,
- 0x1.516daa2cf6641c112f52c84d6066p+0L,
- 0x1.5342b569d4f81df0a83c49d86bf4p+0L,
- 0x1.551a4ca5d920ec52ec620243540cp+0L,
- 0x1.56f4736b527da66ecb004764e61ep+0L,
- 0x1.58d12d497c7fd252bc2b7343d554p+0L,
- 0x1.5ab07dd48542958c93015191e9a8p+0L,
- 0x1.5c9268a5946b701c4b1b81697ed4p+0L,
- 0x1.5e76f15ad21486e9be4c20399d12p+0L,
- 0x1.605e1b976dc08b076f592a487066p+0L,
- 0x1.6247eb03a5584b1f0fa06fd2d9eap+0L,
- 0x1.6434634ccc31fc76f8714c4ee122p+0L,
- 0x1.66238825522249127d9e29b92ea2p+0L,
- 0x1.68155d44ca973081c57227b9f69ep+0L,
+ 0x1.6a09e667f3bcc908b2fb1366dfeap-1L, 0x1.6c012750bdabeed76a99800f4edep-1L,
+ 0x1.6dfb23c651a2ef220e2cbe1bc0d4p-1L, 0x1.6ff7df9519483cf87e1b4f3e1e98p-1L,
+ 0x1.71f75e8ec5f73dd2370f2ef0b148p-1L, 0x1.73f9a48a58173bd5c9a4e68ab074p-1L,
+ 0x1.75feb564267c8bf6e9aa33a489a8p-1L, 0x1.780694fde5d3f619ae02808592a4p-1L,
+ 0x1.7a11473eb0186d7d51023f6ccb1ap-1L, 0x1.7c1ed0130c1327c49334459378dep-1L,
+ 0x1.7e2f336cf4e62105d02ba1579756p-1L, 0x1.80427543e1a11b60de67649a3842p-1L,
+ 0x1.82589994cce128acf88afab34928p-1L, 0x1.8471a4623c7acce52f6b97c6444cp-1L,
+ 0x1.868d99b4492ec80e41d90ac2556ap-1L, 0x1.88ac7d98a669966530bcdf2d4cc0p-1L,
+ 0x1.8ace5422aa0db5ba7c55a192c648p-1L, 0x1.8cf3216b5448bef2aa1cd161c57ap-1L,
+ 0x1.8f1ae991577362b982745c72eddap-1L, 0x1.9145b0b91ffc588a61b469f6b6a0p-1L,
+ 0x1.93737b0cdc5e4f4501c3f2540ae8p-1L, 0x1.95a44cbc8520ee9b483695a0e7fep-1L,
+ 0x1.97d829fde4e4f8b9e920f91e8eb6p-1L, 0x1.9a0f170ca07b9ba3109b8c467844p-1L,
+ 0x1.9c49182a3f0901c7c46b071f28dep-1L, 0x1.9e86319e323231824ca78e64c462p-1L,
+ 0x1.a0c667b5de564b29ada8b8cabbacp-1L, 0x1.a309bec4a2d3358c171f770db1f4p-1L,
+ 0x1.a5503b23e255c8b424491caf88ccp-1L, 0x1.a799e1330b3586f2dfb2b158f31ep-1L,
+ 0x1.a9e6b5579fdbf43eb243bdff53a2p-1L, 0x1.ac36bbfd3f379c0db966a3126988p-1L,
+ 0x1.ae89f995ad3ad5e8734d17731c80p-1L, 0x1.b0e07298db66590842acdfc6fb4ep-1L,
+ 0x1.b33a2b84f15faf6bfd0e7bd941b0p-1L, 0x1.b59728de559398e3881111648738p-1L,
+ 0x1.b7f76f2fb5e46eaa7b081ab53ff6p-1L, 0x1.ba5b030a10649840cb3c6af5b74cp-1L,
+ 0x1.bcc1e904bc1d2247ba0f45b3d06cp-1L, 0x1.bf2c25bd71e088408d7025190cd0p-1L,
+ 0x1.c199bdd85529c2220cb12a0916bap-1L, 0x1.c40ab5fffd07a6d14df820f17deap-1L,
+ 0x1.c67f12e57d14b4a2137fd20f2a26p-1L, 0x1.c8f6d9406e7b511acbc48805c3f6p-1L,
+ 0x1.cb720dcef90691503cbd1e949d0ap-1L, 0x1.cdf0b555dc3f9c44f8958fac4f12p-1L,
+ 0x1.d072d4a07897b8d0f22f21a13792p-1L, 0x1.d2f87080d89f18ade123989ea50ep-1L,
+ 0x1.d5818dcfba48725da05aeb66dff8p-1L, 0x1.d80e316c98397bb84f9d048807a0p-1L,
+ 0x1.da9e603db3285708c01a5b6d480cp-1L, 0x1.dd321f301b4604b695de3c0630c0p-1L,
+ 0x1.dfc97337b9b5eb968cac39ed284cp-1L, 0x1.e264614f5a128a12761fa17adc74p-1L,
+ 0x1.e502ee78b3ff6273d130153992d0p-1L, 0x1.e7a51fbc74c834b548b2832378a4p-1L,
+ 0x1.ea4afa2a490d9858f73a18f5dab4p-1L, 0x1.ecf482d8e67f08db0312fb949d50p-1L,
+ 0x1.efa1bee615a27771fd21a92dabb6p-1L, 0x1.f252b376bba974e8696fc3638f24p-1L,
+ 0x1.f50765b6e4540674f84b762861a6p-1L, 0x1.f7bfdad9cbe138913b4bfe72bd78p-1L,
+ 0x1.fa7c1819e90d82e90a7e74b26360p-1L, 0x1.fd3c22b8f71f10975ba4b32bd006p-1L,
+ 0x1.0000000000000000000000000000p+0L, 0x1.0163da9fb33356d84a66ae336e98p+0L,
+ 0x1.02c9a3e778060ee6f7caca4f7a18p+0L, 0x1.04315e86e7f84bd738f9a20da442p+0L,
+ 0x1.059b0d31585743ae7c548eb68c6ap+0L, 0x1.0706b29ddf6ddc6dc403a9d87b1ep+0L,
+ 0x1.0874518759bc808c35f25d942856p+0L, 0x1.09e3ecac6f3834521e060c584d5cp+0L,
+ 0x1.0b5586cf9890f6298b92b7184200p+0L, 0x1.0cc922b7247f7407b705b893dbdep+0L,
+ 0x1.0e3ec32d3d1a2020742e4f8af794p+0L, 0x1.0fb66affed31af232091dd8a169ep+0L,
+ 0x1.11301d0125b50a4ebbf1aed9321cp+0L, 0x1.12abdc06c31cbfb92bad324d6f84p+0L,
+ 0x1.1429aaea92ddfb34101943b2588ep+0L, 0x1.15a98c8a58e512480d573dd562aep+0L,
+ 0x1.172b83c7d517adcdf7c8c50eb162p+0L, 0x1.18af9388c8de9bbbf70b9a3c269cp+0L,
+ 0x1.1a35beb6fcb753cb698f692d2038p+0L, 0x1.1bbe084045cd39ab1e72b442810ep+0L,
+ 0x1.1d4873168b9aa7805b8028990be8p+0L, 0x1.1ed5022fcd91cb8819ff61121fbep+0L,
+ 0x1.2063b88628cd63b8eeb0295093f6p+0L, 0x1.21f49917ddc962552fd29294bc20p+0L,
+ 0x1.2387a6e75623866c1fadb1c159c0p+0L, 0x1.251ce4fb2a63f3582ab7de9e9562p+0L,
+ 0x1.26b4565e27cdd257a673281d3068p+0L, 0x1.284dfe1f5638096cf15cf03c9fa0p+0L,
+ 0x1.29e9df51fdee12c25d15f5a25022p+0L, 0x1.2b87fd0dad98ffddea46538fca24p+0L,
+ 0x1.2d285a6e4030b40091d536d0733ep+0L, 0x1.2ecafa93e2f5611ca0f45d5239a4p+0L,
+ 0x1.306fe0a31b7152de8d5a463063bep+0L, 0x1.32170fc4cd8313539cf1c3009330p+0L,
+ 0x1.33c08b26416ff4c9c8610d96680ep+0L, 0x1.356c55f929ff0c94623476373be4p+0L,
+ 0x1.371a7373aa9caa7145502f45452ap+0L, 0x1.38cae6d05d86585a9cb0d9bed530p+0L,
+ 0x1.3a7db34e59ff6ea1bc9299e0a1fep+0L, 0x1.3c32dc313a8e484001f228b58cf0p+0L,
+ 0x1.3dea64c12342235b41223e13d7eep+0L, 0x1.3fa4504ac801ba0bf701aa417b9cp+0L,
+ 0x1.4160a21f72e29f84325b8f3dbacap+0L, 0x1.431f5d950a896dc704439410b628p+0L,
+ 0x1.44e086061892d03136f409df0724p+0L, 0x1.46a41ed1d005772512f459229f0ap+0L,
+ 0x1.486a2b5c13cd013c1a3b69062f26p+0L, 0x1.4a32af0d7d3de672d8bcf46f99b4p+0L,
+ 0x1.4bfdad5362a271d4397afec42e36p+0L, 0x1.4dcb299fddd0d63b36ef1a9e19dep+0L,
+ 0x1.4f9b2769d2ca6ad33d8b69aa0b8cp+0L, 0x1.516daa2cf6641c112f52c84d6066p+0L,
+ 0x1.5342b569d4f81df0a83c49d86bf4p+0L, 0x1.551a4ca5d920ec52ec620243540cp+0L,
+ 0x1.56f4736b527da66ecb004764e61ep+0L, 0x1.58d12d497c7fd252bc2b7343d554p+0L,
+ 0x1.5ab07dd48542958c93015191e9a8p+0L, 0x1.5c9268a5946b701c4b1b81697ed4p+0L,
+ 0x1.5e76f15ad21486e9be4c20399d12p+0L, 0x1.605e1b976dc08b076f592a487066p+0L,
+ 0x1.6247eb03a5584b1f0fa06fd2d9eap+0L, 0x1.6434634ccc31fc76f8714c4ee122p+0L,
+ 0x1.66238825522249127d9e29b92ea2p+0L, 0x1.68155d44ca973081c57227b9f69ep+0L,
};
static const float eps[TBLSIZE] = {
- -0x1.5c50p-101, -0x1.5d00p-106, 0x1.8e90p-102, -0x1.5340p-103,
- 0x1.1bd0p-102, -0x1.4600p-105, -0x1.7a40p-104, 0x1.d590p-102,
- -0x1.d590p-101, 0x1.b100p-103, -0x1.0d80p-105, 0x1.6b00p-103,
- -0x1.9f00p-105, 0x1.c400p-103, 0x1.e120p-103, -0x1.c100p-104,
- -0x1.9d20p-103, 0x1.a800p-108, 0x1.4c00p-106, -0x1.9500p-106,
- 0x1.6900p-105, -0x1.29d0p-100, 0x1.4c60p-103, 0x1.13a0p-102,
- -0x1.5b60p-103, -0x1.1c40p-103, 0x1.db80p-102, 0x1.91a0p-102,
- 0x1.dc00p-105, 0x1.44c0p-104, 0x1.9710p-102, 0x1.8760p-103,
- -0x1.a720p-103, 0x1.ed20p-103, -0x1.49c0p-102, -0x1.e000p-111,
- 0x1.86a0p-103, 0x1.2b40p-103, -0x1.b400p-108, 0x1.1280p-99,
- -0x1.02d8p-102, -0x1.e3d0p-103, -0x1.b080p-105, -0x1.f100p-107,
- -0x1.16c0p-105, -0x1.1190p-103, -0x1.a7d2p-100, 0x1.3450p-103,
- -0x1.67c0p-105, 0x1.4b80p-104, -0x1.c4e0p-103, 0x1.6000p-108,
- -0x1.3f60p-105, 0x1.93f0p-104, 0x1.5fe0p-105, 0x1.6f80p-107,
- -0x1.7600p-106, 0x1.21e0p-106, -0x1.3a40p-106, -0x1.40c0p-104,
- -0x1.9860p-105, -0x1.5d40p-108, -0x1.1d70p-106, 0x1.2760p-105,
- 0x0.0000p+0, 0x1.21e2p-104, -0x1.9520p-108, -0x1.5720p-106,
- -0x1.4810p-106, -0x1.be00p-109, 0x1.0080p-105, -0x1.5780p-108,
- -0x1.d460p-105, -0x1.6140p-105, 0x1.4630p-104, 0x1.ad50p-103,
- 0x1.82e0p-105, 0x1.1d3cp-101, 0x1.6100p-107, 0x1.ec30p-104,
- 0x1.f200p-108, 0x1.0b40p-103, 0x1.3660p-102, 0x1.d9d0p-103,
- -0x1.02d0p-102, 0x1.b070p-103, 0x1.b9c0p-104, -0x1.01c0p-103,
- -0x1.dfe0p-103, 0x1.1b60p-104, -0x1.ae94p-101, -0x1.3340p-104,
- 0x1.b3d8p-102, -0x1.6e40p-105, -0x1.3670p-103, 0x1.c140p-104,
- 0x1.1840p-101, 0x1.1ab0p-102, -0x1.a400p-104, 0x1.1f00p-104,
- -0x1.7180p-103, 0x1.4ce0p-102, 0x1.9200p-107, -0x1.54c0p-103,
- 0x1.1b80p-105, -0x1.1828p-101, 0x1.5720p-102, -0x1.a060p-100,
- 0x1.9160p-102, 0x1.a280p-104, 0x1.3400p-107, 0x1.2b20p-102,
- 0x1.7800p-108, 0x1.cfd0p-101, 0x1.2ef0p-102, -0x1.2760p-99,
- 0x1.b380p-104, 0x1.0048p-101, -0x1.60b0p-102, 0x1.a1ccp-100,
- -0x1.a640p-104, -0x1.08a0p-101, 0x1.7e60p-102, 0x1.22c0p-103,
- -0x1.7200p-106, 0x1.f0f0p-102, 0x1.eb4ep-99, 0x1.c6e0p-103,
+ -0x1.5c50p-101, -0x1.5d00p-106, 0x1.8e90p-102, -0x1.5340p-103, 0x1.1bd0p-102, -0x1.4600p-105, -0x1.7a40p-104,
+ 0x1.d590p-102, -0x1.d590p-101, 0x1.b100p-103, -0x1.0d80p-105, 0x1.6b00p-103, -0x1.9f00p-105, 0x1.c400p-103,
+ 0x1.e120p-103, -0x1.c100p-104, -0x1.9d20p-103, 0x1.a800p-108, 0x1.4c00p-106, -0x1.9500p-106, 0x1.6900p-105,
+ -0x1.29d0p-100, 0x1.4c60p-103, 0x1.13a0p-102, -0x1.5b60p-103, -0x1.1c40p-103, 0x1.db80p-102, 0x1.91a0p-102,
+ 0x1.dc00p-105, 0x1.44c0p-104, 0x1.9710p-102, 0x1.8760p-103, -0x1.a720p-103, 0x1.ed20p-103, -0x1.49c0p-102,
+ -0x1.e000p-111, 0x1.86a0p-103, 0x1.2b40p-103, -0x1.b400p-108, 0x1.1280p-99, -0x1.02d8p-102, -0x1.e3d0p-103,
+ -0x1.b080p-105, -0x1.f100p-107, -0x1.16c0p-105, -0x1.1190p-103, -0x1.a7d2p-100, 0x1.3450p-103, -0x1.67c0p-105,
+ 0x1.4b80p-104, -0x1.c4e0p-103, 0x1.6000p-108, -0x1.3f60p-105, 0x1.93f0p-104, 0x1.5fe0p-105, 0x1.6f80p-107,
+ -0x1.7600p-106, 0x1.21e0p-106, -0x1.3a40p-106, -0x1.40c0p-104, -0x1.9860p-105, -0x1.5d40p-108, -0x1.1d70p-106,
+ 0x1.2760p-105, 0x0.0000p+0, 0x1.21e2p-104, -0x1.9520p-108, -0x1.5720p-106, -0x1.4810p-106, -0x1.be00p-109,
+ 0x1.0080p-105, -0x1.5780p-108, -0x1.d460p-105, -0x1.6140p-105, 0x1.4630p-104, 0x1.ad50p-103, 0x1.82e0p-105,
+ 0x1.1d3cp-101, 0x1.6100p-107, 0x1.ec30p-104, 0x1.f200p-108, 0x1.0b40p-103, 0x1.3660p-102, 0x1.d9d0p-103,
+ -0x1.02d0p-102, 0x1.b070p-103, 0x1.b9c0p-104, -0x1.01c0p-103, -0x1.dfe0p-103, 0x1.1b60p-104, -0x1.ae94p-101,
+ -0x1.3340p-104, 0x1.b3d8p-102, -0x1.6e40p-105, -0x1.3670p-103, 0x1.c140p-104, 0x1.1840p-101, 0x1.1ab0p-102,
+ -0x1.a400p-104, 0x1.1f00p-104, -0x1.7180p-103, 0x1.4ce0p-102, 0x1.9200p-107, -0x1.54c0p-103, 0x1.1b80p-105,
+ -0x1.1828p-101, 0x1.5720p-102, -0x1.a060p-100, 0x1.9160p-102, 0x1.a280p-104, 0x1.3400p-107, 0x1.2b20p-102,
+ 0x1.7800p-108, 0x1.cfd0p-101, 0x1.2ef0p-102, -0x1.2760p-99, 0x1.b380p-104, 0x1.0048p-101, -0x1.60b0p-102,
+ 0x1.a1ccp-100, -0x1.a640p-104, -0x1.08a0p-101, 0x1.7e60p-102, 0x1.22c0p-103, -0x1.7200p-106, 0x1.f0f0p-102,
+ 0x1.eb4ep-99, 0x1.c6e0p-103,
};
/*
@@ -650,15 +565,7 @@ long double exp2l(long double x)
r = t +
t * z *
(P1 +
- z * (P2 +
- z * (P3 +
- z * (P4 +
- z * (P5 +
- z * (P6 +
- z * (P7 +
- z * (P8 +
- z * (P9 +
- z * P10)))))))));
+ z * (P2 + z * (P3 + z * (P4 + z * (P5 + z * (P6 + z * (P7 + z * (P8 + z * (P9 + z * P10)))))))));
return scalbnl(r, k.i);
}
diff --git a/lib/libm/expl.c b/lib/libm/expl.c
index 5499a3f3..222b43ef 100644
--- a/lib/libm/expl.c
+++ b/lib/libm/expl.c
@@ -88,8 +88,7 @@ static const long double Q[4] = {
2.2726554820815502876593E-1L,
2.0000000000000000000897E0L,
};
-static const long double LN2HI = 6.9314575195312500000000E-1L,
- LN2LO = 1.4286068203094172321215E-6L,
+static const long double LN2HI = 6.9314575195312500000000E-1L, LN2LO = 1.4286068203094172321215E-6L,
LOG2E = 1.4426950408889634073599E0L;
long double expl(long double x)
diff --git a/lib/libm/expm1.c b/lib/libm/expm1.c
index c4022188..6411cb2d 100644
--- a/lib/libm/expm1.c
+++ b/lib/libm/expm1.c
@@ -111,9 +111,9 @@
static const double o_threshold = 7.09782712893383973096e+02, /* 0x40862E42,
0xFEFA39EF */
- ln2_hi = 6.93147180369123816490e-01, /* 0x3fe62e42, 0xfee00000 */
- ln2_lo = 1.90821492927058770002e-10, /* 0x3dea39ef, 0x35793c76 */
- invln2 = 1.44269504088896338700e+00, /* 0x3ff71547, 0x652b82fe */
+ ln2_hi = 6.93147180369123816490e-01, /* 0x3fe62e42, 0xfee00000 */
+ ln2_lo = 1.90821492927058770002e-10, /* 0x3dea39ef, 0x35793c76 */
+ invln2 = 1.44269504088896338700e+00, /* 0x3ff71547, 0x652b82fe */
/* Scaled Q's: Qn_here = 2**n * Qn_above, for R(2*z) where z = hxs =
x*x/2: */
Q1 = -3.33333333333331316428e-02, /* BFA11111 111110F4 */
diff --git a/lib/libm/expm1l.c b/lib/libm/expm1l.c
index e26e19c5..f779aecf 100644
--- a/lib/libm/expm1l.c
+++ b/lib/libm/expm1l.c
@@ -72,8 +72,7 @@ static const long double P0 = -1.586135578666346600772998894928250240826E4L,
Q4 = -4.002027679107076077238836622982900945173E1L,
/* Q5 = 1.000000000000000000000000000000000000000E0 */
/* C1 + C2 = ln 2 */
- C1 = 6.93145751953125E-1L,
- C2 = 1.428606820309417232121458176568075500134E-6L,
+ C1 = 6.93145751953125E-1L, C2 = 1.428606820309417232121458176568075500134E-6L,
/* ln 2^-65 */
minarg = -4.5054566736396445112120088E1L,
/* ln 2^16384 */
diff --git a/lib/libm/fma.c b/lib/libm/fma.c
index 77bc7b3c..4d354020 100644
--- a/lib/libm/fma.c
+++ b/lib/libm/fma.c
@@ -86,8 +86,7 @@ double fma(double x, double y, double z)
d -= 64;
if (d == 0) {
} else if (d < 64) {
- rlo = rhi << (64 - d) | rlo >> d |
- !!(rlo << (64 - d));
+ rlo = rhi << (64 - d) | rlo >> d | !!(rlo << (64 - d));
rhi = rhi >> d;
} else {
rlo = 1;
@@ -162,16 +161,14 @@ double fma(double x, double y, double z)
on arch behaviour which
can be imitated by a double to float
conversion */
- float fltmin = (float)(0x0.ffffff8p-63) *
- FLT_MIN * (float)r;
+ float fltmin = (float)(0x0.ffffff8p-63) * FLT_MIN * (float)r;
return DBL_MIN / FLT_MIN * fltmin;
}
/* one bit is lost when scaled, add another top bit to
only round once at conversion if
it is inexact */
if (rhi << 53) {
- i = (int64_t)(rhi >> 1 | (rhi & 1) |
- 1ull << 62);
+ i = (int64_t)(rhi >> 1 | (rhi & 1) | 1ull << 62);
if (sign)
i = -i;
r = (double)i;
diff --git a/lib/libm/fmaf.c b/lib/libm/fmaf.c
index fb7508a3..48b6caa5 100644
--- a/lib/libm/fmaf.c
+++ b/lib/libm/fmaf.c
@@ -63,8 +63,7 @@ float fmaf(float x, float y, float z)
fmaf(0x1p-120f, 0x1p-120f, 0x1p-149f)
*/
#if defined(FE_INEXACT) && defined(FE_UNDERFLOW)
- if (e < 0x3ff - 126 && e >= 0x3ff - 149 &&
- fetestexcept(FE_INEXACT)) {
+ if (e < 0x3ff - 126 && e >= 0x3ff - 149 && fetestexcept(FE_INEXACT)) {
feclearexcept(FE_INEXACT);
/* TODO: gcc and clang bug workaround */
volatile float vz = z;
diff --git a/lib/libm/fmal.c b/lib/libm/fmal.c
index 11097f0e..0bf3221a 100644
--- a/lib/libm/fmal.c
+++ b/lib/libm/fmal.c
@@ -101,8 +101,7 @@ static inline long double add_adjusted(long double a, long double b)
* that the result will be subnormal, and care is taken to ensure that
* double rounding does not occur.
*/
-static inline long double add_and_denormalize(long double a, long double b,
- int scale)
+static inline long double add_and_denormalize(long double a, long double b, int scale)
{
struct dd sum;
int bits_lost;
diff --git a/lib/libm/j0.c b/lib/libm/j0.c
index 52d3f483..b466c1ad 100644
--- a/lib/libm/j0.c
+++ b/lib/libm/j0.c
@@ -63,7 +63,7 @@ static double pzero(double), qzero(double);
static const double invsqrtpi = 5.64189583547756279280e-01, /* 0x3FE20DD7,
0x50429B6D */
- tpi = 6.36619772367581382433e-01; /* 0x3FE45F30, 0x6DC9C883 */
+ tpi = 6.36619772367581382433e-01; /* 0x3FE45F30, 0x6DC9C883 */
/* common method when |x|>=2 */
static double common(uint32_t ix, double x, int y0)
@@ -103,13 +103,13 @@ static double common(uint32_t ix, double x, int y0)
/* R0/S0 on [0, 2.00] */
static const double R02 = 1.56249999999999947958e-02, /* 0x3F8FFFFF, 0xFFFFFFFD
*/
- R03 = -1.89979294238854721751e-04, /* 0xBF28E6A5, 0xB61AC6E9 */
- R04 = 1.82954049532700665670e-06, /* 0x3EBEB1D1, 0x0C503919 */
- R05 = -4.61832688532103189199e-09, /* 0xBE33D5E7, 0x73D63FCE */
- S01 = 1.56191029464890010492e-02, /* 0x3F8FFCE8, 0x82C8C2A4 */
- S02 = 1.16926784663337450260e-04, /* 0x3F1EA6D2, 0xDD57DBF4 */
- S03 = 5.13546550207318111446e-07, /* 0x3EA13B54, 0xCE84D5A9 */
- S04 = 1.16614003333790000205e-09; /* 0x3E1408BC, 0xF4745D8F */
+ R03 = -1.89979294238854721751e-04, /* 0xBF28E6A5, 0xB61AC6E9 */
+ R04 = 1.82954049532700665670e-06, /* 0x3EBEB1D1, 0x0C503919 */
+ R05 = -4.61832688532103189199e-09, /* 0xBE33D5E7, 0x73D63FCE */
+ S01 = 1.56191029464890010492e-02, /* 0x3F8FFCE8, 0x82C8C2A4 */
+ S02 = 1.16926784663337450260e-04, /* 0x3F1EA6D2, 0xDD57DBF4 */
+ S03 = 5.13546550207318111446e-07, /* 0x3EA13B54, 0xCE84D5A9 */
+ S04 = 1.16614003333790000205e-09; /* 0x3E1408BC, 0xF4745D8F */
double j0(double x)
{
@@ -148,16 +148,16 @@ double j0(double x)
static const double u00 = -7.38042951086872317523e-02, /* 0xBFB2E4D6, 0x99CBD01F
*/
- u01 = 1.76666452509181115538e-01, /* 0x3FC69D01, 0x9DE9E3FC */
- u02 = -1.38185671945596898896e-02, /* 0xBF8C4CE8, 0xB16CFA97 */
- u03 = 3.47453432093683650238e-04, /* 0x3F36C54D, 0x20B29B6B */
- u04 = -3.81407053724364161125e-06, /* 0xBECFFEA7, 0x73D25CAD */
- u05 = 1.95590137035022920206e-08, /* 0x3E550057, 0x3B4EABD4 */
- u06 = -3.98205194132103398453e-11, /* 0xBDC5E43D, 0x693FB3C8 */
- v01 = 1.27304834834123699328e-02, /* 0x3F8A1270, 0x91C9C71A */
- v02 = 7.60068627350353253702e-05, /* 0x3F13ECBB, 0xF578C6C1 */
- v03 = 2.59150851840457805467e-07, /* 0x3E91642D, 0x7FF202FD */
- v04 = 4.41110311332675467403e-10; /* 0x3DFE5018, 0x3BD6D9EF */
+ u01 = 1.76666452509181115538e-01, /* 0x3FC69D01, 0x9DE9E3FC */
+ u02 = -1.38185671945596898896e-02, /* 0xBF8C4CE8, 0xB16CFA97 */
+ u03 = 3.47453432093683650238e-04, /* 0x3F36C54D, 0x20B29B6B */
+ u04 = -3.81407053724364161125e-06, /* 0xBECFFEA7, 0x73D25CAD */
+ u05 = 1.95590137035022920206e-08, /* 0x3E550057, 0x3B4EABD4 */
+ u06 = -3.98205194132103398453e-11, /* 0xBDC5E43D, 0x693FB3C8 */
+ v01 = 1.27304834834123699328e-02, /* 0x3F8A1270, 0x91C9C71A */
+ v02 = 7.60068627350353253702e-05, /* 0x3F13ECBB, 0xF578C6C1 */
+ v03 = 2.59150851840457805467e-07, /* 0x3E91642D, 0x7FF202FD */
+ v04 = 4.41110311332675467403e-10; /* 0x3DFE5018, 0x3BD6D9EF */
double y0(double x)
{
@@ -183,10 +183,7 @@ double y0(double x)
if (ix >= 0x3e400000) { /* x >= 2**-27 */
/* large ulp error near the first zero, x ~= 0.89 */
z = x * x;
- u = u00 +
- z * (u01 +
- z * (u02 +
- z * (u03 + z * (u04 + z * (u05 + z * u06)))));
+ u = u00 + z * (u01 + z * (u02 + z * (u03 + z * (u04 + z * (u05 + z * u06)))));
v = 1.0 + z * (v01 + z * (v02 + z * (v03 + z * v04)));
return u / v + tpi * (j0(x) * log(x));
}
@@ -401,8 +398,6 @@ static double qzero(double x)
}
z = 1.0 / (x * x);
r = p[0] + z * (p[1] + z * (p[2] + z * (p[3] + z * (p[4] + z * p[5]))));
- s = 1.0 +
- z * (q[0] +
- z * (q[1] + z * (q[2] + z * (q[3] + z * (q[4] + z * q[5])))));
+ s = 1.0 + z * (q[0] + z * (q[1] + z * (q[2] + z * (q[3] + z * (q[4] + z * q[5])))));
return (-.125 + r / s) / x;
}
diff --git a/lib/libm/j0f.c b/lib/libm/j0f.c
index 46ffc758..476281a7 100644
--- a/lib/libm/j0f.c
+++ b/lib/libm/j0f.c
@@ -120,10 +120,7 @@ float y0f(float x)
if (ix >= 0x39000000) { /* x >= 2**-13 */
/* large ulp error at x ~= 0.89 */
z = x * x;
- u = u00 +
- z * (u01 +
- z * (u02 +
- z * (u03 + z * (u04 + z * (u05 + z * u06)))));
+ u = u00 + z * (u01 + z * (u02 + z * (u03 + z * (u04 + z * (u05 + z * u06)))));
v = 1 + z * (v01 + z * (v02 + z * (v03 + z * v04)));
return u / v + tpi * (j0f(x) * logf(x));
}
@@ -337,8 +334,6 @@ static float qzerof(float x)
}
z = 1.0f / (x * x);
r = p[0] + z * (p[1] + z * (p[2] + z * (p[3] + z * (p[4] + z * p[5]))));
- s = 1.0f +
- z * (q[0] +
- z * (q[1] + z * (q[2] + z * (q[3] + z * (q[4] + z * q[5])))));
+ s = 1.0f + z * (q[0] + z * (q[1] + z * (q[2] + z * (q[3] + z * (q[4] + z * q[5])))));
return (-.125f + r / s) / x;
}
diff --git a/lib/libm/j1.c b/lib/libm/j1.c
index 839160c4..211c78bf 100644
--- a/lib/libm/j1.c
+++ b/lib/libm/j1.c
@@ -63,7 +63,7 @@ static double pone(double), qone(double);
static const double invsqrtpi = 5.64189583547756279280e-01, /* 0x3FE20DD7,
0x50429B6D */
- tpi = 6.36619772367581382433e-01; /* 0x3FE45F30, 0x6DC9C883 */
+ tpi = 6.36619772367581382433e-01; /* 0x3FE45F30, 0x6DC9C883 */
static double common(uint32_t ix, double x, int y1, int sign)
{
@@ -104,14 +104,14 @@ static double common(uint32_t ix, double x, int y1, int sign)
/* R0/S0 on [0,2] */
static const double r00 = -6.25000000000000000000e-02, /* 0xBFB00000, 0x00000000
*/
- r01 = 1.40705666955189706048e-03, /* 0x3F570D9F, 0x98472C61 */
- r02 = -1.59955631084035597520e-05, /* 0xBEF0C5C6, 0xBA169668 */
- r03 = 4.96727999609584448412e-08, /* 0x3E6AAAFA, 0x46CA0BD9 */
- s01 = 1.91537599538363460805e-02, /* 0x3F939D0B, 0x12637E53 */
- s02 = 1.85946785588630915560e-04, /* 0x3F285F56, 0xB9CDF664 */
- s03 = 1.17718464042623683263e-06, /* 0x3EB3BFF8, 0x333F8498 */
- s04 = 5.04636257076217042715e-09, /* 0x3E35AC88, 0xC97DFF2C */
- s05 = 1.23542274426137913908e-11; /* 0x3DAB2ACF, 0xCFB97ED8 */
+ r01 = 1.40705666955189706048e-03, /* 0x3F570D9F, 0x98472C61 */
+ r02 = -1.59955631084035597520e-05, /* 0xBEF0C5C6, 0xBA169668 */
+ r03 = 4.96727999609584448412e-08, /* 0x3E6AAAFA, 0x46CA0BD9 */
+ s01 = 1.91537599538363460805e-02, /* 0x3F939D0B, 0x12637E53 */
+ s02 = 1.85946785588630915560e-04, /* 0x3F285F56, 0xB9CDF664 */
+ s03 = 1.17718464042623683263e-06, /* 0x3EB3BFF8, 0x333F8498 */
+ s04 = 5.04636257076217042715e-09, /* 0x3E35AC88, 0xC97DFF2C */
+ s05 = 1.23542274426137913908e-11; /* 0x3DAB2ACF, 0xCFB97ED8 */
double j1(double x)
{
@@ -172,8 +172,7 @@ double y1(double x)
return -tpi / x;
z = x * x;
u = U0[0] + z * (U0[1] + z * (U0[2] + z * (U0[3] + z * U0[4])));
- v = 1 +
- z * (V0[0] + z * (V0[1] + z * (V0[2] + z * (V0[3] + z * V0[4]))));
+ v = 1 + z * (V0[0] + z * (V0[1] + z * (V0[2] + z * (V0[3] + z * V0[4]))));
return x * (u / v) + tpi * (j1(x) * log(x) - 1 / x);
}
@@ -385,8 +384,6 @@ static double qone(double x)
}
z = 1.0 / (x * x);
r = p[0] + z * (p[1] + z * (p[2] + z * (p[3] + z * (p[4] + z * p[5]))));
- s = 1.0 +
- z * (q[0] +
- z * (q[1] + z * (q[2] + z * (q[3] + z * (q[4] + z * q[5])))));
+ s = 1.0 + z * (q[0] + z * (q[1] + z * (q[2] + z * (q[3] + z * (q[4] + z * q[5])))));
return (.375 + r / s) / x;
}
diff --git a/lib/libm/j1f.c b/lib/libm/j1f.c
index 6415ae14..b1bb6226 100644
--- a/lib/libm/j1f.c
+++ b/lib/libm/j1f.c
@@ -118,8 +118,7 @@ float y1f(float x)
return -tpi / x;
z = x * x;
u = U0[0] + z * (U0[1] + z * (U0[2] + z * (U0[3] + z * U0[4])));
- v = 1.0f +
- z * (V0[0] + z * (V0[1] + z * (V0[2] + z * (V0[3] + z * V0[4]))));
+ v = 1.0f + z * (V0[0] + z * (V0[1] + z * (V0[2] + z * (V0[3] + z * V0[4]))));
return x * (u / v) + tpi * (j1f(x) * logf(x) - 1.0f / x);
}
@@ -331,8 +330,6 @@ static float qonef(float x)
}
z = 1.0f / (x * x);
r = p[0] + z * (p[1] + z * (p[2] + z * (p[3] + z * (p[4] + z * p[5]))));
- s = 1.0f +
- z * (q[0] +
- z * (q[1] + z * (q[2] + z * (q[3] + z * (q[4] + z * q[5])))));
+ s = 1.0f + z * (q[0] + z * (q[1] + z * (q[2] + z * (q[3] + z * (q[4] + z * q[5])))));
return (.375f + r / s) / x;
}
diff --git a/lib/libm/lgamma_r.c b/lib/libm/lgamma_r.c
index d3f901ae..a6345f11 100644
--- a/lib/libm/lgamma_r.c
+++ b/lib/libm/lgamma_r.c
@@ -85,20 +85,20 @@
static const double pi = 3.14159265358979311600e+00, /* 0x400921FB, 0x54442D18
*/
- a0 = 7.72156649015328655494e-02, /* 0x3FB3C467, 0xE37DB0C8 */
- a1 = 3.22467033424113591611e-01, /* 0x3FD4A34C, 0xC4A60FAD */
- a2 = 6.73523010531292681824e-02, /* 0x3FB13E00, 0x1A5562A7 */
- a3 = 2.05808084325167332806e-02, /* 0x3F951322, 0xAC92547B */
- a4 = 7.38555086081402883957e-03, /* 0x3F7E404F, 0xB68FEFE8 */
- a5 = 2.89051383673415629091e-03, /* 0x3F67ADD8, 0xCCB7926B */
- a6 = 1.19270763183362067845e-03, /* 0x3F538A94, 0x116F3F5D */
- a7 = 5.10069792153511336608e-04, /* 0x3F40B6C6, 0x89B99C00 */
- a8 = 2.20862790713908385557e-04, /* 0x3F2CF2EC, 0xED10E54D */
- a9 = 1.08011567247583939954e-04, /* 0x3F1C5088, 0x987DFB07 */
- a10 = 2.52144565451257326939e-05, /* 0x3EFA7074, 0x428CFA52 */
- a11 = 4.48640949618915160150e-05, /* 0x3F07858E, 0x90A45837 */
- tc = 1.46163214496836224576e+00, /* 0x3FF762D8, 0x6356BE3F */
- tf = -1.21486290535849611461e-01, /* 0xBFBF19B9, 0xBCC38A42 */
+ a0 = 7.72156649015328655494e-02, /* 0x3FB3C467, 0xE37DB0C8 */
+ a1 = 3.22467033424113591611e-01, /* 0x3FD4A34C, 0xC4A60FAD */
+ a2 = 6.73523010531292681824e-02, /* 0x3FB13E00, 0x1A5562A7 */
+ a3 = 2.05808084325167332806e-02, /* 0x3F951322, 0xAC92547B */
+ a4 = 7.38555086081402883957e-03, /* 0x3F7E404F, 0xB68FEFE8 */
+ a5 = 2.89051383673415629091e-03, /* 0x3F67ADD8, 0xCCB7926B */
+ a6 = 1.19270763183362067845e-03, /* 0x3F538A94, 0x116F3F5D */
+ a7 = 5.10069792153511336608e-04, /* 0x3F40B6C6, 0x89B99C00 */
+ a8 = 2.20862790713908385557e-04, /* 0x3F2CF2EC, 0xED10E54D */
+ a9 = 1.08011567247583939954e-04, /* 0x3F1C5088, 0x987DFB07 */
+ a10 = 2.52144565451257326939e-05, /* 0x3EFA7074, 0x428CFA52 */
+ a11 = 4.48640949618915160150e-05, /* 0x3F07858E, 0x90A45837 */
+ tc = 1.46163214496836224576e+00, /* 0x3FF762D8, 0x6356BE3F */
+ tf = -1.21486290535849611461e-01, /* 0xBFBF19B9, 0xBCC38A42 */
/* tt = -(tail of tf) */
tt = -3.63867699703950536541e-18, /* 0xBC50C7CA, 0xA48A971F */
t0 = 4.83836122723810047042e-01, /* 0x3FDEF72B, 0xC8EE38A2 */
@@ -242,48 +242,32 @@ double __lgamma_r(double x, int *signgamp)
switch (i) {
case 0:
z = y * y;
- p1 = a0 +
- z * (a2 +
- z * (a4 + z * (a6 + z * (a8 + z * a10))));
- p2 = z *
- (a1 +
- z * (a3 +
- z * (a5 + z * (a7 + z * (a9 + z * a11)))));
+ p1 = a0 + z * (a2 + z * (a4 + z * (a6 + z * (a8 + z * a10))));
+ p2 = z * (a1 + z * (a3 + z * (a5 + z * (a7 + z * (a9 + z * a11)))));
p = y * p1 + p2;
r += (p - 0.5 * y);
break;
case 1:
z = y * y;
w = z * y;
- p1 = t0 +
- w * (t3 +
- w * (t6 + w * (t9 + w * t12))); /* parallel
- comp
- */
+ p1 = t0 + w * (t3 + w * (t6 + w * (t9 + w * t12))); /* parallel
+ comp
+ */
p2 = t1 + w * (t4 + w * (t7 + w * (t10 + w * t13)));
p3 = t2 + w * (t5 + w * (t8 + w * (t11 + w * t14)));
p = z * p1 - (tt - w * (p2 + y * p3));
r += tf + p;
break;
case 2:
- p1 = y *
- (u0 +
- y * (u1 +
- y * (u2 + y * (u3 + y * (u4 + y * u5)))));
- p2 = 1.0 +
- y * (v1 + y * (v2 + y * (v3 + y * (v4 + y * v5))));
+ p1 = y * (u0 + y * (u1 + y * (u2 + y * (u3 + y * (u4 + y * u5)))));
+ p2 = 1.0 + y * (v1 + y * (v2 + y * (v3 + y * (v4 + y * v5))));
r += -0.5 * y + p1 / p2;
}
} else if (ix < 0x40200000) { /* x < 8.0 */
i = (int)x;
y = x - (double)i;
- p = y *
- (s0 +
- y * (s1 +
- y * (s2 + y * (s3 + y * (s4 + y * (s5 + y * s6))))));
- q = 1.0 +
- y * (r1 +
- y * (r2 + y * (r3 + y * (r4 + y * (r5 + y * r6)))));
+ p = y * (s0 + y * (s1 + y * (s2 + y * (s3 + y * (s4 + y * (s5 + y * s6))))));
+ q = 1.0 + y * (r1 + y * (r2 + y * (r3 + y * (r4 + y * (r5 + y * r6)))));
r = 0.5 * y + p / q;
z = 1.0; /* lgamma(1+s) = log(s) + lgamma(s) */
switch (i) {
@@ -304,9 +288,7 @@ double __lgamma_r(double x, int *signgamp)
t = log(x);
z = 1.0 / x;
y = z * z;
- w = w0 +
- z * (w1 +
- y * (w2 + y * (w3 + y * (w4 + y * (w5 + y * w6)))));
+ w = w0 + z * (w1 + y * (w2 + y * (w3 + y * (w4 + y * (w5 + y * w6)))));
r = (x - 0.5) * (t - 1.0) + w;
} else /* 2**58 <= x <= inf */
r = x * (log(x) - 1.0);
diff --git a/lib/libm/lgammaf_r.c b/lib/libm/lgammaf_r.c
index 7cb25578..4db28bf4 100644
--- a/lib/libm/lgammaf_r.c
+++ b/lib/libm/lgammaf_r.c
@@ -176,48 +176,32 @@ float __lgammaf_r(float x, int *signgamp)
switch (i) {
case 0:
z = y * y;
- p1 = a0 +
- z * (a2 +
- z * (a4 + z * (a6 + z * (a8 + z * a10))));
- p2 = z *
- (a1 +
- z * (a3 +
- z * (a5 + z * (a7 + z * (a9 + z * a11)))));
+ p1 = a0 + z * (a2 + z * (a4 + z * (a6 + z * (a8 + z * a10))));
+ p2 = z * (a1 + z * (a3 + z * (a5 + z * (a7 + z * (a9 + z * a11)))));
p = y * p1 + p2;
r += p - 0.5f * y;
break;
case 1:
z = y * y;
w = z * y;
- p1 = t0 +
- w * (t3 +
- w * (t6 + w * (t9 + w * t12))); /* parallel
- comp
- */
+ p1 = t0 + w * (t3 + w * (t6 + w * (t9 + w * t12))); /* parallel
+ comp
+ */
p2 = t1 + w * (t4 + w * (t7 + w * (t10 + w * t13)));
p3 = t2 + w * (t5 + w * (t8 + w * (t11 + w * t14)));
p = z * p1 - (tt - w * (p2 + y * p3));
r += (tf + p);
break;
case 2:
- p1 = y *
- (u0 +
- y * (u1 +
- y * (u2 + y * (u3 + y * (u4 + y * u5)))));
- p2 = 1.0f +
- y * (v1 + y * (v2 + y * (v3 + y * (v4 + y * v5))));
+ p1 = y * (u0 + y * (u1 + y * (u2 + y * (u3 + y * (u4 + y * u5)))));
+ p2 = 1.0f + y * (v1 + y * (v2 + y * (v3 + y * (v4 + y * v5))));
r += -0.5f * y + p1 / p2;
}
} else if (ix < 0x41000000) { /* x < 8.0 */
i = (int)x;
y = x - (float)i;
- p = y *
- (s0 +
- y * (s1 +
- y * (s2 + y * (s3 + y * (s4 + y * (s5 + y * s6))))));
- q = 1.0f +
- y * (r1 +
- y * (r2 + y * (r3 + y * (r4 + y * (r5 + y * r6)))));
+ p = y * (s0 + y * (s1 + y * (s2 + y * (s3 + y * (s4 + y * (s5 + y * s6))))));
+ q = 1.0f + y * (r1 + y * (r2 + y * (r3 + y * (r4 + y * (r5 + y * r6)))));
r = 0.5f * y + p / q;
z = 1.0f; /* lgamma(1+s) = log(s) + lgamma(s) */
switch (i) {
@@ -238,9 +222,7 @@ float __lgammaf_r(float x, int *signgamp)
t = logf(x);
z = 1.0f / x;
y = z * z;
- w = w0 +
- z * (w1 +
- y * (w2 + y * (w3 + y * (w4 + y * (w5 + y * w6)))));
+ w = w0 + z * (w1 + y * (w2 + y * (w3 + y * (w4 + y * (w5 + y * w6)))));
r = (x - 0.5f) * (t - 1.0f) + w;
} else /* 2**58 <= x <= inf */
r = x * (logf(x) - 1.0f);
diff --git a/lib/libm/lgammal.c b/lib/libm/lgammal.c
index 6c137e20..4bb58d09 100644
--- a/lib/libm/lgammal.c
+++ b/lib/libm/lgammal.c
@@ -104,17 +104,12 @@ static const long double
/* lgam(1+x) = 0.5 x + x a(x)/b(x)
-0.268402099609375 <= x <= 0
peak relative error 6.6e-22 */
- a0 = -6.343246574721079391729402781192128239938E2L,
- a1 = 1.856560238672465796768677717168371401378E3L,
- a2 = 2.404733102163746263689288466865843408429E3L,
- a3 = 8.804188795790383497379532868917517596322E2L,
- a4 = 1.135361354097447729740103745999661157426E2L,
- a5 = 3.766956539107615557608581581190400021285E0L,
+ a0 = -6.343246574721079391729402781192128239938E2L, a1 = 1.856560238672465796768677717168371401378E3L,
+ a2 = 2.404733102163746263689288466865843408429E3L, a3 = 8.804188795790383497379532868917517596322E2L,
+ a4 = 1.135361354097447729740103745999661157426E2L, a5 = 3.766956539107615557608581581190400021285E0L,
- b0 = 8.214973713960928795704317259806842490498E3L,
- b1 = 1.026343508841367384879065363925870888012E4L,
- b2 = 4.553337477045763320522762343132210919277E3L,
- b3 = 8.506975785032585797446253359230031874803E2L,
+ b0 = 8.214973713960928795704317259806842490498E3L, b1 = 1.026343508841367384879065363925870888012E4L,
+ b2 = 4.553337477045763320522762343132210919277E3L, b3 = 8.506975785032585797446253359230031874803E2L,
b4 = 6.042447899703295436820744186992189445813E1L,
/* b5 = 1.000000000000000000000000000000000000000E0 */
@@ -130,58 +125,40 @@ static const long double
-0.230003726999612341262659542325721328468 <= x
<= 0.2699962730003876587373404576742786715318
peak relative error 2.1e-21 */
- g0 = 3.645529916721223331888305293534095553827E-18L,
- g1 = 5.126654642791082497002594216163574795690E3L,
- g2 = 8.828603575854624811911631336122070070327E3L,
- g3 = 5.464186426932117031234820886525701595203E3L,
- g4 = 1.455427403530884193180776558102868592293E3L,
- g5 = 1.541735456969245924860307497029155838446E2L,
+ g0 = 3.645529916721223331888305293534095553827E-18L, g1 = 5.126654642791082497002594216163574795690E3L,
+ g2 = 8.828603575854624811911631336122070070327E3L, g3 = 5.464186426932117031234820886525701595203E3L,
+ g4 = 1.455427403530884193180776558102868592293E3L, g5 = 1.541735456969245924860307497029155838446E2L,
g6 = 4.335498275274822298341872707453445815118E0L,
- h0 = 1.059584930106085509696730443974495979641E4L,
- h1 = 2.147921653490043010629481226937850618860E4L,
- h2 = 1.643014770044524804175197151958100656728E4L,
- h3 = 5.869021995186925517228323497501767586078E3L,
- h4 = 9.764244777714344488787381271643502742293E2L,
- h5 = 6.442485441570592541741092969581997002349E1L,
+ h0 = 1.059584930106085509696730443974495979641E4L, h1 = 2.147921653490043010629481226937850618860E4L,
+ h2 = 1.643014770044524804175197151958100656728E4L, h3 = 5.869021995186925517228323497501767586078E3L,
+ h4 = 9.764244777714344488787381271643502742293E2L, h5 = 6.442485441570592541741092969581997002349E1L,
/* h6 = 1.000000000000000000000000000000000000000E0 */
/* lgam (x+1) = -0.5 x + x u(x)/v(x)
-0.100006103515625 <= x <= 0.231639862060546875
peak relative error 1.3e-21 */
- u0 = -8.886217500092090678492242071879342025627E1L,
- u1 = 6.840109978129177639438792958320783599310E2L,
- u2 = 2.042626104514127267855588786511809932433E3L,
- u3 = 1.911723903442667422201651063009856064275E3L,
- u4 = 7.447065275665887457628865263491667767695E2L,
- u5 = 1.132256494121790736268471016493103952637E2L,
+ u0 = -8.886217500092090678492242071879342025627E1L, u1 = 6.840109978129177639438792958320783599310E2L,
+ u2 = 2.042626104514127267855588786511809932433E3L, u3 = 1.911723903442667422201651063009856064275E3L,
+ u4 = 7.447065275665887457628865263491667767695E2L, u5 = 1.132256494121790736268471016493103952637E2L,
u6 = 4.484398885516614191003094714505960972894E0L,
- v0 = 1.150830924194461522996462401210374632929E3L,
- v1 = 3.399692260848747447377972081399737098610E3L,
- v2 = 3.786631705644460255229513563657226008015E3L,
- v3 = 1.966450123004478374557778781564114347876E3L,
- v4 = 4.741359068914069299837355438370682773122E2L,
- v5 = 4.508989649747184050907206782117647852364E1L,
+ v0 = 1.150830924194461522996462401210374632929E3L, v1 = 3.399692260848747447377972081399737098610E3L,
+ v2 = 3.786631705644460255229513563657226008015E3L, v3 = 1.966450123004478374557778781564114347876E3L,
+ v4 = 4.741359068914069299837355438370682773122E2L, v5 = 4.508989649747184050907206782117647852364E1L,
/* v6 = 1.000000000000000000000000000000000000000E0 */
/* lgam (x+2) = .5 x + x s(x)/r(x)
0 <= x <= 1
peak relative error 7.2e-22 */
- s0 = 1.454726263410661942989109455292824853344E6L,
- s1 = -3.901428390086348447890408306153378922752E6L,
- s2 = -6.573568698209374121847873064292963089438E6L,
- s3 = -3.319055881485044417245964508099095984643E6L,
- s4 = -7.094891568758439227560184618114707107977E5L,
- s5 = -6.263426646464505837422314539808112478303E4L,
+ s0 = 1.454726263410661942989109455292824853344E6L, s1 = -3.901428390086348447890408306153378922752E6L,
+ s2 = -6.573568698209374121847873064292963089438E6L, s3 = -3.319055881485044417245964508099095984643E6L,
+ s4 = -7.094891568758439227560184618114707107977E5L, s5 = -6.263426646464505837422314539808112478303E4L,
s6 = -1.684926520999477529949915657519454051529E3L,
- r0 = -1.883978160734303518163008696712983134698E7L,
- r1 = -2.815206082812062064902202753264922306830E7L,
- r2 = -1.600245495251915899081846093343626358398E7L,
- r3 = -4.310526301881305003489257052083370058799E6L,
- r4 = -5.563807682263923279438235987186184968542E5L,
- r5 = -3.027734654434169996032905158145259713083E4L,
+ r0 = -1.883978160734303518163008696712983134698E7L, r1 = -2.815206082812062064902202753264922306830E7L,
+ r2 = -1.600245495251915899081846093343626358398E7L, r3 = -4.310526301881305003489257052083370058799E6L,
+ r4 = -5.563807682263923279438235987186184968542E5L, r5 = -3.027734654434169996032905158145259713083E4L,
r6 = -4.501995652861105629217250715790764371267E2L,
/* r6 = 1.000000000000000000000000000000000000000E0 */
@@ -189,9 +166,8 @@ static const long double
x >= 8
Peak relative error 1.51e-21
w0 = LS2PI - 0.5 */
- w0 = 4.189385332046727417803e-1L, w1 = 8.333333333333331447505E-2L,
- w2 = -2.777777777750349603440E-3L, w3 = 7.936507795855070755671E-4L,
- w4 = -5.952345851765688514613E-4L, w5 = 8.412723297322498080632E-4L,
+ w0 = 4.189385332046727417803e-1L, w1 = 8.333333333333331447505E-2L, w2 = -2.777777777750349603440E-3L,
+ w3 = 7.936507795855070755671E-4L, w4 = -5.952345851765688514613E-4L, w5 = 8.412723297322498080632E-4L,
w6 = -1.880801938119376907179E-3L, w7 = 4.885026142432270781165E-3L;
/* sin(pi*x) assuming x > 2^-1000, if sin(pi*x)==0 the sign is arbitrary */
@@ -289,48 +265,27 @@ long double __lgammal_r(long double x, int *sg)
}
switch (i) {
case 0:
- p1 = a0 +
- y * (a1 + y * (a2 + y * (a3 + y * (a4 + y * a5))));
+ p1 = a0 + y * (a1 + y * (a2 + y * (a3 + y * (a4 + y * a5))));
p2 = b0 + y * (b1 + y * (b2 + y * (b3 + y * (b4 + y))));
r += 0.5 * y + y * p1 / p2;
break;
case 1:
- p1 = g0 +
- y * (g1 +
- y * (g2 +
- y * (g3 + y * (g4 + y * (g5 + y * g6)))));
- p2 = h0 +
- y * (h1 +
- y * (h2 +
- y * (h3 + y * (h4 + y * (h5 + y)))));
+ p1 = g0 + y * (g1 + y * (g2 + y * (g3 + y * (g4 + y * (g5 + y * g6)))));
+ p2 = h0 + y * (h1 + y * (h2 + y * (h3 + y * (h4 + y * (h5 + y)))));
p = tt + y * p1 / p2;
r += (tf + p);
break;
case 2:
- p1 = y *
- (u0 +
- y * (u1 +
- y * (u2 +
- y * (u3 +
- y * (u4 + y * (u5 + y * u6))))));
- p2 = v0 +
- y * (v1 +
- y * (v2 +
- y * (v3 + y * (v4 + y * (v5 + y)))));
+ p1 = y * (u0 + y * (u1 + y * (u2 + y * (u3 + y * (u4 + y * (u5 + y * u6))))));
+ p2 = v0 + y * (v1 + y * (v2 + y * (v3 + y * (v4 + y * (v5 + y)))));
r += (-0.5 * y + p1 / p2);
}
} else if (ix < 0x40028000) { /* 8.0 */
/* x < 8.0 */
i = (int)x;
y = x - (double)i;
- p = y *
- (s0 +
- y * (s1 +
- y * (s2 + y * (s3 + y * (s4 + y * (s5 + y * s6))))));
- q = r0 +
- y * (r1 +
- y * (r2 +
- y * (r3 + y * (r4 + y * (r5 + y * (r6 + y))))));
+ p = y * (s0 + y * (s1 + y * (s2 + y * (s3 + y * (s4 + y * (s5 + y * s6))))));
+ q = r0 + y * (r1 + y * (r2 + y * (r3 + y * (r4 + y * (r5 + y * (r6 + y))))));
r = 0.5 * y + p / q;
z = 1.0;
/* lgamma(1+s) = log(s) + lgamma(s) */
@@ -353,11 +308,7 @@ long double __lgammal_r(long double x, int *sg)
t = logl(x);
z = 1.0 / x;
y = z * z;
- w = w0 +
- z * (w1 +
- y * (w2 +
- y * (w3 +
- y * (w4 + y * (w5 + y * (w6 + y * w7))))));
+ w = w0 + z * (w1 + y * (w2 + y * (w3 + y * (w4 + y * (w5 + y * (w6 + y * w7))))));
r = (x - 0.5) * (t - 1.0) + w;
} else /* 2**66 <= x <= inf */
r = x * (logl(x) - 1.0);
diff --git a/lib/libm/libm.h b/lib/libm/libm.h
index 5d37249e..a1a876af 100644
--- a/lib/libm/libm.h
+++ b/lib/libm/libm.h
@@ -22,8 +22,7 @@ static __inline uint16_t __bswap16(uint16_t __x)
static __inline uint32_t __bswap32(uint32_t __x)
{
- return __x >> 24 | (__x >> 8 & 0xff00) | (__x << 8 & 0xff0000) |
- __x << 24;
+ return __x >> 24 | (__x >> 8 & 0xff00) | (__x << 8 & 0xff0000) | __x << 24;
}
static __inline uint64_t __bswap64(uint64_t __x)
@@ -60,8 +59,7 @@ static __inline uint64_t __bswap64(uint64_t __x)
#endif
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
-#elif LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384 && \
- __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#elif LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384 && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
union ldshape {
long double f;
struct {
@@ -69,8 +67,7 @@ union ldshape {
uint16_t se;
} i;
};
-#elif LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384 && \
- __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+#elif LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384 && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
/* This is the m68k variant of 80-bit long double, and this definition only
* works on archs where the alignment requirement of uint64_t is <= 4. */
union ldshape {
@@ -81,8 +78,7 @@ union ldshape {
uint64_t m;
} i;
};
-#elif LDBL_MANT_DIG == 113 && LDBL_MAX_EXP == 16384 && \
- __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#elif LDBL_MANT_DIG == 113 && LDBL_MAX_EXP == 16384 && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
union ldshape {
long double f;
struct {
@@ -96,8 +92,7 @@ union ldshape {
uint64_t hi;
} i2;
};
-#elif LDBL_MANT_DIG == 113 && LDBL_MAX_EXP == 16384 && \
- __BYTE_ORDER == __BIG_ENDIAN
+#elif LDBL_MANT_DIG == 113 && LDBL_MAX_EXP == 16384 && __BYTE_ORDER == __BIG_ENDIAN
union ldshape {
long double f;
struct {
@@ -343,7 +338,6 @@ hidden double __math_invalid(double);
hidden long double __math_invalidl(long double);
#endif
-#define weak_alias(old, new) \
- extern __typeof(old)(new) __attribute__((__weak__, __alias__(#old)))
+#define weak_alias(old, new) extern __typeof(old)(new) __attribute__((__weak__, __alias__(#old)))
#endif
diff --git a/lib/libm/log.c b/lib/libm/log.c
index 39d23cdd..96d6158e 100644
--- a/lib/libm/log.c
+++ b/lib/libm/log.c
@@ -45,10 +45,8 @@ double log(double x)
r = x - 1.0;
r2 = r * r;
r3 = r * r2;
- y = r3 *
- (B[1] + r * B[2] + r2 * B[3] +
- r3 * (B[4] + r * B[5] + r2 * B[6] +
- r3 * (B[7] + r * B[8] + r2 * B[9] + r3 * B[10])));
+ y = r3 * (B[1] + r * B[2] + r2 * B[3] +
+ r3 * (B[4] + r * B[5] + r2 * B[6] + r3 * (B[7] + r * B[8] + r2 * B[9] + r3 * B[10])));
/* Worst-case error is around 0.507 ULP. */
w = r * 0x1p27;
double_t rhi = r + w - w;
@@ -107,7 +105,6 @@ double log(double x)
0.5 + 4.13/N + abs-poly-error*2^57 ULP (+ 0.002 ULP without fma)
Worst case error if |y| > 0x1p-4:
0.5 + 2.06/N + abs-poly-error*2^56 ULP (+ 0.001 ULP without fma). */
- y = lo + r2 * A[0] +
- r * r2 * (A[1] + r * A[2] + r2 * (A[3] + r * A[4])) + hi;
+ y = lo + r2 * A[0] + r * r2 * (A[1] + r * A[2] + r2 * (A[3] + r * A[4])) + hi;
return eval_as_double(y);
}
diff --git a/lib/libm/log10.c b/lib/libm/log10.c
index 729ca4d6..05168293 100644
--- a/lib/libm/log10.c
+++ b/lib/libm/log10.c
@@ -22,16 +22,16 @@
static const double ivln10hi = 4.34294481878168880939e-01, /* 0x3fdbcb7b,
0x15200000 */
- ivln10lo = 2.50829467116452752298e-11, /* 0x3dbb9438, 0xca9aadd5 */
- log10_2hi = 3.01029995663611771306e-01, /* 0x3FD34413, 0x509F6000 */
- log10_2lo = 3.69423907715893078616e-13, /* 0x3D59FEF3, 0x11F12B36 */
- Lg1 = 6.666666666666735130e-01, /* 3FE55555 55555593 */
- Lg2 = 3.999999999940941908e-01, /* 3FD99999 9997FA04 */
- Lg3 = 2.857142874366239149e-01, /* 3FD24924 94229359 */
- Lg4 = 2.222219843214978396e-01, /* 3FCC71C5 1D8E78AF */
- Lg5 = 1.818357216161805012e-01, /* 3FC74664 96CB03DE */
- Lg6 = 1.531383769920937332e-01, /* 3FC39A09 D078C69F */
- Lg7 = 1.479819860511658591e-01; /* 3FC2F112 DF3E5244 */
+ ivln10lo = 2.50829467116452752298e-11, /* 0x3dbb9438, 0xca9aadd5 */
+ log10_2hi = 3.01029995663611771306e-01, /* 0x3FD34413, 0x509F6000 */
+ log10_2lo = 3.69423907715893078616e-13, /* 0x3D59FEF3, 0x11F12B36 */
+ Lg1 = 6.666666666666735130e-01, /* 3FE55555 55555593 */
+ Lg2 = 3.999999999940941908e-01, /* 3FD99999 9997FA04 */
+ Lg3 = 2.857142874366239149e-01, /* 3FD24924 94229359 */
+ Lg4 = 2.222219843214978396e-01, /* 3FCC71C5 1D8E78AF */
+ Lg5 = 1.818357216161805012e-01, /* 3FC74664 96CB03DE */
+ Lg6 = 1.531383769920937332e-01, /* 3FC39A09 D078C69F */
+ Lg7 = 1.479819860511658591e-01; /* 3FC2F112 DF3E5244 */
double log10(double x)
{
diff --git a/lib/libm/log10f.c b/lib/libm/log10f.c
index 4bf26544..b1f8de94 100644
--- a/lib/libm/log10f.c
+++ b/lib/libm/log10f.c
@@ -76,6 +76,5 @@ float log10f(float x)
hi = u.f;
lo = f - hi - hfsq + s * (hfsq + R);
dk = k;
- return dk * log10_2lo + (lo + hi) * ivln10lo + lo * ivln10hi +
- hi * ivln10hi + dk * log10_2hi;
+ return dk * log10_2lo + (lo + hi) * ivln10lo + lo * ivln10hi + hi * ivln10hi + dk * log10_2hi;
}
diff --git a/lib/libm/log10l.c b/lib/libm/log10l.c
index d462308f..6a5025fb 100644
--- a/lib/libm/log10l.c
+++ b/lib/libm/log10l.c
@@ -73,16 +73,14 @@ long double log10l(long double x)
* Theoretical peak relative error = 6.2e-22
*/
static const long double P[] = {
- 4.9962495940332550844739E-1L, 1.0767376367209449010438E1L,
- 7.7671073698359539859595E1L, 2.5620629828144409632571E2L,
- 4.2401812743503691187826E2L, 3.4258224542413922935104E2L,
+ 4.9962495940332550844739E-1L, 1.0767376367209449010438E1L, 7.7671073698359539859595E1L,
+ 2.5620629828144409632571E2L, 4.2401812743503691187826E2L, 3.4258224542413922935104E2L,
1.0747524399916215149070E2L,
};
static const long double Q[] = {
/* 1.0000000000000000000000E0,*/
- 2.3479774160285863271658E1L, 1.9444210022760132894510E2L,
- 7.7952888181207260646090E2L, 1.6911722418503949084863E3L,
- 2.0307734695595183428202E3L, 1.2695660352705325274404E3L,
+ 2.3479774160285863271658E1L, 1.9444210022760132894510E2L, 7.7952888181207260646090E2L,
+ 1.6911722418503949084863E3L, 2.0307734695595183428202E3L, 1.2695660352705325274404E3L,
3.2242573199748645407652E2L,
};
diff --git a/lib/libm/log1pl.c b/lib/libm/log1pl.c
index 972e9467..a64355e3 100644
--- a/lib/libm/log1pl.c
+++ b/lib/libm/log1pl.c
@@ -64,16 +64,14 @@ long double log1pl(long double x)
* Theoretical peak relative error = 2.32e-20
*/
static const long double P[] = {
- 4.5270000862445199635215E-5L, 4.9854102823193375972212E-1L,
- 6.5787325942061044846969E0L, 2.9911919328553073277375E1L,
- 6.0949667980987787057556E1L, 5.7112963590585538103336E1L,
+ 4.5270000862445199635215E-5L, 4.9854102823193375972212E-1L, 6.5787325942061044846969E0L,
+ 2.9911919328553073277375E1L, 6.0949667980987787057556E1L, 5.7112963590585538103336E1L,
2.0039553499201281259648E1L,
};
static const long double Q[] = {
/* 1.0000000000000000000000E0,*/
- 1.5062909083469192043167E1L, 8.3047565967967209469434E1L,
- 2.2176239823732856465394E2L, 3.0909872225312059774938E2L,
- 2.1642788614495947685003E2L, 6.0118660497603843919306E1L,
+ 1.5062909083469192043167E1L, 8.3047565967967209469434E1L, 2.2176239823732856465394E2L,
+ 3.0909872225312059774938E2L, 2.1642788614495947685003E2L, 6.0118660497603843919306E1L,
};
/* Coefficients for log(x) = z + z^3 P(z^2)/Q(z^2),
diff --git a/lib/libm/log2.c b/lib/libm/log2.c
index e240ac07..e3b9a9c7 100644
--- a/lib/libm/log2.c
+++ b/lib/libm/log2.c
@@ -60,8 +60,7 @@ double log2(double x)
p = r2 * (B[0] + r * B[1]);
y = hi + p;
lo += hi - y + p;
- lo += r4 * (B[2] + r * B[3] + r2 * (B[4] + r * B[5]) +
- r4 * (B[6] + r * B[7] + r2 * (B[8] + r * B[9])));
+ lo += r4 * (B[2] + r * B[3] + r2 * (B[4] + r * B[5]) + r4 * (B[6] + r * B[7] + r2 * (B[8] + r * B[9])));
y += lo;
return eval_as_double(y);
}
diff --git a/lib/libm/log2l.c b/lib/libm/log2l.c
index bec1d02d..c5f39e16 100644
--- a/lib/libm/log2l.c
+++ b/lib/libm/log2l.c
@@ -68,16 +68,14 @@ long double log2l(long double x)
* Theoretical peak relative error = 6.2e-22
*/
static const long double P[] = {
- 4.9962495940332550844739E-1L, 1.0767376367209449010438E1L,
- 7.7671073698359539859595E1L, 2.5620629828144409632571E2L,
- 4.2401812743503691187826E2L, 3.4258224542413922935104E2L,
+ 4.9962495940332550844739E-1L, 1.0767376367209449010438E1L, 7.7671073698359539859595E1L,
+ 2.5620629828144409632571E2L, 4.2401812743503691187826E2L, 3.4258224542413922935104E2L,
1.0747524399916215149070E2L,
};
static const long double Q[] = {
/* 1.0000000000000000000000E0,*/
- 2.3479774160285863271658E1L, 1.9444210022760132894510E2L,
- 7.7952888181207260646090E2L, 1.6911722418503949084863E3L,
- 2.0307734695595183428202E3L, 1.2695660352705325274404E3L,
+ 2.3479774160285863271658E1L, 1.9444210022760132894510E2L, 7.7952888181207260646090E2L,
+ 1.6911722418503949084863E3L, 2.0307734695595183428202E3L, 1.2695660352705325274404E3L,
3.2242573199748645407652E2L,
};
diff --git a/lib/libm/logl.c b/lib/libm/logl.c
index 419f98b6..7a541be2 100644
--- a/lib/libm/logl.c
+++ b/lib/libm/logl.c
@@ -68,16 +68,14 @@ long double logl(long double x)
* Theoretical peak relative error = 2.32e-20
*/
static const long double P[] = {
- 4.5270000862445199635215E-5L, 4.9854102823193375972212E-1L,
- 6.5787325942061044846969E0L, 2.9911919328553073277375E1L,
- 6.0949667980987787057556E1L, 5.7112963590585538103336E1L,
+ 4.5270000862445199635215E-5L, 4.9854102823193375972212E-1L, 6.5787325942061044846969E0L,
+ 2.9911919328553073277375E1L, 6.0949667980987787057556E1L, 5.7112963590585538103336E1L,
2.0039553499201281259648E1L,
};
static const long double Q[] = {
/* 1.0000000000000000000000E0,*/
- 1.5062909083469192043167E1L, 8.3047565967967209469434E1L,
- 2.2176239823732856465394E2L, 3.0909872225312059774938E2L,
- 2.1642788614495947685003E2L, 6.0118660497603843919306E1L,
+ 1.5062909083469192043167E1L, 8.3047565967967209469434E1L, 2.2176239823732856465394E2L,
+ 3.0909872225312059774938E2L, 2.1642788614495947685003E2L, 6.0118660497603843919306E1L,
};
/* Coefficients for log(x) = z + z^3 P(z^2)/Q(z^2),
diff --git a/lib/libm/pow.c b/lib/libm/pow.c
index f4f84703..f91da903 100644
--- a/lib/libm/pow.c
+++ b/lib/libm/pow.c
@@ -94,8 +94,7 @@ static inline double_t log_inline(uint64_t ix, double_t *tail)
lo4 = t2 - hi + arhi2;
#endif
/* p = log1p(r) - r - A[0]*r*r. */
- p = (ar3 * (A[1] + r * A[2] +
- ar2 * (A[3] + r * A[4] + ar2 * (A[5] + r * A[6]))));
+ p = (ar3 * (A[1] + r * A[2] + ar2 * (A[3] + r * A[4] + ar2 * (A[5] + r * A[6]))));
lo = lo1 + lo2 + lo3 + lo4 + p;
y = hi + lo;
*tail = hi - y + lo;
@@ -176,8 +175,7 @@ static inline double exp_inline(double_t x, double_t xtail, uint32_t sign_bias)
double_t kd, z, r, r2, scale, tail, tmp;
abstop = top12(x) & 0x7ff;
- if (predict_false(abstop - top12(0x1p-54) >=
- top12(512.0) - top12(0x1p-54))) {
+ if (predict_false(abstop - top12(0x1p-54) >= top12(512.0) - top12(0x1p-54))) {
if (abstop - top12(0x1p-54) >= 0x80000000) {
/* Avoid spurious underflow for tiny x. */
/* Note: 0 is common input. */
@@ -267,8 +265,7 @@ double pow(double x, double y)
iy = asuint64(y);
topx = top12(x);
topy = top12(y);
- if (predict_false(topx - 0x001 >= 0x7ff - 0x001 ||
- (topy & 0x7ff) - 0x3be >= 0x43e - 0x3be)) {
+ if (predict_false(topx - 0x001 >= 0x7ff - 0x001 || (topy & 0x7ff) - 0x3be >= 0x43e - 0x3be)) {
/* Note: if |y| > 1075 * ln2 * 2^53 ~= 0x1.749p62 then pow(x,y)
= inf/0 and if |y| < 2^-54 / 1075 ~= 0x1.e7b6p-65 then
pow(x,y) = +-1. */
@@ -279,8 +276,7 @@ double pow(double x, double y)
return issignaling_inline(x) ? x + y : 1.0;
if (ix == asuint64(1.0))
return issignaling_inline(y) ? x + y : 1.0;
- if (2 * ix > 2 * asuint64(INFINITY) ||
- 2 * iy > 2 * asuint64(INFINITY))
+ if (2 * ix > 2 * asuint64(INFINITY) || 2 * iy > 2 * asuint64(INFINITY))
return x + y;
if (2 * ix == 2 * asuint64(1.0))
return 1.0;
@@ -316,13 +312,10 @@ double pow(double x, double y)
if ((topy & 0x7ff) < 0x3be) {
/* |y| < 2^-65, x^y ~= 1 + y*log(x). */
if (WANT_ROUNDING)
- return ix > asuint64(1.0) ? 1.0 + y :
- 1.0 - y;
+ return ix > asuint64(1.0) ? 1.0 + y : 1.0 - y;
return 1.0;
}
- return (ix > asuint64(1.0)) == (topy < 0x800) ?
- __math_oflow(0) :
- __math_uflow(0);
+ return (ix > asuint64(1.0)) == (topy < 0x800) ? __math_oflow(0) : __math_uflow(0);
}
if (topx == 0) {
/* Normalize subnormal x so exponent becomes negative.
diff --git a/lib/libm/powf.c b/lib/libm/powf.c
index f93a5877..424cbd51 100644
--- a/lib/libm/powf.c
+++ b/lib/libm/powf.c
@@ -130,8 +130,7 @@ float powf(float x, float y)
ix = asuint(x);
iy = asuint(y);
- if (predict_false(ix - 0x00800000 >= 0x7f800000 - 0x00800000 ||
- zeroinfnan(iy))) {
+ if (predict_false(ix - 0x00800000 >= 0x7f800000 - 0x00800000 || zeroinfnan(iy))) {
/* Either (x < 0x1p-126 or inf or nan) or (y is 0 or inf or
* nan). */
if (predict_false(zeroinfnan(iy))) {
@@ -139,8 +138,7 @@ float powf(float x, float y)
return issignalingf_inline(x) ? x + y : 1.0f;
if (ix == 0x3f800000)
return issignalingf_inline(y) ? x + y : 1.0f;
- if (2 * ix > 2u * 0x7f800000 ||
- 2 * iy > 2u * 0x7f800000)
+ if (2 * ix > 2u * 0x7f800000 || 2 * iy > 2u * 0x7f800000)
return x + y;
if (2 * ix == 2 * 0x3f800000)
return 1.0f;
@@ -178,8 +176,7 @@ float powf(float x, float y)
}
double_t logx = log2_inline(ix);
double_t ylogx = y * logx; /* cannot overflow, y is single prec. */
- if (predict_false((asuint64(ylogx) >> 47 & 0xffff) >=
- asuint64(126.0 * POWF_SCALE) >> 47)) {
+ if (predict_false((asuint64(ylogx) >> 47 & 0xffff) >= asuint64(126.0 * POWF_SCALE) >> 47)) {
/* |y*log(x)| >= 126. */
if (ylogx > 0x1.fffffffd1d571p+6 * POWF_SCALE)
return __math_oflowf(sign_bias);
diff --git a/lib/libm/powl.c b/lib/libm/powl.c
index 26a9b5ae..d47e6307 100644
--- a/lib/libm/powl.c
+++ b/lib/libm/powl.c
@@ -93,43 +93,33 @@ static const long double Q[] = {
* If i is even, A[i] + B[i/2] gives additional accuracy.
*/
static const long double A[33] = {
- 1.0000000000000000000000E0L, 9.7857206208770013448287E-1L,
- 9.5760328069857364691013E-1L, 9.3708381705514995065011E-1L,
- 9.1700404320467123175367E-1L, 8.9735453750155359320742E-1L,
- 8.7812608018664974155474E-1L, 8.5930964906123895780165E-1L,
- 8.4089641525371454301892E-1L, 8.2287773907698242225554E-1L,
- 8.0524516597462715409607E-1L, 7.8799042255394324325455E-1L,
- 7.7110541270397041179298E-1L, 7.5458221379671136985669E-1L,
- 7.3841307296974965571198E-1L, 7.2259040348852331001267E-1L,
- 7.0710678118654752438189E-1L, 6.9195494098191597746178E-1L,
- 6.7712777346844636413344E-1L, 6.6261832157987064729696E-1L,
- 6.4841977732550483296079E-1L, 6.3452547859586661129850E-1L,
- 6.2092890603674202431705E-1L, 6.0762367999023443907803E-1L,
- 5.9460355750136053334378E-1L, 5.8186242938878875689693E-1L,
- 5.6939431737834582684856E-1L, 5.5719337129794626814472E-1L,
- 5.4525386633262882960438E-1L, 5.3357020033841180906486E-1L,
- 5.2213689121370692017331E-1L, 5.1094857432705833910408E-1L,
- 5.0000000000000000000000E-1L,
+ 1.0000000000000000000000E0L, 9.7857206208770013448287E-1L, 9.5760328069857364691013E-1L,
+ 9.3708381705514995065011E-1L, 9.1700404320467123175367E-1L, 8.9735453750155359320742E-1L,
+ 8.7812608018664974155474E-1L, 8.5930964906123895780165E-1L, 8.4089641525371454301892E-1L,
+ 8.2287773907698242225554E-1L, 8.0524516597462715409607E-1L, 7.8799042255394324325455E-1L,
+ 7.7110541270397041179298E-1L, 7.5458221379671136985669E-1L, 7.3841307296974965571198E-1L,
+ 7.2259040348852331001267E-1L, 7.0710678118654752438189E-1L, 6.9195494098191597746178E-1L,
+ 6.7712777346844636413344E-1L, 6.6261832157987064729696E-1L, 6.4841977732550483296079E-1L,
+ 6.3452547859586661129850E-1L, 6.2092890603674202431705E-1L, 6.0762367999023443907803E-1L,
+ 5.9460355750136053334378E-1L, 5.8186242938878875689693E-1L, 5.6939431737834582684856E-1L,
+ 5.5719337129794626814472E-1L, 5.4525386633262882960438E-1L, 5.3357020033841180906486E-1L,
+ 5.2213689121370692017331E-1L, 5.1094857432705833910408E-1L, 5.0000000000000000000000E-1L,
};
static const long double B[17] = {
- 0.0000000000000000000000E0L, 2.6176170809902549338711E-20L,
- -1.0126791927256478897086E-20L, 1.3438228172316276937655E-21L,
- 1.2207982955417546912101E-20L, -6.3084814358060867200133E-21L,
- 1.3164426894366316434230E-20L, -1.8527916071632873716786E-20L,
- 1.8950325588932570796551E-20L, 1.5564775779538780478155E-20L,
- 6.0859793637556860974380E-21L, -2.0208749253662532228949E-20L,
- 1.4966292219224761844552E-20L, 3.3540909728056476875639E-21L,
- -8.6987564101742849540743E-22L, -1.2327176863327626135542E-20L,
- 0.0000000000000000000000E0L,
+ 0.0000000000000000000000E0L, 2.6176170809902549338711E-20L, -1.0126791927256478897086E-20L,
+ 1.3438228172316276937655E-21L, 1.2207982955417546912101E-20L, -6.3084814358060867200133E-21L,
+ 1.3164426894366316434230E-20L, -1.8527916071632873716786E-20L, 1.8950325588932570796551E-20L,
+ 1.5564775779538780478155E-20L, 6.0859793637556860974380E-21L, -2.0208749253662532228949E-20L,
+ 1.4966292219224761844552E-20L, 3.3540909728056476875639E-21L, -8.6987564101742849540743E-22L,
+ -1.2327176863327626135542E-20L, 0.0000000000000000000000E0L,
};
/* 2^x = 1 + x P(x),
* on the interval -1/32 <= x <= 0
*/
static const long double R[] = {
- 1.5089970579127659901157E-5L, 1.5402715328927013076125E-4L,
- 1.3333556028915671091390E-3L, 9.6181291046036762031786E-3L,
- 5.5504108664798463044015E-2L, 2.4022650695910062854352E-1L,
+ 1.5089970579127659901157E-5L, 1.5402715328927013076125E-4L, 1.3333556028915671091390E-3L,
+ 9.6181291046036762031786E-3L, 5.5504108664798463044015E-2L, 2.4022650695910062854352E-1L,
6.9314718055994530931447E-1L,
};
diff --git a/lib/libm/remquo.c b/lib/libm/remquo.c
index 8e27914f..adddd850 100644
--- a/lib/libm/remquo.c
+++ b/lib/libm/remquo.c
@@ -78,8 +78,7 @@ end:
x = ux.f;
if (sy)
y = -y;
- if (ex == ey ||
- (ex + 1 == ey && (2 * x > y || (2 * x == y && q % 2)))) {
+ if (ex == ey || (ex + 1 == ey && (2 * x > y || (2 * x == y && q % 2)))) {
x -= y;
q++;
}
diff --git a/lib/libm/remquof.c b/lib/libm/remquof.c
index c50b1615..7963b349 100644
--- a/lib/libm/remquof.c
+++ b/lib/libm/remquof.c
@@ -78,8 +78,7 @@ end:
x = ux.f;
if (sy)
y = -y;
- if (ex == ey ||
- (ex + 1 == ey && (2 * x > y || (2 * x == y && q % 2)))) {
+ if (ex == ey || (ex + 1 == ey && (2 * x > y || (2 * x == y && q % 2)))) {
x -= y;
q++;
}
diff --git a/lib/libm/remquol.c b/lib/libm/remquol.c
index 1a58f2d3..906bb58d 100644
--- a/lib/libm/remquol.c
+++ b/lib/libm/remquol.c
@@ -103,8 +103,7 @@ long double remquol(long double x, long double y, int *quo)
if ((xhi | xlo) == 0)
ex = -120;
else
- for (; xhi >> 48 == 0;
- xhi = 2 * xhi + (xlo >> 63), xlo = 2 * xlo, ex--)
+ for (; xhi >> 48 == 0; xhi = 2 * xhi + (xlo >> 63), xlo = 2 * xlo, ex--)
;
ux.i2.hi = xhi;
ux.i2.lo = xlo;
@@ -120,8 +119,7 @@ long double remquol(long double x, long double y, int *quo)
x = ux.f;
if (sy)
y = -y;
- if (ex == ey ||
- (ex + 1 == ey && (2 * x > y || (2 * x == y && q % 2)))) {
+ if (ex == ey || (ex + 1 == ey && (2 * x > y || (2 * x == y && q % 2)))) {
x -= y;
q++;
}
diff --git a/lib/libm/sin.c b/lib/libm/sin.c
index 4eff1001..24be2599 100644
--- a/lib/libm/sin.c
+++ b/lib/libm/sin.c
@@ -59,8 +59,7 @@ double sin(double x)
if (ix <= 0x3fe921fb) {
if (ix < 0x3e500000) { /* |x| < 2**-26 */
/* raise inexact if x != 0 and underflow if subnormal*/
- FORCE_EVAL(ix < 0x00100000 ? x / 0x1p120f :
- x + 0x1p120f);
+ FORCE_EVAL(ix < 0x00100000 ? x / 0x1p120f : x + 0x1p120f);
return x;
}
return __sin(x, 0.0, 0);
diff --git a/lib/libm/sincos.c b/lib/libm/sincos.c
index c7300d7b..6ffbe06e 100644
--- a/lib/libm/sincos.c
+++ b/lib/libm/sincos.c
@@ -29,8 +29,7 @@ void sincos(double x, double *sin, double *cos)
/* if |x| < 2**-27 * sqrt(2) */
if (ix < 0x3e46a09e) {
/* raise inexact if x!=0 and underflow if subnormal */
- FORCE_EVAL(ix < 0x00100000 ? x / 0x1p120f :
- x + 0x1p120f);
+ FORCE_EVAL(ix < 0x00100000 ? x / 0x1p120f : x + 0x1p120f);
*sin = x;
*cos = 1.0;
return;
diff --git a/lib/libm/sincosf.c b/lib/libm/sincosf.c
index ea4bc567..089c4aa8 100644
--- a/lib/libm/sincosf.c
+++ b/lib/libm/sincosf.c
@@ -42,8 +42,7 @@ void sincosf(float x, float *sin, float *cos)
/* |x| < 2**-12 */
if (ix < 0x39800000) {
/* raise inexact if x!=0 and underflow if subnormal */
- FORCE_EVAL(ix < 0x00100000 ? x / 0x1p120f :
- x + 0x1p120f);
+ FORCE_EVAL(ix < 0x00100000 ? x / 0x1p120f : x + 0x1p120f);
*sin = x;
*cos = 1.0f;
return;
diff --git a/lib/libm/sinf.c b/lib/libm/sinf.c
index 28513976..e1a3209d 100644
--- a/lib/libm/sinf.c
+++ b/lib/libm/sinf.c
@@ -38,8 +38,7 @@ float sinf(float x)
if (ix <= 0x3f490fda) { /* |x| ~<= pi/4 */
if (ix < 0x39800000) { /* |x| < 2**-12 */
/* raise inexact if x!=0 and underflow if subnormal */
- FORCE_EVAL(ix < 0x00800000 ? x / 0x1p120f :
- x + 0x1p120f);
+ FORCE_EVAL(ix < 0x00800000 ? x / 0x1p120f : x + 0x1p120f);
return x;
}
return __sindf(x);
diff --git a/lib/libm/sinhl.c b/lib/libm/sinhl.c
index fa35e870..0cfdeecc 100644
--- a/lib/libm/sinhl.c
+++ b/lib/libm/sinhl.c
@@ -23,8 +23,7 @@ long double sinhl(long double x)
absx = u.f;
/* |x| < log(LDBL_MAX) */
- if (ex < 0x3fff + 13 ||
- (ex == 0x3fff + 13 && u.i.m >> 32 < 0xb17217f7)) {
+ if (ex < 0x3fff + 13 || (ex == 0x3fff + 13 && u.i.m >> 32 < 0xb17217f7)) {
t = expm1l(absx);
if (ex < 0x3fff) {
if (ex < 0x3fff - 32)
diff --git a/lib/libm/sqrt_data.c b/lib/libm/sqrt_data.c
index 4dc20a17..10a091af 100644
--- a/lib/libm/sqrt_data.c
+++ b/lib/libm/sqrt_data.c
@@ -3,19 +3,14 @@
#include <stdint.h> // for uint16_t
const uint16_t __rsqrt_tab[128] = {
- 0xb451, 0xb2f0, 0xb196, 0xb044, 0xaef9, 0xadb6, 0xac79, 0xab43, 0xaa14,
- 0xa8eb, 0xa7c8, 0xa6aa, 0xa592, 0xa480, 0xa373, 0xa26b, 0xa168, 0xa06a,
- 0x9f70, 0x9e7b, 0x9d8a, 0x9c9d, 0x9bb5, 0x9ad1, 0x99f0, 0x9913, 0x983a,
- 0x9765, 0x9693, 0x95c4, 0x94f8, 0x9430, 0x936b, 0x92a9, 0x91ea, 0x912e,
- 0x9075, 0x8fbe, 0x8f0a, 0x8e59, 0x8daa, 0x8cfe, 0x8c54, 0x8bac, 0x8b07,
- 0x8a64, 0x89c4, 0x8925, 0x8889, 0x87ee, 0x8756, 0x86c0, 0x862b, 0x8599,
- 0x8508, 0x8479, 0x83ec, 0x8361, 0x82d8, 0x8250, 0x81c9, 0x8145, 0x80c2,
- 0x8040, 0xff02, 0xfd0e, 0xfb25, 0xf947, 0xf773, 0xf5aa, 0xf3ea, 0xf234,
- 0xf087, 0xeee3, 0xed47, 0xebb3, 0xea27, 0xe8a3, 0xe727, 0xe5b2, 0xe443,
- 0xe2dc, 0xe17a, 0xe020, 0xdecb, 0xdd7d, 0xdc34, 0xdaf1, 0xd9b3, 0xd87b,
- 0xd748, 0xd61a, 0xd4f1, 0xd3cd, 0xd2ad, 0xd192, 0xd07b, 0xcf69, 0xce5b,
- 0xcd51, 0xcc4a, 0xcb48, 0xca4a, 0xc94f, 0xc858, 0xc764, 0xc674, 0xc587,
- 0xc49d, 0xc3b7, 0xc2d4, 0xc1f4, 0xc116, 0xc03c, 0xbf65, 0xbe90, 0xbdbe,
- 0xbcef, 0xbc23, 0xbb59, 0xba91, 0xb9cc, 0xb90a, 0xb84a, 0xb78c, 0xb6d0,
- 0xb617, 0xb560,
+ 0xb451, 0xb2f0, 0xb196, 0xb044, 0xaef9, 0xadb6, 0xac79, 0xab43, 0xaa14, 0xa8eb, 0xa7c8, 0xa6aa, 0xa592,
+ 0xa480, 0xa373, 0xa26b, 0xa168, 0xa06a, 0x9f70, 0x9e7b, 0x9d8a, 0x9c9d, 0x9bb5, 0x9ad1, 0x99f0, 0x9913,
+ 0x983a, 0x9765, 0x9693, 0x95c4, 0x94f8, 0x9430, 0x936b, 0x92a9, 0x91ea, 0x912e, 0x9075, 0x8fbe, 0x8f0a,
+ 0x8e59, 0x8daa, 0x8cfe, 0x8c54, 0x8bac, 0x8b07, 0x8a64, 0x89c4, 0x8925, 0x8889, 0x87ee, 0x8756, 0x86c0,
+ 0x862b, 0x8599, 0x8508, 0x8479, 0x83ec, 0x8361, 0x82d8, 0x8250, 0x81c9, 0x8145, 0x80c2, 0x8040, 0xff02,
+ 0xfd0e, 0xfb25, 0xf947, 0xf773, 0xf5aa, 0xf3ea, 0xf234, 0xf087, 0xeee3, 0xed47, 0xebb3, 0xea27, 0xe8a3,
+ 0xe727, 0xe5b2, 0xe443, 0xe2dc, 0xe17a, 0xe020, 0xdecb, 0xdd7d, 0xdc34, 0xdaf1, 0xd9b3, 0xd87b, 0xd748,
+ 0xd61a, 0xd4f1, 0xd3cd, 0xd2ad, 0xd192, 0xd07b, 0xcf69, 0xce5b, 0xcd51, 0xcc4a, 0xcb48, 0xca4a, 0xc94f,
+ 0xc858, 0xc764, 0xc674, 0xc587, 0xc49d, 0xc3b7, 0xc2d4, 0xc1f4, 0xc116, 0xc03c, 0xbf65, 0xbe90, 0xbdbe,
+ 0xbcef, 0xbc23, 0xbb59, 0xba91, 0xb9cc, 0xb90a, 0xb84a, 0xb78c, 0xb6d0, 0xb617, 0xb560,
};
diff --git a/lib/libm/sqrtl.c b/lib/libm/sqrtl.c
index d71d455e..7afc601c 100644
--- a/lib/libm/sqrtl.c
+++ b/lib/libm/sqrtl.c
@@ -150,8 +150,7 @@ static inline u128 mul64_128(uint64_t a, uint64_t b)
uint64_t alo = a & 0xffffffff;
uint64_t bhi = b >> 32;
uint64_t blo = b & 0xffffffff;
- uint64_t lo1 = ((ahi * blo) & 0xffffffff) + ((alo * bhi) & 0xffffffff) +
- (alo * blo >> 32);
+ uint64_t lo1 = ((ahi * blo) & 0xffffffff) + ((alo * bhi) & 0xffffffff) + (alo * blo >> 32);
uint64_t lo2 = (alo * blo) & 0xffffffff;
r.hi = ahi * bhi + (ahi * blo >> 32) + (alo * bhi >> 32) + (lo1 >> 32);
r.lo = (lo1 << 32) + lo2;
@@ -243,8 +242,7 @@ long double sqrtl(long double x)
long double y;
u128 d2, d1, d0;
- d0 = sub128(lsh(ml, 2 * (LDBL_MANT_DIG - 1) - 126),
- mul128_tail(sl, sl));
+ d0 = sub128(lsh(ml, 2 * (LDBL_MANT_DIG - 1) - 126), mul128_tail(sl, sl));
d1 = sub128(sl, d0);
d2 = add128(add64(sl, 1), d1);
sl = add64(sl, d1.hi >> 63);
diff --git a/lib/libm/tan.c b/lib/libm/tan.c
index 5f37becc..aa3015b5 100644
--- a/lib/libm/tan.c
+++ b/lib/libm/tan.c
@@ -57,8 +57,7 @@ double tan(double x)
if (ix <= 0x3fe921fb) {
if (ix < 0x3e400000) { /* |x| < 2**-27 */
/* raise inexact if x!=0 and underflow if subnormal */
- FORCE_EVAL(ix < 0x00100000 ? x / 0x1p120f :
- x + 0x1p120f);
+ FORCE_EVAL(ix < 0x00100000 ? x / 0x1p120f : x + 0x1p120f);
return x;
}
return __tan(x, 0.0, 0);
diff --git a/lib/libm/tanf.c b/lib/libm/tanf.c
index f005908f..9de9ee57 100644
--- a/lib/libm/tanf.c
+++ b/lib/libm/tanf.c
@@ -39,8 +39,7 @@ float tanf(float x)
if (ix <= 0x3f490fda) { /* |x| ~<= pi/4 */
if (ix < 0x39800000) { /* |x| < 2**-12 */
/* raise inexact if x!=0 and underflow if subnormal */
- FORCE_EVAL(ix < 0x00800000 ? x / 0x1p120f :
- x + 0x1p120f);
+ FORCE_EVAL(ix < 0x00800000 ? x / 0x1p120f : x + 0x1p120f);
return x;
}
return __tandf(x, 0);
diff --git a/lib/libm/tgamma.c b/lib/libm/tgamma.c
index 69759fd8..b72ede42 100644
--- a/lib/libm/tgamma.c
+++ b/lib/libm/tgamma.c
@@ -62,23 +62,16 @@ static double sinpi(double x)
// static const double g = 6.024680040776729583740234375;
static const double gmhalf = 5.524680040776729583740234375;
static const double Snum[N + 1] = {
- 23531376880.410759688572007674451636754734846804940,
- 42919803642.649098768957899047001988850926355848959,
- 35711959237.355668049440185451547166705960488635843,
- 17921034426.037209699919755754458931112671403265390,
- 6039542586.3520280050642916443072979210699388420708,
- 1439720407.3117216736632230727949123939715485786772,
- 248874557.86205415651146038641322942321632125127801,
- 31426415.585400194380614231628318205362874684987640,
- 2876370.6289353724412254090516208496135991145378768,
- 186056.26539522349504029498971604569928220784236328,
- 8071.6720023658162106380029022722506138218516325024,
- 210.82427775157934587250973392071336271166969580291,
+ 23531376880.410759688572007674451636754734846804940, 42919803642.649098768957899047001988850926355848959,
+ 35711959237.355668049440185451547166705960488635843, 17921034426.037209699919755754458931112671403265390,
+ 6039542586.3520280050642916443072979210699388420708, 1439720407.3117216736632230727949123939715485786772,
+ 248874557.86205415651146038641322942321632125127801, 31426415.585400194380614231628318205362874684987640,
+ 2876370.6289353724412254090516208496135991145378768, 186056.26539522349504029498971604569928220784236328,
+ 8071.6720023658162106380029022722506138218516325024, 210.82427775157934587250973392071336271166969580291,
2.5066282746310002701649081771338373386264310793408,
};
static const double Sden[N + 1] = {
- 0, 39916800, 120543840, 150917976, 105258076, 45995730, 13339535,
- 2637558, 357423, 32670, 1925, 66, 1,
+ 0, 39916800, 120543840, 150917976, 105258076, 45995730, 13339535, 2637558, 357423, 32670, 1925, 66, 1,
};
/* n! for small integer n */
static const double fact[] = {
diff --git a/lib/libm/tgammal.c b/lib/libm/tgammal.c
index 54270091..ead0f69d 100644
--- a/lib/libm/tgammal.c
+++ b/lib/libm/tgammal.c
@@ -68,17 +68,14 @@ Peak error = 1.83e-20
Relative error spread = 8.4e-23
*/
static const long double P[8] = {
- 4.212760487471622013093E-5L, 4.542931960608009155600E-4L,
- 4.092666828394035500949E-3L, 2.385363243461108252554E-2L,
- 1.113062816019361559013E-1L, 3.629515436640239168939E-1L,
+ 4.212760487471622013093E-5L, 4.542931960608009155600E-4L, 4.092666828394035500949E-3L,
+ 2.385363243461108252554E-2L, 1.113062816019361559013E-1L, 3.629515436640239168939E-1L,
8.378004301573126728826E-1L, 1.000000000000000000009E0L,
};
static const long double Q[9] = {
- -1.397148517476170440917E-5L, 2.346584059160635244282E-4L,
- -1.237799246653152231188E-3L, -7.955933682494738320586E-4L,
- 2.773706565840072979165E-2L, -4.633887671244534213831E-2L,
- -2.243510905670329164562E-1L, 4.150160950588455434583E-1L,
- 9.999999999999999999908E-1L,
+ -1.397148517476170440917E-5L, 2.346584059160635244282E-4L, -1.237799246653152231188E-3L,
+ -7.955933682494738320586E-4L, 2.773706565840072979165E-2L, -4.633887671244534213831E-2L,
+ -2.243510905670329164562E-1L, 4.150160950588455434583E-1L, 9.999999999999999999908E-1L,
};
/*
@@ -117,11 +114,9 @@ Peak error = 9.44e-21
Relative error spread = 8.8e-4
*/
static const long double STIR[9] = {
- 7.147391378143610789273E-4L, -2.363848809501759061727E-5L,
- -5.950237554056330156018E-4L, 6.989332260623193171870E-5L,
- 7.840334842744753003862E-4L, -2.294719747873185405699E-4L,
- -2.681327161876304418288E-3L, 3.472222222230075327854E-3L,
- 8.333333333333331800504E-2L,
+ 7.147391378143610789273E-4L, -2.363848809501759061727E-5L, -5.950237554056330156018E-4L,
+ 6.989332260623193171870E-5L, 7.840334842744753003862E-4L, -2.294719747873185405699E-4L,
+ -2.681327161876304418288E-3L, 3.472222222230075327854E-3L, 8.333333333333331800504E-2L,
};
#define MAXSTIR 1024.0L
@@ -133,11 +128,9 @@ static const long double SQTPI = 2.50662827463100050242E0L;
* Peak relative error 4.2e-23
*/
static const long double S[9] = {
- -1.193945051381510095614E-3L, 7.220599478036909672331E-3L,
- -9.622023360406271645744E-3L, -4.219773360705915470089E-2L,
- 1.665386113720805206758E-1L, -4.200263503403344054473E-2L,
- -6.558780715202540684668E-1L, 5.772156649015328608253E-1L,
- 1.000000000000000000000E0L,
+ -1.193945051381510095614E-3L, 7.220599478036909672331E-3L, -9.622023360406271645744E-3L,
+ -4.219773360705915470089E-2L, 1.665386113720805206758E-1L, -4.200263503403344054473E-2L,
+ -6.558780715202540684668E-1L, 5.772156649015328608253E-1L, 1.000000000000000000000E0L,
};
/* 1/tgamma(-x) = z P(z)
@@ -147,11 +140,9 @@ static const long double S[9] = {
* Relative error spread = 2.5e-24
*/
static const long double SN[9] = {
- 1.133374167243894382010E-3L, 7.220837261893170325704E-3L,
- 9.621911155035976733706E-3L, -4.219773343731191721664E-2L,
- -1.665386113944413519335E-1L, -4.200263503402112910504E-2L,
- 6.558780715202536547116E-1L, 5.772156649015328608727E-1L,
- -1.000000000000000000000E0L,
+ 1.133374167243894382010E-3L, 7.220837261893170325704E-3L, 9.621911155035976733706E-3L,
+ -4.219773343731191721664E-2L, -1.665386113944413519335E-1L, -4.200263503402112910504E-2L,
+ 6.558780715202536547116E-1L, 5.772156649015328608727E-1L, -1.000000000000000000000E0L,
};
static const long double PIL = 3.1415926535897932384626L;
@@ -166,10 +157,7 @@ static long double stirf(long double x)
/* For large x, use rational coefficients from the analytical expansion.
*/
if (x > 1024.0)
- w = (((((6.97281375836585777429E-5L * w +
- 7.84039221720066627474E-4L) *
- w -
- 2.29472093621399176955E-4L) *
+ w = (((((6.97281375836585777429E-5L * w + 7.84039221720066627474E-4L) * w - 2.29472093621399176955E-4L) *
w -
2.68132716049382716049E-3L) *
w +
diff --git a/makefile b/makefile
index c6dac4cb..a99129e9 100644
--- a/makefile
+++ b/makefile
@@ -76,7 +76,7 @@ KBUILD_CFLAGS += -ffreestanding
KBUILD_CFLAGS += -I$(srctree)/include
KBUILD_CFLAGS += -I$(srctree)/include/arch/$(ARCH)
-KBUILD_CFLAGS += -std=c11
+KBUILD_CFLAGS += -std=c23
KBUILD_CFLAGS += -fno-common
KBUILD_CFLAGS += -fno-PIE
KBUILD_CFLAGS += -fstrict-aliasing
diff --git a/notes b/notes
deleted file mode 100644
index e2bb2455..00000000
--- a/notes
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-in libc we need to init .tdata and .tbss
diff --git a/tests/headers/aio.c b/tests/headers/aio.c
deleted file mode 100644
index eabdf4be..00000000
--- a/tests/headers/aio.c
+++ /dev/null
@@ -1,36 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/aio.h.html
-
-#include "core.h"
-
-#include <aio.h>
-
-TEST(aio_h)
-{
- MACRO_VALUE(AIO_CANCELED, 0);
- MACRO_VALUE(AIO_NOTCANCELED, 1);
- MACRO_VALUE(AIO_ALLDONE, 2);
-
- MACRO_VALUE(LIO_READ, 0);
- MACRO_VALUE(LIO_WRITE, 1);
- MACRO_VALUE(LIO_NOP, 2);
-
- MACRO_VALUE(LIO_WAIT, 0);
- MACRO_VALUE(LIO_NOWAIT, 1);
-
- TYPE(off_t);
- TYPE(size_t);
- TYPE(ssize_t);
- TYPE(struct aiocb);
- TYPE(struct sigevent);
- TYPE(struct timespec);
-
- FUNCTION(aio_cancel, int (*_)(int, struct aiocb *));
- FUNCTION(aio_error, int (*_)(const struct aiocb *));
- FUNCTION(aio_fsync, int (*_)(int, struct aiocb *));
- FUNCTION(aio_read, int (*_)(struct aiocb *));
- FUNCTION(aio_return, ssize_t(*_)(struct aiocb *));
- FUNCTION(aio_suspend, int (*_)(const struct aiocb *const[], int,
- const struct timespec *));
- FUNCTION(lio_listio, int (*_)(int, struct aiocb *restrict const[], int,
- struct sigevent *restrict));
-}
diff --git a/tests/headers/arpa_inet.c b/tests/headers/arpa_inet.c
deleted file mode 100644
index b5a5c33a..00000000
--- a/tests/headers/arpa_inet.c
+++ /dev/null
@@ -1,30 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/arpa_inet.h.html
-
-#include "core.h"
-
-#include <arpa/inet.h>
-
-TEST(arpa_inet_h)
-{
- TYPE(in_port_t);
- TYPE(in_addr_t);
-
- TYPE(struct in_addr);
-
- MACRO(INET_ADDRSTRLEN);
- MACRO(INET6_ADDRSTRLEN);
-
- FUNCTION(htonl, FN(uint32_t, uint32_t))
- FUNCTION(htons, FN(uint16_t, uint16_t))
- FUNCTION(ntohl, FN(uint32_t, uint32_t))
- FUNCTION(ntohs, FN(uint16_t, uint16_t))
-
- TYPE(uint32_t);
- TYPE(uint16_t);
-
- FUNCTION(inet_addr, FN(in_addr_t, const char *))
- FUNCTION(inet_ntoa, FN(char *, struct in_addr))
- FUNCTION(inet_ntop, FN(const char *, int, const void *restrict,
- char *restrict, socklen_t));
- FUNCTION(inet_pton, FN(int, int, const char *restrict, void *restrict))
-}
diff --git a/tests/headers/assert.c b/tests/headers/assert.c
deleted file mode 100644
index 13ee506c..00000000
--- a/tests/headers/assert.c
+++ /dev/null
@@ -1,15 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/assert.h.html
-
-#include "core.h"
-
-#define NDEBUG
-#include <assert.h>
-#ifndef assert
-#error
-#endif
-
-#undef NDEBUG
-#include <assert.h>
-#ifndef assert
-#error
-#endif
diff --git a/tests/headers/complex.c b/tests/headers/complex.c
deleted file mode 100644
index 054d25ac..00000000
--- a/tests/headers/complex.c
+++ /dev/null
@@ -1,117 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/complex.h.html
-
-#include "core.h"
-
-#include <complex.h>
-
-#ifndef complex
-#error complex
-#endif
-
-#ifndef _Complex_I
-#error _Complex_I
-#endif
-
-#ifndef imaginary
-#error imaginary
-#endif
-
-#ifndef _Imaginary_I
-#error _Imaginary_I
-#endif
-
-#if !defined(I)
-#error I
-#endif
-
-TEST(complex_h)
-{
- FUNCTION(cabs, double (*f)(double complex));
- FUNCTION(cabsf, float (*f)(float complex));
- FUNCTION(cabsl, long double (*f)(long double complex));
-
- FUNCTION(cacos, double complex (*f)(double complex));
- FUNCTION(cacosf, float complex (*f)(float complex));
- FUNCTION(cacosl, long double complex (*f)(long double complex));
-
- FUNCTION(cacosh, double complex (*f)(double complex));
- FUNCTION(cacoshf, float complex (*f)(float complex));
- FUNCTION(cacoshl, long double complex (*f)(long double complex));
-
- FUNCTION(carg, double (*f)(double complex));
- FUNCTION(cargf, float (*f)(float complex));
- FUNCTION(cargl, long double (*f)(long double complex));
-
- FUNCTION(casin, double complex (*f)(double complex));
- FUNCTION(casinf, float complex (*f)(float complex));
- FUNCTION(casinl, long double complex (*f)(long double complex));
-
- FUNCTION(casinh, double complex (*f)(double complex));
- FUNCTION(casinhf, float complex (*f)(float complex));
- FUNCTION(casinhl, long double complex (*f)(long double complex));
-
- FUNCTION(catan, double complex (*f)(double complex));
- FUNCTION(catanf, float complex (*f)(float complex));
- FUNCTION(catanl, long double complex (*f)(long double complex));
-
- FUNCTION(catanh, double complex (*f)(double complex));
- FUNCTION(catanhf, float complex (*f)(float complex));
- FUNCTION(catanhl, long double complex (*f)(long double complex));
-
- FUNCTION(ccos, double complex (*f)(double complex));
- FUNCTION(ccosf, float complex (*f)(float complex));
- FUNCTION(ccosl, long double complex (*f)(long double complex));
-
- FUNCTION(ccosh, double complex (*f)(double complex));
- FUNCTION(ccoshf, float complex (*f)(float complex));
- FUNCTION(ccoshl, long double complex (*f)(long double complex));
-
- FUNCTION(cexp, double complex (*f)(double complex));
- FUNCTION(cexpf, float complex (*f)(float complex));
- FUNCTION(cexpl, long double complex (*f)(long double complex));
-
- FUNCTION(cimag, double (*f)(double complex));
- FUNCTION(cimagf, float (*f)(float complex));
- FUNCTION(cimagl, long double (*f)(long double complex));
-
- FUNCTION(clog, double complex (*f)(double complex));
- FUNCTION(clogf, float complex (*f)(float complex));
- FUNCTION(clogl, long double complex (*f)(long double complex));
-
- FUNCTION(conj, double complex (*f)(double complex));
- FUNCTION(conjf, float complex (*f)(float complex));
- FUNCTION(conjl, long double complex (*f)(long double complex));
-
- FUNCTION(cpow, double complex (*f)(double complex, double complex));
- FUNCTION(cpowf, float complex (*f)(float complex, float complex));
- FUNCTION(cpowl, long double complex (*f)(long double complex,
- long double complex));
-
- FUNCTION(cproj, double complex (*f)(double complex));
- FUNCTION(cprojf, float complex (*f)(float complex));
- FUNCTION(cprojl, long double complex (*f)(long double complex));
-
- FUNCTION(creal, double (*f)(double complex));
- FUNCTION(crealf, float (*f)(float complex));
- FUNCTION(creall, long double (*f)(long double complex));
-
- FUNCTION(csin, double complex (*f)(double complex));
- FUNCTION(csinf, float complex (*f)(float complex));
- FUNCTION(csinl, long double complex (*f)(long double complex));
-
- FUNCTION(csinh, double complex (*f)(double complex));
- FUNCTION(csinhf, float complex (*f)(float complex));
- FUNCTION(csinhl, long double complex (*f)(long double complex));
-
- FUNCTION(csqrt, double complex (*f)(double complex));
- FUNCTION(csqrtf, float complex (*f)(float complex));
- FUNCTION(csqrtl, long double complex (*f)(long double complex));
-
- FUNCTION(ctan, double complex (*f)(double complex));
- FUNCTION(ctanf, float complex (*f)(float complex));
- FUNCTION(ctanl, long double complex (*f)(long double complex));
-
- FUNCTION(ctanh, double complex (*f)(double complex));
- FUNCTION(ctanhf, float complex (*f)(float complex));
- FUNCTION(ctanhl, long double complex (*f)(long double complex));
-}
diff --git a/tests/headers/core.h b/tests/headers/core.h
deleted file mode 100644
index 01c6aa5e..00000000
--- a/tests/headers/core.h
+++ /dev/null
@@ -1,54 +0,0 @@
-#define FN(__r, ...) __r (*_)(__VA_ARGS__)
-
-#define FUNCTION(__f, __t) \
- { \
- __t = __f; \
- }
-
-#define MACRO(__m) \
- { \
- typeof(__m) v = __m; \
- }
-
-#define MACRO_VALUE(__m, __v) _Static_assert(__m == __v, #__m)
-
-#define MACRO_VALUE_STRING(__m, __v) \
- do { \
- (void)sizeof( \
- char[(__builtin_strcmp(__m, __v) == 0) ? 1 : -1]); \
- } while (0)
-
-#define MACRO_TYPE(__t, __m) \
- { \
- __t v = __m; \
- }
-
-#define TYPE(__t) \
- { \
- __t v; \
- }
-
-#define INCOMPLETE_TYPE(__t) \
- { \
- __t *v; \
- }
-
-#define STRUCT_MEMBER(__s, __t, __n) \
- { \
- __s s; \
- __t *_ = &(s.__n); \
- }
-
-#define STRUCT_MEMBER_ARRAY(__s, __t, __n) \
- { \
- __s s; \
- __t *p = &(s.__n[0]); \
- }
-
-#define STRUCT_MEMBER_FUNCTION_POINTER(__s, __t, __n) \
- { \
- __s s; \
- __t = (s.__n); \
- }
-
-#define TEST(__name) static void __name(void)
diff --git a/tests/headers/cpio.c b/tests/headers/cpio.c
deleted file mode 100644
index da30327f..00000000
--- a/tests/headers/cpio.c
+++ /dev/null
@@ -1,38 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/cpio.h.html
-
-#include "core.h"
-
-#include <cpio.h>
-
-#ifndef MAGIC
-#error MAGIC
-#endif
-
-TEST(cpio_h)
-{
- MACRO_VALUE(C_IRUSR, 0400);
- MACRO_VALUE(C_IWUSR, 0200);
- MACRO_VALUE(C_IXUSR, 0100);
-
- MACRO_VALUE(C_IRGRP, 040);
- MACRO_VALUE(C_IWGRP, 020);
- MACRO_VALUE(C_IXGRP, 010);
-
- MACRO_VALUE(C_IROTH, 04);
- MACRO_VALUE(C_IWOTH, 02);
- MACRO_VALUE(C_IXOTH, 01);
-
- MACRO_VALUE(C_ISUID, 04000);
- MACRO_VALUE(C_ISGID, 02000);
- MACRO_VALUE(C_ISVTX, 01000);
-
- MACRO_VALUE(C_ISDIR, 040000);
- MACRO_VALUE(C_ISFIFO, 010000);
- MACRO_VALUE(C_ISREG, 0100000);
- MACRO_VALUE(C_ISBLK, 060000);
- MACRO_VALUE(C_ISCHR, 020000);
-
- MACRO_VALUE(C_ISCTG, 0110000);
- MACRO_VALUE(C_ISLNK, 0120000);
- MACRO_VALUE(C_ISSOCK, 0140000);
-}
diff --git a/tests/headers/ctype.c b/tests/headers/ctype.c
deleted file mode 100644
index 86ae02a8..00000000
--- a/tests/headers/ctype.c
+++ /dev/null
@@ -1,35 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/ctype.h.html
-
-#include "core.h"
-
-#include <ctype.h>
-
-TEST(ctype_h)
-{
- TYPE(locale_t);
-
- FUNCTION(isalnum, int (*f)(int));
- FUNCTION(isalnum_l, int (*f)(int, locale_t));
- FUNCTION(isalpha, int (*f)(int));
- FUNCTION(isalpha_l, int (*f)(int, locale_t));
- FUNCTION(isblank, int (*f)(int));
- FUNCTION(isblank_l, int (*f)(int, locale_t));
- FUNCTION(iscntrl, int (*f)(int));
- FUNCTION(iscntrl_l, int (*f)(int, locale_t));
- FUNCTION(isdigit, int (*f)(int));
- FUNCTION(isdigit_l, int (*f)(int, locale_t));
- FUNCTION(isgraph, int (*f)(int));
- FUNCTION(isgraph_l, int (*f)(int, locale_t));
- FUNCTION(islower, int (*f)(int));
- FUNCTION(islower_l, int (*f)(int, locale_t));
- FUNCTION(isprint, int (*f)(int));
- FUNCTION(isprint_l, int (*f)(int, locale_t));
- FUNCTION(ispunct, int (*f)(int));
- FUNCTION(ispunct_l, int (*f)(int, locale_t));
- FUNCTION(isspace, int (*f)(int));
- FUNCTION(isspace_l, int (*f)(int, locale_t));
- FUNCTION(isupper, int (*f)(int));
- FUNCTION(isupper_l, int (*f)(int, locale_t));
- FUNCTION(isxdigit, int (*f)(int));
- FUNCTION(isxdigit_l, int (*f)(int, locale_t));
-}
diff --git a/tests/headers/devctl.c b/tests/headers/devctl.c
deleted file mode 100644
index cf40ac37..00000000
--- a/tests/headers/devctl.c
+++ /dev/null
@@ -1,13 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/devctl.h.html
-
-#include "core.h"
-
-#include <devctl.h>
-
-TEST(devctl_h)
-{
- TYPE(size_t);
-
- FUNCTION(posix_devctl,
- FN(int, int, int, void *restrict, size_t, int *restrict));
-}
diff --git a/tests/headers/dirent.c b/tests/headers/dirent.c
deleted file mode 100644
index 6001a558..00000000
--- a/tests/headers/dirent.c
+++ /dev/null
@@ -1,57 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/dirent.h.html
-
-#include "core.h"
-
-#include <dirent.h>
-
-TEST(dirent_h)
-{
- TYPE(ino_t);
- TYPE(size_t);
- TYPE(ssize_t);
- TYPE(reclen_t);
-
- INCOMPLETE_TYPE(DIR);
-
- TYPE(struct dirent);
- STRUCT_MEMBER(struct dirent, ino_t, d_ino);
- STRUCT_MEMBER_ARRAY(struct dirent, char, d_name);
-
- TYPE(struct posix_dent);
- STRUCT_MEMBER(struct posix_dent, ino_t, d_ino);
- STRUCT_MEMBER(struct posix_dent, reclen_t, d_reclen);
- STRUCT_MEMBER(struct posix_dent, unsigned char, d_type);
- STRUCT_MEMBER_ARRAY(struct posix_dent, char, d_name);
-
- MACRO_VALUE(DT_BLK, 0x6);
- MACRO_VALUE(DT_CHR, 0x2);
- MACRO_VALUE(DT_DIR, 0x4);
- MACRO_VALUE(DT_FIFO, 0x1);
- MACRO_VALUE(DT_LNK, 0xa);
- MACRO_VALUE(DT_REG, 0x8);
- MACRO_VALUE(DT_SOCK, 0xc);
- MACRO_VALUE(DT_UNKNOWN, 0x0);
-
- MACRO_VALUE(DT_MQ, 0xe);
- MACRO_VALUE(DT_SEM, 0x10);
- MACRO_VALUE(DT_SHM, 0x12);
- MACRO_VALUE(DT_TMO, 0x14);
-
- FUNCTION(alphasort,
- FN(int, const struct dirent **, const struct dirent **));
- FUNCTION(closedir, FN(int, DIR *));
- FUNCTION(dirfd, FN(int, DIR *));
- FUNCTION(fdopendir, FN(DIR *, int));
- FUNCTION(opendir, FN(DIR *, const char *));
- FUNCTION(posix_getdents, FN(ssize_t, int, void *, size_t, int));
- FUNCTION(readdir, FN(struct dirent *, DIR *));
- FUNCTION(readdir_r, FN(int, DIR *restrict, struct dirent *restrict,
- struct dirent **restrict));
- FUNCTION(rewinddir, FN(void, DIR *));
- FUNCTION(scandir,
- FN(int, const char *, struct dirent ***,
- int (*)(const struct dirent *),
- int (*)(const struct dirent **, const struct dirent **)));
- FUNCTION(seekdir, FN(void, DIR *, long));
- FUNCTION(telldir, FN(long, DIR *));
-}
diff --git a/tests/headers/dlfcn.c b/tests/headers/dlfcn.c
deleted file mode 100644
index 0a1242d2..00000000
--- a/tests/headers/dlfcn.c
+++ /dev/null
@@ -1,26 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/dlfcn.h.html
-
-#include "core.h"
-
-#include <dlfcn.h>
-
-TEST(dlfcn_h)
-{
- TYPE(Dl_info_t);
-
- STRUCT_MEMBER(Dl_info_t, const char *, dli_fname);
- STRUCT_MEMBER(Dl_info_t, void *, dli_fbase);
- STRUCT_MEMBER(Dl_info_t, const char *, dli_sname);
- STRUCT_MEMBER(Dl_info_t, void *, dli_saddr);
-
- MACRO_VALUE(RTLD_LAZY, 1);
- MACRO_VALUE(RTLD_NOW, 2);
- MACRO_VALUE(RTLD_GLOBAL, 256);
- MACRO_VALUE(RTLD_LOCAL, 0);
-
- FUNCTION(dladdr, int (*f)(const void *restrict, Dl_info_t *restrict));
- FUNCTION(dlclose, int (*f)(void *));
- FUNCTION(dlerror, char *(*f)(void));
- FUNCTION(dlopen, void *(*f)(const char *, int));
- FUNCTION(dlsym, void *(*f)(void *restrict, const char *restrict));
-}
diff --git a/tests/headers/endian.c b/tests/headers/endian.c
deleted file mode 100644
index db18c5fc..00000000
--- a/tests/headers/endian.c
+++ /dev/null
@@ -1,32 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/endian.h.html
-
-#include "core.h"
-
-#include <endian.h>
-
-TEST(endian_h)
-{
- MACRO(BYTE_ORDER);
- MACRO(LITTLE_ENDIAN);
- MACRO(BIG_ENDIAN);
-
- FUNCTION(be16toh, FN(uint16_t, uint16_t));
- FUNCTION(be32toh, FN(uint32_t, uint32_t));
- FUNCTION(be64toh, FN(uint64_t, uint64_t));
-
- FUNCTION(htobe16, FN(uint16_t, uint16_t));
- FUNCTION(htobe32, FN(uint32_t, uint32_t));
- FUNCTION(htobe64, FN(uint64_t, uint64_t));
-
- FUNCTION(htole16, FN(uint16_t, uint16_t));
- FUNCTION(htole32, FN(uint32_t, uint32_t));
- FUNCTION(htole64, FN(uint64_t, uint64_t));
-
- FUNCTION(le16toh, FN(uint16_t, uint16_t));
- FUNCTION(le32toh, FN(uint32_t, uint32_t));
- FUNCTION(le64toh, FN(uint64_t, uint64_t));
-
- TYPE(uint16_t);
- TYPE(uint32_t);
- TYPE(uint64_t);
-}
diff --git a/tests/headers/errno.c b/tests/headers/errno.c
deleted file mode 100644
index f04fd1ae..00000000
--- a/tests/headers/errno.c
+++ /dev/null
@@ -1,145 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/errno.h.html
-
-#include "core.h"
-
-#include <errno.h>
-
-TEST(errno_h)
-{
- int e = errno;
-
- MACRO_VALUE(EPERM, 1);
- MACRO_VALUE(ENOENT, 2);
- MACRO_VALUE(ESRCH, 3);
- MACRO_VALUE(EINTR, 4);
- MACRO_VALUE(EIO, 5);
- MACRO_VALUE(ENXIO, 6);
- MACRO_VALUE(E2BIG, 7);
- MACRO_VALUE(ENOEXEC, 8);
- MACRO_VALUE(EBADF, 9);
- MACRO_VALUE(ECHILD, 10);
- MACRO_VALUE(EAGAIN, 11);
- MACRO_VALUE(ENOMEM, 12);
- MACRO_VALUE(EACCES, 13);
- MACRO_VALUE(EFAULT, 14);
- MACRO_VALUE(ENOTBLK, 15);
- MACRO_VALUE(EBUSY, 16);
- MACRO_VALUE(EEXIST, 17);
- MACRO_VALUE(EXDEV, 18);
- MACRO_VALUE(ENODEV, 19);
- MACRO_VALUE(ENOTDIR, 20);
- MACRO_VALUE(EISDIR, 21);
- MACRO_VALUE(EINVAL, 22);
- MACRO_VALUE(ENFILE, 23);
- MACRO_VALUE(EMFILE, 24);
- MACRO_VALUE(ENOTTY, 25);
- MACRO_VALUE(ETXTBSY, 26);
- MACRO_VALUE(EFBIG, 27);
- MACRO_VALUE(ENOSPC, 28);
- MACRO_VALUE(ESPIPE, 29);
- MACRO_VALUE(EROFS, 30);
- MACRO_VALUE(EMLINK, 31);
- MACRO_VALUE(EPIPE, 32);
- MACRO_VALUE(EDOM, 33);
- MACRO_VALUE(ERANGE, 34);
- MACRO_VALUE(EDEADLK, 35);
- MACRO_VALUE(ENAMETOOLONG, 36);
- MACRO_VALUE(ENOLCK, 37);
- MACRO_VALUE(ENOSYS, 38);
- MACRO_VALUE(ENOTEMPTY, 39);
- MACRO_VALUE(ELOOP, 40);
- MACRO_VALUE(EWOULDBLOCK, EAGAIN);
- MACRO_VALUE(ENOMSG, 42);
- MACRO_VALUE(EIDRM, 43);
- MACRO_VALUE(ECHRNG, 44);
- MACRO_VALUE(EL2NSYNC, 45);
- MACRO_VALUE(EL3HLT, 46);
- MACRO_VALUE(EL3RST, 47);
- MACRO_VALUE(ELNRNG, 48);
- MACRO_VALUE(EUNATCH, 49);
- MACRO_VALUE(ENOCSI, 50);
- MACRO_VALUE(EL2HLT, 51);
- MACRO_VALUE(EBADE, 52);
- MACRO_VALUE(EBADR, 53);
- MACRO_VALUE(EXFULL, 54);
- MACRO_VALUE(ENOANO, 55);
- MACRO_VALUE(EBADRQC, 56);
- MACRO_VALUE(EBADSLT, 57);
- MACRO_VALUE(EDEADLOCK, EDEADLK);
- MACRO_VALUE(EBFONT, 59);
- MACRO_VALUE(ENOSTR, 60);
- MACRO_VALUE(ENODATA, 61);
- MACRO_VALUE(ETIME, 62);
- MACRO_VALUE(ENOSR, 63);
- MACRO_VALUE(ENONET, 64);
- MACRO_VALUE(ENOPKG, 65);
- MACRO_VALUE(EREMOTE, 66);
- MACRO_VALUE(ENOLINK, 67);
- MACRO_VALUE(EADV, 68);
- MACRO_VALUE(ESRMNT, 69);
- MACRO_VALUE(ECOMM, 70);
- MACRO_VALUE(EPROTO, 71);
- MACRO_VALUE(EMULTIHOP, 72);
- MACRO_VALUE(EDOTDOT, 73);
- MACRO_VALUE(EBADMSG, 74);
- MACRO_VALUE(EOVERFLOW, 75);
- MACRO_VALUE(ENOTUNIQ, 76);
- MACRO_VALUE(EBADFD, 77);
- MACRO_VALUE(EREMCHG, 78);
- MACRO_VALUE(ELIBACC, 79);
- MACRO_VALUE(ELIBBAD, 80);
- MACRO_VALUE(ELIBSCN, 81);
- MACRO_VALUE(ELIBMAX, 82);
- MACRO_VALUE(ELIBEXEC, 83);
- MACRO_VALUE(EILSEQ, 84);
- MACRO_VALUE(ERESTART, 85);
- MACRO_VALUE(ESTRPIPE, 86);
- MACRO_VALUE(EUSERS, 87);
- MACRO_VALUE(ENOTSOCK, 88);
- MACRO_VALUE(EDESTADDRREQ, 89);
- MACRO_VALUE(EMSGSIZE, 90);
- MACRO_VALUE(EPROTOTYPE, 91);
- MACRO_VALUE(ENOPROTOOPT, 92);
- MACRO_VALUE(EPROTONOSUPPORT, 93);
- MACRO_VALUE(ESOCKTNOSUPPORT, 94);
- MACRO_VALUE(EOPNOTSUPP, 95);
- MACRO_VALUE(ENOTSUP, EOPNOTSUPP);
- MACRO_VALUE(EPFNOSUPPORT, 96);
- MACRO_VALUE(EAFNOSUPPORT, 97);
- MACRO_VALUE(EADDRINUSE, 98);
- MACRO_VALUE(EADDRNOTAVAIL, 99);
- MACRO_VALUE(ENETDOWN, 100);
- MACRO_VALUE(ENETUNREACH, 101);
- MACRO_VALUE(ENETRESET, 102);
- MACRO_VALUE(ECONNABORTED, 103);
- MACRO_VALUE(ECONNRESET, 104);
- MACRO_VALUE(ENOBUFS, 105);
- MACRO_VALUE(EISCONN, 106);
- MACRO_VALUE(ENOTCONN, 107);
- MACRO_VALUE(ESHUTDOWN, 108);
- MACRO_VALUE(ETOOMANYREFS, 109);
- MACRO_VALUE(ETIMEDOUT, 110);
- MACRO_VALUE(ECONNREFUSED, 111);
- MACRO_VALUE(EHOSTDOWN, 112);
- MACRO_VALUE(EHOSTUNREACH, 113);
- MACRO_VALUE(EALREADY, 114);
- MACRO_VALUE(EINPROGRESS, 115);
- MACRO_VALUE(ESTALE, 116);
- MACRO_VALUE(EUCLEAN, 117);
- MACRO_VALUE(ENOTNAM, 118);
- MACRO_VALUE(ENAVAIL, 119);
- MACRO_VALUE(EISNAM, 120);
- MACRO_VALUE(EREMOTEIO, 121);
- MACRO_VALUE(EDQUOT, 122);
- MACRO_VALUE(ENOMEDIUM, 123);
- MACRO_VALUE(EMEDIUMTYPE, 124);
- MACRO_VALUE(ECANCELED, 125);
- MACRO_VALUE(ENOKEY, 126);
- MACRO_VALUE(EKEYEXPIRED, 127);
- MACRO_VALUE(EKEYREVOKED, 128);
- MACRO_VALUE(EKEYREJECTED, 129);
- MACRO_VALUE(EOWNERDEAD, 130);
- MACRO_VALUE(ENOTRECOVERABLE, 131);
- MACRO_VALUE(ERFKILL, 132);
- MACRO_VALUE(EHWPOISON, 133);
-}
diff --git a/tests/headers/fcntl.c b/tests/headers/fcntl.c
deleted file mode 100644
index bccc51c7..00000000
--- a/tests/headers/fcntl.c
+++ /dev/null
@@ -1,86 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/fcntl.h.html
-
-#include "core.h"
-
-#include <fcntl.h>
-
-TEST(fcntl_h)
-{
- TYPE(mode_t);
- TYPE(off_t);
- TYPE(pid_t);
-
- TYPE(struct f_owner_ex);
- STRUCT_MEMBER(struct f_owner_ex, int, type);
- STRUCT_MEMBER(struct f_owner_ex, pid_t, pid);
-
- TYPE(struct flock);
- STRUCT_MEMBER(struct flock, short, l_type);
- STRUCT_MEMBER(struct flock, short, l_whence);
- STRUCT_MEMBER(struct flock, off_t, l_start);
- STRUCT_MEMBER(struct flock, off_t, l_len);
- STRUCT_MEMBER(struct flock, pid_t, l_pid);
-
- MACRO(F_DUPFD);
- MACRO(F_DUPFD_CLOEXEC);
- MACRO(F_GETFD);
- MACRO(F_SETFD);
- MACRO(F_GETFL);
- MACRO(F_SETFL);
- MACRO(F_GETLK);
- MACRO(F_SETLK);
- MACRO(F_SETLKW);
- MACRO(F_GETOWN);
- MACRO(F_SETOWN);
-
- MACRO(FD_CLOEXEC);
-
- MACRO(F_RDLCK);
- MACRO(F_UNLCK);
- MACRO(F_WRLCK);
-
- MACRO(SEEK_SET);
- MACRO(SEEK_CUR);
- MACRO(SEEK_END);
-
- MACRO(O_CLOEXEC);
- MACRO(O_CREAT);
- MACRO(O_DIRECTORY);
- MACRO(O_EXCL);
- MACRO(O_NOCTTY);
- MACRO(O_NOFOLLOW);
- MACRO(O_TRUNC);
- MACRO(O_TTY_INIT);
-
- MACRO(O_APPEND);
- MACRO(O_DSYNC);
- MACRO(O_NONBLOCK);
- MACRO(O_RSYNC);
- MACRO(O_SYNC);
-
- MACRO(O_ACCMODE);
- MACRO(O_EXEC);
- MACRO(O_RDONLY);
- MACRO(O_RDWR);
- MACRO(O_SEARCH);
- MACRO(O_WRONLY);
-
- MACRO(AT_FDCWD);
- MACRO(AT_EACCESS);
- MACRO(AT_SYMLINK_NOFOLLOW);
- MACRO(AT_REMOVEDIR);
-
- MACRO(POSIX_FADV_DONTNEED);
- MACRO(POSIX_FADV_NOREUSE);
- MACRO(POSIX_FADV_NORMAL);
- MACRO(POSIX_FADV_RANDOM);
- MACRO(POSIX_FADV_SEQUENTIAL);
- MACRO(POSIX_FADV_WILLNEED);
-
- FUNCTION(creat, int (*f)(const char *, mode_t));
- FUNCTION(fcntl, int (*f)(int, int, ...));
- FUNCTION(open, int (*f)(const char *, int, ...));
- FUNCTION(openat, int (*f)(int, const char *, int, ...));
- FUNCTION(posix_fadvise, int (*f)(int, off_t, off_t, int));
- FUNCTION(posix_fallocate, int (*f)(int, off_t, off_t));
-}
diff --git a/tests/headers/fenv.c b/tests/headers/fenv.c
deleted file mode 100644
index 5f82c524..00000000
--- a/tests/headers/fenv.c
+++ /dev/null
@@ -1,38 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/fenv.h.html
-
-#include "core.h"
-
-#include <fenv.h>
-
-TEST(fenv_h)
-{
- TYPE(fenv_t);
- TYPE(fexcept_t);
-
- MACRO(FE_DIVBYZERO);
- MACRO(FE_INEXACT);
- MACRO(FE_INVALID);
- MACRO(FE_OVERFLOW);
- MACRO(FE_UNDERFLOW);
-
- MACRO(FE_ALL_EXCEPT);
-
- MACRO(FE_DOWNWARD);
- MACRO(FE_TONEAREST);
- MACRO(FE_TOWARDZERO);
- MACRO(FE_UPWARD);
-
- const fenv_t *fe_dfl_env = FE_DFL_ENV;
-
- FUNCTION(feclearexcept, int (*f)(int));
- FUNCTION(fegetenv, int (*f)(fenv_t *));
- FUNCTION(fegetexceptflag, int (*f)(fexcept_t *, int));
- FUNCTION(fegetround, int (*f)(void));
- FUNCTION(feholdexcept, int (*f)(fenv_t *));
- FUNCTION(feraiseexcept, int (*f)(int));
- FUNCTION(fesetenv, int (*f)(const fenv_t *));
- FUNCTION(fesetexceptflag, int (*f)(const fexcept_t *, int));
- FUNCTION(fesetround, int (*f)(int));
- FUNCTION(fetestexcept, int (*f)(int));
- FUNCTION(feupdateenv, int (*f)(const fenv_t *));
-}
diff --git a/tests/headers/float.c b/tests/headers/float.c
deleted file mode 100644
index a476f09f..00000000
--- a/tests/headers/float.c
+++ /dev/null
@@ -1,41 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/float.h.html
-
-#include "core.h"
-
-#include <float.h>
-
-TEST(float_h)
-{
- int flt_rounds = FLT_ROUNDS;
-
- MACRO(FLT_EVAL_METHOD);
- MACRO(FLT_RADIX);
- MACRO(FLT_MANT_DIG);
- MACRO(DBL_MANT_DIG);
- MACRO(LDBL_MANT_DIG);
- MACRO(DECIMAL_DIG);
- MACRO(FLT_DIG);
- MACRO(DBL_DIG);
- MACRO(LDBL_DIG);
- MACRO(FLT_MIN_EXP);
- MACRO(DBL_MIN_EXP);
- MACRO(LDBL_MIN_EXP);
- MACRO(FLT_MIN_10_EXP);
- MACRO(DBL_MIN_10_EXP);
- MACRO(LDBL_MIN_10_EXP);
- MACRO(FLT_MAX_EXP);
- MACRO(DBL_MAX_EXP);
- MACRO(LDBL_MAX_EXP);
- MACRO(FLT_MAX_10_EXP);
- MACRO(DBL_MAX_10_EXP);
- MACRO(LDBL_MAX_10_EXP);
- MACRO(FLT_MAX);
- MACRO(DBL_MAX);
- MACRO(LDBL_MAX);
- MACRO(FLT_EPSILON);
- MACRO(DBL_EPSILON);
- MACRO(LDBL_EPSILON);
- MACRO(FLT_MIN);
- MACRO(DBL_MIN);
- MACRO(LDBL_MIN);
-}
diff --git a/tests/headers/fmtmsg.c b/tests/headers/fmtmsg.c
deleted file mode 100644
index c23edd35..00000000
--- a/tests/headers/fmtmsg.c
+++ /dev/null
@@ -1,38 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/fmtmsg.h.html
-
-#include "core.h"
-
-#include <fmtmsg.h>
-
-TEST(fmtmsg_h)
-{
- MACRO(MM_HARD)
- MACRO(MM_SOFT)
- MACRO(MM_FIRM)
- MACRO(MM_APPL)
- MACRO(MM_UTIL)
- MACRO(MM_OPSYS)
- MACRO(MM_RECOVER)
- MACRO(MM_NRECOV)
- MACRO(MM_PRINT)
- MACRO(MM_CONSOLE)
- MACRO(MM_NOSEV)
- MACRO(MM_HALT)
- MACRO(MM_ERROR)
- MACRO(MM_WARNING)
- MACRO(MM_INFO)
- MACRO(MM_NOTOK);
- MACRO(MM_OK);
- MACRO(MM_NOMSG);
- MACRO(MM_NOCON);
-
- MACRO_VALUE(MM_NULLLBL, ((char *)0));
- MACRO_VALUE(MM_NULLSEV, 0);
- MACRO_VALUE(MM_NULLMC, ((char *)0));
- MACRO_VALUE(MM_NULLTXT, ((char *)0));
- MACRO_VALUE(MM_NULLACT, ((char *)0));
- MACRO_VALUE(MM_NULLTAG, ((char *)0));
-
- FUNCTION(fmtmsg, FN(int, long, const char *, int, const char *,
- const char *, const char *));
-}
diff --git a/tests/headers/fnmatch.c b/tests/headers/fnmatch.c
deleted file mode 100644
index 563425cc..00000000
--- a/tests/headers/fnmatch.c
+++ /dev/null
@@ -1,17 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/fmtmsg.h.html
-
-#include "core.h"
-
-#include <fnmatch.h>
-
-TEST(fnmatch_h)
-{
- MACRO(FNM_PATHNAME)
- MACRO(FNM_NOESCAPE)
- MACRO(FNM_PERIOD)
- MACRO(FNM_CASEFOLD)
- MACRO(FNM_NOMATCH)
- MACRO(FNM_IGNORECASE)
-
- FUNCTION(fnmatch, FN(int, const char *, const char *, int))
-}
diff --git a/tests/headers/ftw.c b/tests/headers/ftw.c
deleted file mode 100644
index a6c3c38d..00000000
--- a/tests/headers/ftw.c
+++ /dev/null
@@ -1,26 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/ftw.h.html
-
-#include "core.h"
-
-#include <ftw.h>
-
-TEST(ftw_h)
-{
- TYPE(struct FTW);
- STRUCT_MEMBER(struct FTW, int, base);
- STRUCT_MEMBER(struct FTW, int, level);
-
- MACRO(FTW_F);
- MACRO(FTW_D);
- MACRO(FTW_DNR);
- MACRO(FTW_DP);
- MACRO(FTW_NS);
- MACRO(FTW_SL);
- MACRO(FTW_SLN);
-
- MACRO(FTW_PHYS);
- MACRO(FTW_MOUNT);
- MACRO(FTW_XDEV);
- MACRO(FTW_DEPTH);
- MACRO(FTW_CHDIR);
-}
diff --git a/tests/headers/glob.c b/tests/headers/glob.c
deleted file mode 100644
index 6f0ed3c6..00000000
--- a/tests/headers/glob.c
+++ /dev/null
@@ -1,32 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/glob.h.html
-
-#include "core.h"
-
-#include <glob.h>
-
-TEST(glob_h)
-{
- TYPE(glob_t);
- STRUCT_MEMBER(glob_t, size_t, gl_pathc);
- STRUCT_MEMBER(glob_t, char **, gl_pathv);
- STRUCT_MEMBER(glob_t, size_t, gl_offs);
-
- TYPE(size_t);
-
- MACRO(GLOB_APPEND);
- MACRO(GLOB_DOOFFS);
- MACRO(GLOB_ERR);
- MACRO(GLOB_MARK);
- MACRO(GLOB_NOCHECK);
- MACRO(GLOB_NOESCAPE);
- MACRO(GLOB_NOSORT);
-
- MACRO(GLOB_ABORTED);
- MACRO(GLOB_NOMATCH);
- MACRO(GLOB_NOSPACE);
-
- FUNCTION(glob, FN(int, const char *, int, int (*)(const char *, int),
- glob_t *));
-
- FUNCTION(globfree, FN(void, glob_t *));
-}
diff --git a/tests/headers/grp.c b/tests/headers/grp.c
deleted file mode 100644
index 9ca3029e..00000000
--- a/tests/headers/grp.c
+++ /dev/null
@@ -1,26 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/glob.h.html
-
-#include "core.h"
-
-#include <grp.h>
-
-TEST(grp_h)
-{
- TYPE(struct group);
- STRUCT_MEMBER(struct group, char *, gr_name);
- STRUCT_MEMBER(struct group, gid_t, gr_gid);
- STRUCT_MEMBER(struct group, char **, gr_mem);
-
- TYPE(gid_t);
- TYPE(size_t);
-
- FUNCTION(endgrent, FN(void, void));
- FUNCTION(getgrent, FN(struct group *, void));
- FUNCTION(getgrgid, FN(struct group *, gid_t));
- FUNCTION(getgrgid_r, FN(int, gid_t, struct group *, char *, size_t,
- struct group **));
- FUNCTION(getgrnam, FN(struct group *, const char *));
- FUNCTION(getgrnam_r, FN(int, const char *, struct group *, char *,
- size_t, struct group **));
- FUNCTION(setgrent, FN(void, void));
-}
diff --git a/tests/headers/iconv.h b/tests/headers/iconv.h
deleted file mode 100644
index 904731fc..00000000
--- a/tests/headers/iconv.h
+++ /dev/null
@@ -1,16 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/iconv.h.html
-
-#include "core.h"
-
-#include <iconv.h>
-
-TEST(iconv_h)
-{
- TYPE(iconv_t);
- TYPE(size_t);
-
- FUNCTION(iconv,
- FN(size_t, iconv_t, char **, size_t *, char **, size_t *));
- FUNCTION(iconv_close, FN(int, iconv_t));
- FUNCTION(iconv_open, FN(iconv_t, const char *, const char *));
-}
diff --git a/tests/headers/inttypes.c b/tests/headers/inttypes.c
deleted file mode 100644
index c60ca709..00000000
--- a/tests/headers/inttypes.c
+++ /dev/null
@@ -1,173 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/inttypes.h.html
-
-#include "core.h"
-
-#include <inttypes.h>
-
-TEST(inttypes_h)
-{
- TYPE(wchar_t);
- TYPE(imaxdiv_t);
-
- MACRO_VALUE_STRING(PRId8, "d");
- MACRO_VALUE_STRING(PRId16, "d");
- MACRO_VALUE_STRING(PRId32, "d");
- MACRO_VALUE_STRING(PRId64, __PRI64 "d");
- MACRO_VALUE_STRING(PRIdLEAST8, "d");
- MACRO_VALUE_STRING(PRIdLEAST16, "d");
- MACRO_VALUE_STRING(PRIdLEAST32, "d");
- MACRO_VALUE_STRING(PRIdLEAST64, __PRI64 "d");
- MACRO_VALUE_STRING(PRIdFAST8, "d");
- MACRO_VALUE_STRING(PRIdFAST16, "d");
- MACRO_VALUE_STRING(PRIdFAST32, "d");
- MACRO_VALUE_STRING(PRIdFAST64, __PRI64 "d");
- MACRO_VALUE_STRING(PRIi8, "i");
- MACRO_VALUE_STRING(PRIi16, "i");
- MACRO_VALUE_STRING(PRIi32, "i");
- MACRO_VALUE_STRING(PRIi64, __PRI64 "i");
- MACRO_VALUE_STRING(PRIiLEAST8, "i");
- MACRO_VALUE_STRING(PRIiLEAST16, "i");
- MACRO_VALUE_STRING(PRIiLEAST32, "i");
- MACRO_VALUE_STRING(PRIiLEAST64, __PRI64 "i");
- MACRO_VALUE_STRING(PRIiFAST8, "i");
- MACRO_VALUE_STRING(PRIiFAST16, "i");
- MACRO_VALUE_STRING(PRIiFAST32, "i");
- MACRO_VALUE_STRING(PRIiFAST64, __PRI64 "i");
- MACRO_VALUE_STRING(PRIo8, "o");
- MACRO_VALUE_STRING(PRIo16, "o");
- MACRO_VALUE_STRING(PRIo32, "o");
- MACRO_VALUE_STRING(PRIo64, __PRI64 "o");
- MACRO_VALUE_STRING(PRIoLEAST8, "o");
- MACRO_VALUE_STRING(PRIoLEAST16, "o");
- MACRO_VALUE_STRING(PRIoLEAST32, "o");
- MACRO_VALUE_STRING(PRIoLEAST64, __PRI64 "o");
- MACRO_VALUE_STRING(PRIoFAST8, "o");
- MACRO_VALUE_STRING(PRIoFAST16, "o");
- MACRO_VALUE_STRING(PRIoFAST32, "o");
- MACRO_VALUE_STRING(PRIoFAST64, __PRI64 "o");
- MACRO_VALUE_STRING(PRIu8, "u");
- MACRO_VALUE_STRING(PRIu16, "u");
- MACRO_VALUE_STRING(PRIu32, "u");
- MACRO_VALUE_STRING(PRIu64, __PRI64 "u");
- MACRO_VALUE_STRING(PRIuLEAST8, "u");
- MACRO_VALUE_STRING(PRIuLEAST16, "u");
- MACRO_VALUE_STRING(PRIuLEAST32, "u");
- MACRO_VALUE_STRING(PRIuLEAST64, __PRI64 "u");
- MACRO_VALUE_STRING(PRIuFAST8, "u");
- MACRO_VALUE_STRING(PRIuFAST16, "u");
- MACRO_VALUE_STRING(PRIuFAST32, "u");
- MACRO_VALUE_STRING(PRIuFAST64, __PRI64 "u");
- MACRO_VALUE_STRING(PRIx8, "x");
- MACRO_VALUE_STRING(PRIx16, "x");
- MACRO_VALUE_STRING(PRIx32, "x");
- MACRO_VALUE_STRING(PRIx64, __PRI64 "x");
- MACRO_VALUE_STRING(PRIxLEAST8, "x");
- MACRO_VALUE_STRING(PRIxLEAST16, "x");
- MACRO_VALUE_STRING(PRIxLEAST32, "x");
- MACRO_VALUE_STRING(PRIxLEAST64, __PRI64 "x");
- MACRO_VALUE_STRING(PRIxFAST8, "x");
- MACRO_VALUE_STRING(PRIxFAST16, "x");
- MACRO_VALUE_STRING(PRIxFAST32, "x");
- MACRO_VALUE_STRING(PRIxFAST64, __PRI64 "x");
- MACRO_VALUE_STRING(PRIX8, "X");
- MACRO_VALUE_STRING(PRIX16, "X");
- MACRO_VALUE_STRING(PRIX32, "X");
- MACRO_VALUE_STRING(PRIX64, __PRI64 "X");
- MACRO_VALUE_STRING(PRIXLEAST8, "X");
- MACRO_VALUE_STRING(PRIXLEAST16, "X");
- MACRO_VALUE_STRING(PRIXLEAST32, "X");
- MACRO_VALUE_STRING(PRIXLEAST64, __PRI64 "X");
- MACRO_VALUE_STRING(PRIXFAST8, "X");
- MACRO_VALUE_STRING(PRIXFAST16, "X");
- MACRO_VALUE_STRING(PRIXFAST32, "X");
- MACRO_VALUE_STRING(PRIXFAST64, __PRI64 "X");
- MACRO_VALUE_STRING(PRIdMAX, __PRI64 "d");
- MACRO_VALUE_STRING(PRIiMAX, __PRI64 "i");
- MACRO_VALUE_STRING(PRIoMAX, __PRI64 "o");
- MACRO_VALUE_STRING(PRIuMAX, __PRI64 "u");
- MACRO_VALUE_STRING(PRIxMAX, __PRI64 "x");
- MACRO_VALUE_STRING(PRIXMAX, __PRI64 "X");
- MACRO_VALUE_STRING(PRIdPTR, __PRIPTR "d");
- MACRO_VALUE_STRING(PRIiPTR, __PRIPTR "i");
- MACRO_VALUE_STRING(PRIoPTR, __PRIPTR "o");
- MACRO_VALUE_STRING(PRIuPTR, __PRIPTR "u");
- MACRO_VALUE_STRING(PRIxPTR, __PRIPTR "x");
- MACRO_VALUE_STRING(PRIXPTR, __PRIPTR "X");
- MACRO_VALUE_STRING(SCNd8, "hhd");
- MACRO_VALUE_STRING(SCNd16, "hd");
- MACRO_VALUE_STRING(SCNd32, "d");
- MACRO_VALUE_STRING(SCNd64, __PRI64 "d");
- MACRO_VALUE_STRING(SCNdLEAST8, "hhd");
- MACRO_VALUE_STRING(SCNdLEAST16, "hd");
- MACRO_VALUE_STRING(SCNdLEAST32, "d");
- MACRO_VALUE_STRING(SCNdLEAST64, __PRI64 "d");
- MACRO_VALUE_STRING(SCNdFAST8, "hhd");
- MACRO_VALUE_STRING(SCNdFAST16, "d");
- MACRO_VALUE_STRING(SCNdFAST32, "d");
- MACRO_VALUE_STRING(SCNdFAST64, __PRI64 "d");
- MACRO_VALUE_STRING(SCNi8, "hhi");
- MACRO_VALUE_STRING(SCNi16, "hi");
- MACRO_VALUE_STRING(SCNi32, "i");
- MACRO_VALUE_STRING(SCNi64, __PRI64 "i");
- MACRO_VALUE_STRING(SCNiLEAST8, "hhi");
- MACRO_VALUE_STRING(SCNiLEAST16, "hi");
- MACRO_VALUE_STRING(SCNiLEAST32, "i");
- MACRO_VALUE_STRING(SCNiLEAST64, __PRI64 "i");
- MACRO_VALUE_STRING(SCNiFAST8, "hhi");
- MACRO_VALUE_STRING(SCNiFAST16, "i");
- MACRO_VALUE_STRING(SCNiFAST32, "i");
- MACRO_VALUE_STRING(SCNiFAST64, __PRI64 "i");
- MACRO_VALUE_STRING(SCNu8, "hhu");
- MACRO_VALUE_STRING(SCNu16, "hu");
- MACRO_VALUE_STRING(SCNu32, "u");
- MACRO_VALUE_STRING(SCNu64, __PRI64 "u");
- MACRO_VALUE_STRING(SCNuLEAST8, "hhu");
- MACRO_VALUE_STRING(SCNuLEAST16, "hu");
- MACRO_VALUE_STRING(SCNuLEAST32, "u");
- MACRO_VALUE_STRING(SCNuLEAST64, __PRI64 "u");
- MACRO_VALUE_STRING(SCNuFAST8, "hhu");
- MACRO_VALUE_STRING(SCNuFAST16, "u");
- MACRO_VALUE_STRING(SCNuFAST32, "u");
- MACRO_VALUE_STRING(SCNuFAST64, __PRI64 "u");
- MACRO_VALUE_STRING(SCNo8, "hho");
- MACRO_VALUE_STRING(SCNo16, "ho");
- MACRO_VALUE_STRING(SCNo32, "o");
- MACRO_VALUE_STRING(SCNo64, __PRI64 "o");
- MACRO_VALUE_STRING(SCNoLEAST8, "hho");
- MACRO_VALUE_STRING(SCNoLEAST16, "ho");
- MACRO_VALUE_STRING(SCNoLEAST32, "o");
- MACRO_VALUE_STRING(SCNoLEAST64, __PRI64 "o");
- MACRO_VALUE_STRING(SCNoFAST8, "hho");
- MACRO_VALUE_STRING(SCNoFAST16, "o");
- MACRO_VALUE_STRING(SCNoFAST32, "o");
- MACRO_VALUE_STRING(SCNoFAST64, __PRI64 "o");
- MACRO_VALUE_STRING(SCNx8, "hhx");
- MACRO_VALUE_STRING(SCNx16, "hx");
- MACRO_VALUE_STRING(SCNx32, "x");
- MACRO_VALUE_STRING(SCNx64, __PRI64 "x");
- MACRO_VALUE_STRING(SCNxLEAST8, "hhx");
- MACRO_VALUE_STRING(SCNxLEAST16, "hx");
- MACRO_VALUE_STRING(SCNxLEAST32, "x");
- MACRO_VALUE_STRING(SCNxLEAST64, __PRI64 "x");
- MACRO_VALUE_STRING(SCNxFAST8, "hhx");
- MACRO_VALUE_STRING(SCNxFAST16, "x");
- MACRO_VALUE_STRING(SCNxFAST32, "x");
- MACRO_VALUE_STRING(SCNxFAST64, __PRI64 "x");
- MACRO_VALUE_STRING(SCNdMAX, __PRI64 "d");
- MACRO_VALUE_STRING(SCNiMAX, __PRI64 "i");
- MACRO_VALUE_STRING(SCNoMAX, __PRI64 "o");
- MACRO_VALUE_STRING(SCNuMAX, __PRI64 "u");
- MACRO_VALUE_STRING(SCNxMAX, __PRI64 "x");
- MACRO_VALUE_STRING(SCNdPTR, __PRIPTR "d");
- MACRO_VALUE_STRING(SCNiPTR, __PRIPTR "i");
- MACRO_VALUE_STRING(SCNoPTR, __PRIPTR "o");
- MACRO_VALUE_STRING(SCNuPTR, __PRIPTR "u");
- MACRO_VALUE_STRING(SCNxPTR, __PRIPTR "x");
-
- FUNCTION(imaxabs, FN(intmax_t, intmax_t));
- FUNCTION(imaxdiv, FN(imaxdiv_t, intmax_t, intmax_t));
- FUNCTION(strtoimax, FN(intmax_t, const char *, char **, int));
- FUNCTION(strtoumax, FN(uintmax_t, const char *, char **, int));
- FUNCTION(wcstoimax, FN(intmax_t, const wchar_t *, wchar_t **, int));
- FUNCTION(wcstoumax, FN(uintmax_t, const wchar_t *, wchar_t **, int));
-}
diff --git a/tests/headers/iso646.c b/tests/headers/iso646.c
deleted file mode 100644
index 258b8fcc..00000000
--- a/tests/headers/iso646.c
+++ /dev/null
@@ -1,23 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/iso646.h.html
-
-#include "core.h"
-
-#include <iso646.h>
-
-#define STRINGIFY_(x) #x
-#define STRINGIFY(x) STRINGIFY_(x)
-
-TEST(iso646_h)
-{
- MACRO_VALUE_STRING(STRINGIFY(and), "&&");
- MACRO_VALUE_STRING(STRINGIFY(and_eq), "&=");
- MACRO_VALUE_STRING(STRINGIFY(bitand), "&");
- MACRO_VALUE_STRING(STRINGIFY(bitor), "|");
- MACRO_VALUE_STRING(STRINGIFY(compl), "~");
- MACRO_VALUE_STRING(STRINGIFY(not), "!");
- MACRO_VALUE_STRING(STRINGIFY(not_eq), "!=");
- MACRO_VALUE_STRING(STRINGIFY(or), "||");
- MACRO_VALUE_STRING(STRINGIFY(or_eq), "|=");
- MACRO_VALUE_STRING(STRINGIFY(xor), "^");
- MACRO_VALUE_STRING(STRINGIFY(xor_eq), "^=");
-}
diff --git a/tests/headers/langinfo.c b/tests/headers/langinfo.c
deleted file mode 100644
index 2eb6b3c5..00000000
--- a/tests/headers/langinfo.c
+++ /dev/null
@@ -1,93 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/langinfo.h.html
-
-#include "core.h"
-
-#include <langinfo.h>
-
-TEST(langinfo_h)
-{
- TYPE(locale_t);
- TYPE(nl_item);
-
- MACRO(CODESET);
- MACRO(D_T_FMT)
- MACRO(D_FMT);
- MACRO(T_FMT);
- MACRO(T_FMT_AMPM);
- MACRO(PM_STR);
- MACRO(DAY_1);
- MACRO(DAY_2);
- MACRO(DAY_3);
- MACRO(DAY_4);
- MACRO(DAY_5);
- MACRO(DAY_6);
- MACRO(DAY_7);
- MACRO(ABDAY_1);
- MACRO(ABDAY_2);
- MACRO(ABDAY_3);
- MACRO(ABDAY_4);
- MACRO(ABDAY_5);
- MACRO(ABDAY_6);
- MACRO(ABDAY_7);
- MACRO(MON_1);
- MACRO(MON_2);
- MACRO(MON_3);
- MACRO(MON_4);
- MACRO(MON_5);
- MACRO(MON_6);
- MACRO(MON_7);
- MACRO(MON_8);
- MACRO(MON_9);
- MACRO(MON_10);
- MACRO(MON_11);
- MACRO(MON_12);
- MACRO(ALTMON_1);
- MACRO(ALTMON_2);
- MACRO(ALTMON_3);
- MACRO(ALTMON_4);
- MACRO(ALTMON_5);
- MACRO(ALTMON_6);
- MACRO(ALTMON_7);
- MACRO(ALTMON_8);
- MACRO(ALTMON_9);
- MACRO(ALTMON_1);
- MACRO(ALTMON_11);
- MACRO(ALTMON_12);
- MACRO(ABMON_1);
- MACRO(ABMON_2);
- MACRO(ABMON_3);
- MACRO(ABMON_4);
- MACRO(ABMON_5);
- MACRO(ABMON_6);
- MACRO(ABMON_7);
- MACRO(ABMON_8);
- MACRO(ABMON_9);
- MACRO(ABMON_10);
- MACRO(ABMON_11);
- MACRO(ABMON_12);
- MACRO(ABALTMON_1);
- MACRO(ABALTMON_2);
- MACRO(ABALTMON_3);
- MACRO(ABALTMON_4);
- MACRO(ABALTMON_5);
- MACRO(ABALTMON_6);
- MACRO(ABALTMON_7);
- MACRO(ABALTMON_8);
- MACRO(ABALTMON_9);
- MACRO(ABALTMON_10);
- MACRO(ABALTMON_11);
- MACRO(ABALTMON_12);
- MACRO(ERA);
- MACRO(ERA_D_FMT);
- MACRO(ERA_D_T_FMT);
- MACRO(ERA_T_FMT);
- MACRO(ALT_DIGITS);
- MACRO(RADIXCHAR);
- MACRO(THOUSEP);
- MACRO(YESEXPR);
- MACRO(NOEXPR);
- MACRO(CRNCYSTR);
-
- FUNCTION(nl_langinfo, FN(char *, nl_item))
- FUNCTION(nl_langinfo_l, FN(char *, nl_item, locale_t))
-}
diff --git a/tests/headers/libgen.c b/tests/headers/libgen.c
deleted file mode 100644
index 162c52d2..00000000
--- a/tests/headers/libgen.c
+++ /dev/null
@@ -1,11 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/libgen.h.html
-
-#include "core.h"
-
-#include <libgen.h>
-
-TEST(libgen_h)
-{
- FUNCTION(basename, FN(char *, char *));
- FUNCTION(dirname, FN(char *, char *));
-}
diff --git a/tests/headers/libintl.c b/tests/headers/libintl.c
deleted file mode 100644
index bc9d579c..00000000
--- a/tests/headers/libintl.c
+++ /dev/null
@@ -1,35 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/libintl.h.html
-
-#include "core.h"
-
-#include <libintl.h>
-
-TEST(libintl_h)
-{
- MACRO(TEXTDOMAIN_MAX);
- TYPE(locale_t);
-
- FUNCTION(bindtextdomain, FN(char *, const char *, const char *));
- FUNCTION(bind_textdomain_codeset,
- FN(char *, const char *, const char *));
- FUNCTION(dcgettext, FN(char *, const char *, const char *, int));
- FUNCTION(dcgettext_l,
- FN(char *, const char *, const char *, int, locale_t));
- FUNCTION(dcngettext, FN(char *, const char *, const char *,
- const char *, unsigned long, int));
- FUNCTION(dcngettext_l, FN(char *, const char *, const char *,
- const char *, unsigned long, int, locale_t));
- FUNCTION(dgettext, FN(char *, const char *, const char *));
- FUNCTION(dgettext_l, FN(char *, const char *, const char *, locale_t));
- FUNCTION(dngettext, FN(char *, const char *, const char *, const char *,
- unsigned long));
- FUNCTION(dngettext_l, FN(char *, const char *, const char *,
- const char *, unsigned long, locale_t));
- FUNCTION(gettext, FN(char *, const char *));
- FUNCTION(gettext_l, FN(char *, const char *, locale_t));
- FUNCTION(ngettext,
- FN(char *, const char *, const char *, unsigned long));
- FUNCTION(ngettext_l, FN(char *, const char *, const char *,
- unsigned long, locale_t));
- FUNCTION(textdomain, FN(char *, const char *));
-}
diff --git a/tests/headers/limits.c b/tests/headers/limits.c
deleted file mode 100644
index 0d6fbdef..00000000
--- a/tests/headers/limits.c
+++ /dev/null
@@ -1,151 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/limits.h.html
-
-#include "core.h"
-
-#include <limits.h>
-
-TEST(limits_h)
-{
- MACRO(AIO_LISTIO_MAX);
- MACRO(AIO_MAX);
- MACRO(AIO_PRIO_DELTA_MAX);
- MACRO(ARG_MAX);
- MACRO(ATEXIT_MAX);
- MACRO(CHILD_MAX);
- MACRO(DELAYTIMER_MAX);
- MACRO(HOST_NAME_MAX);
- MACRO(IOV_MAX);
- MACRO(LOGIN_NAME_MAX);
- MACRO(MQ_OPEN_MAX);
- MACRO(MQ_PRIO_MAX);
- MACRO(OPEN_MAX);
- MACRO(PAGESIZE);
- MACRO(PAGE_SIZE);
-
- MACRO(PTHREAD_DESTRUCTOR_ITERATIONS);
- MACRO(PTHREAD_KEYS_MAX);
- MACRO(PTHREAD_STACK_MIN);
- MACRO(PTHREAD_THREADS_MAX);
- MACRO(RTSIG_MAX);
- MACRO(SEM_NSEMS_MAX);
- MACRO(SEM_VALUE_MAX);
- MACRO(SIGQUEUE_MAX);
- MACRO(SS_REPL_MAX);
- MACRO(STREAM_MAX);
- MACRO(SYMLOOP_MAX);
- MACRO(TIMER_MAX);
- MACRO(TTY_NAME_MAX);
- MACRO(TZNAME_MAX);
-
- MACRO(FILESIZEBITS);
- MACRO(LINK_MAX);
- MACRO(MAX_CANON);
- MACRO(MAX_INPUT);
-
- MACRO(NAME_MAX);
- MACRO(PATH_MAX);
- MACRO(PIPE_BUF);
-
- MACRO(POSIX_ALLOC_SIZE_MIN);
- MACRO(POSIX_REC_INCR_XFER_SIZE);
- MACRO(POSIX_REC_MAX_XFER_SIZE);
- MACRO(POSIX_REC_MIN_XFER_SIZE);
- MACRO(POSIX_REC_XFER_ALIGN);
-
- MACRO(SYMLINK_MAX);
- MACRO(TEXTDOMAIN_MAX);
-
- MACRO(BC_BASE_MAX);
- MACRO(BC_DIM_MAX);
- MACRO(BC_SCALE_MAX);
- MACRO(BC_STRING_MAX);
- MACRO(CHARCLASS_NAME_MAX);
- MACRO(COLL_WEIGHTS_MAX);
- MACRO(EXPR_NEST_MAX);
- MACRO(LINE_MAX);
- MACRO(NGROUPS_MAX);
- MACRO(RE_DUP_MAX);
-
- MACRO_VALUE(_POSIX_CLOCKRES_MIN, 20000000);
- MACRO_VALUE(_POSIX_AIO_LISTIO_MAX, 2);
- MACRO_VALUE(_POSIX_AIO_MAX, 1);
- MACRO_VALUE(_POSIX_ARG_MAX, 4096);
- MACRO_VALUE(_POSIX_CHILD_MAX, 25);
- MACRO_VALUE(_POSIX_DELAYTIMER_MAX, 32);
- MACRO_VALUE(_POSIX_HOST_NAME_MAX, 255);
- MACRO_VALUE(_POSIX_LINK_MAX, 8);
- MACRO_VALUE(_POSIX_LOGIN_NAME_MAX, 9);
- MACRO_VALUE(_POSIX_MAX_CANON, 255);
- MACRO_VALUE(_POSIX_MAX_INPUT, 255);
- MACRO_VALUE(_POSIX_MQ_OPEN_MAX, 8);
- MACRO_VALUE(_POSIX_MQ_PRIO_MAX, 32);
- MACRO_VALUE(_POSIX_NAME_MAX, 14);
- MACRO_VALUE(_POSIX_NGROUPS_MAX, 8);
- MACRO_VALUE(_POSIX_OPEN_MAX, 20);
- MACRO_VALUE(_POSIX_PATH_MAX, 256);
- MACRO_VALUE(_POSIX_PIPE_BUF, 512);
- MACRO_VALUE(_POSIX_RE_DUP_MAX, 255);
- MACRO_VALUE(_POSIX_RTSIG_MAX, 8);
- MACRO_VALUE(_POSIX_SEM_NSEMS_MAX, 256);
- MACRO_VALUE(_POSIX_SEM_VALUE_MAX, 32767);
- MACRO_VALUE(_POSIX_SIGQUEUE_MAX, 32);
- MACRO_VALUE(_POSIX_SSIZE_MAX, 32767);
- MACRO_VALUE(_POSIX_SS_REPL_MAX, 4);
- MACRO_VALUE(_POSIX_STREAM_MAX, 8);
- MACRO_VALUE(_POSIX_SYMLINK_MAX, 255);
- MACRO_VALUE(_POSIX_SYMLOOP_MAX, 8);
- MACRO_VALUE(_POSIX_THREAD_DESTRUCTOR_ITERATIONS, 4);
- MACRO_VALUE(_POSIX_THREAD_KEYS_MAX, 128);
- MACRO_VALUE(_POSIX_THREAD_THREADS_MAX, 64);
- MACRO_VALUE(_POSIX_TIMER_MAX, 32);
- MACRO_VALUE(_POSIX_TRACE_EVENT_NAME_MAX, 30);
- MACRO_VALUE(_POSIX_TRACE_NAME_MAX, 8);
- MACRO_VALUE(_POSIX_TRACE_SYS_MAX, 8);
- MACRO_VALUE(_POSIX_TRACE_USER_EVENT_MAX, 32);
- MACRO_VALUE(_POSIX_TTY_NAME_MAX, 9);
- MACRO_VALUE(_POSIX_TZNAME_MAX, 6);
- MACRO_VALUE(_POSIX2_BC_BASE_MAX, 99);
- MACRO_VALUE(_POSIX2_BC_DIM_MAX, 2048);
- MACRO_VALUE(_POSIX2_BC_SCALE_MAX, 99);
- MACRO_VALUE(_POSIX2_BC_STRING_MAX, 1000);
- MACRO_VALUE(_POSIX2_CHARCLASS_NAME_MAX, 14);
- MACRO_VALUE(_POSIX2_COLL_WEIGHTS_MAX, 2);
- MACRO_VALUE(_POSIX2_EXPR_NEST_MAX, 32);
- MACRO_VALUE(_POSIX2_LINE_MAX, 2048);
- MACRO_VALUE(_POSIX2_RE_DUP_MAX, 255);
-
- MACRO_VALUE(_XOPEN_IOV_MAX, 16);
- MACRO_VALUE(_XOPEN_NAME_MAX, 255);
- MACRO_VALUE(_XOPEN_PATH_MAX, 1024);
-
- MACRO_VALUE(CHAR_BIT, 8);
- MACRO(CHAR_MAX);
- MACRO(CHAR_MIN);
- MACRO(INT_MAX);
- MACRO(INT_MIN);
- MACRO(LLONG_MAX);
- MACRO(LLONG_MIN);
- MACRO(LONG_BIT);
- MACRO(LONG_MAX);
- MACRO(LONG_MIN);
- MACRO(MB_LEN_MAX);
- MACRO_VALUE(SCHAR_MAX, 127);
- MACRO_VALUE(SCHAR_MIN, -128);
- MACRO(SHRT_MAX);
- MACRO(SHRT_MIN);
- MACRO(SSIZE_MAX);
- MACRO_VALUE(UCHAR_MAX, 255);
- MACRO(UINT_MAX);
- MACRO(ULLONG_MAX);
- MACRO(ULONG_MAX);
- MACRO(USHRT_MAX);
- MACRO(WORD_BIT);
- MACRO(GETENTROPY_MAX);
-
- MACRO(NL_ARGMAX);
- MACRO(NL_LANGMAX);
- MACRO(NL_MSGMAX);
- MACRO(NL_SETMAX);
- MACRO(NL_TEXTMAX);
- MACRO(NZERO);
-}
diff --git a/tests/headers/locale.c b/tests/headers/locale.c
deleted file mode 100644
index 9a302e4f..00000000
--- a/tests/headers/locale.c
+++ /dev/null
@@ -1,61 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/locale.h.html
-
-#include "core.h"
-
-#include <locale.h>
-
-TEST(locale_h)
-{
- TYPE(struct lconv);
- STRUCT_MEMBER(struct lconv, char *, currency_symbol);
- STRUCT_MEMBER(struct lconv, char *, decimal_point);
- STRUCT_MEMBER(struct lconv, char, frac_digits);
- STRUCT_MEMBER(struct lconv, char *, grouping);
- STRUCT_MEMBER(struct lconv, char *, int_curr_symbol);
- STRUCT_MEMBER(struct lconv, char, int_frac_digits);
- STRUCT_MEMBER(struct lconv, char, int_n_cs_precedes);
- STRUCT_MEMBER(struct lconv, char, int_n_sep_by_space);
- STRUCT_MEMBER(struct lconv, char, int_n_sign_posn);
- STRUCT_MEMBER(struct lconv, char, int_p_cs_precedes);
- STRUCT_MEMBER(struct lconv, char, int_p_sep_by_space);
- STRUCT_MEMBER(struct lconv, char, int_p_sign_posn);
- STRUCT_MEMBER(struct lconv, char *, mon_decimal_point);
- STRUCT_MEMBER(struct lconv, char *, mon_grouping);
- STRUCT_MEMBER(struct lconv, char *, mon_thousands_sep);
- STRUCT_MEMBER(struct lconv, char *, negative_sign);
- STRUCT_MEMBER(struct lconv, char, n_cs_precedes);
- STRUCT_MEMBER(struct lconv, char, n_sep_by_space);
- STRUCT_MEMBER(struct lconv, char, n_sign_posn);
- STRUCT_MEMBER(struct lconv, char *, positive_sign);
- STRUCT_MEMBER(struct lconv, char, p_cs_precedes);
- STRUCT_MEMBER(struct lconv, char, p_sep_by_space);
- STRUCT_MEMBER(struct lconv, char, p_sign_posn);
- STRUCT_MEMBER(struct lconv, char *, thousands_sep);
-
- MACRO(NULL);
-
- MACRO(LC_ALL);
- MACRO(LC_COLLATE);
- MACRO(LC_CTYPE);
- MACRO(LC_MONETARY);
- MACRO(LC_NUMERIC);
- MACRO(LC_TIME);
-
- MACRO(LC_COLLATE_MASK);
- MACRO(LC_CTYPE_MASK);
- MACRO(LC_MESSAGES_MASK);
- MACRO(LC_MONETARY_MASK);
- MACRO(LC_NUMERIC_MASK);
- MACRO(LC_TIME_MASK);
- MACRO(LC_ALL_MASK);
-
- MACRO_TYPE(locale_t, LC_GLOBAL_LOCALE);
- TYPE(locale_t);
-
- FUNCTION(duplocale, FN(locale_t, locale_t));
- FUNCTION(freelocale, FN(void, locale_t));
- FUNCTION(localeconv, FN(struct lconv *));
- FUNCTION(newlocale, FN(locale_t, int, const char *, locale_t));
- FUNCTION(setlocale, FN(char *, int, const char *));
- FUNCTION(uselocale, FN(locale_t, locale_t));
-}
diff --git a/tests/headers/math.c b/tests/headers/math.c
deleted file mode 100644
index 0b02e1eb..00000000
--- a/tests/headers/math.c
+++ /dev/null
@@ -1,327 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/math.h.html
-
-#include "core.h"
-
-#include <math.h>
-
-TEST(math_h)
-{
- TYPE(float_t);
- TYPE(double_t);
-
-#ifndef fpclassify
-#error fpclassify
-#endif
-
-#ifndef isfinite
-#error isfinite
-#endif
-
-#ifndef isgreater
-#error isgreater
-#endif
-
-#ifndef isgreaterequal
-#error isgreaterequal
-#endif
-
-#ifndef isinf
-#error isinf
-#endif
-
-#ifndef isless
-#error isless
-#endif
-
-#ifndef islessequal
-#error islessequal
-#endif
-
-#ifndef islessgreater
-#error islessgreater
-#endif
-
-#ifndef isnan
-#error isnan
-#endif
-
-#ifndef isnormal
-#error isnormal
-#endif
-
-#ifndef isunordered
-#error isunordered
-#endif
-
-#ifndef signbit
-#error signbit
-#endif
-
- MACRO(M_E);
- MACRO(M_EGAMMA);
- MACRO(M_LOG2E);
- MACRO(M_LOG10E);
- MACRO(M_LN2);
- MACRO(M_LN10);
- MACRO(M_PHI);
- MACRO(M_PI);
- MACRO(M_PI_2);
- MACRO(M_PI_4);
- MACRO(M_1_PI);
- MACRO(M_1_SQRTPI);
- MACRO(M_2_PI);
- MACRO(M_2_SQRTPI);
- MACRO(M_SQRT2);
- MACRO(M_SQRT3);
- MACRO(M_SQRT1_2);
- MACRO(M_SQRT1_3);
-
- MACRO(HUGE_VAL);
- MACRO(HUGE_VALF);
- MACRO(HUGE_VALL);
- MACRO(INFINITY);
- MACRO(NAN);
-
- MACRO(FP_INFINITE);
- MACRO(FP_NAN);
- MACRO(FP_NORMAL);
- MACRO(FP_SUBNORMAL);
- MACRO(FP_ZERO);
-
- MACRO_VALUE(FP_FAST_FMA, 1);
- MACRO_VALUE(FP_FAST_FMAF, 1);
- MACRO_VALUE(FP_FAST_FMAL, 1);
-
- MACRO(FP_ILOGB0);
- MACRO(FP_ILOGBNAN);
-
- MACRO_VALUE(MATH_ERRNO, 1);
- MACRO_VALUE(MATH_ERREXCEPT, 2);
-
- MACRO(math_errhandling);
- MACRO_TYPE(int, math_errhandling);
-
- FUNCTION(acos, double (*f)(double));
- FUNCTION(acosf, float (*f)(float));
- FUNCTION(acosh, double (*f)(double));
- FUNCTION(acoshf, float (*f)(float));
- FUNCTION(acoshl, long double (*f)(long double));
- FUNCTION(acosl, long double (*f)(long double));
-
- FUNCTION(asin, double (*f)(double));
- FUNCTION(asinf, float (*f)(float));
- FUNCTION(asinh, double (*f)(double));
- FUNCTION(asinhf, float (*f)(float));
- FUNCTION(asinhl, long double (*f)(long double));
- FUNCTION(asinl, long double (*f)(long double));
-
- FUNCTION(atan, double (*f)(double));
- FUNCTION(atan2, double (*f)(double, double));
- FUNCTION(atan2f, float (*f)(float, float));
- FUNCTION(atan2l, long double (*f)(long double, long double));
- FUNCTION(atanf, float (*f)(float));
- FUNCTION(atanh, double (*f)(double));
- FUNCTION(atanhf, float (*f)(float));
- FUNCTION(atanhl, long double (*f)(long double));
- FUNCTION(atanl, long double (*f)(long double));
-
- FUNCTION(cbrt, double (*f)(double));
- FUNCTION(cbrtf, float (*f)(float));
- FUNCTION(cbrtl, long double (*f)(long double));
-
- FUNCTION(ceil, double (*f)(double));
- FUNCTION(ceilf, float (*f)(float));
- FUNCTION(ceill, long double (*f)(long double));
-
- FUNCTION(copysign, double (*f)(double, double));
- FUNCTION(copysignf, float (*f)(float, float));
- FUNCTION(copysignl, long double (*f)(long double, long double));
-
- FUNCTION(cos, double (*f)(double));
- FUNCTION(cosf, float (*f)(float));
- FUNCTION(cosh, double (*f)(double));
- FUNCTION(coshf, float (*f)(float));
- FUNCTION(coshl, long double (*f)(long double));
- FUNCTION(cosl, long double (*f)(long double));
-
- FUNCTION(erf, double (*f)(double));
- FUNCTION(erfc, double (*f)(double));
- FUNCTION(erfcf, float (*f)(float));
- FUNCTION(erfcl, long double (*f)(long double));
- FUNCTION(erff, float (*f)(float));
- FUNCTION(erfl, long double (*f)(long double));
-
- FUNCTION(exp, double (*f)(double));
- FUNCTION(exp2, double (*f)(double));
- FUNCTION(exp2f, float (*f)(float));
- FUNCTION(exp2l, long double (*f)(long double));
- FUNCTION(expf, float (*f)(float));
- FUNCTION(expl, long double (*f)(long double));
- FUNCTION(expm1, double (*f)(double));
- FUNCTION(expm1f, float (*f)(float));
- FUNCTION(expm1l, long double (*f)(long double));
-
- FUNCTION(fabs, double (*f)(double));
- FUNCTION(fabsf, float (*f)(float));
- FUNCTION(fabsl, long double (*f)(long double));
-
- FUNCTION(fdim, double (*f)(double, double));
- FUNCTION(fdimf, float (*f)(float, float));
- FUNCTION(fdiml, long double (*f)(long double, long double));
-
- FUNCTION(floor, double (*f)(double));
- FUNCTION(floorf, float (*f)(float));
- FUNCTION(floorl, long double (*f)(long double));
-
- FUNCTION(fma, double (*f)(double, double, double));
- FUNCTION(fmaf, float (*f)(float, float, float));
- FUNCTION(fmal, long double (*f)(long double, long double, long double));
-
- FUNCTION(fmax, double (*f)(double, double));
- FUNCTION(fmaxf, float (*f)(float, float));
- FUNCTION(fmaxl, long double (*f)(long double, long double));
-
- FUNCTION(fmin, double (*f)(double, double));
- FUNCTION(fminf, float (*f)(float, float));
- FUNCTION(fminl, long double (*f)(long double, long double));
-
- FUNCTION(fmod, double (*f)(double, double));
- FUNCTION(fmodf, float (*f)(float, float));
- FUNCTION(fmodl, long double (*f)(long double, long double));
-
- FUNCTION(frexp, double (*f)(double, int *));
- FUNCTION(frexpf, float (*f)(float, int *));
- FUNCTION(frexpl, long double (*f)(long double, int *));
-
- FUNCTION(hypot, double (*f)(double, double));
- FUNCTION(hypotf, float (*f)(float, float));
- FUNCTION(hypotl, long double (*f)(long double, long double));
-
- FUNCTION(ilogb, int (*f)(double));
- FUNCTION(ilogbf, int (*f)(float));
- FUNCTION(ilogbl, int (*f)(long double));
-
- FUNCTION(j0, double (*f)(double));
- FUNCTION(j1, double (*f)(double));
- FUNCTION(jn, double (*f)(int, double));
-
- FUNCTION(ldexp, double (*f)(double, int));
- FUNCTION(ldexpf, float (*f)(float, int));
- FUNCTION(ldexpl, long double (*f)(long double, int));
-
- FUNCTION(lgamma, double (*f)(double));
- FUNCTION(lgammaf, float (*f)(float));
- FUNCTION(lgammal, long double (*f)(long double));
-
- FUNCTION(llrint, long long (*f)(double));
- FUNCTION(llrintf, long long (*f)(float));
- FUNCTION(llrintl, long long (*f)(long double));
-
- FUNCTION(llround, long long (*f)(double));
- FUNCTION(llroundf, long long (*f)(float));
- FUNCTION(llroundl, long long (*f)(long double));
-
- FUNCTION(log, double (*f)(double));
- FUNCTION(log10, double (*f)(double));
- FUNCTION(log10f, float (*f)(float));
- FUNCTION(log10l, long double (*f)(long double));
- FUNCTION(log1p, double (*f)(double));
- FUNCTION(log1pf, float (*f)(float));
- FUNCTION(log1pl, long double (*f)(long double));
- FUNCTION(log2, double (*f)(double));
- FUNCTION(log2f, float (*f)(float));
- FUNCTION(log2l, long double (*f)(long double));
- FUNCTION(logb, double (*f)(double));
- FUNCTION(logbf, float (*f)(float));
- FUNCTION(logbl, long double (*f)(long double));
- FUNCTION(logf, float (*f)(float));
- FUNCTION(logl, long double (*f)(long double));
-
- FUNCTION(lrint, long (*f)(double));
- FUNCTION(lrintf, long (*f)(float));
- FUNCTION(lrintl, long (*f)(long double));
-
- FUNCTION(lround, long (*f)(double));
- FUNCTION(lroundf, long (*f)(float));
- FUNCTION(lroundl, long (*f)(long double));
-
- FUNCTION(modf, double (*f)(double, double *));
- FUNCTION(modff, float (*f)(float, float *));
- FUNCTION(modfl, long double (*f)(long double, long double *));
-
- FUNCTION(nan, double (*f)(const char *));
- FUNCTION(nanf, float (*f)(const char *));
- FUNCTION(nanl, long double (*f)(const char *));
-
- FUNCTION(nearbyint, double (*f)(double));
- FUNCTION(nearbyintf, float (*f)(float));
- FUNCTION(nearbyintl, long double (*f)(long double));
-
- FUNCTION(nextafter, double (*f)(double, double));
- FUNCTION(nextafterf, float (*f)(float, float));
- FUNCTION(nextafterl, long double (*f)(long double, long double));
-
- FUNCTION(nexttoward, double (*f)(double, long double));
- FUNCTION(nexttowardf, float (*f)(float, long double));
- FUNCTION(nexttowardl, long double (*f)(long double, long double));
-
- FUNCTION(pow, double (*f)(double, double));
- FUNCTION(powf, float (*f)(float, float));
- FUNCTION(powl, long double (*f)(long double, long double));
-
- FUNCTION(remainder, double (*f)(double, double));
- FUNCTION(remainderf, float (*f)(float, float));
- FUNCTION(remainderl, long double (*f)(long double, long double));
-
- FUNCTION(remquo, double (*f)(double, double, int *));
- FUNCTION(remquof, float (*f)(float, float, int *));
- FUNCTION(remquol, long double (*f)(long double, long double, int *));
-
- FUNCTION(rint, double (*f)(double));
- FUNCTION(rintf, float (*f)(float));
- FUNCTION(rintl, long double (*f)(long double));
-
- FUNCTION(round, double (*f)(double));
- FUNCTION(roundf, float (*f)(float));
- FUNCTION(roundl, long double (*f)(long double));
-
- FUNCTION(scalbln, double (*f)(double, long));
- FUNCTION(scalblnf, float (*f)(float, long));
- FUNCTION(scalblnl, long double (*f)(long double, long));
-
- FUNCTION(scalbn, double (*f)(double, int));
- FUNCTION(scalbnf, float (*f)(float, int));
- FUNCTION(scalbnl, long double (*f)(long double, int));
-
- FUNCTION(sin, double (*f)(double));
- FUNCTION(sinf, float (*f)(float));
- FUNCTION(sinh, double (*f)(double));
- FUNCTION(sinhf, float (*f)(float));
- FUNCTION(sinhl, long double (*f)(long double));
- FUNCTION(sinl, long double (*f)(long double));
-
- FUNCTION(sqrt, double (*f)(double));
- FUNCTION(sqrtf, float (*f)(float));
- FUNCTION(sqrtl, long double (*f)(long double));
-
- FUNCTION(tan, double (*f)(double));
- FUNCTION(tanf, float (*f)(float));
- FUNCTION(tanh, double (*f)(double));
- FUNCTION(tanhf, float (*f)(float));
- FUNCTION(tanhl, long double (*f)(long double));
- FUNCTION(tanl, long double (*f)(long double));
-
- FUNCTION(tgamma, double (*f)(double));
- FUNCTION(tgammaf, float (*f)(float));
- FUNCTION(tgammal, long double (*f)(long double));
-
- FUNCTION(trunc, double (*f)(double));
- FUNCTION(truncf, float (*f)(float));
- FUNCTION(truncl, long double (*f)(long double));
-
- FUNCTION(y0, double (*f)(double));
- FUNCTION(y1, double (*f)(double));
- FUNCTION(yn, double (*f)(int, double));
-
- int _ = signgam;
-}
diff --git a/tests/headers/monetary.c b/tests/headers/monetary.c
deleted file mode 100644
index 8a04ecc5..00000000
--- a/tests/headers/monetary.c
+++ /dev/null
@@ -1,17 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/monetary.h.html
-
-#include "core.h"
-
-#include <monetary.h>
-
-TEST(monetary_h)
-{
- TYPE(locale_t);
- TYPE(size_t);
- TYPE(ssize_t);
-
- FUNCTION(strfmon, FN(ssize_t, char *restrict, size_t,
- const char *restrict, ...));
- FUNCTION(strfmon_l, FN(ssize_t, char *restrict, size_t, locale_t,
- const char *restrict, ...));
-}
diff --git a/tests/headers/mqueue.c b/tests/headers/mqueue.c
deleted file mode 100644
index 28193a3c..00000000
--- a/tests/headers/mqueue.c
+++ /dev/null
@@ -1,36 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/mqueue.h.html
-
-#include "core.h"
-
-#include <mqueue.h>
-
-TEST(mqueue_h)
-{
- TYPE(mqd_t);
- TYPE(size_t);
- TYPE(ssize_t);
- TYPE(struct timespec);
-
- INCOMPLETE_TYPE(struct sigevent);
-
- TYPE(struct mq_attr);
- STRUCT_MEMBER(struct mq_attr, long, mq_flags);
- STRUCT_MEMBER(struct mq_attr, long, mq_maxmsg);
- STRUCT_MEMBER(struct mq_attr, long, mq_msgsize);
- STRUCT_MEMBER(struct mq_attr, long, mq_curmsgs);
-
- FUNCTION(mq_close, FN(int, mqd_t));
- FUNCTION(mq_getattr, FN(int, mqd_t, struct mq_attr *));
- FUNCTION(mq_notify, FN(int, mqd_t, const struct sigevent *));
- FUNCTION(mq_open, FN(mqd_t, const char *, int, ...));
- FUNCTION(mq_receive, FN(ssize_t, mqd_t, char *, size_t, unsigned *));
- FUNCTION(mq_send, FN(int, mqd_t, const char *, size_t, unsigned));
- FUNCTION(mq_setattr, FN(int, mqd_t, const struct mq_attr *restrict,
- struct mq_attr *restrict));
- FUNCTION(mq_timedreceive,
- FN(ssize_t, mqd_t, char *restrict, size_t, unsigned *restrict,
- const struct timespec *restrict));
- FUNCTION(mq_timedsend, FN(int, mqd_t, const char *, size_t, unsigned,
- const struct timespec *));
- FUNCTION(mq_unlink, FN(int, const char *));
-}
diff --git a/tests/headers/ndbm.c b/tests/headers/ndbm.c
deleted file mode 100644
index 757f99a2..00000000
--- a/tests/headers/ndbm.c
+++ /dev/null
@@ -1,30 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/netdb.h.html
-
-#include "core.h"
-
-#include <ndbm.h>
-
-TEST(ndbm_h)
-{
- TYPE(datum);
- STRUCT_MEMBER(datum, void *, dptr);
- STRUCT_MEMBER(datum, size_t, dsize);
-
- TYPE(size_t);
-
- INCOMPLETE_TYPE(DBM);
- MACRO(DBM_INSERT);
- MACRO(DBM_REPLACE);
-
- FUNCTION(dbm_clearerr, FN(int, DBM *));
- FUNCTION(dbm_close, FN(void, DBM *));
- FUNCTION(dbm_delete, FN(int, DBM *, datum));
- FUNCTION(dbm_error, FN(int, DBM *));
- FUNCTION(dbm_fetch, FN(datum, DBM *, datum));
- FUNCTION(dbm_firstkey, FN(datum, DBM *));
- FUNCTION(dbm_nextkey, FN(datum, DBM *));
- FUNCTION(dbm_open, FN(DBM *, const char *, int, mode_t));
- FUNCTION(dbm_store, FN(int, DBM *, datum, datum, int));
-
- TYPE(mode_t);
-}
diff --git a/tests/headers/net_if.c b/tests/headers/net_if.c
deleted file mode 100644
index b2a5a29c..00000000
--- a/tests/headers/net_if.c
+++ /dev/null
@@ -1,19 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/net_if.h.html
-
-#include "core.h"
-
-#include <net/if.h>
-
-TEST(net_if_h)
-{
- TYPE(struct if_nameindex);
- STRUCT_MEMBER(struct if_nameindex, unsigned, if_index);
- STRUCT_MEMBER(struct if_nameindex, char *, if_name);
-
- MACRO(IF_NAMESIZE);
-
- FUNCTION(if_freenameindex, FN(void, struct if_nameindex *));
- FUNCTION(if_indextoname, FN(char *, unsigned, char *));
- FUNCTION(if_nameindex, FN(struct if_nameindex *));
- FUNCTION(if_nametoindex, FN(unsigned, const char *));
-}
diff --git a/tests/headers/netdb.c b/tests/headers/netdb.c
deleted file mode 100644
index a9346efe..00000000
--- a/tests/headers/netdb.c
+++ /dev/null
@@ -1,127 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/netdb.h.html
-
-#include "core.h"
-
-#include <netdb.h>
-
-TEST(netdb_h)
-{
- TYPE(struct hostent);
- STRUCT_MEMBER(struct hostent, char *, h_name);
- STRUCT_MEMBER(struct hostent, char **, h_aliases);
- STRUCT_MEMBER(struct hostent, int, h_addrtype);
- STRUCT_MEMBER(struct hostent, int, h_length);
- STRUCT_MEMBER(struct hostent, char **, h_addr_list);
-
- TYPE(struct netent);
- STRUCT_MEMBER(struct netent, char *, n_name);
- STRUCT_MEMBER(struct netent, char **, n_aliases);
- STRUCT_MEMBER(struct netent, int, n_addrtype);
- STRUCT_MEMBER(struct netent, uint32_t, n_net);
-
- TYPE(uint32_t);
- TYPE(struct protoent);
- STRUCT_MEMBER(struct protoent, char *, p_name);
- STRUCT_MEMBER(struct protoent, char **, p_aliases);
- STRUCT_MEMBER(struct protoent, int, p_proto);
-
- TYPE(struct servent);
- STRUCT_MEMBER(struct servent, char *, s_name);
- STRUCT_MEMBER(struct servent, char **, s_aliases);
- STRUCT_MEMBER(struct servent, int, s_port);
- STRUCT_MEMBER(struct servent, char *, s_proto);
-
- MACRO(IPPORT_RESERVED);
-
- TYPE(struct addrinfo);
- STRUCT_MEMBER(struct addrinfo, int, ai_flags);
- STRUCT_MEMBER(struct addrinfo, int, ai_family);
- STRUCT_MEMBER(struct addrinfo, int, ai_socktype);
- STRUCT_MEMBER(struct addrinfo, int, ai_protocol);
- STRUCT_MEMBER(struct addrinfo, socklen_t, ai_addrlen);
- STRUCT_MEMBER(struct addrinfo, struct sockaddr *, ai_addr);
- STRUCT_MEMBER(struct addrinfo, char *, ai_canonname);
- STRUCT_MEMBER(struct addrinfo, struct addrinfo *, ai_next);
-
- MACRO(AI_PASSIVE);
- MACRO(AI_CANONNAME);
- MACRO(AI_NUMERICHOST);
- MACRO(AI_NUMERICSERV);
- MACRO(AI_V4MAPPED);
- MACRO(AI_ALL);
- MACRO(AI_ADDRCONFIG);
-
- MACRO(NI_NOFQDN);
- MACRO(NI_NUMERICHOST);
- MACRO(NI_NAMEREQD);
- MACRO(NI_NUMERICSERV);
- MACRO(NI_NUMERICSCOPE);
- MACRO(NI_DGRAM);
-
- MACRO(EAI_AGAIN);
- MACRO(EAI_BADFLAGS);
- MACRO(EAI_FAIL);
- MACRO(EAI_FAMILY);
- MACRO(EAI_MEMORY);
- MACRO(EAI_NONAME);
- MACRO(EAI_SERVICE);
- MACRO(EAI_SOCKTYPE);
- MACRO(EAI_SYSTEM);
- MACRO(EAI_OVERFLOW);
-
- void endhostent(void);
- void endnetent(void);
- void endprotoent(void);
- void endservent(void);
- void freeaddrinfo(struct addrinfo *);
- const char *gai_strerror(int);
- int getaddrinfo(const char *restrict, const char *restrict,
- const struct addrinfo *restrict,
- struct addrinfo **restrict);
- struct hostent *gethostent(void);
- int getnameinfo(const struct sockaddr *restrict, socklen_t,
- char *restrict, socklen_t, char *restrict, socklen_t,
- int);
- struct netent *getnetbyaddr(uint32_t, int);
- struct netent *getnetbyname(const char *);
- struct netent *getnetent(void);
- struct protoent *getprotobyname(const char *);
- struct protoent *getprotobynumber(int);
- struct protoent *getprotoent(void);
- struct servent *getservbyname(const char *, const char *);
- struct servent *getservbyport(int, const char *);
- struct servent *getservent(void);
- void sethostent(int);
- void setnetent(int);
- void setprotoent(int);
- void setservent(int);
-
- FUNCTION(endhostent, FN(void, void));
- FUNCTION(endnetent, FN(void, void));
- FUNCTION(endprotoent, FN(void, void));
- FUNCTION(endservent, FN(void, void));
- FUNCTION(freeaddrinfo, FN(void, struct addrinfo *));
- FUNCTION(gai_strerror, FN(const char *, int));
- FUNCTION(getaddrinfo,
- FN(int, const char *restrict, const char *restrict,
- const struct addrinfo *restrict,
- struct addrinfo **restrict));
- FUNCTION(gethostent, FN(struct hostent *, void));
- FUNCTION(getnameinfo,
- FN(int, const struct sockaddr *restrict, socklen_t,
- char *restrict, socklen_t, char *restrict, socklen_t, int));
- FUNCTION(getnetbyaddr, FN(struct netent *, uint32_t, int));
- FUNCTION(getnetbyname, FN(struct netent *, const char *));
- FUNCTION(getnetent, FN(struct netent *, void));
- FUNCTION(getprotobyname, FN(struct protoent *, const char *));
- FUNCTION(getprotobynumber, FN(struct protoent *, int));
- FUNCTION(getprotoent, FN(struct protoent *, void));
- FUNCTION(getservbyname,
- FN(struct servent *, const char *, const char *));
- FUNCTION(getservbyport, FN(struct servent *, int, const char *));
- FUNCTION(getservent, FN(struct servent *, void));
- FUNCTION(sethostent, FN(void, int));
- FUNCTION(setnetent, FN(void, int));
- FUNCTION(setprotoent, FN(void, int));
- FUNCTION(setservent, FN(void, int));
-}
diff --git a/tests/headers/netinet_tcp.c b/tests/headers/netinet_tcp.c
deleted file mode 100644
index dad932be..00000000
--- a/tests/headers/netinet_tcp.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/netinet_tcp.h.html
-
-#include "core.h"
-
-#include <netinet/tcp.h>
-
-TEST(netinet_tcp_h)
-{
- MACRO(TCP_NODELAY);
-}