diff options
Diffstat (limited to 'include/uapi/linux')
89 files changed, 3017 insertions, 433 deletions
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild index be88166349a1..00b100023c47 100644 --- a/include/uapi/linux/Kbuild +++ b/include/uapi/linux/Kbuild | |||
| @@ -1,4 +1,5 @@ | |||
| 1 | # UAPI Header export list | 1 | # UAPI Header export list |
| 2 | header-y += android/ | ||
| 2 | header-y += byteorder/ | 3 | header-y += byteorder/ |
| 3 | header-y += can/ | 4 | header-y += can/ |
| 4 | header-y += caif/ | 5 | header-y += caif/ |
| @@ -37,27 +38,27 @@ header-y += aio_abi.h | |||
| 37 | header-y += apm_bios.h | 38 | header-y += apm_bios.h |
| 38 | header-y += arcfb.h | 39 | header-y += arcfb.h |
| 39 | header-y += atalk.h | 40 | header-y += atalk.h |
| 40 | header-y += atm.h | ||
| 41 | header-y += atm_eni.h | ||
| 42 | header-y += atm_he.h | ||
| 43 | header-y += atm_idt77105.h | ||
| 44 | header-y += atm_nicstar.h | ||
| 45 | header-y += atm_tcp.h | ||
| 46 | header-y += atm_zatm.h | ||
| 47 | header-y += atmapi.h | 41 | header-y += atmapi.h |
| 48 | header-y += atmarp.h | 42 | header-y += atmarp.h |
| 49 | header-y += atmbr2684.h | 43 | header-y += atmbr2684.h |
| 50 | header-y += atmclip.h | 44 | header-y += atmclip.h |
| 51 | header-y += atmdev.h | 45 | header-y += atmdev.h |
| 46 | header-y += atm_eni.h | ||
| 47 | header-y += atm.h | ||
| 48 | header-y += atm_he.h | ||
| 49 | header-y += atm_idt77105.h | ||
| 52 | header-y += atmioc.h | 50 | header-y += atmioc.h |
| 53 | header-y += atmlec.h | 51 | header-y += atmlec.h |
| 54 | header-y += atmmpc.h | 52 | header-y += atmmpc.h |
| 53 | header-y += atm_nicstar.h | ||
| 55 | header-y += atmppp.h | 54 | header-y += atmppp.h |
| 56 | header-y += atmsap.h | 55 | header-y += atmsap.h |
| 57 | header-y += atmsvc.h | 56 | header-y += atmsvc.h |
| 57 | header-y += atm_tcp.h | ||
| 58 | header-y += atm_zatm.h | ||
| 58 | header-y += audit.h | 59 | header-y += audit.h |
| 59 | header-y += auto_fs.h | ||
| 60 | header-y += auto_fs4.h | 60 | header-y += auto_fs4.h |
| 61 | header-y += auto_fs.h | ||
| 61 | header-y += auxvec.h | 62 | header-y += auxvec.h |
| 62 | header-y += ax25.h | 63 | header-y += ax25.h |
| 63 | header-y += b1lli.h | 64 | header-y += b1lli.h |
| @@ -67,6 +68,8 @@ header-y += bfs_fs.h | |||
| 67 | header-y += binfmts.h | 68 | header-y += binfmts.h |
| 68 | header-y += blkpg.h | 69 | header-y += blkpg.h |
| 69 | header-y += blktrace_api.h | 70 | header-y += blktrace_api.h |
| 71 | header-y += bpf_common.h | ||
| 72 | header-y += bpf.h | ||
| 70 | header-y += bpqether.h | 73 | header-y += bpqether.h |
| 71 | header-y += bsg.h | 74 | header-y += bsg.h |
| 72 | header-y += btrfs.h | 75 | header-y += btrfs.h |
| @@ -91,21 +94,21 @@ header-y += cyclades.h | |||
| 91 | header-y += cycx_cfm.h | 94 | header-y += cycx_cfm.h |
| 92 | header-y += dcbnl.h | 95 | header-y += dcbnl.h |
| 93 | header-y += dccp.h | 96 | header-y += dccp.h |
| 94 | header-y += dlm.h | 97 | header-y += dlmconstants.h |
| 95 | header-y += dlm_device.h | 98 | header-y += dlm_device.h |
| 99 | header-y += dlm.h | ||
| 96 | header-y += dlm_netlink.h | 100 | header-y += dlm_netlink.h |
| 97 | header-y += dlm_plock.h | 101 | header-y += dlm_plock.h |
| 98 | header-y += dlmconstants.h | ||
| 99 | header-y += dm-ioctl.h | 102 | header-y += dm-ioctl.h |
| 100 | header-y += dm-log-userspace.h | 103 | header-y += dm-log-userspace.h |
| 101 | header-y += dn.h | 104 | header-y += dn.h |
| 102 | header-y += dqblk_xfs.h | 105 | header-y += dqblk_xfs.h |
| 103 | header-y += edd.h | 106 | header-y += edd.h |
| 104 | header-y += efs_fs_sb.h | 107 | header-y += efs_fs_sb.h |
| 108 | header-y += elfcore.h | ||
| 105 | header-y += elf-em.h | 109 | header-y += elf-em.h |
| 106 | header-y += elf-fdpic.h | 110 | header-y += elf-fdpic.h |
| 107 | header-y += elf.h | 111 | header-y += elf.h |
| 108 | header-y += elfcore.h | ||
| 109 | header-y += errno.h | 112 | header-y += errno.h |
| 110 | header-y += errqueue.h | 113 | header-y += errqueue.h |
| 111 | header-y += ethtool.h | 114 | header-y += ethtool.h |
| @@ -123,22 +126,24 @@ header-y += filter.h | |||
| 123 | header-y += firewire-cdev.h | 126 | header-y += firewire-cdev.h |
| 124 | header-y += firewire-constants.h | 127 | header-y += firewire-constants.h |
| 125 | header-y += flat.h | 128 | header-y += flat.h |
| 129 | header-y += fou.h | ||
| 126 | header-y += fs.h | 130 | header-y += fs.h |
| 127 | header-y += fsl_hypervisor.h | 131 | header-y += fsl_hypervisor.h |
| 128 | header-y += fuse.h | 132 | header-y += fuse.h |
| 129 | header-y += futex.h | 133 | header-y += futex.h |
| 130 | header-y += gameport.h | 134 | header-y += gameport.h |
| 131 | header-y += gen_stats.h | ||
| 132 | header-y += genetlink.h | 135 | header-y += genetlink.h |
| 136 | header-y += gen_stats.h | ||
| 133 | header-y += gfs2_ondisk.h | 137 | header-y += gfs2_ondisk.h |
| 134 | header-y += gigaset_dev.h | 138 | header-y += gigaset_dev.h |
| 135 | header-y += hdlc.h | ||
| 136 | header-y += hdlcdrv.h | 139 | header-y += hdlcdrv.h |
| 140 | header-y += hdlc.h | ||
| 137 | header-y += hdreg.h | 141 | header-y += hdreg.h |
| 138 | header-y += hid.h | ||
| 139 | header-y += hiddev.h | 142 | header-y += hiddev.h |
| 143 | header-y += hid.h | ||
| 140 | header-y += hidraw.h | 144 | header-y += hidraw.h |
| 141 | header-y += hpet.h | 145 | header-y += hpet.h |
| 146 | header-y += hsr_netlink.h | ||
| 142 | header-y += hyperv.h | 147 | header-y += hyperv.h |
| 143 | header-y += hysdn_if.h | 148 | header-y += hysdn_if.h |
| 144 | header-y += i2c-dev.h | 149 | header-y += i2c-dev.h |
| @@ -147,7 +152,6 @@ header-y += i2o-dev.h | |||
| 147 | header-y += i8k.h | 152 | header-y += i8k.h |
| 148 | header-y += icmp.h | 153 | header-y += icmp.h |
| 149 | header-y += icmpv6.h | 154 | header-y += icmpv6.h |
| 150 | header-y += if.h | ||
| 151 | header-y += if_addr.h | 155 | header-y += if_addr.h |
| 152 | header-y += if_addrlabel.h | 156 | header-y += if_addrlabel.h |
| 153 | header-y += if_alg.h | 157 | header-y += if_alg.h |
| @@ -161,6 +165,7 @@ header-y += if_ether.h | |||
| 161 | header-y += if_fc.h | 165 | header-y += if_fc.h |
| 162 | header-y += if_fddi.h | 166 | header-y += if_fddi.h |
| 163 | header-y += if_frad.h | 167 | header-y += if_frad.h |
| 168 | header-y += if.h | ||
| 164 | header-y += if_hippi.h | 169 | header-y += if_hippi.h |
| 165 | header-y += if_infiniband.h | 170 | header-y += if_infiniband.h |
| 166 | header-y += if_link.h | 171 | header-y += if_link.h |
| @@ -178,40 +183,41 @@ header-y += if_tunnel.h | |||
| 178 | header-y += if_vlan.h | 183 | header-y += if_vlan.h |
| 179 | header-y += if_x25.h | 184 | header-y += if_x25.h |
| 180 | header-y += igmp.h | 185 | header-y += igmp.h |
| 181 | header-y += in.h | ||
| 182 | header-y += in6.h | 186 | header-y += in6.h |
| 183 | header-y += in_route.h | ||
| 184 | header-y += inet_diag.h | 187 | header-y += inet_diag.h |
| 188 | header-y += in.h | ||
| 185 | header-y += inotify.h | 189 | header-y += inotify.h |
| 186 | header-y += input.h | 190 | header-y += input.h |
| 191 | header-y += in_route.h | ||
| 187 | header-y += ioctl.h | 192 | header-y += ioctl.h |
| 188 | header-y += ip.h | ||
| 189 | header-y += ip6_tunnel.h | 193 | header-y += ip6_tunnel.h |
| 190 | header-y += ip_vs.h | ||
| 191 | header-y += ipc.h | 194 | header-y += ipc.h |
| 195 | header-y += ip.h | ||
| 192 | header-y += ipmi.h | 196 | header-y += ipmi.h |
| 193 | header-y += ipmi_msgdefs.h | 197 | header-y += ipmi_msgdefs.h |
| 194 | header-y += ipsec.h | 198 | header-y += ipsec.h |
| 195 | header-y += ipv6.h | 199 | header-y += ipv6.h |
| 196 | header-y += ipv6_route.h | 200 | header-y += ipv6_route.h |
| 201 | header-y += ip_vs.h | ||
| 197 | header-y += ipx.h | 202 | header-y += ipx.h |
| 198 | header-y += irda.h | 203 | header-y += irda.h |
| 199 | header-y += irqnr.h | 204 | header-y += irqnr.h |
| 200 | header-y += isdn.h | ||
| 201 | header-y += isdn_divertif.h | 205 | header-y += isdn_divertif.h |
| 202 | header-y += isdn_ppp.h | 206 | header-y += isdn.h |
| 203 | header-y += isdnif.h | 207 | header-y += isdnif.h |
| 208 | header-y += isdn_ppp.h | ||
| 204 | header-y += iso_fs.h | 209 | header-y += iso_fs.h |
| 205 | header-y += ivtv.h | ||
| 206 | header-y += ivtvfb.h | 210 | header-y += ivtvfb.h |
| 211 | header-y += ivtv.h | ||
| 207 | header-y += ixjuser.h | 212 | header-y += ixjuser.h |
| 208 | header-y += jffs2.h | 213 | header-y += jffs2.h |
| 209 | header-y += joystick.h | 214 | header-y += joystick.h |
| 210 | header-y += kd.h | 215 | header-y += kcmp.h |
| 211 | header-y += kdev_t.h | 216 | header-y += kdev_t.h |
| 212 | header-y += kernel-page-flags.h | 217 | header-y += kd.h |
| 213 | header-y += kernel.h | ||
| 214 | header-y += kernelcapi.h | 218 | header-y += kernelcapi.h |
| 219 | header-y += kernel.h | ||
| 220 | header-y += kernel-page-flags.h | ||
| 215 | header-y += kexec.h | 221 | header-y += kexec.h |
| 216 | header-y += keyboard.h | 222 | header-y += keyboard.h |
| 217 | header-y += keyctl.h | 223 | header-y += keyctl.h |
| @@ -227,6 +233,7 @@ ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm_para.h \ | |||
| 227 | header-y += kvm_para.h | 233 | header-y += kvm_para.h |
| 228 | endif | 234 | endif |
| 229 | 235 | ||
| 236 | header-y += hw_breakpoint.h | ||
| 230 | header-y += l2tp.h | 237 | header-y += l2tp.h |
| 231 | header-y += libc-compat.h | 238 | header-y += libc-compat.h |
| 232 | header-y += limits.h | 239 | header-y += limits.h |
| @@ -239,6 +246,7 @@ header-y += map_to_7segment.h | |||
| 239 | header-y += matroxfb.h | 246 | header-y += matroxfb.h |
| 240 | header-y += mdio.h | 247 | header-y += mdio.h |
| 241 | header-y += media.h | 248 | header-y += media.h |
| 249 | header-y += media-bus-format.h | ||
| 242 | header-y += mei.h | 250 | header-y += mei.h |
| 243 | header-y += memfd.h | 251 | header-y += memfd.h |
| 244 | header-y += mempolicy.h | 252 | header-y += mempolicy.h |
| @@ -249,44 +257,45 @@ header-y += mii.h | |||
| 249 | header-y += minix_fs.h | 257 | header-y += minix_fs.h |
| 250 | header-y += mman.h | 258 | header-y += mman.h |
| 251 | header-y += mmtimer.h | 259 | header-y += mmtimer.h |
| 260 | header-y += mpls.h | ||
| 252 | header-y += mqueue.h | 261 | header-y += mqueue.h |
| 253 | header-y += mroute.h | ||
| 254 | header-y += mroute6.h | 262 | header-y += mroute6.h |
| 263 | header-y += mroute.h | ||
| 255 | header-y += msdos_fs.h | 264 | header-y += msdos_fs.h |
| 256 | header-y += msg.h | 265 | header-y += msg.h |
| 257 | header-y += mtio.h | 266 | header-y += mtio.h |
| 258 | header-y += n_r3964.h | ||
| 259 | header-y += nbd.h | 267 | header-y += nbd.h |
| 260 | header-y += ncp.h | ||
| 261 | header-y += ncp_fs.h | 268 | header-y += ncp_fs.h |
| 269 | header-y += ncp.h | ||
| 262 | header-y += ncp_mount.h | 270 | header-y += ncp_mount.h |
| 263 | header-y += ncp_no.h | 271 | header-y += ncp_no.h |
| 264 | header-y += neighbour.h | 272 | header-y += neighbour.h |
| 265 | header-y += net.h | ||
| 266 | header-y += net_dropmon.h | ||
| 267 | header-y += net_tstamp.h | ||
| 268 | header-y += netconf.h | 273 | header-y += netconf.h |
| 269 | header-y += netdevice.h | 274 | header-y += netdevice.h |
| 270 | header-y += netlink_diag.h | 275 | header-y += net_dropmon.h |
| 271 | header-y += netfilter.h | ||
| 272 | header-y += netfilter_arp.h | 276 | header-y += netfilter_arp.h |
| 273 | header-y += netfilter_bridge.h | 277 | header-y += netfilter_bridge.h |
| 274 | header-y += netfilter_decnet.h | 278 | header-y += netfilter_decnet.h |
| 279 | header-y += netfilter.h | ||
| 275 | header-y += netfilter_ipv4.h | 280 | header-y += netfilter_ipv4.h |
| 276 | header-y += netfilter_ipv6.h | 281 | header-y += netfilter_ipv6.h |
| 282 | header-y += net.h | ||
| 283 | header-y += netlink_diag.h | ||
| 277 | header-y += netlink.h | 284 | header-y += netlink.h |
| 278 | header-y += netrom.h | 285 | header-y += netrom.h |
| 286 | header-y += net_tstamp.h | ||
| 279 | header-y += nfc.h | 287 | header-y += nfc.h |
| 280 | header-y += nfs.h | ||
| 281 | header-y += nfs2.h | 288 | header-y += nfs2.h |
| 282 | header-y += nfs3.h | 289 | header-y += nfs3.h |
| 283 | header-y += nfs4.h | 290 | header-y += nfs4.h |
| 284 | header-y += nfs4_mount.h | 291 | header-y += nfs4_mount.h |
| 292 | header-y += nfsacl.h | ||
| 285 | header-y += nfs_fs.h | 293 | header-y += nfs_fs.h |
| 294 | header-y += nfs.h | ||
| 286 | header-y += nfs_idmap.h | 295 | header-y += nfs_idmap.h |
| 287 | header-y += nfs_mount.h | 296 | header-y += nfs_mount.h |
| 288 | header-y += nfsacl.h | ||
| 289 | header-y += nl80211.h | 297 | header-y += nl80211.h |
| 298 | header-y += n_r3964.h | ||
| 290 | header-y += nubus.h | 299 | header-y += nubus.h |
| 291 | header-y += nvme.h | 300 | header-y += nvme.h |
| 292 | header-y += nvram.h | 301 | header-y += nvram.h |
| @@ -306,16 +315,16 @@ header-y += pfkeyv2.h | |||
| 306 | header-y += pg.h | 315 | header-y += pg.h |
| 307 | header-y += phantom.h | 316 | header-y += phantom.h |
| 308 | header-y += phonet.h | 317 | header-y += phonet.h |
| 318 | header-y += pktcdvd.h | ||
| 309 | header-y += pkt_cls.h | 319 | header-y += pkt_cls.h |
| 310 | header-y += pkt_sched.h | 320 | header-y += pkt_sched.h |
| 311 | header-y += pktcdvd.h | ||
| 312 | header-y += pmu.h | 321 | header-y += pmu.h |
| 313 | header-y += poll.h | 322 | header-y += poll.h |
| 314 | header-y += posix_types.h | 323 | header-y += posix_types.h |
| 315 | header-y += ppdev.h | 324 | header-y += ppdev.h |
| 316 | header-y += ppp-comp.h | 325 | header-y += ppp-comp.h |
| 317 | header-y += ppp-ioctl.h | ||
| 318 | header-y += ppp_defs.h | 326 | header-y += ppp_defs.h |
| 327 | header-y += ppp-ioctl.h | ||
| 319 | header-y += pps.h | 328 | header-y += pps.h |
| 320 | header-y += prctl.h | 329 | header-y += prctl.h |
| 321 | header-y += psci.h | 330 | header-y += psci.h |
| @@ -347,13 +356,14 @@ header-y += seccomp.h | |||
| 347 | header-y += securebits.h | 356 | header-y += securebits.h |
| 348 | header-y += selinux_netlink.h | 357 | header-y += selinux_netlink.h |
| 349 | header-y += sem.h | 358 | header-y += sem.h |
| 350 | header-y += serial.h | ||
| 351 | header-y += serial_core.h | 359 | header-y += serial_core.h |
| 360 | header-y += serial.h | ||
| 352 | header-y += serial_reg.h | 361 | header-y += serial_reg.h |
| 353 | header-y += serio.h | 362 | header-y += serio.h |
| 354 | header-y += shm.h | 363 | header-y += shm.h |
| 355 | header-y += signal.h | ||
| 356 | header-y += signalfd.h | 364 | header-y += signalfd.h |
| 365 | header-y += signal.h | ||
| 366 | header-y += smiapp.h | ||
| 357 | header-y += snmp.h | 367 | header-y += snmp.h |
| 358 | header-y += sock_diag.h | 368 | header-y += sock_diag.h |
| 359 | header-y += socket.h | 369 | header-y += socket.h |
| @@ -361,8 +371,8 @@ header-y += sockios.h | |||
| 361 | header-y += som.h | 371 | header-y += som.h |
| 362 | header-y += sonet.h | 372 | header-y += sonet.h |
| 363 | header-y += sonypi.h | 373 | header-y += sonypi.h |
| 364 | header-y += sound.h | ||
| 365 | header-y += soundcard.h | 374 | header-y += soundcard.h |
| 375 | header-y += sound.h | ||
| 366 | header-y += stat.h | 376 | header-y += stat.h |
| 367 | header-y += stddef.h | 377 | header-y += stddef.h |
| 368 | header-y += string.h | 378 | header-y += string.h |
| @@ -371,20 +381,23 @@ header-y += swab.h | |||
| 371 | header-y += synclink.h | 381 | header-y += synclink.h |
| 372 | header-y += sysctl.h | 382 | header-y += sysctl.h |
| 373 | header-y += sysinfo.h | 383 | header-y += sysinfo.h |
| 384 | header-y += target_core_user.h | ||
| 374 | header-y += taskstats.h | 385 | header-y += taskstats.h |
| 375 | header-y += tcp.h | 386 | header-y += tcp.h |
| 376 | header-y += tcp_metrics.h | 387 | header-y += tcp_metrics.h |
| 377 | header-y += telephony.h | 388 | header-y += telephony.h |
| 378 | header-y += termios.h | 389 | header-y += termios.h |
| 390 | header-y += thermal.h | ||
| 379 | header-y += time.h | 391 | header-y += time.h |
| 380 | header-y += times.h | 392 | header-y += times.h |
| 381 | header-y += timex.h | 393 | header-y += timex.h |
| 382 | header-y += tiocl.h | 394 | header-y += tiocl.h |
| 383 | header-y += tipc.h | ||
| 384 | header-y += tipc_config.h | 395 | header-y += tipc_config.h |
| 396 | header-y += tipc_netlink.h | ||
| 397 | header-y += tipc.h | ||
| 385 | header-y += toshiba.h | 398 | header-y += toshiba.h |
| 386 | header-y += tty.h | ||
| 387 | header-y += tty_flags.h | 399 | header-y += tty_flags.h |
| 400 | header-y += tty.h | ||
| 388 | header-y += types.h | 401 | header-y += types.h |
| 389 | header-y += udf_fs_i.h | 402 | header-y += udf_fs_i.h |
| 390 | header-y += udp.h | 403 | header-y += udp.h |
| @@ -420,6 +433,9 @@ header-y += virtio_net.h | |||
| 420 | header-y += virtio_pci.h | 433 | header-y += virtio_pci.h |
| 421 | header-y += virtio_ring.h | 434 | header-y += virtio_ring.h |
| 422 | header-y += virtio_rng.h | 435 | header-y += virtio_rng.h |
| 436 | header-y += virtio_scsi.h | ||
| 437 | header-y += virtio_types.h | ||
| 438 | header-y += vm_sockets.h | ||
| 423 | header-y += vt.h | 439 | header-y += vt.h |
| 424 | header-y += wait.h | 440 | header-y += wait.h |
| 425 | header-y += wanrouter.h | 441 | header-y += wanrouter.h |
| @@ -429,6 +445,5 @@ header-y += wireless.h | |||
| 429 | header-y += x25.h | 445 | header-y += x25.h |
| 430 | header-y += xattr.h | 446 | header-y += xattr.h |
| 431 | header-y += xfrm.h | 447 | header-y += xfrm.h |
| 432 | header-y += hw_breakpoint.h | ||
| 433 | header-y += zorro.h | 448 | header-y += zorro.h |
| 434 | header-y += zorro_ids.h | 449 | header-y += zorro_ids.h |
diff --git a/include/uapi/linux/android/Kbuild b/include/uapi/linux/android/Kbuild new file mode 100644 index 000000000000..ca011eec252a --- /dev/null +++ b/include/uapi/linux/android/Kbuild | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | # UAPI Header export list | ||
| 2 | header-y += binder.h | ||
diff --git a/include/uapi/linux/android/binder.h b/include/uapi/linux/android/binder.h new file mode 100644 index 000000000000..41420e341e75 --- /dev/null +++ b/include/uapi/linux/android/binder.h | |||
| @@ -0,0 +1,352 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2008 Google, Inc. | ||
| 3 | * | ||
| 4 | * Based on, but no longer compatible with, the original | ||
| 5 | * OpenBinder.org binder driver interface, which is: | ||
| 6 | * | ||
| 7 | * Copyright (c) 2005 Palmsource, Inc. | ||
| 8 | * | ||
| 9 | * This software is licensed under the terms of the GNU General Public | ||
| 10 | * License version 2, as published by the Free Software Foundation, and | ||
| 11 | * may be copied, distributed, and modified under those terms. | ||
| 12 | * | ||
| 13 | * This program is distributed in the hope that it will be useful, | ||
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 16 | * GNU General Public License for more details. | ||
| 17 | * | ||
| 18 | */ | ||
| 19 | |||
| 20 | #ifndef _UAPI_LINUX_BINDER_H | ||
| 21 | #define _UAPI_LINUX_BINDER_H | ||
| 22 | |||
| 23 | #include <linux/types.h> | ||
| 24 | #include <linux/ioctl.h> | ||
| 25 | |||
| 26 | #define B_PACK_CHARS(c1, c2, c3, c4) \ | ||
| 27 | ((((c1)<<24)) | (((c2)<<16)) | (((c3)<<8)) | (c4)) | ||
| 28 | #define B_TYPE_LARGE 0x85 | ||
| 29 | |||
| 30 | enum { | ||
| 31 | BINDER_TYPE_BINDER = B_PACK_CHARS('s', 'b', '*', B_TYPE_LARGE), | ||
| 32 | BINDER_TYPE_WEAK_BINDER = B_PACK_CHARS('w', 'b', '*', B_TYPE_LARGE), | ||
| 33 | BINDER_TYPE_HANDLE = B_PACK_CHARS('s', 'h', '*', B_TYPE_LARGE), | ||
| 34 | BINDER_TYPE_WEAK_HANDLE = B_PACK_CHARS('w', 'h', '*', B_TYPE_LARGE), | ||
| 35 | BINDER_TYPE_FD = B_PACK_CHARS('f', 'd', '*', B_TYPE_LARGE), | ||
| 36 | }; | ||
| 37 | |||
| 38 | enum { | ||
| 39 | FLAT_BINDER_FLAG_PRIORITY_MASK = 0xff, | ||
| 40 | FLAT_BINDER_FLAG_ACCEPTS_FDS = 0x100, | ||
| 41 | }; | ||
| 42 | |||
| 43 | #ifdef BINDER_IPC_32BIT | ||
| 44 | typedef __u32 binder_size_t; | ||
| 45 | typedef __u32 binder_uintptr_t; | ||
| 46 | #else | ||
| 47 | typedef __u64 binder_size_t; | ||
| 48 | typedef __u64 binder_uintptr_t; | ||
| 49 | #endif | ||
| 50 | |||
| 51 | /* | ||
| 52 | * This is the flattened representation of a Binder object for transfer | ||
| 53 | * between processes. The 'offsets' supplied as part of a binder transaction | ||
| 54 | * contains offsets into the data where these structures occur. The Binder | ||
| 55 | * driver takes care of re-writing the structure type and data as it moves | ||
| 56 | * between processes. | ||
| 57 | */ | ||
| 58 | struct flat_binder_object { | ||
| 59 | /* 8 bytes for large_flat_header. */ | ||
| 60 | __u32 type; | ||
| 61 | __u32 flags; | ||
| 62 | |||
| 63 | /* 8 bytes of data. */ | ||
| 64 | union { | ||
| 65 | binder_uintptr_t binder; /* local object */ | ||
| 66 | __u32 handle; /* remote object */ | ||
| 67 | }; | ||
| 68 | |||
| 69 | /* extra data associated with local object */ | ||
| 70 | binder_uintptr_t cookie; | ||
| 71 | }; | ||
| 72 | |||
| 73 | /* | ||
| 74 | * On 64-bit platforms where user code may run in 32-bits the driver must | ||
| 75 | * translate the buffer (and local binder) addresses appropriately. | ||
| 76 | */ | ||
| 77 | |||
| 78 | struct binder_write_read { | ||
| 79 | binder_size_t write_size; /* bytes to write */ | ||
| 80 | binder_size_t write_consumed; /* bytes consumed by driver */ | ||
| 81 | binder_uintptr_t write_buffer; | ||
| 82 | binder_size_t read_size; /* bytes to read */ | ||
| 83 | binder_size_t read_consumed; /* bytes consumed by driver */ | ||
| 84 | binder_uintptr_t read_buffer; | ||
| 85 | }; | ||
| 86 | |||
| 87 | /* Use with BINDER_VERSION, driver fills in fields. */ | ||
| 88 | struct binder_version { | ||
| 89 | /* driver protocol version -- increment with incompatible change */ | ||
| 90 | __s32 protocol_version; | ||
| 91 | }; | ||
| 92 | |||
| 93 | /* This is the current protocol version. */ | ||
| 94 | #ifdef BINDER_IPC_32BIT | ||
| 95 | #define BINDER_CURRENT_PROTOCOL_VERSION 7 | ||
| 96 | #else | ||
| 97 | #define BINDER_CURRENT_PROTOCOL_VERSION 8 | ||
| 98 | #endif | ||
| 99 | |||
| 100 | #define BINDER_WRITE_READ _IOWR('b', 1, struct binder_write_read) | ||
| 101 | #define BINDER_SET_IDLE_TIMEOUT _IOW('b', 3, __s64) | ||
| 102 | #define BINDER_SET_MAX_THREADS _IOW('b', 5, __u32) | ||
| 103 | #define BINDER_SET_IDLE_PRIORITY _IOW('b', 6, __s32) | ||
| 104 | #define BINDER_SET_CONTEXT_MGR _IOW('b', 7, __s32) | ||
| 105 | #define BINDER_THREAD_EXIT _IOW('b', 8, __s32) | ||
| 106 | #define BINDER_VERSION _IOWR('b', 9, struct binder_version) | ||
| 107 | |||
| 108 | /* | ||
| 109 | * NOTE: Two special error codes you should check for when calling | ||
| 110 | * in to the driver are: | ||
| 111 | * | ||
| 112 | * EINTR -- The operation has been interupted. This should be | ||
| 113 | * handled by retrying the ioctl() until a different error code | ||
| 114 | * is returned. | ||
| 115 | * | ||
| 116 | * ECONNREFUSED -- The driver is no longer accepting operations | ||
| 117 | * from your process. That is, the process is being destroyed. | ||
| 118 | * You should handle this by exiting from your process. Note | ||
| 119 | * that once this error code is returned, all further calls to | ||
| 120 | * the driver from any thread will return this same code. | ||
| 121 | */ | ||
| 122 | |||
| 123 | enum transaction_flags { | ||
| 124 | TF_ONE_WAY = 0x01, /* this is a one-way call: async, no return */ | ||
| 125 | TF_ROOT_OBJECT = 0x04, /* contents are the component's root object */ | ||
| 126 | TF_STATUS_CODE = 0x08, /* contents are a 32-bit status code */ | ||
| 127 | TF_ACCEPT_FDS = 0x10, /* allow replies with file descriptors */ | ||
| 128 | }; | ||
| 129 | |||
| 130 | struct binder_transaction_data { | ||
| 131 | /* The first two are only used for bcTRANSACTION and brTRANSACTION, | ||
| 132 | * identifying the target and contents of the transaction. | ||
| 133 | */ | ||
| 134 | union { | ||
| 135 | /* target descriptor of command transaction */ | ||
| 136 | __u32 handle; | ||
| 137 | /* target descriptor of return transaction */ | ||
| 138 | binder_uintptr_t ptr; | ||
| 139 | } target; | ||
| 140 | binder_uintptr_t cookie; /* target object cookie */ | ||
| 141 | __u32 code; /* transaction command */ | ||
| 142 | |||
| 143 | /* General information about the transaction. */ | ||
| 144 | __u32 flags; | ||
| 145 | pid_t sender_pid; | ||
| 146 | uid_t sender_euid; | ||
| 147 | binder_size_t data_size; /* number of bytes of data */ | ||
| 148 | binder_size_t offsets_size; /* number of bytes of offsets */ | ||
| 149 | |||
| 150 | /* If this transaction is inline, the data immediately | ||
| 151 | * follows here; otherwise, it ends with a pointer to | ||
| 152 | * the data buffer. | ||
| 153 | */ | ||
| 154 | union { | ||
| 155 | struct { | ||
| 156 | /* transaction data */ | ||
| 157 | binder_uintptr_t buffer; | ||
| 158 | /* offsets from buffer to flat_binder_object structs */ | ||
| 159 | binder_uintptr_t offsets; | ||
| 160 | } ptr; | ||
| 161 | __u8 buf[8]; | ||
| 162 | } data; | ||
| 163 | }; | ||
| 164 | |||
| 165 | struct binder_ptr_cookie { | ||
| 166 | binder_uintptr_t ptr; | ||
| 167 | binder_uintptr_t cookie; | ||
| 168 | }; | ||
| 169 | |||
| 170 | struct binder_handle_cookie { | ||
| 171 | __u32 handle; | ||
| 172 | binder_uintptr_t cookie; | ||
| 173 | } __packed; | ||
| 174 | |||
| 175 | struct binder_pri_desc { | ||
| 176 | __s32 priority; | ||
| 177 | __u32 desc; | ||
| 178 | }; | ||
| 179 | |||
| 180 | struct binder_pri_ptr_cookie { | ||
| 181 | __s32 priority; | ||
| 182 | binder_uintptr_t ptr; | ||
| 183 | binder_uintptr_t cookie; | ||
| 184 | }; | ||
| 185 | |||
| 186 | enum binder_driver_return_protocol { | ||
| 187 | BR_ERROR = _IOR('r', 0, __s32), | ||
| 188 | /* | ||
| 189 | * int: error code | ||
| 190 | */ | ||
| 191 | |||
| 192 | BR_OK = _IO('r', 1), | ||
| 193 | /* No parameters! */ | ||
| 194 | |||
| 195 | BR_TRANSACTION = _IOR('r', 2, struct binder_transaction_data), | ||
| 196 | BR_REPLY = _IOR('r', 3, struct binder_transaction_data), | ||
| 197 | /* | ||
| 198 | * binder_transaction_data: the received command. | ||
| 199 | */ | ||
| 200 | |||
| 201 | BR_ACQUIRE_RESULT = _IOR('r', 4, __s32), | ||
| 202 | /* | ||
| 203 | * not currently supported | ||
| 204 | * int: 0 if the last bcATTEMPT_ACQUIRE was not successful. | ||
| 205 | * Else the remote object has acquired a primary reference. | ||
| 206 | */ | ||
| 207 | |||
| 208 | BR_DEAD_REPLY = _IO('r', 5), | ||
| 209 | /* | ||
| 210 | * The target of the last transaction (either a bcTRANSACTION or | ||
| 211 | * a bcATTEMPT_ACQUIRE) is no longer with us. No parameters. | ||
| 212 | */ | ||
| 213 | |||
| 214 | BR_TRANSACTION_COMPLETE = _IO('r', 6), | ||
| 215 | /* | ||
| 216 | * No parameters... always refers to the last transaction requested | ||
| 217 | * (including replies). Note that this will be sent even for | ||
| 218 | * asynchronous transactions. | ||
| 219 | */ | ||
| 220 | |||
| 221 | BR_INCREFS = _IOR('r', 7, struct binder_ptr_cookie), | ||
| 222 | BR_ACQUIRE = _IOR('r', 8, struct binder_ptr_cookie), | ||
| 223 | BR_RELEASE = _IOR('r', 9, struct binder_ptr_cookie), | ||
| 224 | BR_DECREFS = _IOR('r', 10, struct binder_ptr_cookie), | ||
| 225 | /* | ||
| 226 | * void *: ptr to binder | ||
| 227 | * void *: cookie for binder | ||
| 228 | */ | ||
| 229 | |||
| 230 | BR_ATTEMPT_ACQUIRE = _IOR('r', 11, struct binder_pri_ptr_cookie), | ||
| 231 | /* | ||
| 232 | * not currently supported | ||
| 233 | * int: priority | ||
| 234 | * void *: ptr to binder | ||
| 235 | * void *: cookie for binder | ||
| 236 | */ | ||
| 237 | |||
| 238 | BR_NOOP = _IO('r', 12), | ||
| 239 | /* | ||
| 240 | * No parameters. Do nothing and examine the next command. It exists | ||
| 241 | * primarily so that we can replace it with a BR_SPAWN_LOOPER command. | ||
| 242 | */ | ||
| 243 | |||
| 244 | BR_SPAWN_LOOPER = _IO('r', 13), | ||
| 245 | /* | ||
| 246 | * No parameters. The driver has determined that a process has no | ||
| 247 | * threads waiting to service incoming transactions. When a process | ||
| 248 | * receives this command, it must spawn a new service thread and | ||
| 249 | * register it via bcENTER_LOOPER. | ||
| 250 | */ | ||
| 251 | |||
| 252 | BR_FINISHED = _IO('r', 14), | ||
| 253 | /* | ||
| 254 | * not currently supported | ||
| 255 | * stop threadpool thread | ||
| 256 | */ | ||
| 257 | |||
| 258 | BR_DEAD_BINDER = _IOR('r', 15, binder_uintptr_t), | ||
| 259 | /* | ||
| 260 | * void *: cookie | ||
| 261 | */ | ||
| 262 | BR_CLEAR_DEATH_NOTIFICATION_DONE = _IOR('r', 16, binder_uintptr_t), | ||
| 263 | /* | ||
| 264 | * void *: cookie | ||
| 265 | */ | ||
| 266 | |||
| 267 | BR_FAILED_REPLY = _IO('r', 17), | ||
| 268 | /* | ||
| 269 | * The the last transaction (either a bcTRANSACTION or | ||
| 270 | * a bcATTEMPT_ACQUIRE) failed (e.g. out of memory). No parameters. | ||
| 271 | */ | ||
| 272 | }; | ||
| 273 | |||
| 274 | enum binder_driver_command_protocol { | ||
| 275 | BC_TRANSACTION = _IOW('c', 0, struct binder_transaction_data), | ||
| 276 | BC_REPLY = _IOW('c', 1, struct binder_transaction_data), | ||
| 277 | /* | ||
| 278 | * binder_transaction_data: the sent command. | ||
| 279 | */ | ||
| 280 | |||
| 281 | BC_ACQUIRE_RESULT = _IOW('c', 2, __s32), | ||
| 282 | /* | ||
| 283 | * not currently supported | ||
| 284 | * int: 0 if the last BR_ATTEMPT_ACQUIRE was not successful. | ||
| 285 | * Else you have acquired a primary reference on the object. | ||
| 286 | */ | ||
| 287 | |||
| 288 | BC_FREE_BUFFER = _IOW('c', 3, binder_uintptr_t), | ||
| 289 | /* | ||
| 290 | * void *: ptr to transaction data received on a read | ||
| 291 | */ | ||
| 292 | |||
| 293 | BC_INCREFS = _IOW('c', 4, __u32), | ||
| 294 | BC_ACQUIRE = _IOW('c', 5, __u32), | ||
| 295 | BC_RELEASE = _IOW('c', 6, __u32), | ||
| 296 | BC_DECREFS = _IOW('c', 7, __u32), | ||
| 297 | /* | ||
| 298 | * int: descriptor | ||
| 299 | */ | ||
| 300 | |||
| 301 | BC_INCREFS_DONE = _IOW('c', 8, struct binder_ptr_cookie), | ||
| 302 | BC_ACQUIRE_DONE = _IOW('c', 9, struct binder_ptr_cookie), | ||
| 303 | /* | ||
| 304 | * void *: ptr to binder | ||
| 305 | * void *: cookie for binder | ||
| 306 | */ | ||
| 307 | |||
| 308 | BC_ATTEMPT_ACQUIRE = _IOW('c', 10, struct binder_pri_desc), | ||
| 309 | /* | ||
| 310 | * not currently supported | ||
| 311 | * int: priority | ||
| 312 | * int: descriptor | ||
| 313 | */ | ||
| 314 | |||
| 315 | BC_REGISTER_LOOPER = _IO('c', 11), | ||
| 316 | /* | ||
| 317 | * No parameters. | ||
| 318 | * Register a spawned looper thread with the device. | ||
| 319 | */ | ||
| 320 | |||
| 321 | BC_ENTER_LOOPER = _IO('c', 12), | ||
| 322 | BC_EXIT_LOOPER = _IO('c', 13), | ||
| 323 | /* | ||
| 324 | * No parameters. | ||
| 325 | * These two commands are sent as an application-level thread | ||
| 326 | * enters and exits the binder loop, respectively. They are | ||
| 327 | * used so the binder can have an accurate count of the number | ||
| 328 | * of looping threads it has available. | ||
| 329 | */ | ||
| 330 | |||
| 331 | BC_REQUEST_DEATH_NOTIFICATION = _IOW('c', 14, | ||
| 332 | struct binder_handle_cookie), | ||
| 333 | /* | ||
| 334 | * int: handle | ||
| 335 | * void *: cookie | ||
| 336 | */ | ||
| 337 | |||
| 338 | BC_CLEAR_DEATH_NOTIFICATION = _IOW('c', 15, | ||
| 339 | struct binder_handle_cookie), | ||
| 340 | /* | ||
| 341 | * int: handle | ||
| 342 | * void *: cookie | ||
| 343 | */ | ||
| 344 | |||
| 345 | BC_DEAD_BINDER_DONE = _IOW('c', 16, binder_uintptr_t), | ||
| 346 | /* | ||
| 347 | * void *: cookie | ||
| 348 | */ | ||
| 349 | }; | ||
| 350 | |||
| 351 | #endif /* _UAPI_LINUX_BINDER_H */ | ||
| 352 | |||
diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h index 3b9ff33e1768..d3475e1f15ec 100644 --- a/include/uapi/linux/audit.h +++ b/include/uapi/linux/audit.h | |||
| @@ -322,9 +322,15 @@ enum { | |||
| 322 | #define AUDIT_STATUS_BACKLOG_LIMIT 0x0010 | 322 | #define AUDIT_STATUS_BACKLOG_LIMIT 0x0010 |
| 323 | #define AUDIT_STATUS_BACKLOG_WAIT_TIME 0x0020 | 323 | #define AUDIT_STATUS_BACKLOG_WAIT_TIME 0x0020 |
| 324 | 324 | ||
| 325 | #define AUDIT_VERSION_BACKLOG_LIMIT 1 | 325 | #define AUDIT_FEATURE_BITMAP_BACKLOG_LIMIT 0x00000001 |
| 326 | #define AUDIT_VERSION_BACKLOG_WAIT_TIME 2 | 326 | #define AUDIT_FEATURE_BITMAP_BACKLOG_WAIT_TIME 0x00000002 |
| 327 | #define AUDIT_VERSION_LATEST AUDIT_VERSION_BACKLOG_WAIT_TIME | 327 | #define AUDIT_FEATURE_BITMAP_ALL (AUDIT_FEATURE_BITMAP_BACKLOG_LIMIT | \ |
| 328 | AUDIT_FEATURE_BITMAP_BACKLOG_WAIT_TIME) | ||
| 329 | |||
| 330 | /* deprecated: AUDIT_VERSION_* */ | ||
| 331 | #define AUDIT_VERSION_LATEST AUDIT_FEATURE_BITMAP_ALL | ||
| 332 | #define AUDIT_VERSION_BACKLOG_LIMIT AUDIT_FEATURE_BITMAP_BACKLOG_LIMIT | ||
| 333 | #define AUDIT_VERSION_BACKLOG_WAIT_TIME AUDIT_FEATURE_BITMAP_BACKLOG_WAIT_TIME | ||
| 328 | 334 | ||
| 329 | /* Failure-to-log actions */ | 335 | /* Failure-to-log actions */ |
| 330 | #define AUDIT_FAIL_SILENT 0 | 336 | #define AUDIT_FAIL_SILENT 0 |
| @@ -352,6 +358,7 @@ enum { | |||
| 352 | #define AUDIT_ARCH_IA64 (EM_IA_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | 358 | #define AUDIT_ARCH_IA64 (EM_IA_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) |
| 353 | #define AUDIT_ARCH_M32R (EM_M32R) | 359 | #define AUDIT_ARCH_M32R (EM_M32R) |
| 354 | #define AUDIT_ARCH_M68K (EM_68K) | 360 | #define AUDIT_ARCH_M68K (EM_68K) |
| 361 | #define AUDIT_ARCH_MICROBLAZE (EM_MICROBLAZE) | ||
| 355 | #define AUDIT_ARCH_MIPS (EM_MIPS) | 362 | #define AUDIT_ARCH_MIPS (EM_MIPS) |
| 356 | #define AUDIT_ARCH_MIPSEL (EM_MIPS|__AUDIT_ARCH_LE) | 363 | #define AUDIT_ARCH_MIPSEL (EM_MIPS|__AUDIT_ARCH_LE) |
| 357 | #define AUDIT_ARCH_MIPS64 (EM_MIPS|__AUDIT_ARCH_64BIT) | 364 | #define AUDIT_ARCH_MIPS64 (EM_MIPS|__AUDIT_ARCH_64BIT) |
| @@ -364,7 +371,9 @@ enum { | |||
| 364 | #define AUDIT_ARCH_PARISC (EM_PARISC) | 371 | #define AUDIT_ARCH_PARISC (EM_PARISC) |
| 365 | #define AUDIT_ARCH_PARISC64 (EM_PARISC|__AUDIT_ARCH_64BIT) | 372 | #define AUDIT_ARCH_PARISC64 (EM_PARISC|__AUDIT_ARCH_64BIT) |
| 366 | #define AUDIT_ARCH_PPC (EM_PPC) | 373 | #define AUDIT_ARCH_PPC (EM_PPC) |
| 374 | /* do not define AUDIT_ARCH_PPCLE since it is not supported by audit */ | ||
| 367 | #define AUDIT_ARCH_PPC64 (EM_PPC64|__AUDIT_ARCH_64BIT) | 375 | #define AUDIT_ARCH_PPC64 (EM_PPC64|__AUDIT_ARCH_64BIT) |
| 376 | #define AUDIT_ARCH_PPC64LE (EM_PPC64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | ||
| 368 | #define AUDIT_ARCH_S390 (EM_S390) | 377 | #define AUDIT_ARCH_S390 (EM_S390) |
| 369 | #define AUDIT_ARCH_S390X (EM_S390|__AUDIT_ARCH_64BIT) | 378 | #define AUDIT_ARCH_S390X (EM_S390|__AUDIT_ARCH_64BIT) |
| 370 | #define AUDIT_ARCH_SH (EM_SH) | 379 | #define AUDIT_ARCH_SH (EM_SH) |
| @@ -403,7 +412,10 @@ struct audit_status { | |||
| 403 | __u32 backlog_limit; /* waiting messages limit */ | 412 | __u32 backlog_limit; /* waiting messages limit */ |
| 404 | __u32 lost; /* messages lost */ | 413 | __u32 lost; /* messages lost */ |
| 405 | __u32 backlog; /* messages waiting in queue */ | 414 | __u32 backlog; /* messages waiting in queue */ |
| 406 | __u32 version; /* audit api version number */ | 415 | union { |
| 416 | __u32 version; /* deprecated: audit api version num */ | ||
| 417 | __u32 feature_bitmap; /* bitmap of kernel audit features */ | ||
| 418 | }; | ||
| 407 | __u32 backlog_wait_time;/* message queue wait timeout */ | 419 | __u32 backlog_wait_time;/* message queue wait timeout */ |
| 408 | }; | 420 | }; |
| 409 | 421 | ||
| @@ -445,17 +457,4 @@ struct audit_rule_data { | |||
| 445 | char buf[0]; /* string fields buffer */ | 457 | char buf[0]; /* string fields buffer */ |
| 446 | }; | 458 | }; |
| 447 | 459 | ||
| 448 | /* audit_rule is supported to maintain backward compatibility with | ||
| 449 | * userspace. It supports integer fields only and corresponds to | ||
| 450 | * AUDIT_ADD, AUDIT_DEL and AUDIT_LIST requests. | ||
| 451 | */ | ||
| 452 | struct audit_rule { /* for AUDIT_LIST, AUDIT_ADD, and AUDIT_DEL */ | ||
| 453 | __u32 flags; /* AUDIT_PER_{TASK,CALL}, AUDIT_PREPEND */ | ||
| 454 | __u32 action; /* AUDIT_NEVER, AUDIT_POSSIBLE, AUDIT_ALWAYS */ | ||
| 455 | __u32 field_count; | ||
| 456 | __u32 mask[AUDIT_BITMASK_SIZE]; | ||
| 457 | __u32 fields[AUDIT_MAX_FIELDS]; | ||
| 458 | __u32 values[AUDIT_MAX_FIELDS]; | ||
| 459 | }; | ||
| 460 | |||
| 461 | #endif /* _UAPI_LINUX_AUDIT_H_ */ | 460 | #endif /* _UAPI_LINUX_AUDIT_H_ */ |
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h new file mode 100644 index 000000000000..45da7ec7d274 --- /dev/null +++ b/include/uapi/linux/bpf.h | |||
| @@ -0,0 +1,168 @@ | |||
| 1 | /* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com | ||
| 2 | * | ||
| 3 | * This program is free software; you can redistribute it and/or | ||
| 4 | * modify it under the terms of version 2 of the GNU General Public | ||
| 5 | * License as published by the Free Software Foundation. | ||
| 6 | */ | ||
| 7 | #ifndef _UAPI__LINUX_BPF_H__ | ||
| 8 | #define _UAPI__LINUX_BPF_H__ | ||
| 9 | |||
| 10 | #include <linux/types.h> | ||
| 11 | #include <linux/bpf_common.h> | ||
| 12 | |||
| 13 | /* Extended instruction set based on top of classic BPF */ | ||
| 14 | |||
| 15 | /* instruction classes */ | ||
| 16 | #define BPF_ALU64 0x07 /* alu mode in double word width */ | ||
| 17 | |||
| 18 | /* ld/ldx fields */ | ||
| 19 | #define BPF_DW 0x18 /* double word */ | ||
| 20 | #define BPF_XADD 0xc0 /* exclusive add */ | ||
| 21 | |||
| 22 | /* alu/jmp fields */ | ||
| 23 | #define BPF_MOV 0xb0 /* mov reg to reg */ | ||
| 24 | #define BPF_ARSH 0xc0 /* sign extending arithmetic shift right */ | ||
| 25 | |||
| 26 | /* change endianness of a register */ | ||
| 27 | #define BPF_END 0xd0 /* flags for endianness conversion: */ | ||
| 28 | #define BPF_TO_LE 0x00 /* convert to little-endian */ | ||
| 29 | #define BPF_TO_BE 0x08 /* convert to big-endian */ | ||
| 30 | #define BPF_FROM_LE BPF_TO_LE | ||
| 31 | #define BPF_FROM_BE BPF_TO_BE | ||
| 32 | |||
| 33 | #define BPF_JNE 0x50 /* jump != */ | ||
| 34 | #define BPF_JSGT 0x60 /* SGT is signed '>', GT in x86 */ | ||
| 35 | #define BPF_JSGE 0x70 /* SGE is signed '>=', GE in x86 */ | ||
| 36 | #define BPF_CALL 0x80 /* function call */ | ||
| 37 | #define BPF_EXIT 0x90 /* function return */ | ||
| 38 | |||
| 39 | /* Register numbers */ | ||
| 40 | enum { | ||
| 41 | BPF_REG_0 = 0, | ||
| 42 | BPF_REG_1, | ||
| 43 | BPF_REG_2, | ||
| 44 | BPF_REG_3, | ||
| 45 | BPF_REG_4, | ||
| 46 | BPF_REG_5, | ||
| 47 | BPF_REG_6, | ||
| 48 | BPF_REG_7, | ||
| 49 | BPF_REG_8, | ||
| 50 | BPF_REG_9, | ||
| 51 | BPF_REG_10, | ||
| 52 | __MAX_BPF_REG, | ||
| 53 | }; | ||
| 54 | |||
| 55 | /* BPF has 10 general purpose 64-bit registers and stack frame. */ | ||
| 56 | #define MAX_BPF_REG __MAX_BPF_REG | ||
| 57 | |||
| 58 | struct bpf_insn { | ||
| 59 | __u8 code; /* opcode */ | ||
| 60 | __u8 dst_reg:4; /* dest register */ | ||
| 61 | __u8 src_reg:4; /* source register */ | ||
| 62 | __s16 off; /* signed offset */ | ||
| 63 | __s32 imm; /* signed immediate constant */ | ||
| 64 | }; | ||
| 65 | |||
| 66 | /* BPF syscall commands */ | ||
| 67 | enum bpf_cmd { | ||
| 68 | /* create a map with given type and attributes | ||
| 69 | * fd = bpf(BPF_MAP_CREATE, union bpf_attr *, u32 size) | ||
| 70 | * returns fd or negative error | ||
| 71 | * map is deleted when fd is closed | ||
| 72 | */ | ||
| 73 | BPF_MAP_CREATE, | ||
| 74 | |||
| 75 | /* lookup key in a given map | ||
| 76 | * err = bpf(BPF_MAP_LOOKUP_ELEM, union bpf_attr *attr, u32 size) | ||
| 77 | * Using attr->map_fd, attr->key, attr->value | ||
| 78 | * returns zero and stores found elem into value | ||
| 79 | * or negative error | ||
| 80 | */ | ||
| 81 | BPF_MAP_LOOKUP_ELEM, | ||
| 82 | |||
| 83 | /* create or update key/value pair in a given map | ||
| 84 | * err = bpf(BPF_MAP_UPDATE_ELEM, union bpf_attr *attr, u32 size) | ||
| 85 | * Using attr->map_fd, attr->key, attr->value, attr->flags | ||
| 86 | * returns zero or negative error | ||
| 87 | */ | ||
| 88 | BPF_MAP_UPDATE_ELEM, | ||
| 89 | |||
| 90 | /* find and delete elem by key in a given map | ||
| 91 | * err = bpf(BPF_MAP_DELETE_ELEM, union bpf_attr *attr, u32 size) | ||
| 92 | * Using attr->map_fd, attr->key | ||
| 93 | * returns zero or negative error | ||
| 94 | */ | ||
| 95 | BPF_MAP_DELETE_ELEM, | ||
| 96 | |||
| 97 | /* lookup key in a given map and return next key | ||
| 98 | * err = bpf(BPF_MAP_GET_NEXT_KEY, union bpf_attr *attr, u32 size) | ||
| 99 | * Using attr->map_fd, attr->key, attr->next_key | ||
| 100 | * returns zero and stores next key or negative error | ||
| 101 | */ | ||
| 102 | BPF_MAP_GET_NEXT_KEY, | ||
| 103 | |||
| 104 | /* verify and load eBPF program | ||
| 105 | * prog_fd = bpf(BPF_PROG_LOAD, union bpf_attr *attr, u32 size) | ||
| 106 | * Using attr->prog_type, attr->insns, attr->license | ||
| 107 | * returns fd or negative error | ||
| 108 | */ | ||
| 109 | BPF_PROG_LOAD, | ||
| 110 | }; | ||
| 111 | |||
| 112 | enum bpf_map_type { | ||
| 113 | BPF_MAP_TYPE_UNSPEC, | ||
| 114 | BPF_MAP_TYPE_HASH, | ||
| 115 | BPF_MAP_TYPE_ARRAY, | ||
| 116 | }; | ||
| 117 | |||
| 118 | enum bpf_prog_type { | ||
| 119 | BPF_PROG_TYPE_UNSPEC, | ||
| 120 | BPF_PROG_TYPE_SOCKET_FILTER, | ||
| 121 | }; | ||
| 122 | |||
| 123 | /* flags for BPF_MAP_UPDATE_ELEM command */ | ||
| 124 | #define BPF_ANY 0 /* create new element or update existing */ | ||
| 125 | #define BPF_NOEXIST 1 /* create new element if it didn't exist */ | ||
| 126 | #define BPF_EXIST 2 /* update existing element */ | ||
| 127 | |||
| 128 | union bpf_attr { | ||
| 129 | struct { /* anonymous struct used by BPF_MAP_CREATE command */ | ||
| 130 | __u32 map_type; /* one of enum bpf_map_type */ | ||
| 131 | __u32 key_size; /* size of key in bytes */ | ||
| 132 | __u32 value_size; /* size of value in bytes */ | ||
| 133 | __u32 max_entries; /* max number of entries in a map */ | ||
| 134 | }; | ||
| 135 | |||
| 136 | struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */ | ||
| 137 | __u32 map_fd; | ||
| 138 | __aligned_u64 key; | ||
| 139 | union { | ||
| 140 | __aligned_u64 value; | ||
| 141 | __aligned_u64 next_key; | ||
| 142 | }; | ||
| 143 | __u64 flags; | ||
| 144 | }; | ||
| 145 | |||
| 146 | struct { /* anonymous struct used by BPF_PROG_LOAD command */ | ||
| 147 | __u32 prog_type; /* one of enum bpf_prog_type */ | ||
| 148 | __u32 insn_cnt; | ||
| 149 | __aligned_u64 insns; | ||
| 150 | __aligned_u64 license; | ||
| 151 | __u32 log_level; /* verbosity level of verifier */ | ||
| 152 | __u32 log_size; /* size of user buffer */ | ||
| 153 | __aligned_u64 log_buf; /* user supplied buffer */ | ||
| 154 | }; | ||
| 155 | } __attribute__((aligned(8))); | ||
| 156 | |||
| 157 | /* integer value in 'imm' field of BPF_CALL instruction selects which helper | ||
| 158 | * function eBPF program intends to call | ||
| 159 | */ | ||
| 160 | enum bpf_func_id { | ||
| 161 | BPF_FUNC_unspec, | ||
| 162 | BPF_FUNC_map_lookup_elem, /* void *map_lookup_elem(&map, &key) */ | ||
| 163 | BPF_FUNC_map_update_elem, /* int map_update_elem(&map, &key, &value, flags) */ | ||
| 164 | BPF_FUNC_map_delete_elem, /* int map_delete_elem(&map, &key) */ | ||
| 165 | __BPF_FUNC_MAX_ID, | ||
| 166 | }; | ||
| 167 | |||
| 168 | #endif /* _UAPI__LINUX_BPF_H__ */ | ||
diff --git a/include/uapi/linux/bpf_common.h b/include/uapi/linux/bpf_common.h new file mode 100644 index 000000000000..a5c220e0828f --- /dev/null +++ b/include/uapi/linux/bpf_common.h | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | #ifndef _UAPI__LINUX_BPF_COMMON_H__ | ||
| 2 | #define _UAPI__LINUX_BPF_COMMON_H__ | ||
| 3 | |||
| 4 | /* Instruction classes */ | ||
| 5 | #define BPF_CLASS(code) ((code) & 0x07) | ||
| 6 | #define BPF_LD 0x00 | ||
| 7 | #define BPF_LDX 0x01 | ||
| 8 | #define BPF_ST 0x02 | ||
| 9 | #define BPF_STX 0x03 | ||
| 10 | #define BPF_ALU 0x04 | ||
| 11 | #define BPF_JMP 0x05 | ||
| 12 | #define BPF_RET 0x06 | ||
| 13 | #define BPF_MISC 0x07 | ||
| 14 | |||
| 15 | /* ld/ldx fields */ | ||
| 16 | #define BPF_SIZE(code) ((code) & 0x18) | ||
| 17 | #define BPF_W 0x00 | ||
| 18 | #define BPF_H 0x08 | ||
| 19 | #define BPF_B 0x10 | ||
| 20 | #define BPF_MODE(code) ((code) & 0xe0) | ||
| 21 | #define BPF_IMM 0x00 | ||
| 22 | #define BPF_ABS 0x20 | ||
| 23 | #define BPF_IND 0x40 | ||
| 24 | #define BPF_MEM 0x60 | ||
| 25 | #define BPF_LEN 0x80 | ||
| 26 | #define BPF_MSH 0xa0 | ||
| 27 | |||
| 28 | /* alu/jmp fields */ | ||
| 29 | #define BPF_OP(code) ((code) & 0xf0) | ||
| 30 | #define BPF_ADD 0x00 | ||
| 31 | #define BPF_SUB 0x10 | ||
| 32 | #define BPF_MUL 0x20 | ||
| 33 | #define BPF_DIV 0x30 | ||
| 34 | #define BPF_OR 0x40 | ||
| 35 | #define BPF_AND 0x50 | ||
| 36 | #define BPF_LSH 0x60 | ||
| 37 | #define BPF_RSH 0x70 | ||
| 38 | #define BPF_NEG 0x80 | ||
| 39 | #define BPF_MOD 0x90 | ||
| 40 | #define BPF_XOR 0xa0 | ||
| 41 | |||
| 42 | #define BPF_JA 0x00 | ||
| 43 | #define BPF_JEQ 0x10 | ||
| 44 | #define BPF_JGT 0x20 | ||
| 45 | #define BPF_JGE 0x30 | ||
| 46 | #define BPF_JSET 0x40 | ||
| 47 | #define BPF_SRC(code) ((code) & 0x08) | ||
| 48 | #define BPF_K 0x00 | ||
| 49 | #define BPF_X 0x08 | ||
| 50 | |||
| 51 | #ifndef BPF_MAXINSNS | ||
| 52 | #define BPF_MAXINSNS 4096 | ||
| 53 | #endif | ||
| 54 | |||
| 55 | #endif /* _UAPI__LINUX_BPF_COMMON_H__ */ | ||
diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h index 2f47824e7a36..611e1c5893b4 100644 --- a/include/uapi/linux/btrfs.h +++ b/include/uapi/linux/btrfs.h | |||
| @@ -157,6 +157,7 @@ struct btrfs_ioctl_dev_replace_status_params { | |||
| 157 | #define BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_ERROR 0 | 157 | #define BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_ERROR 0 |
| 158 | #define BTRFS_IOCTL_DEV_REPLACE_RESULT_NOT_STARTED 1 | 158 | #define BTRFS_IOCTL_DEV_REPLACE_RESULT_NOT_STARTED 1 |
| 159 | #define BTRFS_IOCTL_DEV_REPLACE_RESULT_ALREADY_STARTED 2 | 159 | #define BTRFS_IOCTL_DEV_REPLACE_RESULT_ALREADY_STARTED 2 |
| 160 | #define BTRFS_IOCTL_DEV_REPLACE_RESULT_SCRUB_INPROGRESS 3 | ||
| 160 | struct btrfs_ioctl_dev_replace_args { | 161 | struct btrfs_ioctl_dev_replace_args { |
| 161 | __u64 cmd; /* in */ | 162 | __u64 cmd; /* in */ |
| 162 | __u64 result; /* out */ | 163 | __u64 result; /* out */ |
diff --git a/include/uapi/linux/can/error.h b/include/uapi/linux/can/error.h index c247446ab25a..1c508be9687f 100644 --- a/include/uapi/linux/can/error.h +++ b/include/uapi/linux/can/error.h | |||
| @@ -71,6 +71,7 @@ | |||
| 71 | #define CAN_ERR_CRTL_TX_PASSIVE 0x20 /* reached error passive status TX */ | 71 | #define CAN_ERR_CRTL_TX_PASSIVE 0x20 /* reached error passive status TX */ |
| 72 | /* (at least one error counter exceeds */ | 72 | /* (at least one error counter exceeds */ |
| 73 | /* the protocol-defined level of 127) */ | 73 | /* the protocol-defined level of 127) */ |
| 74 | #define CAN_ERR_CRTL_ACTIVE 0x40 /* recovered to error active state */ | ||
| 74 | 75 | ||
| 75 | /* error in CAN protocol (type) / data[2] */ | 76 | /* error in CAN protocol (type) / data[2] */ |
| 76 | #define CAN_ERR_PROT_UNSPEC 0x00 /* unspecified */ | 77 | #define CAN_ERR_PROT_UNSPEC 0x00 /* unspecified */ |
diff --git a/include/uapi/linux/dlmconstants.h b/include/uapi/linux/dlmconstants.h index 47bf08dc7566..2857bdc5b27b 100644 --- a/include/uapi/linux/dlmconstants.h +++ b/include/uapi/linux/dlmconstants.h | |||
| @@ -114,7 +114,7 @@ | |||
| 114 | * | 114 | * |
| 115 | * DLM_LKF_ORPHAN | 115 | * DLM_LKF_ORPHAN |
| 116 | * | 116 | * |
| 117 | * not yet implemented | 117 | * Acquire an orphan lock. |
| 118 | * | 118 | * |
| 119 | * DLM_LKF_ALTPR | 119 | * DLM_LKF_ALTPR |
| 120 | * | 120 | * |
diff --git a/include/uapi/linux/dm-ioctl.h b/include/uapi/linux/dm-ioctl.h index c8a4302093a3..a570d7b5796c 100644 --- a/include/uapi/linux/dm-ioctl.h +++ b/include/uapi/linux/dm-ioctl.h | |||
| @@ -267,9 +267,9 @@ enum { | |||
| 267 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) | 267 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) |
| 268 | 268 | ||
| 269 | #define DM_VERSION_MAJOR 4 | 269 | #define DM_VERSION_MAJOR 4 |
| 270 | #define DM_VERSION_MINOR 27 | 270 | #define DM_VERSION_MINOR 29 |
| 271 | #define DM_VERSION_PATCHLEVEL 0 | 271 | #define DM_VERSION_PATCHLEVEL 0 |
| 272 | #define DM_VERSION_EXTRA "-ioctl (2013-10-30)" | 272 | #define DM_VERSION_EXTRA "-ioctl (2014-10-28)" |
| 273 | 273 | ||
| 274 | /* Status bits */ | 274 | /* Status bits */ |
| 275 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ | 275 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ |
| @@ -352,4 +352,9 @@ enum { | |||
| 352 | */ | 352 | */ |
| 353 | #define DM_DEFERRED_REMOVE (1 << 17) /* In/Out */ | 353 | #define DM_DEFERRED_REMOVE (1 << 17) /* In/Out */ |
| 354 | 354 | ||
| 355 | /* | ||
| 356 | * If set, the device is suspended internally. | ||
| 357 | */ | ||
| 358 | #define DM_INTERNAL_SUSPEND_FLAG (1 << 18) /* Out */ | ||
| 359 | |||
| 355 | #endif /* _LINUX_DM_IOCTL_H */ | 360 | #endif /* _LINUX_DM_IOCTL_H */ |
diff --git a/include/uapi/linux/elf-em.h b/include/uapi/linux/elf-em.h index 01529bd96438..ae99f7743cf4 100644 --- a/include/uapi/linux/elf-em.h +++ b/include/uapi/linux/elf-em.h | |||
| @@ -32,7 +32,9 @@ | |||
| 32 | #define EM_V850 87 /* NEC v850 */ | 32 | #define EM_V850 87 /* NEC v850 */ |
| 33 | #define EM_M32R 88 /* Renesas M32R */ | 33 | #define EM_M32R 88 /* Renesas M32R */ |
| 34 | #define EM_MN10300 89 /* Panasonic/MEI MN10300, AM33 */ | 34 | #define EM_MN10300 89 /* Panasonic/MEI MN10300, AM33 */ |
| 35 | #define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */ | ||
| 35 | #define EM_BLACKFIN 106 /* ADI Blackfin Processor */ | 36 | #define EM_BLACKFIN 106 /* ADI Blackfin Processor */ |
| 37 | #define EM_ALTERA_NIOS2 113 /* Altera Nios II soft-core processor */ | ||
| 36 | #define EM_TI_C6000 140 /* TI C6X DSPs */ | 38 | #define EM_TI_C6000 140 /* TI C6X DSPs */ |
| 37 | #define EM_AARCH64 183 /* ARM 64 bit */ | 39 | #define EM_AARCH64 183 /* ARM 64 bit */ |
| 38 | #define EM_FRV 0x5441 /* Fujitsu FR-V */ | 40 | #define EM_FRV 0x5441 /* Fujitsu FR-V */ |
diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h index ef6103bf1f9b..71e1d0ed92f7 100644 --- a/include/uapi/linux/elf.h +++ b/include/uapi/linux/elf.h | |||
| @@ -391,10 +391,13 @@ typedef struct elf64_shdr { | |||
| 391 | #define NT_S390_LAST_BREAK 0x306 /* s390 breaking event address */ | 391 | #define NT_S390_LAST_BREAK 0x306 /* s390 breaking event address */ |
| 392 | #define NT_S390_SYSTEM_CALL 0x307 /* s390 system call restart data */ | 392 | #define NT_S390_SYSTEM_CALL 0x307 /* s390 system call restart data */ |
| 393 | #define NT_S390_TDB 0x308 /* s390 transaction diagnostic block */ | 393 | #define NT_S390_TDB 0x308 /* s390 transaction diagnostic block */ |
| 394 | #define NT_S390_VXRS_LOW 0x309 /* s390 vector registers 0-15 upper half */ | ||
| 395 | #define NT_S390_VXRS_HIGH 0x30a /* s390 vector registers 16-31 */ | ||
| 394 | #define NT_ARM_VFP 0x400 /* ARM VFP/NEON registers */ | 396 | #define NT_ARM_VFP 0x400 /* ARM VFP/NEON registers */ |
| 395 | #define NT_ARM_TLS 0x401 /* ARM TLS register */ | 397 | #define NT_ARM_TLS 0x401 /* ARM TLS register */ |
| 396 | #define NT_ARM_HW_BREAK 0x402 /* ARM hardware breakpoint registers */ | 398 | #define NT_ARM_HW_BREAK 0x402 /* ARM hardware breakpoint registers */ |
| 397 | #define NT_ARM_HW_WATCH 0x403 /* ARM hardware watchpoint registers */ | 399 | #define NT_ARM_HW_WATCH 0x403 /* ARM hardware watchpoint registers */ |
| 400 | #define NT_ARM_SYSTEM_CALL 0x404 /* ARM system call number */ | ||
| 398 | #define NT_METAG_CBUF 0x500 /* Metag catch buffer registers */ | 401 | #define NT_METAG_CBUF 0x500 /* Metag catch buffer registers */ |
| 399 | #define NT_METAG_RPIPE 0x501 /* Metag read pipeline state */ | 402 | #define NT_METAG_RPIPE 0x501 /* Metag read pipeline state */ |
| 400 | #define NT_METAG_TLS 0x502 /* Metag TLS pointer */ | 403 | #define NT_METAG_TLS 0x502 /* Metag TLS pointer */ |
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h index e3c7a719c76b..5f66d9c2889d 100644 --- a/include/uapi/linux/ethtool.h +++ b/include/uapi/linux/ethtool.h | |||
| @@ -209,6 +209,33 @@ struct ethtool_value { | |||
| 209 | __u32 data; | 209 | __u32 data; |
| 210 | }; | 210 | }; |
| 211 | 211 | ||
| 212 | enum tunable_id { | ||
| 213 | ETHTOOL_ID_UNSPEC, | ||
| 214 | ETHTOOL_RX_COPYBREAK, | ||
| 215 | ETHTOOL_TX_COPYBREAK, | ||
| 216 | }; | ||
| 217 | |||
| 218 | enum tunable_type_id { | ||
| 219 | ETHTOOL_TUNABLE_UNSPEC, | ||
| 220 | ETHTOOL_TUNABLE_U8, | ||
| 221 | ETHTOOL_TUNABLE_U16, | ||
| 222 | ETHTOOL_TUNABLE_U32, | ||
| 223 | ETHTOOL_TUNABLE_U64, | ||
| 224 | ETHTOOL_TUNABLE_STRING, | ||
| 225 | ETHTOOL_TUNABLE_S8, | ||
| 226 | ETHTOOL_TUNABLE_S16, | ||
| 227 | ETHTOOL_TUNABLE_S32, | ||
| 228 | ETHTOOL_TUNABLE_S64, | ||
| 229 | }; | ||
| 230 | |||
| 231 | struct ethtool_tunable { | ||
| 232 | __u32 cmd; | ||
| 233 | __u32 id; | ||
| 234 | __u32 type_id; | ||
| 235 | __u32 len; | ||
| 236 | void *data[0]; | ||
| 237 | }; | ||
| 238 | |||
| 212 | /** | 239 | /** |
| 213 | * struct ethtool_regs - hardware register dump | 240 | * struct ethtool_regs - hardware register dump |
| 214 | * @cmd: Command number = %ETHTOOL_GREGS | 241 | * @cmd: Command number = %ETHTOOL_GREGS |
| @@ -507,6 +534,7 @@ struct ethtool_pauseparam { | |||
| 507 | * @ETH_SS_NTUPLE_FILTERS: Previously used with %ETHTOOL_GRXNTUPLE; | 534 | * @ETH_SS_NTUPLE_FILTERS: Previously used with %ETHTOOL_GRXNTUPLE; |
| 508 | * now deprecated | 535 | * now deprecated |
| 509 | * @ETH_SS_FEATURES: Device feature names | 536 | * @ETH_SS_FEATURES: Device feature names |
| 537 | * @ETH_SS_RSS_HASH_FUNCS: RSS hush function names | ||
| 510 | */ | 538 | */ |
| 511 | enum ethtool_stringset { | 539 | enum ethtool_stringset { |
| 512 | ETH_SS_TEST = 0, | 540 | ETH_SS_TEST = 0, |
| @@ -514,6 +542,7 @@ enum ethtool_stringset { | |||
| 514 | ETH_SS_PRIV_FLAGS, | 542 | ETH_SS_PRIV_FLAGS, |
| 515 | ETH_SS_NTUPLE_FILTERS, | 543 | ETH_SS_NTUPLE_FILTERS, |
| 516 | ETH_SS_FEATURES, | 544 | ETH_SS_FEATURES, |
| 545 | ETH_SS_RSS_HASH_FUNCS, | ||
| 517 | }; | 546 | }; |
| 518 | 547 | ||
| 519 | /** | 548 | /** |
| @@ -857,6 +886,8 @@ struct ethtool_rxfh_indir { | |||
| 857 | * @key_size: On entry, the array size of the user buffer for the hash key, | 886 | * @key_size: On entry, the array size of the user buffer for the hash key, |
| 858 | * which may be zero. On return from %ETHTOOL_GRSSH, the size of the | 887 | * which may be zero. On return from %ETHTOOL_GRSSH, the size of the |
| 859 | * hardware hash key. | 888 | * hardware hash key. |
| 889 | * @hfunc: Defines the current RSS hash function used by HW (or to be set to). | ||
| 890 | * Valid values are one of the %ETH_RSS_HASH_*. | ||
| 860 | * @rsvd: Reserved for future extensions. | 891 | * @rsvd: Reserved for future extensions. |
| 861 | * @rss_config: RX ring/queue index for each hash value i.e., indirection table | 892 | * @rss_config: RX ring/queue index for each hash value i.e., indirection table |
| 862 | * of @indir_size __u32 elements, followed by hash key of @key_size | 893 | * of @indir_size __u32 elements, followed by hash key of @key_size |
| @@ -866,14 +897,16 @@ struct ethtool_rxfh_indir { | |||
| 866 | * size should be returned. For %ETHTOOL_SRSSH, an @indir_size of | 897 | * size should be returned. For %ETHTOOL_SRSSH, an @indir_size of |
| 867 | * %ETH_RXFH_INDIR_NO_CHANGE means that indir table setting is not requested | 898 | * %ETH_RXFH_INDIR_NO_CHANGE means that indir table setting is not requested |
| 868 | * and a @indir_size of zero means the indir table should be reset to default | 899 | * and a @indir_size of zero means the indir table should be reset to default |
| 869 | * values. | 900 | * values. An hfunc of zero means that hash function setting is not requested. |
| 870 | */ | 901 | */ |
| 871 | struct ethtool_rxfh { | 902 | struct ethtool_rxfh { |
| 872 | __u32 cmd; | 903 | __u32 cmd; |
| 873 | __u32 rss_context; | 904 | __u32 rss_context; |
| 874 | __u32 indir_size; | 905 | __u32 indir_size; |
| 875 | __u32 key_size; | 906 | __u32 key_size; |
| 876 | __u32 rsvd[2]; | 907 | __u8 hfunc; |
| 908 | __u8 rsvd8[3]; | ||
| 909 | __u32 rsvd32; | ||
| 877 | __u32 rss_config[0]; | 910 | __u32 rss_config[0]; |
| 878 | }; | 911 | }; |
| 879 | #define ETH_RXFH_INDIR_NO_CHANGE 0xffffffff | 912 | #define ETH_RXFH_INDIR_NO_CHANGE 0xffffffff |
| @@ -1152,6 +1185,8 @@ enum ethtool_sfeatures_retval_bits { | |||
| 1152 | 1185 | ||
| 1153 | #define ETHTOOL_GRSSH 0x00000046 /* Get RX flow hash configuration */ | 1186 | #define ETHTOOL_GRSSH 0x00000046 /* Get RX flow hash configuration */ |
| 1154 | #define ETHTOOL_SRSSH 0x00000047 /* Set RX flow hash configuration */ | 1187 | #define ETHTOOL_SRSSH 0x00000047 /* Set RX flow hash configuration */ |
| 1188 | #define ETHTOOL_GTUNABLE 0x00000048 /* Get tunable configuration */ | ||
| 1189 | #define ETHTOOL_STUNABLE 0x00000049 /* Set tunable configuration */ | ||
| 1155 | 1190 | ||
| 1156 | /* compatibility with older code */ | 1191 | /* compatibility with older code */ |
| 1157 | #define SPARC_ETH_GSET ETHTOOL_GSET | 1192 | #define SPARC_ETH_GSET ETHTOOL_GSET |
| @@ -1184,6 +1219,10 @@ enum ethtool_sfeatures_retval_bits { | |||
| 1184 | #define SUPPORTED_40000baseCR4_Full (1 << 24) | 1219 | #define SUPPORTED_40000baseCR4_Full (1 << 24) |
| 1185 | #define SUPPORTED_40000baseSR4_Full (1 << 25) | 1220 | #define SUPPORTED_40000baseSR4_Full (1 << 25) |
| 1186 | #define SUPPORTED_40000baseLR4_Full (1 << 26) | 1221 | #define SUPPORTED_40000baseLR4_Full (1 << 26) |
| 1222 | #define SUPPORTED_56000baseKR4_Full (1 << 27) | ||
| 1223 | #define SUPPORTED_56000baseCR4_Full (1 << 28) | ||
| 1224 | #define SUPPORTED_56000baseSR4_Full (1 << 29) | ||
| 1225 | #define SUPPORTED_56000baseLR4_Full (1 << 30) | ||
| 1187 | 1226 | ||
| 1188 | #define ADVERTISED_10baseT_Half (1 << 0) | 1227 | #define ADVERTISED_10baseT_Half (1 << 0) |
| 1189 | #define ADVERTISED_10baseT_Full (1 << 1) | 1228 | #define ADVERTISED_10baseT_Full (1 << 1) |
| @@ -1212,6 +1251,10 @@ enum ethtool_sfeatures_retval_bits { | |||
| 1212 | #define ADVERTISED_40000baseCR4_Full (1 << 24) | 1251 | #define ADVERTISED_40000baseCR4_Full (1 << 24) |
| 1213 | #define ADVERTISED_40000baseSR4_Full (1 << 25) | 1252 | #define ADVERTISED_40000baseSR4_Full (1 << 25) |
| 1214 | #define ADVERTISED_40000baseLR4_Full (1 << 26) | 1253 | #define ADVERTISED_40000baseLR4_Full (1 << 26) |
| 1254 | #define ADVERTISED_56000baseKR4_Full (1 << 27) | ||
| 1255 | #define ADVERTISED_56000baseCR4_Full (1 << 28) | ||
| 1256 | #define ADVERTISED_56000baseSR4_Full (1 << 29) | ||
| 1257 | #define ADVERTISED_56000baseLR4_Full (1 << 30) | ||
| 1215 | 1258 | ||
| 1216 | /* The following are all involved in forcing a particular link | 1259 | /* The following are all involved in forcing a particular link |
| 1217 | * mode for the device for setting things. When getting the | 1260 | * mode for the device for setting things. When getting the |
| @@ -1219,12 +1262,16 @@ enum ethtool_sfeatures_retval_bits { | |||
| 1219 | * it was forced up into this mode or autonegotiated. | 1262 | * it was forced up into this mode or autonegotiated. |
| 1220 | */ | 1263 | */ |
| 1221 | 1264 | ||
| 1222 | /* The forced speed, 10Mb, 100Mb, gigabit, 2.5Gb, 10GbE. */ | 1265 | /* The forced speed, 10Mb, 100Mb, gigabit, [2.5|10|20|40|56]GbE. */ |
| 1223 | #define SPEED_10 10 | 1266 | #define SPEED_10 10 |
| 1224 | #define SPEED_100 100 | 1267 | #define SPEED_100 100 |
| 1225 | #define SPEED_1000 1000 | 1268 | #define SPEED_1000 1000 |
| 1226 | #define SPEED_2500 2500 | 1269 | #define SPEED_2500 2500 |
| 1227 | #define SPEED_10000 10000 | 1270 | #define SPEED_10000 10000 |
| 1271 | #define SPEED_20000 20000 | ||
| 1272 | #define SPEED_40000 40000 | ||
| 1273 | #define SPEED_56000 56000 | ||
| 1274 | |||
| 1228 | #define SPEED_UNKNOWN -1 | 1275 | #define SPEED_UNKNOWN -1 |
| 1229 | 1276 | ||
| 1230 | /* Duplex, half or full. */ | 1277 | /* Duplex, half or full. */ |
| @@ -1314,6 +1361,10 @@ enum ethtool_sfeatures_retval_bits { | |||
| 1314 | #define ETH_MODULE_SFF_8079_LEN 256 | 1361 | #define ETH_MODULE_SFF_8079_LEN 256 |
| 1315 | #define ETH_MODULE_SFF_8472 0x2 | 1362 | #define ETH_MODULE_SFF_8472 0x2 |
| 1316 | #define ETH_MODULE_SFF_8472_LEN 512 | 1363 | #define ETH_MODULE_SFF_8472_LEN 512 |
| 1364 | #define ETH_MODULE_SFF_8636 0x3 | ||
| 1365 | #define ETH_MODULE_SFF_8636_LEN 256 | ||
| 1366 | #define ETH_MODULE_SFF_8436 0x4 | ||
| 1367 | #define ETH_MODULE_SFF_8436_LEN 256 | ||
| 1317 | 1368 | ||
| 1318 | /* Reset flags */ | 1369 | /* Reset flags */ |
| 1319 | /* The reset() operation must clear the flags for the components which | 1370 | /* The reset() operation must clear the flags for the components which |
diff --git a/include/uapi/linux/filter.h b/include/uapi/linux/filter.h index 253b4d42cf2b..47785d5ecf17 100644 --- a/include/uapi/linux/filter.h +++ b/include/uapi/linux/filter.h | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | 7 | ||
| 8 | #include <linux/compiler.h> | 8 | #include <linux/compiler.h> |
| 9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
| 10 | 10 | #include <linux/bpf_common.h> | |
| 11 | 11 | ||
| 12 | /* | 12 | /* |
| 13 | * Current version of the filter code architecture. | 13 | * Current version of the filter code architecture. |
| @@ -32,56 +32,6 @@ struct sock_fprog { /* Required for SO_ATTACH_FILTER. */ | |||
| 32 | struct sock_filter __user *filter; | 32 | struct sock_filter __user *filter; |
| 33 | }; | 33 | }; |
| 34 | 34 | ||
| 35 | /* | ||
| 36 | * Instruction classes | ||
| 37 | */ | ||
| 38 | |||
| 39 | #define BPF_CLASS(code) ((code) & 0x07) | ||
| 40 | #define BPF_LD 0x00 | ||
| 41 | #define BPF_LDX 0x01 | ||
| 42 | #define BPF_ST 0x02 | ||
| 43 | #define BPF_STX 0x03 | ||
| 44 | #define BPF_ALU 0x04 | ||
| 45 | #define BPF_JMP 0x05 | ||
| 46 | #define BPF_RET 0x06 | ||
| 47 | #define BPF_MISC 0x07 | ||
| 48 | |||
| 49 | /* ld/ldx fields */ | ||
| 50 | #define BPF_SIZE(code) ((code) & 0x18) | ||
| 51 | #define BPF_W 0x00 | ||
| 52 | #define BPF_H 0x08 | ||
| 53 | #define BPF_B 0x10 | ||
| 54 | #define BPF_MODE(code) ((code) & 0xe0) | ||
| 55 | #define BPF_IMM 0x00 | ||
| 56 | #define BPF_ABS 0x20 | ||
| 57 | #define BPF_IND 0x40 | ||
| 58 | #define BPF_MEM 0x60 | ||
| 59 | #define BPF_LEN 0x80 | ||
| 60 | #define BPF_MSH 0xa0 | ||
| 61 | |||
| 62 | /* alu/jmp fields */ | ||
| 63 | #define BPF_OP(code) ((code) & 0xf0) | ||
| 64 | #define BPF_ADD 0x00 | ||
| 65 | #define BPF_SUB 0x10 | ||
| 66 | #define BPF_MUL 0x20 | ||
| 67 | #define BPF_DIV 0x30 | ||
| 68 | #define BPF_OR 0x40 | ||
| 69 | #define BPF_AND 0x50 | ||
| 70 | #define BPF_LSH 0x60 | ||
| 71 | #define BPF_RSH 0x70 | ||
| 72 | #define BPF_NEG 0x80 | ||
| 73 | #define BPF_MOD 0x90 | ||
| 74 | #define BPF_XOR 0xa0 | ||
| 75 | |||
| 76 | #define BPF_JA 0x00 | ||
| 77 | #define BPF_JEQ 0x10 | ||
| 78 | #define BPF_JGT 0x20 | ||
| 79 | #define BPF_JGE 0x30 | ||
| 80 | #define BPF_JSET 0x40 | ||
| 81 | #define BPF_SRC(code) ((code) & 0x08) | ||
| 82 | #define BPF_K 0x00 | ||
| 83 | #define BPF_X 0x08 | ||
| 84 | |||
| 85 | /* ret - BPF_K and BPF_X also apply */ | 35 | /* ret - BPF_K and BPF_X also apply */ |
| 86 | #define BPF_RVAL(code) ((code) & 0x18) | 36 | #define BPF_RVAL(code) ((code) & 0x18) |
| 87 | #define BPF_A 0x10 | 37 | #define BPF_A 0x10 |
| @@ -91,10 +41,6 @@ struct sock_fprog { /* Required for SO_ATTACH_FILTER. */ | |||
| 91 | #define BPF_TAX 0x00 | 41 | #define BPF_TAX 0x00 |
| 92 | #define BPF_TXA 0x80 | 42 | #define BPF_TXA 0x80 |
| 93 | 43 | ||
| 94 | #ifndef BPF_MAXINSNS | ||
| 95 | #define BPF_MAXINSNS 4096 | ||
| 96 | #endif | ||
| 97 | |||
| 98 | /* | 44 | /* |
| 99 | * Macros for filter block array initializers. | 45 | * Macros for filter block array initializers. |
| 100 | */ | 46 | */ |
diff --git a/include/uapi/linux/fou.h b/include/uapi/linux/fou.h new file mode 100644 index 000000000000..8df06894da23 --- /dev/null +++ b/include/uapi/linux/fou.h | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | /* fou.h - FOU Interface */ | ||
| 2 | |||
| 3 | #ifndef _UAPI_LINUX_FOU_H | ||
| 4 | #define _UAPI_LINUX_FOU_H | ||
| 5 | |||
| 6 | /* NETLINK_GENERIC related info | ||
| 7 | */ | ||
| 8 | #define FOU_GENL_NAME "fou" | ||
| 9 | #define FOU_GENL_VERSION 0x1 | ||
| 10 | |||
| 11 | enum { | ||
| 12 | FOU_ATTR_UNSPEC, | ||
| 13 | FOU_ATTR_PORT, /* u16 */ | ||
| 14 | FOU_ATTR_AF, /* u8 */ | ||
| 15 | FOU_ATTR_IPPROTO, /* u8 */ | ||
| 16 | FOU_ATTR_TYPE, /* u8 */ | ||
| 17 | |||
| 18 | __FOU_ATTR_MAX, | ||
| 19 | }; | ||
| 20 | |||
| 21 | #define FOU_ATTR_MAX (__FOU_ATTR_MAX - 1) | ||
| 22 | |||
| 23 | enum { | ||
| 24 | FOU_CMD_UNSPEC, | ||
| 25 | FOU_CMD_ADD, | ||
| 26 | FOU_CMD_DEL, | ||
| 27 | |||
| 28 | __FOU_CMD_MAX, | ||
| 29 | }; | ||
| 30 | |||
| 31 | enum { | ||
| 32 | FOU_ENCAP_UNSPEC, | ||
| 33 | FOU_ENCAP_DIRECT, | ||
| 34 | FOU_ENCAP_GUE, | ||
| 35 | }; | ||
| 36 | |||
| 37 | #define FOU_CMD_MAX (__FOU_CMD_MAX - 1) | ||
| 38 | |||
| 39 | #endif /* _UAPI_LINUX_FOU_H */ | ||
diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h index ca1a11bb4443..3735fa0a6784 100644 --- a/include/uapi/linux/fs.h +++ b/include/uapi/linux/fs.h | |||
| @@ -37,6 +37,7 @@ | |||
| 37 | 37 | ||
| 38 | #define RENAME_NOREPLACE (1 << 0) /* Don't overwrite target */ | 38 | #define RENAME_NOREPLACE (1 << 0) /* Don't overwrite target */ |
| 39 | #define RENAME_EXCHANGE (1 << 1) /* Exchange source and dest */ | 39 | #define RENAME_EXCHANGE (1 << 1) /* Exchange source and dest */ |
| 40 | #define RENAME_WHITEOUT (1 << 2) /* Whiteout source */ | ||
| 40 | 41 | ||
| 41 | struct fstrim_range { | 42 | struct fstrim_range { |
| 42 | __u64 start; | 43 | __u64 start; |
diff --git a/include/uapi/linux/genwqe/genwqe_card.h b/include/uapi/linux/genwqe/genwqe_card.h index 4fc065f29255..baa93fb4cd4f 100644 --- a/include/uapi/linux/genwqe/genwqe_card.h +++ b/include/uapi/linux/genwqe/genwqe_card.h | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * | 8 | * |
| 9 | * Author: Frank Haverkamp <haver@linux.vnet.ibm.com> | 9 | * Author: Frank Haverkamp <haver@linux.vnet.ibm.com> |
| 10 | * Author: Joerg-Stephan Vogt <jsvogt@de.ibm.com> | 10 | * Author: Joerg-Stephan Vogt <jsvogt@de.ibm.com> |
| 11 | * Author: Michael Jung <mijung@de.ibm.com> | 11 | * Author: Michael Jung <mijung@gmx.net> |
| 12 | * Author: Michael Ruettger <michael@ibmra.de> | 12 | * Author: Michael Ruettger <michael@ibmra.de> |
| 13 | * | 13 | * |
| 14 | * This program is free software; you can redistribute it and/or modify | 14 | * This program is free software; you can redistribute it and/or modify |
diff --git a/include/uapi/linux/hyperv.h b/include/uapi/linux/hyperv.h index 78e4a86030dd..bb1cb73c927a 100644 --- a/include/uapi/linux/hyperv.h +++ b/include/uapi/linux/hyperv.h | |||
| @@ -134,10 +134,11 @@ struct hv_start_fcopy { | |||
| 134 | 134 | ||
| 135 | struct hv_do_fcopy { | 135 | struct hv_do_fcopy { |
| 136 | struct hv_fcopy_hdr hdr; | 136 | struct hv_fcopy_hdr hdr; |
| 137 | __u32 pad; | ||
| 137 | __u64 offset; | 138 | __u64 offset; |
| 138 | __u32 size; | 139 | __u32 size; |
| 139 | __u8 data[DATA_FRAGMENT]; | 140 | __u8 data[DATA_FRAGMENT]; |
| 140 | }; | 141 | } __attribute__((packed)); |
| 141 | 142 | ||
| 142 | /* | 143 | /* |
| 143 | * An implementation of HyperV key value pair (KVP) functionality for Linux. | 144 | * An implementation of HyperV key value pair (KVP) functionality for Linux. |
diff --git a/include/uapi/linux/if_alg.h b/include/uapi/linux/if_alg.h index 0f9acce5b1ff..f2acd2fde1f3 100644 --- a/include/uapi/linux/if_alg.h +++ b/include/uapi/linux/if_alg.h | |||
| @@ -32,6 +32,8 @@ struct af_alg_iv { | |||
| 32 | #define ALG_SET_KEY 1 | 32 | #define ALG_SET_KEY 1 |
| 33 | #define ALG_SET_IV 2 | 33 | #define ALG_SET_IV 2 |
| 34 | #define ALG_SET_OP 3 | 34 | #define ALG_SET_OP 3 |
| 35 | #define ALG_SET_AEAD_ASSOCLEN 4 | ||
| 36 | #define ALG_SET_AEAD_AUTHSIZE 5 | ||
| 35 | 37 | ||
| 36 | /* Operations */ | 38 | /* Operations */ |
| 37 | #define ALG_OP_DECRYPT 0 | 39 | #define ALG_OP_DECRYPT 0 |
diff --git a/include/uapi/linux/if_bridge.h b/include/uapi/linux/if_bridge.h index 39f621a9fe82..b03ee8f62d3c 100644 --- a/include/uapi/linux/if_bridge.h +++ b/include/uapi/linux/if_bridge.h | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | 15 | ||
| 16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
| 17 | #include <linux/if_ether.h> | 17 | #include <linux/if_ether.h> |
| 18 | #include <linux/in6.h> | ||
| 18 | 19 | ||
| 19 | #define SYSFS_BRIDGE_ATTR "bridge" | 20 | #define SYSFS_BRIDGE_ATTR "bridge" |
| 20 | #define SYSFS_BRIDGE_FDB "brforward" | 21 | #define SYSFS_BRIDGE_FDB "brforward" |
| @@ -104,6 +105,7 @@ struct __fdb_entry { | |||
| 104 | 105 | ||
| 105 | #define BRIDGE_MODE_VEB 0 /* Default loopback mode */ | 106 | #define BRIDGE_MODE_VEB 0 /* Default loopback mode */ |
| 106 | #define BRIDGE_MODE_VEPA 1 /* 802.1Qbg defined VEPA mode */ | 107 | #define BRIDGE_MODE_VEPA 1 /* 802.1Qbg defined VEPA mode */ |
| 108 | #define BRIDGE_MODE_UNDEF 0xFFFF /* mode undefined */ | ||
| 107 | 109 | ||
| 108 | /* Bridge management nested attributes | 110 | /* Bridge management nested attributes |
| 109 | * [IFLA_AF_SPEC] = { | 111 | * [IFLA_AF_SPEC] = { |
diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h index 0f8210b8e0bc..aa63ed023c2b 100644 --- a/include/uapi/linux/if_ether.h +++ b/include/uapi/linux/if_ether.h | |||
| @@ -128,6 +128,7 @@ | |||
| 128 | #define ETH_P_PHONET 0x00F5 /* Nokia Phonet frames */ | 128 | #define ETH_P_PHONET 0x00F5 /* Nokia Phonet frames */ |
| 129 | #define ETH_P_IEEE802154 0x00F6 /* IEEE802.15.4 frame */ | 129 | #define ETH_P_IEEE802154 0x00F6 /* IEEE802.15.4 frame */ |
| 130 | #define ETH_P_CAIF 0x00F7 /* ST-Ericsson CAIF protocol */ | 130 | #define ETH_P_CAIF 0x00F7 /* ST-Ericsson CAIF protocol */ |
| 131 | #define ETH_P_XDSA 0x00F8 /* Multiplexed DSA protocol */ | ||
| 131 | 132 | ||
| 132 | /* | 133 | /* |
| 133 | * This is an Ethernet frame header. | 134 | * This is an Ethernet frame header. |
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h index ff957604a721..f7d0d2d7173a 100644 --- a/include/uapi/linux/if_link.h +++ b/include/uapi/linux/if_link.h | |||
| @@ -145,6 +145,7 @@ enum { | |||
| 145 | IFLA_CARRIER, | 145 | IFLA_CARRIER, |
| 146 | IFLA_PHYS_PORT_ID, | 146 | IFLA_PHYS_PORT_ID, |
| 147 | IFLA_CARRIER_CHANGES, | 147 | IFLA_CARRIER_CHANGES, |
| 148 | IFLA_PHYS_SWITCH_ID, | ||
| 148 | __IFLA_MAX | 149 | __IFLA_MAX |
| 149 | }; | 150 | }; |
| 150 | 151 | ||
| @@ -215,6 +216,18 @@ enum in6_addr_gen_mode { | |||
| 215 | IN6_ADDR_GEN_MODE_NONE, | 216 | IN6_ADDR_GEN_MODE_NONE, |
| 216 | }; | 217 | }; |
| 217 | 218 | ||
| 219 | /* Bridge section */ | ||
| 220 | |||
| 221 | enum { | ||
| 222 | IFLA_BR_UNSPEC, | ||
| 223 | IFLA_BR_FORWARD_DELAY, | ||
| 224 | IFLA_BR_HELLO_TIME, | ||
| 225 | IFLA_BR_MAX_AGE, | ||
| 226 | __IFLA_BR_MAX, | ||
| 227 | }; | ||
| 228 | |||
| 229 | #define IFLA_BR_MAX (__IFLA_BR_MAX - 1) | ||
| 230 | |||
| 218 | enum { | 231 | enum { |
| 219 | BRIDGE_MODE_UNSPEC, | 232 | BRIDGE_MODE_UNSPEC, |
| 220 | BRIDGE_MODE_HAIRPIN, | 233 | BRIDGE_MODE_HAIRPIN, |
| @@ -231,6 +244,8 @@ enum { | |||
| 231 | IFLA_BRPORT_FAST_LEAVE, /* multicast fast leave */ | 244 | IFLA_BRPORT_FAST_LEAVE, /* multicast fast leave */ |
| 232 | IFLA_BRPORT_LEARNING, /* mac learning */ | 245 | IFLA_BRPORT_LEARNING, /* mac learning */ |
| 233 | IFLA_BRPORT_UNICAST_FLOOD, /* flood unicast traffic */ | 246 | IFLA_BRPORT_UNICAST_FLOOD, /* flood unicast traffic */ |
| 247 | IFLA_BRPORT_PROXYARP, /* proxy ARP */ | ||
| 248 | IFLA_BRPORT_LEARNING_SYNC, /* mac learning sync from device */ | ||
| 234 | __IFLA_BRPORT_MAX | 249 | __IFLA_BRPORT_MAX |
| 235 | }; | 250 | }; |
| 236 | #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1) | 251 | #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1) |
| @@ -291,6 +306,10 @@ enum { | |||
| 291 | IFLA_MACVLAN_UNSPEC, | 306 | IFLA_MACVLAN_UNSPEC, |
| 292 | IFLA_MACVLAN_MODE, | 307 | IFLA_MACVLAN_MODE, |
| 293 | IFLA_MACVLAN_FLAGS, | 308 | IFLA_MACVLAN_FLAGS, |
| 309 | IFLA_MACVLAN_MACADDR_MODE, | ||
| 310 | IFLA_MACVLAN_MACADDR, | ||
| 311 | IFLA_MACVLAN_MACADDR_DATA, | ||
| 312 | IFLA_MACVLAN_MACADDR_COUNT, | ||
| 294 | __IFLA_MACVLAN_MAX, | 313 | __IFLA_MACVLAN_MAX, |
| 295 | }; | 314 | }; |
| 296 | 315 | ||
| @@ -301,10 +320,33 @@ enum macvlan_mode { | |||
| 301 | MACVLAN_MODE_VEPA = 2, /* talk to other ports through ext bridge */ | 320 | MACVLAN_MODE_VEPA = 2, /* talk to other ports through ext bridge */ |
| 302 | MACVLAN_MODE_BRIDGE = 4, /* talk to bridge ports directly */ | 321 | MACVLAN_MODE_BRIDGE = 4, /* talk to bridge ports directly */ |
| 303 | MACVLAN_MODE_PASSTHRU = 8,/* take over the underlying device */ | 322 | MACVLAN_MODE_PASSTHRU = 8,/* take over the underlying device */ |
| 323 | MACVLAN_MODE_SOURCE = 16,/* use source MAC address list to assign */ | ||
| 324 | }; | ||
| 325 | |||
| 326 | enum macvlan_macaddr_mode { | ||
| 327 | MACVLAN_MACADDR_ADD, | ||
| 328 | MACVLAN_MACADDR_DEL, | ||
| 329 | MACVLAN_MACADDR_FLUSH, | ||
| 330 | MACVLAN_MACADDR_SET, | ||
| 304 | }; | 331 | }; |
| 305 | 332 | ||
| 306 | #define MACVLAN_FLAG_NOPROMISC 1 | 333 | #define MACVLAN_FLAG_NOPROMISC 1 |
| 307 | 334 | ||
| 335 | /* IPVLAN section */ | ||
| 336 | enum { | ||
| 337 | IFLA_IPVLAN_UNSPEC, | ||
| 338 | IFLA_IPVLAN_MODE, | ||
| 339 | __IFLA_IPVLAN_MAX | ||
| 340 | }; | ||
| 341 | |||
| 342 | #define IFLA_IPVLAN_MAX (__IFLA_IPVLAN_MAX - 1) | ||
| 343 | |||
| 344 | enum ipvlan_mode { | ||
| 345 | IPVLAN_MODE_L2 = 0, | ||
| 346 | IPVLAN_MODE_L3, | ||
| 347 | IPVLAN_MODE_MAX | ||
| 348 | }; | ||
| 349 | |||
| 308 | /* VXLAN section */ | 350 | /* VXLAN section */ |
| 309 | enum { | 351 | enum { |
| 310 | IFLA_VXLAN_UNSPEC, | 352 | IFLA_VXLAN_UNSPEC, |
diff --git a/include/uapi/linux/if_tun.h b/include/uapi/linux/if_tun.h index e9502dd1ee2c..50ae24335444 100644 --- a/include/uapi/linux/if_tun.h +++ b/include/uapi/linux/if_tun.h | |||
| @@ -22,21 +22,11 @@ | |||
| 22 | 22 | ||
| 23 | /* Read queue size */ | 23 | /* Read queue size */ |
| 24 | #define TUN_READQ_SIZE 500 | 24 | #define TUN_READQ_SIZE 500 |
| 25 | 25 | /* TUN device type flags: deprecated. Use IFF_TUN/IFF_TAP instead. */ | |
| 26 | /* TUN device flags */ | 26 | #define TUN_TUN_DEV IFF_TUN |
| 27 | #define TUN_TUN_DEV 0x0001 | 27 | #define TUN_TAP_DEV IFF_TAP |
| 28 | #define TUN_TAP_DEV 0x0002 | ||
| 29 | #define TUN_TYPE_MASK 0x000f | 28 | #define TUN_TYPE_MASK 0x000f |
| 30 | 29 | ||
| 31 | #define TUN_FASYNC 0x0010 | ||
| 32 | #define TUN_NOCHECKSUM 0x0020 | ||
| 33 | #define TUN_NO_PI 0x0040 | ||
| 34 | /* This flag has no real effect */ | ||
| 35 | #define TUN_ONE_QUEUE 0x0080 | ||
| 36 | #define TUN_PERSIST 0x0100 | ||
| 37 | #define TUN_VNET_HDR 0x0200 | ||
| 38 | #define TUN_TAP_MQ 0x0400 | ||
| 39 | |||
| 40 | /* Ioctl defines */ | 30 | /* Ioctl defines */ |
| 41 | #define TUNSETNOCSUM _IOW('T', 200, int) | 31 | #define TUNSETNOCSUM _IOW('T', 200, int) |
| 42 | #define TUNSETDEBUG _IOW('T', 201, int) | 32 | #define TUNSETDEBUG _IOW('T', 201, int) |
| @@ -58,6 +48,8 @@ | |||
| 58 | #define TUNSETQUEUE _IOW('T', 217, int) | 48 | #define TUNSETQUEUE _IOW('T', 217, int) |
| 59 | #define TUNSETIFINDEX _IOW('T', 218, unsigned int) | 49 | #define TUNSETIFINDEX _IOW('T', 218, unsigned int) |
| 60 | #define TUNGETFILTER _IOR('T', 219, struct sock_fprog) | 50 | #define TUNGETFILTER _IOR('T', 219, struct sock_fprog) |
| 51 | #define TUNSETVNETLE _IOW('T', 220, int) | ||
| 52 | #define TUNGETVNETLE _IOR('T', 221, int) | ||
| 61 | 53 | ||
| 62 | /* TUNSETIFF ifr flags */ | 54 | /* TUNSETIFF ifr flags */ |
| 63 | #define IFF_TUN 0x0001 | 55 | #define IFF_TUN 0x0001 |
diff --git a/include/uapi/linux/if_tunnel.h b/include/uapi/linux/if_tunnel.h index 3bce9e9d9f7c..bd3cc11a431f 100644 --- a/include/uapi/linux/if_tunnel.h +++ b/include/uapi/linux/if_tunnel.h | |||
| @@ -53,10 +53,24 @@ enum { | |||
| 53 | IFLA_IPTUN_6RD_RELAY_PREFIX, | 53 | IFLA_IPTUN_6RD_RELAY_PREFIX, |
| 54 | IFLA_IPTUN_6RD_PREFIXLEN, | 54 | IFLA_IPTUN_6RD_PREFIXLEN, |
| 55 | IFLA_IPTUN_6RD_RELAY_PREFIXLEN, | 55 | IFLA_IPTUN_6RD_RELAY_PREFIXLEN, |
| 56 | IFLA_IPTUN_ENCAP_TYPE, | ||
| 57 | IFLA_IPTUN_ENCAP_FLAGS, | ||
| 58 | IFLA_IPTUN_ENCAP_SPORT, | ||
| 59 | IFLA_IPTUN_ENCAP_DPORT, | ||
| 56 | __IFLA_IPTUN_MAX, | 60 | __IFLA_IPTUN_MAX, |
| 57 | }; | 61 | }; |
| 58 | #define IFLA_IPTUN_MAX (__IFLA_IPTUN_MAX - 1) | 62 | #define IFLA_IPTUN_MAX (__IFLA_IPTUN_MAX - 1) |
| 59 | 63 | ||
| 64 | enum tunnel_encap_types { | ||
| 65 | TUNNEL_ENCAP_NONE, | ||
| 66 | TUNNEL_ENCAP_FOU, | ||
| 67 | TUNNEL_ENCAP_GUE, | ||
| 68 | }; | ||
| 69 | |||
| 70 | #define TUNNEL_ENCAP_FLAG_CSUM (1<<0) | ||
| 71 | #define TUNNEL_ENCAP_FLAG_CSUM6 (1<<1) | ||
| 72 | #define TUNNEL_ENCAP_FLAG_REMCSUM (1<<2) | ||
| 73 | |||
| 60 | /* SIT-mode i_flags */ | 74 | /* SIT-mode i_flags */ |
| 61 | #define SIT_ISATAP 0x0001 | 75 | #define SIT_ISATAP 0x0001 |
| 62 | 76 | ||
| @@ -94,6 +108,10 @@ enum { | |||
| 94 | IFLA_GRE_ENCAP_LIMIT, | 108 | IFLA_GRE_ENCAP_LIMIT, |
| 95 | IFLA_GRE_FLOWINFO, | 109 | IFLA_GRE_FLOWINFO, |
| 96 | IFLA_GRE_FLAGS, | 110 | IFLA_GRE_FLAGS, |
| 111 | IFLA_GRE_ENCAP_TYPE, | ||
| 112 | IFLA_GRE_ENCAP_FLAGS, | ||
| 113 | IFLA_GRE_ENCAP_SPORT, | ||
| 114 | IFLA_GRE_ENCAP_DPORT, | ||
| 97 | __IFLA_GRE_MAX, | 115 | __IFLA_GRE_MAX, |
| 98 | }; | 116 | }; |
| 99 | 117 | ||
diff --git a/include/uapi/linux/in6.h b/include/uapi/linux/in6.h index 74a2a1773494..79b12b004ade 100644 --- a/include/uapi/linux/in6.h +++ b/include/uapi/linux/in6.h | |||
| @@ -149,7 +149,7 @@ struct in6_flowlabel_req { | |||
| 149 | /* | 149 | /* |
| 150 | * IPV6 socket options | 150 | * IPV6 socket options |
| 151 | */ | 151 | */ |
| 152 | 152 | #if __UAPI_DEF_IPV6_OPTIONS | |
| 153 | #define IPV6_ADDRFORM 1 | 153 | #define IPV6_ADDRFORM 1 |
| 154 | #define IPV6_2292PKTINFO 2 | 154 | #define IPV6_2292PKTINFO 2 |
| 155 | #define IPV6_2292HOPOPTS 3 | 155 | #define IPV6_2292HOPOPTS 3 |
| @@ -196,6 +196,7 @@ struct in6_flowlabel_req { | |||
| 196 | 196 | ||
| 197 | #define IPV6_IPSEC_POLICY 34 | 197 | #define IPV6_IPSEC_POLICY 34 |
| 198 | #define IPV6_XFRM_POLICY 35 | 198 | #define IPV6_XFRM_POLICY 35 |
| 199 | #endif | ||
| 199 | 200 | ||
| 200 | /* | 201 | /* |
| 201 | * Multicast: | 202 | * Multicast: |
diff --git a/include/uapi/linux/inet_diag.h b/include/uapi/linux/inet_diag.h index bbde90fa5838..d65c0a09efd3 100644 --- a/include/uapi/linux/inet_diag.h +++ b/include/uapi/linux/inet_diag.h | |||
| @@ -110,10 +110,10 @@ enum { | |||
| 110 | INET_DIAG_TCLASS, | 110 | INET_DIAG_TCLASS, |
| 111 | INET_DIAG_SKMEMINFO, | 111 | INET_DIAG_SKMEMINFO, |
| 112 | INET_DIAG_SHUTDOWN, | 112 | INET_DIAG_SHUTDOWN, |
| 113 | INET_DIAG_DCTCPINFO, | ||
| 113 | }; | 114 | }; |
| 114 | 115 | ||
| 115 | #define INET_DIAG_MAX INET_DIAG_SHUTDOWN | 116 | #define INET_DIAG_MAX INET_DIAG_DCTCPINFO |
| 116 | |||
| 117 | 117 | ||
| 118 | /* INET_DIAG_MEM */ | 118 | /* INET_DIAG_MEM */ |
| 119 | 119 | ||
| @@ -133,5 +133,14 @@ struct tcpvegas_info { | |||
| 133 | __u32 tcpv_minrtt; | 133 | __u32 tcpv_minrtt; |
| 134 | }; | 134 | }; |
| 135 | 135 | ||
| 136 | /* INET_DIAG_DCTCPINFO */ | ||
| 137 | |||
| 138 | struct tcp_dctcp_info { | ||
| 139 | __u16 dctcp_enabled; | ||
| 140 | __u16 dctcp_ce_state; | ||
| 141 | __u32 dctcp_alpha; | ||
| 142 | __u32 dctcp_ab_ecn; | ||
| 143 | __u32 dctcp_ab_tot; | ||
| 144 | }; | ||
| 136 | 145 | ||
| 137 | #endif /* _UAPI_INET_DIAG_H_ */ | 146 | #endif /* _UAPI_INET_DIAG_H_ */ |
diff --git a/include/uapi/linux/input.h b/include/uapi/linux/input.h index 1874ebe9ac1e..a1d7e931ab72 100644 --- a/include/uapi/linux/input.h +++ b/include/uapi/linux/input.h | |||
| @@ -739,6 +739,13 @@ struct input_keymap_entry { | |||
| 739 | #define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */ | 739 | #define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */ |
| 740 | #define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */ | 740 | #define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */ |
| 741 | 741 | ||
| 742 | #define KEY_KBDINPUTASSIST_PREV 0x260 | ||
| 743 | #define KEY_KBDINPUTASSIST_NEXT 0x261 | ||
| 744 | #define KEY_KBDINPUTASSIST_PREVGROUP 0x262 | ||
| 745 | #define KEY_KBDINPUTASSIST_NEXTGROUP 0x263 | ||
| 746 | #define KEY_KBDINPUTASSIST_ACCEPT 0x264 | ||
| 747 | #define KEY_KBDINPUTASSIST_CANCEL 0x265 | ||
| 748 | |||
| 742 | #define BTN_TRIGGER_HAPPY 0x2c0 | 749 | #define BTN_TRIGGER_HAPPY 0x2c0 |
| 743 | #define BTN_TRIGGER_HAPPY1 0x2c0 | 750 | #define BTN_TRIGGER_HAPPY1 0x2c0 |
| 744 | #define BTN_TRIGGER_HAPPY2 0x2c1 | 751 | #define BTN_TRIGGER_HAPPY2 0x2c1 |
diff --git a/include/uapi/linux/ip_vs.h b/include/uapi/linux/ip_vs.h index fbcffe8041f7..cabe95d5b461 100644 --- a/include/uapi/linux/ip_vs.h +++ b/include/uapi/linux/ip_vs.h | |||
| @@ -384,6 +384,9 @@ enum { | |||
| 384 | IPVS_DEST_ATTR_PERSIST_CONNS, /* persistent connections */ | 384 | IPVS_DEST_ATTR_PERSIST_CONNS, /* persistent connections */ |
| 385 | 385 | ||
| 386 | IPVS_DEST_ATTR_STATS, /* nested attribute for dest stats */ | 386 | IPVS_DEST_ATTR_STATS, /* nested attribute for dest stats */ |
| 387 | |||
| 388 | IPVS_DEST_ATTR_ADDR_FAMILY, /* Address family of address */ | ||
| 389 | |||
| 387 | __IPVS_DEST_ATTR_MAX, | 390 | __IPVS_DEST_ATTR_MAX, |
| 388 | }; | 391 | }; |
| 389 | 392 | ||
diff --git a/include/uapi/linux/ipv6.h b/include/uapi/linux/ipv6.h index efa2666f4b8a..e863d088b9a5 100644 --- a/include/uapi/linux/ipv6.h +++ b/include/uapi/linux/ipv6.h | |||
| @@ -164,6 +164,7 @@ enum { | |||
| 164 | DEVCONF_MLDV2_UNSOLICITED_REPORT_INTERVAL, | 164 | DEVCONF_MLDV2_UNSOLICITED_REPORT_INTERVAL, |
| 165 | DEVCONF_SUPPRESS_FRAG_NDISC, | 165 | DEVCONF_SUPPRESS_FRAG_NDISC, |
| 166 | DEVCONF_ACCEPT_RA_FROM_LOCAL, | 166 | DEVCONF_ACCEPT_RA_FROM_LOCAL, |
| 167 | DEVCONF_USE_OPTIMISTIC, | ||
| 167 | DEVCONF_MAX | 168 | DEVCONF_MAX |
| 168 | }; | 169 | }; |
| 169 | 170 | ||
diff --git a/include/uapi/linux/kcmp.h b/include/uapi/linux/kcmp.h new file mode 100644 index 000000000000..84df14b37360 --- /dev/null +++ b/include/uapi/linux/kcmp.h | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | #ifndef _UAPI_LINUX_KCMP_H | ||
| 2 | #define _UAPI_LINUX_KCMP_H | ||
| 3 | |||
| 4 | /* Comparison type */ | ||
| 5 | enum kcmp_type { | ||
| 6 | KCMP_FILE, | ||
| 7 | KCMP_VM, | ||
| 8 | KCMP_FILES, | ||
| 9 | KCMP_FS, | ||
| 10 | KCMP_SIGHAND, | ||
| 11 | KCMP_IO, | ||
| 12 | KCMP_SYSVSEM, | ||
| 13 | |||
| 14 | KCMP_TYPES, | ||
| 15 | }; | ||
| 16 | |||
| 17 | #endif /* _UAPI_LINUX_KCMP_H */ | ||
diff --git a/include/uapi/linux/kernel-page-flags.h b/include/uapi/linux/kernel-page-flags.h index 5116a0e48172..2f96d233c980 100644 --- a/include/uapi/linux/kernel-page-flags.h +++ b/include/uapi/linux/kernel-page-flags.h | |||
| @@ -31,6 +31,7 @@ | |||
| 31 | 31 | ||
| 32 | #define KPF_KSM 21 | 32 | #define KPF_KSM 21 |
| 33 | #define KPF_THP 22 | 33 | #define KPF_THP 22 |
| 34 | #define KPF_BALLOON 23 | ||
| 34 | 35 | ||
| 35 | 36 | ||
| 36 | #endif /* _UAPILINUX_KERNEL_PAGE_FLAGS_H */ | 37 | #endif /* _UAPILINUX_KERNEL_PAGE_FLAGS_H */ |
diff --git a/include/uapi/linux/kfd_ioctl.h b/include/uapi/linux/kfd_ioctl.h new file mode 100644 index 000000000000..af94f31e33ac --- /dev/null +++ b/include/uapi/linux/kfd_ioctl.h | |||
| @@ -0,0 +1,161 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2014 Advanced Micro Devices, Inc. | ||
| 3 | * | ||
| 4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
| 5 | * copy of this software and associated documentation files (the "Software"), | ||
| 6 | * to deal in the Software without restriction, including without limitation | ||
| 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
| 8 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 9 | * Software is furnished to do so, subject to the following conditions: | ||
| 10 | * | ||
| 11 | * The above copyright notice and this permission notice shall be included in | ||
| 12 | * all copies or substantial portions of the Software. | ||
| 13 | * | ||
| 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 17 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 18 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 19 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 20 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 21 | */ | ||
| 22 | |||
| 23 | #ifndef KFD_IOCTL_H_INCLUDED | ||
| 24 | #define KFD_IOCTL_H_INCLUDED | ||
| 25 | |||
| 26 | #include <linux/types.h> | ||
| 27 | #include <linux/ioctl.h> | ||
| 28 | |||
| 29 | #define KFD_IOCTL_MAJOR_VERSION 1 | ||
| 30 | #define KFD_IOCTL_MINOR_VERSION 0 | ||
| 31 | |||
| 32 | struct kfd_ioctl_get_version_args { | ||
| 33 | uint32_t major_version; /* from KFD */ | ||
| 34 | uint32_t minor_version; /* from KFD */ | ||
| 35 | }; | ||
| 36 | |||
| 37 | /* For kfd_ioctl_create_queue_args.queue_type. */ | ||
| 38 | #define KFD_IOC_QUEUE_TYPE_COMPUTE 0 | ||
| 39 | #define KFD_IOC_QUEUE_TYPE_SDMA 1 | ||
| 40 | #define KFD_IOC_QUEUE_TYPE_COMPUTE_AQL 2 | ||
| 41 | |||
| 42 | #define KFD_MAX_QUEUE_PERCENTAGE 100 | ||
| 43 | #define KFD_MAX_QUEUE_PRIORITY 15 | ||
| 44 | |||
| 45 | struct kfd_ioctl_create_queue_args { | ||
| 46 | uint64_t ring_base_address; /* to KFD */ | ||
| 47 | uint64_t write_pointer_address; /* from KFD */ | ||
| 48 | uint64_t read_pointer_address; /* from KFD */ | ||
| 49 | uint64_t doorbell_offset; /* from KFD */ | ||
| 50 | |||
| 51 | uint32_t ring_size; /* to KFD */ | ||
| 52 | uint32_t gpu_id; /* to KFD */ | ||
| 53 | uint32_t queue_type; /* to KFD */ | ||
| 54 | uint32_t queue_percentage; /* to KFD */ | ||
| 55 | uint32_t queue_priority; /* to KFD */ | ||
| 56 | uint32_t queue_id; /* from KFD */ | ||
| 57 | |||
| 58 | uint64_t eop_buffer_address; /* to KFD */ | ||
| 59 | uint64_t eop_buffer_size; /* to KFD */ | ||
| 60 | uint64_t ctx_save_restore_address; /* to KFD */ | ||
| 61 | uint64_t ctx_save_restore_size; /* to KFD */ | ||
| 62 | }; | ||
| 63 | |||
| 64 | struct kfd_ioctl_destroy_queue_args { | ||
| 65 | uint32_t queue_id; /* to KFD */ | ||
| 66 | uint32_t pad; | ||
| 67 | }; | ||
| 68 | |||
| 69 | struct kfd_ioctl_update_queue_args { | ||
| 70 | uint64_t ring_base_address; /* to KFD */ | ||
| 71 | |||
| 72 | uint32_t queue_id; /* to KFD */ | ||
| 73 | uint32_t ring_size; /* to KFD */ | ||
| 74 | uint32_t queue_percentage; /* to KFD */ | ||
| 75 | uint32_t queue_priority; /* to KFD */ | ||
| 76 | }; | ||
| 77 | |||
| 78 | /* For kfd_ioctl_set_memory_policy_args.default_policy and alternate_policy */ | ||
| 79 | #define KFD_IOC_CACHE_POLICY_COHERENT 0 | ||
| 80 | #define KFD_IOC_CACHE_POLICY_NONCOHERENT 1 | ||
| 81 | |||
| 82 | struct kfd_ioctl_set_memory_policy_args { | ||
| 83 | uint64_t alternate_aperture_base; /* to KFD */ | ||
| 84 | uint64_t alternate_aperture_size; /* to KFD */ | ||
| 85 | |||
| 86 | uint32_t gpu_id; /* to KFD */ | ||
| 87 | uint32_t default_policy; /* to KFD */ | ||
| 88 | uint32_t alternate_policy; /* to KFD */ | ||
| 89 | uint32_t pad; | ||
| 90 | }; | ||
| 91 | |||
| 92 | /* | ||
| 93 | * All counters are monotonic. They are used for profiling of compute jobs. | ||
| 94 | * The profiling is done by userspace. | ||
| 95 | * | ||
| 96 | * In case of GPU reset, the counter should not be affected. | ||
| 97 | */ | ||
| 98 | |||
| 99 | struct kfd_ioctl_get_clock_counters_args { | ||
| 100 | uint64_t gpu_clock_counter; /* from KFD */ | ||
| 101 | uint64_t cpu_clock_counter; /* from KFD */ | ||
| 102 | uint64_t system_clock_counter; /* from KFD */ | ||
| 103 | uint64_t system_clock_freq; /* from KFD */ | ||
| 104 | |||
| 105 | uint32_t gpu_id; /* to KFD */ | ||
| 106 | uint32_t pad; | ||
| 107 | }; | ||
| 108 | |||
| 109 | #define NUM_OF_SUPPORTED_GPUS 7 | ||
| 110 | |||
| 111 | struct kfd_process_device_apertures { | ||
| 112 | uint64_t lds_base; /* from KFD */ | ||
| 113 | uint64_t lds_limit; /* from KFD */ | ||
| 114 | uint64_t scratch_base; /* from KFD */ | ||
| 115 | uint64_t scratch_limit; /* from KFD */ | ||
| 116 | uint64_t gpuvm_base; /* from KFD */ | ||
| 117 | uint64_t gpuvm_limit; /* from KFD */ | ||
| 118 | uint32_t gpu_id; /* from KFD */ | ||
| 119 | uint32_t pad; | ||
| 120 | }; | ||
| 121 | |||
| 122 | struct kfd_ioctl_get_process_apertures_args { | ||
| 123 | struct kfd_process_device_apertures | ||
| 124 | process_apertures[NUM_OF_SUPPORTED_GPUS];/* from KFD */ | ||
| 125 | |||
| 126 | /* from KFD, should be in the range [1 - NUM_OF_SUPPORTED_GPUS] */ | ||
| 127 | uint32_t num_of_nodes; | ||
| 128 | uint32_t pad; | ||
| 129 | }; | ||
| 130 | |||
| 131 | #define AMDKFD_IOCTL_BASE 'K' | ||
| 132 | #define AMDKFD_IO(nr) _IO(AMDKFD_IOCTL_BASE, nr) | ||
| 133 | #define AMDKFD_IOR(nr, type) _IOR(AMDKFD_IOCTL_BASE, nr, type) | ||
| 134 | #define AMDKFD_IOW(nr, type) _IOW(AMDKFD_IOCTL_BASE, nr, type) | ||
| 135 | #define AMDKFD_IOWR(nr, type) _IOWR(AMDKFD_IOCTL_BASE, nr, type) | ||
| 136 | |||
| 137 | #define AMDKFD_IOC_GET_VERSION \ | ||
| 138 | AMDKFD_IOR(0x01, struct kfd_ioctl_get_version_args) | ||
| 139 | |||
| 140 | #define AMDKFD_IOC_CREATE_QUEUE \ | ||
| 141 | AMDKFD_IOWR(0x02, struct kfd_ioctl_create_queue_args) | ||
| 142 | |||
| 143 | #define AMDKFD_IOC_DESTROY_QUEUE \ | ||
| 144 | AMDKFD_IOWR(0x03, struct kfd_ioctl_destroy_queue_args) | ||
| 145 | |||
| 146 | #define AMDKFD_IOC_SET_MEMORY_POLICY \ | ||
| 147 | AMDKFD_IOW(0x04, struct kfd_ioctl_set_memory_policy_args) | ||
| 148 | |||
| 149 | #define AMDKFD_IOC_GET_CLOCK_COUNTERS \ | ||
| 150 | AMDKFD_IOWR(0x05, struct kfd_ioctl_get_clock_counters_args) | ||
| 151 | |||
| 152 | #define AMDKFD_IOC_GET_PROCESS_APERTURES \ | ||
| 153 | AMDKFD_IOR(0x06, struct kfd_ioctl_get_process_apertures_args) | ||
| 154 | |||
| 155 | #define AMDKFD_IOC_UPDATE_QUEUE \ | ||
| 156 | AMDKFD_IOW(0x07, struct kfd_ioctl_update_queue_args) | ||
| 157 | |||
| 158 | #define AMDKFD_COMMAND_START 0x01 | ||
| 159 | #define AMDKFD_COMMAND_END 0x08 | ||
| 160 | |||
| 161 | #endif | ||
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index cf3a2ff440e4..a37fd1224f36 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h | |||
| @@ -647,16 +647,10 @@ struct kvm_ppc_smmu_info { | |||
| 647 | #define KVM_CAP_MP_STATE 14 | 647 | #define KVM_CAP_MP_STATE 14 |
| 648 | #define KVM_CAP_COALESCED_MMIO 15 | 648 | #define KVM_CAP_COALESCED_MMIO 15 |
| 649 | #define KVM_CAP_SYNC_MMU 16 /* Changes to host mmap are reflected in guest */ | 649 | #define KVM_CAP_SYNC_MMU 16 /* Changes to host mmap are reflected in guest */ |
| 650 | #define KVM_CAP_DEVICE_ASSIGNMENT 17 | ||
| 651 | #define KVM_CAP_IOMMU 18 | 650 | #define KVM_CAP_IOMMU 18 |
| 652 | #ifdef __KVM_HAVE_MSI | ||
| 653 | #define KVM_CAP_DEVICE_MSI 20 | ||
| 654 | #endif | ||
| 655 | /* Bug in KVM_SET_USER_MEMORY_REGION fixed: */ | 651 | /* Bug in KVM_SET_USER_MEMORY_REGION fixed: */ |
| 656 | #define KVM_CAP_DESTROY_MEMORY_REGION_WORKS 21 | 652 | #define KVM_CAP_DESTROY_MEMORY_REGION_WORKS 21 |
| 657 | #ifdef __KVM_HAVE_USER_NMI | ||
| 658 | #define KVM_CAP_USER_NMI 22 | 653 | #define KVM_CAP_USER_NMI 22 |
| 659 | #endif | ||
| 660 | #ifdef __KVM_HAVE_GUEST_DEBUG | 654 | #ifdef __KVM_HAVE_GUEST_DEBUG |
| 661 | #define KVM_CAP_SET_GUEST_DEBUG 23 | 655 | #define KVM_CAP_SET_GUEST_DEBUG 23 |
| 662 | #endif | 656 | #endif |
| @@ -665,10 +659,6 @@ struct kvm_ppc_smmu_info { | |||
| 665 | #endif | 659 | #endif |
| 666 | #define KVM_CAP_IRQ_ROUTING 25 | 660 | #define KVM_CAP_IRQ_ROUTING 25 |
| 667 | #define KVM_CAP_IRQ_INJECT_STATUS 26 | 661 | #define KVM_CAP_IRQ_INJECT_STATUS 26 |
| 668 | #define KVM_CAP_DEVICE_DEASSIGNMENT 27 | ||
| 669 | #ifdef __KVM_HAVE_MSIX | ||
| 670 | #define KVM_CAP_DEVICE_MSIX 28 | ||
| 671 | #endif | ||
| 672 | #define KVM_CAP_ASSIGN_DEV_IRQ 29 | 662 | #define KVM_CAP_ASSIGN_DEV_IRQ 29 |
| 673 | /* Another bug in KVM_SET_USER_MEMORY_REGION fixed: */ | 663 | /* Another bug in KVM_SET_USER_MEMORY_REGION fixed: */ |
| 674 | #define KVM_CAP_JOIN_MEMORY_REGIONS_WORKS 30 | 664 | #define KVM_CAP_JOIN_MEMORY_REGIONS_WORKS 30 |
| @@ -738,9 +728,7 @@ struct kvm_ppc_smmu_info { | |||
| 738 | #define KVM_CAP_PPC_GET_SMMU_INFO 78 | 728 | #define KVM_CAP_PPC_GET_SMMU_INFO 78 |
| 739 | #define KVM_CAP_S390_COW 79 | 729 | #define KVM_CAP_S390_COW 79 |
| 740 | #define KVM_CAP_PPC_ALLOC_HTAB 80 | 730 | #define KVM_CAP_PPC_ALLOC_HTAB 80 |
| 741 | #ifdef __KVM_HAVE_READONLY_MEM | ||
| 742 | #define KVM_CAP_READONLY_MEM 81 | 731 | #define KVM_CAP_READONLY_MEM 81 |
| 743 | #endif | ||
| 744 | #define KVM_CAP_IRQFD_RESAMPLE 82 | 732 | #define KVM_CAP_IRQFD_RESAMPLE 82 |
| 745 | #define KVM_CAP_PPC_BOOKE_WATCHDOG 83 | 733 | #define KVM_CAP_PPC_BOOKE_WATCHDOG 83 |
| 746 | #define KVM_CAP_PPC_HTAB_FD 84 | 734 | #define KVM_CAP_PPC_HTAB_FD 84 |
| @@ -947,15 +935,25 @@ struct kvm_device_attr { | |||
| 947 | __u64 addr; /* userspace address of attr data */ | 935 | __u64 addr; /* userspace address of attr data */ |
| 948 | }; | 936 | }; |
| 949 | 937 | ||
| 950 | #define KVM_DEV_TYPE_FSL_MPIC_20 1 | ||
| 951 | #define KVM_DEV_TYPE_FSL_MPIC_42 2 | ||
| 952 | #define KVM_DEV_TYPE_XICS 3 | ||
| 953 | #define KVM_DEV_TYPE_VFIO 4 | ||
| 954 | #define KVM_DEV_VFIO_GROUP 1 | 938 | #define KVM_DEV_VFIO_GROUP 1 |
| 955 | #define KVM_DEV_VFIO_GROUP_ADD 1 | 939 | #define KVM_DEV_VFIO_GROUP_ADD 1 |
| 956 | #define KVM_DEV_VFIO_GROUP_DEL 2 | 940 | #define KVM_DEV_VFIO_GROUP_DEL 2 |
| 957 | #define KVM_DEV_TYPE_ARM_VGIC_V2 5 | 941 | |
| 958 | #define KVM_DEV_TYPE_FLIC 6 | 942 | enum kvm_device_type { |
| 943 | KVM_DEV_TYPE_FSL_MPIC_20 = 1, | ||
| 944 | #define KVM_DEV_TYPE_FSL_MPIC_20 KVM_DEV_TYPE_FSL_MPIC_20 | ||
| 945 | KVM_DEV_TYPE_FSL_MPIC_42, | ||
| 946 | #define KVM_DEV_TYPE_FSL_MPIC_42 KVM_DEV_TYPE_FSL_MPIC_42 | ||
| 947 | KVM_DEV_TYPE_XICS, | ||
| 948 | #define KVM_DEV_TYPE_XICS KVM_DEV_TYPE_XICS | ||
| 949 | KVM_DEV_TYPE_VFIO, | ||
| 950 | #define KVM_DEV_TYPE_VFIO KVM_DEV_TYPE_VFIO | ||
| 951 | KVM_DEV_TYPE_ARM_VGIC_V2, | ||
| 952 | #define KVM_DEV_TYPE_ARM_VGIC_V2 KVM_DEV_TYPE_ARM_VGIC_V2 | ||
| 953 | KVM_DEV_TYPE_FLIC, | ||
| 954 | #define KVM_DEV_TYPE_FLIC KVM_DEV_TYPE_FLIC | ||
| 955 | KVM_DEV_TYPE_MAX, | ||
| 956 | }; | ||
| 959 | 957 | ||
| 960 | /* | 958 | /* |
| 961 | * ioctls for VM fds | 959 | * ioctls for VM fds |
| @@ -1093,7 +1091,7 @@ struct kvm_s390_ucas_mapping { | |||
| 1093 | #define KVM_S390_INITIAL_RESET _IO(KVMIO, 0x97) | 1091 | #define KVM_S390_INITIAL_RESET _IO(KVMIO, 0x97) |
| 1094 | #define KVM_GET_MP_STATE _IOR(KVMIO, 0x98, struct kvm_mp_state) | 1092 | #define KVM_GET_MP_STATE _IOR(KVMIO, 0x98, struct kvm_mp_state) |
| 1095 | #define KVM_SET_MP_STATE _IOW(KVMIO, 0x99, struct kvm_mp_state) | 1093 | #define KVM_SET_MP_STATE _IOW(KVMIO, 0x99, struct kvm_mp_state) |
| 1096 | /* Available with KVM_CAP_NMI */ | 1094 | /* Available with KVM_CAP_USER_NMI */ |
| 1097 | #define KVM_NMI _IO(KVMIO, 0x9a) | 1095 | #define KVM_NMI _IO(KVMIO, 0x9a) |
| 1098 | /* Available with KVM_CAP_SET_GUEST_DEBUG */ | 1096 | /* Available with KVM_CAP_SET_GUEST_DEBUG */ |
| 1099 | #define KVM_SET_GUEST_DEBUG _IOW(KVMIO, 0x9b, struct kvm_guest_debug) | 1097 | #define KVM_SET_GUEST_DEBUG _IOW(KVMIO, 0x9b, struct kvm_guest_debug) |
| @@ -1101,9 +1099,6 @@ struct kvm_s390_ucas_mapping { | |||
| 1101 | #define KVM_X86_SETUP_MCE _IOW(KVMIO, 0x9c, __u64) | 1099 | #define KVM_X86_SETUP_MCE _IOW(KVMIO, 0x9c, __u64) |
| 1102 | #define KVM_X86_GET_MCE_CAP_SUPPORTED _IOR(KVMIO, 0x9d, __u64) | 1100 | #define KVM_X86_GET_MCE_CAP_SUPPORTED _IOR(KVMIO, 0x9d, __u64) |
| 1103 | #define KVM_X86_SET_MCE _IOW(KVMIO, 0x9e, struct kvm_x86_mce) | 1101 | #define KVM_X86_SET_MCE _IOW(KVMIO, 0x9e, struct kvm_x86_mce) |
| 1104 | /* IA64 stack access */ | ||
| 1105 | #define KVM_IA64_VCPU_GET_STACK _IOR(KVMIO, 0x9a, void *) | ||
| 1106 | #define KVM_IA64_VCPU_SET_STACK _IOW(KVMIO, 0x9b, void *) | ||
| 1107 | /* Available with KVM_CAP_VCPU_EVENTS */ | 1102 | /* Available with KVM_CAP_VCPU_EVENTS */ |
| 1108 | #define KVM_GET_VCPU_EVENTS _IOR(KVMIO, 0x9f, struct kvm_vcpu_events) | 1103 | #define KVM_GET_VCPU_EVENTS _IOR(KVMIO, 0x9f, struct kvm_vcpu_events) |
| 1109 | #define KVM_SET_VCPU_EVENTS _IOW(KVMIO, 0xa0, struct kvm_vcpu_events) | 1104 | #define KVM_SET_VCPU_EVENTS _IOW(KVMIO, 0xa0, struct kvm_vcpu_events) |
diff --git a/include/uapi/linux/libc-compat.h b/include/uapi/linux/libc-compat.h index c140620dad92..e28807ad17fa 100644 --- a/include/uapi/linux/libc-compat.h +++ b/include/uapi/linux/libc-compat.h | |||
| @@ -69,6 +69,7 @@ | |||
| 69 | #define __UAPI_DEF_SOCKADDR_IN6 0 | 69 | #define __UAPI_DEF_SOCKADDR_IN6 0 |
| 70 | #define __UAPI_DEF_IPV6_MREQ 0 | 70 | #define __UAPI_DEF_IPV6_MREQ 0 |
| 71 | #define __UAPI_DEF_IPPROTO_V6 0 | 71 | #define __UAPI_DEF_IPPROTO_V6 0 |
| 72 | #define __UAPI_DEF_IPV6_OPTIONS 0 | ||
| 72 | 73 | ||
| 73 | #else | 74 | #else |
| 74 | 75 | ||
| @@ -82,6 +83,7 @@ | |||
| 82 | #define __UAPI_DEF_SOCKADDR_IN6 1 | 83 | #define __UAPI_DEF_SOCKADDR_IN6 1 |
| 83 | #define __UAPI_DEF_IPV6_MREQ 1 | 84 | #define __UAPI_DEF_IPV6_MREQ 1 |
| 84 | #define __UAPI_DEF_IPPROTO_V6 1 | 85 | #define __UAPI_DEF_IPPROTO_V6 1 |
| 86 | #define __UAPI_DEF_IPV6_OPTIONS 1 | ||
| 85 | 87 | ||
| 86 | #endif /* _NETINET_IN_H */ | 88 | #endif /* _NETINET_IN_H */ |
| 87 | 89 | ||
| @@ -103,6 +105,7 @@ | |||
| 103 | #define __UAPI_DEF_SOCKADDR_IN6 1 | 105 | #define __UAPI_DEF_SOCKADDR_IN6 1 |
| 104 | #define __UAPI_DEF_IPV6_MREQ 1 | 106 | #define __UAPI_DEF_IPV6_MREQ 1 |
| 105 | #define __UAPI_DEF_IPPROTO_V6 1 | 107 | #define __UAPI_DEF_IPPROTO_V6 1 |
| 108 | #define __UAPI_DEF_IPV6_OPTIONS 1 | ||
| 106 | 109 | ||
| 107 | /* Definitions for xattr.h */ | 110 | /* Definitions for xattr.h */ |
| 108 | #define __UAPI_DEF_XATTR 1 | 111 | #define __UAPI_DEF_XATTR 1 |
diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h index 77c60311a6c6..7d664ea85ebd 100644 --- a/include/uapi/linux/magic.h +++ b/include/uapi/linux/magic.h | |||
| @@ -72,5 +72,6 @@ | |||
| 72 | #define MTD_INODE_FS_MAGIC 0x11307854 | 72 | #define MTD_INODE_FS_MAGIC 0x11307854 |
| 73 | #define ANON_INODE_FS_MAGIC 0x09041934 | 73 | #define ANON_INODE_FS_MAGIC 0x09041934 |
| 74 | #define BTRFS_TEST_MAGIC 0x73727279 | 74 | #define BTRFS_TEST_MAGIC 0x73727279 |
| 75 | #define NSFS_MAGIC 0x6e736673 | ||
| 75 | 76 | ||
| 76 | #endif /* __LINUX_MAGIC_H__ */ | 77 | #endif /* __LINUX_MAGIC_H__ */ |
diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h new file mode 100644 index 000000000000..23b40908be30 --- /dev/null +++ b/include/uapi/linux/media-bus-format.h | |||
| @@ -0,0 +1,125 @@ | |||
| 1 | /* | ||
| 2 | * Media Bus API header | ||
| 3 | * | ||
| 4 | * Copyright (C) 2009, Guennadi Liakhovetski <g.liakhovetski@gmx.de> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef __LINUX_MEDIA_BUS_FORMAT_H | ||
| 12 | #define __LINUX_MEDIA_BUS_FORMAT_H | ||
| 13 | |||
| 14 | /* | ||
| 15 | * These bus formats uniquely identify data formats on the data bus. Format 0 | ||
| 16 | * is reserved, MEDIA_BUS_FMT_FIXED shall be used by host-client pairs, where | ||
| 17 | * the data format is fixed. Additionally, "2X8" means that one pixel is | ||
| 18 | * transferred in two 8-bit samples, "BE" or "LE" specify in which order those | ||
| 19 | * samples are transferred over the bus: "LE" means that the least significant | ||
| 20 | * bits are transferred first, "BE" means that the most significant bits are | ||
| 21 | * transferred first, and "PADHI" and "PADLO" define which bits - low or high, | ||
| 22 | * in the incomplete high byte, are filled with padding bits. | ||
| 23 | * | ||
| 24 | * The bus formats are grouped by type, bus_width, bits per component, samples | ||
| 25 | * per pixel and order of subsamples. Numerical values are sorted using generic | ||
| 26 | * numerical sort order (8 thus comes before 10). | ||
| 27 | * | ||
| 28 | * As their value can't change when a new bus format is inserted in the | ||
| 29 | * enumeration, the bus formats are explicitly given a numerical value. The next | ||
| 30 | * free values for each category are listed below, update them when inserting | ||
| 31 | * new pixel codes. | ||
| 32 | */ | ||
| 33 | |||
| 34 | #define MEDIA_BUS_FMT_FIXED 0x0001 | ||
| 35 | |||
| 36 | /* RGB - next is 0x100e */ | ||
| 37 | #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1001 | ||
| 38 | #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x1002 | ||
| 39 | #define MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE 0x1003 | ||
| 40 | #define MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE 0x1004 | ||
| 41 | #define MEDIA_BUS_FMT_BGR565_2X8_BE 0x1005 | ||
| 42 | #define MEDIA_BUS_FMT_BGR565_2X8_LE 0x1006 | ||
| 43 | #define MEDIA_BUS_FMT_RGB565_2X8_BE 0x1007 | ||
| 44 | #define MEDIA_BUS_FMT_RGB565_2X8_LE 0x1008 | ||
| 45 | #define MEDIA_BUS_FMT_RGB666_1X18 0x1009 | ||
| 46 | #define MEDIA_BUS_FMT_RGB888_1X24 0x100a | ||
| 47 | #define MEDIA_BUS_FMT_RGB888_2X12_BE 0x100b | ||
| 48 | #define MEDIA_BUS_FMT_RGB888_2X12_LE 0x100c | ||
| 49 | #define MEDIA_BUS_FMT_ARGB8888_1X32 0x100d | ||
| 50 | |||
| 51 | /* YUV (including grey) - next is 0x2024 */ | ||
| 52 | #define MEDIA_BUS_FMT_Y8_1X8 0x2001 | ||
| 53 | #define MEDIA_BUS_FMT_UV8_1X8 0x2015 | ||
| 54 | #define MEDIA_BUS_FMT_UYVY8_1_5X8 0x2002 | ||
| 55 | #define MEDIA_BUS_FMT_VYUY8_1_5X8 0x2003 | ||
| 56 | #define MEDIA_BUS_FMT_YUYV8_1_5X8 0x2004 | ||
| 57 | #define MEDIA_BUS_FMT_YVYU8_1_5X8 0x2005 | ||
| 58 | #define MEDIA_BUS_FMT_UYVY8_2X8 0x2006 | ||
| 59 | #define MEDIA_BUS_FMT_VYUY8_2X8 0x2007 | ||
| 60 | #define MEDIA_BUS_FMT_YUYV8_2X8 0x2008 | ||
| 61 | #define MEDIA_BUS_FMT_YVYU8_2X8 0x2009 | ||
| 62 | #define MEDIA_BUS_FMT_Y10_1X10 0x200a | ||
| 63 | #define MEDIA_BUS_FMT_UYVY10_2X10 0x2018 | ||
| 64 | #define MEDIA_BUS_FMT_VYUY10_2X10 0x2019 | ||
| 65 | #define MEDIA_BUS_FMT_YUYV10_2X10 0x200b | ||
| 66 | #define MEDIA_BUS_FMT_YVYU10_2X10 0x200c | ||
| 67 | #define MEDIA_BUS_FMT_Y12_1X12 0x2013 | ||
| 68 | #define MEDIA_BUS_FMT_UYVY8_1X16 0x200f | ||
| 69 | #define MEDIA_BUS_FMT_VYUY8_1X16 0x2010 | ||
| 70 | #define MEDIA_BUS_FMT_YUYV8_1X16 0x2011 | ||
| 71 | #define MEDIA_BUS_FMT_YVYU8_1X16 0x2012 | ||
| 72 | #define MEDIA_BUS_FMT_YDYUYDYV8_1X16 0x2014 | ||
| 73 | #define MEDIA_BUS_FMT_UYVY10_1X20 0x201a | ||
| 74 | #define MEDIA_BUS_FMT_VYUY10_1X20 0x201b | ||
| 75 | #define MEDIA_BUS_FMT_YUYV10_1X20 0x200d | ||
| 76 | #define MEDIA_BUS_FMT_YVYU10_1X20 0x200e | ||
| 77 | #define MEDIA_BUS_FMT_YUV10_1X30 0x2016 | ||
| 78 | #define MEDIA_BUS_FMT_AYUV8_1X32 0x2017 | ||
| 79 | #define MEDIA_BUS_FMT_UYVY12_2X12 0x201c | ||
| 80 | #define MEDIA_BUS_FMT_VYUY12_2X12 0x201d | ||
| 81 | #define MEDIA_BUS_FMT_YUYV12_2X12 0x201e | ||
| 82 | #define MEDIA_BUS_FMT_YVYU12_2X12 0x201f | ||
| 83 | #define MEDIA_BUS_FMT_UYVY12_1X24 0x2020 | ||
| 84 | #define MEDIA_BUS_FMT_VYUY12_1X24 0x2021 | ||
| 85 | #define MEDIA_BUS_FMT_YUYV12_1X24 0x2022 | ||
| 86 | #define MEDIA_BUS_FMT_YVYU12_1X24 0x2023 | ||
| 87 | |||
| 88 | /* Bayer - next is 0x3019 */ | ||
| 89 | #define MEDIA_BUS_FMT_SBGGR8_1X8 0x3001 | ||
| 90 | #define MEDIA_BUS_FMT_SGBRG8_1X8 0x3013 | ||
| 91 | #define MEDIA_BUS_FMT_SGRBG8_1X8 0x3002 | ||
| 92 | #define MEDIA_BUS_FMT_SRGGB8_1X8 0x3014 | ||
| 93 | #define MEDIA_BUS_FMT_SBGGR10_ALAW8_1X8 0x3015 | ||
| 94 | #define MEDIA_BUS_FMT_SGBRG10_ALAW8_1X8 0x3016 | ||
| 95 | #define MEDIA_BUS_FMT_SGRBG10_ALAW8_1X8 0x3017 | ||
| 96 | #define MEDIA_BUS_FMT_SRGGB10_ALAW8_1X8 0x3018 | ||
| 97 | #define MEDIA_BUS_FMT_SBGGR10_DPCM8_1X8 0x300b | ||
| 98 | #define MEDIA_BUS_FMT_SGBRG10_DPCM8_1X8 0x300c | ||
| 99 | #define MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8 0x3009 | ||
| 100 | #define MEDIA_BUS_FMT_SRGGB10_DPCM8_1X8 0x300d | ||
| 101 | #define MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_BE 0x3003 | ||
| 102 | #define MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_LE 0x3004 | ||
| 103 | #define MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_BE 0x3005 | ||
| 104 | #define MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_LE 0x3006 | ||
| 105 | #define MEDIA_BUS_FMT_SBGGR10_1X10 0x3007 | ||
| 106 | #define MEDIA_BUS_FMT_SGBRG10_1X10 0x300e | ||
| 107 | #define MEDIA_BUS_FMT_SGRBG10_1X10 0x300a | ||
| 108 | #define MEDIA_BUS_FMT_SRGGB10_1X10 0x300f | ||
| 109 | #define MEDIA_BUS_FMT_SBGGR12_1X12 0x3008 | ||
| 110 | #define MEDIA_BUS_FMT_SGBRG12_1X12 0x3010 | ||
| 111 | #define MEDIA_BUS_FMT_SGRBG12_1X12 0x3011 | ||
| 112 | #define MEDIA_BUS_FMT_SRGGB12_1X12 0x3012 | ||
| 113 | |||
| 114 | /* JPEG compressed formats - next is 0x4002 */ | ||
| 115 | #define MEDIA_BUS_FMT_JPEG_1X8 0x4001 | ||
| 116 | |||
| 117 | /* Vendor specific formats - next is 0x5002 */ | ||
| 118 | |||
| 119 | /* S5C73M3 sensor specific interleaved UYVY and JPEG */ | ||
| 120 | #define MEDIA_BUS_FMT_S5C_UYVY_JPEG_1X8 0x5001 | ||
| 121 | |||
| 122 | /* HSV - next is 0x6002 */ | ||
| 123 | #define MEDIA_BUS_FMT_AHSV8888_1X32 0x6001 | ||
| 124 | |||
| 125 | #endif /* __LINUX_MEDIA_BUS_FORMAT_H */ | ||
diff --git a/include/uapi/linux/msg.h b/include/uapi/linux/msg.h index a70375526578..f51c8001dbe5 100644 --- a/include/uapi/linux/msg.h +++ b/include/uapi/linux/msg.h | |||
| @@ -51,16 +51,28 @@ struct msginfo { | |||
| 51 | }; | 51 | }; |
| 52 | 52 | ||
| 53 | /* | 53 | /* |
| 54 | * Scaling factor to compute msgmni: | 54 | * MSGMNI, MSGMAX and MSGMNB are default values which can be |
| 55 | * the memory dedicated to msg queues (msgmni * msgmnb) should occupy | 55 | * modified by sysctl. |
| 56 | * at most 1/MSG_MEM_SCALE of the lowmem (see the formula in ipc/msg.c): | 56 | * |
| 57 | * up to 8MB : msgmni = 16 (MSGMNI) | 57 | * MSGMNI is the upper limit for the number of messages queues per |
| 58 | * 4 GB : msgmni = 8K | 58 | * namespace. |
| 59 | * more than 16 GB : msgmni = 32K (IPCMNI) | 59 | * It has been chosen to be as large possible without facilitating |
| 60 | * scenarios where userspace causes overflows when adjusting the limits via | ||
| 61 | * operations of the form retrieve current limit; add X; update limit". | ||
| 62 | * | ||
| 63 | * MSGMNB is the default size of a new message queue. Non-root tasks can | ||
| 64 | * decrease the size with msgctl(IPC_SET), root tasks | ||
| 65 | * (actually: CAP_SYS_RESOURCE) can both increase and decrease the queue | ||
| 66 | * size. The optimal value is application dependent. | ||
| 67 | * 16384 is used because it was always used (since 0.99.10) | ||
| 68 | * | ||
| 69 | * MAXMAX is the maximum size of an individual message, it's a global | ||
| 70 | * (per-namespace) limit that applies for all message queues. | ||
| 71 | * It's set to 1/2 of MSGMNB, to ensure that at least two messages fit into | ||
| 72 | * the queue. This is also an arbitrary choice (since 2.6.0). | ||
| 60 | */ | 73 | */ |
| 61 | #define MSG_MEM_SCALE 32 | ||
| 62 | 74 | ||
| 63 | #define MSGMNI 16 /* <= IPCMNI */ /* max # of msg queue identifiers */ | 75 | #define MSGMNI 32000 /* <= IPCMNI */ /* max # of msg queue identifiers */ |
| 64 | #define MSGMAX 8192 /* <= INT_MAX */ /* max size of message (bytes) */ | 76 | #define MSGMAX 8192 /* <= INT_MAX */ /* max size of message (bytes) */ |
| 65 | #define MSGMNB 16384 /* <= INT_MAX */ /* default max size of a message queue */ | 77 | #define MSGMNB 16384 /* <= INT_MAX */ /* default max size of a message queue */ |
| 66 | 78 | ||
diff --git a/include/uapi/linux/neighbour.h b/include/uapi/linux/neighbour.h index 4a1d7e96dfe3..f3d77f9f1e0b 100644 --- a/include/uapi/linux/neighbour.h +++ b/include/uapi/linux/neighbour.h | |||
| @@ -35,11 +35,11 @@ enum { | |||
| 35 | */ | 35 | */ |
| 36 | 36 | ||
| 37 | #define NTF_USE 0x01 | 37 | #define NTF_USE 0x01 |
| 38 | #define NTF_PROXY 0x08 /* == ATF_PUBL */ | ||
| 39 | #define NTF_ROUTER 0x80 | ||
| 40 | |||
| 41 | #define NTF_SELF 0x02 | 38 | #define NTF_SELF 0x02 |
| 42 | #define NTF_MASTER 0x04 | 39 | #define NTF_MASTER 0x04 |
| 40 | #define NTF_PROXY 0x08 /* == ATF_PUBL */ | ||
| 41 | #define NTF_EXT_LEARNED 0x10 | ||
| 42 | #define NTF_ROUTER 0x80 | ||
| 43 | 43 | ||
| 44 | /* | 44 | /* |
| 45 | * Neighbor Cache Entry States. | 45 | * Neighbor Cache Entry States. |
diff --git a/include/uapi/linux/net_tstamp.h b/include/uapi/linux/net_tstamp.h index ff354021bb69..edbc888ceb51 100644 --- a/include/uapi/linux/net_tstamp.h +++ b/include/uapi/linux/net_tstamp.h | |||
| @@ -23,8 +23,9 @@ enum { | |||
| 23 | SOF_TIMESTAMPING_OPT_ID = (1<<7), | 23 | SOF_TIMESTAMPING_OPT_ID = (1<<7), |
| 24 | SOF_TIMESTAMPING_TX_SCHED = (1<<8), | 24 | SOF_TIMESTAMPING_TX_SCHED = (1<<8), |
| 25 | SOF_TIMESTAMPING_TX_ACK = (1<<9), | 25 | SOF_TIMESTAMPING_TX_ACK = (1<<9), |
| 26 | SOF_TIMESTAMPING_OPT_CMSG = (1<<10), | ||
| 26 | 27 | ||
| 27 | SOF_TIMESTAMPING_LAST = SOF_TIMESTAMPING_TX_ACK, | 28 | SOF_TIMESTAMPING_LAST = SOF_TIMESTAMPING_OPT_CMSG, |
| 28 | SOF_TIMESTAMPING_MASK = (SOF_TIMESTAMPING_LAST - 1) | | 29 | SOF_TIMESTAMPING_MASK = (SOF_TIMESTAMPING_LAST - 1) | |
| 29 | SOF_TIMESTAMPING_LAST | 30 | SOF_TIMESTAMPING_LAST |
| 30 | }; | 31 | }; |
diff --git a/include/uapi/linux/netfilter/ipset/ip_set.h b/include/uapi/linux/netfilter/ipset/ip_set.h index 78c2f2e79920..5ab4e60894cf 100644 --- a/include/uapi/linux/netfilter/ipset/ip_set.h +++ b/include/uapi/linux/netfilter/ipset/ip_set.h | |||
| @@ -115,6 +115,9 @@ enum { | |||
| 115 | IPSET_ATTR_BYTES, | 115 | IPSET_ATTR_BYTES, |
| 116 | IPSET_ATTR_PACKETS, | 116 | IPSET_ATTR_PACKETS, |
| 117 | IPSET_ATTR_COMMENT, | 117 | IPSET_ATTR_COMMENT, |
| 118 | IPSET_ATTR_SKBMARK, | ||
| 119 | IPSET_ATTR_SKBPRIO, | ||
| 120 | IPSET_ATTR_SKBQUEUE, | ||
| 118 | __IPSET_ATTR_ADT_MAX, | 121 | __IPSET_ATTR_ADT_MAX, |
| 119 | }; | 122 | }; |
| 120 | #define IPSET_ATTR_ADT_MAX (__IPSET_ATTR_ADT_MAX - 1) | 123 | #define IPSET_ATTR_ADT_MAX (__IPSET_ATTR_ADT_MAX - 1) |
| @@ -147,6 +150,7 @@ enum ipset_errno { | |||
| 147 | IPSET_ERR_COUNTER, | 150 | IPSET_ERR_COUNTER, |
| 148 | IPSET_ERR_COMMENT, | 151 | IPSET_ERR_COMMENT, |
| 149 | IPSET_ERR_INVALID_MARKMASK, | 152 | IPSET_ERR_INVALID_MARKMASK, |
| 153 | IPSET_ERR_SKBINFO, | ||
| 150 | 154 | ||
| 151 | /* Type specific error codes */ | 155 | /* Type specific error codes */ |
| 152 | IPSET_ERR_TYPE_SPECIFIC = 4352, | 156 | IPSET_ERR_TYPE_SPECIFIC = 4352, |
| @@ -170,6 +174,12 @@ enum ipset_cmd_flags { | |||
| 170 | IPSET_FLAG_MATCH_COUNTERS = (1 << IPSET_FLAG_BIT_MATCH_COUNTERS), | 174 | IPSET_FLAG_MATCH_COUNTERS = (1 << IPSET_FLAG_BIT_MATCH_COUNTERS), |
| 171 | IPSET_FLAG_BIT_RETURN_NOMATCH = 7, | 175 | IPSET_FLAG_BIT_RETURN_NOMATCH = 7, |
| 172 | IPSET_FLAG_RETURN_NOMATCH = (1 << IPSET_FLAG_BIT_RETURN_NOMATCH), | 176 | IPSET_FLAG_RETURN_NOMATCH = (1 << IPSET_FLAG_BIT_RETURN_NOMATCH), |
| 177 | IPSET_FLAG_BIT_MAP_SKBMARK = 8, | ||
| 178 | IPSET_FLAG_MAP_SKBMARK = (1 << IPSET_FLAG_BIT_MAP_SKBMARK), | ||
| 179 | IPSET_FLAG_BIT_MAP_SKBPRIO = 9, | ||
| 180 | IPSET_FLAG_MAP_SKBPRIO = (1 << IPSET_FLAG_BIT_MAP_SKBPRIO), | ||
| 181 | IPSET_FLAG_BIT_MAP_SKBQUEUE = 10, | ||
| 182 | IPSET_FLAG_MAP_SKBQUEUE = (1 << IPSET_FLAG_BIT_MAP_SKBQUEUE), | ||
| 173 | IPSET_FLAG_CMD_MAX = 15, | 183 | IPSET_FLAG_CMD_MAX = 15, |
| 174 | }; | 184 | }; |
| 175 | 185 | ||
| @@ -187,6 +197,8 @@ enum ipset_cadt_flags { | |||
| 187 | IPSET_FLAG_WITH_COMMENT = (1 << IPSET_FLAG_BIT_WITH_COMMENT), | 197 | IPSET_FLAG_WITH_COMMENT = (1 << IPSET_FLAG_BIT_WITH_COMMENT), |
| 188 | IPSET_FLAG_BIT_WITH_FORCEADD = 5, | 198 | IPSET_FLAG_BIT_WITH_FORCEADD = 5, |
| 189 | IPSET_FLAG_WITH_FORCEADD = (1 << IPSET_FLAG_BIT_WITH_FORCEADD), | 199 | IPSET_FLAG_WITH_FORCEADD = (1 << IPSET_FLAG_BIT_WITH_FORCEADD), |
| 200 | IPSET_FLAG_BIT_WITH_SKBINFO = 6, | ||
| 201 | IPSET_FLAG_WITH_SKBINFO = (1 << IPSET_FLAG_BIT_WITH_SKBINFO), | ||
| 190 | IPSET_FLAG_CADT_MAX = 15, | 202 | IPSET_FLAG_CADT_MAX = 15, |
| 191 | }; | 203 | }; |
| 192 | 204 | ||
| @@ -244,11 +256,17 @@ enum { | |||
| 244 | IPSET_COUNTER_GT, | 256 | IPSET_COUNTER_GT, |
| 245 | }; | 257 | }; |
| 246 | 258 | ||
| 247 | struct ip_set_counter_match { | 259 | /* Backward compatibility for set match v3 */ |
| 260 | struct ip_set_counter_match0 { | ||
| 248 | __u8 op; | 261 | __u8 op; |
| 249 | __u64 value; | 262 | __u64 value; |
| 250 | }; | 263 | }; |
| 251 | 264 | ||
| 265 | struct ip_set_counter_match { | ||
| 266 | __aligned_u64 value; | ||
| 267 | __u8 op; | ||
| 268 | }; | ||
| 269 | |||
| 252 | /* Interface to iptables/ip6tables */ | 270 | /* Interface to iptables/ip6tables */ |
| 253 | 271 | ||
| 254 | #define SO_IP_SET 83 | 272 | #define SO_IP_SET 83 |
diff --git a/include/uapi/linux/netfilter/nf_nat.h b/include/uapi/linux/netfilter/nf_nat.h index 1ad3659102b6..0880781ad7b6 100644 --- a/include/uapi/linux/netfilter/nf_nat.h +++ b/include/uapi/linux/netfilter/nf_nat.h | |||
| @@ -13,6 +13,11 @@ | |||
| 13 | #define NF_NAT_RANGE_PROTO_RANDOM_ALL \ | 13 | #define NF_NAT_RANGE_PROTO_RANDOM_ALL \ |
| 14 | (NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PROTO_RANDOM_FULLY) | 14 | (NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PROTO_RANDOM_FULLY) |
| 15 | 15 | ||
| 16 | #define NF_NAT_RANGE_MASK \ | ||
| 17 | (NF_NAT_RANGE_MAP_IPS | NF_NAT_RANGE_PROTO_SPECIFIED | \ | ||
| 18 | NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PERSISTENT | \ | ||
| 19 | NF_NAT_RANGE_PROTO_RANDOM_FULLY) | ||
| 20 | |||
| 16 | struct nf_nat_ipv4_range { | 21 | struct nf_nat_ipv4_range { |
| 17 | unsigned int flags; | 22 | unsigned int flags; |
| 18 | __be32 min_ip; | 23 | __be32 min_ip; |
diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h index 801bdd1e56e3..832bc46db78b 100644 --- a/include/uapi/linux/netfilter/nf_tables.h +++ b/include/uapi/linux/netfilter/nf_tables.h | |||
| @@ -51,6 +51,8 @@ enum nft_verdicts { | |||
| 51 | * @NFT_MSG_NEWSETELEM: create a new set element (enum nft_set_elem_attributes) | 51 | * @NFT_MSG_NEWSETELEM: create a new set element (enum nft_set_elem_attributes) |
| 52 | * @NFT_MSG_GETSETELEM: get a set element (enum nft_set_elem_attributes) | 52 | * @NFT_MSG_GETSETELEM: get a set element (enum nft_set_elem_attributes) |
| 53 | * @NFT_MSG_DELSETELEM: delete a set element (enum nft_set_elem_attributes) | 53 | * @NFT_MSG_DELSETELEM: delete a set element (enum nft_set_elem_attributes) |
| 54 | * @NFT_MSG_NEWGEN: announce a new generation, only for events (enum nft_gen_attributes) | ||
| 55 | * @NFT_MSG_GETGEN: get the rule-set generation (enum nft_gen_attributes) | ||
| 54 | */ | 56 | */ |
| 55 | enum nf_tables_msg_types { | 57 | enum nf_tables_msg_types { |
| 56 | NFT_MSG_NEWTABLE, | 58 | NFT_MSG_NEWTABLE, |
| @@ -68,6 +70,8 @@ enum nf_tables_msg_types { | |||
| 68 | NFT_MSG_NEWSETELEM, | 70 | NFT_MSG_NEWSETELEM, |
| 69 | NFT_MSG_GETSETELEM, | 71 | NFT_MSG_GETSETELEM, |
| 70 | NFT_MSG_DELSETELEM, | 72 | NFT_MSG_DELSETELEM, |
| 73 | NFT_MSG_NEWGEN, | ||
| 74 | NFT_MSG_GETGEN, | ||
| 71 | NFT_MSG_MAX, | 75 | NFT_MSG_MAX, |
| 72 | }; | 76 | }; |
| 73 | 77 | ||
| @@ -571,6 +575,11 @@ enum nft_exthdr_attributes { | |||
| 571 | * @NFT_META_L4PROTO: layer 4 protocol number | 575 | * @NFT_META_L4PROTO: layer 4 protocol number |
| 572 | * @NFT_META_BRI_IIFNAME: packet input bridge interface name | 576 | * @NFT_META_BRI_IIFNAME: packet input bridge interface name |
| 573 | * @NFT_META_BRI_OIFNAME: packet output bridge interface name | 577 | * @NFT_META_BRI_OIFNAME: packet output bridge interface name |
| 578 | * @NFT_META_PKTTYPE: packet type (skb->pkt_type), special handling for loopback | ||
| 579 | * @NFT_META_CPU: cpu id through smp_processor_id() | ||
| 580 | * @NFT_META_IIFGROUP: packet input interface group | ||
| 581 | * @NFT_META_OIFGROUP: packet output interface group | ||
| 582 | * @NFT_META_CGROUP: socket control group (skb->sk->sk_classid) | ||
| 574 | */ | 583 | */ |
| 575 | enum nft_meta_keys { | 584 | enum nft_meta_keys { |
| 576 | NFT_META_LEN, | 585 | NFT_META_LEN, |
| @@ -592,6 +601,11 @@ enum nft_meta_keys { | |||
| 592 | NFT_META_L4PROTO, | 601 | NFT_META_L4PROTO, |
| 593 | NFT_META_BRI_IIFNAME, | 602 | NFT_META_BRI_IIFNAME, |
| 594 | NFT_META_BRI_OIFNAME, | 603 | NFT_META_BRI_OIFNAME, |
| 604 | NFT_META_PKTTYPE, | ||
| 605 | NFT_META_CPU, | ||
| 606 | NFT_META_IIFGROUP, | ||
| 607 | NFT_META_OIFGROUP, | ||
| 608 | NFT_META_CGROUP, | ||
| 595 | }; | 609 | }; |
| 596 | 610 | ||
| 597 | /** | 611 | /** |
| @@ -737,13 +751,34 @@ enum nft_queue_attributes { | |||
| 737 | * | 751 | * |
| 738 | * @NFT_REJECT_ICMP_UNREACH: reject using ICMP unreachable | 752 | * @NFT_REJECT_ICMP_UNREACH: reject using ICMP unreachable |
| 739 | * @NFT_REJECT_TCP_RST: reject using TCP RST | 753 | * @NFT_REJECT_TCP_RST: reject using TCP RST |
| 754 | * @NFT_REJECT_ICMPX_UNREACH: abstracted ICMP unreachable for bridge and inet | ||
| 740 | */ | 755 | */ |
| 741 | enum nft_reject_types { | 756 | enum nft_reject_types { |
| 742 | NFT_REJECT_ICMP_UNREACH, | 757 | NFT_REJECT_ICMP_UNREACH, |
| 743 | NFT_REJECT_TCP_RST, | 758 | NFT_REJECT_TCP_RST, |
| 759 | NFT_REJECT_ICMPX_UNREACH, | ||
| 744 | }; | 760 | }; |
| 745 | 761 | ||
| 746 | /** | 762 | /** |
| 763 | * enum nft_reject_code - Generic reject codes for IPv4/IPv6 | ||
| 764 | * | ||
| 765 | * @NFT_REJECT_ICMPX_NO_ROUTE: no route to host / network unreachable | ||
| 766 | * @NFT_REJECT_ICMPX_PORT_UNREACH: port unreachable | ||
| 767 | * @NFT_REJECT_ICMPX_HOST_UNREACH: host unreachable | ||
| 768 | * @NFT_REJECT_ICMPX_ADMIN_PROHIBITED: administratively prohibited | ||
| 769 | * | ||
| 770 | * These codes are mapped to real ICMP and ICMPv6 codes. | ||
| 771 | */ | ||
| 772 | enum nft_reject_inet_code { | ||
| 773 | NFT_REJECT_ICMPX_NO_ROUTE = 0, | ||
| 774 | NFT_REJECT_ICMPX_PORT_UNREACH, | ||
| 775 | NFT_REJECT_ICMPX_HOST_UNREACH, | ||
| 776 | NFT_REJECT_ICMPX_ADMIN_PROHIBITED, | ||
| 777 | __NFT_REJECT_ICMPX_MAX | ||
| 778 | }; | ||
| 779 | #define NFT_REJECT_ICMPX_MAX (__NFT_REJECT_ICMPX_MAX - 1) | ||
| 780 | |||
| 781 | /** | ||
| 747 | * enum nft_reject_attributes - nf_tables reject expression netlink attributes | 782 | * enum nft_reject_attributes - nf_tables reject expression netlink attributes |
| 748 | * | 783 | * |
| 749 | * @NFTA_REJECT_TYPE: packet type to use (NLA_U32: nft_reject_types) | 784 | * @NFTA_REJECT_TYPE: packet type to use (NLA_U32: nft_reject_types) |
| @@ -777,6 +812,7 @@ enum nft_nat_types { | |||
| 777 | * @NFTA_NAT_REG_ADDR_MAX: source register of address range end (NLA_U32: nft_registers) | 812 | * @NFTA_NAT_REG_ADDR_MAX: source register of address range end (NLA_U32: nft_registers) |
| 778 | * @NFTA_NAT_REG_PROTO_MIN: source register of proto range start (NLA_U32: nft_registers) | 813 | * @NFTA_NAT_REG_PROTO_MIN: source register of proto range start (NLA_U32: nft_registers) |
| 779 | * @NFTA_NAT_REG_PROTO_MAX: source register of proto range end (NLA_U32: nft_registers) | 814 | * @NFTA_NAT_REG_PROTO_MAX: source register of proto range end (NLA_U32: nft_registers) |
| 815 | * @NFTA_NAT_FLAGS: NAT flags (see NF_NAT_RANGE_* in linux/netfilter/nf_nat.h) (NLA_U32) | ||
| 780 | */ | 816 | */ |
| 781 | enum nft_nat_attributes { | 817 | enum nft_nat_attributes { |
| 782 | NFTA_NAT_UNSPEC, | 818 | NFTA_NAT_UNSPEC, |
| @@ -786,8 +822,49 @@ enum nft_nat_attributes { | |||
| 786 | NFTA_NAT_REG_ADDR_MAX, | 822 | NFTA_NAT_REG_ADDR_MAX, |
| 787 | NFTA_NAT_REG_PROTO_MIN, | 823 | NFTA_NAT_REG_PROTO_MIN, |
| 788 | NFTA_NAT_REG_PROTO_MAX, | 824 | NFTA_NAT_REG_PROTO_MAX, |
| 825 | NFTA_NAT_FLAGS, | ||
| 789 | __NFTA_NAT_MAX | 826 | __NFTA_NAT_MAX |
| 790 | }; | 827 | }; |
| 791 | #define NFTA_NAT_MAX (__NFTA_NAT_MAX - 1) | 828 | #define NFTA_NAT_MAX (__NFTA_NAT_MAX - 1) |
| 792 | 829 | ||
| 830 | /** | ||
| 831 | * enum nft_masq_attributes - nf_tables masquerade expression attributes | ||
| 832 | * | ||
| 833 | * @NFTA_MASQ_FLAGS: NAT flags (see NF_NAT_RANGE_* in linux/netfilter/nf_nat.h) (NLA_U32) | ||
| 834 | */ | ||
| 835 | enum nft_masq_attributes { | ||
| 836 | NFTA_MASQ_UNSPEC, | ||
| 837 | NFTA_MASQ_FLAGS, | ||
| 838 | __NFTA_MASQ_MAX | ||
| 839 | }; | ||
| 840 | #define NFTA_MASQ_MAX (__NFTA_MASQ_MAX - 1) | ||
| 841 | |||
| 842 | /** | ||
| 843 | * enum nft_redir_attributes - nf_tables redirect expression netlink attributes | ||
| 844 | * | ||
| 845 | * @NFTA_REDIR_REG_PROTO_MIN: source register of proto range start (NLA_U32: nft_registers) | ||
| 846 | * @NFTA_REDIR_REG_PROTO_MAX: source register of proto range end (NLA_U32: nft_registers) | ||
| 847 | * @NFTA_REDIR_FLAGS: NAT flags (see NF_NAT_RANGE_* in linux/netfilter/nf_nat.h) (NLA_U32) | ||
| 848 | */ | ||
| 849 | enum nft_redir_attributes { | ||
| 850 | NFTA_REDIR_UNSPEC, | ||
| 851 | NFTA_REDIR_REG_PROTO_MIN, | ||
| 852 | NFTA_REDIR_REG_PROTO_MAX, | ||
| 853 | NFTA_REDIR_FLAGS, | ||
| 854 | __NFTA_REDIR_MAX | ||
| 855 | }; | ||
| 856 | #define NFTA_REDIR_MAX (__NFTA_REDIR_MAX - 1) | ||
| 857 | |||
| 858 | /** | ||
| 859 | * enum nft_gen_attributes - nf_tables ruleset generation attributes | ||
| 860 | * | ||
| 861 | * @NFTA_GEN_ID: Ruleset generation ID (NLA_U32) | ||
| 862 | */ | ||
| 863 | enum nft_gen_attributes { | ||
| 864 | NFTA_GEN_UNSPEC, | ||
| 865 | NFTA_GEN_ID, | ||
| 866 | __NFTA_GEN_MAX | ||
| 867 | }; | ||
| 868 | #define NFTA_GEN_MAX (__NFTA_GEN_MAX - 1) | ||
| 869 | |||
| 793 | #endif /* _LINUX_NF_TABLES_H */ | 870 | #endif /* _LINUX_NF_TABLES_H */ |
diff --git a/include/uapi/linux/netfilter/nfnetlink_acct.h b/include/uapi/linux/netfilter/nfnetlink_acct.h index 51404ec19022..f3e34dbbf966 100644 --- a/include/uapi/linux/netfilter/nfnetlink_acct.h +++ b/include/uapi/linux/netfilter/nfnetlink_acct.h | |||
| @@ -28,9 +28,17 @@ enum nfnl_acct_type { | |||
| 28 | NFACCT_USE, | 28 | NFACCT_USE, |
| 29 | NFACCT_FLAGS, | 29 | NFACCT_FLAGS, |
| 30 | NFACCT_QUOTA, | 30 | NFACCT_QUOTA, |
| 31 | NFACCT_FILTER, | ||
| 31 | __NFACCT_MAX | 32 | __NFACCT_MAX |
| 32 | }; | 33 | }; |
| 33 | #define NFACCT_MAX (__NFACCT_MAX - 1) | 34 | #define NFACCT_MAX (__NFACCT_MAX - 1) |
| 34 | 35 | ||
| 36 | enum nfnl_attr_filter_type { | ||
| 37 | NFACCT_FILTER_UNSPEC, | ||
| 38 | NFACCT_FILTER_MASK, | ||
| 39 | NFACCT_FILTER_VALUE, | ||
| 40 | __NFACCT_FILTER_MAX | ||
| 41 | }; | ||
| 42 | #define NFACCT_FILTER_MAX (__NFACCT_FILTER_MAX - 1) | ||
| 35 | 43 | ||
| 36 | #endif /* _UAPI_NFNL_ACCT_H_ */ | 44 | #endif /* _UAPI_NFNL_ACCT_H_ */ |
diff --git a/include/uapi/linux/netfilter/xt_set.h b/include/uapi/linux/netfilter/xt_set.h index 964d3d42f874..d4e02348384c 100644 --- a/include/uapi/linux/netfilter/xt_set.h +++ b/include/uapi/linux/netfilter/xt_set.h | |||
| @@ -66,6 +66,25 @@ struct xt_set_info_target_v2 { | |||
| 66 | 66 | ||
| 67 | struct xt_set_info_match_v3 { | 67 | struct xt_set_info_match_v3 { |
| 68 | struct xt_set_info match_set; | 68 | struct xt_set_info match_set; |
| 69 | struct ip_set_counter_match0 packets; | ||
| 70 | struct ip_set_counter_match0 bytes; | ||
| 71 | __u32 flags; | ||
| 72 | }; | ||
| 73 | |||
| 74 | /* Revision 3 target */ | ||
| 75 | |||
| 76 | struct xt_set_info_target_v3 { | ||
| 77 | struct xt_set_info add_set; | ||
| 78 | struct xt_set_info del_set; | ||
| 79 | struct xt_set_info map_set; | ||
| 80 | __u32 flags; | ||
| 81 | __u32 timeout; | ||
| 82 | }; | ||
| 83 | |||
| 84 | /* Revision 4 match */ | ||
| 85 | |||
| 86 | struct xt_set_info_match_v4 { | ||
| 87 | struct xt_set_info match_set; | ||
| 69 | struct ip_set_counter_match packets; | 88 | struct ip_set_counter_match packets; |
| 70 | struct ip_set_counter_match bytes; | 89 | struct ip_set_counter_match bytes; |
| 71 | __u32 flags; | 90 | __u32 flags; |
diff --git a/include/uapi/linux/netfilter_arp/arpt_mangle.h b/include/uapi/linux/netfilter_arp/arpt_mangle.h index 250f502902bb..8c2b16a1f5a0 100644 --- a/include/uapi/linux/netfilter_arp/arpt_mangle.h +++ b/include/uapi/linux/netfilter_arp/arpt_mangle.h | |||
| @@ -13,7 +13,7 @@ struct arpt_mangle | |||
| 13 | union { | 13 | union { |
| 14 | struct in_addr tgt_ip; | 14 | struct in_addr tgt_ip; |
| 15 | } u_t; | 15 | } u_t; |
| 16 | u_int8_t flags; | 16 | __u8 flags; |
| 17 | int target; | 17 | int target; |
| 18 | }; | 18 | }; |
| 19 | 19 | ||
diff --git a/include/uapi/linux/nfc.h b/include/uapi/linux/nfc.h index 9b19b4461928..8119255feae4 100644 --- a/include/uapi/linux/nfc.h +++ b/include/uapi/linux/nfc.h | |||
| @@ -116,6 +116,7 @@ enum nfc_commands { | |||
| 116 | NFC_EVENT_SE_TRANSACTION, | 116 | NFC_EVENT_SE_TRANSACTION, |
| 117 | NFC_CMD_GET_SE, | 117 | NFC_CMD_GET_SE, |
| 118 | NFC_CMD_SE_IO, | 118 | NFC_CMD_SE_IO, |
| 119 | NFC_CMD_ACTIVATE_TARGET, | ||
| 119 | /* private: internal use only */ | 120 | /* private: internal use only */ |
| 120 | __NFC_CMD_AFTER_LAST | 121 | __NFC_CMD_AFTER_LAST |
| 121 | }; | 122 | }; |
| @@ -196,15 +197,19 @@ enum nfc_sdp_attr { | |||
| 196 | }; | 197 | }; |
| 197 | #define NFC_SDP_ATTR_MAX (__NFC_SDP_ATTR_AFTER_LAST - 1) | 198 | #define NFC_SDP_ATTR_MAX (__NFC_SDP_ATTR_AFTER_LAST - 1) |
| 198 | 199 | ||
| 199 | #define NFC_DEVICE_NAME_MAXSIZE 8 | 200 | #define NFC_DEVICE_NAME_MAXSIZE 8 |
| 200 | #define NFC_NFCID1_MAXSIZE 10 | 201 | #define NFC_NFCID1_MAXSIZE 10 |
| 201 | #define NFC_NFCID2_MAXSIZE 8 | 202 | #define NFC_NFCID2_MAXSIZE 8 |
| 202 | #define NFC_NFCID3_MAXSIZE 10 | 203 | #define NFC_NFCID3_MAXSIZE 10 |
| 203 | #define NFC_SENSB_RES_MAXSIZE 12 | 204 | #define NFC_SENSB_RES_MAXSIZE 12 |
| 204 | #define NFC_SENSF_RES_MAXSIZE 18 | 205 | #define NFC_SENSF_RES_MAXSIZE 18 |
| 205 | #define NFC_GB_MAXSIZE 48 | 206 | #define NFC_ATR_REQ_MAXSIZE 64 |
| 206 | #define NFC_FIRMWARE_NAME_MAXSIZE 32 | 207 | #define NFC_ATR_RES_MAXSIZE 64 |
| 207 | #define NFC_ISO15693_UID_MAXSIZE 8 | 208 | #define NFC_ATR_REQ_GB_MAXSIZE 48 |
| 209 | #define NFC_ATR_RES_GB_MAXSIZE 47 | ||
| 210 | #define NFC_GB_MAXSIZE 48 | ||
| 211 | #define NFC_FIRMWARE_NAME_MAXSIZE 32 | ||
| 212 | #define NFC_ISO15693_UID_MAXSIZE 8 | ||
| 208 | 213 | ||
| 209 | /* NFC protocols */ | 214 | /* NFC protocols */ |
| 210 | #define NFC_PROTO_JEWEL 1 | 215 | #define NFC_PROTO_JEWEL 1 |
diff --git a/include/uapi/linux/nfsd/debug.h b/include/uapi/linux/nfsd/debug.h index a6f453c740b8..1fdc95bb2375 100644 --- a/include/uapi/linux/nfsd/debug.h +++ b/include/uapi/linux/nfsd/debug.h | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | * Enable debugging for nfsd. | 15 | * Enable debugging for nfsd. |
| 16 | * Requires RPC_DEBUG. | 16 | * Requires RPC_DEBUG. |
| 17 | */ | 17 | */ |
| 18 | #ifdef RPC_DEBUG | 18 | #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) |
| 19 | # define NFSD_DEBUG 1 | 19 | # define NFSD_DEBUG 1 |
| 20 | #endif | 20 | #endif |
| 21 | 21 | ||
diff --git a/include/uapi/linux/nfsd/export.h b/include/uapi/linux/nfsd/export.h index cf47c313794e..584b6ef3a5e8 100644 --- a/include/uapi/linux/nfsd/export.h +++ b/include/uapi/linux/nfsd/export.h | |||
| @@ -28,7 +28,8 @@ | |||
| 28 | #define NFSEXP_ALLSQUASH 0x0008 | 28 | #define NFSEXP_ALLSQUASH 0x0008 |
| 29 | #define NFSEXP_ASYNC 0x0010 | 29 | #define NFSEXP_ASYNC 0x0010 |
| 30 | #define NFSEXP_GATHERED_WRITES 0x0020 | 30 | #define NFSEXP_GATHERED_WRITES 0x0020 |
| 31 | /* 40 80 100 currently unused */ | 31 | #define NFSEXP_NOREADDIRPLUS 0x0040 |
| 32 | /* 80 100 currently unused */ | ||
| 32 | #define NFSEXP_NOHIDE 0x0200 | 33 | #define NFSEXP_NOHIDE 0x0200 |
| 33 | #define NFSEXP_NOSUBTREECHECK 0x0400 | 34 | #define NFSEXP_NOSUBTREECHECK 0x0400 |
| 34 | #define NFSEXP_NOAUTHNLM 0x0800 /* Don't authenticate NLM requests - just trust */ | 35 | #define NFSEXP_NOAUTHNLM 0x0800 /* Don't authenticate NLM requests - just trust */ |
| @@ -47,7 +48,7 @@ | |||
| 47 | */ | 48 | */ |
| 48 | #define NFSEXP_V4ROOT 0x10000 | 49 | #define NFSEXP_V4ROOT 0x10000 |
| 49 | /* All flags that we claim to support. (Note we don't support NOACL.) */ | 50 | /* All flags that we claim to support. (Note we don't support NOACL.) */ |
| 50 | #define NFSEXP_ALLFLAGS 0x17E3F | 51 | #define NFSEXP_ALLFLAGS 0x1FE7F |
| 51 | 52 | ||
| 52 | /* The flags that may vary depending on security flavor: */ | 53 | /* The flags that may vary depending on security flavor: */ |
| 53 | #define NFSEXP_SECINFO_FLAGS (NFSEXP_READONLY | NFSEXP_ROOTSQUASH \ | 54 | #define NFSEXP_SECINFO_FLAGS (NFSEXP_READONLY | NFSEXP_ROOTSQUASH \ |
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index f1db15b9c041..b37bd5a1cb82 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h | |||
| @@ -227,7 +227,11 @@ | |||
| 227 | * the interface identified by %NL80211_ATTR_IFINDEX. | 227 | * the interface identified by %NL80211_ATTR_IFINDEX. |
| 228 | * @NL80211_CMD_DEL_STATION: Remove a station identified by %NL80211_ATTR_MAC | 228 | * @NL80211_CMD_DEL_STATION: Remove a station identified by %NL80211_ATTR_MAC |
| 229 | * or, if no MAC address given, all stations, on the interface identified | 229 | * or, if no MAC address given, all stations, on the interface identified |
| 230 | * by %NL80211_ATTR_IFINDEX. | 230 | * by %NL80211_ATTR_IFINDEX. %NL80211_ATTR_MGMT_SUBTYPE and |
| 231 | * %NL80211_ATTR_REASON_CODE can optionally be used to specify which type | ||
| 232 | * of disconnection indication should be sent to the station | ||
| 233 | * (Deauthentication or Disassociation frame and reason code for that | ||
| 234 | * frame). | ||
| 231 | * | 235 | * |
| 232 | * @NL80211_CMD_GET_MPATH: Get mesh path attributes for mesh path to | 236 | * @NL80211_CMD_GET_MPATH: Get mesh path attributes for mesh path to |
| 233 | * destination %NL80211_ATTR_MAC on the interface identified by | 237 | * destination %NL80211_ATTR_MAC on the interface identified by |
| @@ -639,7 +643,18 @@ | |||
| 639 | * @NL80211_CMD_CH_SWITCH_NOTIFY: An AP or GO may decide to switch channels | 643 | * @NL80211_CMD_CH_SWITCH_NOTIFY: An AP or GO may decide to switch channels |
| 640 | * independently of the userspace SME, send this event indicating | 644 | * independently of the userspace SME, send this event indicating |
| 641 | * %NL80211_ATTR_IFINDEX is now on %NL80211_ATTR_WIPHY_FREQ and the | 645 | * %NL80211_ATTR_IFINDEX is now on %NL80211_ATTR_WIPHY_FREQ and the |
| 642 | * attributes determining channel width. | 646 | * attributes determining channel width. This indication may also be |
| 647 | * sent when a remotely-initiated switch (e.g., when a STA receives a CSA | ||
| 648 | * from the remote AP) is completed; | ||
| 649 | * | ||
| 650 | * @NL80211_CMD_CH_SWITCH_STARTED_NOTIFY: Notify that a channel switch | ||
| 651 | * has been started on an interface, regardless of the initiator | ||
| 652 | * (ie. whether it was requested from a remote device or | ||
| 653 | * initiated on our own). It indicates that | ||
| 654 | * %NL80211_ATTR_IFINDEX will be on %NL80211_ATTR_WIPHY_FREQ | ||
| 655 | * after %NL80211_ATTR_CH_SWITCH_COUNT TBTT's. The userspace may | ||
| 656 | * decide to react to this indication by requesting other | ||
| 657 | * interfaces to change channel as well. | ||
| 643 | * | 658 | * |
| 644 | * @NL80211_CMD_START_P2P_DEVICE: Start the given P2P Device, identified by | 659 | * @NL80211_CMD_START_P2P_DEVICE: Start the given P2P Device, identified by |
| 645 | * its %NL80211_ATTR_WDEV identifier. It must have been created with | 660 | * its %NL80211_ATTR_WDEV identifier. It must have been created with |
| @@ -722,6 +737,43 @@ | |||
| 722 | * QoS mapping is relevant for IP packets, it is only valid during an | 737 | * QoS mapping is relevant for IP packets, it is only valid during an |
| 723 | * association. This is cleared on disassociation and AP restart. | 738 | * association. This is cleared on disassociation and AP restart. |
| 724 | * | 739 | * |
| 740 | * @NL80211_CMD_ADD_TX_TS: Ask the kernel to add a traffic stream for the given | ||
| 741 | * %NL80211_ATTR_TSID and %NL80211_ATTR_MAC with %NL80211_ATTR_USER_PRIO | ||
| 742 | * and %NL80211_ATTR_ADMITTED_TIME parameters. | ||
| 743 | * Note that the action frame handshake with the AP shall be handled by | ||
| 744 | * userspace via the normal management RX/TX framework, this only sets | ||
| 745 | * up the TX TS in the driver/device. | ||
| 746 | * If the admitted time attribute is not added then the request just checks | ||
| 747 | * if a subsequent setup could be successful, the intent is to use this to | ||
| 748 | * avoid setting up a session with the AP when local restrictions would | ||
| 749 | * make that impossible. However, the subsequent "real" setup may still | ||
| 750 | * fail even if the check was successful. | ||
| 751 | * @NL80211_CMD_DEL_TX_TS: Remove an existing TS with the %NL80211_ATTR_TSID | ||
| 752 | * and %NL80211_ATTR_MAC parameters. It isn't necessary to call this | ||
| 753 | * before removing a station entry entirely, or before disassociating | ||
| 754 | * or similar, cleanup will happen in the driver/device in this case. | ||
| 755 | * | ||
| 756 | * @NL80211_CMD_GET_MPP: Get mesh path attributes for mesh proxy path to | ||
| 757 | * destination %NL80211_ATTR_MAC on the interface identified by | ||
| 758 | * %NL80211_ATTR_IFINDEX. | ||
| 759 | * | ||
| 760 | * @NL80211_CMD_JOIN_OCB: Join the OCB network. The center frequency and | ||
| 761 | * bandwidth of a channel must be given. | ||
| 762 | * @NL80211_CMD_LEAVE_OCB: Leave the OCB network -- no special arguments, the | ||
| 763 | * network is determined by the network interface. | ||
| 764 | * | ||
| 765 | * @NL80211_CMD_TDLS_CHANNEL_SWITCH: Start channel-switching with a TDLS peer, | ||
| 766 | * identified by the %NL80211_ATTR_MAC parameter. A target channel is | ||
| 767 | * provided via %NL80211_ATTR_WIPHY_FREQ and other attributes determining | ||
| 768 | * channel width/type. The target operating class is given via | ||
| 769 | * %NL80211_ATTR_OPER_CLASS. | ||
| 770 | * The driver is responsible for continually initiating channel-switching | ||
| 771 | * operations and returning to the base channel for communication with the | ||
| 772 | * AP. | ||
| 773 | * @NL80211_CMD_TDLS_CANCEL_CHANNEL_SWITCH: Stop channel-switching with a TDLS | ||
| 774 | * peer given by %NL80211_ATTR_MAC. Both peers must be on the base channel | ||
| 775 | * when this command completes. | ||
| 776 | * | ||
| 725 | * @NL80211_CMD_MAX: highest used command number | 777 | * @NL80211_CMD_MAX: highest used command number |
| 726 | * @__NL80211_CMD_AFTER_LAST: internal use | 778 | * @__NL80211_CMD_AFTER_LAST: internal use |
| 727 | */ | 779 | */ |
| @@ -893,6 +945,19 @@ enum nl80211_commands { | |||
| 893 | 945 | ||
| 894 | NL80211_CMD_SET_QOS_MAP, | 946 | NL80211_CMD_SET_QOS_MAP, |
| 895 | 947 | ||
| 948 | NL80211_CMD_ADD_TX_TS, | ||
| 949 | NL80211_CMD_DEL_TX_TS, | ||
| 950 | |||
| 951 | NL80211_CMD_GET_MPP, | ||
| 952 | |||
| 953 | NL80211_CMD_JOIN_OCB, | ||
| 954 | NL80211_CMD_LEAVE_OCB, | ||
| 955 | |||
| 956 | NL80211_CMD_CH_SWITCH_STARTED_NOTIFY, | ||
| 957 | |||
| 958 | NL80211_CMD_TDLS_CHANNEL_SWITCH, | ||
| 959 | NL80211_CMD_TDLS_CANCEL_CHANNEL_SWITCH, | ||
| 960 | |||
| 896 | /* add new commands above here */ | 961 | /* add new commands above here */ |
| 897 | 962 | ||
| 898 | /* used to define NL80211_CMD_MAX below */ | 963 | /* used to define NL80211_CMD_MAX below */ |
| @@ -1587,13 +1652,43 @@ enum nl80211_commands { | |||
| 1587 | * @NL80211_ATTR_TDLS_PEER_CAPABILITY: flags for TDLS peer capabilities, u32. | 1652 | * @NL80211_ATTR_TDLS_PEER_CAPABILITY: flags for TDLS peer capabilities, u32. |
| 1588 | * As specified in the &enum nl80211_tdls_peer_capability. | 1653 | * As specified in the &enum nl80211_tdls_peer_capability. |
| 1589 | * | 1654 | * |
| 1590 | * @NL80211_ATTR_IFACE_SOCKET_OWNER: flag attribute, if set during interface | 1655 | * @NL80211_ATTR_SOCKET_OWNER: Flag attribute, if set during interface |
| 1591 | * creation then the new interface will be owned by the netlink socket | 1656 | * creation then the new interface will be owned by the netlink socket |
| 1592 | * that created it and will be destroyed when the socket is closed | 1657 | * that created it and will be destroyed when the socket is closed. |
| 1593 | * | 1658 | * |
| 1594 | * @NL80211_ATTR_TDLS_INITIATOR: flag attribute indicating the current end is | 1659 | * @NL80211_ATTR_TDLS_INITIATOR: flag attribute indicating the current end is |
| 1595 | * the TDLS link initiator. | 1660 | * the TDLS link initiator. |
| 1596 | * | 1661 | * |
| 1662 | * @NL80211_ATTR_USE_RRM: flag for indicating whether the current connection | ||
| 1663 | * shall support Radio Resource Measurements (11k). This attribute can be | ||
| 1664 | * used with %NL80211_CMD_ASSOCIATE and %NL80211_CMD_CONNECT requests. | ||
| 1665 | * User space applications are expected to use this flag only if the | ||
| 1666 | * underlying device supports these minimal RRM features: | ||
| 1667 | * %NL80211_FEATURE_DS_PARAM_SET_IE_IN_PROBES, | ||
| 1668 | * %NL80211_FEATURE_QUIET, | ||
| 1669 | * If this flag is used, driver must add the Power Capabilities IE to the | ||
| 1670 | * association request. In addition, it must also set the RRM capability | ||
| 1671 | * flag in the association request's Capability Info field. | ||
| 1672 | * | ||
| 1673 | * @NL80211_ATTR_WIPHY_DYN_ACK: flag attribute used to enable ACK timeout | ||
| 1674 | * estimation algorithm (dynack). In order to activate dynack | ||
| 1675 | * %NL80211_FEATURE_ACKTO_ESTIMATION feature flag must be set by lower | ||
| 1676 | * drivers to indicate dynack capability. Dynack is automatically disabled | ||
| 1677 | * setting valid value for coverage class. | ||
| 1678 | * | ||
| 1679 | * @NL80211_ATTR_TSID: a TSID value (u8 attribute) | ||
| 1680 | * @NL80211_ATTR_USER_PRIO: user priority value (u8 attribute) | ||
| 1681 | * @NL80211_ATTR_ADMITTED_TIME: admitted time in units of 32 microseconds | ||
| 1682 | * (per second) (u16 attribute) | ||
| 1683 | * | ||
| 1684 | * @NL80211_ATTR_SMPS_MODE: SMPS mode to use (ap mode). see | ||
| 1685 | * &enum nl80211_smps_mode. | ||
| 1686 | * | ||
| 1687 | * @NL80211_ATTR_OPER_CLASS: operating class | ||
| 1688 | * | ||
| 1689 | * @NL80211_ATTR_MAC_MASK: MAC address mask | ||
| 1690 | * | ||
| 1691 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available | ||
| 1597 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 1692 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 1598 | * @__NL80211_ATTR_AFTER_LAST: internal use | 1693 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| 1599 | */ | 1694 | */ |
| @@ -1929,22 +2024,38 @@ enum nl80211_attrs { | |||
| 1929 | 2024 | ||
| 1930 | NL80211_ATTR_TDLS_PEER_CAPABILITY, | 2025 | NL80211_ATTR_TDLS_PEER_CAPABILITY, |
| 1931 | 2026 | ||
| 1932 | NL80211_ATTR_IFACE_SOCKET_OWNER, | 2027 | NL80211_ATTR_SOCKET_OWNER, |
| 1933 | 2028 | ||
| 1934 | NL80211_ATTR_CSA_C_OFFSETS_TX, | 2029 | NL80211_ATTR_CSA_C_OFFSETS_TX, |
| 1935 | NL80211_ATTR_MAX_CSA_COUNTERS, | 2030 | NL80211_ATTR_MAX_CSA_COUNTERS, |
| 1936 | 2031 | ||
| 1937 | NL80211_ATTR_TDLS_INITIATOR, | 2032 | NL80211_ATTR_TDLS_INITIATOR, |
| 1938 | 2033 | ||
| 2034 | NL80211_ATTR_USE_RRM, | ||
| 2035 | |||
| 2036 | NL80211_ATTR_WIPHY_DYN_ACK, | ||
| 2037 | |||
| 2038 | NL80211_ATTR_TSID, | ||
| 2039 | NL80211_ATTR_USER_PRIO, | ||
| 2040 | NL80211_ATTR_ADMITTED_TIME, | ||
| 2041 | |||
| 2042 | NL80211_ATTR_SMPS_MODE, | ||
| 2043 | |||
| 2044 | NL80211_ATTR_OPER_CLASS, | ||
| 2045 | |||
| 2046 | NL80211_ATTR_MAC_MASK, | ||
| 2047 | |||
| 1939 | /* add attributes here, update the policy in nl80211.c */ | 2048 | /* add attributes here, update the policy in nl80211.c */ |
| 1940 | 2049 | ||
| 1941 | __NL80211_ATTR_AFTER_LAST, | 2050 | __NL80211_ATTR_AFTER_LAST, |
| 2051 | NUM_NL80211_ATTR = __NL80211_ATTR_AFTER_LAST, | ||
| 1942 | NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1 | 2052 | NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1 |
| 1943 | }; | 2053 | }; |
| 1944 | 2054 | ||
| 1945 | /* source-level API compatibility */ | 2055 | /* source-level API compatibility */ |
| 1946 | #define NL80211_ATTR_SCAN_GENERATION NL80211_ATTR_GENERATION | 2056 | #define NL80211_ATTR_SCAN_GENERATION NL80211_ATTR_GENERATION |
| 1947 | #define NL80211_ATTR_MESH_PARAMS NL80211_ATTR_MESH_CONFIG | 2057 | #define NL80211_ATTR_MESH_PARAMS NL80211_ATTR_MESH_CONFIG |
| 2058 | #define NL80211_ATTR_IFACE_SOCKET_OWNER NL80211_ATTR_SOCKET_OWNER | ||
| 1948 | 2059 | ||
| 1949 | /* | 2060 | /* |
| 1950 | * Allow user space programs to use #ifdef on new attributes by defining them | 2061 | * Allow user space programs to use #ifdef on new attributes by defining them |
| @@ -2010,6 +2121,8 @@ enum nl80211_attrs { | |||
| 2010 | * and therefore can't be created in the normal ways, use the | 2121 | * and therefore can't be created in the normal ways, use the |
| 2011 | * %NL80211_CMD_START_P2P_DEVICE and %NL80211_CMD_STOP_P2P_DEVICE | 2122 | * %NL80211_CMD_START_P2P_DEVICE and %NL80211_CMD_STOP_P2P_DEVICE |
| 2012 | * commands to create and destroy one | 2123 | * commands to create and destroy one |
| 2124 | * @NL80211_IF_TYPE_OCB: Outside Context of a BSS | ||
| 2125 | * This mode corresponds to the MIB variable dot11OCBActivated=true | ||
| 2013 | * @NL80211_IFTYPE_MAX: highest interface type number currently defined | 2126 | * @NL80211_IFTYPE_MAX: highest interface type number currently defined |
| 2014 | * @NUM_NL80211_IFTYPES: number of defined interface types | 2127 | * @NUM_NL80211_IFTYPES: number of defined interface types |
| 2015 | * | 2128 | * |
| @@ -2029,6 +2142,7 @@ enum nl80211_iftype { | |||
| 2029 | NL80211_IFTYPE_P2P_CLIENT, | 2142 | NL80211_IFTYPE_P2P_CLIENT, |
| 2030 | NL80211_IFTYPE_P2P_GO, | 2143 | NL80211_IFTYPE_P2P_GO, |
| 2031 | NL80211_IFTYPE_P2P_DEVICE, | 2144 | NL80211_IFTYPE_P2P_DEVICE, |
| 2145 | NL80211_IFTYPE_OCB, | ||
| 2032 | 2146 | ||
| 2033 | /* keep last */ | 2147 | /* keep last */ |
| 2034 | NUM_NL80211_IFTYPES, | 2148 | NUM_NL80211_IFTYPES, |
| @@ -2577,6 +2691,11 @@ enum nl80211_sched_scan_match_attr { | |||
| 2577 | * @NL80211_RRF_AUTO_BW: maximum available bandwidth should be calculated | 2691 | * @NL80211_RRF_AUTO_BW: maximum available bandwidth should be calculated |
| 2578 | * base on contiguous rules and wider channels will be allowed to cross | 2692 | * base on contiguous rules and wider channels will be allowed to cross |
| 2579 | * multiple contiguous/overlapping frequency ranges. | 2693 | * multiple contiguous/overlapping frequency ranges. |
| 2694 | * @NL80211_RRF_GO_CONCURRENT: See &NL80211_FREQUENCY_ATTR_GO_CONCURRENT | ||
| 2695 | * @NL80211_RRF_NO_HT40MINUS: channels can't be used in HT40- operation | ||
| 2696 | * @NL80211_RRF_NO_HT40PLUS: channels can't be used in HT40+ operation | ||
| 2697 | * @NL80211_RRF_NO_80MHZ: 80MHz operation not allowed | ||
| 2698 | * @NL80211_RRF_NO_160MHZ: 160MHz operation not allowed | ||
| 2580 | */ | 2699 | */ |
| 2581 | enum nl80211_reg_rule_flags { | 2700 | enum nl80211_reg_rule_flags { |
| 2582 | NL80211_RRF_NO_OFDM = 1<<0, | 2701 | NL80211_RRF_NO_OFDM = 1<<0, |
| @@ -2589,11 +2708,18 @@ enum nl80211_reg_rule_flags { | |||
| 2589 | NL80211_RRF_NO_IR = 1<<7, | 2708 | NL80211_RRF_NO_IR = 1<<7, |
| 2590 | __NL80211_RRF_NO_IBSS = 1<<8, | 2709 | __NL80211_RRF_NO_IBSS = 1<<8, |
| 2591 | NL80211_RRF_AUTO_BW = 1<<11, | 2710 | NL80211_RRF_AUTO_BW = 1<<11, |
| 2711 | NL80211_RRF_GO_CONCURRENT = 1<<12, | ||
| 2712 | NL80211_RRF_NO_HT40MINUS = 1<<13, | ||
| 2713 | NL80211_RRF_NO_HT40PLUS = 1<<14, | ||
| 2714 | NL80211_RRF_NO_80MHZ = 1<<15, | ||
| 2715 | NL80211_RRF_NO_160MHZ = 1<<16, | ||
| 2592 | }; | 2716 | }; |
| 2593 | 2717 | ||
| 2594 | #define NL80211_RRF_PASSIVE_SCAN NL80211_RRF_NO_IR | 2718 | #define NL80211_RRF_PASSIVE_SCAN NL80211_RRF_NO_IR |
| 2595 | #define NL80211_RRF_NO_IBSS NL80211_RRF_NO_IR | 2719 | #define NL80211_RRF_NO_IBSS NL80211_RRF_NO_IR |
| 2596 | #define NL80211_RRF_NO_IR NL80211_RRF_NO_IR | 2720 | #define NL80211_RRF_NO_IR NL80211_RRF_NO_IR |
| 2721 | #define NL80211_RRF_NO_HT40 (NL80211_RRF_NO_HT40MINUS |\ | ||
| 2722 | NL80211_RRF_NO_HT40PLUS) | ||
| 2597 | 2723 | ||
| 2598 | /* For backport compatibility with older userspace */ | 2724 | /* For backport compatibility with older userspace */ |
| 2599 | #define NL80211_RRF_NO_IR_ALL (NL80211_RRF_NO_IR | __NL80211_RRF_NO_IBSS) | 2725 | #define NL80211_RRF_NO_IR_ALL (NL80211_RRF_NO_IR | __NL80211_RRF_NO_IBSS) |
| @@ -3055,14 +3181,20 @@ enum nl80211_bss_scan_width { | |||
| 3055 | * @NL80211_BSS_BSSID: BSSID of the BSS (6 octets) | 3181 | * @NL80211_BSS_BSSID: BSSID of the BSS (6 octets) |
| 3056 | * @NL80211_BSS_FREQUENCY: frequency in MHz (u32) | 3182 | * @NL80211_BSS_FREQUENCY: frequency in MHz (u32) |
| 3057 | * @NL80211_BSS_TSF: TSF of the received probe response/beacon (u64) | 3183 | * @NL80211_BSS_TSF: TSF of the received probe response/beacon (u64) |
| 3184 | * (if @NL80211_BSS_PRESP_DATA is present then this is known to be | ||
| 3185 | * from a probe response, otherwise it may be from the same beacon | ||
| 3186 | * that the NL80211_BSS_BEACON_TSF will be from) | ||
| 3058 | * @NL80211_BSS_BEACON_INTERVAL: beacon interval of the (I)BSS (u16) | 3187 | * @NL80211_BSS_BEACON_INTERVAL: beacon interval of the (I)BSS (u16) |
| 3059 | * @NL80211_BSS_CAPABILITY: capability field (CPU order, u16) | 3188 | * @NL80211_BSS_CAPABILITY: capability field (CPU order, u16) |
| 3060 | * @NL80211_BSS_INFORMATION_ELEMENTS: binary attribute containing the | 3189 | * @NL80211_BSS_INFORMATION_ELEMENTS: binary attribute containing the |
| 3061 | * raw information elements from the probe response/beacon (bin); | 3190 | * raw information elements from the probe response/beacon (bin); |
| 3062 | * if the %NL80211_BSS_BEACON_IES attribute is present, the IEs here are | 3191 | * if the %NL80211_BSS_BEACON_IES attribute is present and the data is |
| 3063 | * from a Probe Response frame; otherwise they are from a Beacon frame. | 3192 | * different then the IEs here are from a Probe Response frame; otherwise |
| 3193 | * they are from a Beacon frame. | ||
| 3064 | * However, if the driver does not indicate the source of the IEs, these | 3194 | * However, if the driver does not indicate the source of the IEs, these |
| 3065 | * IEs may be from either frame subtype. | 3195 | * IEs may be from either frame subtype. |
| 3196 | * If present, the @NL80211_BSS_PRESP_DATA attribute indicates that the | ||
| 3197 | * data here is known to be from a probe response, without any heuristics. | ||
| 3066 | * @NL80211_BSS_SIGNAL_MBM: signal strength of probe response/beacon | 3198 | * @NL80211_BSS_SIGNAL_MBM: signal strength of probe response/beacon |
| 3067 | * in mBm (100 * dBm) (s32) | 3199 | * in mBm (100 * dBm) (s32) |
| 3068 | * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon | 3200 | * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon |
| @@ -3074,6 +3206,10 @@ enum nl80211_bss_scan_width { | |||
| 3074 | * yet been received | 3206 | * yet been received |
| 3075 | * @NL80211_BSS_CHAN_WIDTH: channel width of the control channel | 3207 | * @NL80211_BSS_CHAN_WIDTH: channel width of the control channel |
| 3076 | * (u32, enum nl80211_bss_scan_width) | 3208 | * (u32, enum nl80211_bss_scan_width) |
| 3209 | * @NL80211_BSS_BEACON_TSF: TSF of the last received beacon (u64) | ||
| 3210 | * (not present if no beacon frame has been received yet) | ||
| 3211 | * @NL80211_BSS_PRESP_DATA: the data in @NL80211_BSS_INFORMATION_ELEMENTS and | ||
| 3212 | * @NL80211_BSS_TSF is known to be from a probe response (flag attribute) | ||
| 3077 | * @__NL80211_BSS_AFTER_LAST: internal | 3213 | * @__NL80211_BSS_AFTER_LAST: internal |
| 3078 | * @NL80211_BSS_MAX: highest BSS attribute | 3214 | * @NL80211_BSS_MAX: highest BSS attribute |
| 3079 | */ | 3215 | */ |
| @@ -3091,6 +3227,8 @@ enum nl80211_bss { | |||
| 3091 | NL80211_BSS_SEEN_MS_AGO, | 3227 | NL80211_BSS_SEEN_MS_AGO, |
| 3092 | NL80211_BSS_BEACON_IES, | 3228 | NL80211_BSS_BEACON_IES, |
| 3093 | NL80211_BSS_CHAN_WIDTH, | 3229 | NL80211_BSS_CHAN_WIDTH, |
| 3230 | NL80211_BSS_BEACON_TSF, | ||
| 3231 | NL80211_BSS_PRESP_DATA, | ||
| 3094 | 3232 | ||
| 3095 | /* keep last */ | 3233 | /* keep last */ |
| 3096 | __NL80211_BSS_AFTER_LAST, | 3234 | __NL80211_BSS_AFTER_LAST, |
| @@ -3313,6 +3451,8 @@ enum nl80211_ps_state { | |||
| 3313 | * interval in which %NL80211_ATTR_CQM_TXE_PKTS and | 3451 | * interval in which %NL80211_ATTR_CQM_TXE_PKTS and |
| 3314 | * %NL80211_ATTR_CQM_TXE_RATE must be satisfied before generating an | 3452 | * %NL80211_ATTR_CQM_TXE_RATE must be satisfied before generating an |
| 3315 | * %NL80211_CMD_NOTIFY_CQM. Set to 0 to turn off TX error reporting. | 3453 | * %NL80211_CMD_NOTIFY_CQM. Set to 0 to turn off TX error reporting. |
| 3454 | * @NL80211_ATTR_CQM_BEACON_LOSS_EVENT: flag attribute that's set in a beacon | ||
| 3455 | * loss event | ||
| 3316 | * @__NL80211_ATTR_CQM_AFTER_LAST: internal | 3456 | * @__NL80211_ATTR_CQM_AFTER_LAST: internal |
| 3317 | * @NL80211_ATTR_CQM_MAX: highest key attribute | 3457 | * @NL80211_ATTR_CQM_MAX: highest key attribute |
| 3318 | */ | 3458 | */ |
| @@ -3325,6 +3465,7 @@ enum nl80211_attr_cqm { | |||
| 3325 | NL80211_ATTR_CQM_TXE_RATE, | 3465 | NL80211_ATTR_CQM_TXE_RATE, |
| 3326 | NL80211_ATTR_CQM_TXE_PKTS, | 3466 | NL80211_ATTR_CQM_TXE_PKTS, |
| 3327 | NL80211_ATTR_CQM_TXE_INTVL, | 3467 | NL80211_ATTR_CQM_TXE_INTVL, |
| 3468 | NL80211_ATTR_CQM_BEACON_LOSS_EVENT, | ||
| 3328 | 3469 | ||
| 3329 | /* keep last */ | 3470 | /* keep last */ |
| 3330 | __NL80211_ATTR_CQM_AFTER_LAST, | 3471 | __NL80211_ATTR_CQM_AFTER_LAST, |
| @@ -3337,9 +3478,7 @@ enum nl80211_attr_cqm { | |||
| 3337 | * configured threshold | 3478 | * configured threshold |
| 3338 | * @NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH: The RSSI is higher than the | 3479 | * @NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH: The RSSI is higher than the |
| 3339 | * configured threshold | 3480 | * configured threshold |
| 3340 | * @NL80211_CQM_RSSI_BEACON_LOSS_EVENT: The device experienced beacon loss. | 3481 | * @NL80211_CQM_RSSI_BEACON_LOSS_EVENT: (reserved, never sent) |
| 3341 | * (Note that deauth/disassoc will still follow if the AP is not | ||
| 3342 | * available. This event might get used as roaming event, etc.) | ||
| 3343 | */ | 3482 | */ |
| 3344 | enum nl80211_cqm_rssi_threshold_event { | 3483 | enum nl80211_cqm_rssi_threshold_event { |
| 3345 | NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW, | 3484 | NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW, |
| @@ -3479,6 +3618,25 @@ struct nl80211_pattern_support { | |||
| 3479 | * @NL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS: For wakeup reporting only, | 3618 | * @NL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS: For wakeup reporting only, |
| 3480 | * the TCP connection ran out of tokens to use for data to send to the | 3619 | * the TCP connection ran out of tokens to use for data to send to the |
| 3481 | * service | 3620 | * service |
| 3621 | * @NL80211_WOWLAN_TRIG_NET_DETECT: wake up when a configured network | ||
| 3622 | * is detected. This is a nested attribute that contains the | ||
| 3623 | * same attributes used with @NL80211_CMD_START_SCHED_SCAN. It | ||
| 3624 | * specifies how the scan is performed (e.g. the interval and the | ||
| 3625 | * channels to scan) as well as the scan results that will | ||
| 3626 | * trigger a wake (i.e. the matchsets). | ||
| 3627 | * @NL80211_WOWLAN_TRIG_NET_DETECT_RESULTS: nested attribute | ||
| 3628 | * containing an array with information about what triggered the | ||
| 3629 | * wake up. If no elements are present in the array, it means | ||
| 3630 | * that the information is not available. If more than one | ||
| 3631 | * element is present, it means that more than one match | ||
| 3632 | * occurred. | ||
| 3633 | * Each element in the array is a nested attribute that contains | ||
| 3634 | * one optional %NL80211_ATTR_SSID attribute and one optional | ||
| 3635 | * %NL80211_ATTR_SCAN_FREQUENCIES attribute. At least one of | ||
| 3636 | * these attributes must be present. If | ||
| 3637 | * %NL80211_ATTR_SCAN_FREQUENCIES contains more than one | ||
| 3638 | * frequency, it means that the match occurred in more than one | ||
| 3639 | * channel. | ||
| 3482 | * @NUM_NL80211_WOWLAN_TRIG: number of wake on wireless triggers | 3640 | * @NUM_NL80211_WOWLAN_TRIG: number of wake on wireless triggers |
| 3483 | * @MAX_NL80211_WOWLAN_TRIG: highest wowlan trigger attribute number | 3641 | * @MAX_NL80211_WOWLAN_TRIG: highest wowlan trigger attribute number |
| 3484 | * | 3642 | * |
| @@ -3504,6 +3662,8 @@ enum nl80211_wowlan_triggers { | |||
| 3504 | NL80211_WOWLAN_TRIG_WAKEUP_TCP_MATCH, | 3662 | NL80211_WOWLAN_TRIG_WAKEUP_TCP_MATCH, |
| 3505 | NL80211_WOWLAN_TRIG_WAKEUP_TCP_CONNLOST, | 3663 | NL80211_WOWLAN_TRIG_WAKEUP_TCP_CONNLOST, |
| 3506 | NL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS, | 3664 | NL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS, |
| 3665 | NL80211_WOWLAN_TRIG_NET_DETECT, | ||
| 3666 | NL80211_WOWLAN_TRIG_NET_DETECT_RESULTS, | ||
| 3507 | 3667 | ||
| 3508 | /* keep last */ | 3668 | /* keep last */ |
| 3509 | NUM_NL80211_WOWLAN_TRIG, | 3669 | NUM_NL80211_WOWLAN_TRIG, |
| @@ -3956,6 +4116,47 @@ enum nl80211_ap_sme_features { | |||
| 3956 | * @NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE: This driver supports dynamic | 4116 | * @NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE: This driver supports dynamic |
| 3957 | * channel bandwidth change (e.g., HT 20 <-> 40 MHz channel) during the | 4117 | * channel bandwidth change (e.g., HT 20 <-> 40 MHz channel) during the |
| 3958 | * lifetime of a BSS. | 4118 | * lifetime of a BSS. |
| 4119 | * @NL80211_FEATURE_DS_PARAM_SET_IE_IN_PROBES: This device adds a DS Parameter | ||
| 4120 | * Set IE to probe requests. | ||
| 4121 | * @NL80211_FEATURE_WFA_TPC_IE_IN_PROBES: This device adds a WFA TPC Report IE | ||
| 4122 | * to probe requests. | ||
| 4123 | * @NL80211_FEATURE_QUIET: This device, in client mode, supports Quiet Period | ||
| 4124 | * requests sent to it by an AP. | ||
| 4125 | * @NL80211_FEATURE_TX_POWER_INSERTION: This device is capable of inserting the | ||
| 4126 | * current tx power value into the TPC Report IE in the spectrum | ||
| 4127 | * management TPC Report action frame, and in the Radio Measurement Link | ||
| 4128 | * Measurement Report action frame. | ||
| 4129 | * @NL80211_FEATURE_ACKTO_ESTIMATION: This driver supports dynamic ACK timeout | ||
| 4130 | * estimation (dynack). %NL80211_ATTR_WIPHY_DYN_ACK flag attribute is used | ||
| 4131 | * to enable dynack. | ||
| 4132 | * @NL80211_FEATURE_STATIC_SMPS: Device supports static spatial | ||
| 4133 | * multiplexing powersave, ie. can turn off all but one chain | ||
| 4134 | * even on HT connections that should be using more chains. | ||
| 4135 | * @NL80211_FEATURE_DYNAMIC_SMPS: Device supports dynamic spatial | ||
| 4136 | * multiplexing powersave, ie. can turn off all but one chain | ||
| 4137 | * and then wake the rest up as required after, for example, | ||
| 4138 | * rts/cts handshake. | ||
| 4139 | * @NL80211_FEATURE_SUPPORTS_WMM_ADMISSION: the device supports setting up WMM | ||
| 4140 | * TSPEC sessions (TID aka TSID 0-7) with the %NL80211_CMD_ADD_TX_TS | ||
| 4141 | * command. Standard IEEE 802.11 TSPEC setup is not yet supported, it | ||
| 4142 | * needs to be able to handle Block-Ack agreements and other things. | ||
| 4143 | * @NL80211_FEATURE_MAC_ON_CREATE: Device supports configuring | ||
| 4144 | * the vif's MAC address upon creation. | ||
| 4145 | * See 'macaddr' field in the vif_params (cfg80211.h). | ||
| 4146 | * @NL80211_FEATURE_TDLS_CHANNEL_SWITCH: Driver supports channel switching when | ||
| 4147 | * operating as a TDLS peer. | ||
| 4148 | * @NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR: This device/driver supports using a | ||
| 4149 | * random MAC address during scan (if the device is unassociated); the | ||
| 4150 | * %NL80211_SCAN_FLAG_RANDOM_ADDR flag may be set for scans and the MAC | ||
| 4151 | * address mask/value will be used. | ||
| 4152 | * @NL80211_FEATURE_SCHED_SCAN_RANDOM_MAC_ADDR: This device/driver supports | ||
| 4153 | * using a random MAC address for every scan iteration during scheduled | ||
| 4154 | * scan (while not associated), the %NL80211_SCAN_FLAG_RANDOM_ADDR may | ||
| 4155 | * be set for scheduled scan and the MAC address mask/value will be used. | ||
| 4156 | * @NL80211_FEATURE_ND_RANDOM_MAC_ADDR: This device/driver supports using a | ||
| 4157 | * random MAC address for every scan iteration during "net detect", i.e. | ||
| 4158 | * scan in unassociated WoWLAN, the %NL80211_SCAN_FLAG_RANDOM_ADDR may | ||
| 4159 | * be set for scheduled scan and the MAC address mask/value will be used. | ||
| 3959 | */ | 4160 | */ |
| 3960 | enum nl80211_feature_flags { | 4161 | enum nl80211_feature_flags { |
| 3961 | NL80211_FEATURE_SK_TX_STATUS = 1 << 0, | 4162 | NL80211_FEATURE_SK_TX_STATUS = 1 << 0, |
| @@ -3977,6 +4178,19 @@ enum nl80211_feature_flags { | |||
| 3977 | NL80211_FEATURE_USERSPACE_MPM = 1 << 16, | 4178 | NL80211_FEATURE_USERSPACE_MPM = 1 << 16, |
| 3978 | NL80211_FEATURE_ACTIVE_MONITOR = 1 << 17, | 4179 | NL80211_FEATURE_ACTIVE_MONITOR = 1 << 17, |
| 3979 | NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE = 1 << 18, | 4180 | NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE = 1 << 18, |
| 4181 | NL80211_FEATURE_DS_PARAM_SET_IE_IN_PROBES = 1 << 19, | ||
| 4182 | NL80211_FEATURE_WFA_TPC_IE_IN_PROBES = 1 << 20, | ||
| 4183 | NL80211_FEATURE_QUIET = 1 << 21, | ||
| 4184 | NL80211_FEATURE_TX_POWER_INSERTION = 1 << 22, | ||
| 4185 | NL80211_FEATURE_ACKTO_ESTIMATION = 1 << 23, | ||
| 4186 | NL80211_FEATURE_STATIC_SMPS = 1 << 24, | ||
| 4187 | NL80211_FEATURE_DYNAMIC_SMPS = 1 << 25, | ||
| 4188 | NL80211_FEATURE_SUPPORTS_WMM_ADMISSION = 1 << 26, | ||
| 4189 | NL80211_FEATURE_MAC_ON_CREATE = 1 << 27, | ||
| 4190 | NL80211_FEATURE_TDLS_CHANNEL_SWITCH = 1 << 28, | ||
| 4191 | NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR = 1 << 29, | ||
| 4192 | NL80211_FEATURE_SCHED_SCAN_RANDOM_MAC_ADDR = 1 << 30, | ||
| 4193 | NL80211_FEATURE_ND_RANDOM_MAC_ADDR = 1 << 31, | ||
| 3980 | }; | 4194 | }; |
| 3981 | 4195 | ||
| 3982 | /** | 4196 | /** |
| @@ -4025,11 +4239,21 @@ enum nl80211_connect_failed_reason { | |||
| 4025 | * dangerous because will destroy stations performance as a lot of frames | 4239 | * dangerous because will destroy stations performance as a lot of frames |
| 4026 | * will be lost while scanning off-channel, therefore it must be used only | 4240 | * will be lost while scanning off-channel, therefore it must be used only |
| 4027 | * when really needed | 4241 | * when really needed |
| 4242 | * @NL80211_SCAN_FLAG_RANDOM_ADDR: use a random MAC address for this scan (or | ||
| 4243 | * for scheduled scan: a different one for every scan iteration). When the | ||
| 4244 | * flag is set, depending on device capabilities the @NL80211_ATTR_MAC and | ||
| 4245 | * @NL80211_ATTR_MAC_MASK attributes may also be given in which case only | ||
| 4246 | * the masked bits will be preserved from the MAC address and the remainder | ||
| 4247 | * randomised. If the attributes are not given full randomisation (46 bits, | ||
| 4248 | * locally administered 1, multicast 0) is assumed. | ||
| 4249 | * This flag must not be requested when the feature isn't supported, check | ||
| 4250 | * the nl80211 feature flags for the device. | ||
| 4028 | */ | 4251 | */ |
| 4029 | enum nl80211_scan_flags { | 4252 | enum nl80211_scan_flags { |
| 4030 | NL80211_SCAN_FLAG_LOW_PRIORITY = 1<<0, | 4253 | NL80211_SCAN_FLAG_LOW_PRIORITY = 1<<0, |
| 4031 | NL80211_SCAN_FLAG_FLUSH = 1<<1, | 4254 | NL80211_SCAN_FLAG_FLUSH = 1<<1, |
| 4032 | NL80211_SCAN_FLAG_AP = 1<<2, | 4255 | NL80211_SCAN_FLAG_AP = 1<<2, |
| 4256 | NL80211_SCAN_FLAG_RANDOM_ADDR = 1<<3, | ||
| 4033 | }; | 4257 | }; |
| 4034 | 4258 | ||
| 4035 | /** | 4259 | /** |
| @@ -4051,6 +4275,25 @@ enum nl80211_acl_policy { | |||
| 4051 | }; | 4275 | }; |
| 4052 | 4276 | ||
| 4053 | /** | 4277 | /** |
| 4278 | * enum nl80211_smps_mode - SMPS mode | ||
| 4279 | * | ||
| 4280 | * Requested SMPS mode (for AP mode) | ||
| 4281 | * | ||
| 4282 | * @NL80211_SMPS_OFF: SMPS off (use all antennas). | ||
| 4283 | * @NL80211_SMPS_STATIC: static SMPS (use a single antenna) | ||
| 4284 | * @NL80211_SMPS_DYNAMIC: dynamic smps (start with a single antenna and | ||
| 4285 | * turn on other antennas after CTS/RTS). | ||
| 4286 | */ | ||
| 4287 | enum nl80211_smps_mode { | ||
| 4288 | NL80211_SMPS_OFF, | ||
| 4289 | NL80211_SMPS_STATIC, | ||
| 4290 | NL80211_SMPS_DYNAMIC, | ||
| 4291 | |||
| 4292 | __NL80211_SMPS_AFTER_LAST, | ||
| 4293 | NL80211_SMPS_MAX = __NL80211_SMPS_AFTER_LAST - 1 | ||
| 4294 | }; | ||
| 4295 | |||
| 4296 | /** | ||
| 4054 | * enum nl80211_radar_event - type of radar event for DFS operation | 4297 | * enum nl80211_radar_event - type of radar event for DFS operation |
| 4055 | * | 4298 | * |
| 4056 | * Type of event to be used with NL80211_ATTR_RADAR_EVENT to inform userspace | 4299 | * Type of event to be used with NL80211_ATTR_RADAR_EVENT to inform userspace |
diff --git a/include/uapi/linux/nvme.h b/include/uapi/linux/nvme.h index 29a7d8619d8d..26386cf3db44 100644 --- a/include/uapi/linux/nvme.h +++ b/include/uapi/linux/nvme.h | |||
| @@ -181,6 +181,22 @@ enum { | |||
| 181 | NVME_LBART_ATTRIB_HIDE = 1 << 1, | 181 | NVME_LBART_ATTRIB_HIDE = 1 << 1, |
| 182 | }; | 182 | }; |
| 183 | 183 | ||
| 184 | struct nvme_reservation_status { | ||
| 185 | __le32 gen; | ||
| 186 | __u8 rtype; | ||
| 187 | __u8 regctl[2]; | ||
| 188 | __u8 resv5[2]; | ||
| 189 | __u8 ptpls; | ||
| 190 | __u8 resv10[13]; | ||
| 191 | struct { | ||
| 192 | __le16 cntlid; | ||
| 193 | __u8 rcsts; | ||
| 194 | __u8 resv3[5]; | ||
| 195 | __le64 hostid; | ||
| 196 | __le64 rkey; | ||
| 197 | } regctl_ds[]; | ||
| 198 | }; | ||
| 199 | |||
| 184 | /* I/O commands */ | 200 | /* I/O commands */ |
| 185 | 201 | ||
| 186 | enum nvme_opcode { | 202 | enum nvme_opcode { |
| @@ -189,7 +205,12 @@ enum nvme_opcode { | |||
| 189 | nvme_cmd_read = 0x02, | 205 | nvme_cmd_read = 0x02, |
| 190 | nvme_cmd_write_uncor = 0x04, | 206 | nvme_cmd_write_uncor = 0x04, |
| 191 | nvme_cmd_compare = 0x05, | 207 | nvme_cmd_compare = 0x05, |
| 208 | nvme_cmd_write_zeroes = 0x08, | ||
| 192 | nvme_cmd_dsm = 0x09, | 209 | nvme_cmd_dsm = 0x09, |
| 210 | nvme_cmd_resv_register = 0x0d, | ||
| 211 | nvme_cmd_resv_report = 0x0e, | ||
| 212 | nvme_cmd_resv_acquire = 0x11, | ||
| 213 | nvme_cmd_resv_release = 0x15, | ||
| 193 | }; | 214 | }; |
| 194 | 215 | ||
| 195 | struct nvme_common_command { | 216 | struct nvme_common_command { |
| @@ -305,7 +326,11 @@ enum { | |||
| 305 | NVME_FEAT_IRQ_CONFIG = 0x09, | 326 | NVME_FEAT_IRQ_CONFIG = 0x09, |
| 306 | NVME_FEAT_WRITE_ATOMIC = 0x0a, | 327 | NVME_FEAT_WRITE_ATOMIC = 0x0a, |
| 307 | NVME_FEAT_ASYNC_EVENT = 0x0b, | 328 | NVME_FEAT_ASYNC_EVENT = 0x0b, |
| 308 | NVME_FEAT_SW_PROGRESS = 0x0c, | 329 | NVME_FEAT_AUTO_PST = 0x0c, |
| 330 | NVME_FEAT_SW_PROGRESS = 0x80, | ||
| 331 | NVME_FEAT_HOST_ID = 0x81, | ||
| 332 | NVME_FEAT_RESV_MASK = 0x82, | ||
| 333 | NVME_FEAT_RESV_PERSIST = 0x83, | ||
| 309 | NVME_LOG_ERROR = 0x01, | 334 | NVME_LOG_ERROR = 0x01, |
| 310 | NVME_LOG_SMART = 0x02, | 335 | NVME_LOG_SMART = 0x02, |
| 311 | NVME_LOG_FW_SLOT = 0x03, | 336 | NVME_LOG_FW_SLOT = 0x03, |
| @@ -440,9 +465,15 @@ enum { | |||
| 440 | NVME_SC_FUSED_MISSING = 0xa, | 465 | NVME_SC_FUSED_MISSING = 0xa, |
| 441 | NVME_SC_INVALID_NS = 0xb, | 466 | NVME_SC_INVALID_NS = 0xb, |
| 442 | NVME_SC_CMD_SEQ_ERROR = 0xc, | 467 | NVME_SC_CMD_SEQ_ERROR = 0xc, |
| 468 | NVME_SC_SGL_INVALID_LAST = 0xd, | ||
| 469 | NVME_SC_SGL_INVALID_COUNT = 0xe, | ||
| 470 | NVME_SC_SGL_INVALID_DATA = 0xf, | ||
| 471 | NVME_SC_SGL_INVALID_METADATA = 0x10, | ||
| 472 | NVME_SC_SGL_INVALID_TYPE = 0x11, | ||
| 443 | NVME_SC_LBA_RANGE = 0x80, | 473 | NVME_SC_LBA_RANGE = 0x80, |
| 444 | NVME_SC_CAP_EXCEEDED = 0x81, | 474 | NVME_SC_CAP_EXCEEDED = 0x81, |
| 445 | NVME_SC_NS_NOT_READY = 0x82, | 475 | NVME_SC_NS_NOT_READY = 0x82, |
| 476 | NVME_SC_RESERVATION_CONFLICT = 0x83, | ||
| 446 | NVME_SC_CQ_INVALID = 0x100, | 477 | NVME_SC_CQ_INVALID = 0x100, |
| 447 | NVME_SC_QID_INVALID = 0x101, | 478 | NVME_SC_QID_INVALID = 0x101, |
| 448 | NVME_SC_QUEUE_SIZE = 0x102, | 479 | NVME_SC_QUEUE_SIZE = 0x102, |
| @@ -454,7 +485,15 @@ enum { | |||
| 454 | NVME_SC_INVALID_VECTOR = 0x108, | 485 | NVME_SC_INVALID_VECTOR = 0x108, |
| 455 | NVME_SC_INVALID_LOG_PAGE = 0x109, | 486 | NVME_SC_INVALID_LOG_PAGE = 0x109, |
| 456 | NVME_SC_INVALID_FORMAT = 0x10a, | 487 | NVME_SC_INVALID_FORMAT = 0x10a, |
| 488 | NVME_SC_FIRMWARE_NEEDS_RESET = 0x10b, | ||
| 489 | NVME_SC_INVALID_QUEUE = 0x10c, | ||
| 490 | NVME_SC_FEATURE_NOT_SAVEABLE = 0x10d, | ||
| 491 | NVME_SC_FEATURE_NOT_CHANGEABLE = 0x10e, | ||
| 492 | NVME_SC_FEATURE_NOT_PER_NS = 0x10f, | ||
| 493 | NVME_SC_FW_NEEDS_RESET_SUBSYS = 0x110, | ||
| 457 | NVME_SC_BAD_ATTRIBUTES = 0x180, | 494 | NVME_SC_BAD_ATTRIBUTES = 0x180, |
| 495 | NVME_SC_INVALID_PI = 0x181, | ||
| 496 | NVME_SC_READ_ONLY = 0x182, | ||
| 458 | NVME_SC_WRITE_FAULT = 0x280, | 497 | NVME_SC_WRITE_FAULT = 0x280, |
| 459 | NVME_SC_READ_ERROR = 0x281, | 498 | NVME_SC_READ_ERROR = 0x281, |
| 460 | NVME_SC_GUARD_CHECK = 0x282, | 499 | NVME_SC_GUARD_CHECK = 0x282, |
| @@ -489,7 +528,7 @@ struct nvme_user_io { | |||
| 489 | __u16 appmask; | 528 | __u16 appmask; |
| 490 | }; | 529 | }; |
| 491 | 530 | ||
| 492 | struct nvme_admin_cmd { | 531 | struct nvme_passthru_cmd { |
| 493 | __u8 opcode; | 532 | __u8 opcode; |
| 494 | __u8 flags; | 533 | __u8 flags; |
| 495 | __u16 rsvd1; | 534 | __u16 rsvd1; |
| @@ -510,8 +549,11 @@ struct nvme_admin_cmd { | |||
| 510 | __u32 result; | 549 | __u32 result; |
| 511 | }; | 550 | }; |
| 512 | 551 | ||
| 552 | #define nvme_admin_cmd nvme_passthru_cmd | ||
| 553 | |||
| 513 | #define NVME_IOCTL_ID _IO('N', 0x40) | 554 | #define NVME_IOCTL_ID _IO('N', 0x40) |
| 514 | #define NVME_IOCTL_ADMIN_CMD _IOWR('N', 0x41, struct nvme_admin_cmd) | 555 | #define NVME_IOCTL_ADMIN_CMD _IOWR('N', 0x41, struct nvme_admin_cmd) |
| 515 | #define NVME_IOCTL_SUBMIT_IO _IOW('N', 0x42, struct nvme_user_io) | 556 | #define NVME_IOCTL_SUBMIT_IO _IOW('N', 0x42, struct nvme_user_io) |
| 557 | #define NVME_IOCTL_IO_CMD _IOWR('N', 0x43, struct nvme_passthru_cmd) | ||
| 516 | 558 | ||
| 517 | #endif /* _UAPI_LINUX_NVME_H */ | 559 | #endif /* _UAPI_LINUX_NVME_H */ |
diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h index a794d1dd7b40..3a6dcaa359b7 100644 --- a/include/uapi/linux/openvswitch.h +++ b/include/uapi/linux/openvswitch.h | |||
| @@ -157,6 +157,11 @@ enum ovs_packet_cmd { | |||
| 157 | * notification if the %OVS_ACTION_ATTR_USERSPACE action specified an | 157 | * notification if the %OVS_ACTION_ATTR_USERSPACE action specified an |
| 158 | * %OVS_USERSPACE_ATTR_USERDATA attribute, with the same length and content | 158 | * %OVS_USERSPACE_ATTR_USERDATA attribute, with the same length and content |
| 159 | * specified there. | 159 | * specified there. |
| 160 | * @OVS_PACKET_ATTR_EGRESS_TUN_KEY: Present for an %OVS_PACKET_CMD_ACTION | ||
| 161 | * notification if the %OVS_ACTION_ATTR_USERSPACE action specified an | ||
| 162 | * %OVS_USERSPACE_ATTR_EGRESS_TUN_PORT attribute, which is sent only if the | ||
| 163 | * output port is actually a tunnel port. Contains the output tunnel key | ||
| 164 | * extracted from the packet as nested %OVS_TUNNEL_KEY_ATTR_* attributes. | ||
| 160 | * | 165 | * |
| 161 | * These attributes follow the &struct ovs_header within the Generic Netlink | 166 | * These attributes follow the &struct ovs_header within the Generic Netlink |
| 162 | * payload for %OVS_PACKET_* commands. | 167 | * payload for %OVS_PACKET_* commands. |
| @@ -167,6 +172,8 @@ enum ovs_packet_attr { | |||
| 167 | OVS_PACKET_ATTR_KEY, /* Nested OVS_KEY_ATTR_* attributes. */ | 172 | OVS_PACKET_ATTR_KEY, /* Nested OVS_KEY_ATTR_* attributes. */ |
| 168 | OVS_PACKET_ATTR_ACTIONS, /* Nested OVS_ACTION_ATTR_* attributes. */ | 173 | OVS_PACKET_ATTR_ACTIONS, /* Nested OVS_ACTION_ATTR_* attributes. */ |
| 169 | OVS_PACKET_ATTR_USERDATA, /* OVS_ACTION_ATTR_USERSPACE arg. */ | 174 | OVS_PACKET_ATTR_USERDATA, /* OVS_ACTION_ATTR_USERSPACE arg. */ |
| 175 | OVS_PACKET_ATTR_EGRESS_TUN_KEY, /* Nested OVS_TUNNEL_KEY_ATTR_* | ||
| 176 | attributes. */ | ||
| 170 | __OVS_PACKET_ATTR_MAX | 177 | __OVS_PACKET_ATTR_MAX |
| 171 | }; | 178 | }; |
| 172 | 179 | ||
| @@ -192,6 +199,7 @@ enum ovs_vport_type { | |||
| 192 | OVS_VPORT_TYPE_INTERNAL, /* network device implemented by datapath */ | 199 | OVS_VPORT_TYPE_INTERNAL, /* network device implemented by datapath */ |
| 193 | OVS_VPORT_TYPE_GRE, /* GRE tunnel. */ | 200 | OVS_VPORT_TYPE_GRE, /* GRE tunnel. */ |
| 194 | OVS_VPORT_TYPE_VXLAN, /* VXLAN tunnel. */ | 201 | OVS_VPORT_TYPE_VXLAN, /* VXLAN tunnel. */ |
| 202 | OVS_VPORT_TYPE_GENEVE, /* Geneve tunnel. */ | ||
| 195 | __OVS_VPORT_TYPE_MAX | 203 | __OVS_VPORT_TYPE_MAX |
| 196 | }; | 204 | }; |
| 197 | 205 | ||
| @@ -289,9 +297,15 @@ enum ovs_key_attr { | |||
| 289 | OVS_KEY_ATTR_TUNNEL, /* Nested set of ovs_tunnel attributes */ | 297 | OVS_KEY_ATTR_TUNNEL, /* Nested set of ovs_tunnel attributes */ |
| 290 | OVS_KEY_ATTR_SCTP, /* struct ovs_key_sctp */ | 298 | OVS_KEY_ATTR_SCTP, /* struct ovs_key_sctp */ |
| 291 | OVS_KEY_ATTR_TCP_FLAGS, /* be16 TCP flags. */ | 299 | OVS_KEY_ATTR_TCP_FLAGS, /* be16 TCP flags. */ |
| 300 | OVS_KEY_ATTR_DP_HASH, /* u32 hash value. Value 0 indicates the hash | ||
| 301 | is not computed by the datapath. */ | ||
| 302 | OVS_KEY_ATTR_RECIRC_ID, /* u32 recirc id */ | ||
| 303 | OVS_KEY_ATTR_MPLS, /* array of struct ovs_key_mpls. | ||
| 304 | * The implementation may restrict | ||
| 305 | * the accepted length of the array. */ | ||
| 292 | 306 | ||
| 293 | #ifdef __KERNEL__ | 307 | #ifdef __KERNEL__ |
| 294 | OVS_KEY_ATTR_IPV4_TUNNEL, /* struct ovs_key_ipv4_tunnel */ | 308 | OVS_KEY_ATTR_TUNNEL_INFO, /* struct ovs_tunnel_info */ |
| 295 | #endif | 309 | #endif |
| 296 | __OVS_KEY_ATTR_MAX | 310 | __OVS_KEY_ATTR_MAX |
| 297 | }; | 311 | }; |
| @@ -306,6 +320,10 @@ enum ovs_tunnel_key_attr { | |||
| 306 | OVS_TUNNEL_KEY_ATTR_TTL, /* u8 Tunnel IP TTL. */ | 320 | OVS_TUNNEL_KEY_ATTR_TTL, /* u8 Tunnel IP TTL. */ |
| 307 | OVS_TUNNEL_KEY_ATTR_DONT_FRAGMENT, /* No argument, set DF. */ | 321 | OVS_TUNNEL_KEY_ATTR_DONT_FRAGMENT, /* No argument, set DF. */ |
| 308 | OVS_TUNNEL_KEY_ATTR_CSUM, /* No argument. CSUM packet. */ | 322 | OVS_TUNNEL_KEY_ATTR_CSUM, /* No argument. CSUM packet. */ |
| 323 | OVS_TUNNEL_KEY_ATTR_OAM, /* No argument. OAM frame. */ | ||
| 324 | OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS, /* Array of Geneve options. */ | ||
| 325 | OVS_TUNNEL_KEY_ATTR_TP_SRC, /* be16 src Transport Port. */ | ||
| 326 | OVS_TUNNEL_KEY_ATTR_TP_DST, /* be16 dst Transport Port. */ | ||
| 309 | __OVS_TUNNEL_KEY_ATTR_MAX | 327 | __OVS_TUNNEL_KEY_ATTR_MAX |
| 310 | }; | 328 | }; |
| 311 | 329 | ||
| @@ -334,6 +352,10 @@ struct ovs_key_ethernet { | |||
| 334 | __u8 eth_dst[ETH_ALEN]; | 352 | __u8 eth_dst[ETH_ALEN]; |
| 335 | }; | 353 | }; |
| 336 | 354 | ||
| 355 | struct ovs_key_mpls { | ||
| 356 | __be32 mpls_lse; | ||
| 357 | }; | ||
| 358 | |||
| 337 | struct ovs_key_ipv4 { | 359 | struct ovs_key_ipv4 { |
| 338 | __be32 ipv4_src; | 360 | __be32 ipv4_src; |
| 339 | __be32 ipv4_dst; | 361 | __be32 ipv4_dst; |
| @@ -387,9 +409,9 @@ struct ovs_key_arp { | |||
| 387 | }; | 409 | }; |
| 388 | 410 | ||
| 389 | struct ovs_key_nd { | 411 | struct ovs_key_nd { |
| 390 | __u32 nd_target[4]; | 412 | __be32 nd_target[4]; |
| 391 | __u8 nd_sll[ETH_ALEN]; | 413 | __u8 nd_sll[ETH_ALEN]; |
| 392 | __u8 nd_tll[ETH_ALEN]; | 414 | __u8 nd_tll[ETH_ALEN]; |
| 393 | }; | 415 | }; |
| 394 | 416 | ||
| 395 | /** | 417 | /** |
| @@ -435,6 +457,8 @@ enum ovs_flow_attr { | |||
| 435 | OVS_FLOW_ATTR_USED, /* u64 msecs last used in monotonic time. */ | 457 | OVS_FLOW_ATTR_USED, /* u64 msecs last used in monotonic time. */ |
| 436 | OVS_FLOW_ATTR_CLEAR, /* Flag to clear stats, tcp_flags, used. */ | 458 | OVS_FLOW_ATTR_CLEAR, /* Flag to clear stats, tcp_flags, used. */ |
| 437 | OVS_FLOW_ATTR_MASK, /* Sequence of OVS_KEY_ATTR_* attributes. */ | 459 | OVS_FLOW_ATTR_MASK, /* Sequence of OVS_KEY_ATTR_* attributes. */ |
| 460 | OVS_FLOW_ATTR_PROBE, /* Flow operation is a feature probe, error | ||
| 461 | * logging should be suppressed. */ | ||
| 438 | __OVS_FLOW_ATTR_MAX | 462 | __OVS_FLOW_ATTR_MAX |
| 439 | }; | 463 | }; |
| 440 | 464 | ||
| @@ -467,17 +491,34 @@ enum ovs_sample_attr { | |||
| 467 | * message should be sent. Required. | 491 | * message should be sent. Required. |
| 468 | * @OVS_USERSPACE_ATTR_USERDATA: If present, its variable-length argument is | 492 | * @OVS_USERSPACE_ATTR_USERDATA: If present, its variable-length argument is |
| 469 | * copied to the %OVS_PACKET_CMD_ACTION message as %OVS_PACKET_ATTR_USERDATA. | 493 | * copied to the %OVS_PACKET_CMD_ACTION message as %OVS_PACKET_ATTR_USERDATA. |
| 494 | * @OVS_USERSPACE_ATTR_EGRESS_TUN_PORT: If present, u32 output port to get | ||
| 495 | * tunnel info. | ||
| 470 | */ | 496 | */ |
| 471 | enum ovs_userspace_attr { | 497 | enum ovs_userspace_attr { |
| 472 | OVS_USERSPACE_ATTR_UNSPEC, | 498 | OVS_USERSPACE_ATTR_UNSPEC, |
| 473 | OVS_USERSPACE_ATTR_PID, /* u32 Netlink PID to receive upcalls. */ | 499 | OVS_USERSPACE_ATTR_PID, /* u32 Netlink PID to receive upcalls. */ |
| 474 | OVS_USERSPACE_ATTR_USERDATA, /* Optional user-specified cookie. */ | 500 | OVS_USERSPACE_ATTR_USERDATA, /* Optional user-specified cookie. */ |
| 501 | OVS_USERSPACE_ATTR_EGRESS_TUN_PORT, /* Optional, u32 output port | ||
| 502 | * to get tunnel info. */ | ||
| 475 | __OVS_USERSPACE_ATTR_MAX | 503 | __OVS_USERSPACE_ATTR_MAX |
| 476 | }; | 504 | }; |
| 477 | 505 | ||
| 478 | #define OVS_USERSPACE_ATTR_MAX (__OVS_USERSPACE_ATTR_MAX - 1) | 506 | #define OVS_USERSPACE_ATTR_MAX (__OVS_USERSPACE_ATTR_MAX - 1) |
| 479 | 507 | ||
| 480 | /** | 508 | /** |
| 509 | * struct ovs_action_push_mpls - %OVS_ACTION_ATTR_PUSH_MPLS action argument. | ||
| 510 | * @mpls_lse: MPLS label stack entry to push. | ||
| 511 | * @mpls_ethertype: Ethertype to set in the encapsulating ethernet frame. | ||
| 512 | * | ||
| 513 | * The only values @mpls_ethertype should ever be given are %ETH_P_MPLS_UC and | ||
| 514 | * %ETH_P_MPLS_MC, indicating MPLS unicast or multicast. Other are rejected. | ||
| 515 | */ | ||
| 516 | struct ovs_action_push_mpls { | ||
| 517 | __be32 mpls_lse; | ||
| 518 | __be16 mpls_ethertype; /* Either %ETH_P_MPLS_UC or %ETH_P_MPLS_MC */ | ||
| 519 | }; | ||
| 520 | |||
| 521 | /** | ||
| 481 | * struct ovs_action_push_vlan - %OVS_ACTION_ATTR_PUSH_VLAN action argument. | 522 | * struct ovs_action_push_vlan - %OVS_ACTION_ATTR_PUSH_VLAN action argument. |
| 482 | * @vlan_tpid: Tag protocol identifier (TPID) to push. | 523 | * @vlan_tpid: Tag protocol identifier (TPID) to push. |
| 483 | * @vlan_tci: Tag control identifier (TCI) to push. The CFI bit must be set | 524 | * @vlan_tci: Tag control identifier (TCI) to push. The CFI bit must be set |
| @@ -493,6 +534,27 @@ struct ovs_action_push_vlan { | |||
| 493 | __be16 vlan_tci; /* 802.1Q TCI (VLAN ID and priority). */ | 534 | __be16 vlan_tci; /* 802.1Q TCI (VLAN ID and priority). */ |
| 494 | }; | 535 | }; |
| 495 | 536 | ||
| 537 | /* Data path hash algorithm for computing Datapath hash. | ||
| 538 | * | ||
| 539 | * The algorithm type only specifies the fields in a flow | ||
| 540 | * will be used as part of the hash. Each datapath is free | ||
| 541 | * to use its own hash algorithm. The hash value will be | ||
| 542 | * opaque to the user space daemon. | ||
| 543 | */ | ||
| 544 | enum ovs_hash_alg { | ||
| 545 | OVS_HASH_ALG_L4, | ||
| 546 | }; | ||
| 547 | |||
| 548 | /* | ||
| 549 | * struct ovs_action_hash - %OVS_ACTION_ATTR_HASH action argument. | ||
| 550 | * @hash_alg: Algorithm used to compute hash prior to recirculation. | ||
| 551 | * @hash_basis: basis used for computing hash. | ||
| 552 | */ | ||
| 553 | struct ovs_action_hash { | ||
| 554 | uint32_t hash_alg; /* One of ovs_hash_alg. */ | ||
| 555 | uint32_t hash_basis; | ||
| 556 | }; | ||
| 557 | |||
| 496 | /** | 558 | /** |
| 497 | * enum ovs_action_attr - Action types. | 559 | * enum ovs_action_attr - Action types. |
| 498 | * | 560 | * |
| @@ -507,6 +569,15 @@ struct ovs_action_push_vlan { | |||
| 507 | * @OVS_ACTION_ATTR_POP_VLAN: Pop the outermost 802.1Q header off the packet. | 569 | * @OVS_ACTION_ATTR_POP_VLAN: Pop the outermost 802.1Q header off the packet. |
| 508 | * @OVS_ACTION_ATTR_SAMPLE: Probabilitically executes actions, as specified in | 570 | * @OVS_ACTION_ATTR_SAMPLE: Probabilitically executes actions, as specified in |
| 509 | * the nested %OVS_SAMPLE_ATTR_* attributes. | 571 | * the nested %OVS_SAMPLE_ATTR_* attributes. |
| 572 | * @OVS_ACTION_ATTR_PUSH_MPLS: Push a new MPLS label stack entry onto the | ||
| 573 | * top of the packets MPLS label stack. Set the ethertype of the | ||
| 574 | * encapsulating frame to either %ETH_P_MPLS_UC or %ETH_P_MPLS_MC to | ||
| 575 | * indicate the new packet contents. | ||
| 576 | * @OVS_ACTION_ATTR_POP_MPLS: Pop an MPLS label stack entry off of the | ||
| 577 | * packet's MPLS label stack. Set the encapsulating frame's ethertype to | ||
| 578 | * indicate the new packet contents. This could potentially still be | ||
| 579 | * %ETH_P_MPLS if the resulting MPLS label stack is not empty. If there | ||
| 580 | * is no MPLS label stack, as determined by ethertype, no action is taken. | ||
| 510 | * | 581 | * |
| 511 | * Only a single header can be set with a single %OVS_ACTION_ATTR_SET. Not all | 582 | * Only a single header can be set with a single %OVS_ACTION_ATTR_SET. Not all |
| 512 | * fields within a header are modifiable, e.g. the IPv4 protocol and fragment | 583 | * fields within a header are modifiable, e.g. the IPv4 protocol and fragment |
| @@ -521,6 +592,11 @@ enum ovs_action_attr { | |||
| 521 | OVS_ACTION_ATTR_PUSH_VLAN, /* struct ovs_action_push_vlan. */ | 592 | OVS_ACTION_ATTR_PUSH_VLAN, /* struct ovs_action_push_vlan. */ |
| 522 | OVS_ACTION_ATTR_POP_VLAN, /* No argument. */ | 593 | OVS_ACTION_ATTR_POP_VLAN, /* No argument. */ |
| 523 | OVS_ACTION_ATTR_SAMPLE, /* Nested OVS_SAMPLE_ATTR_*. */ | 594 | OVS_ACTION_ATTR_SAMPLE, /* Nested OVS_SAMPLE_ATTR_*. */ |
| 595 | OVS_ACTION_ATTR_RECIRC, /* u32 recirc_id. */ | ||
| 596 | OVS_ACTION_ATTR_HASH, /* struct ovs_action_hash. */ | ||
| 597 | OVS_ACTION_ATTR_PUSH_MPLS, /* struct ovs_action_push_mpls. */ | ||
| 598 | OVS_ACTION_ATTR_POP_MPLS, /* __be16 ethertype. */ | ||
| 599 | |||
| 524 | __OVS_ACTION_ATTR_MAX | 600 | __OVS_ACTION_ATTR_MAX |
| 525 | }; | 601 | }; |
| 526 | 602 | ||
diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h index 30db069bce62..4a1d0cc38ff2 100644 --- a/include/uapi/linux/pci_regs.h +++ b/include/uapi/linux/pci_regs.h | |||
| @@ -552,6 +552,7 @@ | |||
| 552 | #define PCI_EXP_RTCTL_PMEIE 0x0008 /* PME Interrupt Enable */ | 552 | #define PCI_EXP_RTCTL_PMEIE 0x0008 /* PME Interrupt Enable */ |
| 553 | #define PCI_EXP_RTCTL_CRSSVE 0x0010 /* CRS Software Visibility Enable */ | 553 | #define PCI_EXP_RTCTL_CRSSVE 0x0010 /* CRS Software Visibility Enable */ |
| 554 | #define PCI_EXP_RTCAP 30 /* Root Capabilities */ | 554 | #define PCI_EXP_RTCAP 30 /* Root Capabilities */ |
| 555 | #define PCI_EXP_RTCAP_CRSVIS 0x0001 /* CRS Software Visibility capability */ | ||
| 555 | #define PCI_EXP_RTSTA 32 /* Root Status */ | 556 | #define PCI_EXP_RTSTA 32 /* Root Status */ |
| 556 | #define PCI_EXP_RTSTA_PME 0x00010000 /* PME status */ | 557 | #define PCI_EXP_RTSTA_PME 0x00010000 /* PME status */ |
| 557 | #define PCI_EXP_RTSTA_PENDING 0x00020000 /* PME pending */ | 558 | #define PCI_EXP_RTSTA_PENDING 0x00020000 /* PME pending */ |
| @@ -630,7 +631,7 @@ | |||
| 630 | 631 | ||
| 631 | /* Advanced Error Reporting */ | 632 | /* Advanced Error Reporting */ |
| 632 | #define PCI_ERR_UNCOR_STATUS 4 /* Uncorrectable Error Status */ | 633 | #define PCI_ERR_UNCOR_STATUS 4 /* Uncorrectable Error Status */ |
| 633 | #define PCI_ERR_UNC_TRAIN 0x00000001 /* Training */ | 634 | #define PCI_ERR_UNC_UND 0x00000001 /* Undefined */ |
| 634 | #define PCI_ERR_UNC_DLP 0x00000010 /* Data Link Protocol */ | 635 | #define PCI_ERR_UNC_DLP 0x00000010 /* Data Link Protocol */ |
| 635 | #define PCI_ERR_UNC_SURPDN 0x00000020 /* Surprise Down */ | 636 | #define PCI_ERR_UNC_SURPDN 0x00000020 /* Surprise Down */ |
| 636 | #define PCI_ERR_UNC_POISON_TLP 0x00001000 /* Poisoned TLP */ | 637 | #define PCI_ERR_UNC_POISON_TLP 0x00001000 /* Poisoned TLP */ |
diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index 9269de254874..9b79abbd1ab8 100644 --- a/include/uapi/linux/perf_event.h +++ b/include/uapi/linux/perf_event.h | |||
| @@ -137,8 +137,9 @@ enum perf_event_sample_format { | |||
| 137 | PERF_SAMPLE_DATA_SRC = 1U << 15, | 137 | PERF_SAMPLE_DATA_SRC = 1U << 15, |
| 138 | PERF_SAMPLE_IDENTIFIER = 1U << 16, | 138 | PERF_SAMPLE_IDENTIFIER = 1U << 16, |
| 139 | PERF_SAMPLE_TRANSACTION = 1U << 17, | 139 | PERF_SAMPLE_TRANSACTION = 1U << 17, |
| 140 | PERF_SAMPLE_REGS_INTR = 1U << 18, | ||
| 140 | 141 | ||
| 141 | PERF_SAMPLE_MAX = 1U << 18, /* non-ABI */ | 142 | PERF_SAMPLE_MAX = 1U << 19, /* non-ABI */ |
| 142 | }; | 143 | }; |
| 143 | 144 | ||
| 144 | /* | 145 | /* |
| @@ -238,6 +239,7 @@ enum perf_event_read_format { | |||
| 238 | #define PERF_ATTR_SIZE_VER2 80 /* add: branch_sample_type */ | 239 | #define PERF_ATTR_SIZE_VER2 80 /* add: branch_sample_type */ |
| 239 | #define PERF_ATTR_SIZE_VER3 96 /* add: sample_regs_user */ | 240 | #define PERF_ATTR_SIZE_VER3 96 /* add: sample_regs_user */ |
| 240 | /* add: sample_stack_user */ | 241 | /* add: sample_stack_user */ |
| 242 | #define PERF_ATTR_SIZE_VER4 104 /* add: sample_regs_intr */ | ||
| 241 | 243 | ||
| 242 | /* | 244 | /* |
| 243 | * Hardware event_id to monitor via a performance monitoring event: | 245 | * Hardware event_id to monitor via a performance monitoring event: |
| @@ -334,6 +336,15 @@ struct perf_event_attr { | |||
| 334 | 336 | ||
| 335 | /* Align to u64. */ | 337 | /* Align to u64. */ |
| 336 | __u32 __reserved_2; | 338 | __u32 __reserved_2; |
| 339 | /* | ||
| 340 | * Defines set of regs to dump for each sample | ||
| 341 | * state captured on: | ||
| 342 | * - precise = 0: PMU interrupt | ||
| 343 | * - precise > 0: sampled instruction | ||
| 344 | * | ||
| 345 | * See asm/perf_regs.h for details. | ||
| 346 | */ | ||
| 347 | __u64 sample_regs_intr; | ||
| 337 | }; | 348 | }; |
| 338 | 349 | ||
| 339 | #define perf_flags(attr) (*(&(attr)->read_format + 1)) | 350 | #define perf_flags(attr) (*(&(attr)->read_format + 1)) |
| @@ -364,7 +375,7 @@ struct perf_event_mmap_page { | |||
| 364 | /* | 375 | /* |
| 365 | * Bits needed to read the hw events in user-space. | 376 | * Bits needed to read the hw events in user-space. |
| 366 | * | 377 | * |
| 367 | * u32 seq, time_mult, time_shift, idx, width; | 378 | * u32 seq, time_mult, time_shift, index, width; |
| 368 | * u64 count, enabled, running; | 379 | * u64 count, enabled, running; |
| 369 | * u64 cyc, time_offset; | 380 | * u64 cyc, time_offset; |
| 370 | * s64 pmc = 0; | 381 | * s64 pmc = 0; |
| @@ -383,11 +394,11 @@ struct perf_event_mmap_page { | |||
| 383 | * time_shift = pc->time_shift; | 394 | * time_shift = pc->time_shift; |
| 384 | * } | 395 | * } |
| 385 | * | 396 | * |
| 386 | * idx = pc->index; | 397 | * index = pc->index; |
| 387 | * count = pc->offset; | 398 | * count = pc->offset; |
| 388 | * if (pc->cap_usr_rdpmc && idx) { | 399 | * if (pc->cap_user_rdpmc && index) { |
| 389 | * width = pc->pmc_width; | 400 | * width = pc->pmc_width; |
| 390 | * pmc = rdpmc(idx - 1); | 401 | * pmc = rdpmc(index - 1); |
| 391 | * } | 402 | * } |
| 392 | * | 403 | * |
| 393 | * barrier(); | 404 | * barrier(); |
| @@ -415,7 +426,7 @@ struct perf_event_mmap_page { | |||
| 415 | }; | 426 | }; |
| 416 | 427 | ||
| 417 | /* | 428 | /* |
| 418 | * If cap_usr_rdpmc this field provides the bit-width of the value | 429 | * If cap_user_rdpmc this field provides the bit-width of the value |
| 419 | * read using the rdpmc() or equivalent instruction. This can be used | 430 | * read using the rdpmc() or equivalent instruction. This can be used |
| 420 | * to sign extend the result like: | 431 | * to sign extend the result like: |
| 421 | * | 432 | * |
| @@ -439,10 +450,10 @@ struct perf_event_mmap_page { | |||
| 439 | * | 450 | * |
| 440 | * Where time_offset,time_mult,time_shift and cyc are read in the | 451 | * Where time_offset,time_mult,time_shift and cyc are read in the |
| 441 | * seqcount loop described above. This delta can then be added to | 452 | * seqcount loop described above. This delta can then be added to |
| 442 | * enabled and possible running (if idx), improving the scaling: | 453 | * enabled and possible running (if index), improving the scaling: |
| 443 | * | 454 | * |
| 444 | * enabled += delta; | 455 | * enabled += delta; |
| 445 | * if (idx) | 456 | * if (index) |
| 446 | * running += delta; | 457 | * running += delta; |
| 447 | * | 458 | * |
| 448 | * quot = count / running; | 459 | * quot = count / running; |
| @@ -686,6 +697,8 @@ enum perf_event_type { | |||
| 686 | * { u64 weight; } && PERF_SAMPLE_WEIGHT | 697 | * { u64 weight; } && PERF_SAMPLE_WEIGHT |
| 687 | * { u64 data_src; } && PERF_SAMPLE_DATA_SRC | 698 | * { u64 data_src; } && PERF_SAMPLE_DATA_SRC |
| 688 | * { u64 transaction; } && PERF_SAMPLE_TRANSACTION | 699 | * { u64 transaction; } && PERF_SAMPLE_TRANSACTION |
| 700 | * { u64 abi; # enum perf_sample_regs_abi | ||
| 701 | * u64 regs[weight(mask)]; } && PERF_SAMPLE_REGS_INTR | ||
| 689 | * }; | 702 | * }; |
| 690 | */ | 703 | */ |
| 691 | PERF_RECORD_SAMPLE = 9, | 704 | PERF_RECORD_SAMPLE = 9, |
diff --git a/include/uapi/linux/prctl.h b/include/uapi/linux/prctl.h index 58afc04c107e..89f63503f903 100644 --- a/include/uapi/linux/prctl.h +++ b/include/uapi/linux/prctl.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _LINUX_PRCTL_H | 1 | #ifndef _LINUX_PRCTL_H |
| 2 | #define _LINUX_PRCTL_H | 2 | #define _LINUX_PRCTL_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | /* Values to pass as first argument to prctl() */ | 6 | /* Values to pass as first argument to prctl() */ |
| 5 | 7 | ||
| 6 | #define PR_SET_PDEATHSIG 1 /* Second arg is a signal */ | 8 | #define PR_SET_PDEATHSIG 1 /* Second arg is a signal */ |
| @@ -119,6 +121,31 @@ | |||
| 119 | # define PR_SET_MM_ENV_END 11 | 121 | # define PR_SET_MM_ENV_END 11 |
| 120 | # define PR_SET_MM_AUXV 12 | 122 | # define PR_SET_MM_AUXV 12 |
| 121 | # define PR_SET_MM_EXE_FILE 13 | 123 | # define PR_SET_MM_EXE_FILE 13 |
| 124 | # define PR_SET_MM_MAP 14 | ||
| 125 | # define PR_SET_MM_MAP_SIZE 15 | ||
| 126 | |||
| 127 | /* | ||
| 128 | * This structure provides new memory descriptor | ||
| 129 | * map which mostly modifies /proc/pid/stat[m] | ||
| 130 | * output for a task. This mostly done in a | ||
| 131 | * sake of checkpoint/restore functionality. | ||
| 132 | */ | ||
| 133 | struct prctl_mm_map { | ||
| 134 | __u64 start_code; /* code section bounds */ | ||
| 135 | __u64 end_code; | ||
| 136 | __u64 start_data; /* data section bounds */ | ||
| 137 | __u64 end_data; | ||
| 138 | __u64 start_brk; /* heap for brk() syscall */ | ||
| 139 | __u64 brk; | ||
| 140 | __u64 start_stack; /* stack starts at */ | ||
| 141 | __u64 arg_start; /* command line arguments bounds */ | ||
| 142 | __u64 arg_end; | ||
| 143 | __u64 env_start; /* environment variables bounds */ | ||
| 144 | __u64 env_end; | ||
| 145 | __u64 *auxv; /* auxiliary vector */ | ||
| 146 | __u32 auxv_size; /* vector size */ | ||
| 147 | __u32 exe_fd; /* /proc/$pid/exe link file */ | ||
| 148 | }; | ||
| 122 | 149 | ||
| 123 | /* | 150 | /* |
| 124 | * Set specific pid that is allowed to ptrace the current task. | 151 | * Set specific pid that is allowed to ptrace the current task. |
| @@ -152,4 +179,10 @@ | |||
| 152 | #define PR_SET_THP_DISABLE 41 | 179 | #define PR_SET_THP_DISABLE 41 |
| 153 | #define PR_GET_THP_DISABLE 42 | 180 | #define PR_GET_THP_DISABLE 42 |
| 154 | 181 | ||
| 182 | /* | ||
| 183 | * Tell the kernel to start/stop helping userspace manage bounds tables. | ||
| 184 | */ | ||
| 185 | #define PR_MPX_ENABLE_MANAGEMENT 43 | ||
| 186 | #define PR_MPX_DISABLE_MANAGEMENT 44 | ||
| 187 | |||
| 155 | #endif /* _LINUX_PRCTL_H */ | 188 | #endif /* _LINUX_PRCTL_H */ |
diff --git a/include/uapi/linux/raid/md_u.h b/include/uapi/linux/raid/md_u.h index 4133e744e4e6..74e7c60c4716 100644 --- a/include/uapi/linux/raid/md_u.h +++ b/include/uapi/linux/raid/md_u.h | |||
| @@ -39,7 +39,6 @@ | |||
| 39 | #define RAID_VERSION _IOR (MD_MAJOR, 0x10, mdu_version_t) | 39 | #define RAID_VERSION _IOR (MD_MAJOR, 0x10, mdu_version_t) |
| 40 | #define GET_ARRAY_INFO _IOR (MD_MAJOR, 0x11, mdu_array_info_t) | 40 | #define GET_ARRAY_INFO _IOR (MD_MAJOR, 0x11, mdu_array_info_t) |
| 41 | #define GET_DISK_INFO _IOR (MD_MAJOR, 0x12, mdu_disk_info_t) | 41 | #define GET_DISK_INFO _IOR (MD_MAJOR, 0x12, mdu_disk_info_t) |
| 42 | #define PRINT_RAID_DEBUG _IO (MD_MAJOR, 0x13) | ||
| 43 | #define RAID_AUTORUN _IO (MD_MAJOR, 0x14) | 42 | #define RAID_AUTORUN _IO (MD_MAJOR, 0x14) |
| 44 | #define GET_BITMAP_FILE _IOR (MD_MAJOR, 0x15, mdu_bitmap_file_t) | 43 | #define GET_BITMAP_FILE _IOR (MD_MAJOR, 0x15, mdu_bitmap_file_t) |
| 45 | 44 | ||
diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h index eb0f1a554d7b..9c9b8b4480cd 100644 --- a/include/uapi/linux/rtnetlink.h +++ b/include/uapi/linux/rtnetlink.h | |||
| @@ -235,6 +235,7 @@ enum { | |||
| 235 | #define RTPROT_NTK 15 /* Netsukuku */ | 235 | #define RTPROT_NTK 15 /* Netsukuku */ |
| 236 | #define RTPROT_DHCP 16 /* DHCP client */ | 236 | #define RTPROT_DHCP 16 /* DHCP client */ |
| 237 | #define RTPROT_MROUTED 17 /* Multicast daemon */ | 237 | #define RTPROT_MROUTED 17 /* Multicast daemon */ |
| 238 | #define RTPROT_BABEL 42 /* Babel daemon */ | ||
| 238 | 239 | ||
| 239 | /* rtm_scope | 240 | /* rtm_scope |
| 240 | 241 | ||
diff --git a/include/uapi/linux/sched.h b/include/uapi/linux/sched.h index 34f9d7387d13..cc89ddefa926 100644 --- a/include/uapi/linux/sched.h +++ b/include/uapi/linux/sched.h | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | #define CLONE_VFORK 0x00004000 /* set if the parent wants the child to wake it up on mm_release */ | 13 | #define CLONE_VFORK 0x00004000 /* set if the parent wants the child to wake it up on mm_release */ |
| 14 | #define CLONE_PARENT 0x00008000 /* set if we want to have the same parent as the cloner */ | 14 | #define CLONE_PARENT 0x00008000 /* set if we want to have the same parent as the cloner */ |
| 15 | #define CLONE_THREAD 0x00010000 /* Same thread group? */ | 15 | #define CLONE_THREAD 0x00010000 /* Same thread group? */ |
| 16 | #define CLONE_NEWNS 0x00020000 /* New namespace group? */ | 16 | #define CLONE_NEWNS 0x00020000 /* New mount namespace group */ |
| 17 | #define CLONE_SYSVSEM 0x00040000 /* share system V SEM_UNDO semantics */ | 17 | #define CLONE_SYSVSEM 0x00040000 /* share system V SEM_UNDO semantics */ |
| 18 | #define CLONE_SETTLS 0x00080000 /* create a new TLS for the child */ | 18 | #define CLONE_SETTLS 0x00080000 /* create a new TLS for the child */ |
| 19 | #define CLONE_PARENT_SETTID 0x00100000 /* set the TID in the parent */ | 19 | #define CLONE_PARENT_SETTID 0x00100000 /* set the TID in the parent */ |
| @@ -23,8 +23,8 @@ | |||
| 23 | #define CLONE_CHILD_SETTID 0x01000000 /* set the TID in the child */ | 23 | #define CLONE_CHILD_SETTID 0x01000000 /* set the TID in the child */ |
| 24 | /* 0x02000000 was previously the unused CLONE_STOPPED (Start in stopped state) | 24 | /* 0x02000000 was previously the unused CLONE_STOPPED (Start in stopped state) |
| 25 | and is now available for re-use. */ | 25 | and is now available for re-use. */ |
| 26 | #define CLONE_NEWUTS 0x04000000 /* New utsname group? */ | 26 | #define CLONE_NEWUTS 0x04000000 /* New utsname namespace */ |
| 27 | #define CLONE_NEWIPC 0x08000000 /* New ipcs */ | 27 | #define CLONE_NEWIPC 0x08000000 /* New ipc namespace */ |
| 28 | #define CLONE_NEWUSER 0x10000000 /* New user namespace */ | 28 | #define CLONE_NEWUSER 0x10000000 /* New user namespace */ |
| 29 | #define CLONE_NEWPID 0x20000000 /* New pid namespace */ | 29 | #define CLONE_NEWPID 0x20000000 /* New pid namespace */ |
| 30 | #define CLONE_NEWNET 0x40000000 /* New network namespace */ | 30 | #define CLONE_NEWNET 0x40000000 /* New network namespace */ |
diff --git a/include/uapi/linux/sem.h b/include/uapi/linux/sem.h index 541fce03b50c..dd73b908b2f3 100644 --- a/include/uapi/linux/sem.h +++ b/include/uapi/linux/sem.h | |||
| @@ -63,10 +63,22 @@ struct seminfo { | |||
| 63 | int semaem; | 63 | int semaem; |
| 64 | }; | 64 | }; |
| 65 | 65 | ||
| 66 | #define SEMMNI 128 /* <= IPCMNI max # of semaphore identifiers */ | 66 | /* |
| 67 | #define SEMMSL 250 /* <= 8 000 max num of semaphores per id */ | 67 | * SEMMNI, SEMMSL and SEMMNS are default values which can be |
| 68 | * modified by sysctl. | ||
| 69 | * The values has been chosen to be larger than necessary for any | ||
| 70 | * known configuration. | ||
| 71 | * | ||
| 72 | * SEMOPM should not be increased beyond 1000, otherwise there is the | ||
| 73 | * risk that semop()/semtimedop() fails due to kernel memory fragmentation when | ||
| 74 | * allocating the sop array. | ||
| 75 | */ | ||
| 76 | |||
| 77 | |||
| 78 | #define SEMMNI 32000 /* <= IPCMNI max # of semaphore identifiers */ | ||
| 79 | #define SEMMSL 32000 /* <= INT_MAX max num of semaphores per id */ | ||
| 68 | #define SEMMNS (SEMMNI*SEMMSL) /* <= INT_MAX max # of semaphores in system */ | 80 | #define SEMMNS (SEMMNI*SEMMSL) /* <= INT_MAX max # of semaphores in system */ |
| 69 | #define SEMOPM 32 /* <= 1 000 max num of ops per semop call */ | 81 | #define SEMOPM 500 /* <= 1 000 max num of ops per semop call */ |
| 70 | #define SEMVMX 32767 /* <= 32767 semaphore maximum value */ | 82 | #define SEMVMX 32767 /* <= 32767 semaphore maximum value */ |
| 71 | #define SEMAEM SEMVMX /* adjust on exit max value */ | 83 | #define SEMAEM SEMVMX /* adjust on exit max value */ |
| 72 | 84 | ||
diff --git a/include/uapi/linux/serial_core.h b/include/uapi/linux/serial_core.h index 5820269aa132..c17218094f18 100644 --- a/include/uapi/linux/serial_core.h +++ b/include/uapi/linux/serial_core.h | |||
| @@ -54,7 +54,8 @@ | |||
| 54 | #define PORT_ALTR_16550_F32 26 /* Altera 16550 UART with 32 FIFOs */ | 54 | #define PORT_ALTR_16550_F32 26 /* Altera 16550 UART with 32 FIFOs */ |
| 55 | #define PORT_ALTR_16550_F64 27 /* Altera 16550 UART with 64 FIFOs */ | 55 | #define PORT_ALTR_16550_F64 27 /* Altera 16550 UART with 64 FIFOs */ |
| 56 | #define PORT_ALTR_16550_F128 28 /* Altera 16550 UART with 128 FIFOs */ | 56 | #define PORT_ALTR_16550_F128 28 /* Altera 16550 UART with 128 FIFOs */ |
| 57 | #define PORT_MAX_8250 28 /* max port ID */ | 57 | #define PORT_RT2880 29 /* Ralink RT2880 internal UART */ |
| 58 | #define PORT_MAX_8250 29 /* max port ID */ | ||
| 58 | 59 | ||
| 59 | /* | 60 | /* |
| 60 | * ARM specific type numbers. These are not currently guaranteed | 61 | * ARM specific type numbers. These are not currently guaranteed |
| @@ -244,4 +245,7 @@ | |||
| 244 | /* SC16IS74xx */ | 245 | /* SC16IS74xx */ |
| 245 | #define PORT_SC16IS7XX 108 | 246 | #define PORT_SC16IS7XX 108 |
| 246 | 247 | ||
| 248 | /* MESON */ | ||
| 249 | #define PORT_MESON 109 | ||
| 250 | |||
| 247 | #endif /* _UAPILINUX_SERIAL_CORE_H */ | 251 | #endif /* _UAPILINUX_SERIAL_CORE_H */ |
diff --git a/include/uapi/linux/serial_reg.h b/include/uapi/linux/serial_reg.h index df6c9ab6b0cd..53af3b790129 100644 --- a/include/uapi/linux/serial_reg.h +++ b/include/uapi/linux/serial_reg.h | |||
| @@ -359,6 +359,7 @@ | |||
| 359 | #define UART_OMAP_SYSC 0x15 /* System configuration register */ | 359 | #define UART_OMAP_SYSC 0x15 /* System configuration register */ |
| 360 | #define UART_OMAP_SYSS 0x16 /* System status register */ | 360 | #define UART_OMAP_SYSS 0x16 /* System status register */ |
| 361 | #define UART_OMAP_WER 0x17 /* Wake-up enable register */ | 361 | #define UART_OMAP_WER 0x17 /* Wake-up enable register */ |
| 362 | #define UART_OMAP_TX_LVL 0x1a /* TX FIFO level register */ | ||
| 362 | 363 | ||
| 363 | /* | 364 | /* |
| 364 | * These are the definitions for the MDR1 register | 365 | * These are the definitions for the MDR1 register |
diff --git a/include/uapi/linux/smiapp.h b/include/uapi/linux/smiapp.h new file mode 100644 index 000000000000..53938f4412ee --- /dev/null +++ b/include/uapi/linux/smiapp.h | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | /* | ||
| 2 | * include/uapi/linux/smiapp.h | ||
| 3 | * | ||
| 4 | * Generic driver for SMIA/SMIA++ compliant camera modules | ||
| 5 | * | ||
| 6 | * Copyright (C) 2014 Intel Corporation | ||
| 7 | * Contact: Sakari Ailus <sakari.ailus@iki.fi> | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or | ||
| 10 | * modify it under the terms of the GNU General Public License | ||
| 11 | * version 2 as published by the Free Software Foundation. | ||
| 12 | * | ||
| 13 | * This program is distributed in the hope that it will be useful, but | ||
| 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 16 | * General Public License for more details. | ||
| 17 | * | ||
| 18 | */ | ||
| 19 | |||
| 20 | #ifndef __UAPI_LINUX_SMIAPP_H_ | ||
| 21 | #define __UAPI_LINUX_SMIAPP_H_ | ||
| 22 | |||
| 23 | #define V4L2_SMIAPP_TEST_PATTERN_MODE_DISABLED 0 | ||
| 24 | #define V4L2_SMIAPP_TEST_PATTERN_MODE_SOLID_COLOUR 1 | ||
| 25 | #define V4L2_SMIAPP_TEST_PATTERN_MODE_COLOUR_BARS 2 | ||
| 26 | #define V4L2_SMIAPP_TEST_PATTERN_MODE_COLOUR_BARS_GREY 3 | ||
| 27 | #define V4L2_SMIAPP_TEST_PATTERN_MODE_PN9 4 | ||
| 28 | |||
| 29 | #endif /* __UAPI_LINUX_SMIAPP_H_ */ | ||
diff --git a/include/uapi/linux/snmp.h b/include/uapi/linux/snmp.h index df40137f33dd..b22224100011 100644 --- a/include/uapi/linux/snmp.h +++ b/include/uapi/linux/snmp.h | |||
| @@ -156,6 +156,7 @@ enum | |||
| 156 | UDP_MIB_RCVBUFERRORS, /* RcvbufErrors */ | 156 | UDP_MIB_RCVBUFERRORS, /* RcvbufErrors */ |
| 157 | UDP_MIB_SNDBUFERRORS, /* SndbufErrors */ | 157 | UDP_MIB_SNDBUFERRORS, /* SndbufErrors */ |
| 158 | UDP_MIB_CSUMERRORS, /* InCsumErrors */ | 158 | UDP_MIB_CSUMERRORS, /* InCsumErrors */ |
| 159 | UDP_MIB_IGNOREDMULTI, /* IgnoredMulti */ | ||
| 159 | __UDP_MIB_MAX | 160 | __UDP_MIB_MAX |
| 160 | }; | 161 | }; |
| 161 | 162 | ||
| @@ -265,6 +266,10 @@ enum | |||
| 265 | LINUX_MIB_TCPWANTZEROWINDOWADV, /* TCPWantZeroWindowAdv */ | 266 | LINUX_MIB_TCPWANTZEROWINDOWADV, /* TCPWantZeroWindowAdv */ |
| 266 | LINUX_MIB_TCPSYNRETRANS, /* TCPSynRetrans */ | 267 | LINUX_MIB_TCPSYNRETRANS, /* TCPSynRetrans */ |
| 267 | LINUX_MIB_TCPORIGDATASENT, /* TCPOrigDataSent */ | 268 | LINUX_MIB_TCPORIGDATASENT, /* TCPOrigDataSent */ |
| 269 | LINUX_MIB_TCPHYSTARTTRAINDETECT, /* TCPHystartTrainDetect */ | ||
| 270 | LINUX_MIB_TCPHYSTARTTRAINCWND, /* TCPHystartTrainCwnd */ | ||
| 271 | LINUX_MIB_TCPHYSTARTDELAYDETECT, /* TCPHystartDelayDetect */ | ||
| 272 | LINUX_MIB_TCPHYSTARTDELAYCWND, /* TCPHystartDelayCwnd */ | ||
| 268 | __LINUX_MIB_MAX | 273 | __LINUX_MIB_MAX |
| 269 | }; | 274 | }; |
| 270 | 275 | ||
diff --git a/include/uapi/linux/sysctl.h b/include/uapi/linux/sysctl.h index 43aaba1cc037..0956373b56db 100644 --- a/include/uapi/linux/sysctl.h +++ b/include/uapi/linux/sysctl.h | |||
| @@ -153,6 +153,7 @@ enum | |||
| 153 | KERN_MAX_LOCK_DEPTH=74, /* int: rtmutex's maximum lock depth */ | 153 | KERN_MAX_LOCK_DEPTH=74, /* int: rtmutex's maximum lock depth */ |
| 154 | KERN_NMI_WATCHDOG=75, /* int: enable/disable nmi watchdog */ | 154 | KERN_NMI_WATCHDOG=75, /* int: enable/disable nmi watchdog */ |
| 155 | KERN_PANIC_ON_NMI=76, /* int: whether we will panic on an unrecovered */ | 155 | KERN_PANIC_ON_NMI=76, /* int: whether we will panic on an unrecovered */ |
| 156 | KERN_PANIC_ON_WARN=77, /* int: call panic() in WARN() functions */ | ||
| 156 | }; | 157 | }; |
| 157 | 158 | ||
| 158 | 159 | ||
diff --git a/include/uapi/linux/target_core_user.h b/include/uapi/linux/target_core_user.h new file mode 100644 index 000000000000..b483d1909d3e --- /dev/null +++ b/include/uapi/linux/target_core_user.h | |||
| @@ -0,0 +1,138 @@ | |||
| 1 | #ifndef __TARGET_CORE_USER_H | ||
| 2 | #define __TARGET_CORE_USER_H | ||
| 3 | |||
| 4 | /* This header will be used by application too */ | ||
| 5 | |||
| 6 | #include <linux/types.h> | ||
| 7 | #include <linux/uio.h> | ||
| 8 | |||
| 9 | #define TCMU_VERSION "1.0" | ||
| 10 | |||
| 11 | /* | ||
| 12 | * Ring Design | ||
| 13 | * ----------- | ||
| 14 | * | ||
| 15 | * The mmaped area is divided into three parts: | ||
| 16 | * 1) The mailbox (struct tcmu_mailbox, below) | ||
| 17 | * 2) The command ring | ||
| 18 | * 3) Everything beyond the command ring (data) | ||
| 19 | * | ||
| 20 | * The mailbox tells userspace the offset of the command ring from the | ||
| 21 | * start of the shared memory region, and how big the command ring is. | ||
| 22 | * | ||
| 23 | * The kernel passes SCSI commands to userspace by putting a struct | ||
| 24 | * tcmu_cmd_entry in the ring, updating mailbox->cmd_head, and poking | ||
| 25 | * userspace via uio's interrupt mechanism. | ||
| 26 | * | ||
| 27 | * tcmu_cmd_entry contains a header. If the header type is PAD, | ||
| 28 | * userspace should skip hdr->length bytes (mod cmdr_size) to find the | ||
| 29 | * next cmd_entry. | ||
| 30 | * | ||
| 31 | * Otherwise, the entry will contain offsets into the mmaped area that | ||
| 32 | * contain the cdb and data buffers -- the latter accessible via the | ||
| 33 | * iov array. iov addresses are also offsets into the shared area. | ||
| 34 | * | ||
| 35 | * When userspace is completed handling the command, set | ||
| 36 | * entry->rsp.scsi_status, fill in rsp.sense_buffer if appropriate, | ||
| 37 | * and also set mailbox->cmd_tail equal to the old cmd_tail plus | ||
| 38 | * hdr->length, mod cmdr_size. If cmd_tail doesn't equal cmd_head, it | ||
| 39 | * should process the next packet the same way, and so on. | ||
| 40 | */ | ||
| 41 | |||
| 42 | #define TCMU_MAILBOX_VERSION 1 | ||
| 43 | #define ALIGN_SIZE 64 /* Should be enough for most CPUs */ | ||
| 44 | |||
| 45 | struct tcmu_mailbox { | ||
| 46 | __u16 version; | ||
| 47 | __u16 flags; | ||
| 48 | __u32 cmdr_off; | ||
| 49 | __u32 cmdr_size; | ||
| 50 | |||
| 51 | __u32 cmd_head; | ||
| 52 | |||
| 53 | /* Updated by user. On its own cacheline */ | ||
| 54 | __u32 cmd_tail __attribute__((__aligned__(ALIGN_SIZE))); | ||
| 55 | |||
| 56 | } __packed; | ||
| 57 | |||
| 58 | enum tcmu_opcode { | ||
| 59 | TCMU_OP_PAD = 0, | ||
| 60 | TCMU_OP_CMD, | ||
| 61 | }; | ||
| 62 | |||
| 63 | /* | ||
| 64 | * Only a few opcodes, and length is 8-byte aligned, so use low bits for opcode. | ||
| 65 | */ | ||
| 66 | struct tcmu_cmd_entry_hdr { | ||
| 67 | __u32 len_op; | ||
| 68 | } __packed; | ||
| 69 | |||
| 70 | #define TCMU_OP_MASK 0x7 | ||
| 71 | |||
| 72 | static inline enum tcmu_opcode tcmu_hdr_get_op(struct tcmu_cmd_entry_hdr *hdr) | ||
| 73 | { | ||
| 74 | return hdr->len_op & TCMU_OP_MASK; | ||
| 75 | } | ||
| 76 | |||
| 77 | static inline void tcmu_hdr_set_op(struct tcmu_cmd_entry_hdr *hdr, enum tcmu_opcode op) | ||
| 78 | { | ||
| 79 | hdr->len_op &= ~TCMU_OP_MASK; | ||
| 80 | hdr->len_op |= (op & TCMU_OP_MASK); | ||
| 81 | } | ||
| 82 | |||
| 83 | static inline __u32 tcmu_hdr_get_len(struct tcmu_cmd_entry_hdr *hdr) | ||
| 84 | { | ||
| 85 | return hdr->len_op & ~TCMU_OP_MASK; | ||
| 86 | } | ||
| 87 | |||
| 88 | static inline void tcmu_hdr_set_len(struct tcmu_cmd_entry_hdr *hdr, __u32 len) | ||
| 89 | { | ||
| 90 | hdr->len_op &= TCMU_OP_MASK; | ||
| 91 | hdr->len_op |= len; | ||
| 92 | } | ||
| 93 | |||
| 94 | /* Currently the same as SCSI_SENSE_BUFFERSIZE */ | ||
| 95 | #define TCMU_SENSE_BUFFERSIZE 96 | ||
| 96 | |||
| 97 | struct tcmu_cmd_entry { | ||
| 98 | struct tcmu_cmd_entry_hdr hdr; | ||
| 99 | |||
| 100 | uint16_t cmd_id; | ||
| 101 | uint16_t __pad1; | ||
| 102 | |||
| 103 | union { | ||
| 104 | struct { | ||
| 105 | uint64_t cdb_off; | ||
| 106 | uint64_t iov_cnt; | ||
| 107 | struct iovec iov[0]; | ||
| 108 | } req; | ||
| 109 | struct { | ||
| 110 | uint8_t scsi_status; | ||
| 111 | uint8_t __pad1; | ||
| 112 | uint16_t __pad2; | ||
| 113 | uint32_t __pad3; | ||
| 114 | char sense_buffer[TCMU_SENSE_BUFFERSIZE]; | ||
| 115 | } rsp; | ||
| 116 | }; | ||
| 117 | |||
| 118 | } __packed; | ||
| 119 | |||
| 120 | #define TCMU_OP_ALIGN_SIZE sizeof(uint64_t) | ||
| 121 | |||
| 122 | enum tcmu_genl_cmd { | ||
| 123 | TCMU_CMD_UNSPEC, | ||
| 124 | TCMU_CMD_ADDED_DEVICE, | ||
| 125 | TCMU_CMD_REMOVED_DEVICE, | ||
| 126 | __TCMU_CMD_MAX, | ||
| 127 | }; | ||
| 128 | #define TCMU_CMD_MAX (__TCMU_CMD_MAX - 1) | ||
| 129 | |||
| 130 | enum tcmu_genl_attr { | ||
| 131 | TCMU_ATTR_UNSPEC, | ||
| 132 | TCMU_ATTR_DEVICE, | ||
| 133 | TCMU_ATTR_MINOR, | ||
| 134 | __TCMU_ATTR_MAX, | ||
| 135 | }; | ||
| 136 | #define TCMU_ATTR_MAX (__TCMU_ATTR_MAX - 1) | ||
| 137 | |||
| 138 | #endif | ||
diff --git a/include/uapi/linux/tc_act/Kbuild b/include/uapi/linux/tc_act/Kbuild index 56f121605c99..b057da2b87a4 100644 --- a/include/uapi/linux/tc_act/Kbuild +++ b/include/uapi/linux/tc_act/Kbuild | |||
| @@ -7,3 +7,4 @@ header-y += tc_mirred.h | |||
| 7 | header-y += tc_nat.h | 7 | header-y += tc_nat.h |
| 8 | header-y += tc_pedit.h | 8 | header-y += tc_pedit.h |
| 9 | header-y += tc_skbedit.h | 9 | header-y += tc_skbedit.h |
| 10 | header-y += tc_vlan.h | ||
diff --git a/include/uapi/linux/tc_act/tc_vlan.h b/include/uapi/linux/tc_act/tc_vlan.h new file mode 100644 index 000000000000..f7b8d448b960 --- /dev/null +++ b/include/uapi/linux/tc_act/tc_vlan.h | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2014 Jiri Pirko <jiri@resnulli.us> | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef __LINUX_TC_VLAN_H | ||
| 11 | #define __LINUX_TC_VLAN_H | ||
| 12 | |||
| 13 | #include <linux/pkt_cls.h> | ||
| 14 | |||
| 15 | #define TCA_ACT_VLAN 12 | ||
| 16 | |||
| 17 | #define TCA_VLAN_ACT_POP 1 | ||
| 18 | #define TCA_VLAN_ACT_PUSH 2 | ||
| 19 | |||
| 20 | struct tc_vlan { | ||
| 21 | tc_gen; | ||
| 22 | int v_action; | ||
| 23 | }; | ||
| 24 | |||
| 25 | enum { | ||
| 26 | TCA_VLAN_UNSPEC, | ||
| 27 | TCA_VLAN_TM, | ||
| 28 | TCA_VLAN_PARMS, | ||
| 29 | TCA_VLAN_PUSH_VLAN_ID, | ||
| 30 | TCA_VLAN_PUSH_VLAN_PROTOCOL, | ||
| 31 | __TCA_VLAN_MAX, | ||
| 32 | }; | ||
| 33 | #define TCA_VLAN_MAX (__TCA_VLAN_MAX - 1) | ||
| 34 | |||
| 35 | #endif | ||
diff --git a/include/uapi/linux/thermal.h b/include/uapi/linux/thermal.h new file mode 100644 index 000000000000..ac5535855982 --- /dev/null +++ b/include/uapi/linux/thermal.h | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | #ifndef _UAPI_LINUX_THERMAL_H | ||
| 2 | #define _UAPI_LINUX_THERMAL_H | ||
| 3 | |||
| 4 | #define THERMAL_NAME_LENGTH 20 | ||
| 5 | |||
| 6 | /* Adding event notification support elements */ | ||
| 7 | #define THERMAL_GENL_FAMILY_NAME "thermal_event" | ||
| 8 | #define THERMAL_GENL_VERSION 0x01 | ||
| 9 | #define THERMAL_GENL_MCAST_GROUP_NAME "thermal_mc_grp" | ||
| 10 | |||
| 11 | /* Events supported by Thermal Netlink */ | ||
| 12 | enum events { | ||
| 13 | THERMAL_AUX0, | ||
| 14 | THERMAL_AUX1, | ||
| 15 | THERMAL_CRITICAL, | ||
| 16 | THERMAL_DEV_FAULT, | ||
| 17 | }; | ||
| 18 | |||
| 19 | /* attributes of thermal_genl_family */ | ||
| 20 | enum { | ||
| 21 | THERMAL_GENL_ATTR_UNSPEC, | ||
| 22 | THERMAL_GENL_ATTR_EVENT, | ||
| 23 | __THERMAL_GENL_ATTR_MAX, | ||
| 24 | }; | ||
| 25 | #define THERMAL_GENL_ATTR_MAX (__THERMAL_GENL_ATTR_MAX - 1) | ||
| 26 | |||
| 27 | /* commands supported by the thermal_genl_family */ | ||
| 28 | enum { | ||
| 29 | THERMAL_GENL_CMD_UNSPEC, | ||
| 30 | THERMAL_GENL_CMD_EVENT, | ||
| 31 | __THERMAL_GENL_CMD_MAX, | ||
| 32 | }; | ||
| 33 | #define THERMAL_GENL_CMD_MAX (__THERMAL_GENL_CMD_MAX - 1) | ||
| 34 | |||
| 35 | #endif /* _UAPI_LINUX_THERMAL_H */ | ||
diff --git a/include/uapi/linux/tipc_netlink.h b/include/uapi/linux/tipc_netlink.h new file mode 100644 index 000000000000..8d723824ad69 --- /dev/null +++ b/include/uapi/linux/tipc_netlink.h | |||
| @@ -0,0 +1,244 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2014, Ericsson AB | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * Redistribution and use in source and binary forms, with or without | ||
| 6 | * modification, are permitted provided that the following conditions are met: | ||
| 7 | * | ||
| 8 | * 1. Redistributions of source code must retain the above copyright | ||
| 9 | * notice, this list of conditions and the following disclaimer. | ||
| 10 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 11 | * notice, this list of conditions and the following disclaimer in the | ||
| 12 | * documentation and/or other materials provided with the distribution. | ||
| 13 | * 3. Neither the names of the copyright holders nor the names of its | ||
| 14 | * contributors may be used to endorse or promote products derived from | ||
| 15 | * this software without specific prior written permission. | ||
| 16 | * | ||
| 17 | * Alternatively, this software may be distributed under the terms of the | ||
| 18 | * GNU General Public License ("GPL") version 2 as published by the Free | ||
| 19 | * Software Foundation. | ||
| 20 | * | ||
| 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
| 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||
| 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
| 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
| 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
| 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
| 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
| 31 | * POSSIBILITY OF SUCH DAMAGE. | ||
| 32 | */ | ||
| 33 | |||
| 34 | #ifndef _LINUX_TIPC_NETLINK_H_ | ||
| 35 | #define _LINUX_TIPC_NETLINK_H_ | ||
| 36 | |||
| 37 | #define TIPC_GENL_V2_NAME "TIPCv2" | ||
| 38 | #define TIPC_GENL_V2_VERSION 0x1 | ||
| 39 | |||
| 40 | /* Netlink commands */ | ||
| 41 | enum { | ||
| 42 | TIPC_NL_UNSPEC, | ||
| 43 | TIPC_NL_LEGACY, | ||
| 44 | TIPC_NL_BEARER_DISABLE, | ||
| 45 | TIPC_NL_BEARER_ENABLE, | ||
| 46 | TIPC_NL_BEARER_GET, | ||
| 47 | TIPC_NL_BEARER_SET, | ||
| 48 | TIPC_NL_SOCK_GET, | ||
| 49 | TIPC_NL_PUBL_GET, | ||
| 50 | TIPC_NL_LINK_GET, | ||
| 51 | TIPC_NL_LINK_SET, | ||
| 52 | TIPC_NL_LINK_RESET_STATS, | ||
| 53 | TIPC_NL_MEDIA_GET, | ||
| 54 | TIPC_NL_MEDIA_SET, | ||
| 55 | TIPC_NL_NODE_GET, | ||
| 56 | TIPC_NL_NET_GET, | ||
| 57 | TIPC_NL_NET_SET, | ||
| 58 | TIPC_NL_NAME_TABLE_GET, | ||
| 59 | |||
| 60 | __TIPC_NL_CMD_MAX, | ||
| 61 | TIPC_NL_CMD_MAX = __TIPC_NL_CMD_MAX - 1 | ||
| 62 | }; | ||
| 63 | |||
| 64 | /* Top level netlink attributes */ | ||
| 65 | enum { | ||
| 66 | TIPC_NLA_UNSPEC, | ||
| 67 | TIPC_NLA_BEARER, /* nest */ | ||
| 68 | TIPC_NLA_SOCK, /* nest */ | ||
| 69 | TIPC_NLA_PUBL, /* nest */ | ||
| 70 | TIPC_NLA_LINK, /* nest */ | ||
| 71 | TIPC_NLA_MEDIA, /* nest */ | ||
| 72 | TIPC_NLA_NODE, /* nest */ | ||
| 73 | TIPC_NLA_NET, /* nest */ | ||
| 74 | TIPC_NLA_NAME_TABLE, /* nest */ | ||
| 75 | |||
| 76 | __TIPC_NLA_MAX, | ||
| 77 | TIPC_NLA_MAX = __TIPC_NLA_MAX - 1 | ||
| 78 | }; | ||
| 79 | |||
| 80 | /* Bearer info */ | ||
| 81 | enum { | ||
| 82 | TIPC_NLA_BEARER_UNSPEC, | ||
| 83 | TIPC_NLA_BEARER_NAME, /* string */ | ||
| 84 | TIPC_NLA_BEARER_PROP, /* nest */ | ||
| 85 | TIPC_NLA_BEARER_DOMAIN, /* u32 */ | ||
| 86 | |||
| 87 | __TIPC_NLA_BEARER_MAX, | ||
| 88 | TIPC_NLA_BEARER_MAX = __TIPC_NLA_BEARER_MAX - 1 | ||
| 89 | }; | ||
| 90 | |||
| 91 | /* Socket info */ | ||
| 92 | enum { | ||
| 93 | TIPC_NLA_SOCK_UNSPEC, | ||
| 94 | TIPC_NLA_SOCK_ADDR, /* u32 */ | ||
| 95 | TIPC_NLA_SOCK_REF, /* u32 */ | ||
| 96 | TIPC_NLA_SOCK_CON, /* nest */ | ||
| 97 | TIPC_NLA_SOCK_HAS_PUBL, /* flag */ | ||
| 98 | |||
| 99 | __TIPC_NLA_SOCK_MAX, | ||
| 100 | TIPC_NLA_SOCK_MAX = __TIPC_NLA_SOCK_MAX - 1 | ||
| 101 | }; | ||
| 102 | |||
| 103 | /* Link info */ | ||
| 104 | enum { | ||
| 105 | TIPC_NLA_LINK_UNSPEC, | ||
| 106 | TIPC_NLA_LINK_NAME, /* string */ | ||
| 107 | TIPC_NLA_LINK_DEST, /* u32 */ | ||
| 108 | TIPC_NLA_LINK_MTU, /* u32 */ | ||
| 109 | TIPC_NLA_LINK_BROADCAST, /* flag */ | ||
| 110 | TIPC_NLA_LINK_UP, /* flag */ | ||
| 111 | TIPC_NLA_LINK_ACTIVE, /* flag */ | ||
| 112 | TIPC_NLA_LINK_PROP, /* nest */ | ||
| 113 | TIPC_NLA_LINK_STATS, /* nest */ | ||
| 114 | TIPC_NLA_LINK_RX, /* u32 */ | ||
| 115 | TIPC_NLA_LINK_TX, /* u32 */ | ||
| 116 | |||
| 117 | __TIPC_NLA_LINK_MAX, | ||
| 118 | TIPC_NLA_LINK_MAX = __TIPC_NLA_LINK_MAX - 1 | ||
| 119 | }; | ||
| 120 | |||
| 121 | /* Media info */ | ||
| 122 | enum { | ||
| 123 | TIPC_NLA_MEDIA_UNSPEC, | ||
| 124 | TIPC_NLA_MEDIA_NAME, /* string */ | ||
| 125 | TIPC_NLA_MEDIA_PROP, /* nest */ | ||
| 126 | |||
| 127 | __TIPC_NLA_MEDIA_MAX, | ||
| 128 | TIPC_NLA_MEDIA_MAX = __TIPC_NLA_MEDIA_MAX - 1 | ||
| 129 | }; | ||
| 130 | |||
| 131 | /* Node info */ | ||
| 132 | enum { | ||
| 133 | TIPC_NLA_NODE_UNSPEC, | ||
| 134 | TIPC_NLA_NODE_ADDR, /* u32 */ | ||
| 135 | TIPC_NLA_NODE_UP, /* flag */ | ||
| 136 | |||
| 137 | __TIPC_NLA_NODE_MAX, | ||
| 138 | TIPC_NLA_NODE_MAX = __TIPC_NLA_NODE_MAX - 1 | ||
| 139 | }; | ||
| 140 | |||
| 141 | /* Net info */ | ||
| 142 | enum { | ||
| 143 | TIPC_NLA_NET_UNSPEC, | ||
| 144 | TIPC_NLA_NET_ID, /* u32 */ | ||
| 145 | TIPC_NLA_NET_ADDR, /* u32 */ | ||
| 146 | |||
| 147 | __TIPC_NLA_NET_MAX, | ||
| 148 | TIPC_NLA_NET_MAX = __TIPC_NLA_NET_MAX - 1 | ||
| 149 | }; | ||
| 150 | |||
| 151 | /* Name table info */ | ||
| 152 | enum { | ||
| 153 | TIPC_NLA_NAME_TABLE_UNSPEC, | ||
| 154 | TIPC_NLA_NAME_TABLE_PUBL, /* nest */ | ||
| 155 | |||
| 156 | __TIPC_NLA_NAME_TABLE_MAX, | ||
| 157 | TIPC_NLA_NAME_TABLE_MAX = __TIPC_NLA_NAME_TABLE_MAX - 1 | ||
| 158 | }; | ||
| 159 | |||
| 160 | /* Publication info */ | ||
| 161 | enum { | ||
| 162 | TIPC_NLA_PUBL_UNSPEC, | ||
| 163 | |||
| 164 | TIPC_NLA_PUBL_TYPE, /* u32 */ | ||
| 165 | TIPC_NLA_PUBL_LOWER, /* u32 */ | ||
| 166 | TIPC_NLA_PUBL_UPPER, /* u32 */ | ||
| 167 | TIPC_NLA_PUBL_SCOPE, /* u32 */ | ||
| 168 | TIPC_NLA_PUBL_NODE, /* u32 */ | ||
| 169 | TIPC_NLA_PUBL_REF, /* u32 */ | ||
| 170 | TIPC_NLA_PUBL_KEY, /* u32 */ | ||
| 171 | |||
| 172 | __TIPC_NLA_PUBL_MAX, | ||
| 173 | TIPC_NLA_PUBL_MAX = __TIPC_NLA_PUBL_MAX - 1 | ||
| 174 | }; | ||
| 175 | |||
| 176 | /* Nest, connection info */ | ||
| 177 | enum { | ||
| 178 | TIPC_NLA_CON_UNSPEC, | ||
| 179 | |||
| 180 | TIPC_NLA_CON_FLAG, /* flag */ | ||
| 181 | TIPC_NLA_CON_NODE, /* u32 */ | ||
| 182 | TIPC_NLA_CON_SOCK, /* u32 */ | ||
| 183 | TIPC_NLA_CON_TYPE, /* u32 */ | ||
| 184 | TIPC_NLA_CON_INST, /* u32 */ | ||
| 185 | |||
| 186 | __TIPC_NLA_CON_MAX, | ||
| 187 | TIPC_NLA_CON_MAX = __TIPC_NLA_CON_MAX - 1 | ||
| 188 | }; | ||
| 189 | |||
| 190 | /* Nest, link propreties. Valid for link, media and bearer */ | ||
| 191 | enum { | ||
| 192 | TIPC_NLA_PROP_UNSPEC, | ||
| 193 | |||
| 194 | TIPC_NLA_PROP_PRIO, /* u32 */ | ||
| 195 | TIPC_NLA_PROP_TOL, /* u32 */ | ||
| 196 | TIPC_NLA_PROP_WIN, /* u32 */ | ||
| 197 | |||
| 198 | __TIPC_NLA_PROP_MAX, | ||
| 199 | TIPC_NLA_PROP_MAX = __TIPC_NLA_PROP_MAX - 1 | ||
| 200 | }; | ||
| 201 | |||
| 202 | /* Nest, statistics info */ | ||
| 203 | enum { | ||
| 204 | TIPC_NLA_STATS_UNSPEC, | ||
| 205 | |||
| 206 | TIPC_NLA_STATS_RX_INFO, /* u32 */ | ||
| 207 | TIPC_NLA_STATS_RX_FRAGMENTS, /* u32 */ | ||
| 208 | TIPC_NLA_STATS_RX_FRAGMENTED, /* u32 */ | ||
| 209 | TIPC_NLA_STATS_RX_BUNDLES, /* u32 */ | ||
| 210 | TIPC_NLA_STATS_RX_BUNDLED, /* u32 */ | ||
| 211 | TIPC_NLA_STATS_TX_INFO, /* u32 */ | ||
| 212 | TIPC_NLA_STATS_TX_FRAGMENTS, /* u32 */ | ||
| 213 | TIPC_NLA_STATS_TX_FRAGMENTED, /* u32 */ | ||
| 214 | TIPC_NLA_STATS_TX_BUNDLES, /* u32 */ | ||
| 215 | TIPC_NLA_STATS_TX_BUNDLED, /* u32 */ | ||
| 216 | TIPC_NLA_STATS_MSG_PROF_TOT, /* u32 */ | ||
| 217 | TIPC_NLA_STATS_MSG_LEN_CNT, /* u32 */ | ||
| 218 | TIPC_NLA_STATS_MSG_LEN_TOT, /* u32 */ | ||
| 219 | TIPC_NLA_STATS_MSG_LEN_P0, /* u32 */ | ||
| 220 | TIPC_NLA_STATS_MSG_LEN_P1, /* u32 */ | ||
| 221 | TIPC_NLA_STATS_MSG_LEN_P2, /* u32 */ | ||
| 222 | TIPC_NLA_STATS_MSG_LEN_P3, /* u32 */ | ||
| 223 | TIPC_NLA_STATS_MSG_LEN_P4, /* u32 */ | ||
| 224 | TIPC_NLA_STATS_MSG_LEN_P5, /* u32 */ | ||
| 225 | TIPC_NLA_STATS_MSG_LEN_P6, /* u32 */ | ||
| 226 | TIPC_NLA_STATS_RX_STATES, /* u32 */ | ||
| 227 | TIPC_NLA_STATS_RX_PROBES, /* u32 */ | ||
| 228 | TIPC_NLA_STATS_RX_NACKS, /* u32 */ | ||
| 229 | TIPC_NLA_STATS_RX_DEFERRED, /* u32 */ | ||
| 230 | TIPC_NLA_STATS_TX_STATES, /* u32 */ | ||
| 231 | TIPC_NLA_STATS_TX_PROBES, /* u32 */ | ||
| 232 | TIPC_NLA_STATS_TX_NACKS, /* u32 */ | ||
| 233 | TIPC_NLA_STATS_TX_ACKS, /* u32 */ | ||
| 234 | TIPC_NLA_STATS_RETRANSMITTED, /* u32 */ | ||
| 235 | TIPC_NLA_STATS_DUPLICATES, /* u32 */ | ||
| 236 | TIPC_NLA_STATS_LINK_CONGS, /* u32 */ | ||
| 237 | TIPC_NLA_STATS_MAX_QUEUE, /* u32 */ | ||
| 238 | TIPC_NLA_STATS_AVG_QUEUE, /* u32 */ | ||
| 239 | |||
| 240 | __TIPC_NLA_STATS_MAX, | ||
| 241 | TIPC_NLA_STATS_MAX = __TIPC_NLA_STATS_MAX - 1 | ||
| 242 | }; | ||
| 243 | |||
| 244 | #endif | ||
diff --git a/include/uapi/linux/tty_flags.h b/include/uapi/linux/tty_flags.h index eefcb483a2c0..fae4864737fa 100644 --- a/include/uapi/linux/tty_flags.h +++ b/include/uapi/linux/tty_flags.h | |||
| @@ -6,27 +6,31 @@ | |||
| 6 | * shared by the tty_port flags structures. | 6 | * shared by the tty_port flags structures. |
| 7 | * | 7 | * |
| 8 | * Define ASYNCB_* for convenient use with {test,set,clear}_bit. | 8 | * Define ASYNCB_* for convenient use with {test,set,clear}_bit. |
| 9 | * | ||
| 10 | * Bits [0..ASYNCB_LAST_USER] are userspace defined/visible/changeable | ||
| 11 | * [x] in the bit comments indicates the flag is defunct and no longer used. | ||
| 9 | */ | 12 | */ |
| 10 | #define ASYNCB_HUP_NOTIFY 0 /* Notify getty on hangups and closes | 13 | #define ASYNCB_HUP_NOTIFY 0 /* Notify getty on hangups and closes |
| 11 | * on the callout port */ | 14 | * on the callout port */ |
| 12 | #define ASYNCB_FOURPORT 1 /* Set OU1, OUT2 per AST Fourport settings */ | 15 | #define ASYNCB_FOURPORT 1 /* Set OU1, OUT2 per AST Fourport settings */ |
| 13 | #define ASYNCB_SAK 2 /* Secure Attention Key (Orange book) */ | 16 | #define ASYNCB_SAK 2 /* Secure Attention Key (Orange book) */ |
| 14 | #define ASYNCB_SPLIT_TERMIOS 3 /* Separate termios for dialin/callout */ | 17 | #define ASYNCB_SPLIT_TERMIOS 3 /* [x] Separate termios for dialin/callout */ |
| 15 | #define ASYNCB_SPD_HI 4 /* Use 56000 instead of 38400 bps */ | 18 | #define ASYNCB_SPD_HI 4 /* Use 56000 instead of 38400 bps */ |
| 16 | #define ASYNCB_SPD_VHI 5 /* Use 115200 instead of 38400 bps */ | 19 | #define ASYNCB_SPD_VHI 5 /* Use 115200 instead of 38400 bps */ |
| 17 | #define ASYNCB_SKIP_TEST 6 /* Skip UART test during autoconfiguration */ | 20 | #define ASYNCB_SKIP_TEST 6 /* Skip UART test during autoconfiguration */ |
| 18 | #define ASYNCB_AUTO_IRQ 7 /* Do automatic IRQ during | 21 | #define ASYNCB_AUTO_IRQ 7 /* Do automatic IRQ during |
| 19 | * autoconfiguration */ | 22 | * autoconfiguration */ |
| 20 | #define ASYNCB_SESSION_LOCKOUT 8 /* Lock out cua opens based on session */ | 23 | #define ASYNCB_SESSION_LOCKOUT 8 /* [x] Lock out cua opens based on session */ |
| 21 | #define ASYNCB_PGRP_LOCKOUT 9 /* Lock out cua opens based on pgrp */ | 24 | #define ASYNCB_PGRP_LOCKOUT 9 /* [x] Lock out cua opens based on pgrp */ |
| 22 | #define ASYNCB_CALLOUT_NOHUP 10 /* Don't do hangups for cua device */ | 25 | #define ASYNCB_CALLOUT_NOHUP 10 /* [x] Don't do hangups for cua device */ |
| 23 | #define ASYNCB_HARDPPS_CD 11 /* Call hardpps when CD goes high */ | 26 | #define ASYNCB_HARDPPS_CD 11 /* Call hardpps when CD goes high */ |
| 24 | #define ASYNCB_SPD_SHI 12 /* Use 230400 instead of 38400 bps */ | 27 | #define ASYNCB_SPD_SHI 12 /* Use 230400 instead of 38400 bps */ |
| 25 | #define ASYNCB_LOW_LATENCY 13 /* Request low latency behaviour */ | 28 | #define ASYNCB_LOW_LATENCY 13 /* Request low latency behaviour */ |
| 26 | #define ASYNCB_BUGGY_UART 14 /* This is a buggy UART, skip some safety | 29 | #define ASYNCB_BUGGY_UART 14 /* This is a buggy UART, skip some safety |
| 27 | * checks. Note: can be dangerous! */ | 30 | * checks. Note: can be dangerous! */ |
| 28 | #define ASYNCB_AUTOPROBE 15 /* Port was autoprobed by PCI or PNP code */ | 31 | #define ASYNCB_AUTOPROBE 15 /* [x] Port was autoprobed by PCI/PNP code */ |
| 29 | #define ASYNCB_LAST_USER 15 | 32 | #define ASYNCB_MAGIC_MULTIPLIER 16 /* Use special CLK or divisor */ |
| 33 | #define ASYNCB_LAST_USER 16 | ||
| 30 | 34 | ||
| 31 | /* Internal flags used only by kernel */ | 35 | /* Internal flags used only by kernel */ |
| 32 | #define ASYNCB_INITIALIZED 31 /* Serial port was initialized */ | 36 | #define ASYNCB_INITIALIZED 31 /* Serial port was initialized */ |
| @@ -57,8 +61,11 @@ | |||
| 57 | #define ASYNC_LOW_LATENCY (1U << ASYNCB_LOW_LATENCY) | 61 | #define ASYNC_LOW_LATENCY (1U << ASYNCB_LOW_LATENCY) |
| 58 | #define ASYNC_BUGGY_UART (1U << ASYNCB_BUGGY_UART) | 62 | #define ASYNC_BUGGY_UART (1U << ASYNCB_BUGGY_UART) |
| 59 | #define ASYNC_AUTOPROBE (1U << ASYNCB_AUTOPROBE) | 63 | #define ASYNC_AUTOPROBE (1U << ASYNCB_AUTOPROBE) |
| 64 | #define ASYNC_MAGIC_MULTIPLIER (1U << ASYNCB_MAGIC_MULTIPLIER) | ||
| 60 | 65 | ||
| 61 | #define ASYNC_FLAGS ((1U << (ASYNCB_LAST_USER + 1)) - 1) | 66 | #define ASYNC_FLAGS ((1U << (ASYNCB_LAST_USER + 1)) - 1) |
| 67 | #define ASYNC_DEPRECATED (ASYNC_SESSION_LOCKOUT | ASYNC_PGRP_LOCKOUT | \ | ||
| 68 | ASYNC_CALLOUT_NOHUP | ASYNC_AUTOPROBE) | ||
| 62 | #define ASYNC_USR_MASK (ASYNC_SPD_MASK|ASYNC_CALLOUT_NOHUP| \ | 69 | #define ASYNC_USR_MASK (ASYNC_SPD_MASK|ASYNC_CALLOUT_NOHUP| \ |
| 63 | ASYNC_LOW_LATENCY) | 70 | ASYNC_LOW_LATENCY) |
| 64 | #define ASYNC_SPD_CUST (ASYNC_SPD_HI|ASYNC_SPD_VHI) | 71 | #define ASYNC_SPD_CUST (ASYNC_SPD_HI|ASYNC_SPD_VHI) |
diff --git a/include/uapi/linux/uhid.h b/include/uapi/linux/uhid.h index 1e3b09c191cd..aaa86d6bd1dd 100644 --- a/include/uapi/linux/uhid.h +++ b/include/uapi/linux/uhid.h | |||
| @@ -24,35 +24,23 @@ | |||
| 24 | #include <linux/hid.h> | 24 | #include <linux/hid.h> |
| 25 | 25 | ||
| 26 | enum uhid_event_type { | 26 | enum uhid_event_type { |
| 27 | UHID_CREATE, | 27 | __UHID_LEGACY_CREATE, |
| 28 | UHID_DESTROY, | 28 | UHID_DESTROY, |
| 29 | UHID_START, | 29 | UHID_START, |
| 30 | UHID_STOP, | 30 | UHID_STOP, |
| 31 | UHID_OPEN, | 31 | UHID_OPEN, |
| 32 | UHID_CLOSE, | 32 | UHID_CLOSE, |
| 33 | UHID_OUTPUT, | 33 | UHID_OUTPUT, |
| 34 | UHID_OUTPUT_EV, /* obsolete! */ | 34 | __UHID_LEGACY_OUTPUT_EV, |
| 35 | UHID_INPUT, | 35 | __UHID_LEGACY_INPUT, |
| 36 | UHID_FEATURE, | 36 | UHID_GET_REPORT, |
| 37 | UHID_FEATURE_ANSWER, | 37 | UHID_GET_REPORT_REPLY, |
| 38 | UHID_CREATE2, | 38 | UHID_CREATE2, |
| 39 | UHID_INPUT2, | 39 | UHID_INPUT2, |
| 40 | UHID_SET_REPORT, | ||
| 41 | UHID_SET_REPORT_REPLY, | ||
| 40 | }; | 42 | }; |
| 41 | 43 | ||
| 42 | struct uhid_create_req { | ||
| 43 | __u8 name[128]; | ||
| 44 | __u8 phys[64]; | ||
| 45 | __u8 uniq[64]; | ||
| 46 | __u8 __user *rd_data; | ||
| 47 | __u16 rd_size; | ||
| 48 | |||
| 49 | __u16 bus; | ||
| 50 | __u32 vendor; | ||
| 51 | __u32 product; | ||
| 52 | __u32 version; | ||
| 53 | __u32 country; | ||
| 54 | } __attribute__((__packed__)); | ||
| 55 | |||
| 56 | struct uhid_create2_req { | 44 | struct uhid_create2_req { |
| 57 | __u8 name[128]; | 45 | __u8 name[128]; |
| 58 | __u8 phys[64]; | 46 | __u8 phys[64]; |
| @@ -66,6 +54,16 @@ struct uhid_create2_req { | |||
| 66 | __u8 rd_data[HID_MAX_DESCRIPTOR_SIZE]; | 54 | __u8 rd_data[HID_MAX_DESCRIPTOR_SIZE]; |
| 67 | } __attribute__((__packed__)); | 55 | } __attribute__((__packed__)); |
| 68 | 56 | ||
| 57 | enum uhid_dev_flag { | ||
| 58 | UHID_DEV_NUMBERED_FEATURE_REPORTS = (1ULL << 0), | ||
| 59 | UHID_DEV_NUMBERED_OUTPUT_REPORTS = (1ULL << 1), | ||
| 60 | UHID_DEV_NUMBERED_INPUT_REPORTS = (1ULL << 2), | ||
| 61 | }; | ||
| 62 | |||
| 63 | struct uhid_start_req { | ||
| 64 | __u64 dev_flags; | ||
| 65 | }; | ||
| 66 | |||
| 69 | #define UHID_DATA_MAX 4096 | 67 | #define UHID_DATA_MAX 4096 |
| 70 | 68 | ||
| 71 | enum uhid_report_type { | 69 | enum uhid_report_type { |
| @@ -74,36 +72,94 @@ enum uhid_report_type { | |||
| 74 | UHID_INPUT_REPORT, | 72 | UHID_INPUT_REPORT, |
| 75 | }; | 73 | }; |
| 76 | 74 | ||
| 77 | struct uhid_input_req { | 75 | struct uhid_input2_req { |
| 76 | __u16 size; | ||
| 77 | __u8 data[UHID_DATA_MAX]; | ||
| 78 | } __attribute__((__packed__)); | ||
| 79 | |||
| 80 | struct uhid_output_req { | ||
| 78 | __u8 data[UHID_DATA_MAX]; | 81 | __u8 data[UHID_DATA_MAX]; |
| 79 | __u16 size; | 82 | __u16 size; |
| 83 | __u8 rtype; | ||
| 80 | } __attribute__((__packed__)); | 84 | } __attribute__((__packed__)); |
| 81 | 85 | ||
| 82 | struct uhid_input2_req { | 86 | struct uhid_get_report_req { |
| 87 | __u32 id; | ||
| 88 | __u8 rnum; | ||
| 89 | __u8 rtype; | ||
| 90 | } __attribute__((__packed__)); | ||
| 91 | |||
| 92 | struct uhid_get_report_reply_req { | ||
| 93 | __u32 id; | ||
| 94 | __u16 err; | ||
| 83 | __u16 size; | 95 | __u16 size; |
| 84 | __u8 data[UHID_DATA_MAX]; | 96 | __u8 data[UHID_DATA_MAX]; |
| 85 | } __attribute__((__packed__)); | 97 | } __attribute__((__packed__)); |
| 86 | 98 | ||
| 87 | struct uhid_output_req { | 99 | struct uhid_set_report_req { |
| 100 | __u32 id; | ||
| 101 | __u8 rnum; | ||
| 102 | __u8 rtype; | ||
| 103 | __u16 size; | ||
| 104 | __u8 data[UHID_DATA_MAX]; | ||
| 105 | } __attribute__((__packed__)); | ||
| 106 | |||
| 107 | struct uhid_set_report_reply_req { | ||
| 108 | __u32 id; | ||
| 109 | __u16 err; | ||
| 110 | } __attribute__((__packed__)); | ||
| 111 | |||
| 112 | /* | ||
| 113 | * Compat Layer | ||
| 114 | * All these commands and requests are obsolete. You should avoid using them in | ||
| 115 | * new code. We support them for backwards-compatibility, but you might not get | ||
| 116 | * access to new feature in case you use them. | ||
| 117 | */ | ||
| 118 | |||
| 119 | enum uhid_legacy_event_type { | ||
| 120 | UHID_CREATE = __UHID_LEGACY_CREATE, | ||
| 121 | UHID_OUTPUT_EV = __UHID_LEGACY_OUTPUT_EV, | ||
| 122 | UHID_INPUT = __UHID_LEGACY_INPUT, | ||
| 123 | UHID_FEATURE = UHID_GET_REPORT, | ||
| 124 | UHID_FEATURE_ANSWER = UHID_GET_REPORT_REPLY, | ||
| 125 | }; | ||
| 126 | |||
| 127 | /* Obsolete! Use UHID_CREATE2. */ | ||
| 128 | struct uhid_create_req { | ||
| 129 | __u8 name[128]; | ||
| 130 | __u8 phys[64]; | ||
| 131 | __u8 uniq[64]; | ||
| 132 | __u8 __user *rd_data; | ||
| 133 | __u16 rd_size; | ||
| 134 | |||
| 135 | __u16 bus; | ||
| 136 | __u32 vendor; | ||
| 137 | __u32 product; | ||
| 138 | __u32 version; | ||
| 139 | __u32 country; | ||
| 140 | } __attribute__((__packed__)); | ||
| 141 | |||
| 142 | /* Obsolete! Use UHID_INPUT2. */ | ||
| 143 | struct uhid_input_req { | ||
| 88 | __u8 data[UHID_DATA_MAX]; | 144 | __u8 data[UHID_DATA_MAX]; |
| 89 | __u16 size; | 145 | __u16 size; |
| 90 | __u8 rtype; | ||
| 91 | } __attribute__((__packed__)); | 146 | } __attribute__((__packed__)); |
| 92 | 147 | ||
| 93 | /* Obsolete! Newer kernels will no longer send these events but instead convert | 148 | /* Obsolete! Kernel uses UHID_OUTPUT exclusively now. */ |
| 94 | * it into raw output reports via UHID_OUTPUT. */ | ||
| 95 | struct uhid_output_ev_req { | 149 | struct uhid_output_ev_req { |
| 96 | __u16 type; | 150 | __u16 type; |
| 97 | __u16 code; | 151 | __u16 code; |
| 98 | __s32 value; | 152 | __s32 value; |
| 99 | } __attribute__((__packed__)); | 153 | } __attribute__((__packed__)); |
| 100 | 154 | ||
| 155 | /* Obsolete! Kernel uses ABI compatible UHID_GET_REPORT. */ | ||
| 101 | struct uhid_feature_req { | 156 | struct uhid_feature_req { |
| 102 | __u32 id; | 157 | __u32 id; |
| 103 | __u8 rnum; | 158 | __u8 rnum; |
| 104 | __u8 rtype; | 159 | __u8 rtype; |
| 105 | } __attribute__((__packed__)); | 160 | } __attribute__((__packed__)); |
| 106 | 161 | ||
| 162 | /* Obsolete! Use ABI compatible UHID_GET_REPORT_REPLY. */ | ||
| 107 | struct uhid_feature_answer_req { | 163 | struct uhid_feature_answer_req { |
| 108 | __u32 id; | 164 | __u32 id; |
| 109 | __u16 err; | 165 | __u16 err; |
| @@ -111,6 +167,15 @@ struct uhid_feature_answer_req { | |||
| 111 | __u8 data[UHID_DATA_MAX]; | 167 | __u8 data[UHID_DATA_MAX]; |
| 112 | } __attribute__((__packed__)); | 168 | } __attribute__((__packed__)); |
| 113 | 169 | ||
| 170 | /* | ||
| 171 | * UHID Events | ||
| 172 | * All UHID events from and to the kernel are encoded as "struct uhid_event". | ||
| 173 | * The "type" field contains a UHID_* type identifier. All payload depends on | ||
| 174 | * that type and can be accessed via ev->u.XYZ accordingly. | ||
| 175 | * If user-space writes short events, they're extended with 0s by the kernel. If | ||
| 176 | * the kernel writes short events, user-space shall extend them with 0s. | ||
| 177 | */ | ||
| 178 | |||
| 114 | struct uhid_event { | 179 | struct uhid_event { |
| 115 | __u32 type; | 180 | __u32 type; |
| 116 | 181 | ||
| @@ -120,9 +185,14 @@ struct uhid_event { | |||
| 120 | struct uhid_output_req output; | 185 | struct uhid_output_req output; |
| 121 | struct uhid_output_ev_req output_ev; | 186 | struct uhid_output_ev_req output_ev; |
| 122 | struct uhid_feature_req feature; | 187 | struct uhid_feature_req feature; |
| 188 | struct uhid_get_report_req get_report; | ||
| 123 | struct uhid_feature_answer_req feature_answer; | 189 | struct uhid_feature_answer_req feature_answer; |
| 190 | struct uhid_get_report_reply_req get_report_reply; | ||
| 124 | struct uhid_create2_req create2; | 191 | struct uhid_create2_req create2; |
| 125 | struct uhid_input2_req input2; | 192 | struct uhid_input2_req input2; |
| 193 | struct uhid_set_report_req set_report; | ||
| 194 | struct uhid_set_report_reply_req set_report_reply; | ||
| 195 | struct uhid_start_req start; | ||
| 126 | } u; | 196 | } u; |
| 127 | } __attribute__((__packed__)); | 197 | } __attribute__((__packed__)); |
| 128 | 198 | ||
diff --git a/include/uapi/linux/usb/functionfs.h b/include/uapi/linux/usb/functionfs.h index 0154b2859fd7..295ba299e7bd 100644 --- a/include/uapi/linux/usb/functionfs.h +++ b/include/uapi/linux/usb/functionfs.h | |||
| @@ -19,6 +19,7 @@ enum functionfs_flags { | |||
| 19 | FUNCTIONFS_HAS_HS_DESC = 2, | 19 | FUNCTIONFS_HAS_HS_DESC = 2, |
| 20 | FUNCTIONFS_HAS_SS_DESC = 4, | 20 | FUNCTIONFS_HAS_SS_DESC = 4, |
| 21 | FUNCTIONFS_HAS_MS_OS_DESC = 8, | 21 | FUNCTIONFS_HAS_MS_OS_DESC = 8, |
| 22 | FUNCTIONFS_VIRTUAL_ADDR = 16, | ||
| 22 | }; | 23 | }; |
| 23 | 24 | ||
| 24 | /* Descriptor of an non-audio endpoint */ | 25 | /* Descriptor of an non-audio endpoint */ |
| @@ -32,6 +33,16 @@ struct usb_endpoint_descriptor_no_audio { | |||
| 32 | __u8 bInterval; | 33 | __u8 bInterval; |
| 33 | } __attribute__((packed)); | 34 | } __attribute__((packed)); |
| 34 | 35 | ||
| 36 | struct usb_functionfs_descs_head_v2 { | ||
| 37 | __le32 magic; | ||
| 38 | __le32 length; | ||
| 39 | __le32 flags; | ||
| 40 | /* | ||
| 41 | * __le32 fs_count, hs_count, fs_count; must be included manually in | ||
| 42 | * the structure taking flags into consideration. | ||
| 43 | */ | ||
| 44 | } __attribute__((packed)); | ||
| 45 | |||
| 35 | /* Legacy format, deprecated as of 3.14. */ | 46 | /* Legacy format, deprecated as of 3.14. */ |
| 36 | struct usb_functionfs_descs_head { | 47 | struct usb_functionfs_descs_head { |
| 37 | __le32 magic; | 48 | __le32 magic; |
| @@ -92,7 +103,7 @@ struct usb_ext_prop_desc { | |||
| 92 | * structure. Any flags that are not recognised cause the whole block to be | 103 | * structure. Any flags that are not recognised cause the whole block to be |
| 93 | * rejected with -ENOSYS. | 104 | * rejected with -ENOSYS. |
| 94 | * | 105 | * |
| 95 | * Legacy descriptors format: | 106 | * Legacy descriptors format (deprecated as of 3.14): |
| 96 | * | 107 | * |
| 97 | * | off | name | type | description | | 108 | * | off | name | type | description | |
| 98 | * |-----+-----------+--------------+--------------------------------------| | 109 | * |-----+-----------+--------------+--------------------------------------| |
| @@ -265,6 +276,12 @@ struct usb_functionfs_event { | |||
| 265 | */ | 276 | */ |
| 266 | #define FUNCTIONFS_ENDPOINT_REVMAP _IO('g', 129) | 277 | #define FUNCTIONFS_ENDPOINT_REVMAP _IO('g', 129) |
| 267 | 278 | ||
| 279 | /* | ||
| 280 | * Returns endpoint descriptor. If function is not active returns -ENODEV. | ||
| 281 | */ | ||
| 282 | #define FUNCTIONFS_ENDPOINT_DESC _IOR('g', 130, \ | ||
| 283 | struct usb_endpoint_descriptor) | ||
| 284 | |||
| 268 | 285 | ||
| 269 | 286 | ||
| 270 | #endif /* _UAPI__LINUX_FUNCTIONFS_H__ */ | 287 | #endif /* _UAPI__LINUX_FUNCTIONFS_H__ */ |
diff --git a/include/uapi/linux/v4l2-common.h b/include/uapi/linux/v4l2-common.h index 2f6f8cafe773..15273987093e 100644 --- a/include/uapi/linux/v4l2-common.h +++ b/include/uapi/linux/v4l2-common.h | |||
| @@ -43,6 +43,8 @@ | |||
| 43 | #define V4L2_SEL_TGT_CROP_DEFAULT 0x0001 | 43 | #define V4L2_SEL_TGT_CROP_DEFAULT 0x0001 |
| 44 | /* Cropping bounds */ | 44 | /* Cropping bounds */ |
| 45 | #define V4L2_SEL_TGT_CROP_BOUNDS 0x0002 | 45 | #define V4L2_SEL_TGT_CROP_BOUNDS 0x0002 |
| 46 | /* Native frame size */ | ||
| 47 | #define V4L2_SEL_TGT_NATIVE_SIZE 0x0003 | ||
| 46 | /* Current composing area */ | 48 | /* Current composing area */ |
| 47 | #define V4L2_SEL_TGT_COMPOSE 0x0100 | 49 | #define V4L2_SEL_TGT_COMPOSE 0x0100 |
| 48 | /* Default composing area */ | 50 | /* Default composing area */ |
diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index e946e43fb8d5..661f119a51b8 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h | |||
| @@ -746,6 +746,8 @@ enum v4l2_auto_focus_range { | |||
| 746 | V4L2_AUTO_FOCUS_RANGE_INFINITY = 3, | 746 | V4L2_AUTO_FOCUS_RANGE_INFINITY = 3, |
| 747 | }; | 747 | }; |
| 748 | 748 | ||
| 749 | #define V4L2_CID_PAN_SPEED (V4L2_CID_CAMERA_CLASS_BASE+32) | ||
| 750 | #define V4L2_CID_TILT_SPEED (V4L2_CID_CAMERA_CLASS_BASE+33) | ||
| 749 | 751 | ||
| 750 | /* FM Modulator class control IDs */ | 752 | /* FM Modulator class control IDs */ |
| 751 | 753 | ||
| @@ -865,6 +867,10 @@ enum v4l2_jpeg_chroma_subsampling { | |||
| 865 | #define V4L2_CID_VBLANK (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 1) | 867 | #define V4L2_CID_VBLANK (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 1) |
| 866 | #define V4L2_CID_HBLANK (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 2) | 868 | #define V4L2_CID_HBLANK (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 2) |
| 867 | #define V4L2_CID_ANALOGUE_GAIN (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 3) | 869 | #define V4L2_CID_ANALOGUE_GAIN (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 3) |
| 870 | #define V4L2_CID_TEST_PATTERN_RED (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 4) | ||
| 871 | #define V4L2_CID_TEST_PATTERN_GREENR (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 5) | ||
| 872 | #define V4L2_CID_TEST_PATTERN_BLUE (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 6) | ||
| 873 | #define V4L2_CID_TEST_PATTERN_GREENB (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 7) | ||
| 868 | 874 | ||
| 869 | 875 | ||
| 870 | /* Image processing controls */ | 876 | /* Image processing controls */ |
diff --git a/include/uapi/linux/v4l2-mediabus.h b/include/uapi/linux/v4l2-mediabus.h index 1445e858854f..26db20647e6f 100644 --- a/include/uapi/linux/v4l2-mediabus.h +++ b/include/uapi/linux/v4l2-mediabus.h | |||
| @@ -11,122 +11,10 @@ | |||
| 11 | #ifndef __LINUX_V4L2_MEDIABUS_H | 11 | #ifndef __LINUX_V4L2_MEDIABUS_H |
| 12 | #define __LINUX_V4L2_MEDIABUS_H | 12 | #define __LINUX_V4L2_MEDIABUS_H |
| 13 | 13 | ||
| 14 | #include <linux/media-bus-format.h> | ||
| 14 | #include <linux/types.h> | 15 | #include <linux/types.h> |
| 15 | #include <linux/videodev2.h> | 16 | #include <linux/videodev2.h> |
| 16 | 17 | ||
| 17 | /* | ||
| 18 | * These pixel codes uniquely identify data formats on the media bus. Mostly | ||
| 19 | * they correspond to similarly named V4L2_PIX_FMT_* formats, format 0 is | ||
| 20 | * reserved, V4L2_MBUS_FMT_FIXED shall be used by host-client pairs, where the | ||
| 21 | * data format is fixed. Additionally, "2X8" means that one pixel is transferred | ||
| 22 | * in two 8-bit samples, "BE" or "LE" specify in which order those samples are | ||
| 23 | * transferred over the bus: "LE" means that the least significant bits are | ||
| 24 | * transferred first, "BE" means that the most significant bits are transferred | ||
| 25 | * first, and "PADHI" and "PADLO" define which bits - low or high, in the | ||
| 26 | * incomplete high byte, are filled with padding bits. | ||
| 27 | * | ||
| 28 | * The pixel codes are grouped by type, bus_width, bits per component, samples | ||
| 29 | * per pixel and order of subsamples. Numerical values are sorted using generic | ||
| 30 | * numerical sort order (8 thus comes before 10). | ||
| 31 | * | ||
| 32 | * As their value can't change when a new pixel code is inserted in the | ||
| 33 | * enumeration, the pixel codes are explicitly given a numerical value. The next | ||
| 34 | * free values for each category are listed below, update them when inserting | ||
| 35 | * new pixel codes. | ||
| 36 | */ | ||
| 37 | enum v4l2_mbus_pixelcode { | ||
| 38 | V4L2_MBUS_FMT_FIXED = 0x0001, | ||
| 39 | |||
| 40 | /* RGB - next is 0x100e */ | ||
| 41 | V4L2_MBUS_FMT_RGB444_2X8_PADHI_BE = 0x1001, | ||
| 42 | V4L2_MBUS_FMT_RGB444_2X8_PADHI_LE = 0x1002, | ||
| 43 | V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE = 0x1003, | ||
| 44 | V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE = 0x1004, | ||
| 45 | V4L2_MBUS_FMT_BGR565_2X8_BE = 0x1005, | ||
| 46 | V4L2_MBUS_FMT_BGR565_2X8_LE = 0x1006, | ||
| 47 | V4L2_MBUS_FMT_RGB565_2X8_BE = 0x1007, | ||
| 48 | V4L2_MBUS_FMT_RGB565_2X8_LE = 0x1008, | ||
| 49 | V4L2_MBUS_FMT_RGB666_1X18 = 0x1009, | ||
| 50 | V4L2_MBUS_FMT_RGB888_1X24 = 0x100a, | ||
| 51 | V4L2_MBUS_FMT_RGB888_2X12_BE = 0x100b, | ||
| 52 | V4L2_MBUS_FMT_RGB888_2X12_LE = 0x100c, | ||
| 53 | V4L2_MBUS_FMT_ARGB8888_1X32 = 0x100d, | ||
| 54 | |||
| 55 | /* YUV (including grey) - next is 0x2024 */ | ||
| 56 | V4L2_MBUS_FMT_Y8_1X8 = 0x2001, | ||
| 57 | V4L2_MBUS_FMT_UV8_1X8 = 0x2015, | ||
| 58 | V4L2_MBUS_FMT_UYVY8_1_5X8 = 0x2002, | ||
| 59 | V4L2_MBUS_FMT_VYUY8_1_5X8 = 0x2003, | ||
| 60 | V4L2_MBUS_FMT_YUYV8_1_5X8 = 0x2004, | ||
| 61 | V4L2_MBUS_FMT_YVYU8_1_5X8 = 0x2005, | ||
| 62 | V4L2_MBUS_FMT_UYVY8_2X8 = 0x2006, | ||
| 63 | V4L2_MBUS_FMT_VYUY8_2X8 = 0x2007, | ||
| 64 | V4L2_MBUS_FMT_YUYV8_2X8 = 0x2008, | ||
| 65 | V4L2_MBUS_FMT_YVYU8_2X8 = 0x2009, | ||
| 66 | V4L2_MBUS_FMT_Y10_1X10 = 0x200a, | ||
| 67 | V4L2_MBUS_FMT_UYVY10_2X10 = 0x2018, | ||
| 68 | V4L2_MBUS_FMT_VYUY10_2X10 = 0x2019, | ||
| 69 | V4L2_MBUS_FMT_YUYV10_2X10 = 0x200b, | ||
| 70 | V4L2_MBUS_FMT_YVYU10_2X10 = 0x200c, | ||
| 71 | V4L2_MBUS_FMT_Y12_1X12 = 0x2013, | ||
| 72 | V4L2_MBUS_FMT_UYVY8_1X16 = 0x200f, | ||
| 73 | V4L2_MBUS_FMT_VYUY8_1X16 = 0x2010, | ||
| 74 | V4L2_MBUS_FMT_YUYV8_1X16 = 0x2011, | ||
| 75 | V4L2_MBUS_FMT_YVYU8_1X16 = 0x2012, | ||
| 76 | V4L2_MBUS_FMT_YDYUYDYV8_1X16 = 0x2014, | ||
| 77 | V4L2_MBUS_FMT_UYVY10_1X20 = 0x201a, | ||
| 78 | V4L2_MBUS_FMT_VYUY10_1X20 = 0x201b, | ||
| 79 | V4L2_MBUS_FMT_YUYV10_1X20 = 0x200d, | ||
| 80 | V4L2_MBUS_FMT_YVYU10_1X20 = 0x200e, | ||
| 81 | V4L2_MBUS_FMT_YUV10_1X30 = 0x2016, | ||
| 82 | V4L2_MBUS_FMT_AYUV8_1X32 = 0x2017, | ||
| 83 | V4L2_MBUS_FMT_UYVY12_2X12 = 0x201c, | ||
| 84 | V4L2_MBUS_FMT_VYUY12_2X12 = 0x201d, | ||
| 85 | V4L2_MBUS_FMT_YUYV12_2X12 = 0x201e, | ||
| 86 | V4L2_MBUS_FMT_YVYU12_2X12 = 0x201f, | ||
| 87 | V4L2_MBUS_FMT_UYVY12_1X24 = 0x2020, | ||
| 88 | V4L2_MBUS_FMT_VYUY12_1X24 = 0x2021, | ||
| 89 | V4L2_MBUS_FMT_YUYV12_1X24 = 0x2022, | ||
| 90 | V4L2_MBUS_FMT_YVYU12_1X24 = 0x2023, | ||
| 91 | |||
| 92 | /* Bayer - next is 0x3019 */ | ||
| 93 | V4L2_MBUS_FMT_SBGGR8_1X8 = 0x3001, | ||
| 94 | V4L2_MBUS_FMT_SGBRG8_1X8 = 0x3013, | ||
| 95 | V4L2_MBUS_FMT_SGRBG8_1X8 = 0x3002, | ||
| 96 | V4L2_MBUS_FMT_SRGGB8_1X8 = 0x3014, | ||
| 97 | V4L2_MBUS_FMT_SBGGR10_ALAW8_1X8 = 0x3015, | ||
| 98 | V4L2_MBUS_FMT_SGBRG10_ALAW8_1X8 = 0x3016, | ||
| 99 | V4L2_MBUS_FMT_SGRBG10_ALAW8_1X8 = 0x3017, | ||
| 100 | V4L2_MBUS_FMT_SRGGB10_ALAW8_1X8 = 0x3018, | ||
| 101 | V4L2_MBUS_FMT_SBGGR10_DPCM8_1X8 = 0x300b, | ||
| 102 | V4L2_MBUS_FMT_SGBRG10_DPCM8_1X8 = 0x300c, | ||
| 103 | V4L2_MBUS_FMT_SGRBG10_DPCM8_1X8 = 0x3009, | ||
| 104 | V4L2_MBUS_FMT_SRGGB10_DPCM8_1X8 = 0x300d, | ||
| 105 | V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_BE = 0x3003, | ||
| 106 | V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_LE = 0x3004, | ||
| 107 | V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_BE = 0x3005, | ||
| 108 | V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_LE = 0x3006, | ||
| 109 | V4L2_MBUS_FMT_SBGGR10_1X10 = 0x3007, | ||
| 110 | V4L2_MBUS_FMT_SGBRG10_1X10 = 0x300e, | ||
| 111 | V4L2_MBUS_FMT_SGRBG10_1X10 = 0x300a, | ||
| 112 | V4L2_MBUS_FMT_SRGGB10_1X10 = 0x300f, | ||
| 113 | V4L2_MBUS_FMT_SBGGR12_1X12 = 0x3008, | ||
| 114 | V4L2_MBUS_FMT_SGBRG12_1X12 = 0x3010, | ||
| 115 | V4L2_MBUS_FMT_SGRBG12_1X12 = 0x3011, | ||
| 116 | V4L2_MBUS_FMT_SRGGB12_1X12 = 0x3012, | ||
| 117 | |||
| 118 | /* JPEG compressed formats - next is 0x4002 */ | ||
| 119 | V4L2_MBUS_FMT_JPEG_1X8 = 0x4001, | ||
| 120 | |||
| 121 | /* Vendor specific formats - next is 0x5002 */ | ||
| 122 | |||
| 123 | /* S5C73M3 sensor specific interleaved UYVY and JPEG */ | ||
| 124 | V4L2_MBUS_FMT_S5C_UYVY_JPEG_1X8 = 0x5001, | ||
| 125 | |||
| 126 | /* HSV - next is 0x6002 */ | ||
| 127 | V4L2_MBUS_FMT_AHSV8888_1X32 = 0x6001, | ||
| 128 | }; | ||
| 129 | |||
| 130 | /** | 18 | /** |
| 131 | * struct v4l2_mbus_framefmt - frame format on the media bus | 19 | * struct v4l2_mbus_framefmt - frame format on the media bus |
| 132 | * @width: frame width | 20 | * @width: frame width |
| @@ -134,6 +22,8 @@ enum v4l2_mbus_pixelcode { | |||
| 134 | * @code: data format code (from enum v4l2_mbus_pixelcode) | 22 | * @code: data format code (from enum v4l2_mbus_pixelcode) |
| 135 | * @field: used interlacing type (from enum v4l2_field) | 23 | * @field: used interlacing type (from enum v4l2_field) |
| 136 | * @colorspace: colorspace of the data (from enum v4l2_colorspace) | 24 | * @colorspace: colorspace of the data (from enum v4l2_colorspace) |
| 25 | * @ycbcr_enc: YCbCr encoding of the data (from enum v4l2_ycbcr_encoding) | ||
| 26 | * @quantization: quantization of the data (from enum v4l2_quantization) | ||
| 137 | */ | 27 | */ |
| 138 | struct v4l2_mbus_framefmt { | 28 | struct v4l2_mbus_framefmt { |
| 139 | __u32 width; | 29 | __u32 width; |
| @@ -141,7 +31,108 @@ struct v4l2_mbus_framefmt { | |||
| 141 | __u32 code; | 31 | __u32 code; |
| 142 | __u32 field; | 32 | __u32 field; |
| 143 | __u32 colorspace; | 33 | __u32 colorspace; |
| 144 | __u32 reserved[7]; | 34 | __u16 ycbcr_enc; |
| 35 | __u16 quantization; | ||
| 36 | __u32 reserved[6]; | ||
| 37 | }; | ||
| 38 | |||
| 39 | #ifndef __KERNEL__ | ||
| 40 | /* | ||
| 41 | * enum v4l2_mbus_pixelcode and its definitions are now deprecated, and | ||
| 42 | * MEDIA_BUS_FMT_ definitions (defined in media-bus-format.h) should be | ||
| 43 | * used instead. | ||
| 44 | * | ||
| 45 | * New defines should only be added to media-bus-format.h. The | ||
| 46 | * v4l2_mbus_pixelcode enum is frozen. | ||
| 47 | */ | ||
| 48 | |||
| 49 | #define V4L2_MBUS_FROM_MEDIA_BUS_FMT(name) \ | ||
| 50 | V4L2_MBUS_FMT_ ## name = MEDIA_BUS_FMT_ ## name | ||
| 51 | |||
| 52 | enum v4l2_mbus_pixelcode { | ||
| 53 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(FIXED), | ||
| 54 | |||
| 55 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB444_2X8_PADHI_BE), | ||
| 56 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB444_2X8_PADHI_LE), | ||
| 57 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB555_2X8_PADHI_BE), | ||
| 58 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB555_2X8_PADHI_LE), | ||
| 59 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(BGR565_2X8_BE), | ||
| 60 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(BGR565_2X8_LE), | ||
| 61 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB565_2X8_BE), | ||
| 62 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB565_2X8_LE), | ||
| 63 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB666_1X18), | ||
| 64 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB888_1X24), | ||
| 65 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB888_2X12_BE), | ||
| 66 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB888_2X12_LE), | ||
| 67 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(ARGB8888_1X32), | ||
| 68 | |||
| 69 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(Y8_1X8), | ||
| 70 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(UV8_1X8), | ||
| 71 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(UYVY8_1_5X8), | ||
| 72 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(VYUY8_1_5X8), | ||
| 73 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(YUYV8_1_5X8), | ||
| 74 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(YVYU8_1_5X8), | ||
| 75 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(UYVY8_2X8), | ||
| 76 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(VYUY8_2X8), | ||
| 77 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(YUYV8_2X8), | ||
| 78 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(YVYU8_2X8), | ||
| 79 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(Y10_1X10), | ||
| 80 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(UYVY10_2X10), | ||
| 81 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(VYUY10_2X10), | ||
| 82 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(YUYV10_2X10), | ||
| 83 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(YVYU10_2X10), | ||
| 84 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(Y12_1X12), | ||
| 85 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(UYVY8_1X16), | ||
| 86 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(VYUY8_1X16), | ||
| 87 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(YUYV8_1X16), | ||
| 88 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(YVYU8_1X16), | ||
| 89 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(YDYUYDYV8_1X16), | ||
| 90 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(UYVY10_1X20), | ||
| 91 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(VYUY10_1X20), | ||
| 92 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(YUYV10_1X20), | ||
| 93 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(YVYU10_1X20), | ||
| 94 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(YUV10_1X30), | ||
| 95 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(AYUV8_1X32), | ||
| 96 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(UYVY12_2X12), | ||
| 97 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(VYUY12_2X12), | ||
| 98 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(YUYV12_2X12), | ||
| 99 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(YVYU12_2X12), | ||
| 100 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(UYVY12_1X24), | ||
| 101 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(VYUY12_1X24), | ||
| 102 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(YUYV12_1X24), | ||
| 103 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(YVYU12_1X24), | ||
| 104 | |||
| 105 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR8_1X8), | ||
| 106 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGBRG8_1X8), | ||
| 107 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGRBG8_1X8), | ||
| 108 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(SRGGB8_1X8), | ||
| 109 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR10_ALAW8_1X8), | ||
| 110 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGBRG10_ALAW8_1X8), | ||
| 111 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGRBG10_ALAW8_1X8), | ||
| 112 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(SRGGB10_ALAW8_1X8), | ||
| 113 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR10_DPCM8_1X8), | ||
| 114 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGBRG10_DPCM8_1X8), | ||
| 115 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGRBG10_DPCM8_1X8), | ||
| 116 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(SRGGB10_DPCM8_1X8), | ||
| 117 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR10_2X8_PADHI_BE), | ||
| 118 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR10_2X8_PADHI_LE), | ||
| 119 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR10_2X8_PADLO_BE), | ||
| 120 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR10_2X8_PADLO_LE), | ||
| 121 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR10_1X10), | ||
| 122 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGBRG10_1X10), | ||
| 123 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGRBG10_1X10), | ||
| 124 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(SRGGB10_1X10), | ||
| 125 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR12_1X12), | ||
| 126 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGBRG12_1X12), | ||
| 127 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGRBG12_1X12), | ||
| 128 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(SRGGB12_1X12), | ||
| 129 | |||
| 130 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(JPEG_1X8), | ||
| 131 | |||
| 132 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(S5C_UYVY_JPEG_1X8), | ||
| 133 | |||
| 134 | V4L2_MBUS_FROM_MEDIA_BUS_FMT(AHSV8888_1X32), | ||
| 145 | }; | 135 | }; |
| 136 | #endif /* __KERNEL__ */ | ||
| 146 | 137 | ||
| 147 | #endif | 138 | #endif |
diff --git a/include/uapi/linux/v4l2-subdev.h b/include/uapi/linux/v4l2-subdev.h index a619cdd300ac..e0a7e3da498a 100644 --- a/include/uapi/linux/v4l2-subdev.h +++ b/include/uapi/linux/v4l2-subdev.h | |||
| @@ -68,7 +68,7 @@ struct v4l2_subdev_crop { | |||
| 68 | * struct v4l2_subdev_mbus_code_enum - Media bus format enumeration | 68 | * struct v4l2_subdev_mbus_code_enum - Media bus format enumeration |
| 69 | * @pad: pad number, as reported by the media API | 69 | * @pad: pad number, as reported by the media API |
| 70 | * @index: format index during enumeration | 70 | * @index: format index during enumeration |
| 71 | * @code: format code (from enum v4l2_mbus_pixelcode) | 71 | * @code: format code (MEDIA_BUS_FMT_ definitions) |
| 72 | */ | 72 | */ |
| 73 | struct v4l2_subdev_mbus_code_enum { | 73 | struct v4l2_subdev_mbus_code_enum { |
| 74 | __u32 pad; | 74 | __u32 pad; |
| @@ -81,7 +81,7 @@ struct v4l2_subdev_mbus_code_enum { | |||
| 81 | * struct v4l2_subdev_frame_size_enum - Media bus format enumeration | 81 | * struct v4l2_subdev_frame_size_enum - Media bus format enumeration |
| 82 | * @pad: pad number, as reported by the media API | 82 | * @pad: pad number, as reported by the media API |
| 83 | * @index: format index during enumeration | 83 | * @index: format index during enumeration |
| 84 | * @code: format code (from enum v4l2_mbus_pixelcode) | 84 | * @code: format code (MEDIA_BUS_FMT_ definitions) |
| 85 | */ | 85 | */ |
| 86 | struct v4l2_subdev_frame_size_enum { | 86 | struct v4l2_subdev_frame_size_enum { |
| 87 | __u32 index; | 87 | __u32 index; |
| @@ -109,7 +109,7 @@ struct v4l2_subdev_frame_interval { | |||
| 109 | * struct v4l2_subdev_frame_interval_enum - Frame interval enumeration | 109 | * struct v4l2_subdev_frame_interval_enum - Frame interval enumeration |
| 110 | * @pad: pad number, as reported by the media API | 110 | * @pad: pad number, as reported by the media API |
| 111 | * @index: frame interval index during enumeration | 111 | * @index: frame interval index during enumeration |
| 112 | * @code: format code (from enum v4l2_mbus_pixelcode) | 112 | * @code: format code (MEDIA_BUS_FMT_ definitions) |
| 113 | * @width: frame width in pixels | 113 | * @width: frame width in pixels |
| 114 | * @height: frame height in pixels | 114 | * @height: frame height in pixels |
| 115 | * @interval: frame interval in seconds | 115 | * @interval: frame interval in seconds |
diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h index 6612974c64bf..29715d27548f 100644 --- a/include/uapi/linux/vfio.h +++ b/include/uapi/linux/vfio.h | |||
| @@ -33,6 +33,9 @@ | |||
| 33 | /* Check if EEH is supported */ | 33 | /* Check if EEH is supported */ |
| 34 | #define VFIO_EEH 5 | 34 | #define VFIO_EEH 5 |
| 35 | 35 | ||
| 36 | /* Two-stage IOMMU */ | ||
| 37 | #define VFIO_TYPE1_NESTING_IOMMU 6 /* Implies v2 */ | ||
| 38 | |||
| 36 | /* | 39 | /* |
| 37 | * The IOCTL interface is designed for extensibility by embedding the | 40 | * The IOCTL interface is designed for extensibility by embedding the |
| 38 | * structure length (argsz) and flags into structures passed between | 41 | * structure length (argsz) and flags into structures passed between |
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 778a3298fb34..d279c1b75cf7 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h | |||
| @@ -79,6 +79,7 @@ | |||
| 79 | /* Four-character-code (FOURCC) */ | 79 | /* Four-character-code (FOURCC) */ |
| 80 | #define v4l2_fourcc(a, b, c, d)\ | 80 | #define v4l2_fourcc(a, b, c, d)\ |
| 81 | ((__u32)(a) | ((__u32)(b) << 8) | ((__u32)(c) << 16) | ((__u32)(d) << 24)) | 81 | ((__u32)(a) | ((__u32)(b) << 8) | ((__u32)(c) << 16) | ((__u32)(d) << 24)) |
| 82 | #define v4l2_fourcc_be(a, b, c, d) (v4l2_fourcc(a, b, c, d) | (1 << 31)) | ||
| 82 | 83 | ||
| 83 | /* | 84 | /* |
| 84 | * E N U M S | 85 | * E N U M S |
| @@ -177,30 +178,103 @@ enum v4l2_memory { | |||
| 177 | 178 | ||
| 178 | /* see also http://vektor.theorem.ca/graphics/ycbcr/ */ | 179 | /* see also http://vektor.theorem.ca/graphics/ycbcr/ */ |
| 179 | enum v4l2_colorspace { | 180 | enum v4l2_colorspace { |
| 180 | /* ITU-R 601 -- broadcast NTSC/PAL */ | 181 | /* SMPTE 170M: used for broadcast NTSC/PAL SDTV */ |
| 181 | V4L2_COLORSPACE_SMPTE170M = 1, | 182 | V4L2_COLORSPACE_SMPTE170M = 1, |
| 182 | 183 | ||
| 183 | /* 1125-Line (US) HDTV */ | 184 | /* Obsolete pre-1998 SMPTE 240M HDTV standard, superseded by Rec 709 */ |
| 184 | V4L2_COLORSPACE_SMPTE240M = 2, | 185 | V4L2_COLORSPACE_SMPTE240M = 2, |
| 185 | 186 | ||
| 186 | /* HD and modern captures. */ | 187 | /* Rec.709: used for HDTV */ |
| 187 | V4L2_COLORSPACE_REC709 = 3, | 188 | V4L2_COLORSPACE_REC709 = 3, |
| 188 | 189 | ||
| 189 | /* broken BT878 extents (601, luma range 16-253 instead of 16-235) */ | 190 | /* |
| 191 | * Deprecated, do not use. No driver will ever return this. This was | ||
| 192 | * based on a misunderstanding of the bt878 datasheet. | ||
| 193 | */ | ||
| 190 | V4L2_COLORSPACE_BT878 = 4, | 194 | V4L2_COLORSPACE_BT878 = 4, |
| 191 | 195 | ||
| 192 | /* These should be useful. Assume 601 extents. */ | 196 | /* |
| 197 | * NTSC 1953 colorspace. This only makes sense when dealing with | ||
| 198 | * really, really old NTSC recordings. Superseded by SMPTE 170M. | ||
| 199 | */ | ||
| 193 | V4L2_COLORSPACE_470_SYSTEM_M = 5, | 200 | V4L2_COLORSPACE_470_SYSTEM_M = 5, |
| 201 | |||
| 202 | /* | ||
| 203 | * EBU Tech 3213 PAL/SECAM colorspace. This only makes sense when | ||
| 204 | * dealing with really old PAL/SECAM recordings. Superseded by | ||
| 205 | * SMPTE 170M. | ||
| 206 | */ | ||
| 194 | V4L2_COLORSPACE_470_SYSTEM_BG = 6, | 207 | V4L2_COLORSPACE_470_SYSTEM_BG = 6, |
| 195 | 208 | ||
| 196 | /* I know there will be cameras that send this. So, this is | 209 | /* |
| 197 | * unspecified chromaticities and full 0-255 on each of the | 210 | * Effectively shorthand for V4L2_COLORSPACE_SRGB, V4L2_YCBCR_ENC_601 |
| 198 | * Y'CbCr components | 211 | * and V4L2_QUANTIZATION_FULL_RANGE. To be used for (Motion-)JPEG. |
| 199 | */ | 212 | */ |
| 200 | V4L2_COLORSPACE_JPEG = 7, | 213 | V4L2_COLORSPACE_JPEG = 7, |
| 201 | 214 | ||
| 202 | /* For RGB colourspaces, this is probably a good start. */ | 215 | /* For RGB colorspaces such as produces by most webcams. */ |
| 203 | V4L2_COLORSPACE_SRGB = 8, | 216 | V4L2_COLORSPACE_SRGB = 8, |
| 217 | |||
| 218 | /* AdobeRGB colorspace */ | ||
| 219 | V4L2_COLORSPACE_ADOBERGB = 9, | ||
| 220 | |||
| 221 | /* BT.2020 colorspace, used for UHDTV. */ | ||
| 222 | V4L2_COLORSPACE_BT2020 = 10, | ||
| 223 | }; | ||
| 224 | |||
| 225 | enum v4l2_ycbcr_encoding { | ||
| 226 | /* | ||
| 227 | * Mapping of V4L2_YCBCR_ENC_DEFAULT to actual encodings for the | ||
| 228 | * various colorspaces: | ||
| 229 | * | ||
| 230 | * V4L2_COLORSPACE_SMPTE170M, V4L2_COLORSPACE_470_SYSTEM_M, | ||
| 231 | * V4L2_COLORSPACE_470_SYSTEM_BG, V4L2_COLORSPACE_ADOBERGB and | ||
| 232 | * V4L2_COLORSPACE_JPEG: V4L2_YCBCR_ENC_601 | ||
| 233 | * | ||
| 234 | * V4L2_COLORSPACE_REC709: V4L2_YCBCR_ENC_709 | ||
| 235 | * | ||
| 236 | * V4L2_COLORSPACE_SRGB: V4L2_YCBCR_ENC_SYCC | ||
| 237 | * | ||
| 238 | * V4L2_COLORSPACE_BT2020: V4L2_YCBCR_ENC_BT2020 | ||
| 239 | * | ||
| 240 | * V4L2_COLORSPACE_SMPTE240M: V4L2_YCBCR_ENC_SMPTE240M | ||
| 241 | */ | ||
| 242 | V4L2_YCBCR_ENC_DEFAULT = 0, | ||
| 243 | |||
| 244 | /* ITU-R 601 -- SDTV */ | ||
| 245 | V4L2_YCBCR_ENC_601 = 1, | ||
| 246 | |||
| 247 | /* Rec. 709 -- HDTV */ | ||
| 248 | V4L2_YCBCR_ENC_709 = 2, | ||
| 249 | |||
| 250 | /* ITU-R 601/EN 61966-2-4 Extended Gamut -- SDTV */ | ||
| 251 | V4L2_YCBCR_ENC_XV601 = 3, | ||
| 252 | |||
| 253 | /* Rec. 709/EN 61966-2-4 Extended Gamut -- HDTV */ | ||
| 254 | V4L2_YCBCR_ENC_XV709 = 4, | ||
| 255 | |||
| 256 | /* sYCC (Y'CbCr encoding of sRGB) */ | ||
| 257 | V4L2_YCBCR_ENC_SYCC = 5, | ||
| 258 | |||
| 259 | /* BT.2020 Non-constant Luminance Y'CbCr */ | ||
| 260 | V4L2_YCBCR_ENC_BT2020 = 6, | ||
| 261 | |||
| 262 | /* BT.2020 Constant Luminance Y'CbcCrc */ | ||
| 263 | V4L2_YCBCR_ENC_BT2020_CONST_LUM = 7, | ||
| 264 | |||
| 265 | /* SMPTE 240M -- Obsolete HDTV */ | ||
| 266 | V4L2_YCBCR_ENC_SMPTE240M = 8, | ||
| 267 | }; | ||
| 268 | |||
| 269 | enum v4l2_quantization { | ||
| 270 | /* | ||
| 271 | * The default for R'G'B' quantization is always full range. For | ||
| 272 | * Y'CbCr the quantization is always limited range, except for | ||
| 273 | * SYCC, XV601, XV709 or JPEG: those are full range. | ||
| 274 | */ | ||
| 275 | V4L2_QUANTIZATION_DEFAULT = 0, | ||
| 276 | V4L2_QUANTIZATION_FULL_RANGE = 1, | ||
| 277 | V4L2_QUANTIZATION_LIM_RANGE = 2, | ||
| 204 | }; | 278 | }; |
| 205 | 279 | ||
| 206 | enum v4l2_priority { | 280 | enum v4l2_priority { |
| @@ -293,6 +367,8 @@ struct v4l2_pix_format { | |||
| 293 | __u32 colorspace; /* enum v4l2_colorspace */ | 367 | __u32 colorspace; /* enum v4l2_colorspace */ |
| 294 | __u32 priv; /* private data, depends on pixelformat */ | 368 | __u32 priv; /* private data, depends on pixelformat */ |
| 295 | __u32 flags; /* format flags (V4L2_PIX_FMT_FLAG_*) */ | 369 | __u32 flags; /* format flags (V4L2_PIX_FMT_FLAG_*) */ |
| 370 | __u32 ycbcr_enc; /* enum v4l2_ycbcr_encoding */ | ||
| 371 | __u32 quantization; /* enum v4l2_quantization */ | ||
| 296 | }; | 372 | }; |
| 297 | 373 | ||
| 298 | /* Pixel format FOURCC depth Description */ | 374 | /* Pixel format FOURCC depth Description */ |
| @@ -307,6 +383,8 @@ struct v4l2_pix_format { | |||
| 307 | #define V4L2_PIX_FMT_XRGB555 v4l2_fourcc('X', 'R', '1', '5') /* 16 XRGB-1-5-5-5 */ | 383 | #define V4L2_PIX_FMT_XRGB555 v4l2_fourcc('X', 'R', '1', '5') /* 16 XRGB-1-5-5-5 */ |
| 308 | #define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */ | 384 | #define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */ |
| 309 | #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ | 385 | #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ |
| 386 | #define V4L2_PIX_FMT_ARGB555X v4l2_fourcc_be('A', 'R', '1', '5') /* 16 ARGB-5-5-5 BE */ | ||
| 387 | #define V4L2_PIX_FMT_XRGB555X v4l2_fourcc_be('X', 'R', '1', '5') /* 16 XRGB-5-5-5 BE */ | ||
| 310 | #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */ | 388 | #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */ |
| 311 | #define V4L2_PIX_FMT_BGR666 v4l2_fourcc('B', 'G', 'R', 'H') /* 18 BGR-6-6-6 */ | 389 | #define V4L2_PIX_FMT_BGR666 v4l2_fourcc('B', 'G', 'R', 'H') /* 18 BGR-6-6-6 */ |
| 312 | #define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */ | 390 | #define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */ |
| @@ -1246,6 +1324,7 @@ struct v4l2_input { | |||
| 1246 | #define V4L2_IN_CAP_DV_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */ | 1324 | #define V4L2_IN_CAP_DV_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */ |
| 1247 | #define V4L2_IN_CAP_CUSTOM_TIMINGS V4L2_IN_CAP_DV_TIMINGS /* For compatibility */ | 1325 | #define V4L2_IN_CAP_CUSTOM_TIMINGS V4L2_IN_CAP_DV_TIMINGS /* For compatibility */ |
| 1248 | #define V4L2_IN_CAP_STD 0x00000004 /* Supports S_STD */ | 1326 | #define V4L2_IN_CAP_STD 0x00000004 /* Supports S_STD */ |
| 1327 | #define V4L2_IN_CAP_NATIVE_SIZE 0x00000008 /* Supports setting native size */ | ||
| 1249 | 1328 | ||
| 1250 | /* | 1329 | /* |
| 1251 | * V I D E O O U T P U T S | 1330 | * V I D E O O U T P U T S |
| @@ -1269,6 +1348,7 @@ struct v4l2_output { | |||
| 1269 | #define V4L2_OUT_CAP_DV_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */ | 1348 | #define V4L2_OUT_CAP_DV_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */ |
| 1270 | #define V4L2_OUT_CAP_CUSTOM_TIMINGS V4L2_OUT_CAP_DV_TIMINGS /* For compatibility */ | 1349 | #define V4L2_OUT_CAP_CUSTOM_TIMINGS V4L2_OUT_CAP_DV_TIMINGS /* For compatibility */ |
| 1271 | #define V4L2_OUT_CAP_STD 0x00000004 /* Supports S_STD */ | 1350 | #define V4L2_OUT_CAP_STD 0x00000004 /* Supports S_STD */ |
| 1351 | #define V4L2_OUT_CAP_NATIVE_SIZE 0x00000008 /* Supports setting native size */ | ||
| 1272 | 1352 | ||
| 1273 | /* | 1353 | /* |
| 1274 | * C O N T R O L S | 1354 | * C O N T R O L S |
| @@ -1285,11 +1365,11 @@ struct v4l2_ext_control { | |||
| 1285 | union { | 1365 | union { |
| 1286 | __s32 value; | 1366 | __s32 value; |
| 1287 | __s64 value64; | 1367 | __s64 value64; |
| 1288 | char *string; | 1368 | char __user *string; |
| 1289 | __u8 *p_u8; | 1369 | __u8 __user *p_u8; |
| 1290 | __u16 *p_u16; | 1370 | __u16 __user *p_u16; |
| 1291 | __u32 *p_u32; | 1371 | __u32 __user *p_u32; |
| 1292 | void *ptr; | 1372 | void __user *ptr; |
| 1293 | }; | 1373 | }; |
| 1294 | } __attribute__ ((packed)); | 1374 | } __attribute__ ((packed)); |
| 1295 | 1375 | ||
| @@ -1774,6 +1854,8 @@ struct v4l2_plane_pix_format { | |||
| 1774 | * @plane_fmt: per-plane information | 1854 | * @plane_fmt: per-plane information |
| 1775 | * @num_planes: number of planes for this format | 1855 | * @num_planes: number of planes for this format |
| 1776 | * @flags: format flags (V4L2_PIX_FMT_FLAG_*) | 1856 | * @flags: format flags (V4L2_PIX_FMT_FLAG_*) |
| 1857 | * @ycbcr_enc: enum v4l2_ycbcr_encoding, Y'CbCr encoding | ||
| 1858 | * @quantization: enum v4l2_quantization, colorspace quantization | ||
| 1777 | */ | 1859 | */ |
| 1778 | struct v4l2_pix_format_mplane { | 1860 | struct v4l2_pix_format_mplane { |
| 1779 | __u32 width; | 1861 | __u32 width; |
| @@ -1785,7 +1867,9 @@ struct v4l2_pix_format_mplane { | |||
| 1785 | struct v4l2_plane_pix_format plane_fmt[VIDEO_MAX_PLANES]; | 1867 | struct v4l2_plane_pix_format plane_fmt[VIDEO_MAX_PLANES]; |
| 1786 | __u8 num_planes; | 1868 | __u8 num_planes; |
| 1787 | __u8 flags; | 1869 | __u8 flags; |
| 1788 | __u8 reserved[10]; | 1870 | __u8 ycbcr_enc; |
| 1871 | __u8 quantization; | ||
| 1872 | __u8 reserved[8]; | ||
| 1789 | } __attribute__ ((packed)); | 1873 | } __attribute__ ((packed)); |
| 1790 | 1874 | ||
| 1791 | /** | 1875 | /** |
diff --git a/include/uapi/linux/virtio_balloon.h b/include/uapi/linux/virtio_balloon.h index 5e26f61b5df5..be40f7059e93 100644 --- a/include/uapi/linux/virtio_balloon.h +++ b/include/uapi/linux/virtio_balloon.h | |||
| @@ -31,6 +31,7 @@ | |||
| 31 | /* The feature bitmap for virtio balloon */ | 31 | /* The feature bitmap for virtio balloon */ |
| 32 | #define VIRTIO_BALLOON_F_MUST_TELL_HOST 0 /* Tell before reclaiming pages */ | 32 | #define VIRTIO_BALLOON_F_MUST_TELL_HOST 0 /* Tell before reclaiming pages */ |
| 33 | #define VIRTIO_BALLOON_F_STATS_VQ 1 /* Memory Stats virtqueue */ | 33 | #define VIRTIO_BALLOON_F_STATS_VQ 1 /* Memory Stats virtqueue */ |
| 34 | #define VIRTIO_BALLOON_F_DEFLATE_ON_OOM 2 /* Deflate balloon on OOM */ | ||
| 34 | 35 | ||
| 35 | /* Size of a PFN in the balloon interface. */ | 36 | /* Size of a PFN in the balloon interface. */ |
| 36 | #define VIRTIO_BALLOON_PFN_SHIFT 12 | 37 | #define VIRTIO_BALLOON_PFN_SHIFT 12 |
diff --git a/include/uapi/linux/virtio_blk.h b/include/uapi/linux/virtio_blk.h index 9ad67b267584..247c8ba8544a 100644 --- a/include/uapi/linux/virtio_blk.h +++ b/include/uapi/linux/virtio_blk.h | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
| 29 | #include <linux/virtio_ids.h> | 29 | #include <linux/virtio_ids.h> |
| 30 | #include <linux/virtio_config.h> | 30 | #include <linux/virtio_config.h> |
| 31 | #include <linux/virtio_types.h> | ||
| 31 | 32 | ||
| 32 | /* Feature bits */ | 33 | /* Feature bits */ |
| 33 | #define VIRTIO_BLK_F_BARRIER 0 /* Does host support barriers? */ | 34 | #define VIRTIO_BLK_F_BARRIER 0 /* Does host support barriers? */ |
| @@ -114,18 +115,18 @@ struct virtio_blk_config { | |||
| 114 | /* This is the first element of the read scatter-gather list. */ | 115 | /* This is the first element of the read scatter-gather list. */ |
| 115 | struct virtio_blk_outhdr { | 116 | struct virtio_blk_outhdr { |
| 116 | /* VIRTIO_BLK_T* */ | 117 | /* VIRTIO_BLK_T* */ |
| 117 | __u32 type; | 118 | __virtio32 type; |
| 118 | /* io priority. */ | 119 | /* io priority. */ |
| 119 | __u32 ioprio; | 120 | __virtio32 ioprio; |
| 120 | /* Sector (ie. 512 byte offset) */ | 121 | /* Sector (ie. 512 byte offset) */ |
| 121 | __u64 sector; | 122 | __virtio64 sector; |
| 122 | }; | 123 | }; |
| 123 | 124 | ||
| 124 | struct virtio_scsi_inhdr { | 125 | struct virtio_scsi_inhdr { |
| 125 | __u32 errors; | 126 | __virtio32 errors; |
| 126 | __u32 data_len; | 127 | __virtio32 data_len; |
| 127 | __u32 sense_len; | 128 | __virtio32 sense_len; |
| 128 | __u32 residual; | 129 | __virtio32 residual; |
| 129 | }; | 130 | }; |
| 130 | 131 | ||
| 131 | /* And this is the final byte of the write scatter-gather list. */ | 132 | /* And this is the final byte of the write scatter-gather list. */ |
diff --git a/include/uapi/linux/virtio_config.h b/include/uapi/linux/virtio_config.h index 3ce768c6910d..a6d0cdeaacd4 100644 --- a/include/uapi/linux/virtio_config.h +++ b/include/uapi/linux/virtio_config.h | |||
| @@ -38,14 +38,16 @@ | |||
| 38 | #define VIRTIO_CONFIG_S_DRIVER 2 | 38 | #define VIRTIO_CONFIG_S_DRIVER 2 |
| 39 | /* Driver has used its parts of the config, and is happy */ | 39 | /* Driver has used its parts of the config, and is happy */ |
| 40 | #define VIRTIO_CONFIG_S_DRIVER_OK 4 | 40 | #define VIRTIO_CONFIG_S_DRIVER_OK 4 |
| 41 | /* Driver has finished configuring features */ | ||
| 42 | #define VIRTIO_CONFIG_S_FEATURES_OK 8 | ||
| 41 | /* We've given up on this device. */ | 43 | /* We've given up on this device. */ |
| 42 | #define VIRTIO_CONFIG_S_FAILED 0x80 | 44 | #define VIRTIO_CONFIG_S_FAILED 0x80 |
| 43 | 45 | ||
| 44 | /* Some virtio feature bits (currently bits 28 through 31) are reserved for the | 46 | /* Some virtio feature bits (currently bits 28 through 32) are reserved for the |
| 45 | * transport being used (eg. virtio_ring), the rest are per-device feature | 47 | * transport being used (eg. virtio_ring), the rest are per-device feature |
| 46 | * bits. */ | 48 | * bits. */ |
| 47 | #define VIRTIO_TRANSPORT_F_START 28 | 49 | #define VIRTIO_TRANSPORT_F_START 28 |
| 48 | #define VIRTIO_TRANSPORT_F_END 32 | 50 | #define VIRTIO_TRANSPORT_F_END 33 |
| 49 | 51 | ||
| 50 | /* Do we get callbacks when the ring is completely used, even if we've | 52 | /* Do we get callbacks when the ring is completely used, even if we've |
| 51 | * suppressed them? */ | 53 | * suppressed them? */ |
| @@ -54,4 +56,7 @@ | |||
| 54 | /* Can the device handle any descriptor layout? */ | 56 | /* Can the device handle any descriptor layout? */ |
| 55 | #define VIRTIO_F_ANY_LAYOUT 27 | 57 | #define VIRTIO_F_ANY_LAYOUT 27 |
| 56 | 58 | ||
| 59 | /* v1.0 compliant. */ | ||
| 60 | #define VIRTIO_F_VERSION_1 32 | ||
| 61 | |||
| 57 | #endif /* _UAPI_LINUX_VIRTIO_CONFIG_H */ | 62 | #endif /* _UAPI_LINUX_VIRTIO_CONFIG_H */ |
diff --git a/include/uapi/linux/virtio_console.h b/include/uapi/linux/virtio_console.h index ba260dd0b33a..b7fb108c9310 100644 --- a/include/uapi/linux/virtio_console.h +++ b/include/uapi/linux/virtio_console.h | |||
| @@ -32,6 +32,7 @@ | |||
| 32 | #ifndef _UAPI_LINUX_VIRTIO_CONSOLE_H | 32 | #ifndef _UAPI_LINUX_VIRTIO_CONSOLE_H |
| 33 | #define _UAPI_LINUX_VIRTIO_CONSOLE_H | 33 | #define _UAPI_LINUX_VIRTIO_CONSOLE_H |
| 34 | #include <linux/types.h> | 34 | #include <linux/types.h> |
| 35 | #include <linux/virtio_types.h> | ||
| 35 | #include <linux/virtio_ids.h> | 36 | #include <linux/virtio_ids.h> |
| 36 | #include <linux/virtio_config.h> | 37 | #include <linux/virtio_config.h> |
| 37 | 38 | ||
| @@ -58,9 +59,9 @@ struct virtio_console_config { | |||
| 58 | * particular port. | 59 | * particular port. |
| 59 | */ | 60 | */ |
| 60 | struct virtio_console_control { | 61 | struct virtio_console_control { |
| 61 | __u32 id; /* Port number */ | 62 | __virtio32 id; /* Port number */ |
| 62 | __u16 event; /* The kind of control event (see below) */ | 63 | __virtio16 event; /* The kind of control event (see below) */ |
| 63 | __u16 value; /* Extra information for the key */ | 64 | __virtio16 value; /* Extra information for the key */ |
| 64 | }; | 65 | }; |
| 65 | 66 | ||
| 66 | /* Some events for control messages */ | 67 | /* Some events for control messages */ |
diff --git a/include/uapi/linux/virtio_net.h b/include/uapi/linux/virtio_net.h index 172a7f00780c..b5f1677b291c 100644 --- a/include/uapi/linux/virtio_net.h +++ b/include/uapi/linux/virtio_net.h | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
| 29 | #include <linux/virtio_ids.h> | 29 | #include <linux/virtio_ids.h> |
| 30 | #include <linux/virtio_config.h> | 30 | #include <linux/virtio_config.h> |
| 31 | #include <linux/virtio_types.h> | ||
| 31 | #include <linux/if_ether.h> | 32 | #include <linux/if_ether.h> |
| 32 | 33 | ||
| 33 | /* The feature bitmap for virtio net */ | 34 | /* The feature bitmap for virtio net */ |
| @@ -84,17 +85,17 @@ struct virtio_net_hdr { | |||
| 84 | #define VIRTIO_NET_HDR_GSO_TCPV6 4 // GSO frame, IPv6 TCP | 85 | #define VIRTIO_NET_HDR_GSO_TCPV6 4 // GSO frame, IPv6 TCP |
| 85 | #define VIRTIO_NET_HDR_GSO_ECN 0x80 // TCP has ECN set | 86 | #define VIRTIO_NET_HDR_GSO_ECN 0x80 // TCP has ECN set |
| 86 | __u8 gso_type; | 87 | __u8 gso_type; |
| 87 | __u16 hdr_len; /* Ethernet + IP + tcp/udp hdrs */ | 88 | __virtio16 hdr_len; /* Ethernet + IP + tcp/udp hdrs */ |
| 88 | __u16 gso_size; /* Bytes to append to hdr_len per frame */ | 89 | __virtio16 gso_size; /* Bytes to append to hdr_len per frame */ |
| 89 | __u16 csum_start; /* Position to start checksumming from */ | 90 | __virtio16 csum_start; /* Position to start checksumming from */ |
| 90 | __u16 csum_offset; /* Offset after that to place checksum */ | 91 | __virtio16 csum_offset; /* Offset after that to place checksum */ |
| 91 | }; | 92 | }; |
| 92 | 93 | ||
| 93 | /* This is the version of the header to use when the MRG_RXBUF | 94 | /* This is the version of the header to use when the MRG_RXBUF |
| 94 | * feature has been negotiated. */ | 95 | * feature has been negotiated. */ |
| 95 | struct virtio_net_hdr_mrg_rxbuf { | 96 | struct virtio_net_hdr_mrg_rxbuf { |
| 96 | struct virtio_net_hdr hdr; | 97 | struct virtio_net_hdr hdr; |
| 97 | __u16 num_buffers; /* Number of merged rx buffers */ | 98 | __virtio16 num_buffers; /* Number of merged rx buffers */ |
| 98 | }; | 99 | }; |
| 99 | 100 | ||
| 100 | /* | 101 | /* |
| @@ -149,7 +150,7 @@ typedef __u8 virtio_net_ctrl_ack; | |||
| 149 | * VIRTIO_NET_F_CTRL_MAC_ADDR feature is available. | 150 | * VIRTIO_NET_F_CTRL_MAC_ADDR feature is available. |
| 150 | */ | 151 | */ |
| 151 | struct virtio_net_ctrl_mac { | 152 | struct virtio_net_ctrl_mac { |
| 152 | __u32 entries; | 153 | __virtio32 entries; |
| 153 | __u8 macs[][ETH_ALEN]; | 154 | __u8 macs[][ETH_ALEN]; |
| 154 | } __attribute__((packed)); | 155 | } __attribute__((packed)); |
| 155 | 156 | ||
| @@ -193,7 +194,7 @@ struct virtio_net_ctrl_mac { | |||
| 193 | * specified. | 194 | * specified. |
| 194 | */ | 195 | */ |
| 195 | struct virtio_net_ctrl_mq { | 196 | struct virtio_net_ctrl_mq { |
| 196 | __u16 virtqueue_pairs; | 197 | __virtio16 virtqueue_pairs; |
| 197 | }; | 198 | }; |
| 198 | 199 | ||
| 199 | #define VIRTIO_NET_CTRL_MQ 4 | 200 | #define VIRTIO_NET_CTRL_MQ 4 |
diff --git a/include/uapi/linux/virtio_pci.h b/include/uapi/linux/virtio_pci.h index e5ec1caab82a..35b552c7f330 100644 --- a/include/uapi/linux/virtio_pci.h +++ b/include/uapi/linux/virtio_pci.h | |||
| @@ -41,6 +41,8 @@ | |||
| 41 | 41 | ||
| 42 | #include <linux/virtio_config.h> | 42 | #include <linux/virtio_config.h> |
| 43 | 43 | ||
| 44 | #ifndef VIRTIO_PCI_NO_LEGACY | ||
| 45 | |||
| 44 | /* A 32-bit r/o bitmask of the features supported by the host */ | 46 | /* A 32-bit r/o bitmask of the features supported by the host */ |
| 45 | #define VIRTIO_PCI_HOST_FEATURES 0 | 47 | #define VIRTIO_PCI_HOST_FEATURES 0 |
| 46 | 48 | ||
| @@ -67,16 +69,11 @@ | |||
| 67 | * a read-and-acknowledge. */ | 69 | * a read-and-acknowledge. */ |
| 68 | #define VIRTIO_PCI_ISR 19 | 70 | #define VIRTIO_PCI_ISR 19 |
| 69 | 71 | ||
| 70 | /* The bit of the ISR which indicates a device configuration change. */ | ||
| 71 | #define VIRTIO_PCI_ISR_CONFIG 0x2 | ||
| 72 | |||
| 73 | /* MSI-X registers: only enabled if MSI-X is enabled. */ | 72 | /* MSI-X registers: only enabled if MSI-X is enabled. */ |
| 74 | /* A 16-bit vector for configuration changes. */ | 73 | /* A 16-bit vector for configuration changes. */ |
| 75 | #define VIRTIO_MSI_CONFIG_VECTOR 20 | 74 | #define VIRTIO_MSI_CONFIG_VECTOR 20 |
| 76 | /* A 16-bit vector for selected queue notifications. */ | 75 | /* A 16-bit vector for selected queue notifications. */ |
| 77 | #define VIRTIO_MSI_QUEUE_VECTOR 22 | 76 | #define VIRTIO_MSI_QUEUE_VECTOR 22 |
| 78 | /* Vector value used to disable MSI for queue */ | ||
| 79 | #define VIRTIO_MSI_NO_VECTOR 0xffff | ||
| 80 | 77 | ||
| 81 | /* The remaining space is defined by each driver as the per-driver | 78 | /* The remaining space is defined by each driver as the per-driver |
| 82 | * configuration space */ | 79 | * configuration space */ |
| @@ -94,4 +91,12 @@ | |||
| 94 | /* The alignment to use between consumer and producer parts of vring. | 91 | /* The alignment to use between consumer and producer parts of vring. |
| 95 | * x86 pagesize again. */ | 92 | * x86 pagesize again. */ |
| 96 | #define VIRTIO_PCI_VRING_ALIGN 4096 | 93 | #define VIRTIO_PCI_VRING_ALIGN 4096 |
| 94 | |||
| 95 | #endif /* VIRTIO_PCI_NO_LEGACY */ | ||
| 96 | |||
| 97 | /* The bit of the ISR which indicates a device configuration change. */ | ||
| 98 | #define VIRTIO_PCI_ISR_CONFIG 0x2 | ||
| 99 | /* Vector value used to disable MSI for queue */ | ||
| 100 | #define VIRTIO_MSI_NO_VECTOR 0xffff | ||
| 101 | |||
| 97 | #endif | 102 | #endif |
diff --git a/include/uapi/linux/virtio_ring.h b/include/uapi/linux/virtio_ring.h index a99f9b7caa67..a3318f31e8e7 100644 --- a/include/uapi/linux/virtio_ring.h +++ b/include/uapi/linux/virtio_ring.h | |||
| @@ -32,6 +32,7 @@ | |||
| 32 | * | 32 | * |
| 33 | * Copyright Rusty Russell IBM Corporation 2007. */ | 33 | * Copyright Rusty Russell IBM Corporation 2007. */ |
| 34 | #include <linux/types.h> | 34 | #include <linux/types.h> |
| 35 | #include <linux/virtio_types.h> | ||
| 35 | 36 | ||
| 36 | /* This marks a buffer as continuing via the next field. */ | 37 | /* This marks a buffer as continuing via the next field. */ |
| 37 | #define VRING_DESC_F_NEXT 1 | 38 | #define VRING_DESC_F_NEXT 1 |
| @@ -61,32 +62,32 @@ | |||
| 61 | /* Virtio ring descriptors: 16 bytes. These can chain together via "next". */ | 62 | /* Virtio ring descriptors: 16 bytes. These can chain together via "next". */ |
| 62 | struct vring_desc { | 63 | struct vring_desc { |
| 63 | /* Address (guest-physical). */ | 64 | /* Address (guest-physical). */ |
| 64 | __u64 addr; | 65 | __virtio64 addr; |
| 65 | /* Length. */ | 66 | /* Length. */ |
| 66 | __u32 len; | 67 | __virtio32 len; |
| 67 | /* The flags as indicated above. */ | 68 | /* The flags as indicated above. */ |
| 68 | __u16 flags; | 69 | __virtio16 flags; |
| 69 | /* We chain unused descriptors via this, too */ | 70 | /* We chain unused descriptors via this, too */ |
| 70 | __u16 next; | 71 | __virtio16 next; |
| 71 | }; | 72 | }; |
| 72 | 73 | ||
| 73 | struct vring_avail { | 74 | struct vring_avail { |
| 74 | __u16 flags; | 75 | __virtio16 flags; |
| 75 | __u16 idx; | 76 | __virtio16 idx; |
| 76 | __u16 ring[]; | 77 | __virtio16 ring[]; |
| 77 | }; | 78 | }; |
| 78 | 79 | ||
| 79 | /* u32 is used here for ids for padding reasons. */ | 80 | /* u32 is used here for ids for padding reasons. */ |
| 80 | struct vring_used_elem { | 81 | struct vring_used_elem { |
| 81 | /* Index of start of used descriptor chain. */ | 82 | /* Index of start of used descriptor chain. */ |
| 82 | __u32 id; | 83 | __virtio32 id; |
| 83 | /* Total length of the descriptor chain which was used (written to) */ | 84 | /* Total length of the descriptor chain which was used (written to) */ |
| 84 | __u32 len; | 85 | __virtio32 len; |
| 85 | }; | 86 | }; |
| 86 | 87 | ||
| 87 | struct vring_used { | 88 | struct vring_used { |
| 88 | __u16 flags; | 89 | __virtio16 flags; |
| 89 | __u16 idx; | 90 | __virtio16 idx; |
| 90 | struct vring_used_elem ring[]; | 91 | struct vring_used_elem ring[]; |
| 91 | }; | 92 | }; |
| 92 | 93 | ||
| @@ -100,6 +101,13 @@ struct vring { | |||
| 100 | struct vring_used *used; | 101 | struct vring_used *used; |
| 101 | }; | 102 | }; |
| 102 | 103 | ||
| 104 | /* Alignment requirements for vring elements. | ||
| 105 | * When using pre-virtio 1.0 layout, these fall out naturally. | ||
| 106 | */ | ||
| 107 | #define VRING_AVAIL_ALIGN_SIZE 2 | ||
| 108 | #define VRING_USED_ALIGN_SIZE 4 | ||
| 109 | #define VRING_DESC_ALIGN_SIZE 16 | ||
| 110 | |||
| 103 | /* The standard layout for the ring is a continuous chunk of memory which looks | 111 | /* The standard layout for the ring is a continuous chunk of memory which looks |
| 104 | * like this. We assume num is a power of 2. | 112 | * like this. We assume num is a power of 2. |
| 105 | * | 113 | * |
| @@ -109,25 +117,25 @@ struct vring { | |||
| 109 | * struct vring_desc desc[num]; | 117 | * struct vring_desc desc[num]; |
| 110 | * | 118 | * |
| 111 | * // A ring of available descriptor heads with free-running index. | 119 | * // A ring of available descriptor heads with free-running index. |
| 112 | * __u16 avail_flags; | 120 | * __virtio16 avail_flags; |
| 113 | * __u16 avail_idx; | 121 | * __virtio16 avail_idx; |
| 114 | * __u16 available[num]; | 122 | * __virtio16 available[num]; |
| 115 | * __u16 used_event_idx; | 123 | * __virtio16 used_event_idx; |
| 116 | * | 124 | * |
| 117 | * // Padding to the next align boundary. | 125 | * // Padding to the next align boundary. |
| 118 | * char pad[]; | 126 | * char pad[]; |
| 119 | * | 127 | * |
| 120 | * // A ring of used descriptor heads with free-running index. | 128 | * // A ring of used descriptor heads with free-running index. |
| 121 | * __u16 used_flags; | 129 | * __virtio16 used_flags; |
| 122 | * __u16 used_idx; | 130 | * __virtio16 used_idx; |
| 123 | * struct vring_used_elem used[num]; | 131 | * struct vring_used_elem used[num]; |
| 124 | * __u16 avail_event_idx; | 132 | * __virtio16 avail_event_idx; |
| 125 | * }; | 133 | * }; |
| 126 | */ | 134 | */ |
| 127 | /* We publish the used event index at the end of the available ring, and vice | 135 | /* We publish the used event index at the end of the available ring, and vice |
| 128 | * versa. They are at the end for backwards compatibility. */ | 136 | * versa. They are at the end for backwards compatibility. */ |
| 129 | #define vring_used_event(vr) ((vr)->avail->ring[(vr)->num]) | 137 | #define vring_used_event(vr) ((vr)->avail->ring[(vr)->num]) |
| 130 | #define vring_avail_event(vr) (*(__u16 *)&(vr)->used->ring[(vr)->num]) | 138 | #define vring_avail_event(vr) (*(__virtio16 *)&(vr)->used->ring[(vr)->num]) |
| 131 | 139 | ||
| 132 | static inline void vring_init(struct vring *vr, unsigned int num, void *p, | 140 | static inline void vring_init(struct vring *vr, unsigned int num, void *p, |
| 133 | unsigned long align) | 141 | unsigned long align) |
| @@ -135,15 +143,15 @@ static inline void vring_init(struct vring *vr, unsigned int num, void *p, | |||
| 135 | vr->num = num; | 143 | vr->num = num; |
| 136 | vr->desc = p; | 144 | vr->desc = p; |
| 137 | vr->avail = p + num*sizeof(struct vring_desc); | 145 | vr->avail = p + num*sizeof(struct vring_desc); |
| 138 | vr->used = (void *)(((unsigned long)&vr->avail->ring[num] + sizeof(__u16) | 146 | vr->used = (void *)(((unsigned long)&vr->avail->ring[num] + sizeof(__virtio16) |
| 139 | + align-1) & ~(align - 1)); | 147 | + align-1) & ~(align - 1)); |
| 140 | } | 148 | } |
| 141 | 149 | ||
| 142 | static inline unsigned vring_size(unsigned int num, unsigned long align) | 150 | static inline unsigned vring_size(unsigned int num, unsigned long align) |
| 143 | { | 151 | { |
| 144 | return ((sizeof(struct vring_desc) * num + sizeof(__u16) * (3 + num) | 152 | return ((sizeof(struct vring_desc) * num + sizeof(__virtio16) * (3 + num) |
| 145 | + align - 1) & ~(align - 1)) | 153 | + align - 1) & ~(align - 1)) |
| 146 | + sizeof(__u16) * 3 + sizeof(struct vring_used_elem) * num; | 154 | + sizeof(__virtio16) * 3 + sizeof(struct vring_used_elem) * num; |
| 147 | } | 155 | } |
| 148 | 156 | ||
| 149 | /* The following is used with USED_EVENT_IDX and AVAIL_EVENT_IDX */ | 157 | /* The following is used with USED_EVENT_IDX and AVAIL_EVENT_IDX */ |
diff --git a/include/uapi/linux/virtio_scsi.h b/include/uapi/linux/virtio_scsi.h new file mode 100644 index 000000000000..42b9370771b0 --- /dev/null +++ b/include/uapi/linux/virtio_scsi.h | |||
| @@ -0,0 +1,164 @@ | |||
| 1 | /* | ||
| 2 | * This header is BSD licensed so anyone can use the definitions to implement | ||
| 3 | * compatible drivers/servers. | ||
| 4 | * | ||
| 5 | * Redistribution and use in source and binary forms, with or without | ||
| 6 | * modification, are permitted provided that the following conditions | ||
| 7 | * are met: | ||
| 8 | * 1. Redistributions of source code must retain the above copyright | ||
| 9 | * notice, this list of conditions and the following disclaimer. | ||
| 10 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 11 | * notice, this list of conditions and the following disclaimer in the | ||
| 12 | * documentation and/or other materials provided with the distribution. | ||
| 13 | * | ||
| 14 | * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND | ||
| 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 16 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 17 | * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 18 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 19 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 20 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 21 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 22 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 23 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 24 | * SUCH DAMAGE. | ||
| 25 | */ | ||
| 26 | |||
| 27 | #ifndef _LINUX_VIRTIO_SCSI_H | ||
| 28 | #define _LINUX_VIRTIO_SCSI_H | ||
| 29 | |||
| 30 | #include <linux/virtio_types.h> | ||
| 31 | |||
| 32 | #define VIRTIO_SCSI_CDB_SIZE 32 | ||
| 33 | #define VIRTIO_SCSI_SENSE_SIZE 96 | ||
| 34 | |||
| 35 | /* SCSI command request, followed by data-out */ | ||
| 36 | struct virtio_scsi_cmd_req { | ||
| 37 | __u8 lun[8]; /* Logical Unit Number */ | ||
| 38 | __virtio64 tag; /* Command identifier */ | ||
| 39 | __u8 task_attr; /* Task attribute */ | ||
| 40 | __u8 prio; /* SAM command priority field */ | ||
| 41 | __u8 crn; | ||
| 42 | __u8 cdb[VIRTIO_SCSI_CDB_SIZE]; | ||
| 43 | } __attribute__((packed)); | ||
| 44 | |||
| 45 | /* SCSI command request, followed by protection information */ | ||
| 46 | struct virtio_scsi_cmd_req_pi { | ||
| 47 | __u8 lun[8]; /* Logical Unit Number */ | ||
| 48 | __virtio64 tag; /* Command identifier */ | ||
| 49 | __u8 task_attr; /* Task attribute */ | ||
| 50 | __u8 prio; /* SAM command priority field */ | ||
| 51 | __u8 crn; | ||
| 52 | __virtio32 pi_bytesout; /* DataOUT PI Number of bytes */ | ||
| 53 | __virtio32 pi_bytesin; /* DataIN PI Number of bytes */ | ||
| 54 | __u8 cdb[VIRTIO_SCSI_CDB_SIZE]; | ||
| 55 | } __attribute__((packed)); | ||
| 56 | |||
| 57 | /* Response, followed by sense data and data-in */ | ||
| 58 | struct virtio_scsi_cmd_resp { | ||
| 59 | __virtio32 sense_len; /* Sense data length */ | ||
| 60 | __virtio32 resid; /* Residual bytes in data buffer */ | ||
| 61 | __virtio16 status_qualifier; /* Status qualifier */ | ||
| 62 | __u8 status; /* Command completion status */ | ||
| 63 | __u8 response; /* Response values */ | ||
| 64 | __u8 sense[VIRTIO_SCSI_SENSE_SIZE]; | ||
| 65 | } __attribute__((packed)); | ||
| 66 | |||
| 67 | /* Task Management Request */ | ||
| 68 | struct virtio_scsi_ctrl_tmf_req { | ||
| 69 | __virtio32 type; | ||
| 70 | __virtio32 subtype; | ||
| 71 | __u8 lun[8]; | ||
| 72 | __virtio64 tag; | ||
| 73 | } __attribute__((packed)); | ||
| 74 | |||
| 75 | struct virtio_scsi_ctrl_tmf_resp { | ||
| 76 | __u8 response; | ||
| 77 | } __attribute__((packed)); | ||
| 78 | |||
| 79 | /* Asynchronous notification query/subscription */ | ||
| 80 | struct virtio_scsi_ctrl_an_req { | ||
| 81 | __virtio32 type; | ||
| 82 | __u8 lun[8]; | ||
| 83 | __virtio32 event_requested; | ||
| 84 | } __attribute__((packed)); | ||
| 85 | |||
| 86 | struct virtio_scsi_ctrl_an_resp { | ||
| 87 | __virtio32 event_actual; | ||
| 88 | __u8 response; | ||
| 89 | } __attribute__((packed)); | ||
| 90 | |||
| 91 | struct virtio_scsi_event { | ||
| 92 | __virtio32 event; | ||
| 93 | __u8 lun[8]; | ||
| 94 | __virtio32 reason; | ||
| 95 | } __attribute__((packed)); | ||
| 96 | |||
| 97 | struct virtio_scsi_config { | ||
| 98 | __u32 num_queues; | ||
| 99 | __u32 seg_max; | ||
| 100 | __u32 max_sectors; | ||
| 101 | __u32 cmd_per_lun; | ||
| 102 | __u32 event_info_size; | ||
| 103 | __u32 sense_size; | ||
| 104 | __u32 cdb_size; | ||
| 105 | __u16 max_channel; | ||
| 106 | __u16 max_target; | ||
| 107 | __u32 max_lun; | ||
| 108 | } __attribute__((packed)); | ||
| 109 | |||
| 110 | /* Feature Bits */ | ||
| 111 | #define VIRTIO_SCSI_F_INOUT 0 | ||
| 112 | #define VIRTIO_SCSI_F_HOTPLUG 1 | ||
| 113 | #define VIRTIO_SCSI_F_CHANGE 2 | ||
| 114 | #define VIRTIO_SCSI_F_T10_PI 3 | ||
| 115 | |||
| 116 | /* Response codes */ | ||
| 117 | #define VIRTIO_SCSI_S_OK 0 | ||
| 118 | #define VIRTIO_SCSI_S_OVERRUN 1 | ||
| 119 | #define VIRTIO_SCSI_S_ABORTED 2 | ||
| 120 | #define VIRTIO_SCSI_S_BAD_TARGET 3 | ||
| 121 | #define VIRTIO_SCSI_S_RESET 4 | ||
| 122 | #define VIRTIO_SCSI_S_BUSY 5 | ||
| 123 | #define VIRTIO_SCSI_S_TRANSPORT_FAILURE 6 | ||
| 124 | #define VIRTIO_SCSI_S_TARGET_FAILURE 7 | ||
| 125 | #define VIRTIO_SCSI_S_NEXUS_FAILURE 8 | ||
| 126 | #define VIRTIO_SCSI_S_FAILURE 9 | ||
| 127 | #define VIRTIO_SCSI_S_FUNCTION_SUCCEEDED 10 | ||
| 128 | #define VIRTIO_SCSI_S_FUNCTION_REJECTED 11 | ||
| 129 | #define VIRTIO_SCSI_S_INCORRECT_LUN 12 | ||
| 130 | |||
| 131 | /* Controlq type codes. */ | ||
| 132 | #define VIRTIO_SCSI_T_TMF 0 | ||
| 133 | #define VIRTIO_SCSI_T_AN_QUERY 1 | ||
| 134 | #define VIRTIO_SCSI_T_AN_SUBSCRIBE 2 | ||
| 135 | |||
| 136 | /* Valid TMF subtypes. */ | ||
| 137 | #define VIRTIO_SCSI_T_TMF_ABORT_TASK 0 | ||
| 138 | #define VIRTIO_SCSI_T_TMF_ABORT_TASK_SET 1 | ||
| 139 | #define VIRTIO_SCSI_T_TMF_CLEAR_ACA 2 | ||
| 140 | #define VIRTIO_SCSI_T_TMF_CLEAR_TASK_SET 3 | ||
| 141 | #define VIRTIO_SCSI_T_TMF_I_T_NEXUS_RESET 4 | ||
| 142 | #define VIRTIO_SCSI_T_TMF_LOGICAL_UNIT_RESET 5 | ||
| 143 | #define VIRTIO_SCSI_T_TMF_QUERY_TASK 6 | ||
| 144 | #define VIRTIO_SCSI_T_TMF_QUERY_TASK_SET 7 | ||
| 145 | |||
| 146 | /* Events. */ | ||
| 147 | #define VIRTIO_SCSI_T_EVENTS_MISSED 0x80000000 | ||
| 148 | #define VIRTIO_SCSI_T_NO_EVENT 0 | ||
| 149 | #define VIRTIO_SCSI_T_TRANSPORT_RESET 1 | ||
| 150 | #define VIRTIO_SCSI_T_ASYNC_NOTIFY 2 | ||
| 151 | #define VIRTIO_SCSI_T_PARAM_CHANGE 3 | ||
| 152 | |||
| 153 | /* Reasons of transport reset event */ | ||
| 154 | #define VIRTIO_SCSI_EVT_RESET_HARD 0 | ||
| 155 | #define VIRTIO_SCSI_EVT_RESET_RESCAN 1 | ||
| 156 | #define VIRTIO_SCSI_EVT_RESET_REMOVED 2 | ||
| 157 | |||
| 158 | #define VIRTIO_SCSI_S_SIMPLE 0 | ||
| 159 | #define VIRTIO_SCSI_S_ORDERED 1 | ||
| 160 | #define VIRTIO_SCSI_S_HEAD 2 | ||
| 161 | #define VIRTIO_SCSI_S_ACA 3 | ||
| 162 | |||
| 163 | |||
| 164 | #endif /* _LINUX_VIRTIO_SCSI_H */ | ||
diff --git a/include/uapi/linux/virtio_types.h b/include/uapi/linux/virtio_types.h new file mode 100644 index 000000000000..e845e8c4cbee --- /dev/null +++ b/include/uapi/linux/virtio_types.h | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | #ifndef _UAPI_LINUX_VIRTIO_TYPES_H | ||
| 2 | #define _UAPI_LINUX_VIRTIO_TYPES_H | ||
| 3 | /* Type definitions for virtio implementations. | ||
| 4 | * | ||
| 5 | * This header is BSD licensed so anyone can use the definitions to implement | ||
| 6 | * compatible drivers/servers. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * 1. Redistributions of source code must retain the above copyright | ||
| 12 | * notice, this list of conditions and the following disclaimer. | ||
| 13 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 14 | * notice, this list of conditions and the following disclaimer in the | ||
| 15 | * documentation and/or other materials provided with the distribution. | ||
| 16 | * 3. Neither the name of IBM nor the names of its contributors | ||
| 17 | * may be used to endorse or promote products derived from this software | ||
| 18 | * without specific prior written permission. | ||
| 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND | ||
| 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 22 | * ARE DISCLAIMED. IN NO EVENT SHALL IBM OR CONTRIBUTORS BE LIABLE | ||
| 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 29 | * SUCH DAMAGE. | ||
| 30 | * | ||
| 31 | * Copyright (C) 2014 Red Hat, Inc. | ||
| 32 | * Author: Michael S. Tsirkin <mst@redhat.com> | ||
| 33 | */ | ||
| 34 | #include <linux/types.h> | ||
| 35 | |||
| 36 | /* | ||
| 37 | * __virtio{16,32,64} have the following meaning: | ||
| 38 | * - __u{16,32,64} for virtio devices in legacy mode, accessed in native endian | ||
| 39 | * - __le{16,32,64} for standard-compliant virtio devices | ||
| 40 | */ | ||
| 41 | |||
| 42 | typedef __u16 __bitwise__ __virtio16; | ||
| 43 | typedef __u32 __bitwise__ __virtio32; | ||
| 44 | typedef __u64 __bitwise__ __virtio64; | ||
| 45 | |||
| 46 | #endif /* _UAPI_LINUX_VIRTIO_TYPES_H */ | ||
diff --git a/include/uapi/linux/vt.h b/include/uapi/linux/vt.h index 4b59a26799a3..978578bd1895 100644 --- a/include/uapi/linux/vt.h +++ b/include/uapi/linux/vt.h | |||
| @@ -84,7 +84,4 @@ struct vt_setactivate { | |||
| 84 | 84 | ||
| 85 | #define VT_SETACTIVATE 0x560F /* Activate and set the mode of a console */ | 85 | #define VT_SETACTIVATE 0x560F /* Activate and set the mode of a console */ |
| 86 | 86 | ||
| 87 | |||
| 88 | #define vt_get_kmsg_redirect() vt_kmsg_redirect(-1) | ||
| 89 | |||
| 90 | #endif /* _UAPI_LINUX_VT_H */ | 87 | #endif /* _UAPI_LINUX_VT_H */ |
diff --git a/include/uapi/linux/wil6210_uapi.h b/include/uapi/linux/wil6210_uapi.h new file mode 100644 index 000000000000..6a3cddd156c4 --- /dev/null +++ b/include/uapi/linux/wil6210_uapi.h | |||
| @@ -0,0 +1,87 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2014 Qualcomm Atheros, Inc. | ||
| 3 | * | ||
| 4 | * Permission to use, copy, modify, and/or distribute this software for any | ||
| 5 | * purpose with or without fee is hereby granted, provided that the above | ||
| 6 | * copyright notice and this permission notice appear in all copies. | ||
| 7 | * | ||
| 8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #ifndef __WIL6210_UAPI_H__ | ||
| 18 | #define __WIL6210_UAPI_H__ | ||
| 19 | |||
| 20 | #if !defined(__KERNEL__) | ||
| 21 | #define __user | ||
| 22 | #endif | ||
| 23 | |||
| 24 | #include <linux/sockios.h> | ||
| 25 | |||
| 26 | /* Numbers SIOCDEVPRIVATE and SIOCDEVPRIVATE + 1 | ||
| 27 | * are used by Android devices to implement PNO (preferred network offload). | ||
| 28 | * Albeit it is temporary solution, use different numbers to avoid conflicts | ||
| 29 | */ | ||
| 30 | |||
| 31 | /** | ||
| 32 | * Perform 32-bit I/O operation to the card memory | ||
| 33 | * | ||
| 34 | * User code should arrange data in memory like this: | ||
| 35 | * | ||
| 36 | * struct wil_memio io; | ||
| 37 | * struct ifreq ifr = { | ||
| 38 | * .ifr_data = &io, | ||
| 39 | * }; | ||
| 40 | */ | ||
| 41 | #define WIL_IOCTL_MEMIO (SIOCDEVPRIVATE + 2) | ||
| 42 | |||
| 43 | /** | ||
| 44 | * Perform block I/O operation to the card memory | ||
| 45 | * | ||
| 46 | * User code should arrange data in memory like this: | ||
| 47 | * | ||
| 48 | * void *buf; | ||
| 49 | * struct wil_memio_block io = { | ||
| 50 | * .block = buf, | ||
| 51 | * }; | ||
| 52 | * struct ifreq ifr = { | ||
| 53 | * .ifr_data = &io, | ||
| 54 | * }; | ||
| 55 | */ | ||
| 56 | #define WIL_IOCTL_MEMIO_BLOCK (SIOCDEVPRIVATE + 3) | ||
| 57 | |||
| 58 | /** | ||
| 59 | * operation to perform | ||
| 60 | * | ||
| 61 | * @wil_mmio_op_mask - bits defining operation, | ||
| 62 | * @wil_mmio_addr_mask - bits defining addressing mode | ||
| 63 | */ | ||
| 64 | enum wil_memio_op { | ||
| 65 | wil_mmio_read = 0, | ||
| 66 | wil_mmio_write = 1, | ||
| 67 | wil_mmio_op_mask = 0xff, | ||
| 68 | wil_mmio_addr_linker = 0 << 8, | ||
| 69 | wil_mmio_addr_ahb = 1 << 8, | ||
| 70 | wil_mmio_addr_bar = 2 << 8, | ||
| 71 | wil_mmio_addr_mask = 0xff00, | ||
| 72 | }; | ||
| 73 | |||
| 74 | struct wil_memio { | ||
| 75 | uint32_t op; /* enum wil_memio_op */ | ||
| 76 | uint32_t addr; /* should be 32-bit aligned */ | ||
| 77 | uint32_t val; | ||
| 78 | }; | ||
| 79 | |||
| 80 | struct wil_memio_block { | ||
| 81 | uint32_t op; /* enum wil_memio_op */ | ||
| 82 | uint32_t addr; /* should be 32-bit aligned */ | ||
| 83 | uint32_t size; /* should be multiple of 4 */ | ||
| 84 | void __user *block; /* block address */ | ||
| 85 | }; | ||
| 86 | |||
| 87 | #endif /* __WIL6210_UAPI_H__ */ | ||
diff --git a/include/uapi/linux/xfrm.h b/include/uapi/linux/xfrm.h index 25e5dd916ba4..02d5125a5ee8 100644 --- a/include/uapi/linux/xfrm.h +++ b/include/uapi/linux/xfrm.h | |||
| @@ -328,6 +328,8 @@ enum xfrm_spdattr_type_t { | |||
| 328 | XFRMA_SPD_UNSPEC, | 328 | XFRMA_SPD_UNSPEC, |
| 329 | XFRMA_SPD_INFO, | 329 | XFRMA_SPD_INFO, |
| 330 | XFRMA_SPD_HINFO, | 330 | XFRMA_SPD_HINFO, |
| 331 | XFRMA_SPD_IPV4_HTHRESH, | ||
| 332 | XFRMA_SPD_IPV6_HTHRESH, | ||
| 331 | __XFRMA_SPD_MAX | 333 | __XFRMA_SPD_MAX |
| 332 | 334 | ||
| 333 | #define XFRMA_SPD_MAX (__XFRMA_SPD_MAX - 1) | 335 | #define XFRMA_SPD_MAX (__XFRMA_SPD_MAX - 1) |
| @@ -347,6 +349,11 @@ struct xfrmu_spdhinfo { | |||
| 347 | __u32 spdhmcnt; | 349 | __u32 spdhmcnt; |
| 348 | }; | 350 | }; |
| 349 | 351 | ||
| 352 | struct xfrmu_spdhthresh { | ||
| 353 | __u8 lbits; | ||
| 354 | __u8 rbits; | ||
| 355 | }; | ||
| 356 | |||
| 350 | struct xfrm_usersa_info { | 357 | struct xfrm_usersa_info { |
| 351 | struct xfrm_selector sel; | 358 | struct xfrm_selector sel; |
| 352 | struct xfrm_id id; | 359 | struct xfrm_id id; |
